uEdition-Editor 2.0.0b9__py3-none-any.whl → 2.0.0b11__py3-none-any.whl
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.
Potentially problematic release.
This version of uEdition-Editor might be problematic. Click here for more details.
- uedition_editor/__about__.py +1 -1
- uedition_editor/api/__init__.py +4 -0
- uedition_editor/frontend/dist/assets/{CodeMirrorEditor-B5Rlo82N.js → CodeMirrorEditor-843IlM1G.js} +1 -1
- uedition_editor/frontend/dist/assets/{FolderEditor-CKMB6ngt.js → FolderEditor-DxuUgzoi.js} +1 -1
- uedition_editor/frontend/dist/assets/{ImageEditor-TAWAZQYx.js → ImageEditor-DTrJs74v.js} +1 -1
- uedition_editor/frontend/dist/assets/TeiEditor-79-RF-kq.js +192 -0
- uedition_editor/frontend/dist/assets/index-BON20vUr.js +20 -0
- uedition_editor/frontend/dist/assets/index-C4F2IZ7w.css +1 -0
- uedition_editor/frontend/dist/index.html +2 -2
- {uedition_editor-2.0.0b9.dist-info → uedition_editor-2.0.0b11.dist-info}/METADATA +1 -1
- uedition_editor-2.0.0b11.dist-info/RECORD +29 -0
- uedition_editor/frontend/dist/assets/TeiEditor-B18T9sYP.js +0 -192
- uedition_editor/frontend/dist/assets/index-BKSE80GP.css +0 -1
- uedition_editor/frontend/dist/assets/index-CS7Yn65-.js +0 -18
- uedition_editor-2.0.0b9.dist-info/RECORD +0 -29
- {uedition_editor-2.0.0b9.dist-info → uedition_editor-2.0.0b11.dist-info}/WHEEL +0 -0
- {uedition_editor-2.0.0b9.dist-info → uedition_editor-2.0.0b11.dist-info}/entry_points.txt +0 -0
- {uedition_editor-2.0.0b9.dist-info → uedition_editor-2.0.0b11.dist-info}/licenses/LICENSE.txt +0 -0
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CodeMirrorEditor-B5Rlo82N.js","assets/index-Vcq4gwWv.js","assets/CodeMirrorEditor-ddcHt3UE.css","assets/TeiEditor-B18T9sYP.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
var yf=Object.defineProperty;var Po=t=>{throw TypeError(t)};var vf=(t,e,n)=>e in t?yf(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var bs=(t,e,n)=>vf(t,typeof e!="symbol"?e+"":e,n),ys=(t,e,n)=>e.has(t)||Po("Cannot "+n);var $=(t,e,n)=>(ys(t,e,"read from private field"),n?n.call(t):e.get(t)),be=(t,e,n)=>e.has(t)?Po("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),se=(t,e,n,r)=>(ys(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),Se=(t,e,n)=>(ys(t,e,"access private method"),n);var Oi=(t,e,n,r)=>({set _(i){se(t,e,i,n)},get _(){return $(t,e,r)}});(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();function ce(){}const ns=t=>t;function ie(t,e){for(const n in e)t[n]=e[n];return t}function sa(t){return t()}function Lo(){return Object.create(null)}function Te(t){t.forEach(sa)}function Zn(t){return typeof t=="function"}function fe(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let Ai;function G0(t,e){return t===e?!0:(Ai||(Ai=document.createElement("a")),Ai.href=e,t===Ai.href)}function kf(t){return Object.keys(t).length===0}function oo(t,...e){if(t==null){for(const r of e)r(void 0);return ce}const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function Sr(t){let e;return oo(t,n=>e=n)(),e}function J(t,e,n){t.$$.on_destroy.push(oo(e,n))}function pe(t,e,n,r){if(t){const i=oa(t,e,n,r);return t[0](i)}}function oa(t,e,n,r){return t[1]&&r?ie(n.ctx.slice(),t[1](r(e))):n.ctx}function he(t,e,n,r){if(t[2]&&r){const i=t[2](r(n));if(e.dirty===void 0)return i;if(typeof i=="object"){const s=[],o=Math.max(e.dirty.length,i.length);for(let u=0;u<o;u+=1)s[u]=e.dirty[u]|i[u];return s}return e.dirty|i}return e.dirty}function _e(t,e,n,r,i,s){if(i){const o=oa(e,n,r,s);t.p(o,i)}}function ge(t){if(t.ctx.length>32){const e=[],n=t.ctx.length/32;for(let r=0;r<n;r++)e[r]=-1;return e}return-1}function yt(t){const e={};for(const n in t)n[0]!=="$"&&(e[n]=t[n]);return e}function Ke(t,e){const n={};e=new Set(e);for(const r in t)!e.has(r)&&r[0]!=="$"&&(n[r]=t[r]);return n}function Ue(t){return t&&Zn(t.destroy)?t.destroy:ce}const la=typeof window<"u";let lo=la?()=>window.performance.now():()=>Date.now(),uo=la?t=>requestAnimationFrame(t):ce;const or=new Set;function ua(t){or.forEach(e=>{e.c(t)||(or.delete(e),e.f())}),or.size!==0&&uo(ua)}function ao(t){let e;return or.size===0&&uo(ua),{promise:new Promise(n=>{or.add(e={c:t,f:n})}),abort(){or.delete(e)}}}function F(t,e){t.appendChild(e)}function aa(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function Cf(t){const e=D("style");return e.textContent="/* empty */",Ef(aa(t),e),e.sheet}function Ef(t,e){return F(t.head||t,e),e.sheet}function w(t,e,n){t.insertBefore(e,n||null)}function E(t){t.parentNode&&t.parentNode.removeChild(t)}function ci(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function D(t){return document.createElement(t)}function Ps(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Z(t){return document.createTextNode(t)}function j(){return Z(" ")}function $e(){return Z("")}function G(t,e,n,r){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}function I(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}const wf=["width","height"];function le(t,e){const n=Object.getOwnPropertyDescriptors(t.__proto__);for(const r in e)e[r]==null?t.removeAttribute(r):r==="style"?t.style.cssText=e[r]:r==="__value"?t.value=t[r]=e[r]:n[r]&&n[r].set&&wf.indexOf(r)===-1?t[r]=e[r]:I(t,r,e[r])}function Of(t,e){Object.keys(e).forEach(n=>{Af(t,n,e[n])})}function Af(t,e,n){const r=e.toLowerCase();r in t?t[r]=typeof t[r]=="boolean"&&n===""?!0:n:e in t?t[e]=typeof t[e]=="boolean"&&n===""?!0:n:I(t,e,n)}function Vi(t){return/-/.test(t)?Of:le}function Tf(t){return Array.from(t.childNodes)}function je(t,e){e=""+e,t.data!==e&&(t.data=e)}function it(t,e){t.value=e??""}function Io(t,e,n){for(let r=0;r<t.options.length;r+=1){const i=t.options[r];if(i.__value===e){i.selected=!0;return}}(!n||e!==void 0)&&(t.selectedIndex=-1)}function $f(t){const e=t.querySelector(":checked");return e&&e.__value}function fa(t,e,{bubbles:n=!1,cancelable:r=!1}={}){return new CustomEvent(t,{detail:e,bubbles:n,cancelable:r})}function Mo(t,e){return new t(e)}const Ui=new Map;let Bi=0;function Sf(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}function Rf(t,e){const n={stylesheet:Cf(e),rules:{}};return Ui.set(t,n),n}function Ki(t,e,n,r,i,s,o,u=0){const l=16.666/r;let a=`{
|
|
3
|
-
`;for(let v=0;v<=1;v+=l){const g=e+(n-e)*s(v);a+=v*100+`%{${o(g,1-g)}}
|
|
4
|
-
`}const f=a+`100% {${o(n,1-n)}}
|
|
5
|
-
}`,c=`__svelte_${Sf(f)}_${u}`,d=aa(t),{stylesheet:p,rules:m}=Ui.get(d)||Rf(d,t);m[c]||(m[c]=!0,p.insertRule(`@keyframes ${c} ${f}`,p.cssRules.length));const _=t.style.animation||"";return t.style.animation=`${_?`${_}, `:""}${c} ${r}ms linear ${i}ms 1 both`,Bi+=1,c}function ji(t,e){const n=(t.style.animation||"").split(", "),r=n.filter(e?s=>s.indexOf(e)<0:s=>s.indexOf("__svelte")===-1),i=n.length-r.length;i&&(t.style.animation=r.join(", "),Bi-=i,Bi||Df())}function Df(){uo(()=>{Bi||(Ui.forEach(t=>{const{ownerNode:e}=t.stylesheet;e&&E(e)}),Ui.clear())})}let Xr;function Gr(t){Xr=t}function di(){if(!Xr)throw new Error("Function called outside component initialization");return Xr}function rs(t){di().$$.on_mount.push(t)}function is(t){di().$$.on_destroy.push(t)}function Ff(){const t=di();return(e,n,{cancelable:r=!1}={})=>{const i=t.$$.callbacks[e];if(i){const s=fa(e,n,{cancelable:r});return i.slice().forEach(o=>{o.call(t,s)}),!s.defaultPrevented}return!0}}function At(t,e){return di().$$.context.set(t,e),e}function bt(t){return di().$$.context.get(t)}function Oe(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach(r=>r.call(this,e))}const sr=[],Ce=[];let lr=[];const Ls=[],ca=Promise.resolve();let Is=!1;function da(){Is||(Is=!0,ca.then(ma))}function qt(){return da(),ca}function at(t){lr.push(t)}function Vt(t){Ls.push(t)}const vs=new Set;let er=0;function ma(){if(er!==0)return;const t=Xr;do{try{for(;er<sr.length;){const e=sr[er];er++,Gr(e),Pf(e.$$)}}catch(e){throw sr.length=0,er=0,e}for(Gr(null),sr.length=0,er=0;Ce.length;)Ce.pop()();for(let e=0;e<lr.length;e+=1){const n=lr[e];vs.has(n)||(vs.add(n),n())}lr.length=0}while(sr.length);for(;Ls.length;)Ls.pop()();Is=!1,vs.clear(),Gr(t)}function Pf(t){if(t.fragment!==null){t.update(),Te(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(at)}}function Lf(t){const e=[],n=[];lr.forEach(r=>t.indexOf(r)===-1?e.push(r):n.push(r)),n.forEach(r=>r()),lr=e}let Br;function fo(){return Br||(Br=Promise.resolve(),Br.then(()=>{Br=null})),Br}function Wn(t,e,n){t.dispatchEvent(fa(`${e?"intro":"outro"}${n}`))}const Mi=new Set;let xt;function de(){xt={r:0,c:[],p:xt}}function me(){xt.r||Te(xt.c),xt=xt.p}function b(t,e){t&&t.i&&(Mi.delete(t),t.i(e))}function y(t,e,n,r){if(t&&t.o){if(Mi.has(t))return;Mi.add(t),xt.c.push(()=>{Mi.delete(t),r&&(n&&t.d(1),r())}),t.o(e)}else r&&r()}const co={duration:0};function Dn(t,e,n){const r={direction:"in"};let i=e(t,n,r),s=!1,o,u,l=0;function a(){o&&ji(t,o)}function f(){const{delay:d=0,duration:p=300,easing:m=ns,tick:_=ce,css:v}=i||co;v&&(o=Ki(t,0,1,p,d,m,v,l++)),_(0,1);const g=lo()+d,h=g+p;u&&u.abort(),s=!0,at(()=>Wn(t,!0,"start")),u=ao(k=>{if(s){if(k>=h)return _(1,0),Wn(t,!0,"end"),a(),s=!1;if(k>=g){const A=m((k-g)/p);_(A,1-A)}}return s})}let c=!1;return{start(){c||(c=!0,ji(t),Zn(i)?(i=i(r),fo().then(f)):f())},invalidate(){c=!1},end(){s&&(a(),s=!1)}}}function Fn(t,e,n){const r={direction:"out"};let i=e(t,n,r),s=!0,o;const u=xt;u.r+=1;let l;function a(){const{delay:f=0,duration:c=300,easing:d=ns,tick:p=ce,css:m}=i||co;m&&(o=Ki(t,1,0,c,f,d,m));const _=lo()+f,v=_+c;at(()=>Wn(t,!1,"start")),"inert"in t&&(l=t.inert,t.inert=!0),ao(g=>{if(s){if(g>=v)return p(0,1),Wn(t,!1,"end"),--u.r||Te(u.c),!1;if(g>=_){const h=d((g-_)/c);p(1-h,h)}}return s})}return Zn(i)?fo().then(()=>{i=i(r),a()}):a(),{end(f){f&&"inert"in t&&(t.inert=l),f&&i.tick&&i.tick(1,0),s&&(o&&ji(t,o),s=!1)}}}function Tn(t,e,n,r){let s=e(t,n,{direction:"both"}),o=r?0:1,u=null,l=null,a=null,f;function c(){a&&ji(t,a)}function d(m,_){const v=m.b-o;return _*=Math.abs(v),{a:o,b:m.b,d:v,duration:_,start:m.start,end:m.start+_,group:m.group}}function p(m){const{delay:_=0,duration:v=300,easing:g=ns,tick:h=ce,css:k}=s||co,A={start:lo()+_,b:m};m||(A.group=xt,xt.r+=1),"inert"in t&&(m?f!==void 0&&(t.inert=f):(f=t.inert,t.inert=!0)),u||l?l=A:(k&&(c(),a=Ki(t,o,m,v,_,g,k)),m&&h(0,1),u=d(A,v),at(()=>Wn(t,m,"start")),ao(S=>{if(l&&S>l.start&&(u=d(l,v),l=null,Wn(t,u.b,"start"),k&&(c(),a=Ki(t,o,u.b,u.duration,0,g,s.css))),u){if(S>=u.end)h(o=u.b,1-o),Wn(t,u.b,"end"),l||(u.b?c():--u.group.r||Te(u.group.c)),u=null;else if(S>=u.start){const C=S-u.start;o=u.a+u.d*g(C/u.duration),h(o,1-o)}}return!!(u||l)}))}return{run(m){Zn(s)?fo().then(()=>{s=s({direction:m?"in":"out"}),p(m)}):p(m)},end(){c(),u=l=null}}}function tn(t){return(t==null?void 0:t.length)!==void 0?t:Array.from(t)}function Me(t,e){const n={},r={},i={$$scope:1};let s=t.length;for(;s--;){const o=t[s],u=e[s];if(u){for(const l in o)l in u||(r[l]=1);for(const l in u)i[l]||(n[l]=u[l],i[l]=1);t[s]=u}else for(const l in o)i[l]=1}for(const o in r)o in n||(n[o]=void 0);return n}function Ut(t,e,n){const r=t.$$.props[e];r!==void 0&&(t.$$.bound[r]=n,n(t.$$.ctx[r]))}function H(t){t&&t.c()}function M(t,e,n){const{fragment:r,after_update:i}=t.$$;r&&r.m(e,n),at(()=>{const s=t.$$.on_mount.map(sa).filter(Zn);t.$$.on_destroy?t.$$.on_destroy.push(...s):Te(s),t.$$.on_mount=[]}),i.forEach(at)}function N(t,e){const n=t.$$;n.fragment!==null&&(Lf(n.after_update),Te(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function If(t,e){t.$$.dirty[0]===-1&&(sr.push(t),da(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function ye(t,e,n,r,i,s,o=null,u=[-1]){const l=Xr;Gr(t);const a=t.$$={fragment:null,ctx:[],props:s,update:ce,not_equal:i,bound:Lo(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(l?l.$$.context:[])),callbacks:Lo(),dirty:u,skip_bound:!1,root:e.target||l.$$.root};o&&o(a.root);let f=!1;if(a.ctx=n?n(t,e.props||{},(c,d,...p)=>{const m=p.length?p[0]:d;return a.ctx&&i(a.ctx[c],a.ctx[c]=m)&&(!a.skip_bound&&a.bound[c]&&a.bound[c](m),f&&If(t,c)),d}):[],a.update(),f=!0,Te(a.before_update),a.fragment=r?r(a.ctx):!1,e.target){if(e.hydrate){const c=Tf(e.target);a.fragment&&a.fragment.l(c),c.forEach(E)}else a.fragment&&a.fragment.c();e.intro&&b(t.$$.fragment),M(t,e.target,e.anchor),ma()}Gr(l)}class ve{constructor(){bs(this,"$$");bs(this,"$$set")}$destroy(){N(this,1),this.$destroy=ce}$on(e,n){if(!Zn(n))return ce;const r=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return r.push(n),()=>{const i=r.indexOf(n);i!==-1&&r.splice(i,1)}}$set(e){this.$$set&&!kf(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const Mf="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Mf);var Rr=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Or=typeof window>"u"||"Deno"in globalThis;function Ht(){}function Nf(t,e){return typeof t=="function"?t(e):t}function Ms(t){return typeof t=="number"&&t>=0&&t!==1/0}function pa(t,e){return Math.max(t+(e||0)-Date.now(),0)}function ur(t,e){return typeof t=="function"?t(e):t}function jt(t,e){return typeof t=="function"?t(e):t}function No(t,e){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:u}=t;if(o){if(r){if(e.queryHash!==mo(o,e.options))return!1}else if(!Jr(e.queryKey,o))return!1}if(n!=="all"){const l=e.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof u=="boolean"&&e.isStale()!==u||i&&i!==e.state.fetchStatus||s&&!s(e))}function Ho(t,e){const{exact:n,status:r,predicate:i,mutationKey:s}=t;if(s){if(!e.options.mutationKey)return!1;if(n){if(Qn(e.options.mutationKey)!==Qn(s))return!1}else if(!Jr(e.options.mutationKey,s))return!1}return!(r&&e.state.status!==r||i&&!i(e))}function mo(t,e){return((e==null?void 0:e.queryKeyHashFn)||Qn)(t)}function Qn(t){return JSON.stringify(t,(e,n)=>Ns(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Jr(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?!Object.keys(e).some(n=>!Jr(t[n],e[n])):!1}function ha(t,e){if(t===e)return t;const n=Vo(t)&&Vo(e);if(n||Ns(t)&&Ns(e)){const r=n?t:Object.keys(t),i=r.length,s=n?e:Object.keys(e),o=s.length,u=n?[]:{};let l=0;for(let a=0;a<o;a++){const f=n?a:s[a];(!n&&r.includes(f)||n)&&t[f]===void 0&&e[f]===void 0?(u[f]=void 0,l++):(u[f]=ha(t[f],e[f]),u[f]===t[f]&&t[f]!==void 0&&l++)}return i===o&&l===i?t:u}return e}function qi(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(t[n]!==e[n])return!1;return!0}function Vo(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Ns(t){if(!Uo(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!Uo(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function Uo(t){return Object.prototype.toString.call(t)==="[object Object]"}function Hf(t){return new Promise(e=>{setTimeout(e,t)})}function Hs(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?ha(t,e):e}function Vf(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function Uf(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var po=Symbol();function _a(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===po?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}var Hn,bn,dr,Yu,Bf=(Yu=class extends Rr{constructor(){super();be(this,Hn);be(this,bn);be(this,dr);se(this,dr,e=>{if(!Or&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){$(this,bn)||this.setEventListener($(this,dr))}onUnsubscribe(){var e;this.hasListeners()||((e=$(this,bn))==null||e.call(this),se(this,bn,void 0))}setEventListener(e){var n;se(this,dr,e),(n=$(this,bn))==null||n.call(this),se(this,bn,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){$(this,Hn)!==e&&(se(this,Hn,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){var e;return typeof $(this,Hn)=="boolean"?$(this,Hn):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Hn=new WeakMap,bn=new WeakMap,dr=new WeakMap,Yu),ho=new Bf,mr,yn,pr,Zu,Kf=(Zu=class extends Rr{constructor(){super();be(this,mr,!0);be(this,yn);be(this,pr);se(this,pr,e=>{if(!Or&&window.addEventListener){const n=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){$(this,yn)||this.setEventListener($(this,pr))}onUnsubscribe(){var e;this.hasListeners()||((e=$(this,yn))==null||e.call(this),se(this,yn,void 0))}setEventListener(e){var n;se(this,pr,e),(n=$(this,yn))==null||n.call(this),se(this,yn,e(this.setOnline.bind(this)))}setOnline(e){$(this,mr)!==e&&(se(this,mr,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return $(this,mr)}},mr=new WeakMap,yn=new WeakMap,pr=new WeakMap,Zu),Wi=new Kf;function Vs(){let t,e;const n=new Promise((i,s)=>{t=i,e=s});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),t(i)},n.reject=i=>{r({status:"rejected",reason:i}),e(i)},n}function jf(t){return Math.min(1e3*2**t,3e4)}function ga(t){return(t??"online")==="online"?Wi.isOnline():!0}var ba=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function ks(t){return t instanceof ba}function ya(t){let e=!1,n=0,r=!1,i;const s=Vs(),o=_=>{var v;r||(d(new ba(_)),(v=t.abort)==null||v.call(t))},u=()=>{e=!0},l=()=>{e=!1},a=()=>ho.isFocused()&&(t.networkMode==="always"||Wi.isOnline())&&t.canRun(),f=()=>ga(t.networkMode)&&t.canRun(),c=_=>{var v;r||(r=!0,(v=t.onSuccess)==null||v.call(t,_),i==null||i(),s.resolve(_))},d=_=>{var v;r||(r=!0,(v=t.onError)==null||v.call(t,_),i==null||i(),s.reject(_))},p=()=>new Promise(_=>{var v;i=g=>{(r||a())&&_(g)},(v=t.onPause)==null||v.call(t)}).then(()=>{var _;i=void 0,r||(_=t.onContinue)==null||_.call(t)}),m=()=>{if(r)return;let _;const v=n===0?t.initialPromise:void 0;try{_=v??t.fn()}catch(g){_=Promise.reject(g)}Promise.resolve(_).then(c).catch(g=>{var C;if(r)return;const h=t.retry??(Or?0:3),k=t.retryDelay??jf,A=typeof k=="function"?k(n,g):k,S=h===!0||typeof h=="number"&&n<h||typeof h=="function"&&h(n,g);if(e||!S){d(g);return}n++,(C=t.onFail)==null||C.call(t,n,g),Hf(A).then(()=>a()?void 0:p()).then(()=>{e?d(g):m()})})};return{promise:s,cancel:o,continue:()=>(i==null||i(),s),cancelRetry:u,continueRetry:l,canStart:f,start:()=>(f()?m():p().then(m),s)}}function qf(){let t=[],e=0,n=u=>{u()},r=u=>{u()},i=u=>setTimeout(u,0);const s=u=>{e?t.push(u):i(()=>{n(u)})},o=()=>{const u=t;t=[],u.length&&i(()=>{r(()=>{u.forEach(l=>{n(l)})})})};return{batch:u=>{let l;e++;try{l=u()}finally{e--,e||o()}return l},batchCalls:u=>(...l)=>{s(()=>{u(...l)})},schedule:s,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{i=u}}}var ut=qf(),Vn,Xu,va=(Xu=class{constructor(){be(this,Vn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ms(this.gcTime)&&se(this,Vn,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Or?1/0:5*60*1e3))}clearGcTimeout(){$(this,Vn)&&(clearTimeout($(this,Vn)),se(this,Vn,void 0))}},Vn=new WeakMap,Xu),hr,_r,Nt,Et,li,Un,Bt,sn,Ju,Wf=(Ju=class extends va{constructor(e){super();be(this,Bt);be(this,hr);be(this,_r);be(this,Nt);be(this,Et);be(this,li);be(this,Un);se(this,Un,!1),se(this,li,e.defaultOptions),this.setOptions(e.options),this.observers=[],se(this,Nt,e.cache),this.queryKey=e.queryKey,this.queryHash=e.queryHash,se(this,hr,Qf(this.options)),this.state=e.state??$(this,hr),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=$(this,Et))==null?void 0:e.promise}setOptions(e){this.options={...$(this,li),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&$(this,Nt).remove(this)}setData(e,n){const r=Hs(this.state.data,e,this.options);return Se(this,Bt,sn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(e,n){Se(this,Bt,sn).call(this,{type:"setState",state:e,setStateOptions:n})}cancel(e){var r,i;const n=(r=$(this,Et))==null?void 0:r.promise;return(i=$(this,Et))==null||i.cancel(e),n?n.then(Ht).catch(Ht):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState($(this,hr))}isActive(){return this.observers.some(e=>jt(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===po||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(e=0){return this.state.isInvalidated||this.state.data===void 0||!pa(this.state.dataUpdatedAt,e)}onFocus(){var n;const e=this.observers.find(r=>r.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(n=$(this,Et))==null||n.continue()}onOnline(){var n;const e=this.observers.find(r=>r.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(n=$(this,Et))==null||n.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),$(this,Nt).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||($(this,Et)&&($(this,Un)?$(this,Et).cancel({revert:!0}):$(this,Et).cancelRetry()),this.scheduleGc()),$(this,Nt).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Se(this,Bt,sn).call(this,{type:"invalidate"})}fetch(e,n){var l,a,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if($(this,Et))return $(this,Et).continueRetry(),$(this,Et).promise}if(e&&this.setOptions(e),!this.options.queryFn){const c=this.observers.find(d=>d.options.queryFn);c&&this.setOptions(c.options)}const r=new AbortController,i=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(se(this,Un,!0),r.signal)})},s=()=>{const c=_a(this.options,n),d={queryKey:this.queryKey,meta:this.meta};return i(d),se(this,Un,!1),this.options.persister?this.options.persister(c,d,this):c(d)},o={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:s};i(o),(l=this.options.behavior)==null||l.onFetch(o,this),se(this,_r,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((a=o.fetchOptions)==null?void 0:a.meta))&&Se(this,Bt,sn).call(this,{type:"fetch",meta:(f=o.fetchOptions)==null?void 0:f.meta});const u=c=>{var d,p,m,_;ks(c)&&c.silent||Se(this,Bt,sn).call(this,{type:"error",error:c}),ks(c)||((p=(d=$(this,Nt).config).onError)==null||p.call(d,c,this),(_=(m=$(this,Nt).config).onSettled)==null||_.call(m,this.state.data,c,this)),this.scheduleGc()};return se(this,Et,ya({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:c=>{var d,p,m,_;if(c===void 0){u(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(c)}catch(v){u(v);return}(p=(d=$(this,Nt).config).onSuccess)==null||p.call(d,c,this),(_=(m=$(this,Nt).config).onSettled)==null||_.call(m,c,this.state.error,this),this.scheduleGc()},onError:u,onFail:(c,d)=>{Se(this,Bt,sn).call(this,{type:"failed",failureCount:c,error:d})},onPause:()=>{Se(this,Bt,sn).call(this,{type:"pause"})},onContinue:()=>{Se(this,Bt,sn).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),$(this,Et).start()}},hr=new WeakMap,_r=new WeakMap,Nt=new WeakMap,Et=new WeakMap,li=new WeakMap,Un=new WeakMap,Bt=new WeakSet,sn=function(e){const n=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...ka(r.data,this.options),fetchMeta:e.meta??null};case"success":return{...r,data:e.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=e.error;return ks(i)&&i.revert&&$(this,_r)?{...$(this,_r),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=n(this.state),ut.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),$(this,Nt).notify({query:this,type:"updated",action:e})})},Ju);function ka(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ga(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function Qf(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,r=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Yt,xu,zf=(xu=class extends Rr{constructor(e={}){super();be(this,Yt);this.config=e,se(this,Yt,new Map)}build(e,n,r){const i=n.queryKey,s=n.queryHash??mo(i,n);let o=this.get(s);return o||(o=new Wf({cache:this,queryKey:i,queryHash:s,options:e.defaultQueryOptions(n),state:r,defaultOptions:e.getQueryDefaults(i)}),this.add(o)),o}add(e){$(this,Yt).has(e.queryHash)||($(this,Yt).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=$(this,Yt).get(e.queryHash);n&&(e.destroy(),n===e&&$(this,Yt).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){ut.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return $(this,Yt).get(e)}getAll(){return[...$(this,Yt).values()]}find(e){const n={exact:!0,...e};return this.getAll().find(r=>No(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>No(e,r)):n}notify(e){ut.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){ut.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){ut.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Yt=new WeakMap,xu),Zt,wt,Bn,Xt,_n,ea,Gf=(ea=class extends va{constructor(e){super();be(this,Xt);be(this,Zt);be(this,wt);be(this,Bn);this.mutationId=e.mutationId,se(this,wt,e.mutationCache),se(this,Zt,[]),this.state=e.state||Ca(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){$(this,Zt).includes(e)||($(this,Zt).push(e),this.clearGcTimeout(),$(this,wt).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){se(this,Zt,$(this,Zt).filter(n=>n!==e)),this.scheduleGc(),$(this,wt).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){$(this,Zt).length||(this.state.status==="pending"?this.scheduleGc():$(this,wt).remove(this))}continue(){var e;return((e=$(this,Bn))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var i,s,o,u,l,a,f,c,d,p,m,_,v,g,h,k,A,S,C,L;se(this,Bn,ya({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(R,W)=>{Se(this,Xt,_n).call(this,{type:"failed",failureCount:R,error:W})},onPause:()=>{Se(this,Xt,_n).call(this,{type:"pause"})},onContinue:()=>{Se(this,Xt,_n).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>$(this,wt).canRun(this)}));const n=this.state.status==="pending",r=!$(this,Bn).canStart();try{if(!n){Se(this,Xt,_n).call(this,{type:"pending",variables:e,isPaused:r}),await((s=(i=$(this,wt).config).onMutate)==null?void 0:s.call(i,e,this));const W=await((u=(o=this.options).onMutate)==null?void 0:u.call(o,e));W!==this.state.context&&Se(this,Xt,_n).call(this,{type:"pending",context:W,variables:e,isPaused:r})}const R=await $(this,Bn).start();return await((a=(l=$(this,wt).config).onSuccess)==null?void 0:a.call(l,R,e,this.state.context,this)),await((c=(f=this.options).onSuccess)==null?void 0:c.call(f,R,e,this.state.context)),await((p=(d=$(this,wt).config).onSettled)==null?void 0:p.call(d,R,null,this.state.variables,this.state.context,this)),await((_=(m=this.options).onSettled)==null?void 0:_.call(m,R,null,e,this.state.context)),Se(this,Xt,_n).call(this,{type:"success",data:R}),R}catch(R){try{throw await((g=(v=$(this,wt).config).onError)==null?void 0:g.call(v,R,e,this.state.context,this)),await((k=(h=this.options).onError)==null?void 0:k.call(h,R,e,this.state.context)),await((S=(A=$(this,wt).config).onSettled)==null?void 0:S.call(A,void 0,R,this.state.variables,this.state.context,this)),await((L=(C=this.options).onSettled)==null?void 0:L.call(C,void 0,R,e,this.state.context)),R}finally{Se(this,Xt,_n).call(this,{type:"error",error:R})}}finally{$(this,wt).runNext(this)}}},Zt=new WeakMap,wt=new WeakMap,Bn=new WeakMap,Xt=new WeakSet,_n=function(e){const n=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),ut.batch(()=>{$(this,Zt).forEach(r=>{r.onMutationUpdate(e)}),$(this,wt).notify({mutation:this,type:"updated",action:e})})},ea);function Ca(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var un,Kt,ui,ta,Yf=(ta=class extends Rr{constructor(e={}){super();be(this,un);be(this,Kt);be(this,ui);this.config=e,se(this,un,new Set),se(this,Kt,new Map),se(this,ui,0)}build(e,n,r){const i=new Gf({mutationCache:this,mutationId:++Oi(this,ui)._,options:e.defaultMutationOptions(n),state:r});return this.add(i),i}add(e){$(this,un).add(e);const n=Ti(e);if(typeof n=="string"){const r=$(this,Kt).get(n);r?r.push(e):$(this,Kt).set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if($(this,un).delete(e)){const n=Ti(e);if(typeof n=="string"){const r=$(this,Kt).get(n);if(r)if(r.length>1){const i=r.indexOf(e);i!==-1&&r.splice(i,1)}else r[0]===e&&$(this,Kt).delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=Ti(e);if(typeof n=="string"){const r=$(this,Kt).get(n),i=r==null?void 0:r.find(s=>s.state.status==="pending");return!i||i===e}else return!0}runNext(e){var r;const n=Ti(e);if(typeof n=="string"){const i=(r=$(this,Kt).get(n))==null?void 0:r.find(s=>s!==e&&s.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){ut.batch(()=>{$(this,un).forEach(e=>{this.notify({type:"removed",mutation:e})}),$(this,un).clear(),$(this,Kt).clear()})}getAll(){return Array.from($(this,un))}find(e){const n={exact:!0,...e};return this.getAll().find(r=>Ho(n,r))}findAll(e={}){return this.getAll().filter(n=>Ho(e,n))}notify(e){ut.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return ut.batch(()=>Promise.all(e.map(n=>n.continue().catch(Ht))))}},un=new WeakMap,Kt=new WeakMap,ui=new WeakMap,ta);function Ti(t){var e;return(e=t.options.scope)==null?void 0:e.id}function Bo(t){return{onFetch:(e,n)=>{var f,c,d,p,m;const r=e.options,i=(d=(c=(f=e.fetchOptions)==null?void 0:f.meta)==null?void 0:c.fetchMore)==null?void 0:d.direction,s=((p=e.state.data)==null?void 0:p.pages)||[],o=((m=e.state.data)==null?void 0:m.pageParams)||[];let u={pages:[],pageParams:[]},l=0;const a=async()=>{let _=!1;const v=k=>{Object.defineProperty(k,"signal",{enumerable:!0,get:()=>(e.signal.aborted?_=!0:e.signal.addEventListener("abort",()=>{_=!0}),e.signal)})},g=_a(e.options,e.fetchOptions),h=async(k,A,S)=>{if(_)return Promise.reject();if(A==null&&k.pages.length)return Promise.resolve(k);const C={queryKey:e.queryKey,pageParam:A,direction:S?"backward":"forward",meta:e.options.meta};v(C);const L=await g(C),{maxPages:R}=e.options,W=S?Uf:Vf;return{pages:W(k.pages,L,R),pageParams:W(k.pageParams,A,R)}};if(i&&s.length){const k=i==="backward",A=k?Zf:Ko,S={pages:s,pageParams:o},C=A(r,S);u=await h(S,C,k)}else{const k=t??s.length;do{const A=l===0?o[0]??r.initialPageParam:Ko(r,u);if(l>0&&A==null)break;u=await h(u,A),l++}while(l<k)}return u};e.options.persister?e.fetchFn=()=>{var _,v;return(v=(_=e.options).persister)==null?void 0:v.call(_,a,{queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n)}:e.fetchFn=a}}}function Ko(t,{pages:e,pageParams:n}){const r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,n[r],n):void 0}function Zf(t,{pages:e,pageParams:n}){var r;return e.length>0?(r=t.getPreviousPageParam)==null?void 0:r.call(t,e[0],e,n[0],n):void 0}var nt,vn,kn,gr,br,Cn,yr,vr,na,Ea=(na=class{constructor(t={}){be(this,nt);be(this,vn);be(this,kn);be(this,gr);be(this,br);be(this,Cn);be(this,yr);be(this,vr);se(this,nt,t.queryCache||new zf),se(this,vn,t.mutationCache||new Yf),se(this,kn,t.defaultOptions||{}),se(this,gr,new Map),se(this,br,new Map),se(this,Cn,0)}mount(){Oi(this,Cn)._++,$(this,Cn)===1&&(se(this,yr,ho.subscribe(async t=>{t&&(await this.resumePausedMutations(),$(this,nt).onFocus())})),se(this,vr,Wi.subscribe(async t=>{t&&(await this.resumePausedMutations(),$(this,nt).onOnline())})))}unmount(){var t,e;Oi(this,Cn)._--,$(this,Cn)===0&&((t=$(this,yr))==null||t.call(this),se(this,yr,void 0),(e=$(this,vr))==null||e.call(this),se(this,vr,void 0))}isFetching(t){return $(this,nt).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return $(this,vn).findAll({...t,status:"pending"}).length}getQueryData(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=$(this,nt).get(e.queryHash))==null?void 0:n.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),n=$(this,nt).build(this,e),r=n.state.data;return r===void 0?this.fetchQuery(t):(t.revalidateIfStale&&n.isStaleByTime(ur(e.staleTime,n))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(t){return $(this,nt).findAll(t).map(({queryKey:e,state:n})=>{const r=n.data;return[e,r]})}setQueryData(t,e,n){const r=this.defaultQueryOptions({queryKey:t}),i=$(this,nt).get(r.queryHash),s=i==null?void 0:i.state.data,o=Nf(e,s);if(o!==void 0)return $(this,nt).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(t,e,n){return ut.batch(()=>$(this,nt).findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,n)]))}getQueryState(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=$(this,nt).get(e.queryHash))==null?void 0:n.state}removeQueries(t){const e=$(this,nt);ut.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=$(this,nt),r={type:"active",...t};return ut.batch(()=>(n.findAll(t).forEach(i=>{i.reset()}),this.refetchQueries(r,e)))}cancelQueries(t,e={}){const n={revert:!0,...e},r=ut.batch(()=>$(this,nt).findAll(t).map(i=>i.cancel(n)));return Promise.all(r).then(Ht).catch(Ht)}invalidateQueries(t,e={}){return ut.batch(()=>{if($(this,nt).findAll(t).forEach(r=>{r.invalidate()}),(t==null?void 0:t.refetchType)==="none")return Promise.resolve();const n={...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"};return this.refetchQueries(n,e)})}refetchQueries(t,e={}){const n={...e,cancelRefetch:e.cancelRefetch??!0},r=ut.batch(()=>$(this,nt).findAll(t).filter(i=>!i.isDisabled()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(Ht)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Ht)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=$(this,nt).build(this,e);return n.isStaleByTime(ur(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Ht).catch(Ht)}fetchInfiniteQuery(t){return t.behavior=Bo(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Ht).catch(Ht)}ensureInfiniteQueryData(t){return t.behavior=Bo(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return Wi.isOnline()?$(this,vn).resumePausedMutations():Promise.resolve()}getQueryCache(){return $(this,nt)}getMutationCache(){return $(this,vn)}getDefaultOptions(){return $(this,kn)}setDefaultOptions(t){se(this,kn,t)}setQueryDefaults(t,e){$(this,gr).set(Qn(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...$(this,gr).values()],n={};return e.forEach(r=>{Jr(t,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(t,e){$(this,br).set(Qn(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...$(this,br).values()];let n={};return e.forEach(r=>{Jr(t,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...$(this,kn).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=mo(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===po&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...$(this,kn).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){$(this,nt).clear(),$(this,vn).clear()}},nt=new WeakMap,vn=new WeakMap,kn=new WeakMap,gr=new WeakMap,br=new WeakMap,Cn=new WeakMap,yr=new WeakMap,vr=new WeakMap,na),St,Ve,ai,Ot,Kn,kr,En,Jt,fi,Cr,Er,jn,qn,wn,wr,Ye,Qr,Us,Bs,Ks,js,qs,Ws,Qs,wa,ra,Xf=(ra=class extends Rr{constructor(e,n){super();be(this,Ye);be(this,St);be(this,Ve);be(this,ai);be(this,Ot);be(this,Kn);be(this,kr);be(this,En);be(this,Jt);be(this,fi);be(this,Cr);be(this,Er);be(this,jn);be(this,qn);be(this,wn);be(this,wr,new Set);this.options=n,se(this,St,e),se(this,Jt,null),se(this,En,Vs()),this.options.experimental_prefetchInRender||$(this,En).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&($(this,Ve).addObserver(this),jo($(this,Ve),this.options)?Se(this,Ye,Qr).call(this):this.updateResult(),Se(this,Ye,js).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return zs($(this,Ve),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return zs($(this,Ve),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Se(this,Ye,qs).call(this),Se(this,Ye,Ws).call(this),$(this,Ve).removeObserver(this)}setOptions(e,n){const r=this.options,i=$(this,Ve);if(this.options=$(this,St).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof jt(this.options.enabled,$(this,Ve))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Se(this,Ye,Qs).call(this),$(this,Ve).setOptions(this.options),r._defaulted&&!qi(this.options,r)&&$(this,St).getQueryCache().notify({type:"observerOptionsUpdated",query:$(this,Ve),observer:this});const s=this.hasListeners();s&&qo($(this,Ve),i,this.options,r)&&Se(this,Ye,Qr).call(this),this.updateResult(n),s&&($(this,Ve)!==i||jt(this.options.enabled,$(this,Ve))!==jt(r.enabled,$(this,Ve))||ur(this.options.staleTime,$(this,Ve))!==ur(r.staleTime,$(this,Ve)))&&Se(this,Ye,Us).call(this);const o=Se(this,Ye,Bs).call(this);s&&($(this,Ve)!==i||jt(this.options.enabled,$(this,Ve))!==jt(r.enabled,$(this,Ve))||o!==$(this,wn))&&Se(this,Ye,Ks).call(this,o)}getOptimisticResult(e){const n=$(this,St).getQueryCache().build($(this,St),e),r=this.createResult(n,e);return xf(this,r)&&(se(this,Ot,r),se(this,kr,this.options),se(this,Kn,$(this,Ve).state)),r}getCurrentResult(){return $(this,Ot)}trackResult(e,n){const r={};return Object.keys(e).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),n==null||n(i),e[i])})}),r}trackProp(e){$(this,wr).add(e)}getCurrentQuery(){return $(this,Ve)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const n=$(this,St).defaultQueryOptions(e),r=$(this,St).getQueryCache().build($(this,St),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(e){return Se(this,Ye,Qr).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),$(this,Ot)))}createResult(e,n){var R;const r=$(this,Ve),i=this.options,s=$(this,Ot),o=$(this,Kn),u=$(this,kr),a=e!==r?e.state:$(this,ai),{state:f}=e;let c={...f},d=!1,p;if(n._optimisticResults){const W=this.hasListeners(),K=!W&&jo(e,n),T=W&&qo(e,r,n,i);(K||T)&&(c={...c,...ka(f.data,e.options)}),n._optimisticResults==="isRestoring"&&(c.fetchStatus="idle")}let{error:m,errorUpdatedAt:_,status:v}=c;if(n.select&&c.data!==void 0)if(s&&c.data===(o==null?void 0:o.data)&&n.select===$(this,fi))p=$(this,Cr);else try{se(this,fi,n.select),p=n.select(c.data),p=Hs(s==null?void 0:s.data,p,n),se(this,Cr,p),se(this,Jt,null)}catch(W){se(this,Jt,W)}else p=c.data;if(n.placeholderData!==void 0&&p===void 0&&v==="pending"){let W;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(u==null?void 0:u.placeholderData))W=s.data;else if(W=typeof n.placeholderData=="function"?n.placeholderData((R=$(this,Er))==null?void 0:R.state.data,$(this,Er)):n.placeholderData,n.select&&W!==void 0)try{W=n.select(W),se(this,Jt,null)}catch(K){se(this,Jt,K)}W!==void 0&&(v="success",p=Hs(s==null?void 0:s.data,W,n),d=!0)}$(this,Jt)&&(m=$(this,Jt),p=$(this,Cr),_=Date.now(),v="error");const g=c.fetchStatus==="fetching",h=v==="pending",k=v==="error",A=h&&g,S=p!==void 0,L={status:v,fetchStatus:c.fetchStatus,isPending:h,isSuccess:v==="success",isError:k,isInitialLoading:A,isLoading:A,data:p,dataUpdatedAt:c.dataUpdatedAt,error:m,errorUpdatedAt:_,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>a.dataUpdateCount||c.errorUpdateCount>a.errorUpdateCount,isFetching:g,isRefetching:g&&!h,isLoadingError:k&&!S,isPaused:c.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:k&&S,isStale:_o(e,n),refetch:this.refetch,promise:$(this,En)};if(this.options.experimental_prefetchInRender){const W=B=>{L.status==="error"?B.reject(L.error):L.data!==void 0&&B.resolve(L.data)},K=()=>{const B=se(this,En,L.promise=Vs());W(B)},T=$(this,En);switch(T.status){case"pending":e.queryHash===r.queryHash&&W(T);break;case"fulfilled":(L.status==="error"||L.data!==T.value)&&K();break;case"rejected":(L.status!=="error"||L.error!==T.reason)&&K();break}}return L}updateResult(e){const n=$(this,Ot),r=this.createResult($(this,Ve),this.options);if(se(this,Kn,$(this,Ve).state),se(this,kr,this.options),$(this,Kn).data!==void 0&&se(this,Er,$(this,Ve)),qi(r,n))return;se(this,Ot,r);const i={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,u=typeof o=="function"?o():o;if(u==="all"||!u&&!$(this,wr).size)return!0;const l=new Set(u??$(this,wr));return this.options.throwOnError&&l.add("error"),Object.keys($(this,Ot)).some(a=>{const f=a;return $(this,Ot)[f]!==n[f]&&l.has(f)})};(e==null?void 0:e.listeners)!==!1&&s()&&(i.listeners=!0),Se(this,Ye,wa).call(this,{...i,...e})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Se(this,Ye,js).call(this)}},St=new WeakMap,Ve=new WeakMap,ai=new WeakMap,Ot=new WeakMap,Kn=new WeakMap,kr=new WeakMap,En=new WeakMap,Jt=new WeakMap,fi=new WeakMap,Cr=new WeakMap,Er=new WeakMap,jn=new WeakMap,qn=new WeakMap,wn=new WeakMap,wr=new WeakMap,Ye=new WeakSet,Qr=function(e){Se(this,Ye,Qs).call(this);let n=$(this,Ve).fetch(this.options,e);return e!=null&&e.throwOnError||(n=n.catch(Ht)),n},Us=function(){Se(this,Ye,qs).call(this);const e=ur(this.options.staleTime,$(this,Ve));if(Or||$(this,Ot).isStale||!Ms(e))return;const r=pa($(this,Ot).dataUpdatedAt,e)+1;se(this,jn,setTimeout(()=>{$(this,Ot).isStale||this.updateResult()},r))},Bs=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval($(this,Ve)):this.options.refetchInterval)??!1},Ks=function(e){Se(this,Ye,Ws).call(this),se(this,wn,e),!(Or||jt(this.options.enabled,$(this,Ve))===!1||!Ms($(this,wn))||$(this,wn)===0)&&se(this,qn,setInterval(()=>{(this.options.refetchIntervalInBackground||ho.isFocused())&&Se(this,Ye,Qr).call(this)},$(this,wn)))},js=function(){Se(this,Ye,Us).call(this),Se(this,Ye,Ks).call(this,Se(this,Ye,Bs).call(this))},qs=function(){$(this,jn)&&(clearTimeout($(this,jn)),se(this,jn,void 0))},Ws=function(){$(this,qn)&&(clearInterval($(this,qn)),se(this,qn,void 0))},Qs=function(){const e=$(this,St).getQueryCache().build($(this,St),this.options);if(e===$(this,Ve))return;const n=$(this,Ve);se(this,Ve,e),se(this,ai,e.state),this.hasListeners()&&(n==null||n.removeObserver(this),e.addObserver(this))},wa=function(e){ut.batch(()=>{e.listeners&&this.listeners.forEach(n=>{n($(this,Ot))}),$(this,St).getQueryCache().notify({query:$(this,Ve),type:"observerResultsUpdated"})})},ra);function Jf(t,e){return jt(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function jo(t,e){return Jf(t,e)||t.state.data!==void 0&&zs(t,e,e.refetchOnMount)}function zs(t,e,n){if(jt(e.enabled,t)!==!1){const r=typeof n=="function"?n(t):n;return r==="always"||r!==!1&&_o(t,e)}return!1}function qo(t,e,n,r){return(t!==e||jt(r.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&_o(t,n)}function _o(t,e){return jt(e.enabled,t)!==!1&&t.isStaleByTime(ur(e.staleTime,t))}function xf(t,e){return!qi(t.getCurrentResult(),e)}var On,An,Rt,an,dn,Ni,Gs,ia,ec=(ia=class extends Rr{constructor(n,r){super();be(this,dn);be(this,On);be(this,An);be(this,Rt);be(this,an);se(this,On,n),this.setOptions(r),this.bindMethods(),Se(this,dn,Ni).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var i;const r=this.options;this.options=$(this,On).defaultMutationOptions(n),qi(this.options,r)||$(this,On).getMutationCache().notify({type:"observerOptionsUpdated",mutation:$(this,Rt),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Qn(r.mutationKey)!==Qn(this.options.mutationKey)?this.reset():((i=$(this,Rt))==null?void 0:i.state.status)==="pending"&&$(this,Rt).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=$(this,Rt))==null||n.removeObserver(this)}onMutationUpdate(n){Se(this,dn,Ni).call(this),Se(this,dn,Gs).call(this,n)}getCurrentResult(){return $(this,An)}reset(){var n;(n=$(this,Rt))==null||n.removeObserver(this),se(this,Rt,void 0),Se(this,dn,Ni).call(this),Se(this,dn,Gs).call(this)}mutate(n,r){var i;return se(this,an,r),(i=$(this,Rt))==null||i.removeObserver(this),se(this,Rt,$(this,On).getMutationCache().build($(this,On),this.options)),$(this,Rt).addObserver(this),$(this,Rt).execute(n)}},On=new WeakMap,An=new WeakMap,Rt=new WeakMap,an=new WeakMap,dn=new WeakSet,Ni=function(){var r;const n=((r=$(this,Rt))==null?void 0:r.state)??Ca();se(this,An,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Gs=function(n){ut.batch(()=>{var r,i,s,o,u,l,a,f;if($(this,an)&&this.hasListeners()){const c=$(this,An).variables,d=$(this,An).context;(n==null?void 0:n.type)==="success"?((i=(r=$(this,an)).onSuccess)==null||i.call(r,n.data,c,d),(o=(s=$(this,an)).onSettled)==null||o.call(s,n.data,null,c,d)):(n==null?void 0:n.type)==="error"&&((l=(u=$(this,an)).onError)==null||l.call(u,n.error,c,d),(f=(a=$(this,an)).onSettled)==null||f.call(a,void 0,n.error,c,d))}this.listeners.forEach(c=>{c($(this,An))})})},ia);const tr=[];function gt(t,e){return{subscribe:Fe(t,e).subscribe}}function Fe(t,e=ce){let n;const r=new Set;function i(u){if(fe(t,u)&&(t=u,n)){const l=!tr.length;for(const a of r)a[1](),tr.push(a,t);if(l){for(let a=0;a<tr.length;a+=2)tr[a][0](tr[a+1]);tr.length=0}}}function s(u){i(u(t))}function o(u,l=ce){const a=[u,l];return r.add(a),r.size===1&&(n=e(i,s)||ce),u(t),()=>{r.delete(a),r.size===0&&n&&(n(),n=null)}}return{set:i,update:s,subscribe:o}}function ze(t,e,n){const r=!Array.isArray(t),i=r?[t]:t;if(!i.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const s=e.length<2;return gt(n,(o,u)=>{let l=!1;const a=[];let f=0,c=ce;const d=()=>{if(f)return;c();const m=e(r?a[0]:a,o,u);s?o(m):c=Zn(m)?m:ce},p=i.map((m,_)=>oo(m,v=>{a[_]=v,f&=~(1<<_),l&&d()},()=>{f|=1<<_}));return l=!0,d(),function(){Te(p),c(),l=!1}})}function Wo(t){return{subscribe:t.subscribe.bind(t)}}const Oa="$$_queryClient",tc=()=>{const t=bt(Oa);if(!t)throw new Error("No QueryClient was found in Svelte context. Did you forget to wrap your component with QueryClientProvider?");return t},nc=t=>{At(Oa,t)},rc="$$_isRestoring",ic=()=>{try{const t=bt(rc);return t||gt(!1)}catch{return gt(!1)}};function sc(){return ic()}function vt(t){return tc()}function Aa(t){return"subscribe"in t&&typeof t.subscribe=="function"}function Ta(){}function oc(t,e,n){const r=vt(),i=sc(),s=Aa(t)?t:gt(t),o=ze([s,i],([f,c])=>{const d=r.defaultQueryOptions(f);return d._optimisticResults=c?"isRestoring":"optimistic",d}),u=new e(r,Sr(o));o.subscribe(f=>{u.setOptions(f,{listeners:!1})});const l=ze(i,(f,c)=>{const d=f?Ta:u.subscribe(ut.batchCalls(c));return u.updateResult(),d}),{subscribe:a}=ze([l,o],([f,c])=>(f=u.getOptimisticResult(c),c.notifyOnChangeProps?f:u.trackResult(f)));return{subscribe:a}}function Ar(t,e){return oc(t,Xf)}function mi(t,e){const n=vt(),r=Aa(t)?t:gt(t),i=new ec(n,Sr(r));let s;r.subscribe(l=>{s=(a,f)=>{i.mutate(a,f).catch(Ta)},i.setOptions(l)});const o=gt(i.getCurrentResult(),l=>i.subscribe(ut.batchCalls(a=>l(a)))),{subscribe:u}=ze(o,l=>({...l,mutate:s,mutateAsync:l.mutate}));return{subscribe:u}}function lc(t){let e;const n=t[2].default,r=pe(n,t,t[1],null);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,[s]){r&&r.p&&(!e||s&2)&&_e(r,n,i,i[1],e?he(n,i[1],s,null):ge(i[1]),null)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function uc(t,e,n){let{$$slots:r={},$$scope:i}=e,{client:s=new Ea}=e;return rs(()=>{s.mount()}),nc(s),is(()=>{s.unmount()}),t.$$set=o=>{"client"in o&&n(0,s=o.client),"$$scope"in o&&n(1,i=o.$$scope)},[s,i,r]}class ac extends ve{constructor(e){super(),ye(this,e,uc,lc,fe,{client:0})}}var Qo=Object.prototype.hasOwnProperty;function zo(t,e,n){for(n of t.keys())if(ar(n,e))return n}function ar(t,e){var n,r,i;if(t===e)return!0;if(t&&e&&(n=t.constructor)===e.constructor){if(n===Date)return t.getTime()===e.getTime();if(n===RegExp)return t.toString()===e.toString();if(n===Array){if((r=t.length)===e.length)for(;r--&&ar(t[r],e[r]););return r===-1}if(n===Set){if(t.size!==e.size)return!1;for(r of t)if(i=r,i&&typeof i=="object"&&(i=zo(e,i),!i)||!e.has(i))return!1;return!0}if(n===Map){if(t.size!==e.size)return!1;for(r of t)if(i=r[0],i&&typeof i=="object"&&(i=zo(e,i),!i)||!ar(r[1],e.get(i)))return!1;return!0}if(n===ArrayBuffer)t=new Uint8Array(t),e=new Uint8Array(e);else if(n===DataView){if((r=t.byteLength)===e.byteLength)for(;r--&&t.getInt8(r)===e.getInt8(r););return r===-1}if(ArrayBuffer.isView(t)){if((r=t.byteLength)===e.byteLength)for(;r--&&t[r]===e[r];);return r===-1}if(!n||typeof t=="object"){r=0;for(n in t)if(Qo.call(t,n)&&++r&&!Qo.call(e,n)||!(n in e)||!ar(t[n],e[n]))return!1;return Object.keys(e).length===r}}return t!==t&&e!==e}function Z0(t,e,n,r=!0){const i=e-n;return i<=0?r?t[t.length-1]:t[0]:t[i]}function X0(t,e,n,r=!0){const i=e+n;return i>t.length-1?r?t[0]:t[t.length-1]:t[i]}function J0(t,e,n=!0){return e===t.length-1?n?t[0]:t[e]:t[e+1]}function x0(t,e,n=!0){return e<=0?n?t[t.length-1]:t[0]:t[e-1]}function fc(t){return t[t.length-1]}function cc(t,e){return t.map((n,r)=>t[(e+r)%t.length])}function ey(t,e,n=ar){const r=e.findIndex(i=>n(i,t));return r!==-1?e.splice(r,1):e.push(t),e}function Ft(t){return Object.keys(t).reduce((e,n)=>t[n]===void 0?e:e+`${n}:${t[n]};`,"")}function Yr(t){return t?!0:void 0}Ft({position:"absolute",opacity:0,"pointer-events":"none",margin:0,transform:"translateX(-100%)"});function ss(t){if(t!==null)return""}function Go(t){function e(n){return n(t),()=>{}}return{subscribe:e}}function ty(t){if(!mt)return null;const e=document.querySelector(`[data-melt-id="${t}"]`);return x(e)?e:null}const $i=t=>new Proxy(t,{get(e,n,r){return Reflect.get(e,n,r)},ownKeys(e){return Reflect.ownKeys(e).filter(n=>n!=="action")}}),Yo=t=>typeof t=="function";Pe("empty");function Pe(t,e){const{stores:n,action:r,returned:i}=e??{},s=(()=>{if(n&&i)return ze(n,u=>{const l=i(u);if(Yo(l)){const a=(...f)=>$i({...l(...f),[`data-melt-${t}`]:"",action:r??Qe});return a.action=r??Qe,a}return $i({...l,[`data-melt-${t}`]:"",action:r??Qe})});{const u=i,l=u==null?void 0:u();if(Yo(l)){const a=(...f)=>$i({...l(...f),[`data-melt-${t}`]:"",action:r??Qe});return a.action=r??Qe,Go(a)}return Go($i({...l,[`data-melt-${t}`]:"",action:r??Qe}))}})(),o=r??(()=>{});return o.subscribe=s.subscribe,o}function Xn(t){const e=s=>s?`${t}-${s}`:t,n=s=>`data-melt-${t}${s?`-${s}`:""}`,r=s=>`[data-melt-${t}${s?`-${s}`:""}]`;return{name:e,attribute:n,selector:r,getEl:s=>document.querySelector(r(s))}}const mt=typeof document<"u",$a=t=>typeof t=="function";function pi(t){return t instanceof Element}function x(t){return t instanceof HTMLElement}function ny(t){return t instanceof HTMLInputElement}function ry(t){return t instanceof HTMLLabelElement}function iy(t){return t instanceof HTMLButtonElement}function on(t){const e=t.getAttribute("aria-disabled"),n=t.getAttribute("disabled"),r=t.hasAttribute("data-disabled");return!!(e==="true"||n!==null||r)}function sy(t){return x(t)?t.isContentEditable:!1}function dc(t){return t!==null&&typeof t=="object"}function Sa(t){return dc(t)&&"subscribe"in t}function rt(...t){return(...e)=>{for(const n of t)typeof n=="function"&&n(...e)}}function Qe(){}function _t(t,e,n,r){const i=Array.isArray(e)?e:[e];return i.forEach(s=>t.addEventListener(s,n,r)),()=>{i.forEach(s=>t.removeEventListener(s,n,r))}}function ke(t,e,n,r){const i=Array.isArray(e)?e:[e];if(typeof n=="function"){const s=pc(o=>n(o));return i.forEach(o=>t.addEventListener(o,s,r)),()=>{i.forEach(o=>t.removeEventListener(o,s,r))}}return()=>void 0}function mc(t){const e=t.currentTarget;if(!x(e))return null;const n=new CustomEvent(`m-${t.type}`,{detail:{originalEvent:t},cancelable:!0});return e.dispatchEvent(n),n}function pc(t){return e=>{const n=mc(e);if(!(n!=null&&n.defaultPrevented))return t(e)}}function Ys(t){t.setAttribute("data-highlighted","")}function gn(t){t.removeAttribute("data-highlighted")}const xr=t=>{try{rs(t)}catch{return t}},Ra=t=>{try{is(t)}catch{return t}};function Dr(t,...e){const n={};for(const r of Object.keys(t))e.includes(r)||(n[r]=t[r]);return n}function oy(t,e,n){return Object.fromEntries(Object.entries(t).filter(([r,i])=>!ar(i,e)))}function hc(t){const e={};for(const n in t){const r=t[n];r!==void 0&&(e[n]=r)}return e}function Xe(t){return{...t,get:()=>Sr(t)}}Xe.writable=function(t){const e=Fe(t);let n=t;return{subscribe:e.subscribe,set(r){e.set(r),n=r},update(r){const i=r(n);e.set(i),n=i},get(){return n}}};Xe.derived=function(t,e){const n=new Map,r=()=>{const s=Array.isArray(t)?t.map(o=>o.get()):t.get();return e(s)};return{get:r,subscribe:s=>{const o=[];return(Array.isArray(t)?t:[t]).forEach(l=>{o.push(l.subscribe(()=>{s(r())}))}),s(r()),n.set(s,o),()=>{const l=n.get(s);if(l)for(const a of l)a();n.delete(s)}}}};const fr=(t,e)=>{const n=Xe(t),r=(s,o)=>{n.update(u=>{const l=s(u);let a=l;return e&&(a=e({curr:u,next:l})),o==null||o(a),a})};return{...n,update:r,set:s=>{r(()=>s)}}};function fn(t){return new Promise(e=>setTimeout(e,t))}let _c="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Da=(t=21)=>{let e="",n=t|0;for(;n--;)e+=_c[Math.random()*64|0];return e};function gc(){return Da(10)}function ei(t){return t.reduce((e,n)=>(e[n]=gc(),e),{})}const ae={ALT:"Alt",ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",BACKSPACE:"Backspace",CAPS_LOCK:"CapsLock",CONTROL:"Control",DELETE:"Delete",END:"End",ENTER:"Enter",ESCAPE:"Escape",F1:"F1",F10:"F10",F11:"F11",F12:"F12",F2:"F2",F3:"F3",F4:"F4",F5:"F5",F6:"F6",F7:"F7",F8:"F8",F9:"F9",HOME:"Home",META:"Meta",PAGE_DOWN:"PageDown",PAGE_UP:"PageUp",SHIFT:"Shift",SPACE:" ",TAB:"Tab",CTRL:"Control",ASTERISK:"*",A:"a",P:"p"},bc=[ae.ARROW_DOWN,ae.PAGE_UP,ae.HOME],yc=[ae.ARROW_UP,ae.PAGE_DOWN,ae.END],Zs=[...bc,...yc],ti=[ae.ENTER,ae.SPACE],vc=(t="ltr",e="horizontal")=>({horizontal:t==="rtl"?ae.ARROW_LEFT:ae.ARROW_RIGHT,vertical:ae.ARROW_DOWN})[e],kc=(t="ltr",e="horizontal")=>({horizontal:t==="rtl"?ae.ARROW_RIGHT:ae.ARROW_LEFT,vertical:ae.ARROW_UP})[e],ly=(t="ltr",e="horizontal")=>({nextKey:vc(t,e),prevKey:kc(t,e)});function Cc(t,e=500){let n=null;return function(...r){const i=()=>{n=null,t(...r)};n&&clearTimeout(n),n=setTimeout(i,e)}}const Fa=()=>typeof window<"u";function Ec(){const t=navigator.userAgentData;return(t==null?void 0:t.platform)??navigator.platform}const Pa=t=>Fa()&&t.test(Ec().toLowerCase()),wc=()=>Fa()&&!!navigator.maxTouchPoints,Oc=()=>Pa(/^mac/)&&!wc(),Ac=()=>Pa(/mac|iphone|ipad|ipod/i),Tc=()=>Ac()&&!Oc(),Cs="data-melt-scroll-lock";function Zo(t,e){if(!t)return;const n=t.style.cssText;return Object.assign(t.style,e),()=>{t.style.cssText=n}}function $c(t,e,n){if(!t)return;const r=t.style.getPropertyValue(e);return t.style.setProperty(e,n),()=>{r?t.style.setProperty(e,r):t.style.removeProperty(e)}}function Sc(t){const e=t.getBoundingClientRect().left;return Math.round(e)+t.scrollLeft?"paddingLeft":"paddingRight"}function go(t){const e=document,n=e.defaultView??window,{documentElement:r,body:i}=e;if(i.hasAttribute(Cs))return Qe;i.setAttribute(Cs,"");const o=n.innerWidth-r.clientWidth,u=()=>$c(r,"--scrollbar-width",`${o}px`),l=Sc(r),a=n.getComputedStyle(i)[l],f=()=>Zo(i,{overflow:"hidden",[l]:`calc(${a} + ${o}px)`}),c=()=>{const{scrollX:p,scrollY:m,visualViewport:_}=n,v=(_==null?void 0:_.offsetLeft)??0,g=(_==null?void 0:_.offsetTop)??0,h=Zo(i,{position:"fixed",overflow:"hidden",top:`${-(m-Math.floor(g))}px`,left:`${-(p-Math.floor(v))}px`,right:"0",[l]:`calc(${a} + ${o}px)`});return()=>{h==null||h(),n.scrollTo(p,m)}},d=[u(),Tc()?c():f()];return()=>{d.forEach(p=>p==null?void 0:p()),i.removeAttribute(Cs)}}function Qi(t){const{open:e,forceVisible:n,activeTrigger:r}=t;return ze([e,n,r],([i,s,o])=>(i||s)&&o!==null)}function xe(t,e){let n;const r=ze(t,s=>{n==null||n(),n=e(s)}).subscribe(Qe),i=()=>{r(),n==null||n()};return Ra(i),i}function Lt(t){const e={};return Object.keys(t).forEach(n=>{const r=n,i=t[r];e[r]=Xe(Fe(i))}),e}function et(t){mt&&fn(1).then(()=>{const e=document.activeElement;!x(e)||e===t||(e.tabIndex=-1,t&&(t.tabIndex=0,t.focus()))})}function La(){return Array.from(document.querySelectorAll('a[href]:not([tabindex="-1"]), button:not([disabled]):not([tabindex="-1"]), input:not([disabled]):not([tabindex="-1"]), select:not([disabled]):not([tabindex="-1"]), textarea:not([disabled]):not([tabindex="-1"]), [tabindex]:not([tabindex="-1"])'))}function Ia(t){const e=La(),r=e.indexOf(t)+1,i=e[r];return r<e.length&&x(i)?i:null}function Ma(t){const e=La(),r=e.indexOf(t)-1,i=e[r];return r>=0&&x(i)?i:null}const Rc=new Set(["Shift","Control","Alt","Meta","CapsLock","NumLock"]),Dc={onMatch:et,getCurrentItem:()=>document.activeElement};function Fc(t={}){const e={...Dc,...t},n=Xe(Fe([])),r=Cc(()=>{n.update(()=>[])});return{typed:n,resetTyped:r,handleTypeaheadSearch:(s,o)=>{if(Rc.has(s))return;const u=e.getCurrentItem(),l=Sr(n);if(!Array.isArray(l))return;l.push(s.toLowerCase()),n.set(l);const a=o.filter(v=>!(v.getAttribute("disabled")==="true"||v.getAttribute("aria-disabled")==="true"||v.hasAttribute("data-disabled"))),c=l.length>1&&l.every(v=>v===l[0])?l[0]:l.join(""),d=x(u)?a.indexOf(u):-1;let p=cc(a,Math.max(d,0));c.length===1&&(p=p.filter(v=>v!==u));const _=p.find(v=>(v==null?void 0:v.innerText)&&v.innerText.toLowerCase().startsWith(c.toLowerCase()));x(_)&&_!==u&&e.onMatch(_),r()}}}function Pc(t){let e=t.parentElement;for(;x(e)&&!e.hasAttribute("data-portal");)e=e.parentElement;return e||"body"}function Tr(t,e){return e!==void 0?e:Pc(t)==="body"?document.body:null}async function ni(t){const{prop:e,defaultEl:n}=t;if(await Promise.all([fn(1),qt]),e===void 0){n==null||n.focus();return}const r=$a(e)?e(n):e;if(typeof r=="string"){const i=document.querySelector(r);if(!x(i))return;i.focus()}else x(r)&&r.focus()}gt(void 0,t=>{function e(r){t(r),t(void 0)}return _t(document,"pointerup",e,{passive:!1,capture:!0})});const Lc=gt(void 0,t=>{function e(r){r&&r.key===ae.ESCAPE&&t(r),t(void 0)}return _t(document,"keydown",e,{passive:!1})}),ri=(t,e={})=>{let n=Qe;function r(i={}){n();const s={enabled:!0,...i},o=Sa(s.enabled)?s.enabled:gt(s.enabled);n=rt(Lc.subscribe(u=>{var a;if(!u||!Sr(o))return;const l=u.target;if(!(!x(l)||l.closest("[data-escapee]")!==t)){if(u.preventDefault(),s.ignore){if($a(s.ignore)){if(s.ignore(u))return}else if(Array.isArray(s.ignore)&&s.ignore.length>0&&s.ignore.some(f=>f&&l===f))return}(a=s.handler)==null||a.call(s,u)}}),xe(o,u=>{u?t.dataset.escapee="":delete t.dataset.escapee}))}return r(e),{update:r,destroy(){t.removeAttribute("data-escapee"),n()}}},$n=Math.min,Dt=Math.max,zi=Math.round,Si=Math.floor,en=t=>({x:t,y:t}),Ic={left:"right",right:"left",bottom:"top",top:"bottom"},Mc={start:"end",end:"start"};function Xs(t,e,n){return Dt(t,$n(e,n))}function Fr(t,e){return typeof t=="function"?t(e):t}function Sn(t){return t.split("-")[0]}function Pr(t){return t.split("-")[1]}function Na(t){return t==="x"?"y":"x"}function bo(t){return t==="y"?"height":"width"}function zn(t){return["top","bottom"].includes(Sn(t))?"y":"x"}function yo(t){return Na(zn(t))}function Nc(t,e,n){n===void 0&&(n=!1);const r=Pr(t),i=yo(t),s=bo(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=Gi(o)),[o,Gi(o)]}function Hc(t){const e=Gi(t);return[Js(t),e,Js(e)]}function Js(t){return t.replace(/start|end/g,e=>Mc[e])}function Vc(t,e,n){const r=["left","right"],i=["right","left"],s=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:r:e?r:i;case"left":case"right":return e?s:o;default:return[]}}function Uc(t,e,n,r){const i=Pr(t);let s=Vc(Sn(t),n==="start",r);return i&&(s=s.map(o=>o+"-"+i),e&&(s=s.concat(s.map(Js)))),s}function Gi(t){return t.replace(/left|right|bottom|top/g,e=>Ic[e])}function Bc(t){return{top:0,right:0,bottom:0,left:0,...t}}function Ha(t){return typeof t!="number"?Bc(t):{top:t,right:t,bottom:t,left:t}}function Yi(t){const{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}function Xo(t,e,n){let{reference:r,floating:i}=t;const s=zn(e),o=yo(e),u=bo(o),l=Sn(e),a=s==="y",f=r.x+r.width/2-i.width/2,c=r.y+r.height/2-i.height/2,d=r[u]/2-i[u]/2;let p;switch(l){case"top":p={x:f,y:r.y-i.height};break;case"bottom":p={x:f,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:c};break;case"left":p={x:r.x-i.width,y:c};break;default:p={x:r.x,y:r.y}}switch(Pr(e)){case"start":p[o]-=d*(n&&a?-1:1);break;case"end":p[o]+=d*(n&&a?-1:1);break}return p}const Kc=async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=n,u=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let a=await o.getElementRects({reference:t,floating:e,strategy:i}),{x:f,y:c}=Xo(a,r,l),d=r,p={},m=0;for(let _=0;_<u.length;_++){const{name:v,fn:g}=u[_],{x:h,y:k,data:A,reset:S}=await g({x:f,y:c,initialPlacement:r,placement:d,strategy:i,middlewareData:p,rects:a,platform:o,elements:{reference:t,floating:e}});f=h??f,c=k??c,p={...p,[v]:{...p[v],...A}},S&&m<=50&&(m++,typeof S=="object"&&(S.placement&&(d=S.placement),S.rects&&(a=S.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:i}):S.rects),{x:f,y:c}=Xo(a,d,l)),_=-1)}return{x:f,y:c,placement:d,strategy:i,middlewareData:p}};async function vo(t,e){var n;e===void 0&&(e={});const{x:r,y:i,platform:s,rects:o,elements:u,strategy:l}=t,{boundary:a="clippingAncestors",rootBoundary:f="viewport",elementContext:c="floating",altBoundary:d=!1,padding:p=0}=Fr(e,t),m=Ha(p),v=u[d?c==="floating"?"reference":"floating":c],g=Yi(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(v)))==null||n?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(u.floating)),boundary:a,rootBoundary:f,strategy:l})),h=c==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,k=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u.floating)),A=await(s.isElement==null?void 0:s.isElement(k))?await(s.getScale==null?void 0:s.getScale(k))||{x:1,y:1}:{x:1,y:1},S=Yi(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:h,offsetParent:k,strategy:l}):h);return{top:(g.top-S.top+m.top)/A.y,bottom:(S.bottom-g.bottom+m.bottom)/A.y,left:(g.left-S.left+m.left)/A.x,right:(S.right-g.right+m.right)/A.x}}const jc=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:i,rects:s,platform:o,elements:u,middlewareData:l}=e,{element:a,padding:f=0}=Fr(t,e)||{};if(a==null)return{};const c=Ha(f),d={x:n,y:r},p=yo(i),m=bo(p),_=await o.getDimensions(a),v=p==="y",g=v?"top":"left",h=v?"bottom":"right",k=v?"clientHeight":"clientWidth",A=s.reference[m]+s.reference[p]-d[p]-s.floating[m],S=d[p]-s.reference[p],C=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a));let L=C?C[k]:0;(!L||!await(o.isElement==null?void 0:o.isElement(C)))&&(L=u.floating[k]||s.floating[m]);const R=A/2-S/2,W=L/2-_[m]/2-1,K=$n(c[g],W),T=$n(c[h],W),B=K,O=L-_[m]-T,P=L/2-_[m]/2+R,V=Xs(B,P,O),U=!l.arrow&&Pr(i)!=null&&P!==V&&s.reference[m]/2-(P<B?K:T)-_[m]/2<0,ee=U?P<B?P-B:P-O:0;return{[p]:d[p]+ee,data:{[p]:V,centerOffset:P-V-ee,...U&&{alignmentOffset:ee}},reset:U}}}),qc=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:i,middlewareData:s,rects:o,initialPlacement:u,platform:l,elements:a}=e,{mainAxis:f=!0,crossAxis:c=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:_=!0,...v}=Fr(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const g=Sn(i),h=zn(u),k=Sn(u)===u,A=await(l.isRTL==null?void 0:l.isRTL(a.floating)),S=d||(k||!_?[Gi(u)]:Hc(u)),C=m!=="none";!d&&C&&S.push(...Uc(u,_,m,A));const L=[u,...S],R=await vo(e,v),W=[];let K=((r=s.flip)==null?void 0:r.overflows)||[];if(f&&W.push(R[g]),c){const P=Nc(i,o,A);W.push(R[P[0]],R[P[1]])}if(K=[...K,{placement:i,overflows:W}],!W.every(P=>P<=0)){var T,B;const P=(((T=s.flip)==null?void 0:T.index)||0)+1,V=L[P];if(V)return{data:{index:P,overflows:K},reset:{placement:V}};let U=(B=K.filter(ee=>ee.overflows[0]<=0).sort((ee,te)=>ee.overflows[1]-te.overflows[1])[0])==null?void 0:B.placement;if(!U)switch(p){case"bestFit":{var O;const ee=(O=K.filter(te=>{if(C){const z=zn(te.placement);return z===h||z==="y"}return!0}).map(te=>[te.placement,te.overflows.filter(z=>z>0).reduce((z,oe)=>z+oe,0)]).sort((te,z)=>te[1]-z[1])[0])==null?void 0:O[0];ee&&(U=ee);break}case"initialPlacement":U=u;break}if(i!==U)return{reset:{placement:U}}}return{}}}};async function Wc(t,e){const{placement:n,platform:r,elements:i}=t,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Sn(n),u=Pr(n),l=zn(n)==="y",a=["left","top"].includes(o)?-1:1,f=s&&l?-1:1,c=Fr(e,t);let{mainAxis:d,crossAxis:p,alignmentAxis:m}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return u&&typeof m=="number"&&(p=u==="end"?m*-1:m),l?{x:p*f,y:d*a}:{x:d*a,y:p*f}}const Qc=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:i,y:s,placement:o,middlewareData:u}=e,l=await Wc(e,t);return o===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:o}}}}},zc=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:i}=e,{mainAxis:s=!0,crossAxis:o=!1,limiter:u={fn:v=>{let{x:g,y:h}=v;return{x:g,y:h}}},...l}=Fr(t,e),a={x:n,y:r},f=await vo(e,l),c=zn(Sn(i)),d=Na(c);let p=a[d],m=a[c];if(s){const v=d==="y"?"top":"left",g=d==="y"?"bottom":"right",h=p+f[v],k=p-f[g];p=Xs(h,p,k)}if(o){const v=c==="y"?"top":"left",g=c==="y"?"bottom":"right",h=m+f[v],k=m-f[g];m=Xs(h,m,k)}const _=u.fn({...e,[d]:p,[c]:m});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[d]:s,[c]:o}}}}}},Gc=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:i,rects:s,platform:o,elements:u}=e,{apply:l=()=>{},...a}=Fr(t,e),f=await vo(e,a),c=Sn(i),d=Pr(i),p=zn(i)==="y",{width:m,height:_}=s.floating;let v,g;c==="top"||c==="bottom"?(v=c,g=d===(await(o.isRTL==null?void 0:o.isRTL(u.floating))?"start":"end")?"left":"right"):(g=c,v=d==="end"?"top":"bottom");const h=_-f.top-f.bottom,k=m-f.left-f.right,A=$n(_-f[v],h),S=$n(m-f[g],k),C=!e.middlewareData.shift;let L=A,R=S;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(R=k),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(L=h),C&&!d){const K=Dt(f.left,0),T=Dt(f.right,0),B=Dt(f.top,0),O=Dt(f.bottom,0);p?R=m-2*(K!==0||T!==0?K+T:Dt(f.left,f.right)):L=_-2*(B!==0||O!==0?B+O:Dt(f.top,f.bottom))}await l({...e,availableWidth:R,availableHeight:L});const W=await o.getDimensions(u.floating);return m!==W.width||_!==W.height?{reset:{rects:!0}}:{}}}};function os(){return typeof window<"u"}function Lr(t){return Va(t)?(t.nodeName||"").toLowerCase():"#document"}function It(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function rn(t){var e;return(e=(Va(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Va(t){return os()?t instanceof Node||t instanceof It(t).Node:!1}function Wt(t){return os()?t instanceof Element||t instanceof It(t).Element:!1}function nn(t){return os()?t instanceof HTMLElement||t instanceof It(t).HTMLElement:!1}function Jo(t){return!os()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof It(t).ShadowRoot}function hi(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=Qt(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(i)}function Yc(t){return["table","td","th"].includes(Lr(t))}function ls(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function ko(t){const e=Co(),n=Wt(t)?Qt(t):t;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Zc(t){let e=Rn(t);for(;nn(e)&&!$r(e);){if(ko(e))return e;if(ls(e))return null;e=Rn(e)}return null}function Co(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function $r(t){return["html","body","#document"].includes(Lr(t))}function Qt(t){return It(t).getComputedStyle(t)}function us(t){return Wt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Rn(t){if(Lr(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Jo(t)&&t.host||rn(t);return Jo(e)?e.host:e}function Ua(t){const e=Rn(t);return $r(e)?t.ownerDocument?t.ownerDocument.body:t.body:nn(e)&&hi(e)?e:Ua(e)}function ii(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=Ua(t),s=i===((r=t.ownerDocument)==null?void 0:r.body),o=It(i);if(s){const u=xs(o);return e.concat(o,o.visualViewport||[],hi(i)?i:[],u&&n?ii(u):[])}return e.concat(i,ii(i,[],n))}function xs(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Ba(t){const e=Qt(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=nn(t),s=i?t.offsetWidth:n,o=i?t.offsetHeight:r,u=zi(n)!==s||zi(r)!==o;return u&&(n=s,r=o),{width:n,height:r,$:u}}function Eo(t){return Wt(t)?t:t.contextElement}function cr(t){const e=Eo(t);if(!nn(e))return en(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:s}=Ba(e);let o=(s?zi(n.width):n.width)/r,u=(s?zi(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!u||!Number.isFinite(u))&&(u=1),{x:o,y:u}}const Xc=en(0);function Ka(t){const e=It(t);return!Co()||!e.visualViewport?Xc:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Jc(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==It(t)?!1:e}function Gn(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=Eo(t);let o=en(1);e&&(r?Wt(r)&&(o=cr(r)):o=cr(t));const u=Jc(s,n,r)?Ka(s):en(0);let l=(i.left+u.x)/o.x,a=(i.top+u.y)/o.y,f=i.width/o.x,c=i.height/o.y;if(s){const d=It(s),p=r&&Wt(r)?It(r):r;let m=d,_=xs(m);for(;_&&r&&p!==m;){const v=cr(_),g=_.getBoundingClientRect(),h=Qt(_),k=g.left+(_.clientLeft+parseFloat(h.paddingLeft))*v.x,A=g.top+(_.clientTop+parseFloat(h.paddingTop))*v.y;l*=v.x,a*=v.y,f*=v.x,c*=v.y,l+=k,a+=A,m=It(_),_=xs(m)}}return Yi({width:f,height:c,x:l,y:a})}function wo(t,e){const n=us(t).scrollLeft;return e?e.left+n:Gn(rn(t)).left+n}function ja(t,e,n){n===void 0&&(n=!1);const r=t.getBoundingClientRect(),i=r.left+e.scrollLeft-(n?0:wo(t,r)),s=r.top+e.scrollTop;return{x:i,y:s}}function xc(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const s=i==="fixed",o=rn(r),u=e?ls(e.floating):!1;if(r===o||u&&s)return n;let l={scrollLeft:0,scrollTop:0},a=en(1);const f=en(0),c=nn(r);if((c||!c&&!s)&&((Lr(r)!=="body"||hi(o))&&(l=us(r)),nn(r))){const p=Gn(r);a=cr(r),f.x=p.x+r.clientLeft,f.y=p.y+r.clientTop}const d=o&&!c&&!s?ja(o,l,!0):en(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-l.scrollLeft*a.x+f.x+d.x,y:n.y*a.y-l.scrollTop*a.y+f.y+d.y}}function ed(t){return Array.from(t.getClientRects())}function td(t){const e=rn(t),n=us(t),r=t.ownerDocument.body,i=Dt(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),s=Dt(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+wo(t);const u=-n.scrollTop;return Qt(r).direction==="rtl"&&(o+=Dt(e.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:u}}function nd(t,e){const n=It(t),r=rn(t),i=n.visualViewport;let s=r.clientWidth,o=r.clientHeight,u=0,l=0;if(i){s=i.width,o=i.height;const a=Co();(!a||a&&e==="fixed")&&(u=i.offsetLeft,l=i.offsetTop)}return{width:s,height:o,x:u,y:l}}function rd(t,e){const n=Gn(t,!0,e==="fixed"),r=n.top+t.clientTop,i=n.left+t.clientLeft,s=nn(t)?cr(t):en(1),o=t.clientWidth*s.x,u=t.clientHeight*s.y,l=i*s.x,a=r*s.y;return{width:o,height:u,x:l,y:a}}function xo(t,e,n){let r;if(e==="viewport")r=nd(t,n);else if(e==="document")r=td(rn(t));else if(Wt(e))r=rd(e,n);else{const i=Ka(t);r={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return Yi(r)}function qa(t,e){const n=Rn(t);return n===e||!Wt(n)||$r(n)?!1:Qt(n).position==="fixed"||qa(n,e)}function id(t,e){const n=e.get(t);if(n)return n;let r=ii(t,[],!1).filter(u=>Wt(u)&&Lr(u)!=="body"),i=null;const s=Qt(t).position==="fixed";let o=s?Rn(t):t;for(;Wt(o)&&!$r(o);){const u=Qt(o),l=ko(o);!l&&u.position==="fixed"&&(i=null),(s?!l&&!i:!l&&u.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||hi(o)&&!l&&qa(t,o))?r=r.filter(f=>f!==o):i=u,o=Rn(o)}return e.set(t,r),r}function sd(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const o=[...n==="clippingAncestors"?ls(e)?[]:id(e,this._c):[].concat(n),r],u=o[0],l=o.reduce((a,f)=>{const c=xo(e,f,i);return a.top=Dt(c.top,a.top),a.right=$n(c.right,a.right),a.bottom=$n(c.bottom,a.bottom),a.left=Dt(c.left,a.left),a},xo(e,u,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function od(t){const{width:e,height:n}=Ba(t);return{width:e,height:n}}function ld(t,e,n){const r=nn(e),i=rn(e),s=n==="fixed",o=Gn(t,!0,s,e);let u={scrollLeft:0,scrollTop:0};const l=en(0);if(r||!r&&!s)if((Lr(e)!=="body"||hi(i))&&(u=us(e)),r){const d=Gn(e,!0,s,e);l.x=d.x+e.clientLeft,l.y=d.y+e.clientTop}else i&&(l.x=wo(i));const a=i&&!r&&!s?ja(i,u):en(0),f=o.left+u.scrollLeft-l.x-a.x,c=o.top+u.scrollTop-l.y-a.y;return{x:f,y:c,width:o.width,height:o.height}}function Es(t){return Qt(t).position==="static"}function el(t,e){if(!nn(t)||Qt(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return rn(t)===n&&(n=n.ownerDocument.body),n}function Wa(t,e){const n=It(t);if(ls(t))return n;if(!nn(t)){let i=Rn(t);for(;i&&!$r(i);){if(Wt(i)&&!Es(i))return i;i=Rn(i)}return n}let r=el(t,e);for(;r&&Yc(r)&&Es(r);)r=el(r,e);return r&&$r(r)&&Es(r)&&!ko(r)?n:r||Zc(t)||n}const ud=async function(t){const e=this.getOffsetParent||Wa,n=this.getDimensions,r=await n(t.floating);return{reference:ld(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ad(t){return Qt(t).direction==="rtl"}const fd={convertOffsetParentRelativeRectToViewportRelativeRect:xc,getDocumentElement:rn,getClippingRect:sd,getOffsetParent:Wa,getElementRects:ud,getClientRects:ed,getDimensions:od,getScale:cr,isElement:Wt,isRTL:ad};function cd(t,e){let n=null,r;const i=rn(t);function s(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function o(u,l){u===void 0&&(u=!1),l===void 0&&(l=1),s();const{left:a,top:f,width:c,height:d}=t.getBoundingClientRect();if(u||e(),!c||!d)return;const p=Si(f),m=Si(i.clientWidth-(a+c)),_=Si(i.clientHeight-(f+d)),v=Si(a),h={rootMargin:-p+"px "+-m+"px "+-_+"px "+-v+"px",threshold:Dt(0,$n(1,l))||1};let k=!0;function A(S){const C=S[0].intersectionRatio;if(C!==l){if(!k)return o();C?o(!1,C):r=setTimeout(()=>{o(!1,1e-7)},1e3)}k=!1}try{n=new IntersectionObserver(A,{...h,root:i.ownerDocument})}catch{n=new IntersectionObserver(A,h)}n.observe(t)}return o(!0),s}function dd(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,a=Eo(t),f=i||s?[...a?ii(a):[],...ii(e)]:[];f.forEach(g=>{i&&g.addEventListener("scroll",n,{passive:!0}),s&&g.addEventListener("resize",n)});const c=a&&u?cd(a,n):null;let d=-1,p=null;o&&(p=new ResizeObserver(g=>{let[h]=g;h&&h.target===a&&p&&(p.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var k;(k=p)==null||k.observe(e)})),n()}),a&&!l&&p.observe(a),p.observe(e));let m,_=l?Gn(t):null;l&&v();function v(){const g=Gn(t);_&&(g.x!==_.x||g.y!==_.y||g.width!==_.width||g.height!==_.height)&&n(),_=g,m=requestAnimationFrame(v)}return n(),()=>{var g;f.forEach(h=>{i&&h.removeEventListener("scroll",n),s&&h.removeEventListener("resize",n)}),c==null||c(),(g=p)==null||g.disconnect(),p=null,l&&cancelAnimationFrame(m)}}const md=Qc,pd=zc,hd=qc,_d=Gc,gd=jc,bd=(t,e,n)=>{const r=new Map,i={platform:fd,...n},s={...i.platform,_c:r};return Kc(t,e,{...i,platform:s})},yd={strategy:"absolute",placement:"top",gutter:5,flip:!0,sameWidth:!1,overflowPadding:8},vd={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function kd(t,e,n={}){if(!e||!t||n===null)return{destroy:Qe};const r={...yd,...n},i=e.querySelector("[data-arrow=true]"),s=[];r.flip&&s.push(hd({boundary:r.boundary,padding:r.overflowPadding}));const o=x(i)?i.offsetHeight/2:0;if(r.gutter||r.offset){const l=r.gutter?{mainAxis:r.gutter}:r.offset;(l==null?void 0:l.mainAxis)!=null&&(l.mainAxis+=o),s.push(md(l))}s.push(pd({boundary:r.boundary,crossAxis:r.overlap,padding:r.overflowPadding})),i&&s.push(gd({element:i,padding:8})),s.push(_d({padding:r.overflowPadding,apply({rects:l,availableHeight:a,availableWidth:f}){r.sameWidth&&Object.assign(e.style,{width:`${Math.round(l.reference.width)}px`,minWidth:"unset"}),r.fitViewport&&Object.assign(e.style,{maxWidth:`${f}px`,maxHeight:`${a}px`})}}));function u(){if(!t||!e||x(t)&&!t.ownerDocument.documentElement.contains(t))return;const{placement:l,strategy:a}=r;bd(t,e,{placement:l,middleware:s,strategy:a}).then(f=>{const c=Math.round(f.x),d=Math.round(f.y),[p,m]=Cd(f.placement);if(e.setAttribute("data-side",p),e.setAttribute("data-align",m),Object.assign(e.style,{position:r.strategy,top:`${d}px`,left:`${c}px`}),x(i)&&f.middlewareData.arrow){const{x:_,y:v}=f.middlewareData.arrow,g=f.placement.split("-")[0];i.setAttribute("data-side",g),Object.assign(i.style,{position:"absolute",left:_!=null?`${_}px`:"",top:v!=null?`${v}px`:"",[g]:`calc(100% - ${o}px)`,transform:vd[g],backgroundColor:"inherit",zIndex:"inherit"})}return f})}return Object.assign(e.style,{position:r.strategy}),{destroy:dd(t,e,u)}}function Cd(t){const[e,n="center"]=t.split("-");return[e,n]}/*!
|
|
6
|
-
* tabbable 6.2.0
|
|
7
|
-
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
8
|
-
*/var Qa=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Zi=Qa.join(","),za=typeof Element>"u",Yn=za?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Xi=!za&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t==null?void 0:t.ownerDocument},Ji=function t(e,n){var r;n===void 0&&(n=!0);var i=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert"),s=i===""||i==="true",o=s||n&&e&&t(e.parentNode);return o},Ed=function(e){var n,r=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"contenteditable");return r===""||r==="true"},Ga=function(e,n,r){if(Ji(e))return[];var i=Array.prototype.slice.apply(e.querySelectorAll(Zi));return n&&Yn.call(e,Zi)&&i.unshift(e),i=i.filter(r),i},Ya=function t(e,n,r){for(var i=[],s=Array.from(e);s.length;){var o=s.shift();if(!Ji(o,!1))if(o.tagName==="SLOT"){var u=o.assignedElements(),l=u.length?u:o.children,a=t(l,!0,r);r.flatten?i.push.apply(i,a):i.push({scopeParent:o,candidates:a})}else{var f=Yn.call(o,Zi);f&&r.filter(o)&&(n||!e.includes(o))&&i.push(o);var c=o.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(o),d=!Ji(c,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(o));if(c&&d){var p=t(c===!0?o.children:c.children,!0,r);r.flatten?i.push.apply(i,p):i.push({scopeParent:o,candidates:p})}else s.unshift.apply(s,o.children)}}return i},Za=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Nn=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Ed(e))&&!Za(e)?0:e.tabIndex},wd=function(e,n){var r=Nn(e);return r<0&&n&&!Za(e)?0:r},Od=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},Xa=function(e){return e.tagName==="INPUT"},Ad=function(e){return Xa(e)&&e.type==="hidden"},Td=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return n},$d=function(e,n){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===n)return e[r]},Sd=function(e){if(!e.name)return!0;var n=e.form||Xi(e),r=function(u){return n.querySelectorAll('input[type="radio"][name="'+u+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(e.name));else try{i=r(e.name)}catch(o){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",o.message),!1}var s=$d(i,e.form);return!s||s===e},Rd=function(e){return Xa(e)&&e.type==="radio"},Dd=function(e){return Rd(e)&&!Sd(e)},Fd=function(e){var n,r=e&&Xi(e),i=(n=r)===null||n===void 0?void 0:n.host,s=!1;if(r&&r!==e){var o,u,l;for(s=!!((o=i)!==null&&o!==void 0&&(u=o.ownerDocument)!==null&&u!==void 0&&u.contains(i)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!s&&i;){var a,f,c;r=Xi(i),i=(a=r)===null||a===void 0?void 0:a.host,s=!!((f=i)!==null&&f!==void 0&&(c=f.ownerDocument)!==null&&c!==void 0&&c.contains(i))}}return s},tl=function(e){var n=e.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},Pd=function(e,n){var r=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var s=Yn.call(e,"details>summary:first-of-type"),o=s?e.parentElement:e;if(Yn.call(o,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof i=="function"){for(var u=e;e;){var l=e.parentElement,a=Xi(e);if(l&&!l.shadowRoot&&i(l)===!0)return tl(e);e.assignedSlot?e=e.assignedSlot:!l&&a!==e.ownerDocument?e=a.host:e=l}e=u}if(Fd(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return tl(e);return!1},Ld=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var n=e.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var i=n.children.item(r);if(i.tagName==="LEGEND")return Yn.call(n,"fieldset[disabled] *")?!0:!i.contains(e)}return!0}n=n.parentElement}return!1},xi=function(e,n){return!(n.disabled||Ji(n)||Ad(n)||Pd(n,e)||Td(n)||Ld(n))},eo=function(e,n){return!(Dd(n)||Nn(n)<0||!xi(e,n))},Id=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Md=function t(e){var n=[],r=[];return e.forEach(function(i,s){var o=!!i.scopeParent,u=o?i.scopeParent:i,l=wd(u,o),a=o?t(i.candidates):u;l===0?o?n.push.apply(n,a):n.push(u):r.push({documentOrder:s,tabIndex:l,item:i,isScope:o,content:a})}),r.sort(Od).reduce(function(i,s){return s.isScope?i.push.apply(i,s.content):i.push(s.content),i},[]).concat(n)},Nd=function(e,n){n=n||{};var r;return n.getShadowRoot?r=Ya([e],n.includeContainer,{filter:eo.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Id}):r=Ga(e,n.includeContainer,eo.bind(null,n)),Md(r)},Hd=function(e,n){n=n||{};var r;return n.getShadowRoot?r=Ya([e],n.includeContainer,{filter:xi.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=Ga(e,n.includeContainer,xi.bind(null,n)),r},nr=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return Yn.call(e,Zi)===!1?!1:eo(n,e)},Vd=Qa.concat("iframe").join(","),ws=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return Yn.call(e,Vd)===!1?!1:xi(n,e)};/*!
|
|
9
|
-
* focus-trap 7.6.2
|
|
10
|
-
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
|
11
|
-
*/function to(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Ud(t){if(Array.isArray(t))return to(t)}function Bd(t,e,n){return(e=Qd(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Kd(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function jd(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
12
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function rl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?nl(Object(n),!0).forEach(function(r){Bd(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nl(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function qd(t){return Ud(t)||Kd(t)||zd(t)||jd()}function Wd(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Qd(t){var e=Wd(t,"string");return typeof e=="symbol"?e:e+""}function zd(t,e){if(t){if(typeof t=="string")return to(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?to(t,e):void 0}}var il={activateTrap:function(e,n){if(e.length>0){var r=e[e.length-1];r!==n&&r.pause()}var i=e.indexOf(n);i===-1||e.splice(i,1),e.push(n)},deactivateTrap:function(e,n){var r=e.indexOf(n);r!==-1&&e.splice(r,1),e.length>0&&e[e.length-1].unpause()}},Gd=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},Yd=function(e){return(e==null?void 0:e.key)==="Escape"||(e==null?void 0:e.key)==="Esc"||(e==null?void 0:e.keyCode)===27},Zr=function(e){return(e==null?void 0:e.key)==="Tab"||(e==null?void 0:e.keyCode)===9},Zd=function(e){return Zr(e)&&!e.shiftKey},Xd=function(e){return Zr(e)&&e.shiftKey},sl=function(e){return setTimeout(e,0)},Kr=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return typeof e=="function"?e.apply(void 0,r):e},Ri=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},Jd=[],xd=function(e,n){var r=(n==null?void 0:n.document)||document,i=(n==null?void 0:n.trapStack)||Jd,s=rl({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:Zd,isKeyBackward:Xd},n),o={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},u,l=function(O,P,V){return O&&O[P]!==void 0?O[P]:s[V||P]},a=function(O,P){var V=typeof(P==null?void 0:P.composedPath)=="function"?P.composedPath():void 0;return o.containerGroups.findIndex(function(U){var ee=U.container,te=U.tabbableNodes;return ee.contains(O)||(V==null?void 0:V.includes(ee))||te.find(function(z){return z===O})})},f=function(O){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},V=P.hasFallback,U=V===void 0?!1:V,ee=P.params,te=ee===void 0?[]:ee,z=s[O];if(typeof z=="function"&&(z=z.apply(void 0,qd(te))),z===!0&&(z=void 0),!z){if(z===void 0||z===!1)return z;throw new Error("`".concat(O,"` was specified but was not a node, or did not return a node"))}var oe=z;if(typeof z=="string"){try{oe=r.querySelector(z)}catch(Re){throw new Error("`".concat(O,'` appears to be an invalid selector; error="').concat(Re.message,'"'))}if(!oe&&!U)throw new Error("`".concat(O,"` as selector refers to no known node"))}return oe},c=function(){var O=f("initialFocus",{hasFallback:!0});if(O===!1)return!1;if(O===void 0||O&&!ws(O,s.tabbableOptions))if(a(r.activeElement)>=0)O=r.activeElement;else{var P=o.tabbableGroups[0],V=P&&P.firstTabbableNode;O=V||f("fallbackFocus")}else O===null&&(O=f("fallbackFocus"));if(!O)throw new Error("Your focus-trap needs to have at least one focusable element");return O},d=function(){if(o.containerGroups=o.containers.map(function(O){var P=Nd(O,s.tabbableOptions),V=Hd(O,s.tabbableOptions),U=P.length>0?P[0]:void 0,ee=P.length>0?P[P.length-1]:void 0,te=V.find(function(Re){return nr(Re)}),z=V.slice().reverse().find(function(Re){return nr(Re)}),oe=!!P.find(function(Re){return Nn(Re)>0});return{container:O,tabbableNodes:P,focusableNodes:V,posTabIndexesFound:oe,firstTabbableNode:U,lastTabbableNode:ee,firstDomTabbableNode:te,lastDomTabbableNode:z,nextTabbableNode:function(st){var He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,Y=P.indexOf(st);return Y<0?He?V.slice(V.indexOf(st)+1).find(function(X){return nr(X)}):V.slice(0,V.indexOf(st)).reverse().find(function(X){return nr(X)}):P[Y+(He?1:-1)]}}}),o.tabbableGroups=o.containerGroups.filter(function(O){return O.tabbableNodes.length>0}),o.tabbableGroups.length<=0&&!f("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(o.containerGroups.find(function(O){return O.posTabIndexesFound})&&o.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},p=function(O){var P=O.activeElement;if(P)return P.shadowRoot&&P.shadowRoot.activeElement!==null?p(P.shadowRoot):P},m=function(O){if(O!==!1&&O!==p(document)){if(!O||!O.focus){m(c());return}O.focus({preventScroll:!!s.preventScroll}),o.mostRecentlyFocusedNode=O,Gd(O)&&O.select()}},_=function(O){var P=f("setReturnFocus",{params:[O]});return P||(P===!1?!1:O)},v=function(O){var P=O.target,V=O.event,U=O.isBackward,ee=U===void 0?!1:U;P=P||Ri(V),d();var te=null;if(o.tabbableGroups.length>0){var z=a(P,V),oe=z>=0?o.containerGroups[z]:void 0;if(z<0)ee?te=o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode:te=o.tabbableGroups[0].firstTabbableNode;else if(ee){var Re=o.tabbableGroups.findIndex(function(ht){var ct=ht.firstTabbableNode;return P===ct});if(Re<0&&(oe.container===P||ws(P,s.tabbableOptions)&&!nr(P,s.tabbableOptions)&&!oe.nextTabbableNode(P,!1))&&(Re=z),Re>=0){var st=Re===0?o.tabbableGroups.length-1:Re-1,He=o.tabbableGroups[st];te=Nn(P)>=0?He.lastTabbableNode:He.lastDomTabbableNode}else Zr(V)||(te=oe.nextTabbableNode(P,!1))}else{var Y=o.tabbableGroups.findIndex(function(ht){var ct=ht.lastTabbableNode;return P===ct});if(Y<0&&(oe.container===P||ws(P,s.tabbableOptions)&&!nr(P,s.tabbableOptions)&&!oe.nextTabbableNode(P))&&(Y=z),Y>=0){var X=Y===o.tabbableGroups.length-1?0:Y+1,pt=o.tabbableGroups[X];te=Nn(P)>=0?pt.firstTabbableNode:pt.firstDomTabbableNode}else Zr(V)||(te=oe.nextTabbableNode(P))}}else te=f("fallbackFocus");return te},g=function(O){var P=Ri(O);if(!(a(P,O)>=0)){if(Kr(s.clickOutsideDeactivates,O)){u.deactivate({returnFocus:s.returnFocusOnDeactivate});return}Kr(s.allowOutsideClick,O)||O.preventDefault()}},h=function(O){var P=Ri(O),V=a(P,O)>=0;if(V||P instanceof Document)V&&(o.mostRecentlyFocusedNode=P);else{O.stopImmediatePropagation();var U,ee=!0;if(o.mostRecentlyFocusedNode)if(Nn(o.mostRecentlyFocusedNode)>0){var te=a(o.mostRecentlyFocusedNode),z=o.containerGroups[te].tabbableNodes;if(z.length>0){var oe=z.findIndex(function(Re){return Re===o.mostRecentlyFocusedNode});oe>=0&&(s.isKeyForward(o.recentNavEvent)?oe+1<z.length&&(U=z[oe+1],ee=!1):oe-1>=0&&(U=z[oe-1],ee=!1))}}else o.containerGroups.some(function(Re){return Re.tabbableNodes.some(function(st){return Nn(st)>0})})||(ee=!1);else ee=!1;ee&&(U=v({target:o.mostRecentlyFocusedNode,isBackward:s.isKeyBackward(o.recentNavEvent)})),m(U||o.mostRecentlyFocusedNode||c())}o.recentNavEvent=void 0},k=function(O){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;o.recentNavEvent=O;var V=v({event:O,isBackward:P});V&&(Zr(O)&&O.preventDefault(),m(V))},A=function(O){(s.isKeyForward(O)||s.isKeyBackward(O))&&k(O,s.isKeyBackward(O))},S=function(O){Yd(O)&&Kr(s.escapeDeactivates,O)!==!1&&(O.preventDefault(),u.deactivate())},C=function(O){var P=Ri(O);a(P,O)>=0||Kr(s.clickOutsideDeactivates,O)||Kr(s.allowOutsideClick,O)||(O.preventDefault(),O.stopImmediatePropagation())},L=function(){if(o.active)return il.activateTrap(i,u),o.delayInitialFocusTimer=s.delayInitialFocus?sl(function(){m(c())}):m(c()),r.addEventListener("focusin",h,!0),r.addEventListener("mousedown",g,{capture:!0,passive:!1}),r.addEventListener("touchstart",g,{capture:!0,passive:!1}),r.addEventListener("click",C,{capture:!0,passive:!1}),r.addEventListener("keydown",A,{capture:!0,passive:!1}),r.addEventListener("keydown",S),u},R=function(){if(o.active)return r.removeEventListener("focusin",h,!0),r.removeEventListener("mousedown",g,!0),r.removeEventListener("touchstart",g,!0),r.removeEventListener("click",C,!0),r.removeEventListener("keydown",A,!0),r.removeEventListener("keydown",S),u},W=function(O){var P=O.some(function(V){var U=Array.from(V.removedNodes);return U.some(function(ee){return ee===o.mostRecentlyFocusedNode})});P&&m(c())},K=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(W):void 0,T=function(){K&&(K.disconnect(),o.active&&!o.paused&&o.containers.map(function(O){K.observe(O,{subtree:!0,childList:!0})}))};return u={get active(){return o.active},get paused(){return o.paused},activate:function(O){if(o.active)return this;var P=l(O,"onActivate"),V=l(O,"onPostActivate"),U=l(O,"checkCanFocusTrap");U||d(),o.active=!0,o.paused=!1,o.nodeFocusedBeforeActivation=r.activeElement,P==null||P();var ee=function(){U&&d(),L(),T(),V==null||V()};return U?(U(o.containers.concat()).then(ee,ee),this):(ee(),this)},deactivate:function(O){if(!o.active)return this;var P=rl({onDeactivate:s.onDeactivate,onPostDeactivate:s.onPostDeactivate,checkCanReturnFocus:s.checkCanReturnFocus},O);clearTimeout(o.delayInitialFocusTimer),o.delayInitialFocusTimer=void 0,R(),o.active=!1,o.paused=!1,T(),il.deactivateTrap(i,u);var V=l(P,"onDeactivate"),U=l(P,"onPostDeactivate"),ee=l(P,"checkCanReturnFocus"),te=l(P,"returnFocus","returnFocusOnDeactivate");V==null||V();var z=function(){sl(function(){te&&m(_(o.nodeFocusedBeforeActivation)),U==null||U()})};return te&&ee?(ee(_(o.nodeFocusedBeforeActivation)).then(z,z),this):(z(),this)},pause:function(O){if(o.paused||!o.active)return this;var P=l(O,"onPause"),V=l(O,"onPostPause");return o.paused=!0,P==null||P(),R(),T(),V==null||V(),this},unpause:function(O){if(!o.paused||!o.active)return this;var P=l(O,"onUnpause"),V=l(O,"onPostUnpause");return o.paused=!1,P==null||P(),d(),L(),T(),V==null||V(),this},updateContainerElements:function(O){var P=[].concat(O).filter(Boolean);return o.containers=P.map(function(V){return typeof V=="string"?r.querySelector(V):V}),o.active&&d(),T(),this}},u.updateContainerElements(e),u};function Ja(t={}){let e;const{immediate:n,...r}=t,i=Fe(!1),s=Fe(!1),o=c=>e==null?void 0:e.activate(c),u=c=>{e==null||e.deactivate(c)},l=()=>{e&&(e.pause(),s.set(!0))},a=()=>{e&&(e.unpause(),s.set(!1))};return{useFocusTrap:c=>(e=xd(c,{...r,onActivate(){var d;i.set(!0),(d=t.onActivate)==null||d.call(t)},onDeactivate(){var d;i.set(!1),(d=t.onDeactivate)==null||d.call(t)}}),n&&o(),{destroy(){u(),e=void 0}}),hasFocus:Wo(i),isPaused:Wo(s),activate:o,deactivate:u,pause:l,unpause:a}}const Di=[],xa=(t,e)=>{let n=Qe;function r(){const s=Di.indexOf(t);s>=0&&Di.splice(s,1)}function i(s){n();const{open:o,onClose:u,shouldCloseOnInteractOutside:l,closeOnInteractOutside:a}=s;fn(100).then(()=>{o?Di.push(t):r()});function f(){return fc(Di)===t}function c(){f()&&u&&(u(),r())}function d(m){const _=m.target;pi(_)&&_&&f()&&(m.preventDefault(),m.stopPropagation(),m.stopImmediatePropagation())}function p(m){l!=null&&l(m)&&f()&&(m.preventDefault(),m.stopPropagation(),m.stopImmediatePropagation(),c())}n=tm(t,{onInteractOutsideStart:d,onInteractOutside:a?p:void 0,enabled:o}).destroy}return i(e),{update:i,destroy(){r(),n()}}},em={floating:{},focusTrap:{},modal:{},escapeKeydown:{},portal:"body"},es=(t,e)=>{t.dataset.escapee="";const{anchorElement:n,open:r,options:i}=e;if(!n||!r||!i)return{destroy:Qe};const s={...em,...i},o=[];if(s.portal!==null&&o.push(as(t,s.portal).destroy),o.push(kd(n,t,s.floating).destroy),s.focusTrap!==null){const{useFocusTrap:l}=Ja({immediate:!0,escapeDeactivates:!1,allowOutsideClick:!0,returnFocusOnDeactivate:!1,fallbackFocus:t,...s.focusTrap});o.push(l(t).destroy)}s.modal!==null&&o.push(xa(t,{onClose:()=>{x(n)&&(r.set(!1),n.focus())},shouldCloseOnInteractOutside:l=>!(l.defaultPrevented||x(n)&&n.contains(l.target)),...s.modal}).destroy),s.escapeKeydown!==null&&o.push(ri(t,{enabled:r,handler:()=>{r.set(!1)},...s.escapeKeydown}).destroy);const u=rt(...o);return{destroy(){u()}}},as=(t,e="body")=>{let n;if(!x(e)&&typeof e!="string")return{destroy:Qe};async function r(s){if(e=s,typeof e=="string"){if(n=document.querySelector(e),n===null&&(await qt(),n=document.querySelector(e)),n===null)throw new Error(`No element found matching css selector: "${e}"`)}else if(e instanceof HTMLElement)n=e;else throw new TypeError(`Unknown portal target type: ${e===null?"null":typeof e}. Allowed types: string (CSS selector) or HTMLElement.`);t.dataset.portal="",n.appendChild(t),t.hidden=!1}function i(){t.remove()}return r(e),{update:r,destroy:i}},tm=(t,e)=>{let n=Qe,r=Qe,i=!1,s=!1,o=!1;function u(f){n(),r();const{onInteractOutside:c,onInteractOutsideStart:d,enabled:p}=f;if(!p)return;function m(g){c&&ol(g,t)&&(d==null||d(g));const h=g.target;pi(h)&&ef(t,h)&&(s=!0),i=!0}function _(g){c==null||c(g)}const v=nm(t);if(typeof PointerEvent<"u"){const g=h=>{r();const k=A=>{l(A)&&_(A),a()};if(h.pointerType==="touch"){r=_t(v,"click",k,{capture:!0,once:!0});return}k(h)};n=rt(_t(v,"pointerdown",m,!0),_t(v,"pointerup",g,!0))}else{const g=k=>{o?o=!1:l(k)&&_(k),a()},h=k=>{o=!0,l(k)&&_(k),a()};n=rt(_t(v,"mousedown",m,!0),_t(v,"mouseup",g,!0),_t(v,"touchstart",m,!0),_t(v,"touchend",h,!0))}}function l(f){return!!(i&&!s&&ol(f,t))}function a(){i=!1,s=!1}return u(e),{update:u,destroy(){n(),r()}}};function ol(t,e){if("button"in t&&t.button>0)return!1;const n=t.target;if(!pi(n))return!1;const r=n.ownerDocument;return!r||!r.documentElement.contains(n)?!1:e&&!ef(e,n)}function ef(t,e){return t===e||t.contains(e)}function nm(t){return(t==null?void 0:t.ownerDocument)??document}function rm(t){const e={};return Object.keys(t).forEach(n=>{const r=n,i=t[r];Sa(i)?e[r]=Xe(i):e[r]=Xe(gt(i))}),e}const im={prefix:"",disabled:gt(!1),required:gt(!1),name:gt(void 0)};function uy(t){const e={...im,...hc(t)},{name:n}=Xn(e.prefix),{value:r,name:i,disabled:s,required:o}=rm(Dr(e,"prefix")),u=i;return Pe(n("hidden-input"),{stores:[r,u,s,o],returned:([a,f,c,d])=>({name:f,value:a==null?void 0:a.toString(),"aria-hidden":"true",hidden:!0,disabled:c,required:d,tabIndex:-1,style:Ft({position:"absolute",opacity:0,"pointer-events":"none",margin:0,transform:"translateX(-100%)"})}),action:a=>({destroy:r.subscribe(c=>{a.value=c,a.dispatchEvent(new Event("change",{bubbles:!0}))})})})}const sm={ltr:[...ti,ae.ARROW_RIGHT],rtl:[...ti,ae.ARROW_LEFT]},om={ltr:[ae.ARROW_LEFT],rtl:[ae.ARROW_RIGHT]},ll=["menu","trigger"],lm={arrowSize:8,positioning:{placement:"bottom"},preventScroll:!0,closeOnEscape:!0,closeOnOutsideClick:!0,portal:void 0,loop:!1,dir:"ltr",defaultOpen:!1,typeahead:!0,closeOnItemClick:!0,onOutsideClick:void 0};function um(t){const{name:e,selector:n}=Xn(t.selector),{preventScroll:r,arrowSize:i,positioning:s,closeOnEscape:o,closeOnOutsideClick:u,portal:l,forceVisible:a,typeahead:f,loop:c,closeFocus:d,disableFocusFirstItem:p,closeOnItemClick:m,onOutsideClick:_}=t.rootOptions,v=t.rootOpen,g=t.rootActiveTrigger,h=t.nextFocusable,k=t.prevFocusable,A=Xe.writable(!1),S=Xe(Fe(0)),C=Xe(Fe(null)),L=Xe(Fe("right")),R=Xe(Fe(null)),W=Xe(ze([L,C],([Q,ne])=>re=>Q===(ne==null?void 0:ne.side)&&am(re,ne==null?void 0:ne.area))),{typed:K,handleTypeaheadSearch:T}=Fc(),B=Lt({...ei(ll),...t.ids}),O=Qi({open:v,forceVisible:a,activeTrigger:g}),P=Pe(e(),{stores:[O,l,B.menu,B.trigger],returned:([Q,ne,re,ue])=>({role:"menu",hidden:Q?void 0:!0,style:Ft({display:Q?void 0:"none"}),id:re,"aria-labelledby":ue,"data-state":Q?"open":"closed","data-portal":ss(ne),tabindex:-1}),action:Q=>{let ne=Qe;const re=xe([O,g,s,u,l,o],([we,Je,Ct,q,Le,qe])=>{ne(),!(!we||!Je)&&qt().then(()=>{ne(),qr(Q,n),ne=es(Q,{anchorElement:Je,open:v,options:{floating:Ct,modal:{closeOnInteractOutside:q,shouldCloseOnInteractOutside:De=>{var Ie;return(Ie=_.get())==null||Ie(De),!(De.defaultPrevented||x(Je)&&Je.contains(De.target))},onClose:()=>{v.set(!1),Je.focus()},open:we},portal:Tr(Q,Le),escapeKeydown:qe?void 0:null}}).destroy})}),ue=rt(ke(Q,"keydown",we=>{const Je=we.target,Ct=we.currentTarget;if(!x(Je)||!x(Ct)||!(Je.closest('[role="menu"]')===Ct))return;if(Zs.includes(we.key)&&ro(we,c.get()??!1),we.key===ae.TAB){we.preventDefault(),v.set(!1),no(we,h,k);return}const Le=we.key.length===1;!(we.ctrlKey||we.altKey||we.metaKey)&&Le&&f.get()===!0&&T(we.key,ln(Ct))}));return{destroy(){re(),ue(),ne()}}}}),V=Pe(e("trigger"),{stores:[v,B.menu,B.trigger],returned:([Q,ne,re])=>({"aria-controls":ne,"aria-expanded":Q,"data-state":Q?"open":"closed",id:re,tabindex:0}),action:Q=>(zr(Q),g.update(re=>re||Q),{destroy:rt(ke(Q,"click",re=>{const ue=v.get(),we=re.currentTarget;x(we)&&(ht(we),ue||re.preventDefault())}),ke(Q,"keydown",re=>{const ue=re.currentTarget;if(!x(ue)||!(ti.includes(re.key)||re.key===ae.ARROW_DOWN))return;re.preventDefault(),ht(ue);const we=ue.getAttribute("aria-controls");if(!we)return;const Je=document.getElementById(we);if(!Je)return;const Ct=ln(Je);Ct.length&&et(Ct[0])}))})}),U=Pe(e("arrow"),{stores:i,returned:Q=>({"data-arrow":!0,style:Ft({position:"absolute",width:`var(--arrow-size, ${Q}px)`,height:`var(--arrow-size, ${Q}px)`})})}),ee=Pe(e("overlay"),{stores:[O],returned:([Q])=>({hidden:Q?void 0:!0,tabindex:-1,style:Ft({display:Q?void 0:"none"}),"aria-hidden":"true","data-state":dm(Q)}),action:Q=>{let ne=Qe;o.get()&&(ne=ri(Q,{handler:()=>{v.set(!1);const we=g.get();we&&we.focus()}}).destroy);const re=xe([l],([ue])=>{if(ue===null)return Qe;const we=Tr(Q,ue);return we===null?Qe:as(Q,we).destroy});return{destroy(){ne(),re()}}}}),te=Pe(e("item"),{returned:()=>({role:"menuitem",tabindex:-1,"data-orientation":"vertical"}),action:Q=>(qr(Q,n),zr(Q),{destroy:rt(ke(Q,"pointerdown",re=>{const ue=re.currentTarget;if(x(ue)&&on(ue)){re.preventDefault();return}}),ke(Q,"click",re=>{const ue=re.currentTarget;if(x(ue)){if(on(ue)){re.preventDefault();return}if(re.defaultPrevented){et(ue);return}m.get()&&fn(1).then(()=>{v.set(!1)})}}),ke(Q,"keydown",re=>{Hr(re)}),ke(Q,"pointermove",re=>{Mr(re)}),ke(Q,"pointerleave",re=>{Nr(re)}),ke(Q,"focusin",re=>{ct(re)}),ke(Q,"focusout",re=>{mn(re)}))})}),z=Pe(e("group"),{returned:()=>Q=>({role:"group","aria-labelledby":Q})}),oe=Pe(e("group-label"),{returned:()=>Q=>({id:Q})}),Re={defaultChecked:!1,disabled:!1},st=Q=>{const ne={...Re,...Q},re=ne.checked??Fe(ne.defaultChecked??null),ue=fr(re,ne.onCheckedChange),we=Fe(ne.disabled),Je=Pe(e("checkbox-item"),{stores:[ue,we],returned:([Le,qe])=>({role:"menuitemcheckbox",tabindex:-1,"data-orientation":"vertical","aria-checked":Vr(Le)?"mixed":Le?"true":"false","data-disabled":Yr(qe),"data-state":gs(Le)}),action:Le=>(qr(Le,n),zr(Le),{destroy:rt(ke(Le,"pointerdown",De=>{const Ie=De.currentTarget;if(x(Ie)&&on(Ie)){De.preventDefault();return}}),ke(Le,"click",De=>{const Ie=De.currentTarget;if(x(Ie)){if(on(Ie)){De.preventDefault();return}if(De.defaultPrevented){et(Ie);return}ue.update(hn=>Vr(hn)?!0:!hn),m.get()&&qt().then(()=>{v.set(!1)})}}),ke(Le,"keydown",De=>{Hr(De)}),ke(Le,"pointermove",De=>{const Ie=De.currentTarget;if(x(Ie)){if(on(Ie)){pn(De);return}Mr(De,Ie)}}),ke(Le,"pointerleave",De=>{Nr(De)}),ke(Le,"focusin",De=>{ct(De)}),ke(Le,"focusout",De=>{mn(De)}))})}),Ct=ze(ue,Le=>Le===!0),q=ze(ue,Le=>Le==="indeterminate");return{elements:{checkboxItem:Je},states:{checked:ue},helpers:{isChecked:Ct,isIndeterminate:q},options:{disabled:we}}},He=(Q={})=>{const ne=Q.value??Fe(Q.defaultValue??null),re=fr(ne,Q.onValueChange),ue=Pe(e("radio-group"),{returned:()=>({role:"group"})}),we={disabled:!1},Je=Pe(e("radio-item"),{stores:[re],returned:([q])=>Le=>{const{value:qe,disabled:De}={...we,...Le},Ie=q===qe;return{disabled:De,role:"menuitemradio","data-state":Ie?"checked":"unchecked","aria-checked":Ie,"data-disabled":Yr(De),"data-value":qe,"data-orientation":"vertical",tabindex:-1}},action:q=>(qr(q,n),{destroy:rt(ke(q,"pointerdown",qe=>{const De=qe.currentTarget;if(!x(De))return;const Ie=q.dataset.value;if(q.dataset.disabled||Ie===void 0){qe.preventDefault();return}}),ke(q,"click",qe=>{const De=qe.currentTarget;if(!x(De))return;const Ie=q.dataset.value;if(q.dataset.disabled||Ie===void 0){qe.preventDefault();return}if(qe.defaultPrevented){if(!x(De))return;et(De);return}re.set(Ie),m.get()&&qt().then(()=>{v.set(!1)})}),ke(q,"keydown",qe=>{Hr(qe)}),ke(q,"pointermove",qe=>{const De=qe.currentTarget;if(!x(De))return;const Ie=q.dataset.value;if(q.dataset.disabled||Ie===void 0){pn(qe);return}Mr(qe,De)}),ke(q,"pointerleave",qe=>{Nr(qe)}),ke(q,"focusin",qe=>{ct(qe)}),ke(q,"focusout",qe=>{mn(qe)}))})}),Ct=ze(re,q=>Le=>q===Le);return{elements:{radioGroup:ue,radioItem:Je},states:{value:re},helpers:{isChecked:Ct}}},{elements:{root:Y}}=wm({orientation:"horizontal"}),X={...lm,disabled:!1,positioning:{placement:"right-start",gutter:8}},pt=Q=>{const ne={...X,...Q},re=ne.open??Fe(!1),ue=fr(re,ne==null?void 0:ne.onOpenChange),we=Lt(Dr(ne,"ids")),{positioning:Je,arrowSize:Ct,disabled:q}=we,Le=Xe(Fe(null)),qe=Xe(Fe(null)),De=Xe(Fe(0)),Ie=Lt({...ei(ll),...ne.ids});xr(()=>{const Be=document.getElementById(Ie.trigger.get());Be&&Le.set(Be)});const hn=Qi({open:ue,forceVisible:a,activeTrigger:Le}),_f=Pe(e("submenu"),{stores:[hn,Ie.menu,Ie.trigger],returned:([Be,dt,$t])=>({role:"menu",hidden:Be?void 0:!0,style:Ft({display:Be?void 0:"none"}),id:dt,"aria-labelledby":$t,"data-state":Be?"open":"closed","data-id":dt,tabindex:-1}),action:Be=>{let dt=Qe;const $t=xe([hn,Je],([Ee,Ze])=>{if(dt(),!Ee)return;const tt=Le.get();tt&&qt().then(()=>{dt();const ot=Ei(tt);dt=es(Be,{anchorElement:tt,open:ue,options:{floating:Ze,portal:x(ot)?ot:void 0,modal:null,focusTrap:null,escapeKeydown:null}}).destroy})}),We=rt(ke(Be,"keydown",Ee=>{if(Ee.key===ae.ESCAPE)return;const Ze=Ee.target,tt=Ee.currentTarget;if(!x(Ze)||!x(tt)||!(Ze.closest('[role="menu"]')===tt))return;if(Zs.includes(Ee.key)){Ee.stopImmediatePropagation(),ro(Ee,c.get()??!1);return}const Jn=om.ltr.includes(Ee.key),xn=Ee.ctrlKey||Ee.altKey||Ee.metaKey,wi=Ee.key.length===1;if(Jn){const Fo=Le.get();Ee.preventDefault(),ue.update(()=>(Fo&&et(Fo),!1));return}if(Ee.key===ae.TAB){Ee.preventDefault(),v.set(!1),no(Ee,h,k);return}!xn&&wi&&f.get()===!0&&T(Ee.key,ln(tt))}),ke(Be,"pointermove",Ee=>{_s(Ee)}),ke(Be,"focusout",Ee=>{const Ze=Le.get();if(A.get()){const tt=Ee.target,ot=document.getElementById(Ie.menu.get());if(!x(ot)||!x(tt))return;!ot.contains(tt)&&tt!==Ze&&ue.set(!1)}else{const tt=Ee.currentTarget,ot=Ee.relatedTarget;if(!x(ot)||!x(tt))return;!tt.contains(ot)&&ot!==Ze&&ue.set(!1)}}));return{destroy(){$t(),dt(),We()}}}}),gf=Pe(e("subtrigger"),{stores:[ue,q,Ie.menu,Ie.trigger],returned:([Be,dt,$t,We])=>({role:"menuitem",id:We,tabindex:-1,"aria-controls":$t,"aria-expanded":Be,"data-state":Be?"open":"closed","data-disabled":Yr(dt),"aria-haspopop":"menu"}),action:Be=>{qr(Be,n),zr(Be),Le.update(We=>We||Be);const dt=()=>{Os(qe),window.clearTimeout(De.get()),C.set(null)},$t=rt(ke(Be,"click",We=>{if(We.defaultPrevented)return;const Ee=We.currentTarget;!x(Ee)||on(Ee)||(et(Ee),ue.get()||ue.update(Ze=>Ze||(Le.set(Ee),!Ze)))}),ke(Be,"keydown",We=>{const Ee=K.get(),Ze=We.currentTarget;if(!(!x(Ze)||on(Ze)||Ee.length>0&&We.key===ae.SPACE)&&sm.ltr.includes(We.key)){if(!ue.get()){Ze.click(),We.preventDefault();return}const ot=Ze.getAttribute("aria-controls");if(!ot)return;const Jn=document.getElementById(ot);if(!x(Jn))return;const xn=ln(Jn)[0];et(xn)}}),ke(Be,"pointermove",We=>{if(!jr(We)||(In(We),We.defaultPrevented))return;const Ee=We.currentTarget;if(!x(Ee))return;cm(Ie.menu.get())||et(Ee);const Ze=qe.get();!ue.get()&&!Ze&&!on(Ee)&&qe.set(window.setTimeout(()=>{ue.update(()=>(Le.set(Ee),!0)),Os(qe)},100))}),ke(Be,"pointerleave",We=>{if(!jr(We))return;Os(qe);const Ee=document.getElementById(Ie.menu.get()),Ze=Ee==null?void 0:Ee.getBoundingClientRect();if(Ze){const tt=Ee==null?void 0:Ee.dataset.side,ot=tt==="right",Jn=ot?-5:5,xn=Ze[ot?"left":"right"],wi=Ze[ot?"right":"left"];C.set({area:[{x:We.clientX+Jn,y:We.clientY},{x:xn,y:Ze.top},{x:wi,y:Ze.top},{x:wi,y:Ze.bottom},{x:xn,y:Ze.bottom}],side:tt}),window.clearTimeout(De.get()),De.set(window.setTimeout(()=>{C.set(null)},300))}else{if(hs(We),We.defaultPrevented)return;C.set(null)}}),ke(Be,"focusout",We=>{const Ee=We.currentTarget;if(!x(Ee))return;gn(Ee);const Ze=We.relatedTarget;if(!x(Ze))return;const tt=Ee.getAttribute("aria-controls");if(!tt)return;const ot=document.getElementById(tt);ot&&!ot.contains(Ze)&&ue.set(!1)}),ke(Be,"focusin",We=>{ct(We)}));return{destroy(){dt(),$t()}}}}),bf=Pe(e("subarrow"),{stores:Ct,returned:Be=>({"data-arrow":!0,style:Ft({position:"absolute",width:`var(--arrow-size, ${Be}px)`,height:`var(--arrow-size, ${Be}px)`})})});return xe([v],([Be])=>{Be||(Le.set(null),ue.set(!1))}),xe([C],([Be])=>{!mt||Be||window.clearTimeout(De.get())}),xe([ue],([Be])=>{if(mt&&(Be&&A.get()&&fn(1).then(()=>{const dt=document.getElementById(Ie.menu.get());if(!dt)return;const $t=ln(dt);$t.length&&et($t[0])}),!Be)){const dt=R.get(),$t=document.getElementById(Ie.trigger.get());if(dt&&fn(1).then(()=>{const We=document.getElementById(Ie.menu.get());We&&We.contains(dt)&&gn(dt)}),!$t||document.activeElement===$t)return;gn($t)}}),{ids:Ie,elements:{subTrigger:gf,subMenu:_f,subArrow:bf},states:{subOpen:ue},options:we}};xr(()=>{const Q=document.getElementById(B.trigger.get());x(Q)&&v.get()&&g.set(Q);const ne=[],re=()=>A.set(!1),ue=()=>{A.set(!0),ne.push(rt(_t(document,"pointerdown",re,{capture:!0,once:!0}),_t(document,"pointermove",re,{capture:!0,once:!0})))},we=Je=>{if(Je.key===ae.ESCAPE&&o.get()){v.set(!1);return}};return ne.push(_t(document,"keydown",ue,{capture:!0})),ne.push(_t(document,"keydown",we)),()=>{ne.forEach(Je=>Je())}}),xe([v,R],([Q,ne])=>{!Q&&ne&&gn(ne)}),xe([v],([Q])=>{if(mt&&!Q){const ne=g.get();if(!ne)return;const re=d.get();!Q&&ne&&ni({prop:re,defaultEl:ne})}}),xe([v,r],([Q,ne])=>{if(!mt)return;const re=[];return fn(1).then(()=>{const ue=document.getElementById(B.menu.get());if(ue&&Q&&A.get()){if(p.get()){et(ue);return}const we=ln(ue);if(!we.length)return;et(we[0])}}),()=>{re.forEach(ue=>ue())}}),xe(v,Q=>{if(!mt)return;const ne=()=>A.set(!1),re=ue=>{if(A.set(!0),ue.key===ae.ESCAPE&&Q&&o.get()){v.set(!1);return}};return rt(_t(document,"pointerdown",ne,{capture:!0,once:!0}),_t(document,"pointermove",ne,{capture:!0,once:!0}),_t(document,"keydown",re,{capture:!0}))});function ht(Q){v.update(ne=>{const re=!ne;return re&&(h.set(Ia(Q)),k.set(Ma(Q)),g.set(Q)),re})}function ct(Q){const ne=Q.currentTarget;if(!x(ne))return;const re=R.get();re&&gn(re),Ys(ne),R.set(ne)}function mn(Q){const ne=Q.currentTarget;x(ne)&&gn(ne)}function In(Q){Ur(Q)&&Q.preventDefault()}function pn(Q){if(Ur(Q))return;const ne=Q.target;if(!x(ne))return;const re=Ei(ne);re&&et(re)}function hs(Q){Ur(Q)&&Q.preventDefault()}function _s(Q){if(!jr(Q))return;const ne=Q.target,re=Q.currentTarget;if(!x(re)||!x(ne))return;const ue=S.get(),we=ue!==Q.clientX;if(re.contains(ne)&&we){const Je=Q.clientX>ue?"right":"left";L.set(Je),S.set(Q.clientX)}}function Mr(Q,ne=null){if(!jr(Q)||(In(Q),Q.defaultPrevented))return;if(ne){et(ne);return}const re=Q.currentTarget;x(re)&&et(re)}function Nr(Q){jr(Q)&&pn(Q)}function Hr(Q){if(K.get().length>0&&Q.key===ae.SPACE){Q.preventDefault();return}if(ti.includes(Q.key)){Q.preventDefault();const ue=Q.currentTarget;if(!x(ue))return;ue.click()}}function Vr(Q){return Q==="indeterminate"}function gs(Q){return Vr(Q)?"indeterminate":Q?"checked":"unchecked"}function Ur(Q){return W.get()(Q)}function Ei(Q){const ne=Q.closest('[role="menu"]');return x(ne)?ne:null}return{elements:{trigger:V,menu:P,overlay:ee,item:te,group:z,groupLabel:oe,arrow:U,separator:Y},builders:{createCheckboxItem:st,createSubmenu:pt,createMenuRadioGroup:He},states:{open:v},helpers:{handleTypeaheadSearch:T},ids:B,options:t.rootOptions}}function no(t,e,n){if(t.shiftKey){const r=n.get();r&&(t.preventDefault(),fn(1).then(()=>r.focus()),n.set(null))}else{const r=e.get();r&&(t.preventDefault(),fn(1).then(()=>r.focus()),e.set(null))}}function ln(t){return Array.from(t.querySelectorAll(`[data-melt-menu-id="${t.id}"]`)).filter(e=>x(e))}function zr(t){!t||!on(t)||(t.setAttribute("data-disabled",""),t.setAttribute("aria-disabled","true"))}function Os(t){if(!mt)return;const e=t.get();e&&(window.clearTimeout(e),t.set(null))}function jr(t){return t.pointerType==="mouse"}function qr(t,e){if(!t)return;const n=t.closest(`${e()}, ${e("submenu")}`);x(n)&&t.setAttribute("data-melt-menu-id",n.id)}function ro(t,e){t.preventDefault();const n=document.activeElement,r=t.currentTarget;if(!x(n)||!x(r))return;const i=ln(r);if(!i.length)return;const s=i.filter(l=>!(l.hasAttribute("data-disabled")||l.getAttribute("disabled")==="true")),o=s.indexOf(n);let u;switch(t.key){case ae.ARROW_DOWN:e?u=o<s.length-1?o+1:0:u=o<s.length-1?o+1:o;break;case ae.ARROW_UP:e?u=o>0?o-1:s.length-1:u=o<0?s.length-1:o>0?o-1:0;break;case ae.HOME:u=0;break;case ae.END:u=s.length-1;break;default:return}et(s[u])}function am(t,e){if(!e)return!1;const n={x:t.clientX,y:t.clientY};return fm(n,e)}function fm(t,e){const{x:n,y:r}=t;let i=!1;for(let s=0,o=e.length-1;s<e.length;o=s++){const u=e[s].x,l=e[s].y,a=e[o].x,f=e[o].y;l>r!=f>r&&n<(a-u)*(r-l)/(f-l)+u&&(i=!i)}return i}function cm(t){const e=document.activeElement;if(!x(e))return!1;const n=e.closest(`[data-id="${t}"]`);return x(n)}function dm(t){return t?"open":"closed"}const mm={isDateDisabled:void 0,isDateUnavailable:void 0,value:void 0,preventDeselect:!1,numberOfMonths:1,pagedNavigation:!1,weekStartsOn:0,fixedWeeks:!1,calendarLabel:"Event Date",locale:"en",minValue:void 0,maxValue:void 0,disabled:!1,readonly:!1,weekdayFormat:"narrow"};({...Dr(mm,"isDateDisabled","isDateUnavailable","value","locale","disabled","readonly","minValue","maxValue","weekdayFormat")});const{name:Mn}=Xn("dialog"),pm={preventScroll:!0,closeOnEscape:!0,closeOnOutsideClick:!0,role:"dialog",defaultOpen:!1,portal:void 0,forceVisible:!1,openFocus:void 0,closeFocus:void 0,onOutsideClick:void 0},hm=["content","title","description"];function _m(t){const e={...pm,...t},n=Lt(Dr(e,"ids")),{preventScroll:r,closeOnEscape:i,closeOnOutsideClick:s,role:o,portal:u,forceVisible:l,openFocus:a,closeFocus:f,onOutsideClick:c}=n,d=Xe.writable(null),p=Lt({...ei(hm),...e.ids}),m=e.open??Fe(e.defaultOpen),_=fr(m,e==null?void 0:e.onOpenChange),v=ze([_,l],([T,B])=>T||B);let g=Qe;function h(T){const B=T.currentTarget,O=T.currentTarget;!x(B)||!x(O)||(_.set(!0),d.set(O))}function k(){_.set(!1),ni({prop:f.get(),defaultEl:d.get()})}const A=Pe(Mn("trigger"),{stores:[_],returned:([T])=>({"aria-haspopup":"dialog","aria-expanded":T,type:"button"}),action:T=>({destroy:rt(ke(T,"click",O=>{h(O)}),ke(T,"keydown",O=>{O.key!==ae.ENTER&&O.key!==ae.SPACE||(O.preventDefault(),h(O))}))})}),S=Pe(Mn("overlay"),{stores:[v,_],returned:([T,B])=>({hidden:T?void 0:!0,tabindex:-1,style:Ft({display:T?void 0:"none"}),"aria-hidden":!0,"data-state":B?"open":"closed"}),action:T=>{let B=Qe;return i.get()&&(B=ri(T,{handler:()=>{k()}}).destroy),{destroy(){B()}}}}),C=Pe(Mn("content"),{stores:[v,p.content,p.description,p.title,_],returned:([T,B,O,P,V])=>({id:B,role:o.get(),"aria-describedby":O,"aria-labelledby":P,"aria-modal":T?"true":void 0,"data-state":V?"open":"closed",tabindex:-1,hidden:T?void 0:!0,style:Ft({display:T?void 0:"none"})}),action:T=>{let B=Qe,O=Qe;const P=rt(xe([_,s,i],([V,U,ee])=>{if(!V)return;const te=Ja({immediate:!1,escapeDeactivates:ee,clickOutsideDeactivates:U,allowOutsideClick:!0,returnFocusOnDeactivate:!1,fallbackFocus:T});B=te.activate,O=te.deactivate;const z=te.useFocusTrap(T);return z&&z.destroy?z.destroy:te.deactivate}),xe([s,_],([V,U])=>xa(T,{open:U,closeOnInteractOutside:V,onClose(){k()},shouldCloseOnInteractOutside(ee){var te;return(te=c.get())==null||te(ee),!ee.defaultPrevented}}).destroy),xe([i],([V])=>V?ri(T,{handler:k}).destroy:Qe),xe([v],([V])=>{qt().then(()=>{V?B():O()})}));return{destroy:()=>{g(),P()}}}}),L=Pe(Mn("portalled"),{stores:u,returned:T=>({"data-portal":ss(T)}),action:T=>{const B=xe([u],([O])=>{if(O===null)return Qe;const P=Tr(T,O);return P===null?Qe:as(T,P).destroy});return{destroy(){B()}}}}),R=Pe(Mn("title"),{stores:[p.title],returned:([T])=>({id:T})}),W=Pe(Mn("description"),{stores:[p.description],returned:([T])=>({id:T})}),K=Pe(Mn("close"),{returned:()=>({type:"button"}),action:T=>({destroy:rt(ke(T,"click",()=>{k()}),ke(T,"keydown",O=>{O.key!==ae.SPACE&&O.key!==ae.ENTER||(O.preventDefault(),k())}))})});return xe([_,r],([T,B])=>{if(mt){if(B&&T&&(g=go()),T){const O=document.getElementById(p.content.get());ni({prop:a.get(),defaultEl:O})}return()=>{l.get()||g()}}}),{ids:p,elements:{content:C,trigger:A,title:R,description:W,overlay:S,close:K,portalled:L},states:{open:_},options:n}}const ul=[ae.ARROW_LEFT,ae.ARROW_RIGHT,ae.HOME,ae.END],{name:As}=Xn("menubar"),gm={loop:!0,closeOnEscape:!0,preventScroll:!1},bm=["menubar"];function ym(t){const e={...gm,...t},n=Lt(Dr(e,"ids")),{loop:r,closeOnEscape:i,preventScroll:s}=n,o=Xe(Fe("")),u=Xe(Fe(null)),l=Xe(Fe(null)),a=Xe(Fe(null)),f=Xe(Fe(0));let c=!1;const d=Lt({...ei(bm),...e.ids}),p=Pe(As(),{stores:[d.menubar],returned([A]){return{role:"menubar","data-melt-menubar":"","data-orientation":"horizontal",id:A}},action:A=>{const S=Array.from(A.querySelectorAll("[data-melt-menubar-trigger]"));return x(S[0])?(S[0].tabIndex=0,{destroy:Qe}):{}}}),m={positioning:{placement:"bottom-start"},arrowSize:8,dir:"ltr",loop:!1,closeOnEscape:!0,closeOnOutsideClick:!0,portal:void 0,forceVisible:!1,defaultOpen:!1,typeahead:!0,closeFocus:void 0,disableFocusFirstItem:!1,closeOnItemClick:!0,onOutsideClick:void 0},_=A=>{const S={...m,...A},C=Xe(Fe(!1)),L=Xe(Fe(null)),R=Lt(S),{positioning:W,portal:K,forceVisible:T,closeOnOutsideClick:B,onOutsideClick:O}=R,P=um({rootOptions:{...R,preventScroll:s},rootOpen:Xe(C),rootActiveTrigger:Xe(L),nextFocusable:Xe(u),prevFocusable:Xe(l),selector:"menubar-menu",removeScroll:!1}),V=Qi({open:C,forceVisible:T,activeTrigger:L}),U=Pe(As("menu"),{stores:[V,K,P.ids.menu,P.ids.trigger,d.menubar],returned:([z,oe,Re,st,He])=>({role:"menu",hidden:z?void 0:!0,style:Ft({display:z?void 0:"none"}),id:Re,"aria-labelledby":st,"data-state":z?"open":"closed","data-melt-scope":He,"data-portal":ss(oe),tabindex:-1}),action:z=>{let oe=Qe;const Re=xe([C,L,W,K,B],([He,Y,X,pt,ht])=>{oe(),He&&Y&&qt().then(()=>{oe(),oe=es(z,{anchorElement:Y,open:C,options:{floating:X,portal:Tr(z,pt),modal:{closeOnInteractOutside:ht,shouldCloseOnInteractOutside:ct=>{var pn;if((pn=O.get())==null||pn(ct),ct.defaultPrevented)return!1;const mn=ct.target,In=document.getElementById(d.menubar.get());return!In||!pi(mn)?!0:!In.contains(mn)},onClose:()=>{o.set("")},open:He}}}).destroy})}),st=rt(ke(z,"keydown",He=>{const Y=He.target,X=He.currentTarget;if(!x(X)||!x(Y)||(ul.includes(He.key)&&v(He),!(Y.closest('[role="menu"]')===X)))return;Zs.includes(He.key)&&ro(He),He.key===ae.TAB&&(He.preventDefault(),L.set(null),C.set(!1),no(He,u,l));const ht=He.key.length===1;!(He.ctrlKey||He.altKey||He.metaKey)&&ht&&P.helpers.handleTypeaheadSearch(He.key,ln(X))}));return{destroy(){Re(),st(),oe()}}}}),ee=Pe(As("trigger"),{stores:[C,P.ids.menu,P.ids.trigger],returned:([z,oe,Re])=>({"aria-controls":oe,"aria-expanded":z,"data-state":z?"open":"closed",id:Re,"aria-haspopup":"menu","data-orientation":"horizontal",role:"menuitem"}),action:z=>{zr(z);const oe=document.getElementById(d.menubar.get());if(!oe)return{};const Re=Array.from(oe.querySelectorAll("[data-melt-menubar-trigger]"));if(!Re.length)return{};const st=xe([a],([Y])=>{!Y&&Re[0]===z||Y===z?z.tabIndex=0:z.tabIndex=-1});Re[0]===z?z.tabIndex=0:z.tabIndex=-1;const He=rt(ke(z,"click",Y=>{const X=C.get(),pt=Y.currentTarget;x(pt)&&(te(pt),X||Y.preventDefault())}),ke(z,"keydown",Y=>{const X=Y.currentTarget;if(x(X)&&(ti.includes(Y.key)||Y.key===ae.ARROW_DOWN)){Y.preventDefault(),te(X);const pt=X.getAttribute("aria-controls");if(!pt)return;const ht=document.getElementById(pt);if(!ht)return;const ct=ln(ht);if(!ct.length)return;et(ct[0])}}),ke(z,"pointerenter",Y=>{const X=Y.currentTarget;if(!x(X))return;const pt=o.get(),ht=C.get();pt&&!ht&&(C.set(!0),o.set(P.ids.menu.get()),L.set(X))}));return{destroy(){He(),st()}}}});function te(z){C.update(oe=>{const Re=!oe;return Re?(u.set(Ia(z)),l.set(Ma(z)),L.set(z),o.set(P.ids.menu.get())):L.set(null),Re})}return xe([o],([z])=>{if(mt){if(z===P.ids.menu.get()){if(C.get())return;const oe=document.getElementById(P.ids.trigger.get());if(!oe)return;L.set(oe),Ys(oe),C.set(!0);return}if(z!==P.ids.menu.get()){if(!mt)return;if(C.get()){const oe=document.getElementById(P.ids.trigger.get());if(!oe)return;L.set(null),C.set(!1),gn(oe)}return}}}),xe([C],([z])=>{if(!mt)return;const oe=document.getElementById(P.ids.trigger.get());if(oe){if(!z&&o.get()===P.ids.menu.get()){L.set(null),o.set(""),gn(oe);return}z&&(a.set(oe),Ys(oe))}}),xr(()=>{if(!mt)return;const z=document.getElementById(P.ids.trigger.get());x(z)&&C.get()&&L.set(z)}),{ids:P.ids,elements:{...P.elements,menu:U,trigger:ee},builders:P.builders,states:P.states,options:R}};function v(A){if(!mt)return;A.preventDefault();const S=A.currentTarget,C=A.target;if(!x(C)||!x(S))return;const L=C.hasAttribute("data-melt-menubar-menu-subtrigger"),R=C.closest('[role="menu"]')!==S,W=ae.ARROW_LEFT,K=A.key===W;if(!K&&L||K&&R)return;const B=document.getElementById(d.menubar.get());if(!x(B))return;const O=g(B),P=S.getAttribute("aria-labelledby"),V=O.findIndex(z=>z.id===P);let U;switch(A.key){case ae.ARROW_RIGHT:U=V<O.length-1?V+1:0;break;case ae.ARROW_LEFT:U=V>0?V-1:O.length-1;break;case ae.HOME:U=0;break;case ae.END:U=O.length-1;break;default:return}const te=O[U].getAttribute("aria-controls");te&&o.set(te)}function g(A){const S=A.closest('[role="menubar"]');return x(S)?Array.from(S.querySelectorAll("[data-melt-menubar-trigger]")).filter(C=>x(C)):[]}function h(A){A.preventDefault();const S=document.activeElement,C=A.currentTarget;if(!x(C)||!x(S))return;const L=g(C);if(!L.length)return;const R=L.filter(B=>!(B.hasAttribute("data-disabled")||B.getAttribute("disabled")==="true")),W=R.indexOf(S);let K;const T=r.get();switch(A.key){case ae.ARROW_RIGHT:K=W<R.length-1?W+1:T?0:W;break;case ae.ARROW_LEFT:K=W>0?W-1:T?R.length-1:0;break;case ae.HOME:K=0;break;case ae.END:K=R.length-1;break;default:return}et(R[K])}xr(()=>{if(!mt)return;const A=document.getElementById(d.menubar.get());if(!A)return;const S=rt(ke(A,"keydown",C=>{const L=C.target,R=C.currentTarget;!x(R)||!x(L)||!L.hasAttribute("data-melt-menubar-trigger")||ul.includes(C.key)&&h(C)}),_t(document,"keydown",C=>{i.get()&&C.key===ae.ESCAPE&&(window.clearTimeout(f.get()),o.set(""))}));return()=>{S()}});const k=[];return xe([o,s],([A,S])=>{!mt||!S||(A?c||(k.push(go()),c=!0):(k.forEach(C=>C()),c=!1))}),Ra(()=>{k.forEach(A=>A())}),{ids:d,elements:{menubar:p},builders:{createMenu:_},options:n}}const vm={positioning:{placement:"bottom"},arrowSize:8,defaultOpen:!1,disableFocusTrap:!1,closeOnEscape:!0,preventScroll:!1,onOpenChange:void 0,closeOnOutsideClick:!0,portal:void 0,forceVisible:!1,openFocus:void 0,closeFocus:void 0,onOutsideClick:void 0},{name:Wr}=Xn("popover"),km=["trigger","content"];function Cm(t){const e={...vm,...t},n=Lt(Dr(e,"open","ids")),{positioning:r,arrowSize:i,disableFocusTrap:s,preventScroll:o,closeOnEscape:u,closeOnOutsideClick:l,portal:a,forceVisible:f,openFocus:c,closeFocus:d,onOutsideClick:p}=n,m=e.open??Fe(e.defaultOpen),_=fr(m,e==null?void 0:e.onOpenChange),v=Xe.writable(null),g=Lt({...ei(km),...e.ids});xr(()=>{v.set(document.getElementById(g.trigger.get()))});function h(){_.set(!1);const T=document.getElementById(g.trigger.get());ni({prop:d.get(),defaultEl:T})}const k=Qi({open:_,activeTrigger:v,forceVisible:f}),A=Pe(Wr("content"),{stores:[k,a,g.content],returned:([T,B,O])=>({hidden:T&&mt?void 0:!0,tabindex:-1,style:Ft({display:T?void 0:"none"}),id:O,"data-state":T?"open":"closed","data-portal":ss(B)}),action:T=>{let B=Qe;const O=xe([k,v,r,s,u,l,a],([P,V,U,ee,te,z,oe])=>{B(),!(!P||!V)&&qt().then(()=>{B(),B=es(T,{anchorElement:V,open:_,options:{floating:U,focusTrap:ee?null:{returnFocusOnDeactivate:!1,clickOutsideDeactivates:z,allowOutsideClick:!0,escapeDeactivates:te},modal:{shouldCloseOnInteractOutside:C,onClose:h,open:P,closeOnInteractOutside:z},escapeKeydown:te?{handler:()=>{h()}}:null,portal:Tr(T,oe)}}).destroy})});return{destroy(){O(),B()}}}});function S(T){_.update(B=>!B),T&&T!==v.get()&&v.set(T)}function C(T){var P;if((P=p.get())==null||P(T),T.defaultPrevented)return!1;const B=T.target,O=document.getElementById(g.trigger.get());return!(O&&pi(B)&&(B===O||O.contains(B)))}const L=Pe(Wr("trigger"),{stores:[k,g.content,g.trigger],returned:([T,B,O])=>({role:"button","aria-haspopup":"dialog","aria-expanded":T?"true":"false","data-state":al(T),"aria-controls":B,id:O}),action:T=>({destroy:rt(ke(T,"click",()=>{S(T)}),ke(T,"keydown",O=>{O.key!==ae.ENTER&&O.key!==ae.SPACE||(O.preventDefault(),S(T))}))})}),R=Pe(Wr("overlay"),{stores:[k],returned:([T])=>({hidden:T?void 0:!0,tabindex:-1,style:Ft({display:T?void 0:"none"}),"aria-hidden":"true","data-state":al(T)}),action:T=>{let B=Qe,O=Qe,P=Qe;return u.get()&&(B=ri(T,{handler:()=>{h()}}).destroy),O=xe([a],([V])=>{if(P(),V===null)return;const U=Tr(T,V);U!==null&&(P=as(T,U).destroy)}),{destroy(){B(),O(),P()}}}}),W=Pe(Wr("arrow"),{stores:i,returned:T=>({"data-arrow":!0,style:Ft({position:"absolute",width:`var(--arrow-size, ${T}px)`,height:`var(--arrow-size, ${T}px)`})})}),K=Pe(Wr("close"),{returned:()=>({type:"button"}),action:T=>({destroy:rt(ke(T,"click",O=>{O.defaultPrevented||h()}),ke(T,"keydown",O=>{O.defaultPrevented||O.key!==ae.ENTER&&O.key!==ae.SPACE||(O.preventDefault(),S())}))})});return xe([_,v,o],([T,B,O])=>{if(!mt)return;const P=[];if(T){B||qt().then(()=>{const U=document.getElementById(g.trigger.get());x(U)&&v.set(U)}),O&&P.push(go());const V=B??document.getElementById(g.trigger.get());ni({prop:c.get(),defaultEl:V})}return()=>{P.forEach(V=>V())}}),{ids:g,elements:{trigger:L,content:A,arrow:W,close:K,overlay:R},states:{open:_},options:n}}function al(t){return t?"open":"closed"}const Em={orientation:"horizontal",decorative:!1},wm=t=>{const e={...Em,...t},n=Lt(e),{orientation:r,decorative:i}=n;return{elements:{root:Pe("separator",{stores:[r,i],returned:([o,u])=>({role:u?"none":"separator","aria-orientation":o==="vertical"?o:void 0,"aria-hidden":u,"data-orientation":o})})},options:n}},Om={loop:!0,orientation:"horizontal"},{name:Fi,selector:Ts}=Xn("toolbar"),Am=t=>{const e={...Om,...t},n=Lt(e),{loop:r,orientation:i}=n,s=Pe(Fi(),{stores:i,returned:d=>({role:"toolbar","data-orientation":d})}),o=Pe(Fi("button"),{returned:()=>({role:"button",type:"button"}),action:d=>($s(d),{destroy:ke(d,"keydown",c)})}),u=Pe(Fi("link"),{returned:()=>({role:"link"}),action:d=>($s(d),{destroy:ke(d,"keydown",c)})}),l=Pe(Fi("separator"),{stores:i,returned:d=>({role:"separator","data-orientation":d==="horizontal"?"vertical":"horizontal","aria-orientation":d==="horizontal"?"vertical":"horizontal"})}),a={type:"single",disabled:!1},f=d=>{const p={...a,...d},m=Lt(p),{type:_,disabled:v}=m,g=p.defaultValue?p.defaultValue:p.type==="single"?void 0:[],h=p.value??Fe(g),k=fr(h,p==null?void 0:p.onValueChange),{name:A}=Xn("toolbar-group"),S=Pe(A(),{stores:i,returned:R=>({role:"group","data-orientation":R})}),C=Pe(A("item"),{stores:[v,_,k,i],returned:([R,W,K,T])=>B=>{const O=typeof B=="string"?B:B.value,P=typeof B=="string"?!1:!!B.disabled,V=R||P,U=Array.isArray(K)?K.includes(O):K===O,ee=W==="single",te=W==="multiple";return{disabled:Yr(V),pressed:U,"data-orientation":T,"data-disabled":Yr(V),"data-value":O,"data-state":U?"on":"off","aria-checked":ee?U:void 0,"aria-pressed":te?U:void 0,type:"button",role:ee?"radio":void 0,"data-melt-toolbar-item":""}},action:R=>{$s(R);function W(){const B=R.dataset.value,O=R.dataset.disabled==="true";return{value:B,disabled:O}}function K(){const{value:B,disabled:O}=W();B===void 0||O||k.update(P=>Array.isArray(P)?P.includes(B)?P.filter(V=>V!==B):(P.push(B),P):P===B?void 0:B)}return{destroy:rt(ke(R,"click",()=>{K()}),ke(R,"keydown",B=>{if(B.key===ae.ENTER||B.key===ae.SPACE){B.preventDefault(),K();return}c(B)}))}}}),L=ze(k,R=>W=>Array.isArray(R)?R.includes(W):R===W);return{elements:{group:S,item:C},states:{value:k},helpers:{isPressed:L},options:m}};function c(d){const p=i.get(),m=r.get(),_={horizontal:ae.ARROW_RIGHT,vertical:ae.ARROW_DOWN}[p??"horizontal"],v={horizontal:ae.ARROW_LEFT,vertical:ae.ARROW_UP}[p??"horizontal"],g=d.currentTarget;if(!x(g))return;const h=g.closest("[data-melt-toolbar]");if(!x(h))return;const k=tf(h),A=k.indexOf(g);if(d.key===_){d.preventDefault();const S=A+1;S>=k.length&&m?et(k[0]):et(k[S])}else if(d.key===v){d.preventDefault();const S=A-1;S<0&&m?et(k[k.length-1]):et(k[S])}else d.key===ae.HOME?(d.preventDefault(),et(k[0])):d.key===ae.END&&(d.preventDefault(),et(k[k.length-1]))}return{elements:{root:s,button:o,separator:l,link:u},builders:{createToolbarGroup:f},options:n}};function $s(t){const e=t.closest("[data-melt-toolbar]");if(!x(e))return;tf(e)[0]===t?t.tabIndex=0:t.tabIndex=-1}function tf(t){return Array.from(t.querySelectorAll(`${Ts("item")}, ${Ts("button")}, ${Ts("link")}`)).filter(e=>x(e))}function si(t,e){const n={};return e.forEach(r=>{n[r]={[`data-${t}-${r}`]:""}}),r=>n[r]}function Tm(t){return t?{"aria-disabled":"true","data-disabled":""}:{"aria-disabled":void 0,"data-disabled":void 0}}function Pn(){const t=Ff();return e=>{const{originalEvent:n}=e.detail,{cancelable:r}=e,i=n.type;t(i,{originalEvent:n,currentTarget:n.currentTarget},{cancelable:r})||e.preventDefault()}}function _i(t){const e={};for(const n in t){const r=t[n];r!==void 0&&(e[n]=r)}return e}function gi(t){return function(e,n){if(n===void 0)return;const r=t[e];r&&r.set(n)}}function nf(t){return(e={})=>$m(t,e)}function $m(t,e){const r={...{side:"bottom",align:"center",sideOffset:0,alignOffset:0,sameWidth:!1,avoidCollisions:!0,collisionPadding:8,fitViewport:!1,strategy:"absolute",overlap:!1},...e};t.update(i=>({...i,placement:Sm(r.side,r.align),offset:{...i.offset,mainAxis:r.sideOffset,crossAxis:r.alignOffset},gutter:0,sameWidth:r.sameWidth,flip:r.avoidCollisions,overflowPadding:r.collisionPadding,boundary:r.collisionBoundary,fitViewport:r.fitViewport,strategy:r.strategy,overlap:r.overlap}))}function Sm(t,e){return e==="center"?t:`${t}-${e}`}function Oo(){return{NAME:"menu",SUB_NAME:"menu-submenu",RADIO_GROUP_NAME:"menu-radiogroup",CHECKBOX_ITEM_NAME:"menu-checkboxitem",RADIO_ITEM_NAME:"menu-radioitem",GROUP_NAME:"menu-group",PARTS:["arrow","checkbox-indicator","checkbox-item","content","group","item","label","radio-group","radio-item","radio-indicator","separator","sub-content","sub-trigger","trigger"]}}function bi(){const{NAME:t}=Oo();return bt(t)}function Rm(t){const{RADIO_GROUP_NAME:e}=Oo(),{builders:{createMenuRadioGroup:n},getAttrs:r}=bi(),i=n(t);return At(e,{...i,getAttrs:r}),{...i,getAttrs:r}}function Dm(t){const{RADIO_ITEM_NAME:e,RADIO_GROUP_NAME:n}=Oo(),r=bt(n);return At(e,{...r,value:t}),{...r,value:t}}function Fm(t){const n={...{side:"bottom",align:"center"},...t},{options:{positioning:r}}=bi();nf(r)(n)}const Pm=t=>({builder:t&8}),fl=t=>({builder:t[3]}),Lm=t=>({builder:t&8}),cl=t=>({builder:t[3]});function Im(t){let e=t[1]?"a":"div",n,r,i=(t[1]?"a":"div")&&Ss(t);return{c(){i&&i.c(),n=$e()},m(s,o){i&&i.m(s,o),w(s,n,o),r=!0},p(s,o){s[1],e?fe(e,s[1]?"a":"div")?(i.d(1),i=Ss(s),e=s[1]?"a":"div",i.c(),i.m(n.parentNode,n)):i.p(s,o):(i=Ss(s),e=s[1]?"a":"div",i.c(),i.m(n.parentNode,n))},i(s){r||(b(i,s),r=!0)},o(s){y(i,s),r=!1},d(s){s&&E(n),i&&i.d(s)}}}function Mm(t){let e;const n=t[11].default,r=pe(n,t,t[10],cl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&1032)&&_e(r,n,i,i[10],e?he(n,i[10],s,Lm):ge(i[10]),cl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function Ss(t){let e,n,r,i;const s=t[11].default,o=pe(s,t,t[10],fl);let u=[{href:t[1]},t[3],t[6]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D(t[1]?"a":"div"),o&&o.c(),Vi(t[1]?"a":"div")(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),t[13](e),n=!0,r||(i=[Ue(t[3].action(e)),G(e,"m-click",t[5]),G(e,"m-focusin",t[5]),G(e,"m-focusout",t[5]),G(e,"m-keydown",t[5]),G(e,"m-pointerdown",t[5]),G(e,"m-pointerleave",t[5]),G(e,"m-pointermove",t[5]),G(e,"pointerenter",t[12])],r=!0)},p(a,f){o&&o.p&&(!n||f&1032)&&_e(o,s,a,a[10],n?he(s,a[10],f,Pm):ge(a[10]),fl),Vi(a[1]?"a":"div")(e,l=Me(u,[(!n||f&2)&&{href:a[1]},f&8&&a[3],f&64&&a[6]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[13](null),r=!1,Te(i)}}}function Nm(t){let e,n,r,i;const s=[Mm,Im],o=[];function u(l,a){return l[2]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=$e()},m(l,a){o[e].m(l,a),w(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(de(),y(o[f],1,1,()=>{o[f]=null}),me(),n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r))},i(l){i||(b(n),i=!0)},o(l){y(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function Hm(t,e,n){let r,i;const s=["href","asChild","disabled","el"];let o=Ke(e,s),u,{$$slots:l={},$$scope:a}=e,{href:f=void 0}=e,{asChild:c=!1}=e,{disabled:d=!1}=e,{el:p=void 0}=e;const{elements:{item:m},getAttrs:_}=bi();J(t,m,k=>n(9,u=k));const v=Pn();function g(k){Oe.call(this,t,k)}function h(k){Ce[k?"unshift":"push"](()=>{p=k,n(0,p)})}return t.$$set=k=>{e=ie(ie({},e),yt(k)),n(6,o=Ke(e,s)),"href"in k&&n(1,f=k.href),"asChild"in k&&n(2,c=k.asChild),"disabled"in k&&n(7,d=k.disabled),"el"in k&&n(0,p=k.el),"$$scope"in k&&n(10,a=k.$$scope)},t.$$.update=()=>{t.$$.dirty&512&&n(3,r=u),t.$$.dirty&128&&n(8,i={..._("item"),...Tm(d)}),t.$$.dirty&264&&Object.assign(r,i)},[p,f,c,r,m,v,o,d,i,u,a,l,g,h]}class Pt extends ve{constructor(e){super(),ye(this,e,Hm,Nm,fe,{href:1,asChild:2,disabled:7,el:0})}}const Vm=t=>({builder:t&4}),dl=t=>({builder:t[2]}),Um=t=>({builder:t&4}),ml=t=>({builder:t[2]});function Bm(t){let e,n,r,i;const s=t[10].default,o=pe(s,t,t[9],dl);let u=[t[2],t[5]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("div"),o&&o.c(),le(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),t[12](e),n=!0,r||(i=[Ue(t[2].action(e)),G(e,"m-click",t[4]),G(e,"m-focusin",t[4]),G(e,"m-focusout",t[4]),G(e,"m-keydown",t[4]),G(e,"m-pointerdown",t[4]),G(e,"m-pointerleave",t[4]),G(e,"m-pointermove",t[4]),G(e,"pointerenter",t[11])],r=!0)},p(a,f){o&&o.p&&(!n||f&516)&&_e(o,s,a,a[9],n?he(s,a[9],f,Vm):ge(a[9]),dl),le(e,l=Me(u,[f&4&&a[2],f&32&&a[5]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[12](null),r=!1,Te(i)}}}function Km(t){let e;const n=t[10].default,r=pe(n,t,t[9],ml);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&516)&&_e(r,n,i,i[9],e?he(n,i[9],s,Um):ge(i[9]),ml)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function jm(t){let e,n,r,i;const s=[Km,Bm],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=$e()},m(l,a){o[e].m(l,a),w(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(de(),y(o[f],1,1,()=>{o[f]=null}),me(),n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r))},i(l){i||(b(n),i=!0)},o(l){y(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function qm(t,e,n){let r;const i=["value","disabled","asChild","el"];let s=Ke(e,i),o,{$$slots:u={},$$scope:l}=e,{value:a}=e,{disabled:f=!1}=e,{asChild:c=!1}=e,{el:d=void 0}=e;const{elements:{radioItem:p},getAttrs:m}=Dm(a);J(t,p,k=>n(8,o=k));const _=m("radio-item"),v=Pn();function g(k){Oe.call(this,t,k)}function h(k){Ce[k?"unshift":"push"](()=>{d=k,n(0,d)})}return t.$$set=k=>{e=ie(ie({},e),yt(k)),n(5,s=Ke(e,i)),"value"in k&&n(6,a=k.value),"disabled"in k&&n(7,f=k.disabled),"asChild"in k&&n(1,c=k.asChild),"el"in k&&n(0,d=k.el),"$$scope"in k&&n(9,l=k.$$scope)},t.$$.update=()=>{t.$$.dirty&448&&n(2,r=o({value:a,disabled:f})),t.$$.dirty&4&&Object.assign(r,_)},[d,c,r,p,v,s,a,f,o,l,u,g,h]}class Wm extends ve{constructor(e){super(),ye(this,e,qm,jm,fe,{value:6,disabled:7,asChild:1,el:0})}}const Qm=t=>({builder:t&4}),pl=t=>({builder:t[2]});function zm(t){let e,n,r,i=[t[3],t[5]],s={};for(let o=0;o<i.length;o+=1)s=ie(s,i[o]);return{c(){e=D("div"),le(e,s)},m(o,u){w(o,e,u),t[8](e),n||(r=Ue(t[3].action(e)),n=!0)},p(o,u){le(e,s=Me(i,[u&8&&o[3],u&32&&o[5]]))},i:ce,o:ce,d(o){o&&E(e),t[8](null),n=!1,r()}}}function Gm(t){let e;const n=t[7].default,r=pe(n,t,t[6],pl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&68)&&_e(r,n,i,i[6],e?he(n,i[6],s,Qm):ge(i[6]),pl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function Ym(t){let e,n,r,i;const s=[Gm,zm],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=$e()},m(l,a){o[e].m(l,a),w(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(de(),y(o[f],1,1,()=>{o[f]=null}),me(),n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r))},i(l){i||(b(n),i=!0)},o(l){y(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function Zm(t,e,n){let r;const i=["asChild","el"];let s=Ke(e,i),o,{$$slots:u={},$$scope:l}=e,{asChild:a=!1}=e,{el:f=void 0}=e;const{elements:{separator:c},getAttrs:d}=bi();J(t,c,_=>n(3,o=_));const p=d("separator");function m(_){Ce[_?"unshift":"push"](()=>{f=_,n(0,f)})}return t.$$set=_=>{e=ie(ie({},e),yt(_)),n(5,s=Ke(e,i)),"asChild"in _&&n(1,a=_.asChild),"el"in _&&n(0,f=_.el),"$$scope"in _&&n(6,l=_.$$scope)},t.$$.update=()=>{t.$$.dirty&8&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,p)},[f,a,r,o,c,s,l,u,m]}class fs extends ve{constructor(e){super(),ye(this,e,Zm,Ym,fe,{asChild:1,el:0})}}const Xm=t=>({builder:t&4}),hl=t=>({builder:t[2]}),Jm=t=>({builder:t&4}),_l=t=>({builder:t[2]});function xm(t){let e,n,r,i;const s=t[9].default,o=pe(s,t,t[8],hl);let u=[t[2],t[4]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("div"),o&&o.c(),le(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),t[10](e),n=!0,r||(i=Ue(t[2].action(e)),r=!0)},p(a,f){o&&o.p&&(!n||f&260)&&_e(o,s,a,a[8],n?he(s,a[8],f,Xm):ge(a[8]),hl),le(e,l=Me(u,[f&4&&a[2],f&16&&a[4]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[10](null),r=!1,i()}}}function ep(t){let e;const n=t[9].default,r=pe(n,t,t[8],_l);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&260)&&_e(r,n,i,i[8],e?he(n,i[8],s,Jm):ge(i[8]),_l)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function tp(t){let e,n,r,i;const s=[ep,xm],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=$e()},m(l,a){o[e].m(l,a),w(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(de(),y(o[f],1,1,()=>{o[f]=null}),me(),n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r))},i(l){i||(b(n),i=!0)},o(l){y(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function np(t,e,n){let r;const i=["value","onValueChange","asChild","el"];let s=Ke(e,i),o,{$$slots:u={},$$scope:l}=e,{value:a=void 0}=e,{onValueChange:f=void 0}=e,{asChild:c=!1}=e,{el:d=void 0}=e;const{elements:{radioGroup:p},states:{value:m},getAttrs:_}=Rm({defaultValue:a,onValueChange:({next:h})=>(h!=null&&h!==a&&(f==null||f(h),n(5,a=h)),h)});J(t,p,h=>n(7,o=h));const v=_("radio-group");function g(h){Ce[h?"unshift":"push"](()=>{d=h,n(0,d)})}return t.$$set=h=>{e=ie(ie({},e),yt(h)),n(4,s=Ke(e,i)),"value"in h&&n(5,a=h.value),"onValueChange"in h&&n(6,f=h.onValueChange),"asChild"in h&&n(1,c=h.asChild),"el"in h&&n(0,d=h.el),"$$scope"in h&&n(8,l=h.$$scope)},t.$$.update=()=>{t.$$.dirty&32&&a!==void 0&&m.set(a),t.$$.dirty&128&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,v)},[d,c,r,p,s,a,f,o,l,u,g]}class rp extends ve{constructor(e){super(),ye(this,e,np,tp,fe,{value:5,onValueChange:6,asChild:1,el:0})}}function rf(){return{NAME:"popover",PARTS:["arrow","close","content","trigger"]}}function ip(t){const{NAME:e,PARTS:n}=rf(),r=si(e,n),i={...Cm({positioning:{placement:"bottom",gutter:0},..._i(t),forceVisible:!0}),getAttrs:r};return At(e,i),{...i,updateOption:gi(i.options)}}function Ao(){const{NAME:t}=rf();return bt(t)}function sp(t){const n={...{side:"bottom",align:"center"},...t},{options:{positioning:r}}=Ao();nf(r)(n)}function sf(){return{NAME:"dialog",PARTS:["close","content","description","overlay","portal","title","trigger"]}}function op(t){const{NAME:e,PARTS:n}=sf(),r=si(e,n),i={..._m({..._i(t),role:"dialog",forceVisible:!0}),getAttrs:r};return At(e,i),{...i,updateOption:gi(i.options)}}function Ir(){const{NAME:t}=sf();return bt(t)}const lp=t=>({ids:t&1}),gl=t=>({ids:t[0]});function up(t){let e;const n=t[12].default,r=pe(n,t,t[11],gl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,[s]){r&&r.p&&(!e||s&2049)&&_e(r,n,i,i[11],e?he(n,i[11],s,lp):ge(i[11]),gl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function ap(t,e,n){let r,{$$slots:i={},$$scope:s}=e,{preventScroll:o=void 0}=e,{closeOnEscape:u=void 0}=e,{closeOnOutsideClick:l=void 0}=e,{portal:a=void 0}=e,{open:f=void 0}=e,{onOpenChange:c=void 0}=e,{openFocus:d=void 0}=e,{closeFocus:p=void 0}=e,{onOutsideClick:m=void 0}=e;const{states:{open:_},updateOption:v,ids:g}=op({closeOnEscape:u,preventScroll:o,closeOnOutsideClick:l,portal:a,forceVisible:!0,defaultOpen:f,openFocus:d,closeFocus:p,onOutsideClick:m,onOpenChange:({next:k})=>(f!==k&&(c==null||c(k),n(2,f=k)),k)}),h=ze([g.content,g.description,g.title],([k,A,S])=>({content:k,description:A,title:S}));return J(t,h,k=>n(0,r=k)),t.$$set=k=>{"preventScroll"in k&&n(3,o=k.preventScroll),"closeOnEscape"in k&&n(4,u=k.closeOnEscape),"closeOnOutsideClick"in k&&n(5,l=k.closeOnOutsideClick),"portal"in k&&n(6,a=k.portal),"open"in k&&n(2,f=k.open),"onOpenChange"in k&&n(7,c=k.onOpenChange),"openFocus"in k&&n(8,d=k.openFocus),"closeFocus"in k&&n(9,p=k.closeFocus),"onOutsideClick"in k&&n(10,m=k.onOutsideClick),"$$scope"in k&&n(11,s=k.$$scope)},t.$$.update=()=>{t.$$.dirty&4&&f!==void 0&&_.set(f),t.$$.dirty&8&&v("preventScroll",o),t.$$.dirty&16&&v("closeOnEscape",u),t.$$.dirty&32&&v("closeOnOutsideClick",l),t.$$.dirty&64&&v("portal",a),t.$$.dirty&256&&v("openFocus",d),t.$$.dirty&512&&v("closeFocus",p),t.$$.dirty&1024&&v("onOutsideClick",m)},[r,h,f,o,u,l,a,c,d,p,m,s,i]}class oi extends ve{constructor(e){super(),ye(this,e,ap,up,fe,{preventScroll:3,closeOnEscape:4,closeOnOutsideClick:5,portal:6,open:2,onOpenChange:7,openFocus:8,closeFocus:9,onOutsideClick:10})}}const fp=t=>({builder:t&8}),bl=t=>({builder:t[3]}),cp=t=>({builder:t&8}),yl=t=>({builder:t[3]});function dp(t){let e=t[1],n,r,i=t[1]&&Rs(t);return{c(){i&&i.c(),n=$e()},m(s,o){i&&i.m(s,o),w(s,n,o),r=!0},p(s,o){s[1]?e?fe(e,s[1])?(i.d(1),i=Rs(s),e=s[1],i.c(),i.m(n.parentNode,n)):i.p(s,o):(i=Rs(s),e=s[1],i.c(),i.m(n.parentNode,n)):e&&(i.d(1),i=null,e=s[1])},i(s){r||(b(i,s),r=!0)},o(s){y(i,s),r=!1},d(s){s&&E(n),i&&i.d(s)}}}function mp(t){let e;const n=t[9].default,r=pe(n,t,t[8],yl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&264)&&_e(r,n,i,i[8],e?he(n,i[8],s,cp):ge(i[8]),yl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function Rs(t){let e,n,r,i;const s=t[9].default,o=pe(s,t,t[8],bl);let u=[t[3],t[5]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D(t[1]),o&&o.c(),Vi(t[1])(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),t[10](e),n=!0,r||(i=Ue(t[3].action(e)),r=!0)},p(a,f){o&&o.p&&(!n||f&264)&&_e(o,s,a,a[8],n?he(s,a[8],f,fp):ge(a[8]),bl),Vi(a[1])(e,l=Me(u,[f&8&&a[3],f&32&&a[5]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[10](null),r=!1,i()}}}function pp(t){let e,n,r,i;const s=[mp,dp],o=[];function u(l,a){return l[2]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=$e()},m(l,a){o[e].m(l,a),w(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(de(),y(o[f],1,1,()=>{o[f]=null}),me(),n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r))},i(l){i||(b(n),i=!0)},o(l){y(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function hp(t,e,n){let r;const i=["level","asChild","id","el"];let s=Ke(e,i),o,{$$slots:u={},$$scope:l}=e,{level:a="h2"}=e,{asChild:f=!1}=e,{id:c=void 0}=e,{el:d=void 0}=e;const{elements:{title:p},ids:m,getAttrs:_}=Ir();J(t,p,h=>n(7,o=h));const v=_("title");function g(h){Ce[h?"unshift":"push"](()=>{d=h,n(0,d)})}return t.$$set=h=>{e=ie(ie({},e),yt(h)),n(5,s=Ke(e,i)),"level"in h&&n(1,a=h.level),"asChild"in h&&n(2,f=h.asChild),"id"in h&&n(6,c=h.id),"el"in h&&n(0,d=h.el),"$$scope"in h&&n(8,l=h.$$scope)},t.$$.update=()=>{t.$$.dirty&64&&c&&m.title.set(c),t.$$.dirty&128&&n(3,r=o),t.$$.dirty&8&&Object.assign(r,v)},[d,a,f,r,p,s,c,o,l,u,g]}class Tt extends ve{constructor(e){super(),ye(this,e,hp,pp,fe,{level:1,asChild:2,id:6,el:0})}}const _p=t=>({builder:t&4}),vl=t=>({builder:t[2]}),gp=t=>({builder:t&4}),kl=t=>({builder:t[2]});function bp(t){let e,n,r,i;const s=t[8].default,o=pe(s,t,t[7],vl);let u=[t[2],{type:"button"},t[5]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("button"),o&&o.c(),le(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),e.autofocus&&e.focus(),t[9](e),n=!0,r||(i=[Ue(t[2].action(e)),G(e,"m-click",t[4]),G(e,"m-keydown",t[4])],r=!0)},p(a,f){o&&o.p&&(!n||f&132)&&_e(o,s,a,a[7],n?he(s,a[7],f,_p):ge(a[7]),vl),le(e,l=Me(u,[f&4&&a[2],{type:"button"},f&32&&a[5]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[9](null),r=!1,Te(i)}}}function yp(t){let e;const n=t[8].default,r=pe(n,t,t[7],kl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&132)&&_e(r,n,i,i[7],e?he(n,i[7],s,gp):ge(i[7]),kl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function vp(t){let e,n,r,i;const s=[yp,bp],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=$e()},m(l,a){o[e].m(l,a),w(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(de(),y(o[f],1,1,()=>{o[f]=null}),me(),n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r))},i(l){i||(b(n),i=!0)},o(l){y(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function kp(t,e,n){let r;const i=["asChild","el"];let s=Ke(e,i),o,{$$slots:u={},$$scope:l}=e,{asChild:a=!1}=e,{el:f=void 0}=e;const{elements:{close:c},getAttrs:d}=Ir();J(t,c,v=>n(6,o=v));const p=Pn(),m=d("close");function _(v){Ce[v?"unshift":"push"](()=>{f=v,n(0,f)})}return t.$$set=v=>{e=ie(ie({},e),yt(v)),n(5,s=Ke(e,i)),"asChild"in v&&n(1,a=v.asChild),"el"in v&&n(0,f=v.el),"$$scope"in v&&n(7,l=v.$$scope)},t.$$.update=()=>{t.$$.dirty&64&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,m)},[f,a,r,c,p,s,o,l,u,_]}class Mt extends ve{constructor(e){super(),ye(this,e,kp,vp,fe,{asChild:1,el:0})}}const Cp=t=>({builder:t&4}),Cl=t=>({builder:t[2]}),Ep=t=>({builder:t&4}),El=t=>({builder:t[2]});function wp(t){let e,n,r,i;const s=t[7].default,o=pe(s,t,t[6],Cl);let u=[t[2],t[4]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("div"),o&&o.c(),le(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),t[8](e),n=!0,r||(i=Ue(t[2].action(e)),r=!0)},p(a,f){o&&o.p&&(!n||f&68)&&_e(o,s,a,a[6],n?he(s,a[6],f,Cp):ge(a[6]),Cl),le(e,l=Me(u,[f&4&&a[2],f&16&&a[4]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[8](null),r=!1,i()}}}function Op(t){let e;const n=t[7].default,r=pe(n,t,t[6],El);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&68)&&_e(r,n,i,i[6],e?he(n,i[6],s,Ep):ge(i[6]),El)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function Ap(t){let e,n,r,i;const s=[Op,wp],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=$e()},m(l,a){o[e].m(l,a),w(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(de(),y(o[f],1,1,()=>{o[f]=null}),me(),n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r))},i(l){i||(b(n),i=!0)},o(l){y(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function Tp(t,e,n){let r;const i=["asChild","el"];let s=Ke(e,i),o,{$$slots:u={},$$scope:l}=e,{asChild:a=!1}=e,{el:f=void 0}=e;const{elements:{portalled:c},getAttrs:d}=Ir();J(t,c,_=>n(5,o=_));const p=d("portal");function m(_){Ce[_?"unshift":"push"](()=>{f=_,n(0,f)})}return t.$$set=_=>{e=ie(ie({},e),yt(_)),n(4,s=Ke(e,i)),"asChild"in _&&n(1,a=_.asChild),"el"in _&&n(0,f=_.el),"$$scope"in _&&n(6,l=_.$$scope)},t.$$.update=()=>{t.$$.dirty&32&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,p)},[f,a,r,c,s,o,l,u,m]}class yi extends ve{constructor(e){super(),ye(this,e,Tp,Ap,fe,{asChild:1,el:0})}}const $p=t=>({builder:t[0]&256}),wl=t=>({builder:t[8]}),Sp=t=>({builder:t[0]&256}),Ol=t=>({builder:t[8]}),Rp=t=>({builder:t[0]&256}),Al=t=>({builder:t[8]}),Dp=t=>({builder:t[0]&256}),Tl=t=>({builder:t[8]}),Fp=t=>({builder:t[0]&256}),$l=t=>({builder:t[8]}),Pp=t=>({builder:t[0]&256}),Sl=t=>({builder:t[8]});function Lp(t){let e,n,r,i;const s=t[16].default,o=pe(s,t,t[15],wl);let u=[t[8],t[12]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("div"),o&&o.c(),le(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),t[56](e),n=!0,r||(i=[Ue(t[8].action(e)),G(e,"pointerdown",t[45]),G(e,"pointermove",t[46]),G(e,"pointerup",t[47]),G(e,"touchcancel",t[48]),G(e,"touchend",t[49]),G(e,"touchmove",t[50],{passive:!1}),G(e,"touchstart",t[51],{passive:!1})],r=!0)},p(a,f){o&&o.p&&(!n||f[0]&33024)&&_e(o,s,a,a[15],n?he(s,a[15],f,$p):ge(a[15]),wl),le(e,l=Me(u,[f[0]&256&&a[8],f[0]&4096&&a[12]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[56](null),r=!1,Te(i)}}}function Ip(t){let e,n,r,i,s;const o=t[16].default,u=pe(o,t,t[15],Ol);let l=[t[8],t[12]],a={};for(let f=0;f<l.length;f+=1)a=ie(a,l[f]);return{c(){e=D("div"),u&&u.c(),le(e,a)},m(f,c){w(f,e,c),u&&u.m(e,null),t[55](e),r=!0,i||(s=[Ue(t[8].action(e)),G(e,"pointerdown",t[38]),G(e,"pointermove",t[39]),G(e,"pointerup",t[40]),G(e,"touchcancel",t[41]),G(e,"touchend",t[42]),G(e,"touchmove",t[43],{passive:!1}),G(e,"touchstart",t[44],{passive:!1})],i=!0)},p(f,c){t=f,u&&u.p&&(!r||c[0]&33024)&&_e(u,o,t,t[15],r?he(o,t[15],c,Sp):ge(t[15]),Ol),le(e,a=Me(l,[c[0]&256&&t[8],c[0]&4096&&t[12]]))},i(f){r||(b(u,f),n&&n.end(1),r=!0)},o(f){y(u,f),f&&(n=Fn(e,t[5],t[6])),r=!1},d(f){f&&E(e),u&&u.d(f),t[55](null),f&&n&&n.end(),i=!1,Te(s)}}}function Mp(t){let e,n,r,i,s;const o=t[16].default,u=pe(o,t,t[15],Al);let l=[t[8],t[12]],a={};for(let f=0;f<l.length;f+=1)a=ie(a,l[f]);return{c(){e=D("div"),u&&u.c(),le(e,a)},m(f,c){w(f,e,c),u&&u.m(e,null),t[54](e),r=!0,i||(s=[Ue(t[8].action(e)),G(e,"pointerdown",t[31]),G(e,"pointermove",t[32]),G(e,"pointerup",t[33]),G(e,"touchcancel",t[34]),G(e,"touchend",t[35]),G(e,"touchmove",t[36],{passive:!1}),G(e,"touchstart",t[37],{passive:!1})],i=!0)},p(f,c){t=f,u&&u.p&&(!r||c[0]&33024)&&_e(u,o,t,t[15],r?he(o,t[15],c,Rp):ge(t[15]),Al),le(e,a=Me(l,[c[0]&256&&t[8],c[0]&4096&&t[12]]))},i(f){r||(b(u,f),f&&(n||at(()=>{n=Dn(e,t[3],t[4]),n.start()})),r=!0)},o(f){y(u,f),r=!1},d(f){f&&E(e),u&&u.d(f),t[54](null),i=!1,Te(s)}}}function Np(t){let e,n,r,i,s,o;const u=t[16].default,l=pe(u,t,t[15],Tl);let a=[t[8],t[12]],f={};for(let c=0;c<a.length;c+=1)f=ie(f,a[c]);return{c(){e=D("div"),l&&l.c(),le(e,f)},m(c,d){w(c,e,d),l&&l.m(e,null),t[53](e),i=!0,s||(o=[Ue(t[8].action(e)),G(e,"pointerdown",t[24]),G(e,"pointermove",t[25]),G(e,"pointerup",t[26]),G(e,"touchcancel",t[27]),G(e,"touchend",t[28]),G(e,"touchmove",t[29],{passive:!1}),G(e,"touchstart",t[30],{passive:!1})],s=!0)},p(c,d){t=c,l&&l.p&&(!i||d[0]&33024)&&_e(l,u,t,t[15],i?he(u,t[15],d,Dp):ge(t[15]),Tl),le(e,f=Me(a,[d[0]&256&&t[8],d[0]&4096&&t[12]]))},i(c){i||(b(l,c),c&&at(()=>{i&&(r&&r.end(1),n=Dn(e,t[3],t[4]),n.start())}),i=!0)},o(c){y(l,c),n&&n.invalidate(),c&&(r=Fn(e,t[5],t[6])),i=!1},d(c){c&&E(e),l&&l.d(c),t[53](null),c&&r&&r.end(),s=!1,Te(o)}}}function Hp(t){let e,n,r,i,s;const o=t[16].default,u=pe(o,t,t[15],$l);let l=[t[8],t[12]],a={};for(let f=0;f<l.length;f+=1)a=ie(a,l[f]);return{c(){e=D("div"),u&&u.c(),le(e,a)},m(f,c){w(f,e,c),u&&u.m(e,null),t[52](e),r=!0,i||(s=[Ue(t[8].action(e)),G(e,"pointerdown",t[17]),G(e,"pointermove",t[18]),G(e,"pointerup",t[19]),G(e,"touchcancel",t[20]),G(e,"touchend",t[21]),G(e,"touchmove",t[22],{passive:!1}),G(e,"touchstart",t[23],{passive:!1})],i=!0)},p(f,c){t=f,u&&u.p&&(!r||c[0]&33024)&&_e(u,o,t,t[15],r?he(o,t[15],c,Fp):ge(t[15]),$l),le(e,a=Me(l,[c[0]&256&&t[8],c[0]&4096&&t[12]]))},i(f){r||(b(u,f),f&&at(()=>{r&&(n||(n=Tn(e,t[1],t[2],!0)),n.run(1))}),r=!0)},o(f){y(u,f),f&&(n||(n=Tn(e,t[1],t[2],!1)),n.run(0)),r=!1},d(f){f&&E(e),u&&u.d(f),t[52](null),f&&n&&n.end(),i=!1,Te(s)}}}function Vp(t){let e;const n=t[16].default,r=pe(n,t,t[15],Sl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s[0]&33024)&&_e(r,n,i,i[15],e?he(n,i[15],s,Pp):ge(i[15]),Sl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function Up(t){let e,n,r,i;const s=[Vp,Hp,Np,Mp,Ip,Lp],o=[];function u(l,a){return l[7]&&l[9]?0:l[1]&&l[9]?1:l[3]&&l[5]&&l[9]?2:l[3]&&l[9]?3:l[5]&&l[9]?4:l[9]?5:-1}return~(e=u(t))&&(n=o[e]=s[e](t)),{c(){n&&n.c(),r=$e()},m(l,a){~e&&o[e].m(l,a),w(l,r,a),i=!0},p(l,a){let f=e;e=u(l),e===f?~e&&o[e].p(l,a):(n&&(de(),y(o[f],1,1,()=>{o[f]=null}),me()),~e?(n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r)):n=null)},i(l){i||(b(n),i=!0)},o(l){y(n),i=!1},d(l){l&&E(r),~e&&o[e].d(l)}}}function Bp(t,e,n){let r;const i=["transition","transitionConfig","inTransition","inTransitionConfig","outTransition","outTransitionConfig","asChild","id","el"];let s=Ke(e,i),o,u,{$$slots:l={},$$scope:a}=e,{transition:f=void 0}=e,{transitionConfig:c=void 0}=e,{inTransition:d=void 0}=e,{inTransitionConfig:p=void 0}=e,{outTransition:m=void 0}=e,{outTransitionConfig:_=void 0}=e,{asChild:v=!1}=e,{id:g=void 0}=e,{el:h=void 0}=e;const{elements:{content:k},states:{open:A},ids:S,getAttrs:C}=Ir();J(t,k,q=>n(14,o=q)),J(t,A,q=>n(9,u=q));const L=C("content");function R(q){Oe.call(this,t,q)}function W(q){Oe.call(this,t,q)}function K(q){Oe.call(this,t,q)}function T(q){Oe.call(this,t,q)}function B(q){Oe.call(this,t,q)}function O(q){Oe.call(this,t,q)}function P(q){Oe.call(this,t,q)}function V(q){Oe.call(this,t,q)}function U(q){Oe.call(this,t,q)}function ee(q){Oe.call(this,t,q)}function te(q){Oe.call(this,t,q)}function z(q){Oe.call(this,t,q)}function oe(q){Oe.call(this,t,q)}function Re(q){Oe.call(this,t,q)}function st(q){Oe.call(this,t,q)}function He(q){Oe.call(this,t,q)}function Y(q){Oe.call(this,t,q)}function X(q){Oe.call(this,t,q)}function pt(q){Oe.call(this,t,q)}function ht(q){Oe.call(this,t,q)}function ct(q){Oe.call(this,t,q)}function mn(q){Oe.call(this,t,q)}function In(q){Oe.call(this,t,q)}function pn(q){Oe.call(this,t,q)}function hs(q){Oe.call(this,t,q)}function _s(q){Oe.call(this,t,q)}function Mr(q){Oe.call(this,t,q)}function Nr(q){Oe.call(this,t,q)}function Hr(q){Oe.call(this,t,q)}function Vr(q){Oe.call(this,t,q)}function gs(q){Oe.call(this,t,q)}function Ur(q){Oe.call(this,t,q)}function Ei(q){Oe.call(this,t,q)}function Q(q){Oe.call(this,t,q)}function ne(q){Oe.call(this,t,q)}function re(q){Ce[q?"unshift":"push"](()=>{h=q,n(0,h)})}function ue(q){Ce[q?"unshift":"push"](()=>{h=q,n(0,h)})}function we(q){Ce[q?"unshift":"push"](()=>{h=q,n(0,h)})}function Je(q){Ce[q?"unshift":"push"](()=>{h=q,n(0,h)})}function Ct(q){Ce[q?"unshift":"push"](()=>{h=q,n(0,h)})}return t.$$set=q=>{e=ie(ie({},e),yt(q)),n(12,s=Ke(e,i)),"transition"in q&&n(1,f=q.transition),"transitionConfig"in q&&n(2,c=q.transitionConfig),"inTransition"in q&&n(3,d=q.inTransition),"inTransitionConfig"in q&&n(4,p=q.inTransitionConfig),"outTransition"in q&&n(5,m=q.outTransition),"outTransitionConfig"in q&&n(6,_=q.outTransitionConfig),"asChild"in q&&n(7,v=q.asChild),"id"in q&&n(13,g=q.id),"el"in q&&n(0,h=q.el),"$$scope"in q&&n(15,a=q.$$scope)},t.$$.update=()=>{t.$$.dirty[0]&8192&&g&&S.content.set(g),t.$$.dirty[0]&16384&&n(8,r=o),t.$$.dirty[0]&256&&Object.assign(r,L)},[h,f,c,d,p,m,_,v,r,u,k,A,s,g,o,a,l,R,W,K,T,B,O,P,V,U,ee,te,z,oe,Re,st,He,Y,X,pt,ht,ct,mn,In,pn,hs,_s,Mr,Nr,Hr,Vr,gs,Ur,Ei,Q,ne,re,ue,we,Je,Ct]}class vi extends ve{constructor(e){super(),ye(this,e,Bp,Up,fe,{transition:1,transitionConfig:2,inTransition:3,inTransitionConfig:4,outTransition:5,outTransitionConfig:6,asChild:7,id:13,el:0},null,[-1,-1])}}const Kp=t=>({builder:t&256}),Rl=t=>({builder:t[8]});function jp(t){let e,n,r,i=[t[8],t[12]],s={};for(let o=0;o<i.length;o+=1)s=ie(s,i[o]);return{c(){e=D("div"),le(e,s)},m(o,u){w(o,e,u),t[25](e),n||(r=[Ue(t[8].action(e)),G(e,"mouseup",t[20])],n=!0)},p(o,u){le(e,s=Me(i,[u&256&&o[8],u&4096&&o[12]]))},i:ce,o:ce,d(o){o&&E(e),t[25](null),n=!1,Te(r)}}}function qp(t){let e,n,r,i,s,o=[t[8],t[12]],u={};for(let l=0;l<o.length;l+=1)u=ie(u,o[l]);return{c(){e=D("div"),le(e,u)},m(l,a){w(l,e,a),t[24](e),r=!0,i||(s=[Ue(t[8].action(e)),G(e,"mouseup",t[19])],i=!0)},p(l,a){t=l,le(e,u=Me(o,[a&256&&t[8],a&4096&&t[12]]))},i(l){r||(n&&n.end(1),r=!0)},o(l){l&&(n=Fn(e,t[5],t[6])),r=!1},d(l){l&&E(e),t[24](null),l&&n&&n.end(),i=!1,Te(s)}}}function Wp(t){let e,n,r,i,s=[t[8],t[12]],o={};for(let u=0;u<s.length;u+=1)o=ie(o,s[u]);return{c(){e=D("div"),le(e,o)},m(u,l){w(u,e,l),t[23](e),r||(i=[Ue(t[8].action(e)),G(e,"mouseup",t[18])],r=!0)},p(u,l){t=u,le(e,o=Me(s,[l&256&&t[8],l&4096&&t[12]]))},i(u){u&&(n||at(()=>{n=Dn(e,t[3],t[4]),n.start()}))},o:ce,d(u){u&&E(e),t[23](null),r=!1,Te(i)}}}function Qp(t){let e,n,r,i,s,o,u=[t[8],t[12]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("div"),le(e,l)},m(a,f){w(a,e,f),t[22](e),i=!0,s||(o=[Ue(t[8].action(e)),G(e,"mouseup",t[17])],s=!0)},p(a,f){t=a,le(e,l=Me(u,[f&256&&t[8],f&4096&&t[12]]))},i(a){i||(a&&at(()=>{i&&(r&&r.end(1),n=Dn(e,t[3],t[4]),n.start())}),i=!0)},o(a){n&&n.invalidate(),a&&(r=Fn(e,t[5],t[6])),i=!1},d(a){a&&E(e),t[22](null),a&&r&&r.end(),s=!1,Te(o)}}}function zp(t){let e,n,r,i,s,o=[t[8],t[12]],u={};for(let l=0;l<o.length;l+=1)u=ie(u,o[l]);return{c(){e=D("div"),le(e,u)},m(l,a){w(l,e,a),t[21](e),r=!0,i||(s=[G(e,"mouseup",t[16]),Ue(t[8].action(e))],i=!0)},p(l,a){t=l,le(e,u=Me(o,[a&256&&t[8],a&4096&&t[12]]))},i(l){r||(l&&at(()=>{r&&(n||(n=Tn(e,t[1],t[2],!0)),n.run(1))}),r=!0)},o(l){l&&(n||(n=Tn(e,t[1],t[2],!1)),n.run(0)),r=!1},d(l){l&&E(e),t[21](null),l&&n&&n.end(),i=!1,Te(s)}}}function Gp(t){let e;const n=t[15].default,r=pe(n,t,t[14],Rl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&16640)&&_e(r,n,i,i[14],e?he(n,i[14],s,Kp):ge(i[14]),Rl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function Yp(t){let e,n,r,i;const s=[Gp,zp,Qp,Wp,qp,jp],o=[];function u(l,a){return l[7]&&l[9]?0:l[1]&&l[9]?1:l[3]&&l[5]&&l[9]?2:l[3]&&l[9]?3:l[5]&&l[9]?4:l[9]?5:-1}return~(e=u(t))&&(n=o[e]=s[e](t)),{c(){n&&n.c(),r=$e()},m(l,a){~e&&o[e].m(l,a),w(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?~e&&o[e].p(l,a):(n&&(de(),y(o[f],1,1,()=>{o[f]=null}),me()),~e?(n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r)):n=null)},i(l){i||(b(n),i=!0)},o(l){y(n),i=!1},d(l){l&&E(r),~e&&o[e].d(l)}}}function Zp(t,e,n){let r;const i=["transition","transitionConfig","inTransition","inTransitionConfig","outTransition","outTransitionConfig","asChild","el"];let s=Ke(e,i),o,u,{$$slots:l={},$$scope:a}=e,{transition:f=void 0}=e,{transitionConfig:c=void 0}=e,{inTransition:d=void 0}=e,{inTransitionConfig:p=void 0}=e,{outTransition:m=void 0}=e,{outTransitionConfig:_=void 0}=e,{asChild:v=!1}=e,{el:g=void 0}=e;const{elements:{overlay:h},states:{open:k},getAttrs:A}=Ir();J(t,h,U=>n(13,o=U)),J(t,k,U=>n(9,u=U));const S=A("overlay");function C(U){Oe.call(this,t,U)}function L(U){Oe.call(this,t,U)}function R(U){Oe.call(this,t,U)}function W(U){Oe.call(this,t,U)}function K(U){Oe.call(this,t,U)}function T(U){Ce[U?"unshift":"push"](()=>{g=U,n(0,g)})}function B(U){Ce[U?"unshift":"push"](()=>{g=U,n(0,g)})}function O(U){Ce[U?"unshift":"push"](()=>{g=U,n(0,g)})}function P(U){Ce[U?"unshift":"push"](()=>{g=U,n(0,g)})}function V(U){Ce[U?"unshift":"push"](()=>{g=U,n(0,g)})}return t.$$set=U=>{e=ie(ie({},e),yt(U)),n(12,s=Ke(e,i)),"transition"in U&&n(1,f=U.transition),"transitionConfig"in U&&n(2,c=U.transitionConfig),"inTransition"in U&&n(3,d=U.inTransition),"inTransitionConfig"in U&&n(4,p=U.inTransitionConfig),"outTransition"in U&&n(5,m=U.outTransition),"outTransitionConfig"in U&&n(6,_=U.outTransitionConfig),"asChild"in U&&n(7,v=U.asChild),"el"in U&&n(0,g=U.el),"$$scope"in U&&n(14,a=U.$$scope)},t.$$.update=()=>{t.$$.dirty&8192&&n(8,r=o),t.$$.dirty&256&&Object.assign(r,S)},[g,f,c,d,p,m,_,v,r,u,h,k,s,o,a,l,C,L,R,W,K,T,B,O,P,V]}class ki extends ve{constructor(e){super(),ye(this,e,Zp,Yp,fe,{transition:1,transitionConfig:2,inTransition:3,inTransitionConfig:4,outTransition:5,outTransitionConfig:6,asChild:7,el:0})}}const Xp=t=>({builder:t&4}),Dl=t=>({builder:t[2]}),Jp=t=>({builder:t&4}),Fl=t=>({builder:t[2]});function xp(t){let e,n,r,i;const s=t[8].default,o=pe(s,t,t[7],Dl);let u=[t[2],{type:"button"},t[5]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("button"),o&&o.c(),le(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),e.autofocus&&e.focus(),t[9](e),n=!0,r||(i=[Ue(t[2].action(e)),G(e,"m-click",t[4]),G(e,"m-keydown",t[4])],r=!0)},p(a,f){o&&o.p&&(!n||f&132)&&_e(o,s,a,a[7],n?he(s,a[7],f,Xp):ge(a[7]),Dl),le(e,l=Me(u,[f&4&&a[2],{type:"button"},f&32&&a[5]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[9](null),r=!1,Te(i)}}}function eh(t){let e;const n=t[8].default,r=pe(n,t,t[7],Fl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&132)&&_e(r,n,i,i[7],e?he(n,i[7],s,Jp):ge(i[7]),Fl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function th(t){let e,n,r,i;const s=[eh,xp],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=$e()},m(l,a){o[e].m(l,a),w(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(de(),y(o[f],1,1,()=>{o[f]=null}),me(),n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r))},i(l){i||(b(n),i=!0)},o(l){y(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function nh(t,e,n){let r;const i=["asChild","el"];let s=Ke(e,i),o,{$$slots:u={},$$scope:l}=e,{asChild:a=!1}=e,{el:f=void 0}=e;const{elements:{trigger:c},getAttrs:d}=Ir();J(t,c,v=>n(6,o=v));const p=Pn(),m=d("trigger");function _(v){Ce[v?"unshift":"push"](()=>{f=v,n(0,f)})}return t.$$set=v=>{e=ie(ie({},e),yt(v)),n(5,s=Ke(e,i)),"asChild"in v&&n(1,a=v.asChild),"el"in v&&n(0,f=v.el),"$$scope"in v&&n(7,l=v.$$scope)},t.$$.update=()=>{t.$$.dirty&64&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,m)},[f,a,r,c,p,s,o,l,u,_]}class Ci extends ve{constructor(e){super(),ye(this,e,nh,th,fe,{asChild:1,el:0})}}const rh=t=>({builder:t[0]&256}),Pl=t=>({builder:t[8]}),ih=t=>({builder:t[0]&256}),Ll=t=>({builder:t[8]}),sh=t=>({builder:t[0]&256}),Il=t=>({builder:t[8]}),oh=t=>({builder:t[0]&256}),Ml=t=>({builder:t[8]}),lh=t=>({builder:t[0]&256}),Nl=t=>({builder:t[8]}),uh=t=>({builder:t[0]&256}),Hl=t=>({builder:t[8]});function ah(t){let e,n,r,i;const s=t[28].default,o=pe(s,t,t[27],Pl);let u=[t[8],t[13]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("div"),o&&o.c(),le(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),t[33](e),n=!0,r||(i=[Ue(t[8].action(e)),G(e,"m-keydown",t[12])],r=!0)},p(a,f){o&&o.p&&(!n||f[0]&134217984)&&_e(o,s,a,a[27],n?he(s,a[27],f,rh):ge(a[27]),Pl),le(e,l=Me(u,[f[0]&256&&a[8],f[0]&8192&&a[13]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[33](null),r=!1,Te(i)}}}function fh(t){let e,n,r,i,s;const o=t[28].default,u=pe(o,t,t[27],Ll);let l=[t[8],t[13]],a={};for(let f=0;f<l.length;f+=1)a=ie(a,l[f]);return{c(){e=D("div"),u&&u.c(),le(e,a)},m(f,c){w(f,e,c),u&&u.m(e,null),t[32](e),r=!0,i||(s=[Ue(t[8].action(e)),G(e,"m-keydown",t[12])],i=!0)},p(f,c){t=f,u&&u.p&&(!r||c[0]&134217984)&&_e(u,o,t,t[27],r?he(o,t[27],c,ih):ge(t[27]),Ll),le(e,a=Me(l,[c[0]&256&&t[8],c[0]&8192&&t[13]]))},i(f){r||(b(u,f),n&&n.end(1),r=!0)},o(f){y(u,f),f&&(n=Fn(e,t[5],t[6])),r=!1},d(f){f&&E(e),u&&u.d(f),t[32](null),f&&n&&n.end(),i=!1,Te(s)}}}function ch(t){let e,n,r,i,s;const o=t[28].default,u=pe(o,t,t[27],Il);let l=[t[8],t[13]],a={};for(let f=0;f<l.length;f+=1)a=ie(a,l[f]);return{c(){e=D("div"),u&&u.c(),le(e,a)},m(f,c){w(f,e,c),u&&u.m(e,null),t[31](e),r=!0,i||(s=[Ue(t[8].action(e)),G(e,"m-keydown",t[12])],i=!0)},p(f,c){t=f,u&&u.p&&(!r||c[0]&134217984)&&_e(u,o,t,t[27],r?he(o,t[27],c,sh):ge(t[27]),Il),le(e,a=Me(l,[c[0]&256&&t[8],c[0]&8192&&t[13]]))},i(f){r||(b(u,f),f&&(n||at(()=>{n=Dn(e,t[3],t[4]),n.start()})),r=!0)},o(f){y(u,f),r=!1},d(f){f&&E(e),u&&u.d(f),t[31](null),i=!1,Te(s)}}}function dh(t){let e,n,r,i,s,o;const u=t[28].default,l=pe(u,t,t[27],Ml);let a=[t[8],t[13]],f={};for(let c=0;c<a.length;c+=1)f=ie(f,a[c]);return{c(){e=D("div"),l&&l.c(),le(e,f)},m(c,d){w(c,e,d),l&&l.m(e,null),t[30](e),i=!0,s||(o=[Ue(t[8].action(e)),G(e,"m-keydown",t[12])],s=!0)},p(c,d){t=c,l&&l.p&&(!i||d[0]&134217984)&&_e(l,u,t,t[27],i?he(u,t[27],d,oh):ge(t[27]),Ml),le(e,f=Me(a,[d[0]&256&&t[8],d[0]&8192&&t[13]]))},i(c){i||(b(l,c),c&&at(()=>{i&&(r&&r.end(1),n=Dn(e,t[3],t[4]),n.start())}),i=!0)},o(c){y(l,c),n&&n.invalidate(),c&&(r=Fn(e,t[5],t[6])),i=!1},d(c){c&&E(e),l&&l.d(c),t[30](null),c&&r&&r.end(),s=!1,Te(o)}}}function mh(t){let e,n,r,i,s;const o=t[28].default,u=pe(o,t,t[27],Nl);let l=[t[8],t[13]],a={};for(let f=0;f<l.length;f+=1)a=ie(a,l[f]);return{c(){e=D("div"),u&&u.c(),le(e,a)},m(f,c){w(f,e,c),u&&u.m(e,null),t[29](e),r=!0,i||(s=[Ue(t[8].action(e)),G(e,"m-keydown",t[12])],i=!0)},p(f,c){t=f,u&&u.p&&(!r||c[0]&134217984)&&_e(u,o,t,t[27],r?he(o,t[27],c,lh):ge(t[27]),Nl),le(e,a=Me(l,[c[0]&256&&t[8],c[0]&8192&&t[13]]))},i(f){r||(b(u,f),f&&at(()=>{r&&(n||(n=Tn(e,t[1],t[2],!0)),n.run(1))}),r=!0)},o(f){y(u,f),f&&(n||(n=Tn(e,t[1],t[2],!1)),n.run(0)),r=!1},d(f){f&&E(e),u&&u.d(f),t[29](null),f&&n&&n.end(),i=!1,Te(s)}}}function ph(t){let e;const n=t[28].default,r=pe(n,t,t[27],Hl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s[0]&134217984)&&_e(r,n,i,i[27],e?he(n,i[27],s,uh):ge(i[27]),Hl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function hh(t){let e,n,r,i;const s=[ph,mh,dh,ch,fh,ah],o=[];function u(l,a){return l[7]&&l[9]?0:l[1]&&l[9]?1:l[3]&&l[5]&&l[9]?2:l[3]&&l[9]?3:l[5]&&l[9]?4:l[9]?5:-1}return~(e=u(t))&&(n=o[e]=s[e](t)),{c(){n&&n.c(),r=$e()},m(l,a){~e&&o[e].m(l,a),w(l,r,a),i=!0},p(l,a){let f=e;e=u(l),e===f?~e&&o[e].p(l,a):(n&&(de(),y(o[f],1,1,()=>{o[f]=null}),me()),~e?(n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r)):n=null)},i(l){i||(b(n),i=!0)},o(l){y(n),i=!1},d(l){l&&E(r),~e&&o[e].d(l)}}}function _h(t,e,n){let r;const i=["transition","transitionConfig","inTransition","inTransitionConfig","outTransition","outTransitionConfig","asChild","id","side","align","sideOffset","alignOffset","collisionPadding","avoidCollisions","collisionBoundary","sameWidth","fitViewport","strategy","overlap","el"];let s=Ke(e,i),o,u,{$$slots:l={},$$scope:a}=e,{transition:f=void 0}=e,{transitionConfig:c=void 0}=e,{inTransition:d=void 0}=e,{inTransitionConfig:p=void 0}=e,{outTransition:m=void 0}=e,{outTransitionConfig:_=void 0}=e,{asChild:v=!1}=e,{id:g=void 0}=e,{side:h="bottom"}=e,{align:k="center"}=e,{sideOffset:A=0}=e,{alignOffset:S=0}=e,{collisionPadding:C=8}=e,{avoidCollisions:L=!0}=e,{collisionBoundary:R=void 0}=e,{sameWidth:W=!1}=e,{fitViewport:K=!1}=e,{strategy:T="absolute"}=e,{overlap:B=!1}=e,{el:O=void 0}=e;const{elements:{menu:P},states:{open:V},ids:U,getAttrs:ee}=bi();J(t,P,X=>n(26,u=X)),J(t,V,X=>n(9,o=X));const te=Pn(),z=ee("content");function oe(X){Ce[X?"unshift":"push"](()=>{O=X,n(0,O)})}function Re(X){Ce[X?"unshift":"push"](()=>{O=X,n(0,O)})}function st(X){Ce[X?"unshift":"push"](()=>{O=X,n(0,O)})}function He(X){Ce[X?"unshift":"push"](()=>{O=X,n(0,O)})}function Y(X){Ce[X?"unshift":"push"](()=>{O=X,n(0,O)})}return t.$$set=X=>{e=ie(ie({},e),yt(X)),n(13,s=Ke(e,i)),"transition"in X&&n(1,f=X.transition),"transitionConfig"in X&&n(2,c=X.transitionConfig),"inTransition"in X&&n(3,d=X.inTransition),"inTransitionConfig"in X&&n(4,p=X.inTransitionConfig),"outTransition"in X&&n(5,m=X.outTransition),"outTransitionConfig"in X&&n(6,_=X.outTransitionConfig),"asChild"in X&&n(7,v=X.asChild),"id"in X&&n(14,g=X.id),"side"in X&&n(15,h=X.side),"align"in X&&n(16,k=X.align),"sideOffset"in X&&n(17,A=X.sideOffset),"alignOffset"in X&&n(18,S=X.alignOffset),"collisionPadding"in X&&n(19,C=X.collisionPadding),"avoidCollisions"in X&&n(20,L=X.avoidCollisions),"collisionBoundary"in X&&n(21,R=X.collisionBoundary),"sameWidth"in X&&n(22,W=X.sameWidth),"fitViewport"in X&&n(23,K=X.fitViewport),"strategy"in X&&n(24,T=X.strategy),"overlap"in X&&n(25,B=X.overlap),"el"in X&&n(0,O=X.el),"$$scope"in X&&n(27,a=X.$$scope)},t.$$.update=()=>{t.$$.dirty[0]&16384&&g&&U.menu.set(g),t.$$.dirty[0]&67108864&&n(8,r=u),t.$$.dirty[0]&256&&Object.assign(r,z),t.$$.dirty[0]&67076608&&o&&Fm({side:h,align:k,sideOffset:A,alignOffset:S,collisionPadding:C,avoidCollisions:L,collisionBoundary:R,sameWidth:W,fitViewport:K,strategy:T,overlap:B})},[O,f,c,d,p,m,_,v,r,o,P,V,te,s,g,h,k,A,S,C,L,R,W,K,T,B,u,a,l,oe,Re,st,He,Y]}class cs extends ve{constructor(e){super(),ye(this,e,_h,hh,fe,{transition:1,transitionConfig:2,inTransition:3,inTransitionConfig:4,outTransition:5,outTransitionConfig:6,asChild:7,id:14,side:15,align:16,sideOffset:17,alignOffset:18,collisionPadding:19,avoidCollisions:20,collisionBoundary:21,sameWidth:22,fitViewport:23,strategy:24,overlap:25,el:0},null,[-1,-1])}}function ds(){return{NAME:"menubar",MENU_NAME:"menu",SUB_NAME:"menu-submenu",PARTS:["arrow","checkbox-indicator","checkbox-item","content","group","item","label","radio-group","radio-item","separator","sub-content","sub-trigger","trigger"]}}function gh(t){const{NAME:e,PARTS:n,MENU_NAME:r}=ds(),i=si(e,["root"]),s=si(r,n),o={...ym(_i(t)),getAttrs:s,getMenubarAttrs:i};return At(e,o),{...o,updateOption:gi(o.options)}}function bh(){const{NAME:t}=ds();return bt(t)}function yh(t){const{MENU_NAME:e}=ds(),{builders:{createMenu:n},getAttrs:r}=bh(),i={...n({..._i(t),forceVisible:!1}),getAttrs:r};return At(e,i),{...i,updateOption:gi(i.options)}}function vh(){const{MENU_NAME:t}=ds();return bt(t)}const kh=t=>({builder:t&4,ids:t&8}),Vl=t=>({builder:t[2],ids:t[3]}),Ch=t=>({builder:t&4,ids:t&8}),Ul=t=>({builder:t[2],ids:t[3]});function Eh(t){let e,n,r,i;const s=t[13].default,o=pe(s,t,t[12],Vl);let u=[t[2],t[6]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("div"),o&&o.c(),le(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),t[14](e),n=!0,r||(i=Ue(t[2].action(e)),r=!0)},p(a,f){o&&o.p&&(!n||f&4108)&&_e(o,s,a,a[12],n?he(s,a[12],f,kh):ge(a[12]),Vl),le(e,l=Me(u,[f&4&&a[2],f&64&&a[6]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[14](null),r=!1,i()}}}function wh(t){let e;const n=t[13].default,r=pe(n,t,t[12],Ul);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&4108)&&_e(r,n,i,i[12],e?he(n,i[12],s,Ch):ge(i[12]),Ul)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function Oh(t){let e,n,r,i;const s=[wh,Eh],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=$e()},m(l,a){o[e].m(l,a),w(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(de(),y(o[f],1,1,()=>{o[f]=null}),me(),n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r))},i(l){i||(b(n),i=!0)},o(l){y(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function Ah(t,e,n){let r;const i=["loop","closeOnEscape","asChild","id","preventScroll","el"];let s=Ke(e,i),o,u,{$$slots:l={},$$scope:a}=e,{loop:f=!0}=e,{closeOnEscape:c=!0}=e,{asChild:d=!1}=e,{id:p=void 0}=e,{preventScroll:m=void 0}=e,{el:_=void 0}=e;const{elements:{menubar:v},updateOption:g,ids:h,getMenubarAttrs:k}=gh({loop:f,closeOnEscape:c,preventScroll:m});J(t,v,L=>n(11,o=L));const A=ze([h.menubar],([L])=>({menubar:L}));J(t,A,L=>n(3,u=L));const S=k("root");function C(L){Ce[L?"unshift":"push"](()=>{_=L,n(0,_)})}return t.$$set=L=>{e=ie(ie({},e),yt(L)),n(6,s=Ke(e,i)),"loop"in L&&n(7,f=L.loop),"closeOnEscape"in L&&n(8,c=L.closeOnEscape),"asChild"in L&&n(1,d=L.asChild),"id"in L&&n(9,p=L.id),"preventScroll"in L&&n(10,m=L.preventScroll),"el"in L&&n(0,_=L.el),"$$scope"in L&&n(12,a=L.$$scope)},t.$$.update=()=>{t.$$.dirty&512&&p&&h.menubar.set(p),t.$$.dirty&128&&g("loop",f),t.$$.dirty&256&&g("closeOnEscape",c),t.$$.dirty&1024&&g("preventScroll",m),t.$$.dirty&2048&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,S)},[_,d,r,u,v,A,s,f,c,p,m,o,a,l,C]}class Th extends ve{constructor(e){super(),ye(this,e,Ah,Oh,fe,{loop:7,closeOnEscape:8,asChild:1,id:9,preventScroll:10,el:0})}}const $h=t=>({menuIds:t&1}),Bl=t=>({menuIds:t[0]});function Sh(t){let e;const n=t[15].default,r=pe(n,t,t[14],Bl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,[s]){r&&r.p&&(!e||s&16385)&&_e(r,n,i,i[14],e?he(n,i[14],s,$h):ge(i[14]),Bl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function Rh(t,e,n){let r,{$$slots:i={},$$scope:s}=e,{closeOnOutsideClick:o=void 0}=e,{closeOnEscape:u=void 0}=e,{portal:l=void 0}=e,{open:a=void 0}=e,{onOpenChange:f=void 0}=e,{loop:c=void 0}=e,{dir:d=void 0}=e,{typeahead:p=void 0}=e,{closeFocus:m=void 0}=e,{disableFocusFirstItem:_=void 0}=e,{closeOnItemClick:v=void 0}=e,{onOutsideClick:g=void 0}=e;const{states:{open:h},updateOption:k,ids:A}=yh({closeOnOutsideClick:o,closeOnEscape:u,portal:l,loop:c,dir:d,typeahead:p,closeFocus:m,disableFocusFirstItem:_,closeOnItemClick:v,onOutsideClick:g,onOpenChange:({next:C})=>(a!==C&&(f==null||f(C),n(2,a=C)),C)}),S=ze([A.menu,A.trigger],([C,L])=>({menu:C,trigger:L}));return J(t,S,C=>n(0,r=C)),t.$$set=C=>{"closeOnOutsideClick"in C&&n(3,o=C.closeOnOutsideClick),"closeOnEscape"in C&&n(4,u=C.closeOnEscape),"portal"in C&&n(5,l=C.portal),"open"in C&&n(2,a=C.open),"onOpenChange"in C&&n(6,f=C.onOpenChange),"loop"in C&&n(7,c=C.loop),"dir"in C&&n(8,d=C.dir),"typeahead"in C&&n(9,p=C.typeahead),"closeFocus"in C&&n(10,m=C.closeFocus),"disableFocusFirstItem"in C&&n(11,_=C.disableFocusFirstItem),"closeOnItemClick"in C&&n(12,v=C.closeOnItemClick),"onOutsideClick"in C&&n(13,g=C.onOutsideClick),"$$scope"in C&&n(14,s=C.$$scope)},t.$$.update=()=>{t.$$.dirty&4&&a!==void 0&&h.set(a),t.$$.dirty&8&&k("closeOnOutsideClick",o),t.$$.dirty&16&&k("closeOnEscape",u),t.$$.dirty&32&&k("portal",l),t.$$.dirty&128&&k("loop",c),t.$$.dirty&256&&k("dir",d),t.$$.dirty&1024&&k("closeFocus",m),t.$$.dirty&2048&&k("disableFocusFirstItem",_),t.$$.dirty&512&&k("typeahead",p),t.$$.dirty&4096&&k("closeOnItemClick",v),t.$$.dirty&8192&&k("onOutsideClick",g)},[r,S,a,o,u,l,f,c,d,p,m,_,v,g,s,i]}class ms extends ve{constructor(e){super(),ye(this,e,Rh,Sh,fe,{closeOnOutsideClick:3,closeOnEscape:4,portal:5,open:2,onOpenChange:6,loop:7,dir:8,typeahead:9,closeFocus:10,disableFocusFirstItem:11,closeOnItemClick:12,onOutsideClick:13})}}const Dh=t=>({builder:t&4}),Kl=t=>({builder:t[2]}),Fh=t=>({builder:t&4}),jl=t=>({builder:t[2]});function Ph(t){let e,n,r,i;const s=t[9].default,o=pe(s,t,t[8],Kl);let u=[t[2],{type:"button"},t[5]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("button"),o&&o.c(),le(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),e.autofocus&&e.focus(),t[10](e),n=!0,r||(i=[Ue(t[2].action(e)),G(e,"m-click",t[4]),G(e,"m-keydown",t[4]),G(e,"m-pointerenter",t[4])],r=!0)},p(a,f){o&&o.p&&(!n||f&260)&&_e(o,s,a,a[8],n?he(s,a[8],f,Dh):ge(a[8]),Kl),le(e,l=Me(u,[f&4&&a[2],{type:"button"},f&32&&a[5]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[10](null),r=!1,Te(i)}}}function Lh(t){let e;const n=t[9].default,r=pe(n,t,t[8],jl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&260)&&_e(r,n,i,i[8],e?he(n,i[8],s,Fh):ge(i[8]),jl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function Ih(t){let e,n,r,i;const s=[Lh,Ph],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=$e()},m(l,a){o[e].m(l,a),w(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(de(),y(o[f],1,1,()=>{o[f]=null}),me(),n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r))},i(l){i||(b(n),i=!0)},o(l){y(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function Mh(t,e,n){let r;const i=["asChild","id","el"];let s=Ke(e,i),o,{$$slots:u={},$$scope:l}=e,{asChild:a=!1}=e,{id:f=void 0}=e,{el:c=void 0}=e;const{elements:{trigger:d},ids:p,getAttrs:m}=vh();J(t,d,h=>n(7,o=h));const _=Pn(),v=m("trigger");function g(h){Ce[h?"unshift":"push"](()=>{c=h,n(0,c)})}return t.$$set=h=>{e=ie(ie({},e),yt(h)),n(5,s=Ke(e,i)),"asChild"in h&&n(1,a=h.asChild),"id"in h&&n(6,f=h.id),"el"in h&&n(0,c=h.el),"$$scope"in h&&n(8,l=h.$$scope)},t.$$.update=()=>{t.$$.dirty&64&&f&&p.trigger.set(f),t.$$.dirty&128&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,v)},[c,a,r,d,_,s,f,o,l,u,g]}class ps extends ve{constructor(e){super(),ye(this,e,Mh,Ih,fe,{asChild:1,id:6,el:0})}}const Nh=t=>({ids:t&1}),ql=t=>({ids:t[0]});function Hh(t){let e;const n=t[13].default,r=pe(n,t,t[12],ql);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,[s]){r&&r.p&&(!e||s&4097)&&_e(r,n,i,i[12],e?he(n,i[12],s,Nh):ge(i[12]),ql)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function Vh(t,e,n){let r,{$$slots:i={},$$scope:s}=e,{disableFocusTrap:o=void 0}=e,{closeOnEscape:u=void 0}=e,{closeOnOutsideClick:l=void 0}=e,{preventScroll:a=void 0}=e,{portal:f=void 0}=e,{open:c=void 0}=e,{onOpenChange:d=void 0}=e,{openFocus:p=void 0}=e,{closeFocus:m=void 0}=e,{onOutsideClick:_=void 0}=e;const{updateOption:v,states:{open:g},ids:h}=ip({disableFocusTrap:o,closeOnEscape:u,closeOnOutsideClick:l,preventScroll:a,portal:f,defaultOpen:c,openFocus:p,closeFocus:m,onOutsideClick:_,onOpenChange:({next:A})=>(c!==A&&(d==null||d(A),n(2,c=A)),A),positioning:{gutter:0,offset:{mainAxis:1}}}),k=ze([h.content,h.trigger],([A,S])=>({content:A,trigger:S}));return J(t,k,A=>n(0,r=A)),t.$$set=A=>{"disableFocusTrap"in A&&n(3,o=A.disableFocusTrap),"closeOnEscape"in A&&n(4,u=A.closeOnEscape),"closeOnOutsideClick"in A&&n(5,l=A.closeOnOutsideClick),"preventScroll"in A&&n(6,a=A.preventScroll),"portal"in A&&n(7,f=A.portal),"open"in A&&n(2,c=A.open),"onOpenChange"in A&&n(8,d=A.onOpenChange),"openFocus"in A&&n(9,p=A.openFocus),"closeFocus"in A&&n(10,m=A.closeFocus),"onOutsideClick"in A&&n(11,_=A.onOutsideClick),"$$scope"in A&&n(12,s=A.$$scope)},t.$$.update=()=>{t.$$.dirty&4&&c!==void 0&&g.set(c),t.$$.dirty&8&&v("disableFocusTrap",o),t.$$.dirty&16&&v("closeOnEscape",u),t.$$.dirty&32&&v("closeOnOutsideClick",l),t.$$.dirty&64&&v("preventScroll",a),t.$$.dirty&128&&v("portal",f),t.$$.dirty&512&&v("openFocus",p),t.$$.dirty&1024&&v("closeFocus",m),t.$$.dirty&2048&&v("onOutsideClick",_)},[r,k,c,o,u,l,a,f,d,p,m,_,s,i]}class Uh extends ve{constructor(e){super(),ye(this,e,Vh,Hh,fe,{disableFocusTrap:3,closeOnEscape:4,closeOnOutsideClick:5,preventScroll:6,portal:7,open:2,onOpenChange:8,openFocus:9,closeFocus:10,onOutsideClick:11})}}const Bh=t=>({builder:t[0]&256}),Wl=t=>({builder:t[8]}),Kh=t=>({builder:t[0]&256}),Ql=t=>({builder:t[8]}),jh=t=>({builder:t[0]&256}),zl=t=>({builder:t[8]}),qh=t=>({builder:t[0]&256}),Gl=t=>({builder:t[8]}),Wh=t=>({builder:t[0]&256}),Yl=t=>({builder:t[8]}),Qh=t=>({builder:t[0]&256}),Zl=t=>({builder:t[8]});function zh(t){let e,n,r,i;const s=t[27].default,o=pe(s,t,t[26],Wl);let u=[t[8],t[12]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("div"),o&&o.c(),le(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),t[32](e),n=!0,r||(i=Ue(t[8].action(e)),r=!0)},p(a,f){o&&o.p&&(!n||f[0]&67109120)&&_e(o,s,a,a[26],n?he(s,a[26],f,Bh):ge(a[26]),Wl),le(e,l=Me(u,[f[0]&256&&a[8],f[0]&4096&&a[12]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[32](null),r=!1,i()}}}function Gh(t){let e,n,r,i,s;const o=t[27].default,u=pe(o,t,t[26],Ql);let l=[t[8],t[12]],a={};for(let f=0;f<l.length;f+=1)a=ie(a,l[f]);return{c(){e=D("div"),u&&u.c(),le(e,a)},m(f,c){w(f,e,c),u&&u.m(e,null),t[31](e),r=!0,i||(s=Ue(t[8].action(e)),i=!0)},p(f,c){t=f,u&&u.p&&(!r||c[0]&67109120)&&_e(u,o,t,t[26],r?he(o,t[26],c,Kh):ge(t[26]),Ql),le(e,a=Me(l,[c[0]&256&&t[8],c[0]&4096&&t[12]]))},i(f){r||(b(u,f),n&&n.end(1),r=!0)},o(f){y(u,f),f&&(n=Fn(e,t[5],t[6])),r=!1},d(f){f&&E(e),u&&u.d(f),t[31](null),f&&n&&n.end(),i=!1,s()}}}function Yh(t){let e,n,r,i,s;const o=t[27].default,u=pe(o,t,t[26],zl);let l=[t[8],t[12]],a={};for(let f=0;f<l.length;f+=1)a=ie(a,l[f]);return{c(){e=D("div"),u&&u.c(),le(e,a)},m(f,c){w(f,e,c),u&&u.m(e,null),t[30](e),r=!0,i||(s=Ue(t[8].action(e)),i=!0)},p(f,c){t=f,u&&u.p&&(!r||c[0]&67109120)&&_e(u,o,t,t[26],r?he(o,t[26],c,jh):ge(t[26]),zl),le(e,a=Me(l,[c[0]&256&&t[8],c[0]&4096&&t[12]]))},i(f){r||(b(u,f),f&&(n||at(()=>{n=Dn(e,t[3],t[4]),n.start()})),r=!0)},o(f){y(u,f),r=!1},d(f){f&&E(e),u&&u.d(f),t[30](null),i=!1,s()}}}function Zh(t){let e,n,r,i,s,o;const u=t[27].default,l=pe(u,t,t[26],Gl);let a=[t[8],t[12]],f={};for(let c=0;c<a.length;c+=1)f=ie(f,a[c]);return{c(){e=D("div"),l&&l.c(),le(e,f)},m(c,d){w(c,e,d),l&&l.m(e,null),t[29](e),i=!0,s||(o=Ue(t[8].action(e)),s=!0)},p(c,d){t=c,l&&l.p&&(!i||d[0]&67109120)&&_e(l,u,t,t[26],i?he(u,t[26],d,qh):ge(t[26]),Gl),le(e,f=Me(a,[d[0]&256&&t[8],d[0]&4096&&t[12]]))},i(c){i||(b(l,c),c&&at(()=>{i&&(r&&r.end(1),n=Dn(e,t[3],t[4]),n.start())}),i=!0)},o(c){y(l,c),n&&n.invalidate(),c&&(r=Fn(e,t[5],t[6])),i=!1},d(c){c&&E(e),l&&l.d(c),t[29](null),c&&r&&r.end(),s=!1,o()}}}function Xh(t){let e,n,r,i,s;const o=t[27].default,u=pe(o,t,t[26],Yl);let l=[t[8],t[12]],a={};for(let f=0;f<l.length;f+=1)a=ie(a,l[f]);return{c(){e=D("div"),u&&u.c(),le(e,a)},m(f,c){w(f,e,c),u&&u.m(e,null),t[28](e),r=!0,i||(s=Ue(t[8].action(e)),i=!0)},p(f,c){t=f,u&&u.p&&(!r||c[0]&67109120)&&_e(u,o,t,t[26],r?he(o,t[26],c,Wh):ge(t[26]),Yl),le(e,a=Me(l,[c[0]&256&&t[8],c[0]&4096&&t[12]]))},i(f){r||(b(u,f),f&&at(()=>{r&&(n||(n=Tn(e,t[1],t[2],!0)),n.run(1))}),r=!0)},o(f){y(u,f),f&&(n||(n=Tn(e,t[1],t[2],!1)),n.run(0)),r=!1},d(f){f&&E(e),u&&u.d(f),t[28](null),f&&n&&n.end(),i=!1,s()}}}function Jh(t){let e;const n=t[27].default,r=pe(n,t,t[26],Zl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s[0]&67109120)&&_e(r,n,i,i[26],e?he(n,i[26],s,Qh):ge(i[26]),Zl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function xh(t){let e,n,r,i;const s=[Jh,Xh,Zh,Yh,Gh,zh],o=[];function u(l,a){return l[7]&&l[9]?0:l[1]&&l[9]?1:l[3]&&l[5]&&l[9]?2:l[3]&&l[9]?3:l[5]&&l[9]?4:l[9]?5:-1}return~(e=u(t))&&(n=o[e]=s[e](t)),{c(){n&&n.c(),r=$e()},m(l,a){~e&&o[e].m(l,a),w(l,r,a),i=!0},p(l,a){let f=e;e=u(l),e===f?~e&&o[e].p(l,a):(n&&(de(),y(o[f],1,1,()=>{o[f]=null}),me()),~e?(n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r)):n=null)},i(l){i||(b(n),i=!0)},o(l){y(n),i=!1},d(l){l&&E(r),~e&&o[e].d(l)}}}function e1(t,e,n){let r;const i=["transition","transitionConfig","inTransition","inTransitionConfig","outTransition","outTransitionConfig","asChild","id","side","align","sideOffset","alignOffset","collisionPadding","avoidCollisions","collisionBoundary","sameWidth","fitViewport","strategy","overlap","el"];let s=Ke(e,i),o,u,{$$slots:l={},$$scope:a}=e,{transition:f=void 0}=e,{transitionConfig:c=void 0}=e,{inTransition:d=void 0}=e,{inTransitionConfig:p=void 0}=e,{outTransition:m=void 0}=e,{outTransitionConfig:_=void 0}=e,{asChild:v=!1}=e,{id:g=void 0}=e,{side:h="bottom"}=e,{align:k="center"}=e,{sideOffset:A=0}=e,{alignOffset:S=0}=e,{collisionPadding:C=8}=e,{avoidCollisions:L=!0}=e,{collisionBoundary:R=void 0}=e,{sameWidth:W=!1}=e,{fitViewport:K=!1}=e,{strategy:T="absolute"}=e,{overlap:B=!1}=e,{el:O=void 0}=e;const{elements:{content:P},states:{open:V},ids:U,getAttrs:ee}=Ao();J(t,P,Y=>n(25,u=Y)),J(t,V,Y=>n(9,o=Y));const te=ee("content");function z(Y){Ce[Y?"unshift":"push"](()=>{O=Y,n(0,O)})}function oe(Y){Ce[Y?"unshift":"push"](()=>{O=Y,n(0,O)})}function Re(Y){Ce[Y?"unshift":"push"](()=>{O=Y,n(0,O)})}function st(Y){Ce[Y?"unshift":"push"](()=>{O=Y,n(0,O)})}function He(Y){Ce[Y?"unshift":"push"](()=>{O=Y,n(0,O)})}return t.$$set=Y=>{e=ie(ie({},e),yt(Y)),n(12,s=Ke(e,i)),"transition"in Y&&n(1,f=Y.transition),"transitionConfig"in Y&&n(2,c=Y.transitionConfig),"inTransition"in Y&&n(3,d=Y.inTransition),"inTransitionConfig"in Y&&n(4,p=Y.inTransitionConfig),"outTransition"in Y&&n(5,m=Y.outTransition),"outTransitionConfig"in Y&&n(6,_=Y.outTransitionConfig),"asChild"in Y&&n(7,v=Y.asChild),"id"in Y&&n(13,g=Y.id),"side"in Y&&n(14,h=Y.side),"align"in Y&&n(15,k=Y.align),"sideOffset"in Y&&n(16,A=Y.sideOffset),"alignOffset"in Y&&n(17,S=Y.alignOffset),"collisionPadding"in Y&&n(18,C=Y.collisionPadding),"avoidCollisions"in Y&&n(19,L=Y.avoidCollisions),"collisionBoundary"in Y&&n(20,R=Y.collisionBoundary),"sameWidth"in Y&&n(21,W=Y.sameWidth),"fitViewport"in Y&&n(22,K=Y.fitViewport),"strategy"in Y&&n(23,T=Y.strategy),"overlap"in Y&&n(24,B=Y.overlap),"el"in Y&&n(0,O=Y.el),"$$scope"in Y&&n(26,a=Y.$$scope)},t.$$.update=()=>{t.$$.dirty[0]&8192&&g&&U.content.set(g),t.$$.dirty[0]&33554432&&n(8,r=u),t.$$.dirty[0]&256&&Object.assign(r,te),t.$$.dirty[0]&33538560&&o&&sp({side:h,align:k,sideOffset:A,alignOffset:S,collisionPadding:C,avoidCollisions:L,collisionBoundary:R,sameWidth:W,fitViewport:K,strategy:T,overlap:B})},[O,f,c,d,p,m,_,v,r,o,P,V,s,g,h,k,A,S,C,L,R,W,K,T,B,u,a,l,z,oe,Re,st,He]}class t1 extends ve{constructor(e){super(),ye(this,e,e1,xh,fe,{transition:1,transitionConfig:2,inTransition:3,inTransitionConfig:4,outTransition:5,outTransitionConfig:6,asChild:7,id:13,side:14,align:15,sideOffset:16,alignOffset:17,collisionPadding:18,avoidCollisions:19,collisionBoundary:20,sameWidth:21,fitViewport:22,strategy:23,overlap:24,el:0},null,[-1,-1])}}const n1=t=>({builder:t&4}),Xl=t=>({builder:t[2]}),r1=t=>({builder:t&4}),Jl=t=>({builder:t[2]});function i1(t){let e,n,r,i;const s=t[12].default,o=pe(s,t,t[11],Xl);let u=[t[2],{type:"button"},t[6]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("button"),o&&o.c(),le(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),e.autofocus&&e.focus(),t[13](e),n=!0,r||(i=[Ue(t[2].action(e)),G(e,"m-click",t[5]),G(e,"m-keydown",t[5])],r=!0)},p(a,f){o&&o.p&&(!n||f&2052)&&_e(o,s,a,a[11],n?he(s,a[11],f,n1):ge(a[11]),Xl),le(e,l=Me(u,[f&4&&a[2],{type:"button"},f&64&&a[6]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[13](null),r=!1,Te(i)}}}function s1(t){let e;const n=t[12].default,r=pe(n,t,t[11],Jl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&2052)&&_e(r,n,i,i[11],e?he(n,i[11],s,r1):ge(i[11]),Jl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function o1(t){let e,n,r,i;const s=[s1,i1],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=$e()},m(l,a){o[e].m(l,a),w(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(de(),y(o[f],1,1,()=>{o[f]=null}),me(),n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r))},i(l){i||(b(n),i=!0)},o(l){y(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function l1(t,e,n){let r,i;const s=["asChild","id","el"];let o=Ke(e,s),u,l,{$$slots:a={},$$scope:f}=e,{asChild:c=!1}=e,{id:d=void 0}=e,{el:p=void 0}=e;const{elements:{trigger:m},states:{open:_},ids:v,getAttrs:g}=Ao();J(t,m,S=>n(9,u=S)),J(t,_,S=>n(10,l=S));const h=Pn(),k=g("trigger");function A(S){Ce[S?"unshift":"push"](()=>{p=S,n(0,p)})}return t.$$set=S=>{e=ie(ie({},e),yt(S)),n(6,o=Ke(e,s)),"asChild"in S&&n(1,c=S.asChild),"id"in S&&n(7,d=S.id),"el"in S&&n(0,p=S.el),"$$scope"in S&&n(11,f=S.$$scope)},t.$$.update=()=>{t.$$.dirty&128&&d&&v.trigger.set(d),t.$$.dirty&1024&&n(8,r={...k,"aria-controls":l?v.content:void 0}),t.$$.dirty&512&&n(2,i=u),t.$$.dirty&260&&Object.assign(i,r)},[p,c,i,m,_,h,o,d,r,u,l,f,a,A]}class u1 extends ve{constructor(e){super(),ye(this,e,l1,o1,fe,{asChild:1,id:7,el:0})}}function of(){return{NAME:"toolbar",GROUP_NAME:"toolbar-group",PARTS:["root","button","link","group","group-item"]}}function a1(t){const{NAME:e,PARTS:n}=of(),r=si(e,n),i={...Am(_i(t)),getAttrs:r};return At(e,i),{...i,updateOption:gi(i.options)}}function f1(){const{NAME:t}=of();return bt(t)}const c1=t=>({builder:t&4}),xl=t=>({builder:t[2]}),d1=t=>({builder:t&4}),eu=t=>({builder:t[2]});function m1(t){let e,n,r,i;const s=t[9].default,o=pe(s,t,t[8],xl);let u=[t[2],t[4]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("div"),o&&o.c(),le(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),t[10](e),n=!0,r||(i=Ue(t[2].action(e)),r=!0)},p(a,f){o&&o.p&&(!n||f&260)&&_e(o,s,a,a[8],n?he(s,a[8],f,c1):ge(a[8]),xl),le(e,l=Me(u,[f&4&&a[2],f&16&&a[4]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[10](null),r=!1,i()}}}function p1(t){let e;const n=t[9].default,r=pe(n,t,t[8],eu);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&260)&&_e(r,n,i,i[8],e?he(n,i[8],s,d1):ge(i[8]),eu)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function h1(t){let e,n,r,i;const s=[p1,m1],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=$e()},m(l,a){o[e].m(l,a),w(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(de(),y(o[f],1,1,()=>{o[f]=null}),me(),n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r))},i(l){i||(b(n),i=!0)},o(l){y(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function _1(t,e,n){let r;const i=["loop","orientation","asChild","el"];let s=Ke(e,i),o,{$$slots:u={},$$scope:l}=e,{loop:a=!0}=e,{orientation:f=void 0}=e,{asChild:c=!1}=e,{el:d=void 0}=e;const{elements:{root:p},updateOption:m,getAttrs:_}=a1({loop:a,orientation:f});J(t,p,h=>n(7,o=h));const v=_("root");function g(h){Ce[h?"unshift":"push"](()=>{d=h,n(0,d)})}return t.$$set=h=>{e=ie(ie({},e),yt(h)),n(4,s=Ke(e,i)),"loop"in h&&n(5,a=h.loop),"orientation"in h&&n(6,f=h.orientation),"asChild"in h&&n(1,c=h.asChild),"el"in h&&n(0,d=h.el),"$$scope"in h&&n(8,l=h.$$scope)},t.$$.update=()=>{t.$$.dirty&32&&m("loop",a),t.$$.dirty&64&&m("orientation",f),t.$$.dirty&128&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,v)},[d,c,r,p,s,a,f,o,l,u,g]}class g1 extends ve{constructor(e){super(),ye(this,e,_1,h1,fe,{loop:5,orientation:6,asChild:1,el:0})}}const b1=t=>({builder:t&4}),tu=t=>({builder:t[2]}),y1=t=>({builder:t&4}),nu=t=>({builder:t[2]});function v1(t){let e,n,r,i;const s=t[8].default,o=pe(s,t,t[7],tu);let u=[t[2],{type:"button"},t[5]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("button"),o&&o.c(),le(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),e.autofocus&&e.focus(),t[10](e),n=!0,r||(i=[Ue(t[2].action(e)),G(e,"click",t[9]),G(e,"m-keydown",t[4])],r=!0)},p(a,f){o&&o.p&&(!n||f&132)&&_e(o,s,a,a[7],n?he(s,a[7],f,b1):ge(a[7]),tu),le(e,l=Me(u,[f&4&&a[2],{type:"button"},f&32&&a[5]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[10](null),r=!1,Te(i)}}}function k1(t){let e;const n=t[8].default,r=pe(n,t,t[7],nu);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&132)&&_e(r,n,i,i[7],e?he(n,i[7],s,y1):ge(i[7]),nu)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function C1(t){let e,n,r,i;const s=[k1,v1],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=$e()},m(l,a){o[e].m(l,a),w(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(de(),y(o[f],1,1,()=>{o[f]=null}),me(),n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r))},i(l){i||(b(n),i=!0)},o(l){y(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function E1(t,e,n){let r;const i=["asChild","el"];let s=Ke(e,i),o,{$$slots:u={},$$scope:l}=e,{asChild:a=!1}=e,{el:f=void 0}=e;const{elements:{button:c},getAttrs:d}=f1();J(t,c,g=>n(6,o=g));const p=Pn(),m=d("button");function _(g){Oe.call(this,t,g)}function v(g){Ce[g?"unshift":"push"](()=>{f=g,n(0,f)})}return t.$$set=g=>{e=ie(ie({},e),yt(g)),n(5,s=Ke(e,i)),"asChild"in g&&n(1,a=g.asChild),"el"in g&&n(0,f=g.el),"$$scope"in g&&n(7,l=g.$$scope)},t.$$.update=()=>{t.$$.dirty&64&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,m)},[f,a,r,c,p,s,o,l,u,_,v]}class w1 extends ve{constructor(e){super(),ye(this,e,E1,C1,fe,{asChild:1,el:0})}}var ay="M12 2C17.5 2 22 6.5 22 12S17.5 22 12 22 2 17.5 2 12 6.5 2 12 2M12 4C10.1 4 8.4 4.6 7.1 5.7L18.3 16.9C19.3 15.5 20 13.8 20 12C20 7.6 16.4 4 12 4M16.9 18.3L5.7 7.1C4.6 8.4 4 10.1 4 12C4 16.4 7.6 20 12 20C13.9 20 15.6 19.4 16.9 18.3Z",O1="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z",A1="M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41 10.59L10 14.17L17.59 6.58L19 8L10 17Z",fy="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z",cy="M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z",dy="M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z",T1="M20 6.91L17.09 4L12 9.09L6.91 4L4 6.91L9.09 12L4 17.09L6.91 20L12 14.91L17.09 20L20 17.09L14.91 12L20 6.91Z",$1="M15,9H5V5H15M12,19A3,3 0 0,1 9,16A3,3 0 0,1 12,13A3,3 0 0,1 15,16A3,3 0 0,1 12,19M17,3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V7L17,3Z",S1="M19,3H5C3.89,3 3,3.89 3,5V9H5V5H19V19H5V15H3V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3M10.08,15.58L11.5,17L16.5,12L11.5,7L10.08,8.41L12.67,11H3V13H12.67L10.08,15.58Z",R1="M6 2C4.89 2 4 2.9 4 4V20C4 21.11 4.89 22 6 22H12V20H6V4H13V9H18V12H20V8L14 2M18 14C17.87 14 17.76 14.09 17.74 14.21L17.55 15.53C17.25 15.66 16.96 15.82 16.7 16L15.46 15.5C15.35 15.5 15.22 15.5 15.15 15.63L14.15 17.36C14.09 17.47 14.11 17.6 14.21 17.68L15.27 18.5C15.25 18.67 15.24 18.83 15.24 19C15.24 19.17 15.25 19.33 15.27 19.5L14.21 20.32C14.12 20.4 14.09 20.53 14.15 20.64L15.15 22.37C15.21 22.5 15.34 22.5 15.46 22.5L16.7 22C16.96 22.18 17.24 22.35 17.55 22.47L17.74 23.79C17.76 23.91 17.86 24 18 24H20C20.11 24 20.22 23.91 20.24 23.79L20.43 22.47C20.73 22.34 21 22.18 21.27 22L22.5 22.5C22.63 22.5 22.76 22.5 22.83 22.37L23.83 20.64C23.89 20.53 23.86 20.4 23.77 20.32L22.7 19.5C22.72 19.33 22.74 19.17 22.74 19C22.74 18.83 22.73 18.67 22.7 18.5L23.76 17.68C23.85 17.6 23.88 17.47 23.82 17.36L22.82 15.63C22.76 15.5 22.63 15.5 22.5 15.5L21.27 16C21 15.82 20.73 15.65 20.42 15.53L20.23 14.21C20.22 14.09 20.11 14 20 14M19 17.5C19.83 17.5 20.5 18.17 20.5 19C20.5 19.83 19.83 20.5 19 20.5C18.16 20.5 17.5 19.83 17.5 19C17.5 18.17 18.17 17.5 19 17.5Z",D1="M6,2A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2H6M6,4H13V9H18V20H6V4M8,12V14H16V12H8M8,16V18H13V16H8Z",F1="M23 18H20V15H18V18H15V20H18V23H20V20H23M6 2C4.89 2 4 2.9 4 4V20C4 21.11 4.89 22 6 22H13.81C13.45 21.38 13.2 20.7 13.08 20H6V4H13V9H18V13.08C18.33 13.03 18.67 13 19 13C19.34 13 19.67 13.03 20 13.08V8L14 2M8 12V14H16V12M8 16V18H13V16Z",P1="M14,2L20,8V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V4A2,2 0 0,1 6,2H14M18,20V9H13V4H6V20H18M17,13V19H7L12,14L14,16M10,10.5A1.5,1.5 0 0,1 8.5,12A1.5,1.5 0 0,1 7,10.5A1.5,1.5 0 0,1 8.5,9A1.5,1.5 0 0,1 10,10.5Z",L1="M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M18,20H6V4H13V9H18V20Z",I1="M14,2L20,8V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V4A2,2 0 0,1 6,2H14M18,20V9H13V4H6V20H18M12,12L16,16H13.5V19H10.5V16H8L12,12Z",M1="M4 18H12.13L11 19.13V20H4C2.9 20 2 19.11 2 18V6C2 4.89 2.89 4 4 4H10L12 6H20C21.1 6 22 6.89 22 8V10.15C21.74 10.06 21.46 10 21.17 10C20.75 10 20.36 10.11 20 10.3V8H4V18M22.85 13.47L21.53 12.15C21.33 11.95 21 11.95 20.81 12.15L19.83 13.13L21.87 15.17L22.85 14.19C23.05 14 23.05 13.67 22.85 13.47M13 19.96V22H15.04L21.17 15.88L19.13 13.83L13 19.96Z",N1="M6.1,10L4,18V8H21A2,2 0 0,0 19,6H12L10,4H4A2,2 0 0,0 2,6V18A2,2 0 0,0 4,20H19C19.9,20 20.7,19.4 20.9,18.5L23.2,10H6.1M19,18H6L7.6,12H20.6L19,18Z",H1="M20,18H4V8H20M20,6H12L10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6Z",V1="M13 19C13 19.34 13.04 19.67 13.09 20H4C2.9 20 2 19.11 2 18V6C2 4.89 2.89 4 4 4H10L12 6H20C21.1 6 22 6.89 22 8V13.81C21.39 13.46 20.72 13.22 20 13.09V8H4V18H13.09C13.04 18.33 13 18.66 13 19M20 18V15H18V18H15V20H18V23H20V20H23V18H20Z",U1="M13 19C13 19.34 13.04 19.67 13.09 20H4C2.9 20 2 19.11 2 18V6C2 4.89 2.89 4 4 4H10L12 6H20C21.1 6 22 6.89 22 8V13.81C21.39 13.46 20.72 13.22 20 13.09V8H4V18H13.09C13.04 18.33 13 18.66 13 19M22.54 16.88L21.12 15.47L19 17.59L16.88 15.47L15.47 16.88L17.59 19L15.47 21.12L16.88 22.54L19 20.41L21.12 22.54L22.54 21.12L20.41 19L22.54 16.88Z",B1="M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z",my="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z",K1="M13 14C9.64 14 8.54 15.35 8.18 16.24C9.25 16.7 10 17.76 10 19C10 20.66 8.66 22 7 22S4 20.66 4 19C4 17.69 4.83 16.58 6 16.17V7.83C4.83 7.42 4 6.31 4 5C4 3.34 5.34 2 7 2S10 3.34 10 5C10 6.31 9.17 7.42 8 7.83V13.12C8.88 12.47 10.16 12 12 12C14.67 12 15.56 10.66 15.85 9.77C14.77 9.32 14 8.25 14 7C14 5.34 15.34 4 17 4S20 5.34 20 7C20 8.34 19.12 9.5 17.91 9.86C17.65 11.29 16.68 14 13 14M7 18C6.45 18 6 18.45 6 19S6.45 20 7 20 8 19.55 8 19 7.55 18 7 18M7 4C6.45 4 6 4.45 6 5S6.45 6 7 6 8 5.55 8 5 7.55 4 7 4M17 6C16.45 6 16 6.45 16 7S16.45 8 17 8 18 7.55 18 7 17.55 6 17 6M17 14V17H14V19H17V22H19V19H22V17H19V14H17Z",j1="M13 14C9.64 14 8.54 15.35 8.18 16.24C9.25 16.7 10 17.76 10 19C10 20.66 8.66 22 7 22S4 20.66 4 19C4 17.69 4.83 16.58 6 16.17V7.83C4.83 7.42 4 6.31 4 5C4 3.34 5.34 2 7 2S10 3.34 10 5C10 6.31 9.17 7.42 8 7.83V13.12C8.88 12.47 10.16 12 12 12C14.67 12 15.56 10.66 15.85 9.77C14.77 9.32 14 8.25 14 7C14 5.34 15.34 4 17 4S20 5.34 20 7C20 8.34 19.12 9.5 17.91 9.86C17.65 11.29 16.68 14 13 14M7 18C6.45 18 6 18.45 6 19S6.45 20 7 20 8 19.55 8 19 7.55 18 7 18M7 4C6.45 4 6 4.45 6 5S6.45 6 7 6 8 5.55 8 5 7.55 4 7 4M17 6C16.45 6 16 6.45 16 7S16.45 8 17 8 18 7.55 18 7 17.55 6 17 6M20.12 14.46L18 16.59L15.88 14.47L14.47 15.88L16.59 18L14.47 20.12L15.88 21.54L18 19.41L20.12 21.54L21.54 20.12L19.41 18L21.54 15.88L20.12 14.46Z",q1="M13 14C9.64 14 8.54 15.35 8.18 16.24C9.25 16.7 10 17.76 10 19C10 20.66 8.66 22 7 22S4 20.66 4 19C4 17.69 4.83 16.58 6 16.17V7.83C4.83 7.42 4 6.31 4 5C4 3.34 5.34 2 7 2S10 3.34 10 5C10 6.31 9.17 7.42 8 7.83V13.12C8.88 12.47 10.16 12 12 12C14.67 12 15.56 10.66 15.85 9.77C14.77 9.32 14 8.25 14 7C14 5.34 15.34 4 17 4S20 5.34 20 7C20 8.34 19.12 9.5 17.91 9.86C17.65 11.29 16.68 14 13 14M7 18C6.45 18 6 18.45 6 19S6.45 20 7 20 8 19.55 8 19 7.55 18 7 18M7 4C6.45 4 6 4.45 6 5S6.45 6 7 6 8 5.55 8 5 7.55 4 7 4M17 6C16.45 6 16 6.45 16 7S16.45 8 17 8 18 7.55 18 7 17.55 6 17 6M18 13V14.5C20.21 14.5 22 16.29 22 18.5C22 19.32 21.75 20.08 21.33 20.71L20.24 19.62C20.41 19.28 20.5 18.9 20.5 18.5C20.5 17.12 19.38 16 18 16V17.5L15.75 15.25L15.72 15.22C15.78 15.17 15.85 15.13 18 13M18 24V22.5C15.79 22.5 14 20.71 14 18.5C14 17.68 14.25 16.92 14.67 16.29L15.76 17.38C15.59 17.72 15.5 18.1 15.5 18.5C15.5 19.88 16.62 21 18 21V19.5L20.25 21.75L20.28 21.78C20.22 21.83 20.15 21.87 18 24",zt="M12,18A6,6 0 0,1 6,12C6,11 6.25,10.03 6.7,9.2L5.24,7.74C4.46,8.97 4,10.43 4,12A8,8 0 0,0 12,20V23L16,19L12,15M12,4V1L8,5L12,9V6A6,6 0 0,1 18,12C18,13 17.75,13.97 17.3,14.8L18.76,16.26C19.54,15.03 20,13.57 20,12A8,8 0 0,0 12,4Z",W1="M6,2V8H6V8L10,12L6,16V16H6V22H18V16H18V16L14,12L18,8V8H18V2H6M16,16.5V20H8V16.5L12,12.5L16,16.5M12,11.5L8,7.5V4H16V7.5L12,11.5Z",py="M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M9,8H11V17H9V8M13,8H15V17H13V8Z",Q1="M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M7,6H17V19H7V6M9,8V17H11V8H9M13,8V17H15V8H13Z";function z1(t){let e,n,r,i,s=t[0]!==null&&ru(t);return{c(){e=Ps("svg"),s&&s.c(),n=Ps("path"),I(n,"d",t[1]),I(e,"class",r="fill-current "+t[2]),I(e,"viewBox","0 0 24 24"),I(e,"aria-hidden",i=t[0]===null?"true":"false")},m(o,u){w(o,e,u),s&&s.m(e,null),F(e,n)},p(o,u){o[0]!==null?s?s.p(o,u):(s=ru(o),s.c(),s.m(e,n)):s&&(s.d(1),s=null),u&2&&I(n,"d",o[1]),u&4&&r!==(r="fill-current "+o[2])&&I(e,"class",r),u&1&&i!==(i=o[0]===null?"true":"false")&&I(e,"aria-hidden",i)},d(o){o&&E(e),s&&s.d()}}}function G1(t){let e,n;return{c(){e=D("span"),I(e,"class",n="block "+t[2])},m(r,i){w(r,e,i)},p(r,i){i&4&&n!==(n="block "+r[2])&&I(e,"class",n)},d(r){r&&E(e)}}}function ru(t){let e,n;return{c(){e=Ps("title"),n=Z(t[0])},m(r,i){w(r,e,i),F(e,n)},p(r,i){i&1&&je(n,r[0])},d(r){r&&E(e)}}}function Y1(t){let e;function n(s,o){return s[1]===null?G1:z1}let r=n(t),i=r(t);return{c(){i.c(),e=$e()},m(s,o){i.m(s,o),w(s,e,o)},p(s,[o]){r===(r=n(s))&&i?i.p(s,o):(i.d(1),i=r(s),i&&(i.c(),i.m(e.parentNode,e)))},i:ce,o:ce,d(s){s&&E(e),i.d(s)}}}function Z1(t,e,n){let{label:r=null}=e,{path:i=null}=e,{class:s="w-6 h-6"}=e;return t.$$set=o=>{"label"in o&&n(0,r=o.label),"path"in o&&n(1,i=o.path),"class"in o&&n(2,s=o.class)},[r,i,s]}class Ne extends ve{constructor(e){super(),ye(this,e,Z1,Y1,fe,{label:0,path:1,class:2})}}async function cn({queryKey:t}){if(t){const e=["/api"];for(const r of t)r!==""&&(r[0]==="?"||r[0]==="&"||e.push("/"),e.push(r));let n=await window.fetch(e.join(""));if(n.ok)return await n.json()}throw new Error("Could not fetch data")}function lf(t){if(t.type==="text")return t.text;{let e=[];for(let n of t.content)e.push(lf(n));return e.join("")}}function hy(t){return t.content&&t.content.length>0?lf(t.content[0]):"<Empty Document>"}function uf(t,e){let n=window.location.hash;n.startsWith("#")&&(n=n.substring(1));let r=new URLSearchParams(n);r.set(t,e),window.location.hash=r.toString()}function af(t){let e=window.location.hash;e.startsWith("#")&&(e=e.substring(1));let n=new URLSearchParams(e);return n.has(t)?n.get(t):null}function X1(t){let e=window.location.hash;e.startsWith("#")&&(e=e.substring(1));let n=new URLSearchParams(e);n.has(t)&&(n.delete(t),window.location.hash=n.toString())}function ts(t){return t[0].toUpperCase()+t.substring(1)}const ft=Fe(null),J1=Fe(null),iu=Fe(!1);ft.subscribe(t=>{t!==null&&uf("path",t.fullpath)});function Ln(){return bt("apiStatus")}function To(){return bt("currentUser")}function kt(){return bt("currentBranch")}function $o(){return bt("branches")}function su(t,e,n){const r=t.slice();return r[7]=e[n],r}function x1(t){let e,n,r,i=t[0].length+t[1]+"",s,o,u;return e=new Ne({props:{path:zt,class:"w-4 h-4 animate-spin animate-reverse"}}),{c(){H(e.$$.fragment),n=j(),r=D("span"),s=Z(i),o=Z(" actions running"),I(r,"class","pl-2")},m(l,a){M(e,l,a),w(l,n,a),w(l,r,a),F(r,s),F(r,o),u=!0},p(l,a){(!u||a&3)&&i!==(i=l[0].length+l[1]+"")&&je(s,i)},i(l){u||(b(e.$$.fragment,l),u=!0)},o(l){y(e.$$.fragment,l),u=!1},d(l){l&&(E(n),E(r)),N(e,l)}}}function e_(t){let e,n,r,i;return e=new Ne({props:{path:zt,class:"w-4 h-4 animate-spin animate-reverse"}}),{c(){H(e.$$.fragment),n=j(),r=D("span"),r.textContent="1 action running",I(r,"class","pl-2")},m(s,o){M(e,s,o),w(s,n,o),w(s,r,o),i=!0},p:ce,i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),N(e,s)}}}function t_(t){let e;return{c(){e=D("span"),e.textContent="Idle"},m(n,r){w(n,e,r)},p:ce,i:ce,o:ce,d(n){n&&E(e)}}}function n_(t){let e,n,r,i;const s=[t_,e_,x1],o=[];function u(l,a){return l[0].length+l[1]===0?0:l[0].length+l[1]===1?1:2}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=$e()},m(l,a){o[e].m(l,a),w(l,r,a),i=!0},p(l,a){let f=e;e=u(l),e===f?o[e].p(l,a):(de(),y(o[f],1,1,()=>{o[f]=null}),me(),n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r))},i(l){i||(b(n),i=!0)},o(l){y(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function r_(t){let e,n,r,i;return e=new Ne({props:{path:zt,class:"w-4 h-4 animate-spin animate-reverse"}}),{c(){H(e.$$.fragment),n=j(),r=D("span"),r.textContent="Saving file",I(r,"class","flex-1")},m(s,o){M(e,s,o),w(s,n,o),w(s,r,o),i=!0},i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),N(e,s)}}}function i_(t){let e,n,r,i;return e=new Ne({props:{path:zt,class:"w-4 h-4 animate-spin animate-reverse"}}),{c(){H(e.$$.fragment),n=j(),r=D("span"),r.textContent="Loading file",I(r,"class","flex-1")},m(s,o){M(e,s,o),w(s,n,o),w(s,r,o),i=!0},i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),N(e,s)}}}function ou(t){let e,n,r,i;const s=[i_,r_],o=[];function u(l,a){return l[7].action==="LoadTextFile"?0:l[7].action==="SaveCurrentFile"?1:-1}return~(n=u(t))&&(r=o[n]=s[n](t)),{c(){e=D("li"),r&&r.c(),I(e,"class","flex flex-row items-center space-x-2 px-3 py-1 border-l border-r last:border-b first-border-t border-slate-300")},m(l,a){w(l,e,a),~n&&o[n].m(e,null),i=!0},p(l,a){let f=n;n=u(l),n!==f&&(r&&(de(),y(o[f],1,1,()=>{o[f]=null}),me()),~n?(r=o[n],r||(r=o[n]=s[n](l),r.c()),b(r,1),r.m(e,null)):r=null)},i(l){i||(b(r),i=!0)},o(l){y(r),i=!1},d(l){l&&E(e),~n&&o[n].d()}}}function lu(t){let e,n,r,i,s;return n=new Ne({props:{path:zt,class:"w-4 h-4 animate-spin animate-reverse"}}),{c(){e=D("li"),H(n.$$.fragment),r=j(),i=D("span"),i.textContent="Fetching branches",I(i,"class","flex-1"),I(e,"class","flex flex-row items-center space-x-2 px-3 py-1 border-l border-r last:border-b first-border-t border-slate-300")},m(o,u){w(o,e,u),M(n,e,null),F(e,r),F(e,i),s=!0},i(o){s||(b(n.$$.fragment,o),s=!0)},o(o){y(n.$$.fragment,o),s=!1},d(o){o&&E(e),N(n)}}}function s_(t){let e,n,r,i=tn(t[0]),s=[];for(let l=0;l<i.length;l+=1)s[l]=ou(su(t,i,l));const o=l=>y(s[l],1,1,()=>{s[l]=null});let u=t[2].isFetching&&lu();return{c(){e=D("ul");for(let l=0;l<s.length;l+=1)s[l].c();n=j(),u&&u.c()},m(l,a){w(l,e,a);for(let f=0;f<s.length;f+=1)s[f]&&s[f].m(e,null);F(e,n),u&&u.m(e,null),r=!0},p(l,a){if(a&1){i=tn(l[0]);let f;for(f=0;f<i.length;f+=1){const c=su(l,i,f);s[f]?(s[f].p(c,a),b(s[f],1)):(s[f]=ou(c),s[f].c(),b(s[f],1),s[f].m(e,n))}for(de(),f=i.length;f<s.length;f+=1)o(f);me()}l[2].isFetching?u?a&4&&b(u,1):(u=lu(),u.c(),b(u,1),u.m(e,null)):u&&(de(),y(u,1,1,()=>{u=null}),me())},i(l){if(!r){for(let a=0;a<i.length;a+=1)b(s[a]);b(u),r=!0}},o(l){s=s.filter(Boolean);for(let a=0;a<s.length;a+=1)y(s[a]);y(u),r=!1},d(l){l&&E(e),ci(s,l),u&&u.d()}}}function o_(t){let e,n,r,i;return e=new u1({props:{class:"inline-flex items-center",$$slots:{default:[n_]},$$scope:{ctx:t}}}),r=new t1({props:{class:"z-50 bg-white shadow-lg",$$slots:{default:[s_]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=j(),H(r.$$.fragment)},m(s,o){M(e,s,o),w(s,n,o),M(r,s,o),i=!0},p(s,o){const u={};o&1027&&(u.$$scope={dirty:o,ctx:s}),e.$set(u);const l={};o&1029&&(l.$$scope={dirty:o,ctx:s}),r.$set(l)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),N(e,s),N(r,s)}}}function uu(t){let e,n;return e=new oi({props:{open:!0,onOpenChange:t[6],$$slots:{default:[c_]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},p(r,i){const s={};i&1024&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function l_(t){let e;return{c(){e=Z("Saving failed")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function u_(t){let e;return{c(){e=Z("Close")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function a_(t){let e,n,r,i,s,o,u,l;return e=new Tt({props:{$$slots:{default:[l_]},$$scope:{ctx:t}}}),u=new Mt({props:{"data-button":!0,$$slots:{default:[u_]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=j(),r=D("div"),i=D("p"),i.textContent="Unfortunately saving the file failed.",s=j(),o=D("div"),H(u.$$.fragment),I(o,"data-dialog-buttons",""),I(r,"data-dialog-content-area","")},m(a,f){M(e,a,f),w(a,n,f),w(a,r,f),F(r,i),F(r,s),F(r,o),M(u,o,null),l=!0},p(a,f){const c={};f&1024&&(c.$$scope={dirty:f,ctx:a}),e.$set(c);const d={};f&1024&&(d.$$scope={dirty:f,ctx:a}),u.$set(d)},i(a){l||(b(e.$$.fragment,a),b(u.$$.fragment,a),l=!0)},o(a){y(e.$$.fragment,a),y(u.$$.fragment,a),l=!1},d(a){a&&(E(n),E(r)),N(e,a),N(u)}}}function f_(t){let e,n,r,i;return e=new ki({}),r=new vi({props:{$$slots:{default:[a_]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=j(),H(r.$$.fragment)},m(s,o){M(e,s,o),w(s,n,o),M(r,s,o),i=!0},p(s,o){const u={};o&1024&&(u.$$scope={dirty:o,ctx:s}),r.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),N(e,s),N(r,s)}}}function c_(t){let e,n,r,i;return e=new Ci({props:{class:"hidden"}}),r=new yi({props:{$$slots:{default:[f_]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=j(),H(r.$$.fragment)},m(s,o){M(e,s,o),w(s,n,o),M(r,s,o),i=!0},p(s,o){const u={};o&1024&&(u.$$scope={dirty:o,ctx:s}),r.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),N(e,s),N(r,s)}}}function d_(t){let e,n,r,i;e=new Uh({props:{$$slots:{default:[o_]},$$scope:{ctx:t}}});let s=t[3]&&uu(t);return{c(){H(e.$$.fragment),n=j(),s&&s.c(),r=$e()},m(o,u){M(e,o,u),w(o,n,u),s&&s.m(o,u),w(o,r,u),i=!0},p(o,[u]){const l={};u&1031&&(l.$$scope={dirty:u,ctx:o}),e.$set(l),o[3]?s?(s.p(o,u),u&8&&b(s,1)):(s=uu(o),s.c(),b(s,1),s.m(r.parentNode,r)):s&&(de(),y(s,1,1,()=>{s=null}),me())},i(o){i||(b(e.$$.fragment,o),b(s),i=!0)},o(o){y(e.$$.fragment,o),y(s),i=!1},d(o){o&&(E(n),E(r)),N(e,o),s&&s.d(o)}}}const io=Fe([]);let so=Fe(!1);function ff(t){t.status="active",io.update(n=>n.concat([t]));let e=null;t.action==="LoadTextFile"?e=m_(t):t.action==="SaveCurrentFile"?e=p_(t):t.action==="SynchroniseBranches"&&(e=h_(t)),e!==null&&e.then(()=>{io.update(n=>{const r=n.indexOf(t);return r>=0?n.slice(0,r).concat(n.slice(r+1)):n})})}async function m_(t){const e=await window.fetch("/api/branches/"+t.branch.id+"/files/"+t.filename);t.callback(await e.text())}async function p_(t){const e=new FormData;e.append("content",new Blob([t.data])),(await window.fetch("/api/branches/"+t.branch.id+"/files/"+t.filename,{method:"PUT",body:e})).ok?t.callback():so.set(!0)}async function h_(t){await window.fetch("/api/branches",{method:"PATCH"}),t.callback&&t.callback()}function __(t,e,n){let r,i,s,o;J(t,io,f=>n(0,r=f)),J(t,so,f=>n(3,o=f));const u=$o();J(t,u,f=>n(2,s=f));const l=ze([u],f=>{let c=0;for(const d of f)d!==null&&d.isFetching&&(c=c+1);return c});return J(t,l,f=>n(1,i=f)),[r,i,s,o,u,l,f=>{f||so.set(!1)}]}let g_=class extends ve{constructor(e){super(),ye(this,e,__,d_,fe,{})}};function b_(t){let e;const n=t[3].default,r=pe(n,t,t[5],null);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&32)&&_e(r,n,i,i[5],e?he(n,i[5],s,null):ge(i[5]),null)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function y_(t){let e,n,r,i;return e=new ki({}),r=new vi({props:{$$slots:{default:[b_]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=j(),H(r.$$.fragment)},m(s,o){M(e,s,o),w(s,n,o),M(r,s,o),i=!0},p(s,o){const u={};o&32&&(u.$$scope={dirty:o,ctx:s}),r.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),N(e,s),N(r,s)}}}function v_(t){let e,n,r,i;return e=new Ci({props:{class:"hidden"}}),r=new yi({props:{$$slots:{default:[y_]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=j(),H(r.$$.fragment)},m(s,o){M(e,s,o),w(s,n,o),M(r,s,o),i=!0},p(s,o){const u={};o&32&&(u.$$scope={dirty:o,ctx:s}),r.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),N(e,s),N(r,s)}}}function k_(t){let e,n,r;function i(o){t[4](o)}let s={onOpenChange:t[1],$$slots:{default:[v_]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new oi({props:s}),Ce.push(()=>Ut(e,"open",i)),{c(){H(e.$$.fragment)},m(o,u){M(e,o,u),r=!0},p(o,[u]){const l={};u&32&&(l.$$scope={dirty:u,ctx:o}),!n&&u&1&&(n=!0,l.open=o[0],Vt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){y(e.$$.fragment,o),r=!1},d(o){N(e,o)}}}function C_(t,e,n){let{$$slots:r={},$$scope:i}=e;const s=null;let{open:o=!1}=e;function u(a){a||Ge.set(Ae.NONE)}rs(()=>{n(0,o=!0)});function l(a){o=a,n(0,o)}return t.$$set=a=>{"open"in a&&n(0,o=a.open),"$$scope"in a&&n(5,i=a.$$scope)},[o,u,s,r,l,i]}class Gt extends ve{constructor(e){super(),ye(this,e,C_,k_,fe,{onOpenChange:2,open:0})}get onOpenChange(){return this.$$.ctx[2]}}function E_(t){let e;return{c(){e=Z("Create a new branch")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function au(t){let e,n;return{c(){e=D("span"),n=Z(t[2]),I(e,"data-form-field-error","")},m(r,i){w(r,e,i),F(e,n)},p(r,i){i&4&&je(n,r[2])},d(r){r&&E(e)}}}function w_(t){let e,n,r,i;return e=new Mt({props:{"data-button":!0,$$slots:{default:[A_]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=j(),r=D("button"),r.textContent="Create",I(r,"type","submit"),I(r,"data-button","")},m(s,o){M(e,s,o),w(s,n,o),w(s,r,o),i=!0},i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),N(e,s)}}}function O_(t){let e,n,r,i;return n=new Ne({props:{path:zt,class:"block w-6 h-6 animate-spin"}}),{c(){e=D("span"),H(n.$$.fragment),r=D("span"),r.textContent="Creating...",I(e,"data-button",""),I(e,"class","inline-flex")},m(s,o){w(s,e,o),M(n,e,null),F(e,r),i=!0},i(s){i||(b(n.$$.fragment,s),i=!0)},o(s){y(n.$$.fragment,s),i=!1},d(s){s&&E(e),N(n)}}}function A_(t){let e;return{c(){e=Z("Don't create")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function T_(t){let e,n,r,i,s,o,u,l,a,f,c,d,p,m,_;e=new Tt({props:{$$slots:{default:[E_]},$$scope:{ctx:t}}});let v=t[2]&&au(t);const g=[O_,w_],h=[];function k(A,S){return A[3].isPending?0:1}return c=k(t),d=h[c]=g[c](t),{c(){H(e.$$.fragment),n=j(),r=D("form"),i=D("label"),s=D("span"),s.textContent="New branch title",o=j(),u=D("input"),l=j(),v&&v.c(),a=j(),f=D("div"),d.c(),I(s,"data-form-field-label",""),I(u,"type","text"),I(u,"data-form-field-text",""),I(f,"data-dialog-buttons",""),I(r,"data-dialog-content-area","")},m(A,S){M(e,A,S),w(A,n,S),w(A,r,S),F(r,i),F(i,s),F(i,o),F(i,u),it(u,t[1]),F(i,l),v&&v.m(i,null),F(r,a),F(r,f),h[c].m(f,null),p=!0,m||(_=[G(u,"input",t[7]),G(r,"submit",t[6])],m=!0)},p(A,S){const C={};S&2048&&(C.$$scope={dirty:S,ctx:A}),e.$set(C),S&2&&u.value!==A[1]&&it(u,A[1]),A[2]?v?v.p(A,S):(v=au(A),v.c(),v.m(i,null)):v&&(v.d(1),v=null);let L=c;c=k(A),c!==L&&(de(),y(h[L],1,1,()=>{h[L]=null}),me(),d=h[c],d||(d=h[c]=g[c](A),d.c()),b(d,1),d.m(f,null))},i(A){p||(b(e.$$.fragment,A),b(d),p=!0)},o(A){y(e.$$.fragment,A),y(d),p=!1},d(A){A&&(E(n),E(r)),N(e,A),v&&v.d(),h[c].d(),m=!1,Te(_)}}}function $_(t){let e,n,r;function i(o){t[8](o)}let s={onOpenChange:t[4],$$slots:{default:[T_]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Ut(e,"open",i)),{c(){H(e.$$.fragment)},m(o,u){M(e,o,u),r=!0},p(o,[u]){const l={};u&2062&&(l.$$scope={dirty:u,ctx:o}),!n&&u&1&&(n=!0,l.open=o[0],Vt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){y(e.$$.fragment,o),r=!1},d(o){N(e,o)}}}function S_(t,e,n){let r;const i=vt(),s=kt();let o=!1,u="",l="";function a(m){m&&n(1,u="")}const f=mi({mutationFn:async m=>{const _=await window.fetch("/api/branches",{method:"POST",body:JSON.stringify({title:m.title}),headers:{Accept:"application/json","Content-Type":"application/json"}});if(_.ok){i.invalidateQueries({queryKey:["branches"]});const v=await _.json();s.set(v),Ge.set(Ae.NONE)}else n(2,l=(await _.json()).detail[0].msg),n(2,l=l[0].toUpperCase()+l.substring(1))}});J(t,f,m=>n(3,r=m));async function c(m){m.preventDefault(),r.mutate({title:u})}function d(){u=this.value,n(1,u)}function p(m){o=m,n(0,o)}return[o,u,l,r,a,f,c,d,p]}class R_ extends ve{constructor(e){super(),ye(this,e,S_,$_,fe,{})}}function D_(t){let e;return{c(){e=Z("Delete the branch")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function fu(t){let e,n;return{c(){e=D("span"),n=Z(t[2]),I(e,"data-form-field-error","")},m(r,i){w(r,e,i),F(e,n)},p(r,i){i&4&&je(n,r[2])},d(r){r&&E(e)}}}function F_(t){let e,n,r,i;return e=new Mt({props:{"data-button":!0,$$slots:{default:[L_]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=j(),r=D("button"),r.textContent="Delete",I(r,"type","submit"),I(r,"data-button","")},m(s,o){M(e,s,o),w(s,n,o),w(s,r,o),i=!0},i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),N(e,s)}}}function P_(t){let e,n,r,i;return n=new Ne({props:{path:zt,class:"block w-6 h-6 animate-spin"}}),{c(){e=D("span"),H(n.$$.fragment),r=D("span"),r.textContent="Deleting...",I(e,"data-button",""),I(e,"class","inline-flex")},m(s,o){w(s,e,o),M(n,e,null),F(e,r),i=!0},i(s){i||(b(n.$$.fragment,s),i=!0)},o(s){y(n.$$.fragment,s),i=!1},d(s){s&&E(e),N(n)}}}function L_(t){let e;return{c(){e=Z("Don't delete")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function I_(t){var V;let e,n,r,i,s,o,u=((V=t[5])==null?void 0:V.title)+"",l,a,f,c,d,p,m,_,v,g,h,k,A,S,C,L,R,W,K;e=new Tt({props:{$$slots:{default:[D_]},$$scope:{ctx:t}}});let T=t[2]&&fu(t);const B=[P_,F_],O=[];function P(U,ee){return U[4].isPending?0:1}return C=P(t),L=O[C]=B[C](t),{c(){H(e.$$.fragment),n=j(),r=D("form"),i=D("p"),s=Z("Please confirm you wish to delete the branch "),o=D("span"),l=Z(u),a=Z(`. This cannot be undone. To confirm the action, please enter the name of
|
|
13
|
-
the branch to delete.`),f=j(),c=D("label"),d=D("span"),d.textContent="Confirm branch name",p=j(),m=D("input"),_=j(),T&&T.c(),v=j(),g=D("label"),h=D("input"),k=Z(` Only delete the local
|
|
14
|
-
branch`),A=j(),S=D("div"),L.c(),I(o,"class","inline-block mx-1 px-2 border border-fuchsia-700 rounded font-bold"),I(i,"class","mb-4"),I(d,"data-form-field-label",""),I(m,"type","text"),I(m,"data-form-field-text",""),I(c,"class","block mb-4"),I(h,"type","checkbox"),I(g,"class","block text-sm"),I(S,"data-dialog-buttons",""),I(r,"data-dialog-content-area","")},m(U,ee){M(e,U,ee),w(U,n,ee),w(U,r,ee),F(r,i),F(i,s),F(i,o),F(o,l),F(i,a),F(r,f),F(r,c),F(c,d),F(c,p),F(c,m),it(m,t[1]),F(c,_),T&&T.m(c,null),F(r,v),F(r,g),F(g,h),h.checked=t[3],F(g,k),F(r,A),F(r,S),O[C].m(S,null),R=!0,W||(K=[G(m,"input",t[10]),G(h,"change",t[11]),G(r,"submit",t[9])],W=!0)},p(U,ee){var oe;const te={};ee&16384&&(te.$$scope={dirty:ee,ctx:U}),e.$set(te),(!R||ee&32)&&u!==(u=((oe=U[5])==null?void 0:oe.title)+"")&&je(l,u),ee&2&&m.value!==U[1]&&it(m,U[1]),U[2]?T?T.p(U,ee):(T=fu(U),T.c(),T.m(c,null)):T&&(T.d(1),T=null),ee&8&&(h.checked=U[3]);let z=C;C=P(U),C!==z&&(de(),y(O[z],1,1,()=>{O[z]=null}),me(),L=O[C],L||(L=O[C]=B[C](U),L.c()),b(L,1),L.m(S,null))},i(U){R||(b(e.$$.fragment,U),b(L),R=!0)},o(U){y(e.$$.fragment,U),y(L),R=!1},d(U){U&&(E(n),E(r)),N(e,U),T&&T.d(),O[C].d(),W=!1,Te(K)}}}function M_(t){let e,n,r;function i(o){t[12](o)}let s={onOpenChange:t[7],$$slots:{default:[I_]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Ut(e,"open",i)),{c(){H(e.$$.fragment)},m(o,u){M(e,o,u),r=!0},p(o,[u]){const l={};u&16446&&(l.$$scope={dirty:u,ctx:o}),!n&&u&1&&(n=!0,l.open=o[0],Vt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){y(e.$$.fragment,o),r=!1},d(o){N(e,o)}}}function N_(t,e,n){let r,i;const s=vt(),o=kt();J(t,o,g=>n(5,i=g));let u=!1,l="",a="",f=!1;function c(g){g&&n(1,l="")}const d=mi({mutationFn:async()=>{const g=await window.fetch("/api/branches/"+(i==null?void 0:i.id),{method:"DELETE",headers:{Accept:"application/json","X-UEDITOR-DELETE-LOCAL-ONLY":f?"true":"false"}});g.ok?(s.invalidateQueries({queryKey:["branches"]}),o.set(null),Ge.set(Ae.NONE)):(n(2,a=(await g.json()).detail[0].msg),n(2,a=a[0].toUpperCase()+a.substring(1)))}});J(t,d,g=>n(4,r=g));function p(g){g.preventDefault(),(i==null?void 0:i.title)===l?(n(2,a=""),r.mutate()):n(2,a="Please enter the exact name of the branch to delete.")}function m(){l=this.value,n(1,l)}function _(){f=this.checked,n(3,f)}function v(g){u=g,n(0,u)}return[u,l,a,f,r,i,o,c,d,p,m,_,v]}class H_ extends ve{constructor(e){super(),ye(this,e,N_,M_,fe,{})}}function cu(t,e,n){const r=t.slice();return r[14]=e[n],r}function V_(t){let e;return{c(){e=Z("Import a remote branch")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function du(t){let e,n=t[14].title+"",r,i;return{c(){e=D("option"),r=Z(n),e.__value=i=t[14].id,it(e,e.__value)},m(s,o){w(s,e,o),F(e,r)},p(s,o){o&16&&n!==(n=s[14].title+"")&&je(r,n),o&16&&i!==(i=s[14].id)&&(e.__value=i,it(e,e.__value))},d(s){s&&E(e)}}}function mu(t){let e,n;return{c(){e=D("span"),n=Z(t[2]),I(e,"data-form-field-error","")},m(r,i){w(r,e,i),F(e,n)},p(r,i){i&4&&je(n,r[2])},d(r){r&&E(e)}}}function U_(t){let e,n,r,i;return e=new Mt({props:{"data-button":!0,$$slots:{default:[K_]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=j(),r=D("button"),r.textContent="Import",I(r,"type","submit"),I(r,"data-button","")},m(s,o){M(e,s,o),w(s,n,o),w(s,r,o),i=!0},i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),N(e,s)}}}function B_(t){let e,n,r,i;return n=new Ne({props:{path:zt,class:"block w-6 h-6 animate-spin"}}),{c(){e=D("span"),H(n.$$.fragment),r=D("span"),r.textContent="Importing...",I(e,"data-button",""),I(e,"class","inline-flex")},m(s,o){w(s,e,o),M(n,e,null),F(e,r),i=!0},i(s){i||(b(n.$$.fragment,s),i=!0)},o(s){y(n.$$.fragment,s),i=!1},d(s){s&&E(e),N(n)}}}function K_(t){let e;return{c(){e=Z("Don't import")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function j_(t){let e,n,r,i,s,o,u,l,a,f,c,d,p,m,_;e=new Tt({props:{$$slots:{default:[V_]},$$scope:{ctx:t}}});let v=tn(t[4]),g=[];for(let C=0;C<v.length;C+=1)g[C]=du(cu(t,v,C));let h=t[2]&&mu(t);const k=[B_,U_],A=[];function S(C,L){return C[3].isPending?0:1}return c=S(t),d=A[c]=k[c](t),{c(){H(e.$$.fragment),n=j(),r=D("form"),i=D("label"),s=D("span"),s.textContent="New branch title",o=j(),u=D("select");for(let C=0;C<g.length;C+=1)g[C].c();l=j(),h&&h.c(),a=j(),f=D("div"),d.c(),I(s,"data-form-field-label",""),I(u,"data-form-field-text",""),t[1]===void 0&&at(()=>t[9].call(u)),I(f,"data-dialog-buttons",""),I(r,"data-dialog-content-area","")},m(C,L){M(e,C,L),w(C,n,L),w(C,r,L),F(r,i),F(i,s),F(i,o),F(i,u);for(let R=0;R<g.length;R+=1)g[R]&&g[R].m(u,null);Io(u,t[1],!0),F(i,l),h&&h.m(i,null),F(r,a),F(r,f),A[c].m(f,null),p=!0,m||(_=[G(u,"change",t[9]),G(r,"submit",t[8])],m=!0)},p(C,L){const R={};if(L&131072&&(R.$$scope={dirty:L,ctx:C}),e.$set(R),L&16){v=tn(C[4]);let K;for(K=0;K<v.length;K+=1){const T=cu(C,v,K);g[K]?g[K].p(T,L):(g[K]=du(T),g[K].c(),g[K].m(u,null))}for(;K<g.length;K+=1)g[K].d(1);g.length=v.length}L&18&&Io(u,C[1]),C[2]?h?h.p(C,L):(h=mu(C),h.c(),h.m(i,null)):h&&(h.d(1),h=null);let W=c;c=S(C),c!==W&&(de(),y(A[W],1,1,()=>{A[W]=null}),me(),d=A[c],d||(d=A[c]=k[c](C),d.c()),b(d,1),d.m(f,null))},i(C){p||(b(e.$$.fragment,C),b(d),p=!0)},o(C){y(e.$$.fragment,C),y(d),p=!1},d(C){C&&(E(n),E(r)),N(e,C),ci(g,C),h&&h.d(),A[c].d(),m=!1,Te(_)}}}function q_(t){let e,n,r;function i(o){t[10](o)}let s={onOpenChange:t[5],$$slots:{default:[j_]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Ut(e,"open",i)),{c(){H(e.$$.fragment)},m(o,u){M(e,o,u),r=!0},p(o,[u]){const l={};u&131102&&(l.$$scope={dirty:u,ctx:o}),!n&&u&1&&(n=!0,l.open=o[0],Vt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){y(e.$$.fragment,o),r=!1},d(o){N(e,o)}}}function W_(t,e,n){let r,i;const s=vt(),o=kt(),u=$o();let l=!1,a="",f="";function c(g){g&&n(1,a="")}const d=ze(u,g=>g.isSuccess?g.data.remote.filter(h=>{let k=!1;for(const A of g.data.local)if(h.id.endsWith("/"+A.id)){k=!0;break}return!k}).map(h=>({id:h.id.substring(h.id.indexOf("/")+1),title:h.title,nogit:!1})):[]);J(t,d,g=>n(4,i=g));const p=mi({mutationFn:async g=>{const h=await window.fetch("/api/branches",{method:"POST",body:JSON.stringify({title:g.title}),headers:{Accept:"application/json","Content-Type":"application/json","X-UEditor-Import-Branch":"true"}});if(h.ok){s.invalidateQueries({queryKey:["branches"]});const k=await h.json();o.set(k),Ge.set(Ae.NONE)}else n(2,f=(await h.json()).detail[0].msg),n(2,f=f[0].toUpperCase()+f.substring(1))}});J(t,p,g=>n(3,r=g));async function m(g){g.preventDefault(),r.mutate({title:a})}function _(){a=$f(this),n(1,a)}function v(g){l=g,n(0,l)}return[l,a,f,r,i,c,d,p,m,_,v]}class Q_ extends ve{constructor(e){super(),ye(this,e,W_,q_,fe,{})}}function z_(t){let e;return{c(){e=Z("Merge changes from the default branch")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function pu(t){let e,n;return{c(){e=D("p"),n=Z(t[1]),I(e,"data-form-field-error","")},m(r,i){w(r,e,i),F(e,n)},p(r,i){i&2&&je(n,r[1])},d(r){r&&E(e)}}}function G_(t){let e,n,r,i;return e=new Mt({props:{"data-button":!0,$$slots:{default:[Z_]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=j(),r=D("button"),r.textContent="Merge",I(r,"type","submit"),I(r,"data-button","")},m(s,o){M(e,s,o),w(s,n,o),w(s,r,o),i=!0},i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),N(e,s)}}}function Y_(t){let e,n,r,i;return n=new Ne({props:{path:zt,class:"block w-6 h-6 animate-spin"}}),{c(){e=D("span"),H(n.$$.fragment),r=D("span"),r.textContent="Merging...",I(e,"data-button",""),I(e,"class","inline-flex")},m(s,o){w(s,e,o),M(n,e,null),F(e,r),i=!0},i(s){i||(b(n.$$.fragment,s),i=!0)},o(s){y(n.$$.fragment,s),i=!1},d(s){s&&E(e),N(n)}}}function Z_(t){let e;return{c(){e=Z("Don't merge")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function X_(t){var K;let e,n,r,i,s,o,u=ts(t[4].data.git.default_branch)+"",l,a,f,c=((K=t[3])==null?void 0:K.title)+"",d,p,m,_,v,g,h,k,A,S;e=new Tt({props:{$$slots:{default:[z_]},$$scope:{ctx:t}}});let C=t[1]&&pu(t);const L=[Y_,G_],R=[];function W(T,B){return T[2].isPending?0:1}return g=W(t),h=R[g]=L[g](t),{c(){H(e.$$.fragment),n=j(),r=D("form"),i=D("p"),s=Z("Please confirm you wish to merge all changes from the default branch "),o=D("span"),l=Z(u),a=Z(`
|
|
15
|
-
into the current branch`),f=D("span"),d=Z(c),p=Z(". This cannot be undone."),m=j(),C&&C.c(),_=j(),v=D("div"),h.c(),I(o,"class","inline-block mx-1 px-2 border border-fuchsia-700 rounded font-bold"),I(f,"class","inline-block mx-1 px-2 border border-fuchsia-700 rounded font-bold"),I(i,"class","mb-4"),I(v,"data-dialog-buttons",""),I(r,"data-dialog-content-area","")},m(T,B){M(e,T,B),w(T,n,B),w(T,r,B),F(r,i),F(i,s),F(i,o),F(o,l),F(i,a),F(i,f),F(f,d),F(i,p),F(r,m),C&&C.m(r,null),F(r,_),F(r,v),R[g].m(v,null),k=!0,A||(S=G(r,"submit",t[9]),A=!0)},p(T,B){var V;const O={};B&8192&&(O.$$scope={dirty:B,ctx:T}),e.$set(O),(!k||B&16)&&u!==(u=ts(T[4].data.git.default_branch)+"")&&je(l,u),(!k||B&8)&&c!==(c=((V=T[3])==null?void 0:V.title)+"")&&je(d,c),T[1]?C?C.p(T,B):(C=pu(T),C.c(),C.m(r,_)):C&&(C.d(1),C=null);let P=g;g=W(T),g!==P&&(de(),y(R[P],1,1,()=>{R[P]=null}),me(),h=R[g],h||(h=R[g]=L[g](T),h.c()),b(h,1),h.m(v,null))},i(T){k||(b(e.$$.fragment,T),b(h),k=!0)},o(T){y(e.$$.fragment,T),y(h),k=!1},d(T){T&&(E(n),E(r)),N(e,T),C&&C.d(),R[g].d(),A=!1,S()}}}function J_(t){let e,n,r;function i(o){t[10](o)}let s={onOpenChange:t[7],$$slots:{default:[X_]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Ut(e,"open",i)),{c(){H(e.$$.fragment)},m(o,u){M(e,o,u),r=!0},p(o,[u]){const l={};u&8222&&(l.$$scope={dirty:u,ctx:o}),!n&&u&1&&(n=!0,l.open=o[0],Vt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){y(e.$$.fragment,o),r=!1},d(o){N(e,o)}}}function x_(t,e,n){let r,i,s;const o=vt(),u=Ln();J(t,u,_=>n(4,s=_));const l=kt();J(t,l,_=>n(3,i=_));let a=!1,f="";function c(_){}const d=mi({mutationFn:async()=>{const _=await window.fetch("/api/branches/"+(i==null?void 0:i.id)+"/merge-from-default",{method:"POST",headers:{Accept:"application/json"}});_.ok?(o.invalidateQueries({queryKey:["branches"]}),Ge.set(Ae.NONE)):(n(1,f=(await _.json()).detail[0].msg),n(1,f=f[0].toUpperCase()+f.substring(1)))}});J(t,d,_=>n(2,r=_));function p(_){_.preventDefault(),r.mutate()}function m(_){a=_,n(0,a)}return[a,f,r,i,s,u,l,c,d,p,m]}class eg extends ve{constructor(e){super(),ye(this,e,x_,J_,fe,{})}}function tg(t){var s,o;let e,n=((s=t[3])!=null&&s.fullpath?(o=t[3])==null?void 0:o.fullpath:"/")+"",r,i;return{c(){e=Z('Create a new Folder in "'),r=Z(n),i=Z('"')},m(u,l){w(u,e,l),w(u,r,l),w(u,i,l)},p(u,l){var a,f;l&8&&n!==(n=((a=u[3])!=null&&a.fullpath?(f=u[3])==null?void 0:f.fullpath:"/")+"")&&je(r,n)},d(u){u&&(E(e),E(r),E(i))}}}function hu(t){let e,n;return{c(){e=D("span"),n=Z(t[2]),I(e,"data-form-field-error","")},m(r,i){w(r,e,i),F(e,n)},p(r,i){i&4&&je(n,r[2])},d(r){r&&E(e)}}}function ng(t){let e;return{c(){e=Z("Don't create")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function rg(t){let e,n,r,i,s,o,u,l,a,f,c,d,p,m,_,v;e=new Tt({props:{$$slots:{default:[tg]},$$scope:{ctx:t}}});let g=t[2]&&hu(t);return c=new Mt({props:{"data-button":!0,$$slots:{default:[ng]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=j(),r=D("form"),i=D("label"),s=D("span"),s.textContent="New Folder Name",o=j(),u=D("input"),l=j(),g&&g.c(),a=j(),f=D("div"),H(c.$$.fragment),d=j(),p=D("button"),p.textContent="Create",I(s,"data-form-field-label",""),I(u,"type","text"),I(u,"data-form-field-text",""),I(p,"type","submit"),I(p,"data-button",""),I(f,"data-dialog-buttons",""),I(r,"data-dialog-content-area","")},m(h,k){M(e,h,k),w(h,n,k),w(h,r,k),F(r,i),F(i,s),F(i,o),F(i,u),it(u,t[1]),F(i,l),g&&g.m(i,null),F(r,a),F(r,f),M(c,f,null),F(f,d),F(f,p),m=!0,_||(v=[G(u,"input",t[7]),G(r,"submit",t[5])],_=!0)},p(h,k){const A={};k&2056&&(A.$$scope={dirty:k,ctx:h}),e.$set(A),k&2&&u.value!==h[1]&&it(u,h[1]),h[2]?g?g.p(h,k):(g=hu(h),g.c(),g.m(i,null)):g&&(g.d(1),g=null);const S={};k&2048&&(S.$$scope={dirty:k,ctx:h}),c.$set(S)},i(h){m||(b(e.$$.fragment,h),b(c.$$.fragment,h),m=!0)},o(h){y(e.$$.fragment,h),y(c.$$.fragment,h),m=!1},d(h){h&&(E(n),E(r)),N(e,h),g&&g.d(),N(c),_=!1,Te(v)}}}function ig(t){let e,n,r;function i(o){t[8](o)}let s={onOpenChange:t[6],$$slots:{default:[rg]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Ut(e,"open",i)),{c(){H(e.$$.fragment)},m(o,u){M(e,o,u),r=!0},p(o,[u]){const l={};u&2062&&(l.$$scope={dirty:u,ctx:o}),!n&&u&1&&(n=!0,l.open=o[0],Vt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){y(e.$$.fragment,o),r=!1},d(o){N(e,o)}}}function sg(t,e,n){let r,i;J(t,ft,m=>n(3,i=m));const s=vt(),o=kt();J(t,o,m=>n(9,r=m));let u=!1,l="",a="";async function f(m){if(m.preventDefault(),l.trim()==="")n(2,a="Please enter a folder name");else{const _=await fetch("/api/branches/"+(r==null?void 0:r.id)+"/files/"+(i==null?void 0:i.fullpath)+"/"+l.trim(),{method:"POST",headers:{"X-uEditor-New-Type":"folder"}});_.ok?(n(0,u=!1),s.invalidateQueries({queryKey:["branches",r==null?void 0:r.id,"files/"]}),Ge.set(Ae.NONE)):(n(2,a=(await _.json()).detail[0].msg),n(2,a=a[0].toUpperCase()+a.substring(1)))}}function c(m){m?(n(1,l=""),n(2,a="")):Ge.set(Ae.NONE)}function d(){l=this.value,n(1,l)}function p(m){u=m,n(0,u)}return[u,l,a,i,o,f,c,d,p]}let og=class extends ve{constructor(e){super(),ye(this,e,sg,ig,fe,{})}};function lg(t){var s;let e,n,r=((s=t[3])==null?void 0:s.fullpath)+"",i;return{c(){e=Z("Delete "),n=D("span"),i=Z(r),I(n,"class","font-bold")},m(o,u){w(o,e,u),w(o,n,u),F(n,i)},p(o,u){var l;u&8&&r!==(r=((l=o[3])==null?void 0:l.fullpath)+"")&&je(i,r)},d(o){o&&(E(e),E(n))}}}function _u(t){let e,n;return{c(){e=D("span"),n=Z(t[1]),I(e,"data-form-field-error","")},m(r,i){w(r,e,i),F(e,n)},p(r,i){i&2&&je(n,r[1])},d(r){r&&E(e)}}}function ug(t){let e;return{c(){e=Z("Don't delete")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function ag(t){var W;let e,n,r,i,s,o,u=((W=t[3])==null?void 0:W.fullpath)+"",l,a,f,c,d,p,m,_,v,g,h,k,A,S,C,L;e=new Tt({props:{class:"bg-rose-700",$$slots:{default:[lg]},$$scope:{ctx:t}}});let R=t[1]&&_u(t);return h=new Mt({props:{"data-button":!0,$$slots:{default:[ug]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=j(),r=D("form"),i=D("p"),s=Z("Please confirm you wish to delete the folder "),o=D("span"),l=Z(u),a=Z(`
|
|
16
|
-
and all the files and folders within that. To confirm the action, please enter
|
|
17
|
-
the name of the folder to delete.`),f=j(),c=D("label"),d=D("span"),d.textContent="Confirmation Folder Name",p=j(),m=D("input"),_=j(),R&&R.c(),v=j(),g=D("div"),H(h.$$.fragment),k=j(),A=D("button"),A.textContent="Delete",I(o,"class","inline-block mx-1 px-2 border border-fuchsia-700 rounded font-bold"),I(i,"class","mb-4"),I(d,"data-form-field-label",""),I(m,"type","text"),I(m,"data-form-field-text",""),I(c,"class","block"),I(A,"type","submit"),I(A,"data-button",""),I(A,"class","border-rose-700 hover:bg-rose-700 focus:bg-rose-700"),I(g,"data-dialog-buttons",""),I(r,"data-dialog-content-area","")},m(K,T){M(e,K,T),w(K,n,T),w(K,r,T),F(r,i),F(i,s),F(i,o),F(o,l),F(i,a),F(r,f),F(r,c),F(c,d),F(c,p),F(c,m),it(m,t[2]),F(c,_),R&&R.m(c,null),F(r,v),F(r,g),M(h,g,null),F(g,k),F(g,A),S=!0,C||(L=[G(m,"input",t[7]),G(r,"submit",t[5])],C=!0)},p(K,T){var P;const B={};T&2056&&(B.$$scope={dirty:T,ctx:K}),e.$set(B),(!S||T&8)&&u!==(u=((P=K[3])==null?void 0:P.fullpath)+"")&&je(l,u),T&4&&m.value!==K[2]&&it(m,K[2]),K[1]?R?R.p(K,T):(R=_u(K),R.c(),R.m(c,null)):R&&(R.d(1),R=null);const O={};T&2048&&(O.$$scope={dirty:T,ctx:K}),h.$set(O)},i(K){S||(b(e.$$.fragment,K),b(h.$$.fragment,K),S=!0)},o(K){y(e.$$.fragment,K),y(h.$$.fragment,K),S=!1},d(K){K&&(E(n),E(r)),N(e,K),R&&R.d(),N(h),C=!1,Te(L)}}}function fg(t){let e,n,r;function i(o){t[8](o)}let s={onOpenChange:t[6],$$slots:{default:[ag]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Ut(e,"open",i)),{c(){H(e.$$.fragment)},m(o,u){M(e,o,u),r=!0},p(o,[u]){const l={};u&2062&&(l.$$scope={dirty:u,ctx:o}),!n&&u&1&&(n=!0,l.open=o[0],Vt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){y(e.$$.fragment,o),r=!1},d(o){N(e,o)}}}function cg(t,e,n){let r,i;J(t,ft,m=>n(3,i=m));const s=vt(),o=kt();J(t,o,m=>n(9,r=m));let u=!1,l="",a="";async function f(m){m.preventDefault(),n(1,l=""),a===(i==null?void 0:i.fullpath)||a==(i==null?void 0:i.name)?(await fetch("/api/branches/"+(r==null?void 0:r.id)+"/files/"+i.fullpath,{method:"DELETE"})).ok&&(s.invalidateQueries({queryKey:["branches",r==null?void 0:r.id,"files/"]}),ft.set(null),n(0,u=!1),Ge.set(Ae.NONE)):n(1,l="Please check that you have typed in the correct name.")}function c(m){m?(n(2,a=""),n(1,l="")):Ge.set(Ae.NONE)}function d(){a=this.value,n(2,a)}function p(m){u=m,n(0,u)}return[u,l,a,i,o,f,c,d,p]}let cf=class extends ve{constructor(e){super(),ye(this,e,cg,fg,fe,{})}};function dg(t){var s,o;let e,n=((s=t[3])!=null&&s.fullpath?(o=t[3])==null?void 0:o.fullpath:"/")+"",r,i;return{c(){e=Z('Rename "'),r=Z(n),i=Z('"')},m(u,l){w(u,e,l),w(u,r,l),w(u,i,l)},p(u,l){var a,f;l&8&&n!==(n=((a=u[3])!=null&&a.fullpath?(f=u[3])==null?void 0:f.fullpath:"/")+"")&&je(r,n)},d(u){u&&(E(e),E(r),E(i))}}}function gu(t){let e,n;return{c(){e=D("span"),n=Z(t[2]),I(e,"data-form-field-error","")},m(r,i){w(r,e,i),F(e,n)},p(r,i){i&4&&je(n,r[2])},d(r){r&&E(e)}}}function mg(t){let e;return{c(){e=Z("Don't rename")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function pg(t){let e,n,r,i,s,o,u,l,a,f,c,d,p,m,_,v;e=new Tt({props:{$$slots:{default:[dg]},$$scope:{ctx:t}}});let g=t[2]&&gu(t);return c=new Mt({props:{"data-button":!0,$$slots:{default:[mg]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=j(),r=D("form"),i=D("label"),s=D("span"),s.textContent="New Folder Name",o=j(),u=D("input"),l=j(),g&&g.c(),a=j(),f=D("div"),H(c.$$.fragment),d=j(),p=D("button"),p.textContent="Rename",I(s,"data-form-field-label",""),I(u,"type","text"),I(u,"data-form-field-text",""),I(p,"type","submit"),I(p,"data-button",""),I(f,"data-dialog-buttons",""),I(r,"data-dialog-content-area","")},m(h,k){M(e,h,k),w(h,n,k),w(h,r,k),F(r,i),F(i,s),F(i,o),F(i,u),it(u,t[1]),F(i,l),g&&g.m(i,null),F(r,a),F(r,f),M(c,f,null),F(f,d),F(f,p),m=!0,_||(v=[G(u,"input",t[7]),G(r,"submit",t[5])],_=!0)},p(h,k){const A={};k&2056&&(A.$$scope={dirty:k,ctx:h}),e.$set(A),k&2&&u.value!==h[1]&&it(u,h[1]),h[2]?g?g.p(h,k):(g=gu(h),g.c(),g.m(i,null)):g&&(g.d(1),g=null);const S={};k&2048&&(S.$$scope={dirty:k,ctx:h}),c.$set(S)},i(h){m||(b(e.$$.fragment,h),b(c.$$.fragment,h),m=!0)},o(h){y(e.$$.fragment,h),y(c.$$.fragment,h),m=!1},d(h){h&&(E(n),E(r)),N(e,h),g&&g.d(),N(c),_=!1,Te(v)}}}function hg(t){let e,n,r;function i(o){t[8](o)}let s={onOpenChange:t[6],$$slots:{default:[pg]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Ut(e,"open",i)),{c(){H(e.$$.fragment)},m(o,u){M(e,o,u),r=!0},p(o,[u]){const l={};u&2062&&(l.$$scope={dirty:u,ctx:o}),!n&&u&1&&(n=!0,l.open=o[0],Vt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){y(e.$$.fragment,o),r=!1},d(o){N(e,o)}}}function _g(t,e,n){let r,i;J(t,ft,m=>n(3,i=m));const s=vt(),o=kt();J(t,o,m=>n(9,r=m));let u=!1,l="",a="";async function f(m){if(m.preventDefault(),l.trim()==="")n(2,a="Please enter a folder name");else if(i!=null&&i.fullpath){const _=i.fullpath.split("/").slice(0,i.fullpath.split("/").length-1).join("/"),v=await fetch("/api/branches/"+(r==null?void 0:r.id)+"/files/"+_+"/"+l.trim(),{method:"POST",headers:{"X-uEditor-New-Type":"folder","X-uEditor-Rename-From":i==null?void 0:i.fullpath}});v.ok?(n(0,u=!1),s.invalidateQueries({queryKey:["branches",r==null?void 0:r.id,"files/"]}),ft.set(null),Ge.set(Ae.NONE)):(n(2,a=(await v.json()).detail[0].msg),n(2,a=a[0].toUpperCase()+a.substring(1)))}else n(2,a="Cannot rename the root folder")}function c(m){m?(n(1,l=""),n(2,a="")):Ge.set(Ae.NONE)}function d(){l=this.value,n(1,l)}function p(m){u=m,n(0,u)}return[u,l,a,i,o,f,c,d,p]}let gg=class extends ve{constructor(e){super(),ye(this,e,_g,hg,fe,{})}};function bg(t){var s,o;let e,n=((s=t[3])!=null&&s.fullpath?(o=t[3])==null?void 0:o.fullpath:"/")+"",r,i;return{c(){e=Z('Create a new File in "'),r=Z(n),i=Z('"')},m(u,l){w(u,e,l),w(u,r,l),w(u,i,l)},p(u,l){var a,f;l&8&&n!==(n=((a=u[3])!=null&&a.fullpath?(f=u[3])==null?void 0:f.fullpath:"/")+"")&&je(r,n)},d(u){u&&(E(e),E(r),E(i))}}}function bu(t){let e,n;return{c(){e=D("span"),n=Z(t[2]),I(e,"data-form-field-error","")},m(r,i){w(r,e,i),F(e,n)},p(r,i){i&4&&je(n,r[2])},d(r){r&&E(e)}}}function yg(t){let e;return{c(){e=Z("Don't create")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function vg(t){let e,n,r,i,s,o,u,l,a,f,c,d,p,m,_,v;e=new Tt({props:{$$slots:{default:[bg]},$$scope:{ctx:t}}});let g=t[2]&&bu(t);return c=new Mt({props:{"data-button":!0,$$slots:{default:[yg]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=j(),r=D("form"),i=D("label"),s=D("span"),s.textContent="New Filename",o=j(),u=D("input"),l=j(),g&&g.c(),a=j(),f=D("div"),H(c.$$.fragment),d=j(),p=D("button"),p.textContent="Create",I(s,"data-form-field-label",""),I(u,"type","text"),I(u,"data-form-field-text",""),I(p,"type","submit"),I(p,"data-button",""),I(f,"data-dialog-buttons",""),I(r,"data-dialog-content-area","")},m(h,k){M(e,h,k),w(h,n,k),w(h,r,k),F(r,i),F(i,s),F(i,o),F(i,u),it(u,t[1]),F(i,l),g&&g.m(i,null),F(r,a),F(r,f),M(c,f,null),F(f,d),F(f,p),m=!0,_||(v=[G(u,"input",t[7]),G(r,"submit",t[5])],_=!0)},p(h,k){const A={};k&2056&&(A.$$scope={dirty:k,ctx:h}),e.$set(A),k&2&&u.value!==h[1]&&it(u,h[1]),h[2]?g?g.p(h,k):(g=bu(h),g.c(),g.m(i,null)):g&&(g.d(1),g=null);const S={};k&2048&&(S.$$scope={dirty:k,ctx:h}),c.$set(S)},i(h){m||(b(e.$$.fragment,h),b(c.$$.fragment,h),m=!0)},o(h){y(e.$$.fragment,h),y(c.$$.fragment,h),m=!1},d(h){h&&(E(n),E(r)),N(e,h),g&&g.d(),N(c),_=!1,Te(v)}}}function kg(t){let e,n,r;function i(o){t[8](o)}let s={onOpenChange:t[6],$$slots:{default:[vg]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Ut(e,"open",i)),{c(){H(e.$$.fragment)},m(o,u){M(e,o,u),r=!0},p(o,[u]){const l={};u&2062&&(l.$$scope={dirty:u,ctx:o}),!n&&u&1&&(n=!0,l.open=o[0],Vt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){y(e.$$.fragment,o),r=!1},d(o){N(e,o)}}}function Cg(t,e,n){let r,i;J(t,ft,m=>n(3,i=m));const s=vt(),o=kt();J(t,o,m=>n(9,r=m));let u=!1,l="",a="";async function f(m){if(m.preventDefault(),l.trim()==="")n(2,a="Please enter a filename");else{const _=await fetch("/api/branches/"+(r==null?void 0:r.id)+"/files/"+(i==null?void 0:i.fullpath)+"/"+l,{method:"POST",headers:{"X-uEditor-New-Type":"file"}});_.ok?(n(0,u=!1),s.invalidateQueries({queryKey:["branches",r==null?void 0:r.id,"files/"]}),Ge.set(Ae.NONE)):(n(2,a=(await _.json()).detail[0].msg),n(2,a=a[0].toUpperCase()+a.substring(1)))}}function c(m){m?(n(1,l=""),n(2,a="")):Ge.set(Ae.NONE)}function d(){l=this.value,n(1,l)}function p(m){u=m,n(0,u)}return[u,l,a,i,o,f,c,d,p]}class Eg extends ve{constructor(e){super(),ye(this,e,Cg,kg,fe,{})}}function wg(t){var s;let e,n,r=((s=t[3])==null?void 0:s.fullpath)+"",i;return{c(){e=Z("Delete "),n=D("span"),i=Z(r),I(n,"class","font-bold")},m(o,u){w(o,e,u),w(o,n,u),F(n,i)},p(o,u){var l;u&8&&r!==(r=((l=o[3])==null?void 0:l.fullpath)+"")&&je(i,r)},d(o){o&&(E(e),E(n))}}}function yu(t){let e,n;return{c(){e=D("span"),n=Z(t[1]),I(e,"data-form-field-error","")},m(r,i){w(r,e,i),F(e,n)},p(r,i){i&2&&je(n,r[1])},d(r){r&&E(e)}}}function Og(t){let e;return{c(){e=Z("Don't delete")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function Ag(t){var W;let e,n,r,i,s,o,u=((W=t[3])==null?void 0:W.fullpath)+"",l,a,f,c,d,p,m,_,v,g,h,k,A,S,C,L;e=new Tt({props:{class:"bg-rose-700",$$slots:{default:[wg]},$$scope:{ctx:t}}});let R=t[1]&&yu(t);return h=new Mt({props:{"data-button":!0,$$slots:{default:[Og]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=j(),r=D("form"),i=D("p"),s=Z("Please confirm you wish to delete the file "),o=D("span"),l=Z(u),a=Z(". To confirm the action, please enter the name of the file to delete."),f=j(),c=D("label"),d=D("span"),d.textContent="Confirm filename",p=j(),m=D("input"),_=j(),R&&R.c(),v=j(),g=D("div"),H(h.$$.fragment),k=j(),A=D("button"),A.textContent="Delete",I(o,"class","inline-block mx-1 px-2 border border-fuchsia-700 rounded font-bold"),I(i,"class","mb-4"),I(d,"data-form-field-label",""),I(m,"type","text"),I(m,"data-form-field-text",""),I(c,"class","block"),I(A,"type","submit"),I(A,"data-button",""),I(A,"class","border-rose-700 hover:bg-rose-700 focus:bg-rose-700"),I(g,"data-dialog-buttons",""),I(r,"data-dialog-content-area","")},m(K,T){M(e,K,T),w(K,n,T),w(K,r,T),F(r,i),F(i,s),F(i,o),F(o,l),F(i,a),F(r,f),F(r,c),F(c,d),F(c,p),F(c,m),it(m,t[2]),F(c,_),R&&R.m(c,null),F(r,v),F(r,g),M(h,g,null),F(g,k),F(g,A),S=!0,C||(L=[G(m,"input",t[7]),G(r,"submit",t[5])],C=!0)},p(K,T){var P;const B={};T&2056&&(B.$$scope={dirty:T,ctx:K}),e.$set(B),(!S||T&8)&&u!==(u=((P=K[3])==null?void 0:P.fullpath)+"")&&je(l,u),T&4&&m.value!==K[2]&&it(m,K[2]),K[1]?R?R.p(K,T):(R=yu(K),R.c(),R.m(c,null)):R&&(R.d(1),R=null);const O={};T&2048&&(O.$$scope={dirty:T,ctx:K}),h.$set(O)},i(K){S||(b(e.$$.fragment,K),b(h.$$.fragment,K),S=!0)},o(K){y(e.$$.fragment,K),y(h.$$.fragment,K),S=!1},d(K){K&&(E(n),E(r)),N(e,K),R&&R.d(),N(h),C=!1,Te(L)}}}function Tg(t){let e,n,r;function i(o){t[8](o)}let s={onOpenChange:t[6],$$slots:{default:[Ag]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Ut(e,"open",i)),{c(){H(e.$$.fragment)},m(o,u){M(e,o,u),r=!0},p(o,[u]){const l={};u&2062&&(l.$$scope={dirty:u,ctx:o}),!n&&u&1&&(n=!0,l.open=o[0],Vt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){y(e.$$.fragment,o),r=!1},d(o){N(e,o)}}}function $g(t,e,n){let r,i;J(t,ft,m=>n(3,i=m));const s=vt(),o=kt();J(t,o,m=>n(9,r=m));let u=!1,l="",a="";async function f(m){m.preventDefault(),n(1,l=""),a===(i==null?void 0:i.fullpath)||a==(i==null?void 0:i.name)?(await fetch("/api/branches/"+(r==null?void 0:r.id)+"/files/"+i.fullpath,{method:"DELETE"})).ok&&(s.invalidateQueries({queryKey:["branches",r==null?void 0:r.id,"files/"]}),ft.set(null),n(0,u=!1),Ge.set(Ae.NONE)):n(1,l="Please check that you have typed in the correct name.")}function c(m){m?(n(2,a=""),n(1,l="")):Ge.set(Ae.NONE)}function d(){a=this.value,n(2,a)}function p(m){u=m,n(0,u)}return[u,l,a,i,o,f,c,d,p]}class Sg extends ve{constructor(e){super(),ye(this,e,$g,Tg,fe,{})}}function Rg(t){var s,o;let e,n=((s=t[3])!=null&&s.fullpath?(o=t[3])==null?void 0:o.fullpath:"/")+"",r,i;return{c(){e=Z('Rename "'),r=Z(n),i=Z('"')},m(u,l){w(u,e,l),w(u,r,l),w(u,i,l)},p(u,l){var a,f;l&8&&n!==(n=((a=u[3])!=null&&a.fullpath?(f=u[3])==null?void 0:f.fullpath:"/")+"")&&je(r,n)},d(u){u&&(E(e),E(r),E(i))}}}function vu(t){let e,n;return{c(){e=D("span"),n=Z(t[2]),I(e,"data-form-field-error","")},m(r,i){w(r,e,i),F(e,n)},p(r,i){i&4&&je(n,r[2])},d(r){r&&E(e)}}}function Dg(t){let e;return{c(){e=Z("Don't rename")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function Fg(t){let e,n,r,i,s,o,u,l,a,f,c,d,p,m,_,v;e=new Tt({props:{$$slots:{default:[Rg]},$$scope:{ctx:t}}});let g=t[2]&&vu(t);return c=new Mt({props:{"data-button":!0,$$slots:{default:[Dg]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=j(),r=D("form"),i=D("label"),s=D("span"),s.textContent="New Filename",o=j(),u=D("input"),l=j(),g&&g.c(),a=j(),f=D("div"),H(c.$$.fragment),d=j(),p=D("button"),p.textContent="Rename",I(s,"data-form-field-label",""),I(u,"type","text"),I(u,"data-form-field-text",""),I(p,"type","submit"),I(p,"data-button",""),I(f,"data-dialog-buttons",""),I(r,"data-dialog-content-area","")},m(h,k){M(e,h,k),w(h,n,k),w(h,r,k),F(r,i),F(i,s),F(i,o),F(i,u),it(u,t[1]),F(i,l),g&&g.m(i,null),F(r,a),F(r,f),M(c,f,null),F(f,d),F(f,p),m=!0,_||(v=[G(u,"input",t[7]),G(r,"submit",t[5])],_=!0)},p(h,k){const A={};k&2056&&(A.$$scope={dirty:k,ctx:h}),e.$set(A),k&2&&u.value!==h[1]&&it(u,h[1]),h[2]?g?g.p(h,k):(g=vu(h),g.c(),g.m(i,null)):g&&(g.d(1),g=null);const S={};k&2048&&(S.$$scope={dirty:k,ctx:h}),c.$set(S)},i(h){m||(b(e.$$.fragment,h),b(c.$$.fragment,h),m=!0)},o(h){y(e.$$.fragment,h),y(c.$$.fragment,h),m=!1},d(h){h&&(E(n),E(r)),N(e,h),g&&g.d(),N(c),_=!1,Te(v)}}}function Pg(t){let e,n,r;function i(o){t[8](o)}let s={onOpenChange:t[6],$$slots:{default:[Fg]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Ut(e,"open",i)),{c(){H(e.$$.fragment)},m(o,u){M(e,o,u),r=!0},p(o,[u]){const l={};u&2062&&(l.$$scope={dirty:u,ctx:o}),!n&&u&1&&(n=!0,l.open=o[0],Vt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){y(e.$$.fragment,o),r=!1},d(o){N(e,o)}}}function Lg(t,e,n){let r,i;J(t,ft,m=>n(3,i=m));const s=vt(),o=kt();J(t,o,m=>n(9,r=m));let u=!1,l="",a="";async function f(m){if(m.preventDefault(),l.trim()==="")n(2,a="Please enter a folder name");else if(i!=null&&i.fullpath){const _=i.fullpath.split("/").slice(0,i.fullpath.split("/").length-1).join("/"),v=await fetch("/api/branches/"+(r==null?void 0:r.id)+"/files/"+_+"/"+l.trim(),{method:"POST",headers:{"X-uEditor-New-Type":"file","X-uEditor-Rename-From":i==null?void 0:i.fullpath}});v.ok?(n(0,u=!1),s.invalidateQueries({queryKey:["branches",r==null?void 0:r.id,"files/"]}),ft.set(null),Ge.set(Ae.NONE)):(n(2,a=(await v.json()).detail[0].msg),n(2,a=a[0].toUpperCase()+a.substring(1)))}else n(2,a="Cannot rename the root folder")}function c(m){m?(n(1,l=""),n(2,a="")):Ge.set(Ae.NONE)}function d(){l=this.value,n(1,l)}function p(m){u=m,n(0,u)}return[u,l,a,i,o,f,c,d,p]}class Ig extends ve{constructor(e){super(),ye(this,e,Lg,Pg,fe,{})}}function ku(t,e,n){const r=t.slice();return r[21]=e[n][0],r[22]=e[n][1],r}function Mg(t){let e;return{c(){e=Z("Upload")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function Ng(t){let e;return{c(){e=Z("Uploading")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function Hg(t){var l,a;let e,n=((l=t[6])!=null&&l.fullpath?(a=t[6])==null?void 0:a.fullpath:"/")+"",r,i;function s(f,c){return f[4].length>0?Ng:Mg}let o=s(t),u=o(t);return{c(){u.c(),e=Z(' Files to "'),r=Z(n),i=Z('"')},m(f,c){u.m(f,c),w(f,e,c),w(f,r,c),w(f,i,c)},p(f,c){var d,p;o!==(o=s(f))&&(u.d(1),u=o(f),u&&(u.c(),u.m(e.parentNode,e))),c&64&&n!==(n=((d=f[6])!=null&&d.fullpath?(p=f[6])==null?void 0:p.fullpath:"/")+"")&&je(r,n)},d(f){f&&(E(e),E(r),E(i)),u.d(f)}}}function Vg(t){let e,n,r,i,s,o,u=tn(t[4]),l=[];for(let f=0;f<u.length;f+=1)l[f]=Cu(ku(t,u,f));const a=f=>y(l[f],1,1,()=>{l[f]=null});return s=new Mt({props:{"data-button":!0,$$slots:{default:[zg]},$$scope:{ctx:t}}}),{c(){e=D("div"),n=D("ul");for(let f=0;f<l.length;f+=1)l[f].c();r=j(),i=D("div"),H(s.$$.fragment),I(i,"data-dialog-buttons",""),I(e,"data-dialog-content-area","")},m(f,c){w(f,e,c),F(e,n);for(let d=0;d<l.length;d+=1)l[d]&&l[d].m(n,null);F(e,r),F(e,i),M(s,i,null),o=!0},p(f,c){if(c&144){u=tn(f[4]);let p;for(p=0;p<u.length;p+=1){const m=ku(f,u,p);l[p]?(l[p].p(m,c),b(l[p],1)):(l[p]=Cu(m),l[p].c(),b(l[p],1),l[p].m(n,null))}for(de(),p=u.length;p<l.length;p+=1)a(p);me()}const d={};c&33554464&&(d.$$scope={dirty:c,ctx:f}),s.$set(d)},i(f){if(!o){for(let c=0;c<u.length;c+=1)b(l[c]);b(s.$$.fragment,f),o=!0}},o(f){l=l.filter(Boolean);for(let c=0;c<l.length;c+=1)y(l[c]);y(s.$$.fragment,f),o=!1},d(f){f&&E(e),ci(l,f),N(s)}}}function Ug(t){let e,n,r,i,s,o,u,l,a,f,c,d,p,m;return a=new Mt({props:{"data-button":!0,$$slots:{default:[Gg]},$$scope:{ctx:t}}}),{c(){e=D("form"),n=D("label"),r=D("span"),r.textContent="Drop a file to upload or click to select a file to upload.",i=j(),s=D("input"),u=j(),l=D("div"),H(a.$$.fragment),f=j(),c=D("button"),c.textContent="Upload",I(s,"type","file"),I(s,"class","sr-only"),I(n,"class",o="flex justify-center items-center h-20 border-fuchsia-700 border-2 "+(t[2]?"border-solid":"border-dashed")+" rounded"),I(c,"type","submit"),I(c,"data-button",""),I(c,"class","sr-only"),I(l,"data-dialog-buttons",""),I(e,"data-dialog-content-area","")},m(_,v){w(_,e,v),F(e,n),F(n,r),F(n,i),F(n,s),t[12](s),F(e,u),F(e,l),M(a,l,null),F(l,f),F(l,c),t[16](c),d=!0,p||(m=[G(s,"change",t[13]),G(n,"drop",t[11]),G(n,"dragover",t[14]),G(n,"dragleave",t[15]),G(e,"submit",t[10])],p=!0)},p(_,v){(!d||v&4&&o!==(o="flex justify-center items-center h-20 border-fuchsia-700 border-2 "+(_[2]?"border-solid":"border-dashed")+" rounded"))&&I(n,"class",o);const g={};v&33554432&&(g.$$scope={dirty:v,ctx:_}),a.$set(g)},i(_){d||(b(a.$$.fragment,_),d=!0)},o(_){y(a.$$.fragment,_),d=!1},d(_){_&&E(e),t[12](null),N(a),t[16](null),p=!1,Te(m)}}}function Bg(t){let e,n,r,i;return r=new Ne({props:{path:T1,class:"w-6 h-6 text-rose-700"}}),{c(){e=D("span"),e.textContent="failed to upload",n=j(),H(r.$$.fragment),I(e,"class","sr-only")},m(s,o){w(s,e,o),w(s,n,o),M(r,s,o),i=!0},i(s){i||(b(r.$$.fragment,s),i=!0)},o(s){y(r.$$.fragment,s),i=!1},d(s){s&&(E(e),E(n)),N(r,s)}}}function Kg(t){let e,n,r,i;return r=new Ne({props:{path:O1,class:"w-6 h-6 text-lime-500"}}),{c(){e=D("span"),e.textContent="successfully uploaded",n=j(),H(r.$$.fragment),I(e,"class","sr-only")},m(s,o){w(s,e,o),w(s,n,o),M(r,s,o),i=!0},i(s){i||(b(r.$$.fragment,s),i=!0)},o(s){y(r.$$.fragment,s),i=!1},d(s){s&&(E(e),E(n)),N(r,s)}}}function jg(t){let e,n,r,i;return r=new Ne({props:{path:zt,class:"w-6 h-6 animate-spin text-fuchsia-700"}}),{c(){e=D("span"),e.textContent="uploading",n=j(),H(r.$$.fragment),I(e,"class","sr-only")},m(s,o){w(s,e,o),w(s,n,o),M(r,s,o),i=!0},i(s){i||(b(r.$$.fragment,s),i=!0)},o(s){y(r.$$.fragment,s),i=!1},d(s){s&&(E(e),E(n)),N(r,s)}}}function qg(t){let e,n,r,i;return r=new Ne({props:{path:W1}}),{c(){e=D("span"),e.textContent="waiting to upload",n=j(),H(r.$$.fragment),I(e,"class","sr-only")},m(s,o){w(s,e,o),w(s,n,o),M(r,s,o),i=!0},i(s){i||(b(r.$$.fragment,s),i=!0)},o(s){y(r.$$.fragment,s),i=!1},d(s){s&&(E(e),E(n)),N(r,s)}}}function Cu(t){let e,n,r=t[21].name+"",i,s,o,u,l,a;const f=[qg,jg,Kg,Bg],c=[];function d(p,m){return p[22]===p[7].READY?0:p[22]==p[7].ACTIVE?1:p[22]===p[7].SUCCESS?2:p[22]===p[7].FAILED?3:-1}return~(o=d(t))&&(u=c[o]=f[o](t)),{c(){e=D("li"),n=D("span"),i=Z(r),s=j(),u&&u.c(),l=j(),I(n,"class","flex-1"),I(e,"class","flex flex-row space-x-4")},m(p,m){w(p,e,m),F(e,n),F(n,i),F(e,s),~o&&c[o].m(e,null),F(e,l),a=!0},p(p,m){(!a||m&16)&&r!==(r=p[21].name+"")&&je(i,r);let _=o;o=d(p),o!==_&&(u&&(de(),y(c[_],1,1,()=>{c[_]=null}),me()),~o?(u=c[o],u||(u=c[o]=f[o](p),u.c()),b(u,1),u.m(e,l)):u=null)},i(p){a||(b(u),a=!0)},o(p){y(u),a=!1},d(p){p&&E(e),~o&&c[o].d()}}}function Wg(t){let e;return{c(){e=Z("Cancel upload")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function Qg(t){let e;return{c(){e=Z("Close")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function zg(t){let e;function n(s,o){return s[5]?Qg:Wg}let r=n(t),i=r(t);return{c(){i.c(),e=$e()},m(s,o){i.m(s,o),w(s,e,o)},p(s,o){r!==(r=n(s))&&(i.d(1),i=r(s),i&&(i.c(),i.m(e.parentNode,e)))},d(s){s&&E(e),i.d(s)}}}function Gg(t){let e;return{c(){e=Z("Don't upload")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function Yg(t){let e,n,r,i,s,o;e=new Tt({props:{$$slots:{default:[Hg]},$$scope:{ctx:t}}});const u=[Ug,Vg],l=[];function a(f,c){return f[4].length===0?0:1}return r=a(t),i=l[r]=u[r](t),{c(){H(e.$$.fragment),n=j(),i.c(),s=$e()},m(f,c){M(e,f,c),w(f,n,c),l[r].m(f,c),w(f,s,c),o=!0},p(f,c){const d={};c&33554512&&(d.$$scope={dirty:c,ctx:f}),e.$set(d);let p=r;r=a(f),r===p?l[r].p(f,c):(de(),y(l[p],1,1,()=>{l[p]=null}),me(),i=l[r],i?i.p(f,c):(i=l[r]=u[r](f),i.c()),b(i,1),i.m(s.parentNode,s))},i(f){o||(b(e.$$.fragment,f),b(i),o=!0)},o(f){y(e.$$.fragment,f),y(i),o=!1},d(f){f&&(E(n),E(s)),N(e,f),l[r].d(f)}}}function Zg(t){let e,n,r;function i(o){t[17](o)}let s={onOpenChange:t[9],$$slots:{default:[Yg]},$$scope:{ctx:t}};return t[3]!==void 0&&(s.open=t[3]),e=new Gt({props:s}),Ce.push(()=>Ut(e,"open",i)),{c(){H(e.$$.fragment)},m(o,u){M(e,o,u),r=!0},p(o,[u]){const l={};u&33554551&&(l.$$scope={dirty:u,ctx:o}),!n&&u&8&&(n=!0,l.open=o[3],Vt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){y(e.$$.fragment,o),r=!1},d(o){N(e,o)}}}function Xg(t,e,n){let r,i;J(t,ft,R=>n(6,i=R));var s=(R=>(R[R.READY=0]="READY",R[R.ACTIVE=1]="ACTIVE",R[R.SUCCESS=2]="SUCCESS",R[R.FAILED=3]="FAILED",R))(s||{});const o=vt(),u=kt();J(t,u,R=>n(18,r=R));let l=null,a=null,f=!1,c=!1,d=[],p=!1;function m(R){R||Ge.set(Ae.NONE)}async function _(R){if(R.preventDefault(),l&&l.files){n(4,d=[]);for(let W of l.files)d.push([W,0]);d.length>0&&g()}}async function v(R){if(R.preventDefault(),n(4,d=[]),R.dataTransfer&&R.dataTransfer.items){for(let W of R.dataTransfer.items)if(W.kind==="file"){const K=W.getAsFile();K!==null&&d.push([K,0])}d.length>0&&g()}}async function g(){n(5,p=!1);for(let R of d){if(!c)break;if(R[1]=1,n(4,d),(await fetch("/api/branches/"+(r==null?void 0:r.id)+"/files/"+(i==null?void 0:i.fullpath)+"/"+R[0].name,{method:"POST",headers:{"X-uEditor-New-Type":"file"}})).ok){const K=new FormData;K.append("content",R[0]),(await fetch("/api/branches/"+(r==null?void 0:r.id)+"/files/"+(i==null?void 0:i.fullpath)+"/"+R[0].name,{method:"PUT",body:K})).ok?R[1]=2:R[1]=3,n(4,d)}else R[1]=3,n(4,d)}o.invalidateQueries({queryKey:["branches",r==null?void 0:r.id,"files/"]}),n(5,p=!0)}function h(R){Ce[R?"unshift":"push"](()=>{l=R,n(0,l)})}const k=()=>{a&&a.click()},A=R=>{R.preventDefault(),n(2,f=!0)},S=()=>{n(2,f=!1)};function C(R){Ce[R?"unshift":"push"](()=>{a=R,n(1,a)})}function L(R){c=R,n(3,c)}return[l,a,f,c,d,p,i,s,u,m,_,v,h,k,A,S,C,L]}class Jg extends ve{constructor(e){super(),ye(this,e,Xg,Zg,fe,{})}}function xg(t){let e,n;return e=new Jg({}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function eb(t){let e,n;return e=new Ig({}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function tb(t){let e,n;return e=new Sg({}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function nb(t){let e,n;return e=new Eg({}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function rb(t){let e,n;return e=new gg({}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function ib(t){let e,n;return e=new cf({}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function sb(t){let e,n;return e=new og({}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function ob(t){let e,n;return e=new eg({}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function lb(t){let e,n;return e=new H_({}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function ub(t){let e,n;return e=new Q_({}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function ab(t){let e,n;return e=new R_({}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function fb(t){let e,n,r,i;const s=[ab,ub,lb,ob,sb,ib,rb,nb,tb,eb,xg],o=[];function u(l,a){return l[0]===Ae.UEDITOR_NEW_BRANCH?0:l[0]===Ae.UEDITOR_IMPORT_REMOTE_BRANCH?1:l[0]===Ae.UEDITOR_DELETE_BRANCH?2:l[0]===Ae.UEDITOR_MERGE_FROM_DEFAULT?3:l[0]===Ae.FOLDER_CREATE?4:l[0]===Ae.FOLDER_DELETE?5:l[0]===Ae.FOLDER_RENAME?6:l[0]===Ae.FILE_CREATE?7:l[0]===Ae.FILE_DELETE?8:l[0]===Ae.FILE_RENAME?9:l[0]===Ae.FILE_UPLOAD?10:-1}return~(e=u(t))&&(n=o[e]=s[e](t)),{c(){n&&n.c(),r=$e()},m(l,a){~e&&o[e].m(l,a),w(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e!==f&&(n&&(de(),y(o[f],1,1,()=>{o[f]=null}),me()),~e?(n=o[e],n||(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r)):n=null)},i(l){i||(b(n),i=!0)},o(l){y(n),i=!1},d(l){l&&E(r),~e&&o[e].d(l)}}}var Ae=(t=>(t[t.NONE=1]="NONE",t[t.UEDITOR_NEW_BRANCH=2]="UEDITOR_NEW_BRANCH",t[t.UEDITOR_IMPORT_REMOTE_BRANCH=3]="UEDITOR_IMPORT_REMOTE_BRANCH",t[t.UEDITOR_DELETE_BRANCH=4]="UEDITOR_DELETE_BRANCH",t[t.UEDITOR_MERGE_FROM_DEFAULT=5]="UEDITOR_MERGE_FROM_DEFAULT",t[t.FOLDER_CREATE=6]="FOLDER_CREATE",t[t.FOLDER_DELETE=7]="FOLDER_DELETE",t[t.FOLDER_RENAME=8]="FOLDER_RENAME",t[t.FILE_CREATE=9]="FILE_CREATE",t[t.FILE_DELETE=10]="FILE_DELETE",t[t.FILE_RENAME=11]="FILE_RENAME",t[t.FILE_UPLOAD=12]="FILE_UPLOAD",t))(Ae||{});const Ge=Fe(1);function cb(t,e,n){let r,i=ce;return J(t,Ge,s=>n(0,r=s)),t.$$.on_destroy.push(()=>i()),[r]}let db=class extends ve{constructor(e){super(),ye(this,e,cb,fb,fe,{})}};const mb="modulepreload",pb=function(t){return"/app/"+t},Eu={},Pi=function(e,n,r){let i=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),u=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=Promise.allSettled(n.map(l=>{if(l=pb(l),l in Eu)return;Eu[l]=!0;const a=l.endsWith(".css"),f=a?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${f}`))return;const c=document.createElement("link");if(c.rel=a?"stylesheet":mb,a||(c.as="script"),c.crossOrigin="",c.href=l,u&&c.setAttribute("nonce",u),document.head.appendChild(c),a)return new Promise((d,p)=>{c.addEventListener("load",d),c.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${l}`)))})}))}function s(o){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=o,window.dispatchEvent(u),!u.defaultPrevented)throw o}return i.then(o=>{for(const u of o||[])u.status==="rejected"&&s(u.reason);return e().catch(s)})};function hb(t){let e;return{c(){e=D("div"),e.textContent="Please select a file or folder from the file-browser on the left",I(e,"class","flex-1 relative px-2 py-1 text-gray-700")},m(n,r){w(n,e,r)},p:ce,i:ce,o:ce,d(n){n&&E(e)}}}function _b(t){let e,n,r,i;const s=[yb,bb,gb],o=[];function u(l,a){return l[2]!==null?0:l[0]?1:2}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=$e()},m(l,a){o[e].m(l,a),w(l,r,a),i=!0},p(l,a){let f=e;e=u(l),e===f?o[e].p(l,a):(de(),y(o[f],1,1,()=>{o[f]=null}),me(),n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r))},i(l){i||(b(n),i=!0)},o(l){y(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function gb(t){let e,n,r=t[1].mimetype+"",i,s;return{c(){e=D("div"),n=Z("Unfortunately the μEditor does not know how to edit this file ("),i=Z(r),s=Z(")."),I(e,"class","flex-1 px-2 py-1 text-rose-700")},m(o,u){w(o,e,u),F(e,n),F(e,i),F(e,s)},p(o,u){u&2&&r!==(r=o[1].mimetype+"")&&je(i,r)},i:ce,o:ce,d(o){o&&E(e)}}}function bb(t){let e;return{c(){e=D("div"),e.textContent="Loading the editor. Please wait...",I(e,"class","flex-1 px-2 py-1")},m(n,r){w(n,e,r)},p:ce,i:ce,o:ce,d(n){n&&E(e)}}}function yb(t){let e=t[3].id,n,r,i=wu(t);return{c(){i.c(),n=$e()},m(s,o){i.m(s,o),w(s,n,o),r=!0},p(s,o){o&8&&fe(e,e=s[3].id)?(de(),y(i,1,1,ce),me(),i=wu(s),i.c(),b(i,1),i.m(n.parentNode,n)):i.p(s,o)},i(s){r||(b(i),r=!0)},o(s){y(i),r=!1},d(s){s&&E(n),i.d(s)}}}function wu(t){let e,n,r;var i=t[2];function s(o,u){return{}}return i&&(e=Mo(i,s())),{c(){e&&H(e.$$.fragment),n=$e()},m(o,u){e&&M(e,o,u),w(o,n,u),r=!0},p(o,u){if(u&4&&i!==(i=o[2])){if(e){de();const l=e;y(l.$$.fragment,1,0,()=>{N(l,1)}),me()}i?(e=Mo(i,s()),H(e.$$.fragment),b(e.$$.fragment,1),M(e,n.parentNode,n)):e=null}},i(o){r||(e&&b(e.$$.fragment,o),r=!0)},o(o){e&&y(e.$$.fragment,o),r=!1},d(o){o&&E(n),e&&N(e,o)}}}function vb(t){let e,n,r,i;const s=[_b,hb],o=[];function u(l,a){return l[1]!==null?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=$e()},m(l,a){o[e].m(l,a),w(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(de(),y(o[f],1,1,()=>{o[f]=null}),me(),n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r))},i(l){i||(b(n),i=!0)},o(l){y(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function kb(t,e,n){let r,i,s;J(t,ft,d=>n(1,r=d));let o=!1;const u=["application/gitignore","application/json","application/toml","application/yaml"],l=["application/tei+xml"],a=kt();J(t,a,d=>n(3,s=d));const f=ze(ft,d=>{if(d){if(d.type==="folder")return"Folder";if(u.indexOf(d.mimetype)>=0||d.mimetype.startsWith("text/"))return"CodeMirror";if(l.indexOf(d.mimetype)>=0)return"Tei";if(d.mimetype.startsWith("image/"))return"Image"}return null}),c=ze(f,(d,p)=>{let m=null;d==="Folder"?m=Pi(()=>import("./FolderEditor-CKMB6ngt.js"),[]):d==="CodeMirror"?m=Pi(()=>import("./CodeMirrorEditor-B5Rlo82N.js"),__vite__mapDeps([0,1,2])):d==="Tei"?m=Pi(()=>import("./TeiEditor-B18T9sYP.js"),__vite__mapDeps([3,1])):d==="Image"&&(m=Pi(()=>import("./ImageEditor-TAWAZQYx.js"),[])),m?(n(0,o=!0),m.then(_=>{p(_.default),n(0,o=!1)},()=>{n(0,o=!1)})):p(null)},null);return J(t,c,d=>n(2,i=d)),[o,r,i,s,a,c]}let Cb=class extends ve{constructor(e){super(),ye(this,e,kb,vb,fe,{})}};function Eb(t){return t[t.length-1]}function df(t){return Object.keys(t).reduce((e,n)=>t[n]===void 0?e:e+`${n}:${t[n]};`,"")}df({position:"absolute",opacity:0,"pointer-events":"none",margin:0,transform:"translateX(-100%)"});function wb(t,...e){const n={};for(const r of Object.keys(t))e.includes(r)||(n[r]=t[r]);return n}function Li(t){const e={};for(const n in t){const r=t[n];r!==void 0&&(e[n]=r)}return e}function Ou(t){function e(n){return n(t),()=>{}}return{subscribe:e}}function Au(t,e){if(!Ab)return null;const n=document.querySelector(`[data-melt-id="${t}"]`);return So(n)?n:null}const Ii=t=>new Proxy(t,{get(e,n,r){return Reflect.get(e,n,r)},ownKeys(e){return Reflect.ownKeys(e).filter(n=>n!=="action")}}),Tu=t=>typeof t=="function";Hi("empty");function Hi(t,e){const{stores:n,action:r,returned:i}=e??{},s=(()=>{if(n&&i)return ze(n,u=>{const l=i(u);if(Tu(l)){const a=(...f)=>Ii(Li({...l(...f),[`data-melt-${t}`]:"",action:r??rr}));return a.action=r??rr,a}return Ii(Li({...l,[`data-melt-${t}`]:"",action:r??rr}))});{const u=i,l=u==null?void 0:u();if(Tu(l)){const a=(...f)=>Ii(Li({...l(...f),[`data-melt-${t}`]:"",action:r??rr}));return a.action=r??rr,Ou(a)}return Ou(Ii(Li({...l,[`data-melt-${t}`]:"",action:r??rr})))}})(),o=r??(()=>{});return o.subscribe=s.subscribe,o}function Ob(t){const e=s=>s?`${t}-${s}`:t,n=s=>`data-melt-${t}${s?`-${s}`:""}`,r=s=>`[data-melt-${t}${s?`-${s}`:""}]`;return{name:e,attribute:n,selector:r,getEl:s=>document.querySelector(r(s))}}const Ab=typeof document<"u",Tb=t=>/^[a-z]$/i.test(t);function So(t){return t instanceof HTMLElement}function $b(t){return t.offsetParent===null}function Sb(...t){return(...e)=>{for(const n of t)typeof n=="function"&&n(...e)}}function rr(){}function Ds(t,e,n,r){const i=Array.isArray(e)?e:[e];if(typeof n=="function"){const s=Db(o=>n(o));return i.forEach(o=>t.addEventListener(o,s,r)),()=>{i.forEach(o=>t.removeEventListener(o,s,r))}}return()=>void 0}function Rb(t){const e=t.currentTarget;if(!So(e))return null;const n=new CustomEvent(`m-${t.type}`,{detail:{originalEvent:t},cancelable:!0});return e.dispatchEvent(n),n}function Db(t){return e=>{const n=Rb(e);if(!(n!=null&&n.defaultPrevented))return t(e)}}function Ro(t){return{...t,get:()=>Sr(t)}}Ro.writable=function(t){const e=Fe(t);let n=t;return{subscribe:e.subscribe,set(r){e.set(r),n=r},update(r){const i=r(n);e.set(i),n=i},get(){return n}}};Ro.derived=function(t,e){const n=new Map,r=()=>{const s=Array.isArray(t)?t.map(o=>o.get()):t.get();return e(s)};return{get:r,subscribe:s=>{const o=[];return(Array.isArray(t)?t:[t]).forEach(l=>{o.push(l.subscribe(()=>{s(r())}))}),s(r()),n.set(s,o),()=>{const l=n.get(s);if(l)for(const a of l)a();n.delete(s)}}}};const Fb=(t,e)=>{const n=Ro(t),r=(s,o)=>{n.update(u=>{const l=s(u);let a=l;return e&&(a=e({curr:u,next:l})),o==null||o(a),a})};return{...n,update:r,set:s=>{r(()=>s)}}};function Pb(){return Da(10)}function Lb(t){return t.reduce((e,n)=>(e[n]=Pb(),e),{})}const lt={ALT:"Alt",ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",BACKSPACE:"Backspace",CAPS_LOCK:"CapsLock",CONTROL:"Control",DELETE:"Delete",END:"End",ENTER:"Enter",ESCAPE:"Escape",F1:"F1",F10:"F10",F11:"F11",F12:"F12",F2:"F2",F3:"F3",F4:"F4",F5:"F5",F6:"F6",F7:"F7",F8:"F8",F9:"F9",HOME:"Home",META:"Meta",PAGE_DOWN:"PageDown",PAGE_UP:"PageUp",SHIFT:"Shift",SPACE:" ",TAB:"Tab",CTRL:"Control",ASTERISK:"*",A:"a",P:"p"};gt(!1),gt(!1),gt(void 0),gt(void 0);const Ib={isDateDisabled:void 0,isDateUnavailable:void 0,value:void 0,preventDeselect:!1,numberOfMonths:1,pagedNavigation:!1,weekStartsOn:0,fixedWeeks:!1,calendarLabel:"Event Date",locale:"en",minValue:void 0,maxValue:void 0,disabled:!1,readonly:!1,weekdayFormat:"narrow"};({...wb(Ib,"isDateDisabled","isDateUnavailable","value","locale","disabled","readonly","minValue","maxValue","weekdayFormat")});const Mb={forceVisible:!1,defaultExpanded:[]},ir={TABINDEX:"tabindex",EXPANDED:"aria-expanded",LABELLEDBY:"aria-labelledby",DATAID:"data-id"},{name:Fs}=Ob("tree-view");function Nb(t){const e={...Mb,...t},{forceVisible:n}=e,r=Fe(null),i=Fe(null),s=e.expanded??Fe(e.defaultExpanded),o=Fb(s,e==null?void 0:e.onExpandedChange),u=ze([i],([C])=>C==null?void 0:C.getAttribute("data-id")),l=ze([i],([C])=>L=>(C==null?void 0:C.getAttribute("data-id"))===L),a=ze([o],([C])=>L=>C.includes(L)),f=Lb(["tree"]),c=Hi(Fs(),{returned:()=>({role:"tree","data-melt-id":f.tree})});let d=!1;const p=Hi(Fs("item"),{stores:[o,u,r],returned:([C,L,R])=>W=>{const{id:K,hasChildren:T}=W;let B=0;return R!==null&&(B=R===K?0:-1),{role:"treeitem","aria-selected":L===K,"data-id":K,tabindex:B,"aria-expanded":T?C.includes(K):void 0}},action:C=>{const L=Sb(Ds(C,"keydown",R=>{const{key:W}=R,K=Tb(W);if(![lt.ARROW_DOWN,lt.ARROW_UP,lt.ARROW_LEFT,lt.ARROW_RIGHT,lt.ENTER,lt.SPACE,lt.END,lt.HOME,lt.ASTERISK].includes(W)&&!K||!Au(f.tree)||!So(C)||C.getAttribute("role")!=="treeitem")return;const O=g(),P=O.findIndex(V=>V===C);if(W!==lt.ENTER&&W!==lt.SPACE&&R.preventDefault(),W===lt.ENTER||W===lt.SPACE)v(C),d=!0;else if(W===lt.ARROW_DOWN&&P!==O.length-1){const V=O[P+1];if(!V)return;_(V)}else if(W===lt.ARROW_UP&&P!==0){const V=O[P-1];if(!V)return;_(V)}else if(W===lt.HOME&&P!==0){const V=O[0];if(!V)return;_(V)}else if(W===lt.END&&P!=O.length-1){const V=Eb(O);if(!V)return;_(V)}else if(W===lt.ARROW_LEFT)if(S(C))k(C);else{const V=C==null?void 0:C.closest('[role="group"]'),U=V==null?void 0:V.getAttribute("data-group-id"),ee=O.find(te=>te.getAttribute("data-id")===U);if(!ee)return;_(ee)}else if(W===lt.ARROW_RIGHT)if(S(C)){const V=O[P+1];if(!V)return;_(V)}else A(C)&&k(C);else if(K){const V=O.map(te=>{var z;return{value:(z=te.textContent)==null?void 0:z.toLowerCase().trim(),id:te.getAttribute("data-id")}});let U=-1,ee=V.slice(P+1).some((te,z)=>{var oe;return((oe=te.value)==null?void 0:oe.toLowerCase()[0])===W?(U=P+1+z,!0):!1});if(ee||(ee=V.slice(0,P).some((te,z)=>{var oe;return((oe=te.value)==null?void 0:oe.toLowerCase().at(0))===W?(U=z,!0):!1})),ee&&V[U].id){const te=O[U];if(!te)return;_(te)}}}),Ds(C,"click",async()=>{v(C),_(C),d||k(C),d=!1}),Ds(C,"focus",()=>{r.update(R=>C.getAttribute("data-id")??R)}));return{destroy(){L()}}}}),m=Hi(Fs("group"),{stores:[o],returned:([C])=>L=>({role:"group","data-group-id":L.id,hidden:!n&&!C.includes(L.id)?!0:void 0,style:df({display:!n&&!C.includes(L.id)?"none":void 0})})});function _(C){r.update(L=>C.getAttribute("data-id")??L),C.focus()}function v(C){C.getAttribute(ir.DATAID)&&i.set(C)}function g(){let C=[];const L=Au(f.tree);return L&&(C=Array.from(L.querySelectorAll('[role="treeitem"]')).filter(R=>!$b(R))),C}function h(C){const L=C.hasAttribute(ir.EXPANDED),R=C.getAttribute(ir.EXPANDED),W=C.getAttribute(ir.DATAID);return{hasChildren:L,expanded:R,dataId:W}}function k(C){const{hasChildren:L,expanded:R,dataId:W}=h(C);!L||R===null||W===null||(R==="false"?o.update(K=>[...K,W]):o.update(K=>K.filter(T=>T!==W)))}function A(C){return C.hasAttribute(ir.EXPANDED)}function S(C){return C.getAttribute(ir.EXPANDED)==="true"}return{ids:f,elements:{tree:c,item:p,group:m},states:{expanded:o,selectedItem:i},helpers:{isExpanded:a,isSelected:l}}}var Hb=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Vb(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var mf={exports:{}};(function(t,e){(function(n,r,i){t.exports=i(),t.exports.default=i()})("slugify",Hb,function(){var n=JSON.parse(`{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","¢":"cent","£":"pound","¤":"currency","¥":"yen","©":"(c)","ª":"a","®":"(r)","º":"o","À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"DJ","đ":"dj","Ē":"E","ē":"e","Ė":"E","ė":"e","Ę":"e","ę":"e","Ě":"E","ě":"e","Ğ":"G","ğ":"g","Ģ":"G","ģ":"g","Ĩ":"I","ĩ":"i","Ī":"i","ī":"i","Į":"I","į":"i","İ":"I","ı":"i","Ķ":"k","ķ":"k","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","Ō":"O","ō":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ũ":"U","ũ":"u","Ū":"u","ū":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","Ə":"E","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Lj":"LJ","lj":"lj","Nj":"NJ","nj":"nj","Ș":"S","ș":"s","Ț":"T","ț":"t","ə":"e","˚":"o","Ά":"A","Έ":"E","Ή":"H","Ί":"I","Ό":"O","Ύ":"Y","Ώ":"W","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"H","Θ":"8","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"3","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","Ё":"Yo","Ђ":"DJ","Є":"Ye","І":"I","Ї":"Yi","Ј":"J","Љ":"LJ","Њ":"NJ","Ћ":"C","Џ":"DZ","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ж":"Zh","З":"Z","И":"I","Й":"J","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"u","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","ђ":"dj","є":"ye","і":"i","ї":"yi","ј":"j","љ":"lj","њ":"nj","ћ":"c","ѝ":"u","џ":"dz","Ґ":"G","ґ":"g","Ғ":"GH","ғ":"gh","Қ":"KH","қ":"kh","Ң":"NG","ң":"ng","Ү":"UE","ү":"ue","Ұ":"U","ұ":"u","Һ":"H","һ":"h","Ә":"AE","ә":"ae","Ө":"OE","ө":"oe","Ա":"A","Բ":"B","Գ":"G","Դ":"D","Ե":"E","Զ":"Z","Է":"E'","Ը":"Y'","Թ":"T'","Ժ":"JH","Ի":"I","Լ":"L","Խ":"X","Ծ":"C'","Կ":"K","Հ":"H","Ձ":"D'","Ղ":"GH","Ճ":"TW","Մ":"M","Յ":"Y","Ն":"N","Շ":"SH","Չ":"CH","Պ":"P","Ջ":"J","Ռ":"R'","Ս":"S","Վ":"V","Տ":"T","Ր":"R","Ց":"C","Փ":"P'","Ք":"Q'","Օ":"O''","Ֆ":"F","և":"EV","ء":"a","آ":"aa","أ":"a","ؤ":"u","إ":"i","ئ":"e","ا":"a","ب":"b","ة":"h","ت":"t","ث":"th","ج":"j","ح":"h","خ":"kh","د":"d","ذ":"th","ر":"r","ز":"z","س":"s","ش":"sh","ص":"s","ض":"dh","ط":"t","ظ":"z","ع":"a","غ":"gh","ف":"f","ق":"q","ك":"k","ل":"l","م":"m","ن":"n","ه":"h","و":"w","ى":"a","ي":"y","ً":"an","ٌ":"on","ٍ":"en","َ":"a","ُ":"u","ِ":"e","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","پ":"p","چ":"ch","ژ":"zh","ک":"k","گ":"g","ی":"y","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","฿":"baht","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"f","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","Ṣ":"S","ṣ":"s","Ẁ":"W","ẁ":"w","Ẃ":"W","ẃ":"w","Ẅ":"W","ẅ":"w","ẞ":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","ậ":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","Ề":"E","ề":"e","Ể":"E","ể":"e","Ễ":"E","ễ":"e","Ệ":"E","ệ":"e","Ỉ":"I","ỉ":"i","Ị":"I","ị":"i","Ọ":"O","ọ":"o","Ỏ":"O","ỏ":"o","Ố":"O","ố":"o","Ồ":"O","ồ":"o","Ổ":"O","ổ":"o","Ỗ":"O","ỗ":"o","Ộ":"O","ộ":"o","Ớ":"O","ớ":"o","Ờ":"O","ờ":"o","Ở":"O","ở":"o","Ỡ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","ủ":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","ử":"u","Ữ":"U","ữ":"u","Ự":"U","ự":"u","Ỳ":"Y","ỳ":"y","Ỵ":"Y","ỵ":"y","Ỷ":"Y","ỷ":"y","Ỹ":"Y","ỹ":"y","–":"-","‘":"'","’":"'","“":"\\"","”":"\\"","„":"\\"","†":"+","•":"*","…":"...","₠":"ecu","₢":"cruzeiro","₣":"french franc","₤":"lira","₥":"mill","₦":"naira","₧":"peseta","₨":"rupee","₩":"won","₪":"new shequel","₫":"dong","€":"euro","₭":"kip","₮":"tugrik","₯":"drachma","₰":"penny","₱":"peso","₲":"guarani","₳":"austral","₴":"hryvnia","₵":"cedi","₸":"kazakhstani tenge","₹":"indian rupee","₺":"turkish lira","₽":"russian ruble","₿":"bitcoin","℠":"sm","™":"tm","∂":"d","∆":"delta","∑":"sum","∞":"infinity","♥":"love","元":"yuan","円":"yen","﷼":"rial","ﻵ":"laa","ﻷ":"laa","ﻹ":"lai","ﻻ":"la"}`),r=JSON.parse('{"bg":{"Й":"Y","Ц":"Ts","Щ":"Sht","Ъ":"A","Ь":"Y","й":"y","ц":"ts","щ":"sht","ъ":"a","ь":"y"},"de":{"Ä":"AE","ä":"ae","Ö":"OE","ö":"oe","Ü":"UE","ü":"ue","ß":"ss","%":"prozent","&":"und","|":"oder","∑":"summe","∞":"unendlich","♥":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","¢":"centavos","£":"libras","¤":"moneda","₣":"francos","∑":"suma","∞":"infinito","♥":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","¢":"centime","£":"livre","¤":"devise","₣":"franc","∑":"somme","∞":"infini","♥":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","¢":"centavo","∑":"soma","£":"libra","∞":"infinito","♥":"amor"},"uk":{"И":"Y","и":"y","Й":"Y","й":"y","Ц":"Ts","ц":"ts","Х":"Kh","х":"kh","Щ":"Shch","щ":"shch","Г":"H","г":"h"},"vi":{"Đ":"D","đ":"d"},"da":{"Ø":"OE","ø":"oe","Å":"AA","å":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"større end"},"nb":{"&":"og","Å":"AA","Æ":"AE","Ø":"OE","å":"aa","æ":"ae","ø":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","Å":"AA","Ä":"AE","Ö":"OE","å":"aa","ä":"ae","ö":"oe"}}');function i(s,o){if(typeof s!="string")throw new Error("slugify: string argument expected");o=typeof o=="string"?{replacement:o}:o||{};var u=r[o.locale]||{},l=o.replacement===void 0?"-":o.replacement,a=o.trim===void 0?!0:o.trim,f=s.normalize().split("").reduce(function(c,d){var p=u[d];return p===void 0&&(p=n[d]),p===void 0&&(p=d),p===l&&(p=" "),c+p.replace(o.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")},"");return o.strict&&(f=f.replace(/[^A-Za-z0-9\s]/g,"")),a&&(f=f.trim()),f=f.replace(/\s+/g,l),o.lower&&(f=f.toLowerCase()),f}return i.extend=function(s){Object.assign(n,s)},i})})(mf);var Ub=mf.exports;const Bb=Vb(Ub);function $u(t,e,n){var l;const r=t.slice();r[9]=e[n].name,r[10]=e[n].type,r[11]=e[n].fullpath,r[12]=e[n].content,r[13]=e[n].mimetype,r[19]=n;const i=`file-tree-${Bb(r[9],{strict:!0})}-${r[1]}-${r[19]}`;r[14]=i;const s=!!((l=r[12])!=null&&l.length);r[15]=s;const o=r[2]({id:r[14]});r[16]=o;const u=r[3]({id:r[14],hasChildren:r[15]});return r[17]=u,r}function Kb(t){let e,n,r,i,s;const o=[Gb,zb,Qb,Wb],u=[];function l(a,f){return f&1&&(e=null),a[13]==="text/markdown"||a[13]==="application/tei+xml"?0:(e==null&&(e=!!a[13].startsWith("image/")),e?1:a[13]==="application/yaml"||a[13]==="application/toml"||a[13]==="application/gitignore"?2:3)}return n=l(t,-1),r=u[n]=o[n](t),{c(){r.c(),i=$e()},m(a,f){u[n].m(a,f),w(a,i,f),s=!0},p(a,f){let c=n;n=l(a,f),n!==c&&(de(),y(u[c],1,1,()=>{u[c]=null}),me(),r=u[n],r||(r=u[n]=o[n](a),r.c()),b(r,1),r.m(i.parentNode,i))},i(a){s||(b(r),s=!0)},o(a){y(r),s=!1},d(a){a&&E(i),u[n].d(a)}}}function jb(t){let e,n;return e=new Ne({props:{path:H1}}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},p:ce,i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function qb(t){let e,n;return e=new Ne({props:{path:N1}}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},p:ce,i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function Wb(t){let e,n;return e=new Ne({props:{path:L1}}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function Qb(t){let e,n;return e=new Ne({props:{path:R1}}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function zb(t){let e,n;return e=new Ne({props:{path:P1}}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function Gb(t){let e,n;return e=new Ne({props:{path:D1}}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function Su(t){let e,n,r,i,s;n=new pf({props:{treeItems:t[12],level:t[1]+1}});let o=[t[16]],u={};for(let l=0;l<o.length;l+=1)u=ie(u,o[l]);return{c(){e=D("ol"),H(n.$$.fragment),le(e,u)},m(l,a){w(l,e,a),M(n,e,null),r=!0,i||(s=Ue(t[16].action(e)),i=!0)},p(l,a){const f={};a&1&&(f.treeItems=l[12]),a&2&&(f.level=l[1]+1),n.$set(f),le(e,u=Me(o,[a&7&&l[16]]))},i(l){r||(b(n.$$.fragment,l),r=!0)},o(l){y(n.$$.fragment,l),r=!1},d(l){l&&E(e),N(n),i=!1,s()}}}function Ru(t){let e,n,r,i,s,o,u,l=t[9]+"",a,f,c,d,p,m,_;const v=[qb,jb,Kb],g=[];function h(C,L){return L&19&&(r=null),r==null&&(r=!!(C[10]==="folder"&&C[15]&&C[4](C[14]))),r?0:C[10]==="folder"?1:C[10]==="file"?2:-1}~(i=h(t,-1))&&(s=g[i]=v[i](t));let k=[{class:"flex items-center gap-1 p-1"},t[17],{"data-file-path":f=t[11]}],A={};for(let C=0;C<k.length;C+=1)A=ie(A,k[C]);let S=t[12]&&Su(t);return{c(){e=D("li"),n=D("button"),s&&s.c(),o=j(),u=D("span"),a=Z(l),c=j(),S&&S.c(),d=j(),I(u,"class","select-none"),le(n,A),I(e,"role","none")},m(C,L){w(C,e,L),F(e,n),~i&&g[i].m(n,null),F(n,o),F(n,u),F(u,a),n.autofocus&&n.focus(),F(e,c),S&&S.m(e,null),F(e,d),p=!0,m||(_=Ue(t[17].action(n)),m=!0)},p(C,L){let R=i;i=h(C,L),i===R?~i&&g[i].p(C,L):(s&&(de(),y(g[R],1,1,()=>{g[R]=null}),me()),~i?(s=g[i],s?s.p(C,L):(s=g[i]=v[i](C),s.c()),b(s,1),s.m(n,o)):s=null),(!p||L&1)&&l!==(l=C[9]+"")&&je(a,l),le(n,A=Me(k,[{class:"flex items-center gap-1 p-1"},L&11&&C[17],(!p||L&1&&f!==(f=C[11]))&&{"data-file-path":f}])),C[12]?S?(S.p(C,L),L&1&&b(S,1)):(S=Su(C),S.c(),b(S,1),S.m(e,d)):S&&(de(),y(S,1,1,()=>{S=null}),me())},i(C){p||(b(s),b(S),p=!0)},o(C){y(s),y(S),p=!1},d(C){C&&E(e),~i&&g[i].d(),S&&S.d(),m=!1,_()}}}function Yb(t){let e,n,r=tn(t[0]),i=[];for(let o=0;o<r.length;o+=1)i[o]=Ru($u(t,r,o));const s=o=>y(i[o],1,1,()=>{i[o]=null});return{c(){for(let o=0;o<i.length;o+=1)i[o].c();e=$e()},m(o,u){for(let l=0;l<i.length;l+=1)i[l]&&i[l].m(o,u);w(o,e,u),n=!0},p(o,[u]){if(u&31){r=tn(o[0]);let l;for(l=0;l<r.length;l+=1){const a=$u(o,r,l);i[l]?(i[l].p(a,u),b(i[l],1)):(i[l]=Ru(a),i[l].c(),b(i[l],1),i[l].m(e.parentNode,e))}for(de(),l=r.length;l<i.length;l+=1)s(l);me()}},i(o){if(!n){for(let u=0;u<r.length;u+=1)b(i[u]);n=!0}},o(o){i=i.filter(Boolean);for(let u=0;u<i.length;u+=1)y(i[u]);n=!1},d(o){o&&E(e),ci(i,o)}}}function Zb(t,e,n){let r,i,s,{treeItems:o}=e,{level:u=1}=e;const{elements:{item:l,group:a},helpers:{isExpanded:f,isSelected:c}}=bt("tree");return J(t,l,d=>n(3,i=d)),J(t,a,d=>n(2,r=d)),J(t,f,d=>n(4,s=d)),t.$$set=d=>{"treeItems"in d&&n(0,o=d.treeItems),"level"in d&&n(1,u=d.level)},[o,u,r,i,s,l,a,f]}class pf extends ve{constructor(e){super(),ye(this,e,Zb,Yb,fe,{treeItems:0,level:1})}}function Xb(t){let e,n,r,i,s;const o=t[1].default,u=pe(o,t,t[0],null);return i=new Ne({props:{path:zt,class:"w-12 h-12 animate-spin animate-reverse"}}),{c(){e=D("div"),n=D("p"),u&&u.c(),r=j(),H(i.$$.fragment),I(n,"class","sr-only"),I(e,"class","absolute left-1/2 top-1/2 transform -translate-x-1/2 -translate-y-1/2")},m(l,a){w(l,e,a),F(e,n),u&&u.m(n,null),F(e,r),M(i,e,null),s=!0},p(l,[a]){u&&u.p&&(!s||a&1)&&_e(u,o,l,l[0],s?he(o,l[0],a,null):ge(l[0]),null)},i(l){s||(b(u,l),b(i.$$.fragment,l),s=!0)},o(l){y(u,l),y(i.$$.fragment,l),s=!1},d(l){l&&E(e),u&&u.d(l),N(i)}}}function Jb(t,e,n){let{$$slots:r={},$$scope:i}=e;return t.$$set=s=>{"$$scope"in s&&n(0,i=s.$$scope)},[i,r]}class xb extends ve{constructor(e){super(),ye(this,e,Jb,Xb,fe,{})}}function e2(t){let e,n;return e=new xb({props:{$$slots:{default:[n2]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},p(r,i){const s={};i&2048&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function t2(t){let e,n,r;n=new pf({props:{treeItems:t[0].data}});let i=[t[1]],s={};for(let o=0;o<i.length;o+=1)s=ie(s,i[o]);return{c(){e=D("ol"),H(n.$$.fragment),le(e,s)},m(o,u){w(o,e,u),M(n,e,null),r=!0},p(o,u){const l={};u&1&&(l.treeItems=o[0].data),n.$set(l),le(e,s=Me(i,[u&2&&o[1]]))},i(o){r||(b(n.$$.fragment,o),r=!0)},o(o){y(n.$$.fragment,o),r=!1},d(o){o&&E(e),N(n)}}}function n2(t){let e;return{c(){e=Z("Loading the file list. Please wait...")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function r2(t){let e,n,r,i;const s=[t2,e2],o=[];function u(l,a){return l[0].isSuccess?0:l[0].isLoading?1:-1}return~(n=u(t))&&(r=o[n]=s[n](t)),{c(){e=D("nav"),r&&r.c(),I(e,"aria-label","Files"),I(e,"class","relative px-2 py-1 w-3/12 overflow-auto border-r border-gray-300")},m(l,a){w(l,e,a),~n&&o[n].m(e,null),i=!0},p(l,[a]){let f=n;n=u(l),n===f?~n&&o[n].p(l,a):(r&&(de(),y(o[f],1,1,()=>{o[f]=null}),me()),~n?(r=o[n],r?r.p(l,a):(r=o[n]=s[n](l),r.c()),b(r,1),r.m(e,null)):r=null)},i(l){i||(b(r),i=!0)},o(l){y(r),i=!1},d(l){l&&E(e),~n&&o[n].d()}}}function hf(t,e){for(let n of t){if(n.fullpath===e)return n;if(n.content){const r=hf(n.content,e);if(r!==null)return r}}return null}function i2(t){var n,r,i;const e=[];for(;t&&t.getAttribute("role")==="treeitem";)e.splice(0,0,t.getAttribute("data-id")),t=(i=(r=(n=t.parentElement)==null?void 0:n.parentElement)==null?void 0:r.parentElement)==null?void 0:i.querySelector(":scope > [role=treeitem]");return e}function s2(t,e,n){let r,i;const s=kt(),o=To(),u=ze([s,o],([m,_])=>m?{queryKey:["branches",m.id,"files/"],queryFn:cn,enabled:_.isSuccess}:{queryKey:["branches","-","files/"],queryFn:cn,enabled:!1}),l=Ar(u);J(t,l,m=>n(0,r=m));const a=Nb({defaultExpanded:["file-tree--1-0"]});At("tree",a);const{elements:{tree:f},states:{selectedItem:c,expanded:d}}=a;J(t,f,m=>n(1,i=m));const p=c.subscribe(m=>{if(c!==null&&(m==null?void 0:m.getAttribute("data-file-path"))!==null&&r.isSuccess){const _=hf(r.data,m==null?void 0:m.getAttribute("data-file-path"));ft.set(_)}else ft.set(null)});return is(p),rs(()=>{let m;m=l.subscribe(_=>{if(_.isSuccess){const v=af("path");v&&qt().then(()=>{const g=document.querySelector('[data-file-path="'+v+'"]');g&&(d.set(i2(g)),c.set(g))}),m&&m()}})}),[r,i,l,f]}class o2 extends ve{constructor(e){super(),ye(this,e,s2,r2,fe,{})}}function Du(t,e,n){const r=t.slice();return r[15]=e[n],r}function Fu(t){let e,n=t[0].title+"",r,i;return{c(){e=Z(" ("),r=Z(n),i=Z(")")},m(s,o){w(s,e,o),w(s,r,o),w(s,i,o)},p(s,o){o&1&&n!==(n=s[0].title+"")&&je(r,n)},d(s){s&&(E(e),E(r),E(i))}}}function l2(t){let e,n,r=t[0]!==null&&Fu(t);return{c(){e=Z("μEditor"),r&&r.c(),n=$e()},m(i,s){w(i,e,s),r&&r.m(i,s),w(i,n,s)},p(i,s){i[0]!==null?r?r.p(i,s):(r=Fu(i),r.c(),r.m(n.parentNode,n)):r&&(r.d(1),r=null)},d(i){i&&(E(e),E(n)),r&&r.d(i)}}}function Pu(t){let e,n,r,i,s,o,u,l,a,f;e=new Pt({props:{$$slots:{default:[u2]},$$scope:{ctx:t}}}),e.$on("click",t[9]);let c=t[2].isSuccess&&t[2].data.remote.length>0&&Lu(t);i=new Pt({props:{$$slots:{default:[f2]},$$scope:{ctx:t}}}),i.$on("click",t[11]),o=new fs({});let d=t[3]!==null&&Iu(t),p=t[2].isSuccess&&t[2].data.local.length>0&&Hu(t);return{c(){H(e.$$.fragment),n=j(),c&&c.c(),r=j(),H(i.$$.fragment),s=j(),H(o.$$.fragment),u=j(),d&&d.c(),l=j(),p&&p.c(),a=$e()},m(m,_){M(e,m,_),w(m,n,_),c&&c.m(m,_),w(m,r,_),M(i,m,_),w(m,s,_),M(o,m,_),w(m,u,_),d&&d.m(m,_),w(m,l,_),p&&p.m(m,_),w(m,a,_),f=!0},p(m,_){const v={};_&262144&&(v.$$scope={dirty:_,ctx:m}),e.$set(v),m[2].isSuccess&&m[2].data.remote.length>0?c?_&4&&b(c,1):(c=Lu(m),c.c(),b(c,1),c.m(r.parentNode,r)):c&&(de(),y(c,1,1,()=>{c=null}),me());const g={};_&262144&&(g.$$scope={dirty:_,ctx:m}),i.$set(g),m[3]!==null?d?(d.p(m,_),_&8&&b(d,1)):(d=Iu(m),d.c(),b(d,1),d.m(l.parentNode,l)):d&&(de(),y(d,1,1,()=>{d=null}),me()),m[2].isSuccess&&m[2].data.local.length>0?p?(p.p(m,_),_&4&&b(p,1)):(p=Hu(m),p.c(),b(p,1),p.m(a.parentNode,a)):p&&(de(),y(p,1,1,()=>{p=null}),me())},i(m){f||(b(e.$$.fragment,m),b(c),b(i.$$.fragment,m),b(o.$$.fragment,m),b(d),b(p),f=!0)},o(m){y(e.$$.fragment,m),y(c),y(i.$$.fragment,m),y(o.$$.fragment,m),y(d),y(p),f=!1},d(m){m&&(E(n),E(r),E(s),E(u),E(l),E(a)),N(e,m),c&&c.d(m),N(i,m),N(o,m),d&&d.d(m),p&&p.d(m)}}}function u2(t){let e,n,r,i;return e=new Ne({props:{path:K1,class:"w-4 h-4"}}),{c(){H(e.$$.fragment),n=j(),r=D("span"),r.textContent="New Branch"},m(s,o){M(e,s,o),w(s,n,o),w(s,r,o),i=!0},p:ce,i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),N(e,s)}}}function Lu(t){let e,n;return e=new Pt({props:{$$slots:{default:[a2]},$$scope:{ctx:t}}}),e.$on("click",t[10]),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function a2(t){let e,n,r,i;return e=new Ne({props:{class:"w-4 h-4"}}),{c(){H(e.$$.fragment),n=j(),r=D("span"),r.textContent="Import Branch"},m(s,o){M(e,s,o),w(s,n,o),w(s,r,o),i=!0},p:ce,i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),N(e,s)}}}function f2(t){let e,n,r,i;return e=new Ne({props:{class:"w-4 h-4"}}),{c(){H(e.$$.fragment),n=j(),r=D("span"),r.textContent="Synchronise Branches"},m(s,o){M(e,s,o),w(s,n,o),w(s,r,o),i=!0},p:ce,i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),N(e,s)}}}function Iu(t){let e,n,r,i=t[3].update_from_default&&Mu(t),s=t[1].data.git.default_branch!==t[3].id&&Nu(t);return{c(){i&&i.c(),e=j(),s&&s.c(),n=$e()},m(o,u){i&&i.m(o,u),w(o,e,u),s&&s.m(o,u),w(o,n,u),r=!0},p(o,u){o[3].update_from_default?i?(i.p(o,u),u&8&&b(i,1)):(i=Mu(o),i.c(),b(i,1),i.m(e.parentNode,e)):i&&(de(),y(i,1,1,()=>{i=null}),me()),o[1].data.git.default_branch!==o[3].id?s?(s.p(o,u),u&10&&b(s,1)):(s=Nu(o),s.c(),b(s,1),s.m(n.parentNode,n)):s&&(de(),y(s,1,1,()=>{s=null}),me())},i(o){r||(b(i),b(s),r=!0)},o(o){y(i),y(s),r=!1},d(o){o&&(E(e),E(n)),i&&i.d(o),s&&s.d(o)}}}function Mu(t){let e,n,r,i;return e=new Pt({props:{$$slots:{default:[c2]},$$scope:{ctx:t}}}),e.$on("click",t[12]),r=new fs({}),{c(){H(e.$$.fragment),n=j(),H(r.$$.fragment)},m(s,o){M(e,s,o),w(s,n,o),M(r,s,o),i=!0},p(s,o){const u={};o&262146&&(u.$$scope={dirty:o,ctx:s}),e.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),N(e,s),N(r,s)}}}function c2(t){let e,n,r,i,s=ts(t[1].data.git.default_branch)+"",o,u;return e=new Ne({props:{path:q1,class:"w-4 h-4"}}),{c(){H(e.$$.fragment),n=j(),r=D("span"),i=Z("Merge Updates from "),o=Z(s)},m(l,a){M(e,l,a),w(l,n,a),w(l,r,a),F(r,i),F(r,o),u=!0},p(l,a){(!u||a&2)&&s!==(s=ts(l[1].data.git.default_branch)+"")&&je(o,s)},i(l){u||(b(e.$$.fragment,l),u=!0)},o(l){y(e.$$.fragment,l),u=!1},d(l){l&&(E(n),E(r)),N(e,l)}}}function Nu(t){let e,n,r,i;return e=new Pt({props:{$$slots:{default:[d2]},$$scope:{ctx:t}}}),e.$on("click",t[13]),r=new fs({}),{c(){H(e.$$.fragment),n=j(),H(r.$$.fragment)},m(s,o){M(e,s,o),w(s,n,o),M(r,s,o),i=!0},p(s,o){const u={};o&262152&&(u.$$scope={dirty:o,ctx:s}),e.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),N(e,s),N(r,s)}}}function d2(t){let e,n,r,i,s=t[3].title+"",o,u;return e=new Ne({props:{path:j1,class:"w-4 h-4"}}),{c(){H(e.$$.fragment),n=j(),r=D("span"),i=Z("Delete Branch "),o=Z(s)},m(l,a){M(e,l,a),w(l,n,a),w(l,r,a),F(r,i),F(r,o),u=!0},p(l,a){(!u||a&8)&&s!==(s=l[3].title+"")&&je(o,s)},i(l){u||(b(e.$$.fragment,l),u=!0)},o(l){y(e.$$.fragment,l),u=!1},d(l){l&&(E(n),E(r)),N(e,l)}}}function Hu(t){let e,n;return e=new rp({props:{onValueChange:t[14],$$slots:{default:[_2]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},p(r,i){const s={};i&4&&(s.onValueChange=r[14]),i&262149&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function m2(t){let e,n;return e=new Ne({props:{class:"w-4 h-4"}}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function p2(t){let e,n;return e=new Ne({props:{path:A1,class:"w-4 h-4"}}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function h2(t){let e,n,r,i,s=t[15].title+"",o,u,l;const a=[p2,m2],f=[];function c(d,p){return d[0]!==null&&d[0].id===d[15].id?0:1}return e=c(t),n=f[e]=a[e](t),{c(){n.c(),r=j(),i=D("span"),o=Z(s),u=j()},m(d,p){f[e].m(d,p),w(d,r,p),w(d,i,p),F(i,o),w(d,u,p),l=!0},p(d,p){let m=e;e=c(d),e!==m&&(de(),y(f[m],1,1,()=>{f[m]=null}),me(),n=f[e],n||(n=f[e]=a[e](d),n.c()),b(n,1),n.m(r.parentNode,r)),(!l||p&4)&&s!==(s=d[15].title+"")&&je(o,s)},i(d){l||(b(n),l=!0)},o(d){y(n),l=!1},d(d){d&&(E(r),E(i),E(u)),f[e].d(d)}}}function Vu(t){let e,n;return e=new Wm({props:{value:t[15].id,$$slots:{default:[h2]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},p(r,i){const s={};i&4&&(s.value=r[15].id),i&262149&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function _2(t){let e,n,r=tn(t[2].data.local),i=[];for(let o=0;o<r.length;o+=1)i[o]=Vu(Du(t,r,o));const s=o=>y(i[o],1,1,()=>{i[o]=null});return{c(){for(let o=0;o<i.length;o+=1)i[o].c();e=$e()},m(o,u){for(let l=0;l<i.length;l+=1)i[l]&&i[l].m(o,u);w(o,e,u),n=!0},p(o,u){if(u&5){r=tn(o[2].data.local);let l;for(l=0;l<r.length;l+=1){const a=Du(o,r,l);i[l]?(i[l].p(a,u),b(i[l],1)):(i[l]=Vu(a),i[l].c(),b(i[l],1),i[l].m(e.parentNode,e))}for(de(),l=r.length;l<i.length;l+=1)s(l);me()}},i(o){if(!n){for(let u=0;u<r.length;u+=1)b(i[u]);n=!0}},o(o){i=i.filter(Boolean);for(let u=0;u<i.length;u+=1)y(i[u]);n=!1},d(o){o&&E(e),ci(i,o)}}}function g2(t){let e,n,r=t[1].isSuccess&&t[1].data.git.enabled&&Pu(t);return{c(){r&&r.c(),e=$e()},m(i,s){r&&r.m(i,s),w(i,e,s),n=!0},p(i,s){i[1].isSuccess&&i[1].data.git.enabled?r?(r.p(i,s),s&2&&b(r,1)):(r=Pu(i),r.c(),b(r,1),r.m(e.parentNode,e)):r&&(de(),y(r,1,1,()=>{r=null}),me())},i(i){n||(b(r),n=!0)},o(i){y(r),n=!1},d(i){i&&E(e),r&&r.d(i)}}}function b2(t){let e,n,r,i;return e=new ps({props:{$$slots:{default:[l2]},$$scope:{ctx:t}}}),r=new cs({props:{$$slots:{default:[g2]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=j(),H(r.$$.fragment)},m(s,o){M(e,s,o),w(s,n,o),M(r,s,o),i=!0},p(s,o){const u={};o&262145&&(u.$$scope={dirty:o,ctx:s}),e.$set(u);const l={};o&262159&&(l.$$scope={dirty:o,ctx:s}),r.$set(l)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),N(e,s),N(r,s)}}}function y2(t){let e,n;return e=new ms({props:{$$slots:{default:[b2]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},p(r,[i]){const s={};i&262159&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function v2(t,e,n){let r,i,s,o;const u=Ln();J(t,u,h=>n(1,i=h));const l=$o();J(t,l,h=>n(2,s=h));const a=kt();J(t,a,h=>n(0,r=h));const f=vt(),c=ze([l,a],([h,k])=>{if(h.isSuccess&&k!==null){for(const A of h.data.local)if(A.id===k.id)return A}return null});return J(t,c,h=>n(3,o=h)),[r,i,s,o,u,l,a,f,c,()=>{Ge.set(Ae.UEDITOR_NEW_BRANCH)},()=>{Ge.set(Ae.UEDITOR_IMPORT_REMOTE_BRANCH)},()=>{ff({action:"SynchroniseBranches",callback:()=>{f.invalidateQueries({queryKey:["branches"]})}})},()=>{Ge.set(Ae.UEDITOR_MERGE_FROM_DEFAULT)},()=>{Ge.set(Ae.UEDITOR_DELETE_BRANCH)},h=>{if(s.isSuccess)for(let k of s.data.local)k.id===h&&a.set(k)}]}class k2 extends ve{constructor(e){super(),ye(this,e,v2,y2,fe,{})}}function C2(t){let e;return{c(){e=Z("File")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function E2(t){let e,n,r,i;return e=new Ne({props:{path:B1,class:"w-4 h-4"}}),{c(){H(e.$$.fragment),n=j(),r=D("span"),r.textContent="Rename"},m(s,o){M(e,s,o),w(s,n,o),w(s,r,o),i=!0},p:ce,i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),N(e,s)}}}function w2(t){let e,n,r,i;return e=new Ne({props:{path:Q1,class:"w-4 h-4"}}),{c(){H(e.$$.fragment),n=j(),r=D("span"),r.textContent="Delete"},m(s,o){M(e,s,o),w(s,n,o),w(s,r,o),i=!0},p:ce,i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),N(e,s)}}}function O2(t){let e,n,r,i;return e=new Pt({props:{$$slots:{default:[E2]},$$scope:{ctx:t}}}),e.$on("click",t[0]),r=new Pt({props:{$$slots:{default:[w2]},$$scope:{ctx:t}}}),r.$on("click",t[1]),{c(){H(e.$$.fragment),n=j(),H(r.$$.fragment)},m(s,o){M(e,s,o),w(s,n,o),M(r,s,o),i=!0},p(s,o){const u={};o&4&&(u.$$scope={dirty:o,ctx:s}),e.$set(u);const l={};o&4&&(l.$$scope={dirty:o,ctx:s}),r.$set(l)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),N(e,s),N(r,s)}}}function A2(t){let e,n,r,i;return e=new ps({props:{$$slots:{default:[C2]},$$scope:{ctx:t}}}),r=new cs({props:{$$slots:{default:[O2]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=j(),H(r.$$.fragment)},m(s,o){M(e,s,o),w(s,n,o),M(r,s,o),i=!0},p(s,o){const u={};o&4&&(u.$$scope={dirty:o,ctx:s}),e.$set(u);const l={};o&4&&(l.$$scope={dirty:o,ctx:s}),r.$set(l)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),N(e,s),N(r,s)}}}function T2(t){let e,n;return e=new ms({props:{$$slots:{default:[A2]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},p(r,[i]){const s={};i&4&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function $2(t){return[()=>{Ge.set(Ae.FILE_RENAME)},()=>{Ge.set(Ae.FILE_DELETE)}]}class S2 extends ve{constructor(e){super(),ye(this,e,$2,T2,fe,{})}}function R2(t){let e;return{c(){e=Z("Folder")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function D2(t){let e,n,r,i;return e=new Ne({props:{path:V1,class:"w4 h-4"}}),{c(){H(e.$$.fragment),n=j(),r=D("span"),r.textContent="New Folder"},m(s,o){M(e,s,o),w(s,n,o),w(s,r,o),i=!0},p:ce,i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),N(e,s)}}}function F2(t){let e,n,r,i;return e=new Ne({props:{path:F1,class:"w4 h-4"}}),{c(){H(e.$$.fragment),n=j(),r=D("span"),r.textContent="New File"},m(s,o){M(e,s,o),w(s,n,o),w(s,r,o),i=!0},p:ce,i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),N(e,s)}}}function P2(t){let e,n,r,i;return e=new Ne({props:{path:I1,class:"w4 h-4"}}),{c(){H(e.$$.fragment),n=j(),r=D("span"),r.textContent="Upload Files"},m(s,o){M(e,s,o),w(s,n,o),w(s,r,o),i=!0},p:ce,i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),N(e,s)}}}function L2(t){let e,n,r,i;return e=new Ne({props:{path:M1,class:"w-4 h-4"}}),{c(){H(e.$$.fragment),n=j(),r=D("span"),r.textContent="Rename"},m(s,o){M(e,s,o),w(s,n,o),w(s,r,o),i=!0},p:ce,i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),N(e,s)}}}function I2(t){let e,n,r,i;return e=new Ne({props:{path:U1,class:"w-4 h-4"}}),{c(){H(e.$$.fragment),n=j(),r=D("span"),r.textContent="Delete"},m(s,o){M(e,s,o),w(s,n,o),w(s,r,o),i=!0},p:ce,i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),N(e,s)}}}function M2(t){let e,n,r,i,s,o,u,l,a,f,c,d;return e=new Pt({props:{$$slots:{default:[D2]},$$scope:{ctx:t}}}),e.$on("click",t[2]),r=new Pt({props:{$$slots:{default:[F2]},$$scope:{ctx:t}}}),r.$on("click",t[3]),s=new Pt({props:{$$slots:{default:[P2]},$$scope:{ctx:t}}}),s.$on("click",t[4]),u=new fs({}),a=new Pt({props:{$$slots:{default:[L2]},$$scope:{ctx:t}}}),a.$on("click",t[5]),c=new Pt({props:{$$slots:{default:[I2]},$$scope:{ctx:t}}}),c.$on("click",t[6]),{c(){H(e.$$.fragment),n=j(),H(r.$$.fragment),i=j(),H(s.$$.fragment),o=j(),H(u.$$.fragment),l=j(),H(a.$$.fragment),f=j(),H(c.$$.fragment)},m(p,m){M(e,p,m),w(p,n,m),M(r,p,m),w(p,i,m),M(s,p,m),w(p,o,m),M(u,p,m),w(p,l,m),M(a,p,m),w(p,f,m),M(c,p,m),d=!0},p(p,m){const _={};m&256&&(_.$$scope={dirty:m,ctx:p}),e.$set(_);const v={};m&256&&(v.$$scope={dirty:m,ctx:p}),r.$set(v);const g={};m&256&&(g.$$scope={dirty:m,ctx:p}),s.$set(g);const h={};m&256&&(h.$$scope={dirty:m,ctx:p}),a.$set(h);const k={};m&256&&(k.$$scope={dirty:m,ctx:p}),c.$set(k)},i(p){d||(b(e.$$.fragment,p),b(r.$$.fragment,p),b(s.$$.fragment,p),b(u.$$.fragment,p),b(a.$$.fragment,p),b(c.$$.fragment,p),d=!0)},o(p){y(e.$$.fragment,p),y(r.$$.fragment,p),y(s.$$.fragment,p),y(u.$$.fragment,p),y(a.$$.fragment,p),y(c.$$.fragment,p),d=!1},d(p){p&&(E(n),E(i),E(o),E(l),E(f)),N(e,p),N(r,p),N(s,p),N(u,p),N(a,p),N(c,p)}}}function N2(t){let e,n,r,i;return e=new ps({props:{$$slots:{default:[R2]},$$scope:{ctx:t}}}),r=new cs({props:{$$slots:{default:[M2]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=j(),H(r.$$.fragment)},m(s,o){M(e,s,o),w(s,n,o),M(r,s,o),i=!0},p(s,o){const u={};o&256&&(u.$$scope={dirty:o,ctx:s}),e.$set(u);const l={};o&256&&(l.$$scope={dirty:o,ctx:s}),r.$set(l)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),N(e,s),N(r,s)}}}function Uu(t){let e,n;return e=new cf({}),e.$on("close",t[7]),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},p:ce,i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function H2(t){let e,n,r,i;e=new ms({props:{$$slots:{default:[N2]},$$scope:{ctx:t}}});let s=t[0]===t[1].Delete&&Uu(t);return{c(){H(e.$$.fragment),n=j(),s&&s.c(),r=$e()},m(o,u){M(e,o,u),w(o,n,u),s&&s.m(o,u),w(o,r,u),i=!0},p(o,[u]){const l={};u&256&&(l.$$scope={dirty:u,ctx:o}),e.$set(l),o[0]===o[1].Delete?s?(s.p(o,u),u&1&&b(s,1)):(s=Uu(o),s.c(),b(s,1),s.m(r.parentNode,r)):s&&(de(),y(s,1,1,()=>{s=null}),me())},i(o){i||(b(e.$$.fragment,o),b(s),i=!0)},o(o){y(e.$$.fragment,o),y(s),i=!1},d(o){o&&(E(n),E(r)),N(e,o),s&&s.d(o)}}}function V2(t,e,n){var r=(c=>(c[c.Nothing=1]="Nothing",c[c.Rename=2]="Rename",c[c.Move=3]="Move",c[c.Copy=4]="Copy",c[c.Delete=5]="Delete",c))(r||{});let i=1;return[i,r,()=>{Ge.set(Ae.FOLDER_CREATE)},()=>{Ge.set(Ae.FILE_CREATE)},()=>{Ge.set(Ae.FILE_UPLOAD)},()=>{Ge.set(Ae.FOLDER_RENAME)},()=>{Ge.set(Ae.FOLDER_DELETE)},()=>{console.log("Resetting action"),n(0,i=r.Nothing)}]}class U2 extends ve{constructor(e){super(),ye(this,e,V2,H2,fe,{})}}function Bu(t){let e,n;return e=new ms({props:{$$slots:{default:[q2]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},p(r,i){const s={};i&66&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function B2(t){var r;let e=((r=t[1].data)==null?void 0:r.name)+"",n;return{c(){n=Z(e)},m(i,s){w(i,n,s)},p(i,s){var o;s&2&&e!==(e=((o=i[1].data)==null?void 0:o.name)+"")&&je(n,e)},d(i){i&&E(n)}}}function K2(t){let e,n,r,i;return e=new Ne({props:{path:S1,class:"w-4 h-4"}}),{c(){H(e.$$.fragment),n=j(),r=D("span"),r.textContent="Logout"},m(s,o){M(e,s,o),w(s,n,o),w(s,r,o),i=!0},p:ce,i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),N(e,s)}}}function j2(t){let e,n;return e=new Pt({props:{$$slots:{default:[K2]},$$scope:{ctx:t}}}),e.$on("click",t[4]),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},p(r,i){const s={};i&64&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function q2(t){let e,n,r,i;return e=new ps({props:{$$slots:{default:[B2]},$$scope:{ctx:t}}}),r=new cs({props:{$$slots:{default:[j2]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=j(),H(r.$$.fragment)},m(s,o){M(e,s,o),w(s,n,o),M(r,s,o),i=!0},p(s,o){const u={};o&66&&(u.$$scope={dirty:o,ctx:s}),e.$set(u);const l={};o&64&&(l.$$scope={dirty:o,ctx:s}),r.$set(l)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),N(e,s),N(r,s)}}}function W2(t){let e,n,r=t[0].isSuccess&&t[0].data.auth.provider!=="no-auth"&&Bu(t);return{c(){r&&r.c(),e=$e()},m(i,s){r&&r.m(i,s),w(i,e,s),n=!0},p(i,[s]){i[0].isSuccess&&i[0].data.auth.provider!=="no-auth"?r?(r.p(i,s),s&1&&b(r,1)):(r=Bu(i),r.c(),b(r,1),r.m(e.parentNode,e)):r&&(de(),y(r,1,1,()=>{r=null}),me())},i(i){n||(b(r),n=!0)},o(i){y(r),n=!1},d(i){i&&E(e),r&&r.d(i)}}}function Q2(t,e,n){let r,i;const s=To();J(t,s,a=>n(1,i=a));const o=Ln();J(t,o,a=>n(0,r=a));const u=vt();async function l(){(await window.fetch("/api/auth/login",{method:"DELETE"})).ok&&(u.cancelQueries(),u.invalidateQueries({queryKey:["auth"]}))}return[r,i,s,o,l]}class z2 extends ve{constructor(e){super(),ye(this,e,Q2,W2,fe,{})}}function Ku(t){let e,n,r,i;const s=[Y2,G2],o=[];function u(l,a){return l[0].type==="file"?0:l[0].type==="folder"?1:-1}return~(e=u(t))&&(n=o[e]=s[e](t)),{c(){n&&n.c(),r=$e()},m(l,a){~e&&o[e].m(l,a),w(l,r,a),i=!0},p(l,a){let f=e;e=u(l),e!==f&&(n&&(de(),y(o[f],1,1,()=>{o[f]=null}),me()),~e?(n=o[e],n||(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r)):n=null)},i(l){i||(b(n),i=!0)},o(l){y(n),i=!1},d(l){l&&E(r),~e&&o[e].d(l)}}}function G2(t){let e,n;return e=new U2({}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function Y2(t){let e,n;return e=new S2({}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function Z2(t){var a,f,c;let e,n,r,i,s,o,u;e=new k2({});let l=t[0]&&(!((a=t[1].data)!=null&&a.git.protect_default_branch)||((f=t[1].data)==null?void 0:f.git.default_branch)!==((c=t[2])==null?void 0:c.id))&&Ku(t);return o=new z2({}),{c(){H(e.$$.fragment),n=j(),l&&l.c(),r=j(),i=D("span"),s=j(),H(o.$$.fragment),I(i,"class","flex-1")},m(d,p){M(e,d,p),w(d,n,p),l&&l.m(d,p),w(d,r,p),w(d,i,p),w(d,s,p),M(o,d,p),u=!0},p(d,p){var m,_,v;d[0]&&(!((m=d[1].data)!=null&&m.git.protect_default_branch)||((_=d[1].data)==null?void 0:_.git.default_branch)!==((v=d[2])==null?void 0:v.id))?l?(l.p(d,p),p&7&&b(l,1)):(l=Ku(d),l.c(),b(l,1),l.m(r.parentNode,r)):l&&(de(),y(l,1,1,()=>{l=null}),me())},i(d){u||(b(e.$$.fragment,d),b(l),b(o.$$.fragment,d),u=!0)},o(d){y(e.$$.fragment,d),y(l),y(o.$$.fragment,d),u=!1},d(d){d&&(E(n),E(r),E(i),E(s)),N(e,d),l&&l.d(d),N(o,d)}}}function X2(t){let e,n;return e=new Th({props:{class:"border-b border-gray-300 px-2 pt-px",$$slots:{default:[Z2]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},p(r,[i]){const s={};i&39&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function J2(t,e,n){let r,i,s;J(t,ft,l=>n(0,r=l));const o=Ln();J(t,o,l=>n(1,i=l));const u=kt();return J(t,u,l=>n(2,s=l)),[r,i,s,o,u]}class x2 extends ve{constructor(e){super(),ye(this,e,J2,X2,fe,{})}}function ju(t){let e,n;return e=new w1({props:{"aria-label":"Save",title:"Save","aria-disabled":t[0]!==null&&t[3]?null:"true",$$slots:{default:[e0]},$$scope:{ctx:t}}}),e.$on("click",t[6]),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},p(r,i){const s={};i&9&&(s["aria-disabled"]=r[0]!==null&&r[3]?null:"true"),i&512&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function e0(t){let e,n;return e=new Ne({props:{path:$1}}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},p:ce,i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function t0(t){var i,s,o;let e,n,r=(!((i=t[2].data)!=null&&i.git.protect_default_branch)||((s=t[2].data)==null?void 0:s.git.default_branch)!==((o=t[1])==null?void 0:o.id))&&ju(t);return{c(){r&&r.c(),e=$e()},m(u,l){r&&r.m(u,l),w(u,e,l),n=!0},p(u,l){var a,f,c;!((a=u[2].data)!=null&&a.git.protect_default_branch)||((f=u[2].data)==null?void 0:f.git.default_branch)!==((c=u[1])==null?void 0:c.id)?r?(r.p(u,l),l&6&&b(r,1)):(r=ju(u),r.c(),b(r,1),r.m(e.parentNode,e)):r&&(de(),y(r,1,1,()=>{r=null}),me())},i(u){n||(b(r),n=!0)},o(u){y(r),n=!1},d(u){u&&E(e),r&&r.d(u)}}}function n0(t){let e,n;return e=new g1({props:{class:"border-b border-gray-300",$$slots:{default:[t0]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},p(r,[i]){const s={};i&527&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function r0(t,e,n){let r,i,s,o,u;J(t,ft,d=>n(7,r=d)),J(t,J1,d=>n(0,i=d)),J(t,iu,d=>n(3,u=d));const l=vt(),a=kt();J(t,a,d=>n(1,s=d));const f=Ln();J(t,f,d=>n(2,o=d));function c(){r!==null&&i!==null&&ff({action:"SaveCurrentFile",branch:s,filename:r.fullpath,data:i,callback(){iu.set(!1),(r.name==="uEdition.yml"||r.name==="uEdition.yaml"||r.name==="uEditor.yml"||r.name==="uEditor.yaml")&&l.invalidateQueries({queryKey:["configs"]})}})}return[i,s,o,u,a,f,c]}class i0 extends ve{constructor(e){super(),ye(this,e,r0,n0,fe,{})}}function s0(t){let e;return{c(){e=D("div"),I(e,"class","flex-1")},m(n,r){w(n,e,r)},i:ce,o:ce,d(n){n&&E(e)}}}function o0(t){let e;return{c(){e=D("div"),e.innerHTML='<p class="px-4 py-2">Please select the branch you wish to work on from the μEditor menu.</p>',I(e,"class","flex-1")},m(n,r){w(n,e,r)},i:ce,o:ce,d(n){n&&E(e)}}}function l0(t){let e,n,r,i,s;return n=new o2({}),i=new Cb({}),{c(){e=D("div"),H(n.$$.fragment),r=j(),H(i.$$.fragment),I(e,"class","flex flex-row flex-1 overflow-hidden")},m(o,u){w(o,e,u),M(n,e,null),F(e,r),M(i,e,null),s=!0},i(o){s||(b(n.$$.fragment,o),b(i.$$.fragment,o),s=!0)},o(o){y(n.$$.fragment,o),y(i.$$.fragment,o),s=!1},d(o){o&&E(e),N(n),N(i)}}}function qu(t){let e;return{c(){e=D("div"),e.textContent="This branch is protected and cannot be edited directly",I(e,"class","text-red-500")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function Wu(t){let e=t[5].fullpath+"",n;return{c(){n=Z(e)},m(r,i){w(r,n,i)},p(r,i){i&32&&e!==(e=r[5].fullpath+"")&&je(n,e)},d(r){r&&E(n)}}}function u0(t){var B,O,P;let e,n,r,i,s,o,u,l,a,f,c,d,p,m,_,v,g,h,k,A,S,C;document.title=e=t[0],o=new x2({}),l=new i0({});const L=[l0,o0,s0],R=[];function W(V,U){return V[1]!==null&&V[3].isSuccess?0:V[1]===null?1:2}f=W(t),c=R[f]=L[f](t);let K=((B=t[4].data)==null?void 0:B.git.protect_default_branch)&&((O=t[4].data)==null?void 0:O.git.default_branch)===((P=t[1])==null?void 0:P.id)&&qu(),T=t[5]&&Wu(t);return k=new g_({}),S=new db({}),{c(){n=D("link"),i=j(),s=D("main"),H(o.$$.fragment),u=j(),H(l.$$.fragment),a=j(),c.c(),d=j(),p=D("footer"),K&&K.c(),m=j(),_=D("div"),T&&T.c(),v=j(),g=D("div"),h=j(),H(k.$$.fragment),A=j(),H(S.$$.fragment),I(n,"rel","stylesheet"),I(n,"href",r="/api/branches/"+(t[1]!==null?t[1].id:"-")+"/configs/ui-stylesheet?timestamp="+t[2]),I(_,"class","font-mono font-bold"),I(g,"class","flex-1"),I(p,"class","flex flex-row space-x-4 px-2 py-1 border-t border-slate-300 text-sm items-center"),I(s,"class","flex flex-col w-screen h-screen overflow-hidden")},m(V,U){F(document.head,n),w(V,i,U),w(V,s,U),M(o,s,null),F(s,u),M(l,s,null),F(s,a),R[f].m(s,null),F(s,d),F(s,p),K&&K.m(p,null),F(p,m),F(p,_),T&&T.m(_,null),F(p,v),F(p,g),F(p,h),M(k,p,null),w(V,A,U),M(S,V,U),C=!0},p(V,[U]){var te,z,oe;(!C||U&1)&&e!==(e=V[0])&&(document.title=e),(!C||U&6&&r!==(r="/api/branches/"+(V[1]!==null?V[1].id:"-")+"/configs/ui-stylesheet?timestamp="+V[2]))&&I(n,"href",r);let ee=f;f=W(V),f!==ee&&(de(),y(R[ee],1,1,()=>{R[ee]=null}),me(),c=R[f],c||(c=R[f]=L[f](V),c.c()),b(c,1),c.m(s,d)),(te=V[4].data)!=null&&te.git.protect_default_branch&&((z=V[4].data)==null?void 0:z.git.default_branch)===((oe=V[1])==null?void 0:oe.id)?K||(K=qu(),K.c(),K.m(p,m)):K&&(K.d(1),K=null),V[5]?T?T.p(V,U):(T=Wu(V),T.c(),T.m(_,null)):T&&(T.d(1),T=null)},i(V){C||(b(o.$$.fragment,V),b(l.$$.fragment,V),b(c),b(k.$$.fragment,V),b(S.$$.fragment,V),C=!0)},o(V){y(o.$$.fragment,V),y(l.$$.fragment,V),y(c),y(k.$$.fragment,V),y(S.$$.fragment,V),C=!1},d(V){V&&(E(i),E(s),E(A)),E(n),N(o),N(l),R[f].d(),K&&K.d(),T&&T.d(),N(k),N(S,V)}}}function a0(t,e,n){let r,i,s,o,u,l;J(t,ft,_=>n(5,l=_));const a=bt("uEditionConfig"),f=bt("uEditorConfig");J(t,f,_=>n(3,o=_));const c=bt("currentBranch");J(t,c,_=>n(1,i=_));const d=Ln();J(t,d,_=>n(4,u=_));const p=ze(a,_=>_.isSuccess&&_.data.languages&&_.data.languages.length>0&&_.data.languages[0].code&&_.data.title&&_.data.title[_.data.languages[0].code]?"μEditor - "+_.data.title[_.data.languages[0].code]:"μEditor");J(t,p,_=>n(0,r=_));const m=ze(a,_=>new Date().getTime());return J(t,m,_=>n(2,s=_)),[r,i,s,o,u,l,f,c,d,p,m]}class f0 extends ve{constructor(e){super(),ye(this,e,a0,u0,fe,{})}}function Do(t,{delay:e=0,duration:n=400,easing:r=ns}={}){const i=+getComputedStyle(t).opacity;return{delay:e,duration:n,easing:r,css:s=>`opacity: ${s*i}`}}function Qu(t){let e;const n=t[2].default,r=pe(n,t,t[3],null);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&8)&&_e(r,n,i,i[3],e?he(n,i[3],s,null):ge(i[3]),null)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function c0(t){let e;return{c(){e=Z("μEditor not ready")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function d0(t){let e,n,r,i;return e=new Tt({props:{$$slots:{default:[c0]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=j(),r=D("div"),r.innerHTML=`<p>Unfortunately the μEditor server is not ready. Please check the server
|
|
18
|
-
logs to determine what the issue is.</p>`,I(r,"data-dialog-content-area","")},m(s,o){M(e,s,o),w(s,n,o),w(s,r,o),i=!0},p(s,o){const u={};o&8&&(u.$$scope={dirty:o,ctx:s}),e.$set(u)},i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),N(e,s)}}}function m0(t){let e,n,r,i;return e=new ki({props:{transition:Do}}),r=new vi({props:{"data-dialog-role":"error",class:"flex flex-col overflow-hidden",$$slots:{default:[d0]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=j(),H(r.$$.fragment)},m(s,o){M(e,s,o),w(s,n,o),M(r,s,o),i=!0},p(s,o){const u={};o&8&&(u.$$scope={dirty:o,ctx:s}),r.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),N(e,s),N(r,s)}}}function p0(t){let e,n,r,i;return e=new Ci({props:{class:"hidden"}}),r=new yi({props:{$$slots:{default:[m0]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=j(),H(r.$$.fragment)},m(s,o){M(e,s,o),w(s,n,o),M(r,s,o),i=!0},p(s,o){const u={};o&8&&(u.$$scope={dirty:o,ctx:s}),r.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),N(e,s),N(r,s)}}}function h0(t){let e,n,r,i=t[0].isSuccess&&Qu(t);return n=new oi({props:{open:t[0].isSuccess&&!t[0].data.ready,closeOnEscape:!1,closeOnOutsideClick:!1,$$slots:{default:[p0]},$$scope:{ctx:t}}}),{c(){i&&i.c(),e=j(),H(n.$$.fragment)},m(s,o){i&&i.m(s,o),w(s,e,o),M(n,s,o),r=!0},p(s,[o]){s[0].isSuccess?i?(i.p(s,o),o&1&&b(i,1)):(i=Qu(s),i.c(),b(i,1),i.m(e.parentNode,e)):i&&(de(),y(i,1,1,()=>{i=null}),me());const u={};o&1&&(u.open=s[0].isSuccess&&!s[0].data.ready),o&8&&(u.$$scope={dirty:o,ctx:s}),n.$set(u)},i(s){r||(b(i),b(n.$$.fragment,s),r=!0)},o(s){y(i),y(n.$$.fragment,s),r=!1},d(s){s&&E(e),i&&i.d(s),N(n,s)}}}function _0(t,e,n){let r,{$$slots:i={},$$scope:s}=e;const o=Ar({queryKey:[""],queryFn:cn,refetchInterval:6e4});return J(t,o,u=>n(0,r=u)),At("apiStatus",o),t.$$set=u=>{"$$scope"in u&&n(3,s=u.$$scope)},[r,o,i,s]}class g0 extends ve{constructor(e){super(),ye(this,e,_0,h0,fe,{})}}function b0(t){let e;return{c(){e=Z("Authenticating")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function y0(t){let e,n,r,i;return e=new Tt({props:{$$slots:{default:[b0]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=j(),r=D("div"),r.innerHTML="<p>You are being authenticated. Please wait.</p>",I(r,"data-dialog-content-area","")},m(s,o){M(e,s,o),w(s,n,o),w(s,r,o),i=!0},p(s,o){const u={};o&4096&&(u.$$scope={dirty:o,ctx:s}),e.$set(u)},i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),N(e,s)}}}function v0(t){let e,n,r,i;return e=new ki({props:{transition:Do,class:"z-40"}}),r=new vi({props:{class:"flex flex-col overflow-hidden z-50",$$slots:{default:[y0]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=j(),H(r.$$.fragment)},m(s,o){M(e,s,o),w(s,n,o),M(r,s,o),i=!0},p(s,o){const u={};o&4096&&(u.$$scope={dirty:o,ctx:s}),r.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),N(e,s),N(r,s)}}}function k0(t){let e,n,r,i;return e=new Ci({props:{class:"hidden"}}),r=new yi({props:{$$slots:{default:[v0]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=j(),H(r.$$.fragment)},m(s,o){M(e,s,o),w(s,n,o),M(r,s,o),i=!0},p(s,o){const u={};o&4096&&(u.$$scope={dirty:o,ctx:s}),r.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),N(e,s),N(r,s)}}}function C0(t){let e;return{c(){e=Z("Login")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function E0(t){let e;return{c(){e=D("div"),e.innerHTML='<p>Click on the link below to log in via GitHub.</p> <div class="my-8 text-center"><a href="/api/auth/oidc/login" data-button="">Log in via GitHub</a></div>',I(e,"data-dialog-content-area","")},m(n,r){w(n,e,r)},p:ce,d(n){n&&E(e)}}}function w0(t){let e,n,r,i,s,o,u,l,a,f,c,d,p,m,_,v,g=t[4].isError&&zu(),h=t[4].isError&&Gu();function k(C,L){return C[4].isPending?A0:O0}let A=k(t),S=A(t);return{c(){e=D("form"),n=D("label"),r=D("span"),r.textContent="E-Mail",i=j(),s=D("input"),o=j(),g&&g.c(),u=j(),l=D("label"),a=D("span"),a.textContent="Password",f=j(),c=D("input"),d=j(),h&&h.c(),p=j(),m=D("div"),S.c(),I(r,"data-form-field-label",""),I(s,"type","text"),I(s,"data-form-field-text",""),I(a,"data-form-field-label",""),I(c,"type","password"),I(c,"data-form-field-text",""),I(m,"data-dialog-buttons",""),I(e,"data-dialog-content-area","")},m(C,L){w(C,e,L),F(e,n),F(n,r),F(n,i),F(n,s),it(s,t[0]),F(n,o),g&&g.m(n,null),F(e,u),F(e,l),F(l,a),F(l,f),F(l,c),it(c,t[1]),F(l,d),h&&h.m(l,null),F(e,p),F(e,m),S.m(m,null),_||(v=[G(s,"input",t[9]),G(c,"input",t[10]),G(e,"submit",t[11])],_=!0)},p(C,L){L&1&&s.value!==C[0]&&it(s,C[0]),C[4].isError?g||(g=zu(),g.c(),g.m(n,null)):g&&(g.d(1),g=null),L&2&&c.value!==C[1]&&it(c,C[1]),C[4].isError?h||(h=Gu(),h.c(),h.m(l,null)):h&&(h.d(1),h=null),A!==(A=k(C))&&(S.d(1),S=A(C),S&&(S.c(),S.m(m,null)))},d(C){C&&E(e),g&&g.d(),h&&h.d(),S.d(),_=!1,Te(v)}}}function zu(t){let e;return{c(){e=D("span"),e.textContent="Incorred e-mail address or password",I(e,"data-form-field-error","")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function Gu(t){let e;return{c(){e=D("span"),e.textContent="Incorred e-mail address or password",I(e,"data-form-field-error","")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function O0(t){let e;return{c(){e=D("button"),e.textContent="Login",I(e,"type","submit"),I(e,"data-button","")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function A0(t){let e;return{c(){e=D("span"),e.textContent="Logging in...",I(e,"data-button",""),I(e,"class","inline-flex")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function T0(t){let e,n,r,i;e=new Tt({props:{$$slots:{default:[C0]},$$scope:{ctx:t}}});function s(l,a){var f,c;if(((f=l[3].data)==null?void 0:f.auth.provider)==="email-password")return w0;if(((c=l[3].data)==null?void 0:c.auth.provider)==="github")return E0}let o=s(t),u=o&&o(t);return{c(){H(e.$$.fragment),n=j(),u&&u.c(),r=$e()},m(l,a){M(e,l,a),w(l,n,a),u&&u.m(l,a),w(l,r,a),i=!0},p(l,a){const f={};a&4096&&(f.$$scope={dirty:a,ctx:l}),e.$set(f),o===(o=s(l))&&u?u.p(l,a):(u&&u.d(1),u=o&&o(l),u&&(u.c(),u.m(r.parentNode,r)))},i(l){i||(b(e.$$.fragment,l),i=!0)},o(l){y(e.$$.fragment,l),i=!1},d(l){l&&(E(n),E(r)),N(e,l),u&&u.d(l)}}}function $0(t){let e,n,r,i;return e=new ki({props:{transition:Do,class:"z-40"}}),r=new vi({props:{class:"flex flex-col overflow-hidden z-50",$$slots:{default:[T0]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=j(),H(r.$$.fragment)},m(s,o){M(e,s,o),w(s,n,o),M(r,s,o),i=!0},p(s,o){const u={};o&4123&&(u.$$scope={dirty:o,ctx:s}),r.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),N(e,s),N(r,s)}}}function S0(t){let e,n,r,i;return e=new Ci({props:{class:"hidden"}}),r=new yi({props:{$$slots:{default:[$0]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=j(),H(r.$$.fragment)},m(s,o){M(e,s,o),w(s,n,o),M(r,s,o),i=!0},p(s,o){const u={};o&4123&&(u.$$scope={dirty:o,ctx:s}),r.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),N(e,s),N(r,s)}}}function R0(t){let e,n,r,i,s;const o=t[8].default,u=pe(o,t,t[12],null);return n=new oi({props:{open:t[2]==="pending",closeOnEscape:!1,closeOnOutsideClick:!1,$$slots:{default:[k0]},$$scope:{ctx:t}}}),i=new oi({props:{open:t[2]==="error",closeOnEscape:!1,closeOnOutsideClick:!1,$$slots:{default:[S0]},$$scope:{ctx:t}}}),{c(){u&&u.c(),e=j(),H(n.$$.fragment),r=j(),H(i.$$.fragment)},m(l,a){u&&u.m(l,a),w(l,e,a),M(n,l,a),w(l,r,a),M(i,l,a),s=!0},p(l,[a]){u&&u.p&&(!s||a&4096)&&_e(u,o,l,l[12],s?he(o,l[12],a,null):ge(l[12]),null);const f={};a&4&&(f.open=l[2]==="pending"),a&4096&&(f.$$scope={dirty:a,ctx:l}),n.$set(f);const c={};a&4&&(c.open=l[2]==="error"),a&4123&&(c.$$scope={dirty:a,ctx:l}),i.$set(c)},i(l){s||(b(u,l),b(n.$$.fragment,l),b(i.$$.fragment,l),s=!0)},o(l){y(u,l),y(n.$$.fragment,l),y(i.$$.fragment,l),s=!1},d(l){l&&(E(e),E(r)),u&&u.d(l),N(n,l),N(i,l)}}}function D0(t,e,n){let r,i,s,{$$slots:o={},$$scope:u}=e;const l=vt(),a=Ln();J(t,a,h=>n(3,i=h));const f=Ar({queryKey:["auth","user"],queryFn:cn,retry:!1,refetchInterval:2e4});At("currentUser",f);const c=ze([a,f],([h,k])=>h.isSuccess?k.isSuccess?"authenticated":k.isError?h.data.auth.provider==="no-auth"||h.data.auth.provider==="email"?(window.fetch("/api/auth/login",{method:"POST"}).then(A=>{A.ok&&l.invalidateQueries({queryKey:["auth"]})}),"authenticating"):"error":k.status:h.status);J(t,c,h=>n(2,r=h));let d="",p="";const m=mi({mutationFn:async([h,k])=>{if((await window.fetch("/api/auth/login",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({email:h,password:k})})).ok)l.invalidateQueries({queryKey:["auth"]}),l.invalidateQueries({queryKey:["branches"]}),n(0,d=""),n(1,p="");else throw"Authentication failed"}});J(t,m,h=>n(4,s=h));function _(){d=this.value,n(0,d)}function v(){p=this.value,n(1,p)}const g=h=>{h.preventDefault(),s.isPending||s.mutate([d,p])};return t.$$set=h=>{"$$scope"in h&&n(12,u=h.$$scope)},[d,p,r,i,s,a,c,m,o,_,v,g,u]}class F0 extends ve{constructor(e){super(),ye(this,e,D0,R0,fe,{})}}function P0(t){let e;const n=t[1].default,r=pe(n,t,t[0],null);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,[s]){r&&r.p&&(!e||s&1)&&_e(r,n,i,i[0],e?he(n,i[0],s,null):ge(i[0]),null)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function L0(t,e,n){let{$$slots:r={},$$scope:i}=e;const s=af("branch"),o=Ln(),u=To(),l=ze([o,u],([m,_])=>({queryKey:["branches"],queryFn:cn,refetchInterval:6e4,enabled:m.isSuccess&&m.data.ready&&_.isSuccess})),a=Ar(l);At("branches",a);const f=Fe(null);At("currentBranch",f);const c=o.subscribe(m=>{m.isSuccess&&m.data.ready&&!m.data.git.enabled&&f.set({id:"-",nogit:!0,title:"All files"})}),d=f.subscribe(m=>{m!==null?uf("branch",m.id):X1("branch")}),p=a.subscribe(m=>{if(m.isSuccess){for(let _ of m.data.local)_.id===s&&f.set(_);p()}});return is(()=>{d(),c()}),t.$$set=m=>{"$$scope"in m&&n(0,i=m.$$scope)},[i,r]}class I0 extends ve{constructor(e){super(),ye(this,e,L0,P0,fe,{})}}function M0(t){let e;const n=t[1].default,r=pe(n,t,t[0],null);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,[s]){r&&r.p&&(!e||s&1)&&_e(r,n,i,i[0],e?he(n,i[0],s,null):ge(i[0]),null)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function N0(t,e,n){let{$$slots:r={},$$scope:i}=e;const s=kt(),o=ze(s,f=>f!==null?{queryKey:["branches",f.id,"configs","uedition"],queryFn:cn}:{queryKey:["branches","-","configs","uedition"],queryFn:cn,enabled:f!==null}),u=Ar(o);At("uEditionConfig",u);const l=ze(s,f=>f!==null?{queryKey:["branches",f.id,"configs","ueditor"],queryFn:cn}:{queryKey:["branches","-","configs","ueditor"],queryFn:cn,enabled:!1}),a=Ar(l);return At("uEditorConfig",a),t.$$set=f=>{"$$scope"in f&&n(0,i=f.$$scope)},[i,r]}class H0 extends ve{constructor(e){super(),ye(this,e,N0,M0,fe,{})}}function V0(t){let e,n;return e=new f0({}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function U0(t){let e,n;return e=new H0({props:{$$slots:{default:[V0]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},p(r,i){const s={};i&2&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function B0(t){let e,n;return e=new I0({props:{$$slots:{default:[U0]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},p(r,i){const s={};i&2&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function K0(t){let e,n;return e=new F0({props:{$$slots:{default:[B0]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},p(r,i){const s={};i&2&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function j0(t){let e,n;return e=new g0({props:{$$slots:{default:[K0]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},p(r,i){const s={};i&2&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function q0(t){let e,n;return e=new ac({props:{client:t[0],$$slots:{default:[j0]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},p(r,[i]){const s={};i&2&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function W0(t){return[new Ea]}class Q0 extends ve{constructor(e){super(),ye(this,e,W0,q0,fe,{})}}new Q0({target:document.getElementById("app")});export{fr as $,H as A,M as B,G as C,Ae as D,N as E,Te as F,M1 as G,U1 as H,Ne as I,$e as J,Ff as K,J1 as L,vt as M,ff as N,iu as O,Ut as P,Vt as Q,xb as R,ve as S,x as T,ty as U,pi as V,ry as W,Pe as X,ke as Y,Xe as Z,Fe as _,j as a,Tn as a$,ze as a0,Lt as a1,Dr as a2,Xn as a3,ei as a4,Fc as a5,Qi as a6,ar as a7,dc as a8,oy as a9,ny as aA,Qe as aB,ey as aC,_t as aD,sy as aE,ly as aF,si as aG,_i as aH,At as aI,gi as aJ,bt as aK,nf as aL,pe as aM,_e as aN,ge as aO,he as aP,Ke as aQ,Pn as aR,ie as aS,yt as aT,Oe as aU,le as aV,Ue as aW,Me as aX,Fn as aY,at as aZ,Dn as a_,Yr as aa,rt as ab,ae as ac,iy as ad,qt as ae,fc as af,Zs as ag,on as ah,Z0 as ai,X0 as aj,x0 as ak,J0 as al,ri as am,Ft as an,xe as ao,es as ap,Tr as aq,Sr as ar,gc as as,uy as at,Wo as au,xr as av,mt as aw,Ys as ax,gn as ay,go as az,I as b,wm as b0,tn as b1,ci as b2,cy as b3,fy as b4,Nb as b5,g1 as b6,w1 as b7,my as b8,dy as b9,py as ba,ay as bb,Hb as bc,hy as bd,Io as be,it as bf,B1 as bg,oi as bh,Ci as bi,yi as bj,ki as bk,vi as bl,Tt as bm,Mt as bn,G0 as bo,w as c,F as d,D as e,je as f,de as g,y as h,ye as i,me as j,b as k,E as l,J as m,ft as n,kt as o,rs as p,is as q,Ge as r,fe as s,Z as t,Ln as u,Ce as v,ce as w,V1 as x,F1 as y,I1 as z};
|