@alisaitteke/photoshop-mcp 1.3.0 → 1.3.3

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,249 @@
1
+ (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const i of r)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&s(o)}).observe(document,{childList:!0,subtree:!0});function n(r){const i={};return r.integrity&&(i.integrity=r.integrity),r.referrerPolicy&&(i.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?i.credentials="include":r.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function s(r){if(r.ep)return;r.ep=!0;const i=n(r);fetch(r.href,i)}})();/**
2
+ * @vue/shared v3.5.38
3
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
+ * @license MIT
5
+ **/function tc(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Te={},mr=[],Sn=()=>{},Mp=()=>!1,ha=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ga=e=>e.startsWith("onUpdate:"),mt=Object.assign,nc=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},jm=Object.prototype.hasOwnProperty,Me=(e,t)=>jm.call(e,t),ge=Array.isArray,_r=e=>Wi(e)==="[object Map]",Lr=e=>Wi(e)==="[object Set]",rd=e=>Wi(e)==="[object Date]",we=e=>typeof e=="function",Ye=e=>typeof e=="string",Xt=e=>typeof e=="symbol",Fe=e=>e!==null&&typeof e=="object",$p=e=>(Fe(e)||we(e))&&we(e.then)&&we(e.catch),Fp=Object.prototype.toString,Wi=e=>Fp.call(e),Hm=e=>Wi(e).slice(8,-1),Dp=e=>Wi(e)==="[object Object]",va=e=>Ye(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,gi=tc(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ma=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},Vm=/-\w/g,vt=ma(e=>e.replace(Vm,t=>t.slice(1).toUpperCase())),Um=/\B([A-Z])/g,ss=ma(e=>e.replace(Um,"-$1").toLowerCase()),_a=ma(e=>e.charAt(0).toUpperCase()+e.slice(1)),vi=ma(e=>e?`on${_a(e)}`:""),wt=(e,t)=>!Object.is(e,t),Eo=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},Lp=(e,t,n,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},ya=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let id;const ba=()=>id||(id=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function ks(e){if(ge(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],r=Ye(s)?Ym(s):ks(s);if(r)for(const i in r)t[i]=r[i]}return t}else if(Ye(e)||Fe(e))return e}const Wm=/;(?![^(]*\))/g,Gm=/:([^]+)/,Km=/\/\*[^]*?\*\//g;function Ym(e){const t={};return e.replace(Km,"").split(Wm).forEach(n=>{if(n){const s=n.split(Gm);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function He(e){let t="";if(Ye(e))t=e;else if(ge(e))for(let n=0;n<e.length;n++){const s=He(e[n]);s&&(t+=s+" ")}else if(Fe(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function Nr(e){if(!e)return null;let{class:t,style:n}=e;return t&&!Ye(t)&&(e.class=He(t)),n&&(e.style=ks(n)),e}const Jm="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Xm=tc(Jm);function Np(e){return!!e||e===""}function Zm(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=vs(e[s],t[s]);return n}function vs(e,t){if(e===t)return!0;let n=rd(e),s=rd(t);if(n||s)return n&&s?e.getTime()===t.getTime():!1;if(n=Xt(e),s=Xt(t),n||s)return e===t;if(n=ge(e),s=ge(t),n||s)return n&&s?Zm(e,t):!1;if(n=Fe(e),s=Fe(t),n||s){if(!n||!s)return!1;const r=Object.keys(e).length,i=Object.keys(t).length;if(r!==i)return!1;for(const o in e){const a=e.hasOwnProperty(o),l=t.hasOwnProperty(o);if(a&&!l||!a&&l||!vs(e[o],t[o]))return!1}}return String(e)===String(t)}function sc(e,t){return e.findIndex(n=>vs(n,t))}const qp=e=>!!(e&&e.__v_isRef===!0),fe=e=>Ye(e)?e:e==null?"":ge(e)||Fe(e)&&(e.toString===Fp||!we(e.toString))?qp(e)?fe(e.value):JSON.stringify(e,Bp,2):String(e),Bp=(e,t)=>qp(t)?Bp(e,t.value):_r(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],i)=>(n[Wa(s,i)+" =>"]=r,n),{})}:Lr(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Wa(n))}:Xt(t)?Wa(t):Fe(t)&&!ge(t)&&!Dp(t)?String(t):t,Wa=(e,t="")=>{var n;return Xt(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
6
+ * @vue/reactivity v3.5.38
7
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
8
+ * @license MIT
9
+ **/let ft;class zp{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&ft&&(ft.active?(this.parent=ft,this.index=(ft.scopes||(ft.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=ft;try{return ft=this,t()}finally{ft=n}}}on(){++this._on===1&&(this.prevScope=ft,ft=this)}off(){if(this._on>0&&--this._on===0){if(ft===this)ft=this.prevScope;else{let t=ft;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n<s;n++)this.effects[n].stop();for(this.effects.length=0,n=0,s=this.cleanups.length;n<s;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,s=this.scopes.length;n<s;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0}}}function jp(e){return new zp(e)}function rc(){return ft}function Hp(e,t=!1){ft&&ft.cleanups.push(e)}let Ve;const Ga=new WeakSet;class Vp{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,ft&&(ft.active?ft.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Ga.has(this)&&(Ga.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Wp(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,od(this),Gp(this);const t=Ve,n=sn;Ve=this,sn=!0;try{return this.fn()}finally{Kp(this),Ve=t,sn=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)ac(t);this.deps=this.depsTail=void 0,od(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Ga.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){zl(this)&&this.run()}get dirty(){return zl(this)}}let Up=0,mi,_i;function Wp(e,t=!1){if(e.flags|=8,t){e.next=_i,_i=e;return}e.next=mi,mi=e}function ic(){Up++}function oc(){if(--Up>0)return;if(_i){let t=_i;for(_i=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;mi;){let t=mi;for(mi=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function Gp(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Kp(e){let t,n=e.depsTail,s=n;for(;s;){const r=s.prevDep;s.version===-1?(s===n&&(n=r),ac(s),Qm(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=r}e.deps=t,e.depsTail=n}function zl(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Yp(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Yp(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Oi)||(e.globalVersion=Oi,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!zl(e))))return;e.flags|=2;const t=e.dep,n=Ve,s=sn;Ve=e,sn=!0;try{Gp(e);const r=e.fn(e._value);(t.version===0||wt(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{Ve=n,sn=s,Kp(e),e.flags&=-3}}function ac(e,t=!1){const{dep:n,prevSub:s,nextSub:r}=e;if(s&&(s.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)ac(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Qm(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let sn=!0;const Jp=[];function Jn(){Jp.push(sn),sn=!1}function Xn(){const e=Jp.pop();sn=e===void 0?!0:e}function od(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Ve;Ve=void 0;try{t()}finally{Ve=n}}}let Oi=0;class e_{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class xa{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Ve||!sn||Ve===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Ve)n=this.activeLink=new e_(Ve,this),Ve.deps?(n.prevDep=Ve.depsTail,Ve.depsTail.nextDep=n,Ve.depsTail=n):Ve.deps=Ve.depsTail=n,Xp(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=Ve.depsTail,n.nextDep=void 0,Ve.depsTail.nextDep=n,Ve.depsTail=n,Ve.deps===n&&(Ve.deps=s)}return n}trigger(t){this.version++,Oi++,this.notify(t)}notify(t){ic();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{oc()}}}function Xp(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)Xp(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Ro=new WeakMap,js=Symbol(""),jl=Symbol(""),Ti=Symbol("");function Ct(e,t,n){if(sn&&Ve){let s=Ro.get(e);s||Ro.set(e,s=new Map);let r=s.get(n);r||(s.set(n,r=new xa),r.map=s,r.key=n),r.track()}}function Vn(e,t,n,s,r,i){const o=Ro.get(e);if(!o){Oi++;return}const a=l=>{l&&l.trigger()};if(ic(),t==="clear")o.forEach(a);else{const l=ge(e),c=l&&va(n);if(l&&n==="length"){const u=Number(s);o.forEach((d,f)=>{(f==="length"||f===Ti||!Xt(f)&&f>=u)&&a(d)})}else switch((n!==void 0||o.has(void 0))&&a(o.get(n)),c&&a(o.get(Ti)),t){case"add":l?c&&a(o.get("length")):(a(o.get(js)),_r(e)&&a(o.get(jl)));break;case"delete":l||(a(o.get(js)),_r(e)&&a(o.get(jl)));break;case"set":_r(e)&&a(o.get(js));break}}oc()}function t_(e,t){const n=Ro.get(e);return n&&n.get(t)}function Qs(e){const t=Ie(e);return t===e?t:(Ct(t,"iterate",Ti),Gt(e)?t:t.map(on))}function wa(e){return Ct(e=Ie(e),"iterate",Ti),e}function _n(e,t){return Qn(e)?Pr(Hs(e)?on(t):t):on(t)}const n_={__proto__:null,[Symbol.iterator](){return Ka(this,Symbol.iterator,e=>_n(this,e))},concat(...e){return Qs(this).concat(...e.map(t=>ge(t)?Qs(t):t))},entries(){return Ka(this,"entries",e=>(e[1]=_n(this,e[1]),e))},every(e,t){return Rn(this,"every",e,t,void 0,arguments)},filter(e,t){return Rn(this,"filter",e,t,n=>n.map(s=>_n(this,s)),arguments)},find(e,t){return Rn(this,"find",e,t,n=>_n(this,n),arguments)},findIndex(e,t){return Rn(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Rn(this,"findLast",e,t,n=>_n(this,n),arguments)},findLastIndex(e,t){return Rn(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Rn(this,"forEach",e,t,void 0,arguments)},includes(...e){return Ya(this,"includes",e)},indexOf(...e){return Ya(this,"indexOf",e)},join(e){return Qs(this).join(e)},lastIndexOf(...e){return Ya(this,"lastIndexOf",e)},map(e,t){return Rn(this,"map",e,t,void 0,arguments)},pop(){return Ur(this,"pop")},push(...e){return Ur(this,"push",e)},reduce(e,...t){return ad(this,"reduce",e,t)},reduceRight(e,...t){return ad(this,"reduceRight",e,t)},shift(){return Ur(this,"shift")},some(e,t){return Rn(this,"some",e,t,void 0,arguments)},splice(...e){return Ur(this,"splice",e)},toReversed(){return Qs(this).toReversed()},toSorted(e){return Qs(this).toSorted(e)},toSpliced(...e){return Qs(this).toSpliced(...e)},unshift(...e){return Ur(this,"unshift",e)},values(){return Ka(this,"values",e=>_n(this,e))}};function Ka(e,t,n){const s=wa(e),r=s[t]();return s!==e&&!Gt(e)&&(r._next=r.next,r.next=()=>{const i=r._next();return i.done||(i.value=n(i.value)),i}),r}const s_=Array.prototype;function Rn(e,t,n,s,r,i){const o=wa(e),a=o!==e&&!Gt(e),l=o[t];if(l!==s_[t]){const d=l.apply(e,i);return a?on(d):d}let c=n;o!==e&&(a?c=function(d,f){return n.call(this,_n(e,d),f,e)}:n.length>2&&(c=function(d,f){return n.call(this,d,f,e)}));const u=l.call(o,c,s);return a&&r?r(u):u}function ad(e,t,n,s){const r=wa(e),i=r!==e&&!Gt(e);let o=n,a=!1;r!==e&&(i?(a=s.length===0,o=function(c,u,d){return a&&(a=!1,c=_n(e,c)),n.call(this,c,_n(e,u),d,e)}):n.length>3&&(o=function(c,u,d){return n.call(this,c,u,d,e)}));const l=r[t](o,...s);return a?_n(e,l):l}function Ya(e,t,n){const s=Ie(e);Ct(s,"iterate",Ti);const r=s[t](...n);return(r===-1||r===!1)&&Sa(n[0])?(n[0]=Ie(n[0]),s[t](...n)):r}function Ur(e,t,n=[]){Jn(),ic();const s=Ie(e)[t].apply(e,n);return oc(),Xn(),s}const r_=tc("__proto__,__v_isRef,__isVue"),Zp=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Xt));function i_(e){Xt(e)||(e=String(e));const t=Ie(this);return Ct(t,"has",e),t.hasOwnProperty(e)}class Qp{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const r=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return i;if(n==="__v_raw")return s===(r?i?ih:rh:i?sh:nh).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=ge(t);if(!r){let l;if(o&&(l=n_[n]))return l;if(n==="hasOwnProperty")return i_}const a=Reflect.get(t,n,it(t)?t:s);if((Xt(n)?Zp.has(n):r_(n))||(r||Ct(t,"get",n),i))return a;if(it(a)){const l=o&&va(n)?a:a.value;return r&&Fe(l)?Mo(l):l}return Fe(a)?r?Mo(a):Zn(a):a}}class eh extends Qp{constructor(t=!1){super(!1,t)}set(t,n,s,r){let i=t[n];const o=ge(t)&&va(n);if(!this._isShallow){const c=Qn(i);if(!Gt(s)&&!Qn(s)&&(i=Ie(i),s=Ie(s)),!o&&it(i)&&!it(s))return c||(i.value=s),!0}const a=o?Number(n)<t.length:Me(t,n),l=Reflect.set(t,n,s,it(t)?t:r);return t===Ie(r)&&(a?wt(s,i)&&Vn(t,"set",n,s):Vn(t,"add",n,s)),l}deleteProperty(t,n){const s=Me(t,n);t[n];const r=Reflect.deleteProperty(t,n);return r&&s&&Vn(t,"delete",n,void 0),r}has(t,n){const s=Reflect.has(t,n);return(!Xt(n)||!Zp.has(n))&&Ct(t,"has",n),s}ownKeys(t){return Ct(t,"iterate",ge(t)?"length":js),Reflect.ownKeys(t)}}class th extends Qp{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const o_=new eh,a_=new th,l_=new eh(!0),u_=new th(!0),Hl=e=>e,no=e=>Reflect.getPrototypeOf(e);function c_(e,t,n){return function(...s){const r=this.__v_raw,i=Ie(r),o=_r(i),a=e==="entries"||e===Symbol.iterator&&o,l=e==="keys"&&o,c=r[e](...s),u=n?Hl:t?Pr:on;return!t&&Ct(i,"iterate",l?jl:js),mt(Object.create(c),{next(){const{value:d,done:f}=c.next();return f?{value:d,done:f}:{value:a?[u(d[0]),u(d[1])]:u(d),done:f}}})}}function so(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function d_(e,t){const n={get(r){const i=this.__v_raw,o=Ie(i),a=Ie(r);e||(wt(r,a)&&Ct(o,"get",r),Ct(o,"get",a));const{has:l}=no(o),c=t?Hl:e?Pr:on;if(l.call(o,r))return c(i.get(r));if(l.call(o,a))return c(i.get(a));i!==o&&i.get(r)},get size(){const r=this.__v_raw;return!e&&Ct(Ie(r),"iterate",js),r.size},has(r){const i=this.__v_raw,o=Ie(i),a=Ie(r);return e||(wt(r,a)&&Ct(o,"has",r),Ct(o,"has",a)),r===a?i.has(r):i.has(r)||i.has(a)},forEach(r,i){const o=this,a=o.__v_raw,l=Ie(a),c=t?Hl:e?Pr:on;return!e&&Ct(l,"iterate",js),a.forEach((u,d)=>r.call(i,c(u),c(d),o))}};return mt(n,e?{add:so("add"),set:so("set"),delete:so("delete"),clear:so("clear")}:{add(r){const i=Ie(this),o=no(i),a=Ie(r),l=!t&&!Gt(r)&&!Qn(r)?a:r;return o.has.call(i,l)||wt(r,l)&&o.has.call(i,r)||wt(a,l)&&o.has.call(i,a)||(i.add(l),Vn(i,"add",l,l)),this},set(r,i){!t&&!Gt(i)&&!Qn(i)&&(i=Ie(i));const o=Ie(this),{has:a,get:l}=no(o);let c=a.call(o,r);c||(r=Ie(r),c=a.call(o,r));const u=l.call(o,r);return o.set(r,i),c?wt(i,u)&&Vn(o,"set",r,i):Vn(o,"add",r,i),this},delete(r){const i=Ie(this),{has:o,get:a}=no(i);let l=o.call(i,r);l||(r=Ie(r),l=o.call(i,r)),a&&a.call(i,r);const c=i.delete(r);return l&&Vn(i,"delete",r,void 0),c},clear(){const r=Ie(this),i=r.size!==0,o=r.clear();return i&&Vn(r,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=c_(r,e,t)}),n}function ka(e,t){const n=d_(e,t);return(s,r,i)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(Me(n,r)&&r in s?n:s,r,i)}const f_={get:ka(!1,!1)},p_={get:ka(!1,!0)},h_={get:ka(!0,!1)},g_={get:ka(!0,!0)},nh=new WeakMap,sh=new WeakMap,rh=new WeakMap,ih=new WeakMap;function v_(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Zn(e){return Qn(e)?e:Ea(e,!1,o_,f_,nh)}function oh(e){return Ea(e,!1,l_,p_,sh)}function Mo(e){return Ea(e,!0,a_,h_,rh)}function $s(e){return Ea(e,!0,u_,g_,ih)}function Ea(e,t,n,s,r){if(!Fe(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const i=r.get(e);if(i)return i;const o=v_(Hm(e));if(o===0)return e;const a=new Proxy(e,o===2?s:n);return r.set(e,a),a}function Hs(e){return Qn(e)?Hs(e.__v_raw):!!(e&&e.__v_isReactive)}function Qn(e){return!!(e&&e.__v_isReadonly)}function Gt(e){return!!(e&&e.__v_isShallow)}function Sa(e){return e?!!e.__v_raw:!1}function Ie(e){const t=e&&e.__v_raw;return t?Ie(t):e}function ah(e){return!Me(e,"__v_skip")&&Object.isExtensible(e)&&Lp(e,"__v_skip",!0),e}const on=e=>Fe(e)?Zn(e):e,Pr=e=>Fe(e)?Mo(e):e;function it(e){return e?e.__v_isRef===!0:!1}function J(e){return lh(e,!1)}function qr(e){return lh(e,!0)}function lh(e,t){return it(e)?e:new m_(e,t)}class m_{constructor(t,n){this.dep=new xa,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Ie(t),this._value=n?t:on(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||Gt(t)||Qn(t);t=s?t:Ie(t),wt(t,n)&&(this._rawValue=t,this._value=s?t:on(t),this.dep.trigger())}}function __(e){e.dep&&e.dep.trigger()}function _(e){return it(e)?e.value:e}function Mt(e){return we(e)?e():_(e)}const y_={get:(e,t,n)=>t==="__v_raw"?e:_(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return it(r)&&!it(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function uh(e){return Hs(e)?e:new Proxy(e,y_)}class b_{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new xa,{get:s,set:r}=t(n.track.bind(n),n.trigger.bind(n));this._get=s,this._set=r}get value(){return this._value=this._get()}set value(t){this._set(t)}}function ch(e){return new b_(e)}function ms(e){const t=ge(e)?new Array(e.length):{};for(const n in e)t[n]=dh(e,n);return t}class x_{constructor(t,n,s){this._object=t,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0,this._key=Xt(n)?n:String(n),this._raw=Ie(t);let r=!0,i=t;if(!ge(t)||Xt(this._key)||!va(this._key))do r=!Sa(i)||Gt(i);while(r&&(i=i.__v_raw));this._shallow=r}get value(){let t=this._object[this._key];return this._shallow&&(t=_(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&it(this._raw[this._key])){const n=this._object[this._key];if(it(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return t_(this._raw,this._key)}}class w_{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function k_(e,t,n){return it(e)?e:we(e)?new w_(e):Fe(e)&&arguments.length>1?dh(e,t,n):J(e)}function dh(e,t,n){return new x_(e,t,n)}class E_{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new xa(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Oi-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&Ve!==this)return Wp(this,!0),!0}get value(){const t=this.dep.track();return Yp(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function S_(e,t,n=!1){let s,r;return we(e)?s=e:(s=e.get,r=e.set),new E_(s,r,n)}const ro={},$o=new WeakMap;let Fs;function C_(e,t=!1,n=Fs){if(n){let s=$o.get(n);s||$o.set(n,s=[]),s.push(e)}}function P_(e,t,n=Te){const{immediate:s,deep:r,once:i,scheduler:o,augmentJob:a,call:l}=n,c=k=>r?k:Gt(k)||r===!1||r===0?Un(k,1):Un(k);let u,d,f,p,g=!1,h=!1;if(it(e)?(d=()=>e.value,g=Gt(e)):Hs(e)?(d=()=>c(e),g=!0):ge(e)?(h=!0,g=e.some(k=>Hs(k)||Gt(k)),d=()=>e.map(k=>{if(it(k))return k.value;if(Hs(k))return c(k);if(we(k))return l?l(k,2):k()})):we(e)?t?d=l?()=>l(e,2):e:d=()=>{if(f){Jn();try{f()}finally{Xn()}}const k=Fs;Fs=u;try{return l?l(e,3,[p]):e(p)}finally{Fs=k}}:d=Sn,t&&r){const k=d,O=r===!0?1/0:r;d=()=>Un(k(),O)}const m=rc(),v=()=>{u.stop(),m&&m.active&&nc(m.effects,u)};if(i&&t){const k=t;t=(...O)=>{const q=k(...O);return v(),q}}let y=h?new Array(e.length).fill(ro):ro;const x=k=>{if(!(!(u.flags&1)||!u.dirty&&!k))if(t){const O=u.run();if(k||r||g||(h?O.some((q,E)=>wt(q,y[E])):wt(O,y))){f&&f();const q=Fs;Fs=u;try{const E=[O,y===ro?void 0:h&&y[0]===ro?[]:y,p];y=O,l?l(t,3,E):t(...E)}finally{Fs=q}}}else u.run()};return a&&a(x),u=new Vp(d),u.scheduler=o?()=>o(x,!1):x,p=k=>C_(k,!1,u),f=u.onStop=()=>{const k=$o.get(u);if(k){if(l)l(k,4);else for(const O of k)O();$o.delete(u)}},t?s?x(!0):y=u.run():o?o(x.bind(null,!0),!0):u.run(),v.pause=u.pause.bind(u),v.resume=u.resume.bind(u),v.stop=v,v}function Un(e,t=1/0,n){if(t<=0||!Fe(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,it(e))Un(e.value,t,n);else if(ge(e))for(let s=0;s<e.length;s++)Un(e[s],t,n);else if(Lr(e)||_r(e))e.forEach(s=>{Un(s,t,n)});else if(Dp(e)){for(const s in e)Un(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&Un(e[s],t,n)}return e}/**
10
+ * @vue/runtime-core v3.5.38
11
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
12
+ * @license MIT
13
+ **/function Gi(e,t,n,s){try{return s?e(...s):e()}catch(r){Ca(r,t,n)}}function an(e,t,n,s){if(we(e)){const r=Gi(e,t,n,s);return r&&$p(r)&&r.catch(i=>{Ca(i,t,n)}),r}if(ge(e)){const r=[];for(let i=0;i<e.length;i++)r.push(an(e[i],t,n,s));return r}}function Ca(e,t,n,s=!0){const r=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||Te;if(t){let a=t.parent;const l=t.proxy,c=`https://vuejs.org/error-reference/#runtime-${n}`;for(;a;){const u=a.ec;if(u){for(let d=0;d<u.length;d++)if(u[d](e,l,c)===!1)return}a=a.parent}if(i){Jn(),Gi(i,null,10,[e,l,c]),Xn();return}}A_(e,n,r,s,o)}function A_(e,t,n,s=!0,r=!1){if(r)throw e;console.error(e)}const Rt=[];let mn=-1;const yr=[];let ds=null,ar=0;const fh=Promise.resolve();let Fo=null;function Dt(e){const t=Fo||fh;return e?t.then(this?e.bind(this):e):t}function O_(e){let t=mn+1,n=Rt.length;for(;t<n;){const s=t+n>>>1,r=Rt[s],i=Ii(r);i<e||i===e&&r.flags&2?t=s+1:n=s}return t}function lc(e){if(!(e.flags&1)){const t=Ii(e),n=Rt[Rt.length-1];!n||!(e.flags&2)&&t>=Ii(n)?Rt.push(e):Rt.splice(O_(t),0,e),e.flags|=1,ph()}}function ph(){Fo||(Fo=fh.then(gh))}function T_(e){ge(e)?yr.push(...e):ds&&e.id===-1?ds.splice(ar+1,0,e):e.flags&1||(yr.push(e),e.flags|=1),ph()}function ld(e,t,n=mn+1){for(;n<Rt.length;n++){const s=Rt[n];if(s&&s.flags&2){if(e&&s.id!==e.uid)continue;Rt.splice(n,1),n--,s.flags&4&&(s.flags&=-2),s(),s.flags&4||(s.flags&=-2)}}}function hh(e){if(yr.length){const t=[...new Set(yr)].sort((n,s)=>Ii(n)-Ii(s));if(yr.length=0,ds){ds.push(...t);return}for(ds=t,ar=0;ar<ds.length;ar++){const n=ds[ar];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}ds=null,ar=0}}const Ii=e=>e.id==null?e.flags&2?-1:1/0:e.id;function gh(e){try{for(mn=0;mn<Rt.length;mn++){const t=Rt[mn];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Gi(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;mn<Rt.length;mn++){const t=Rt[mn];t&&(t.flags&=-2)}mn=-1,Rt.length=0,hh(),Fo=null,(Rt.length||yr.length)&&gh()}}let kt=null,vh=null;function Do(e){const t=kt;return kt=e,vh=e&&e.type.__scopeId||null,t}function D(e,t=kt,n){if(!t||e._n)return e;const s=(...r)=>{s._d&&qo(-1);const i=Do(t);let o;try{o=e(...r)}finally{Do(i),s._d&&qo(1)}return o};return s._n=!0,s._c=!0,s._d=!0,s}function uc(e,t){if(kt===null)return e;const n=Ia(kt),s=e.dirs||(e.dirs=[]);for(let r=0;r<t.length;r++){let[i,o,a,l=Te]=t[r];i&&(we(i)&&(i={mounted:i,updated:i}),i.deep&&Un(o),s.push({dir:i,instance:n,value:o,oldValue:void 0,arg:a,modifiers:l}))}return e}function Cs(e,t,n,s){const r=e.dirs,i=t&&t.dirs;for(let o=0;o<r.length;o++){const a=r[o];i&&(a.oldValue=i[o].value);let l=a.dir[s];l&&(Jn(),an(l,n,8,[e.el,a,e,t]),Xn())}}function br(e,t){if(Pt){let n=Pt.provides;const s=Pt.parent&&Pt.parent.provides;s===n&&(n=Pt.provides=Object.create(s)),n[e]=t}}function Kt(e,t,n=!1){const s=On();if(s||wr){let r=wr?wr._context.provides:s?s.parent==null||s.ce?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides:void 0;if(r&&e in r)return r[e];if(arguments.length>1)return n&&we(t)?t.call(s&&s.proxy):t}}const I_=Symbol.for("v-scx"),R_=()=>Kt(I_);function ln(e,t){return Ki(e,null,t)}function mh(e,t){return Ki(e,null,{flush:"post"})}function M_(e,t){return Ki(e,null,{flush:"sync"})}function tt(e,t,n){return Ki(e,t,n)}function Ki(e,t,n=Te){const{immediate:s,deep:r,flush:i,once:o}=n,a=mt({},n),l=t&&s||!t&&i!=="post";let c;if(Fi){if(i==="sync"){const p=R_();c=p.__watcherHandles||(p.__watcherHandles=[])}else if(!l){const p=()=>{};return p.stop=Sn,p.resume=Sn,p.pause=Sn,p}}const u=Pt;a.call=(p,g,h)=>an(p,u,g,h);let d=!1;i==="post"?a.scheduler=p=>{Tt(p,u&&u.suspense)}:i!=="sync"&&(d=!0,a.scheduler=(p,g)=>{g?p():lc(p)}),a.augmentJob=p=>{t&&(p.flags|=4),d&&(p.flags|=2,u&&(p.id=u.uid,p.i=u))};const f=P_(e,t,a);return Fi&&(c?c.push(f):l&&f()),f}function $_(e,t,n){const s=this.proxy,r=Ye(e)?e.includes(".")?_h(s,e):()=>s[e]:e.bind(s,s);let i;we(t)?i=t:(i=t.handler,n=t);const o=Yi(this),a=Ki(r,i.bind(s),n);return o(),a}function _h(e,t){const n=t.split(".");return()=>{let s=e;for(let r=0;r<n.length&&s;r++)s=s[n[r]];return s}}const us=new WeakMap,yh=Symbol("_vte"),F_=e=>e.__isTeleport,qs=e=>e&&(e.disabled||e.disabled===""),D_=e=>e&&(e.defer||e.defer===""),ud=e=>typeof SVGElement<"u"&&e instanceof SVGElement,cd=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Vl=(e,t)=>{const n=e&&e.to;return Ye(n)?t?t(n):null:n},L_={name:"Teleport",__isTeleport:!0,process(e,t,n,s,r,i,o,a,l,c){const{mc:u,pc:d,pbc:f,o:{insert:p,querySelector:g,createText:h,createComment:m,parentNode:v}}=c,y=qs(t.props);let{dynamicChildren:x}=t;const k=(E,R,T)=>{E.shapeFlag&16&&u(E.children,R,T,r,i,o,a,l)},O=(E=t)=>{const R=qs(E.props),T=E.target=Vl(E.props,g),K=Ul(T,E,h,p);T&&(o!=="svg"&&ud(T)?o="svg":o!=="mathml"&&cd(T)&&(o="mathml"),r&&r.isCE&&(r.ce._teleportTargets||(r.ce._teleportTargets=new Set)).add(T),R||(k(E,T,K),oi(E,!1)))},q=E=>{const R=()=>{if(us.get(E)===R){if(us.delete(E),qs(E.props)){const T=v(E.el)||n;k(E,T,E.anchor),oi(E,!0)}O(E)}};us.set(E,R),Tt(R,i)};if(e==null){const E=t.el=h(""),R=t.anchor=h("");if(p(E,n,s),p(R,n,s),D_(t.props)||i&&i.pendingBranch){q(t);return}y&&(k(t,n,R),oi(t,!0)),O()}else{t.el=e.el;const E=t.anchor=e.anchor,R=us.get(e);if(R){R.flags|=8,us.delete(e),q(t);return}t.targetStart=e.targetStart;const T=t.target=e.target,K=t.targetAnchor=e.targetAnchor,U=qs(e.props),C=U?n:T,F=U?E:K;if(o==="svg"||ud(T)?o="svg":(o==="mathml"||cd(T))&&(o="mathml"),x?(f(e.dynamicChildren,x,C,r,i,o,a),hc(e,t,!0)):l||d(e,t,C,F,r,i,o,a,!1),y)U?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):io(t,n,E,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const V=t.target=Vl(t.props,g);V&&io(t,V,null,c,0)}else U&&io(t,T,K,c,1);oi(t,y)}},remove(e,t,n,{um:s,o:{remove:r}},i){const{shapeFlag:o,children:a,anchor:l,targetStart:c,targetAnchor:u,target:d,props:f}=e,p=i||!qs(f),g=us.get(e);if(g&&(g.flags|=8,us.delete(e)),d&&(r(c),r(u)),i&&r(l),!g&&o&16)for(let h=0;h<a.length;h++){const m=a[h];s(m,t,n,p,!!m.dynamicChildren)}},move:io,hydrate:N_};function io(e,t,n,{o:{insert:s},m:r},i=2){i===0&&s(e.targetAnchor,t,n);const{el:o,anchor:a,shapeFlag:l,children:c,props:u}=e,d=i===2;if(d&&s(o,t,n),!us.has(e)&&(!d||qs(u))&&l&16)for(let f=0;f<c.length;f++)r(c[f],t,n,2);d&&s(a,t,n)}function N_(e,t,n,s,r,i,{o:{nextSibling:o,parentNode:a,querySelector:l,insert:c,createText:u}},d){function f(m,v){let y=v;for(;y;){if(y&&y.nodeType===8){if(y.data==="teleport start anchor")t.targetStart=y;else if(y.data==="teleport anchor"){t.targetAnchor=y,m._lpa=t.targetAnchor&&o(t.targetAnchor);break}}y=o(y)}}function p(m,v){v.anchor=d(o(m),v,a(m),n,s,r,i)}const g=t.target=Vl(t.props,l),h=qs(t.props);if(g){const m=g._lpa||g.firstChild;t.shapeFlag&16&&(h?(p(e,t),f(g,m),t.targetAnchor||Ul(g,t,u,c,a(e)===g?e:null)):(t.anchor=o(e),f(g,m),t.targetAnchor||Ul(g,t,u,c),d(m&&o(m),t,g,n,s,r,i))),oi(t,h)}else h&&t.shapeFlag&16&&(p(e,t),t.targetStart=e,t.targetAnchor=o(e));return t.anchor&&o(t.anchor)}const bh=L_;function oi(e,t){const n=e.ctx;if(n&&n.ut){let s,r;for(t?(s=e.el,r=e.anchor):(s=e.targetStart,r=e.targetAnchor);s&&s!==r;)s.nodeType===1&&s.setAttribute("data-v-owner",n.uid),s=s.nextSibling;n.ut()}}function Ul(e,t,n,s,r=null){const i=t.targetStart=n(""),o=t.targetAnchor=n("");return i[yh]=o,e&&(s(i,e,r),s(o,e,r)),o}const Ja=Symbol("_leaveCb");function cc(e,t){e.shapeFlag&6&&e.component?(e.transition=t,cc(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 ae(e,t){return we(e)?mt({name:e.name},t,{setup:e}):e}function Xa(){const e=On();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function xh(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function dd(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const Lo=new WeakMap;function yi(e,t,n,s,r=!1){if(ge(e)){e.forEach((h,m)=>yi(h,t&&(ge(t)?t[m]:t),n,s,r));return}if(xr(s)&&!r){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&yi(e,t,n,s.component.subTree);return}const i=s.shapeFlag&4?Ia(s.component):s.el,o=r?null:i,{i:a,r:l}=e,c=t&&t.r,u=a.refs===Te?a.refs={}:a.refs,d=a.setupState,f=Ie(d),p=d===Te?Mp:h=>dd(u,h)?!1:Me(f,h),g=(h,m)=>!(m&&dd(u,m));if(c!=null&&c!==l){if(fd(t),Ye(c))u[c]=null,p(c)&&(d[c]=null);else if(it(c)){const h=t;g(c,h.k)&&(c.value=null),h.k&&(u[h.k]=null)}}if(we(l))Gi(l,a,12,[o,u]);else{const h=Ye(l),m=it(l);if(h||m){const v=()=>{if(e.f){const y=h?p(l)?d[l]:u[l]:g()||!e.k?l.value:u[e.k];if(r)ge(y)&&nc(y,i);else if(ge(y))y.includes(i)||y.push(i);else if(h)u[l]=[i],p(l)&&(d[l]=u[l]);else{const x=[i];g(l,e.k)&&(l.value=x),e.k&&(u[e.k]=x)}}else h?(u[l]=o,p(l)&&(d[l]=o)):m&&(g(l,e.k)&&(l.value=o),e.k&&(u[e.k]=o))};if(o){const y=()=>{v(),Lo.delete(e)};y.id=-1,Lo.set(e,y),Tt(y,n)}else fd(e),v()}}}function fd(e){const t=Lo.get(e);t&&(t.flags|=8,Lo.delete(e))}ba().requestIdleCallback;ba().cancelIdleCallback;const xr=e=>!!e.type.__asyncLoader,wh=e=>e.type.__isKeepAlive;function q_(e,t){kh(e,"a",t)}function B_(e,t){kh(e,"da",t)}function kh(e,t,n=Pt){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(Pa(t,s,n),n){let r=n.parent;for(;r&&r.parent;)wh(r.parent.vnode)&&z_(s,t,n,r),r=r.parent}}function z_(e,t,n,s){const r=Pa(t,e,s,!0);Br(()=>{nc(s[t],r)},n)}function Pa(e,t,n=Pt,s=!1){if(n){const r=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...o)=>{Jn();const a=Yi(n),l=an(t,n,e,o);return a(),Xn(),l});return s?r.unshift(i):r.push(i),i}}const rs=e=>(t,n=Pt)=>{(!Fi||e==="sp")&&Pa(e,(...s)=>t(...s),n)},j_=rs("bm"),qt=rs("m"),H_=rs("bu"),Eh=rs("u"),dc=rs("bum"),Br=rs("um"),V_=rs("sp"),U_=rs("rtg"),W_=rs("rtc");function G_(e,t=Pt){Pa("ec",e,t)}const K_="components",Sh=Symbol.for("v-ndc");function Aa(e){return Ye(e)?Y_(K_,e,!1)||e:e||Sh}function Y_(e,t,n=!0,s=!1){const r=kt||Pt;if(r){const i=r.type;{const a=$y(i,!1);if(a&&(a===t||a===vt(t)||a===_a(vt(t))))return i}const o=pd(r[e]||i[e],t)||pd(r.appContext[e],t);return!o&&s?i:o}}function pd(e,t){return e&&(e[t]||e[vt(t)]||e[_a(vt(t))])}function es(e,t,n,s){let r;const i=n,o=ge(e);if(o||Ye(e)){const a=o&&Hs(e);let l=!1,c=!1;a&&(l=!Gt(e),c=Qn(e),e=wa(e)),r=new Array(e.length);for(let u=0,d=e.length;u<d;u++)r[u]=t(l?c?Pr(on(e[u])):on(e[u]):e[u],u,void 0,i)}else if(typeof e=="number"){r=new Array(e);for(let a=0;a<e;a++)r[a]=t(a+1,a,void 0,i)}else if(Fe(e))if(e[Symbol.iterator])r=Array.from(e,(a,l)=>t(a,l,void 0,i));else{const a=Object.keys(e);r=new Array(a.length);for(let l=0,c=a.length;l<c;l++){const u=a[l];r[l]=t(e[u],u,l,i)}}else r=[];return r}function ye(e,t,n={},s,r){if(kt.ce||kt.parent&&xr(kt.parent)&&kt.parent.ce){const c=Object.keys(n).length>0;return t!=="default"&&(n.name=t),P(),ue($e,null,[I("slot",n,s)],c?-2:64)}let i=e[t];i&&i._c&&(i._d=!1),P();const o=i&&Ch(i(n)),a=n.key||o&&o.key,l=ue($e,{key:(a&&!Xt(a)?a:`_${t}`)+(!o&&s?"_fb":"")},o||[],o&&e._===1?64:-2);return l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),i&&i._c&&(i._d=!0),l}function Ch(e){return e.some(t=>$i(t)?!(t.type===An||t.type===$e&&!Ch(t.children)):!0)?e:null}function J_(e,t){const n={};for(const s in e)n[vi(s)]=e[s];return n}const Wl=e=>e?Wh(e)?Ia(e):Wl(e.parent):null,bi=mt(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=>Wl(e.parent),$root:e=>Wl(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Ah(e),$forceUpdate:e=>e.f||(e.f=()=>{lc(e.update)}),$nextTick:e=>e.n||(e.n=Dt.bind(e.proxy)),$watch:e=>$_.bind(e)}),Za=(e,t)=>e!==Te&&!e.__isScriptSetup&&Me(e,t),X_={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:r,props:i,accessCache:o,type:a,appContext:l}=e;if(t[0]!=="$"){const f=o[t];if(f!==void 0)switch(f){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return i[t]}else{if(Za(s,t))return o[t]=1,s[t];if(r!==Te&&Me(r,t))return o[t]=2,r[t];if(Me(i,t))return o[t]=3,i[t];if(n!==Te&&Me(n,t))return o[t]=4,n[t];Gl&&(o[t]=0)}}const c=bi[t];let u,d;if(c)return t==="$attrs"&&Ct(e.attrs,"get",""),c(e);if((u=a.__cssModules)&&(u=u[t]))return u;if(n!==Te&&Me(n,t))return o[t]=4,n[t];if(d=l.config.globalProperties,Me(d,t))return d[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:i}=e;return Za(r,t)?(r[t]=n,!0):s!==Te&&Me(s,t)?(s[t]=n,!0):Me(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,props:i,type:o}},a){let l;return!!(n[a]||e!==Te&&a[0]!=="$"&&Me(e,a)||Za(t,a)||Me(i,a)||Me(s,a)||Me(bi,a)||Me(r.config.globalProperties,a)||(l=o.__cssModules)&&l[a])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Me(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Ri(e){return ge(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function Z_(e,t){const n=Ri(e);for(const s in t){if(s.startsWith("__skip"))continue;let r=n[s];r?ge(r)||we(r)?r=n[s]={type:r,default:t[s]}:r.default=t[s]:r===null&&(r=n[s]={default:t[s]}),r&&t[`__skip_${s}`]&&(r.skipFactory=!0)}return n}function Q_(e,t){return!e||!t?e||t:ge(e)&&ge(t)?e.concat(t):mt({},Ri(e),Ri(t))}let Gl=!0;function ey(e){const t=Ah(e),n=e.proxy,s=e.ctx;Gl=!1,t.beforeCreate&&hd(t.beforeCreate,e,"bc");const{data:r,computed:i,methods:o,watch:a,provide:l,inject:c,created:u,beforeMount:d,mounted:f,beforeUpdate:p,updated:g,activated:h,deactivated:m,beforeDestroy:v,beforeUnmount:y,destroyed:x,unmounted:k,render:O,renderTracked:q,renderTriggered:E,errorCaptured:R,serverPrefetch:T,expose:K,inheritAttrs:U,components:C,directives:F,filters:V}=t;if(c&&ty(c,s,null),o)for(const A in o){const L=o[A];we(L)&&(s[A]=L.bind(n))}if(r){const A=r.call(n,n);Fe(A)&&(e.data=Zn(A))}if(Gl=!0,i)for(const A in i){const L=i[A],de=we(L)?L.bind(n,n):we(L.get)?L.get.bind(n,n):Sn,qe=!we(L)&&we(L.set)?L.set.bind(n):Sn,Pe=G({get:de,set:qe});Object.defineProperty(s,A,{enumerable:!0,configurable:!0,get:()=>Pe.value,set:Je=>Pe.value=Je})}if(a)for(const A in a)Ph(a[A],s,n,A);if(l){const A=we(l)?l.call(n):l;Reflect.ownKeys(A).forEach(L=>{br(L,A[L])})}u&&hd(u,e,"c");function $(A,L){ge(L)?L.forEach(de=>A(de.bind(n))):L&&A(L.bind(n))}if($(j_,d),$(qt,f),$(H_,p),$(Eh,g),$(q_,h),$(B_,m),$(G_,R),$(W_,q),$(U_,E),$(dc,y),$(Br,k),$(V_,T),ge(K))if(K.length){const A=e.exposed||(e.exposed={});K.forEach(L=>{Object.defineProperty(A,L,{get:()=>n[L],set:de=>n[L]=de,enumerable:!0})})}else e.exposed||(e.exposed={});O&&e.render===Sn&&(e.render=O),U!=null&&(e.inheritAttrs=U),C&&(e.components=C),F&&(e.directives=F),T&&xh(e)}function ty(e,t,n=Sn){ge(e)&&(e=Kl(e));for(const s in e){const r=e[s];let i;Fe(r)?"default"in r?i=Kt(r.from||s,r.default,!0):i=Kt(r.from||s):i=Kt(r),it(i)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[s]=i}}function hd(e,t,n){an(ge(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function Ph(e,t,n,s){let r=s.includes(".")?_h(n,s):()=>n[s];if(Ye(e)){const i=t[e];we(i)&&tt(r,i)}else if(we(e))tt(r,e.bind(n));else if(Fe(e))if(ge(e))e.forEach(i=>Ph(i,t,n,s));else{const i=we(e.handler)?e.handler.bind(n):t[e.handler];we(i)&&tt(r,i,e)}}function Ah(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,a=i.get(t);let l;return a?l=a:!r.length&&!n&&!s?l=t:(l={},r.length&&r.forEach(c=>No(l,c,o,!0)),No(l,t,o)),Fe(t)&&i.set(t,l),l}function No(e,t,n,s=!1){const{mixins:r,extends:i}=t;i&&No(e,i,n,!0),r&&r.forEach(o=>No(e,o,n,!0));for(const o in t)if(!(s&&o==="expose")){const a=ny[o]||n&&n[o];e[o]=a?a(e[o],t[o]):t[o]}return e}const ny={data:gd,props:vd,emits:vd,methods:ai,computed:ai,beforeCreate:Ot,created:Ot,beforeMount:Ot,mounted:Ot,beforeUpdate:Ot,updated:Ot,beforeDestroy:Ot,beforeUnmount:Ot,destroyed:Ot,unmounted:Ot,activated:Ot,deactivated:Ot,errorCaptured:Ot,serverPrefetch:Ot,components:ai,directives:ai,watch:ry,provide:gd,inject:sy};function gd(e,t){return t?e?function(){return mt(we(e)?e.call(this,this):e,we(t)?t.call(this,this):t)}:t:e}function sy(e,t){return ai(Kl(e),Kl(t))}function Kl(e){if(ge(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Ot(e,t){return e?[...new Set([].concat(e,t))]:t}function ai(e,t){return e?mt(Object.create(null),e,t):t}function vd(e,t){return e?ge(e)&&ge(t)?[...new Set([...e,...t])]:mt(Object.create(null),Ri(e),Ri(t??{})):t}function ry(e,t){if(!e)return t;if(!t)return e;const n=mt(Object.create(null),e);for(const s in t)n[s]=Ot(e[s],t[s]);return n}function Oh(){return{app:null,config:{isNativeTag:Mp,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let iy=0;function oy(e,t){return function(s,r=null){we(s)||(s=mt({},s)),r!=null&&!Fe(r)&&(r=null);const i=Oh(),o=new WeakSet,a=[];let l=!1;const c=i.app={_uid:iy++,_component:s,_props:r,_container:null,_context:i,_instance:null,version:Dy,get config(){return i.config},set config(u){},use(u,...d){return o.has(u)||(u&&we(u.install)?(o.add(u),u.install(c,...d)):we(u)&&(o.add(u),u(c,...d))),c},mixin(u){return i.mixins.includes(u)||i.mixins.push(u),c},component(u,d){return d?(i.components[u]=d,c):i.components[u]},directive(u,d){return d?(i.directives[u]=d,c):i.directives[u]},mount(u,d,f){if(!l){const p=c._ceVNode||I(s,r);return p.appContext=i,f===!0?f="svg":f===!1&&(f=void 0),e(p,u,f),l=!0,c._container=u,u.__vue_app__=c,Ia(p.component)}},onUnmount(u){a.push(u)},unmount(){l&&(an(a,c._instance,16),e(null,c._container),delete c._container.__vue_app__)},provide(u,d){return i.provides[u]=d,c},runWithContext(u){const d=wr;wr=c;try{return u()}finally{wr=d}}};return c}}let wr=null;function ay(e,t,n=Te){const s=On(),r=vt(t),i=ss(t),o=Th(e,r),a=ch((l,c)=>{let u,d=Te,f;return M_(()=>{const p=e[r];wt(u,p)&&(u=p,c())}),{get(){return l(),n.get?n.get(u):u},set(p){const g=n.set?n.set(p):p;if(!wt(g,u)&&!(d!==Te&&wt(p,d)))return;const h=s.vnode.props,m=!!(h&&(t in h||r in h||i in h)&&(`onUpdate:${t}`in h||`onUpdate:${r}`in h||`onUpdate:${i}`in h));m||(u=p,c()),s.emit(`update:${t}`,g),wt(p,d)&&(wt(p,g)&&!wt(g,f)||m&&d!==Te&&!wt(g,u))&&c(),d=p,f=g}}});return a[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?o||Te:a,done:!1}:{done:!0}}}},a}const Th=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${vt(t)}Modifiers`]||e[`${ss(t)}Modifiers`];function ly(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||Te;let r=n;const i=t.startsWith("update:"),o=i&&Th(s,t.slice(7));o&&(o.trim&&(r=n.map(u=>Ye(u)?u.trim():u)),o.number&&(r=n.map(ya)));let a,l=s[a=vi(t)]||s[a=vi(vt(t))];!l&&i&&(l=s[a=vi(ss(t))]),l&&an(l,e,6,r);const c=s[a+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,an(c,e,6,r)}}const uy=new WeakMap;function Ih(e,t,n=!1){const s=n?uy:t.emitsCache,r=s.get(e);if(r!==void 0)return r;const i=e.emits;let o={},a=!1;if(!we(e)){const l=c=>{const u=Ih(c,t,!0);u&&(a=!0,mt(o,u))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!i&&!a?(Fe(e)&&s.set(e,null),null):(ge(i)?i.forEach(l=>o[l]=null):mt(o,i),Fe(e)&&s.set(e,o),o)}function Oa(e,t){return!e||!ha(t)?!1:(t=t.slice(2).replace(/Once$/,""),Me(e,t[0].toLowerCase()+t.slice(1))||Me(e,ss(t))||Me(e,t))}function md(e){const{type:t,vnode:n,proxy:s,withProxy:r,propsOptions:[i],slots:o,attrs:a,emit:l,render:c,renderCache:u,props:d,data:f,setupState:p,ctx:g,inheritAttrs:h}=e,m=Do(e);let v,y;try{if(n.shapeFlag&4){const k=r||s,O=k;v=yn(c.call(O,k,u,d,p,f,g)),y=a}else{const k=t;v=yn(k.length>1?k(d,{attrs:a,slots:o,emit:l}):k(d,null)),y=t.props?a:cy(a)}}catch(k){xi.length=0,Ca(k,e,1),v=I(An)}let x=v;if(y&&h!==!1){const k=Object.keys(y),{shapeFlag:O}=x;k.length&&O&7&&(i&&k.some(ga)&&(y=dy(y,i)),x=Ws(x,y,!1,!0))}return n.dirs&&(x=Ws(x,null,!1,!0),x.dirs=x.dirs?x.dirs.concat(n.dirs):n.dirs),n.transition&&cc(x,n.transition),v=x,Do(m),v}const cy=e=>{let t;for(const n in e)(n==="class"||n==="style"||ha(n))&&((t||(t={}))[n]=e[n]);return t},dy=(e,t)=>{const n={};for(const s in e)(!ga(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function fy(e,t,n){const{props:s,children:r,component:i}=e,{props:o,children:a,patchFlag:l}=t,c=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return s?_d(s,o,c):!!o;if(l&8){const u=t.dynamicProps;for(let d=0;d<u.length;d++){const f=u[d];if(Rh(o,s,f)&&!Oa(c,f))return!0}}}else return(r||a)&&(!a||!a.$stable)?!0:s===o?!1:s?o?_d(s,o,c):!0:!!o;return!1}function _d(e,t,n){const s=Object.keys(t);if(s.length!==Object.keys(e).length)return!0;for(let r=0;r<s.length;r++){const i=s[r];if(Rh(t,e,i)&&!Oa(n,i))return!0}return!1}function Rh(e,t,n){const s=e[n],r=t[n];return n==="style"&&Fe(s)&&Fe(r)?!vs(s,r):s!==r}function py({vnode:e,parent:t,suspense:n},s){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.suspense.vnode.el=r.el=s,e=r),r===e)(e=t.vnode).el=s,t=t.parent;else break}n&&n.activeBranch===e&&(n.vnode.el=s)}const Mh={},$h=()=>Object.create(Mh),Fh=e=>Object.getPrototypeOf(e)===Mh;function hy(e,t,n,s=!1){const r={},i=$h();e.propsDefaults=Object.create(null),Dh(e,t,r,i);for(const o in e.propsOptions[0])o in r||(r[o]=void 0);n?e.props=s?r:oh(r):e.type.props?e.props=r:e.props=i,e.attrs=i}function gy(e,t,n,s){const{props:r,attrs:i,vnode:{patchFlag:o}}=e,a=Ie(r),[l]=e.propsOptions;let c=!1;if((s||o>0)&&!(o&16)){if(o&8){const u=e.vnode.dynamicProps;for(let d=0;d<u.length;d++){let f=u[d];if(Oa(e.emitsOptions,f))continue;const p=t[f];if(l)if(Me(i,f))p!==i[f]&&(i[f]=p,c=!0);else{const g=vt(f);r[g]=Yl(l,a,g,p,e,!1)}else p!==i[f]&&(i[f]=p,c=!0)}}}else{Dh(e,t,r,i)&&(c=!0);let u;for(const d in a)(!t||!Me(t,d)&&((u=ss(d))===d||!Me(t,u)))&&(l?n&&(n[d]!==void 0||n[u]!==void 0)&&(r[d]=Yl(l,a,d,void 0,e,!0)):delete r[d]);if(i!==a)for(const d in i)(!t||!Me(t,d))&&(delete i[d],c=!0)}c&&Vn(e.attrs,"set","")}function Dh(e,t,n,s){const[r,i]=e.propsOptions;let o=!1,a;if(t)for(let l in t){if(gi(l))continue;const c=t[l];let u;r&&Me(r,u=vt(l))?!i||!i.includes(u)?n[u]=c:(a||(a={}))[u]=c:Oa(e.emitsOptions,l)||(!(l in s)||c!==s[l])&&(s[l]=c,o=!0)}if(i){const l=Ie(n),c=a||Te;for(let u=0;u<i.length;u++){const d=i[u];n[d]=Yl(r,l,d,c[d],e,!Me(c,d))}}return o}function Yl(e,t,n,s,r,i){const o=e[n];if(o!=null){const a=Me(o,"default");if(a&&s===void 0){const l=o.default;if(o.type!==Function&&!o.skipFactory&&we(l)){const{propsDefaults:c}=r;if(n in c)s=c[n];else{const u=Yi(r);s=c[n]=l.call(null,t),u()}}else s=l;r.ce&&r.ce._setProp(n,s)}o[0]&&(i&&!a?s=!1:o[1]&&(s===""||s===ss(n))&&(s=!0))}return s}const vy=new WeakMap;function Lh(e,t,n=!1){const s=n?vy:t.propsCache,r=s.get(e);if(r)return r;const i=e.props,o={},a=[];let l=!1;if(!we(e)){const u=d=>{l=!0;const[f,p]=Lh(d,t,!0);mt(o,f),p&&a.push(...p)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!i&&!l)return Fe(e)&&s.set(e,mr),mr;if(ge(i))for(let u=0;u<i.length;u++){const d=vt(i[u]);yd(d)&&(o[d]=Te)}else if(i)for(const u in i){const d=vt(u);if(yd(d)){const f=i[u],p=o[d]=ge(f)||we(f)?{type:f}:mt({},f),g=p.type;let h=!1,m=!0;if(ge(g))for(let v=0;v<g.length;++v){const y=g[v],x=we(y)&&y.name;if(x==="Boolean"){h=!0;break}else x==="String"&&(m=!1)}else h=we(g)&&g.name==="Boolean";p[0]=h,p[1]=m,(h||Me(p,"default"))&&a.push(d)}}const c=[o,a];return Fe(e)&&s.set(e,c),c}function yd(e){return e[0]!=="$"&&!gi(e)}const fc=e=>e==="_"||e==="_ctx"||e==="$stable",pc=e=>ge(e)?e.map(yn):[yn(e)],my=(e,t,n)=>{if(t._n)return t;const s=D((...r)=>pc(t(...r)),n);return s._c=!1,s},Nh=(e,t,n)=>{const s=e._ctx;for(const r in e){if(fc(r))continue;const i=e[r];if(we(i))t[r]=my(r,i,s);else if(i!=null){const o=pc(i);t[r]=()=>o}}},qh=(e,t)=>{const n=pc(t);e.slots.default=()=>n},Bh=(e,t,n)=>{for(const s in t)(n||!fc(s))&&(e[s]=t[s])},_y=(e,t,n)=>{const s=e.slots=$h();if(e.vnode.shapeFlag&32){const r=t._;r?(Bh(s,t,n),n&&Lp(s,"_",r,!0)):Nh(t,s)}else t&&qh(e,t)},yy=(e,t,n)=>{const{vnode:s,slots:r}=e;let i=!0,o=Te;if(s.shapeFlag&32){const a=t._;a?n&&a===1?i=!1:Bh(r,t,n):(i=!t.$stable,Nh(t,r)),o=t}else t&&(qh(e,t),o={default:1});if(i)for(const a in r)!fc(a)&&o[a]==null&&delete r[a]},Tt=Ey;function by(e){return xy(e)}function xy(e,t){const n=ba();n.__VUE__=!0;const{insert:s,remove:r,patchProp:i,createElement:o,createText:a,createComment:l,setText:c,setElementText:u,parentNode:d,nextSibling:f,setScopeId:p=Sn,insertStaticContent:g}=e,h=(b,w,S,j=null,H=null,z=null,oe=void 0,ee=null,Q=!!w.dynamicChildren)=>{if(b===w)return;b&&!Wr(b,w)&&(j=B(b),Je(b,H,z,!0),b=null),w.patchFlag===-2&&(Q=!1,w.dynamicChildren=null);const{type:W,ref:ve,shapeFlag:le}=w;switch(W){case Ta:m(b,w,S,j);break;case An:v(b,w,S,j);break;case el:b==null&&y(w,S,j,oe);break;case $e:C(b,w,S,j,H,z,oe,ee,Q);break;default:le&1?O(b,w,S,j,H,z,oe,ee,Q):le&6?F(b,w,S,j,H,z,oe,ee,Q):(le&64||le&128)&&W.process(b,w,S,j,H,z,oe,ee,Q,pe)}ve!=null&&H?yi(ve,b&&b.ref,z,w||b,!w):ve==null&&b&&b.ref!=null&&yi(b.ref,null,z,b,!0)},m=(b,w,S,j)=>{if(b==null)s(w.el=a(w.children),S,j);else{const H=w.el=b.el;w.children!==b.children&&c(H,w.children)}},v=(b,w,S,j)=>{b==null?s(w.el=l(w.children||""),S,j):w.el=b.el},y=(b,w,S,j)=>{[b.el,b.anchor]=g(b.children,w,S,j,b.el,b.anchor)},x=({el:b,anchor:w},S,j)=>{let H;for(;b&&b!==w;)H=f(b),s(b,S,j),b=H;s(w,S,j)},k=({el:b,anchor:w})=>{let S;for(;b&&b!==w;)S=f(b),r(b),b=S;r(w)},O=(b,w,S,j,H,z,oe,ee,Q)=>{if(w.type==="svg"?oe="svg":w.type==="math"&&(oe="mathml"),b==null)q(w,S,j,H,z,oe,ee,Q);else{const W=b.el&&b.el._isVueCE?b.el:null;try{W&&W._beginPatch(),T(b,w,H,z,oe,ee,Q)}finally{W&&W._endPatch()}}},q=(b,w,S,j,H,z,oe,ee)=>{let Q,W;const{props:ve,shapeFlag:le,transition:me,dirs:xe}=b;if(Q=b.el=o(b.type,z,ve&&ve.is,ve),le&8?u(Q,b.children):le&16&&R(b.children,Q,null,j,H,Qa(b,z),oe,ee),xe&&Cs(b,null,j,"created"),E(Q,b,b.scopeId,oe,j),ve){for(const Be in ve)Be!=="value"&&!gi(Be)&&i(Q,Be,null,ve[Be],z,j);"value"in ve&&i(Q,"value",null,ve.value,z),(W=ve.onVnodeBeforeMount)&&gn(W,j,b)}xe&&Cs(b,null,j,"beforeMount");const Oe=wy(H,me);Oe&&me.beforeEnter(Q),s(Q,w,S),((W=ve&&ve.onVnodeMounted)||Oe||xe)&&Tt(()=>{try{W&&gn(W,j,b),Oe&&me.enter(Q),xe&&Cs(b,null,j,"mounted")}finally{}},H)},E=(b,w,S,j,H)=>{if(S&&p(b,S),j)for(let z=0;z<j.length;z++)p(b,j[z]);if(H){let z=H.subTree;if(w===z||Hh(z.type)&&(z.ssContent===w||z.ssFallback===w)){const oe=H.vnode;E(b,oe,oe.scopeId,oe.slotScopeIds,H.parent)}}},R=(b,w,S,j,H,z,oe,ee,Q=0)=>{for(let W=Q;W<b.length;W++){const ve=b[W]=ee?zn(b[W]):yn(b[W]);h(null,ve,w,S,j,H,z,oe,ee)}},T=(b,w,S,j,H,z,oe)=>{const ee=w.el=b.el;let{patchFlag:Q,dynamicChildren:W,dirs:ve}=w;Q|=b.patchFlag&16;const le=b.props||Te,me=w.props||Te;let xe;if(S&&Ps(S,!1),(xe=me.onVnodeBeforeUpdate)&&gn(xe,S,w,b),ve&&Cs(w,b,S,"beforeUpdate"),S&&Ps(S,!0),(le.innerHTML&&me.innerHTML==null||le.textContent&&me.textContent==null)&&u(ee,""),W?K(b.dynamicChildren,W,ee,S,j,Qa(w,H),z):oe||L(b,w,ee,null,S,j,Qa(w,H),z,!1),Q>0){if(Q&16)U(ee,le,me,S,H);else if(Q&2&&le.class!==me.class&&i(ee,"class",null,me.class,H),Q&4&&i(ee,"style",le.style,me.style,H),Q&8){const Oe=w.dynamicProps;for(let Be=0;Be<Oe.length;Be++){const Le=Oe[Be],lt=le[Le],_t=me[Le];(_t!==lt||Le==="value")&&i(ee,Le,lt,_t,H,S)}}Q&1&&b.children!==w.children&&u(ee,w.children)}else!oe&&W==null&&U(ee,le,me,S,H);((xe=me.onVnodeUpdated)||ve)&&Tt(()=>{xe&&gn(xe,S,w,b),ve&&Cs(w,b,S,"updated")},j)},K=(b,w,S,j,H,z,oe)=>{for(let ee=0;ee<w.length;ee++){const Q=b[ee],W=w[ee],ve=Q.el&&(Q.type===$e||!Wr(Q,W)||Q.shapeFlag&198)?d(Q.el):S;h(Q,W,ve,null,j,H,z,oe,!0)}},U=(b,w,S,j,H)=>{if(w!==S){if(w!==Te)for(const z in w)!gi(z)&&!(z in S)&&i(b,z,w[z],null,H,j);for(const z in S){if(gi(z))continue;const oe=S[z],ee=w[z];oe!==ee&&z!=="value"&&i(b,z,ee,oe,H,j)}"value"in S&&i(b,"value",w.value,S.value,H)}},C=(b,w,S,j,H,z,oe,ee,Q)=>{const W=w.el=b?b.el:a(""),ve=w.anchor=b?b.anchor:a("");let{patchFlag:le,dynamicChildren:me,slotScopeIds:xe}=w;xe&&(ee=ee?ee.concat(xe):xe),b==null?(s(W,S,j),s(ve,S,j),R(w.children||[],S,ve,H,z,oe,ee,Q)):le>0&&le&64&&me&&b.dynamicChildren&&b.dynamicChildren.length===me.length?(K(b.dynamicChildren,me,S,H,z,oe,ee),(w.key!=null||H&&w===H.subTree)&&hc(b,w,!0)):L(b,w,S,ve,H,z,oe,ee,Q)},F=(b,w,S,j,H,z,oe,ee,Q)=>{w.slotScopeIds=ee,b==null?w.shapeFlag&512?H.ctx.activate(w,S,j,oe,Q):V(w,S,j,H,z,oe,Q):X(b,w,Q)},V=(b,w,S,j,H,z,oe)=>{const ee=b.component=Oy(b,j,H);if(wh(b)&&(ee.ctx.renderer=pe),Ty(ee,!1,oe),ee.asyncDep){if(H&&H.registerDep(ee,$,oe),!b.el){const Q=ee.subTree=I(An);v(null,Q,w,S),b.placeholder=Q.el}}else $(ee,b,w,S,H,z,oe)},X=(b,w,S)=>{const j=w.component=b.component;if(fy(b,w,S))if(j.asyncDep&&!j.asyncResolved){A(j,w,S);return}else j.next=w,j.update();else w.el=b.el,j.vnode=w},$=(b,w,S,j,H,z,oe)=>{const ee=()=>{if(b.isMounted){let{next:le,bu:me,u:xe,parent:Oe,vnode:Be}=b;{const pn=zh(b);if(pn){le&&(le.el=Be.el,A(b,le,oe)),pn.asyncDep.then(()=>{Tt(()=>{b.isUnmounted||W()},H)});return}}let Le=le,lt;Ps(b,!1),le?(le.el=Be.el,A(b,le,oe)):le=Be,me&&Eo(me),(lt=le.props&&le.props.onVnodeBeforeUpdate)&&gn(lt,Oe,le,Be),Ps(b,!0);const _t=md(b),fn=b.subTree;b.subTree=_t,h(fn,_t,d(fn.el),B(fn),b,H,z),le.el=_t.el,Le===null&&py(b,_t.el),xe&&Tt(xe,H),(lt=le.props&&le.props.onVnodeUpdated)&&Tt(()=>gn(lt,Oe,le,Be),H)}else{let le;const{el:me,props:xe}=w,{bm:Oe,m:Be,parent:Le,root:lt,type:_t}=b,fn=xr(w);Ps(b,!1),Oe&&Eo(Oe),!fn&&(le=xe&&xe.onVnodeBeforeMount)&&gn(le,Le,w),Ps(b,!0);{lt.ce&&lt.ce._hasShadowRoot()&&lt.ce._injectChildStyle(_t,b.parent?b.parent.type:void 0);const pn=b.subTree=md(b);h(null,pn,S,j,b,H,z),w.el=pn.el}if(Be&&Tt(Be,H),!fn&&(le=xe&&xe.onVnodeMounted)){const pn=w;Tt(()=>gn(le,Le,pn),H)}(w.shapeFlag&256||Le&&xr(Le.vnode)&&Le.vnode.shapeFlag&256)&&b.a&&Tt(b.a,H),b.isMounted=!0,w=S=j=null}};b.scope.on();const Q=b.effect=new Vp(ee);b.scope.off();const W=b.update=Q.run.bind(Q),ve=b.job=Q.runIfDirty.bind(Q);ve.i=b,ve.id=b.uid,Q.scheduler=()=>lc(ve),Ps(b,!0),W()},A=(b,w,S)=>{w.component=b;const j=b.vnode.props;b.vnode=w,b.next=null,gy(b,w.props,j,S),yy(b,w.children,S),Jn(),ld(b),Xn()},L=(b,w,S,j,H,z,oe,ee,Q=!1)=>{const W=b&&b.children,ve=b?b.shapeFlag:0,le=w.children,{patchFlag:me,shapeFlag:xe}=w;if(me>0){if(me&128){qe(W,le,S,j,H,z,oe,ee,Q);return}else if(me&256){de(W,le,S,j,H,z,oe,ee,Q);return}}xe&8?(ve&16&&Qe(W,H,z),le!==W&&u(S,le)):ve&16?xe&16?qe(W,le,S,j,H,z,oe,ee,Q):Qe(W,H,z,!0):(ve&8&&u(S,""),xe&16&&R(le,S,j,H,z,oe,ee,Q))},de=(b,w,S,j,H,z,oe,ee,Q)=>{b=b||mr,w=w||mr;const W=b.length,ve=w.length,le=Math.min(W,ve);let me;for(me=0;me<le;me++){const xe=w[me]=Q?zn(w[me]):yn(w[me]);h(b[me],xe,S,null,H,z,oe,ee,Q)}W>ve?Qe(b,H,z,!0,!1,le):R(w,S,j,H,z,oe,ee,Q,le)},qe=(b,w,S,j,H,z,oe,ee,Q)=>{let W=0;const ve=w.length;let le=b.length-1,me=ve-1;for(;W<=le&&W<=me;){const xe=b[W],Oe=w[W]=Q?zn(w[W]):yn(w[W]);if(Wr(xe,Oe))h(xe,Oe,S,null,H,z,oe,ee,Q);else break;W++}for(;W<=le&&W<=me;){const xe=b[le],Oe=w[me]=Q?zn(w[me]):yn(w[me]);if(Wr(xe,Oe))h(xe,Oe,S,null,H,z,oe,ee,Q);else break;le--,me--}if(W>le){if(W<=me){const xe=me+1,Oe=xe<ve?w[xe].el:j;for(;W<=me;)h(null,w[W]=Q?zn(w[W]):yn(w[W]),S,Oe,H,z,oe,ee,Q),W++}}else if(W>me)for(;W<=le;)Je(b[W],H,z,!0),W++;else{const xe=W,Oe=W,Be=new Map;for(W=Oe;W<=me;W++){const Bt=w[W]=Q?zn(w[W]):yn(w[W]);Bt.key!=null&&Be.set(Bt.key,W)}let Le,lt=0;const _t=me-Oe+1;let fn=!1,pn=0;const Vr=new Array(_t);for(W=0;W<_t;W++)Vr[W]=0;for(W=xe;W<=le;W++){const Bt=b[W];if(lt>=_t){Je(Bt,H,z,!0);continue}let hn;if(Bt.key!=null)hn=Be.get(Bt.key);else for(Le=Oe;Le<=me;Le++)if(Vr[Le-Oe]===0&&Wr(Bt,w[Le])){hn=Le;break}hn===void 0?Je(Bt,H,z,!0):(Vr[hn-Oe]=W+1,hn>=pn?pn=hn:fn=!0,h(Bt,w[hn],S,null,H,z,oe,ee,Q),lt++)}const td=fn?ky(Vr):mr;for(Le=td.length-1,W=_t-1;W>=0;W--){const Bt=Oe+W,hn=w[Bt],nd=w[Bt+1],sd=Bt+1<ve?nd.el||jh(nd):j;Vr[W]===0?h(null,hn,S,sd,H,z,oe,ee,Q):fn&&(Le<0||W!==td[Le]?Pe(hn,S,sd,2):Le--)}}},Pe=(b,w,S,j,H=null)=>{const{el:z,type:oe,transition:ee,children:Q,shapeFlag:W}=b;if(W&6){Pe(b.component.subTree,w,S,j);return}if(W&128){b.suspense.move(w,S,j);return}if(W&64){oe.move(b,w,S,pe);return}if(oe===$e){s(z,w,S);for(let le=0;le<Q.length;le++)Pe(Q[le],w,S,j);s(b.anchor,w,S);return}if(oe===el){x(b,w,S);return}if(j!==2&&W&1&&ee)if(j===0)ee.persisted&&!z[Ja]?s(z,w,S):(ee.beforeEnter(z),s(z,w,S),Tt(()=>ee.enter(z),H));else{const{leave:le,delayLeave:me,afterLeave:xe}=ee,Oe=()=>{b.ctx.isUnmounted?r(z):s(z,w,S)},Be=()=>{const Le=z._isLeaving||!!z[Ja];z._isLeaving&&z[Ja](!0),ee.persisted&&!Le?Oe():le(z,()=>{Oe(),xe&&xe()})};me?me(z,Oe,Be):Be()}else s(z,w,S)},Je=(b,w,S,j=!1,H=!1)=>{const{type:z,props:oe,ref:ee,children:Q,dynamicChildren:W,shapeFlag:ve,patchFlag:le,dirs:me,cacheIndex:xe,memo:Oe}=b;if(le===-2&&(H=!1),ee!=null&&(Jn(),yi(ee,null,S,b,!0),Xn()),xe!=null&&(w.renderCache[xe]=void 0),ve&256){w.ctx.deactivate(b);return}const Be=ve&1&&me,Le=!xr(b);let lt;if(Le&&(lt=oe&&oe.onVnodeBeforeUnmount)&&gn(lt,w,b),ve&6)ot(b.component,S,j);else{if(ve&128){b.suspense.unmount(S,j);return}Be&&Cs(b,null,w,"beforeUnmount"),ve&64?b.type.remove(b,w,S,pe,j):W&&!W.hasOnce&&(z!==$e||le>0&&le&64)?Qe(W,w,S,!1,!0):(z===$e&&le&384||!H&&ve&16)&&Qe(Q,w,S),j&&at(b)}const _t=Oe!=null&&xe==null;(Le&&(lt=oe&&oe.onVnodeUnmounted)||Be||_t)&&Tt(()=>{lt&&gn(lt,w,b),Be&&Cs(b,null,w,"unmounted"),_t&&(b.el=null)},S)},at=b=>{const{type:w,el:S,anchor:j,transition:H}=b;if(w===$e){nt(S,j);return}if(w===el){k(b);return}const z=()=>{r(S),H&&!H.persisted&&H.afterLeave&&H.afterLeave()};if(b.shapeFlag&1&&H&&!H.persisted){const{leave:oe,delayLeave:ee}=H,Q=()=>oe(S,z);ee?ee(b.el,z,Q):Q()}else z()},nt=(b,w)=>{let S;for(;b!==w;)S=f(b),r(b),b=S;r(w)},ot=(b,w,S)=>{const{bum:j,scope:H,job:z,subTree:oe,um:ee,m:Q,a:W}=b;bd(Q),bd(W),j&&Eo(j),H.stop(),z&&(z.flags|=8,Je(oe,b,w,S)),ee&&Tt(ee,w),Tt(()=>{b.isUnmounted=!0},w)},Qe=(b,w,S,j=!1,H=!1,z=0)=>{for(let oe=z;oe<b.length;oe++)Je(b[oe],w,S,j,H)},B=b=>{if(b.shapeFlag&6)return B(b.component.subTree);if(b.shapeFlag&128)return b.suspense.next();const w=f(b.anchor||b.el),S=w&&w[yh];return S?f(S):w};let ne=!1;const se=(b,w,S)=>{let j;b==null?w._vnode&&(Je(w._vnode,null,null,!0),j=w._vnode.component):h(w._vnode||null,b,w,null,null,null,S),w._vnode=b,ne||(ne=!0,ld(j),hh(),ne=!1)},pe={p:h,um:Je,m:Pe,r:at,mt:V,mc:R,pc:L,pbc:K,n:B,o:e};return{render:se,hydrate:void 0,createApp:oy(se)}}function Qa({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 Ps({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function wy(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function hc(e,t,n=!1){const s=e.children,r=t.children;if(ge(s)&&ge(r))for(let i=0;i<s.length;i++){const o=s[i];let a=r[i];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=r[i]=zn(r[i]),a.el=o.el),!n&&a.patchFlag!==-2&&hc(o,a)),a.type===Ta&&(a.patchFlag===-1&&(a=r[i]=zn(a)),a.el=o.el),a.type===An&&!a.el&&(a.el=o.el)}}function ky(e){const t=e.slice(),n=[0];let s,r,i,o,a;const l=e.length;for(s=0;s<l;s++){const c=e[s];if(c!==0){if(r=n[n.length-1],e[r]<c){t[s]=r,n.push(s);continue}for(i=0,o=n.length-1;i<o;)a=i+o>>1,e[n[a]]<c?i=a+1:o=a;c<e[n[i]]&&(i>0&&(t[s]=n[i-1]),n[i]=s)}}for(i=n.length,o=n[i-1];i-- >0;)n[i]=o,o=t[o];return n}function zh(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:zh(t)}function bd(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function jh(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?jh(t.subTree):null}const Hh=e=>e.__isSuspense;function Ey(e,t){t&&t.pendingBranch?ge(e)?t.effects.push(...e):t.effects.push(e):T_(e)}const $e=Symbol.for("v-fgt"),Ta=Symbol.for("v-txt"),An=Symbol.for("v-cmt"),el=Symbol.for("v-stc"),xi=[];let Vt=null;function P(e=!1){xi.push(Vt=e?null:[])}function Sy(){xi.pop(),Vt=xi[xi.length-1]||null}let Mi=1;function qo(e,t=!1){Mi+=e,e<0&&Vt&&t&&(Vt.hasOnce=!0)}function Vh(e){return e.dynamicChildren=Mi>0?Vt||mr:null,Sy(),Mi>0&&Vt&&Vt.push(e),e}function Y(e,t,n,s,r,i){return Vh(N(e,t,n,s,r,i,!0))}function ue(e,t,n,s,r){return Vh(I(e,t,n,s,r,!0))}function $i(e){return e?e.__v_isVNode===!0:!1}function Wr(e,t){return e.type===t.type&&e.key===t.key}const Uh=({key:e})=>e??null,So=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Ye(e)||it(e)||we(e)?{i:kt,r:e,k:t,f:!!n}:e:null);function N(e,t=null,n=null,s=0,r=null,i=e===$e?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Uh(t),ref:t&&So(t),scopeId:vh,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:i,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:kt};return a?(gc(l,n),i&128&&e.normalize(l)):n&&(l.shapeFlag|=Ye(n)?8:16),Mi>0&&!o&&Vt&&(l.patchFlag>0||i&6)&&l.patchFlag!==32&&Vt.push(l),l}const I=Cy;function Cy(e,t=null,n=null,s=0,r=null,i=!1){if((!e||e===Sh)&&(e=An),$i(e)){const a=Ws(e,t,!0);return n&&gc(a,n),Mi>0&&!i&&Vt&&(a.shapeFlag&6?Vt[Vt.indexOf(e)]=a:Vt.push(a)),a.patchFlag=-2,a}if(Fy(e)&&(e=e.__vccOpts),t){t=Xs(t);let{class:a,style:l}=t;a&&!Ye(a)&&(t.class=He(a)),Fe(l)&&(Sa(l)&&!ge(l)&&(l=mt({},l)),t.style=ks(l))}const o=Ye(e)?1:Hh(e)?128:F_(e)?64:Fe(e)?4:we(e)?2:0;return N(e,t,n,s,r,o,i,!0)}function Xs(e){return e?Sa(e)||Fh(e)?mt({},e):e:null}function Ws(e,t,n=!1,s=!1){const{props:r,ref:i,patchFlag:o,children:a,transition:l}=e,c=t?ut(r||{},t):r,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&Uh(c),ref:t&&t.ref?n&&i?ge(i)?i.concat(So(t)):[i,So(t)]:So(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==$e?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Ws(e.ssContent),ssFallback:e.ssFallback&&Ws(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&s&&cc(u,l.clone(u)),u}function ce(e=" ",t=0){return I(Ta,null,e,t)}function _e(e="",t=!1){return t?(P(),ue(An,null,e)):I(An,null,e)}function yn(e){return e==null||typeof e=="boolean"?I(An):ge(e)?I($e,null,e.slice()):$i(e)?zn(e):I(Ta,null,String(e))}function zn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Ws(e)}function gc(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(ge(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),gc(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!Fh(t)?t._ctx=kt:r===3&&kt&&(kt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else we(t)?(t={default:t,_ctx:kt},n=32):(t=String(t),s&64?(n=16,t=[ce(t)]):n=8);e.children=t,e.shapeFlag|=n}function ut(...e){const t={};for(let n=0;n<e.length;n++){const s=e[n];for(const r in s)if(r==="class")t.class!==s.class&&(t.class=He([t.class,s.class]));else if(r==="style")t.style=ks([t.style,s.style]);else if(ha(r)){const i=t[r],o=s[r];o&&i!==o&&!(ge(i)&&i.includes(o))?t[r]=i?[].concat(i,o):o:o==null&&i==null&&!ga(r)&&(t[r]=o)}else r!==""&&(t[r]=s[r])}return t}function gn(e,t,n,s=null){an(e,t,7,[n,s])}const Py=Oh();let Ay=0;function Oy(e,t,n){const s=e.type,r=(t?t.appContext:e.appContext)||Py,i={uid:Ay++,vnode:e,type:s,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new zp(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Lh(s,r),emitsOptions:Ih(s,r),emit:null,emitted:null,propsDefaults:Te,inheritAttrs:s.inheritAttrs,ctx:Te,data:Te,props:Te,attrs:Te,slots:Te,refs:Te,setupState:Te,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 i.ctx={_:i},i.root=t?t.root:i,i.emit=ly.bind(null,i),e.ce&&e.ce(i),i}let Pt=null;const On=()=>Pt||kt;let Bo,Jl;{const e=ba(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),i=>{r.length>1?r.forEach(o=>o(i)):r[0](i)}};Bo=t("__VUE_INSTANCE_SETTERS__",n=>Pt=n),Jl=t("__VUE_SSR_SETTERS__",n=>Fi=n)}const Yi=e=>{const t=Pt;return Bo(e),e.scope.on(),()=>{e.scope.off(),Bo(t)}},xd=()=>{Pt&&Pt.scope.off(),Bo(null)};function Wh(e){return e.vnode.shapeFlag&4}let Fi=!1;function Ty(e,t=!1,n=!1){t&&Jl(t);const{props:s,children:r}=e.vnode,i=Wh(e);hy(e,s,i,t),_y(e,r,n||t);const o=i?Iy(e,t):void 0;return t&&Jl(!1),o}function Iy(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,X_);const{setup:s}=n;if(s){Jn();const r=e.setupContext=s.length>1?My(e):null,i=Yi(e),o=Gi(s,e,0,[e.props,r]),a=$p(o);if(Xn(),i(),(a||e.sp)&&!xr(e)&&xh(e),a){if(o.then(xd,xd),t)return o.then(l=>{wd(e,l)}).catch(l=>{Ca(l,e,0)});e.asyncDep=o}else wd(e,o)}else Gh(e)}function wd(e,t,n){we(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Fe(t)&&(e.setupState=uh(t)),Gh(e)}function Gh(e,t,n){const s=e.type;e.render||(e.render=s.render||Sn);{const r=Yi(e);Jn();try{ey(e)}finally{Xn(),r()}}}const Ry={get(e,t){return Ct(e,"get",""),e[t]}};function My(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Ry),slots:e.slots,emit:e.emit,expose:t}}function Ia(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(uh(ah(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in bi)return bi[n](e)},has(t,n){return n in t||n in bi}})):e.proxy}function $y(e,t=!0){return we(e)?e.displayName||e.name:e.name||t&&e.__name}function Fy(e){return we(e)&&"__vccOpts"in e}const G=(e,t)=>S_(e,t,Fi);function rn(e,t,n){try{qo(-1);const s=arguments.length;return s===2?Fe(t)&&!ge(t)?$i(t)?I(e,null,[t]):I(e,t):I(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&$i(n)&&(n=[n]),I(e,t,n))}finally{qo(1)}}const Dy="3.5.38";/**
14
+ * @vue/runtime-dom v3.5.38
15
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
16
+ * @license MIT
17
+ **/let Xl;const kd=typeof window<"u"&&window.trustedTypes;if(kd)try{Xl=kd.createPolicy("vue",{createHTML:e=>e})}catch{}const Kh=Xl?e=>Xl.createHTML(e):e=>e,Ly="http://www.w3.org/2000/svg",Ny="http://www.w3.org/1998/Math/MathML",Bn=typeof document<"u"?document:null,Ed=Bn&&Bn.createElement("template"),qy={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t==="svg"?Bn.createElementNS(Ly,e):t==="mathml"?Bn.createElementNS(Ny,e):n?Bn.createElement(e,{is:n}):Bn.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>Bn.createTextNode(e),createComment:e=>Bn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Bn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,i){const o=n?n.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===i||!(r=r.nextSibling)););else{Ed.innerHTML=Kh(s==="svg"?`<svg>${e}</svg>`:s==="mathml"?`<math>${e}</math>`:e);const a=Ed.content;if(s==="svg"||s==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},By=Symbol("_vtc");function zy(e,t,n){const s=e[By];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Sd=Symbol("_vod"),jy=Symbol("_vsh"),Hy=Symbol(""),Vy=/(?:^|;)\s*display\s*:/;function Uy(e,t,n){const s=e.style,r=Ye(n);let i=!1;if(n&&!r){if(t)if(Ye(t))for(const o of t.split(";")){const a=o.slice(0,o.indexOf(":")).trim();n[a]==null&&li(s,a,"")}else for(const o in t)n[o]==null&&li(s,o,"");for(const o in n){o==="display"&&(i=!0);const a=n[o];a!=null?Gy(e,o,!Ye(t)&&t?t[o]:void 0,a)||li(s,o,a):li(s,o,"")}}else if(r){if(t!==n){const o=s[Hy];o&&(n+=";"+o),s.cssText=n,i=Vy.test(n)}}else t&&e.removeAttribute("style");Sd in e&&(e[Sd]=i?s.display:"",e[jy]&&(s.display="none"))}const Cd=/\s*!important$/;function li(e,t,n){if(ge(n))n.forEach(s=>li(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=Wy(e,t);Cd.test(n)?e.setProperty(ss(s),n.replace(Cd,""),"important"):e[s]=n}}const Pd=["Webkit","Moz","ms"],tl={};function Wy(e,t){const n=tl[t];if(n)return n;let s=vt(t);if(s!=="filter"&&s in e)return tl[t]=s;s=_a(s);for(let r=0;r<Pd.length;r++){const i=Pd[r]+s;if(i in e)return tl[t]=i}return t}function Gy(e,t,n,s){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&Ye(s)&&n===s}const Ad="http://www.w3.org/1999/xlink";function Od(e,t,n,s,r,i=Xm(t)){s&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(Ad,t.slice(6,t.length)):e.setAttributeNS(Ad,t,n):n==null||i&&!Np(n)?e.removeAttribute(t):e.setAttribute(t,i?"":Xt(n)?String(n):n)}function Td(e,t,n,s,r){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?Kh(n):n);return}const i=e.tagName;if(t==="value"&&i!=="PROGRESS"&&!i.includes("-")){const a=i==="OPTION"?e.getAttribute("value")||"":e.value,l=n==null?e.type==="checkbox"?"on":"":String(n);(a!==l||!("_value"in e))&&(e.value=l),n==null&&e.removeAttribute(t),e._value=n;return}let o=!1;if(n===""||n==null){const a=typeof e[t];a==="boolean"?n=Np(n):n==null&&a==="string"?(n="",o=!0):a==="number"&&(n=0,o=!0)}try{e[t]=n}catch{}o&&e.removeAttribute(r||t)}function Wn(e,t,n,s){e.addEventListener(t,n,s)}function Ky(e,t,n,s){e.removeEventListener(t,n,s)}const Id=Symbol("_vei");function Yy(e,t,n,s,r=null){const i=e[Id]||(e[Id]={}),o=i[t];if(s&&o)o.value=s;else{const[a,l]=Jy(t);if(s){const c=i[t]=Qy(s,r);Wn(e,a,c,l)}else o&&(Ky(e,a,o,l),i[t]=void 0)}}const Rd=/(?:Once|Passive|Capture)$/;function Jy(e){let t;if(Rd.test(e)){t={};let s;for(;s=e.match(Rd);)e=e.slice(0,e.length-s[0].length),t[s[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):ss(e.slice(2)),t]}let nl=0;const Xy=Promise.resolve(),Zy=()=>nl||(Xy.then(()=>nl=0),nl=Date.now());function Qy(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;const r=n.value;if(ge(r)){const i=s.stopImmediatePropagation;s.stopImmediatePropagation=()=>{i.call(s),s._stopped=!0};const o=r.slice(),a=[s];for(let l=0;l<o.length&&!s._stopped;l++){const c=o[l];c&&an(c,t,5,a)}}else an(r,t,5,[s])};return n.value=e,n.attached=Zy(),n}const Md=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,e0=(e,t,n,s,r,i)=>{const o=r==="svg";t==="class"?zy(e,s,o):t==="style"?Uy(e,n,s):ha(t)?ga(t)||Yy(e,t,n,s,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):t0(e,t,s,o))?(Td(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Od(e,t,s,o,i,t!=="value")):e._isVueCE&&(n0(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Ye(s)))?Td(e,vt(t),s,i,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Od(e,t,s,o))};function t0(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&Md(t)&&we(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"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return Md(t)&&Ye(n)?!1:t in e}function n0(e,t){const n=e._def.props;if(!n)return!1;const s=vt(t);return Array.isArray(n)?n.some(r=>vt(r)===s):Object.keys(n).some(r=>vt(r)===s)}const _s=e=>{const t=e.props["onUpdate:modelValue"]||!1;return ge(t)?n=>Eo(t,n):t};function s0(e){e.target.composing=!0}function $d(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const en=Symbol("_assign");function Fd(e,t,n){return t&&(e=e.trim()),n&&(e=ya(e)),e}const zo={created(e,{modifiers:{lazy:t,trim:n,number:s}},r){e[en]=_s(r);const i=s||r.props&&r.props.type==="number";Wn(e,t?"change":"input",o=>{o.target.composing||e[en](Fd(e.value,n,i))}),(n||i)&&Wn(e,"change",()=>{e.value=Fd(e.value,n,i)}),t||(Wn(e,"compositionstart",s0),Wn(e,"compositionend",$d),Wn(e,"change",$d))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:r,number:i}},o){if(e[en]=_s(o),e.composing)return;const a=(i||e.type==="number")&&!/^0\d/.test(e.value)?ya(e.value):e.value,l=t??"";if(a===l)return;const c=e.getRootNode();(c instanceof Document||c instanceof ShadowRoot)&&c.activeElement===e&&e.type!=="range"&&(s&&t===n||r&&e.value.trim()===l)||(e.value=l)}},r0={deep:!0,created(e,t,n){e[en]=_s(n),Wn(e,"change",()=>{const s=e._modelValue,r=Ar(e),i=e.checked,o=e[en];if(ge(s)){const a=sc(s,r),l=a!==-1;if(i&&!l)o(s.concat(r));else if(!i&&l){const c=[...s];c.splice(a,1),o(c)}}else if(Lr(s)){const a=new Set(s);i?a.add(r):a.delete(r),o(a)}else o(Yh(e,i))})},mounted:Dd,beforeUpdate(e,t,n){e[en]=_s(n),Dd(e,t,n)}};function Dd(e,{value:t,oldValue:n},s){e._modelValue=t;let r;if(ge(t))r=sc(t,s.props.value)>-1;else if(Lr(t))r=t.has(s.props.value);else{if(t===n)return;r=vs(t,Yh(e,!0))}e.checked!==r&&(e.checked=r)}const i0={created(e,{value:t},n){e.checked=vs(t,n.props.value),e[en]=_s(n),Wn(e,"change",()=>{e[en](Ar(e))})},beforeUpdate(e,{value:t,oldValue:n},s){e[en]=_s(s),t!==n&&(e.checked=vs(t,s.props.value))}},o0={deep:!0,created(e,{value:t,modifiers:{number:n}},s){const r=Lr(t);Wn(e,"change",()=>{const i=Array.prototype.filter.call(e.options,o=>o.selected).map(o=>n?ya(Ar(o)):Ar(o));e[en](e.multiple?r?new Set(i):i:i[0]),e._assigning=!0,Dt(()=>{e._assigning=!1})}),e[en]=_s(s)},mounted(e,{value:t}){Ld(e,t)},beforeUpdate(e,t,n){e[en]=_s(n)},updated(e,{value:t}){e._assigning||Ld(e,t)}};function Ld(e,t){const n=e.multiple,s=ge(t);if(!(n&&!s&&!Lr(t))){for(let r=0,i=e.options.length;r<i;r++){const o=e.options[r],a=Ar(o);if(n)if(s){const l=typeof a;l==="string"||l==="number"?o.selected=t.some(c=>String(c)===String(a)):o.selected=sc(t,a)>-1}else o.selected=t.has(a);else if(vs(Ar(o),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Ar(e){return"_value"in e?e._value:e.value}function Yh(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const a0={created(e,t,n){oo(e,t,n,null,"created")},mounted(e,t,n){oo(e,t,n,null,"mounted")},beforeUpdate(e,t,n,s){oo(e,t,n,s,"beforeUpdate")},updated(e,t,n,s){oo(e,t,n,s,"updated")}};function l0(e,t){switch(e){case"SELECT":return o0;case"TEXTAREA":return zo;default:switch(t){case"checkbox":return r0;case"radio":return i0;default:return zo}}}function oo(e,t,n,s,r){const o=l0(e.tagName,n.props&&n.props.type)[r];o&&o(e,t,n,s)}const u0=["ctrl","shift","alt","meta"],c0={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)=>u0.some(n=>e[`${n}Key`]&&!t.includes(n))},wn=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=((r,...i)=>{for(let o=0;o<t.length;o++){const a=c0[t[o]];if(a&&a(r,t))return}return e(r,...i)}))},d0={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},jo=(e,t)=>{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=(r=>{if(!("key"in r))return;const i=ss(r.key);if(t.some(o=>o===i||d0[o]===i))return e(r)}))},f0=mt({patchProp:e0},qy);let Nd;function p0(){return Nd||(Nd=by(f0))}const h0=((...e)=>{const t=p0().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=v0(s);if(!r)return;const i=t._component;!we(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const o=n(r,!1,g0(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),o},t});function g0(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function v0(e){return Ye(e)?document.querySelector(e):e}const m0="/assets/source-sans-3-latin-wght-normal-BqRLTx4X.woff2";/*!
18
+ * vue-router v4.6.4
19
+ * (c) 2025 Eduardo San Martin Morote
20
+ * @license MIT
21
+ */const lr=typeof document<"u";function Jh(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function _0(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&Jh(e.default)}const Re=Object.assign;function sl(e,t){const n={};for(const s in t){const r=t[s];n[s]=un(r)?r.map(e):e(r)}return n}const wi=()=>{},un=Array.isArray;function qd(e,t){const n={};for(const s in e)n[s]=s in t?t[s]:e[s];return n}const Xh=/#/g,y0=/&/g,b0=/\//g,x0=/=/g,w0=/\?/g,Zh=/\+/g,k0=/%5B/g,E0=/%5D/g,Qh=/%5E/g,S0=/%60/g,eg=/%7B/g,C0=/%7C/g,tg=/%7D/g,P0=/%20/g;function vc(e){return e==null?"":encodeURI(""+e).replace(C0,"|").replace(k0,"[").replace(E0,"]")}function A0(e){return vc(e).replace(eg,"{").replace(tg,"}").replace(Qh,"^")}function Zl(e){return vc(e).replace(Zh,"%2B").replace(P0,"+").replace(Xh,"%23").replace(y0,"%26").replace(S0,"`").replace(eg,"{").replace(tg,"}").replace(Qh,"^")}function O0(e){return Zl(e).replace(x0,"%3D")}function T0(e){return vc(e).replace(Xh,"%23").replace(w0,"%3F")}function I0(e){return T0(e).replace(b0,"%2F")}function Di(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const R0=/\/$/,M0=e=>e.replace(R0,"");function rl(e,t,n="/"){let s,r={},i="",o="";const a=t.indexOf("#");let l=t.indexOf("?");return l=a>=0&&l>a?-1:l,l>=0&&(s=t.slice(0,l),i=t.slice(l,a>0?a:t.length),r=e(i.slice(1))),a>=0&&(s=s||t.slice(0,a),o=t.slice(a,t.length)),s=L0(s??t,n),{fullPath:s+i+o,path:s,query:r,hash:Di(o)}}function $0(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Bd(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function F0(e,t,n){const s=t.matched.length-1,r=n.matched.length-1;return s>-1&&s===r&&Or(t.matched[s],n.matched[r])&&ng(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Or(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function ng(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!D0(e[n],t[n]))return!1;return!0}function D0(e,t){return un(e)?zd(e,t):un(t)?zd(t,e):(e==null?void 0:e.valueOf())===(t==null?void 0:t.valueOf())}function zd(e,t){return un(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function L0(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),s=e.split("/"),r=s[s.length-1];(r===".."||r===".")&&s.push("");let i=n.length-1,o,a;for(o=0;o<s.length;o++)if(a=s[o],a!==".")if(a==="..")i>1&&i--;else break;return n.slice(0,i).join("/")+"/"+s.slice(o).join("/")}const os={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let Ql=(function(e){return e.pop="pop",e.push="push",e})({}),il=(function(e){return e.back="back",e.forward="forward",e.unknown="",e})({});function N0(e){if(!e)if(lr){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),M0(e)}const q0=/^[^#]+#/;function B0(e,t){return e.replace(q0,"#")+t}function z0(e,t){const n=document.documentElement.getBoundingClientRect(),s=e.getBoundingClientRect();return{behavior:t.behavior,left:s.left-n.left-(t.left||0),top:s.top-n.top-(t.top||0)}}const Ra=()=>({left:window.scrollX,top:window.scrollY});function j0(e){let t;if("el"in e){const n=e.el,s=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=z0(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function jd(e,t){return(history.state?history.state.position-t:-1)+e}const eu=new Map;function H0(e,t){eu.set(e,t)}function V0(e){const t=eu.get(e);return eu.delete(e),t}function U0(e){return typeof e=="string"||e&&typeof e=="object"}function sg(e){return typeof e=="string"||typeof e=="symbol"}let st=(function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e})({});const rg=Symbol("");st.MATCHER_NOT_FOUND+"",st.NAVIGATION_GUARD_REDIRECT+"",st.NAVIGATION_ABORTED+"",st.NAVIGATION_CANCELLED+"",st.NAVIGATION_DUPLICATED+"";function Tr(e,t){return Re(new Error,{type:e,[rg]:!0},t)}function Mn(e,t){return e instanceof Error&&rg in e&&(t==null||!!(e.type&t))}const W0=["params","query","hash"];function G0(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of W0)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function K0(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;s<n.length;++s){const r=n[s].replace(Zh," "),i=r.indexOf("="),o=Di(i<0?r:r.slice(0,i)),a=i<0?null:Di(r.slice(i+1));if(o in t){let l=t[o];un(l)||(l=t[o]=[l]),l.push(a)}else t[o]=a}return t}function Hd(e){let t="";for(let n in e){const s=e[n];if(n=O0(n),s==null){s!==void 0&&(t+=(t.length?"&":"")+n);continue}(un(s)?s.map(r=>r&&Zl(r)):[s&&Zl(s)]).forEach(r=>{r!==void 0&&(t+=(t.length?"&":"")+n,r!=null&&(t+="="+r))})}return t}function Y0(e){const t={};for(const n in e){const s=e[n];s!==void 0&&(t[n]=un(s)?s.map(r=>r==null?null:""+r):s==null?s:""+s)}return t}const J0=Symbol(""),Vd=Symbol(""),Ma=Symbol(""),mc=Symbol(""),tu=Symbol("");function Gr(){let e=[];function t(s){return e.push(s),()=>{const r=e.indexOf(s);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function fs(e,t,n,s,r,i=o=>o()){const o=s&&(s.enterCallbacks[r]=s.enterCallbacks[r]||[]);return()=>new Promise((a,l)=>{const c=f=>{f===!1?l(Tr(st.NAVIGATION_ABORTED,{from:n,to:t})):f instanceof Error?l(f):U0(f)?l(Tr(st.NAVIGATION_GUARD_REDIRECT,{from:t,to:f})):(o&&s.enterCallbacks[r]===o&&typeof f=="function"&&o.push(f),a())},u=i(()=>e.call(s&&s.instances[r],t,n,c));let d=Promise.resolve(u);e.length<3&&(d=d.then(c)),d.catch(f=>l(f))})}function ol(e,t,n,s,r=i=>i()){const i=[];for(const o of e)for(const a in o.components){let l=o.components[a];if(!(t!=="beforeRouteEnter"&&!o.instances[a]))if(Jh(l)){const c=(l.__vccOpts||l)[t];c&&i.push(fs(c,n,s,o,a,r))}else{let c=l();i.push(()=>c.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${a}" at "${o.path}"`);const d=_0(u)?u.default:u;o.mods[a]=u,o.components[a]=d;const f=(d.__vccOpts||d)[t];return f&&fs(f,n,s,o,a,r)()}))}}return i}function X0(e,t){const n=[],s=[],r=[],i=Math.max(t.matched.length,e.matched.length);for(let o=0;o<i;o++){const a=t.matched[o];a&&(e.matched.find(c=>Or(c,a))?s.push(a):n.push(a));const l=e.matched[o];l&&(t.matched.find(c=>Or(c,l))||r.push(l))}return[n,s,r]}/*!
22
+ * vue-router v4.6.4
23
+ * (c) 2025 Eduardo San Martin Morote
24
+ * @license MIT
25
+ */let Z0=()=>location.protocol+"//"+location.host;function ig(e,t){const{pathname:n,search:s,hash:r}=t,i=e.indexOf("#");if(i>-1){let o=r.includes(e.slice(i))?e.slice(i).length:1,a=r.slice(o);return a[0]!=="/"&&(a="/"+a),Bd(a,"")}return Bd(n,e)+s+r}function Q0(e,t,n,s){let r=[],i=[],o=null;const a=({state:f})=>{const p=ig(e,location),g=n.value,h=t.value;let m=0;if(f){if(n.value=p,t.value=f,o&&o===g){o=null;return}m=h?f.position-h.position:0}else s(p);r.forEach(v=>{v(n.value,g,{delta:m,type:Ql.pop,direction:m?m>0?il.forward:il.back:il.unknown})})};function l(){o=n.value}function c(f){r.push(f);const p=()=>{const g=r.indexOf(f);g>-1&&r.splice(g,1)};return i.push(p),p}function u(){if(document.visibilityState==="hidden"){const{history:f}=window;if(!f.state)return;f.replaceState(Re({},f.state,{scroll:Ra()}),"")}}function d(){for(const f of i)f();i=[],window.removeEventListener("popstate",a),window.removeEventListener("pagehide",u),document.removeEventListener("visibilitychange",u)}return window.addEventListener("popstate",a),window.addEventListener("pagehide",u),document.addEventListener("visibilitychange",u),{pauseListeners:l,listen:c,destroy:d}}function Ud(e,t,n,s=!1,r=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:r?Ra():null}}function eb(e){const{history:t,location:n}=window,s={value:ig(e,n)},r={value:t.state};r.value||i(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(l,c,u){const d=e.indexOf("#"),f=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))+l:Z0()+e+l;try{t[u?"replaceState":"pushState"](c,"",f),r.value=c}catch(p){console.error(p),n[u?"replace":"assign"](f)}}function o(l,c){i(l,Re({},t.state,Ud(r.value.back,l,r.value.forward,!0),c,{position:r.value.position}),!0),s.value=l}function a(l,c){const u=Re({},r.value,t.state,{forward:l,scroll:Ra()});i(u.current,u,!0),i(l,Re({},Ud(s.value,l,null),{position:u.position+1},c),!1),s.value=l}return{location:s,state:r,push:a,replace:o}}function tb(e){e=N0(e);const t=eb(e),n=Q0(e,t.state,t.location,t.replace);function s(i,o=!0){o||n.pauseListeners(),history.go(i)}const r=Re({location:"",base:e,go:s,createHref:B0.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}let Bs=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({});var dt=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e})(dt||{});const nb={type:Bs.Static,value:""},sb=/[a-zA-Z0-9_]/;function rb(e){if(!e)return[[]];if(e==="/")return[[nb]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(p){throw new Error(`ERR (${n})/"${c}": ${p}`)}let n=dt.Static,s=n;const r=[];let i;function o(){i&&r.push(i),i=[]}let a=0,l,c="",u="";function d(){c&&(n===dt.Static?i.push({type:Bs.Static,value:c}):n===dt.Param||n===dt.ParamRegExp||n===dt.ParamRegExpEnd?(i.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),i.push({type:Bs.Param,value:c,regexp:u,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),c="")}function f(){c+=l}for(;a<e.length;){if(l=e[a++],l==="\\"&&n!==dt.ParamRegExp){s=n,n=dt.EscapeNext;continue}switch(n){case dt.Static:l==="/"?(c&&d(),o()):l===":"?(d(),n=dt.Param):f();break;case dt.EscapeNext:f(),n=s;break;case dt.Param:l==="("?n=dt.ParamRegExp:sb.test(l)?f():(d(),n=dt.Static,l!=="*"&&l!=="?"&&l!=="+"&&a--);break;case dt.ParamRegExp:l===")"?u[u.length-1]=="\\"?u=u.slice(0,-1)+l:n=dt.ParamRegExpEnd:u+=l;break;case dt.ParamRegExpEnd:d(),n=dt.Static,l!=="*"&&l!=="?"&&l!=="+"&&a--,u="";break;default:t("Unknown state");break}}return n===dt.ParamRegExp&&t(`Unfinished custom RegExp for param "${c}"`),d(),o(),r}const Wd="[^/]+?",ib={sensitive:!1,strict:!1,start:!0,end:!0};var It=(function(e){return e[e._multiplier=10]="_multiplier",e[e.Root=90]="Root",e[e.Segment=40]="Segment",e[e.SubSegment=30]="SubSegment",e[e.Static=40]="Static",e[e.Dynamic=20]="Dynamic",e[e.BonusCustomRegExp=10]="BonusCustomRegExp",e[e.BonusWildcard=-50]="BonusWildcard",e[e.BonusRepeatable=-20]="BonusRepeatable",e[e.BonusOptional=-8]="BonusOptional",e[e.BonusStrict=.7000000000000001]="BonusStrict",e[e.BonusCaseSensitive=.25]="BonusCaseSensitive",e})(It||{});const ob=/[.+*?^${}()[\]/\\]/g;function ab(e,t){const n=Re({},ib,t),s=[];let r=n.start?"^":"";const i=[];for(const c of e){const u=c.length?[]:[It.Root];n.strict&&!c.length&&(r+="/");for(let d=0;d<c.length;d++){const f=c[d];let p=It.Segment+(n.sensitive?It.BonusCaseSensitive:0);if(f.type===Bs.Static)d||(r+="/"),r+=f.value.replace(ob,"\\$&"),p+=It.Static;else if(f.type===Bs.Param){const{value:g,repeatable:h,optional:m,regexp:v}=f;i.push({name:g,repeatable:h,optional:m});const y=v||Wd;if(y!==Wd){p+=It.BonusCustomRegExp;try{`${y}`}catch(k){throw new Error(`Invalid custom RegExp for param "${g}" (${y}): `+k.message)}}let x=h?`((?:${y})(?:/(?:${y}))*)`:`(${y})`;d||(x=m&&c.length<2?`(?:/${x})`:"/"+x),m&&(x+="?"),r+=x,p+=It.Dynamic,m&&(p+=It.BonusOptional),h&&(p+=It.BonusRepeatable),y===".*"&&(p+=It.BonusWildcard)}u.push(p)}s.push(u)}if(n.strict&&n.end){const c=s.length-1;s[c][s[c].length-1]+=It.BonusStrict}n.strict||(r+="/?"),n.end?r+="$":n.strict&&!r.endsWith("/")&&(r+="(?:/|$)");const o=new RegExp(r,n.sensitive?"":"i");function a(c){const u=c.match(o),d={};if(!u)return null;for(let f=1;f<u.length;f++){const p=u[f]||"",g=i[f-1];d[g.name]=p&&g.repeatable?p.split("/"):p}return d}function l(c){let u="",d=!1;for(const f of e){(!d||!u.endsWith("/"))&&(u+="/"),d=!1;for(const p of f)if(p.type===Bs.Static)u+=p.value;else if(p.type===Bs.Param){const{value:g,repeatable:h,optional:m}=p,v=g in c?c[g]:"";if(un(v)&&!h)throw new Error(`Provided param "${g}" is an array but it is not repeatable (* or + modifiers)`);const y=un(v)?v.join("/"):v;if(!y)if(m)f.length<2&&(u.endsWith("/")?u=u.slice(0,-1):d=!0);else throw new Error(`Missing required param "${g}"`);u+=y}}return u||"/"}return{re:o,score:s,keys:i,parse:a,stringify:l}}function lb(e,t){let n=0;for(;n<e.length&&n<t.length;){const s=t[n]-e[n];if(s)return s;n++}return e.length<t.length?e.length===1&&e[0]===It.Static+It.Segment?-1:1:e.length>t.length?t.length===1&&t[0]===It.Static+It.Segment?1:-1:0}function og(e,t){let n=0;const s=e.score,r=t.score;for(;n<s.length&&n<r.length;){const i=lb(s[n],r[n]);if(i)return i;n++}if(Math.abs(r.length-s.length)===1){if(Gd(s))return 1;if(Gd(r))return-1}return r.length-s.length}function Gd(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const ub={strict:!1,end:!0,sensitive:!1};function cb(e,t,n){const s=ab(rb(e.path),n),r=Re(s,{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function db(e,t){const n=[],s=new Map;t=qd(ub,t);function r(d){return s.get(d)}function i(d,f,p){const g=!p,h=Yd(d);h.aliasOf=p&&p.record;const m=qd(t,d),v=[h];if("alias"in d){const k=typeof d.alias=="string"?[d.alias]:d.alias;for(const O of k)v.push(Yd(Re({},h,{components:p?p.record.components:h.components,path:O,aliasOf:p?p.record:h})))}let y,x;for(const k of v){const{path:O}=k;if(f&&O[0]!=="/"){const q=f.record.path,E=q[q.length-1]==="/"?"":"/";k.path=f.record.path+(O&&E+O)}if(y=cb(k,f,m),p?p.alias.push(y):(x=x||y,x!==y&&x.alias.push(y),g&&d.name&&!Jd(y)&&o(d.name)),ag(y)&&l(y),h.children){const q=h.children;for(let E=0;E<q.length;E++)i(q[E],y,p&&p.children[E])}p=p||y}return x?()=>{o(x)}:wi}function o(d){if(sg(d)){const f=s.get(d);f&&(s.delete(d),n.splice(n.indexOf(f),1),f.children.forEach(o),f.alias.forEach(o))}else{const f=n.indexOf(d);f>-1&&(n.splice(f,1),d.record.name&&s.delete(d.record.name),d.children.forEach(o),d.alias.forEach(o))}}function a(){return n}function l(d){const f=hb(d,n);n.splice(f,0,d),d.record.name&&!Jd(d)&&s.set(d.record.name,d)}function c(d,f){let p,g={},h,m;if("name"in d&&d.name){if(p=s.get(d.name),!p)throw Tr(st.MATCHER_NOT_FOUND,{location:d});m=p.record.name,g=Re(Kd(f.params,p.keys.filter(x=>!x.optional).concat(p.parent?p.parent.keys.filter(x=>x.optional):[]).map(x=>x.name)),d.params&&Kd(d.params,p.keys.map(x=>x.name))),h=p.stringify(g)}else if(d.path!=null)h=d.path,p=n.find(x=>x.re.test(h)),p&&(g=p.parse(h),m=p.record.name);else{if(p=f.name?s.get(f.name):n.find(x=>x.re.test(f.path)),!p)throw Tr(st.MATCHER_NOT_FOUND,{location:d,currentLocation:f});m=p.record.name,g=Re({},f.params,d.params),h=p.stringify(g)}const v=[];let y=p;for(;y;)v.unshift(y.record),y=y.parent;return{name:m,path:h,params:g,matched:v,meta:pb(v)}}e.forEach(d=>i(d));function u(){n.length=0,s.clear()}return{addRoute:i,resolve:c,removeRoute:o,clearRoutes:u,getRoutes:a,getRecordMatcher:r}}function Kd(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function Yd(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:fb(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function fb(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const s in e.components)t[s]=typeof n=="object"?n[s]:n;return t}function Jd(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function pb(e){return e.reduce((t,n)=>Re(t,n.meta),{})}function hb(e,t){let n=0,s=t.length;for(;n!==s;){const i=n+s>>1;og(e,t[i])<0?s=i:n=i+1}const r=gb(e);return r&&(s=t.lastIndexOf(r,s-1)),s}function gb(e){let t=e;for(;t=t.parent;)if(ag(t)&&og(e,t)===0)return t}function ag({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Xd(e){const t=Kt(Ma),n=Kt(mc),s=G(()=>{const l=_(e.to);return t.resolve(l)}),r=G(()=>{const{matched:l}=s.value,{length:c}=l,u=l[c-1],d=n.matched;if(!u||!d.length)return-1;const f=d.findIndex(Or.bind(null,u));if(f>-1)return f;const p=Zd(l[c-2]);return c>1&&Zd(u)===p&&d[d.length-1].path!==p?d.findIndex(Or.bind(null,l[c-2])):f}),i=G(()=>r.value>-1&&bb(n.params,s.value.params)),o=G(()=>r.value>-1&&r.value===n.matched.length-1&&ng(n.params,s.value.params));function a(l={}){if(yb(l)){const c=t[_(e.replace)?"replace":"push"](_(e.to)).catch(wi);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>c),c}return Promise.resolve()}return{route:s,href:G(()=>s.value.href),isActive:i,isExactActive:o,navigate:a}}function vb(e){return e.length===1?e[0]:e}const mb=ae({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:Xd,setup(e,{slots:t}){const n=Zn(Xd(e)),{options:s}=Kt(Ma),r=G(()=>({[Qd(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[Qd(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const i=t.default&&vb(t.default(n));return e.custom?i:rn("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},i)}}}),_b=mb;function yb(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function bb(e,t){for(const n in t){const s=t[n],r=e[n];if(typeof s=="string"){if(s!==r)return!1}else if(!un(r)||r.length!==s.length||s.some((i,o)=>i.valueOf()!==r[o].valueOf()))return!1}return!0}function Zd(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Qd=(e,t,n)=>e??t??n,xb=ae({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=Kt(tu),r=G(()=>e.route||s.value),i=Kt(Vd,0),o=G(()=>{let c=_(i);const{matched:u}=r.value;let d;for(;(d=u[c])&&!d.components;)c++;return c}),a=G(()=>r.value.matched[o.value]);br(Vd,G(()=>o.value+1)),br(J0,a),br(tu,r);const l=J();return tt(()=>[l.value,a.value,e.name],([c,u,d],[f,p,g])=>{u&&(u.instances[d]=c,p&&p!==u&&c&&c===f&&(u.leaveGuards.size||(u.leaveGuards=p.leaveGuards),u.updateGuards.size||(u.updateGuards=p.updateGuards))),c&&u&&(!p||!Or(u,p)||!f)&&(u.enterCallbacks[d]||[]).forEach(h=>h(c))},{flush:"post"}),()=>{const c=r.value,u=e.name,d=a.value,f=d&&d.components[u];if(!f)return ef(n.default,{Component:f,route:c});const p=d.props[u],g=p?p===!0?c.params:typeof p=="function"?p(c):p:null,m=rn(f,Re({},g,t,{onVnodeUnmounted:v=>{v.component.isUnmounted&&(d.instances[u]=null)},ref:l}));return ef(n.default,{Component:m,route:c})||m}}});function ef(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const wb=xb;function kb(e){const t=db(e.routes,e),n=e.parseQuery||K0,s=e.stringifyQuery||Hd,r=e.history,i=Gr(),o=Gr(),a=Gr(),l=qr(os);let c=os;lr&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=sl.bind(null,B=>""+B),d=sl.bind(null,I0),f=sl.bind(null,Di);function p(B,ne){let se,pe;return sg(B)?(se=t.getRecordMatcher(B),pe=ne):pe=B,t.addRoute(pe,se)}function g(B){const ne=t.getRecordMatcher(B);ne&&t.removeRoute(ne)}function h(){return t.getRoutes().map(B=>B.record)}function m(B){return!!t.getRecordMatcher(B)}function v(B,ne){if(ne=Re({},ne||l.value),typeof B=="string"){const S=rl(n,B,ne.path),j=t.resolve({path:S.path},ne),H=r.createHref(S.fullPath);return Re(S,j,{params:f(j.params),hash:Di(S.hash),redirectedFrom:void 0,href:H})}let se;if(B.path!=null)se=Re({},B,{path:rl(n,B.path,ne.path).path});else{const S=Re({},B.params);for(const j in S)S[j]==null&&delete S[j];se=Re({},B,{params:d(S)}),ne.params=d(ne.params)}const pe=t.resolve(se,ne),Ae=B.hash||"";pe.params=u(f(pe.params));const b=$0(s,Re({},B,{hash:A0(Ae),path:pe.path})),w=r.createHref(b);return Re({fullPath:b,hash:Ae,query:s===Hd?Y0(B.query):B.query||{}},pe,{redirectedFrom:void 0,href:w})}function y(B){return typeof B=="string"?rl(n,B,l.value.path):Re({},B)}function x(B,ne){if(c!==B)return Tr(st.NAVIGATION_CANCELLED,{from:ne,to:B})}function k(B){return E(B)}function O(B){return k(Re(y(B),{replace:!0}))}function q(B,ne){const se=B.matched[B.matched.length-1];if(se&&se.redirect){const{redirect:pe}=se;let Ae=typeof pe=="function"?pe(B,ne):pe;return typeof Ae=="string"&&(Ae=Ae.includes("?")||Ae.includes("#")?Ae=y(Ae):{path:Ae},Ae.params={}),Re({query:B.query,hash:B.hash,params:Ae.path!=null?{}:B.params},Ae)}}function E(B,ne){const se=c=v(B),pe=l.value,Ae=B.state,b=B.force,w=B.replace===!0,S=q(se,pe);if(S)return E(Re(y(S),{state:typeof S=="object"?Re({},Ae,S.state):Ae,force:b,replace:w}),ne||se);const j=se;j.redirectedFrom=ne;let H;return!b&&F0(s,pe,se)&&(H=Tr(st.NAVIGATION_DUPLICATED,{to:j,from:pe}),Pe(pe,pe,!0,!1)),(H?Promise.resolve(H):K(j,pe)).catch(z=>Mn(z)?Mn(z,st.NAVIGATION_GUARD_REDIRECT)?z:qe(z):L(z,j,pe)).then(z=>{if(z){if(Mn(z,st.NAVIGATION_GUARD_REDIRECT))return E(Re({replace:w},y(z.to),{state:typeof z.to=="object"?Re({},Ae,z.to.state):Ae,force:b}),ne||j)}else z=C(j,pe,!0,w,Ae);return U(j,pe,z),z})}function R(B,ne){const se=x(B,ne);return se?Promise.reject(se):Promise.resolve()}function T(B){const ne=nt.values().next().value;return ne&&typeof ne.runWithContext=="function"?ne.runWithContext(B):B()}function K(B,ne){let se;const[pe,Ae,b]=X0(B,ne);se=ol(pe.reverse(),"beforeRouteLeave",B,ne);for(const S of pe)S.leaveGuards.forEach(j=>{se.push(fs(j,B,ne))});const w=R.bind(null,B,ne);return se.push(w),Qe(se).then(()=>{se=[];for(const S of i.list())se.push(fs(S,B,ne));return se.push(w),Qe(se)}).then(()=>{se=ol(Ae,"beforeRouteUpdate",B,ne);for(const S of Ae)S.updateGuards.forEach(j=>{se.push(fs(j,B,ne))});return se.push(w),Qe(se)}).then(()=>{se=[];for(const S of b)if(S.beforeEnter)if(un(S.beforeEnter))for(const j of S.beforeEnter)se.push(fs(j,B,ne));else se.push(fs(S.beforeEnter,B,ne));return se.push(w),Qe(se)}).then(()=>(B.matched.forEach(S=>S.enterCallbacks={}),se=ol(b,"beforeRouteEnter",B,ne,T),se.push(w),Qe(se))).then(()=>{se=[];for(const S of o.list())se.push(fs(S,B,ne));return se.push(w),Qe(se)}).catch(S=>Mn(S,st.NAVIGATION_CANCELLED)?S:Promise.reject(S))}function U(B,ne,se){a.list().forEach(pe=>T(()=>pe(B,ne,se)))}function C(B,ne,se,pe,Ae){const b=x(B,ne);if(b)return b;const w=ne===os,S=lr?history.state:{};se&&(pe||w?r.replace(B.fullPath,Re({scroll:w&&S&&S.scroll},Ae)):r.push(B.fullPath,Ae)),l.value=B,Pe(B,ne,se,w),qe()}let F;function V(){F||(F=r.listen((B,ne,se)=>{if(!ot.listening)return;const pe=v(B),Ae=q(pe,ot.currentRoute.value);if(Ae){E(Re(Ae,{replace:!0,force:!0}),pe).catch(wi);return}c=pe;const b=l.value;lr&&H0(jd(b.fullPath,se.delta),Ra()),K(pe,b).catch(w=>Mn(w,st.NAVIGATION_ABORTED|st.NAVIGATION_CANCELLED)?w:Mn(w,st.NAVIGATION_GUARD_REDIRECT)?(E(Re(y(w.to),{force:!0}),pe).then(S=>{Mn(S,st.NAVIGATION_ABORTED|st.NAVIGATION_DUPLICATED)&&!se.delta&&se.type===Ql.pop&&r.go(-1,!1)}).catch(wi),Promise.reject()):(se.delta&&r.go(-se.delta,!1),L(w,pe,b))).then(w=>{w=w||C(pe,b,!1),w&&(se.delta&&!Mn(w,st.NAVIGATION_CANCELLED)?r.go(-se.delta,!1):se.type===Ql.pop&&Mn(w,st.NAVIGATION_ABORTED|st.NAVIGATION_DUPLICATED)&&r.go(-1,!1)),U(pe,b,w)}).catch(wi)}))}let X=Gr(),$=Gr(),A;function L(B,ne,se){qe(B);const pe=$.list();return pe.length?pe.forEach(Ae=>Ae(B,ne,se)):console.error(B),Promise.reject(B)}function de(){return A&&l.value!==os?Promise.resolve():new Promise((B,ne)=>{X.add([B,ne])})}function qe(B){return A||(A=!B,V(),X.list().forEach(([ne,se])=>B?se(B):ne()),X.reset()),B}function Pe(B,ne,se,pe){const{scrollBehavior:Ae}=e;if(!lr||!Ae)return Promise.resolve();const b=!se&&V0(jd(B.fullPath,0))||(pe||!se)&&history.state&&history.state.scroll||null;return Dt().then(()=>Ae(B,ne,b)).then(w=>w&&j0(w)).catch(w=>L(w,B,ne))}const Je=B=>r.go(B);let at;const nt=new Set,ot={currentRoute:l,listening:!0,addRoute:p,removeRoute:g,clearRoutes:t.clearRoutes,hasRoute:m,getRoutes:h,resolve:v,options:e,push:k,replace:O,go:Je,back:()=>Je(-1),forward:()=>Je(1),beforeEach:i.add,beforeResolve:o.add,afterEach:a.add,onError:$.add,isReady:de,install(B){B.component("RouterLink",_b),B.component("RouterView",wb),B.config.globalProperties.$router=ot,Object.defineProperty(B.config.globalProperties,"$route",{enumerable:!0,get:()=>_(l)}),lr&&!at&&l.value===os&&(at=!0,k(r.location).catch(pe=>{}));const ne={};for(const pe in os)Object.defineProperty(ne,pe,{get:()=>l.value[pe],enumerable:!0});B.provide(Ma,ot),B.provide(mc,oh(ne)),B.provide(tu,l);const se=B.unmount;nt.add(B),B.unmount=function(){nt.delete(B),nt.size<1&&(c=os,F&&F(),F=null,l.value=os,at=!1,A=!1),se()}}};function Qe(B){return B.reduce((ne,se)=>ne.then(()=>T(se)),Promise.resolve())}return ot}function Eb(){return Kt(Ma)}function Sb(e){return Kt(mc)}/**
26
+ * @license lucide-vue-next v0.469.0 - ISC
27
+ *
28
+ * This source code is licensed under the ISC license.
29
+ * See the LICENSE file in the root directory of this source tree.
30
+ */const Cb=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
31
+ * @license lucide-vue-next v0.469.0 - ISC
32
+ *
33
+ * This source code is licensed under the ISC license.
34
+ * See the LICENSE file in the root directory of this source tree.
35
+ */var ao={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"};/**
36
+ * @license lucide-vue-next v0.469.0 - ISC
37
+ *
38
+ * This source code is licensed under the ISC license.
39
+ * See the LICENSE file in the root directory of this source tree.
40
+ */const Pb=({size:e,strokeWidth:t=2,absoluteStrokeWidth:n,color:s,iconNode:r,name:i,class:o,...a},{slots:l})=>rn("svg",{...ao,width:e||ao.width,height:e||ao.height,stroke:s||ao.stroke,"stroke-width":n?Number(t)*24/Number(e):t,class:["lucide",`lucide-${Cb(i??"icon")}`],...a},[...r.map(c=>rn(...c)),...l.default?[l.default()]:[]]);/**
41
+ * @license lucide-vue-next v0.469.0 - ISC
42
+ *
43
+ * This source code is licensed under the ISC license.
44
+ * See the LICENSE file in the root directory of this source tree.
45
+ */const Ee=(e,t)=>(n,{slots:s})=>rn(Pb,{...n,iconNode:t,name:e},s);/**
46
+ * @license lucide-vue-next v0.469.0 - ISC
47
+ *
48
+ * This source code is licensed under the ISC license.
49
+ * See the LICENSE file in the root directory of this source tree.
50
+ */const Ab=Ee("ActivityIcon",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
51
+ * @license lucide-vue-next v0.469.0 - ISC
52
+ *
53
+ * This source code is licensed under the ISC license.
54
+ * See the LICENSE file in the root directory of this source tree.
55
+ */const Ob=Ee("ArrowUpIcon",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
56
+ * @license lucide-vue-next v0.469.0 - ISC
57
+ *
58
+ * This source code is licensed under the ISC license.
59
+ * See the LICENSE file in the root directory of this source tree.
60
+ */const lg=Ee("CheckIcon",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
61
+ * @license lucide-vue-next v0.469.0 - ISC
62
+ *
63
+ * This source code is licensed under the ISC license.
64
+ * See the LICENSE file in the root directory of this source tree.
65
+ */const ug=Ee("ChevronDownIcon",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
66
+ * @license lucide-vue-next v0.469.0 - ISC
67
+ *
68
+ * This source code is licensed under the ISC license.
69
+ * See the LICENSE file in the root directory of this source tree.
70
+ */const Tb=Ee("ChevronRightIcon",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
71
+ * @license lucide-vue-next v0.469.0 - ISC
72
+ *
73
+ * This source code is licensed under the ISC license.
74
+ * See the LICENSE file in the root directory of this source tree.
75
+ */const Ib=Ee("CircleDotIcon",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]]);/**
76
+ * @license lucide-vue-next v0.469.0 - ISC
77
+ *
78
+ * This source code is licensed under the ISC license.
79
+ * See the LICENSE file in the root directory of this source tree.
80
+ */const Rb=Ee("CropIcon",[["path",{d:"M6 2v14a2 2 0 0 0 2 2h14",key:"ron5a4"}],["path",{d:"M18 22V8a2 2 0 0 0-2-2H2",key:"7s9ehn"}]]);/**
81
+ * @license lucide-vue-next v0.469.0 - ISC
82
+ *
83
+ * This source code is licensed under the ISC license.
84
+ * See the LICENSE file in the root directory of this source tree.
85
+ */const Mb=Ee("EllipsisIcon",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
86
+ * @license lucide-vue-next v0.469.0 - ISC
87
+ *
88
+ * This source code is licensed under the ISC license.
89
+ * See the LICENSE file in the root directory of this source tree.
90
+ */const $b=Ee("EraserIcon",[["path",{d:"m7 21-4.3-4.3c-1-1-1-2.5 0-3.4l9.6-9.6c1-1 2.5-1 3.4 0l5.6 5.6c1 1 1 2.5 0 3.4L13 21",key:"182aya"}],["path",{d:"M22 21H7",key:"t4ddhn"}],["path",{d:"m5 11 9 9",key:"1mo9qw"}]]);/**
91
+ * @license lucide-vue-next v0.469.0 - ISC
92
+ *
93
+ * This source code is licensed under the ISC license.
94
+ * See the LICENSE file in the root directory of this source tree.
95
+ */const cg=Ee("ExternalLinkIcon",[["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"}]]);/**
96
+ * @license lucide-vue-next v0.469.0 - ISC
97
+ *
98
+ * This source code is licensed under the ISC license.
99
+ * See the LICENSE file in the root directory of this source tree.
100
+ */const al=Ee("EyeIcon",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
101
+ * @license lucide-vue-next v0.469.0 - ISC
102
+ *
103
+ * This source code is licensed under the ISC license.
104
+ * See the LICENSE file in the root directory of this source tree.
105
+ */const lo=Ee("FileImageIcon",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"10",cy:"12",r:"2",key:"737tya"}],["path",{d:"m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22",key:"wt3hpn"}]]);/**
106
+ * @license lucide-vue-next v0.469.0 - ISC
107
+ *
108
+ * This source code is licensed under the ISC license.
109
+ * See the LICENSE file in the root directory of this source tree.
110
+ */const Fb=Ee("FlaskConicalIcon",[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]]);/**
111
+ * @license lucide-vue-next v0.469.0 - ISC
112
+ *
113
+ * This source code is licensed under the ISC license.
114
+ * See the LICENSE file in the root directory of this source tree.
115
+ */const Db=Ee("HistoryIcon",[["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"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/**
116
+ * @license lucide-vue-next v0.469.0 - ISC
117
+ *
118
+ * This source code is licensed under the ISC license.
119
+ * See the LICENSE file in the root directory of this source tree.
120
+ */const Lb=Ee("ImageDownIcon",[["path",{d:"M10.3 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v10l-3.1-3.1a2 2 0 0 0-2.814.014L6 21",key:"9csbqa"}],["path",{d:"m14 19 3 3v-5.5",key:"9ldu5r"}],["path",{d:"m17 22 3-3",key:"1nkfve"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]]);/**
121
+ * @license lucide-vue-next v0.469.0 - ISC
122
+ *
123
+ * This source code is licensed under the ISC license.
124
+ * See the LICENSE file in the root directory of this source tree.
125
+ */const Nb=Ee("InfoIcon",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
126
+ * @license lucide-vue-next v0.469.0 - ISC
127
+ *
128
+ * This source code is licensed under the ISC license.
129
+ * See the LICENSE file in the root directory of this source tree.
130
+ */const qb=Ee("LayersIcon",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);/**
131
+ * @license lucide-vue-next v0.469.0 - ISC
132
+ *
133
+ * This source code is licensed under the ISC license.
134
+ * See the LICENSE file in the root directory of this source tree.
135
+ */const Bb=Ee("ListChecksIcon",[["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]]);/**
136
+ * @license lucide-vue-next v0.469.0 - ISC
137
+ *
138
+ * This source code is licensed under the ISC license.
139
+ * See the LICENSE file in the root directory of this source tree.
140
+ */const Kn=Ee("LoaderCircleIcon",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
141
+ * @license lucide-vue-next v0.469.0 - ISC
142
+ *
143
+ * This source code is licensed under the ISC license.
144
+ * See the LICENSE file in the root directory of this source tree.
145
+ */const tf=Ee("LockIcon",[["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"}]]);/**
146
+ * @license lucide-vue-next v0.469.0 - ISC
147
+ *
148
+ * This source code is licensed under the ISC license.
149
+ * See the LICENSE file in the root directory of this source tree.
150
+ */const dg=Ee("MessageSquarePlusIcon",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}],["path",{d:"M12 7v6",key:"lw1j43"}],["path",{d:"M9 10h6",key:"9gxzsh"}]]);/**
151
+ * @license lucide-vue-next v0.469.0 - ISC
152
+ *
153
+ * This source code is licensed under the ISC license.
154
+ * See the LICENSE file in the root directory of this source tree.
155
+ */const zb=Ee("MoonIcon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
156
+ * @license lucide-vue-next v0.469.0 - ISC
157
+ *
158
+ * This source code is licensed under the ISC license.
159
+ * See the LICENSE file in the root directory of this source tree.
160
+ */const jb=Ee("PaintBucketIcon",[["path",{d:"m19 11-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0L19 11Z",key:"irua1i"}],["path",{d:"m5 2 5 5",key:"1lls2c"}],["path",{d:"M2 13h15",key:"1hkzvu"}],["path",{d:"M22 20a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4 .3 1.6 2 2.4 2 4Z",key:"xk76lq"}]]);/**
161
+ * @license lucide-vue-next v0.469.0 - ISC
162
+ *
163
+ * This source code is licensed under the ISC license.
164
+ * See the LICENSE file in the root directory of this source tree.
165
+ */const Hb=Ee("PencilIcon",[["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"}]]);/**
166
+ * @license lucide-vue-next v0.469.0 - ISC
167
+ *
168
+ * This source code is licensed under the ISC license.
169
+ * See the LICENSE file in the root directory of this source tree.
170
+ */const nf=Ee("PlayIcon",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
171
+ * @license lucide-vue-next v0.469.0 - ISC
172
+ *
173
+ * This source code is licensed under the ISC license.
174
+ * See the LICENSE file in the root directory of this source tree.
175
+ */const Vb=Ee("Redo2Icon",[["path",{d:"m15 14 5-5-5-5",key:"12vg1m"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",key:"6uklza"}]]);/**
176
+ * @license lucide-vue-next v0.469.0 - ISC
177
+ *
178
+ * This source code is licensed under the ISC license.
179
+ * See the LICENSE file in the root directory of this source tree.
180
+ */const Ub=Ee("Settings2Icon",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);/**
181
+ * @license lucide-vue-next v0.469.0 - ISC
182
+ *
183
+ * This source code is licensed under the ISC license.
184
+ * See the LICENSE file in the root directory of this source tree.
185
+ */const Wb=Ee("SlidersHorizontalIcon",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);/**
186
+ * @license lucide-vue-next v0.469.0 - ISC
187
+ *
188
+ * This source code is licensed under the ISC license.
189
+ * See the LICENSE file in the root directory of this source tree.
190
+ */const nu=Ee("SparklesIcon",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
191
+ * @license lucide-vue-next v0.469.0 - ISC
192
+ *
193
+ * This source code is licensed under the ISC license.
194
+ * See the LICENSE file in the root directory of this source tree.
195
+ */const Co=Ee("SquareDashedIcon",[["path",{d:"M5 3a2 2 0 0 0-2 2",key:"y57alp"}],["path",{d:"M19 3a2 2 0 0 1 2 2",key:"18rm91"}],["path",{d:"M21 19a2 2 0 0 1-2 2",key:"1j7049"}],["path",{d:"M5 21a2 2 0 0 1-2-2",key:"sbafld"}],["path",{d:"M9 3h1",key:"1yesri"}],["path",{d:"M9 21h1",key:"15o7lz"}],["path",{d:"M14 3h1",key:"1ec4yj"}],["path",{d:"M14 21h1",key:"v9vybs"}],["path",{d:"M3 9v1",key:"1r0deq"}],["path",{d:"M21 9v1",key:"mxsmne"}],["path",{d:"M3 14v1",key:"vnatye"}],["path",{d:"M21 14v1",key:"169vum"}]]);/**
196
+ * @license lucide-vue-next v0.469.0 - ISC
197
+ *
198
+ * This source code is licensed under the ISC license.
199
+ * See the LICENSE file in the root directory of this source tree.
200
+ */const Gb=Ee("SquareIcon",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
201
+ * @license lucide-vue-next v0.469.0 - ISC
202
+ *
203
+ * This source code is licensed under the ISC license.
204
+ * See the LICENSE file in the root directory of this source tree.
205
+ */const Kb=Ee("SunIcon",[["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"}]]);/**
206
+ * @license lucide-vue-next v0.469.0 - ISC
207
+ *
208
+ * This source code is licensed under the ISC license.
209
+ * See the LICENSE file in the root directory of this source tree.
210
+ */const Yb=Ee("TagIcon",[["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"}]]);/**
211
+ * @license lucide-vue-next v0.469.0 - ISC
212
+ *
213
+ * This source code is licensed under the ISC license.
214
+ * See the LICENSE file in the root directory of this source tree.
215
+ */const su=Ee("Trash2Icon",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
216
+ * @license lucide-vue-next v0.469.0 - ISC
217
+ *
218
+ * This source code is licensed under the ISC license.
219
+ * See the LICENSE file in the root directory of this source tree.
220
+ */const fg=Ee("TypeIcon",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]);/**
221
+ * @license lucide-vue-next v0.469.0 - ISC
222
+ *
223
+ * This source code is licensed under the ISC license.
224
+ * See the LICENSE file in the root directory of this source tree.
225
+ */const Jb=Ee("Undo2Icon",[["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"}]]);/**
226
+ * @license lucide-vue-next v0.469.0 - ISC
227
+ *
228
+ * This source code is licensed under the ISC license.
229
+ * See the LICENSE file in the root directory of this source tree.
230
+ */const Xb=Ee("UserIcon",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
231
+ * @license lucide-vue-next v0.469.0 - ISC
232
+ *
233
+ * This source code is licensed under the ISC license.
234
+ * See the LICENSE file in the root directory of this source tree.
235
+ */const Zb=Ee("WandSparklesIcon",[["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"}]]);/**
236
+ * @license lucide-vue-next v0.469.0 - ISC
237
+ *
238
+ * This source code is licensed under the ISC license.
239
+ * See the LICENSE file in the root directory of this source tree.
240
+ */const sf=Ee("WrenchIcon",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/**
241
+ * @license lucide-vue-next v0.469.0 - ISC
242
+ *
243
+ * This source code is licensed under the ISC license.
244
+ * See the LICENSE file in the root directory of this source tree.
245
+ */const pg=Ee("XIcon",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Qb={class:"flex min-h-screen flex-col items-center justify-center gap-3 text-sm text-muted-foreground"},e1=ae({__name:"AppLoader",props:{message:{}},setup(e){return(t,n)=>(P(),Y("div",Qb,[I(_(Kn),{class:"size-5 animate-spin text-foreground/70"}),N("p",null,fe(e.message),1)]))}});function Es(e,t){const n=typeof e=="string"&&!t?`${e}Context`:t,s=Symbol(n);return[o=>{const a=Kt(s,o);if(a||a===null)return a;throw new Error(`Injection \`${s.toString()}\` not found. Component must be used within ${Array.isArray(e)?`one of the following components: ${e.join(", ")}`:`\`${e}\``}`)},o=>(br(s,o),o)]}function gs(){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 hg(e,t,n){const s=n.originalEvent.target,r=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),s.dispatchEvent(r)}function t1(e){return e==null}function n1(e,t){var n;const s=qr();return ln(()=>{s.value=e()},{...t,flush:(n=t==null?void 0:t.flush)!==null&&n!==void 0?n:"sync"}),Mo(s)}function Ji(e,t){return rc()?(Hp(e,t),!0):!1}function s1(){const e=new Set,t=i=>{e.delete(i)};return{on:i=>{e.add(i);const o=()=>t(i);return Ji(o),{off:o}},off:t,trigger:(...i)=>Promise.all(Array.from(e).map(o=>o(...i))),clear:()=>{e.clear()}}}function r1(e){let t=!1,n;const s=jp(!0);return((...r)=>(t||(n=s.run(()=>e(...r)),t=!0),n))}const Tn=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const i1=e=>typeof e<"u",o1=Object.prototype.toString,a1=e=>o1.call(e)==="[object Object]",rf=l1();function l1(){var e,t,n;return Tn&&!!(!((e=window)===null||e===void 0||(e=e.navigator)===null||e===void 0)&&e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window)===null||t===void 0||(t=t.navigator)===null||t===void 0?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test((n=window)===null||n===void 0?void 0:n.navigator.userAgent))}function ll(e){return Array.isArray(e)?e:[e]}function u1(e){return On()}function c1(e){if(!Tn)return e;let t=0,n,s;const r=()=>{t-=1,s&&t<=0&&(s.stop(),n=void 0,s=void 0)};return((...i)=>(t+=1,s||(s=jp(!0),n=s.run(()=>e(...i))),Ji(r),n))}function d1(e){return Zn(it(e)?new Proxy({},{get(t,n,s){return _(Reflect.get(e.value,n,s))},set(t,n,s){return it(e.value[n])&&!it(s)?e.value[n].value=s:e.value[n]=s,!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 f1(e){return d1(G(e))}function $a(e,...t){const n=t.flat(),s=n[0];return f1(()=>Object.fromEntries(typeof s=="function"?Object.entries(ms(e)).filter(([r,i])=>!s(Mt(i),r)):Object.entries(ms(e)).filter(r=>!n.includes(r[0]))))}function p1(e,t=1e4){return ch((n,s)=>{let r=Mt(e),i;const o=()=>setTimeout(()=>{r=Mt(e),s()},Mt(t));return Ji(()=>{clearTimeout(i)}),{get(){return n(),r},set(a){r=a,s(),clearTimeout(i),i=o()}}})}function h1(e,t){u1()&&dc(e,t)}function gg(e,t,n={}){const{immediate:s=!0,immediateCallback:r=!1}=n,i=qr(!1);let o;function a(){o&&(clearTimeout(o),o=void 0)}function l(){i.value=!1,a()}function c(...u){r&&e(),a(),i.value=!0,o=setTimeout(()=>{i.value=!1,o=void 0,e(...u)},Mt(t))}return s&&(i.value=!0,Tn&&c()),Ji(l),{isPending:$s(i),start:c,stop:l}}function g1(e,t,n){return tt(e,t,{...n,immediate:!0})}const _c=Tn?window:void 0;function zr(e){var t;const n=Mt(e);return(t=n==null?void 0:n.$el)!==null&&t!==void 0?t:n}function Ho(...e){const t=(s,r,i,o)=>(s.addEventListener(r,i,o),()=>s.removeEventListener(r,i,o)),n=G(()=>{const s=ll(Mt(e[0])).filter(r=>r!=null);return s.every(r=>typeof r!="string")?s:void 0});return g1(()=>{var s,r;return[(s=(r=n.value)===null||r===void 0?void 0:r.map(i=>zr(i)))!==null&&s!==void 0?s:[_c].filter(i=>i!=null),ll(Mt(n.value?e[1]:e[0])),ll(_(n.value?e[2]:e[1])),Mt(n.value?e[3]:e[2])]},([s,r,i,o],a,l)=>{if(!(s!=null&&s.length)||!(r!=null&&r.length)||!(i!=null&&i.length))return;const c=a1(o)?{...o}:o,u=s.flatMap(d=>r.flatMap(f=>i.map(p=>t(d,f,p,c))));l(()=>{u.forEach(d=>d())})},{flush:"post"})}function v1(){const e=qr(!1),t=On();return t&&qt(()=>{e.value=!0},t),e}function m1(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function _1(...e){let t,n,s={};e.length===3?(t=e[0],n=e[1],s=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],s=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:r=_c,eventName:i="keydown",passive:o=!1,dedupe:a=!1}=s,l=m1(t);return Ho(r,i,u=>{u.repeat&&Mt(a)||l(u)&&n(u)},o)}function y1(e){return JSON.parse(JSON.stringify(e))}function Fa(e,t,n,s={}){var r,i;const{clone:o=!1,passive:a=!1,eventName:l,deep:c=!1,defaultValue:u,shouldEmit:d}=s,f=On(),p=n||(f==null?void 0:f.emit)||(f==null||(r=f.$emit)===null||r===void 0?void 0:r.bind(f))||(f==null||(i=f.proxy)===null||i===void 0||(i=i.$emit)===null||i===void 0?void 0:i.bind(f==null?void 0:f.proxy));let g=l;t||(t="modelValue"),g=g||`update:${t.toString()}`;const h=y=>o?typeof o=="function"?o(y):y1(y):y,m=()=>i1(e[t])?h(e[t]):u,v=y=>{d?d(y)&&p(g,y):p(g,y)};if(a){const y=J(m());let x=!1;return tt(()=>e[t],k=>{x||(x=!0,y.value=h(k),Dt(()=>x=!1))}),tt(y,k=>{!x&&(k!==e[t]||c)&&v(k)},{deep:c}),y}else return G({get(){return m()},set(y){v(y)}})}function yc(e){return e?e.flatMap(t=>t.type===$e?yc(t.children):[t]):[]}const[bc]=Es("ConfigProvider");function ul(e){if(e===null||typeof e!="object")return!1;const 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 ru(e,t,n=".",s){if(!ul(t))return ru(e,{},n,s);const r={...t};for(const i of Object.keys(e)){if(i==="__proto__"||i==="constructor")continue;const o=e[i];o!=null&&(s&&s(r,i,o,n)||(Array.isArray(o)&&Array.isArray(r[i])?r[i]=[...o,...r[i]]:ul(o)&&ul(r[i])?r[i]=ru(o,r[i],(n?`${n}.`:"")+i.toString(),s):r[i]=o))}return r}function b1(e){return(...t)=>t.reduce((n,s)=>ru(n,s,"",e),{})}const vg=b1(),x1=c1(()=>{const e=J(new Map),t=J(),n=G(()=>{for(const o of e.value.values())if(o)return!0;return!1}),s=bc({scrollBody:J(!0)});let r=null;const i=()=>{document.body.style.paddingRight="",document.body.style.marginRight="",document.body.style.pointerEvents="",document.documentElement.style.removeProperty("--scrollbar-width"),document.body.style.overflow=t.value??"",rf&&(r==null||r()),t.value=void 0};return tt(n,(o,a)=>{var d;if(!Tn)return;if(!o){a&&i();return}t.value===void 0&&(t.value=document.body.style.overflow);const l=window.innerWidth-document.documentElement.clientWidth,c={padding:l,margin:0},u=(d=s.scrollBody)!=null&&d.value?typeof s.scrollBody.value=="object"?vg({padding:s.scrollBody.value.padding===!0?l:s.scrollBody.value.padding,margin:s.scrollBody.value.margin===!0?l:s.scrollBody.value.margin},c):c:{padding:0,margin:0};l>0&&(document.body.style.paddingRight=typeof u.padding=="number"?`${u.padding}px`:String(u.padding),document.body.style.marginRight=typeof u.margin=="number"?`${u.margin}px`:String(u.margin),document.documentElement.style.setProperty("--scrollbar-width",`${l}px`),document.body.style.overflow="hidden"),rf&&(r=Ho(document,"touchmove",f=>k1(f),{passive:!1})),Dt(()=>{n.value&&(document.body.style.pointerEvents="none",document.body.style.overflow="hidden")})},{immediate:!0,flush:"sync"}),e});function w1(e){const t=Math.random().toString(36).substring(2,7),n=x1();n.value.set(t,e);const s=G({get:()=>n.value.get(t)??!1,set:r=>n.value.set(t,r)});return h1(()=>{n.value.delete(t)}),s}function mg(e){const 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;{const n=e.parentNode;return!(n instanceof Element)||n.tagName==="BODY"?!1:mg(n)}}function k1(e){const t=e||window.event,n=t.target;return n instanceof Element&&mg(n)?!1:t.touches.length>1?!0:(t.preventDefault&&t.cancelable&&t.preventDefault(),!1)}function _g(e){const t=bc({dir:J("ltr")});return G(()=>{var n;return(e==null?void 0:e.value)||((n=t.dir)==null?void 0:n.value)||"ltr"})}function E1(e){const t=On(),n=t==null?void 0:t.type.emits,s={};return n!=null&&n.length||console.warn(`No emitted event found. Please check component: ${t==null?void 0:t.type.__name}`),n==null||n.forEach(r=>{s[vi(vt(r))]=(...i)=>e(r,...i)}),s}let cl=0;function S1(){ln(e=>{if(!Tn)return;const t=document.querySelectorAll("[data-reka-focus-guard]");document.body.insertAdjacentElement("afterbegin",t[0]??of()),document.body.insertAdjacentElement("beforeend",t[1]??of()),cl++,e(()=>{cl===1&&document.querySelectorAll("[data-reka-focus-guard]").forEach(n=>n.remove()),cl--})})}function of(){const 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 ht(){const e=On(),t=J(),n=G(()=>s());Eh(()=>{n.value!==s()&&__(t)});function s(){return t.value&&"$el"in t.value&&["#text","#comment"].includes(t.value.$el.nodeName)?t.value.$el.nextElementSibling:zr(t)}const r=Object.assign({},e.exposed),i={};for(const a in e.props)Object.defineProperty(i,a,{enumerable:!0,configurable:!0,get:()=>e.props[a]});if(Object.keys(r).length>0)for(const a in r)Object.defineProperty(i,a,{enumerable:!0,configurable:!0,get:()=>r[a]});Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=i;function o(a){if(t.value=a,!!a&&(Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>a instanceof Element?a:a.$el}),!(a instanceof Element)&&!Object.hasOwn(a,"$el"))){const l=a.$.exposed,c=Object.assign({},i);for(const u in l)Object.defineProperty(c,u,{enumerable:!0,configurable:!0,get:()=>l[u]});e.exposed=c}}return{forwardRef:o,currentRef:t,currentElement:n}}function Xi(e){const t=On(),n=Object.keys((t==null?void 0:t.type.props)??{}).reduce((r,i)=>{const o=(t==null?void 0:t.type.props[i]).default;return o!==void 0&&(r[i]=o),r},{}),s=k_(e);return G(()=>{const r={},i=(t==null?void 0:t.vnode.props)??{};return Object.keys(i).forEach(o=>{r[vt(o)]=i[o]}),Object.keys({...n,...r}).reduce((o,a)=>(s.value[a]!==void 0&&(o[a]=s.value[a]),o),{})})}function Ss(e,t){const n=Xi(e),s=t?E1(t):{};return G(()=>({...n.value,...s}))}function C1(e,t){const n=p1(!1,300);Ji(()=>{n.value=!1});const s=J(null),r=s1();function i(){s.value=null,n.value=!1}function o(a,l){if(!l)return;const c=a.currentTarget,u={x:a.clientX,y:a.clientY},d=P1(u,c.getBoundingClientRect()),f=A1(u,d,1),p=O1(l.getBoundingClientRect()),g=I1([...f,...p]);s.value=g,n.value=!0}return ln(a=>{if(e.value&&t.value){const l=u=>o(u,t.value),c=u=>o(u,e.value);e.value.addEventListener("pointerleave",l),t.value.addEventListener("pointerleave",c),a(()=>{var u,d;(u=e.value)==null||u.removeEventListener("pointerleave",l),(d=t.value)==null||d.removeEventListener("pointerleave",c)})}}),ln(a=>{var l;if(s.value){const c=u=>{var m,v;if(!s.value||!(u.target instanceof Element))return;const d=u.target,f={x:u.clientX,y:u.clientY},p=((m=e.value)==null?void 0:m.contains(d))||((v=t.value)==null?void 0:v.contains(d)),g=!T1(f,s.value),h=!!d.closest("[data-grace-area-trigger]");p?i():(g||h)&&(i(),r.trigger())};(l=e.value)==null||l.ownerDocument.addEventListener("pointermove",c),a(()=>{var u;return(u=e.value)==null?void 0:u.ownerDocument.removeEventListener("pointermove",c)})}}),{isPointerInTransit:n,onPointerExit:r.on}}function P1(e,t){const n=Math.abs(t.top-e.y),s=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,s,r,i)){case i:return"left";case r:return"right";case n:return"top";case s:return"bottom";default:throw new Error("unreachable")}}function A1(e,t,n=5){const s=[];switch(t){case"top":s.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":s.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":s.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":s.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return s}function O1(e){const{top:t,right:n,bottom:s,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:s},{x:r,y:s}]}function T1(e,t){const{x:n,y:s}=e;let r=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){const a=t[i].x,l=t[i].y,c=t[o].x,u=t[o].y;l>s!=u>s&&n<(c-a)*(s-l)/(u-l)+a&&(r=!r)}return r}function I1(e){const t=e.slice();return t.sort((n,s)=>n.x<s.x?-1:n.x>s.x?1:n.y<s.y?-1:n.y>s.y?1:0),R1(t)}function R1(e){if(e.length<=1)return e.slice();const t=[];for(let s=0;s<e.length;s++){const r=e[s];for(;t.length>=2;){const i=t.at(-1),o=t[t.length-2];if((i.x-o.x)*(r.y-o.y)>=(i.y-o.y)*(r.x-o.x))t.pop();else break}t.push(r)}t.pop();const n=[];for(let s=e.length-1;s>=0;s--){const r=e[s];for(;n.length>=2;){const i=n.at(-1),o=n[n.length-2];if((i.x-o.x)*(r.y-o.y)>=(i.y-o.y)*(r.x-o.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 M1=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},er=new WeakMap,uo=new WeakMap,co={},dl=0,yg=function(e){return e&&(e.host||yg(e.parentNode))},$1=function(e,t){return t.map(function(n){if(e.contains(n))return n;var s=yg(n);return s&&e.contains(s)?s:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},F1=function(e,t,n,s){var r=$1(t,Array.isArray(e)?e:[e]);co[n]||(co[n]=new WeakMap);var i=co[n],o=[],a=new Set,l=new Set(r),c=function(d){!d||a.has(d)||(a.add(d),c(d.parentNode))};r.forEach(c);var u=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(f){if(a.has(f))u(f);else try{var p=f.getAttribute(s),g=p!==null&&p!=="false",h=(er.get(f)||0)+1,m=(i.get(f)||0)+1;er.set(f,h),i.set(f,m),o.push(f),h===1&&g&&uo.set(f,!0),m===1&&f.setAttribute(n,"true"),g||f.setAttribute(s,"true")}catch(v){console.error("aria-hidden: cannot operate on ",f,v)}})};return u(t),a.clear(),dl++,function(){o.forEach(function(d){var f=er.get(d)-1,p=i.get(d)-1;er.set(d,f),i.set(d,p),f||(uo.has(d)||d.removeAttribute(s),uo.delete(d)),p||d.removeAttribute(n)}),dl--,dl||(er=new WeakMap,er=new WeakMap,uo=new WeakMap,co={})}},D1=function(e,t,n){n===void 0&&(n="data-aria-hidden");var s=Array.from(Array.isArray(e)?e:[e]),r=M1(e);return r?(s.push.apply(s,Array.from(r.querySelectorAll("[aria-live], script"))),F1(s,r,n,"aria-hidden")):function(){return null}};function L1(e){let t;tt(()=>zr(e),n=>{let s=!1;try{s=!!(n!=null&&n.closest("[popover]:not(:popover-open)"))}catch{}n&&!s?t=D1(n):t&&t()}),Br(()=>{t&&t()})}function Zi(e,t="reka"){let n;const s=bc({useId:void 0});return s.useId?n=s.useId():n=Xa==null?void 0:Xa(),t?`${t}-${n}`:n}function N1(e){const t=J(),n=G(()=>{var r;return((r=t.value)==null?void 0:r.width)??0}),s=G(()=>{var r;return((r=t.value)==null?void 0:r.height)??0});return qt(()=>{const r=zr(e);if(r){t.value={width:r.offsetWidth,height:r.offsetHeight};const i=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let l,c;if("borderBoxSize"in a){const u=a.borderBoxSize,d=Array.isArray(u)?u[0]:u;l=d.inlineSize,c=d.blockSize}else l=r.offsetWidth,c=r.offsetHeight;t.value={width:l,height:c}});return i.observe(r,{box:"border-box"}),()=>i.unobserve(r)}else t.value=void 0}),{width:n,height:s}}function q1(e,t){const n=J(e);function s(i){return t[n.value][i]??n.value}return{state:n,dispatch:i=>{n.value=s(i)}}}function B1(e,t){var m;const n=J({}),s=J("none"),r=J(e),i=e.value?"mounted":"unmounted";let o;const a=((m=t.value)==null?void 0:m.ownerDocument.defaultView)??_c,{state:l,dispatch:c}=q1(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),u=v=>{var y;if(Tn){const x=new CustomEvent(v,{bubbles:!1,cancelable:!1});(y=t.value)==null||y.dispatchEvent(x)}};tt(e,async(v,y)=>{var k;const x=y!==v;if(await Dt(),x){const O=s.value,q=fo(t.value);v?(c("MOUNT"),u("enter"),q==="none"&&u("after-enter")):q==="none"||q==="undefined"||((k=n.value)==null?void 0:k.display)==="none"?(c("UNMOUNT"),u("leave"),u("after-leave")):y&&O!==q?(c("ANIMATION_OUT"),u("leave")):(c("UNMOUNT"),u("after-leave"))}},{immediate:!0});const d=v=>{const y=fo(t.value),x=y.includes(CSS.escape(v.animationName)),k=l.value==="mounted"?"enter":"leave";if(v.target===t.value&&x&&(u(`after-${k}`),c("ANIMATION_END"),!r.value)){const O=t.value.style.animationFillMode;t.value.style.animationFillMode="forwards",o=a==null?void 0:a.setTimeout(()=>{var q;((q=t.value)==null?void 0:q.style.animationFillMode)==="forwards"&&(t.value.style.animationFillMode=O)})}v.target===t.value&&y==="none"&&c("ANIMATION_END")},f=v=>{v.target===t.value&&(s.value=fo(t.value))},p=tt(t,(v,y)=>{v?(n.value=getComputedStyle(v),v.addEventListener("animationstart",f),v.addEventListener("animationcancel",d),v.addEventListener("animationend",d)):(c("ANIMATION_END"),o!==void 0&&(a==null||a.clearTimeout(o)),y==null||y.removeEventListener("animationstart",f),y==null||y.removeEventListener("animationcancel",d),y==null||y.removeEventListener("animationend",d))},{immediate:!0}),g=tt(l,()=>{const v=fo(t.value);s.value=l.value==="mounted"?v:"none"});return Br(()=>{p(),g()}),{isPresent:G(()=>["mounted","unmountSuspended"].includes(l.value))}}function fo(e){return e&&getComputedStyle(e).animationName||"none"}var xc=ae({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(e,{slots:t,expose:n}){var c;const{present:s,forceMount:r}=ms(e),i=J(),{isPresent:o}=B1(s,i);n({present:o});let a=t.default({present:o.value});a=yc(a||[]);const l=On();if(a&&(a==null?void 0:a.length)>1){const u=(c=l==null?void 0:l.parent)!=null&&c.type.name?`<${l.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${u}\` 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(d=>` - ${d}`).join(`
246
+ `)].join(`
247
+ `))}return()=>r.value||s.value||o.value?rn(t.default({present:o.value})[0],{ref:u=>{const d=zr(u);return typeof(d==null?void 0:d.hasAttribute)>"u"||(d!=null&&d.hasAttribute("data-reka-popper-content-wrapper")?i.value=d.firstElementChild:i.value=d),d}}):null}});const iu=ae({name:"PrimitiveSlot",inheritAttrs:!1,setup(e,{attrs:t,slots:n}){return()=>{var l;if(!n.default)return null;const s=yc(n.default()),r=s.findIndex(c=>c.type!==An);if(r===-1)return s;const i=s[r];(l=i.props)==null||delete l.ref;const o=i.props?ut(t,i.props):t,a=Ws({...i,props:{}},o);return s.length===1?a:(s[r]=a,s)}}}),z1=["area","img","input"],At=ae({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(e,{attrs:t,slots:n}){const s=e.asChild?"template":e.as;return typeof s=="string"&&z1.includes(s)?()=>rn(s,t):s!=="template"?()=>rn(e.as,t,{default:n.default}):()=>rn(iu,t,{default:n.default})}});function af(){const e=J(),t=G(()=>{var n,s;return["#text","#comment"].includes((n=e.value)==null?void 0:n.$el.nodeName)?(s=e.value)==null?void 0:s.$el.nextElementSibling:zr(e)});return{primitiveElement:e,currentElement:t}}const j1="dismissableLayer.pointerDownOutside",H1="dismissableLayer.focusOutside";function bg(e,t){if(!(t instanceof Element))return!1;const n=t.closest("[data-dismissable-layer]"),s=e.dataset.dismissableLayer===""?e:e.querySelector("[data-dismissable-layer]"),r=Array.from(e.ownerDocument.querySelectorAll("[data-dismissable-layer]"));return!!(n&&(s===n||r.indexOf(s)<r.indexOf(n)))}function V1(e,t,n=!0){var o;const s=((o=t==null?void 0:t.value)==null?void 0:o.ownerDocument)??(globalThis==null?void 0:globalThis.document),r=J(!1),i=J(()=>{});return ln(a=>{if(!Tn||!Mt(n))return;const l=async u=>{const d=u.target;if(!(!(t!=null&&t.value)||!d)){if(bg(t.value,d)){r.value=!1;return}if(u.target&&!r.value){let g=function(){hg(j1,e,p)};var f=g;const p={originalEvent:u};u.pointerType==="touch"?(s.removeEventListener("click",i.value),i.value=g,s.addEventListener("click",i.value,{once:!0})):g()}else s.removeEventListener("click",i.value);r.value=!1}},c=window.setTimeout(()=>{s.addEventListener("pointerdown",l)},0);a(()=>{window.clearTimeout(c),s.removeEventListener("pointerdown",l),s.removeEventListener("click",i.value)})}),{onPointerDownCapture:()=>{Mt(n)&&(r.value=!0)}}}function U1(e,t,n=!0){var i;const s=((i=t==null?void 0:t.value)==null?void 0:i.ownerDocument)??(globalThis==null?void 0:globalThis.document),r=J(!1);return ln(o=>{if(!Tn||!Mt(n))return;const a=async l=>{if(!(t!=null&&t.value))return;await Dt(),await Dt();const c=l.target;!t.value||!c||bg(t.value,c)||l.target&&!r.value&&hg(H1,e,{originalEvent:l})};s.addEventListener("focusin",a),o(()=>s.removeEventListener("focusin",a))}),{onFocusCapture:()=>{Mt(n)&&(r.value=!0)},onBlurCapture:()=>{Mt(n)&&(r.value=!1)}}}const zt=Zn({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,originalBodyPointerEvents:void 0,branches:new Set});var W1=ae({__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}){const n=e,s=t,{forwardRef:r,currentElement:i}=ht(),o=G(()=>{var p;return((p=i.value)==null?void 0:p.ownerDocument)??globalThis.document}),a=G(()=>zt.layersRoot),l=G(()=>i.value?Array.from(a.value).indexOf(i.value):-1),c=G(()=>zt.layersWithOutsidePointerEventsDisabled.size>0),u=G(()=>{const p=Array.from(a.value),[g]=[...zt.layersWithOutsidePointerEventsDisabled].slice(-1),h=p.indexOf(g);return l.value>=h}),d=V1(async p=>{const g=[...zt.branches].some(h=>h==null?void 0:h.contains(p.target));!u.value||g||(s("pointerDownOutside",p),s("interactOutside",p),await Dt(),p.defaultPrevented||s("dismiss"))},i),f=U1(p=>{[...zt.branches].some(h=>h==null?void 0:h.contains(p.target))||(s("focusOutside",p),s("interactOutside",p),p.defaultPrevented||s("dismiss"))},i);return _1("Escape",p=>{l.value===a.value.size-1&&(s("escapeKeyDown",p),p.defaultPrevented||s("dismiss"))}),tt([i,()=>n.disableOutsidePointerEvents],([p,g],h,m)=>{p&&(g&&(zt.layersWithOutsidePointerEventsDisabled.size===0&&(zt.originalBodyPointerEvents=o.value.body.style.pointerEvents,o.value.body.style.pointerEvents="none"),zt.layersWithOutsidePointerEventsDisabled.add(p),m(()=>{zt.layersWithOutsidePointerEventsDisabled.delete(p),zt.layersWithOutsidePointerEventsDisabled.size===0&&!t1(zt.originalBodyPointerEvents)&&(o.value.body.style.pointerEvents=zt.originalBodyPointerEvents)})),a.value.add(p))},{immediate:!0}),ln(p=>{p(()=>{i.value&&(a.value.delete(i.value),zt.layersWithOutsidePointerEventsDisabled.delete(i.value))})}),(p,g)=>(P(),ue(_(At),{ref:_(r),"as-child":p.asChild,as:p.as,"data-dismissable-layer":"",style:ks({pointerEvents:c.value?u.value?"auto":"none":void 0}),onFocusCapture:_(f).onFocusCapture,onBlurCapture:_(f).onBlurCapture,onPointerdownCapture:_(d).onPointerDownCapture},{default:D(()=>[ye(p.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}}),xg=W1;const G1=r1(()=>J([]));function K1(){const e=G1();return{add(t){const n=e.value[0];t!==n&&(n==null||n.pause()),e.value=lf(e.value,t),e.value.unshift(t)},remove(t){var n;e.value=lf(e.value,t),(n=e.value[0])==null||n.resume()}}}function lf(e,t){const n=[...e],s=n.indexOf(t);return s!==-1&&n.splice(s,1),n}const fl="focusScope.autoFocusOnMount",pl="focusScope.autoFocusOnUnmount",uf={bubbles:!1,cancelable:!0};function Y1(e,{select:t=!1}={}){const n=gs();for(const s of e)if(cs(s,{select:t}),gs()!==n)return!0}function J1(e){const t=wg(e),n=cf(t,e),s=cf(t.reverse(),e);return[n,s]}function wg(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const r=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||r?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function cf(e,t){for(const n of e)if(!X1(n,{upTo:t}))return n}function X1(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 Z1(e){return e instanceof HTMLInputElement&&"select"in e}function cs(e,{select:t=!1}={}){if(e&&e.focus){const n=gs();e.focus({preventScroll:!0}),e!==n&&Z1(e)&&t&&e.select()}}var Q1=ae({__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}){const n=e,s=t,{currentRef:r,currentElement:i}=ht(),o=J(null),a=K1(),l=Zn({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});ln(u=>{if(!Tn)return;const d=i.value;if(!n.trapped)return;function f(m){if(l.paused||!d)return;const v=m.target;d.contains(v)?o.value=v:cs(o.value,{select:!0})}function p(m){if(l.paused||!d)return;const v=m.relatedTarget;v!==null&&(d.contains(v)||cs(o.value,{select:!0}))}function g(m){const v=o.value;if(v===null||!m.some(k=>k.removedNodes.length>0))return;d.contains(v)||cs(d)}document.addEventListener("focusin",f),document.addEventListener("focusout",p);const h=new MutationObserver(g);d&&h.observe(d,{childList:!0,subtree:!0}),u(()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",p),h.disconnect()})}),ln(async u=>{const d=i.value;if(await Dt(),!d)return;a.add(l);const f=gs();if(!d.contains(f)){const g=new CustomEvent(fl,uf);d.addEventListener(fl,h=>s("mountAutoFocus",h)),d.dispatchEvent(g),g.defaultPrevented||(Y1(wg(d),{select:!0}),gs()===f&&cs(d))}u(()=>{d.removeEventListener(fl,m=>s("mountAutoFocus",m));const g=new CustomEvent(pl,uf),h=m=>{s("unmountAutoFocus",m)};d.addEventListener(pl,h),d.dispatchEvent(g),d.setAttribute("data-focus-scope-unmounting",""),setTimeout(()=>{g.defaultPrevented||cs(f??document.body,{select:!0}),d.removeEventListener(pl,h),a.remove(l),d.removeAttribute("data-focus-scope-unmounting")},0)})});function c(u){if(!n.loop&&!n.trapped||l.paused)return;const d=u.key==="Tab"&&!u.altKey&&!u.ctrlKey&&!u.metaKey,f=gs();if(d&&f){const p=u.currentTarget,[g,h]=J1(p);g&&h?!u.shiftKey&&f===h?(u.preventDefault(),n.loop&&cs(g,{select:!0})):u.shiftKey&&f===g&&(u.preventDefault(),n.loop&&cs(h,{select:!0})):f===p&&u.preventDefault()}}return(u,d)=>(P(),ue(_(At),{ref_key:"currentRef",ref:r,tabindex:"-1","as-child":u.asChild,as:u.as,onKeydown:c},{default:D(()=>[ye(u.$slots,"default")]),_:3},8,["as-child","as"]))}}),ex=Q1,tx=ae({__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){const t=v1();return(n,s)=>_(t)||n.forceMount?(P(),ue(bh,{key:0,to:n.to,disabled:n.disabled,defer:n.defer},[ye(n.$slots,"default")],8,["to","disabled","defer"])):_e("v-if",!0)}}),kg=tx;const df="data-reka-collection-item";function Eg(e={}){const{key:t="",isProvider:n=!1}=e,s=`${t}CollectionProvider`;let r;n?(r={collectionRef:J(),itemMap:J(new Map)},br(s,r)):r=Kt(s);const i=(u=!1)=>{const d=r.collectionRef.value;if(!d)return[];const f=Array.from(d.querySelectorAll(`[${df}]`)),g=Array.from(r.itemMap.value.values()).sort((h,m)=>f.indexOf(h.ref)-f.indexOf(m.ref));return u?g:g.filter(h=>h.ref.dataset.disabled!=="")},o=ae({name:"CollectionSlot",inheritAttrs:!1,setup(u,{slots:d,attrs:f}){const{primitiveElement:p,currentElement:g}=af();return tt(g,()=>{r.collectionRef.value=g.value}),()=>rn(iu,{ref:p,...f},d)}}),a=ae({name:"CollectionItem",inheritAttrs:!1,props:{value:{validator:()=>!0}},setup(u,{slots:d,attrs:f}){const{primitiveElement:p,currentElement:g}=af();return ln(h=>{if(g.value){const m=ah(g.value);r.itemMap.value.set(m,{ref:g.value,value:u.value}),h(()=>r.itemMap.value.delete(m))}}),()=>rn(iu,{...f,[df]:"",ref:p},d)}}),l=G(()=>Array.from(r.itemMap.value.values())),c=G(()=>r.itemMap.value.size);return{getItems:i,reactiveItems:l,itemMapSize:c,CollectionSlot:o,CollectionItem:a}}var nx=ae({__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(t,n)=>(P(),ue(_(At),{as:t.as,"as-child":t.asChild,"aria-hidden":t.feature==="focusable"?"true":void 0,"data-hidden":t.feature==="fully-hidden"?"":void 0,tabindex:t.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:D(()=>[ye(t.$slots,"default")]),_:3},8,["as","as-child","aria-hidden","data-hidden","tabindex"]))}}),sx=nx;const rx="rovingFocusGroup.onEntryFocus",ix={bubbles:!1,cancelable:!0},ox={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ax(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function lx(e,t,n){const s=ax(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(s))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(s)))return ox[s]}function Sg(e,t=!1){const n=gs();for(const s of e)if(s===n||(s.focus({preventScroll:t}),gs()!==n))return}function ux(e,t){return e.map((n,s)=>e[(t+s)%e.length])}const[Cg,cx]=Es("PopperRoot");var dx=ae({inheritAttrs:!1,__name:"PopperRoot",setup(e){const t=J();return cx({anchor:t,onAnchorChange:n=>t.value=n}),(n,s)=>ye(n.$slots,"default")}}),Pg=dx,fx=ae({__name:"PopperAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{forwardRef:n,currentElement:s}=ht(),r=Cg();return mh(()=>{r.onAnchorChange(t.reference??s.value)}),(i,o)=>(P(),ue(_(At),{ref:_(n),as:i.as,"as-child":i.asChild},{default:D(()=>[ye(i.$slots,"default")]),_:3},8,["as","as-child"]))}}),Ag=fx;function px(e){return e!==null}function hx(e){return{name:"transformOrigin",options:e,fn(t){var m,v,y;const{placement:n,rects:s,middlewareData:r}=t,o=((m=r.arrow)==null?void 0:m.centerOffset)!==0,a=o?0:e.arrowWidth,l=o?0:e.arrowHeight,[c,u]=ou(n),d={start:"0%",center:"50%",end:"100%"}[u],f=(((v=r.arrow)==null?void 0:v.x)??0)+a/2,p=(((y=r.arrow)==null?void 0:y.y)??0)+l/2;let g="",h="";return c==="bottom"?(g=o?d:`${f}px`,h=`${-l}px`):c==="top"?(g=o?d:`${f}px`,h=`${s.floating.height+l}px`):c==="right"?(g=`${-l}px`,h=o?d:`${p}px`):c==="left"&&(g=`${s.floating.width+l}px`,h=o?d:`${p}px`),{data:{x:g,y:h}}}}}function ou(e){const[t,n="center"]=e.split("-");return[t,n]}const gx=["top","right","bottom","left"],ys=Math.min,Ht=Math.max,Vo=Math.round,po=Math.floor,Cn=e=>({x:e,y:e}),vx={left:"right",right:"left",bottom:"top",top:"bottom"};function au(e,t,n){return Ht(e,ys(t,n))}function ts(e,t){return typeof e=="function"?e(t):e}function ns(e){return e.split("-")[0]}function jr(e){return e.split("-")[1]}function wc(e){return e==="x"?"y":"x"}function kc(e){return e==="y"?"height":"width"}function kn(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Ec(e){return wc(kn(e))}function mx(e,t,n){n===void 0&&(n=!1);const s=jr(e),r=Ec(e),i=kc(r);let o=r==="x"?s===(n?"end":"start")?"right":"left":s==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=Uo(o)),[o,Uo(o)]}function _x(e){const t=Uo(e);return[lu(e),t,lu(t)]}function lu(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const ff=["left","right"],pf=["right","left"],yx=["top","bottom"],bx=["bottom","top"];function xx(e,t,n){switch(e){case"top":case"bottom":return n?t?pf:ff:t?ff:pf;case"left":case"right":return t?yx:bx;default:return[]}}function wx(e,t,n,s){const r=jr(e);let i=xx(ns(e),n==="start",s);return r&&(i=i.map(o=>o+"-"+r),t&&(i=i.concat(i.map(lu)))),i}function Uo(e){const t=ns(e);return vx[t]+e.slice(t.length)}function kx(e){return{top:0,right:0,bottom:0,left:0,...e}}function Og(e){return typeof e!="number"?kx(e):{top:e,right:e,bottom:e,left:e}}function Wo(e){const{x:t,y:n,width:s,height:r}=e;return{width:s,height:r,top:n,left:t,right:t+s,bottom:n+r,x:t,y:n}}function hf(e,t,n){let{reference:s,floating:r}=e;const i=kn(t),o=Ec(t),a=kc(o),l=ns(t),c=i==="y",u=s.x+s.width/2-r.width/2,d=s.y+s.height/2-r.height/2,f=s[a]/2-r[a]/2;let p;switch(l){case"top":p={x:u,y:s.y-r.height};break;case"bottom":p={x:u,y:s.y+s.height};break;case"right":p={x:s.x+s.width,y:d};break;case"left":p={x:s.x-r.width,y:d};break;default:p={x:s.x,y:s.y}}switch(jr(t)){case"start":p[o]-=f*(n&&c?-1:1);break;case"end":p[o]+=f*(n&&c?-1:1);break}return p}async function Ex(e,t){var n;t===void 0&&(t={});const{x:s,y:r,platform:i,rects:o,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=ts(t,e),g=Og(p),m=a[f?d==="floating"?"reference":"floating":d],v=Wo(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(m)))==null||n?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),y=d==="floating"?{x:s,y:r,width:o.floating.width,height:o.floating.height}:o.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),k=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},O=Wo(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:x,strategy:l}):y);return{top:(v.top-O.top+g.top)/k.y,bottom:(O.bottom-v.bottom+g.bottom)/k.y,left:(v.left-O.left+g.left)/k.x,right:(O.right-v.right+g.right)/k.x}}const Sx=50,Cx=async(e,t,n)=>{const{placement:s="bottom",strategy:r="absolute",middleware:i=[],platform:o}=n,a=o.detectOverflow?o:{...o,detectOverflow:Ex},l=await(o.isRTL==null?void 0:o.isRTL(t));let c=await o.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:d}=hf(c,s,l),f=s,p=0;const g={};for(let h=0;h<i.length;h++){const m=i[h];if(!m)continue;const{name:v,fn:y}=m,{x,y:k,data:O,reset:q}=await y({x:u,y:d,initialPlacement:s,placement:f,strategy:r,middlewareData:g,rects:c,platform:a,elements:{reference:e,floating:t}});u=x??u,d=k??d,g[v]={...g[v],...O},q&&p<Sx&&(p++,typeof q=="object"&&(q.placement&&(f=q.placement),q.rects&&(c=q.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:r}):q.rects),{x:u,y:d}=hf(c,f,l)),h=-1)}return{x:u,y:d,placement:f,strategy:r,middlewareData:g}},Px=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:s,placement:r,rects:i,platform:o,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=ts(e,t)||{};if(c==null)return{};const d=Og(u),f={x:n,y:s},p=Ec(r),g=kc(p),h=await o.getDimensions(c),m=p==="y",v=m?"top":"left",y=m?"bottom":"right",x=m?"clientHeight":"clientWidth",k=i.reference[g]+i.reference[p]-f[p]-i.floating[g],O=f[p]-i.reference[p],q=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let E=q?q[x]:0;(!E||!await(o.isElement==null?void 0:o.isElement(q)))&&(E=a.floating[x]||i.floating[g]);const R=k/2-O/2,T=E/2-h[g]/2-1,K=ys(d[v],T),U=ys(d[y],T),C=K,F=E-h[g]-U,V=E/2-h[g]/2+R,X=au(C,V,F),$=!l.arrow&&jr(r)!=null&&V!==X&&i.reference[g]/2-(V<C?K:U)-h[g]/2<0,A=$?V<C?V-C:V-F:0;return{[p]:f[p]+A,data:{[p]:X,centerOffset:V-X-A,...$&&{alignmentOffset:A}},reset:$}}}),Ax=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,s;const{placement:r,middlewareData:i,rects:o,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:h=!0,...m}=ts(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=ns(r),y=kn(a),x=ns(a)===a,k=await(l.isRTL==null?void 0:l.isRTL(c.floating)),O=f||(x||!h?[Uo(a)]:_x(a)),q=g!=="none";!f&&q&&O.push(...wx(a,h,g,k));const E=[a,...O],R=await l.detectOverflow(t,m),T=[];let K=((s=i.flip)==null?void 0:s.overflows)||[];if(u&&T.push(R[v]),d){const V=mx(r,o,k);T.push(R[V[0]],R[V[1]])}if(K=[...K,{placement:r,overflows:T}],!T.every(V=>V<=0)){var U,C;const V=(((U=i.flip)==null?void 0:U.index)||0)+1,X=E[V];if(X&&(!(d==="alignment"?y!==kn(X):!1)||K.every(L=>kn(L.placement)===y?L.overflows[0]>0:!0)))return{data:{index:V,overflows:K},reset:{placement:X}};let $=(C=K.filter(A=>A.overflows[0]<=0).sort((A,L)=>A.overflows[1]-L.overflows[1])[0])==null?void 0:C.placement;if(!$)switch(p){case"bestFit":{var F;const A=(F=K.filter(L=>{if(q){const de=kn(L.placement);return de===y||de==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(de=>de>0).reduce((de,qe)=>de+qe,0)]).sort((L,de)=>L[1]-de[1])[0])==null?void 0:F[0];A&&($=A);break}case"initialPlacement":$=a;break}if(r!==$)return{reset:{placement:$}}}return{}}}};function gf(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function vf(e){return gx.some(t=>e[t]>=0)}const Ox=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:s}=t,{strategy:r="referenceHidden",...i}=ts(e,t);switch(r){case"referenceHidden":{const o=await s.detectOverflow(t,{...i,elementContext:"reference"}),a=gf(o,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:vf(a)}}}case"escaped":{const o=await s.detectOverflow(t,{...i,altBoundary:!0}),a=gf(o,n.floating);return{data:{escapedOffsets:a,escaped:vf(a)}}}default:return{}}}}},Tg=new Set(["left","top"]);async function Tx(e,t){const{placement:n,platform:s,elements:r}=e,i=await(s.isRTL==null?void 0:s.isRTL(r.floating)),o=ns(n),a=jr(n),l=kn(n)==="y",c=Tg.has(o)?-1:1,u=i&&l?-1:1,d=ts(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof g=="number"&&(p=a==="end"?g*-1:g),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}const Ix=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,s;const{x:r,y:i,placement:o,middlewareData:a}=t,l=await Tx(t,e);return o===((n=a.offset)==null?void 0:n.placement)&&(s=a.arrow)!=null&&s.alignmentOffset?{}:{x:r+l.x,y:i+l.y,data:{...l,placement:o}}}}},Rx=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:s,placement:r,platform:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:l={fn:v=>{let{x:y,y:x}=v;return{x:y,y:x}}},...c}=ts(e,t),u={x:n,y:s},d=await i.detectOverflow(t,c),f=kn(ns(r)),p=wc(f);let g=u[p],h=u[f];if(o){const v=p==="y"?"top":"left",y=p==="y"?"bottom":"right",x=g+d[v],k=g-d[y];g=au(x,g,k)}if(a){const v=f==="y"?"top":"left",y=f==="y"?"bottom":"right",x=h+d[v],k=h-d[y];h=au(x,h,k)}const m=l.fn({...t,[p]:g,[f]:h});return{...m,data:{x:m.x-n,y:m.y-s,enabled:{[p]:o,[f]:a}}}}}},Mx=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:s,placement:r,rects:i,middlewareData:o}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=ts(e,t),u={x:n,y:s},d=kn(r),f=wc(d);let p=u[f],g=u[d];const h=ts(a,t),m=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){const x=f==="y"?"height":"width",k=i.reference[f]-i.floating[x]+m.mainAxis,O=i.reference[f]+i.reference[x]-m.mainAxis;p<k?p=k:p>O&&(p=O)}if(c){var v,y;const x=f==="y"?"width":"height",k=Tg.has(ns(r)),O=i.reference[d]-i.floating[x]+(k&&((v=o.offset)==null?void 0:v[d])||0)+(k?0:m.crossAxis),q=i.reference[d]+i.reference[x]+(k?0:((y=o.offset)==null?void 0:y[d])||0)-(k?m.crossAxis:0);g<O?g=O:g>q&&(g=q)}return{[f]:p,[d]:g}}}},$x=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,s;const{placement:r,rects:i,platform:o,elements:a}=t,{apply:l=()=>{},...c}=ts(e,t),u=await o.detectOverflow(t,c),d=ns(r),f=jr(r),p=kn(r)==="y",{width:g,height:h}=i.floating;let m,v;d==="top"||d==="bottom"?(m=d,v=f===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(v=d,m=f==="end"?"top":"bottom");const y=h-u.top-u.bottom,x=g-u.left-u.right,k=ys(h-u[m],y),O=ys(g-u[v],x),q=!t.middlewareData.shift;let E=k,R=O;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(R=x),(s=t.middlewareData.shift)!=null&&s.enabled.y&&(E=y),q&&!f){const K=Ht(u.left,0),U=Ht(u.right,0),C=Ht(u.top,0),F=Ht(u.bottom,0);p?R=g-2*(K!==0||U!==0?K+U:Ht(u.left,u.right)):E=h-2*(C!==0||F!==0?C+F:Ht(u.top,u.bottom))}await l({...t,availableWidth:R,availableHeight:E});const T=await o.getDimensions(a.floating);return g!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function Da(){return typeof window<"u"}function Zs(e){return Sc(e)?(e.nodeName||"").toLowerCase():"#document"}function Yt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function In(e){var t;return(t=(Sc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Sc(e){return Da()?e instanceof Node||e instanceof Yt(e).Node:!1}function cn(e){return Da()?e instanceof Element||e instanceof Yt(e).Element:!1}function is(e){return Da()?e instanceof HTMLElement||e instanceof Yt(e).HTMLElement:!1}function mf(e){return!Da()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Yt(e).ShadowRoot}function Qi(e){const{overflow:t,overflowX:n,overflowY:s,display:r}=dn(e);return/auto|scroll|overlay|hidden|clip/.test(t+s+n)&&r!=="inline"&&r!=="contents"}function Fx(e){return/^(table|td|th)$/.test(Zs(e))}function La(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Dx=/transform|translate|scale|rotate|perspective|filter/,Lx=/paint|layout|strict|content/,As=e=>!!e&&e!=="none";let hl;function Cc(e){const t=cn(e)?dn(e):e;return As(t.transform)||As(t.translate)||As(t.scale)||As(t.rotate)||As(t.perspective)||!Pc()&&(As(t.backdropFilter)||As(t.filter))||Dx.test(t.willChange||"")||Lx.test(t.contain||"")}function Nx(e){let t=bs(e);for(;is(t)&&!Ir(t);){if(Cc(t))return t;if(La(t))return null;t=bs(t)}return null}function Pc(){return hl==null&&(hl=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),hl}function Ir(e){return/^(html|body|#document)$/.test(Zs(e))}function dn(e){return Yt(e).getComputedStyle(e)}function Na(e){return cn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function bs(e){if(Zs(e)==="html")return e;const t=e.assignedSlot||e.parentNode||mf(e)&&e.host||In(e);return mf(t)?t.host:t}function Ig(e){const t=bs(e);return Ir(t)?e.ownerDocument?e.ownerDocument.body:e.body:is(t)&&Qi(t)?t:Ig(t)}function Li(e,t,n){var s;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=Ig(e),i=r===((s=e.ownerDocument)==null?void 0:s.body),o=Yt(r);if(i){const a=uu(o);return t.concat(o,o.visualViewport||[],Qi(r)?r:[],a&&n?Li(a):[])}else return t.concat(r,Li(r,[],n))}function uu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Rg(e){const t=dn(e);let n=parseFloat(t.width)||0,s=parseFloat(t.height)||0;const r=is(e),i=r?e.offsetWidth:n,o=r?e.offsetHeight:s,a=Vo(n)!==i||Vo(s)!==o;return a&&(n=i,s=o),{width:n,height:s,$:a}}function Ac(e){return cn(e)?e:e.contextElement}function kr(e){const t=Ac(e);if(!is(t))return Cn(1);const n=t.getBoundingClientRect(),{width:s,height:r,$:i}=Rg(t);let o=(i?Vo(n.width):n.width)/s,a=(i?Vo(n.height):n.height)/r;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const qx=Cn(0);function Mg(e){const t=Yt(e);return!Pc()||!t.visualViewport?qx:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Bx(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Yt(e)?!1:t}function Gs(e,t,n,s){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=Ac(e);let o=Cn(1);t&&(s?cn(s)&&(o=kr(s)):o=kr(e));const a=Bx(i,n,s)?Mg(i):Cn(0);let l=(r.left+a.x)/o.x,c=(r.top+a.y)/o.y,u=r.width/o.x,d=r.height/o.y;if(i){const f=Yt(i),p=s&&cn(s)?Yt(s):s;let g=f,h=uu(g);for(;h&&s&&p!==g;){const m=kr(h),v=h.getBoundingClientRect(),y=dn(h),x=v.left+(h.clientLeft+parseFloat(y.paddingLeft))*m.x,k=v.top+(h.clientTop+parseFloat(y.paddingTop))*m.y;l*=m.x,c*=m.y,u*=m.x,d*=m.y,l+=x,c+=k,g=Yt(h),h=uu(g)}}return Wo({width:u,height:d,x:l,y:c})}function qa(e,t){const n=Na(e).scrollLeft;return t?t.left+n:Gs(In(e)).left+n}function $g(e,t){const n=e.getBoundingClientRect(),s=n.left+t.scrollLeft-qa(e,n),r=n.top+t.scrollTop;return{x:s,y:r}}function zx(e){let{elements:t,rect:n,offsetParent:s,strategy:r}=e;const i=r==="fixed",o=In(s),a=t?La(t.floating):!1;if(s===o||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Cn(1);const u=Cn(0),d=is(s);if((d||!d&&!i)&&((Zs(s)!=="body"||Qi(o))&&(l=Na(s)),d)){const p=Gs(s);c=kr(s),u.x=p.x+s.clientLeft,u.y=p.y+s.clientTop}const f=o&&!d&&!i?$g(o,l):Cn(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}}function jx(e){return Array.from(e.getClientRects())}function Hx(e){const t=In(e),n=Na(e),s=e.ownerDocument.body,r=Ht(t.scrollWidth,t.clientWidth,s.scrollWidth,s.clientWidth),i=Ht(t.scrollHeight,t.clientHeight,s.scrollHeight,s.clientHeight);let o=-n.scrollLeft+qa(e);const a=-n.scrollTop;return dn(s).direction==="rtl"&&(o+=Ht(t.clientWidth,s.clientWidth)-r),{width:r,height:i,x:o,y:a}}const _f=25;function Vx(e,t){const n=Yt(e),s=In(e),r=n.visualViewport;let i=s.clientWidth,o=s.clientHeight,a=0,l=0;if(r){i=r.width,o=r.height;const u=Pc();(!u||u&&t==="fixed")&&(a=r.offsetLeft,l=r.offsetTop)}const c=qa(s);if(c<=0){const u=s.ownerDocument,d=u.body,f=getComputedStyle(d),p=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,g=Math.abs(s.clientWidth-d.clientWidth-p);g<=_f&&(i-=g)}else c<=_f&&(i+=c);return{width:i,height:o,x:a,y:l}}function Ux(e,t){const n=Gs(e,!0,t==="fixed"),s=n.top+e.clientTop,r=n.left+e.clientLeft,i=is(e)?kr(e):Cn(1),o=e.clientWidth*i.x,a=e.clientHeight*i.y,l=r*i.x,c=s*i.y;return{width:o,height:a,x:l,y:c}}function yf(e,t,n){let s;if(t==="viewport")s=Vx(e,n);else if(t==="document")s=Hx(In(e));else if(cn(t))s=Ux(t,n);else{const r=Mg(e);s={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return Wo(s)}function Fg(e,t){const n=bs(e);return n===t||!cn(n)||Ir(n)?!1:dn(n).position==="fixed"||Fg(n,t)}function Wx(e,t){const n=t.get(e);if(n)return n;let s=Li(e,[],!1).filter(a=>cn(a)&&Zs(a)!=="body"),r=null;const i=dn(e).position==="fixed";let o=i?bs(e):e;for(;cn(o)&&!Ir(o);){const a=dn(o),l=Cc(o);!l&&a.position==="fixed"&&(r=null),(i?!l&&!r:!l&&a.position==="static"&&!!r&&(r.position==="absolute"||r.position==="fixed")||Qi(o)&&!l&&Fg(e,o))?s=s.filter(u=>u!==o):r=a,o=bs(o)}return t.set(e,s),s}function Gx(e){let{element:t,boundary:n,rootBoundary:s,strategy:r}=e;const o=[...n==="clippingAncestors"?La(t)?[]:Wx(t,this._c):[].concat(n),s],a=yf(t,o[0],r);let l=a.top,c=a.right,u=a.bottom,d=a.left;for(let f=1;f<o.length;f++){const p=yf(t,o[f],r);l=Ht(p.top,l),c=ys(p.right,c),u=ys(p.bottom,u),d=Ht(p.left,d)}return{width:c-d,height:u-l,x:d,y:l}}function Kx(e){const{width:t,height:n}=Rg(e);return{width:t,height:n}}function Yx(e,t,n){const s=is(t),r=In(t),i=n==="fixed",o=Gs(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Cn(0);function c(){l.x=qa(r)}if(s||!s&&!i)if((Zs(t)!=="body"||Qi(r))&&(a=Na(t)),s){const p=Gs(t,!0,i,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else r&&c();i&&!s&&r&&c();const u=r&&!s&&!i?$g(r,a):Cn(0),d=o.left+a.scrollLeft-l.x-u.x,f=o.top+a.scrollTop-l.y-u.y;return{x:d,y:f,width:o.width,height:o.height}}function gl(e){return dn(e).position==="static"}function bf(e,t){if(!is(e)||dn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return In(e)===n&&(n=n.ownerDocument.body),n}function Dg(e,t){const n=Yt(e);if(La(e))return n;if(!is(e)){let r=bs(e);for(;r&&!Ir(r);){if(cn(r)&&!gl(r))return r;r=bs(r)}return n}let s=bf(e,t);for(;s&&Fx(s)&&gl(s);)s=bf(s,t);return s&&Ir(s)&&gl(s)&&!Cc(s)?n:s||Nx(e)||n}const Jx=async function(e){const t=this.getOffsetParent||Dg,n=this.getDimensions,s=await n(e.floating);return{reference:Yx(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function Xx(e){return dn(e).direction==="rtl"}const Zx={convertOffsetParentRelativeRectToViewportRelativeRect:zx,getDocumentElement:In,getClippingRect:Gx,getOffsetParent:Dg,getElementRects:Jx,getClientRects:jx,getDimensions:Kx,getScale:kr,isElement:cn,isRTL:Xx};function Lg(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Qx(e,t){let n=null,s;const r=In(e);function i(){var a;clearTimeout(s),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(a||t(),!f||!p)return;const g=po(d),h=po(r.clientWidth-(u+f)),m=po(r.clientHeight-(d+p)),v=po(u),x={rootMargin:-g+"px "+-h+"px "+-m+"px "+-v+"px",threshold:Ht(0,ys(1,l))||1};let k=!0;function O(q){const E=q[0].intersectionRatio;if(E!==l){if(!k)return o();E?o(!1,E):s=setTimeout(()=>{o(!1,1e-7)},1e3)}E===1&&!Lg(c,e.getBoundingClientRect())&&o(),k=!1}try{n=new IntersectionObserver(O,{...x,root:r.ownerDocument})}catch{n=new IntersectionObserver(O,x)}n.observe(e)}return o(!0),i}function ew(e,t,n,s){s===void 0&&(s={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=s,c=Ac(e),u=r||i?[...c?Li(c):[],...t?Li(t):[]]:[];u.forEach(v=>{r&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=c&&a?Qx(c,n):null;let f=-1,p=null;o&&(p=new ResizeObserver(v=>{let[y]=v;y&&y.target===c&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),n()}),c&&!l&&p.observe(c),t&&p.observe(t));let g,h=l?Gs(e):null;l&&m();function m(){const v=Gs(e);h&&!Lg(h,v)&&n(),h=v,g=requestAnimationFrame(m)}return n(),()=>{var v;u.forEach(y=>{r&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),d==null||d(),(v=p)==null||v.disconnect(),p=null,l&&cancelAnimationFrame(g)}}const tw=Ix,nw=Rx,xf=Ax,sw=$x,rw=Ox,iw=Px,ow=Mx,aw=(e,t,n)=>{const s=new Map,r={platform:Zx,...n},i={...r.platform,_c:s};return Cx(e,t,{...r,platform:i})};function lw(e){return e!=null&&typeof e=="object"&&"$el"in e}function cu(e){if(lw(e)){const t=e.$el;return Sc(t)&&Zs(t)==="#comment"?null:t}return e}function ur(e){return typeof e=="function"?e():_(e)}function uw(e){return{name:"arrow",options:e,fn(t){const n=cu(ur(e.element));return n==null?{}:iw({element:n,padding:e.padding}).fn(t)}}}function Ng(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function wf(e,t){const n=Ng(e);return Math.round(t*n)/n}function cw(e,t,n){n===void 0&&(n={});const s=n.whileElementsMounted,r=G(()=>{var E;return(E=ur(n.open))!=null?E:!0}),i=G(()=>ur(n.middleware)),o=G(()=>{var E;return(E=ur(n.placement))!=null?E:"bottom"}),a=G(()=>{var E;return(E=ur(n.strategy))!=null?E:"absolute"}),l=G(()=>{var E;return(E=ur(n.transform))!=null?E:!0}),c=G(()=>cu(e.value)),u=G(()=>cu(t.value)),d=J(0),f=J(0),p=J(a.value),g=J(o.value),h=qr({}),m=J(!1),v=G(()=>{const E={position:p.value,left:"0",top:"0"};if(!u.value)return E;const R=wf(u.value,d.value),T=wf(u.value,f.value);return l.value?{...E,transform:"translate("+R+"px, "+T+"px)",...Ng(u.value)>=1.5&&{willChange:"transform"}}:{position:p.value,left:R+"px",top:T+"px"}});let y;function x(){if(c.value==null||u.value==null)return;const E=r.value;aw(c.value,u.value,{middleware:i.value,placement:o.value,strategy:a.value}).then(R=>{d.value=R.x,f.value=R.y,p.value=R.strategy,g.value=R.placement,h.value=R.middlewareData,m.value=E!==!1})}function k(){typeof y=="function"&&(y(),y=void 0)}function O(){if(k(),s===void 0){x();return}if(c.value!=null&&u.value!=null){y=s(c.value,u.value,x);return}}function q(){r.value||(m.value=!1)}return tt([i,o,a,r],x,{flush:"sync"}),tt([c,u],O,{flush:"sync"}),tt(r,q,{flush:"sync"}),rc()&&Hp(k),{x:$s(d),y:$s(f),strategy:$s(p),placement:$s(g),middlewareData:$s(h),isPositioned:$s(m),floatingStyles:v,update:x}}const dw={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},[ZA,fw]=Es("PopperContent");var pw=ae({inheritAttrs:!1,__name:"PopperContent",props:Z_({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}},{...dw}),emits:["placed"],setup(e,{emit:t}){const n=e,s=t,r=Cg(),{forwardRef:i,currentElement:o}=ht(),a=J(),l=J(),{width:c,height:u}=N1(l),d=G(()=>n.side+(n.align!=="center"?`-${n.align}`:"")),f=G(()=>typeof n.collisionPadding=="number"?n.collisionPadding:{top:0,right:0,bottom:0,left:0,...n.collisionPadding}),p=G(()=>Array.isArray(n.collisionBoundary)?n.collisionBoundary:[n.collisionBoundary]),g=G(()=>({padding:f.value,boundary:p.value.filter(px),altBoundary:p.value.length>0})),h=G(()=>({mainAxis:n.sideFlip,crossAxis:n.alignFlip})),m=n1(()=>[tw({mainAxis:n.sideOffset+u.value,alignmentAxis:n.alignOffset}),n.prioritizePosition&&n.avoidCollisions&&xf({...g.value,...h.value}),n.avoidCollisions&&nw({mainAxis:!0,crossAxis:!!n.prioritizePosition,limiter:n.sticky==="partial"?ow():void 0,...g.value}),!n.prioritizePosition&&n.avoidCollisions&&xf({...g.value,...h.value}),sw({...g.value,apply:({elements:C,rects:F,availableWidth:V,availableHeight:X})=>{const{width:$,height:A}=F.reference,L=C.floating.style;L.setProperty("--reka-popper-available-width",`${V}px`),L.setProperty("--reka-popper-available-height",`${X}px`),L.setProperty("--reka-popper-anchor-width",`${$}px`),L.setProperty("--reka-popper-anchor-height",`${A}px`)}}),l.value&&uw({element:l.value,padding:n.arrowPadding}),hx({arrowWidth:c.value,arrowHeight:u.value}),n.hideWhenDetached&&rw({strategy:"referenceHidden",...g.value})]),v=G(()=>n.reference??r.anchor.value),{floatingStyles:y,placement:x,isPositioned:k,middlewareData:O}=cw(v,a,{strategy:n.positionStrategy,placement:d,whileElementsMounted:(...C)=>ew(...C,{layoutShift:!n.disableUpdateOnLayoutShift,animationFrame:n.updatePositionStrategy==="always"}),middleware:m}),q=G(()=>ou(x.value)[0]),E=G(()=>ou(x.value)[1]);mh(()=>{k.value&&s("placed")});const R=G(()=>{var F;const C=((F=O.value.arrow)==null?void 0:F.centerOffset)!==0;return n.hideShiftedArrow&&C}),T=J("");ln(()=>{o.value&&(T.value=window.getComputedStyle(o.value).zIndex)});const K=G(()=>{var C;return((C=O.value.arrow)==null?void 0:C.x)??0}),U=G(()=>{var C;return((C=O.value.arrow)==null?void 0:C.y)??0});return fw({placedSide:q,onArrowChange:C=>l.value=C,arrowX:K,arrowY:U,shouldHideArrow:R}),(C,F)=>{var V,X,$;return P(),Y("div",{ref_key:"floatingRef",ref:a,"data-reka-popper-content-wrapper":"",style:ks({..._(y),transform:_(k)?_(y).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:T.value,"--reka-popper-transform-origin":[(V=_(O).transformOrigin)==null?void 0:V.x,(X=_(O).transformOrigin)==null?void 0:X.y].join(" "),...(($=_(O).hide)==null?void 0:$.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}})},[I(_(At),ut({ref:_(i)},C.$attrs,{"as-child":n.asChild,as:C.as,"data-side":q.value,"data-align":E.value,style:{animation:_(k)?void 0:"none"}}),{default:D(()=>[ye(C.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4)}}}),qg=pw;const[hw,gw]=Es("RovingFocusGroup");var vw=ae({__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}){const s=e,r=n,{loop:i,orientation:o,dir:a}=ms(s),l=_g(a),c=Fa(s,"currentTabStopId",r,{defaultValue:s.defaultCurrentTabStopId,passive:s.currentTabStopId===void 0}),u=J(!1),d=J(!1),f=J(0),{getItems:p,CollectionSlot:g}=Eg({isProvider:!0});function h(v){const y=!d.value;if(v.currentTarget&&v.target===v.currentTarget&&y&&!u.value){const x=new CustomEvent(rx,ix);if(v.currentTarget.dispatchEvent(x),r("entryFocus",x),!x.defaultPrevented){const k=p().map(T=>T.ref).filter(T=>T.dataset.disabled!==""),O=k.find(T=>T.getAttribute("data-active")===""),q=k.find(T=>T.getAttribute("data-highlighted")===""),E=k.find(T=>T.id===c.value),R=[O,q,E,...k].filter(Boolean);Sg(R,s.preventScrollOnEntryFocus)}}d.value=!1}function m(){setTimeout(()=>{d.value=!1},1)}return t({getItems:p}),gw({loop:i,dir:l,orientation:o,currentTabStopId:c,onItemFocus:v=>{c.value=v},onItemShiftTab:()=>{u.value=!0},onFocusableItemAdd:()=>{f.value++},onFocusableItemRemove:()=>{f.value--}}),(v,y)=>(P(),ue(_(g),null,{default:D(()=>[I(_(At),{tabindex:u.value||f.value===0?-1:0,"data-orientation":_(o),as:v.as,"as-child":v.asChild,dir:_(l),style:{outline:"none"},onMousedown:y[0]||(y[0]=x=>d.value=!0),onMouseup:m,onFocus:h,onBlur:y[1]||(y[1]=x=>u.value=!1)},{default:D(()=>[ye(v.$slots,"default")]),_:3},8,["tabindex","data-orientation","as","as-child","dir"])]),_:3}))}}),mw=vw,_w=ae({__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){const t=e,n=hw(),s=Zi(),r=G(()=>t.tabStopId||s),i=G(()=>n.currentTabStopId.value===r.value),{getItems:o,CollectionItem:a}=Eg();qt(()=>{t.focusable&&n.onFocusableItemAdd()}),Br(()=>{t.focusable&&n.onFocusableItemRemove()});function l(c){if(c.key==="Tab"&&c.shiftKey){n.onItemShiftTab();return}if(c.target!==c.currentTarget)return;const u=lx(c,n.orientation.value,n.dir.value);if(u!==void 0){if(c.metaKey||c.ctrlKey||c.altKey||!t.allowShiftKey&&c.shiftKey)return;c.preventDefault();let d=[...o().map(f=>f.ref).filter(f=>f.dataset.disabled!=="")];if(u==="last")d.reverse();else if(u==="prev"||u==="next"){u==="prev"&&d.reverse();const f=d.indexOf(c.currentTarget);d=n.loop.value?ux(d,f+1):d.slice(f+1)}Dt(()=>Sg(d))}}return(c,u)=>(P(),ue(_(a),null,{default:D(()=>[I(_(At),{tabindex:i.value?0:-1,"data-orientation":_(n).orientation.value,"data-active":c.active?"":void 0,"data-disabled":c.focusable?void 0:"",as:c.as,"as-child":c.asChild,onMousedown:u[0]||(u[0]=d=>{c.focusable?_(n).onItemFocus(r.value):d.preventDefault()}),onFocus:u[1]||(u[1]=d=>_(n).onItemFocus(r.value)),onKeydown:l},{default:D(()=>[ye(c.$slots,"default")]),_:3},8,["tabindex","data-orientation","data-active","data-disabled","as","as-child"])]),_:3}))}}),yw=_w;const[eo,bw]=Es("PopoverRoot");var xw=ae({__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}){const n=e,s=t,{modal:r}=ms(n),i=Fa(n,"open",s,{defaultValue:n.defaultOpen,passive:n.open===void 0});return bw({contentId:"",triggerId:"",modal:r,open:i,onOpenChange:l=>{i.value=l},onOpenToggle:()=>{i.value=!i.value},triggerElement:J(),hasCustomAnchor:J(!1)}),(l,c)=>(P(),ue(_(Pg),null,{default:D(()=>[ye(l.$slots,"default",{open:_(i),close:()=>i.value=!1})]),_:3}))}}),ww=xw,kw=ae({__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}){const n=e,s=t,r=Xi($a(n,"trapFocus","disableOutsidePointerEvents")),{forwardRef:i}=ht(),o=eo();return S1(),(a,l)=>(P(),ue(_(ex),{"as-child":"",loop:"",trapped:a.trapFocus,onMountAutoFocus:l[5]||(l[5]=c=>s("openAutoFocus",c)),onUnmountAutoFocus:l[6]||(l[6]=c=>s("closeAutoFocus",c))},{default:D(()=>[I(_(xg),{"as-child":"","disable-outside-pointer-events":a.disableOutsidePointerEvents,onPointerDownOutside:l[0]||(l[0]=c=>s("pointerDownOutside",c)),onInteractOutside:l[1]||(l[1]=c=>s("interactOutside",c)),onEscapeKeyDown:l[2]||(l[2]=c=>s("escapeKeyDown",c)),onFocusOutside:l[3]||(l[3]=c=>s("focusOutside",c)),onDismiss:l[4]||(l[4]=c=>_(o).onOpenChange(!1))},{default:D(()=>[I(_(qg),ut(_(r),{id:_(o).contentId,ref:_(i),"data-state":_(o).open.value?"open":"closed","aria-labelledby":_(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:D(()=>[ye(a.$slots,"default")]),_:3},16,["id","data-state","aria-labelledby"])]),_:3},8,["disable-outside-pointer-events"])]),_:3},8,["trapped"]))}}),Bg=kw,Ew=ae({__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}){const n=e,s=t,r=eo(),i=J(!1);w1(!0);const o=Ss(n,s),{forwardRef:a,currentElement:l}=ht();return L1(l),(c,u)=>(P(),ue(Bg,ut(_(o),{ref:_(a),"trap-focus":_(r).open.value,"disable-outside-pointer-events":"",onCloseAutoFocus:u[0]||(u[0]=wn(d=>{var f;s("closeAutoFocus",d),i.value||(f=_(r).triggerElement.value)==null||f.focus()},["prevent"])),onPointerDownOutside:u[1]||(u[1]=d=>{s("pointerDownOutside",d);const f=d.detail.originalEvent,p=f.button===0&&f.ctrlKey===!0,g=f.button===2||p;i.value=g}),onFocusOutside:u[2]||(u[2]=wn(()=>{},["prevent"]))}),{default:D(()=>[ye(c.$slots,"default")]),_:3},16,["trap-focus"]))}}),Sw=Ew,Cw=ae({__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}){const n=e,s=t,r=eo(),i=J(!1),o=J(!1),a=Ss(n,s);return(l,c)=>(P(),ue(Bg,ut(_(a),{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:c[0]||(c[0]=u=>{var d;s("closeAutoFocus",u),u.defaultPrevented||(i.value||(d=_(r).triggerElement.value)==null||d.focus(),u.preventDefault()),i.value=!1,o.value=!1}),onInteractOutside:c[1]||(c[1]=async u=>{var p;s("interactOutside",u),u.defaultPrevented||(i.value=!0,u.detail.originalEvent.type==="pointerdown"&&(o.value=!0));const d=u.target;((p=_(r).triggerElement.value)==null?void 0:p.contains(d))&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&o.value&&u.preventDefault()})}),{default:D(()=>[ye(l.$slots,"default")]),_:3},16))}}),Pw=Cw,Aw=ae({__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}){const n=e,s=t,r=eo(),i=Ss(n,s),{forwardRef:o}=ht();return r.contentId||(r.contentId=Zi(void 0,"reka-popover-content")),(a,l)=>(P(),ue(_(xc),{present:a.forceMount||_(r).open.value},{default:D(()=>[_(r).modal.value?(P(),ue(Sw,ut({key:0},_(i),{ref:_(o)}),{default:D(()=>[ye(a.$slots,"default")]),_:3},16)):(P(),ue(Pw,ut({key:1},_(i),{ref:_(o)}),{default:D(()=>[ye(a.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),Ow=Aw,Tw=ae({__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){const t=e;return(n,s)=>(P(),ue(_(kg),Nr(Xs(t)),{default:D(()=>[ye(n.$slots,"default")]),_:3},16))}}),Iw=Tw,Rw=ae({__name:"PopoverTrigger",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e,n=eo(),{forwardRef:s,currentElement:r}=ht();return n.triggerId||(n.triggerId=Zi(void 0,"reka-popover-trigger")),qt(()=>{n.triggerElement.value=r.value}),(i,o)=>(P(),ue(Aa(_(n).hasCustomAnchor.value?_(At):_(Ag)),{"as-child":""},{default:D(()=>[I(_(At),{id:_(n).triggerId,ref:_(s),type:i.as==="button"?"button":void 0,"aria-haspopup":"dialog","aria-expanded":_(n).open.value,"aria-controls":_(n).contentId,"data-state":_(n).open.value?"open":"closed",as:i.as,"as-child":t.asChild,onClick:_(n).onOpenToggle},{default:D(()=>[ye(i.$slots,"default")]),_:3},8,["id","type","aria-expanded","aria-controls","data-state","as","as-child","onClick"])]),_:3}))}}),Mw=Rw,$w=ae({__name:"Label",props:{for:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"label"}},setup(e){const t=e;return ht(),(n,s)=>(P(),ue(_(At),ut(t,{onMousedown:s[0]||(s[0]=r=>{!r.defaultPrevented&&r.detail>1&&r.preventDefault()})}),{default:D(()=>[ye(n.$slots,"default")]),_:3},16))}}),Fw=$w;const[Oc,Dw]=Es("TabsRoot");var Lw=ae({__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}){const n=e,s=t,{orientation:r,unmountOnHide:i,dir:o}=ms(n),a=_g(o);ht();const l=Fa(n,"modelValue",s,{defaultValue:n.defaultValue,passive:n.modelValue===void 0}),c=J(),u=qr(new Set);return Dw({modelValue:l,changeModelValue:d=>{l.value=d},orientation:r,dir:a,unmountOnHide:i,activationMode:n.activationMode,baseId:Zi(void 0,"reka-tabs"),tabsList:c,contentIds:u,registerContent:d=>{u.value=new Set([...u.value,d])},unregisterContent:d=>{const f=new Set(u.value);f.delete(d),u.value=f}}),(d,f)=>(P(),ue(_(At),{dir:_(a),"data-orientation":_(r),"as-child":d.asChild,as:d.as},{default:D(()=>[ye(d.$slots,"default",{modelValue:_(l)})]),_:3},8,["dir","data-orientation","as-child","as"]))}}),Nw=Lw;function zg(e,t){return`${e}-trigger-${t}`}function jg(e,t){return`${e}-content-${t}`}var qw=ae({__name:"TabsContent",props:{value:{type:[String,Number],required:!0},forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{forwardRef:n}=ht(),s=Oc(),r=G(()=>zg(s.baseId,t.value)),i=G(()=>jg(s.baseId,t.value)),o=G(()=>t.value===s.modelValue.value),a=J(o.value);return qt(()=>{s.registerContent(t.value),requestAnimationFrame(()=>{a.value=!1})}),dc(()=>{s.unregisterContent(t.value)}),(l,c)=>(P(),ue(_(xc),{present:l.forceMount||o.value,"force-mount":""},{default:D(({present:u})=>[I(_(At),{id:i.value,ref:_(n),"as-child":l.asChild,as:l.as,role:"tabpanel","data-state":o.value?"active":"inactive","data-orientation":_(s).orientation.value,"aria-labelledby":r.value,hidden:!u,tabindex:"0",style:ks({animationDuration:a.value?"0s":void 0})},{default:D(()=>[!_(s).unmountOnHide.value||u?ye(l.$slots,"default",{key:0}):_e("v-if",!0)]),_:2},1032,["id","as-child","as","data-state","data-orientation","aria-labelledby","hidden","style"])]),_:3},8,["present"]))}}),Bw=qw,zw=ae({__name:"TabsList",props:{loop:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{loop:n}=ms(t),{forwardRef:s,currentElement:r}=ht(),i=Oc();return i.tabsList=r,(o,a)=>(P(),ue(_(mw),{"as-child":"",orientation:_(i).orientation.value,dir:_(i).dir.value,loop:_(n)},{default:D(()=>[I(_(At),{ref:_(s),role:"tablist","as-child":o.asChild,as:o.as,"aria-orientation":_(i).orientation.value},{default:D(()=>[ye(o.$slots,"default")]),_:3},8,["as-child","as","aria-orientation"])]),_:3},8,["orientation","dir","loop"]))}}),jw=zw,Hw=ae({__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){const t=e,{forwardRef:n}=ht(),s=Oc(),r=G(()=>zg(s.baseId,t.value)),i=G(()=>s.contentIds.value.has(t.value)?jg(s.baseId,t.value):void 0),o=G(()=>t.value===s.modelValue.value);return(a,l)=>(P(),ue(_(yw),{"as-child":"",focusable:!a.disabled,active:o.value},{default:D(()=>[I(_(At),{id:r.value,ref:_(n),role:"tab",type:a.as==="button"?"button":void 0,as:a.as,"as-child":a.asChild,"aria-selected":o.value?"true":"false","aria-controls":i.value,"data-state":o.value?"active":"inactive",disabled:a.disabled,"data-disabled":a.disabled?"":void 0,"data-orientation":_(s).orientation.value,onMousedown:l[0]||(l[0]=wn(c=>{!a.disabled&&c.ctrlKey===!1?_(s).changeModelValue(a.value):c.preventDefault()},["left"])),onKeydown:l[1]||(l[1]=jo(c=>_(s).changeModelValue(a.value),["enter","space"])),onFocus:l[2]||(l[2]=()=>{const c=_(s).activationMode!=="manual";!o.value&&!a.disabled&&c&&_(s).changeModelValue(a.value)})},{default:D(()=>[ye(a.$slots,"default")]),_:3},8,["id","type","as","as-child","aria-selected","aria-controls","data-state","disabled","data-disabled","data-orientation"])]),_:3},8,["focusable","active"]))}}),Vw=Hw;const[Ba,Uw]=Es("TooltipProvider");var Ww=ae({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){const t=e,{delayDuration:n,skipDelayDuration:s,disableHoverableContent:r,disableClosingTrigger:i,ignoreNonKeyboardFocus:o,disabled:a,content:l}=ms(t);ht();const c=J(!0),u=J(!1),{start:d,stop:f}=gg(()=>{c.value=!0},s,{immediate:!1});return Uw({isOpenDelayed:c,delayDuration:n,onOpen(){f(),c.value=!1},onClose(){d()},isPointerInTransitRef:u,disableHoverableContent:r,disableClosingTrigger:i,disabled:a,ignoreNonKeyboardFocus:o,content:l}),(p,g)=>ye(p.$slots,"default")}}),Gw=Ww;const Hg="tooltip.open",[za,Kw]=Es("TooltipRoot");var Yw=ae({__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}){const n=e,s=t;ht();const r=Ba(),i=G(()=>n.disableHoverableContent??r.disableHoverableContent.value),o=G(()=>n.disableClosingTrigger??r.disableClosingTrigger.value),a=G(()=>n.disabled??r.disabled.value),l=G(()=>n.delayDuration??r.delayDuration.value),c=G(()=>n.ignoreNonKeyboardFocus??r.ignoreNonKeyboardFocus.value),u=Fa(n,"open",s,{defaultValue:n.defaultOpen,passive:n.open===void 0});tt(u,x=>{r.onClose&&(x?(r.onOpen(),document.dispatchEvent(new CustomEvent(Hg))):r.onClose())});const d=J(!1),f=J(),p=G(()=>u.value?d.value?"delayed-open":"instant-open":"closed"),{start:g,stop:h}=gg(()=>{d.value=!0,u.value=!0},l,{immediate:!1});function m(){h(),d.value=!1,u.value=!0}function v(){h(),u.value=!1}function y(){g()}return Kw({contentId:"",open:u,stateAttribute:p,trigger:f,onTriggerChange(x){f.value=x},onTriggerEnter(){r.isOpenDelayed.value?y():m()},onTriggerLeave(){i.value?v():h()},onOpen:m,onClose:v,disableHoverableContent:i,disableClosingTrigger:o,disabled:a,ignoreNonKeyboardFocus:c}),(x,k)=>(P(),ue(_(Pg),null,{default:D(()=>[ye(x.$slots,"default",{open:_(u)})]),_:3}))}}),Jw=Yw,Xw=ae({__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}){const n=e,s=t,r=za(),i=Ba(),{forwardRef:o,currentElement:a}=ht(),l=G(()=>{var u;return n.ariaLabel||((u=a.value)==null?void 0:u.textContent)}),c=G(()=>{const{ariaLabel:u,...d}=n;return vg(d,i.content.value??{},{side:"top",sideOffset:0,align:"center",avoidCollisions:!0,collisionBoundary:[],collisionPadding:0,arrowPadding:0,sticky:"partial",hideWhenDetached:!1})});return qt(()=>{Ho(window,"scroll",u=>{const d=u.target;d!=null&&d.contains(r.trigger.value)&&r.onClose()},{capture:!0}),Ho(window,Hg,r.onClose)}),(u,d)=>(P(),ue(_(xg),{"as-child":"","disable-outside-pointer-events":!1,onEscapeKeyDown:d[0]||(d[0]=f=>s("escapeKeyDown",f)),onPointerDownOutside:d[1]||(d[1]=f=>{var p;_(r).disableClosingTrigger.value&&((p=_(r).trigger.value)!=null&&p.contains(f.target))&&f.preventDefault(),s("pointerDownOutside",f)}),onFocusOutside:d[2]||(d[2]=wn(()=>{},["prevent"])),onDismiss:d[3]||(d[3]=f=>_(r).onClose())},{default:D(()=>[I(_(qg),ut({ref:_(o),"data-state":_(r).stateAttribute.value},{...u.$attrs,...c.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:D(()=>[ye(u.$slots,"default"),I(_(sx),{id:_(r).contentId,role:"tooltip"},{default:D(()=>[ce(fe(l.value),1)]),_:1},8,["id"])]),_:3},16,["data-state"])]),_:3}))}}),Vg=Xw,Zw=ae({__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){const n=Xi(e),{forwardRef:s,currentElement:r}=ht(),{trigger:i,onClose:o}=za(),a=Ba(),{isPointerInTransit:l,onPointerExit:c}=C1(i,r);return a.isPointerInTransitRef=l,c(()=>{o()}),(u,d)=>(P(),ue(Vg,ut({ref:_(s)},_(n)),{default:D(()=>[ye(u.$slots,"default")]),_:3},16))}}),Qw=Zw,e2=ae({__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}){const n=e,s=t,r=za(),i=Ss(n,s),{forwardRef:o}=ht();return(a,l)=>(P(),ue(_(xc),{present:a.forceMount||_(r).open.value},{default:D(()=>[(P(),ue(Aa(_(r).disableHoverableContent.value?Vg:Qw),ut({ref:_(o)},_(i)),{default:D(()=>[ye(a.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),t2=e2,n2=ae({__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){const t=e;return(n,s)=>(P(),ue(_(kg),Nr(Xs(t)),{default:D(()=>[ye(n.$slots,"default")]),_:3},16))}}),s2=n2,r2=ae({__name:"TooltipTrigger",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e,n=za(),s=Ba();n.contentId||(n.contentId=Zi(void 0,"reka-tooltip-content"));const{forwardRef:r,currentElement:i}=ht(),o=J(!1),a=J(!1),l=G(()=>n.disabled.value?{}:{click:h,focus:p,pointermove:d,pointerleave:f,pointerdown:u,blur:g});qt(()=>{n.onTriggerChange(i.value)});function c(){setTimeout(()=>{o.value=!1},1)}function u(){n.open&&!n.disableClosingTrigger.value&&n.onClose(),o.value=!0,document.addEventListener("pointerup",c,{once:!0})}function d(m){m.pointerType!=="touch"&&!a.value&&!s.isPointerInTransitRef.value&&(n.onTriggerEnter(),a.value=!0)}function f(){n.onTriggerLeave(),a.value=!1}function p(m){var v,y;o.value||n.ignoreNonKeyboardFocus.value&&!((y=(v=m.target).matches)!=null&&y.call(v,":focus-visible"))||n.onOpen()}function g(){n.onClose()}function h(){n.disableClosingTrigger.value||n.onClose()}return(m,v)=>(P(),ue(_(Ag),{"as-child":"",reference:m.reference},{default:D(()=>[I(_(At),ut({ref:_(r),"aria-describedby":_(n).open.value?_(n).contentId:void 0,"data-state":_(n).stateAttribute.value,as:m.as,"as-child":t.asChild,"data-grace-area-trigger":""},J_(l.value)),{default:D(()=>[ye(m.$slots,"default")]),_:3},16,["aria-describedby","data-state","as","as-child"])]),_:3},8,["reference"]))}}),i2=r2;function Ug(e){var t,n,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=Ug(e[t]))&&(s&&(s+=" "),s+=n)}else for(n in e)e[n]&&(s&&(s+=" "),s+=n);return s}function Wg(){for(var e,t,n=0,s="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=Ug(e))&&(s&&(s+=" "),s+=t);return s}const Tc="-",o2=e=>{const t=l2(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:o=>{const a=o.split(Tc);return a[0]===""&&a.length!==1&&a.shift(),Gg(a,t)||a2(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&s[o]?[...l,...s[o]]:l}}},Gg=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],s=t.nextPart.get(n),r=s?Gg(e.slice(1),s):void 0;if(r)return r;if(t.validators.length===0)return;const i=e.join(Tc);return(o=t.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},kf=/^\[(.+)\]$/,a2=e=>{if(kf.test(e)){const t=kf.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},l2=e=>{const{theme:t,prefix:n}=e,s={nextPart:new Map,validators:[]};return c2(Object.entries(e.classGroups),n).forEach(([i,o])=>{du(o,s,i,t)}),s},du=(e,t,n,s)=>{e.forEach(r=>{if(typeof r=="string"){const i=r===""?t:Ef(t,r);i.classGroupId=n;return}if(typeof r=="function"){if(u2(r)){du(r(s),t,n,s);return}t.validators.push({validator:r,classGroupId:n});return}Object.entries(r).forEach(([i,o])=>{du(o,Ef(t,i),n,s)})})},Ef=(e,t)=>{let n=e;return t.split(Tc).forEach(s=>{n.nextPart.has(s)||n.nextPart.set(s,{nextPart:new Map,validators:[]}),n=n.nextPart.get(s)}),n},u2=e=>e.isThemeGetter,c2=(e,t)=>t?e.map(([n,s])=>{const r=s.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,a])=>[t+o,a])):i);return[n,r]}):e,d2=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,s=new Map;const r=(i,o)=>{n.set(i,o),t++,t>e&&(t=0,s=n,n=new Map)};return{get(i){let o=n.get(i);if(o!==void 0)return o;if((o=s.get(i))!==void 0)return r(i,o),o},set(i,o){n.has(i)?n.set(i,o):r(i,o)}}},Kg="!",f2=e=>{const{separator:t,experimentalParseClassName:n}=e,s=t.length===1,r=t[0],i=t.length,o=a=>{const l=[];let c=0,u=0,d;for(let m=0;m<a.length;m++){let v=a[m];if(c===0){if(v===r&&(s||a.slice(m,m+i)===t)){l.push(a.slice(u,m)),u=m+i;continue}if(v==="/"){d=m;continue}}v==="["?c++:v==="]"&&c--}const f=l.length===0?a:a.substring(u),p=f.startsWith(Kg),g=p?f.substring(1):f,h=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:g,maybePostfixModifierPosition:h}};return n?a=>n({className:a,parseClassName:o}):o},p2=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(s=>{s[0]==="["?(t.push(...n.sort(),s),n=[]):n.push(s)}),t.push(...n.sort()),t},h2=e=>({cache:d2(e.cacheSize),parseClassName:f2(e),...o2(e)}),g2=/\s+/,v2=(e,t)=>{const{parseClassName:n,getClassGroupId:s,getConflictingClassGroupIds:r}=t,i=[],o=e.trim().split(g2);let a="";for(let l=o.length-1;l>=0;l-=1){const c=o[l],{modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(c);let g=!!p,h=s(g?f.substring(0,p):f);if(!h){if(!g){a=c+(a.length>0?" "+a:a);continue}if(h=s(f),!h){a=c+(a.length>0?" "+a:a);continue}g=!1}const m=p2(u).join(":"),v=d?m+Kg:m,y=v+h;if(i.includes(y))continue;i.push(y);const x=r(h,g);for(let k=0;k<x.length;++k){const O=x[k];i.push(v+O)}a=c+(a.length>0?" "+a:a)}return a};function m2(){let e=0,t,n,s="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Yg(t))&&(s&&(s+=" "),s+=n);return s}const Yg=e=>{if(typeof e=="string")return e;let t,n="";for(let s=0;s<e.length;s++)e[s]&&(t=Yg(e[s]))&&(n&&(n+=" "),n+=t);return n};function _2(e,...t){let n,s,r,i=o;function o(l){const c=t.reduce((u,d)=>d(u),e());return n=h2(c),s=n.cache.get,r=n.cache.set,i=a,a(l)}function a(l){const c=s(l);if(c)return c;const u=v2(l,n);return r(l,u),u}return function(){return i(m2.apply(null,arguments))}}const We=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Jg=/^\[(?:([a-z-]+):)?(.+)\]$/i,y2=/^\d+\/\d+$/,b2=new Set(["px","full","screen"]),x2=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,w2=/\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$/,k2=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,E2=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,S2=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,$n=e=>Er(e)||b2.has(e)||y2.test(e),as=e=>Hr(e,"length",M2),Er=e=>!!e&&!Number.isNaN(Number(e)),vl=e=>Hr(e,"number",Er),Kr=e=>!!e&&Number.isInteger(Number(e)),C2=e=>e.endsWith("%")&&Er(e.slice(0,-1)),ke=e=>Jg.test(e),ls=e=>x2.test(e),P2=new Set(["length","size","percentage"]),A2=e=>Hr(e,P2,Xg),O2=e=>Hr(e,"position",Xg),T2=new Set(["image","url"]),I2=e=>Hr(e,T2,F2),R2=e=>Hr(e,"",$2),Yr=()=>!0,Hr=(e,t,n)=>{const s=Jg.exec(e);return s?s[1]?typeof t=="string"?s[1]===t:t.has(s[1]):n(s[2]):!1},M2=e=>w2.test(e)&&!k2.test(e),Xg=()=>!1,$2=e=>E2.test(e),F2=e=>S2.test(e),D2=()=>{const e=We("colors"),t=We("spacing"),n=We("blur"),s=We("brightness"),r=We("borderColor"),i=We("borderRadius"),o=We("borderSpacing"),a=We("borderWidth"),l=We("contrast"),c=We("grayscale"),u=We("hueRotate"),d=We("invert"),f=We("gap"),p=We("gradientColorStops"),g=We("gradientColorStopPositions"),h=We("inset"),m=We("margin"),v=We("opacity"),y=We("padding"),x=We("saturate"),k=We("scale"),O=We("sepia"),q=We("skew"),E=We("space"),R=We("translate"),T=()=>["auto","contain","none"],K=()=>["auto","hidden","clip","visible","scroll"],U=()=>["auto",ke,t],C=()=>[ke,t],F=()=>["",$n,as],V=()=>["auto",Er,ke],X=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],$=()=>["solid","dashed","dotted","double","none"],A=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],L=()=>["start","end","center","between","around","evenly","stretch"],de=()=>["","0",ke],qe=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Pe=()=>[Er,ke];return{cacheSize:500,separator:":",theme:{colors:[Yr],spacing:[$n,as],blur:["none","",ls,ke],brightness:Pe(),borderColor:[e],borderRadius:["none","","full",ls,ke],borderSpacing:C(),borderWidth:F(),contrast:Pe(),grayscale:de(),hueRotate:Pe(),invert:de(),gap:C(),gradientColorStops:[e],gradientColorStopPositions:[C2,as],inset:U(),margin:U(),opacity:Pe(),padding:C(),saturate:Pe(),scale:Pe(),sepia:de(),skew:Pe(),space:C(),translate:C()},classGroups:{aspect:[{aspect:["auto","square","video",ke]}],container:["container"],columns:[{columns:[ls]}],"break-after":[{"break-after":qe()}],"break-before":[{"break-before":qe()}],"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"],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(),ke]}],overflow:[{overflow:K()}],"overflow-x":[{"overflow-x":K()}],"overflow-y":[{"overflow-y":K()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Kr,ke]}],basis:[{basis:U()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ke]}],grow:[{grow:de()}],shrink:[{shrink:de()}],order:[{order:["first","last","none",Kr,ke]}],"grid-cols":[{"grid-cols":[Yr]}],"col-start-end":[{col:["auto",{span:["full",Kr,ke]},ke]}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":[Yr]}],"row-start-end":[{row:["auto",{span:[Kr,ke]},ke]}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ke]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ke]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...L()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...L(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...L(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[m]}],mx:[{mx:[m]}],my:[{my:[m]}],ms:[{ms:[m]}],me:[{me:[m]}],mt:[{mt:[m]}],mr:[{mr:[m]}],mb:[{mb:[m]}],ml:[{ml:[m]}],"space-x":[{"space-x":[E]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[E]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ke,t]}],"min-w":[{"min-w":[ke,t,"min","max","fit"]}],"max-w":[{"max-w":[ke,t,"none","full","min","max","fit","prose",{screen:[ls]},ls]}],h:[{h:[ke,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ke,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ke,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ke,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ls,as]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",vl]}],"font-family":[{font:[Yr]}],"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:["tighter","tight","normal","wide","wider","widest",ke]}],"line-clamp":[{"line-clamp":["none",Er,vl]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",$n,ke]}],"list-image":[{"list-image":["none",ke]}],"list-style-type":[{list:["none","disc","decimal",ke]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...$(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",$n,as]}],"underline-offset":[{"underline-offset":["auto",$n,ke]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ke]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ke]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...X(),O2]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",A2]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},I2]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...$(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:$()}],"border-color":[{border:[r]}],"border-color-x":[{"border-x":[r]}],"border-color-y":[{"border-y":[r]}],"border-color-s":[{"border-s":[r]}],"border-color-e":[{"border-e":[r]}],"border-color-t":[{"border-t":[r]}],"border-color-r":[{"border-r":[r]}],"border-color-b":[{"border-b":[r]}],"border-color-l":[{"border-l":[r]}],"divide-color":[{divide:[r]}],"outline-style":[{outline:["",...$()]}],"outline-offset":[{"outline-offset":[$n,ke]}],"outline-w":[{outline:[$n,as]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[$n,as]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ls,R2]}],"shadow-color":[{shadow:[Yr]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...A(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":A()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[s]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",ls,ke]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[x]}],sepia:[{sepia:[O]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[s]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[O]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ke]}],duration:[{duration:Pe()}],ease:[{ease:["linear","in","out","in-out",ke]}],delay:[{delay:Pe()}],animate:[{animate:["none","spin","ping","pulse","bounce",ke]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[k]}],"scale-x":[{"scale-x":[k]}],"scale-y":[{"scale-y":[k]}],rotate:[{rotate:[Kr,ke]}],"translate-x":[{"translate-x":[R]}],"translate-y":[{"translate-y":[R]}],"skew-x":[{"skew-x":[q]}],"skew-y":[{"skew-y":[q]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ke]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",ke]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"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",ke]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[$n,as,vl]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-s","border-w-e","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-s","border-color-e","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"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","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-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"]}}},L2=_2(D2);function Et(...e){return L2(Wg(e))}const Sf=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Cf=Wg,Zg=(e,t)=>n=>{var s;if((t==null?void 0:t.variants)==null)return Cf(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:r,defaultVariants:i}=t,o=Object.keys(r).map(c=>{const u=n==null?void 0:n[c],d=i==null?void 0:i[c];if(u===null)return null;const f=Sf(u)||Sf(d);return r[c][f]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=t==null||(s=t.compoundVariants)===null||s===void 0?void 0:s.reduce((c,u)=>{let{class:d,className:f,...p}=u;return Object.entries(p).every(g=>{let[h,m]=g;return Array.isArray(m)?m.includes({...i,...a}[h]):{...i,...a}[h]===m})?[...c,d,f]:c},[]);return Cf(e,o,l,n==null?void 0:n.class,n==null?void 0:n.className)},N2=Zg("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-1 focus-visible:ring-ring 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 shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-6",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),De=ae({__name:"Button",props:{variant:{},size:{},class:{},asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e;return(n,s)=>(P(),ue(_(At),{as:e.as,"as-child":e.asChild,class:He(_(Et)(_(N2)({variant:e.variant,size:e.size}),t.class))},{default:D(()=>[ye(n.$slots,"default")]),_:3},8,["as","as-child","class"]))}}),Qg=ae({__name:"Card",props:{class:{}},setup(e){const t=e;return(n,s)=>(P(),Y("div",{class:He(_(Et)("rounded-xl border bg-card text-card-foreground shadow",t.class))},[ye(n.$slots,"default")],2))}}),ev=ae({__name:"CardHeader",props:{class:{}},setup(e){const t=e;return(n,s)=>(P(),Y("div",{class:He(_(Et)("flex flex-col space-y-1.5 p-6",t.class))},[ye(n.$slots,"default")],2))}}),tv=ae({__name:"CardTitle",props:{class:{}},setup(e){const t=e;return(n,s)=>(P(),Y("h3",{class:He(_(Et)("font-semibold leading-none tracking-tight",t.class))},[ye(n.$slots,"default")],2))}}),nv=ae({__name:"CardDescription",props:{class:{}},setup(e){const t=e;return(n,s)=>(P(),Y("p",{class:He(_(Et)("text-sm text-muted-foreground",t.class))},[ye(n.$slots,"default")],2))}}),sv=ae({__name:"CardContent",props:{class:{}},setup(e){const t=e;return(n,s)=>(P(),Y("div",{class:He(_(Et)("p-6 pt-0",t.class))},[ye(n.$slots,"default")],2))}}),rv=ae({__name:"CardFooter",props:{class:{}},setup(e){const t=e;return(n,s)=>(P(),Y("div",{class:He(_(Et)("flex items-center p-6 pt-0",t.class))},[ye(n.$slots,"default")],2))}});class iv extends Error{constructor(t,n,s){super(n),this.status=t,this.data=s,this.name="ApiError"}}async function ct(e,t={}){const n=new Headers(t.headers);t.body&&!n.has("content-type")&&n.set("content-type","application/json");const s=await fetch(e,{...t,headers:n});if(!s.ok){const r=await s.json().catch(()=>({}));throw new iv(s.status,r.error??s.statusText,r)}if(s.status!==204)return await s.json()}const ov=()=>ct("/api/status"),q2=e=>ct("/api/active",{method:"POST",body:JSON.stringify(e)}),B2=e=>ct("/api/config/action-plan",{method:"POST",body:JSON.stringify({enabled:e})}),to=()=>ct("/api/analytics/config"),z2=e=>ct("/api/analytics/opt-out",{method:"POST",body:JSON.stringify({optedOut:e})}),av=e=>ct("/api/analytics/beta-telemetry",{method:"POST",body:JSON.stringify({optedIn:e})}),Ic=()=>ct("/api/providers"),lv=(e,t)=>ct(`/api/providers/${e}/validate-key`,{method:"POST",body:JSON.stringify({apiKey:t})}),uv=(e,t)=>ct(`/api/providers/${e}/key`,{method:"POST",body:JSON.stringify({apiKey:t})}),j2=e=>ct(`/api/providers/${e}/key`,{method:"DELETE"}),cv=(e,t)=>ct(`/api/providers/${e}/auth-method`,{method:"POST",body:JSON.stringify({authMethod:t})}),dv=e=>ct(`/api/providers/${e}/validate-cli`,{method:"POST",body:"{}"}),H2=(e,t)=>ct(`/api/providers/${e}/cli-path`,{method:"POST",body:JSON.stringify({cliPath:t})}),V2=()=>ct("/api/chats"),U2=e=>ct("/api/chats",{method:"POST",body:JSON.stringify(e)}),W2=e=>ct(`/api/chats/${e}`),G2=(e,t)=>ct(`/api/chats/${e}`,{method:"PATCH",body:JSON.stringify({title:t})}),Pf=(e,t)=>ct(`/api/chats/${e}`,{method:"PATCH",body:JSON.stringify(t)}),Af=e=>ct(`/api/chats/${e}`,{method:"DELETE"});async function*K2(e,t){const n=await fetch("/api/chat",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e),signal:t});if(!n.ok||!n.body){const o=await n.text().catch(()=>"");throw new iv(n.status,o||n.statusText)}const s=n.body.getReader(),r=new TextDecoder;let i="";for(;;){const{value:o,done:a}=await s.read();if(a)break;i+=r.decode(o,{stream:!0});const l=i.split(/\n\n/);i=l.pop()??"";for(const c of l){const u=J2(c);u&&(yield u)}}}const Y2=e=>ct(`/api/abort/${encodeURIComponent(e)}`,{method:"POST"});function J2(e){const t=e.split(/\n/);let n="message";const s=[];for(const i of t)i.startsWith("event:")?n=i.slice(6).trim():i.startsWith("data:")&&s.push(i.slice(5).trimStart());if(!s.length)return null;const r=s.join(`
248
+ `);try{return{event:n,data:JSON.parse(r)}}catch{return{event:n,data:r}}}const fv="photoshop-mcp-theme";function Rc(){return localStorage.getItem(fv)==="light"?"light":"dark"}function pv(e){document.documentElement.classList.toggle("dark",e==="dark")}function X2(){const e=J(Rc());function t(s){e.value=s,pv(s),localStorage.setItem(fv,s)}function n(){t(e.value==="dark"?"light":"dark")}return{theme:e,setTheme:t,toggleTheme:n}}function Z2(e){var n;const t=e.trim().match(/-([A-Za-z]{2})\b/);return(n=t==null?void 0:t[1])==null?void 0:n.toUpperCase()}function hv(){const e=navigator.language,t=Intl.DateTimeFormat().resolvedOptions().timeZone,n=Z2(e);return{browser_language:e,browser_timezone:t,...n?{browser_locale_region:n}:{}}}var M=typeof window<"u"?window:void 0,pt=typeof globalThis<"u"?globalThis:M;typeof self>"u"&&(pt.self=pt),typeof File>"u"&&(pt.File=function(){});var Ut=pt==null?void 0:pt.navigator,ie=pt==null?void 0:pt.document,bt=pt==null?void 0:pt.location,fu=pt==null?void 0:pt.fetch,pu=pt!=null&&pt.XMLHttpRequest&&"withCredentials"in new pt.XMLHttpRequest?pt.XMLHttpRequest:void 0,Of=pt==null?void 0:pt.AbortController,Q2=pt==null?void 0:pt.CompressionStream,Lt=Ut==null?void 0:Ut.userAgent,he=M??{},Tf="1.388.1",gt={DEBUG:!1,LIB_VERSION:Tf,LIB_NAME:"web",JS_SDK_VERSION:Tf};function If(e,t,n,s,r,i,o){try{var a=e[i](o),l=a.value}catch(c){return void n(c)}a.done?t(l):Promise.resolve(l).then(s,r)}function jt(e){return function(){var t=this,n=arguments;return new Promise((function(s,r){var i=e.apply(t,n);function o(l){If(i,s,r,o,a,"next",l)}function a(l){If(i,s,r,o,a,"throw",l)}o(void 0)}))}}function Z(){return Z=Object.assign?Object.assign.bind():function(e){for(var t=1;arguments.length>t;t++){var n=arguments[t];for(var s in n)({}).hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},Z.apply(null,arguments)}function gv(e,t){if(e==null)return{};var n={};for(var s in e)if({}.hasOwnProperty.call(e,s)){if(t.indexOf(s)!==-1)continue;n[s]=e[s]}return n}var Jr,Rf=(function(e){return e.GZipJS="gzip-js",e.Base64="base64",e})({}),ek=["$snapshot","$pageview","$pageleave","$set","survey dismissed","survey sent","survey shown","$identify","$groupidentify","$create_alias","$$client_ingestion_warning","$web_experiment_applied","$feature_enrollment_update","$feature_flag_called"],tk=["token"],vv="NativeGzipValidationError",hu=e=>e.length>=2&&e[0]===31&&e[1]===139,Mf=e=>!(!e||typeof e!="object")&&("name"in e?String(e.name):"")==="NotReadableError",ho=e=>{var t=new Error("Native gzip produced invalid output: "+e);throw t.name=vv,t},nk=(function(){var e=jt((function*(t,n){18>t.size&&ho("too-short");var s=new Uint8Array(yield t.slice(0,10).arrayBuffer());hu(s)&&s[2]===8||ho("invalid-header");var r=new DataView(yield t.slice(t.size-8).arrayBuffer());r.getUint32(0,!0)!==(o=>{for(var a=(()=>{if(Jr)return Jr;Jr=[];for(var u=0;256>u;u++){for(var d=u,f=0;8>f;f++)d=1&d?3988292384^d>>>1:d>>>1;Jr[u]=d>>>0}return Jr})(),l=4294967295,c=0;o.length>c;c++)l=a[255&(l^o[c])]^l>>>8;return(4294967295^l)>>>0})(n)&&ho("invalid-crc");var i=n.length>>>0;r.getUint32(4,!0)!==i&&ho("invalid-size")}));return function(t,n){return e.apply(this,arguments)}})();function gu(){return gu=jt((function*(e,t,n){t===void 0&&(t=!0);try{var s=new TextEncoder().encode(e),r=new CompressionStream("gzip"),i=r.writable.getWriter(),o=i.write(s).then((()=>i.close())).catch((function(){var c=jt((function*(u){try{yield i.abort(u)}catch{}throw u}));return function(u){return c.apply(this,arguments)}})()),a=new Response(r.readable).blob(),[l]=yield Promise.all([a,o]);return yield nk(l,s),l}catch(c){if(n!=null&&n.rethrow)throw c;return t&&console.error("Failed to gzip compress data",c),null}})),gu.apply(this,arguments)}var sk=["amazonbot","amazonproductbot","app.hypefactors.com","applebot","archive.org_bot","awariobot","backlinksextendedbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","dataforseobot","deepscan","duckduckbot","facebookexternal","facebookcatalog","http://yandex.com/bots","hubspot","ia_archiver","leikibot","linkedinbot","meta-externalagent","mj12bot","msnbot","nessus","petalbot","pinterest","prerender","rogerbot","screaming frog","sebot-wa","sitebulb","slackbot","slurp","trendictionbot","turnitin","twitterbot","vercel-screenshot","vercelbot","yahoo! slurp","yandexbot","zoombot","bot.htm","bot.php","(bot;","bot/","crawler","ahrefsbot","ahrefssiteaudit","semrushbot","siteauditbot","splitsignalbot","gptbot","oai-searchbot","chatgpt-user","perplexitybot","better uptime bot","sentryuptimebot","uptimerobot","headlesschrome","cypress","google-hoteladsverifier","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleother","google-cloudvertexbot","googleweblight","mediapartners-google","storebot-google","google-inspectiontool","bytespider"],$f=function(e,t){if(t===void 0&&(t=[]),!e)return!1;var n=e.toLowerCase();return sk.concat(t).some((s=>{var r=s.toLowerCase();return n.indexOf(r)!==-1}))};function be(e,t){return e.indexOf(t)!==-1}var ja=function(e){return e.trim()},vu=function(e){return e.replace(/^\$/,"")},mv=Object.prototype,_v=mv.hasOwnProperty,Ha=mv.toString,Ce=Array.isArray||function(e){return Ha.call(e)==="[object Array]"},jn=e=>typeof e=="function",et=e=>e===Object(e)&&!Ce(e),hs=e=>{if(et(e)){for(var t in e)if(_v.call(e,t))return!1;return!0}return!1},te=e=>e===void 0,Ue=e=>Ha.call(e)=="[object String]",mu=e=>Ue(e)&&e.trim().length===0,$t=e=>e===null,Se=e=>te(e)||$t(e),Ft=e=>Ha.call(e)=="[object Number]"&&e==e,Nn=e=>Ft(e)&&e>0,Pn=e=>Ha.call(e)==="[object Boolean]",rk=e=>e instanceof FormData,ik=e=>be(ek,e),ok=e=>be(tk,e);function yv(e){return e===null||typeof e!="object"}function Go(e,t){return{}.toString.call(e)==="[object "+t+"]"}function Mc(e){return typeof Event<"u"&&(function(t,n){try{return t instanceof n}catch{return!1}})(e,Event)}var ak=[!0,"true",1,"1","yes"],ml=e=>be(ak,e),lk=[!1,"false",0,"0","no"];function En(e,t,n,s,r){return t>n&&(s.warn("min cannot be greater than max."),t=n),Ft(e)?e>n?(s.warn(" cannot be greater than max: "+n+". Using max value instead."),n):t>e?(s.warn(" cannot be less than min: "+t+". Using min value instead."),t):e:(s.warn(" must be a number. using max or fallback. max: "+n+", fallback: "+r),En(r||n,t,n,s))}class uk{constructor(t){this.$t={},this.zt=t.zt,this.Gt=En(t.bucketSize,0,100,t.Zt),this.Qt=En(t.refillRate,0,this.Gt,t.Zt),this.Jt=En(t.refillInterval,0,864e5,t.Zt)}Kt(t,n){var s=Math.floor((n-t.lastAccess)/this.Jt);s>0&&(t.tokens=Math.min(t.tokens+s*this.Qt,this.Gt),t.lastAccess=t.lastAccess+s*this.Jt)}consumeRateLimit(t){var n,s=Date.now(),r=String(t),i=this.$t[r];return i?this.Kt(i,s):this.$t[r]=i={tokens:this.Gt,lastAccess:s},i.tokens===0||(i.tokens--,i.tokens===0&&((n=this.zt)==null||n.call(this,t)),i.tokens===0)}stop(){this.$t={}}}var go,Ff,_l,Jt="Mobile",Ko="iOS",Yn="Android",Rr="Tablet",bv=Yn+" "+Rr,xv="iPad",wv="Apple",kv=wv+" Watch",ki="Safari",Mr="BlackBerry",Ev="Samsung",Sv=Ev+"Browser",Cv=Ev+" Internet",Vs="Chrome",ck=Vs+" OS",Pv=Vs+" "+Ko,$c="Internet Explorer",Av=$c+" "+Jt,Fc="Opera",dk=Fc+" Mini",Dc="Edge",Ov="Microsoft "+Dc,Sr="Firefox",Tv=Sr+" "+Ko,Ni="Nintendo",qi="PlayStation",Cr="Xbox",Iv=Yn+" "+Jt,Rv=Jt+" "+ki,ui="Windows",_u=ui+" Phone",Df="Nokia",yu="Ouya",Mv="Generic",fk=Mv+" "+Jt.toLowerCase(),$v=Mv+" "+Rr.toLowerCase(),bu="Konqueror",Fv="Oculus Browser",Yo="Vivaldi",Dv="Yandex",Jo="Whale",xu="DuckDuckGo",Lv="Pale Moon",Xo="Waterfox",Ei="Brave",Nv="Google Search App",Xe="(\\d+(\\.\\d+)?)",yl=new RegExp("Version/"+Xe),pk=new RegExp(Cr,"i"),hk=new RegExp(qi+" \\w+","i"),gk=new RegExp(Ni+" \\w+","i"),Lc=new RegExp(Mr+"|PlayBook|BB10","i"),vk={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"},qv=function(e,t,n,s){t=t||"";var r=(function(i){return i!=null&&i.brave?Ei:null})(n);return r||(s!=null&&s.detectGoogleSearchApp&&be(e,"GSA/")?Nv:be(e," OPR/")&&be(e,"Mini")?dk:be(e," OPR/")?Fc:Lc.test(e)?Mr:be(e,"IE"+Jt)||be(e,"WPDesktop")?Av:be(e,"OculusBrowser")?Fv:be(e,Sv)?Cv:be(e,Dc)||be(e,"Edg/")?Ov:be(e,Yo+"/")?Yo:be(e,"YaBrowser/")?Dv:be(e,Jo+"/")?Jo:be(e,xu+"/")||be(e,"Ddg/")?xu:be(e,"FBIOS")?"Facebook "+Jt:be(e,"UCWEB")||be(e,"UCBrowser")?"UC Browser":be(e,"CriOS")?Pv:be(e,"CrMo")||be(e,Vs)?Vs:be(e,Yn)&&be(e,ki)?Iv:be(e,"FxiOS")?Tv:be(e.toLowerCase(),bu.toLowerCase())?bu:be(e,Ei+"/")?Ei:((i,o)=>o&&be(o,wv)||(function(a){return be(a,ki)&&!be(a,Vs)&&!be(a,Yn)})(i))(e,t)?be(e,Jt)?Rv:ki:be(e,"PaleMoon/")?Lv:be(e,Xo+"/")?Xo:be(e,Sr)?Sr:be(e,"MSIE")||be(e,"Trident/")?$c:be(e,"Gecko")?Sr:"")},mk={[Av]:[new RegExp("rv:"+Xe)],[Ov]:[new RegExp(Dc+"?\\/"+Xe)],[Vs]:[new RegExp("("+Vs+"|CrMo)\\/"+Xe)],[Pv]:[new RegExp("CriOS\\/"+Xe)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+Xe)],[ki]:[yl],[Rv]:[yl],[Fc]:[new RegExp("(Opera|OPR)\\/"+Xe)],[Sr]:[new RegExp(Sr+"\\/"+Xe)],[Tv]:[new RegExp("FxiOS\\/"+Xe)],[bu]:[new RegExp("Konqueror[:/]?"+Xe,"i")],[Mr]:[new RegExp(Mr+" "+Xe),yl],[Iv]:[new RegExp("android\\s"+Xe,"i")],[Cv]:[new RegExp(Sv+"\\/"+Xe)],[Fv]:[new RegExp("OculusBrowser\\/"+Xe)],[Yo]:[new RegExp(Yo+"\\/"+Xe)],[Dv]:[new RegExp("YaBrowser\\/"+Xe)],[Jo]:[new RegExp(Jo+"\\/"+Xe)],[Ei]:[new RegExp(Ei+"\\/"+Xe)],[xu]:[new RegExp("(DuckDuckGo|Ddg)\\/"+Xe)],[Lv]:[new RegExp("PaleMoon\\/"+Xe)],[Xo]:[new RegExp(Xo+"\\/"+Xe)],[Nv]:[new RegExp("GSA\\/"+Xe)],[$c]:[new RegExp("(rv:|MSIE )"+Xe)],Mozilla:[new RegExp("rv:"+Xe)]},_k=function(e,t,n,s){var r=qv(e,t,n,s),i=mk[r];if(te(i))return null;for(var o=0;i.length>o;o++){var a=e.match(i[o]);if(a)return parseFloat(a[a.length-2])}return null},Lf=[[new RegExp(Cr+"; "+Cr+" (.*?)[);]","i"),e=>[Cr,e&&e[1]||""]],[new RegExp(Ni,"i"),[Ni,""]],[new RegExp(qi,"i"),[qi,""]],[Lc,[Mr,""]],[new RegExp(ui,"i"),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[_u,""];if(new RegExp(Jt).test(t)&&!/IEMobile\b/.test(t))return[ui+" "+Jt,""];var n=/Windows NT ([0-9.]+)/i.exec(t);if(n&&n[1]){var s=vk[n[1]]||"";return/arm/i.test(t)&&(s="RT"),[ui,s]}return[ui,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>e&&e[3]?[Ko,[e[3],e[4],e[5]||"0"].join(".")]:[Ko,""]],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var t="";return e&&e.length>=3&&(t=te(e[2])?e[3]:e[2]),["watchOS",t]}],[new RegExp("("+Yn+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+Yn+")","i"),e=>e&&e[2]?[Yn,[e[2],e[3],e[4]||"0"].join(".")]:[Yn,""]],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{var t=["Mac OS X",""];return e&&e[1]&&(t[1]=[e[1],e[2],e[3]||"0"].join(".")),t}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[ck,""]],[/Linux|debian/i,["Linux",""]]],Nf=function(e){return gk.test(e)?Ni:hk.test(e)?qi:pk.test(e)?Cr:new RegExp(yu,"i").test(e)?yu:new RegExp("("+_u+"|WPDesktop)","i").test(e)?_u:/iPad/.test(e)?xv:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?kv:Lc.test(e)?Mr:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(Df,"i").test(e)?Df:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(e)||/(kf[a-z]+)( bui|\)).+silk\//i.test(e)?"Kindle Fire":/(Android|ZTE)/i.test(e)?new RegExp(Jt).test(e)&&!/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(e)||/pixel[\daxl ]{1,6}/i.test(e)&&!/pixel c/i.test(e)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(e)||/lmy47v/i.test(e)&&!/QTAQZ3/i.test(e)?Yn:bv:new RegExp("(pda|"+Jt+")","i").test(e)?fk:new RegExp(Rr,"i").test(e)&&!new RegExp(Rr+" pc","i").test(e)?$v:""},yk=e=>e instanceof Error,Bv={trace:{text:"TRACE",number:1},debug:{text:"DEBUG",number:5},info:{text:"INFO",number:9},warn:{text:"WARN",number:13},error:{text:"ERROR",number:17},fatal:{text:"FATAL",number:21}},bk=Bv.info;function zv(e){if(Pn(e))return{boolValue:e};if(typeof e=="number")return Number.isFinite(e)?Number.isInteger(e)?{intValue:e}:{doubleValue:e}:{stringValue:String(e)};if(typeof e=="string")return{stringValue:e};if(Ce(e))return{arrayValue:{values:e.map((t=>zv(t)))}};try{return{stringValue:JSON.stringify(e)}}catch{return{stringValue:String(e)}}}function qf(e){var t=[];for(var n in e){var s=e[n];$t(s)||te(s)||t.push({key:n,value:zv(s)})}return t}function xk(e){var t=globalThis._posthogChunkIds;if(t){var n=Object.keys(t);return _l&&n.length===Ff||(Ff=n.length,_l=n.reduce(((s,r)=>{go||(go={});var i=go[r];if(i)s[i[0]]=i[1];else for(var o=e(r),a=o.length-1;a>=0;a--){var l=o[a],c=l==null?void 0:l.filename,u=t[r];if(c&&u){s[c]=u,go[r]=[c,u];break}}return s}),{})),_l}}class wk{constructor(t,n,s){s===void 0&&(s=[]),this.coercers=t,this.stackParser=n,this.modifiers=s}buildFromUnknown(t,n){n===void 0&&(n={});var s=n&&n.mechanism||{handled:!0,type:"generic"},r=this.buildCoercingContext(s,n,0).apply(t),i=this.buildParsingContext(n),o=this.parseStacktrace(r,i);return{$exception_list:this.convertToExceptionList(o,s),$exception_level:"error"}}modifyFrames(t){var n=this;return jt((function*(){for(var s of t)s.stacktrace&&s.stacktrace.frames&&Ce(s.stacktrace.frames)&&(s.stacktrace.frames=yield n.applyModifiers(s.stacktrace.frames));return t}))()}coerceFallback(t){var n;return{type:"Error",value:"Unknown error",stack:(n=t.syntheticException)==null?void 0:n.stack,synthetic:!0}}parseStacktrace(t,n){var s,r;return t.cause!=null&&(s=this.parseStacktrace(t.cause,n)),t.stack!=""&&t.stack!=null&&(r=this.applyChunkIds(this.stackParser(t.stack,t.synthetic?n.skipFirstLines:0),n.chunkIdMap)),Z({},t,{cause:s,stack:r})}applyChunkIds(t,n){return t.map((s=>(s.filename&&n&&(s.chunk_id=n[s.filename]),s)))}applyCoercers(t,n){for(var s of this.coercers)if(s.match(t))return s.coerce(t,n);return this.coerceFallback(n)}applyModifiers(t){var n=this;return jt((function*(){var s=t;for(var r of n.modifiers)s=yield r(s);return s}))()}convertToExceptionList(t,n){var s,r,i,o={type:t.type,value:t.value,mechanism:{type:(s=n.type)!==null&&s!==void 0?s:"generic",handled:(r=n.handled)===null||r===void 0||r,synthetic:(i=t.synthetic)!==null&&i!==void 0&&i}};t.stack&&(o.stacktrace={type:"raw",frames:t.stack});var a=[o];return t.cause!=null&&a.push(...this.convertToExceptionList(t.cause,Z({},n,{handled:!0}))),a}buildParsingContext(t){var n;return{chunkIdMap:xk(this.stackParser),skipFirstLines:(n=t.skipFirstLines)!==null&&n!==void 0?n:1}}buildCoercingContext(t,n,s){s===void 0&&(s=0);var r=(i,o)=>{if(4>=o){var a=this.buildCoercingContext(t,n,o);return this.applyCoercers(i,a)}};return Z({},n,{syntheticException:s==0?n.syntheticException:void 0,mechanism:t,apply:i=>r(i,s),next:i=>r(i,s+1)})}}var $r="?";function wu(e,t,n,s,r){var i={platform:e,filename:t,function:n==="<anonymous>"?$r:n,in_app:!0};return te(s)||(i.lineno=s),te(r)||(i.colno=r),i}var jv=(e,t)=>{var n=e.indexOf("safari-extension")!==-1,s=e.indexOf("safari-web-extension")!==-1;return n||s?[e.indexOf("@")!==-1?e.split("@")[0]:$r,n?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]},kk=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Ek=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Sk=/\((\S*)(?::(\d+))(?::(\d+))\)/,Ck=(e,t)=>{var n=kk.exec(e);if(n){var[,s,r,i]=n;return wu(t,s,$r,+r,+i)}var o=Ek.exec(e);if(o){if(o[2]&&o[2].indexOf("eval")===0){var a=Sk.exec(o[2]);a&&(o[2]=a[1],o[3]=a[2],o[4]=a[3])}var[l,c]=jv(o[1]||$r,o[2]);return wu(t,c,l,o[3]?+o[3]:void 0,o[4]?+o[4]:void 0)}},Pk=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Ak=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Ok=(e,t)=>{var n=Pk.exec(e);if(n){if(n[3]&&n[3].indexOf(" > eval")>-1){var s=Ak.exec(n[3]);s&&(n[1]=n[1]||"eval",n[3]=s[1],n[4]=s[2],n[5]="")}var r=n[3],i=n[1]||$r;return[i,r]=jv(i,r),wu(t,r,i,n[4]?+n[4]:void 0,n[5]?+n[5]:void 0)}},Bf=/\(error: (.*)\)/;class Tk{match(t){return this.isDOMException(t)||this.isDOMError(t)}coerce(t,n){var s=Ue(t.stack);return{type:this.getType(t),value:this.getValue(t),stack:s?t.stack:void 0,cause:t.cause?n.next(t.cause):void 0,synthetic:!1}}getType(t){return this.isDOMError(t)?"DOMError":"DOMException"}getValue(t){var n=t.name||(this.isDOMError(t)?"DOMError":"DOMException");return t.message?n+": "+t.message:n}isDOMException(t){return Go(t,"DOMException")}isDOMError(t){return Go(t,"DOMError")}}class Ik{match(t){return(n=>n instanceof Error)(t)}coerce(t,n){return{type:this.getType(t),value:this.getMessage(t,n),stack:this.getStack(t),cause:t.cause?n.next(t.cause):void 0,synthetic:!1}}getType(t){return t.name||t.constructor.name}getMessage(t,n){var s=t.message;return String(s.error&&typeof s.error.message=="string"?s.error.message:s)}getStack(t){return t.stacktrace||t.stack||void 0}}class Rk{constructor(){}match(t){return Go(t,"ErrorEvent")&&t.error!=null}coerce(t,n){var s;return n.apply(t.error)||{type:"ErrorEvent",value:t.message,stack:(s=n.syntheticException)==null?void 0:s.stack,synthetic:!0}}}var Mk=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;class $k{match(t){return typeof t=="string"}coerce(t,n){var s,[r,i]=this.getInfos(t);return{type:r??"Error",value:i??t,stack:(s=n.syntheticException)==null?void 0:s.stack,synthetic:!0}}getInfos(t){var n="Error",s=t,r=t.match(Mk);return r&&(n=r[1],s=r[2]),[n,s]}}var Fk=["fatal","error","warning","log","info","debug"];function Hv(e,t){t===void 0&&(t=40);var n=Object.keys(e);if(n.sort(),!n.length)return"[object has no keys]";for(var s=n.length;s>0;s--){var r=n.slice(0,s).join(", ");if(t>=r.length)return s===n.length?r:r.length>t?r.slice(0,t)+"...":r}return""}class Dk{match(t){return typeof t=="object"&&t!==null}coerce(t,n){var s,r=this.getErrorPropertyFromObject(t);return r?n.apply(r):{type:this.getType(t),value:this.getValue(t),stack:(s=n.syntheticException)==null?void 0:s.stack,level:this.isSeverityLevel(t.level)?t.level:"error",synthetic:!0}}getType(t){return Mc(t)?t.constructor.name:"Error"}getValue(t){if("name"in t&&typeof t.name=="string"){var n="'"+t.name+"' captured as exception";return"message"in t&&typeof t.message=="string"&&(n+=" with message: '"+t.message+"'"),n}if("message"in t&&typeof t.message=="string")return t.message;var s=this.getObjectClassName(t);return(s&&s!=="Object"?"'"+s+"'":"Object")+" captured as exception with keys: "+Hv(t)}isSeverityLevel(t){return Ue(t)&&!mu(t)&&Fk.indexOf(t)>=0}getErrorPropertyFromObject(t){for(var n in t)if({}.hasOwnProperty.call(t,n)){var s=t[n];if(yk(s))return s}}getObjectClassName(t){try{var n=Object.getPrototypeOf(t);return n?n.constructor.name:void 0}catch{return}}}class Lk{match(t){return Mc(t)}coerce(t,n){var s,r=t.constructor.name;return{type:r,value:r+" captured as exception with keys: "+Hv(t),stack:(s=n.syntheticException)==null?void 0:s.stack,synthetic:!0}}}class Nk{match(t){return yv(t)}coerce(t,n){var s;return{type:"Error",value:"Primitive value captured as exception: "+String(t),stack:(s=n.syntheticException)==null?void 0:s.stack,synthetic:!0}}}class qk{match(t){return Go(t,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(t)}isCustomEventWrappingRejection(t){if(!Mc(t))return!1;try{var n=t.detail;return n!=null&&typeof n=="object"&&"reason"in n}catch{return!1}}coerce(t,n){var s,r=this.getUnhandledRejectionReason(t);return yv(r)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(r),stack:(s=n.syntheticException)==null?void 0:s.stack,synthetic:!0}:n.apply(r)}getUnhandledRejectionReason(t){try{if("reason"in t)return t.reason;if("detail"in t&&t.detail!=null&&typeof t.detail=="object"&&"reason"in t.detail)return t.detail.reason}catch{}return t}}var Zo="$message",Qo="$timestamp",Bk=new Set([Zo,Qo]),bl={enabled:!0,max_bytes:32768};function ea(e){var t;return e?{enabled:(t=e.enabled)!==null&&t!==void 0?t:bl.enabled,max_bytes:jk(e.max_bytes,bl.max_bytes)}:Z({},bl)}class zk{constructor(t){this.Yt=[],this.Xt=0,this.qt=ea(t)}setConfig(t){this.qt=ea(t),this.er()}add(t){var n=(function(r){var i=(function(u){var d=new WeakSet;try{return JSON.stringify(u,((f,p)=>{if(typeof p=="bigint")return p.toString();if(typeof p!="function"&&typeof p!="symbol"){if(p instanceof Date)return p.toISOString();if(p instanceof Error)return{name:p.name,message:p.message,stack:p.stack};if(p&&typeof p=="object"){if(d.has(p))return"[Circular]";d.add(p)}return p}}))}catch{return}})(r);if(i)try{var o=JSON.parse(i);if(!et(o))return;var a=o,l=a[Zo],c=a[Qo];return!Ue(l)||l.trim().length===0||!Ue(c)&&!Ft(c)?void 0:{step:a,json:i}}catch{return}})(t);if(n){var s=(function(r){if(typeof TextEncoder<"u")return new TextEncoder().encode(r).length;for(var i=encodeURIComponent(r),o=0,a=0;i.length>a;a++)i[a]==="%"?(o+=1,a+=2):o+=1;return o})(n.json);s>this.qt.max_bytes||(this.Yt.push({step:n.step,bytes:s}),this.Xt+=s,this.er())}}getAttachable(){return this.Yt.map((t=>t.step))}clear(){this.Yt=[],this.Xt=0}size(){return this.Yt.length}er(){for(;this.Xt>this.qt.max_bytes&&this.Yt.length>0;){var t=this.Yt.shift();t&&(this.Xt-=t.bytes)}}}function jk(e,t){if(!Ft(e)||e===1/0||e===-1/0)return t;var n=Math.floor(e);return 0>n?t:n}var Vv=function(e,t){var{debugEnabled:n}=t===void 0?{}:t,s={k(r){if(M&&(gt.DEBUG||he.POSTHOG_DEBUG||n)&&!te(M.console)&&M.console){for(var i=("__rrweb_original__"in M.console[r])?M.console[r].__rrweb_original__:M.console[r],o=arguments.length,a=new Array(o>1?o-1:0),l=1;o>l;l++)a[l-1]=arguments[l];i(e,...a)}},debug(){for(var r=arguments.length,i=new Array(r),o=0;r>o;o++)i[o]=arguments[o];s.k("debug",...i)},info(){for(var r=arguments.length,i=new Array(r),o=0;r>o;o++)i[o]=arguments[o];s.k("log",...i)},warn(){for(var r=arguments.length,i=new Array(r),o=0;r>o;o++)i[o]=arguments[o];s.k("warn",...i)},error(){for(var r=arguments.length,i=new Array(r),o=0;r>o;o++)i[o]=arguments[o];s.k("error",...i)},critical(){for(var r=arguments.length,i=new Array(r),o=0;r>o;o++)i[o]=arguments[o];console.error(e,...i)},uninitializedWarning(r){s.error("You must initialize PostHog before calling "+r)},createLogger:(r,i)=>Vv(e+" "+r,i)};return s},re=Vv("[PostHog.js]"),Ze=re.createLogger,Hk=Ze("[ExternalScriptsLoader]"),xl=(e,t,n)=>{if(e.config.disable_external_dependency_loading)return Hk.warn(t+" was requested but loading of external scripts is disabled."),n("Loading of external scripts is disabled");var s=ie==null?void 0:ie.querySelectorAll("script");if(s){for(var r,i=function(){if(s[o].src===t){var l=s[o];return l.__posthog_loading_callback_fired?{v:n()}:(l.addEventListener("load",(c=>{l.__posthog_loading_callback_fired=!0,n(void 0,c)})),l.onerror=c=>n(c),{v:void 0})}},o=0;s.length>o;o++)if(r=i())return r.v}var a=()=>{if(!ie)return n("document not found");var l=ie.createElement("script");if(l.type="text/javascript",l.crossOrigin="anonymous",l.src=t,l.onload=d=>{l.__posthog_loading_callback_fired=!0,n(void 0,d)},l.onerror=d=>n(d),e.config.prepare_external_dependency_script&&(l=e.config.prepare_external_dependency_script(l)),!l)return n("prepare_external_dependency_script returned null");if(e.config.external_scripts_inject_target==="head")ie.head.appendChild(l);else{var c,u=ie.querySelectorAll("body > script");u.length>0?(c=u[0].parentNode)==null||c.insertBefore(l,u[0]):ie.body.appendChild(l)}};ie!=null&&ie.body?a():ie==null||ie.addEventListener("DOMContentLoaded",a)};he.__PosthogExtensions__=he.__PosthogExtensions__||{},he.__PosthogExtensions__.loadExternalDependency=(e,t,n)=>{if(t!=="remote-config"){var s;if(e.config.strict_script_versioning)s=e.requestRouter.endpointFor("assets","/static/"+e.version+"/"+t+".js");else{var r="/static/"+t+".js?v="+e.version;if(t==="toolbar"){var i=3e5;r=r+"&t="+Math.floor(Date.now()/i)*i}s=e.requestRouter.endpointFor("assets",r)}xl(e,s,n)}else{var o=e.requestRouter.endpointFor("assets","/array/"+e.config.token+"/config.js");xl(e,o,n)}},he.__PosthogExtensions__.loadSiteApp=(e,t,n)=>{var s=e.requestRouter.endpointFor("api",t);xl(e,s,n)};var Uv="$people_distinct_id",ta="$device_id",ci="__alias",di="__timers",ku="$autocapture_disabled_server_side",Eu="$heatmaps_enabled_server_side",Su="$exception_capture_enabled_server_side",Cu="$error_tracking_suppression_rules",Pu="$error_tracking_capture_extension_exceptions",Au="$web_vitals_enabled_server_side",Nc="$dead_clicks_enabled_server_side",qc="$product_tours_enabled_server_side",Ou="$web_vitals_allowed_metrics",zs="$session_recording_remote_config",Wv="$replay_sample_rate",Gv="$replay_override_sampling",Kv="$replay_override_linked_flag",Yv="$replay_override_url_trigger",Jv="$replay_override_event_trigger",pr="$sesid",Bc="$session_is_sampled",hr="$enabled_feature_flags",Po="$active_feature_flags",fi="$early_access_features",Tu="$feature_flag_details",Iu="$feature_flag_payloads",Ru="$feature_flag_request_id",qn="$override_feature_flags",cr="$override_feature_flag_payloads",Ds="$stored_person_properties",Ls="$stored_group_properties",Mu="$surveys",zc="$surveys_loaded_at",$u="$surveys_activated",pi="ph_product_tours",Si="$flag_call_reported",Fu="$flag_call_reported_session_id",Du="$feature_flag_errors",Bi="$feature_flag_evaluated_at",nn="$user_state",Lu="$client_session_props",Nu="$capture_rate_limit",qu="$initial_campaign_params",Bu="$initial_referrer_info",na="$initial_person_info",sa="$epp",Xv="__POSTHOG_TOOLBAR__",vo="$posthog_cookieless",Zv="$sdk_debug_extensions_init_method",Qv="$sdk_debug_extensions_init_time_ms",em="$sdk_debug_recording_script_not_loaded",jc="PostHog loadExternalDependency extension not found.",Ns="on_reject",Gn="always",tr="anonymous",nr="identified",zu="identified_only",ra="visibilitychange",ia="beforeunload",dr="$pageview",wl="$pageleave",kl="$identify",zf="$groupidentify";function mo(e,t){Ce(e)&&e.forEach(t)}function je(e,t){if(!Se(e))if(Ce(e))e.forEach(t);else if(rk(e))e.forEach(((s,r)=>t(s,r)));else for(var n in e)_v.call(e,n)&&t(e[n],n)}var Ge=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),s=1;t>s;s++)n[s-1]=arguments[s];for(var r of n)for(var i in r)r[i]!==void 0&&(e[i]=r[i]);return e};function Ao(e){for(var t=Object.keys(e),n=t.length,s=new Array(n);n--;)s[n]=[t[n],e[t[n]]];return s}var jf=function(e){try{return e()}catch{return}},Vk=function(e){return function(){try{for(var t=arguments.length,n=new Array(t),s=0;t>s;s++)n[s]=arguments[s];return e.apply(this,n)}catch(r){re.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),re.critical(r)}}},Hc=function(e){var t={};return je(e,(function(n,s){(Ue(n)&&n.length>0||Ft(n))&&(t[s]=n)})),t},Uk=["herokuapp.com","vercel.app","netlify.app"];function Wk(e){var t=e==null?void 0:e.hostname;if(!Ue(t))return!1;var n=t.split(".").slice(-2).join(".");for(var s of Uk)if(n===s)return!1;return!0}function rt(e,t,n,s){var{capture:r=!1,passive:i=!0}=s??{};e==null||e.addEventListener(t,n,{capture:r,passive:i})}function tm(e){return e.name==="ph_toolbar_internal"}Math.trunc||(Math.trunc=function(e){return 0>e?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return Ft(e)&&isFinite(e)&&Math.floor(e)===e});class oa{constructor(t){if(this.bytes=t,t.length!==16)throw new TypeError("not 128-bit length")}static fromFieldsV7(t,n,s,r){if(!Number.isInteger(t)||!Number.isInteger(n)||!Number.isInteger(s)||!Number.isInteger(r)||0>t||0>n||0>s||0>r||t>0xffffffffffff||n>4095||s>1073741823||r>4294967295)throw new RangeError("invalid field value");var i=new Uint8Array(16);return i[0]=t/Math.pow(2,40),i[1]=t/Math.pow(2,32),i[2]=t/Math.pow(2,24),i[3]=t/Math.pow(2,16),i[4]=t/Math.pow(2,8),i[5]=t,i[6]=112|n>>>8,i[7]=n,i[8]=128|s>>>24,i[9]=s>>>16,i[10]=s>>>8,i[11]=s,i[12]=r>>>24,i[13]=r>>>16,i[14]=r>>>8,i[15]=r,new oa(i)}toString(){for(var t="",n=0;this.bytes.length>n;n++)t=t+(this.bytes[n]>>>4).toString(16)+(15&this.bytes[n]).toString(16),n!==3&&n!==5&&n!==7&&n!==9||(t+="-");if(t.length!==36)throw new Error("Invalid UUIDv7 was generated");return t}clone(){return new oa(this.bytes.slice(0))}equals(t){return this.compareTo(t)===0}compareTo(t){for(var n=0;16>n;n++){var s=this.bytes[n]-t.bytes[n];if(s!==0)return Math.sign(s)}return 0}}class Gk{constructor(){this.S=0,this.C=0,this.I=new Kk}generate(){var t=this.generateOrAbort();if(te(t)){this.S=0;var n=this.generateOrAbort();if(te(n))throw new Error("Could not generate UUID after timestamp reset");return n}return t}generateOrAbort(){var t=Date.now();if(t>this.S)this.S=t,this.T();else{if(this.S>=t+1e4)return;this.C++,this.C>4398046511103&&(this.S++,this.T())}return oa.fromFieldsV7(this.S,Math.trunc(this.C/Math.pow(2,30)),this.C&Math.pow(2,30)-1,this.I.nextUint32())}T(){this.C=1024*this.I.nextUint32()+(1023&this.I.nextUint32())}}var Hf,nm=e=>{if(typeof UUIDV7_DENY_WEAK_RNG<"u"&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var t=0;e.length>t;t++)e[t]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};M&&!te(M.crypto)&&crypto.getRandomValues&&(nm=e=>crypto.getRandomValues(e));class Kk{constructor(){this.M=new Uint32Array(8),this.R=1/0}nextUint32(){return this.M.length>this.R||(nm(this.M),this.R=0),this.M[this.R++]}}var ps=()=>Yk().toString(),Yk=()=>(Hf||(Hf=new Gk)).generate(),Xr="",Jk=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,xn={O:()=>!!ie,D(e){re.error("cookieStore error: "+e)},A(e){if(ie){try{for(var t=e+"=",n=ie.cookie.split(";").filter((i=>i.length)),s=0;n.length>s;s++){for(var r=n[s];r.charAt(0)==" ";)r=r.substring(1,r.length);if(r.indexOf(t)===0)return decodeURIComponent(r.substring(t.length,r.length))}}catch{}return null}},F(e){var t;try{t=JSON.parse(xn.A(e))||{}}catch{}return t},N(e,t,n,s,r){if(!ie)return!1;try{var i="",o="",a=(function(u,d){if(d){var f=(function(g,h){if(h===void 0&&(h=ie),Xr)return Xr;if(!h||["localhost","127.0.0.1"].includes(g))return"";for(var m=g.split("."),v=Math.min(m.length,8),y="dmn_chk_"+ps();!Xr&&v--;){var x=m.slice(v).join("."),k=y+"=1;domain=."+x+";path=/";h.cookie=k+";max-age=3",h.cookie.includes(y)&&(h.cookie=k+";max-age=0",Xr=x)}return Xr})(u);if(!f){var p=(g=>{var h=g.match(Jk);return h?h[0]:""})(u);p!==f&&re.info("Warning: cookie subdomain discovery mismatch",p,f),f=p}return f?"; domain=."+f:""}return""})(ie.location.hostname,s);if(n){var l=new Date;l.setTime(l.getTime()+864e5*n),i="; expires="+l.toUTCString()}r&&(o="; secure");var c=e+"="+encodeURIComponent(JSON.stringify(t))+i+"; SameSite=Lax; path=/"+a+o;return c.length>3686.4&&re.warn("cookieStore warning: large cookie, len="+c.length),ie.cookie=c,!0}catch{return!1}},q(e,t){if(ie!=null&&ie.cookie)try{xn.N(e,"",-1,t)}catch{return}}},El=null,ze={O(){if(!$t(El))return El;var e=!0;if(te(M))e=!1;else try{var t="__mplssupport__";ze.N(t,"xyz"),ze.A(t)!=='"xyz"'&&(e=!1),ze.q(t)}catch{e=!1}return e||re.error("localStorage unsupported; falling back to cookie store"),El=e,e},D(e){re.error("localStorage error: "+e)},A(e){try{return M==null?void 0:M.localStorage.getItem(e)}catch(t){ze.D(t)}return null},F(e){try{return JSON.parse(ze.A(e))||{}}catch{}return null},N(e,t){try{return M==null||M.localStorage.setItem(e,JSON.stringify(t)),!0}catch(n){ze.D(n)}return!1},q(e){try{M==null||M.localStorage.removeItem(e)}catch(t){ze.D(t)}}},Xk=[ta,"distinct_id",pr,Bc,sa,na,nn],_o={},Zk={O:()=>!0,D(e){re.error("memoryStorage error: "+e)},A:e=>_o[e]||null,F:e=>_o[e]||null,N:(e,t)=>(_o[e]=t,!0),q(e){delete _o[e]}},Os=null,xt={O(){if(!$t(Os))return Os;if(Os=!0,te(M))Os=!1;else try{var e="__support__";xt.N(e,"xyz"),xt.A(e)!=='"xyz"'&&(Os=!1),xt.q(e)}catch{Os=!1}return Os},D(e){re.error("sessionStorage error: ",e)},A(e){try{return M==null?void 0:M.sessionStorage.getItem(e)}catch(t){xt.D(t)}return null},F(e){try{return JSON.parse(xt.A(e))||null}catch{}return null},N(e,t){try{return M==null||M.sessionStorage.setItem(e,JSON.stringify(t)),!0}catch(n){xt.D(n)}return!1},q(e){try{M==null||M.sessionStorage.removeItem(e)}catch(t){xt.D(t)}}};class Qk{constructor(t){this._instance=t}get qt(){return this._instance.config}get consent(){return this.rr()?0:this.ir}isOptedOut(){return this.qt.cookieless_mode===Gn||this.isRejected()||this.consent===-1&&this.qt.cookieless_mode===Ns}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return this.consent===0}isRejected(){return this.consent===0||this.consent===-1&&this.qt.opt_out_capturing_by_default}optInOut(t){this.nr.N(this.sr,t?1:0,this.qt.cookie_expiration,this.qt.cross_subdomain_cookie,this.qt.secure_cookie)}reset(){this.nr.q(this.sr,this.qt.cross_subdomain_cookie)}get sr(){var{token:t,opt_out_capturing_cookie_prefix:n,consent_persistence_name:s}=this._instance.config;return s||(n?n+t:"__ph_opt_in_out_"+t)}get ir(){var t=this.nr.A(this.sr);return ml(t)?1:be(lk,t)?0:-1}get nr(){var t=this.qt.opt_out_capturing_persistence_type,n=t==="localStorage"?ze:xn;if(!this.ar||this.ar!==n){this.ar=n;var s=t==="localStorage"?xn:ze;s.A(this.sr)&&(this.ar.A(this.sr)||this.optInOut(ml(s.A(this.sr))),s.q(this.sr,this.qt.cross_subdomain_cookie))}return this.ar}rr(){return!!this.qt.respect_dnt&&[Ut==null?void 0:Ut.doNotTrack,Ut==null?void 0:Ut.msDoNotTrack,he.doNotTrack].some((t=>ml(t)))}}var eE=1,tE=3,nE=11;function Vf(e){return e instanceof Element&&(e.id===Xv||!(e.closest==null||!e.closest(".toolbar-global-fade-container")))}function xs(e){return!!e&&e.nodeType===eE}function Wt(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function sm(e){return!!e&&e.nodeType===tE}function rm(e){return!!e&&e.nodeType===nE&&xs(e.host)}function Vc(e){return e?ja(e).split(/\s+/):[]}function Uf(e){var t=M==null?void 0:M.location.href;return!!(t&&e&&e.some((n=>t.match(n))))}function aa(e){var t="";switch(typeof e.className){case"string":t=e.className;break;case"object":t=(e.className&&"baseVal"in e.className?e.className.baseVal:null)||e.getAttribute("class")||"";break;default:t=""}return Vc(t)}function im(e){return Se(e)?null:ja(e).split(/(\s+)/).filter((t=>Ci(t))).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function zi(e){var t="";return Hu(e)&&!um(e)&&e.childNodes&&e.childNodes.length&&je(e.childNodes,(function(n){var s;sm(n)&&n.textContent&&(t+=(s=im(n.textContent))!==null&&s!==void 0?s:"")})),ja(t)}function Sl(e){return te(e.target)?e.srcElement||null:(t=e.target)!=null&&t.shadowRoot?e.composedPath()[0]||null:e.target||null;var t}var Uc=["a","button","form","input","select","textarea","label"];function ju(e,t){if(te(t))return!0;var n,s=function(i){if(t.some((o=>(function(a,l){var c=a.matches||a.matchesSelector||a.msMatchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.oMatchesSelector;try{return!!c&&c.call(a,l)}catch{return!1}})(i,o))))return{v:!0}};for(var r of e)if(n=s(r))return n.v;return!1}function om(e){var t=e.parentNode;return!(!t||!xs(t))&&t}var sE=[".ph-no-autocapture","[data-ph-no-autocapture]"],am=["next","previous","prev",">","<"],rE=[...am,"+","-","−","–"],Wf=(e,t)=>/[a-z0-9]/i.test(t)?e.includes(t):e===t,Gf=[".ph-no-rageclick",".ph-no-capture"],iE=["","text","search","email","password","url","tel","number"];function Kf(e,t){if(!M||Wc(e))return!1;var n,s,r,i,o;if(Pn(t)?(n=!!t&&Gf,s=void 0,r=!1):(n=(i=t==null?void 0:t.css_selector_ignorelist)!==null&&i!==void 0?i:Gf,s=t==null?void 0:t.content_ignorelist,r=(o=t==null?void 0:t.ignore_text_selection)!==null&&o!==void 0&&o),n===!1||r&&(function(l){return!(!l||!xs(l))&&(!!Wt(l,"textarea")||(Wt(l,"input")?be(iE,(l.getAttribute("type")||"").toLowerCase()):(function(c){if(c.isContentEditable)return!0;var u=c.getAttribute==null?void 0:c.getAttribute("contenteditable");return u==="true"||u===""})(l)))})(e))return!1;var{targetElementList:a}=lm(e,!1);return!(function(l,c){if(l===!1||te(l))return!1;var u;if(l===!0)u=am;else{if(!Ce(l))return!1;if(l.length>10)return re.error("[PostHog] content_ignorelist array cannot exceed 10 items. Use css_selector_ignorelist for more complex matching."),!1;u=l.map((d=>d.toLowerCase()))}return c.some((d=>{var{safeText:f,ariaLabel:p}=d;return u.some((g=>Wf(f,g)||Wf(p,g)))}))})(s,a.map((l=>{var c;return{safeText:zi(l).toLowerCase(),ariaLabel:((c=l.getAttribute("aria-label"))==null?void 0:c.toLowerCase().trim())||""}})))&&!ju(a,n)}var Wc=e=>!e||Wt(e,"html")||!xs(e),lm=(e,t)=>{if(!M||Wc(e))return{parentIsUsefulElement:!1,targetElementList:[]};for(var n=!1,s=[e],r=e;r.parentNode&&!Wt(r,"body");)if(rm(r.parentNode))s.push(r.parentNode.host),r=r.parentNode.host;else{var i=om(r);if(!i)break;if(t||Uc.indexOf(i.tagName.toLowerCase())>-1)n=!0;else{var o=M.getComputedStyle(i);o&&o.getPropertyValue("cursor")==="pointer"&&(n=!0)}s.push(i),r=i}return{parentIsUsefulElement:n,targetElementList:s}};function Hu(e){for(var t=e;t.parentNode&&!Wt(t,"body");t=t.parentNode){var n=aa(t);if(be(n,"ph-sensitive")||be(n,"ph-no-capture"))return!1}if(be(aa(e),"ph-include"))return!0;var s=e.type||"";if(Ue(s))switch(s.toLowerCase()){case"hidden":case"password":return!1}var r=e.name||e.id||"";return!Ue(r)||!/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(r.replace(/[^a-zA-Z0-9]/g,""))}function um(e){return!!(Wt(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||Wt(e,"select")||Wt(e,"textarea")||e.getAttribute("contenteditable")==="true")}var cm="(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})",oE=new RegExp("^(?:"+cm+")$"),aE=new RegExp(cm),dm="\\d{3}-?\\d{2}-?\\d{4}",lE=new RegExp("^("+dm+")$"),uE=new RegExp("("+dm+")");function Ci(e,t){return t===void 0&&(t=!0),!(Se(e)||Ue(e)&&(e=ja(e),(t?oE:aE).test((e||"").replace(/[- ]/g,""))||(t?lE:uE).test(e)))}function Yf(e){var t=zi(e);return Ci(t=(t+" "+fm(e)).trim())?t:""}function fm(e){var t="";return e&&e.childNodes&&e.childNodes.length&&je(e.childNodes,(function(n){var s;if(n&&((s=n.tagName)==null?void 0:s.toLowerCase())==="span")try{var r=zi(n);t=(t+" "+r).trim(),n.childNodes&&n.childNodes.length&&(t=(t+" "+fm(n)).trim())}catch(i){re.error("[AutoCapture]",i)}})),t}function Jf(e){return e.replace(/"|\\"/g,'\\"')}function cE(e){var t=e.attr__class;return t?Ce(t)?t:Vc(t):void 0}var yo=Ze("[Dead Clicks]"),dE=()=>!0,fE=e=>{var t,n=!((t=e.instance.persistence)==null||!t.get_property(Nc)),s=e.instance.config.capture_dead_clicks;return Pn(s)?s:!!et(s)||n};class Xf{get lazyLoadedDeadClicksAutocapture(){return this.lr}constructor(t,n,s){this.instance=t,this.isEnabled=n,this.onCapture=s,this.startIfEnabledOrStop()}onRemoteConfig(t){"captureDeadClicks"in t&&(this.instance.persistence&&this.instance.persistence.register({[Nc]:t.captureDeadClicks}),this.startIfEnabledOrStop())}startIfEnabledOrStop(){this.isEnabled(this)?this.ur((()=>{this.hr()})):this.stop()}ur(t){var n,s;(n=he.__PosthogExtensions__)!=null&&n.initDeadClicksAutocapture?t():(s=he.__PosthogExtensions__)==null||s.loadExternalDependency==null||s.loadExternalDependency(this.instance,"dead-clicks-autocapture",(r=>{r?yo.error("failed to load script",r):t()}))}hr(){var t;if(ie){if(!this.lr&&(t=he.__PosthogExtensions__)!=null&&t.initDeadClicksAutocapture){var n=et(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};n.__onCapture=this.onCapture,this.lr=he.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,n),this.lr.start(ie),yo.info("starting...")}}else yo.error("`document` not found. Cannot start.")}stop(){this.lr&&(this.lr.stop(),this.lr=void 0,yo.info("stopping..."))}}var Cl=Ze("[SegmentIntegration]"),pm="posthog-js";function hm(e,t){var{organization:n,projectId:s,prefix:r,severityAllowList:i=["error"],sendExceptionsToPostHog:o=!0}=t===void 0?{}:t;return a=>{var l,c,u,d,f;if(i!=="*"&&!i.includes(a.level)||!e.__loaded)return a;a.tags||(a.tags={});var p=e.requestRouter.endpointFor("ui","/project/"+e.config.token+"/person/"+e.get_distinct_id());a.tags["PostHog Person URL"]=p,e.sessionRecordingStarted()&&(a.tags["PostHog Recording URL"]=e.get_session_replay_url({withTimestamp:!0}));var g,h=((l=a.exception)==null?void 0:l.values)||[],m=h.map((y=>Z({},y,{stacktrace:y.stacktrace?Z({},y.stacktrace,{type:"raw",frames:(y.stacktrace.frames||[]).map((x=>Z({},x,{platform:"web:javascript"})))}):void 0}))),v={$exception_message:((c=h[0])==null?void 0:c.value)||a.message,$exception_type:(u=h[0])==null?void 0:u.type,$exception_level:a.level,$exception_list:m,$sentry_event_id:a.event_id,$sentry_exception:a.exception,$sentry_exception_message:((d=h[0])==null?void 0:d.value)||a.message,$sentry_exception_type:(f=h[0])==null?void 0:f.type,$sentry_tags:a.tags};return n&&s&&(v.$sentry_url=(r||"https://sentry.io/organizations/")+n+"/issues/?project="+s+"&query="+a.event_id),o&&((g=e.exceptions)==null||g.sendExceptionEvent(v)),a}}class pE{constructor(t,n,s,r,i,o){this.name=pm,this.setupOnce=function(a){a(hm(t,{organization:n,projectId:s,prefix:r,severityAllowList:i,sendExceptionsToPostHog:o==null||o}))}}}class Zf{constructor(t){this.cr=(n,s,r)=>{r&&(r.noSessionId||r.activityTimeout||r.sessionPastMaximumLength||r.crossTabAdoption)&&(re.info("[PageViewManager] Session rotated, clearing pageview state",{sessionId:n,changeReason:r}),this.dr=void 0,this._instance.scrollManager.resetContext())},this._instance=t,this.vr()}vr(){var t;this.pr=(t=this._instance.sessionManager)==null?void 0:t.onSessionId(this.cr)}destroy(){var t;(t=this.pr)==null||t.call(this),this.pr=void 0}doPageView(t,n){var s,r=this.gr(t,n);return this.dr={pathname:(s=M==null?void 0:M.location.pathname)!==null&&s!==void 0?s:"",pageViewId:n,timestamp:t},this._instance.scrollManager.resetContext(),r}doPageLeave(t){var n;return this.gr(t,(n=this.dr)==null?void 0:n.pageViewId)}doEvent(){var t;return{$pageview_id:(t=this.dr)==null?void 0:t.pageViewId}}gr(t,n){var s=this.dr;if(!s)return{$pageview_id:n};var r={$pageview_id:n,$prev_pageview_id:s.pageViewId},i=this._instance.scrollManager.getContext();if(i&&!this._instance.config.disable_scroll_properties){var{maxScrollHeight:o,lastScrollY:a,maxScrollY:l,maxContentHeight:c,lastContentY:u,maxContentY:d}=i;if(!(te(o)||te(a)||te(l)||te(c)||te(u)||te(d))){o=Math.ceil(o),a=Math.ceil(a),l=Math.ceil(l),c=Math.ceil(c),u=Math.ceil(u),d=Math.ceil(d);var f=o>1?En(a/o,0,1,re):1,p=o>1?En(l/o,0,1,re):1,g=c>1?En(u/c,0,1,re):1,h=c>1?En(d/c,0,1,re):1;r=Ge(r,{$prev_pageview_last_scroll:a,$prev_pageview_last_scroll_percentage:f,$prev_pageview_max_scroll:l,$prev_pageview_max_scroll_percentage:p,$prev_pageview_last_content:u,$prev_pageview_last_content_percentage:g,$prev_pageview_max_content:d,$prev_pageview_max_content_percentage:h})}}return s.pathname&&(r.$prev_pageview_pathname=s.pathname),s.timestamp&&(r.$prev_pageview_duration=(t.getTime()-s.timestamp.getTime())/1e3),r}}var bo=["flags","surveys"],hE={[Uv]:{exposure:"hidden"},[ci]:{exposure:"hidden"},__cmpns:{exposure:"hidden"},[di]:{exposure:"hidden"},[ku]:{exposure:"event"},[Eu]:{exposure:"hidden"},[Su]:{exposure:"event"},[Cu]:{exposure:"hidden"},[Pu]:{exposure:"event"},[Au]:{exposure:"event"},[Nc]:{exposure:"event"},[qc]:{exposure:"hidden"},[Ou]:{exposure:"event"},[zs]:{exposure:"hidden"},$session_recording_enabled_server_side:{exposure:"hidden"},[pr]:{exposure:"hidden"},[Bc]:{exposure:"event"},[Wv]:{exposure:"event",shouldSkipFromEventProperties:e=>$t(e)},$session_past_minimum_duration:{exposure:"event"},$session_recording_url_trigger_activated_session:{exposure:"event"},$session_recording_event_trigger_activated_session:{exposure:"event"},$debug_first_full_snapshot_timestamp:{exposure:"event"},[hr]:{exposure:"derived",storageGroup:"flags",shouldSkipFromEventProperties:(e,t)=>t(),transformToEventProperties(e){if(!et(e))return{};for(var t={},n=Object.keys(e),s=0;n.length>s;s++)t["$feature/"+n[s]]=e[n[s]];return t}},[Po]:{exposure:"event",storageGroup:"flags"},[fi]:{exposure:"hidden"},[Tu]:{exposure:"hidden",storageGroup:"flags"},[Iu]:{exposure:"event",storageGroup:"flags"},[Ru]:{exposure:"event",storageGroup:"flags",volatile:!0},[qn]:{exposure:"event"},[cr]:{exposure:"hidden"},[Ds]:{exposure:"hidden"},[Ls]:{exposure:"hidden"},[Mu]:{exposure:"hidden",storageGroup:"surveys"},[zc]:{exposure:"hidden",storageGroup:"surveys",volatile:!0},[$u]:{exposure:"event"},[pi]:{exposure:"hidden"},$product_tours_activated:{exposure:"hidden"},$conversations_widget_session_id:{exposure:"event"},$conversations_ticket_id:{exposure:"event"},$conversations_widget_state:{exposure:"event"},$conversations_user_traits:{exposure:"event"},[Si]:{exposure:"hidden"},[Fu]:{exposure:"hidden"},[Du]:{exposure:"hidden"},[Bi]:{exposure:"hidden",storageGroup:"flags",volatile:!0},[nn]:{exposure:"hidden"},[Lu]:{exposure:"hidden"},[Nu]:{exposure:"hidden"},[qu]:{exposure:"hidden"},[Bu]:{exposure:"hidden"},[na]:{exposure:"hidden"},[sa]:{exposure:"hidden"},[Gv]:{exposure:"event"},[Kv]:{exposure:"event"},[Yv]:{exposure:"event"},[Jv]:{exposure:"event"},[Zv]:{exposure:"event"},[Qv]:{exposure:"event"},[em]:{exposure:"event"},$sdk_debug_replay_event_trigger_status:{exposure:"event"},$sdk_debug_replay_linked_flag_trigger_status:{exposure:"event"},$sdk_debug_replay_matched_recording_trigger_groups:{exposure:"event"},$sdk_debug_replay_remote_trigger_matching_config:{exposure:"event"},$sdk_debug_replay_trigger_groups_count:{exposure:"event"},$sdk_debug_replay_url_trigger_status:{exposure:"event"},$session_recording_start_reason:{exposure:"event"}},gE=[["$posthog_sr_group_event_trigger_",{exposure:"hidden"}],["$posthog_sr_group_url_trigger_",{exposure:"hidden"}],["$posthog_sr_group_sampling_",{exposure:"hidden"}]],Ts=e=>{var t=hE[e];if(t)return t;for(var[n,s]of gE)if(e.indexOf(n)===0)return s},la=e=>{var t=ie==null?void 0:ie.createElement("a");return te(t)?null:(t.href=e,t)},ji=function(e,t){for(var n,s=((e.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),r=0;s.length>r;r++){var i=s[r].split("=");if(i[0]===t){n=i;break}}if(!Ce(n)||2>n.length)return"";var o=n[1];try{o=decodeURIComponent(o)}catch{re.error("Skipping decoding for malformed query param: "+o)}return o.replace(/\+/g," ")},Hi=function(e,t,n){if(!e||!t||!t.length)return e;for(var s=e.split("#"),r=s[1],i=(s[0]||"").split("?"),o=i[1],a=i[0],l=(o||"").split("&"),c=[],u=0;l.length>u;u++){var d=l[u].split("=");Ce(d)&&(t.includes(d[0])?c.push(d[0]+"="+n):c.push(l[u]))}var f=a;return o!=null&&(f+="?"+c.join("&")),r!=null&&(f+="#"+r),f},ua=function(e,t){var n=e.match(new RegExp(t+"=([^&]*)"));return n?n[1]:null},xo="https?://(.*)",Fr=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],vE=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid",...Fr],Vi="<masked>",mE=["li_fat_id"];function gm(e,t,n){if(!ie)return{};var s,r=t?[...Fr,...n||[]]:[],i=vm(Hi(ie.URL,r,Vi),e),o=(s={},je(mE,(function(a){var l=xn.A(a);s[a]=l||null})),s);return Ge(o,i)}function vm(e,t){var n=vE.concat(t||[]),s={};return je(n,(function(r){var i=ji(e,r);s[r]=i||null})),s}function mm(e){var t=(function(i){return i?i.search(xo+"google.([^/?]*)")===0?"google":i.search(xo+"bing.com")===0?"bing":i.search(xo+"yahoo.com")===0?"yahoo":i.search(xo+"duckduckgo.com")===0?"duckduckgo":null:null})(e),n=t!="yahoo"?"q":"p",s={};if(!$t(t)){s.$search_engine=t;var r=ie?ji(ie.referrer,n):"";r.length&&(s.ph_keyword=r)}return s}function Qf(){return navigator.language||navigator.userLanguage}var ca="$direct";function _m(){return(ie==null?void 0:ie.referrer)||ca}function ym(e,t){var n=e?[...Fr,...t||[]]:[],s=bt==null?void 0:bt.href.substring(0,1e3);return{r:_m().substring(0,1e3),u:s?Hi(s,n,Vi):void 0}}function bm(e){var t,{r:n,u:s}=e,r={$referrer:n,$referring_domain:n==null?void 0:n==ca?ca:(t=la(n))==null?void 0:t.host};if(s){r.$current_url=s;var i=la(s);r.$host=i==null?void 0:i.host,r.$pathname=i==null?void 0:i.pathname;var o=vm(s);Ge(r,o)}if(n){var a=mm(n);Ge(r,a)}return r}function xm(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}function _E(){try{return new Date().getTimezoneOffset()}catch{return}}var yE={flags:Bi,surveys:zc},bE=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"],sr="main";class Pl{constructor(t,n,s){if(s===void 0&&(s=!0),this.mr={},this.yr=!1,this.br=!1,this.qt=t,this._r=s,this.props={},this.wr=!1,this.kr=(i=>{var o="";return i.token&&(o=i.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),i.persistence_name?"ph_"+i.persistence_name:"ph_"+o+"_posthog"})(t),this.nr=this.Sr(t),this.br=this.Cr(t),this.load(),t.debug&&re.info("Persistence loaded",t.persistence,Z({},this.props)),this.update_config(t,t,n),this.save(),M){var r=()=>this.flush();rt(M,"beforeunload",r,{capture:!1}),rt(M,"pagehide",r,{capture:!1})}}Ir(){var t,n=(t=this.qt)==null?void 0:t.persistence_save_debounce_ms;return Ft(n)&&n>0?n:0}isDisabled(){return!!this.Tr}Sr(t){bE.indexOf(t.persistence.toLowerCase())===-1&&(re.critical("Unknown persistence type "+t.persistence+"; falling back to localStorage+cookie"),t.persistence="localStorage+cookie");var n,s=(function(o,a){o===void 0&&(o=[]),a===void 0&&(a=!1);var l=[...Xk,...o];return Z({},ze,{F(c){try{var u={};try{u=xn.F(c)||{}}catch{}var d,f=JSON.parse(ze.A(c)||"{}");if(a){var p={};for(var g in u){var h=u[g];$t(h)||h===""||(p[g]=h)}d=Ge(f,p)}else d=Ge(u,f);return ze.N(c,d),d}catch{}return null},N(c,u,d,f,p,g){var h=ze.N(c,u,void 0,void 0,g);try{var m={};l.forEach((v=>{u[v]&&(m[v]=u[v])})),Object.keys(m).length&&xn.N(c,m,d,f,p,g)}catch(v){ze.D(v)}return h},q(c,u){try{M==null||M.localStorage.removeItem(c),xn.q(c,u)}catch(d){ze.D(d)}}})})(t.cookie_persisted_properties||[],t.__preview_cookie_wins_on_conflict||!1),r=!1,i=t.persistence.toLowerCase();return i==="localstorage"&&ze.O()?(n=ze,r=!0):i==="localstorage+cookie"&&s.O()?(n=s,r=!0):i==="sessionstorage"&&xt.O()?n=xt:i==="memory"?n=Zk:i==="cookie"?n=xn:s.O()?(n=s,r=!0):n=xn,this.yr=r,n}Er(t){return this.kr+"__"+t}Cr(t){return this.yr&&!!t.split_storage}Mr(t){var n=t??this.qt.feature_flag_cache_ttl_ms;if(!n||0>=n)return!1;var s=this.props[Bi];return!s||typeof s!="number"||Date.now()-s>n}properties(){var t={};return je(this.props,((n,s)=>{var r=Ts(s);if((r==null?void 0:r.exposure)==="derived"){if(r.shouldSkipFromEventProperties!=null&&r.shouldSkipFromEventProperties(n,s===hr?()=>this.Mr():()=>!1))return;r.transformToEventProperties&&Ge(t,r.transformToEventProperties(n))}else if(!r||r.exposure==="event"){if(r!=null&&r.shouldSkipFromEventProperties!=null&&r.shouldSkipFromEventProperties(n,(()=>!1)))return;t[s]=n}})),t}load(){if(!this.Tr){var t=this.nr.F(this.kr);t&&(this.props=Ge({},t)),this.br&&this.Rr()}}Rr(){for(var t of bo){var n=ze.F(this.Er(t));if(n&&!hs(n)){var s=this.Pr(t);s.persisted=!0,this.Or(t)||(s.fingerprint=this.Lr(n,t)),this.Ar(t,n)||Ge(this.props,n)}}}Or(t){return Object.keys(this.props).some((n=>{var s;return((s=Ts(n))==null?void 0:s.storageGroup)===t}))}Ar(t,n){var s=yE[t];if(!s)return!1;var r=n[s],i=this.props[s];return Ft(r)&&Ft(i)&&i>r}refreshKey(t){var n;if(!this.Tr){var s=this.br?(n=Ts(t))==null?void 0:n.storageGroup:void 0,r=s?ze.F(this.Er(s)):this.nr.F(this.kr);if(r&&t in r)this.Fr(t,r[t]);else{if(s){var i=this.nr.F(this.kr);if(i&&t in i)return void this.Fr(t,i[t])}this.Nr(t)}}}save(){if(!this.Tr){var t=this.Ir();t>0?te(this.Dr)&&(this.Dr=setTimeout((()=>{this.Dr=void 0,this.$r()}),t)):this.$r()}}flush(){te(this.Dr)||(clearTimeout(this.Dr),this.Dr=void 0,this.$r())}$r(){this.Tr||(this.br?this.qr():this.jr(this.nr,this.kr,this.props,sr))}qr(){var{main:t,groups:n}=this.Br();for(var s of(this.jr(this.nr,this.kr,t,sr),bo)){var r,i=n[s];(!hs(i)||(r=this.mr[s])!=null&&r.persisted)&&this.jr(ze,this.Er(s),i,s)}}Br(){var t={},n={};for(var s of bo)n[s]={};return je(this.props,((r,i)=>{var o,a=(o=Ts(i))==null?void 0:o.storageGroup;a?n[a][i]=r:t[i]=r})),{main:t,groups:n}}Lr(t,n){if(n===sr)return JSON.stringify(t)+"|"+this.Hr+"|"+this.Ur+"|"+this.zr;var s={};return je(t,((r,i)=>{var o;s[i]=(o=Ts(i))!=null&&o.volatile?"__volatile__":r})),JSON.stringify(s)}jr(t,n,s,r){var i=this.Pr(r);if(r===sr||i.dirty||te(i.fingerprint)){var o;try{if((o=this.Lr(s,r))===i.fingerprint)return void(i.dirty=!1)}catch{o=void 0}t.N(n,s,this.Hr,this.Ur,this.zr,this.qt.debug)?(i.dirty=!1,r!==sr&&(i.persisted=!0),te(o)||(i.fingerprint=o)):this.qt.debug&&re.warn('failed to persist storage entry "'+n+'"; will retry on next save')}}remove(t){var{keepGroupEntries:n=!1}=t===void 0?{}:t;if(te(this.Dr)||(clearTimeout(this.Dr),this.Dr=void 0),this.nr.q(this.kr,!1),this.nr.q(this.kr,!0),!n&&this._r)for(var s of bo)ze.q(this.Er(s));n?delete this.mr[sr]:this.mr={}}clear(){this.remove(),this.props={}}register_once(t,n,s){if(et(t)){te(n)&&(n="None"),this.Hr=te(s)?this.Vr:s;var r=!1;if(je(t,((i,o)=>{this.props.hasOwnProperty(o)&&this.props[o]!==n||(this.Fr(o,i),r=!0)})),r)return this.save(),!0}return!1}register(t,n){if(et(t)){this.Hr=te(n)?this.Vr:n;var s=!1;if(je(t,((r,i)=>{t.hasOwnProperty(i)&&this.props[i]!==r&&(this.Fr(i,r),s=!0)})),s)return this.save(),!0}return!1}unregister(t){t in this.props&&(this.Nr(t),this.save())}update_campaign_params(){if(!this.wr){var t=gm(this.qt.custom_campaign_params,this.qt.mask_personal_data_properties,this.qt.custom_personal_data_properties);hs(Hc(t))||this.register(t),this.wr=!0}}update_search_keyword(){var t;this.register((t=ie==null?void 0:ie.referrer)?mm(t):{})}update_referrer_info(){var t;this.register_once({$referrer:_m(),$referring_domain:ie!=null&&ie.referrer&&((t=la(ie.referrer))==null?void 0:t.host)||ca},void 0)}set_initial_person_info(){this.props[qu]||this.props[Bu]||this.register_once({[na]:ym(this.qt.mask_personal_data_properties,this.qt.custom_personal_data_properties)},void 0)}get_initial_props(){var t={};je([Bu,qu],(o=>{var a=this.props[o];a&&je(a,(function(l,c){t["$initial_"+vu(c)]=l}))}));var n,s,r=this.props[na];if(r){var i=(n=bm(r),s={},je(n,(function(o,a){s["$initial_"+vu(a)]=o})),s);Ge(t,i)}return t}safe_merge(t){return je(this.props,(function(n,s){s in t||(t[s]=n)})),t}update_config(t,n,s){this.Vr=this.Hr=t.cookie_expiration,this.set_disabled(t.disable_persistence||!!s),this.set_cross_subdomain(t.cross_subdomain_cookie),this.set_secure(t.secure_cookie);var r=t.persistence!==n.persistence||!((l,c)=>{if(l.length!==c.length)return!1;var u=[...l].sort(),d=[...c].sort();return u.every(((f,p)=>f===d[p]))})(t.cookie_persisted_properties||[],n.cookie_persisted_properties||[]),i=r?this.Sr(t):this.nr,o=this.Cr(t);if(r||o!==this.br){var a=this.props;this.clear(),this.nr=i,this.br=o,this.props=a,this.save()}}set_disabled(t){this.Tr=t,this.Tr?this.remove():this.save()}set_cross_subdomain(t){t!==this.Ur&&(this.Ur=t,this.remove({keepGroupEntries:!0}),this.save())}set_secure(t){t!==this.zr&&(this.zr=t,this.remove({keepGroupEntries:!0}),this.save())}set_event_timer(t,n){var s=this.props[di]||{};s[t]=n,this.Fr(di,s),this.save()}remove_event_timer(t){var n=this.props[di]||{},s=n[t];return te(s)||(delete n[t],this.Fr(di,n),this.save()),s}get_property(t){return this.props[t]}set_property(t,n){this.Fr(t,n),this.save()}Fr(t,n){var s;this.props[t]=n,(s=Ts(t))!=null&&s.volatile||this.Wr(t)}Nr(t){delete this.props[t],this.Wr(t)}Wr(t){var n,s=(n=Ts(t))==null?void 0:n.storageGroup;s&&(this.Pr(s).dirty=!0)}Pr(t){return this.mr[t]||(this.mr[t]={})}}var Zr={Activation:"events",Cancellation:"cancelEvents"},Al={Popover:"popover",API:"api",Widget:"widget"},hi={SHOWN:"survey shown",DISMISSED:"survey dismissed",SENT:"survey sent"},Ol={SURVEY_ID:"$survey_id",SURVEY_ITERATION:"$survey_iteration",SURVEY_LAST_SEEN_DATE:"$survey_last_seen_date"},Vu={Popover:"popover",Inline:"inline"},xE={SHOWN:"product tour shown"},ep={TOUR_LAST_SEEN_DATE:"$product_tour_last_seen_date",TOUR_TYPE:"$product_tour_type"},tp=Ze("[RateLimiter]");class wE{constructor(t){this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=n=>{var s=n.text;if(s&&s.length)try{(JSON.parse(s).quota_limited||[]).forEach((r=>{tp.info((r||"events")+" is quota limited."),this.serverLimits[r]=new Date().getTime()+6e4}))}catch(r){return void tp.warn('could not rate limit - continuing. Error: "'+(r==null?void 0:r.message)+'"',{text:s})}},this.instance=t,this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}get captureEventsPerSecond(){var t;return((t=this.instance.config.rate_limiting)==null?void 0:t.events_per_second)||10}get captureEventsBurstLimit(){var t;return Math.max(((t=this.instance.config.rate_limiting)==null?void 0:t.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond)}clientRateLimitContext(t){var n,s,r;t===void 0&&(t=!1);var{captureEventsBurstLimit:i,captureEventsPerSecond:o}=this,a=new Date().getTime(),l=(n=(s=this.instance.persistence)==null?void 0:s.get_property(Nu))!==null&&n!==void 0?n:{tokens:i,last:a};l.tokens+=(a-l.last)/1e3*o,l.last=a,l.tokens>i&&(l.tokens=i);var c=1>l.tokens;return c||t||(l.tokens=Math.max(0,l.tokens-1)),!c||this.lastEventRateLimited||t||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to "+o+" events per second and "+i+" events burst limit."},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=c,(r=this.instance.persistence)==null||r.set_property(Nu,l),{isRateLimited:c,remainingTokens:l.tokens}}isServerRateLimited(t){var n=this.serverLimits[t||"events"]||!1;return n!==!1&&new Date().getTime()<n}}var Qr=Ze("[RemoteConfig]");class wm{constructor(t){this._instance=t}get remoteConfig(){var t;return(t=he._POSTHOG_REMOTE_CONFIG)==null||(t=t[this._instance.config.token])==null?void 0:t.config}Gr(t){var n,s;(n=he.__PosthogExtensions__)!=null&&n.loadExternalDependency?(s=he.__PosthogExtensions__)==null||s.loadExternalDependency==null||s.loadExternalDependency(this._instance,"remote-config",(()=>t(this.remoteConfig))):t()}Zr(t){this._instance._send_request({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback(n){t(n.json)}})}load(){try{if(this.remoteConfig)return Qr.info("Using preloaded remote config",this.remoteConfig),this.Qr(this.remoteConfig),void this.Jr();if(this._instance.Kr())return void Qr.warn("Remote config is disabled. Falling back to local config.");this.Gr((t=>{if(!t)return Qr.info("No config found after loading remote JS config. Falling back to JSON."),void this.Zr((n=>{this.Qr(n),this.Jr()}));this.Qr(t),this.Jr()}))}catch(t){Qr.error("Error loading remote config",t)}}stop(){this.Yr&&(clearInterval(this.Yr),this.Yr=void 0)}refresh(){!this._instance.Kr()&&ie&&ie.visibilityState!=="hidden"&&this._instance.reloadFeatureFlags()}Jr(){var t;if(!this.Yr){var n=(t=this._instance.config.remote_config_refresh_interval_ms)!==null&&t!==void 0?t:3e5;n!==0&&(this.Yr=setInterval((()=>{this.refresh()}),n))}}Qr(t){var n;t||Qr.error("Failed to fetch remote config from PostHog."),this._instance.Qr(t??{}),(t==null?void 0:t.hasFeatureFlags)!==!1&&(this._instance.config.advanced_disable_feature_flags_on_first_load||(n=this._instance.featureFlags)==null||n.ensureFlagsLoaded())}}var bn={GZipJS:"gzip-js",Base64:"base64"},tn=Uint8Array,Nt=Uint16Array,Dr=Uint32Array,Gc=new tn([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Kc=new tn([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),np=new tn([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),km=function(e,t){for(var n=new Nt(31),s=0;31>s;++s)n[s]=t+=1<<e[s-1];var r=new Dr(n[30]);for(s=1;30>s;++s)for(var i=n[s];n[s+1]>i;++i)r[i]=i-n[s]<<5|s;return[n,r]},Em=km(Gc,2),Uu=Em[1];Em[0][28]=258,Uu[258]=28;for(var sp=km(Kc,0)[1],Sm=new Nt(32768),Ke=0;32768>Ke;++Ke){var rr=(43690&Ke)>>>1|(21845&Ke)<<1;Sm[Ke]=((65280&(rr=(61680&(rr=(52428&rr)>>>2|(13107&rr)<<2))>>>4|(3855&rr)<<4))>>>8|(255&rr)<<8)>>>1}var Pi=function(e,t,n){for(var s=e.length,r=0,i=new Nt(t);s>r;++r)++i[e[r]-1];var o,a=new Nt(t);for(r=0;t>r;++r)a[r]=a[r-1]+i[r-1]<<1;for(o=new Nt(s),r=0;s>r;++r)o[r]=Sm[a[e[r]-1]++]>>>15-e[r];return o},Ks=new tn(288);for(Ke=0;144>Ke;++Ke)Ks[Ke]=8;for(Ke=144;256>Ke;++Ke)Ks[Ke]=9;for(Ke=256;280>Ke;++Ke)Ks[Ke]=7;for(Ke=280;288>Ke;++Ke)Ks[Ke]=8;var da=new tn(32);for(Ke=0;32>Ke;++Ke)da[Ke]=5;var kE=Pi(Ks,9),EE=Pi(da,5),Cm=function(e){return(e/8>>0)+(7&e&&1)},Pm=function(e,t,n){(n==null||n>e.length)&&(n=e.length);var s=new(e instanceof Nt?Nt:e instanceof Dr?Dr:tn)(n-t);return s.set(e.subarray(t,n)),s},Fn=function(e,t,n){var s=t/8>>0;e[s]|=n<<=7&t,e[s+1]|=n>>>8},ei=function(e,t,n){var s=t/8>>0;e[s]|=n<<=7&t,e[s+1]|=n>>>8,e[s+2]|=n>>>16},Tl=function(e,t){for(var n=[],s=0;e.length>s;++s)e[s]&&n.push({s,f:e[s]});var r=n.length,i=n.slice();if(!r)return[new tn(0),0];if(r==1){var o=new tn(n[0].s+1);return o[n[0].s]=1,[o,1]}n.sort((function(O,q){return O.f-q.f})),n.push({s:-1,f:25001});var a=n[0],l=n[1],c=0,u=1,d=2;for(n[0]={s:-1,f:a.f+l.f,l:a,r:l};u!=r-1;)a=n[n[d].f>n[c].f?c++:d++],l=n[c!=u&&n[d].f>n[c].f?c++:d++],n[u++]={s:-1,f:a.f+l.f,l:a,r:l};var f=i[0].s;for(s=1;r>s;++s)i[s].s>f&&(f=i[s].s);var p=new Nt(f+1),g=Wu(n[u-1],p,0);if(g>t){s=0;var h=0,m=g-t,v=1<<m;for(i.sort((function(O,q){return p[q.s]-p[O.s]||O.f-q.f}));r>s;++s){var y=i[s].s;if(t>=p[y])break;h+=v-(1<<g-p[y]),p[y]=t}for(h>>>=m;h>0;){var x=i[s].s;t>p[x]?h-=1<<t-p[x]++-1:++s}for(;s>=0&&h;--s){var k=i[s].s;p[k]==t&&(--p[k],++h)}g=t}return[new tn(p),g]},Wu=function(e,t,n){return e.s==-1?Math.max(Wu(e.l,t,n+1),Wu(e.r,t,n+1)):t[e.s]=n},rp=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new Nt(++t),s=0,r=e[0],i=1,o=function(l){n[s++]=l},a=1;t>=a;++a)if(e[a]==r&&a!=t)++i;else{if(!r&&i>2){for(;i>138;i-=138)o(32754);i>2&&(o(i>10?i-11<<5|28690:i-3<<5|12305),i=0)}else if(i>3){for(o(r),--i;i>6;i-=6)o(8304);i>2&&(o(i-3<<5|8208),i=0)}for(;i--;)o(r);i=1,r=e[a]}return[n.subarray(0,s),t]},ti=function(e,t){for(var n=0,s=0;t.length>s;++s)n+=e[s]*t[s];return n},Gu=function(e,t,n){var s=n.length,r=Cm(t+2);e[r]=255&s,e[r+1]=s>>>8,e[r+2]=255^e[r],e[r+3]=255^e[r+1];for(var i=0;s>i;++i)e[r+i+4]=n[i];return 8*(r+4+s)},ip=function(e,t,n,s,r,i,o,a,l,c,u){Fn(t,u++,n),++r[256];for(var d=Tl(r,15),f=d[0],p=d[1],g=Tl(i,15),h=g[0],m=g[1],v=rp(f),y=v[0],x=v[1],k=rp(h),O=k[0],q=k[1],E=new Nt(19),R=0;y.length>R;++R)E[31&y[R]]++;for(R=0;O.length>R;++R)E[31&O[R]]++;for(var T=Tl(E,7),K=T[0],U=T[1],C=19;C>4&&!K[np[C-1]];--C);var F,V,X,$,A=c+5<<3,L=ti(r,Ks)+ti(i,da)+o,de=ti(r,f)+ti(i,h)+o+14+3*C+ti(E,K)+(2*E[16]+3*E[17]+7*E[18]);if(L>=A&&de>=A)return Gu(t,u,e.subarray(l,l+c));if(Fn(t,u,1+(L>de)),u+=2,L>de){F=Pi(f,p),V=f,X=Pi(h,m),$=h;var qe=Pi(K,U);for(Fn(t,u,x-257),Fn(t,u+5,q-1),Fn(t,u+10,C-4),u+=14,R=0;C>R;++R)Fn(t,u+3*R,K[np[R]]);u+=3*C;for(var Pe=[y,O],Je=0;2>Je;++Je){var at=Pe[Je];for(R=0;at.length>R;++R)Fn(t,u,qe[nt=31&at[R]]),u+=K[nt],nt>15&&(Fn(t,u,at[R]>>>5&127),u+=at[R]>>>12)}}else F=kE,V=Ks,X=EE,$=da;for(R=0;a>R;++R)if(s[R]>255){var nt;ei(t,u,F[257+(nt=s[R]>>>18&31)]),u+=V[nt+257],nt>7&&(Fn(t,u,s[R]>>>23&31),u+=Gc[nt]);var ot=31&s[R];ei(t,u,X[ot]),u+=$[ot],ot>3&&(ei(t,u,s[R]>>>5&8191),u+=Kc[ot])}else ei(t,u,F[s[R]]),u+=V[s[R]];return ei(t,u,F[256]),u+V[256]},SE=new Dr([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),CE=(function(){for(var e=new Dr(256),t=0;256>t;++t){for(var n=t,s=9;--s;)n=(1&n&&3988292384)^n>>>1;e[t]=n}return e})(),Il=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8};function PE(e,t){t===void 0&&(t={});var n=(function(){var d=4294967295;return{p(f){for(var p=d,g=0;f.length>g;++g)p=CE[255&p^f[g]]^p>>>8;d=p},d(){return 4294967295^d}}})(),s=e.length;n.p(e);var r,i,o,a,l,c=(a=10+((r=t).filename&&r.filename.length+1||0),l=8,(function(d,f,p,g,h,m){var v=d.length,y=new tn(g+v+5*(1+Math.floor(v/7e3))+h),x=y.subarray(g,y.length-h),k=0;if(!f||8>v)for(var O=0;v>=O;O+=65535){var q=O+65535;v>q?k=Gu(x,k,d.subarray(O,q)):(x[O]=!0,k=Gu(x,k,d.subarray(O,v)))}else{for(var E=SE[f-1],R=E>>>13,T=8191&E,K=(1<<p)-1,U=new Nt(32768),C=new Nt(K+1),F=Math.ceil(p/3),V=2*F,X=function(le){return(d[le]^d[le+1]<<F^d[le+2]<<V)&K},$=new Dr(25e3),A=new Nt(288),L=new Nt(32),de=0,qe=0,Pe=(O=0,0),Je=0,at=0;v>O;++O){var nt=X(O),ot=32767&O,Qe=C[nt];if(U[ot]=Qe,C[nt]=ot,O>=Je){var B=v-O;if((de>7e3||Pe>24576)&&B>423){k=ip(d,x,0,$,A,L,qe,Pe,at,O-at,k),Pe=de=qe=0,at=O;for(var ne=0;286>ne;++ne)A[ne]=0;for(ne=0;30>ne;++ne)L[ne]=0}var se=2,pe=0,Ae=T,b=ot-Qe&32767;if(B>2&&nt==X(O-b))for(var w=Math.min(R,B)-1,S=Math.min(32767,O),j=Math.min(258,B);S>=b&&--Ae&&ot!=Qe;){if(d[O+se]==d[O+se-b]){for(var H=0;j>H&&d[O+H]==d[O+H-b];++H);if(H>se){if(se=H,pe=b,H>w)break;var z=Math.min(b,H-2),oe=0;for(ne=0;z>ne;++ne){var ee=O-b+ne+32768&32767,Q=ee-U[ee]+32768&32767;Q>oe&&(oe=Q,Qe=ee)}}}b+=(ot=Qe)-(Qe=U[ot])+32768&32767}if(pe){$[Pe++]=268435456|Uu[se]<<18|sp[pe];var W=31&Uu[se],ve=31&sp[pe];qe+=Gc[W]+Kc[ve],++A[257+W],++L[ve],Je=O+se,++de}else $[Pe++]=d[O],++A[d[O]]}}k=ip(d,x,!0,$,A,L,qe,Pe,at,O-at,k)}return Pm(y,0,g+Cm(k)+h)})(i=e,(o=t).level==null?6:o.level,o.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(i.length)))):12+o.mem,a,l)),u=c.length;return(function(d,f){var p=f.filename;if(d[0]=31,d[1]=139,d[2]=8,d[8]=2>f.level?4:f.level==9?2:0,d[9]=3,f.mtime!=0&&Il(d,4,Math.floor(new Date(f.mtime||Date.now())/1e3)),p){d[3]=8;for(var g=0;p.length>=g;++g)d[g+10]=p.charCodeAt(g)}})(c,t),Il(c,u-8,n.d()),Il(c,u-4,s),c}var AE=!!pu||!!fu,Am="text/plain",Oo=!1,OE=(e,t)=>{var[n,s]=e.split("#"),[r,i]=n.split("?");if(!i)return e;var o=i.split("&").filter((a=>a.split("=")[0]!==t)).join("&");return r+(o?"?"+o:"")+(s?"#"+s:"")},Va=function(e,t,n){var s;n===void 0&&(n=!0);var[r,i]=e.split("?"),o=Z({},t),a=(s=i==null?void 0:i.split("&").map((c=>{var u,[d,f]=c.split("="),p=n&&(u=o[d])!==null&&u!==void 0?u:f;return delete o[d],d+"="+p})))!==null&&s!==void 0?s:[],l=(function(c,u){var d,f;u===void 0&&(u="&");var p=[];return je(c,(function(g,h){te(g)||te(h)||h==="undefined"||(d=encodeURIComponent((m=>m instanceof File)(g)?g.name:g.toString()),f=encodeURIComponent(h),p[p.length]=f+"="+d)})),p.join(u)})(o);return l&&a.push(l),r+"?"+a.join("&")},gr=(e,t)=>JSON.stringify(e,((n,s)=>typeof s=="bigint"?s.toString():s),t),op=e=>{if(e.tr)return e.tr;var{data:t,compression:n}=e;if(t){if(n===bn.GZipJS){var s=PE((function(a,l){var c=a.length;if(typeof TextEncoder<"u")return new TextEncoder().encode(a);for(var u=new tn(a.length+(a.length>>>1)),d=0,f=function(m){u[d++]=m},p=0;c>p;++p){if(d+5>u.length){var g=new tn(d+8+(c-p<<1));g.set(u),u=g}var h=a.charCodeAt(p);128>h?f(h):2048>h?(f(192|h>>>6),f(128|63&h)):h>55295&&57344>h?(f(240|(h=65536+(1047552&h)|1023&a.charCodeAt(++p))>>>18),f(128|h>>>12&63),f(128|h>>>6&63),f(128|63&h)):(f(224|h>>>12),f(128|h>>>6&63),f(128|63&h))}return Pm(u,0,d)})(gr(t)),{mtime:0});return{contentType:Am,body:s.buffer.slice(s.byteOffset,s.byteOffset+s.byteLength),estimatedSize:s.byteLength}}if(n===bn.Base64){var r=(function(a){return a&&btoa(encodeURIComponent(a).replace(/%([0-9A-F]{2})/g,((l,c)=>String.fromCharCode(parseInt(c,16)))))})(gr(t)),i=(a=>"data="+encodeURIComponent(typeof a=="string"?a:gr(a)))(r);return{contentType:"application/x-www-form-urlencoded",body:i,estimatedSize:new Blob([i]).size}}var o=gr(t);return{contentType:"application/json",body:o,estimatedSize:new Blob([o]).size}}},Rl=e=>{var t,n,s,r=op(e);return!r||(n=e.compression,s=ji(e.url,"compression"),n!==Rf.GZipJS&&s!==Rf.GZipJS&&s!=="gzip")||((t=r.body)instanceof ArrayBuffer?hu(new Uint8Array(t)):ArrayBuffer.isView(t)&&hu(new Uint8Array(t.buffer,t.byteOffset,t.byteLength)))?{url:e.url,encodedBody:r}:(Oo=!0,{url:OE(e.url,"compression"),encodedBody:op(Z({},e,{compression:void 0,tr:void 0}))})},TE=(function(){var e=jt((function*(t){var n=gr(t.data),s=yield(function(i,o,a){return gu.apply(this,arguments)})(n,gt.DEBUG,{rethrow:!0});if(!s)return t;var r=yield s.arrayBuffer();return Z({},t,{tr:{contentType:Am,body:r,estimatedSize:r.byteLength}})}));return function(t){return e.apply(this,arguments)}})(),ap=(e,t)=>Va(e,{_:new Date().getTime().toString(),ver:gt.JS_SDK_VERSION,compression:t}),To=[];fu&&To.push({transport:"fetch",method(e){var t,{url:n,encodedBody:s}=Rl(e),{contentType:r,body:i,estimatedSize:o}=s??{},a=new Headers;je(e.headers,(function(u,d){a.append(d,u)})),r&&a.append("Content-Type",r);var l=null;if(Of){var c=new Of;l={signal:c.signal,timeout:setTimeout((()=>c.abort()),e.timeout)}}fu(n,Z({method:(e==null?void 0:e.method)||"GET",headers:a,keepalive:e.method==="POST"&&52428.8>(o||0),body:i,signal:(t=l)==null?void 0:t.signal},e.fetchOptions)).then((u=>u.text().then((d=>{var f={statusCode:u.status,text:d};if(u.status===200)try{f.json=JSON.parse(d)}catch(p){re.error(p)}e.callback==null||e.callback(f)})))).catch((u=>{re.error(u),e.callback==null||e.callback({statusCode:0,error:u})})).finally((()=>l?clearTimeout(l.timeout):null))}}),pu&&To.push({transport:"XHR",method(e){var t=new pu,{url:n,encodedBody:s}=Rl(e);t.open(e.method||"GET",n,!0);var{contentType:r,body:i}=s??{};je(e.headers,(function(o,a){t.setRequestHeader(a,o)})),r&&t.setRequestHeader("Content-Type",r),e.timeout&&(t.timeout=e.timeout),t.onreadystatechange=()=>{if(t.readyState===4){var o={statusCode:t.status,text:t.responseText};if(t.status===200)try{o.json=JSON.parse(t.responseText)}catch{}e.callback==null||e.callback(o)}},t.send(i)}}),Ut!=null&&Ut.sendBeacon&&To.push({transport:"sendBeacon",method(e){try{var{url:t,encodedBody:n}=Rl(e),s=Va(t,{beacon:"1"}),{contentType:r,body:i}=n??{};if(!i)return;var o=i instanceof Blob?i:new Blob([i],{type:r});Ut.sendBeacon(s,o)}catch{}}});var Ku=3e3;class IE{constructor(t,n){this.Xr=!0,this.ei=[],this.ti=En((n==null?void 0:n.flush_interval_ms)||Ku,250,5e3,re.createLogger("flush interval"),Ku),this.ri=t}enqueue(t){this.ei.push(t),this.ii||this.ni()}unload(){this.si();var t=this.ei.length>0?this.oi():{},n=Object.values(t);[...n.filter((s=>s.url.indexOf("/e")===0)),...n.filter((s=>s.url.indexOf("/e")!==0))].map((s=>{this.ri(Z({},s,{transport:"sendBeacon"}))}))}enable(){this.Xr=!1,this.ni()}ni(){var t=this;this.Xr||(this.ii=setTimeout((()=>{if(this.si(),this.ei.length>0){var n=this.oi(),s=function(){var i=n[r],o=new Date().getTime();i.data&&Ce(i.data)&&je(i.data,(a=>{a.offset=Math.abs(a.timestamp-o),delete a.timestamp})),t.ri(i)};for(var r in n)s()}}),this.ti))}si(){clearTimeout(this.ii),this.ii=void 0}oi(){var t={};return je(this.ei,(n=>{var s,r=n,i=(r?r.batchKey:null)||r.url;te(t[i])&&(t[i]=Z({},r,{data:[]})),(s=t[i].data)==null||s.push(r.data)})),this.ei=[],t}}var RE=["retriesPerformedSoFar"];class ME{constructor(t){this.ai=!1,this.li=3e3,this.ei=[],this._instance=t,this.ei=[],this.ui=!0,!te(M)&&"onLine"in M.navigator&&(this.ui=M.navigator.onLine,this.hi=()=>{this.ui=!0,this.ci()},this.di=()=>{this.ui=!1},rt(M,"online",this.hi),rt(M,"offline",this.di))}get length(){return this.ei.length}retriableRequest(t){var{retriesPerformedSoFar:n}=t,s=gv(t,RE);Nn(n)&&(s.url=Va(s.url,{retry_count:n})),this._instance._send_request(Z({},s,{callback:r=>{r.statusCode===200||r.statusCode>=400&&500>r.statusCode||(n??0)>=10?s.callback==null||s.callback(r):this.vi(Z({retriesPerformedSoFar:n},s))}}))}vi(t){var n=t.retriesPerformedSoFar||0;t.retriesPerformedSoFar=n+1;var s=(function(o){var a=3e3*Math.pow(2,o),l=a/2,c=Math.min(18e5,a),u=Math.random()-.5;return Math.ceil(c+u*(c-l))})(n),r=Date.now()+s;this.ei.push({retryAt:r,requestOptions:t});var i="Enqueued failed request for retry in "+s;navigator.onLine||(i+=" (Browser is offline)"),re.warn(i),this.ai||(this.ai=!0,this.fi())}fi(){if(this.pi&&clearTimeout(this.pi),this.ei.length===0)return this.ai=!1,void(this.pi=void 0);this.pi=setTimeout((()=>{this.ui&&this.ei.length>0&&this.ci(),this.fi()}),this.li)}ci(){var t=Date.now(),n=[],s=this.ei.filter((i=>t>i.retryAt||(n.push(i),!1)));if(this.ei=n,s.length>0)for(var{requestOptions:r}of s)this.retriableRequest(r)}unload(){for(var{requestOptions:t}of(this.pi&&(clearTimeout(this.pi),this.pi=void 0),this.ai=!1,te(M)||(this.hi&&(M.removeEventListener("online",this.hi),this.hi=void 0),this.di&&(M.removeEventListener("offline",this.di),this.di=void 0)),this.ei))try{this._instance._send_request(Z({},t,{transport:"sendBeacon"}))}catch(n){re.error(n)}this.ei=[]}}class $E{constructor(t){this.gi=()=>{var n,s,r,i;this.mi||(this.mi={});var o=this.scrollElement(),a=this.scrollY(),l=o?Math.max(0,o.scrollHeight-o.clientHeight):0,c=a+((o==null?void 0:o.clientHeight)||0),u=(o==null?void 0:o.scrollHeight)||0;this.mi.lastScrollY=Math.ceil(a),this.mi.maxScrollY=Math.max(a,(n=this.mi.maxScrollY)!==null&&n!==void 0?n:0),this.mi.maxScrollHeight=Math.max(l,(s=this.mi.maxScrollHeight)!==null&&s!==void 0?s:0),this.mi.lastContentY=c,this.mi.maxContentY=Math.max(c,(r=this.mi.maxContentY)!==null&&r!==void 0?r:0),this.mi.maxContentHeight=Math.max(u,(i=this.mi.maxContentHeight)!==null&&i!==void 0?i:0)},this._instance=t}get yi(){return this._instance.config.scroll_root_selector}getContext(){return this.mi}resetContext(){var t=this.mi;return setTimeout(this.gi,0),t}startMeasuringScrollPosition(){rt(M,"scroll",this.gi,{capture:!0}),rt(M,"scrollend",this.gi,{capture:!0}),rt(M,"resize",this.gi)}scrollElement(){if(!this.yi)return M==null?void 0:M.document.documentElement;var t=Ce(this.yi)?this.yi:[this.yi];for(var n of t){var s=M==null?void 0:M.document.querySelector(n);if(s)return s}}bi(t){var n=t==="y"?"scrollTop":"scrollLeft";if(this.yi){var s=this.scrollElement();return s&&s[n]||0}return M?t==="y"?M.scrollY||M.pageYOffset||M.document.documentElement.scrollTop||0:M.scrollX||M.pageXOffset||M.document.documentElement.scrollLeft||0:0}scrollY(){return this.bi("y")}scrollX(){return this.bi("x")}}var FE=e=>ym(e==null?void 0:e.config.mask_personal_data_properties,e==null?void 0:e.config.custom_personal_data_properties);class lp{constructor(t,n,s,r){this.wi=i=>{var o=this.xi();if(!o||o.sessionId!==i){var a={sessionId:i,props:this.ki(this._instance)};this.Si.register({[Lu]:a})}},this._instance=t,this.Ci=n,this.Si=s,this.ki=r||FE,this.Ci.onSessionId(this.wi)}xi(){return this.Si.props[Lu]}getSetOnceProps(){var t,n=(t=this.xi())==null?void 0:t.props;return n?"r"in n?bm(n):{$referring_domain:n.referringDomain,$pathname:n.initialPathName,utm_source:n.utm_source,utm_campaign:n.utm_campaign,utm_medium:n.utm_medium,utm_content:n.utm_content,utm_term:n.utm_term}:{}}getSessionProps(){var t={};return je(Hc(this.getSetOnceProps()),((n,s)=>{s==="$current_url"&&(s="url"),t["$session_entry_"+vu(s)]=n})),t}}class Yc{constructor(){this.Ii={}}on(t,n){return this.Ii[t]||(this.Ii[t]=[]),this.Ii[t].push(n),()=>{this.Ii[t]=this.Ii[t].filter((s=>s!==n))}}emit(t,n){for(var s of this.Ii[t]||[])s(n);for(var r of this.Ii["*"]||[])r(t,n)}}var ni=Ze("[SessionId]");class up{on(t,n){return this.Ti.on(t,n)}constructor(t,n,s){var r;if(this.Ei=null,this.Mi=[],this.Ri=void 0,this.Pi=!1,this.Ti=new Yc,this.Oi=(c,u)=>!(!Nn(c)||!Nn(u))&&Math.abs(c-u)>this.sessionTimeoutMs,!t.persistence)throw new Error("SessionIdManager requires a PostHogPersistence instance");if(t.config.cookieless_mode===Gn)throw new Error('SessionIdManager cannot be used with cookieless_mode="always"');this.qt=t.config,this.Si=t.persistence,this.Li=void 0,this.Ai=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this.Fi=n||ps,this.Ni=s||ps;var i=this.qt.persistence_name||this.qt.token;if(this._sessionTimeoutMs=1e3*En(this.qt.session_idle_timeout_seconds||1800,60,36e3,ni.createLogger("session_idle_timeout_seconds"),1800),t.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.Di(),this.$i="ph_"+i+"_window_id",this.qi="ph_"+i+"_primary_window_exists",this.ji()){var o=xt.F(this.$i),a=xt.F(this.qi);o&&!a?this.Li=o:xt.q(this.$i),xt.N(this.qi,!0)}if((r=this.qt.bootstrap)!=null&&r.sessionID)try{var l=(c=>{var u=this.qt.bootstrap.sessionID.replace(/-/g,"");if(u.length!==32)throw new Error("Not a valid UUID");if(u[12]!=="7")throw new Error("Not a UUIDv7");return parseInt(u.substring(0,12),16)})();this.Bi(this.qt.bootstrap.sessionID,new Date().getTime(),l)}catch(c){ni.error("Invalid sessionID in bootstrap",c)}this.Hi()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(t){return te(this.Mi)&&(this.Mi=[]),this.Mi.push(t),this.Ai&&t(this.Ai,this.Li),()=>{this.Mi=this.Mi.filter((n=>n!==t))}}ji(){return this.qt.persistence!=="memory"&&!this.Si.Tr&&xt.O()}Ui(t){t!==this.Li&&(this.Li=t,this.ji()&&xt.N(this.$i,t))}zi(){return this.Li?this.Li:this.ji()?xt.F(this.$i):null}Vi(t){var n=this.Ei;return!$t(n)&&!$t(t)&&5e3>Math.abs(t-n)}Bi(t,n,s){var r=n!==this._sessionActivityTimestamp,i=!(t!==this.Ai||s!==this._sessionStartTimestamp);this._sessionStartTimestamp=s,this._sessionActivityTimestamp=n,this.Ai=t,i&&!r||i&&this.Vi(n)||(this.Ei=n,this.Si.register({[pr]:[n,t,s]}))}Wi(){var t,n=(t=this.qt)==null?void 0:t.persistence_save_debounce_ms;return Nn(n)&&n>0}Gi(){this.Wi()?this.Si.refreshKey(pr):(this.Si.flush(),this.Si.load())}Zi(){var t;if(!$t(this._sessionActivityTimestamp)&&this._sessionActivityTimestamp!==this.Ei){this.Gi();var[,n,s]=this.Qi();n===this.Ai&&s===this._sessionStartTimestamp&&(this.Ei=this._sessionActivityTimestamp,this.Si.register({[pr]:[this._sessionActivityTimestamp,(t=this.Ai)!==null&&t!==void 0?t:null,this._sessionStartTimestamp]}),this.Si.flush())}}Ji(){var[t]=this.Qi(),n=Nn(t)?t:0,s=Nn(this._sessionActivityTimestamp)?this._sessionActivityTimestamp:0;return Math.max(n,s)}Ki(t){return this.Gi(),this.Oi(t,this.Ji())}Qi(){var t=this.Si.props[pr];return Ce(t)&&t.length===2&&t.push(t[0]),t||[0,null,0]}resetSessionId(){this.Ei=null,clearTimeout(this.Yi),this.Yi=void 0,this.Bi(null,null,null)}destroy(){this.Pi=!0,this.Zi(),clearTimeout(this.Yi),this.Yi=void 0,this.Ri&&M&&(M.removeEventListener(ia,this.Ri,{capture:!1}),this.Ri=void 0),this.Mi=[]}Hi(){this.Ri=()=>{this.Zi(),this.ji()&&xt.q(this.qi)},rt(M,ia,this.Ri,{capture:!1})}checkAndGetSessionAndWindowId(t,n){if(t===void 0&&(t=!1),n===void 0&&(n=null),this.qt.cookieless_mode===Gn)throw new Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var s=n||new Date().getTime(),[,r,i]=this.Qi(),o=this.Ji(),a=this.zi(),l=Nn(i)&&Math.abs(s-i)>864e5,c=!1,u=!1,d=!r,f=r,p=!d&&!t&&this.Oi(s,o);p&&((p=this.Ki(s))||ni.info("cross-tab refresh kept the session alive",{sessionId:r}),[,r,i]=this.Qi()),d||p||l?(r=this.Fi(),a=this.Ni(),ni.info("new session ID generated",{sessionId:r,windowId:a,changeReason:{noSessionId:d,activityTimeout:p,sessionPastMaximumLength:l}}),i=s,c=!0):(a||(a=this.Ni(),c=!0),(u=r!==f)&&(ni.info("adopted cross-tab session id",{sessionId:r,windowId:a}),c=!0));var g=Nn(o)&&t&&!l?o:s,h=Nn(i)?i:new Date().getTime();this.Ui(a),this.Bi(r,g,h),t||this.Di();var m={noSessionId:d,activityTimeout:p,sessionPastMaximumLength:l,crossTabAdoption:u};return c&&this.Mi.forEach((v=>v(r,a,m))),{sessionId:r,windowId:a,sessionStartTimestamp:h,changeReason:c?m:void 0,lastActivityTimestamp:o}}Di(){this.Pi||(clearTimeout(this.Yi),this.Yi=setTimeout((()=>{if(!this.Pi)if(this.Ki(new Date().getTime())){var t=this.Ai;this.resetSessionId(),this.Ti.emit("forcedIdleReset",{idleSessionId:t})}else this.Di()}),1.1*this.sessionTimeoutMs))}}var Om=function(e,t){if(!e)return!1;var n=e.userAgent;if(n&&$f(n,t))return!0;try{var s=e==null?void 0:e.userAgentData;if(s!=null&&s.brands&&s.brands.some((r=>$f(r==null?void 0:r.brand,t))))return!0}catch{}return!!e.webdriver},fa=function(e,t){if(!(function(n){try{new RegExp(n)}catch{return!1}return!0})(t))return!1;try{return new RegExp(t).test(e)}catch{return!1}};function cp(e,t,n){return gr({distinct_id:e,userPropertiesToSet:t,userPropertiesToSetOnce:n})}var Tm={exact:(e,t)=>t.some((n=>e.some((s=>n===s)))),is_not:(e,t)=>t.every((n=>e.every((s=>n!==s)))),regex:(e,t)=>t.some((n=>e.some((s=>fa(n,s))))),not_regex:(e,t)=>t.every((n=>e.every((s=>!fa(n,s))))),icontains:(e,t)=>t.map(wo).some((n=>e.map(wo).some((s=>n.includes(s))))),not_icontains:(e,t)=>t.map(wo).every((n=>e.map(wo).every((s=>!n.includes(s))))),gt:(e,t)=>t.some((n=>{var s=parseFloat(n);return!isNaN(s)&&e.some((r=>s>parseFloat(r)))})),lt:(e,t)=>t.some((n=>{var s=parseFloat(n);return!isNaN(s)&&e.some((r=>s<parseFloat(r)))}))},wo=e=>e.toLowerCase();function Im(e,t){return!e||Object.entries(e).every((n=>{var[s,r]=n,i=t==null?void 0:t[s];if(te(i)||$t(i))return!1;var o=[String(i)],a=Tm[r.operator];return!!a&&a(r.values,o)}))}var Yu="custom",dp="i.posthog.com",DE=/^\/static\//;class LE{constructor(t){this.Xi={},this.instance=t}get apiHost(){var t=this.instance.config.api_host.trim().replace(/\/$/,"");return t==="https://app.posthog.com"?"https://us.i.posthog.com":t}get flagsApiHost(){var t=this.instance.config.flags_api_host;return t?t.trim().replace(/\/$/,""):this.apiHost}get uiHost(){var t,n=(t=this.instance.config.ui_host)==null?void 0:t.replace(/\/$/,"");return n||(n=this.apiHost.replace("."+dp,".posthog.com")),n==="https://app.posthog.com"?"https://us.posthog.com":n}get region(){return this.Xi[this.apiHost]||(this.Xi[this.apiHost]=/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"us":/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"eu":Yu),this.Xi[this.apiHost]}en(t){if(DE.test(t)){var n=this.instance.config.asset_host;if(typeof n=="string")return n.trim().replace(/\/$/,"")||void 0}}endpointFor(t,n){if(n===void 0&&(n=""),n&&(n=n[0]==="/"?n:"/"+n),t==="ui")return this.uiHost+n;if(t==="flags")return this.flagsApiHost+n;if(t==="assets"){var s=this.en(n);if(s)return""+s+n}if(this.region===Yu)return this.apiHost+n;var r=dp+n;switch(t){case"assets":return"https://"+this.region+"-assets."+r;case"api":return"https://"+this.region+"."+r}}}var Ne=Ze("[Surveys]"),Ju="seenSurvey_",NE=[Al.Popover,Al.Widget,Al.API],qE={ignoreConditions:!1,ignoreDelay:!1,displayType:Vu.Popover},BE=Ze("[PostHog ExternalIntegrations]"),zE={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class jE{constructor(t){this._instance=t}ur(t,n){var s;(s=he.__PosthogExtensions__)==null||s.loadExternalDependency==null||s.loadExternalDependency(this._instance,t,(r=>{if(r)return BE.error("failed to load script",r);n()}))}startIfEnabledOrStop(){var t=this,n=function(o){var a,l,c;!r||(a=he.__PosthogExtensions__)!=null&&(a=a.integrations)!=null&&a[o]||t.ur(zE[o],(()=>{var u;(u=he.__PosthogExtensions__)==null||(u=u.integrations)==null||(u=u[o])==null||u.start(t._instance)})),!r&&(l=he.__PosthogExtensions__)!=null&&(l=l.integrations)!=null&&l[o]&&((c=he.__PosthogExtensions__)==null||(c=c.integrations)==null||(c=c[o])==null||c.stop())};for(var[s,r]of Object.entries((i=this._instance.config.integrations)!==null&&i!==void 0?i:{})){var i;n(s)}}}var ir,Ai={},Ml=0,Xu=()=>{},fp='Consent opt in/out is not valid with cookieless_mode="always" and will be ignored',si="Surveys module not available",pp="sanitize_properties is deprecated. Use before_send instead",Rm="Invalid value for property_denylist config: ",fr="posthog",Mm=!AE&&(Lt==null?void 0:Lt.indexOf("MSIE"))===-1&&(Lt==null?void 0:Lt.indexOf("Mozilla"))===-1,hp=e=>{var t;return Z({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,asset_host:null,token:"",autocapture:!0,cross_subdomain_cookie:Wk(ie==null?void 0:ie.location),persistence:"localStorage+cookie",persistence_name:"",cookie_persisted_properties:[],loaded:Xu,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageleave:"if_capture_pageview",defaults:e??"unset",__preview_deferred_init_extensions:!1,__preview_external_dependency_versioned_paths:!1,__preview_cookie_wins_on_conflict:!1,debug:bt&&Ue(bt==null?void 0:bt.search)&&bt.search.indexOf("__posthog_debug=true")!==-1||!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_web_experiments:!0,disable_surveys:!1,disable_surveys_automatic_display:!1,disable_conversations:!1,disable_product_tours:!1,disable_external_dependency_loading:!1,strict_script_versioning:!1,enable_recording_console_log:void 0,secure_cookie:(M==null||(t=M.location)==null?void 0:t.protocol)==="https:",ip:!1,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:"localStorage",consent_persistence_name:null,opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},request_batching:!0,properties_string_max_length:65535,mask_all_element_attributes:!1,mask_all_text:!1,mask_personal_data_properties:!1,custom_personal_data_properties:[],advanced_disable_flags:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_only_evaluate_survey_feature_flags:!1,advanced_feature_flags_dedup_per_session:!1,advanced_enable_surveys:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,surveys_request_timeout_ms:1e4,on_request_error(n){re.error("Bad HTTP status: "+n.statusCode+" "+n.text)},get_device_id:n=>n,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:zu,before_send:void 0,request_queue_config:{flush_interval_ms:Ku},error_tracking:{},_onCapture:Xu},(n=>({rageclick:n&&n>="2026-05-30"?{content_ignorelist:rE,ignore_text_selection:!0}:!n||"2025-11-30">n||{content_ignorelist:!0},capture_pageview:!n||"2025-05-24">n||"history_change",session_recording:n&&n>="2025-11-30"?{strictMinimumDuration:!0}:{},external_scripts_inject_target:n&&n>="2026-01-30"?"head":"body",internal_or_test_user_hostname:n&&n>="2026-01-30"?/^(localhost|127\.0\.0\.1)$/:void 0,persistence_save_debounce_ms:n&&n>="2026-05-30"?250:0,split_storage:!(!n||"2026-05-30">n),detect_google_search_app:!(!n||"2026-05-30">n)}))(e))},HE=[["process_person","person_profiles"],["xhr_headers","request_headers"],["cookie_name","persistence_name"],["disable_cookie","disable_persistence"],["__preview_disable_beacon","disable_beacon"],["store_google","save_campaign_params"],["verbose","debug"]],gp=e=>{var t={};for(var[n,s]of HE)te(e[n])||(t[s]=e[n]);var r=Ge({},t,e),i=e.__preview_external_dependency_versioned_paths;return te(i)||(te(e.strict_script_versioning)&&(r.strict_script_versioning=!!i),Ue(i)&&te(e.asset_host)&&(r.asset_host=i)),Ce(e.property_blacklist)&&(te(e.property_denylist)?r.property_denylist=e.property_blacklist:Ce(e.property_denylist)?r.property_denylist=[...e.property_blacklist,...e.property_denylist]:re.error(Rm+e.property_denylist)),r};class VE{constructor(){this.__forceAllowLocalhost=!1}get tn(){return this.__forceAllowLocalhost}set tn(t){re.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=t}}class Qt{rn(t,n){if(t){var s=this.nn.indexOf(t);s!==-1&&this.nn.splice(s,1)}return this.nn.push(n),n.initialize==null||n.initialize(),n}sn(){return this.config.cookieless_mode===Gn||this.config.cookieless_mode===Ns&&this.consent.isRejected()}get decideEndpointWasHit(){var t,n;return(t=(n=this.featureFlags)==null?void 0:n.hasLoadedFlags)!==null&&t!==void 0&&t}get flagsEndpointWasHit(){var t,n;return(t=(n=this.featureFlags)==null?void 0:n.hasLoadedFlags)!==null&&t!==void 0&&t}constructor(){var t;this.webPerformance=new VE,this.an=!1,this.version=gt.LIB_VERSION,this.ln=new Yc,this.nn=[],this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=hp(),this.SentryIntegration=pE,this.sentryIntegration=s=>(function(r,i){var o=hm(r,i);return{name:pm,processEvent:a=>o(a)}})(this,s),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.un=!1,this.hn=null,this.cn=null,this.dn=null,this.scrollManager=new $E(this),this.pageViewManager=new Zf(this),this.rateLimiter=new wE(this),this.requestRouter=new LE(this),this.consent=new Qk(this),this.externalIntegrations=new jE(this);var n=(t=Qt.__defaultExtensionClasses)!==null&&t!==void 0?t:{};this.featureFlags=n.featureFlags&&new n.featureFlags(this),this.toolbar=n.toolbar&&new n.toolbar(this),this.surveys=n.surveys&&new n.surveys(this),this.conversations=n.conversations&&new n.conversations(this),this.logs=n.logs&&new n.logs(this),this.experiments=n.experiments&&new n.experiments(this),this.exceptions=n.exceptions&&new n.exceptions(this),this.people={set:(s,r,i)=>{var o=Ue(s)?{[s]:r}:s;this.setPersonProperties(o),i==null||i({})},set_once:(s,r,i)=>{var o=Ue(s)?{[s]:r}:s;this.setPersonProperties(void 0,o),i==null||i({})}},this.on("eventCaptured",(s=>re.info('send "'+(s==null?void 0:s.event)+'"',s)))}init(t,n,s){if(s&&s!==fr){var r,i=(r=Ai[s])!==null&&r!==void 0?r:new Qt;return i._init(t,n,s),Ai[s]=i,Ai[fr][s]=i,i}return this._init(t,n,s)}_init(t,n,s){var r,i;n===void 0&&(n={});var o=Ue(t)?t.trim():"";if(!o)return re.critical("PostHog was initialized without a token. This likely indicates a misconfiguration. Please check the first argument passed to posthog.init()"),this;if(this.__loaded)return console.warn("[PostHog.js]","You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config={},n.debug=this.vn(n.debug),this.fn=n,this.pn=[],n.person_profiles?this.cn=n.person_profiles:n.process_person&&(this.cn=n.process_person);var a=hp(n.defaults),l=gp(n),c=Ge({},a,l,{name:s,token:o});et(a.rageclick)&&et(l.rageclick)&&(c.rageclick=Ge({},a.rageclick,l.rageclick)),this.set_config(c),this.config.on_xhr_error&&re.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=n.disable_compression?void 0:bn.GZipJS;var u=this.gn();this.persistence=new Pl(this.config,u),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new Pl(Z({},this.config,{persistence:"sessionStorage"}),u,!1);var d=Z({},this.persistence.props),f=Z({},this.sessionPersistence.props);this.register({$initialization_time:new Date().toISOString()}),this.mn=new IE((k=>this.yn(k)),this.config.request_queue_config),this.bn=new ME(this),this.__request_queue=[];var p=this.sn();if(p||(this.sessionManager=new up(this),this.sessionPropsManager=new lp(this,this.sessionManager,this.persistence)),this.config.__preview_deferred_init_extensions?(re.info("Deferring extension initialization to improve startup performance"),setTimeout((()=>{this._n(p)}),0)):(re.info("Initializing extensions synchronously"),this._n(p)),gt.DEBUG=gt.DEBUG||this.config.debug,gt.DEBUG&&re.info("Starting in debug mode",{this:this,config:n,thisC:Z({},this.config),p:d,s:f}),!this.config.identity_distinct_id||(r=n.bootstrap)!=null&&r.distinctID||(n.bootstrap=Z({},n.bootstrap,{distinctID:this.config.identity_distinct_id,isIdentifiedID:!0})),((i=n.bootstrap)==null?void 0:i.distinctID)!==void 0){var g=n.bootstrap.distinctID,h=this.get_distinct_id(),m=this.persistence.get_property(nn);if(n.bootstrap.isIdentifiedID&&h!=null&&h!==g&&m===tr)this.identify(g);else if(n.bootstrap.isIdentifiedID&&h!=null&&h!==g&&m===nr)re.warn("Bootstrap distinctID differs from an already-identified user. The existing identity is preserved. Call reset() before reinitializing if you intend to switch users.");else{var v=this.config.get_device_id(ps()),y=n.bootstrap.isIdentifiedID?v:g;this.persistence.set_property(nn,n.bootstrap.isIdentifiedID?nr:tr),this.register({distinct_id:g,$device_id:y})}}if(p)this.register_once({distinct_id:vo,$device_id:null},"");else if(!this.get_distinct_id()){var x=this.config.get_device_id(ps());this.register_once({distinct_id:x,$device_id:x},""),this.persistence.set_property(nn,tr)}return rt(M,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),n.segment?(function(k,O){var q=k.config.segment;if(!q)return O();(function(E,R){var T=E.config.segment;if(!T)return R();var K=C=>{var F=()=>C.anonymousId()||ps();E.config.get_device_id=F,C.id()&&(E.register({distinct_id:C.id(),$device_id:F()}),E.persistence.set_property(nn,nr)),R()},U=T.user();"then"in U&&jn(U.then)?U.then(K):K(U)})(k,(()=>{q.register((E=>{Promise&&Promise.resolve||Cl.warn("This browser does not have Promise support, and can not use the segment integration");var R=(T,K)=>{if(!K)return T;T.event.userId||T.event.anonymousId===E.get_distinct_id()||(Cl.info("No userId set, resetting PostHog"),E.reset()),T.event.userId&&T.event.userId!==E.get_distinct_id()&&(Cl.info("UserId set, identifying with PostHog"),E.identify(T.event.userId));var U=E.calculateEventProperties(K,T.event.properties);return T.event.properties=Object.assign({},U,T.event.properties),T};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:T=>R(T,T.event.event),page:T=>R(T,dr),identify:T=>R(T,kl),screen:T=>R(T,"$screen")}})(k)).then((()=>{O()}))}))})(this,(()=>this.wn())):this.wn(),jn(this.config._onCapture)&&this.config._onCapture!==Xu&&(re.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",(k=>this.config._onCapture(k.event,k)))),this.config.ip&&re.warn('The `ip` config option has NO EFFECT AT ALL and has been deprecated. Use a custom transformation or "Discard IP data" project setting instead. See https://posthog.com/tutorials/web-redact-properties#hiding-customer-ip-address for more information.'),this}_n(t){var n,s,r,i,o,a,l,c=performance.now(),u=Z({},Qt.__defaultExtensionClasses,this.config.__extensionClasses),d=[];u.featureFlags&&this.nn.push(this.featureFlags=(n=this.featureFlags)!==null&&n!==void 0?n:new u.featureFlags(this)),u.exceptions&&this.nn.push(this.exceptions=(s=this.exceptions)!==null&&s!==void 0?s:new u.exceptions(this)),u.historyAutocapture&&this.nn.push(this.historyAutocapture=new u.historyAutocapture(this)),u.tracingHeaders&&this.nn.push(this.tracingHeaders=new u.tracingHeaders(this)),u.siteApps&&this.nn.push(this.siteApps=new u.siteApps(this)),u.sessionRecording&&!t&&this.nn.push(this.sessionRecording=new u.sessionRecording(this)),this.config.disable_scroll_properties||d.push((()=>{this.scrollManager.startMeasuringScrollPosition()})),u.autocapture&&this.nn.push(this.autocapture=new u.autocapture(this)),u.surveys&&this.nn.push(this.surveys=(r=this.surveys)!==null&&r!==void 0?r:new u.surveys(this)),u.logs&&this.nn.push(this.logs=(i=this.logs)!==null&&i!==void 0?i:new u.logs(this)),u.conversations&&this.nn.push(this.conversations=(o=this.conversations)!==null&&o!==void 0?o:new u.conversations(this)),u.productTours&&this.nn.push(this.productTours=new u.productTours(this)),u.heatmaps&&this.nn.push(this.heatmaps=new u.heatmaps(this)),u.webVitalsAutocapture&&this.nn.push(this.webVitalsAutocapture=new u.webVitalsAutocapture(this)),u.exceptionObserver&&this.nn.push(this.exceptionObserver=new u.exceptionObserver(this)),u.deadClicksAutocapture&&this.nn.push(this.deadClicksAutocapture=new u.deadClicksAutocapture(this,fE)),u.toolbar&&this.nn.push(this.toolbar=(a=this.toolbar)!==null&&a!==void 0?a:new u.toolbar(this)),u.experiments&&this.nn.push(this.experiments=(l=this.experiments)!==null&&l!==void 0?l:new u.experiments(this)),this.nn.forEach((f=>{f.initialize&&d.push((()=>{f.initialize==null||f.initialize()}))})),d.push((()=>{if(this.xn){var f=this.xn;this.xn=void 0,this.Qr(f)}})),this.kn(d,c)}kn(t,n){for(;t.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-n>=30&&t.length>0)return void setTimeout((()=>{this.kn(t,n)}),0);var s=t.shift();if(s)try{s()}catch(i){re.error("Error initializing extension:",i)}}var r=Math.round(performance.now()-n);this.register_for_session({[Zv]:this.config.__preview_deferred_init_extensions?"deferred":"synchronous",[Qv]:r}),this.config.__preview_deferred_init_extensions&&re.info("PostHog extensions initialized ("+r+"ms)")}Qr(t){var n;if(!ie||!ie.body)return re.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout((()=>{this.Qr(t)}),500);this.config.__preview_deferred_init_extensions&&(this.xn=t),this.Sn=t,this.compression=void 0,t.supportedCompression&&!this.config.disable_compression&&(this.compression=be(t.supportedCompression,bn.GZipJS)?bn.GZipJS:be(t.supportedCompression,bn.Base64)?bn.Base64:void 0),(n=t.analytics)!=null&&n.endpoint&&(this.analyticsDefaultEndpoint=t.analytics.endpoint),this.set_config({person_profiles:this.cn?this.cn:zu}),this.nn.forEach((s=>s.onRemoteConfig==null?void 0:s.onRemoteConfig(t)))}wn(){try{this.config.loaded(this)}catch(s){re.critical("`loaded` function failed",s)}if(this.Cn(),this.config.internal_or_test_user_hostname&&bt!=null&&bt.hostname){var t=bt.hostname,n=this.config.internal_or_test_user_hostname;(typeof n=="string"?t===n:n.test(t))&&this.setInternalOrTestUser()}this.config.capture_pageview&&setTimeout((()=>{(this.consent.isOptedIn()||this.sn())&&this.In()}),1),this.Tn=new wm(this),this.Tn.load()}Cn(){var t;this.is_capturing()&&this.config.request_batching&&((t=this.mn)==null||t.enable())}_dom_loaded(){this.is_capturing()&&mo(this.__request_queue,(t=>this.yn(t))),this.__request_queue=[],this.Cn()}_handle_unload(){var t,n,s,r;(t=this.surveys)==null||t.handlePageUnload(),this.config.request_batching?(this.En()&&this.capture(wl),(n=this.logs)==null||n.flushLogs("sendBeacon"),(s=this.mn)==null||s.unload(),(r=this.bn)==null||r.unload()):this.En()&&this.capture(wl,null,{transport:"sendBeacon"})}_send_request(t){this.__loaded&&(Mm?this.__request_queue.push(t):this.rateLimiter.isServerRateLimited(t.batchKey)||(t.transport=t.transport||this.config.api_transport,t.skipIPParam||(t.url=Va(t.url,{ip:this.config.ip?1:0})),t.headers=Z({},this.config.request_headers,t.headers),t.compression=t.compression==="best-available"?this.compression:t.compression,(te(this.config.disable_beacon)?this.config.__preview_disable_beacon:this.config.disable_beacon)&&(t.disableTransport=["sendBeacon"]),t.fetchOptions=t.fetchOptions||this.config.fetch_options,(n=>{var s,r,i,o=Z({},n);o.timeout=o.timeout||6e4,o.url=ap(o.url,o.compression);var a=(s=o.transport)!==null&&s!==void 0?s:"fetch",l=To.filter((u=>!o.disableTransport||!u.transport||!o.disableTransport.includes(u.transport))),c=(r=(i=(function(u,d){for(var f=0;u.length>f;f++)if(u[f].transport===a)return u[f]})(l))==null?void 0:i.method)!==null&&r!==void 0?r:l[0].method;if(!c)throw new Error("No available transport method");a!=="sendBeacon"&&o.data&&o.compression===bn.GZipJS&&Q2&&!Oo?TE(o).then((u=>{c(u)})).catch((u=>{if(Mf(u))return Oo=!0,void c(Z({},o,{compression:void 0,url:ap(n.url,void 0)}));(d=>{if(!d||typeof d!="object")return!1;var f="name"in d?String(d.name):"";return Mf(d)||f===vv})(u)&&(Oo=!0),c(o)})):c(o)})(Z({},t,{callback:n=>{var s,r;this.rateLimiter.checkForLimiting(n),400>n.statusCode||(s=(r=this.config).on_request_error)==null||s.call(r,n),t.callback==null||t.callback(n)}}))))}yn(t){this.bn?this.bn.retriableRequest(t):this._send_request(t)}_execute_array(t){Ml++;try{var n,s=[],r=[],i=[];mo(t,(a=>{if(a)if(Ce(n=a[0]))i.push(a);else if(jn(a))try{a.call(this)}catch(l){re.error("Error executing queued PostHog call",a,l)}else Ce(a)&&n==="alias"?s.push(a):Ce(a)&&n.indexOf("capture")!==-1&&jn(this[n])?i.push(a):r.push(a)}));var o=function(a,l){mo(a,(function(c){try{if(Ce(c[0])){var u=l;je(c,(function(d){u=u[d[0]].apply(u,d.slice(1))}))}else l[c[0]].apply(l,c.slice(1))}catch(d){re.error("Error executing queued PostHog call",c,d)}}))};o(s,this),o(r,this),o(i,this)}finally{Ml--}}push(t){if(Ml>0&&Ce(t)&&Ue(t[0])){var n=Qt.prototype[t[0]];jn(n)&&n.apply(this,t.slice(1))}else this._execute_array([t])}capture(t,n,s){var r,i,o,a,l;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.mn){if(this.is_capturing())if(!te(t)&&Ue(t)){var c=!this.config.opt_out_useragent_filter&&this._is_bot();if(!c||this.config.__preview_capture_bot_pageviews){var u=s!=null&&s.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(u==null||!u.isRateLimited){n!=null&&n.$current_url&&!Ue(n==null?void 0:n.$current_url)&&(re.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),n==null||delete n.$current_url),t!=="$exception"||s!=null&&s.Mn||re.warn("Using `posthog.capture('$exception')` is unreliable because it does not attach required metadata. Use `posthog.captureException(error)` instead, which attaches required metadata automatically."),this.sessionPersistence.update_search_keyword(),this.config.save_campaign_params&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.save_campaign_params||this.config.save_referrer)&&this.persistence.set_initial_person_info();var d=new Date,f=(s==null?void 0:s.timestamp)||d,p=(s==null?void 0:s.uuid)||ps(),g={uuid:p,event:t,properties:this.calculateEventProperties(t,n||{},f,p)};t===dr&&this.config.__preview_capture_bot_pageviews&&c&&(g.event="$bot_pageview",g.properties.$browser_type="bot"),u&&(g.properties.$lib_rate_limit_remaining_tokens=u.remainingTokens),s!=null&&s.$set&&(g.$set=s==null?void 0:s.$set);var h=s==null?void 0:s.$unset;h&&(g.$unset=h);var m,v,y,x=this.Rn(s==null?void 0:s.$set_once,t!==zf,t===kl);if(x&&(g.$set_once=x),s!=null&&s._noTruncate||(i=this.config.properties_string_max_length,o=g,a=K=>Ue(K)?K.slice(0,i):K,l=new Set,g=(function K(U,C){return U!==Object(U)?a?a(U):U:l.has(U)?void 0:(l.add(U),Ce(U)?(F=[],mo(U,(V=>{F.push(K(V))}))):(F={},je(U,((V,X)=>{l.has(V)||(F[X]=K(V))}))),F);var F})(o)),g.timestamp=f,te(s==null?void 0:s.timestamp)||(g.properties.$event_time_override_provided=!0,g.properties.$event_time_override_system_time=d),t===hi.DISMISSED||t===hi.SENT){var k=n==null?void 0:n[Ol.SURVEY_ID],O=n==null?void 0:n[Ol.SURVEY_ITERATION];(K=>{try{var U=(C=>((F,V)=>{var X=""+Ju+V.id;return V.current_iteration&&V.current_iteration>0&&(X=""+Ju+V.id+"_"+V.current_iteration),X})(0,C))(K);if(localStorage.getItem(U))return;localStorage.setItem(U,"true")}catch(C){Ne.error("Failed to persist survey seen state",C)}})({id:k,current_iteration:O}),g.$set=Z({},g.$set,{[(m={id:k,current_iteration:O},v=t===hi.SENT?"responded":"dismissed",y="$survey_"+v+"/"+m.id,m.current_iteration&&m.current_iteration>0&&(y="$survey_"+v+"/"+m.id+"/"+m.current_iteration),y)]:!0})}else t===hi.SHOWN&&(g.$set=Z({},g.$set,{[Ol.SURVEY_LAST_SEEN_DATE]:new Date().toISOString()}));if(t===xE.SHOWN){var q=n==null?void 0:n[ep.TOUR_TYPE];q&&(g.$set=Z({},g.$set,{[ep.TOUR_LAST_SEEN_DATE+"/"+q]:new Date().toISOString()}))}var E=Z({},g.properties.$set,g.$set);if(hs(E)||this.setPersonPropertiesForFlags(E),!Se(this.config.before_send)){var R=this.Pn(g);if(!R)return;g=R}this.ln.emit("eventCaptured",g);var T={method:"POST",url:(r=s==null?void 0:s._url)!==null&&r!==void 0?r:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:g,compression:"best-available",batchKey:s==null?void 0:s._batchKey,transport:s==null?void 0:s.transport};return!this.config.request_batching||s&&(s==null||!s._batchKey)||s!=null&&s.send_instantly?this.yn(T):this.mn.enqueue(T),g}re.critical("This capture call is ignored due to client rate limiting.")}}else re.error("No event name provided to posthog.capture")}else re.uninitializedWarning("posthog.capture")}_addCaptureHook(t){return this.on("eventCaptured",(n=>t(n.event,n)))}calculateEventProperties(t,n,s,r,i){if(s=s||new Date,!this.persistence||!this.sessionPersistence)return n;var o=i?void 0:this.persistence.remove_event_timer(t),a=Z({},n);if(a.token=this.config.token,a.$config_defaults=this.config.defaults,this.sn()&&(a.$cookieless_mode=!0),t==="$snapshot"){var l=Z({},this.persistence.properties(),this.sessionPersistence.properties());return a.distinct_id=l.distinct_id,(!Ue(a.distinct_id)&&!Ft(a.distinct_id)||mu(a.distinct_id))&&re.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),a}var c,u=(function(v,y,x){var k,O,q,E;if(!Lt)return{};var R,T,K,U,C,F,V,X,$,A=v?[...Fr,...y||[]]:[],[L,de]=(function(at){for(var nt=0;Lf.length>nt;nt++){var[ot,Qe]=Lf[nt],B=ot.exec(at),ne=B&&(jn(Qe)?Qe(B,at):Qe);if(ne)return ne}return["",""]})(Lt),qe=(R=typeof navigator<"u"?navigator:void 0)!=null&&R.brave?{brave:!0}:{},Pe={detectGoogleSearchApp:x},Je=Ge(Hc({$os:L,$os_version:de,$browser:qv(Lt,navigator.vendor,qe,Pe),$device:Nf(Lt),$device_type:(K=Lt,U={userAgentDataPlatform:(k=navigator)==null||(k=k.userAgentData)==null?void 0:k.platform,maxTouchPoints:(O=navigator)==null?void 0:O.maxTouchPoints,screenWidth:M==null||(q=M.screen)==null?void 0:q.width,screenHeight:M==null||(E=M.screen)==null?void 0:E.height,devicePixelRatio:M==null?void 0:M.devicePixelRatio},$=Nf(K),$===xv||$===bv||$==="Kobo"||$==="Kindle Fire"||$===$v?Rr:$===Ni||$===Cr||$===qi||$===yu?"Console":$===kv?"Wearable":$?Jt:(U==null?void 0:U.userAgentDataPlatform)==="Android"&&((C=U==null?void 0:U.maxTouchPoints)!==null&&C!==void 0?C:0)>0?600>Math.min((F=U==null?void 0:U.screenWidth)!==null&&F!==void 0?F:0,(V=U==null?void 0:U.screenHeight)!==null&&V!==void 0?V:0)/((X=U==null?void 0:U.devicePixelRatio)!==null&&X!==void 0?X:1)?Jt:Rr:"Desktop"),$timezone:xm(),$timezone_offset:_E()}),{$current_url:Hi(bt==null?void 0:bt.href,A,Vi),$host:bt==null?void 0:bt.host,$pathname:bt==null?void 0:bt.pathname,$raw_user_agent:Lt.length>1e3?Lt.substring(0,997)+"...":Lt,$browser_version:_k(Lt,navigator.vendor,qe,Pe),$browser_language:Qf(),$browser_language_prefix:(T=Qf(),typeof T=="string"?T.split("-")[0]:void 0),$screen_height:M==null?void 0:M.screen.height,$screen_width:M==null?void 0:M.screen.width,$viewport_height:M==null?void 0:M.innerHeight,$viewport_width:M==null?void 0:M.innerWidth,$lib:gt.LIB_NAME,$lib_version:gt.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3});return gt.SDK_DIST_CHANNEL&&(Je.$sdk_dist_channel=gt.SDK_DIST_CHANNEL),Je})(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties,this.config.detect_google_search_app);if(this.sessionManager){var{sessionId:d,windowId:f}=this.sessionManager.checkAndGetSessionAndWindowId(i,s.getTime());a.$session_id=d,a.$window_id=f}this.sessionPropsManager&&Ge(a,this.sessionPropsManager.getSessionProps());try{var p;this.sessionRecording&&Ge(a,this.sessionRecording.sdkDebugProperties),a.$sdk_debug_retry_queue_size=(p=this.bn)==null?void 0:p.length}catch(v){a.$sdk_debug_error_capturing_properties=String(v)}if(this.requestRouter.region===Yu&&(a.$lib_custom_api_host=this.config.api_host),c=t!==dr||i?t!==wl||i?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(s):this.pageViewManager.doPageView(s,r),a=Ge(a,c),t===dr&&ie&&(a.title=ie.title),!te(o)){var g=s.getTime()-o;a.$duration=parseFloat((g/1e3).toFixed(3))}Lt&&this.config.opt_out_useragent_filter&&(a.$browser_type=this._is_bot()?"bot":"browser"),(a=Ge({},u,this.persistence.properties(),this.sessionPersistence.properties(),a)).$is_identified=this._isIdentified(),Ce(this.config.property_denylist)?je(this.config.property_denylist,(function(v){delete a[v]})):re.error(Rm+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var h=this.config.sanitize_properties;h&&(re.error(pp),a=h(a,t));var m=this.On();return a.$process_person_profile=m,m&&!i&&this.Ln("_calculate_event_properties"),a}Rn(t,n,s){var r;if(n===void 0&&(n=!0),s===void 0&&(s=!1),!this.persistence||!this.On()||this.an&&!s)return t;var i=this.persistence.get_initial_props(),o=(r=this.sessionPropsManager)==null?void 0:r.getSetOnceProps(),a=Ge({},i,o||{},t||{}),l=this.config.sanitize_properties;return l&&(re.error(pp),a=l(a,"$set_once")),n&&(this.an=!0),hs(a)?void 0:a}register(t,n){var s;(s=this.persistence)==null||s.register(t,n)}register_once(t,n,s){var r;(r=this.persistence)==null||r.register_once(t,n,s)}register_for_session(t){var n;(n=this.sessionPersistence)==null||n.register(t)}unregister(t){var n;(n=this.persistence)==null||n.unregister(t)}unregister_for_session(t){var n;(n=this.sessionPersistence)==null||n.unregister(t)}An(t,n){this.register({[t]:n})}getFeatureFlag(t,n){var s;return(s=this.featureFlags)==null?void 0:s.getFeatureFlag(t,n)}getFeatureFlagPayload(t){var n;return(n=this.featureFlags)==null?void 0:n.getFeatureFlagPayload(t)}getFeatureFlagResult(t,n){var s;return(s=this.featureFlags)==null?void 0:s.getFeatureFlagResult(t,n)}isFeatureEnabled(t,n){var s;return(s=this.featureFlags)==null?void 0:s.isFeatureEnabled(t,n)}reloadFeatureFlags(){var t;(t=this.featureFlags)==null||t.reloadFeatureFlags()}updateFlags(t,n,s){var r;(r=this.featureFlags)==null||r.updateFlags(t,n,s)}updateEarlyAccessFeatureEnrollment(t,n,s){var r;(r=this.featureFlags)==null||r.updateEarlyAccessFeatureEnrollment(t,n,s)}getEarlyAccessFeatures(t,n,s){var r;return n===void 0&&(n=!1),(r=this.featureFlags)==null?void 0:r.getEarlyAccessFeatures(t,n,s)}on(t,n){return this.ln.on(t,n)}onFeatureFlags(t){return this.featureFlags?this.featureFlags.onFeatureFlags(t):(t([],{},{errorsLoading:!0}),()=>{})}onSurveysLoaded(t){return this.surveys?this.surveys.onSurveysLoaded(t):(t([],{isLoaded:!1,error:si}),()=>{})}onSessionId(t){var n,s;return(n=(s=this.sessionManager)==null?void 0:s.onSessionId(t))!==null&&n!==void 0?n:()=>{}}getSurveys(t,n){n===void 0&&(n=!1),this.surveys?this.surveys.getSurveys(t,n):t([],{isLoaded:!1,error:si})}getActiveMatchingSurveys(t,n){n===void 0&&(n=!1),this.surveys?this.surveys.getActiveMatchingSurveys(t,n):t([],{isLoaded:!1,error:si})}renderSurvey(t,n){var s;(s=this.surveys)==null||s.renderSurvey(t,n)}displaySurvey(t,n){var s;n===void 0&&(n=qE),(s=this.surveys)==null||s.displaySurvey(t,n)}cancelPendingSurvey(t){var n;(n=this.surveys)==null||n.cancelPendingSurvey(t)}canRenderSurvey(t){var n,s;return(n=(s=this.surveys)==null?void 0:s.canRenderSurvey(t))!==null&&n!==void 0?n:{visible:!1,disabledReason:si}}canRenderSurveyAsync(t,n){var s,r;return n===void 0&&(n=!1),(s=(r=this.surveys)==null?void 0:r.canRenderSurveyAsync(t,n))!==null&&s!==void 0?s:Promise.resolve({visible:!1,disabledReason:si})}Fn(t){return!t||mu(t)?(re.critical("Unique user id has not been set in posthog.identify"),!1):t===vo?(re.critical('The string "'+t+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.'),!1):!["distinct_id","distinctid"].includes(t.toLowerCase())&&!["undefined","null"].includes(t.toLowerCase())||(re.critical('The string "'+t+'" was set in posthog.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.'),!1)}identify(t,n,s){if(!this.__loaded||!this.persistence)return re.uninitializedWarning("posthog.identify");if(Ft(t)&&(t=t.toString(),re.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),this.Fn(t)&&this.Ln("posthog.identify")){var r=this.get_distinct_id();this.register({$user_id:t}),this.get_property(ta)||this.register_once({$had_persisted_distinct_id:!0,$device_id:r},""),t!==r&&t!==this.get_property(ci)&&(this.unregister(ci),this.register({distinct_id:t}));var i,o=(this.persistence.get_property(nn)||tr)===tr;t!==r&&o?(this.persistence.set_property(nn,nr),this.setPersonPropertiesForFlags({$set:n||{},$set_once:s||{}},!1),this.capture(kl,{distinct_id:t,$anon_distinct_id:r},{$set:n||{},$set_once:s||{}}),this.dn=cp(t,n,s),(i=this.featureFlags)==null||i.setAnonymousDistinctId(r)):(n||s)&&this.setPersonProperties(n,s),t!==r&&(this.reloadFeatureFlags(),this.unregister(Si))}}setPersonProperties(t,n){if((t||n)&&this.Ln("posthog.setPersonProperties")){var s=cp(this.get_distinct_id(),t,n);this.dn!==s?(this.setPersonPropertiesForFlags({$set:t||{},$set_once:n||{}},!0),this.capture("$set",{$set:t||{},$set_once:n||{}}),this.dn=s):re.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}unsetPersonProperties(t){var n,s=(Ce(t)?t:[t]).filter((r=>Ue(r)&&r.length>0));s.length!==0&&this.Ln("posthog.unsetPersonProperties")&&((n=this.featureFlags)==null||n.unsetPersonPropertiesForFlags(s,!0),this.capture("$set",{$unset:s}),this.dn=null)}group(t,n,s){if(t&&n){var r=this.getGroups(),i=r[t]!==n;if(i&&this.resetGroupPropertiesForFlags(t),this.register({$groups:Z({},r,{[t]:n})}),i||s){var o={$group_type:t,$group_key:n};s&&(o.$group_set=s),this.capture(zf,o)}s&&this.setGroupPropertiesForFlags({[t]:s}),i&&!s&&this.reloadFeatureFlags()}else re.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(t,n){var s;n===void 0&&(n=!0),(s=this.featureFlags)==null||s.setPersonPropertiesForFlags(t,n)}resetPersonPropertiesForFlags(t){var n;t===void 0&&(t=!0),(n=this.featureFlags)==null||n.resetPersonPropertiesForFlags(t)}setGroupPropertiesForFlags(t,n){var s;n===void 0&&(n=!0),this.Ln("posthog.setGroupPropertiesForFlags")&&((s=this.featureFlags)==null||s.setGroupPropertiesForFlags(t,n))}resetGroupPropertiesForFlags(t){var n;(n=this.featureFlags)==null||n.resetGroupPropertiesForFlags(t)}reset(t){var n,s,r,i,o,a,l,c;if(re.info("reset"),!this.__loaded)return re.uninitializedWarning("posthog.reset");var u,d=this.get_property(ta),f=this.get_property(zs);if(this.consent.reset(),(n=this.persistence)==null||n.clear(),(s=this.sessionPersistence)==null||s.clear(),te(f)||(u=this.persistence)==null||u.register({[zs]:f}),(r=this.surveys)==null||r.reset(),(i=this.Tn)==null||i.stop(),(o=this.featureFlags)==null||o.reset(),(a=this.conversations)==null||a.reset(),(l=this.persistence)==null||l.set_property(nn,tr),(c=this.sessionManager)==null||c.resetSessionId(),this.dn=null,this.config.cookieless_mode===Gn)this.register_once({distinct_id:vo,$device_id:null},"");else{var p=this.config.get_device_id(ps());this.register_once({distinct_id:p,$device_id:t?p:d},"")}this.register({$last_posthog_reset:new Date().toISOString()},1),delete this.config.identity_distinct_id,delete this.config.identity_hash,this.reloadFeatureFlags()}setIdentity(t,n){var s;this.config.identity_distinct_id=t,this.config.identity_hash=n,this.alias(t),(s=this.conversations)==null||s.Nn()}clearIdentity(){var t;delete this.config.identity_distinct_id,delete this.config.identity_hash,(t=this.conversations)==null||t.Dn()}get_distinct_id(){return this.get_property("distinct_id")}getGroups(){return this.get_property("$groups")||{}}get_session_id(){var t,n;return(t=(n=this.sessionManager)==null?void 0:n.checkAndGetSessionAndWindowId(!0).sessionId)!==null&&t!==void 0?t:""}get_session_replay_url(t){if(!this.sessionManager)return"";var{sessionId:n,sessionStartTimestamp:s}=this.sessionManager.checkAndGetSessionAndWindowId(!0),r=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+n);if(t!=null&&t.withTimestamp&&s){var i,o=(i=t.timestampLookBack)!==null&&i!==void 0?i:10;if(!s)return r;r+="?t="+Math.max(Math.floor((new Date().getTime()-s)/1e3)-o,0)}return r}alias(t,n){return t===this.get_property(Uv)?(re.critical("Attempting to create alias for existing People user - aborting."),-2):this.Ln("posthog.alias")?(te(n)&&(n=this.get_distinct_id()),t!==n?(this.An(ci,t),this.capture("$create_alias",{alias:t,distinct_id:n})):(re.warn("alias matches current distinct_id - skipping api call."),this.identify(t),-1)):void 0}set_config(t){var n=Z({},this.config);if(et(t)){var s,r,i,o,a,l,c,u,d,f,p;Ge(this.config,gp(t));var g=this.gn();(s=this.persistence)==null||s.update_config(this.config,n,g),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new Pl(Z({},this.config,{persistence:"sessionStorage"}),g,!1);var h=this.vn(this.config.debug);Pn(h)&&(this.config.debug=h),Pn(this.config.debug)&&(this.config.debug?(gt.DEBUG=!0,ze.O()&&ze.N("ph_debug",!0),re.info("set_config",{config:t,oldConfig:n,newConfig:Z({},this.config)})):(gt.DEBUG=!1,ze.O()&&ze.q("ph_debug"))),(r=this.exceptionObserver)==null||r.onConfigChange(),(i=this.exceptions)==null||i.onConfigChange(),(o=this.sessionRecording)==null||o.startIfEnabledOrStop(),(a=this.tracingHeaders)==null||a.startIfEnabledOrStop(),(l=this.autocapture)==null||l.startIfEnabled(),(c=this.heatmaps)==null||c.startIfEnabled(),(u=this.exceptionObserver)==null||u.startIfEnabledOrStop(),(d=this.deadClicksAutocapture)==null||d.startIfEnabledOrStop(),(f=this.surveys)==null||f.loadIfEnabled(),this.$n(),(p=this.externalIntegrations)==null||p.startIfEnabledOrStop()}}_overrideSDKInfo(t,n){gt.LIB_NAME=t,gt.LIB_VERSION=n}startSessionRecording(t){var n,s,r,i,o,a=t===!0,l={sampling:a||!(t==null||!t.sampling),linked_flag:a||!(t==null||!t.linked_flag),url_trigger:a||!(t==null||!t.url_trigger),event_trigger:a||!(t==null||!t.event_trigger)};Object.values(l).some(Boolean)&&((n=this.sessionManager)==null||n.checkAndGetSessionAndWindowId(),l.sampling&&((s=this.sessionRecording)==null||s.overrideSampling()),l.linked_flag&&((r=this.sessionRecording)==null||r.overrideLinkedFlag()),l.url_trigger&&((i=this.sessionRecording)==null||i.overrideTrigger("url")),l.event_trigger&&((o=this.sessionRecording)==null||o.overrideTrigger("event"))),this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var t;return!((t=this.sessionRecording)==null||!t.started)}captureException(t,n){if(this.exceptions){var s=new Error("PostHog syntheticException"),r=this.exceptions.buildProperties(t,{handled:!0,syntheticException:s});return this.exceptions.sendExceptionEvent(Z({},r,n))}}addExceptionStep(t,n){var s;(s=this.exceptions)==null||s.addExceptionStep(t,n)}captureLog(t){var n;(n=this.logs)==null||n.captureLog(t)}get logger(){var t,n;return(t=(n=this.logs)==null?void 0:n.logger)!==null&&t!==void 0?t:Qt.qn}startExceptionAutocapture(t){this.set_config({capture_exceptions:t==null||t})}stopExceptionAutocapture(){this.set_config({capture_exceptions:!1})}loadToolbar(t){var n,s;return(n=(s=this.toolbar)==null?void 0:s.loadToolbar(t))!==null&&n!==void 0&&n}get_property(t){var n;return(n=this.persistence)==null?void 0:n.props[t]}getSessionProperty(t){var n;return(n=this.sessionPersistence)==null?void 0:n.props[t]}toString(){var t,n=(t=this.config.name)!==null&&t!==void 0?t:fr;return n!==fr&&(n=fr+"."+n),n}_isIdentified(){var t,n;return((t=this.persistence)==null?void 0:t.get_property(nn))===nr||((n=this.sessionPersistence)==null?void 0:n.get_property(nn))===nr}On(){var t,n;return!(this.config.person_profiles==="never"||this.config.person_profiles===zu&&!this._isIdentified()&&hs(this.getGroups())&&((t=this.persistence)==null||(t=t.props)==null||!t[ci])&&((n=this.persistence)==null||(n=n.props)==null||!n[sa]))}En(){return this.config.capture_pageleave===!0||this.config.capture_pageleave==="if_capture_pageview"&&(this.config.capture_pageview===!0||this.config.capture_pageview==="history_change")}createPersonProfile(){this.On()||this.Ln("posthog.createPersonProfile")&&this.setPersonProperties({},{})}setInternalOrTestUser(){this.Ln("posthog.setInternalOrTestUser")&&this.setPersonProperties({$internal_or_test_user:!0})}Ln(t){return this.config.person_profiles==="never"?(re.error(t+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.An(sa,!0),!0)}gn(){if(this.config.cookieless_mode==="always")return!0;var t=this.consent.isOptedOut();return this.config.disable_persistence||t&&!(!this.config.opt_out_persistence_by_default&&this.config.cookieless_mode!==Ns)}$n(){var t,n,s,r,i=this.gn();return((t=this.persistence)==null?void 0:t.Tr)!==i&&((s=this.persistence)==null||s.set_disabled(i)),((n=this.sessionPersistence)==null?void 0:n.Tr)!==i&&((r=this.sessionPersistence)==null||r.set_disabled(i)),i}opt_in_capturing(t){var n;if(this.config.cookieless_mode!==Gn){if(this.sn()){var s,r,i,o,a;this.reset(!0),(s=this.sessionManager)==null||s.destroy(),(r=this.pageViewManager)==null||r.destroy(),this.sessionManager=new up(this),this.pageViewManager=new Zf(this),this.persistence&&(this.sessionPropsManager=new lp(this,this.sessionManager,this.persistence));var l,c=(i=(o=this.config.__extensionClasses)==null?void 0:o.sessionRecording)!==null&&i!==void 0?i:(a=Qt.__defaultExtensionClasses)==null?void 0:a.sessionRecording;c&&(this.sessionRecording=this.rn(this.sessionRecording,new c(this)),this.Sn&&((l=this.sessionRecording)==null||l.onRemoteConfig==null||l.onRemoteConfig(this.Sn)))}var u,d;this.consent.optInOut(!0),this.$n(),this.Cn(),(n=this.sessionRecording)==null||n.startIfEnabledOrStop(),this.config.cookieless_mode==Ns&&((u=this.surveys)==null||u.loadIfEnabled()),(te(t==null?void 0:t.captureEventName)||t!=null&&t.captureEventName)&&this.capture((d=t==null?void 0:t.captureEventName)!==null&&d!==void 0?d:"$opt_in",t==null?void 0:t.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.In()}else re.warn(fp)}opt_out_capturing(){var t,n,s;this.config.cookieless_mode!==Gn?(this.config.cookieless_mode===Ns&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this.$n(),this.config.cookieless_mode===Ns&&(this.register({distinct_id:vo,$device_id:null}),(t=this.sessionRecording)==null||t.stopRecording(),this.sessionRecording=void 0,(n=this.sessionManager)==null||n.destroy(),(s=this.pageViewManager)==null||s.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,this.config.capture_pageview&&this.In(),this.Cn())):re.warn(fp)}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}get_explicit_consent_status(){var t=this.consent.consent;return t===1?"granted":t===0?"denied":"pending"}is_capturing(){return this.config.cookieless_mode===Gn||(this.config.cookieless_mode===Ns?this.consent.isRejected()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.$n()}_is_bot(){return Ut?Om(Ut,this.config.custom_blocked_useragents):void 0}In(){ie&&(ie.visibilityState==="visible"?this.un||(this.un=!0,this.capture(dr,{title:ie.title},{send_instantly:!0}),this.hn&&(ie.removeEventListener(ra,this.hn),this.hn=null)):this.hn||(this.hn=this.In.bind(this),rt(ie,ra,this.hn)))}debug(t){t===!1?(M==null||M.console.log("You've disabled debug mode."),this.set_config({debug:!1})):(M==null||M.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),this.set_config({debug:!0}))}Kr(){var t,n,s,r,i,o,a=this.fn||{};return"advanced_disable_flags"in a?!!a.advanced_disable_flags:this.config.advanced_disable_flags!==!1?!!this.config.advanced_disable_flags:this.config.advanced_disable_decide===!0?(re.warn("Config field 'advanced_disable_decide' is deprecated. Please use 'advanced_disable_flags' instead. The old field will be removed in a future major version."),!0):(s="advanced_disable_decide",r=re,i=(n="advanced_disable_flags")in(t=a)&&!Se(t[n]),o=s in t&&!Se(t[s]),i?t[n]:!!o&&(r&&r.warn("Config field '"+s+"' is deprecated. Please use '"+n+"' instead. The old field will be removed in a future major version."),t[s]))}Pn(t){var n;if(Se(this.config.before_send))return t;var s=Object.keys((n=t.properties)!==null&&n!==void 0?n:{}).filter(ok),r=Ce(this.config.before_send)?this.config.before_send:[this.config.before_send],i=t;for(var o of r){if(i=o(i),Se(i)){var a="Event '"+t.event+"' was rejected in beforeSend function";return ik(t.event)?re.warn(a+". This can cause unexpected behavior."):re.info(a),null}i.properties&&!hs(i.properties)||re.warn("Event '"+t.event+"' has no properties after beforeSend function, this is likely an error.")}for(var l of s)if(i.properties&&Se(i.properties[l]))return re.warn("Event '"+t.event+"' had its '"+l+"' property removed in a beforeSend function. This property is required for ingestion, so the event will be dropped."),null;return i}getPageViewId(){var t;return(t=this.pageViewManager.dr)==null?void 0:t.pageViewId}captureTraceFeedback(t,n){this.capture("$ai_feedback",{$ai_trace_id:String(t),$ai_feedback_text:n})}captureTraceMetric(t,n,s){this.capture("$ai_metric",{$ai_trace_id:String(t),$ai_metric_name:n,$ai_metric_value:String(s)})}vn(t){var n=Pn(t)&&!t,s=ze.O()&&ze.A("ph_debug")==="true";return!n&&(!!s||t)}}Qt.__defaultExtensionClasses={},Qt.qn={trace:ir=()=>{},debug:ir,info:ir,warn:ir,error:ir,fatal:ir},(function(e,t){for(var n=0;t.length>n;n++)e.prototype[t[n]]=Vk(e.prototype[t[n]])})(Qt,["identify"]);class vp{constructor(t){this.disabled=t===!1;var n=et(t)?t:{};this.thresholdPx=n.threshold_px||30,this.timeoutMs=n.timeout_ms||1e3,this.clickCount=n.click_count||3,this.clicks=[]}isRageClick(t,n,s){if(this.disabled)return!1;var r=this.clicks[this.clicks.length-1];if(r&&Math.abs(t-r.x)+Math.abs(n-r.y)<this.thresholdPx&&this.timeoutMs>s-r.timestamp){if(this.clicks.push({x:t,y:n,timestamp:s}),this.clicks.length===this.clickCount)return!0}else this.clicks=[{x:t,y:n,timestamp:s}];return!1}}var $l="$copy_autocapture",Fl=Ze("[AutoCapture]");function Dl(e,t){return t.length>e?t.slice(0,e)+"...":t}function UE(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do t=t.previousSibling;while(t&&!xs(t));return t}function WE(e,t){var n,s,{e:r,maskAllElementAttributes:i,maskAllText:o,elementAttributeIgnoreList:a,elementsChainAsString:l}=t;if(!xs(e))return{props:{}};for(var c=[e],u=e;u.parentNode&&!Wt(u,"body");)if(rm(u.parentNode))c.push(u.parentNode.host),u=u.parentNode.host;else{if(!xs(u.parentNode))break;c.push(u.parentNode),u=u.parentNode}var d,f,p=[],g={},h=!1,m=!1;if(je(c,(O=>{var q=Hu(O);if(Wt(O,"a")){var E=O.getAttribute("href");h=q&&!!E&&Ci(E)&&E}be(aa(O),"ph-no-capture")&&(m=!0),p.push((function(T,K,U,C){var F=T.tagName.toLowerCase(),V={tag_name:F};Uc.indexOf(F)>-1&&!U&&(V.$el_text=F.toLowerCase()==="a"||F.toLowerCase()==="button"?Dl(1024,Yf(T)):Dl(1024,zi(T)));var X=aa(T);X.length>0&&(V.classes=X.filter((function(de){return de!==""}))),je(T.attributes,(function(de){var qe;if((!um(T)||["name","id","class","aria-label"].indexOf(de.name)!==-1)&&(C==null||!C.includes(de.name))&&!K&&Ci(de.value)&&(!Ue(qe=de.name)||qe.substring(0,10)!=="_ngcontent"&&qe.substring(0,7)!=="_nghost")){var Pe=de.value;de.name==="class"&&(Pe=Vc(Pe).join(" ")),V["attr__"+de.name]=Dl(1024,Pe)}}));for(var $=1,A=1,L=T;L=UE(L);)$++,L.tagName===T.tagName&&A++;return V.nth_child=$,V.nth_of_type=A,V})(O,i,o,a));var R=(function(T){if(!Hu(T))return{};var K={};return je(T.attributes,(function(U){if(U.name&&U.name.indexOf("data-ph-capture-attribute")===0){var C=U.name.replace("data-ph-capture-attribute-",""),F=U.value;C&&F&&Ci(F)&&(K[C]=F)}})),K})(O);Ge(g,R)})),m)return{props:{},explicitNoCapture:m};if(o||(p[0].$el_text=Wt(e,"a")||Wt(e,"button")?Yf(e):zi(e)),h){var v,y;p[0].attr__href=h;var x=(v=la(h))==null?void 0:v.host,k=M==null||(y=M.location)==null?void 0:y.host;x&&k&&x!==k&&(d=h)}return{props:Ge({$event_type:r.type,$ce_version:1},l?{}:{$elements:p},{$elements_chain:(f=p,(function(O){return O.map((q=>{var E,R,T="";if(q.tag_name&&(T+=q.tag_name),q.attr_class)for(var K of(q.attr_class.sort(),q.attr_class))T+="."+K.replace(/"/g,"");var U=Z({},q.text?{text:q.text}:{},{"nth-child":(E=q.nth_child)!==null&&E!==void 0?E:0,"nth-of-type":(R=q.nth_of_type)!==null&&R!==void 0?R:0},q.href?{href:q.href}:{},q.attr_id?{attr_id:q.attr_id}:{},q.attributes),C={};return Ao(U).sort(((F,V)=>{var[X]=F,[$]=V;return X.localeCompare($)})).forEach((F=>{var[V,X]=F;return C[Jf(V.toString())]=Jf(X.toString())})),(T+=":")+Ao(C).map((F=>{var[V,X]=F;return V+'="'+X+'"'})).join("")})).join(";")})((function(O){return O.map((q=>{var E,R,T={text:(E=q.$el_text)==null?void 0:E.slice(0,400),tag_name:q.tag_name,href:(R=q.attr__href)==null?void 0:R.slice(0,2048),attr_class:cE(q),attr_id:q.attr__id,nth_child:q.nth_child,nth_of_type:q.nth_of_type,attributes:{}};return Ao(q).filter((K=>{var[U]=K;return U.indexOf("attr__")===0})).forEach((K=>{var[U,C]=K;return T.attributes[U]=C})),T}))})(f)))},(n=p[0])!=null&&n.$el_text?{$el_text:(s=p[0])==null?void 0:s.$el_text}:{},d&&r.type==="click"?{$external_click_url:d}:{},g)}}var ri=Ze("[ExceptionAutocapture]"),GE=Ze("[TracingHeaders]"),Is=Ze("[Web Vitals]"),mp=9e5,_p="disabled",yp="lazy_loading",ii="awaiting_config",ko="missing_config";Ze("[SessionRecording]"),Ze("[SessionRecording]");var Zu="[SessionRecording]",Dn=Ze(Zu),KE=Ze("[Heatmaps]");function bp(e){return et(e)&&"clientX"in e&&"clientY"in e&&Ft(e.clientX)&&Ft(e.clientY)}var Ll=Ze("[Product Tours]"),Nl=e=>{var t;return!e.config.disable_product_tours&&!((t=e.persistence)==null||!t.get_property(qc))},YE=["$set_once","$set"],vn=Ze("[SiteApps]"),xp="Error while initializing PostHog app with config id ";function or(e,t,n){if(Se(e))return!1;switch(n){case"exact":return e===t;case"contains":var s=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/_/g,".").replace(/%/g,".*");return new RegExp(s,"i").test(e);case"regex":try{return new RegExp(t).test(e)}catch{return!1}default:return!1}}class JE{constructor(t){this.jn=new Yc,this.Bn=(n,s)=>this.Hn(n,s)&&this.Un(n,s)&&this.zn(n,s)&&this.Vn(n,s),this.Hn=(n,s)=>s==null||!s.event||(n==null?void 0:n.event)===(s==null?void 0:s.event),this._instance=t,this.Wn=new Set,this.Gn=new Set}init(){var t,n;te((t=this._instance)==null?void 0:t._addCaptureHook)||(n=this._instance)==null||n._addCaptureHook(((s,r)=>{this.on(s,r)}))}register(t){var n,s;if(!te((n=this._instance)==null?void 0:n._addCaptureHook)&&(t.forEach((o=>{var a,l;(a=this.Gn)==null||a.add(o),(l=o.steps)==null||l.forEach((c=>{var u;(u=this.Wn)==null||u.add((c==null?void 0:c.event)||"")}))})),(s=this._instance)!=null&&s.autocapture)){var r,i=new Set;t.forEach((o=>{var a;(a=o.steps)==null||a.forEach((l=>{l!=null&&l.selector&&i.add(l==null?void 0:l.selector)}))})),(r=this._instance)==null||r.autocapture.setElementSelectors(i)}}on(t,n){var s;n!=null&&t.length!=0&&(this.Wn.has(t)||this.Wn.has(n==null?void 0:n.event))&&this.Gn&&((s=this.Gn)==null?void 0:s.size)>0&&this.Gn.forEach((r=>{this.Zn(n,r)&&this.jn.emit("actionCaptured",r.name)}))}Qn(t){this.onAction("actionCaptured",(n=>t(n)))}Zn(t,n){if((n==null?void 0:n.steps)==null)return!1;for(var s of n.steps)if(this.Bn(t,s))return!0;return!1}onAction(t,n){return this.jn.on(t,n)}Un(t,n){if(n!=null&&n.url){var s,r=t==null||(s=t.properties)==null?void 0:s.$current_url;if(!r||typeof r!="string"||!or(r,n.url,n.url_matching||"contains"))return!1}return!0}zn(t,n){return!!this.Jn(t,n)&&!!this.Kn(t,n)&&!!this.Yn(t,n)}Jn(t,n){var s;if(n==null||!n.href)return!0;var r=this.Xn(t);if(r.length>0)return r.some((a=>or(a.href,n.href,n.href_matching||"exact")));var i,o=(t==null||(s=t.properties)==null?void 0:s.$elements_chain)||"";return!!o&&or((i=o.match(/(?::|")href="(.*?)"/))?i[1]:"",n.href,n.href_matching||"exact")}Kn(t,n){var s;if(n==null||!n.text)return!0;var r=this.Xn(t);if(r.length>0)return r.some((c=>or(c.text,n.text,n.text_matching||"exact")||or(c.$el_text,n.text,n.text_matching||"exact")));var i,o,a,l=(t==null||(s=t.properties)==null?void 0:s.$elements_chain)||"";return!!l&&(i=(function(c){for(var u,d=[],f=/(?::|")text="(.*?)"/g;!Se(u=f.exec(c));)d.includes(u[1])||d.push(u[1]);return d})(l),o=n.text,a=n.text_matching||"exact",i.some((c=>or(c,o,a))))}Yn(t,n){var s,r;if(n==null||!n.selector)return!0;var i=t==null||(s=t.properties)==null?void 0:s.$element_selectors;if(i!=null&&i.includes(n.selector))return!0;var o=(t==null||(r=t.properties)==null?void 0:r.$elements_chain)||"";if(n.selector_regex&&o)try{return new RegExp(n.selector_regex).test(o)}catch{return!1}return!1}Xn(t){var n;return(t==null||(n=t.properties)==null?void 0:n.$elements)==null?[]:t==null?void 0:t.properties.$elements}Vn(t,n){return n==null||!n.properties||n.properties.length===0||Im(n.properties.reduce(((s,r)=>{var i=Ce(r.value)?r.value.map(String):r.value!=null?[String(r.value)]:[];return s[r.key]={values:i,operator:r.operator||"exact"},s}),{}),t==null?void 0:t.properties)}}class XE{constructor(t){this._instance=t,this.es=new Map,this.ts=new Map,this.rs=new Map}ns(t,n){return!!t&&Im(t.propertyFilters,n==null?void 0:n.properties)}ss(t,n){var s=new Map;return t.forEach((r=>{var i;(i=r.conditions)==null||(i=i[n])==null||(i=i.values)==null||i.forEach((o=>{if(o!=null&&o.name){var a=s.get(o.name)||[];a.push(r.id),s.set(o.name,a)}}))})),s}os(t,n,s){var r=(s===Zr.Activation?this.es:this.ts).get(t),i=[];return this.ls((o=>{i=o.filter((a=>r==null?void 0:r.includes(a.id)))})),i.filter((o=>{var a,l=(a=o.conditions)==null||(a=a[s])==null||(a=a.values)==null?void 0:a.find((c=>c.name===t));return this.ns(l,n)}))}register(t){var n;te((n=this._instance)==null?void 0:n._addCaptureHook)||(this.us(t),this.hs(t))}hs(t){var n=t.filter((s=>{var r,i;return((r=s.conditions)==null?void 0:r.actions)&&((i=s.conditions)==null||(i=i.actions)==null||(i=i.values)==null?void 0:i.length)>0}));n.length!==0&&(this.cs==null&&(this.cs=new JE(this._instance),this.cs.init(),this.cs.Qn((s=>{this.onAction(s)}))),n.forEach((s=>{var r,i,o,a,l;s.conditions&&(r=s.conditions)!=null&&r.actions&&(i=s.conditions)!=null&&(i=i.actions)!=null&&i.values&&((o=s.conditions)==null||(o=o.actions)==null||(o=o.values)==null?void 0:o.length)>0&&((a=this.cs)==null||a.register(s.conditions.actions.values),(l=s.conditions)==null||(l=l.actions)==null||(l=l.values)==null||l.forEach((c=>{if(c&&c.name){var u=this.rs.get(c.name);u&&u.push(s.id),this.rs.set(c.name,u||[s.id])}})))})))}us(t){var n,s=t.filter((i=>{var o,a;return((o=i.conditions)==null?void 0:o.events)&&((a=i.conditions)==null||(a=a.events)==null||(a=a.values)==null?void 0:a.length)>0})),r=t.filter((i=>{var o,a;return((o=i.conditions)==null?void 0:o.cancelEvents)&&((a=i.conditions)==null||(a=a.cancelEvents)==null||(a=a.values)==null?void 0:a.length)>0}));s.length===0&&r.length===0||((n=this._instance)==null||n._addCaptureHook(((i,o)=>{this.onEvent(i,o)})),this.es=this.ss(t,Zr.Activation),this.ts=this.ss(t,Zr.Cancellation))}onEvent(t,n){var s,r=this.le(),i=this.ds(),o=this.vs(),a=((s=this._instance)==null||(s=s.persistence)==null?void 0:s.props[i])||[];if(o===t&&n&&a.length>0){var l,c;r.info("event matched, removing item from activated items",{event:t,eventPayload:n,existingActivatedItems:a});var u=(n==null||(l=n.properties)==null?void 0:l.$survey_id)||(n==null||(c=n.properties)==null?void 0:c.$product_tour_id);if(u){var d=a.indexOf(u);0>d||(a.splice(d,1),this.fs(a))}}else{if(this.ts.has(t)){var f=this.os(t,n,Zr.Cancellation);f.length>0&&(r.info("cancel event matched, cancelling items",{event:t,itemsToCancel:f.map((g=>g.id))}),f.forEach((g=>{var h=a.indexOf(g.id);0>h||a.splice(h,1),this.ps(g.id)})),this.fs(a))}if(this.es.has(t)){r.info("event name matched",{event:t,eventPayload:n,items:this.es.get(t)});var p=this.os(t,n,Zr.Activation);this.fs(a.concat(p.map((g=>g.id))||[]))}}}onAction(t){var n,s=this.ds(),r=((n=this._instance)==null||(n=n.persistence)==null?void 0:n.props[s])||[];this.rs.has(t)&&this.fs(r.concat(this.rs.get(t)||[]))}fs(t){var n=this.le(),s=[...new Set(t)].filter((r=>!this.gs(r)));n.info("updating activated items",{activatedItems:s}),this.ys(s)}getActivatedIds(){var t,n=this.ds();return((t=this._instance)==null||(t=t.persistence)==null?void 0:t.props[n])||[]}getEventToItemsMap(){return this.es}bs(){return this.cs}}class ZE extends XE{constructor(t){super(t)}ds(){return $u}vs(){return hi.SHOWN}ls(t){var n;(n=this._instance)==null||n.getSurveys(t)}ps(t){var n;(n=this._instance)==null||n.cancelPendingSurvey(t)}le(){return Ne}ys(t){var n;(n=this._instance)==null||(n=n.persistence)==null||n.register({[$u]:t})}gs(){return!1}getSurveys(){return this.getActivatedIds()}getEventToSurveys(){return this.getEventToItemsMap()}}var ql="SDK is not enabled or survey functionality is not yet loaded",wp="Disabled. Not loading surveys.",QE=M!=null&&M.location?ua(M.location.hash,"__posthog")||ua(location.hash,"state"):null,kp="_postHogToolbarParams",Ep=Ze("[Toolbar]"),yt=Ze("[FeatureFlags]"),Rs=Ze("[FeatureFlags]",{debugEnabled:!0}),Bl=`" failed. Feature flags didn't load in time.`,Sp=e=>{for(var t={},n=0;e.length>n;n++)t[e[n]]=!0;return t},Cp=e=>{var t={};for(var[n,s]of Ao(e||{}))s&&(t[n]=s);return t},Ln=Ze("[Error tracking]"),Pp="Refusing to render web experiment since the viewer is a likely bot",eS={icontains:(e,t)=>!!M&&t.href.toLowerCase().indexOf(e.toLowerCase())>-1,not_icontains:(e,t)=>!!M&&t.href.toLowerCase().indexOf(e.toLowerCase())===-1,regex:(e,t)=>!!M&&fa(t.href,e),not_regex:(e,t)=>!!M&&!fa(t.href,e),exact:(e,t)=>t.href===e,is_not:(e,t)=>t.href!==e};class St{get qt(){return this._instance.config}constructor(t){var n=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(s){s===void 0&&(s=!1),n.getWebExperiments((r=>{St._s("retrieved web experiments from the server"),n.ws=new Map,r.forEach((i=>{if(i.feature_flag_key){var o;n.ws&&(St._s("setting flag key ",i.feature_flag_key," to web experiment ",i),(o=n.ws)==null||o.set(i.feature_flag_key,i));var a=n._instance.getFeatureFlag(i.feature_flag_key);Ue(a)&&i.variants[a]&&n.xs(i.name,a,i.variants[a].transforms)}else if(i.variants)for(var l in i.variants){var c=i.variants[l];St.ks(c)&&n.xs(i.name,l,c.transforms)}}))}),s)},this._instance=t,this._instance.onFeatureFlags((s=>{this.onFeatureFlags(s)}))}initialize(){}onFeatureFlags(t){if(this._is_bot())St._s(Pp);else if(!this.qt.disable_web_experiments){if(Se(this.ws))return this.ws=new Map,this.loadIfEnabled(),void this.previewWebExperiment();St._s("applying feature flags",t),t.forEach((n=>{var s;if(this.ws&&(s=this.ws)!=null&&s.has(n)){var r,i=this._instance.getFeatureFlag(n),o=(r=this.ws)==null?void 0:r.get(n);i&&o!=null&&o.variants[i]&&this.xs(o.name,i,o.variants[i].transforms)}}))}}previewWebExperiment(){var t=St.getWindowLocation();if(t!=null&&t.search){var n=ji(t==null?void 0:t.search,"__experiment_id"),s=ji(t==null?void 0:t.search,"__experiment_variant");n&&s&&(St._s("previewing web experiments "+n+" && "+s),this.getWebExperiments((r=>{this.Ss(parseInt(n),s,r)}),!1,!0))}}loadIfEnabled(){this.qt.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(t,n,s){if(this.qt.disable_web_experiments&&!s)return t([]);var r=this._instance.get_property("$web_experiments");if(r&&!n)return t(r);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this.qt.token),method:"GET",callback:i=>t(i.statusCode===200&&i.json&&i.json.experiments||[])})}Ss(t,n,s){var r=s.filter((i=>i.id===t));r&&r.length>0&&(St._s("Previewing web experiment ["+r[0].name+"] with variant ["+n+"]"),this.xs(r[0].name,n,r[0].variants[n].transforms))}static ks(t){return!Se(t.conditions)&&St.Cs(t)&&St.Is(t)}static Cs(t){var n;if(Se(t.conditions)||Se((n=t.conditions)==null?void 0:n.url))return!0;var s,r,i,o=St.getWindowLocation();return!!o&&((s=t.conditions)==null||!s.url||eS[(r=(i=t.conditions)==null?void 0:i.urlMatchType)!==null&&r!==void 0?r:"icontains"](t.conditions.url,o))}static getWindowLocation(){return M==null?void 0:M.location}static Is(t){var n;if(Se(t.conditions)||Se((n=t.conditions)==null?void 0:n.utm))return!0;var s=gm();if(s.utm_source){var r,i,o,a,l,c,u,d,f=(r=t.conditions)==null||(r=r.utm)==null||!r.utm_campaign||((i=t.conditions)==null||(i=i.utm)==null?void 0:i.utm_campaign)==s.utm_campaign,p=(o=t.conditions)==null||(o=o.utm)==null||!o.utm_source||((a=t.conditions)==null||(a=a.utm)==null?void 0:a.utm_source)==s.utm_source,g=(l=t.conditions)==null||(l=l.utm)==null||!l.utm_medium||((c=t.conditions)==null||(c=c.utm)==null?void 0:c.utm_medium)==s.utm_medium,h=(u=t.conditions)==null||(u=u.utm)==null||!u.utm_term||((d=t.conditions)==null||(d=d.utm)==null?void 0:d.utm_term)==s.utm_term;return f&&g&&h&&p}return!1}static _s(t){for(var n=arguments.length,s=new Array(n>1?n-1:0),r=1;n>r;r++)s[r-1]=arguments[r];re.info("[WebExperiments] "+t,s)}xs(t,n,s){this._is_bot()?St._s(Pp):n!=="control"?s.forEach((r=>{if(r.selector){var i;St._s("applying transform of variant "+n+" for experiment "+t+" ",r);var o=(i=document)==null?void 0:i.querySelectorAll(r.selector);o==null||o.forEach((a=>{var l=a;r.html&&(l.innerHTML=r.html),r.css&&l.setAttribute("style",r.css)}))}})):St._s("Control variants leave the page unmodified.")}_is_bot(){return Ut&&this._instance?Om(Ut,this.qt.custom_blocked_useragents):void 0}}var Zt=Ze("[Conversations]"),Ms="Conversations not available yet.",Ua={featureFlags:class{constructor(e){this.Ts=!1,this.Es=!1,this.Ms=!1,this.Rs=!1,this.Ps=!1,this.Os=!1,this.Ls=!1,this.As=!1,this._instance=e,this.featureFlagEventHandlers=[]}get qt(){return this._instance.config}get Si(){return this._instance.persistence}Fs(e){return this._instance.get_property(e)}Ns(){var e,t;return(e=(t=this.Si)==null?void 0:t.Mr(this.qt.feature_flag_cache_ttl_ms))!==null&&e!==void 0&&e}Ds(){return!!this.Ns()&&(this.As||this.Ms||(this.As=!0,yt.warn("Feature flag cache is stale, triggering refresh..."),this.reloadFeatureFlags()),!0)}$s(){var e,t=(e=this.qt.evaluation_contexts)!==null&&e!==void 0?e:this.qt.evaluation_environments;return!this.qt.evaluation_environments||this.qt.evaluation_contexts||this.Ls||(yt.warn("evaluation_environments is deprecated. Use evaluation_contexts instead. evaluation_environments will be removed in a future version."),this.Ls=!0),t!=null&&t.length?t.filter((n=>{var s=n&&typeof n=="string"&&n.trim().length>0;return s||yt.error("Invalid evaluation context found:",n,"Expected non-empty string"),s})):[]}qs(){return this.$s().length>0}js(){var e=this.qt.flag_keys;if(!te(e)){if(Ce(e))return e.filter((t=>{var n=t&&typeof t=="string"&&t.trim().length>0;return n||yt.error("Invalid flag key found:",t,"Expected non-empty string"),n}));yt.error("Invalid flag_keys found:",e,"Expected array of non-empty strings")}}initialize(){var e,t,{config:n}=this._instance,s=(e=(t=n.bootstrap)==null?void 0:t.featureFlags)!==null&&e!==void 0?e:{};if(Object.keys(s).length){var r,i,o=(r=(i=n.bootstrap)==null?void 0:i.featureFlagPayloads)!==null&&r!==void 0?r:{},a=Object.keys(s).filter((c=>!!s[c])).reduce(((c,u)=>(c[u]=s[u]||!1,c)),{}),l=Object.keys(o).filter((c=>a[c])).reduce(((c,u)=>(o[u]&&(c[u]=o[u]),c)),{});this.receivedFeatureFlags({featureFlags:a,featureFlagPayloads:l})}}updateFlags(e,t,n){var s=n!=null&&n.merge?this.getFlagVariants():{},r=n!=null&&n.merge?this.getFlagPayloads():{},i=Z({},s,e),o=Z({},r,t),a={};for(var[l,c]of Object.entries(i)){var u=typeof c=="string";a[l]={key:l,enabled:!!u||!!c,variant:u?c:void 0,reason:void 0,metadata:te(o==null?void 0:o[l])?void 0:{id:0,version:void 0,description:void 0,payload:o[l]}}}this.receivedFeatureFlags({flags:a})}get hasLoadedFlags(){return this.Es}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var e=this.Fs(Tu),t=this.Fs(qn),n=this.Fs(cr);if(!n&&!t)return e||{};var s=Ge({},e||{}),r=[...new Set([...Object.keys(n||{}),...Object.keys(t||{})])];for(var i of r){var o,a,l=s[i],c=t==null?void 0:t[i],u=te(c)?(o=l==null?void 0:l.enabled)!==null&&o!==void 0&&o:!!c,d=te(c)?l.variant:typeof c=="string"?c:void 0,f=n==null?void 0:n[i],p=Z({},l,{enabled:u,variant:u?d??(l==null?void 0:l.variant):void 0});u!==(l==null?void 0:l.enabled)&&(p.original_enabled=l==null?void 0:l.enabled),d!==(l==null?void 0:l.variant)&&(p.original_variant=l==null?void 0:l.variant),f&&(p.metadata=Z({},l==null?void 0:l.metadata,{payload:f,original_payload:l==null||(a=l.metadata)==null?void 0:a.payload})),s[i]=p}return this.Ts||(yt.warn(" Overriding feature flag details!",{flagDetails:e,overriddenPayloads:n,finalDetails:s}),this.Ts=!0),s}getFlagVariants(){var e=this.Fs(hr),t=this.Fs(qn);if(!t)return e||{};for(var n=Ge({},e),s=Object.keys(t),r=0;s.length>r;r++)n[s[r]]=t[s[r]];return this.Ts||(yt.warn(" Overriding feature flags!",{enabledFlags:e,overriddenFlags:t,finalFlags:n}),this.Ts=!0),n}getFlagPayloads(){var e=this.Fs(Iu),t=this.Fs(cr);if(!t)return e||{};for(var n=Ge({},e||{}),s=Object.keys(t),r=0;s.length>r;r++)n[s[r]]=t[s[r]];return this.Ts||(yt.warn(" Overriding feature flag payloads!",{flagPayloads:e,overriddenPayloads:t,finalPayloads:n}),this.Ts=!0),n}reloadFeatureFlags(){this.Rs||this.qt.advanced_disable_feature_flags||this.Bs||(this._instance.ln.emit("featureFlagsReloading",!0),this.Bs=setTimeout((()=>{this.Hs()}),5))}Us(){clearTimeout(this.Bs),this.Bs=void 0}ensureFlagsLoaded(){this.Es||this.Ms||this.Bs||this.reloadFeatureFlags()}setAnonymousDistinctId(e){this.$anon_distinct_id=e}setReloadingPaused(e){this.Rs=e}Hs(e){var t;if(this.Us(),!this._instance.Kr())if(this.Ms)this.Ps=!0;else{var n=this.qt.token,s=this.Fs(ta),r={token:n,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:Z({},((t=this.Si)==null?void 0:t.get_initial_props())||{},this.Fs(Ds)||{}),group_properties:this.Fs(Ls),timezone:xm()};$t(s)||te(s)||(r.$device_id=s),(e!=null&&e.disableFlags||this.qt.advanced_disable_feature_flags)&&(r.disable_flags=!0),this.qs()&&(r.evaluation_contexts=this.$s());var i=this.js();te(i)||(r.flag_keys=i);var o=!!this.qt.advanced_only_evaluate_survey_feature_flags,a=this._instance.requestRouter.endpointFor("flags","/flags/?v=2"+(this.qt.advanced_only_evaluate_survey_feature_flags?"&only_evaluate_survey_feature_flags=true":""));this.Ms=!0,this._instance._send_request({method:"POST",url:a,data:r,skipIPParam:!0,compression:this.qt.disable_compression?void 0:bn.Base64,timeout:this.qt.feature_flag_request_timeout_ms,callback:l=>{var c,u,d,f=!0;if(l.statusCode===200&&(this.Ps||(this.$anon_distinct_id=void 0),f=!1),this.Ms=!1,!r.disable_flags||this.Ps){this.Os=!f;var p=[];l.error?l.error instanceof Error?p.push(l.error.name==="AbortError"?"timeout":"connection_error"):p.push("unknown_error"):l.statusCode!==200&&p.push("api_error_"+l.statusCode),(c=l.json)!=null&&c.errorsWhileComputingFlags&&p.push("errors_while_computing_flags");var g,h=!((u=l.json)==null||(u=u.quotaLimited)==null||!u.includes("feature_flags"));h&&p.push("quota_limited"),(d=this.Si)==null||d.register({[Du]:p}),h?yt.warn("You have hit your feature flags quota limit, and will not be able to load feature flags until the quota is reset. Please visit https://posthog.com/docs/billing/limits-alerts to learn more."):(r.disable_flags||this.receivedFeatureFlags((g=l.json)!==null&&g!==void 0?g:{},f,{partialResponse:o}),this.Ps&&(this.Ps=!1,this.Hs()))}}})}}getFeatureFlag(e,t){var n;if(t===void 0&&(t={}),!t.fresh||this.Os)if(this.Es||this.getFlags()&&this.getFlags().length>0){if(!this.Ds()){var s=this.getFeatureFlagResult(e,t);return(n=s==null?void 0:s.variant)!==null&&n!==void 0?n:s==null?void 0:s.enabled}}else yt.warn('getFeatureFlag for key "'+e+Bl)}getFeatureFlagDetails(e){return this.getFlagsWithDetails()[e]}getFeatureFlagPayload(e){var t=this.getFeatureFlagResult(e,{send_event:!1});return t==null?void 0:t.payload}getFeatureFlagResult(e,t){if(t===void 0&&(t={}),!t.fresh||this.Os)if(this.Es||this.getFlags()&&this.getFlags().length>0){if(!this.Ds()){var n=this.getFlagVariants(),s=e in n,r=n[e],i=this.getFlagPayloads()[e],o=String(r),a=this.Fs(Ru)||void 0,l=this.Fs(Bi)||void 0,c=this.Fs(Si)||{};if(this.qt.advanced_feature_flags_dedup_per_session){var u,d=this._instance.get_session_id(),f=this.Fs(Fu);d&&d!==f&&(c={},(u=this.Si)==null||u.register({[Si]:c,[Fu]:d}))}if((t.send_event||!("send_event"in t))&&(!(e in c)||!c[e].includes(o))){var p,g,h,m,v,y,x,k,O,q;Ce(c[e])?c[e].push(o):c[e]=[o],(p=this.Si)==null||p.register({[Si]:c});var E=this.getFeatureFlagDetails(e),R=[...(g=this.Fs(Du))!==null&&g!==void 0?g:[]];te(r)&&R.push("flag_missing");var T={$feature_flag:e,$feature_flag_response:r,$feature_flag_payload:i||null,$feature_flag_request_id:a,$feature_flag_evaluated_at:l,$feature_flag_bootstrapped_response:((h=this.qt.bootstrap)==null||(h=h.featureFlags)==null?void 0:h[e])||null,$feature_flag_bootstrapped_payload:((m=this.qt.bootstrap)==null||(m=m.featureFlagPayloads)==null?void 0:m[e])||null,$used_bootstrap_value:!this.Os};te(E==null||(v=E.metadata)==null?void 0:v.version)||(T.$feature_flag_version=E.metadata.version);var K,U=(y=E==null||(x=E.reason)==null?void 0:x.description)!==null&&y!==void 0?y:E==null||(k=E.reason)==null?void 0:k.code;U&&(T.$feature_flag_reason=U),E!=null&&(O=E.metadata)!=null&&O.id&&(T.$feature_flag_id=E.metadata.id),te(E==null?void 0:E.original_variant)&&te(E==null?void 0:E.original_enabled)||(T.$feature_flag_original_response=te(E.original_variant)?E.original_enabled:E.original_variant),E!=null&&(q=E.metadata)!=null&&q.original_payload&&(T.$feature_flag_original_payload=E==null||(K=E.metadata)==null?void 0:K.original_payload),R.length&&(T.$feature_flag_error=R.join(",")),this._instance.capture("$feature_flag_called",T)}if(s){var C=i;if(!te(i))try{C=JSON.parse(i)}catch{}return{key:e,enabled:!!r,variant:typeof r=="string"?r:void 0,payload:C}}}}else yt.warn('getFeatureFlagResult for key "'+e+Bl)}getRemoteConfigPayload(e,t){var n=this.qt.token,s={distinct_id:this._instance.get_distinct_id(),token:n};this.qs()&&(s.evaluation_contexts=this.$s());var r=this.js();te(r)||(s.flag_keys=r),this._instance._send_request({method:"POST",url:this._instance.requestRouter.endpointFor("flags","/flags/?v=2"),data:s,skipIPParam:!0,compression:this.qt.disable_compression?void 0:bn.Base64,timeout:this.qt.feature_flag_request_timeout_ms,callback(i){var o,a=(o=i.json)==null?void 0:o.featureFlagPayloads;t((a==null?void 0:a[e])||void 0)}})}isFeatureEnabled(e,t){if(t===void 0&&(t={}),!t.fresh||this.Os){if(this.Es||this.getFlags()&&this.getFlags().length>0){var n=this.getFeatureFlag(e,t);return te(n)?void 0:!!n}yt.warn('isFeatureEnabled for key "'+e+Bl)}}addFeatureFlagsHandler(e){this.featureFlagEventHandlers.push(e)}removeFeatureFlagsHandler(e){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter((t=>t!==e))}receivedFeatureFlags(e,t,n){if(this.Si){this.Es=!0;var s=this.getFlagVariants(),r=this.getFlagPayloads(),i=this.getFlagsWithDetails();(function(o,a,l,c,u,d){l===void 0&&(l={}),c===void 0&&(c={}),u===void 0&&(u={});var f=(R=>{var T=R.flags;return T?(R.featureFlags=Object.fromEntries(Object.keys(T).map((K=>{var U;return[K,(U=T[K].variant)!==null&&U!==void 0?U:T[K].enabled]}))),R.featureFlagPayloads=Object.fromEntries(Object.keys(T).filter((K=>T[K].enabled)).filter((K=>{var U;return(U=T[K].metadata)==null?void 0:U.payload})).map((K=>{var U;return[K,(U=T[K].metadata)==null?void 0:U.payload]})))):yt.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),R})(o),p=f.flags,g=f.featureFlags,h=f.featureFlagPayloads;if(g){var m=o.requestId,v=o.evaluatedAt;if(Ce(g)){yt.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var y={};if(g)for(var x=0;g.length>x;x++)y[g[x]]=!0;a&&a.register({[Po]:g,[hr]:y})}else{var k=g,O=h,q=p;if(d!=null&&d.partialResponse)k=Z({},l,k),O=Z({},c,O),q=Z({},u,q);else if(o.errorsWhileComputingFlags)if(p){var E=new Set(Object.keys(p).filter((R=>{var T;return!((T=p[R])!=null&&T.failed)})));k=Z({},l,Object.fromEntries(Object.entries(k).filter((R=>{var[T]=R;return E.has(T)})))),O=Z({},c,Object.fromEntries(Object.entries(O||{}).filter((R=>{var[T]=R;return E.has(T)})))),q=Z({},u,Object.fromEntries(Object.entries(q||{}).filter((R=>{var[T]=R;return E.has(T)}))))}else k=Z({},l,k),O=Z({},c,O),q=Z({},u,q);a&&a.register(Z({[Po]:Object.keys(Cp(k)),[hr]:k||{},[Iu]:O||{},[Tu]:q||{}},m?{[Ru]:m}:{},v?{[Bi]:v}:{}))}}})(e,this.Si,s,r,i,n),t||(this.As=!1),this.zs(t)}}override(e,t){t===void 0&&(t=!1),yt.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:e,suppressWarning:t})}overrideFeatureFlags(e){if(!this._instance.__loaded||!this.Si)return yt.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(e===!1)return this.Si.unregister(qn),this.Si.unregister(cr),this.zs(),Rs.info("All overrides cleared");if(Ce(e)){var t=Sp(e);return this.Si.register({[qn]:t}),this.zs(),Rs.info("Flag overrides set",{flags:e})}if(e&&typeof e=="object"&&("flags"in e||"payloads"in e)){var n,s=e;if(this.Ts=!!((n=s.suppressWarning)!==null&&n!==void 0&&n),"flags"in s){if(s.flags===!1)this.Si.unregister(qn),Rs.info("Flag overrides cleared");else if(s.flags){if(Ce(s.flags)){var r=Sp(s.flags);this.Si.register({[qn]:r})}else this.Si.register({[qn]:s.flags});Rs.info("Flag overrides set",{flags:s.flags})}}return"payloads"in s&&(s.payloads===!1?(this.Si.unregister(cr),Rs.info("Payload overrides cleared")):s.payloads&&(this.Si.register({[cr]:s.payloads}),Rs.info("Payload overrides set",{payloads:s.payloads}))),void this.zs()}if(e&&typeof e=="object")return this.Si.register({[qn]:e}),this.zs(),Rs.info("Flag overrides set",{flags:e});yt.warn("Invalid overrideOptions provided to overrideFeatureFlags",{overrideOptions:e})}onFeatureFlags(e){if(this.addFeatureFlagsHandler(e),this.Es){var{flags:t,flagVariants:n}=this.Vs();e(t,n)}return()=>this.removeFeatureFlagsHandler(e)}updateEarlyAccessFeatureEnrollment(e,t,n){var s,r=(this.Fs(fi)||[]).find((l=>l.flagKey===e)),i={["$feature_enrollment/"+e]:t},o={$feature_flag:e,$feature_enrollment:t,$set:i};r&&(o.$early_access_feature_name=r.name),n&&(o.$feature_enrollment_stage=n),this._instance.capture("$feature_enrollment_update",o),this.setPersonPropertiesForFlags(i,!1);var a=Z({},this.getFlagVariants(),{[e]:t});(s=this.Si)==null||s.register({[Po]:Object.keys(Cp(a)),[hr]:a}),this.zs()}getEarlyAccessFeatures(e,t,n){t===void 0&&(t=!1);var s=this.Fs(fi),r=n?"&"+n.map((i=>"stage="+i)).join("&"):"";if(s&&!t)return e(s);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this.qt.token+r),method:"GET",callback:i=>{var o,a;if(i.json){var l=i.json.earlyAccessFeatures;return(o=this.Si)==null||o.unregister(fi),(a=this.Si)==null||a.register({[fi]:l}),e(l)}}})}Vs(){var e=this.getFlags(),t=this.getFlagVariants();return{flags:e.filter((n=>t[n])),flagVariants:Object.keys(t).filter((n=>t[n])).reduce(((n,s)=>(n[s]=t[s],n)),{})}}zs(e){var{flags:t,flagVariants:n}=this.Vs();this.featureFlagEventHandlers.forEach((s=>s(t,n,{errorsLoading:e})))}setPersonPropertiesForFlags(e,t){t===void 0&&(t=!0);var n=this.Fs(Ds)||{},s=(e==null?void 0:e.$set)||(e!=null&&e.$set_once?{}:e),r=e==null?void 0:e.$set_once,i={};if(r)for(var o in r)({}).hasOwnProperty.call(r,o)&&(o in n||(i[o]=r[o]));this._instance.register({[Ds]:Z({},n,i,s)}),t&&this._instance.reloadFeatureFlags()}unsetPersonPropertiesForFlags(e,t){t===void 0&&(t=!0);var n=Z({},this.Fs(Ds)||{});e.forEach((s=>{delete n[s]})),this._instance.register({[Ds]:n}),t&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(e){e===void 0&&(e=!0),this._instance.unregister(Ds),e&&this._instance.reloadFeatureFlags()}setGroupPropertiesForFlags(e,t){t===void 0&&(t=!0);var n=this.Fs(Ls)||{};Object.keys(n).length!==0&&Object.keys(n).forEach((s=>{n[s]=Z({},n[s],e[s]),delete e[s]})),this._instance.register({[Ls]:Z({},n,e)}),t&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(e){if(e){var t=this.Fs(Ls)||{};this._instance.register({[Ls]:Z({},t,{[e]:{}})})}else this._instance.unregister(Ls)}reset(){this.Es=!1,this.Ms=!1,this.Rs=!1,this.Ps=!1,this.Os=!1,this.$anon_distinct_id=void 0,this.Us(),this.Ts=!1}}},tS={sessionRecording:class{get qt(){return this._instance.config}get Si(){return this._instance.persistence}get started(){var e;return!((e=this.Ws)==null||!e.isStarted)}get status(){var e,t;return this.Gs===ii||this.Gs===ko?this.Gs:(e=(t=this.Ws)==null?void 0:t.status)!==null&&e!==void 0?e:this.Gs}constructor(e){if(this._forceAllowLocalhostNetworkCapture=!1,this.Gs=_p,this.Zs=void 0,this._instance=e,!this._instance.sessionManager)throw Dn.error("started without valid sessionManager"),new Error(Zu+" started without valid sessionManager. This is a bug.");if(this.qt.cookieless_mode===Gn)throw new Error(Zu+' cannot be used with cookieless_mode="always"')}initialize(){this.startIfEnabledOrStop()}get Qs(){var e,t=!((e=this._instance.get_property(zs))==null||!e.enabled),n=!this.qt.disable_session_recording,s=this.qt.disable_session_recording||this._instance.consent.isOptedOut();return M&&t&&n&&!s}startIfEnabledOrStop(e){var t;if(!this.Qs||(t=this.Ws)==null||!t.isStarted){var n=!te(Object.assign)&&!te(Array.from);this.Qs&&n?(this.Js(e),Dn.info("starting")):(this.Gs=_p,this.stopRecording())}}Js(e){var t,n,s;this.Qs&&(this.Gs!==ii&&this.Gs!==ko&&(this.Gs=yp),he!=null&&(t=he.__PosthogExtensions__)!=null&&(t=t.rrweb)!=null&&t.record&&(n=he.__PosthogExtensions__)!=null&&n.initSessionRecording?this.Ks(e):(s=he.__PosthogExtensions__)==null||s.loadExternalDependency==null||s.loadExternalDependency(this._instance,this.Ys,(r=>{if(r)return Dn.error("could not load recorder",r);this.Ks(e)})))}stopRecording(){var e,t;(e=this.Zs)==null||e.call(this),this.Zs=void 0,(t=this.Ws)==null||t.stop()}Xs(){var e,t;(e=this.Zs)==null||e.call(this),this.Zs=void 0,(t=this.Ws)==null||t.discard()}eo(){var e,t;(e=this.Si)==null||e.unregister(Bc),(t=this.Si)==null||t.unregister(Wv)}ro(e,t){if(Se(e))return null;var n,s=Ft(e)?e:parseFloat(e);return typeof(n=s)!="number"||!Number.isFinite(n)||0>n||n>1?(Dn.warn(t+" must be between 0 and 1. Ignoring invalid value:",e),null):s}io(e){if(this.Si){var t,n,s=this.Si,r=()=>{var i,o=e.sessionRecording===!1?void 0:e.sessionRecording,a=this.ro((i=this.qt.session_recording)==null?void 0:i.sampleRate,"session_recording.sampleRate"),l=this.ro(o==null?void 0:o.sampleRate,"remote config sampleRate"),c=a??l;Se(c)&&this.eo();var u=o==null?void 0:o.minimumDurationMilliseconds;s.register({[zs]:Z({cache_timestamp:Date.now(),enabled:!!o},o,{networkPayloadCapture:Z({capturePerformance:e.capturePerformance},o==null?void 0:o.networkPayloadCapture),canvasRecording:{enabled:o==null?void 0:o.recordCanvas,fps:o==null?void 0:o.canvasFps,quality:o==null?void 0:o.canvasQuality},sampleRate:c,minimumDurationMilliseconds:te(u)?null:u,endpoint:o==null?void 0:o.endpoint,triggerMatchType:o==null?void 0:o.triggerMatchType,masking:o==null?void 0:o.masking,urlTriggers:o==null?void 0:o.urlTriggers,version:o==null?void 0:o.version,triggerGroups:o==null?void 0:o.triggerGroups})})};r(),(t=this.Zs)==null||t.call(this),this.Zs=(n=this._instance.sessionManager)==null?void 0:n.onSessionId(r)}}onRemoteConfig(e){return"sessionRecording"in e?e.sessionRecording===!1?(this.io(e),void this.Xs()):(this.io(e),void this.startIfEnabledOrStop()):(this.Gs===ii&&(this.Gs=ko,Dn.warn("config refresh failed, recording will not start until page reload")),void this.startIfEnabledOrStop())}log(e,t){var n;t===void 0&&(t="log"),(n=this.Ws)!=null&&n.log?this.Ws.log(e,t):Dn.warn("log called before recorder was ready")}get Ys(){var e,t,n=(e=this._instance)==null||(e=e.persistence)==null?void 0:e.get_property(zs);return(n==null||(t=n.scriptConfig)==null?void 0:t.script)||"lazy-recorder"}no(){var e,t,n=this._instance.get_property(zs);if(!n)return!1;try{t=typeof n=="object"?n:JSON.parse(n)}catch(r){return Dn.warn("persisted remote config for session recording is invalid and will be ignored",r),!1}var s=(e=t.cache_timestamp)!==null&&e!==void 0?e:Date.now();return 36e5>=Date.now()-s}Ks(e){var t,n;if((t=he.__PosthogExtensions__)==null||!t.initSessionRecording)return Dn.warn("Called on script loaded before session recording is available. This can be caused by adblockers."),void this._instance.register_for_session({[em]:!0});if(this.Ws||(this.Ws=(n=he.__PosthogExtensions__)==null?void 0:n.initSessionRecording(this._instance),this.Ws._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),!this.no())return this.Gs===ko||this.Gs===ii?void 0:(this.Gs=ii,Dn.info("persisted remote config is stale, requesting fresh config before starting"),void new wm(this._instance).load());this.Gs=yp,this.Ws.start(e)}onRRwebEmit(e){var t;(t=this.Ws)==null||t.onRRwebEmit==null||t.onRRwebEmit(e)}overrideLinkedFlag(){var e,t;this.Ws||(t=this.Si)==null||t.register({[Kv]:!0}),(e=this.Ws)==null||e.overrideLinkedFlag()}overrideSampling(){var e,t;this.Ws||(t=this.Si)==null||t.register({[Gv]:!0}),(e=this.Ws)==null||e.overrideSampling()}overrideTrigger(e){var t,n;this.Ws||(n=this.Si)==null||n.register({[e==="url"?Yv:Jv]:!0}),(t=this.Ws)==null||t.overrideTrigger(e)}get sdkDebugProperties(){var e;return((e=this.Ws)==null?void 0:e.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(e,t){var n;return!((n=this.Ws)==null||!n.tryAddCustomEvent(e,t))}}},nS={autocapture:class{constructor(e){this.so=!1,this.oo=null,this.ao=!1,this.instance=e,this.rageclicks=new vp(e.config.rageclick),this.lo=null}initialize(){this.startIfEnabled()}get qt(){var e,t,n=et(this.instance.config.autocapture)?this.instance.config.autocapture:{};return n.url_allowlist=(e=n.url_allowlist)==null?void 0:e.map((s=>new RegExp(s))),n.url_ignorelist=(t=n.url_ignorelist)==null?void 0:t.map((s=>new RegExp(s))),n}uo(){if(this.isBrowserSupported()){if(M&&ie){var e=n=>{n=n||(M==null?void 0:M.event);try{this.ho(n)}catch(s){Fl.error("Failed to capture event",s)}};if(rt(ie,"submit",e,{capture:!0}),rt(ie,"change",e,{capture:!0}),rt(ie,"click",e,{capture:!0}),this.qt.capture_copied_text){var t=n=>{n=n||(M==null?void 0:M.event);try{this.ho(n,$l)}catch(s){Fl.error("Failed to capture copy/cut event",s)}};rt(ie,"copy",t,{capture:!0}),rt(ie,"cut",t,{capture:!0})}}}else Fl.info("Disabling Automatic Event Collection because this browser is not supported")}startIfEnabled(){this.isEnabled&&!this.so&&(this.uo(),this.so=!0)}onRemoteConfig(e){e.elementsChainAsString&&(this.ao=e.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register({[ku]:!!e.autocapture_opt_out}),this.oo=!!e.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(e){this.lo=e}getElementSelectors(e){var t,n=[];return(t=this.lo)==null||t.forEach((s=>{var r=ie==null?void 0:ie.querySelectorAll(s);r==null||r.forEach((i=>{e===i&&n.push(s)}))})),n}get isEnabled(){var e,t,n=(e=this.instance.persistence)==null?void 0:e.props[ku];if($t(this.oo)&&!Pn(n)&&!this.instance.Kr())return!1;var s=(t=this.oo)!==null&&t!==void 0?t:!!n;return!!this.instance.config.autocapture&&!s}ho(e,t){if(t===void 0&&(t="$autocapture"),this.isEnabled){var n,s=Sl(e);sm(s)&&(s=s.parentNode||null),t==="$autocapture"&&e.type==="click"&&e instanceof MouseEvent&&this.instance.config.rageclick&&(n=this.rageclicks)!=null&&n.isRageClick(e.clientX,e.clientY,e.timeStamp||new Date().getTime())&&Kf(s,this.instance.config.rageclick)&&this.ho(e,"$rageclick");var r=t===$l;if(s&&(function(d,f,p,g,h){var m,v,y,x,k,O;if(p===void 0&&(p=void 0),!M||Wc(d)||(m=p)!=null&&m.url_allowlist&&!Uf(p.url_allowlist)||(v=p)!=null&&v.url_ignorelist&&Uf(p.url_ignorelist))return!1;if((y=p)!=null&&y.dom_event_allowlist){var q=p.dom_event_allowlist;if(q&&!q.some((U=>f.type===U)))return!1}var{parentIsUsefulElement:E,targetElementList:R}=lm(d,g);if(!(function(U,C){var F=C==null?void 0:C.element_allowlist;if(te(F))return!0;var V,X=function(A){if(F.some((L=>A.tagName.toLowerCase()===L)))return{v:!0}};for(var $ of U)if(V=X($))return V.v;return!1})(R,p)||!ju(R,(x=p)==null?void 0:x.css_selector_allowlist)||ju(R,(k=(O=p)==null?void 0:O.css_selector_ignorelist)!==null&&k!==void 0?k:sE))return!1;var T=M.getComputedStyle(d);if(T&&T.getPropertyValue("cursor")==="pointer"&&f.type==="click")return!0;var K=d.tagName.toLowerCase();switch(K){case"html":return!1;case"form":return(h||["submit"]).indexOf(f.type)>=0;case"input":case"select":case"textarea":return(h||["change","click"]).indexOf(f.type)>=0;default:return E?(h||["click"]).indexOf(f.type)>=0:(h||["click"]).indexOf(f.type)>=0&&(Uc.indexOf(K)>-1||d.getAttribute("contenteditable")==="true")}})(s,e,this.qt,r,r?["copy","cut"]:void 0)){var{props:i,explicitNoCapture:o}=WE(s,{e,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.qt.element_attribute_ignorelist,elementsChainAsString:this.ao});if(o)return!1;var a=this.getElementSelectors(s);if(a&&a.length>0&&(i.$element_selectors=a),t===$l){var l,c=im(M==null||(l=M.getSelection())==null?void 0:l.toString()),u=e.type||"clipboard";if(!c)return!1;i.$selected_content=c,i.$copy_type=u}return this.instance.capture(t,i),!0}}}isBrowserSupported(){return jn(ie==null?void 0:ie.querySelectorAll)}},historyAutocapture:class{constructor(e){var t;this._instance=e,this.co=(M==null||(t=M.location)==null?void 0:t.pathname)||""}initialize(){this.startIfEnabled()}get isEnabled(){return this._instance.config.capture_pageview==="history_change"}startIfEnabled(){this.isEnabled&&(re.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.do&&this.do(),this.do=void 0,re.info("History API monitoring stopped")}monitorHistoryChanges(){M&&M.history&&(this.vo("pushState"),this.vo("replaceState"),this.fo())}vo(e){var t;if(M&&((t=M.history[e])==null||!t.__posthog_wrapped__)){var n=this;(function(s,r,i){try{if(!(r in s))return()=>{};var o=s[r],a=i(o);return jn(a)&&(a.prototype=a.prototype||{},Object.defineProperties(a,{__posthog_wrapped__:{enumerable:!1,value:!0}})),s[r]=a,()=>{s[r]===a&&(s[r]=o)}}catch{return()=>{}}})(M.history,e,(s=>function(r,i,o){s.call(this,r,i,o),n.po(e)}))}}po(e){try{var t,n=M==null||(t=M.location)==null?void 0:t.pathname;if(!n)return;n!==this.co&&this.isEnabled&&this._instance.capture(dr,{navigation_type:e}),this.co=n}catch(s){re.error("Error capturing "+e+" pageview",s)}}fo(){if(!this.do){var e=()=>{this.po("popstate")};rt(M,"popstate",e),this.do=()=>{M&&M.removeEventListener("popstate",e)}}}},heatmaps:class{get qt(){return this.instance.config}constructor(e){var t;this.mo=!1,this.so=!1,this.yo=null,this.instance=e,this.mo=!((t=this.instance.persistence)==null||!t.props[Eu]),this.rageclicks=new vp(e.config.rageclick)}initialize(){this.startIfEnabled()}get flushIntervalMilliseconds(){var e=5e3;return et(this.qt.capture_heatmaps)&&this.qt.capture_heatmaps.flush_interval_milliseconds&&(e=this.qt.capture_heatmaps.flush_interval_milliseconds),e}get isEnabled(){return Se(this.qt.capture_heatmaps)?Se(this.qt.enable_heatmaps)?this.mo:this.qt.enable_heatmaps:this.qt.capture_heatmaps!==!1}startIfEnabled(){if(this.isEnabled){if(this.so)return;KE.info("starting..."),this.bo(),this.At()}else{var e;clearInterval((e=this.yo)!==null&&e!==void 0?e:void 0),this._o(),this.getAndClearBuffer()}}onRemoteConfig(e){if("heatmaps"in e){var t=!!e.heatmaps;this.instance.persistence&&this.instance.persistence.register({[Eu]:t}),this.mo=t,this.startIfEnabled()}}getAndClearBuffer(){var e=this.M;return this.M=void 0,e}wo(e){this.Mt(e.originalEvent,"deadclick")}At(){this.yo&&clearInterval(this.yo),this.yo=(ie==null?void 0:ie.visibilityState)==="visible"?setInterval(this.ci.bind(this),this.flushIntervalMilliseconds):null}bo(){M&&ie&&(this.xo=this.ci.bind(this),rt(M,ia,this.xo),this.ko=e=>this.Mt(e||(M==null?void 0:M.event)),rt(ie,"click",this.ko,{capture:!0}),this.So=e=>this.Co(e||(M==null?void 0:M.event)),rt(ie,"mousemove",this.So,{capture:!0}),this.Io=new Xf(this.instance,dE,this.wo.bind(this)),this.Io.startIfEnabledOrStop(),this.To=this.At.bind(this),rt(ie,ra,this.To),this.so=!0)}_o(){var e;M&&ie&&(this.xo&&M.removeEventListener(ia,this.xo),this.ko&&ie.removeEventListener("click",this.ko,{capture:!0}),this.So&&ie.removeEventListener("mousemove",this.So,{capture:!0}),this.To&&ie.removeEventListener(ra,this.To),clearTimeout(this.Eo),(e=this.Io)==null||e.stop(),this.so=!1)}Mo(e,t){var n=this.instance.scrollManager.scrollY(),s=this.instance.scrollManager.scrollX(),r=this.instance.scrollManager.scrollElement(),i=(function(o,a,l){for(var c=o;c&&xs(c)&&!Wt(c,"body");){if(c===l)return!1;if(be(a,M==null?void 0:M.getComputedStyle(c).position))return!0;c=om(c)}return!1})(Sl(e),["fixed","sticky"],r);return{x:e.clientX+(i?0:s),y:e.clientY+(i?0:n),target_fixed:i,type:t}}Mt(e,t){var n;if(t===void 0&&(t="click"),!Vf(e.target)&&bp(e)){var s=this.Mo(e,t);(n=this.rageclicks)!=null&&n.isRageClick(e.clientX,e.clientY,new Date().getTime())&&Kf(Sl(e),this.instance.config.rageclick)&&this.Ro(Z({},s,{type:"rageclick"})),this.Ro(s)}}Co(e){!Vf(e.target)&&bp(e)&&(clearTimeout(this.Eo),this.Eo=setTimeout((()=>{this.Ro(this.Mo(e,"mousemove"))}),500))}Ro(e){if(M){var t=M.location.href,n=this.qt.custom_personal_data_properties,s=this.qt.mask_personal_data_properties?[...Fr,...n||[]]:[],r=Hi(t,s,Vi);this.M=this.M||{},this.M[r]||(this.M[r]=[]),this.M[r].push(e)}}ci(){this.M&&!hs(this.M)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}},deadClicksAutocapture:Xf,webVitalsAutocapture:class{constructor(e){var t;this.mo=!1,this.so=!1,this.M={url:void 0,metrics:[],firstMetricTimestamp:void 0},this.Po=()=>{clearTimeout(this.Oo),this.M.metrics.length!==0&&(this._instance.capture("$web_vitals",this.M.metrics.reduce(((n,s)=>Z({},n,{["$web_vitals_"+s.name+"_event"]:Z({},s),["$web_vitals_"+s.name+"_value"]:s.value})),{})),this.M={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.ht=n=>{var s;this.M=this.M||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var r=this.Lo();if(!te(r))if(Se(n==null?void 0:n.name)||Se(n==null?void 0:n.value))Is.error("Invalid metric received",n);else if(!this.Ao||this.Ao>n.value){this.M.url!==r&&(this.Po(),this.Oo=setTimeout(this.Po,this.flushToCaptureTimeoutMs)),te(this.M.url)&&(this.M.url=r),this.M.firstMetricTimestamp=te(this.M.firstMetricTimestamp)?Date.now():this.M.firstMetricTimestamp,n.attribution&&n.attribution.interactionTargetElement&&(n.attribution.interactionTargetElement=void 0);var i=(s=this._instance.sessionManager)==null?void 0:s.checkAndGetSessionAndWindowId(!0),o=Z({},n,{$current_url:r,timestamp:Date.now()});te(i)||(o.$session_id=i.sessionId,o.$window_id=i.windowId),this.M.metrics.push(o),this.M.metrics.length===this.allowedMetrics.length&&this.Po()}else Is.error("Ignoring metric with value >= "+this.Ao,n)},this.Fo=()=>{if(!this.so){var n,s,r,i,o=he.__PosthogExtensions__;te(o)||te(o.postHogWebVitalsCallbacks)||({onLCP:n,onCLS:s,onFCP:r,onINP:i}=o.postHogWebVitalsCallbacks),n&&s&&r&&i?(this.allowedMetrics.indexOf("LCP")>-1&&n(this.ht.bind(this)),this.allowedMetrics.indexOf("CLS")>-1&&s(this.ht.bind(this)),this.allowedMetrics.indexOf("FCP")>-1&&r(this.ht.bind(this)),this.allowedMetrics.indexOf("INP")>-1&&i(this.ht.bind(this)),this.so=!0):Is.error("web vitals callbacks not loaded - not starting")}},this._instance=e,this.mo=!((t=this._instance.persistence)==null||!t.props[Au]),this.startIfEnabled()}get No(){return this._instance.config.capture_performance}get allowedMetrics(){var e,t,n=et(this.No)?(e=this.No)==null?void 0:e.web_vitals_allowed_metrics:void 0;return Se(n)?((t=this._instance.persistence)==null?void 0:t.props[Ou])||["CLS","FCP","INP","LCP"]:n}get flushToCaptureTimeoutMs(){return(et(this.No)?this.No.web_vitals_delayed_flush_ms:void 0)||5e3}get useAttribution(){var e=et(this.No)?this.No.web_vitals_attribution:void 0;return e!=null&&e}get Ao(){var e=et(this.No)&&Ft(this.No.__web_vitals_max_value)?this.No.__web_vitals_max_value:mp;return e>0&&6e4>=e?mp:e}get isEnabled(){var e=bt==null?void 0:bt.protocol;if(e!=="http:"&&e!=="https:")return Is.info("Web Vitals are disabled on non-http/https protocols"),!1;var t=et(this.No)?this.No.web_vitals:Pn(this.No)?this.No:void 0;return Pn(t)?t:this.mo}startIfEnabled(){this.isEnabled&&!this.so&&(Is.info("enabled, starting..."),this.ur(this.Fo))}onRemoteConfig(e){if("capturePerformance"in e){var t=et(e.capturePerformance)&&!!e.capturePerformance.web_vitals,n=et(e.capturePerformance)?e.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[Au]:t}),this._instance.persistence.register({[Ou]:n})),this.mo=t,this.startIfEnabled()}}ur(e){var t,n;(t=he.__PosthogExtensions__)!=null&&t.postHogWebVitalsCallbacks?e():(n=he.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,this.useAttribution?"web-vitals-with-attribution":"web-vitals",(s=>{s?Is.error("failed to load script",s):e()}))}Lo(){var e=M?M.location.href:void 0;if(e){var t=this._instance.config.custom_personal_data_properties,n=this._instance.config.mask_personal_data_properties?[...Fr,...t||[]]:[];return Hi(e,n,Vi)}Is.error("Could not determine current URL")}}},sS={exceptionObserver:class{constructor(e){var t,n,s;this.Fo=()=>{var r;if(M&&this.isEnabled&&(r=he.__PosthogExtensions__)!=null&&r.errorWrappingFunctions){var i=he.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,o=he.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,a=he.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.Do&&this.qt.capture_unhandled_errors&&(this.Do=i(this.captureException.bind(this))),!this.$o&&this.qt.capture_unhandled_rejections&&(this.$o=o(this.captureException.bind(this))),!this.qo&&this.qt.capture_console_errors&&(this.qo=a(this.captureException.bind(this)))}catch(l){ri.error("failed to start",l),this.jo()}}},this._instance=e,this.Bo=!((t=this._instance.persistence)==null||!t.props[Su]),this.Ho=new uk({refillRate:(n=this._instance.config.error_tracking.__exceptionRateLimiterRefillRate)!==null&&n!==void 0?n:1,bucketSize:(s=this._instance.config.error_tracking.__exceptionRateLimiterBucketSize)!==null&&s!==void 0?s:10,refillInterval:1e4,Zt:ri}),this.qt=this.Uo(),this.startIfEnabledOrStop()}Uo(){var e=this._instance.config.capture_exceptions,t={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return et(e)?t=Z({},t,e):(te(e)?this.Bo:e)&&(t=Z({},t,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),t}get isEnabled(){return this.qt.capture_console_errors||this.qt.capture_unhandled_errors||this.qt.capture_unhandled_rejections}startIfEnabledOrStop(){this.isEnabled?(ri.info("enabled"),this.jo(),this.ur(this.Fo)):this.jo()}ur(e){var t,n;(t=he.__PosthogExtensions__)!=null&&t.errorWrappingFunctions?e():(n=he.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"exception-autocapture",(s=>{if(s)return ri.error("failed to load script",s);e()}))}jo(){var e,t,n;(e=this.Do)==null||e.call(this),this.Do=void 0,(t=this.$o)==null||t.call(this),this.$o=void 0,(n=this.qo)==null||n.call(this),this.qo=void 0}onRemoteConfig(e){"autocaptureExceptions"in e&&(this.Bo=!!e.autocaptureExceptions||!1,this._instance.persistence&&this._instance.persistence.register({[Su]:this.Bo}),this.qt=this.Uo(),this.startIfEnabledOrStop())}onConfigChange(){this.qt=this.Uo()}captureException(e){var t,n,s,r=(t=e==null||(n=e.$exception_list)==null||(n=n[0])==null?void 0:n.type)!==null&&t!==void 0?t:"Exception";this.Ho.consumeRateLimit(r)?ri.info("Skipping exception capture because of client rate limiting.",{exception:r}):(s=this._instance.exceptions)==null||s.sendExceptionEvent(e)}},exceptions:class{constructor(e){var t,n;this.zo=[],this.Vo=new wk([new Tk,new qk,new Rk,new Ik,new Lk,new Dk,new $k,new Nk],(function(s){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;r>o;o++)i[o-1]=arguments[o];return function(a,l){l===void 0&&(l=0);for(var c=[],u=a.split(`
249
+ `),d=l;u.length>d;d++){var f=u[d];if(1024>=f.length){var p=Bf.test(f)?f.replace(Bf,"$1"):f;if(!p.match(/\S*Error: /)){for(var g of i){var h=g(p,s);if(h){c.push(h);break}}if(c.length>=50)break}}}return(function(m){if(!m.length)return[];var v=Array.from(m);return v.reverse(),v.slice(0,50).map((y=>{return Z({},y,{filename:y.filename||(x=v,x[x.length-1]||{}).filename,function:y.function||$r});var x}))})(c)}})("web:javascript",Ck,Ok)),this._instance=e,this.zo=(t=(n=this._instance.persistence)==null?void 0:n.get_property(Cu))!==null&&t!==void 0?t:[],this.Wo=ea(this.Go()),this.Zo=new zk(this.Wo)}onConfigChange(){this.Wo=ea(this.Go()),this.Zo.setConfig(this.Wo)}onRemoteConfig(e){var t,n,s;if("errorTracking"in e){var r=(t=(n=e.errorTracking)==null?void 0:n.suppressionRules)!==null&&t!==void 0?t:[],i=(s=e.errorTracking)==null?void 0:s.captureExtensionExceptions;this.zo=r,this._instance.persistence&&this._instance.persistence.register({[Cu]:this.zo,[Pu]:i})}}get Qo(){var e,t=!!this._instance.get_property(Pu),n=this._instance.config.error_tracking.captureExtensionExceptions;return(e=n??t)!==null&&e!==void 0&&e}buildProperties(e,t){return this.Vo.buildFromUnknown(e,{syntheticException:t==null?void 0:t.syntheticException,mechanism:{handled:t==null?void 0:t.handled}})}addExceptionStep(e,t){if(this.Wo.enabled)try{if(!Ue(e)||e.trim().length===0)return void Ln.warn("Ignoring exception step because message must be a non-empty string");var n=this.Jo(t),{sanitizedProperties:s,droppedKeys:r}=(function(i){if(!i)return{sanitizedProperties:{},droppedKeys:[]};var o=[];return{sanitizedProperties:Object.keys(i).reduce(((a,l)=>Bk.has(l)?(o.push(l),a):(a[l]=i[l],a)),{}),droppedKeys:o}})(n);r.length>0&&Ln.warn("Ignoring reserved exception step fields",{droppedKeys:r}),this.Zo.add(Z({[Zo]:e,[Qo]:new Date().toISOString()},s))}catch(i){Ln.error("Failed to add exception step. Ignoring breadcrumb.",i)}}sendExceptionEvent(e){try{var t=e.$exception_list;if(this.Ko(t)){if(this.Yo(t))return this.Xo("Exception dropped: matched a suppression rule"),void Ln.info("Skipping exception capture because a suppression rule matched");if(!this.Qo&&this.ea(t))return this.Xo("Exception dropped: thrown by a browser extension"),void Ln.info("Skipping exception capture because it was thrown by an extension");if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this.ta(t))return this.Xo("Exception dropped: thrown by the PostHog SDK"),void Ln.info("Skipping exception capture because it was thrown by the PostHog SDK")}var n=this.Wo.enabled&&Se(e.$exception_steps)?this.ra(e):e;try{var s=this._instance.capture("$exception",n,{_noTruncate:!0,_batchKey:"exceptionEvent",Mn:!0});return s&&this.Zo.clear(),s}catch(r){return Ln.error("Failed to capture exception event. Dropping this exception.",r),void this.Zo.clear()}}catch(r){return void Ln.error("Failed to process exception event. Ignoring this exception.",r)}}ra(e){try{var t=this.Zo.getAttachable();return t.length===0?e:Z({},e,{$exception_steps:t})}catch(n){return Ln.error("Failed to read buffered exception steps. Capturing exception without steps.",n),e}}Xo(e){this.Wo.enabled&&this.Zo.add({[Zo]:e,[Qo]:new Date().toISOString()})}Jo(e){return et(e)?Z({},e):{}}Go(){var e,t;return(e=(t=this._instance.config.error_tracking)==null?void 0:t.exception_steps)!==null&&e!==void 0?e:{}}Yo(e){if(e.length===0)return!1;var t=e.reduce(((n,s)=>{var{type:r,value:i}=s;return Ue(r)&&r.length>0&&n.$exception_types.push(r),Ue(i)&&i.length>0&&n.$exception_values.push(i),n}),{$exception_types:[],$exception_values:[]});return this.zo.some((n=>{var s=n.values.map((r=>{var i,o=Tm[r.operator],a=Ce(r.value)?r.value:[r.value],l=(i=t[r.key])!==null&&i!==void 0?i:[];return a.length>0&&o(a,l)}));return n.type==="OR"?s.some(Boolean):s.every(Boolean)}))}ea(e){return e.flatMap((t=>{var n,s;return(n=(s=t.stacktrace)==null?void 0:s.frames)!==null&&n!==void 0?n:[]})).some((t=>t.filename&&t.filename.startsWith("chrome-extension://")))}ta(e){if(e.length>0){var t,n,s,r,i=(t=(n=e[0].stacktrace)==null?void 0:n.frames)!==null&&t!==void 0?t:[],o=i[i.length-1];return(s=o==null||(r=o.filename)==null?void 0:r.includes("posthog.com/static"))!==null&&s!==void 0&&s}return!1}Ko(e){return!Se(e)&&Ce(e)}}},rS=Z({productTours:class{get Si(){return this._instance.persistence}constructor(e){this.ia=null,this.na=null,this._instance=e}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if("productTours"in e){var t,n;if(this.Si&&this.Si.register({[qc]:!!e.productTours}),!Nl(this._instance))return!this.ia&&Se((t=this.Si)==null?void 0:t.props[pi])||Ll.info("product tours disabled; stopping and clearing cached tours"),(n=this.ia)==null||n.stop(),this.ia=null,void this.clearCache();this.loadIfEnabled()}}loadIfEnabled(){!this.ia&&Nl(this._instance)&&this.ur((()=>this.sa()))}ur(e){var t,n;(t=he.__PosthogExtensions__)!=null&&t.generateProductTours?e():(n=he.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"product-tours",(s=>{s?Ll.error("Could not load product tours script",s):e()}))}sa(){var e;!this.ia&&(e=he.__PosthogExtensions__)!=null&&e.generateProductTours&&(this.ia=he.__PosthogExtensions__.generateProductTours(this._instance,!0))}getProductTours(e,t){if(t===void 0&&(t=!1),!Ce(this.na)||t){var n=this.Si;if(n){var s=n.props[pi];if(Ce(s)&&!t)return this.na=s,void e(s,{isLoaded:!0})}this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/product_tours/?token="+this._instance.config.token),method:"GET",callback:r=>{if(Nl(this._instance)){var i=r.statusCode;if(i!==200||!r.json){var o="Product Tours API could not be loaded, status: "+i;return Ll.error(o),void e([],{isLoaded:!1,error:o})}var a=Ce(r.json.product_tours)?r.json.product_tours:[];this.na=a,n&&n.register({[pi]:a}),e(a,{isLoaded:!0})}else e([],{isLoaded:!0})}})}else e(this.na,{isLoaded:!0})}getActiveProductTours(e){Se(this.ia)?e([],{isLoaded:!1,error:"Product tours not loaded"}):this.ia.getActiveProductTours(e)}showProductTour(e){var t;(t=this.ia)==null||t.showTourById(e)}previewTour(e){this.ia?this.ia.previewTour(e):this.ur((()=>{var t;this.sa(),(t=this.ia)==null||t.previewTour(e)}))}dismissProductTour(){var e;(e=this.ia)==null||e.dismissTour("user_clicked_skip")}nextStep(){var e;(e=this.ia)==null||e.nextStep()}previousStep(){var e;(e=this.ia)==null||e.previousStep()}clearCache(){var e;this.na=null,(e=this.Si)==null||e.unregister(pi)}resetTour(e){var t;(t=this.ia)==null||t.resetTour(e)}resetAllTours(){var e;(e=this.ia)==null||e.resetAllTours()}cancelPendingTour(e){var t;(t=this.ia)==null||t.cancelPendingTour(e)}}},Ua),iS={siteApps:class{constructor(e){this.oa=0,this._instance=e,this.aa=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}la(e,t){if(t){var n=this.globalsForEvent(t);this.aa.push(n),this.aa.length>1e3&&(this.aa=this.aa.slice(10))}}get siteAppLoaders(){var e;return(e=he._POSTHOG_REMOTE_CONFIG)==null||(e=e[this._instance.config.token])==null?void 0:e.siteApps}initialize(){if(this.isEnabled){var e=this._instance._addCaptureHook(this.la.bind(this));this.ua=()=>{e(),this.aa=[],this.ua=void 0}}}globalsForEvent(e){var t,n,s,r,i,o,a;if(!e)throw new Error("Event payload is required");var l={},c=this._instance.get_property("$groups")||[],u=this._instance.get_property("$stored_group_properties")||{};for(var[d,f]of Object.entries(u))l[d]={id:c[d],type:d,properties:f};var{$set_once:p,$set:g}=e;return{event:Z({},gv(e,YE),{properties:Z({},e.properties,g?{$set:Z({},(t=(n=e.properties)==null?void 0:n.$set)!==null&&t!==void 0?t:{},g)}:{},p?{$set_once:Z({},(s=(r=e.properties)==null?void 0:r.$set_once)!==null&&s!==void 0?s:{},p)}:{}),elements_chain:(i=(o=e.properties)==null?void 0:o.$elements_chain)!==null&&i!==void 0?i:"",distinct_id:(a=e.properties)==null?void 0:a.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:l}}ha(e){var t,n=(t=e.tagName)==null?void 0:t.toLowerCase();return n==="style"&&this._instance.config.prepare_external_dependency_stylesheet?this._instance.config.prepare_external_dependency_stylesheet(e)||(vn.error("prepare_external_dependency_stylesheet returned null"),null):n==="script"&&this._instance.config.prepare_external_dependency_script?this._instance.config.prepare_external_dependency_script(e)||(vn.error("prepare_external_dependency_script returned null"),null):e}ca(){var e,t,n,s,r,i,o,a;if(!this._instance.config.prepare_external_dependency_stylesheet&&!this._instance.config.prepare_external_dependency_script)return()=>{};var l=ie==null?void 0:ie.defaultView,c=l==null||(e=l.Node)==null?void 0:e.prototype;if(!l||!c)return()=>{};if(this.oa++,this.da)return this.va();var u=[],d=this,f=new WeakSet,p=(m,v,y)=>{if(m!=null&&m[v]){var x=m[v];m[v]=y(x),u.push((()=>{m[v]=x}))}},g=m=>{if(f.has(m))return m;var v=d.ha(m);return v&&f.add(v),v},h=m=>m.map((v=>typeof v=="string"?v:g(v))).filter((v=>!$t(v)));return p(c,"appendChild",(m=>function(v){var y=g(v);return y?m.call(this,y):v})),p(c,"insertBefore",(m=>function(v,y){var x=g(v);return x?m.call(this,x,y):v})),p(c,"replaceChild",(m=>function(v,y){var x=g(v);return x?m.call(this,x,y):y})),[(t=l.Element)==null?void 0:t.prototype,(n=l.Document)==null?void 0:n.prototype,(s=l.DocumentFragment)==null?void 0:s.prototype].forEach((m=>{p(m,"append",(v=>function(){for(var y=arguments.length,x=new Array(y),k=0;y>k;k++)x[k]=arguments[k];return v.apply(this,h(x))})),p(m,"prepend",(v=>function(){for(var y=arguments.length,x=new Array(y),k=0;y>k;k++)x[k]=arguments[k];return v.apply(this,h(x))}))})),[(r=l.Element)==null?void 0:r.prototype,(i=l.CharacterData)==null?void 0:i.prototype,(o=l.DocumentType)==null?void 0:o.prototype].forEach((m=>{p(m,"before",(v=>function(){for(var y=arguments.length,x=new Array(y),k=0;y>k;k++)x[k]=arguments[k];return v.apply(this,h(x))})),p(m,"after",(v=>function(){for(var y=arguments.length,x=new Array(y),k=0;y>k;k++)x[k]=arguments[k];return v.apply(this,h(x))})),p(m,"replaceWith",(v=>function(){for(var y=arguments.length,x=new Array(y),k=0;y>k;k++)x[k]=arguments[k];var O=h(x);return x.length&&!O.length?void 0:v.apply(this,O)}))})),p((a=l.Element)==null?void 0:a.prototype,"insertAdjacentElement",(m=>function(v,y){var x=g(y);return x?m.call(this,v,x):null})),this.da=()=>{u.forEach((m=>m())),this.da=void 0},this.va()}va(){var e=!1;return()=>{var t;e||(e=!0,this.oa--,this.oa===0&&((t=this.da)==null||t.call(this)))}}fa(e,t){t===void 0&&(t=!0);var n=this.ca();try{var s=e(n);return t&&n(),s}catch(r){throw n(),r}}setupSiteApp(e){var t=this.apps[e.id],n=()=>{var o;!t.errored&&this.aa.length&&(vn.info("Processing "+this.aa.length+" events for site app with id "+e.id),this.aa.forEach((a=>this.fa((()=>t.processEvent==null?void 0:t.processEvent(a))))),t.processedBuffer=!0),Object.values(this.apps).every((a=>a.processedBuffer||a.errored))&&((o=this.ua)==null||o.call(this))},s=!1,r=o=>{t.errored=!o,t.loaded=!0,vn.info("Site app with id "+e.id+" "+(o?"loaded":"errored")),s&&n()};try{var{processEvent:i}=this.fa((o=>e.init({posthog:this._instance,callback(a){o(),r(a)}})),!1);i&&(t.processEvent=i),s=!0}catch(o){vn.error(xp+e.id,o),r(!1)}if(s&&t.loaded)try{n()}catch(o){vn.error("Error while processing buffered events PostHog app with config id "+e.id,o),t.errored=!0}}pa(){var e=this.siteAppLoaders||[];for(var t of e)this.apps[t.id]={id:t.id,loaded:!1,errored:!1,processedBuffer:!1};for(var n of e)this.setupSiteApp(n)}ga(e){var t=this;if(Object.keys(this.apps).length!==0){var n=this.globalsForEvent(e),s=function(i){try{t.fa((()=>i.processEvent==null?void 0:i.processEvent(n)))}catch(o){vn.error("Error while processing event "+e.event+" for site app "+i.id,o)}};for(var r of Object.values(this.apps))s(r)}}onRemoteConfig(e){var t,n,s,r=this;if((t=this.siteAppLoaders)!=null&&t.length)return this.isEnabled?(this.pa(),void this._instance.on("eventCaptured",(l=>this.ga(l)))):void vn.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if((n=this.ua)==null||n.call(this),(s=e.siteApps)!=null&&s.length)if(this.isEnabled){var i=function(l){var c;he["__$$ph_site_app_"+l]=r._instance,(c=he.__PosthogExtensions__)==null||c.loadSiteApp==null||c.loadSiteApp(r._instance,a,(u=>{if(u)return vn.error(xp+l,u)}))};for(var{id:o,url:a}of e.siteApps)i(o)}else vn.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}},oS={tracingHeaders:class{constructor(e){this.ma=void 0,this.ya=void 0,this.ba=void 0,this.Fo=()=>{var t,n,s=this._a();s?(te(this.ma)&&(this.ma=(t=he.__PosthogExtensions__)==null||(t=t.tracingHeadersPatchFns)==null?void 0:t._patchXHR(s,(()=>this._instance.get_distinct_id()),this._instance.sessionManager)),te(this.ya)&&(this.ya=(n=he.__PosthogExtensions__)==null||(n=n.tracingHeadersPatchFns)==null?void 0:n._patchFetch(s,(()=>this._instance.get_distinct_id()),this._instance.sessionManager))):this.jo()},this._instance=e}initialize(){this.startIfEnabledOrStop()}ur(e){var t,n;(t=he.__PosthogExtensions__)!=null&&t.tracingHeadersPatchFns?e():(n=he.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"tracing-headers",(s=>{if(s)return GE.error("failed to load script",s);e()}))}wa(){var e,t;return(e=(t=this._instance.config.tracing_headers)!==null&&t!==void 0?t:this._instance.config.addTracingHeaders)!==null&&e!==void 0?e:this._instance.config.__add_tracing_headers}_a(){var e=this.wa();return Ce(e)?(Ce(this.ba)?this.ba.splice(0,this.ba.length,...e):this.ba=[...e],e.length>0?this.ba:void 0):(Ce(this.ba)&&this.ba.splice(0),this.ba=e||void 0,this.ba)}jo(){var e,t;(e=this.ma)==null||e.call(this),(t=this.ya)==null||t.call(this),this.ma=void 0,this.ya=void 0}startIfEnabledOrStop(){this._a()?this.ur(this.Fo):this.jo()}}},aS=Z({surveys:class{get qt(){return this._instance.config}constructor(e){this.xa=void 0,this._surveyManager=null,this.ka=!1,this.Sa=[],this.Ca=null,this._instance=e,this._surveyEventReceiver=null}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(!this.qt.disable_surveys){var t=e.surveys;if(Se(t))return Ne.warn("Flags not loaded yet. Not loading surveys.");var n=Ce(t);this.xa=n?t.length>0:t,Ne.info("flags response received, isSurveysEnabled: "+this.xa),this.loadIfEnabled()}}reset(){try{localStorage.removeItem("lastSeenSurveyDate");for(var e=[],t=0;t<localStorage.length;t++){var n=localStorage.key(t);(n!=null&&n.startsWith(Ju)||n!=null&&n.startsWith("inProgressSurvey_"))&&e.push(n)}e.forEach((s=>localStorage.removeItem(s)))}catch{}}loadIfEnabled(){if(!this._surveyManager)if(this.ka)Ne.info("Already initializing surveys, skipping...");else if(this.qt.disable_surveys)Ne.info(wp);else if(this.qt.cookieless_mode&&this._instance.consent.isOptedOut())Ne.info("Not loading surveys in cookieless mode without consent.");else{var e=he==null?void 0:he.__PosthogExtensions__;if(e){if(!te(this.xa)||this.qt.advanced_enable_surveys){var t=this.xa||this.qt.advanced_enable_surveys;this.ka=!0;try{var n=e.generateSurveys;if(n)return void this.Ia(n,t);var s=e.loadExternalDependency;if(!s)return void this.Ta(jc);s(this._instance,"surveys",(r=>{r||!e.generateSurveys?this.Ta("Could not load surveys script",r):this.Ia(e.generateSurveys,t)}))}catch(r){throw this.Ta("Error initializing surveys",r),r}finally{this.ka=!1}}}else Ne.error("PostHog Extensions not found.")}}Ia(e,t){this._surveyManager=e(this._instance,t),this._surveyEventReceiver=new ZE(this._instance),Ne.info("Surveys loaded successfully"),this.Ea({isLoaded:!0})}Ta(e,t){Ne.error(e,t),this.Ea({isLoaded:!1,error:e})}onSurveysLoaded(e){return this.Sa.push(e),this._surveyManager&&this.Ea({isLoaded:!0}),()=>{this.Sa=this.Sa.filter((t=>t!==e))}}getSurveys(e,t){if(t===void 0&&(t=!1),this.qt.disable_surveys)return Ne.info(wp),e([]);var n,s=this._instance.get_property(Mu);if(s&&!t)return e(s,{isLoaded:!0});typeof Promise<"u"&&this.Ca?this.Ca.then((r=>{var{surveys:i,context:o}=r;return e(i,o)})):(typeof Promise<"u"&&(this.Ca=new Promise((r=>{n=r}))),this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/surveys/?token="+this.qt.token),method:"GET",timeout:this.qt.surveys_request_timeout_ms,callback:r=>{var i;this.Ca=null;var o=r.statusCode;if(o!==200||!r.json){var a="Surveys API could not be loaded, status: "+o;Ne.error(a);var l={isLoaded:!1,error:a};return e([],l),void(n==null||n({surveys:[],context:l}))}var c,u=r.json.surveys||[],d=u.filter((p=>(function(g){return!(!g.start_date||g.end_date)})(p)&&((function(g){var h;return!((h=g.conditions)==null||(h=h.events)==null||(h=h.values)==null||!h.length)})(p)||(function(g){var h;return!((h=g.conditions)==null||(h=h.actions)==null||(h=h.values)==null||!h.length)})(p))));d.length>0&&((c=this._surveyEventReceiver)==null||c.register(d)),(i=this._instance.persistence)==null||i.register({[Mu]:u,[zc]:Date.now()});var f={isLoaded:!0};e(u,f),n==null||n({surveys:u,context:f})}}))}Ea(e){for(var t of this.Sa)try{if(!e.isLoaded)return t([],e);this.getSurveys(t)}catch(n){Ne.error("Error in survey callback",n)}}getActiveMatchingSurveys(e,t){if(t===void 0&&(t=!1),!Se(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(e,t);Ne.warn("init was not called")}Ma(e){var t=null;return this.getSurveys((n=>{var s;t=(s=n.find((r=>r.id===e)))!==null&&s!==void 0?s:null})),t}Ra(e){if(Se(this._surveyManager))return{eligible:!1,reason:ql};var t=typeof e=="string"?this.Ma(e):e;return t?this._surveyManager.checkSurveyEligibility(t):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(e){if(Se(this._surveyManager))return Ne.warn("init was not called"),{visible:!1,disabledReason:ql};var t=this.Ra(e);return{visible:t.eligible,disabledReason:t.reason}}canRenderSurveyAsync(e,t){return Se(this._surveyManager)?(Ne.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:ql})):new Promise((n=>{this.getSurveys((s=>{var r,i=(r=s.find((a=>a.id===e)))!==null&&r!==void 0?r:null;if(i){var o=this.Ra(i);n({visible:o.eligible,disabledReason:o.reason})}else n({visible:!1,disabledReason:"Survey not found"})}),t)}))}renderSurvey(e,t,n){var s;if(Se(this._surveyManager))Ne.warn("init was not called");else{var r=typeof e=="string"?this.Ma(e):e;if(r!=null&&r.id)if(NE.includes(r.type)){var i=ie==null?void 0:ie.querySelector(t);if(i)return(s=r.appearance)!=null&&s.surveyPopupDelaySeconds?(Ne.info("Rendering survey "+r.id+" with delay of "+r.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout((()=>{var o,a;Ne.info("Rendering survey "+r.id+" with delay of "+((o=r.appearance)==null?void 0:o.surveyPopupDelaySeconds)+" seconds"),(a=this._surveyManager)==null||a.renderSurvey(r,i,n),Ne.info("Survey "+r.id+" rendered")}),1e3*r.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(r,i,n);Ne.warn("Survey element not found")}else Ne.warn("Surveys of type "+r.type+" cannot be rendered in the app");else Ne.warn("Survey not found")}}displaySurvey(e,t){var n;if(Se(this._surveyManager))Ne.warn("init was not called");else{var s=this.Ma(e);if(s){var r=s;if((n=s.appearance)!=null&&n.surveyPopupDelaySeconds&&t.ignoreDelay&&(r=Z({},s,{appearance:Z({},s.appearance,{surveyPopupDelaySeconds:0})})),t.displayType!==Vu.Popover&&t.initialResponses&&Ne.warn("initialResponses is only supported for popover surveys. prefill will not be applied."),t.ignoreConditions===!1){var i=this.canRenderSurvey(s);if(!i.visible)return void Ne.warn("Survey is not eligible to be displayed: ",i.disabledReason)}t.displayType!==Vu.Inline?this._surveyManager.handlePopoverSurvey(r,t):this.renderSurvey(r,t.selector,t.properties)}else Ne.warn("Survey not found")}}cancelPendingSurvey(e){Se(this._surveyManager)?Ne.warn("init was not called"):this._surveyManager.cancelSurvey(e)}handlePageUnload(){var e;(e=this._surveyManager)==null||e.handlePageUnload()}}},Ua),lS={toolbar:class{constructor(e){this.instance=e}Pa(e){he.ph_toolbar_state=e}Oa(){var e;return(e=he.ph_toolbar_state)!==null&&e!==void 0?e:0}initialize(){return this.maybeLoadToolbar()}maybeLoadToolbar(e,t,n){if(e===void 0&&(e=void 0),t===void 0&&(t=void 0),n===void 0&&(n=void 0),tm(this.instance.config)||!M||!ie)return!1;e=e??M.location,n=n??M.history;try{if(!t){try{M.localStorage.setItem("test","test"),M.localStorage.removeItem("test")}catch{return!1}t=M==null?void 0:M.localStorage}var s,r=QE||ua(e.hash,"__posthog")||ua(e.hash,"state"),i=r?jf((()=>JSON.parse(atob(decodeURIComponent(r)))))||jf((()=>JSON.parse(decodeURIComponent(r)))):null;return i&&i.action==="ph_authorize"?((s=i).source="url",s&&Object.keys(s).length>0&&(i.desiredHash?e.hash=i.desiredHash:n?n.replaceState(n.state,"",e.pathname+e.search):e.hash="")):((s=JSON.parse(t.getItem(kp)||"{}")).source="localstorage",delete s.userIntent),!(!s.token||this.instance.config.token!==s.token||(this.loadToolbar(s),0))}catch{return!1}}La(e){var t=he.ph_load_toolbar||he.ph_load_editor;!Se(t)&&jn(t)?t(e,this.instance):Ep.warn("No toolbar load function found")}loadToolbar(e){var t=!(ie==null||!ie.getElementById(Xv));if(!M||t)return!1;var n=this.instance.requestRouter.region==="custom"&&this.instance.config.advanced_disable_toolbar_metrics,s=Z({token:this.instance.config.token},e,{apiURL:this.instance.requestRouter.endpointFor("ui")},n?{instrument:!1}:{});if(M.localStorage.setItem(kp,JSON.stringify(Z({},s,{source:void 0}))),this.Oa()===2)this.La(s);else if(this.Oa()===0){var r;this.Pa(1),(r=he.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this.instance,"toolbar",(i=>{if(i)return Ep.error("[Toolbar] Failed to load",i),void this.Pa(0);this.Pa(2),this.La(s)})),rt(M,"turbolinks:load",(()=>{this.Pa(0),this.loadToolbar(s)}))}return!0}Aa(e){return this.loadToolbar(e)}maybeLoadEditor(e,t,n){return e===void 0&&(e=void 0),t===void 0&&(t=void 0),n===void 0&&(n=void 0),this.maybeLoadToolbar(e,t,n)}}},uS=Z({experiments:St},Ua),cS={conversations:class{constructor(e){this.Fa=void 0,this._conversationsManager=null,this.Na=!1,this.Da=null,this._instance=e}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(!this._instance.config.disable_conversations){var t=e.conversations;Se(t)||(Pn(t)?this.Fa=t:(this.Fa=t.enabled,this.Da=t),this.loadIfEnabled())}}reset(){var e;(e=this._conversationsManager)==null||e.reset(),this._conversationsManager=null,this.Fa=void 0,this.Da=null}loadIfEnabled(){if(!(this._conversationsManager||this.Na||this._instance.config.disable_conversations||tm(this._instance.config)||this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())){var e=he==null?void 0:he.__PosthogExtensions__;if(e&&!te(this.Fa)&&this.Fa)if(this.Da&&this.Da.token){this.Na=!0;try{var t=e.initConversations;if(t)return this.$a(t),void(this.Na=!1);var n=e.loadExternalDependency;if(!n)return void this.qa(jc);n(this._instance,"conversations",(s=>{s||!e.initConversations?this.qa("Could not load conversations script",s):this.$a(e.initConversations),this.Na=!1}))}catch(s){this.qa("Error initializing conversations",s),this.Na=!1}}else Zt.error("Conversations enabled but missing token in remote config.")}}$a(e){if(this.Da)try{this._conversationsManager=e(this.Da,this._instance),Zt.info("Conversations loaded successfully")}catch(t){this.qa("Error completing conversations initialization",t)}else Zt.error("Cannot complete initialization: remote config is null")}qa(e,t){Zt.error(e,t),this._conversationsManager=null,this.Na=!1}show(){this._conversationsManager?this._conversationsManager.show():Zt.warn("Conversations not loaded yet.")}hide(){this._conversationsManager&&this._conversationsManager.hide()}isAvailable(){return this.Fa===!0&&!$t(this._conversationsManager)}isVisible(){var e,t;return(e=(t=this._conversationsManager)==null?void 0:t.isVisible())!==null&&e!==void 0&&e}sendMessage(e,t,n){var s=this;return jt((function*(){return s._conversationsManager?s._conversationsManager.sendMessage(e,t,n):(Zt.warn(Ms),null)}))()}getMessages(e,t){var n=this;return jt((function*(){return n._conversationsManager?n._conversationsManager.getMessages(e,t):(Zt.warn(Ms),null)}))()}markAsRead(e){var t=this;return jt((function*(){return t._conversationsManager?t._conversationsManager.markAsRead(e):(Zt.warn(Ms),null)}))()}getTickets(e){var t=this;return jt((function*(){return t._conversationsManager?t._conversationsManager.getTickets(e):(Zt.warn(Ms),null)}))()}requestRestoreLink(e){var t=this;return jt((function*(){return t._conversationsManager?t._conversationsManager.requestRestoreLink(e):(Zt.warn(Ms),null)}))()}restoreFromToken(e){var t=this;return jt((function*(){return t._conversationsManager?t._conversationsManager.restoreFromToken(e):(Zt.warn(Ms),null)}))()}restoreFromUrlToken(){var e=this;return jt((function*(){return e._conversationsManager?e._conversationsManager.restoreFromUrlToken():(Zt.warn(Ms),null)}))()}getCurrentTicketId(){var e,t;return(e=(t=this._conversationsManager)==null?void 0:t.getCurrentTicketId())!==null&&e!==void 0?e:null}getWidgetSessionId(){var e,t;return(e=(t=this._conversationsManager)==null?void 0:t.getWidgetSessionId())!==null&&e!==void 0?e:null}Nn(){var e;(e=this._conversationsManager)==null||e.setIdentity()}Dn(){var e;(e=this._conversationsManager)==null||e.clearIdentity()}}},dS={logs:class{constructor(e){var t;this.ja=!1,this.Ba=!1,this.Zt=Ze("[logs]"),this.Ha=[],this.Ua=0,this.za=0,this.Va=!1,this._instance=e,this._instance&&(t=this._instance.config.logs)!=null&&t.captureConsoleLogs&&(this.ja=!0)}initialize(){this.loadIfEnabled()}onRemoteConfig(e){var t,n=(t=e.logs)==null?void 0:t.captureConsoleLogs;!Se(n)&&n&&(this.ja=!0,this.loadIfEnabled())}reset(){this.Ha=[],this.ii&&(clearTimeout(this.ii),this.ii=void 0),this.Ua=0,this.za=0,this.Va=!1}loadIfEnabled(){if(this.ja&&!this.Ba){var e=he==null?void 0:he.__PosthogExtensions__;if(e){var t=e.loadExternalDependency;t?t(this._instance,"logs",(n=>{var s;n||(s=e.logs)==null||!s.initializeLogs?this.Zt.error("Could not load logs script",n):(e.logs.initializeLogs(this._instance),this.Ba=!0)})):this.Zt.error(jc)}else this.Zt.error("PostHog Extensions not found.")}}captureLog(e){var t,n,s,r,i,o;if(this._instance.is_capturing())if(e&&e.body){var a=(t=(n=this._instance.config.logs)==null?void 0:n.flushIntervalMs)!==null&&t!==void 0?t:3e3,l=(s=(r=this._instance.config.logs)==null?void 0:r.maxLogsPerInterval)!==null&&s!==void 0?s:1e3,c=Date.now();if(a>c-this.za||(this.za=c,this.Ua=0,this.Va=!1),l>this.Ua){this.Ua++;var u=(function(d,f){var p=d.level||"info",{text:g,number:h}=Bv[p]||bk,m=String(Date.now())+"000000",v={};f.distinctId&&(v.posthogDistinctId=f.distinctId),f.sessionId&&(v.sessionId=f.sessionId),f.currentUrl&&(v["url.full"]=f.currentUrl),f.screenName&&(v["screen.name"]=f.screenName),f.appState&&(v["app.state"]=f.appState),f.activeFeatureFlags&&f.activeFeatureFlags.length>0&&(v.feature_flags=f.activeFeatureFlags);var y=Z({},v,d.attributes||{}),x={timeUnixNano:m,observedTimeUnixNano:m,severityNumber:h,severityText:g,body:{stringValue:d.body},attributes:qf(y)};return d.trace_id&&(x.traceId=d.trace_id),d.span_id&&(x.spanId=d.span_id),te(d.trace_flags)||(x.flags=d.trace_flags),x})(e,this.Wa());this.Ha.push({record:u}),((i=(o=this._instance.config.logs)==null?void 0:o.maxBufferSize)!==null&&i!==void 0?i:100)>this.Ha.length?this.Ga():this.flushLogs()}else this.Va||(this.Zt.warn("captureLog dropping logs: exceeded "+l+" logs per "+a+"ms"),this.Va=!0)}else this.Zt.warn("captureLog requires a body")}get logger(){return this.Za||(this.Za={trace:(e,t)=>this.captureLog({body:e,level:"trace",attributes:t}),debug:(e,t)=>this.captureLog({body:e,level:"debug",attributes:t}),info:(e,t)=>this.captureLog({body:e,level:"info",attributes:t}),warn:(e,t)=>this.captureLog({body:e,level:"warn",attributes:t}),error:(e,t)=>this.captureLog({body:e,level:"error",attributes:t}),fatal:(e,t)=>this.captureLog({body:e,level:"fatal",attributes:t})}),this.Za}flushLogs(e){if(this.ii&&(clearTimeout(this.ii),this.ii=void 0),this.Ha.length!==0){var t=this.Ha;this.Ha=[];var n=this._instance.config.logs,s=Z({"service.name":(n==null?void 0:n.serviceName)||"unknown_service"},(n==null?void 0:n.environment)&&{"deployment.environment":n.environment},(n==null?void 0:n.serviceVersion)&&{"service.version":n.serviceVersion},n==null?void 0:n.resourceAttributes),r=(function(o,a,l,c){return{resourceLogs:[{resource:{attributes:qf(a)},scopeLogs:[{scope:{name:l,version:c},logRecords:o}]}]}})(t.map((o=>o.record)),s,gt.LIB_NAME,gt.LIB_VERSION),i=this._instance.requestRouter.endpointFor("api","/i/v1/logs")+"?token="+encodeURIComponent(this._instance.config.token);this._instance.yn({method:"POST",url:i,data:r,compression:"best-available",batchKey:"logs",transport:e})}}Ga(){var e,t;this.ii||(this.ii=setTimeout((()=>{this.ii=void 0,this.flushLogs()}),(e=(t=this._instance.config.logs)==null?void 0:t.flushIntervalMs)!==null&&e!==void 0?e:3e3))}Wa(){var e,t={};if(t.distinctId=this._instance.get_distinct_id(),this._instance.sessionManager){var{sessionId:n}=this._instance.sessionManager.checkAndGetSessionAndWindowId(!0);t.sessionId=n}if(he!=null&&(e=he.location)!=null&&e.href&&(t.currentUrl=he.location.href),this._instance.featureFlags){var s=this._instance.featureFlags.getFlags();s&&s.length>0&&(t.activeFeatureFlags=s)}return t}}},fS=Z({},Ua,tS,nS,sS,rS,iS,aS,oS,lS,uS,cS,dS);Qt.__defaultExtensionClasses=Z({},fS);var Us=(function(){gt.SDK_DIST_CHANNEL="npm";var e=Ai[fr]=new Qt;return(function(){function t(){t.done||(t.done=!0,Mm=!1,je(Ai,(function(n){n._dom_loaded()})))}ie!=null&&ie.addEventListener?ie.readyState==="complete"?t():rt(ie,"DOMContentLoaded",t,{capture:!1}):M&&re.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")})(),e})();let Ys=!1;function $m(e){if(Ys||!e.enabled||!e.key)return;Us.init(e.key,{api_host:e.apiHost,ui_host:e.uiHost,person_profiles:"identified_only",bootstrap:{distinctID:e.distinctId},capture_pageview:"history_change",autocapture:!1});const t=hv();Us.identify(e.distinctId,t),Us.register(t),Ys=!0}function pS(e){Ys&&Us.register(e)}function hS(e,t){Ys&&Us.capture(e,{...t,event_source:"ui"})}function gS(){Ys&&Us.opt_out_capturing()}function vS(){Ys&&Us.opt_in_capturing()}function Jc(){return Ys}async function mS(){const[e,t]=await Promise.all([to(),ov()]);return{privacy_mode:!e.enabled,beta_telemetry_opt_in:e.betaTelemetryOptIn,theme:Rc(),action_plan_enabled:t.actionPlanBeta,...hv()}}async function ws(){if(Jc())try{const e=await mS();pS({...e})}catch{}}let Js=!1;async function _S(){try{const e=await to();Js=e.enabled,$m(e),e.enabled&&await ws()}catch{Js=!1}}function yS(){return Js&&Jc()}function Io(e,t){yS()&&hS(e,t)}async function bS(e){if(await z2(e),e){Js=!1,gS();return}Js=await Fm(),vS(),await ws()}async function Fm(){try{const e=await to();return Js=e.enabled,e.enabled&&!Jc()&&$m(e),e.enabled&&await ws(),e.enabled}catch{return Js=!1,!1}}const xS={class:"fixed inset-0 z-50 flex items-center justify-center bg-background/70 p-4 backdrop-blur"},wS={key:0,class:"mt-3 text-sm text-destructive"},kS=ae({__name:"BetaTeamModal",emits:["answered"],setup(e,{emit:t}){const n=t,s=J(!1),r=J(null);async function i(o){if(!s.value){s.value=!0,r.value=null;try{await av(o),await ws(),n("answered")}catch(a){r.value=a.message}finally{s.value=!1}}}return(o,a)=>(P(),Y("div",xS,[I(_(Qg),{class:"w-full max-w-md"},{default:D(()=>[I(_(ev),null,{default:D(()=>[I(_(tv),null,{default:D(()=>[...a[2]||(a[2]=[ce("Join the beta team?",-1)])]),_:1}),I(_(nv),null,{default:D(()=>[...a[3]||(a[3]=[ce(" Help us improve Photoshop MCP by optionally sharing your prompts and AI responses with the product team. We collect tool names only — never API keys, file paths, or tool arguments and results. ",-1)])]),_:1})]),_:1}),I(_(sv),null,{default:D(()=>[a[4]||(a[4]=N("p",{class:"text-sm text-muted-foreground"}," You can change this anytime in Settings → Privacy. Anonymous usage analytics (app version, setup events) stay separate and remain enabled unless you turn them off. ",-1)),r.value?(P(),Y("p",wS,fe(r.value),1)):_e("",!0)]),_:1}),I(_(rv),{class:"flex gap-2"},{default:D(()=>[I(_(De),{class:"flex-1",disabled:s.value,onClick:a[0]||(a[0]=l=>i(!0))},{default:D(()=>[s.value?(P(),ue(_(Kn),{key:0,class:"size-4 animate-spin"})):_e("",!0),a[5]||(a[5]=ce(" Join beta ",-1))]),_:1},8,["disabled"]),I(_(De),{class:"flex-1",variant:"outline",disabled:s.value,onClick:a[1]||(a[1]=l=>i(!1))},{default:D(()=>[...a[6]||(a[6]=[ce(" No thanks ",-1)])]),_:1},8,["disabled"])]),_:1})]),_:1})]))}}),ES=["type","placeholder","disabled"],Qu=ae({__name:"Input",props:Q_({class:{},type:{default:"text"},placeholder:{},disabled:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=ay(e,"modelValue");return(s,r)=>uc((P(),Y("input",{"onUpdate:modelValue":r[0]||(r[0]=i=>n.value=i),type:e.type,placeholder:e.placeholder,disabled:e.disabled,class:He(_(Et)("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",t.class))},null,10,ES)),[[a0,n.value]])}}),Hn=ae({__name:"Label",props:{class:{},for:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,s)=>(P(),ue(_(Fw),{for:t.for,class:He(_(Et)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",t.class))},{default:D(()=>[ye(n.$slots,"default")]),_:3},8,["for","class"]))}}),SS=["aria-label"],CS={class:"adobe-app-icon__label"},PS=ae({__name:"AdobeAppIcon",props:{app:{},size:{default:32}},setup(e){const t={ps:{label:"Ps",bg:"#001E36",fg:"#31A8FF"},ai:{label:"Ai",bg:"#330000",fg:"#FF9A00"},ae:{label:"Ae",bg:"#00005B",fg:"#9999FF"},pr:{label:"Pr",bg:"#00005B",fg:"#EA77FF"},id:{label:"Id",bg:"#49021F",fg:"#F36"},xd:{label:"Xd",bg:"#1E0033",fg:"#FF61F6"},lr:{label:"Lr",bg:"#001E36",fg:"#31A8FF"}},n=e,s=G(()=>t[n.app]),r=G(()=>({width:`${n.size}px`,height:`${n.size}px`,background:s.value.bg,color:s.value.fg,borderRadius:`${Math.max(2,Math.round(n.size*.1875))}px`,fontSize:`${Math.round(n.size*.55)}px`}));return(i,o)=>(P(),Y("div",{class:"adobe-app-icon",style:ks(r.value),"aria-label":s.value.label},[N("span",CS,fe(s.value.label),1)],12,SS))}}),AS=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},ec=AS(PS,[["__scopeId","data-v-ea369691"]]),OS="data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eAnthropic%3c/title%3e%3cpath%20d='M13.827%203.52h3.603L24%2020h-3.603l-6.57-16.48zm-7.258%200h3.767L16.906%2020h-3.674l-1.343-3.461H5.017l-1.344%203.46H0L6.57%203.522zm4.132%209.959L8.453%207.687%206.205%2013.48H10.7z'%3e%3c/path%3e%3c/svg%3e",TS="data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eOpenAI%3c/title%3e%3cpath%20d='M9.205%208.658v-2.26c0-.19.072-.333.238-.428l4.543-2.616c.619-.357%201.356-.523%202.117-.523%202.854%200%204.662%202.212%204.662%204.566%200%20.167%200%20.357-.024.547l-4.71-2.759a.797.797%200%2000-.856%200l-5.97%203.473zm10.609%208.8V12.06c0-.333-.143-.57-.429-.737l-5.97-3.473%201.95-1.118a.433.433%200%2001.476%200l4.543%202.617c1.309.76%202.189%202.378%202.189%203.948%200%201.808-1.07%203.473-2.76%204.163zM7.802%2012.703l-1.95-1.142c-.167-.095-.239-.238-.239-.428V5.899c0-2.545%201.95-4.472%204.591-4.472%201%200%201.927.333%202.712.928L8.23%205.067c-.285.166-.428.404-.428.737v6.898zM12%2015.128l-2.795-1.57v-3.33L12%208.658l2.795%201.57v3.33L12%2015.128zm1.796%207.23c-1%200-1.927-.332-2.712-.927l4.686-2.712c.285-.166.428-.404.428-.737v-6.898l1.974%201.142c.167.095.238.238.238.428v5.233c0%202.545-1.974%204.472-4.614%204.472zm-5.637-5.303l-4.544-2.617c-1.308-.761-2.188-2.378-2.188-3.948A4.482%204.482%200%20014.21%206.327v5.423c0%20.333.143.571.428.738l5.947%203.449-1.95%201.118a.432.432%200%2001-.476%200zm-.262%203.9c-2.688%200-4.662-2.021-4.662-4.519%200-.19.024-.38.047-.57l4.686%202.71c.286.167.571.167.856%200l5.97-3.448v2.26c0%20.19-.07.333-.237.428l-4.543%202.616c-.619.357-1.356.523-2.117.523zm5.899%202.83a5.947%205.947%200%20005.827-4.756C22.287%2018.339%2024%2015.84%2024%2013.296c0-1.665-.713-3.282-1.998-4.448.119-.5.19-.999.19-1.498%200-3.401-2.759-5.947-5.946-5.947-.642%200-1.26.095-1.88.31A5.962%205.962%200%200010.205%200a5.947%205.947%200%2000-5.827%204.757C1.713%205.447%200%207.945%200%2010.49c0%201.666.713%203.283%201.998%204.448-.119.5-.19%201-.19%201.499%200%203.401%202.759%205.946%205.946%205.946.642%200%201.26-.095%201.88-.309a5.96%205.96%200%20004.162%201.713z'%3e%3c/path%3e%3c/svg%3e",IS="data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eOpenRouter%3c/title%3e%3cpath%20d='M16.804%201.957l7.22%204.105v.087L16.73%2010.21l.017-2.117-.821-.03c-1.059-.028-1.611.002-2.268.11-1.064.175-2.038.577-3.147%201.352L8.345%2011.03c-.284.195-.495.336-.68.455l-.515.322-.397.234.385.23.53.338c.476.314%201.17.796%202.701%201.866%201.11.775%202.083%201.177%203.147%201.352l.3.045c.694.091%201.375.094%202.825.033l.022-2.159%207.22%204.105v.087L16.589%2022l.014-1.862-.635.022c-1.386.042-2.137.002-3.138-.162-1.694-.28-3.26-.926-4.881-2.059l-2.158-1.5a21.997%2021.997%200%2000-.755-.498l-.467-.28a55.927%2055.927%200%2000-.76-.43C2.908%2014.73.563%2014.116%200%2014.116V9.888l.14.004c.564-.007%202.91-.622%203.809-1.124l1.016-.58.438-.274c.428-.28%201.072-.726%202.686-1.853%201.621-1.133%203.186-1.78%204.881-2.059%201.152-.19%201.974-.213%203.814-.138l.02-1.907z'%3e%3c/path%3e%3c/svg%3e",RS="data:image/svg+xml,%3csvg%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eGemini%3c/title%3e%3cpath%20d='M20.616%2010.835a14.147%2014.147%200%2001-4.45-3.001%2014.111%2014.111%200%2001-3.678-6.452.503.503%200%2000-.975%200%2014.134%2014.134%200%2001-3.679%206.452%2014.155%2014.155%200%2001-4.45%203.001c-.65.28-1.318.505-2.002.678a.502.502%200%20000%20.975c.684.172%201.35.397%202.002.677a14.147%2014.147%200%20014.45%203.001%2014.112%2014.112%200%20013.679%206.453.502.502%200%2000.975%200c.172-.685.397-1.351.677-2.003a14.145%2014.145%200%20013.001-4.45%2014.113%2014.113%200%20016.453-3.678.503.503%200%20000-.975%2013.245%2013.245%200%2001-2.003-.678z'%20fill='%233186FF'%3e%3c/path%3e%3cpath%20d='M20.616%2010.835a14.147%2014.147%200%2001-4.45-3.001%2014.111%2014.111%200%2001-3.678-6.452.503.503%200%2000-.975%200%2014.134%2014.134%200%2001-3.679%206.452%2014.155%2014.155%200%2001-4.45%203.001c-.65.28-1.318.505-2.002.678a.502.502%200%20000%20.975c.684.172%201.35.397%202.002.677a14.147%2014.147%200%20014.45%203.001%2014.112%2014.112%200%20013.679%206.453.502.502%200%2000.975%200c.172-.685.397-1.351.677-2.003a14.145%2014.145%200%20013.001-4.45%2014.113%2014.113%200%20016.453-3.678.503.503%200%20000-.975%2013.245%2013.245%200%2001-2.003-.678z'%20fill='url(%23lobe-icons-gemini-0-_R_0_)'%3e%3c/path%3e%3cpath%20d='M20.616%2010.835a14.147%2014.147%200%2001-4.45-3.001%2014.111%2014.111%200%2001-3.678-6.452.503.503%200%2000-.975%200%2014.134%2014.134%200%2001-3.679%206.452%2014.155%2014.155%200%2001-4.45%203.001c-.65.28-1.318.505-2.002.678a.502.502%200%20000%20.975c.684.172%201.35.397%202.002.677a14.147%2014.147%200%20014.45%203.001%2014.112%2014.112%200%20013.679%206.453.502.502%200%2000.975%200c.172-.685.397-1.351.677-2.003a14.145%2014.145%200%20013.001-4.45%2014.113%2014.113%200%20016.453-3.678.503.503%200%20000-.975%2013.245%2013.245%200%2001-2.003-.678z'%20fill='url(%23lobe-icons-gemini-1-_R_0_)'%3e%3c/path%3e%3cpath%20d='M20.616%2010.835a14.147%2014.147%200%2001-4.45-3.001%2014.111%2014.111%200%2001-3.678-6.452.503.503%200%2000-.975%200%2014.134%2014.134%200%2001-3.679%206.452%2014.155%2014.155%200%2001-4.45%203.001c-.65.28-1.318.505-2.002.678a.502.502%200%20000%20.975c.684.172%201.35.397%202.002.677a14.147%2014.147%200%20014.45%203.001%2014.112%2014.112%200%20013.679%206.453.502.502%200%2000.975%200c.172-.685.397-1.351.677-2.003a14.145%2014.145%200%20013.001-4.45%2014.113%2014.113%200%20016.453-3.678.503.503%200%20000-.975%2013.245%2013.245%200%2001-2.003-.678z'%20fill='url(%23lobe-icons-gemini-2-_R_0_)'%3e%3c/path%3e%3cdefs%3e%3clinearGradient%20gradientUnits='userSpaceOnUse'%20id='lobe-icons-gemini-0-_R_0_'%20x1='7'%20x2='11'%20y1='15.5'%20y2='12'%3e%3cstop%20stop-color='%2308B962'%3e%3c/stop%3e%3cstop%20offset='1'%20stop-color='%2308B962'%20stop-opacity='0'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20gradientUnits='userSpaceOnUse'%20id='lobe-icons-gemini-1-_R_0_'%20x1='8'%20x2='11.5'%20y1='5.5'%20y2='11'%3e%3cstop%20stop-color='%23F94543'%3e%3c/stop%3e%3cstop%20offset='1'%20stop-color='%23F94543'%20stop-opacity='0'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20gradientUnits='userSpaceOnUse'%20id='lobe-icons-gemini-2-_R_0_'%20x1='3.5'%20x2='17.5'%20y1='13.5'%20y2='12'%3e%3cstop%20stop-color='%23FABC12'%3e%3c/stop%3e%3cstop%20offset='.46'%20stop-color='%23FABC12'%20stop-opacity='0'%3e%3c/stop%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",MS=["src","alt","width","height"],Ui=ae({__name:"ProviderIcon",props:{provider:{},size:{default:16}},setup(e){const t={anthropic:OS,openai:TS,openrouter:IS,google:RS},n={anthropic:"Anthropic",openai:"OpenAI",openrouter:"OpenRouter",google:"Google"},s={anthropic:!0,openai:!0,openrouter:!0,google:!1},r=e,i=G(()=>t[r.provider]),o=G(()=>n[r.provider]),a=G(()=>s[r.provider]);return(l,c)=>(P(),Y("img",{src:i.value,alt:o.value,width:r.size,height:r.size,class:He(["provider-icon",{"provider-icon--mono":a.value}]),decoding:"async",loading:"lazy"},null,10,MS))}}),$S={class:"flex min-h-screen items-center justify-center p-6"},FS={class:"space-y-2"},DS={class:"grid grid-cols-2 gap-2"},LS=["onClick"],NS={key:0,class:"space-y-2"},qS={class:"flex gap-2"},BS={class:"space-y-2"},zS=["href"],jS={key:2,class:"rounded-md bg-muted/40 p-3 text-xs text-muted-foreground"},HS={class:"mt-2"},VS={class:"text-foreground"},US={class:"mt-1"},WS={class:"text-foreground"},GS={key:3,class:"text-sm text-destructive"},KS=ae({__name:"Onboarding",emits:["saved"],setup(e,{emit:t}){const n=t,s=J([]),r=J("anthropic"),i=J("api_key"),o=J(""),a=J(!1),l=J(null),c=G(()=>s.value.find(m=>m.id===r.value)),u=G(()=>{var m;return((m=c.value)==null?void 0:m.supportedAuthMethods.includes("cli_account"))??!1}),d={anthropic:{install:"npm install -g @anthropic-ai/claude-code",login:"claude auth login"},google:{install:"npm install -g @google/gemini-cli",login:"gemini auth login"}};qt(async()=>{s.value=await Ic()});async function f(m){r.value=m;const v=s.value.find(y=>y.id===m);i.value=(v==null?void 0:v.authMethod)??"api_key",l.value=null,Io("setup_provider_selected",{provider_id:m})}async function p(m){i.value=m,l.value=null,c.value&&(Io("setup_auth_method_selected",{provider_id:c.value.id,auth_method:m}),await cv(c.value.id,m))}async function g(){const m=c.value;if(m){l.value=null,a.value=!0;try{if(i.value==="api_key"){const v=await lv(m.id,o.value);if(!v.ok){l.value=v.error||"Could not validate this key.";return}await uv(m.id,o.value)}else{const v=await dv(m.id);if(!v.ok){l.value=v.error||"CLI is not authenticated.";return}}await q2({activeProvider:m.id,activeModel:m.defaultModel}),Io("setup_completed",{provider_id:m.id,auth_method:i.value}),n("saved")}catch(v){l.value=v.message}finally{a.value=!1}}}const h=G(()=>c.value?i.value==="api_key"?!!o.value.trim():!0:!1);return(m,v)=>(P(),Y("div",$S,[I(_(Qg),{class:"w-full max-w-md"},{default:D(()=>[I(_(ev),null,{default:D(()=>[I(ec,{app:"ps",size:40,class:"mb-2"}),I(_(tv),null,{default:D(()=>[...v[3]||(v[3]=[ce("Connect an AI provider",-1)])]),_:1}),I(_(nv),null,{default:D(()=>[...v[4]||(v[4]=[ce(" Use your own API key or sign in with a CLI subscription account. Credentials are stored locally at ",-1),N("code",{class:"text-xs"},"~/.photoshop-mcp/data.db",-1),ce(" and never leave your machine. ",-1)])]),_:1})]),_:1}),I(_(sv),{class:"space-y-4"},{default:D(()=>{var y;return[N("div",FS,[I(_(Hn),null,{default:D(()=>[...v[5]||(v[5]=[ce("Provider",-1)])]),_:1}),N("div",DS,[(P(!0),Y($e,null,es(s.value,x=>(P(),Y("button",{key:x.id,type:"button",class:He(["flex flex-col items-center gap-1.5 rounded-md border px-2 py-3 text-xs font-medium transition",r.value===x.id?"border-primary bg-primary/10 text-primary":"border-input text-muted-foreground hover:bg-accent"]),onClick:k=>f(x.id)},[I(Ui,{provider:x.id,size:22},null,8,["provider"]),ce(" "+fe(x.label),1)],10,LS))),128))])]),u.value?(P(),Y("div",NS,[I(_(Hn),null,{default:D(()=>[...v[6]||(v[6]=[ce("Authentication",-1)])]),_:1}),N("div",qS,[I(_(De),{size:"sm",class:"flex-1",variant:i.value==="api_key"?"default":"outline",onClick:v[0]||(v[0]=x=>p("api_key"))},{default:D(()=>[...v[7]||(v[7]=[ce(" API key ",-1)])]),_:1},8,["variant"]),I(_(De),{size:"sm",class:"flex-1",variant:i.value==="cli_account"?"default":"outline",onClick:v[1]||(v[1]=x=>p("cli_account"))},{default:D(()=>[...v[8]||(v[8]=[ce(" Uses your account ",-1)])]),_:1},8,["variant"])])])):_e("",!0),i.value==="api_key"?(P(),Y($e,{key:1},[N("div",BS,[I(_(Hn),{for:"api-key"},{default:D(()=>[...v[9]||(v[9]=[ce("API key",-1)])]),_:1}),I(_(Qu),{id:"api-key",modelValue:o.value,"onUpdate:modelValue":v[2]||(v[2]=x=>o.value=x),type:"password",placeholder:((y=c.value)==null?void 0:y.apiKeyHint)??"",disabled:a.value,onKeydown:jo(g,["enter"])},null,8,["modelValue","placeholder","disabled"])]),c.value?(P(),Y("a",{key:0,href:c.value.apiKeyHelpUrl,target:"_blank",rel:"noreferrer",class:"inline-flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground"},[v[10]||(v[10]=ce(" Get an API key ",-1)),I(_(cg),{class:"size-3"})],8,zS)):_e("",!0)],64)):c.value&&d[c.value.id]?(P(),Y("div",jS,[v[13]||(v[13]=N("p",{class:"font-medium text-foreground"},"Set up the CLI first",-1)),N("p",HS,[v[11]||(v[11]=ce(" Install: ",-1)),N("code",VS,fe(d[c.value.id].install),1)]),N("p",US,[v[12]||(v[12]=ce(" Login: ",-1)),N("code",WS,fe(d[c.value.id].login),1)]),v[14]||(v[14]=N("p",{class:"mt-2"}," Then click validate — usage counts against your subscription quota, not API billing. ",-1))])):_e("",!0),l.value?(P(),Y("p",GS,fe(l.value),1)):_e("",!0)]}),_:1}),I(_(rv),null,{default:D(()=>[I(_(De),{class:"w-full",disabled:a.value||!h.value,onClick:g},{default:D(()=>[a.value?(P(),ue(_(Kn),{key:0,class:"size-4 animate-spin"})):_e("",!0),ce(" "+fe(a.value?"Validating…":i.value==="api_key"?"Validate & save":"Check connection & continue"),1)]),_:1},8,["disabled"])]),_:1})]),_:1})]))}}),Xc=ae({__name:"Tooltip",props:{defaultOpen:{type:Boolean},open:{type:Boolean},delayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const r=Ss(e,t);return(i,o)=>(P(),ue(_(Jw),Nr(Xs(_(r))),{default:D(()=>[ye(i.$slots,"default")]),_:3},16))}}),Zc=ae({__name:"TooltipContent",props:{forceMount:{type:Boolean},ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{default:6},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},class:{}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const n=e,r=Ss(n,t);return(i,o)=>(P(),ue(_(s2),null,{default:D(()=>[I(_(t2),ut(_(r),{class:_(Et)("z-50 overflow-hidden rounded-md border border-border bg-popover px-3 py-2 text-xs text-popover-foreground 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=closed]:zoom-out-95 data-[state=delayed-open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1","data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1",n.class)}),{default:D(()=>[ye(i.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),Qc=ae({__name:"TooltipProvider",props:{delayDuration:{default:200},skipDelayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean},content:{}},setup(e){const n=Xi(e);return(s,r)=>(P(),ue(_(Gw),Nr(Xs(_(n))),{default:D(()=>[ye(s.$slots,"default")]),_:3},16))}}),ed=ae({__name:"TooltipTrigger",props:{reference:{},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e;return(n,s)=>(P(),ue(_(i2),ut(t,{class:_(Et)(t.class)}),{default:D(()=>[ye(n.$slots,"default")]),_:3},16,["class"]))}}),YS={class:"flex h-14 shrink-0 items-center justify-between gap-3 border-b border-border bg-background/80 px-4 backdrop-blur"},JS={class:"min-w-0 flex-1 truncate text-sm font-medium"},XS={key:0,class:"rounded-md border border-border bg-muted/40 px-2 py-1 text-xs font-medium text-muted-foreground"},ZS={class:"space-y-2"},QS={class:"grid grid-cols-2 gap-x-3 gap-y-1 text-xs"},eC={class:"text-right tabular-nums"},tC={class:"text-right tabular-nums"},nC={class:"text-right tabular-nums"},sC={class:"text-right tabular-nums"},rC={class:"text-right tabular-nums"},iC={class:"border-t border-border pt-2 text-xs"},oC={class:"flex items-center justify-between font-medium"},aC={class:"tabular-nums"},lC={key:0,class:"text-[11px] leading-snug text-muted-foreground"},uC=ae({__name:"StatusBar",props:{chat:{},totals:{},subscriptionMode:{type:Boolean}},setup(e){const t=e,n=new Intl.NumberFormat("en-US");function s(l){return l<=0?"$0.0000":l<1e-4?"< $0.0001":new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:4,maximumFractionDigits:4}).format(l)}function r(l){return n.format(l)}const i=G(()=>{const l=t.totals;return!!(l&&l.assistantTurns>0)}),o=G(()=>{const l=t.totals;return!!(l&&l.assistantTurns>0&&l.pricedTurns<l.assistantTurns)}),a=G(()=>{const l=t.totals;return!l||l.assistantTurns===0||l.pricedTurns===0?null:s(l.totalUsd)});return(l,c)=>{var u;return P(),Y("header",YS,[N("div",JS,fe(((u=e.chat)==null?void 0:u.title)??"New chat"),1),e.chat&&e.subscriptionMode?(P(),Y("span",XS," Included in subscription ")):e.chat&&i.value?(P(),ue(_(Qc),{key:1},{default:D(()=>[I(_(Xc),null,{default:D(()=>[I(_(ed),{class:"rounded-md border border-border bg-muted/40 px-2 py-1 text-xs font-medium tabular-nums text-muted-foreground hover:bg-muted"},{default:D(()=>[ce(fe(a.value??"—"),1)]),_:1}),I(_(Zc),{align:"end",class:"w-64"},{default:D(()=>[N("div",ZS,[c[6]||(c[6]=N("div",{class:"text-[11px] font-semibold uppercase tracking-wide text-muted-foreground"}," Conversation usage ",-1)),N("div",QS,[c[3]||(c[3]=N("span",{class:"text-muted-foreground"},"Input",-1)),N("span",eC,fe(r(e.totals.inputTokens))+" tok · "+fe(s(e.totals.inputUsd)),1),e.totals.cachedReadTokens>0?(P(),Y($e,{key:0},[c[0]||(c[0]=N("span",{class:"text-muted-foreground"},"Cached read",-1)),N("span",tC,fe(r(e.totals.cachedReadTokens))+" tok · "+fe(s(e.totals.cachedReadUsd)),1)],64)):_e("",!0),e.totals.cachedWriteTokens>0?(P(),Y($e,{key:1},[c[1]||(c[1]=N("span",{class:"text-muted-foreground"},"Cached write",-1)),N("span",nC,fe(r(e.totals.cachedWriteTokens))+" tok · "+fe(s(e.totals.cachedWriteUsd)),1)],64)):_e("",!0),c[4]||(c[4]=N("span",{class:"text-muted-foreground"},"Output",-1)),N("span",sC,fe(r(e.totals.outputTokens))+" tok · "+fe(s(e.totals.outputUsd)),1),e.totals.reasoningTokens>0?(P(),Y($e,{key:2},[c[2]||(c[2]=N("span",{class:"text-muted-foreground"},"Reasoning",-1)),N("span",rC,fe(r(e.totals.reasoningTokens))+" tok ",1)],64)):_e("",!0)]),N("div",iC,[N("div",oC,[c[5]||(c[5]=N("span",null,"Total",-1)),N("span",aC,fe(r(e.totals.totalTokens))+" tok · "+fe(s(e.totals.totalUsd)),1)])]),o.value?(P(),Y("p",lC," Some turns lack pricing data, so this total may underestimate cost. ")):_e("",!0)])]),_:1})]),_:1})]),_:1})):_e("",!0)])}}}),cC=Zg("inline-flex items-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 transition-colors",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground",outline:"text-foreground",success:"border-transparent bg-emerald-500/15 text-emerald-500 dark:bg-emerald-500/20",warning:"border-transparent bg-amber-500/15 text-amber-500 dark:bg-amber-500/20"}},defaultVariants:{variant:"default"}}),Dm=ae({__name:"Badge",props:{variant:{},class:{}},setup(e){const t=e;return(n,s)=>(P(),Y("span",{class:He(_(Et)(_(cC)({variant:e.variant}),t.class))},[ye(n.$slots,"default")],2))}}),Ap="mcp__photoshop__";function pa(e){return!e||e==="…"?e:e.startsWith(Ap)?e.slice(Ap.length):e}function dC(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}const fC={key:"text-sky-600 dark:text-sky-400",string:"text-emerald-600 dark:text-emerald-400",number:"text-amber-600 dark:text-amber-400",boolean:"text-purple-600 dark:text-purple-400",null:"text-muted-foreground",punctuation:"text-muted-foreground",whitespace:""};function pC(e){return fC[e]}function hC(e,t){let n=t+1;for(;n<e.length;){if(e[n]==="\\"){n+=2;continue}if(e[n]==='"')return{end:n+1,text:e.slice(t,n+1)};n++}return{end:e.length,text:e.slice(t)}}function gC(e,t){let n=t;for(;n<e.length&&/\s/.test(e[n]);)n++;return e[n]===":"}function vC(e,t){let n=t;for(e[n]==="-"&&n++;n<e.length&&/\d/.test(e[n]);)n++;if(e[n]===".")for(n++;n<e.length&&/\d/.test(e[n]);)n++;if(e[n]==="e"||e[n]==="E")for(n++,(e[n]==="+"||e[n]==="-")&&n++;n<e.length&&/\d/.test(e[n]);)n++;return e.slice(t,n)}function mC(e){const t=[];let n=0;function s(r,i){i&&t.push({type:r,text:i})}for(;n<e.length;){const r=e[n];if(/\s/.test(r)){const i=n;for(;n<e.length&&/\s/.test(e[n]);)n++;s("whitespace",e.slice(i,n));continue}if(r==='"'){const{end:i,text:o}=hC(e,n);if(n=i,gC(e,n)){const a=n;for(;n<e.length&&/\s/.test(e[n]);)n++;e[n]===":"?(n++,s("key",o+e.slice(a,n))):s("string",o)}else s("string",o);continue}if(r==="-"||/\d/.test(r)){const i=vC(e,n);s("number",i),n+=i.length;continue}if(e.startsWith("true",n)){s("boolean","true"),n+=4;continue}if(e.startsWith("false",n)){s("boolean","false"),n+=5;continue}if(e.startsWith("null",n)){s("null","null"),n+=4;continue}if("{}[],:".includes(r)){s("punctuation",r),n++;continue}s("string",r),n++}return t}function _C(e){return mC(dC(e))}const yC={class:"m-0 overflow-x-auto rounded-md bg-muted/40 p-2 font-mono text-[11px] leading-snug"},bC=ae({__name:"JsonHighlight",props:{value:{}},setup(e){const t=e,n=G(()=>_C(t.value));return(s,r)=>(P(),Y("pre",yC,[(P(!0),Y($e,null,es(n.value,(i,o)=>(P(),Y("span",{key:o,class:He(_(pC)(i.type))},fe(i.text),3))),128))]))}}),xC=["aria-label"],wC={class:"mb-4 flex items-start justify-between gap-3"},kC={class:"min-w-0"},EC={class:"truncate font-mono text-sm font-semibold text-foreground"},SC={class:"mt-1.5 flex items-center gap-2"},CC={key:0,class:"mb-4 rounded-md border border-border/60 bg-muted/20 px-3 py-2 text-xs leading-relaxed text-muted-foreground"},PC={class:"space-y-3 text-xs"},AC={key:0},OC={key:1},TC={class:"max-h-64 overflow-auto rounded-md bg-muted/40 p-2 text-[11px] leading-snug"},IC=ae({__name:"ToolCallDetailDialog",props:{open:{type:Boolean},name:{},status:{},input:{},result:{},rationale:{}},emits:["close"],setup(e,{emit:t}){const n=e,s=t;function r(a){a.key==="Escape"&&n.open&&s("close")}qt(()=>window.addEventListener("keydown",r)),Br(()=>window.removeEventListener("keydown",r));function i(){return n.status==="success"||n.status==="done"?"success":n.status==="error"?"destructive":"secondary"}function o(){return n.status==="success"?"success":n.status}return(a,l)=>(P(),ue(bh,{to:"body"},[e.open?(P(),Y("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-background/70 p-4 backdrop-blur",onClick:l[1]||(l[1]=wn(c=>s("close"),["self"]))},[N("div",{class:"max-h-[90vh] w-full max-w-lg overflow-y-auto rounded-xl border border-border bg-card p-5 shadow-lg",role:"dialog","aria-modal":"true","aria-label":_(pa)(e.name)},[N("div",wC,[N("div",kC,[N("h2",EC,fe(_(pa)(e.name)),1),N("div",SC,[e.status==="pending"||e.status==="running"?(P(),ue(_(Kn),{key:0,class:"size-3.5 animate-spin text-muted-foreground"})):_e("",!0),I(_(Dm),{variant:i(),class:"text-[10px] capitalize"},{default:D(()=>[ce(fe(o()),1)]),_:1},8,["variant"])])]),I(_(De),{variant:"ghost",size:"icon",onClick:l[0]||(l[0]=c=>s("close"))},{default:D(()=>[I(_(pg),{class:"size-4"})]),_:1})]),e.rationale?(P(),Y("p",CC,fe(e.rationale),1)):_e("",!0),N("div",PC,[e.input!==void 0?(P(),Y("div",AC,[l[2]||(l[2]=N("div",{class:"mb-1 text-[10px] font-medium uppercase tracking-wide text-muted-foreground"}," Input ",-1)),I(bC,{value:e.input},null,8,["value"])])):_e("",!0),e.result?(P(),Y("div",OC,[l[3]||(l[3]=N("div",{class:"mb-1 text-[10px] font-medium uppercase tracking-wide text-muted-foreground"}," Result ",-1)),N("pre",TC,fe(e.result.content),1)])):_e("",!0)])],8,xC)])):_e("",!0)]))}}),Op={photoshop_create_document:lo,photoshop_open_image:lo,photoshop_save_document:lo,photoshop_close_document:lo,photoshop_get_document_info:Nb,photoshop_get_version:Yb,photoshop_ping:Ab,photoshop_fill_layer:jb,photoshop_flatten_image:Lb,photoshop_undo:Jb,photoshop_redo:Vb,photoshop_get_history:Db,photoshop_get_state:al,photoshop_get_preview:al,photoshop_get_capabilities:al,photoshop_play_action:nf,photoshop_execute_script:nf,photoshop_content_aware_fill:$b,photoshop_deselect:Co,photoshop_invert_selection:Co,photoshop_select_subject:Co,photoshop_list_fonts:fg},RC=[{test:e=>e.startsWith("photoshop_recipe_"),icon:Zb},{test:e=>e.startsWith("photoshop_select_"),icon:Co},{test:e=>e.includes("_mask"),icon:Ib},{test:e=>e.includes("_text"),icon:fg},{test:e=>e.includes("_layer"),icon:qb},{test:e=>e.includes("_blur")||e.includes("apply_noise")||e.includes("apply_sharpen"),icon:nu},{test:e=>e.startsWith("photoshop_adjust_")||e.startsWith("photoshop_auto_")||e==="photoshop_desaturate"||e==="photoshop_invert",icon:Wb},{test:e=>e==="photoshop_resize_image"||e==="photoshop_crop_document"||e==="photoshop_place_image",icon:Rb}];function MC(e){const t=pa(e);if(!t||t==="…")return sf;if(Op[t])return Op[t];for(const{test:n,icon:s}of RC)if(n(t))return s;return sf}const $C=["disabled","aria-label"],FC={key:0,class:"absolute inset-0 flex items-center justify-center rounded-full bg-card/70"},DC={class:"max-w-xs font-mono text-xs"},LC=ae({__name:"ToolCallOrb",props:{name:{},status:{},disabled:{type:Boolean,default:!1},index:{}},emits:["click"],setup(e,{emit:t}){const n=e,s=t,r=G(()=>{const u=pa(n.name);return n.index!==void 0?`${n.index+1}. ${u}`:u}),i=G(()=>MC(n.name)),o=G(()=>n.status==="pending"||n.status==="running"),a=G(()=>n.status==="error"?"border-destructive/60":n.status==="done"||n.status==="success"?"border-emerald-500/60":n.status==="running"?"border-foreground/30":"border-border"),l=G(()=>{const u=n.status==="running"?"running":n.status==="pending"?"pending":n.status==="error"?"failed":"completed";return`${r.value} (${u})`});function c(){n.disabled||s("click")}return(u,d)=>(P(),ue(_(Qc),null,{default:D(()=>[I(_(Xc),null,{default:D(()=>[I(_(ed),{"as-child":""},{default:D(()=>[N("button",{type:"button",disabled:e.disabled,"aria-label":l.value,class:He(["relative flex size-10 shrink-0 items-center justify-center rounded-full border bg-card/80 text-muted-foreground transition-colors hover:bg-muted/60 disabled:cursor-default disabled:opacity-60",a.value]),onClick:c},[(P(),ue(Aa(i.value),{class:He(["size-4",e.name==="…"?"animate-pulse":""])},null,8,["class"])),o.value?(P(),Y("span",FC,[I(_(Kn),{class:"size-3.5 animate-spin text-muted-foreground"})])):_e("",!0)],10,$C)]),_:1}),I(_(Zc),null,{default:D(()=>[N("p",DC,fe(r.value),1)]),_:1})]),_:1})]),_:1}))}}),NC={key:0,class:"max-w-full overflow-x-auto px-3 py-2"},qC={class:"flex flex-wrap gap-3"},Lm=ae({__name:"ToolCallStrip",props:{items:{},showIndex:{type:Boolean}},setup(e){const t=e,n=J(null),s=G(()=>t.items.find(o=>o.id===n.value)??null);function r(o){o.clickable!==!1&&(n.value=o.id)}function i(){n.value=null}return(o,a)=>{var l,c,u,d,f;return P(),Y($e,null,[e.items.length>0?(P(),Y("div",NC,[N("div",qC,[(P(!0),Y($e,null,es(e.items,(p,g)=>(P(),ue(LC,{key:p.id,name:p.name,status:p.status,index:e.showIndex?g:void 0,disabled:p.clickable===!1,onClick:h=>r(p)},null,8,["name","status","index","disabled","onClick"]))),128))])])):_e("",!0),I(IC,{open:s.value!==null,name:((l=s.value)==null?void 0:l.name)??"",status:((c=s.value)==null?void 0:c.status)??"pending",input:(u=s.value)==null?void 0:u.input,result:(d=s.value)==null?void 0:d.result,rationale:(f=s.value)==null?void 0:f.rationale,onClose:i},null,8,["open","name","status","input","result","rationale"])],64)}}});function BC(e){try{const t=JSON.parse(e);if(!t||typeof t!="object"||Array.isArray(t))return;if("ok"in t&&typeof t.ok=="boolean")return t.ok}catch{}}function Nm(e,t){var s;return((s=e.result)!=null&&s.content?BC(e.result.content):void 0)===!1||e.status==="error"||t==="error"?"error":e.status==="success"||t==="done"?"done":t==="running"?"running":e.status==="pending"?"pending":e.status}const zC={class:"rounded-lg border border-border bg-card/50"},jC={class:"space-y-1 border-b border-border px-3 py-2"},HC={class:"flex items-center gap-2 text-xs"},VC={key:0,class:"rounded bg-amber-500/15 px-1 text-[9px] font-semibold uppercase text-amber-600"},UC={class:"ml-auto shrink-0 text-[10px] text-muted-foreground"},WC={class:"text-[11px] leading-snug text-muted-foreground"},GC=ae({__name:"PlanCard",props:{plan:{},toolCalls:{},partial:{type:Boolean}},setup(e){const t=e,n=G(()=>t.plan.steps.filter(r=>r.status==="done").length),s=G(()=>t.plan.steps.map((r,i)=>{var l;const o=(l=t.toolCalls)==null?void 0:l[i],a=r.tool||(o==null?void 0:o.name)||"…";return{id:r.id,name:a,status:o?Nm(o,r.status):r.status,input:o==null?void 0:o.input,result:o==null?void 0:o.result,rationale:r.rationale,clickable:!!(r.tool||o)}}));return(r,i)=>(P(),Y("div",zC,[N("div",jC,[N("div",HC,[I(_(Bb),{class:"size-3.5 shrink-0 text-muted-foreground"}),i[0]||(i[0]=N("span",{class:"font-medium text-foreground"},"Action plan",-1)),e.partial?(P(),Y("span",VC," Draft ")):_e("",!0),N("span",UC,fe(n.value)+"/"+fe(e.plan.steps.length||"…"),1)]),N("p",WC,fe(e.plan.summary||"…"),1)]),I(Lm,{items:s.value,"show-index":""},null,8,["items"])]))}}),KC={key:0,class:"flex flex-col gap-2"},YC={key:0,class:"flex items-center gap-2 text-xs text-muted-foreground"},JC={key:1,class:"rounded-md border border-border/60 bg-muted/20"},XC={key:0,class:"animate-pulse"},ZC={key:0,class:"border-t border-border/60 px-2.5 py-2 text-xs leading-relaxed text-muted-foreground whitespace-pre-wrap"},QC={key:0,class:"ml-0.5 inline-block h-3.5 w-0.5 animate-pulse bg-muted-foreground align-middle"},eP={key:3,class:"rounded-lg border border-border bg-card/50"},tP={key:4,class:"whitespace-pre-wrap text-sm leading-relaxed text-foreground"},nP={key:0,class:"ml-0.5 inline-block h-4 w-0.5 animate-pulse bg-foreground align-middle"},sP=ae({__name:"StreamingMessage",props:{message:{},standaloneToolCalls:{}},setup(e){const t=e,n=J(!1),s=G(()=>{var l;return!!((l=t.message.reasoning)!=null&&l.length)||t.message.isStreaming}),r=G(()=>{var c;const l=t.message.activity;return l?l.phase==="planning"?"Planning…":l.phase==="thinking"?"Thinking…":l.phase==="tool-running"?`Running ${((c=l.detail)==null?void 0:c.replace(/^mcp__photoshop__/,""))??"tool"}…`:null:null}),i=G(()=>!!r.value&&!t.message.text&&!t.message.reasoning&&!t.message.plan),o=G(()=>t.message.isStreaming||!!t.message.text||!!t.message.reasoning||!!t.message.plan||t.message.toolCalls.length>0||!!r.value),a=G(()=>t.standaloneToolCalls.map(l=>({id:l.id,name:l.name,status:Nm(l),input:l.input,result:l.result,clickable:!0})));return(l,c)=>o.value?(P(),Y("div",KC,[i.value?(P(),Y("div",YC,[c[1]||(c[1]=N("span",{class:"inline-block size-1.5 animate-pulse rounded-full bg-muted-foreground"},null,-1)),ce(" "+fe(r.value),1)])):_e("",!0),s.value?(P(),Y("div",JC,[N("button",{type:"button",class:"flex w-full items-center gap-1.5 px-2.5 py-1.5 text-left text-xs text-muted-foreground hover:text-foreground",onClick:c[0]||(c[0]=u=>n.value=!n.value)},[(P(),ue(Aa(n.value?_(ug):_(Tb)),{class:"size-3.5 shrink-0"})),c[2]||(c[2]=N("span",{class:"font-medium"},"Reasoning",-1)),e.message.isStreaming&&!e.message.text?(P(),Y("span",XC,"…")):_e("",!0)]),n.value&&e.message.reasoning?(P(),Y("div",ZC,[ce(fe(e.message.reasoning),1),e.message.isStreaming?(P(),Y("span",QC)):_e("",!0)])):_e("",!0)])):_e("",!0),e.message.plan?(P(),ue(GC,{key:2,plan:e.message.plan,"tool-calls":e.message.toolCalls,partial:e.message.planPartial},null,8,["plan","tool-calls","partial"])):_e("",!0),a.value.length>0?(P(),Y("div",eP,[I(Lm,{items:a.value},null,8,["items"])])):_e("",!0),e.message.text||e.message.isStreaming&&!i.value?(P(),Y("div",tP,[ce(fe(e.message.text),1),e.message.isStreaming?(P(),Y("span",nP)):_e("",!0)])):_e("",!0)])):_e("",!0)}}),rP={class:"mx-auto flex max-w-3xl flex-col gap-6 px-4 py-6 pb-52"},iP={key:0,class:"flex items-start gap-2.5 rounded-lg border border-dashed border-border/60 bg-card/30 px-3 py-2.5"},oP={key:0,class:"flex gap-3 rounded-lg border border-user-message-border bg-user-message-bg px-3 py-2.5 text-user-message-fg"},aP={class:"flex size-7 shrink-0 items-center justify-center rounded-md border border-user-message-border bg-user-message-avatar-bg text-user-message-avatar-fg"},lP={class:"flex min-w-0 flex-1 flex-col gap-1"},uP={key:0,class:"whitespace-pre-wrap text-sm leading-relaxed"},cP={key:1,class:"flex gap-3"},dP={class:"flex size-7 shrink-0 cursor-default items-center justify-center rounded-md border border-border bg-card text-muted-foreground"},fP={class:"text-xs"},pP={key:1,class:"flex size-7 shrink-0 items-center justify-center rounded-md border border-border bg-card text-muted-foreground"},hP={class:"flex min-w-0 flex-1 flex-col gap-2"},gP=ae({__name:"MessageList",props:{messages:{},busy:{type:Boolean},providers:{}},setup(e){const t=e,n=J(null);async function s(){await Dt(),n.value&&(n.value.scrollTop=n.value.scrollHeight)}tt(()=>{var o,a,l,c,u;return[t.messages.length,t.busy,(o=t.messages[t.messages.length-1])==null?void 0:o.text,(a=t.messages[t.messages.length-1])==null?void 0:a.reasoning,(c=(l=t.messages[t.messages.length-1])==null?void 0:l.plan)==null?void 0:c.steps.length,(u=t.messages[t.messages.length-1])==null?void 0:u.isStreaming]},()=>{s()}),qt(s);function r(o){var u;if(!o.provider)return"Assistant";const a=t.providers.find(d=>d.id===o.provider),l=(a==null?void 0:a.label)??o.provider,c=((u=a==null?void 0:a.models.find(d=>d.id===o.model))==null?void 0:u.label)??o.model;return c?`${l} · ${c}`:l}function i(o){return o.plan?o.toolCalls.slice(o.plan.steps.length):o.toolCalls}return(o,a)=>(P(),Y("div",{ref_key:"scroller",ref:n,class:"min-h-0 flex-1 overflow-y-auto"},[N("div",rP,[e.messages.length===0?(P(),Y("div",iP,[I(_(nu),{class:"mt-0.5 size-4 shrink-0 text-muted-foreground"}),a[0]||(a[0]=N("p",{class:"min-w-0 text-xs leading-relaxed text-muted-foreground"},[N("span",{class:"font-medium text-foreground"},"Describe a Photoshop task"),ce(` — e.g. "Create a 1920×1080 doc, add 'Hello' text, save as hello.psd on Desktop." `)],-1))])):_e("",!0),(P(!0),Y($e,null,es(e.messages,l=>(P(),Y($e,{key:l.id},[l.role==="user"?(P(),Y("div",oP,[N("div",aP,[I(_(Xb),{class:"size-4"})]),N("div",lP,[a[1]||(a[1]=N("div",{class:"text-xs font-medium text-user-message-muted"},"You",-1)),l.text?(P(),Y("div",uP,fe(l.text),1)):_e("",!0)])])):(P(),Y("div",cP,[l.provider?(P(),ue(_(Qc),{key:0},{default:D(()=>[I(_(Xc),null,{default:D(()=>[I(_(ed),{"as-child":""},{default:D(()=>[N("div",dP,[I(Ui,{provider:l.provider,size:16},null,8,["provider"])])]),_:2},1024),I(_(Zc),null,{default:D(()=>[N("p",fP,fe(r(l)),1)]),_:2},1024)]),_:2},1024)]),_:2},1024)):(P(),Y("div",pP,[I(_(nu),{class:"size-4"})])),N("div",hP,[I(sP,{message:l,"standalone-tool-calls":i(l)},null,8,["message","standalone-tool-calls"])])]))],64))),128))])],512))}});function vr(e){const t=Number.parseFloat(e);return Number.isFinite(t)?t:0}function vP(e){const t=getComputedStyle(e),n=vr(t.lineHeight);if(n>0)return n;const s=vr(t.fontSize);return s>0?s*1.5:20}function mP(e,t={}){const n=t.minLines??3,s=t.maxLines??50;function r(){const o=e.value;if(!o)return;const a=vP(o),l=getComputedStyle(o),c=vr(l.paddingTop)+vr(l.paddingBottom)+vr(l.borderTopWidth)+vr(l.borderBottomWidth),u=a*n+c,d=a*s+c;o.style.height="0px";const f=o.scrollHeight,p=Math.min(Math.max(f,u),d);o.style.height=`${p}px`,o.style.overflowY=f>d?"auto":"hidden"}function i(){r()}return qt(()=>{Dt(r)}),t.watch&&tt(t.watch,()=>{Dt(r)}),{onInput:i,resize:r}}const _P={class:"mx-auto w-full max-w-3xl shrink-0 px-4 py-3"},yP={class:"overflow-hidden rounded-2xl border border-white/10 bg-white/[0.06] shadow-lg backdrop-blur-2xl backdrop-saturate-150 transition-shadow focus-within:border-white/20 focus-within:ring-1 focus-within:ring-white/10"},bP=["disabled"],xP={class:"flex items-center justify-between gap-2 px-2 pb-2"},wP={class:"min-w-0 flex-1"},kP=ae({__name:"Composer",props:{busy:{type:Boolean},disabled:{type:Boolean}},emits:["send","abort"],setup(e,{emit:t}){const n=e,s=t,r=J(""),i=J(null),{onInput:o,resize:a}=mP(i,{minLines:3,maxLines:50,watch:r});function l(u){u.key==="Enter"&&!u.shiftKey&&!u.isComposing&&(u.preventDefault(),c())}async function c(){const u=r.value.trim();!u||n.busy||n.disabled||(s("send",u),r.value="",await Dt(a))}return(u,d)=>(P(),Y("div",_P,[N("div",yP,[uc(N("textarea",{ref_key:"textareaRef",ref:i,"onUpdate:modelValue":d[0]||(d[0]=f=>r.value=f),disabled:e.busy||e.disabled,placeholder:"Describe what you want the agent to do in Photoshop…",class:"block w-full resize-none border-0 bg-transparent px-4 pt-3 pb-1 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-0 disabled:cursor-not-allowed disabled:opacity-60",onInput:d[1]||(d[1]=(...f)=>_(o)&&_(o)(...f)),onKeydown:l},null,40,bP),[[zo,r.value]]),N("div",xP,[N("div",wP,[ye(u.$slots,"actions")]),e.busy?(P(),ue(_(De),{key:1,size:"icon",variant:"secondary",class:"size-8 rounded-full",onClick:d[2]||(d[2]=f=>s("abort"))},{default:D(()=>[I(_(Gb),{class:"size-3.5"})]),_:1})):(P(),ue(_(De),{key:0,size:"icon",disabled:!r.value.trim()||e.disabled,class:"size-8 rounded-full disabled:opacity-40",onClick:c},{default:D(()=>[I(_(Ob),{class:"size-4"})]),_:1},8,["disabled"]))])]),d[3]||(d[3]=N("p",{class:"mt-2 text-center text-[11px] text-muted-foreground"},[ce(" Press "),N("kbd",{class:"rounded border border-border px-1 py-px text-[10px]"},"Enter"),ce(" to send · "),N("kbd",{class:"rounded border border-border px-1 py-px text-[10px]"},"Shift+Enter"),ce(" for newline ")],-1))]))}}),qm=ae({__name:"Popover",props:{defaultOpen:{type:Boolean},open:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const r=Ss(e,t);return(i,o)=>(P(),ue(_(ww),Nr(Xs(_(r))),{default:D(()=>[ye(i.$slots,"default")]),_:3},16))}}),Bm=ae({__name:"PopoverTrigger",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e;return(n,s)=>(P(),ue(_(Mw),ut(t,{class:_(Et)(t.class)}),{default:D(()=>[ye(n.$slots,"default")]),_:3},16,["class"]))}}),zm=ae({__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:{}},setup(e){const t=e;return(n,s)=>(P(),ue(_(Iw),null,{default:D(()=>[I(_(Ow),ut(t,{class:_(Et)("z-50 w-72 rounded-md border border-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","data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2","data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t.class)}),{default:D(()=>[ye(n.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),EP={class:"font-normal"},SP={class:"font-medium text-foreground"},CP={class:"max-h-96 overflow-y-auto"},PP={class:"flex items-center justify-between gap-2 bg-muted/50 px-3 py-1.5 text-xs font-medium text-muted-foreground"},AP={class:"inline-flex items-center gap-1.5"},OP={key:0,class:"inline-flex items-center gap-1 text-[10px] text-muted-foreground/80"},TP={class:"py-1"},IP=["onClick"],RP={class:"min-w-0 flex-1"},MP={class:"truncate font-medium"},$P=ae({__name:"ModelSelector",props:{providers:{},currentProvider:{},currentModel:{},disabled:{type:Boolean}},emits:["update:provider","update:model","open-settings"],setup(e,{emit:t}){const n=e,s=t,r=J(!1),i=G(()=>n.providers.find(l=>l.id===n.currentProvider)),o=G(()=>{var l;return(l=i.value)==null?void 0:l.models.find(c=>c.id===n.currentModel)});function a(l,c){if(!l.isAuthenticated){r.value=!1,s("open-settings");return}l.id!==n.currentProvider&&s("update:provider",l.id),c.id!==n.currentModel&&s("update:model",c.id),r.value=!1}return(l,c)=>(P(),ue(_(qm),{open:r.value,"onUpdate:open":c[0]||(c[0]=u=>r.value=u)},{default:D(()=>[I(_(Bm),{"as-child":""},{default:D(()=>[I(_(De),{variant:"ghost",size:"sm",disabled:e.disabled,class:"h-7 gap-1.5 px-2 text-xs text-muted-foreground hover:bg-transparent hover:text-foreground"},{default:D(()=>{var u;return[I(Ui,{provider:e.currentProvider,size:14},null,8,["provider"]),N("span",EP,[c[1]||(c[1]=ce(" Model: ",-1)),N("span",SP,fe(((u=o.value)==null?void 0:u.label)??"Select model"),1)]),I(_(ug),{class:"size-3.5 opacity-50"})]}),_:1},8,["disabled"])]),_:1}),I(_(zm),{class:"w-80 p-0",align:"start",side:"top"},{default:D(()=>[N("div",CP,[(P(!0),Y($e,null,es(e.providers,u=>(P(),Y("div",{key:u.id,class:"border-b border-border/50 last:border-0"},[N("div",PP,[N("span",AP,[I(Ui,{provider:u.id,size:14},null,8,["provider"]),ce(" "+fe(u.label),1)]),u.isAuthenticated?_e("",!0):(P(),Y("span",OP,[I(_(tf),{class:"size-3"}),ce(" "+fe(u.authMethod==="cli_account"?"Connect account":"Add API key"),1)]))]),N("div",TP,[(P(!0),Y($e,null,es(u.models,d=>(P(),Y("button",{key:d.id,type:"button",class:He(["flex w-full items-center gap-2 px-3 py-2 text-left text-sm",[u.isAuthenticated?"hover:bg-accent":"opacity-50 hover:bg-muted/30",u.id===e.currentProvider&&d.id===e.currentModel?"bg-accent":""]]),onClick:f=>a(u,d)},[u.isAuthenticated?(P(),ue(_(lg),{key:0,class:He(["size-4 shrink-0",u.id===e.currentProvider&&d.id===e.currentModel?"opacity-100":"opacity-0"])},null,8,["class"])):(P(),ue(_(tf),{key:1,class:"size-3.5 shrink-0 text-muted-foreground"})),N("div",RP,[N("div",MP,fe(d.label),1)])],10,IP))),128))])]))),128))])]),_:1})]),_:1},8,["open"]))}}),FP={class:"flex h-screen flex-col"},DP={key:0,class:"flex flex-1 flex-col items-center justify-center gap-3 p-8 text-center"},LP={key:1,class:"relative flex min-h-0 flex-1 flex-col overflow-hidden"},NP={class:"pointer-events-none absolute inset-x-0 bottom-0 z-10"},qP={key:0,class:"pointer-events-auto border-t border-destructive/40 bg-destructive/10 px-4 py-2 text-center text-xs text-destructive backdrop-blur-sm"},BP={class:"flex items-center gap-1"},zP=ae({__name:"ChatView",props:{providers:{},store:{},settingsOpen:{type:Boolean},actionPlanBeta:{type:Boolean},hasApiKey:{type:Boolean}},emits:["new-chat","open-settings"],setup(e,{emit:t}){const n=e,s=t,r=J(n.actionPlanBeta);tt(()=>n.actionPlanBeta,f=>{r.value=f});async function i(){const f=!r.value;r.value=f;try{await B2(f),await ws()}catch{r.value=!f}}const o=G(()=>{const f=n.store.activeChatId.value;return f?n.store.chats.value.find(p=>p.id===f)??null:null}),a=G(()=>{const f=o.value;return f?n.providers.find(p=>p.id===f.provider)??null:null}),l=G(()=>{var f;return((f=a.value)==null?void 0:f.authMethod)==="cli_account"}),c=G(()=>n.hasApiKey||!l.value);async function u(f){const p=o.value;p&&(await Pf(p.id,{provider:f}),await n.store.loadChats())}async function d(f){const p=o.value;p&&(await Pf(p.id,{model:f}),await n.store.loadChats())}return(f,p)=>(P(),Y("div",FP,[I(uC,{chat:o.value,totals:o.value?n.store.chatTotals.value:null,"subscription-mode":l.value},null,8,["chat","totals","subscription-mode"]),o.value?(P(),Y("div",LP,[I(gP,{messages:n.store.messages,busy:n.store.sending.value,providers:n.providers},null,8,["messages","busy","providers"]),N("div",NP,[n.store.error.value?(P(),Y("div",qP,fe(n.store.error.value),1)):_e("",!0),I(kP,{class:"pointer-events-auto",busy:n.store.sending.value,onSend:p[2]||(p[2]=g=>n.store.send(g)),onAbort:n.store.abort},{actions:D(()=>[N("div",BP,[I($P,{providers:n.providers,"current-provider":o.value.provider,"current-model":o.value.model,disabled:n.store.sending.value,"onUpdate:provider":u,"onUpdate:model":d,onOpenSettings:p[1]||(p[1]=g=>s("open-settings"))},null,8,["providers","current-provider","current-model","disabled"]),I(_(De),{variant:"ghost",size:"sm",disabled:n.store.sending.value||!c.value,title:c.value?l.value?"Uses your stored API key to plan all steps in one call, then executes them directly.":"Beta: plan all Photoshop steps in one call, then execute them in a single pass.":"Action Plan needs an API key for the planning call. Add one in Settings.",class:He(["h-7 gap-1.5 px-2 text-xs hover:bg-white/5",r.value?"text-foreground":"text-muted-foreground hover:text-foreground"]),onClick:i},{default:D(()=>[I(_(Fb),{class:He(["size-3.5",r.value?"text-amber-500":""])},null,8,["class"]),p[5]||(p[5]=ce(" Action Plan ",-1)),N("span",{class:He(["rounded px-1 text-[9px] font-semibold uppercase",r.value?"bg-amber-500/15 text-amber-600":"bg-white/10 text-muted-foreground"])},fe(r.value?"On":"Beta"),3)]),_:1},8,["disabled","title","class"])])]),_:1},8,["busy","onAbort"])])])):(P(),Y("div",DP,[p[4]||(p[4]=N("p",{class:"text-sm text-muted-foreground"},"Select a chat from the sidebar or start a new one.",-1)),I(_(De),{onClick:p[0]||(p[0]=g=>s("new-chat"))},{default:D(()=>[I(_(dg),{class:"size-4"}),p[3]||(p[3]=ce(" New chat ",-1))]),_:1})]))]))}}),jP={class:"flex h-14 shrink-0 items-center gap-2 border-b border-border px-3"},HP={class:"flex items-center gap-2 rounded-md transition-colors hover:bg-accent/50 p-1 -ml-1",title:"Adobe Creative Cloud Apps"},VP={class:"space-y-3"},UP={class:"grid grid-cols-3 gap-2"},WP=["disabled"],GP={class:"text-xs text-center"},KP={class:"px-3 pt-3"},YP={class:"scrollbar-none mt-3 min-h-0 flex-1 overflow-y-auto px-2"},JP={key:0,class:"px-2 py-6 text-center text-xs text-muted-foreground"},XP={key:1,class:"space-y-0.5"},ZP=["onClick"],QP={class:"min-w-0 flex-1"},eA=["onBlur","onKeydown"],tA=["title"],nA={class:"text-[10px] text-muted-foreground"},sA=["onClick"],rA=["onClick"],iA=["onClick"],oA={class:"border-t border-border p-2"},aA=ae({__name:"Sidebar",props:{chats:{},activeChatId:{}},emits:["new-chat","select","rename","delete","open-settings"],setup(e,{emit:t}){const n=e,s=t,r=J(null),i=J(null),o=J(""),a=[{id:"ps",name:"Photoshop",active:!0},{id:"ai",name:"Illustrator",active:!1},{id:"ae",name:"After Effects",active:!1},{id:"pr",name:"Premiere Pro",active:!1},{id:"id",name:"InDesign",active:!1},{id:"xd",name:"XD",active:!1},{id:"lr",name:"Lightroom",active:!1}];function l(g,h){h.stopPropagation(),r.value=r.value===g?null:g}function c(g,h){h.stopPropagation(),i.value=g.id,o.value=g.title,r.value=null}function u(g){const h=o.value.trim();h&&s("rename",g,h),i.value=null}function d(){i.value=null}function f(g,h){h.stopPropagation(),r.value=null,s("delete",g)}function p(g){const h=new Date(g),m=new Date;return h.toDateString()===m.toDateString()?h.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"}):h.toLocaleDateString(void 0,{month:"short",day:"numeric"})}return(g,h)=>(P(),Y("aside",{class:"flex h-screen w-[260px] shrink-0 flex-col border-r border-border bg-card/40",onClick:h[5]||(h[5]=m=>r.value=null)},[N("div",jP,[I(_(qm),null,{default:D(()=>[I(_(Bm),{"as-child":""},{default:D(()=>[N("button",HP,[I(ec,{app:"ps",size:28}),h[6]||(h[6]=N("span",{class:"text-sm font-semibold"},"Photoshop MCP",-1))])]),_:1}),I(_(zm),{align:"start",class:"w-80"},{default:D(()=>[N("div",VP,[h[8]||(h[8]=N("div",null,[N("h4",{class:"text-sm font-semibold mb-1"},"Adobe Creative Cloud"),N("p",{class:"text-xs text-muted-foreground"}," MCP integrations for Adobe applications ")],-1)),N("div",UP,[(P(),Y($e,null,es(a,m=>N("button",{key:m.id,disabled:!m.active,class:He(["group relative flex flex-col items-center gap-2 rounded-lg border border-border p-3 transition-all hover:border-primary/50 disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:border-border",{"border-primary bg-primary/5":m.active}])},[I(ec,{app:m.id,size:32},null,8,["app"]),N("span",GP,fe(m.name),1),m.active?_e("",!0):(P(),ue(_(Dm),{key:0,variant:"secondary",class:"absolute -top-1 -right-1 text-[9px] px-1 py-0 h-4"},{default:D(()=>[...h[7]||(h[7]=[ce(" Soon ",-1)])]),_:1}))],10,WP)),64))])])]),_:1})]),_:1})]),N("div",KP,[I(_(De),{class:"w-full justify-start gap-2 border-dashed",variant:"outline",onClick:h[0]||(h[0]=m=>s("new-chat"))},{default:D(()=>[I(_(dg),{class:"size-4"}),h[9]||(h[9]=ce(" New chat ",-1))]),_:1})]),N("div",YP,[n.chats.length===0?(P(),Y("div",JP," No chats yet. ")):(P(),Y("div",XP,[(P(!0),Y($e,null,es(n.chats,m=>(P(),Y("div",{key:m.id,class:He(["group relative flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-sm hover:bg-accent",{"bg-accent":m.id===n.activeChatId}]),onClick:v=>s("select",m.id)},[N("div",QP,[i.value===m.id?uc((P(),Y("input",{key:0,"onUpdate:modelValue":h[1]||(h[1]=v=>o.value=v),class:"w-full rounded border border-input bg-background px-1 py-0.5 text-sm focus:outline-none focus:ring-1 focus:ring-ring",autofocus:"",onClick:h[2]||(h[2]=wn(()=>{},["stop"])),onBlur:v=>u(m.id),onKeydown:[jo(wn(v=>u(m.id),["prevent"]),["enter"]),jo(wn(d,["prevent"]),["escape"])]},null,40,eA)),[[zo,o.value]]):(P(),Y("div",{key:1,class:"truncate",title:m.title},fe(m.title),9,tA)),N("div",nA,fe(p(m.updatedAt))+" · "+fe(m.provider),1)]),N("button",{class:He(["invisible flex size-6 items-center justify-center rounded text-muted-foreground hover:bg-background group-hover:visible",{visible:r.value===m.id}]),onClick:v=>l(m.id,v)},[I(_(Mb),{class:"size-3.5"})],10,sA),r.value===m.id?(P(),Y("div",{key:0,class:"absolute right-1 top-9 z-10 w-32 rounded-md border border-border bg-popover p-1 text-sm shadow-md",onClick:h[3]||(h[3]=wn(()=>{},["stop"]))},[N("button",{class:"flex w-full items-center gap-2 rounded px-2 py-1 text-left hover:bg-accent",onClick:v=>c(m,v)},[I(_(Hb),{class:"size-3.5"}),h[10]||(h[10]=ce(" Rename ",-1))],8,rA),N("button",{class:"flex w-full items-center gap-2 rounded px-2 py-1 text-left text-destructive hover:bg-destructive/10",onClick:v=>f(m.id,v)},[I(_(su),{class:"size-3.5"}),h[11]||(h[11]=ce(" Delete ",-1))],8,iA)])):_e("",!0)],10,ZP))),128))]))]),N("div",oA,[I(_(De),{variant:"ghost",size:"sm",class:"w-full justify-start gap-2",onClick:h[4]||(h[4]=m=>s("open-settings"))},{default:D(()=>[I(_(Ub),{class:"size-4"}),h[12]||(h[12]=ce(" Settings ",-1))]),_:1}),h[13]||(h[13]=N("div",{class:"my-2 border-t border-border"},null,-1)),h[14]||(h[14]=N("p",{class:"text-center text-[11px] text-muted-foreground"},[ce(" by "),N("a",{href:"https://github.com/alisaitteke",target:"_blank",rel:"noopener noreferrer",class:"transition-colors hover:text-foreground"}," @alisaitteke ")],-1))])]))}}),lA=ae({__name:"Tabs",props:{defaultValue:{},orientation:{},dir:{},activationMode:{},modelValue:{},unmountOnHide:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["update:modelValue"],setup(e,{emit:t}){const r=Ss(e,t);return(i,o)=>(P(),ue(_(Nw),Nr(Xs(_(r))),{default:D(()=>[ye(i.$slots,"default")]),_:3},16))}}),Tp=ae({__name:"TabsContent",props:{value:{},forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=$a(t,"class");return(s,r)=>(P(),ue(_(Bw),ut({class:_(Et)("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t.class)},_(n)),{default:D(()=>[ye(s.$slots,"default")]),_:3},16,["class"]))}}),uA=ae({__name:"TabsList",props:{loop:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=$a(t,"class");return(s,r)=>(P(),ue(_(jw),ut(_(n),{class:_(Et)("inline-flex items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",t.class)}),{default:D(()=>[ye(s.$slots,"default")]),_:3},16,["class"]))}}),cA={class:"truncate"},Ip=ae({__name:"TabsTrigger",props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=$a(t,"class"),s=Xi(n);return(r,i)=>(P(),ue(_(Vw),ut(_(s),{class:_(Et)("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 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-sm",t.class)}),{default:D(()=>[N("span",cA,[ye(r.$slots,"default")])]),_:3},16,["class"]))}}),dA={class:"max-h-[90vh] w-full max-w-lg overflow-y-auto rounded-xl border border-border bg-card p-5 shadow-lg"},fA={class:"mb-4 flex items-center justify-between"},pA={class:"space-y-2"},hA={class:"flex gap-2"},gA={class:"space-y-2"},vA={class:"flex gap-2"},mA={key:0,class:"space-y-2"},_A={class:"flex gap-2"},yA={class:"space-y-2"},bA={class:"text-sm"},xA={class:"flex gap-2"},wA={key:0,class:"text-xs text-muted-foreground"},kA={key:2,class:"text-xs text-destructive"},EA={key:0,class:"flex items-center justify-center gap-2 rounded-lg border border-border py-10 text-sm text-muted-foreground"},SA={class:"mb-2 flex items-center justify-between"},CA={class:"flex items-center gap-2"},PA={class:"text-sm font-semibold"},AA={key:0,class:"inline-flex items-center gap-1 rounded-full bg-emerald-500/10 px-2 py-0.5 text-[10px] text-emerald-600 dark:text-emerald-400"},OA=["href"],TA={key:0,class:"mb-3 space-y-2"},IA={class:"flex gap-2"},RA={key:1,class:"flex items-center gap-2"},MA={key:2,class:"space-y-2"},$A={key:0,class:"rounded-md bg-muted/40 p-2 text-[11px] text-muted-foreground"},FA={class:"text-foreground"},DA={class:"mt-1"},LA={class:"text-foreground"},NA={class:"space-y-1"},qA={key:3,class:"mt-2 text-xs text-destructive"},BA={class:"mt-6 flex justify-end"},zA=ae({__name:"SettingsDialog",props:{chatCount:{},clearingHistory:{type:Boolean},clearHistoryError:{}},emits:["close","saved","clear-history"],setup(e,{emit:t}){const n=e,s=t,{theme:r,setTheme:i}=X2(),o=J([]),a=J(!0),l=J({}),c=J({}),u=J({}),d=J({}),f=J(!1),p=J(null),g=J(!1),h=J(!1),m=J(!1),v=J(!1),y={anthropic:{install:"npm install -g @anthropic-ai/claude-code",login:"claude auth login"},google:{install:"npm install -g @google/gemini-cli",login:"gemini auth login"}};async function x(){a.value=!0;try{o.value=await Ic();for(const A of o.value)A.cliPath&&(c.value[A.id]=A.cliPath);g.value=await Fm();const $=await to();m.value=$.betaTelemetryOptIn}finally{a.value=!1}}qt(x);async function k($,A){if($.authMethod!==A){d.value[$.id]=null,u.value[$.id]=!0;try{await cv($.id,A),await x(),s("saved")}catch(L){d.value[$.id]=L.message}finally{u.value[$.id]=!1}}}async function O($){var L;const A=(L=l.value[$.id])==null?void 0:L.trim();if(A){d.value[$.id]=null,u.value[$.id]=!0;try{const de=await lv($.id,A);if(!de.ok){d.value[$.id]=de.error||"Invalid key";return}await uv($.id,A),l.value[$.id]="",await x(),s("saved")}catch(de){d.value[$.id]=de.message}finally{u.value[$.id]=!1}}}async function q($){u.value[$.id]=!0;try{await j2($.id),await x(),s("saved")}finally{u.value[$.id]=!1}}async function E($){var A;d.value[$.id]=null,u.value[$.id]=!0;try{const L=(A=c.value[$.id])==null?void 0:A.trim();L&&await H2($.id,L);const de=await dv($.id);if(!de.ok){d.value[$.id]=de.error||"CLI not authenticated";return}await x(),s("saved")}catch(L){d.value[$.id]=L.message}finally{u.value[$.id]=!1}}function R($){return $.supportedAuthMethods.includes("cli_account")}function T($){return $.cliBinaryName?`/usr/local/bin/${$.cliBinaryName}`:"Optional custom path"}function K(){n.chatCount===0||n.clearingHistory||(p.value=null,f.value=!0)}function U(){f.value=!1}async function C($){if(!(g.value===$||h.value)){h.value=!0,p.value=null;try{await bS(!$),g.value=$,$||(m.value=!1)}catch(A){p.value=A.message}finally{h.value=!1}}}async function F($){if(!(!g.value||m.value===$||v.value)){v.value=!0,p.value=null;try{await av($),m.value=$,await ws()}catch(A){p.value=A.message}finally{v.value=!1}}}function V($){i($),ws()}function X(){f.value=!1,s("clear-history")}return tt(()=>n.clearHistoryError,$=>{$&&(p.value=$)}),($,A)=>(P(),Y("div",{class:"fixed inset-0 z-50 flex items-center justify-center bg-background/70 p-4 backdrop-blur",onClick:A[8]||(A[8]=wn(L=>s("close"),["self"]))},[N("div",dA,[N("div",fA,[A[9]||(A[9]=N("h2",{class:"text-base font-semibold"},"Settings",-1)),I(_(De),{variant:"ghost",size:"icon",onClick:A[0]||(A[0]=L=>s("close"))},{default:D(()=>[I(_(pg),{class:"size-4"})]),_:1})]),I(_(lA),{"default-value":"general"},{default:D(()=>[I(_(uA),{class:"mb-4 grid w-full grid-cols-2"},{default:D(()=>[I(_(Ip),{value:"general"},{default:D(()=>[...A[10]||(A[10]=[ce("General",-1)])]),_:1}),I(_(Ip),{value:"providers"},{default:D(()=>[...A[11]||(A[11]=[ce("Providers",-1)])]),_:1})]),_:1}),I(_(Tp),{value:"general",class:"space-y-6"},{default:D(()=>[N("div",pA,[I(_(Hn),null,{default:D(()=>[...A[12]||(A[12]=[ce("Theme",-1)])]),_:1}),N("div",hA,[I(_(De),{size:"sm",variant:_(r)==="light"?"default":"outline",onClick:A[1]||(A[1]=L=>V("light"))},{default:D(()=>[I(_(Kb),{class:"size-4"}),A[13]||(A[13]=ce(" Light ",-1))]),_:1},8,["variant"]),I(_(De),{size:"sm",variant:_(r)==="dark"?"default":"outline",onClick:A[2]||(A[2]=L=>V("dark"))},{default:D(()=>[I(_(zb),{class:"size-4"}),A[14]||(A[14]=ce(" Dark ",-1))]),_:1},8,["variant"])])]),N("div",gA,[I(_(Hn),null,{default:D(()=>[...A[15]||(A[15]=[ce("Privacy mode",-1)])]),_:1}),A[18]||(A[18]=N("p",{class:"text-xs text-muted-foreground"}," When on, anonymous usage analytics are disabled. No API keys, chat content, or account identifiers are collected. ",-1)),N("div",vA,[I(_(De),{size:"sm",variant:g.value?"outline":"default",disabled:h.value,onClick:A[3]||(A[3]=L=>C(!1))},{default:D(()=>[...A[16]||(A[16]=[ce(" On ",-1)])]),_:1},8,["variant","disabled"]),I(_(De),{size:"sm",variant:g.value?"default":"outline",disabled:h.value,onClick:A[4]||(A[4]=L=>C(!0))},{default:D(()=>[...A[17]||(A[17]=[ce(" Off ",-1)])]),_:1},8,["variant","disabled"])])]),g.value?(P(),Y("div",mA,[I(_(Hn),null,{default:D(()=>[...A[19]||(A[19]=[ce("Beta team content sharing",-1)])]),_:1}),A[22]||(A[22]=N("p",{class:"text-xs text-muted-foreground"}," When enabled, prompts, AI responses, reasoning, and tool names are shared to help improve the product. Tool arguments, results, and file paths are never included. ",-1)),N("div",_A,[I(_(De),{size:"sm",variant:m.value?"default":"outline",disabled:v.value,onClick:A[5]||(A[5]=L=>F(!0))},{default:D(()=>[...A[20]||(A[20]=[ce(" On ",-1)])]),_:1},8,["variant","disabled"]),I(_(De),{size:"sm",variant:m.value?"outline":"default",disabled:v.value,onClick:A[6]||(A[6]=L=>F(!1))},{default:D(()=>[...A[21]||(A[21]=[ce(" Off ",-1)])]),_:1},8,["variant","disabled"])])])):_e("",!0),N("div",yA,[I(_(Hn),null,{default:D(()=>[...A[23]||(A[23]=[ce("Chat history",-1)])]),_:1}),A[26]||(A[26]=N("p",{class:"text-xs text-muted-foreground"}," Permanently delete all conversations. ",-1)),f.value?(P(),Y($e,{key:0},[N("p",bA," Delete "+fe(e.chatCount)+" chat"+fe(e.chatCount===1?"":"s")+"? This cannot be undone. ",1),N("div",xA,[I(_(De),{variant:"destructive",size:"sm",disabled:e.clearingHistory,onClick:X},{default:D(()=>[e.clearingHistory?(P(),ue(_(Kn),{key:0,class:"size-4 animate-spin"})):_e("",!0),ce(" "+fe(e.clearingHistory?"Deleting…":"Confirm delete"),1)]),_:1},8,["disabled"]),I(_(De),{variant:"outline",size:"sm",disabled:e.clearingHistory,onClick:U},{default:D(()=>[...A[24]||(A[24]=[ce(" Cancel ",-1)])]),_:1},8,["disabled"])])],64)):(P(),Y($e,{key:1},[I(_(De),{variant:"outline",size:"sm",class:"text-destructive hover:text-destructive",disabled:e.chatCount===0||e.clearingHistory,onClick:K},{default:D(()=>[I(_(su),{class:"size-4"}),A[25]||(A[25]=ce(" Clear all chats ",-1))]),_:1},8,["disabled"]),e.chatCount===0?(P(),Y("p",wA," No chats to delete. ")):_e("",!0)],64)),p.value?(P(),Y("p",kA,fe(p.value),1)):_e("",!0)])]),_:1}),I(_(Tp),{value:"providers",class:"space-y-4"},{default:D(()=>[a.value?(P(),Y("div",EA,[I(_(Kn),{class:"size-4 animate-spin"}),A[27]||(A[27]=ce(" Loading providers… ",-1))])):(P(!0),Y($e,{key:1},es(o.value,L=>(P(),Y("div",{key:L.id,class:"rounded-lg border border-border p-3"},[N("div",SA,[N("div",CA,[I(Ui,{provider:L.id,size:18},null,8,["provider"]),N("span",PA,fe(L.label),1),L.isAuthenticated?(P(),Y("span",AA,[I(_(lg),{class:"size-3"}),ce(" "+fe(L.authMethod==="cli_account"?L.accountLabel||"Account connected":L.apiKeyMasked),1)])):_e("",!0)]),L.authMethod==="api_key"?(P(),Y("a",{key:0,href:L.apiKeyHelpUrl,target:"_blank",rel:"noreferrer",class:"inline-flex items-center gap-1 text-[11px] text-muted-foreground hover:text-foreground"},[A[28]||(A[28]=ce(" Get key ",-1)),I(_(cg),{class:"size-3"})],8,OA)):_e("",!0)]),R(L)?(P(),Y("div",TA,[I(_(Hn),{class:"text-xs text-muted-foreground"},{default:D(()=>[...A[29]||(A[29]=[ce("Authentication",-1)])]),_:1}),N("div",IA,[I(_(De),{size:"sm",variant:L.authMethod==="api_key"?"default":"outline",disabled:u.value[L.id],onClick:de=>k(L,"api_key")},{default:D(()=>[...A[30]||(A[30]=[ce(" API key ",-1)])]),_:1},8,["variant","disabled","onClick"]),I(_(De),{size:"sm",variant:L.authMethod==="cli_account"?"default":"outline",disabled:u.value[L.id],onClick:de=>k(L,"cli_account")},{default:D(()=>[...A[31]||(A[31]=[ce(" Uses your account ",-1)])]),_:1},8,["variant","disabled","onClick"])])])):_e("",!0),L.authMethod==="api_key"?(P(),Y("div",RA,[I(_(Qu),{modelValue:l.value[L.id],"onUpdate:modelValue":de=>l.value[L.id]=de,type:"password",placeholder:L.hasApiKey?"Replace key…":L.apiKeyHint,disabled:u.value[L.id]},null,8,["modelValue","onUpdate:modelValue","placeholder","disabled"]),I(_(De),{size:"sm",disabled:u.value[L.id]||!l.value[L.id],onClick:de=>O(L)},{default:D(()=>[u.value[L.id]?(P(),ue(_(Kn),{key:0,class:"size-4 animate-spin"})):_e("",!0),ce(" "+fe(u.value[L.id]?"…":"Save"),1)]),_:2},1032,["disabled","onClick"]),L.hasApiKey?(P(),ue(_(De),{key:0,size:"icon",variant:"ghost",disabled:u.value[L.id],onClick:de=>q(L)},{default:D(()=>[I(_(su),{class:"size-4 text-muted-foreground"})]),_:1},8,["disabled","onClick"])):_e("",!0)])):(P(),Y("div",MA,[y[L.id]?(P(),Y("div",$A,[N("p",null,[A[32]||(A[32]=ce(" Install: ",-1)),N("code",FA,fe(y[L.id].install),1)]),N("p",DA,[A[33]||(A[33]=ce(" Login: ",-1)),N("code",LA,fe(y[L.id].login),1)])])):_e("",!0),N("div",NA,[I(_(Hn),{class:"text-xs text-muted-foreground"},{default:D(()=>[...A[34]||(A[34]=[ce("CLI path (optional)",-1)])]),_:1}),I(_(Qu),{modelValue:c.value[L.id],"onUpdate:modelValue":de=>c.value[L.id]=de,placeholder:T(L),disabled:u.value[L.id]},null,8,["modelValue","onUpdate:modelValue","placeholder","disabled"])]),I(_(De),{size:"sm",disabled:u.value[L.id],onClick:de=>E(L)},{default:D(()=>[u.value[L.id]?(P(),ue(_(Kn),{key:0,class:"size-4 animate-spin"})):_e("",!0),ce(" "+fe(u.value[L.id]?"Checking…":"Check connection"),1)]),_:2},1032,["disabled","onClick"])])),d.value[L.id]?(P(),Y("p",qA,fe(d.value[L.id]),1)):_e("",!0)]))),128))]),_:1})]),_:1}),N("div",BA,[I(_(De),{onClick:A[7]||(A[7]=L=>s("close"))},{default:D(()=>[...A[35]||(A[35]=[ce("Done",-1)])]),_:1})])])]))}}),jA={totalUsd:0,inputUsd:0,outputUsd:0,cachedReadUsd:0,cachedWriteUsd:0,totalTokens:0,inputTokens:0,outputTokens:0,cachedReadTokens:0,cachedWriteTokens:0,reasoningTokens:0,assistantTurns:0,pricedTurns:0};function HA(){const e=J([]),t=J(null),n=Zn([]),s=J(!1),r=J(null);let i=null,o=null;const a=G(()=>{var F,V,X;const C={...jA};for(const $ of n)$.role==="assistant"&&(!$.usage&&!$.cost||(C.assistantTurns+=1,$.cost&&(C.pricedTurns+=1,C.totalUsd+=$.cost.totalUsd,C.inputUsd+=$.cost.inputUsd,C.outputUsd+=$.cost.outputUsd,C.cachedReadUsd+=$.cost.cachedReadUsd,C.cachedWriteUsd+=$.cost.cachedWriteUsd),$.usage&&(C.totalTokens+=$.usage.totalTokens??0,C.inputTokens+=$.usage.inputTokens??0,C.outputTokens+=$.usage.outputTokens??0,C.cachedReadTokens+=((F=$.usage.inputTokenDetails)==null?void 0:F.cacheReadTokens)??0,C.cachedWriteTokens+=((V=$.usage.inputTokenDetails)==null?void 0:V.cacheWriteTokens)??0,C.reasoningTokens+=((X=$.usage.outputTokenDetails)==null?void 0:X.reasoningTokens)??0)));return C});async function l(){e.value=await V2()}async function c(C){t.value=C,n.splice(0,n.length),r.value=null;const F=await W2(C);for(const V of F.messages)n.push({id:V.id,role:V.role,text:V.content.text,reasoning:V.content.reasoning,toolCalls:V.content.toolCalls??[],plan:V.content.plan,usage:V.content.usage,cost:V.content.cost,provider:V.content.provider,model:V.content.model,createdAt:V.createdAt})}async function u(C){const F=await U2(C);return e.value=[F,...e.value],t.value=F.id,n.splice(0,n.length),r.value=null,F}async function d(C){await Af(C),e.value=e.value.filter(F=>F.id!==C),t.value===C&&(t.value=null,n.splice(0,n.length))}async function f(){const C=e.value.map(F=>F.id);C.length!==0&&(await Promise.all(C.map(Af)),e.value=[],t.value=null,n.splice(0,n.length),r.value=null)}async function p(C,F){await G2(C,F);const V=e.value.findIndex(X=>X.id===C);V!==-1&&(e.value[V]={...e.value[V],title:F})}function g(){const C=n[n.length-1];if(C&&C.role==="assistant")return C;const F=e.value.find(X=>X.id===t.value),V={id:crypto.randomUUID(),role:"assistant",text:"",toolCalls:[],isStreaming:!0,provider:F==null?void 0:F.provider,model:F==null?void 0:F.model,createdAt:Date.now()};return n.push(V),V}let h=null,m="",v="",y=!1;function x(){y=!1,h&&(m&&(h.text+=m,m=""),v&&(h.reasoning=(h.reasoning??"")+v,v=""))}function k(){y||(y=!0,requestAnimationFrame(x))}function O(C){m+=C,k()}function q(C){v+=C,k()}function E(){x(),h&&(h.isStreaming=!1,h.activity=void 0,h.planPartial=!1),h=null,m="",v=""}function R(C){for(let F=n.length-1;F>=0;F--){const V=n[F].toolCalls.find(X=>X.id===C);if(V)return V}}function T(C,F){var V;if(C==="text-delta"&&F.text)h=g(),O(F.text);else if(C==="reasoning-delta"&&F.text)h=g(),q(F.text);else if(C==="activity"&&F.phase){const X=g();h=X,X.activity={phase:F.phase,detail:F.detail}}else if(C==="tool-call"&&F.id&&F.name){x();const X=g();h=X,X.toolCalls.push({id:F.id,name:F.name,input:F.input,status:"pending"})}else if(C==="tool-result"&&F.id){x();const X=R(F.id);X&&(X.result={ok:!!F.ok,content:F.content??""},X.status=F.ok?"success":"error")}else if(C==="plan-partial"){const X=g();h=X,X.plan={summary:F.summary??"",steps:F.steps??[]},X.planPartial=!0}else if(C==="plan"){x();const X=g();h=X,X.plan={summary:F.summary??"",steps:F.steps??[]},X.planPartial=!1}else if(C==="plan-step"&&F.id&&F.status){x();const $=(V=g().plan)==null?void 0:V.steps.find(A=>A.id===F.id);$&&($.status=F.status)}else if(C!=="plan-repair")if(C==="finish"){x();const X=g();F.usage&&(X.usage=F.usage),F.cost&&(X.cost=F.cost)}else C==="error"&&(E(),r.value=F.message??"Unknown error")}async function K(C){const F=C.trim();if(!F||!t.value)return;s.value=!0,r.value=null,n.push({id:crypto.randomUUID(),role:"user",text:F,toolCalls:[],createdAt:Date.now()}),g();const V=crypto.randomUUID();i=V,o=new AbortController;try{for await(const X of K2({chatId:t.value,prompt:F,requestId:V},o.signal)){if(X.event==="done")break;T(X.event,X.data)}l()}catch(X){X.name!=="AbortError"&&(r.value=X.message)}finally{E(),s.value=!1,i=null,o=null}}async function U(){if(i){try{await Y2(i)}catch{}o==null||o.abort()}}return{chats:e,activeChatId:t,messages:n,sending:s,error:r,chatTotals:a,loadChats:l,selectChat:c,newChat:u,removeChat:d,clearAllChats:f,rename:p,send:K,abort:U}}const VA={key:1,class:"flex min-h-screen items-center justify-center p-6"},UA={class:"max-w-md rounded-lg border border-destructive/40 bg-destructive/10 p-4 text-sm text-destructive"},WA={key:4,class:"flex h-screen"},GA=ae({__name:"App",setup(e){const t=J(null),n=J([]),s=J(!0),r=J("Starting…"),i=J(null),o=J(!1),a=J(!1),l=J(null),c=J(!1),u=HA(),d=Sb(),f=Eb(),p=G(()=>n.value.some(E=>E.isAuthenticated));function g(){const E=d.params.id;return typeof E=="string"&&E?E:null}async function h(){const E=g();if(!E){u.activeChatId.value!==null&&(u.activeChatId.value=null,u.messages.splice(0,u.messages.length));return}if(u.activeChatId.value!==E){if(!u.chats.value.some(R=>R.id===E)){await f.replace({name:"home"});return}await u.selectChat(E)}}async function m(){try{r.value="Checking connection…";const[E,R,T]=await Promise.all([ov(),Ic(),to()]);t.value=E,n.value=R,c.value=!T.betaTelemetryPromptAnswered,p.value&&(r.value="Loading chats…",await u.loadChats(),r.value="Preparing workspace…",await h()),await ws(),Io("app_loaded",{has_auth:p.value})}catch(E){i.value=E.message}finally{s.value=!1}}tt(()=>d.params.id,()=>{p.value&&h()});function v(){c.value=!1}async function y(){if(!t.value)return;const E=await u.newChat({provider:t.value.activeProvider,model:t.value.activeModel});await f.push({name:"chat",params:{id:E.id}})}async function x(E){await f.push({name:"chat",params:{id:E}})}async function k(E){const R=u.activeChatId.value===E;await u.removeChat(E),R&&await f.replace({name:"home"})}async function O(){await m()}async function q(){if(u.chats.value.length!==0){a.value=!0,l.value=null;try{await u.clearAllChats(),await f.replace({name:"home"})}catch(E){l.value=E.message}finally{a.value=!1}}}return qt(m),(E,R)=>{var T,K;return s.value?(P(),ue(e1,{key:0,message:r.value},null,8,["message"])):i.value?(P(),Y("div",VA,[N("div",UA,fe(i.value),1)])):c.value?(P(),ue(kS,{key:2,onAnswered:v})):p.value?(P(),Y("div",WA,[I(aA,{chats:_(u).chats.value,"active-chat-id":_(u).activeChatId.value,onNewChat:y,onSelect:x,onRename:R[0]||(R[0]=(U,C)=>_(u).rename(U,C)),onDelete:k,onOpenSettings:R[1]||(R[1]=U=>o.value=!0)},null,8,["chats","active-chat-id"]),I(zP,{class:"flex-1",providers:n.value,store:_(u),"settings-open":o.value,"action-plan-beta":((T=t.value)==null?void 0:T.actionPlanBeta)??!1,"has-api-key":((K=t.value)==null?void 0:K.hasApiKey)??!1,onNewChat:y,onOpenSettings:R[2]||(R[2]=U=>o.value=!0)},null,8,["providers","store","settings-open","action-plan-beta","has-api-key"]),o.value?(P(),ue(zA,{key:0,"chat-count":_(u).chats.value.length,"clearing-history":a.value,"clear-history-error":l.value,onClose:R[3]||(R[3]=U=>o.value=!1),onSaved:O,onClearHistory:q},null,8,["chat-count","clearing-history","clear-history-error"])):_e("",!0)])):(P(),ue(KS,{key:3,onSaved:m}))}}}),Rp={render:()=>null},KA=[{path:"/",name:"home",component:Rp},{path:"/c/:id",name:"chat",component:Rp}],YA=kb({history:tb(),routes:KA});pv(Rc());const JA=new FontFace("Source Sans 3 Variable",`url(${m0}) format('woff2-variations')`,{style:"normal",weight:"200 900",display:"swap"});JA.load().then(e=>document.fonts.add(e)).catch(()=>{});async function XA(){await _S(),h0(GA).use(YA).mount("#app")}XA();