@stacksjs/composables 0.70.84 → 0.70.86
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/package.json +3 -2
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
function A(J){if(J&&typeof J==="object"&&"value"in J&&"subscribe"in J)return J.value;return J}function R(J){if(typeof J==="function")return J();return A(J)}function b(J){return J!==null&&typeof J==="object"&&"value"in J&&"subscribe"in J}function D(){}function x(){return typeof window<"u"?window:void 0}function JJ(){return typeof document<"u"?document:void 0}function NJ(){return typeof navigator<"u"?navigator:void 0}var nJ=new Map;function h9(J){return nJ.get(J)}function f9(J,Q){nJ.set(J,Q)}var v9="stx-storage";import{onUnmounted as m9,ref as p9,watch as d9}from"@stacksjs/stx";function $J(J,Q,Z,G){let $=Z??(typeof localStorage<"u"?localStorage:void 0),K=G?.serializer??{read:(M)=>{try{return JSON.parse(M)}catch{return M}},write:(M)=>JSON.stringify(M)},z=Q;if($)try{let M=$.getItem(J);if(M!==null)z=K.read(M)}catch{}let q=p9(z);if(d9(q,(M)=>{if(!$)return;try{if(M===null||M===void 0)$.removeItem(J);else $.setItem(J,K.write(M))}catch(B){let Y=B?.name??"",X=B?.message??String(B);if(Y==="QuotaExceededError"||/quota/i.test(X))console.warn(`[useStorage] ${J}: storage quota exceeded \u2014 value not persisted.`);else console.warn(`[useStorage] ${J}: failed to persist value \u2014 ${X}`)}}),typeof window<"u"){let M=(B)=>{if(B.key!==J||B.storageArea!==$)return;if(B.newValue===null)q.value=Q;else try{q.value=K.read(B.newValue)}catch{q.value=Q}};window.addEventListener("storage",M),m9(()=>window.removeEventListener("storage",M))}return q}function u9(J,Q,Z){return $J(J,Q,typeof localStorage<"u"?localStorage:void 0,Z)}function c9(J,Q,Z){return $J(J,Q,typeof sessionStorage<"u"?sessionStorage:void 0,Z)}import{onUnmounted as l9,ref as oJ,watch as i9}from"@stacksjs/stx";function aJ(){let J=oJ(!1);if(typeof window<"u"&&window.matchMedia){let Q=window.matchMedia("(prefers-color-scheme: dark)");J.value=Q.matches;let Z=(G)=>{J.value=G.matches};Q.addEventListener("change",Z);try{l9(()=>{Q.removeEventListener("change",Z)})}catch{}}return J}function r9(){let Q=aJ().value;if(typeof localStorage<"u"){let G=localStorage.getItem("color-scheme");if(G==="dark")Q=!0;else if(G==="light")Q=!1}let Z=oJ(Q);if(i9(Z,(G)=>{if(typeof document<"u")document.documentElement.classList.toggle("dark",G);if(typeof localStorage<"u")localStorage.setItem("color-scheme",G?"dark":"light")}),typeof document<"u")document.documentElement.classList.toggle("dark",Z.value);return Z}import{onUnmounted as s9,ref as OJ,watch as DJ}from"@stacksjs/stx";function n9(J={}){let{attribute:Q="class",initialValue:Z="auto",modes:G={},storageKey:$="color-mode",selector:K}=J,z=OJ("light");if(typeof window<"u"&&window.matchMedia){let X=window.matchMedia("(prefers-color-scheme: dark)");z.value=X.matches?"dark":"light";let W=(_)=>{z.value=_.matches?"dark":"light"};X.addEventListener("change",W);try{s9(()=>{X.removeEventListener("change",W)})}catch{}}let q=Z;if(typeof localStorage<"u"){let X=localStorage.getItem($);if(X)q=X}let M=OJ(q),B=OJ(M.value==="auto"?z.value:M.value);function Y(X){if(typeof document>"u")return;let W=K?document.querySelector(K):document.documentElement;if(!W)return;let _=G[X]??X;if(Q==="class"){let H=["dark","light",...Object.keys(G),...Object.values(G)];for(let F of H)W.classList.remove(F);if(_)W.classList.add(_)}else W.setAttribute(Q,_)}return DJ(M,(X)=>{if(typeof localStorage<"u")localStorage.setItem($,X);B.value=X==="auto"?z.value:X}),DJ(z,(X)=>{if(M.value==="auto")B.value=X}),DJ(B,(X)=>{Y(X)}),Y(B.value),{mode:B,system:z,store:M}}import{onUnmounted as o9,ref as a9}from"@stacksjs/stx";function t9(){let J=a9("no-preference");if(typeof window>"u"||!window.matchMedia)return J;let Q=window.matchMedia("(prefers-color-scheme: dark)"),Z=window.matchMedia("(prefers-color-scheme: light)");function G(){if(Q.matches)J.value="dark";else if(Z.matches)J.value="light";else J.value="no-preference"}G(),Q.addEventListener("change",G),Z.addEventListener("change",G);try{o9(()=>{Q.removeEventListener("change",G),Z.removeEventListener("change",G)})}catch{}return J}import{onUnmounted as e9,ref as J$}from"@stacksjs/stx";function $$(){let J=J$("no-preference");if(typeof window>"u"||!window.matchMedia)return J;let Q=window.matchMedia("(prefers-contrast: more)"),Z=window.matchMedia("(prefers-contrast: less)"),G=window.matchMedia("(prefers-contrast: custom)");function $(){if(Q.matches)J.value="more";else if(Z.matches)J.value="less";else if(G.matches)J.value="custom";else J.value="no-preference"}$(),Q.addEventListener("change",$),Z.addEventListener("change",$),G.addEventListener("change",$);try{e9(()=>{Q.removeEventListener("change",$),Z.removeEventListener("change",$),G.removeEventListener("change",$)})}catch{}return J}import{onUnmounted as Q$,ref as Z$}from"@stacksjs/stx";function G$(){let J=Z$("no-preference");if(typeof window>"u"||!window.matchMedia)return J;let Q=window.matchMedia("(prefers-reduced-motion: reduce)");function Z(){J.value=Q.matches?"reduce":"no-preference"}Z(),Q.addEventListener("change",Z);try{Q$(()=>{Q.removeEventListener("change",Z)})}catch{}return J}import{onUnmounted as K$,ref as z$}from"@stacksjs/stx";function q$(){let J=z$(typeof navigator<"u"?navigator.onLine:!0);if(typeof window<"u"){let Q=()=>{J.value=!0},Z=()=>{J.value=!1};window.addEventListener("online",Q),window.addEventListener("offline",Z);try{K$(()=>{window.removeEventListener("online",Q),window.removeEventListener("offline",Z)})}catch{}}return J}import{onUnmounted as tJ,ref as v}from"@stacksjs/stx";function M$(){let J=v(typeof navigator<"u"&&"connection"in navigator),Q=v(typeof navigator<"u"?navigator.onLine:!0),Z=v(void 0),G=v(void 0),$=v(void 0),K=v(void 0),z=v(void 0),q=v(void 0),M=v(void 0),B=v(void 0);function Y(){if(!J.value)return;let X=navigator.connection;if(X)$.value=X.downlink,K.value=X.downlinkMax,z.value=X.effectiveType,q.value=X.rtt,M.value=X.saveData,B.value=X.type}if(Y(),typeof window<"u"){let X=()=>{Q.value=!0,G.value=Date.now()},W=()=>{Q.value=!1,Z.value=Date.now()};window.addEventListener("online",X),window.addEventListener("offline",W);try{tJ(()=>{window.removeEventListener("online",X),window.removeEventListener("offline",W)})}catch{}if(J.value){let _=navigator.connection;if(_?.addEventListener){_.addEventListener("change",Y);try{tJ(()=>{_.removeEventListener("change",Y)})}catch{}}}}return{isSupported:J,isOnline:Q,offlineAt:Z,onlineAt:G,downlink:$,downlinkMax:K,effectiveType:z,rtt:q,saveData:M,type:B}}import{ref as X$}from"@stacksjs/stx";function B$(J=!1){let Q=typeof J==="boolean"?X$(J):J;function Z(G){if(typeof G==="boolean")Q.value=G;else Q.value=!Q.value;return Q.value}return[Q,Z]}import{ref as CJ}from"@stacksjs/stx";function PJ(J){let Q="GET",Z,G={get(){return Q="GET",Z=void 0,G},post($){return Q="POST",Z=$,G},patch($){return Q="PATCH",Z=$,G},put($){return Q="PUT",Z=$,G},delete(){return Q="DELETE",Z=void 0,G},json(){let $=CJ(null),K=CJ(null),z=CJ(!0),q={method:Q,headers:{Accept:"application/json"}};if(Z&&Q!=="GET"&&Q!=="DELETE")q.headers={...q.headers,"Content-Type":"application/json"},q.body=Z;let M={data:$,error:K},B=fetch(J,q).then(async(Y)=>{let X=await Y.json();if(Y.ok)$.value=X;else K.value=X}).catch((Y)=>{K.value=Y}).finally(()=>{z.value=!1});return{data:$,error:K,isFetching:z,then(Y){return B.then(()=>Y(M))}}}};return G}function W$(J={}){let{baseUrl:Q=""}=J;return function(Z){let G=Q?`${Q.replace(/\/$/,"")}/${Z.replace(/^\//,"")}`:Z;return PJ(G)}}import{ref as s}from"@stacksjs/stx";function QJ(J){if(J===null||typeof J!=="object")return JSON.stringify(J);if(Array.isArray(J))return`[${J.map(QJ).join(",")}]`;return`{${Object.keys(J).sort().map((Z)=>`${JSON.stringify(Z)}:${QJ(J[Z])}`).join(",")}}`}function eJ(J){return QJ(J)}function J9(J={}){let Q=new Map,Z=J.gcTime??300000,G=new Map;function $(X){return X.subscribers.size===0&&X.inflight===null}function K(X){let W=Q.get(X);if(W&&$(W))Q.delete(X);G.delete(X)}function z(X){let W=G.get(X);if(W)clearTimeout(W);if(!Number.isFinite(Z))return;if(Z<=0){K(X);return}let _=setTimeout(()=>K(X),Z);_.unref?.(),G.set(X,_)}function q(X){let W=G.get(X);if(W)clearTimeout(W),G.delete(X)}function M(X){let W=eJ(X),_=Q.get(W);if(!_)_={key:X,hash:W,data:void 0,error:null,updatedAt:0,status:"idle",inflight:null,invalidated:!1,subscribers:new Set},Q.set(W,_);return _}function B(X){let W=Q.get(X);if(!W)return;for(let _ of W.subscribers)_()}function Y(X,W){if(X.length>W.length)return!1;for(let _=0;_<X.length;_++)if(QJ(X[_])!==QJ(W[_]))return!1;return!0}return{get(X){let W=eJ(X);return Q.get(W)?.data},set(X,W){let _=M(X),H=typeof W==="function"?W(_.data):W;_.data=H,_.updatedAt=Date.now(),_.status="success",_.error=null,_.invalidated=!1,B(_.hash)},async invalidate(X){let W=Array.isArray(X)?(H)=>Y(X,H):X.predicate,_=[];for(let H of Q.values()){if(!W(H.key))continue;H.updatedAt=0,H.invalidated=!0;for(let F of H.subscribers){let L=F();if(L&&typeof L.then==="function")_.push(L)}}await Promise.all(_)},clear(){for(let X of G.values())clearTimeout(X);G.clear(),Q.clear()},gc(){let X=0;for(let[W,_]of Q)if($(_))Q.delete(W),q(W),X++;return X},_subscribe(X,W){let _=Q.get(X);if(!_)return()=>{};return q(X),_.subscribers.add(W),()=>{if(_.subscribers.delete(W),_.subscribers.size===0)z(X)}},_entry:M,_notify:B}}var $9=J9();function _$(J){let Q=J.client??$9,Z=J.staleTime??0,G=J.enabled??!0,$=Q._entry(J.queryKey),K=s($.data),z=s($.error),q=s($.data===void 0&&G),M=s(!1);function B(){if(K.value=$.data,z.value=$.error,M.value=$.status==="fetching",$.data!==void 0||$.error!==null)q.value=!1}async function Y(F){if(!F){if($.data!==void 0&&Date.now()-$.updatedAt<Z){B();return}}if($.inflight){try{await $.inflight}catch{}B();return}let L=new AbortController;if($.status="fetching",M.value=!0,$.data===void 0)q.value=!0;let C=J.queryFn({signal:L.signal}).then((U)=>{return $.data=U,$.error=null,$.updatedAt=Date.now(),$.status="success",$.invalidated=!1,U}).catch((U)=>{throw $.error=U instanceof Error?U:Error(String(U)),$.status="error",$.invalidated=!1,$.error}).finally(()=>{$.inflight=null,Q._notify($.hash)});$.inflight=C;try{await C}catch{}B()}let X=Q._subscribe($.hash,()=>{if($.invalidated&&G&&$.status!=="fetching")return Y(!0);B();return}),W=J.window??(typeof window<"u"?window:void 0),_=[];if(W&&G){let F=()=>{if($.status!=="fetching")Y(!1)};if(J.refetchOnFocus)_.push(["focus",F]);if(J.refetchOnReconnect)_.push(["online",F]);for(let[L,C]of _)W.addEventListener(L,C)}function H(){if(X(),W)for(let[F,L]of _)W.removeEventListener(F,L)}if(G)Y(!1);else B();return{data:K,error:z,isLoading:q,isFetching:M,refetch:()=>Y(!0),unsubscribe:H}}function Y$(J){let Q=s(void 0),Z=s(null),G=s(!1);async function $(K){G.value=!0,Z.value=null;let z;try{if(J.onMutate)z=await J.onMutate(K);let q=await J.mutationFn(K);return Q.value=q,await J.onSuccess?.(q,K,z),await J.onSettled?.(q,null,K,z),q}catch(q){let M=q instanceof Error?q:Error(String(q));throw Z.value=M,await J.onError?.(M,K,z),await J.onSettled?.(void 0,M,K,z),M}finally{G.value=!1}}return{data:Q,error:Z,isPending:G,mutate(K){$(K).catch(()=>{})},mutateAsync:$,reset(){Q.value=void 0,Z.value=null,G.value=!1}}}import{ref as n}from"@stacksjs/stx";function H$(J){let Q=J.validateOn??"submit",Z={...J.initialValues},G=n({...Z}),$=n({}),K=n({}),z=n({}),q=n(!1),M=n(!0),B=n(!1);function Y(O){if(O.valid)return"";if(Array.isArray(O.errors))return O.errors[0]?.message??"Invalid";for(let E of Object.values(O.errors))if(E.length>0)return E[0]?.message??"Invalid";return"Invalid"}function X(O){let E=J.schema?.[O];if(!E)return!0;let I=E.validate(G.value[O]),T=Y(I);if(T)return $.value={...$.value,[O]:T},M.value=!1,!1;if($.value[O]){let{[O]:P,...N}=$.value;$.value=N}return M.value=Object.keys($.value).length===0,!0}function W(O,E){if(G.value={...G.value,[O]:E},z.value={...z.value,[O]:E!==Z[O]},B.value=!0,Q==="change")X(O)}function _(O,E=!0){if(K.value={...K.value,[O]:E},E)B.value=!0}function H(O){let E=O,I=`${E}-error`,T=()=>{if(_(O,!0),Q==="blur"||Q==="change")X(O)};return{get value(){return G.value[O]},get error(){return $.value[E]??""},get touched(){return!!K.value[E]},get dirty(){return!!z.value[E]},errorId:I,setValue:(P)=>W(O,P),onBlur:T,validate:()=>X(O),inputProps:()=>{let P=!!$.value[E];return{name:E,value:G.value[O],onInput:(N)=>{let V=N&&typeof N==="object"&&"target"in N?N.target.value:N;W(O,V)},onBlur:T,"aria-invalid":P,"aria-describedby":P?I:void 0}}}}function F(){let O=!0;for(let E of Object.keys(J.schema??{}))if(!X(E))O=!1;return O}function L(O,E){$.value={...$.value,[O]:E},M.value=!1}function C(O){let E={...$.value},I=!1,T=Object.entries(O);for(let[P,N]of T){if(N==null)continue;let V=Array.isArray(N)?N[0]:N;if(V==null||V==="")continue;E[P]=V,I=!0}if($.value=E,I)M.value=!1}function U(O){if(O==null){$.value={},M.value=!0;return}let{[O]:E,...I}=$.value;$.value=I,M.value=Object.keys($.value).length===0}async function j(){let O={};for(let E of Object.keys(G.value))O[E]=!0;if(K.value=O,!F()){J.onError?.($.value);return}q.value=!0;try{await J.onSubmit(G.value)}catch(E){let I=E instanceof Error?E:Error(String(E));L("form",I.message),J.onError?.(I)}finally{q.value=!1}}function y(){G.value={...Z},$.value={},K.value={},z.value={},q.value=!1,M.value=!0,B.value=!1}function d(){return{type:"submit",disabled:q.value,"aria-busy":q.value}}function u(){for(let O of Object.keys(Z))if($.value[O])return O;return null}return{values:G,errors:$,touched:K,dirty:z,isSubmitting:q,isValid:M,isDirty:B,field:H,setValue:W,setError:L,setErrors:C,clearErrors:U,setTouched:_,validate:F,handleSubmit:j,reset:y,submitButtonProps:d,firstErrorField:u}}import{computed as F$,ref as A$}from"@stacksjs/stx";import{format as Q9}from"@stacksjs/datetime";function L$(J,Q){if(typeof J==="object"&&J!==null&&"value"in J&&"subscribe"in J)return F$(()=>{let G=J.value;return Q9(G instanceof Date?G:new Date(G),Q)});let Z=J instanceof Date?J:new Date(J);return A$(Q9(Z,Q))}import{onUnmounted as N$,ref as O$}from"@stacksjs/stx";function D$(J){let Q=J?.interval??1000,Z=O$(new Date),G=setInterval(()=>{Z.value=new Date},Q);try{N$(()=>clearInterval(G))}catch{}return Z}import{onUnmounted as C$,ref as P$}from"@stacksjs/stx";function E$(J={}){let{offset:Q=0,interval:Z=1000,immediate:G=!0}=J,$=P$(Date.now()+Q),K=null,z=null,q=!1;function M(){$.value=Date.now()+Q}function B(){if(K!==null)clearInterval(K),K=null;if(z!==null&&typeof cancelAnimationFrame<"u")cancelAnimationFrame(z),z=null;q=!1}function Y(){if(q)return;if(q=!0,M(),Z==="requestAnimationFrame"){if(typeof requestAnimationFrame<"u"){let X=()=>{if(!q)return;M(),z=requestAnimationFrame(X)};z=requestAnimationFrame(X)}}else K=setInterval(M,Z)}if(G)Y();try{C$(B)}catch{}return $}import{onUnmounted as U$,ref as j$}from"@stacksjs/stx";var EJ=1000,UJ=60*EJ,jJ=60*UJ,ZJ=24*jJ,Z9=7*ZJ,G9=30*ZJ,K9=365*ZJ;function T$(J){let Q=Math.abs(J);if(Q<5*EJ)return"just now";let Z=J<0,G,$;if(Q<UJ)G=Math.floor(Q/EJ),$="second";else if(Q<jJ)G=Math.floor(Q/UJ),$="minute";else if(Q<ZJ)G=Math.floor(Q/jJ),$="hour";else if(Q<Z9)G=Math.floor(Q/ZJ),$="day";else if(Q<G9)G=Math.floor(Q/Z9),$="week";else if(Q<K9)G=Math.floor(Q/G9),$="month";else G=Math.floor(Q/K9),$="year";let K=G!==1?"s":"";if(Z)return`in ${G} ${$}${K}`;return`${G} ${$}${K} ago`}function V$(J,Q={}){let{updateInterval:Z=30000}=Q;function G(){let q=R(J);if(q instanceof Date)return q.getTime();if(typeof q==="number")return q;return new Date(q).getTime()}function $(){let q=Date.now(),M=G(),B=q-M;return T$(B)}let K=j$($()),z=setInterval(()=>{K.value=$()},Z);try{U$(()=>clearInterval(z))}catch{}return K}import{onUnmounted as R$,watch as I$}from"@stacksjs/stx";function S$(J,Q,Z,G){let $=D,K=(q)=>{if(!q)return D;return q.addEventListener(Q,Z,G),()=>{q.removeEventListener(Q,Z,G)}};if(b(J))I$(J,(q,M)=>{$(),$=K(A(J))}),$=K(J.value);else $=K(J);let z=()=>{$(),$=D};try{R$(z)}catch{}return z}import{onUnmounted as b$}from"@stacksjs/stx";var TJ=new Map;function x$(J){if(!TJ.has(J))TJ.set(J,new Set);let Q=TJ.get(J),Z=[];function G(M){return Q.add(M),Z.push(M),()=>z(M)}function $(M){let B=(Y)=>{M(Y),z(B)};return G(B)}function K(M){for(let B of Q)B(M)}function z(M){Q.delete(M);let B=Z.indexOf(M);if(B!==-1)Z.splice(B,1)}function q(){Q.clear(),Z.length=0}try{b$(()=>{for(let M of Z)Q.delete(M);Z.length=0})}catch{}return{on:G,once:$,emit:K,off:z,reset:q}}function GJ(){let J=new Set;function Q($){return J.add($),{off:()=>J.delete($)}}function Z($){J.delete($)}function G($){for(let K of J)K($)}return{on:Q,off:Z,trigger:G}}function y$(J,Q=200){let Z=null,G=function(...$){if(Z!==null)clearTimeout(Z);Z=setTimeout(()=>{Z=null,J.apply(this,$)},Q)};return G.cancel=()=>{if(Z!==null)clearTimeout(Z),Z=null},G}function w$(J,Q=200){let Z=0,G=null,$=null,K=null,z=function(...q){let M=Date.now(),B=M-Z;if(B>=Q){if(Z=M,G!==null)clearTimeout(G),G=null;J.apply(this,q)}else if($=q,K=this,G===null)G=setTimeout(()=>{if(Z=Date.now(),G=null,$!==null)J.apply(K,$),$=null,K=null},Q-B)};return z.cancel=()=>{if(G!==null)clearTimeout(G),G=null;$=null,K=null},z}import{ref as z9,watch as k$}from"@stacksjs/stx";function VJ(J,Q=200){let Z=z9(J),G=z9(J),$=null;return k$(Z,(K)=>{if($!==null)clearTimeout($);$=setTimeout(()=>{G.value=K,$=null},Q)}),{get value(){return G.value},set value(K){Z.value=K},subscribe:G.subscribe}}import{ref as q9,watch as g$}from"@stacksjs/stx";function RJ(J,Q=200){let Z=q9(J),G=q9(J),$=0,K=null;return g$(Z,(z)=>{let q=Date.now(),M=q-$;if(M>=Q){if($=q,G.value=z,K!==null)clearTimeout(K),K=null}else if(K===null)K=setTimeout(()=>{$=Date.now(),G.value=Z.value,K=null},Q-M)}),{get value(){return G.value},set value(z){Z.value=z},subscribe:G.subscribe}}import{ref as h$,watch as f$}from"@stacksjs/stx";function v$(J,Q=200){let Z=h$(A(J)),G=null;if(b(J))f$(J,($)=>{if(G!==null)clearTimeout(G);G=setTimeout(()=>{Z.value=$,G=null},Q)});return Z}import{ref as m$,watch as p$}from"@stacksjs/stx";function d$(J,Q=200){let Z=m$(A(J)),G=0,$=null;if(b(J))p$(J,(K)=>{let z=Date.now(),q=z-G;if(q>=Q)Z.value=K,G=z;else{if($!==null)clearTimeout($);$=setTimeout(()=>{Z.value=J.value,G=Date.now(),$=null},Q-q)}});return Z}import{onUnmounted as u$,ref as c$}from"@stacksjs/stx";function l$(J=1000,Q={}){let{controls:Z=!1,immediate:G=!0}=Q,$=c$(0),K=null;function z(){if(K!==null)clearInterval(K),K=null}function q(){if(K!==null)return;K=setInterval(()=>{$.value++},J)}function M(){if($.value=0,z(),G)q()}if(G)q();try{u$(z)}catch{}if(Z)return{counter:$,pause:z,resume:q,reset:M};return $}import{onUnmounted as i$,ref as r$}from"@stacksjs/stx";function s$(J,Q=1000,Z={}){let{immediate:G=!0}=Z,$=r$(!1),K=null;function z(){if(K!==null)clearInterval(K),K=null;$.value=!1}function q(){if(K!==null)return;$.value=!0,K=setInterval(J,Q)}if(G)q();try{i$(z)}catch{}return{pause:z,resume:q,isActive:$}}import{onUnmounted as n$,ref as o$}from"@stacksjs/stx";function a$(J=1000,Q={}){let{controls:Z=!1,immediate:G=!0}=Q,$=o$(!1),K=null;function z(){if(K!==null)clearTimeout(K),K=null;$.value=!1}function q(){z(),K=setTimeout(()=>{$.value=!0,K=null},J)}if(G)q();try{n$(()=>{if(K!==null)clearTimeout(K),K=null})}catch{}if(Z)return{ready:$,start:q,stop:z};return $}import{onUnmounted as t$,ref as e$}from"@stacksjs/stx";function J6(J,Q=1000,Z={}){let{immediate:G=!0}=Z,$=e$(!1),K=null;function z(){if(K!==null)clearTimeout(K),K=null;$.value=!1}function q(){z(),$.value=!0,K=setTimeout(()=>{K=null,$.value=!1,J()},Q)}if(G)q();try{t$(z)}catch{}return{start:q,stop:z,isPending:$}}import{onUnmounted as $6,ref as Q6}from"@stacksjs/stx";function Z6(J,Q,Z){let{immediate:G=!0}=Z??{},$=Q6(!1),K=null;async function z(){if(!$.value)return;try{await J()}catch{}if($.value)K=setTimeout(z,Q)}function q(){if($.value)return;$.value=!0,z()}function M(){if($.value=!1,K!==null)clearTimeout(K),K=null}if(G)q();try{$6(()=>M())}catch{}return{isActive:$,pause:M,resume:q}}import{onUnmounted as G6,ref as K6}from"@stacksjs/stx";function z6(J,Q={}){let{immediate:Z=!0}=Q,G=K6(!1),$=null,K=0;function z(B){if(!G.value)return;let Y=K?B-K:0;K=B,J({delta:Y,timestamp:B}),$=requestAnimationFrame(z)}function q(){if(G.value)return;if(typeof requestAnimationFrame>"u")return;G.value=!0,K=0,$=requestAnimationFrame(z)}function M(){if(!G.value)return;if(G.value=!1,$!==null&&typeof cancelAnimationFrame<"u")cancelAnimationFrame($),$=null}if(Z)q();try{G6(M)}catch{}return{pause:M,resume:q,isActive:G}}import{onUnmounted as q6,ref as M6}from"@stacksjs/stx";function X6(J=10){let Q=M6(0);if(typeof requestAnimationFrame>"u")return Q;let Z=performance.now(),G=0,$;function K(){if(G++,G>=J){let z=performance.now(),q=z-Z;Q.value=Math.round(G/q*1000),Z=z,G=0}$=requestAnimationFrame(K)}$=requestAnimationFrame(K);try{q6(()=>cancelAnimationFrame($))}catch{}return Q}import{ref as IJ}from"@stacksjs/stx";function B6(J){let{source:Q,copiedDuring:Z=1500}=J??{},G=NJ(),$=IJ(!!G&&"clipboard"in G),K=IJ(""),z=IJ(!1),q;async function M(B){if(!$.value)return;let Y=B??(Q!==void 0?R(Q):void 0);if(Y===void 0)return;try{if(await G.clipboard.writeText(Y),K.value=Y,z.value=!0,q)clearTimeout(q);q=setTimeout(()=>{z.value=!1},Z)}catch{}}return{text:K,isSupported:$,copied:z,copy:M}}import{ref as M9}from"@stacksjs/stx";function W6(){let J=M9(typeof navigator<"u"&&"clipboard"in navigator&&typeof ClipboardItem<"u"),Q=M9([]);async function Z($){if(J.value)await navigator.clipboard.write($),Q.value=$}async function G(){if(J.value)Q.value=await navigator.clipboard.read()}return{isSupported:J,content:Q,copy:Z,read:G}}import{onUnmounted as _6,ref as Y6}from"@stacksjs/stx";function H6(J){let Q=x(),Z=Y6(!1);if(!Q||!Q.matchMedia)return Z;let G=R(J),$=Q.matchMedia(G);Z.value=$.matches;let K=(z)=>{Z.value=z.matches};$.addEventListener("change",K);try{_6(()=>{$.removeEventListener("change",K)})}catch{}return Z}import{computed as a,ref as F6,onUnmounted as A6}from"@stacksjs/stx";function L6(J){let Q=x(),Z=F6(Q?Q.innerWidth:0);function G(){if(Q)Z.value=Q.innerWidth}if(Q){Q.addEventListener("resize",G);try{A6(()=>{Q.removeEventListener("resize",G)})}catch{}}function $(X){return J[X]}function K(X){return a(()=>Z.value>=$(X))}function z(X){return a(()=>Z.value<=$(X))}function q(X,W){return a(()=>Z.value>=$(X)&&Z.value<$(W))}function M(X){return a(()=>Z.value>$(X))}function B(X){return a(()=>Z.value<$(X))}function Y(){return a(()=>{return Object.keys(J).sort((W,_)=>J[W]-J[_]).filter((W)=>Z.value>=J[W])})}return{greaterOrEqual:K,smallerOrEqual:z,between:q,isGreater:M,isSmaller:B,current:Y}}var N6={sm:640,md:768,lg:1024,xl:1280,"2xl":1536},X9={sm:576,md:768,lg:992,xl:1200,xxl:1400},O6=X9,D6={xs:480,sm:576,md:768,lg:992,xl:1200,xxl:1600},C6={xs:600,sm:960,md:1264,lg:1904},P6={xs:600,sm:1024,md:1440,lg:1920},E6={"3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560},U6={mobileS:320,mobileM:375,mobileL:425,tablet:768,laptop:1024,laptopL:1440,desktop:2560};import{ref as j6,watch as T6}from"@stacksjs/stx";function V6(J){let Q=JJ(),Z=J!==void 0?R(J):Q?.title??"",G=j6(Z);if(Q&&J!==void 0)Q.title=G.value;return T6(G,($)=>{if(Q)Q.title=$}),G}import{ref as R6,watch as I6}from"@stacksjs/stx";function S6(J){let Q=R6(R(J??null));function Z(G){if(typeof document>"u"||!G)return;let $=document.querySelector('link[rel*="icon"]');if(!$)$=document.createElement("link"),$.rel="icon",$.type="image/x-icon",document.head.appendChild($);$.href=G}return I6(Q,(G)=>{Z(G)}),Z(Q.value),Q}import{onUnmounted as b6,ref as x6}from"@stacksjs/stx";function y6(){let J=x6(typeof document<"u"?document.visibilityState:"visible");if(typeof document>"u")return J;let Q=()=>{J.value=document.visibilityState};document.addEventListener("visibilitychange",Q,{passive:!0});try{b6(()=>{document.removeEventListener("visibilitychange",Q)})}catch{}return J}import{ref as w6,watch as k6}from"@stacksjs/stx";function g6(J,Q){let Z=J??(typeof document<"u"?document.documentElement:null),G=Q??"ltr";if(Z){let K=Z.getAttribute("dir");if(K==="rtl"||K==="ltr"||K==="auto")G=K}let $=w6(G);return k6($,(K)=>{if(Z)Z.setAttribute("dir",K)}),$}import{onUnmounted as h6,ref as SJ}from"@stacksjs/stx";function f6(){let J=SJ(""),Q=SJ([]),Z=SJ(null);if(typeof document>"u")return{text:J,ranges:Q,selection:Z};let G=()=>{let $=document.getSelection();if(Z.value=$,$&&$.rangeCount>0){J.value=$.toString();let K=[];for(let z=0;z<$.rangeCount;z++)K.push($.getRangeAt(z));Q.value=K}else J.value="",Q.value=[]};document.addEventListener("selectionchange",G,{passive:!0});try{h6(()=>{document.removeEventListener("selectionchange",G)})}catch{}return{text:J,ranges:Q,selection:Z}}import{onUnmounted as v6,ref as m6}from"@stacksjs/stx";function p6(J="history",Q){let Z=x(),{initialValue:G}=Q??{};function $(){if(!Z)return{...G};let Y="";if(J==="hash"){let _=Z.location.hash,H=_.indexOf("?");Y=H>=0?_.slice(H+1):""}else Y=Z.location.search.slice(1);let X={...G};return new URLSearchParams(Y).forEach((_,H)=>{X[H]=_}),X}let K=m6($());function z(){if(!Z)return;let Y=new URLSearchParams;for(let[W,_]of Object.entries(K.value))if(_!==void 0&&_!==null&&_!=="")Y.set(W,_);let X=Y.toString();if(J==="hash"){let W=Z.location.hash.split("?")[0]||"#";Z.location.hash=X?`${W}?${X}`:W}else{let W=X?`${Z.location.pathname}?${X}`:Z.location.pathname;Z.history.replaceState(Z.history.state,"",W)}}function q(Y){return K.value[Y]??null}function M(Y,X){let W={...K.value};W[Y]=X,K.value=W,z()}function B(Y){let X={...K.value};delete X[Y],K.value=X,z()}if(Z){let Y=()=>{K.value=$()},X=()=>{if(J==="hash")K.value=$()};Z.addEventListener("popstate",Y),Z.addEventListener("hashchange",X),v6(()=>{Z.removeEventListener("popstate",Y),Z.removeEventListener("hashchange",X)})}return{params:K,get:q,set:M,delete:B}}import{onUnmounted as d6,ref as c}from"@stacksjs/stx";function u6(){let J=x();function Q(){if(!J)return{href:"",protocol:"",host:"",hostname:"",port:"",pathname:"",search:"",hash:"",origin:""};return{href:J.location.href,protocol:J.location.protocol,host:J.location.host,hostname:J.location.hostname,port:J.location.port,pathname:J.location.pathname,search:J.location.search,hash:J.location.hash,origin:J.location.origin}}let Z=Q(),G=c(Z.href),$=c(Z.protocol),K=c(Z.host),z=c(Z.hostname),q=c(Z.port),M=c(Z.pathname),B=c(Z.search),Y=c(Z.hash),X=c(Z.origin);function W(){let _=Q();G.value=_.href,$.value=_.protocol,K.value=_.host,z.value=_.hostname,q.value=_.port,M.value=_.pathname,B.value=_.search,Y.value=_.hash,X.value=_.origin}if(J){J.addEventListener("popstate",W),J.addEventListener("hashchange",W);try{d6(()=>{J.removeEventListener("popstate",W),J.removeEventListener("hashchange",W)})}catch{}}return{href:G,protocol:$,host:K,hostname:z,port:q,pathname:M,search:B,hash:Y,origin:X}}import{onUnmounted as c6,ref as B9}from"@stacksjs/stx";function l6(J){let{initialWidth:Q=0,initialHeight:Z=0,listenOrientation:G=!0}=J??{},$=x(),K=B9($?$.innerWidth:Q),z=B9($?$.innerHeight:Z);function q(){if($)K.value=$.innerWidth,z.value=$.innerHeight}if($){if($.addEventListener("resize",q),G)$.addEventListener("orientationchange",q);try{c6(()=>{if($.removeEventListener("resize",q),G)$.removeEventListener("orientationchange",q)})}catch{}}return{width:K,height:z}}import{onUnmounted as i6,ref as r6}from"@stacksjs/stx";function s6(){let J=r6(typeof document<"u"?document.hasFocus():!1);if(typeof window>"u")return J;let Q=()=>{J.value=!0},Z=()=>{J.value=!1};window.addEventListener("focus",Q,{passive:!0}),window.addEventListener("blur",Z,{passive:!0});try{i6(()=>{window.removeEventListener("focus",Q),window.removeEventListener("blur",Z)})}catch{}return J}import{onUnmounted as n6,ref as W9}from"@stacksjs/stx";function o6(){let J=W9(typeof window<"u"?window.scrollX:0),Q=W9(typeof window<"u"?window.scrollY:0);if(typeof window>"u")return{x:J,y:Q};let Z=()=>{J.value=window.scrollX,Q.value=window.scrollY};window.addEventListener("scroll",Z,{passive:!0});try{n6(()=>{window.removeEventListener("scroll",Z)})}catch{}return{x:J,y:Q}}import{onUnmounted as a6,ref as k}from"@stacksjs/stx";function t6(J,Q){let{throttle:Z=0,offset:G={}}=Q??{},$=G.top??0,K=G.bottom??0,z=G.left??0,q=G.right??0,M=k(0),B=k(0),Y=k(!1),X=k(!0),W=k(!1),_=k(!0),H=k(!1),F=k(!1),L=k(!1),C=k(!1),U=k(!1),j,y=0,d=0,u,O=!1;function E(P){if(typeof window<"u"&&P===window||"innerHeight"in P&&"scrollX"in P){let V=P,sJ=typeof document<"u"?document:void 0;return{scrollLeft:V.scrollX??V.pageXOffset??0,scrollTop:V.scrollY??V.pageYOffset??0,scrollHeight:sJ?.documentElement?.scrollHeight??0,scrollWidth:sJ?.documentElement?.scrollWidth??0,clientHeight:V.innerHeight,clientWidth:V.innerWidth}}if(typeof document<"u"&&P===document||"documentElement"in P){let V=P.documentElement;return{scrollLeft:V.scrollLeft,scrollTop:V.scrollTop,scrollHeight:V.scrollHeight,scrollWidth:V.scrollWidth,clientHeight:V.clientHeight,clientWidth:V.clientWidth}}let N=P;return{scrollLeft:N.scrollLeft,scrollTop:N.scrollTop,scrollHeight:N.scrollHeight,scrollWidth:N.scrollWidth,clientHeight:N.clientHeight,clientWidth:N.clientWidth}}function I(){let P=J?A(J):typeof window<"u"?window:null;if(!P)return;let N=E(P);if(F.value=N.scrollTop<d,L.value=N.scrollTop>d,C.value=N.scrollLeft<y,U.value=N.scrollLeft>y,y=N.scrollLeft,d=N.scrollTop,M.value=N.scrollLeft,B.value=N.scrollTop,X.value=N.scrollTop<=$,_.value=N.scrollLeft<=z,W.value=N.scrollTop+N.clientHeight>=N.scrollHeight-K,H.value=N.scrollLeft+N.clientWidth>=N.scrollWidth-q,Y.value=!0,j)clearTimeout(j);j=setTimeout(()=>{Y.value=!1},150)}function T(){if(Z>0){if(!O)I(),O=!0,u=setTimeout(()=>{O=!1},Z)}else I()}if(typeof window<"u"){let P=J?A(J):window;if(P){let N=E(P);M.value=N.scrollLeft,B.value=N.scrollTop,y=N.scrollLeft,d=N.scrollTop,X.value=N.scrollTop<=$,_.value=N.scrollLeft<=z,W.value=N.scrollTop+N.clientHeight>=N.scrollHeight-K,H.value=N.scrollLeft+N.clientWidth>=N.scrollWidth-q,P.addEventListener("scroll",T,{passive:!0});try{a6(()=>{if(P.removeEventListener("scroll",T),j)clearTimeout(j);if(u)clearTimeout(u)})}catch{}}}return{x:M,y:B,isScrolling:Y,arrivedState:{top:X,bottom:W,left:_,right:H},directions:{top:F,bottom:L,left:C,right:U}}}import{onUnmounted as e6,ref as J8,watch as $8}from"@stacksjs/stx";function Q8(J){let Q=J8(!1),Z="";function G(){if(J)return A(J);if(typeof document<"u")return document.body;return null}function $(){let z=G();if(!z)return;Z=z.style.overflow,z.style.overflow="hidden"}function K(){let z=G();if(!z)return;z.style.overflow=Z}$8(Q,(z)=>{if(z)$();else K()});try{e6(()=>{if(Q.value)K()})}catch{}return Q}import{onUnmounted as Z8,ref as G8}from"@stacksjs/stx";function K8(J,Q,Z={}){let{distance:G=100,direction:$="bottom"}=Z,K=G8(!1),z=!0,q=async()=>{if(!z||K.value)return;let B=A(J);if(!B)return;let Y=!1;if(B===window||B===document.documentElement){let X=window.scrollY||document.documentElement.scrollTop,W=document.documentElement.scrollHeight,_=window.innerHeight;if($==="bottom")Y=W-X-_<=G;else if($==="top")Y=X<=G}else{let X=B;if($==="bottom")Y=X.scrollHeight-X.scrollTop-X.clientHeight<=G;else if($==="top")Y=X.scrollTop<=G;else if($==="right")Y=X.scrollWidth-X.scrollLeft-X.clientWidth<=G;else if($==="left")Y=X.scrollLeft<=G}if(Y){K.value=!0;try{await Q()}finally{K.value=!1}}},M=A(J);if(M){let B=M===document.documentElement?window:M;B.addEventListener("scroll",q,{passive:!0});try{Z8(()=>{z=!1,B.removeEventListener("scroll",q)})}catch{}}return{isLoading:K}}import{onUnmounted as z8,ref as _9}from"@stacksjs/stx";function q8(J){let Q=JJ(),Z=_9(!1),G=_9(!!Q&&(("fullscreenEnabled"in Q)||("webkitFullscreenEnabled"in Q)));function $(){if(J)return A(J);return Q?.documentElement??null}function K(){if(!Q)return null;return Q.fullscreenElement??Q.webkitFullscreenElement??null}function z(){Z.value=K()!==null}async function q(){if(!G.value)return;let Y=$();if(!Y)return;try{if(Y.requestFullscreen)await Y.requestFullscreen();else if(Y.webkitRequestFullscreen)await Y.webkitRequestFullscreen();Z.value=!0}catch{}}async function M(){if(!G.value||!Q)return;try{if(Q.exitFullscreen)await Q.exitFullscreen();else if(Q.webkitExitFullscreen)await Q.webkitExitFullscreen();Z.value=!1}catch{}}async function B(){if(Z.value)await M();else await q()}if(Q){let Y=()=>z();Q.addEventListener("fullscreenchange",Y),Q.addEventListener("webkitfullscreenchange",Y);try{z8(()=>{Q.removeEventListener("fullscreenchange",Y),Q.removeEventListener("webkitfullscreenchange",Y)})}catch{}}return{isFullscreen:Z,isSupported:G,enter:q,exit:M,toggle:B}}function M8(J,Q,Z){let G=x();if(!G)return()=>{};let{ignore:$=[]}=Z??{};function K(q){let M=A(J);if(!M)return;let B=q,Y=B.composedPath?.()??[];if(M===B.target||Y.includes(M)||M.contains(B.target))return;for(let X of $){let W=A(X);if(W&&(W===B.target||Y.includes(W)||W.contains(B.target)))return}Q(B)}return G.addEventListener("pointerdown",K,{passive:!0}),()=>{G.removeEventListener("pointerdown",K)}}function bJ(J,Q,Z){let{eventName:G="keydown",target:$}=Z??{},K=x(),z=$?A($):K;if(!z)return()=>{};function q(X){if(typeof X==="function")return X;if(typeof X==="string")return(W)=>W.key===X;if(Array.isArray(X))return(W)=>X.includes(W.key);return()=>!0}let M=q(J);function B(X){let W=X;if(M(W))Q(W)}return z.addEventListener(G,B),()=>{z.removeEventListener(G,B)}}function X8(J,Q,Z){return bJ(J,Q,{...Z,eventName:"keydown"})}function B8(J,Q,Z){return bJ(J,Q,{...Z,eventName:"keyup"})}import{onUnmounted as W8}from"@stacksjs/stx";function _8(J,Q,Z={}){let{delay:G=500,distanceThreshold:$=10}=Z,K=null,z=0,q=0,M=A(J);if(!M)return()=>{};let B=()=>{if(K!==null)clearTimeout(K),K=null},Y=(H)=>{z=H.clientX,q=H.clientY,B(),K=setTimeout(()=>Q(H),G)},X=(H)=>{if(K===null)return;let F=Math.abs(H.clientX-z),L=Math.abs(H.clientY-q);if(F>$||L>$)B()},W=()=>{B()};M.addEventListener("pointerdown",Y),M.addEventListener("pointermove",X),M.addEventListener("pointerup",W),M.addEventListener("pointercancel",W);let _=()=>{B(),M.removeEventListener("pointerdown",Y),M.removeEventListener("pointermove",X),M.removeEventListener("pointerup",W),M.removeEventListener("pointercancel",W)};try{W8(_)}catch{}return _}import{onUnmounted as Y8}from"@stacksjs/stx";function H8(J){if(typeof document>"u")return()=>{};let Q=(G)=>{let $=document.activeElement;if($){let K=$.tagName.toLowerCase();if(K==="input"||K==="textarea"||$.isContentEditable)return}if(G.key.length===1&&!G.ctrlKey&&!G.metaKey&&!G.altKey)J(G)};document.addEventListener("keydown",Q);let Z=()=>{document.removeEventListener("keydown",Q)};try{Y8(Z)}catch{}return Z}import{onUnmounted as F8,ref as A8}from"@stacksjs/stx";function L8(J){let Q=A8(!1);if(typeof window>"u")return Q;let Z=(G)=>{Q.value=G.getModifierState(J)};window.addEventListener("keydown",Z,{passive:!0}),window.addEventListener("keyup",Z,{passive:!0}),window.addEventListener("mousedown",Z,{passive:!0}),window.addEventListener("mouseup",Z,{passive:!0});try{F8(()=>{window.removeEventListener("keydown",Z),window.removeEventListener("keyup",Z),window.removeEventListener("mousedown",Z),window.removeEventListener("mouseup",Z)})}catch{}return Q}import{onUnmounted as N8,ref as Y9}from"@stacksjs/stx";function O8(){let J=Y9(new Set),Q=new Map;function Z($){let K=$.toLowerCase();if(!Q.has(K))Q.set(K,Y9(!1));return Q.get(K)}function G(){for(let[$,K]of Q)if($.includes("+")){let z=$.split("+").map((q)=>q.trim().toLowerCase());K.value=z.every((q)=>J.value.has(q))}}if(typeof window<"u"){let $=(z)=>{let q=z.key.toLowerCase();J.value.add(q),J.value=new Set(J.value);let M=Z(q);if(M.value=!0,z.ctrlKey)Z("ctrl").value=!0,J.value.add("ctrl");if(z.shiftKey)Z("shift").value=!0,J.value.add("shift");if(z.altKey)Z("alt").value=!0,J.value.add("alt");if(z.metaKey)Z("meta").value=!0,J.value.add("meta");G()},K=(z)=>{let q=z.key.toLowerCase();J.value.delete(q),J.value=new Set(J.value);let M=Z(q);if(M.value=!1,!z.ctrlKey)Z("ctrl").value=!1,J.value.delete("ctrl");if(!z.shiftKey)Z("shift").value=!1,J.value.delete("shift");if(!z.altKey)Z("alt").value=!1,J.value.delete("alt");if(!z.metaKey)Z("meta").value=!1,J.value.delete("meta");G()};window.addEventListener("keydown",$,{passive:!0}),window.addEventListener("keyup",K,{passive:!0});try{N8(()=>{window.removeEventListener("keydown",$),window.removeEventListener("keyup",K)})}catch{}}return new Proxy({current:J},{get($,K){if(K==="current")return J;return Z(K)}})}import{computed as w}from"@stacksjs/stx";function S(J){if(J&&typeof J==="object"&&"value"in J&&"subscribe"in J)return J.value;return J}function D8(J){return w(()=>Math.abs(S(J)))}function C8(...J){return w(()=>{let Q=J.map(S);return Q.length?Q.reduce((Z,G)=>Z+G,0)/Q.length:0})}function P8(J){return w(()=>Math.ceil(S(J)))}function E8(J,Q,Z){return w(()=>Math.min(S(Z),Math.max(S(Q),S(J))))}function U8(J){return w(()=>Math.floor(S(J)))}function j8(...J){return w(()=>Math.max(...J.map(S)))}function T8(...J){return w(()=>Math.min(...J.map(S)))}function V8(J,Q=0){return w(()=>Number(S(J).toFixed(Math.max(0,Math.min(100,S(Q))))))}function R8(J){return w(()=>Math.round(S(J)))}function I8(...J){return w(()=>J.map(S).reduce((Q,Z)=>Q+Z,0))}function S8(J){return w(()=>Math.trunc(S(J)))}function b8(J){return w(()=>!S(J))}function H9(...J){return w(()=>J.some((Q)=>S(Q)))}var x8=H9;function y8(...J){return w(()=>J.every((Q)=>S(Q)))}import{ref as w8}from"@stacksjs/stx";function k8(J=0,Q={}){let{min:Z=-1/0,max:G=1/0}=Q;function $(X){return Math.min(G,Math.max(Z,X))}let K=w8($(J));function z(X=1){return K.value=$(K.value+X),K.value}function q(X=1){return K.value=$(K.value-X),K.value}function M(X){return K.value=$(X),K.value}function B(X=J){return K.value=$(X),K.value}function Y(){return K.value}return{count:K,inc:z,dec:q,set:M,reset:B,get:Y}}import{ref as g8,watch as h8}from"@stacksjs/stx";function f8(J,Q){let Z=g8(Q);return h8(J,(G,$)=>{Z.value=$}),Z}import{ref as v8,watch as m8}from"@stacksjs/stx";function p8(J,Q={}){let{initialValue:Z=null}=Q,G=v8(Z);return m8(J,()=>{G.value=Date.now()}),G}import{computed as xJ,ref as F9}from"@stacksjs/stx";function d8(J,Q){let Z=F9([...J]),G=Q!==void 0?J.indexOf(Q):0,$=F9(G>=0?G:0),K=xJ(()=>Z.value[$.value]),z=xJ(()=>$.value===0),q=xJ(()=>$.value===Z.value.length-1);function M(){if($.value<Z.value.length-1)$.value++}function B(){if($.value>0)$.value--}function Y(F){let L=Z.value.indexOf(F);if(L>=0)$.value=L}function X(F){if(F>=0&&F<Z.value.length)$.value=F}function W(F){let L=Z.value.indexOf(F);return L>=0&&$.value<L}function _(F){let L=Z.value.indexOf(F);return L>=0&&$.value>L}function H(F){return Z.value[$.value]===F}return{steps:Z,current:K,index:$,isFirst:z,isLast:q,next:M,previous:B,goTo:Y,goToIndex:X,isBefore:W,isAfter:_,isCurrent:H}}import{computed as u8,ref as c8}from"@stacksjs/stx";function l8(J,Q={}){let Z=J.length;if(Z===0)throw Error("useCycleList requires a non-empty list");let G=Q.initialValue!==void 0?J.indexOf(Q.initialValue):0,$=c8(G>=0?G:0);function K(X){return J[X]}let z=u8(()=>K($.value));function q(X){return(X%Z+Z)%Z}function M(X=1){return $.value=q($.value+X),K($.value)}function B(X=1){return $.value=q($.value-X),K($.value)}function Y(X){return $.value=q(X),K($.value)}return{state:z,index:$,next:M,prev:B,go:Y}}import{computed as i8}from"@stacksjs/stx";function r8(J,Q){return i8(()=>{let Z=[...A(J)];if(Q)return Z.sort(Q);return Z.sort()})}import{ref as s8,watch as n8}from"@stacksjs/stx";function o8(J){if(typeof structuredClone==="function")return structuredClone(J);return JSON.parse(JSON.stringify(J))}function a8(J,Q={}){let Z=Q.clone??o8,G=s8(Z(J.value));function $(){G.value=Z(J.value)}return n8(J,()=>{$()}),{cloned:G,sync:$}}import{computed as yJ,ref as A9}from"@stacksjs/stx";function KJ(J,Q){if(!Q)return J;if(typeof structuredClone==="function")return structuredClone(J);return JSON.parse(JSON.stringify(J))}function zJ(J,Q={}){let{capacity:Z=1/0,clone:G=!1}=Q,$=A9([{snapshot:KJ(J.value,G),timestamp:Date.now()}]),K=A9([]),z=yJ(()=>$.value.length>1),q=yJ(()=>K.value.length>0),M=yJ(()=>{return $.value[$.value.length-1]});function B(){let _={snapshot:KJ(J.value,G),timestamp:Date.now()};if($.value=[...$.value,_],Z!==1/0&&$.value.length>Z)$.value=$.value.slice($.value.length-Z);K.value=[]}function Y(){if($.value.length<=1)return;let _=$.value[$.value.length-1],H=$.value.slice(0,-1);if($.value=H,_)K.value=[...K.value,_];let F=H[H.length-1];if(!F)return;J.value=KJ(F.snapshot,G)}function X(){if(K.value.length===0)return;let _=K.value[K.value.length-1];if(K.value=K.value.slice(0,-1),_)$.value=[...$.value,_];if(!_)return;J.value=KJ(_.snapshot,G)}function W(){$.value=[{snapshot:KJ(J.value,G),timestamp:Date.now()}],K.value=[]}return{history:$,commit:B,undo:Y,redo:X,canUndo:z,canRedo:q,clear:W,last:M}}import{computed as wJ,ref as L9,watch as t8}from"@stacksjs/stx";function qJ(J,Q){if(!Q)return J;if(typeof structuredClone==="function")return structuredClone(J);return JSON.parse(JSON.stringify(J))}function e8(J,Q={}){let{capacity:Z=1/0,deep:G=!1,clone:$=!1}=Q,K=L9([{snapshot:qJ(J.value,$),timestamp:Date.now()}]),z=L9([]),q=!1,M=wJ(()=>K.value.length>1),B=wJ(()=>z.value.length>0),Y=wJ(()=>{return K.value[K.value.length-1]});function X(){let F={snapshot:qJ(J.value,$),timestamp:Date.now()};if(K.value=[...K.value,F],Z!==1/0&&K.value.length>Z)K.value=K.value.slice(K.value.length-Z);z.value=[]}function W(){if(K.value.length<=1)return;q=!0;let F=K.value[K.value.length-1],L=K.value.slice(0,-1);if(K.value=L,F)z.value=[...z.value,F];let C=L[L.length-1];if(C)J.value=qJ(C.snapshot,$);q=!1}function _(){if(z.value.length===0)return;q=!0;let F=z.value[z.value.length-1];if(z.value=z.value.slice(0,-1),F)K.value=[...K.value,F],J.value=qJ(F.snapshot,$);q=!1}function H(){K.value=[{snapshot:qJ(J.value,$),timestamp:Date.now()}],z.value=[]}return t8(J,()=>{if(!q)X()},{deep:G}),{history:K,commit:X,undo:W,redo:_,canUndo:M,canRedo:B,clear:H,last:Y}}import{watch as J4}from"@stacksjs/stx";function $4(J,Q){let Z=Q?.debounce??200,{history:G,commit:$,undo:K,redo:z,canUndo:q,canRedo:M,clear:B,last:Y}=zJ(J,Q),X=null,W=!1;J4(J,()=>{if(W){W=!1;return}if(X!==null)clearTimeout(X);X=setTimeout(()=>{X=null,$()},Z)});let _=K,H=z;function F(){if(X!==null)clearTimeout(X),X=null;W=!0,_()}function L(){if(X!==null)clearTimeout(X),X=null;W=!0,H()}return{history:G,commit:$,undo:F,redo:L,canUndo:q,canRedo:M,clear:B,last:Y}}import{watch as Q4}from"@stacksjs/stx";function Z4(J,Q){let Z=Q?.throttle??200,{history:G,commit:$,undo:K,redo:z,canUndo:q,canRedo:M,clear:B,last:Y}=zJ(J,Q),X=0,W=null,_=!1;Q4(J,()=>{if(_){_=!1;return}let U=Date.now();if(U-X>=Z)X=U,$();else{if(W!==null)clearTimeout(W);W=setTimeout(()=>{W=null,X=Date.now(),$()},Z-(U-X))}});let H=K,F=z;function L(){if(W!==null)clearTimeout(W),W=null;_=!0,H()}function C(){if(W!==null)clearTimeout(W),W=null;_=!0,F()}return{history:G,commit:$,undo:L,redo:C,canUndo:q,canRedo:M,clear:B,last:Y}}import{ref as YJ}from"@stacksjs/stx";function G4(J,Q,Z={}){let{immediate:G=!0,onError:$,resetOnExecute:K=!0,delay:z=0}=Z,q=YJ(Q),M=YJ(!1),B=YJ(!1),Y=YJ(void 0);async function X(W){let _=W??z;if(K)q.value=Q;if(Y.value=void 0,M.value=!1,B.value=!0,_>0)await new Promise((H)=>setTimeout(H,_));try{let H=typeof J==="function"?await J():await J;return q.value=H,M.value=!0,H}catch(H){if(Y.value=H,$)$(H);return q.value}finally{B.value=!1}}if(G)X();return{state:q,isReady:M,isLoading:B,error:Y,execute:X}}import{ref as kJ}from"@stacksjs/stx";function K4(J){let Q=kJ(-1),Z=kJ(!1),G=kJ(J.map(()=>({state:"pending"})));async function $(){for(let K=0;K<J.length;K++){Q.value=K;let z=J[K];if(!z)continue;try{let q=await z();G.value=G.value.map((M,B)=>B===K?{state:"fulfilled",data:q}:M)}catch(q){G.value=G.value.map((M,B)=>B===K?{state:"rejected",data:q}:M)}}Q.value=J.length,Z.value=!0}return $(),{activeIndex:Q,result:G,isFinished:Z}}import{watch as z4}from"@stacksjs/stx";function q4(J,Q){return z4(J,(G)=>{if(G)Q(G)})}import{watch as M4}from"@stacksjs/stx";function X4(J,Q){let Z=!1,G=M4(J,($)=>{if(Z)return;Z=!0,G(),Q($)});return()=>{if(!Z)Z=!0,G()}}import{watch as B4}from"@stacksjs/stx";function N9(J,Q,Z){let G=Z?.debounce??200,$=null,K=B4(J,(z)=>{if($!==null)clearTimeout($);$=setTimeout(()=>{$=null,Q(z)},G)});return()=>{if($!==null)clearTimeout($),$=null;K()}}import{watch as W4}from"@stacksjs/stx";function O9(J,Q,Z){let G=Z?.throttle??200,$=0,K=null,z,q=!1,M=W4(J,(B)=>{let Y=Date.now(),X=Y-$;if(X>=G){if($=Y,K!==null)clearTimeout(K),K=null;q=!1,Q(B)}else if(z=B,q=!0,K===null)K=setTimeout(()=>{if($=Date.now(),K=null,q)q=!1,Q(z)},G-X)});return()=>{if(K!==null)clearTimeout(K),K=null;q=!1,M()}}import{ref as _4,watch as Y4}from"@stacksjs/stx";function D9(J,Q){let Z=_4(!0),G,$=Y4(J,(q)=>{if(Z.value)Q(q,G);G=q});function K(){Z.value=!1}function z(){Z.value=!0}return{stop:$,pause:K,resume:z,isActive:Z}}var H4=D9;import{ref as F4,watch as A4}from"@stacksjs/stx";function C9(J,Q){let Z=F4(!1),G,$=A4(J,(z)=>{if(!Z.value)Q(z,G);G=z});function K(z){Z.value=!0,z(),Promise.resolve().then(()=>{Z.value=!1})}return{stop:$,ignoreUpdates:K,isIgnoring:Z}}var L4=C9;import{watch as N4}from"@stacksjs/stx";function O4(J,Q){let Z=[...J.value];return N4(J,($)=>{let K=[...$],z=K.filter((M)=>!Z.includes(M)),q=Z.filter((M)=>!K.includes(M));Q(K,Z,z,q),Z=K})}import{ref as D4,watch as C4}from"@stacksjs/stx";function P4(J,Q,Z){let G=D4(Z),$=C4(J,(K)=>{if(G.value>0){if(G.value--,Q(K),G.value<=0)$()}});return{stop:$,remaining:G}}import{watch as E4}from"@stacksjs/stx";function U4(J,Q,Z){let G=JSON.stringify(J.value);if(Z?.immediate)Q(J.value);return E4(J,(K)=>{let z=JSON.stringify(K);if(z!==G)G=z,Q(K)})}import{watch as j4}from"@stacksjs/stx";function T4(J,Q){return Q(J.value),j4(J,(Z)=>{Q(Z)})}import{watch as V4}from"@stacksjs/stx";function R4(J,Q){let Z=V4(J,($)=>{Q($)});function G(){Q(J.value)}return{stop:Z,trigger:G}}import{watch as I4}from"@stacksjs/stx";function S4(J,Q,Z){return I4(J,($)=>{Z(()=>Q($))})}import{onUnmounted as b4,ref as gJ}from"@stacksjs/stx";function x4(J,Q={}){let{onConnected:Z,onDisconnected:G,onError:$,onMessage:K,immediate:z=!0,autoReconnect:q=!1,heartbeat:M=!1,protocols:B}=Q,Y=gJ(null),X=gJ("CLOSED"),W=gJ(null),_=0,H=null,F=null,L=!1,C=typeof M==="object"?M.interval??30000:30000,U=typeof M==="object"?M.message??"ping":"ping",j=typeof q==="object"?q.retries??3:q?1/0:0,y=typeof q==="object"?q.delay??1000:1000;function d(T){if(u(),!M)return;F=setInterval(()=>{if(T.readyState===WebSocket.OPEN)T.send(U)},C)}function u(){if(F!==null)clearInterval(F),F=null}function O(){if(typeof WebSocket>"u")return;E(),L=!1,_=0;let T=R(J);X.value="CONNECTING";let P=B?new WebSocket(T,B):new WebSocket(T);W.value=P,P.onopen=()=>{X.value="OPEN",_=0,d(P),Z?.(P)},P.onclose=(N)=>{if(X.value="CLOSED",W.value=null,u(),G?.(P,N),!L&&q&&_<j)_++,H=setTimeout(()=>{O()},y)},P.onerror=(N)=>{$?.(P,N)},P.onmessage=(N)=>{Y.value=typeof N.data==="string"?N.data:String(N.data),K?.(P,N)}}function E(T,P){if(L=!0,u(),H!==null)clearTimeout(H),H=null;let N=W.value;if(N){if(N.readyState===WebSocket.OPEN||N.readyState===WebSocket.CONNECTING)X.value="CLOSING",N.close(T,P);W.value=null}}function I(T){let P=W.value;if(P&&P.readyState===WebSocket.OPEN)P.send(T)}if(z)O();try{b4(()=>{E()})}catch{}return{data:Y,status:X,ws:W,open:O,close:E,send:I}}import{onUnmounted as y4,ref as MJ}from"@stacksjs/stx";function w4(J,Q=[],Z={}){let{withCredentials:G=!1,immediate:$=!0}=Z,K=MJ(null),z=MJ(null),q=MJ("CLOSED"),M=MJ(null),B=MJ(null),Y=[];function X(){let _=B.value;if(_){for(let{eventName:H,handler:F}of Y)_.removeEventListener(H,F);Y=[],_.close(),B.value=null,q.value="CLOSED"}}function W(){if(typeof EventSource>"u")return;X();let _=R(J);q.value="CONNECTING";let H=new EventSource(_,{withCredentials:G});B.value=H,H.onopen=()=>{q.value="OPEN",M.value=null},H.onerror=(L)=>{if(M.value=L,H.readyState===EventSource.CLOSED)q.value="CLOSED";else q.value="CONNECTING"};let F=(L)=>{let C=L;K.value=C.data,z.value="message"};H.addEventListener("message",F),Y.push({eventName:"message",handler:F});for(let L of Q){let C=(U)=>{let j=U;K.value=j.data,z.value=L};H.addEventListener(L,C),Y.push({eventName:L,handler:C})}}if($)W();try{y4(()=>{X()})}catch{}return{data:K,event:z,status:q,error:M,eventSource:B,close:X,open:W}}import{onUnmounted as k4,ref as XJ}from"@stacksjs/stx";function g4(J){let Q=XJ(typeof BroadcastChannel<"u"),Z=XJ(void 0),G=XJ(null),$=XJ(null),K=XJ(!1);if(Q.value){let M=new BroadcastChannel(J);Z.value=M,M.onmessage=(B)=>{G.value=B.data},M.onmessageerror=(B)=>{$.value=B};try{k4(()=>{M.close(),K.value=!0})}catch{}}function z(M){if(Z.value&&!K.value)Z.value.postMessage(M)}function q(){if(Z.value&&!K.value)Z.value.close(),K.value=!0}return{isSupported:Q,channel:Z,data:G,error:$,post:z,close:q,isClosed:K}}import{ref as h4,watch as f4}from"@stacksjs/stx";function P9(J,Q,Z){let G=h4(Q),$=0;async function K(){let z=++$;try{let q=await J();if(z===$)G.value=q}catch{}}if(K(),Z&&Z.length>0)for(let z of Z)f4(z,()=>{K()});return G}import{ref as v4,watch as m4}from"@stacksjs/stx";function E9(J,Q){let Z=v4(J());if(Q&&Q.length>0)for(let G of Q)m4(G,()=>{Z.value=J()});return Z}import{onUnmounted as p4,ref as d4}from"@stacksjs/stx";function hJ(J,Q,Z){let G=d4(typeof window<"u"&&"IntersectionObserver"in window),$=D;(()=>{if($(),!G.value)return;let q=A(J);if(!q)return;let M=new IntersectionObserver(Q,Z);M.observe(q),$=()=>{M.disconnect(),$=D}})();let z=()=>{$()};try{p4(z)}catch{}return{isSupported:G,stop:z}}import{onUnmounted as u4,ref as c4}from"@stacksjs/stx";function l4(J,Q,Z){let G=c4(typeof window<"u"&&"ResizeObserver"in window),$=D;(()=>{if($(),!G.value)return;let q=A(J);if(!q)return;let M=new ResizeObserver(Q);M.observe(q,Z),$=()=>{M.disconnect(),$=D}})();let z=()=>{$()};try{u4(z)}catch{}return{isSupported:G,stop:z}}import{onUnmounted as i4,ref as r4}from"@stacksjs/stx";function s4(J,Q,Z){let G=r4(typeof window<"u"&&"MutationObserver"in window),$=D;(()=>{if($(),!G.value)return;let q=A(J);if(!q)return;let M=new MutationObserver(Q);M.observe(q,Z??{childList:!0,subtree:!0}),$=()=>{M.disconnect(),$=D}})();let z=()=>{$()};try{i4(z)}catch{}return{isSupported:G,stop:z}}import{onUnmounted as n4,ref as U9}from"@stacksjs/stx";function o4(J,Q){let Z=U9(Q?.initialSize?.width??0),G=U9(Q?.initialSize?.height??0),$=typeof window<"u"&&"ResizeObserver"in window,K=D;if($){let q=A(J);if(q){let M=new ResizeObserver((B)=>{for(let Y of B)if(Y.contentBoxSize){let X=Array.isArray(Y.contentBoxSize)?Y.contentBoxSize[0]:Y.contentBoxSize;Z.value=X.inlineSize,G.value=X.blockSize}else Z.value=Y.contentRect.width,G.value=Y.contentRect.height});M.observe(q),K=()=>{M.disconnect(),K=D}}}let z=()=>{K()};try{n4(z)}catch{}return{width:Z,height:G,stop:z}}import{onUnmounted as a4,ref as i}from"@stacksjs/stx";function t4(J){let Q=i(0),Z=i(0),G=i(0),$=i(0),K=i(0),z=i(0),q=i(0),M=i(0),B=[],Y=D,X=()=>{let W=A(J);if(!W)return;let _=W.getBoundingClientRect();Q.value=_.x,Z.value=_.y,G.value=_.top,$.value=_.right,K.value=_.bottom,z.value=_.left,q.value=_.width,M.value=_.height};if(typeof window<"u"){X();let W=()=>X();window.addEventListener("resize",W,{passive:!0}),B.push(()=>window.removeEventListener("resize",W));let _=()=>X();if(window.addEventListener("scroll",_,{passive:!0}),B.push(()=>window.removeEventListener("scroll",_)),"ResizeObserver"in window){let H=A(J);if(H){let F=new ResizeObserver(X);F.observe(H),B.push(()=>F.disconnect())}}if("MutationObserver"in window){let H=A(J);if(H){let F=new MutationObserver(X);F.observe(H,{childList:!0,subtree:!0,attributes:!0}),B.push(()=>F.disconnect())}}Y=()=>{for(let H of B)H();B.length=0,Y=D}}try{a4(()=>Y())}catch{}return{x:Q,y:Z,top:G,right:$,bottom:K,left:z,width:q,height:M,update:X}}import{ref as e4}from"@stacksjs/stx";function J7(J){let Q=e4(!1);return hJ(J,(Z)=>{for(let G of Z)Q.value=G.isIntersecting},{threshold:0}),Q}import{onUnmounted as $7,ref as Q7}from"@stacksjs/stx";function Z7(J){let Q=Q7(!1),Z=()=>{};function G($){if(Z(),!$)return;let K=()=>{Q.value=!0},z=()=>{Q.value=!1};$.addEventListener("mouseenter",K,{passive:!0}),$.addEventListener("mouseleave",z,{passive:!0}),Z=()=>{$.removeEventListener("mouseenter",K),$.removeEventListener("mouseleave",z),Z=()=>{}}}G(A(J));try{$7(()=>Z())}catch{}return Q}import{onUnmounted as G7,ref as fJ}from"@stacksjs/stx";function K7(J){let Q=J?.x??fJ(0),Z=J?.y??fJ(0),G=fJ(null);if(typeof document>"u")return{element:G,x:Q,y:Z};let $=(K)=>{Q.value=K.clientX,Z.value=K.clientY,G.value=document.elementFromPoint(K.clientX,K.clientY)};document.addEventListener("mousemove",$,{passive:!0});try{G7(()=>{document.removeEventListener("mousemove",$)})}catch{}return{element:G,x:Q,y:Z}}import{ref as z7,watch as q7}from"@stacksjs/stx";function M7(J,Q,Z){let G=z7(Z??""),$=()=>{let z=A(Q);if(z)return z;if(typeof document<"u")return document.documentElement;return null},K=$();if(K){let z=getComputedStyle(K).getPropertyValue(A(J)).trim();if(z)G.value=z}return q7(G,(z)=>{let q=$();if(q)q.style.setProperty(A(J),z)}),G}function X7(J){let Q=A(J);if(!Q)return Q;if(Q.$el)return Q.$el;return Q}import{onUnmounted as B7,ref as vJ}from"@stacksjs/stx";function W7(J){let Q=J?.type??"page",Z=J?.touch??!0,G=J?.initialValue??{x:0,y:0},$=vJ(G.x),K=vJ(G.y),z=vJ(null),q=D;if(typeof window<"u"){let M=[],B=(X)=>{switch(Q){case"page":return{x:X.pageX,y:X.pageY};case"client":return{x:X.clientX,y:X.clientY};case"screen":return{x:X.screenX,y:X.screenY};default:return{x:X.pageX,y:X.pageY}}},Y=(X)=>{let W=B(X);$.value=W.x,K.value=W.y,z.value="mouse"};if(window.addEventListener("mousemove",Y,{passive:!0}),M.push(()=>window.removeEventListener("mousemove",Y)),Z){let X=(W)=>{if(W.touches.length>0){let _=W.touches[0];if(!_)return;switch(Q){case"page":$.value=_.pageX,K.value=_.pageY;break;case"client":$.value=_.clientX,K.value=_.clientY;break;case"screen":$.value=_.screenX,K.value=_.screenY;break}z.value="touch"}};window.addEventListener("touchstart",X,{passive:!0}),window.addEventListener("touchmove",X,{passive:!0}),M.push(()=>{window.removeEventListener("touchstart",X),window.removeEventListener("touchmove",X)})}q=()=>{for(let X of M)X();M.length=0,q=D}}try{B7(()=>q())}catch{}return{x:$,y:K,sourceType:z}}import{onUnmounted as _7,ref as l}from"@stacksjs/stx";function Y7(J){let Q=l(0),Z=l(0),G=l(0),$=l(0),K=l(0),z=l(0),q=l(0),M=l(0),B=l(!0);if(typeof window>"u")return{x:Q,y:Z,elementX:G,elementY:$,elementPositionX:K,elementPositionY:z,elementHeight:q,elementWidth:M,isOutside:B};let Y=(X)=>{Q.value=X.pageX,Z.value=X.pageY;let W=A(J);if(!W){B.value=!0;return}let _=W.getBoundingClientRect();K.value=_.left+window.scrollX,z.value=_.top+window.scrollY,q.value=_.height,M.value=_.width,G.value=X.pageX-K.value,$.value=X.pageY-z.value,B.value=G.value<0||$.value<0||G.value>M.value||$.value>q.value};window.addEventListener("mousemove",Y,{passive:!0});try{_7(()=>{window.removeEventListener("mousemove",Y)})}catch{}return{x:Q,y:Z,elementX:G,elementY:$,elementPositionX:K,elementPositionY:z,elementHeight:q,elementWidth:M,isOutside:B}}import{onUnmounted as H7,ref as j9}from"@stacksjs/stx";function F7(J){let Q=j9(!1),Z=j9(null);if(typeof window>"u")return{pressed:Q,sourceType:Z};let G=A(J)??window,$=()=>{Q.value=!0,Z.value="mouse"},K=()=>{Q.value=!0,Z.value="touch"},z=()=>{Q.value=!1};G.addEventListener("mousedown",$,{passive:!0}),G.addEventListener("touchstart",K,{passive:!0}),window.addEventListener("mouseup",z,{passive:!0}),window.addEventListener("touchend",z,{passive:!0}),window.addEventListener("touchcancel",z,{passive:!0});try{H7(()=>{G.removeEventListener("mousedown",$),G.removeEventListener("touchstart",K),window.removeEventListener("mouseup",z),window.removeEventListener("touchend",z),window.removeEventListener("touchcancel",z)})}catch{}return{pressed:Q,sourceType:Z}}import{onUnmounted as A7,ref as r}from"@stacksjs/stx";function L7(J){let Q=r(0),Z=r(0),G=r(0),$=r(0),K=r(0),z=r(0),q=r(""),M=r(!1);if(typeof window>"u")return{isInside:M,x:Q,y:Z,pointerId:G,pressure:$,tiltX:K,tiltY:z,pointerType:q};let B=J??window,Y=(_)=>{Q.value=_.pageX,Z.value=_.pageY,G.value=_.pointerId,$.value=_.pressure,K.value=_.tiltX,z.value=_.tiltY,q.value=_.pointerType},X=()=>{M.value=!0},W=()=>{M.value=!1};B.addEventListener("pointermove",Y,{passive:!0}),B.addEventListener("pointerdown",Y,{passive:!0}),B.addEventListener("pointerenter",X,{passive:!0}),B.addEventListener("pointerleave",W,{passive:!0});try{A7(()=>{B.removeEventListener("pointermove",Y),B.removeEventListener("pointerdown",Y),B.removeEventListener("pointerenter",X),B.removeEventListener("pointerleave",W)})}catch{}return{isInside:M,x:Q,y:Z,pointerId:G,pressure:$,tiltX:K,tiltY:z,pointerType:q}}import{onUnmounted as N7,ref as HJ}from"@stacksjs/stx";function O7(J,Q={}){let{threshold:Z=50,onSwipe:G,onSwipeStart:$,onSwipeEnd:K,passive:z=!0}=Q,q=HJ(!1),M=HJ("none"),B=HJ(0),Y=HJ(0),X=0,W=0;if(typeof window>"u")return{isSwiping:q,direction:M,lengthX:B,lengthY:Y};let _=A(J)??window,H=(C)=>{let U=C.touches[0];if(!U)return;X=U.clientX,W=U.clientY,q.value=!0,M.value="none",B.value=0,Y.value=0,$?.(C)},F=(C)=>{if(!q.value)return;let U=C.touches[0];if(!U)return;B.value=U.clientX-X,Y.value=U.clientY-W;let j=Math.abs(B.value),y=Math.abs(Y.value);if(j>y)M.value=B.value>0?"right":"left";else if(y>j)M.value=Y.value>0?"down":"up"},L=(C)=>{if(!q.value)return;q.value=!1;let U=Math.abs(B.value),j=Math.abs(Y.value);if(Math.max(U,j)>=Z)G?.(M.value),K?.(C,M.value);else M.value="none",K?.(C,"none")};_.addEventListener("touchstart",H,{passive:z}),_.addEventListener("touchmove",F,{passive:z}),_.addEventListener("touchend",L,{passive:z}),_.addEventListener("touchcancel",L,{passive:z});try{N7(()=>{_.removeEventListener("touchstart",H),_.removeEventListener("touchmove",F),_.removeEventListener("touchend",L),_.removeEventListener("touchcancel",L)})}catch{}return{isSwiping:q,direction:M,lengthX:B,lengthY:Y}}import{onUnmounted as D7,ref as t}from"@stacksjs/stx";function C7(J,Q={}){let{threshold:Z=50,onSwipe:G,onSwipeEnd:$}=Q,K=t(!1),z=t("none"),q=t(0),M=t(0),B=t({x:0,y:0}),Y=t({x:0,y:0});if(typeof window>"u")return{isSwiping:K,direction:z,distanceX:q,distanceY:M,posStart:B,posEnd:Y};let X=A(J);if(!X)return{isSwiping:K,direction:z,distanceX:q,distanceY:M,posStart:B,posEnd:Y};let W=(F)=>{K.value=!0,z.value="none",B.value={x:F.clientX,y:F.clientY},Y.value={x:F.clientX,y:F.clientY},q.value=0,M.value=0,X.setPointerCapture(F.pointerId)},_=(F)=>{if(!K.value)return;Y.value={x:F.clientX,y:F.clientY},q.value=Y.value.x-B.value.x,M.value=Y.value.y-B.value.y;let L=Math.abs(q.value),C=Math.abs(M.value);if(L>C)z.value=q.value>0?"right":"left";else if(C>L)z.value=M.value>0?"down":"up"},H=(F)=>{if(!K.value)return;if(K.value=!1,Math.max(Math.abs(q.value),Math.abs(M.value))>=Z)G?.(z.value),$?.(F,z.value);else z.value="none",$?.(F,"none")};X.addEventListener("pointerdown",W),X.addEventListener("pointermove",_),X.addEventListener("pointerup",H);try{D7(()=>{X.removeEventListener("pointerdown",W),X.removeEventListener("pointermove",_),X.removeEventListener("pointerup",H)})}catch{}return{isSwiping:K,direction:z,distanceX:q,distanceY:M,posStart:B,posEnd:Y}}import{onUnmounted as P7,ref as mJ}from"@stacksjs/stx";function E7(J){let Q=mJ(typeof document<"u"&&"pointerLockElement"in document),Z=mJ(!1),G=mJ(null);if(typeof document<"u"){let z=()=>{Z.value=!!document.pointerLockElement,G.value=document.pointerLockElement};document.addEventListener("pointerlockchange",z),document.addEventListener("pointerlockerror",z);try{P7(()=>{document.removeEventListener("pointerlockchange",z),document.removeEventListener("pointerlockerror",z)})}catch{}}async function $(z){if(!Q.value)return;let q=z??A(J);if(q)await q.requestPointerLock()}function K(){if(!Q.value)return;if(document.pointerLockElement)document.exitPointerLock()}return{isSupported:Q,isLocked:Z,lock:$,unlock:K,element:G}}import{onUnmounted as U7,ref as pJ}from"@stacksjs/stx";function j7(J,Q={}){let Z=pJ(0),G=pJ(0),$=pJ("mouse");if(typeof window>"u")return{tilt:Z,roll:G,source:$};let K=(q)=>{let M=A(J);if(!M)return;let B=M.getBoundingClientRect(),Y=B.left+B.width/2,X=B.top+B.height/2;Z.value=(q.clientX-Y)/(B.width/2)*0.5,G.value=(q.clientY-X)/(B.height/2)*0.5,$.value="mouse"};window.addEventListener("mousemove",K,{passive:!0});let z=(q)=>{if(q.gamma!==null&&q.beta!==null){let M=q.gamma/90,B=(q.beta-45)/90;Z.value=Q.deviceOrientationTiltAdjust?.(M)??M*0.5,G.value=Q.deviceOrientationRollAdjust?.(B)??B*0.5,$.value="deviceOrientation"}};window.addEventListener("deviceorientation",z,{passive:!0});try{U7(()=>{window.removeEventListener("mousemove",K),window.removeEventListener("deviceorientation",z)})}catch{}return{tilt:Z,roll:G,source:$}}import{onUnmounted as T7,ref as m}from"@stacksjs/stx";function V7(J){let{immediate:Q=!0,...Z}=J??{},G=m(typeof navigator<"u"&&"geolocation"in navigator),$={latitude:m(null),longitude:m(null),accuracy:m(null),altitude:m(null),altitudeAccuracy:m(null),heading:m(null),speed:m(null)},K=m(null),z=m(null),q=null,M=D,B=(_)=>{$.latitude.value=_.coords.latitude,$.longitude.value=_.coords.longitude,$.accuracy.value=_.coords.accuracy,$.altitude.value=_.coords.altitude,$.altitudeAccuracy.value=_.coords.altitudeAccuracy,$.heading.value=_.coords.heading,$.speed.value=_.coords.speed,K.value=_.timestamp,z.value=null},Y=(_)=>{z.value=_},X=()=>{if(!G.value)return;if(q!==null)return;q=navigator.geolocation.watchPosition(B,Y,Z),M=()=>{if(q!==null)navigator.geolocation.clearWatch(q),q=null;M=D}},W=()=>{M()};if(Q)X();try{T7(W)}catch{}return{coords:$,locatedAt:K,error:z,isSupported:G,pause:W,resume:X}}import{onUnmounted as R7,ref as g}from"@stacksjs/stx";function I7(){let J=g(typeof window<"u"&&"DeviceMotionEvent"in window),Q={x:g(null),y:g(null),z:g(null)},Z={x:g(null),y:g(null),z:g(null)},G={alpha:g(null),beta:g(null),gamma:g(null)},$=g(0),K=D;if(typeof window<"u"&&J.value){let z=(q)=>{if(q.acceleration)Q.x.value=q.acceleration.x,Q.y.value=q.acceleration.y,Q.z.value=q.acceleration.z;if(q.accelerationIncludingGravity)Z.x.value=q.accelerationIncludingGravity.x,Z.y.value=q.accelerationIncludingGravity.y,Z.z.value=q.accelerationIncludingGravity.z;if(q.rotationRate)G.alpha.value=q.rotationRate.alpha,G.beta.value=q.rotationRate.beta,G.gamma.value=q.rotationRate.gamma;$.value=q.interval};window.addEventListener("devicemotion",z,{passive:!0}),K=()=>{window.removeEventListener("devicemotion",z),K=D}}try{R7(()=>K())}catch{}return{acceleration:Q,accelerationIncludingGravity:Z,rotationRate:G,interval:$,isSupported:J}}import{onUnmounted as S7,ref as BJ}from"@stacksjs/stx";function b7(){let J=BJ(typeof window<"u"&&"DeviceOrientationEvent"in window),Q=BJ(null),Z=BJ(null),G=BJ(null),$=BJ(!1),K=D;if(typeof window<"u"&&J.value){let z=(q)=>{Q.value=q.alpha,Z.value=q.beta,G.value=q.gamma,$.value=q.absolute};window.addEventListener("deviceorientation",z,{passive:!0}),K=()=>{window.removeEventListener("deviceorientation",z),K=D}}try{S7(()=>K())}catch{}return{alpha:Q,beta:Z,gamma:G,absolute:$,isSupported:J}}import{onUnmounted as x7,ref as y7}from"@stacksjs/stx";function w7(){let J=y7(typeof window<"u"?window.devicePixelRatio:1);if(typeof window>"u")return{pixelRatio:J};let Q=null,Z=()=>{};function G(){Z(),Q=window.matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`);let $=()=>{J.value=window.devicePixelRatio,G()};Q.addEventListener("change",$,{once:!0}),Z=()=>{Q?.removeEventListener("change",$)}}G();try{x7(()=>Z())}catch{}return{pixelRatio:J}}import{onUnmounted as k7,ref as WJ}from"@stacksjs/stx";function g7(){let J=typeof navigator<"u"?navigator:void 0,Q=WJ(!!J?.getBattery),Z=WJ(!1),G=WJ(0),$=WJ(0),K=WJ(1),z=[],q=D;if(Q.value&&J?.getBattery)J.getBattery().then((M)=>{let B=()=>{Z.value=M.charging,G.value=M.chargingTime,$.value=M.dischargingTime,K.value=M.level};B(),M.addEventListener("chargingchange",B),M.addEventListener("chargingtimechange",B),M.addEventListener("dischargingtimechange",B),M.addEventListener("levelchange",B),z.push(()=>{M.removeEventListener("chargingchange",B),M.removeEventListener("chargingtimechange",B),M.removeEventListener("dischargingtimechange",B),M.removeEventListener("levelchange",B)}),q=()=>{for(let Y of z)Y();z.length=0,q=D}}).catch(()=>{Q.value=!1});try{k7(()=>q())}catch{}return{charging:Z,chargingTime:G,dischargingTime:$,level:K,isSupported:Q}}import{onUnmounted as h7,ref as f7,watch as v7}from"@stacksjs/stx";function m7(J,Q={}){let{initialValue:Z=!1}=Q,G=f7(Z),$=()=>{};function K(q){if($(),!q)return;let M=()=>{G.value=!0},B=()=>{G.value=!1};if(q.addEventListener("focus",M,{passive:!0}),q.addEventListener("blur",B,{passive:!0}),$=()=>{q.removeEventListener("focus",M),q.removeEventListener("blur",B),$=()=>{}},document.activeElement===q)G.value=!0;if(Z)q.focus()}let z=A(J);K(z),v7(G,(q)=>{let M=A(J);if(!M)return;if(q)M.focus();else M.blur()});try{h7(()=>$())}catch{}return{focused:G}}import{onUnmounted as p7,ref as d7}from"@stacksjs/stx";function u7(J){let Q=d7(!1),Z=()=>{};function G($){if(Z(),!$)return;let K=()=>{Q.value=!0},z=(q)=>{if(!$.contains(q.relatedTarget))Q.value=!1};$.addEventListener("focusin",K,{passive:!0}),$.addEventListener("focusout",z),Z=()=>{$.removeEventListener("focusin",K),$.removeEventListener("focusout",z),Z=()=>{}}}G(A(J));try{p7(()=>Z())}catch{}return{focused:Q}}import{onUnmounted as c7,ref as l7}from"@stacksjs/stx";function i7(){let J=l7(null);if(typeof document>"u")return J;J.value=document.activeElement;let Q=()=>{J.value=document.activeElement};document.addEventListener("focusin",Q,{passive:!0}),document.addEventListener("focusout",Q,{passive:!0});try{c7(()=>{document.removeEventListener("focusin",Q),document.removeEventListener("focusout",Q)})}catch{}return J}import{onUnmounted as r7,ref as T9}from"@stacksjs/stx";var s7=["mousemove","mousedown","resize","keydown","touchstart","wheel"];function n7(J=60000,Q){let Z=Q?.events??s7,G=Q?.initialState??!1,$=T9(G),K=T9(Date.now()),z=null,q=D;if(typeof window<"u"){let M=[],B=()=>{if($.value=!1,K.value=Date.now(),z!==null)clearTimeout(z);z=setTimeout(()=>{$.value=!0},J)};for(let Y of Z)window.addEventListener(Y,B,{passive:!0}),M.push(()=>window.removeEventListener(Y,B));z=setTimeout(()=>{$.value=!0},J),q=()=>{for(let Y of M)Y();if(M.length=0,z!==null)clearTimeout(z),z=null;q=D}}try{r7(()=>q())}catch{}return{idle:$,lastActive:K}}import{onUnmounted as o7,ref as a7}from"@stacksjs/stx";function t7(){let J=a7(!1),Q=D;if(typeof document<"u"){let Z=[],G=(K)=>{if(K.clientY<=0||K.clientX<=0||K.clientX>=(typeof window<"u"?window.innerWidth:0)||K.clientY>=(typeof window<"u"?window.innerHeight:0))J.value=!0},$=()=>{J.value=!1};document.documentElement.addEventListener("mouseleave",G),document.documentElement.addEventListener("mouseenter",$),Z.push(()=>document.documentElement.removeEventListener("mouseleave",G),()=>document.documentElement.removeEventListener("mouseenter",$)),Q=()=>{for(let K of Z)K();Z.length=0,Q=D}}try{o7(()=>Q())}catch{}return J}import{ref as e7}from"@stacksjs/stx";function J2(){let J=e7(!1);return Promise.resolve().then(()=>{J.value=!0}),J}import{onUnmounted as $2,ref as FJ}from"@stacksjs/stx";function Q2(J,Q){let Z=Q?.initialValue?.x??0,G=Q?.initialValue?.y??0,$=FJ(Z),K=FJ(G),z=FJ(!1),q=FJ(`left: ${Z}px; top: ${G}px;`),M=D;if(typeof window<"u"){let B=[],Y=0,X=0,W=0,_=0,H=()=>{q.value=`left: ${$.value}px; top: ${K.value}px;`},F=(j)=>{if(!z.value)return;if($.value=j.clientX-W,K.value=j.clientY-_,H(),Q?.onMove)Q.onMove({x:$.value,y:K.value},j)},L=(j)=>{if(!z.value)return;if(z.value=!1,Q?.onEnd)Q.onEnd({x:$.value,y:K.value},j);window.removeEventListener("pointermove",F),window.removeEventListener("pointerup",L)},C=(j)=>{let y={x:$.value,y:K.value};if(Q?.onStart){if(Q.onStart(y,j)===!1)return}Y=j.clientX,X=j.clientY,W=Y-$.value,_=X-K.value,z.value=!0,window.addEventListener("pointermove",F),window.addEventListener("pointerup",L)},U=A(J);if(U)U.addEventListener("pointerdown",C),B.push(()=>U.removeEventListener("pointerdown",C));M=()=>{for(let j of B)j();B.length=0,window.removeEventListener("pointermove",F),window.removeEventListener("pointerup",L),M=D}}try{$2(()=>M())}catch{}return{x:$,y:K,isDragging:z,style:q}}import{onUnmounted as Z2,ref as V9}from"@stacksjs/stx";function G2(J,Q){let Z=V9(!1),G=V9(null),$=D,K=0;if(typeof window<"u"){let z=A(J);if(z){let q=[],M=(W)=>{W.preventDefault(),K++,Z.value=!0},B=(W)=>{W.preventDefault(),Z.value=!0},Y=(W)=>{if(W.preventDefault(),K--,K<=0)K=0,Z.value=!1},X=(W)=>{W.preventDefault(),K=0,Z.value=!1;let _=W.dataTransfer?.files;if(_&&_.length>0)G.value=Array.from(_);else G.value=null;if(Q)Q(G.value)};z.addEventListener("dragenter",M),z.addEventListener("dragover",B),z.addEventListener("dragleave",Y),z.addEventListener("drop",X),q.push(()=>z.removeEventListener("dragenter",M),()=>z.removeEventListener("dragover",B),()=>z.removeEventListener("dragleave",Y),()=>z.removeEventListener("drop",X)),$=()=>{for(let W of q)W();q.length=0,$=D}}}try{Z2(()=>$())}catch{}return{isOverDropZone:Z,files:G}}import{onUnmounted as K2,ref as R9}from"@stacksjs/stx";function z2(){let J=R9(typeof navigator<"u"&&"language"in navigator),Q=R9(J.value?navigator.language:"");if(typeof window<"u"){let Z=()=>{if(J.value)Q.value=navigator.language};window.addEventListener("languagechange",Z,{passive:!0});try{K2(()=>{window.removeEventListener("languagechange",Z)})}catch{}}return{language:Q,isSupported:J}}import{onUnmounted as q2,ref as M2}from"@stacksjs/stx";function X2(){let J=M2(typeof navigator<"u"?navigator.languages:[]);if(typeof window>"u")return J;let Q=()=>{J.value=navigator.languages};window.addEventListener("languagechange",Q,{passive:!0});try{q2(()=>{window.removeEventListener("languagechange",Q)})}catch{}return J}import{onUnmounted as B2,ref as dJ}from"@stacksjs/stx";function W2(){let J=dJ(typeof screen<"u"&&"orientation"in screen),Q=dJ(void 0),Z=dJ(0);if(J.value){Q.value=screen.orientation.type,Z.value=screen.orientation.angle;let K=()=>{Q.value=screen.orientation.type,Z.value=screen.orientation.angle};screen.orientation.addEventListener("change",K);try{B2(()=>{screen.orientation.removeEventListener("change",K)})}catch{}}async function G(K){if(J.value)await screen.orientation.lock(K)}function $(){if(J.value)screen.orientation.unlock()}return{isSupported:J,orientation:Q,angle:Z,lockOrientation:G,unlockOrientation:$}}import{ref as AJ}from"@stacksjs/stx";function _2(){let J=AJ("0px"),Q=AJ("0px"),Z=AJ("0px"),G=AJ("0px");function $(){if(typeof document>"u"||typeof getComputedStyle>"u")return;let K=document.createElement("div");K.style.position="fixed",K.style.top="env(safe-area-inset-top, 0px)",K.style.right="env(safe-area-inset-right, 0px)",K.style.bottom="env(safe-area-inset-bottom, 0px)",K.style.left="env(safe-area-inset-left, 0px)",K.style.pointerEvents="none",K.style.visibility="hidden",document.body.appendChild(K);let z=getComputedStyle(K);J.value=z.top,Q.value=z.right,Z.value=z.bottom,G.value=z.left,document.body.removeChild(K)}return $(),{top:J,right:Q,bottom:Z,left:G,update:$}}import{ref as Y2}from"@stacksjs/stx";function H2(J){let Q=Y2(null),Z=A(J);if(Z)Q.value=Z.parentElement;return Q}import{onUnmounted as F2,ref as I9}from"@stacksjs/stx";function A2(J){let Q=I9(typeof navigator<"u"&&"permissions"in navigator),Z=I9("prompt");if(!Q.value)return{state:Z,isSupported:Q};let G=null;return navigator.permissions.query({name:J}).then(($)=>{G=$,Z.value=$.state;let K=()=>{Z.value=$.state};$.addEventListener("change",K);try{F2(()=>{$.removeEventListener("change",K)})}catch{}}).catch(()=>{}),{state:Z,isSupported:Q}}import{ref as L2}from"@stacksjs/stx";function N2(J={}){let Q=L2(typeof navigator<"u"&&"share"in navigator);async function Z(G){if(!Q.value)return;let $={...J,...G};await navigator.share($)}return{share:Z,isSupported:Q}}import{onUnmounted as O2,ref as D2,watch as C2}from"@stacksjs/stx";function P2(J){let Q=D2(void 0);function Z(){if(Q.value)URL.revokeObjectURL(Q.value),Q.value=void 0}function G($){if(Z(),$)Q.value=URL.createObjectURL($)}G(J.value),C2(J,($)=>{G($)});try{O2(()=>Z())}catch{}return Q}import{ref as uJ}from"@stacksjs/stx";function E2(J){let Q=uJ(!0),Z=uJ(!1),G=uJ(null);if(typeof Image>"u")return Q.value=!1,{isLoading:Q,error:G,isReady:Z};let $=new Image;if($.onload=()=>{Q.value=!1,Z.value=!0},$.onerror=(K)=>{if(Q.value=!1,typeof K==="string")G.value=K;else if(K instanceof Event&&K.type==="error")G.value=`Failed to load image: ${J.src}`;else G.value="Failed to load image"},J.crossorigin)$.crossOrigin=J.crossorigin;if(J.referrerpolicy)$.referrerPolicy=J.referrerpolicy;if(J.sizes)$.sizes=J.sizes;if(J.srcset)$.srcset=J.srcset;return $.src=J.src,{isLoading:Q,error:G,isReady:Z}}import{ref as U2,watch as j2}from"@stacksjs/stx";function T2(J){let Q=U2("");async function Z($){if(typeof $==="string"){if(typeof btoa<"u")return btoa($);return Buffer.from($).toString("base64")}if($ instanceof ArrayBuffer){let K=new Uint8Array($),z="";for(let q of K)z+=String.fromCharCode(q);if(typeof btoa<"u")return btoa(z);return Buffer.from($).toString("base64")}if(typeof Blob<"u"&&$ instanceof Blob)return new Promise((K,z)=>{let q=new FileReader;q.onload=()=>{let M=q.result,B=M.split(",")[1]??M;K(B)},q.onerror=z,q.readAsDataURL($)});if(typeof HTMLCanvasElement<"u"&&$ instanceof HTMLCanvasElement)return $.toDataURL().split(",")[1]??"";return""}async function G(){let $=A(J),K=await Z($);return Q.value=K,K}if(G().catch(()=>{}),b(J))j2(J,()=>{G().catch(()=>{})});return{base64:Q,execute:G}}import{onUnmounted as V2,ref as _J}from"@stacksjs/stx";function R2(J,Q,Z){let G=_J(typeof HTMLElement<"u"&&"animate"in HTMLElement.prototype),$=_J(void 0),K=_J(!1),z=_J("idle"),q=_J(null);function M(){if($.value)K.value=$.value.pending,z.value=$.value.playState,q.value=$.value.currentTime}function B(){let F=A(J);if(!F||!G.value)return;$.value=F.animate(Q,Z),$.value.addEventListener("finish",M),$.value.addEventListener("cancel",M),M()}function Y(){$.value?.play(),M()}function X(){$.value?.pause(),M()}function W(){$.value?.reverse(),M()}function _(){$.value?.finish(),M()}function H(){$.value?.cancel(),M()}B();try{V2(()=>{$.value?.cancel()})}catch{}return{isSupported:G,animate:$,play:Y,pause:X,reverse:W,finish:_,cancel:H,pending:K,playState:z,currentTime:q}}import{onUnmounted as I2,ref as S2,watch as b2}from"@stacksjs/stx";var cJ={linear:(J)=>J,easeInQuad:(J)=>J*J,easeOutQuad:(J)=>J*(2-J),easeInOutQuad:(J)=>J<0.5?2*J*J:-1+(4-2*J)*J,easeInCubic:(J)=>J*J*J,easeOutCubic:(J)=>--J*J*J+1,easeInOutCubic:(J)=>J<0.5?4*J*J*J:(J-1)*(2*J-2)*(2*J-2)+1};function x2(J,Q={}){let{duration:Z=300,transition:G=cJ.linear,delay:$=0,onFinished:K,onStarted:z}=Q,q=S2(A(J)),M=null;function B(Y,X){if(M!==null)cancelAnimationFrame(M);let W=performance.now()+$;z?.();function _(H){let F=H-W;if(F<0){M=requestAnimationFrame(_);return}let L=Math.min(F/Z,1),C=G(L);if(q.value=Y+(X-Y)*C,L<1)M=requestAnimationFrame(_);else M=null,q.value=X,K?.()}M=requestAnimationFrame(_)}if(typeof J==="object"&&J&&"value"in J&&"subscribe"in J)b2(J,(Y)=>{if(typeof requestAnimationFrame<"u")B(q.value,Y);else q.value=Y});try{I2(()=>{if(M!==null)cancelAnimationFrame(M)})}catch{}return q}function y2(J,Q,Z={}){return new Promise((G)=>{let{duration:$=300,transition:K=cJ.linear,delay:z=0,onFinished:q,onStarted:M}=Z;if(typeof requestAnimationFrame>"u"){q?.(),G();return}let B=performance.now()+z;M?.();function Y(X){let W=X-B;if(W<0){requestAnimationFrame(Y);return}if(Math.min(W/$,1)>=1)q?.(),G();else requestAnimationFrame(Y)}requestAnimationFrame(Y)})}import{onUnmounted as w2,ref as k2}from"@stacksjs/stx";function g2(J,Q,Z={}){let{immediate:G=!0,type:$="text/javascript",manual:K=!1,attrs:z={}}=Z,q=k2(null);function M(){return new Promise((Y,X)=>{if(typeof document>"u"){X(Error("Document is not available"));return}let W=document.createElement("script");if(W.type=$,W.src=J,Z.async)W.async=!0;if(Z.defer)W.defer=!0;if(Z.crossOrigin)W.crossOrigin=Z.crossOrigin;if(Z.referrerPolicy)W.referrerPolicy=Z.referrerPolicy;for(let[_,H]of Object.entries(z))W.setAttribute(_,H);W.addEventListener("load",()=>{q.value=W,Q?.(W),Y(W)}),W.addEventListener("error",(_)=>{X(_)}),document.head.appendChild(W)})}function B(){if(q.value)q.value.remove(),q.value=null}if(G)M();if(!K)try{w2(()=>B())}catch{}return{scriptTag:q,load:M,unload:B}}import{onUnmounted as h2,ref as S9,watch as f2}from"@stacksjs/stx";function v2(J,Q={}){let{immediate:Z=!0,id:G=`style-${Math.random().toString(36).slice(2,9)}`,media:$}=Q,K=S9(J),z=S9(!1),q=null;function M(){if(typeof document>"u")return;if(q)return;if(q=document.createElement("style"),q.id=G,$)q.media=$;q.textContent=K.value,document.head.appendChild(q),z.value=!0}function B(){if(q)q.remove(),q=null,z.value=!1}if(f2(K,(Y)=>{if(q)q.textContent=Y}),Z)M();try{h2(()=>B())}catch{}return{id:G,css:K,load:M,unload:B,isLoaded:z}}import{ref as m2}from"@stacksjs/stx";function p2(){let J=m2(!1),Q=GJ(),Z=GJ(),G=GJ(),$=null;function K(M){return J.value=!0,G.trigger(M),new Promise((B)=>{$=B})}function z(M){J.value=!1,Q.trigger(M),$?.({data:M,isCanceled:!1}),$=null}function q(){J.value=!1,Z.trigger(void 0),$?.({isCanceled:!0}),$=null}return{isRevealed:J,reveal:K,confirm:z,cancel:q,onConfirm:Q.on,onCancel:Z.on,onReveal:G.on}}import{ref as d2}from"@stacksjs/stx";function u2(J={}){let Q=d2(null);function Z($){if(typeof document>"u")return;let K={...J,...$},z=document.createElement("input");if(z.type="file",K.accept)z.accept=K.accept;if(K.multiple)z.multiple=!0;if(K.capture)z.setAttribute("capture",K.capture);z.onchange=()=>{Q.value=z.files},z.click()}function G(){Q.value=null}return{files:Q,open:Z,reset:G}}import{ref as b9}from"@stacksjs/stx";function c2(){let J=b9(typeof window<"u"&&"EyeDropper"in window),Q=b9("");async function Z(){if(!J.value)return;let G=new window.EyeDropper;try{let $=await G.open();return Q.value=$.sRGBHex,$}catch{return}}return{isSupported:J,sRGBHex:Q,open:Z}}import{ref as x9,watch as l2}from"@stacksjs/stx";function i2(J){let Q=x9(J?.element??null),Z=x9(J?.input??"");function G(){let $=Q.value;if(!$)return;$.style.height="auto",$.style.height=`${$.scrollHeight}px`}return l2(Z,()=>{if(Q.value)Q.value.value=Z.value;if(typeof requestAnimationFrame<"u")requestAnimationFrame(G);else G()}),{textarea:Q,input:Z,triggerResize:G}}import{onUnmounted as r2,ref as o}from"@stacksjs/stx";function s2(J={}){let Q=o(typeof Notification<"u"),Z=o(null),G=o(Q.value&&Notification.permission==="granted"),$=o(null),K=o(null),z=o(null),q=o(null);async function M(Y){if(!Q.value)return;if(Notification.permission!=="granted"){let H=await Notification.requestPermission();if(G.value=H==="granted",!G.value)return}let X={...J,...Y},W=X.title??"",_=new Notification(W,{body:X.body,icon:X.icon,dir:X.dir,lang:X.lang,tag:X.tag,requireInteraction:X.requireInteraction});return Z.value=_,_.onclick=(H)=>$.value?.(H),_.onshow=(H)=>K.value?.(H),_.onerror=(H)=>z.value?.(H),_.onclose=(H)=>{q.value?.(H),Z.value=null},_}function B(){Z.value?.close(),Z.value=null}try{r2(()=>B())}catch{}return{isSupported:Q,notification:Z,permissionGranted:G,show:M,close:B,onClick:$,onShow:K,onError:z,onClose:q}}import{ref as n2}from"@stacksjs/stx";function o2(J={}){let{pattern:Q=200}=J,Z=n2(typeof navigator<"u"&&"vibrate"in navigator);function G(K){if(!Z.value)return!1;return navigator.vibrate(K??Q)}function $(){if(Z.value)navigator.vibrate(0)}return{isSupported:Z,vibrate:G,stop:$}}import{onUnmounted as a2,ref as y9}from"@stacksjs/stx";function t2(){let J=y9(typeof navigator<"u"&&"wakeLock"in navigator),Q=y9(!1),Z=null;async function G(){if(!J.value)return;try{Z=await navigator.wakeLock.request("screen"),Q.value=!0,Z.addEventListener("release",()=>{Q.value=!1,Z=null})}catch{Q.value=!1}}async function $(){if(Z)await Z.release(),Z=null,Q.value=!1}try{a2(()=>{$()})}catch{}return{isSupported:J,isActive:Q,request:G,release:$}}import{onUnmounted as e2,ref as w9}from"@stacksjs/stx";function J3(J,Q){let Z=w9(null),G=w9(void 0);if(typeof Worker<"u"){let z=new Worker(J,Q);G.value=z,z.onmessage=(q)=>{Z.value=q.data};try{e2(()=>z.terminate())}catch{}}function $(z){G.value?.postMessage(z)}function K(){G.value?.terminate(),G.value=void 0}return{data:Z,post:$,terminate:K,worker:G}}function $3(J){let Q;function Z(){let K=new Blob([`self.onmessage = function(e) { self.postMessage((${J.toString()})(...e.data)); }`],{type:"text/javascript"}),z=URL.createObjectURL(K);return new Worker(z)}function G(...K){return new Promise((z,q)=>{if(typeof Worker>"u"){try{z(J(...K))}catch(M){q(M)}return}Q=Z(),Q.onmessage=(M)=>{z(M.data),Q?.terminate()},Q.onerror=(M)=>{q(M),Q?.terminate()},Q.postMessage(K)})}function $(){Q?.terminate(),Q=void 0}return{workerFn:G,terminate:$}}import{ref as LJ,watch as Q3}from"@stacksjs/stx";function Z3(J,Q){let{itemHeight:Z,overscan:G=5}=Q,$=LJ([]),K=LJ(0),z=LJ(0),q=LJ({style:{width:"100%",height:"0px",marginTop:"0px"}});function M(){return A(J)}function B(){let W=M(),_=W.length*Z,H=Math.max(0,Math.floor(z.value/Z)-G),F=Math.min(W.length,Math.ceil((z.value+K.value)/Z)+G),L=[];for(let C=H;C<F;C++){let U=W[C];if(U===void 0&&!(C in W))continue;L.push({data:U,index:C})}$.value=L,q.value={style:{width:"100%",height:`${_-H*Z}px`,marginTop:`${H*Z}px`}}}let Y=(W)=>{let _=W.target;z.value=_.scrollTop,K.value=_.clientHeight,B()};if(B(),typeof J==="object"&&J&&"value"in J&&"subscribe"in J)Q3(J,()=>B());function X(W){z.value=W*Z,B()}return{list:$,containerProps:{onScroll:Y,style:{overflow:"auto",position:"relative"}},wrapperProps:q,scrollTo:X}}import{ref as e,watch as lJ}from"@stacksjs/stx";function G3(J={}){let{total:Q,pageSize:Z=10,page:G=1,onPageChange:$,onPageSizeChange:K}=J,z=e(G),q=e(Z),M=typeof Q==="object"&&Q&&"value"in Q?Q:e(typeof Q==="number"?Q:0),B=e(Math.max(1,Math.ceil(M.value/q.value))),Y=e(z.value<=1),X=e(z.value>=B.value);function W(){B.value=Math.max(1,Math.ceil(M.value/q.value)),Y.value=z.value<=1,X.value=z.value>=B.value}lJ(z,()=>{W(),$?.({currentPage:z.value,currentPageSize:q.value})}),lJ(q,()=>{z.value=1,W(),K?.({currentPage:z.value,currentPageSize:q.value})}),lJ(M,()=>{W()});function _(){if(z.value>1)z.value--}function H(){if(z.value<B.value)z.value++}return W(),{currentPage:z,currentPageSize:q,pageCount:B,isFirstPage:Y,isLastPage:X,prev:_,next:H}}function K3(J){return J.value!==null&&J.value!==void 0}import{ref as z3}from"@stacksjs/stx";function q3(J){let Q=z3(!1);try{Q.value=J()}catch{Q.value=!1}return Q}import{ref as M3,watch as X3}from"@stacksjs/stx";function B3(J,Q={}){let{method:Z="parseFloat",radix:G=10,nanToZero:$=!1}=Q,K=M3(0);function z(q){if(typeof q==="number")return q;let M;if(Z==="parseInt")M=Number.parseInt(q,G);else M=Number.parseFloat(q);if($&&Number.isNaN(M))return 0;return M}if(K.value=z(R(J)),typeof J==="function");else if(J&&typeof J==="object"&&"value"in J&&"subscribe"in J)X3(J,(q)=>{K.value=z(q)});return K}import{ref as W3,watch as _3}from"@stacksjs/stx";function Y3(J){let Q=W3(String(R(J)??""));if(b(J))_3(J,(Z)=>{Q.value=String(Z??"")});return Q}import{ref as H3,watch as F3}from"@stacksjs/stx";function A3(J,Q){let Z=H3(J.value??Q);return F3(J,(G)=>{Z.value=G??Q}),Z}import{ref as L3,watch as N3}from"@stacksjs/stx";function k9(J,Q=1000){let Z=L3(J),G=null;return N3(Z,()=>{if(G!==null)clearTimeout(G);G=setTimeout(()=>{Z.value=J,G=null},Q)}),Z}var O3=k9;function D3(J){return JSON.parse(JSON.stringify(J))}var C3={justNow:"just now",past:(J)=>`${J} ago`,future:(J)=>`in ${J}`,second:(J)=>`${J} second${J>1?"s":""}`,minute:(J)=>`${J} minute${J>1?"s":""}`,hour:(J)=>`${J} hour${J>1?"s":""}`,day:(J)=>`${J} day${J>1?"s":""}`,week:(J)=>`${J} week${J>1?"s":""}`,month:(J)=>`${J} month${J>1?"s":""}`,year:(J)=>`${J} year${J>1?"s":""}`};function P3(J,Q={}){let Z={...C3,...Q.messages},G=J instanceof Date?J:new Date(J),K=Date.now()-G.getTime(),z=Math.abs(K),q=Math.floor(z/1000),M=Math.floor(q/60),B=Math.floor(M/60),Y=Math.floor(B/24),X=Math.floor(Y/7),W=Math.floor(Y/30),_=Math.floor(Y/365),H=K<0;function F(L){return H?Z.future(L):Z.past(L)}if(q<5)return Z.justNow;if(q<60)return F(Z.second(q));if(M<60)return F(Z.minute(M));if(B<24)return F(Z.hour(B));if(Y<7)return F(Z.day(Y));if(X<4)return F(Z.week(X));if(W<12)return F(Z.month(W));return F(Z.year(_))}import{watch as E3}from"@stacksjs/stx";function U3(J){function Q(M,B={}){let{timeout:Y,throwOnTimeout:X=!1}=B;if(M(J.value))return Promise.resolve(J.value);return new Promise((W,_)=>{let H=null,F=E3(J,(L)=>{if(M(L)){if(F(),H!==null)clearTimeout(H);W(L)}});if(Y!==void 0)H=setTimeout(()=>{if(F(),X)_(Error("Timeout"));else W(J.value)},Y)})}function Z(M,B){return Q((Y)=>Y===M,B)}function G(M){return Q((B)=>Boolean(B),M)}function $(M){return Q((B)=>B===null,M)}function K(M){return Q((B)=>B===void 0,M)}function z(M){return Q((B)=>Number.isNaN(B),M)}function q(M){let B=J.value;return Q((Y)=>Y!==B,M)}return{toMatch:Q,toBe:Z,toBeTruthy:G,toBeNull:$,toBeUndefined:K,toBeNaN:z,changed:q,not:{toBe:(M,B)=>Q((Y)=>Y!==M,B),toBeTruthy:(M)=>Q((B)=>!B,M),toBeNull:(M)=>Q((B)=>B!==null,M),toBeUndefined:(M)=>Q((B)=>B!==void 0,M),toBeNaN:(M)=>Q((B)=>!Number.isNaN(B),M)}}}import{ref as j3}from"@stacksjs/stx";function T3(J){if(b(J))return J;return j3(J)}function V3(J,Q){for(let[Z,G]of Object.entries(Q))if(Z!=="value")J[Z]=G;return J}function R3(J,Q){let Z=new Map,G=Q??((...K)=>JSON.stringify(K)),$=function(...K){let z=G(...K);if(Z.has(z))return Z.get(z);let q=J(...K);return Z.set(z,q),q};return $.load=(...K)=>{let z=G(...K),q=J(...K);return Z.set(z,q),q},$.delete=(...K)=>{let z=G(...K);Z.delete(z)},$.clear=()=>{Z.clear()},$.cache=Z,$}function I3(J,Q){let Z={...J};return Object.defineProperty(Z,Symbol.iterator,{enumerable:!1,value(){let G=0;return{next:()=>({value:Q[G++],done:G>Q.length})}}}),Z}import{watch as iJ}from"@stacksjs/stx";function S3(J,Q,Z={}){let{direction:G="both"}=Z,$=!1,K=[];if(G==="both"||G==="ltr")K.push(iJ(J,(z)=>{if($)return;$=!0,Q.value=z,$=!1}));if(G==="both"||G==="rtl")K.push(iJ(Q,(z)=>{if($)return;$=!0,J.value=z,$=!1}));return()=>{for(let z of K)z()}}function b3(J,Q){let Z=J.map((G)=>iJ(G,($)=>{Q.value=$}));return()=>{for(let G of Z)G()}}function x3(J){let Q=!1,Z;return()=>{if(!Q)Z=J(),Q=!0;return Z}}function y3(J){let Q=0,Z;return(...G)=>{if(Q++,!Z)Z=J(...G);return Z}}import{onUnmounted as rJ}from"@stacksjs/stx";function w3(J){J()}function k3(J){J()}function g3(J){try{rJ(J)}catch{}}function h3(J){try{rJ(J)}catch{}}function f3(J){try{rJ(J)}catch{}}import{ref as p,watch as g9}from"@stacksjs/stx";function h(J,Q){if(b(J))g9(J,Q)}function f(J){return A(J)}function v3(J,Q,Z){let G=p([]);function $(){let K=f(J),z=f(Q);if(Z)G.value=K.filter((q)=>!z.some((M)=>Z(q,M)));else G.value=K.filter((q)=>!z.includes(q))}return $(),h(J,$),h(Q,$),G}function m3(J,Q){let Z=p(!1);function G(){Z.value=f(J).every(Q)}return G(),h(J,G),Z}function p3(J,Q){let Z=p([]);function G(){Z.value=f(J).filter(Q)}return G(),h(J,G),Z}function d3(J,Q){let Z=p(void 0);function G(){Z.value=f(J).find(Q)}return G(),h(J,G),Z}function u3(J,Q){let Z=p(-1);function G(){Z.value=f(J).findIndex(Q)}return G(),h(J,G),Z}function c3(J,Q,Z){let G=p(!1);function $(){let K=f(J),z=A(Q);if(Z)G.value=K.some((q)=>Z(q,z));else G.value=K.includes(z)}if($(),h(J,$),b(Q))g9(Q,$);return G}function l3(J,Q){let Z=p([]);function G(){Z.value=f(J).map(Q)}return G(),h(J,G),Z}function i3(J,Q,Z){let G=p(Z);function $(){G.value=f(J).reduce(Q,Z)}return $(),h(J,$),G}function r3(J,Q){let Z=p(!1);function G(){Z.value=f(J).some(Q)}return G(),h(J,G),Z}function s3(J,Q){let Z=p([]);function G(){let $=f(J);if(Q)Z.value=$.filter((K,z)=>$.findIndex((q)=>Q(K,q))===z);else Z.value=[...new Set($)]}return G(),h(J,G),Z}export{q4 as whenever,S4 as watchWithFilter,R4 as watchTriggerable,O9 as watchThrottled,D9 as watchPausable,X4 as watchOnce,T4 as watchImmediate,C9 as watchIgnorable,U4 as watchDeep,N9 as watchDebounced,P4 as watchAtMost,O4 as watchArray,l6 as useWindowSize,o6 as useWindowScroll,s6 as useWindowFocus,$3 as useWebWorkerFn,J3 as useWebWorker,x4 as useWebSocket,s2 as useWebNotification,t2 as useWakeLock,Z3 as useVirtualList,o2 as useVibrate,p6 as useUrlSearchParams,S8 as useTrunc,x2 as useTransition,B$ as useToggle,Y3 as useToString,B3 as useToNumber,V6 as useTitle,E$ as useTimestamp,Z6 as useTimeoutPoll,J6 as useTimeoutFn,a$ as useTimeout,V$ as useTimeAgo,Z4 as useThrottledRefHistory,RJ as useThrottledRef,w$ as useThrottleFn,d$ as useThrottle,i2 as useTextareaAutosize,f6 as useTextSelection,g6 as useTextDirection,O7 as useSwipe,q3 as useSupported,I8 as useSum,v2 as useStyleTag,$J as useStorage,d8 as useStepper,r8 as useSorted,N2 as useShare,c9 as useSessionStorage,Q8 as useScrollLock,t6 as useScroll,g2 as useScriptTag,_2 as useScreenSafeArea,W2 as useScreenOrientation,R8 as useRound,l4 as useResizeObserver,e8 as useRefHistory,z6 as useRafFn,_$ as useQuery,f8 as usePrevious,G$ as usePreferredReducedMotion,X2 as usePreferredLanguages,aJ as usePreferredDark,$$ as usePreferredContrast,t9 as usePreferredColorScheme,V8 as usePrecision,C7 as usePointerSwipe,E7 as usePointerLock,L7 as usePointer,A2 as usePermission,H2 as useParentElement,j7 as useParallax,t7 as usePageLeave,q$ as useOnline,G3 as useOffsetPagination,P2 as useObjectUrl,D$ as useNow,M$ as useNetwork,z2 as useNavigatorLanguage,s4 as useMutationObserver,Y$ as useMutation,F7 as useMousePressed,Y7 as useMouseInElement,W7 as useMouse,J2 as useMounted,T8 as useMin,R3 as useMemoize,H6 as useMediaQuery,j8 as useMax,zJ as useManualRefHistory,O8 as useMagicKeys,u9 as useLocalStorage,p8 as useLastChanged,L8 as useKeyModifier,s$ as useIntervalFn,l$ as useInterval,hJ as useIntersectionObserver,K8 as useInfiniteScroll,E2 as useImage,n7 as useIdle,V7 as useGeolocation,q8 as useFullscreen,X6 as useFps,H$ as useForm,u7 as useFocusWithin,m7 as useFocus,U8 as useFloor,u2 as useFileDialog,PJ as useFetch,S6 as useFavicon,c2 as useEyeDropper,w4 as useEventSource,S$ as useEventListener,x$ as useEventBus,J7 as useElementVisibility,o4 as useElementSize,Z7 as useElementHover,K7 as useElementByPoint,t4 as useElementBounding,G2 as useDropZone,Q2 as useDraggable,y6 as useDocumentVisibility,w7 as useDevicePixelRatio,b7 as useDeviceOrientation,I7 as useDeviceMotion,$4 as useDebouncedRefHistory,VJ as useDebouncedRef,y$ as useDebounceFn,v$ as useDebounce,L$ as useDateFormat,r9 as useDark,l8 as useCycleList,M7 as useCssVar,k8 as useCounter,p2 as useConfirmDialog,n9 as useColorMode,a8 as useCloned,W6 as useClipboardItems,B6 as useClipboard,E8 as useClamp,P8 as useCeil,u6 as useBrowserLocation,g4 as useBroadcastChannel,L6 as useBreakpoints,g7 as useBattery,T2 as useBase64,C8 as useAverage,G4 as useAsyncState,K4 as useAsyncQueue,s3 as useArrayUnique,r3 as useArraySome,i3 as useArrayReduce,l3 as useArrayMap,c3 as useArrayIncludes,u3 as useArrayFindIndex,d3 as useArrayFind,p3 as useArrayFilter,m3 as useArrayEvery,v3 as useArrayDifference,R2 as useAnimate,i7 as useActiveElement,D8 as useAbs,U3 as until,X7 as unrefElement,A as unref,g3 as tryOnUnmounted,f3 as tryOnScopeDispose,w3 as tryOnMounted,h3 as tryOnBeforeUnmount,k3 as tryOnBeforeMount,R as toValue,O9 as throttledWatch,RJ as throttledRef,b3 as syncRefs,S3 as syncRef,f9 as setSSRHandler,T3 as resolveRef,RJ as refThrottled,A3 as refDefault,VJ as refDebounced,k9 as refAutoReset,$9 as queryClient,H4 as pausableWatch,x8 as or,H8 as onStartTyping,_8 as onLongPress,B8 as onKeyUp,bJ as onKeyStroke,X8 as onKeyDown,M8 as onClickOutside,D as noop,I3 as makeDestructurable,H9 as logicOr,b8 as logicNot,b as isRef,K3 as isDefined,L4 as ignorableWatch,h9 as getSSRHandler,P3 as formatTimeAgo,V3 as extendRef,y2 as executeTransition,E9 as eagerComputed,x as defaultWindow,NJ as defaultNavigator,JJ as defaultDocument,N9 as debouncedWatch,VJ as debouncedRef,v9 as customStorageEventName,y3 as createSharedComposable,J9 as createQueryClient,x3 as createGlobalState,W$ as createFetch,GJ as createEventHook,E9 as computedEager,P9 as computedAsync,D3 as cloneFnJSON,C6 as breakpointsVuetify,N6 as breakpointsTailwind,U6 as breakpointsSematic,P6 as breakpointsQuasar,E6 as breakpointsMasterCss,O6 as breakpointsBootstrapV5,X9 as breakpointsBootstrap,D6 as breakpointsAntDesign,O3 as autoResetRef,P9 as asyncComputed,y8 as and,cJ as TransitionPresets};
|
|
2
|
+
export{MY as whenever,tY as watchWithFilter,rY as watchTriggerable,wY as watchThrottled,yY as watchPausable,RY as watchOnce,aY as watchImmediate,fY as watchIgnorable,cY as watchDeep,PY as watchDebounced,dY as watchAtMost,hY as watchArray,QX as useWindowSize,NX as useWindowScroll,zX as useWindowFocus,_2 as useWebWorkerFn,Z2 as useWebWorker,sY as useWebSocket,q2 as useWebNotification,j2 as useWakeLock,K2 as useVirtualList,Y2 as useVibrate,ZX as useUrlSearchParams,sX as useTrunc,S1 as useTransition,T as useToggle,W2 as useToString,B2 as useToNumber,tq as useTitle,s as useTimestamp,Rq as useTimeoutPoll,Mq as useTimeoutFn,Aq as useTimeout,qq as useTimeAgo,OY as useThrottledRefHistory,Nq as useThrottledRef,Qq as useThrottleFn,Iq as useThrottle,s1 as useTextareaAutosize,jX as useTextSelection,YX as useTextDirection,b0 as useSwipe,V2 as useSupported,uX as useSum,c1 as useStyleTag,N as useStorage,ZY as useStepper,QY as useSorted,R1 as useShare,I as useSessionStorage,IX as useScrollLock,HX as useScroll,d1 as useScriptTag,L1 as useScreenSafeArea,O1 as useScreenOrientation,tX as useRound,Q0 as useResizeObserver,HY as useRefHistory,Pq as useRafFn,c as useQuery,YY as usePrevious,v as usePreferredReducedMotion,I1 as usePreferredLanguages,k as usePreferredDark,F as usePreferredContrast,E as usePreferredColorScheme,oX as usePrecision,S0 as usePointerSwipe,h0 as usePointerLock,y0 as usePointer,M1 as usePermission,A1 as useParentElement,d0 as useParallax,G1 as usePageLeave,p as useOnline,U2 as useOffsetPagination,P1 as useObjectUrl,t as useNow,D as useNetwork,H1 as useNavigatorLanguage,z0 as useMutationObserver,l as useMutation,w0 as useMousePressed,P0 as useMouseInElement,R0 as useMouse,Q1 as useMounted,rX as useMin,b2 as useMemoize,Sq as useMediaQuery,nX as useMax,NY as useManualRefHistory,bX as useMagicKeys,H as useLocalStorage,jY as useLastChanged,yX as useKeyModifier,Lq as useIntervalFn,Oq as useInterval,G0 as useIntersectionObserver,OX as useInfiniteScroll,w1 as useImage,Z1 as useIdle,c0 as useGeolocation,LX as useFullscreen,wq as useFps,a as useForm,Y1 as useFocusWithin,q1 as useFocus,aX as useFloor,r1 as useFileDialog,f as useFetch,sq as useFavicon,t1 as useEyeDropper,q0 as useEventSource,Yq as useEventListener,jq as useEventBus,I0 as useElementVisibility,N0 as useElementSize,O0 as useElementHover,L0 as useElementByPoint,H0 as useElementBounding,N1 as useDropZone,z1 as useDraggable,qX as useDocumentVisibility,t0 as useDevicePixelRatio,r0 as useDeviceOrientation,a0 as useDeviceMotion,IY as useDebouncedRefHistory,zq as useDebouncedRef,Gq as useDebounceFn,Hq as useDebounce,r as useDateFormat,O as useDark,GY as useCycleList,A0 as useCssVar,qY as useCounter,a1 as useConfirmDialog,C as useColorMode,zY as useCloned,bq as useClipboardItems,yq as useClipboard,iX as useClamp,cX as useCeil,GX as useBrowserLocation,Y0 as useBroadcastChannel,rq as useBreakpoints,s0 as useBattery,y1 as useBase64,lX as useAverage,LY as useAsyncState,AY as useAsyncQueue,G3 as useArrayUnique,_3 as useArraySome,Z3 as useArrayReduce,J3 as useArrayMap,j3 as useArrayIncludes,$3 as useArrayFindIndex,Y3 as useArrayFind,X3 as useArrayFilter,q3 as useArrayEvery,e2 as useArrayDifference,b1 as useAnimate,j1 as useActiveElement,dX as useAbs,P2 as until,M0 as unrefElement,G as unref,o2 as tryOnUnmounted,u2 as tryOnScopeDispose,n2 as tryOnMounted,t2 as tryOnBeforeUnmount,r2 as tryOnBeforeMount,_ as toValue,A3 as throttledWatch,I3 as throttledRef,m2 as syncRefs,h2 as syncRef,U as setSSRHandler,w2 as resolveRef,O3 as refThrottled,k2 as refDefault,H3 as refDebounced,C2 as refAutoReset,d as queryClient,TY as pausableWatch,mX as or,wX as onStartTyping,PX as onLongPress,RX as onKeyUp,MX as onKeyStroke,FX as onKeyDown,AX as onClickOutside,Z as noop,S2 as makeDestructurable,hX as logicOr,gX as logicNot,J as isRef,x2 as isDefined,SY as ignorableWatch,Q as getSSRHandler,R2 as formatTimeAgo,y2 as extendRef,g1 as executeTransition,z3 as eagerComputed,j as defaultWindow,$ as defaultNavigator,Y as defaultDocument,L3 as debouncedWatch,N3 as debouncedRef,z as customStorageEventName,i2 as createSharedComposable,m as createQueryClient,l2 as createGlobalState,g as createFetch,Zq as createEventHook,Z0 as computedEager,j0 as computedAsync,M2 as cloneFnJSON,nq as breakpointsVuetify,aq as breakpointsTailwind,iq as breakpointsSematic,cq as breakpointsQuasar,lq as breakpointsMasterCss,dq as breakpointsBootstrapV5,mq as breakpointsBootstrap,hq as breakpointsAntDesign,A2 as autoResetRef,Q3 as asyncComputed,SX as and,h1 as TransitionPresets};
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/composables",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"
|
|
4
|
+
"sideEffects": false,
|
|
5
|
+
"version": "0.70.86",
|
|
5
6
|
"description": "Stacks composables powered by stx reactivity.",
|
|
6
7
|
"author": "Chris Breuer",
|
|
7
8
|
"contributors": [
|
|
@@ -52,7 +53,7 @@
|
|
|
52
53
|
},
|
|
53
54
|
"dependencies": {
|
|
54
55
|
"@stacksjs/stx": "^0.2.82",
|
|
55
|
-
"@stacksjs/datetime": "0.70.
|
|
56
|
+
"@stacksjs/datetime": "0.70.86"
|
|
56
57
|
},
|
|
57
58
|
"devDependencies": {
|
|
58
59
|
"better-dx": "^0.2.16"
|