@awc-ui/core 1.0.0-beta → 1.0.0-beta.1

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.
Files changed (79) hide show
  1. package/dist/components/p-6wZSqm_2.js +2 -0
  2. package/dist/components/{p-Bx5sxRqa.js.map → p-6wZSqm_2.js.map} +1 -1
  3. package/dist/components/p-7fN_yCXW.js +2 -0
  4. package/dist/components/{p-CJdqKSuf.js.map → p-7fN_yCXW.js.map} +1 -1
  5. package/dist/components/{p-G5m2pHZ2.js → p-B0Opn6dK.js} +2 -2
  6. package/dist/components/{p-pDrTJmeT.js → p-B3MWYEEJ.js} +2 -2
  7. package/dist/components/{p-DGGkdSZk.js → p-BwXpiUsu.js} +2 -2
  8. package/dist/{md3/p-B0NLeNWu.js → components/p-Bx6--dQF.js} +2 -2
  9. package/dist/components/{p-BIIp3Qod.js → p-C8EP4S21.js} +2 -2
  10. package/dist/components/{p-CWM3KSti.js → p-C_ogF68H.js} +2 -2
  11. package/dist/components/{p-BlwGYUkt.js → p-Ch2-tttM.js} +2 -2
  12. package/dist/components/p-DXXUoRSH.js +2 -0
  13. package/dist/components/{p-DWUCvzfU.js.map → p-DXXUoRSH.js.map} +1 -1
  14. package/dist/components/p-Dp-w93ot.js +2 -0
  15. package/dist/components/{p-BUYYCrGa.js.map → p-Dp-w93ot.js.map} +1 -1
  16. package/dist/{md3/p-CGStn3Iq.js → components/p-DvOKnoqK.js} +2 -2
  17. package/dist/components/{p-B7yMxWo-.js → p-DzPKu-Ma.js} +2 -2
  18. package/dist/components/{p-CXpXrhQH.js → p-RLxbNqRv.js} +2 -2
  19. package/dist/components/p-UdGDg2oJ.js +2 -0
  20. package/dist/components/{p-BujtL9xW.js.map → p-UdGDg2oJ.js.map} +1 -1
  21. package/dist/components/p-e2HRV63Y.js +2 -0
  22. package/dist/components/{p-CrlkPxeB.js.map → p-e2HRV63Y.js.map} +1 -1
  23. package/dist/components/p-stybaFzj.js +2 -0
  24. package/dist/components/{p-JbwZ84YK.js.map → p-stybaFzj.js.map} +1 -1
  25. package/dist/components/p-uTEkf0sE.js +2 -0
  26. package/dist/components/{p-BXwh1zjF.js.map → p-uTEkf0sE.js.map} +1 -1
  27. package/dist/esm/{a11y-C9_cZAF_.js → a11y-C6CRqodW.js} +3 -3
  28. package/dist/esm/{a11y-C9_cZAF_.js.map → a11y-C6CRqodW.js.map} +1 -1
  29. package/dist/esm/{bar-chart-IvBgAmmF.js → bar-chart-ZZrajEkM.js} +4 -4
  30. package/dist/esm/{bar-chart-IvBgAmmF.js.map → bar-chart-ZZrajEkM.js.map} +1 -1
  31. package/dist/esm/{chart-D1kP9gfW.js → chart-32olae06.js} +4 -4
  32. package/dist/esm/{chart-D1kP9gfW.js.map → chart-32olae06.js.map} +1 -1
  33. package/dist/esm/{hit-test-DFfwlMb9.js → hit-test-DHldf5Lm.js} +3 -3
  34. package/dist/esm/{hit-test-DFfwlMb9.js.map → hit-test-DHldf5Lm.js.map} +1 -1
  35. package/dist/esm/{rtl-CGStn3Iq.js → rtl-DvOKnoqK.js} +3 -3
  36. package/dist/esm/{rtl-CGStn3Iq.js.map → rtl-DvOKnoqK.js.map} +1 -1
  37. package/dist/md3/p-04e97f5d.entry.js +2 -0
  38. package/dist/md3/{p-ec14eaca.entry.js.map → p-04e97f5d.entry.js.map} +1 -1
  39. package/dist/md3/p-3cce1de3.entry.js +2 -0
  40. package/dist/md3/{p-2121c939.entry.js.map → p-3cce1de3.entry.js.map} +1 -1
  41. package/dist/md3/p-4d82132d.entry.js +2 -0
  42. package/dist/md3/{p-fe78659d.entry.js.map → p-4d82132d.entry.js.map} +1 -1
  43. package/dist/{components/p-Bu-m4Gm2.js → md3/p-Bx6--dQF.js} +2 -2
  44. package/dist/md3/{p-B0NLeNWu.js.map → p-Bx6--dQF.js.map} +1 -1
  45. package/dist/md3/{p-CWM3KSti.js → p-C_ogF68H.js} +2 -2
  46. package/dist/md3/{p-CWM3KSti.js.map → p-C_ogF68H.js.map} +1 -1
  47. package/dist/{components/p-CGStn3Iq.js → md3/p-DvOKnoqK.js} +2 -2
  48. package/dist/md3/{p-CGStn3Iq.js.map → p-DvOKnoqK.js.map} +1 -1
  49. package/dist/md3/{p-B7yMxWo-.js → p-DzPKu-Ma.js} +2 -2
  50. package/dist/md3/{p-B7yMxWo-.js.map → p-DzPKu-Ma.js.map} +1 -1
  51. package/dist/md3/{p-CXpXrhQH.js → p-RLxbNqRv.js} +2 -2
  52. package/dist/md3/{p-CXpXrhQH.js.map → p-RLxbNqRv.js.map} +1 -1
  53. package/dist/md3/{p-f6373c6c.entry.js → p-aaec2698.entry.js} +2 -2
  54. package/dist/md3/{p-9ff2d5d1.entry.js → p-c063c823.entry.js} +2 -2
  55. package/main-llm.md +2 -2
  56. package/package.json +24 -3
  57. package/dist/components/p-BUYYCrGa.js +0 -2
  58. package/dist/components/p-BXwh1zjF.js +0 -2
  59. package/dist/components/p-BujtL9xW.js +0 -2
  60. package/dist/components/p-Bx5sxRqa.js +0 -2
  61. package/dist/components/p-CJdqKSuf.js +0 -2
  62. package/dist/components/p-CrlkPxeB.js +0 -2
  63. package/dist/components/p-DWUCvzfU.js +0 -2
  64. package/dist/components/p-JbwZ84YK.js +0 -2
  65. package/dist/md3/p-2121c939.entry.js +0 -2
  66. package/dist/md3/p-ec14eaca.entry.js +0 -2
  67. package/dist/md3/p-fe78659d.entry.js +0 -2
  68. /package/dist/components/{p-G5m2pHZ2.js.map → p-B0Opn6dK.js.map} +0 -0
  69. /package/dist/components/{p-pDrTJmeT.js.map → p-B3MWYEEJ.js.map} +0 -0
  70. /package/dist/components/{p-DGGkdSZk.js.map → p-BwXpiUsu.js.map} +0 -0
  71. /package/dist/components/{p-Bu-m4Gm2.js.map → p-Bx6--dQF.js.map} +0 -0
  72. /package/dist/components/{p-BIIp3Qod.js.map → p-C8EP4S21.js.map} +0 -0
  73. /package/dist/components/{p-CWM3KSti.js.map → p-C_ogF68H.js.map} +0 -0
  74. /package/dist/components/{p-BlwGYUkt.js.map → p-Ch2-tttM.js.map} +0 -0
  75. /package/dist/components/{p-CGStn3Iq.js.map → p-DvOKnoqK.js.map} +0 -0
  76. /package/dist/components/{p-B7yMxWo-.js.map → p-DzPKu-Ma.js.map} +0 -0
  77. /package/dist/components/{p-CXpXrhQH.js.map → p-RLxbNqRv.js.map} +0 -0
  78. /package/dist/md3/{p-f6373c6c.entry.js.map → p-aaec2698.entry.js.map} +0 -0
  79. /package/dist/md3/{p-9ff2d5d1.entry.js.map → p-c063c823.entry.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{r as t,c as s,h as i,H as e,a as n}from"./p-DTaX19_O.js";import{N as o,B as a,O as r,P as h,w as c,f as l,g as d,h as f,s as u,l as p,n as m,Q as y,R as g,x as b,S as x,T as v,U as M,a as _,V as k,W as A,b as w,p as C}from"./p-CGStn3Iq.js";import{b as z,a as F}from"./p-CWM3KSti.js";function P(t,s){return{from:o(t,s.surface,.3),to:t}}function S(t,s,i){const e=t+s;const n=Math.min(t,e);const o=Math.max(t,e);const a=[];const r=[];for(const t of[n,o]){for(const s of[1,i]){a.push(Math.cos(t)*s);r.push(Math.sin(t)*s)}}const h=Math.PI/2;for(let t=Math.ceil(n/h);t*h<=o;t++){a.push(Math.cos(t*h));r.push(Math.sin(t*h))}return{x0:Math.min(...a),x1:Math.max(...a),y0:Math.min(...r),y1:Math.max(...r)}}function R(t,s,i){return $(t,s,i)||$(t,i,s)}function $(t,s,i){let e=i;let n=0;while(e>=0&&n++<32){if(e===s)return true;e=t[e]?.parent??-1}return false}function I(t,s,i){const e=s.labelMode??i;const n=s.valueFormatter(t.value);if(e==="name")return t.label;if(e==="both")return`${t.label} · ${n}`;return n}const L=12;const D=.52;const q=1.45;const E=.12;const H=.02;const T=7;const j=3;const B=T+j;const V=3;const O=.45;const N=Math.PI/180;function U(t,s){return t.length*s*.58}function W(t){const[s,i,e]=r(t);const n=.299*s+.587*i+.114*e;return n>.62?"rgba(0, 0, 0, 0.82)":"#ffffff"}function K(t,s){if(typeof t==="number")return Number.isFinite(t)&&t>=0?t:0;const i=t.trim();const e=parseFloat(i);if(!Number.isFinite(e)||e<0)return 0;return i.endsWith("%")?e/100*s:e}function G(t,s,i,e){const n=t.data.map(((t,s)=>({d:t,i:s}))).filter((t=>!t.d.hidden&&t.d.value>0&&(t.d.level??0)===0));const r=n.reduce(((t,s)=>t+s.d.value),0);const c=t.data.reduce(((t,s)=>Math.max(t,(s.level??0)+1)),1);const l=t.title?s.titleSize+12+(t.subtitle?s.labelSize+4:0):0;const d=t.legend&&t.legend!=="none"&&t.data.length>1?t.legend:null;const f=d?Math.max(0,...t.data.map((t=>U(t.label,s.labelSize)))):0;let u=8;let p=8;let m=8+l;let y=8;if(d){const e=d==="left"||d==="right";if(e){const s=t.legendExtent!=null?t.legendExtent+16:f+30;const e=Math.min(s,i*h);if(d==="left")u+=e;else p+=e}else{let e=t.legendExtent!=null?t.legendExtent+8:0;if(t.legendExtent==null){const n=Math.max(60,i*.86);let o=1;let a=0;for(const i of t.data){const t=U(i.label,s.labelSize)+28;if(a>0&&a+t>n){o++;a=t}else a+=t}e=o*(s.labelSize+8)+6}if(d.startsWith("bottom"))y+=e;else m+=e}}const g={x:u,y:m,width:Math.max(1,i-u-p),height:Math.max(1,e-m-y)};const b=-t.startAngleDeg*N;const x=-(t.endAngleDeg-t.startAngleDeg)*N;const v=(()=>{const s=K(t.innerRadius,100);const i=K(t.outerRadius,100);return i>0?Math.max(0,Math.min(.95,s/i)):0})();const M=Math.abs(x)<Math.PI*2-.02;const _=M?S(b,x,v):{x0:-1,x1:1,y0:-1,y1:1};const k=Math.max(1,Math.min(g.width/Math.max(.01,_.x1-_.x0),g.height/Math.max(.01,_.y1-_.y0)));const A=g.x+g.width/2-(_.x0+_.x1)/2*k;const w=g.y+g.height/2-(_.y0+_.y1)/2*k;const C=(()=>{if(!t.showLabels||d)return 6;const i=n.reduce(((s,i)=>Math.max(s,I(i.d,t,"both").length)),0);const e=K(t.outerRadius,k);const o=12+i*s.labelSize*D;const a=Math.max(.05,e/Math.max(1,k));return Math.max(6,Math.min(k*.45,(e+o-k)/a))})();const z=Math.max(8,k-C);const F=Math.max(1,Math.min(K(t.outerRadius,z),z));const $=Math.max(0,Math.min(K(t.innerRadius,z),F-2));const G=Array.from({length:c},((s,i)=>{const e=t.ringWidths?.[i];return Number.isFinite(e)&&e>0?e:i<c-1?q:1}));const Q=G.reduce(((t,s)=>t+s),0)||1;const X=F-$;const J=c>1?Math.min(V,X/c*.3):0;const Y=Math.max(1,X-J*(c-1));const Z=t=>Y*G[t]/Q;const tt=(()=>{const t=[];let s=$;for(let i=0;i<c;i++){t.push(s);s+=Z(i)+(i<c-1?J:0)}return t})();const st=t=>tt[t]??$;const it=t=>st(t)+Z(t);const et=new Map;const nt=new Set;for(const s of t.data)if(s.parent!=null&&s.parent>=0)nt.add(s.parent);const ot=(s,i)=>{const e=nt.has(i)?it(s):F;const n=t.data[i]?.radius;if(n==null)return e;const o=st(s);return o+(e-o)*Math.max(.15,Math.min(1,n))};const at=x>=0?1:-1;const rt=n.length?Math.min(t.paddingAngleDeg*N*n.length,Math.abs(x)*.9):0;const ht=n.length?rt/n.length:0;const ct=x-at*rt;const lt=[];const dt=[];const ft=[];const ut=[];let pt=b;const mt=t.sliceStroke??s.surface;const yt=n.length>1?t.sliceStrokeWidth??1:0;const gt=(()=>{if($>0||yt<=0||n.length<2)return 0;const s=yt/2;const i=n.reduce(((t,s)=>t+Math.max(0,s.d.value)),0)||1;const e=Math.abs(-(t.endAngleDeg-t.startAngleDeg)*N);let o=0;for(const t of n){const n=Math.max(0,t.d.value)/i*e;if(n>.001)o=Math.max(o,s/Math.sin(Math.min(n,Math.PI)/2))}return Math.min(o,F*.04,4)})();const bt=[];const xt=(t,s,i,e,n,o)=>{const a=T*Mt;const r=j*Mt;const h=i+r+a/2;const c=(h>0?a/2/h:0)*vt;bt.push({cx:t,cy:s,innerR:i+r,outerR:i+r+a,startAngle:e+c,endAngle:n-c,color:o,dataIndex:-1,pill:true})};const vt=at;const Mt=Math.max(0,Math.min(1,t.highlightT??1));const _t=t.highlight!=="none"&&t.highlightIndex!=null&&t.highlightIndex>=0;const kt=[];{let t=0;for(const{d:s}of n){const i=r>0?s.value/r:0;kt.push(t+i/2);t+=i}}const At=n.findIndex((s=>s.i===t.highlightIndex));const wt=_t?t.data[t.highlightIndex??-1]?.level??0:Infinity;const Ct=t=>{if(At<0)return Mt;const s=Math.abs(kt[t]-kt[At]);const i=Math.min(s,1-s)*2;const e=i*O;return Math.max(0,Math.min(1,(Mt-e)/(1-e||1)))};const zt=new Map;n.forEach((({d:i,i:e},n)=>{const a=Ct(n);const h=r>0?i.value/r:0;const l=ct*h;const f=pt+at*ht/2;const u=f+l;pt=u+at*ht/2;const p=(f+u)/2;const m=_t&&(t.highlightIndex===e||t.highlight==="series");const y=_t&&R(t.data,e,t.highlightIndex??-1);const g=(i.selectT??(i.selected?1:0))*L;const b=A+Math.cos(p)*g;const x=w+Math.sin(p)*g;zt.set(e,{x:b-A,y:x-w});const v=_t&&!m&&!y&&a>0?o(i.color,s.surface,.62*a):i.color;if(m&&Mt>0)xt(b,x,ot(0,e),f,u,i.color);lt.push({cx:b,cy:x,innerR:Math.max(st(0),gt),outerR:ot(0,e),startAngle:f,endAngle:u,color:v,dataIndex:e,cornerRadius:t.cornerRadius,gap:yt,gapColor:mt,gradient:t.gradient?P(i.color,s):undefined});et.set(e,{a0:f,a1:u});const M=!!d||c>1;if(t.showLabels&&Math.abs(l)>(M?E:H)){if(M){const n=st(0);const o=ot(0,e);const a=n>0?(n+o)/2:o*.62;dt.push({x:b+Math.cos(p)*a,y:x+Math.sin(p)*a,text:I(i,t,c>1?"name":"value"),color:W(v),fontSize:s.labelSize,align:"center",baseline:"middle",key:`pl-${e}`})}else{ut.push({key:`pl-${e}`,text:I(i,t,"both"),x1:b+Math.cos(p)*ot(0,e),y1:x+Math.sin(p)*ot(0,e),x:b+Math.cos(p)*(F+12),y:x+Math.sin(p)*(F+12),right:Math.cos(p)>=0})}}}));for(let i=1;i<c;i++){const e=t.data.map(((t,s)=>({d:t,i:s}))).filter((t=>(t.d.level??0)===i&&!t.d.hidden));const n=new Map;for(const t of e){const s=t.d.parent??-1;if(!n.has(s))n.set(s,[]);n.get(s).push(t)}for(const[e,a]of n){const n=et.get(e);if(!n)continue;const r=a.reduce(((t,s)=>t+Math.max(0,s.d.value)),0);if(r<=0)continue;const h=n.a1-n.a0;let l=n.a0;for(const{d:n,i:d}of a){const a=l;const f=a+h*(Math.max(0,n.value)/r);l=f;et.set(d,{a0:a,a1:f});const u=i>wt?B*Mt:0;const p=st(i)+u;const m=ot(i,d)+u;const y=At<0||t.highlightIndex===d||R(t.data,d,t.highlightIndex??-1);const g=(n.selectT??(n.selected?1:0))*L;const b=(a+f)/2;const x=zt.get(e)??{x:0,y:0};const v=x.x+Math.cos(b)*g;const M=x.y+Math.sin(b)*g;zt.set(d,{x:v,y:M});lt.push({cx:A+v,cy:w+M,innerR:p,outerR:m,startAngle:a,endAngle:f,color:_t&&!y&&Mt>0?o(n.color,s.surface,.62*Mt):n.color,dataIndex:d,cornerRadius:t.cornerRadius,gap:yt,gapColor:mt,gradient:t.gradient?P(n.color,s):undefined});if(_t&&t.highlightIndex===d&&Mt>0){xt(A+v,w+M,m,a,f,n.color)}const _=(a+f)/2;if(t.showLabels&&Math.abs(f-a)>H&&i===c-1){ut.push({key:`pl-${d}`,text:I(n,t,"both"),x1:A+v+Math.cos(_)*m,y1:w+M+Math.sin(_)*m,x:A+v+Math.cos(_)*(m+12),y:w+M+Math.sin(_)*(m+12),right:Math.cos(_)>=0})}}}}if(ut.length){const t=s.labelSize*1.45;for(const s of[true,false]){const i=ut.filter((t=>t.right===s)).sort(((t,s)=>t.y-s.y));if(!i.length)continue;for(let s=1;s<i.length;s++){if(i[s].y-i[s-1].y<t)i[s].y=i[s-1].y+t}const n=i[i.length-1].y-(e-t/2);if(n>0)for(const t of i)t.y-=n;const o=t/2-i[0].y;if(o>0)for(const t of i)t.y+=o}for(const t of ut){const e=t.right?i-6-t.x:t.x-6;const n=Math.max(3,Math.floor(e/(s.labelSize*D)));const o=t.text.length>n?`${t.text.slice(0,n-1)}…`:t.text;ft.push({x1:t.x1,y1:t.y1,x2:t.x,y2:t.y,color:s.gridLineColor,width:1});dt.push({x:t.x+(t.right?3:-3),y:t.y,text:o,color:s.textColorMuted,fontSize:s.labelSize,align:t.right?"start":"end",baseline:"middle",key:t.key})}}lt.push(...bt);if(t.title){const e=a(t.titleAlign,12,i-24);dt.push({x:e.x,y:6,text:t.title,color:s.textColor,fontSize:s.titleSize,fontWeight:600,align:e.align,baseline:"top",key:"title"});if(t.subtitle){dt.push({x:e.x,y:6+s.titleSize+4,text:t.subtitle,color:s.textColorMuted,fontSize:s.labelSize,align:e.align,baseline:"top",key:"subtitle"})}}const Ft=d?t.data.map(((t,s)=>({label:t.label,color:t.color,seriesIndex:s,hidden:!!t.hidden,x:0,y:0}))):[];return{width:i,height:e,plot:g,background:s.background==="transparent"?undefined:s.background,gridlines:ft,axisLines:[],areas:[],bars:[],slices:lt,lines:[],markers:[],texts:dt,legend:Ft,legendPosition:d??undefined,pieCenter:{x:A,y:w},...(()=>{const t=M?S(b,x,0):{x0:-1,x1:1,y0:-1,y1:1};const s=$/Math.SQRT2;return{pieHoleSize:$>0?(t.x1-t.x0)*s:0,pieHoleHeight:$>0?(t.y1-t.y0)*s:0,pieCenterSlot:{x:A+(t.x0+t.x1)/2*s,y:w+(t.y0+t.y1)/2*s}}})(),xPositions:[],xValues:[],xLabels:[],hoverPoints:[]}}const Q=260;const X=520;const J=450;const Y=.16;const Z=300;const tt=.8;class st{constructor(t){this.container=t;this.ctx=null;this.spec=null;this.theme=null;this.scene=null;this.cb={};this.hoverRaf=0;this.hoverIndex=-1;this.hasRendered=false;this.introRaf=0;this.pendingDrill=null;this.drillRun=null;this.ripple=null;this.rippleRaf=0;this.dpr=1;this.selectRaf=0;this.lastW=0;this.lastH=0;this.dprWatch=c((()=>this.render()));this.hoverT=0;this.hoverTweenRaf=0;this.handlePointerMove=t=>{if(!this.scene)return;const s=this.canvas.getBoundingClientRect();const i=t.clientX-s.left;const e=t.clientY-s.top;if(this.hoverRaf)cancelAnimationFrame(this.hoverRaf);this.hoverRaf=requestAnimationFrame((()=>{this.hoverRaf=0;const t=this.sliceAt(i,e);const s=t?t.dataIndex:-1;this.canvas.style.cursor=t?"pointer":"";if(s!==this.hoverIndex){this.hoverIndex=s;this.tweenHover();this.cb.onHover?.(s)}this.renderTooltip(s,i,e)}))};this.handlePointerLeave=()=>{if(this.hoverRaf){cancelAnimationFrame(this.hoverRaf);this.hoverRaf=0}this.hoverLayer.textContent="";if(this.hoverIndex!==-1){this.hoverIndex=-1;this.canvas.style.cursor="";this.tweenHover();this.cb.onHover?.(-1)}};this.handlePointerDown=t=>{const s=this.canvas.getBoundingClientRect();const i=t.clientX-s.left;const e=t.clientY-s.top;const n=this.sliceAt(i,e);if(n)this.startRipple(i,e,n)};this.handleClick=t=>{const s=this.canvas.getBoundingClientRect();const i=this.sliceAt(t.clientX-s.left,t.clientY-s.top);if(!i)return;this.cb.onPointClick?.(0,i.dataIndex,t);this.toggleSelected(i.dataIndex)};this.onLegendToggle=t=>{if(this.spec){const s=this.spec.data[t.seriesIndex];if(s){s.hidden=!s.hidden;this.hasRendered=false;this.render();this.cb.onLegendClick?.({...t,hidden:!!s.hidden});return}}this.cb.onLegendClick?.(t)};if(getComputedStyle(t).position==="static")t.style.position="relative";this.canvas=document.createElement("canvas");this.canvas.style.cssText="position:absolute;inset:0;width:100%;height:100%;display:block";this.canvas.setAttribute("part","plot-canvas");this.overlay=document.createElement("div");this.overlay.style.cssText="position:absolute;inset:0;pointer-events:none;overflow:hidden";this.legendLayer=document.createElement("div");this.legendLayer.style.cssText="position:absolute;inset:0;pointer-events:none;overflow:visible";this.hoverLayer=document.createElement("div");this.hoverLayer.style.cssText="position:absolute;inset:0;pointer-events:none;overflow:hidden";t.append(this.canvas,this.overlay,this.legendLayer,this.hoverLayer);this.ctx=this.canvas.getContext("2d");this.canvas.addEventListener("pointermove",this.handlePointerMove);this.canvas.addEventListener("pointerleave",this.handlePointerLeave);this.canvas.addEventListener("click",this.handleClick);this.canvas.addEventListener("pointerdown",this.handlePointerDown)}getScene(){return this.scene}getHoleBox(){return{width:this.scene?.pieHoleSize??0,height:this.scene?.pieHoleHeight??0}}getCenter(){if(!this.scene)return null;const t=this.scene.pieCenterSlot;if(t)return{x:t.x,y:t.y};return{x:this.scene.plot.x+this.scene.plot.width/2,y:this.scene.plot.y+this.scene.plot.height/2}}setTooltip(t){this.tooltipRender=t.render}setSpec(t,s,i={}){const e=this.spec?.data;const n=!e||e.length!==t.data.length||e.some(((s,i)=>s.label!==t.data[i]?.label||s.value!==t.data[i]?.value));this.spec=t;this.theme=s;this.cb=i;if(n&&this.hoverIndex!==-1){this.hoverIndex=-1;this.spec.highlightIndex=-1;l(this.hoverLayer)}this.render()}resize(){const t=this.container.getBoundingClientRect();if(Math.round(t.width)===this.lastW&&Math.round(t.height)===this.lastH)return;this.render()}toDataURL(t="image/png"){return this.canvas.toDataURL(t)}dispose(){if(this.hoverRaf)cancelAnimationFrame(this.hoverRaf);this.stopIntro();cancelAnimationFrame(this.hoverTweenRaf);cancelAnimationFrame(this.rippleRaf);cancelAnimationFrame(this.selectRaf);cancelAnimationFrame(this.selectRaf);this.canvas.removeEventListener("pointermove",this.handlePointerMove);this.canvas.removeEventListener("pointerleave",this.handlePointerLeave);this.canvas.removeEventListener("click",this.handleClick);this.canvas.removeEventListener("pointerdown",this.handlePointerDown);this.dprWatch.dispose();this.canvas.remove();this.overlay.remove();this.hoverLayer.remove();this.spec=null;this.scene=null;this.drillRun=null}render(){if(!this.spec||!this.theme)return;this.dprWatch.update();const t=this.container.getBoundingClientRect();const s=Math.round(t.width);const i=Math.round(t.height);if(s<2||i<2)return;this.lastW=s;this.lastH=i;const e=Math.min(window.devicePixelRatio||1,4);this.dpr=e;this.canvas.width=s*e;this.canvas.height=i*e;this.spec.highlightIndex=this.hoverIndex;this.spec.highlightT=this.hoverT;this.layoutAndOverlay(s,i);const n=this.overlay.querySelector('[part="legend"]');if(n&&this.spec.legend&&this.spec.legend!=="none"){const t=this.spec.legend==="left"||this.spec.legend==="right";const e=t?n.offsetWidth:n.offsetHeight;if(e>0&&Math.abs((this.spec.legendExtent??-1)-e)>2){this.spec.legendExtent=e;this.layoutAndOverlay(s,i)}}if(!this.scene)return;const{variant:o,duration:a}=f(this.spec);const r=this.pendingDrill;this.pendingDrill=null;if(r?.leaving&&o!=="none"&&!d()){this.hasRendered=true;this.playDrill(e,r.index,r.up,r.leaving);return}if(this.drillRun){this.hasRendered=true;this.clearIntroOpacity();this.drillFrame(e);return}const h=!this.hasRendered&&o!=="none"&&!d();const c=this.scene.slices.length>0;if(h){this.hasRendered=c;this.playIntro(e,o,a);return}this.hasRendered=this.hasRendered||c;this.stopIntro();this.drawGeometry(this.scene,e)}clearIntroOpacity(){this.canvas.style.opacity="";for(const t of Array.from(this.overlay.querySelectorAll('[data-key^="pl-"]'))){t.style.transition="";t.style.opacity=""}}stopIntro(){cancelAnimationFrame(this.introRaf);this.introRaf=0;this.clearIntroOpacity()}drill(t,s="down"){this.pendingDrill=this.scene?{index:t,up:s==="up",leaving:this.scene}:null}replay(){this.hasRendered=false;this.render()}layoutAndOverlay(t,s){if(!this.spec||!this.theme)return;this.scene=G(this.spec,this.theme,t,s);u(this.overlay,this.scene,this.theme.fontFamily,{onLegendClick:this.onLegendToggle},false,this.legendLayer)}drawGeometry(t,s){if(this.ctx){this.ctx.setTransform(s,0,0,s,0,0);p(this.ctx,t)}}paceLabels(t){for(const s of Array.from(this.overlay.querySelectorAll('[data-key^="pl-"]'))){s.style.transition="opacity 180ms ease";s.style.opacity=t>=tt?"":"0"}}playIntro(t,s,i){const e=this.scene;if(!e)return;this.stopIntro();const n=t=>{this.canvas.style.opacity=t<1?String(t):""};n(m(s,e,0).alpha);this.paceLabels(0);let o=0;const a=r=>{if(!o)o=r;const h=(r-o)/i;if(h>=1){n(1);this.paceLabels(1);this.drawGeometry(e,t);return}this.paceLabels(h);const{scene:c,alpha:l}=m(s,e,h);n(l);this.drawGeometry(c,t);this.introRaf=requestAnimationFrame(a)};this.introRaf=requestAnimationFrame(a)}playDrill(t,s,i,e){if(!this.scene)return;this.stopIntro();this.drillRun={index:s,up:i,frozen:e,start:performance.now()};const n=()=>{if(!this.drillRun)return;if(this.drillFrame(t))return;this.introRaf=requestAnimationFrame(n)};n()}drillFrame(t){const s=this.drillRun;const i=this.scene;if(!s||!i)return true;const e=(performance.now()-s.start)/X;if(e>=1){this.drillRun=null;this.paceLabels(1);this.drawGeometry(i,t);return true}this.paceLabels(e);const n=t=>{const s=t.slices?.find((t=>t.dataIndex>=0))??t.slices?.[0];return s?{x:s.cx,y:s.cy}:null};const o=(t,s,i)=>!s&&!i?t:{...t,slices:(t.slices??[]).map((t=>({...t,cx:t.cx+s,cy:t.cy+i})))};const a=n(i);const r=n(s.frozen);const h=a&&r?o(s.frozen,a.x-r.x,a.y-r.y):s.frozen;const c=s.up?i:h;const l=s.up?h:i;const d=y(e);const f=g(c,l,s.index,s.up?1-d:d);if(!f)return true;if(!this.ctx)return false;this.ctx.setTransform(t,0,0,t,0,0);p(this.ctx,this.withRipple(f.base));this.ctx.globalAlpha=f.overAlpha;p(this.ctx,f.over,false);this.ctx.globalAlpha=1;return false}sliceAt(t,s){if(!this.scene)return null;for(const i of this.scene.slices){if(it(t,s,i,i.cx,i.cy))return i}return null}focusIndex(t){if(!this.scene)return;if(t<0){this.hoverLayer.textContent="";if(this.hoverIndex!==-1){this.hoverIndex=-1;this.tweenHover()}return}const s=this.scene.slices.find((s=>s.dataIndex===t));if(!s)return;if(this.hoverIndex!==t){this.hoverIndex=t;this.tweenHover()}const i=(s.startAngle+s.endAngle)/2;const e=(s.innerR+s.outerR)/2;this.renderTooltip(t,s.cx+Math.cos(i)*e,s.cy+Math.sin(i)*e)}tweenHover(){const t=this.hoverIndex>=0?1:0;if(d()){this.hoverT=t;this.render();return}cancelAnimationFrame(this.hoverTweenRaf);const s=this.hoverT;if(s===t){this.render();return}const i=performance.now();const e=n=>{const o=Math.min(1,(n-i)/Q);this.hoverT=s+(t-s)*M(o);this.render();if(o<1)this.hoverTweenRaf=requestAnimationFrame(e)};this.hoverTweenRaf=requestAnimationFrame(e)}activate(t){const s=this.scene?.slices.find((s=>!s.pill&&s.dataIndex===t));if(!s)return;const i=(s.startAngle+s.endAngle)/2;const e=(s.innerR+s.outerR)/2;this.startRipple(s.cx+Math.cos(i)*e,s.cy+Math.sin(i)*e,s);this.toggleSelected(t)}startRipple(t,s,i){if(d())return;const e=[i.startAngle,i.endAngle].flatMap((e=>[i.innerR,i.outerR].map((n=>Math.hypot(i.cx+Math.cos(e)*n-t,i.cy+Math.sin(e)*n-s)))));this.ripple={dataIndex:i.dataIndex,x:t,y:s,max:Math.max(...e,1),color:b(i.color),start:performance.now()};cancelAnimationFrame(this.rippleRaf);const n=()=>{if(!this.ripple)return;if((performance.now()-this.ripple.start)/J>=1){this.ripple=null;if(!this.drillRun&&this.scene)this.drawGeometry(this.scene,this.dpr);return}if(!this.drillRun&&this.scene)this.drawGeometry(this.withRipple(this.scene),this.dpr);this.rippleRaf=requestAnimationFrame(n)};this.rippleRaf=requestAnimationFrame(n)}withRipple(t){const s=this.ripple;if(!s)return t;const i=Math.min(1,(performance.now()-s.start)/J);return{...t,ripple:{dataIndex:s.dataIndex,x:s.x,y:s.y,radius:s.max*x(i),color:s.color,alpha:Y*(1-Math.max(0,(i-.35)/.65))}}}toggleSelected(t){const s=this.spec?.data;if(!s?.[t])return;const i=s.map((t=>t.selectT??(t.selected?1:0)));const e=!!s[t].selected;s.forEach(((s,i)=>{s.selected=i===t&&!e}));const n=s.map((t=>t.selected?1:0));if(i.every(((t,s)=>t===n[s])))return;if(d()){s.forEach(((t,s)=>t.selectT=n[s]));this.render();return}cancelAnimationFrame(this.selectRaf);const o=performance.now();const a=t=>{const e=Math.min(1,(t-o)/Z);const r=M(e);s.forEach(((t,s)=>{t.selectT=i[s]+(n[s]-i[s])*r}));this.render();if(e<1)this.selectRaf=requestAnimationFrame(a)};this.selectRaf=requestAnimationFrame(a)}renderTooltip(t,s,i){this.hoverLayer.textContent="";if(t<0||!this.spec||!this.theme||!this.scene)return;const e=this.spec.data[t];if(!e)return;const n=this.spec.data.reduce(((t,s)=>s.hidden||s.level!==e.level||s.parent!==e.parent?t:t+s.value),0);const o=n>0?e.value/n*100:0;const a=document.createElement("div");a.setAttribute("part","tooltip");a.style.cssText=["position:absolute","pointer-events:none","background:var(--md-sys-color-surface-container-high, #ECE6F0)","color:var(--md-sys-color-on-surface, #1C1B1F)","border-radius:8px","padding:8px 10px","box-shadow:0 2px 6px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.2)",`font:400 ${this.theme.labelSize}px ${this.theme.fontFamily}`,"white-space:nowrap","z-index:2"].join(";");if(this.tooltipRender){const o=n;const r=this.tooltipRender({dataIndex:t,axisValue:e.label,axisLabel:e.label,focusedSeriesIndex:t,missing:[],series:this.spec.data.map(((s,i)=>({seriesIndex:i,label:s.label,color:s.color,value:s.value,formattedValue:this.spec.valueFormatter(s.value),percent:o>0?s.value/o*100:0,focused:i===t,missing:false})))});if(r!=null){v(a,r);this.hoverLayer.appendChild(a);this.placeTooltip(a,s,i)}return}const r=document.createElement("div");r.style.cssText="display:flex;align-items:center;gap:8px;line-height:1.5";const h=document.createElement("span");h.style.cssText=`width:10px;height:10px;border-radius:3px;background:${e.color};flex:none`;const c=document.createElement("span");c.textContent=e.label;c.style.cssText="flex:1";const l=document.createElement("strong");l.textContent=`${this.spec.valueFormatter(e.value)} (${o.toFixed(1)}%)`;r.append(h,c,l);a.appendChild(r);this.hoverLayer.appendChild(a);this.placeTooltip(a,s,i)}placeTooltip(t,s,i){if(!this.scene)return;const e=t.offsetWidth||120;const n=t.offsetHeight||40;let o=s+14;if(o+e>this.scene.width-4)o=s-e-14;const a=Math.max(4,Math.min(i-n/2,this.scene.height-n-4));t.style.left=`${Math.max(4,o)}px`;t.style.top=`${a}px`}}function it(t,s,i,e,n){const o=t-e;const a=s-n;const r=Math.hypot(o,a);if(r<i.innerR||r>i.outerR)return false;const h=Math.min(i.startAngle,i.endAngle);const c=Math.max(i.startAngle,i.endAngle);const l=Math.PI*2;let d=(Math.atan2(a,o)-h)%l;if(d<0)d+=l;return d<=c-h}const et=()=>`:host{--_block-size:var(--md-pie-chart-block-size, auto);--_min-block-size:var(--md-pie-chart-min-block-size, max(140px, calc(200px + var(--md-sys-density-scale, 0) * 12px)));--_aspect-ratio:var(--md-pie-chart-aspect-ratio, 1 / 1);--_background:var(--md-pie-chart-background, var(--md-sys-color-surface-container-low, #F7F2FA));--_padding:var(--md-pie-chart-padding, max(8px, calc(16px + var(--md-sys-density-scale, 0) * 2px)));--_shape:var(--md-pie-chart-shape, max(8px, calc(16px + var(--md-sys-density-scale, 0) * 2px)));--_empty-color:var(--md-pie-chart-empty-color, var(--md-sys-color-on-surface-variant, #49454F));--_empty-background:var(--md-pie-chart-empty-background, var(--_background));--_empty-font:var(--md-pie-chart-empty-font, var(--md-sys-typescale-body-medium-font-family, Roboto, sans-serif));--_empty-font-size:var(--md-pie-chart-empty-font-size, var(--md-sys-typescale-body-medium-font-size, 14px));--_empty-icon-size:var(--md-pie-chart-empty-icon-size, 40px);--_center-color:var(--md-pie-chart-center-color, var(--md-sys-color-on-surface, #1C1B1F));display:block;position:relative;inline-size:100%;block-size:var(--_block-size);min-block-size:var(--_min-block-size);background:var(--_background);padding:var(--_padding);border-radius:var(--_shape);box-sizing:border-box;aspect-ratio:var(--_aspect-ratio)}.md-pie-chart__header,.md-pie-chart__footer{display:contents}.md-pie-chart__header>slot[name='header']::slotted(*),.md-pie-chart__footer>slot[name='footer']::slotted(*){display:block;margin-block:8px}.md-pie-chart__canvas{position:absolute;inset:var(--_padding);min-block-size:0;min-inline-size:0}.md-pie-chart__center{position:absolute;top:var(--_pie-center-y, 50%);left:var(--_pie-center-x, 50%);transform:translate(-50%, -50%);pointer-events:none;color:var(--_center-color);text-align:center;font-family:var(--md-sys-typescale-headline-small-font-family, Roboto, system-ui, sans-serif);font-variant-numeric:tabular-nums;display:flex;align-items:center;justify-content:center;max-width:var(--md-pie-center-max-width, var(--_pie-hole, none));max-height:var(--md-pie-center-max-height, var(--_pie-hole-h, none))}.md-pie-chart__center>slot[name='center']::slotted(*){pointer-events:auto}.md-pie-chart__empty{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;box-sizing:border-box;padding:24px;background:var(--_empty-background);border-radius:var(--_shape);color:var(--_empty-color);font-family:var(--_empty-font);font-size:var(--_empty-font-size);line-height:var(--md-sys-typescale-body-medium-line-height, 20px);pointer-events:none;text-align:center}.md-pie-chart__empty ::slotted(.material-symbols-outlined),.md-pie-chart__empty ::slotted(.material-symbols-rounded),.md-pie-chart__empty ::slotted(.material-symbols-sharp),.md-pie-chart__empty ::slotted(.material-icons){font-size:var(--_empty-icon-size) !important;line-height:1;opacity:0.55}.md-pie-chart__a11y-table{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}@media (forced-colors: active){:host{forced-color-adjust:auto}}.md-pie-chart__loading{position:absolute;inset:0;z-index:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;box-sizing:border-box;padding:24px;background:var(--_empty-background, var(--_background));border-radius:var(--_shape);color:var(--_empty-color);text-align:center}.md-pie-chart__spinner{inline-size:40px;block-size:40px}.md-pie-chart__canvas:focus-visible{outline:3px solid var(--md-sys-color-secondary, #625B71);outline-offset:-3px;border-radius:4px}.md-pie-chart__live{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}[part='legend'] button:focus-visible{outline:3px solid var(--md-sys-color-secondary, #625B71);outline-offset:2px;border-radius:6px}:host([density='-1']){--md-sys-density-scale:-1}:host([density='-2']){--md-sys-density-scale:-2}:host([density='-3']){--md-sys-density-scale:-3}:host([density='-4']){--md-sys-density-scale:-4}`;function nt(t,s){if(t.includes(s))return t;for(const i of t){if(i.children?.length){const t=nt(i.children,s);if(t)return t}}return null}const ot=class{constructor(i){t(this,i);this.mdSliceClick=s(this,"mdSliceClick",7);this.mdLegendClick=s(this,"mdLegendClick",7);this.mdReady=s(this,"mdReady",7);this.label="";this.titleAlign="start";this.data=[];this.innerRadius="0%";this.outerRadius="75%";this.startAngle=90;this.endAngle=-270;this.paddingAngle=0;this.cornerRadius=4;this.showLabels=true;this.gradient=false;this.highlight="slice";this.legend="right";this.tooltip="item";this.locale="";this.summary="";this.labelEmpty="No data to display";this.loading=false;this.loadingLabel="Loading chart…";this.labelPlot="Chart data. Use the arrow keys to move between slices, Home and End for the first and last, Escape to leave.";this.labelPoint="%label%: %value% (%percent%)";this.noAnimation=false;this.animation="expressive";this.density=0;this.mounted=false;this.kbIndex=-1;this.announcement="";this.engine=null;this.ro=null;this.legendHidden=new Map;this.bindChartHost=t=>{this.chartHost=t};this.bindA11yTableHost=t=>{this.a11yTableHost=t};this.onPlotKeyDown=t=>{const s=this.flatDatums().length-1;if(s<0)return;const i=typeof getComputedStyle==="function"&&getComputedStyle(this.el).direction==="rtl";const e=i?"ArrowLeft":"ArrowRight";const n=i?"ArrowRight":"ArrowLeft";let o=this.kbIndex;switch(t.key){case e:case"ArrowDown":o=this.kbIndex<0?0:Math.min(s,this.kbIndex+1);break;case n:case"ArrowUp":o=this.kbIndex<0?s:Math.max(0,this.kbIndex-1);break;case"Home":o=0;break;case"End":o=s;break;case"Escape":if(this.kbIndex<0)return;o=-1;break;case"Enter":case" ":if(this.kbIndex<0)return;t.preventDefault();this.emitSliceClick(this.kbIndex,t);this.engine?.activate(this.kbIndex);return;default:return}t.preventDefault();this.moveKeyboardCursor(o)};this.onPlotBlur=()=>{if(this.kbIndex>=0)this.moveKeyboardCursor(-1)}}datumKeys(){const t=new Map;return this.flatDatums().map(((s,i)=>{const e=s.id!=null?`id:${s.id}`:s.label!=null?`label:${s.label}`:`pos:${i}`;const n=t.get(e)??0;t.set(e,n+1);return n===0?e:`${e}#${n}`}))}componentDidLoad(){this.initChart();if(typeof window!=="undefined"&&window.matchMedia){this.themeMql=window.matchMedia("(prefers-color-scheme: dark)");this.themeListener=()=>this.applyEngine();this.themeMql.addEventListener?.("change",this.themeListener)}}disconnectedCallback(){this.ro?.disconnect();this.ro=null;this.engine?.dispose();this.engine=null;if(this.themeMql&&this.themeListener){this.themeMql.removeEventListener?.("change",this.themeListener);this.themeListener=undefined;this.themeMql=undefined}}onAnyPropChange(){this.applyEngine();this.rebuildA11yTable()}async resize(){this.engine?.resize()}async replay(){this.engine?.replay()}async drill(t,s="down"){this.engine?.drill(t,s)}async toDataURL(){return this.engine?.toDataURL("image/png")??""}async getInstance(){return this.engine}initChart(){this.makeEngine();this.applyEngine();this.rebuildA11yTable();this.mounted=true;this.mdReady.emit()}makeEngine(){if(!this.chartHost)return;this.ro?.disconnect();this.ro=null;this.engine?.dispose();try{this.engine=new st(this.chartHost)}catch{this.engine=null}if(this.engine&&typeof ResizeObserver!=="undefined"){this.ro=new ResizeObserver((()=>{this.engine?.resize();this.updateCenterVars()}));this.ro.observe(this.chartHost)}}buildEngineTheme(t){return{background:t.background,textColor:t.textColor,textColorMuted:t.textColorMuted,axisLineColor:t.axisLineColor,gridLineColor:t.gridColor,surface:t.surface,fontFamily:t.fontFamily,labelSize:t.labelSize,titleSize:t.titleSize}}flatten(t,s){const i=this.datumKeys();const e=[];const n=this.monochrome!=null?_(this.el,this.monochrome||"primary",t.palette[0]):null;const a=(r,h,c,l)=>{r.forEach(((d,f)=>{const u=l!=null?o(l,t.surface,.18+f/Math.max(1,r.length)*.42):n!=null?o(n,t.surface,f/Math.max(1,r.length)*.7):s[f]??C(t.palette,f);const p=_(this.el,d.color,u);const m=e.length;e.push({label:d.label,value:d.value,color:p,selected:d.selected,radius:d.radius,hidden:d.hidden??this.legendHidden.get(i[m])??false,level:h,parent:c});if(d.children?.length)a(d.children,h+1,m,p)}))};a(this.data??[],0,undefined);return e}flatDatums(){const t=[];const s=i=>{for(const e of i){t.push(e);if(e.children?.length)s(e.children)}};s(this.data??[]);return t}buildSpec(t){const s=typeof getComputedStyle==="function"&&getComputedStyle(this.el).direction==="rtl";const i=k(t.palette.slice(0,3),this.data.length,{light:t.surface,dark:t.textColor});return{data:this.flatten(t,i),title:this.label||undefined,subtitle:this.subtitle||undefined,titleAlign:this.titleAlign,innerRadius:this.innerRadius,outerRadius:this.outerRadius,startAngleDeg:this.startAngle,endAngleDeg:this.endAngle,paddingAngleDeg:this.paddingAngle,cornerRadius:this.cornerRadius,showLabels:this.showLabels,labelMode:this.labelMode,gradient:this.gradient,highlight:this.highlight,legend:s?A(this.legend):this.legend,ringWidths:this.ringWidths,valueFormatter:t=>this.formatValue(t),animation:this.noAnimation?"none":this.animation,animationDuration:this.animationDuration}}applyEngine(){if(!this.engine)return;const t=w(this.el);this.engine.setSpec(this.buildSpec(t),this.buildEngineTheme(t),{onLegendClick:t=>{const s=this.datumKeys()[t.seriesIndex];if(s!=null)this.legendHidden.set(s,!!t.hidden);this.mdLegendClick.emit({dataIndex:t.seriesIndex,selected:!t.hidden})},onPointClick:(t,s,i)=>this.emitSliceClick(s,i)});this.engine.setTooltip({render:this.tooltipRenderer});this.updateCenterVars()}updateCenterVars(){const t=this.engine?.getCenter();if(!t||!this.chartHost)return;const s=this.el.getBoundingClientRect();const i=this.chartHost.getBoundingClientRect();const e=i.left-s.left;const n=i.top-s.top;this.el.style.setProperty("--_pie-center-x",`${t.x+e}px`);this.el.style.setProperty("--_pie-center-y",`${t.y+n}px`);const o=this.engine?.getHoleBox();this.el.style.setProperty("--_pie-hole",o&&o.width>0?`${o.width}px`:"none");this.el.style.setProperty("--_pie-hole-h",o&&o.height>0?`${o.height}px`:"none")}rebuildA11yTable(){if(!this.a11yTableHost)return;const t=this.data.reduce(((t,s)=>t+s.value),0);const s=this.tableLabels??{};this.a11yTableHost.innerHTML=z({title:this.label,xAxisLabel:s.category??"Category",xAxisData:this.data.map((t=>t.label)),locale:this.locale,series:[{label:s.value??"Value",data:this.data.map((t=>t.value))},{label:s.share??"Share",data:this.data.map((s=>t>0?s.value/t*100:0))}],valueFormatter:t=>t==null?"—":this.formatValue(t)})}formatValue(t){return this.valueFormatter?this.valueFormatter(t):t.toLocaleString(this.locale||undefined)}emitSliceClick(t,s){const i=this.flatDatums()[t];if(!i)return;this.mdSliceClick.emit({seriesIndex:0,seriesId:i.id,dataIndex:t,value:i.value,nativeEvent:s,series:i})}moveKeyboardCursor(t){this.kbIndex=t;this.engine?.focusIndex(t);if(t<0){this.announcement="";return}const s=this.flatDatums();const i=s[t];if(!i)return;const e=this.data?.some((t=>t.children?.length))?nt(this.data??[],i)??s:s;const n=e.reduce(((t,s)=>t+s.value),0);const o=n>0?i.value/n*100:0;this.announcement=this.labelPoint.replace("%label%",i.label).replace("%value%",this.formatValue(i.value)).replace("%percent%",`${o.toLocaleString(this.locale||undefined,{maximumFractionDigits:1})}%`)}render(){const t=this.data.length===0&&!this.loading;const s=this.summary||F({title:this.label,chartType:"pie",seriesCount:this.data.length,locale:this.locale});return i(e,{key:"646c418ad237c02a37b63a44e726f63038d764e3",class:{"md-pie-chart":true,"md-pie-chart--empty":t,"md-pie-chart--mounted":this.mounted,"md-pie-chart--donut":this.innerRadius!=="0%"&&this.innerRadius!==0},role:"figure","aria-label":s,"aria-busy":this.loading?"true":null,style:this.heightProp?{blockSize:this.heightProp}:undefined},i("header",{key:"91000eccea90b4f6f497eeb4fd24460fddb50fdf",class:"md-pie-chart__header",part:"header"},i("slot",{key:"4d95064f71c77b468df419b12ac818879547fdf8",name:"header"})),i("div",{key:"4700981a7e3035ae20a298de3b23ad0641583c00",class:"md-pie-chart__canvas",part:"canvas",ref:t=>this.bindChartHost(t),tabindex:t?undefined:"0",role:t?undefined:"application","aria-label":t?undefined:this.labelPlot,onKeyDown:this.onPlotKeyDown,onBlur:this.onPlotBlur}),i("div",{key:"4473fc6e379d32f4b097843f671e9d441d1d9407",class:"md-pie-chart__center",part:"center","aria-hidden":"true"},i("slot",{key:"b2fe4b06cf819bda51e7a33ac0ed8a361c66ce9b",name:"center"})),t&&i("div",{key:"07a20ca893b2ec888a608bdd6bd076753d6e28c5",class:"md-pie-chart__empty",part:"empty"},i("slot",{key:"cd3680b45b20580207a1cd9f7d0a92a9bb43737f",name:"empty"},this.labelEmpty)),this.loading&&i("div",{key:"5134c562360df1c4fc3048d9ceef642f08691fca",class:"md-pie-chart__loading",part:"loading",role:"status"},i("slot",{key:"b88653bc760d8b875ee939abae33e15f7207aa22",name:"loader"},i("slot",{key:"53e75485d2faaa84352f4f41cbd83756dbb02ca1",name:"loading"},i("md-progress-indicator",{key:"3bba3041bcb3f638e3fe8a0b9cab9acd644cc25a",class:"md-pie-chart__spinner",variant:"circular",indeterminate:true,label:this.loadingLabel}),i("span",{key:"64301c1275be0b73d9e3700075604e865e926f14",class:"md-pie-chart__loading-text"},this.loadingLabel)))),i("footer",{key:"4b0dd15de96b8ae57708a831ab39a648c24790f7",class:"md-pie-chart__footer",part:"footer"},i("slot",{key:"2d044f72638d5e7807729f875eedc56e6599e7aa",name:"footer"})),i("div",{key:"99f0f11c5878aa648eedd6c3d6f88ad8230f4ea5",class:"md-pie-chart__a11y-table",ref:t=>this.bindA11yTableHost(t)}),i("div",{key:"0911b766e69fea66d8f99dbd41af32a1869c7f35",class:"md-pie-chart__live",role:"status","aria-live":"polite","aria-atomic":"true"},this.announcement))}get el(){return n(this)}static get watchers(){return{data:[{onAnyPropChange:0}],innerRadius:[{onAnyPropChange:0}],outerRadius:[{onAnyPropChange:0}],startAngle:[{onAnyPropChange:0}],endAngle:[{onAnyPropChange:0}],paddingAngle:[{onAnyPropChange:0}],cornerRadius:[{onAnyPropChange:0}],showLabels:[{onAnyPropChange:0}],labelMode:[{onAnyPropChange:0}],monochrome:[{onAnyPropChange:0}],gradient:[{onAnyPropChange:0}],highlight:[{onAnyPropChange:0}],legend:[{onAnyPropChange:0}],tooltip:[{onAnyPropChange:0}],label:[{onAnyPropChange:0}],titleAlign:[{onAnyPropChange:0}],animation:[{onAnyPropChange:0}],animationDuration:[{onAnyPropChange:0}],ringWidths:[{onAnyPropChange:0}],locale:[{onAnyPropChange:0}],subtitle:[{onAnyPropChange:0}],loading:[{onAnyPropChange:0}],valueFormatter:[{onAnyPropChange:0}]}}};ot.style=et();export{ot as md_pie_chart};
2
- //# sourceMappingURL=p-9ff2d5d1.entry.js.map
1
+ import{r as t,c as s,h as i,H as e,a as n}from"./p-DTaX19_O.js";import{N as o,B as a,O as r,P as h,w as c,f as l,g as d,h as f,s as u,l as p,n as m,Q as y,x as g,R as b,S as x,T as v,U as M,a as _,V as k,W as A,b as w,p as C}from"./p-DvOKnoqK.js";import{b as z,a as F}from"./p-C_ogF68H.js";function P(t,s){return{from:o(t,s.surface,.3),to:t}}function R(t,s,i){const e=t+s;const n=Math.min(t,e);const o=Math.max(t,e);const a=[];const r=[];for(const t of[n,o]){for(const s of[1,i]){a.push(Math.cos(t)*s);r.push(Math.sin(t)*s)}}const h=Math.PI/2;for(let t=Math.ceil(n/h);t*h<=o;t++){a.push(Math.cos(t*h));r.push(Math.sin(t*h))}return{x0:Math.min(...a),x1:Math.max(...a),y0:Math.min(...r),y1:Math.max(...r)}}function S(t,s,i){return $(t,s,i)||$(t,i,s)}function $(t,s,i){let e=i;let n=0;while(e>=0&&n++<32){if(e===s)return true;e=t[e]?.parent??-1}return false}function I(t,s,i){const e=s.labelMode??i;const n=s.valueFormatter(t.value);if(e==="name")return t.label;if(e==="both")return`${t.label} · ${n}`;return n}const L=12;const D=.52;const q=1.45;const E=.12;const H=.02;const T=7;const j=3;const B=T+j;const O=3;const V=.45;const K=Math.PI/180;function N(t,s){return t.length*s*.58}function U(t){const[s,i,e]=r(t);const n=.299*s+.587*i+.114*e;return n>.62?"rgba(0, 0, 0, 0.82)":"#ffffff"}function W(t,s){if(typeof t==="number")return Number.isFinite(t)&&t>=0?t:0;const i=t.trim();const e=parseFloat(i);if(!Number.isFinite(e)||e<0)return 0;return i.endsWith("%")?e/100*s:e}function G(t,s,i,e){const n=t.data.map(((t,s)=>({d:t,i:s}))).filter((t=>!t.d.hidden&&t.d.value>0&&(t.d.level??0)===0));const r=n.reduce(((t,s)=>t+s.d.value),0);const c=t.data.reduce(((t,s)=>Math.max(t,(s.level??0)+1)),1);const l=t.title?s.titleSize+12+(t.subtitle?s.labelSize+4:0):0;const d=t.legend&&t.legend!=="none"&&t.data.length>1?t.legend:null;const f=d?Math.max(0,...t.data.map((t=>N(t.label,s.labelSize)))):0;let u=8;let p=8;let m=8+l;let y=8;if(d){const e=d==="left"||d==="right";if(e){const s=t.legendExtent!=null?t.legendExtent+16:f+30;const e=Math.min(s,i*h);if(d==="left")u+=e;else p+=e}else{let e=t.legendExtent!=null?t.legendExtent+8:0;if(t.legendExtent==null){const n=Math.max(60,i*.86);let o=1;let a=0;for(const i of t.data){const t=N(i.label,s.labelSize)+28;if(a>0&&a+t>n){o++;a=t}else a+=t}e=o*(s.labelSize+8)+6}if(d.startsWith("bottom"))y+=e;else m+=e}}const g={x:u,y:m,width:Math.max(1,i-u-p),height:Math.max(1,e-m-y)};const b=-t.startAngleDeg*K;const x=-(t.endAngleDeg-t.startAngleDeg)*K;const v=(()=>{const s=W(t.innerRadius,100);const i=W(t.outerRadius,100);return i>0?Math.max(0,Math.min(.95,s/i)):0})();const M=Math.abs(x)<Math.PI*2-.02;const _=M?R(b,x,v):{x0:-1,x1:1,y0:-1,y1:1};const k=Math.max(1,Math.min(g.width/Math.max(.01,_.x1-_.x0),g.height/Math.max(.01,_.y1-_.y0)));const A=g.x+g.width/2-(_.x0+_.x1)/2*k;const w=g.y+g.height/2-(_.y0+_.y1)/2*k;const C=(()=>{if(!t.showLabels||d)return 6;const i=n.reduce(((s,i)=>Math.max(s,I(i.d,t,"both").length)),0);const e=W(t.outerRadius,k);const o=12+i*s.labelSize*D;const a=Math.max(.05,e/Math.max(1,k));return Math.max(6,Math.min(k*.45,(e+o-k)/a))})();const z=Math.max(8,k-C);const F=Math.max(1,Math.min(W(t.outerRadius,z),z));const $=Math.max(0,Math.min(W(t.innerRadius,z),F-2));const G=Array.from({length:c},((s,i)=>{const e=t.ringWidths?.[i];return Number.isFinite(e)&&e>0?e:i<c-1?q:1}));const Q=G.reduce(((t,s)=>t+s),0)||1;const X=F-$;const J=c>1?Math.min(O,X/c*.3):0;const Y=Math.max(1,X-J*(c-1));const Z=t=>Y*G[t]/Q;const tt=(()=>{const t=[];let s=$;for(let i=0;i<c;i++){t.push(s);s+=Z(i)+(i<c-1?J:0)}return t})();const st=t=>tt[t]??$;const it=t=>st(t)+Z(t);const et=new Map;const nt=new Set;for(const s of t.data)if(s.parent!=null&&s.parent>=0)nt.add(s.parent);const ot=(s,i)=>{const e=nt.has(i)?it(s):F;const n=t.data[i]?.radius;if(n==null)return e;const o=st(s);return o+(e-o)*Math.max(.15,Math.min(1,n))};const at=x>=0?1:-1;const rt=n.length?Math.min(t.paddingAngleDeg*K*n.length,Math.abs(x)*.9):0;const ht=n.length?rt/n.length:0;const ct=x-at*rt;const lt=[];const dt=[];const ft=[];const ut=[];let pt=b;const mt=t.sliceStroke??s.surface;const yt=n.length>1?t.sliceStrokeWidth??1:0;const gt=(()=>{if($>0||yt<=0||n.length<2)return 0;const s=yt/2;const i=n.reduce(((t,s)=>t+Math.max(0,s.d.value)),0)||1;const e=Math.abs(-(t.endAngleDeg-t.startAngleDeg)*K);let o=0;for(const t of n){const n=Math.max(0,t.d.value)/i*e;if(n>.001)o=Math.max(o,s/Math.sin(Math.min(n,Math.PI)/2))}return Math.min(o,F*.04,4)})();const bt=[];const xt=(t,s,i,e,n,o)=>{const a=T*Mt;const r=j*Mt;const h=i+r+a/2;const c=(h>0?a/2/h:0)*vt;bt.push({cx:t,cy:s,innerR:i+r,outerR:i+r+a,startAngle:e+c,endAngle:n-c,color:o,dataIndex:-1,pill:true})};const vt=at;const Mt=Math.max(0,Math.min(1,t.highlightT??1));const _t=t.highlight!=="none"&&t.highlightIndex!=null&&t.highlightIndex>=0;const kt=[];{let t=0;for(const{d:s}of n){const i=r>0?s.value/r:0;kt.push(t+i/2);t+=i}}const At=n.findIndex((s=>s.i===t.highlightIndex));const wt=_t?t.data[t.highlightIndex??-1]?.level??0:Infinity;const Ct=t=>{if(At<0)return Mt;const s=Math.abs(kt[t]-kt[At]);const i=Math.min(s,1-s)*2;const e=i*V;return Math.max(0,Math.min(1,(Mt-e)/(1-e||1)))};const zt=new Map;n.forEach((({d:i,i:e},n)=>{const a=Ct(n);const h=r>0?i.value/r:0;const l=ct*h;const f=pt+at*ht/2;const u=f+l;pt=u+at*ht/2;const p=(f+u)/2;const m=_t&&(t.highlightIndex===e||t.highlight==="series");const y=_t&&S(t.data,e,t.highlightIndex??-1);const g=(i.selectT??(i.selected?1:0))*L;const b=A+Math.cos(p)*g;const x=w+Math.sin(p)*g;zt.set(e,{x:b-A,y:x-w});const v=_t&&!m&&!y&&a>0?o(i.color,s.surface,.62*a):i.color;if(m&&Mt>0)xt(b,x,ot(0,e),f,u,i.color);lt.push({cx:b,cy:x,innerR:Math.max(st(0),gt),outerR:ot(0,e),startAngle:f,endAngle:u,color:v,dataIndex:e,cornerRadius:t.cornerRadius,gap:yt,gapColor:mt,gradient:t.gradient?P(i.color,s):undefined});et.set(e,{a0:f,a1:u});const M=!!d||c>1;if(t.showLabels&&Math.abs(l)>(M?E:H)){if(M){const n=st(0);const o=ot(0,e);const a=n>0?(n+o)/2:o*.62;dt.push({x:b+Math.cos(p)*a,y:x+Math.sin(p)*a,text:I(i,t,c>1?"name":"value"),color:U(v),fontSize:s.labelSize,align:"center",baseline:"middle",key:`pl-${e}`})}else{ut.push({key:`pl-${e}`,text:I(i,t,"both"),x1:b+Math.cos(p)*ot(0,e),y1:x+Math.sin(p)*ot(0,e),x:b+Math.cos(p)*(F+12),y:x+Math.sin(p)*(F+12),right:Math.cos(p)>=0})}}}));for(let i=1;i<c;i++){const e=t.data.map(((t,s)=>({d:t,i:s}))).filter((t=>(t.d.level??0)===i&&!t.d.hidden));const n=new Map;for(const t of e){const s=t.d.parent??-1;if(!n.has(s))n.set(s,[]);n.get(s).push(t)}for(const[e,a]of n){const n=et.get(e);if(!n)continue;const r=a.reduce(((t,s)=>t+Math.max(0,s.d.value)),0);if(r<=0)continue;const h=n.a1-n.a0;let l=n.a0;for(const{d:n,i:d}of a){const a=l;const f=a+h*(Math.max(0,n.value)/r);l=f;et.set(d,{a0:a,a1:f});const u=i>wt?B*Mt:0;const p=st(i)+u;const m=ot(i,d)+u;const y=At<0||t.highlightIndex===d||S(t.data,d,t.highlightIndex??-1);const g=(n.selectT??(n.selected?1:0))*L;const b=(a+f)/2;const x=zt.get(e)??{x:0,y:0};const v=x.x+Math.cos(b)*g;const M=x.y+Math.sin(b)*g;zt.set(d,{x:v,y:M});lt.push({cx:A+v,cy:w+M,innerR:p,outerR:m,startAngle:a,endAngle:f,color:_t&&!y&&Mt>0?o(n.color,s.surface,.62*Mt):n.color,dataIndex:d,cornerRadius:t.cornerRadius,gap:yt,gapColor:mt,gradient:t.gradient?P(n.color,s):undefined});if(_t&&t.highlightIndex===d&&Mt>0){xt(A+v,w+M,m,a,f,n.color)}const _=(a+f)/2;if(t.showLabels&&Math.abs(f-a)>H&&i===c-1){ut.push({key:`pl-${d}`,text:I(n,t,"both"),x1:A+v+Math.cos(_)*m,y1:w+M+Math.sin(_)*m,x:A+v+Math.cos(_)*(m+12),y:w+M+Math.sin(_)*(m+12),right:Math.cos(_)>=0})}}}}if(ut.length){const t=s.labelSize*1.45;for(const s of[true,false]){const i=ut.filter((t=>t.right===s)).sort(((t,s)=>t.y-s.y));if(!i.length)continue;for(let s=1;s<i.length;s++){if(i[s].y-i[s-1].y<t)i[s].y=i[s-1].y+t}const n=i[i.length-1].y-(e-t/2);if(n>0)for(const t of i)t.y-=n;const o=t/2-i[0].y;if(o>0)for(const t of i)t.y+=o}for(const t of ut){const e=t.right?i-6-t.x:t.x-6;const n=Math.max(3,Math.floor(e/(s.labelSize*D)));const o=t.text.length>n?`${t.text.slice(0,n-1)}…`:t.text;ft.push({x1:t.x1,y1:t.y1,x2:t.x,y2:t.y,color:s.gridLineColor,width:1});dt.push({x:t.x+(t.right?3:-3),y:t.y,text:o,color:s.textColorMuted,fontSize:s.labelSize,align:t.right?"start":"end",baseline:"middle",key:t.key})}}lt.push(...bt);if(t.title){const e=a(t.titleAlign,12,i-24);dt.push({x:e.x,y:6,text:t.title,color:s.textColor,fontSize:s.titleSize,fontWeight:600,align:e.align,baseline:"top",key:"title"});if(t.subtitle){dt.push({x:e.x,y:6+s.titleSize+4,text:t.subtitle,color:s.textColorMuted,fontSize:s.labelSize,align:e.align,baseline:"top",key:"subtitle"})}}const Ft=d?t.data.map(((t,s)=>({label:t.label,color:t.color,seriesIndex:s,hidden:!!t.hidden,x:0,y:0}))):[];return{width:i,height:e,plot:g,background:s.background==="transparent"?undefined:s.background,gridlines:ft,axisLines:[],areas:[],bars:[],slices:lt,lines:[],markers:[],texts:dt,legend:Ft,legendPosition:d??undefined,pieCenter:{x:A,y:w},...(()=>{const t=M?R(b,x,0):{x0:-1,x1:1,y0:-1,y1:1};const s=$/Math.SQRT2;return{pieHoleSize:$>0?(t.x1-t.x0)*s:0,pieHoleHeight:$>0?(t.y1-t.y0)*s:0,pieCenterSlot:{x:A+(t.x0+t.x1)/2*s,y:w+(t.y0+t.y1)/2*s}}})(),xPositions:[],xValues:[],xLabels:[],hoverPoints:[]}}const Q=260;const X=520;const J=450;const Y=.16;const Z=300;const tt=.8;class st{constructor(t){this.container=t;this.ctx=null;this.spec=null;this.theme=null;this.scene=null;this.cb={};this.hoverRaf=0;this.hoverIndex=-1;this.hasRendered=false;this.introRaf=0;this.pendingDrill=null;this.drillRun=null;this.ripple=null;this.rippleRaf=0;this.dpr=1;this.selectRaf=0;this.lastW=0;this.lastH=0;this.dprWatch=c((()=>this.render()));this.hoverT=0;this.hoverTweenRaf=0;this.handlePointerMove=t=>{if(!this.scene)return;const s=this.canvas.getBoundingClientRect();const i=t.clientX-s.left;const e=t.clientY-s.top;if(this.hoverRaf)cancelAnimationFrame(this.hoverRaf);this.hoverRaf=requestAnimationFrame((()=>{this.hoverRaf=0;const t=this.sliceAt(i,e);const s=t?t.dataIndex:-1;this.canvas.style.cursor=t?"pointer":"";if(s!==this.hoverIndex){this.hoverIndex=s;this.tweenHover();this.cb.onHover?.(s)}this.renderTooltip(s,i,e)}))};this.handlePointerLeave=()=>{if(this.hoverRaf){cancelAnimationFrame(this.hoverRaf);this.hoverRaf=0}this.hoverLayer.textContent="";if(this.hoverIndex!==-1){this.hoverIndex=-1;this.canvas.style.cursor="";this.tweenHover();this.cb.onHover?.(-1)}};this.handlePointerDown=t=>{const s=this.canvas.getBoundingClientRect();const i=t.clientX-s.left;const e=t.clientY-s.top;const n=this.sliceAt(i,e);if(n)this.startRipple(i,e,n)};this.handleClick=t=>{const s=this.canvas.getBoundingClientRect();const i=this.sliceAt(t.clientX-s.left,t.clientY-s.top);if(!i)return;this.cb.onPointClick?.(0,i.dataIndex,t);this.toggleSelected(i.dataIndex)};this.onLegendToggle=t=>{if(this.spec){const s=this.spec.data[t.seriesIndex];if(s){s.hidden=!s.hidden;this.hasRendered=false;this.render();this.cb.onLegendClick?.({...t,hidden:!!s.hidden});return}}this.cb.onLegendClick?.(t)};if(getComputedStyle(t).position==="static")t.style.position="relative";this.canvas=document.createElement("canvas");this.canvas.style.cssText="position:absolute;inset:0;width:100%;height:100%;display:block";this.canvas.setAttribute("part","plot-canvas");this.overlay=document.createElement("div");this.overlay.style.cssText="position:absolute;inset:0;pointer-events:none;overflow:hidden";this.legendLayer=document.createElement("div");this.legendLayer.style.cssText="position:absolute;inset:0;pointer-events:none;overflow:visible";this.hoverLayer=document.createElement("div");this.hoverLayer.style.cssText="position:absolute;inset:0;pointer-events:none;overflow:hidden";t.append(this.canvas,this.overlay,this.legendLayer,this.hoverLayer);this.ctx=this.canvas.getContext("2d");this.canvas.addEventListener("pointermove",this.handlePointerMove);this.canvas.addEventListener("pointerleave",this.handlePointerLeave);this.canvas.addEventListener("click",this.handleClick);this.canvas.addEventListener("pointerdown",this.handlePointerDown)}getScene(){return this.scene}getHoleBox(){return{width:this.scene?.pieHoleSize??0,height:this.scene?.pieHoleHeight??0}}getCenter(){if(!this.scene)return null;const t=this.scene.pieCenterSlot;if(t)return{x:t.x,y:t.y};return{x:this.scene.plot.x+this.scene.plot.width/2,y:this.scene.plot.y+this.scene.plot.height/2}}setTooltip(t){this.tooltipRender=t.render}setSpec(t,s,i={}){const e=this.spec?.data;const n=!e||e.length!==t.data.length||e.some(((s,i)=>s.label!==t.data[i]?.label||s.value!==t.data[i]?.value));this.spec=t;this.theme=s;this.cb=i;if(n&&this.hoverIndex!==-1){this.hoverIndex=-1;this.spec.highlightIndex=-1;l(this.hoverLayer)}this.render()}resize(){const t=this.container.getBoundingClientRect();if(Math.round(t.width)===this.lastW&&Math.round(t.height)===this.lastH)return;this.render()}toDataURL(t="image/png"){return this.canvas.toDataURL(t)}dispose(){if(this.hoverRaf)cancelAnimationFrame(this.hoverRaf);this.stopIntro();cancelAnimationFrame(this.hoverTweenRaf);cancelAnimationFrame(this.rippleRaf);cancelAnimationFrame(this.selectRaf);cancelAnimationFrame(this.selectRaf);this.canvas.removeEventListener("pointermove",this.handlePointerMove);this.canvas.removeEventListener("pointerleave",this.handlePointerLeave);this.canvas.removeEventListener("click",this.handleClick);this.canvas.removeEventListener("pointerdown",this.handlePointerDown);this.dprWatch.dispose();this.canvas.remove();this.overlay.remove();this.hoverLayer.remove();this.spec=null;this.scene=null;this.drillRun=null}render(){if(!this.spec||!this.theme)return;this.dprWatch.update();const t=this.container.getBoundingClientRect();const s=Math.round(t.width);const i=Math.round(t.height);if(s<2||i<2)return;this.lastW=s;this.lastH=i;const e=Math.min(window.devicePixelRatio||1,4);this.dpr=e;this.canvas.width=s*e;this.canvas.height=i*e;this.spec.highlightIndex=this.hoverIndex;this.spec.highlightT=this.hoverT;this.layoutAndOverlay(s,i);const n=this.overlay.querySelector('[part="legend"]');if(n&&this.spec.legend&&this.spec.legend!=="none"){const t=this.spec.legend==="left"||this.spec.legend==="right";const e=t?n.offsetWidth:n.offsetHeight;if(e>0&&Math.abs((this.spec.legendExtent??-1)-e)>2){this.spec.legendExtent=e;this.layoutAndOverlay(s,i)}}if(!this.scene)return;const{variant:o,duration:a}=f(this.spec);const r=this.pendingDrill;this.pendingDrill=null;if(r?.leaving&&o!=="none"&&!d()){this.hasRendered=true;this.playDrill(e,r.index,r.up,r.leaving);return}if(this.drillRun){this.hasRendered=true;this.clearIntroOpacity();this.drillFrame(e);return}const h=!this.hasRendered&&o!=="none"&&!d();const c=this.scene.slices.length>0;if(h){this.hasRendered=c;this.playIntro(e,o,a);return}this.hasRendered=this.hasRendered||c;this.stopIntro();this.drawGeometry(this.scene,e)}clearIntroOpacity(){this.canvas.style.opacity="";for(const t of Array.from(this.overlay.querySelectorAll('[data-key^="pl-"]'))){t.style.transition="";t.style.opacity=""}}stopIntro(){cancelAnimationFrame(this.introRaf);this.introRaf=0;this.clearIntroOpacity()}drill(t,s="down"){this.pendingDrill=this.scene?{index:t,up:s==="up",leaving:this.scene}:null}replay(){this.hasRendered=false;this.render()}layoutAndOverlay(t,s){if(!this.spec||!this.theme)return;this.scene=G(this.spec,this.theme,t,s);u(this.overlay,this.scene,this.theme.fontFamily,{onLegendClick:this.onLegendToggle},false,this.legendLayer)}drawGeometry(t,s){if(this.ctx){this.ctx.setTransform(s,0,0,s,0,0);p(this.ctx,t)}}paceLabels(t){for(const s of Array.from(this.overlay.querySelectorAll('[data-key^="pl-"]'))){s.style.transition="opacity 180ms ease";s.style.opacity=t>=tt?"":"0"}}playIntro(t,s,i){const e=this.scene;if(!e)return;this.stopIntro();const n=t=>{this.canvas.style.opacity=t<1?String(t):""};n(m(s,e,0).alpha);this.paceLabels(0);let o=0;const a=r=>{if(!o)o=r;const h=(r-o)/i;if(h>=1){n(1);this.paceLabels(1);this.drawGeometry(e,t);return}this.paceLabels(h);const{scene:c,alpha:l}=m(s,e,h);n(l);this.drawGeometry(c,t);this.introRaf=requestAnimationFrame(a)};this.introRaf=requestAnimationFrame(a)}playDrill(t,s,i,e){if(!this.scene)return;this.stopIntro();this.drillRun={index:s,up:i,frozen:e,start:performance.now()};const n=()=>{if(!this.drillRun)return;if(this.drillFrame(t))return;this.introRaf=requestAnimationFrame(n)};n()}drillFrame(t){const s=this.drillRun;const i=this.scene;if(!s||!i)return true;const e=(performance.now()-s.start)/X;if(e>=1){this.drillRun=null;this.paceLabels(1);this.drawGeometry(i,t);return true}this.paceLabels(e);const n=t=>{const s=t.slices?.find((t=>t.dataIndex>=0))??t.slices?.[0];return s?{x:s.cx,y:s.cy}:null};const o=(t,s,i)=>!s&&!i?t:{...t,slices:(t.slices??[]).map((t=>({...t,cx:t.cx+s,cy:t.cy+i})))};const a=n(i);const r=n(s.frozen);const h=a&&r?o(s.frozen,a.x-r.x,a.y-r.y):s.frozen;const c=s.up?i:h;const l=s.up?h:i;const d=M(e);const f=y(c,l,s.index,s.up?1-d:d);if(!f)return true;if(!this.ctx)return false;this.ctx.setTransform(t,0,0,t,0,0);p(this.ctx,this.withRipple(f.base));this.ctx.globalAlpha=f.overAlpha;p(this.ctx,f.over,false);this.ctx.globalAlpha=1;return false}sliceAt(t,s){if(!this.scene)return null;for(const i of this.scene.slices){if(it(t,s,i,i.cx,i.cy))return i}return null}focusIndex(t){if(!this.scene)return;if(t<0){this.hoverLayer.textContent="";if(this.hoverIndex!==-1){this.hoverIndex=-1;this.tweenHover()}return}const s=this.scene.slices.find((s=>s.dataIndex===t));if(!s)return;if(this.hoverIndex!==t){this.hoverIndex=t;this.tweenHover()}const i=(s.startAngle+s.endAngle)/2;const e=(s.innerR+s.outerR)/2;this.renderTooltip(t,s.cx+Math.cos(i)*e,s.cy+Math.sin(i)*e)}tweenHover(){const t=this.hoverIndex>=0?1:0;if(d()){this.hoverT=t;this.render();return}cancelAnimationFrame(this.hoverTweenRaf);const s=this.hoverT;if(s===t){this.render();return}const i=performance.now();const e=n=>{const o=Math.min(1,(n-i)/Q);this.hoverT=s+(t-s)*v(o);this.render();if(o<1)this.hoverTweenRaf=requestAnimationFrame(e)};this.hoverTweenRaf=requestAnimationFrame(e)}activate(t){const s=this.scene?.slices.find((s=>!s.pill&&s.dataIndex===t));if(!s)return;const i=(s.startAngle+s.endAngle)/2;const e=(s.innerR+s.outerR)/2;this.startRipple(s.cx+Math.cos(i)*e,s.cy+Math.sin(i)*e,s);this.toggleSelected(t)}startRipple(t,s,i){if(d())return;const e=[i.startAngle,i.endAngle].flatMap((e=>[i.innerR,i.outerR].map((n=>Math.hypot(i.cx+Math.cos(e)*n-t,i.cy+Math.sin(e)*n-s)))));this.ripple={dataIndex:i.dataIndex,x:t,y:s,max:Math.max(...e,1),color:g(i.color),start:performance.now()};cancelAnimationFrame(this.rippleRaf);const n=()=>{if(!this.ripple)return;if((performance.now()-this.ripple.start)/J>=1){this.ripple=null;if(!this.drillRun&&this.scene)this.drawGeometry(this.scene,this.dpr);return}if(!this.drillRun&&this.scene)this.drawGeometry(this.withRipple(this.scene),this.dpr);this.rippleRaf=requestAnimationFrame(n)};this.rippleRaf=requestAnimationFrame(n)}withRipple(t){const s=this.ripple;if(!s)return t;const i=Math.min(1,(performance.now()-s.start)/J);return{...t,ripple:{dataIndex:s.dataIndex,x:s.x,y:s.y,radius:s.max*b(i),color:s.color,alpha:Y*(1-Math.max(0,(i-.35)/.65))}}}toggleSelected(t){const s=this.spec?.data;if(!s?.[t])return;const i=s.map((t=>t.selectT??(t.selected?1:0)));const e=!!s[t].selected;s.forEach(((s,i)=>{s.selected=i===t&&!e}));const n=s.map((t=>t.selected?1:0));if(i.every(((t,s)=>t===n[s])))return;if(d()){s.forEach(((t,s)=>t.selectT=n[s]));this.render();return}cancelAnimationFrame(this.selectRaf);const o=performance.now();const a=t=>{const e=Math.min(1,(t-o)/Z);const r=v(e);s.forEach(((t,s)=>{t.selectT=i[s]+(n[s]-i[s])*r}));this.render();if(e<1)this.selectRaf=requestAnimationFrame(a)};this.selectRaf=requestAnimationFrame(a)}renderTooltip(t,s,i){this.hoverLayer.textContent="";if(t<0||!this.spec||!this.theme||!this.scene)return;const e=this.spec.data[t];if(!e)return;const n=this.spec.data.reduce(((t,s)=>s.hidden||s.level!==e.level||s.parent!==e.parent?t:t+s.value),0);const o=n>0?e.value/n*100:0;const a=document.createElement("div");a.setAttribute("part","tooltip");a.style.cssText=["position:absolute","pointer-events:none","background:var(--md-sys-color-surface-container-high, #ECE6F0)","color:var(--md-sys-color-on-surface, #1C1B1F)","border-radius:8px","padding:8px 10px","box-shadow:0 2px 6px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.2)",`font:400 ${this.theme.labelSize}px ${this.theme.fontFamily}`,"white-space:nowrap","z-index:2"].join(";");if(this.tooltipRender){const o=n;const r=this.tooltipRender({dataIndex:t,axisValue:e.label,axisLabel:e.label,focusedSeriesIndex:t,missing:[],series:this.spec.data.map(((s,i)=>({seriesIndex:i,label:s.label,color:s.color,value:s.value,formattedValue:this.spec.valueFormatter(s.value),percent:o>0?s.value/o*100:0,focused:i===t,missing:false})))});if(r!=null){x(a,r);this.hoverLayer.appendChild(a);this.placeTooltip(a,s,i)}return}const r=document.createElement("div");r.style.cssText="display:flex;align-items:center;gap:8px;line-height:1.5";const h=document.createElement("span");h.style.cssText=`width:10px;height:10px;border-radius:3px;background:${e.color};flex:none`;const c=document.createElement("span");c.textContent=e.label;c.style.cssText="flex:1";const l=document.createElement("strong");l.textContent=`${this.spec.valueFormatter(e.value)} (${o.toFixed(1)}%)`;r.append(h,c,l);a.appendChild(r);this.hoverLayer.appendChild(a);this.placeTooltip(a,s,i)}placeTooltip(t,s,i){if(!this.scene)return;const e=t.offsetWidth||120;const n=t.offsetHeight||40;let o=s+14;if(o+e>this.scene.width-4)o=s-e-14;const a=Math.max(4,Math.min(i-n/2,this.scene.height-n-4));t.style.left=`${Math.max(4,o)}px`;t.style.top=`${a}px`}}function it(t,s,i,e,n){const o=t-e;const a=s-n;const r=Math.hypot(o,a);if(r<i.innerR||r>i.outerR)return false;const h=Math.min(i.startAngle,i.endAngle);const c=Math.max(i.startAngle,i.endAngle);const l=Math.PI*2;let d=(Math.atan2(a,o)-h)%l;if(d<0)d+=l;return d<=c-h}const et=()=>`:host{--_block-size:var(--md-pie-chart-block-size, auto);--_min-block-size:var(--md-pie-chart-min-block-size, max(140px, calc(200px + var(--md-sys-density-scale, 0) * 12px)));--_aspect-ratio:var(--md-pie-chart-aspect-ratio, 1 / 1);--_background:var(--md-pie-chart-background, var(--md-sys-color-surface-container-low, #F7F2FA));--_padding:var(--md-pie-chart-padding, max(8px, calc(16px + var(--md-sys-density-scale, 0) * 2px)));--_shape:var(--md-pie-chart-shape, max(8px, calc(16px + var(--md-sys-density-scale, 0) * 2px)));--_empty-color:var(--md-pie-chart-empty-color, var(--md-sys-color-on-surface-variant, #49454F));--_empty-background:var(--md-pie-chart-empty-background, var(--_background));--_empty-font:var(--md-pie-chart-empty-font, var(--md-sys-typescale-body-medium-font-family, Roboto, sans-serif));--_empty-font-size:var(--md-pie-chart-empty-font-size, var(--md-sys-typescale-body-medium-font-size, 14px));--_empty-icon-size:var(--md-pie-chart-empty-icon-size, 40px);--_center-color:var(--md-pie-chart-center-color, var(--md-sys-color-on-surface, #1C1B1F));display:block;position:relative;inline-size:100%;block-size:var(--_block-size);min-block-size:var(--_min-block-size);background:var(--_background);padding:var(--_padding);border-radius:var(--_shape);box-sizing:border-box;aspect-ratio:var(--_aspect-ratio)}.md-pie-chart__header,.md-pie-chart__footer{display:contents}.md-pie-chart__header>slot[name='header']::slotted(*),.md-pie-chart__footer>slot[name='footer']::slotted(*){display:block;margin-block:8px}.md-pie-chart__canvas{position:absolute;inset:var(--_padding);min-block-size:0;min-inline-size:0}.md-pie-chart__center{position:absolute;top:var(--_pie-center-y, 50%);left:var(--_pie-center-x, 50%);transform:translate(-50%, -50%);pointer-events:none;color:var(--_center-color);text-align:center;font-family:var(--md-sys-typescale-headline-small-font-family, Roboto, system-ui, sans-serif);font-variant-numeric:tabular-nums;display:flex;align-items:center;justify-content:center;max-width:var(--md-pie-center-max-width, var(--_pie-hole, none));max-height:var(--md-pie-center-max-height, var(--_pie-hole-h, none))}.md-pie-chart__center>slot[name='center']::slotted(*){pointer-events:auto}.md-pie-chart__empty{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;box-sizing:border-box;padding:24px;background:var(--_empty-background);border-radius:var(--_shape);color:var(--_empty-color);font-family:var(--_empty-font);font-size:var(--_empty-font-size);line-height:var(--md-sys-typescale-body-medium-line-height, 20px);pointer-events:none;text-align:center}.md-pie-chart__empty ::slotted(.material-symbols-outlined),.md-pie-chart__empty ::slotted(.material-symbols-rounded),.md-pie-chart__empty ::slotted(.material-symbols-sharp),.md-pie-chart__empty ::slotted(.material-icons){font-size:var(--_empty-icon-size) !important;line-height:1;opacity:0.55}.md-pie-chart__a11y-table{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}@media (forced-colors: active){:host{forced-color-adjust:auto}}.md-pie-chart__loading{position:absolute;inset:0;z-index:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;box-sizing:border-box;padding:24px;background:var(--_empty-background, var(--_background));border-radius:var(--_shape);color:var(--_empty-color);text-align:center}.md-pie-chart__spinner{inline-size:40px;block-size:40px}.md-pie-chart__canvas:focus-visible{outline:3px solid var(--md-sys-color-secondary, #625B71);outline-offset:-3px;border-radius:4px}.md-pie-chart__live{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}[part='legend'] button:focus-visible{outline:3px solid var(--md-sys-color-secondary, #625B71);outline-offset:2px;border-radius:6px}:host([density='-1']){--md-sys-density-scale:-1}:host([density='-2']){--md-sys-density-scale:-2}:host([density='-3']){--md-sys-density-scale:-3}:host([density='-4']){--md-sys-density-scale:-4}`;function nt(t,s){if(t.includes(s))return t;for(const i of t){if(i.children?.length){const t=nt(i.children,s);if(t)return t}}return null}const ot=class{constructor(i){t(this,i);this.mdSliceClick=s(this,"mdSliceClick",7);this.mdLegendClick=s(this,"mdLegendClick",7);this.mdReady=s(this,"mdReady",7);this.label="";this.titleAlign="start";this.data=[];this.innerRadius="0%";this.outerRadius="75%";this.startAngle=90;this.endAngle=-270;this.paddingAngle=0;this.cornerRadius=4;this.showLabels=true;this.gradient=false;this.highlight="slice";this.legend="right";this.tooltip="item";this.locale="";this.summary="";this.labelEmpty="No data to display";this.loading=false;this.loadingLabel="Loading chart…";this.labelPlot="Chart data. Use the arrow keys to move between slices, Home and End for the first and last, Escape to leave.";this.labelPoint="%label%: %value% (%percent%)";this.noAnimation=false;this.animation="expressive";this.density=0;this.mounted=false;this.kbIndex=-1;this.announcement="";this.engine=null;this.ro=null;this.legendHidden=new Map;this.bindChartHost=t=>{this.chartHost=t};this.bindA11yTableHost=t=>{this.a11yTableHost=t};this.onPlotKeyDown=t=>{const s=this.flatDatums().length-1;if(s<0)return;const i=typeof getComputedStyle==="function"&&getComputedStyle(this.el).direction==="rtl";const e=i?"ArrowLeft":"ArrowRight";const n=i?"ArrowRight":"ArrowLeft";let o=this.kbIndex;switch(t.key){case e:case"ArrowDown":o=this.kbIndex<0?0:Math.min(s,this.kbIndex+1);break;case n:case"ArrowUp":o=this.kbIndex<0?s:Math.max(0,this.kbIndex-1);break;case"Home":o=0;break;case"End":o=s;break;case"Escape":if(this.kbIndex<0)return;o=-1;break;case"Enter":case" ":if(this.kbIndex<0)return;t.preventDefault();this.emitSliceClick(this.kbIndex,t);this.engine?.activate(this.kbIndex);return;default:return}t.preventDefault();this.moveKeyboardCursor(o)};this.onPlotBlur=()=>{if(this.kbIndex>=0)this.moveKeyboardCursor(-1)}}datumKeys(){const t=new Map;return this.flatDatums().map(((s,i)=>{const e=s.id!=null?`id:${s.id}`:s.label!=null?`label:${s.label}`:`pos:${i}`;const n=t.get(e)??0;t.set(e,n+1);return n===0?e:`${e}#${n}`}))}componentDidLoad(){this.initChart();if(typeof window!=="undefined"&&window.matchMedia){this.themeMql=window.matchMedia("(prefers-color-scheme: dark)");this.themeListener=()=>this.applyEngine();this.themeMql.addEventListener?.("change",this.themeListener)}}disconnectedCallback(){this.ro?.disconnect();this.ro=null;this.engine?.dispose();this.engine=null;if(this.themeMql&&this.themeListener){this.themeMql.removeEventListener?.("change",this.themeListener);this.themeListener=undefined;this.themeMql=undefined}}onAnyPropChange(){this.applyEngine();this.rebuildA11yTable()}async resize(){this.engine?.resize()}async replay(){this.engine?.replay()}async drill(t,s="down"){this.engine?.drill(t,s)}async toDataURL(){return this.engine?.toDataURL("image/png")??""}async getInstance(){return this.engine}initChart(){this.makeEngine();this.applyEngine();this.rebuildA11yTable();this.mounted=true;this.mdReady.emit()}makeEngine(){if(!this.chartHost)return;this.ro?.disconnect();this.ro=null;this.engine?.dispose();try{this.engine=new st(this.chartHost)}catch{this.engine=null}if(this.engine&&typeof ResizeObserver!=="undefined"){this.ro=new ResizeObserver((()=>{this.engine?.resize();this.updateCenterVars()}));this.ro.observe(this.chartHost)}}buildEngineTheme(t){return{background:t.background,textColor:t.textColor,textColorMuted:t.textColorMuted,axisLineColor:t.axisLineColor,gridLineColor:t.gridColor,surface:t.surface,fontFamily:t.fontFamily,labelSize:t.labelSize,titleSize:t.titleSize}}flatten(t,s){const i=this.datumKeys();const e=[];const n=this.monochrome!=null?_(this.el,this.monochrome||"primary",t.palette[0]):null;const a=(r,h,c,l)=>{r.forEach(((d,f)=>{const u=l!=null?o(l,t.surface,.18+f/Math.max(1,r.length)*.42):n!=null?o(n,t.surface,f/Math.max(1,r.length)*.7):s[f]??C(t.palette,f);const p=_(this.el,d.color,u);const m=e.length;e.push({label:d.label,value:d.value,color:p,selected:d.selected,radius:d.radius,hidden:d.hidden??this.legendHidden.get(i[m])??false,level:h,parent:c});if(d.children?.length)a(d.children,h+1,m,p)}))};a(this.data??[],0,undefined);return e}flatDatums(){const t=[];const s=i=>{for(const e of i){t.push(e);if(e.children?.length)s(e.children)}};s(this.data??[]);return t}buildSpec(t){const s=typeof getComputedStyle==="function"&&getComputedStyle(this.el).direction==="rtl";const i=k(t.palette.slice(0,3),this.data.length,{light:t.surface,dark:t.textColor});return{data:this.flatten(t,i),title:this.label||undefined,subtitle:this.subtitle||undefined,titleAlign:this.titleAlign,innerRadius:this.innerRadius,outerRadius:this.outerRadius,startAngleDeg:this.startAngle,endAngleDeg:this.endAngle,paddingAngleDeg:this.paddingAngle,cornerRadius:this.cornerRadius,showLabels:this.showLabels,labelMode:this.labelMode,gradient:this.gradient,highlight:this.highlight,legend:s?A(this.legend):this.legend,ringWidths:this.ringWidths,valueFormatter:t=>this.formatValue(t),animation:this.noAnimation?"none":this.animation,animationDuration:this.animationDuration}}applyEngine(){if(!this.engine)return;const t=w(this.el);this.engine.setSpec(this.buildSpec(t),this.buildEngineTheme(t),{onLegendClick:t=>{const s=this.datumKeys()[t.seriesIndex];if(s!=null)this.legendHidden.set(s,!!t.hidden);this.mdLegendClick.emit({dataIndex:t.seriesIndex,selected:!t.hidden})},onPointClick:(t,s,i)=>this.emitSliceClick(s,i)});this.engine.setTooltip({render:this.tooltipRenderer});this.updateCenterVars()}updateCenterVars(){const t=this.engine?.getCenter();if(!t||!this.chartHost)return;const s=this.el.getBoundingClientRect();const i=this.chartHost.getBoundingClientRect();const e=i.left-s.left;const n=i.top-s.top;this.el.style.setProperty("--_pie-center-x",`${t.x+e}px`);this.el.style.setProperty("--_pie-center-y",`${t.y+n}px`);const o=this.engine?.getHoleBox();this.el.style.setProperty("--_pie-hole",o&&o.width>0?`${o.width}px`:"none");this.el.style.setProperty("--_pie-hole-h",o&&o.height>0?`${o.height}px`:"none")}rebuildA11yTable(){if(!this.a11yTableHost)return;const t=this.data.reduce(((t,s)=>t+s.value),0);const s=this.tableLabels??{};this.a11yTableHost.innerHTML=z({title:this.label,xAxisLabel:s.category??"Category",xAxisData:this.data.map((t=>t.label)),locale:this.locale,series:[{label:s.value??"Value",data:this.data.map((t=>t.value))},{label:s.share??"Share",data:this.data.map((s=>t>0?s.value/t*100:0))}],valueFormatter:t=>t==null?"—":this.formatValue(t)})}formatValue(t){return this.valueFormatter?this.valueFormatter(t):t.toLocaleString(this.locale||undefined)}emitSliceClick(t,s){const i=this.flatDatums()[t];if(!i)return;this.mdSliceClick.emit({seriesIndex:0,seriesId:i.id,dataIndex:t,value:i.value,nativeEvent:s,series:i})}moveKeyboardCursor(t){this.kbIndex=t;this.engine?.focusIndex(t);if(t<0){this.announcement="";return}const s=this.flatDatums();const i=s[t];if(!i)return;const e=this.data?.some((t=>t.children?.length))?nt(this.data??[],i)??s:s;const n=e.reduce(((t,s)=>t+s.value),0);const o=n>0?i.value/n*100:0;this.announcement=this.labelPoint.replace("%label%",i.label).replace("%value%",this.formatValue(i.value)).replace("%percent%",`${o.toLocaleString(this.locale||undefined,{maximumFractionDigits:1})}%`)}render(){const t=this.data.length===0&&!this.loading;const s=this.summary||F({title:this.label,chartType:"pie",seriesCount:this.data.length,locale:this.locale});return i(e,{key:"646c418ad237c02a37b63a44e726f63038d764e3",class:{"md-pie-chart":true,"md-pie-chart--empty":t,"md-pie-chart--mounted":this.mounted,"md-pie-chart--donut":this.innerRadius!=="0%"&&this.innerRadius!==0},role:"figure","aria-label":s,"aria-busy":this.loading?"true":null,style:this.heightProp?{blockSize:this.heightProp}:undefined},i("header",{key:"91000eccea90b4f6f497eeb4fd24460fddb50fdf",class:"md-pie-chart__header",part:"header"},i("slot",{key:"4d95064f71c77b468df419b12ac818879547fdf8",name:"header"})),i("div",{key:"4700981a7e3035ae20a298de3b23ad0641583c00",class:"md-pie-chart__canvas",part:"canvas",ref:t=>this.bindChartHost(t),tabindex:t?undefined:"0",role:t?undefined:"application","aria-label":t?undefined:this.labelPlot,onKeyDown:this.onPlotKeyDown,onBlur:this.onPlotBlur}),i("div",{key:"4473fc6e379d32f4b097843f671e9d441d1d9407",class:"md-pie-chart__center",part:"center","aria-hidden":"true"},i("slot",{key:"b2fe4b06cf819bda51e7a33ac0ed8a361c66ce9b",name:"center"})),t&&i("div",{key:"07a20ca893b2ec888a608bdd6bd076753d6e28c5",class:"md-pie-chart__empty",part:"empty"},i("slot",{key:"cd3680b45b20580207a1cd9f7d0a92a9bb43737f",name:"empty"},this.labelEmpty)),this.loading&&i("div",{key:"5134c562360df1c4fc3048d9ceef642f08691fca",class:"md-pie-chart__loading",part:"loading",role:"status"},i("slot",{key:"b88653bc760d8b875ee939abae33e15f7207aa22",name:"loader"},i("slot",{key:"53e75485d2faaa84352f4f41cbd83756dbb02ca1",name:"loading"},i("md-progress-indicator",{key:"3bba3041bcb3f638e3fe8a0b9cab9acd644cc25a",class:"md-pie-chart__spinner",variant:"circular",indeterminate:true,label:this.loadingLabel}),i("span",{key:"64301c1275be0b73d9e3700075604e865e926f14",class:"md-pie-chart__loading-text"},this.loadingLabel)))),i("footer",{key:"4b0dd15de96b8ae57708a831ab39a648c24790f7",class:"md-pie-chart__footer",part:"footer"},i("slot",{key:"2d044f72638d5e7807729f875eedc56e6599e7aa",name:"footer"})),i("div",{key:"99f0f11c5878aa648eedd6c3d6f88ad8230f4ea5",class:"md-pie-chart__a11y-table",ref:t=>this.bindA11yTableHost(t)}),i("div",{key:"0911b766e69fea66d8f99dbd41af32a1869c7f35",class:"md-pie-chart__live",role:"status","aria-live":"polite","aria-atomic":"true"},this.announcement))}get el(){return n(this)}static get watchers(){return{data:[{onAnyPropChange:0}],innerRadius:[{onAnyPropChange:0}],outerRadius:[{onAnyPropChange:0}],startAngle:[{onAnyPropChange:0}],endAngle:[{onAnyPropChange:0}],paddingAngle:[{onAnyPropChange:0}],cornerRadius:[{onAnyPropChange:0}],showLabels:[{onAnyPropChange:0}],labelMode:[{onAnyPropChange:0}],monochrome:[{onAnyPropChange:0}],gradient:[{onAnyPropChange:0}],highlight:[{onAnyPropChange:0}],legend:[{onAnyPropChange:0}],tooltip:[{onAnyPropChange:0}],label:[{onAnyPropChange:0}],titleAlign:[{onAnyPropChange:0}],animation:[{onAnyPropChange:0}],animationDuration:[{onAnyPropChange:0}],ringWidths:[{onAnyPropChange:0}],locale:[{onAnyPropChange:0}],subtitle:[{onAnyPropChange:0}],loading:[{onAnyPropChange:0}],valueFormatter:[{onAnyPropChange:0}]}}};ot.style=et();export{ot as md_pie_chart};
2
+ //# sourceMappingURL=p-c063c823.entry.js.map
package/main-llm.md CHANGED
@@ -409,7 +409,7 @@ break on any release.
409
409
 
410
410
  **Overriding a colour role forfeits the library's contrast testing.** Re-verify
411
411
  AA (4.5:1 text, 3:1 borders and dividers) after any palette change. The Theme
412
- Generator at <https://awcui.io/theme-generator> takes a seed colour, emits both
412
+ Generator at <https://awc-ui.dev/theme-generator> takes a seed colour, emits both
413
413
  palettes as `--md-sys-color-*` overrides, and runs the WCAG checks live — use it
414
414
  rather than hand-picking container and `on-` pairs.
415
415
 
@@ -1112,7 +1112,7 @@ rules you must not break:
1112
1112
  7. **Directional icons do not auto-flip in RTL** — see §4.5.
1113
1113
  8. **Re-verify contrast after overriding any colour role** — the library's AA
1114
1114
  testing covers the shipped palette only. The Theme Generator at
1115
- <https://awcui.io/theme-generator> runs the WCAG checks live (§4.2).
1115
+ <https://awc-ui.dev/theme-generator> runs the WCAG checks live (§4.2).
1116
1116
 
1117
1117
  ---
1118
1118
 
package/package.json CHANGED
@@ -1,10 +1,31 @@
1
1
  {
2
2
  "name": "@awc-ui/core",
3
- "version": "1.0.0-beta",
3
+ "version": "1.0.0-beta.1",
4
4
  "description": "Material Design 3 Web Components built with StencilJS",
5
+ "keywords": [
6
+ "material-design",
7
+ "material-design-3",
8
+ "md3",
9
+ "web-components",
10
+ "custom-elements",
11
+ "stencil",
12
+ "ui-components",
13
+ "component-library",
14
+ "design-system",
15
+ "accessibility",
16
+ "wcag",
17
+ "ssr"
18
+ ],
5
19
  "publishConfig": {
6
20
  "access": "public"
7
21
  },
22
+ "sideEffects": [
23
+ "**/*.css",
24
+ "./define.mjs",
25
+ "./loader/**",
26
+ "./dist/components/index.js",
27
+ "./dist/md3/**"
28
+ ],
8
29
  "main": "dist/index.cjs.js",
9
30
  "module": "dist/index.js",
10
31
  "types": "dist/types/index.d.ts",
@@ -67,7 +88,7 @@
67
88
  "monocart-coverage-reports": "^2.12.9",
68
89
  "puppeteer": "^24.0.0",
69
90
  "typescript": "^5.4.0",
70
- "@awc-ui/tokens": "1.0.0-beta"
91
+ "@awc-ui/tokens": "1.0.0-beta.1"
71
92
  },
72
93
  "license": "MIT",
73
94
  "author": "AWC UI",
@@ -84,7 +105,7 @@
84
105
  "awc-ui": "bin/awc-ui.mjs"
85
106
  },
