@ubean/devtools 0.7.9 → 0.7.11

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.
@@ -1 +1 @@
1
- import{t as e}from"./index-C-7ywK8q.js";var t=Symbol.for(`devframe:browser-agent-registry`),{tools:n,listeners:r}=globalThis[t]??={tools:new Map,listeners:new Set};function i(){return[...n.values()]}function a(e){return r.add(e),()=>r.delete(e)}var o=`devframe:client-id`,s;function c(t=globalThis.window){try{let n=t?.sessionStorage;if(n){let t=n.getItem(o);return t||(t=e(),n.setItem(o,t)),t}}catch{}return s??=e(),s}function l(e){e.client.register({name:`devframe:agent:invoke-client-tool`,type:`action`,jsonSerializable:!0,handler:async(e,t)=>{let n=i().find(t=>t.id===e);if(!n)throw Error(`[devframe/agent] browser tool "${e}" not found`);return await n.invoke(t)}});let t=!1,n=!1,r=0,o=()=>{t||n||(t=!0,queueMicrotask(async()=>{if(t=!1,n)return;let a=i().map(({invoke:e,...t})=>t);(a.length!==0||r!==0)&&(r=a.length,await e.callOptional(`devframe:agent:sync-client-tools`,c(),a).catch(()=>{}))}))},s=a(o),l=e.events.on(`connection:status`,e=>{e===`connected`&&o()});return o(),()=>{n=!0,s(),l()}}export{l as setupBrowserAgentRpcBridge};
1
+ import{t as e}from"./index-BPu7ugSA.js";var t=Symbol.for(`devframe:browser-agent-registry`),{tools:n,listeners:r}=globalThis[t]??={tools:new Map,listeners:new Set};function i(){return[...n.values()]}function a(e){return r.add(e),()=>r.delete(e)}var o=`devframe:client-id`,s;function c(t=globalThis.window){try{let n=t?.sessionStorage;if(n){let t=n.getItem(o);return t||(t=e(),n.setItem(o,t)),t}}catch{}return s??=e(),s}function l(e){e.client.register({name:`devframe:agent:invoke-client-tool`,type:`action`,jsonSerializable:!0,handler:async(e,t)=>{let n=i().find(t=>t.id===e);if(!n)throw Error(`[devframe/agent] browser tool "${e}" not found`);return await n.invoke(t)}});let t=!1,n=!1,r=0,o=()=>{t||n||(t=!0,queueMicrotask(async()=>{if(t=!1,n)return;let a=i().map(({invoke:e,...t})=>t);(a.length!==0||r!==0)&&(r=a.length,await e.callOptional(`devframe:agent:sync-client-tools`,c(),a).catch(()=>{}))}))},s=a(o),l=e.events.on(`connection:status`,e=>{e===`connected`&&o()});return o(),()=>{n=!0,s(),l()}}export{l as setupBrowserAgentRpcBridge};
@@ -23,9 +23,9 @@
23
23
  `)}}function Vu(e,t,n={}){let{window:r=ju,...i}=n,a,o=Iu(()=>r&&`ResizeObserver`in r),s=()=>{a&&=(a.disconnect(),void 0)},c=ir(U(()=>{let t=N(e);return Array.isArray(t)?t.map(e=>Nu(e)):[Nu(t)]}),e=>{if(s(),o.value&&r){a=new ResizeObserver(t);for(let t of e)t instanceof Element&&a.observe(t,i)}},{immediate:!0,flush:`post`}),l=()=>{s(),c()};return Su(l),{isSupported:o,stop:l}}function Hu(e,t={width:0,height:0},n={}){let{window:r=ju,box:i=`content-box`}=n,a=U(()=>{var t;return(t=Nu(e))==null||(t=t.namespaceURI)==null?void 0:t.includes(`svg`)}),o=on(t.width),s=on(t.height),{stop:c}=Vu(e,([t])=>{let n=i===`border-box`?t.borderBoxSize:i===`content-box`?t.contentBoxSize:t.devicePixelContentBoxSize;if(r&&a.value){let t=Nu(e);if(t){let e=t.getBoundingClientRect();o.value=e.width,s.value=e.height}}else if(n){let e=Eu(n);o.value=e.reduce((e,{inlineSize:t})=>e+t,0),s.value=e.reduce((e,{blockSize:t})=>e+t,0)}else o.value=t.contentRect.width,s.value=t.contentRect.height},n);ku(()=>{let n=Nu(e);if(n&&`offsetWidth`in n){if(i===`content-box`&&r){let e=r.getComputedStyle(n),t=Number.parseFloat(e.paddingLeft)+Number.parseFloat(e.paddingRight),i=Number.parseFloat(e.paddingTop)+Number.parseFloat(e.paddingBottom),a=Number.parseFloat(e.borderLeftWidth)+Number.parseFloat(e.borderRightWidth),c=Number.parseFloat(e.borderTopWidth)+Number.parseFloat(e.borderBottomWidth);o.value=n.offsetWidth-t-a,s.value=n.offsetHeight-i-c}else o.value=n.offsetWidth,s.value=n.offsetHeight}else n&&(o.value=t.width,s.value=t.height)});let l=ir(()=>Nu(e),e=>{o.value=e?t.width:0,s.value=e?t.height:0});function u(){c(),l()}return{width:o,height:s,stop:u}}function Uu(e){return e==null}function Wu(e){return e instanceof Date}function Gu(e){return typeof e==`object`}function Ku(e){return!Uu(e)&&!Array.isArray(e)&&Gu(e)&&!Wu(e)}function qu(e){return Object.keys(e)}function Ju(e,...t){let n={};for(let r of[e,...t])if(Ku(r))for(let e of Object.keys(r)){let t=r[e],i=n[e];i===void 0?n[e]=t:Ku(i)&&Ku(t)&&(n[e]=Ju(i,t))}return n}function Yu(e,t){let n={};for(let r in e){let i=r;t.includes(i)||(n[i]=e[i])}return n}function Xu(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Zu(e,t,n,r){let i=e();if(i!==void 0)return U({get:()=>e(),set:e=>{t?.(e)}});let a=on(i??n),o=!1;return ir(e,e=>{o||(e!==void 0||r)&&(o=!0,a.value=e,Fn(()=>{o=!1}))}),ir(a,e=>{!o&&(e!==void 0||r)&&t?.(e)}),a}var Qu=[],$u;function ed(e,t){rr(()=>{let n=N(e);if(!n)return;let r=Qu.length===0,i=$u!==n;(r||i)&&(i&&$u&&$u.removeEventListener(`keydown`,td),$u=n,n.addEventListener(`keydown`,td)),Qu.includes(t)||Qu.push(t),xn(()=>{Qu=Qu.filter(e=>e!==t),Qu.length===0&&($u?.removeEventListener(`keydown`,td),$u=void 0)})})}function td(e){let t=e;if(t.key===`Escape`)for(let e of Qu.slice())e(t)}function nd(e,t,n){let r=n.originalEvent.target;if(!r)return;let i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),r.dispatchEvent(i)}var rd=`data-dismissable-layer`,id={layers:Kt(new Set),layersWithOutsidePointerEventsDisabled:Kt(new Set),branches:Kt(new Set)},ad;function od(e,t={}){let{disableOutsidePointerEvents:n,enable:r=!0,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c}=t,l=()=>e.value?.ownerDocument??globalThis?.document,u=U(()=>e.value?Array.from(id.layers).indexOf(e.value):-1),d=U(()=>id.layersWithOutsidePointerEventsDisabled.size>0),f=U(()=>{let e=Array.from(id.layers),[t]=[...id.layersWithOutsidePointerEventsDisabled].slice(-1),n=t?e.indexOf(t):-1;return u.value>=n}),p=U(()=>{if(d.value)return f.value?`auto`:`none`}),{onPointerdownCapture:m}=sd(e,e=>{if(!f.value)return;let t=e.target;[...id.branches].some(e=>e.contains(t))||(a?.(e),s?.(e),e.defaultPrevented||c?.())},r),{onFocusCapture:h,onBlurCapture:g}=cd(e,e=>{let t=e.target;[...id.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},r);return ed(l,e=>{u.value===id.layers.size-1&&(i?.(e),e.defaultPrevented||(e.preventDefault(),c?.()))}),ir([e,()=>N(r)&&N(n)],([e,t],n,r)=>{if(!e)return;let i=l();t&&(id.layersWithOutsidePointerEventsDisabled.size===0&&(ad=i.body.style.pointerEvents,i.body.style.pointerEvents=`none`),id.layersWithOutsidePointerEventsDisabled.add(e),r(()=>{id.layersWithOutsidePointerEventsDisabled.delete(e),id.layersWithOutsidePointerEventsDisabled.size===0&&(ad?i.body.style.pointerEvents=ad:i.body.style.removeProperty(`pointer-events`))}))},{immediate:!0}),ir(e,(e,t,n)=>{e&&(id.layers.add(e),n(()=>{id.layers.delete(e)}))},{immediate:!0}),{pointerEvents:p,onPointerdownCapture:m,onFocusCapture:h,onBlurCapture:g}}function sd(e,t,n=!0){let r=!1,i=()=>{};return nr(()=>{if(!Jl||!N(n)||!e.value)return;let a=e.value.ownerDocument;async function o(n){if(!e.value)return;let o=n.target;if(r=ld(e.value,o),o&&!r){let e={originalEvent:n};function r(){nd(`dismissableLayer.pointerDownOutside`,t,e)}n.pointerType===`touch`?(a.removeEventListener(`click`,i),i=r,a.addEventListener(`click`,i,{once:!0})):r()}else a.removeEventListener(`click`,i);r=!1}let s=window.setTimeout(()=>{a.addEventListener(`pointerdown`,o)},0);xn(()=>{window.clearTimeout(s),a.removeEventListener(`pointerdown`,o),a.removeEventListener(`click`,i)})}),{onPointerdownCapture:()=>{N(n)&&(r=!0)}}}function cd(e,t,n=!0){let r=!1,i=n=>{if(!e.value||r)return;let i=n.target;i instanceof HTMLElement&&(r=ld(e.value,i),r||nd(`dismissableLayer.focusOutside`,t,{originalEvent:n}))};return nr(()=>{if(!Jl||!N(n)||!e.value)return;let t=e.value.ownerDocument;t.addEventListener(`focusin`,i),xn(()=>{t.removeEventListener(`focusin`,i)})}),{onFocusCapture:()=>{N(n)&&(r=!0)},onBlurCapture:()=>{N(n)&&(r=!1)}}}function ld(e,t){if(!e)return!1;if(e.contains(t))return!0;let n=ud(e),r=t.closest(`[${rd}]`);if(!n||!r)return!1;if(n===r)return!0;let i=Array.from(id.layers).map(ud),a=i.indexOf(n),o=i.indexOf(r);if(a!==-1&&o!==-1)return a<o;let s=Array.from(n.ownerDocument.querySelectorAll(`[${rd}]`));return s.indexOf(n)<s.indexOf(r)}function ud(e){return e.hasAttribute(rd)?e:e.querySelector(`[${rd}]`)}var dd=0,fd=`data-vean-focus-guard`;function pd(e=!0){rr(()=>{if(!Jl||!N(e))return;let t=document.querySelectorAll(`[${fd}]`);if(dd===0||t.length===0){let e=t[0]??md(),n=t[1]??md();e.parentNode||document.body.insertAdjacentElement(`afterbegin`,e),n.parentNode||document.body.insertAdjacentElement(`beforeend`,n)}dd++,xn(()=>{dd--,dd===0&&document.querySelectorAll(`[${fd}]`).forEach(e=>e.remove())})})}function md(){let e=document.createElement(`span`);return e.setAttribute(fd,``),e.tabIndex=0,Object.assign(e.style,{outline:`none`,opacity:`0`,position:`fixed`,pointerEvents:`none`}),e}function hd(e,{select:t=!1}={}){let n=xu();for(let r of e)if(xd(r,{select:t}),xu()!==n)return}function gd(e){let t=_d(e);return[vd(t,e),vd(t.slice().reverse(),e)]}function _d(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(e){let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function vd(e,t){return e.find(e=>!yd(e,{upTo:t}))}function yd(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;let n=e;for(;n;){if(t!==void 0&&n===t)return!1;if(getComputedStyle(n).display===`none`)return!0;n=n.parentElement}return!1}function bd(e){return e instanceof HTMLInputElement&&`select`in e}function xd(e,{select:t=!1}={}){if(!e||!e.focus)return;let n=xu();e.focus({preventScroll:!0}),t&&e!==n&&bd(e)&&e.select()}var Sd=`focusScope.autoFocusOnOpen`,Cd=`focusScope.autoFocusOnClose`,wd={bubbles:!1,cancelable:!0},Td=Dd();function Ed(e,t){let{loop:n,trapped:r,onOpenAutoFocus:i,onCloseAutoFocus:a}=t||{},o,s={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}};if(Jl){function t(t){if(s.paused||!e.value)return;let n=t.target;e.value.contains(n)?o=n:xd(o,{select:!0})}function n(t){if(s.paused||!e.value)return;let n=t.relatedTarget;n!==null&&(e.value.contains(n)||xd(o,{select:!0}))}function c(){e.value?.contains(o)||xd(e.value)}nr(()=>{if(!N(r))return;document.addEventListener(`focusin`,t),document.addEventListener(`focusout`,n);let i=new MutationObserver(c);e.value&&i.observe(e.value,{childList:!0,subtree:!0}),xn(()=>{document.removeEventListener(`focusin`,t),document.removeEventListener(`focusout`,n),i.disconnect()})}),ir(e,(e,t,n)=>{if(!e)return;Td.add(s);let r=xu(),o=e.contains(r);if(i&&e.addEventListener(Sd,i),a&&e.addEventListener(Cd,a),!o){let t=new CustomEvent(Sd,wd);e.dispatchEvent(t),t.defaultPrevented||(hd(bu(_d(e)),{select:!0}),xu()===r&&xd(e))}n(()=>{i&&e.removeEventListener(Sd,i);let t=new CustomEvent(Cd,wd);e.dispatchEvent(t),window.setTimeout(()=>{t.defaultPrevented||xd(r??document.body,{select:!0}),a&&e.removeEventListener(Cd,a),Td.remove(s)},0)})})}function c(e){let t=N(n),i=N(r);if(!t&&!i||s.paused)return;let a=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=xu();if(!a||!o)return;let c=e.currentTarget,[l,u]=gd(c);l&&u?!e.shiftKey&&o===u?(e.preventDefault(),t&&xd(l,{select:!0})):e.shiftKey&&o===l&&(e.preventDefault(),t&&xd(u,{select:!0})):o===c&&e.preventDefault()}return{onKeydown:c}}function Dd(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Xu(e,t),e.unshift(t)},remove(t){e=Xu(e,t),e[0]?.resume()}}}function Od(e){let t=so()?.type?.emits||[],n={};return t.forEach(t=>{n[t]=(...n)=>{e(t,...n)}}),n}function kd(e){return e.filter(e=>!Uu(e))}var Ad={inert:new WeakMap,"aria-hidden":new WeakMap},jd={inert:new WeakSet,"aria-hidden":new WeakSet},Md=new WeakMap,Nd=0;function Pd(e){return typeof ShadowRoot<`u`&&e instanceof ShadowRoot}function Fd(e){return(e.nodeName??``).toLowerCase()}function Id(e){return e?Pd(e)?e.host:Id(e.parentNode):null}function Ld(e,t){return t.map(t=>{if(e.contains(t))return t;let n=Id(t);return e.contains(n)?n:null}).filter(e=>e!==null)}function Rd(e){let t=new Set;for(let n of e){let e=n;for(;e&&!t.has(e);)t.add(e),e=e.parentNode}return t}function zd(e,t){let n=[];return(e=>{if(e)for(let r of Array.from(e.children))Fd(r)!==`script`&&(t.has(r)||n.push(r))})(e),n}function Bd(e,t,n){let r=Ad[t],i=jd[t],a=[],o=Ld(e,Array.from(e.querySelectorAll(`[aria-live]`))),s=[...n,...o];for(let n of zd(e,Rd(s))){let e=n.getAttribute(t),o=e!==null&&e!==`false`,s=(r.get(n)??0)+1;r.set(n,s),a.push(n),s===1&&o&&i.add(n),o||n.setAttribute(t,t===`inert`?``:`true`)}return{hiddenElements:a,uncontrolledElementsSet:i}}function Vd(e,t){let n=[];for(let r of zd(e,Rd(t))){let e=(Md.get(r)??0)+1;Md.set(r,e),n.push(r),e===1&&r.setAttribute(`data-vean-inert`,``)}return n}function Hd(e,t,n,r){return()=>{if(e){let r=Ad[e];for(let i of t){let t=(r.get(i)??0)-1;r.set(i,t),t===0&&(n&&!n.has(i)&&i.removeAttribute(e),n?.delete(i))}}for(let e of r){let t=(Md.get(e)??0)-1;Md.set(e,t),t===0&&e.removeAttribute(`data-vean-inert`)}--Nd,Nd===0&&(Ad.inert=new WeakMap,Ad[`aria-hidden`]=new WeakMap,jd.inert=new WeakSet,jd[`aria-hidden`]=new WeakSet,Md=new WeakMap)}}function Ud(e,t={}){let{ariaHidden:n=!1,inert:r=!1,mark:i=!0}=t;if(!Jl||e.length===0)return()=>{};let a=e[0].ownerDocument.body,o=Ld(a,e),s=r?`inert`:n?`aria-hidden`:null;Nd+=1;let c=[],l=null;if(s){let e=Bd(a,s,o);c=e.hiddenElements,l=e.uncontrolledElementsSet}let u=i?Vd(a,o):[];return Hd(s,c,l,u)}function Wd(e,t=!0,n={}){rr(()=>{if(!Jl)return;let r=N(e),i=kd(Array.isArray(r)?r:[r]);if(i.length===0||i.some(e=>e.closest(`[popover]:not(:popover-open)`))||!N(t))return;let{inert:a,ariaHidden:o,...s}=n,c=Ud(i,{...s,inert:a??Ql(),ariaHidden:o??!Ql()});xn(()=>{c()})})}function Gd(e){let{modal:t,triggerElement:n,swallowTriggerPointerDown:r}=e,i=!1,a=!1;return{onFocusOutside:e=>{t.value&&e.preventDefault()},onInteractOutside:e=>{if(t.value===!0)return;e.defaultPrevented||(i=!0,e.detail.originalEvent.type===`pointerdown`&&(a=!0));let o=e.target;N(r??!0)&&n.value?.contains(o)&&e.preventDefault(),e.detail.originalEvent.type===`focusin`&&a&&e.preventDefault()},onCloseAutoFocus:e=>{t.value?e.defaultPrevented||(e.preventDefault(),n.value?.focus()):(e.defaultPrevented||(i||n.value?.focus(),e.preventDefault()),i=!1,a=!1)}}}function Kd(e,t){let n=on(e);function r(e){return t[n.value][e]??n.value}function i(e){n.value=r(e)}return[n,i]}function qd(e,t,n){let r={},i=`none`,[a,o]=Kd(N(t)?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}}),s=U(()=>[`mounted`,`unmountSuspended`].includes(a.value)),c=t=>{if(t.target!==e.value)return;let n=Jd(r);(n.includes(CSS.escape(t.animationName))||n===`none`)&&o(`ANIMATION_END`)},l=t=>{t.target===e.value&&(i=Jd(r))};return rr(()=>{let e=Jd(r);i=a.value===`mounted`?e:`none`}),rr(()=>{let e=N(t);n?.(!!e);let a=Jd(r);e?o(`MOUNT`):a===`none`||r?.display===`none`?o(`UNMOUNT`):o(i===a?`UNMOUNT`:`ANIMATION_OUT`)}),rr(()=>{let t=e.value;t?(r=getComputedStyle(t),t.addEventListener(`animationstart`,l),t.addEventListener(`animationcancel`,c),t.addEventListener(`animationend`,c),xn(()=>{t.removeEventListener(`animationstart`,l),t.removeEventListener(`animationcancel`,c),t.removeEventListener(`animationend`,c)})):o(`ANIMATION_END`)}),s}function Jd(e){return e?.animationName||`none`}function Yd(e,t,...n){return U(()=>({...Yu(e,t),...Xd(...n)}))}function Xd(...e){return e.length===0?{}:e.map(e=>N(e)||{}).reduce((e,t)=>({...e,...t}),{})}var Zd={name:`English`,key:`en`,dir:`ltr`,messages:{pagination:{firstPage:`First page`,prevPage:`Previous page`,nextPage:`Next page`,lastPage:`Last page`,pageLabel:`Page {value}`},pageTabs:{closeTab:`Close tab`,pinTab:`Pin tab`,unpinTab:`Unpin tab`},table:{emptyTitle:`No data`,emptyDescription:`There is no data to display.`,selectAllRows:`Select all rows`,sortByColumn:`Sort by {column}`,sortByColumnAsc:`Sort by {column}, currently ascending`,sortByColumnDesc:`Sort by {column}, currently descending`,resizeColumn:`Resize {column} column`,expandRow:`Expand row {row}`,collapseRow:`Collapse row {row}`,selectRow:`Select row {row}`,filterSelected:`{count} selected`,filterKeywordActive:`Keyword active`,filterOptionsCount:`{count} options`,filterNoOptions:`No filter options`,filterEdit:`Edit filter for {column}`,filter:`Filter {column}`,filterSearch:`Search filter options for {column}`,filterNoMatching:`No matching options`,filterClear:`Clear`,filterSelect:`Select {label}`,filterSearchPlaceholder:`Search {column}`},calendar:{prevPage:`Previous page`,nextPage:`Next page`,selectMonth:`Select month`,selectYear:`Select year`},datePicker:{toggle:`Open calendar`,popupLabel:`Choose date`},dateRangePicker:{toggle:`Open calendar`,popupLabel:`Choose date range`},carousel:{previous:`Previous slide`,next:`Next slide`,ariaLabel:`Carousel`},cascader:{clear:`Clear value`,noResults:`No data`,removeTag:`Remove {label}`,search:`Search`},clipboard:{copy:`Copy`,copied:`Copied`},layout:{toggleSidebar:`Toggle Sidebar`},input:{clear:`Clear input`},inputNumber:{increment:`Increase`,decrement:`Decrease`,clear:`Clear value`},textarea:{clear:`Clear textarea`},tag:{remove:`Remove {label}`},tagsInput:{addTag:`Add tag`,clear:`Clear tags`},treeMenu:{openActions:`Open {label} actions`},progress:{ariaLabel:`Progress`,loading:`Loading`},alert:{close:`Close alert`},anchor:{nav:`Anchor`},breadcrumb:{nav:`breadcrumb`},stepper:{step:`Step {step}`,ariaLabel:`Step-by-step progress`,stepOf:`Step {current} of {total}`},editable:{cancel:`Cancel`,edit:`Edit`,submit:`Submit`},combobox:{clear:`Clear value`,clearInput:`Clear input`,noResults:`No results found.`,search:`Search`,options:`Options`},autocomplete:{toggleSuggestions:`Toggle suggestions`,clearInput:`Clear input`,noResults:`No results found.`,options:`Options`},command:{noResults:`No results found.`},select:{clear:`Clear value`},dialog:{cancel:`Cancel`,confirm:`Confirm`,fullscreen:`Fullscreen`,exitFullscreen:`Exit fullscreen`,close:`Close`},rating:{ariaLabel:`Rating`,starN:`{count} of {max} stars`,empty:`No rating`},slider:{valueN:`Value {index} of {total}`,minimum:`Minimum`,maximum:`Maximum`},password:{clearInput:`Clear input`,showPassword:`Show password`,hidePassword:`Hide password`},date:{daySegment:`day,`,monthSegment:`month, `,yearSegment:`year, `,hourSegment:`hour, `,minuteSegment:`minute, `,secondSegment:`second, `,dayPeriodSegment:`AM/PM, `,timeZoneSegment:`time zone, `,empty:`Empty`,placeholder:{year:`yyyy`,month:`mm`,day:`dd`,time:`––`}}}},Qd={name:`简体中文`,key:`zh-CN`,dir:`ltr`,messages:{pagination:{firstPage:`第一页`,prevPage:`上一页`,nextPage:`下一页`,lastPage:`最后一页`,pageLabel:`第 {value} 页`},pageTabs:{closeTab:`关闭标签页`,pinTab:`固定标签页`,unpinTab:`取消固定标签页`},table:{emptyTitle:`暂无数据`,emptyDescription:`当前没有可显示的数据。`,selectAllRows:`全选`,sortByColumn:`按{column}排序`,sortByColumnAsc:`按{column}排序,当前升序`,sortByColumnDesc:`按{column}排序,当前降序`,resizeColumn:`调整{column}列宽`,expandRow:`展开行 {row}`,collapseRow:`收起行 {row}`,selectRow:`选择行 {row}`,filterSelected:`已选 {count} 项`,filterKeywordActive:`关键字筛选生效`,filterOptionsCount:`{count} 个选项`,filterNoOptions:`无筛选项`,filterEdit:`编辑「{column}」筛选`,filter:`筛选「{column}」`,filterSearch:`搜索「{column}」的筛选选项`,filterNoMatching:`无匹配选项`,filterClear:`清除`,filterSelect:`选择 {label}`,filterSearchPlaceholder:`搜索 {column}`},calendar:{prevPage:`上一页`,nextPage:`下一页`,selectMonth:`选择月份`,selectYear:`选择年份`},datePicker:{toggle:`打开日历`,popupLabel:`选择日期`},dateRangePicker:{toggle:`打开日历`,popupLabel:`选择日期范围`},carousel:{previous:`上一张幻灯片`,next:`下一张幻灯片`,ariaLabel:`轮播图`},cascader:{clear:`清除`,noResults:`暂无数据`,removeTag:`移除 {label}`,search:`搜索`},clipboard:{copy:`复制`,copied:`已复制`},layout:{toggleSidebar:`切换侧边栏`},input:{clear:`清除输入`},inputNumber:{increment:`增加`,decrement:`减少`,clear:`清除数值`},textarea:{clear:`清除文本域`},tag:{remove:`移除 {label}`},tagsInput:{addTag:`添加标签`,clear:`清除标签`},treeMenu:{openActions:`打开 {label} 的操作`},progress:{ariaLabel:`进度`,loading:`加载中`},alert:{close:`关闭提示`},anchor:{nav:`锚点导航`},breadcrumb:{nav:`面包屑`},stepper:{step:`第 {step} 步`,ariaLabel:`分步进度`,stepOf:`第 {current} 步,共 {total} 步`},editable:{cancel:`取消`,edit:`编辑`,submit:`提交`},combobox:{clear:`清除`,clearInput:`清除输入`,noResults:`无匹配结果。`,search:`搜索`,options:`选项`},autocomplete:{toggleSuggestions:`切换建议列表`,clearInput:`清除输入`,noResults:`无匹配结果。`,options:`选项`},command:{noResults:`无匹配结果。`},select:{clear:`清除`},dialog:{cancel:`取消`,confirm:`确认`,fullscreen:`全屏`,exitFullscreen:`退出全屏`,close:`关闭`},rating:{ariaLabel:`评分`,starN:`{count}/{max} 星`,empty:`未评分`},slider:{valueN:`第 {index} 个值,共 {total} 个`,minimum:`最小值`,maximum:`最大值`},password:{clearInput:`清除输入`,showPassword:`显示密码`,hidePassword:`隐藏密码`},date:{daySegment:`日,`,monthSegment:`月, `,yearSegment:`年, `,hourSegment:`时, `,minuteSegment:`分, `,secondSegment:`秒, `,dayPeriodSegment:`上午/下午, `,timeZoneSegment:`时区, `,empty:`空`,placeholder:{year:`年`,month:`月`,day:`日`,time:`––`}}}},$d={[Zd.key]:Zd,[Qd.key]:Qd},ef=null;function tf(e){return e.split(`-`).map((e,t)=>t===0?e.toLowerCase():e.length===4?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():e.length===2?e.toUpperCase():e.toLowerCase()).join(`-`)}function nf(e){let t=e.split(`-`);return t.map((e,n)=>t.slice(0,t.length-n).join(`-`))}function rf(e){try{return new Intl.Locale(e).maximize()}catch{return}}function af(){return ef||=new Map(Object.values($d).map(e=>[tf(e.key),e])),ef}function of(e){let[t]=e.split(`-`),n=Array.from(af().entries()).filter(([e])=>e.split(`-`)[0]===t);if(n.length===0)return;if(n.length===1){let t=rf(e)?.script,r=rf(n[0][0])?.script;return t&&r&&t!==r?void 0:n[0][1]}let r=rf(e)?.script;return r?n.find(([e])=>rf(e)?.script===r)?.[1]:n[0][1]}function sf(e){let t=tf(e),n=af();for(let e of nf(t)){let t=n.get(e);if(t)return t}let r=rf(t);if(r){let e=Array.from(n.entries()).find(([e])=>rf(e)?.toString()===r.toString());if(e)return e[1]}return of(t)}function cf(e){return e?sf(e)??Zd:Zd}function lf(e){return cf(e).messages}var uf=new Set([`ar`,`he`,`fa`,`ur`,`yi`,`ps`,`sd`,`ug`,`ku`,`dv`]);function df(e){if(!e)return`ltr`;let t=sf(e)?.dir;if(t)return t;let n=e.split(`-`)[0]?.toLowerCase();return n&&uf.has(n)?`rtl`:`ltr`}var[ff,pf]=ql({name:`ConfigProvider`,key:Wl});function mf(e){let t=$n(Wl);return U(()=>N(e)||t?.dir||df(t?.locale)||`ltr`)}function hf(e,t=e=>e){let[n,r]=ql(e,t);return[n,e=>{let t=r();return U(e?()=>t?.value?.[e]:()=>t?.value??{})}]}var gf=P((e,{slots:t,attrs:n})=>()=>{if(!t.default)return null;let e=gu(t.default());if(!e?.length)return null;let r=e.find(e=>e.type!==Ia);return r?Xa(r,n,!0):null},{name:`Slot`}),_f=new Set([`area`,`input`,`img`]),vf=P((e,{slots:t,attrs:n})=>{let r=e.asChild?`template`:e.as;return typeof r==`string`&&_f.has(r)?()=>wo(r,n):r===`template`?()=>wo(gf,n,{default:t.default}):()=>wo(e.as||`div`,n,{default:t.default})},{name:`Primitive`,inheritAttrs:!1,props:[`as`,`asChild`]});function yf(e){return e?`open`:`closed`}function bf(e,t=-1/0,n=1/0){return Math.min(n,Math.max(t,e))}var xf=P({name:`Portal`,__name:`portal`,props:{to:{default:`body`},disabled:{type:Boolean},defer:{type:Boolean},forceMount:{type:Boolean}},setup(e){let t=on(!1);return $r(()=>{t.value=!0}),(n,r)=>t.value||e.forceMount?(I(),R(yr,{key:0,to:e.to,disabled:e.disabled,defer:e.defer},[hi(n.$slots,`default`)],8,[`to`,`disabled`,`defer`])):H(`v-if`,!0)}}),Sf=P({name:`Icon`,__name:`icon`,props:{icon:{}},setup(e){let t=e,n=$n(Wl,{}),r=U(()=>n?.iconRender?.(t.icon));return(e,t)=>r.value?(I(),R(ui(r.value),{key:0})):H(`v-if`,!0)}}),Cf={grad:360/400,turn:360,rad:360/(Math.PI*2)},wf={x:.95047,y:1,z:1.08883},Tf={x:.96422,y:1,z:.82521},Ef=e=>typeof e==`string`?e.length>0:typeof e==`number`,Df=(e,t=0)=>{let n=10**t;return Math.round(n*e)/n+0},Of=(e,t=0,n=1)=>e>n?n:e<t?t:e,kf=e=>{let t=Number.isFinite(e)?e%360:0;return t>0?t:t+360},Af=(e,t=`deg`)=>Number.parseFloat(e)*(Cf[t]||1);function jf(e,t){return[e[0][0]*t[0]+e[0][1]*t[1]+e[0][2]*t[2],e[1][0]*t[0]+e[1][1]*t[1]+e[1][2]*t[2],e[2][0]*t[0]+e[2][1]*t[1]+e[2][2]*t[2]]}function Mf(e){if(!e)return 1;let t=Number.parseFloat(e);return e.endsWith(`%`)&&(t/=100),t}function Nf(e){let t=Number.parseFloat(e);return e.endsWith(`%`)||t>1?Of(t/100):Of(t)}var Pf=[[.4122214708,.5363325363,.0514459929],[.2119034982,.6806995451,.1073969566],[.0883024619,.2817188376,.6299787005]],Ff=[[4.076741661347993,-3.3077115904081937,.2309699287294278],[-1.2684380040921763,2.609757400663372,-.3413193963102196],[-.0041960865418371,-.7034186144594495,1.7076147009309446]],If=[[.2104542553,.793617785,-.0040720468],[1.9779984951,-2.428592205,.4505937099],[.0259040371,.7827717662,-.808675766]],Lf=[[.9999999984505198,.3963377921737678,.2158037580607588],[1.0000000088817607,-.1055613423236563,-.0638541747717059],[1.0000000546724108,-.0894841820949657,-1.2914855378640917]],Rf=[[.4124564391,.3575760776,.1804374833],[.2126728514,.7151521552,.0721749934],[.0193338956,.1191920259,.9503040785]],zf=[[3.2404541621,-1.5371385127,-.4985314095],[-.9692660305,1.8760108454,.0415560175],[.055643431,-.2040259135,1.0572251882]],Bf=[[1.0478112,.0228866,-.050127],[.0295424,.9904844,-.0170491],[-.0092345,.0150436,.7521316]],Vf=[[.9555766,-.0230393,.0631636],[-.0282895,1.0099416,.0210077],[.0122982,-.020483,1.3299098]],Hf=e=>{let{r:t,g:n,b:r,alpha:i}=e;return{r:Of(t,0,255),g:Of(n,0,255),b:Of(r,0,255),alpha:Of(i)}},Uf=e=>{let{r:t,g:n,b:r,alpha:i}=e;return{r:Df(t,2),g:Df(n,2),b:Df(r,2),alpha:Df(i,3)}},Wf=e=>{let{r:t,g:n,b:r,alpha:i}=e;return{r:Of(t),g:Of(n),b:Of(r),alpha:Of(i)}},Gf=({r:e,g:t,b:n,alpha:r=1})=>!Ef(e)||!Ef(t)||!Ef(n)?null:Hf({r:Number(e),g:Number(t),b:Number(n),alpha:Number(r)}),Kf=e=>{let t=e/255;return t<=.04045?t/12.92:((t+.055)/1.055)**2.4};function qf(e){return(e<=.0031308?e*12.92:1.055*e**(1/2.4)-.055)*255}function Jf(e){return{r:Kf(e.r),g:Kf(e.g),b:Kf(e.b),alpha:e.alpha}}function Yf(e){return{r:qf(e.r),g:qf(e.g),b:qf(e.b),alpha:e.alpha}}var Xf=/^rgb?\(\s*([\d.]+%?)\s*[, ]\s*([\d.]+%?)\s*[, ]\s*([\d.]+%?)(?:\s*[,/]\s*([\d.]+%?))?\s*\)$/i,Zf=e=>{let t=Xf.exec(e);if(!t)return null;let[n,r,i,a,o]=t;return Hf({r:Qf(r),g:Qf(i),b:Qf(a),alpha:Mf(o)})};function Qf(e){if(e.endsWith(`%`)){let t=Number.parseFloat(e.slice(0,-1));return Math.round(t/100*255)}return Number.parseFloat(e)}var $f=e=>{let{r:t,g:n,b:r,alpha:i}=Uf(e);return i<1?`rgb(${t} ${n} ${r} / ${i})`:`rgb(${t} ${n} ${r})`},ep=e=>({h:kf(e.h),s:Of(e.s,0,100),v:Of(e.v,0,100),alpha:Of(e.alpha)}),tp=e=>({h:Df(e.h,3),s:Df(e.s,3),v:Df(e.v,3),alpha:Df(e.alpha,3)}),np=e=>{let t=e.h/360*6,n=e.s/100,r=e.v/100,i=Math.floor(t),a=r*(1-n),o=r*(1-(t-i)*n),s=r*(1-(1-t+i)*n),c=i%6;return{r:[r,o,a,a,s,r][c]*255,g:[s,r,r,o,a,a][c]*255,b:[a,a,s,r,r,o][c]*255,alpha:e.alpha}},rp=({h:e,s:t,v:n,alpha:r=1})=>!Ef(e)||!Ef(t)||!Ef(n)?null:np(ep({h:Number(e),s:Number(t),v:Number(n),alpha:Number(r)})),ip=({r:e,g:t,b:n,alpha:r})=>{let i=Math.max(e,t,n),a=i-Math.min(e,t,n),o=0;return a&&(o=i===e?(t-n)/a:i===t?2+(n-e)/a:4+(e-t)/a),{h:60*(o<0?o+6:o),s:i?a/i*100:0,v:i/255*100,alpha:r}},ap=e=>{let{x:t,y:n,z:r,alpha:i}=e;return{x:Of(t,0,wf.x*1.2),y:Of(n,0,wf.y*1.2),z:Of(r,0,wf.z*1.2),alpha:Of(i)}},op=e=>{let{x:t,y:n,z:r,alpha:i}=e,[a,o,s]=jf(zf,[t,n,r]);return Hf(Yf({r:a,g:o,b:s,alpha:i}))},sp=e=>{let{r:t,g:n,b:r,alpha:i}=Jf(e),[a,o,s]=jf(Rf,[t,n,r]);return ap({x:a,y:o,z:s,alpha:i})},cp=216/24389,lp=24389/27,up=e=>{let{l:t,a:n,b:r,alpha:i}=e;return{l:Of(t,0,100),a:Of(n,-160,160),b:Of(r,-160,160),alpha:Of(i)}},dp=e=>{let{l:t,a:n,b:r,alpha:i}=e;return{l:Df(t,3),a:Df(n,3),b:Df(r,3),alpha:Df(i,3)}},fp=e=>{let t=sp(e),{alpha:n}=t,[r,i,a]=jf(Bf,[t.x,t.y,t.z]);return _p({x:r,y:i,z:a,alpha:n})},pp=e=>{let t=vp(e),[n,r,i]=jf(Vf,[t.x,t.y,t.z]);return op({x:n,y:r,z:i,alpha:e.alpha})},mp=(e,t=.01)=>e.r>=-t&&e.r<=255+t&&e.g>=-t&&e.g<=255+t&&e.b>=-t&&e.b<=255+t,hp=(e,t,n)=>{let r=0,i=150;if(mp(pp({l:e,a:i*Math.cos(t),b:i*Math.sin(t),alpha:n})))return i;for(;i-r>.01;){let a=(r+i)/2;mp(pp({l:e,a:a*Math.cos(t),b:a*Math.sin(t),alpha:n}))?r=a:i=a}return r},gp=e=>{let{l:t,a:n,b:r,alpha:i}=e,a=pp(e);if(!mp(a)&&Math.sqrt(n*n+r*r)>1e-4){let e=Math.atan2(r,n),o=hp(t,e,i);a=pp({l:t,a:o*Math.cos(e),b:o*Math.sin(e),alpha:i})}return Hf(a)};function _p(e){let{x:t,y:n,z:r,alpha:i}=e,a=t/Tf.x,o=n/Tf.y,s=r/Tf.z,c=e=>e>cp?Math.cbrt(e):(lp*e+16)/116,l=c(a),u=c(o),d=c(s);return{l:116*u-16,a:500*(l-u),b:200*(u-d),alpha:i}}function vp(e){let{l:t,a:n,b:r,alpha:i}=e,a=(t+16)/116,o=n/500+a,s=a-r/200,c=e=>e*e*e>cp?e*e*e:(116*e-16)/lp,l=c(o),u=t>lp*cp?((t+16)/116)**3:t/lp,d=c(s);return{x:l*Tf.x,y:u*Tf.y,z:d*Tf.z,alpha:i}}var yp=({l:e,a:t,b:n,alpha:r=1})=>!Ef(e)||!Ef(t)||!Ef(n)?null:up({l:Number(e),a:Number(t),b:Number(n),alpha:Number(r)}),bp=e=>{let t=yp(e);return t?gp(t):null},xp=/^lab\(\s*([+-]?[\d.]+)%?\s+([+-]?[\d.]+)\s+([+-]?[\d.]+)(?:\s*\/\s*([+-]?[\d.]+%?))?\s*\)$/i,Sp=e=>{let t=xp.exec(e);if(!t)return null;let[n,r,i,a,o]=t;return up({l:Number.parseFloat(r),a:Number.parseFloat(i),b:Number.parseFloat(a),alpha:Mf(o)})},Cp=e=>{let t=Sp(e);return t?gp(t):null},wp=e=>{let{l:t,a:n,b:r,alpha:i}=dp(e);return i<1?`lab(${t}% ${n} ${r} / ${i})`:`lab(${t}% ${n} ${r})`},Tp=e=>wp(fp(e)),Ep=e=>{if(!e||e.format!==`lab`)return null;let{input:t}=e;return typeof t==`string`?Sp(t):typeof t==`object`?yp(t):null},Dp=e=>{let t=Ep(e);return t?wp(t):null},Op=e=>{let{h:t,s:n,l:r,alpha:i}=e;return{h:kf(t),s:Of(n,0,100),l:Of(r,0,100),alpha:Of(i)}},kp=e=>{let{h:t,s:n,l:r,alpha:i}=e;return{h:Df(t,3),s:Df(n,3),l:Df(r,3),alpha:Df(i,3)}},Ap=e=>{let{h:t,l:n,alpha:r}=e,i=e.s*(n<50?n:100-n)/100;return{h:t,s:i>0?2*i/(n+i)*100:0,v:n+i,alpha:r}},jp=({h:e,s:t,v:n,alpha:r})=>{let i=(200-t)*n/100;return{h:e,s:i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0,l:i/2,alpha:r}},Mp=e=>np(Ap(e)),Np=e=>jp(ip(e)),Pp=({h:e,s:t,l:n,alpha:r=1})=>!Ef(e)||!Ef(t)||!Ef(n)?null:Mp(Op({h:Number(e),s:Number(t),l:Number(n),alpha:Number(r)})),Fp=e=>{let{h:t,s:n,l:r,alpha:i}=kp(Np(e));return i<1?`hsl(${t} ${n}% ${r}% / ${i})`:`hsl(${t} ${n}% ${r}%)`},Ip=/^hsl?\(\s*([+-]?[\d.]+)(deg|grad|rad|turn)?\s*[, ]\s*([+-]?[\d.]+)%\s*[, ]\s*([+-]?[\d.]+)%(?:\s*\/\s*([+-]?[\d.]+%?))?\s*\)$/i,Lp=e=>{let t=Ip.exec(e);if(!t)return null;let[,n,r,i,a,o]=t;return Mp(Op({h:Af(n,r),s:Number.parseFloat(i),l:Number.parseFloat(a),alpha:Mf(o)}))},Rp=(e,t)=>({r:e.r,g:e.g,b:e.b,alpha:t}),zp=e=>({r:255-e.r,g:255-e.g,b:255-e.b,alpha:e.alpha}),Bp=(e,t)=>{let n=Np(e);return{h:n.h,s:n.s,l:Of(n.l+t*100,0,100),alpha:n.alpha}},Vp=(e,t)=>{let{h:n,s:r,l:i,alpha:a}=Np(e);return{h:n,s:Of(r+t*100,0,100),l:i,alpha:a}},Hp=e=>(e.r*299+e.g*587+e.b*114)/1e3/255;function Up(e,t){let{l:n,a:r,b:i}=e,{l:a,a:o,b:s}=t,c=180/Math.PI,l=Math.PI/180,u=((r**2+i**2)**.5+(o**2+s**2)**.5)/2,d=(n+a)/2,f=u**7,p=.5*(1-(f/(f+25**7))**.5),m=r*(1+p),h=o*(1+p),g=(m**2+i**2)**.5,_=(h**2+s**2)**.5,v=(g+_)/2,y=m===0&&i===0?0:Math.atan2(i,m)*c,b=h===0&&s===0?0:Math.atan2(s,h)*c;y<0&&(y+=360),b<0&&(b+=360);let x=b-y,S=Math.abs(b-y);S>180&&b<=y?x+=360:S>180&&b>y&&(x-=360);let C=y+b;S<=180?C/=2:C=(y+b<360?C+360:C-360)/2;let w=1-.17*Math.cos(l*(C-30))+.24*Math.cos(l*2*C)+.32*Math.cos(l*(3*C+6))-.2*Math.cos(l*(4*C-63)),ee=a-n,T=_-g,E=2*Math.sin(l*x/2)*(g*_)**.5,D=1+.015*(d-50)**2/(20+(d-50)**2)**.5,te=1+.045*v,ne=1+.015*v*w,re=30*Math.exp(-1*((C-275)/25)**2),ie=-(2*(f/(f+25**7))**.5)*Math.sin(l*2*re);return((ee/1/D)**2+(T/1/te)**2+(E/1/ne)**2+ie*T*E/(1*te*1*ne))**.5}var Wp=/^#([0-9a-f]{3,8})$/i,Gp=e=>{let t=Wp.exec(e);if(!t)return null;let n=t[1];return n.length<=4?{r:Number.parseInt(n[0]+n[0],16),g:Number.parseInt(n[1]+n[1],16),b:Number.parseInt(n[2]+n[2],16),alpha:n.length===4?Df(Number.parseInt(n[3]+n[3],16)/255,2):1}:n.length===6||n.length===8?{r:Number.parseInt(n.slice(0,2),16),g:Number.parseInt(n.slice(2,4),16),b:Number.parseInt(n.slice(4,6),16),alpha:n.length===8?Df(Number.parseInt(n.slice(6,8),16)/255,2):1}:null},Kp=e=>{let t=Math.round(e).toString(16);return t.length<2?`0${t}`:t},qp=e=>{let{r:t,g:n,b:r,alpha:i}=Uf(e),a=i<1?Kp(Df(i*255)):``;return`#${Kp(t)}${Kp(n)}${Kp(r)}${a}`},Jp=e=>{let{l:t,c:n,h:r,alpha:i}=e;return{l:Of(t,0,1),c:Of(n,0,.37),h:kf(r),alpha:Of(i)}},Yp=e=>{let{l:t,c:n,h:r,alpha:i}=e;return{l:Df(t,3),c:Df(n,3),h:Df(r,3),alpha:Df(i,3)}},Xp=e=>{let{l:t,c:n,h:r,alpha:i}=e,a=r*Math.PI/180,[o,s,c]=jf(Ff,jf(Lf,[t,n*Math.cos(a),n*Math.sin(a)]).map(e=>e*e*e));return{r:o,g:s,b:c,alpha:i}},Zp=(e,t=1e-6)=>e.r>=-t&&e.r<=1+t&&e.g>=-t&&e.g<=1+t&&e.b>=-t&&e.b<=1+t,Qp=(e,t,n)=>{let r=0,i=.37,a=1e-5;if(Zp(Xp({l:e,c:i,h:t,alpha:n}),a))return i;for(;i-r>a;){let o=(r+i)/2;Zp(Xp({l:e,c:o,h:t,alpha:n}),a)?r=o:i=o}return r},$p=e=>{let{l:t,h:n,alpha:r}=e,i=Xp(e);return Zp(i)||(i=Xp({l:t,c:Qp(t,n,r),h:n,alpha:r})),i=Wf(i),Hf(Yf(i))},em=e=>{let t=Jf(e),[n,r,i]=jf(If,jf(Pf,[t.r,t.g,t.b]).map(e=>Math.cbrt(e))),a=Math.sqrt(r*r+i*i),o;return a<1e-4?o=0:(o=180/Math.PI*Math.atan2(i,r),o<0&&(o+=360)),Jp({l:n,c:a,h:o,alpha:e.alpha})},tm=({l:e,c:t,h:n,alpha:r=1})=>!Ef(e)||!Ef(t)||!Ef(n)?null:Jp({l:Number(e),c:Number(t),h:Number(n),alpha:Number(r)}),nm=e=>{let t=tm(e);return t?$p(t):null},rm=/^oklch\(\s*([+-]?[\d.]+)%?\s+([+-]?[\d.]+)\s+([+-]?[\d.]+)(deg|grad|rad|turn)?(?:\s*\/\s*([+-]?[\d.]+%?))?\s*\)$/i,im=e=>{let t=rm.exec(e);if(!t)return null;let[n,r,i,a,o,s]=t;return Jp({l:Nf(r),c:Number.parseFloat(i),h:Af(a,o),alpha:Mf(s)})},am=e=>{let t=im(e);return t?$p(t):null},om=e=>{let{l:t,c:n,h:r,alpha:i}=Yp(e),a=Df(t*100,1);return i<1?`oklch(${a}% ${n} ${r} / ${i})`:`oklch(${a}% ${n} ${r})`},sm=e=>om(em(e)),cm=e=>{if(!e||e.format!==`oklch`)return null;let{input:t}=e;return typeof t==`string`?im(t):typeof t==`object`?tm(t):null},lm=e=>{let t=cm(e);return t?om(t):null},um={string:[[Gp,`hex`],[Zf,`rgb`],[Lp,`hsl`],[am,`oklch`]],object:[[Gf,`rgb`],[Pp,`hsl`],[rp,`hsv`],[nm,`oklch`]]},dm=(e,t)=>{for(let n=0;n<t.length;n+=1){let r=t[n][0](e);if(r)return[r,t[n][1]]}return[null,void 0]},fm=e=>typeof e==`string`?dm(e.trim(),um.string):typeof e==`object`&&e?dm(e,um.object):[null,void 0],pm=e=>e instanceof mm?e:new mm(e),mm=class{parsed;rgb;source;constructor(e){let[t,n]=fm(e);this.parsed=t,this.rgb=this.parsed||{r:0,g:0,b:0,alpha:1},n&&this.parsed&&(this.source={format:n,input:e})}getSource(){return this.source}isValid(){return this.parsed!==null}brightness(){return Df(Hp(this.rgb),2)}isDark(){return Hp(this.rgb)<.5}isLight(){return Hp(this.rgb)>=.5}toHex(){return qp(this.rgb)}toRgb(){return Uf(this.rgb)}toRgbString(){return $f(this.rgb)}toHsl(){return kp(Np(this.rgb))}toHslString(){return Fp(this.rgb)}toHsv(){return tp(ip(this.rgb))}toOklch(){return Yp(cm(this.getSource())||em(this.rgb))}toOklchString(){return lm(this.getSource())||sm(this.rgb)}invert(){return pm(zp(this.rgb))}saturate(e=.1){return pm(Vp(this.rgb,e))}desaturate(e=.1){return pm(Vp(this.rgb,-e))}grayscale(){return pm(Vp(this.rgb,-1))}lighten(e=.1){return pm(Bp(this.rgb,e))}darken(e=.1){return pm(Bp(this.rgb,-e))}rotate(e=15){return this.hue(this.hue()+e)}alpha(e){return typeof e==`number`?pm(Rp(this.rgb,e)):Df(this.rgb.alpha,3)}hue(e){let t=Np(this.rgb);return typeof e==`number`?pm({h:e,s:t.s,l:t.l,alpha:t.alpha}):Df(t.h)}isEqual(e){return this.toHex()===pm(e).toHex()}},hm=[],gm=e=>{e.forEach(e=>{hm.includes(e)||(e(mm,um),hm.push(e))})},_m=P({name:`Button`,__name:`button`,props:{type:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{default:`button`}},emits:[`click`],setup(e,{emit:t}){let n=e,r=t,i=U(()=>n.as===`button`?n.disabled:void 0),a=Yd(n,[`disabled`,`type`],()=>i.value?{tabindex:`-1`}:{}),o=U(()=>n.disabled?``:void 0),s=U(()=>n.disabled?void 0:``),c=U(()=>n.disabled?!0:void 0),l=U(()=>{if(n.as===`button`)return n.type??`button`}),u=e=>{n.disabled?(e.preventDefault(),e.stopPropagation()):r(`click`,e)};return(e,t)=>(I(),R(M(vf),eo(M(a),{"data-vean-button":``,disabled:i.value,"aria-disabled":c.value,"data-disabled":o.value,"data-normal":s.value,type:l.value,onClick:u}),{default:Yn(()=>[hi(e.$slots,`default`)]),_:3},16,[`disabled`,`aria-disabled`,`data-disabled`,`data-normal`,`type`]))}}),vm=(e,t)=>{e.prototype.toLab=function(){return dp(Ep(this.getSource())||fp(this.rgb))},e.prototype.toLabString=function(){return Dp(this.getSource())||Tp(this.rgb)},e.prototype.delta=function(t=`#FFF`){let n=t instanceof e?t:new e(t);return Of(Df(Up(this.toLab(),n.toLab())/100,3))},t.string.push([Cp,`lab`]),t.object.push([bp,`lab`])},ym=[50,100,200,300,400,500,600,700,800,900,950],bm={inherit:`inherit`,current:`currentColor`,transparent:`transparent`,black:{hex:`#000000`,rgb:`rgb(0 0 0)`,hsl:`hsl(0 0% 0%)`,oklch:`oklch(0% 0 0)`},white:{hex:`#ffffff`,rgb:`rgb(255 255 255)`,hsl:`hsl(0 0% 100%)`,oklch:`oklch(100% 0 0)`}},xm={slate:{50:{level:50,hex:`#f8fafc`,rgb:`rgb(248 250 252)`,hsl:`hsl(210 40% 98%)`,oklch:`oklch(98% 0 248)`},100:{level:100,hex:`#f1f5f9`,rgb:`rgb(241 245 249)`,hsl:`hsl(210 40% 96.1%)`,oklch:`oklch(97% 0.01 248)`},200:{level:200,hex:`#e2e8f0`,rgb:`rgb(226 232 240)`,hsl:`hsl(214.3 31.8% 91.4%)`,oklch:`oklch(93% 0.01 256)`},300:{level:300,hex:`#cbd5e1`,rgb:`rgb(203 213 225)`,hsl:`hsl(212.7 26.8% 83.9%)`,oklch:`oklch(87% 0.02 253)`},400:{level:400,hex:`#94a3b8`,rgb:`rgb(148 163 184)`,hsl:`hsl(215 20.2% 65.1%)`,oklch:`oklch(71% 0.04 257)`},500:{level:500,hex:`#64748b`,rgb:`rgb(100 116 139)`,hsl:`hsl(215.4 16.3% 46.9%)`,oklch:`oklch(55% 0.04 257)`},600:{level:600,hex:`#475569`,rgb:`rgb(71 85 105)`,hsl:`hsl(215.3 19.3% 34.5%)`,oklch:`oklch(45% 0.04 257)`},700:{level:700,hex:`#334155`,rgb:`rgb(51 65 85)`,hsl:`hsl(215.3 25% 26.7%)`,oklch:`oklch(37% 0.04 257)`},800:{level:800,hex:`#1e293b`,rgb:`rgb(30 41 59)`,hsl:`hsl(217.2 32.6% 17.5%)`,oklch:`oklch(28% 0.04 260)`},900:{level:900,hex:`#0f172a`,rgb:`rgb(15 23 42)`,hsl:`hsl(222.2 47.4% 11.2%)`,oklch:`oklch(21% 0.04 266)`},950:{level:950,hex:`#020617`,rgb:`rgb(2 6 23)`,hsl:`hsl(222.2 84% 4.9%)`,oklch:`oklch(13% 0.04 265)`}},mist:{50:{level:50,hex:`#f9fafb`,rgb:`rgb(249 250 251)`,hsl:`hsl(189.3 20.3% 97.9%)`,oklch:`oklch(98% 0 210)`},100:{level:100,hex:`#f0f4f5`,rgb:`rgb(240 244 245)`,hsl:`hsl(189.4 21.6% 95.1%)`,oklch:`oklch(96% 0.01 210)`},200:{level:200,hex:`#dce5e6`,rgb:`rgb(220 229 230)`,hsl:`hsl(189.4 16.2% 88.4%)`,oklch:`oklch(92% 0.01 210)`},300:{level:300,hex:`#c1cfd2`,rgb:`rgb(193 207 210)`,hsl:`hsl(189.4 15.8% 79%)`,oklch:`oklch(84% 0.02 210)`},400:{level:400,hex:`#8da5a9`,rgb:`rgb(141 165 169)`,hsl:`hsl(189.3 14% 60.9%)`,oklch:`oklch(70% 0.03 210)`},500:{level:500,hex:`#648085`,rgb:`rgb(100 128 133)`,hsl:`hsl(189.3 14.2% 45.7%)`,oklch:`oklch(58% 0.03 210)`},600:{level:600,hex:`#4f676b`,rgb:`rgb(79 103 107)`,hsl:`hsl(189.3 15.1% 36.5%)`,oklch:`oklch(49% 0.03 210)`},700:{level:700,hex:`#3d5155`,rgb:`rgb(61 81 85)`,hsl:`hsl(189.3 15.9% 28.6%)`,oklch:`oklch(42% 0.03 210)`},800:{level:800,hex:`#2d3c3f`,rgb:`rgb(45 60 63)`,hsl:`hsl(189.3 17.2% 21.2%)`,oklch:`oklch(34% 0.02 210)`},900:{level:900,hex:`#1e2a2c`,rgb:`rgb(30 42 44)`,hsl:`hsl(189.3 19.2% 14.6%)`,oklch:`oklch(28% 0.02 210)`},950:{level:950,hex:`#0e1517`,rgb:`rgb(14 21 23)`,hsl:`hsl(189.3 25.3% 7.1%)`,oklch:`oklch(19% 0.01 210)`}},gray:{50:{level:50,hex:`#f9fafb`,rgb:`rgb(249 250 251)`,hsl:`hsl(210 20% 98%)`,oklch:`oklch(98% 0 248)`},100:{level:100,hex:`#f3f4f6`,rgb:`rgb(243 244 246)`,hsl:`hsl(220 14.3% 95.9%)`,oklch:`oklch(97% 0 265)`},200:{level:200,hex:`#e5e7eb`,rgb:`rgb(229 231 235)`,hsl:`hsl(220 13% 91%)`,oklch:`oklch(93% 0.01 265)`},300:{level:300,hex:`#d1d5db`,rgb:`rgb(209 213 219)`,hsl:`hsl(216 12.2% 83.9%)`,oklch:`oklch(87% 0.01 258)`},400:{level:400,hex:`#9ca3af`,rgb:`rgb(156 163 175)`,hsl:`hsl(217.9 10.6% 64.9%)`,oklch:`oklch(71% 0.02 261)`},500:{level:500,hex:`#6b7280`,rgb:`rgb(107 114 128)`,hsl:`hsl(220 8.9% 46.1%)`,oklch:`oklch(55% 0.02 264)`},600:{level:600,hex:`#4b5563`,rgb:`rgb(75 85 99)`,hsl:`hsl(215 13.8% 34.1%)`,oklch:`oklch(45% 0.03 257)`},700:{level:700,hex:`#374151`,rgb:`rgb(55 65 81)`,hsl:`hsl(216.9 19.1% 26.7%)`,oklch:`oklch(37% 0.03 260)`},800:{level:800,hex:`#1f2937`,rgb:`rgb(31 41 55)`,hsl:`hsl(215 27.9% 16.9%)`,oklch:`oklch(28% 0.03 257)`},900:{level:900,hex:`#111827`,rgb:`rgb(17 24 39)`,hsl:`hsl(220.9 39.3% 11%)`,oklch:`oklch(21% 0.03 265)`},950:{level:950,hex:`#030712`,rgb:`rgb(3 7 18)`,hsl:`hsl(224 71.4% 4.1%)`,oklch:`oklch(13% 0.03 262)`}},zinc:{50:{level:50,hex:`#fafafa`,rgb:`rgb(250 250 250)`,hsl:`hsl(0 0% 98%)`,oklch:`oklch(99% 0 360)`},100:{level:100,hex:`#f4f4f5`,rgb:`rgb(244 244 245)`,hsl:`hsl(240 4.8% 95.9%)`,oklch:`oklch(97% 0 286)`},200:{level:200,hex:`#e4e4e7`,rgb:`rgb(228 228 231)`,hsl:`hsl(240 5.9% 90%)`,oklch:`oklch(92% 0 286)`},300:{level:300,hex:`#d4d4d8`,rgb:`rgb(212 212 216)`,hsl:`hsl(240 4.9% 83.9%)`,oklch:`oklch(87% 0.01 286)`},400:{level:400,hex:`#a1a1aa`,rgb:`rgb(161 161 170)`,hsl:`hsl(240 5% 64.9%)`,oklch:`oklch(71% 0.01 286)`},500:{level:500,hex:`#71717a`,rgb:`rgb(113 113 122)`,hsl:`hsl(240 3.8% 46.1%)`,oklch:`oklch(55% 0.01 286)`},600:{level:600,hex:`#52525b`,rgb:`rgb(82 82 91)`,hsl:`hsl(240 5.2% 33.9%)`,oklch:`oklch(44% 0.01 286)`},700:{level:700,hex:`#3f3f46`,rgb:`rgb(63 63 70)`,hsl:`hsl(240 5.3% 26.1%)`,oklch:`oklch(37% 0.01 286)`},800:{level:800,hex:`#27272a`,rgb:`rgb(39 39 42)`,hsl:`hsl(240 3.7% 15.9%)`,oklch:`oklch(27% 0.01 286)`},900:{level:900,hex:`#18181b`,rgb:`rgb(24 24 27)`,hsl:`hsl(240 5.9% 10%)`,oklch:`oklch(21% 0.01 286)`},950:{level:950,hex:`#09090b`,rgb:`rgb(9 9 11)`,hsl:`hsl(240 10% 3.9%)`,oklch:`oklch(14% 0 286)`}},neutral:{50:{level:50,hex:`#fafafa`,rgb:`rgb(250 250 250)`,hsl:`hsl(0 0% 98%)`,oklch:`oklch(99% 0 360)`},100:{level:100,hex:`#f5f5f5`,rgb:`rgb(245 245 245)`,hsl:`hsl(0 0% 96.1%)`,oklch:`oklch(97% 0 360)`},200:{level:200,hex:`#e5e5e5`,rgb:`rgb(229 229 229)`,hsl:`hsl(0 0% 89.8%)`,oklch:`oklch(92% 0 360)`},300:{level:300,hex:`#d4d4d4`,rgb:`rgb(212 212 212)`,hsl:`hsl(0 0% 83.1%)`,oklch:`oklch(87% 0 360)`},400:{level:400,hex:`#a3a3a3`,rgb:`rgb(163 163 163)`,hsl:`hsl(0 0% 63.9%)`,oklch:`oklch(72% 0 360)`},500:{level:500,hex:`#737373`,rgb:`rgb(115 115 115)`,hsl:`hsl(0 0% 45.1%)`,oklch:`oklch(56% 0 360)`},600:{level:600,hex:`#525252`,rgb:`rgb(82 82 82)`,hsl:`hsl(0 0% 32.2%)`,oklch:`oklch(44% 0 360)`},700:{level:700,hex:`#404040`,rgb:`rgb(64 64 64)`,hsl:`hsl(0 0% 25.1%)`,oklch:`oklch(37% 0 360)`},800:{level:800,hex:`#262626`,rgb:`rgb(38 38 38)`,hsl:`hsl(0 0% 14.9%)`,oklch:`oklch(27% 0 360)`},900:{level:900,hex:`#171717`,rgb:`rgb(23 23 23)`,hsl:`hsl(0 0% 9%)`,oklch:`oklch(20% 0 360)`},950:{level:950,hex:`#0a0a0a`,rgb:`rgb(10 10 10)`,hsl:`hsl(0 0% 3.9%)`,oklch:`oklch(14% 0 360)`}},stone:{50:{level:50,hex:`#fafaf9`,rgb:`rgb(250 250 249)`,hsl:`hsl(60 9.1% 97.8%)`,oklch:`oklch(98% 0 106)`},100:{level:100,hex:`#f5f5f4`,rgb:`rgb(245 245 244)`,hsl:`hsl(60 4.8% 95.9%)`,oklch:`oklch(97% 0 106)`},200:{level:200,hex:`#e7e5e4`,rgb:`rgb(231 229 228)`,hsl:`hsl(20 5.9% 90%)`,oklch:`oklch(92% 0 49)`},300:{level:300,hex:`#d6d3d1`,rgb:`rgb(214 211 209)`,hsl:`hsl(24 5.7% 82.9%)`,oklch:`oklch(87% 0 56)`},400:{level:400,hex:`#a8a29e`,rgb:`rgb(168 162 158)`,hsl:`hsl(24 5.4% 63.9%)`,oklch:`oklch(72% 0.01 56)`},500:{level:500,hex:`#78716c`,rgb:`rgb(120 113 108)`,hsl:`hsl(25 5.3% 44.7%)`,oklch:`oklch(55% 0.01 58)`},600:{level:600,hex:`#57534e`,rgb:`rgb(87 83 78)`,hsl:`hsl(33.3 5.5% 32.4%)`,oklch:`oklch(44% 0.01 74)`},700:{level:700,hex:`#44403c`,rgb:`rgb(68 64 60)`,hsl:`hsl(30 6.3% 25.1%)`,oklch:`oklch(37% 0.01 68)`},800:{level:800,hex:`#292524`,rgb:`rgb(41 37 36)`,hsl:`hsl(12 6.5% 15.1%)`,oklch:`oklch(27% 0.01 34)`},900:{level:900,hex:`#1c1917`,rgb:`rgb(28 25 23)`,hsl:`hsl(24 9.8% 10%)`,oklch:`oklch(22% 0.01 56)`},950:{level:950,hex:`#0c0a09`,rgb:`rgb(12 10 9)`,hsl:`hsl(20 14.3% 4.1%)`,oklch:`oklch(15% 0 49)`}},taupe:{50:{level:50,hex:`#fbfaf9`,rgb:`rgb(251 250 249)`,hsl:`hsl(34 21.3% 97.9%)`,oklch:`oklch(98% 0 75)`},100:{level:100,hex:`#f5f3f0`,rgb:`rgb(245 243 240)`,hsl:`hsl(34 22.7% 95.1%)`,oklch:`oklch(96% 0.01 75)`},200:{level:200,hex:`#e7e2dc`,rgb:`rgb(231 226 220)`,hsl:`hsl(34.1 18.7% 88.4%)`,oklch:`oklch(92% 0.01 75)`},300:{level:300,hex:`#d3cbc0`,rgb:`rgb(211 203 192)`,hsl:`hsl(34.1 18.3% 79%)`,oklch:`oklch(84% 0.02 75)`},400:{level:400,hex:`#aa9e8d`,rgb:`rgb(170 158 141)`,hsl:`hsl(34.2 14.8% 61.1%)`,oklch:`oklch(70% 0.03 75)`},500:{level:500,hex:`#867865`,rgb:`rgb(134 120 101)`,hsl:`hsl(34.3 14.1% 46.1%)`,oklch:`oklch(58% 0.03 75)`},600:{level:600,hex:`#6c6050`,rgb:`rgb(108 96 80)`,hsl:`hsl(34.3 14.9% 36.8%)`,oklch:`oklch(49% 0.03 75)`},700:{level:700,hex:`#554b3e`,rgb:`rgb(85 75 62)`,hsl:`hsl(34.3 15.7% 28.9%)`,oklch:`oklch(42% 0.03 75)`},800:{level:800,hex:`#40382d`,rgb:`rgb(64 56 45)`,hsl:`hsl(34.3 17% 21.4%)`,oklch:`oklch(34% 0.02 75)`},900:{level:900,hex:`#2c271f`,rgb:`rgb(44 39 31)`,hsl:`hsl(34.3 17.7% 14.8%)`,oklch:`oklch(28% 0.02 75)`},950:{level:950,hex:`#17130e`,rgb:`rgb(23 19 14)`,hsl:`hsl(34.4 24.8% 7.2%)`,oklch:`oklch(19% 0.01 75)`}},olive:{50:{level:50,hex:`#f9faf9`,rgb:`rgb(249 250 249)`,hsl:`hsl(136.8 13.4% 97.9%)`,oklch:`oklch(98% 0 155)`},100:{level:100,hex:`#f1f4f2`,rgb:`rgb(241 244 242)`,hsl:`hsl(136.9 14.2% 95.2%)`,oklch:`oklch(96% 0.01 155)`},200:{level:200,hex:`#dee5e0`,rgb:`rgb(222 229 224)`,hsl:`hsl(137 10.6% 88.5%)`,oklch:`oklch(92% 0.01 155)`},300:{level:300,hex:`#c4cfc8`,rgb:`rgb(196 207 200)`,hsl:`hsl(137.2 10.3% 79.2%)`,oklch:`oklch(84% 0.02 155)`},400:{level:400,hex:`#94a599`,rgb:`rgb(148 165 153)`,hsl:`hsl(137.8 8.7% 61.4%)`,oklch:`oklch(70% 0.03 155)`},500:{level:500,hex:`#6c8072`,rgb:`rgb(108 128 114)`,hsl:`hsl(138.4 8.6% 46.3%)`,oklch:`oklch(58% 0.03 155)`},600:{level:600,hex:`#56675b`,rgb:`rgb(86 103 91)`,hsl:`hsl(138.4 9.1% 37%)`,oklch:`oklch(49% 0.03 155)`},700:{level:700,hex:`#435147`,rgb:`rgb(67 81 71)`,hsl:`hsl(138.4 9.5% 29.1%)`,oklch:`oklch(42% 0.02 155)`},800:{level:800,hex:`#313c35`,rgb:`rgb(49 60 53)`,hsl:`hsl(138.4 10.2% 21.5%)`,oklch:`oklch(34% 0.02 155)`},900:{level:900,hex:`#222a24`,rgb:`rgb(34 42 36)`,hsl:`hsl(138.5 11.2% 14.8%)`,oklch:`oklch(28% 0.02 155)`},950:{level:950,hex:`#101512`,rgb:`rgb(16 21 18)`,hsl:`hsl(138.4 14.2% 7.3%)`,oklch:`oklch(19% 0.01 155)`}},mauve:{50:{level:50,hex:`#fafafb`,rgb:`rgb(250 250 251)`,hsl:`hsl(272.4 15% 98.2%)`,oklch:`oklch(98% 0 310)`},100:{level:100,hex:`#f4f2f6`,rgb:`rgb(244 242 246)`,hsl:`hsl(272.4 16.1% 95.8%)`,oklch:`oklch(96% 0.01 310)`},200:{level:200,hex:`#e5e1e8`,rgb:`rgb(229 225 232)`,hsl:`hsl(272.5 13% 89.6%)`,oklch:`oklch(92% 0.01 310)`},300:{level:300,hex:`#d0c9d5`,rgb:`rgb(208 201 213)`,hsl:`hsl(272.6 12.6% 81.2%)`,oklch:`oklch(84% 0.02 310)`},400:{level:400,hex:`#a69bae`,rgb:`rgb(166 155 174)`,hsl:`hsl(272.9 10.6% 64.6%)`,oklch:`oklch(70% 0.03 310)`},500:{level:500,hex:`#81758b`,rgb:`rgb(129 117 139)`,hsl:`hsl(273.2 8.6% 50.1%)`,oklch:`oklch(58% 0.04 310)`},600:{level:600,hex:`#675d70`,rgb:`rgb(103 93 112)`,hsl:`hsl(273.2 9.2% 40.2%)`,oklch:`oklch(49% 0.03 310)`},700:{level:700,hex:`#524959`,rgb:`rgb(82 73 89)`,hsl:`hsl(273.3 9.7% 31.7%)`,oklch:`oklch(42% 0.03 310)`},800:{level:800,hex:`#3d3642`,rgb:`rgb(61 54 66)`,hsl:`hsl(273.3 10.2% 23.6%)`,oklch:`oklch(34% 0.02 310)`},900:{level:900,hex:`#2a252e`,rgb:`rgb(42 37 46)`,hsl:`hsl(273.3 10.9% 16.4%)`,oklch:`oklch(28% 0.02 310)`},950:{level:950,hex:`#161218`,rgb:`rgb(22 18 24)`,hsl:`hsl(273.3 14.1% 8.3%)`,oklch:`oklch(19% 0.01 310)`}},red:{50:{level:50,hex:`#fef2f2`,rgb:`rgb(254 242 242)`,hsl:`hsl(0 85.7% 97.3%)`,oklch:`oklch(97% 0.01 17)`},100:{level:100,hex:`#fee2e2`,rgb:`rgb(254 226 226)`,hsl:`hsl(0 93.3% 94.1%)`,oklch:`oklch(94% 0.03 18)`},200:{level:200,hex:`#fecaca`,rgb:`rgb(254 202 202)`,hsl:`hsl(0 96.3% 89.4%)`,oklch:`oklch(88% 0.06 18)`},300:{level:300,hex:`#fca5a5`,rgb:`rgb(252 165 165)`,hsl:`hsl(0 93.5% 81.8%)`,oklch:`oklch(81% 0.1 20)`},400:{level:400,hex:`#f87171`,rgb:`rgb(248 113 113)`,hsl:`hsl(0 90.6% 70.8%)`,oklch:`oklch(71% 0.17 22)`},500:{level:500,hex:`#ef4444`,rgb:`rgb(239 68 68)`,hsl:`hsl(0 84.2% 60.2%)`,oklch:`oklch(64% 0.21 25)`},600:{level:600,hex:`#dc2626`,rgb:`rgb(220 38 38)`,hsl:`hsl(0 72.2% 50.6%)`,oklch:`oklch(58% 0.22 27)`},700:{level:700,hex:`#b91c1c`,rgb:`rgb(185 28 28)`,hsl:`hsl(0 73.7% 41.8%)`,oklch:`oklch(51% 0.19 28)`},800:{level:800,hex:`#991b1b`,rgb:`rgb(153 27 27)`,hsl:`hsl(0 70% 35.3%)`,oklch:`oklch(44% 0.16 27)`},900:{level:900,hex:`#7f1d1d`,rgb:`rgb(127 29 29)`,hsl:`hsl(0 62.8% 30.6%)`,oklch:`oklch(40% 0.13 26)`},950:{level:950,hex:`#450a0a`,rgb:`rgb(69 10 10)`,hsl:`hsl(0 74.7% 15.5%)`,oklch:`oklch(26% 0.09 26)`}},orange:{50:{level:50,hex:`#fff7ed`,rgb:`rgb(255 247 237)`,hsl:`hsl(33.3 100% 96.5%)`,oklch:`oklch(98% 0.02 74)`},100:{level:100,hex:`#ffedd5`,rgb:`rgb(255 237 213)`,hsl:`hsl(34.3 100% 91.8%)`,oklch:`oklch(95% 0.04 75)`},200:{level:200,hex:`#fed7aa`,rgb:`rgb(254 215 170)`,hsl:`hsl(32.1 97.7% 83.1%)`,oklch:`oklch(90% 0.07 71)`},300:{level:300,hex:`#fdba74`,rgb:`rgb(253 186 116)`,hsl:`hsl(30.7 97.2% 72.4%)`,oklch:`oklch(84% 0.12 66)`},400:{level:400,hex:`#fb923c`,rgb:`rgb(251 146 60)`,hsl:`hsl(27 96% 61%)`,oklch:`oklch(76% 0.16 56)`},500:{level:500,hex:`#f97316`,rgb:`rgb(249 115 22)`,hsl:`hsl(24.6 95% 53.1%)`,oklch:`oklch(70% 0.19 48)`},600:{level:600,hex:`#ea580c`,rgb:`rgb(234 88 12)`,hsl:`hsl(20.5 90.2% 48.2%)`,oklch:`oklch(65% 0.19 41)`},700:{level:700,hex:`#c2410c`,rgb:`rgb(194 65 12)`,hsl:`hsl(17.5 88.3% 40.4%)`,oklch:`oklch(55% 0.17 38)`},800:{level:800,hex:`#9a3412`,rgb:`rgb(154 52 18)`,hsl:`hsl(15 79.1% 33.7%)`,oklch:`oklch(47% 0.14 37)`},900:{level:900,hex:`#7c2d12`,rgb:`rgb(124 45 18)`,hsl:`hsl(15.3 74.6% 27.8%)`,oklch:`oklch(41% 0.12 38)`},950:{level:950,hex:`#431407`,rgb:`rgb(67 20 7)`,hsl:`hsl(13 81.1% 14.5%)`,oklch:`oklch(27% 0.08 36)`}},amber:{50:{level:50,hex:`#fffbeb`,rgb:`rgb(255 251 235)`,hsl:`hsl(48 100% 96.1%)`,oklch:`oklch(99% 0.02 95)`},100:{level:100,hex:`#fef3c7`,rgb:`rgb(254 243 199)`,hsl:`hsl(48 96.5% 88.8%)`,oklch:`oklch(96% 0.06 96)`},200:{level:200,hex:`#fde68a`,rgb:`rgb(253 230 138)`,hsl:`hsl(48 96.6% 76.7%)`,oklch:`oklch(92% 0.12 96)`},300:{level:300,hex:`#fcd34d`,rgb:`rgb(252 211 77)`,hsl:`hsl(45.9 96.7% 64.5%)`,oklch:`oklch(88% 0.15 92)`},400:{level:400,hex:`#fbbf24`,rgb:`rgb(251 191 36)`,hsl:`hsl(43.3 96.4% 56.3%)`,oklch:`oklch(84% 0.16 84)`},500:{level:500,hex:`#f59e0b`,rgb:`rgb(245 158 11)`,hsl:`hsl(37.7 92.1% 50.2%)`,oklch:`oklch(77% 0.16 70)`},600:{level:600,hex:`#d97706`,rgb:`rgb(217 119 6)`,hsl:`hsl(32.1 94.6% 43.7%)`,oklch:`oklch(67% 0.16 58)`},700:{level:700,hex:`#b45309`,rgb:`rgb(180 83 9)`,hsl:`hsl(26 90.5% 37.1%)`,oklch:`oklch(56% 0.15 49)`},800:{level:800,hex:`#92400e`,rgb:`rgb(146 64 14)`,hsl:`hsl(22.7 82.5% 31.4%)`,oklch:`oklch(47% 0.12 46)`},900:{level:900,hex:`#78350f`,rgb:`rgb(120 53 15)`,hsl:`hsl(21.7 77.8% 26.5%)`,oklch:`oklch(41% 0.11 46)`},950:{level:950,hex:`#451a03`,rgb:`rgb(69 26 3)`,hsl:`hsl(20.9 91.7% 14.1%)`,oklch:`oklch(28% 0.07 46)`}},yellow:{50:{level:50,hex:`#fefce8`,rgb:`rgb(254 252 232)`,hsl:`hsl(54.5 91.7% 95.3%)`,oklch:`oklch(99% 0.03 102)`},100:{level:100,hex:`#fef9c3`,rgb:`rgb(254 249 195)`,hsl:`hsl(54.9 96.7% 88%)`,oklch:`oklch(97% 0.07 103)`},200:{level:200,hex:`#fef08a`,rgb:`rgb(254 240 138)`,hsl:`hsl(52.8 98.3% 76.9%)`,oklch:`oklch(95% 0.12 102)`},300:{level:300,hex:`#fde047`,rgb:`rgb(253 224 71)`,hsl:`hsl(50.4 97.8% 63.5%)`,oklch:`oklch(91% 0.17 98)`},400:{level:400,hex:`#facc15`,rgb:`rgb(250 204 21)`,hsl:`hsl(47.9 95.8% 53.1%)`,oklch:`oklch(86% 0.17 92)`},500:{level:500,hex:`#eab308`,rgb:`rgb(234 179 8)`,hsl:`hsl(45.4 93.4% 47.5%)`,oklch:`oklch(80% 0.16 86)`},600:{level:600,hex:`#ca8a04`,rgb:`rgb(202 138 4)`,hsl:`hsl(40.6 96.1% 40.4%)`,oklch:`oklch(68% 0.14 76)`},700:{level:700,hex:`#a16207`,rgb:`rgb(161 98 7)`,hsl:`hsl(35.5 91.7% 32.9%)`,oklch:`oklch(55% 0.12 66)`},800:{level:800,hex:`#854d0e`,rgb:`rgb(133 77 14)`,hsl:`hsl(31.8 81% 28.8%)`,oklch:`oklch(48% 0.1 62)`},900:{level:900,hex:`#713f12`,rgb:`rgb(113 63 18)`,hsl:`hsl(28.4 72.5% 25.7%)`,oklch:`oklch(42% 0.09 58)`},950:{level:950,hex:`#422006`,rgb:`rgb(66 32 6)`,hsl:`hsl(26 83.3% 14.1%)`,oklch:`oklch(29% 0.06 54)`}},lime:{50:{level:50,hex:`#f7fee7`,rgb:`rgb(247 254 231)`,hsl:`hsl(78.3 92% 95.1%)`,oklch:`oklch(99% 0.03 121)`},100:{level:100,hex:`#ecfccb`,rgb:`rgb(236 252 203)`,hsl:`hsl(79.6 89.1% 89.2%)`,oklch:`oklch(97% 0.07 122)`},200:{level:200,hex:`#d9f99d`,rgb:`rgb(217 249 157)`,hsl:`hsl(80.9 88.5% 79.6%)`,oklch:`oklch(94% 0.12 124)`},300:{level:300,hex:`#bef264`,rgb:`rgb(190 242 100)`,hsl:`hsl(82 84.5% 67.1%)`,oklch:`oklch(90% 0.18 127)`},400:{level:400,hex:`#a3e635`,rgb:`rgb(163 230 53)`,hsl:`hsl(82.7 78% 55.5%)`,oklch:`oklch(85% 0.21 129)`},500:{level:500,hex:`#84cc16`,rgb:`rgb(132 204 22)`,hsl:`hsl(83.7 80.5% 44.3%)`,oklch:`oklch(77% 0.2 131)`},600:{level:600,hex:`#65a30d`,rgb:`rgb(101 163 13)`,hsl:`hsl(84.8 85.2% 34.5%)`,oklch:`oklch(65% 0.18 132)`},700:{level:700,hex:`#4d7c0f`,rgb:`rgb(77 124 15)`,hsl:`hsl(85.9 78.4% 27.3%)`,oklch:`oklch(53% 0.14 132)`},800:{level:800,hex:`#3f6212`,rgb:`rgb(63 98 18)`,hsl:`hsl(86.3 69% 22.7%)`,oklch:`oklch(45% 0.11 131)`},900:{level:900,hex:`#365314`,rgb:`rgb(54 83 20)`,hsl:`hsl(87.6 61.2% 20.2%)`,oklch:`oklch(41% 0.1 131)`},950:{level:950,hex:`#1a2e05`,rgb:`rgb(26 46 5)`,hsl:`hsl(89.3 80.4% 10%)`,oklch:`oklch(27% 0.07 132)`}},green:{50:{level:50,hex:`#f0fdf4`,rgb:`rgb(240 253 244)`,hsl:`hsl(138.5 76.5% 96.7%)`,oklch:`oklch(98% 0.02 156)`},100:{level:100,hex:`#dcfce7`,rgb:`rgb(220 252 231)`,hsl:`hsl(140.6 84.2% 92.5%)`,oklch:`oklch(96% 0.04 157)`},200:{level:200,hex:`#bbf7d0`,rgb:`rgb(187 247 208)`,hsl:`hsl(141 78.9% 85.1%)`,oklch:`oklch(93% 0.08 156)`},300:{level:300,hex:`#86efac`,rgb:`rgb(134 239 172)`,hsl:`hsl(141.7 76.6% 73.1%)`,oklch:`oklch(87% 0.14 154)`},400:{level:400,hex:`#4ade80`,rgb:`rgb(74 222 128)`,hsl:`hsl(141.9 69.2% 58%)`,oklch:`oklch(80% 0.18 152)`},500:{level:500,hex:`#22c55e`,rgb:`rgb(34 197 94)`,hsl:`hsl(142.1 70.6% 45.3%)`,oklch:`oklch(72% 0.19 150)`},600:{level:600,hex:`#16a34a`,rgb:`rgb(22 163 74)`,hsl:`hsl(142.1 76.2% 36.3%)`,oklch:`oklch(63% 0.17 149)`},700:{level:700,hex:`#15803d`,rgb:`rgb(21 128 61)`,hsl:`hsl(142.4 71.8% 29.2%)`,oklch:`oklch(53% 0.14 150)`},800:{level:800,hex:`#166534`,rgb:`rgb(22 101 52)`,hsl:`hsl(142.8 64.2% 24.1%)`,oklch:`oklch(45% 0.11 151)`},900:{level:900,hex:`#14532d`,rgb:`rgb(20 83 45)`,hsl:`hsl(143.8 61.2% 20.2%)`,oklch:`oklch(39% 0.09 153)`},950:{level:950,hex:`#052e16`,rgb:`rgb(5 46 22)`,hsl:`hsl(144.9 80.4% 10%)`,oklch:`oklch(27% 0.06 153)`}},emerald:{50:{level:50,hex:`#ecfdf5`,rgb:`rgb(236 253 245)`,hsl:`hsl(151.8 81% 95.9%)`,oklch:`oklch(98% 0.02 166)`},100:{level:100,hex:`#d1fae5`,rgb:`rgb(209 250 229)`,hsl:`hsl(149.3 80.4% 90%)`,oklch:`oklch(95% 0.05 163)`},200:{level:200,hex:`#a7f3d0`,rgb:`rgb(167 243 208)`,hsl:`hsl(152.4 76% 80.4%)`,oklch:`oklch(90% 0.09 164)`},300:{level:300,hex:`#6ee7b7`,rgb:`rgb(110 231 183)`,hsl:`hsl(156.2 71.6% 66.9%)`,oklch:`oklch(85% 0.13 165)`},400:{level:400,hex:`#34d399`,rgb:`rgb(52 211 153)`,hsl:`hsl(158.1 64.4% 51.6%)`,oklch:`oklch(77% 0.15 163)`},500:{level:500,hex:`#10b981`,rgb:`rgb(16 185 129)`,hsl:`hsl(160.1 84.1% 39.4%)`,oklch:`oklch(70% 0.15 162)`},600:{level:600,hex:`#059669`,rgb:`rgb(5 150 105)`,hsl:`hsl(161.4 93.5% 30.4%)`,oklch:`oklch(60% 0.13 163)`},700:{level:700,hex:`#047857`,rgb:`rgb(4 120 87)`,hsl:`hsl(162.9 93.5% 24.3%)`,oklch:`oklch(51% 0.1 166)`},800:{level:800,hex:`#065f46`,rgb:`rgb(6 95 70)`,hsl:`hsl(163.1 88.1% 19.8%)`,oklch:`oklch(43% 0.09 167)`},900:{level:900,hex:`#064e3b`,rgb:`rgb(6 78 59)`,hsl:`hsl(164.2 85.7% 16.5%)`,oklch:`oklch(38% 0.07 169)`},950:{level:950,hex:`#022c22`,rgb:`rgb(2 44 34)`,hsl:`hsl(165.7 91.3% 9%)`,oklch:`oklch(26% 0.05 173)`}},teal:{50:{level:50,hex:`#f0fdfa`,rgb:`rgb(240 253 250)`,hsl:`hsl(166.2 76.5% 96.7%)`,oklch:`oklch(98% 0.01 181)`},100:{level:100,hex:`#ccfbf1`,rgb:`rgb(204 251 241)`,hsl:`hsl(167.2 85.5% 89.2%)`,oklch:`oklch(95% 0.05 181)`},200:{level:200,hex:`#99f6e4`,rgb:`rgb(153 246 228)`,hsl:`hsl(168.4 83.8% 78.2%)`,oklch:`oklch(91% 0.09 180)`},300:{level:300,hex:`#5eead4`,rgb:`rgb(94 234 212)`,hsl:`hsl(170.6 76.9% 64.3%)`,oklch:`oklch(85% 0.13 181)`},400:{level:400,hex:`#2dd4bf`,rgb:`rgb(45 212 191)`,hsl:`hsl(172.5 66% 50.4%)`,oklch:`oklch(78% 0.13 182)`},500:{level:500,hex:`#14b8a6`,rgb:`rgb(20 184 166)`,hsl:`hsl(173.4 80.4% 40%)`,oklch:`oklch(70% 0.12 183)`},600:{level:600,hex:`#0d9488`,rgb:`rgb(13 148 136)`,hsl:`hsl(174.7 83.9% 31.6%)`,oklch:`oklch(60% 0.1 185)`},700:{level:700,hex:`#0f766e`,rgb:`rgb(15 118 110)`,hsl:`hsl(175.3 77.4% 26.1%)`,oklch:`oklch(51% 0.09 186)`},800:{level:800,hex:`#115e59`,rgb:`rgb(17 94 89)`,hsl:`hsl(176.1 69.4% 21.8%)`,oklch:`oklch(44% 0.07 188)`},900:{level:900,hex:`#134e4a`,rgb:`rgb(19 78 74)`,hsl:`hsl(175.9 60.8% 19%)`,oklch:`oklch(39% 0.06 188)`},950:{level:950,hex:`#042f2e`,rgb:`rgb(4 47 46)`,hsl:`hsl(178.6 84.3% 10%)`,oklch:`oklch(28% 0.04 193)`}},cyan:{50:{level:50,hex:`#ecfeff`,rgb:`rgb(236 254 255)`,hsl:`hsl(183.2 100% 96.3%)`,oklch:`oklch(98% 0.02 201)`},100:{level:100,hex:`#cffafe`,rgb:`rgb(207 250 254)`,hsl:`hsl(185.1 95.9% 90.4%)`,oklch:`oklch(96% 0.04 203)`},200:{level:200,hex:`#a5f3fc`,rgb:`rgb(165 243 252)`,hsl:`hsl(186.2 93.5% 81.8%)`,oklch:`oklch(92% 0.08 205)`},300:{level:300,hex:`#67e8f9`,rgb:`rgb(103 232 249)`,hsl:`hsl(187 92.4% 69%)`,oklch:`oklch(87% 0.12 207)`},400:{level:400,hex:`#22d3ee`,rgb:`rgb(34 211 238)`,hsl:`hsl(187.9 85.7% 53.3%)`,oklch:`oklch(80% 0.13 212)`},500:{level:500,hex:`#06b6d4`,rgb:`rgb(6 182 212)`,hsl:`hsl(188.7 94.5% 42.7%)`,oklch:`oklch(71% 0.13 215)`},600:{level:600,hex:`#0891b2`,rgb:`rgb(8 145 178)`,hsl:`hsl(191.6 91.4% 36.5%)`,oklch:`oklch(61% 0.11 222)`},700:{level:700,hex:`#0e7490`,rgb:`rgb(14 116 144)`,hsl:`hsl(192.9 82.3% 31%)`,oklch:`oklch(52% 0.09 223)`},800:{level:800,hex:`#155e75`,rgb:`rgb(21 94 117)`,hsl:`hsl(194.4 69.6% 27.1%)`,oklch:`oklch(45% 0.08 224)`},900:{level:900,hex:`#164e63`,rgb:`rgb(22 78 99)`,hsl:`hsl(196.4 63.6% 23.7%)`,oklch:`oklch(40% 0.07 227)`},950:{level:950,hex:`#083344`,rgb:`rgb(8 51 68)`,hsl:`hsl(197 78.9% 14.9%)`,oklch:`oklch(30% 0.05 230)`}},sky:{50:{level:50,hex:`#f0f9ff`,rgb:`rgb(240 249 255)`,hsl:`hsl(204 100% 97.1%)`,oklch:`oklch(98% 0.01 237)`},100:{level:100,hex:`#e0f2fe`,rgb:`rgb(224 242 254)`,hsl:`hsl(204 93.8% 93.7%)`,oklch:`oklch(95% 0.03 237)`},200:{level:200,hex:`#bae6fd`,rgb:`rgb(186 230 253)`,hsl:`hsl(200.6 94.4% 86.1%)`,oklch:`oklch(90% 0.06 231)`},300:{level:300,hex:`#7dd3fc`,rgb:`rgb(125 211 252)`,hsl:`hsl(199.4 95.5% 73.9%)`,oklch:`oklch(83% 0.1 230)`},400:{level:400,hex:`#38bdf8`,rgb:`rgb(56 189 248)`,hsl:`hsl(198.4 93.2% 59.6%)`,oklch:`oklch(75% 0.14 233)`},500:{level:500,hex:`#0ea5e9`,rgb:`rgb(14 165 233)`,hsl:`hsl(198.6 88.7% 48.4%)`,oklch:`oklch(68% 0.15 237)`},600:{level:600,hex:`#0284c7`,rgb:`rgb(2 132 199)`,hsl:`hsl(200.4 98% 39.4%)`,oklch:`oklch(59% 0.14 242)`},700:{level:700,hex:`#0369a1`,rgb:`rgb(3 105 161)`,hsl:`hsl(201.3 96.3% 32.2%)`,oklch:`oklch(50% 0.12 243)`},800:{level:800,hex:`#075985`,rgb:`rgb(7 89 133)`,hsl:`hsl(201 90% 27.5%)`,oklch:`oklch(44% 0.1 241)`},900:{level:900,hex:`#0c4a6e`,rgb:`rgb(12 74 110)`,hsl:`hsl(202 80.3% 23.9%)`,oklch:`oklch(39% 0.08 241)`},950:{level:950,hex:`#082f49`,rgb:`rgb(8 47 73)`,hsl:`hsl(204 80.2% 15.9%)`,oklch:`oklch(29% 0.06 243)`}},blue:{50:{level:50,hex:`#eff6ff`,rgb:`rgb(239 246 255)`,hsl:`hsl(213.8 100% 96.9%)`,oklch:`oklch(97% 0.01 255)`},100:{level:100,hex:`#dbeafe`,rgb:`rgb(219 234 254)`,hsl:`hsl(214.3 94.6% 92.7%)`,oklch:`oklch(93% 0.03 256)`},200:{level:200,hex:`#bfdbfe`,rgb:`rgb(191 219 254)`,hsl:`hsl(213.3 96.9% 87.3%)`,oklch:`oklch(88% 0.06 254)`},300:{level:300,hex:`#93c5fd`,rgb:`rgb(147 197 253)`,hsl:`hsl(211.7 96.4% 78.4%)`,oklch:`oklch(81% 0.1 252)`},400:{level:400,hex:`#60a5fa`,rgb:`rgb(96 165 250)`,hsl:`hsl(213.1 93.9% 67.8%)`,oklch:`oklch(71% 0.14 255)`},500:{level:500,hex:`#3b82f6`,rgb:`rgb(59 130 246)`,hsl:`hsl(217.2 91.2% 59.8%)`,oklch:`oklch(62% 0.19 260)`},600:{level:600,hex:`#2563eb`,rgb:`rgb(37 99 235)`,hsl:`hsl(221.2 83.2% 53.3%)`,oklch:`oklch(55% 0.22 263)`},700:{level:700,hex:`#1d4ed8`,rgb:`rgb(29 78 216)`,hsl:`hsl(224.3 76.3% 48%)`,oklch:`oklch(49% 0.22 264)`},800:{level:800,hex:`#1e40af`,rgb:`rgb(30 64 175)`,hsl:`hsl(225.9 70.7% 40.2%)`,oklch:`oklch(42% 0.18 266)`},900:{level:900,hex:`#1e3a8a`,rgb:`rgb(30 58 138)`,hsl:`hsl(224.4 64.3% 32.9%)`,oklch:`oklch(38% 0.14 266)`},950:{level:950,hex:`#172554`,rgb:`rgb(23 37 84)`,hsl:`hsl(226.2 57% 21%)`,oklch:`oklch(28% 0.09 268)`}},indigo:{50:{level:50,hex:`#eef2ff`,rgb:`rgb(238 242 255)`,hsl:`hsl(225.9 100% 96.7%)`,oklch:`oklch(96% 0.02 272)`},100:{level:100,hex:`#e0e7ff`,rgb:`rgb(224 231 255)`,hsl:`hsl(226.5 100% 93.9%)`,oklch:`oklch(93% 0.03 273)`},200:{level:200,hex:`#c7d2fe`,rgb:`rgb(199 210 254)`,hsl:`hsl(228 96.5% 88.8%)`,oklch:`oklch(87% 0.06 274)`},300:{level:300,hex:`#a5b4fc`,rgb:`rgb(165 180 252)`,hsl:`hsl(229.7 93.5% 81.8%)`,oklch:`oklch(79% 0.1 275)`},400:{level:400,hex:`#818cf8`,rgb:`rgb(129 140 248)`,hsl:`hsl(234.5 89.5% 73.9%)`,oklch:`oklch(68% 0.16 277)`},500:{level:500,hex:`#6366f1`,rgb:`rgb(99 102 241)`,hsl:`hsl(238.7 83.5% 66.7%)`,oklch:`oklch(59% 0.2 277)`},600:{level:600,hex:`#4f46e5`,rgb:`rgb(79 70 229)`,hsl:`hsl(243.4 75.4% 58.6%)`,oklch:`oklch(51% 0.23 277)`},700:{level:700,hex:`#4338ca`,rgb:`rgb(67 56 202)`,hsl:`hsl(244.5 57.9% 50.6%)`,oklch:`oklch(46% 0.21 277)`},800:{level:800,hex:`#3730a3`,rgb:`rgb(55 48 163)`,hsl:`hsl(243.7 54.5% 41.4%)`,oklch:`oklch(40% 0.18 277)`},900:{level:900,hex:`#312e81`,rgb:`rgb(49 46 129)`,hsl:`hsl(242.2 47.4% 34.3%)`,oklch:`oklch(36% 0.14 279)`},950:{level:950,hex:`#1e1b4b`,rgb:`rgb(30 27 75)`,hsl:`hsl(243.8 47.1% 20%)`,oklch:`oklch(26% 0.09 281)`}},violet:{50:{level:50,hex:`#f5f3ff`,rgb:`rgb(245 243 255)`,hsl:`hsl(250 100% 97.6%)`,oklch:`oklch(97% 0.02 294)`},100:{level:100,hex:`#ede9fe`,rgb:`rgb(237 233 254)`,hsl:`hsl(251.4 91.3% 95.5%)`,oklch:`oklch(94% 0.03 295)`},200:{level:200,hex:`#ddd6fe`,rgb:`rgb(221 214 254)`,hsl:`hsl(250.5 95.2% 91.8%)`,oklch:`oklch(89% 0.05 293)`},300:{level:300,hex:`#c4b5fd`,rgb:`rgb(196 181 253)`,hsl:`hsl(252.5 94.7% 85.1%)`,oklch:`oklch(81% 0.1 294)`},400:{level:400,hex:`#a78bfa`,rgb:`rgb(167 139 250)`,hsl:`hsl(255.1 91.7% 76.3%)`,oklch:`oklch(71% 0.16 294)`},500:{level:500,hex:`#8b5cf6`,rgb:`rgb(139 92 246)`,hsl:`hsl(258.3 89.5% 66.3%)`,oklch:`oklch(61% 0.22 293)`},600:{level:600,hex:`#7c3aed`,rgb:`rgb(124 58 237)`,hsl:`hsl(262.1 83.3% 57.8%)`,oklch:`oklch(54% 0.25 293)`},700:{level:700,hex:`#6d28d9`,rgb:`rgb(109 40 217)`,hsl:`hsl(263.4 70% 50.4%)`,oklch:`oklch(49% 0.24 293)`},800:{level:800,hex:`#5b21b6`,rgb:`rgb(91 33 182)`,hsl:`hsl(263.4 69.3% 42.2%)`,oklch:`oklch(43% 0.21 293)`},900:{level:900,hex:`#4c1d95`,rgb:`rgb(76 29 149)`,hsl:`hsl(263.5 67.4% 34.9%)`,oklch:`oklch(38% 0.18 294)`},950:{level:950,hex:`#1e1b4b`,rgb:`rgb(46 16 101)`,hsl:`hsl(261.2 72.6% 22.9%)`,oklch:`oklch(28% 0.14 291)`}},purple:{50:{level:50,hex:`#faf5ff`,rgb:`rgb(250 245 255)`,hsl:`hsl(270 100% 98%)`,oklch:`oklch(98% 0.01 308)`},100:{level:100,hex:`#f3e8ff`,rgb:`rgb(243 232 255)`,hsl:`hsl(268.7 100% 95.5%)`,oklch:`oklch(95% 0.03 307)`},200:{level:200,hex:`#e9d5ff`,rgb:`rgb(233 213 255)`,hsl:`hsl(268.6 100% 91.8%)`,oklch:`oklch(90% 0.06 307)`},300:{level:300,hex:`#d8b4fe`,rgb:`rgb(216 180 254)`,hsl:`hsl(269.2 97.4% 85.1%)`,oklch:`oklch(83% 0.11 306)`},400:{level:400,hex:`#c084fc`,rgb:`rgb(192 132 252)`,hsl:`hsl(270 95.2% 75.3%)`,oklch:`oklch(72% 0.18 306)`},500:{level:500,hex:`#a855f7`,rgb:`rgb(168 85 247)`,hsl:`hsl(270.7 91% 65.1%)`,oklch:`oklch(63% 0.23 304)`},600:{level:600,hex:`#9333ea`,rgb:`rgb(147 51 234)`,hsl:`hsl(271.5 81.3% 55.9%)`,oklch:`oklch(56% 0.25 302)`},700:{level:700,hex:`#7e22ce`,rgb:`rgb(126 34 206)`,hsl:`hsl(272.1 71.7% 47.1%)`,oklch:`oklch(50% 0.24 302)`},800:{level:800,hex:`#6b21a8`,rgb:`rgb(107 33 168)`,hsl:`hsl(272.9 67.2% 39.4%)`,oklch:`oklch(44% 0.2 304)`},900:{level:900,hex:`#581c87`,rgb:`rgb(88 28 135)`,hsl:`hsl(273.6 65.6% 32%)`,oklch:`oklch(38% 0.17 305)`},950:{level:950,hex:`#3b0764`,rgb:`rgb(59 7 100)`,hsl:`hsl(273.5 86.9% 21%)`,oklch:`oklch(29% 0.14 303)`}},fuchsia:{50:{level:50,hex:`#fdf4ff`,rgb:`rgb(253 244 255)`,hsl:`hsl(289.1 100% 97.8%)`,oklch:`oklch(98% 0.02 320)`},100:{level:100,hex:`#fae8ff`,rgb:`rgb(250 232 255)`,hsl:`hsl(287 100% 95.5%)`,oklch:`oklch(95% 0.04 319)`},200:{level:200,hex:`#f5d0fe`,rgb:`rgb(245 208 254)`,hsl:`hsl(288.3 95.8% 90.6%)`,oklch:`oklch(90% 0.07 320)`},300:{level:300,hex:`#f0abfc`,rgb:`rgb(240 171 252)`,hsl:`hsl(291.1 93.1% 82.9%)`,oklch:`oklch(83% 0.13 321)`},400:{level:400,hex:`#e879f9`,rgb:`rgb(232 121 249)`,hsl:`hsl(292 91.4% 72.5%)`,oklch:`oklch(75% 0.21 322)`},500:{level:500,hex:`#d946ef`,rgb:`rgb(217 70 239)`,hsl:`hsl(292.2 84.1% 60.6%)`,oklch:`oklch(67% 0.26 322)`},600:{level:600,hex:`#c026d3`,rgb:`rgb(192 38 211)`,hsl:`hsl(293.4 69.5% 48.8%)`,oklch:`oklch(59% 0.26 323)`},700:{level:700,hex:`#a21caf`,rgb:`rgb(162 28 175)`,hsl:`hsl(294.7 72.4% 39.8%)`,oklch:`oklch(52% 0.23 324)`},800:{level:800,hex:`#86198f`,rgb:`rgb(134 25 143)`,hsl:`hsl(295.4 70.2% 32.9%)`,oklch:`oklch(45% 0.19 325)`},900:{level:900,hex:`#701a75`,rgb:`rgb(112 26 117)`,hsl:`hsl(296.7 63.6% 28%)`,oklch:`oklch(40% 0.16 326)`},950:{level:950,hex:`#4a044e`,rgb:`rgb(74 4 78)`,hsl:`hsl(296.8 90.2% 16.1%)`,oklch:`oklch(29% 0.13 326)`}},pink:{50:{level:50,hex:`#fdf2f8`,rgb:`rgb(253 242 248)`,hsl:`hsl(327.3 73.3% 97.1%)`,oklch:`oklch(97% 0.01 343)`},100:{level:100,hex:`#fce7f3`,rgb:`rgb(252 231 243)`,hsl:`hsl(325.7 77.8% 94.7%)`,oklch:`oklch(95% 0.03 342)`},200:{level:200,hex:`#fbcfe8`,rgb:`rgb(251 207 232)`,hsl:`hsl(325.9 84.6% 89.8%)`,oklch:`oklch(90% 0.06 343)`},300:{level:300,hex:`#f9a8d4`,rgb:`rgb(249 168 212)`,hsl:`hsl(327.4 87.1% 81.8%)`,oklch:`oklch(82% 0.11 346)`},400:{level:400,hex:`#f472b6`,rgb:`rgb(244 114 182)`,hsl:`hsl(328.6 85.5% 70.2%)`,oklch:`oklch(73% 0.18 350)`},500:{level:500,hex:`#ec4899`,rgb:`rgb(236 72 153)`,hsl:`hsl(330.4 81.2% 60.4%)`,oklch:`oklch(66% 0.21 354)`},600:{level:600,hex:`#db2777`,rgb:`rgb(219 39 119)`,hsl:`hsl(333.3 71.4% 50.6%)`,oklch:`oklch(59% 0.22 1)`},700:{level:700,hex:`#be185d`,rgb:`rgb(190 24 93)`,hsl:`hsl(335.1 77.6% 42%)`,oklch:`oklch(52% 0.2 4)`},800:{level:800,hex:`#9d174d`,rgb:`rgb(157 23 77)`,hsl:`hsl(335.8 74.4% 35.3%)`,oklch:`oklch(46% 0.17 4)`},900:{level:900,hex:`#831843`,rgb:`rgb(131 24 67)`,hsl:`hsl(335.9 69% 30.4%)`,oklch:`oklch(41% 0.14 2)`},950:{level:950,hex:`#500724`,rgb:`rgb(80 7 36)`,hsl:`hsl(336.2 83.9% 17.1%)`,oklch:`oklch(28% 0.1 4)`}},rose:{50:{level:50,hex:`#fff1f2`,rgb:`rgb(255 241 242)`,hsl:`hsl(355.7 100% 97.3%)`,oklch:`oklch(97% 0.02 12)`},100:{level:100,hex:`#ffe4e6`,rgb:`rgb(255 228 230)`,hsl:`hsl(355.6 100% 94.7%)`,oklch:`oklch(94% 0.03 13)`},200:{level:200,hex:`#fecdd3`,rgb:`rgb(254 205 211)`,hsl:`hsl(352.7 96.1% 90%)`,oklch:`oklch(89% 0.06 10)`},300:{level:300,hex:`#fda4af`,rgb:`rgb(253 164 175)`,hsl:`hsl(352.6 95.7% 81.8%)`,oklch:`oklch(81% 0.11 12)`},400:{level:400,hex:`#fb7185`,rgb:`rgb(251 113 133)`,hsl:`hsl(351.3 94.5% 71.4%)`,oklch:`oklch(72% 0.17 13)`},500:{level:500,hex:`#f43f5e`,rgb:`rgb(244 63 94)`,hsl:`hsl(349.7 89.2% 60.2%)`,oklch:`oklch(65% 0.22 16)`},600:{level:600,hex:`#e11d48`,rgb:`rgb(225 29 72)`,hsl:`hsl(346.8 77.2% 49.8%)`,oklch:`oklch(59% 0.22 18)`},700:{level:700,hex:`#be123c`,rgb:`rgb(190 18 60)`,hsl:`hsl(345.3 82.7% 40.8%)`,oklch:`oklch(51% 0.2 17)`},800:{level:800,hex:`#9f1239`,rgb:`rgb(159 18 57)`,hsl:`hsl(343.4 79.7% 34.7%)`,oklch:`oklch(45% 0.17 14)`},900:{level:900,hex:`#881337`,rgb:`rgb(136 19 55)`,hsl:`hsl(341.5 75.5% 30.4%)`,oklch:`oklch(41% 0.15 10)`},950:{level:950,hex:`#4c0519`,rgb:`rgb(76 5 25)`,hsl:`hsl(343.1 87.7% 15.9%)`,oklch:`oklch(27% 0.1 12)`}}},Sm=Object.keys(xm),Cm=[`slate`,`mist`,`gray`,`zinc`,`neutral`,`stone`,`taupe`,`olive`,`mauve`];gm([vm]);var wm={xs:12,sm:14,md:16,lg:18,xl:20,"2xl":24},Tm={"2xs":`0.125rem`,xs:`0.25rem`,sm:`0.375rem`,md:`0.5rem`,lg:`0.625rem`,xl:`0.75rem`,"2xl":`0.875rem`,"3xl":`1rem`,"4xl":`1.125rem`},Em=`0.25rem`,Dm={compact:.75,default:1,relaxed:1.25,spacious:1.5},Om=`classic`,km={class:`.dark`,media:`@media (prefers-color-scheme: dark)`};Object.keys(wm),Object.keys(Tm),Object.keys(Dm);var Am={geist:`Geist`,inter:`Inter`,"noto-sans":`Noto Sans`,"nunito-sans":`Nunito Sans`,figtree:`Figtree`,roboto:`Roboto`,raleway:`Raleway`,"dm-sans":`DM Sans`,"public-sans":`Public Sans`,outfit:`Outfit`,oxanium:`Oxanium`,manrope:`Manrope`,"space-grotesk":`Space Grotesk`,montserrat:`Montserrat`,"ibm-plex-sans":`IBM Plex Sans`,"source-sans-3":`Source Sans 3`,"instrument-sans":`Instrument Sans`},jm={"jetbrains-mono":`JetBrains Mono`,"geist-mono":`Geist Mono`},Mm={"noto-serif":`Noto Serif`,"roboto-slab":`Roboto Slab`,merriweather:`Merriweather`,lora:`Lora`,"playfair-display":`Playfair Display`,"eb-garamond":`EB Garamond`,"instrument-serif":`Instrument Serif`},Nm={system:void 0,...Am},Pm={system:void 0,...jm},Fm={system:void 0,...Mm},Im={system:void 0,...Am,...jm,...Mm};Object.keys(Nm),Object.keys(Im),Object.keys(Pm),Object.keys(Fm),[...Object.keys(Nm).filter(e=>e!==`system`),...Object.keys(Pm).filter(e=>e!==`system`),...Object.keys(Fm).filter(e=>e!==`system`)];var Lm={base:`zinc`,primary:`indigo`,feedback:Om,surfaceStyle:`layered`,prefix:!1,size:`md`,radius:`md`,spacing:`default`,font:void 0,borderOpacity:1,format:`hsl`,styleTarget:`:root`,darkSelector:`class`},Rm=Sm,zm=Cm;function Bm(e){return zm.includes(e)}var Vm=ym;function Hm(e){return typeof e==`string`&&e in xm}function Um(e){return typeof e==`number`&&ym.includes(e)}function Wm(e){return e.replace(/^[a-z]+\(/i,``).replace(/\)$/,``)}function Gm(e){return typeof e==`string`&&e in bm&&typeof bm[e]!=`string`}function Km(e){let t=pm(e);return t.isValid()?t.alpha():void 0}function qm(e,t){let n=pm(e);if(!n.isValid())return;let r=n.alpha(1);return Wm(t===`oklch`?r.toOklchString():r.toHslString())}function Jm(e,t=`md`){let n=e??t;return n in wm?`${wm[n]}px`:n}function Ym(e,t=`md`){let n=e??t;return n in Tm?Tm[n]:n}function Xm(e){return typeof e==`string`&&Object.hasOwn(Dm,e)}function Zm(e,t=`default`){let n=e??t,r=typeof n==`number`?n:Xm(n)?Dm[n]:void 0;return r===void 0||!Number.isFinite(r)||r<=0||r===1?Em:`calc(${Em} * ${r})`}function Qm(e){return e===`class`||e===`media`?km[e]:e}function $m(e){return e===`media`?null:e===`class`?`dark`:e.replace(/^\./,``)}function eh(e,t){return t===`media`?e===`light`?`light dark`:null:e===`light`?`light`:`dark`}function th(e,t){return t===`media`?`light dark`:e===`light`?`light`:`dark`}function nh(e){let[t,n]=e.split(`.`);return Hm(t)&&Um(Number(n))}var rh=[`destructive`,`success`,`warning`,`info`],ih=[`primary`,...rh],ah=[``,`-foreground`],oh={"chart-1":600,"chart-2":500,"chart-3":400,"chart-4":300,"chart-5":200},sh=Object.keys(oh),ch=[`background`,`card`,`popover`],lh=[`muted`,`accent`,`accent-foreground`,`secondary`,`secondary-foreground`],uh=[`foreground`,`muted-foreground`,`card-foreground`,`popover-foreground`,`carbon-foreground`],dh=[`border`,`input`,`ring`],fh=[`primary`,`primary-foreground`],ph=[`carbon`],mh=[`mask`],hh=[`sidebar`,`sidebar-foreground`,`sidebar-border`,`sidebar-accent`,`sidebar-accent-foreground`,`sidebar-primary`,`sidebar-primary-foreground`,`sidebar-ring`],gh=[`border`,`sidebar-border`,`input`],_h=[...gh,...mh],vh=[...ch,...mh,...lh,...uh,...dh,...fh,...ph,...hh],yh=e=>bh.includes(e),bh=[...vh,...rh.flatMap(e=>ah.map(t=>`${e}${t}`)),...sh],xh={background:{kind:`level`,source:`base`,light:50,dark:950},card:{kind:`level`,source:`base`,light:`white`,dark:900},popover:{kind:`level`,source:`base`,light:`white`,dark:900},mask:{kind:`simple`,light:`black`,dark:`black`},muted:{kind:`level`,source:`base`,light:100,dark:800},accent:{kind:`level`,source:`base`,light:100,dark:800},"accent-foreground":{kind:`level`,source:`base`,light:900,dark:50},secondary:{kind:`level`,source:`base`,light:200,dark:800},"secondary-foreground":{kind:`level`,source:`base`,light:900,dark:50},foreground:{kind:`level`,source:`base`,light:900,dark:50},"muted-foreground":{kind:`level`,source:`base`,light:600,dark:400},"card-foreground":{kind:`mirror`,light:`foreground`,dark:`foreground`},"popover-foreground":{kind:`mirror`,light:`foreground`,dark:`foreground`},"carbon-foreground":{kind:`level`,source:`base`,light:50,dark:900},border:{kind:`level`,source:`base`,light:200,dark:`white`},input:{kind:`level`,source:`base`,light:200,dark:`white`},ring:{kind:`level`,source:`primary`,light:500,dark:500},primary:{kind:`level`,source:`primary`,light:500,dark:500,neutral:{light:800,dark:200}},"primary-foreground":{kind:`level`,source:`base`,light:50,dark:50,neutral:{light:50,dark:950}},carbon:{kind:`level`,source:`base`,light:800,dark:100},sidebar:{kind:`mirror`,light:`background`,dark:`muted`},"sidebar-foreground":{kind:`mirror`,light:`foreground`,dark:`foreground`},"sidebar-border":{kind:`mirror`,light:`border`,dark:`border`},"sidebar-accent":{kind:`mirror`,light:`accent`,dark:`accent`},"sidebar-accent-foreground":{kind:`mirror`,light:`accent-foreground`,dark:`accent-foreground`},"sidebar-primary":{kind:`mirror`,light:`primary`,dark:`primary`},"sidebar-primary-foreground":{kind:`mirror`,light:`primary-foreground`,dark:`primary-foreground`},"sidebar-ring":{kind:`mirror`,light:`ring`,dark:`ring`}},Sh={border:{light:1,dark:.1},"sidebar-border":{light:1,dark:.1},input:{light:1,dark:.15},mask:{light:.25,dark:.3}},Ch={light:50,dark:900},wh={size:`16px`,radius:`0.5rem`,"radius-2xs":`calc(var(--radius) * 0.25)`,"radius-xs":`calc(var(--radius) * 0.5)`,"radius-sm":`calc(var(--radius) * 0.75)`,"radius-md":`var(--radius)`,"radius-lg":`calc(var(--radius) * 1.25)`,"radius-xl":`calc(var(--radius) * 1.5)`,"radius-2xl":`calc(var(--radius) * 1.75)`,"radius-3xl":`calc(var(--radius) * 2)`,"radius-4xl":`calc(var(--radius) * 2.25)`,"radius-none":`0`,"radius-full":`9999px`,"spacing-unit":Em,"z-layout":`10`,"z-base":`50`,"z-toast":`100`,"z-max":`2147483647`,"border-width":`1px`,"border-width-strong":`2px`,"ring-width":`3px`,"ring-offset-width":`2px`,"font-sans":`ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif`,"font-heading":`ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif`,"font-mono":`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace`,"font-serif":`ui-serif, Georgia, Cambria, "Times New Roman", Times, serif`},Th=[`radius-none`,`radius-full`];Object.keys(wh).filter(e=>e.startsWith(`radius-`)&&!Th.includes(e)).map(e=>e.slice(7));function Eh(e,t){let n=wh[`font-${e}`],r=t?.trim();return r?r.includes(`,`)?r:`${r}, ${n}`:n}function Dh(e){return{"font-sans":Eh(`sans`,e?.sans),"font-heading":Eh(`heading`,e?.heading),"font-mono":Eh(`mono`,e?.mono),"font-serif":Eh(`serif`,e?.serif)}}function Oh(e,t){return t?`--${t}-${e}`:`--${e}`}function kh(e){let{size:t,radius:n,spacingUnit:r=wh[`spacing-unit`],font:i,prefix:a=!1}=e,o=`var(${Oh(`radius`,a)})`;return Object.entries({...wh,size:t,radius:n,"spacing-unit":r,...Dh(i)}).reduce((e,[t,n])=>{let r=n.replaceAll(`var(--radius)`,o);return Object.assign(e,{[t]:r})},{})}var Ah={classic:{light:{destructive:`red.500`,success:`green.500`,warning:`amber.500`,info:`blue.500`},dark:{destructive:`red.400`,success:`green.400`,warning:`amber.400`,info:`blue.400`}},vivid:{light:{destructive:`red.500`,success:`emerald.500`,warning:`amber.500`,info:`sky.500`},dark:{destructive:`red.400`,success:`emerald.400`,warning:`amber.400`,info:`sky.400`}},subtle:{light:{destructive:`rose.500`,success:`emerald.500`,warning:`amber.500`,info:`indigo.500`},dark:{destructive:`rose.300`,success:`emerald.300`,warning:`amber.300`,info:`indigo.300`}},modern:{light:{destructive:`red.500`,success:`emerald.500`,warning:`orange.500`,info:`sky.500`},dark:{destructive:`red.400`,success:`emerald.400`,warning:`orange.400`,info:`sky.400`}},professional:{light:{destructive:`red.500`,success:`green.600`,warning:`amber.600`,info:`blue.600`},dark:{destructive:`red.300`,success:`green.300`,warning:`amber.300`,info:`blue.300`}}};function jh(e){return Ah[e??`classic`]??Ah.classic}function Mh(e){let[t,n]=e.split(`.`);return{palette:t,level:Number(n)}}function Nh(e,t){let{mode:n,base:r,primary:i}=t,a=e.neutral!==void 0&&Bm(i)&&e.neutral?e.neutral:e,o=n===`light`?a.light:a.dark,s=e.source===`base`?r:i;return o===`white`?{kind:`simple`,name:`white`}:{kind:`palette`,palette:s,level:o}}function Ph(e,t){let n=e=>({kind:`palette`,palette:t,level:e});return{background:e===`light`?{kind:`simple`,name:`white`}:n(950),card:e===`light`?{kind:`simple`,name:`white`}:n(900),popover:e===`light`?{kind:`simple`,name:`white`}:n(900)}}function Fh(e,t){return e?.split(`.`)[0]||t}function Ih(e){let{mode:t,base:n,primary:r,feedback:i,surfaceStyle:a}=e,o=[];Object.entries(xh).forEach(([e,i])=>{let a=e;i.kind===`level`?o.push([a,Nh(i,{mode:t,base:n,primary:r})]):i.kind===`simple`&&o.push([a,{kind:`simple`,name:t===`light`?i.light:i.dark}])});let s=(t===`light`?jh(i).light:jh(i).dark)??{};rh.forEach(e=>{let r=s[e],i=Fh(r,n),a=r?Mh(r).level:500;o.push([e,{kind:`palette`,palette:i,level:a}]),o.push([`${e}-foreground`,{kind:`palette`,palette:n,level:Ch[t]}])}),sh.forEach(e=>{o.push([e,{kind:`palette`,palette:r,level:oh[e]}])});let c=Object.fromEntries(o);return a===`flat`?{...c,...Ph(t,n)}:c}function Lh(e){let t=Object.keys({...xh}).concat(rh.flatMap(e=>ah.map(t=>`${e}${t}`)),[...sh]).filter(t=>e[t]===void 0);if(t.length>0)throw Error(`[@vean/theme] theme map is missing tokens: ${t.join(`, `)}`);return e}function Rh(e,t){return Object.entries(xh).filter(([,e])=>e.kind===`mirror`).reduce((n,[r,i])=>{if(i.kind!==`mirror`)return n;let a=e[t===`light`?i.light:i.dark];return a?{...n,[r]:a}:n},{...e})}function zh(e){return kh({size:Jm(e.size),radius:Ym(e.radius),spacingUnit:Zm(e.spacing),font:e.font,prefix:e.prefix??Lm.prefix})}function Bh(e){return e.startsWith(`token.`)}function Vh(e,t){if(!Bh(e))return;let n=e.slice(6);if(yh(n)&&n!==t)return n}function Hh(e){if(nh(e)){let{palette:t,level:n}=Mh(e);return{kind:`palette`,palette:t,level:n}}return Gm(e)?{kind:`simple`,name:e}:pm(e).isValid()?{kind:`color`,value:e}:void 0}function Uh(e,t){let n=new Set([e]),r=e;for(;;){let e=t.get(r);if(e===void 0)return r;if(n.has(e))return;n.add(e),r=e}}function Wh(e,t,n){let r=Object.entries(t??{}).filter(([e])=>yh(e));if(r.length===0)return{map:e,alpha:{}};let i=e=>_h.includes(e),a=r.map(([e,t])=>[e,Vh(t,e)]).filter(e=>e[1]!==void 0),o=r.filter(([,e])=>!Bh(e)),s=Object.fromEntries(o.map(([e,t])=>[e,Hh(t)]).filter(e=>e[1]!==void 0).filter(([e,t])=>t.kind!==`color`||i(e)||(Km(t.value)??1)>0)),c=Object.fromEntries(o.filter(([e])=>i(e)).map(([e,t])=>[e,Km(t)]).filter(e=>e[1]!==void 0&&e[1]<1)),l=new Map(a),u=a.flatMap(([t])=>{let n=Uh(t,l),r=n===void 0?void 0:s[n]??e[n];return r===void 0?[]:[[t,r]]}),d=a.flatMap(([e])=>{if(!i(e))return[];let t=Uh(e,l);if(t===void 0||!i(t))return[];let r=t in c?c[t]:Sh[t][n];return r===void 0?[]:[[e,r]]});return{map:{...e,...s,...Object.fromEntries(u)},alpha:{...c,...Object.fromEntries(d)}}}function Gh(e={}){let t=e.base??Lm.base,n=e.primary??Lm.primary,r=e.surfaceStyle??Lm.surfaceStyle,i=e.feedback??Lm.feedback,a=e.borderOpacity??Lm.borderOpacity,o=zh(e),s=a=>{let o=Wh(Lh(Rh(Ih({mode:a,base:t,primary:n,feedback:i,surfaceStyle:r}),a)),a===`light`?e.overrides?.light:e.overrides?.dark,a);return{map:o.map,alpha:o.alpha}},c=s(`light`),l=s(`dark`);return{light:c.map,dark:l.map,alpha:Object.fromEntries(Object.entries(Sh).map(([e,t])=>{let n=gh.includes(e)?a:1,r=e;return[r,{light:(c.alpha[r]??t.light)*n,dark:(l.alpha[r]??t.dark)*n}]})),literal:o}}var Kh=e=>e?`--${e}-`:`--`;function qh(e,t){return`${Kh(t)}${e}`}function Jh(e,t){return e.kind===`palette`?`var(--${e.palette}-${e.level})`:e.kind===`simple`?`var(--${e.name})`:qm(e.value,t)??e.value}function Yh(e){return e.filter(Boolean).join(`
24
24
  `)}function Xh(e,t={}){let{styleTarget:n=`:root`,format:r=`hsl`,darkSelector:i=`class`,weakSelectors:a=!1}=t,o=e=>{let t=eh(e,i);return t?[` color-scheme: ${t};`]:[]},s=e=>{let t=e===`light`?n:Qm(i);return!a||e===`dark`?a?`:where(${t})`:t:`:where(${t})`},c=Object.entries(e.literal).map(([e,n])=>` ${Oh(e,t.prefix??!1)}: ${n};`),l=n=>Object.keys(e.light).map(i=>{let a=e[n][i];return` ${qh(i,t.prefix)}: ${Jh(a,r)};`}),u=n=>_h.map(r=>` ${Kh(t.prefix)}${r}-alpha: ${e.alpha[r][n]};`),d=ih.flatMap(n=>{let r=e.light[n];return r.kind===`palette`?Vm.map(e=>` ${Kh(t.prefix)}${n}-${e}: var(--${r.palette}-${e});`):[]}),f=[...o(`light`),...l(`light`),...d,...u(`light`),...c],p=[...o(`dark`),...Object.keys(e.light).filter(t=>Jh(e.dark[t],r)!==Jh(e.light[t],r)).map(n=>` ${qh(n,t.prefix)}: ${Jh(e.dark[n],r)};`),...u(`dark`)];return[`${s(`light`)} {\n${Yh(f)}\n}`,`${s(`dark`)} {\n${Yh(p)}\n}`].join(`
25
25
 
26
- `)}new Set(_h);var Zh=wm,Qh={xs:`xs`,sm:`xs`,md:`sm`,lg:`md`,xl:`lg`,"2xl":`xl`};Object.fromEntries(Object.entries(Zh).map(([e,t])=>[e,t/Zh.md]));var $h=`__VEAN_THEME`,eg=`vean-theme`,tg=65536;function ng(){if(typeof window>`u`)return null;try{return window.localStorage??null}catch{return null}}var rg=e=>typeof e==`object`&&!!e&&!Array.isArray(e),ig=e=>e===`light`||e===`dark`||e===`auto`,ag=e=>e===`layered`||e===`flat`,og=e=>typeof e==`string`&&e.trim().length>0;function sg(e){return rg(e)?[`sans`,`heading`,`mono`,`serif`].every(t=>{let n=e[t];return n===void 0||og(n)}):!1}var cg={surface:`card`,elevated:`popover`,"sidebar-surface":`sidebar`,scrim:`mask`};function lg(e,t){if(yh(e))return e;if(t>=2)return;let n=cg[e];return n&&yh(n)?n:void 0}function ug(e,t){if(!rg(e))return;let n=Object.entries(e).flatMap(([e,n])=>{if(typeof n!=`string`||n.length===0)return[];let r=lg(e,t);return r?[[r,n]]:[]});return n.length>0?Object.fromEntries(n):void 0}function dg(e,t){if(!rg(e))return;let n=ug(e.light,t),r=ug(e.dark,t);return n||r?{...n?{light:n}:{},...r?{dark:r}:{}}:void 0}function fg(e,t){if(!rg(e))return;if(t>=2)return e;let n=Object.entries(e).flatMap(([e,n])=>{if(!rg(n))return[[e,n]];let r=ug(n.light,t);if(!r)return[];let i=ug(n.dark,t);return[[e,i?{light:r,dark:i}:{light:r}]]});return n.length>0?Object.fromEntries(n):void 0}function pg(e,t=2){if(!rg(e))return{};let n={},r=(t,r)=>{e[t]!==void 0&&r(e[t])&&(n[t]=e[t])};r(`base`,e=>Hm(e)&&Rm.includes(e)),r(`primary`,e=>Hm(e)&&Rm.includes(e)),r(`feedback`,e=>typeof e==`string`&&e.length>0),r(`surfaceStyle`,ag),r(`prefix`,e=>e===!1||typeof e==`string`&&e.length>0),r(`size`,e=>typeof e==`string`&&e.length>0),r(`radius`,e=>typeof e==`string`&&e.length>0),r(`spacing`,e=>Xm(e)||typeof e==`number`&&Number.isFinite(e)&&e>0&&e<=4),r(`font`,sg),r(`borderOpacity`,e=>typeof e==`number`&&e>=0&&e<=1),r(`format`,e=>e===`hsl`||e===`oklch`),r(`styleTarget`,e=>e===`html`||e===`:root`),r(`darkSelector`,e=>typeof e==`string`&&e.length>0);let i=dg(e.overrides,t);return i&&(n.overrides=i),n}function mg(e){if(!e)return null;let t;try{t=JSON.parse(e)}catch{return null}if(!rg(t))return null;let n=typeof t.v==`number`&&Number.isInteger(t.v)&&t.v>0?t.v:0;if(n>2)return null;let r={v:2,options:pg(t.options,n)};ig(t.mode)&&(r.mode=t.mode),n>=2&&typeof t.style==`string`&&t.style.length>0&&t.style.length<=tg&&(r.style=t.style);let i=fg(t.presets,n);return i&&(r.presets=i),typeof t.appliedPreset==`string`&&t.appliedPreset.length>0&&(i===void 0||t.appliedPreset in i)&&(r.appliedPreset=t.appliedPreset),r}function hg(e=$h){let t=null;try{t=ng()?.getItem(e)??null}catch{return null}return mg(t)}function gg(e,t=$h){let n=ng();if(!n)return!1;let r={v:2,...e};r.style&&r.style.length>tg&&delete r.style;try{return n.setItem(t,JSON.stringify(r)),!0}catch{return!1}}function _g(e={}){let{key:t=$h,delay:n=250}=e,r=null,i=null,a=()=>{i!==null&&(clearTimeout(i),i=null),r&&=(gg(r,t),null)};return{write:e=>{r=e,i===null&&(i=setTimeout(a,n))},flush:a,cancel:()=>{i!==null&&(clearTimeout(i),i=null),r=null}}}function vg(e,t){return Xh(Gh(e),{prefix:e.prefix??Lm.prefix,styleTarget:e.styleTarget,darkSelector:e.darkSelector,format:e.format,...t})}function yg(){let e=pf();return U(()=>{let t=lf(e?.locale??`en`),n=e?.messages;return n?Ju(n,t):t})}var bg=gl({base:[`inline-flex items-center justify-center font-medium transition-all-150`,`outline-none focus-visible:ring-3 focus-visible:ring-offset-card`,`data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50`],variants:{color:{primary:`focus-visible:ring-primary/30`,destructive:`focus-visible:ring-destructive/30`,success:`focus-visible:ring-success/30`,warning:`focus-visible:ring-warning/30`,info:`focus-visible:ring-info/30`,carbon:`focus-visible:ring-carbon/30`,secondary:`focus-visible:ring-secondary-foreground/20 text-secondary-foreground`,accent:`focus-visible:ring-accent-foreground/10 text-accent-foreground`},variant:{solid:``,pure:`border border-border bg-card text-accent-foreground data-[normal]:hover:bg-accent data-[normal]:active:bg-accent-foreground/10`,plain:`border border-border bg-card text-foreground`,outline:`border bg-card`,dashed:`border border-dashed bg-card`,soft:``,ghost:`bg-transparent`,link:`bg-transparent underline-offset-4 data-[normal]:hover:underline`},size:{xs:`gap-1 text-2xs`,sm:`gap-2 text-xs`,md:`gap-3 text-sm`,lg:`gap-4 text-base`,xl:`gap-5 text-lg`,"2xl":`gap-6 text-xl`},shape:{auto:`rounded-md`,rounded:`rounded-full`,square:`rounded-md`,circle:`rounded-full`},shadow:{none:`shadow-none`,sm:`shadow-sm`,md:`shadow-md`,lg:`shadow-lg`},fitContent:{true:`w-fit h-fit`,false:``}},compoundVariants:[{color:`primary`,variant:`solid`,class:`bg-primary text-primary-foreground data-[normal]:hover:bg-primary/80 data-[normal]:active:bg-primary-600`},{color:`destructive`,variant:`solid`,class:`bg-destructive text-destructive-foreground data-[normal]:hover:bg-destructive/80 data-[normal]:active:bg-destructive-600`},{color:`success`,variant:`solid`,class:`bg-success text-success-foreground data-[normal]:hover:bg-success/80 data-[normal]:active:bg-success-600`},{color:`warning`,variant:`solid`,class:`bg-warning text-warning-foreground data-[normal]:hover:bg-warning/80 data-[normal]:active:bg-warning-600`},{color:`info`,variant:`solid`,class:`bg-info text-info-foreground data-[normal]:hover:bg-info/80 data-[normal]:active:bg-info-600`},{color:`carbon`,variant:`solid`,class:`bg-carbon text-carbon-foreground data-[normal]:hover:bg-carbon/80 data-[normal]:active:bg-carbon`},{color:`secondary`,variant:[`solid`,`soft`],class:`bg-secondary`},{color:`accent`,variant:[`solid`,`soft`],class:`bg-accent`},{color:`primary`,variant:[`outline`,`dashed`,`soft`,`ghost`,`link`],class:`text-primary`},{color:`destructive`,variant:[`outline`,`dashed`,`soft`,`ghost`,`link`],class:`text-destructive`},{color:`success`,variant:[`outline`,`dashed`,`soft`,`ghost`,`link`],class:`text-success`},{color:`warning`,variant:[`outline`,`dashed`,`soft`,`ghost`,`link`],class:`text-warning`},{color:`info`,variant:[`outline`,`dashed`,`soft`,`ghost`,`link`],class:`text-info`},{color:`carbon`,variant:[`outline`,`dashed`,`soft`,`ghost`,`link`],class:`text-carbon`},{color:`primary`,variant:[`outline`,`dashed`,`ghost`],class:`data-[normal]:hover:bg-primary/10 data-[normal]:active:bg-primary/20`},{color:`destructive`,variant:[`outline`,`dashed`,`ghost`],class:`data-[normal]:hover:bg-destructive/10 data-[normal]:active:bg-destructive/20`},{color:`success`,variant:[`outline`,`dashed`,`ghost`],class:`data-[normal]:hover:bg-success/10 data-[normal]:active:bg-success/20`},{color:`warning`,variant:[`outline`,`dashed`,`ghost`],class:`data-[normal]:hover:bg-warning/10 data-[normal]:active:bg-warning/20`},{color:`info`,variant:[`outline`,`dashed`,`ghost`],class:`data-[normal]:hover:bg-info/10 data-[normal]:active:bg-info/20`},{color:`carbon`,variant:[`outline`,`dashed`,`ghost`],class:`data-[normal]:hover:bg-carbon/10 data-[normal]:active:bg-carbon/20`},{color:`secondary`,variant:[`solid`,`outline`,`dashed`,`soft`,`ghost`],class:`data-[normal]:hover:bg-secondary data-[normal]:active:bg-secondary-foreground/20`},{color:`accent`,variant:[`solid`,`outline`,`dashed`,`soft`,`ghost`],class:`data-[normal]:hover:bg-accent data-[normal]:active:bg-accent-foreground/10`},{color:`primary`,variant:`plain`,class:`data-[normal]:hover:border-primary data-[normal]:hover:text-primary`},{color:`destructive`,variant:`plain`,class:`data-[normal]:hover:border-destructive data-[normal]:hover:text-destructive`},{color:`success`,variant:`plain`,class:`data-[normal]:hover:border-success data-[normal]:hover:text-success`},{color:`warning`,variant:`plain`,class:`data-[normal]:hover:border-warning data-[normal]:hover:text-warning`},{color:`info`,variant:`plain`,class:`data-[normal]:hover:border-info data-[normal]:hover:text-info`},{color:`carbon`,variant:`plain`,class:`data-[normal]:hover:border-carbon data-[normal]:hover:text-carbon`},{color:`secondary`,variant:`plain`,class:`data-[normal]:hover:border-secondary-foreground/20`},{color:`accent`,variant:`plain`,class:`data-[normal]:hover:border-accent-foreground/10`},{color:`primary`,variant:[`outline`,`dashed`],class:`border-primary`},{color:`destructive`,variant:[`outline`,`dashed`],class:`border-destructive`},{color:`success`,variant:[`outline`,`dashed`],class:`border-success`},{color:`warning`,variant:[`outline`,`dashed`],class:`border-warning`},{color:`info`,variant:[`outline`,`dashed`],class:`border-info`},{color:`carbon`,variant:[`outline`,`dashed`],class:`border-carbon`},{color:`secondary`,variant:[`outline`,`dashed`],class:`border-secondary-foreground/20`},{color:`accent`,variant:[`outline`,`dashed`],class:`border-accent-foreground/10`},{color:`primary`,variant:`soft`,class:`bg-primary/10 data-[normal]:hover:bg-primary/10 data-[normal]:active:bg-primary/20`},{color:`destructive`,variant:`soft`,class:`bg-destructive/10 data-[normal]:hover:bg-destructive/10 data-[normal]:active:bg-destructive/20`},{color:`success`,variant:`soft`,class:`bg-success/10 data-[normal]:hover:bg-success/10 data-[normal]:active:bg-success/20`},{color:`warning`,variant:`soft`,class:`bg-warning/10 data-[normal]:hover:bg-warning/10 data-[normal]:active:bg-warning/20`},{color:`info`,variant:`soft`,class:`bg-info/10 data-[normal]:hover:bg-info/10 data-[normal]:active:bg-info/20`},{color:`carbon`,variant:`soft`,class:`bg-carbon/10 data-[normal]:hover:bg-carbon/10 data-[normal]:active:bg-carbon/20`},{size:`xs`,fitContent:!0,class:`p-0.75`},{size:`sm`,fitContent:!0,class:`p-0.875`},{size:`md`,fitContent:!0,class:`p-1`},{size:`lg`,fitContent:!0,class:`p-1.25`},{size:`xl`,fitContent:!0,class:`p-1.5`},{size:`2xl`,fitContent:!0,class:`p-1.75`},{size:`xs`,fitContent:!1,class:`h-6 px-1.5`},{size:`sm`,fitContent:!1,class:`h-7 px-2`},{size:`md`,fitContent:!1,class:`h-8 px-4`},{size:`lg`,fitContent:!1,class:`h-9 px-6`},{size:`xl`,fitContent:!1,class:`h-10 px-8`},{size:`2xl`,fitContent:!1,class:`h-12 px-10`},{shape:[`square`,`circle`],fitContent:!1,class:`p-0 gap-0`},{size:`xs`,fitContent:!1,shape:[`square`,`circle`],class:`w-6`},{size:`sm`,fitContent:!1,shape:[`square`,`circle`],class:`w-7`},{size:`md`,fitContent:!1,shape:[`square`,`circle`],class:`w-8`},{size:`lg`,fitContent:!1,shape:[`square`,`circle`],class:`w-9`},{size:`xl`,fitContent:!1,shape:[`square`,`circle`],class:`w-10`},{size:`2xl`,fitContent:!1,shape:[`square`,`circle`],class:`w-12`},{variant:[`ghost`,`link`],shadow:[`sm`,`md`,`lg`],class:`shadow-none`},{variant:`plain`,shadow:`sm`,class:`active:shadow-md`},{variant:`plain`,shadow:`md`,class:`active:shadow-lg`},{variant:`plain`,shadow:`lg`,class:`active:shadow-xl`},{variant:`pure`,shadow:`sm`,class:`active:shadow-sm`},{variant:`pure`,shadow:`md`,class:`active:shadow-md`},{variant:`pure`,shadow:`lg`,class:`active:shadow-lg`}],defaultVariants:{color:`primary`,variant:`solid`,size:`md`,shape:`auto`,shadow:`sm`,fitContent:!1}});gl({base:`[&>*]:relative focus-visible:[&>*]:z-2 not-first:not-last:[&>*]:rounded-0`,variants:{orientation:{horizontal:`inline-flex not-last:[&>*]:border-e-0 focus-visible:[&>*]:border-e first:[&>*]:rounded-e-0 last:[&>*]:rounded-s-0`,vertical:`flex flex-col not-last:[&>*]:border-b-0 focus-visible:[&>*]:border-b first:[&>*]:rounded-b-0 last:[&>*]:rounded-t-0`}},defaultVariants:{orientation:`horizontal`}});var xg=Ul(bg,{size:`md`,color:`accent`,variant:`ghost`,shape:`square`,fitContent:!0}),Sg=xl(bg,e=>({...e,size:Qh[e.size??`md`]})),Cg=xl(xg,e=>({...e,size:Qh[e.size??`md`]})),wg=Ll({extendBase:e=>({close:Cg({size:e.size}),cancel:Sg({size:e.size,variant:`pure`}),action:Sg({size:e.size})}),slots:{toaster:[`fixed z-[--z-index] list-none outline-none transition-transform-400 ease`,`data-[x-position=right]:end-[--offset-right] data-[x-position=left]:start-[--offset-left] data-[x-position=center]:start-1/2 data-[x-position=center]:-translate-x-1/2 [&[dir=rtl]]:data-[x-position=center]:translate-x-1/2`,`data-[y-position=top]:top-[--offset-top] data-[y-position=bottom]:bottom-[--offset-bottom]`,`max-[600px]:w-full max-[600px]:data-[x-position=right]:start-[--mobile-offset-left] max-[600px]:data-[x-position=left]:end-[--mobile-offset-right] max-[600px]:data-[x-position=center]:start-[--mobile-offset-left] max-[600px]:data-[x-position=center]:end-[--mobile-offset-right] max-[600px]:data-[x-position=center]:[transform:none]`,`max-[600px]:data-[y-position=top]:top-[--mobile-offset-top] max-[600px]:data-[y-position=bottom]:bottom-[--mobile-offset-bottom]`],toast:[`group absolute w-full rounded-md bg-popover text-popover-foreground border border-transparent opacity-0 outline-none touch-none`,`z-[--z-index] break-anywhere [--y:translateY(100%)] [--lift:1] [--lift-amount:calc(var(--lift)*var(--gap))] [transform:var(--y)]`,`[transition:transform_400ms,opacity_400ms,height_400ms,box-shadow_200ms] [box-shadow:0_4px_12px_hsl(var(--foreground)/0.1)]`,`focus-visible:[box-shadow:0_4px_12px_hsl(var(--foreground)/0.1),0_0_0_2px_hsl(var(--foreground)/0.2)] [&>*]:[transition:opacity_400ms]`,`data-[y-position=top]:top-0 data-[mounted=false]:data-[y-position=top]:[--y:translateY(-100%)] data-[mounted=true]:[--y:translateY(0)]`,`data-[y-position=bottom]:[--lift:-1] data-[y-position=bottom]:bottom-0`,`data-[x-position=left]:start-0 data-[x-position=right]:end-0`,`data-[swiping=true]:transition-none data-[swiping=true]:[transform:var(--y)_translateY(var(--swipe-amount-y,0px))_translateX(var(--swipe-amount-x,0px))]`,`data-[swiping=true]:before:content-empty data-[swiping=true]:before:absolute data-[swiping=true]:before:[inset-inline:-100%] data-[swiping=true]:before:h-full data-[swiping=true]:before:-z-1`,`data-[y-position=top]:data-[swiping=true]:before:bottom-1/2 data-[y-position=top]:data-[swiping=true]:before:[transform:scaleY(3)_translateY(50%)]`,`data-[y-position=bottom]:data-[swiping=true]:before:top-1/2 data-[y-position=bottom]:data-[swiping=true]:before:[transform:scaleY(3)_translateY(-50%)]`,`data-[swiping=false]:data-[removed=true]:before:content-empty data-[swiping=false]:data-[removed=true]:before:absolute data-[swiping=false]:data-[removed=true]:before:inset-0 data-[swiping=false]:data-[removed=true]:before:[transform:scaleY(2)]`,`data-[expanded=true]:after:content-empty data-[expanded=true]:after:absolute data-[expanded=true]:after:start-0 data-[expanded=true]:after:bottom-full data-[expanded=true]:after:w-full data-[expanded=true]:after:h-[calc(var(--gap)_+_1px)]`,`data-[mounted=true]:opacity-100 data-[visible=false]:pointer-events-none data-[visible=false]:data-[mounted=true]:opacity-0`,`data-[expanded=false]:data-[front=false]:[--scale:var(--toasts-before)*0.05_+_1] data-[expanded=false]:data-[front=false]:[--y:translateY(calc(var(--lift-amount)*var(--toasts-before)))_scale(calc(-1*var(--scale)))] data-[expanded=false]:data-[front=false]:h-[var(--front-toast-height)] [&[data-expanded=false][data-front=false]>*]:opacity-0`,`data-[mounted=true]:data-[expanded=true]:[--y:translateY(calc(var(--lift)*var(--offset)))] data-[mounted=true]:data-[expanded=true]:h-[var(--initial-height)]`,`data-[removed=true]:data-[front=true]:data-[swipe-out=false]:[--y:translateY(calc(var(--lift)*-100%))] data-[removed=true]:data-[front=true]:data-[swipe-out=false]:opacity-0`,`data-[removed=true]:data-[front=false]:data-[swipe-out=false]:data-[expanded=true]:[--y:translateY(calc(var(--lift)*var(--offset)_+_var(--lift)*-100%))] data-[removed=true]:data-[front=false]:data-[swipe-out=false]:data-[expanded=true]:opacity-0`,`data-[removed=true]:data-[front=false]:data-[swipe-out=false]:data-[expanded=false]:[--y:translateY(40%)] data-[removed=true]:data-[front=false]:data-[swipe-out=false]:data-[expanded=false]:opacity-0 data-[removed=true]:data-[front=false]:data-[swipe-out=false]:data-[expanded=false]:[transition:transform_500ms,opacity_200ms]`,`data-[removed=true]:data-[front=false]:before:h-[calc(var(--initial-height)_+_20%)]`,`data-[swiped=true]:select-none`,`data-[swipe-out=true]:data-[y-position=top]:[animation-duration:200ms] data-[swipe-out=true]:data-[y-position=bottom]:[animation-duration:200ms]`,`data-[swipe-out=true]:data-[y-position=top]:[animation-timing-function:ease-out] data-[swipe-out=true]:data-[y-position=bottom]:[animation-timing-function:ease-out]`,`data-[swipe-out=true]:data-[y-position=top]:[animation-fill-mode:forwards] data-[swipe-out=true]:data-[y-position=bottom]:[animation-fill-mode:forwards]`,`data-[swipe-out=true]:data-[swipe-direction=left]:[animation-name:toast-swipe-out-left] data-[swipe-out=true]:data-[swipe-direction=right]:[animation-name:toast-swipe-out-right] data-[swipe-out=true]:data-[swipe-direction=up]:[animation-name:toast-swipe-out-up] data-[swipe-out=true]:data-[swipe-direction=down]:[animation-name:toast-swipe-out-down]`,`data-[rich-color=true]:data-[type=success]:bg-success-100 data-[rich-color=true]:data-[type=success]:border-success`,`data-[rich-color=true]:data-[type=info]:bg-info-100 data-[rich-color=true]:data-[type=info]:border-info`,`data-[rich-color=true]:data-[type=warning]:bg-warning-100 data-[rich-color=true]:data-[type=warning]:border-warning`,`data-[rich-color=true]:data-[type=error]:bg-destructive-100 data-[rich-color=true]:data-[type=error]:border-destructive`,`data-[inverted=true]:bg-carbon data-[inverted=true]:border-carbon data-[inverted=true]:text-carbon-foreground`],wrapper:`flex flex-col items-stretch`,content:``,title:`flex items-center font-semibold`,description:`text-muted-foreground`,icon:[`group-data-[type=info]:text-info group-data-[type=success]:text-success group-data-[type=warning]:text-warning group-data-[type=error]:text-destructive`],footer:`flex justify-end items-center`,action:``,cancel:``,close:[`absolute`,`group-data-[inverted=true]:text-accent group-data-[inverted=true]:hover:bg-accent/15`,`group-data-[rich-color=true]:group-data-[type=success]:hover:bg-success/15`,`group-data-[rich-color=true]:group-data-[type=info]:hover:bg-info/15`,`group-data-[rich-color=true]:group-data-[type=warning]:hover:bg-warning/15`,`group-data-[rich-color=true]:group-data-[type=error]:hover:bg-destructive/15`]},variants:{size:{xs:{toaster:`w-80 text-2xs`,toast:`p-3`,wrapper:`gap-1`,title:`gap-1.25`,footer:`gap-1.25`,close:`top-1 end-1`},sm:{toaster:`w-85 text-xs`,toast:`p-3.5`,wrapper:`gap-1.25`,title:`gap-1.5`,footer:`gap-1.5`,close:`top-1.25 end-1.25`},md:{toaster:`w-90 text-sm`,toast:`p-4`,wrapper:`gap-1.5`,title:`gap-2`,footer:`gap-2`,close:`top-1.5 end-1.5`},lg:{toaster:`w-95 text-base`,toast:`p-4.5`,wrapper:`gap-1.75`,title:`gap-2.5`,footer:`gap-2.5`,close:`top-1.75 end-1.75`},xl:{toaster:`w-100 text-lg`,toast:`p-5`,wrapper:`gap-2`,title:`gap-3`,footer:`gap-3`,close:`top-2 end-2`},"2xl":{toaster:`w-110 text-xl`,toast:`p-6`,wrapper:`gap-2.5`,title:`gap-4`,footer:`gap-4`,close:`top-2.5 end-2.5`}}},defaultVariants:{size:`md`}}),[Tg,Eg]=ql(`Toaster`),[Dg,Og]=hf(`ToastUi`),kg=1,Ag=new class{subscribers;toasts;dismissed;constructor(){this.subscribers=[],this.toasts=[],this.dismissed=new Set}subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);t>=0&&this.subscribers.splice(t,1)});publish=e=>{this.subscribers.forEach(t=>t(e))};resetDismissed=e=>{this.dismissed.has(e)&&this.dismissed.delete(e)};upsert=e=>{let t=this.toasts.findIndex(t=>t.id===e.id);if(t<0){this.publish(e),this.toasts=[...this.toasts,e];return}let n={...this.toasts[t],...e};this.publish(n),this.toasts=this.toasts.map((e,r)=>r===t?n:e)};create=e=>{let{message:t,dismissible:n=!0,...r}=e,i=Pg(e.id);this.resetDismissed(i);let a={...r,id:i,dismissible:n,title:t};return this.upsert(a),i};dismiss=e=>{if(e!==void 0)return this.dismissed.add(e),requestAnimationFrame(()=>this.publish({id:e,dismiss:!0})),e;this.toasts.forEach(e=>{this.dismissed.add(e.id),this.publish({id:e.id,dismiss:!0})})};message=(e,t)=>this.create({...t,message:e,type:`default`});error=(e,t)=>this.create({...t,message:e,type:`error`});success=(e,t)=>this.create({...t,message:e,type:`success`});info=(e,t)=>this.create({...t,message:e,type:`info`});warning=(e,t)=>this.create({...t,message:e,type:`warning`});loading=(e,t)=>this.create({...t,message:e,type:`loading`});custom=(e,t)=>{let n=Pg(t?.id),r=t?.dismissible??!0;return this.resetDismissed(n),this.upsert({custom:e,dismissible:r,id:n,...t}),n};promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(typeof e==`function`?e():e),i=n!==void 0,a,o=async(e,t,r,a)=>{i=!1;let{description:o,settings:s}=await Fg(t,r,a,n);this.create({id:n,type:e,description:o,...s})},s=r.then(async e=>{a=[`resolve`,e],Wa(e)?(i=!1,this.create({id:n,type:`default`,message:e})):Ng(e)&&!e.ok?await o(`error`,t.error,t.description,`HTTP error! status: ${e.status}`):e instanceof Error?await o(`error`,t.error,t.description,e):t.success!==void 0&&await o(`success`,t.success,t.description,e)}).catch(async e=>{a=[`reject`,e],t.error!==void 0&&await o(`error`,t.error,t.description,e)}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally?.()}),c=()=>new Promise((e,t)=>s.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:c}:Object.assign(n,{unwrap:c})};getActives=()=>this.toasts.filter(e=>!this.dismissed.has(e.id))},jg=Ag.message,Mg=Object.assign(jg,{success:Ag.success,info:Ag.info,warning:Ag.warning,error:Ag.error,custom:Ag.custom,message:Ag.message,promise:Ag.promise,dismiss:Ag.dismiss,loading:Ag.loading},{getHistory:()=>Ag.toasts,getToasts:()=>Ag.getActives()});function Ng(e){return typeof e==`object`&&!!e&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`}function Pg(e){return typeof e==`number`||typeof e==`string`&&e.length>0?e:kg++}async function Fg(e,t,n,r){let[i,a]=await Promise.all([Ig(e,n),Ig(t,n)]);return{description:a,settings:Rg(i,r)}}async function Ig(e,t){return typeof e==`function`?await e(t):e}function Lg(e){return typeof e==`object`&&!!e&&`message`in e}function Rg(e,t){return Lg(e)?e:{id:t??``,message:e??``}}var zg={gap:`--gap`,offsetTop:`--offset-top`,offsetRight:`--offset-right`,offsetBottom:`--offset-bottom`,offsetLeft:`--offset-left`,mobileOffsetTop:`--mobile-offset-top`,mobileOffsetRight:`--mobile-offset-right`,mobileOffsetBottom:`--mobile-offset-bottom`,mobileOffsetLeft:`--mobile-offset-left`,frontHeight:`--front-toast-height`},Bg={index:`--index`,offset:`--offset`,beforeIndex:`--toasts-before`,zIndex:`--z-index`,swipeAmountX:`--swipe-amount-x`,swipeAmountY:`--swipe-amount-y`,swipeDirection:`--swipe-direction`,swipeOut:`--swipe-out`,initialHeight:`--initial-height`},Vg=`top-right`,Hg=4e3,Ug={info:`lucide:info`,success:`lucide:circle-check`,warning:`lucide:circle-alert`,error:`lucide:circle-x`,close:`lucide:x`,loading:`svg-spinners:270-ring`},Wg=[`top-right`,`top-center`,`top-left`,`bottom-right`,`bottom-center`,`bottom-left`],Gg={left:`left`,right:`right`,top:`up`,bottom:`down`};function Kg(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(Gg[t]),n&&r.push(Gg[n]),r}var qg=e=>{let t={top:zg.offsetTop,right:zg.offsetRight,bottom:zg.offsetBottom,left:zg.offsetLeft},n={top:zg.mobileOffsetTop,right:zg.mobileOffsetRight,bottom:zg.mobileOffsetBottom,left:zg.mobileOffsetLeft},r={};return qu(t).forEach(i=>{let a=(typeof e==`number`?e:e[i])??24;r[t[i]]=`${a}px`,r[n[i]]=`calc(${a}px * 0.67)`}),r},Jg=e=>{if(!e)return{x:0,y:0};let t=e.style.getPropertyValue(Bg.swipeAmountX),n=e.style.getPropertyValue(Bg.swipeAmountY);return{x:Number(t.replace(`px`,``))||0,y:Number(n.replace(`px`,``))||0}},Yg=(e,t)=>{e&&(e.style.setProperty(Bg.swipeAmountX,`${t.x}px`),e.style.setProperty(Bg.swipeAmountY,`${t.y}px`))},Xg=e=>{e&&Yg(e,{x:0,y:0})},Zg=e=>`dismiss`in e&&e.dismiss===!0,Qg=e=>[`altKey`,`ctrlKey`,`metaKey`,`shiftKey`].includes(e),$g=e=>{let{id:t,position:n}=e,r=on([]),i=on([]),a=U(()=>r.value.filter(e=>N(t)&&e.toasterId===N(t)||!e.toasterId)),o=U(()=>{let e=new Set;return a.value.forEach(t=>{let r=t.position||N(n);e.add(r)}),Wg.forEach(t=>{e.has(t)||e.add(t)}),Array.from(e)});return{toasts:r,filtered:a,heights:i,allPositions:o,positionZIndex:U(()=>{let e={};return o.value.forEach((t,n)=>{e[t]=9999-n}),e}),allToasts:U(()=>{let e=Wg.reduce((e,t)=>(e[t]=[],e),{});return a.value.forEach(t=>{let r=t.position||N(n);e[r].push(t)}),e}),allHeights:U(()=>{let e=Wg.reduce((e,t)=>(e[t]=[],e),{});return i.value.forEach(t=>{e[t.position].push(t)}),e})}},e_=P({name:`DynamicRender`,inheritAttrs:!1,__name:`dynamic-render`,props:{is:{}},setup(e){let t=Ci();return(n,r)=>typeof e.is==`string`?(I(),L(F,{key:0},[V(A(e.is),1)],64)):(I(),R(ui(e.is),ge(eo({key:1},M(t))),null,16))}}),t_=[`dir`,`data-rich-color`,`data-inverted`,`data-mounted`,`data-promise`,`data-swiped`,`data-removed`,`data-visible`,`data-y-position`,`data-x-position`,`data-index`,`data-front`,`data-swiping`,`data-dismissible`,`data-type`,`data-swipe-out`,`data-swipe-direction`,`data-expanded`,`data-testid`],n_=P({name:`Toast`,__name:`toast`,props:{index:{},toast:{},position:{}},emits:[`update:height`,`remove`],setup(e,{emit:t}){let n=e,r=t,{dir:i,allToasts:a,allHeights:o,gap:s,duration:c,visibleCounts:l,defaultExpanded:u,swipeDirections:d,interactingPosition:f,expandedPosition:p,showIcon:m,showClose:h,icons:g,toastProps:_,wrapperProps:v,contentProps:y,titleProps:b,descriptionProps:x,iconProps:S,footerProps:C,actionProps:w,cancelProps:ee,closeProps:T}=Eg(`Toast`),E=Og(),D=zr(`toast`),te=zr(`wrapper`),ne=Fu(),{height:re}=Hu(te),ie=Lu(),O=on(null),ae=on(null),oe=on(!1),se=on(!1),ce=on(!1),le=on(!1),ue=on(0),de=on(0),fe=on(n.toast.duration??c.value),pe=on(null),me=on(0),he=on(0),k=on(null),ge=U(()=>n.toast.type),_e=U(()=>{if(m.value){if(n.toast.icon)return n.toast.icon;if(ge.value&&ge.value!=="default")return g.value[ge.value];if(n.toast.promise)return g.value.loading}}),ve=U(()=>n.index===0),ye=U(()=>n.index+1<=l.value),be=U(()=>ge.value===`loading`),xe=U(()=>n.toast.dismissible!==!1),Se=U(()=>Math.max(o.value[n.position].findIndex(e=>e.toastId===n.toast.id),0)),Ce=U(()=>(n.toast.showClose??h.value)&&xe.value&&ge.value!==`loading`),we=U(()=>n.toast.duration??c.value),Te=U(()=>{let[e,t]=n.position.split(`-`);return{x:t,y:e}}),A=U(()=>o.value[n.position].reduce((e,t,n)=>n>=Se.value?e:e+t.height,0)),Ee=U(()=>Se.value*s.value+A.value),De=U(()=>p.value===n.position||u.value&&ne.value),Oe=U(()=>({[Bg.index]:n.index,[Bg.beforeIndex]:n.index,[Bg.zIndex]:a.value[n.position].length-n.index,[Bg.offset]:`${oe.value?ue.value:Ee.value}px`,[Bg.initialHeight]:u.value?`auto`:`${de.value}px`})),ke=()=>{oe.value=!0,ue.value=Ee.value,window.setTimeout(()=>{r(`remove`,n.toast)},200)},Ae=()=>{!be.value&&xe.value&&(ke(),n.toast.onDismiss?.(n.toast))},je=e=>{e.button!==2&&!be.value&&xe.value&&(pe.value=new Date,ue.value=Ee.value,e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(se.value=!0,k.value={x:e.clientX,y:e.clientY}))},Me=()=>{if(ce.value||!xe.value)return;k.value=null;let{x:e,y:t}=Jg(D.value),r=Date.now()-(pe.value?.getTime()??Date.now()),i=O.value===`x`?e:t,a=Math.abs(i)/Math.max(r,1);Math.abs(i)>=45||a>.11?(ue.value=Ee.value,n.toast.onDismiss?.(n.toast),O.value===`x`?ae.value=e>0?`right`:`left`:ae.value=t>0?`down`:`up`,ke(),ce.value=!0):(Xg(D.value),le.value=!1,se.value=!1,O.value=null)},Ne=e=>{if(!k.value||!xe.value||(typeof window<`u`?window.getSelection()?.toString().length??0:0)>0)return;let t=e.clientY-k.value.y,r=e.clientX-k.value.x,i=d.value??Kg(n.position);!O.value&&(Math.abs(r)>1||Math.abs(t)>1)&&(O.value=Math.abs(r)>Math.abs(t)?`x`:`y`);let a={x:0,y:0},o=e=>1/(1.5+Math.abs(e)/20);if(O.value===`y`){if(i.includes(`up`)||i.includes(`down`)){if(i.includes(`up`)&&t<0||i.includes(`down`)&&t>0)a.y=t;else{let e=t*o(t);a.y=Math.abs(e)<Math.abs(t)?e:t}}}else if(O.value===`x`&&(i.includes(`left`)||i.includes(`right`))){if(i.includes(`left`)&&r<0||i.includes(`right`)&&r>0)a.x=r;else{let e=r*o(r);a.x=Math.abs(e)<Math.abs(r)?e:r}}(Math.abs(a.x)>0||Math.abs(a.y)>0)&&(le.value=!0),Yg(D.value,a)},Pe=()=>{se.value=!1,O.value=null,k.value=null},Fe=e=>{n.toast.onAction?.(e),!e.defaultPrevented&&ke()},Ie=e=>{n.toast.onCancel?.(e),xe.value&&ke()};function Le(e){de.value=e,r(`update:height`,{toastId:n.toast.id,height:e,position:n.toast.position??n.position})}function Re(){let e=D.value;if(!e)return;let t=e.style.height;e.style.height=`auto`;let n=e.getBoundingClientRect().height;e.style.height=t,Le(n)}return ir(we,e=>{fe.value=e},{immediate:!0}),ir(re,e=>{ne.value&&e&&Re()},{flush:`post`}),ir(()=>n.toast.delete,e=>{e&&(ke(),n.toast.onDismiss?.(n.toast))}),nr(()=>{let e=n.toast;if(e.type===`loading`||e.promise||e.duration===1/0)return;let t;p.value===n.position||f.value===n.position||ie.value===`hidden`?(()=>{if(he.value<me.value){let e=Date.now()-me.value;fe.value-=e}he.value=Date.now()})():fe.value!==1/0&&(me.value=Date.now(),t=setTimeout(()=>{n.toast.onAutoClose?.(n.toast),ke()},fe.value)),xn(()=>{t!==void 0&&clearTimeout(t)})}),(t,n)=>(I(),L(`li`,eo(M(_),{ref:`toast`,"data-vean-toast":``,class:[M(E).toast,e.toast.ui?.toast],dir:M(i),tabindex:`0`,"data-rich-color":e.toast.richColor,"data-inverted":e.toast.inverted,"data-mounted":M(ne),"data-promise":!!e.toast.promise,"data-swiped":le.value,"data-removed":oe.value,"data-visible":ye.value,"data-y-position":Te.value.y,"data-x-position":Te.value.x,"data-index":e.index,"data-front":ve.value,"data-swiping":se.value,"data-dismissible":xe.value,"data-type":ge.value,"data-swipe-out":ce.value,"data-swipe-direction":ae.value,"data-expanded":De.value,"data-testid":e.toast.testId,style:Oe.value,onDragend:Pe,onPointerdown:je,onPointerup:Me,onPointermove:Ne}),[z(`div`,eo({ref:`wrapper`},M(v),{class:[M(E).wrapper,e.toast.ui?.wrapper],"data-vean-toast-wrapper":``}),[e.toast.custom?(I(),R(ui(e.toast.custom),{key:0})):(I(),L(F,{key:1},[z(`h3`,eo(M(b),{class:[M(E).title,e.toast.ui?.title],"data-vean-toast-title":``}),[_e.value?(I(),R(Sf,eo({key:0},M(S),{icon:_e.value,class:[M(E).icon,e.toast.ui?.icon]}),null,16,[`icon`,`class`])):H(`v-if`,!0),B(e_,{is:e.toast.title},null,8,[`is`])],16),e.toast.description?(I(),L(`p`,eo({key:0},M(x),{class:[M(E).description,e.toast.ui?.description],"data-vean-toast-description":``}),[B(e_,{is:e.toast.description},null,8,[`is`])],16)):H(`v-if`,!0),e.toast.content?(I(),R(ui(e.toast.content),eo({key:1},M(y),{class:[M(E).content,e.toast.ui?.content],"data-vean-toast-content":``}),null,16,[`class`])):H(`v-if`,!0),e.toast.action||e.toast.cancel?(I(),L(`div`,eo({key:2},M(C),{class:[M(E).footer,e.toast.ui?.footer],"data-vean-toast-footer":``}),[e.toast.cancel?(I(),R(_m,eo({key:0},M(ee),{class:[M(E).cancel,e.toast.ui?.cancel],"data-vean-toast-cancel":``,onClick:Ie}),{default:Yn(()=>[B(e_,{is:e.toast.cancel},null,8,[`is`])]),_:1},16,[`class`])):H(`v-if`,!0),e.toast.action?(I(),R(_m,eo({key:1},M(w),{class:[M(E).action,e.toast.ui?.action],"data-vean-toast-action":``,onClick:Fe}),{default:Yn(()=>[B(e_,{is:e.toast.action},null,8,[`is`])]),_:1},16,[`class`])):H(`v-if`,!0)],16)):H(`v-if`,!0)],64))],16),Ce.value&&M(g)?.close?(I(),R(_m,eo({key:0},M(T),{class:[M(E).close,e.toast.ui?.close],"data-vean-toast-close":``,onClick:Ae}),{default:Yn(()=>[B(Sf,{icon:M(g)?.close},null,8,[`icon`])]),_:1},16,[`class`])):H(`v-if`,!0)],16,t_))}}),r_=[`aria-label`],i_=[`dir`,`data-y-position`,`data-x-position`,`onBlur`,`onFocus`,`onMouseenter`,`onMousemove`,`onMouseleave`,`onDragend`,`onPointerdown`,`onPointerup`],a_=P({name:`Toaster`,inheritAttrs:!1,__name:`toaster`,props:{id:{},dir:{},hotkey:{default:()=>[`altKey`,`KeyT`]},customAriaLabel:{},containerAriaLabel:{default:`Notifications`},position:{default:Vg},defaultExpanded:{type:Boolean},duration:{default:Hg},gap:{default:12},offset:{default:24},visibleCounts:{default:3},swipeDirections:{},showIcon:{type:Boolean},showClose:{type:Boolean},icons:{},toastProps:{},wrapperProps:{},contentProps:{},titleProps:{},descriptionProps:{},iconProps:{},footerProps:{},actionProps:{},cancelProps:{},closeProps:{}},setup(e){let t=e,n=Ci(),r=Og(),i=mf(()=>t.dir),a=U(()=>t.hotkey.join(`+`).replace(/Key/g,``).replace(/Digit/g,``)),o=U(()=>t.customAriaLabel??`${t.containerAriaLabel} ${a.value}`),s={},c=(e,t)=>{s[e]=_u(t)},{toasts:l,allToasts:u,filtered:d,heights:f,allHeights:p,allPositions:m,positionZIndex:h}=$g({id:()=>t.id,position:()=>t.position}),g=U(()=>({...Ug,...t.icons})),_=on(null),v=on(null),y=on(null),b=on(null),x=U(()=>({[zg.gap]:`${t.gap}px`,...qg(t.offset)})),S=e=>{_.value===e&&(_.value=null),v.value===e&&(v.value=null),b.value===e&&(b.value=null)},C=e=>{s[e]?.focus()},w=e=>{if(f.value.findIndex(t=>t.toastId===e.toastId)!==-1){f.value=f.value.map(t=>t.toastId===e.toastId?e:t);return}let t=f.value.findIndex(t=>t.position===e.position);t===-1?f.value=[e,...f.value]:f.value=[...f.value.slice(0,t),e,...f.value.slice(t)]},ee=e=>{let t=l.value.findIndex(t=>t.id===e.id);if(t!==-1){let n=Object.assign({},l.value[t],e);l.value=[...l.value.slice(0,t),n,...l.value.slice(t+1)]}else l.value=[e,...l.value]},T=e=>{l.value=l.value.filter(t=>t.id!==e.id||(t.delete||Ag.dismiss(e.id),!1)),f.value=f.value.filter(t=>t.toastId!==e.id)},E=(e,t)=>{let n=t.currentTarget;b.value===e&&n&&!n.contains(t.relatedTarget)&&(b.value=null,_.value===e&&v.value!==e&&(_.value=null),y.value&&=(y.value.focus({preventScroll:!0}),null))},D=(e,t)=>{t.target.dataset.dismissible!==`false`&&b.value!==e&&(b.value=e,y.value=t.relatedTarget)},te=e=>{_.value=e},ne=e=>{v.value!==e&&b.value!==e&&_.value===e&&(_.value=null)},re=(e,t)=>{t.target.dataset.dismissible!==`false`&&(v.value=e,_.value=e)},ie=e=>{v.value===e&&(v.value=null)};return Tg({dir:i,allToasts:u,allHeights:p,interactingPosition:v,expandedPosition:_,icons:g,...vu(t,[`gap`,`duration`,`visibleCounts`,`defaultExpanded`,`swipeDirections`,`showIcon`,`showClose`,`toastProps`,`wrapperProps`,`contentProps`,`titleProps`,`descriptionProps`,`iconProps`,`footerProps`,`actionProps`,`cancelProps`,`closeProps`])}),nr(()=>{let e=Ag.subscribe(e=>{Zg(e)?requestAnimationFrame(()=>{l.value=l.value.map(t=>t.id===e.id?{...t,delete:!0}:t)}):Fn(()=>{ee(e)})});xn(()=>{e()})},{flush:`post`}),ir(()=>l.value.length,e=>{e===0&&(_.value=null,v.value=null,b.value=null)}),ir(()=>d.value,e=>{let n=new Set(e.map(e=>e.position??t.position));_.value&&!n.has(_.value)&&(_.value=null),v.value&&!n.has(v.value)&&(v.value=null),b.value&&!n.has(b.value)&&(b.value=null)},{deep:!0}),nr(()=>{if(!Jl)return;let e=e=>{if(t.hotkey.length>0&&t.hotkey.every(t=>Qg(t)?e[t]:e.code===t)){let e=d.value[0]?.position??t.position??m.value[0];_.value=e,C(e)}let n=Object.values(s).some(e=>e===document.activeElement||e?.contains(document.activeElement));e.code===`Escape`&&n&&(_.value=null,b.value=null)};document.addEventListener(`keydown`,e),xn(()=>{document.removeEventListener(`keydown`,e)})}),ni(()=>{y.value&&(y.value.focus({preventScroll:!0}),y.value=null,b.value=null)}),(e,t)=>(I(),L(F,null,[z(`section`,{"data-vean-toaster-container":``,"aria-label":o.value,tabindex:`-1`,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`},[(I(!0),L(F,null,pi(M(Wg),e=>(I(),L(`ol`,eo({key:e},{ref_for:!0},M(n),{ref_for:!0,ref:t=>c(e,t),class:M(r).toaster,tabindex:`-1`,dir:M(i),"data-vean-toaster":``,"data-y-position":e.split(`-`)[0],"data-x-position":e.split(`-`)[1],style:{"--z-index":M(h)[e],"--front-toast-height":`${M(p)[e][0]?.height??0}px`,...x.value},onBlur:t=>E(e,t),onFocus:t=>D(e,t),onMouseenter:t=>te(e),onMousemove:t=>te(e),onMouseleave:t=>ne(e),onDragend:t=>S(e),onPointerdown:t=>re(e,t),onPointerup:t=>ie(e)}),[(I(!0),L(F,null,pi(M(u)[e],(t,n)=>(I(),R(n_,{key:t.id,index:n,toast:t,position:e,"onUpdate:height":w,onRemove:T},null,8,[`index`,`toast`,`position`]))),128))],16,i_))),128))],8,r_),hi(e.$slots,`default`)],64))}}),o_=P({name:`ToastProvider`,__name:`toast-provider`,props:{id:{},dir:{},hotkey:{},customAriaLabel:{},containerAriaLabel:{},position:{},defaultExpanded:{type:Boolean},duration:{},gap:{},offset:{},visibleCounts:{},swipeDirections:{},showIcon:{type:Boolean},showClose:{type:Boolean},icons:{},toastProps:{},wrapperProps:{},contentProps:{},titleProps:{},descriptionProps:{},iconProps:{},footerProps:{},actionProps:{},cancelProps:{},closeProps:{}},setup(e){let t=e;return(e,n)=>(I(),R(a_,eo({"data-vean-toast-provider":``},t),{default:Yn(()=>[hi(e.$slots,`default`)]),_:3},16))}}),s_=P({name:`SToastProvider`,__name:`toast-provider`,props:{size:{},ui:{},id:{},dir:{},hotkey:{},customAriaLabel:{},containerAriaLabel:{},position:{},defaultExpanded:{type:Boolean},duration:{},gap:{},offset:{},visibleCounts:{},swipeDirections:{},showIcon:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},icons:{},toastProps:{},wrapperProps:{},contentProps:{},titleProps:{},descriptionProps:{},iconProps:{},footerProps:{},actionProps:{},cancelProps:{},closeProps:{}},setup(e){let t=e,n=Yd(t,[`size`,`ui`]);return Dg(U(()=>wg({size:t.size},t.ui))),(e,t)=>(I(),R(M(o_),ge(Ya(M(n))),{default:Yn(()=>[hi(e.$slots,`default`)]),_:3},16))}});function c_(e){return!!e&&`light`in e}function l_(e){return{...e?.options,...e?.mode?{mode:e.mode}:{}}}function u_(e,t){for(let n of Object.keys(e))n in t||delete e[n];Object.assign(e,t)}function d_(e){if(e)return{light:e.light,...e.dark?{dark:e.dark}:{}}}function f_(e){let{presetInput:t,appliedName:n,persist:r,isServer:i,presets:a,presetProvider:o}=e;if(c_(t))return t;let s=t?.name??n;if(!s||!r)return;let c=i?o?.(s)??void 0:a[s];return!c&&i&&console.warn(`[SConfigProvider] theme preset "${s}" not found, falling back to built-in colors.`),c}function p_(e){let{propTheme:t={},state:n,preset:r}=e;return{base:t.base??n.base??Lm.base,primary:t.primary??n.primary??Lm.primary,feedback:t.feedback??n.feedback,overrides:t.overrides??n.overrides??d_(r),size:t.size??n.size??Lm.size,radius:t.radius??n.radius??Lm.radius,spacing:t.spacing??n.spacing,font:t.font??n.font,format:t.format??n.format,surfaceStyle:t.surfaceStyle??n.surfaceStyle,borderOpacity:t.borderOpacity??n.borderOpacity,prefix:t.prefix??n.prefix??Lm.prefix,styleTarget:t.styleTarget??n.styleTarget,darkSelector:t.darkSelector??n.darkSelector}}function m_(e,t){if(typeof document>`u`)return;document.documentElement.style.colorScheme=th(e,t);let n=$m(t);if(!n)return;let r=document.createElement(`style`);r.appendChild(document.createTextNode(`*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}`)),document.head.appendChild(r),document.documentElement.classList.toggle(n,e===`dark`),window.getComputedStyle(r).opacity,document.head.removeChild(r)}function h_(){return typeof window>`u`}var[g_,__]=ql(`UiThemeContext`);function v_(e,t){return e.persistTheme?e.themeConfig?e.themeConfig:t?null:hg():null}function y_(e,t){return U({get:()=>e[t]??Lm[t],set:n=>{e[t]=n}})}function b_(){return typeof window>`u`||typeof window.matchMedia!=`function`?null:window.matchMedia(`(prefers-color-scheme: dark)`)}function x_(e){let t=e.isServer??h_(),n=v_(e,t),r=Gt(l_(n)),i=y_(r,`base`),a=y_(r,`primary`),o=y_(r,`radius`),s=y_(r,`size`),c=y_(r,`spacing`),l=U({get:()=>r.mode??`light`,set:e=>{r.mode=e}}),u=b_(),d=j(u?.matches??!1),f=e=>{d.value=e.matches};u?.addEventListener(`change`,f),ri(()=>{u?.removeEventListener(`change`,f)});let p=U(()=>l.value===`auto`?d.value?`dark`:`light`:l.value),m=j(n?.presets??{}),h=j(n?.appliedPreset??null),g=U(()=>p_({propTheme:e.theme,state:r,preset:f_({presetInput:e.theme?.preset,appliedName:h.value,persist:!!e.persistTheme,isServer:t,presets:m.value,presetProvider:e.presetProvider})}));return ir([p,U(()=>g.value.darkSelector??Lm.darkSelector)],([e,t])=>m_(e,t),{immediate:!0}),{base:i,primary:a,radius:o,size:s,spacing:c,mode:l,effectiveMode:p,setRadius:e=>{o.value=e},setSize:e=>{s.value=e},setSpacing:e=>{c.value=e},setMode:e=>{l.value=e},customPresets:m,appliedPresetName:h,savePreset:e=>{let t={light:{primary:`${a.value}.600`,ring:`${a.value}.500`},dark:{primary:`${a.value}.400`,ring:`${a.value}.300`}};return m.value={...m.value,[e]:t},h.value=e,!0},removePreset:e=>{if(!(e in m.value))return!1;let{[e]:t,...n}=m.value;return m.value=n,h.value===e&&(h.value=null),!0},applyPreset:e=>{h.value=e},resetPreset:()=>{h.value=null},theme:g,setThemeState:e=>{Object.assign(r,e)},refreshThemeConfig:()=>{if(!e.persistTheme||e.themeConfig)return;let t=hg();t&&(u_(r,l_(t)),m.value=t.presets??{},h.value=t.appliedPreset??null)}}}var S_=Symbol.for(`UIConfigProvider`),C_=/^[a-z0-9]+(-[a-z0-9]+)*$/,w_=(e,t,n,r=``)=>{let i=e.split(`:`);if(e.slice(0,1)===`@`){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){let e=i.pop(),n=i.pop(),a={provider:i.length>0?i[0]:r,prefix:n,name:e};return t&&!T_(a)?null:a}let a=i[0],o=a.split(`-`);if(o.length>1){let e={provider:r,prefix:o.shift(),name:o.join(`-`)};return t&&!T_(e)?null:e}if(n&&r===``){let e={provider:r,prefix:``,name:a};return t&&!T_(e,n)?null:e}return null},T_=(e,t)=>e?!!((t&&e.prefix===``||e.prefix)&&e.name):!1;function E_(e,t){let n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function a(e){if(n[e])return i[e]=[];if(!(e in i)){i[e]=null;let t=r[e]&&r[e].parent,n=t&&a(t);n&&(i[e]=[t].concat(n))}return i[e]}return Object.keys(n).concat(Object.keys(r)).forEach(a),i}var D_=Object.freeze({left:0,top:0,width:16,height:16}),O_=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),k_=Object.freeze({...D_,...O_}),A_=Object.freeze({...k_,body:``,hidden:!1});function j_(e,t){let n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);let r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function M_(e,t){let n=j_(e,t);for(let r in A_)r in O_?r in e&&!(r in n)&&(n[r]=O_[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function N_(e,t,n){let r=e.icons,i=e.aliases||Object.create(null),a={};function o(e){a=M_(r[e]||i[e],a)}return o(t),n.forEach(o),M_(e,a)}function P_(e,t){let n=[];if(typeof e!=`object`||typeof e.icons!=`object`)return n;e.not_found instanceof Array&&e.not_found.forEach(e=>{t(e,null),n.push(e)});let r=E_(e);for(let i in r){let a=r[i];a&&(t(i,N_(e,i,a)),n.push(i))}return n}var F_={provider:``,aliases:{},not_found:{},...D_};function I_(e,t){for(let n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function L_(e){if(typeof e!=`object`||!e)return null;let t=e;if(typeof t.prefix!=`string`||!e.icons||typeof e.icons!=`object`||!I_(e,F_))return null;let n=t.icons;for(let e in n){let t=n[e];if(!e||typeof t.body!=`string`||!I_(t,A_))return null}let r=t.aliases||Object.create(null);for(let e in r){let t=r[e],i=t.parent;if(!e||typeof i!=`string`||!n[i]&&!r[i]||!I_(t,A_))return null}return t}var R_=Object.create(null);function z_(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function B_(e,t){let n=R_[e]||(R_[e]=Object.create(null));return n[t]||(n[t]=z_(e,t))}function V_(e,t){return L_(t)?P_(t,(t,n)=>{n?e.icons[t]=n:e.missing.add(t)}):[]}function H_(e,t,n){try{if(typeof n.body==`string`)return e.icons[t]={...n},!0}catch{}return!1}var U_=!1;function W_(e){return typeof e==`boolean`&&(U_=e),U_}function G_(e){let t=typeof e==`string`?w_(e,!0,U_):e;if(t){let e=B_(t.provider,t.prefix),n=t.name;return e.icons[n]||(e.missing.has(n)?null:void 0)}}function K_(e,t){let n=w_(e,!0,U_);if(!n)return!1;let r=B_(n.provider,n.prefix);return t?H_(r,n.name,t):(r.missing.add(n.name),!0)}function q_(e,t){if(typeof e!=`object`)return!1;if(typeof t!=`string`&&(t=e.provider||``),U_&&!t&&!e.prefix){let t=!1;return L_(e)&&(e.prefix=``,P_(e,(e,n)=>{K_(e,n)&&(t=!0)})),t}let n=e.prefix;return T_({prefix:n,name:`a`})?!!V_(B_(t,n),e):!1}var J_=Object.freeze({width:null,height:null}),Y_=Object.freeze({...J_,...O_}),X_=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Z_=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Q_(e,t,n){if(t===1)return e;if(n||=100,typeof e==`number`)return Math.ceil(e*t*n)/n;if(typeof e!=`string`)return e;let r=e.split(X_);if(r===null||!r.length)return e;let i=[],a=r.shift(),o=Z_.test(a);for(;;){if(o){let e=parseFloat(a);isNaN(e)?i.push(a):i.push(Math.ceil(e*t*n)/n)}else i.push(a);if(a=r.shift(),a===void 0)return i.join(``);o=!o}}function $_(e,t=`defs`){let n=``,r=e.indexOf(`<`+t);for(;r>=0;){let i=e.indexOf(`>`,r),a=e.indexOf(`</`+t);if(i===-1||a===-1)break;let o=e.indexOf(`>`,a);if(o===-1)break;n+=e.slice(i+1,a).trim(),e=e.slice(0,r).trim()+e.slice(o+1)}return{defs:n,content:e}}function ev(e,t){return e?`<defs>`+e+`</defs>`+t:t}function tv(e,t,n){let r=$_(e);return ev(r.defs,t+r.content+n)}var nv=e=>e===`unset`||e===`undefined`||e===`none`;function rv(e,t){let n={...k_,...e},r={...Y_,...t},i={left:n.left,top:n.top,width:n.width,height:n.height},a=n.body;[n,r].forEach(e=>{let t=[],n=e.hFlip,r=e.vFlip,o=e.rotate;n?r?o+=2:(t.push(`translate(`+(i.width+i.left).toString()+` `+(0-i.top).toString()+`)`),t.push(`scale(-1 1)`),i.top=i.left=0):r&&(t.push(`translate(`+(0-i.left).toString()+` `+(i.height+i.top).toString()+`)`),t.push(`scale(1 -1)`),i.top=i.left=0);let s;switch(o<0&&(o-=Math.floor(o/4)*4),o%=4,o){case 1:s=i.height/2+i.top,t.unshift(`rotate(90 `+s.toString()+` `+s.toString()+`)`);break;case 2:t.unshift(`rotate(180 `+(i.width/2+i.left).toString()+` `+(i.height/2+i.top).toString()+`)`);break;case 3:s=i.width/2+i.left,t.unshift(`rotate(-90 `+s.toString()+` `+s.toString()+`)`)}o%2==1&&(i.left!==i.top&&(s=i.left,i.left=i.top,i.top=s),i.width!==i.height&&(s=i.width,i.width=i.height,i.height=s)),t.length&&(a=tv(a,`<g transform="`+t.join(` `)+`">`,`</g>`))});let o=r.width,s=r.height,c=i.width,l=i.height,u,d;o===null?(d=s===null?`1em`:s===`auto`?l:s,u=Q_(d,c/l)):(u=o===`auto`?c:o,d=s===null?Q_(u,l/c):s===`auto`?l:s);let f={},p=(e,t)=>{nv(t)||(f[e]=t.toString())};p(`width`,u),p(`height`,d);let m=[i.left,i.top,c,l];return f.viewBox=m.join(` `),{attributes:f,viewBox:m,body:a}}var iv=/\sid="(\S+)"/g,av=new Map;function ov(e){e=e.replace(/[0-9]+$/,``)||`a`;let t=av.get(e)||0;return av.set(e,t+1),t?`${e}${t}`:e}function sv(e){let t=[],n;for(;n=iv.exec(e);)t.push(n[1]);if(!t.length)return e;let r=`suffix`+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(t=>{let n=ov(t),i=t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);e=e.replace(RegExp(`([#;"])(`+i+`)([")]|\\.[a-z])`,`g`),`$1`+n+r+`$3`)}),e=e.replace(new RegExp(r,`g`),``),e}var cv=Object.create(null);function lv(e,t){cv[e]=t}function uv(e){return cv[e]||cv[``]}function dv(e){let t;if(typeof e.resources==`string`)t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||`/`,maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}var fv=Object.create(null);fv[``]=dv({resources:[`https://api.iconify.design`]});function pv(e,t){let n=dv(t);return n!==null&&(fv[e]=n,!0)}function mv(e){return fv[e]}var hv=(()=>{let e;try{if(e=fetch,typeof e==`function`)return e}catch{}})();function gv(e,t){let n=mv(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let e=0;n.resources.forEach(t=>{e=Math.max(e,t.length)});let i=t+`.json?icons=`;r=n.maxURL-e-n.path.length-i.length}return r}function _v(e){return e===404}var vv=(e,t,n)=>{let r=[],i=gv(e,t),a=`icons`,o={type:a,provider:e,prefix:t,icons:[]},s=0;return n.forEach((n,c)=>{s+=n.length+1,s>=i&&c>0&&(r.push(o),o={type:a,provider:e,prefix:t,icons:[]},s=n.length),o.icons.push(n)}),r.push(o),r};function yv(e){if(typeof e==`string`){let t=mv(e);if(t)return t.path}return`/`}var bv={prepare:vv,send:(e,t,n)=>{if(!hv){n(`abort`,424);return}let r=yv(t.provider);switch(t.type){case`icons`:{let e=t.prefix,n=t.icons.join(`,`),i=new URLSearchParams({icons:n});r+=e+`.json?`+i.toString();break}case`custom`:{let e=t.uri;r+=e.slice(0,1)===`/`?e.slice(1):e;break}default:n(`abort`,400);return}let i=503;hv(e+r).then(e=>{let t=e.status;if(t!==200)setTimeout(()=>{n(_v(t)?`abort`:`next`,t)});else return i=501,e.json()}).then(e=>{setTimeout(typeof e!=`object`||!e?()=>{e===404?n(`abort`,e):n(`next`,i)}:()=>{n(`success`,e)})}).catch(()=>{n(`next`,i)})}};function xv(e,t){e.forEach(e=>{let n=e.loaderCallbacks;n&&(e.loaderCallbacks=n.filter(e=>e.id!==t))})}function Sv(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;let t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1,r=e.provider,i=e.prefix;t.forEach(t=>{let a=t.icons,o=a.pending.length;a.pending=a.pending.filter(t=>{if(t.prefix!==i)return!0;let o=t.name;if(e.icons[o])a.loaded.push({provider:r,prefix:i,name:o});else if(e.missing.has(o))a.missing.push({provider:r,prefix:i,name:o});else return n=!0,!0;return!1}),a.pending.length!==o&&(n||xv([e],t.id),t.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),t.abort))})}))}var Cv=0;function wv(e,t,n){let r=Cv++,i=xv.bind(null,n,r);if(!t.pending.length)return i;let a={id:r,icons:t,callback:e,abort:i};return n.forEach(e=>{(e.loaderCallbacks||=[]).push(a)}),i}function Tv(e){let t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((e,t)=>e.provider===t.provider?e.prefix===t.prefix?e.name.localeCompare(t.name):e.prefix.localeCompare(t.prefix):e.provider.localeCompare(t.provider));let r={provider:``,prefix:``,name:``};return e.forEach(e=>{if(r.name===e.name&&r.prefix===e.prefix&&r.provider===e.provider)return;r=e;let i=e.provider,a=e.prefix,o=e.name,s=n[i]||(n[i]=Object.create(null)),c=s[a]||(s[a]=B_(i,a)),l;l=o in c.icons?t.loaded:a===``||c.missing.has(o)?t.missing:t.pending;let u={provider:i,prefix:a,name:o};l.push(u)}),t}function Ev(e,t=!0,n=!1){let r=[];return e.forEach(e=>{let i=typeof e==`string`?w_(e,t,n):e;i&&r.push(i)}),r}var Dv={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Ov(e,t,n,r){let i=e.resources.length,a=e.random?Math.floor(Math.random()*i):e.index,o;if(e.random){let t=e.resources.slice(0);for(o=[];t.length>1;){let e=Math.floor(Math.random()*t.length);o.push(t[e]),t=t.slice(0,e).concat(t.slice(e+1))}o=o.concat(t)}else o=e.resources.slice(a).concat(e.resources.slice(0,a));let s=Date.now(),c=`pending`,l=0,u,d=null,f=[],p=[];typeof r==`function`&&p.push(r);function m(){d&&=(clearTimeout(d),null)}function h(){c===`pending`&&(c=`aborted`),m(),f.forEach(e=>{e.status===`pending`&&(e.status=`aborted`)}),f=[]}function g(e,t){t&&(p=[]),typeof e==`function`&&p.push(e)}function _(){return{startTime:s,payload:t,status:c,queriesSent:l,queriesPending:f.length,subscribe:g,abort:h}}function v(){c=`failed`,p.forEach(e=>{e(void 0,u)})}function y(){f.forEach(e=>{e.status===`pending`&&(e.status=`aborted`)}),f=[]}function b(t,n,r){let i=n!==`success`;switch(f=f.filter(e=>e!==t),c){case`pending`:break;case`failed`:if(i||!e.dataAfterTimeout)return;break;default:return}if(n===`abort`)u=r,v();else if(i)u=r,f.length||(o.length?x():v());else{if(m(),y(),!e.random){let n=e.resources.indexOf(t.resource);n!==-1&&n!==e.index&&(e.index=n)}c=`completed`,p.forEach(e=>{e(r)})}}function x(){if(c!==`pending`)return;m();let r=o.shift();if(r===void 0){if(f.length){d=setTimeout(()=>{m(),c===`pending`&&(y(),v())},e.timeout);return}v();return}let i={status:`pending`,resource:r,callback:(e,t)=>{b(i,e,t)}};f.push(i),l++,d=setTimeout(x,e.rotate),n(r,t,i.callback)}return setTimeout(x),_}function kv(e){let t={...Dv,...e},n=[];function r(){n=n.filter(e=>e().status===`pending`)}function i(e,i,a){let o=Ov(t,e,i,(e,t)=>{r(),a&&a(e,t)});return n.push(o),o}function a(e){return n.find(t=>e(t))||null}return{query:i,find:a,setIndex:e=>{t.index=e},getIndex:()=>t.index,cleanup:r}}function Av(){}var jv=Object.create(null);function Mv(e){if(!jv[e]){let t=mv(e);if(!t)return;jv[e]={config:t,redundancy:kv(t)}}return jv[e]}function Nv(e,t,n){let r,i;if(typeof e==`string`){let t=uv(e);if(!t)return n(void 0,424),Av;i=t.send;let a=Mv(e);a&&(r=a.redundancy)}else{let t=dv(e);if(t){r=kv(t);let n=uv(e.resources?e.resources[0]:``);n&&(i=n.send)}}return!r||!i?(n(void 0,424),Av):r.query(t,i,n)().abort}function Pv(){}function Fv(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Sv(e)}))}function Iv(e){let t=[],n=[];return e.forEach(e=>{(e.match(C_)?t:n).push(e)}),{valid:t,invalid:n}}function Lv(e,t,n){function r(){let n=e.pendingIcons;t.forEach(t=>{n&&n.delete(t),e.icons[t]||e.missing.add(t)})}if(n&&typeof n==`object`)try{if(!V_(e,n).length){r();return}}catch(e){console.error(e)}r(),Fv(e)}function Rv(e,t){e instanceof Promise?e.then(e=>{t(e)}).catch(()=>{t(null)}):t(e)}function zv(e,t){e.iconsToLoad=e.iconsToLoad?e.iconsToLoad.concat(t).sort():t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;let{provider:t,prefix:n}=e,r=e.iconsToLoad;if(delete e.iconsToLoad,!r||!r.length)return;let i=e.loadIcon;if(e.loadIcons&&(r.length>1||!i)){Rv(e.loadIcons(r,n,t),t=>{Lv(e,r,t)});return}if(i){r.forEach(r=>{Rv(i(r,n,t),t=>{Lv(e,[r],t?{prefix:n,icons:{[r]:t}}:null)})});return}let{valid:a,invalid:o}=Iv(r);if(o.length&&Lv(e,o,null),!a.length)return;let s=n.match(C_)?uv(t):null;s?s.prepare(t,n,a).forEach(n=>{Nv(t,n,t=>{Lv(e,n.icons,t)})}):Lv(e,a,null)}))}var Bv=(e,t)=>{let n=Tv(Ev(e,!0,W_()));if(!n.pending.length){let e=!0;return t&&setTimeout(()=>{e&&t(n.loaded,n.missing,n.pending,Pv)}),()=>{e=!1}}let r=Object.create(null),i=[],a,o;return n.pending.forEach(e=>{let{provider:t,prefix:n}=e;if(n===o&&t===a)return;a=t,o=n,i.push(B_(t,n));let s=r[t]||(r[t]=Object.create(null));s[n]||(s[n]=[])}),n.pending.forEach(e=>{let{provider:t,prefix:n,name:i}=e,a=B_(t,n),o=a.pendingIcons||=new Set;o.has(i)||(o.add(i),r[t][n].push(i))}),i.forEach(e=>{let t=r[e.provider][e.prefix];t.length&&zv(e,t)}),t?wv(t,n,i):Pv};function Vv(e,t){let n={...e};for(let e in t){let r=t[e],i=typeof r;e in J_?(r===null||r&&(i===`string`||i===`number`))&&(n[e]=r):i===typeof n[e]&&(n[e]=e===`rotate`?r%4:r)}return n}var Hv=/[\s,]+/;function Uv(e,t){t.split(Hv).forEach(t=>{switch(t.trim()){case`horizontal`:e.hFlip=!0;break;case`vertical`:e.vFlip=!0}})}function Wv(e,t=0){let n=e.replace(/^-?[0-9.]*/,``);function r(e){for(;e<0;)e+=4;return e%4}if(n===``){let t=parseInt(e);return isNaN(t)?0:r(t)}if(n!==e){let t=0;switch(n){case`%`:t=25;break;case`deg`:t=90}if(t){let i=parseFloat(e.slice(0,e.length-n.length));return isNaN(i)?0:(i/=t,i%1==0?r(i):0)}}return t}function Gv(e,t){let n=e.indexOf(`xlink:`)===-1?``:` xmlns:xlink="http://www.w3.org/1999/xlink"`;for(let e in t)n+=` `+e+`="`+t[e]+`"`;return`<svg xmlns="http://www.w3.org/2000/svg"`+n+`>`+e+`</svg>`}function Kv(e){return e.replace(/"/g,`'`).replace(/%/g,`%25`).replace(/#/g,`%23`).replace(/</g,`%3C`).replace(/>/g,`%3E`).replace(/\s+/g,` `).replace(/:/g,`%3A`).replace(/\//g,`%2F`)}function qv(e){return`data:image/svg+xml,`+Kv(e)}function Jv(e){return`url("`+qv(e)+`")`}var Yv={...Y_,inline:!1},Xv={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":!0,role:`img`},Zv={display:`inline-block`},Qv={backgroundColor:`currentColor`},$v={backgroundColor:`transparent`},ey={Image:`var(--svg)`,Repeat:`no-repeat`,Size:`100% 100%`},ty={webkitMask:Qv,mask:Qv,background:$v};for(let e in ty){let t=ty[e];for(let n in ey)t[e+n]=ey[n]}var ny={};[`horizontal`,`vertical`].forEach(e=>{let t=e.slice(0,1)+`Flip`;ny[e+`-flip`]=t,ny[e.slice(0,1)+`-flip`]=t,ny[e+`Flip`]=t});function ry(e){return e+(e.match(/^[-0-9.]+$/)?`px`:``)}var iy=(e,t)=>{let n=Vv(Yv,t),r={...Xv},i=t.mode||`svg`,a={},o=t.style,s=typeof o==`object`&&!(o instanceof Array)?o:{};for(let e in t){let i=t[e];if(i!==void 0)switch(e){case`icon`:case`style`:case`onLoad`:case`mode`:case`ssr`:case`customise`:break;case`inline`:case`hFlip`:case`vFlip`:n[e]=i===!0||i===`true`||i===1;break;case`flip`:break;case`color`:a.color=i;break;case`rotate`:typeof i==`string`?n[e]=Wv(i):typeof i==`number`&&(n[e]=i);break;case`ariaHidden`:case`aria-hidden`:i!==!0&&i!==`true`&&delete r[`aria-hidden`];break;default:{let t=ny[e];t?(i===!0||i===`true`||i===1)&&(n[t]=!0):Yv[e]===void 0&&(r[e]=i)}}}typeof t.flip==`string`&&Uv(n,t.flip);let c=rv(e,n),l=c.attributes;if(n.inline&&(a.verticalAlign=`-0.125em`),i===`svg`)return r.style={...a,...s},Object.assign(r,l),r.innerHTML=sv(c.body),wo(`svg`,r);let{body:u,width:d,height:f}=e,p=i===`mask`||i!==`bg`&&u.indexOf(`currentColor`)!==-1,m=Gv(u,{...l,width:d+``,height:f+``});return r.style={...a,"--svg":Jv(m),width:ry(l.width),height:ry(l.height),...Zv,...p?Qv:$v,...s},wo(`span`,r)};if(W_(!0),lv(``,bv),typeof document<`u`&&typeof window<`u`){let e=window;if(e.IconifyPreload!==void 0){let t=e.IconifyPreload,n=`Invalid IconifyPreload syntax.`;typeof t==`object`&&t&&(t instanceof Array?t:[t]).forEach(e=>{try{(typeof e!=`object`||!e||e instanceof Array||typeof e.icons!=`object`||typeof e.prefix!=`string`||!q_(e))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){let t=e.IconifyProviders;if(typeof t==`object`&&t)for(let e in t){let n=`IconifyProviders[`+e+`] is invalid.`;try{let r=t[e];if(typeof r!=`object`||!r||r.resources===void 0)continue;pv(e,r)||console.error(n)}catch{console.error(n)}}}}var ay={...k_,body:``},oy=P((e,{emit:t})=>{let n=j(null);function r(){n.value&&=(n.value.abort?.(),null)}let i=j(!!e.ssr),a=j(``),o=on(null);function s(){let i=e.icon;if(typeof i==`object`&&i&&typeof i.body==`string`)return a.value=``,{data:i};let o;if(typeof i!=`string`||(o=w_(i,!1,!0))===null)return null;let s=G_(o);if(!s){let e=n.value;return e&&e.name===i||(s===null?n.value={name:i}:n.value={name:i,abort:Bv([o],c)}),null}r(),a.value!==i&&(a.value=i,Fn(()=>{t(`load`,i)}));let l=e.customise;if(l){s=Object.assign({},s);let e=l(s.body,o.name,o.prefix,o.provider);typeof e==`string`&&(s.body=e)}let u=[`iconify`];return o.prefix!==``&&u.push(`iconify--`+o.prefix),o.provider!==``&&u.push(`iconify--`+o.provider),{data:s,classes:u}}function c(){let e=s();e?e.data!==o.value?.data&&(o.value=e):o.value=null}return i.value?c():$r(()=>{i.value=!0,c()}),ir(()=>e.icon,c),ri(r),()=>{let t=o.value;if(!t)return iy(ay,e);let n=e;return t.classes&&(n={...e,class:t.classes.join(` `)}),iy({...k_,...t.data},n)}},{props:{icon:{type:[String,Object],required:!0},mode:{type:String},ssr:{type:Boolean},width:{type:[String,Number]},height:{type:[String,Number]},style:{type:[String,Object]},color:{type:String},inline:{type:Boolean},rotate:{type:[Number,String]},hFlip:{type:Boolean},horizontalFlip:{type:Boolean},vFlip:{type:Boolean},verticalFlip:{type:Boolean},flip:{type:String},id:{type:String},ariaHidden:{type:[Boolean,String],default:void 0},customise:{type:Function},title:{type:String}},emits:[`load`]}),W=P({name:`SIcon`,__name:`icon`,props:{icon:{},ariaHidden:{type:Boolean,default:!0},ariaLabel:{},ariaLabelledby:{},ssr:{type:Boolean},customise:{},id:{},style:{},title:{},mode:{},color:{},flip:{},horizontalFlip:{type:Boolean},verticalFlip:{type:Boolean},rotate:{},hFlip:{type:Boolean},vFlip:{type:Boolean},width:{},height:{},inline:{type:Boolean}},setup(e){let t=e,n=$n(S_),r=U(()=>{let{width:e,height:r}=t,i=n?.iconify||{};return{width:e||i.width,height:r||i.height}}),i=U(()=>t.ariaLabel||t.ariaLabelledby?!1:t.ariaHidden),a=U(()=>({"aria-hidden":i.value,"aria-label":t.ariaLabel,"aria-labelledby":t.ariaLabelledby})),o=U(()=>s(t.icon)?{...a.value,"data-allow-mismatch":`class,attribute`,...r.value,mode:t.mode,color:t.color,flip:t.flip,horizontalFlip:t.horizontalFlip||void 0,verticalFlip:t.verticalFlip||void 0,rotate:t.rotate,hFlip:t.hFlip||void 0,vFlip:t.vFlip||void 0,inline:t.inline,id:t.id,style:t.style,title:t.title,ssr:t.ssr,customise:t.customise,icon:t.icon}:null);function s(e){return e?typeof e==`string`||typeof e==`object`&&`body`in e:!1}return(t,n)=>o.value?(I(),R(M(oy),eo({key:0},o.value,{class:`shrink-0`,"data-vean-icon":``}),null,16)):e.icon?(I(),R(ui(e.icon),eo({key:1,class:`shrink-0`,"data-vean-icon":``},a.value,{style:{width:r.value.width,height:r.value.height}}),null,16,[`style`])):H(`v-if`,!0)}}),sy=P({name:`ConfigProvider`,__name:`config-provider`,props:{dir:{},locale:{default:`en`},nonce:{default:void 0},tooltip:{},iconRender:{},linkComponent:{},messages:{}},setup(e){return ff(Jt(e)),(e,t)=>hi(e.$slots,`default`)}}),[cy,ly]=ql(`DialogRoot`,e=>{let[t,n]=yu(),[r,i]=yu(),[a,o]=yu(),[s,c]=yu(),[l,u]=yu(),{open:d,fullscreen:f}=e,p=e=>{d.value=e},m=()=>{d.value=!d.value},h=e=>{f.value=e},g=()=>{f.value=!f.value},_=U(()=>yf(d.value)),v=on(``),y=`vean-dialog-popup-${Lr()}`,b=()=>{v.value||=y},x=on(``),S=`vean-dialog-title-${Lr()}`,C=()=>{x.value||=S},w=on(``),ee=`vean-dialog-description-${Lr()}`,T=()=>{w.value||=ee},E=async()=>{await Fn(),s.value?.focus({preventScroll:!0})};return{...e,onOpenChange:p,onOpenToggle:m,onFullscreenChange:h,onFullscreenToggle:g,dataState:_,overlayElement:t,setOverlayElement:n,triggerElement:r,setTriggerElement:i,popupElement:a,setPopupElement:o,cancelElement:s,setCancelElement:c,headerElement:l,setHeaderElement:u,popupId:v,initPopupId:b,titleId:x,initTitleId:C,descriptionId:w,initDescriptionId:T,focusCancel:E}}),[uy,dy]=ql(`DialogProvider`,e=>{let{dialogs:t}=e;return{dialogs:t,getCurrentDialog:e=>t.value.find(t=>String(t.id)===String(e))}}),[fy,py]=ql(`DialogCompact`,e=>{let{dialog:t}=e;return{dialog:t}}),[my,hy]=hf(`DialogUi`),gy=(e=>{if(!e)return hy();let t=py(),n=hy(e);return U(()=>{let r=t?.dialog?.value?.ui?.[e];return[n.value,r].filter(Boolean).join(` `)})}),_y=P({name:`DialogCancel`,__name:`dialog-cancel`,props:{type:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{default:`button`}},emits:[`cancel`],setup(e,{emit:t}){let n=e,r=t,i=gy(`cancel`),{setCancelElement:a,onOpenChange:o}=ly(`DialogCancel`),s=async e=>{r(`cancel`,e),o(!1)};return(e,t)=>(I(),R(_m,eo({ref:M(a)},n,{"data-vean-dialog-cancel":``,class:M(i),onClick:s}),{default:Yn(()=>[hi(e.$slots,`default`)]),_:3},16,[`class`]))}}),vy=P({name:`DialogClose`,__name:`dialog-close`,props:{type:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{default:`button`}},emits:[`close`],setup(e,{emit:t}){let n=e,r=t,i=Ci(),a=gy(`close`),{onOpenChange:o}=ly(`DialogClose`),s=yg(),c=U(()=>i[`aria-label`]??s.value.dialog.close),l=async e=>{r(`close`,e),o(!1)};return(e,t)=>(I(),R(_m,eo(n,{"data-vean-dialog-close":``,"aria-label":c.value,class:M(a),onClick:l}),{default:Yn(()=>[hi(e.$slots,`default`,{},()=>[B(Sf,{icon:`lucide:x`})])]),_:3},16,[`aria-label`,`class`]))}}),yy=P({name:`DialogConfirm`,__name:`dialog-confirm`,props:{type:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{default:`button`}},emits:[`confirm`],setup(e,{emit:t}){let n=e,r=t,i=gy(`confirm`),{onOpenChange:a}=ly(`DialogConfirm`),o=async e=>{r(`confirm`,e),a(!1)};return(e,t)=>(I(),R(_m,eo(n,{"data-vean-dialog-confirm":``,class:M(i),onClick:o}),{default:Yn(()=>[hi(e.$slots,`default`)]),_:3},16,[`class`]))}}),by=P({name:`DialogContent`,__name:`dialog-content`,setup(e){let t=gy(`content`);return(e,n)=>(I(),L(`div`,{"data-vean-dialog-content":``,class:k(M(t))},[hi(e.$slots,`default`)],2))}}),xy=[`id`],Sy=P({name:`DialogDescription`,__name:`dialog-description`,setup(e){let{descriptionId:t,initDescriptionId:n}=ly(`DialogDescription`),r=gy(`description`);return n(),(e,n)=>(I(),L(`p`,{id:M(t),"data-vean-dialog-description":``,class:k(M(r))},[hi(e.$slots,`default`)],10,xy))}}),Cy=P({name:`DialogFooter`,__name:`dialog-footer`,setup(e){let t=gy(`footer`);return(e,n)=>(I(),L(`div`,{"data-vean-dialog-footer":``,class:k(M(t))},[hi(e.$slots,`default`)],2))}}),wy=P({name:`DialogFullscreen`,__name:`dialog-fullscreen`,props:{type:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{default:`button`}},emits:[`fullscreen`],setup(e,{emit:t}){let n=e,r=t,i=gy(`fullscreen`),{fullscreen:a,onFullscreenToggle:o}=ly(`DialogFullscreen`),s=yg(),c=U(()=>a.value?s.value.dialog.exitFullscreen:s.value.dialog.fullscreen),l=e=>{r(`fullscreen`,e),o()};return(e,t)=>(I(),R(_m,eo(n,{"data-vean-dialog-fullscreen":``,"aria-label":c.value,"aria-pressed":M(a)?`true`:`false`,class:M(i),onClick:l}),{default:Yn(()=>[hi(e.$slots,`default`,{},()=>[B(Sf,{icon:M(a)?`lucide:minimize`:`lucide:maximize`},null,8,[`icon`])])]),_:3},16,[`aria-label`,`aria-pressed`,`class`]))}}),Ty=[`data-draggable`],Ey=P({name:`DialogHeader`,__name:`dialog-header`,setup(e){let{setHeaderElement:t,draggable:n}=ly(`DialogHeader`),r=gy(`header`);return(e,i)=>(I(),L(`div`,{ref:M(t),"data-vean-dialog-header":``,"data-draggable":M(n)?``:void 0,class:k(M(r))},[hi(e.$slots,`default`)],10,Ty))}}),Dy=[`data-state`],Oy=P({name:`DialogOverlay`,__name:`dialog-overlay`,props:{forceMount:{type:Boolean}},setup(e){let t=e,{overlayElement:n,setOverlayElement:r,open:i,dataState:a}=ly(`DialogOverlay`),o=gy(`overlay`),s=t.forceMount?on(!0):qd(n,i);return nr(()=>{s.value&&i.value&&xn(au())}),(e,t)=>M(s)?(I(),L(`div`,{key:0,ref:M(r),"data-vean-dialog-overlay":``,class:k(M(o)),"data-state":M(a),style:{"pointer-events":`auto`}},[hi(e.$slots,`default`)],10,Dy)):H(`v-if`,!0)}}),ky=P({name:`DialogPopupImpl`,__name:`dialog-popup-impl`,props:{trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=t,{dir:i,modal:a,isAlert:o,alertType:s,draggable:c,fullscreen:l,open:u,onOpenChange:d,setTriggerElement:f,popupElement:p,setPopupElement:m,headerElement:h,popupId:g,initPopupId:_,dataState:v,titleId:y,descriptionId:b,focusCancel:x}=ly(`DialogPopupImpl`),{pointerEvents:S,onFocusCapture:C,onBlurCapture:w}=od(p,{disableOutsidePointerEvents:()=>n.disableOutsidePointerEvents,enable:()=>!!u.value,onEscapeKeyDown:e=>{r(`escapeKeyDown`,e)},onPointerDownOutside:e=>{r(`pointerDownOutside`,e)},onFocusOutside:e=>{r(`focusOutside`,e)},onInteractOutside:e=>{r(`interactOutside`,e)},onDismiss:()=>{d(!1)}}),{onKeydown:ee}=Ed(p,{trapped:()=>n.trapFocus,loop:!0,onOpenAutoFocus:e=>{o.value&&x(),r(`openAutoFocus`,e)},onCloseAutoFocus:e=>{r(`closeAutoFocus`,e)}}),T=Yd(n,[`trapFocus`,`disableOutsidePointerEvents`]),E=gy(`popup`),D=on({x:0,y:0}),te=on({x:0,y:0}),ne=on({x:0,y:0}),{isDragging:re}=Bu(p,{handle:h,disabled:U(()=>!c.value||l.value===!0||!h.value),onStart:(e,t)=>{te.value={x:t.clientX,y:t.clientY},ne.value={...D.value}},onMove:(e,t)=>{D.value={x:ne.value.x+t.clientX-te.value.x,y:ne.value.y+t.clientY-te.value.y}}});ir(l,e=>{e&&(D.value={x:0,y:0})});let ie=U(()=>{let{x:e,y:t}=D.value;return{pointerEvents:S.value,translate:e!==0||t!==0?`${e}px ${t}px`:void 0}}),O=()=>{let e=xu();e!==document.body&&f(e)};return pd(),Wd(p,U(()=>a.value===!0)),_(),$r(()=>{O()}),(e,t)=>(I(),R(M(vf),eo(M(T),{id:M(g),ref:M(m),class:M(E),dir:M(i),"aria-labelledby":M(y),"aria-describedby":M(b),"data-dismissable-layer":``,"data-state":M(v),"data-type":M(o)?M(s):void 0,"data-fullscreen":M(l)?``:void 0,"data-dragging":M(re)?``:void 0,role:M(o)?`alertdialog`:`dialog`,"aria-live":M(o)?M(s)===`error`?`assertive`:`polite`:void 0,tabindex:`-1`,style:ie.value,onFocusCapture:M(C),onBlurCapture:M(w),onKeydown:M(ee)}),{default:Yn(()=>[hi(e.$slots,`default`)]),_:3},16,[`id`,`class`,`dir`,`aria-labelledby`,`aria-describedby`,`data-state`,`data-type`,`data-fullscreen`,`data-dragging`,`role`,`aria-live`,`style`,`onFocusCapture`,`onBlurCapture`,`onKeydown`]))}}),Ay=P({name:`DialogPopup`,__name:`dialog-popup`,props:{asChild:{type:Boolean},as:{},forceMount:{type:Boolean}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=t,i=Yd(n,[`forceMount`]),a=Od(r),{popupElement:o,open:s,modal:c,isAlert:l,triggerElement:u}=ly(`DialogPopup`),d=n.forceMount?on(!0):qd(o,s),f=U(()=>c.value!==!1&&s.value),p=U(()=>c.value===!0),{onFocusOutside:m,onInteractOutside:h,onCloseAutoFocus:g}=Gd({modal:c,triggerElement:u}),_=e=>{if(l.value){e.preventDefault();return}if(c.value===!1)return;let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()},v=e=>{l.value&&e.preventDefault(),h(e)};return(e,t)=>M(d)?(I(),R(ky,eo({key:0},M(i),{"data-vean-dialog-popup":``,"trap-focus":f.value,"disable-outside-pointer-events":p.value},_i(M(a)),{onPointerDownOutside:_,onFocusOutside:M(m),onInteractOutside:v,onCloseAutoFocus:M(g)}),{default:Yn(()=>[hi(e.$slots,`default`)]),_:3},16,[`trap-focus`,`disable-outside-pointer-events`,`onFocusOutside`,`onCloseAutoFocus`])):H(`v-if`,!0)}}),jy=P({name:`DialogRoot`,inheritAttrs:!1,__name:`dialog-root`,props:{modal:{type:[Boolean,String],default:!0},dir:{},isAlert:{type:Boolean},alertType:{},draggable:{type:Boolean},fullscreen:{type:Boolean,default:void 0},defaultFullscreen:{type:Boolean},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean}},emits:[`update:open`,`update:fullscreen`],setup(e,{emit:t}){let n=e,r=t,i=Zu(()=>n.open,e=>{r(`update:open`,e)},n.defaultOpen??!1),a=Zu(()=>n.fullscreen,e=>{r(`update:fullscreen`,e)},n.defaultFullscreen??!1),{onOpenChange:o}=cy({dir:mf(()=>n.dir),open:i,modal:U(()=>n.isAlert===!0||n.modal),fullscreen:a,...vu(n,[`isAlert`,`alertType`,`draggable`])}),s=()=>{o(!1)};return ir(i,e=>{e&&n.fullscreen===void 0&&(a.value=n.defaultFullscreen??!1)}),(e,t)=>hi(e.$slots,`default`,{open:M(i),close:s})}}),My=[`id`],Ny=P({name:`DialogTitle`,__name:`dialog-title`,setup(e){let{titleId:t,initTitleId:n}=ly(`DialogTitle`),r=gy(`title`);return n(),(e,n)=>(I(),L(`h2`,{id:M(t),"data-vean-dialog-title":``,class:k(M(r))},[hi(e.$slots,`default`)],10,My))}}),Py=P({name:`DialogTrigger`,__name:`dialog-trigger`,props:{type:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{}},emits:[`click`],setup(e,{emit:t}){let n=e,r=t,{open:i,onOpenToggle:a,dataState:o,popupId:s,setTriggerElement:c}=ly(`DialogTrigger`),l=e=>{r(`click`,e),a()};return(e,t)=>(I(),R(_m,eo(n,{ref:M(c),"data-vean-dialog-trigger":``,"aria-haspopup":`dialog`,"aria-expanded":M(i)||!1,"aria-controls":M(i)?M(s):void 0,"data-state":M(o),onClick:l}),{default:Yn(()=>[hi(e.$slots,`default`)]),_:3},16,[`aria-expanded`,`aria-controls`,`data-state`]))}}),Fy=P({name:`DialogCompact`,__name:`dialog-compact`,props:{title:{},description:{},icon:{},showClose:{type:Boolean,default:!0},showFullscreen:{type:Boolean,default:!0},pure:{type:Boolean},showCancel:{type:[String,Boolean],default:`onlyWarning`},cancelText:{},showConfirm:{type:Boolean,default:!0},confirmText:{},triggerProps:{},overlayProps:{},portalProps:{},popupProps:{},headerProps:{},contentProps:{},footerProps:{},titleProps:{},descriptionProps:{},closeProps:{},fullscreenProps:{},cancelProps:{},confirmProps:{},modal:{type:[Boolean,String],default:!0},dir:{},isAlert:{type:Boolean},alertType:{default:`default`},draggable:{type:Boolean},fullscreen:{type:Boolean,default:void 0},defaultFullscreen:{type:Boolean},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean}},emits:[`update:open`,`update:fullscreen`,`click`,`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`,`close`,`fullscreen`,`confirm`,`cancel`],setup(e,{emit:t}){let n=e,r=Yd(n,[`title`,`description`,`icon`,`showClose`,`showFullscreen`,`pure`,`showCancel`,`cancelText`,`showConfirm`,`confirmText`,`triggerProps`,`overlayProps`,`portalProps`,`popupProps`,`headerProps`,`contentProps`,`footerProps`,`titleProps`,`descriptionProps`,`closeProps`,`fullscreenProps`,`cancelProps`,`confirmProps`]),i=t,a=Si(),o=Ci(),s=Od(i),c=yg(),l=dy(),u=U(()=>l?.getCurrentDialog(o[`data-dialog-id`])),d=U(()=>[gy().value?.icon,u.value?.ui?.icon].filter(Boolean).join(` `)),f=U(()=>({...n.triggerProps,asChild:n.triggerProps?.asChild??!0})),p={default:null,info:`lucide:info`,warning:`lucide:circle-alert`,error:`lucide:circle-x`,success:`lucide:circle-check`},m=U(()=>n.icon?n.icon:n.isAlert&&n.alertType?p[n.alertType]:null),h=U(()=>n.showConfirm??n.isAlert),g=U(()=>typeof n.showCancel==`boolean`?n.showCancel:n.isAlert===!0&&n.alertType===`warning`),_=U(()=>n.pure?!1:a.footer?!0:g.value||h.value),v=U(()=>n.cancelText??c.value.dialog.cancel),y=U(()=>n.confirmText??c.value.dialog.confirm);return fy({dialog:u}),(t,n)=>(I(),R(jy,eo(M(r),{"onUpdate:open":n[5]||=e=>i(`update:open`,e),"onUpdate:fullscreen":n[6]||=e=>i(`update:fullscreen`,e)}),{default:Yn(r=>[B(Py,ge(Ya(f.value)),{default:Yn(()=>[hi(t.$slots,`trigger`,ge(Ya(r)))]),_:2},1040),B(xf,ge(Ya(e.portalProps)),{default:Yn(()=>[B(Oy,ge(Ya(e.overlayProps)),null,16),B(Ay,eo(e.popupProps,_i(M(s))),{default:Yn(()=>[e.pure?H(`v-if`,!0):(I(),R(Ey,ge(eo({key:0},e.headerProps)),{default:Yn(()=>[B(Ny,ge(Ya(e.titleProps)),{default:Yn(()=>[m.value?(I(),R(Sf,{key:0,icon:m.value,class:k(d.value)},null,8,[`icon`,`class`])):H(`v-if`,!0),hi(t.$slots,`title`,ge(Ya(r)),()=>[z(`span`,null,A(e.title),1)])]),_:2},1040),a.description||e.description?(I(),R(Sy,ge(eo({key:0},e.descriptionProps)),{default:Yn(()=>[hi(t.$slots,`description`,ge(Ya(r)),()=>[V(A(e.description),1)])]),_:2},1040)):H(`v-if`,!0),!e.isAlert&&e.showFullscreen?(I(),R(wy,eo({key:1},e.fullscreenProps,{onFullscreen:n[0]||=e=>i(`fullscreen`,e)}),{default:Yn(()=>[hi(t.$slots,`fullscreen`,ge(Ya(r)))]),_:2},1040)):H(`v-if`,!0),!e.isAlert&&e.showClose?(I(),R(vy,{key:2,onClose:n[1]||=e=>i(`close`,e)},{default:Yn(()=>[hi(t.$slots,`close`,ge(Ya(r)))]),_:2},1024)):H(`v-if`,!0)]),_:2},1040)),B(by,ge(Ya(e.contentProps)),{default:Yn(()=>[hi(t.$slots,`default`,ge(Ya(r)))]),_:2},1040),e.pure&&!e.isAlert&&e.showClose?(I(),R(vy,{key:1,onClose:n[2]||=e=>i(`close`,e)},{default:Yn(()=>[hi(t.$slots,`close`,ge(Ya(r)))]),_:2},1024)):H(`v-if`,!0),_.value?(I(),R(Cy,ge(eo({key:2},e.footerProps)),{default:Yn(()=>[hi(t.$slots,`footer`,ge(Ya(r)),()=>[g.value?(I(),R(_y,eo({key:0},e.cancelProps,{onCancel:n[3]||=e=>i(`cancel`,e)}),{default:Yn(()=>[hi(t.$slots,`cancel`,ge(Ya(r)),()=>[V(A(v.value),1)])]),_:2},1040)):H(`v-if`,!0),h.value?(I(),R(yy,eo({key:1},e.confirmProps,{onConfirm:n[4]||=e=>i(`confirm`,e)}),{default:Yn(()=>[hi(t.$slots,`confirm`,ge(Ya(r)),()=>[V(A(y.value),1)])]),_:2},1040)):H(`v-if`,!0)])]),_:2},1040)):H(`v-if`,!0)]),_:2},1040)]),_:2},1040)]),_:3},16))}}),Iy=1,Ly=new class{subscribers;dialogs;dismissed;constructor(){this.subscribers=[],this.dialogs=[],this.dismissed=new Set}subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);t>=0&&this.subscribers.splice(t,1)});publish=e=>{this.subscribers.forEach(t=>t(e))};resetDismissed=e=>{this.dismissed.has(e)&&this.dismissed.delete(e)};upsert=e=>{let t=this.dialogs.findIndex(t=>t.id===e.id);if(t<0){this.publish(e),this.dialogs=[...this.dialogs,e];return}let n={...this.dialogs[t],...e};this.publish(n),this.dialogs=this.dialogs.map((e,r)=>r===t?n:e)};create=e=>{let{open:t=!0,...n}=e,r=zy(e.id),i={...n,id:r,open:t};return this.upsert(i),r};dismiss=e=>{if(e!==void 0)return this.dismissed.add(e),requestAnimationFrame(()=>this.publish({id:e,open:!1})),e;this.dialogs.forEach(e=>{this.dismissed.add(e.id),this.publish({id:e.id,open:!1})})};message=(e,t)=>this.create({...t,title:e,type:`default`});error=(e,t)=>this.create({...t,title:e,type:`error`});success=(e,t)=>this.create({...t,title:e,type:`success`});info=(e,t)=>this.create({...t,title:e,type:`info`});warning=(e,t)=>this.create({...t,title:e,type:`warning`});getDialogs=()=>this.dialogs.filter(e=>!this.dismissed.has(e.id));activeDialogs=()=>(this.dialogs=this.getDialogs(),this.dismissed.clear(),this.dialogs)},Ry=Ly.message;Object.assign(Ry,{success:Ly.success,error:Ly.error,info:Ly.info,warning:Ly.warning,getHistory:()=>Ly.dialogs,getDialogs:()=>Ly.getDialogs()});function zy(e){return typeof e==`number`||typeof e==`string`&&e.length>0?e:Iy++}var By=P({name:`DialogProvider`,inheritAttrs:!1,__name:`dialog-provider`,setup(e){let t=on([]),n=e=>{let n=t.value.findIndex(t=>t.id===e.id);if(n!==-1){let r=Object.assign({},t.value[n],e);t.value=[...t.value.slice(0,n),r,...t.value.slice(n+1)]}else t.value=[e,...t.value]},r=e=>{e.onDismiss?.(e),Ly.dismiss(e.id)},i=(e,t)=>{e.onCancel?.(t),!t.defaultPrevented&&r(e)},a=(e,t)=>{e.onConfirm?.(t),!t.defaultPrevented&&r(e)};return uy({dialogs:t}),nr(()=>{let e=Ly.subscribe(e=>{Fn(()=>{n(e)}),e.open===!1&&setTimeout(()=>{t.value=Ly.activeDialogs()},500)});xn(()=>{e()})},{flush:`post`}),(e,n)=>(I(),L(F,null,[(I(!0),L(F,null,pi(t.value,e=>(I(),R(Fy,{key:e.id,open:e.open,"is-alert":``,"alert-type":e.type,"data-dialog-id":e.id,icon:e.icon,onClose:t=>r(e),onCancel:t=>i(e,t),onConfirm:t=>a(e,t)},mi({default:Yn(()=>[e.content?(I(),R(ui(e.content),{key:0})):H(`v-if`,!0)]),_:2},[e.title?{name:`title`,fn:Yn(()=>[B(e_,{is:e.title},null,8,[`is`])]),key:`0`}:void 0,e.description?{name:`description`,fn:Yn(()=>[B(e_,{is:e.description},null,8,[`is`])]),key:`1`}:void 0,e.footer?{name:`footer`,fn:Yn(()=>[B(e_,{is:e.footer},null,8,[`is`])]),key:`2`}:void 0,e.cancelText?{name:`cancel`,fn:Yn(()=>[B(e_,{is:e.cancelText},null,8,[`is`])]),key:`3`}:void 0,e.confirmText?{name:`confirm`,fn:Yn(()=>[B(e_,{is:e.confirmText},null,8,[`is`])]),key:`4`}:void 0]),1032,[`open`,`alert-type`,`data-dialog-id`,`icon`,`onClose`,`onCancel`,`onConfirm`]))),128)),hi(e.$slots,`default`)],64))}}),[Vy,Hy]=ql(`ProgressRoot`),[Uy,Wy]=hf(`ProgressUi`),[Gy,Ky]=hf(`ProgressProviderUi`),qy={direction:`ltr`,minimum:.08,maximum:1,easing:`linear`,speed:200,trickle:!0,trickleSpeed:200},Jy=class{static options=qy;static status=null;static pending=[];static isPaused=!1;static trickleTimer;static reset(){return this.status=null,this.isPaused=!1,this.pending=[],this.options=qy,this.clearTrickleTimer(),this}static configure(e){return this.options=Ju({...e},this.options),this}static isStarted(){return typeof this.status==`number`}static isRendered(){return Jl?document.querySelector(`[data-vean-progress-provider]`)!==null:!1}static set(e){if(!Jl||this.isPaused)return this;let t=this.isStarted();e=bf(e,this.options.minimum,this.options.maximum),this.status=e===this.options.maximum?null:e,this.status===null&&this.clearTrickleTimer();let n=this.render(!t),r=this.options.speed,i=this.options.easing;return n.forEach(e=>e.offsetWidth),this.queue(t=>{n.forEach(t=>{Xy(t.querySelector(`[data-vean-progress-bar]`),this.barPositionCSS({n:e,speed:r,ease:i}))}),e===this.options.maximum?(n.forEach(e=>{Xy(e,{transition:`none`,opacity:`1`}),e.offsetWidth}),setTimeout(()=>{n.forEach(e=>{Xy(e,{transition:`all ${r}ms ${i}`,opacity:`0`})}),setTimeout(()=>{n.forEach(e=>{this.remove(e),Xy(e,{transition:`none`,opacity:`1`})}),t()},r)},r)):setTimeout(t,r)}),this}static start(){return Jl&&(this.status||this.set(0),this.options.trickle&&this.startTrickling()),this}static done(e){return!Jl||!e&&!this.status?this:this.inc(.3+.5*Math.random()).set(1)}static inc(e){if(this.isPaused)return this;let t=this.status;return t?t>1?this:(typeof e!=`number`&&(e=t>=0&&t<.2?.1:t>=.2&&t<.5?.04:t>=.5&&t<.8?.02:t>=.8&&t<.99?.005:0),t=bf(t+e,0,.994),this.set(t)):this.start()}static dec(e){if(this.isPaused)return this;let t=this.status;return typeof t==`number`?(typeof e!=`number`&&(e=t>.8?.1:t>.5?.05:t>.2?.02:.01),t=bf(t-e,0,.994),this.set(t)):this}static trickle(){return this.isPaused?this:this.inc()}static promise(e){let t=typeof e==`function`?e():e;if(!t)return this;if(typeof t.then==`function`)return this.start(),Promise.resolve(t).then(()=>{this.done()},()=>{this.done(!0)}),this;if(typeof t.state!=`function`||typeof t.always!=`function`||t.state()===`resolved`)return this;let n=0,r=0;return this.start(),n++,r++,t.always(()=>{r--,r===0?(n=0,this.done()):this.set((n-r)/n)}),this}static render(e=!1){if(!Jl)return[];let t=Array.from(document.querySelectorAll(`[data-vean-progress-provider]`));return t.forEach(t=>{t.style.display=``;let n=t.querySelector(`[data-vean-progress-bar]`),r=Yy(e?0:this.status||0,this.options.direction);Xy(n,this.barPositionCSS({n:this.status||0,speed:this.options.speed,ease:this.options.easing,percent:r})),typeof this.status==`number`?t.setAttribute(`aria-valuenow`,`${this.status}`):t.removeAttribute(`aria-valuenow`)}),t}static remove(e){Jl&&(this.clearTrickleTimer(),e?e.style.display=`none`:document.querySelectorAll(`[data-vean-progress-provider]`).forEach(e=>{let t=e;t.style.display=`none`}))}static pause(){return this.isStarted()&&(this.isPaused=!0,this.clearTrickleTimer()),this}static resume(){return this.isStarted()&&(this.isPaused=!1,this.options.trickle&&this.startTrickling()),this}static queue(e){this.pending.push(e),this.pending.length===1&&this.next()}static next(){let e=this.pending.shift();e&&e(this.next.bind(this))}static clearTrickleTimer(){this.trickleTimer&&=(clearTimeout(this.trickleTimer),void 0)}static startTrickling(){if(this.trickleTimer||this.isPaused||!this.isStarted())return;let e=()=>{this.trickleTimer=void 0,!this.isPaused&&this.isStarted()&&(this.trickle(),!this.isPaused&&this.isStarted()&&(this.trickleTimer=setTimeout(e,this.options.trickleSpeed)))};this.trickleTimer=setTimeout(e,this.options.trickleSpeed)}static barPositionCSS({n:e,speed:t,ease:n,percent:r}){return{transform:`translate3d(${r??Yy(e,this.options.direction)}%,0,0)`,transition:`all ${t}ms ${n}`}}};function Yy(e,t){return t===`rtl`?(1-e)*100:(-1+e)*100}function Xy(e,t,n){if(typeof t==`string`)n!==void 0&&(e.style[t]=n);else for(let n in t)if(t.hasOwnProperty(n)){let r=t[n];r!==void 0&&(e.style[n]=r)}}var Zy=[`aria-label`],Qy=P({name:`ProgressProvider`,__name:`progress-provider`,props:{direction:{},minimum:{},maximum:{},easing:{},speed:{},trickle:{type:Boolean},trickleSpeed:{}},setup(e){let t=e,n=Ky(),r=yg();return nr(()=>{Jy.configure(t)}),(e,t)=>(I(),L(`div`,{"data-vean-progress-provider":``,"data-allow-mismatch":`style`,class:k(M(n).root),role:`progressbar`,"aria-label":M(r).progress.loading,"aria-valuemin":`0`,"aria-valuemax":`1`,style:{display:`none`}},[z(`div`,{class:k(M(n).indicator),"data-vean-progress-bar":``},null,2)],10,Zy))}}),$y=Ll({extendBase:e=>({close:Cg({size:e.size}),fullscreen:Cg({size:e.size}),cancel:Sg({size:e.size,variant:`pure`}),confirm:Sg({size:e.size})}),slots:{overlay:[`fixed inset-0 z-base bg-mask`,`data-[state=open]:animate-in data-[state=open]:fade-in-0`,`data-[state=closed]:animate-out data-[state=closed]:fade-out-0`],popup:[`group fixed start-1/2 top-1/2 z-base flex flex-col w-max lt-sm:w-full lt-sm:min-w-auto lt-sm:max-w-full border bg-popover shadow-lg outline-none duration-200 rounded-lg`,`-translate-x-1/2 -translate-y-1/2 [&[dir=rtl]]:translate-x-1/2`,`data-[dragging]:transition-none data-[dragging]:select-none`,`data-[fullscreen]:w-screen data-[fullscreen]:h-screen`,`data-[fullscreen]:max-w-none data-[fullscreen]:rounded-none data-[fullscreen]:shadow-none`,`data-[fullscreen]:data-[state=open]:slide-in-from-top-1/2`,`data-[fullscreen]:data-[state=closed]:slide-out-to-top-1/2`,`data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:slide-in-from-left-1/2`,`data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:slide-out-to-left-1/2`],header:`flex flex-col lt-sm:text-center data-[draggable]:cursor-grab data-[draggable]:touch-none group-data-[dragging]:cursor-grabbing`,title:`flex items-center font-semibold leading-none tracking-tight m-0`,icon:`group-data-[type=info]:text-info group-data-[type=success]:text-success group-data-[type=warning]:text-warning group-data-[type=error]:text-destructive`,description:`text-muted-foreground m-0`,close:`absolute`,fullscreen:`absolute`,content:`grow overflow-auto [overscroll-behavior:contain]`,footer:`flex justify-end lt-sm:flex-col-reverse`,cancel:``,confirm:``},variants:{size:{xs:{popup:`gap-y-1.5 min-w-xs max-w-3xl px-2 py-1.5 text-2xs`,header:`gap-y-1.5`,title:`gap-x-1.5 text-xs`,description:`text-2xs`,close:`end-1.5 top-1.5`,fullscreen:`end-8 top-1.5`,footer:`gap-1.5`},sm:{popup:`gap-y-2 min-w-sm max-w-4xl px-3 py-2 text-xs`,header:`gap-y-2`,title:`gap-x-1.75 text-sm`,description:`text-xs`,close:`end-1.75 top-1.75`,fullscreen:`end-8 top-1.75`,footer:`gap-2`},md:{popup:`gap-y-3 min-w-md max-w-5xl px-4 py-3 text-sm`,header:`gap-y-3`,title:`gap-x-2 text-base`,description:`text-sm`,close:`end-2 top-2`,fullscreen:`end-10 top-2`,footer:`gap-3`},lg:{popup:`gap-y-4 min-w-lg max-w-6xl px-5 py-4 text-base`,header:`gap-y-4`,title:`gap-x-2.5 text-lg`,description:`text-base`,close:`end-2.5 top-2.5`,fullscreen:`end-10 top-2.5`,footer:`gap-4`},xl:{popup:`gap-y-5 min-w-xl max-w-7xl px-6 py-5 text-lg`,header:`gap-y-5`,title:`gap-x-3 text-xl`,description:`text-lg`,close:`end-3 top-3`,fullscreen:`end-12 top-3`,footer:`gap-5`},"2xl":{popup:`gap-y-6 min-w-2xl max-w-7xl px-7 py-6 text-xl`,header:`gap-y-6`,title:`gap-x-3.5 text-2xl`,description:`text-xl`,close:`end-4 top-4`,fullscreen:`end-13 top-4`,footer:`gap-6`}},pure:{true:{popup:`p-0 gap-0 border-none`}}},defaultVariants:{size:`md`}});Ll({slots:{root:`relative w-full overflow-hidden rounded-full bg-muted`,indicator:`h-full w-full flex-1 rounded-full transition-[transform,width] duration-300 transform-gpu will-change-transform data-[state=indeterminate]:w-2/5 data-[state=indeterminate]:opacity-80`,circle:``,track:``,label:``},variants:{color:{primary:{indicator:`bg-primary`},destructive:{indicator:`bg-destructive`},success:{indicator:`bg-success`},warning:{indicator:`bg-warning`},info:{indicator:`bg-info`},carbon:{indicator:`bg-carbon`},secondary:{indicator:`bg-secondary-foreground/20`},accent:{indicator:`bg-accent-foreground/20`}},size:{xs:{root:`h-1.5`},sm:{root:`h-2`},md:{root:`h-2.5`},lg:{root:`h-3`},xl:{root:`h-3.5`},"2xl":{root:`h-4`}}},defaultVariants:{color:`primary`,size:`md`}}),Ll({slots:{root:`relative inline-flex shrink-0 items-center justify-center rounded-full`,indicator:`fill-none stroke-current transition-[stroke-dasharray,stroke-dashoffset] duration-300 ease-in-out`,circle:`size-full`,track:`fill-none stroke-current text-muted`,label:`pointer-events-none absolute inset-0 flex items-center justify-center`},variants:{color:{primary:{indicator:`text-primary`},destructive:{indicator:`text-destructive`},success:{indicator:`text-success`},warning:{indicator:`text-warning`},info:{indicator:`text-info`},carbon:{indicator:`text-carbon`},secondary:{indicator:`text-secondary-foreground/40`},accent:{indicator:`text-accent-foreground/40`}},size:{xs:{root:`h-8 w-8 text-[10px]`},sm:{root:`h-10 w-10 text-xs`},md:{root:`h-12 w-12 text-sm`},lg:{root:`h-16 w-16 text-base`},xl:{root:`h-20 w-20 text-lg`},"2xl":{root:`h-24 w-24 text-xl`}}},defaultVariants:{color:`primary`,size:`md`}});var eb=Ll({slots:{root:`fixed z-max w-0 h-0 pointer-events-none`,indicator:`fixed top-0 start-0 w-full h-0.75 bg-primary`}}),tb=P({name:`SProgressProvider`,__name:`progress-provider`,props:{direction:{},minimum:{},maximum:{},easing:{},speed:{},trickle:{type:Boolean},trickleSpeed:{}},setup(e){let t=e;return Gy(U(()=>eb())),(e,n)=>(I(),R(M(Qy),ge(Ya(t)),null,16))}}),nb=P({name:`SDialogProvider`,__name:`dialog-provider`,setup(e){return my(U(()=>$y({size:`md`}))),(e,t)=>(I(),R(M(By)))}}),[rb,ib]=ql({name:`UIConfigProvider`,key:S_});function ab(e){let t=x_(e);return g_(t),sb(e,t,ob(e,t)),{commitThemeConfig:t.setThemeState}}function ob(e,t){let n=U(()=>vg(t.theme.value)),r=cb(),i=()=>{let t=r.acquire(e.nonce);t&&(t.textContent=n.value)};return ir(n,i),$r(i),n}function sb(e,t,n){let{theme:r,mode:i,customPresets:a,appliedPresetName:o,refreshThemeConfig:s}=t,c=_g();ir([n,i,a,o],()=>{e.persistTheme&&typeof document<`u`&&c.write({options:r.value,mode:i.value,style:n.value,presets:a.value,...o.value?{appliedPreset:o.value}:{}})},{immediate:!0});let l=e=>{e.key===`__VEAN_THEME`&&s()};$r(()=>{e.persistTheme&&window.addEventListener(`storage`,l)}),ri(()=>{window.removeEventListener(`storage`,l),c.flush()})}function cb(){let e=null;return{acquire:t=>typeof document>`u`?null:(e??=lb(),t&&!e.getAttribute(`nonce`)&&e.setAttribute(`nonce`,t),e)}}function lb(){let e=document.getElementById(eg);if(e instanceof HTMLStyleElement)return e;let t=document.createElement(`style`);return t.id=eg,document.head.appendChild(t),t}var ub=P({name:`SConfigProvider`,__name:`config-provider`,props:{theme:{default:()=>({})},iconify:{default:()=>({width:`1.25em`,height:`1.25em`})},progress:{},toast:{},customToast:{type:Boolean},persistTheme:{type:Boolean,default:!1},themeConfig:{},presetProvider:{},isServer:{type:Boolean,default:h_},dir:{},locale:{},nonce:{},tooltip:{},iconRender:{},linkComponent:{},messages:{}},setup(e,{expose:t}){let n=e,r=Yd(n,[`iconRender`,`theme`,`iconify`,`progress`,`toast`,`customToast`,`persistTheme`,`themeConfig`,`presetProvider`,`isServer`]),i=n.iconRender??(e=>wo(W,{icon:e,ssr:n.isServer})),{commitThemeConfig:a}=ab(n);return rb(Jt(n)),t({commitThemeConfig:a}),(t,n)=>(I(),R(M(sy),eo(M(r),{"icon-render":M(i)}),{default:Yn(()=>[hi(t.$slots,`default`),e.customToast?H(`v-if`,!0):(I(),R(s_,ge(eo({key:0},e.toast)),null,16)),B(nb),B(tb,ge(Ya(e.progress)),null,16)]),_:3},16,[`icon-render`]))}}),db=/^[\w+.-]{2,}:\/\//;function fb(e){return e.endsWith(`/`)?e:`${e}/`}function pb(e){return(e.endsWith(`/`)?e.slice(0,-1):e)||`/`}function mb(e,...t){let n=e;for(let e of t)e&&e!==`/`&&(n=n?fb(n)+e.replace(/^\.?\//,``):e);return n}function hb(e,t){if(!t||t===`/`||db.test(e))return e;let n=pb(t);return e.startsWith(n)?e:mb(n,e)}function gb(e,t){let n=e.match(db);return t+(n?e.slice(n[0].length):e)}var _b={bus:{docksEntryUpdated:`docks:entry:updated`,docksActivate:`docks:activate`,terminalsSessionUpdated:`terminals:session:updated`,messagesAdded:`messages:added`,messagesUpdated:`messages:updated`,messagesRemoved:`messages:removed`,messagesCleared:`messages:cleared`,commandsRegistered:`commands:registered`,commandsUnregistered:`commands:unregistered`},rpc:{docksActivate:`hub:docks:activate`,commandsExecute:`hub:commands:execute`,messagesAdd:`hub:messages:add`,messagesUpdate:`hub:messages:update`,messagesRemove:`hub:messages:remove`,messagesClear:`hub:messages:clear`,terminalsWrite:`hub:terminals:write`,terminalsResize:`hub:terminals:resize`,terminalsTerminate:`hub:terminals:terminate`,terminalsRestart:`hub:terminals:restart`,terminalsRemove:`hub:terminals:remove`},client:{docksPanelStateChanged:`panel:state:changed`},broadcast:{docksActivate:`devframe:docks:activate`,terminalsUpdated:`devframe:terminals:updated`,messagesUpdated:`devframe:messages:updated`},sharedState:{docks:`devframe:docks`,docksActive:`devframe:docks:active`,commands:`devframe:commands`,userSettings:`devframe:user-settings`,dockRenderers:`devframe:dock-renderers`},stream:{terminals:`devframe:terminals`},postMessage:{frameNav:`devframe:frame-nav`},broadcastChannel:{docksActivate:`devframe:docks:activate`}};_b.sharedState.dockRenderers;function vb(e,t){let n=`\x1B[${e}m`,r=`\x1B[${t}m`;return((e,...t)=>{if(Array.isArray(e)&&`raw`in e){let i=e,a=``;for(let e=0;e<i.length;e++)a+=i[e],e<t.length&&(a+=String(t[e]));return`${n}${a}${r}`}return`${n}${String(e)}${r}`})}var yb={blue:vb(34,39),cyan:vb(36,39),gray:vb(90,39),green:vb(32,39),red:vb(31,39),yellow:vb(33,39),bold:vb(1,22),dim:vb(2,22),reset:vb(0,0),underline:vb(4,24)};function bb(e,...t){return typeof e==`function`?e(...t):e}var xb=Error.captureStackTrace,Sb=class e extends Error{name;code;docs;fix;sources;data;get why(){return this.message}constructor(t,n=e){super(t.why,{cause:t.cause}),this.code=this.name=t.code,this.fix=t.fix,this.docs=t.docs,this.sources=t.sources,this.data=t.data,xb?.(this,n)}toJSON(){return{name:this.name,why:this.why,fix:this.fix,docs:this.docs,sources:this.sources,cause:this.cause,data:this.data,stack:this.stack}}};function Cb(e,t){return typeof e==`string`?`${e}/${t.toLowerCase()}`:e?.(t)}function wb(e){let t=e.reporters??[],n={},{docsBase:r}=e;for(let i of Object.keys(e.codes)){let a=e.codes[i],o=a.docs===!1?void 0:a.docs||Cb(r,i),s=(e={},n={})=>{let r=new Sb({code:i,why:bb(a.why,e),fix:bb(a.fix,e),docs:o,cause:e.cause,sources:e.sources,data:bb(a.data,e)},s);for(let e of t)e(r,n);return r};n[i]=s}return n}function Tb(e){return t=>{let n=`${e.bold(e.red(`[${t.name}]`))} ${t.message}`,r=[];return t.fix&&r.push(`${e.dim(`fix:`)} ${t.fix}`),t.sources?.length&&r.push(`${e.dim(`sources:`)} ${t.sources.join(`, `)}`),t.docs&&r.push(`${e.dim(`see:`)} ${e.cyan(t.docs)}`),r.length===0?n:[n,...r.map((t,n)=>`${e.dim(n<r.length-1?`├▶`:`╰▶`)} ${t}`)].join(`
26
+ `)}new Set(_h);var Zh=wm,Qh={xs:`xs`,sm:`xs`,md:`sm`,lg:`md`,xl:`lg`,"2xl":`xl`};Object.fromEntries(Object.entries(Zh).map(([e,t])=>[e,t/Zh.md]));var $h=`__VEAN_THEME`,eg=`vean-theme`,tg=65536;function ng(){if(typeof window>`u`)return null;try{return window.localStorage??null}catch{return null}}var rg=e=>typeof e==`object`&&!!e&&!Array.isArray(e),ig=e=>e===`light`||e===`dark`||e===`auto`,ag=e=>e===`layered`||e===`flat`,og=e=>typeof e==`string`&&e.trim().length>0;function sg(e){return rg(e)?[`sans`,`heading`,`mono`,`serif`].every(t=>{let n=e[t];return n===void 0||og(n)}):!1}var cg={surface:`card`,elevated:`popover`,"sidebar-surface":`sidebar`,scrim:`mask`};function lg(e,t){if(yh(e))return e;if(t>=2)return;let n=cg[e];return n&&yh(n)?n:void 0}function ug(e,t){if(!rg(e))return;let n=Object.entries(e).flatMap(([e,n])=>{if(typeof n!=`string`||n.length===0)return[];let r=lg(e,t);return r?[[r,n]]:[]});return n.length>0?Object.fromEntries(n):void 0}function dg(e,t){if(!rg(e))return;let n=ug(e.light,t),r=ug(e.dark,t);return n||r?{...n?{light:n}:{},...r?{dark:r}:{}}:void 0}function fg(e,t){if(!rg(e))return;if(t>=2)return e;let n=Object.entries(e).flatMap(([e,n])=>{if(!rg(n))return[[e,n]];let r=ug(n.light,t);if(!r)return[];let i=ug(n.dark,t);return[[e,i?{light:r,dark:i}:{light:r}]]});return n.length>0?Object.fromEntries(n):void 0}function pg(e,t=2){if(!rg(e))return{};let n={},r=(t,r)=>{e[t]!==void 0&&r(e[t])&&(n[t]=e[t])};r(`base`,e=>Hm(e)&&Rm.includes(e)),r(`primary`,e=>Hm(e)&&Rm.includes(e)),r(`feedback`,e=>typeof e==`string`&&e.length>0),r(`surfaceStyle`,ag),r(`prefix`,e=>e===!1||typeof e==`string`&&e.length>0),r(`size`,e=>typeof e==`string`&&e.length>0),r(`radius`,e=>typeof e==`string`&&e.length>0),r(`spacing`,e=>Xm(e)||typeof e==`number`&&Number.isFinite(e)&&e>0&&e<=4),r(`font`,sg),r(`borderOpacity`,e=>typeof e==`number`&&e>=0&&e<=1),r(`format`,e=>e===`hsl`||e===`oklch`),r(`styleTarget`,e=>e===`html`||e===`:root`),r(`darkSelector`,e=>typeof e==`string`&&e.length>0);let i=dg(e.overrides,t);return i&&(n.overrides=i),n}function mg(e){if(!e)return null;let t;try{t=JSON.parse(e)}catch{return null}if(!rg(t))return null;let n=typeof t.v==`number`&&Number.isInteger(t.v)&&t.v>0?t.v:0;if(n>2)return null;let r={v:2,options:pg(t.options,n)};ig(t.mode)&&(r.mode=t.mode),n>=2&&typeof t.style==`string`&&t.style.length>0&&t.style.length<=tg&&(r.style=t.style);let i=fg(t.presets,n);return i&&(r.presets=i),typeof t.appliedPreset==`string`&&t.appliedPreset.length>0&&(i===void 0||t.appliedPreset in i)&&(r.appliedPreset=t.appliedPreset),rg(t.extra)&&(r.extra=t.extra),r}function hg(e=$h){let t=null;try{t=ng()?.getItem(e)??null}catch{return null}return mg(t)}function gg(e,t=$h){let n=ng();if(!n)return!1;let r={v:2,...e};r.style&&r.style.length>tg&&delete r.style;try{return n.setItem(t,JSON.stringify(r)),!0}catch{return!1}}function _g(e={}){let{key:t=$h,delay:n=250}=e,r=null,i=null,a=()=>{i!==null&&(clearTimeout(i),i=null),r&&=(gg(r,t),null)};return{write:e=>{r=e,i===null&&(i=setTimeout(a,n))},flush:a,cancel:()=>{i!==null&&(clearTimeout(i),i=null),r=null}}}function vg(e,t){return Xh(Gh(e),{prefix:e.prefix??Lm.prefix,styleTarget:e.styleTarget,darkSelector:e.darkSelector,format:e.format,...t})}function yg(){let e=pf();return U(()=>{let t=lf(e?.locale??`en`),n=e?.messages;return n?Ju(n,t):t})}var bg=gl({base:[`inline-flex items-center justify-center font-medium transition-all-150`,`outline-none focus-visible:ring-3 focus-visible:ring-offset-card`,`data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50`],variants:{color:{primary:`focus-visible:ring-primary/30`,destructive:`focus-visible:ring-destructive/30`,success:`focus-visible:ring-success/30`,warning:`focus-visible:ring-warning/30`,info:`focus-visible:ring-info/30`,carbon:`focus-visible:ring-carbon/30`,secondary:`focus-visible:ring-secondary-foreground/20 text-secondary-foreground`,accent:`focus-visible:ring-accent-foreground/10 text-accent-foreground`},variant:{solid:``,pure:`border border-border bg-card text-accent-foreground data-[normal]:hover:bg-accent data-[normal]:active:bg-accent-foreground/10`,plain:`border border-border bg-card text-foreground`,outline:`border bg-card`,dashed:`border border-dashed bg-card`,soft:``,ghost:`bg-transparent`,link:`bg-transparent underline-offset-4 data-[normal]:hover:underline`},size:{xs:`gap-1 text-2xs`,sm:`gap-2 text-xs`,md:`gap-3 text-sm`,lg:`gap-4 text-base`,xl:`gap-5 text-lg`,"2xl":`gap-6 text-xl`},shape:{auto:`rounded-md`,rounded:`rounded-full`,square:`rounded-md`,circle:`rounded-full`},shadow:{none:`shadow-none`,sm:`shadow-sm`,md:`shadow-md`,lg:`shadow-lg`},fitContent:{true:`w-fit h-fit`,false:``}},compoundVariants:[{color:`primary`,variant:`solid`,class:`bg-primary text-primary-foreground data-[normal]:hover:bg-primary/80 data-[normal]:active:bg-primary-600`},{color:`destructive`,variant:`solid`,class:`bg-destructive text-destructive-foreground data-[normal]:hover:bg-destructive/80 data-[normal]:active:bg-destructive-600`},{color:`success`,variant:`solid`,class:`bg-success text-success-foreground data-[normal]:hover:bg-success/80 data-[normal]:active:bg-success-600`},{color:`warning`,variant:`solid`,class:`bg-warning text-warning-foreground data-[normal]:hover:bg-warning/80 data-[normal]:active:bg-warning-600`},{color:`info`,variant:`solid`,class:`bg-info text-info-foreground data-[normal]:hover:bg-info/80 data-[normal]:active:bg-info-600`},{color:`carbon`,variant:`solid`,class:`bg-carbon text-carbon-foreground data-[normal]:hover:bg-carbon/80 data-[normal]:active:bg-carbon`},{color:`secondary`,variant:[`solid`,`soft`],class:`bg-secondary`},{color:`accent`,variant:[`solid`,`soft`],class:`bg-accent`},{color:`primary`,variant:[`outline`,`dashed`,`soft`,`ghost`,`link`],class:`text-primary`},{color:`destructive`,variant:[`outline`,`dashed`,`soft`,`ghost`,`link`],class:`text-destructive`},{color:`success`,variant:[`outline`,`dashed`,`soft`,`ghost`,`link`],class:`text-success`},{color:`warning`,variant:[`outline`,`dashed`,`soft`,`ghost`,`link`],class:`text-warning`},{color:`info`,variant:[`outline`,`dashed`,`soft`,`ghost`,`link`],class:`text-info`},{color:`carbon`,variant:[`outline`,`dashed`,`soft`,`ghost`,`link`],class:`text-carbon`},{color:`primary`,variant:[`outline`,`dashed`,`ghost`],class:`data-[normal]:hover:bg-primary/10 data-[normal]:active:bg-primary/20`},{color:`destructive`,variant:[`outline`,`dashed`,`ghost`],class:`data-[normal]:hover:bg-destructive/10 data-[normal]:active:bg-destructive/20`},{color:`success`,variant:[`outline`,`dashed`,`ghost`],class:`data-[normal]:hover:bg-success/10 data-[normal]:active:bg-success/20`},{color:`warning`,variant:[`outline`,`dashed`,`ghost`],class:`data-[normal]:hover:bg-warning/10 data-[normal]:active:bg-warning/20`},{color:`info`,variant:[`outline`,`dashed`,`ghost`],class:`data-[normal]:hover:bg-info/10 data-[normal]:active:bg-info/20`},{color:`carbon`,variant:[`outline`,`dashed`,`ghost`],class:`data-[normal]:hover:bg-carbon/10 data-[normal]:active:bg-carbon/20`},{color:`secondary`,variant:[`solid`,`outline`,`dashed`,`soft`,`ghost`],class:`data-[normal]:hover:bg-secondary data-[normal]:active:bg-secondary-foreground/20`},{color:`accent`,variant:[`solid`,`outline`,`dashed`,`soft`,`ghost`],class:`data-[normal]:hover:bg-accent data-[normal]:active:bg-accent-foreground/10`},{color:`primary`,variant:`plain`,class:`data-[normal]:hover:border-primary data-[normal]:hover:text-primary`},{color:`destructive`,variant:`plain`,class:`data-[normal]:hover:border-destructive data-[normal]:hover:text-destructive`},{color:`success`,variant:`plain`,class:`data-[normal]:hover:border-success data-[normal]:hover:text-success`},{color:`warning`,variant:`plain`,class:`data-[normal]:hover:border-warning data-[normal]:hover:text-warning`},{color:`info`,variant:`plain`,class:`data-[normal]:hover:border-info data-[normal]:hover:text-info`},{color:`carbon`,variant:`plain`,class:`data-[normal]:hover:border-carbon data-[normal]:hover:text-carbon`},{color:`secondary`,variant:`plain`,class:`data-[normal]:hover:border-secondary-foreground/20`},{color:`accent`,variant:`plain`,class:`data-[normal]:hover:border-accent-foreground/10`},{color:`primary`,variant:[`outline`,`dashed`],class:`border-primary`},{color:`destructive`,variant:[`outline`,`dashed`],class:`border-destructive`},{color:`success`,variant:[`outline`,`dashed`],class:`border-success`},{color:`warning`,variant:[`outline`,`dashed`],class:`border-warning`},{color:`info`,variant:[`outline`,`dashed`],class:`border-info`},{color:`carbon`,variant:[`outline`,`dashed`],class:`border-carbon`},{color:`secondary`,variant:[`outline`,`dashed`],class:`border-secondary-foreground/20`},{color:`accent`,variant:[`outline`,`dashed`],class:`border-accent-foreground/10`},{color:`primary`,variant:`soft`,class:`bg-primary/10 data-[normal]:hover:bg-primary/10 data-[normal]:active:bg-primary/20`},{color:`destructive`,variant:`soft`,class:`bg-destructive/10 data-[normal]:hover:bg-destructive/10 data-[normal]:active:bg-destructive/20`},{color:`success`,variant:`soft`,class:`bg-success/10 data-[normal]:hover:bg-success/10 data-[normal]:active:bg-success/20`},{color:`warning`,variant:`soft`,class:`bg-warning/10 data-[normal]:hover:bg-warning/10 data-[normal]:active:bg-warning/20`},{color:`info`,variant:`soft`,class:`bg-info/10 data-[normal]:hover:bg-info/10 data-[normal]:active:bg-info/20`},{color:`carbon`,variant:`soft`,class:`bg-carbon/10 data-[normal]:hover:bg-carbon/10 data-[normal]:active:bg-carbon/20`},{size:`xs`,fitContent:!0,class:`p-0.75`},{size:`sm`,fitContent:!0,class:`p-0.875`},{size:`md`,fitContent:!0,class:`p-1`},{size:`lg`,fitContent:!0,class:`p-1.25`},{size:`xl`,fitContent:!0,class:`p-1.5`},{size:`2xl`,fitContent:!0,class:`p-1.75`},{size:`xs`,fitContent:!1,class:`h-6 px-1.5`},{size:`sm`,fitContent:!1,class:`h-7 px-2`},{size:`md`,fitContent:!1,class:`h-8 px-4`},{size:`lg`,fitContent:!1,class:`h-9 px-6`},{size:`xl`,fitContent:!1,class:`h-10 px-8`},{size:`2xl`,fitContent:!1,class:`h-12 px-10`},{shape:[`square`,`circle`],fitContent:!1,class:`p-0 gap-0`},{size:`xs`,fitContent:!1,shape:[`square`,`circle`],class:`w-6`},{size:`sm`,fitContent:!1,shape:[`square`,`circle`],class:`w-7`},{size:`md`,fitContent:!1,shape:[`square`,`circle`],class:`w-8`},{size:`lg`,fitContent:!1,shape:[`square`,`circle`],class:`w-9`},{size:`xl`,fitContent:!1,shape:[`square`,`circle`],class:`w-10`},{size:`2xl`,fitContent:!1,shape:[`square`,`circle`],class:`w-12`},{variant:[`ghost`,`link`],shadow:[`sm`,`md`,`lg`],class:`shadow-none`},{variant:`plain`,shadow:`sm`,class:`active:shadow-md`},{variant:`plain`,shadow:`md`,class:`active:shadow-lg`},{variant:`plain`,shadow:`lg`,class:`active:shadow-xl`},{variant:`pure`,shadow:`sm`,class:`active:shadow-sm`},{variant:`pure`,shadow:`md`,class:`active:shadow-md`},{variant:`pure`,shadow:`lg`,class:`active:shadow-lg`}],defaultVariants:{color:`primary`,variant:`solid`,size:`md`,shape:`auto`,shadow:`sm`,fitContent:!1}});gl({base:`[&>*]:relative focus-visible:[&>*]:z-2 not-first:not-last:[&>*]:rounded-0`,variants:{orientation:{horizontal:`inline-flex not-last:[&>*]:border-e-0 focus-visible:[&>*]:border-e first:[&>*]:rounded-e-0 last:[&>*]:rounded-s-0`,vertical:`flex flex-col not-last:[&>*]:border-b-0 focus-visible:[&>*]:border-b first:[&>*]:rounded-b-0 last:[&>*]:rounded-t-0`}},defaultVariants:{orientation:`horizontal`}});var xg=Ul(bg,{size:`md`,color:`accent`,variant:`ghost`,shape:`square`,fitContent:!0}),Sg=xl(bg,e=>({...e,size:Qh[e.size??`md`]})),Cg=xl(xg,e=>({...e,size:Qh[e.size??`md`]})),wg=Ll({extendBase:e=>({close:Cg({size:e.size}),cancel:Sg({size:e.size,variant:`pure`}),action:Sg({size:e.size})}),slots:{toaster:[`fixed z-[--z-index] list-none outline-none transition-transform-400 ease`,`data-[x-position=right]:end-[--offset-right] data-[x-position=left]:start-[--offset-left] data-[x-position=center]:start-1/2 data-[x-position=center]:-translate-x-1/2 [&[dir=rtl]]:data-[x-position=center]:translate-x-1/2`,`data-[y-position=top]:top-[--offset-top] data-[y-position=bottom]:bottom-[--offset-bottom]`,`max-[600px]:w-full max-[600px]:data-[x-position=right]:start-[--mobile-offset-left] max-[600px]:data-[x-position=left]:end-[--mobile-offset-right] max-[600px]:data-[x-position=center]:start-[--mobile-offset-left] max-[600px]:data-[x-position=center]:end-[--mobile-offset-right] max-[600px]:data-[x-position=center]:[transform:none]`,`max-[600px]:data-[y-position=top]:top-[--mobile-offset-top] max-[600px]:data-[y-position=bottom]:bottom-[--mobile-offset-bottom]`],toast:[`group absolute w-full rounded-md bg-popover text-popover-foreground border border-transparent opacity-0 outline-none touch-none`,`z-[--z-index] break-anywhere [--y:translateY(100%)] [--lift:1] [--lift-amount:calc(var(--lift)*var(--gap))] [transform:var(--y)]`,`[transition:transform_400ms,opacity_400ms,height_400ms,box-shadow_200ms] [box-shadow:0_4px_12px_hsl(var(--foreground)/0.1)]`,`focus-visible:[box-shadow:0_4px_12px_hsl(var(--foreground)/0.1),0_0_0_2px_hsl(var(--foreground)/0.2)] [&>*]:[transition:opacity_400ms]`,`data-[y-position=top]:top-0 data-[mounted=false]:data-[y-position=top]:[--y:translateY(-100%)] data-[mounted=true]:[--y:translateY(0)]`,`data-[y-position=bottom]:[--lift:-1] data-[y-position=bottom]:bottom-0`,`data-[x-position=left]:start-0 data-[x-position=right]:end-0`,`data-[swiping=true]:transition-none data-[swiping=true]:[transform:var(--y)_translateY(var(--swipe-amount-y,0px))_translateX(var(--swipe-amount-x,0px))]`,`data-[swiping=true]:before:content-empty data-[swiping=true]:before:absolute data-[swiping=true]:before:[inset-inline:-100%] data-[swiping=true]:before:h-full data-[swiping=true]:before:-z-1`,`data-[y-position=top]:data-[swiping=true]:before:bottom-1/2 data-[y-position=top]:data-[swiping=true]:before:[transform:scaleY(3)_translateY(50%)]`,`data-[y-position=bottom]:data-[swiping=true]:before:top-1/2 data-[y-position=bottom]:data-[swiping=true]:before:[transform:scaleY(3)_translateY(-50%)]`,`data-[swiping=false]:data-[removed=true]:before:content-empty data-[swiping=false]:data-[removed=true]:before:absolute data-[swiping=false]:data-[removed=true]:before:inset-0 data-[swiping=false]:data-[removed=true]:before:[transform:scaleY(2)]`,`data-[expanded=true]:after:content-empty data-[expanded=true]:after:absolute data-[expanded=true]:after:start-0 data-[expanded=true]:after:bottom-full data-[expanded=true]:after:w-full data-[expanded=true]:after:h-[calc(var(--gap)_+_1px)]`,`data-[mounted=true]:opacity-100 data-[visible=false]:pointer-events-none data-[visible=false]:data-[mounted=true]:opacity-0`,`data-[expanded=false]:data-[front=false]:[--scale:var(--toasts-before)*0.05_+_1] data-[expanded=false]:data-[front=false]:[--y:translateY(calc(var(--lift-amount)*var(--toasts-before)))_scale(calc(-1*var(--scale)))] data-[expanded=false]:data-[front=false]:h-[var(--front-toast-height)] [&[data-expanded=false][data-front=false]>*]:opacity-0`,`data-[mounted=true]:data-[expanded=true]:[--y:translateY(calc(var(--lift)*var(--offset)))] data-[mounted=true]:data-[expanded=true]:h-[var(--initial-height)]`,`data-[removed=true]:data-[front=true]:data-[swipe-out=false]:[--y:translateY(calc(var(--lift)*-100%))] data-[removed=true]:data-[front=true]:data-[swipe-out=false]:opacity-0`,`data-[removed=true]:data-[front=false]:data-[swipe-out=false]:data-[expanded=true]:[--y:translateY(calc(var(--lift)*var(--offset)_+_var(--lift)*-100%))] data-[removed=true]:data-[front=false]:data-[swipe-out=false]:data-[expanded=true]:opacity-0`,`data-[removed=true]:data-[front=false]:data-[swipe-out=false]:data-[expanded=false]:[--y:translateY(40%)] data-[removed=true]:data-[front=false]:data-[swipe-out=false]:data-[expanded=false]:opacity-0 data-[removed=true]:data-[front=false]:data-[swipe-out=false]:data-[expanded=false]:[transition:transform_500ms,opacity_200ms]`,`data-[removed=true]:data-[front=false]:before:h-[calc(var(--initial-height)_+_20%)]`,`data-[swiped=true]:select-none`,`data-[swipe-out=true]:data-[y-position=top]:[animation-duration:200ms] data-[swipe-out=true]:data-[y-position=bottom]:[animation-duration:200ms]`,`data-[swipe-out=true]:data-[y-position=top]:[animation-timing-function:ease-out] data-[swipe-out=true]:data-[y-position=bottom]:[animation-timing-function:ease-out]`,`data-[swipe-out=true]:data-[y-position=top]:[animation-fill-mode:forwards] data-[swipe-out=true]:data-[y-position=bottom]:[animation-fill-mode:forwards]`,`data-[swipe-out=true]:data-[swipe-direction=left]:[animation-name:toast-swipe-out-left] data-[swipe-out=true]:data-[swipe-direction=right]:[animation-name:toast-swipe-out-right] data-[swipe-out=true]:data-[swipe-direction=up]:[animation-name:toast-swipe-out-up] data-[swipe-out=true]:data-[swipe-direction=down]:[animation-name:toast-swipe-out-down]`,`data-[rich-color=true]:data-[type=success]:bg-success-100 data-[rich-color=true]:data-[type=success]:border-success`,`data-[rich-color=true]:data-[type=info]:bg-info-100 data-[rich-color=true]:data-[type=info]:border-info`,`data-[rich-color=true]:data-[type=warning]:bg-warning-100 data-[rich-color=true]:data-[type=warning]:border-warning`,`data-[rich-color=true]:data-[type=error]:bg-destructive-100 data-[rich-color=true]:data-[type=error]:border-destructive`,`data-[inverted=true]:bg-carbon data-[inverted=true]:border-carbon data-[inverted=true]:text-carbon-foreground`],wrapper:`flex flex-col items-stretch`,content:``,title:`flex items-center font-semibold`,description:`text-muted-foreground`,icon:[`group-data-[type=info]:text-info group-data-[type=success]:text-success group-data-[type=warning]:text-warning group-data-[type=error]:text-destructive`],footer:`flex justify-end items-center`,action:``,cancel:``,close:[`absolute`,`group-data-[inverted=true]:text-accent group-data-[inverted=true]:hover:bg-accent/15`,`group-data-[rich-color=true]:group-data-[type=success]:hover:bg-success/15`,`group-data-[rich-color=true]:group-data-[type=info]:hover:bg-info/15`,`group-data-[rich-color=true]:group-data-[type=warning]:hover:bg-warning/15`,`group-data-[rich-color=true]:group-data-[type=error]:hover:bg-destructive/15`]},variants:{size:{xs:{toaster:`w-80 text-2xs`,toast:`p-3`,wrapper:`gap-1`,title:`gap-1.25`,footer:`gap-1.25`,close:`top-1 end-1`},sm:{toaster:`w-85 text-xs`,toast:`p-3.5`,wrapper:`gap-1.25`,title:`gap-1.5`,footer:`gap-1.5`,close:`top-1.25 end-1.25`},md:{toaster:`w-90 text-sm`,toast:`p-4`,wrapper:`gap-1.5`,title:`gap-2`,footer:`gap-2`,close:`top-1.5 end-1.5`},lg:{toaster:`w-95 text-base`,toast:`p-4.5`,wrapper:`gap-1.75`,title:`gap-2.5`,footer:`gap-2.5`,close:`top-1.75 end-1.75`},xl:{toaster:`w-100 text-lg`,toast:`p-5`,wrapper:`gap-2`,title:`gap-3`,footer:`gap-3`,close:`top-2 end-2`},"2xl":{toaster:`w-110 text-xl`,toast:`p-6`,wrapper:`gap-2.5`,title:`gap-4`,footer:`gap-4`,close:`top-2.5 end-2.5`}}},defaultVariants:{size:`md`}}),[Tg,Eg]=ql(`Toaster`),[Dg,Og]=hf(`ToastUi`),kg=1,Ag=new class{subscribers;toasts;dismissed;constructor(){this.subscribers=[],this.toasts=[],this.dismissed=new Set}subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);t>=0&&this.subscribers.splice(t,1)});publish=e=>{this.subscribers.forEach(t=>t(e))};resetDismissed=e=>{this.dismissed.has(e)&&this.dismissed.delete(e)};upsert=e=>{let t=this.toasts.findIndex(t=>t.id===e.id);if(t<0){this.publish(e),this.toasts=[...this.toasts,e];return}let n={...this.toasts[t],...e};this.publish(n),this.toasts=this.toasts.map((e,r)=>r===t?n:e)};create=e=>{let{message:t,dismissible:n=!0,...r}=e,i=Pg(e.id);this.resetDismissed(i);let a={...r,id:i,dismissible:n,title:t};return this.upsert(a),i};dismiss=e=>{if(e!==void 0)return this.dismissed.add(e),requestAnimationFrame(()=>this.publish({id:e,dismiss:!0})),e;this.toasts.forEach(e=>{this.dismissed.add(e.id),this.publish({id:e.id,dismiss:!0})})};message=(e,t)=>this.create({...t,message:e,type:`default`});error=(e,t)=>this.create({...t,message:e,type:`error`});success=(e,t)=>this.create({...t,message:e,type:`success`});info=(e,t)=>this.create({...t,message:e,type:`info`});warning=(e,t)=>this.create({...t,message:e,type:`warning`});loading=(e,t)=>this.create({...t,message:e,type:`loading`});custom=(e,t)=>{let n=Pg(t?.id),r=t?.dismissible??!0;return this.resetDismissed(n),this.upsert({custom:e,dismissible:r,id:n,...t}),n};promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(typeof e==`function`?e():e),i=n!==void 0,a,o=async(e,t,r,a)=>{i=!1;let{description:o,settings:s}=await Fg(t,r,a,n);this.create({id:n,type:e,description:o,...s})},s=r.then(async e=>{a=[`resolve`,e],Wa(e)?(i=!1,this.create({id:n,type:`default`,message:e})):Ng(e)&&!e.ok?await o(`error`,t.error,t.description,`HTTP error! status: ${e.status}`):e instanceof Error?await o(`error`,t.error,t.description,e):t.success!==void 0&&await o(`success`,t.success,t.description,e)}).catch(async e=>{a=[`reject`,e],t.error!==void 0&&await o(`error`,t.error,t.description,e)}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally?.()}),c=()=>new Promise((e,t)=>s.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:c}:Object.assign(n,{unwrap:c})};getActives=()=>this.toasts.filter(e=>!this.dismissed.has(e.id))},jg=Ag.message,Mg=Object.assign(jg,{success:Ag.success,info:Ag.info,warning:Ag.warning,error:Ag.error,custom:Ag.custom,message:Ag.message,promise:Ag.promise,dismiss:Ag.dismiss,loading:Ag.loading},{getHistory:()=>Ag.toasts,getToasts:()=>Ag.getActives()});function Ng(e){return typeof e==`object`&&!!e&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`}function Pg(e){return typeof e==`number`||typeof e==`string`&&e.length>0?e:kg++}async function Fg(e,t,n,r){let[i,a]=await Promise.all([Ig(e,n),Ig(t,n)]);return{description:a,settings:Rg(i,r)}}async function Ig(e,t){return typeof e==`function`?await e(t):e}function Lg(e){return typeof e==`object`&&!!e&&`message`in e}function Rg(e,t){return Lg(e)?e:{id:t??``,message:e??``}}var zg={gap:`--gap`,offsetTop:`--offset-top`,offsetRight:`--offset-right`,offsetBottom:`--offset-bottom`,offsetLeft:`--offset-left`,mobileOffsetTop:`--mobile-offset-top`,mobileOffsetRight:`--mobile-offset-right`,mobileOffsetBottom:`--mobile-offset-bottom`,mobileOffsetLeft:`--mobile-offset-left`,frontHeight:`--front-toast-height`},Bg={index:`--index`,offset:`--offset`,beforeIndex:`--toasts-before`,zIndex:`--z-index`,swipeAmountX:`--swipe-amount-x`,swipeAmountY:`--swipe-amount-y`,swipeDirection:`--swipe-direction`,swipeOut:`--swipe-out`,initialHeight:`--initial-height`},Vg=`top-right`,Hg=4e3,Ug={info:`lucide:info`,success:`lucide:circle-check`,warning:`lucide:circle-alert`,error:`lucide:circle-x`,close:`lucide:x`,loading:`svg-spinners:270-ring`},Wg=[`top-right`,`top-center`,`top-left`,`bottom-right`,`bottom-center`,`bottom-left`],Gg={left:`left`,right:`right`,top:`up`,bottom:`down`};function Kg(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(Gg[t]),n&&r.push(Gg[n]),r}var qg=e=>{let t={top:zg.offsetTop,right:zg.offsetRight,bottom:zg.offsetBottom,left:zg.offsetLeft},n={top:zg.mobileOffsetTop,right:zg.mobileOffsetRight,bottom:zg.mobileOffsetBottom,left:zg.mobileOffsetLeft},r={};return qu(t).forEach(i=>{let a=(typeof e==`number`?e:e[i])??24;r[t[i]]=`${a}px`,r[n[i]]=`calc(${a}px * 0.67)`}),r},Jg=e=>{if(!e)return{x:0,y:0};let t=e.style.getPropertyValue(Bg.swipeAmountX),n=e.style.getPropertyValue(Bg.swipeAmountY);return{x:Number(t.replace(`px`,``))||0,y:Number(n.replace(`px`,``))||0}},Yg=(e,t)=>{e&&(e.style.setProperty(Bg.swipeAmountX,`${t.x}px`),e.style.setProperty(Bg.swipeAmountY,`${t.y}px`))},Xg=e=>{e&&Yg(e,{x:0,y:0})},Zg=e=>`dismiss`in e&&e.dismiss===!0,Qg=e=>[`altKey`,`ctrlKey`,`metaKey`,`shiftKey`].includes(e),$g=e=>{let{id:t,position:n}=e,r=on([]),i=on([]),a=U(()=>r.value.filter(e=>N(t)&&e.toasterId===N(t)||!e.toasterId)),o=U(()=>{let e=new Set;return a.value.forEach(t=>{let r=t.position||N(n);e.add(r)}),Wg.forEach(t=>{e.has(t)||e.add(t)}),Array.from(e)});return{toasts:r,filtered:a,heights:i,allPositions:o,positionZIndex:U(()=>{let e={};return o.value.forEach((t,n)=>{e[t]=9999-n}),e}),allToasts:U(()=>{let e=Wg.reduce((e,t)=>(e[t]=[],e),{});return a.value.forEach(t=>{let r=t.position||N(n);e[r].push(t)}),e}),allHeights:U(()=>{let e=Wg.reduce((e,t)=>(e[t]=[],e),{});return i.value.forEach(t=>{e[t.position].push(t)}),e})}},e_=P({name:`DynamicRender`,inheritAttrs:!1,__name:`dynamic-render`,props:{is:{}},setup(e){let t=Ci();return(n,r)=>typeof e.is==`string`?(I(),L(F,{key:0},[V(A(e.is),1)],64)):(I(),R(ui(e.is),ge(eo({key:1},M(t))),null,16))}}),t_=[`dir`,`data-rich-color`,`data-inverted`,`data-mounted`,`data-promise`,`data-swiped`,`data-removed`,`data-visible`,`data-y-position`,`data-x-position`,`data-index`,`data-front`,`data-swiping`,`data-dismissible`,`data-type`,`data-swipe-out`,`data-swipe-direction`,`data-expanded`,`data-testid`],n_=P({name:`Toast`,__name:`toast`,props:{index:{},toast:{},position:{}},emits:[`update:height`,`remove`],setup(e,{emit:t}){let n=e,r=t,{dir:i,allToasts:a,allHeights:o,gap:s,duration:c,visibleCounts:l,defaultExpanded:u,swipeDirections:d,interactingPosition:f,expandedPosition:p,showIcon:m,showClose:h,icons:g,toastProps:_,wrapperProps:v,contentProps:y,titleProps:b,descriptionProps:x,iconProps:S,footerProps:C,actionProps:w,cancelProps:ee,closeProps:T}=Eg(`Toast`),E=Og(),D=zr(`toast`),te=zr(`wrapper`),ne=Fu(),{height:re}=Hu(te),ie=Lu(),O=on(null),ae=on(null),oe=on(!1),se=on(!1),ce=on(!1),le=on(!1),ue=on(0),de=on(0),fe=on(n.toast.duration??c.value),pe=on(null),me=on(0),he=on(0),k=on(null),ge=U(()=>n.toast.type),_e=U(()=>{if(m.value){if(n.toast.icon)return n.toast.icon;if(ge.value&&ge.value!=="default")return g.value[ge.value];if(n.toast.promise)return g.value.loading}}),ve=U(()=>n.index===0),ye=U(()=>n.index+1<=l.value),be=U(()=>ge.value===`loading`),xe=U(()=>n.toast.dismissible!==!1),Se=U(()=>Math.max(o.value[n.position].findIndex(e=>e.toastId===n.toast.id),0)),Ce=U(()=>(n.toast.showClose??h.value)&&xe.value&&ge.value!==`loading`),we=U(()=>n.toast.duration??c.value),Te=U(()=>{let[e,t]=n.position.split(`-`);return{x:t,y:e}}),A=U(()=>o.value[n.position].reduce((e,t,n)=>n>=Se.value?e:e+t.height,0)),Ee=U(()=>Se.value*s.value+A.value),De=U(()=>p.value===n.position||u.value&&ne.value),Oe=U(()=>({[Bg.index]:n.index,[Bg.beforeIndex]:n.index,[Bg.zIndex]:a.value[n.position].length-n.index,[Bg.offset]:`${oe.value?ue.value:Ee.value}px`,[Bg.initialHeight]:u.value?`auto`:`${de.value}px`})),ke=()=>{oe.value=!0,ue.value=Ee.value,window.setTimeout(()=>{r(`remove`,n.toast)},200)},Ae=()=>{!be.value&&xe.value&&(ke(),n.toast.onDismiss?.(n.toast))},je=e=>{e.button!==2&&!be.value&&xe.value&&(pe.value=new Date,ue.value=Ee.value,e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(se.value=!0,k.value={x:e.clientX,y:e.clientY}))},Me=()=>{if(ce.value||!xe.value)return;k.value=null;let{x:e,y:t}=Jg(D.value),r=Date.now()-(pe.value?.getTime()??Date.now()),i=O.value===`x`?e:t,a=Math.abs(i)/Math.max(r,1);Math.abs(i)>=45||a>.11?(ue.value=Ee.value,n.toast.onDismiss?.(n.toast),O.value===`x`?ae.value=e>0?`right`:`left`:ae.value=t>0?`down`:`up`,ke(),ce.value=!0):(Xg(D.value),le.value=!1,se.value=!1,O.value=null)},Ne=e=>{if(!k.value||!xe.value||(typeof window<`u`?window.getSelection()?.toString().length??0:0)>0)return;let t=e.clientY-k.value.y,r=e.clientX-k.value.x,i=d.value??Kg(n.position);!O.value&&(Math.abs(r)>1||Math.abs(t)>1)&&(O.value=Math.abs(r)>Math.abs(t)?`x`:`y`);let a={x:0,y:0},o=e=>1/(1.5+Math.abs(e)/20);if(O.value===`y`){if(i.includes(`up`)||i.includes(`down`)){if(i.includes(`up`)&&t<0||i.includes(`down`)&&t>0)a.y=t;else{let e=t*o(t);a.y=Math.abs(e)<Math.abs(t)?e:t}}}else if(O.value===`x`&&(i.includes(`left`)||i.includes(`right`))){if(i.includes(`left`)&&r<0||i.includes(`right`)&&r>0)a.x=r;else{let e=r*o(r);a.x=Math.abs(e)<Math.abs(r)?e:r}}(Math.abs(a.x)>0||Math.abs(a.y)>0)&&(le.value=!0),Yg(D.value,a)},Pe=()=>{se.value=!1,O.value=null,k.value=null},Fe=e=>{n.toast.onAction?.(e),!e.defaultPrevented&&ke()},Ie=e=>{n.toast.onCancel?.(e),xe.value&&ke()};function Le(e){de.value=e,r(`update:height`,{toastId:n.toast.id,height:e,position:n.toast.position??n.position})}function Re(){let e=D.value;if(!e)return;let t=e.style.height;e.style.height=`auto`;let n=e.getBoundingClientRect().height;e.style.height=t,Le(n)}return ir(we,e=>{fe.value=e},{immediate:!0}),ir(re,e=>{ne.value&&e&&Re()},{flush:`post`}),ir(()=>n.toast.delete,e=>{e&&(ke(),n.toast.onDismiss?.(n.toast))}),nr(()=>{let e=n.toast;if(e.type===`loading`||e.promise||e.duration===1/0)return;let t;p.value===n.position||f.value===n.position||ie.value===`hidden`?(()=>{if(he.value<me.value){let e=Date.now()-me.value;fe.value-=e}he.value=Date.now()})():fe.value!==1/0&&(me.value=Date.now(),t=setTimeout(()=>{n.toast.onAutoClose?.(n.toast),ke()},fe.value)),xn(()=>{t!==void 0&&clearTimeout(t)})}),(t,n)=>(I(),L(`li`,eo(M(_),{ref:`toast`,"data-vean-toast":``,class:[M(E).toast,e.toast.ui?.toast],dir:M(i),tabindex:`0`,"data-rich-color":e.toast.richColor,"data-inverted":e.toast.inverted,"data-mounted":M(ne),"data-promise":!!e.toast.promise,"data-swiped":le.value,"data-removed":oe.value,"data-visible":ye.value,"data-y-position":Te.value.y,"data-x-position":Te.value.x,"data-index":e.index,"data-front":ve.value,"data-swiping":se.value,"data-dismissible":xe.value,"data-type":ge.value,"data-swipe-out":ce.value,"data-swipe-direction":ae.value,"data-expanded":De.value,"data-testid":e.toast.testId,style:Oe.value,onDragend:Pe,onPointerdown:je,onPointerup:Me,onPointermove:Ne}),[z(`div`,eo({ref:`wrapper`},M(v),{class:[M(E).wrapper,e.toast.ui?.wrapper],"data-vean-toast-wrapper":``}),[e.toast.custom?(I(),R(ui(e.toast.custom),{key:0})):(I(),L(F,{key:1},[z(`h3`,eo(M(b),{class:[M(E).title,e.toast.ui?.title],"data-vean-toast-title":``}),[_e.value?(I(),R(Sf,eo({key:0},M(S),{icon:_e.value,class:[M(E).icon,e.toast.ui?.icon]}),null,16,[`icon`,`class`])):H(`v-if`,!0),B(e_,{is:e.toast.title},null,8,[`is`])],16),e.toast.description?(I(),L(`p`,eo({key:0},M(x),{class:[M(E).description,e.toast.ui?.description],"data-vean-toast-description":``}),[B(e_,{is:e.toast.description},null,8,[`is`])],16)):H(`v-if`,!0),e.toast.content?(I(),R(ui(e.toast.content),eo({key:1},M(y),{class:[M(E).content,e.toast.ui?.content],"data-vean-toast-content":``}),null,16,[`class`])):H(`v-if`,!0),e.toast.action||e.toast.cancel?(I(),L(`div`,eo({key:2},M(C),{class:[M(E).footer,e.toast.ui?.footer],"data-vean-toast-footer":``}),[e.toast.cancel?(I(),R(_m,eo({key:0},M(ee),{class:[M(E).cancel,e.toast.ui?.cancel],"data-vean-toast-cancel":``,onClick:Ie}),{default:Yn(()=>[B(e_,{is:e.toast.cancel},null,8,[`is`])]),_:1},16,[`class`])):H(`v-if`,!0),e.toast.action?(I(),R(_m,eo({key:1},M(w),{class:[M(E).action,e.toast.ui?.action],"data-vean-toast-action":``,onClick:Fe}),{default:Yn(()=>[B(e_,{is:e.toast.action},null,8,[`is`])]),_:1},16,[`class`])):H(`v-if`,!0)],16)):H(`v-if`,!0)],64))],16),Ce.value&&M(g)?.close?(I(),R(_m,eo({key:0},M(T),{class:[M(E).close,e.toast.ui?.close],"data-vean-toast-close":``,onClick:Ae}),{default:Yn(()=>[B(Sf,{icon:M(g)?.close},null,8,[`icon`])]),_:1},16,[`class`])):H(`v-if`,!0)],16,t_))}}),r_=[`aria-label`],i_=[`dir`,`data-y-position`,`data-x-position`,`onBlur`,`onFocus`,`onMouseenter`,`onMousemove`,`onMouseleave`,`onDragend`,`onPointerdown`,`onPointerup`],a_=P({name:`Toaster`,inheritAttrs:!1,__name:`toaster`,props:{id:{},dir:{},hotkey:{default:()=>[`altKey`,`KeyT`]},customAriaLabel:{},containerAriaLabel:{default:`Notifications`},position:{default:Vg},defaultExpanded:{type:Boolean},duration:{default:Hg},gap:{default:12},offset:{default:24},visibleCounts:{default:3},swipeDirections:{},showIcon:{type:Boolean},showClose:{type:Boolean},icons:{},toastProps:{},wrapperProps:{},contentProps:{},titleProps:{},descriptionProps:{},iconProps:{},footerProps:{},actionProps:{},cancelProps:{},closeProps:{}},setup(e){let t=e,n=Ci(),r=Og(),i=mf(()=>t.dir),a=U(()=>t.hotkey.join(`+`).replace(/Key/g,``).replace(/Digit/g,``)),o=U(()=>t.customAriaLabel??`${t.containerAriaLabel} ${a.value}`),s={},c=(e,t)=>{s[e]=_u(t)},{toasts:l,allToasts:u,filtered:d,heights:f,allHeights:p,allPositions:m,positionZIndex:h}=$g({id:()=>t.id,position:()=>t.position}),g=U(()=>({...Ug,...t.icons})),_=on(null),v=on(null),y=on(null),b=on(null),x=U(()=>({[zg.gap]:`${t.gap}px`,...qg(t.offset)})),S=e=>{_.value===e&&(_.value=null),v.value===e&&(v.value=null),b.value===e&&(b.value=null)},C=e=>{s[e]?.focus()},w=e=>{if(f.value.findIndex(t=>t.toastId===e.toastId)!==-1){f.value=f.value.map(t=>t.toastId===e.toastId?e:t);return}let t=f.value.findIndex(t=>t.position===e.position);t===-1?f.value=[e,...f.value]:f.value=[...f.value.slice(0,t),e,...f.value.slice(t)]},ee=e=>{let t=l.value.findIndex(t=>t.id===e.id);if(t!==-1){let n=Object.assign({},l.value[t],e);l.value=[...l.value.slice(0,t),n,...l.value.slice(t+1)]}else l.value=[e,...l.value]},T=e=>{l.value=l.value.filter(t=>t.id!==e.id||(t.delete||Ag.dismiss(e.id),!1)),f.value=f.value.filter(t=>t.toastId!==e.id)},E=(e,t)=>{let n=t.currentTarget;b.value===e&&n&&!n.contains(t.relatedTarget)&&(b.value=null,_.value===e&&v.value!==e&&(_.value=null),y.value&&=(y.value.focus({preventScroll:!0}),null))},D=(e,t)=>{t.target.dataset.dismissible!==`false`&&b.value!==e&&(b.value=e,y.value=t.relatedTarget)},te=e=>{_.value=e},ne=e=>{v.value!==e&&b.value!==e&&_.value===e&&(_.value=null)},re=(e,t)=>{t.target.dataset.dismissible!==`false`&&(v.value=e,_.value=e)},ie=e=>{v.value===e&&(v.value=null)};return Tg({dir:i,allToasts:u,allHeights:p,interactingPosition:v,expandedPosition:_,icons:g,...vu(t,[`gap`,`duration`,`visibleCounts`,`defaultExpanded`,`swipeDirections`,`showIcon`,`showClose`,`toastProps`,`wrapperProps`,`contentProps`,`titleProps`,`descriptionProps`,`iconProps`,`footerProps`,`actionProps`,`cancelProps`,`closeProps`])}),nr(()=>{let e=Ag.subscribe(e=>{Zg(e)?requestAnimationFrame(()=>{l.value=l.value.map(t=>t.id===e.id?{...t,delete:!0}:t)}):Fn(()=>{ee(e)})});xn(()=>{e()})},{flush:`post`}),ir(()=>l.value.length,e=>{e===0&&(_.value=null,v.value=null,b.value=null)}),ir(()=>d.value,e=>{let n=new Set(e.map(e=>e.position??t.position));_.value&&!n.has(_.value)&&(_.value=null),v.value&&!n.has(v.value)&&(v.value=null),b.value&&!n.has(b.value)&&(b.value=null)},{deep:!0}),nr(()=>{if(!Jl)return;let e=e=>{if(t.hotkey.length>0&&t.hotkey.every(t=>Qg(t)?e[t]:e.code===t)){let e=d.value[0]?.position??t.position??m.value[0];_.value=e,C(e)}let n=Object.values(s).some(e=>e===document.activeElement||e?.contains(document.activeElement));e.code===`Escape`&&n&&(_.value=null,b.value=null)};document.addEventListener(`keydown`,e),xn(()=>{document.removeEventListener(`keydown`,e)})}),ni(()=>{y.value&&(y.value.focus({preventScroll:!0}),y.value=null,b.value=null)}),(e,t)=>(I(),L(F,null,[z(`section`,{"data-vean-toaster-container":``,"aria-label":o.value,tabindex:`-1`,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`},[(I(!0),L(F,null,pi(M(Wg),e=>(I(),L(`ol`,eo({key:e},{ref_for:!0},M(n),{ref_for:!0,ref:t=>c(e,t),class:M(r).toaster,tabindex:`-1`,dir:M(i),"data-vean-toaster":``,"data-y-position":e.split(`-`)[0],"data-x-position":e.split(`-`)[1],style:{"--z-index":M(h)[e],"--front-toast-height":`${M(p)[e][0]?.height??0}px`,...x.value},onBlur:t=>E(e,t),onFocus:t=>D(e,t),onMouseenter:t=>te(e),onMousemove:t=>te(e),onMouseleave:t=>ne(e),onDragend:t=>S(e),onPointerdown:t=>re(e,t),onPointerup:t=>ie(e)}),[(I(!0),L(F,null,pi(M(u)[e],(t,n)=>(I(),R(n_,{key:t.id,index:n,toast:t,position:e,"onUpdate:height":w,onRemove:T},null,8,[`index`,`toast`,`position`]))),128))],16,i_))),128))],8,r_),hi(e.$slots,`default`)],64))}}),o_=P({name:`ToastProvider`,__name:`toast-provider`,props:{id:{},dir:{},hotkey:{},customAriaLabel:{},containerAriaLabel:{},position:{},defaultExpanded:{type:Boolean},duration:{},gap:{},offset:{},visibleCounts:{},swipeDirections:{},showIcon:{type:Boolean},showClose:{type:Boolean},icons:{},toastProps:{},wrapperProps:{},contentProps:{},titleProps:{},descriptionProps:{},iconProps:{},footerProps:{},actionProps:{},cancelProps:{},closeProps:{}},setup(e){let t=e;return(e,n)=>(I(),R(a_,eo({"data-vean-toast-provider":``},t),{default:Yn(()=>[hi(e.$slots,`default`)]),_:3},16))}}),s_=P({name:`SToastProvider`,__name:`toast-provider`,props:{size:{},ui:{},id:{},dir:{},hotkey:{},customAriaLabel:{},containerAriaLabel:{},position:{},defaultExpanded:{type:Boolean},duration:{},gap:{},offset:{},visibleCounts:{},swipeDirections:{},showIcon:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},icons:{},toastProps:{},wrapperProps:{},contentProps:{},titleProps:{},descriptionProps:{},iconProps:{},footerProps:{},actionProps:{},cancelProps:{},closeProps:{}},setup(e){let t=e,n=Yd(t,[`size`,`ui`]);return Dg(U(()=>wg({size:t.size},t.ui))),(e,t)=>(I(),R(M(o_),ge(Ya(M(n))),{default:Yn(()=>[hi(e.$slots,`default`)]),_:3},16))}});function c_(e){return!!e&&`light`in e}function l_(e){return{...e?.options,...e?.mode?{mode:e.mode}:{}}}function u_(e,t){for(let n of Object.keys(e))n in t||delete e[n];Object.assign(e,t)}function d_(e){if(e)return{light:e.light,...e.dark?{dark:e.dark}:{}}}function f_(e){let{presetInput:t,appliedName:n,persist:r,isServer:i,presets:a,presetProvider:o}=e;if(c_(t))return t;let s=t?.name??n;if(!s||!r)return;let c=i?o?.(s)??void 0:a[s];return!c&&i&&console.warn(`[SConfigProvider] theme preset "${s}" not found, falling back to built-in colors.`),c}function p_(e){let{propTheme:t={},state:n,preset:r}=e;return{base:t.base??n.base??Lm.base,primary:t.primary??n.primary??Lm.primary,feedback:t.feedback??n.feedback,overrides:t.overrides??n.overrides??d_(r),size:t.size??n.size??Lm.size,radius:t.radius??n.radius??Lm.radius,spacing:t.spacing??n.spacing,font:t.font??n.font,format:t.format??n.format,surfaceStyle:t.surfaceStyle??n.surfaceStyle,borderOpacity:t.borderOpacity??n.borderOpacity,prefix:t.prefix??n.prefix??Lm.prefix,styleTarget:t.styleTarget??n.styleTarget,darkSelector:t.darkSelector??n.darkSelector}}function m_(e,t){if(typeof document>`u`)return;document.documentElement.style.colorScheme=th(e,t);let n=$m(t);if(!n)return;let r=document.createElement(`style`);r.appendChild(document.createTextNode(`*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}`)),document.head.appendChild(r),document.documentElement.classList.toggle(n,e===`dark`),window.getComputedStyle(r).opacity,document.head.removeChild(r)}function h_(){return typeof window>`u`}var[g_,__]=ql(`UiThemeContext`);function v_(e,t){return e.persistTheme?e.themeConfig?e.themeConfig:t?null:hg():null}function y_(e,t){return U({get:()=>e[t]??Lm[t],set:n=>{e[t]=n}})}function b_(){return typeof window>`u`||typeof window.matchMedia!=`function`?null:window.matchMedia(`(prefers-color-scheme: dark)`)}function x_(e){let t=e.isServer??h_(),n=v_(e,t),r=Gt(l_(n)),i=y_(r,`base`),a=y_(r,`primary`),o=y_(r,`radius`),s=y_(r,`size`),c=y_(r,`spacing`),l=U({get:()=>r.mode??`light`,set:e=>{r.mode=e}}),u=b_(),d=j(u?.matches??!1),f=e=>{d.value=e.matches};u?.addEventListener(`change`,f),ri(()=>{u?.removeEventListener(`change`,f)});let p=U(()=>l.value===`auto`?d.value?`dark`:`light`:l.value),m=j(n?.presets??{}),h=j(n?.appliedPreset??null),g=j(n?.extra??{}),_=U(()=>p_({propTheme:e.theme,state:r,preset:f_({presetInput:e.theme?.preset,appliedName:h.value,persist:!!e.persistTheme,isServer:t,presets:m.value,presetProvider:e.presetProvider})}));return ir([p,U(()=>_.value.darkSelector??Lm.darkSelector)],([e,t])=>m_(e,t),{immediate:!0}),{base:i,primary:a,radius:o,size:s,spacing:c,mode:l,effectiveMode:p,setRadius:e=>{o.value=e},setSize:e=>{s.value=e},setSpacing:e=>{c.value=e},setMode:e=>{l.value=e},customPresets:m,appliedPresetName:h,extra:g,savePreset:e=>{let t={light:{primary:`${a.value}.600`,ring:`${a.value}.500`},dark:{primary:`${a.value}.400`,ring:`${a.value}.300`}};return m.value={...m.value,[e]:t},h.value=e,!0},removePreset:e=>{if(!(e in m.value))return!1;let{[e]:t,...n}=m.value;return m.value=n,h.value===e&&(h.value=null),!0},applyPreset:e=>{h.value=e},resetPreset:()=>{h.value=null},theme:_,setThemeState:e=>{Object.assign(r,e)},refreshThemeConfig:()=>{if(!e.persistTheme||e.themeConfig)return;let t=hg();t&&(u_(r,l_(t)),m.value=t.presets??{},h.value=t.appliedPreset??null,g.value=t.extra??{})}}}var S_=Symbol.for(`UIConfigProvider`),C_=/^[a-z0-9]+(-[a-z0-9]+)*$/,w_=(e,t,n,r=``)=>{let i=e.split(`:`);if(e.slice(0,1)===`@`){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){let e=i.pop(),n=i.pop(),a={provider:i.length>0?i[0]:r,prefix:n,name:e};return t&&!T_(a)?null:a}let a=i[0],o=a.split(`-`);if(o.length>1){let e={provider:r,prefix:o.shift(),name:o.join(`-`)};return t&&!T_(e)?null:e}if(n&&r===``){let e={provider:r,prefix:``,name:a};return t&&!T_(e,n)?null:e}return null},T_=(e,t)=>e?!!((t&&e.prefix===``||e.prefix)&&e.name):!1;function E_(e,t){let n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function a(e){if(n[e])return i[e]=[];if(!(e in i)){i[e]=null;let t=r[e]&&r[e].parent,n=t&&a(t);n&&(i[e]=[t].concat(n))}return i[e]}return Object.keys(n).concat(Object.keys(r)).forEach(a),i}var D_=Object.freeze({left:0,top:0,width:16,height:16}),O_=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),k_=Object.freeze({...D_,...O_}),A_=Object.freeze({...k_,body:``,hidden:!1});function j_(e,t){let n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);let r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function M_(e,t){let n=j_(e,t);for(let r in A_)r in O_?r in e&&!(r in n)&&(n[r]=O_[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function N_(e,t,n){let r=e.icons,i=e.aliases||Object.create(null),a={};function o(e){a=M_(r[e]||i[e],a)}return o(t),n.forEach(o),M_(e,a)}function P_(e,t){let n=[];if(typeof e!=`object`||typeof e.icons!=`object`)return n;e.not_found instanceof Array&&e.not_found.forEach(e=>{t(e,null),n.push(e)});let r=E_(e);for(let i in r){let a=r[i];a&&(t(i,N_(e,i,a)),n.push(i))}return n}var F_={provider:``,aliases:{},not_found:{},...D_};function I_(e,t){for(let n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function L_(e){if(typeof e!=`object`||!e)return null;let t=e;if(typeof t.prefix!=`string`||!e.icons||typeof e.icons!=`object`||!I_(e,F_))return null;let n=t.icons;for(let e in n){let t=n[e];if(!e||typeof t.body!=`string`||!I_(t,A_))return null}let r=t.aliases||Object.create(null);for(let e in r){let t=r[e],i=t.parent;if(!e||typeof i!=`string`||!n[i]&&!r[i]||!I_(t,A_))return null}return t}var R_=Object.create(null);function z_(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function B_(e,t){let n=R_[e]||(R_[e]=Object.create(null));return n[t]||(n[t]=z_(e,t))}function V_(e,t){return L_(t)?P_(t,(t,n)=>{n?e.icons[t]=n:e.missing.add(t)}):[]}function H_(e,t,n){try{if(typeof n.body==`string`)return e.icons[t]={...n},!0}catch{}return!1}var U_=!1;function W_(e){return typeof e==`boolean`&&(U_=e),U_}function G_(e){let t=typeof e==`string`?w_(e,!0,U_):e;if(t){let e=B_(t.provider,t.prefix),n=t.name;return e.icons[n]||(e.missing.has(n)?null:void 0)}}function K_(e,t){let n=w_(e,!0,U_);if(!n)return!1;let r=B_(n.provider,n.prefix);return t?H_(r,n.name,t):(r.missing.add(n.name),!0)}function q_(e,t){if(typeof e!=`object`)return!1;if(typeof t!=`string`&&(t=e.provider||``),U_&&!t&&!e.prefix){let t=!1;return L_(e)&&(e.prefix=``,P_(e,(e,n)=>{K_(e,n)&&(t=!0)})),t}let n=e.prefix;return T_({prefix:n,name:`a`})?!!V_(B_(t,n),e):!1}var J_=Object.freeze({width:null,height:null}),Y_=Object.freeze({...J_,...O_}),X_=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Z_=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Q_(e,t,n){if(t===1)return e;if(n||=100,typeof e==`number`)return Math.ceil(e*t*n)/n;if(typeof e!=`string`)return e;let r=e.split(X_);if(r===null||!r.length)return e;let i=[],a=r.shift(),o=Z_.test(a);for(;;){if(o){let e=parseFloat(a);isNaN(e)?i.push(a):i.push(Math.ceil(e*t*n)/n)}else i.push(a);if(a=r.shift(),a===void 0)return i.join(``);o=!o}}function $_(e,t=`defs`){let n=``,r=e.indexOf(`<`+t);for(;r>=0;){let i=e.indexOf(`>`,r),a=e.indexOf(`</`+t);if(i===-1||a===-1)break;let o=e.indexOf(`>`,a);if(o===-1)break;n+=e.slice(i+1,a).trim(),e=e.slice(0,r).trim()+e.slice(o+1)}return{defs:n,content:e}}function ev(e,t){return e?`<defs>`+e+`</defs>`+t:t}function tv(e,t,n){let r=$_(e);return ev(r.defs,t+r.content+n)}var nv=e=>e===`unset`||e===`undefined`||e===`none`;function rv(e,t){let n={...k_,...e},r={...Y_,...t},i={left:n.left,top:n.top,width:n.width,height:n.height},a=n.body;[n,r].forEach(e=>{let t=[],n=e.hFlip,r=e.vFlip,o=e.rotate;n?r?o+=2:(t.push(`translate(`+(i.width+i.left).toString()+` `+(0-i.top).toString()+`)`),t.push(`scale(-1 1)`),i.top=i.left=0):r&&(t.push(`translate(`+(0-i.left).toString()+` `+(i.height+i.top).toString()+`)`),t.push(`scale(1 -1)`),i.top=i.left=0);let s;switch(o<0&&(o-=Math.floor(o/4)*4),o%=4,o){case 1:s=i.height/2+i.top,t.unshift(`rotate(90 `+s.toString()+` `+s.toString()+`)`);break;case 2:t.unshift(`rotate(180 `+(i.width/2+i.left).toString()+` `+(i.height/2+i.top).toString()+`)`);break;case 3:s=i.width/2+i.left,t.unshift(`rotate(-90 `+s.toString()+` `+s.toString()+`)`)}o%2==1&&(i.left!==i.top&&(s=i.left,i.left=i.top,i.top=s),i.width!==i.height&&(s=i.width,i.width=i.height,i.height=s)),t.length&&(a=tv(a,`<g transform="`+t.join(` `)+`">`,`</g>`))});let o=r.width,s=r.height,c=i.width,l=i.height,u,d;o===null?(d=s===null?`1em`:s===`auto`?l:s,u=Q_(d,c/l)):(u=o===`auto`?c:o,d=s===null?Q_(u,l/c):s===`auto`?l:s);let f={},p=(e,t)=>{nv(t)||(f[e]=t.toString())};p(`width`,u),p(`height`,d);let m=[i.left,i.top,c,l];return f.viewBox=m.join(` `),{attributes:f,viewBox:m,body:a}}var iv=/\sid="(\S+)"/g,av=new Map;function ov(e){e=e.replace(/[0-9]+$/,``)||`a`;let t=av.get(e)||0;return av.set(e,t+1),t?`${e}${t}`:e}function sv(e){let t=[],n;for(;n=iv.exec(e);)t.push(n[1]);if(!t.length)return e;let r=`suffix`+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(t=>{let n=ov(t),i=t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);e=e.replace(RegExp(`([#;"])(`+i+`)([")]|\\.[a-z])`,`g`),`$1`+n+r+`$3`)}),e=e.replace(new RegExp(r,`g`),``),e}var cv=Object.create(null);function lv(e,t){cv[e]=t}function uv(e){return cv[e]||cv[``]}function dv(e){let t;if(typeof e.resources==`string`)t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||`/`,maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}var fv=Object.create(null);fv[``]=dv({resources:[`https://api.iconify.design`]});function pv(e,t){let n=dv(t);return n!==null&&(fv[e]=n,!0)}function mv(e){return fv[e]}var hv=(()=>{let e;try{if(e=fetch,typeof e==`function`)return e}catch{}})();function gv(e,t){let n=mv(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let e=0;n.resources.forEach(t=>{e=Math.max(e,t.length)});let i=t+`.json?icons=`;r=n.maxURL-e-n.path.length-i.length}return r}function _v(e){return e===404}var vv=(e,t,n)=>{let r=[],i=gv(e,t),a=`icons`,o={type:a,provider:e,prefix:t,icons:[]},s=0;return n.forEach((n,c)=>{s+=n.length+1,s>=i&&c>0&&(r.push(o),o={type:a,provider:e,prefix:t,icons:[]},s=n.length),o.icons.push(n)}),r.push(o),r};function yv(e){if(typeof e==`string`){let t=mv(e);if(t)return t.path}return`/`}var bv={prepare:vv,send:(e,t,n)=>{if(!hv){n(`abort`,424);return}let r=yv(t.provider);switch(t.type){case`icons`:{let e=t.prefix,n=t.icons.join(`,`),i=new URLSearchParams({icons:n});r+=e+`.json?`+i.toString();break}case`custom`:{let e=t.uri;r+=e.slice(0,1)===`/`?e.slice(1):e;break}default:n(`abort`,400);return}let i=503;hv(e+r).then(e=>{let t=e.status;if(t!==200)setTimeout(()=>{n(_v(t)?`abort`:`next`,t)});else return i=501,e.json()}).then(e=>{setTimeout(typeof e!=`object`||!e?()=>{e===404?n(`abort`,e):n(`next`,i)}:()=>{n(`success`,e)})}).catch(()=>{n(`next`,i)})}};function xv(e,t){e.forEach(e=>{let n=e.loaderCallbacks;n&&(e.loaderCallbacks=n.filter(e=>e.id!==t))})}function Sv(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;let t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1,r=e.provider,i=e.prefix;t.forEach(t=>{let a=t.icons,o=a.pending.length;a.pending=a.pending.filter(t=>{if(t.prefix!==i)return!0;let o=t.name;if(e.icons[o])a.loaded.push({provider:r,prefix:i,name:o});else if(e.missing.has(o))a.missing.push({provider:r,prefix:i,name:o});else return n=!0,!0;return!1}),a.pending.length!==o&&(n||xv([e],t.id),t.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),t.abort))})}))}var Cv=0;function wv(e,t,n){let r=Cv++,i=xv.bind(null,n,r);if(!t.pending.length)return i;let a={id:r,icons:t,callback:e,abort:i};return n.forEach(e=>{(e.loaderCallbacks||=[]).push(a)}),i}function Tv(e){let t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((e,t)=>e.provider===t.provider?e.prefix===t.prefix?e.name.localeCompare(t.name):e.prefix.localeCompare(t.prefix):e.provider.localeCompare(t.provider));let r={provider:``,prefix:``,name:``};return e.forEach(e=>{if(r.name===e.name&&r.prefix===e.prefix&&r.provider===e.provider)return;r=e;let i=e.provider,a=e.prefix,o=e.name,s=n[i]||(n[i]=Object.create(null)),c=s[a]||(s[a]=B_(i,a)),l;l=o in c.icons?t.loaded:a===``||c.missing.has(o)?t.missing:t.pending;let u={provider:i,prefix:a,name:o};l.push(u)}),t}function Ev(e,t=!0,n=!1){let r=[];return e.forEach(e=>{let i=typeof e==`string`?w_(e,t,n):e;i&&r.push(i)}),r}var Dv={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Ov(e,t,n,r){let i=e.resources.length,a=e.random?Math.floor(Math.random()*i):e.index,o;if(e.random){let t=e.resources.slice(0);for(o=[];t.length>1;){let e=Math.floor(Math.random()*t.length);o.push(t[e]),t=t.slice(0,e).concat(t.slice(e+1))}o=o.concat(t)}else o=e.resources.slice(a).concat(e.resources.slice(0,a));let s=Date.now(),c=`pending`,l=0,u,d=null,f=[],p=[];typeof r==`function`&&p.push(r);function m(){d&&=(clearTimeout(d),null)}function h(){c===`pending`&&(c=`aborted`),m(),f.forEach(e=>{e.status===`pending`&&(e.status=`aborted`)}),f=[]}function g(e,t){t&&(p=[]),typeof e==`function`&&p.push(e)}function _(){return{startTime:s,payload:t,status:c,queriesSent:l,queriesPending:f.length,subscribe:g,abort:h}}function v(){c=`failed`,p.forEach(e=>{e(void 0,u)})}function y(){f.forEach(e=>{e.status===`pending`&&(e.status=`aborted`)}),f=[]}function b(t,n,r){let i=n!==`success`;switch(f=f.filter(e=>e!==t),c){case`pending`:break;case`failed`:if(i||!e.dataAfterTimeout)return;break;default:return}if(n===`abort`)u=r,v();else if(i)u=r,f.length||(o.length?x():v());else{if(m(),y(),!e.random){let n=e.resources.indexOf(t.resource);n!==-1&&n!==e.index&&(e.index=n)}c=`completed`,p.forEach(e=>{e(r)})}}function x(){if(c!==`pending`)return;m();let r=o.shift();if(r===void 0){if(f.length){d=setTimeout(()=>{m(),c===`pending`&&(y(),v())},e.timeout);return}v();return}let i={status:`pending`,resource:r,callback:(e,t)=>{b(i,e,t)}};f.push(i),l++,d=setTimeout(x,e.rotate),n(r,t,i.callback)}return setTimeout(x),_}function kv(e){let t={...Dv,...e},n=[];function r(){n=n.filter(e=>e().status===`pending`)}function i(e,i,a){let o=Ov(t,e,i,(e,t)=>{r(),a&&a(e,t)});return n.push(o),o}function a(e){return n.find(t=>e(t))||null}return{query:i,find:a,setIndex:e=>{t.index=e},getIndex:()=>t.index,cleanup:r}}function Av(){}var jv=Object.create(null);function Mv(e){if(!jv[e]){let t=mv(e);if(!t)return;jv[e]={config:t,redundancy:kv(t)}}return jv[e]}function Nv(e,t,n){let r,i;if(typeof e==`string`){let t=uv(e);if(!t)return n(void 0,424),Av;i=t.send;let a=Mv(e);a&&(r=a.redundancy)}else{let t=dv(e);if(t){r=kv(t);let n=uv(e.resources?e.resources[0]:``);n&&(i=n.send)}}return!r||!i?(n(void 0,424),Av):r.query(t,i,n)().abort}function Pv(){}function Fv(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Sv(e)}))}function Iv(e){let t=[],n=[];return e.forEach(e=>{(e.match(C_)?t:n).push(e)}),{valid:t,invalid:n}}function Lv(e,t,n){function r(){let n=e.pendingIcons;t.forEach(t=>{n&&n.delete(t),e.icons[t]||e.missing.add(t)})}if(n&&typeof n==`object`)try{if(!V_(e,n).length){r();return}}catch(e){console.error(e)}r(),Fv(e)}function Rv(e,t){e instanceof Promise?e.then(e=>{t(e)}).catch(()=>{t(null)}):t(e)}function zv(e,t){e.iconsToLoad=e.iconsToLoad?e.iconsToLoad.concat(t).sort():t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;let{provider:t,prefix:n}=e,r=e.iconsToLoad;if(delete e.iconsToLoad,!r||!r.length)return;let i=e.loadIcon;if(e.loadIcons&&(r.length>1||!i)){Rv(e.loadIcons(r,n,t),t=>{Lv(e,r,t)});return}if(i){r.forEach(r=>{Rv(i(r,n,t),t=>{Lv(e,[r],t?{prefix:n,icons:{[r]:t}}:null)})});return}let{valid:a,invalid:o}=Iv(r);if(o.length&&Lv(e,o,null),!a.length)return;let s=n.match(C_)?uv(t):null;s?s.prepare(t,n,a).forEach(n=>{Nv(t,n,t=>{Lv(e,n.icons,t)})}):Lv(e,a,null)}))}var Bv=(e,t)=>{let n=Tv(Ev(e,!0,W_()));if(!n.pending.length){let e=!0;return t&&setTimeout(()=>{e&&t(n.loaded,n.missing,n.pending,Pv)}),()=>{e=!1}}let r=Object.create(null),i=[],a,o;return n.pending.forEach(e=>{let{provider:t,prefix:n}=e;if(n===o&&t===a)return;a=t,o=n,i.push(B_(t,n));let s=r[t]||(r[t]=Object.create(null));s[n]||(s[n]=[])}),n.pending.forEach(e=>{let{provider:t,prefix:n,name:i}=e,a=B_(t,n),o=a.pendingIcons||=new Set;o.has(i)||(o.add(i),r[t][n].push(i))}),i.forEach(e=>{let t=r[e.provider][e.prefix];t.length&&zv(e,t)}),t?wv(t,n,i):Pv};function Vv(e,t){let n={...e};for(let e in t){let r=t[e],i=typeof r;e in J_?(r===null||r&&(i===`string`||i===`number`))&&(n[e]=r):i===typeof n[e]&&(n[e]=e===`rotate`?r%4:r)}return n}var Hv=/[\s,]+/;function Uv(e,t){t.split(Hv).forEach(t=>{switch(t.trim()){case`horizontal`:e.hFlip=!0;break;case`vertical`:e.vFlip=!0}})}function Wv(e,t=0){let n=e.replace(/^-?[0-9.]*/,``);function r(e){for(;e<0;)e+=4;return e%4}if(n===``){let t=parseInt(e);return isNaN(t)?0:r(t)}if(n!==e){let t=0;switch(n){case`%`:t=25;break;case`deg`:t=90}if(t){let i=parseFloat(e.slice(0,e.length-n.length));return isNaN(i)?0:(i/=t,i%1==0?r(i):0)}}return t}function Gv(e,t){let n=e.indexOf(`xlink:`)===-1?``:` xmlns:xlink="http://www.w3.org/1999/xlink"`;for(let e in t)n+=` `+e+`="`+t[e]+`"`;return`<svg xmlns="http://www.w3.org/2000/svg"`+n+`>`+e+`</svg>`}function Kv(e){return e.replace(/"/g,`'`).replace(/%/g,`%25`).replace(/#/g,`%23`).replace(/</g,`%3C`).replace(/>/g,`%3E`).replace(/\s+/g,` `).replace(/:/g,`%3A`).replace(/\//g,`%2F`)}function qv(e){return`data:image/svg+xml,`+Kv(e)}function Jv(e){return`url("`+qv(e)+`")`}var Yv={...Y_,inline:!1},Xv={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":!0,role:`img`},Zv={display:`inline-block`},Qv={backgroundColor:`currentColor`},$v={backgroundColor:`transparent`},ey={Image:`var(--svg)`,Repeat:`no-repeat`,Size:`100% 100%`},ty={webkitMask:Qv,mask:Qv,background:$v};for(let e in ty){let t=ty[e];for(let n in ey)t[e+n]=ey[n]}var ny={};[`horizontal`,`vertical`].forEach(e=>{let t=e.slice(0,1)+`Flip`;ny[e+`-flip`]=t,ny[e.slice(0,1)+`-flip`]=t,ny[e+`Flip`]=t});function ry(e){return e+(e.match(/^[-0-9.]+$/)?`px`:``)}var iy=(e,t)=>{let n=Vv(Yv,t),r={...Xv},i=t.mode||`svg`,a={},o=t.style,s=typeof o==`object`&&!(o instanceof Array)?o:{};for(let e in t){let i=t[e];if(i!==void 0)switch(e){case`icon`:case`style`:case`onLoad`:case`mode`:case`ssr`:case`customise`:break;case`inline`:case`hFlip`:case`vFlip`:n[e]=i===!0||i===`true`||i===1;break;case`flip`:break;case`color`:a.color=i;break;case`rotate`:typeof i==`string`?n[e]=Wv(i):typeof i==`number`&&(n[e]=i);break;case`ariaHidden`:case`aria-hidden`:i!==!0&&i!==`true`&&delete r[`aria-hidden`];break;default:{let t=ny[e];t?(i===!0||i===`true`||i===1)&&(n[t]=!0):Yv[e]===void 0&&(r[e]=i)}}}typeof t.flip==`string`&&Uv(n,t.flip);let c=rv(e,n),l=c.attributes;if(n.inline&&(a.verticalAlign=`-0.125em`),i===`svg`)return r.style={...a,...s},Object.assign(r,l),r.innerHTML=sv(c.body),wo(`svg`,r);let{body:u,width:d,height:f}=e,p=i===`mask`||i!==`bg`&&u.indexOf(`currentColor`)!==-1,m=Gv(u,{...l,width:d+``,height:f+``});return r.style={...a,"--svg":Jv(m),width:ry(l.width),height:ry(l.height),...Zv,...p?Qv:$v,...s},wo(`span`,r)};if(W_(!0),lv(``,bv),typeof document<`u`&&typeof window<`u`){let e=window;if(e.IconifyPreload!==void 0){let t=e.IconifyPreload,n=`Invalid IconifyPreload syntax.`;typeof t==`object`&&t&&(t instanceof Array?t:[t]).forEach(e=>{try{(typeof e!=`object`||!e||e instanceof Array||typeof e.icons!=`object`||typeof e.prefix!=`string`||!q_(e))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){let t=e.IconifyProviders;if(typeof t==`object`&&t)for(let e in t){let n=`IconifyProviders[`+e+`] is invalid.`;try{let r=t[e];if(typeof r!=`object`||!r||r.resources===void 0)continue;pv(e,r)||console.error(n)}catch{console.error(n)}}}}var ay={...k_,body:``},oy=P((e,{emit:t})=>{let n=j(null);function r(){n.value&&=(n.value.abort?.(),null)}let i=j(!!e.ssr),a=j(``),o=on(null);function s(){let i=e.icon;if(typeof i==`object`&&i&&typeof i.body==`string`)return a.value=``,{data:i};let o;if(typeof i!=`string`||(o=w_(i,!1,!0))===null)return null;let s=G_(o);if(!s){let e=n.value;return e&&e.name===i||(s===null?n.value={name:i}:n.value={name:i,abort:Bv([o],c)}),null}r(),a.value!==i&&(a.value=i,Fn(()=>{t(`load`,i)}));let l=e.customise;if(l){s=Object.assign({},s);let e=l(s.body,o.name,o.prefix,o.provider);typeof e==`string`&&(s.body=e)}let u=[`iconify`];return o.prefix!==``&&u.push(`iconify--`+o.prefix),o.provider!==``&&u.push(`iconify--`+o.provider),{data:s,classes:u}}function c(){let e=s();e?e.data!==o.value?.data&&(o.value=e):o.value=null}return i.value?c():$r(()=>{i.value=!0,c()}),ir(()=>e.icon,c),ri(r),()=>{let t=o.value;if(!t)return iy(ay,e);let n=e;return t.classes&&(n={...e,class:t.classes.join(` `)}),iy({...k_,...t.data},n)}},{props:{icon:{type:[String,Object],required:!0},mode:{type:String},ssr:{type:Boolean},width:{type:[String,Number]},height:{type:[String,Number]},style:{type:[String,Object]},color:{type:String},inline:{type:Boolean},rotate:{type:[Number,String]},hFlip:{type:Boolean},horizontalFlip:{type:Boolean},vFlip:{type:Boolean},verticalFlip:{type:Boolean},flip:{type:String},id:{type:String},ariaHidden:{type:[Boolean,String],default:void 0},customise:{type:Function},title:{type:String}},emits:[`load`]}),W=P({name:`SIcon`,__name:`icon`,props:{icon:{},ariaHidden:{type:Boolean,default:!0},ariaLabel:{},ariaLabelledby:{},ssr:{type:Boolean},customise:{},id:{},style:{},title:{},mode:{},color:{},flip:{},horizontalFlip:{type:Boolean},verticalFlip:{type:Boolean},rotate:{},hFlip:{type:Boolean},vFlip:{type:Boolean},width:{},height:{},inline:{type:Boolean}},setup(e){let t=e,n=$n(S_),r=U(()=>{let{width:e,height:r}=t,i=n?.iconify||{};return{width:e||i.width,height:r||i.height}}),i=U(()=>t.ariaLabel||t.ariaLabelledby?!1:t.ariaHidden),a=U(()=>({"aria-hidden":i.value,"aria-label":t.ariaLabel,"aria-labelledby":t.ariaLabelledby})),o=U(()=>s(t.icon)?{...a.value,"data-allow-mismatch":`class,attribute`,...r.value,mode:t.mode,color:t.color,flip:t.flip,horizontalFlip:t.horizontalFlip||void 0,verticalFlip:t.verticalFlip||void 0,rotate:t.rotate,hFlip:t.hFlip||void 0,vFlip:t.vFlip||void 0,inline:t.inline,id:t.id,style:t.style,title:t.title,ssr:t.ssr,customise:t.customise,icon:t.icon}:null);function s(e){return e?typeof e==`string`||typeof e==`object`&&`body`in e:!1}return(t,n)=>o.value?(I(),R(M(oy),eo({key:0},o.value,{class:`shrink-0`,"data-vean-icon":``}),null,16)):e.icon?(I(),R(ui(e.icon),eo({key:1,class:`shrink-0`,"data-vean-icon":``},a.value,{style:{width:r.value.width,height:r.value.height}}),null,16,[`style`])):H(`v-if`,!0)}}),sy=P({name:`ConfigProvider`,__name:`config-provider`,props:{dir:{},locale:{default:`en`},nonce:{default:void 0},tooltip:{},iconRender:{},linkComponent:{},messages:{}},setup(e){return ff(Jt(e)),(e,t)=>hi(e.$slots,`default`)}}),[cy,ly]=ql(`DialogRoot`,e=>{let[t,n]=yu(),[r,i]=yu(),[a,o]=yu(),[s,c]=yu(),[l,u]=yu(),{open:d,fullscreen:f}=e,p=e=>{d.value=e},m=()=>{d.value=!d.value},h=e=>{f.value=e},g=()=>{f.value=!f.value},_=U(()=>yf(d.value)),v=on(``),y=`vean-dialog-popup-${Lr()}`,b=()=>{v.value||=y},x=on(``),S=`vean-dialog-title-${Lr()}`,C=()=>{x.value||=S},w=on(``),ee=`vean-dialog-description-${Lr()}`,T=()=>{w.value||=ee},E=async()=>{await Fn(),s.value?.focus({preventScroll:!0})};return{...e,onOpenChange:p,onOpenToggle:m,onFullscreenChange:h,onFullscreenToggle:g,dataState:_,overlayElement:t,setOverlayElement:n,triggerElement:r,setTriggerElement:i,popupElement:a,setPopupElement:o,cancelElement:s,setCancelElement:c,headerElement:l,setHeaderElement:u,popupId:v,initPopupId:b,titleId:x,initTitleId:C,descriptionId:w,initDescriptionId:T,focusCancel:E}}),[uy,dy]=ql(`DialogProvider`,e=>{let{dialogs:t}=e;return{dialogs:t,getCurrentDialog:e=>t.value.find(t=>String(t.id)===String(e))}}),[fy,py]=ql(`DialogCompact`,e=>{let{dialog:t}=e;return{dialog:t}}),[my,hy]=hf(`DialogUi`),gy=(e=>{if(!e)return hy();let t=py(),n=hy(e);return U(()=>{let r=t?.dialog?.value?.ui?.[e];return[n.value,r].filter(Boolean).join(` `)})}),_y=P({name:`DialogCancel`,__name:`dialog-cancel`,props:{type:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{default:`button`}},emits:[`cancel`],setup(e,{emit:t}){let n=e,r=t,i=gy(`cancel`),{setCancelElement:a,onOpenChange:o}=ly(`DialogCancel`),s=async e=>{r(`cancel`,e),o(!1)};return(e,t)=>(I(),R(_m,eo({ref:M(a)},n,{"data-vean-dialog-cancel":``,class:M(i),onClick:s}),{default:Yn(()=>[hi(e.$slots,`default`)]),_:3},16,[`class`]))}}),vy=P({name:`DialogClose`,__name:`dialog-close`,props:{type:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{default:`button`}},emits:[`close`],setup(e,{emit:t}){let n=e,r=t,i=Ci(),a=gy(`close`),{onOpenChange:o}=ly(`DialogClose`),s=yg(),c=U(()=>i[`aria-label`]??s.value.dialog.close),l=async e=>{r(`close`,e),o(!1)};return(e,t)=>(I(),R(_m,eo(n,{"data-vean-dialog-close":``,"aria-label":c.value,class:M(a),onClick:l}),{default:Yn(()=>[hi(e.$slots,`default`,{},()=>[B(Sf,{icon:`lucide:x`})])]),_:3},16,[`aria-label`,`class`]))}}),yy=P({name:`DialogConfirm`,__name:`dialog-confirm`,props:{type:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{default:`button`}},emits:[`confirm`],setup(e,{emit:t}){let n=e,r=t,i=gy(`confirm`),{onOpenChange:a}=ly(`DialogConfirm`),o=async e=>{r(`confirm`,e),a(!1)};return(e,t)=>(I(),R(_m,eo(n,{"data-vean-dialog-confirm":``,class:M(i),onClick:o}),{default:Yn(()=>[hi(e.$slots,`default`)]),_:3},16,[`class`]))}}),by=P({name:`DialogContent`,__name:`dialog-content`,setup(e){let t=gy(`content`);return(e,n)=>(I(),L(`div`,{"data-vean-dialog-content":``,class:k(M(t))},[hi(e.$slots,`default`)],2))}}),xy=[`id`],Sy=P({name:`DialogDescription`,__name:`dialog-description`,setup(e){let{descriptionId:t,initDescriptionId:n}=ly(`DialogDescription`),r=gy(`description`);return n(),(e,n)=>(I(),L(`p`,{id:M(t),"data-vean-dialog-description":``,class:k(M(r))},[hi(e.$slots,`default`)],10,xy))}}),Cy=P({name:`DialogFooter`,__name:`dialog-footer`,setup(e){let t=gy(`footer`);return(e,n)=>(I(),L(`div`,{"data-vean-dialog-footer":``,class:k(M(t))},[hi(e.$slots,`default`)],2))}}),wy=P({name:`DialogFullscreen`,__name:`dialog-fullscreen`,props:{type:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{default:`button`}},emits:[`fullscreen`],setup(e,{emit:t}){let n=e,r=t,i=gy(`fullscreen`),{fullscreen:a,onFullscreenToggle:o}=ly(`DialogFullscreen`),s=yg(),c=U(()=>a.value?s.value.dialog.exitFullscreen:s.value.dialog.fullscreen),l=e=>{r(`fullscreen`,e),o()};return(e,t)=>(I(),R(_m,eo(n,{"data-vean-dialog-fullscreen":``,"aria-label":c.value,"aria-pressed":M(a)?`true`:`false`,class:M(i),onClick:l}),{default:Yn(()=>[hi(e.$slots,`default`,{},()=>[B(Sf,{icon:M(a)?`lucide:minimize`:`lucide:maximize`},null,8,[`icon`])])]),_:3},16,[`aria-label`,`aria-pressed`,`class`]))}}),Ty=[`data-draggable`],Ey=P({name:`DialogHeader`,__name:`dialog-header`,setup(e){let{setHeaderElement:t,draggable:n}=ly(`DialogHeader`),r=gy(`header`);return(e,i)=>(I(),L(`div`,{ref:M(t),"data-vean-dialog-header":``,"data-draggable":M(n)?``:void 0,class:k(M(r))},[hi(e.$slots,`default`)],10,Ty))}}),Dy=[`data-state`],Oy=P({name:`DialogOverlay`,__name:`dialog-overlay`,props:{forceMount:{type:Boolean}},setup(e){let t=e,{overlayElement:n,setOverlayElement:r,open:i,dataState:a}=ly(`DialogOverlay`),o=gy(`overlay`),s=t.forceMount?on(!0):qd(n,i);return nr(()=>{s.value&&i.value&&xn(au())}),(e,t)=>M(s)?(I(),L(`div`,{key:0,ref:M(r),"data-vean-dialog-overlay":``,class:k(M(o)),"data-state":M(a),style:{"pointer-events":`auto`}},[hi(e.$slots,`default`)],10,Dy)):H(`v-if`,!0)}}),ky=P({name:`DialogPopupImpl`,__name:`dialog-popup-impl`,props:{trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=t,{dir:i,modal:a,isAlert:o,alertType:s,draggable:c,fullscreen:l,open:u,onOpenChange:d,setTriggerElement:f,popupElement:p,setPopupElement:m,headerElement:h,popupId:g,initPopupId:_,dataState:v,titleId:y,descriptionId:b,focusCancel:x}=ly(`DialogPopupImpl`),{pointerEvents:S,onFocusCapture:C,onBlurCapture:w}=od(p,{disableOutsidePointerEvents:()=>n.disableOutsidePointerEvents,enable:()=>!!u.value,onEscapeKeyDown:e=>{r(`escapeKeyDown`,e)},onPointerDownOutside:e=>{r(`pointerDownOutside`,e)},onFocusOutside:e=>{r(`focusOutside`,e)},onInteractOutside:e=>{r(`interactOutside`,e)},onDismiss:()=>{d(!1)}}),{onKeydown:ee}=Ed(p,{trapped:()=>n.trapFocus,loop:!0,onOpenAutoFocus:e=>{o.value&&x(),r(`openAutoFocus`,e)},onCloseAutoFocus:e=>{r(`closeAutoFocus`,e)}}),T=Yd(n,[`trapFocus`,`disableOutsidePointerEvents`]),E=gy(`popup`),D=on({x:0,y:0}),te=on({x:0,y:0}),ne=on({x:0,y:0}),{isDragging:re}=Bu(p,{handle:h,disabled:U(()=>!c.value||l.value===!0||!h.value),onStart:(e,t)=>{te.value={x:t.clientX,y:t.clientY},ne.value={...D.value}},onMove:(e,t)=>{D.value={x:ne.value.x+t.clientX-te.value.x,y:ne.value.y+t.clientY-te.value.y}}});ir(l,e=>{e&&(D.value={x:0,y:0})});let ie=U(()=>{let{x:e,y:t}=D.value;return{pointerEvents:S.value,translate:e!==0||t!==0?`${e}px ${t}px`:void 0}}),O=()=>{let e=xu();e!==document.body&&f(e)};return pd(),Wd(p,U(()=>a.value===!0)),_(),$r(()=>{O()}),(e,t)=>(I(),R(M(vf),eo(M(T),{id:M(g),ref:M(m),class:M(E),dir:M(i),"aria-labelledby":M(y),"aria-describedby":M(b),"data-dismissable-layer":``,"data-state":M(v),"data-type":M(o)?M(s):void 0,"data-fullscreen":M(l)?``:void 0,"data-dragging":M(re)?``:void 0,role:M(o)?`alertdialog`:`dialog`,"aria-live":M(o)?M(s)===`error`?`assertive`:`polite`:void 0,tabindex:`-1`,style:ie.value,onFocusCapture:M(C),onBlurCapture:M(w),onKeydown:M(ee)}),{default:Yn(()=>[hi(e.$slots,`default`)]),_:3},16,[`id`,`class`,`dir`,`aria-labelledby`,`aria-describedby`,`data-state`,`data-type`,`data-fullscreen`,`data-dragging`,`role`,`aria-live`,`style`,`onFocusCapture`,`onBlurCapture`,`onKeydown`]))}}),Ay=P({name:`DialogPopup`,__name:`dialog-popup`,props:{asChild:{type:Boolean},as:{},forceMount:{type:Boolean}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=t,i=Yd(n,[`forceMount`]),a=Od(r),{popupElement:o,open:s,modal:c,isAlert:l,triggerElement:u}=ly(`DialogPopup`),d=n.forceMount?on(!0):qd(o,s),f=U(()=>c.value!==!1&&s.value),p=U(()=>c.value===!0),{onFocusOutside:m,onInteractOutside:h,onCloseAutoFocus:g}=Gd({modal:c,triggerElement:u}),_=e=>{if(l.value){e.preventDefault();return}if(c.value===!1)return;let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()},v=e=>{l.value&&e.preventDefault(),h(e)};return(e,t)=>M(d)?(I(),R(ky,eo({key:0},M(i),{"data-vean-dialog-popup":``,"trap-focus":f.value,"disable-outside-pointer-events":p.value},_i(M(a)),{onPointerDownOutside:_,onFocusOutside:M(m),onInteractOutside:v,onCloseAutoFocus:M(g)}),{default:Yn(()=>[hi(e.$slots,`default`)]),_:3},16,[`trap-focus`,`disable-outside-pointer-events`,`onFocusOutside`,`onCloseAutoFocus`])):H(`v-if`,!0)}}),jy=P({name:`DialogRoot`,inheritAttrs:!1,__name:`dialog-root`,props:{modal:{type:[Boolean,String],default:!0},dir:{},isAlert:{type:Boolean},alertType:{},draggable:{type:Boolean},fullscreen:{type:Boolean,default:void 0},defaultFullscreen:{type:Boolean},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean}},emits:[`update:open`,`update:fullscreen`],setup(e,{emit:t}){let n=e,r=t,i=Zu(()=>n.open,e=>{r(`update:open`,e)},n.defaultOpen??!1),a=Zu(()=>n.fullscreen,e=>{r(`update:fullscreen`,e)},n.defaultFullscreen??!1),{onOpenChange:o}=cy({dir:mf(()=>n.dir),open:i,modal:U(()=>n.isAlert===!0||n.modal),fullscreen:a,...vu(n,[`isAlert`,`alertType`,`draggable`])}),s=()=>{o(!1)};return ir(i,e=>{e&&n.fullscreen===void 0&&(a.value=n.defaultFullscreen??!1)}),(e,t)=>hi(e.$slots,`default`,{open:M(i),close:s})}}),My=[`id`],Ny=P({name:`DialogTitle`,__name:`dialog-title`,setup(e){let{titleId:t,initTitleId:n}=ly(`DialogTitle`),r=gy(`title`);return n(),(e,n)=>(I(),L(`h2`,{id:M(t),"data-vean-dialog-title":``,class:k(M(r))},[hi(e.$slots,`default`)],10,My))}}),Py=P({name:`DialogTrigger`,__name:`dialog-trigger`,props:{type:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{}},emits:[`click`],setup(e,{emit:t}){let n=e,r=t,{open:i,onOpenToggle:a,dataState:o,popupId:s,setTriggerElement:c}=ly(`DialogTrigger`),l=e=>{r(`click`,e),a()};return(e,t)=>(I(),R(_m,eo(n,{ref:M(c),"data-vean-dialog-trigger":``,"aria-haspopup":`dialog`,"aria-expanded":M(i)||!1,"aria-controls":M(i)?M(s):void 0,"data-state":M(o),onClick:l}),{default:Yn(()=>[hi(e.$slots,`default`)]),_:3},16,[`aria-expanded`,`aria-controls`,`data-state`]))}}),Fy=P({name:`DialogCompact`,__name:`dialog-compact`,props:{title:{},description:{},icon:{},showClose:{type:Boolean,default:!0},showFullscreen:{type:Boolean,default:!0},pure:{type:Boolean},showCancel:{type:[String,Boolean],default:`onlyWarning`},cancelText:{},showConfirm:{type:Boolean,default:!0},confirmText:{},triggerProps:{},overlayProps:{},portalProps:{},popupProps:{},headerProps:{},contentProps:{},footerProps:{},titleProps:{},descriptionProps:{},closeProps:{},fullscreenProps:{},cancelProps:{},confirmProps:{},modal:{type:[Boolean,String],default:!0},dir:{},isAlert:{type:Boolean},alertType:{default:`default`},draggable:{type:Boolean},fullscreen:{type:Boolean,default:void 0},defaultFullscreen:{type:Boolean},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean}},emits:[`update:open`,`update:fullscreen`,`click`,`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`,`close`,`fullscreen`,`confirm`,`cancel`],setup(e,{emit:t}){let n=e,r=Yd(n,[`title`,`description`,`icon`,`showClose`,`showFullscreen`,`pure`,`showCancel`,`cancelText`,`showConfirm`,`confirmText`,`triggerProps`,`overlayProps`,`portalProps`,`popupProps`,`headerProps`,`contentProps`,`footerProps`,`titleProps`,`descriptionProps`,`closeProps`,`fullscreenProps`,`cancelProps`,`confirmProps`]),i=t,a=Si(),o=Ci(),s=Od(i),c=yg(),l=dy(),u=U(()=>l?.getCurrentDialog(o[`data-dialog-id`])),d=U(()=>[gy().value?.icon,u.value?.ui?.icon].filter(Boolean).join(` `)),f=U(()=>({...n.triggerProps,asChild:n.triggerProps?.asChild??!0})),p={default:null,info:`lucide:info`,warning:`lucide:circle-alert`,error:`lucide:circle-x`,success:`lucide:circle-check`},m=U(()=>n.icon?n.icon:n.isAlert&&n.alertType?p[n.alertType]:null),h=U(()=>n.showConfirm??n.isAlert),g=U(()=>typeof n.showCancel==`boolean`?n.showCancel:n.isAlert===!0&&n.alertType===`warning`),_=U(()=>n.pure?!1:a.footer?!0:g.value||h.value),v=U(()=>n.cancelText??c.value.dialog.cancel),y=U(()=>n.confirmText??c.value.dialog.confirm);return fy({dialog:u}),(t,n)=>(I(),R(jy,eo(M(r),{"onUpdate:open":n[5]||=e=>i(`update:open`,e),"onUpdate:fullscreen":n[6]||=e=>i(`update:fullscreen`,e)}),{default:Yn(r=>[B(Py,ge(Ya(f.value)),{default:Yn(()=>[hi(t.$slots,`trigger`,ge(Ya(r)))]),_:2},1040),B(xf,ge(Ya(e.portalProps)),{default:Yn(()=>[B(Oy,ge(Ya(e.overlayProps)),null,16),B(Ay,eo(e.popupProps,_i(M(s))),{default:Yn(()=>[e.pure?H(`v-if`,!0):(I(),R(Ey,ge(eo({key:0},e.headerProps)),{default:Yn(()=>[B(Ny,ge(Ya(e.titleProps)),{default:Yn(()=>[m.value?(I(),R(Sf,{key:0,icon:m.value,class:k(d.value)},null,8,[`icon`,`class`])):H(`v-if`,!0),hi(t.$slots,`title`,ge(Ya(r)),()=>[z(`span`,null,A(e.title),1)])]),_:2},1040),a.description||e.description?(I(),R(Sy,ge(eo({key:0},e.descriptionProps)),{default:Yn(()=>[hi(t.$slots,`description`,ge(Ya(r)),()=>[V(A(e.description),1)])]),_:2},1040)):H(`v-if`,!0),!e.isAlert&&e.showFullscreen?(I(),R(wy,eo({key:1},e.fullscreenProps,{onFullscreen:n[0]||=e=>i(`fullscreen`,e)}),{default:Yn(()=>[hi(t.$slots,`fullscreen`,ge(Ya(r)))]),_:2},1040)):H(`v-if`,!0),!e.isAlert&&e.showClose?(I(),R(vy,{key:2,onClose:n[1]||=e=>i(`close`,e)},{default:Yn(()=>[hi(t.$slots,`close`,ge(Ya(r)))]),_:2},1024)):H(`v-if`,!0)]),_:2},1040)),B(by,ge(Ya(e.contentProps)),{default:Yn(()=>[hi(t.$slots,`default`,ge(Ya(r)))]),_:2},1040),e.pure&&!e.isAlert&&e.showClose?(I(),R(vy,{key:1,onClose:n[2]||=e=>i(`close`,e)},{default:Yn(()=>[hi(t.$slots,`close`,ge(Ya(r)))]),_:2},1024)):H(`v-if`,!0),_.value?(I(),R(Cy,ge(eo({key:2},e.footerProps)),{default:Yn(()=>[hi(t.$slots,`footer`,ge(Ya(r)),()=>[g.value?(I(),R(_y,eo({key:0},e.cancelProps,{onCancel:n[3]||=e=>i(`cancel`,e)}),{default:Yn(()=>[hi(t.$slots,`cancel`,ge(Ya(r)),()=>[V(A(v.value),1)])]),_:2},1040)):H(`v-if`,!0),h.value?(I(),R(yy,eo({key:1},e.confirmProps,{onConfirm:n[4]||=e=>i(`confirm`,e)}),{default:Yn(()=>[hi(t.$slots,`confirm`,ge(Ya(r)),()=>[V(A(y.value),1)])]),_:2},1040)):H(`v-if`,!0)])]),_:2},1040)):H(`v-if`,!0)]),_:2},1040)]),_:2},1040)]),_:3},16))}}),Iy=1,Ly=new class{subscribers;dialogs;dismissed;constructor(){this.subscribers=[],this.dialogs=[],this.dismissed=new Set}subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);t>=0&&this.subscribers.splice(t,1)});publish=e=>{this.subscribers.forEach(t=>t(e))};resetDismissed=e=>{this.dismissed.has(e)&&this.dismissed.delete(e)};upsert=e=>{let t=this.dialogs.findIndex(t=>t.id===e.id);if(t<0){this.publish(e),this.dialogs=[...this.dialogs,e];return}let n={...this.dialogs[t],...e};this.publish(n),this.dialogs=this.dialogs.map((e,r)=>r===t?n:e)};create=e=>{let{open:t=!0,...n}=e,r=zy(e.id),i={...n,id:r,open:t};return this.upsert(i),r};dismiss=e=>{if(e!==void 0)return this.dismissed.add(e),requestAnimationFrame(()=>this.publish({id:e,open:!1})),e;this.dialogs.forEach(e=>{this.dismissed.add(e.id),this.publish({id:e.id,open:!1})})};message=(e,t)=>this.create({...t,title:e,type:`default`});error=(e,t)=>this.create({...t,title:e,type:`error`});success=(e,t)=>this.create({...t,title:e,type:`success`});info=(e,t)=>this.create({...t,title:e,type:`info`});warning=(e,t)=>this.create({...t,title:e,type:`warning`});getDialogs=()=>this.dialogs.filter(e=>!this.dismissed.has(e.id));activeDialogs=()=>(this.dialogs=this.getDialogs(),this.dismissed.clear(),this.dialogs)},Ry=Ly.message;Object.assign(Ry,{success:Ly.success,error:Ly.error,info:Ly.info,warning:Ly.warning,getHistory:()=>Ly.dialogs,getDialogs:()=>Ly.getDialogs()});function zy(e){return typeof e==`number`||typeof e==`string`&&e.length>0?e:Iy++}var By=P({name:`DialogProvider`,inheritAttrs:!1,__name:`dialog-provider`,setup(e){let t=on([]),n=e=>{let n=t.value.findIndex(t=>t.id===e.id);if(n!==-1){let r=Object.assign({},t.value[n],e);t.value=[...t.value.slice(0,n),r,...t.value.slice(n+1)]}else t.value=[e,...t.value]},r=e=>{e.onDismiss?.(e),Ly.dismiss(e.id)},i=(e,t)=>{e.onCancel?.(t),!t.defaultPrevented&&r(e)},a=(e,t)=>{e.onConfirm?.(t),!t.defaultPrevented&&r(e)};return uy({dialogs:t}),nr(()=>{let e=Ly.subscribe(e=>{Fn(()=>{n(e)}),e.open===!1&&setTimeout(()=>{t.value=Ly.activeDialogs()},500)});xn(()=>{e()})},{flush:`post`}),(e,n)=>(I(),L(F,null,[(I(!0),L(F,null,pi(t.value,e=>(I(),R(Fy,{key:e.id,open:e.open,"is-alert":``,"alert-type":e.type,"data-dialog-id":e.id,icon:e.icon,onClose:t=>r(e),onCancel:t=>i(e,t),onConfirm:t=>a(e,t)},mi({default:Yn(()=>[e.content?(I(),R(ui(e.content),{key:0})):H(`v-if`,!0)]),_:2},[e.title?{name:`title`,fn:Yn(()=>[B(e_,{is:e.title},null,8,[`is`])]),key:`0`}:void 0,e.description?{name:`description`,fn:Yn(()=>[B(e_,{is:e.description},null,8,[`is`])]),key:`1`}:void 0,e.footer?{name:`footer`,fn:Yn(()=>[B(e_,{is:e.footer},null,8,[`is`])]),key:`2`}:void 0,e.cancelText?{name:`cancel`,fn:Yn(()=>[B(e_,{is:e.cancelText},null,8,[`is`])]),key:`3`}:void 0,e.confirmText?{name:`confirm`,fn:Yn(()=>[B(e_,{is:e.confirmText},null,8,[`is`])]),key:`4`}:void 0]),1032,[`open`,`alert-type`,`data-dialog-id`,`icon`,`onClose`,`onCancel`,`onConfirm`]))),128)),hi(e.$slots,`default`)],64))}}),[Vy,Hy]=ql(`ProgressRoot`),[Uy,Wy]=hf(`ProgressUi`),[Gy,Ky]=hf(`ProgressProviderUi`),qy={direction:`ltr`,minimum:.08,maximum:1,easing:`linear`,speed:200,trickle:!0,trickleSpeed:200},Jy=class{static options=qy;static status=null;static pending=[];static isPaused=!1;static trickleTimer;static reset(){return this.status=null,this.isPaused=!1,this.pending=[],this.options=qy,this.clearTrickleTimer(),this}static configure(e){return this.options=Ju({...e},this.options),this}static isStarted(){return typeof this.status==`number`}static isRendered(){return Jl?document.querySelector(`[data-vean-progress-provider]`)!==null:!1}static set(e){if(!Jl||this.isPaused)return this;let t=this.isStarted();e=bf(e,this.options.minimum,this.options.maximum),this.status=e===this.options.maximum?null:e,this.status===null&&this.clearTrickleTimer();let n=this.render(!t),r=this.options.speed,i=this.options.easing;return n.forEach(e=>e.offsetWidth),this.queue(t=>{n.forEach(t=>{Xy(t.querySelector(`[data-vean-progress-bar]`),this.barPositionCSS({n:e,speed:r,ease:i}))}),e===this.options.maximum?(n.forEach(e=>{Xy(e,{transition:`none`,opacity:`1`}),e.offsetWidth}),setTimeout(()=>{n.forEach(e=>{Xy(e,{transition:`all ${r}ms ${i}`,opacity:`0`})}),setTimeout(()=>{n.forEach(e=>{this.remove(e),Xy(e,{transition:`none`,opacity:`1`})}),t()},r)},r)):setTimeout(t,r)}),this}static start(){return Jl&&(this.status||this.set(0),this.options.trickle&&this.startTrickling()),this}static done(e){return!Jl||!e&&!this.status?this:this.inc(.3+.5*Math.random()).set(1)}static inc(e){if(this.isPaused)return this;let t=this.status;return t?t>1?this:(typeof e!=`number`&&(e=t>=0&&t<.2?.1:t>=.2&&t<.5?.04:t>=.5&&t<.8?.02:t>=.8&&t<.99?.005:0),t=bf(t+e,0,.994),this.set(t)):this.start()}static dec(e){if(this.isPaused)return this;let t=this.status;return typeof t==`number`?(typeof e!=`number`&&(e=t>.8?.1:t>.5?.05:t>.2?.02:.01),t=bf(t-e,0,.994),this.set(t)):this}static trickle(){return this.isPaused?this:this.inc()}static promise(e){let t=typeof e==`function`?e():e;if(!t)return this;if(typeof t.then==`function`)return this.start(),Promise.resolve(t).then(()=>{this.done()},()=>{this.done(!0)}),this;if(typeof t.state!=`function`||typeof t.always!=`function`||t.state()===`resolved`)return this;let n=0,r=0;return this.start(),n++,r++,t.always(()=>{r--,r===0?(n=0,this.done()):this.set((n-r)/n)}),this}static render(e=!1){if(!Jl)return[];let t=Array.from(document.querySelectorAll(`[data-vean-progress-provider]`));return t.forEach(t=>{t.style.display=``;let n=t.querySelector(`[data-vean-progress-bar]`),r=Yy(e?0:this.status||0,this.options.direction);Xy(n,this.barPositionCSS({n:this.status||0,speed:this.options.speed,ease:this.options.easing,percent:r})),typeof this.status==`number`?t.setAttribute(`aria-valuenow`,`${this.status}`):t.removeAttribute(`aria-valuenow`)}),t}static remove(e){Jl&&(this.clearTrickleTimer(),e?e.style.display=`none`:document.querySelectorAll(`[data-vean-progress-provider]`).forEach(e=>{let t=e;t.style.display=`none`}))}static pause(){return this.isStarted()&&(this.isPaused=!0,this.clearTrickleTimer()),this}static resume(){return this.isStarted()&&(this.isPaused=!1,this.options.trickle&&this.startTrickling()),this}static queue(e){this.pending.push(e),this.pending.length===1&&this.next()}static next(){let e=this.pending.shift();e&&e(this.next.bind(this))}static clearTrickleTimer(){this.trickleTimer&&=(clearTimeout(this.trickleTimer),void 0)}static startTrickling(){if(this.trickleTimer||this.isPaused||!this.isStarted())return;let e=()=>{this.trickleTimer=void 0,!this.isPaused&&this.isStarted()&&(this.trickle(),!this.isPaused&&this.isStarted()&&(this.trickleTimer=setTimeout(e,this.options.trickleSpeed)))};this.trickleTimer=setTimeout(e,this.options.trickleSpeed)}static barPositionCSS({n:e,speed:t,ease:n,percent:r}){return{transform:`translate3d(${r??Yy(e,this.options.direction)}%,0,0)`,transition:`all ${t}ms ${n}`}}};function Yy(e,t){return t===`rtl`?(1-e)*100:(-1+e)*100}function Xy(e,t,n){if(typeof t==`string`)n!==void 0&&(e.style[t]=n);else for(let n in t)if(t.hasOwnProperty(n)){let r=t[n];r!==void 0&&(e.style[n]=r)}}var Zy=[`aria-label`],Qy=P({name:`ProgressProvider`,__name:`progress-provider`,props:{direction:{},minimum:{},maximum:{},easing:{},speed:{},trickle:{type:Boolean},trickleSpeed:{}},setup(e){let t=e,n=Ky(),r=yg();return nr(()=>{Jy.configure(t)}),(e,t)=>(I(),L(`div`,{"data-vean-progress-provider":``,"data-allow-mismatch":`style`,class:k(M(n).root),role:`progressbar`,"aria-label":M(r).progress.loading,"aria-valuemin":`0`,"aria-valuemax":`1`,style:{display:`none`}},[z(`div`,{class:k(M(n).indicator),"data-vean-progress-bar":``},null,2)],10,Zy))}}),$y=Ll({extendBase:e=>({close:Cg({size:e.size}),fullscreen:Cg({size:e.size}),cancel:Sg({size:e.size,variant:`pure`}),confirm:Sg({size:e.size})}),slots:{overlay:[`fixed inset-0 z-base bg-mask`,`data-[state=open]:animate-in data-[state=open]:fade-in-0`,`data-[state=closed]:animate-out data-[state=closed]:fade-out-0`],popup:[`group fixed start-1/2 top-1/2 z-base flex flex-col w-max lt-sm:w-full lt-sm:min-w-auto lt-sm:max-w-full border bg-popover shadow-lg outline-none duration-200 rounded-lg`,`-translate-x-1/2 -translate-y-1/2 [&[dir=rtl]]:translate-x-1/2`,`data-[dragging]:transition-none data-[dragging]:select-none`,`data-[fullscreen]:w-screen data-[fullscreen]:h-screen`,`data-[fullscreen]:max-w-none data-[fullscreen]:rounded-none data-[fullscreen]:shadow-none`,`data-[fullscreen]:data-[state=open]:slide-in-from-top-1/2`,`data-[fullscreen]:data-[state=closed]:slide-out-to-top-1/2`,`data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:slide-in-from-left-1/2`,`data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:slide-out-to-left-1/2`],header:`flex flex-col lt-sm:text-center data-[draggable]:cursor-grab data-[draggable]:touch-none group-data-[dragging]:cursor-grabbing`,title:`flex items-center font-semibold leading-none tracking-tight m-0`,icon:`group-data-[type=info]:text-info group-data-[type=success]:text-success group-data-[type=warning]:text-warning group-data-[type=error]:text-destructive`,description:`text-muted-foreground m-0`,close:`absolute`,fullscreen:`absolute`,content:`grow overflow-auto [overscroll-behavior:contain]`,footer:`flex justify-end lt-sm:flex-col-reverse`,cancel:``,confirm:``},variants:{size:{xs:{popup:`gap-y-1.5 min-w-xs max-w-3xl px-2 py-1.5 text-2xs`,header:`gap-y-1.5`,title:`gap-x-1.5 text-xs`,description:`text-2xs`,close:`end-1.5 top-1.5`,fullscreen:`end-8 top-1.5`,footer:`gap-1.5`},sm:{popup:`gap-y-2 min-w-sm max-w-4xl px-3 py-2 text-xs`,header:`gap-y-2`,title:`gap-x-1.75 text-sm`,description:`text-xs`,close:`end-1.75 top-1.75`,fullscreen:`end-8 top-1.75`,footer:`gap-2`},md:{popup:`gap-y-3 min-w-md max-w-5xl px-4 py-3 text-sm`,header:`gap-y-3`,title:`gap-x-2 text-base`,description:`text-sm`,close:`end-2 top-2`,fullscreen:`end-10 top-2`,footer:`gap-3`},lg:{popup:`gap-y-4 min-w-lg max-w-6xl px-5 py-4 text-base`,header:`gap-y-4`,title:`gap-x-2.5 text-lg`,description:`text-base`,close:`end-2.5 top-2.5`,fullscreen:`end-10 top-2.5`,footer:`gap-4`},xl:{popup:`gap-y-5 min-w-xl max-w-7xl px-6 py-5 text-lg`,header:`gap-y-5`,title:`gap-x-3 text-xl`,description:`text-lg`,close:`end-3 top-3`,fullscreen:`end-12 top-3`,footer:`gap-5`},"2xl":{popup:`gap-y-6 min-w-2xl max-w-7xl px-7 py-6 text-xl`,header:`gap-y-6`,title:`gap-x-3.5 text-2xl`,description:`text-xl`,close:`end-4 top-4`,fullscreen:`end-13 top-4`,footer:`gap-6`}},pure:{true:{popup:`p-0 gap-0 border-none`}}},defaultVariants:{size:`md`}});Ll({slots:{root:`relative w-full overflow-hidden rounded-full bg-muted`,indicator:`h-full w-full flex-1 rounded-full transition-[transform,width] duration-300 transform-gpu will-change-transform data-[state=indeterminate]:w-2/5 data-[state=indeterminate]:opacity-80`,circle:``,track:``,label:``},variants:{color:{primary:{indicator:`bg-primary`},destructive:{indicator:`bg-destructive`},success:{indicator:`bg-success`},warning:{indicator:`bg-warning`},info:{indicator:`bg-info`},carbon:{indicator:`bg-carbon`},secondary:{indicator:`bg-secondary-foreground/20`},accent:{indicator:`bg-accent-foreground/20`}},size:{xs:{root:`h-1.5`},sm:{root:`h-2`},md:{root:`h-2.5`},lg:{root:`h-3`},xl:{root:`h-3.5`},"2xl":{root:`h-4`}}},defaultVariants:{color:`primary`,size:`md`}}),Ll({slots:{root:`relative inline-flex shrink-0 items-center justify-center rounded-full`,indicator:`fill-none stroke-current transition-[stroke-dasharray,stroke-dashoffset] duration-300 ease-in-out`,circle:`size-full`,track:`fill-none stroke-current text-muted`,label:`pointer-events-none absolute inset-0 flex items-center justify-center`},variants:{color:{primary:{indicator:`text-primary`},destructive:{indicator:`text-destructive`},success:{indicator:`text-success`},warning:{indicator:`text-warning`},info:{indicator:`text-info`},carbon:{indicator:`text-carbon`},secondary:{indicator:`text-secondary-foreground/40`},accent:{indicator:`text-accent-foreground/40`}},size:{xs:{root:`h-8 w-8 text-[10px]`},sm:{root:`h-10 w-10 text-xs`},md:{root:`h-12 w-12 text-sm`},lg:{root:`h-16 w-16 text-base`},xl:{root:`h-20 w-20 text-lg`},"2xl":{root:`h-24 w-24 text-xl`}}},defaultVariants:{color:`primary`,size:`md`}});var eb=Ll({slots:{root:`fixed z-max w-0 h-0 pointer-events-none`,indicator:`fixed top-0 start-0 w-full h-0.75 bg-primary`}}),tb=P({name:`SProgressProvider`,__name:`progress-provider`,props:{direction:{},minimum:{},maximum:{},easing:{},speed:{},trickle:{type:Boolean},trickleSpeed:{}},setup(e){let t=e;return Gy(U(()=>eb())),(e,n)=>(I(),R(M(Qy),ge(Ya(t)),null,16))}}),nb=P({name:`SDialogProvider`,__name:`dialog-provider`,setup(e){return my(U(()=>$y({size:`md`}))),(e,t)=>(I(),R(M(By)))}}),[rb,ib]=ql({name:`UIConfigProvider`,key:S_});function ab(e,t){let n=x_(e);return g_(n),sb(e,n,ob(e,n),t),{commitThemeConfig:n.setThemeState}}function ob(e,t){let n=U(()=>vg(t.theme.value)),r=cb(),i=()=>{let t=r.acquire(e.nonce);t&&(t.textContent=n.value)};return ir(n,i),$r(i),n}function sb(e,t,n,r){let{theme:i,mode:a,customPresets:o,appliedPresetName:s,extra:c,refreshThemeConfig:l}=t,u=_g();ir([n,a,o,s,()=>e.getExtraTheme?.()],([t,n,r,a,o])=>{e.persistTheme&&typeof document<`u`&&u.write({options:i.value,mode:n,style:t,presets:r,...a?{appliedPreset:a}:{},...o?{extra:o}:{}})},{immediate:!0});let d=e=>{e.key===`__VEAN_THEME`&&(l(),r(c.value))};$r(()=>{e.persistTheme&&(r(c.value),window.addEventListener(`storage`,d))}),ri(()=>{window.removeEventListener(`storage`,d),u.flush()})}function cb(){let e=null;return{acquire:t=>typeof document>`u`?null:(e??=lb(),t&&!e.getAttribute(`nonce`)&&e.setAttribute(`nonce`,t),e)}}function lb(){let e=document.getElementById(eg);if(e instanceof HTMLStyleElement)return e;let t=document.createElement(`style`);return t.id=eg,document.head.appendChild(t),t}var ub=P({name:`SConfigProvider`,__name:`config-provider`,props:{theme:{default:()=>({})},iconify:{default:()=>({width:`1.25em`,height:`1.25em`})},progress:{},toast:{},customToast:{type:Boolean},persistTheme:{type:Boolean,default:!1},themeConfig:{},presetProvider:{},isServer:{type:Boolean,default:h_},getExtraTheme:{},onExtraThemeChange:{},dir:{},locale:{},nonce:{},tooltip:{},iconRender:{},linkComponent:{},messages:{}},setup(e,{expose:t}){let n=e,r=Yd(n,[`iconRender`,`theme`,`iconify`,`progress`,`toast`,`customToast`,`persistTheme`,`themeConfig`,`presetProvider`,`isServer`,`getExtraTheme`,`onExtraThemeChange`]),i=n.iconRender??(e=>wo(W,{icon:e,ssr:n.isServer})),{commitThemeConfig:a}=ab(n,e=>{n.onExtraThemeChange?.(e)});return rb(Jt(n)),t({commitThemeConfig:a}),(t,n)=>(I(),R(M(sy),eo(M(r),{"icon-render":M(i)}),{default:Yn(()=>[hi(t.$slots,`default`),e.customToast?H(`v-if`,!0):(I(),R(s_,ge(eo({key:0},e.toast)),null,16)),B(nb),B(tb,ge(Ya(e.progress)),null,16)]),_:3},16,[`icon-render`]))}}),db=/^[\w+.-]{2,}:\/\//;function fb(e){return e.endsWith(`/`)?e:`${e}/`}function pb(e){return(e.endsWith(`/`)?e.slice(0,-1):e)||`/`}function mb(e,...t){let n=e;for(let e of t)e&&e!==`/`&&(n=n?fb(n)+e.replace(/^\.?\//,``):e);return n}function hb(e,t){if(!t||t===`/`||db.test(e))return e;let n=pb(t);return e.startsWith(n)?e:mb(n,e)}function gb(e,t){let n=e.match(db);return t+(n?e.slice(n[0].length):e)}var _b={bus:{docksEntryUpdated:`docks:entry:updated`,docksActivate:`docks:activate`,terminalsSessionUpdated:`terminals:session:updated`,messagesAdded:`messages:added`,messagesUpdated:`messages:updated`,messagesRemoved:`messages:removed`,messagesCleared:`messages:cleared`,commandsRegistered:`commands:registered`,commandsUnregistered:`commands:unregistered`},rpc:{docksActivate:`hub:docks:activate`,commandsExecute:`hub:commands:execute`,messagesAdd:`hub:messages:add`,messagesUpdate:`hub:messages:update`,messagesRemove:`hub:messages:remove`,messagesClear:`hub:messages:clear`,terminalsWrite:`hub:terminals:write`,terminalsResize:`hub:terminals:resize`,terminalsTerminate:`hub:terminals:terminate`,terminalsRestart:`hub:terminals:restart`,terminalsRemove:`hub:terminals:remove`},client:{docksPanelStateChanged:`panel:state:changed`},broadcast:{docksActivate:`devframe:docks:activate`,terminalsUpdated:`devframe:terminals:updated`,messagesUpdated:`devframe:messages:updated`},sharedState:{docks:`devframe:docks`,docksActive:`devframe:docks:active`,commands:`devframe:commands`,userSettings:`devframe:user-settings`,dockRenderers:`devframe:dock-renderers`},stream:{terminals:`devframe:terminals`},postMessage:{frameNav:`devframe:frame-nav`},broadcastChannel:{docksActivate:`devframe:docks:activate`}};_b.sharedState.dockRenderers;function vb(e,t){let n=`\x1B[${e}m`,r=`\x1B[${t}m`;return((e,...t)=>{if(Array.isArray(e)&&`raw`in e){let i=e,a=``;for(let e=0;e<i.length;e++)a+=i[e],e<t.length&&(a+=String(t[e]));return`${n}${a}${r}`}return`${n}${String(e)}${r}`})}var yb={blue:vb(34,39),cyan:vb(36,39),gray:vb(90,39),green:vb(32,39),red:vb(31,39),yellow:vb(33,39),bold:vb(1,22),dim:vb(2,22),reset:vb(0,0),underline:vb(4,24)};function bb(e,...t){return typeof e==`function`?e(...t):e}var xb=Error.captureStackTrace,Sb=class e extends Error{name;code;docs;fix;sources;data;get why(){return this.message}constructor(t,n=e){super(t.why,{cause:t.cause}),this.code=this.name=t.code,this.fix=t.fix,this.docs=t.docs,this.sources=t.sources,this.data=t.data,xb?.(this,n)}toJSON(){return{name:this.name,why:this.why,fix:this.fix,docs:this.docs,sources:this.sources,cause:this.cause,data:this.data,stack:this.stack}}};function Cb(e,t){return typeof e==`string`?`${e}/${t.toLowerCase()}`:e?.(t)}function wb(e){let t=e.reporters??[],n={},{docsBase:r}=e;for(let i of Object.keys(e.codes)){let a=e.codes[i],o=a.docs===!1?void 0:a.docs||Cb(r,i),s=(e={},n={})=>{let r=new Sb({code:i,why:bb(a.why,e),fix:bb(a.fix,e),docs:o,cause:e.cause,sources:e.sources,data:bb(a.data,e)},s);for(let e of t)e(r,n);return r};n[i]=s}return n}function Tb(e){return t=>{let n=`${e.bold(e.red(`[${t.name}]`))} ${t.message}`,r=[];return t.fix&&r.push(`${e.dim(`fix:`)} ${t.fix}`),t.sources?.length&&r.push(`${e.dim(`sources:`)} ${t.sources.join(`, `)}`),t.docs&&r.push(`${e.dim(`see:`)} ${e.cyan(t.docs)}`),r.length===0?n:[n,...r.map((t,n)=>`${e.dim(n<r.length-1?`├▶`:`╰▶`)} ${t}`)].join(`
27
27
  `)}}var Eb={bus:{agentManifestChanged:`agent:manifest:changed`,agentToolRegistered:`agent:tool:registered`,agentToolUnregistered:`agent:tool:unregistered`,agentResourceRegistered:`agent:resource:registered`,agentResourceUnregistered:`agent:resource:unregistered`},client:{isTrustedUpdated:`rpc:is-trusted:updated`,error:`rpc:error`,connectionStatus:`connection:status`,connectionError:`connection:error`},broadcast:{authRevoked:`devframe:auth:revoked`,cacheInvalidate:`devframe:rpc:cache:invalidate`,clientStateUpdated:`devframe:rpc:client-state:updated`,clientStatePatch:`devframe:rpc:client-state:patch`,streamingChunk:`devframe:streaming:chunk`,streamingEnd:`devframe:streaming:end`,streamingUploadCancel:`devframe:streaming:upload-cancel`},inPageChannel:{panelStateUpdated:`devframe:in-page:panel-state:updated`,panelStatePatch:`devframe:in-page:panel-state:patch`},postMessage:{remoteAssetsError:`devframe:remote-assets-error`,inPageChannel:`devframe:in-page-channel`}},Db=Tb(yb);function Ob(e,{method:t=`warn`}={}){console[t](Db(e))}function kb(e){return wb({...e,reporters:[Ob,...e.reporters??[]]})}function Ab(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var jb=Math.random.bind(Math),Mb=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function Nb(e=21){let t=``,n=e;for(;n--;)t+=Mb[jb()*64|0];return t}var Pb=6e4,Fb=e=>e,Ib=Fb,{clearTimeout:Lb,setTimeout:Rb}=globalThis;function zb(e,t){let{post:n,on:r,off:i=()=>{},eventNames:a=[],serialize:o=Fb,deserialize:s=Ib,resolver:c,bind:l=`rpc`,timeout:u=Pb,proxify:d=!0}=t,f=!1,p=new Map,m,h;async function g(e,r,i,a){if(f)throw Error(`[birpc] rpc is closed, cannot call "${e}"`);let s={m:e,a:r,t:`q`};a&&(s.o=!0);let c=async e=>n(o(e));if(i){await c(s);return}if(m)try{await m}finally{m=void 0}let{promise:l,resolve:d,reject:g}=Ab(),_=Nb();s.i=_;let v;async function y(n=s){return u>=0&&(v=Rb(()=>{try{if(t.onTimeoutError?.call(h,e,r)!==!0)throw Error(`[birpc] timeout on calling "${e}"`)}catch(e){g(e)}p.delete(_)},u),typeof v==`object`&&(v=v.unref?.())),p.set(_,{resolve:d,reject:g,timeoutId:v,method:e}),await c(n),l}try{t.onRequest?await t.onRequest.call(h,s,y,d):await y()}catch(e){if(t.onGeneralError?.call(h,e)!==!0)throw e;return}finally{Lb(v),p.delete(_)}return l}let _={$call:(e,...t)=>g(e,t,!1),$callOptional:(e,...t)=>g(e,t,!1,!0),$callEvent:(e,...t)=>g(e,t,!0),$callRaw:e=>g(e.method,e.args,e.event,e.optional),$rejectPendingCalls:y,get $closed(){return f},get $meta(){return t.meta},$close:v,$functions:e};h=d?new Proxy({},{get(t,n){if(Object.hasOwn(_,n))return _[n];if(n===`then`&&!a.includes(`then`)&&!(`then`in e))return;let r=(...e)=>g(n,e,!0);if(a.includes(n))return r.asEvent=r,r;let i=(...e)=>g(n,e,!1);return i.asEvent=r,i}}):_;function v(e){f=!0,p.forEach(({reject:t,method:n})=>{let r=Error(`[birpc] rpc is closed, cannot call "${n}"`);if(e)return e.cause??=r,t(e);t(r)}),p.clear(),i(b)}function y(e){let t=Array.from(p.values()).map(({method:t,reject:n})=>e?e({method:t,reject:n}):n(Error(`[birpc]: rejected pending call "${t}".`)));return p.clear(),t}async function b(r,...i){let a;try{a=s(r)}catch(e){if(t.onGeneralError?.call(h,e)!==!0)throw e;return}if(a.t===`q`){let{m:r,a:s,o:u}=a,d,f,p=await(c?c.call(h,r,e[r]):e[r]);if(u&&(p||=()=>void 0),!p)f=Error(`[birpc] function "${r}" not found`);else try{d=await p.apply(l===`rpc`?h:e,s)}catch(e){f=e}if(a.i){if(f&&t.onFunctionError&&t.onFunctionError.call(h,f,r,s)===!0)return;if(!f)try{await n(o({t:`s`,i:a.i,r:d}),...i);return}catch(e){if(f=e,t.onGeneralError?.call(h,e,r,s)!==!0)throw e}try{await n(o({t:`s`,i:a.i,e:f}),...i)}catch(e){if(t.onGeneralError?.call(h,e,r,s)!==!0)throw e}}}else{let{i:e,r:t,e:n}=a,r=p.get(e);r&&(Lb(r.timeoutId),n?r.reject(n):r.resolve(t)),p.delete(e)}}return m=r(b),h}function Bb(e,t){return t.safety?t.safety:e===`static`||e===`query`||e==null?`read`:`action`}var Vb=Object.freeze({type:`object`,additionalProperties:!0});function Hb(e){let t=e[`~standard`];if(t.jsonSchema)try{return t.jsonSchema.input({target:`draft-2020-12`})}catch{return Vb}return Vb}function Ub(e){if(!e||e.length===0)return{type:`object`,properties:{}};let t={},n=[];for(let r=0;r<e.length;r++){let i=`arg${r}`;t[i]=Hb(e[r]),n.push(i)}return{type:`object`,properties:t,required:n,additionalProperties:!1}}function Wb(e,t){if(Array.isArray(e))return e;if(e==null)return[];if(typeof e!=`object`)return;let n=e;if(t!=null)return Array.from({length:t},(e,t)=>n[`arg${t}`]);if(`arg0`in n){let e=[];for(;`arg${e.length}`in n;)e.push(n[`arg${e.length}`]);return e}return Object.keys(n).length===0?[]:void 0}function Gb(e,t){return Wb(e,t)??[e]}function Kb(e){return typeof e==`string`?`'${e}'`:new Xb().serialize(e)}var qb=` _-,;:!?.'"()[]{}@*/\\&#%\`^+<=>|~$0123456789abcdefghijklmnopqrstuvwxyz`,Jb=(function(){let e=new Uint8Array(128);for(let t=0;t<69;t++)e[qb.charCodeAt(t)]=t+1;for(let t=65;t<=90;t++)e[t]=e[t+32];return e})();function Yb(e,t){if(e===t)return 0;let n=Math.min(e.length,t.length),r=0;for(let i=0;i<n;i++){let n=e.charCodeAt(i),a=t.charCodeAt(i);if(n===a)continue;let o=n<128&&Jb[n]?Jb[n]:n+128,s=a<128&&Jb[a]?Jb[a]:a+128;if(o!==s)return o<s?-1:1;r===0&&(r=n>a?-1:1)}return e.length===t.length?r:e.length<t.length?-1:1}var Xb=(function(){class e{#e=new Map;compare(e,t){let n=typeof e,r=typeof t;return n===`string`&&r===`string`?Yb(e,t):n===`number`&&r===`number`?e-t:Yb(this.serialize(e,!0),this.serialize(t,!0))}serialize(e,t){if(e===null)return`null`;switch(typeof e){case`string`:return t?e:`'${e}'`;case`bigint`:return`${e}n`;case`object`:return this.$object(e);case`function`:return this.$function(e)}return String(e)}serializeObject(e){let t=Object.prototype.toString.call(e);if(t!==`[object Object]`)return this.serializeBuiltInType(t.length<10?`unknown:${t}`:t.slice(8,-1),e);let n=e.constructor,r=n===Object||n===void 0?``:n.name;if(r!==``&&globalThis[r]===n)return this.serializeBuiltInType(r,e);if(`toJSON`in e&&typeof e.toJSON==`function`){let t=e.toJSON();return r+(typeof t==`object`&&t?this.$object(t):`(${this.serialize(t)})`)}let i=Object.keys(e).sort(Yb),a=`${r}{`;for(let t=0;t<i.length;t++){let n=i[t];a+=`${n}:${this.serialize(e[n])}`,t<i.length-1&&(a+=`,`)}return a+`}`}serializeBuiltInType(e,t){let n=this[`$`+e];if(n)return n.call(this,t);if(typeof t.entries==`function`)return this.serializeObjectEntries(e,t.entries());throw Error(`Cannot serialize ${e}`)}serializeObjectEntries(e,t){let n=Array.from(t).sort((e,t)=>this.compare(e[0],t[0])),r=`${e}{`;for(let e=0;e<n.length;e++){let[t,i]=n[e];r+=`${this.serialize(t,!0)}:${this.serialize(i)}`,e<n.length-1&&(r+=`,`)}return r+`}`}$object(e){let t=this.#e.get(e);return t===void 0&&(this.#e.set(e,`#${this.#e.size}`),t=this.serializeObject(e),this.#e.set(e,t)),t}$function(e){let t=Function.prototype.toString.call(e);return t.slice(-15)===`[native code] }`?`${e.name||``}()[native]`:`${e.name}(${e.length})${t.replace(/\s*\n\s*/g,``)}`}$Array(e){let t=`[`;for(let n=0;n<e.length;n++)t+=this.serialize(e[n]),n<e.length-1&&(t+=`,`);return t+`]`}$Date(e){try{return`Date(${e.toISOString()})`}catch{return`Date(null)`}}$ArrayBuffer(e){return`ArrayBuffer[${new Uint8Array(e).join(`,`)}]`}$Set(e){return`Set${this.$Array(Array.from(e).sort((e,t)=>this.compare(e,t)))}`}$Map(e){return this.serializeObjectEntries(`Map`,e.entries())}}for(let t of[`Error`,`RegExp`,`URL`])e.prototype[`$`+t]=function(e){return`${t}(${e})`};for(let t of[`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float32Array`,`Float64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`,`)}]`};for(let t of[`BigInt64Array`,`BigUint64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`n,`)}${e.length>0?`n`:``}]`};return e})(),Zb=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],Qb=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],$b=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`,ex=[],tx=class{_data=new nx;_hash=new nx([...Zb]);_nDataBytes=0;_minBufferSize=0;finalize(e){e&&this._append(e);let t=this._nDataBytes*8,n=this._data.sigBytes*8;return this._data.words[n>>>5]|=128<<24-n%32,this._data.words[(n+64>>>9<<4)+14]=Math.floor(t/4294967296),this._data.words[(n+64>>>9<<4)+15]=t,this._data.sigBytes=this._data.words.length*4,this._process(),this._hash}_doProcessBlock(e,t){let n=this._hash.words,r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],c=n[5],l=n[6],u=n[7];for(let n=0;n<64;n++){if(n<16)ex[n]=e[t+n]|0;else{let e=ex[n-15],t=(e<<25|e>>>7)^(e<<14|e>>>18)^e>>>3,r=ex[n-2],i=(r<<15|r>>>17)^(r<<13|r>>>19)^r>>>10;ex[n]=t+ex[n-7]+i+ex[n-16]}let d=s&c^~s&l,f=r&i^r&a^i&a,p=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),m=(s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25),h=u+m+d+Qb[n]+ex[n],g=p+f;u=l,l=c,c=s,s=o+h|0,o=a,a=i,i=r,r=h+g|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+s|0,n[5]=n[5]+c|0,n[6]=n[6]+l|0,n[7]=n[7]+u|0}_append(e){typeof e==`string`&&(e=nx.fromUtf8(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes}_process(e){let t,n=this._data.sigBytes/64;n=e?Math.ceil(n):Math.max((n|0)-this._minBufferSize,0);let r=n*16,i=Math.min(r*4,this._data.sigBytes);if(r){for(let e=0;e<r;e+=16)this._doProcessBlock(this._data.words,e);t=this._data.words.splice(0,r),this._data.sigBytes-=i}return new nx(t,i)}},nx=class e{words;sigBytes;constructor(e,t){e=this.words=e||[],this.sigBytes=t===void 0?e.length*4:t}static fromUtf8(t){let n=unescape(encodeURIComponent(t)),r=n.length,i=[];for(let e=0;e<r;e++)i[e>>>2]|=(n.charCodeAt(e)&255)<<24-e%4*8;return new e(i,r)}toBase64(){let e=[];for(let t=0;t<this.sigBytes;t+=3){let n=this.words[t>>>2]>>>24-t%4*8&255,r=this.words[t+1>>>2]>>>24-(t+1)%4*8&255,i=this.words[t+2>>>2]>>>24-(t+2)%4*8&255,a=n<<16|r<<8|i;for(let n=0;n<4&&t*8+n*6<this.sigBytes*8;n++)e.push($b.charAt(a>>>6*(3-n)&63))}return e.join(``)}concat(e){if(this.words[this.sigBytes>>>2]&=4294967295<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4),this.sigBytes%4)for(let t=0;t<e.sigBytes;t++){let n=e.words[t>>>2]>>>24-t%4*8&255;this.words[this.sigBytes+t>>>2]|=n<<24-(this.sigBytes+t)%4*8}else for(let t=0;t<e.sigBytes;t+=4)this.words[this.sigBytes+t>>>2]=e.words[t>>>2];this.sigBytes+=e.sigBytes}};function rx(e){return new tx().finalize(e).toBase64()}function ix(e){return rx(Kb(e))}function ax(e){return ix(e)}function ox(){let e={};function t(t,...n){let r=e[t]||[];for(let e=0,t=r.length;e<t;e++){let t=r[e];t&&t(...n)}}function n(n,...r){t(n,...r),delete e[n]}function r(t,n){return(e[t]||=[]).push(n),()=>{e[t]=e[t]?.filter(e=>n!==e)}}function i(e,t){let n=r(e,((...e)=>(n(),t(...e))));return n}return{_listeners:e,emit:t,emitOnce:n,on:r,once:i}}var sx=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function cx(e=21){let t=``,n=e;for(;n--;)t+=sx[Math.random()*64|0];return t}var lx=Symbol.for(`immer-nothing`),ux=Symbol.for(`immer-draftable`),dx=Symbol.for(`immer-state`),fx=[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},`This object has been frozen and should not be mutated`,function(e){return`Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? `+e},`An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.`,`Immer forbids circular references`,"The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},`Object.defineProperty() cannot be used on an Immer draft`,`Object.setPrototypeOf() cannot be used on an Immer draft`,`Immer only supports deleting array indices`,`Immer only supports setting array indices and the 'length' property`,function(e){return`'original' expects a draft, got: ${e}`}];function px(e,...t){{let n=fx[e],r=Lx(n)?n.apply(null,t):n;throw Error(`[Immer] ${r}`)}}var mx=Object,hx=mx.getPrototypeOf,gx=`constructor`,_x=`prototype`,vx=`configurable`,yx=`enumerable`,bx=`writable`,xx=`value`,Sx=e=>!!e&&!!e[dx];function Cx(e){return e?Ex(e)||Nx(e)||!!e[ux]||!!e[gx]?.[ux]||Px(e)||Fx(e):!1}var wx=mx[_x][gx].toString(),Tx=new WeakMap;function Ex(e){if(!e||!Ix(e))return!1;let t=hx(e);if(t===null||t===mx[_x])return!0;let n=mx.hasOwnProperty.call(t,gx)&&t[gx];if(n===Object)return!0;if(!Lx(n))return!1;let r=Tx.get(n);return r===void 0&&(r=Function.toString.call(n),Tx.set(n,r)),r===wx}function Dx(e,t,n=!0){Ox(e)===0?(n?Reflect.ownKeys(e):mx.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Ox(e){let t=e[dx];return t?t.type_:Nx(e)?1:Px(e)?2:Fx(e)?3:0}var kx=(e,t,n=Ox(e))=>n===2?e.has(t):mx[_x].hasOwnProperty.call(e,t),Ax=(e,t,n=Ox(e))=>n===2?e.get(t):e[t],jx=(e,t,n,r=Ox(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function Mx(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var Nx=Array.isArray,Px=e=>e instanceof Map,Fx=e=>e instanceof Set,Ix=e=>typeof e==`object`,Lx=e=>typeof e==`function`,Rx=e=>typeof e==`boolean`;function zx(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var Bx=e=>Ix(e)?e?.[dx]:null,Vx=e=>e.copy_||e.base_,Hx=e=>e.modified_?e.copy_:e.base_;function Ux(e,t){if(Px(e))return new Map(e);if(Fx(e))return new Set(e);if(Nx(e))return Array[_x].slice.call(e);let n=Ex(e);if(t===!0||t===`class_only`&&!n){let t=mx.getOwnPropertyDescriptors(e);delete t[dx];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){let i=n[r],a=t[i];a[bx]===!1&&(a[bx]=!0,a[vx]=!0),(a.get||a.set)&&(t[i]={[vx]:!0,[bx]:!0,[yx]:a[yx],[xx]:e[i]})}return mx.create(hx(e),t)}{let t=hx(e);if(t!==null&&n)return{...e};let r=mx.create(t);return mx.assign(r,e)}}function Wx(e,t=!1){return qx(e)||Sx(e)||!Cx(e)||(Ox(e)>1&&mx.defineProperties(e,{set:Kx,add:Kx,clear:Kx,delete:Kx}),mx.freeze(e),t&&Dx(e,(e,t)=>{Wx(t,!0)},!1)),e}function Gx(){px(2)}var Kx={[xx]:Gx};function qx(e){return e===null||!Ix(e)||mx.isFrozen(e)}var Jx=`MapSet`,Yx=`Patches`,Xx=`ArrayMethods`,Zx={};function Qx(e){let t=Zx[e];return t||px(0,e),t}var $x=e=>!!Zx[e];function eS(e,t){Zx[e]||(Zx[e]=t)}var tS,nS=()=>tS,rS=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:$x(Jx)?Qx(Jx):void 0,arrayMethodsPlugin_:$x(Xx)?Qx(Xx):void 0});function iS(e,t){t&&(e.patchPlugin_=Qx(Yx),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function aS(e){oS(e),e.drafts_.forEach(cS),e.drafts_=null}function oS(e){e===tS&&(tS=e.parent_)}var sS=e=>tS=rS(tS,e);function cS(e){let t=e[dx];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function lS(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[dx].modified_&&(aS(t),px(4)),Cx(e)&&(e=uS(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[dx].base_,e,t)}else e=uS(t,n);return dS(t,e,!0),aS(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===lx?void 0:e}function uS(e,t){if(qx(t))return t;let n=t[dx];if(!n)return yS(t,e.handledSet_,e);if(!pS(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:t}=n;if(t)for(;t.length>0;)t.pop()(e);_S(n,e)}return n.copy_}function dS(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Wx(t,n)}function fS(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var pS=(e,t)=>e.scope_===t,mS=[];function hS(e,t,n,r){let i=Vx(e),a=e.type_;if(r!==void 0&&Ax(i,r,a)===t){jx(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;Dx(i,(e,n)=>{if(Sx(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??mS;for(let e of o)jx(i,e,n,a)}function gS(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!pS(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=Hx(i);hS(e,i.draft_??i,a,n),_S(i,r)})}function _S(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let r=n.getPath(e);r&&n.generatePatches_(e,r,t)}fS(e)}}function vS(e,t,n){let{scope_:r}=e;if(Sx(n)){let i=n[dx];pS(i,r)&&i.callbacks_.push(function(){OS(e),hS(e,n,Hx(i),t)})}else Cx(n)&&e.callbacks_.push(function(){let i=Vx(e);e.type_===3?i.has(n)&&yS(n,r.handledSet_,r):Ax(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&yS(Ax(e.copy_,t,e.type_),r.handledSet_,r)})}function yS(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||Sx(e)||t.has(e)||!Cx(e)||qx(e)||(t.add(e),Dx(e,(r,i)=>{if(Sx(i)){let t=i[dx];pS(t,n)&&(jx(e,r,Hx(t),e.type_),fS(t))}else Cx(i)&&yS(i,t,n)})),e}function bS(e,t){let n=Nx(e),r={type_:+!!n,scope_:t?t.scope_:nS(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=r,a=xS;n&&(i=[r],a=SS);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var xS={get(e,t){if(t===dx)return e;let n=e.scope_.arrayMethodsPlugin_,r=e.type_===1&&typeof t==`string`;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);let i=Vx(e);if(!kx(i,t,e.type_))return TS(e,i,t);let a=i[t];if(e.finalized_||!Cx(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&zx(t))return a;if(a===CS(e.base_,t)||wS(e,t,a)){OS(e);let n=e.type_===1?+t:t,r=AS(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in Vx(e)},ownKeys(e){return Reflect.ownKeys(Vx(e))},set(e,t,n){let r=ES(Vx(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=CS(Vx(e),t),i=r?.[dx];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.delete(t),!0;if(Mx(n,r)&&(n!==void 0||kx(e.base_,t,e.type_)))return!0;OS(e),DS(e)}return e.copy_[t]===n&&(n!==void 0||kx(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),vS(e,t,n)),!0},deleteProperty(e,t){return OS(e),CS(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),DS(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=Vx(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[bx]:!0,[vx]:e.type_!==1||t!==`length`,[yx]:r[yx],[xx]:n[t]}},defineProperty(){px(11)},getPrototypeOf(e){return hx(e.base_)},setPrototypeOf(){px(12)}},SS={};for(let e in xS){let t=xS[e];SS[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}SS.deleteProperty=function(e,t){return isNaN(parseInt(t))&&px(13),SS.set.call(this,e,t,void 0)},SS.set=function(e,t,n){return t!==`length`&&isNaN(parseInt(t))&&px(14),xS.set.call(this,e[0],t,n,e[0])};function CS(e,t){let n=e[dx];return(n?Vx(n):e)[t]}function wS(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!Cx(n)||n[dx]?!1:e.baseRefs_.has(n)}function TS(e,t,n){let r=ES(t,n);return r?xx in r?r[xx]:r.get?.call(e.draft_):void 0}function ES(e,t){if(!(t in e))return;let n=hx(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=hx(n)}}function DS(e){e.modified_||(e.modified_=!0,e.parent_&&DS(e.parent_))}function OS(e){e.copy_||=(e.assigned_=new Map,Ux(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var kS=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(Lx(e)&&!Lx(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}Lx(t)||px(6),n!==void 0&&!Lx(n)&&px(7);let r;if(Cx(e)){let i=sS(this),a=AS(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?aS(i):oS(i)}return iS(i,n),lS(r,i)}if(!e||!Ix(e)){if(r=t(e),r===void 0&&(r=e),r===lx&&(r=void 0),this.autoFreeze_&&Wx(r,!0),n){let t=[],i=[];Qx(Yx).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}px(1,e)},this.produceWithPatches=(e,t)=>{if(Lx(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},Rx(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Rx(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Rx(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Cx(e)||px(8),Sx(e)&&(e=jS(e));let t=sS(this),n=AS(t,e,void 0);return n[dx].isManual_=!0,oS(t),n}finishDraft(e,t){let n=e&&e[dx];n&&n.isManual_||px(9);let{scope_:r}=n;return iS(r,t),lS(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let r=t[n];if(r.path.length===0&&r.op===`replace`){e=r.value;break}}n>-1&&(t=t.slice(n+1));let r=Qx(Yx).applyPatches_;return Sx(e)?r(e,t):this.produce(e,e=>r(e,t))}};function AS(e,t,n,r){let[i,a]=Px(t)?Qx(Jx).proxyMap_(t,n):Fx(t)?Qx(Jx).proxySet_(t,n):bS(t,n);return(n?.scope_??nS()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?gS(n,a,r):a.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(a);let{patchPlugin_:t}=e;a.modified_&&t&&t.generatePatches_(a,[],e)}),i}function jS(e){return Sx(e)||px(10,e),MS(e)}function MS(e){if(!Cx(e)||qx(e))return e;let t=e[dx],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Ux(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Ux(e,!0);return Dx(n,(e,t)=>{jx(n,e,MS(t))},r),t&&(t.finalized_=!1),n}function NS(){fx.push(`Sets cannot have "replace" patches.`,function(e){return`Unsupported patch operation: `+e},function(e){return`Cannot apply patch, path doesn't resolve: `+e},`Patching reserved attributes like __proto__, prototype and constructor is not allowed`);function e(n,r=[]){if(n.key_!==void 0){let e=n.parent_.copy_??n.parent_.base_,t=Bx(Ax(e,n.key_)),i=Ax(e,n.key_);if(i===void 0||i!==n.draft_&&i!==n.base_&&i!==n.copy_||t!=null&&t.base_!==n.base_)return null;let a=n.parent_.type_===3,o;if(a){let e=n.parent_;o=Array.from(e.drafts_.keys()).indexOf(n.key_)}else o=n.key_;if(!(a&&e.size>o||kx(e,o)))return null;r.push(o)}if(n.parent_)return e(n.parent_,r);r.reverse();try{t(n.copy_,r)}catch{return null}return r}function t(e,t){let n=e;for(let e=0;e<t.length-1;e++){let r=t[e];if(n=Ax(n,r),!Ix(n)||n===null)throw Error(`Cannot resolve path at '${t.join(`/`)}'`)}return n}let n=`replace`,r=`remove`;function i(e,t,n){if(e.scope_.processedForPatches_.has(e))return;e.scope_.processedForPatches_.add(e);let{patches_:r,inversePatches_:i}=n;switch(e.type_){case 0:case 2:return o(e,t,r,i);case 1:return a(e,t,r,i);case 3:return s(e,t,r,i)}}function a(e,t,i,a){let{base_:o,assigned_:s}=e,c=e.copy_;c.length<o.length&&([o,c]=[c,o],[i,a]=[a,i]);let l=e.allIndicesReassigned_===!0;for(let e=0;e<o.length;e++){let r=c[e],u=o[e];if((l||s?.get(e.toString()))&&r!==u){let o=r?.[dx];if(o&&o.modified_)continue;let s=t.concat([e]);i.push({op:n,path:s,value:d(r)}),a.push({op:n,path:s,value:d(u)})}}for(let e=o.length;e<c.length;e++){let n=t.concat([e]);i.push({op:`add`,path:n,value:d(c[e])})}for(let e=c.length-1;o.length<=e;--e){let n=t.concat([e]);a.push({op:r,path:n})}}function o(e,t,i,a){let{base_:o,copy_:s,type_:c}=e;Dx(e.assigned_,(e,l)=>{let u=Ax(o,e,c),f=Ax(s,e,c),p=l?kx(o,e)?n:`add`:r;if(u===f&&p===n)return;let m=t.concat(e);i.push(p===r?{op:p,path:m}:{op:p,path:m,value:d(f)}),a.push(p===`add`?{op:r,path:m}:p===r?{op:`add`,path:m,value:d(u)}:{op:n,path:m,value:d(u)})})}function s(e,t,n,i){let{base_:a,copy_:o}=e,s=0;a.forEach(e=>{if(!o.has(e)){let a=t.concat([s]);n.push({op:r,path:a,value:e}),i.unshift({op:`add`,path:a,value:e})}s++}),s=0,o.forEach(e=>{if(!a.has(e)){let a=t.concat([s]);n.push({op:`add`,path:a,value:e}),i.unshift({op:r,path:a,value:e})}s++})}function c(e,t,r){let{patches_:i,inversePatches_:a}=r;i.push({op:n,path:[],value:t===lx?void 0:t}),a.push({op:n,path:[],value:e})}function l(e,t){return t.forEach(t=>{let{path:i,op:a}=t,o=e;for(let e=0;e<i.length-1;e++){let t=Ox(o),n=i[e];typeof n!=`string`&&typeof n!=`number`&&(n=``+n),t!==0&&t!==1||n!==`__proto__`&&n!==gx||px(19),Lx(o)&&n===_x&&px(19),o=Ax(o,n),o!==null&&Ix(o)||px(18,i.join(`/`))}let s=Ox(o),c=u(t.value),l=i[i.length-1];switch(a){case n:switch(s){case 2:return o.set(l,c);case 3:px(16);default:return o[l]=c}case`add`:switch(s){case 1:return l===`-`?o.push(c):o.splice(l,0,c);case 2:return o.set(l,c);case 3:return o.add(c);default:return o[l]=c}case r:switch(s){case 1:return o.splice(l,1);case 2:return o.delete(l);case 3:return o.delete(t.value);default:return delete o[l]}default:px(17,a)}}),e}function u(e){if(!Cx(e))return e;if(Nx(e))return e.map(u);if(Px(e))return new Map(Array.from(e.entries()).map(([e,t])=>[e,u(t)]));if(Fx(e))return new Set(Array.from(e).map(u));let t=Object.create(hx(e));for(let n in e)t[n]=u(e[n]);return kx(e,ux)&&(t[ux]=e[ux]),t}function d(e){return Sx(e)?u(e):e}eS(Yx,{applyPatches_:l,generatePatches_:i,generateReplacementPatches_:c,getPath:e})}globalThis.Iterator?.from;var PS=new kS,FS=PS.produce,IS=PS.produceWithPatches.bind(PS),LS=PS.applyPatches.bind(PS),RS=1e3;function zS(e,t){if(e.add(t),e.size>RS){let t=e.values().next().value;t!==void 0&&e.delete(t)}}function BS(e){let{enablePatches:t=!1}=e;t&&NS();let n=ox(),r=e.initialValue,i=new Set;return{on:n.on,value:()=>r,patch:(e,t=cx())=>{i.has(t)||(NS(),r=LS(r,e),zS(i,t),n.emit(`updated`,r,void 0,t))},mutate:(e,a=cx())=>{if(!i.has(a)){if(zS(i,a),t){let[t,i]=IS(r,e);if(t===r)return;r=t,n.emit(`updated`,r,i,a)}else{let t=FS(r,e);if(t===r)return;r=t,n.emit(`updated`,r,void 0,a)}}},syncIds:i}}var VS=typeof self==`object`?self:globalThis,HS=new Set([`Error`,`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`,`AggregateError`]),US=new Set([`Boolean`,`Number`,`String`,`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float16Array`,`Float32Array`,`Float64Array`,`BigInt64Array`,`BigUint64Array`]);function WS(e,t){let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o,r=HS.has(e)?VS[e]:void 0;return n(new(r??VS.Error)(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}if(typeof a==`string`&&US.has(a))return n(new VS[a](o),i);throw TypeError(`unable to deserialize unsafe or unknown type: ${String(a)}`)};return r}function GS(e){return WS(new Map,e)(0)}var KS=``,{toString:qS}={},{keys:JS}=Object;function YS(e){let t=typeof e;if(t!==`object`||!e)return[0,t];let n=qS.call(e).slice(8,-1);switch(n){case`Array`:return[1,KS];case`Object`:return[2,KS];case`Date`:return[3,KS];case`RegExp`:return[4,KS];case`Map`:return[5,KS];case`Set`:return[6,KS];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]}function XS([e,t]){return e===0&&(t===`function`||t===`symbol`)}function ZS(e,t,n,r){let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=YS(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize ${s}`);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of JS(r))(e||!XS(YS(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(XS(YS(n))||XS(YS(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!XS(YS(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a}function QS(e,t={}){let n=[];return ZS(!(t.json||t.lossy),!!t.json,new Map,n)(e),n}var{parse:$S,stringify:eC}=JSON,tC={json:!0,lossy:!0};function nC(e){return GS($S(e))}function rC(e){return eC(QS(e,tC))}function iC(e){return GS(e)}function aC(e){return rC(e)}function oC(e){return nC(e)}var sC=256,cC=class extends Error{name=`StreamClosedError`};function lC(e={}){let t=e.id??cx(),n=Math.max(0,e.replayWindow??0),r=ox(),i=new AbortController,a=[],o=!1,s=0;function c(e){if(o)throw new cC(`Cannot write to a closed stream "${t}"`);s+=1,n>0&&(a.push({seq:s,chunk:e}),a.length>n&&(a.length-n===1?a.shift():a.splice(0,a.length-n))),r.emit(`chunk`,s,e)}function l(e){if(o)return;o=!0;let t=dC(e);i.abort(e),r.emit(`end`,t)}function u(){o||(o=!0,i.signal.aborted||i.abort(`stream closed`),r.emit(`end`,void 0))}function d(e){o||i.signal.aborted||i.abort(e??`aborted`)}let f=new WritableStream({write(e){c(e)},close(){u()},abort(e){l(e)}});return{id:t,signal:i.signal,get closed(){return o},get lastSeq(){return s},write:c,error:l,close:u,abort:d,writable:f,events:r,buffer:a}}function uC(e={}){let t=e.id??cx(),n=Math.max(1,e.highWaterMark??sC),r=[],i=0,a=!1,o=!1,s,c,l,u;function d(){if(c){if(r.length>0){let e=r.shift(),t=c;c=void 0,t.resolve({value:e,done:!1})}else if(a){let e=c;if(c=void 0,s){let t=Error(s.message);t.name=s.name,e.reject(t)}else e.resolve({value:void 0,done:!0})}}}function f(){if(l){for(;r.length>0;){let e=r.shift();try{l.enqueue(e)}catch{break}}if(a&&l){try{if(s){let e=Error(s.message);e.name=s.name,l.error(e)}else l.close()}catch{}l=void 0}}}function p(t,s){if(!(a||o)&&!(t<=i)){if(i=t,r.push(s),r.length>n){let t=r.length-n;r.splice(0,t),e.onOverflow?.(t)}d(),u&&f()}}function m(e){a||(a=!0,s=e,d(),u&&f())}function h(){o||a||(o=!0,e.onCancel?.(),m(void 0))}function g(){return u||(u=new ReadableStream({start(e){l=e,f()},cancel(){h()}}),u)}return{id:t,get cancelled(){return o},get done(){return a},get lastSeenSeq(){return i},get readable(){return g()},cancel:h,_push:p,_end:m,[Symbol.asyncIterator](){return{next(){if(r.length>0)return Promise.resolve({value:r.shift(),done:!1});if(a){if(s){let e=Error(s.message);return e.name=s.name,Promise.reject(e)}return Promise.resolve({value:void 0,done:!0})}return new Promise((e,t)=>{c={resolve:e,reject:t}})},return(){return h(),Promise.resolve({value:void 0,done:!0})}}}}}function dC(e){if(e instanceof Error)return{name:e.name||`Error`,message:e.message};if(typeof e==`string`)return{name:`Error`,message:e};try{return{name:`Error`,message:JSON.stringify(e)}}catch{return{name:`Error`,message:String(e)}}}var fC=128;function pC(e){return e.replace(/[^\w-]+/g,`_`).slice(0,fC)}var mC=`modulepreload`,hC=function(e,t){return new URL(e,t).href},gC={},_C=function(e){return e.pathname.endsWith(`.css`)},vC=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},yC=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=hC(t,n);let r=s(t),i=_C(r);return vC(gC,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:mC,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{t.addEventListener(`load`,e),t.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${r}`)))})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},bC=`__connection.json`,xC=`__DEVFRAME_CONNECTION__`,SC=`x-birpc-session`,CC=`__rpc-dump/index.json`,wC=`devframe:services`,TC=`devframe_otp`,EC=`devframe_auth_token`;Eb.postMessage.remoteAssetsError;var DC=class{cacheMap=new Map;options;keySerializer;constructor(e){this.options=e,this.keySerializer=e.keySerializer||(e=>ax(e))}updateOptions(e){this.options={...this.options,...e}}cached(e,t){let n=this.cacheMap.get(e);if(n)return n.get(this.keySerializer(t))}has(e,t){return this.cacheMap.get(e)?.has(this.keySerializer(t))??!1}apply(e,t){let n=this.cacheMap.get(e.m)||new Map;n.set(this.keySerializer(e.a),t),this.cacheMap.set(e.m,n)}validate(e){return this.options.functions.includes(e)}clear(e){e?this.cacheMap.delete(e):this.cacheMap.clear()}},OC=kb({docsBase:`https://devfra.me/errors`,codes:{DF0019:{why:e=>`RPC function "${e.name}" has \`agent\` set but \`jsonSerializable\` is \`false\`; MCP requires JSON-serializable data.`,fix:"Remove `jsonSerializable: false`, or remove `agent` to keep it RPC-only."},DF0020:{why:e=>`RPC function "${e.name}" declares \`jsonSerializable: true\` but the value at "${e.path}" is a ${e.type}.`,fix:"Either drop `jsonSerializable: true` (falls back to structured-clone) or change the value to a JSON-safe shape."},DF0021:{why:e=>`RPC function "${e.name}" is already registered`,fix:"Use the `force` parameter to overwrite an existing registration."},DF0022:{why:e=>`RPC function "${e.name}" is not registered. Use register() to add new functions.`},DF0023:{why:e=>`RPC function "${e.name}" is not registered`},DF0024:{why:e=>`Either handler or setup function must be provided for RPC function "${e.name}"`},DF0025:{why:e=>`Function "${e.name}" not found in dump store`},DF0026:{why:e=>`No dump match for "${e.name}" with args: ${e.args}`},DF0027:{why:e=>`Function "${e.name}" with type "${e.type}" cannot have dump configuration. Only "static" and "query" types support dumps.`},DF0028:{why:e=>`Function "${e.name}" with type "${e.type}" cannot use \`snapshot: true\`. Only "query" functions support this sugar; "static" functions have equivalent default behavior already.`,fix:"Remove `snapshot: true`, or change the function type to `query`."},DF0043:{why:e=>`RPC function "${e.name}" received an invalid argument at position ${e.index}: ${e.issues}`,fix:"Pass a value that satisfies the `args` schema declared for this function."},DF0044:{why:e=>`RPC function "${e.name}" returned a value that failed its \`returns\` schema: ${e.issues}`,fix:"Make the handler return a value that satisfies the `returns` schema, or relax the schema."}}});function kC(e){if(e.agent&&e.jsonSerializable===!1)throw OC.DF0019({name:e.name});e.agent&&!e.jsonSerializable&&(e.jsonSerializable=!0)}async function AC(e,t){let n=e[`~standard`].validate(t);return n instanceof Promise?await n:n}function jC(e){return e.map(e=>{let t=e.path?.map(e=>typeof e==`object`?e.key:e).join(`.`);return t?`${t}: ${e.message}`:e.message}).join(`; `)}async function MC(e,t,n){let r=n.slice();if(!t||t.length===0)return r;for(let r=0;r<t.length;r++){let i=t[r];if(!i)continue;let a=await AC(i,n[r]);if(a.issues)throw OC.DF0043({name:e,index:r,issues:jC(a.issues)})}return r}async function NC(e,t,n){if(!t)return n;let r=await AC(t,n);if(r.issues)throw OC.DF0044({name:e,issues:jC(r.issues)});return n}async function PC(e,t){if(!e.setup)return{};if(typeof t==`object`&&t){e.__cache??=new WeakMap;let n=e.__cache,r=n.get(t);return r||(r=Promise.resolve(e.setup(t)),r.catch(()=>{n.get(t)===r&&n.delete(t)}),n.set(t,r)),await r}if(!e.__promise){let n=Promise.resolve(e.setup(t));n.catch(()=>{e.__promise===n&&(e.__promise=void 0)}),e.__promise=n}return await e.__promise}async function FC(e,t){let n=e.handler;if(!n){let r=await PC(e,t);if(!r.handler)throw OC.DF0024({name:e.name});n=r.handler}let r=e.args,i=e.returns;if(!r&&!i)return n;let a=n;return async(...t)=>{let n=await MC(e.name,r,t),o=await a(...n);return await NC(e.name,i,o)}}var IC=class{context;definitions=new Map;functions;_onChanged=[];constructor(e){this.context=e;let t=this.definitions,n=this;this.functions=new Proxy({},{get(e,r){let i=t.get(r);if(i)return FC(i,n.context)},has(e,n){return t.has(n)},getOwnPropertyDescriptor(e,n){return{value:t.get(n)?.handler,configurable:!0,enumerable:!0}},ownKeys(){return Array.from(t.keys())}})}register(e,t=!1){if(this.definitions.has(e.name)&&!t)throw OC.DF0021({name:e.name});kC(e),this.definitions.set(e.name,e),this._onChanged.forEach(t=>t(e.name))}update(e,t=!1){if(!this.definitions.has(e.name)&&!t)throw OC.DF0022({name:e.name});kC(e),this.definitions.set(e.name,e),this._onChanged.forEach(t=>t(e.name))}onChanged(e){return this._onChanged.push(e),()=>{let t=this._onChanged.indexOf(e);t!==-1&&this._onChanged.splice(t,1)}}async getHandler(e){return await FC(this.definitions.get(e),this.context)}getSchema(e){let t=this.definitions.get(e);if(!t)throw OC.DF0023({name:String(e)});return{args:t.args,returns:t.returns}}has(e){return this.definitions.has(e)}get(e){return this.definitions.get(e)}list(){return Array.from(this.definitions.keys())}};function LC(e,t=``){return JSON.stringify(e,function(e,n){let r=this,i=r==null?n:r[e];if(i===void 0){if(Array.isArray(r))throw zC(t,`undefined`,r,e);return n}return i!==null&&RC(i,r,e,t),n})}function RC(e,t,n,r){if(typeof e==`bigint`)throw zC(r,`BigInt`,t,n);if(typeof e!=`object`)return;if(e instanceof Map)throw zC(r,`Map`,t,n);if(e instanceof Set)throw zC(r,`Set`,t,n);if(e instanceof Date)throw zC(r,`Date`,t,n);if(Array.isArray(e))return;let i=Object.getPrototypeOf(e);if(i!==null&&i!==Object.prototype)throw zC(r,e.constructor?.name??`class instance`,t,n)}function zC(e,t,n,r){let i=BC(n,r);return OC.DF0020({name:e||`<anonymous>`,type:t,path:i})}function BC(e,t){return Array.isArray(e)?`[${t}]`:t===``?`<root>`:t}var VC=`__DEVFRAME_CONNECTION_META__`,HC=`__DEVFRAME_CONNECTION_AUTH_TOKEN__`;function UC(e){let t=[()=>window?.[e],()=>globalThis?.[e],()=>parent.window?.[e]];for(let e of t)try{let t=e();if(t)return t}catch{}}function WC(){return UC(xC)}function GC(){return UC(VC)}function KC(e){if(e)return e;try{let e=localStorage.getItem(HC);if(e)return e}catch{}return UC(HC)}function qC(e){globalThis[xC]=e,globalThis[VC]={...e.connectionMeta,baseUrl:e.metaBaseUrl},e.authToken&&JC(e.authToken)}function JC(e){try{localStorage.setItem(HC,e)}catch{}globalThis[HC]=e;let t=WC();t&&(globalThis[xC]={...t,authToken:e})}function YC(e){let t=hb(bC,e);try{return new URL(t,globalThis.location?.href).href}catch{return t}}function XC(e,t){return t&&t!==e.authToken?{...e,authToken:t}:e}function ZC(){let e=WC();if(e)return XC(e,KC()??e.authToken??e.connectionMeta.authToken);let t=GC();if(t)return{connectionMeta:t,metaBaseUrl:t.baseUrl??YC(`./`),authToken:KC(t.authToken)}}async function QC(e={}){if(e.connection){let t=XC(e.connection,KC(e.authToken??e.connection.authToken??e.connection.connectionMeta.authToken));return qC(t),t}let t=Array.isArray(e.baseURL)?e.baseURL:[e.baseURL??`./`];if(e.connectionMeta){let n={connectionMeta:e.connectionMeta,metaBaseUrl:YC(t[0]??`./`),authToken:KC(e.authToken??e.connectionMeta.authToken)};return qC(n),n}let n=ZC();if(n){let t=XC(n,KC(e.authToken??n.authToken??n.connectionMeta.authToken));return qC(t),t}let r=[];for(let n of t){let t=hb(bC,n),i=YC(n);try{let n=await fetch(t);if(!n.ok)throw Error(`Failed to fetch connection meta from ${i}: ${n.status}`);let r=await n.json(),a=n.url||i,o={connectionMeta:r,metaBaseUrl:r.baseUrl?new URL(r.baseUrl,a).href:a,authToken:KC(e.authToken??r.authToken)};return qC(o),o}catch(e){r.push(e)}}throw Error(`Failed to get connection meta from ${t.join(`, `)}`,{cause:r})}var $C=class extends Error{name=`DevframeConnectionError`;kind;constructor(e,t,n){super(t,n),this.kind=e}};function ew(e=TC){try{let t=globalThis.location?.hash?.replace(/^#/,``)??``;return new URLSearchParams(t).get(e)||void 0}catch{return}}function tw(e){try{let t=new URL(globalThis.location.href),n=new URLSearchParams(t.hash.replace(/^#/,``));if(!n.has(e))return;n.delete(e),t.hash=n.toString(),globalThis.history?.replaceState(globalThis.history.state,``,t.href)}catch{}}function nw(e=TC){let t=ew(e);return t&&tw(e),t}async function rw(e,t={}){let n=nw(t.param??`devframe_otp`);return n?e.isTrusted?!0:e.requestTrustWithCode(n):!1}function iw(e){let t={},n=new WeakMap,r,i=()=>(r??=e.sharedState.get(wC,{initialValue:{}}).then(e=>(t=e.value(),e.on(`updated`,e=>{t=e}),e)),r);return i(),{state:i,has:e=>e in t,keys:()=>Object.keys(t),get:r=>{let i=t[r];if(!i)return;let a=n.get(i);return a||(a={...i,rpc:e.scope(i.scope).rpc},n.set(i,a)),a}}}function aw(e){let t=new Map,n=new Map,r=new Map,i=new Set,a=e.connectionMeta.backend===`static`;function o(e,t){let n=r.get(e);return n&&typeof n==`object`&&!Array.isArray(n)&&typeof t==`object`&&!Array.isArray(t)?{...n,...t}:t}e.client.register({name:Eb.broadcast.clientStateUpdated,type:`event`,handler:(e,n,r)=>{let i=t.get(e);i&&!i.syncIds.has(r)&&i.mutate(()=>o(e,n),r)}}),e.client.register({name:Eb.broadcast.clientStatePatch,type:`event`,handler:(e,n,r)=>{let i=t.get(e);i&&!i.syncIds.has(r)&&i.patch(n,r)}});function s(t,n){let r=[];return r.push(n.on(`updated`,(n,r,i)=>{a||(r?e.callEvent(`devframe:rpc:server-state:patch`,t,r,i):e.callEvent(`devframe:rpc:server-state:set`,t,n,i))})),()=>{for(let e of r)e()}}return{keys:()=>Array.from(t.keys()),onKeyAdded(e){return i.add(e),()=>{i.delete(e)}},delete(e){let i=n.get(e);n.delete(e);let a=t.delete(e);return r.delete(e),i?.(),a},get:async(c,l)=>{if(l?.initialValue!==void 0&&r.set(c,l.initialValue),t.has(c))return t.get(c);let u=BS({initialValue:l?.initialValue,enablePatches:!1});async function d(){if(a||e.callEvent(`devframe:rpc:server-state:subscribe`,c),l?.initialValue!==void 0){t.set(c,u);for(let e of i)e(c);return e.call(`devframe:rpc:server-state:get`,c).then(e=>{e!==void 0&&u.mutate(()=>o(c,e))}).catch(e=>{console.error(`Error getting server state`,e)}),n.set(c,s(c,u)),u}{let r=await e.call(`devframe:rpc:server-state:get`,c);u.mutate(()=>o(c,r)),t.set(c,u);for(let e of i)e(c);return n.set(c,s(c,u)),u}}return new Promise((t,n)=>{if(e.isTrusted)d().then(t,n);else{t(u);let n=!1;e.events.on(Eb.client.isTrustedUpdated,e=>{e&&!n&&(n=!0,d())})}})}}}var ow=new Map;function sw(e=ow){let t=new Map;return{serialize:n=>{let r;return n.t===`q`?r=n.m:(r=t.get(n.i),t.delete(n.i)),!(n.t===`s`&&`e`in n)&&r&&e.get(r)?.jsonSerializable===!0?LC(n,r??``):`s:${aC(n)}`},deserialize:e=>{let n=e.startsWith(`s:`)?oC(e.slice(2)):JSON.parse(e);return n.t===`q`&&n.i&&n.m&&t.set(n.i,n.m),n}}}function cw(){}function lw(e){let t=e.search(/\n\n|\r\n\r\n/);if(!(t<0))return{frame:e.slice(0,t),rest:e.slice(t+(e[t]===`\r`?4:2))}}function uw(e){let t=`message`,n=[];for(let r of e.split(/\r?\n/))r.startsWith(`:`)||(r.startsWith(`event:`)?t=r.slice(6).trimStart():r.startsWith(`data:`)&&n.push(r.slice(5).replace(/^ /,``)));return{event:t,data:n}}function dw(e){let{onConnected:t=cw,onError:n=cw,onDisconnected:r=cw,definitions:i,fetch:a=globalThis.fetch.bind(globalThis)}=e,o=e.url;e.authToken&&(o=`${o}${o.includes(`?`)?`&`:`?`}${EC}=${encodeURIComponent(e.authToken)}`);let s=sw(i),c=new AbortController,l=!1,u,d,f,p,m=new Promise((e,t)=>{f=e,p=t});m.catch(()=>{});function h(e){l||(l=!0,p(e),n(e),r())}function g(){l||(l=!0,p(Error(`Devframe SSE stream closed`)),r())}function _(e,n){e===`session`?(f(n),t()):u?.(n)}async function v(e){let t=e.getReader();d=t;let n=new TextDecoder,r=``;for(;;){let{done:e,value:i}=await t.read();if(e)break;for(r+=n.decode(i,{stream:!0});;){let e=lw(r);if(!e)break;r=e.rest;let{event:t,data:n}=uw(e.frame);n.length>0&&_(t,n.join(`
28
- `))}}g()}return(async()=>{try{let e=await a(o,{headers:{accept:`text/event-stream`},signal:c.signal});if(!e.ok||!e.body)throw Error(`Devframe SSE stream request failed: ${e.status}`);await v(e.body)}catch(e){if(c.signal.aborted){g();return}h(e instanceof Error?e:Error(String(e)))}})(),{close:()=>{l=!0,c.abort(),d?.cancel().catch(()=>{})},on:e=>{u=e},post:async e=>{let t;try{t=await m}catch{return}if(l)n(Error(`Devframe SSE channel is closed; message dropped`));else try{let n=await a(o,{method:`POST`,headers:{"content-type":`text/plain; charset=utf-8`,[SC]:t},body:e});if(n.status===200){let e=await n.text();e&&u?.(e);return}if(!n.ok)throw Error(`Devframe SSE POST failed: ${n.status}`)}catch(e){n(e instanceof Error?e:Error(String(e)))}},serialize:s.serialize,deserialize:s.deserialize}}function fw(e,t){let{channel:n,rpcOptions:r={}}=t;return zb(e,{...n,timeout:-1,...r,proxify:!1})}function pw(e){let{transport:t,authToken:n,connectionMeta:r,events:i,clientRpc:a,rpcOptions:o={},callTimeout:s=0}=e,c=!1,l=`connecting`,u=null,d=Promise.withResolvers();function f(e,t=null){if(t?u=t:e===`connected`&&(u=null),e===l)return;let n=l;l=e,i.emit(Eb.client.connectionStatus,e,n)}let p=new Set;function m(e){for(let t of[...p])t.reject(e)}function h(){return l===`disconnected`||l===`error`?new $C(`connection`,`[devframe] Not connected to the devframe server`,{cause:u??void 0}):l===`unauthorized`?new $C(`auth`,`[devframe] Not authorized by the devframe server`,{cause:u??void 0}):null}function g(e,t){return new Promise((n,r)=>{let a=!1,o,c={reject(e){a||(l(),i.emit(Eb.client.error,e,t),r(e))}};function l(){a=!0,p.delete(c),o&&clearTimeout(o)}p.add(c),s>0&&(o=setTimeout(()=>{c.reject(new $C(`timeout`,`[devframe] RPC call "${t}" timed out after ${s}ms`))},s)),e.then(e=>{a||(l(),n(e))},e=>{if(a)return;l();let n=e instanceof Error?e:Error(String(e));i.emit(Eb.client.error,n,t),r(n)})})}let _=new Map;for(let e of r.jsonSerializableMethods??[])_.set(e,{jsonSerializable:!0});let v=e.createChannel({definitions:_,onError(e){f(`error`,e),i.emit(Eb.client.connectionError,e),m(new $C(`connection`,`[devframe] Connection to the devframe server failed`,{cause:e}))},onDisconnected(){l!==`error`&&f(`disconnected`),m(new $C(`connection`,`[devframe] Disconnected from the devframe server`,{cause:u??void 0}))}}),y=fw(a.functions,{channel:v,rpcOptions:o});a.register({name:Eb.broadcast.authRevoked,type:`event`,handler:()=>{c=!1;let e=new $C(`auth`,`[devframe] The devframe server revoked this client's trust`);f(`unauthorized`,e),i.emit(Eb.client.connectionError,e),m(e),i.emit(Eb.client.isTrustedUpdated,!1)}});let b=n;async function x(e){b=e;let t=await y.$call(`anonymous:devframe:auth`,{authToken:e,ua:navigator.userAgent,origin:location.origin});if(c=t.isTrusted,c)d.resolve(!0),f(`connected`);else{let e=new $C(`auth`,`[devframe] The devframe server refused this client's credentials`);f(`unauthorized`,e),i.emit(Eb.client.connectionError,e)}return i.emit(Eb.client.isTrustedUpdated,c),t.isTrusted}async function S(e){let t=(await y.$call(`anonymous:devframe:auth:exchange`,{code:e,ua:navigator.userAgent,origin:location.origin}))?.authToken??null;return t&&(b=t,c=!0,d.resolve(!0),f(`connected`),i.emit(Eb.client.isTrustedUpdated,!0)),t}async function C(e={}){await y.$call(`anonymous:devframe:auth:request-code`,{ua:navigator.userAgent,origin:location.origin,...e.reissue?{reissue:!0}:{}})}async function w(){return c?!0:x(b??``)}async function ee(e=6e4){if(c&&d.resolve(!0),e<=0)return d.promise;let t;try{return await Promise.race([d.promise,new Promise((n,r)=>{t=setTimeout(()=>{r(Error(`[devframe] Timeout waiting for rpc to be trusted`))},e)})]),c}finally{clearTimeout(t)}}return{transport:t,get isTrusted(){return c},get status(){return l},get connectionError(){return u},requestTrust:w,requestTrustWithToken:x,requestTrustWithCode:S,requestAuthCode:C,ensureTrusted:ee,call:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(Eb.client.error,n,t),Promise.reject(n)):g(y.$call(...e),t)},callEvent:(...e)=>{let t=h();if(t)i.emit(Eb.client.error,t,String(e[0]));else return y.$callEvent(...e)},callOptional:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(Eb.client.error,n,t),Promise.reject(n)):g(y.$callOptional(...e),t)},close:()=>{v.close()}}}function mw(e,t,n){let r=(()=>{try{return new URL(t,n.href)}catch{return new URL(n.href)}})();if(e&&typeof e==`object`){if(e.host!=null||e.port!=null){let t=e.host??`${r.hostname}:${e.port}`;return new URL(e.path??`/`,`${r.protocol}//${t}`).href}return new URL(e.path??``,r).href}let i=e??``;return/^https?:\/\//i.test(i)?i:new URL(i,r).href}function hw(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},sseOptions:s={},callTimeout:c=0}=e,l=mw(n.sse,r??`./`,location);return pw({transport:`sse`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>dw({url:l,authToken:t,definitions:e.definitions,...s,onConnected(){s.onConnected?.()},onError(t){e.onError(t),s.onError?.(t)},onDisconnected(){e.onDisconnected(),s.onDisconnected?.()}})})}function gw(e){let{name:t,message:n,cause:r,...i}=e,a=r instanceof Error?r:_w(r)?gw(r):r,o=a===void 0?Error(n):Error(n,{cause:a});return o.name=t,Object.assign(o,i),o}function _w(e){return typeof e==`object`&&!!e&&typeof e.message==`string`&&typeof e.name==`string`}function vw(e){return typeof e==`object`&&!!e&&e.type===`static`&&typeof e.path==`string`}function yw(e){return typeof e==`object`&&!!e&&e.type===`query`&&typeof e.records==`object`&&e.records!==null}function bw(e){return typeof e==`object`&&!!e&&(`output`in e||`error`in e)}function xw(e){if(e.error)throw gw(e.error);return e.output}function Sw(e){return e.some(e=>e!=null)}function Cw(e){return typeof e==`object`&&e&&`serialization`in e&&`data`in e?e.data:e}function ww(e,t){let n=new Map,r=new Map;function i(e,t){return t===`structured-clone`&&Array.isArray(e)?iC(e):e}function a(e,t){return i(Cw(e),t)}async function o(e){n.has(e.path)||n.set(e.path,t(e.path).then(t=>a(t,e.serialization)));let r=await n.get(e.path);return bw(r)?xw(r):r}async function s(e,n){return r.has(e)||r.set(e,t(e).then(e=>a(e,n))),await r.get(e)}async function c(t,n){if(!(t in e))throw Error(`[devframe-rpc] Function "${t}" not found in dump store`);let r=e[t];if(vw(r)){if(Sw(n))throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await o(r)}if(yw(r)){let e=ax(n),i=r.records[e];if(i)return xw(await s(i,r.serialization));if(r.fallback)return xw(await s(r.fallback,r.serialization));throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(!Sw(n))return r;throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}return{call:async(e,t)=>await c(e,t),callOptional:async(t,n)=>{if(t in e)return await c(t,n)},callEvent:async(e,t)=>{}}}async function Tw(e){let t=ww(await e.fetchJsonFromBases(CC),e.fetchJsonFromBases);return{transport:`static`,isTrusted:!0,status:`connected`,connectionError:null,requestTrust:async()=>!0,requestTrustWithToken:async()=>!0,requestTrustWithCode:async()=>null,requestAuthCode:async()=>{},ensureTrusted:async()=>!0,call:(...e)=>t.call(e[0],e.slice(1)),callEvent:(...e)=>t.callEvent(e[0],e.slice(1)),callOptional:(...e)=>t.callOptional(e[0],e.slice(1)),close:()=>{}}}var Ew=``;function Dw(e,t){return`${e}${Ew}${t}`}function Ow(e){let t=new Map,n=new Map;e.client.register({name:Eb.broadcast.streamingChunk,type:`event`,handler(e,n,r,i){t.get(Dw(e,n))?._push(r,i)}}),e.client.register({name:Eb.broadcast.streamingEnd,type:`event`,handler(e,n,r){let i=Dw(e,n),a=t.get(i);a&&(a._end(r),t.delete(i))}}),e.client.register({name:Eb.broadcast.streamingUploadCancel,type:`event`,handler(e,t){let r=Dw(e,t),i=n.get(r);i&&(i.abort(`server cancelled upload`),n.delete(r))}}),e.events.on(Eb.client.isTrustedUpdated,n=>{if(n)for(let[n,r]of t){if(r.cancelled||r.done)continue;let t=n.indexOf(Ew);if(t<0)continue;let i=n.slice(0,t),a=n.slice(t+1);e.callEvent(`devframe:streaming:subscribe`,i,a,{afterSeq:r.lastSeenSeq})}});function r(n,r,i={}){let a=Dw(n,r),o=t.get(a);if(o)return o;let s=uC({id:r,highWaterMark:i.highWaterMark,onOverflow(e){console.warn(`[devframe] DF0029: Stream "${n}#${r}" dropped ${e} chunk(s) after exceeding the client high-water mark.`)},onCancel(){e.callEvent(`devframe:streaming:cancel`,n,r),t.delete(a)}});if(t.set(a,s),e.isTrusted)e.callEvent(`devframe:streaming:subscribe`,n,r,{afterSeq:0});else{let i=e.events.on(Eb.client.isTrustedUpdated,o=>{o&&(i(),t.has(a)&&!s.cancelled&&!s.done&&e.callEvent(`devframe:streaming:subscribe`,n,r,{afterSeq:s.lastSeenSeq}))})}return s}function i(t,r){let i=Dw(t,r),a=n.get(i);if(a)return a;let o=lC({id:r});return o.events.on(`chunk`,(n,i)=>{e.callEvent(`devframe:streaming:upload-chunk`,t,r,n,i)}),o.events.on(`end`,a=>{e.callEvent(`devframe:streaming:upload-end`,t,r,a),n.delete(i)}),n.set(i,o),o}return{subscribe:r,upload:i}}function kw(){}var Aw=new Map;function jw(e){let t=e.url;e.authToken&&(t=`${t}?${EC}=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:r=kw,onError:i=kw,onDisconnected:a=kw,definitions:o=Aw}=e;n.addEventListener(`open`,e=>{r(e)}),n.addEventListener(`error`,e=>{let t=e instanceof Error?e:Error(e.type);i(t)}),n.addEventListener(`close`,e=>{a(e)});let s=sw(o);return{close:()=>{n.close()},on:e=>{n.addEventListener(`message`,t=>{e(t.data)})},post:e=>{if(n.readyState===WebSocket.OPEN)n.send(e);else if(n.readyState===WebSocket.CONNECTING){let t=()=>{i(),n.readyState===WebSocket.OPEN&&n.send(e)},r=()=>i();function i(){n.removeEventListener(`open`,t),n.removeEventListener(`close`,r)}n.addEventListener(`open`,t),n.addEventListener(`close`,r)}else i(Error(`Devframe WebSocket is not open; message dropped`))},serialize:s.serialize,deserialize:s.deserialize}}function Mw(e,t,n){let r=(()=>{try{return new URL(t,n.href)}catch{return new URL(n.href)}})(),i=r.protocol===`https:`?`wss:`:`ws:`;if(e&&typeof e==`object`){if(e.host!=null||e.port!=null){let t=e.host??`${r.hostname}:${e.port}`,n=new URL(e.path??`/`,`${i}//${t}`);return n.protocol=i,n.href}let t=new URL(e.path??``,r);return t.protocol=i,t.href}if(typeof e==`number`)return`${i}//${r.hostname}:${e}`;let a=e??``;if(/^wss?:\/\//i.test(a))return a;if(/^https?:\/\//i.test(a))return gb(a,/^https/i.test(a)?`wss://`:`ws://`);let o=new URL(a,r);return o.protocol=i,o.href}function Nw(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},wsOptions:s={},callTimeout:c=0}=e,l=Mw(n.websocket,r??`./`,location);return pw({transport:`websocket`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>jw({url:l,authToken:t,definitions:e.definitions,...s,onConnected(e){s.onConnected?.(e)},onError(t){e.onError(t),s.onError?.(t)},onDisconnected(t){e.onDisconnected(),s.onDisconnected?.(t)}})})}function Pw(e){return e.includes(`:`)}function Fw(e,t){return Pw(t)?t:`${e}:${t}`}function Iw(e){return{async get(t){return(await e()).value()?.[t]},async set(t,n){(await e()).mutate(e=>{if(e===void 0)return{[t]:n};e[t]=n})},async delete(t){(await e()).mutate(e=>{e!==void 0&&delete e[t]})},async all(){return(await e()).value()??{}},async onChange(t){return(await e()).on(`updated`,e=>t(e??{}))}}}function Lw(e,t,n){let r=`devframe:settings:${n}:${t}`,i;function a(){return i||=(async()=>(await e.ensureTrusted(),e.sharedState.get(r)))().catch(e=>{throw i=void 0,e}),i}return Iw(a)}function Rw(e,t){return{global:Lw(e,t,`global`),project:Lw(e,t,`project`)}}function zw(e,t){return{namespace:t,base:e,rpc:{namespace:t,register(n){if(Pw(n.name))throw Error(`[devframe] Scoped client RPC registration for namespace "${t}" received an already-namespaced function name "${n.name}". Pass a bare name without a ":" separator.`);e.client.register({...n,name:`${t}:${n.name}`})},call:((n,...r)=>e.call(Fw(t,n),...r)),callEvent:((n,...r)=>e.callEvent(Fw(t,n),...r)),callOptional:((n,...r)=>e.callOptional(Fw(t,n),...r)),sharedState:((n,r)=>e.sharedState.get(Fw(t,n),r)),streaming:{subscribe:(n,r,i)=>e.streaming.subscribe(Fw(t,n),r,i),upload:(n,r)=>e.streaming.upload(Fw(t,n),r)}},settings:Rw(e,t),scope:e.scope}}function Bw(){if(typeof document<`u`){let e=document.modelContext;if(e)return e}if(typeof navigator<`u`){let e=navigator.modelContext;if(e)return e}}function Vw(e,t={}){let n=t.modelContext??Bw();if(!n)return()=>{};let r=n,i=new Map,a=new Map;function o(t,n){let o=pC(t.name),s=a.get(o);if(s&&s!==t.name){console.warn(`[devframe] WebMCP tool name "${o}" (from "${t.name}") collides with "${s}"; keeping the first registration.`);return}let c=new AbortController,l=Bb(t.type,n),u=r.registerTool({name:o,description:n.description,inputSchema:Ub(t.args),annotations:{title:n.title??t.name,readOnlyHint:l===`read`,destructiveHint:l===`destructive`},execute:n=>Hw(t,e.context,n)},{signal:c.signal});u&&`then`in u&&u.then(()=>{},()=>{}),a.set(o,t.name),i.set(t.name,()=>{c.abort(),u&&`unregister`in u&&typeof u.unregister==`function`&&u.unregister(),a.delete(o)})}function s(t){let n=t?[t]:[...e.definitions.keys()];for(let t of n){i.get(t)?.(),i.delete(t);let n=e.definitions.get(t),r=n?.agent;n&&r&&o(n,r)}}s();let c=e.onChanged(e=>s(e));return()=>{c();for(let e of i.values())e();i.clear()}}async function Hw(e,t,n){try{let r=Gb(n,e.args?.length);return{content:[{type:`text`,text:Uw(await(await FC(e,t))(...r))}]}}catch(e){return{isError:!0,content:[{type:`text`,text:Ww(e)}]}}}function Uw(e){return e===void 0?`undefined`:typeof e==`string`?e:JSON.stringify(e,null,2)}function Ww(e){if(!(e instanceof Error))return String(e);let t=e.cause instanceof Error?` (cause: ${e.cause.message})`:``;return`${e.name}: ${e.message}${t}`}function Gw(e,t){if(t.backend===`static`)return`static`;let n=t.websocket!==void 0,r=t.sse!==void 0;if(e===`websocket`){if(!n)throw Error(`[devframe] transport: 'websocket' was requested, but this server does not advertise a WebSocket endpoint`);return`websocket`}if(e===`sse`){if(!r)throw Error(`[devframe] transport: 'sse' was requested, but this server does not advertise an SSE endpoint`);return`sse`}if(t.backend===`sse`&&r)return`sse`;if(n)return`websocket`;if(r)return`sse`;throw Error(`[devframe] This server advertises no RPC transport (backend "none"), so there is nothing to connect to. Enable the WebSocket or SSE endpoint on the server, or use its static/MCP surfaces instead.`)}async function Kw(e={}){let{baseURL:t=`./`,rpcOptions:n={},cacheOptions:r=!1}=e,i=ox(),a=Array.isArray(t)?t:[t],o=await QC(e),{connectionMeta:s,metaBaseUrl:c,authToken:l}=o,u=a[0]??`./`;try{u=new URL(`.`,c).href}catch{}let d=new DC({functions:[],...typeof e.cacheOptions==`object`?e.cacheOptions:{}}),f={rpc:void 0},p=new IC(f),m=e.webmcp===!1?void 0:Vw(p),h,g=!1,_=0,v;function y(){_++,v=void 0,d.clear(),r===!0&&d.updateOptions({functions:[]})}r&&(p.register({name:Eb.broadcast.cacheInvalidate,type:`event`,handler:y}),i.on(Eb.client.connectionStatus,y),i.on(Eb.client.isTrustedUpdated,y));async function b(e){let t=[u,...a.filter(e=>e!==u)].filter(e=>e!=null),n=[];for(let r of t)try{return await fetch(hb(e,r)).then(t=>{if(!t.ok)throw Error(`Failed to fetch ${e} from ${r}: ${t.status}`);return t.json()})}catch(e){n.push(e)}throw Error(`Failed to load ${e} from ${t.join(`, `)}`,{cause:n})}let x=e.callTimeout??0,S=x>0?x:1/0,C,w={authToken:l,connectionMeta:s,metaBaseUrl:c,events:i,clientRpc:p,callTimeout:e.callTimeout,rpcOptions:{...n,async onRequest(e,t,i){let a=performance.now()+S;if(await n.onRequest?.call(this,e,t,i),r===!0&&e.i&&C.isTrusted&&!e.m.startsWith(`anonymous:`)&&e.m!==`devframe:rpc:cacheable-functions`){function t(){if(performance.now()>=a)throw new $C(`timeout`,`[devframe] RPC call "${e.m}" timed out after ${x}ms`)}for(;!v&&(t(),!(g||C.status!==`connected`));){let e=_;v=C.callOptional(`devframe:rpc:cacheable-functions`).then(t=>{e===_&&d.updateOptions({functions:t??[]})}).catch(t=>{throw e===_&&(v=void 0),t}),await v}await v,t()}let o=_;if(r&&e.i&&!g&&C.isTrusted&&d.validate(e.m)){if(d.has(e.m,e.a))return i(d.cached(e.m,e.a));let n=await t(e);o===_&&!g&&d.apply(e,n)}else await t(e)}}},ee=Gw(e.transport??`auto`,s);C=ee===`static`?await Tw({fetchJsonFromBases:b}):ee===`sse`?hw({...w,sseOptions:e.sseOptions}):Nw({...w,wsOptions:e.wsOptions});let T;try{T=new BroadcastChannel(`devframe-auth`)}catch{}let E,D=!1;function te(e){return((...t)=>D||!E?e(...t):E.then(()=>e(...t)))}function ne(){g=!0,y();try{h?.(),m?.()}finally{try{T?.close()}finally{C.close?.()}}}let re={events:i,get isTrusted(){return C.isTrusted},get status(){return C.status},get connectionError(){return C.connectionError},get transport(){return C.transport??ee},get connection(){return o},connectionMeta:s,ensureTrusted:C.ensureTrusted,requestTrust:C.requestTrust,requestTrustWithToken:async e=>(JC(e),o={...o,authToken:e},C.requestTrustWithToken(e)),requestTrustWithCode:async e=>{let t=await C.requestTrustWithCode(e);if(!t)return!1;JC(t),o={...o,authToken:t};try{T?.postMessage({type:`auth-update`,authToken:t})}catch{}return!0},requestAuthCode:e=>C.requestAuthCode(e),call:te(C.call),callEvent:te(C.callEvent),callOptional:te(C.callOptional),client:p,sharedState:void 0,services:void 0,streaming:void 0,cacheManager:d,scope:void 0,close:ne};re.sharedState=aw(re),re.streaming=Ow(re),re.services=iw(re);let ie=new Map;re.scope=(e=>{if(!e)return re;let t=ie.get(e);return t||(t=zw(re,e),ie.set(e,t)),t}),f.rpc=re;function O(){try{return typeof window<`u`&&window.self===window.top}catch{return!1}}async function ae(){if(e.simpleAuth!==!1&&O()&&typeof globalThis.prompt==`function`)for(await re.requestAuthCode().catch(()=>{});!re.isTrusted;){let e=globalThis.prompt(`devframe: enter the authentication code shown in your terminal`);if(e==null)return;let t=e.trim();if(t&&await re.requestTrustWithCode(t))return}}async function oe(){let t=await C.requestTrust(),n=e.otpParam??`devframe_otp`,r=n?await rw(re,{param:n}):!1;t||r||re.isTrusted||await ae()}return E=oe().then(()=>{D=!0},()=>{D=!0}),s.mcp&&yC(async()=>{let{setupBrowserAgentRpcBridge:e}=await import(`./browser-agent-rpc-BXhoSh1z-dqfZL9hd.js`);return{setupBrowserAgentRpcBridge:e}},[],import.meta.url).then(({setupBrowserAgentRpcBridge:e})=>{g||(h=e(re))}).catch(()=>{}),T&&(T.onmessage=e=>{e.data?.type===`auth-update`&&e.data.authToken&&re.requestTrustWithToken(e.data.authToken)}),re}var qw=Kw,Jw=_b.postMessage.frameNav;_b.sharedState.docks,_b.sharedState.commands,_b.sharedState.userSettings,_b.broadcast.docksActivate;var Yw=`ubean`;function Xw(e){let t=e.frameId??Yw,n=e.targetOrigin??`*`,r=typeof window>`u`?void 0:window.parent,i=()=>({channel:Jw,v:1,frameId:t,from:`frame`});function a(){r&&r!==window&&r.postMessage({...i(),type:`ready`,current:e.current(),tabs:e.tabs.map(e=>({id:e.id,title:e.title,icon:e.icon,navTarget:{path:e.id},fallbackUrl:`#/${e.id}`}))},n)}function o(){r&&r!==window&&r.postMessage({...i(),type:`navigated`,tabId:e.current()},n)}function s(n){let r=n.data;r&&r.channel===Jw&&r.v===1&&r.frameId===t&&r.from===`host`&&(r.type===`hello`?a():r.type===`navigate`&&r.tabId&&(e.onNavigate(r.tabId),o()))}return $r(()=>{window.addEventListener(`message`,s),window.addEventListener(`hashchange`,o),a()}),ri(()=>{window.removeEventListener(`message`,s),window.removeEventListener(`hashchange`,o)}),a}var Zw=`https://api.deepseek.com/v1`,Qw=`deepseek-chat`,$w=null;function eT(){if(!$w){let e=new Promise((e,t)=>setTimeout(()=>t(Error(`Devframe connection timeout — 请从 dev server 的 DevTools 外壳进入本页面,而不是直接打开它。`)),5e3));$w=Promise.race([qw(),e])}return $w}async function tT(e,t,n){return e.call(t,...n)}function nT(e){let t=Math.floor(e/1e3),n=Math.floor(t/60),r=Math.floor(n/60);return r>0?`${r}h ${n%60}m`:n>0?`${n}m ${t%60}s`:`${t}s`}function rT(e){return new Date(e).toLocaleTimeString()}function iT(e){return e==null?`—`:typeof e==`boolean`?e?`true`:`false`:typeof e==`number`?String(e):typeof e==`string`?e:Array.isArray(e)?`[${e.length} items]`:typeof e==`object`?JSON.stringify(e):String(e)}function aT(e){return e?e.split(`/`).pop()||e:``}function oT(e){if(!e)return``;let t=e.split(`/`);return t.length<=5?e:`${t.slice(0,3).join(`/`)}/…/${t.slice(-2).join(`/`)}`}var sT={GET:`bg-success/12 text-success`,POST:`bg-info/12 text-info`,PUT:`bg-warning/12 text-warning`,DELETE:`bg-destructive/12 text-destructive`,PATCH:`bg-purple-500/12 text-purple-400`};function cT(e){return sT[e]||`bg-secondary text-muted-foreground`}function lT(e={}){let t=e.client??eT;async function n(e,...n){return tT(await t(),e,n)}let r=j(!0),i=j(null),a=j(null),o=j({}),s=j(0),c=null,l=null,u=!1,d=!1;function f(e,t){let n={duration:3e3,position:`top-right`};switch(e){case`success`:Mg.success(t,n);break;case`error`:Mg.error(t,n);break;case`warning`:Mg.warning(t,n);break;default:Mg(t,n)}}async function p(){if(!(u||d)){u=!0;try{let e=await(await t()).sharedState.get(`ubean:info`);a.value=e.value(),r.value=!1,l=e.on(`updated`,e=>{a.value=e}),o.value=await n(`ubean:get-env`),c=setInterval(()=>{a.value&&(s.value=Date.now()-a.value.startTime)},1e3)}catch(e){i.value=e instanceof Error?e.message:`Failed to connect`,r.value=!1}}}async function m(){try{o.value=await n(`ubean:get-env`),a.value||=await n(`ubean:get-info`)}catch{}}async function h(e,t,r){try{let i=await n(`ubean:crud-create`,{type:e,path:t,...r});return i.success?(f(`success`,`Created ${e}: ${t}`),await m()):i.errors?.length&&f(`error`,i.errors[0]),i}catch(e){let t=e instanceof Error?e.message:`Create failed`;return f(`error`,t),{success:!1,errors:[t]}}}async function g(e,t){try{return await n(`ubean:crud-read`,{type:e,path:t})}catch(e){return{success:!1,error:e instanceof Error?e.message:`Read failed`}}}async function _(e,t){try{let r=await n(`ubean:crud-update`,{type:e,...t});return r.success?(f(`success`,`Updated ${e}`),await m()):r.errors?.length&&f(`error`,r.errors[0]),r}catch(e){let t=e instanceof Error?e.message:`Update failed`;return f(`error`,t),{success:!1,errors:[t]}}}async function v(e,t){try{let r=await n(`ubean:crud-delete`,{type:e,...t});return r.success?(f(`success`,`Deleted ${e}`),await m()):r.errors?.length&&f(`error`,r.errors[0]),r}catch(e){let t=e instanceof Error?e.message:`Delete failed`;return f(`error`,t),{success:!1,errors:[t]}}}async function y(e){try{let t=await n(`ubean:crud-restore`,e);return t.success?(f(`success`,`Restored: ${e}`),await m()):t.errors?.length&&f(`error`,t.errors[0]),t}catch(e){let t=e instanceof Error?e.message:`Restore failed`;return f(`error`,t),{success:!1,errors:[t]}}}async function b(e,t){try{return await n(`ubean:ai-chat`,{messages:e,...t})}catch(e){return{message:{role:`assistant`,content:`Error: ${e instanceof Error?e.message:`AI request failed`}`,timestamp:Date.now()}}}}async function x(){try{return await n(`ubean:ai-tools`)}catch{return[]}}async function S(e,r,i){let a=`stream_${Date.now()}_${Math.random().toString(36).slice(2,8)}`;try{let o=(await(await t()).sharedState.get(`ubean:ai:stream`)).on(`updated`,e=>{e&&e.requestId===a&&i(e)});try{return await n(`ubean:ai-chat-stream`,{messages:e,requestId:a,...r})}finally{o()}}catch(e){return{message:{role:`assistant`,content:`Error: ${e instanceof Error?e.message:`AI stream failed`}`,timestamp:Date.now()}}}}async function C(e){try{return await n(`ubean:terminal-start`,e)}catch(e){return f(`error`,e instanceof Error?e.message:`Terminal start failed`),null}}async function w(e,t){try{return await n(`ubean:terminal-input`,{sessionId:e,data:t})}catch{return!1}}async function ee(e,t,r){try{return await n(`ubean:terminal-resize`,{sessionId:e,cols:t,rows:r})}catch{return!1}}async function T(e){try{return await n(`ubean:terminal-poll`,{sessionId:e})}catch{return{data:``,exited:!0,exitCode:-1}}}async function E(e){try{return await n(`ubean:terminal-kill`,{sessionId:e})}catch{return!1}}function D(){d||(d=!0,l&&=(l(),null),c&&=(clearInterval(c),null))}return so()&&($r(()=>{p()}),ri(D)),{loading:r,error:i,info:a,env:o,uptime:s,fmtUptime:nT,fmtTime:rT,fmtVal:iT,fileName:aT,filePath:oT,methodClass:cT,init:p,dispose:D,refresh:m,crudCreate:h,crudRead:g,crudUpdate:_,crudDelete:v,crudRestore:y,aiChat:b,aiChatStream:S,aiGetTools:x,showToast:f,terminalStart:C,terminalInput:w,terminalResize:ee,terminalPoll:T,terminalKill:E}}var uT={key:0,class:`fixed inset-0 z-50 flex items-center justify-center`},dT={class:`relative bg-background border border-base rounded-xl shadow-2xl w-full max-w-md mx-4 overflow-hidden animate-scale-in`},fT={class:`flex items-center justify-between px-4 py-3 border-b border-base`},pT={class:`flex items-center gap-2`},mT={class:`size-7 rounded-lg bg-primary/15 flex items-center justify-center`},hT={class:`grid grid-cols-5 gap-1.5`},gT=[`onClick`],_T={class:`text-[10px] font-medium`},vT={key:0},yT={class:`flex gap-1.5`},bT=[`onClick`],xT={class:`block text-[11px] font-medium text-muted-foreground mb-1.5 uppercase tracking-wider`},ST=[`placeholder`],CT={key:0,class:`mt-1 text-[10px] text-muted-foreground`},wT={key:1,class:`mt-1 text-[10px] text-muted-foreground`},TT={key:1,class:`flex items-center gap-2 px-3 py-2 rounded-lg bg-destructive/10 text-destructive text-xs border border-destructive/20`},ET={class:`flex items-center justify-end gap-2 pt-1`},DT=[`disabled`],OT=[`disabled`],kT={key:0,class:`size-3 border-2 border-primary-foreground/30 border-t-primary-foreground rounded-full animate-spin`},AT=P({__name:`CreateDialog`,props:{open:{type:Boolean},initialType:{},onCreate:{type:Function}},emits:[`close`],setup(e,{emit:t}){let n=e,r=t,i=j(`page`),a=j(``),o=j(`GET`),s=j(!1),c=j(``),l=[`GET`,`POST`,`PUT`,`DELETE`,`PATCH`],u=[{value:`page`,label:`Page`,icon:`lucide:file-text`,placeholder:`/about`},{value:`api`,label:`API Route`,icon:`lucide:send`,placeholder:`/api/hello`},{value:`middleware`,label:`Middleware`,icon:`lucide:layers`,placeholder:`/auth`},{value:`layout`,label:`Layout`,icon:`lucide:layout`,placeholder:`admin`},{value:`cron`,label:`Cron Job`,icon:`lucide:clock`,placeholder:`daily-cleanup`}],d=U(()=>u.find(e=>e.value===i.value));ir(()=>n.open,e=>{e&&(i.value=n.initialType||`page`,a.value=``,o.value=`GET`,c.value=``)}),ir(i,()=>{c.value=``});function f(){s.value||r(`close`)}async function p(){if(!a.value.trim())c.value=`Path is required`;else{s.value=!0,c.value=``;try{let e=i.value===`api`?{method:o.value}:void 0,t=await n.onCreate(i.value,a.value.trim(),e);t.success?r(`close`):t.errors?.length&&(c.value=t.errors[0])}catch(e){c.value=e instanceof Error?e.message:`Failed to create resource`}finally{s.value=!1}}}return(t,n)=>(I(),R(yr,{to:`body`},[e.open?(I(),L(`div`,uT,[z(`div`,{class:`absolute inset-0 bg-black/50 backdrop-blur-sm`,onClick:f}),z(`div`,dT,[z(`div`,fT,[z(`div`,pT,[z(`div`,mT,[B(M(W),{icon:d.value?.icon||`lucide:plus`,size:15,class:`text-primary`},null,8,[`icon`])]),n[1]||=z(`div`,null,[z(`div`,{class:`text-sm font-semibold text-foreground`},`Create New`),z(`div`,{class:`text-[11px] text-muted-foreground`},`Add a new resource to your project`)],-1)]),z(`button`,{class:`size-7 flex items-center justify-center rounded-md hover:bg-active text-muted-foreground hover:text-foreground transition-colors cursor-pointer`,onClick:f},[B(M(W),{icon:`lucide:x`,size:14})])]),z(`form`,{class:`p-4 space-y-4`,onSubmit:Js(p,[`prevent`])},[z(`div`,null,[n[2]||=z(`label`,{class:`block text-[11px] font-medium text-muted-foreground mb-1.5 uppercase tracking-wider`},` Resource Type `,-1),z(`div`,hT,[(I(),L(F,null,pi(u,e=>z(`button`,{key:e.value,type:`button`,class:k([`flex flex-col items-center gap-1 py-2 px-1 rounded-lg border transition-all cursor-pointer`,i.value===e.value?`border-active bg-active text-foreground`:`border-base bg-background text-muted-foreground hover:text-foreground hover:bg-active`]),onClick:t=>i.value=e.value},[B(M(W),{icon:e.icon,size:16},null,8,[`icon`]),z(`span`,_T,A(e.label),1)],10,gT)),64))])]),i.value===`api`?(I(),L(`div`,vT,[n[3]||=z(`label`,{class:`block text-[11px] font-medium text-muted-foreground mb-1.5 uppercase tracking-wider`},` HTTP Method `,-1),z(`div`,yT,[(I(),L(F,null,pi(l,e=>z(`button`,{key:e,type:`button`,class:k([`px-3 py-1.5 rounded-md text-xs font-mono font-semibold border transition-all cursor-pointer`,o.value===e?`border-active bg-active text-foreground`:`border-base bg-background text-muted-foreground hover:text-foreground hover:bg-active`]),onClick:t=>o.value=e},A(e),11,bT)),64))])])):H(``,!0),z(`div`,null,[z(`label`,xT,A(i.value===`cron`?`Name`:`Path`),1),Xn(z(`input`,{"onUpdate:modelValue":n[0]||=e=>a.value=e,type:`text`,placeholder:d.value?.placeholder,class:`w-full px-3 py-2 bg-background border border-base rounded-lg text-xs text-foreground placeholder:text-muted-foreground outline-none focus:border-active focus:ring-1 focus:ring-primary-500/25 transition-all font-mono`,onKeydown:Xs(p,[`enter`])},null,40,ST),[[Rs,a.value]]),i.value===`layout`?(I(),L(`p`,CT,` Layout name without extension (e.g. "admin" → layouts/admin.vue) `)):i.value===`cron`?(I(),L(`p`,wT,` Cron job file name (e.g. "daily" → crons/daily.ts) `)):H(``,!0)]),c.value?(I(),L(`div`,TT,[B(M(W),{icon:`lucide:alert-circle`,size:13,class:`flex-shrink-0`}),V(` `+A(c.value),1)])):H(``,!0),z(`div`,ET,[z(`button`,{type:`button`,class:`px-3 py-1.5 text-xs font-medium text-muted-foreground hover:text-foreground rounded-lg hover:bg-active transition-colors cursor-pointer`,disabled:s.value,onClick:f},` Cancel `,8,DT),z(`button`,{type:`submit`,class:`px-4 py-1.5 text-xs font-medium bg-primary text-primary-foreground rounded-lg hover:bg-primary/90 transition-colors flex items-center gap-1.5 cursor-pointer disabled:opacity-50`,disabled:s.value||!a.value.trim()},[s.value?(I(),L(`div`,kT)):(I(),R(M(W),{key:1,icon:`lucide:plus`,size:12})),V(` `+A(s.value?`Creating...`:`Create`),1)],8,OT)])],32)])])):H(``,!0)]))}}),jT=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},MT=jT(AT,[[`__scopeId`,`data-v-d0829a41`]]),NT=[],PT=[];(()=>{let e=`lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,1n,9,16,o,,x,1i,3,,i,,7,a,2,t,3,1k,,,7,2,2,2,3,9,,a,2,q,,2,3,1k,,,5,4,2,2,3,3,,u,2,3,,b,3,1k,,,8,,3,,3,k,2,m,6,,3,1k,,,7,2,2,2,3,7,3,a,2,u,,1n,5,3,3,,4,9,,14,5,1j,,,7,,3,,4,7,2,b,2,t,3,1k,,,7,,3,,4,7,2,b,2,f,,c,4,1j,2,,7,,3,,4,9,,a,2,t,3,1y,,4,6,,,,8,i,2,1p,,,8,c,8,2q,,,a,b,7,21,2,r,,,,,,4,2,1d,k,,2,5,b,,10,9,,2u,b,,6,n,4,4,3,g,4,d,,,3,6,,f,,jj,3,qa,4,s,3,t,2,u,2,1s,w,9,,19,3,,,39,2,y,,3a,c,4,c,63,5,1l,a,,,,,2,o,2,,1c,1a,2,c,k,5,1b,h,12,9,c,3,u,d,1k,e,1c,k,48,3,,l,4,,6,,2,3,5i,1s,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,n,5,4,,2b,2,1e,i,q,i,d,,12,8,p,d,18,4,1b,e,10,,1v,e,c,,8,2,1a,,1f,,,3,2,2,5,2,,,15,5,5,2,6k,8,,2,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,1t,5,8t,2,25,6,1y,b,1d,4,3e,3,1h,f,15,,2,2,a,4,19,b,7,,1p,3,10,e,g,2,18,,c,3,1c,e,8,4,,2,2k,c,6,,2,,4d,c,l,4,1j,2,,7,2,2,2,3,9,,a,2,2,7,3,5,1v,9,,,2,,,4,,5,,,e,2,2a,i,n,,29,k,6j,7,2,9,r,2,2a,h,2y,d,2t,3,2,a,74,f,6t,6,,2,2,4,,,,2,3x,7,2,7,3,,s,a,14,7,,4,8,,9,b,1a,g,5i,8,5j,8,,8,2a,m,,e,3e,6,3,,,2,,7,,,1u,5,,2,,5,9n,4,9,2,,,1c,7,3,5,n,,44l,,6,f,8ug,i,1xc,5,1n,7,t4,,,1j,7,4,29,,b,2,f57,2,3mp,1a,2,n,f2,5,3,6,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,2s,,4g,7,af,,1p,4,e4,4,72,2,6r,,2,,7,2,5,,d6,7,31,7,240,5`.split(`,`).map(e=>e?parseInt(e,36):1);for(let t=0,n=0;t<e.length;t++)(t%2?PT:NT).push(n+=e[t])})();function FT(e){if(e<768)return!1;for(let t=0,n=NT.length;;){let r=t+n>>1;if(e<NT[r])n=r;else if(e>=PT[r])t=r+1;else return!0;if(t==n)return!1}}function IT(e){return e>=127462&&e<=127487}var LT=8205;function RT(e,t,n=!0,r=!0){return(n?zT:BT)(e,t,r)}function zT(e,t,n){if(t==e.length)return t;t&&HT(e.charCodeAt(t))&&UT(e.charCodeAt(t-1))&&t--;let r=VT(e,t);for(t+=WT(r);t<e.length;){let i=VT(e,t);if(r==LT||i==LT||n&&FT(i))t+=WT(i),r=i;else if(IT(i)){let n=0,r=t-2;for(;r>=0&&IT(VT(e,r));)n++,r-=2;if(n%2==0)break;t+=2}else break}return t}function BT(e,t,n){for(;t>1;){let r=zT(e,t-2,n);if(r<t)return r;t--}return 0}function VT(e,t){let n=e.charCodeAt(t);if(!UT(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return HT(r)?(n-55296<<10)+(r-56320)+65536:n}function HT(e){return e>=56320&&e<57344}function UT(e){return e>=55296&&e<56320}function WT(e){return e<65536?1:2}var GT=class e{lineAt(e){if(e<0||e>this.length)throw RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){[e,t]=tE(this,e,t);let r=[];return this.decompose(0,e,r,2),n.length&&n.decompose(0,n.length,r,3),this.decompose(t,this.length,r,1),qT.from(r,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=tE(this,e,t);let n=[];return this.decompose(e,t,n,0),qT.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),r=new ZT(this),i=new ZT(e);for(let e=t,a=t;;){if(r.next(e),i.next(e),e=0,r.lineBreak!=i.lineBreak||r.done!=i.done||r.value!=i.value)return!1;if(a+=r.value.length,r.done||a>=n)return!0}}iter(e=1){return new ZT(this,e)}iterRange(e,t=this.length){return new QT(this,e,t)}iterLines(e,t){let n;if(e==null)n=this.iter();else{t??=this.lines+1;let r=this.line(e).from;n=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new $T(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(t){if(t.length==0)throw RangeError(`A document must have at least one line`);return t.length==1&&!t[0]?e.empty:t.length<=32?new KT(t):qT.from(KT.split(t,[]))}},KT=class e extends GT{constructor(e,t=JT(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,r){for(let i=0;;i++){let a=this.text[i],o=r+a.length;if((t?n:o)>=e)return new eE(r,o,n,a);r=o+1,n++}}decompose(t,n,r,i){let a=t<=0&&n>=this.length?this:new e(XT(this.text,t,n),Math.min(n,this.length)-Math.max(0,t));if(i&1){let t=r.pop(),n=YT(a.text,t.text.slice(),0,a.length);if(n.length<=32)r.push(new e(n,t.length+a.length));else{let t=n.length>>1;r.push(new e(n.slice(0,t)),new e(n.slice(t)))}}else r.push(a)}replace(t,n,r){if(!(r instanceof e))return super.replace(t,n,r);[t,n]=tE(this,t,n);let i=YT(this.text,YT(r.text,XT(this.text,0,t)),n),a=this.length+r.length-(n-t);return i.length<=32?new e(i,a):qT.from(e.split(i,[]),a)}sliceString(e,t=this.length,n=`
28
+ `))}}g()}return(async()=>{try{let e=await a(o,{headers:{accept:`text/event-stream`},signal:c.signal});if(!e.ok||!e.body)throw Error(`Devframe SSE stream request failed: ${e.status}`);await v(e.body)}catch(e){if(c.signal.aborted){g();return}h(e instanceof Error?e:Error(String(e)))}})(),{close:()=>{l=!0,c.abort(),d?.cancel().catch(()=>{})},on:e=>{u=e},post:async e=>{let t;try{t=await m}catch{return}if(l)n(Error(`Devframe SSE channel is closed; message dropped`));else try{let n=await a(o,{method:`POST`,headers:{"content-type":`text/plain; charset=utf-8`,[SC]:t},body:e});if(n.status===200){let e=await n.text();e&&u?.(e);return}if(!n.ok)throw Error(`Devframe SSE POST failed: ${n.status}`)}catch(e){n(e instanceof Error?e:Error(String(e)))}},serialize:s.serialize,deserialize:s.deserialize}}function fw(e,t){let{channel:n,rpcOptions:r={}}=t;return zb(e,{...n,timeout:-1,...r,proxify:!1})}function pw(e){let{transport:t,authToken:n,connectionMeta:r,events:i,clientRpc:a,rpcOptions:o={},callTimeout:s=0}=e,c=!1,l=`connecting`,u=null,d=Promise.withResolvers();function f(e,t=null){if(t?u=t:e===`connected`&&(u=null),e===l)return;let n=l;l=e,i.emit(Eb.client.connectionStatus,e,n)}let p=new Set;function m(e){for(let t of[...p])t.reject(e)}function h(){return l===`disconnected`||l===`error`?new $C(`connection`,`[devframe] Not connected to the devframe server`,{cause:u??void 0}):l===`unauthorized`?new $C(`auth`,`[devframe] Not authorized by the devframe server`,{cause:u??void 0}):null}function g(e,t){return new Promise((n,r)=>{let a=!1,o,c={reject(e){a||(l(),i.emit(Eb.client.error,e,t),r(e))}};function l(){a=!0,p.delete(c),o&&clearTimeout(o)}p.add(c),s>0&&(o=setTimeout(()=>{c.reject(new $C(`timeout`,`[devframe] RPC call "${t}" timed out after ${s}ms`))},s)),e.then(e=>{a||(l(),n(e))},e=>{if(a)return;l();let n=e instanceof Error?e:Error(String(e));i.emit(Eb.client.error,n,t),r(n)})})}let _=new Map;for(let e of r.jsonSerializableMethods??[])_.set(e,{jsonSerializable:!0});let v=e.createChannel({definitions:_,onError(e){f(`error`,e),i.emit(Eb.client.connectionError,e),m(new $C(`connection`,`[devframe] Connection to the devframe server failed`,{cause:e}))},onDisconnected(){l!==`error`&&f(`disconnected`),m(new $C(`connection`,`[devframe] Disconnected from the devframe server`,{cause:u??void 0}))}}),y=fw(a.functions,{channel:v,rpcOptions:o});a.register({name:Eb.broadcast.authRevoked,type:`event`,handler:()=>{c=!1;let e=new $C(`auth`,`[devframe] The devframe server revoked this client's trust`);f(`unauthorized`,e),i.emit(Eb.client.connectionError,e),m(e),i.emit(Eb.client.isTrustedUpdated,!1)}});let b=n;async function x(e){b=e;let t=await y.$call(`anonymous:devframe:auth`,{authToken:e,ua:navigator.userAgent,origin:location.origin});if(c=t.isTrusted,c)d.resolve(!0),f(`connected`);else{let e=new $C(`auth`,`[devframe] The devframe server refused this client's credentials`);f(`unauthorized`,e),i.emit(Eb.client.connectionError,e)}return i.emit(Eb.client.isTrustedUpdated,c),t.isTrusted}async function S(e){let t=(await y.$call(`anonymous:devframe:auth:exchange`,{code:e,ua:navigator.userAgent,origin:location.origin}))?.authToken??null;return t&&(b=t,c=!0,d.resolve(!0),f(`connected`),i.emit(Eb.client.isTrustedUpdated,!0)),t}async function C(e={}){await y.$call(`anonymous:devframe:auth:request-code`,{ua:navigator.userAgent,origin:location.origin,...e.reissue?{reissue:!0}:{}})}async function w(){return c?!0:x(b??``)}async function ee(e=6e4){if(c&&d.resolve(!0),e<=0)return d.promise;let t;try{return await Promise.race([d.promise,new Promise((n,r)=>{t=setTimeout(()=>{r(Error(`[devframe] Timeout waiting for rpc to be trusted`))},e)})]),c}finally{clearTimeout(t)}}return{transport:t,get isTrusted(){return c},get status(){return l},get connectionError(){return u},requestTrust:w,requestTrustWithToken:x,requestTrustWithCode:S,requestAuthCode:C,ensureTrusted:ee,call:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(Eb.client.error,n,t),Promise.reject(n)):g(y.$call(...e),t)},callEvent:(...e)=>{let t=h();if(t)i.emit(Eb.client.error,t,String(e[0]));else return y.$callEvent(...e)},callOptional:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(Eb.client.error,n,t),Promise.reject(n)):g(y.$callOptional(...e),t)},close:()=>{v.close()}}}function mw(e,t,n){let r=(()=>{try{return new URL(t,n.href)}catch{return new URL(n.href)}})();if(e&&typeof e==`object`){if(e.host!=null||e.port!=null){let t=e.host??`${r.hostname}:${e.port}`;return new URL(e.path??`/`,`${r.protocol}//${t}`).href}return new URL(e.path??``,r).href}let i=e??``;return/^https?:\/\//i.test(i)?i:new URL(i,r).href}function hw(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},sseOptions:s={},callTimeout:c=0}=e,l=mw(n.sse,r??`./`,location);return pw({transport:`sse`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>dw({url:l,authToken:t,definitions:e.definitions,...s,onConnected(){s.onConnected?.()},onError(t){e.onError(t),s.onError?.(t)},onDisconnected(){e.onDisconnected(),s.onDisconnected?.()}})})}function gw(e){let{name:t,message:n,cause:r,...i}=e,a=r instanceof Error?r:_w(r)?gw(r):r,o=a===void 0?Error(n):Error(n,{cause:a});return o.name=t,Object.assign(o,i),o}function _w(e){return typeof e==`object`&&!!e&&typeof e.message==`string`&&typeof e.name==`string`}function vw(e){return typeof e==`object`&&!!e&&e.type===`static`&&typeof e.path==`string`}function yw(e){return typeof e==`object`&&!!e&&e.type===`query`&&typeof e.records==`object`&&e.records!==null}function bw(e){return typeof e==`object`&&!!e&&(`output`in e||`error`in e)}function xw(e){if(e.error)throw gw(e.error);return e.output}function Sw(e){return e.some(e=>e!=null)}function Cw(e){return typeof e==`object`&&e&&`serialization`in e&&`data`in e?e.data:e}function ww(e,t){let n=new Map,r=new Map;function i(e,t){return t===`structured-clone`&&Array.isArray(e)?iC(e):e}function a(e,t){return i(Cw(e),t)}async function o(e){n.has(e.path)||n.set(e.path,t(e.path).then(t=>a(t,e.serialization)));let r=await n.get(e.path);return bw(r)?xw(r):r}async function s(e,n){return r.has(e)||r.set(e,t(e).then(e=>a(e,n))),await r.get(e)}async function c(t,n){if(!(t in e))throw Error(`[devframe-rpc] Function "${t}" not found in dump store`);let r=e[t];if(vw(r)){if(Sw(n))throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await o(r)}if(yw(r)){let e=ax(n),i=r.records[e];if(i)return xw(await s(i,r.serialization));if(r.fallback)return xw(await s(r.fallback,r.serialization));throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(!Sw(n))return r;throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}return{call:async(e,t)=>await c(e,t),callOptional:async(t,n)=>{if(t in e)return await c(t,n)},callEvent:async(e,t)=>{}}}async function Tw(e){let t=ww(await e.fetchJsonFromBases(CC),e.fetchJsonFromBases);return{transport:`static`,isTrusted:!0,status:`connected`,connectionError:null,requestTrust:async()=>!0,requestTrustWithToken:async()=>!0,requestTrustWithCode:async()=>null,requestAuthCode:async()=>{},ensureTrusted:async()=>!0,call:(...e)=>t.call(e[0],e.slice(1)),callEvent:(...e)=>t.callEvent(e[0],e.slice(1)),callOptional:(...e)=>t.callOptional(e[0],e.slice(1)),close:()=>{}}}var Ew=``;function Dw(e,t){return`${e}${Ew}${t}`}function Ow(e){let t=new Map,n=new Map;e.client.register({name:Eb.broadcast.streamingChunk,type:`event`,handler(e,n,r,i){t.get(Dw(e,n))?._push(r,i)}}),e.client.register({name:Eb.broadcast.streamingEnd,type:`event`,handler(e,n,r){let i=Dw(e,n),a=t.get(i);a&&(a._end(r),t.delete(i))}}),e.client.register({name:Eb.broadcast.streamingUploadCancel,type:`event`,handler(e,t){let r=Dw(e,t),i=n.get(r);i&&(i.abort(`server cancelled upload`),n.delete(r))}}),e.events.on(Eb.client.isTrustedUpdated,n=>{if(n)for(let[n,r]of t){if(r.cancelled||r.done)continue;let t=n.indexOf(Ew);if(t<0)continue;let i=n.slice(0,t),a=n.slice(t+1);e.callEvent(`devframe:streaming:subscribe`,i,a,{afterSeq:r.lastSeenSeq})}});function r(n,r,i={}){let a=Dw(n,r),o=t.get(a);if(o)return o;let s=uC({id:r,highWaterMark:i.highWaterMark,onOverflow(e){console.warn(`[devframe] DF0029: Stream "${n}#${r}" dropped ${e} chunk(s) after exceeding the client high-water mark.`)},onCancel(){e.callEvent(`devframe:streaming:cancel`,n,r),t.delete(a)}});if(t.set(a,s),e.isTrusted)e.callEvent(`devframe:streaming:subscribe`,n,r,{afterSeq:0});else{let i=e.events.on(Eb.client.isTrustedUpdated,o=>{o&&(i(),t.has(a)&&!s.cancelled&&!s.done&&e.callEvent(`devframe:streaming:subscribe`,n,r,{afterSeq:s.lastSeenSeq}))})}return s}function i(t,r){let i=Dw(t,r),a=n.get(i);if(a)return a;let o=lC({id:r});return o.events.on(`chunk`,(n,i)=>{e.callEvent(`devframe:streaming:upload-chunk`,t,r,n,i)}),o.events.on(`end`,a=>{e.callEvent(`devframe:streaming:upload-end`,t,r,a),n.delete(i)}),n.set(i,o),o}return{subscribe:r,upload:i}}function kw(){}var Aw=new Map;function jw(e){let t=e.url;e.authToken&&(t=`${t}?${EC}=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:r=kw,onError:i=kw,onDisconnected:a=kw,definitions:o=Aw}=e;n.addEventListener(`open`,e=>{r(e)}),n.addEventListener(`error`,e=>{let t=e instanceof Error?e:Error(e.type);i(t)}),n.addEventListener(`close`,e=>{a(e)});let s=sw(o);return{close:()=>{n.close()},on:e=>{n.addEventListener(`message`,t=>{e(t.data)})},post:e=>{if(n.readyState===WebSocket.OPEN)n.send(e);else if(n.readyState===WebSocket.CONNECTING){let t=()=>{i(),n.readyState===WebSocket.OPEN&&n.send(e)},r=()=>i();function i(){n.removeEventListener(`open`,t),n.removeEventListener(`close`,r)}n.addEventListener(`open`,t),n.addEventListener(`close`,r)}else i(Error(`Devframe WebSocket is not open; message dropped`))},serialize:s.serialize,deserialize:s.deserialize}}function Mw(e,t,n){let r=(()=>{try{return new URL(t,n.href)}catch{return new URL(n.href)}})(),i=r.protocol===`https:`?`wss:`:`ws:`;if(e&&typeof e==`object`){if(e.host!=null||e.port!=null){let t=e.host??`${r.hostname}:${e.port}`,n=new URL(e.path??`/`,`${i}//${t}`);return n.protocol=i,n.href}let t=new URL(e.path??``,r);return t.protocol=i,t.href}if(typeof e==`number`)return`${i}//${r.hostname}:${e}`;let a=e??``;if(/^wss?:\/\//i.test(a))return a;if(/^https?:\/\//i.test(a))return gb(a,/^https/i.test(a)?`wss://`:`ws://`);let o=new URL(a,r);return o.protocol=i,o.href}function Nw(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},wsOptions:s={},callTimeout:c=0}=e,l=Mw(n.websocket,r??`./`,location);return pw({transport:`websocket`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>jw({url:l,authToken:t,definitions:e.definitions,...s,onConnected(e){s.onConnected?.(e)},onError(t){e.onError(t),s.onError?.(t)},onDisconnected(t){e.onDisconnected(),s.onDisconnected?.(t)}})})}function Pw(e){return e.includes(`:`)}function Fw(e,t){return Pw(t)?t:`${e}:${t}`}function Iw(e){return{async get(t){return(await e()).value()?.[t]},async set(t,n){(await e()).mutate(e=>{if(e===void 0)return{[t]:n};e[t]=n})},async delete(t){(await e()).mutate(e=>{e!==void 0&&delete e[t]})},async all(){return(await e()).value()??{}},async onChange(t){return(await e()).on(`updated`,e=>t(e??{}))}}}function Lw(e,t,n){let r=`devframe:settings:${n}:${t}`,i;function a(){return i||=(async()=>(await e.ensureTrusted(),e.sharedState.get(r)))().catch(e=>{throw i=void 0,e}),i}return Iw(a)}function Rw(e,t){return{global:Lw(e,t,`global`),project:Lw(e,t,`project`)}}function zw(e,t){return{namespace:t,base:e,rpc:{namespace:t,register(n){if(Pw(n.name))throw Error(`[devframe] Scoped client RPC registration for namespace "${t}" received an already-namespaced function name "${n.name}". Pass a bare name without a ":" separator.`);e.client.register({...n,name:`${t}:${n.name}`})},call:((n,...r)=>e.call(Fw(t,n),...r)),callEvent:((n,...r)=>e.callEvent(Fw(t,n),...r)),callOptional:((n,...r)=>e.callOptional(Fw(t,n),...r)),sharedState:((n,r)=>e.sharedState.get(Fw(t,n),r)),streaming:{subscribe:(n,r,i)=>e.streaming.subscribe(Fw(t,n),r,i),upload:(n,r)=>e.streaming.upload(Fw(t,n),r)}},settings:Rw(e,t),scope:e.scope}}function Bw(){if(typeof document<`u`){let e=document.modelContext;if(e)return e}if(typeof navigator<`u`){let e=navigator.modelContext;if(e)return e}}function Vw(e,t={}){let n=t.modelContext??Bw();if(!n)return()=>{};let r=n,i=new Map,a=new Map;function o(t,n){let o=pC(t.name),s=a.get(o);if(s&&s!==t.name){console.warn(`[devframe] WebMCP tool name "${o}" (from "${t.name}") collides with "${s}"; keeping the first registration.`);return}let c=new AbortController,l=Bb(t.type,n),u=r.registerTool({name:o,description:n.description,inputSchema:Ub(t.args),annotations:{title:n.title??t.name,readOnlyHint:l===`read`,destructiveHint:l===`destructive`},execute:n=>Hw(t,e.context,n)},{signal:c.signal});u&&`then`in u&&u.then(()=>{},()=>{}),a.set(o,t.name),i.set(t.name,()=>{c.abort(),u&&`unregister`in u&&typeof u.unregister==`function`&&u.unregister(),a.delete(o)})}function s(t){let n=t?[t]:[...e.definitions.keys()];for(let t of n){i.get(t)?.(),i.delete(t);let n=e.definitions.get(t),r=n?.agent;n&&r&&o(n,r)}}s();let c=e.onChanged(e=>s(e));return()=>{c();for(let e of i.values())e();i.clear()}}async function Hw(e,t,n){try{let r=Gb(n,e.args?.length);return{content:[{type:`text`,text:Uw(await(await FC(e,t))(...r))}]}}catch(e){return{isError:!0,content:[{type:`text`,text:Ww(e)}]}}}function Uw(e){return e===void 0?`undefined`:typeof e==`string`?e:JSON.stringify(e,null,2)}function Ww(e){if(!(e instanceof Error))return String(e);let t=e.cause instanceof Error?` (cause: ${e.cause.message})`:``;return`${e.name}: ${e.message}${t}`}function Gw(e,t){if(t.backend===`static`)return`static`;let n=t.websocket!==void 0,r=t.sse!==void 0;if(e===`websocket`){if(!n)throw Error(`[devframe] transport: 'websocket' was requested, but this server does not advertise a WebSocket endpoint`);return`websocket`}if(e===`sse`){if(!r)throw Error(`[devframe] transport: 'sse' was requested, but this server does not advertise an SSE endpoint`);return`sse`}if(t.backend===`sse`&&r)return`sse`;if(n)return`websocket`;if(r)return`sse`;throw Error(`[devframe] This server advertises no RPC transport (backend "none"), so there is nothing to connect to. Enable the WebSocket or SSE endpoint on the server, or use its static/MCP surfaces instead.`)}async function Kw(e={}){let{baseURL:t=`./`,rpcOptions:n={},cacheOptions:r=!1}=e,i=ox(),a=Array.isArray(t)?t:[t],o=await QC(e),{connectionMeta:s,metaBaseUrl:c,authToken:l}=o,u=a[0]??`./`;try{u=new URL(`.`,c).href}catch{}let d=new DC({functions:[],...typeof e.cacheOptions==`object`?e.cacheOptions:{}}),f={rpc:void 0},p=new IC(f),m=e.webmcp===!1?void 0:Vw(p),h,g=!1,_=0,v;function y(){_++,v=void 0,d.clear(),r===!0&&d.updateOptions({functions:[]})}r&&(p.register({name:Eb.broadcast.cacheInvalidate,type:`event`,handler:y}),i.on(Eb.client.connectionStatus,y),i.on(Eb.client.isTrustedUpdated,y));async function b(e){let t=[u,...a.filter(e=>e!==u)].filter(e=>e!=null),n=[];for(let r of t)try{return await fetch(hb(e,r)).then(t=>{if(!t.ok)throw Error(`Failed to fetch ${e} from ${r}: ${t.status}`);return t.json()})}catch(e){n.push(e)}throw Error(`Failed to load ${e} from ${t.join(`, `)}`,{cause:n})}let x=e.callTimeout??0,S=x>0?x:1/0,C,w={authToken:l,connectionMeta:s,metaBaseUrl:c,events:i,clientRpc:p,callTimeout:e.callTimeout,rpcOptions:{...n,async onRequest(e,t,i){let a=performance.now()+S;if(await n.onRequest?.call(this,e,t,i),r===!0&&e.i&&C.isTrusted&&!e.m.startsWith(`anonymous:`)&&e.m!==`devframe:rpc:cacheable-functions`){function t(){if(performance.now()>=a)throw new $C(`timeout`,`[devframe] RPC call "${e.m}" timed out after ${x}ms`)}for(;!v&&(t(),!(g||C.status!==`connected`));){let e=_;v=C.callOptional(`devframe:rpc:cacheable-functions`).then(t=>{e===_&&d.updateOptions({functions:t??[]})}).catch(t=>{throw e===_&&(v=void 0),t}),await v}await v,t()}let o=_;if(r&&e.i&&!g&&C.isTrusted&&d.validate(e.m)){if(d.has(e.m,e.a))return i(d.cached(e.m,e.a));let n=await t(e);o===_&&!g&&d.apply(e,n)}else await t(e)}}},ee=Gw(e.transport??`auto`,s);C=ee===`static`?await Tw({fetchJsonFromBases:b}):ee===`sse`?hw({...w,sseOptions:e.sseOptions}):Nw({...w,wsOptions:e.wsOptions});let T;try{T=new BroadcastChannel(`devframe-auth`)}catch{}let E,D=!1;function te(e){return((...t)=>D||!E?e(...t):E.then(()=>e(...t)))}function ne(){g=!0,y();try{h?.(),m?.()}finally{try{T?.close()}finally{C.close?.()}}}let re={events:i,get isTrusted(){return C.isTrusted},get status(){return C.status},get connectionError(){return C.connectionError},get transport(){return C.transport??ee},get connection(){return o},connectionMeta:s,ensureTrusted:C.ensureTrusted,requestTrust:C.requestTrust,requestTrustWithToken:async e=>(JC(e),o={...o,authToken:e},C.requestTrustWithToken(e)),requestTrustWithCode:async e=>{let t=await C.requestTrustWithCode(e);if(!t)return!1;JC(t),o={...o,authToken:t};try{T?.postMessage({type:`auth-update`,authToken:t})}catch{}return!0},requestAuthCode:e=>C.requestAuthCode(e),call:te(C.call),callEvent:te(C.callEvent),callOptional:te(C.callOptional),client:p,sharedState:void 0,services:void 0,streaming:void 0,cacheManager:d,scope:void 0,close:ne};re.sharedState=aw(re),re.streaming=Ow(re),re.services=iw(re);let ie=new Map;re.scope=(e=>{if(!e)return re;let t=ie.get(e);return t||(t=zw(re,e),ie.set(e,t)),t}),f.rpc=re;function O(){try{return typeof window<`u`&&window.self===window.top}catch{return!1}}async function ae(){if(e.simpleAuth!==!1&&O()&&typeof globalThis.prompt==`function`)for(await re.requestAuthCode().catch(()=>{});!re.isTrusted;){let e=globalThis.prompt(`devframe: enter the authentication code shown in your terminal`);if(e==null)return;let t=e.trim();if(t&&await re.requestTrustWithCode(t))return}}async function oe(){let t=await C.requestTrust(),n=e.otpParam??`devframe_otp`,r=n?await rw(re,{param:n}):!1;t||r||re.isTrusted||await ae()}return E=oe().then(()=>{D=!0},()=>{D=!0}),s.mcp&&yC(async()=>{let{setupBrowserAgentRpcBridge:e}=await import(`./browser-agent-rpc-BXhoSh1z-hjcXyVWo.js`);return{setupBrowserAgentRpcBridge:e}},[],import.meta.url).then(({setupBrowserAgentRpcBridge:e})=>{g||(h=e(re))}).catch(()=>{}),T&&(T.onmessage=e=>{e.data?.type===`auth-update`&&e.data.authToken&&re.requestTrustWithToken(e.data.authToken)}),re}var qw=Kw,Jw=_b.postMessage.frameNav;_b.sharedState.docks,_b.sharedState.commands,_b.sharedState.userSettings,_b.broadcast.docksActivate;var Yw=`ubean`;function Xw(e){let t=e.frameId??Yw,n=e.targetOrigin??`*`,r=typeof window>`u`?void 0:window.parent,i=()=>({channel:Jw,v:1,frameId:t,from:`frame`});function a(){r&&r!==window&&r.postMessage({...i(),type:`ready`,current:e.current(),tabs:e.tabs.map(e=>({id:e.id,title:e.title,icon:e.icon,navTarget:{path:e.id},fallbackUrl:`#/${e.id}`}))},n)}function o(){r&&r!==window&&r.postMessage({...i(),type:`navigated`,tabId:e.current()},n)}function s(n){let r=n.data;r&&r.channel===Jw&&r.v===1&&r.frameId===t&&r.from===`host`&&(r.type===`hello`?a():r.type===`navigate`&&r.tabId&&(e.onNavigate(r.tabId),o()))}return $r(()=>{window.addEventListener(`message`,s),window.addEventListener(`hashchange`,o),a()}),ri(()=>{window.removeEventListener(`message`,s),window.removeEventListener(`hashchange`,o)}),a}var Zw=`https://api.deepseek.com/v1`,Qw=`deepseek-chat`,$w=null;function eT(){if(!$w){let e=new Promise((e,t)=>setTimeout(()=>t(Error(`Devframe connection timeout — 请从 dev server 的 DevTools 外壳进入本页面,而不是直接打开它。`)),5e3));$w=Promise.race([qw(),e])}return $w}async function tT(e,t,n){return e.call(t,...n)}function nT(e){let t=Math.floor(e/1e3),n=Math.floor(t/60),r=Math.floor(n/60);return r>0?`${r}h ${n%60}m`:n>0?`${n}m ${t%60}s`:`${t}s`}function rT(e){return new Date(e).toLocaleTimeString()}function iT(e){return e==null?`—`:typeof e==`boolean`?e?`true`:`false`:typeof e==`number`?String(e):typeof e==`string`?e:Array.isArray(e)?`[${e.length} items]`:typeof e==`object`?JSON.stringify(e):String(e)}function aT(e){return e?e.split(`/`).pop()||e:``}function oT(e){if(!e)return``;let t=e.split(`/`);return t.length<=5?e:`${t.slice(0,3).join(`/`)}/…/${t.slice(-2).join(`/`)}`}var sT={GET:`bg-success/12 text-success`,POST:`bg-info/12 text-info`,PUT:`bg-warning/12 text-warning`,DELETE:`bg-destructive/12 text-destructive`,PATCH:`bg-purple-500/12 text-purple-400`};function cT(e){return sT[e]||`bg-secondary text-muted-foreground`}function lT(e={}){let t=e.client??eT;async function n(e,...n){return tT(await t(),e,n)}let r=j(!0),i=j(null),a=j(null),o=j({}),s=j(0),c=null,l=null,u=!1,d=!1;function f(e,t){let n={duration:3e3,position:`top-right`};switch(e){case`success`:Mg.success(t,n);break;case`error`:Mg.error(t,n);break;case`warning`:Mg.warning(t,n);break;default:Mg(t,n)}}async function p(){if(!(u||d)){u=!0;try{let e=await(await t()).sharedState.get(`ubean:info`);a.value=e.value(),r.value=!1,l=e.on(`updated`,e=>{a.value=e}),o.value=await n(`ubean:get-env`),c=setInterval(()=>{a.value&&(s.value=Date.now()-a.value.startTime)},1e3)}catch(e){i.value=e instanceof Error?e.message:`Failed to connect`,r.value=!1}}}async function m(){try{o.value=await n(`ubean:get-env`),a.value||=await n(`ubean:get-info`)}catch{}}async function h(e,t,r){try{let i=await n(`ubean:crud-create`,{type:e,path:t,...r});return i.success?(f(`success`,`Created ${e}: ${t}`),await m()):i.errors?.length&&f(`error`,i.errors[0]),i}catch(e){let t=e instanceof Error?e.message:`Create failed`;return f(`error`,t),{success:!1,errors:[t]}}}async function g(e,t){try{return await n(`ubean:crud-read`,{type:e,path:t})}catch(e){return{success:!1,error:e instanceof Error?e.message:`Read failed`}}}async function _(e,t){try{let r=await n(`ubean:crud-update`,{type:e,...t});return r.success?(f(`success`,`Updated ${e}`),await m()):r.errors?.length&&f(`error`,r.errors[0]),r}catch(e){let t=e instanceof Error?e.message:`Update failed`;return f(`error`,t),{success:!1,errors:[t]}}}async function v(e,t){try{let r=await n(`ubean:crud-delete`,{type:e,...t});return r.success?(f(`success`,`Deleted ${e}`),await m()):r.errors?.length&&f(`error`,r.errors[0]),r}catch(e){let t=e instanceof Error?e.message:`Delete failed`;return f(`error`,t),{success:!1,errors:[t]}}}async function y(e){try{let t=await n(`ubean:crud-restore`,e);return t.success?(f(`success`,`Restored: ${e}`),await m()):t.errors?.length&&f(`error`,t.errors[0]),t}catch(e){let t=e instanceof Error?e.message:`Restore failed`;return f(`error`,t),{success:!1,errors:[t]}}}async function b(e,t){try{return await n(`ubean:ai-chat`,{messages:e,...t})}catch(e){return{message:{role:`assistant`,content:`Error: ${e instanceof Error?e.message:`AI request failed`}`,timestamp:Date.now()}}}}async function x(){try{return await n(`ubean:ai-tools`)}catch{return[]}}async function S(e,r,i){let a=`stream_${Date.now()}_${Math.random().toString(36).slice(2,8)}`;try{let o=(await(await t()).sharedState.get(`ubean:ai:stream`)).on(`updated`,e=>{e&&e.requestId===a&&i(e)});try{return await n(`ubean:ai-chat-stream`,{messages:e,requestId:a,...r})}finally{o()}}catch(e){return{message:{role:`assistant`,content:`Error: ${e instanceof Error?e.message:`AI stream failed`}`,timestamp:Date.now()}}}}async function C(e){try{return await n(`ubean:terminal-start`,e)}catch(e){return f(`error`,e instanceof Error?e.message:`Terminal start failed`),null}}async function w(e,t){try{return await n(`ubean:terminal-input`,{sessionId:e,data:t})}catch{return!1}}async function ee(e,t,r){try{return await n(`ubean:terminal-resize`,{sessionId:e,cols:t,rows:r})}catch{return!1}}async function T(e){try{return await n(`ubean:terminal-poll`,{sessionId:e})}catch{return{data:``,exited:!0,exitCode:-1}}}async function E(e){try{return await n(`ubean:terminal-kill`,{sessionId:e})}catch{return!1}}function D(){d||(d=!0,l&&=(l(),null),c&&=(clearInterval(c),null))}return so()&&($r(()=>{p()}),ri(D)),{loading:r,error:i,info:a,env:o,uptime:s,fmtUptime:nT,fmtTime:rT,fmtVal:iT,fileName:aT,filePath:oT,methodClass:cT,init:p,dispose:D,refresh:m,crudCreate:h,crudRead:g,crudUpdate:_,crudDelete:v,crudRestore:y,aiChat:b,aiChatStream:S,aiGetTools:x,showToast:f,terminalStart:C,terminalInput:w,terminalResize:ee,terminalPoll:T,terminalKill:E}}var uT={key:0,class:`fixed inset-0 z-50 flex items-center justify-center`},dT={class:`relative bg-background border border-base rounded-xl shadow-2xl w-full max-w-md mx-4 overflow-hidden animate-scale-in`},fT={class:`flex items-center justify-between px-4 py-3 border-b border-base`},pT={class:`flex items-center gap-2`},mT={class:`size-7 rounded-lg bg-primary/15 flex items-center justify-center`},hT={class:`grid grid-cols-5 gap-1.5`},gT=[`onClick`],_T={class:`text-[10px] font-medium`},vT={key:0},yT={class:`flex gap-1.5`},bT=[`onClick`],xT={class:`block text-[11px] font-medium text-muted-foreground mb-1.5 uppercase tracking-wider`},ST=[`placeholder`],CT={key:0,class:`mt-1 text-[10px] text-muted-foreground`},wT={key:1,class:`mt-1 text-[10px] text-muted-foreground`},TT={key:1,class:`flex items-center gap-2 px-3 py-2 rounded-lg bg-destructive/10 text-destructive text-xs border border-destructive/20`},ET={class:`flex items-center justify-end gap-2 pt-1`},DT=[`disabled`],OT=[`disabled`],kT={key:0,class:`size-3 border-2 border-primary-foreground/30 border-t-primary-foreground rounded-full animate-spin`},AT=P({__name:`CreateDialog`,props:{open:{type:Boolean},initialType:{},onCreate:{type:Function}},emits:[`close`],setup(e,{emit:t}){let n=e,r=t,i=j(`page`),a=j(``),o=j(`GET`),s=j(!1),c=j(``),l=[`GET`,`POST`,`PUT`,`DELETE`,`PATCH`],u=[{value:`page`,label:`Page`,icon:`lucide:file-text`,placeholder:`/about`},{value:`api`,label:`API Route`,icon:`lucide:send`,placeholder:`/api/hello`},{value:`middleware`,label:`Middleware`,icon:`lucide:layers`,placeholder:`/auth`},{value:`layout`,label:`Layout`,icon:`lucide:layout`,placeholder:`admin`},{value:`cron`,label:`Cron Job`,icon:`lucide:clock`,placeholder:`daily-cleanup`}],d=U(()=>u.find(e=>e.value===i.value));ir(()=>n.open,e=>{e&&(i.value=n.initialType||`page`,a.value=``,o.value=`GET`,c.value=``)}),ir(i,()=>{c.value=``});function f(){s.value||r(`close`)}async function p(){if(!a.value.trim())c.value=`Path is required`;else{s.value=!0,c.value=``;try{let e=i.value===`api`?{method:o.value}:void 0,t=await n.onCreate(i.value,a.value.trim(),e);t.success?r(`close`):t.errors?.length&&(c.value=t.errors[0])}catch(e){c.value=e instanceof Error?e.message:`Failed to create resource`}finally{s.value=!1}}}return(t,n)=>(I(),R(yr,{to:`body`},[e.open?(I(),L(`div`,uT,[z(`div`,{class:`absolute inset-0 bg-black/50 backdrop-blur-sm`,onClick:f}),z(`div`,dT,[z(`div`,fT,[z(`div`,pT,[z(`div`,mT,[B(M(W),{icon:d.value?.icon||`lucide:plus`,size:15,class:`text-primary`},null,8,[`icon`])]),n[1]||=z(`div`,null,[z(`div`,{class:`text-sm font-semibold text-foreground`},`Create New`),z(`div`,{class:`text-[11px] text-muted-foreground`},`Add a new resource to your project`)],-1)]),z(`button`,{class:`size-7 flex items-center justify-center rounded-md hover:bg-active text-muted-foreground hover:text-foreground transition-colors cursor-pointer`,onClick:f},[B(M(W),{icon:`lucide:x`,size:14})])]),z(`form`,{class:`p-4 space-y-4`,onSubmit:Js(p,[`prevent`])},[z(`div`,null,[n[2]||=z(`label`,{class:`block text-[11px] font-medium text-muted-foreground mb-1.5 uppercase tracking-wider`},` Resource Type `,-1),z(`div`,hT,[(I(),L(F,null,pi(u,e=>z(`button`,{key:e.value,type:`button`,class:k([`flex flex-col items-center gap-1 py-2 px-1 rounded-lg border transition-all cursor-pointer`,i.value===e.value?`border-active bg-active text-foreground`:`border-base bg-background text-muted-foreground hover:text-foreground hover:bg-active`]),onClick:t=>i.value=e.value},[B(M(W),{icon:e.icon,size:16},null,8,[`icon`]),z(`span`,_T,A(e.label),1)],10,gT)),64))])]),i.value===`api`?(I(),L(`div`,vT,[n[3]||=z(`label`,{class:`block text-[11px] font-medium text-muted-foreground mb-1.5 uppercase tracking-wider`},` HTTP Method `,-1),z(`div`,yT,[(I(),L(F,null,pi(l,e=>z(`button`,{key:e,type:`button`,class:k([`px-3 py-1.5 rounded-md text-xs font-mono font-semibold border transition-all cursor-pointer`,o.value===e?`border-active bg-active text-foreground`:`border-base bg-background text-muted-foreground hover:text-foreground hover:bg-active`]),onClick:t=>o.value=e},A(e),11,bT)),64))])])):H(``,!0),z(`div`,null,[z(`label`,xT,A(i.value===`cron`?`Name`:`Path`),1),Xn(z(`input`,{"onUpdate:modelValue":n[0]||=e=>a.value=e,type:`text`,placeholder:d.value?.placeholder,class:`w-full px-3 py-2 bg-background border border-base rounded-lg text-xs text-foreground placeholder:text-muted-foreground outline-none focus:border-active focus:ring-1 focus:ring-primary-500/25 transition-all font-mono`,onKeydown:Xs(p,[`enter`])},null,40,ST),[[Rs,a.value]]),i.value===`layout`?(I(),L(`p`,CT,` Layout name without extension (e.g. "admin" → layouts/admin.vue) `)):i.value===`cron`?(I(),L(`p`,wT,` Cron job file name (e.g. "daily" → crons/daily.ts) `)):H(``,!0)]),c.value?(I(),L(`div`,TT,[B(M(W),{icon:`lucide:alert-circle`,size:13,class:`flex-shrink-0`}),V(` `+A(c.value),1)])):H(``,!0),z(`div`,ET,[z(`button`,{type:`button`,class:`px-3 py-1.5 text-xs font-medium text-muted-foreground hover:text-foreground rounded-lg hover:bg-active transition-colors cursor-pointer`,disabled:s.value,onClick:f},` Cancel `,8,DT),z(`button`,{type:`submit`,class:`px-4 py-1.5 text-xs font-medium bg-primary text-primary-foreground rounded-lg hover:bg-primary/90 transition-colors flex items-center gap-1.5 cursor-pointer disabled:opacity-50`,disabled:s.value||!a.value.trim()},[s.value?(I(),L(`div`,kT)):(I(),R(M(W),{key:1,icon:`lucide:plus`,size:12})),V(` `+A(s.value?`Creating...`:`Create`),1)],8,OT)])],32)])])):H(``,!0)]))}}),jT=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},MT=jT(AT,[[`__scopeId`,`data-v-d0829a41`]]),NT=[],PT=[];(()=>{let e=`lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,1n,9,16,o,,x,1i,3,,i,,7,a,2,t,3,1k,,,7,2,2,2,3,9,,a,2,q,,2,3,1k,,,5,4,2,2,3,3,,u,2,3,,b,3,1k,,,8,,3,,3,k,2,m,6,,3,1k,,,7,2,2,2,3,7,3,a,2,u,,1n,5,3,3,,4,9,,14,5,1j,,,7,,3,,4,7,2,b,2,t,3,1k,,,7,,3,,4,7,2,b,2,f,,c,4,1j,2,,7,,3,,4,9,,a,2,t,3,1y,,4,6,,,,8,i,2,1p,,,8,c,8,2q,,,a,b,7,21,2,r,,,,,,4,2,1d,k,,2,5,b,,10,9,,2u,b,,6,n,4,4,3,g,4,d,,,3,6,,f,,jj,3,qa,4,s,3,t,2,u,2,1s,w,9,,19,3,,,39,2,y,,3a,c,4,c,63,5,1l,a,,,,,2,o,2,,1c,1a,2,c,k,5,1b,h,12,9,c,3,u,d,1k,e,1c,k,48,3,,l,4,,6,,2,3,5i,1s,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,n,5,4,,2b,2,1e,i,q,i,d,,12,8,p,d,18,4,1b,e,10,,1v,e,c,,8,2,1a,,1f,,,3,2,2,5,2,,,15,5,5,2,6k,8,,2,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,1t,5,8t,2,25,6,1y,b,1d,4,3e,3,1h,f,15,,2,2,a,4,19,b,7,,1p,3,10,e,g,2,18,,c,3,1c,e,8,4,,2,2k,c,6,,2,,4d,c,l,4,1j,2,,7,2,2,2,3,9,,a,2,2,7,3,5,1v,9,,,2,,,4,,5,,,e,2,2a,i,n,,29,k,6j,7,2,9,r,2,2a,h,2y,d,2t,3,2,a,74,f,6t,6,,2,2,4,,,,2,3x,7,2,7,3,,s,a,14,7,,4,8,,9,b,1a,g,5i,8,5j,8,,8,2a,m,,e,3e,6,3,,,2,,7,,,1u,5,,2,,5,9n,4,9,2,,,1c,7,3,5,n,,44l,,6,f,8ug,i,1xc,5,1n,7,t4,,,1j,7,4,29,,b,2,f57,2,3mp,1a,2,n,f2,5,3,6,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,2s,,4g,7,af,,1p,4,e4,4,72,2,6r,,2,,7,2,5,,d6,7,31,7,240,5`.split(`,`).map(e=>e?parseInt(e,36):1);for(let t=0,n=0;t<e.length;t++)(t%2?PT:NT).push(n+=e[t])})();function FT(e){if(e<768)return!1;for(let t=0,n=NT.length;;){let r=t+n>>1;if(e<NT[r])n=r;else if(e>=PT[r])t=r+1;else return!0;if(t==n)return!1}}function IT(e){return e>=127462&&e<=127487}var LT=8205;function RT(e,t,n=!0,r=!0){return(n?zT:BT)(e,t,r)}function zT(e,t,n){if(t==e.length)return t;t&&HT(e.charCodeAt(t))&&UT(e.charCodeAt(t-1))&&t--;let r=VT(e,t);for(t+=WT(r);t<e.length;){let i=VT(e,t);if(r==LT||i==LT||n&&FT(i))t+=WT(i),r=i;else if(IT(i)){let n=0,r=t-2;for(;r>=0&&IT(VT(e,r));)n++,r-=2;if(n%2==0)break;t+=2}else break}return t}function BT(e,t,n){for(;t>1;){let r=zT(e,t-2,n);if(r<t)return r;t--}return 0}function VT(e,t){let n=e.charCodeAt(t);if(!UT(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return HT(r)?(n-55296<<10)+(r-56320)+65536:n}function HT(e){return e>=56320&&e<57344}function UT(e){return e>=55296&&e<56320}function WT(e){return e<65536?1:2}var GT=class e{lineAt(e){if(e<0||e>this.length)throw RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){[e,t]=tE(this,e,t);let r=[];return this.decompose(0,e,r,2),n.length&&n.decompose(0,n.length,r,3),this.decompose(t,this.length,r,1),qT.from(r,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=tE(this,e,t);let n=[];return this.decompose(e,t,n,0),qT.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),r=new ZT(this),i=new ZT(e);for(let e=t,a=t;;){if(r.next(e),i.next(e),e=0,r.lineBreak!=i.lineBreak||r.done!=i.done||r.value!=i.value)return!1;if(a+=r.value.length,r.done||a>=n)return!0}}iter(e=1){return new ZT(this,e)}iterRange(e,t=this.length){return new QT(this,e,t)}iterLines(e,t){let n;if(e==null)n=this.iter();else{t??=this.lines+1;let r=this.line(e).from;n=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new $T(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(t){if(t.length==0)throw RangeError(`A document must have at least one line`);return t.length==1&&!t[0]?e.empty:t.length<=32?new KT(t):qT.from(KT.split(t,[]))}},KT=class e extends GT{constructor(e,t=JT(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,r){for(let i=0;;i++){let a=this.text[i],o=r+a.length;if((t?n:o)>=e)return new eE(r,o,n,a);r=o+1,n++}}decompose(t,n,r,i){let a=t<=0&&n>=this.length?this:new e(XT(this.text,t,n),Math.min(n,this.length)-Math.max(0,t));if(i&1){let t=r.pop(),n=YT(a.text,t.text.slice(),0,a.length);if(n.length<=32)r.push(new e(n,t.length+a.length));else{let t=n.length>>1;r.push(new e(n.slice(0,t)),new e(n.slice(t)))}}else r.push(a)}replace(t,n,r){if(!(r instanceof e))return super.replace(t,n,r);[t,n]=tE(this,t,n);let i=YT(this.text,YT(r.text,XT(this.text,0,t)),n),a=this.length+r.length-(n-t);return i.length<=32?new e(i,a):qT.from(e.split(i,[]),a)}sliceString(e,t=this.length,n=`
29
29
  `){[e,t]=tE(this,e,t);let r=``;for(let i=0,a=0;i<=t&&a<this.text.length;a++){let o=this.text[a],s=i+o.length;i>e&&a&&(r+=n),e<s&&t>i&&(r+=o.slice(Math.max(0,e-i),t-i)),i=s+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(t,n){let r=[],i=-1;for(let a of t)r.push(a),i+=a.length+1,r.length==32&&(n.push(new e(r,i)),r=[],i=-1);return i>-1&&n.push(new e(r,i)),n}},qT=class e extends GT{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let t of e)this.lines+=t.lines}lineInner(e,t,n,r){for(let i=0;;i++){let a=this.children[i],o=r+a.length,s=n+a.lines-1;if((t?s:o)>=e)return a.lineInner(e,t,n,r);r=o+1,n=s+1}}decompose(e,t,n,r){for(let i=0,a=0;a<=t&&i<this.children.length;i++){let o=this.children[i],s=a+o.length;if(e<=s&&t>=a){let i=r&(a<=e|(s>=t?2:0));a>=e&&s<=t&&!i?n.push(o):o.decompose(e-a,t-a,n,i)}a=s+1}}replace(t,n,r){if([t,n]=tE(this,t,n),r.lines<this.lines)for(let i=0,a=0;i<this.children.length;i++){let o=this.children[i],s=a+o.length;if(t>=a&&n<=s){let c=o.replace(t-a,n-a,r),l=this.lines-o.lines+c.lines;if(c.lines<l>>4&&c.lines>l>>6){let a=this.children.slice();return a[i]=c,new e(a,this.length-(n-t)+r.length)}return super.replace(a,s,c)}a=s+1}return super.replace(t,n,r)}sliceString(e,t=this.length,n=`
30
30
  `){[e,t]=tE(this,e,t);let r=``;for(let i=0,a=0;i<this.children.length&&a<=t;i++){let o=this.children[i],s=a+o.length;a>e&&i&&(r+=n),e<s&&t>a&&(r+=o.sliceString(e-a,t-a,n)),a=s+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(t,n){if(!(t instanceof e))return 0;let r=0,[i,a,o,s]=n>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;i+=n,a+=n){if(i==o||a==s)return r;let e=this.children[i],c=t.children[a];if(e!=c)return r+e.scanIdentical(c,n);r+=e.length+1}}static from(t,n=t.reduce((e,t)=>e+t.length+1,-1)){let r=0;for(let e of t)r+=e.lines;if(r<32){let e=[];for(let n of t)n.flatten(e);return new KT(e,n)}let i=Math.max(32,r>>5),a=i<<1,o=i>>1,s=[],c=0,l=-1,u=[];function d(t){let n;if(t.lines>a&&t instanceof e)for(let e of t.children)d(e);else t.lines>o&&(c>o||!c)?(f(),s.push(t)):t instanceof KT&&c&&(n=u[u.length-1])instanceof KT&&t.lines+n.lines<=32?(c+=t.lines,l+=t.length+1,u[u.length-1]=new KT(n.text.concat(t.text),n.length+1+t.length)):(c+t.lines>i&&f(),c+=t.lines,l+=t.length+1,u.push(t))}function f(){c!=0&&(s.push(u.length==1?u[0]:e.from(u,l)),l=-1,c=u.length=0)}for(let e of t)d(e);return f(),s.length==1?s[0]:new e(s,n)}};GT.empty=new KT([``],0);function JT(e){let t=-1;for(let n of e)t+=n.length+1;return t}function YT(e,t,n=0,r=1e9){for(let i=0,a=0,o=!0;a<e.length&&i<=r;a++){let s=e[a],c=i+s.length;c>=n&&(c>r&&(s=s.slice(0,r-i)),i<n&&(s=s.slice(n-i)),o?(t[t.length-1]+=s,o=!1):t.push(s)),i=c+1}return t}function XT(e,t,n){return YT(e,[``],t,n)}var ZT=class{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value=``,this.nodes=[e],this.offsets=[t>0?1:(e instanceof KT?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,r=this.nodes[n],i=this.offsets[n],a=i>>1,o=r instanceof KT?r.text.length:r.children.length;if(a==(t>0?o:0)){if(n==0)return this.done=!0,this.value=``,this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((i&1)==(t>0?0:1)){if(this.offsets[n]+=t,e==0)return this.lineBreak=!0,this.value=`
31
31
  `,this;e--}else if(r instanceof KT){let i=r.text[a+(t<0?-1:0)];if(this.offsets[n]+=t,i.length>Math.max(0,e))return this.value=e==0?i:t>0?i.slice(e):i.slice(0,i.length-e),this;e-=i.length}else{let i=r.children[a+(t<0?-1:0)];e>i.length?(e-=i.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(i),this.offsets.push(t>0?1:(i instanceof KT?i.text.length:i.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}},QT=class{constructor(e,t,n){this.value=``,this.done=!1,this.cursor=new ZT(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value=``,this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=n?r:t<0?r.slice(r.length-n):r.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=``}},$T=class{constructor(e){this.inner=e,this.afterBreak=!0,this.value=``,this.done=!1}next(e=0){let{done:t,lineBreak:n,value:r}=this.inner.next(e);return t&&this.afterBreak?(this.value=``,this.afterBreak=!1):t?(this.done=!0,this.value=``):n?this.afterBreak?this.value=``:(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}};typeof Symbol<`u`&&(GT.prototype[Symbol.iterator]=function(){return this.iter()},ZT.prototype[Symbol.iterator]=QT.prototype[Symbol.iterator]=$T.prototype[Symbol.iterator]=function(){return this});var eE=class{constructor(e,t,n,r){this.from=e,this.to=t,this.number=n,this.text=r}get length(){return this.to-this.from}};function tE(e,t,n){return t=Math.max(0,Math.min(e.length,t)),[t,Math.max(t,Math.min(e.length,n))]}function nE(e,t,n=!0,r=!0){return RT(e,t,n,r)}function rE(e){return e>=56320&&e<57344}function iE(e){return e>=55296&&e<56320}function aE(e,t){let n=e.charCodeAt(t);if(!iE(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return rE(r)?(n-55296<<10)+(r-56320)+65536:n}function oE(e){return e<65536?1:2}var sE=/\r\n?|\n/,cE=(function(e){return e[e.Simple=0]=`Simple`,e[e.TrackDel=1]=`TrackDel`,e[e.TrackBefore=2]=`TrackBefore`,e[e.TrackAfter=3]=`TrackAfter`,e})(cE||={}),lE=class e{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t+1];e+=n<0?this.sections[t]:n}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,n=0,r=0;t<this.sections.length;){let i=this.sections[t++],a=this.sections[t++];a<0?(e(n,r,i),r+=i):r+=a,n+=i}}iterChangedRanges(e,t=!1){pE(this,e,t)}get invertedDesc(){let t=[];for(let e=0;e<this.sections.length;){let n=this.sections[e++],r=this.sections[e++];r<0?t.push(n,r):t.push(r,n)}return new e(t)}composeDesc(e){return this.empty?e:e.empty?this:hE(this,e)}mapDesc(e,t=!1){return e.empty?this:mE(this,e,t)}mapPos(e,t=-1,n=cE.Simple){let r=0,i=0;for(let a=0;a<this.sections.length;){let o=this.sections[a++],s=this.sections[a++],c=r+o;if(s<0){if(c>e)return i+(e-r);i+=o}else{if(n!=cE.Simple&&c>=e&&(n==cE.TrackDel&&r<e&&c>e||n==cE.TrackBefore&&r<e||n==cE.TrackAfter&&c>e))return null;if(c>e||c==e&&t<0&&!o)return e==r||t<0?i:i+s;i+=s}r=c}if(e>r)throw RangeError(`Position ${e} is out of range for changeset of length ${r}`);return i}touchesRange(e,t=e){for(let n=0,r=0;n<this.sections.length&&r<=t;){let i=this.sections[n++],a=this.sections[n++],o=r+i;if(a>=0&&r<=t&&o>=e)return r<e&&o>t?`cover`:!0;r=o}return!1}toString(){let e=``;for(let t=0;t<this.sections.length;){let n=this.sections[t++],r=this.sections[t++];e+=(e?` `:``)+n+(r>=0?`:`+r:``)}return e}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some(e=>typeof e!=`number`))throw RangeError(`Invalid JSON representation of ChangeDesc`);return new e(t)}static create(t){return new e(t)}},uE=class e extends lE{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw RangeError(`Applying change set to a document with the wrong length`);return pE(this,(t,n,r,i,a)=>e=e.replace(r,r+(n-t),a),!1),e}mapDesc(e,t=!1){return mE(this,e,t,!0)}invert(t){let n=this.sections.slice(),r=[];for(let e=0,i=0;e<n.length;e+=2){let a=n[e],o=n[e+1];if(o>=0){n[e]=o,n[e+1]=a;let s=e>>1;for(;r.length<s;)r.push(GT.empty);r.push(a?t.slice(i,i+a):GT.empty)}i+=a}return new e(n,r)}compose(e){return this.empty?e:e.empty?this:hE(this,e,!0)}map(e,t=!1){return e.empty?this:mE(this,e,t,!0)}iterChanges(e,t=!1){pE(this,e,t)}get desc(){return lE.create(this.sections)}filter(t){let n=[],r=[],i=[],a=new gE(this);done:for(let e=0,o=0;;){let s=e==t.length?1e9:t[e++];for(;o<s||o==s&&a.len==0;){if(a.done)break done;let e=Math.min(a.len,s-o);dE(i,e,-1);let t=a.ins==-1?-1:a.off==0?a.ins:0;dE(n,e,t),t>0&&fE(r,n,a.text),a.forward(e),o+=e}let c=t[e++];for(;o<c;){if(a.done)break done;let e=Math.min(a.len,c-o);dE(n,e,-1),dE(i,e,a.ins==-1?-1:a.off==0?a.ins:0),a.forward(e),o+=e}}return{changes:new e(n,r),filtered:lE.create(i)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t],r=this.sections[t+1];r<0?e.push(n):r==0?e.push([n]):e.push([n].concat(this.inserted[t>>1].toJSON()))}return e}static of(t,n,r){let i=[],a=[],o=0,s=null;function c(t=!1){if(!t&&!i.length)return;o<n&&dE(i,n-o,-1);let r=new e(i,a);s=s?s.compose(r.map(s)):r,i=[],a=[],o=0}function l(t){if(Array.isArray(t))for(let e of t)l(e);else if(t instanceof e){if(t.length!=n)throw RangeError(`Mismatched change set length (got ${t.length}, expected ${n})`);c(),s=s?s.compose(t.map(s)):t}else{let{from:e,to:s=e,insert:l}=t;if(e>s||e<0||s>n)throw RangeError(`Invalid change range ${e} to ${s} (in doc of length ${n})`);let u=l?typeof l==`string`?GT.of(l.split(r||sE)):l:GT.empty,d=u.length;if(e==s&&d==0)return;e<o&&c(),e>o&&dE(i,e-o,-1),dE(i,s-e,d),fE(a,i,u),o=s}}return l(t),c(!s),s}static empty(t){return new e(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw RangeError(`Invalid JSON representation of ChangeSet`);let n=[],r=[];for(let e=0;e<t.length;e++){let i=t[e];if(typeof i==`number`)n.push(i,-1);else if(!Array.isArray(i)||typeof i[0]!=`number`||i.some((e,t)=>t&&typeof e!=`string`))throw RangeError(`Invalid JSON representation of ChangeSet`);else if(i.length==1)n.push(i[0],0);else{for(;r.length<e;)r.push(GT.empty);r[e]=GT.of(i.slice(1)),n.push(i[0],r[e].length)}}return new e(n,r)}static createSet(t,n){return new e(t,n)}};function dE(e,t,n,r=!1){if(t==0&&n<=0)return;let i=e.length-2;i>=0&&n<=0&&n==e[i+1]?e[i]+=t:i>=0&&t==0&&e[i]==0?e[i+1]+=n:r?(e[i]+=t,e[i+1]+=n):e.push(t,n)}function fE(e,t,n){if(n.length==0)return;let r=t.length-2>>1;if(r<e.length)e[e.length-1]=e[e.length-1].append(n);else{for(;e.length<r;)e.push(GT.empty);e.push(n)}}function pE(e,t,n){let r=e.inserted;for(let i=0,a=0,o=0;o<e.sections.length;){let s=e.sections[o++],c=e.sections[o++];if(c<0)i+=s,a+=s;else{let l=i,u=a,d=GT.empty;for(;l+=s,u+=c,c&&r&&(d=d.append(r[o-2>>1])),!(n||o==e.sections.length||e.sections[o+1]<0);)s=e.sections[o++],c=e.sections[o++];t(i,l,a,u,d),i=l,a=u}}}function mE(e,t,n,r=!1){let i=[],a=r?[]:null,o=new gE(e),s=new gE(t);for(let e=-1;;)if(o.done&&s.len||s.done&&o.len)throw Error(`Mismatched change set lengths`);else if(o.ins==-1&&s.ins==-1){let e=Math.min(o.len,s.len);dE(i,e,-1),o.forward(e),s.forward(e)}else if(s.ins>=0&&(o.ins<0||e==o.i||o.off==0&&(s.len<o.len||s.len==o.len&&!n))){let t=s.len;for(dE(i,s.ins,-1);t;){let n=Math.min(o.len,t);o.ins>=0&&e<o.i&&o.len<=n&&(dE(i,0,o.ins),a&&fE(a,i,o.text),e=o.i),o.forward(n),t-=n}s.next()}else if(o.ins>=0){let t=0,n=o.len;for(;n;)if(s.ins==-1){let e=Math.min(n,s.len);t+=e,n-=e,s.forward(e)}else if(s.ins==0&&s.len<n)n-=s.len,s.next();else break;dE(i,t,e<o.i?o.ins:0),a&&e<o.i&&fE(a,i,o.text),e=o.i,o.forward(o.len-n)}else if(o.done&&s.done)return a?uE.createSet(i,a):lE.create(i);else throw Error(`Mismatched change set lengths`)}function hE(e,t,n=!1){let r=[],i=n?[]:null,a=new gE(e),o=new gE(t);for(let e=!1;;)if(a.done&&o.done)return i?uE.createSet(r,i):lE.create(r);else if(a.ins==0)dE(r,a.len,0,e),a.next();else if(o.len==0&&!o.done)dE(r,0,o.ins,e),i&&fE(i,r,o.text),o.next();else if(a.done||o.done)throw Error(`Mismatched change set lengths`);else{let t=Math.min(a.len2,o.len),n=r.length;if(a.ins==-1){let n=o.ins==-1?-1:o.off?0:o.ins;dE(r,t,n,e),i&&n&&fE(i,r,o.text)}else o.ins==-1?(dE(r,a.off?0:a.len,t,e),i&&fE(i,r,a.textBit(t))):(dE(r,a.off?0:a.len,o.off?0:o.ins,e),i&&!o.off&&fE(i,r,o.text));e=(a.ins>t||o.ins>=0&&o.len>t)&&(e||r.length>n),a.forward2(t),o.forward(t)}}var gE=class{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?GT.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?GT.empty:t[n].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}},_E=class e{constructor(e,t,n,r){this.from=e,this.to=t,this.flags=n,this.goalColumn=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get undirectional(){return(this.flags&64)>0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}map(t,n=-1){let r,i;return this.empty?r=i=t.mapPos(this.from,n):(r=t.mapPos(this.from,1),i=t.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new e(r,i,this.flags,this.goalColumn)}extend(e,t=e,n=0){if(e<=this.anchor&&t>=this.anchor)return G.range(e,t,void 0,void 0,n);let r=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return G.range(this.anchor,r,void 0,void 0,n)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!=`number`||typeof e.head!=`number`)throw RangeError(`Invalid JSON representation for SelectionRange`);return G.range(e.anchor,e.head)}static create(t,n,r,i){return new e(t,n,r,i)}},G=class e{constructor(e,t){this.ranges=e,this.mainIndex=t}map(t,n=-1){return t.empty?this:e.create(this.ranges.map(e=>e.map(t,n)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;n<this.ranges.length;n++)if(!this.ranges[n].eq(e.ranges[n],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new e([this.main],0)}addRange(t,n=!0){return e.create([t].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(t,n=this.mainIndex){let r=this.ranges.slice();return r[n]=t,e.create(r,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||typeof t.main!=`number`||t.main>=t.ranges.length)throw RangeError(`Invalid JSON representation for EditorSelection`);return new e(t.ranges.map(e=>_E.fromJSON(e)),t.main)}static single(t,n=t){return new e([e.range(t,n)],0)}static create(t,n=0){if(t.length==0)throw RangeError(`A selection needs at least one range`);for(let r=0,i=0;i<t.length;i++){let a=t[i];if(a.empty?a.from<=r:a.from<r)return e.normalized(t.slice(),n);r=a.to}return new e(t,n)}static cursor(e,t=0,n,r){return _E.create(e,e,(t==0?0:t<0?8:16)|(n==null?7:Math.min(6,n)),r)}static range(e,t,n,r,i){let a=r==null?7:Math.min(6,r);return!i&&e!=t&&(i=t<e?1:-1),i&&(a|=i<0?8:16),t<e?_E.create(t,e,a|32,n):_E.create(e,t,a,n)}static undirectionalRange(e,t){return _E.create(e,t,64,void 0)}static normalized(t,n=0){let r=t[n];t.sort((e,t)=>e.from-t.from),n=t.indexOf(r);for(let r=1;r<t.length;r++){let i=t[r],a=t[r-1];if(i.empty?i.from<=a.to:i.from<a.to){let o=a.from,s=Math.max(i.to,a.to);r<=n&&n--,t.splice(--r,2,i.anchor>i.head?e.range(s,o):e.range(o,s))}}return new e(t,n)}};function vE(e,t){for(let n of e.ranges)if(n.to>t)throw RangeError(`Selection points outside of document`)}var yE=0,K=class e{constructor(e,t,n,r,i){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=r,this.id=yE++,this.default=e([]),this.extensions=typeof i==`function`?i(this):i}get reader(){return this}static define(t={}){return new e(t.combine||(e=>e),t.compareInput||((e,t)=>e===t),t.compare||(t.combine?(e,t)=>e===t:bE),!!t.static,t.enables)}of(e){return new xE([],this,0,e)}compute(e,t){if(this.isStatic)throw Error(`Can't compute a static facet`);return new xE(e,this,1,t)}computeN(e,t){if(this.isStatic)throw Error(`Can't compute a static facet`);return new xE(e,this,2,t)}from(e,t){return t||=e=>e,this.compute([e],n=>t(n.field(e)))}};function bE(e,t){return e==t||e.length==t.length&&e.every((e,n)=>e===t[n])}var xE=class{constructor(e,t,n,r){this.dependencies=e,this.facet=t,this.type=n,this.value=r,this.id=yE++}dynamicSlot(e){let t=this.value,n=this.facet.compareInput,r=this.id,i=e[r]>>1,a=this.type==2,o=!1,s=!1,c=[];for(let t of this.dependencies)t==`doc`?o=!0:t==`selection`?s=!0:(e[t.id]??1)&1||c.push(e[t.id]);return{create(e){return e.values[i]=t(e),1},update(e,r){if(o&&r.docChanged||s&&(r.docChanged||r.selection)||CE(e,c)){let r=t(e);if(a?!SE(r,e.values[i],n):!n(r,e.values[i]))return e.values[i]=r,1}return 0},reconfigure:(e,o)=>{let s,c=o.config.address[r];if(c!=null){let r=IE(o,c);if(this.dependencies.every(t=>t instanceof K?o.facet(t)===e.facet(t):t instanceof EE?o.field(t,!1)==e.field(t,!1):!0)||(a?SE(s=t(e),r,n):n(s=t(e),r)))return e.values[i]=r,0}else s=t(e);return e.values[i]=s,1}}}get extension(){return this}};function SE(e,t,n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function CE(e,t){let n=!1;for(let r of t)FE(e,r)&1&&(n=!0);return n}function wE(e,t,n){let r=n.map(t=>e[t.id]),i=n.map(e=>e.type),a=r.filter(e=>!(e&1)),o=e[t.id]>>1;function s(e){let n=[];for(let t=0;t<r.length;t++){let a=IE(e,r[t]);if(i[t]==2)for(let e of a)n.push(e);else n.push(a)}return t.combine(n)}return{create(e){for(let t of r)FE(e,t);return e.values[o]=s(e),1},update(e,n){if(!CE(e,a))return 0;let r=s(e);return t.compare(r,e.values[o])?0:(e.values[o]=r,1)},reconfigure(e,i){let a=CE(e,r),c=i.config.facets[t.id],l=i.facet(t);if(c&&!a&&bE(n,c))return e.values[o]=l,0;let u=s(e);return t.compare(u,l)?(e.values[o]=l,0):(e.values[o]=u,1)}}}var TE=K.define({static:!0}),EE=class e{constructor(e,t,n,r,i){this.id=e,this.createF=t,this.updateF=n,this.compareF=r,this.spec=i,this.provides=void 0}static define(t){let n=new e(yE++,t.create,t.update,t.compare||((e,t)=>e===t),t);return t.provide&&(n.provides=t.provide(n)),n}create(e){return(e.facet(TE).find(e=>e.field==this)?.create||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:e=>(e.values[t]=this.create(e),1),update:(e,n)=>{let r=e.values[t],i=this.updateF(r,n);return this.compareF(r,i)?0:(e.values[t]=i,1)},reconfigure:(e,n)=>{let r=e.facet(TE),i=n.facet(TE),a;return(a=r.find(e=>e.field==this))&&a!=i.find(e=>e.field==this)?(e.values[t]=a.create(e),1):n.config.address[this.id]==null?(e.values[t]=this.create(e),1):(e.values[t]=n.field(this),0)}}}init(e){return[this,TE.of({field:this,create:e})]}get extension(){return this}},DE={lowest:4,low:3,default:2,high:1,highest:0};function OE(e){return t=>new AE(t,e)}var kE={highest:OE(DE.highest),high:OE(DE.high),default:OE(DE.default),low:OE(DE.low),lowest:OE(DE.lowest)},AE=class{constructor(e,t){this.inner=e,this.prec=t}get extension(){return this}},jE=class e{of(e){return new ME(this,e)}reconfigure(t){return e.reconfigure.of({compartment:this,extension:t})}get(e){return e.config.compartments.get(this)}},ME=class{constructor(e,t){this.compartment=e,this.inner=t}get extension(){return this}},NE=class e{constructor(e,t,n,r,i,a){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=r,this.staticValues=i,this.facets=a,this.statusTemplate=[];this.statusTemplate.length<n.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return t==null?e.default:this.staticValues[t>>1]}static resolve(t,n,r){let i=[],a=Object.create(null),o=new Map;for(let e of PE(t,n,o))e instanceof EE?i.push(e):(a[e.facet.id]||(a[e.facet.id]=[])).push(e);let s=Object.create(null),c=[],l=[];for(let e of i)s[e.id]=l.length<<1,l.push(t=>e.slot(t));let u=r?.config.facets;for(let e in a){let t=a[e],n=t[0].facet,i=u&&u[e]||[];if(t.every(e=>e.type==0)){if(s[n.id]=c.length<<1|1,bE(i,t))c.push(r.facet(n));else{let e=n.combine(t.map(e=>e.value));c.push(r&&n.compare(e,r.facet(n))?r.facet(n):e)}}else{for(let e of t)e.type==0?(s[e.id]=c.length<<1|1,c.push(e.value)):(s[e.id]=l.length<<1,l.push(t=>e.dynamicSlot(t)));s[n.id]=l.length<<1,l.push(e=>wE(e,n,t))}}let d=l.map(e=>e(s));return new e(t,o,d,s,c,a)}};function PE(e,t,n){let r=[[],[],[],[],[]],i=new Map;function a(e,o){let s=i.get(e);if(s!=null){if(s<=o)return;let t=r[s].indexOf(e);t>-1&&r[s].splice(t,1),e instanceof ME&&n.delete(e.compartment)}if(i.set(e,o),Array.isArray(e))for(let t of e)a(t,o);else if(e instanceof ME){if(n.has(e.compartment))throw RangeError(`Duplicate use of compartment in extensions`);let r=t.get(e.compartment)||e.inner;n.set(e.compartment,r),a(r,o)}else if(e instanceof AE)a(e.inner,e.prec);else if(e instanceof EE)r[o].push(e),e.provides&&a(e.provides,o);else if(e instanceof xE)r[o].push(e),e.facet.extensions&&a(e.facet.extensions,DE.default);else{let t=e.extension;if(!t)throw Error(`Unrecognized extension value in extension set (${e}).`);if(t==e)throw Error(`Unrecognized extension value in extension set (${e}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);a(t,o)}}return a(e,DE.default),r.reduce((e,t)=>e.concat(t))}function FE(e,t){if(t&1)return 2;let n=t>>1,r=e.status[n];if(r==4)throw Error(`Cyclic dependency between fields and/or facets`);if(r&2)return r;e.status[n]=4;let i=e.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|i}function IE(e,t){return t&1?e.config.staticValues[t>>1]:e.values[t>>1]}var LE=K.define(),RE=K.define({combine:e=>e.some(e=>e),static:!0}),zE=K.define({combine:e=>e.length?e[0]:void 0,static:!0}),BE=K.define(),VE=K.define(),HE=K.define(),UE=K.define({combine:e=>e.length?e[0]:!1}),WE=class{constructor(e,t){this.type=e,this.value=t}static define(){return new GE}},GE=class{of(e){return new WE(this,e)}},KE=class{constructor(e){this.map=e}of(e){return new qE(this,e)}},qE=class e{constructor(e,t){this.type=e,this.value=t}map(t){let n=this.type.map(this.value,t);return n===void 0?void 0:n==this.value?this:new e(this.type,n)}is(e){return this.type==e}static define(e={}){return new KE(e.map||(e=>e))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let r of e){let e=r.map(t);e&&n.push(e)}return n}};qE.reconfigure=qE.define(),qE.appendConfig=qE.define();var JE=class e{constructor(t,n,r,i,a,o){this.startState=t,this.changes=n,this.selection=r,this.effects=i,this.annotations=a,this.scrollIntoView=o,this._doc=null,this._state=null,r&&vE(r,n.newLength),a.some(t=>t.type==e.time)||(this.annotations=a.concat(e.time.of(Date.now())))}static create(t,n,r,i,a,o){return new e(t,n,r,i,a,o)}get newDoc(){return this._doc||=this.changes.apply(this.startState.doc)}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let n=this.annotation(e.userEvent);return!!(n&&(n==t||n.length>t.length&&n.slice(0,t.length)==t&&n[t.length]==`.`))}};JE.time=WE.define(),JE.userEvent=WE.define(),JE.addToHistory=WE.define(),JE.remote=WE.define();function YE(e,t){let n=[];for(let r=0,i=0;;){let a,o;if(r<e.length&&(i==t.length||t[i]>=e[r]))a=e[r++],o=e[r++];else if(i<t.length)a=t[i++],o=t[i++];else return n;!n.length||n[n.length-1]<a?n.push(a,o):n[n.length-1]<o&&(n[n.length-1]=o)}}function XE(e,t,n){let r,i,a;return n?(r=t.changes,i=uE.empty(t.changes.length),a=e.changes.compose(t.changes)):(r=t.changes.map(e.changes),i=e.changes.mapDesc(t.changes,!0),a=e.changes.compose(r)),{changes:a,selection:t.selection?t.selection.map(i):e.selection?.map(r),effects:qE.mapEffects(e.effects,r).concat(qE.mapEffects(t.effects,i)),annotations:e.annotations.length?e.annotations.concat(t.annotations):t.annotations,scrollIntoView:e.scrollIntoView||t.scrollIntoView}}function ZE(e,t,n){let r=t.selection,i=nD(t.annotations);return t.userEvent&&(i=i.concat(JE.userEvent.of(t.userEvent))),{changes:t.changes instanceof uE?t.changes:uE.of(t.changes||[],n,e.facet(zE)),selection:r&&(r instanceof G?r:G.single(r.anchor,r.head)),effects:nD(t.effects),annotations:i,scrollIntoView:!!t.scrollIntoView}}function QE(e,t,n){let r=ZE(e,t.length?t[0]:{},e.doc.length);t.length&&t[0].filter===!1&&(n=!1);for(let i=1;i<t.length;i++){t[i].filter===!1&&(n=!1);let a=!!t[i].sequential;r=XE(r,ZE(e,t[i],a?r.changes.newLength:e.doc.length),a)}let i=JE.create(e,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return eD(n?$E(i):i)}function $E(e){let t=e.startState,n=!0;for(let r of t.facet(BE)){let t=r(e);if(t===!1){n=!1;break}Array.isArray(t)&&(n=n===!0?t:YE(n,t))}if(n!==!0){let r,i;if(n===!1)i=e.changes.invertedDesc,r=uE.empty(t.doc.length);else{let t=e.changes.filter(n);r=t.changes,i=t.filtered.mapDesc(t.changes).invertedDesc}e=JE.create(t,r,e.selection&&e.selection.map(i),qE.mapEffects(e.effects,i),e.annotations,e.scrollIntoView)}let r=t.facet(VE);for(let n=r.length-1;n>=0;n--){let i=r[n](e);e=i instanceof JE?i:Array.isArray(i)&&i.length==1&&i[0]instanceof JE?i[0]:QE(t,nD(i),!1)}return e}function eD(e){let t=e.startState,n=t.facet(HE),r=e;for(let i=n.length-1;i>=0;i--){let a=n[i](e);a&&Object.keys(a).length&&(r=XE(r,ZE(t,a,e.changes.newLength),!0))}return r==e?e:JE.create(t,e.changes,e.selection,r.effects,r.annotations,r.scrollIntoView)}var tD=[];function nD(e){return e==null?tD:Array.isArray(e)?e:[e]}var rD=(function(e){return e[e.Word=0]=`Word`,e[e.Space=1]=`Space`,e[e.Other=2]=`Other`,e})(rD||={}),iD=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,aD;try{aD=RegExp(`[\\p{Alphabetic}\\p{Number}_]`,`u`)}catch{}function oD(e){if(aD)return aD.test(e);for(let t=0;t<e.length;t++){let n=e[t];if(/\w/.test(n)||n>`€`&&(n.toUpperCase()!=n.toLowerCase()||iD.test(n)))return!0}return!1}function sD(e){return t=>{if(!/\S/.test(t))return rD.Space;if(oD(t))return rD.Word;for(let n=0;n<e.length;n++)if(t.indexOf(e[n])>-1)return rD.Word;return rD.Other}}var cD=class e{constructor(e,t,n,r,i,a){this.config=e,this.doc=t,this.selection=n,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=i,a&&(a._state=this);for(let e=0;e<this.config.dynamicSlots.length;e++)FE(this,e<<1);this.computeSlot=null}field(e,t=!0){let n=this.config.address[e.id];if(n==null){if(t)throw RangeError(`Field is not present in this state`)}else return FE(this,n),IE(this,n)}update(...e){return QE(this,e,!0)}applyTransaction(t){let n=this.config,{base:r,compartments:i}=n;for(let e of t.effects)e.is(jE.reconfigure)?(n&&=(i=new Map,n.compartments.forEach((e,t)=>i.set(t,e)),null),i.set(e.value.compartment,e.value.extension)):e.is(qE.reconfigure)?(n=null,r=e.value):e.is(qE.appendConfig)&&(n=null,r=nD(r).concat(e.value));let a;n?a=t.startState.values.slice():(n=NE.resolve(r,i,this),a=new e(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(e,t)=>t.reconfigure(e,this),null).values);let o=t.startState.facet(RE)?t.newSelection:t.newSelection.asSingle();new e(n,t.newDoc,o,a,(e,n)=>n.update(e,t),t)}replaceSelection(e){return typeof e==`string`&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:G.cursor(t.from+e.length,-1)}))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),r=this.changes(n.changes),i=[n.range],a=nD(n.effects);for(let n=1;n<t.ranges.length;n++){let o=e(t.ranges[n]),s=this.changes(o.changes),c=s.map(r);for(let e=0;e<n;e++)i[e]=i[e].map(c);let l=r.mapDesc(s,!0);i.push(o.range.map(l)),r=r.compose(c),a=qE.mapEffects(a,c).concat(qE.mapEffects(nD(o.effects),l))}return{changes:r,selection:G.create(i,t.mainIndex),effects:a}}changes(t=[]){return t instanceof uE?t:uE.of(t,this.doc.length,this.facet(e.lineSeparator))}toText(t){return GT.of(t.split(this.facet(e.lineSeparator)||sE))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return t==null?e.default:(FE(this,t),IE(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let n in e){let r=e[n];r instanceof EE&&this.config.address[r.id]!=null&&(t[n]=r.spec.toJSON(this.field(e[n]),this))}return t}static fromJSON(t,n={},r){if(!t||typeof t.doc!=`string`)throw RangeError(`Invalid JSON representation for EditorState`);let i=[];if(r){for(let e in r)if(Object.prototype.hasOwnProperty.call(t,e)){let n=r[e],a=t[e];i.push(n.init(e=>n.spec.fromJSON(a,e)))}}return e.create({doc:t.doc,selection:G.fromJSON(t.selection),extensions:n.extensions?i.concat([n.extensions]):i})}static create(t={}){let n=NE.resolve(t.extensions||[],new Map),r=t.doc instanceof GT?t.doc:GT.of((t.doc||``).split(n.staticFacet(e.lineSeparator)||sE)),i=t.selection?t.selection instanceof G?t.selection:G.single(t.selection.anchor,t.selection.head):G.single(0);return vE(i,r.length),n.staticFacet(RE)||(i=i.asSingle()),new e(n,r,i,n.dynamicSlots.map(()=>null),(e,t)=>t.create(e),null)}get tabSize(){return this.facet(e.tabSize)}get lineBreak(){return this.facet(e.lineSeparator)||`
@@ -5,7 +5,7 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <link rel="icon" href="https://img.soybeanjs.dev/logo-ubean.svg?v=202608192144" type="image/svg+xml" />
7
7
  <title>Ubean DevTools</title>
8
- <script type="module" crossorigin src="./assets/index-C-7ywK8q.js"></script>
8
+ <script type="module" crossorigin src="./assets/index-BPu7ugSA.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="./assets/index-DtJRaHHQ.css">
10
10
  </head>
11
11
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ubean/devtools",
3
- "version": "0.7.9",
3
+ "version": "0.7.11",
4
4
  "description": "DevTools for the ubean framework — server middleware, RPC, and the iframe SPA client",
5
5
  "files": [
6
6
  "dist"
@@ -31,16 +31,16 @@
31
31
  "@devframes/hub-ui": "^1.2.6",
32
32
  "@devframes/vite": "^1.2.6",
33
33
  "@soybeanjs/unocss-preset": "^0.2.0",
34
- "@types/node": "^26.6.5",
35
- "@vean/ui": "^0.51.2",
36
- "@vean/unocss": "^0.51.2",
34
+ "@types/node": "^26.6.6",
35
+ "@vean/ui": "^0.51.3",
36
+ "@vean/unocss": "^0.51.3",
37
37
  "@vitejs/plugin-vue": "^6.0.10",
38
38
  "@xterm/addon-fit": "^0.11.0",
39
39
  "@xterm/xterm": "^6.0.0",
40
40
  "devframe": "^1.2.6",
41
- "hono": "4.13.13",
41
+ "hono": "4.13.14",
42
42
  "typescript": "npm:typescript-native-bridge@latest",
43
- "unocss": "^66.11.0",
43
+ "unocss": "^66.12.0",
44
44
  "vite": "npm:@voidzero-dev/vite-plus-core@1.4.0",
45
45
  "vite-plus": "1.4.0",
46
46
  "vue": "^3.5.44"
@@ -58,8 +58,8 @@
58
58
  }
59
59
  },
60
60
  "optionalDependencies": {
61
- "@ai-sdk/openai-compatible": "3.0.77",
62
- "ai": "7.0.152"
61
+ "@ai-sdk/openai-compatible": "3.0.80",
62
+ "ai": "7.0.156"
63
63
  },
64
64
  "scripts": {
65
65
  "build": "pnpm run build:server && pnpm run build:client",