voodoojs 0.6.2 → 0.7.0
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/{chunk-NNU6WOOU.js → chunk-4T2UIPWX.js} +4 -4
- package/dist/{chunk-A2UOVQBP.js → chunk-CYN6VLMD.js} +4 -4
- package/dist/{chunk-JZIYRIY6.js → chunk-E5T65CEI.js} +5 -5
- package/dist/{chunk-U76IRJKH.js → chunk-GIWKGFGY.js} +4 -4
- package/dist/{chunk-CNHNFTPC.js → chunk-II3XBOAP.js} +13 -13
- package/dist/{chunk-PHMBDPWH.js → chunk-JB2YYNK6.js} +7 -7
- package/dist/{chunk-5777LJVW.js → chunk-MMLUK37L.js} +3 -3
- package/dist/{chunk-4LR3IFPX.js → chunk-QO3I7VLJ.js} +5 -5
- package/dist/{chunk-PQZEVFVZ.js → chunk-WSDB7K4X.js} +6 -6
- package/dist/{chunk-E27NRARW.js → chunk-YOZTHZS2.js} +3 -3
- package/dist/{chunk-234ZLC6W.js → chunk-ZIWLQZZL.js} +4 -4
- package/dist/essential.cjs +2 -2
- package/dist/essential.js +10 -10
- package/dist/gpu.cjs +1 -1
- package/dist/gpu.js +10 -10
- package/dist/http.cjs +1 -1
- package/dist/http.js +5 -5
- package/dist/index.cjs +6 -6
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +24 -24
- package/dist/reactivity.cjs +1 -1
- package/dist/reactivity.js +2 -2
- package/dist/socket.cjs +1 -1
- package/dist/socket.js +9 -9
- package/dist/style-SLQ6PHZK.js +5 -0
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +2 -2
- package/dist/voodoo.core.js +2 -2
- package/dist/voodoo.core.min.js +2 -2
- package/dist/voodoo.full.js +6 -6
- package/dist/voodoo.full.min.js +4 -4
- package/dist/voodoo.js +2 -2
- package/dist/voodoo.min.js +2 -2
- package/package.json +1 -1
- package/dist/style-XEUAGGJK.js +0 -5
package/dist/voodoo.min.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Voodoo.js v0.
|
|
2
|
+
* Voodoo.js v0.7.0
|
|
3
3
|
* JavaScript feels like magic.
|
|
4
4
|
* (c) 2026 Voodoo.js contributors. MIT License.
|
|
5
5
|
*/
|
|
@@ -135,7 +135,7 @@ Suggestion: attribute expressions accept a single value. If the logic spans more
|
|
|
135
135
|
.v-json-object dt{font-weight:600;color:var(--v-text-muted,#6B6580)}
|
|
136
136
|
.v-json-object dd{margin:0}
|
|
137
137
|
.v-json-empty{color:var(--v-text-muted,#6B6580);font-style:italic}
|
|
138
|
-
`)}))}function Nd(e){let t=e.tagName;if(t==="FORM")return"submit";if(t==="INPUT"||t==="SELECT"||t==="TEXTAREA"){let n=e.type;return n==="button"||n==="submit"?"click":"change"}return"click"}function $d({el:e,cleanup:t,run:n}){var u,d;let r=D(e,"trigger")||Nd(e),[o,...i]=r.split(/[.\s]+/),s=U((u=D(e,"poll"))!=null?u:void 0,0);if(s>0){n();let p=setInterval(()=>{document.visibilityState==="visible"&&n()},s);t(()=>clearInterval(p));return}if(o==="load"||o==="ready"){n();return}if(o==="visible"||o==="revealed"){if(typeof IntersectionObserver=="undefined"){n();return}let p=new IntersectionObserver(f=>{for(let m of f)m.isIntersecting&&(n(),i.includes("repeat")||p.unobserve(e))},{rootMargin:"80px"});p.observe(e),t(()=>p.disconnect());return}let a=i.includes("once"),c=U((d=D(e,"debounce"))!=null?d:void 0,0),l=p=>{(e.tagName==="FORM"||e.href)&&p.preventDefault(),n(p)};c>0&&(l=be(l,c)),e.addEventListener(o,l,{once:a}),t(()=>e.removeEventListener(o,l))}var Od=[["get","GET"],["post","POST"],["put","PUT"],["patch","PATCH"],["delete","DELETE"]];for(let[e,t]of Od)b(e,({el:n,scope:r,expression:o,cleanup:i})=>{$d({el:n,scope:r,cleanup:i,run:a=>{let c=Dn(o,r);if(!c)return;let l=D(n,"body")||D(n,"data-body"),u=l?$(l,r.child({$event:a}),"v-body"):void 0,d=D(n,"params"),p=d?$(d,r,"v-params"):void 0;Hn({el:n,scope:r,method:t,url:c,body:u,params:p,event:a})}})});function Dn(e,t){let n=e.trim();if(!n)return"";if((/^[./#?]/.test(n)||/^https?:\/\//i.test(n)||/^[\w-]+\/[\w\-/.]*$/.test(n))&&!/[+`'"]|\$\{/.test(n))return n;let o=$(n,t,"URL");return typeof o=="string"?o:n}b("load",({el:e,scope:t,expression:n})=>{let r=Dn(n,t);r&&Hn({el:e,scope:t,method:"GET",url:r})});b("load-visible",({el:e,scope:t,cleanup:n,expression:r})=>{let o=Dn(r,t);if(!o)return;if(typeof IntersectionObserver=="undefined"){Hn({el:e,scope:t,method:"GET",url:o});return}let i=new IntersectionObserver(s=>{for(let a of s)a.isIntersecting&&(i.unobserve(e),Hn({el:e,scope:t,method:"GET",url:o}))},{rootMargin:"120px"});i.observe(e),n(()=>i.disconnect())});b("search",({el:e,scope:t,expression:n,cleanup:r})=>{var d,p;let o=e,i=Dn(n,t),s=D(e,"param")||o.getAttribute("name")||"q",a=U((d=D(e,"debounce"))!=null?d:void 0,300),c=Number((p=D(e,"min-length"))!=null?p:0),l=be(()=>{let f=o.value.trim();f.length<c||Hn({el:e,scope:t,method:"GET",url:i,params:{[s]:f}})},a),u=()=>l();o.addEventListener("input",u),r(()=>{o.removeEventListener("input",u),l.cancel()})});b("resource",({el:e,scope:t,expression:n,cleanup:r})=>{var c,l,u,d;let o=n.indexOf(":"),i=D(e,"as")||"resource",s=n.trim();if(o>-1){let p=n.slice(0,o).trim();/^[A-Za-z_$][\w$]*$/.test(p)&&(i=p,s=n.slice(o+1).trim())}let a=kr(()=>Dn(s,t),{method:(D(e,"method")||"GET").toUpperCase(),params:()=>D(e,"params")?$(D(e,"params"),t,"v-params"):void 0,cache:U((c=D(e,"cache"))!=null?c:void 0,0)||void 0,retry:Number((l=D(e,"retry"))!=null?l:0),timeout:U((u=D(e,"timeout"))!=null?u:void 0,me.defaults.timeout),jsonPath:D(e,"json-path"),poll:U((d=D(e,"poll"))!=null?d:void 0,0),manual:mi(e,"manual"),onSuccess:p=>on(e,"voodoo:success",{data:p}),onError:(p,f)=>on(e,"voodoo:error",{error:p,message:f})});t.set(i,a),r(()=>a.stop())},{priority:P.DATA});for(let e of["target","swap","trigger","poll","param","params","body","data-body","headers","cache","retry","timeout","as","json-path","template","offline-queue","min-length","scroll-to","manual","debounce","throttle","indicator"])b(e,()=>{},{priority:P.TRANSITION});oa(da);ua(rt);ha(rc);Fa();var Pn=new Map;function nc(e,t){let n=Pn.get(e);return n||Pn.set(e,n=new Set),n.add(t),()=>n.delete(t)}function Fd(e,t){let n=nc(e,r=>{n(),t(r)});return n}function Id(e,t){let n=Pn.get(e);if(n)for(let r of[...n])try{r(t)}catch(o){z(o,`event "${e}"`)}}function jd(e,t){var n;if(!t){Pn.delete(e);return}(n=Pn.get(e))==null||n.delete(t)}function rc(e,t){var r,o;let n=typeof t=="function"?{mounted:t,updated:t}:t;b(e,i=>{var u,d;let s,a=!1,c=p=>{var f,m;return{el:i.el,value:p,oldValue:s,arg:i.arg,modifiers:i.modifiers,expression:i.expression,scope:i.scope,instance:(m=(f=i.scope.owner)==null?void 0:f.component)!=null?m:null}},l=n.raw?i.expression:i.evaluate();(u=n.created)==null||u.call(n,i.el,c(l)),(d=n.beforeMount)==null||d.call(n,i.el,c(l)),i.effect(()=>{var m,v;let p=n.raw?i.expression:i.evaluate();if(!a){a=!0,s=p,(m=n.mounted)==null||m.call(n,i.el,c(p));return}if(p===s)return;let f=c(p);(v=n.updated)==null||v.call(n,i.el,f),s=p}),i.cleanup(()=>{var f,m;let p=c(s);(f=n.beforeUnmount)==null||f.call(n,i.el,p),(m=n.unmounted)==null||m.call(n,i.el,p)})},{priority:(r=n.priority)!=null?r:P.DEFAULT,terminal:(o=n.terminal)!=null?o:!1})}function Bd(e){return Object.defineProperties(Fe.data,Object.getOwnPropertyDescriptors(e)),Fe.data}var qd="0.4.6",Ar={...ni,version:qd,config:E,reactive:V,ref:bn,shallowRef:Do,computed:wn,effect:Ee,watch:ve,watchEffect:No,nextTick:ht,toRaw:oe,markRaw:Ro,unref:Po,stop:Ao,effectScope:So,EffectScope:Me,flushSync:xo,data:Bd,store:Ea,stores:vr,removeStore:xa,storeNames:Ta,scope:Fe,component:Wt,components:le,directive:rc,directives:We,magic:H,magics:En,createApp:ya,start:sa,whenReady:pr,whenElement:mr,walk:W,refresh:ca,destroy:q,stopObserving:aa,getScope:zt,findScope:Ce,addCleanup:Ie,parseAttribute:qt,parse:Oe,tokenize:or,evaluate:C,evaluateIn:$,stringify:tt,clearParseCache:$s,globals:pe,http:me,request:it,HttpError:te,resource:kr,toast:Re,storage:Q,session:wr,cookie:Er,cache:xr,url:at,theme:je,clipboard:ci,screen:He,network:At,enter:Cn,leave:Rn,fadeIn:nn,fadeOut:rn,slideUp:Mt,slideDown:St,viewTransition:za,injectStyle:G,ensureTokens:ie,on:nc,once:Fd,off:jd,emit:Id,use(e,t){ir(Ar,e,t)},onError(e){To(e)},instances:dr,Scope:wt,PRIORITY:P,VoodooSyntaxError:_,VoodooRuntimeError:ce};wa(Ar);ne();var zd=new Set(["animation-iteration-count","aspect-ratio","border-image-slice","column-count","flex","flex-grow","flex-shrink","font-weight","grid-area","grid-column","grid-row","line-height","opacity","order","orphans","scale","tab-size","widows","z-index","zoom"]);function fc(e){return e.startsWith("--")?e:e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function De(e){return e.length<2?e:Array.from(new Set(e))}function Ct(e){return String(e!=null?e:"").split(/\s+/).filter(Boolean)}function gi(e){if(typeof document=="undefined")return[];let t=document.createElement("template");t.innerHTML=e.trim();let n=[];for(let r of Array.from(t.content.children))n.push(r);return n}function pc(e){return e.length>2&&e.charCodeAt(0)===60&&e.endsWith(">")}function Ud(e){if(e==null)return typeof document=="undefined"?[]:[document];if(e instanceof Be)return e.toArray();if(typeof e=="string")return Rt(e);if(typeof e=="function")return typeof document=="undefined"?[]:[document];let t=Rt(e);return t.length?t:typeof document=="undefined"?[]:[document]}function Rt(e,t){if(e==null)return[];if(typeof e=="string"){let o=e.trim();if(!o)return[];if(pc(o))return gi(o);let i=[];for(let s of Ud(t))try{for(let a of Array.from(s.querySelectorAll(o)))i.push(a)}catch(a){}return De(i)}if(e instanceof Be)return e.toArray();if(typeof e=="function")return[];let n=e;if(typeof n.nodeType=="number"){if(n.nodeType===1)return[n];if(n.nodeType===9){let o=n;return o.documentElement?[o.documentElement]:[]}return n.nodeType===11?Array.from(n.children):[]}let r=e;if(typeof r.length=="number"){let o=[];for(let i=0;i<r.length;i++){let s=r[i];s&&s.nodeType===1&&o.push(s)}return De(o)}return[]}function oc(e){if(e==null)return[];if(typeof e=="string"){let r=e;return pc(r.trim())?gi(r):[document.createTextNode(r)]}if(e instanceof Be)return e.toArray();if(typeof e=="function")return[];let t=e;if(typeof t.nodeType=="number")return[t];let n=e;if(typeof n.length=="number"){let r=[];for(let o=0;o<n.length;o++)n[o]&&r.push(n[o]);return r}return[]}function Sr(e,t,n){let r=fc(t);if(n===null||n===""){e.style.removeProperty(r);return}let o=typeof n=="number"&&!zd.has(r)&&!r.startsWith("--")?`${n}px`:String(n);e.style.setProperty(r,o)}function Vd(e,t){for(let[n,r]of Object.entries(t))Sr(e,n,r)}function ic(e){if(e===void 0)return;if(e==="")return"";if(e==="true")return!0;if(e==="false")return!1;if(e==="null")return null;if(/^-?\d+(\.\d+)?$/.test(e))return Number(e);let t=e.charCodeAt(0);if(t===123||t===91||t===34)try{return JSON.parse(e)}catch(n){return e}return e}function sc(e){return e.replace(/-([a-z0-9])/g,(t,n)=>n.toUpperCase())}var mc=new WeakMap;function ac(e){return e.hasAttribute("hidden")||e.style.display==="none"?!0:e.isConnected?getComputedStyle(e).display==="none":!1}function cc(e){e.removeAttribute("hidden");let t=mc.get(e);t!==void 0&&t!=="none"?e.style.display=t:e.style.removeProperty("display"),e.isConnected&&getComputedStyle(e).display==="none"&&(e.style.display="block")}function lc(e){let t=e.style.display;t&&t!=="none"&&mc.set(e,t),e.style.display="none"}var uc="input,select,textarea";function dc(e){return e.matches(uc)?[e]:Array.from(e.querySelectorAll(uc))}function _d(e){let t=e;if(!t.name||t.disabled)return!1;let n=(t.getAttribute("type")||"").toLowerCase();return!(n==="file"||n==="submit"||n==="reset"||n==="button"||(n==="checkbox"||n==="radio")&&!t.checked)}var Mr=new WeakMap;function Wd(e){let t=Mr.get(e);return t||Mr.set(e,t=[]),t}var Be=class e{constructor(t=[]){S(this,"length");S(this,"elements");this.elements=t,this.length=t.length;let n=this;for(let r=0;r<t.length;r++)n[r]=t[r]}[Symbol.iterator](){return this.elements[Symbol.iterator]()}find(t){let n=[];for(let r of this.elements)try{for(let o of Array.from(r.querySelectorAll(t)))n.push(o)}catch(o){}return new e(De(n))}closest(t){let n=[];for(let r of this.elements){let o=r.closest(t);o&&n.push(o)}return new e(De(n))}parent(t){let n=[];for(let r of this.elements){let o=r.parentElement;o&&(!t||o.matches(t))&&n.push(o)}return new e(De(n))}parents(t){let n=[];for(let r of this.elements){let o=r.parentElement;for(;o;)(!t||o.matches(t))&&n.push(o),o=o.parentElement}return new e(De(n))}children(t){let n=[];for(let r of this.elements)for(let o of Array.from(r.children))(!t||o.matches(t))&&n.push(o);return new e(De(n))}siblings(t){let n=[];for(let r of this.elements){let o=r.parentElement;if(o)for(let i of Array.from(o.children))i!==r&&(!t||i.matches(t))&&n.push(i)}return new e(De(n))}next(t){let n=[];for(let r of this.elements){let o=r.nextElementSibling;o&&(!t||o.matches(t))&&n.push(o)}return new e(De(n))}prev(t){let n=[];for(let r of this.elements){let o=r.previousElementSibling;o&&(!t||o.matches(t))&&n.push(o)}return new e(De(n))}first(){return this.eq(0)}last(){return this.eq(-1)}eq(t){let n=t<0?this.elements.length+t:t,r=this.elements[n];return new e(r?[r]:[])}filter(t){let n=this.elements.filter((r,o)=>typeof t=="function"?t(r,o):r.matches(t));return new e(n)}not(t){let n=this.elements.filter((r,o)=>typeof t=="function"?!t(r,o):!r.matches(t));return new e(n)}has(t){let n=this.elements.filter(r=>typeof t=="string"?r.querySelector(t)!==null:r.contains(t));return new e(n)}is(t){return this.elements.some((n,r)=>typeof t=="function"?t(n,r):n.matches(t))}map(t){return this.elements.map((n,r)=>t(n,r))}each(t){for(let n=0;n<this.elements.length;n++){let r=this.elements[n];if(t.call(r,r,n)===!1)break}return this}get(...t){if(!t.length)return this.toArray();let n=Number(t[0]);return this.elements[n<0?this.elements.length+n:n]}toArray(){return this.elements.slice()}add(t,n){return new e(De([...this.elements,...Rt(t,n)]))}slice(t,n){return new e(this.elements.slice(t,n))}text(...t){var o,i;if(!t.length)return(i=(o=this.elements[0])==null?void 0:o.textContent)!=null?i:"";let n=t[0],r=n==null?"":String(n);for(let s of this.elements){for(let a of Array.from(s.childNodes))q(a);s.textContent=r}return this}html(...t){var o,i;if(!t.length)return(i=(o=this.elements[0])==null?void 0:o.innerHTML)!=null?i:"";let n=t[0],r=n==null?"":String(n);for(let s of this.elements){for(let a of Array.from(s.childNodes))q(a);s.innerHTML=r}return this}val(...t){var r;if(!t.length){let o=this.elements[0];if(!o)return"";let i=o;return o.tagName==="SELECT"&&i.multiple?Array.from(i.selectedOptions).map(s=>s.value):o.type==="checkbox"?o.checked?o.value||"on":"":(r=o.value)!=null?r:""}let n=t[0];for(let o of this.elements){let i=o,s=o;if(i.tagName==="SELECT"&&s.multiple){let a=(Array.isArray(n)?n:[n]).map(String);for(let c of Array.from(s.options))c.selected=a.includes(c.value);continue}if(i.type==="checkbox"||i.type==="radio"){i.checked=Array.isArray(n)?n.map(String).includes(i.value):n===!0||String(n)===i.value;continue}i.value=n==null?"":String(n)}return this}attr(...t){var i,s;let n=t[0];if(n!==null&&typeof n=="object"){for(let a of this.elements)for(let[c,l]of Object.entries(n))l===null||l===!1?a.removeAttribute(c):a.setAttribute(c,l===!0?"":String(l));return this}let r=String(n);if(t.length<2)return(s=(i=this.elements[0])==null?void 0:i.getAttribute(r))!=null?s:void 0;let o=t[1];for(let a of this.elements)o===null||o===!1?a.removeAttribute(r):a.setAttribute(r,o===!0?"":String(o));return this}removeAttr(t){let n=Ct(t);for(let r of this.elements)for(let o of n)r.removeAttribute(o);return this}prop(...t){let n=String(t[0]);if(t.length<2){let r=this.elements[0];return r?r[n]:void 0}for(let r of this.elements)r[n]=t[1];return this}data(...t){let n=t[0];if(!t.length){let i=this.elements[0];if(!i)return{};let s={};for(let[a,c]of Object.entries(i.dataset))s[a]=ic(c);return s}if(n!==null&&typeof n=="object"){for(let i of this.elements)for(let[s,a]of Object.entries(n))i.dataset[sc(s)]=typeof a=="string"?a:JSON.stringify(a!=null?a:null);return this}let r=sc(String(n));if(t.length<2){let i=this.elements[0];return i?ic(i.dataset[r]):void 0}let o=t[1];for(let i of this.elements)i.dataset[r]=typeof o=="string"?o:JSON.stringify(o!=null?o:null);return this}css(...t){let n=t[0];if(n!==null&&typeof n=="object"){for(let o of this.elements)Vd(o,n);return this}let r=String(n);if(t.length<2){let o=this.elements[0];if(!o)return"";let i=fc(r);return((o.isConnected?getComputedStyle(o).getPropertyValue(i):"")||o.style.getPropertyValue(i)).trim()}for(let o of this.elements)Sr(o,r,t[1]);return this}width(...t){if(!t.length){let n=this.elements[0];return n?n.getBoundingClientRect().width:0}for(let n of this.elements)Sr(n,"width",t[0]);return this}height(...t){if(!t.length){let n=this.elements[0];return n?n.getBoundingClientRect().height:0}for(let n of this.elements)Sr(n,"height",t[0]);return this}offset(){let t=this.elements[0];if(!t)return{top:0,left:0};let n=t.getBoundingClientRect();return{top:n.top+window.scrollY,left:n.left+window.scrollX}}position(){let t=this.elements[0];return t?{top:t.offsetTop,left:t.offsetLeft}:{top:0,left:0}}scrollTop(...t){var r,o;if(!t.length)return(o=(r=this.elements[0])==null?void 0:r.scrollTop)!=null?o:0;let n=Number(t[0])||0;for(let i of this.elements)i.scrollTop=n;return this}addClass(t){let n=Ct(t);if(n.length)for(let r of this.elements)r.classList.add(...n);return this}removeClass(t){let n=Ct(t);if(n.length)for(let r of this.elements)r.classList.remove(...n);return this}toggleClass(t,n){let r=Ct(t);for(let o of this.elements)for(let i of r)n===void 0?o.classList.toggle(i):o.classList.toggle(i,n);return this}hasClass(t){let n=Ct(t);return n.length?this.elements.some(r=>n.every(o=>r.classList.contains(o))):!1}insert(t,n){let r=this.elements.length;for(let o=0;o<r;o++){let i=this.elements[o];for(let s of oc(t))n(i,o===r-1?s:s.cloneNode(!0))}return this}append(t){return this.insert(t,(n,r)=>n.appendChild(r))}prepend(t){return this.insert(t,(n,r)=>n.insertBefore(r,n.firstChild))}before(t){return this.insert(t,(n,r)=>{var o;return(o=n.parentNode)==null?void 0:o.insertBefore(r,n)})}after(t){return this.insert(t,(n,r)=>{var o;return(o=n.parentNode)==null?void 0:o.insertBefore(r,n.nextSibling)})}appendTo(t){let n=Rt(t);for(let r=0;r<n.length;r++)for(let o of this.elements)n[r].appendChild(r===n.length-1?o:o.cloneNode(!0));return this}prependTo(t){let n=Rt(t);for(let r=0;r<n.length;r++){let o=n[r],i=this.elements.map(s=>r===n.length-1?s:s.cloneNode(!0));for(let s=i.length-1;s>=0;s--)o.insertBefore(i[s],o.firstChild)}return this}replaceWith(t){for(let n of this.elements){let r=n.parentNode;if(r){for(let o of oc(t))r.insertBefore(o,n);q(n),n.remove()}}return this}wrap(t){var n;for(let r of this.elements){let o=Rt(t)[0];if(!o)continue;let i=o.cloneNode(!0);(n=r.parentNode)==null||n.insertBefore(i,r);let s=i;for(;s.firstElementChild;)s=s.firstElementChild;s.appendChild(r)}return this}unwrap(){let t=new Set;for(let n of this.elements){let r=n.parentElement;r&&r!==document.body&&t.add(r)}for(let n of t){let r=n.parentNode;if(r){for(;n.firstChild;)r.insertBefore(n.firstChild,n);q(n),n.remove()}}return this}remove(){for(let t of this.elements)q(t),t.remove();return this}empty(){for(let t of this.elements){for(let n of Array.from(t.childNodes))q(n);t.replaceChildren()}return this}clone(t=!0){return new e(this.elements.map(n=>n.cloneNode(t)))}on(t,...n){var a;let r=typeof n[0]=="string",o=r?n[0]:null,i=r?n[1]:n[0],s=(a=r?n[2]:n[1])!=null?a:{};if(typeof i!="function")return this;for(let c of this.elements)for(let l of Ct(t)){let u=d=>{if(!o){i.call(c,d);return}let p=d.target,f=p==null?void 0:p.closest(o);!f||!c.contains(f)||i.call(f,d)};c.addEventListener(l,u,s),Wd(c).push({type:l,selector:o,handler:i,wrapped:u,options:s})}return this}off(t,n,r){let o=typeof n=="string"?n:null,i=typeof n=="function"?n:r!=null?r:null,s=t?Ct(t):null;for(let a of this.elements){let c=Mr.get(a);if(!c)continue;let l=[];for(let u of c){let d=!s||s.includes(u.type),p=o===null||u.selector===o,f=i===null||u.handler===i;d&&p&&f?a.removeEventListener(u.type,u.wrapped,u.options):l.push(u)}Mr.set(a,l)}return this}once(t,...n){let r=typeof n[0]=="string",o=r?n[0]:null,i=r?n[1]:n[0];if(typeof i!="function")return this;let s=this,a=function(c){return o?s.off(t,o,a):s.off(t,a),i.call(this,c)};return o?this.on(t,o,a):this.on(t,a)}trigger(t,n){for(let r of this.elements){if(n===void 0&&typeof r[t]=="function"){r[t]();continue}let o=new CustomEvent(t,{detail:n,bubbles:!0,cancelable:!0});o.__voodoo=!0,r.dispatchEvent(o)}return this}emit(t,n){for(let r of this.elements){let o=new CustomEvent(t,{detail:n,bubbles:!0,cancelable:!0});o.__voodoo=!0,r.dispatchEvent(o)}return this}show(){for(let t of this.elements)cc(t);return this}hide(){for(let t of this.elements)lc(t);return this}toggle(t){for(let n of this.elements)(t===void 0?ac(n):t)?cc(n):lc(n);return this}fadeIn(t=220){for(let n of this.elements)n.removeAttribute("hidden"),nn(n,t);return this}fadeOut(t=220){for(let n of this.elements)rn(n,t);return this}slideUp(t=240){for(let n of this.elements)Mt(n,t);return this}slideDown(t=240){for(let n of this.elements)n.removeAttribute("hidden"),St(n,t);return this}slideToggle(t=240){for(let n of this.elements)ac(n)?(n.removeAttribute("hidden"),St(n,t)):Mt(n,t);return this}animate(t,n=300){for(let r of this.elements)typeof r.animate=="function"&&r.animate(t,n);return this}scrollIntoView(t={behavior:"smooth",block:"start"}){var n;return(n=this.elements[0])==null||n.scrollIntoView(t),this}serialize(){let t=this.elements[0];if(!t)return"";let n=new URLSearchParams;for(let r of dc(t)){if(!_d(r))continue;let o=r,i=r;if(o.tagName==="SELECT"&&i.multiple){for(let s of Array.from(i.selectedOptions))n.append(o.name,s.value);continue}n.append(o.name,o.value)}return n.toString()}serializeObject(){var r,o,i,s;let t=this.elements[0],n={};if(!t)return n;for(let a of dc(t)){let c=a;if(!c.name||c.disabled)continue;let l=(c.getAttribute("type")||"").toLowerCase();if(l==="submit"||l==="reset"||l==="button")continue;let u=c.name.endsWith("[]"),d=u?c.name.slice(0,-2):c.name,p=a,f;if(l==="checkbox"){if(!c.checked&&!u){n[d]=(r=n[d])!=null?r:!1;continue}if(!c.checked)continue;f=c.value==="on"?!0:c.value}else if(l==="radio"){if(!c.checked)continue;f=c.value}else l==="file"?f=c.multiple?Array.from((o=c.files)!=null?o:[]):(s=(i=c.files)==null?void 0:i[0])!=null?s:null:c.tagName==="SELECT"&&p.multiple?f=Array.from(p.selectedOptions).map(m=>m.value):l==="number"||l==="range"?f=c.value===""?null:Number(c.value):f=c.value;if(u){let m=n[d];Array.isArray(m)?m.push(f):n[d]=[f];continue}if(Object.prototype.hasOwnProperty.call(n,d)){let m=n[d];Array.isArray(m)?m.push(f):m===void 0||m===!1?n[d]=f:n[d]=[m,f];continue}n[d]=f}return n}focus(t){var n;return(n=this.elements[0])==null||n.focus(t),this}blur(){for(let t of this.elements)t.blur();return this}select(){for(let t of this.elements){let n=t;typeof n.select=="function"&&n.select()}return this}walk(t=!1){for(let n of this.elements)t&&q(n),W(n,Ce(n.parentNode));return this}destroy(){for(let t of this.elements)q(t);return this}};function vi(e,t){if(typeof e=="function"){hi(e);let n=typeof document!="undefined"?document.documentElement:null;return new Be(n?[n]:[])}return new Be(Rt(e,t))}function hi(e){return typeof document=="undefined"?Promise.resolve():new Promise(t=>{va(()=>{try{e==null||e()}catch(n){z(n,"V.ready")}t()})})}function gc(e){return new Be(gi(e))}ne();J();Te();Te();J();var yi=new WeakMap;function lt(e,t){var n;return(n=xe(e,`${E.prefix}${t}`))!=null?n:xe(e,`data-v-${t}`)}function Cr(e,t){return nt(e,`${E.prefix}${t}`)||nt(e,`data-v-${t}`)}function j(e,t){let n=yi.get(e);return n&&t in n?n[t]:lt(e,t)}function Rr(e,t,n){var o;let r=(o=yi.get(e))!=null?o:{};r[t]=n,yi.set(e,r)}function O(e){b(e,({el:t,expression:n})=>{Rr(t,e,n)},{priority:P.BIND})}function K(e,t,n){e.dispatchEvent(new CustomEvent(t,{detail:n,bubbles:!0}))}function qe(e,t,n,r,o){if(!e.trim())return;let i=t.child({$el:n,$event:r!=null?r:null,$detail:o}),s=$(e,i,"directive de UI");return typeof s=="function"?s.call(t.data,o!=null?o:r):s}var Kd=`
|
|
138
|
+
`)}))}function Nd(e){let t=e.tagName;if(t==="FORM")return"submit";if(t==="INPUT"||t==="SELECT"||t==="TEXTAREA"){let n=e.type;return n==="button"||n==="submit"?"click":"change"}return"click"}function $d({el:e,cleanup:t,run:n}){var u,d;let r=D(e,"trigger")||Nd(e),[o,...i]=r.split(/[.\s]+/),s=U((u=D(e,"poll"))!=null?u:void 0,0);if(s>0){n();let p=setInterval(()=>{document.visibilityState==="visible"&&n()},s);t(()=>clearInterval(p));return}if(o==="load"||o==="ready"){n();return}if(o==="visible"||o==="revealed"){if(typeof IntersectionObserver=="undefined"){n();return}let p=new IntersectionObserver(f=>{for(let m of f)m.isIntersecting&&(n(),i.includes("repeat")||p.unobserve(e))},{rootMargin:"80px"});p.observe(e),t(()=>p.disconnect());return}let a=i.includes("once"),c=U((d=D(e,"debounce"))!=null?d:void 0,0),l=p=>{(e.tagName==="FORM"||e.href)&&p.preventDefault(),n(p)};c>0&&(l=be(l,c)),e.addEventListener(o,l,{once:a}),t(()=>e.removeEventListener(o,l))}var Od=[["get","GET"],["post","POST"],["put","PUT"],["patch","PATCH"],["delete","DELETE"]];for(let[e,t]of Od)b(e,({el:n,scope:r,expression:o,cleanup:i})=>{$d({el:n,scope:r,cleanup:i,run:a=>{let c=Dn(o,r);if(!c)return;let l=D(n,"body")||D(n,"data-body"),u=l?$(l,r.child({$event:a}),"v-body"):void 0,d=D(n,"params"),p=d?$(d,r,"v-params"):void 0;Hn({el:n,scope:r,method:t,url:c,body:u,params:p,event:a})}})});function Dn(e,t){let n=e.trim();if(!n)return"";if((/^[./#?]/.test(n)||/^https?:\/\//i.test(n)||/^[\w-]+\/[\w\-/.]*$/.test(n))&&!/[+`'"]|\$\{/.test(n))return n;let o=$(n,t,"URL");return typeof o=="string"?o:n}b("load",({el:e,scope:t,expression:n})=>{let r=Dn(n,t);r&&Hn({el:e,scope:t,method:"GET",url:r})});b("load-visible",({el:e,scope:t,cleanup:n,expression:r})=>{let o=Dn(r,t);if(!o)return;if(typeof IntersectionObserver=="undefined"){Hn({el:e,scope:t,method:"GET",url:o});return}let i=new IntersectionObserver(s=>{for(let a of s)a.isIntersecting&&(i.unobserve(e),Hn({el:e,scope:t,method:"GET",url:o}))},{rootMargin:"120px"});i.observe(e),n(()=>i.disconnect())});b("search",({el:e,scope:t,expression:n,cleanup:r})=>{var d,p;let o=e,i=Dn(n,t),s=D(e,"param")||o.getAttribute("name")||"q",a=U((d=D(e,"debounce"))!=null?d:void 0,300),c=Number((p=D(e,"min-length"))!=null?p:0),l=be(()=>{let f=o.value.trim();f.length<c||Hn({el:e,scope:t,method:"GET",url:i,params:{[s]:f}})},a),u=()=>l();o.addEventListener("input",u),r(()=>{o.removeEventListener("input",u),l.cancel()})});b("resource",({el:e,scope:t,expression:n,cleanup:r})=>{var c,l,u,d;let o=n.indexOf(":"),i=D(e,"as")||"resource",s=n.trim();if(o>-1){let p=n.slice(0,o).trim();/^[A-Za-z_$][\w$]*$/.test(p)&&(i=p,s=n.slice(o+1).trim())}let a=kr(()=>Dn(s,t),{method:(D(e,"method")||"GET").toUpperCase(),params:()=>D(e,"params")?$(D(e,"params"),t,"v-params"):void 0,cache:U((c=D(e,"cache"))!=null?c:void 0,0)||void 0,retry:Number((l=D(e,"retry"))!=null?l:0),timeout:U((u=D(e,"timeout"))!=null?u:void 0,me.defaults.timeout),jsonPath:D(e,"json-path"),poll:U((d=D(e,"poll"))!=null?d:void 0,0),manual:mi(e,"manual"),onSuccess:p=>on(e,"voodoo:success",{data:p}),onError:(p,f)=>on(e,"voodoo:error",{error:p,message:f})});t.set(i,a),r(()=>a.stop())},{priority:P.DATA});for(let e of["target","swap","trigger","poll","param","params","body","data-body","headers","cache","retry","timeout","as","json-path","template","offline-queue","min-length","scroll-to","manual","debounce","throttle","indicator"])b(e,()=>{},{priority:P.TRANSITION});oa(da);ua(rt);ha(rc);Fa();var Pn=new Map;function nc(e,t){let n=Pn.get(e);return n||Pn.set(e,n=new Set),n.add(t),()=>n.delete(t)}function Fd(e,t){let n=nc(e,r=>{n(),t(r)});return n}function Id(e,t){let n=Pn.get(e);if(n)for(let r of[...n])try{r(t)}catch(o){z(o,`event "${e}"`)}}function jd(e,t){var n;if(!t){Pn.delete(e);return}(n=Pn.get(e))==null||n.delete(t)}function rc(e,t){var r,o;let n=typeof t=="function"?{mounted:t,updated:t}:t;b(e,i=>{var u,d;let s,a=!1,c=p=>{var f,m;return{el:i.el,value:p,oldValue:s,arg:i.arg,modifiers:i.modifiers,expression:i.expression,scope:i.scope,instance:(m=(f=i.scope.owner)==null?void 0:f.component)!=null?m:null}},l=n.raw?i.expression:i.evaluate();(u=n.created)==null||u.call(n,i.el,c(l)),(d=n.beforeMount)==null||d.call(n,i.el,c(l)),i.effect(()=>{var m,v;let p=n.raw?i.expression:i.evaluate();if(!a){a=!0,s=p,(m=n.mounted)==null||m.call(n,i.el,c(p));return}if(p===s)return;let f=c(p);(v=n.updated)==null||v.call(n,i.el,f),s=p}),i.cleanup(()=>{var f,m;let p=c(s);(f=n.beforeUnmount)==null||f.call(n,i.el,p),(m=n.unmounted)==null||m.call(n,i.el,p)})},{priority:(r=n.priority)!=null?r:P.DEFAULT,terminal:(o=n.terminal)!=null?o:!1})}function Bd(e){return Object.defineProperties(Fe.data,Object.getOwnPropertyDescriptors(e)),Fe.data}var qd="0.7.0",Ar={...ni,version:qd,config:E,reactive:V,ref:bn,shallowRef:Do,computed:wn,effect:Ee,watch:ve,watchEffect:No,nextTick:ht,toRaw:oe,markRaw:Ro,unref:Po,stop:Ao,effectScope:So,EffectScope:Me,flushSync:xo,data:Bd,store:Ea,stores:vr,removeStore:xa,storeNames:Ta,scope:Fe,component:Wt,components:le,directive:rc,directives:We,magic:H,magics:En,createApp:ya,start:sa,whenReady:pr,whenElement:mr,walk:W,refresh:ca,destroy:q,stopObserving:aa,getScope:zt,findScope:Ce,addCleanup:Ie,parseAttribute:qt,parse:Oe,tokenize:or,evaluate:C,evaluateIn:$,stringify:tt,clearParseCache:$s,globals:pe,http:me,request:it,HttpError:te,resource:kr,toast:Re,storage:Q,session:wr,cookie:Er,cache:xr,url:at,theme:je,clipboard:ci,screen:He,network:At,enter:Cn,leave:Rn,fadeIn:nn,fadeOut:rn,slideUp:Mt,slideDown:St,viewTransition:za,injectStyle:G,ensureTokens:ie,on:nc,once:Fd,off:jd,emit:Id,use(e,t){ir(Ar,e,t)},onError(e){To(e)},instances:dr,Scope:wt,PRIORITY:P,VoodooSyntaxError:_,VoodooRuntimeError:ce};wa(Ar);ne();var zd=new Set(["animation-iteration-count","aspect-ratio","border-image-slice","column-count","flex","flex-grow","flex-shrink","font-weight","grid-area","grid-column","grid-row","line-height","opacity","order","orphans","scale","tab-size","widows","z-index","zoom"]);function fc(e){return e.startsWith("--")?e:e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function De(e){return e.length<2?e:Array.from(new Set(e))}function Ct(e){return String(e!=null?e:"").split(/\s+/).filter(Boolean)}function gi(e){if(typeof document=="undefined")return[];let t=document.createElement("template");t.innerHTML=e.trim();let n=[];for(let r of Array.from(t.content.children))n.push(r);return n}function pc(e){return e.length>2&&e.charCodeAt(0)===60&&e.endsWith(">")}function Ud(e){if(e==null)return typeof document=="undefined"?[]:[document];if(e instanceof Be)return e.toArray();if(typeof e=="string")return Rt(e);if(typeof e=="function")return typeof document=="undefined"?[]:[document];let t=Rt(e);return t.length?t:typeof document=="undefined"?[]:[document]}function Rt(e,t){if(e==null)return[];if(typeof e=="string"){let o=e.trim();if(!o)return[];if(pc(o))return gi(o);let i=[];for(let s of Ud(t))try{for(let a of Array.from(s.querySelectorAll(o)))i.push(a)}catch(a){}return De(i)}if(e instanceof Be)return e.toArray();if(typeof e=="function")return[];let n=e;if(typeof n.nodeType=="number"){if(n.nodeType===1)return[n];if(n.nodeType===9){let o=n;return o.documentElement?[o.documentElement]:[]}return n.nodeType===11?Array.from(n.children):[]}let r=e;if(typeof r.length=="number"){let o=[];for(let i=0;i<r.length;i++){let s=r[i];s&&s.nodeType===1&&o.push(s)}return De(o)}return[]}function oc(e){if(e==null)return[];if(typeof e=="string"){let r=e;return pc(r.trim())?gi(r):[document.createTextNode(r)]}if(e instanceof Be)return e.toArray();if(typeof e=="function")return[];let t=e;if(typeof t.nodeType=="number")return[t];let n=e;if(typeof n.length=="number"){let r=[];for(let o=0;o<n.length;o++)n[o]&&r.push(n[o]);return r}return[]}function Sr(e,t,n){let r=fc(t);if(n===null||n===""){e.style.removeProperty(r);return}let o=typeof n=="number"&&!zd.has(r)&&!r.startsWith("--")?`${n}px`:String(n);e.style.setProperty(r,o)}function Vd(e,t){for(let[n,r]of Object.entries(t))Sr(e,n,r)}function ic(e){if(e===void 0)return;if(e==="")return"";if(e==="true")return!0;if(e==="false")return!1;if(e==="null")return null;if(/^-?\d+(\.\d+)?$/.test(e))return Number(e);let t=e.charCodeAt(0);if(t===123||t===91||t===34)try{return JSON.parse(e)}catch(n){return e}return e}function sc(e){return e.replace(/-([a-z0-9])/g,(t,n)=>n.toUpperCase())}var mc=new WeakMap;function ac(e){return e.hasAttribute("hidden")||e.style.display==="none"?!0:e.isConnected?getComputedStyle(e).display==="none":!1}function cc(e){e.removeAttribute("hidden");let t=mc.get(e);t!==void 0&&t!=="none"?e.style.display=t:e.style.removeProperty("display"),e.isConnected&&getComputedStyle(e).display==="none"&&(e.style.display="block")}function lc(e){let t=e.style.display;t&&t!=="none"&&mc.set(e,t),e.style.display="none"}var uc="input,select,textarea";function dc(e){return e.matches(uc)?[e]:Array.from(e.querySelectorAll(uc))}function _d(e){let t=e;if(!t.name||t.disabled)return!1;let n=(t.getAttribute("type")||"").toLowerCase();return!(n==="file"||n==="submit"||n==="reset"||n==="button"||(n==="checkbox"||n==="radio")&&!t.checked)}var Mr=new WeakMap;function Wd(e){let t=Mr.get(e);return t||Mr.set(e,t=[]),t}var Be=class e{constructor(t=[]){S(this,"length");S(this,"elements");this.elements=t,this.length=t.length;let n=this;for(let r=0;r<t.length;r++)n[r]=t[r]}[Symbol.iterator](){return this.elements[Symbol.iterator]()}find(t){let n=[];for(let r of this.elements)try{for(let o of Array.from(r.querySelectorAll(t)))n.push(o)}catch(o){}return new e(De(n))}closest(t){let n=[];for(let r of this.elements){let o=r.closest(t);o&&n.push(o)}return new e(De(n))}parent(t){let n=[];for(let r of this.elements){let o=r.parentElement;o&&(!t||o.matches(t))&&n.push(o)}return new e(De(n))}parents(t){let n=[];for(let r of this.elements){let o=r.parentElement;for(;o;)(!t||o.matches(t))&&n.push(o),o=o.parentElement}return new e(De(n))}children(t){let n=[];for(let r of this.elements)for(let o of Array.from(r.children))(!t||o.matches(t))&&n.push(o);return new e(De(n))}siblings(t){let n=[];for(let r of this.elements){let o=r.parentElement;if(o)for(let i of Array.from(o.children))i!==r&&(!t||i.matches(t))&&n.push(i)}return new e(De(n))}next(t){let n=[];for(let r of this.elements){let o=r.nextElementSibling;o&&(!t||o.matches(t))&&n.push(o)}return new e(De(n))}prev(t){let n=[];for(let r of this.elements){let o=r.previousElementSibling;o&&(!t||o.matches(t))&&n.push(o)}return new e(De(n))}first(){return this.eq(0)}last(){return this.eq(-1)}eq(t){let n=t<0?this.elements.length+t:t,r=this.elements[n];return new e(r?[r]:[])}filter(t){let n=this.elements.filter((r,o)=>typeof t=="function"?t(r,o):r.matches(t));return new e(n)}not(t){let n=this.elements.filter((r,o)=>typeof t=="function"?!t(r,o):!r.matches(t));return new e(n)}has(t){let n=this.elements.filter(r=>typeof t=="string"?r.querySelector(t)!==null:r.contains(t));return new e(n)}is(t){return this.elements.some((n,r)=>typeof t=="function"?t(n,r):n.matches(t))}map(t){return this.elements.map((n,r)=>t(n,r))}each(t){for(let n=0;n<this.elements.length;n++){let r=this.elements[n];if(t.call(r,r,n)===!1)break}return this}get(...t){if(!t.length)return this.toArray();let n=Number(t[0]);return this.elements[n<0?this.elements.length+n:n]}toArray(){return this.elements.slice()}add(t,n){return new e(De([...this.elements,...Rt(t,n)]))}slice(t,n){return new e(this.elements.slice(t,n))}text(...t){var o,i;if(!t.length)return(i=(o=this.elements[0])==null?void 0:o.textContent)!=null?i:"";let n=t[0],r=n==null?"":String(n);for(let s of this.elements){for(let a of Array.from(s.childNodes))q(a);s.textContent=r}return this}html(...t){var o,i;if(!t.length)return(i=(o=this.elements[0])==null?void 0:o.innerHTML)!=null?i:"";let n=t[0],r=n==null?"":String(n);for(let s of this.elements){for(let a of Array.from(s.childNodes))q(a);s.innerHTML=r}return this}val(...t){var r;if(!t.length){let o=this.elements[0];if(!o)return"";let i=o;return o.tagName==="SELECT"&&i.multiple?Array.from(i.selectedOptions).map(s=>s.value):o.type==="checkbox"?o.checked?o.value||"on":"":(r=o.value)!=null?r:""}let n=t[0];for(let o of this.elements){let i=o,s=o;if(i.tagName==="SELECT"&&s.multiple){let a=(Array.isArray(n)?n:[n]).map(String);for(let c of Array.from(s.options))c.selected=a.includes(c.value);continue}if(i.type==="checkbox"||i.type==="radio"){i.checked=Array.isArray(n)?n.map(String).includes(i.value):n===!0||String(n)===i.value;continue}i.value=n==null?"":String(n)}return this}attr(...t){var i,s;let n=t[0];if(n!==null&&typeof n=="object"){for(let a of this.elements)for(let[c,l]of Object.entries(n))l===null||l===!1?a.removeAttribute(c):a.setAttribute(c,l===!0?"":String(l));return this}let r=String(n);if(t.length<2)return(s=(i=this.elements[0])==null?void 0:i.getAttribute(r))!=null?s:void 0;let o=t[1];for(let a of this.elements)o===null||o===!1?a.removeAttribute(r):a.setAttribute(r,o===!0?"":String(o));return this}removeAttr(t){let n=Ct(t);for(let r of this.elements)for(let o of n)r.removeAttribute(o);return this}prop(...t){let n=String(t[0]);if(t.length<2){let r=this.elements[0];return r?r[n]:void 0}for(let r of this.elements)r[n]=t[1];return this}data(...t){let n=t[0];if(!t.length){let i=this.elements[0];if(!i)return{};let s={};for(let[a,c]of Object.entries(i.dataset))s[a]=ic(c);return s}if(n!==null&&typeof n=="object"){for(let i of this.elements)for(let[s,a]of Object.entries(n))i.dataset[sc(s)]=typeof a=="string"?a:JSON.stringify(a!=null?a:null);return this}let r=sc(String(n));if(t.length<2){let i=this.elements[0];return i?ic(i.dataset[r]):void 0}let o=t[1];for(let i of this.elements)i.dataset[r]=typeof o=="string"?o:JSON.stringify(o!=null?o:null);return this}css(...t){let n=t[0];if(n!==null&&typeof n=="object"){for(let o of this.elements)Vd(o,n);return this}let r=String(n);if(t.length<2){let o=this.elements[0];if(!o)return"";let i=fc(r);return((o.isConnected?getComputedStyle(o).getPropertyValue(i):"")||o.style.getPropertyValue(i)).trim()}for(let o of this.elements)Sr(o,r,t[1]);return this}width(...t){if(!t.length){let n=this.elements[0];return n?n.getBoundingClientRect().width:0}for(let n of this.elements)Sr(n,"width",t[0]);return this}height(...t){if(!t.length){let n=this.elements[0];return n?n.getBoundingClientRect().height:0}for(let n of this.elements)Sr(n,"height",t[0]);return this}offset(){let t=this.elements[0];if(!t)return{top:0,left:0};let n=t.getBoundingClientRect();return{top:n.top+window.scrollY,left:n.left+window.scrollX}}position(){let t=this.elements[0];return t?{top:t.offsetTop,left:t.offsetLeft}:{top:0,left:0}}scrollTop(...t){var r,o;if(!t.length)return(o=(r=this.elements[0])==null?void 0:r.scrollTop)!=null?o:0;let n=Number(t[0])||0;for(let i of this.elements)i.scrollTop=n;return this}addClass(t){let n=Ct(t);if(n.length)for(let r of this.elements)r.classList.add(...n);return this}removeClass(t){let n=Ct(t);if(n.length)for(let r of this.elements)r.classList.remove(...n);return this}toggleClass(t,n){let r=Ct(t);for(let o of this.elements)for(let i of r)n===void 0?o.classList.toggle(i):o.classList.toggle(i,n);return this}hasClass(t){let n=Ct(t);return n.length?this.elements.some(r=>n.every(o=>r.classList.contains(o))):!1}insert(t,n){let r=this.elements.length;for(let o=0;o<r;o++){let i=this.elements[o];for(let s of oc(t))n(i,o===r-1?s:s.cloneNode(!0))}return this}append(t){return this.insert(t,(n,r)=>n.appendChild(r))}prepend(t){return this.insert(t,(n,r)=>n.insertBefore(r,n.firstChild))}before(t){return this.insert(t,(n,r)=>{var o;return(o=n.parentNode)==null?void 0:o.insertBefore(r,n)})}after(t){return this.insert(t,(n,r)=>{var o;return(o=n.parentNode)==null?void 0:o.insertBefore(r,n.nextSibling)})}appendTo(t){let n=Rt(t);for(let r=0;r<n.length;r++)for(let o of this.elements)n[r].appendChild(r===n.length-1?o:o.cloneNode(!0));return this}prependTo(t){let n=Rt(t);for(let r=0;r<n.length;r++){let o=n[r],i=this.elements.map(s=>r===n.length-1?s:s.cloneNode(!0));for(let s=i.length-1;s>=0;s--)o.insertBefore(i[s],o.firstChild)}return this}replaceWith(t){for(let n of this.elements){let r=n.parentNode;if(r){for(let o of oc(t))r.insertBefore(o,n);q(n),n.remove()}}return this}wrap(t){var n;for(let r of this.elements){let o=Rt(t)[0];if(!o)continue;let i=o.cloneNode(!0);(n=r.parentNode)==null||n.insertBefore(i,r);let s=i;for(;s.firstElementChild;)s=s.firstElementChild;s.appendChild(r)}return this}unwrap(){let t=new Set;for(let n of this.elements){let r=n.parentElement;r&&r!==document.body&&t.add(r)}for(let n of t){let r=n.parentNode;if(r){for(;n.firstChild;)r.insertBefore(n.firstChild,n);q(n),n.remove()}}return this}remove(){for(let t of this.elements)q(t),t.remove();return this}empty(){for(let t of this.elements){for(let n of Array.from(t.childNodes))q(n);t.replaceChildren()}return this}clone(t=!0){return new e(this.elements.map(n=>n.cloneNode(t)))}on(t,...n){var a;let r=typeof n[0]=="string",o=r?n[0]:null,i=r?n[1]:n[0],s=(a=r?n[2]:n[1])!=null?a:{};if(typeof i!="function")return this;for(let c of this.elements)for(let l of Ct(t)){let u=d=>{if(!o){i.call(c,d);return}let p=d.target,f=p==null?void 0:p.closest(o);!f||!c.contains(f)||i.call(f,d)};c.addEventListener(l,u,s),Wd(c).push({type:l,selector:o,handler:i,wrapped:u,options:s})}return this}off(t,n,r){let o=typeof n=="string"?n:null,i=typeof n=="function"?n:r!=null?r:null,s=t?Ct(t):null;for(let a of this.elements){let c=Mr.get(a);if(!c)continue;let l=[];for(let u of c){let d=!s||s.includes(u.type),p=o===null||u.selector===o,f=i===null||u.handler===i;d&&p&&f?a.removeEventListener(u.type,u.wrapped,u.options):l.push(u)}Mr.set(a,l)}return this}once(t,...n){let r=typeof n[0]=="string",o=r?n[0]:null,i=r?n[1]:n[0];if(typeof i!="function")return this;let s=this,a=function(c){return o?s.off(t,o,a):s.off(t,a),i.call(this,c)};return o?this.on(t,o,a):this.on(t,a)}trigger(t,n){for(let r of this.elements){if(n===void 0&&typeof r[t]=="function"){r[t]();continue}let o=new CustomEvent(t,{detail:n,bubbles:!0,cancelable:!0});o.__voodoo=!0,r.dispatchEvent(o)}return this}emit(t,n){for(let r of this.elements){let o=new CustomEvent(t,{detail:n,bubbles:!0,cancelable:!0});o.__voodoo=!0,r.dispatchEvent(o)}return this}show(){for(let t of this.elements)cc(t);return this}hide(){for(let t of this.elements)lc(t);return this}toggle(t){for(let n of this.elements)(t===void 0?ac(n):t)?cc(n):lc(n);return this}fadeIn(t=220){for(let n of this.elements)n.removeAttribute("hidden"),nn(n,t);return this}fadeOut(t=220){for(let n of this.elements)rn(n,t);return this}slideUp(t=240){for(let n of this.elements)Mt(n,t);return this}slideDown(t=240){for(let n of this.elements)n.removeAttribute("hidden"),St(n,t);return this}slideToggle(t=240){for(let n of this.elements)ac(n)?(n.removeAttribute("hidden"),St(n,t)):Mt(n,t);return this}animate(t,n=300){for(let r of this.elements)typeof r.animate=="function"&&r.animate(t,n);return this}scrollIntoView(t={behavior:"smooth",block:"start"}){var n;return(n=this.elements[0])==null||n.scrollIntoView(t),this}serialize(){let t=this.elements[0];if(!t)return"";let n=new URLSearchParams;for(let r of dc(t)){if(!_d(r))continue;let o=r,i=r;if(o.tagName==="SELECT"&&i.multiple){for(let s of Array.from(i.selectedOptions))n.append(o.name,s.value);continue}n.append(o.name,o.value)}return n.toString()}serializeObject(){var r,o,i,s;let t=this.elements[0],n={};if(!t)return n;for(let a of dc(t)){let c=a;if(!c.name||c.disabled)continue;let l=(c.getAttribute("type")||"").toLowerCase();if(l==="submit"||l==="reset"||l==="button")continue;let u=c.name.endsWith("[]"),d=u?c.name.slice(0,-2):c.name,p=a,f;if(l==="checkbox"){if(!c.checked&&!u){n[d]=(r=n[d])!=null?r:!1;continue}if(!c.checked)continue;f=c.value==="on"?!0:c.value}else if(l==="radio"){if(!c.checked)continue;f=c.value}else l==="file"?f=c.multiple?Array.from((o=c.files)!=null?o:[]):(s=(i=c.files)==null?void 0:i[0])!=null?s:null:c.tagName==="SELECT"&&p.multiple?f=Array.from(p.selectedOptions).map(m=>m.value):l==="number"||l==="range"?f=c.value===""?null:Number(c.value):f=c.value;if(u){let m=n[d];Array.isArray(m)?m.push(f):n[d]=[f];continue}if(Object.prototype.hasOwnProperty.call(n,d)){let m=n[d];Array.isArray(m)?m.push(f):m===void 0||m===!1?n[d]=f:n[d]=[m,f];continue}n[d]=f}return n}focus(t){var n;return(n=this.elements[0])==null||n.focus(t),this}blur(){for(let t of this.elements)t.blur();return this}select(){for(let t of this.elements){let n=t;typeof n.select=="function"&&n.select()}return this}walk(t=!1){for(let n of this.elements)t&&q(n),W(n,Ce(n.parentNode));return this}destroy(){for(let t of this.elements)q(t);return this}};function vi(e,t){if(typeof e=="function"){hi(e);let n=typeof document!="undefined"?document.documentElement:null;return new Be(n?[n]:[])}return new Be(Rt(e,t))}function hi(e){return typeof document=="undefined"?Promise.resolve():new Promise(t=>{va(()=>{try{e==null||e()}catch(n){z(n,"V.ready")}t()})})}function gc(e){return new Be(gi(e))}ne();J();Te();Te();J();var yi=new WeakMap;function lt(e,t){var n;return(n=xe(e,`${E.prefix}${t}`))!=null?n:xe(e,`data-v-${t}`)}function Cr(e,t){return nt(e,`${E.prefix}${t}`)||nt(e,`data-v-${t}`)}function j(e,t){let n=yi.get(e);return n&&t in n?n[t]:lt(e,t)}function Rr(e,t,n){var o;let r=(o=yi.get(e))!=null?o:{};r[t]=n,yi.set(e,r)}function O(e){b(e,({el:t,expression:n})=>{Rr(t,e,n)},{priority:P.BIND})}function K(e,t,n){e.dispatchEvent(new CustomEvent(t,{detail:n,bubbles:!0}))}function qe(e,t,n,r,o){if(!e.trim())return;let i=t.child({$el:n,$event:r!=null?r:null,$detail:o}),s=$(e,i,"directive de UI");return typeof s=="function"?s.call(t.data,o!=null?o:r):s}var Kd=`
|
|
139
139
|
.v-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
|
|
140
140
|
clip:rect(0 0 0 0);white-space:nowrap;border:0}
|
|
141
141
|
`,ct=null;function ke(e){if(typeof document=="undefined")return;G("ui-live",Kd),(!ct||!ct.isConnected)&&(ct=document.createElement("div"),ct.className="v-visually-hidden",ct.setAttribute("role","status"),ct.setAttribute("aria-live","polite"),document.body.appendChild(ct));let t=ct;t.textContent="",setTimeout(()=>{t.textContent=e},40)}function Hr(e,t,n){return lr(e,t).filter(r=>Ut(r,n)===e)}Te();J();var Yd=`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "voodoojs",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Voodoo.js: the HTML-first JavaScript framework. Build reactive applications directly in HTML: fine-grained reactivity, components, HTTP, forms, validation, router and UI. No mandatory build step, no runtime dependencies, no Virtual DOM, no eval.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript",
|