studiograph 1.3.44-next.2 → 1.3.44-next.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/server/routes/insights-api.js +7 -1
- package/dist/server/routes/insights-api.js.map +1 -1
- package/dist/services/auth-service.d.ts +2 -0
- package/dist/services/auth-service.js +15 -1
- package/dist/services/auth-service.js.map +1 -1
- package/dist/services/insights.js +52 -24
- package/dist/services/insights.js.map +1 -1
- package/dist/services/sync/model-factory.d.ts +6 -3
- package/dist/services/sync/model-factory.js +19 -5
- package/dist/services/sync/model-factory.js.map +1 -1
- package/dist/web/_app/immutable/assets/2.usgqms6b.css +1 -0
- package/dist/web/_app/immutable/assets/4.BZP82sm4.css +1 -0
- package/dist/web/_app/immutable/assets/{7.5LBMlZdT.css → 7.D55lTQ_F.css} +1 -1
- package/dist/web/_app/immutable/assets/8.DKYjn_lM.css +1 -0
- package/dist/web/_app/immutable/assets/ViewToolbar.CnlOM0gQ.css +1 -0
- package/dist/web/_app/immutable/chunks/{Sk0ODu4Y.js → B0qTqRR8.js} +1 -1
- package/dist/web/_app/immutable/chunks/B17cx9Sm.js +1 -0
- package/dist/web/_app/immutable/chunks/BC12QVnT.js +1 -0
- package/dist/web/_app/immutable/chunks/{vZ2iBqLE.js → BSBiehHY.js} +1 -1
- package/dist/web/_app/immutable/chunks/{APIqItee.js → BasUgd5N.js} +1 -1
- package/dist/web/_app/immutable/chunks/{DSh-OF2y.js → BenpwI6m.js} +1 -1
- package/dist/web/_app/immutable/chunks/BjAmYrTY.js +1 -0
- package/dist/web/_app/immutable/chunks/{BUcIsKRk.js → Bm1eIWxg.js} +1 -1
- package/dist/web/_app/immutable/chunks/{Bs4ovbtO.js → BoQu2xcr.js} +2 -2
- package/dist/web/_app/immutable/chunks/{DQJwHeKh.js → C3RWu-3l.js} +1 -1
- package/dist/web/_app/immutable/chunks/{DC9z5DEo.js → CDFdgZ9U.js} +1 -1
- package/dist/web/_app/immutable/chunks/CJdAJOAi.js +1 -0
- package/dist/web/_app/immutable/chunks/CLw5zKi0.js +1 -0
- package/dist/web/_app/immutable/chunks/{b0XUoOIH.js → COik51fd.js} +2 -2
- package/dist/web/_app/immutable/chunks/{CRnhIQbv.js → CStpN6HQ.js} +1 -1
- package/dist/web/_app/immutable/chunks/CbwDFpOn.js +1 -0
- package/dist/web/_app/immutable/chunks/{CFtRXHDP.js → CieeblIr.js} +1 -1
- package/dist/web/_app/immutable/chunks/{DiWKchgv.js → CyzLSh3b.js} +1 -1
- package/dist/web/_app/immutable/chunks/D4U_ZqJF.js +1 -0
- package/dist/web/_app/immutable/chunks/{BU2bHQbQ.js → D9gozPE-.js} +1 -1
- package/dist/web/_app/immutable/chunks/{DQ5NTKSo.js → DAD7hf2c.js} +1 -1
- package/dist/web/_app/immutable/chunks/DC1nGnOD.js +1 -0
- package/dist/web/_app/immutable/chunks/DN_2uSjw.js +1 -0
- package/dist/web/_app/immutable/chunks/DUemNi3j.js +1 -0
- package/dist/web/_app/immutable/chunks/{DodWDTE5.js → DgjlIhdd.js} +1 -1
- package/dist/web/_app/immutable/chunks/DkilSMcP.js +5 -0
- package/dist/web/_app/immutable/chunks/DkyV2KO_.js +1 -0
- package/dist/web/_app/immutable/chunks/DtsqpIgr.js +1 -0
- package/dist/web/_app/immutable/chunks/{DT3KtxWU.js → Dvv4bkXH.js} +1 -1
- package/dist/web/_app/immutable/chunks/{CSzKZPD4.js → DwG0Us6L.js} +1 -1
- package/dist/web/_app/immutable/chunks/{Diui_MO0.js → DxO4848T.js} +1 -1
- package/dist/web/_app/immutable/chunks/OFOivmhv.js +1 -0
- package/dist/web/_app/immutable/chunks/h2NtTN7K.js +1 -0
- package/dist/web/_app/immutable/chunks/owhS8Kw_.js +1 -0
- package/dist/web/_app/immutable/chunks/ujukzxos.js +1 -0
- package/dist/web/_app/immutable/chunks/{D-yNNNdf.js → wWaI7EIw.js} +1 -1
- package/dist/web/_app/immutable/entry/{app.DA5OyPOi.js → app.CU7TLhrM.js} +2 -2
- package/dist/web/_app/immutable/entry/start.DgZDAZcw.js +1 -0
- package/dist/web/_app/immutable/nodes/0.BDvk9PGI.js +2 -0
- package/dist/web/_app/immutable/nodes/{1.y3j9wcQE.js → 1.BIyCV821.js} +1 -1
- package/dist/web/_app/immutable/nodes/{10.D03BZcr1.js → 10.B1u2MAJO.js} +1 -1
- package/dist/web/_app/immutable/nodes/2.BTUKEVj1.js +84 -0
- package/dist/web/_app/immutable/nodes/3.B_Uwqq0c.js +1 -0
- package/dist/web/_app/immutable/nodes/4.BvQu9TFK.js +11 -0
- package/dist/web/_app/immutable/nodes/{5.CipwuwB3.js → 5.CexWzcG1.js} +1 -1
- package/dist/web/_app/immutable/nodes/{6.Daxwm3Lw.js → 6.BzUiTkSF.js} +1 -1
- package/dist/web/_app/immutable/nodes/7.CGDU7sfE.js +2 -0
- package/dist/web/_app/immutable/nodes/8.Cd-elUzW.js +1 -0
- package/dist/web/_app/immutable/nodes/{9.BuTZk7Le.js → 9.5wb2zwiT.js} +1 -1
- package/dist/web/_app/version.json +1 -1
- package/dist/web/index.html +11 -11
- package/package.json +1 -1
- package/dist/web/_app/immutable/assets/2.DNpjFx0k.css +0 -1
- package/dist/web/_app/immutable/assets/4.CjSyz-ka.css +0 -1
- package/dist/web/_app/immutable/assets/8.DfcI2i9H.css +0 -1
- package/dist/web/_app/immutable/assets/ViewToolbar.BX74Ki7U.css +0 -1
- package/dist/web/_app/immutable/chunks/0rsp5-Up.js +0 -1
- package/dist/web/_app/immutable/chunks/0wBGAod7.js +0 -1
- package/dist/web/_app/immutable/chunks/B3NI-DOv.js +0 -1
- package/dist/web/_app/immutable/chunks/BAAbylyg.js +0 -1
- package/dist/web/_app/immutable/chunks/BHue2Ock.js +0 -1
- package/dist/web/_app/immutable/chunks/BPXdu_FX.js +0 -1
- package/dist/web/_app/immutable/chunks/BgBJ0u3M.js +0 -1
- package/dist/web/_app/immutable/chunks/Bnl5ADsW.js +0 -1
- package/dist/web/_app/immutable/chunks/Bt5_mycY.js +0 -1
- package/dist/web/_app/immutable/chunks/By_Wtb5J.js +0 -1
- package/dist/web/_app/immutable/chunks/DCVmM0L5.js +0 -1
- package/dist/web/_app/immutable/chunks/DHtLlmE0.js +0 -1
- package/dist/web/_app/immutable/chunks/DQYNi3YK.js +0 -5
- package/dist/web/_app/immutable/chunks/DSkxw4Ss.js +0 -1
- package/dist/web/_app/immutable/chunks/DVx_0hnZ.js +0 -1
- package/dist/web/_app/immutable/chunks/KHKAD2Ng.js +0 -1
- package/dist/web/_app/immutable/chunks/azUmHUDT.js +0 -1
- package/dist/web/_app/immutable/chunks/lsAKkphT.js +0 -1
- package/dist/web/_app/immutable/entry/start.DTjSVtws.js +0 -1
- package/dist/web/_app/immutable/nodes/0.BIvpQ3Qk.js +0 -2
- package/dist/web/_app/immutable/nodes/2.Du0xZVQg.js +0 -84
- package/dist/web/_app/immutable/nodes/3.weQEi2lI.js +0 -1
- package/dist/web/_app/immutable/nodes/4.DJyhWznw.js +0 -11
- package/dist/web/_app/immutable/nodes/7.TxeJDMtw.js +0 -2
- package/dist/web/_app/immutable/nodes/8.DWNdmB4l.js +0 -1
- /package/dist/web/_app/immutable/assets/{checkbox.D6tMDJWk.css → index.D6tMDJWk.css} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{bB as Le,aD as Ge,e as A,g as U,s as P,aE as ne,bC as vt}from"./DSh-OF2y.js";class Ae{constructor(t,n){this.status=t,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${t}`}}toString(){return JSON.stringify(this.body)}}class Ue{constructor(t,n){this.status=t,this.location=n}}class Pe extends Error{constructor(t,n,r){super(r),this.status=t,this.text=n}}new URL("sveltekit-internal://");function wt(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function yt(e){return e.split("%25").map(decodeURI).join("%25")}function bt(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function me({href:e}){return e.split("#")[0]}function kt(e,t,n,r=!1){const a=new URL(e);Object.defineProperty(a,"searchParams",{value:new Proxy(a.searchParams,{get(s,o){if(o==="get"||o==="getAll"||o==="has")return(c,...d)=>(n(c),s[o](c,...d));t();const l=Reflect.get(s,o);return typeof l=="function"?l.bind(s):l}}),enumerable:!0,configurable:!0});const i=["href","pathname","search","toString","toJSON"];r&&i.push("hash");for(const s of i)Object.defineProperty(a,s,{get(){return t(),e[s]},enumerable:!0,configurable:!0});return a}function Et(...e){let t=5381;for(const n of e)if(typeof n=="string"){let r=n.length;for(;r;)t=t*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)t=t*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}new TextEncoder;new TextDecoder;function St(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}const Rt=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||"GET")!=="GET"&&G.delete(Te(e)),Rt(e,t));const G=new Map;function xt(e,t){const n=Te(e,t),r=document.querySelector(n);if(r?.textContent){r.remove();let{body:a,...i}=JSON.parse(r.textContent);const s=r.getAttribute("data-ttl");return s&&G.set(n,{body:a,init:i,ttl:1e3*Number(s)}),r.getAttribute("data-b64")!==null&&(a=St(a)),Promise.resolve(new Response(a,i))}return window.fetch(e,t)}function Lt(e,t,n){if(G.size>0){const r=Te(e,n),a=G.get(r);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(n?.cache))return new Response(a.body,a.init);G.delete(r)}}return window.fetch(t,n)}function Te(e,t){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){const a=[];t.headers&&a.push([...new Headers(t.headers)].join(",")),t.body&&(typeof t.body=="string"||ArrayBuffer.isView(t.body))&&a.push(t.body),r+=`[data-hash="${Et(...a)}"]`}return r}const At=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function Ut(e){const t=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${Tt(e).map(r=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return t.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const i=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(i)return t.push({name:i[1],matcher:i[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const s=r.split(/\[(.+?)\](?!\])/);return"/"+s.map((l,c)=>{if(c%2){if(l.startsWith("x+"))return _e(String.fromCharCode(parseInt(l.slice(2),16)));if(l.startsWith("u+"))return _e(String.fromCharCode(...l.slice(2).split("-").map(v=>parseInt(v,16))));const d=At.exec(l),[,p,f,u,h]=d;return t.push({name:u,matcher:h,optional:!!p,rest:!!f,chained:f?c===1&&s[0]==="":!1}),f?"([^]*?)":p?"([^/]*)?":"([^/]+?)"}return _e(l)}).join("")}).join("")}/?$`),params:t}}function Pt(e){return e!==""&&!/^\([^)]+\)$/.test(e)}function Tt(e){return e.slice(1).split("/").filter(Pt)}function It(e,t,n){const r={},a=e.slice(1),i=a.filter(o=>o!==void 0);let s=0;for(let o=0;o<t.length;o+=1){const l=t[o];let c=a[o-s];if(l.chained&&l.rest&&s&&(c=a.slice(o-s,o+1).filter(d=>d).join("/"),s=0),c===void 0)if(l.rest)c="";else continue;if(!l.matcher||n[l.matcher](c)){r[l.name]=c;const d=t[o+1],p=a[o+1];d&&!d.rest&&d.optional&&p&&l.chained&&(s=0),!d&&!p&&Object.keys(r).length===i.length&&(s=0);continue}if(l.optional&&l.chained){s++;continue}return}if(!s)return r}function _e(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Ot({nodes:e,server_loads:t,dictionary:n,matchers:r}){const a=new Set(t);return Object.entries(n).map(([o,[l,c,d]])=>{const{pattern:p,params:f}=Ut(o),u={id:o,exec:h=>{const v=p.exec(h);if(v)return It(v,f,r)},errors:[1,...d||[]].map(h=>e[h]),layouts:[0,...c||[]].map(s),leaf:i(l)};return u.errors.length=u.layouts.length=Math.max(u.errors.length,u.layouts.length),u});function i(o){const l=o<0;return l&&(o=~o),[l,e[o]]}function s(o){return o===void 0?o:[a.has(o),e[o]]}}function Xe(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function Me(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}const x=globalThis.__sveltekit_uvehpy?.base??"",Ct=globalThis.__sveltekit_uvehpy?.assets??x??"",$t="1774804755940",Qe="sveltekit:snapshot",Ze="sveltekit:scroll",et="sveltekit:states",jt="sveltekit:pageurl",B="sveltekit:history",H="sveltekit:navigation",N={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},he=location.origin;function Ie(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){const n=document.getElementsByTagName("base");t=n.length?n[0].href:document.URL}return new URL(e,t)}function D(){return{x:pageXOffset,y:pageYOffset}}function V(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const He={...N,"":N.hover};function tt(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function nt(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=tt(e)}}function be(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const o=location.hash.split("#")[1]||"/";r.hash=`#${o}${r.hash}`}}catch{}const a=e instanceof SVGAElement?e.target.baseVal:e.target,i=!r||!!a||pe(r,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),s=r?.origin===he&&e.hasAttribute("download");return{url:r,external:i,target:a,download:s}}function re(e){let t=null,n=null,r=null,a=null,i=null,s=null,o=e;for(;o&&o!==document.documentElement;)r===null&&(r=V(o,"preload-code")),a===null&&(a=V(o,"preload-data")),t===null&&(t=V(o,"keepfocus")),n===null&&(n=V(o,"noscroll")),i===null&&(i=V(o,"reload")),s===null&&(s=V(o,"replacestate")),o=tt(o);function l(c){switch(c){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:He[r??"off"],preload_data:He[a??"off"],keepfocus:l(t),noscroll:l(n),reload:l(i),replace_state:l(s)}}function We(e){const t=Le(e);let n=!0;function r(){n=!0,t.update(s=>s)}function a(s){n=!1,t.set(s)}function i(s){let o;return t.subscribe(l=>{(o===void 0||n&&l!==o)&&s(o=l)})}return{notify:r,set:a,subscribe:i}}const rt={v:()=>{}};function Nt(){const{set:e,subscribe:t}=Le(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${Ct}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const s=(await a.json()).version!==$t;return s&&(e(!0),rt.v(),clearTimeout(n)),s}catch{return!1}}return{subscribe:t,check:r}}function pe(e,t,n){return e.origin!==he||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function cn(e){}const at=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...at];const Dt=new Set([...at]);[...Dt];function qt(e){return e.filter(t=>t!=null)}function Oe(e){return e instanceof Ae||e instanceof Pe?e.status:500}function Vt(e){return e instanceof Pe?e.text:"Internal Error"}let b,W,ve;const Bt=Ge.toString().includes("$$")||/function \w+\(\) \{\}/.test(Ge.toString());Bt?(b={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},W={current:null},ve={current:!1}):(b=new class{#e=A({});get data(){return U(this.#e)}set data(t){P(this.#e,t)}#t=A(null);get form(){return U(this.#t)}set form(t){P(this.#t,t)}#n=A(null);get error(){return U(this.#n)}set error(t){P(this.#n,t)}#r=A({});get params(){return U(this.#r)}set params(t){P(this.#r,t)}#a=A({id:null});get route(){return U(this.#a)}set route(t){P(this.#a,t)}#o=A({});get state(){return U(this.#o)}set state(t){P(this.#o,t)}#s=A(-1);get status(){return U(this.#s)}set status(t){P(this.#s,t)}#i=A(new URL("https://example.com"));get url(){return U(this.#i)}set url(t){P(this.#i,t)}},W=new class{#e=A(null);get current(){return U(this.#e)}set current(t){P(this.#e,t)}},ve=new class{#e=A(!1);get current(){return U(this.#e)}set current(t){P(this.#e,t)}},rt.v=()=>ve.current=!0);function ot(e){Object.assign(b,e)}const Je={spanContext(){return Kt},setAttribute(){return this},setAttributes(){return this},addEvent(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording(){return!1},recordException(){return this},addLink(){return this},addLinks(){return this}},Kt={traceId:"",spanId:"",traceFlags:0},Ft=new Set(["icon","shortcut icon","apple-touch-icon"]),j=Xe(Ze)??{},J=Xe(Qe)??{},$={url:We({}),page:We({}),navigating:Le(null),updated:Nt()};function Ce(e){j[e]=D()}function Gt(e,t){let n=e+1;for(;j[n];)delete j[n],n+=1;for(n=t+1;J[n];)delete J[n],n+=1}function Y(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(()=>{})}async function st(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(x||"/");e&&await e.update()}}function ke(){}let $e,Ee,ae,T,Se,w;const oe=[],se=[];let L=null;function ie(){L?.fork?.then(e=>e?.discard()),L=null}const te=new Map,it=new Set,Mt=new Set,M=new Set;let _={branch:[],error:null,url:null},lt=!1,le=!1,Ye=!0,z=!1,F=!1,ct=!1,Q=!1,je,y,R,I;const ce=new Set;let we;const ue=new Map;async function hn(e,t,n){globalThis.__sveltekit_uvehpy?.data&&globalThis.__sveltekit_uvehpy.data,document.URL!==location.href&&(location.href=location.href),w=e,await e.hooks.init?.(),$e=Ot(e),T=document.documentElement,Se=t,Ee=e.nodes[0],ae=e.nodes[1],Ee(),ae(),y=history.state?.[B],R=history.state?.[H],y||(y=R=Date.now(),history.replaceState({...history.state,[B]:y,[H]:R},""));const r=j[y];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await rn(Se,n)):(await K({type:"enter",url:Ie(w.hash?sn(new URL(location.href)):location.href),replace_state:!0}),a()),nn()}async function Ht(e=!0,t=!0){if(await(we||=Promise.resolve()),!we)return;we=null;const n=I={},r=await Z(_.url,!0);if(ie(),Q&&ue.forEach(({resource:a})=>{a.refresh?.()}),e){const a=b.state,i=r&&await Ve(r);if(!i||n!==I)return;if(i.type==="redirect")return Ne(new URL(i.location,_.url).href,{replaceState:!0},1,n);t||(i.props.page.state=a),ot(i.props.page),_=i.state,Re(),je.$set(i.props)}else Re();await Promise.all([...ue.values()].map(({resource:a})=>a)).catch(ke)}function Re(){oe.length=0,Q=!1}function ut(e){se.some(t=>t?.snapshot)&&(J[e]=se.map(t=>t?.snapshot?.capture()))}function ft(e){J[e]?.forEach((t,n)=>{se[n]?.snapshot?.restore(t)})}function ze(){Ce(y),Me(Ze,j),ut(R),Me(Qe,J)}async function Ne(e,t,n,r){let a;t.invalidateAll&&ie(),await K({type:"goto",url:Ie(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{t.invalidateAll&&(Q=!0,a=[...ue.keys()]),t.invalidate&&t.invalidate.forEach(tn)}}),t.invalidateAll&&ne().then(ne).then(()=>{ue.forEach(({resource:i},s)=>{a?.includes(s)&&i.refresh?.()})})}async function Wt(e){if(e.id!==L?.id){ie();const t={};ce.add(t),L={id:e.id,token:t,promise:Ve({...e,preload:t}).then(n=>(ce.delete(t),n.type==="loaded"&&n.state.error&&ie(),n)),fork:null}}return L.promise}async function ye(e){const t=(await Z(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].filter(Boolean).map(n=>n[1]()))}async function dt(e,t,n){_=e.state;const r=document.querySelector("style[data-sveltekit]");if(r&&r.remove(),Object.assign(b,e.props.page),je=new w.root({target:t,props:{...e.props,stores:$,components:se},hydrate:n,sync:!1}),await Promise.resolve(),ft(R),n){const a={from:null,to:{params:_.params,route:{id:_.route?.id??null},url:new URL(location.href),scroll:j[y]??D()},willUnload:!1,type:"enter",complete:Promise.resolve()};M.forEach(i=>i(a))}le=!0}function fe({url:e,params:t,branch:n,status:r,error:a,route:i,form:s}){let o="never";if(x&&(e.pathname===x||e.pathname===x+"/"))o="always";else for(const u of n)u?.slash!==void 0&&(o=u.slash);e.pathname=wt(e.pathname,o),e.search=e.search;const l={type:"loaded",state:{url:e,params:t,branch:n,error:a,route:i},props:{constructors:qt(n).map(u=>u.node.component),page:Fe(b)}};s!==void 0&&(l.props.form=s);let c={},d=!b,p=0;for(let u=0;u<Math.max(n.length,_.branch.length);u+=1){const h=n[u],v=_.branch[u];h?.data!==v?.data&&(d=!0),h&&(c={...c,...h.data},d&&(l.props[`data_${p}`]=c),p+=1)}return(!_.url||e.href!==_.url.href||_.error!==a||s!==void 0&&s!==b.form||d)&&(l.props.page={error:a,params:t,route:{id:i?.id??null},state:{},status:r,url:new URL(e),form:s??null,data:d?c:b.data}),l}async function De({loader:e,parent:t,url:n,params:r,route:a,server_data_node:i}){let s=null,o=!0;const l={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},c=await e();if(c.universal?.load){let d=function(...f){for(const u of f){const{href:h}=new URL(u,n);l.dependencies.add(h)}};const p={tracing:{enabled:!1,root:Je,current:Je},route:new Proxy(a,{get:(f,u)=>(o&&(l.route=!0),f[u])}),params:new Proxy(r,{get:(f,u)=>(o&&l.params.add(u),f[u])}),data:i?.data??null,url:kt(n,()=>{o&&(l.url=!0)},f=>{o&&l.search_params.add(f)},w.hash),async fetch(f,u){f instanceof Request&&(u={body:f.method==="GET"||f.method==="HEAD"?void 0:await f.blob(),cache:f.cache,credentials:f.credentials,headers:[...f.headers].length>0?f?.headers:void 0,integrity:f.integrity,keepalive:f.keepalive,method:f.method,mode:f.mode,redirect:f.redirect,referrer:f.referrer,referrerPolicy:f.referrerPolicy,signal:f.signal,...u});const{resolved:h,promise:v}=ht(f,u,n);return o&&d(h.href),v},setHeaders:()=>{},depends:d,parent(){return o&&(l.parent=!0),t()},untrack(f){o=!1;try{return f()}finally{o=!0}}};s=await c.universal.load.call(null,p)??null}return{node:c,loader:e,server:i,universal:c.universal?.load?{type:"data",data:s,uses:l}:null,data:s??i?.data??null,slash:c.universal?.trailingSlash??i?.slash}}function ht(e,t,n){let r=e instanceof Request?e.url:e;const a=new URL(r,n);a.origin===n.origin&&(r=a.href.slice(n.origin.length));const i=le?Lt(r,a.href,t):xt(r,t);return{resolved:a,promise:i}}function Jt(e,t,n,r,a,i){if(Q)return!0;if(!a)return!1;if(a.parent&&e||a.route&&t||a.url&&n)return!0;for(const s of a.search_params)if(r.has(s))return!0;for(const s of a.params)if(i[s]!==_.params[s])return!0;for(const s of a.dependencies)if(oe.some(o=>o(new URL(s))))return!0;return!1}function qe(e,t){return e?.type==="data"?e:e?.type==="skip"?t??null:null}function Yt(e,t){if(!e)return new Set(t.searchParams.keys());const n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(const r of n){const a=e.searchParams.getAll(r),i=t.searchParams.getAll(r);a.every(s=>i.includes(s))&&i.every(s=>a.includes(s))&&n.delete(r)}return n}function zt({error:e,url:t,route:n,params:r}){return{type:"loaded",state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:Fe(b),constructors:[]}}}async function Ve({id:e,invalidating:t,url:n,params:r,route:a,preload:i}){if(L?.id===e)return ce.delete(L.token),L.promise;const{errors:s,layouts:o,leaf:l}=a,c=[...o,l];s.forEach(m=>m?.().catch(()=>{})),c.forEach(m=>m?.[1]().catch(()=>{}));const d=_.url?e!==de(_.url):!1,p=_.route?a.id!==_.route.id:!1,f=Yt(_.url,n);let u=!1;const h=c.map(async(m,g)=>{if(!m)return;const E=_.branch[g];return m[1]===E?.loader&&!Jt(u,p,d,f,E.universal?.uses,r)?E:(u=!0,De({loader:m[1],url:n,params:r,route:a,parent:async()=>{const O={};for(let C=0;C<g;C+=1)Object.assign(O,(await h[C])?.data);return O},server_data_node:qe(m[0]?{type:"skip"}:null,m[0]?E?.server:void 0)}))});for(const m of h)m.catch(()=>{});const v=[];for(let m=0;m<c.length;m+=1)if(c[m])try{v.push(await h[m])}catch(g){if(g instanceof Ue)return{type:"redirect",location:g.location};if(ce.has(i))return zt({error:await X(g,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let E=Oe(g),S;if(g instanceof Ae)S=g.body;else{if(await $.updated.check())return await st(),await Y(n);S=await X(g,{params:r,url:n,route:{id:a.id}})}const O=await Xt(m,v,s);return O?fe({url:n,params:r,branch:v.slice(0,O.idx).concat(O.node),status:E,error:S,route:a}):await gt(n,{id:a.id},S,E)}else v.push(void 0);return fe({url:n,params:r,branch:v,status:200,error:null,route:a,form:t?void 0:null})}async function Xt(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)r-=1;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function Be({status:e,error:t,url:n,route:r}){const a={};let i=null;try{const s=await De({loader:Ee,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:qe(i)}),o={node:await ae(),loader:ae,universal:null,server:null,data:null};return fe({url:n,params:a,branch:[s,o],status:e,error:t,route:null})}catch(s){if(s instanceof Ue)return Ne(new URL(s.location,location.href),{},0);throw s}}async function Qt(e){const t=e.href;if(te.has(t))return te.get(t);let n;try{const r=(async()=>{let a=await w.hooks.reroute({url:new URL(e),fetch:async(i,s)=>ht(i,s,e).promise})??e;if(typeof a=="string"){const i=new URL(e);w.hash?i.hash=a:i.pathname=a,a=i}return a})();te.set(t,r),n=await r}catch{te.delete(t);return}return n}async function Z(e,t){if(e&&!pe(e,x,w.hash)){const n=await Qt(e);if(!n)return;const r=Zt(n);for(const a of $e){const i=a.exec(r);if(i)return{id:de(e),invalidating:t,route:a,params:bt(i),url:e}}}}function Zt(e){return yt(w.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(x.length))||"/"}function de(e){return(w.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function pt({url:e,type:t,intent:n,delta:r,event:a,scroll:i}){let s=!1;const o=Ke(_,n,e,t,i??null);r!==void 0&&(o.navigation.delta=r),a!==void 0&&(o.navigation.event=a);const l={...o.navigation,cancel:()=>{s=!0,o.reject(new Error("navigation cancelled"))}};return z||it.forEach(c=>c(l)),s?null:o}async function K({type:e,url:t,popped:n,keepfocus:r,noscroll:a,replace_state:i,state:s={},redirect_count:o=0,nav_token:l={},accept:c=ke,block:d=ke,event:p}){const f=I;I=l;const u=await Z(t,!1),h=e==="enter"?Ke(_,u,t,e):pt({url:t,type:e,delta:n?.delta,intent:u,scroll:n?.scroll,event:p});if(!h){d(),I===l&&(I=f);return}const v=y,m=R;c(),z=!0,le&&h.navigation.type!=="enter"&&$.navigating.set(W.current=h.navigation);let g=u&&await Ve(u);if(!g){if(pe(t,x,w.hash))return await Y(t,i);g=await gt(t,{id:null},await X(new Pe(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404,i)}if(t=u?.url||t,I!==l)return h.reject(new Error("navigation aborted")),!1;if(g.type==="redirect"){if(o<20){await K({type:e,url:new URL(g.location,t),popped:n,keepfocus:r,noscroll:a,replace_state:i,state:s,redirect_count:o+1,nav_token:l}),h.fulfil(void 0);return}g=await Be({status:500,error:await X(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}})}else g.props.page.status>=400&&await $.updated.check()&&(await st(),await Y(t,i));if(Re(),Ce(v),ut(m),g.props.page.url.pathname!==t.pathname&&(t.pathname=g.props.page.url.pathname),s=n?n.state:s,!n){const k=i?0:1,ee={[B]:y+=k,[H]:R+=k,[et]:s};(i?history.replaceState:history.pushState).call(history,ee,"",t),i||Gt(y,R)}const E=u&&L?.id===u.id?L.fork:null;L=null,g.props.page.state=s;let S;if(le){const k=(await Promise.all(Array.from(Mt,q=>q(h.navigation)))).filter(q=>typeof q=="function");if(k.length>0){let q=function(){k.forEach(ge=>{M.delete(ge)})};k.push(q),k.forEach(ge=>{M.add(ge)})}_=g.state,g.props.page&&(g.props.page.url=t);const ee=E&&await E;ee?S=ee.commit():(je.$set(g.props),ot(g.props.page),S=vt?.()),ct=!0}else await dt(g,Se,!1);const{activeElement:O}=document;await S,await ne(),await ne();let C=null;if(Ye){const k=n?n.scroll:a?D():null;k?scrollTo(k.x,k.y):(C=t.hash&&document.getElementById(mt(t)))?C.scrollIntoView():scrollTo(0,0)}const _t=document.activeElement!==O&&document.activeElement!==document.body;!r&&!_t&&on(t,!C),Ye=!0,g.props.page&&Object.assign(b,g.props.page),z=!1,e==="popstate"&&ft(R),h.fulfil(void 0),h.navigation.to&&(h.navigation.to.scroll=D()),M.forEach(k=>k(h.navigation)),$.navigating.set(W.current=null)}async function gt(e,t,n,r,a){return e.origin===he&&e.pathname===location.pathname&&!lt?await Be({status:r,error:n,url:e,route:t}):await Y(e,a)}function en(){let e,t={element:void 0,href:void 0},n;T.addEventListener("mousemove",o=>{const l=o.target;clearTimeout(e),e=setTimeout(()=>{i(l,N.hover)},20)});function r(o){o.defaultPrevented||i(o.composedPath()[0],N.tap)}T.addEventListener("mousedown",r),T.addEventListener("touchstart",r,{passive:!0});const a=new IntersectionObserver(o=>{for(const l of o)l.isIntersecting&&(ye(new URL(l.target.href)),a.unobserve(l.target))},{threshold:0});async function i(o,l){const c=nt(o,T),d=c===t.element&&c?.href===t.href&&l>=n;if(!c||d)return;const{url:p,external:f,download:u}=be(c,x,w.hash);if(f||u)return;const h=re(c),v=p&&de(_.url)===de(p);if(!(h.reload||v))if(l<=h.preload_data){t={element:c,href:c.href},n=N.tap;const m=await Z(p,!1);if(!m)return;Wt(m)}else l<=h.preload_code&&(t={element:c,href:c.href},n=l,ye(p))}function s(){a.disconnect();for(const o of T.querySelectorAll("a")){const{url:l,external:c,download:d}=be(o,x,w.hash);if(c||d)continue;const p=re(o);p.reload||(p.preload_code===N.viewport&&a.observe(o),p.preload_code===N.eager&&ye(l))}}M.add(s),s()}function X(e,t){if(e instanceof Ae)return e.body;const n=Oe(e),r=Vt(e);return w.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function pn(e,t={}){return e=new URL(Ie(e)),e.origin!==he?Promise.reject(new Error("goto: invalid URL")):Ne(e,t,0)}function tn(e){if(typeof e=="function")oe.push(e);else{const{href:t}=new URL(e,location.href);oe.push(n=>n.href===t)}}function gn(){return Q=!0,Ht()}function nn(){history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let n=!1;if(ze(),!z){const r=Ke(_,void 0,null,"leave"),a={...r.navigation,cancel:()=>{n=!0,r.reject(new Error("navigation cancelled"))}};it.forEach(i=>i(a))}n?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&ze()}),navigator.connection?.saveData||en(),T.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const n=nt(t.composedPath()[0],T);if(!n)return;const{url:r,external:a,target:i,download:s}=be(n,x,w.hash);if(!r)return;if(i==="_parent"||i==="_top"){if(window.parent!==window)return}else if(i&&i!=="_self")return;const o=re(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol==="https:"||r.protocol==="http:")||s)return;const[c,d]=(w.hash?r.hash.replace(/^#/,""):r.href).split("#"),p=c===me(location);if(a||o.reload&&(!p||!d)){pt({url:r,type:"link",event:t})?z=!0:t.preventDefault();return}if(d!==void 0&&p){const[,f]=_.url.href.split("#");if(f===d){if(t.preventDefault(),d===""||d==="top"&&n.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const u=n.ownerDocument.getElementById(decodeURIComponent(d));u&&(u.scrollIntoView(),u.focus())}return}if(F=!0,Ce(y),e(r),!o.replace_state)return;F=!1}t.preventDefault(),await new Promise(f=>{requestAnimationFrame(()=>{setTimeout(f,0)}),setTimeout(f,100)}),await K({type:"link",url:r,keepfocus:o.keepfocus,noscroll:o.noscroll,replace_state:o.replace_state??r.href===location.href,event:t})}),T.addEventListener("submit",t=>{if(t.defaultPrevented)return;const n=HTMLFormElement.prototype.cloneNode.call(t.target),r=t.submitter;if((r?.formTarget||n.target)==="_blank"||(r?.formMethod||n.method)!=="get")return;const s=new URL(r?.hasAttribute("formaction")&&r?.formAction||n.action);if(pe(s,x,!1))return;const o=t.target,l=re(o);if(l.reload)return;t.preventDefault(),t.stopPropagation();const c=new FormData(o,r);s.search=new URLSearchParams(c).toString(),K({type:"form",url:s,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??s.href===location.href,event:t})}),addEventListener("popstate",async t=>{if(!xe){if(t.state?.[B]){const n=t.state[B];if(I={},n===y)return;const r=j[n],a=t.state[et]??{},i=new URL(t.state[jt]??location.href),s=t.state[H],o=_.url?me(location)===me(_.url):!1;if(s===R&&(ct||o)){a!==b.state&&(b.state=a),e(i),j[y]=D(),r&&scrollTo(r.x,r.y),y=n;return}const c=n-y;await K({type:"popstate",url:i,popped:{state:a,scroll:r,delta:c},accept:()=>{y=n,R=s},block:()=>{history.go(-c)},nav_token:I,event:t})}else if(!F){const n=new URL(location.href);e(n),w.hash&&location.reload()}}}),addEventListener("hashchange",()=>{F&&(F=!1,history.replaceState({...history.state,[B]:++y,[H]:R},"",location.href))});for(const t of document.querySelectorAll("link"))Ft.has(t.rel)&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&$.navigating.set(W.current=null)});function e(t){_.url=b.url=t,$.page.set(Fe(b)),$.page.notify()}}async function rn(e,{status:t=200,error:n,node_ids:r,params:a,route:i,server_route:s,data:o,form:l}){lt=!0;const c=new URL(location.href);let d;({params:a={},route:i={id:null}}=await Z(c,!1)||{}),d=$e.find(({id:u})=>u===i.id);let p,f=!0;try{const u=r.map(async(v,m)=>{const g=o[m];return g?.uses&&(g.uses=an(g.uses)),De({loader:w.nodes[v],url:c,params:a,route:i,parent:async()=>{const E={};for(let S=0;S<m;S+=1)Object.assign(E,(await u[S]).data);return E},server_data_node:qe(g)})}),h=await Promise.all(u);if(d){const v=d.layouts;for(let m=0;m<v.length;m++)v[m]||h.splice(m,0,void 0)}p=fe({url:c,params:a,branch:h,status:t,error:n,form:l,route:d??null})}catch(u){if(u instanceof Ue){await Y(new URL(u.location,location.href));return}p=await Be({status:Oe(u),error:await X(u,{url:c,params:a,route:i}),url:c,route:i}),e.textContent="",f=!1}p.props.page&&(p.props.page.state={}),await dt(p,e,f)}function an(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}let xe=!1;function on(e,t=!0){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const r=mt(e);if(r&&document.getElementById(r)){const{x:i,y:s}=D();setTimeout(()=>{const o=history.state;xe=!0,location.replace(new URL(`#${r}`,location.href)),history.replaceState(o,"",e),t&&scrollTo(i,s),xe=!1})}else{const i=document.body,s=i.getAttribute("tabindex");i.tabIndex=-1,i.focus({preventScroll:!0,focusVisible:!1}),s!==null?i.setAttribute("tabindex",s):i.removeAttribute("tabindex")}const a=getSelection();if(a&&a.type!=="None"){const i=[];for(let s=0;s<a.rangeCount;s+=1)i.push(a.getRangeAt(s));setTimeout(()=>{if(a.rangeCount===i.length){for(let s=0;s<a.rangeCount;s+=1){const o=i[s],l=a.getRangeAt(s);if(o.commonAncestorContainer!==l.commonAncestorContainer||o.startContainer!==l.startContainer||o.endContainer!==l.endContainer||o.startOffset!==l.startOffset||o.endOffset!==l.endOffset)return}a.removeAllRanges()}})}}}function Ke(e,t,n,r,a=null){let i,s;const o=new Promise((c,d)=>{i=c,s=d});return o.catch(()=>{}),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url,scroll:D()},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n,scroll:a},willUnload:!t,type:r,complete:o},fulfil:i,reject:s}}function Fe(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function sn(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function mt(e){let t;if(w.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{hn as a,pn as g,gn as i,cn as l,b as p,$ as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as S}from"./CFtRXHDP.js";import{c as _,a as h,p as Q,b as D}from"./b0XUoOIH.js";import{a4 as y,g as s,s as P,e as R,p as C,a0 as m,b as O,ae as z,c as M,r as K,a3 as at}from"./DSh-OF2y.js";import{c as J}from"./DCVmM0L5.js";import{p as l,r as A,s as k}from"./D-yNNNdf.js";import{s as I,a as j}from"./CRnhIQbv.js";import{C as kt,s as q,L as nt,w as it,v as _t,E as Pt,A as mt,b,N as Rt,x as xt,B as Dt,n as G,c as X,m as x,H as Et,O as Ut,I as Bt,J as Ft,T as Tt,K as yt,p as zt}from"./DQYNi3YK.js";import{c as H,a as bt}from"./DQ5NTKSo.js";import{i as F,b as Ct}from"./DT3KtxWU.js";const Mt=Dt({component:"dialog",parts:["content","trigger","overlay","title","description","close","cancel","action"]}),T=new kt("Dialog.Root | AlertDialog.Root");class lt{static create(t){const e=T.getOr(null);return T.set(new lt(t,e))}opts;#t=R(null);get triggerNode(){return s(this.#t)}set triggerNode(t){P(this.#t,t,!0)}#e=R(null);get contentNode(){return s(this.#e)}set contentNode(t){P(this.#e,t,!0)}#r=R(null);get overlayNode(){return s(this.#r)}set overlayNode(t){P(this.#r,t,!0)}#o=R(null);get descriptionNode(){return s(this.#o)}set descriptionNode(t){P(this.#o,t,!0)}#n=R(void 0);get contentId(){return s(this.#n)}set contentId(t){P(this.#n,t,!0)}#s=R(void 0);get titleId(){return s(this.#s)}set titleId(t){P(this.#s,t,!0)}#a=R(void 0);get triggerId(){return s(this.#a)}set triggerId(t){P(this.#a,t,!0)}#i=R(void 0);get descriptionId(){return s(this.#i)}set descriptionId(t){P(this.#i,t,!0)}#l=R(null);get cancelNode(){return s(this.#l)}set cancelNode(t){P(this.#l,t,!0)}#c=R(0);get nestedOpenCount(){return s(this.#c)}set nestedOpenCount(t){P(this.#c,t,!0)}depth;parent;contentPresence;overlayPresence;constructor(t,e){this.opts=t,this.parent=e,this.depth=e?e.depth+1:0,this.handleOpen=this.handleOpen.bind(this),this.handleClose=this.handleClose.bind(this),this.contentPresence=new mt({ref:b(()=>this.contentNode),open:this.opts.open,enabled:!0,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new mt({ref:b(()=>this.overlayNode),open:this.opts.open,enabled:!0}),it(()=>this.opts.open.current,n=>{this.parent&&(n?this.parent.incrementNested():this.parent.decrementNested())},{lazy:!0}),Rt(()=>{this.opts.open.current&&this.parent?.decrementNested()})}handleOpen(){this.opts.open.current||(this.opts.open.current=!0)}handleClose(){this.opts.open.current&&(this.opts.open.current=!1)}getBitsAttr=t=>Mt.getAttr(t,this.opts.variant.current);incrementNested(){this.nestedOpenCount++,this.parent?.incrementNested()}decrementNested(){this.nestedOpenCount!==0&&(this.nestedOpenCount--,this.parent?.decrementNested())}#d=y(()=>({"data-state":xt(this.opts.open.current)}));get sharedProps(){return s(this.#d)}set sharedProps(t){P(this.#d,t)}}class Ot{static create(t){return new Ot(t,T.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.attachment=q(this.opts.ref),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(t){this.opts.disabled.current||t.button>0||this.root.handleClose()}onkeydown(t){this.opts.disabled.current||(t.key===_t||t.key===Pt)&&(t.preventDefault(),this.root.handleClose())}#t=y(()=>({id:this.opts.id.current,[this.root.getBitsAttr(this.opts.variant.current)]:"",onclick:this.onclick,onkeydown:this.onkeydown,disabled:this.opts.disabled.current?!0:void 0,tabindex:0,...this.root.sharedProps,...this.attachment}));get props(){return s(this.#t)}set props(t){P(this.#t,t)}}class ct{static create(t){return new ct(t,T.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.attachment=q(this.opts.ref)}#t=y(()=>({id:this.opts.id.current,[this.root.getBitsAttr("action")]:"",...this.root.sharedProps,...this.attachment}));get props(){return s(this.#t)}set props(t){P(this.#t,t)}}class dt{static create(t){return new dt(t,T.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.root.titleId=this.opts.id.current,this.attachment=q(this.opts.ref),it.pre(()=>this.opts.id.current,n=>{this.root.titleId=n})}#t=y(()=>({id:this.opts.id.current,role:"heading","aria-level":this.opts.level.current,[this.root.getBitsAttr("title")]:"",...this.root.sharedProps,...this.attachment}));get props(){return s(this.#t)}set props(t){P(this.#t,t)}}class ut{static create(t){return new ut(t,T.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.root.descriptionId=this.opts.id.current,this.attachment=q(this.opts.ref,n=>{this.root.descriptionNode=n}),it.pre(()=>this.opts.id.current,n=>{this.root.descriptionId=n})}#t=y(()=>({id:this.opts.id.current,[this.root.getBitsAttr("description")]:"",...this.root.sharedProps,...this.attachment}));get props(){return s(this.#t)}set props(t){P(this.#t,t)}}class ht{static create(t){return new ht(t,T.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.attachment=q(this.opts.ref,n=>{this.root.contentNode=n,this.root.contentId=n?.id})}#t=y(()=>({open:this.root.opts.open.current}));get snippetProps(){return s(this.#t)}set snippetProps(t){P(this.#t,t)}#e=y(()=>({id:this.opts.id.current,role:this.root.opts.variant.current==="alert-dialog"?"alertdialog":"dialog","aria-modal":"true","aria-describedby":this.root.descriptionId,"aria-labelledby":this.root.titleId,[this.root.getBitsAttr("content")]:"",style:{pointerEvents:"auto",outline:this.root.opts.variant.current==="alert-dialog"?"none":void 0,"--bits-dialog-depth":this.root.depth,"--bits-dialog-nested-count":this.root.nestedOpenCount,contain:"layout style"},tabindex:this.root.opts.variant.current==="alert-dialog"?-1:void 0,"data-nested-open":nt(this.root.nestedOpenCount>0),"data-nested":nt(this.root.parent!==null),...this.root.sharedProps,...this.attachment}));get props(){return s(this.#e)}set props(t){P(this.#e,t)}get shouldRender(){return this.root.contentPresence.shouldRender}}class pt{static create(t){return new pt(t,T.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.attachment=q(this.opts.ref,n=>this.root.overlayNode=n)}#t=y(()=>({open:this.root.opts.open.current}));get snippetProps(){return s(this.#t)}set snippetProps(t){P(this.#t,t)}#e=y(()=>({id:this.opts.id.current,[this.root.getBitsAttr("overlay")]:"",style:{pointerEvents:"auto","--bits-dialog-depth":this.root.depth,"--bits-dialog-nested-count":this.root.nestedOpenCount},"data-nested-open":nt(this.root.nestedOpenCount>0),"data-nested":nt(this.root.parent!==null),...this.root.sharedProps,...this.attachment}));get props(){return s(this.#e)}set props(t){P(this.#e,t)}get shouldRender(){return this.root.overlayPresence.shouldRender}}class ft{static create(t){return new ft(t,T.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.attachment=q(this.opts.ref,n=>this.root.cancelNode=n),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(t){this.opts.disabled.current||t.button>0||this.root.handleClose()}onkeydown(t){this.opts.disabled.current||(t.key===_t||t.key===Pt)&&(t.preventDefault(),this.root.handleClose())}#t=y(()=>({id:this.opts.id.current,[this.root.getBitsAttr("cancel")]:"",onclick:this.onclick,onkeydown:this.onkeydown,tabindex:0,...this.root.sharedProps,...this.attachment}));get props(){return s(this.#t)}set props(t){P(this.#t,t)}}function Kt(r,t){C(t,!0);let e=l(t,"open",15,!1),n=l(t,"onOpenChange",3,G),o=l(t,"onOpenChangeComplete",3,G);lt.create({variant:b(()=>"alert-dialog"),open:b(()=>e(),d=>{e(d),n()(d)}),onOpenChangeComplete:b(()=>o())});var c=_(),a=m(c);I(a,()=>t.children??z),h(r,c),O()}var Jt=D("<div><!></div>");function jt(r,t){const e=Q();C(t,!0);let n=l(t,"id",19,()=>X(e)),o=l(t,"ref",15,null),c=l(t,"level",3,2),a=A(t,["$$slots","$$events","$$legacy","id","ref","child","children","level"]);const d=dt.create({id:b(()=>n()),level:b(()=>c()),ref:b(()=>o(),i=>o(i))}),p=y(()=>x(a,d.props));var g=_(),N=m(g);{var w=i=>{var f=_(),v=m(f);I(v,()=>t.child,()=>({props:s(p)})),h(i,f)},u=i=>{var f=Jt();j(f,()=>({...s(p)}));var v=M(f);I(v,()=>t.children??z),K(f),h(i,f)};F(N,i=>{t.child?i(w):i(u,!1)})}h(r,g),O()}var Ht=D("<button><!></button>");function Lt(r,t){const e=Q();C(t,!0);let n=l(t,"id",19,()=>X(e)),o=l(t,"ref",15,null),c=A(t,["$$slots","$$events","$$legacy","children","child","id","ref"]);const a=ct.create({id:b(()=>n()),ref:b(()=>o(),u=>o(u))}),d=y(()=>x(c,a.props));var p=_(),g=m(p);{var N=u=>{var i=_(),f=m(i);I(f,()=>t.child,()=>({props:s(d)})),h(u,i)},w=u=>{var i=Ht();j(i,()=>({...s(d)}));var f=M(i);I(f,()=>t.children??z),K(i),h(u,i)};F(g,u=>{t.child?u(N):u(w,!1)})}h(r,p),O()}var Wt=D("<button><!></button>");function qt(r,t){const e=Q();C(t,!0);let n=l(t,"id",19,()=>X(e)),o=l(t,"ref",15,null),c=l(t,"disabled",3,!1),a=A(t,["$$slots","$$events","$$legacy","id","ref","children","child","disabled"]);const d=ft.create({id:b(()=>n()),ref:b(()=>o(),i=>o(i)),disabled:b(()=>!!c())}),p=y(()=>x(a,d.props));var g=_(),N=m(g);{var w=i=>{var f=_(),v=m(f);I(v,()=>t.child,()=>({props:s(p)})),h(i,f)},u=i=>{var f=Wt();j(f,()=>({...s(p)}));var v=M(f);I(v,()=>t.children??z),K(f),h(i,f)};F(N,i=>{t.child?i(w):i(u,!1)})}h(r,g),O()}var Vt=D("<!> <!>",1),Gt=D("<!> <div><!></div>",1);function Qt(r,t){const e=Q();C(t,!0);let n=l(t,"id",19,()=>X(e)),o=l(t,"ref",15,null),c=l(t,"forceMount",3,!1),a=l(t,"interactOutsideBehavior",3,"ignore"),d=l(t,"onCloseAutoFocus",3,G),p=l(t,"onEscapeKeydown",3,G),g=l(t,"onOpenAutoFocus",3,G),N=l(t,"onInteractOutside",3,G),w=l(t,"preventScroll",3,!0),u=l(t,"trapFocus",3,!0),i=l(t,"restoreScrollDelay",3,null),f=A(t,["$$slots","$$events","$$legacy","id","children","child","ref","forceMount","interactOutsideBehavior","onCloseAutoFocus","onEscapeKeydown","onOpenAutoFocus","onInteractOutside","preventScroll","trapFocus","restoreScrollDelay"]);const v=ht.create({id:b(()=>n()),ref:b(()=>o(),B=>o(B))}),L=y(()=>x(f,v.props));var E=_(),U=m(E);{var Y=B=>{Et(B,{get ref(){return v.opts.ref},loop:!0,get trapFocus(){return u()},get enabled(){return v.root.opts.open.current},get onCloseAutoFocus(){return d()},onOpenAutoFocus:Z=>{g()(Z),!Z.defaultPrevented&&(Z.preventDefault(),Ut(0,()=>v.opts.ref.current?.focus()))},focusScope:(Z,At)=>{let gt=()=>At?.().props;Bt(Z,k(()=>s(L),{get enabled(){return v.root.opts.open.current},get ref(){return v.opts.ref},onEscapeKeydown:rt=>{p()(rt),!rt.defaultPrevented&&v.root.handleClose()},children:(rt,ae)=>{Ft(rt,k(()=>s(L),{get ref(){return v.opts.ref},get enabled(){return v.root.opts.open.current},get interactOutsideBehavior(){return a()},onInteractOutside:ot=>{N()(ot),!ot.defaultPrevented&&v.root.handleClose()},children:(ot,ie)=>{Tt(ot,k(()=>s(L),{get ref(){return v.opts.ref},get enabled(){return v.root.opts.open.current},children:(It,le)=>{var vt=_(),St=m(vt);{var wt=V=>{var $=Vt(),tt=m($);{var et=W=>{yt(W,{get preventScroll(){return w()},get restoreScrollDelay(){return i()}})};F(tt,W=>{v.root.opts.open.current&&W(et)})}var st=at(tt,2);{let W=y(()=>({props:x(s(L),gt()),...v.snippetProps}));I(st,()=>t.child,()=>s(W))}h(V,$)},Nt=V=>{var $=Gt(),tt=m($);yt(tt,{get preventScroll(){return w()}});var et=at(tt,2);j(et,W=>({...W}),[()=>x(s(L),gt())]);var st=M(et);I(st,()=>t.children??z),K(et),h(V,$)};F(St,V=>{t.child?V(wt):V(Nt,!1)})}h(It,vt)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{focusScope:!0}})};F(U,B=>{(v.shouldRender||c())&&B(Y)})}h(r,E),O()}var Xt=D("<div><!></div>");function Yt(r,t){const e=Q();C(t,!0);let n=l(t,"id",19,()=>X(e)),o=l(t,"forceMount",3,!1),c=l(t,"ref",15,null),a=A(t,["$$slots","$$events","$$legacy","id","forceMount","child","children","ref"]);const d=pt.create({id:b(()=>n()),ref:b(()=>c(),u=>c(u))}),p=y(()=>x(a,d.props));var g=_(),N=m(g);{var w=u=>{var i=_(),f=m(i);{var v=E=>{var U=_(),Y=m(U);{let B=y(()=>({props:x(s(p)),...d.snippetProps}));I(Y,()=>t.child,()=>s(B))}h(E,U)},L=E=>{var U=Xt();j(U,B=>({...B}),[()=>x(s(p))]);var Y=M(U);I(Y,()=>t.children??z,()=>d.snippetProps),K(U),h(E,U)};F(f,E=>{t.child?E(v):E(L,!1)})}h(u,i)};F(N,u=>{(d.shouldRender||o())&&u(w)})}h(r,g),O()}var Zt=D("<div><!></div>");function $t(r,t){const e=Q();C(t,!0);let n=l(t,"id",19,()=>X(e)),o=l(t,"ref",15,null),c=A(t,["$$slots","$$events","$$legacy","id","children","child","ref"]);const a=ut.create({id:b(()=>n()),ref:b(()=>o(),u=>o(u))}),d=y(()=>x(c,a.props));var p=_(),g=m(p);{var N=u=>{var i=_(),f=m(i);I(f,()=>t.child,()=>({props:s(d)})),h(u,i)},w=u=>{var i=Zt();j(i,()=>({...s(d)}));var f=M(i);I(f,()=>t.children??z),K(i),h(u,i)};F(g,u=>{t.child?u(N):u(w,!1)})}h(r,p),O()}function ye(r){return S(`/api/repos/${encodeURIComponent(r)}/sync`,{method:"POST"})}function _e(){return S("/api/sync",{method:"POST"})}function Pe(r,t,e){return S(`/api/repos/${encodeURIComponent(r)}/entities/${encodeURIComponent(t)}/${encodeURIComponent(e)}/refresh`,{method:"POST"})}function be(r,t,e){return S(`/api/repos/${encodeURIComponent(r)}/entities/${encodeURIComponent(t)}/${encodeURIComponent(e)}/refresh/apply`,{method:"POST"})}function Ce(){return S("/api/sources")}function Oe(){return S("/api/connectors")}function Ae(r){return S(`/api/connectors/${encodeURIComponent(r)}/config`)}function Ie(r,t){return S(`/api/connectors/${encodeURIComponent(r)}/config`,{method:"POST",body:JSON.stringify({...t,name:r})})}function Se(r){return S(`/api/connectors/${encodeURIComponent(r)}/config`,{method:"DELETE"})}function we(r){return S(`/api/sources/${encodeURIComponent(r)}`)}function Ne(r,t){return S(`/api/sources/${encodeURIComponent(r)}`,{method:"POST",body:JSON.stringify(t)})}function ke(r,t){return S(`/api/repos/${encodeURIComponent(r)}`,{method:"PATCH",body:JSON.stringify({sync:t})})}function Re(r){return S(`/api/connectors/${encodeURIComponent(r)}/oauth/authorize`,{method:"POST"})}function xe(r){return S(`/api/connectors/${encodeURIComponent(r)}/oauth/status`)}function De(r){return S(`/api/connectors/${encodeURIComponent(r)}/oauth/disconnect`,{method:"POST"})}function Ee(r,t){C(t,!0);let e=l(t,"open",15,!1),n=A(t,["$$slots","$$events","$$legacy","open"]);var o=_(),c=m(o);J(c,()=>Kt,(a,d)=>{d(a,k(()=>n,{get open(){return e()},set open(p){e(p)}}))}),h(r,o),O()}function te(r,t){let e=A(t,["$$slots","$$events","$$legacy"]);var n=_(),o=m(n);J(o,()=>zt,(c,a)=>{a(c,k(()=>e))}),h(r,n)}function Ue(r,t){C(t,!0);let e=l(t,"ref",15,null),n=A(t,["$$slots","$$events","$$legacy","ref","class"]);var o=_(),c=m(o);{let a=y(()=>H("text-lg font-semibold",t.class));J(c,()=>jt,(d,p)=>{p(d,k({"data-slot":"alert-dialog-title",get class(){return s(a)}},()=>n,{get ref(){return e()},set ref(g){e(g)}}))})}h(r,o),O()}function Be(r,t){C(t,!0);let e=l(t,"ref",15,null),n=A(t,["$$slots","$$events","$$legacy","ref","class"]);var o=_(),c=m(o);{let a=y(()=>t.class||H(bt()));J(c,()=>Lt,(d,p)=>{p(d,k({"data-slot":"alert-dialog-action",get class(){return s(a)}},()=>n,{get ref(){return e()},set ref(g){e(g)}}))})}h(r,o),O()}function Fe(r,t){C(t,!0);let e=l(t,"ref",15,null),n=A(t,["$$slots","$$events","$$legacy","ref","class"]);var o=_(),c=m(o);{let a=y(()=>t.class||H(bt({variant:"ghost"})));J(c,()=>qt,(d,p)=>{p(d,k({"data-slot":"alert-dialog-cancel",get class(){return s(a)}},()=>n,{get ref(){return e()},set ref(g){e(g)}}))})}h(r,o),O()}var ee=D("<div><!></div>");function Te(r,t){C(t,!0);let e=l(t,"ref",15,null),n=A(t,["$$slots","$$events","$$legacy","ref","class","children"]);var o=ee();j(o,a=>({"data-slot":"alert-dialog-footer",class:a,...n}),[()=>H("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t.class)]);var c=M(o);I(c,()=>t.children??z),K(o),Ct(o,a=>e(a),()=>e()),h(r,o),O()}var re=D("<div><!></div>");function ze(r,t){C(t,!0);let e=l(t,"ref",15,null),n=A(t,["$$slots","$$events","$$legacy","ref","class","children"]);var o=re();j(o,a=>({"data-slot":"alert-dialog-header",class:a,...n}),[()=>H("flex flex-col gap-2 text-center sm:text-start",t.class)]);var c=M(o);I(c,()=>t.children??z),K(o),Ct(o,a=>e(a),()=>e()),h(r,o),O()}function oe(r,t){C(t,!0);let e=l(t,"ref",15,null),n=A(t,["$$slots","$$events","$$legacy","ref","class"]);var o=_(),c=m(o);{let a=y(()=>H("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t.class));J(c,()=>Yt,(d,p)=>{p(d,k({"data-slot":"alert-dialog-overlay",get class(){return s(a)}},()=>n,{get ref(){return e()},set ref(g){e(g)}}))})}h(r,o),O()}var ne=D("<!> <!>",1);function Me(r,t){C(t,!0);let e=l(t,"ref",15,null),n=A(t,["$$slots","$$events","$$legacy","ref","class","portalProps"]);te(r,k(()=>t.portalProps,{children:(o,c)=>{var a=ne(),d=m(a);oe(d,{});var p=at(d,2);{let g=y(()=>H("bg-[var(--color-bg-elevated)] border-[var(--color-border)] text-[var(--color-text-primary)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",t.class));J(p,()=>Qt,(N,w)=>{w(N,k({"data-slot":"alert-dialog-content",get class(){return s(g)}},()=>n,{get ref(){return e()},set ref(u){e(u)}}))})}h(o,a)},$$slots:{default:!0}})),O()}function Ke(r,t){C(t,!0);let e=l(t,"ref",15,null),n=A(t,["$$slots","$$events","$$legacy","ref","class"]);var o=_(),c=m(o);{let a=y(()=>H("text-[var(--color-text-secondary)] text-sm",t.class));J(c,()=>$t,(d,p)=>{p(d,k({"data-slot":"alert-dialog-description",get class(){return s(a)}},()=>n,{get ref(){return e()},set ref(g){e(g)}}))})}h(r,o),O()}export{Me as A,ye as B,lt as D,ze as a,Ue as b,Ke as c,Te as d,Fe as e,Be as f,Ee as g,ht as h,Yt as i,jt as j,Ce as k,Oe as l,we as m,Ae as n,Ie as o,De as p,Se as q,Re as r,Ne as s,xe as t,ke as u,be as v,Pe as w,Ot as x,$t as y,_e as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as p,s as C,f as h}from"./b0XUoOIH.js";import{i as M}from"./vZ2iBqLE.js";import{p as k,l as c,s as m,d as f,g as i,a as A,c as _,n as B,r as u,b as N,m as v,t as P}from"./DSh-OF2y.js";import{i as R}from"./DT3KtxWU.js";import{a as Y}from"./CRnhIQbv.js";import{l as g,p as b}from"./D-yNNNdf.js";var j=h("<title> </title>"),q=h('<svg><!><path d="M17.4141 16 24 9.4141 22.5859 8 16 14.5859 9.4143 8 8 9.4141 14.5859 16 8 22.5859 9.4143 24 16 17.4141 22.5859 24 24 22.5859 17.4141 16z"></path></svg>');function J(x,t){const e=g(t,["children","$$slots","$$events","$$legacy"]),w=g(e,["size","title"]);k(t,!1);const a=v(),n=v();let d=b(t,"size",8,16),s=b(t,"title",8,void 0);c(()=>(f(e),f(s())),()=>{m(a,e["aria-label"]||e["aria-labelledby"]||s())}),c(()=>(i(a),f(e)),()=>{m(n,{"aria-hidden":i(a)?void 0:!0,role:i(a)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),A(),M();var r=q();Y(r,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:d(),height:d(),...i(n),...w}));var y=_(r);{var z=o=>{var l=j(),$=_(l,!0);u(l),P(()=>C($,s())),p(o,l)};R(y,o=>{s()&&o(z)})}B(),u(r),p(x,r),N()}export{J as C};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as p,f as h,s as A}from"./b0XUoOIH.js";import{i as M}from"./vZ2iBqLE.js";import{p as k,l as c,a as B,b as C,s as m,d,g as i,c as _,n as L,r as u,m as g,t as N}from"./DSh-OF2y.js";import{i as P}from"./DT3KtxWU.js";import{a as R}from"./CRnhIQbv.js";import{l as v,p as b}from"./D-yNNNdf.js";var Y=h("<title> </title>"),j=h('<svg><!><path d="M17 15 17 5 15 5 15 15 5 15 5 17 15 17 15 27 17 27 17 17 27 17 27 15 17 15z"></path></svg>');function I(x,t){const e=v(t,["children","$$slots","$$events","$$legacy"]),w=v(e,["size","title"]);k(t,!1);const a=g(),f=g();let n=b(t,"size",8,16),s=b(t,"title",8,void 0);c(()=>(d(e),d(s())),()=>{m(a,e["aria-label"]||e["aria-labelledby"]||s())}),c(()=>(i(a),d(e)),()=>{m(f,{"aria-hidden":i(a)?void 0:!0,role:i(a)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),B(),M();var r=j();R(r,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:n(),height:n(),...i(f),...w}));var y=_(r);{var z=o=>{var l=Y(),$=_(l,!0);u(l),N(()=>A($,s())),p(o,l)};P(y,o=>{s()&&o(z)})}L(),u(r),p(x,r),C()}export{I as A};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as p,s as C,f as h}from"./b0XUoOIH.js";import{i as M}from"./vZ2iBqLE.js";import{p as k,l as c,s as m,d as n,g as i,a as A,c as _,n as B,r as u,b as D,m as v,t as N}from"./DSh-OF2y.js";import{i as P}from"./DT3KtxWU.js";import{a as R}from"./CRnhIQbv.js";import{l as g,p as b}from"./D-yNNNdf.js";var Y=h("<title> </title>"),j=h('<svg><!><path d="M16 22 6 12 7.4 10.6 16 19.2 24.6 10.6 26 12z"></path></svg>');function J(x,t){const e=g(t,["children","$$slots","$$events","$$legacy"]),w=g(e,["size","title"]);k(t,!1);const a=v(),f=v();let d=b(t,"size",8,16),s=b(t,"title",8,void 0);c(()=>(n(e),n(s())),()=>{m(a,e["aria-label"]||e["aria-labelledby"]||s())}),c(()=>(i(a),n(e)),()=>{m(f,{"aria-hidden":i(a)?void 0:!0,role:i(a)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),A(),M();var r=j();R(r,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:d(),height:d(),...i(f),...w}));var y=_(r);{var z=o=>{var l=Y(),$=_(l,!0);u(l),N(()=>C($,s())),p(o,l)};P(y,o=>{s()&&o(z)})}B(),u(r),p(x,r),D()}export{J as C};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as I,a as f,b as A,p as ct,o as Zt,s as ut,f as Mt}from"./b0XUoOIH.js";import{L as $t,aL as te,bs as ee,a4 as h,g as s,a2 as Ct,a7 as re,s as g,e as U,p as V,a0 as k,b as E,a3 as ot,c as F,ae as tt,r as L,a6 as se,t as dt,l as It,d as vt,a as ie,n as oe,m as Rt}from"./DSh-OF2y.js";import{a as W,s as B}from"./CRnhIQbv.js";import{i as M}from"./DT3KtxWU.js";import{c as et}from"./DCVmM0L5.js";import{p as l,r as G,s as X,l as Ot}from"./D-yNNNdf.js";import{b as ne,c as pt}from"./DQ5NTKSo.js";import{C as ae}from"./Bnl5ADsW.js";import{X as le,C as gt,s as nt,w as Y,E as bt,v as lt,L as it,y as yt,Y as he,i as ue,B as At,U as Ht,m as Z,c as ft,b,Z as de,_ as ce,t as _t,$ as pe,a0 as $,a1 as st,a2 as Tt,a3 as Vt,a4 as Et,a5 as Kt,a6 as qt,a7 as ge,a8 as fe,a9 as ve,aa as me,x as Ft,N as be,h as ye,ab as Ce,ac as Dt,Q as Lt,A as _e,n as J,P as ke,f as we,F as Ne,k as xe,p as Se,W as Bt}from"./DQYNi3YK.js";import{i as zt}from"./vZ2iBqLE.js";import{e as Pe}from"./DHtLlmE0.js";const Ie=[];function Ut(i,t=!1,e=!1){return ht(i,new Map,"",Ie,null,e)}function ht(i,t,e,r,o=null,u=!1){if(typeof i=="object"&&i!==null){var n=t.get(i);if(n!==void 0)return n;if(i instanceof Map)return new Map(i);if(i instanceof Set)return new Set(i);if($t(i)){var a=Array(i.length);t.set(i,a),o!==null&&t.set(o,a);for(var d=0;d<i.length;d+=1){var m=i[d];d in i&&(a[d]=ht(m,t,e,r,null,u))}return a}if(te(i)===ee){a={},t.set(i,a),o!==null&&t.set(o,a);for(var c of Object.keys(i))a[c]=ht(i[c],t,e,r,null,u);return a}if(i instanceof Date)return structuredClone(i);if(typeof i.toJSON=="function"&&!u)return ht(i.toJSON(),t,e,r,i)}if(i instanceof EventTarget)return i;try{return structuredClone(i)}catch{return i}}const Re={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",transform:"translateX(-100%)"},Oe=le(Re);class He{#t=()=>{};#e=h(()=>this.#t());constructor(t,e){let r;e!==void 0&&(r=e),this.#t=()=>{try{return r}finally{r=t()}}}get current(){return s(this.#e)}}function Te(i){Ct(()=>re(()=>i()))}const Wt=At({component:"checkbox",parts:["root","group","group-label","input"]}),Yt=new gt("Checkbox.Group");class Gt{static create(t){return Yt.set(new Gt(t))}opts;attachment;#t=U(void 0);get labelId(){return s(this.#t)}set labelId(t){g(this.#t,t,!0)}constructor(t){this.opts=t,this.attachment=nt(this.opts.ref)}addValue(t){if(t&&!this.opts.value.current.includes(t)){const e=[...Ut(this.opts.value.current),t];if(this.opts.value.current=e,Ht(this.opts.value.current,e))return;this.opts.onValueChange.current(e)}}removeValue(t){if(!t||this.opts.value.current.indexOf(t)===-1)return;const r=this.opts.value.current.filter(o=>o!==t);this.opts.value.current=r,!Ht(this.opts.value.current,r)&&this.opts.onValueChange.current(r)}#e=h(()=>({id:this.opts.id.current,role:"group","aria-labelledby":this.labelId,"data-disabled":it(this.opts.disabled.current),[Wt.group]:"",...this.attachment}));get props(){return s(this.#e)}set props(t){g(this.#e,t)}}const jt=new gt("Checkbox.Root");class kt{static create(t,e=null){return jt.set(new kt(t,e))}opts;group;#t=h(()=>this.group&&this.group.opts.name.current?this.group.opts.name.current:this.opts.name.current);get trueName(){return s(this.#t)}set trueName(t){g(this.#t,t)}#e=h(()=>this.group&&this.group.opts.required.current?!0:this.opts.required.current);get trueRequired(){return s(this.#e)}set trueRequired(t){g(this.#e,t)}#r=h(()=>this.group&&this.group.opts.disabled.current?!0:this.opts.disabled.current);get trueDisabled(){return s(this.#r)}set trueDisabled(t){g(this.#r,t)}#s=h(()=>this.group&&this.group.opts.readonly.current?!0:this.opts.readonly.current);get trueReadonly(){return s(this.#s)}set trueReadonly(t){g(this.#s,t)}attachment;constructor(t,e){this.opts=t,this.group=e,this.attachment=nt(this.opts.ref),this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this),Y.pre([()=>Ut(this.group?.opts.value.current),()=>this.opts.value.current],([r,o])=>{!r||!o||(this.opts.checked.current=r.includes(o))}),Y.pre(()=>this.opts.checked.current,r=>{this.group&&(r?this.group?.addValue(this.opts.value.current):this.group?.removeValue(this.opts.value.current))})}onkeydown(t){if(!(this.trueDisabled||this.trueReadonly)){if(t.key===bt){t.preventDefault(),this.opts.type.current==="submit"&&t.currentTarget.closest("form")?.requestSubmit();return}t.key===lt&&(t.preventDefault(),this.#i())}}#i(){this.opts.indeterminate.current?(this.opts.indeterminate.current=!1,this.opts.checked.current=!0):this.opts.checked.current=!this.opts.checked.current}onclick(t){if(!(this.trueDisabled||this.trueReadonly)){if(this.opts.type.current==="submit"){this.#i();return}t.preventDefault(),this.#i()}}#o=h(()=>({checked:this.opts.checked.current,indeterminate:this.opts.indeterminate.current}));get snippetProps(){return s(this.#o)}set snippetProps(t){g(this.#o,t)}#n=h(()=>({id:this.opts.id.current,role:"checkbox",type:this.opts.type.current,disabled:this.trueDisabled,"aria-checked":he(this.opts.checked.current,this.opts.indeterminate.current),"aria-required":yt(this.trueRequired),"aria-readonly":yt(this.trueReadonly),"data-disabled":it(this.trueDisabled),"data-readonly":it(this.trueReadonly),"data-state":De(this.opts.checked.current,this.opts.indeterminate.current),[Wt.root]:"",onclick:this.onclick,onkeydown:this.onkeydown,...this.attachment}));get props(){return s(this.#n)}set props(t){g(this.#n,t)}}class wt{static create(){return new wt(jt.get())}root;#t=h(()=>this.root.group?!!(this.root.opts.value.current!==void 0&&this.root.group.opts.value.current.includes(this.root.opts.value.current)):this.root.opts.checked.current);get trueChecked(){return s(this.#t)}set trueChecked(t){g(this.#t,t)}#e=h(()=>!!this.root.trueName);get shouldRender(){return s(this.#e)}set shouldRender(t){g(this.#e,t)}constructor(t){this.root=t,this.onfocus=this.onfocus.bind(this)}onfocus(t){ue(this.root.opts.ref.current)&&this.root.opts.ref.current.focus()}#r=h(()=>({type:"checkbox",checked:this.root.opts.checked.current===!0,disabled:this.root.trueDisabled,required:this.root.trueRequired,name:this.root.trueName,value:this.root.opts.value.current,readonly:this.root.trueReadonly,onfocus:this.onfocus}));get props(){return s(this.#r)}set props(t){g(this.#r,t)}}function De(i,t){return t?"indeterminate":i?"checked":"unchecked"}var Me=A("<input/>"),Ae=A("<input/>");function Jt(i,t){V(t,!0);let e=l(t,"value",15),r=G(t,["$$slots","$$events","$$legacy","value"]);const o=h(()=>Z(r,{"aria-hidden":"true",tabindex:-1,style:Oe}));var u=I(),n=k(u);{var a=m=>{var c=Me();W(c,()=>({...s(o),value:e()}),void 0,void 0,void 0,void 0,!0),f(m,c)},d=m=>{var c=Ae();W(c,()=>({...s(o)}),void 0,void 0,void 0,void 0,!0),ne(c,e),f(m,c)};M(n,m=>{s(o).type==="checkbox"?m(a):m(d,!1)})}f(i,u),E()}function Ve(i,t){V(t,!1);const e=wt.create();zt();var r=I(),o=k(r);{var u=n=>{Jt(n,X(()=>e.props))};M(o,n=>{e.shouldRender&&n(u)})}f(i,r),E()}var Ee=A("<button><!></button>"),Ke=A("<!> <!>",1);function qe(i,t){const e=ct();V(t,!0);let r=l(t,"checked",15,!1),o=l(t,"ref",15,null),u=l(t,"disabled",3,!1),n=l(t,"required",3,!1),a=l(t,"name",3,void 0),d=l(t,"value",3,"on"),m=l(t,"id",19,()=>ft(e)),c=l(t,"indeterminate",15,!1),p=l(t,"type",3,"button"),y=G(t,["$$slots","$$events","$$legacy","checked","ref","onCheckedChange","children","disabled","required","name","value","id","indeterminate","onIndeterminateChange","child","type","readonly"]);const w=Yt.getOr(null);w&&d()&&(w.opts.value.current.includes(d())?r(!0):r(!1)),Y.pre(()=>d(),()=>{w&&d()&&(w.opts.value.current.includes(d())?r(!0):r(!1))});const R=kt.create({checked:b(()=>r(),P=>{r(P),t.onCheckedChange?.(P)}),disabled:b(()=>u()??!1),required:b(()=>n()),name:b(()=>a()),value:b(()=>d()),id:b(()=>m()),ref:b(()=>o(),P=>o(P)),indeterminate:b(()=>c(),P=>{c(P),t.onIndeterminateChange?.(P)}),type:b(()=>p()),readonly:b(()=>!!t.readonly)},w),O=h(()=>Z({...y},R.props));var S=Ke(),C=k(S);{var v=P=>{var D=I(),N=k(D);{let K=h(()=>({props:s(O),...R.snippetProps}));B(N,()=>t.child,()=>s(K))}f(P,D)},_=P=>{var D=Ee();W(D,()=>({...s(O)}));var N=F(D);B(N,()=>t.children??tt,()=>R.snippetProps),L(D),f(P,D)};M(C,P=>{t.child?P(v):P(_,!1)})}var x=ot(C,2);Ve(x,{}),f(i,S),E()}class Fe{#t;#e=h(()=>this.#t.candidateValues());#r;constructor(t){this.#t=t,this.#r=de("",{afterMs:1e3,getWindow:this.#t.getWindow}),this.handleTypeaheadSearch=this.handleTypeaheadSearch.bind(this),this.resetTypeahead=this.resetTypeahead.bind(this)}handleTypeaheadSearch(t){if(!this.#t.enabled()||!s(this.#e).length)return;this.#r.current=this.#r.current+t;const e=this.#t.getCurrentItem(),r=s(this.#e).find(a=>a===e)??"",o=s(this.#e).map(a=>a??""),u=ce(o,this.#r.current,r),n=s(this.#e).find(a=>a===u);return n&&this.#t.onMatch(n),n}resetTypeahead(){this.#r.current=""}}const Le=[st,Vt,Et],Be=[$,Kt,qt],ze=[...Le,...Be],Ue=At({component:"select",parts:["trigger","content","item","viewport","scroll-up-button","scroll-down-button","group","group-label","separator","arrow","input","content-wrapper","item-text","value"]}),at=new gt("Select.Root | Combobox.Root"),We=new gt("Select.Content | Combobox.Content");class Xt{opts;#t=U(!1);get touchedInput(){return s(this.#t)}set touchedInput(t){g(this.#t,t,!0)}#e=U(null);get inputNode(){return s(this.#e)}set inputNode(t){g(this.#e,t,!0)}#r=U(null);get contentNode(){return s(this.#r)}set contentNode(t){g(this.#r,t,!0)}contentPresence;#s=U(null);get viewportNode(){return s(this.#s)}set viewportNode(t){g(this.#s,t,!0)}#i=U(null);get triggerNode(){return s(this.#i)}set triggerNode(t){g(this.#i,t,!0)}#o=U("");get valueId(){return s(this.#o)}set valueId(t){g(this.#o,t,!0)}#n=U(null);get highlightedNode(){return s(this.#n)}set highlightedNode(t){g(this.#n,t,!0)}#a=h(()=>this.highlightedNode?this.highlightedNode.getAttribute("data-value"):null);get highlightedValue(){return s(this.#a)}set highlightedValue(t){g(this.#a,t)}#l=h(()=>{if(this.highlightedNode)return this.highlightedNode.id});get highlightedId(){return s(this.#l)}set highlightedId(t){g(this.#l,t)}#h=h(()=>this.highlightedNode?this.highlightedNode.getAttribute("data-label"):null);get highlightedLabel(){return s(this.#h)}set highlightedLabel(t){g(this.#h,t)}isUsingKeyboard=!1;isCombobox=!1;domContext=new _t(()=>null);constructor(t){this.opts=t,this.isCombobox=t.isCombobox,this.contentPresence=new _e({ref:b(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),se(()=>{this.opts.open.current||this.setHighlightedNode(null)})}setHighlightedNode(t,e=!1){this.highlightedNode=t,t&&(this.isUsingKeyboard||e)&&t.scrollIntoView({block:this.opts.scrollAlignment.current})}getCandidateNodes(){const t=this.contentNode;return t?Array.from(t.querySelectorAll(`[${this.getBitsAttr("item")}]:not([data-disabled])`)):[]}setHighlightedToFirstCandidate(t=!1){this.setHighlightedNode(null);let e=this.getCandidateNodes();if(e.length){if(this.viewportNode){const r=this.viewportNode.getBoundingClientRect();e=e.filter(o=>{if(!this.viewportNode)return!1;const u=o.getBoundingClientRect();return u.right<=r.right&&u.left>=r.left&&u.bottom<=r.bottom&&u.top>=r.top})}this.setHighlightedNode(e[0],t)}}getNodeByValue(t){return this.getCandidateNodes().find(r=>r.dataset.value===t)??null}setOpen(t){this.opts.open.current=t}toggleOpen(){this.opts.open.current=!this.opts.open.current}handleOpen(){this.setOpen(!0)}handleClose(){this.setHighlightedNode(null),this.setOpen(!1)}toggleMenu(){this.toggleOpen()}getBitsAttr=t=>Ue.getAttr(t,this.isCombobox?"combobox":void 0)}class Ye extends Xt{opts;isMulti=!1;#t=h(()=>this.opts.value.current!=="");get hasValue(){return s(this.#t)}set hasValue(t){g(this.#t,t)}#e=h(()=>this.opts.items.current.length?this.opts.items.current.find(t=>t.value===this.opts.value.current)?.label??"":"");get currentLabel(){return s(this.#e)}set currentLabel(t){g(this.#e,t)}#r=h(()=>this.opts.items.current.length?this.opts.items.current.filter(e=>!e.disabled).map(e=>e.label):[]);get candidateLabels(){return s(this.#r)}set candidateLabels(t){g(this.#r,t)}#s=h(()=>!(this.isMulti||this.opts.items.current.length===0));get dataTypeaheadEnabled(){return s(this.#s)}set dataTypeaheadEnabled(t){g(this.#s,t)}constructor(t){super(t),this.opts=t,Ct(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),Y(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}includesItem(t){return this.opts.value.current===t}toggleItem(t,e=t){const r=this.includesItem(t)?"":t;this.opts.value.current=r,r!==""&&(this.opts.inputValue.current=e)}setInitialHighlightedNode(){Lt(()=>{if(!(this.highlightedNode&&this.domContext.getDocument().contains(this.highlightedNode))){if(this.opts.value.current!==""){const t=this.getNodeByValue(this.opts.value.current);if(t){this.setHighlightedNode(t,!0);return}}this.setHighlightedToFirstCandidate(!0)}})}}class Ge extends Xt{opts;isMulti=!0;#t=h(()=>this.opts.value.current.length>0);get hasValue(){return s(this.#t)}set hasValue(t){g(this.#t,t)}constructor(t){super(t),this.opts=t,Ct(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),Y(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}includesItem(t){return this.opts.value.current.includes(t)}toggleItem(t,e=t){this.includesItem(t)?this.opts.value.current=this.opts.value.current.filter(r=>r!==t):this.opts.value.current=[...this.opts.value.current,t],this.opts.inputValue.current=e}setInitialHighlightedNode(){Lt(()=>{if(this.domContext&&!(this.highlightedNode&&this.domContext.getDocument().contains(this.highlightedNode))){if(this.opts.value.current.length&&this.opts.value.current[0]!==""){const t=this.getNodeByValue(this.opts.value.current[0]);if(t){this.setHighlightedNode(t,!0);return}}this.setHighlightedToFirstCandidate(!0)}})}}class je{static create(t){const{type:e,...r}=t,o=e==="single"?new Ye(r):new Ge(r);return at.set(o)}}class Nt{static create(t){return new Nt(t,at.get())}opts;root;attachment;#t;#e;constructor(t,e){this.opts=t,this.root=e,this.attachment=nt(t.ref,r=>this.root.triggerNode=r),this.root.domContext=new _t(t.ref),this.#t=new pe({getCurrentItem:()=>this.root.highlightedNode,onMatch:r=>{this.root.setHighlightedNode(r)},getActiveElement:()=>this.root.domContext.getActiveElement(),getWindow:()=>this.root.domContext.getWindow()}),this.#e=new Fe({getCurrentItem:()=>this.root.isMulti?"":this.root.currentLabel,onMatch:r=>{if(this.root.isMulti||!this.root.opts.items.current)return;const o=this.root.opts.items.current.find(u=>u.label===r);o&&(this.root.opts.value.current=o.value)},enabled:()=>!this.root.isMulti&&this.root.dataTypeaheadEnabled,candidateValues:()=>this.root.isMulti?[]:this.root.candidateLabels,getWindow:()=>this.root.domContext.getWindow()}),this.onkeydown=this.onkeydown.bind(this),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onclick=this.onclick.bind(this)}#r(){this.root.opts.open.current=!0,this.#e.resetTypeahead(),this.#t.resetTypeahead()}#s(t){this.#r()}#i(){const t=this.root.highlightedValue===this.root.opts.value.current;return!this.root.opts.allowDeselect.current&&t&&!this.root.isMulti?(this.root.handleClose(),!0):(this.root.highlightedValue!==null&&this.root.toggleItem(this.root.highlightedValue,this.root.highlightedLabel??void 0),!this.root.isMulti&&!t?(this.root.handleClose(),!0):!1)}onkeydown(t){if(this.root.isUsingKeyboard=!0,(t.key===$||t.key===st)&&t.preventDefault(),!this.root.opts.open.current){if(t.key===bt||t.key===lt||t.key===st||t.key===$)t.preventDefault(),this.root.handleOpen();else if(!this.root.isMulti&&this.root.dataTypeaheadEnabled){this.#e.handleTypeaheadSearch(t.key);return}if(this.root.hasValue)return;const n=this.root.getCandidateNodes();if(!n.length)return;if(t.key===st){const a=n[0];this.root.setHighlightedNode(a)}else if(t.key===$){const a=n[n.length-1];this.root.setHighlightedNode(a)}return}if(t.key===Tt){this.root.handleClose();return}if((t.key===bt||t.key===lt&&this.#t.search==="")&&!t.isComposing&&(t.preventDefault(),this.#i()))return;if(t.key===$&&t.altKey&&this.root.handleClose(),ze.includes(t.key)){t.preventDefault();const n=this.root.getCandidateNodes(),a=this.root.highlightedNode,d=a?n.indexOf(a):-1,m=this.root.opts.loop.current;let c;if(t.key===st?c=ge(n,d,m):t.key===$?c=fe(n,d,m):t.key===Kt?c=ve(n,d,10,m):t.key===Vt?c=me(n,d,10,m):t.key===Et?c=n[0]:t.key===qt&&(c=n[n.length-1]),!c)return;this.root.setHighlightedNode(c);return}const e=t.ctrlKey||t.altKey||t.metaKey,r=t.key.length===1,o=t.key===lt,u=this.root.getCandidateNodes();if(t.key!==Tt){if(!e&&(r||o)){!this.#t.handleTypeaheadSearch(t.key,u)&&o&&(t.preventDefault(),this.#i());return}this.root.highlightedNode||this.root.setHighlightedToFirstCandidate()}}onclick(t){t.currentTarget.focus()}onpointerdown(t){if(this.root.opts.disabled.current)return;if(t.pointerType==="touch")return t.preventDefault();const e=t.target;e?.hasPointerCapture(t.pointerId)&&e?.releasePointerCapture(t.pointerId),t.button===0&&t.ctrlKey===!1&&(this.root.opts.open.current===!1?this.#s(t):this.root.handleClose())}onpointerup(t){this.root.opts.disabled.current||(t.preventDefault(),t.pointerType==="touch"&&(this.root.opts.open.current===!1?this.#s(t):this.root.handleClose()))}#o=h(()=>({id:this.opts.id.current,disabled:this.root.opts.disabled.current?!0:void 0,"aria-haspopup":"listbox","aria-expanded":yt(this.root.opts.open.current),"aria-activedescendant":this.root.highlightedId,"data-state":Ft(this.root.opts.open.current),"data-disabled":it(this.root.opts.disabled.current),"data-placeholder":this.root.hasValue?void 0:"",[this.root.getBitsAttr("trigger")]:"",onpointerdown:this.onpointerdown,onkeydown:this.onkeydown,onclick:this.onclick,onpointerup:this.onpointerup,...this.attachment}));get props(){return s(this.#o)}set props(t){g(this.#o,t)}}class xt{static create(t){return We.set(new xt(t,at.get()))}opts;root;attachment;#t=U(!1);get isPositioned(){return s(this.#t)}set isPositioned(t){g(this.#t,t,!0)}domContext;constructor(t,e){this.opts=t,this.root=e,this.attachment=nt(t.ref,r=>this.root.contentNode=r),this.domContext=new _t(this.opts.ref),this.root.domContext===null&&(this.root.domContext=this.domContext),be(()=>{this.root.contentNode=null,this.isPositioned=!1}),Y(()=>this.root.opts.open.current,()=>{this.root.opts.open.current||(this.isPositioned=!1)}),this.onpointermove=this.onpointermove.bind(this)}onpointermove(t){this.root.isUsingKeyboard=!1}#e=h(()=>ye(this.root.isCombobox?"combobox":"select"));onInteractOutside=t=>{if(t.target===this.root.triggerNode||t.target===this.root.inputNode){t.preventDefault();return}this.opts.onInteractOutside.current(t),!t.defaultPrevented&&this.root.handleClose()};onEscapeKeydown=t=>{this.opts.onEscapeKeydown.current(t),!t.defaultPrevented&&this.root.handleClose()};onOpenAutoFocus=t=>{t.preventDefault()};onCloseAutoFocus=t=>{t.preventDefault()};get shouldRender(){return this.root.contentPresence.shouldRender}#r=h(()=>({open:this.root.opts.open.current}));get snippetProps(){return s(this.#r)}set snippetProps(t){g(this.#r,t)}#s=h(()=>({id:this.opts.id.current,role:"listbox","aria-multiselectable":this.root.isMulti?"true":void 0,"data-state":Ft(this.root.opts.open.current),[this.root.getBitsAttr("content")]:"",style:{display:"flex",flexDirection:"column",outline:"none",boxSizing:"border-box",pointerEvents:"auto",...s(this.#e)},onpointermove:this.onpointermove,...this.attachment}));get props(){return s(this.#s)}set props(t){g(this.#s,t)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown,onOpenAutoFocus:this.onOpenAutoFocus,onCloseAutoFocus:this.onCloseAutoFocus,trapFocus:!1,loop:!1,onPlaced:()=>{this.root.opts.open.current&&(this.isPositioned=!0)}}}class St{static create(t){return new St(t,at.get())}opts;root;attachment;#t=h(()=>this.root.includesItem(this.opts.value.current));get isSelected(){return s(this.#t)}set isSelected(t){g(this.#t,t)}#e=h(()=>this.root.highlightedValue===this.opts.value.current);get isHighlighted(){return s(this.#e)}set isHighlighted(t){g(this.#e,t)}prevHighlighted=new He(()=>this.isHighlighted);#r=U(!1);get mounted(){return s(this.#r)}set mounted(t){g(this.#r,t,!0)}constructor(t,e){this.opts=t,this.root=e,this.attachment=nt(t.ref),Y([()=>this.isHighlighted,()=>this.prevHighlighted.current],()=>{this.isHighlighted?this.opts.onHighlight.current():this.prevHighlighted.current&&this.opts.onUnhighlight.current()}),Y(()=>this.mounted,()=>{this.mounted&&this.root.setInitialHighlightedNode()}),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onpointermove=this.onpointermove.bind(this)}handleSelect(){if(this.opts.disabled.current)return;const t=this.opts.value.current===this.root.opts.value.current;if(!this.root.opts.allowDeselect.current&&t&&!this.root.isMulti){this.root.handleClose();return}this.root.toggleItem(this.opts.value.current,this.opts.label.current),!this.root.isMulti&&!t&&this.root.handleClose()}#s=h(()=>({selected:this.isSelected,highlighted:this.isHighlighted}));get snippetProps(){return s(this.#s)}set snippetProps(t){g(this.#s,t)}onpointerdown(t){t.preventDefault()}onpointerup(t){if(!(t.defaultPrevented||!this.opts.ref.current)){if(t.pointerType==="touch"&&!Ce){Zt(this.opts.ref.current,"click",()=>{this.handleSelect(),this.root.setHighlightedNode(this.opts.ref.current)},{once:!0});return}t.preventDefault(),this.handleSelect(),t.pointerType==="touch"&&this.root.setHighlightedNode(this.opts.ref.current)}}onpointermove(t){t.pointerType!=="touch"&&this.root.highlightedNode!==this.opts.ref.current&&this.root.setHighlightedNode(this.opts.ref.current)}#i=h(()=>({id:this.opts.id.current,role:"option","aria-selected":this.root.includesItem(this.opts.value.current)?"true":void 0,"data-value":this.opts.value.current,"data-disabled":it(this.opts.disabled.current),"data-highlighted":this.root.highlightedValue===this.opts.value.current&&!this.opts.disabled.current?"":void 0,"data-selected":this.root.includesItem(this.opts.value.current)?"":void 0,"data-label":this.opts.label.current,[this.root.getBitsAttr("item")]:"",onpointermove:this.onpointermove,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,...this.attachment}));get props(){return s(this.#i)}set props(t){g(this.#i,t)}}class Pt{static create(t){return new Pt(t,at.get())}opts;root;#t=h(()=>this.root.opts.name.current!=="");get shouldRender(){return s(this.#t)}set shouldRender(t){g(this.#t,t)}constructor(t,e){this.opts=t,this.root=e,this.onfocus=this.onfocus.bind(this)}onfocus(t){t.preventDefault(),this.root.isCombobox?this.root.inputNode?.focus():this.root.triggerNode?.focus()}#e=h(()=>({disabled:Dt(this.root.opts.disabled.current),required:Dt(this.root.opts.required.current),name:this.root.opts.name.current,value:this.opts.value.current,onfocus:this.onfocus}));get props(){return s(this.#e)}set props(t){g(this.#e,t)}}function mt(i,t){V(t,!0);let e=l(t,"value",15);const r=Pt.create({value:b(()=>e())});var o=I(),u=k(o);{var n=a=>{Jt(a,X(()=>r.props,{get autocomplete(){return t.autocomplete},get value(){return e()},set value(d){e(d)}}))};M(u,a=>{r.shouldRender&&a(n)})}f(i,o),E()}var Je=A("<div><div><!></div></div>"),Xe=A("<div><div><!></div></div>");function Qe(i,t){const e=ct();V(t,!0);let r=l(t,"id",19,()=>ft(e)),o=l(t,"ref",15,null),u=l(t,"forceMount",3,!1),n=l(t,"side",3,"bottom"),a=l(t,"onInteractOutside",3,J),d=l(t,"onEscapeKeydown",3,J),m=l(t,"preventScroll",3,!1),c=G(t,["$$slots","$$events","$$legacy","id","ref","forceMount","side","onInteractOutside","onEscapeKeydown","children","child","preventScroll","style"]);const p=xt.create({id:b(()=>r()),ref:b(()=>o(),C=>o(C)),onInteractOutside:b(()=>a()),onEscapeKeydown:b(()=>d())}),y=h(()=>Z(c,p.props));var w=I(),R=k(w);{var O=C=>{ke(C,X(()=>s(y),()=>p.popperProps,{get ref(){return p.opts.ref},get side(){return n()},get enabled(){return p.root.opts.open.current},get id(){return r()},get preventScroll(){return m()},forceMount:!0,get shouldRender(){return p.shouldRender},popper:(_,x)=>{let P=()=>x?.().props,D=()=>x?.().wrapperProps;const N=h(()=>Z(P(),{style:p.props.style},{style:t.style}));var K=I(),j=k(K);{var Q=H=>{var T=I(),q=k(T);{let z=h(()=>({props:s(N),wrapperProps:D(),...p.snippetProps}));B(q,()=>t.child,()=>s(z))}f(H,T)},rt=H=>{var T=Je();W(T,()=>({...D()}));var q=F(T);W(q,()=>({...s(N)}));var z=F(q);B(z,()=>t.children??tt),L(q),L(T),f(H,T)};M(j,H=>{t.child?H(Q):H(rt,!1)})}f(_,K)},$$slots:{popper:!0}}))},S=C=>{we(C,X(()=>s(y),()=>p.popperProps,{get ref(){return p.opts.ref},get side(){return n()},get open(){return p.root.opts.open.current},get id(){return r()},get preventScroll(){return m()},forceMount:!1,get shouldRender(){return p.shouldRender},popper:(_,x)=>{let P=()=>x?.().props,D=()=>x?.().wrapperProps;const N=h(()=>Z(P(),{style:p.props.style},{style:t.style}));var K=I(),j=k(K);{var Q=H=>{var T=I(),q=k(T);{let z=h(()=>({props:s(N),wrapperProps:D(),...p.snippetProps}));B(q,()=>t.child,()=>s(z))}f(H,T)},rt=H=>{var T=Xe();W(T,()=>({...D()}));var q=F(T);W(q,()=>({...s(N)}));var z=F(q);B(z,()=>t.children??tt),L(q),L(T),f(H,T)};M(j,H=>{t.child?H(Q):H(rt,!1)})}f(_,K)},$$slots:{popper:!0}}))};M(R,C=>{u()?C(O):u()||C(S,1)})}f(i,w),E()}function Ze(i,t){V(t,!0);let e=l(t,"mounted",15,!1),r=l(t,"onMountedChange",3,J);Te(()=>(e(!0),r()(!0),()=>{e(!1),r()(!1)})),E()}var $e=A("<div><!></div>"),tr=A("<!> <!>",1);function er(i,t){const e=ct();V(t,!0);let r=l(t,"id",19,()=>ft(e)),o=l(t,"ref",15,null),u=l(t,"label",19,()=>t.value),n=l(t,"disabled",3,!1),a=l(t,"onHighlight",3,J),d=l(t,"onUnhighlight",3,J),m=G(t,["$$slots","$$events","$$legacy","id","ref","value","label","disabled","children","child","onHighlight","onUnhighlight"]);const c=St.create({id:b(()=>r()),ref:b(()=>o(),C=>o(C)),value:b(()=>t.value),disabled:b(()=>n()),label:b(()=>u()),onHighlight:b(()=>a()),onUnhighlight:b(()=>d())}),p=h(()=>Z(m,c.props));var y=tr(),w=k(y);{var R=C=>{var v=I(),_=k(v);{let x=h(()=>({props:s(p),...c.snippetProps}));B(_,()=>t.child,()=>s(x))}f(C,v)},O=C=>{var v=$e();W(v,()=>({...s(p)}));var _=F(v);B(_,()=>t.children??tt,()=>c.snippetProps),L(v),f(C,v)};M(w,C=>{t.child?C(R):C(O,!1)})}var S=ot(w,2);Ze(S,{get mounted(){return c.mounted},set mounted(C){c.mounted=C}}),f(i,y),E()}var rr=A("<!> <!>",1);function sr(i,t){V(t,!0);let e=l(t,"value",15),r=l(t,"onValueChange",3,J),o=l(t,"name",3,""),u=l(t,"disabled",3,!1),n=l(t,"open",15,!1),a=l(t,"onOpenChange",3,J),d=l(t,"onOpenChangeComplete",3,J),m=l(t,"loop",3,!1),c=l(t,"scrollAlignment",3,"nearest"),p=l(t,"required",3,!1),y=l(t,"items",19,()=>[]),w=l(t,"allowDeselect",3,!1);function R(){e()===void 0&&e(t.type==="single"?"":[])}R(),Y.pre(()=>e(),()=>{R()});let O=U("");const S=je.create({type:t.type,value:b(()=>e(),N=>{e(N),r()(N)}),disabled:b(()=>u()),required:b(()=>p()),open:b(()=>n(),N=>{n(N),a()(N)}),loop:b(()=>m()),scrollAlignment:b(()=>c()),name:b(()=>o()),isCombobox:!1,items:b(()=>y()),allowDeselect:b(()=>w()),inputValue:b(()=>s(O),N=>g(O,N,!0)),onOpenChangeComplete:b(()=>d())});var C=rr(),v=k(C);Ne(v,{children:(N,K)=>{var j=I(),Q=k(j);B(Q,()=>t.children??tt),f(N,j)},$$slots:{default:!0}});var _=ot(v,2);{var x=N=>{var K=I(),j=k(K);{var Q=H=>{mt(H,{get autocomplete(){return t.autocomplete}})},rt=H=>{var T=I(),q=k(T);Pe(q,16,()=>S.opts.value.current,z=>z,(z,Qt)=>{mt(z,{get value(){return Qt},get autocomplete(){return t.autocomplete}})}),f(H,T)};M(j,H=>{S.opts.value.current.length===0?H(Q):H(rt,!1)})}f(N,K)},P=h(()=>Array.isArray(S.opts.value.current)),D=N=>{mt(N,{get autocomplete(){return t.autocomplete},get value(){return S.opts.value.current},set value(K){S.opts.value.current=K}})};M(_,N=>{s(P)?N(x):N(D,!1)})}f(i,C),E()}var ir=A("<button><!></button>");function or(i,t){const e=ct();V(t,!0);let r=l(t,"id",19,()=>ft(e)),o=l(t,"ref",15,null),u=l(t,"type",3,"button"),n=G(t,["$$slots","$$events","$$legacy","id","ref","child","children","type"]);const a=Nt.create({id:b(()=>r()),ref:b(()=>o(),p=>o(p))}),d=h(()=>Z(n,a.props,{type:u()}));var m=I(),c=k(m);et(c,()=>xe,(p,y)=>{y(p,{get id(){return r()},get ref(){return a.opts.ref},children:(w,R)=>{var O=I(),S=k(O);{var C=_=>{var x=I(),P=k(x);B(P,()=>t.child,()=>({props:s(d)})),f(_,x)},v=_=>{var x=ir();W(x,()=>({...s(d)}));var P=F(x);B(P,()=>t.children??tt),L(x),f(_,x)};M(S,_=>{t.child?_(C):_(v,!1)})}f(w,O)},$$slots:{default:!0}})}),f(i,m),E()}var nr=A("<span> </span>"),ar=A('<span class="select-placeholder"> </span>'),lr=A("<!> <!>",1);function xr(i,t){V(t,!0);let e=l(t,"placeholder",3,"Select..."),r=l(t,"size",3,"default"),o=G(t,["$$slots","$$events","$$legacy","children","value","placeholder","class","size"]);var u=I(),n=k(u);{let a=h(()=>pt("select-trigger",r()==="sm"&&"select-trigger-sm",t.class));et(n,()=>or,(d,m)=>{m(d,X({get class(){return s(a)}},()=>o,{children:(c,p)=>{var y=lr(),w=k(y);{var R=v=>{var _=I(),x=k(_);B(x,()=>t.children),f(v,_)},O=v=>{var _=nr(),x=F(_,!0);L(_),dt(()=>ut(x,t.value)),f(v,_)},S=v=>{var _=ar(),x=F(_,!0);L(_),dt(()=>ut(x,e())),f(v,_)};M(w,v=>{t.children?v(R):t.value?v(O,1):v(S,!1)})}var C=ot(w,2);{let v=h(()=>r()==="sm"?12:14);ae(C,{get size(){return s(v)},class:"select-chevron"})}f(c,y)},$$slots:{default:!0}}))})}f(i,u),E()}function Sr(i,t){V(t,!0);let e=l(t,"side",3,"bottom"),r=l(t,"sideOffset",3,4),o=G(t,["$$slots","$$events","$$legacy","children","class","side","sideOffset"]);var u=I(),n=k(u);et(n,()=>Se,(a,d)=>{d(a,{children:(m,c)=>{var p=I(),y=k(p);{let w=h(()=>pt("select-content",t.class));et(y,()=>Qe,(R,O)=>{O(R,X({get class(){return s(w)},get side(){return e()},get sideOffset(){return r()}},()=>o,{children:(S,C)=>{var v=I(),_=k(v);B(_,()=>t.children),f(S,v)},$$slots:{default:!0}}))})}f(m,p)},$$slots:{default:!0}})}),f(i,u),E()}var hr=A('<span class="select-item-text"> </span> <!>',1);function Pr(i,t){V(t,!0);let e=l(t,"disabled",3,!1),r=G(t,["$$slots","$$events","$$legacy","value","label","disabled","class"]);var o=I(),u=k(o);{const n=(d,m)=>{let c=()=>m?.().selected;var p=hr(),y=k(p),w=F(y,!0);L(y);var R=ot(y,2);{var O=S=>{Bt(S,{size:12,class:"select-item-check"})};M(R,S=>{c()&&S(O)})}dt(()=>ut(w,t.label??t.value)),f(d,p)};let a=h(()=>pt("select-item",t.class));et(u,()=>er,(d,m)=>{m(d,X({get value(){return t.value},get label(){return t.label},get disabled(){return e()},get class(){return s(a)}},()=>r,{children:n,$$slots:{default:!0}}))})}f(i,o),E()}const Ir=sr;var ur=Mt("<title> </title>"),dr=Mt('<svg><!><path d="M8 15H24V17H8z"></path></svg>');function cr(i,t){const e=Ot(t,["children","$$slots","$$events","$$legacy"]),r=Ot(e,["size","title"]);V(t,!1);const o=Rt(),u=Rt();let n=l(t,"size",8,16),a=l(t,"title",8,void 0);It(()=>(vt(e),vt(a())),()=>{g(o,e["aria-label"]||e["aria-labelledby"]||a())}),It(()=>(s(o),vt(e)),()=>{g(u,{"aria-hidden":s(o)?void 0:!0,role:s(o)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),ie(),zt();var d=dr();W(d,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:n(),height:n(),...s(u),...r}));var m=F(d);{var c=p=>{var y=ur(),w=F(y,!0);L(y),dt(()=>ut(w,a())),f(p,y)};M(m,p=>{a()&&p(c)})}oe(),L(d),f(i,d),E()}var pr=A('<span class="flex items-center justify-center text-current"><!></span>');function Rr(i,t){V(t,!0);let e=l(t,"checked",15,!1),r=l(t,"indeterminate",15,!1),o=l(t,"ref",15,null),u=G(t,["$$slots","$$events","$$legacy","class","checked","indeterminate","ref"]);var n=I(),a=k(n);{const d=(c,p)=>{let y=()=>p?.().checked,w=()=>p?.().indeterminate;var R=pr(),O=F(R);{var S=v=>{cr(v,{class:"size-3"})},C=v=>{Bt(v,{class:"size-3"})};M(O,v=>{w()?v(S):y()&&v(C,1)})}L(R),f(c,R)};let m=h(()=>pt("peer inline-flex size-4 shrink-0 items-center justify-center rounded-sm border border-[var(--color-border)] bg-transparent transition-colors","hover:border-[var(--color-accent)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-accent)] focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--color-bg-primary)]","disabled:cursor-not-allowed disabled:opacity-50","data-[state=checked]:border-[var(--color-accent)] data-[state=checked]:bg-[var(--color-accent)] data-[state=checked]:text-white",t.class));et(a,()=>qe,(c,p)=>{p(c,X({get class(){return s(m)}},()=>u,{get checked(){return e()},set checked(y){e(y)},get indeterminate(){return r()},set indeterminate(y){r(y)},get ref(){return o()},set ref(y){o(y)},children:d,$$slots:{default:!0}}))})}f(i,n),E()}export{Rr as C,Ir as R,xr as S,Sr as a,Pr as b,Gt as c,Ut as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as g,s as ce,f as fe,d as ke,e as f,b as P,c as F,g as ze}from"./b0XUoOIH.js";import{p as ue,l as le,s,d as J,g as t,a as Me,c as l,n as W,r as o,b as me,m as oe,t as I,a1 as Ce,a2 as He,e as V,f as De,a0 as H,a3 as p,a4 as Re}from"./DSh-OF2y.js";import{a as Ae,r as $e,s as Ie,b as Pe}from"./CRnhIQbv.js";import{i as k,b as Ee}from"./DT3KtxWU.js";import{e as Te}from"./DHtLlmE0.js";import{s as Q}from"./CFtRXHDP.js";import{b as Be,B as Ne}from"./DQ5NTKSo.js";import{l as ve,p as ee}from"./D-yNNNdf.js";import{g as de}from"./BAAbylyg.js";import{i as Se}from"./vZ2iBqLE.js";import{A as Ye}from"./BgBJ0u3M.js";import{E as Ge,T as Ke}from"./azUmHUDT.js";import{n as U}from"./DC9z5DEo.js";import{v as D}from"./0wBGAod7.js";var Le=fe("<title> </title>"),Oe=fe('<svg><!><path d="M17.74,30,16,29l4-7h6a2,2,0,0,0,2-2V8a2,2,0,0,0-2-2H6A2,2,0,0,0,4,8V20a2,2,0,0,0,2,2h9v2H6a4,4,0,0,1-4-4V8A4,4,0,0,1,6,4H26a4,4,0,0,1,4,4V20a4,4,0,0,1-4,4H21.16Z"></path><path d="M8 10H24V12H8z"></path><path d="M8 16H18V18H8z"></path></svg>');function Xe(E,u){const n=ve(u,["children","$$slots","$$events","$$legacy"]),R=ve(n,["size","title"]);ue(u,!1);const _=oe(),A=oe();let v=ee(u,"size",8,16),d=ee(u,"title",8,void 0);le(()=>(J(n),J(d())),()=>{s(_,n["aria-label"]||n["aria-labelledby"]||d())}),le(()=>(t(_),J(n)),()=>{s(A,{"aria-hidden":t(_)?void 0:!0,role:t(_)?"img":void 0,focusable:Number(n.tabindex)===0?!0:void 0})}),Me(),Se();var c=Oe();Ae(c,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:v(),height:v(),...t(A),...R}));var b=l(c);{var T=w=>{var z=Le(),B=l(z,!0);o(z),I(()=>ce(B,d())),g(w,z)};k(b,w=>{d()&&w(T)})}W(3),o(c),g(E,c),me()}var Ze=P('<input class="view-rename-input svelte-r6dy5f"/>'),je=P('<button><span class="toggle-label"> </span></button>'),qe=P('<div class="context-backdrop svelte-r6dy5f"></div> <div class="view-context-menu svelte-r6dy5f"><div class="view-menu-item svelte-r6dy5f"><!> Rename</div> <div class="view-menu-item view-menu-item-danger svelte-r6dy5f"><!> Delete</div></div>',1),Fe=P('<div class="view-toolbar svelte-r6dy5f"><div></div> <div class="view-toggles svelte-r6dy5f"><button><span class="toggle-label">Details</span></button> <button><span class="toggle-label">Graph</span></button> <!> <button class="toggle-btn add-view-btn svelte-r6dy5f" title="New view"><!></button></div> <div class="toolbar-right svelte-r6dy5f"><!> <!></div></div> <!>',1);function dt(E,u){ue(u,!0);let n=ee(u,"activeView",3,"entity");const R=Ce("chat");function _(e){de(e,{noScroll:!0})}async function A(){const e=await D.create("New View");de(`/views/${e.id}`)}let v=V(null),d=V(""),c=V(null),b=V(!1);function T(e){s(b,!1),s(v,e.id,!0),s(d,e.name,!0)}He(()=>{t(v)&&t(c)&&(t(c).focus(),t(c).select(),setTimeout(()=>{s(b,!0)},50))});function w(){t(b)&&(t(v)&&t(d).trim()&&D.update(t(v),{name:t(d).trim()}),s(v,null),s(b,!1))}function z(){s(v,null),s(b,!1)}function B(e){e.key==="Enter"&&(e.preventDefault(),s(b,!0),w()),e.key==="Escape"&&(e.preventDefault(),z())}let $=V(null),N=V(De({x:0,y:0}));function pe(e,a){e.preventDefault(),s($,a.id,!0),s(N,{x:e.clientX,y:e.clientY},!0)}function S(){s($,null)}async function ge(e){S(),confirm(`Delete view "${e.name}"?`)&&await D.remove(e.id)}var te=Fe(),Y=H(te),G=p(l(Y),2),K=l(G);let ae;var L=p(K,2);let ie;var se=p(L,2);Te(se,17,()=>D.views,e=>e.id,(e,a)=>{var h=F(),X=H(h);{var Z=m=>{var i=Ze();$e(i),Ee(i,r=>s(c,r),()=>t(c)),f("keydown",i,B),ze("blur",i,w),Be(i,()=>t(d),r=>s(d,r)),g(m,i)},y=m=>{var i=je();let r;var M=l(i),x=l(M,!0);o(M),o(i),I(()=>{r=Q(i,1,"toggle-btn svelte-r6dy5f",null,r,{active:n()==="view"&&U.activeViewId===t(a).id}),ce(x,t(a).name)}),f("click",i,()=>!(n()==="view"&&U.activeViewId===t(a).id)&&_(`/views/${t(a).id}`)),f("contextmenu",i,j=>pe(j,t(a))),g(m,i)};k(X,m=>{t(v)===t(a).id?m(Z):m(y,!1)})}g(e,h)});var O=p(se,2),_e=l(O);Ye(_e,{size:14}),o(O),o(G);var ne=p(G,2),re=l(ne);{var be=e=>{var a=F(),h=H(a);Ie(h,()=>u.right),g(e,a)};k(re,e=>{u.right&&e(be)})}var he=p(re,2);{var ye=e=>{Ne(e,{variant:"accent",size:"icon",class:"chat-toggle",title:"Open Agent",get onclick(){return R.toggle},children:(a,h)=>{Xe(a,{size:14})},$$slots:{default:!0}})};k(he,e=>{R.open||e(ye)})}o(ne),o(Y);var we=p(Y,2);{var xe=e=>{const a=Re(()=>D.views.find(y=>y.id===t($)));var h=F(),X=H(h);{var Z=y=>{var m=qe(),i=H(m),r=p(i,2);let M;var x=l(r),j=l(x);Ge(j,{size:12}),W(),o(x);var q=p(x,2),Ve=l(q);Ke(Ve,{size:12}),W(),o(q),o(r),I(()=>M=Pe(r,"",M,{left:`${t(N).x??""}px`,top:`${t(N).y??""}px`})),f("click",i,S),f("click",r,C=>C.stopPropagation()),f("click",x,()=>{const C=t(a);S(),T(C)}),f("click",q,()=>{const C=t(a);ge(C)}),g(y,m)};k(X,y=>{t(a)&&y(Z)})}g(e,h)};k(we,e=>{t($)&&e(xe)})}I(()=>{ae=Q(K,1,"toggle-btn svelte-r6dy5f",null,ae,{active:n()==="entity"}),ie=Q(L,1,"toggle-btn svelte-r6dy5f",null,ie,{active:n()==="graph"})}),f("click",K,()=>n()!=="entity"&&_(U.entityPath??"/")),f("click",L,()=>n()!=="graph"&&_("/graph")),f("click",O,A),g(E,te),me()}ke(["click","keydown","contextmenu"]);export{dt as V};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as v,i as o,j as y,E as f,k as l,o as m,q as p,u as i,H as T,v as A}from"./DSh-OF2y.js";import{B as E}from"./DT3KtxWU.js";function k(d,_,e){var s;o&&(s=A,y());var r=new E(d);v(()=>{var a=_()??null;if(o){var h=l(s),u=h===T,c=a!==null;if(u!==c){var t=m();p(t),r.anchor=t,i(!1),r.ensure(a,a&&(n=>e(n,a))),i(!0);return}}r.ensure(a,a&&(n=>e(n,a)))},f)}export{k as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{w as O,h as Z,x as J,i as M,q as b,y,j as $,g as V,k as j,z as ee,o as Y,u as F,v as H,C as re,A as ne,B as U,D as fe,F as m,G as L,I as ae,J as ie,K as le,L as ue,M as B,N as se,O as oe,m as te,P as X,Q as ve,R as K,S as P,T as z,U as de,V as ce,W as pe,X as _e,Y as he,Z as ge}from"./DSh-OF2y.js";function Ce(e,i){return i}function Ee(e,i,l){for(var d=[],g=i.length,s,u=i.length,p=0;p<g;p++){let E=i[p];P(E,()=>{if(s){if(s.pending.delete(E),s.done.add(E),s.pending.size===0){var o=e.outrogroups;q(B(s.done)),o.delete(s),o.size===0&&(e.outrogroups=null)}}else u-=1},!1)}if(u===0){var a=d.length===0&&l!==null;if(a){var t=l,n=t.parentNode;_e(n),n.append(t),e.items.clear()}q(i,!a)}else s={pending:new Set(i),done:new Set},(e.outrogroups??=new Set).add(s)}function q(e,i=!0){for(var l=0;l<e.length;l++)he(e[l],i)}var G;function we(e,i,l,d,g,s=null){var u=e,p=new Map,a=(i&J)!==0;if(a){var t=e;u=M?b(y(t)):t.appendChild(O())}M&&$();var n=null,E=le(()=>{var f=l();return ue(f)?f:f==null?[]:B(f)}),o,c=!0;function A(){r.fallback=n,me(r,o,u,i,d),n!==null&&(o.length===0?(n.f&m)===0?K(n):(n.f^=m,D(n,null,u)):P(n,()=>{n=null}))}var I=Z(()=>{o=V(E);var f=o.length;let N=!1;if(M){var S=j(u)===ee;S!==(f===0)&&(u=Y(),b(u),F(!1),N=!0)}for(var h=new Set,C=fe,x=ie(),_=0;_<f;_+=1){M&&H.nodeType===re&&H.data===ne&&(u=H,N=!0,F(!1));var w=o[_],R=d(w,_),v=c?null:p.get(R);v?(v.v&&U(v.v,w),v.i&&U(v.i,_),x&&C.unskip_effect(v.e)):(v=Te(p,c?u:G??=O(),w,R,_,g,i,l),c||(v.e.f|=m),p.set(R,v)),h.add(R)}if(f===0&&s&&!n&&(c?n=L(()=>s(u)):(n=L(()=>s(G??=O())),n.f|=m)),f>h.size&&ae(),M&&f>0&&b(Y()),!c)if(x){for(const[Q,W]of p)h.has(Q)||C.skip_effect(W.e);C.oncommit(A),C.ondiscard(()=>{})}else A();N&&F(!0),V(E)}),r={effect:I,items:p,outrogroups:null,fallback:n};c=!1,M&&(u=H)}function k(e){for(;e!==null&&(e.f&ce)===0;)e=e.next;return e}function me(e,i,l,d,g){var s=(d&pe)!==0,u=i.length,p=e.items,a=k(e.effect.first),t,n=null,E,o=[],c=[],A,I,r,f;if(s)for(f=0;f<u;f+=1)A=i[f],I=g(A,f),r=p.get(I).e,(r.f&m)===0&&(r.nodes?.a?.measure(),(E??=new Set).add(r));for(f=0;f<u;f+=1){if(A=i[f],I=g(A,f),r=p.get(I).e,e.outrogroups!==null)for(const v of e.outrogroups)v.pending.delete(r),v.done.delete(r);if((r.f&m)!==0)if(r.f^=m,r===a)D(r,null,l);else{var N=n?n.next:a;r===e.effect.last&&(e.effect.last=r.prev),r.prev&&(r.prev.next=r.next),r.next&&(r.next.prev=r.prev),T(e,n,r),T(e,r,N),D(r,N,l),n=r,o=[],c=[],a=k(n.next);continue}if((r.f&z)!==0&&(K(r),s&&(r.nodes?.a?.unfix(),(E??=new Set).delete(r))),r!==a){if(t!==void 0&&t.has(r)){if(o.length<c.length){var S=c[0],h;n=S.prev;var C=o[0],x=o[o.length-1];for(h=0;h<o.length;h+=1)D(o[h],S,l);for(h=0;h<c.length;h+=1)t.delete(c[h]);T(e,C.prev,x.next),T(e,n,C),T(e,x,S),a=S,n=x,f-=1,o=[],c=[]}else t.delete(r),D(r,a,l),T(e,r.prev,r.next),T(e,r,n===null?e.effect.first:n.next),T(e,n,r),n=r;continue}for(o=[],c=[];a!==null&&a!==r;)(t??=new Set).add(a),c.push(a),a=k(a.next);if(a===null)continue}(r.f&m)===0&&o.push(r),n=r,a=k(r.next)}if(e.outrogroups!==null){for(const v of e.outrogroups)v.pending.size===0&&(q(B(v.done)),e.outrogroups?.delete(v));e.outrogroups.size===0&&(e.outrogroups=null)}if(a!==null||t!==void 0){var _=[];if(t!==void 0)for(r of t)(r.f&z)===0&&_.push(r);for(;a!==null;)(a.f&z)===0&&a!==e.fallback&&_.push(a),a=k(a.next);var w=_.length;if(w>0){var R=(d&J)!==0&&u===0?l:null;if(s){for(f=0;f<w;f+=1)_[f].nodes?.a?.measure();for(f=0;f<w;f+=1)_[f].nodes?.a?.fix()}Ee(e,_,R)}}s&&de(()=>{if(E!==void 0)for(r of E)r.nodes?.a?.apply()})}function Te(e,i,l,d,g,s,u,p){var a=(u&se)!==0?(u&oe)===0?te(l,!1,!1):X(l):null,t=(u&ve)!==0?X(g):null;return{v:a,i:t,e:L(()=>(s(i,a??l,t??g,p),()=>{e.delete(d)}))}}function D(e,i,l){if(e.nodes)for(var d=e.nodes.start,g=e.nodes.end,s=i&&(i.f&m)===0?i.nodes.start:l;d!==null;){var u=ge(d);if(s.before(d),d===g)return;d=u}}function T(e,i,l){i===null?e.effect.first=l:i.next=l,l===null?e.effect.last=i:l.prev=i}export{we as e,Ce as i};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{a as R,s as Dn,f as pe,l as Nn,o as I,c as _,m as Vr,u as Kr,b as Hr}from"./b0XUoOIH.js";import{i as Ln}from"./vZ2iBqLE.js";import{aM as Ur,i as jr,j as Yr,bx as Gr,h as Xr,e as P,by as cn,P as qr,g as d,s as b,aY as kt,p as Y,l as Jt,d as At,a as Bn,c as Qt,n as _n,r as $t,b as G,m as te,t as Wn,a4 as A,f as Et,aW as Zr,a1 as un,aV as Jr,a6 as Qr,a2 as B,a7 as Pe,aE as $r,a0 as N,ae as Q,bz as ti,bA as zn,aD as ei,a3 as ni}from"./DSh-OF2y.js";import{B as ri,i as Mt}from"./DT3KtxWU.js";import{a as Vn,s as $}from"./CRnhIQbv.js";import{l as ee,p as y,s as Be,r as me}from"./D-yNNNdf.js";import{b as Ee}from"./CFtRXHDP.js";function ii(){return Symbol(Ur)}const oi=Symbol("NaN");function si(e,t,n){jr&&Yr();var r=new ri(e),i=!Gr();Xr(()=>{var s=t();s!==s&&(s=oi),i&&s!==null&&typeof s=="object"&&(s={}),r.ensure(s,n)})}class ai extends Map{#t=new Map;#e=P(0);#n=P(0);#r=cn||-1;constructor(t){if(super(),t){for(var[n,r]of t)super.set(n,r);this.#n.v=super.size}}#i(t){return cn===this.#r?P(t):qr(t)}has(t){var n=this.#t,r=n.get(t);if(r===void 0)if(super.has(t))r=this.#i(0),n.set(t,r);else return d(this.#e),!1;return d(r),!0}forEach(t,n){this.#o(),super.forEach(t,n)}get(t){var n=this.#t,r=n.get(t);if(r===void 0)if(super.has(t))r=this.#i(0),n.set(t,r);else{d(this.#e);return}return d(r),super.get(t)}set(t,n){var r=this.#t,i=r.get(t),s=super.get(t),o=super.set(t,n),a=this.#e;if(i===void 0)i=this.#i(0),r.set(t,i),b(this.#n,super.size),kt(a);else if(s!==n){kt(i);var c=a.reactions===null?null:new Set(a.reactions),u=c===null||!i.reactions?.every(f=>c.has(f));u&&kt(a)}return o}delete(t){var n=this.#t,r=n.get(t),i=super.delete(t);return r!==void 0&&(n.delete(t),b(r,-1)),i&&(b(this.#n,super.size),kt(this.#e)),i}clear(){if(super.size!==0){super.clear();var t=this.#t;b(this.#n,0);for(var n of t.values())b(n,-1);kt(this.#e),t.clear()}}#o(){d(this.#e);var t=this.#t;if(this.#n.v!==t.size){for(var n of super.keys())if(!t.has(n)){var r=this.#i(0);t.set(n,r)}}for([,r]of this.#t)d(r)}keys(){return d(this.#e),super.keys()}values(){return this.#o(),super.values()}entries(){return this.#o(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return d(this.#n),super.size}}var ci=pe("<title> </title>"),ui=pe('<svg><!><path d="M22 16 12 26 10.6 24.6 19.2 16 10.6 7.4 12 6z"></path></svg>');function Wa(e,t){const n=ee(t,["children","$$slots","$$events","$$legacy"]),r=ee(n,["size","title"]);Y(t,!1);const i=te(),s=te();let o=y(t,"size",8,16),a=y(t,"title",8,void 0);Jt(()=>(At(n),At(a())),()=>{b(i,n["aria-label"]||n["aria-labelledby"]||a())}),Jt(()=>(d(i),At(n)),()=>{b(s,{"aria-hidden":d(i)?void 0:!0,role:d(i)?"img":void 0,focusable:Number(n.tabindex)===0?!0:void 0})}),Bn(),Ln();var c=ui();Vn(c,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:o(),height:o(),...d(s),...r}));var u=Qt(c);{var f=l=>{var g=ci(),h=Qt(g,!0);$t(g),Wn(()=>Dn(h,a())),R(l,g)};Mt(u,l=>{a()&&l(f)})}_n(),$t(c),R(e,c),G()}function li(e){return typeof e=="function"}function Vt(e){return e!==null&&typeof e=="object"}const fi=["string","number","bigint","boolean"];function Me(e){return e==null||fi.includes(typeof e)?!0:Array.isArray(e)?e.every(t=>Me(t)):typeof e=="object"?Object.getPrototypeOf(e)===Object.prototype:!1}const Tt=Symbol("box"),be=Symbol("is-writable");function x(e,t){const n=A(e);return t?{[Tt]:!0,[be]:!0,get current(){return d(n)},set current(r){t(r)}}:{[Tt]:!0,get current(){return e()}}}function Kt(e){return Vt(e)&&Tt in e}function _e(e){return Kt(e)&&be in e}function Kn(e){return Kt(e)?e:li(e)?x(e):et(e)}function di(e){return Object.entries(e).reduce((t,[n,r])=>Kt(r)?(_e(r)?Object.defineProperty(t,n,{get(){return r.current},set(i){r.current=i}}):Object.defineProperty(t,n,{get(){return r.current}}),t):Object.assign(t,{[n]:r}),{})}function hi(e){return _e(e)?{[Tt]:!0,get current(){return e.current}}:e}function et(e){let t=P(Et(e));return{[Tt]:!0,[be]:!0,get current(){return d(t)},set current(n){b(t,n,!0)}}}function xt(e){let t=P(Et(e));return{[Tt]:!0,[be]:!0,get current(){return d(t)},set current(n){b(t,n,!0)}}}xt.from=Kn;xt.with=x;xt.flatten=di;xt.readonly=hi;xt.isBox=Kt;xt.isWritableBox=_e;function Hn(...e){return function(t){for(const n of e)if(n){if(t.defaultPrevented)return;typeof n=="function"?n.call(this,t):n.current?.call(this,t)}}}var ln=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,gi=/\n/g,pi=/^\s*/,mi=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,bi=/^:\s*/,vi=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,yi=/^[;\s]*/,wi=/^\s+|\s+$/g,xi=`
|
|
2
|
-
`,fn="/",dn="*",bt="",Si="comment",Ai="declaration";function Ei(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(m){var p=m.match(gi);p&&(n+=p.length);var v=m.lastIndexOf(xi);r=~v?m.length-v:r+m.length}function s(){var m={line:n,column:r};return function(p){return p.position=new o(m),u(),p}}function o(m){this.start=m,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function a(m){var p=new Error(t.source+":"+n+":"+r+": "+m);if(p.reason=m,p.filename=t.source,p.line=n,p.column=r,p.source=e,!t.silent)throw p}function c(m){var p=m.exec(e);if(p){var v=p[0];return i(v),e=e.slice(v.length),p}}function u(){c(pi)}function f(m){var p;for(m=m||[];p=l();)p!==!1&&m.push(p);return m}function l(){var m=s();if(!(fn!=e.charAt(0)||dn!=e.charAt(1))){for(var p=2;bt!=e.charAt(p)&&(dn!=e.charAt(p)||fn!=e.charAt(p+1));)++p;if(p+=2,bt===e.charAt(p-1))return a("End of comment missing");var v=e.slice(2,p-2);return r+=2,i(v),e=e.slice(p),r+=2,m({type:Si,comment:v})}}function g(){var m=s(),p=c(mi);if(p){if(l(),!c(bi))return a("property missing ':'");var v=c(vi),w=m({type:Ai,property:hn(p[0].replace(ln,bt)),value:v?hn(v[0].replace(ln,bt)):bt});return c(yi),w}}function h(){var m=[];f(m);for(var p;p=g();)p!==!1&&(m.push(p),f(m));return m}return u(),h()}function hn(e){return e?e.replace(wi,bt):bt}function Oi(e,t){let n=null;if(!e||typeof e!="string")return n;const r=Ei(e),i=typeof t=="function";return r.forEach(s=>{if(s.type!=="declaration")return;const{property:o,value:a}=s;i?t(o,a,s):a&&(n=n||{},n[o]=a)}),n}const Ti=/\d/,Ci=["-","_","/","."];function Pi(e=""){if(!Ti.test(e))return e!==e.toLowerCase()}function Mi(e){const t=[];let n="",r,i;for(const s of e){const o=Ci.includes(s);if(o===!0){t.push(n),n="",r=void 0;continue}const a=Pi(s);if(i===!1){if(r===!1&&a===!0){t.push(n),n=s,r=a;continue}if(r===!0&&a===!1&&n.length>1){const c=n.at(-1);t.push(n.slice(0,Math.max(0,n.length-1))),n=c+s,r=a;continue}}n+=s,r=a,i=o}return t.push(n),t}function Un(e){return e?Mi(e).map(t=>Ri(t)).join(""):""}function Fi(e){return Ii(Un(e||""))}function Ri(e){return e?e[0].toUpperCase()+e.slice(1):""}function Ii(e){return e?e[0].toLowerCase()+e.slice(1):""}function Bt(e){if(!e)return{};const t={};function n(r,i){if(r.startsWith("-moz-")||r.startsWith("-webkit-")||r.startsWith("-ms-")||r.startsWith("-o-")){t[Un(r)]=i;return}if(r.startsWith("--")){t[r]=i;return}t[Fi(r)]=i}return Oi(e,n),t}function vt(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}function ki(e,t){const n=RegExp(e,"g");return r=>{if(typeof r!="string")throw new TypeError(`expected an argument of type string, but got ${typeof r}`);return r.match(n)?r.replace(n,t):r}}const Di=ki(/[A-Z]/,e=>`-${e.toLowerCase()}`);function Ni(e){if(!e||typeof e!="object"||Array.isArray(e))throw new TypeError(`expected an argument of type object, but got ${typeof e}`);return Object.keys(e).map(t=>`${Di(t)}: ${e[t]};`).join(`
|
|
3
|
-
`)}function jn(e={}){return Ni(e).replace(`
|
|
4
|
-
`," ")}const Li=["onabort","onanimationcancel","onanimationend","onanimationiteration","onanimationstart","onauxclick","onbeforeinput","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncompositionend","oncompositionstart","oncompositionupdate","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onfocusin","onfocusout","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onprogress","onratechange","onreset","onresize","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onselectionchange","onselectstart","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitioncancel","ontransitionend","ontransitionrun","ontransitionstart","onvolumechange","onwaiting","onwebkitanimationend","onwebkitanimationiteration","onwebkitanimationstart","onwebkittransitionend","onwheel"],Bi=new Set(Li);function _i(e){return Bi.has(e)}function ve(...e){const t={...e[0]};for(let n=1;n<e.length;n++){const r=e[n];if(r){for(const i of Object.keys(r)){const s=t[i],o=r[i],a=typeof s=="function",c=typeof o=="function";if(a&&_i(i)){const u=s,f=o;t[i]=Hn(u,f)}else if(a&&c)t[i]=vt(s,o);else if(i==="class"){const u=Me(s),f=Me(o);u&&f?t[i]=Ee(s,o):u?t[i]=Ee(s):f&&(t[i]=Ee(o))}else if(i==="style"){const u=typeof s=="object",f=typeof o=="object",l=typeof s=="string",g=typeof o=="string";if(u&&f)t[i]={...s,...o};else if(u&&g){const h=Bt(o);t[i]={...s,...h}}else if(l&&f){const h=Bt(s);t[i]={...h,...o}}else if(l&&g){const h=Bt(s),m=Bt(o);t[i]={...h,...m}}else u?t[i]=s:f?t[i]=o:l?t[i]=s:g&&(t[i]=o)}else t[i]=o!==void 0?o:s}for(const i of Object.getOwnPropertySymbols(r)){const s=t[i],o=r[i];t[i]=o!==void 0?o:s}}}return typeof t.style=="object"&&(t.style=jn(t.style).replaceAll(`
|
|
5
|
-
`," ")),t.hidden===!1&&(t.hidden=void 0,delete t.hidden),t.disabled===!1&&(t.disabled=void 0,delete t.disabled),t}const Yn=typeof window<"u"?window:void 0;function Wi(e){let t=e.activeElement;for(;t?.shadowRoot;){const n=t.shadowRoot.activeElement;if(n===t)break;t=n}return t}class zi{#t;#e;constructor(t={}){const{window:n=Yn,document:r=n?.document}=t;n!==void 0&&(this.#t=r,this.#e=Nn(i=>{const s=I(n,"focusin",i),o=I(n,"focusout",i);return()=>{s(),o()}}))}get current(){return this.#e?.(),this.#t?Wi(this.#t):null}}new zi;function Vi(e){return typeof e=="function"}class St{#t;#e;constructor(t){this.#t=t,this.#e=Symbol(t)}get key(){return this.#e}exists(){return Zr(this.#e)}get(){const t=un(this.#e);if(t===void 0)throw new Error(`Context "${this.#t}" not found`);return t}getOr(t){const n=un(this.#e);return n===void 0?t:n}set(t){return Jr(this.#e,t)}}function Ki(e,t){switch(e){case"post":B(t);break;case"pre":Qr(t);break}}function Gn(e,t,n,r={}){const{lazy:i=!1}=r;let s=!i,o=Array.isArray(e)?[]:void 0;Ki(t,()=>{const a=Array.isArray(e)?e.map(u=>u()):e();if(!s){s=!0,o=a;return}const c=Pe(()=>n(a,o));return o=a,c})}function z(e,t,n){Gn(e,"post",t,n)}function Hi(e,t,n){Gn(e,"pre",t,n)}z.pre=Hi;function gn(e){return Vi(e)?e():e}class Ui{#t={width:0,height:0};#e=!1;#n;#r;#i;#o=A(()=>(d(this.#s)?.(),this.getSize().width));#a=A(()=>(d(this.#s)?.(),this.getSize().height));#s=A(()=>{const t=gn(this.#r);if(t)return Nn(n=>{if(!this.#i)return;const r=new this.#i.ResizeObserver(i=>{this.#e=!0;for(const s of i){const o=this.#n.box==="content-box"?s.contentBoxSize:s.borderBoxSize,a=Array.isArray(o)?o:[o];this.#t.width=a.reduce((c,u)=>Math.max(c,u.inlineSize),0),this.#t.height=a.reduce((c,u)=>Math.max(c,u.blockSize),0)}n()});return r.observe(t),()=>{this.#e=!1,r.disconnect()}})});constructor(t,n={box:"border-box"}){this.#i=n.window??Yn,this.#n=n,this.#r=t,this.#t={width:0,height:0}}calculateSize(){const t=gn(this.#r);if(!t||!this.#i)return;const n=t.offsetWidth,r=t.offsetHeight;if(this.#n.box==="border-box")return{width:n,height:r};const i=this.#i.getComputedStyle(t),s=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight),o=parseFloat(i.paddingTop)+parseFloat(i.paddingBottom),a=parseFloat(i.borderLeftWidth)+parseFloat(i.borderRightWidth),c=parseFloat(i.borderTopWidth)+parseFloat(i.borderBottomWidth),u=n-s-a,f=r-o-c;return{width:u,height:f}}getSize(){return this.#e?this.#t:this.calculateSize()??this.#t}get current(){return d(this.#s)?.(),this.getSize()}get width(){return d(this.#o)}get height(){return d(this.#a)}}function Ft(e){B(()=>()=>{e()})}function ji(e,t){return setTimeout(t,e)}function nt(e){$r().then(e)}const Yi=1,Gi=9,Xi=11;function Fe(e){return Vt(e)&&e.nodeType===Yi&&typeof e.nodeName=="string"}function Xn(e){return Vt(e)&&e.nodeType===Gi}function qi(e){return Vt(e)&&e.constructor?.name==="VisualViewport"}function Zi(e){return Vt(e)&&e.nodeType!==void 0}function qn(e){return Zi(e)&&e.nodeType===Xi&&"host"in e}function Ji(e,t){if(!e||!t||!Fe(e)||!Fe(t))return!1;const n=t.getRootNode?.();if(e===t||e.contains(t))return!0;if(n&&qn(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Ht(e){return Xn(e)?e:qi(e)?e.document:e?.ownerDocument??document}function We(e){return qn(e)?We(e.host):Xn(e)?e.defaultView??window:Fe(e)?e.ownerDocument?.defaultView??window:window}function Qi(e){let t=e.activeElement;for(;t?.shadowRoot;){const n=t.shadowRoot.activeElement;if(n===t)break;t=n}return t}class ze{element;#t=A(()=>this.element.current?this.element.current.getRootNode()??document:document);get root(){return d(this.#t)}set root(t){b(this.#t,t)}constructor(t){typeof t=="function"?this.element=x(t):this.element=t}getDocument=()=>Ht(this.root);getWindow=()=>this.getDocument().defaultView??window;getActiveElement=()=>Qi(this.root);isActiveElement=t=>t===this.getActiveElement();getElementById(t){return this.root.getElementById(t)}querySelector=t=>this.root?this.root.querySelector(t):null;querySelectorAll=t=>this.root?this.root.querySelectorAll(t):[];setTimeout=(t,n)=>this.getWindow().setTimeout(t,n);clearTimeout=t=>this.getWindow().clearTimeout(t)}function ht(e,t){return{[ii()]:n=>Kt(e)?(e.current=n,Pe(()=>t?.(n)),()=>{"isConnected"in n&&n.isConnected||(e.current=null,t?.(null))}):(e(n),Pe(()=>t?.(n)),()=>{"isConnected"in n&&n.isConnected||(e(null),t?.(null))})}}function Ve(e){return e?"true":"false"}function Zn(e){return e?"":void 0}function za(e){return e?!0:void 0}function Ke(e){return e?"open":"closed"}function Va(e,t){return t?"mixed":e?"true":"false"}class $i{#t;#e;attrs;constructor(t){this.#t=t.getVariant?t.getVariant():null,this.#e=this.#t?`data-${this.#t}-`:`data-${t.component}-`,this.getAttr=this.getAttr.bind(this),this.selector=this.selector.bind(this),this.attrs=Object.fromEntries(t.parts.map(n=>[n,this.getAttr(n)]))}getAttr(t,n){return n?`data-${n}-${t}`:`${this.#e}${t}`}selector(t,n){return`[${this.getAttr(t,n)}]`}}function to(e){const t=new $i(e);return{...t.attrs,selector:t.selector,getAttr:t.getAttr}}const Wt="ArrowDown",Ut="ArrowLeft",jt="ArrowRight",ne="ArrowUp",Jn="End",Qn="Enter",eo="Escape",$n="Home",no="PageDown",ro="PageUp",ye=" ",io="Tab";function oo(e){return window.getComputedStyle(e).getPropertyValue("direction")}function so(e="ltr",t="horizontal"){return{horizontal:e==="rtl"?Ut:jt,vertical:Wt}[t]}function ao(e="ltr",t="horizontal"){return{horizontal:e==="rtl"?jt:Ut,vertical:ne}[t]}function co(e="ltr",t="horizontal"){return["ltr","rtl"].includes(e)||(e="ltr"),["horizontal","vertical"].includes(t)||(t="horizontal"),{nextKey:so(e,t),prevKey:ao(e,t)}}const tr=typeof document<"u",pn=uo();function uo(){return tr&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function ot(e){return e instanceof HTMLElement}function Re(e){return e instanceof Element}function er(e){return e instanceof Element||e instanceof SVGElement}function Ka(e){return e.pointerType==="touch"}function lo(e){return e!==null}function fo(e){return e instanceof HTMLInputElement&&"select"in e}class ho{#t;#e=xt(null);constructor(t){this.#t=t}getCandidateNodes(){return this.#t.rootNode.current?this.#t.candidateSelector?Array.from(this.#t.rootNode.current.querySelectorAll(this.#t.candidateSelector)):this.#t.candidateAttr?Array.from(this.#t.rootNode.current.querySelectorAll(`[${this.#t.candidateAttr}]:not([data-disabled])`)):[]:[]}focusFirstCandidate(){const t=this.getCandidateNodes();t.length&&t[0]?.focus()}handleKeydown(t,n,r=!1){const i=this.#t.rootNode.current;if(!i||!t)return;const s=this.getCandidateNodes();if(!s.length)return;const o=s.indexOf(t),a=oo(i),{nextKey:c,prevKey:u}=co(a,this.#t.orientation.current),f=this.#t.loop.current,l={[c]:o+1,[u]:o-1,[$n]:0,[Jn]:s.length-1};if(r){const m=c===Wt?jt:Wt,p=u===ne?Ut:ne;l[m]=o+1,l[p]=o-1}let g=l[n.key];if(g===void 0)return;n.preventDefault(),g<0&&f?g=s.length-1:g===s.length&&f&&(g=0);const h=s[g];if(h)return h.focus(),this.#e.current=h.id,this.#t.onCandidateFocus?.(h),h}getTabIndex(t){const n=this.getCandidateNodes(),r=this.#e.current!==null;return t&&!r&&n[0]===t?(this.#e.current=t.id,0):t?.id===this.#e.current?0:-1}setCurrentTabStopId(t){this.#e.current=t}focusCurrentTabStop(){const t=this.#e.current;if(!t)return;const n=this.#t.rootNode.current?.querySelector(`#${t}`);!n||!ot(n)||n.focus()}}class go{#t;#e=null;constructor(t){this.#t=t,Ft(()=>this.#n())}#n(){this.#e&&(window.cancelAnimationFrame(this.#e),this.#e=null)}run(t){this.#n();const n=this.#t.ref.current;if(n){if(typeof n.getAnimations!="function"){this.#r(t);return}this.#e=window.requestAnimationFrame(()=>{const r=n.getAnimations();if(r.length===0){this.#r(t);return}Promise.allSettled(r.map(i=>i.finished)).then(()=>{this.#r(t)})})}}#r(t){const n=()=>{t()};this.#t.afterTick?nt(n):n()}}class po{#t;#e;#n;#r=P(!1);constructor(t){this.#t=t,b(this.#r,t.open.current,!0),this.#e=t.enabled??!0,this.#n=new go({ref:this.#t.ref,afterTick:this.#t.open}),z(()=>this.#t.open.current,n=>{n&&b(this.#r,!0),this.#e&&this.#n.run(()=>{n===this.#t.open.current&&(this.#t.open.current||b(this.#r,!1),this.#t.onComplete?.())})})}get shouldRender(){return d(this.#r)}}function W(){}function Ha(e,t){return`bits-${e}`}function mo(e,t){var n=_(),r=N(n);si(r,()=>t.children,i=>{var s=_(),o=N(s);$(o,()=>t.children??Q),R(i,s)}),R(e,n)}const bo=new St("BitsConfig");function vo(){const e=new yo(null,{});return bo.getOr(e).opts}class yo{opts;constructor(t,n){const r=wo(t,n);this.opts={defaultPortalTo:r(i=>i.defaultPortalTo),defaultLocale:r(i=>i.defaultLocale)}}}function wo(e,t){return n=>x(()=>{const i=n(t)?.current;if(i!==void 0)return i;if(e!==null)return n(e.opts)?.current})}function xo(e,t){return n=>{const r=vo();return x(()=>{const i=n();if(i!==void 0)return i;const s=e(r).current;return s!==void 0?s:t})}}const So=xo(e=>e.defaultPortalTo,"body");function Ua(e,t){Y(t,!0);const n=So(()=>t.to),r=ti();let i=A(s);function s(){if(!tr||t.disabled)return null;let l=null;return typeof n.current=="string"?l=document.querySelector(n.current):l=n.current,l}let o;function a(){o&&(Kr(o),o=null)}z([()=>d(i),()=>t.disabled],([l,g])=>{if(!l||g){a();return}return o=Vr(mo,{target:l,props:{children:t.children},context:r}),()=>{a()}});var c=_(),u=N(c);{var f=l=>{var g=_(),h=N(g);$(h,()=>t.children??Q),R(l,g)};Mt(u,l=>{t.disabled&&l(f)})}R(e,c),G()}class Ao{eventName;options;constructor(t,n={bubbles:!0,cancelable:!0}){this.eventName=t,this.options=n}createEvent(t){return new CustomEvent(this.eventName,{...this.options,detail:t})}dispatch(t,n){const r=this.createEvent(n);return t.dispatchEvent(r),r}listen(t,n,r){const i=s=>{n(s)};return I(t,this.eventName,i,r)}}function mn(e,t=500){let n=null;const r=(...i)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...i)},t)};return r.destroy=()=>{n!==null&&(clearTimeout(n),n=null)},r}function nr(e,t){return e===t||e.contains(t)}function rr(e){return e?.ownerDocument??document}function Eo(e,t){const{clientX:n,clientY:r}=e,i=t.getBoundingClientRect();return n<i.left||n>i.right||r<i.top||r>i.bottom}const Ie=[Qn,ye],Oo=[Wt,ro,$n],ir=[ne,no,Jn],To=[...Oo,...ir],Co={ltr:[...Ie,jt],rtl:[...Ie,Ut]},ja={ltr:[Ut],rtl:[jt]};function re(e){return e.pointerType==="mouse"}function Po(e,{select:t=!1}={}){if(!e||!e.focus)return;const n=Ht(e);if(n.activeElement===e)return;const r=n.activeElement;e.focus({preventScroll:!0}),e!==r&&fo(e)&&t&&e.select()}function Mo(e,{select:t=!1}={},n){const r=n();for(const i of e)if(Po(i,{select:t}),n()!==r)return!0}let Dt=P(!1);class dt{static _refs=0;static _cleanup;constructor(){B(()=>(dt._refs===0&&(dt._cleanup=zn(()=>{const t=[],n=i=>{b(Dt,!1)},r=i=>{b(Dt,!0)};return t.push(I(document,"pointerdown",n,{capture:!0}),I(document,"pointermove",n,{capture:!0}),I(document,"keydown",r,{capture:!0})),vt(...t)})),dt._refs++,()=>{dt._refs--,dt._refs===0&&(b(Dt,!1),dt._cleanup?.())}))}get current(){return d(Dt)}set current(t){b(Dt,t,!0)}}var or=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],ie=or.join(","),sr=typeof Element>"u",yt=sr?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,oe=!sr&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},se=function(t,n){var r;n===void 0&&(n=!0);var i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),s=i===""||i==="true",o=s||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):se(t.parentNode));return o},Fo=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},ar=function(t,n,r){if(se(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(ie));return n&&yt.call(t,ie)&&i.unshift(t),i=i.filter(r),i},ae=function(t,n,r){for(var i=[],s=Array.from(t);s.length;){var o=s.shift();if(!se(o,!1))if(o.tagName==="SLOT"){var a=o.assignedElements(),c=a.length?a:o.children,u=ae(c,!0,r);r.flatten?i.push.apply(i,u):i.push({scopeParent:o,candidates:u})}else{var f=yt.call(o,ie);f&&r.filter(o)&&(n||!t.includes(o))&&i.push(o);var l=o.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(o),g=!se(l,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(o));if(l&&g){var h=ae(l===!0?o.children:l.children,!0,r);r.flatten?i.push.apply(i,h):i.push({scopeParent:o,candidates:h})}else s.unshift.apply(s,o.children)}}return i},cr=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},ur=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||Fo(t))&&!cr(t)?0:t.tabIndex},Ro=function(t,n){var r=ur(t);return r<0&&n&&!cr(t)?0:r},Io=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},lr=function(t){return t.tagName==="INPUT"},ko=function(t){return lr(t)&&t.type==="hidden"},Do=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},No=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},Lo=function(t){if(!t.name)return!0;var n=t.form||oe(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(t.name));else try{i=r(t.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=No(i,t.form);return!s||s===t},Bo=function(t){return lr(t)&&t.type==="radio"},_o=function(t){return Bo(t)&&!Lo(t)},Wo=function(t){var n,r=t&&oe(t),i=(n=r)===null||n===void 0?void 0:n.host,s=!1;if(r&&r!==t){var o,a,c;for(s=!!((o=i)!==null&&o!==void 0&&(a=o.ownerDocument)!==null&&a!==void 0&&a.contains(i)||t!=null&&(c=t.ownerDocument)!==null&&c!==void 0&&c.contains(t));!s&&i;){var u,f,l;r=oe(i),i=(u=r)===null||u===void 0?void 0:u.host,s=!!((f=i)!==null&&f!==void 0&&(l=f.ownerDocument)!==null&&l!==void 0&&l.contains(i))}}return s},bn=function(t){var n=t.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},zo=function(t,n){var r=n.displayCheck,i=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var s=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!s}if(getComputedStyle(t).visibility==="hidden")return!0;var o=yt.call(t,"details>summary:first-of-type"),a=o?t.parentElement:t;if(yt.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof i=="function"){for(var c=t;t;){var u=t.parentElement,f=oe(t);if(u&&!u.shadowRoot&&i(u)===!0)return bn(t);t.assignedSlot?t=t.assignedSlot:!u&&f!==t.ownerDocument?t=f.host:t=u}t=c}if(Wo(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return bn(t);return!1},Vo=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.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 yt.call(n,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}n=n.parentElement}return!1},ce=function(t,n){return!(n.disabled||ko(n)||zo(n,t)||Do(n)||Vo(n))},ke=function(t,n){return!(_o(n)||ur(n)<0||!ce(t,n))},Ko=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},fr=function(t){var n=[],r=[];return t.forEach(function(i,s){var o=!!i.scopeParent,a=o?i.scopeParent:i,c=Ro(a,o),u=o?fr(i.candidates):a;c===0?o?n.push.apply(n,u):n.push(a):r.push({documentOrder:s,tabIndex:c,item:i,isScope:o,content:u})}),r.sort(Io).reduce(function(i,s){return s.isScope?i.push.apply(i,s.content):i.push(s.content),i},[]).concat(n)},dr=function(t,n){n=n||{};var r;return n.getShadowRoot?r=ae([t],n.includeContainer,{filter:ke.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Ko}):r=ar(t,n.includeContainer,ke.bind(null,n)),fr(r)},hr=function(t,n){n=n||{};var r;return n.getShadowRoot?r=ae([t],n.includeContainer,{filter:ce.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=ar(t,n.includeContainer,ce.bind(null,n)),r},He=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return yt.call(t,ie)===!1?!1:ke(n,t)},Ho=or.concat("iframe:not([inert]):not([inert] *)").join(","),gr=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return yt.call(t,Ho)===!1?!1:ce(n,t)};function _t(){return{getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"}}function Uo(e,t){if(!He(e,_t()))return jo(e,t);const n=Ht(e),r=dr(n.body,_t());t==="prev"&&r.reverse();const i=r.indexOf(e);return i===-1?n.body:r.slice(i+1)[0]}function jo(e,t){const n=Ht(e);if(!gr(e,_t()))return n.body;const r=hr(n.body,_t());t==="prev"&&r.reverse();const i=r.indexOf(e);return i===-1?n.body:r.slice(i+1).find(o=>He(o,_t()))??n.body}function Yo(e,t){return e.length!==t.length?!1:e.every((n,r)=>pr(n,t[r]))}function pr(e,t){return Number.isNaN(e)&&Number.isNaN(t)?!0:Array.isArray(e)&&Array.isArray(t)?Yo(e,t):typeof e=="object"&&typeof t=="object"?Go(e,t):Object.is(e,t)}function Go(e,t){if(typeof e!="object"||typeof t!="object"||e===null||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n)if(!r.includes(i)||!pr(e[i],t[i]))return!1;return!0}function Ya(e,t,n=!0){if(!(e.length===0||t<0||t>=e.length))return e.length===1&&t===0?e[0]:t===e.length-1?n?e[0]:void 0:e[t+1]}function Ga(e,t,n=!0){if(!(e.length===0||t<0||t>=e.length))return e.length===1&&t===0?e[0]:t===0?n?e[e.length-1]:void 0:e[t-1]}function Xa(e,t,n,r=!0){if(e.length===0||t<0||t>=e.length)return;let i=t+n;return r?i=(i%e.length+e.length)%e.length:i=Math.max(0,Math.min(i,e.length-1)),e[i]}function qa(e,t,n,r=!0){if(e.length===0||t<0||t>=e.length)return;let i=t-n;return r?i=(i%e.length+e.length)%e.length:i=Math.max(0,Math.min(i,e.length-1)),e[i]}function mr(e,t,n){const r=t.toLowerCase();if(r.endsWith(" ")){const l=r.slice(0,-1);if(e.filter(p=>p.toLowerCase().startsWith(l)).length<=1)return mr(e,l,n);const h=n?.toLowerCase();if(h&&h.startsWith(l)&&h.charAt(l.length)===" "&&t.trim()===l)return n;const m=e.filter(p=>p.toLowerCase().startsWith(r));if(m.length>0){const p=n?e.indexOf(n):-1;return vn(m,Math.max(p,0)).find(O=>O!==n)||n}}const s=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,o=s.toLowerCase(),a=n?e.indexOf(n):-1;let c=vn(e,Math.max(a,0));s.length===1&&(c=c.filter(l=>l!==n));const f=c.find(l=>l?.toLowerCase().startsWith(o));return f!==n?f:void 0}function vn(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const Xo={afterMs:1e4,onChange:W};function br(e,t){const{afterMs:n,onChange:r,getWindow:i}={...Xo,...t};let s=null,o=P(Et(e));function a(){return i().setTimeout(()=>{b(o,e,!0),r?.(e)},n)}return B(()=>()=>{s&&i().clearTimeout(s)}),x(()=>d(o),c=>{b(o,c,!0),r?.(c),s&&i().clearTimeout(s),s=a()})}class qo{#t;#e;#n=A(()=>this.#t.onMatch?this.#t.onMatch:t=>t.focus());#r=A(()=>this.#t.getCurrentItem?this.#t.getCurrentItem:this.#t.getActiveElement);constructor(t){this.#t=t,this.#e=br("",{afterMs:1e3,getWindow:t.getWindow}),this.handleTypeaheadSearch=this.handleTypeaheadSearch.bind(this),this.resetTypeahead=this.resetTypeahead.bind(this)}handleTypeaheadSearch(t,n){if(!n.length)return;this.#e.current=this.#e.current+t;const r=d(this.#r)(),i=n.find(c=>c===r)?.textContent?.trim()??"",s=n.map(c=>c.textContent?.trim()??""),o=mr(s,this.#e.current,i),a=n.find(c=>c.textContent?.trim()===o);return a&&d(this.#n)(a),a}resetTypeahead(){this.#e.current=""}get search(){return this.#e.current}}class Zo{#t;#e;#n;#r=P(null);constructor(t){this.#t=t,this.#e=A(()=>this.#t.enabled()),this.#n=br(!1,{afterMs:t.transitTimeout??300,onChange:n=>{d(this.#e)&&this.#t.setIsPointerInTransit?.(n)},getWindow:()=>We(this.#t.triggerNode())}),z([t.triggerNode,t.contentNode,t.enabled],([n,r,i])=>{if(!n||!r||!i)return;const s=a=>{this.#o(a,r)},o=a=>{this.#o(a,n)};return vt(I(n,"pointerleave",s),I(r,"pointerleave",o))}),z(()=>d(this.#r),()=>{const n=i=>{if(!d(this.#r))return;const s=i.target;if(!Re(s))return;const o={x:i.clientX,y:i.clientY},a=t.triggerNode()?.contains(s)||t.contentNode()?.contains(s),c=!ts(o,d(this.#r));a?this.#i():c&&(this.#i(),t.onPointerExit())},r=Ht(t.triggerNode()??t.contentNode());if(r)return I(r,"pointermove",n)})}#i(){b(this.#r,null),this.#n.current=!1}#o(t,n){const r=t.currentTarget;if(!ot(r))return;const i={x:t.clientX,y:t.clientY},s=Jo(i,r.getBoundingClientRect()),o=Qo(i,s),a=$o(n.getBoundingClientRect()),c=es([...o,...a]);b(this.#r,c,!0),this.#n.current=!0}}function Jo(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,i,s)){case s:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Qo(e,t,n=5){const r=n*1.5;switch(t){case"top":return[{x:e.x-n,y:e.y+n},{x:e.x,y:e.y-r},{x:e.x+n,y:e.y+n}];case"bottom":return[{x:e.x-n,y:e.y-n},{x:e.x,y:e.y+r},{x:e.x+n,y:e.y-n}];case"left":return[{x:e.x+n,y:e.y-n},{x:e.x-r,y:e.y},{x:e.x+n,y:e.y+n}];case"right":return[{x:e.x-n,y:e.y-n},{x:e.x+r,y:e.y},{x:e.x-n,y:e.y+n}]}}function $o(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function ts(e,t){const{x:n,y:r}=e;let i=!1;for(let s=0,o=t.length-1;s<t.length;o=s++){const a=t[s].x,c=t[s].y,u=t[o].x,f=t[o].y;c>r!=f>r&&n<(u-a)*(r-c)/(f-c)+a&&(i=!i)}return i}function es(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),ns(t)}function ns(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const i=e[r];for(;t.length>=2;){const s=t[t.length-1],o=t[t.length-2];if((s.x-o.x)*(i.y-o.y)>=(s.y-o.y)*(i.x-o.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const s=n[n.length-1],o=n[n.length-2];if((s.x-o.x)*(i.y-o.y)>=(s.y-o.y)*(i.x-o.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}const rs="data-context-menu-trigger",is="data-context-menu-content",vr=new St("Menu.Root"),Ct=new St("Menu.Root | Menu.Sub"),Ue=new St("Menu.Content"),yr=new Ao("bitsmenuopen",{bubbles:!1,cancelable:!0}),os=to({component:"menu",parts:["trigger","content","sub-trigger","item","group","group-heading","checkbox-group","checkbox-item","radio-group","radio-item","separator","sub-content","arrow"]});class wr{static create(t){const n=new wr(t);return vr.set(n)}opts;isUsingKeyboard=new dt;#t=P(!1);get ignoreCloseAutoFocus(){return d(this.#t)}set ignoreCloseAutoFocus(t){b(this.#t,t,!0)}#e=P(!1);get isPointerInTransit(){return d(this.#e)}set isPointerInTransit(t){b(this.#e,t,!0)}constructor(t){this.opts=t}getBitsAttr=t=>os.getAttr(t,this.opts.variant.current)}class je{static create(t,n){return Ct.set(new je(t,n,null))}opts;root;parentMenu;contentId=x(()=>"");#t=P(null);get contentNode(){return d(this.#t)}set contentNode(t){b(this.#t,t,!0)}contentPresence;#e=P(null);get triggerNode(){return d(this.#e)}set triggerNode(t){b(this.#e,t,!0)}constructor(t,n,r){this.opts=t,this.root=n,this.parentMenu=r,this.contentPresence=new po({ref:x(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),r&&z(()=>r.opts.open.current,()=>{r.opts.open.current||(this.opts.open.current=!1)})}toggleOpen(){this.opts.open.current=!this.opts.open.current}onOpen(){this.opts.open.current=!0}onClose(){this.opts.open.current=!1}}class xr{static create(t){return Ue.set(new xr(t,Ct.get()))}opts;parentMenu;rovingFocusGroup;domContext;attachment;#t=P("");get search(){return d(this.#t)}set search(t){b(this.#t,t,!0)}#e=0;#n;#r=P(!1);get mounted(){return d(this.#r)}set mounted(t){b(this.#r,t,!0)}#i;constructor(t,n){this.opts=t,this.parentMenu=n,this.domContext=new ze(t.ref),this.attachment=ht(this.opts.ref,r=>{this.parentMenu.contentNode!==r&&(this.parentMenu.contentNode=r)}),n.contentId=t.id,this.#i=t.isSub??!1,this.onkeydown=this.onkeydown.bind(this),this.onblur=this.onblur.bind(this),this.onfocus=this.onfocus.bind(this),this.handleInteractOutside=this.handleInteractOutside.bind(this),new Zo({contentNode:()=>this.parentMenu.contentNode,triggerNode:()=>this.parentMenu.triggerNode,enabled:()=>this.parentMenu.opts.open.current&&!!this.parentMenu.triggerNode?.hasAttribute(this.parentMenu.root.getBitsAttr("sub-trigger")),onPointerExit:()=>{this.parentMenu.opts.open.current=!1},setIsPointerInTransit:r=>{this.parentMenu.root.isPointerInTransit=r}}),this.#n=new qo({getActiveElement:()=>this.domContext.getActiveElement(),getWindow:()=>this.domContext.getWindow()}).handleTypeaheadSearch,this.rovingFocusGroup=new ho({rootNode:x(()=>this.parentMenu.contentNode),candidateAttr:this.parentMenu.root.getBitsAttr("item"),loop:this.opts.loop,orientation:x(()=>"vertical")}),z(()=>this.parentMenu.contentNode,r=>{if(!r)return;const i=()=>{nt(()=>{this.parentMenu.root.isUsingKeyboard.current&&this.rovingFocusGroup.focusFirstCandidate()})};return yr.listen(r,i)}),B(()=>{this.parentMenu.opts.open.current||this.domContext.getWindow().clearTimeout(this.#e)})}#o(){const t=this.parentMenu.contentNode;return t?Array.from(t.querySelectorAll(`[${this.parentMenu.root.getBitsAttr("item")}]:not([data-disabled])`)):[]}#a(){return this.parentMenu.root.isPointerInTransit}onCloseAutoFocus=t=>{this.opts.onCloseAutoFocus.current?.(t),!(t.defaultPrevented||this.#i)&&this.parentMenu.triggerNode&&He(this.parentMenu.triggerNode)&&(t.preventDefault(),this.parentMenu.triggerNode.focus())};handleTabKeyDown(t){let n=this.parentMenu;for(;n.parentMenu!==null;)n=n.parentMenu;if(!n.triggerNode)return;t.preventDefault();const r=Uo(n.triggerNode,t.shiftKey?"prev":"next");r?(this.parentMenu.root.ignoreCloseAutoFocus=!0,n.onClose(),nt(()=>{r.focus(),nt(()=>{this.parentMenu.root.ignoreCloseAutoFocus=!1})})):this.domContext.getDocument().body.focus()}onkeydown(t){if(t.defaultPrevented)return;if(t.key===io){this.handleTabKeyDown(t);return}const n=t.target,r=t.currentTarget;if(!ot(n)||!ot(r))return;const i=n.closest(`[${this.parentMenu.root.getBitsAttr("content")}]`)?.id===this.parentMenu.contentId.current,s=t.ctrlKey||t.altKey||t.metaKey,o=t.key.length===1;if(this.rovingFocusGroup.handleKeydown(n,t)||t.code==="Space")return;const c=this.#o();i&&!s&&o&&this.#n(t.key,c),t.target?.id===this.parentMenu.contentId.current&&To.includes(t.key)&&(t.preventDefault(),ir.includes(t.key)&&c.reverse(),Mo(c,{select:!1},()=>this.domContext.getActiveElement()))}onblur(t){Re(t.currentTarget)&&Re(t.target)&&(t.currentTarget.contains?.(t.target)||(this.domContext.getWindow().clearTimeout(this.#e),this.search=""))}onfocus(t){this.parentMenu.root.isUsingKeyboard.current&&nt(()=>this.rovingFocusGroup.focusFirstCandidate())}onItemEnter(){return this.#a()}onItemLeave(t){if(t.currentTarget.hasAttribute(this.parentMenu.root.getBitsAttr("sub-trigger"))||this.#a()||this.parentMenu.root.isUsingKeyboard.current)return;this.parentMenu.contentNode?.focus(),this.rovingFocusGroup.setCurrentTabStopId("")}onTriggerLeave(){return!!this.#a()}handleInteractOutside(t){if(!er(t.target))return;const n=this.parentMenu.triggerNode?.id;if(t.target.id===n){t.preventDefault();return}t.target.closest(`#${n}`)&&t.preventDefault()}get shouldRender(){return this.parentMenu.contentPresence.shouldRender}#s=A(()=>({open:this.parentMenu.opts.open.current}));get snippetProps(){return d(this.#s)}set snippetProps(t){b(this.#s,t)}#c=A(()=>({id:this.opts.id.current,role:"menu","aria-orientation":"vertical",[this.parentMenu.root.getBitsAttr("content")]:"","data-state":Ke(this.parentMenu.opts.open.current),onkeydown:this.onkeydown,onblur:this.onblur,onfocus:this.onfocus,dir:this.parentMenu.root.opts.dir.current,style:{pointerEvents:"auto",contain:"layout style"},...this.attachment}));get props(){return d(this.#c)}set props(t){b(this.#c,t)}popperProps={onCloseAutoFocus:t=>this.onCloseAutoFocus(t)}}class Sr{opts;content;attachment;#t=P(!1);constructor(t,n){this.opts=t,this.content=n,this.attachment=ht(this.opts.ref),this.onpointermove=this.onpointermove.bind(this),this.onpointerleave=this.onpointerleave.bind(this),this.onfocus=this.onfocus.bind(this),this.onblur=this.onblur.bind(this)}onpointermove(t){if(!t.defaultPrevented&&re(t))if(this.opts.disabled.current)this.content.onItemLeave(t);else{if(this.content.onItemEnter())return;const r=t.currentTarget;if(!ot(r))return;r.focus()}}onpointerleave(t){t.defaultPrevented||re(t)&&this.content.onItemLeave(t)}onfocus(t){nt(()=>{t.defaultPrevented||this.opts.disabled.current||b(this.#t,!0)})}onblur(t){nt(()=>{t.defaultPrevented||b(this.#t,!1)})}#e=A(()=>({id:this.opts.id.current,tabindex:-1,role:"menuitem","aria-disabled":Ve(this.opts.disabled.current),"data-disabled":Zn(this.opts.disabled.current),"data-highlighted":d(this.#t)?"":void 0,[this.content.parentMenu.root.getBitsAttr("item")]:"",onpointermove:this.onpointermove,onpointerleave:this.onpointerleave,onfocus:this.onfocus,onblur:this.onblur,...this.attachment}));get props(){return d(this.#e)}set props(t){b(this.#e,t)}}class Ar{static create(t){const n=new Sr(t,Ue.get());return new Ar(t,n)}opts;item;root;#t=!1;constructor(t,n){this.opts=t,this.item=n,this.root=n.content.parentMenu.root,this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this)}#e(){if(this.item.opts.disabled.current)return;const t=new CustomEvent("menuitemselect",{bubbles:!0,cancelable:!0});if(this.opts.onSelect.current(t),t.defaultPrevented){this.item.content.parentMenu.root.isUsingKeyboard.current=!1;return}this.opts.closeOnSelect.current&&this.item.content.parentMenu.root.opts.onClose()}onkeydown(t){const n=this.item.content.search!=="";if(!(this.item.opts.disabled.current||n&&t.key===ye)&&Ie.includes(t.key)){if(!ot(t.currentTarget))return;t.currentTarget.click(),t.preventDefault()}}onclick(t){this.item.opts.disabled.current||this.#e()}onpointerup(t){if(!t.defaultPrevented&&!this.#t){if(!ot(t.currentTarget))return;t.currentTarget?.click()}}onpointerdown(t){this.#t=!0}#n=A(()=>ve(this.item.props,{onclick:this.onclick,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,onkeydown:this.onkeydown}));get props(){return d(this.#n)}set props(t){b(this.#n,t)}}class Er{static create(t){const n=Ue.get(),r=new Sr(t,n),i=Ct.get();return new Er(t,r,n,i)}opts;item;content;submenu;attachment;#t=null;constructor(t,n,r,i){this.opts=t,this.item=n,this.content=r,this.submenu=i,this.attachment=ht(this.opts.ref,s=>this.submenu.triggerNode=s),this.onpointerleave=this.onpointerleave.bind(this),this.onpointermove=this.onpointermove.bind(this),this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this),Ft(()=>{this.#e()})}#e(){this.#t!==null&&(this.content.domContext.getWindow().clearTimeout(this.#t),this.#t=null)}onpointermove(t){re(t)&&!this.item.opts.disabled.current&&!this.submenu.opts.open.current&&!this.#t&&!this.content.parentMenu.root.isPointerInTransit&&(this.#t=this.content.domContext.setTimeout(()=>{this.submenu.onOpen(),this.#e()},this.opts.openDelay.current))}onpointerleave(t){re(t)&&this.#e()}onkeydown(t){const n=this.content.search!=="";this.item.opts.disabled.current||n&&t.key===ye||Co[this.submenu.root.opts.dir.current].includes(t.key)&&(t.currentTarget.click(),t.preventDefault())}onclick(t){if(this.item.opts.disabled.current||!ot(t.currentTarget))return;t.currentTarget.focus();const n=new CustomEvent("menusubtriggerselect",{bubbles:!0,cancelable:!0});this.opts.onSelect.current(n),this.submenu.opts.open.current||(this.submenu.onOpen(),nt(()=>{const r=this.submenu.contentNode;r&&yr.dispatch(r)}))}#n=A(()=>ve({"aria-haspopup":"menu","aria-expanded":Ve(this.submenu.opts.open.current),"data-state":Ke(this.submenu.opts.open.current),"aria-controls":this.submenu.opts.open.current?this.submenu.contentId.current:void 0,[this.submenu.root.getBitsAttr("sub-trigger")]:"",onclick:this.onclick,onpointermove:this.onpointermove,onpointerleave:this.onpointerleave,onkeydown:this.onkeydown,...this.attachment},this.item.props));get props(){return d(this.#n)}set props(t){b(this.#n,t)}}class Or{static create(t){return new Or(t,vr.get())}opts;root;attachment;constructor(t,n){this.opts=t,this.root=n,this.attachment=ht(this.opts.ref)}#t=A(()=>({id:this.opts.id.current,role:"group",[this.root.getBitsAttr("separator")]:"",...this.attachment}));get props(){return d(this.#t)}set props(t){b(this.#t,t)}}class Tr{static create(t){return new Tr(t,Ct.get())}opts;parentMenu;attachment;constructor(t,n){this.opts=t,this.parentMenu=n,this.attachment=ht(this.opts.ref,r=>this.parentMenu.triggerNode=r)}onclick=t=>{this.opts.disabled.current||t.detail!==0||(this.parentMenu.toggleOpen(),t.preventDefault())};onpointerdown=t=>{if(!this.opts.disabled.current){if(t.pointerType==="touch")return t.preventDefault();t.button===0&&t.ctrlKey===!1&&(this.parentMenu.toggleOpen(),this.parentMenu.opts.open.current||t.preventDefault())}};onpointerup=t=>{this.opts.disabled.current||t.pointerType==="touch"&&(t.preventDefault(),this.parentMenu.toggleOpen())};onkeydown=t=>{if(!this.opts.disabled.current){if(t.key===ye||t.key===Qn){this.parentMenu.toggleOpen(),t.preventDefault();return}t.key===Wt&&(this.parentMenu.onOpen(),t.preventDefault())}};#t=A(()=>{if(this.parentMenu.opts.open.current&&this.parentMenu.contentId.current)return this.parentMenu.contentId.current});#e=A(()=>({id:this.opts.id.current,disabled:this.opts.disabled.current,"aria-haspopup":"menu","aria-expanded":Ve(this.parentMenu.opts.open.current),"aria-controls":d(this.#t),"data-disabled":Zn(this.opts.disabled.current),"data-state":Ke(this.parentMenu.opts.open.current),[this.parentMenu.root.getBitsAttr("trigger")]:"",onclick:this.onclick,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,onkeydown:this.onkeydown,...this.attachment}));get props(){return d(this.#e)}set props(t){b(this.#e,t)}}class Za{static create(t){const n=Ct.get();return Ct.set(new je(t,n.root,n))}}globalThis.bitsDismissableLayers??=new Map;class Ye{static create(t){return new Ye(t)}opts;#t;#e;#n={pointerdown:!1};#r=!1;#i=!1;#o=void 0;#a;#s=W;constructor(t){this.opts=t,this.#e=t.interactOutsideBehavior,this.#t=t.onInteractOutside,this.#a=t.onFocusOutside,B(()=>{this.#o=rr(this.opts.ref.current)});let n=W;const r=()=>{this.#d(),globalThis.bitsDismissableLayers.delete(this),this.#u.destroy(),n()};z([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(!(!this.opts.enabled.current||!this.opts.ref.current))return ji(1,()=>{this.opts.ref.current&&(globalThis.bitsDismissableLayers.set(this,this.#e),n(),n=this.#f())}),r}),Ft(()=>{this.#d.destroy(),globalThis.bitsDismissableLayers.delete(this),this.#u.destroy(),this.#s(),n()})}#c=t=>{t.defaultPrevented||this.opts.ref.current&&nt(()=>{!this.opts.ref.current||this.#m(t.target)||t.target&&!this.#i&&this.#a.current?.(t)})};#f(){return vt(I(this.#o,"pointerdown",vt(this.#h,this.#p),{capture:!0}),I(this.#o,"pointerdown",vt(this.#g,this.#u)),I(this.#o,"focusin",this.#c))}#l=t=>{let n=t;n.defaultPrevented&&(n=yn(t)),this.#t.current(t)};#u=mn(t=>{if(!this.opts.ref.current){this.#s();return}const n=this.opts.isValidEvent.current(t,this.opts.ref.current)||cs(t,this.opts.ref.current);if(!this.#r||this.#b()||!n){this.#s();return}let r=t;if(r.defaultPrevented&&(r=yn(r)),this.#e.current!=="close"&&this.#e.current!=="defer-otherwise-close"){this.#s();return}t.pointerType==="touch"?(this.#s(),this.#s=I(this.#o,"click",this.#l,{once:!0})):this.#t.current(r)},10);#h=t=>{this.#n[t.type]=!0};#g=t=>{this.#n[t.type]=!1};#p=()=>{this.opts.ref.current&&(this.#r=as(this.opts.ref.current))};#m=t=>this.opts.ref.current?nr(this.opts.ref.current,t):!1;#d=mn(()=>{for(const t in this.#n)this.#n[t]=!1;this.#r=!1},20);#b(){return Object.values(this.#n).some(Boolean)}#v=()=>{this.#i=!0};#y=()=>{this.#i=!1};props={onfocuscapture:this.#v,onblurcapture:this.#y}}function ss(e=[...globalThis.bitsDismissableLayers]){return e.findLast(([t,{current:n}])=>n==="close"||n==="ignore")}function as(e){const t=[...globalThis.bitsDismissableLayers],n=ss(t);if(n)return n[0].opts.ref.current===e;const[r]=t[0];return r.opts.ref.current===e}function cs(e,t){const n=e.target;if(!er(n))return!1;const r=!!n.closest(`[${rs}]`);if("button"in e&&e.button>0&&!r)return!1;if("button"in e&&e.button===0&&r)return!0;const i=!!t.closest(`[${is}]`);return r&&i?!1:rr(n).documentElement.contains(n)&&!nr(t,n)&&Eo(e,t)}function yn(e){const t=e.currentTarget,n=e.target;let r;e instanceof PointerEvent?r=new PointerEvent(e.type,e):r=new PointerEvent("pointerdown",e);let i=!1;return new Proxy(r,{get:(o,a)=>a==="currentTarget"?t:a==="target"?n:a==="preventDefault"?()=>{i=!0,typeof o.preventDefault=="function"&&o.preventDefault()}:a==="defaultPrevented"?i:a in o?o[a]:e[a]})}function us(e,t){Y(t,!0);let n=y(t,"interactOutsideBehavior",3,"close"),r=y(t,"onInteractOutside",3,W),i=y(t,"onFocusOutside",3,W),s=y(t,"isValidEvent",3,()=>!1);const o=Ye.create({id:x(()=>t.id),interactOutsideBehavior:x(()=>n()),onInteractOutside:x(()=>r()),enabled:x(()=>t.enabled),onFocusOutside:x(()=>i()),isValidEvent:x(()=>s()),ref:t.ref});var a=_(),c=N(a);$(c,()=>t.children??Q,()=>({props:o.props})),R(e,a),G()}globalThis.bitsEscapeLayers??=new Map;class Ge{static create(t){return new Ge(t)}opts;domContext;constructor(t){this.opts=t,this.domContext=new ze(this.opts.ref);let n=W;z(()=>t.enabled.current,r=>(r&&(globalThis.bitsEscapeLayers.set(this,t.escapeKeydownBehavior),n=this.#t()),()=>{n(),globalThis.bitsEscapeLayers.delete(this)}))}#t=()=>I(this.domContext.getDocument(),"keydown",this.#e,{passive:!1});#e=t=>{if(t.key!==eo||!ls(this))return;const n=new KeyboardEvent(t.type,t);t.preventDefault();const r=this.opts.escapeKeydownBehavior.current;r!=="close"&&r!=="defer-otherwise-close"||this.opts.onEscapeKeydown.current(n)}}function ls(e){const t=[...globalThis.bitsEscapeLayers],n=t.findLast(([i,{current:s}])=>s==="close"||s==="ignore");if(n)return n[0]===e;const[r]=t[0];return r===e}function fs(e,t){Y(t,!0);let n=y(t,"escapeKeydownBehavior",3,"close"),r=y(t,"onEscapeKeydown",3,W);Ge.create({escapeKeydownBehavior:x(()=>n()),onEscapeKeydown:x(()=>r()),enabled:x(()=>t.enabled),ref:t.ref});var i=_(),s=N(i);$(s,()=>t.children??Q),R(e,i),G()}class Xe{static instance;#t=et([]);#e=new WeakMap;#n=new WeakMap;static getInstance(){return this.instance||(this.instance=new Xe),this.instance}register(t){const n=this.getActive();n&&n!==t&&n.pause();const r=document.activeElement;r&&r!==document.body&&this.#n.set(t,r),this.#t.current=this.#t.current.filter(i=>i!==t),this.#t.current.unshift(t)}unregister(t){this.#t.current=this.#t.current.filter(r=>r!==t);const n=this.getActive();n&&n.resume()}getActive(){return this.#t.current[0]}setFocusMemory(t,n){this.#e.set(t,n)}getFocusMemory(t){return this.#e.get(t)}isActiveScope(t){return this.getActive()===t}setPreFocusMemory(t,n){this.#n.set(t,n)}getPreFocusMemory(t){return this.#n.get(t)}clearPreFocusMemory(t){this.#n.delete(t)}}class qe{#t=!1;#e=null;#n=Xe.getInstance();#r=[];#i;constructor(t){this.#i=t}get paused(){return this.#t}pause(){this.#t=!0}resume(){this.#t=!1}#o(){for(const t of this.#r)t();this.#r=[]}mount(t){this.#e&&this.unmount(),this.#e=t,this.#n.register(this),this.#c(),this.#a()}unmount(){this.#e&&(this.#o(),this.#s(),this.#n.unregister(this),this.#n.clearPreFocusMemory(this),this.#e=null)}#a(){if(!this.#e)return;const t=new CustomEvent("focusScope.onOpenAutoFocus",{bubbles:!1,cancelable:!0});this.#i.onOpenAutoFocus.current(t),t.defaultPrevented||requestAnimationFrame(()=>{if(!this.#e)return;const n=this.#l();n?(n.focus(),this.#n.setFocusMemory(this,n)):this.#e.focus()})}#s(){const t=new CustomEvent("focusScope.onCloseAutoFocus",{bubbles:!1,cancelable:!0});if(this.#i.onCloseAutoFocus.current?.(t),!t.defaultPrevented){const n=this.#n.getPreFocusMemory(this);if(n&&document.contains(n))try{n.focus()}catch{document.body.focus()}}}#c(){if(!this.#e||!this.#i.trap.current)return;const t=this.#e,n=t.ownerDocument,r=o=>{if(this.#t||!this.#n.isActiveScope(this))return;const a=o.target;if(!a)return;if(t.contains(a))this.#n.setFocusMemory(this,a);else{const u=this.#n.getFocusMemory(this);if(u&&t.contains(u)&&gr(u))o.preventDefault(),u.focus();else{const f=this.#l(),l=this.#u()[0];(f||l||t).focus()}}},i=o=>{if(!this.#i.loop||this.#t||o.key!=="Tab"||!this.#n.isActiveScope(this))return;const a=this.#f();if(a.length===0)return;const c=a[0],u=a[a.length-1];!o.shiftKey&&n.activeElement===u?(o.preventDefault(),c.focus()):o.shiftKey&&n.activeElement===c&&(o.preventDefault(),u.focus())};this.#r.push(I(n,"focusin",r,{capture:!0}),I(t,"keydown",i));const s=new MutationObserver(()=>{const o=this.#n.getFocusMemory(this);if(o&&!t.contains(o)){const a=this.#l(),c=this.#u()[0],u=a||c;u?(u.focus(),this.#n.setFocusMemory(this,u)):t.focus()}});s.observe(t,{childList:!0,subtree:!0}),this.#r.push(()=>s.disconnect())}#f(){return this.#e?dr(this.#e,{includeContainer:!1,getShadowRoot:!0}):[]}#l(){return this.#f()[0]||null}#u(){return this.#e?hr(this.#e,{includeContainer:!1,getShadowRoot:!0}):[]}static use(t){let n=null;return z([()=>t.ref.current,()=>t.enabled.current],([r,i])=>{r&&i?(n||(n=new qe(t)),n.mount(r)):n&&(n.unmount(),n=null)}),Ft(()=>{n?.unmount()}),{get props(){return{tabindex:-1}}}}}function ds(e,t){Y(t,!0);let n=y(t,"enabled",3,!1),r=y(t,"trapFocus",3,!1),i=y(t,"loop",3,!1),s=y(t,"onCloseAutoFocus",3,W),o=y(t,"onOpenAutoFocus",3,W);const a=qe.use({enabled:x(()=>n()),trap:x(()=>r()),loop:i(),onCloseAutoFocus:x(()=>s()),onOpenAutoFocus:x(()=>o()),ref:t.ref});var c=_(),u=N(c);$(u,()=>t.focusScope??Q,()=>({props:a.props})),R(e,c),G()}globalThis.bitsTextSelectionLayers??=new Map;class Ze{static create(t){return new Ze(t)}opts;domContext;#t=W;constructor(t){this.opts=t,this.domContext=new ze(t.ref);let n=W;z(()=>this.opts.enabled.current,r=>(r&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),n(),n=this.#e()),()=>{n(),this.#r(),globalThis.bitsTextSelectionLayers.delete(this)}))}#e(){return vt(I(this.domContext.getDocument(),"pointerdown",this.#n),I(this.domContext.getDocument(),"pointerup",Hn(this.#r,this.opts.onPointerUp.current)))}#n=t=>{const n=this.opts.ref.current,r=t.target;!ot(n)||!ot(r)||!this.opts.enabled.current||!gs(this)||!Ji(n,r)||(this.opts.onPointerDown.current(t),!t.defaultPrevented&&(this.#t=hs(n,this.domContext.getDocument().body)))};#r=()=>{this.#t(),this.#t=W}}const wn=e=>e.style.userSelect||e.style.webkitUserSelect;function hs(e,t){const n=wn(t),r=wn(e);return Gt(t,"none"),Gt(e,"text"),()=>{Gt(t,n),Gt(e,r)}}function Gt(e,t){e.style.userSelect=t,e.style.webkitUserSelect=t}function gs(e){const t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;const n=t.at(-1);return n?n[0]===e:!1}function ps(e,t){Y(t,!0);let n=y(t,"preventOverflowTextSelection",3,!0),r=y(t,"onPointerDown",3,W),i=y(t,"onPointerUp",3,W);Ze.create({id:x(()=>t.id),onPointerDown:x(()=>r()),onPointerUp:x(()=>i()),enabled:x(()=>t.enabled&&n()),ref:t.ref});var s=_(),o=N(s);$(o,()=>t.children??Q),R(e,s),G()}globalThis.bitsIdCounter??={current:0};function Je(e="bits"){return globalThis.bitsIdCounter.current++,`${e}-${globalThis.bitsIdCounter.current}`}class ms{#t;#e=0;#n=P();#r;constructor(t){this.#t=t}#i(){this.#e-=1,this.#r&&this.#e<=0&&(this.#r(),b(this.#n,void 0),this.#r=void 0)}get(...t){return this.#e+=1,d(this.#n)===void 0&&(this.#r=zn(()=>{b(this.#n,this.#t(...t),!0)})),B(()=>()=>{this.#i()}),d(this.#n)}}const Zt=new ai;let Xt=P(null),Oe=null,Nt=null,Lt=!1;const xn=x(()=>{for(const e of Zt.values())if(e)return!0;return!1});let Te=null;const bs=new ms(()=>{function e(){document.body.setAttribute("style",d(Xt)??""),document.body.style.removeProperty("--scrollbar-width"),pn&&Oe?.(),b(Xt,null)}function t(){Nt!==null&&(window.clearTimeout(Nt),Nt=null)}function n(i,s){t(),Lt=!0,Te=Date.now();const o=Te,a=()=>{Nt=null,Te===o&&(Cr(Zt)?Lt=!1:(Lt=!1,s()))},c=i===null?24:i;Nt=window.setTimeout(a,c)}function r(){d(Xt)===null&&Zt.size===0&&!Lt&&b(Xt,document.body.getAttribute("style"),!0)}return z(()=>xn.current,()=>{if(!xn.current)return;r(),Lt=!1;const i=getComputedStyle(document.documentElement),s=getComputedStyle(document.body),o=i.scrollbarGutter?.includes("stable")||s.scrollbarGutter?.includes("stable"),a=window.innerWidth-document.documentElement.clientWidth,u={padding:Number.parseInt(s.paddingRight??"0",10)+a,margin:Number.parseInt(s.marginRight??"0",10)};a>0&&!o&&(document.body.style.paddingRight=`${u.padding}px`,document.body.style.marginRight=`${u.margin}px`,document.body.style.setProperty("--scrollbar-width",`${a}px`)),document.body.style.overflow="hidden",pn&&(Oe=I(document,"touchmove",f=>{f.target===document.documentElement&&(f.touches.length>1||f.preventDefault())},{passive:!1})),nt(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})}),Ft(()=>()=>{Oe?.()}),{get lockMap(){return Zt},resetBodyStyle:e,scheduleCleanupIfNoNewLocks:n,cancelPendingCleanup:t,ensureInitialStyleCaptured:r}});class vs{#t=Je();#e;#n=()=>null;#r;locked;constructor(t,n=()=>null){this.#e=t,this.#n=n,this.#r=bs.get(),this.#r&&(this.#r.cancelPendingCleanup(),this.#r.ensureInitialStyleCaptured(),this.#r.lockMap.set(this.#t,this.#e??!1),this.locked=x(()=>this.#r.lockMap.get(this.#t)??!1,r=>this.#r.lockMap.set(this.#t,r)),Ft(()=>{if(this.#r.lockMap.delete(this.#t),Cr(this.#r.lockMap))return;const r=this.#n();this.#r.scheduleCleanupIfNoNewLocks(r,()=>{this.#r.resetBodyStyle()})}))}}function Cr(e){for(const[t,n]of e)if(n)return!0;return!1}function Sn(e,t){Y(t,!0);let n=y(t,"preventScroll",3,!0),r=y(t,"restoreScrollDelay",3,null);n()&&new vs(n(),()=>r()),G()}const ys=["top","right","bottom","left"],gt=Math.min,U=Math.max,ue=Math.round,qt=Math.floor,it=e=>({x:e,y:e}),ws={left:"right",right:"left",bottom:"top",top:"bottom"},xs={start:"end",end:"start"};function De(e,t,n){return U(e,gt(t,n))}function ct(e,t){return typeof e=="function"?e(t):e}function ut(e){return e.split("-")[0]}function Rt(e){return e.split("-")[1]}function Qe(e){return e==="x"?"y":"x"}function $e(e){return e==="y"?"height":"width"}const Ss=new Set(["top","bottom"]);function rt(e){return Ss.has(ut(e))?"y":"x"}function tn(e){return Qe(rt(e))}function As(e,t,n){n===void 0&&(n=!1);const r=Rt(e),i=tn(e),s=$e(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=le(o)),[o,le(o)]}function Es(e){const t=le(e);return[Ne(e),t,Ne(t)]}function Ne(e){return e.replace(/start|end/g,t=>xs[t])}const An=["left","right"],En=["right","left"],Os=["top","bottom"],Ts=["bottom","top"];function Cs(e,t,n){switch(e){case"top":case"bottom":return n?t?En:An:t?An:En;case"left":case"right":return t?Os:Ts;default:return[]}}function Ps(e,t,n,r){const i=Rt(e);let s=Cs(ut(e),n==="start",r);return i&&(s=s.map(o=>o+"-"+i),t&&(s=s.concat(s.map(Ne)))),s}function le(e){return e.replace(/left|right|bottom|top/g,t=>ws[t])}function Ms(e){return{top:0,right:0,bottom:0,left:0,...e}}function Pr(e){return typeof e!="number"?Ms(e):{top:e,right:e,bottom:e,left:e}}function fe(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function On(e,t,n){let{reference:r,floating:i}=e;const s=rt(t),o=tn(t),a=$e(o),c=ut(t),u=s==="y",f=r.x+r.width/2-i.width/2,l=r.y+r.height/2-i.height/2,g=r[a]/2-i[a]/2;let h;switch(c){case"top":h={x:f,y:r.y-i.height};break;case"bottom":h={x:f,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:l};break;case"left":h={x:r.x-i.width,y:l};break;default:h={x:r.x,y:r.y}}switch(Rt(t)){case"start":h[o]-=g*(n&&u?-1:1);break;case"end":h[o]+=g*(n&&u?-1:1);break}return h}async function Fs(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:s,rects:o,elements:a,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:l="floating",altBoundary:g=!1,padding:h=0}=ct(t,e),m=Pr(h),v=a[g?l==="floating"?"reference":"floating":l],w=fe(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(a.floating)),boundary:u,rootBoundary:f,strategy:c})),O=l==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),S=await(s.isElement==null?void 0:s.isElement(E))?await(s.getScale==null?void 0:s.getScale(E))||{x:1,y:1}:{x:1,y:1},T=fe(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:O,offsetParent:E,strategy:c}):O);return{top:(w.top-T.top+m.top)/S.y,bottom:(T.bottom-w.bottom+m.bottom)/S.y,left:(w.left-T.left+m.left)/S.x,right:(T.right-w.right+m.right)/S.x}}const Rs=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=n,a=s.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:l}=On(u,r,c),g=r,h={},m=0;for(let v=0;v<a.length;v++){var p;const{name:w,fn:O}=a[v],{x:E,y:S,data:T,reset:C}=await O({x:f,y:l,initialPlacement:r,placement:g,strategy:i,middlewareData:h,rects:u,platform:{...o,detectOverflow:(p=o.detectOverflow)!=null?p:Fs},elements:{reference:e,floating:t}});f=E??f,l=S??l,h={...h,[w]:{...h[w],...T}},C&&m<=50&&(m++,typeof C=="object"&&(C.placement&&(g=C.placement),C.rects&&(u=C.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):C.rects),{x:f,y:l}=On(u,g,c)),v=-1)}return{x:f,y:l,placement:g,strategy:i,middlewareData:h}},Is=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:s,platform:o,elements:a,middlewareData:c}=t,{element:u,padding:f=0}=ct(e,t)||{};if(u==null)return{};const l=Pr(f),g={x:n,y:r},h=tn(i),m=$e(h),p=await o.getDimensions(u),v=h==="y",w=v?"top":"left",O=v?"bottom":"right",E=v?"clientHeight":"clientWidth",S=s.reference[m]+s.reference[h]-g[h]-s.floating[m],T=g[h]-s.reference[h],C=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let M=C?C[E]:0;(!M||!await(o.isElement==null?void 0:o.isElement(C)))&&(M=a.floating[E]||s.floating[m]);const V=S/2-T/2,F=M/2-p[m]/2-1,k=gt(l[w],F),q=gt(l[O],F),L=k,tt=M-p[m]-q,D=M/2-p[m]/2+V,lt=De(L,D,tt),X=!c.arrow&&Rt(i)!=null&&D!==lt&&s.reference[m]/2-(D<L?k:q)-p[m]/2<0,K=X?D<L?D-L:D-tt:0;return{[h]:g[h]+K,data:{[h]:lt,centerOffset:D-lt-K,...X&&{alignmentOffset:K}},reset:X}}}),ks=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:s,rects:o,initialPlacement:a,platform:c,elements:u}=t,{mainAxis:f=!0,crossAxis:l=!0,fallbackPlacements:g,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:p=!0,...v}=ct(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const w=ut(i),O=rt(a),E=ut(a)===a,S=await(c.isRTL==null?void 0:c.isRTL(u.floating)),T=g||(E||!p?[le(a)]:Es(a)),C=m!=="none";!g&&C&&T.push(...Ps(a,p,m,S));const M=[a,...T],V=await c.detectOverflow(t,v),F=[];let k=((r=s.flip)==null?void 0:r.overflows)||[];if(f&&F.push(V[w]),l){const D=As(i,o,S);F.push(V[D[0]],V[D[1]])}if(k=[...k,{placement:i,overflows:F}],!F.every(D=>D<=0)){var q,L;const D=(((q=s.flip)==null?void 0:q.index)||0)+1,lt=M[D];if(lt&&(!(l==="alignment"?O!==rt(lt):!1)||k.every(H=>rt(H.placement)===O?H.overflows[0]>0:!0)))return{data:{index:D,overflows:k},reset:{placement:lt}};let X=(L=k.filter(K=>K.overflows[0]<=0).sort((K,H)=>K.overflows[1]-H.overflows[1])[0])==null?void 0:L.placement;if(!X)switch(h){case"bestFit":{var tt;const K=(tt=k.filter(H=>{if(C){const ft=rt(H.placement);return ft===O||ft==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(ft=>ft>0).reduce((ft,zr)=>ft+zr,0)]).sort((H,ft)=>H[1]-ft[1])[0])==null?void 0:tt[0];K&&(X=K);break}case"initialPlacement":X=a;break}if(i!==X)return{reset:{placement:X}}}return{}}}};function Tn(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Cn(e){return ys.some(t=>e[t]>=0)}const Ds=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:i="referenceHidden",...s}=ct(e,t);switch(i){case"referenceHidden":{const o=await r.detectOverflow(t,{...s,elementContext:"reference"}),a=Tn(o,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Cn(a)}}}case"escaped":{const o=await r.detectOverflow(t,{...s,altBoundary:!0}),a=Tn(o,n.floating);return{data:{escapedOffsets:a,escaped:Cn(a)}}}default:return{}}}}},Mr=new Set(["left","top"]);async function Ns(e,t){const{placement:n,platform:r,elements:i}=e,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=ut(n),a=Rt(n),c=rt(n)==="y",u=Mr.has(o)?-1:1,f=s&&c?-1:1,l=ct(t,e);let{mainAxis:g,crossAxis:h,alignmentAxis:m}=typeof l=="number"?{mainAxis:l,crossAxis:0,alignmentAxis:null}:{mainAxis:l.mainAxis||0,crossAxis:l.crossAxis||0,alignmentAxis:l.alignmentAxis};return a&&typeof m=="number"&&(h=a==="end"?m*-1:m),c?{x:h*f,y:g*u}:{x:g*u,y:h*f}}const Ls=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:s,placement:o,middlewareData:a}=t,c=await Ns(t,e);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:s+c.y,data:{...c,placement:o}}}}},Bs=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i,platform:s}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:c={fn:w=>{let{x:O,y:E}=w;return{x:O,y:E}}},...u}=ct(e,t),f={x:n,y:r},l=await s.detectOverflow(t,u),g=rt(ut(i)),h=Qe(g);let m=f[h],p=f[g];if(o){const w=h==="y"?"top":"left",O=h==="y"?"bottom":"right",E=m+l[w],S=m-l[O];m=De(E,m,S)}if(a){const w=g==="y"?"top":"left",O=g==="y"?"bottom":"right",E=p+l[w],S=p-l[O];p=De(E,p,S)}const v=c.fn({...t,[h]:m,[g]:p});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[h]:o,[g]:a}}}}}},_s=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:s,middlewareData:o}=t,{offset:a=0,mainAxis:c=!0,crossAxis:u=!0}=ct(e,t),f={x:n,y:r},l=rt(i),g=Qe(l);let h=f[g],m=f[l];const p=ct(a,t),v=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(c){const E=g==="y"?"height":"width",S=s.reference[g]-s.floating[E]+v.mainAxis,T=s.reference[g]+s.reference[E]-v.mainAxis;h<S?h=S:h>T&&(h=T)}if(u){var w,O;const E=g==="y"?"width":"height",S=Mr.has(ut(i)),T=s.reference[l]-s.floating[E]+(S&&((w=o.offset)==null?void 0:w[l])||0)+(S?0:v.crossAxis),C=s.reference[l]+s.reference[E]+(S?0:((O=o.offset)==null?void 0:O[l])||0)-(S?v.crossAxis:0);m<T?m=T:m>C&&(m=C)}return{[g]:h,[l]:m}}}},Ws=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:s,platform:o,elements:a}=t,{apply:c=()=>{},...u}=ct(e,t),f=await o.detectOverflow(t,u),l=ut(i),g=Rt(i),h=rt(i)==="y",{width:m,height:p}=s.floating;let v,w;l==="top"||l==="bottom"?(v=l,w=g===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(w=l,v=g==="end"?"top":"bottom");const O=p-f.top-f.bottom,E=m-f.left-f.right,S=gt(p-f[v],O),T=gt(m-f[w],E),C=!t.middlewareData.shift;let M=S,V=T;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(V=E),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(M=O),C&&!g){const k=U(f.left,0),q=U(f.right,0),L=U(f.top,0),tt=U(f.bottom,0);h?V=m-2*(k!==0||q!==0?k+q:U(f.left,f.right)):M=p-2*(L!==0||tt!==0?L+tt:U(f.top,f.bottom))}await c({...t,availableWidth:V,availableHeight:M});const F=await o.getDimensions(a.floating);return m!==F.width||p!==F.height?{reset:{rects:!0}}:{}}}};function we(){return typeof window<"u"}function It(e){return Fr(e)?(e.nodeName||"").toLowerCase():"#document"}function j(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function at(e){var t;return(t=(Fr(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Fr(e){return we()?e instanceof Node||e instanceof j(e).Node:!1}function Z(e){return we()?e instanceof Element||e instanceof j(e).Element:!1}function st(e){return we()?e instanceof HTMLElement||e instanceof j(e).HTMLElement:!1}function Pn(e){return!we()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof j(e).ShadowRoot}const zs=new Set(["inline","contents"]);function Yt(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=J(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!zs.has(i)}const Vs=new Set(["table","td","th"]);function Ks(e){return Vs.has(It(e))}const Hs=[":popover-open",":modal"];function xe(e){return Hs.some(t=>{try{return e.matches(t)}catch{return!1}})}const Us=["transform","translate","scale","rotate","perspective"],js=["transform","translate","scale","rotate","perspective","filter"],Ys=["paint","layout","strict","content"];function en(e){const t=nn(),n=Z(e)?J(e):e;return Us.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||js.some(r=>(n.willChange||"").includes(r))||Ys.some(r=>(n.contain||"").includes(r))}function Gs(e){let t=pt(e);for(;st(t)&&!Pt(t);){if(en(t))return t;if(xe(t))return null;t=pt(t)}return null}function nn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Xs=new Set(["html","body","#document"]);function Pt(e){return Xs.has(It(e))}function J(e){return j(e).getComputedStyle(e)}function Se(e){return Z(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function pt(e){if(It(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Pn(e)&&e.host||at(e);return Pn(t)?t.host:t}function Rr(e){const t=pt(e);return Pt(t)?e.ownerDocument?e.ownerDocument.body:e.body:st(t)&&Yt(t)?t:Rr(t)}function zt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Rr(e),s=i===((r=e.ownerDocument)==null?void 0:r.body),o=j(i);if(s){const a=Le(o);return t.concat(o,o.visualViewport||[],Yt(i)?i:[],a&&n?zt(a):[])}return t.concat(i,zt(i,[],n))}function Le(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ir(e){const t=J(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=st(e),s=i?e.offsetWidth:n,o=i?e.offsetHeight:r,a=ue(n)!==s||ue(r)!==o;return a&&(n=s,r=o),{width:n,height:r,$:a}}function rn(e){return Z(e)?e:e.contextElement}function Ot(e){const t=rn(e);if(!st(t))return it(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:s}=Ir(t);let o=(s?ue(n.width):n.width)/r,a=(s?ue(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const qs=it(0);function kr(e){const t=j(e);return!nn()||!t.visualViewport?qs:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Zs(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==j(e)?!1:t}function wt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=rn(e);let o=it(1);t&&(r?Z(r)&&(o=Ot(r)):o=Ot(e));const a=Zs(s,n,r)?kr(s):it(0);let c=(i.left+a.x)/o.x,u=(i.top+a.y)/o.y,f=i.width/o.x,l=i.height/o.y;if(s){const g=j(s),h=r&&Z(r)?j(r):r;let m=g,p=Le(m);for(;p&&r&&h!==m;){const v=Ot(p),w=p.getBoundingClientRect(),O=J(p),E=w.left+(p.clientLeft+parseFloat(O.paddingLeft))*v.x,S=w.top+(p.clientTop+parseFloat(O.paddingTop))*v.y;c*=v.x,u*=v.y,f*=v.x,l*=v.y,c+=E,u+=S,m=j(p),p=Le(m)}}return fe({width:f,height:l,x:c,y:u})}function Ae(e,t){const n=Se(e).scrollLeft;return t?t.left+n:wt(at(e)).left+n}function Dr(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Ae(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function Js(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const s=i==="fixed",o=at(r),a=t?xe(t.floating):!1;if(r===o||a&&s)return n;let c={scrollLeft:0,scrollTop:0},u=it(1);const f=it(0),l=st(r);if((l||!l&&!s)&&((It(r)!=="body"||Yt(o))&&(c=Se(r)),st(r))){const h=wt(r);u=Ot(r),f.x=h.x+r.clientLeft,f.y=h.y+r.clientTop}const g=o&&!l&&!s?Dr(o,c):it(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+f.x+g.x,y:n.y*u.y-c.scrollTop*u.y+f.y+g.y}}function Qs(e){return Array.from(e.getClientRects())}function $s(e){const t=at(e),n=Se(e),r=e.ownerDocument.body,i=U(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=U(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+Ae(e);const a=-n.scrollTop;return J(r).direction==="rtl"&&(o+=U(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:a}}const Mn=25;function ta(e,t){const n=j(e),r=at(e),i=n.visualViewport;let s=r.clientWidth,o=r.clientHeight,a=0,c=0;if(i){s=i.width,o=i.height;const f=nn();(!f||f&&t==="fixed")&&(a=i.offsetLeft,c=i.offsetTop)}const u=Ae(r);if(u<=0){const f=r.ownerDocument,l=f.body,g=getComputedStyle(l),h=f.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,m=Math.abs(r.clientWidth-l.clientWidth-h);m<=Mn&&(s-=m)}else u<=Mn&&(s+=u);return{width:s,height:o,x:a,y:c}}const ea=new Set(["absolute","fixed"]);function na(e,t){const n=wt(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,s=st(e)?Ot(e):it(1),o=e.clientWidth*s.x,a=e.clientHeight*s.y,c=i*s.x,u=r*s.y;return{width:o,height:a,x:c,y:u}}function Fn(e,t,n){let r;if(t==="viewport")r=ta(e,n);else if(t==="document")r=$s(at(e));else if(Z(t))r=na(t,n);else{const i=kr(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return fe(r)}function Nr(e,t){const n=pt(e);return n===t||!Z(n)||Pt(n)?!1:J(n).position==="fixed"||Nr(n,t)}function ra(e,t){const n=t.get(e);if(n)return n;let r=zt(e,[],!1).filter(a=>Z(a)&&It(a)!=="body"),i=null;const s=J(e).position==="fixed";let o=s?pt(e):e;for(;Z(o)&&!Pt(o);){const a=J(o),c=en(o);!c&&a.position==="fixed"&&(i=null),(s?!c&&!i:!c&&a.position==="static"&&!!i&&ea.has(i.position)||Yt(o)&&!c&&Nr(e,o))?r=r.filter(f=>f!==o):i=a,o=pt(o)}return t.set(e,r),r}function ia(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?xe(t)?[]:ra(t,this._c):[].concat(n),r],a=o[0],c=o.reduce((u,f)=>{const l=Fn(t,f,i);return u.top=U(l.top,u.top),u.right=gt(l.right,u.right),u.bottom=gt(l.bottom,u.bottom),u.left=U(l.left,u.left),u},Fn(t,a,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function oa(e){const{width:t,height:n}=Ir(e);return{width:t,height:n}}function sa(e,t,n){const r=st(t),i=at(t),s=n==="fixed",o=wt(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const c=it(0);function u(){c.x=Ae(i)}if(r||!r&&!s)if((It(t)!=="body"||Yt(i))&&(a=Se(t)),r){const h=wt(t,!0,s,t);c.x=h.x+t.clientLeft,c.y=h.y+t.clientTop}else i&&u();s&&!r&&i&&u();const f=i&&!r&&!s?Dr(i,a):it(0),l=o.left+a.scrollLeft-c.x-f.x,g=o.top+a.scrollTop-c.y-f.y;return{x:l,y:g,width:o.width,height:o.height}}function Ce(e){return J(e).position==="static"}function Rn(e,t){if(!st(e)||J(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return at(e)===n&&(n=n.ownerDocument.body),n}function Lr(e,t){const n=j(e);if(xe(e))return n;if(!st(e)){let i=pt(e);for(;i&&!Pt(i);){if(Z(i)&&!Ce(i))return i;i=pt(i)}return n}let r=Rn(e,t);for(;r&&Ks(r)&&Ce(r);)r=Rn(r,t);return r&&Pt(r)&&Ce(r)&&!en(r)?n:r||Gs(e)||n}const aa=async function(e){const t=this.getOffsetParent||Lr,n=this.getDimensions,r=await n(e.floating);return{reference:sa(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ca(e){return J(e).direction==="rtl"}const ua={convertOffsetParentRelativeRectToViewportRelativeRect:Js,getDocumentElement:at,getClippingRect:ia,getOffsetParent:Lr,getElementRects:aa,getClientRects:Qs,getDimensions:oa,getScale:Ot,isElement:Z,isRTL:ca};function Br(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function la(e,t){let n=null,r;const i=at(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const u=e.getBoundingClientRect(),{left:f,top:l,width:g,height:h}=u;if(a||t(),!g||!h)return;const m=qt(l),p=qt(i.clientWidth-(f+g)),v=qt(i.clientHeight-(l+h)),w=qt(f),E={rootMargin:-m+"px "+-p+"px "+-v+"px "+-w+"px",threshold:U(0,gt(1,c))||1};let S=!0;function T(C){const M=C[0].intersectionRatio;if(M!==c){if(!S)return o();M?o(!1,M):r=setTimeout(()=>{o(!1,1e-7)},1e3)}M===1&&!Br(u,e.getBoundingClientRect())&&o(),S=!1}try{n=new IntersectionObserver(T,{...E,root:i.ownerDocument})}catch{n=new IntersectionObserver(T,E)}n.observe(e)}return o(!0),s}function fa(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=rn(e),f=i||s?[...u?zt(u):[],...zt(t)]:[];f.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),s&&w.addEventListener("resize",n)});const l=u&&a?la(u,n):null;let g=-1,h=null;o&&(h=new ResizeObserver(w=>{let[O]=w;O&&O.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var E;(E=h)==null||E.observe(t)})),n()}),u&&!c&&h.observe(u),h.observe(t));let m,p=c?wt(e):null;c&&v();function v(){const w=wt(e);p&&!Br(p,w)&&n(),p=w,m=requestAnimationFrame(v)}return n(),()=>{var w;f.forEach(O=>{i&&O.removeEventListener("scroll",n),s&&O.removeEventListener("resize",n)}),l?.(),(w=h)==null||w.disconnect(),h=null,c&&cancelAnimationFrame(m)}}const da=Ls,ha=Bs,ga=ks,pa=Ws,ma=Ds,ba=Is,va=_s,ya=(e,t,n)=>{const r=new Map,i={platform:ua,...n},s={...i.platform,_c:r};return Rs(e,t,{...i,platform:s})};function mt(e){return typeof e=="function"?e():e}function _r(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function In(e,t){const n=_r(e);return Math.round(t*n)/n}function Ja(e){return{[`--bits-${e}-content-transform-origin`]:"var(--bits-floating-transform-origin)",[`--bits-${e}-content-available-width`]:"var(--bits-floating-available-width)",[`--bits-${e}-content-available-height`]:"var(--bits-floating-available-height)",[`--bits-${e}-anchor-width`]:"var(--bits-floating-anchor-width)",[`--bits-${e}-anchor-height`]:"var(--bits-floating-anchor-height)"}}function wa(e){const t=e.whileElementsMounted,n=A(()=>mt(e.open)??!0),r=A(()=>mt(e.middleware)),i=A(()=>mt(e.transform)??!0),s=A(()=>mt(e.placement)??"bottom"),o=A(()=>mt(e.strategy)??"absolute"),a=A(()=>mt(e.sideOffset)??0),c=A(()=>mt(e.alignOffset)??0),u=e.reference;let f=P(0),l=P(0);const g=et(null);let h=P(Et(d(o))),m=P(Et(d(s))),p=P(Et({})),v=P(!1),w=!1;const O=A(()=>{const F=g.current?In(g.current,d(f)):d(f),k=g.current?In(g.current,d(l)):d(l);return d(i)?{position:d(h),left:"0",top:"0",transform:`translate(${F}px, ${k}px)`,...g.current&&_r(g.current)>=1.5&&{willChange:"transform"}}:{position:d(h),left:`${F}px`,top:`${k}px`}});let E;function S(){u.current===null||g.current===null||ya(u.current,g.current,{middleware:d(r),placement:d(s),strategy:d(o)}).then(F=>{const k=u.current;if(xa(k)){b(p,{...d(p),hide:{...d(p).hide,referenceHidden:!0}},!0);return}if(!d(n)&&d(f)!==0&&d(l)!==0){const L=Math.max(Math.abs(d(a)),Math.abs(d(c)),15);if(F.x<=L&&F.y<=L)return}b(f,F.x,!0),b(l,F.y,!0),b(h,F.strategy,!0),b(m,F.placement,!0),b(p,F.middlewareData,!0),b(v,!0)})}function T(){typeof E=="function"&&(E(),E=void 0)}function C(){if(T(),t===void 0){S();return}d(n)&&(u.current===null||g.current===null||(E=t(u.current,g.current,S)))}function M(){d(n)||b(v,!1)}function V(){return[d(r),d(s),d(o),d(a),d(c),d(n)]}return B(()=>{t===void 0&&d(n)&&S()}),B(C),B(()=>{if(t!==void 0){if(V(),!d(n)){w=!1;return}if(!d(v)){w=!1;return}if(!w){w=!0;return}S()}}),B(M),B(()=>T),{floating:g,reference:u,get strategy(){return d(h)},get placement(){return d(m)},get middlewareData(){return d(p)},get isPositioned(){return d(v)},get floatingStyles(){return d(O)},get update(){return S}}}function xa(e){return e instanceof Element?!e.isConnected||e instanceof HTMLElement&&e.hidden?!0:e.getClientRects().length===0:!1}const Sa={top:"bottom",right:"left",bottom:"top",left:"right"},on=new St("Floating.Root"),kn=new St("Floating.Content"),sn=new St("Floating.Root");class de{static create(t=!1){return t?sn.set(new de):on.set(new de)}anchorNode=et(null);customAnchorNode=et(null);triggerNode=et(null);constructor(){B(()=>{this.customAnchorNode.current?typeof this.customAnchorNode.current=="string"?this.anchorNode.current=document.querySelector(this.customAnchorNode.current):this.anchorNode.current=this.customAnchorNode.current:this.anchorNode.current=this.triggerNode.current})}}class he{static create(t,n=!1){return n?kn.set(new he(t,sn.get())):kn.set(new he(t,on.get()))}opts;root;contentRef=et(null);wrapperRef=et(null);arrowRef=et(null);contentAttachment=ht(this.contentRef);wrapperAttachment=ht(this.wrapperRef);arrowAttachment=ht(this.arrowRef);arrowId=et(Je());#t=A(()=>{if(typeof this.opts.style=="string")return Bt(this.opts.style);if(!this.opts.style)return{}});#e=void 0;#n=new Ui(()=>this.arrowRef.current??void 0);#r=A(()=>this.#n?.width??0);#i=A(()=>this.#n?.height??0);#o=A(()=>this.opts.side?.current+(this.opts.align.current!=="center"?`-${this.opts.align.current}`:""));#a=A(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current]);#s=A(()=>d(this.#a).length>0);get hasExplicitBoundaries(){return d(this.#s)}set hasExplicitBoundaries(t){b(this.#s,t)}#c=A(()=>({padding:this.opts.collisionPadding.current,boundary:d(this.#a).filter(lo),altBoundary:this.hasExplicitBoundaries}));get detectOverflowOptions(){return d(this.#c)}set detectOverflowOptions(t){b(this.#c,t)}#f=P(void 0);#l=P(void 0);#u=P(void 0);#h=P(void 0);#g=A(()=>[da({mainAxis:this.opts.sideOffset.current+d(this.#i),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&ha({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current==="partial"?va():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&ga({...this.detectOverflowOptions}),pa({...this.detectOverflowOptions,apply:({rects:t,availableWidth:n,availableHeight:r})=>{const{width:i,height:s}=t.reference;b(this.#f,n,!0),b(this.#l,r,!0),b(this.#u,i,!0),b(this.#h,s,!0)}}),this.arrowRef.current&&ba({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),Aa({arrowWidth:d(this.#r),arrowHeight:d(this.#i)}),this.opts.hideWhenDetached.current&&ma({strategy:"referenceHidden",...this.detectOverflowOptions})].filter(Boolean));get middleware(){return d(this.#g)}set middleware(t){b(this.#g,t)}floating;#p=A(()=>Ea(this.floating.placement));get placedSide(){return d(this.#p)}set placedSide(t){b(this.#p,t)}#m=A(()=>Oa(this.floating.placement));get placedAlign(){return d(this.#m)}set placedAlign(t){b(this.#m,t)}#d=A(()=>this.floating.middlewareData.arrow?.x??0);get arrowX(){return d(this.#d)}set arrowX(t){b(this.#d,t)}#b=A(()=>this.floating.middlewareData.arrow?.y??0);get arrowY(){return d(this.#b)}set arrowY(t){b(this.#b,t)}#v=A(()=>this.floating.middlewareData.arrow?.centerOffset!==0);get cannotCenterArrow(){return d(this.#v)}set cannotCenterArrow(t){b(this.#v,t)}#y=P();get contentZIndex(){return d(this.#y)}set contentZIndex(t){b(this.#y,t,!0)}#w=A(()=>Sa[this.placedSide]);get arrowBaseSide(){return d(this.#w)}set arrowBaseSide(t){b(this.#w,t)}#x=A(()=>({id:this.opts.wrapperId.current,"data-bits-floating-content-wrapper":"",style:{...this.floating.floatingStyles,transform:this.floating.isPositioned?this.floating.floatingStyles.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:this.contentZIndex,"--bits-floating-transform-origin":`${this.floating.middlewareData.transformOrigin?.x} ${this.floating.middlewareData.transformOrigin?.y}`,"--bits-floating-available-width":`${d(this.#f)}px`,"--bits-floating-available-height":`${d(this.#l)}px`,"--bits-floating-anchor-width":`${d(this.#u)}px`,"--bits-floating-anchor-height":`${d(this.#h)}px`,...this.floating.middlewareData.hide?.referenceHidden&&{visibility:"hidden","pointer-events":"none"},...d(this.#t)},dir:this.opts.dir.current,...this.wrapperAttachment}));get wrapperProps(){return d(this.#x)}set wrapperProps(t){b(this.#x,t)}#S=A(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:jn({...d(this.#t)}),...this.contentAttachment}));get props(){return d(this.#S)}set props(t){b(this.#S,t)}#A=A(()=>({position:"absolute",left:this.arrowX?`${this.arrowX}px`:void 0,top:this.arrowY?`${this.arrowY}px`:void 0,[this.arrowBaseSide]:0,"transform-origin":{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[this.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[this.placedSide],visibility:this.cannotCenterArrow?"hidden":void 0}));get arrowStyle(){return d(this.#A)}set arrowStyle(t){b(this.#A,t)}constructor(t,n){this.opts=t,this.root=n,this.#e=t.updatePositionStrategy,t.customAnchor&&(this.root.customAnchorNode.current=t.customAnchor.current),z(()=>t.customAnchor.current,r=>{this.root.customAnchorNode.current=r}),this.floating=wa({strategy:()=>this.opts.strategy.current,placement:()=>d(this.#o),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...r)=>fa(...r,{animationFrame:this.#e?.current==="always"}),open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),B(()=>{this.floating.isPositioned&&this.opts.onPlaced?.current()}),z(()=>this.contentRef.current,r=>{if(!r||!this.opts.enabled.current)return;const i=We(r),s=i.requestAnimationFrame(()=>{if(this.contentRef.current!==r||!this.opts.enabled.current)return;const o=i.getComputedStyle(r).zIndex;o!==this.contentZIndex&&(this.contentZIndex=o)});return()=>{i.cancelAnimationFrame(s)}}),B(()=>{this.floating.floating.current=this.wrapperRef.current})}}class ge{static create(t,n=!1){return n?new ge(t,sn.get()):new ge(t,on.get())}opts;root;constructor(t,n){this.opts=t,this.root=n,t.virtualEl&&t.virtualEl.current?n.triggerNode=Kn(t.virtualEl.current):n.triggerNode=t.ref}}function Aa(e){return{name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:i}=t,o=i.arrow?.centerOffset!==0,a=o?0:e.arrowWidth,c=o?0:e.arrowHeight,[u,f]=an(n),l={start:"0%",center:"50%",end:"100%"}[f],g=(i.arrow?.x??0)+a/2,h=(i.arrow?.y??0)+c/2;let m="",p="";return u==="bottom"?(m=o?l:`${g}px`,p=`${-c}px`):u==="top"?(m=o?l:`${g}px`,p=`${r.floating.height+c}px`):u==="right"?(m=`${-c}px`,p=o?l:`${h}px`):u==="left"&&(m=`${r.floating.width+c}px`,p=o?l:`${h}px`),{data:{x:m,y:p}}}}}function an(e){const[t,n="center"]=e.split("-");return[t,n]}function Ea(e){return an(e)[0]}function Oa(e){return an(e)[1]}function Qa(e,t){Y(t,!0);let n=y(t,"tooltip",3,!1);de.create(n());var r=_(),i=N(r);$(i,()=>t.children??Q),R(e,r),G()}function $a(e,t){Y(t,!0);let n=y(t,"tooltip",3,!1);ge.create({id:x(()=>t.id),virtualEl:x(()=>t.virtualEl),ref:t.ref},n());var r=_(),i=N(r);$(i,()=>t.children??Q),R(e,r),G()}function Ta(e,t){Y(t,!0);let n=y(t,"side",3,"bottom"),r=y(t,"sideOffset",3,0),i=y(t,"align",3,"center"),s=y(t,"alignOffset",3,0),o=y(t,"arrowPadding",3,0),a=y(t,"avoidCollisions",3,!0),c=y(t,"collisionBoundary",19,()=>[]),u=y(t,"collisionPadding",3,0),f=y(t,"hideWhenDetached",3,!1),l=y(t,"onPlaced",3,()=>{}),g=y(t,"sticky",3,"partial"),h=y(t,"updatePositionStrategy",3,"optimized"),m=y(t,"strategy",3,"fixed"),p=y(t,"dir",3,"ltr"),v=y(t,"style",19,()=>({})),w=y(t,"wrapperId",19,Je),O=y(t,"customAnchor",3,null),E=y(t,"tooltip",3,!1);const S=he.create({side:x(()=>n()),sideOffset:x(()=>r()),align:x(()=>i()),alignOffset:x(()=>s()),id:x(()=>t.id),arrowPadding:x(()=>o()),avoidCollisions:x(()=>a()),collisionBoundary:x(()=>c()),collisionPadding:x(()=>u()),hideWhenDetached:x(()=>f()),onPlaced:x(()=>l()),sticky:x(()=>g()),updatePositionStrategy:x(()=>h()),strategy:x(()=>m()),dir:x(()=>p()),style:x(()=>v()),enabled:x(()=>t.enabled),wrapperId:x(()=>w()),customAnchor:x(()=>O())},E()),T=A(()=>ve(S.wrapperProps,{style:{pointerEvents:"auto"}}));var C=_(),M=N(C);$(M,()=>t.content??Q,()=>({props:S.props,wrapperProps:d(T)})),R(e,C),G()}function Ca(e,t){Y(t,!0),ei(()=>{t.onPlaced?.()});var n=_(),r=N(n);$(r,()=>t.content??Q,()=>({props:{},wrapperProps:{}})),R(e,n),G()}function Pa(e,t){let n=y(t,"isStatic",3,!1),r=me(t,["$$slots","$$events","$$legacy","content","isStatic","onPlaced"]);var i=_(),s=N(i);{var o=c=>{Ca(c,{get content(){return t.content},get onPlaced(){return t.onPlaced}})},a=c=>{Ta(c,Be({get content(){return t.content},get onPlaced(){return t.onPlaced}},()=>r))};Mt(s,c=>{n()?c(o):c(a,!1)})}R(e,i)}var Ma=Hr("<!> <!>",1);function Wr(e,t){Y(t,!0);let n=y(t,"interactOutsideBehavior",3,"close"),r=y(t,"trapFocus",3,!0),i=y(t,"isValidEvent",3,()=>!1),s=y(t,"customAnchor",3,null),o=y(t,"isStatic",3,!1),a=y(t,"tooltip",3,!1),c=y(t,"contentPointerEvents",3,"auto"),u=me(t,["$$slots","$$events","$$legacy","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled","ref","tooltip","contentPointerEvents"]);Pa(e,{get isStatic(){return o()},get id(){return t.id},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return s()},get enabled(){return t.enabled},get tooltip(){return a()},content:(l,g)=>{let h=()=>g?.().props,m=()=>g?.().wrapperProps;var p=Ma(),v=N(p);{var w=S=>{Sn(S,{get preventScroll(){return t.preventScroll}})},O=S=>{Sn(S,{get preventScroll(){return t.preventScroll}})};Mt(v,S=>{t.forceMount&&t.enabled?S(w):t.forceMount||S(O,1)})}var E=ni(v,2);ds(E,{get onOpenAutoFocus(){return t.onOpenAutoFocus},get onCloseAutoFocus(){return t.onCloseAutoFocus},get loop(){return t.loop},get enabled(){return t.enabled},get trapFocus(){return r()},get forceMount(){return t.forceMount},get ref(){return t.ref},focusScope:(T,C)=>{let M=()=>C?.().props;fs(T,{get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get enabled(){return t.enabled},get ref(){return t.ref},children:(V,F)=>{us(V,{get id(){return t.id},get onInteractOutside(){return t.onInteractOutside},get onFocusOutside(){return t.onFocusOutside},get interactOutsideBehavior(){return n()},get isValidEvent(){return i()},get enabled(){return t.enabled},get ref(){return t.ref},children:(q,L)=>{let tt=()=>L?.().props;ps(q,{get id(){return t.id},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get enabled(){return t.enabled},get ref(){return t.ref},children:(D,lt)=>{var X=_(),K=N(X);{let H=A(()=>({props:ve(u,h(),tt(),M(),{style:{pointerEvents:c()}}),wrapperProps:m()}));$(K,()=>t.popper??Q,()=>d(H))}R(D,X)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),R(l,p)},$$slots:{content:!0}}),G()}function tc(e,t){let n=y(t,"interactOutsideBehavior",3,"close"),r=y(t,"trapFocus",3,!0),i=y(t,"isValidEvent",3,()=>!1),s=y(t,"customAnchor",3,null),o=y(t,"isStatic",3,!1),a=me(t,["$$slots","$$events","$$legacy","popper","open","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","ref","shouldRender"]);var c=_(),u=N(c);{var f=l=>{Wr(l,Be({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return s()},get isStatic(){return o()},get enabled(){return t.open},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return n()},get loop(){return t.loop},get trapFocus(){return r()},get isValidEvent(){return i()},get onFocusOutside(){return t.onFocusOutside},forceMount:!1,get ref(){return t.ref}},()=>a))};Mt(u,l=>{t.shouldRender&&l(f)})}R(e,c)}function ec(e,t){let n=y(t,"interactOutsideBehavior",3,"close"),r=y(t,"trapFocus",3,!0),i=y(t,"isValidEvent",3,()=>!1),s=y(t,"customAnchor",3,null),o=y(t,"isStatic",3,!1),a=me(t,["$$slots","$$events","$$legacy","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled"]);Wr(e,Be({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return s()},get isStatic(){return o()},get enabled(){return t.enabled},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return n()},get loop(){return t.loop},get trapFocus(){return r()},get isValidEvent(){return i()},get onFocusOutside(){return t.onFocusOutside}},()=>a,{forceMount:!0}))}var Fa=pe("<title> </title>"),Ra=pe('<svg><!><path d="M13 24 4 15 5.414 13.586 13 21.171 26.586 7.586 28 9 13 24z"></path></svg>');function nc(e,t){const n=ee(t,["children","$$slots","$$events","$$legacy"]),r=ee(n,["size","title"]);Y(t,!1);const i=te(),s=te();let o=y(t,"size",8,16),a=y(t,"title",8,void 0);Jt(()=>(At(n),At(a())),()=>{b(i,n["aria-label"]||n["aria-labelledby"]||a())}),Jt(()=>(d(i),At(n)),()=>{b(s,{"aria-hidden":d(i)?void 0:!0,role:d(i)?"img":void 0,focusable:Number(n.tabindex)===0?!0:void 0})}),Bn(),Ln();var c=Ra();Vn(c,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:o(),height:o(),...d(s),...r}));var u=Qt(c);{var f=l=>{var g=Fa(),h=Qt(g,!0);$t(g),Wn(()=>Dn(h,a())),R(l,g)};Mt(u,l=>{a()&&l(f)})}_n(),$t(c),R(e,c),G()}export{qo as $,po as A,to as B,St as C,Tr as D,Qn as E,Qa as F,Wa as G,ds as H,fs as I,us as J,Sn as K,Zn as L,Za as M,Ft as N,ji as O,ec as P,nt as Q,ho as R,ja as S,ps as T,Yo as U,si as V,nc as W,jn as X,Va as Y,br as Z,mr as _,Ar as a,ne as a0,Wt as a1,io as a2,ro as a3,$n as a4,no as a5,Jn as a6,Ya as a7,Ga as a8,Xa as a9,qa as aa,pn as ab,za as ac,ai as ad,x as b,Ha as c,Or as d,xr as e,tc as f,yr as g,Ja as h,ot as i,Er as j,$a as k,wr as l,ve as m,W as n,je as o,Ua as p,Ht as q,Re as r,ht as s,ze as t,Ka as u,ye as v,z as w,Ke as x,Ve as y,He as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as m,f as w,s as u,g as o,a4 as rt}from"./DSh-OF2y.js";import{a as d}from"./CFtRXHDP.js";function it(){return d("/api/workspace")}function at(e){return d("/api/workspace",{method:"PUT",body:JSON.stringify(e)})}function Ct(){return d("/api/workspace/mcp-config")}function J(){return d("/api/repos")}function st(e,i,s,f){return d("/api/repos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e,display_name:i||void 0,description:s,...f?{private:!0}:{}})})}function ct(e,i,s){return d(`/api/repos/${encodeURIComponent(e)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:i,display_name:s||void 0})})}function lt(e){return d(`/api/repos/${encodeURIComponent(e)}`,{method:"DELETE"})}function ut(){return d("/api/apps")}function dt(e){return d(`/api/repos/${encodeURIComponent(e)}/entities?summary=true`)}function wt(e,i,s){return d(`/api/repos/${encodeURIComponent(e)}/entities/${encodeURIComponent(i)}/${encodeURIComponent(s)}`)}function Et(e,i,s,f,c){return d(`/api/repos/${encodeURIComponent(e)}/entities`,{method:"POST",body:JSON.stringify({entityType:i,entityId:s,data:f,content:c})})}function St(e,i,s){return d(`/api/repos/${encodeURIComponent(e)}/entities/${encodeURIComponent(i)}/${encodeURIComponent(s)}`,{method:"DELETE"})}function bt(e,i,s,f){return d(`/api/repos/${encodeURIComponent(e)}/entities/${encodeURIComponent(i)}/${encodeURIComponent(s)}`,{method:"PUT",body:JSON.stringify(f)})}function It(e,i,s,f){return d(`/api/repos/${encodeURIComponent(e)}/change-type`,{method:"POST",body:JSON.stringify({entityType:i,entityId:s,newType:f})})}function $t(e,i,s,f,c){return d(`/api/repos/${encodeURIComponent(e)}/transfer`,{method:"POST",body:JSON.stringify({entityType:i,entityId:s,targetRepo:f,mode:c})})}function Tt(){return d("/api/insights")}function kt(){return d("/api/insights/generate",{method:"POST"})}function vt(){return d("/api/preferences")}function Pt(e){return d("/api/preferences",{method:"PUT",body:JSON.stringify(e)})}function Ut(){return d("/api/views")}function Rt(e,i){return d("/api/views",{method:"POST",body:JSON.stringify({name:e,config:i})})}function Lt(e,i){return d(`/api/views/${e}`,{method:"PUT",body:JSON.stringify(i)})}function At(e){return d(`/api/views/${e}`,{method:"DELETE"})}function Ot(e){return d(`/api/repos/${encodeURIComponent(e)}/commit`,{method:"POST"})}function pt(e){return e.replace(/-/g," ").replace(/\b\w/g,i=>i.toUpperCase())}function M(e,i){return i||e.split("-").map(s=>s.charAt(0).toUpperCase()+s.slice(1)).join(" ")}const ft="#e05050";function D(e){if(typeof document>"u")return;const i=e||ft,s=parseInt(i.slice(1,3),16),f=parseInt(i.slice(3,5),16),c=parseInt(i.slice(5,7),16),E=[document.documentElement,document.querySelector("[data-theme]")].filter(Boolean);for(const h of E)h.style.setProperty("--color-accent",i),h.style.setProperty("--color-accent-hover",mt(i,15)),h.style.setProperty("--color-accent-muted",`rgba(${s}, ${f}, ${c}, 0.08)`),h.style.setProperty("--color-link",j(i,15)),h.style.setProperty("--color-badge-bg",`rgba(${s}, ${f}, ${c}, 0.1)`),h.style.setProperty("--color-badge-text",j(i,20))}function mt(e,i){const s=Math.max(0,Math.round(parseInt(e.slice(1,3),16)*(1-i/100))),f=Math.max(0,Math.round(parseInt(e.slice(3,5),16)*(1-i/100))),c=Math.max(0,Math.round(parseInt(e.slice(5,7),16)*(1-i/100)));return`#${s.toString(16).padStart(2,"0")}${f.toString(16).padStart(2,"0")}${c.toString(16).padStart(2,"0")}`}function j(e,i){const s=Math.min(255,Math.round(parseInt(e.slice(1,3),16)+(255-parseInt(e.slice(1,3),16))*i/100)),f=Math.min(255,Math.round(parseInt(e.slice(3,5),16)+(255-parseInt(e.slice(3,5),16))*i/100)),c=Math.min(255,Math.round(parseInt(e.slice(5,7),16)+(255-parseInt(e.slice(5,7),16))*i/100));return`#${s.toString(16).padStart(2,"0")}${f.toString(16).padStart(2,"0")}${c.toString(16).padStart(2,"0")}`}function yt(){let e=m(""),i=m(null),s=m(null),f=m(!1),c=m(w([]));const E={};let h=m(w([])),v=m(!1),P=m(null),g=m(w({})),U=w({}),R=w({}),$=w({}),_=m(0),F=m(null),C=m(""),T=null,S=m(0),b=m(0),x=m("alpha");async function W(){u(v,!0),u(P,null),u(S,0),u(b,0);try{const[t,n,r]=await Promise.all([J(),ut().catch(()=>[]),it().catch(()=>({name:""}))]);u(h,n,!0),u(e,r.name,!0),u(i,r.about??null,!0),u(s,r.accent_color??null,!0),u(f,!0),D(o(s)),u(c,t.map(a=>({name:a.name,displayName:M(a.name,a.display_name),type:a.type,private:a.private,sync:a.sync,count:null,entities:[],loading:!1,loaded:!1})),!0),await Promise.all(o(c).map(a=>I(a.name)))}catch(t){u(P,t.message,!0)}finally{u(v,!1)}}function V(t,n,r){const a=o(c).find(l=>l.name===t);a&&(a.entities=a.entities.filter(l=>!(l.id===r&&l.entityType===n)),a.count=a.entities.length)}async function Q(t){o(c).find(r=>r.name===t)&&await I(t,!0)}async function B(){u(S,0),u(b,0),await Promise.all(o(c).map(t=>I(t.name,!0)))}async function I(t,n=!1){const r=o(c).find(l=>l.name===t);if(!r||r.loading||!n&&r.loaded)return;const a=(E[t]??0)+1;E[t]=a,n||(r.loading=!0);try{const l=await dt(t);if(E[t]!==a)return;let y=0,L=0;for(const p of l)y+=p.document?.wikilinks?.length??0,L+=p.subContentCount??0;u(S,o(S)+y),u(b,o(b)+L);const A=new Set(["name","created_at","updated_at"]);r.entities=l.filter(p=>!p.id.toLowerCase().startsWith("readme")).map(p=>({id:p.id,title:p.data?.name??pt(p.id),entityType:p.entityType,repo:t,hasSubContent:!!p.hasSubContent,wikilinks:p.document?.wikilinks??[],createdAt:p.data?.created_at??null,updatedAt:p.data?.updated_at??null,fields:Object.fromEntries(Object.entries(p.data??{}).filter(([O])=>!A.has(O))),status:p.data?.status??void 0,priority:p.data?.priority??void 0,assignee:p.data?.assignee??void 0,dueDate:p.data?.due_date??void 0})).sort((p,O)=>p.title.localeCompare(O.title)),r.count=r.entities.length,r.loaded=!0}catch(l){console.error(`Failed to load entities for ${t}:`,l)}finally{r.loading=!1}}function K(t){o(g)[t]=!o(g)[t]}function q(t){return o(g)[t]??!1}function k(t,n,r){return`${t}/${n}/${r}`}function H(t,n,r){const a=k(t,n,r),l=U[a]??!1;U[a]=!l,!l&&!R[a]?.loaded&&z(t,n,r)}function N(t,n,r){return U[k(t,n,r)]??!1}function Y(t,n,r){return R[k(t,n,r)]??{entries:[],loading:!1,loaded:!1}}async function z(t,n,r){const a=k(t,n,r);R[a]={entries:[],loading:!1,loaded:!0}}function G(t){const n=o(C).trim().toLowerCase();if(!n)return t;const r=[];for(const a of t){const l=a.entities.filter(y=>y.title.toLowerCase().includes(n)||y.id.toLowerCase().includes(n));l.length>0&&r.push({...a,entities:l,count:l.length})}return r}function X(t){if(t&&!o(C)?T={...o(g)}:!t&&o(C)&&T&&(u(g,T,!0),T=null),u(C,t,!0),t){const n=t.trim().toLowerCase();for(const r of o(c)){const a=r.entities.some(l=>l.title.toLowerCase().includes(n)||l.id.toLowerCase().includes(n));o(g)[r.name]=a}}}function Z(t){const n=t.startsWith("type:");$[t]=!($[t]??n)}function tt(t){return $[t]??!1}function et(t){return $[t]===!1}const nt=rt(()=>o(c).reduce((t,n)=>t+(n.count??0),0));function ot(t){return o(h).find(n=>n.entityTypes.includes(t))}return{get name(){return o(e)},get about(){return o(i)},get accentColor(){return o(s)},get nameLoaded(){return o(f)},async updateWorkspace(t){t.accent_color!==void 0&&(u(s,t.accent_color,!0),D(t.accent_color)),await at(t),t.name?.trim()&&u(e,t.name.trim(),!0),typeof t.about=="string"&&u(i,t.about,!0)},get repos(){return o(c)},get apps(){return o(h)},get loading(){return o(v)},get error(){return o(P)},get totalEntities(){return o(nt)},get totalLinks(){return o(S)},get totalFiles(){return o(b)},get hasTasks(){return o(c).some(t=>t.entities.some(n=>n.entityType==="task"))},get sortedRepos(){const t=[...o(c)].sort((n,r)=>n.name.localeCompare(r.name));return G(t)},get filteredIds(){const t=o(C).trim().toLowerCase();if(!t)return null;const n=new Set;for(const r of o(c))for(const a of r.entities)(a.title.toLowerCase().includes(t)||a.id.toLowerCase().includes(t))&&n.add(a.id);return n},get filterQuery(){return o(C)},setFilterQuery:X,get sortMode(){return o(x)},set sortMode(t){u(x,t,!0)},get recentEntities(){const t=o(C).trim().toLowerCase();let n=[];for(const r of o(c))for(const a of r.entities)t&&!a.title.toLowerCase().includes(t)&&!a.id.toLowerCase().includes(t)||n.push(a);return n.sort((r,a)=>{const l=r.updatedAt??"";return(a.updatedAt??"").localeCompare(l)})},get sidebarScrollTop(){return o(_)},set sidebarScrollTop(t){u(_,t,!0)},get lastAutoExpandedFor(){return o(F)},set lastAutoExpandedFor(t){u(F,t,!0)},load:W,loadEntities:I,removeEntity:V,refreshEntities:Q,refreshAll:B,toggleRepo:K,isExpanded:q,toggleEntity:H,isEntityExpanded:N,getEntityContents:Y,toggleFolder:Z,isFolderExpanded:tt,isFolderCollapsed:et,getAppForEntityType:ot,async renameCollectionTo(t,n,r){await ct(t,n,r);const a=o(c).find(l=>l.name===t);a&&(a.name=n,a.displayName=r||M(n),o(g)[t]&&(o(g)[n]=!0,delete o(g)[t]))},async removeCollection(t){await lt(t),u(c,o(c).filter(n=>n.name!==t),!0),delete o(g)[t]},async addCollection(t,n,r,a){await st(t,n,r,a);const l=await J();u(c,l.map(y=>o(c).find(A=>A.name===y.name)??{name:y.name,displayName:M(y.name,y.display_name),type:y.type,private:y.private,count:null,entities:[],loading:!1,loaded:!1}),!0),o(g)[t]=!0,await I(t)}}}const Mt=yt();export{Ot as a,Tt as b,Rt as c,At as d,vt as e,Ut as f,kt as g,wt as h,bt as i,Ct as j,It as k,St as l,Et as m,Pt as s,$t as t,Lt as u,Mt as w};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as r,f as y,g as s,s as e}from"./DSh-OF2y.js";import{s as u,g as b,b as p,e as w}from"./DSkxw4Ss.js";function A(){let a=r(y([])),n=r(null),o=r(!1),l=r(!1),i=r(""),g=r(!1);async function f(){try{const[t,m]=await Promise.all([p(),w()]);e(a,t.insights??[],!0),e(n,t.generatedAt??null,!0),e(i,m.home_brief??"",!0),e(l,!0),e(g,!0)}catch(t){console.error("Failed to load insights:",t)}}async function c(){e(o,!0);try{const t=await b();e(a,t.insights??[],!0),e(n,t.generatedAt??null,!0),e(l,!0)}catch(t){console.error("Failed to generate insights:",t)}finally{e(o,!1)}}async function h(t){e(i,t,!0),await u({home_brief:t})}async function d(){await u({home_brief:""}),e(i,""),e(a,[],!0),e(n,null)}return{get insights(){return s(a)},get generatedAt(){return s(n)},get loading(){return s(o)},get loaded(){return s(l)},get homeBrief(){return s(i)},get briefLoaded(){return s(g)},load:f,generate:c,saveBrief:h,reset:d}}const P=A();export{P as insightsStore};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as p,a as l,p as _e,b as H,s as pe,f as se}from"./b0XUoOIH.js";import{p as h,a0 as v,ae as le,b,g as f,a3 as G,c as w,r as A,a4 as J,t as N,l as te,s as re,d as Y,a as me,n as he,m as oe}from"./DSh-OF2y.js";import{s as m,a as ie}from"./CRnhIQbv.js";import{c as V}from"./DCVmM0L5.js";import{p as s,s as E,r as L,l as ae}from"./D-yNNNdf.js";import{D as be,h as ye,i as Ce,j as De}from"./BHue2Ock.js";import{n as x,b as K,c as Pe,H as Se,I as Oe,J as Fe,T as xe,K as ne,m as q,p as we}from"./DQYNi3YK.js";import{c as R}from"./DQ5NTKSo.js";import{i as B}from"./DT3KtxWU.js";import{c as Q,s as U}from"./CFtRXHDP.js";import{i as Ae}from"./vZ2iBqLE.js";function He(a,e){h(e,!0);let t=s(e,"open",15,!1),n=s(e,"onOpenChange",3,x),r=s(e,"onOpenChangeComplete",3,x);be.create({variant:K(()=>"dialog"),open:K(()=>t(),i=>{t(i),n()(i)}),onOpenChangeComplete:K(()=>r())});var c=p(),u=v(c);m(u,()=>e.children??le),l(a,c),b()}var ze=H("<!> <!>",1),Me=H("<!> <div><!></div>",1);function Ie(a,e){const t=_e();h(e,!0);let n=s(e,"id",19,()=>Pe(t)),r=s(e,"ref",15,null),c=s(e,"forceMount",3,!1),u=s(e,"onCloseAutoFocus",3,x),i=s(e,"onOpenAutoFocus",3,x),d=s(e,"onEscapeKeydown",3,x),y=s(e,"onInteractOutside",3,x),g=s(e,"trapFocus",3,!0),_=s(e,"preventScroll",3,!0),C=s(e,"restoreScrollDelay",3,null),D=L(e,["$$slots","$$events","$$legacy","id","children","child","ref","forceMount","onCloseAutoFocus","onOpenAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","restoreScrollDelay"]);const o=ye.create({id:K(()=>n()),ref:K(()=>r(),S=>r(S))}),P=J(()=>q(D,o.props));var k=p(),X=v(k);{var T=S=>{Se(S,{get ref(){return o.opts.ref},loop:!0,get trapFocus(){return g()},get enabled(){return o.root.opts.open.current},get onOpenAutoFocus(){return i()},get onCloseAutoFocus(){return u()},focusScope:(ce,de)=>{let $=()=>de?.().props;Oe(ce,E(()=>f(P),{get enabled(){return o.root.opts.open.current},get ref(){return o.opts.ref},onEscapeKeydown:Z=>{d()(Z),!Z.defaultPrevented&&o.root.handleClose()},children:(Z,je)=>{Fe(Z,E(()=>f(P),{get ref(){return o.opts.ref},get enabled(){return o.root.opts.open.current},onInteractOutside:j=>{y()(j),!j.defaultPrevented&&o.root.handleClose()},children:(j,Be)=>{xe(j,E(()=>f(P),{get ref(){return o.opts.ref},get enabled(){return o.root.opts.open.current},children:(ue,Je)=>{var ee=p(),fe=v(ee);{var ve=F=>{var z=ze(),M=v(z);{var I=O=>{ne(O,{get preventScroll(){return _()},get restoreScrollDelay(){return C()}})};B(M,O=>{o.root.opts.open.current&&O(I)})}var W=G(M,2);{let O=J(()=>({props:q(f(P),$()),...o.snippetProps}));m(W,()=>e.child,()=>f(O))}l(F,z)},ge=F=>{var z=Me(),M=v(z);ne(M,{get preventScroll(){return _()}});var I=G(M,2);ie(I,O=>({...O}),[()=>q(f(P),$())]);var W=w(I);m(W,()=>e.children??le),A(I),l(F,z)};B(fe,F=>{e.child?F(ve):F(ge,!1)})}l(ue,ee)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{focusScope:!0}})};B(X,S=>{(o.shouldRender||c())&&S(T)})}l(a,k),b()}function tt(a,e){h(e,!0);let t=s(e,"open",15,!1),n=L(e,["$$slots","$$events","$$legacy","open","onOpenChange","children"]);var r=p(),c=v(r);V(c,()=>He,(u,i)=>{i(u,E({get onOpenChange(){return e.onOpenChange}},()=>n,{get open(){return t()},set open(d){t(d)},children:(d,y)=>{var g=p(),_=v(g);m(_,()=>e.children),l(d,g)},$$slots:{default:!0}}))}),l(a,r),b()}var Ve=H("<!> <!>",1);function rt(a,e){h(e,!0);let t=s(e,"size",3,"md"),n=L(e,["$$slots","$$events","$$legacy","children","class","size"]);var r=p(),c=v(r);V(c,()=>we,(u,i)=>{i(u,{children:(d,y)=>{var g=Ve(),_=v(g);V(_,()=>Ce,(D,o)=>{o(D,{class:"dialog-overlay"})});var C=G(_,2);{let D=J(()=>R("dialog-content",`dialog-${t()}`,e.class));V(C,()=>Ie,(o,P)=>{P(o,E({get class(){return f(D)}},()=>n,{children:(k,X)=>{var T=p(),S=v(T);m(S,()=>e.children),l(k,T)},$$slots:{default:!0}}))})}l(d,g)},$$slots:{default:!0}})}),l(a,r),b()}var Ee=H("<div><!></div>");function ot(a,e){h(e,!0);var t=Ee(),n=w(t);m(n,()=>e.children),A(t),N(r=>U(t,1,r),[()=>Q(R("dialog-header",e.class))]),l(a,t),b()}function at(a,e){h(e,!0);var t=p(),n=v(t);{let r=J(()=>R("dialog-title",e.class));V(n,()=>De,(c,u)=>{u(c,{get class(){return f(r)},children:(i,d)=>{var y=p(),g=v(y);m(g,()=>e.children),l(i,y)},$$slots:{default:!0}})})}l(a,t),b()}var Ke=H("<div><!></div>");function nt(a,e){h(e,!0);var t=Ke(),n=w(t);m(n,()=>e.children),A(t),N(r=>U(t,1,r),[()=>Q(R("dialog-body",e.class))]),l(a,t),b()}var Re=H("<div><!></div>");function st(a,e){h(e,!0);var t=Re(),n=w(t);m(n,()=>e.children),A(t),N(r=>U(t,1,r),[()=>Q(R("dialog-footer",e.class))]),l(a,t),b()}var ke=se("<title> </title>"),Te=se('<svg><!><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z"></path></svg>');function lt(a,e){const t=ae(e,["children","$$slots","$$events","$$legacy"]),n=ae(t,["size","title"]);h(e,!1);const r=oe(),c=oe();let u=s(e,"size",8,16),i=s(e,"title",8,void 0);te(()=>(Y(t),Y(i())),()=>{re(r,t["aria-label"]||t["aria-labelledby"]||i())}),te(()=>(f(r),Y(t)),()=>{re(c,{"aria-hidden":f(r)?void 0:!0,role:f(r)?"img":void 0,focusable:Number(t.tabindex)===0?!0:void 0})}),me(),Ae();var d=Te();ie(d,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:u(),height:u(),...f(c),...n}));var y=w(d);{var g=_=>{var C=ke(),D=w(C,!0);A(C),N(()=>pe(D,i())),l(_,C)};B(y,_=>{i()&&_(g)})}he(2),A(d),l(a,d),b()}export{lt as C,rt as D,ot as a,at as b,nt as c,st as d,tt as e};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as f,s as V,f as b}from"./b0XUoOIH.js";import{i as $}from"./vZ2iBqLE.js";import{p as y,l as p,s as v,d,g as r,a as L,c as h,n as C,r as u,b as A,m,t as B}from"./DSh-OF2y.js";import{i as E}from"./DT3KtxWU.js";import{a as N}from"./CRnhIQbv.js";import{l as g,p as _}from"./D-yNNNdf.js";var P=b("<title> </title>"),R=b('<svg><!><path d="M12 12H14V24H12z"></path><path d="M18 12H20V24H18z"></path><path d="M4,6V8H6V28a2,2,0,0,0,2,2H24a2,2,0,0,0,2-2V8h2V6ZM8,28V8H24V28Z"></path><path d="M12 2H20V4H12z"></path></svg>');function G(z,t){const e=g(t,["children","$$slots","$$events","$$legacy"]),x=g(e,["size","title"]);y(t,!1);const a=m(),n=m();let c=_(t,"size",8,16),i=_(t,"title",8,void 0);p(()=>(d(e),d(i())),()=>{v(a,e["aria-label"]||e["aria-labelledby"]||i())}),p(()=>(r(a),d(e)),()=>{v(n,{"aria-hidden":r(a)?void 0:!0,role:r(a)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),L(),$();var s=R();N(s,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:c(),height:c(),...r(n),...x}));var M=h(s);{var w=l=>{var o=P(),H=h(o,!0);u(o),B(()=>V(H,i())),f(l,o)};E(M,l=>{i()&&l(w)})}C(4),u(s),f(z,s),A()}var T=b("<title> </title>"),Y=b('<svg><!><path d="M2 26H30V28H2z"></path><path d="M25.4,9c0.8-0.8,0.8-2,0-2.8c0,0,0,0,0,0l-3.6-3.6c-0.8-0.8-2-0.8-2.8,0c0,0,0,0,0,0l-15,15V24h6.4L25.4,9z M20.4,4L24,7.6 l-3,3L17.4,7L20.4,4z M6,22v-3.6l10-10l3.6,3.6l-10,10H6z"></path></svg>');function I(z,t){const e=g(t,["children","$$slots","$$events","$$legacy"]),x=g(e,["size","title"]);y(t,!1);const a=m(),n=m();let c=_(t,"size",8,16),i=_(t,"title",8,void 0);p(()=>(d(e),d(i())),()=>{v(a,e["aria-label"]||e["aria-labelledby"]||i())}),p(()=>(r(a),d(e)),()=>{v(n,{"aria-hidden":r(a)?void 0:!0,role:r(a)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),L(),$();var s=Y();N(s,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:c(),height:c(),...r(n),...x}));var M=h(s);{var w=l=>{var o=T(),H=h(o,!0);u(o),B(()=>V(H,i())),f(l,o)};E(M,l=>{i()&&l(w)})}C(2),u(s),f(z,s),A()}export{I as E,G as T};
|