@vanelsas/baredom 2.7.0 → 2.8.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/CHANGELOG.md +22 -0
- package/custom-elements.json +344 -5
- package/dist/baredom.d.ts +4 -0
- package/dist/base.js +451 -427
- package/dist/integrity.json +97 -93
- package/dist/x-alert.js +17 -18
- package/dist/x-avatar-group.js +9 -10
- package/dist/x-avatar.js +15 -15
- package/dist/x-badge.js +9 -10
- package/dist/x-bento-grid.js +5 -5
- package/dist/x-bento-item.js +4 -4
- package/dist/x-breadcrumbs.js +13 -14
- package/dist/x-button.js +16 -18
- package/dist/x-cancel-dialogue.js +13 -17
- package/dist/x-card.js +7 -7
- package/dist/x-carousel.js +33 -34
- package/dist/x-chart.d.ts +26 -0
- package/dist/x-chart.js +47 -46
- package/dist/x-checkbox.js +11 -10
- package/dist/x-chip.js +1 -9
- package/dist/x-collapse.js +10 -10
- package/dist/x-color-picker.js +44 -44
- package/dist/x-combobox.js +26 -26
- package/dist/x-command-palette.js +26 -26
- package/dist/x-container.js +4 -4
- package/dist/x-context-menu.d.ts +31 -2
- package/dist/x-context-menu.js +20 -18
- package/dist/x-copy.js +20 -23
- package/dist/x-currency-field.js +23 -23
- package/dist/x-date-picker.d.ts +27 -0
- package/dist/x-date-picker.js +42 -41
- package/dist/x-divider.js +9 -9
- package/dist/x-drawer.js +10 -11
- package/dist/x-dropdown.js +11 -10
- package/dist/x-fieldset.js +5 -6
- package/dist/x-file-download.js +7 -7
- package/dist/x-file-upload.js +20 -20
- package/dist/x-form-field.js +15 -15
- package/dist/x-form.js +9 -8
- package/dist/x-gaussian-blur.js +13 -19
- package/dist/x-grid.js +6 -6
- package/dist/x-i18n-provider.d.ts +43 -0
- package/dist/x-i18n-provider.js +8 -0
- package/dist/x-i18n.d.ts +14 -0
- package/dist/x-i18n.js +5 -0
- package/dist/x-icon.js +6 -7
- package/dist/x-image.js +18 -19
- package/dist/x-kinetic-canvas.d.ts +18 -0
- package/dist/x-kinetic-canvas.js +26 -0
- package/dist/x-kinetic-font.js +27 -28
- package/dist/x-kinetic-typography.js +33 -39
- package/dist/x-liquid-dock.js +39 -39
- package/dist/x-liquid-fill.js +45 -45
- package/dist/x-liquid-glass.js +47 -47
- package/dist/x-menu-item.js +8 -9
- package/dist/x-menu.js +10 -11
- package/dist/x-metaball-cursor.js +27 -27
- package/dist/x-modal.js +11 -12
- package/dist/x-morph-stack.js +37 -38
- package/dist/x-multi-combobox.d.ts +50 -0
- package/dist/x-multi-combobox.js +37 -0
- package/dist/x-navbar.js +12 -12
- package/dist/x-neural-glow.js +33 -33
- package/dist/x-notification-center.js +9 -9
- package/dist/x-organic-divider.js +17 -18
- package/dist/x-organic-progress.js +38 -38
- package/dist/x-organic-shape.js +13 -13
- package/dist/x-pagination.js +15 -16
- package/dist/x-particle-button.js +51 -51
- package/dist/x-popover.js +26 -24
- package/dist/x-progress-circle.js +9 -10
- package/dist/x-progress.js +10 -11
- package/dist/x-radio.js +11 -10
- package/dist/x-ripple-effect.js +11 -12
- package/dist/x-scroll-parallax.js +18 -19
- package/dist/x-scroll-stack.js +17 -18
- package/dist/x-scroll-story.js +34 -36
- package/dist/x-scroll-timeline.js +45 -46
- package/dist/x-scroll.js +40 -41
- package/dist/x-search-field.js +15 -15
- package/dist/x-select.js +10 -9
- package/dist/x-sidebar.js +17 -17
- package/dist/x-skeleton-group.js +12 -12
- package/dist/x-skeleton.js +1 -1
- package/dist/x-slider.js +15 -16
- package/dist/x-soft-body.js +22 -22
- package/dist/x-spacer.js +4 -5
- package/dist/x-spinner.js +4 -5
- package/dist/x-splash.js +12 -13
- package/dist/x-stat.js +10 -12
- package/dist/x-stepper.js +14 -15
- package/dist/x-switch.js +10 -9
- package/dist/x-tab.js +7 -8
- package/dist/x-table-cell.js +20 -24
- package/dist/x-table-row.js +8 -9
- package/dist/x-table.js +12 -15
- package/dist/x-tabs.js +11 -11
- package/dist/x-text-area.js +18 -18
- package/dist/x-theme.js +25 -25
- package/dist/x-timeline-item.js +21 -23
- package/dist/x-timeline.js +8 -9
- package/dist/x-toast.js +22 -24
- package/dist/x-toaster.js +8 -8
- package/dist/x-tooltip.js +12 -11
- package/dist/x-typography.js +9 -11
- package/dist/x-welcome-tour.js +60 -64
- package/package.json +21 -1
package/dist/x-liquid-dock.js
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
a+b*b);e=Math.max(0,1-d/e);c=e*e;
|
|
4
|
-
$APP.
|
|
5
|
-
"svg"),m=document.createElement("div"),
|
|
6
|
-
b=$APP.
|
|
7
|
-
d);y.setAttribute("x","-20%");y.setAttribute("y","-20%");y.setAttribute("width","140%");y.setAttribute("height","140%");A.setAttribute("in","SourceGraphic");A.setAttribute("stdDeviation",""+$APP.
|
|
8
|
-
"noise");
|
|
9
|
-
h,$APP.
|
|
10
|
-
var c=$APP.
|
|
11
|
-
a.assignedElements():null},
|
|
12
|
-
""+$APP.
|
|
13
|
-
b[
|
|
14
|
-
(a.__xLiquidDockSeed=0,$APP.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"magnet-strength"
|
|
31
|
-
$APP.
|
|
32
|
-
|
|
33
|
-
$APP.
|
|
34
|
-
$APP.
|
|
35
|
-
$APP.
|
|
36
|
-
|
|
37
|
-
$APP.k(a,"__xLiquidDockBurst");return $APP.n(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
e=.012+.006*Math.sin(
|
|
2
|
+
var Fr=function(a){return typeof a==="string"?(a=a.trim().toLowerCase(),$APP.Zc(Er,a)?a:"bottom"):"bottom"},Gr=function(a,b,c,d){return typeof a==="string"?(a=parseFloat(a.trim()),$APP.n(isNaN(a))?b:Math.min(d,Math.max(c,a))):b},Hr=function(a){return typeof a==="string"&&a.trim().length>0?a.trim():"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 18 -7"},Ir=function(a){return typeof a==="string"&&a.trim().length>0?a.trim():null},Jr=function(a,b){return a+(b-a)*.1},Nr=function(a,b,c,d,e,f,h){a=c-a;b=d-b;d=Math.sqrt(a*
|
|
3
|
+
a+b*b);e=Math.max(0,1-d/e);c=e*e;f=c*f*20;d=d>.001?1/d:0;return new $APP.N(null,4,[Kr,e,$APP.ik,1+c*(h-1),Lr,a*d*f*.3,Mr,b*d*f*.3],null)},Qr=function(a,b){var c=a*a;a=c*28;c=.6+c*.9;switch(b){case "bottom":return new $APP.N(null,3,[Or,0,Pr,-a,$APP.ik,c],null);case "top":return new $APP.N(null,3,[Or,0,Pr,a,$APP.ik,c],null);case "left":return new $APP.N(null,3,[Or,a,Pr,0,$APP.ik,c],null);case "right":return new $APP.N(null,3,[Or,-a,Pr,0,$APP.ik,c],null);default:return new $APP.N(null,3,[Or,0,Pr,-a,
|
|
4
|
+
$APP.ik,c],null)}},Sr=function(a,b,c,d){a*=a;var e=12*d*a;return new $APP.N(null,3,[Rr,function(){switch(c){case "bottom":return-e;case "top":return e;case "left":return e;case "right":return-e;default:return-e}}(),$APP.un,5*d*a*b,$APP.ik,1+.12*d*a],null)},Yr=function(a){var b=$APP.k(a,"__xLiquidDockModel"),c=Tr[0];Tr[0]=c+1;var d="goo-"+$APP.Q.g(c),e=a.attachShadow({mode:"open"}),f=document.createElement("style"),h=document.createElement("nav"),l=document.createElementNS("http://www.w3.org/2000/svg",
|
|
5
|
+
"svg"),m=document.createElement("div"),q=document.createElement("div"),r=document.createElement("slot");a.__xLiquidDockUid=c;f.textContent=Ur;h.setAttribute("part","dock");h.setAttribute("role","navigation");h.setAttribute("aria-label","Navigation dock");l.setAttribute("part","filter-svg");l.setAttribute("aria-hidden","true");l.setAttribute("role","presentation");m.setAttribute("part","liquid-layer");m.style.filter="url(#"+$APP.Q.g(d)+")";q.setAttribute("part","items");q.appendChild(r);var v=$APP.J(b);
|
|
6
|
+
b=$APP.C(v,$APP.wj);c=$APP.C(v,$APP.ln);v=$APP.C(v,Vr);var x=document.createElementNS("http://www.w3.org/2000/svg","defs"),y=document.createElementNS("http://www.w3.org/2000/svg","filter"),A=document.createElementNS("http://www.w3.org/2000/svg","feGaussianBlur"),D=document.createElementNS("http://www.w3.org/2000/svg","feColorMatrix"),G=document.createElementNS("http://www.w3.org/2000/svg","feTurbulence"),I=document.createElementNS("http://www.w3.org/2000/svg","feDisplacementMap");y.setAttribute("id",
|
|
7
|
+
d);y.setAttribute("x","-20%");y.setAttribute("y","-20%");y.setAttribute("width","140%");y.setAttribute("height","140%");A.setAttribute("in","SourceGraphic");A.setAttribute("stdDeviation",""+$APP.Q.g(b));A.setAttribute("result","blur");D.setAttribute("in","blur");D.setAttribute("type","matrix");D.setAttribute("values",c);D.setAttribute("result","goo");G.setAttribute("type","fractalNoise");G.setAttribute("baseFrequency","0.015");G.setAttribute("numOctaves","2");G.setAttribute("seed","0");G.setAttribute("result",
|
|
8
|
+
"noise");I.setAttribute("in","goo");I.setAttribute("in2","noise");I.setAttribute("scale",""+$APP.Q.g(v));I.setAttribute("xChannelSelector","R");I.setAttribute("yChannelSelector","G");y.appendChild(A);y.appendChild(D);y.appendChild(G);y.appendChild(I);x.appendChild(y);l.appendChild(x);d=new $APP.N(null,5,[$APP.wm,y,$APP.wk,A,$APP.ho,D,$APP.fn,G,$APP.Yk,I],null);h.appendChild(l);h.appendChild(m);h.appendChild(q);e.appendChild(f);e.appendChild(h);e=$APP.cg($APP.Bc([d,new $APP.N(null,6,[$APP.Uh,e,$APP.Kj,
|
|
9
|
+
h,$APP.tl,l,Wr,m,Xr,q,$APP.tk,r],null)]));a.__xLiquidDockRefs=e},is=function(a){a=$APP.Lf([$APP.il,$APP.Kn,Zr,$r,$APP.lj,$APP.to,as,$APP.ek,bs,$APP.mk,cs],[a.getAttribute("position"),a.getAttribute("blur"),a.getAttribute("magnet-strength"),a.getAttribute("ripple-speed"),a.getAttribute("threshold"),a.getAttribute("color"),a.getAttribute("ripple-scale"),a.getAttribute("gap"),a.getAttribute("bob-intensity"),a.getAttribute("disabled"),a.getAttribute("magnet-radius")]);var b=$APP.J(a);a=$APP.C(b,$APP.mk);
|
|
10
|
+
var c=$APP.C(b,cs),d=$APP.C(b,$APP.il),e=$APP.C(b,$APP.Kn),f=$APP.C(b,Zr),h=$APP.C(b,$r),l=$APP.C(b,$APP.lj),m=$APP.C(b,$APP.to),q=$APP.C(b,as),r=$APP.C(b,$APP.ek);b=$APP.C(b,bs);d=Fr(d);return $APP.Lf([$APP.$k,ds,es,$APP.ln,Vr,$APP.wj,fs,$APP.jl,gs,$APP.po,hs,$APP.Y],[Ir(m),Gr(h,.03,.005,.15),Gr(b,1,0,2),Hr(l),Gr(q,8,0,40),Gr(e,10,2,30),$APP.B.i(d,"left")||$APP.B.i(d,"right"),Gr(r,8,0,40),Gr(c,150,40,400),d,Gr(f,.6,0,2),a!=null])},js=function(a){a=$APP.tk.g($APP.k(a,"__xLiquidDockRefs"));return $APP.n(a)?
|
|
11
|
+
a.assignedElements():null},ks=function(a){var b=$APP.J($APP.k(a,"__xLiquidDockRefs")),c=$APP.C(b,Wr);b=function(){var r=js(a);return $APP.n(r)?r:[]}().length*2;for(var d=function(){var r=$APP.k(a,"__xLiquidDockBlobs");return $APP.n(r)?r:[]}(),e=function(){var r=$APP.k(a,"__xLiquidDockBlobSt");return $APP.n(r)?r:[]}(),f=d.length,h=f;;)if(h<b){var l=document.createElement("div"),m=$APP.ce(h);l.className=m?"blob blob-rest":"blob blob-phantom";var q=m?52:44;l.style.width=""+$APP.Q.g(q)+"px";l.style.height=
|
|
12
|
+
""+$APP.Q.g(q)+"px";c.appendChild(l);d.push(l);e.push(m?{type:"rest"}:{type:"phantom",cpDx:0,cpDy:0,cpScale:.6,cLift:0,cRot:0,cScale:1});h+=1}else break;for(c=f;;)if(c>b)f=d.pop(),e.pop(),$APP.n(f.parentNode)&&f.parentNode.removeChild(f),--c;else break;a.__xLiquidDockBlobs=d;a.__xLiquidDockBlobSt=e},ls=function(a){var b=$APP.J($APP.k(a,"__xLiquidDockRefs")),c=$APP.C(b,$APP.Kj);b=js(a);b=$APP.n(b)?b:[];var d=b.length,e=[];if($APP.n($APP.n(c)?d>0:c)){c=c.getBoundingClientRect();for(var f=0;;)if(f<d){var h=
|
|
13
|
+
b[f].getBoundingClientRect();e.push({cx:h.left+h.width/2-c.left,cy:h.top+h.height/2-c.top});f+=1}else break}a.__xLiquidDockItemsR=e;return null},ms=function(a,b){var c=$APP.J(b);b=$APP.C(c,$APP.$k);c=$APP.C(c,$APP.jl);$APP.n(b)?a.style.setProperty("--x-liquid-dock-color",b):a.style.removeProperty("--x-liquid-dock-color");a.style.setProperty("--x-liquid-dock-gap",""+$APP.Q.g(c)+"px")},os=function(a){$APP.E(window.matchMedia("(prefers-reduced-motion:reduce)").matches)||$APP.n($APP.Y.g($APP.k(a,"__xLiquidDockModel")))||
|
|
14
|
+
(a.__xLiquidDockSeed=0,$APP.fa(a,"__xLiquidDockRaf",requestAnimationFrame(function(){return ns(a)})));return null},ps=function(a){var b=$APP.k(a,"__xLiquidDockRaf");$APP.n(b)&&(cancelAnimationFrame(b),a.__xLiquidDockRaf=null)},qs=function(a){a=js(a);if($APP.n(a))for(var b=a.length,c=0;;)if(c<b)a[c].style.transform="",c+=1;else break},rs=function(a,b,c,d){var e=Date.now();a.__xLiquidDockBurst=e;$APP.ch(a,"x-liquid-dock-select",$APP.Xi(new $APP.N(null,3,["index",b,"item",c,"source",d],null)))},ss=function(a){ks(a);
|
|
15
|
+
var b=js(a);if($APP.n(b))for(var c=b.length,d=0;;)if(d<c){var e=b[d];e.getAttribute("tabindex")==null&&e.setAttribute("tabindex","0");d+=1}else break;requestAnimationFrame(function(){return ls(a)});return null},vs=function(a){function b(){return ss(a)}function c(l){var m=$APP.k(a,"__xLiquidDockModel");if(!$APP.n($APP.Y.g(m))){var q=js(a),r=$APP.n(q)?q.length:null,v=l.key,x=fs.g(m);m=$APP.n(x)?"ArrowUp":"ArrowLeft";x=$APP.n(x)?"ArrowDown":"ArrowRight";var y=$APP.k(a,"__xLiquidDockFocus");y=$APP.n(y)?
|
|
16
|
+
y:-1;$APP.n($APP.n(r)?r>0:r)&&($APP.B.i(v,m)?(l.preventDefault(),l=y<1?r-1:y-1,a.__xLiquidDockFocus=l,q[l].focus()):$APP.B.i(v,x)?(l.preventDefault(),l=y>=r-1?0:y+1,a.__xLiquidDockFocus=l,q[l].focus()):($APP.B.i(v,"Enter")||$APP.B.i(v," "))&&y>=0&&(l.preventDefault(),rs(a,y,q[y],"keyboard")))}return null}function d(l){if(!$APP.n($APP.Y.g($APP.k(a,"__xLiquidDockModel")))){var m=js(a);if($APP.n(m)){a:{l=l.target;for(var q=m.length,r=0;;)if(r<q){if($APP.B.i(l,m[r])){l=r;break a}r+=1}else{l=null;break a}l=
|
|
17
|
+
void 0}$APP.n(l)&&rs(a,l,m[l],"pointer")}}return null}function e(){$APP.k(a,"__xLiquidDockMouse").active=!1;return null}function f(l){var m=$APP.J($APP.k(a,"__xLiquidDockRefs"));m=$APP.C(m,$APP.Kj);if($APP.n(m)){m=m.getBoundingClientRect();var q=$APP.k(a,"__xLiquidDockMouse");q.x=l.clientX-m.left;q.y=l.clientY-m.top;q.active=!0}return null}var h=$APP.J($APP.k(a,"__xLiquidDockRefs"));h=$APP.C(h,$APP.tk);a.addEventListener("pointermove",f);a.addEventListener("pointerleave",e);a.addEventListener("click",
|
|
18
|
+
d);a.addEventListener("keydown",c);$APP.n(h)&&h.addEventListener("slotchange",b);$APP.fa(a,"__xLiquidDockHdl",new $APP.N(null,5,[ts,f,us,e,$APP.Ql,d,$APP.sl,c,$APP.tk,b],null))},ws=function(a){var b=$APP.k(a,"__xLiquidDockHdl");if($APP.n(b)){a.removeEventListener("pointermove",ts.g(b));a.removeEventListener("pointerleave",us.g(b));a.removeEventListener("click",$APP.Ql.g(b));a.removeEventListener("keydown",$APP.sl.g(b));var c=$APP.k(a,"__xLiquidDockRefs");$APP.n(c)&&(c=$APP.J(c),c=$APP.C(c,$APP.tk),
|
|
19
|
+
$APP.n(c)&&c.removeEventListener("slotchange",$APP.tk.g(b)));a.__xLiquidDockHdl=null}},xs=function(a){Object.defineProperty(a,"position",{get:function(){return Fr(this.getAttribute("position"))},set:function(b){return b==null?this.removeAttribute("position"):this.setAttribute("position",""+$APP.Q.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"gap",{get:function(){var b=this.getAttribute("gap");return Gr(b,8,0,40)},set:function(b){return b==null?this.removeAttribute("gap"):this.setAttribute("gap",
|
|
20
|
+
""+$APP.Q.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"blur",{get:function(){var b=this.getAttribute("blur");return Gr(b,10,2,30)},set:function(b){return b==null?this.removeAttribute("blur"):this.setAttribute("blur",""+$APP.Q.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"threshold",{get:function(){return Hr(this.getAttribute("threshold"))},set:function(b){return b==null?this.removeAttribute("threshold"):this.setAttribute("threshold",""+$APP.Q.g(b))},enumerable:!0,
|
|
21
|
+
configurable:!0});Object.defineProperty(a,"rippleScale",{get:function(){var b=this.getAttribute("ripple-scale");return Gr(b,8,0,40)},set:function(b){return b==null?this.removeAttribute("ripple-scale"):this.setAttribute("ripple-scale",""+$APP.Q.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"rippleSpeed",{get:function(){var b=this.getAttribute("ripple-speed");return Gr(b,.03,.005,.15)},set:function(b){return b==null?this.removeAttribute("ripple-speed"):this.setAttribute("ripple-speed",
|
|
22
|
+
""+$APP.Q.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"color",{get:function(){return Ir(this.getAttribute("color"))},set:function(b){return b==null?this.removeAttribute("color"):this.setAttribute("color",""+$APP.Q.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"magnetRadius",{get:function(){var b=this.getAttribute("magnet-radius");return Gr(b,150,40,400)},set:function(b){return b==null?this.removeAttribute("magnet-radius"):this.setAttribute("magnet-radius",""+$APP.Q.g(b))},
|
|
23
|
+
enumerable:!0,configurable:!0});Object.defineProperty(a,"magnetStrength",{get:function(){var b=this.getAttribute("magnet-strength");return Gr(b,.6,0,2)},set:function(b){return b==null?this.removeAttribute("magnet-strength"):this.setAttribute("magnet-strength",""+$APP.Q.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"bobIntensity",{get:function(){var b=this.getAttribute("bob-intensity");return Gr(b,1,0,2)},set:function(b){return b==null?this.removeAttribute("bob-intensity"):this.setAttribute("bob-intensity",
|
|
24
|
+
""+$APP.Q.g(b))},enumerable:!0,configurable:!0});return Object.defineProperty(a,"disabled",{get:function(){return this.hasAttribute("disabled")},set:function(b){return $APP.n(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},enumerable:!0,configurable:!0})},ys=function(a){var b=is(a);a.__xLiquidDockModel=b;$APP.fa(a,"__xLiquidDockMouse",{x:0,y:0,active:!1});$APP.fa(a,"__xLiquidDockBlobs",[]);$APP.fa(a,"__xLiquidDockBlobSt",[]);$APP.fa(a,"__xLiquidDockItemsR",[]);a.__xLiquidDockFocus=
|
|
25
|
+
-1;a.__xLiquidDockBurst=0;$APP.n($APP.k(a,"__xLiquidDockRefs"))||Yr(a);ms(a,b);$APP.n(a.hasAttribute("role"))||a.setAttribute("role","navigation");ws(a);vs(a);b=$APP.k(a,"__xLiquidDockRO");$APP.n(b)&&b.disconnect();b=new ResizeObserver(function(){ls(a);return null});a.__xLiquidDockRO=b;b.observe(a);requestAnimationFrame(function(){ks(a);ls(a);return os(a)});return null},zs=function(a){ps(a);ws(a);qs(a);var b=$APP.k(a,"__xLiquidDockRO");$APP.n(b)&&(b.disconnect(),a.__xLiquidDockRO=null);return null},
|
|
26
|
+
As=function(a,b,c,d){if($APP.M(c,d)&&(b=is(a),a.__xLiquidDockModel=b,$APP.n($APP.k(a,"__xLiquidDockRefs")))){d=$APP.J(b);var e=$APP.C(d,$APP.wj);c=$APP.C(d,$APP.ln);d=$APP.C(d,Vr);var f=$APP.k(a,"__xLiquidDockRefs"),h=$APP.wk.g(f);$APP.n(h)&&h.setAttribute("stdDeviation",""+$APP.Q.g(e));e=$APP.ho.g(f);$APP.n(e)&&e.setAttribute("values",c);c=$APP.Yk.g(f);$APP.n(c)&&c.setAttribute("scale",""+$APP.Q.g(d));ms(a,b);ls(a);$APP.n($APP.Y.g(b))?(ps(a),qs(a)):$APP.n($APP.k(a,"__xLiquidDockRaf"))||os(a)}return null},
|
|
27
|
+
Cs=function(){return $APP.Yg("x-liquid-dock",new $APP.N(null,5,[$APP.Pg,Bs,$APP.Qg,ys,$APP.Rg,zs,$APP.Sg,As,$APP.Wg,xs],null))},ds=new $APP.F(null,"ripple-speed","ripple-speed",229709223),Vr=new $APP.F(null,"ripple-scale","ripple-scale",-1874116111),cs=new $APP.F(null,"magnet-radius-raw","magnet-radius-raw",1386161852),Ds=new $APP.F(null,"bobIntensity","bobIntensity",-531647277),Xr=new $APP.F(null,"items-div","items-div",-555506089),Es=new $APP.F(null,"magnetStrength","magnetStrength",331224709),
|
|
28
|
+
Fs=new $APP.F(null,"rippleScale","rippleScale",-1633180735),gs=new $APP.F(null,"magnet-radius","magnet-radius",1447549494),Wr=new $APP.F(null,"liquid","liquid",1322031275),us=new $APP.F(null,"leave","leave",1022579443),Kr=new $APP.F(null,"influence","influence",1453493017),fs=new $APP.F(null,"vertical?","vertical?",-1522630444),bs=new $APP.F(null,"bob-intensity-raw","bob-intensity-raw",-669810474),ts=new $APP.F(null,"move","move",-2110884309),Pr=new $APP.F(null,"dy","dy",1719547243),Or=new $APP.F(null,
|
|
29
|
+
"dx","dx",-381796732),Zr=new $APP.F(null,"magnet-strength-raw","magnet-strength-raw",535053898),$r=new $APP.F(null,"ripple-speed-raw","ripple-speed-raw",-1426902422),Gs=new $APP.F(null,"rippleSpeed","rippleSpeed",-1816718091),Mr=new $APP.F(null,"ty","ty",158290825),Lr=new $APP.F(null,"tx","tx",466630418),es=new $APP.F(null,"bob-intensity","bob-intensity",-981181657),Rr=new $APP.F(null,"lift","lift",903632035),Hs=new $APP.F(null,"magnetRadius","magnetRadius",1616130031),hs=new $APP.F(null,"magnet-strength",
|
|
30
|
+
"magnet-strength",-1089389895),as=new $APP.F(null,"ripple-scale-raw","ripple-scale-raw",1254964336);var Bs="position gap blur threshold ripple-scale ripple-speed color magnet-radius magnet-strength disabled bob-intensity".split(" ");$APP.Yd(["x-liquid-dock-select",new $APP.N(null,4,[$APP.Z,new $APP.N(null,3,[$APP.qj,$APP.V,$APP.Bl,new $APP.Xb(null,"Element","Element",1498489072,null),$APP.Em,$APP.U],null),$APP.Sn,!0,$APP.go,!0,$APP.Fn,!0],null)]);
|
|
31
|
+
$APP.Lf([Fs,$APP.$k,Es,$APP.al,$APP.ln,Hs,Ds,$APP.wj,Gs,$APP.jl,$APP.po],[new $APP.N(null,1,[$APP.R,$APP.V],null),new $APP.N(null,1,[$APP.R,$APP.U],null),new $APP.N(null,1,[$APP.R,$APP.V],null),new $APP.N(null,1,[$APP.R,$APP.T],null),new $APP.N(null,1,[$APP.R,$APP.U],null),new $APP.N(null,1,[$APP.R,$APP.V],null),new $APP.N(null,1,[$APP.R,$APP.V],null),new $APP.N(null,1,[$APP.R,$APP.V],null),new $APP.N(null,1,[$APP.R,$APP.V],null),new $APP.N(null,1,[$APP.R,$APP.V],null),new $APP.N(null,1,[$APP.R,$APP.U],
|
|
32
|
+
null)]);var Er=new $APP.O(null,new $APP.N(null,4,["right",null,"top",null,"bottom",null,"left",null],null),null);var Tr=[0],Ur=":host{display:block;position:fixed;z-index:var("+$APP.Q.g("--x-liquid-dock-z-index")+",50);pointer-events:auto;"+$APP.Q.g("--x-liquid-dock-color")+':var(--x-color-primary,#6366f1);}:host(:not([position])),:host([position\x3d"bottom"]){bottom:12px;left:50%;transform:translateX(-50%);}:host([position\x3d"top"]){top:12px;left:50%;transform:translateX(-50%);}:host([position\x3d"left"]){left:12px;top:50%;transform:translateY(-50%);}:host([position\x3d"right"]){right:12px;top:50%;transform:translateY(-50%);}[part\x3ddock]{display:flex;align-items:center;gap:var('+
|
|
33
|
+
$APP.Q.g("--x-liquid-dock-gap")+",8px);padding:var("+$APP.Q.g("--x-liquid-dock-padding")+",8px);border-radius:var("+$APP.Q.g("--x-liquid-dock-radius")+",20px);background:var("+$APP.Q.g("--x-liquid-dock-bg")+",rgba(255,255,255,0.88));border:1px solid var("+$APP.Q.g("--x-liquid-dock-border")+",rgba(148,163,184,0.22));box-shadow:var("+$APP.Q.g("--x-liquid-dock-shadow")+',0 8px 24px rgba(15,23,42,0.12));backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);position:relative;outline:none;}:host([position\x3d"left"]) [part\x3ddock],:host([position\x3d"right"]) [part\x3ddock]{flex-direction:column;}[part\x3dfilter-svg]{position:absolute;width:0;height:0;overflow:hidden;pointer-events:none;}[part\x3dliquid-layer]{position:absolute;inset:0;border-radius:inherit;overflow:hidden;pointer-events:none;}.blob{position:absolute;border-radius:50%;will-change:transform;pointer-events:none;background:var('+
|
|
34
|
+
$APP.Q.g("--x-liquid-dock-color")+',#6366f1);top:0;left:0;}.blob-rest{opacity:0.65;}.blob-phantom{opacity:0.5;}[part\x3ditems]{display:flex;align-items:center;gap:inherit;position:relative;z-index:1;}:host([position\x3d"left"]) [part\x3ditems],:host([position\x3d"right"]) [part\x3ditems]{flex-direction:column;}::slotted(*){width:var('+$APP.Q.g("--x-liquid-dock-item-size")+",48px);height:var("+$APP.Q.g("--x-liquid-dock-item-size")+",48px);display:flex;align-items:center;justify-content:center;cursor:pointer;will-change:transform;position:relative;z-index:1;border:none;background:transparent;color:inherit;font-size:1.4em;transition:none;border-radius:50%;}::slotted(:hover){background:color-mix(in srgb,var("+
|
|
35
|
+
$APP.Q.g("--x-liquid-dock-color")+",#6366f1) 12%,transparent);}::slotted(:focus-visible){outline:2px solid var("+$APP.Q.g("--x-liquid-dock-color")+",#6366f1);outline-offset:2px;}@media(prefers-color-scheme:dark){:host{--x-liquid-dock-bg:rgba(15,23,42,0.84);--x-liquid-dock-border:rgba(51,65,85,0.9);--x-liquid-dock-shadow:var(--x-shadow-lg,0 14px 36px rgba(0,0,0,0.35));--x-liquid-dock-color:var(--x-color-primary,#818cf8);}}@media(prefers-reduced-motion:reduce){.blob{transition:none!important;}::slotted(*){transition:none!important;}}",
|
|
36
|
+
ns=function ns(a){if($APP.n(a.isConnected)){var c=$APP.k(a,"__xLiquidDockModel"),d=$APP.k(a,"__xLiquidDockMouse"),e=$APP.k(a,"__xLiquidDockBlobs"),f=$APP.k(a,"__xLiquidDockBlobSt"),h=$APP.k(a,"__xLiquidDockItemsR"),l=function(){var vb=js(a);return $APP.n(vb)?vb:[]}(),m=$APP.Ii.i(h.length,l.length),q=$APP.k(d,"x"),r=$APP.k(d,"y"),v=$APP.k(d,"active"),x=gs.g(c),y=hs.g(c),A=es.g(c),D=$APP.po.g(c),G=1+y*.8,I=function(){var vb=$APP.k(a,"__xLiquidDockSeed");return $APP.n(vb)?vb:0}(),H=Date.now();d=function(){var vb=
|
|
37
|
+
$APP.k(a,"__xLiquidDockBurst");return $APP.n(vb)?vb:0}();var K=H-d<300;if(K){H=(1-(H-d)/300)*20;var W=Vr.g(c),ea=$APP.Yk.g($APP.k(a,"__xLiquidDockRefs"));$APP.n(ea)&&ea.setAttribute("scale",""+$APP.Q.g(W+H))}for(H=0;;)if(H<m){W=h[H];var va=$APP.k(W,"cx"),Pa=$APP.k(W,"cy");ea=H*2;var eb=ea+1;if(eb<e.length){W=Kr.g($APP.n(v)?Nr(va,Pa,q,r,x,y,G):new $APP.N(null,4,[Kr,0,$APP.ik,1,Lr,0,Mr,0],null));ea=e[ea];var sb="translate("+$APP.Q.g(va-26)+"px,"+$APP.Q.g(Pa-26)+"px)";ea.style.transform=sb;var tb=Qr(W,
|
|
38
|
+
D);ea=f[eb];sb=Or.g(tb);var Ib=Pr.g(tb);tb=$APP.ik.g(tb);sb=Jr($APP.k(ea,"cpDx"),sb);Ib=Jr($APP.k(ea,"cpDy"),Ib);tb=Jr($APP.k(ea,"cpScale"),tb);ea.cpDx=sb;ea.cpDy=Ib;ea.cpScale=tb;eb=e[eb];Pa="translate("+$APP.Q.g(va-22+sb)+"px,"+$APP.Q.g(Pa-22+Ib)+"px) scale("+$APP.Q.g(tb)+")";eb.style.transform=Pa;eb=Sr(W,$APP.n(v)?function(){var vb=q-va;return vb>1?1:vb<-1?-1:0}():0,D,A);sb=Jr($APP.k(ea,"cLift"),Rr.g(eb));Pa=Jr($APP.k(ea,"cRot"),$APP.un.g(eb));eb=Jr($APP.k(ea,"cScale"),$APP.ik.g(eb));ea.cLift=
|
|
39
|
+
sb;ea.cRot=Pa;ea.cScale=eb;Ib=I+H*2.39996;tb=1-W*.7;W=Math.sin(Ib)*1.8*tb*A;ea=Math.cos(Ib*.7)*.8*tb*A;var fc=Math.sin(Ib*1.3)*1.2*tb*A;Ib=l[H];tb=fs.g(c);sb+=$APP.n(tb)?ea:W;Pa+=fc;W=$APP.n(tb)?"translate("+$APP.Q.g(sb)+"px,"+$APP.Q.g(W)+"px) rotate("+$APP.Q.g(Pa)+"deg) scale("+$APP.Q.g(eb)+")":"translate("+$APP.Q.g(ea)+"px,"+$APP.Q.g(sb)+"px) rotate("+$APP.Q.g(Pa)+"deg) scale("+$APP.Q.g(eb)+")";Ib.style.transform=W}H+=1}else break;f=$APP.k(a,"__xLiquidDockSeed")+ds.g(c);h=$APP.k(a,"__xLiquidDockRefs");
|
|
40
|
+
e=.012+.006*Math.sin(f);a.__xLiquidDockSeed=f;f=$APP.fn.g(h);$APP.n(f)&&f.setAttribute("baseFrequency",""+$APP.Q.g(e));!K&&d>0&&(d=$APP.Yk.g($APP.k(a,"__xLiquidDockRefs")),$APP.n(d)&&d.setAttribute("scale",""+$APP.Q.g(Vr.g(c))),a.__xLiquidDockBurst=0);$APP.fa(a,"__xLiquidDockRaf",requestAnimationFrame(function(){return ns.g?ns.g(a):ns.call(null,a)}))}return null};$APP.ca("baredom.exports.x_liquid_dock.init",Cs);export const init=Cs;
|
package/dist/x-liquid-fill.js
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
enumerable:!0,configurable:!0});Object.defineProperty(a,"
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
$APP.
|
|
38
|
-
new $APP.
|
|
39
|
-
var
|
|
40
|
-
null),"lava",new $APP.
|
|
41
|
-
$APP.
|
|
42
|
-
$APP.
|
|
43
|
-
|
|
44
|
-
r=$APP.k(a,"__xLiquidFillWV"),v=$APP.k(a,"__xLiquidFillWP");a.__xLiquidFillLF=d;$APP.
|
|
45
|
-
A[1];v[d]+=e*
|
|
46
|
-
requestAnimationFrame(function(){return Q$.g?Q$.g(a):Q$.call(null,a)})):a.__xLiquidFillRaf=null}return null};$APP.
|
|
2
|
+
var l$=function(a){a=typeof a==="string"?a.trim().toLowerCase():null;return $APP.Zc(Aca,a)?a:"vertical"},m$=function(a){a=typeof a==="string"?a.trim().toLowerCase():null;return $APP.Zc(Bca,a)?a:"fill"},n$=function(a){a=typeof a==="string"?a.trim().toLowerCase():null;return $APP.Zc(Cca,a)?a:"gold"},o$=function(a,b){if(typeof a==="string"){a=a.trim();if($APP.B.i(a,""))return b;a=parseFloat(a);return $APP.n(isNaN(a))?b:Math.min(1,Math.max(0,a))}return b},p$=function(a){if(typeof a==="string"){a=a.trim();
|
|
3
|
+
if($APP.B.i(a,""))return 3;a=parseInt(a,10);return $APP.n(isNaN(a))?3:Math.min(5,Math.max(2,a))}return 3},s$=function(a,b){b=b>1?a/(b-1):1;return new $APP.N(null,6,[Dca,a*2.39996,q$,.7+.6*b,r$,.6+.8*b,$APP.kn,200-a*30,$APP.Wl,10+a*3,$APP.zj,1],null)},Eca=function(a,b,c){b-=c;return b<=0?0:Math.min(1,Math.max(0,a/b))},Fca=function(a,b,c){return c<=.001?0:Math.min(1,Math.abs(a-b)/c/2E3)},t$=function(a,b,c,d){return c*(.5*Math.sin(a*6.283185307179586*3+b+d)+.3*Math.sin(a*6.283185307179586*5+b*1.3+d*
|
|
4
|
+
1.7)+.2*Math.sin(a*6.283185307179586*7+b*.7+d*2.3))},Gca=function(a,b,c,d,e,f){b=c+(e*(b-a)-f*c)*d;return[a+b*d,b]},Hca=function(a,b,c){return a+(b-a)*c},Ica=function(){var a=u$+1;return u$=a},v$=function(){return $APP.E(window.matchMedia("(prefers-reduced-motion:reduce)").matches)},w$=function(a,b){if(typeof b==="string"&&$APP.M(b.trim(),""))a=document.querySelector(b);else a:{for(a=a.parentElement;;)if($APP.n(a)){var c=window.getComputedStyle(a);b=c.getPropertyValue("overflow-y");c=c.getPropertyValue("overflow-x");
|
|
5
|
+
if($APP.B.i(b,"auto")||$APP.B.i(b,"scroll")||$APP.B.i(c,"auto")||$APP.B.i(c,"scroll"))break a;a=a.parentElement}else{a=null;break a}a=void 0}return a},Jca=function(a,b){return a==null?$APP.B.i(b,"horizontal")?[window.scrollX,document.documentElement.scrollWidth,window.innerWidth]:[window.scrollY,document.documentElement.scrollHeight,window.innerHeight]:$APP.B.i(b,"horizontal")?[a.scrollLeft,a.scrollWidth,a.clientWidth]:[a.scrollTop,a.scrollHeight,a.clientHeight]},Mca=function(a){var b=Ica(),c=a.attachShadow({mode:"open"}),
|
|
6
|
+
d=document.createElement("style"),e=document.createElement("div"),f=document.createElementNS("http://www.w3.org/2000/svg","svg"),h=document.createElementNS("http://www.w3.org/2000/svg","defs"),l=document.createElementNS("http://www.w3.org/2000/svg","radialGradient"),m=document.createElementNS("http://www.w3.org/2000/svg","stop"),q=document.createElementNS("http://www.w3.org/2000/svg","stop"),r=document.createElementNS("http://www.w3.org/2000/svg","stop"),v=document.createElementNS("http://www.w3.org/2000/svg",
|
|
7
|
+
"filter"),x=document.createElementNS("http://www.w3.org/2000/svg","feGaussianBlur"),y=document.createElementNS("http://www.w3.org/2000/svg","feSpecularLighting"),A=document.createElementNS("http://www.w3.org/2000/svg","fePointLight"),D=document.createElementNS("http://www.w3.org/2000/svg","feComposite"),G=document.createElementNS("http://www.w3.org/2000/svg","feComposite"),I=$APP.ya(function(){return function eb(Pa){return new $APP.Ad(null,function(){for(;;){var sb=$APP.t(Pa);if(sb){if($APP.Vc(sb)){var tb=
|
|
8
|
+
$APP.Db(sb),Ib=$APP.z(tb),fc=$APP.Dd(Ib);a:{for(var vb=0;;)if(vb<Ib){$APP.Fc(tb,vb);var ia=fc,Da=document.createElementNS("http://www.w3.org/2000/svg","path");ia.add(Da);vb+=1}else{tb=!0;break a}tb=void 0}return tb?$APP.Gd(fc.aa(),eb($APP.Eb(sb))):$APP.Gd(fc.aa(),null)}$APP.u(sb);return $APP.xd(document.createElementNS("http://www.w3.org/2000/svg","path"),eb($APP.dc(sb)))}return null}},null)}($APP.pg(0,5))}()),H=document.createElement("div"),K=document.createElement("slot"),W=""+$APP.Q.g("xlf-grad-")+
|
|
9
|
+
$APP.Q.g(b),ea=""+$APP.Q.g("xlf-spec-")+$APP.Q.g(b);d.textContent=Kca;e.setAttribute("part","container");f.setAttribute("part","svg");f.setAttribute("viewBox","0 0 300 200");f.setAttribute("preserveAspectRatio","none");f.setAttribute("aria-hidden","true");l.setAttribute("id",W);l.setAttribute("gradientUnits","userSpaceOnUse");l.setAttribute("cx","150");l.setAttribute("cy","200");l.setAttribute("r","200");l.setAttribute("fx","150");l.setAttribute("fy","200");m.setAttribute("offset","0%");m.setAttribute("stop-color",
|
|
10
|
+
"var("+$APP.Q.g("--x-liquid-fill-color-1")+",#B8860B)");q.setAttribute("offset","50%");q.setAttribute("stop-color","var("+$APP.Q.g("--x-liquid-fill-color-2")+",#D4AF37)");r.setAttribute("offset","100%");r.setAttribute("stop-color","var("+$APP.Q.g("--x-liquid-fill-color-3")+",#F9F295)");l.appendChild(m);l.appendChild(q);l.appendChild(r);v.setAttribute("id",ea);v.setAttribute("x","-10%");v.setAttribute("y","-10%");v.setAttribute("width","120%");v.setAttribute("height","120%");x.setAttribute("in","SourceAlpha");
|
|
11
|
+
x.setAttribute("stdDeviation","3");x.setAttribute("result","blur");y.setAttribute("in","blur");y.setAttribute("surfaceScale","5");y.setAttribute("specularConstant","0.75");y.setAttribute("specularExponent","20");y.setAttribute("lighting-color","var("+$APP.Q.g("--x-liquid-fill-specular-color")+",rgba(255,255,240,0.6))");y.setAttribute("result","specular");y.appendChild(A);A.setAttribute("x","90");A.setAttribute("y","-50");A.setAttribute("z","200");D.setAttribute("in","specular");D.setAttribute("in2",
|
|
12
|
+
"SourceAlpha");D.setAttribute("operator","in");D.setAttribute("result","specClip");G.setAttribute("in","SourceGraphic");G.setAttribute("in2","specClip");G.setAttribute("operator","arithmetic");G.setAttribute("k1","0");G.setAttribute("k2","1");G.setAttribute("k3","1");G.setAttribute("k4","0");v.appendChild(x);v.appendChild(y);v.appendChild(D);v.appendChild(G);h.appendChild(l);h.appendChild(v);f.appendChild(h);for(h=0;;)if(h<5)m=I[h],m.setAttribute("class","wave-layer"),m.setAttribute("data-layer",
|
|
13
|
+
""+$APP.Q.g(h)),m.setAttribute("fill","url(#"+$APP.Q.g(W)+")"),m.style.display="none",f.appendChild(m),h+=1;else break;H.setAttribute("part","content");H.appendChild(K);e.appendChild(f);e.appendChild(H);c.appendChild(d);c.appendChild(e);a.__xLiquidFillUid=b;$APP.fa(a,"__xLiquidFillRefs",new $APP.N(null,8,[$APP.Uh,c,$APP.tl,f,x$,I,$APP.Ij,H,y$,A,z$,l,A$,ea,Lca,W],null))},I$=function(a){a=new $APP.N(null,8,[$APP.Hm,a.getAttribute("target"),$APP.qn,a.getAttribute("orientation"),$APP.Jm,a.getAttribute("mode"),
|
|
14
|
+
B$,a.getAttribute("theme"),C$,a.getAttribute("wave-intensity"),D$,a.getAttribute("splash-intensity"),E$,a.getAttribute("layers"),$APP.mk,a.getAttribute("disabled")],null);var b=$APP.J(a);a=$APP.C(b,$APP.Hm);var c=$APP.C(b,$APP.qn),d=$APP.C(b,$APP.Jm),e=$APP.C(b,B$),f=$APP.C(b,C$),h=$APP.C(b,D$),l=$APP.C(b,E$);b=$APP.C(b,$APP.mk);return new $APP.N(null,8,[$APP.uo,typeof a==="string"&&$APP.M(a.trim(),"")?a.trim():null,$APP.Cm,l$(c),$APP.Jk,m$(d),F$,n$(e),G$,o$(f,.5),H$,o$(h,.7),$APP.nk,p$(l),$APP.Y,
|
|
15
|
+
b!=null],null)},J$=function(a,b){var c=new Float64Array(b);a.__xLiquidFillWA=c;c=new Float64Array(b);a.__xLiquidFillWV=c;b=new Float64Array(b);a.__xLiquidFillWP=b},K$=function(a,b){var c=$APP.J($APP.k(a,"__xLiquidFillRefs"));a=$APP.C(c,x$);c=$APP.C(c,A$);for(var d=0;;)if(d<5){var e=a[d];if(d<b){var f=s$(d,b),h=$APP.B.i(d,b-1);e.style.display="";e.setAttribute("opacity",""+$APP.Q.g($APP.zj.g(f)));h?e.setAttribute("filter","url(#"+$APP.Q.g(c)+")"):e.removeAttribute("filter")}else e.style.display="none";
|
|
16
|
+
d+=1}else break},L$=function(a){return $APP.B.i("vertical",$APP.Cm.g(a))&&$APP.M("bar",$APP.Jk.g(a))},M$=function(a){var b=$APP.k(a,"__xLiquidFillModel"),c=$APP.k(a,"__xLiquidFillW"),d=$APP.k(a,"__xLiquidFillH"),e=$APP.k(a,"__xLiquidFillTime"),f=$APP.k(a,"__xLiquidFillProg"),h=$APP.nk.g(b);b=L$(b);var l=$APP.k(a,"__xLiquidFillWA"),m=$APP.k(a,"__xLiquidFillWP");a=$APP.J($APP.k(a,"__xLiquidFillRefs"));a=$APP.C(a,x$);if($APP.n($APP.n(c)?$APP.n(d)?c>0&&d>0:d:c))for(var q=0;;)if(q<h){var r=a[q],v=l[q],
|
|
17
|
+
x=m[q];if(b){var y=d*(1-f),A=c,D=d,G=e,I=[];I.push("M0,"+$APP.Q.g((y+t$(0,G,v,x)).toFixed(2)));for(var H=0;;)if(H<10){var K=(H+.5)/10,W=(H+1)/10,ea=y+t$(K,G,v,x),va=W*A;W=y+t$(W,G,v,x);I.push("Q"+$APP.Q.g((K*A).toFixed(2))+","+$APP.Q.g(ea.toFixed(2))+" "+$APP.Q.g(va.toFixed(2))+","+$APP.Q.g(W.toFixed(2)));H+=1}else break;I.push("L"+$APP.Q.g(A.toFixed(2))+","+$APP.Q.g(D.toFixed(2)));I.push("L0,"+$APP.Q.g(D.toFixed(2)));I.push("Z");r.setAttribute("d",I.join(""))}else{y=c*f;A=d;D=e;G=v;v=x;x=[];x.push("M"+
|
|
18
|
+
$APP.Q.g((y+t$(0,D,G,v)).toFixed(2))+",0");for(I=0;;)if(I<10)H=(I+.5)/10,va=(I+1)/10,K=H*A,ea=va*A,va=y+t$(va,D,G,v),x.push("Q"+$APP.Q.g((y+t$(H,D,G,v)).toFixed(2))+","+$APP.Q.g(K.toFixed(2))+" "+$APP.Q.g(va.toFixed(2))+","+$APP.Q.g(ea.toFixed(2))),I+=1;else break;x.push("L0,"+$APP.Q.g(A.toFixed(2)));x.push("L0,0");x.push("Z");r.setAttribute("d",x.join(""))}q+=1}else break},N$=function(a){var b=$APP.k(a,"__xLiquidFillModel"),c=$APP.k(a,"__xLiquidFillW"),d=$APP.k(a,"__xLiquidFillH");var e=$APP.k(a,
|
|
19
|
+
"__xLiquidFillProg");e=$APP.n(e)?e:0;var f=$APP.nk.g(b);b=L$(b);a=$APP.J($APP.k(a,"__xLiquidFillRefs"));a=$APP.C(a,x$);if($APP.n($APP.n(c)?$APP.n(d)?c>0&&d>0:d:c))for(var h=0;;)if(h<f){var l=a[h];if(b){var m=d*(1-e);l.setAttribute("d","M0,"+$APP.Q.g(m.toFixed(2))+"L"+$APP.Q.g(c.toFixed(2))+","+$APP.Q.g(m.toFixed(2))+"L"+$APP.Q.g(c.toFixed(2))+","+$APP.Q.g(d.toFixed(2))+"L0,"+$APP.Q.g(d.toFixed(2))+"Z")}else m=c*e,l.setAttribute("d","M"+$APP.Q.g(m.toFixed(2))+",0L"+$APP.Q.g(m.toFixed(2))+","+$APP.Q.g(d.toFixed(2))+
|
|
20
|
+
"L0,"+$APP.Q.g(d.toFixed(2))+"L0,0Z");h+=1}else break},P$=function(a,b,c){$APP.P(a,"x-liquid-fill-progress",$APP.Xi(new $APP.N(null,2,[$APP.vn,b,O$,c],null)))},R$=function(a){$APP.n($APP.k(a,"__xLiquidFillRaf"))||($APP.fa(a,"__xLiquidFillLF",performance.now()),$APP.fa(a,"__xLiquidFillRaf",requestAnimationFrame(function(){return Q$(a)})))},S$=function(a){var b=$APP.k(a,"__xLiquidFillRaf");$APP.n(b)&&(cancelAnimationFrame(b),a.__xLiquidFillRaf=null)},V$=function(a){if($APP.n(function(){var h=a.isConnected;
|
|
21
|
+
return $APP.n(h)?(h=$APP.k(a,"__xLiquidFillVis"),$APP.n(h)?$APP.p($APP.Y.g($APP.k(a,"__xLiquidFillModel"))):h):h}())){var b=$APP.k(a,"__xLiquidFillModel");$APP.k(a,"__xLiquidFillST")==null&&$APP.uo.g(b)!=null&&(b=w$(a,$APP.uo.g(b)),$APP.n(b)&&(T$.g?T$.g(a):T$.call(null,a),a.__xLiquidFillST=b,U$.g?U$.g(a):U$.call(null,a)));var c=$APP.k(a,"__xLiquidFillModel");b=$APP.k(a,"__xLiquidFillST");var d=$APP.Cm.g(c);d=Jca(b,d);var e=d[0];b=d[1];d=d[2];var f=performance.now();b=Eca(e,b,d);d=Fca(e,function(){var h=
|
|
22
|
+
$APP.k(a,"__xLiquidFillLS");return $APP.n(h)?h:e}(),(f-function(){var h=$APP.k(a,"__xLiquidFillLST");return $APP.n(h)?h:f}())/1E3);a.__xLiquidFillTP=b;$APP.fa(a,"__xLiquidFillSV",Math.max(function(){var h=$APP.k(a,"__xLiquidFillSV");return $APP.n(h)?h:0}(),d));a.__xLiquidFillLS=e;a.__xLiquidFillLST=f;$APP.n(function(){var h=$APP.Y.g(c);return $APP.n(h)?h:v$()}())||R$(a);$APP.n(function(){var h=$APP.Y.g(c);return $APP.n(h)?h:v$()}())&&(a.__xLiquidFillProg=b,N$(a),P$(a,b,d))}return null},U$=function(a){var b=
|
|
23
|
+
$APP.k(a,"__xLiquidFillHdl");if($APP.n($APP.n(b)?$APP.p($APP.k(b,"scrollAttached")):b)){var c=$APP.k(b,"scroll");a=$APP.k(a,"__xLiquidFillST");$APP.n(a)?a.addEventListener("scroll",c,{passive:!0}):window.addEventListener("scroll",c,{passive:!0});b.scrollAttached=!0}else return null},T$=function(a){var b=$APP.k(a,"__xLiquidFillHdl");if($APP.n($APP.n(b)?$APP.k(b,"scrollAttached"):b)){var c=$APP.k(b,"scroll");a=$APP.k(a,"__xLiquidFillST");$APP.n(a)?a.removeEventListener("scroll",c):window.removeEventListener("scroll",
|
|
24
|
+
c);b.scrollAttached=!1}else return null},W$=function(a){var b=$APP.uo.g($APP.k(a,"__xLiquidFillModel")),c=w$(a,b);a.__xLiquidFillST=c;U$(a);V$(a);b!=null&&c==null&&requestAnimationFrame(function(){if($APP.n(a.isConnected)){var d=$APP.uo.g($APP.k(a,"__xLiquidFillModel"));d!=null&&$APP.k(a,"__xLiquidFillST")==null&&(d=w$(a,d),$APP.n(d)&&(T$(a),a.__xLiquidFillST=d,U$(a),V$(a)))}return null})},Nca=function(a){$APP.fa(a,"__xLiquidFillHdl",{scroll:function(){return V$(a)},scrollAttached:!1})},X$=function(a){T$(a);
|
|
25
|
+
a.__xLiquidFillHdl=null},Oca=function(a){var b=new IntersectionObserver(function(c){c=c[0].isIntersecting;a.__xLiquidFillVis=c;$APP.n(c)?(c=$APP.Y.g($APP.k(a,"__xLiquidFillModel")),c=$APP.n(c)?c:v$(),$APP.n(c)||R$(a)):S$(a);return null},{threshold:[0]});b.observe(a);a.__xLiquidFillIO=b;b=new ResizeObserver(function(c){if(c.length>0){var d=c[0].contentRect;c=d.width;d=d.height;if(c>0&&d>0){a.__xLiquidFillW=c;a.__xLiquidFillH=d;var e=$APP.J($APP.k(a,"__xLiquidFillRefs")),f=$APP.C(e,$APP.tl),h=$APP.C(e,
|
|
26
|
+
y$);e=$APP.C(e,z$);var l=Math.max(c,d);f.setAttribute("viewBox","0 0 "+$APP.Q.g(c)+" "+$APP.Q.g(d));h.setAttribute("x",""+$APP.Q.g(c*.3));e.setAttribute("cx",""+$APP.Q.g(c*.5));e.setAttribute("cy",""+$APP.Q.g(d));e.setAttribute("r",""+$APP.Q.g(l));e.setAttribute("fx",""+$APP.Q.g(c*.5));e.setAttribute("fy",""+$APP.Q.g(d));c=$APP.Y.g($APP.k(a,"__xLiquidFillModel"));c=$APP.n(c)?c:v$();$APP.n(c)?N$(a):(M$(a),R$(a))}}return null});b.observe(a);a.__xLiquidFillRO=b},Z$=function(a,b){b=$APP.C(Pca,b);$APP.n(b)?
|
|
27
|
+
(a=a.style,a.setProperty("--x-liquid-fill-color-1",$APP.sm.g(b)),a.setProperty("--x-liquid-fill-color-2",$APP.tm.g(b)),a.setProperty("--x-liquid-fill-color-3",Y$.g(b)),a.setProperty("--x-liquid-fill-specular-color",$APP.Bm.g(b))):(a=a.style,a.removeProperty("--x-liquid-fill-color-1"),a.removeProperty("--x-liquid-fill-color-2"),a.removeProperty("--x-liquid-fill-color-3"),a.removeProperty("--x-liquid-fill-specular-color"))},Qca=function(a){Object.defineProperty(a,"target",{get:function(){return this.getAttribute("target")},
|
|
28
|
+
set:function(b){return $APP.n(b)?this.setAttribute("target",""+$APP.Q.g(b)):this.removeAttribute("target")},enumerable:!0,configurable:!0});Object.defineProperty(a,"orientation",{get:function(){return l$(this.getAttribute("orientation"))},set:function(b){return $APP.n(b)?this.setAttribute("orientation",""+$APP.Q.g(b)):this.removeAttribute("orientation")},enumerable:!0,configurable:!0});Object.defineProperty(a,"mode",{get:function(){return m$(this.getAttribute("mode"))},set:function(b){return $APP.n(b)?
|
|
29
|
+
this.setAttribute("mode",""+$APP.Q.g(b)):this.removeAttribute("mode")},enumerable:!0,configurable:!0});Object.defineProperty(a,"theme",{get:function(){return n$(this.getAttribute("theme"))},set:function(b){return $APP.n(b)?this.setAttribute("theme",""+$APP.Q.g(b)):this.removeAttribute("theme")},enumerable:!0,configurable:!0});Object.defineProperty(a,"waveIntensity",{get:function(){var b=this.getAttribute("wave-intensity");return o$(b,.5)},set:function(b){return b==null?this.removeAttribute("wave-intensity"):
|
|
30
|
+
this.setAttribute("wave-intensity",""+$APP.Q.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"splashIntensity",{get:function(){var b=this.getAttribute("splash-intensity");return o$(b,.7)},set:function(b){return b==null?this.removeAttribute("splash-intensity"):this.setAttribute("splash-intensity",""+$APP.Q.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"layers",{get:function(){return p$(this.getAttribute("layers"))},set:function(b){return b==null?this.removeAttribute("layers"):
|
|
31
|
+
this.setAttribute("layers",""+$APP.Q.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"disabled",{get:function(){return this.hasAttribute("disabled")},set:function(b){return $APP.n(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},enumerable:!0,configurable:!0});return Object.defineProperty(a,"progress",{get:function(){var b=$APP.k(this,"__xLiquidFillProg");return $APP.n(b)?b:0},enumerable:!0,configurable:!0})},Rca=function(a){var b=I$(a);a.__xLiquidFillModel=b;a.__xLiquidFillProg=
|
|
32
|
+
0;a.__xLiquidFillTP=0;a.__xLiquidFillSV=0;a.__xLiquidFillTime=0;a.__xLiquidFillLD=-1;a.__xLiquidFillVis=!0;$APP.n($APP.k(a,"__xLiquidFillRefs"))||Mca(a);Z$(a,F$.g(b));J$(a,$APP.nk.g(b));K$(a,$APP.nk.g(b));X$(a);Nca(a);Oca(a);W$(a);return null},Sca=function(a){S$(a);X$(a);var b=$APP.k(a,"__xLiquidFillIO");$APP.n(b)&&(b.disconnect(),a.__xLiquidFillIO=null);b=$APP.k(a,"__xLiquidFillRO");$APP.n(b)&&(b.disconnect(),a.__xLiquidFillRO=null);a.__xLiquidFillVis=!1;return null},Tca=function(a,b,c,d){if($APP.M(c,
|
|
33
|
+
d)&&$APP.n($APP.k(a,"__xLiquidFillRefs"))){b=I$(a);c=$APP.k(a,"__xLiquidFillModel");a.__xLiquidFillModel=b;if(c==null||$APP.M($APP.nk.g(b),$APP.nk.g(c)))J$(a,$APP.nk.g(b)),K$(a,$APP.nk.g(b));(c==null||$APP.M(F$.g(b),F$.g(c)))&&Z$(a,F$.g(b));if(c==null||$APP.M($APP.uo.g(b),$APP.uo.g(c)))T$(a),W$(a);c=$APP.k(a,"__xLiquidFillW");d=$APP.k(a,"__xLiquidFillH");$APP.n($APP.n(c)?$APP.n(d)?c>0&&d>0:d:c)&&(b=$APP.Y.g(b),b=$APP.n(b)?b:v$(),$APP.n(b)?(S$(a),N$(a)):(M$(a),R$(a)))}return null},$$=function(){return $APP.Yg("x-liquid-fill",
|
|
34
|
+
new $APP.N(null,5,[$APP.Pg,Uca,$APP.Qg,Rca,$APP.Rg,Sca,$APP.Sg,Tca,$APP.Wg,Qca],null))},r$=new $APP.F(null,"amp-mult","amp-mult",698045242),y$=new $APP.F(null,"feLight","feLight",-1941454484),q$=new $APP.F(null,"speed-mult","speed-mult",-353631814),E$=new $APP.F(null,"layers-raw","layers-raw",-233899391),Dca=new $APP.F(null,"phase-offset","phase-offset",-1013192067),x$=new $APP.F(null,"paths","paths",-1807389588),B$=new $APP.F(null,"theme-raw","theme-raw",1068228849),A$=new $APP.F(null,"filt-id",
|
|
35
|
+
"filt-id",-672558408),G$=new $APP.F(null,"wave-intensity","wave-intensity",-915557489),z$=new $APP.F(null,"grad","grad",1125187229),F$=new $APP.F(null,"theme","theme",-1247880880),Y$=new $APP.F(null,"color-3","color-3",265727868),C$=new $APP.F(null,"wave-intensity-raw","wave-intensity-raw",1563162777),Lca=new $APP.F(null,"grad-id","grad-id",1430109665),H$=new $APP.F(null,"splash-intensity","splash-intensity",-619909243),O$=new $APP.F(null,"velocity","velocity",-581524355),D$=new $APP.F(null,"splash-intensity-raw",
|
|
36
|
+
"splash-intensity-raw",1573376927);var Uca="target orientation mode theme wave-intensity splash-intensity layers disabled".split(" ");
|
|
37
|
+
$APP.Lf([new $APP.F(null,"waveIntensity","waveIntensity",695633410),$APP.al,new $APP.F(null,"splashIntensity","splashIntensity",1275664841),$APP.Jk,$APP.Cm,F$,$APP.nk,$APP.uo,$APP.vn],[new $APP.N(null,1,[$APP.R,$APP.V],null),new $APP.N(null,1,[$APP.R,$APP.T],null),new $APP.N(null,1,[$APP.R,$APP.V],null),new $APP.N(null,1,[$APP.R,$APP.U],null),new $APP.N(null,1,[$APP.R,$APP.U],null),new $APP.N(null,1,[$APP.R,$APP.U],null),new $APP.N(null,1,[$APP.R,$APP.V],null),new $APP.N(null,1,[$APP.R,$APP.U],null),
|
|
38
|
+
new $APP.N(null,2,[$APP.R,$APP.V,$APP.El,!0],null)]);$APP.Yd(["x-liquid-fill-progress",new $APP.N(null,2,[$APP.Z,new $APP.N(null,2,[$APP.vn,$APP.V,O$,$APP.V],null),$APP.Fn,!1],null)]);
|
|
39
|
+
var Aca=new $APP.O(null,new $APP.N(null,2,["vertical",null,"horizontal",null],null),null),Bca=new $APP.O(null,new $APP.N(null,2,["bar",null,"fill",null],null),null),Cca=new $APP.O(null,new $APP.N(null,4,["custom",null,"gold",null,"lava",null,"water",null],null),null),Pca=new $APP.N(null,3,["gold",new $APP.N(null,4,[$APP.sm,"#B8860B",$APP.tm,"#D4AF37",Y$,"#F9F295",$APP.Bm,"rgba(255,255,240,0.6)"],null),"water",new $APP.N(null,4,[$APP.sm,"#0077B6",$APP.tm,"#00B4D8",Y$,"#90E0EF",$APP.Bm,"rgba(255,255,255,0.5)"],
|
|
40
|
+
null),"lava",new $APP.N(null,4,[$APP.sm,"#8B0000",$APP.tm,"#FF4500",Y$,"#FF8C00",$APP.Bm,"rgba(255,255,200,0.7)"],null)],null);var u$=0,Kca=":host{display:block;position:relative;overflow:hidden;"+$APP.Q.g("--x-liquid-fill-bg")+":transparent;"+$APP.Q.g("--x-liquid-fill-border")+":none;"+$APP.Q.g("--x-liquid-fill-radius")+":0;"+$APP.Q.g("--x-liquid-fill-opacity")+":1;"+$APP.Q.g("--x-liquid-fill-wave-speed")+":1;"+$APP.Q.g("--x-liquid-fill-color-1")+":#B8860B;"+$APP.Q.g("--x-liquid-fill-color-2")+":#D4AF37;"+$APP.Q.g("--x-liquid-fill-color-3")+":#F9F295;"+$APP.Q.g("--x-liquid-fill-specular-color")+":rgba(255,255,240,0.6);}:host{background:var("+
|
|
41
|
+
$APP.Q.g("--x-liquid-fill-bg")+",transparent);border:var("+$APP.Q.g("--x-liquid-fill-border")+",none);border-radius:var("+$APP.Q.g("--x-liquid-fill-radius")+",0);}:host([mode\x3dbar]){"+$APP.Q.g("--x-liquid-fill-bar-height")+":14px;height:var("+$APP.Q.g("--x-liquid-fill-bar-height")+",14px);}[part\x3dcontainer]{position:relative;width:100%;height:100%;overflow:hidden;border-radius:inherit;}[part\x3dsvg]{display:block;width:100%;height:100%;position:absolute;inset:0;pointer-events:none;opacity:var("+
|
|
42
|
+
$APP.Q.g("--x-liquid-fill-opacity")+",1);}[part\x3dcontent]{position:relative;z-index:1;}."+$APP.Q.g("wave-layer")+"{transition:none;}@media(prefers-color-scheme:dark){:host{"+$APP.Q.g("--x-liquid-fill-bg")+":transparent;"+$APP.Q.g("--x-liquid-fill-specular-color")+":rgba(255,255,200,0.4);}}@media(prefers-reduced-motion:reduce){."+$APP.Q.g("wave-layer")+"{transition:none!important;}}",Q$=function Q$(a){if(!$APP.p(a.isConnected))if($APP.n(function(){var G=$APP.Y.g($APP.k(a,"__xLiquidFillModel"));return $APP.n(G)?
|
|
43
|
+
G:v$()}()))a.__xLiquidFillRaf=null;else{var c=$APP.k(a,"__xLiquidFillModel"),d=performance.now(),e=Math.min(d-$APP.k(a,"__xLiquidFillLF"),100)/1E3,f=function(){var G=window.getComputedStyle(a).getPropertyValue("--x-liquid-fill-wave-speed");G=typeof G==="string"?parseFloat(G.trim()):null;var I=G==null;I||(I=isNaN(G),I=$APP.n(I)?I:G<=0);return $APP.n(I)?1:G}(),h=$APP.nk.g(c),l=G$.g(c);c=H$.g(c);var m=function(){var G=$APP.k(a,"__xLiquidFillSV");return $APP.n(G)?G:0}(),q=$APP.k(a,"__xLiquidFillWA"),
|
|
44
|
+
r=$APP.k(a,"__xLiquidFillWV"),v=$APP.k(a,"__xLiquidFillWP");a.__xLiquidFillLF=d;$APP.fa(a,"__xLiquidFillTime",function(){var G=$APP.k(a,"__xLiquidFillTime");return $APP.n(G)?G:0}()+e*f);$APP.fa(a,"__xLiquidFillProg",Hca(function(){var G=$APP.k(a,"__xLiquidFillProg");return $APP.n(G)?G:0}(),function(){var G=$APP.k(a,"__xLiquidFillTP");return $APP.n(G)?G:0}(),5*e));var x=[!1];for(d=0;;)if(d<h){var y=s$(d,h),A=m*l*c*r$.g(y)*30+2*l*r$.g(y);A=Gca(q[d],A,r[d],e,$APP.kn.g(y),$APP.Wl.g(y));q[d]=A[0];r[d]=
|
|
45
|
+
A[1];v[d]+=e*f*q$.g(y);Math.abs(r[d])>.05&&(x[0]=!0);d+=1}else break;a.__xLiquidFillSV=m*Math.max(0,1-3*e);M$(a);e=$APP.k(a,"__xLiquidFillProg");Math.abs(e-function(){var G=$APP.k(a,"__xLiquidFillLD");return $APP.n(G)?G:-1}())>.005&&(a.__xLiquidFillLD=e,P$(a,e,m));var D=Math.abs(function(){var G=$APP.k(a,"__xLiquidFillProg");return $APP.n(G)?G:0}()-function(){var G=$APP.k(a,"__xLiquidFillTP");return $APP.n(G)?G:0}());$APP.n(function(){var G=x[0];return $APP.n(G)?G:m>.01||D>.001}())?$APP.fa(a,"__xLiquidFillRaf",
|
|
46
|
+
requestAnimationFrame(function(){return Q$.g?Q$.g(a):Q$.call(null,a)})):a.__xLiquidFillRaf=null}return null};$APP.ca("baredom.exports.x_liquid_fill.init",$$);export const init=$$;
|