86
107
  "scripts": {
87
- "build": "node ../../scripts/build-package-docs.mjs && stencil build && node ../../scripts/fix-module-types.mjs",
108
+ "build": "node ../../scripts/build-package-docs.mjs && stencil build && node ../../scripts/fix-module-types.mjs && node ../../scripts/split-react-components.mjs",
88
109
  "build:watch": "stencil build --watch",
89
110
  "build:dev": "stencil build --config stencil.config.dev.ts",
90
111
  "build:watch:dev": "stencil build --config stencil.config.dev.ts --watch",
@@ -1,2 +0,0 @@
1
- import{t,p as s,H as i,c as e,h as o,d as n}from"./p-MWBNn6Lj.js";const r=()=>`:host{display:inline-block;position:relative}.md-tooltip__popup{position:fixed;z-index:var(--md-sys-z-index-tooltip, 1500);pointer-events:none;box-sizing:border-box;width:max-content;opacity:0;visibility:hidden;transform:scale(0.9);transition:opacity var(--md-sys-motion-duration-short2, 100ms) var(--md-sys-motion-easing-standard, ease), transform var(--md-sys-motion-duration-short2, 100ms) var(--md-sys-motion-easing-standard, ease), visibility 0ms linear var(--md-sys-motion-duration-short2, 100ms)}.md-tooltip__popup--visible{opacity:1;visibility:visible;transform:scale(1);pointer-events:auto;transition:opacity var(--md-sys-motion-duration-short2, 100ms) var(--md-sys-motion-easing-standard, ease), transform var(--md-sys-motion-duration-short2, 100ms) var(--md-sys-motion-easing-standard, ease), visibility 0ms linear 0ms}.md-tooltip__popup--plain{--_container-color:var(--md-tooltip-plain-container-color, var(--md-sys-color-inverse-surface, #313033));--_text-color:var(--md-tooltip-plain-text-color, var(--md-sys-color-inverse-on-surface, #F4EFF4));--_shape:var(--md-tooltip-container-shape, var(--md-sys-shape-corner-extra-small, 4px));background-color:var(--_container-color);color:var(--_text-color);border-radius:var(--_shape);padding-block:var(--md-sys-spacing-inset-xs, 4px);padding-inline:var(--md-sys-spacing-inset-sm, 8px);min-block-size:max(20px, calc(24px + var(--md-sys-density-scale, 0) * 1px));max-inline-size:min(var(--md-tooltip-plain-max-inline-size, 280px), calc(100vw - 16px));font-family:var(--md-sys-typescale-body-small-font-family, Roboto, sans-serif);font-size:max(10px, calc(12px + var(--md-sys-density-scale, 0) * 0.5px));font-weight:var(--md-sys-typescale-body-small-font-weight, 400);line-height:max(14px, calc(16px + var(--md-sys-density-scale, 0) * 0.5px));letter-spacing:var(--md-sys-typescale-body-small-letter-spacing, 0.4px);white-space:normal;display:flex;align-items:center}.md-tooltip__text{overflow-wrap:anywhere}.md-tooltip__popup--rich{--_container-color:var(--md-tooltip-rich-container-color, var(--md-sys-color-surface-container, #F3EDF7));--_subhead-color:var(--md-tooltip-rich-subhead-color, var(--md-sys-color-on-surface-variant, #49454F));--_text-color:var(--md-tooltip-rich-text-color, var(--md-sys-color-on-surface-variant, #49454F));--_action-color:var(--md-tooltip-rich-action-color, var(--md-sys-color-primary, #6750A4));--_shape:var(--md-tooltip-rich-container-shape, var(--md-sys-shape-corner-medium, 12px));background-color:var(--_container-color);color:var(--_text-color);border-radius:var(--_shape);padding-block-start:var(--md-sys-spacing-inset-md, 12px);padding-block-end:var(--md-sys-spacing-inset-sm, 8px);padding-inline:var(--md-sys-spacing-inset-lg, 16px);min-inline-size:var(--md-tooltip-rich-min-inline-size, 120px);max-inline-size:min(var(--md-tooltip-rich-max-inline-size, 320px), calc(100vw - 16px));white-space:normal;box-shadow:var(--md-sys-elevation-2, 0 1px 3px 1px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.3))}.md-tooltip__subhead{font-family:var(--md-sys-typescale-title-small-font-family, Roboto, sans-serif);font-size:max(11px, calc(14px + var(--md-sys-density-scale, 0) * 0.5px));font-weight:var(--md-sys-typescale-title-small-font-weight, 500);line-height:max(16px, calc(20px + var(--md-sys-density-scale, 0) * 1px));letter-spacing:var(--md-sys-typescale-title-small-letter-spacing, 0.1px);color:var(--_subhead-color);margin-block-end:var(--md-sys-spacing-gap-xs, 4px)}.md-tooltip__supporting-text{font-family:var(--md-sys-typescale-body-medium-font-family, Roboto, sans-serif);font-size:max(11px, calc(14px + var(--md-sys-density-scale, 0) * 0.5px));font-weight:var(--md-sys-typescale-body-medium-font-weight, 400);line-height:max(16px, calc(20px + var(--md-sys-density-scale, 0) * 1px));letter-spacing:var(--md-sys-typescale-body-medium-letter-spacing, 0.25px);color:var(--_text-color)}.md-tooltip__actions{display:flex;gap:var(--md-sys-spacing-gap-sm, 8px);justify-content:flex-end;margin-block-start:var(--md-sys-spacing-gap-md, 12px);color:var(--_action-color)}.md-tooltip__actions--empty{display:none}::slotted([slot="actions"]){color:var(--_action-color)}.md-tooltip__popup--top,.md-tooltip__popup--top-start,.md-tooltip__popup--top-end{transform-origin:bottom center}.md-tooltip__popup--bottom,.md-tooltip__popup--bottom-start,.md-tooltip__popup--bottom-end{transform-origin:top center}.md-tooltip__popup--left,.md-tooltip__popup--left-start,.md-tooltip__popup--left-end{transform-origin:center right}.md-tooltip__popup--right,.md-tooltip__popup--right-start,.md-tooltip__popup--right-end{transform-origin:center left}:host-context([dir="rtl"]) .md-tooltip__actions{justify-content:flex-start}@media (forced-colors: active){.md-tooltip__popup{border:1px solid CanvasText}}@media (prefers-reduced-motion: reduce){.md-tooltip__popup,.md-tooltip__popup--visible{transition:none;transform:none}}:host([density='-1']){--md-sys-density-scale:-1}:host([density='-2']){--md-sys-density-scale:-2}:host([density='-3']){--md-sys-density-scale:-3}:host([density='-4']){--md-sys-density-scale:-4}`;const a=8;const h=s(class t extends i{constructor(t){super();if(t!==false){this.__registerHost()}this.__attachShadow();this.mdOpen=e(this,"mdOpen",1);this.mdClose=e(this,"mdClose",1);this.text="";this.subhead="";this.variant="plain";this.position="top";this.autoPosition=true;this.offset=8;this.crossOffset=0;this.open=false;this.showDelay=500;this.hideDelay=200;this.disabled=false;this.density=0;this.isVisible=false;this.resolvedPlacement="top";this.hasSlottedActions=false;this.hasSlottedSubhead=false;this.tooltipId=`md-tooltip-${Math.random().toString(36).slice(2,9)}`;this.scrollListenerBound=false;this.escapeListenerBound=false;this.hostHoverBound=false;this.hasLoaded=false;this.suppressed=false;this.onTriggerSlotChange=()=>{const t=this.triggerSlot?.assignedElements();if(t&&t.length>0)this.bindTrigger(t[0])};this.handleTriggerEnter=()=>this.scheduleShow();this.handleTriggerLeave=()=>{this.suppressed=false;this.scheduleHide()};this.handleTriggerFocus=()=>this.scheduleShow();this.handleTriggerBlur=t=>{if(t.relatedTarget&&this.el.contains(t.relatedTarget))return;this.suppressed=false;this.scheduleHide()};this.handleHostFocusOut=t=>{if(this.variant!=="rich"||!this.isVisible)return;if(t.relatedTarget&&this.el.contains(t.relatedTarget))return;this.scheduleHide()};this.handlePopupEnter=()=>{this.clearTimers()};this.handlePopupLeave=()=>{this.scheduleHide()};this.handleGlobalEscape=t=>{if(t.key!=="Escape"||!this.isVisible)return;t.preventDefault();this.clearTimers();this.suppressed=true;const s=this.getDeepActiveElement();const i=!!s&&(this.el.contains(s)||s===this.triggerEl);this.open=false;if(i&&this.triggerEl)this.triggerEl.focus()};this.lastGeom={at:0,al:0,aw:0,ah:0,pw:0,ph:0,vw:0,vh:0,ex:0,ey:0};this.watchdogFrame=0;this.handleScroll=()=>{if(this.isVisible)this.updatePosition()}}componentWillLoad(){this.syncSlotFlags();if(this.open&&!this.disabled)this.isVisible=true}componentDidLoad(){this.hasLoaded=true;this.setup();if(this.open)this.showTooltip()}connectedCallback(){if(!this.hasLoaded)return;this.setup();if(this.isVisible&&!this.disabled){this.addScrollListener();this.addEscapeListener();this.schedulePositionUpdate();this.startPositionWatchdog()}else if(this.open&&!this.isVisible&&!this.disabled){this.showTooltip()}}setup(){const t=this.el.shadowRoot;if(!t)return;this.triggerSlot=t.querySelector("slot:not([name])")??undefined;this.triggerSlot?.addEventListener("slotchange",this.onTriggerSlotChange);this.el.addEventListener("focusout",this.handleHostFocusOut);this.syncSlotFlags();if(typeof MutationObserver!=="undefined"&&!this.slotObserver){this.slotObserver=new MutationObserver((()=>{this.syncSlotFlags();if(this.triggerEl)this.updateTriggerAria(this.triggerEl)}));this.slotObserver.observe(this.el,{childList:true,subtree:true,characterData:true})}const s=this.triggerSlot?.assignedElements()[0];if(s)this.bindTrigger(s)}syncSlotFlags(){const t=Array.from(this.el.children);this.hasSlottedActions=t.some((t=>t.getAttribute("slot")==="actions"));this.hasSlottedSubhead=t.some((t=>t.getAttribute("slot")==="subhead"))}disconnectedCallback(){this.clearTimers();this.stopPositionWatchdog();this.unbindTrigger();this.removeScrollListener();this.removeEscapeListener();this.el.removeEventListener("focusout",this.handleHostFocusOut);this.triggerSlot?.removeEventListener("slotchange",this.onTriggerSlotChange);this.triggerSlot=undefined;this.slotObserver?.disconnect();this.slotObserver=undefined}onOpenChange(t){if(t){this.showTooltip()}else{this.hideTooltip()}}onDisabledChange(t){if(t){this.clearTimers();if(this.open)this.open=false;this.triggerEl?.removeAttribute("aria-description")}else if(this.triggerEl){this.updateTriggerAria(this.triggerEl)}}onDescriptionChange(){if(this.triggerEl)this.updateTriggerAria(this.triggerEl)}async show(){if(this.disabled)return;this.open=true}async hide(){this.open=false}bindTrigger(t){this.unbindTrigger();this.triggerEl=t;if(this.useHostHover(t)){this.el.addEventListener("mouseenter",this.handleTriggerEnter);this.el.addEventListener("mouseleave",this.handleTriggerLeave);this.hostHoverBound=true}else{t.addEventListener("mouseenter",this.handleTriggerEnter);t.addEventListener("mouseleave",this.handleTriggerLeave)}t.addEventListener("focus",this.handleTriggerFocus);t.addEventListener("blur",this.handleTriggerBlur);this.updateTriggerAria(t)}unbindTrigger(){if(this.hostHoverBound){this.el.removeEventListener("mouseenter",this.handleTriggerEnter);this.el.removeEventListener("mouseleave",this.handleTriggerLeave);this.hostHoverBound=false}else if(this.triggerEl){this.triggerEl.removeEventListener("mouseenter",this.handleTriggerEnter);this.triggerEl.removeEventListener("mouseleave",this.handleTriggerLeave)}if(!this.triggerEl)return;this.triggerEl.removeEventListener("focus",this.handleTriggerFocus);this.triggerEl.removeEventListener("blur",this.handleTriggerBlur);this.triggerEl.removeAttribute("aria-description");this.triggerEl=undefined}useHostHover(t){const s=t.tagName.toLowerCase();if(s==="button"||s==="a"||s==="input"||s==="select"||s==="textarea"){return false}if(t.hasAttribute("tabindex")&&t.tabIndex>=0)return false;if(s.startsWith("md-"))return false;return true}updateTriggerAria(t){if(this.disabled){t.removeAttribute("aria-description");return}const s=this.computeDescription();if(s){t.setAttribute("aria-description",s)}else{t.removeAttribute("aria-description")}}computeDescription(){if(this.text)return this.text;if(this.subhead)return this.subhead;const t=[];for(const s of Array.from(this.el.children)){const i=s.getAttribute("slot");if(i==="subhead"||i==="content"){const i=(s.textContent||"").trim();if(i)t.push(i)}}return t.join(". ")}scheduleShow(){if(this.disabled||this.suppressed)return;this.clearTimers();this.showTimer=setTimeout((()=>{this.open=true}),this.showDelay)}scheduleHide(){this.clearTimers();this.hideTimer=setTimeout((()=>{this.open=false}),this.hideDelay)}getDeepActiveElement(){if(typeof document==="undefined")return null;let t=document.activeElement;while(t&&t.shadowRoot&&t.shadowRoot.activeElement)t=t.shadowRoot.activeElement;return t}addEscapeListener(){if(!this.escapeListenerBound){document.addEventListener("keydown",this.handleGlobalEscape,true);this.escapeListenerBound=true}}removeEscapeListener(){if(this.escapeListenerBound){document.removeEventListener("keydown",this.handleGlobalEscape,true);this.escapeListenerBound=false}}showTooltip(){if(this.disabled)return;if(!this.el.isConnected)return;this.isVisible=true;this.mdOpen.emit();this.addScrollListener();this.addEscapeListener();this.schedulePositionUpdate();this.startPositionWatchdog()}schedulePositionUpdate(t=0){requestAnimationFrame((()=>{const s=this.updatePosition();if(!s&&t<3){this.schedulePositionUpdate(t+1)}}))}startPositionWatchdog(){if(typeof requestAnimationFrame!=="function")return;this.stopPositionWatchdog();const t=()=>{if(!this.isVisible||!this.el.isConnected){this.watchdogFrame=0;return}const s=this.popupEl;if(s&&this.triggerEl){const t=s.offsetWidth;const i=s.offsetHeight;if(t!==0||i!==0){const e=this.getAnchorRect();const o=s.getBoundingClientRect();const n=this.lastGeom;const r=e.top!==n.at||e.left!==n.al||e.width!==n.aw||e.height!==n.ah||t!==n.pw||i!==n.ph||Math.abs(o.top-n.ey)>.5||Math.abs(o.left-n.ex)>.5||window.innerWidth!==n.vw||window.innerHeight!==n.vh;if(r)this.updatePosition()}}this.watchdogFrame=requestAnimationFrame(t)};this.watchdogFrame=requestAnimationFrame(t)}stopPositionWatchdog(){if(this.watchdogFrame&&typeof cancelAnimationFrame==="function"){cancelAnimationFrame(this.watchdogFrame)}this.watchdogFrame=0}hideTooltip(){if(!this.isVisible)return;this.isVisible=false;this.mdClose.emit();this.removeScrollListener();this.removeEscapeListener();this.stopPositionWatchdog()}clearTimers(){if(this.showTimer!=null){clearTimeout(this.showTimer);this.showTimer=undefined}if(this.hideTimer!=null){clearTimeout(this.hideTimer);this.hideTimer=undefined}}addScrollListener(){if(!this.scrollListenerBound){window.addEventListener("scroll",this.handleScroll,{capture:true,passive:true});this.scrollListenerBound=true}}removeScrollListener(){if(this.scrollListenerBound){window.removeEventListener("scroll",this.handleScroll,true);this.scrollListenerBound=false}}updatePosition(){if(!this.popupEl||!this.triggerEl)return false;const t=this.getAnchorRect();const s=this.popupEl.offsetWidth;const i=this.popupEl.offsetHeight;if(s===0&&i===0)return false;let e=this.physicalPlacement(this.position);if(this.autoPosition){e=this.findBestPlacement(t,s,i,e)}const o=this.calcCoords(t.width,t.height,s,i,e);if(e.startsWith("top")||e.startsWith("bottom")){o.left+=this.crossOffset}else{o.top+=this.crossOffset}if(this.autoPosition){const n=e.startsWith("top")||e.startsWith("bottom");const r=a;if(n){const i=t.left+o.left;const e=window.innerWidth-s-r;const n=Math.min(Math.max(i,r),Math.max(r,e));o.left+=n-i}else{const s=t.top+o.top;const e=window.innerHeight-i-r;const n=Math.min(Math.max(s,r),Math.max(r,e));o.top+=n-s}}const n=this.toFixedCoords(t.top+o.top,t.left+o.left);this.popupEl.style.top=`${n.top}px`;this.popupEl.style.left=`${n.left}px`;this.popupEl.style.insetBlockStart="";this.popupEl.style.insetInlineStart="";this.resolvedPlacement=e;this.lastGeom={at:t.top,al:t.left,aw:t.width,ah:t.height,pw:s,ph:i,vw:window.innerWidth,vh:window.innerHeight,ex:t.left+o.left,ey:t.top+o.top};return true}getAnchorRect(){if(this.triggerEl){const t=this.triggerEl.getBoundingClientRect();if(t.width>0||t.height>0)return t}return this.el.getBoundingClientRect()}toFixedCoords(t,s){const i=this.getFixedContainingBlock();if(!i){return{top:t,left:s}}const e=i.getBoundingClientRect();return{top:t-e.top,left:s-e.left}}createsFixedContainingBlock(t){const s=t;if(t.transform&&t.transform!=="none"||t.filter&&t.filter!=="none"||t.perspective&&t.perspective!=="none")return true;if(s.translate&&s.translate!=="none"||s.rotate&&s.rotate!=="none"||s.scale&&s.scale!=="none")return true;if(s.backdropFilter&&s.backdropFilter!=="none")return true;if(/\b(transform|perspective|filter|translate|rotate|scale)\b/.test(t.willChange||""))return true;if(/(layout|paint|strict|content)\b/.test(s.contain||""))return true;if(s.contentVisibility==="auto"||s.contentVisibility==="hidden")return true;if(s.containerType&&/\bsize\b/.test(s.containerType))return true;return false}getFixedContainingBlock(){let t=this.el;while(t){if(this.createsFixedContainingBlock(getComputedStyle(t))){return t}if(t.parentElement){t=t.parentElement}else if(t.parentNode instanceof ShadowRoot){t=t.parentNode.host}else{t=null}}return null}physicalPlacement(t){if(typeof window==="undefined")return t;const s=getComputedStyle(this.el).direction==="rtl";if(!s)return t;const[i,e=""]=[t.split("-")[0],t.split("-").slice(1).join("-")];const o=i==="left"?"right":i==="right"?"left":i;const n=i==="top"||i==="bottom"?e==="start"?"end":e==="end"?"start":e:e;return n?`${o}-${n}`:o}calcCoords(t,s,i,e,o){const n=this.offset;switch(o){case"top":return{top:-(e+n),left:(t-i)/2};case"top-start":return{top:-(e+n),left:0};case"top-end":return{top:-(e+n),left:t-i};case"bottom":return{top:s+n,left:(t-i)/2};case"bottom-start":return{top:s+n,left:0};case"bottom-end":return{top:s+n,left:t-i};case"left":return{top:(s-e)/2,left:-(i+n)};case"left-start":return{top:0,left:-(i+n)};case"left-end":return{top:s-e,left:-(i+n)};case"right":return{top:(s-e)/2,left:t+n};case"right-start":return{top:0,left:t+n};case"right-end":return{top:s-e,left:t+n};default:return{top:-(e+n),left:(t-i)/2}}}fitsMainAxis(t,s,i,e,o,n){const r=n.startsWith("top")||n.startsWith("bottom");if(r){const s=t.top+e;return s>=0&&s+i<=window.innerHeight}const a=t.left+o;return a>=0&&a+s<=window.innerWidth}getOppositePlacement(t){const[s,i]=[t.split("-")[0],t.split("-").slice(1).join("-")];const e={top:"bottom",bottom:"top",left:"right",right:"left"};return i?`${e[s]}-${i}`:e[s]}findBestPlacement(t,s,i,e){const o=e=>{const o=this.calcCoords(t.width,t.height,s,i,e);return this.fitsMainAxis(t,s,i,o.top,o.left,e)};if(o(e))return e;const n=this.getOppositePlacement(e);if(o(n))return n;const r=e.split("-")[1]||"";const a=["top","bottom","right","left"];for(const t of a){const s=r?`${t}-${r}`:t;if(s!==e&&s!==n&&o(s)){return s}}return e}render(){const t=this.variant==="rich";const s=!!this.subhead||this.hasSlottedSubhead;const i=this.hasSlottedActions;return o(n,{key:"18f4e3e81a7f3275e81c1a40859beab41f97104f",class:"md-tooltip-wrapper"},o("slot",{key:"ea0496dbcf3c70aad4cb72dbe3133dc97024ef30"}),o("div",{key:"8ed4c4183860370a72c9c5f14d1b9953acbf03aa",class:{"md-tooltip__popup":true,"md-tooltip__popup--plain":!t,"md-tooltip__popup--rich":t,"md-tooltip__popup--visible":this.isVisible,[`md-tooltip__popup--${this.resolvedPlacement}`]:true},id:this.tooltipId,role:"tooltip",part:"popup","aria-hidden":this.isVisible?"false":"true",ref:t=>this.popupEl=t,onMouseEnter:this.handlePopupEnter,onMouseLeave:this.handlePopupLeave},t?[s&&o("div",{class:"md-tooltip__subhead",part:"subhead",key:"subhead"},o("slot",{name:"subhead"},this.subhead)),o("div",{class:"md-tooltip__supporting-text",part:"supporting-text",key:"text"},o("slot",{name:"content"},this.text)),o("div",{class:{"md-tooltip__actions":true,"md-tooltip__actions--empty":!i},part:"actions",key:"actions"},o("slot",{name:"actions"}))]:o("span",{class:"md-tooltip__text",part:"text"},this.text)))}get el(){return this}static get watchers(){return{open:[{onOpenChange:0}],disabled:[{onDisabledChange:0}],text:[{onDescriptionChange:0}],subhead:[{onDescriptionChange:0}]}}static get style(){return r()}},[257,"md-tooltip",{text:[1],subhead:[1],variant:[513],position:[1],autoPosition:[4,"auto-position"],offset:[2],crossOffset:[2,"cross-offset"],open:[1540],showDelay:[2,"show-delay"],hideDelay:[2,"hide-delay"],disabled:[516],density:[514],isVisible:[32],resolvedPlacement:[32],hasSlottedActions:[32],hasSlottedSubhead:[32],show:[64],hide:[64]},undefined,{open:[{onOpenChange:0}],disabled:[{onDisabledChange:0}],text:[{onDescriptionChange:0}],subhead:[{onDescriptionChange:0}]}]);function l(){if(typeof customElements==="undefined"){return}const s=["md-tooltip"];s.forEach((s=>{switch(s){case"md-tooltip":if(!customElements.get(t(s))){customElements.define(t(s),h)}break}}))}l();export{h as M,l as d};
2
- //# sourceMappingURL=p-BUYYCrGa.js.map
@@ -1,2 +0,0 @@
1
- import{t as e,p as o,H as i,c as a,h as r,d as t}from"./p-MWBNn6Lj.js";import{t as s}from"./p-DYBUr7K_.js";import{d as n}from"./p-JbwZ84YK.js";const c=()=>`:host{--_container-color:var(--md-chip-container-color, transparent);--_container-color-selected:var(--md-chip-container-color-selected, var(--md-sys-color-secondary-container));--_label-color:var(--md-chip-label-color, var(--md-sys-color-on-surface-variant));--_label-color-selected:var(--md-chip-label-color-selected, var(--md-sys-color-on-secondary-container));--_icon-color:var(--md-chip-icon-color, var(--md-sys-color-primary));--_icon-size:var(--md-chip-icon-size, max(14px, calc(18px + var(--md-sys-density-scale, 0) * 1px)));--_container-shape:var(--md-chip-container-shape, var(--md-sys-shape-corner-small, 8px));--_container-height:var(--md-chip-container-height, 32px);--_outline-color:var(--md-chip-outline-color, var(--md-sys-color-outline));--_outline-width:var(--md-chip-outline-width, 1px);--_state-layer-color:var(--md-chip-state-layer-color, var(--md-sys-color-on-surface));--_elevation:var(--md-chip-elevation, var(--md-sys-elevation-0, none));--_c-main:var(--md-sys-color-primary);--_c-on-main:var(--md-sys-color-on-primary);--_c-container:var(--md-sys-color-secondary-container);--_c-on-container:var(--md-sys-color-on-secondary-container);--_padding-inline:var(--md-sys-spacing-inset-lg, 16px);--_gap:var(--md-sys-spacing-gap-sm, 8px);display:inline-flex;align-items:center;justify-content:center;position:relative;box-sizing:border-box;block-size:max(24px, calc(var(--_container-height) + var(--md-sys-density-scale, 0) * 4px));padding-inline:var(--_padding-inline);gap:var(--_gap);background-color:var(--_container-color);border-radius:var(--_container-shape);box-shadow:var(--_elevation);cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent;overflow:hidden;font-family:var(--md-sys-typescale-label-large-font-family, Roboto, sans-serif);font-size:max(11px, calc(14px + var(--md-sys-density-scale, 0) * 0.5px));font-weight:var(--md-sys-typescale-label-large-font-weight, 500);line-height:max(16px, calc(20px + var(--md-sys-density-scale, 0) * 1px));letter-spacing:var(--md-sys-typescale-label-large-letter-spacing, 0.1px);color:var(--_label-color);transition:background-color var(--md-sys-motion-duration-short2, 200ms) var(--md-sys-motion-easing-standard, cubic-bezier(0.2, 0, 0, 1)), box-shadow var(--md-sys-motion-duration-short2, 200ms) var(--md-sys-motion-easing-standard, cubic-bezier(0.2, 0, 0, 1)), color var(--md-sys-motion-duration-short2, 200ms) var(--md-sys-motion-easing-standard, cubic-bezier(0.2, 0, 0, 1))}:host(.md-chip--with-leading-icon){padding-inline-start:var(--md-sys-spacing-inset-sm, 8px)}:host(.md-chip--with-trailing-icon){padding-inline-end:var(--md-sys-spacing-inset-sm, 8px)}:host(.md-chip--assist){--_icon-color:var(--md-chip-icon-color, var(--md-sys-color-primary));--_label-color:var(--md-chip-label-color, var(--md-sys-color-on-surface))}:host(.md-chip--filter){--_icon-color:var(--md-chip-icon-color, var(--md-sys-color-on-surface-variant));--_label-color:var(--md-chip-label-color, var(--md-sys-color-on-surface-variant))}:host(.md-chip--input){--_outline-color:var(--md-chip-outline-color, var(--md-sys-color-outline-variant));--_icon-color:var(--md-chip-icon-color, var(--md-sys-color-on-surface-variant));--_label-color:var(--md-chip-label-color, var(--md-sys-color-on-surface-variant))}:host(.md-chip--suggestion){--_icon-color:var(--md-chip-icon-color, var(--md-sys-color-on-surface-variant));--_label-color:var(--md-chip-label-color, var(--md-sys-color-on-surface-variant))}:host(.md-chip--selected){--_container-color:var(--_container-color-selected);color:var(--_label-color-selected);--_icon-color:var(--md-chip-icon-color, var(--md-sys-color-on-secondary-container));--_state-layer-color:var(--md-sys-color-on-secondary-container)}:host(.md-chip--selected) .md-chip__outline{border-color:transparent}:host(.md-chip--elevated){--_elevation:var(--md-chip-elevation, var(--md-sys-elevation-1))}:host(.md-chip--elevated) .md-chip__outline{border-color:transparent}:host(.md-chip--elevated.md-chip--selected){--_elevation:var(--md-chip-elevation, var(--md-sys-elevation-1))}:host(.md-chip--appearance-outlined[color]){--_outline-color:var(--md-chip-outline-color, var(--_c-main));--_label-color:var(--md-chip-label-color, var(--_c-main));--_icon-color:var(--md-chip-icon-color, var(--_c-main));--_state-layer-color:var(--md-chip-state-layer-color, var(--_c-main))}:host(.md-chip--appearance-filled),:host(.md-chip--appearance-elevated){--_container-color:var(--md-chip-container-color, var(--md-sys-color-surface-container-high));--_label-color:var(--md-chip-label-color, var(--md-sys-color-on-surface-variant));--_icon-color:var(--md-chip-icon-color, var(--md-sys-color-on-surface-variant))}:host(.md-chip--appearance-filled[color]),:host(.md-chip--appearance-elevated[color]){--_container-color:var(--md-chip-container-color, var(--_c-container));--_label-color:var(--md-chip-label-color, var(--_c-on-container));--_icon-color:var(--md-chip-icon-color, var(--_c-on-container));--_state-layer-color:var(--md-chip-state-layer-color, var(--_c-on-container))}:host(.md-chip--appearance-filled) .md-chip__outline,:host(.md-chip--appearance-elevated) .md-chip__outline{border-color:transparent}:host(.md-chip--selected[color]){--_container-color:var(--_c-container);color:var(--_c-on-container);--_label-color-selected:var(--_c-on-container);--_icon-color:var(--md-chip-icon-color, var(--_c-on-container));--_state-layer-color:var(--_c-on-container)}.md-chip__outline{position:absolute;inset:0;border-radius:inherit;border:var(--_outline-width) solid var(--_outline-color);pointer-events:none}.md-chip__state-layer{position:absolute;inset:0;border-radius:inherit;background-color:var(--_state-layer-color);opacity:0;transition:opacity var(--md-sys-motion-duration-short1, 100ms) var(--md-sys-motion-easing-standard, cubic-bezier(0.2, 0, 0, 1));pointer-events:none;z-index:1}:host(:hover) .md-chip__state-layer{opacity:var(--md-sys-state-hover-state-layer-opacity, 0.08)}:host(:focus-visible) .md-chip__state-layer{opacity:var(--md-sys-state-focus-state-layer-opacity, 0.12)}:host(:active) .md-chip__state-layer{opacity:var(--md-sys-state-pressed-state-layer-opacity, 0.12)}:host(:focus-visible){outline:3px solid var(--md-sys-color-secondary);outline-offset:2px}.md-chip__primary{position:absolute;inset:0;z-index:2;margin:0;padding:0;border:none;background:none;border-radius:inherit;cursor:inherit;-webkit-tap-highlight-color:transparent}.md-chip__primary:focus-visible{outline:3px solid var(--md-sys-color-secondary);outline-offset:-3px}.md-chip__label{position:relative;z-index:2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:start}.md-chip__icon,.md-chip__trailing-icon{position:relative;z-index:2;font-family:var(--md-sys-icon-font-family, 'Material Symbols Outlined', 'Material Icons');font-size:var(--_icon-size);inline-size:var(--_icon-size);block-size:var(--_icon-size);color:var(--_icon-color);line-height:1;font-weight:normal;font-style:normal;letter-spacing:normal;text-transform:none;white-space:nowrap;overflow-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;pointer-events:none;flex-shrink:0}slot[name="leading-icon"],slot[name="trailing-icon"]{display:contents}::slotted([slot="leading-icon"]),::slotted([slot="trailing-icon"]){display:inline-flex;align-items:center;justify-content:center;inline-size:var(--_icon-size);block-size:var(--_icon-size);font-size:var(--_icon-size);color:var(--_icon-color);fill:currentColor;pointer-events:none;flex-shrink:0;position:relative;z-index:2}.md-chip__checkmark{position:relative;z-index:2;display:inline-flex;align-items:center;justify-content:center;inline-size:var(--_icon-size);block-size:var(--_icon-size);color:var(--_icon-color);flex-shrink:0}.md-chip__checkmark svg{inline-size:var(--_icon-size);block-size:var(--_icon-size)}.md-chip__remove{position:relative;z-index:2;display:inline-flex;align-items:center;justify-content:center;min-inline-size:18px;min-block-size:18px;padding:0;border:none;background:none;color:var(--_icon-color);cursor:pointer;border-radius:50%;flex-shrink:0;-webkit-tap-highlight-color:transparent}.md-chip__remove:focus-visible{outline:2px solid var(--md-sys-color-secondary);outline-offset:1px}.md-chip__remove svg{inline-size:var(--_icon-size);block-size:var(--_icon-size);pointer-events:none}.md-chip__remove:disabled{cursor:default;pointer-events:none}:host(.md-chip--disabled){cursor:default;pointer-events:none;color:color-mix(in srgb, var(--md-sys-color-on-surface) calc(var(--md-sys-state-disabled-content-opacity, 0.38) * 100%), transparent);--_icon-color:color-mix(in srgb, var(--md-sys-color-on-surface) calc(var(--md-sys-state-disabled-content-opacity, 0.38) * 100%), transparent);--_elevation:var(--md-sys-elevation-0, none) !important}:host(.md-chip--disabled:not(.md-chip--selected):not(.md-chip--elevated)) .md-chip__outline{border-color:color-mix(in srgb, var(--md-sys-color-on-surface) calc(var(--md-sys-state-disabled-container-opacity, 0.12) * 100%), transparent)}:host(.md-chip--disabled.md-chip--selected){--_container-color:color-mix(in srgb, var(--md-sys-color-on-surface) calc(var(--md-sys-state-disabled-container-opacity, 0.12) * 100%), transparent)}:host(.md-chip--disabled.md-chip--elevated:not(.md-chip--selected)){--_container-color:color-mix(in srgb, var(--md-sys-color-on-surface) calc(var(--md-sys-state-disabled-container-opacity, 0.12) * 100%), transparent)}:host(.md-chip--disabled:hover) .md-chip__state-layer,:host(.md-chip--disabled:active) .md-chip__state-layer,:host(.md-chip--disabled:focus-visible) .md-chip__state-layer{opacity:0}:host([soft-disabled]){cursor:default;pointer-events:auto;color:color-mix(in srgb, var(--md-sys-color-on-surface) calc(var(--md-sys-state-disabled-content-opacity, 0.38) * 100%), transparent);--_icon-color:color-mix(in srgb, var(--md-sys-color-on-surface) calc(var(--md-sys-state-disabled-content-opacity, 0.38) * 100%), transparent);--_elevation:var(--md-sys-elevation-0, none) !important}:host([soft-disabled]) .md-chip__state-layer{display:none}@media (prefers-reduced-motion: reduce){:host{transition:none}.md-chip__state-layer{transition:none}}@media (forced-colors: active){:host{border:1px solid ButtonText;background-color:ButtonFace;color:ButtonText;forced-color-adjust:none}.md-chip__outline{border-color:ButtonText}:host(:focus-visible){outline-color:Highlight}.md-chip__primary:focus-visible{outline-color:Highlight}:host(.md-chip--selected){background-color:Highlight;color:HighlightText}:host(.md-chip--disabled){border-color:GrayText;color:GrayText;opacity:1}.md-chip__state-layer{display:none}}:host([density='-1']){--md-sys-density-scale:-1}:host([density='-2']){--md-sys-density-scale:-2}:host([density='-3']){--md-sys-density-scale:-3}:host([density='-4']){--md-sys-density-scale:-4}`;const l=o(class e extends i{constructor(e){super();if(e!==false){this.__registerHost()}this.__attachShadow();this.mdClick=a(this,"mdClick",7);this.mdSelect=a(this,"mdSelect",7);this.mdRemove=a(this,"mdRemove",7);this.variant="assist";this.icon="";this.trailingIcon="";this.selected=false;this.appearance="outlined";this.elevated=false;this.disabled=false;this.softDisabled=false;this.label="";this.density=0;this.hasSlottedLeadingIcon=false;this.hasSlottedTrailingIcon=false;this.handleClick=e=>{if(this.isDisabled){e.preventDefault();return}if(this.isSelectable){this.selected=!this.selected;this.mdSelect.emit({selected:this.selected})}this.mdClick.emit()};this.handleKeyDown=e=>{if(this.isDisabled)return;if(e.key==="Enter"||e.key===" "){e.preventDefault();s(this.el);this.el.click();return}if(this.isRemovable&&(e.key==="Delete"||e.key==="Backspace")){e.preventDefault();this.dispatchRemove()}};this.handleRemoveClick=e=>{e.stopPropagation();if(this.isDisabled)return;this.dispatchRemove()};this.handleRemoveKeyDown=e=>{if(this.isDisabled)return;if(e.key==="Enter"||e.key===" "){e.stopPropagation();e.preventDefault();this.dispatchRemove()}}}get isDisabled(){return this.disabled||this.softDisabled}get colorVars(){const e=this.color;if(!e||!/^[a-z][a-z0-9-]*$/i.test(e))return undefined;return{"--_c-main":`var(--md-sys-color-${e}, var(--md-sys-color-primary))`,"--_c-on-main":`var(--md-sys-color-on-${e}, var(--md-sys-color-on-primary))`,"--_c-container":`var(--md-sys-color-${e}-container, var(--md-sys-color-secondary-container))`,"--_c-on-container":`var(--md-sys-color-on-${e}-container, var(--md-sys-color-on-secondary-container))`}}get effectiveAppearance(){return this.elevated?"elevated":this.appearance}get isSelectable(){if(this.selectable!==undefined)return this.selectable;return this.variant==="filter"||this.variant==="input"}get isInteractiveHost(){return!(this.selectable===false&&this.isRemovable)}get isRemovable(){if(this.removable===true)return true;if(this.removable===false)return false;return this.variant==="input"}get accessibleLabel(){return this.label||this.el.textContent?.trim()||""}componentDidLoad(){const e=this.el.shadowRoot;if(!e)return;const o=e.querySelector('slot[name="leading-icon"]');const i=e.querySelector('slot[name="trailing-icon"]');o?.addEventListener("slotchange",(()=>{this.hasSlottedLeadingIcon=o.assignedElements().length>0}));i?.addEventListener("slotchange",(()=>{this.hasSlottedTrailingIcon=i.assignedElements().length>0}))}dispatchRemove(){const e=this.mdRemove.emit();if(!e.defaultPrevented){this.el.remove()}}render(){const e=!!this.icon||this.hasSlottedLeadingIcon;const o=!!this.trailingIcon||this.hasSlottedTrailingIcon;const i=this.variant==="filter"&&this.selected&&!e;const a=this.isRemovable;const s=this.isDisabled;const n=this.accessibleLabel;const c=this.isInteractiveHost&&!a;const l=this.isInteractiveHost&&a;return r(t,{key:"ac377a67d3c9c5e464f9cc30cada24b9c9f2e848",style:this.colorVars,class:{"md-chip":true,[`md-chip--${this.variant}`]:true,"md-chip--selected":this.selected&&this.isSelectable,[`md-chip--appearance-${this.effectiveAppearance}`]:true,"md-chip--elevated":this.effectiveAppearance==="elevated",[`md-chip--color-${this.color}`]:!!this.color,"md-chip--disabled":s,"md-chip--with-leading-icon":e||i,"md-chip--with-trailing-icon":o||a},role:c?"button":"group","aria-roledescription":"chip","aria-pressed":c&&this.isSelectable?String(this.selected):undefined,"aria-label":c?undefined:n||undefined,"aria-disabled":s?"true":undefined,tabindex:c?this.disabled?"-1":"0":undefined,onClick:this.handleClick,onKeyDown:this.handleKeyDown},r("md-ripple",{key:"71ddc00b4e7f72a93b9356f647b3630aa50380a3",disabled:s}),r("span",{key:"6eab2a000c1543bb6957c175cfb33cbb06d3f345",class:"md-chip__state-layer",part:"state-layer","aria-hidden":"true"}),!this.elevated&&r("span",{key:"ee96614931899684057f77b1bed36c315964fdca",class:"md-chip__outline",part:"outline","aria-hidden":"true"}),l&&r("span",{key:"f0743bfa4bc9b7c6cf7d357c000426f1e5f3b108",class:"md-chip__primary",part:"primary",role:"button",tabindex:this.disabled?"-1":"0","aria-labelledby":"md-chip-label-text","aria-pressed":this.isSelectable?String(this.selected):undefined,"aria-disabled":s?"true":undefined}),i&&r("span",{key:"c15afa18cc1fa1e956c1dcf3c0806d7b065620b0",class:"md-chip__checkmark",part:"checkmark","aria-hidden":"true"},r("svg",{key:"1e7a5eb1ec44df6efd803543e943889bff65e1e8",viewBox:"0 0 18 18",fill:"none"},r("path",{key:"3d36f6406d5bce2e0b7fb71f25b9a6142cc88b3b",d:"M6.75 12.127L3.623 9l-1.06 1.057L6.75 14.25l9-9-1.057-1.057L6.75 12.127z",fill:"currentColor"}))),r("slot",{key:"9dd3792251fc0f43baa3e3b0787fbbf7967cfc2b",name:"leading-icon"},e&&!i&&r("span",{key:"0078163a6741535eef3c413559d8cc9a4b7dbbc2",class:"md-chip__icon material-symbols-outlined",part:"icon","aria-hidden":"true"},this.icon)),r("span",{key:"bae9ed93b4ba0e8dda2e9d0fbae102405fbdaeae",class:"md-chip__label",part:"label",id:"md-chip-label-text"},r("slot",{key:"9f36d159a093aaa93e3c4867e7bbf7a5543fcebd"},this.label)),a?r("button",{class:"md-chip__remove",part:"remove",type:"button",tabindex:this.disabled?"-1":"0","aria-label":n?`Remove ${n}`:"Remove",disabled:s,onClick:this.handleRemoveClick,onKeyDown:this.handleRemoveKeyDown},r("slot",{name:"trailing-icon"},r("svg",{viewBox:"0 0 18 18",fill:"none","aria-hidden":"true"},r("path",{d:"M14.25 4.808l-1.058-1.058L9 7.942 4.808 3.75 3.75 4.808 7.942 9 3.75 13.192l1.058 1.058L9 10.058l4.192 4.192 1.058-1.058L10.058 9l4.192-4.192z",fill:"currentColor"})))):r("slot",{name:"trailing-icon"},o&&r("span",{class:"md-chip__trailing-icon material-symbols-outlined",part:"trailing-icon","aria-hidden":"true"},this.trailingIcon)))}get el(){return this}static get style(){return c()}},[257,"md-chip",{variant:[513],icon:[1],trailingIcon:[1,"trailing-icon"],selected:[1540],selectable:[4],appearance:[513],color:[513],elevated:[516],disabled:[516],softDisabled:[516,"soft-disabled"],removable:[516],label:[1],density:[514],hasSlottedLeadingIcon:[32],hasSlottedTrailingIcon:[32]}]);function d(){if(typeof customElements==="undefined"){return}const o=["md-chip","md-ripple"];o.forEach((o=>{switch(o){case"md-chip":if(!customElements.get(e(o))){customElements.define(e(o),l)}break;case"md-ripple":if(!customElements.get(e(o))){n()}break}}))}d();export{l as M,d};
2
- //# sourceMappingURL=p-BXwh1zjF.js.map
@@ -1,2 +0,0 @@
1
- import{t,p as s,H as i,c as e,f as a,h as n,d as r}from"./p-MWBNn6Lj.js";import{V as o,i as l,n as h,r as d,c,l as m}from"./p-BEWIC0pC.js";import{s as p,a as u,g as f,c as g,r as y}from"./p-DWxN44zD.js";import{p as b}from"./p-CxhZdOPw.js";import{d as x}from"./p-Bx5sxRqa.js";import{d as _}from"./p-DGGkdSZk.js";import{d as v}from"./p-G5m2pHZ2.js";import{d as w}from"./p-CJdqKSuf.js";import{d as k}from"./p-CrlkPxeB.js";import{d as z}from"./p-JbwZ84YK.js";import{d as C}from"./p-pDrTJmeT.js";const V=()=>`:host{--md-text-field-padding-inline-end:var(--md-sys-spacing-inset-lg, 16px);display:inline-block;inline-size:var(--md-select-width, 100%);min-inline-size:var(--md-select-min-width, 0);box-sizing:border-box;font-family:var(--md-sys-typescale-body-large-font-family, Roboto, sans-serif)}.md-select__field{inline-size:100%;cursor:pointer;--md-text-field-cursor:pointer}.md-select__field::part(input){cursor:pointer}:host(.md-select--disabled) .md-select__field::part(input){cursor:not-allowed}.md-select__field .md-select__trailing{display:inline-flex;align-items:center;gap:var(--md-select-trailing-gap, 2px);width:auto;height:auto}.md-select__caret{font-size:var(--md-select-caret-size, 24px);line-height:1;color:var(--md-select-caret-color, var(--md-sys-color-on-surface-variant, #49454F));transition:transform var(--md-sys-motion-duration-short4, 200ms) var(--md-sys-motion-easing-standard, cubic-bezier(0.2, 0, 0, 1))}:host(.md-select--open) .md-select__caret{transform:rotate(180deg)}@media (prefers-reduced-motion: reduce){.md-select__caret{transition:none}}.md-select__loader{display:inline-flex;align-items:center;justify-content:center;inline-size:24px;block-size:24px;--md-loading-indicator-size:var(--md-select-spinner-size, 22px);--md-loading-indicator-shape-size:var(--md-select-spinner-size, 22px)}:host([full-width]){display:block;inline-size:100%}.md-select__loading{display:flex;align-items:center;padding-block:var(--md-sys-spacing-inset-lg, 16px);padding-inline:var(--md-sys-spacing-inset-lg, 16px)}.md-select__loading md-progress-indicator{inline-size:100%}.md-select__field .md-select__clear{--_clear-color:var(--md-select-clear-color, var(--md-select-caret-color, var(--md-sys-color-on-surface-variant, #49454F)));--md-icon-button-container-width:24px;--md-icon-button-container-height:24px;--md-icon-button-icon-size:18px;--md-icon-button-icon-color:var(--_clear-color);--md-icon-button-state-layer-color:var(--_clear-color)}.md-select__option-icon{font-size:20px;line-height:1;color:var(--md-select-option-icon-color, var(--md-sys-color-on-surface-variant, #49454F))}:host(.md-select--disabled){cursor:default}:host(.md-select--disabled) .md-select__field{--md-text-field-cursor:not-allowed}.material-symbols-outlined{font-family:var(--md-sys-icon-font-family, 'Material Symbols Outlined', 'Material Icons');font-weight:normal;font-style:normal;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;overflow-wrap:normal;direction:ltr;font-feature-settings:'liga';-webkit-font-smoothing:antialiased}.md-select__vspacer{display:block;flex:none;pointer-events:none}.md-select__search-wrap{position:relative;display:block}.md-select__search{box-sizing:border-box;width:100%;border:none;outline:none;padding:12px 44px 12px 16px;font:inherit;color:var(--md-sys-color-on-surface, #1d1b20);background:var(--md-sys-color-surface-container, #f3edf7);border-bottom:1px solid var(--md-sys-color-outline-variant, #cac4d0)}.md-select__search::placeholder{color:var(--md-sys-color-on-surface-variant, #49454f)}.md-select__search-spinner{position:absolute;inset-block-start:50%;inset-inline-end:12px;margin-block-start:-12px;--md-loading-indicator-size:24px;--md-loading-indicator-shape-size:18px;pointer-events:none}:host([density='-1']){--md-sys-density-scale:-1}:host([density='-2']){--md-sys-density-scale:-2}:host([density='-3']){--md-sys-density-scale:-3}:host([density='-4']){--md-sys-density-scale:-4}`;let M=0;const O=200;const T=180;const $=s(class t extends i{constructor(t){super();if(t!==false){this.__registerHost()}this.__attachShadow();this.mdChange=e(this,"mdChange",7);this.mdOpen=e(this,"mdOpen",7);this.mdClose=e(this,"mdClose",7);this.mdValidityChange=e(this,"mdValidityChange",5);this.internals=this.attachInternals();this.valueMissingLabel="Please select an item in the list.";this.reserveSupportingSpace=false;this.customValidityMessage="";this.variant="outlined";this.label="";this.placeholder="";this.value="";this.disabled=false;this.required=false;this.error=false;this.errorText="";this.supportingText="";this.density=0;this.clearable=false;this.matchTriggerWidth=true;this.placement="bottom-start";this.options=[];this.virtualize="auto";this.filterable=false;this.filterMode="substring";this.name="";this.searchPlaceholder="Search…";this.filterLabel="";this.noResultsText="No results";this.noOptionsText="No options";this.clearLabel="Clear selection";this.searchingLabel="Searching";this.loadingText="Loading…";this.clearIcon="close";this.dropdownIcon="arrow_drop_down";this.loading=false;this.fullWidth=false;this.open=false;this.optionsData=[];this.triggerId=`md-select-${++M}`;this.vc=new o({queryItem:t=>this.el.shadowRoot?.querySelector(`md-menu-item[data-vindex="${t}"]`)??null,requestRender:()=>a(this)});this.providerSet=false;this.selectedLabel="";this.query="";this.searching=false;this.queryText=null;this.defaultValue="";this.lastValidityKey=null;this._syncGuard=false;this._lastEmit=null;this.toggleOpen=()=>{if(this.disabled)return;this.open=!this.open};this.selectValue=t=>{if(this.value===t){this.open=false;return}this.value=t;this.mdChange.emit(t);this.open=false;this.fieldEl?.focus?.()};this.clearValue=t=>{t.stopPropagation();if(this.disabled||!this.value)return;this.value="";this.mdChange.emit("")};this.vpWired=false;this.handleMenuOpen=()=>{this._syncGuard=true;this.open=true;this._syncGuard=false;if(this._lastEmit!=="open"){this._lastEmit="open";this.mdOpen.emit()}if(this.vc.active){this.wireViewport();if(this.filterable){requestAnimationFrame((()=>{const t=this.el.shadowRoot?.querySelector(".md-select__search");t?.focus();void this.menuEl?.setComboboxElement?.(t)}))}}};this.handleMenuClose=()=>{this._syncGuard=true;this.open=false;this._syncGuard=false;if(this.query)this.query="";if(this._lastEmit!=="close"){this._lastEmit="close";this.mdClose.emit()}void this.menuEl?.setComboboxElement?.(null);this.vc.detachViewport();this.vpWired=false};this.onSearchInput=t=>{const s=t.target.value;this.queryText=null;if(!this.vc.active){this.query=s;return}if(!this.searching){this.searching=true;a(this)}clearTimeout(this.searchDebounce);this.searchDebounce=setTimeout((()=>{this.vc.setQuery(s);this.searching=false;a(this)}),T)}}get optionList(){return b(this.options,"md-select","options")}async show(){if(this.disabled)return;this.open=true}async close(){this.open=false}async focusTrigger(){this.fieldEl?.focus?.()}async reset(){if(!this.value)return;this.value="";this.mdChange.emit("")}async loadOptions(t){if(this.virtualize==="never"||!l()){this.vc.reset();this.optionsData=h(d(t));return}this.optionsData=[];this.vc.setFixedRowHeight(this.rowHeight);this.vc.setFilterMode(this.filterMode);const s=await this.vc.load(t);if(!s){this.vc.reset();this.optionsData=h(d(t))}else{this.updateSelectedLabel()}a(this)}async setQuery(t){this.vc.setQuery(t);if(!this.vc.active)this.query=t;this.queryText=t;this.syncSearchField();a(this)}syncSearchField(){if(this.queryText===null)return;const t=this.el.shadowRoot?.querySelector(".md-select__search");if(!t)return;t.value=this.queryText;this.queryText=null}async getLabels(t){return Object.fromEntries(this.vc.getLabels(t))}componentWillLoad(){this.refreshOptions();if(!this.value){const t=this.optionsData.find((t=>t.selected&&!t.disabled));if(t)this.value=t.value}this.defaultValue=this.value;this.syncFormValue()}syncFormValue(){p(this.internals,this.value||null);this.updateSelectedLabel();this.syncValidity()}syncValidity(){u(this.internals,{missing:this.required&&!this.value,missingMessage:this.valueMissingLabel,customMessage:this.customValidityMessage});this.emitValidityChange()}async getValidity(){return f(this.internals)}emitValidityChange(){const t=f(this.internals);const s=`${t.valid}|${t.validationMessage}`;if(this.lastValidityKey===s)return;const i=this.lastValidityKey!==null;this.lastValidityKey=s;if(i)this.mdValidityChange.emit(t)}async checkValidity(){return g(this.internals)}async reportValidity(){return y(this.internals)}async setCustomValidity(t){this.customValidityMessage=t;this.syncValidity()}formResetCallback(){this.value=this.defaultValue}refreshOptions(){const t=c(this.el,this.optionList);const s=this.virtualize==="always"||this.virtualize==="auto"&&t.length>O;if(s&&l()&&t.length>0){this.optionsData=[];this.vc.setFixedRowHeight(this.rowHeight);this.vc.setFilterMode(this.filterMode);void this.vc.load(t).then((s=>{if(!s){this.optionsData=t;a(this)}else{this.updateSelectedLabel()}}))}else{this.vc.reset();this.optionsData=t}}updateSelectedLabel(){if(!this.value){this.selectedLabel=""}else if(this.vc.active){this.selectedLabel=this.vc.getLabels([this.value]).get(this.value)??this.selectedLabel}a(this)}onOptionChange(t){t.stopPropagation();this.refreshOptions()}syncMenu(t){if(this._syncGuard||!this.menuEl)return;if(t){this.menuEl.show?.({autoFocus:!(this.filterable&&this.vc.active)})}else{this.menuEl.close?.()}}handleKeyDown(t){if(this.disabled)return;if(!this.open&&(t.key==="ArrowDown"||t.key==="Enter"||t.key===" ")){t.preventDefault();this.open=true}else if(this.open&&t.key==="Escape"){t.preventDefault();this.open=false;this.fieldEl?.focus?.()}}wireViewport(){void(async()=>{const t=await(this.menuEl?.getScrollViewport?.())??null;if(!t||this.vpWired)return;this.vpWired=true;await this.vc.attachViewport((async()=>t))})()}componentDidRender(){this.syncSearchField();if(!this.menuEl)return;if(this.vc.active&&!this.providerSet){void this.menuEl.setVirtualProvider?.(this.vc.provider);this.providerSet=true}else if(!this.vc.active&&this.providerSet){void this.menuEl.setVirtualProvider?.(null);this.providerSet=false}if(this.open&&this.vc.active&&!this.vpWired)this.wireViewport()}disconnectedCallback(){clearTimeout(this.searchDebounce);this.vc.detachViewport()}get accessibleName(){if(this.label)return this.label;const t=this.el.getAttribute("aria-label");if(t&&t.trim())return t.trim();const s=this.el.getAttribute("aria-labelledby");if(s){const t=this.el.getRootNode();const i=s.trim().split(/\s+/).map((s=>t.getElementById?.(s)?.textContent?.trim()??"")).filter(Boolean).join(" ");if(i)return i}return""}renderTrigger(){const t=this.vc.active?this.selectedLabel:m(this.optionsData,this.value);const s=!!this.value&&!!t;const i=this.clearable&&s&&!this.disabled;const e=this.label?undefined:this.accessibleName||undefined;return n("md-text-field",{ref:t=>this.fieldEl=t,id:this.triggerId,class:"md-select__field",part:"field",exportparts:"container:field-container",variant:this.variant,label:this.label,"aria-label":e,placeholder:s?"":this.placeholder,value:t,readOnly:true,disabled:this.disabled,required:this.required,error:this.error,errorText:this.errorText,reserveSupportingSpace:this.reserveSupportingSpace,supportingText:this.supportingText,density:this.density,appearFocused:this.open,onClick:this.toggleOpen},n("span",{slot:"trailing-icon",class:"md-select__trailing",part:"trailing","aria-hidden":"true"},this.loading?n("span",{class:"md-select__loader",part:"loading-spinner"},n("slot",{name:"loader"},n("md-loading-indicator",{label:this.loadingText}))):[i&&n("md-icon-button",{class:"md-select__clear",part:"clear",size:"xs",icon:this.clearIcon,"aria-label":this.clearLabel,shapeMorph:false,groupTabindex:-1,onClick:this.clearValue}),n("span",{class:"md-select__caret material-symbols-outlined",part:"caret"},n("slot",{name:"dropdown-icon"},this.dropdownIcon))]))}renderVirtualOptions(){return n("div",{class:"md-select__listbox",role:"listbox",id:`${this.triggerId}-listbox`,"aria-label":this.accessibleName||"Options"},n("div",{class:"md-select__vspacer",style:{height:`${this.vc.topPad}px`},"aria-hidden":"true"}),this.vc.windowRows.map(((t,s)=>{const i=this.vc.windowStart+s;const e=t.value===this.value;return n("md-menu-item",{key:t.index,id:`${this.triggerId}-opt-${i}`,"data-vindex":i,presentation:"option",type:"radio","check-position":"start","keep-open":true,part:e?"option option-selected":"option",disabled:t.disabled,selected:e,headline:t.label,"supporting-text":t.supportingText||"","aria-setsize":this.vc.filteredLength,"aria-posinset":i+1,onMdClick:()=>this.selectValue(t.value)},t.icon?n("span",{slot:"leading-icon",part:"option-icon",class:"material-symbols-outlined md-select__option-icon","aria-hidden":"true"},t.icon):null,t.label)})),n("div",{class:"md-select__vspacer",style:{height:`${this.vc.bottomPad}px`},"aria-hidden":"true"}))}renderMenu(){const t=this.vc.active;const s=this.filterable&&!t?this.query.trim().toLowerCase():"";const i=s?this.optionsData.filter((t=>t.label.toLowerCase().includes(s)||(t.supportingText||"").toLowerCase().includes(s))):this.optionsData;const e=this.loading?"":t?this.vc.filteredLength===0?this.noResultsText:"":this.optionsData.length===0?this.noOptionsText:s&&i.length===0?this.noResultsText:"";const a=t?this.maxHeight??320:this.maxHeight;return n("md-menu",{ref:t=>this.menuEl=t,anchor:this.triggerId,placement:this.placement,"match-anchor-width":this.matchTriggerWidth||this.fullWidth,"max-height":a,"empty-text":e,listbox:true,"list-label":this.accessibleName||"Options",part:"menu",onMdOpen:this.handleMenuOpen,onMdClose:this.handleMenuClose},this.filterable&&!this.loading&&n("div",{slot:"header",class:"md-select__search-wrap",part:"search-wrap"},n("input",{class:"md-select__search",part:"search",type:"text",role:"combobox","aria-haspopup":"listbox","aria-expanded":String(this.open),"aria-controls":`${this.triggerId}-listbox`,"aria-autocomplete":"list",autocomplete:"off",placeholder:this.searchPlaceholder,"aria-label":this.filterLabel||(this.label?`Filter ${this.label}`:"Filter options"),onInput:this.onSearchInput,onClick:t=>t.stopPropagation()}),this.searching&&n("md-loading-indicator",{class:"md-select__search-spinner",part:"search-spinner",label:this.searchingLabel,"aria-hidden":"true"})),this.loading?n("div",{class:"md-select__loading",part:"loading-bar",role:"status","aria-label":this.loadingText},n("md-progress-indicator",{variant:"linear",indeterminate:true,wave:true,part:"loading-progress",label:this.loadingText})):t?this.renderVirtualOptions():n("div",{class:"md-select__listbox",role:"listbox",id:`${this.triggerId}-listbox`,"aria-label":this.accessibleName||"Options"},i.map((t=>n("md-menu-item",{key:t.value,id:`${this.triggerId}-opt-${t.value}`,presentation:"option",type:"radio","check-position":"start","keep-open":true,part:t.value===this.value?"option option-selected":"option",disabled:t.disabled,selected:t.value===this.value,headline:t.label,"supporting-text":t.supportingText||"",onMdClick:()=>this.selectValue(t.value)},t.icon?n("span",{slot:"leading-icon",part:"option-icon",class:"material-symbols-outlined md-select__option-icon",style:t.iconColor?{color:t.iconColor}:undefined,"aria-hidden":"true"},t.icon):null)))))}render(){return n(r,{key:"9673c714adf54a5c44d38754a7539d75a530e750",class:{"md-select":true,[`md-select--${this.variant}`]:true,"md-select--open":this.open,"md-select--disabled":this.disabled,"md-select--loading":this.loading},"aria-haspopup":"listbox","aria-busy":this.loading?"true":undefined},this.renderTrigger(),this.renderMenu(),n("div",{key:"4d83d5a2e165c72dfeddb87ad9679ecaaf964d44",class:"md-select__options",hidden:true},n("slot",{key:"0dbc2ee39737fc9fa38af8c0c2da4ca154807777",onSlotchange:()=>this.refreshOptions()})))}static get formAssociated(){return true}get el(){return this}static get watchers(){return{value:[{syncFormValue:0}],required:[{syncValidity:0}],valueMissingLabel:[{syncValidity:0}],options:[{refreshOptions:0}],open:[{syncMenu:0}]}}static get style(){return V()}},[321,"md-select",{valueMissingLabel:[1,"value-missing-label"],reserveSupportingSpace:[4,"reserve-supporting-space"],variant:[513],label:[1],placeholder:[1],value:[1537],disabled:[516],required:[516],error:[516],errorText:[1,"error-text"],supportingText:[1,"supporting-text"],density:[514],clearable:[516],matchTriggerWidth:[516,"match-trigger-width"],placement:[1],maxHeight:[8,"max-height"],options:[1],virtualize:[1],filterable:[4],filterMode:[1,"filter-mode"],rowHeight:[2,"row-height"],name:[513],searchPlaceholder:[1,"search-placeholder"],filterLabel:[1,"filter-label"],noResultsText:[1,"no-results-text"],noOptionsText:[1,"no-options-text"],clearLabel:[1,"clear-label"],searchingLabel:[1,"searching-label"],loadingText:[1,"loading-text"],clearIcon:[1,"clear-icon"],dropdownIcon:[1,"dropdown-icon"],loading:[516],fullWidth:[516,"full-width"],open:[1540],optionsData:[32],triggerId:[32],query:[32],show:[64],close:[64],focusTrigger:[64],reset:[64],loadOptions:[64],setQuery:[64],getLabels:[64],getValidity:[64],checkValidity:[64],reportValidity:[64],setCustomValidity:[64]},[[0,"mdSelectOptionChange","onOptionChange"],[0,"keydown","handleKeyDown"]],{value:[{syncFormValue:0}],required:[{syncValidity:0}],valueMissingLabel:[{syncValidity:0}],options:[{refreshOptions:0}],open:[{syncMenu:0}]}]);function j(){if(typeof customElements==="undefined"){return}const s=["md-select","md-icon-button","md-loading-indicator","md-menu","md-menu-item","md-progress-indicator","md-ripple","md-text-field"];s.forEach((s=>{switch(s){case"md-select":if(!customElements.get(t(s))){customElements.define(t(s),$)}break;case"md-icon-button":if(!customElements.get(t(s))){x()}break;case"md-loading-indicator":if(!customElements.get(t(s))){_()}break;case"md-menu":if(!customElements.get(t(s))){v()}break;case"md-menu-item":if(!customElements.get(t(s))){w()}break;case"md-progress-indicator":if(!customElements.get(t(s))){k()}break;case"md-ripple":if(!customElements.get(t(s))){z()}break;case"md-text-field":if(!customElements.get(t(s))){C()}break}}))}j();export{$ as M,j as d};
2
- //# sourceMappingURL=p-BujtL9xW.js.map
@@ -1,2 +0,0 @@
1
- import{t,p as o,H as n,c as i,h as e,d as s}from"./p-MWBNn6Lj.js";import{t as r}from"./p-DYBUr7K_.js";import{s as a,a as c}from"./p-BdEoSBtL.js";import{d}from"./p-JbwZ84YK.js";const m=()=>`:host{--_container-color:var(--md-icon-button-container-color, transparent);--_icon-color:var(--md-icon-button-icon-color, var(--md-sys-color-on-surface-variant, #49454F));--_state-layer-color:var(--md-icon-button-state-layer-color, var(--md-sys-color-on-surface-variant, #49454F));--_icon-size:var(--md-icon-button-icon-size, max(18px, calc(24px + var(--md-sys-density-scale, 0) * 1px)));--_container-width:var(--md-icon-button-container-width, max(32px, calc(40px + var(--md-sys-density-scale, 0) * 4px)));--_container-height:var(--md-icon-button-container-height, max(32px, calc(40px + var(--md-sys-density-scale, 0) * 4px)));--_shape-round:20px;--_border-radius:var(--md-icon-button-container-shape, var(--_shape-round));display:inline-flex;align-items:center;justify-content:center;position:relative;width:var(--_container-width);height:var(--_container-height);border-radius:calc(var(--_border-radius) + var(--md-sys-shape-morph-enabled, 1) * (var(--_morph-to, var(--_border-radius)) - var(--_border-radius)));cursor:pointer;user-select:none;border:none;outline:none;overflow:hidden;box-sizing:border-box;background-color:var(--_container-color);color:var(--_icon-color);-webkit-tap-highlight-color:transparent;transition:background-color var(--md-sys-motion-duration-short2, 100ms) var(--md-sys-motion-easing-standard, cubic-bezier(0.2, 0, 0, 1)), color var(--md-sys-motion-duration-short2, 100ms) var(--md-sys-motion-easing-standard, cubic-bezier(0.2, 0, 0, 1)), border-radius var(--md-sys-motion-duration-medium4, 400ms) var(--md-sys-motion-easing-emphasized-decelerate, cubic-bezier(0.05, 0.7, 0.1, 1));flex-shrink:0;vertical-align:middle}:host(.md-icon-button--xs){--_container-width:var(--md-icon-button-container-width, max(32px, calc(32px + var(--md-sys-density-scale, 0) * 4px)));--_container-height:var(--md-icon-button-container-height, max(32px, calc(32px + var(--md-sys-density-scale, 0) * 4px)));--_icon-size:var(--md-icon-button-icon-size, max(16px, calc(20px + var(--md-sys-density-scale, 0) * 1px)));--_shape-round:16px}:host(.md-icon-button--sm){--_container-width:var(--md-icon-button-container-width, max(32px, calc(40px + var(--md-sys-density-scale, 0) * 4px)));--_container-height:var(--md-icon-button-container-height, max(32px, calc(40px + var(--md-sys-density-scale, 0) * 4px)));--_icon-size:var(--md-icon-button-icon-size, max(18px, calc(24px + var(--md-sys-density-scale, 0) * 1px)));--_shape-round:20px}:host(.md-icon-button--md){--_container-width:var(--md-icon-button-container-width, max(32px, calc(56px + var(--md-sys-density-scale, 0) * 4px)));--_container-height:var(--md-icon-button-container-height, max(32px, calc(56px + var(--md-sys-density-scale, 0) * 4px)));--_icon-size:var(--md-icon-button-icon-size, max(18px, calc(24px + var(--md-sys-density-scale, 0) * 1px)));--_shape-round:28px}:host(.md-icon-button--lg){--_container-width:var(--md-icon-button-container-width, max(32px, calc(96px + var(--md-sys-density-scale, 0) * 4px)));--_container-height:var(--md-icon-button-container-height, max(32px, calc(96px + var(--md-sys-density-scale, 0) * 4px)));--_icon-size:var(--md-icon-button-icon-size, max(24px, calc(32px + var(--md-sys-density-scale, 0) * 2px)));--_shape-round:48px}:host(.md-icon-button--xl){--_container-width:var(--md-icon-button-container-width, max(32px, calc(136px + var(--md-sys-density-scale, 0) * 4px)));--_container-height:var(--md-icon-button-container-height, max(32px, calc(136px + var(--md-sys-density-scale, 0) * 4px)));--_icon-size:var(--md-icon-button-icon-size, max(28px, calc(40px + var(--md-sys-density-scale, 0) * 3px)));--_shape-round:68px}:host(.md-icon-button--width-narrow.md-icon-button--xs){--_container-width:var(--md-icon-button-container-width, max(32px, calc(28px + var(--md-sys-density-scale, 0) * 4px)))}:host(.md-icon-button--width-narrow.md-icon-button--sm){--_container-width:var(--md-icon-button-container-width, max(32px, calc(32px + var(--md-sys-density-scale, 0) * 4px)))}:host(.md-icon-button--width-narrow.md-icon-button--md){--_container-width:var(--md-icon-button-container-width, max(32px, calc(48px + var(--md-sys-density-scale, 0) * 4px)))}:host(.md-icon-button--width-narrow.md-icon-button--lg){--_container-width:var(--md-icon-button-container-width, max(32px, calc(64px + var(--md-sys-density-scale, 0) * 4px)))}:host(.md-icon-button--width-narrow.md-icon-button--xl){--_container-width:var(--md-icon-button-container-width, max(32px, calc(104px + var(--md-sys-density-scale, 0) * 4px)))}:host(.md-icon-button--width-wide.md-icon-button--xs){--_container-width:var(--md-icon-button-container-width, max(32px, calc(40px + var(--md-sys-density-scale, 0) * 4px)))}:host(.md-icon-button--width-wide.md-icon-button--sm){--_container-width:var(--md-icon-button-container-width, max(32px, calc(52px + var(--md-sys-density-scale, 0) * 4px)))}:host(.md-icon-button--width-wide.md-icon-button--md){--_container-width:var(--md-icon-button-container-width, max(32px, calc(72px + var(--md-sys-density-scale, 0) * 4px)))}:host(.md-icon-button--width-wide.md-icon-button--lg){--_container-width:var(--md-icon-button-container-width, max(32px, calc(128px + var(--md-sys-density-scale, 0) * 4px)))}:host(.md-icon-button--width-wide.md-icon-button--xl){--_container-width:var(--md-icon-button-container-width, max(32px, calc(184px + var(--md-sys-density-scale, 0) * 4px)))}:host(.md-icon-button--round){--_border-radius:var(--md-icon-button-container-shape, var(--_shape-round))}:host(.md-icon-button--square.md-icon-button--xs){--_border-radius:var(--md-icon-button-container-shape, var(--md-sys-shape-corner-medium, 12px))}:host(.md-icon-button--square.md-icon-button--sm){--_border-radius:var(--md-icon-button-container-shape, var(--md-sys-shape-corner-medium, 12px))}:host(.md-icon-button--square.md-icon-button--md){--_border-radius:var(--md-icon-button-container-shape, var(--md-sys-shape-corner-large, 16px))}:host(.md-icon-button--square.md-icon-button--lg){--_border-radius:var(--md-icon-button-container-shape, var(--md-sys-shape-corner-extra-large, 28px))}:host(.md-icon-button--square.md-icon-button--xl){--_border-radius:var(--md-icon-button-container-shape, var(--md-sys-shape-corner-extra-large, 28px))}:host(.md-icon-button--shape-morph.md-icon-button--round.md-icon-button--selected.md-icon-button--xs){--_morph-to:var(--md-sys-shape-corner-medium, 12px)}:host(.md-icon-button--shape-morph.md-icon-button--round.md-icon-button--selected.md-icon-button--sm){--_morph-to:var(--md-sys-shape-corner-medium, 12px)}:host(.md-icon-button--shape-morph.md-icon-button--round.md-icon-button--selected.md-icon-button--md){--_morph-to:var(--md-sys-shape-corner-large, 16px)}:host(.md-icon-button--shape-morph.md-icon-button--round.md-icon-button--selected.md-icon-button--lg){--_morph-to:var(--md-sys-shape-corner-extra-large, 28px)}:host(.md-icon-button--shape-morph.md-icon-button--round.md-icon-button--selected.md-icon-button--xl){--_morph-to:var(--md-sys-shape-corner-extra-large, 28px)}:host(.md-icon-button--shape-morph.md-icon-button--square.md-icon-button--selected){--_morph-to:var(--_shape-round)}:host(.md-icon-button--pressed.md-icon-button--xs){--_morph-to:var(--md-sys-shape-corner-small, 8px);transition-duration:var(--md-sys-motion-duration-short4, 200ms);transition-timing-function:var(--md-sys-motion-easing-standard, cubic-bezier(0.2, 0, 0, 1))}:host(.md-icon-button--pressed.md-icon-button--sm){--_morph-to:var(--md-sys-shape-corner-small, 8px);transition-duration:var(--md-sys-motion-duration-short4, 200ms);transition-timing-function:var(--md-sys-motion-easing-standard, cubic-bezier(0.2, 0, 0, 1))}:host(.md-icon-button--pressed.md-icon-button--md){--_morph-to:var(--md-sys-shape-corner-medium, 12px);transition-duration:var(--md-sys-motion-duration-short4, 200ms);transition-timing-function:var(--md-sys-motion-easing-standard, cubic-bezier(0.2, 0, 0, 1))}:host(.md-icon-button--pressed.md-icon-button--lg){--_morph-to:var(--md-sys-shape-corner-large, 16px);transition-duration:var(--md-sys-motion-duration-short4, 200ms);transition-timing-function:var(--md-sys-motion-easing-standard, cubic-bezier(0.2, 0, 0, 1))}:host(.md-icon-button--pressed.md-icon-button--xl){--_morph-to:var(--md-sys-shape-corner-large, 16px);transition-duration:var(--md-sys-motion-duration-short4, 200ms);transition-timing-function:var(--md-sys-motion-easing-standard, cubic-bezier(0.2, 0, 0, 1))}:host(.md-icon-button--width-narrow.md-icon-button--pressed){transition-duration:var(--md-sys-motion-duration-medium1, 250ms)}:host(.md-icon-button--connected-left.md-icon-button--xs),:host(.md-icon-button--connected-right.md-icon-button--xs){--_c-inner:4px}:host(.md-icon-button--connected-left.md-icon-button--sm),:host(.md-icon-button--connected-right.md-icon-button--sm){--_c-inner:8px}:host(.md-icon-button--connected-left.md-icon-button--md),:host(.md-icon-button--connected-right.md-icon-button--md){--_c-inner:8px}:host(.md-icon-button--connected-left.md-icon-button--lg),:host(.md-icon-button--connected-right.md-icon-button--lg){--_c-inner:16px}:host(.md-icon-button--connected-left.md-icon-button--xl),:host(.md-icon-button--connected-right.md-icon-button--xl){--_c-inner:20px}:host(.md-icon-button--connected-left.md-icon-button--connected-right){border-radius:var(--_c-inner)}:host(.md-icon-button--round.md-icon-button--connected-right:not(.md-icon-button--connected-left)){border-start-start-radius:var(--_shape-round);border-end-start-radius:var(--_shape-round);border-start-end-radius:var(--_c-inner);border-end-end-radius:var(--_c-inner)}:host(.md-icon-button--round.md-icon-button--connected-left:not(.md-icon-button--connected-right)){border-start-start-radius:var(--_c-inner);border-end-start-radius:var(--_c-inner);border-start-end-radius:var(--_shape-round);border-end-end-radius:var(--_shape-round)}:host(.md-icon-button--square.md-icon-button--connected-right:not(.md-icon-button--connected-left)),:host(.md-icon-button--square.md-icon-button--connected-left:not(.md-icon-button--connected-right)){border-radius:var(--_c-inner)}:host(.md-icon-button--standard){--_container-color:var(--md-icon-button-container-color, transparent);--_icon-color:var(--md-icon-button-icon-color, var(--md-sys-color-on-surface-variant, #49454F));--_state-layer-color:var(--md-icon-button-state-layer-color, var(--md-sys-color-on-surface-variant, #49454F))}:host(.md-icon-button--standard.md-icon-button--selected:not(.md-icon-button--disabled)){--_icon-color:var(--md-icon-button-icon-color, var(--md-sys-color-primary, #6750A4));--_state-layer-color:var(--md-icon-button-state-layer-color, var(--md-sys-color-primary, #6750A4))}:host(.md-icon-button--filled){--_container-color:var(--md-icon-button-container-color, var(--md-sys-color-primary, #6750A4));--_icon-color:var(--md-icon-button-icon-color, var(--md-sys-color-on-primary, #FFFFFF));--_state-layer-color:var(--md-icon-button-state-layer-color, var(--md-sys-color-on-primary, #FFFFFF))}:host(.md-icon-button--filled.md-icon-button--toggle:not(.md-icon-button--selected):not(.md-icon-button--disabled)){--_container-color:var(--md-icon-button-container-color, var(--md-sys-color-surface-container-highest, #E6E0E9));--_icon-color:var(--md-icon-button-icon-color, var(--md-sys-color-primary, #6750A4));--_state-layer-color:var(--md-icon-button-state-layer-color, var(--md-sys-color-primary, #6750A4))}:host(.md-icon-button--filled.md-icon-button--selected:not(.md-icon-button--disabled)){--_container-color:var(--md-icon-button-container-color, var(--md-sys-color-primary, #6750A4));--_icon-color:var(--md-icon-button-icon-color, var(--md-sys-color-on-primary, #FFFFFF));--_state-layer-color:var(--md-icon-button-state-layer-color, var(--md-sys-color-on-primary, #FFFFFF))}:host(.md-icon-button--tonal){--_container-color:var(--md-icon-button-container-color, var(--md-sys-color-secondary-container, #E8DEF8));--_icon-color:var(--md-icon-button-icon-color, var(--md-sys-color-on-secondary-container, #1E192B));--_state-layer-color:var(--md-icon-button-state-layer-color, var(--md-sys-color-on-secondary-container, #1E192B))}:host(.md-icon-button--tonal.md-icon-button--toggle:not(.md-icon-button--selected):not(.md-icon-button--disabled)){--_container-color:var(--md-icon-button-container-color, var(--md-sys-color-surface-container-highest, #E6E0E9));--_icon-color:var(--md-icon-button-icon-color, var(--md-sys-color-on-surface-variant, #49454F));--_state-layer-color:var(--md-icon-button-state-layer-color, var(--md-sys-color-on-surface-variant, #49454F))}:host(.md-icon-button--tonal.md-icon-button--selected:not(.md-icon-button--disabled)){--_container-color:var(--md-icon-button-container-color, var(--md-sys-color-secondary-container, #E8DEF8));--_icon-color:var(--md-icon-button-icon-color, var(--md-sys-color-on-secondary-container, #1E192B));--_state-layer-color:var(--md-icon-button-state-layer-color, var(--md-sys-color-on-secondary-container, #1E192B))}:host(.md-icon-button--outlined){--_container-color:var(--md-icon-button-container-color, transparent);--_icon-color:var(--md-icon-button-icon-color, var(--md-sys-color-on-surface-variant, #49454F));--_state-layer-color:var(--md-icon-button-state-layer-color, var(--md-sys-color-on-surface-variant, #49454F));border:var(--md-icon-button-outline-width, 1px) solid var(--md-icon-button-outline-color, var(--md-sys-color-outline, #79747E))}:host(.md-icon-button--outlined.md-icon-button--selected:not(.md-icon-button--disabled)){--_container-color:var(--md-icon-button-container-color, var(--md-sys-color-inverse-surface, #313033));--_icon-color:var(--md-icon-button-icon-color, var(--md-sys-color-inverse-on-surface, #F4EFF4));--_state-layer-color:var(--md-icon-button-state-layer-color, var(--md-sys-color-inverse-on-surface, #F4EFF4));border-color:transparent}.md-icon-button__state-layer{position:absolute;inset:0;border-radius:inherit;background-color:var(--_state-layer-color);opacity:0;transition:opacity var(--md-sys-motion-duration-short2, 100ms) var(--md-sys-motion-easing-standard, cubic-bezier(0.2, 0, 0, 1));pointer-events:none}:host(:hover) .md-icon-button__state-layer{opacity:var(--md-sys-state-hover-state-layer-opacity, 0.08)}:host(:active) .md-icon-button__state-layer{opacity:var(--md-sys-state-pressed-state-layer-opacity, 0.12)}:host(:focus-visible) .md-icon-button__state-layer{opacity:var(--md-sys-state-focus-state-layer-opacity, 0.12)}:host(:focus-visible){outline:3px solid var(--md-sys-color-secondary, #625B71);outline-offset:2px;z-index:1}:host(.md-icon-button--disabled){cursor:default;pointer-events:none}:host([soft-disabled]){cursor:default;pointer-events:auto}:host([soft-disabled]) .md-icon-button__state-layer{display:none}:host(.md-icon-button--standard.md-icon-button--disabled),:host(.md-icon-button--outlined.md-icon-button--disabled){--_icon-color:color-mix(in srgb, var(--md-sys-color-on-surface, #1C1B1F) calc(var(--md-sys-state-disabled-content-opacity, 0.38) * 100%), transparent)}:host(.md-icon-button--outlined.md-icon-button--disabled){border-color:color-mix(in srgb, var(--md-sys-color-on-surface, #1C1B1F) calc(var(--md-sys-state-disabled-container-opacity, 0.12) * 100%), transparent)}:host(.md-icon-button--filled.md-icon-button--disabled),:host(.md-icon-button--tonal.md-icon-button--disabled){--_container-color:color-mix(in srgb, var(--md-sys-color-on-surface, #1C1B1F) calc(var(--md-sys-state-disabled-container-opacity, 0.12) * 100%), transparent);--_icon-color:color-mix(in srgb, var(--md-sys-color-on-surface, #1C1B1F) calc(var(--md-sys-state-disabled-content-opacity, 0.38) * 100%), transparent)}:host(.md-icon-button--disabled:hover) .md-icon-button__state-layer,:host(.md-icon-button--disabled:active) .md-icon-button__state-layer,:host(.md-icon-button--disabled:focus-visible) .md-icon-button__state-layer{opacity:0}.md-icon-button__icon{display:none;align-items:center;justify-content:center;position:relative;z-index:1;color:inherit;width:var(--_icon-size);height:var(--_icon-size);font-size:0;line-height:0}.md-icon-button__icon slot{font-size:var(--_icon-size);line-height:1}.md-icon-button__icon--on{display:inline-flex}.md-icon-button__icon-font{font-size:var(--_icon-size);width:var(--_icon-size);height:var(--_icon-size);display:flex;align-items:center;justify-content:center;line-height:1}:host(.md-icon-button--has-badge){overflow:visible}:host(.md-icon-button--has-badge) .md-icon-button__state-layer{overflow:hidden}::slotted(*:not(md-badge):not(md-avatar)){width:var(--_icon-size) !important;height:var(--_icon-size) !important;font-size:var(--_icon-size) !important;color:inherit !important;fill:currentColor !important;display:inline-flex !important;align-items:center !important;justify-content:center !important;line-height:1 !important}.material-symbols-outlined{font-family:var(--md-sys-icon-font-family, 'Material Symbols Outlined', 'Material Icons');font-weight:normal;font-style:normal;font-size:var(--_icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;overflow-wrap:normal;direction:ltr;font-feature-settings:'liga';-webkit-font-smoothing:antialiased}@media (forced-colors: active){:host{forced-color-adjust:none}:host(.md-icon-button--outlined){border-color:ButtonText}}:host([density='-1']){--md-sys-density-scale:-1}:host([density='-2']){--md-sys-density-scale:-2}:host([density='-3']){--md-sys-density-scale:-3}:host([density='-4']){--md-sys-density-scale:-4}`;const l=o(class t extends n{constructor(t){super();if(t!==false){this.__registerHost()}this.__attachShadow();this.mdClick=i(this,"mdClick",7);this.variant="standard";this.size="sm";this.shape="round";this.buttonWidth="default";this.disabled=false;this.softDisabled=false;this.toggle=false;this.selected=false;this.shapeMorph=true;this.ripple=true;this.icon="";this.selectedIcon="";this.href="";this.target="_self";this.connectedLeft=false;this.connectedRight=false;this.value="";this.groupTabindex=null;this.density=0;this.hasSlottedIcon=false;this.hasSlottedBadge=false;this.hasSlottedSelected=false;this.pressed=false;this.handleClick=t=>{if(this.isDisabled){t.preventDefault();return}const o=a(this.href);if(o){window.open(o,this.target,c)}if(this.toggle)this.selected=!this.selected;this.mdClick.emit({selected:this.selected})};this.handleKeyDown=t=>{if(t.key==="Enter"||t.key===" "){t.preventDefault();if(!this.isDisabled){this.pressed=true;r(this.el);this.el.click();setTimeout((()=>{this.pressed=false}),150)}}};this.handlePointerDown=()=>{if(!this.isDisabled)this.pressed=true};this.handlePointerUp=()=>{this.pressed=false}}get isDisabled(){return this.disabled||this.softDisabled}componentWillLoad(){this.syncSlottedIcons()}componentDidLoad(){const t=this.el.shadowRoot;if(!t)return;const o=t.querySelector("slot:not([name])");const n=t.querySelector('slot[name="selected"]');this.syncSlottedIcons();o?.addEventListener("slotchange",(()=>this.syncSlottedIcons()));n?.addEventListener("slotchange",(()=>this.syncSlottedIcons()))}hasMeaningfulSlotContent(t){if(!t)return false;return t.assignedNodes().some((t=>{if(t.nodeType===Node.ELEMENT_NODE){if(t.tagName.toLowerCase()==="md-badge")return false;return true}if(t.nodeType===Node.TEXT_NODE)return(t.textContent?.trim().length??0)>0;return false}))}syncSlottedIcons(){const t=this.el.shadowRoot;const o=t?.querySelector("slot:not([name])");const n=t?.querySelector('slot[name="selected"]');this.hasSlottedIcon=this.hasMeaningfulSlotContent(o);this.hasSlottedBadge=!!o?.assignedElements().some((t=>t.tagName.toLowerCase()==="md-badge"));this.hasSlottedSelected=this.hasMeaningfulSlotContent(n)}render(){const t=this.isDisabled;const o=this.toggle&&this.selected;const n=!!this.icon||this.hasSlottedIcon;const i=!o||!this.selectedIcon&&!this.hasSlottedSelected;return e(s,{key:"c8ba395e0f0eaa47019a6ec74ddb76135018d63a",class:{"md-icon-button":true,[`md-icon-button--${this.variant}`]:true,[`md-icon-button--${this.size}`]:true,[`md-icon-button--${this.shape}`]:true,[`md-icon-button--width-${this.buttonWidth}`]:this.buttonWidth!=="default","md-icon-button--selected":this.selected,"md-icon-button--toggle":this.toggle,"md-icon-button--disabled":this.disabled||this.softDisabled,"md-icon-button--shape-morph":this.shapeMorph,"md-icon-button--has-badge":this.hasSlottedBadge,"md-icon-button--pressed":this.shapeMorph&&this.pressed,"md-icon-button--connected-left":this.connectedLeft,"md-icon-button--connected-right":this.connectedRight},role:"button","aria-disabled":t?"true":"false","aria-pressed":this.toggle?String(this.selected):undefined,tabindex:this.disabled?"-1":this.groupTabindex!==null?String(this.groupTabindex):"0",onClick:this.handleClick,onKeyDown:this.handleKeyDown,onPointerDown:this.handlePointerDown,onPointerUp:this.handlePointerUp,onPointerLeave:this.handlePointerUp,onPointerCancel:this.handlePointerUp},this.ripple&&e("md-ripple",{key:"38a31f8be791e2441c128668d12cffc8d2883863",disabled:t}),e("span",{key:"3e36940f6038c69663ae28330827edb68158e78e",class:"md-icon-button__state-layer",part:"state-layer","aria-hidden":"true"}),e("span",{key:"ee34874988c22da61d85a98db6e2f636c43b1bdb",class:{"md-icon-button__icon":true,"md-icon-button__icon--on":i},part:"icon"},e("slot",{key:"25fe46290a2d8793c7f72ee623fafcfeaf01d015"}),i&&n&&!this.hasSlottedIcon&&e("span",{key:"9da0f58088f30f43b37d14f93f1f2406454f493d",class:"md-icon-button__icon-font material-symbols-outlined","aria-hidden":"true"},o&&this.selectedIcon?this.selectedIcon:this.icon)),this.toggle&&(this.selectedIcon||this.hasSlottedSelected)&&e("span",{key:"366c07e84c1aa12ca7259983518ecb6e6e909852",class:{"md-icon-button__icon":true,"md-icon-button__icon--on":o},part:"selected-icon"},e("slot",{key:"7b346adf89aca1c953618e2b2654df70ed2c2320",name:"selected"}),!this.hasSlottedSelected&&this.selectedIcon&&e("span",{key:"f61d47d93eb24d4e95a5704dfc14bf59f3a3f9e0",class:"md-icon-button__icon-font material-symbols-outlined","aria-hidden":"true"},this.selectedIcon)))}get el(){return this}static get style(){return m()}},[257,"md-icon-button",{variant:[1],size:[1],shape:[1],buttonWidth:[1,"button-width"],disabled:[516],softDisabled:[516,"soft-disabled"],toggle:[4],selected:[1028],shapeMorph:[4,"shape-morph"],ripple:[4],icon:[1],selectedIcon:[1,"selected-icon"],href:[1],target:[1],connectedLeft:[516,"connected-left"],connectedRight:[516,"connected-right"],value:[1],groupTabindex:[1026,"group-tabindex"],density:[514],hasSlottedIcon:[32],hasSlottedBadge:[32],hasSlottedSelected:[32],pressed:[32]}]);function u(){if(typeof customElements==="undefined"){return}const o=["md-icon-button","md-ripple"];o.forEach((o=>{switch(o){case"md-icon-button":if(!customElements.get(t(o))){customElements.define(t(o),l)}break;case"md-ripple":if(!customElements.get(t(o))){d()}break}}))}u();export{l as M,u as d};
2
- //# sourceMappingURL=p-Bx5sxRqa.js.map
@@ -1,2 +0,0 @@
1
- import{t as e,p as s,H as a,c as r,h as t,d}from"./p-MWBNn6Lj.js";import{t as i}from"./p-DYBUr7K_.js";import{d as n}from"./p-JbwZ84YK.js";const o=()=>`:host{display:flex;align-items:center;position:relative;overflow:hidden;cursor:pointer;user-select:none;min-height:var(--md-menu-item-height, calc(48px + var(--md-sys-density-scale, 0) * 4px));--_icon-size:var(--md-menu-item-icon-size, max(18px, calc(24px + var(--md-sys-density-scale, 0) * 1px)));--_check-size:var(--md-menu-item-check-size, max(16px, calc(20px + var(--md-sys-density-scale, 0) * 1px)));padding:0 var(--md-menu-item-padding-inline, var(--md-sys-spacing-inset-md, 12px));gap:var(--md-menu-item-gap, var(--md-sys-spacing-gap-md, 12px));color:var(--md-sys-color-on-surface, #1C1B1F);box-sizing:border-box;-webkit-tap-highlight-color:transparent;outline:none;transition:background-color var(--md-sys-motion-duration-short3, 150ms) var(--md-sys-motion-easing-standard, cubic-bezier(0.2, 0, 0, 1)), color var(--md-sys-motion-duration-short3, 150ms) var(--md-sys-motion-easing-standard, cubic-bezier(0.2, 0, 0, 1)), border-radius var(--md-sys-motion-duration-medium2, 300ms) var(--md-sys-motion-easing-emphasized-decelerate, cubic-bezier(0.05, 0.7, 0.1, 1))}@media (prefers-reduced-motion: reduce){:host{transition:none}}.md-menu-item__state-layer{position:absolute;inset:0;background-color:var(--md-sys-color-on-surface, #1C1B1F);opacity:0;pointer-events:none;}:host-context(md-menu-item-group[data-use-gap]) .md-menu-item__state-layer{border-radius:calc(var(--md-menu-group-shape, 12px) - var(--md-sys-spacing-inset-xs, 4px))}:host(:hover) .md-menu-item__state-layer{opacity:0.08}:host(:active) .md-menu-item__state-layer{opacity:0.12}:host(:focus-visible) .md-menu-item__state-layer,:host([data-md-focused]) .md-menu-item__state-layer{opacity:0.12}:host(:hover) .md-menu-item__state-layer,:host(:active) .md-menu-item__state-layer{transition:opacity var(--md-sys-motion-duration-short2, 100ms) var(--md-sys-motion-easing-standard, cubic-bezier(0.2, 0, 0, 1))}:host(:focus-visible),:host([data-md-focused]){outline:3px solid var(--md-sys-color-secondary, #625B71);outline-offset:-3px}:host(.md-menu-item--selected){background-color:var(--md-sys-color-secondary-container, #E8DEF8)}:host([data-variant="standard"].md-menu-item--selected){background-color:var(--md-sys-color-tertiary-container, #FFD8E4);color:var(--md-sys-color-on-tertiary-container, #31111D);border-start-start-radius:calc(var(--_rest-ss) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-medium, 12px) - var(--_rest-ss)));border-start-end-radius:calc(var(--_rest-se) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-medium, 12px) - var(--_rest-se)));border-end-start-radius:calc(var(--_rest-es) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-medium, 12px) - var(--_rest-es)));border-end-end-radius:calc(var(--_rest-ee) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-medium, 12px) - var(--_rest-ee)))}:host([data-variant="standard"]:hover){border-start-start-radius:calc(var(--_rest-ss) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-extra-small, 4px) - var(--_rest-ss)));border-start-end-radius:calc(var(--_rest-se) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-extra-small, 4px) - var(--_rest-se)));border-end-start-radius:calc(var(--_rest-es) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-extra-small, 4px) - var(--_rest-es)));border-end-end-radius:calc(var(--_rest-ee) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-extra-small, 4px) - var(--_rest-ee)))}:host([data-variant="standard"]:active){border-start-start-radius:calc(var(--_rest-ss) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-medium, 12px) - var(--_rest-ss)));border-start-end-radius:calc(var(--_rest-se) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-medium, 12px) - var(--_rest-se)));border-end-start-radius:calc(var(--_rest-es) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-medium, 12px) - var(--_rest-es)));border-end-end-radius:calc(var(--_rest-ee) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-medium, 12px) - var(--_rest-ee)))}:host([data-variant="standard"]:first-child:hover){border-start-start-radius:calc(var(--_rest-ss) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-large, 16px) - var(--_rest-ss)));border-start-end-radius:calc(var(--_rest-se) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-large, 16px) - var(--_rest-se)));border-end-start-radius:calc(var(--_rest-es) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-extra-small, 4px) - var(--_rest-es)));border-end-end-radius:calc(var(--_rest-ee) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-extra-small, 4px) - var(--_rest-ee)))}:host([data-variant="standard"]:last-child:hover){border-start-start-radius:calc(var(--_rest-ss) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-extra-small, 4px) - var(--_rest-ss)));border-start-end-radius:calc(var(--_rest-se) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-extra-small, 4px) - var(--_rest-se)));border-end-start-radius:calc(var(--_rest-es) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-large, 16px) - var(--_rest-es)));border-end-end-radius:calc(var(--_rest-ee) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-large, 16px) - var(--_rest-ee)))}:host([data-variant="standard"][data-after-gap]:hover){border-start-start-radius:calc(var(--_rest-ss) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-large, 16px) - var(--_rest-ss)));border-start-end-radius:calc(var(--_rest-se) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-large, 16px) - var(--_rest-se)));border-end-start-radius:calc(var(--_rest-es) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-extra-small, 4px) - var(--_rest-es)));border-end-end-radius:calc(var(--_rest-ee) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-extra-small, 4px) - var(--_rest-ee)))}:host([data-variant="standard"][gap]:hover){border-start-start-radius:calc(var(--_rest-ss) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-extra-small, 4px) - var(--_rest-ss)));border-start-end-radius:calc(var(--_rest-se) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-extra-small, 4px) - var(--_rest-se)));border-end-start-radius:calc(var(--_rest-es) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-large, 16px) - var(--_rest-es)));border-end-end-radius:calc(var(--_rest-ee) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-large, 16px) - var(--_rest-ee)))}:host([data-variant="standard"][data-after-gap][gap]:hover){border-start-start-radius:calc(var(--_rest-ss) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-large, 16px) - var(--_rest-ss)));border-start-end-radius:calc(var(--_rest-se) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-large, 16px) - var(--_rest-se)));border-end-start-radius:calc(var(--_rest-es) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-large, 16px) - var(--_rest-es)));border-end-end-radius:calc(var(--_rest-ee) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-large, 16px) - var(--_rest-ee)))}:host([data-variant="vibrant"].md-menu-item--selected){background-color:var(--md-sys-color-tertiary, #7D5260);color:var(--md-sys-color-on-tertiary, #FFFFFF);border-start-start-radius:calc(var(--_rest-ss) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-medium, 12px) - var(--_rest-ss)));border-start-end-radius:calc(var(--_rest-se) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-medium, 12px) - var(--_rest-se)));border-end-start-radius:calc(var(--_rest-es) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-medium, 12px) - var(--_rest-es)));border-end-end-radius:calc(var(--_rest-ee) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-medium, 12px) - var(--_rest-ee)))}:host([data-variant="vibrant"]:hover){border-start-start-radius:calc(var(--_rest-ss) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-extra-small, 4px) - var(--_rest-ss)));border-start-end-radius:calc(var(--_rest-se) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-extra-small, 4px) - var(--_rest-se)));border-end-start-radius:calc(var(--_rest-es) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-extra-small, 4px) - var(--_rest-es)));border-end-end-radius:calc(var(--_rest-ee) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-extra-small, 4px) - var(--_rest-ee)))}:host([data-variant="vibrant"]:active){border-start-start-radius:calc(var(--_rest-ss) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-medium, 12px) - var(--_rest-ss)));border-start-end-radius:calc(var(--_rest-se) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-medium, 12px) - var(--_rest-se)));border-end-start-radius:calc(var(--_rest-es) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-medium, 12px) - var(--_rest-es)));border-end-end-radius:calc(var(--_rest-ee) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-medium, 12px) - var(--_rest-ee)))}:host([data-variant="vibrant"]:first-child:hover){border-start-start-radius:calc(var(--_rest-ss) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-large, 16px) - var(--_rest-ss)));border-start-end-radius:calc(var(--_rest-se) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-large, 16px) - var(--_rest-se)));border-end-start-radius:calc(var(--_rest-es) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-extra-small, 4px) - var(--_rest-es)));border-end-end-radius:calc(var(--_rest-ee) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-extra-small, 4px) - var(--_rest-ee)))}:host([data-variant="vibrant"]:last-child:hover){border-start-start-radius:calc(var(--_rest-ss) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-extra-small, 4px) - var(--_rest-ss)));border-start-end-radius:calc(var(--_rest-se) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-extra-small, 4px) - var(--_rest-se)));border-end-start-radius:calc(var(--_rest-es) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-large, 16px) - var(--_rest-es)));border-end-end-radius:calc(var(--_rest-ee) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-large, 16px) - var(--_rest-ee)))}:host([data-variant="vibrant"][data-after-gap]:hover){border-start-start-radius:calc(var(--_rest-ss) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-large, 16px) - var(--_rest-ss)));border-start-end-radius:calc(var(--_rest-se) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-large, 16px) - var(--_rest-se)));border-end-start-radius:calc(var(--_rest-es) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-extra-small, 4px) - var(--_rest-es)));border-end-end-radius:calc(var(--_rest-ee) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-extra-small, 4px) - var(--_rest-ee)))}:host([data-variant="vibrant"][gap]:hover){border-start-start-radius:calc(var(--_rest-ss) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-extra-small, 4px) - var(--_rest-ss)));border-start-end-radius:calc(var(--_rest-se) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-extra-small, 4px) - var(--_rest-se)));border-end-start-radius:calc(var(--_rest-es) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-large, 16px) - var(--_rest-es)));border-end-end-radius:calc(var(--_rest-ee) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-large, 16px) - var(--_rest-ee)))}:host([data-variant="vibrant"][data-after-gap][gap]:hover){border-start-start-radius:calc(var(--_rest-ss) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-large, 16px) - var(--_rest-ss)));border-start-end-radius:calc(var(--_rest-se) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-large, 16px) - var(--_rest-se)));border-end-start-radius:calc(var(--_rest-es) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-large, 16px) - var(--_rest-es)));border-end-end-radius:calc(var(--_rest-ee) + var(--md-sys-shape-morph-enabled, 1) * (var(--md-sys-shape-corner-large, 16px) - var(--_rest-ee)))}:host(.md-menu-item--disabled){cursor:default;opacity:0.38;pointer-events:none}.md-menu-item__leading{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--_icon-size);height:var(--_icon-size);color:var(--md-sys-color-on-surface-variant, #49454F)}.md-menu-item__leading ::slotted(*){font-size:var(--_icon-size) !important;width:var(--_icon-size);height:var(--_icon-size);color:inherit}:host(.md-menu-item--selected) .md-menu-item__leading{color:inherit}.md-menu-item__content{flex:1;display:flex;flex-direction:column;overflow:hidden;min-width:0}.md-menu-item__headline{font-family:var(--md-sys-typescale-body-large-font-family, Roboto, sans-serif);font-size:max(13px, calc(16px + var(--md-sys-density-scale, 0) * 0.5px));font-weight:var(--md-sys-typescale-body-large-weight, 400);line-height:max(18px, calc(24px + var(--md-sys-density-scale, 0) * 1px));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.md-menu-item__supporting{font-family:var(--md-sys-typescale-body-medium-font-family, Roboto, sans-serif);font-size:max(11px, calc(14px + var(--md-sys-density-scale, 0) * 0.5px));line-height:max(16px, calc(20px + var(--md-sys-density-scale, 0) * 1px));color:var(--md-sys-color-on-surface-variant, #49454F);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.md-menu-item__badge{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;height:20px;margin-inline-start:12px;padding:0 8px;border-radius:var(--md-sys-shape-corner-full, 9999px);background-color:var(--md-sys-color-tertiary-container, #FFD8E4);color:var(--md-sys-color-on-tertiary-container, #31111D);font-family:var(--md-sys-typescale-label-small-font-family, Roboto, sans-serif);font-size:var(--md-sys-typescale-label-small-size, 11px);font-weight:var(--md-sys-typescale-label-small-weight, 500);line-height:var(--md-sys-typescale-label-small-line-height, 16px);letter-spacing:var(--md-sys-typescale-label-small-tracking, 0.5px);white-space:nowrap}.md-menu-item__trailing{display:flex;align-items:center;flex-shrink:0;margin-inline-start:8px;color:var(--md-sys-color-on-surface-variant, #49454F)}.md-menu-item__trailing ::slotted(*:not(md-badge)){font-size:var(--_icon-size) !important;width:var(--_icon-size);height:var(--_icon-size);color:inherit}.md-menu-item__trailing-text{font-family:var(--md-sys-typescale-label-small-font-family, Roboto, sans-serif);font-size:var(--md-sys-typescale-label-small-size, 11px);color:var(--md-sys-color-on-surface-variant, #49454F)}.md-menu-item__trailing:not(:has(::slotted(*),.md-menu-item__trailing-text)){display:none}:host(.md-menu-item--selected) .md-menu-item__trailing{color:inherit}.md-menu-item__check{display:flex;align-items:center;justify-content:center;width:var(--_check-size);height:var(--_check-size);flex-shrink:0;margin-inline-start:8px;color:inherit}.md-menu-item__check .material-symbols-outlined{font-family:var(--md-sys-icon-font-family, 'Material Symbols Outlined', 'Material Icons');font-weight:normal;font-style:normal;font-size:var(--_check-size);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;overflow-wrap:normal;direction:ltr;font-feature-settings:'liga';-webkit-font-smoothing:antialiased}:host(.md-menu-item--divider){padding-bottom:0;margin-bottom:0}:host(.md-menu-item--divider)::after{content:'';position:absolute;bottom:0;inset-inline:0;height:1px;background-color:var(--md-sys-color-outline-variant, #CAC4D0)}:host([data-variant="standard"]){--_rest-ss:var(--md-sys-shape-corner-small, 8px);--_rest-se:var(--md-sys-shape-corner-small, 8px);--_rest-es:var(--md-sys-shape-corner-small, 8px);--_rest-ee:var(--md-sys-shape-corner-small, 8px);color:var(--md-sys-color-on-surface, #1C1B1F);gap:8px;border-radius:var(--md-sys-shape-corner-small, 8px);--_icon-size:var(--md-menu-item-icon-size, max(16px, calc(20px + var(--md-sys-density-scale, 0) * 1px)))}:host([data-variant="standard"]:first-child){--_rest-ss:var(--md-sys-shape-corner-large, 16px);--_rest-se:var(--md-sys-shape-corner-large, 16px);border-start-start-radius:var(--md-sys-shape-corner-large, 16px);border-start-end-radius:var(--md-sys-shape-corner-large, 16px)}:host([data-variant="standard"]:last-child){--_rest-es:var(--md-sys-shape-corner-large, 16px);--_rest-ee:var(--md-sys-shape-corner-large, 16px);border-end-start-radius:var(--md-sys-shape-corner-large, 16px);border-end-end-radius:var(--md-sys-shape-corner-large, 16px)}:host([data-variant="standard"]) .md-menu-item__leading{color:var(--md-sys-color-on-surface-variant, #49454F)}:host([data-variant="standard"]) .md-menu-item__trailing,:host([data-variant="standard"]) .md-menu-item__supporting,:host([data-variant="standard"]) .md-menu-item__trailing-text{color:var(--md-sys-color-on-surface-variant, #49454F)}:host([data-variant="standard"].md-menu-item--selected) .md-menu-item__leading,:host([data-variant="standard"].md-menu-item--selected) .md-menu-item__trailing{color:inherit}:host([data-variant="vibrant"]){--_rest-ss:var(--md-sys-shape-corner-small, 8px);--_rest-se:var(--md-sys-shape-corner-small, 8px);--_rest-es:var(--md-sys-shape-corner-small, 8px);--_rest-ee:var(--md-sys-shape-corner-small, 8px);color:var(--md-sys-color-on-tertiary-container, #31111D);gap:8px;border-radius:var(--md-sys-shape-corner-small, 8px);--_icon-size:var(--md-menu-item-icon-size, max(16px, calc(20px + var(--md-sys-density-scale, 0) * 1px)))}:host([data-variant="vibrant"]:first-child){--_rest-ss:var(--md-sys-shape-corner-large, 16px);--_rest-se:var(--md-sys-shape-corner-large, 16px);border-start-start-radius:var(--md-sys-shape-corner-large, 16px);border-start-end-radius:var(--md-sys-shape-corner-large, 16px)}:host([data-variant="vibrant"]:last-child){--_rest-es:var(--md-sys-shape-corner-large, 16px);--_rest-ee:var(--md-sys-shape-corner-large, 16px);border-end-start-radius:var(--md-sys-shape-corner-large, 16px);border-end-end-radius:var(--md-sys-shape-corner-large, 16px)}:host([data-variant="vibrant"]) .md-menu-item__leading{color:var(--md-sys-color-on-tertiary-container, #31111D)}:host([data-variant="vibrant"]) .md-menu-item__trailing,:host([data-variant="vibrant"]) .md-menu-item__supporting,:host([data-variant="vibrant"]) .md-menu-item__trailing-text{color:var(--md-sys-color-on-tertiary-container, #31111D)}:host([data-variant="vibrant"].md-menu-item--selected) .md-menu-item__leading,:host([data-variant="vibrant"].md-menu-item--selected) .md-menu-item__trailing{color:inherit}:host([data-variant="vibrant"]) .md-menu-item__state-layer{background-color:var(--md-sys-color-on-tertiary-container, #31111D)}:host([density='-1']){--md-sys-density-scale:-1}:host([density='-2']){--md-sys-density-scale:-2}:host([density='-3']){--md-sys-density-scale:-3}:host([density='-4']){--md-sys-density-scale:-4}`;const m=s(class e extends a{constructor(e){super();if(e!==false){this.__registerHost()}this.__attachShadow();this.mdClick=r(this,"mdClick",7);this.headline="";this.supportingText="";this.trailingText="";this.disabled=false;this.selected=false;this.indeterminate=false;this.keepOpen=false;this.divider=false;this.gap=false;this.badge="";this.type="button";this.checkPosition="end";this.presentation="menuitem";this.roleOverride="";this.density=0;this.hasLeadingIcon=false;this.hasTrailingIcon=false;this.handleClick=e=>{if(this.disabled){e.preventDefault();e.stopPropagation();return}if(this.type==="checkbox"){this.selected=!this.selected}else if(this.type==="radio"){this.selected=true;this.deselectSiblingRadios()}this.mdClick.emit();if(!this.keepOpen){let e=this.el.closest("md-menu");let s=e;while(e){const a=e.parentElement?.closest("md-menu");if(a){s=a;e=a}else{break}}if(s){const e=s;if(e.anchor){document.getElementById(e.anchor)?.focus()}setTimeout((()=>e.close?.()),150)}}};this.handleKeyDown=e=>{if(e.key==="Enter"){e.preventDefault();if(!this.disabled)i(this.el);this.el.click()}else if(e.key===" "){e.preventDefault();if(this.disabled)return;i(this.el);if(this.type==="checkbox"){this.selected=!this.selected;this.mdClick.emit()}else if(this.type==="radio"){this.selected=true;this.deselectSiblingRadios();this.mdClick.emit()}else{this.el.click()}}}}componentWillLoad(){this.hasLeadingIcon=!!this.el.querySelector('[slot="leading-icon"]');this.hasTrailingIcon=!!this.el.querySelector('[slot="trailing-icon"]')}deselectSiblingRadios(){if(this.type!=="radio")return;const e=this.el.closest("md-menu-item-group")||this.el.closest("md-menu");if(!e)return;const s=Array.from(e.querySelectorAll("md-menu-item"));for(const e of s){if(e!==this.el&&e.type==="radio"&&e.selected){e.selected=false}}}get role(){if(this.roleOverride)return this.roleOverride;if(this.presentation==="option")return"option";if(this.type==="checkbox")return"menuitemcheckbox";if(this.type==="radio")return"menuitemradio";return"menuitem"}render(){return t(d,{key:"b25da4876896e5eaf656f6e2139c09553454eec8",class:{"md-menu-item":true,"md-menu-item--selected":this.selected,"md-menu-item--disabled":this.disabled,"md-menu-item--divider":this.divider,"md-menu-item--gap":this.gap},role:this.role,"aria-disabled":this.disabled?"true":"false","aria-selected":this.presentation==="option"?String(this.selected):undefined,"aria-checked":this.presentation!=="option"&&this.type!=="button"?this.indeterminate&&!this.selected?"mixed":String(this.selected):undefined,tabindex:"-1",onClick:this.handleClick,onKeyDown:this.handleKeyDown},t("md-ripple",{key:"f68ad95aae97cc8ab0ca9af2050c29f723408e52",disabled:this.disabled}),t("span",{key:"0fd37b9aa2303309350d7a449a0981a00a75be12",class:"md-menu-item__state-layer",part:"state-layer","aria-hidden":"true"}),this.type!=="button"&&this.checkPosition==="start"&&t("span",{key:"5549c5da78c3593035184d324411fcba8651fb3e",class:"md-menu-item__check","aria-hidden":"true"},t("span",{key:"f36546592022ccc977d158ab5b3ed00b126e6f8b",class:"material-symbols-outlined"},this.selected?"check":this.indeterminate?"remove":"")),this.hasLeadingIcon&&t("span",{key:"0903854ac07ee37da7bd2157a760f448646f450a",class:"md-menu-item__leading",part:"leading-icon","aria-hidden":"true"},t("slot",{key:"af7ada80ec2c6b394fae8472a1df7089e0ba4094",name:"leading-icon"})),t("span",{key:"6254c0d2f1af7fb704bc67997aa72f3a1b16331d",class:"md-menu-item__content",part:"content"},t("span",{key:"ce241acc497161cd00d353aa7e31c2aaac88f888",class:"md-menu-item__headline",part:"headline"},this.headline),this.supportingText&&t("span",{key:"d0516abae552af8d01636efd29d9cbda0779a82b",class:"md-menu-item__supporting",part:"supporting-text"},this.supportingText)),this.badge&&t("span",{key:"d37b17f80d96a51cd0eaf8949bc545e768d1f80a",class:"md-menu-item__badge",part:"badge"},this.badge),(this.hasTrailingIcon||this.trailingText)&&t("span",{key:"a9bd6510bc0cd58514413c60aa32c67b483e1827",class:"md-menu-item__trailing",part:"trailing"},t("slot",{key:"0cde3d7bde1836d4c9b8235dda7591ceb57dfac8",name:"trailing-icon"},this.trailingText&&t("span",{key:"6b26d3a72ccae3495cb1f23a757d328400fe658e",class:"md-menu-item__trailing-text"},this.trailingText))),this.type!=="button"&&this.checkPosition==="end"&&t("span",{key:"05c12792d280f770aad8fc64bfbab7833bb2aa91",class:"md-menu-item__check","aria-hidden":"true"},t("span",{key:"fb0edd0eb26708672ac89f5ffcf3ddf1164cfe75",class:"material-symbols-outlined"},this.selected?"check":this.indeterminate?"remove":"")))}get el(){return this}static get style(){return o()}},[257,"md-menu-item",{headline:[1],supportingText:[1,"supporting-text"],trailingText:[1,"trailing-text"],disabled:[516],selected:[1540],indeterminate:[1540],keepOpen:[4,"keep-open"],divider:[516],gap:[516],badge:[1],type:[1],checkPosition:[513,"check-position"],presentation:[513],roleOverride:[1,"role-override"],density:[514],hasLeadingIcon:[32],hasTrailingIcon:[32]}]);function l(){if(typeof customElements==="undefined"){return}const s=["md-menu-item","md-ripple"];s.forEach((s=>{switch(s){case"md-menu-item":if(!customElements.get(e(s))){customElements.define(e(s),m)}break;case"md-ripple":if(!customElements.get(e(s))){n()}break}}))}l();export{m as M,l as d};
2
- //# sourceMappingURL=p-CJdqKSuf.js.map