@graphysdk/react-renderer 1.9.0-beta.1791811201637 → 1.9.0-beta.1791817361884
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/editable.cjs +1 -1
- package/dist/editable.css +1 -1
- package/dist/editable.mjs +2024 -1993
- package/dist/{history-chords-DQsyAPsK.js → history-chords-Dt-up9SW.js} +46 -43
- package/dist/{history-chords-Dhoww4aF.cjs → history-chords-aIWjSxL3.cjs} +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +22 -22
- package/package.json +4 -4
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require('./history-chords.css');var wi=Object.create,ct=Object.defineProperty,ji=Object.getOwnPropertyDescriptor,ki=Object.getOwnPropertyNames,Ei=Object.getPrototypeOf,Ri=Object.prototype.hasOwnProperty,Ci=(e,t)=>{let r={};for(var n in e)ct(r,n,{get:e[n],enumerable:!0});return t||ct(r,Symbol.toStringTag,{value:"Module"}),r},Ii=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(var o=ki(t),a=0,s=o.length,l;a<s;a++)l=o[a],!Ri.call(e,l)&&l!==r&&ct(e,l,{get:(c=>t[c]).bind(null,l),enumerable:!(n=ji(t,l))||n.enumerable});return e},In=(e,t,r)=>(r=e!=null?wi(Ei(e)):{},Ii(t||!e||!e.__esModule?ct(r,"default",{value:e,enumerable:!0}):r,e));let d=require("@graphysdk/viz-engine"),v=require("react"),i=require("react/jsx-runtime"),Oe=require("zustand"),R=require("motion/react"),Mi=require("d3-interpolate-path"),q=require("zustand/react/shallow"),xt=require("@vanilla-extract/dynamic"),er=require("zustand/vanilla"),Mn=require("react-dom"),U=require("clsx");U=In(U,1);let Ti=require("lodash-es"),Bi=require("react-intl"),Z=require("@floating-ui/react-dom"),Oi=require("color2k");typeof window<"u"&&(window.__GRAPHY_SDK__??={},window.__GRAPHY_SDK__.reactRenderer="1.9.0-beta.1791811201637");function Tn(e){for(const t of e)(t.severity==="error"?console.error:console.warn)(`[graphy] ${t.code}: ${t.message}`,t)}var Bn=(0,v.createContext)(null),Li=Bn.Provider,Fi=null,yt=()=>(0,v.useContext)(Bn)??(Fi??=(0,d.createDataLabelPlacementResolver)());var tr=(0,v.createContext)(null),G=()=>{const e=(0,v.useContext)(tr);if(!e)throw new Error("useGraph* hooks must be used inside a <GraphProvider>");return e},M=e=>{const{store:t}=G();return(0,Oe.useStore)(t,r=>e(r.scene))},Le=e=>e==="none"?"none":`${e.offsetX}px ${e.offsetY}px ${e.blur}px ${e.color}`,Ni=e=>e==="none"?"none":`${e.offsetX}px ${e.offsetY}px ${e.blur}px ${e.color}`,Se=e=>{if(e!=="none")return`drop-shadow(${e.offsetX}px ${e.offsetY}px ${e.blur}px ${e.color})`},bt=(0,v.createContext)(null),Gr=["shadow","blendMode","alpha","fillAlpha","fill"],Di=(e,t)=>(0,v.useMemo)(()=>{if(Object.keys(e.styles.parts).length>0)return;const r=e.data.getFirst();if(r===null)return;const n=t.get("shadow",r),o=Se(n);if(o===void 0)return;const a=new Map,s=(u,h)=>{switch(h){case"shadow":return Vi(t.get("shadow",u),n);case"blendMode":return t.get("blendMode",u)==="normal";case"alpha":return t.get("alpha",u)>=1;case"fillAlpha":return(t.get("fillAlpha",u)??1)>=1;case"fill":{const g=t.get("fill",u);if(g===void 0)return!0;const p=(0,d.paintKey)(g);let m=a.get(p);return m===void 0&&(m=(0,d.isOpaquePaint)(g),a.set(p,m)),m}}},l=Gi(e.styles),c=Gr.filter(u=>l.has(u)||Wi(e,u));if(!Gr.filter(u=>!c.includes(u)).some(u=>!s(r,u)))return c.length===0||e.data.findFirst(u=>c.some(h=>!s(u,h)))===null?o:void 0},[e,t]),Hi=(e,t)=>{const r=(0,v.useContext)(bt),n=r?.layerId===e.id&&r.paintsShadow;return(0,v.useMemo)(()=>n?Ui(t):t,[n,t])},Gi=e=>{const t=new Set;for(const r of[...e.defaults,...e.overrides])if(!(r.matches===void 0||r.state!==void 0||r.part!==void 0))for(const n of Object.keys(r.declarations))t.add(n);return t},Wi=(e,t)=>{const r=e.styles.observation.aesthetics[t];return r===void 0||!Object.hasOwn(d.VISUAL_VARIABLES,r)?!1:e.data.hasVariable(d.VISUAL_VARIABLES[r])},Vi=(e,t)=>e==="none"||t==="none"?e===t:e.offsetX===t.offsetX&&e.offsetY===t.offsetY&&e.blur===t.blur&&e.color===t.color,Ui=e=>{const{get:t,resolve:r}=e;return{...e,get:(a,s,l)=>a==="shadow"&&l===void 0?"none":t(a,s,l),resolve:(a,s)=>{const l=r(a,s);return s===void 0&&(l.shadow="none"),l}}},rr=()=>G().styleResolver,F=e=>Hi(e,Pe()(e)),B=()=>{const e=rr(),t=M(r=>r.chrome);return e.readers({chrome:t})},On=e=>{const t=Pe(),r=M(n=>n.layers).find(n=>n.id===e);return r===void 0?null:t(r)},Ln=e=>{const t=Pe(),r=M(n=>n.layers).find(n=>n.id===e.layerId);return r===void 0?void 0:(0,d.readGeomColor)({geom:t},r,e.observation)},zi=()=>{const e=Pe(),t=M(r=>r.layers);return(0,v.useMemo)(()=>r=>{const n=(0,d.readAnchoredObservation)(t,r);if(n!==null)return(0,d.readGeomColor)({geom:e},n.layer,n.observation)},[t,e])},Yi=e=>{const t=Pe(),r=M(n=>n.layers);return(0,v.useMemo)(()=>n=>{const o=(0,d.readAnchoredObservation)(r,n);if(o===null)return{};const a=(0,d.resolveSwatchGeomPaint)(t,o.layer,o.observation,{width:e,height:e});return{color:(0,d.readGeomColor)({geom:t},o.layer,o.observation),fill:a.fill,alpha:a.alpha,cornerRadius:a.cornerRadiusPx,symbol:a.symbol}},[r,t,e])},Pe=()=>{const e=rr();return M(t=>e.readers(t).geom)},Ki={centerX:0,centerY:0,radius:1},Fe=e=>{const t=Math.min(e.width,e.height);return{centerX:(e.width-t)/2+t/2,centerY:(e.height-t)/2+t/2,radius:t/2}},$e=e=>{const{radius:t}=Fe(e),r=t>0?1/t:1;return{x:r,y:r}},Q=(e,t,r=Ki)=>{const n=(0,d.polarToUnit)(e,t);return{x:r.centerX+n.x*r.radius,y:r.centerY-n.y*r.radius}},pe=(e,t)=>({x:(0,d.toViewBoxX)(e),y:(0,d.toViewBoxY)(t)}),$=(e,t)=>{const r=Q(e,t);return{x:(r.x+1)/2,y:(r.y+1)/2}},At=({symbol:e,cx:t,cy:r,size:n,fill:o,fillOpacity:a,opacity:s,stroke:l,strokeOpacity:c,strokeWidth:u,style:h,motion:g,"data-testid":p})=>{const m={fill:o,fillOpacity:a,stroke:l,strokeOpacity:c,strokeWidth:u,style:h},f=g?.fadesIn?{opacity:0}:{};if(e==="circle"){const S=n/2;return g?(0,i.jsx)(R.motion.circle,{initial:g.intro?{cx:t,cy:r,r:0,...f}:!1,transition:g.transition,animate:{cx:t,cy:r,r:S,opacity:s},"data-testid":p,...m}):(0,i.jsx)("circle",{cx:t,cy:r,r:S,opacity:s,"data-testid":p,...m})}const y=(0,d.buildPointSymbolPath)(e,n),x={...m,strokeLinejoin:"round",style:{transformBox:"view-box",...h}};return g?(0,i.jsx)(R.motion.path,{initial:g.intro?{x:t,y:r,d:y,scale:0,...f}:!1,transition:g.transition,animate:{x:t,y:r,d:y,scale:1,opacity:s},"data-testid":p,...x,style:{...x.style,originX:0,originY:0}}):(0,i.jsx)("path",{d:y,opacity:s,"data-testid":p,...x,style:{...x.style,transform:`translate(${t}, ${r})`}})},Xi=2,Qi=.7,me=({hit:e,project:t=pe})=>{const r=On(e.layerId),n=Ln(e)??d.DEFAULT_GEOM_COLOR;if(!e.anchored)return null;const o=((0,d.getAlpha)(e.observation)??1)*Qi,a=r?.get("size",e.observation)??d.DEFAULT_POINT_SIZE_PX,s=r?.get("stroke",e.observation,"hovered")??d.DEFAULT_HOVER_AFFORDANCE_COLOR,l=t(e.x,e.y);return(0,i.jsx)(At,{symbol:r?.get("symbol",e.observation)??"circle",cx:(0,d.toPercent)(l.x),cy:(0,d.toPercent)(l.y),size:a,fill:n,opacity:o,stroke:s,strokeWidth:Xi,"data-testid":"companion-point"})};var Wr=10**2,N=e=>Math.round(e*Wr)/Wr,qi=e=>e.map(({x:t,y:r})=>`M${N(t)},${N(r)}h0`).join(""),Ji=(e,t,r)=>{const n=r.axis==="x",o=n?e.y:e.x,a=n?e.x:e.y,s=n?e.height:e.width,l=n?e.width:e.height,c=Math.max(Math.min(r.from,r.to),a),u=Math.min(Math.max(r.from,r.to),a+l);if(u-c<=0||s<=0)return"";const h=Math.max(0,Math.min(t,s/2)),g=Math.max(0,Math.min(t,l/2)),p=a+g,m=a+l-g,f=o+s,y=n?0:1,x=(j,T)=>{const[O,V]=n?[T,j]:[j,T];return`${N(O)},${N(V)}`},[S,A]=(n?[g,h]:[h,g]).map(N),P=(j,T)=>`A${S},${A} 0 0 ${y} ${x(j,T)}`,w=j=>{if(h<=0||g<=0)return 0;const T=j<p?p-j:j>m?j-m:0,O=Math.min(1,T/g);return h*(1-Math.sqrt(1-O*O))},k=(j,T)=>h>0&&g>0&&(Math.max(j,T)<=p||Math.min(j,T)>=m),E=[c,...new Set([p,m].filter(j=>j>c&&j<u)),u],C=[`M${x(o+w(c),c)}`,`L${x(f-w(c),c)}`];for(let j=1;j<E.length;j++){const T=E[j-1]??c,O=E[j]??u;C.push(k(T,O)?P(f-w(O),O):`L${x(f,O)}`)}C.push(`L${x(o+w(u),u)}`);for(let j=E.length-1;j>0;j--){const T=E[j]??u,O=E[j-1]??c;C.push(k(T,O)?P(o+w(O),O):`L${x(o,O)}`)}return`${C.join("")}Z`},Fn=(e,t,r)=>{const n=e.digits?.()??null,o=n===null?null:10**n,a=c=>o===null?c:Math.round(c*o)/o,s=(c,u)=>Dn(a(c),a(u),r);let l="";return e.context({moveTo:(c,u)=>{l+=`M${s(c,u)}`},lineTo:(c,u)=>{l+=`L${s(c,u)}`},bezierCurveTo:(c,u,h,g,p,m)=>{l+=`C${s(c,u)},${s(h,g)},${s(p,m)}`},closePath:()=>{l+="Z"}}),e(t),e.context(null),l},Yt=(e,t)=>{let r="";for(let n=0;n<e.length;n++){const o=e[n];o!==void 0&&(r+=`${n===0?"M":"L"}${Dn(o.x,o.y,t)}`)}return r===""?"":`${r}Z`},Je=(e,t)=>({x:e.x*t.width,y:e.y*t.height}),Nn=e=>{const t=new Map;for(const{center:r,size:n}of e){const o=t.get(n)??[];o.push(r),t.set(n,o)}return[...t].map(([r,n])=>({kind:"dots",centers:n,size:r}))},Dn=(e,t,{origin:r,scaleX:n,scaleY:o})=>`${N(r.x+e*n)},${N(r.y+t*o)}`,Zi=({layer:e,coordSystem:t,panelRect:r,shouldAnimateTransitions:n})=>{const{areaGenerator:o}=(0,d.createAreaPathGenerators)(t,e.params),a={origin:{x:0,y:0},scaleX:r.width,scaleY:r.height};let s="";const l=[];e.data.groupBy(d.GROUP_VARIABLES.group).forEach(u=>{const h=(0,d.prepareAreaObservations)([...u],e.params.missingValues),[g]=h;if(g!==void 0){if(h.length===1){const p=_i(g,t,r);p!==null&&l.push(p);return}s+=Fn(o,h,a)}});const c=s===""?[]:[{kind:"region",pathData:s,shouldAnimateTransitions:n}];return l.length>0&&c.push({kind:"dots",centers:l,size:d.DEFAULT_POINT_SIZE_PX}),c},_i=(e,t,r)=>{if(t.mainAxis==="y"){const a=(0,d.getY)(e),s=(0,d.getXMax)(e)??(0,d.getX)(e);return a===null||s===null?null:Je(pe(s,a),r)}const n=(0,d.getX)(e),o=(0,d.getYMax)(e)??(0,d.getY)(e);return n===null||o===null?null:Je(pe(n,o),r)},Hn=e=>{const t=[...e.brightness===void 0?[]:[`brightness(${e.brightness})`],...e.contrast===void 0?[]:[`contrast(${e.contrast})`],...e.saturation===void 0?[]:[`saturate(${e.saturation})`],...e.blur===void 0?[]:[`blur(${e.blur}px)`],...e.shadow===void 0?[]:[Se(e.shadow)??""]].filter(r=>r!=="");return t.length===0?void 0:t.join(" ")},W=e=>{const t=Hn(e),r=e.blendMode==="normal"?void 0:e.blendMode;if(!(t===void 0&&r===void 0))return{...t===void 0?{}:{filter:t},...r===void 0?{}:{mixBlendMode:r}}},te="_1d8mpa10",ee={type:"spring",stiffness:500,damping:60,mass:1},$i={duration:0},nr=e=>e?ee:$i,dt=(e,t,r)=>{const n=(0,R.useMotionValue)(e),o=(0,v.useRef)(r);return(0,v.useEffect)(()=>{const a=r!==void 0&&r===o.current;if(o.current=r,n.get()===e)return;if(a){n.set(e);return}const s=(0,Mi.interpolatePath)(n.get(),e),l=(0,R.animate)(0,1,{...t,onUpdate:c=>n.set(s(c))});return()=>l.stop()},[t,e,r,n]),n},Gn=({shouldAnimateTransitions:e,...t})=>e?(0,i.jsx)(ts,{...t}):(0,i.jsx)(es,{...t}),es=({fillPath:e,linePath:t,fill:r,fillOpacity:n,stroke:o,strokeWidth:a,strokeOpacity:s,strokeDasharray:l,lineCap:c,lineJoin:u,opacity:h})=>(0,i.jsxs)("g",{opacity:h,children:[(0,i.jsx)("path",{d:e,fill:r,fillOpacity:n,stroke:"none"}),(0,i.jsx)("path",{d:t,fill:"none",stroke:o,strokeWidth:a,strokeOpacity:s,strokeDasharray:l,strokeLinecap:c,strokeLinejoin:u,vectorEffect:"non-scaling-stroke"})]}),ts=({fillPath:e,linePath:t,fill:r,fillOpacity:n,stroke:o,strokeWidth:a,strokeOpacity:s,strokeDasharray:l,lineCap:c,lineJoin:u,opacity:h})=>{const g=dt(e,ee),p=dt(t,ee);return(0,i.jsxs)("g",{opacity:h,children:[(0,i.jsx)(R.motion.path,{d:g,fill:r,fillOpacity:n,stroke:"none"}),(0,i.jsx)(R.motion.path,{d:p,fill:"none",stroke:o,strokeWidth:a,strokeOpacity:s,strokeDasharray:l,strokeLinecap:c,strokeLinejoin:u,vectorEffect:"non-scaling-stroke"})]})},or=(e,t)=>{const r=(t!==void 0?e.delayByKey[t]:void 0)??0;return{duration:e.durationSeconds,ease:e.growAxis==="angle"?"circOut":"backOut",delay:r}},rs=e=>({duration:e.durationSeconds,ease:"easeOut"}),Wn=e=>({duration:e.durationSeconds,ease:"easeOut"}),ns=e=>os(e)+e.durationSeconds,os=e=>{switch(e.type){case"grow":return Object.values(e.delayByKey).reduce((t,r)=>Math.max(t,r),0);case"wipe":case"fade":return 0}},Vr=110,Ur=150,ar=({intro:e,children:t})=>{const r=(0,v.useId)();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("clipPath",{id:r,children:(0,i.jsx)(R.motion.rect,{...as(e.axis),transition:rs(e)})}),(0,i.jsx)("g",{clipPath:`url(#${r})`,children:t})]})},as=e=>e==="x"?{x:"-5%",y:"-25%",height:`${Ur}%`,initial:{width:"0%"},animate:{width:`${Vr}%`}}:{x:"-25%",y:"-5%",width:`${Ur}%`,initial:{height:"0%"},animate:{height:`${Vr}%`}},ie=({effects:e,...t})=>(0,i.jsx)("g",{style:e,children:(0,i.jsx)("svg",{...t})}),is=(0,v.memo)(function({layer:t,coordSystem:r,shouldAnimateTransitions:n,intro:o}){const a=o?.type==="wipe"?o:null,{lineGenerator:s,areaGenerator:l}=(0,v.useMemo)(()=>(0,d.createAreaPathGenerators)(r,t.params),[t.params,r]),c=F(t),u=(0,v.useMemo)(()=>{const h=(0,d.createStableKeyGenerator)(t.data,t.mapping,t.id),g=[];return t.data.groupBy(d.GROUP_VARIABLES.group).forEach(p=>{const m=(0,d.prepareAreaObservations)([...p],t.params.missingValues),f=l(m),y=s(m);if(!f||!y)return;const x=m[0];if(!x)return;const S=(0,d.toPaintColor)(c.get("fill",x)),A=c.get("stroke",x)??S,P=c.get("strokeWidth",x),w=(0,d.toStrokeDasharray)(c.get("dashArray",x),c.get("strokeWidth",x)),k=c.get("lineCap",x),E=c.get("lineJoin",x);g.push({key:h(x),areaPath:f,linePath:y,fill:S,stroke:A,fillOpacity:c.get("fillAlpha",x)*c.get("alpha",x),strokeWidth:P,strokeOpacity:c.get("strokeAlpha",x)*c.get("alpha",x),strokeDasharray:w,lineCap:k,lineJoin:E})}),g},[l,s,t.data,t.id,t.mapping,t.params,c]).map(h=>(0,i.jsx)(ss,{areaPath:h.areaPath,linePath:h.linePath,fill:h.fill,stroke:h.stroke,fillOpacity:h.fillOpacity,strokeWidth:h.strokeWidth,strokeOpacity:h.strokeOpacity,strokeDasharray:h.strokeDasharray,lineCap:h.lineCap,lineJoin:h.lineJoin,shouldAnimateTransitions:n},h.key));return(0,i.jsx)(ie,{viewBox:"0 0 1 1",preserveAspectRatio:"none",width:"100%",height:"100%","data-geom":"area",effects:W((0,d.readGeomEffects)(c,t.data.getFirst()??void 0)),className:te,children:a?(0,i.jsx)(ar,{intro:a,children:u}):u})}),ss=({areaPath:e,linePath:t,fill:r,stroke:n,fillOpacity:o,strokeWidth:a,strokeOpacity:s,strokeDasharray:l,lineCap:c,lineJoin:u,shouldAnimateTransitions:h})=>(0,i.jsx)(Gn,{fillPath:e,linePath:t,fill:r,fillOpacity:o,stroke:n,strokeWidth:a,strokeOpacity:s,strokeDasharray:l,lineCap:c,lineJoin:u,shouldAnimateTransitions:h}),Vn=1,ls=.4,cs=.2,ds=1,us=.5,hs=2.25,Ne=({hit:e,project:t=pe,...r})=>{const n=On(e.layerId),o=Ln(e)??d.DEFAULT_GEOM_COLOR;if(!e.anchored)return null;const a=(0,d.getAlpha)(e.observation)??1,s=n?.get("stroke",e.observation,"hovered")??d.DEFAULT_HOVER_AFFORDANCE_COLOR,l=n?.get("symbol",e.observation)??"circle",c=t(e.x,e.y),u=(0,d.toPercent)(c.x),h=(0,d.toPercent)(c.y),g=gs(e.observation,n),{ringRadius:p,ringWidth:m}=fs(g,(0,d.getPointSymbolOuterRadius)(l,g*2)),f=n?W((0,d.readGeomEffects)(n,e.observation,"hovered")):void 0;return(0,i.jsxs)("g",{...r,style:f,children:[(0,i.jsx)("circle",{cx:u,cy:h,r:p,fill:"none",stroke:s,strokeWidth:m}),(0,i.jsx)(At,{symbol:l,cx:u,cy:h,size:g*2,fill:o,opacity:a,stroke:s,strokeWidth:Vn})]})},gs=(e,t)=>{const r=t?.get("size",e),n=(0,d.getSize)(e)??null;return n!==null?(r??n)/hs:(r??12)/2},fs=(e,t)=>{const r=Math.max(ds,e*ls),n=Math.max(us,e*cs);return{ringRadius:t+Vn/2+n+r/2,ringWidth:r}},vs=({layer:e,coordSystem:t,primary:r,companions:n})=>{const o=F(e),a=(0,d.getGroup)(r.observation),s=(0,v.useMemo)(()=>(0,d.prepareAreaObservations)([...e.data.filter(d.GROUP_VARIABLES.group,"eq",a)],e.params.missingValues),[e.data,e.params.missingValues,a]),{areaPath:l,linePath:c}=(0,v.useMemo)(()=>{const{lineGenerator:A,areaGenerator:P}=(0,d.createAreaPathGenerators)(t,e.params);return{areaPath:P(s)??"",linePath:A(s)??""}},[t,e.params,s]);if(!l||!c)return null;const u=(0,d.toPaintColor)(o.get("fill",r.observation,"hovered")),h=o.get("stroke",r.observation,"hovered")??u,g=o.get("alpha",r.observation,"hovered"),p=o.get("fillAlpha",r.observation,"hovered")*g,m=o.get("strokeAlpha",r.observation,"hovered")*g,f=o.get("strokeWidth",r.observation,"hovered"),y=(0,d.toStrokeDasharray)(o.get("dashArray",r.observation,"hovered"),f),x=o.get("lineCap",r.observation,"hovered"),S=o.get("lineJoin",r.observation,"hovered");return(0,i.jsxs)("g",{"data-testid":"hovered-area",children:[(0,i.jsxs)(ie,{viewBox:"0 0 1 1",preserveAspectRatio:"none",width:"100%",height:"100%","data-geom":"area",effects:W((0,d.readGeomEffects)(o,r.observation,"hovered")),className:te,children:[(0,i.jsx)("path",{d:l,fill:u,fillOpacity:p,stroke:"none","data-testid":"hovered-area-fill"}),(0,i.jsx)("path",{d:c,fill:"none",stroke:h,strokeWidth:f,strokeOpacity:m,strokeDasharray:y,strokeLinecap:x,strokeLinejoin:S,vectorEffect:"non-scaling-stroke","data-testid":"hovered-area-edge"})]}),n.map(A=>(0,i.jsx)(me,{hit:A},`companion-${A.layerId}-${A.pointIndex}`)),(0,i.jsx)(Ne,{hit:r,"data-testid":"hovered-area-point"})]})},ps={geom:"area",coord:"cartesian",swatchShape:"area",guideMode:"crosshair",render:({layer:e,coordSystem:t,shouldAnimateTransitions:r,intro:n})=>(0,i.jsx)(is,{layer:e,coordSystem:t,shouldAnimateTransitions:r,intro:n}),renderHover:({layer:e,coordSystem:t,primary:r,group:n,related:o})=>(0,i.jsx)(vs,{layer:e,coordSystem:t,primary:r,companions:[...n,...o]}),renderHoverCompanions:({related:e})=>(0,i.jsx)(i.Fragment,{children:e.map(t=>(0,i.jsx)(me,{hit:t},`companion-${t.layerId}-${t.pointIndex}`))}),getEditOutlineShapes:Zi,getOverlayAnchor:({observation:e,coordSystem:t})=>{if(t.mainAxis==="x"){const o=(0,d.getX)(e),a=(0,d.getYMax)(e)??(0,d.getY)(e);return o===null||a===null?null:{x:o,y:a}}const r=(0,d.getY)(e),n=(0,d.getXMax)(e)??(0,d.getX)(e);return r===null||n===null?null:{x:n,y:r}}},Un=e=>{const t=new WeakMap;return(r,...n)=>{const o=t.get(r);if(o!==void 0&&o.args.every((s,l)=>s===n[l]))return o.result;const a=e(r,...n);return t.set(r,{args:n,result:a}),a}},St=(e,t)=>({stroke:e.get("stroke",t),strokeWidth:e.get("strokeWidth",t),cornerRadius:e.get("cornerRadius",t),strokeAlpha:e.get("strokeAlpha",t)}),et=(e,t)=>(0,v.useMemo)(()=>{const r=Array.from(e.data,o=>t.get("fill",o));return{paints:r,paintAt:o=>{const a=r[o];if(a===void 0)throw new Error(`No resolved fill for observation ${o}.`);return a}}},[e.data,t]);var zr="\0",zn=(e,t)=>{const r=e.size??32;return{width:r,height:t==null?r:r*t.height/t.width}},ms=e=>new Promise(t=>{if(typeof Image>"u"){t(null);return}const r=new Image;r.onload=()=>{const{naturalWidth:n,naturalHeight:o}=r;t(n>0&&o>0?{width:n,height:o}:null)},r.onerror=()=>t(null),r.src=e}),De=e=>{const t=[...new Set(e.map(Yr).filter(s=>s!==void 0))].join(zr),[r,n]=(0,v.useState)(()=>new Map),o=(0,v.useRef)(new Set),a=(0,v.useRef)(new Set);return(0,v.useEffect)(()=>()=>{o.current=new Set},[]),(0,v.useEffect)(()=>{const s=new Set(t===""?[]:t.split(zr));o.current=s;for(const l of a.current)s.has(l)||a.current.delete(l);n(l=>{const c=new Map([...l].filter(([u])=>s.has(u)));return c.size===l.size?l:c});for(const l of s)r.has(l)||a.current.has(l)||(a.current.add(l),ms(l).then(c=>{o.current.has(l)&&(a.current.delete(l),n(u=>new Map(u).set(l,c)))}))},[t,r]),(0,v.useCallback)(s=>{const l=Yr(s);return l===void 0?void 0:r.get(l)},[r])},Yr=e=>e!==void 0&&(0,d.isImagePaint)(e)&&(e.fit??"tile")==="tile"?e.image:void 0;var xs=1/3,ys={x:1,y:1},bs={x:0,y:0},Y=({paints:e,unitsPerPixel:t=ys,origin:r=bs})=>{const n=(0,v.useId)(),o=(0,v.useMemo)(()=>{const a=new Map,s=new Set;for(const l of e){if(typeof l=="string")continue;const c=(0,d.paintKey)(l);if(a.has(c))continue;const u=`${n}paint-${As(c)}`;let h=u,g=1;for(;s.has(h);)h=`${u}-${g++}`;s.add(h),a.set(c,{id:h,paint:l})}return a},[e,n]);return{fillFor:(0,v.useCallback)(a=>{if(typeof a=="string")return a;const s=o.get((0,d.paintKey)(a));if(s===void 0)throw new Error("fillFor requires a paint supplied to usePaintDefs.");return`url(#${s.id})`},[o]),defs:(0,i.jsx)(Ss,{entries:[...o.values()],unitsPerPixel:t,origin:r})}},As=e=>{let t=2166136261;for(let r=0;r<e.length;r++)t^=e.charCodeAt(r),t=Math.imul(t,16777619);return(t>>>0).toString(36)},Ss=({entries:e,unitsPerPixel:t,origin:r})=>{const n=De(e.map(({paint:o})=>o));return e.length===0?null:(0,i.jsx)("defs",{children:e.map(({id:o,paint:a})=>(0,i.jsx)(Ps,{id:o,paint:a,unitsPerPixel:t,origin:r,imageSize:n(a)},o))})},Ps=({id:e,paint:t,unitsPerPixel:r,origin:n,imageSize:o})=>(0,d.isGradientPaint)(t)?(0,i.jsx)(js,{id:e,paint:t}):(0,d.isPatternPaint)(t)?(0,i.jsx)(ks,{id:e,paint:t,unitsPerPixel:r,origin:n}):(0,i.jsx)(Es,{id:e,paint:t,unitsPerPixel:r,origin:n,imageSize:o}),Yn=e=>({x:(0,d.toPercent)(e.x),y:(0,d.toPercent)(e.y)}),ws=e=>{const t=(e-90)*Math.PI/180,r=Math.cos(t)/2,n=Math.sin(t)/2;return{x1:.5-r,y1:.5-n,x2:.5+r,y2:.5+n}},js=({id:e,paint:t})=>{const r=t.stops.map((n,o)=>(0,i.jsx)("stop",{offset:n.offset,stopColor:n.color},o));return t.gradient==="radial"?(0,i.jsx)("radialGradient",{id:e,gradientUnits:"objectBoundingBox",children:r}):(0,i.jsx)("linearGradient",{id:e,gradientUnits:"objectBoundingBox",...ws(t.angle??180),children:r})},ks=({id:e,paint:t,unitsPerPixel:r,origin:n})=>{const o=t.size??8,a=o/2;return(0,i.jsxs)("pattern",{id:e,...Yn(n),patternUnits:"userSpaceOnUse",width:o*r.x,height:o*r.y,viewBox:`0 0 ${o} ${o}`,preserveAspectRatio:"none",children:[t.background!==void 0&&(0,i.jsx)("rect",{width:o,height:o,fill:t.background}),t.pattern==="dots"&&(0,i.jsx)("circle",{cx:a,cy:a,r:o/6,fill:t.color}),t.pattern==="lines"&&(0,i.jsx)("rect",{width:o,height:o*.3333333333333333,fill:t.color}),(t.pattern==="diagonal"||t.pattern==="crosshatch")&&(0,i.jsx)("path",{d:`M0 ${o} L${o} 0`,stroke:t.color,strokeWidth:o/6,fill:"none"}),t.pattern==="crosshatch"&&(0,i.jsx)("path",{d:`M0 0 L${o} ${o}`,stroke:t.color,strokeWidth:o/6,fill:"none"})]})},Es=({id:e,paint:t,unitsPerPixel:r,origin:n,imageSize:o})=>{if((t.fit??"tile")==="stretch")return(0,i.jsxs)("pattern",{id:e,patternUnits:"objectBoundingBox",patternContentUnits:"objectBoundingBox",width:1,height:1,children:[(0,i.jsx)("rect",{width:1,height:1,fill:t.fallback}),(0,i.jsx)("image",{href:t.image,width:1,height:1,opacity:t.alpha,preserveAspectRatio:"none"})]});const a=zn(t,o);return(0,i.jsxs)("pattern",{id:e,...Yn(n),patternUnits:"userSpaceOnUse",width:a.width*r.x,height:a.height*r.y,viewBox:`0 0 ${a.width} ${a.height}`,preserveAspectRatio:"none",children:[(0,i.jsx)("rect",{width:a.width,height:a.height,fill:t.fallback}),(0,i.jsx)("image",{href:t.image,width:a.width,height:a.height,opacity:t.alpha,preserveAspectRatio:"none"})]})},Kn=(e,t,r,n)=>{const o=new Map;let a=-1;for(const l of e.data){a+=1;const c=(0,d.getBarRectBounds)(t,l);if(!c)continue;const u=(0,d.buildColumnKey)(t,c),h=n(l,c,a),g=o.get(u);g===void 0?o.set(u,{firstObservation:l,segments:[h]}):g.segments.push(h)}const s=new Map;for(const[l,{firstObservation:c,segments:u}]of o)s.set(l,{style:St(r,c),bounds:(0,d.getBoundingRect)(u),segments:u});return s},ir=(e,t,r)=>{const n=new Map;for(const[o,{style:a,bounds:s}]of Kn(e,t,r,Is))n.set(o,{style:a,bounds:s});return n},Xn=(e,t,r,n)=>{const o=(0,d.getBarRectBounds)(t,n);return o?e.get((0,d.buildColumnKey)(t,o))??{style:St(r,n),bounds:o}:null},Ae=(e,t)=>({x:e.x*t.width,y:e.y*t.height,width:e.width*t.width,height:e.height*t.height}),Kt=(e,t)=>({x:e.x-t,y:e.y-t,width:Math.max(0,e.width+t*2),height:Math.max(0,e.height+t*2)}),de=(e,t)=>{const r=N(e.x),n=N(e.y),o=N(e.x+e.width),a=N(e.y+e.height),s=N(Math.max(0,Math.min(t,e.width/2))),l=N(Math.max(0,Math.min(t,e.height/2)));if(s<=0||l<=0)return`M${r},${n}H${o}V${a}H${r}Z`;const c=`A${s},${l} 0 0 1 `,[u,h,g,p]=[`${r}`,`${n}`,`${o}`,`${a}`],m=`${N(r+s)}`,f=`${N(o-s)}`,y=`${N(n+l)}`,x=`${N(a-l)}`;return`M${m},${h}H${f}${c}${g},${y}V${x}${c}${f},${p}H${m}${c}${u},${x}V${y}${c}${m},${h}Z`},Rs=({observation:e,mainAxis:t,styleReaders:r,column:n,panelRect:o,fill:a})=>{const s=(0,v.useId)(),l=(0,v.useId)(),c=(0,d.getBarRectBounds)(t,e);if(!c)return null;const u=Ae(c,o),h=Ae(n.bounds,o),{stroke:g,strokeWidth:p,cornerRadius:m,strokeAlpha:f}=n.style,y=(0,d.resolveBarCornerRadiusPx)({cornerRadius:m,mainAxis:t,bounds:h}),x=de(u,0),S=de(h,y),A=r.get("alpha",e)*r.get("fillAlpha",e),P=(0,d.resolveBarBorderTreatment)(p);return(0,i.jsxs)("g",{clipPath:`url(#${s})`,children:[(0,i.jsx)("clipPath",{id:s,children:(0,i.jsx)("path",{d:x})}),(0,i.jsx)("clipPath",{id:l,children:(0,i.jsx)("path",{d:S})}),(0,i.jsxs)("g",{clipPath:`url(#${l})`,children:[(0,i.jsx)("path",{d:x,fill:a,opacity:A,"data-testid":"highlight-bar-segment"}),g!==void 0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("path",{d:x,fill:"none",stroke:g,strokeWidth:P.separatorWidth,opacity:A,"data-testid":"highlight-bar-segment-border"}),(0,i.jsx)("path",{d:S,fill:"none",stroke:g,strokeWidth:P.outlineWidth,opacity:f})]})]})]})},Cs=({layer:e,sourceLayer:t,coordSystem:r,panelRect:n})=>{const o=F(t),a=(0,v.useMemo)(()=>ir(t,r.mainAxis,o),[t,r.mainAxis,o]),{paints:s,paintAt:l}=et(e,o),{fillFor:c,defs:u}=Y({paints:s,origin:sr(t,r)}),h=(0,d.createStableKeyGenerator)(e.data,e.mapping,e.id),g=[];let p=-1;for(const m of e.data){p+=1;const f=Xn(a,r.mainAxis,o,m);f!==null&&g.push((0,i.jsx)(Rs,{observation:m,mainAxis:r.mainAxis,styleReaders:o,column:f,panelRect:n,fill:c(l(p))},h(m)))}return(0,i.jsxs)(i.Fragment,{children:[u,g]})},sr=(e,t)=>{const r=M(n=>n.scales);return(0,v.useMemo)(()=>(0,d.resolveBarPaintOrigin)(e,t,r),[e,t,r])},Is=(e,t)=>t,Ms=Un(ir),Ts=({layer:e,sourceLayer:t,coordSystem:r,panelRect:n,styleReaders:o,shouldAnimateTransitions:a})=>{const{mainAxis:s}=r,l=Ms(t,s,o),c=Bs(e.data);let u="";for(let h=0;h<e.data.size();h++){const g=(0,d.buildBarRectBounds)(s,{xMin:c.xMin[h]??null,xMax:c.xMax[h]??null,yMin:c.yMin[h]??null,yMax:c.yMax?.[h]??null,y:c.y?.[h]??null});if(g===null)continue;const p=l.get((0,d.buildColumnKey)(s,g));if(p===void 0)continue;const m=Ae(p.bounds,n),f=Ae(g,n),y=(0,d.resolveBarCornerRadiusPx)({cornerRadius:p.style.cornerRadius,mainAxis:s,bounds:m});u+=Os(f,m)?de(m,y):Ji(m,y,s==="x"?{axis:"y",from:f.y,to:f.y+f.height}:{axis:"x",from:f.x,to:f.x+f.width})}return u===""?[]:[{kind:"region",pathData:u,shouldAnimateTransitions:a}]},Bs=e=>{const t=r=>e.hasVariable(r)?e.getValues(r,{type:"numeric"}):null;return{xMin:e.getValues(d.POSITION_VARIABLES.xMin,{type:"numeric"}),xMax:e.getValues(d.POSITION_VARIABLES.xMax,{type:"numeric"}),yMin:e.getValues(d.POSITION_VARIABLES.yMin,{type:"numeric"}),yMax:t(d.POSITION_VARIABLES.yMax),y:t(d.POSITION_VARIABLES.y)}},Os=(e,t)=>Math.abs(e.x-t.x)<.5&&Math.abs(e.y-t.y)<.5&&Math.abs(e.width-t.width)<.5&&Math.abs(e.height-t.height)<.5,Xt=(e,t,r)=>{const n=r===void 0?e.activeIntro:r,o=(0,v.useRef)(n?or(n,t):null),a=(0,v.useRef)(e.shouldAnimateTransitions);return a.current=e.shouldAnimateTransitions,(0,v.useCallback)(()=>{const s=o.current;return o.current=null,s??nr(a.current)},[])},Pt=(e,t)=>{const r=(0,v.useRef)(!0);(0,v.useEffect)(()=>{r.current=!1},[]);const n=r.current;return(0,v.useMemo)(()=>({isAnimated:t||e!==null,isLayerEntrance:n,activeIntro:n?e:null,shouldAnimateTransitions:t}),[e,t,n])},Qn=(e,t)=>t.growAxis==="x"?{x:t.baseline,y:e.y,width:0,height:e.height}:{x:e.x,y:t.baseline,width:e.width,height:0},Ls=(0,v.memo)(function({layer:t,coordSystem:r,shouldAnimateTransitions:n,intro:o}){const a=(0,v.useId)(),s=F(t),l=Pt(o?.type==="grow"&&(o.growAxis==="x"||o.growAxis==="y")?o:null,n),{paints:c,paintAt:u}=et(t,s),{fillFor:h,defs:g}=Y({paints:c,origin:sr(t,r)});return(0,i.jsxs)(i.Fragment,{children:[g,(0,v.useMemo)(()=>{const p=(0,d.createStableKeyGenerator)(t.data,t.mapping,t.id);return[...Kn(t,r.mainAxis,s,(m,f,y)=>({key:p(m),...f,fill:h(u(y)),opacity:s.get("alpha",m)*s.get("fillAlpha",m),effects:W((0,d.readGeomEffects)(s,m))})).values()].map(({segments:m,style:f,bounds:y},x)=>{const S=f.stroke===void 0?void 0:(0,d.resolveBarBorderTreatment)(f.strokeWidth);return{key:m[0]?.key??String(x),id:`${a}${x}`,bars:m,effects:Hs(m),...y,radii:Ws({cornerRadius:f.cornerRadius,mainAxis:r.mainAxis,bounds:y}),stroke:f.stroke,outlineOpacity:f.strokeAlpha,clippedStrokeWidth:S?.outlineWidth,separatorStrokeWidth:S?.separatorWidth}})},[a,r.mainAxis,h,t,u,s]).map(p=>{const m=p.effects.scope==="column"?p.effects.style:void 0;if(p.bars.length===1&&p.stroke===void 0){const[f]=p.bars;if(!f)return null;const{key:y,effects:x,...S}=f,A=(0,i.jsx)(lr,{...S,...p.radii,animation:l,introKey:y},y);return m===void 0?A:(0,i.jsx)("g",{style:m,children:A},y)}return(0,i.jsx)("g",{style:m,children:l.isAnimated?(0,i.jsx)(Ns,{column:p,animation:l}):(0,i.jsx)(Fs,{column:p,animation:l})},p.key)})]})}),Fs=({column:e,animation:t})=>{const{id:r,bars:n,radii:o,stroke:a,outlineOpacity:s,clippedStrokeWidth:l}=e,c=a!==void 0,u=(0,i.jsx)("clipPath",{id:r,children:(0,i.jsx)(Kr,{bounds:e,radii:o})});if(n.length===1){const[h]=n;if(!h)return null;const{key:g,effects:p,...m}=h;return(0,i.jsxs)(i.Fragment,{children:[u,(0,i.jsx)("g",{clipPath:`url(#${r})`,children:(0,i.jsx)(lr,{...m,...o,stroke:a,strokeWidth:l,animation:t},g)})]})}return(0,i.jsxs)(i.Fragment,{children:[u,qn(e,t,c&&(0,i.jsx)(Kr,{bounds:e,radii:o,fill:"none",stroke:a,strokeWidth:l,opacity:s}))]})},Ns=({column:e,animation:t})=>{const{id:r,bars:n,radii:o,stroke:a,outlineOpacity:s,clippedStrokeWidth:l}=e,c=a!==void 0,u=Gs(e,t,n[0]?.key),h={x:u.x,y:u.y,width:u.width,height:u.height,rx:o.rx,ry:o.ry},g=(0,i.jsx)("clipPath",{id:r,children:(0,i.jsx)(R.motion.rect,{...h})});if(n.length===1){const[p]=n;return(0,i.jsxs)(i.Fragment,{children:[g,(0,i.jsx)("g",{clipPath:`url(#${r})`,children:(0,i.jsx)(R.motion.rect,{...h,fill:p?.fill,opacity:p?.opacity,stroke:a,strokeWidth:l})})]})}return(0,i.jsxs)(i.Fragment,{children:[g,qn(e,t,c&&(0,i.jsx)(R.motion.rect,{...h,fill:"none",stroke:a,strokeWidth:l,opacity:s}))]})},qn=(e,t,r)=>{const{id:n,bars:o,stroke:a,separatorStrokeWidth:s,effects:l}=e,c=`url(#${n})`;return(0,i.jsxs)(i.Fragment,{children:[o.map(({key:u,effects:h,...g})=>(0,i.jsx)("g",{style:l.scope==="bar"?h:void 0,children:(0,i.jsx)("g",{clipPath:c,children:(0,i.jsx)(lr,{...g,stroke:a,strokeWidth:s,animation:t,introKey:u})})},u)),r&&(0,i.jsx)("g",{clipPath:c,children:r})]})},Ds=(e,t)=>e===t||e!==void 0&&t!==void 0&&e.filter===t.filter&&e.mixBlendMode===t.mixBlendMode,Hs=e=>{const[t,...r]=e,n=t?.effects;return r.every(o=>Ds(o.effects,n))?{scope:"column",style:n}:{scope:"bar"}},lr=({animation:e,introKey:t,rx:r,ry:n,stroke:o,strokeWidth:a,...s})=>{const{isAnimated:l,activeIntro:c,shouldAnimateTransitions:u}=e;if(l){const h=c?Qn(s,c):null;return(0,i.jsx)(R.motion.rect,{initial:h?{attrX:(0,d.toPercent)(h.x),attrY:(0,d.toPercent)(h.y),width:(0,d.toPercent)(h.width),height:(0,d.toPercent)(h.height),opacity:s.opacity}:!1,transition:c?or(c,t):nr(u),fill:s.fill,opacity:s.opacity,rx:r,ry:n,stroke:o,strokeWidth:a,animate:{attrX:(0,d.toPercent)(s.x),attrY:(0,d.toPercent)(s.y),width:(0,d.toPercent)(s.width),height:(0,d.toPercent)(s.height),opacity:s.opacity}})}return(0,i.jsx)("rect",{x:(0,d.toPercent)(s.x),y:(0,d.toPercent)(s.y),width:(0,d.toPercent)(s.width),height:(0,d.toPercent)(s.height),fill:s.fill,opacity:s.opacity,rx:r,ry:n,stroke:o,strokeWidth:a})},Kr=({bounds:e,radii:t,fill:r,stroke:n,strokeWidth:o,opacity:a})=>(0,i.jsx)("rect",{x:(0,d.toPercent)(e.x),y:(0,d.toPercent)(e.y),width:(0,d.toPercent)(e.width),height:(0,d.toPercent)(e.height),rx:t.rx,ry:t.ry,fill:r,stroke:n,strokeWidth:o,opacity:a}),Gs=(e,t,r)=>{const n=t.activeIntro?Qn(e,t.activeIntro):e,o=(0,R.useMotionValue)(n.x),a=(0,R.useMotionValue)(n.y),s=(0,R.useMotionValue)(n.width),l=(0,R.useMotionValue)(n.height),c=Xt(t,r);return(0,v.useEffect)(()=>{const u=c(),h=[(0,R.animate)(o,e.x,u),(0,R.animate)(a,e.y,u),(0,R.animate)(s,e.width,u),(0,R.animate)(l,e.height,u)];return()=>{for(const g of h)g.stop()}},[o,a,s,l,e.x,e.y,e.width,e.height,c]),{x:(0,R.useTransform)(o,d.toPercent),y:(0,R.useTransform)(a,d.toPercent),width:(0,R.useTransform)(s,d.toPercent),height:(0,R.useTransform)(l,d.toPercent)}};function Ws(e){const t=(0,d.resolveBarCornerRadiiPx)(e);if(e.cornerRadius!=="full")return t;const r={};return t.rx!==void 0&&(r.rx=(0,d.toPercent)(t.rx)),t.ry!==void 0&&(r.ry=(0,d.toPercent)(t.ry)),r}var Ht=3,Vs=({layer:e,coordSystem:t,primary:r,panelRect:n})=>{const o=F(e),a=(0,v.useId)(),s=(0,v.useId)(),l=(0,v.useId)(),c=(0,v.useMemo)(()=>ir(e,t.mainAxis,o),[e,t.mainAxis,o]),u=o.get("fill",r.observation,"hovered"),{fillFor:h,defs:g}=Y({paints:[u],origin:sr(e,t)}),p=(0,d.getBarRectBounds)(t.mainAxis,r.observation),m=Xn(c,t.mainAxis,o,r.observation);if(!p||m===null)return null;const f=Ae(p,n),y=Ae(m.bounds,n),{stroke:x,strokeWidth:S,cornerRadius:A,strokeAlpha:P}=m.style,w=(0,d.resolveBarCornerRadiusPx)({cornerRadius:A,mainAxis:t.mainAxis,bounds:y}),k=de(f,0),E=de(y,w),C=de(Kt(f,Ht),0),j=de(Kt(y,Ht),w>0?w+Ht:0),T=h(u),O=o.get("alpha",r.observation,"hovered")*o.get("fillAlpha",r.observation,"hovered"),V=o.get("stroke",r.observation,"hovered"),K=(0,d.resolveBarBorderTreatment)(S);return(0,i.jsxs)("g",{"data-testid":"hovered-bar",style:W((0,d.readGeomEffects)(o,r.observation,"hovered")),children:[g,(0,i.jsx)("clipPath",{id:a,children:(0,i.jsx)("path",{d:j})}),(0,i.jsx)("clipPath",{id:s,children:(0,i.jsx)("path",{d:k})}),(0,i.jsx)("clipPath",{id:l,children:(0,i.jsx)("path",{d:E})}),(0,i.jsx)("g",{clipPath:`url(#${a})`,children:(0,i.jsx)("path",{d:C,fill:V,"data-testid":"hovered-bar-border"})}),(0,i.jsx)("g",{clipPath:`url(#${s})`,children:(0,i.jsxs)("g",{clipPath:`url(#${l})`,children:[(0,i.jsx)("path",{d:k,fill:T,opacity:O,"data-testid":"hovered-bar-fill"}),x!==void 0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("path",{d:k,fill:"none",stroke:x,strokeWidth:K.separatorWidth,opacity:O,"data-testid":"hovered-bar-inner-border"}),(0,i.jsx)("path",{d:E,fill:"none",stroke:x,strokeWidth:K.outlineWidth,opacity:P})]})]})})]})},Us={geom:"bar",coord:"cartesian",swatchShape:"square",guideMode:"band",render:({layer:e,coordSystem:t,shouldAnimateTransitions:r,intro:n})=>(0,i.jsx)(Ls,{layer:e,coordSystem:t,shouldAnimateTransitions:r,intro:n}),renderHighlight:({layer:e,sourceLayer:t,coordSystem:r,panelRect:n})=>(0,i.jsx)(Cs,{layer:e,sourceLayer:t,coordSystem:r,panelRect:n}),renderHover:({layer:e,coordSystem:t,primary:r,panelRect:n})=>(0,i.jsx)(Vs,{layer:e,coordSystem:t,primary:r,panelRect:n}),renderHoverCompanions:()=>null,getEditOutlineShapes:Ts},zs=({layer:e,panelRect:t,styleReaders:r,shouldAnimateTransitions:n})=>{const o=(0,d.createLinePathGenerator)(e.params),a={origin:{x:0,y:0},scaleX:t.width,scaleY:t.height},s=[],l=[];return e.data.groupBy(d.GROUP_VARIABLES.group).forEach(c=>{const u=(0,d.prepareLineObservations)([...c],e.params.missingValues),[h]=u;if(h===void 0)return;if(u.length===1){const p=Ys(h,t);p!==null&&l.push(p);return}const g=Fn(o,u,a);g!==""&&s.push({kind:"stroke",key:String((0,d.getGroup)(h)),pathData:g,width:r.get("strokeWidth",h),shouldAnimateTransitions:n})}),l.length>0&&s.push({kind:"dots",centers:l,size:d.DEFAULT_POINT_SIZE_PX}),s},Ys=(e,t)=>{const r=(0,d.getX)(e),n=(0,d.getY)(e);return r===null||n===null?null:Je(pe(r,n),t)},Ks=(0,v.memo)(function({layer:t,shouldAnimateTransitions:r,intro:n}){const o=n?.type==="wipe"?n:null,a=(0,v.useMemo)(()=>(0,d.createLinePathGenerator)(t.params),[t.params]),s=(0,v.useMemo)(()=>(0,d.createLineFillAreaGenerator)(t.params),[t.params]),l=F(t),c=(0,v.useMemo)(()=>{const u=(0,d.createStableKeyGenerator)(t.data,t.mapping,t.id),h=[];return t.data.groupBy(d.GROUP_VARIABLES.group).forEach(g=>{const p=(0,d.prepareLineObservations)([...g],t.params.missingValues),m=a(p);if(!m)return;const f=p[0];if(!f)return;const y=l.get("fillAlpha",f),x=y===void 0?void 0:s(p)??void 0,S=l.get("stroke",f),A=l.get("fill",f),P=A===void 0?S:(0,d.toPaintColor)(A),w=l.get("strokeWidth",f),k=(0,d.toStrokeDasharray)(l.get("dashArray",f),l.get("strokeWidth",f)),E=l.get("lineCap",f),C=l.get("lineJoin",f);h.push({key:u(f),pathData:m,fillPath:x,fillAlpha:y,stroke:S,fill:P,opacity:l.get("alpha",f),strokeAlpha:l.get("strokeAlpha",f),strokeWidth:w,strokeDasharray:k,lineCap:E,lineJoin:C})}),h},[a,s,t.data,t.id,t.mapping,t.params,l]).map(u=>(0,i.jsx)(Xs,{pathData:u.pathData,fillPath:u.fillPath,fillAlpha:u.fillAlpha,stroke:u.stroke,fill:u.fill,strokeWidth:u.strokeWidth,opacity:u.opacity,strokeAlpha:u.strokeAlpha,strokeDasharray:u.strokeDasharray,lineCap:u.lineCap,lineJoin:u.lineJoin,shouldAnimateTransitions:r},u.key));return(0,i.jsx)(ie,{viewBox:"0 0 1 1",preserveAspectRatio:"none",width:"100%",height:"100%","data-geom":"line",effects:W((0,d.readGeomEffects)(l,t.data.getFirst()??void 0)),className:te,children:o?(0,i.jsx)(ar,{intro:o,children:c}):c})}),Xs=({pathData:e,fillPath:t,fillAlpha:r,stroke:n,fill:o,strokeWidth:a,opacity:s,strokeAlpha:l,strokeDasharray:c,lineCap:u,lineJoin:h,shouldAnimateTransitions:g})=>t!==void 0&&r!==void 0?(0,i.jsx)(Qs,{fillPath:t,fillAlpha:r,fill:o,linePath:e,stroke:n,strokeWidth:a,opacity:s,strokeAlpha:l,strokeDasharray:c,lineCap:u,lineJoin:h,shouldAnimateTransitions:g}):g?(0,i.jsx)(qs,{pathData:e,stroke:n,strokeWidth:a,opacity:s,strokeAlpha:l,strokeDasharray:c,lineCap:u,lineJoin:h}):(0,i.jsx)("path",{d:e,fill:"none",stroke:n,strokeWidth:a,opacity:s,strokeOpacity:l,strokeDasharray:c,strokeLinecap:u,strokeLinejoin:h,vectorEffect:"non-scaling-stroke"}),Qs=({fillPath:e,fillAlpha:t,linePath:r,stroke:n,fill:o,strokeWidth:a,opacity:s,strokeAlpha:l,strokeDasharray:c,lineCap:u,lineJoin:h,shouldAnimateTransitions:g})=>{const p=`line_fill_gradient_${(0,v.useId)()}`;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("defs",{children:(0,i.jsxs)("linearGradient",{id:p,gradientTransform:"rotate(90 0.5 0.5)",children:[(0,i.jsx)("stop",{offset:"0%",stopColor:o}),(0,i.jsx)("stop",{offset:"70%",stopColor:o,stopOpacity:0}),(0,i.jsx)("stop",{offset:"100%",stopColor:o,stopOpacity:0})]})}),(0,i.jsx)(Gn,{fillPath:e,linePath:r,fill:`url(#${p})`,fillOpacity:t,stroke:n,strokeWidth:a,strokeOpacity:l,opacity:s,strokeDasharray:c,lineCap:u,lineJoin:h,shouldAnimateTransitions:g})]})},qs=({pathData:e,stroke:t,strokeWidth:r,opacity:n,strokeAlpha:o,strokeDasharray:a,lineCap:s,lineJoin:l})=>{const c=dt(e,ee);return(0,i.jsx)(R.motion.path,{d:c,fill:"none",stroke:t,strokeWidth:r,opacity:n,strokeOpacity:o,strokeDasharray:a,strokeLinecap:s,strokeLinejoin:l,vectorEffect:"non-scaling-stroke"})},Js=({layer:e,primary:t,companions:r})=>{const n=F(e),o=(0,d.getGroup)(t.observation),a=(0,v.useMemo)(()=>(0,d.prepareLineObservations)([...e.data.filter(d.GROUP_VARIABLES.group,"eq",o)],e.params.missingValues),[e.data,e.params.missingValues,o]),s=(0,v.useMemo)(()=>(0,d.createLinePathGenerator)(e.params)(a),[e.params,a]);if(!s)return null;const l=n.get("stroke",t.observation,"hovered"),c=n.get("alpha",t.observation,"hovered"),u=n.get("strokeAlpha",t.observation,"hovered"),h=n.get("strokeWidth",t.observation,"hovered"),g=(0,d.toStrokeDasharray)(n.get("dashArray",t.observation,"hovered"),h),p=n.get("lineCap",t.observation,"hovered"),m=n.get("lineJoin",t.observation,"hovered");return(0,i.jsxs)("g",{"data-testid":"hovered-line",children:[(0,i.jsx)(ie,{viewBox:"0 0 1 1",preserveAspectRatio:"none",width:"100%",height:"100%","data-geom":"line",effects:W((0,d.readGeomEffects)(n,t.observation,"hovered")),className:te,children:(0,i.jsx)("path",{d:s,fill:"none",stroke:l,strokeWidth:h,opacity:c,strokeOpacity:u,strokeDasharray:g,strokeLinecap:p,strokeLinejoin:m,vectorEffect:"non-scaling-stroke","data-testid":"hovered-line-path"})}),r.map(f=>(0,i.jsx)(me,{hit:f},`companion-${f.layerId}-${f.pointIndex}`)),(0,i.jsx)(Ne,{hit:t,"data-testid":"hovered-line-point"})]})},Zs={geom:"line",coord:"cartesian",swatchShape:"line",guideMode:"crosshair",render:({layer:e,shouldAnimateTransitions:t,intro:r})=>(0,i.jsx)(Ks,{layer:e,shouldAnimateTransitions:t,intro:r}),renderHover:({layer:e,primary:t,group:r,related:n})=>(0,i.jsx)(Js,{layer:e,primary:t,companions:[...r,...n]}),renderHoverCompanions:({related:e})=>(0,i.jsx)(i.Fragment,{children:e.map(t=>(0,i.jsx)(me,{hit:t},`companion-${t.layerId}-${t.pointIndex}`))}),getEditOutlineShapes:zs,getOverlayAnchor:({observation:e})=>{const t=(0,d.getX)(e),r=(0,d.getY)(e);return t===null||r===null?null:{x:t,y:r}}},Jn=({observation:e,project:t,styleReaders:r,animation:n,introKey:o})=>{const a=(0,v.useContext)(bt)?.paintsShadow===!0,s=Zn(e,t);if(s===null)return null;const{isAnimated:l,activeIntro:c,shouldAnimateTransitions:u}=n,h=l?{intro:c!==null,fadesIn:!a,transition:c?or(c,o):nr(u)}:null;return(0,i.jsx)(At,{symbol:r.get("symbol",e),cx:(0,d.toPercent)(s.x),cy:(0,d.toPercent)(s.y),size:r.get("size",e),fill:(0,d.toPaintColor)(r.get("fill",e)),fillOpacity:r.get("fillAlpha",e),opacity:r.get("alpha",e),stroke:r.get("stroke",e),strokeOpacity:r.get("strokeAlpha",e),strokeWidth:r.get("strokeWidth",e),style:W((0,d.readGeomEffects)(r,e)),motion:h})},Zn=(e,t)=>{const r=(0,d.getX)(e),n=(0,d.getY)(e);return r===null||n===null?null:t(r,n)},_n=({layer:e,panelRect:t,styleReaders:r,project:n})=>{const o=[];for(const a of e.data){const s=Zn(a,n);s!==null&&o.push({center:Je(s,t),size:r.get("size",a)+r.get("strokeWidth",a)})}return Nn(o)},_s=(0,v.memo)(function({layer:t,shouldAnimateTransitions:r,intro:n}){const o=F(t),a=Pt(n?.type==="grow"&&n.growAxis==="size"?n:null,r);return(0,v.useMemo)(()=>{const s=a.activeIntro?(0,d.createStableKeyGenerator)(t.data,t.mapping,t.id):null,l=[];let c=0;for(const u of t.data)l.push((0,i.jsx)(Jn,{observation:u,project:pe,styleReaders:o,animation:a,introKey:s?.(u)},String(c++)));return l},[t.data,t.mapping,t.id,o,a])}),Xr=({primary:e,companions:t})=>{const r=(0,i.jsxs)(i.Fragment,{children:[t.map(n=>(0,i.jsx)(me,{hit:n},`companion-${n.layerId}-${n.pointIndex}`)),e?(0,i.jsx)(Ne,{hit:e}):null]});return e?(0,i.jsx)("g",{"data-testid":"hovered-point",children:r}):r},$s={geom:"point",coord:"cartesian",swatchShape:"circle",render:({layer:e,shouldAnimateTransitions:t,intro:r})=>(0,i.jsx)(_s,{layer:e,shouldAnimateTransitions:t,intro:r}),renderHover:({primary:e,group:t,related:r})=>(0,i.jsx)(Xr,{primary:e,companions:[...t,...r]}),renderHoverCompanions:({related:e})=>(0,i.jsx)(Xr,{companions:e}),getEditOutlineShapes:e=>_n({...e,project:pe}),getOverlayAnchor:({observation:e})=>{const t=(0,d.getX)(e),r=(0,d.getY)(e);return t===null||r===null?null:{x:t,y:r}}},Ke="var(--graphy-editor-font-family, var(--graphy-font-family))",el=["canvasDefault","canvasBlue","canvasCyan","canvasGreen","canvasYellow","canvasOrange","canvasRed","canvasPink","canvasPurple","canvasGray","canvasInverse"],b={white:"var(--graphy-white)",black:"var(--graphy-black)",transparent:"var(--graphy-transparent)",gray100:"var(--graphy-gray-100)",gray95:"var(--graphy-gray-95)",gray90:"var(--graphy-gray-90)",gray85:"var(--graphy-gray-85)",gray80:"var(--graphy-gray-80)",gray75:"var(--graphy-gray-75)",gray70:"var(--graphy-gray-70)",gray60:"var(--graphy-gray-60)",gray50:"var(--graphy-gray-50)",gray0:"var(--graphy-gray-0)",grayGradient80:"var(--graphy-gray-gradient-80)",green60:"var(--graphy-green-60)",green50:"var(--graphy-green-50)",red60:"var(--graphy-red-60)",red50:"var(--graphy-red-50)",amber70:"var(--graphy-amber-70)",amber50:"var(--graphy-amber-50)",amber40:"var(--graphy-amber-40)",amber30:"var(--graphy-amber-30)",blue80:"var(--graphy-blue-80)",blue60:"var(--graphy-blue-60)",purple50:"var(--graphy-purple-50)",purple30:"var(--graphy-purple-30)",brand:"var(--graphy-brand)",success:"var(--graphy-success)",warning:"var(--graphy-warning)",alert:"var(--graphy-alert)",textPrimary:"var(--graphy-text-primary)",textSecondary:"var(--graphy-text-secondary)",textDisabled:"var(--graphy-text-disabled)",iconPrimary:"var(--graphy-icon-primary)",iconSecondary:"var(--graphy-icon-secondary)",iconStickerBackground:"var(--graphy-icon-sticker-background)",border100:"var(--graphy-border-100)",border50:"var(--graphy-border-50)",border10:"var(--graphy-border-10)",sunkenBackground:"var(--graphy-sunken-background)",defaultBackground:"var(--graphy-default-background)",raisedBackground:"var(--graphy-raised-background)",overlayBackground:"var(--graphy-overlay-background)",overlayBorderGradient:"var(--graphy-overlay-border-gradient)",graphBackground:"var(--graphy-graph-background)",editorDefaultAccent:"var(--graphy-editor-default-accent)",editorDefaultSurface:"var(--graphy-editor-default-surface)",editorDefaultText:"var(--graphy-editor-default-text)",editorDefaultShadow:"var(--graphy-editor-default-shadow)",editorControlHeight:"var(--graphy-editor-control-height)",canvasDefault:"var(--graphy-canvas-default)",canvasBlue:"var(--graphy-canvas-blue)",canvasCyan:"var(--graphy-canvas-cyan)",canvasGreen:"var(--graphy-canvas-green)",canvasYellow:"var(--graphy-canvas-yellow)",canvasOrange:"var(--graphy-canvas-orange)",canvasRed:"var(--graphy-canvas-red)",canvasPink:"var(--graphy-canvas-pink)",canvasPurple:"var(--graphy-canvas-purple)",canvasGray:"var(--graphy-canvas-gray)",canvasInverse:"var(--graphy-canvas-inverse)",elevationXs:"var(--graphy-elevation-xs)",elevationSm:"var(--graphy-elevation-sm)",elevationMd:"var(--graphy-elevation-md)",elevationLg:"var(--graphy-elevation-lg)",radiiXs:"var(--graphy-radii-xs)",radiiSm:"var(--graphy-radii-sm)",radiiMd:"var(--graphy-radii-md)",radiiLg:"var(--graphy-radii-lg)",spaceXxs:"var(--graphy-space-xxs)",spaceXs:"var(--graphy-space-xs)",spaceSm:"var(--graphy-space-sm)",spaceMd:"var(--graphy-space-md)",spaceLg:"var(--graphy-space-lg)",spaceXl:"var(--graphy-space-xl)",zIndexToolbar:"var(--graphy-z-index-toolbar)",zIndexToolbarTooltip:"var(--graphy-z-index-toolbar-tooltip)",zIndexToolbarPopover:"var(--graphy-z-index-toolbar-popover)",zIndexEditorPopover:"var(--graphy-z-index-editor-popover)",toolbarBackgroundColor:"var(--graphy-toolbar-background-color)",toolbarButtonBackgroundColor:"var(--graphy-toolbar-button-background-color)",toolbarButtonBackgroundColorHovered:"var(--graphy-toolbar-button-background-color-hovered)",toolbarButtonBackgroundColorSelected:"var(--graphy-toolbar-button-background-color-selected)",toolbarSeparatorColor:"var(--graphy-toolbar-separator-color)",fontFamily:"var(--graphy-font-family)",fontFamilyHeading:"var(--graphy-font-family-heading)",fontWeightRegular:"var(--graphy-font-weight-regular)",fontWeightMedium:"var(--graphy-font-weight-medium)",fontWeightSemibold:"var(--graphy-font-weight-semibold)",fontWeightBold:"var(--graphy-font-weight-bold)",fontWeightExtraBold:"var(--graphy-font-weight-extra-bold)",textScale:"var(--graphy-text-scale)",fontSizeXxs:"var(--graphy-font-size-xxs)",fontSizeXs:"var(--graphy-font-size-xs)",fontSizeSm:"var(--graphy-font-size-sm)",fontSizeMd:"var(--graphy-font-size-md)",fontSizeLg:"var(--graphy-font-size-lg)",fontSizeXl:"var(--graphy-font-size-xl)",fontLineHeightXxs:"var(--graphy-font-line-height-xxs)",fontLineHeightXs:"var(--graphy-font-line-height-xs)",fontLineHeightSm:"var(--graphy-font-line-height-sm)",fontLineHeightMd:"var(--graphy-font-line-height-md)",fontLineHeightLg:"var(--graphy-font-line-height-lg)",fontLineHeightXl:"var(--graphy-font-line-height-xl)",fontSizeEditorBody:"var(--graphy-font-size-editor-body)",fontSizeHeadingSm:"var(--graphy-font-size-heading-sm)",fontSizeHeadingMd:"var(--graphy-font-size-heading-md)",fontSizeHeadingLg:"var(--graphy-font-size-heading-lg)",fontLineHeightEditorBody:"var(--graphy-font-line-height-editor-body)",fontLineHeightHeadingSm:"var(--graphy-font-line-height-heading-sm)",fontLineHeightHeadingMd:"var(--graphy-font-line-height-heading-md)",fontLineHeightHeadingLg:"var(--graphy-font-line-height-heading-lg)",fontButton:"var(--graphy-font-button)",fontInput:"var(--graphy-font-input)",fontInputLabel:"var(--graphy-font-input-label)",fontSelectLabel:"var(--graphy-font-select-label)",fontSelectDescription:"var(--graphy-font-select-description)",fontColorSelectLabel:"var(--graphy-font-color-select-label)",fontMenuTitle:"var(--graphy-font-menu-title)",fontMenuGroupTitle:"var(--graphy-font-menu-group-title)",fontMenuItemLabel:"var(--graphy-font-menu-item-label)",fontMenuItemLabelSecondary:"var(--graphy-font-menu-item-label-secondary)",fontUITooltip:"var(--graphy-font-uitooltip)",fontUITooltipSecondary:"var(--graphy-font-uitooltip-secondary)",fontErrorBoundaryTitle:"var(--graphy-font-error-boundary-title)",fontErrorBoundaryMessage:"var(--graphy-font-error-boundary-message)",fontTableCell:"var(--graphy-font-table-cell)",fontTableHeaderCell:"var(--graphy-font-table-header-cell)",fontSourceLabel:"var(--graphy-font-source-label)",fontSourceLink:"var(--graphy-font-source-link)",fontTextEditorH1:"var(--graphy-font-text-editor-h1)",fontTextEditorH2:"var(--graphy-font-text-editor-h2)",fontTextEditorH3:"var(--graphy-font-text-editor-h3)",fontTextEditorH6:"var(--graphy-font-text-editor-h6)",fontTextEditorBody:"var(--graphy-font-text-editor-body)",fontTextEditorLink:"var(--graphy-font-text-editor-link)",fontHighlightModeTitle:"var(--graphy-font-highlight-mode-title)",fontHighlightModeSubtitle:"var(--graphy-font-highlight-mode-subtitle)",fontEditorControlLabel:"var(--graphy-font-editor-control-label)",fontEditorControlValue:"var(--graphy-font-editor-control-value)",fontEditorSectionTitle:"var(--graphy-font-editor-section-title)",fontEditorCaption:"var(--graphy-font-editor-caption)"},tt=`"Stack Sans Text", 'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI', 'Roboto', 'Oxygen-Sans', 'Ubuntu',
|
|
2
|
-
'Cantarell', 'Helvetica Neue', 'NotoSansArabic', 'NotoSansJP', 'NotoSansSC', 'NotoSansKR', 'NotoSerifKR', sans-serif, 'Apple Color Emoji', 'NotoColorEmoji'`,tl=tt,Xe={regular:d.NAMED_WEIGHTS.regular,medium:d.NAMED_WEIGHTS.medium,semibold:d.NAMED_WEIGHTS.semiBold,bold:d.NAMED_WEIGHTS.bold,extraBold:d.NAMED_WEIGHTS.extraBold},re={xxs:1,xs:1.1,sm:1.2,md:1.4,lg:1.6,xl:2,editorBody:1.5,headingSm:1.8,headingMd:2.2,headingLg:2.8},_={xxs:1,xs:1,sm:1.3,md:1.43,lg:1,xl:1,editorBody:1.47,headingSm:1.25,headingMd:1.41,headingLg:1.29},ne=e=>`${e}em`,$n={textScale:"1",fontFamily:tt,fontFamilyHeading:tl,fontWeightRegular:Xe.regular.toString(),fontWeightMedium:Xe.medium.toString(),fontWeightSemibold:Xe.semibold.toString(),fontWeightBold:Xe.bold.toString(),fontWeightExtraBold:Xe.extraBold.toString(),fontSizeXxs:ne(re.xxs),fontSizeXs:ne(re.xs),fontSizeSm:ne(re.sm),fontSizeMd:ne(re.md),fontSizeLg:ne(re.lg),fontSizeXl:ne(re.xl),fontLineHeightXxs:_.xxs.toString(),fontLineHeightXs:_.xs.toString(),fontLineHeightSm:_.sm.toString(),fontLineHeightMd:_.md.toString(),fontLineHeightLg:_.lg.toString(),fontLineHeightXl:_.xl.toString()},eo={fontSizeEditorBody:ne(re.editorBody),fontSizeHeadingSm:ne(re.headingSm),fontSizeHeadingMd:ne(re.headingMd),fontSizeHeadingLg:ne(re.headingLg),fontLineHeightEditorBody:_.editorBody.toString(),fontLineHeightHeadingSm:_.headingSm.toString(),fontLineHeightHeadingMd:_.headingMd.toString(),fontLineHeightHeadingLg:_.headingLg.toString()},L=(e,t,r,n=b.fontFamily)=>`${e} ${t}/${r} ${n}`,to={fontUITooltip:L(b.fontWeightMedium,b.fontSizeMd,b.fontLineHeightMd),fontUITooltipSecondary:L(b.fontWeightMedium,b.fontSizeSm,b.fontLineHeightSm,Ke),fontButton:L(b.fontWeightMedium,b.fontSizeMd,b.fontLineHeightMd),fontInput:L(b.fontWeightMedium,b.fontSizeMd,b.fontLineHeightMd),fontInputLabel:L(b.fontWeightMedium,b.fontSizeXxs,b.fontLineHeightXxs),fontSelectLabel:L(b.fontWeightMedium,b.fontSizeMd,b.fontLineHeightMd),fontSelectDescription:L(b.fontWeightMedium,b.fontSizeSm,b.fontLineHeightSm),fontColorSelectLabel:L(b.fontWeightMedium,b.fontSizeSm,b.fontLineHeightSm),fontMenuTitle:L(b.fontWeightSemibold,b.fontSizeMd,b.fontLineHeightMd),fontMenuGroupTitle:L(b.fontWeightMedium,b.fontSizeSm,b.fontLineHeightSm),fontMenuItemLabel:L(b.fontWeightMedium,b.fontSizeMd,b.fontLineHeightMd),fontMenuItemLabelSecondary:L(b.fontWeightMedium,b.fontSizeSm,b.fontLineHeightSm),fontErrorBoundaryTitle:L(b.fontWeightSemibold,b.fontSizeHeadingSm,b.fontLineHeightHeadingSm),fontErrorBoundaryMessage:L(b.fontWeightMedium,b.fontSizeMd,b.fontLineHeightMd),fontTableCell:L(b.fontWeightMedium,b.fontSizeMd,b.fontLineHeightMd),fontTableHeaderCell:L(b.fontWeightSemibold,b.fontSizeSm,b.fontLineHeightSm),fontSourceLabel:L(b.fontWeightMedium,b.fontSizeSm,b.fontLineHeightSm),fontSourceLink:L(b.fontWeightRegular,b.fontSizeSm,b.fontLineHeightSm),fontTextEditorH1:L(b.fontWeightBold,b.fontSizeHeadingLg,b.fontLineHeightHeadingLg,b.fontFamilyHeading),fontTextEditorH2:L(b.fontWeightBold,b.fontSizeHeadingMd,b.fontLineHeightHeadingMd,b.fontFamilyHeading),fontTextEditorH3:L(b.fontWeightSemibold,b.fontSizeHeadingSm,b.fontLineHeightHeadingSm,b.fontFamilyHeading),fontTextEditorH6:L(b.fontWeightMedium,b.fontSizeSm,b.fontLineHeightSm),fontTextEditorBody:L(b.fontWeightMedium,b.fontSizeEditorBody,b.fontLineHeightEditorBody),fontTextEditorLink:L(b.fontWeightRegular,b.fontSizeMd,b.fontLineHeightMd),fontHighlightModeTitle:L(b.fontWeightBold,b.fontSizeMd,b.fontLineHeightMd),fontHighlightModeSubtitle:L(b.fontWeightMedium,b.fontSizeSm,b.fontLineHeightSm),fontEditorControlLabel:L(b.fontWeightMedium,b.fontSizeSm,b.fontLineHeightSm,Ke),fontEditorControlValue:L(b.fontWeightMedium,b.fontSizeSm,b.fontLineHeightSm,Ke),fontEditorSectionTitle:L(b.fontWeightSemibold,b.fontSizeSm,b.fontLineHeightSm,Ke),fontEditorCaption:L(b.fontWeightMedium,b.fontSizeXxs,b.fontLineHeightXxs,Ke)},rl=(e,t)=>({familyDefault:Gt(t)??Gt(e.fontFamily)??Gt(tt)??""}),Gt=e=>e===void 0||e.includes("var(")?null:e.replace(/\s+/g," ").trim(),z=(e,t)=>`color-mix(in srgb, transparent, ${e} ${t*100}%)`,nl=(e,t)=>`hsl(from ${e} h s calc(l * ${1-t}))`,ol=(e,t)=>`hsl(from ${e} h s calc(l * ${1+t}))`,al=e=>/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(e),il=e=>e.length===0?!1:typeof CSS<"u"&&typeof CSS.supports=="function"?CSS.supports("color",e):/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(e),sl=e=>`${e}px`,ro={editorControlHeight:sl(32)},Ce={editOutline:1,panelOverlay:5,textToolbar:10,textToolbarTooltip:20,textToolbarPopover:30,legendPopover:40,editorOverlay:900,editorOverlayPopover:950,tooltip:1e3},no={elevationXs:"0 0 2px rgba(15, 15, 24, 0.12), 0 2px 2px rgba(14, 14, 52, 0.08)",elevationSm:"0 0 4px rgba(15, 15, 24, 0.12), 0 4px 4px rgba(14, 14, 52, 0.08)",elevationMd:"0 0 8px rgba(15, 15, 24, 0.12), 0 8px 8px rgba(14, 14, 52, 0.08)",elevationLg:"0 0 16px rgba(15, 15, 24, 0.12), 0 16px 16px rgba(14, 14, 52, 0.08)"},oo={radiiXs:"4px",radiiSm:"6px",radiiMd:"8px",radiiLg:"12px"},ao={zIndexToolbar:`${Ce.textToolbar}`,zIndexToolbarTooltip:`${Ce.textToolbarTooltip}`,zIndexToolbarPopover:`${Ce.textToolbarPopover}`,zIndexEditorPopover:`${Ce.editorOverlayPopover}`},ll=8,Ee=e=>`${ll*e}px`,io={spaceXxs:Ee(.25),spaceXs:Ee(.5),spaceSm:Ee(.75),spaceMd:Ee(1),spaceLg:Ee(1.5),spaceXl:Ee(2)},cl={transparent:"transparent",white:"#FFFFFF",black:"#000000",gray100:"#000000",gray95:"#0D0D0D",gray90:"#1A1A1A",gray85:"#1F1F1F",gray80:"#2A2A2A",gray75:"#2e2e2e",gray70:"#353535",gray60:"#494949",gray50:"#6F6F6F",gray0:"#FFFFFF",red60:"#CB3333",red50:"#F93939",amber70:"#F48135",amber50:"#FEAE47",amber40:"#FFC849",amber30:"#ffd061",green60:"#0AC600",green50:"#42CD69",blue80:"#2E62FF",blue60:"#3D70FF",purple50:"#7B56EA",purple30:"#E093FE",grayGradient80:"linear-gradient(to top, #222429, #31353f)"},dl={textPrimary:b.gray0,textSecondary:z(b.textPrimary,.8),textDisabled:z(b.textPrimary,.5),iconPrimary:"currentColor",iconSecondary:z(b.textPrimary,.6),iconStickerBackground:b.gray70,border100:b.gray0,border50:z(b.gray0,.5),border10:z(b.gray0,.1),brand:b.purple50,success:b.green50,warning:b.amber50,alert:b.red50,sunkenBackground:b.gray100,defaultBackground:b.gray90,raisedBackground:b.gray80,overlayBackground:b.gray90,overlayBorderGradient:b.grayGradient80},ul={graphBackground:b.gray90,toolbarBackgroundColor:b.overlayBackground,toolbarButtonBackgroundColor:"transparent",toolbarButtonBackgroundColorHovered:b.gray80,toolbarButtonBackgroundColorSelected:b.gray60,toolbarSeparatorColor:b.gray60,editorDefaultAccent:"#ECE7DF",editorDefaultSurface:"#26241F",editorDefaultText:"#ECE7DF",editorDefaultShadow:`${b.elevationMd}, 0 16px 40px rgba(0, 0, 0, 0.45)`},hl={canvasDefault:"#FFFFFF",canvasBlue:"#60a5fa",canvasCyan:"#22d3ee",canvasGreen:"#34d399",canvasYellow:"#FFC800",canvasOrange:"#fb923c",canvasRed:"#f87171",canvasPink:"#F979D9",canvasPurple:"#a78bfa",canvasGray:"#a8a29e",canvasInverse:"#000000"},gl={...cl,...dl,...no,...oo,...io,...ao,...ul,...hl,...ro,...$n,...eo,...to},fl={transparent:"transparent",white:"#FFFFFF",black:"#000000",gray100:"#FFFFFF",gray95:"#FCFCFC",gray90:"#FAFAFA",gray85:"#F5F5F5",gray80:"#F0F0F0",gray75:"#E8E8E8",gray70:"#E5E5E5",gray60:"#CCCCCC",gray50:"#C4C4C4",gray0:"#1D2129",red60:"#E14B49",red50:"#F93939",amber70:"#FFBA8C",amber50:"#FFC849",amber40:"#FEAE47",amber30:"#E7A816",green60:"#06B299",green50:"#42CD69",blue80:"#2E62FF",blue60:"#3D70FF",purple50:"#7B56EA",purple30:"#E093FE",grayGradient80:"linear-gradient(to top, #F0F0F1, #F9F9FF)"},vl={textPrimary:b.black,textSecondary:z(b.textPrimary,.6),textDisabled:z(b.textPrimary,.5),iconPrimary:"currentColor",iconSecondary:z(b.textPrimary,.6),iconStickerBackground:b.gray100,brand:b.purple50,success:b.green50,warning:b.amber50,alert:b.red50,border100:b.gray0,border50:z(b.gray0,.5),border10:z(b.gray0,.1),sunkenBackground:b.gray90,defaultBackground:b.gray100,raisedBackground:b.gray85,overlayBackground:b.gray100,overlayBorderGradient:b.border10},pl={graphBackground:b.gray100,toolbarBackgroundColor:b.overlayBackground,toolbarButtonBackgroundColor:"transparent",toolbarButtonBackgroundColorHovered:b.gray80,toolbarButtonBackgroundColorSelected:b.gray60,toolbarSeparatorColor:b.gray60,editorDefaultAccent:"#3B372F",editorDefaultSurface:"#FFFFFF",editorDefaultText:"#3B372F",editorDefaultShadow:`${b.elevationMd}, 0 16px 40px rgba(20, 18, 15, 0.14)`},ml={canvasDefault:"#000000",canvasBlue:"#3b82f6",canvasCyan:"#06b6d4",canvasGreen:"#10b981",canvasYellow:"#E5B400",canvasOrange:"#f97316",canvasRed:"#ef4444",canvasPink:"#E845BF",canvasPurple:"#8b5cf6",canvasGray:"#78716c",canvasInverse:"#ffffff"},xl={...fl,...vl,...no,...oo,...io,...ao,...pl,...ml,...ro,...$n,...eo,...to},cr=(e,t={})=>{const r={};for(const[n,o]of Object.entries(t))o!=null&&(r[n]=o);return{...e==="dark"?gl:xl,...r}},so=(e,t={},r)=>({fonts:rl(cr(e,t),r)}),yl=Object.freeze(so("light")),lo=(0,v.createContext)(yl),bl=({metrics:e,children:t})=>(0,i.jsx)(lo.Provider,{value:e,children:t}),we=()=>(0,v.useContext)(lo),wt=(e,t,r)=>{const{colorScheme:n}=G(),o=M(a=>e===void 0?void 0:(0,d.findLayerById)(a.layers,e));return(0,v.useMemo)(()=>o===void 0?r:(0,d.readPresentedGroupColor)(o,t,n)??r,[n,r,t,o])},I=(e,...t)=>(0,v.useMemo)(()=>e(...t),[e,...t]),jt=(e,t,r)=>{const n=Pe(),o=M(a=>e===void 0?void 0:(0,d.findLayerById)(a.layers,e));return(0,v.useMemo)(()=>{if(o===void 0)return{};const a=(0,d.readColorGroupObservation)(o,t),s=(0,d.resolveSwatchGeomPaint)(n,o,a,{width:r,height:r});return{alpha:s.alpha,fill:s.fill,cornerRadius:s.cornerRadiusPx,symbol:s.symbol}},[o,n,t,r])},Al=/\p{Emoji_Presentation}|\p{Emoji}\uFE0F/gu,co="😀",uo=class ho{constructor(){this.emojiCorrections=new Map,this.currentFont="";const t=new OffscreenCanvas(1,1).getContext("2d");if(!t)throw new Error("Failed to create OffscreenCanvas 2D context");this.ctx=t}static async create(){return typeof document<"u"&&"fonts"in document&&await document.fonts.ready,new ho}measureText(t,r){const n=(0,d.applyTextTransform)(t,r.textTransform),o=(0,d.buildFontString)(r);this.setFont(o);const{width:a,fontBoundingBoxAscent:s,fontBoundingBoxDescent:l}=this.ctx.measureText(n);let c=a+(0,d.computeLetterSpacingWidth)(n,r.letterSpacing);const u=Sl(n);if(u>0){const h=this.getEmojiCorrection(o);c-=h*u}return{width:c,height:s+l,ascent:s,descent:l}}setFont(t){this.currentFont!==t&&(this.ctx.font=t,this.currentFont=t)}getEmojiCorrection(t){const r=this.emojiCorrections.get(t);if(r!==void 0)return r;this.setFont(t);const n=this.ctx.measureText(co).width,o=Pl(t);let a=0;if(o!==null){const s=n-o;a=s>.5?s:0}return this.emojiCorrections.set(t,a),a}},ce=null,Sl=e=>{const t=e.match(Al);return t?t.length:0},Pl=e=>{const t=wl();return t?(t.style.font=e,t.getBoundingClientRect().width):null},wl=()=>typeof document>"u"?null:(ce||(ce=document.createElement("span"),ce.style.position="absolute",ce.style.visibility="hidden",ce.style.whiteSpace="nowrap",ce.style.left="-9999px",ce.textContent=co,document.body.appendChild(ce)),ce),go=(0,v.createContext)(null),Qr=3e3,fo=({children:e,measurer:t})=>{const[r,n]=(0,v.useState)(null);(0,v.useEffect)(()=>{if(t!==void 0)return;let a=!1;const s=()=>{a||n(jl())};if(!(typeof document<"u"&&"fonts"in document)){s();return}const l=setTimeout(()=>{a||(console.warn(`[graphy] FONT_READY_TIMEOUT: document.fonts.ready has not settled in ${Qr}ms; painting with the fonts available so far.`),s())},Qr),c=()=>{clearTimeout(l),s()};return document.fonts.ready.then(c,c),document.fonts.addEventListener("loadingdone",c),()=>{a=!0,clearTimeout(l),document.fonts.removeEventListener("loadingdone",c)}},[t]);const o=t??r;return o===null?null:(0,i.jsx)(go.Provider,{value:o,children:e})},he=()=>{const e=(0,v.useContext)(go);if(e===null)throw new Error("useTextMeasurer must be used inside a <TextMeasurerProvider>.");return e},jl=()=>{try{return new d.CachedTextMeasurer(new uo)}catch{return new d.CachedTextMeasurer(new d.HeuristicTextMeasurer)}},vo=(0,v.createContext)(null),kl=vo.Provider,El=null,se=()=>(0,v.useContext)(vo)??(El??=Lo()),Rl=11.7,Cl=.75,qr=21.6,Il="0 0 10 18",Ml="M2.48935 16.9323L9.07098 9.82964C9.51595 9.34944 9.51504 8.60728 9.0689 8.12818L2.48866 1.06172C1.85811 0.384586 0.974477 0 0.049217 0H0V18H0.0443689C0.972463 18 1.85854 17.6131 2.48935 16.9323Z",Tl="_16vokpr0",Bl=(e,t)=>e.mapping.y!==void 0!=(t.mainAxis==="y"),Ol=(e,t)=>{const r=(0,d.toPercent)(e?1-t:t);return e?{x1:"0%",y1:r,x2:"100%",y2:r}:{x1:r,y1:"0%",x2:r,y2:"100%"}},Ll=(e,t,r,n)=>{const o=(0,d.toStrokeDasharray)(e,t),a={...r===void 0?{}:{strokeLinecap:r},...n===void 0?{}:{strokeLinejoin:n}};return o===void 0?a:{strokeDasharray:o,strokeLinecap:"round",...a,...(e[0]??0)>1?{strokeMiterlimit:16}:{}}},Fl=(e,t)=>it(e)&&it(t)?`${e}: ${t}`:it(e)?e:it(t)?t:null,Nl=e=>e?14:0,Dl=(e,t)=>e*Cl-Nl(t)-10,Hl=(e,t,r)=>{const n=e*r,o=-13-n,a=r+13-n-t;return a<o?o:Math.min(Math.max(-t/2,o),a)},it=e=>e!=null&&e.trim()!=="",po=Object.freeze({}),dr=(0,v.createContext)(po),Gl=({slots:e,children:t})=>(0,i.jsx)(dr.Provider,{value:e??po,children:t});function oe(e,t){const r=(0,v.useContext)(dr)[e];return r===void 0?t:typeof r=="object"&&Vl(r)?r.render:r}function Wl(){const e=(0,v.useContext)(dr);return{measureAxis:e.AxisTicks?.measure,measureAxisLabel:e.AxisLabel?.measure,measureLegend:e.Legend?.measure,measureHeadline:e.Headline?.measure.measureHeadline,measureHeadlineItemWidths:e.Headline?.measure.measureHeadlineItemWidths}}function Vl(e){return"render"in e&&"measure"in e}var Ul="_2qyyu60",zl=2,Yl=12,Kl=12,Jr=1,Zr=2,Xl=4,Ql=3,ql=2,Jl=new Set(["square","slice"]),_r=.375,mo=1,rt=e=>(0,i.jsx)(oe("Swatch",xo),{...e}),xo=({shape:e,color:t,paint:r,lineType:n="solid",width:o=Yl,height:a=Kl,strokeWidth:s=zl,alpha:l,cornerRadius:c,symbol:u,mainAxis:h="x"})=>{const g=$l(e,t,r,Math.min(o,a)),p=Y({paints:[g]}),m=p.fillFor(g);return(0,i.jsxs)("svg",{className:Ul,width:o,height:a,viewBox:`0 0 ${o} ${a}`,"aria-hidden":!0,"data-testid":"chart-swatch","data-shape":e,children:[p.defs,Zl({shape:e,color:t,fill:m,lineType:n,width:o,height:a,strokeWidth:s,alpha:l,cornerRadius:c,symbol:u,mainAxis:h})]})},Zl=({shape:e,color:t,fill:r,lineType:n,width:o,height:a,strokeWidth:s,alpha:l,cornerRadius:c,symbol:u,mainAxis:h})=>{const g=tc(n,o);switch(e){case"square":return(0,i.jsx)("rect",{x:1,y:1,width:o-2,height:a-2,rx:c??2,fill:r,opacity:l});case"line":return(0,i.jsx)("line",{x1:g.x1,y1:a/2,x2:g.x2,y2:a/2,stroke:t,strokeWidth:s,strokeLinecap:g.linecap,strokeDasharray:g.dashArray,opacity:l});case"circle":{const p=Math.max(0,(Math.min(o,a)-2)/2);if(u!==void 0&&u!=="circle"){const m=(0,d.buildPointSymbolInBox)(u,o-2,a-2);return(0,i.jsx)("path",{transform:`translate(${o/2+m.offsetX} ${a/2+m.offsetY})`,d:m.path,fill:r,opacity:l})}return(0,i.jsx)("circle",{cx:o/2,cy:a/2,r:p,fill:r,opacity:l})}case"area":{const p=a/2-1;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("rect",{x:1,y:p,width:o-2,height:a-p-1,fill:r,opacity:l??.45}),(0,i.jsx)("line",{x1:g.x1,y1:p,x2:g.x2,y2:p,stroke:t,strokeWidth:s,strokeLinecap:g.linecap,strokeDasharray:g.dashArray})]})}case"slice":return(0,i.jsx)("path",{d:`M 0 ${a} L ${o} ${a} A ${o} ${a} 0 0 0 0 0 Z`,fill:r,opacity:l});case"interval":return(0,i.jsx)("path",{d:_l(o,a,h),fill:"none",stroke:t,strokeWidth:mo,opacity:l});default:return e}},_l=(e,t,r)=>{const n=mo/2;if(r==="x"){const l=e/2,c=e*_r,u=h=>`M ${l-c} ${h} H ${l+c}`;return`${u(n)} M ${l} ${n} V ${t-n} ${u(t-n)}`}const o=t/2,a=t*_r,s=l=>`M ${l} ${o-a} V ${o+a}`;return`${s(n)} M ${n} ${o} H ${e-n} ${s(e-n)}`},$l=(e,t,r,n)=>r===void 0?t:Jl.has(e)?ec(r,n):(0,d.toPaintColor)(r),ec=(e,t)=>{if(typeof e=="string"||!(0,d.isPatternPaint)(e))return e;const r=Math.max(ql,Math.floor(t/Ql));return{...e,size:Math.min(e.size??8,r)}},tc=(e,t)=>e==="solid"?{x1:0,x2:t,dashArray:void 0,linecap:"round"}:e==="dashed"?{x1:0,x2:t,dashArray:`${(t-Jr*(Zr-1))/Zr} ${Jr}`,linecap:"butt"}:{x1:0,x2:t,dashArray:`1 ${t/(Xl-1)}`,linecap:"round"},He=(e,t=b.fontFamily)=>({fontFamily:e.fontFamily??t,fontSize:e.fontSize,fontWeight:e.fontWeight,...e.fontStyle===void 0?{}:{fontStyle:e.fontStyle},...e.letterSpacing===void 0?{}:{letterSpacing:`${e.letterSpacing}px`},...e.textDecoration===void 0?{}:{textDecoration:e.textDecoration}}),kt=e=>Ao(e)?{stroke:e.textOutlineColor,strokeWidth:e.textOutlineWidth*2,strokeLinejoin:"round",paintOrder:"stroke"}:{},yo=e=>e.textShadow===void 0?{}:{textShadow:Ni(e.textShadow)},Et=e=>{const t=e.textShadow===void 0?void 0:Se(e.textShadow);return t===void 0?{}:{filter:t}},bo=e=>Ao(e)?{WebkitTextStroke:`${e.textOutlineWidth*2}px ${e.textOutlineColor}`,paintOrder:"stroke"}:{},Re=e=>({...He(e),lineHeight:e.lineHeight,color:e.textColor,...e.textTransform===void 0?{}:{textTransform:e.textTransform},...bo(e),...yo(e)}),D=e=>({...He(e),lineHeight:e.lineHeight,color:e.textColor,...e.textTransform===void 0?{}:{textTransform:e.textTransform},...bo(e),...yo(e)}),rc=(e,t)=>(0,xt.assignInlineVars)({[e.fontFamily]:t.fontFamily??b.fontFamily,[e.fontSize]:`${t.fontSize}px`,[e.fontWeight]:String(t.fontWeight),[e.lineHeight]:String(t.lineHeight),[e.textColor]:t.textColor}),Ao=e=>e.textOutlineColor!==void 0&&e.textOutlineWidth!==void 0&&e.textOutlineWidth>0,nc=({labelPosition:e,linePosition:t,color:r,pillWidth:n,pillHeight:o,text:a,shouldAnimateTransitions:s})=>{const l=e==="start",c=l?-13:-(n-13),u=l?c+n-5:c+5-12,h=l?void 0:`rotate(180 ${u+12/2} ${o/2})`,g=l?"0%":"100%",p=(0,d.toPercent)(1-t),m=(0,i.jsxs)("g",{transform:`translate(0, ${-o/2})`,pointerEvents:"none",children:[(0,i.jsx)("rect",{x:c,y:0,width:n,height:o,rx:6,fill:r}),(0,i.jsx)("g",{transform:h,children:(0,i.jsx)("svg",{x:u,y:(o-qr)/2,width:12,height:qr,viewBox:Il,overflow:"visible",children:(0,i.jsx)("path",{d:Ml,fill:r})})}),(0,i.jsx)("g",{transform:`translate(${c+5}, ${o/2})`,children:a})]});return s?(0,i.jsx)(R.motion.svg,{initial:!1,transition:ee,x:g,animate:{y:p},overflow:"visible",children:m}):(0,i.jsx)("svg",{x:g,y:p,overflow:"visible",children:m})},oc=({labelPosition:e,linePosition:t,color:r,pillWidth:n,pillHeight:o,panelWidth:a,text:s,shouldAnimateTransitions:l})=>{const c=e==="start",u=c?-13:-(o-13),h=(0,d.toPercent)(t),g=c?"100%":"0%",p=(0,i.jsxs)("g",{transform:`translate(${Hl(t,n,a)}, 0)`,pointerEvents:"none",children:[(0,i.jsx)("rect",{x:0,y:u,width:n,height:o,rx:6,fill:r}),(0,i.jsx)("g",{transform:`translate(5, ${u+o/2})`,children:s})]});return l?(0,i.jsx)(R.motion.svg,{initial:!1,transition:ee,y:g,animate:{x:h},overflow:"visible",children:p}):(0,i.jsx)("svg",{x:h,y:g,overflow:"visible",children:p})},ac=({label:e,textStyle:t,textWidth:r,labelPosition:n,isHorizontalLine:o,position:a,color:s,textColor:l,symbolShape:c,symbolColor:u,symbolPaint:h,symbolAlpha:g,symbolCornerRadius:p,symbolGlyph:m,symbolMainAxis:f,panelWidth:y,shouldAnimateTransitions:x})=>{const S=c===null?0:14,A=r+S+10,P=Math.max(Rl,(0,d.computeLineBoxHeight)(t))+10,w=(0,i.jsxs)(i.Fragment,{children:[c!==null&&u!==null&&(0,i.jsx)("g",{transform:`translate(0, ${-10/2})`,children:(0,i.jsx)(rt,{shape:c,color:u,paint:h,surface:"rule-label",width:10,height:10,alpha:g,cornerRadius:p,symbol:m,mainAxis:f})}),(0,i.jsx)("text",{x:S,textAnchor:"start",dominantBaseline:"central",fill:l,style:{...He(t),...Et(t)},...kt(t),children:(0,d.applyTextTransform)(e,t.textTransform)})]});return o?(0,i.jsx)(nc,{labelPosition:n,linePosition:a,color:s,pillWidth:A,pillHeight:P,text:w,shouldAnimateTransitions:x}):(0,i.jsx)(oc,{labelPosition:n,linePosition:a,color:s,pillWidth:A,pillHeight:P,panelWidth:y,text:w,shouldAnimateTransitions:x})},ic=({strokeWidth:e,dashArray:t,lineCap:r,lineJoin:n,isHorizontalLine:o,position:a,lineColor:s,effects:l,shouldAnimateTransitions:c})=>{const u=Ol(o,a),h=Ll(t,e,r,n);return c?(0,i.jsx)(R.motion.line,{initial:!1,transition:ee,animate:{x1:u.x1,y1:u.y1,x2:u.x2,y2:u.y2},...h,style:l,stroke:s,strokeWidth:e,vectorEffect:"non-scaling-stroke"}):(0,i.jsx)("line",{...u,...h,style:l,stroke:s,strokeWidth:e,vectorEffect:"non-scaling-stroke"})},sc=(0,v.memo)(function({layer:t,coordSystem:r,formattingLocale:n,shouldAnimateTransitions:o,panelWidth:a}){const s=he(),l=se(),{guides:c,numberFormat:u,specLayers:h,colorScale:g}=M((0,q.useShallow)(H=>({guides:H.guides,numberFormat:H.config.numberFormat,specLayers:H.spec.layers,colorScale:H.scales.color}))),p=(0,v.useMemo)(()=>(0,d.buildAverageLineSymbols)(h,g).get(t.id)??null,[h,g,t.id]),m=p?l(p.geom,r.type)?.swatchShape??"square":null,f=jt(p?.layerId,p?.groupValue,10),y=wt(p?.layerId,p?.groupValue,p?.color)??null,x=(0,v.useMemo)(()=>Fl(t.params.label,(0,d.formatRuleValue)({guides:c,numberFormat:u,layer:t,locale:n})),[c,u,n,t]),{fonts:S}=we(),A=B(),P=I(d.resolveRuleLabelStyle,A.geom.rule.label(t),A.graph()),w=(0,v.useMemo)(()=>(0,d.toFontSpec)(P,S.familyDefault),[P,S.familyDefault]),k=(0,v.useMemo)(()=>x===null?null:(0,d.truncateToWidth)(x,Dl(a,m!==null),H=>s.measureText(H,w).width),[x,a,m,w,s]),E=(0,v.useMemo)(()=>k===null?0:s.measureText(k,w).width,[k,w,s]),C=F(t),j=t.data.getFirst();if(!j)return null;const T=C.get("stroke",j),O=lc(P,T),V=Bl(t,r),K=V?(0,d.getY)(j):(0,d.getX)(j);return K===null?null:(0,i.jsxs)("g",{"data-geom":"rule",className:Tl,children:[(0,i.jsx)(ic,{strokeWidth:C.get("strokeWidth",j),dashArray:C.get("dashArray",j),lineCap:C.get("lineCap",j),lineJoin:C.get("lineJoin",j),isHorizontalLine:V,position:K,lineColor:T,effects:W((0,d.readGeomEffects)(C,j)),shouldAnimateTransitions:o}),k!==null&&k!==""&&(0,i.jsx)(ac,{label:k,textStyle:P,textWidth:E,labelPosition:t.params.labelPosition,isHorizontalLine:V,position:K,color:T,textColor:O,symbolShape:m,symbolColor:y,symbolPaint:f.fill,symbolAlpha:f.alpha,symbolCornerRadius:f.cornerRadius,symbolGlyph:f.symbol,symbolMainAxis:(0,d.readMainAxis)(r),panelWidth:a,shouldAnimateTransitions:o})]})}),lc=(e,t)=>e.textColor===void 0?(0,d.pickReadableTextColor)(t):e.isTextColorThemed?(0,d.ensureReadableTextColor)(e.textColor,t):e.textColor,cc={geom:"rule",coord:"cartesian",render:({layer:e,coordSystem:t,formattingLocale:r,shouldAnimateTransitions:n,panelRect:o})=>(0,i.jsx)(sc,{layer:e,coordSystem:t,formattingLocale:r,shouldAnimateTransitions:n,panelWidth:o.width}),renderHover:()=>null,renderHoverCompanions:()=>null},dc=({layer:e,panelRect:t,styleReaders:r,shouldAnimateTransitions:n})=>{let o="";for(const a of e.data){const s=(0,d.getPaintedTileRect)(a);s!==null&&(o+=de(Ae(s,t),r.get("cornerRadius",a)))}return o===""?[]:[{kind:"region",pathData:o,shouldAnimateTransitions:n}]},So=({intro:e,children:t})=>(0,v.useContext)(bt)?.isFading?t:(0,i.jsx)(R.motion.g,{initial:{opacity:0},animate:{opacity:1},transition:Wn(e),children:t}),uc=(0,v.memo)(function({layer:t,shouldAnimateTransitions:r,intro:n}){const o=n?.type==="fade"?n:null,a=F(t),{paints:s,paintAt:l}=et(t,a),{fillFor:c,defs:u}=Y({paints:s}),h=(0,v.useMemo)(()=>{const g=(0,d.createStableCellKeyGenerator)(t.data,t.mapping,t.id),p=[];let m=-1;for(const f of t.data){m+=1;const y=(0,d.getPaintedTileRect)(f);y&&p.push({key:g(f),...y,fill:c(l(m)),opacity:a.get("alpha",f)*a.get("fillAlpha",f),rx:a.get("cornerRadius",f),stroke:a.get("stroke",f),strokeWidth:a.get("strokeWidth",f),effects:W((0,d.readGeomEffects)(a,f))})}return p.map(({key:f,...y})=>(0,i.jsx)(hc,{...y,isAnimated:r},f))},[t,a,r,c,l]);return o?(0,i.jsxs)(So,{intro:o,children:[u,h]}):(0,i.jsxs)(i.Fragment,{children:[u,h]})}),hc=({isAnimated:e,...t})=>e?(0,i.jsx)(R.motion.rect,{initial:!1,style:t.effects,transition:ee,fill:t.fill,opacity:t.opacity,rx:t.rx,stroke:t.stroke,strokeWidth:t.strokeWidth,animate:{attrX:(0,d.toPercent)(t.x),attrY:(0,d.toPercent)(t.y),width:(0,d.toPercent)(t.width),height:(0,d.toPercent)(t.height)}}):(0,i.jsx)("rect",{style:t.effects,x:(0,d.toPercent)(t.x),y:(0,d.toPercent)(t.y),width:(0,d.toPercent)(t.width),height:(0,d.toPercent)(t.height),fill:t.fill,opacity:t.opacity,rx:t.rx,stroke:t.stroke,strokeWidth:t.strokeWidth}),gc=({layer:e,primary:t,panelRect:r})=>{const n=F(e),o=n.get("fill",t.observation),{fillFor:a,defs:s}=Y({paints:[o]}),l=(0,d.getPaintedTileRect)(t.observation);if(!l)return null;const c=a(o),u=n.get("alpha",t.observation)*n.get("fillAlpha",t.observation),h=n.get("stroke",t.observation,"hovered")??d.DEFAULT_HOVER_AFFORDANCE_COLOR,g=n.get("strokeWidth",t.observation,"hovered"),p=n.get("cornerRadius",t.observation,"hovered"),m=l.x*r.width,f=l.y*r.height,y=l.width*r.width,x=l.height*r.height;return(0,i.jsxs)("g",{"data-testid":"hovered-tile",children:[s,(0,i.jsx)("rect",{x:m-g,y:f-g,width:y+g*2,height:x+g*2,rx:p+g,fill:h,"data-testid":"hovered-tile-border"}),(0,i.jsx)("rect",{x:(0,d.toPercent)(l.x),y:(0,d.toPercent)(l.y),width:(0,d.toPercent)(l.width),height:(0,d.toPercent)(l.height),rx:p,fill:c,opacity:u,"data-testid":"hovered-tile-fill"})]})},fc={geom:"tile",coord:"cartesian",swatchShape:"square",guideMode:null,render:({layer:e,shouldAnimateTransitions:t,intro:r})=>(0,i.jsx)(uc,{layer:e,shouldAnimateTransitions:t,intro:r}),renderHover:({layer:e,primary:t,panelRect:r})=>(0,i.jsx)(gc,{layer:e,primary:t,panelRect:r}),renderHoverCompanions:()=>null,getEditOutlineShapes:dc},ut=({primary:e,companions:t})=>{const r=(0,i.jsxs)(i.Fragment,{children:[t.map(n=>(0,i.jsx)(me,{hit:n,project:$},`companion-${n.layerId}-${n.pointIndex}`)),e?(0,i.jsx)(Ne,{hit:e,project:$}):null]});return e?(0,i.jsx)("g",{"data-testid":"hovered-point",children:r}):r},Po=e=>{const t=Fe(e);return{origin:{x:t.centerX,y:t.centerY},scaleX:t.radius,scaleY:t.radius}},vc=e=>({...Fe(e),digits:2}),wo=(e,t,r)=>Q(e,t,Fe(r)),Qt=e=>{const[t,...r]=e;if(!t)return"";const n=r.map(o=>`L ${o.x} ${o.y}`).join(" ");return`M ${t.x} ${t.y} ${n} Z`},pc=(0,v.memo)(function({layer:t,panelRect:r}){const n=F(t),o=(0,v.useMemo)(()=>{const l=(0,d.createStableKeyGenerator)(t.data,t.mapping,t.id),c=[];return t.data.groupBy(d.GROUP_VARIABLES.group).forEach(u=>{const h=[...u],g=jo(h);if(!g)return;const p=h[0];if(!p)return;const m=n.get("fill",p);c.push({key:l(p),fillPath:g.fillPath,outlinePath:g.outlinePath,paint:m,stroke:n.get("stroke",p)??(0,d.toPaintColor)(m),fillOpacity:n.get("fillAlpha",p)*n.get("alpha",p),strokeOpacity:n.get("strokeAlpha",p)*n.get("alpha",p),strokeWidth:n.get("strokeWidth",p)})}),c},[t.data,t.id,t.mapping,n]),{fillFor:a,defs:s}=Y({paints:(0,v.useMemo)(()=>o.map(l=>l.paint),[o]),unitsPerPixel:$e(r)});return(0,i.jsxs)(ie,{viewBox:"-1 -1 2 2",preserveAspectRatio:"xMidYMid meet",width:"100%",height:"100%","data-geom":"area",effects:W((0,d.readGeomEffects)(n,t.data.getFirst()??void 0)),className:te,children:[s,o.map(l=>(0,i.jsxs)("g",{children:[(0,i.jsx)("path",{d:l.fillPath,fill:a(l.paint),fillOpacity:l.fillOpacity,fillRule:"evenodd"}),(0,i.jsx)("path",{d:l.outlinePath,fill:"none",stroke:l.stroke,strokeWidth:l.strokeWidth,opacity:l.strokeOpacity,vectorEffect:"non-scaling-stroke"})]},l.key))]})}),jo=e=>{const t=ko(e);if(t===null)return null;const r=Qt(t.outer);return{fillPath:t.hole===null?r:`${r} ${Qt(t.hole)}`,outlinePath:r}},ko=e=>{const t=[];for(const o of e){const a=(0,d.getX)(o),{innerRadius:s,outerRadius:l}=(0,d.getRadiusExtent)(o);a===null||s===null||l===null||t.push({angle:a,outer:Q(a,l),inner:Q(a,s)})}if(t.length===0)return null;t.sort((o,a)=>o.angle-a.angle);const r=t.map(o=>o.outer),n=t.map(o=>o.inner);return{outer:r,hole:n.some(o=>o.x!==0||o.y!==0)?[...n].reverse():null}},mc=({layer:e,panelRect:t})=>{const r=Po(t),n=[],o=[];return e.data.groupBy(d.GROUP_VARIABLES.group).forEach(a=>{const s=[...a],[l]=s;if(l===void 0)return;if(s.length===1){const h=(0,d.getX)(l),g=(0,d.getYMax)(l)??(0,d.getY)(l);h!==null&&g!==null&&o.push(wo(h,g,t));return}const c=ko(s);if(c===null)return;const u=c.hole===null?"":Yt(c.hole,r);n.push({kind:"region",key:String((0,d.getGroup)(l)),pathData:Yt(c.outer,r)+u,fillRule:"evenodd"})}),o.length>0&&n.push({kind:"dots",centers:o,size:d.DEFAULT_POINT_SIZE_PX}),n},xc=({layer:e,primary:t,companions:r,panelRect:n})=>{const o=F(e),a=(0,d.getGroup)(t.observation),s=o.get("fill",t.observation,"hovered"),{fillFor:l,defs:c}=Y({paints:[s],unitsPerPixel:$e(n)}),u=(0,v.useMemo)(()=>jo([...e.data.filter(d.GROUP_VARIABLES.group,"eq",a)]),[e.data,a]);if(!u)return null;const h=o.get("stroke",t.observation,"hovered")??(0,d.toPaintColor)(s),g=o.get("alpha",t.observation,"hovered"),p=o.get("fillAlpha",t.observation,"hovered")*g,m=o.get("strokeAlpha",t.observation,"hovered")*g,f=o.get("strokeWidth",t.observation,"hovered");return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(ie,{viewBox:"-1 -1 2 2",preserveAspectRatio:"xMidYMid meet",width:"100%",height:"100%","data-geom":"area","data-testid":"hovered-area",effects:W((0,d.readGeomEffects)(o,t.observation,"hovered")),className:te,children:[c,(0,i.jsx)("path",{d:u.fillPath,fill:l(s),fillOpacity:p,fillRule:"evenodd","data-testid":"hovered-area-fill"}),(0,i.jsx)("path",{d:u.outlinePath,fill:"none",stroke:h,strokeWidth:f,opacity:m,vectorEffect:"non-scaling-stroke","data-testid":"hovered-area-edge"})]}),r.map(y=>(0,i.jsx)(me,{hit:y,project:$},`companion-${y.layerId}-${y.pointIndex}`)),(0,i.jsx)(Ne,{hit:t,project:$,"data-testid":"hovered-area-point"})]})},yc={geom:"area",coord:"polar",swatchShape:"area",guideMode:"crosshair",render:({layer:e,panelRect:t})=>(0,i.jsx)(pc,{layer:e,panelRect:t}),renderHover:({layer:e,primary:t,group:r,related:n,panelRect:o})=>(0,i.jsx)(xc,{layer:e,primary:t,companions:[...r,...n],panelRect:o}),renderHoverCompanions:({related:e})=>(0,i.jsx)(ut,{companions:e}),getEditOutlineShapes:mc,getOverlayAnchor:({observation:e})=>{const t=(0,d.getX)(e),r=(0,d.getYMax)(e)??(0,d.getY)(e);if(t===null||r===null)return null;const{x:n,y:o}=$(t,r);return{x:n,y:1-o}}},ur=e=>{const{startAngle:t,endAngle:r}=(0,d.getAngleExtent)(e),{innerRadius:n,outerRadius:o}=(0,d.getRadiusExtent)(e);return t===null||r===null||n===null||o===null?null:{startAngle:t,endAngle:r,innerRadius:n,outerRadius:o}},Eo=(e,t,r,n)=>{const o=new Map;let a=-1;for(const l of e.data){a+=1;const c=ur(l);if(c===null)continue;const u=(0,d.buildSliceGroupKey)(t,c),h=n(l,c,a),g=o.get(u);g===void 0?o.set(u,{firstObservation:l,members:[h]}):g.members.push(h)}const s=new Map;for(const[l,{firstObservation:c,members:u}]of o)s.set(l,{style:St(r,c),union:(0,d.getUnionExtent)(u),members:u});return s},hr=(e,t,r)=>{const n=Eo(e,t,r,(a,s)=>s),o=new Map;for(const[a,{style:s,union:l}]of n)o.set(a,{style:s,union:l});return o},bc=(e,t,r,n,o)=>e.get((0,d.buildSliceGroupKey)(t,o))??{style:St(r,n),union:(0,d.getUnionExtent)([o])},gr=({style:e,union:t})=>(0,d.resolvePolarBarCornerRadiusUnit)(e.cornerRadius,t.outerRadius-t.innerRadius),Ro=(e,t,r,n)=>(0,d.buildPolarBarArcPath)({...t.union,cornerRadius:gr(t),slice:r==="x"?{axis:"radius",from:e.innerRadius,to:e.outerRadius}:{axis:"angle",from:e.startAngle,to:e.endAngle}},n),Ac=Un(hr),Sc=({layer:e,sourceLayer:t,coordSystem:r,panelRect:n,styleReaders:o,shouldAnimateTransitions:a})=>{const{bandAxis:s}=r,l=Ac(t,s,o),c=vc(n);let u="";for(const h of e.data){const g=ur(h);if(g===null)continue;const p=l.get((0,d.buildSliceGroupKey)(s,g));p!==void 0&&(u+=Ro(g,p,s,c)??"")}return u===""?[]:[{kind:"region",pathData:u,shouldAnimateTransitions:a}]},$r=Math.PI*2,ht=(e,t)=>({stroke:e,strokeWidth:t,vectorEffect:"non-scaling-stroke"}),Pc=(0,v.memo)(function({layer:t,coordSystem:r,shouldAnimateTransitions:n,intro:o,panelRect:a}){const s=(0,v.useId)(),l=Pt(o?.type==="grow"&&(o.growAxis==="angle"||o.growAxis==="radius")?o:null,n),c=r.bandAxis!=="x",u=F(t),{paints:h,paintAt:g}=et(t,u),{fillFor:p,defs:m}=Y({paints:h,unitsPerPixel:$e(a)}),f=(0,v.useMemo)(()=>{const y=(0,d.createStableKeyGenerator)(t.data,t.mapping,t.id);return[...Eo(t,r.bandAxis,u,(x,S,A)=>({key:y(x),...S,fill:p(g(A)),opacity:u.get("alpha",x)*u.get("fillAlpha",x)})).values()].map((x,S)=>({...x,key:x.members[0]?.key??String(S)}))},[t,r.bandAxis,u,p,g]);return(0,i.jsxs)(ie,{viewBox:"-1 -1 2 2",preserveAspectRatio:"xMidYMid meet",width:"100%",height:"100%","data-geom":"bar",effects:W((0,d.readGeomEffects)(u,t.data.getFirst()??void 0)),className:te,children:[m,f.map((y,x)=>{const{stroke:S,strokeWidth:A,strokeAlpha:P}=y.style,w=S!==void 0,k=(0,d.resolveBarBorderTreatment)(A),E=S===void 0?{}:ht(S,k.separatorWidth),C=S===void 0?void 0:ht(S,k.outlineWidth),j=y.members.map(K=>{const{key:H,...ve}=K;return l.isAnimated?(0,i.jsx)(wc,{...ve,animation:l,sweepsInOnLateMount:c,introKey:H,pathProps:{fill:ve.fill,opacity:ve.opacity,...E}},H):(0,i.jsx)("path",{d:(0,d.buildPolarBarArcPath)(ve)??void 0,fill:ve.fill,opacity:ve.opacity,...E},H)}),T=gr(y);if(!w&&T<=0)return(0,i.jsx)(v.Fragment,{children:j},y.key);const O=`${s}${x}`;if(l.isAnimated)return(0,i.jsx)("g",{clipPath:`url(#${O})`,children:(0,i.jsx)(jc,{...y.union,cornerRadius:T,animation:l,sweepsInOnLateMount:c,introKey:y.members[0]?.key,clipId:O,outlineProps:C,outlineOpacity:P,children:j})},y.key);const V=(0,d.buildPolarBarArcPath)({...y.union,cornerRadius:T});return(0,i.jsxs)("g",{clipPath:`url(#${O})`,children:[(0,i.jsx)("clipPath",{id:O,children:(0,i.jsx)("path",{d:V})}),j,C!==void 0&&(0,i.jsx)("path",{d:V,fill:"none",opacity:P,...C})]},y.key)})]})}),Co=({startAngle:e,endAngle:t,innerRadius:r,outerRadius:n,cornerRadius:o,animation:a,sweepsInOnLateMount:s,introKey:l})=>{const c=a.activeIntro?.growAxis==="angle"?a.activeIntro:null,u=a.activeIntro?.growAxis==="radius"?a.activeIntro:null,h=s&&!a.isLayerEntrance,g=c?.baseline??(h?$r:e),p=c?.baseline??(h?$r:t),m=u?u.baseline:r,f=u?u.baseline:n,y=(0,R.useMotionValue)(g),x=(0,R.useMotionValue)(p),S=(0,R.useMotionValue)(m),A=(0,R.useMotionValue)(f),P=(0,R.useMotionValue)((0,d.buildPolarBarArcPath)({startAngle:g,endAngle:p,innerRadius:m,outerRadius:f,cornerRadius:o})??""),w=Xt(a,l,c);(0,v.useEffect)(()=>{const E=w(),C=[(0,R.animate)(y,e,E),(0,R.animate)(x,t,E)];return()=>{for(const j of C)j.stop()}},[y,x,e,t,w]);const k=Xt(a,l,u);return(0,v.useEffect)(()=>{const E=k(),C=[(0,R.animate)(S,r,E),(0,R.animate)(A,n,E)];return()=>{for(const j of C)j.stop()}},[S,A,r,n,k]),(0,v.useEffect)(()=>{const E=()=>{P.set((0,d.buildPolarBarArcPath)({startAngle:y.get(),endAngle:x.get(),innerRadius:S.get(),outerRadius:A.get(),cornerRadius:o})??"")};E();const C=[y,x,S,A].map(j=>j.on("change",E));return()=>{for(const j of C)j()}},[y,x,S,A,o,P]),P},wc=({pathProps:e,...t})=>{const r=Co(t);return(0,i.jsx)(R.motion.path,{d:r,transition:ee,...e})},jc=({clipId:e,outlineProps:t,outlineOpacity:r,children:n,...o})=>{const a=Co(o);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("clipPath",{id:e,children:(0,i.jsx)(R.motion.path,{d:a})}),n,t!==void 0&&(0,i.jsx)(R.motion.path,{d:a,fill:"none",opacity:r,transition:ee,...t})]})},kc=(e,t,r)=>{const n=e==="solo"||e==="floor",o=e==="solo"||e==="ceiling",a=!(0,d.isFullTurnSweep)(r.startAngle,r.endAngle);return t==="x"?{innerArc:n,outerArc:o,startSpoke:a,endSpoke:a}:{innerArc:!0,outerArc:!0,startSpoke:n&&a,endSpoke:o&&a}},Io=({observation:e,bandAxis:t,styleReaders:r,groupPaints:n,state:o,fill:a})=>{const s=(0,v.useId)(),l=ur(e);if(l===null)return null;const c=bc(n,t,r,e,l),u=Ro(l,c,t);if(u===void 0)return null;const h=r.get("alpha",e,o)*r.get("fillAlpha",e,o),{stroke:g,strokeWidth:p,strokeAlpha:m}=c.style;if(g===void 0)return(0,i.jsx)("path",{d:u,fill:a,opacity:h,"data-testid":"arc-segment"});const f=(0,d.resolveBarBorderTreatment)(p),y=kc((0,d.getStackRole)(e),t,c.union),x=Rc(l,Cc(y)),S=(0,d.buildPolarBarArcPath)({...c.union,cornerRadius:gr(c)});return(0,i.jsxs)("g",{clipPath:`url(#${s})`,"data-testid":"arc-segment",children:[(0,i.jsx)("clipPath",{id:s,children:(0,i.jsx)("path",{d:u})}),(0,i.jsx)("path",{d:u,fill:a,opacity:h}),x!==""&&(0,i.jsx)("path",{d:x,fill:"none",opacity:h,...ht(g,f.separatorWidth)}),(0,i.jsx)("path",{d:S,fill:"none",opacity:m,...ht(g,f.outlineWidth)})]})},Ec=({layer:e,sourceLayer:t,coordSystem:r,panelRect:n})=>{const o=F(t),a=(0,v.useMemo)(()=>hr(t,r.bandAxis,o),[t,r.bandAxis,o]),{paints:s,paintAt:l}=et(e,o),{fillFor:c,defs:u}=Y({paints:s,unitsPerPixel:$e(n)}),h=(0,d.createStableKeyGenerator)(e.data,e.mapping,e.id),g=[];let p=-1;for(const m of e.data)p+=1,g.push((0,i.jsx)(Io,{observation:m,bandAxis:r.bandAxis,styleReaders:o,groupPaints:a,fill:c(l(p))},h(m)));return(0,i.jsxs)("svg",{viewBox:"-1 -1 2 2",preserveAspectRatio:"xMidYMid meet",width:"100%",height:"100%","data-geom":"bar",className:te,children:[u,g]})},qe=(e,t)=>{const r=Q(t,e);return`${r.x},${r.y}`},en=(e,t,r)=>{if(e<=0)return"";const n=qe(e,t);if((0,d.isFullTurnSweep)(t,r))return`M${n}A${e},${e} 0 1 1 ${qe(e,t+Math.PI)}A${e},${e} 0 1 1 ${n}`;const o=r-t;return`M${n}A${e},${e} 0 ${Math.abs(o)>Math.PI?1:0} ${o>=0?1:0} ${qe(e,r)}`},tn=(e,t,r)=>`M${qe(t,e)}L${qe(r,e)}`,Rc=(e,t)=>{const{startAngle:r,endAngle:n,innerRadius:o,outerRadius:a}=e,s=(0,d.isFullTurnSweep)(r,n);return[t.innerArc?en(o,r,n):"",t.outerArc?en(a,r,n):"",t.startSpoke&&!s?tn(r,o,a):"",t.endSpoke&&!s?tn(n,o,a):""].filter(Boolean).join("")},Cc=e=>({innerArc:!e.innerArc,outerArc:!e.outerArc,startSpoke:!e.startSpoke,endSpoke:!e.endSpoke}),Ic=({layer:e,coordSystem:t,primary:r,panelRect:n})=>{const o=F(e),a=(0,v.useMemo)(()=>hr(e,t.bandAxis,o),[e,t.bandAxis,o]),s=o.get("fill",r.observation,"hovered"),{fillFor:l,defs:c}=Y({paints:[s],unitsPerPixel:$e(n)});return(0,i.jsxs)(ie,{viewBox:"-1 -1 2 2",preserveAspectRatio:"xMidYMid meet",width:"100%",height:"100%","data-geom":"arc","data-testid":"hovered-arc",effects:W((0,d.readGeomEffects)(o,r.observation,"hovered")),className:te,children:[c,(0,i.jsx)(Io,{observation:r.observation,bandAxis:t.bandAxis,styleReaders:o,groupPaints:a,state:"hovered",fill:l(s)})]})},Mc={geom:"bar",coord:"polar",swatchShape:"slice",guideMode:"band",render:({layer:e,coordSystem:t,shouldAnimateTransitions:r,intro:n,panelRect:o})=>(0,i.jsx)(Pc,{layer:e,coordSystem:t,shouldAnimateTransitions:r,intro:n,panelRect:o}),renderHighlight:({layer:e,sourceLayer:t,coordSystem:r,panelRect:n})=>(0,i.jsx)(Ec,{layer:e,sourceLayer:t,coordSystem:r,panelRect:n}),renderHover:({layer:e,coordSystem:t,primary:r,panelRect:n})=>(0,i.jsx)(Ic,{layer:e,coordSystem:t,primary:r,panelRect:n}),renderHoverCompanions:()=>null,getEditOutlineShapes:Sc},Tc=(0,v.memo)(function({layer:t}){const r=F(t),n=(0,v.useMemo)(()=>{const o=(0,d.createStableKeyGenerator)(t.data,t.mapping,t.id),a=[];return t.data.groupBy(d.GROUP_VARIABLES.group).forEach(s=>{const l=[...s],c=Mo(l);if(!c)return;const u=l[0];u&&a.push({key:o(u),pathData:c,color:r.get("stroke",u),opacity:r.get("alpha",u),strokeOpacity:r.get("strokeAlpha",u),strokeWidth:r.get("strokeWidth",u),lineCap:r.get("lineCap",u),lineJoin:r.get("lineJoin",u),strokeDasharray:(0,d.toStrokeDasharray)(r.get("dashArray",u),r.get("strokeWidth",u))})}),a},[t.data,t.id,t.mapping,r]);return(0,i.jsx)(ie,{viewBox:"-1 -1 2 2",preserveAspectRatio:"xMidYMid meet",width:"100%",height:"100%","data-geom":"line",effects:W((0,d.readGeomEffects)(r,t.data.getFirst()??void 0)),className:te,children:n.map(o=>(0,i.jsx)("path",{d:o.pathData,fill:"none",stroke:o.color,strokeWidth:o.strokeWidth,opacity:o.opacity,strokeOpacity:o.strokeOpacity,strokeDasharray:o.strokeDasharray,strokeLinecap:o.lineCap,strokeLinejoin:o.lineJoin,vectorEffect:"non-scaling-stroke"},o.key))})}),Mo=e=>{const t=To(e);return t.length===0?null:Qt(t)},To=e=>{const t=[];for(const r of e){const n=(0,d.getX)(r),o=(0,d.getY)(r);n===null||o===null||t.push({angle:n,point:Q(n,o)})}return t.sort((r,n)=>r.angle-n.angle),t.map(r=>r.point)},Bc=({layer:e,panelRect:t,styleReaders:r})=>{const n=Po(t),o=[],a=[];return e.data.groupBy(d.GROUP_VARIABLES.group).forEach(s=>{const l=[...s],[c]=l;if(c===void 0)return;if(l.length===1){const h=(0,d.getX)(c),g=(0,d.getY)(c);h!==null&&g!==null&&a.push(wo(h,g,t));return}const u=Yt(To(l),n);u!==""&&o.push({kind:"stroke",key:String((0,d.getGroup)(c)),pathData:u,width:r.get("strokeWidth",c)})}),a.length>0&&o.push({kind:"dots",centers:a,size:d.DEFAULT_POINT_SIZE_PX}),o},Oc=({layer:e,primary:t,companions:r})=>{const n=F(e),o=(0,d.getGroup)(t.observation),a=(0,v.useMemo)(()=>Mo([...e.data.filter(d.GROUP_VARIABLES.group,"eq",o)]),[e.data,o]);if(!a)return null;const s=n.get("stroke",t.observation,"hovered"),l=n.get("alpha",t.observation,"hovered"),c=n.get("strokeAlpha",t.observation,"hovered"),u=n.get("strokeWidth",t.observation,"hovered"),h=(0,d.toStrokeDasharray)(n.get("dashArray",t.observation,"hovered"),u),g=n.get("lineCap",t.observation,"hovered"),p=n.get("lineJoin",t.observation,"hovered");return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ie,{viewBox:"-1 -1 2 2",preserveAspectRatio:"xMidYMid meet",width:"100%",height:"100%","data-geom":"line","data-testid":"hovered-line",effects:W((0,d.readGeomEffects)(n,t.observation,"hovered")),className:te,children:(0,i.jsx)("path",{d:a,fill:"none",stroke:s,strokeWidth:u,opacity:l,strokeOpacity:c,strokeDasharray:h,strokeLinecap:g,strokeLinejoin:p,vectorEffect:"non-scaling-stroke","data-testid":"hovered-line-path"})}),r.map(m=>(0,i.jsx)(me,{hit:m,project:$},`companion-${m.layerId}-${m.pointIndex}`)),(0,i.jsx)(Ne,{hit:t,project:$,"data-testid":"hovered-line-point"})]})},Lc={geom:"line",coord:"polar",swatchShape:"line",guideMode:"crosshair",render:({layer:e})=>(0,i.jsx)(Tc,{layer:e}),renderHover:({layer:e,primary:t,group:r,related:n})=>(0,i.jsx)(Oc,{layer:e,primary:t,companions:[...r,...n]}),renderHoverCompanions:({related:e})=>(0,i.jsx)(ut,{companions:e}),getEditOutlineShapes:Bc,getOverlayAnchor:({observation:e})=>{const t=(0,d.getX)(e),r=(0,d.getY)(e);if(t===null||r===null)return null;const{x:n,y:o}=$(t,r);return{x:n,y:1-o}}},Fc=(0,v.memo)(function({layer:t,shouldAnimateTransitions:r,intro:n}){const o=F(t),a=Pt(n?.type==="grow"&&n.growAxis==="size"?n:null,r);return(0,v.useMemo)(()=>{const s=a.activeIntro?(0,d.createStableKeyGenerator)(t.data,t.mapping,t.id):null,l=[];let c=0;for(const u of t.data)l.push((0,i.jsx)(Jn,{observation:u,project:$,styleReaders:o,animation:a,introKey:s?.(u)},String(c++)));return l},[t.data,t.mapping,t.id,o,a])}),Nc={geom:"point",coord:"polar",swatchShape:"circle",render:({layer:e,shouldAnimateTransitions:t,intro:r})=>(0,i.jsx)(Fc,{layer:e,shouldAnimateTransitions:t,intro:r}),renderHover:({primary:e,group:t,related:r})=>(0,i.jsx)(ut,{primary:e,companions:[...t,...r]}),renderHoverCompanions:({related:e})=>(0,i.jsx)(ut,{companions:e}),getEditOutlineShapes:e=>_n({...e,project:$}),getOverlayAnchor:({observation:e})=>{const t=(0,d.getX)(e),r=(0,d.getY)(e);if(t===null||r===null)return null;const{x:n,y:o}=$(t,r);return{x:n,y:1-o}}},Bo={bar:{cartesian:Us,polar:Mc},line:{cartesian:Zs,polar:Lc},area:{cartesian:ps,polar:yc},point:{cartesian:$s,polar:Nc},rule:{cartesian:cc},tile:{cartesian:fc}};function Rt(e){return typeof e=="function"?{overlay:!1,fn:e}:{overlay:!0,fn:e.fn}}function Oo(e){return e?Rt(e.render).overlay:!1}function Dc(e,t){return typeof e=="string"?{...t,geom:e}:{...t,definition:e,geom:e.type}}function Lo(e=[]){const t={};for(const[r,n]of Object.entries(Bo))t[r]={...n};for(const r of e)(t[r.geom]??={})[r.coord]=r;return(r,n)=>t[r]?.[n]??null}var Fo=["top","right","bottom","left"],Hc=()=>(0,er.createStore)(e=>({boundary:null,setBoundary:t=>e(r=>Gc(r.boundary,t)?r:{boundary:t})})),gt=(e,t)=>e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height,qt=(e,t)=>Fo.every(r=>e[r].from===t[r].from&&e[r].to===t[r].to),Gc=(e,t)=>e===t?!0:e===null||t===null?!1:gt(e.frame,t.frame)&>(e.client,t.client)&&qt(e.frameSpans,t.frameSpans)&&qt(e.clientSpans,t.clientSpans),ft=e=>{const t=(0,v.useRef)(e);return t.current=e,t},Wc=()=>{const e=new Map;return(0,er.createStore)(t=>({hover:d.RESTING_HOVER_STATE,tooltipAnchor:null,pointerRegions:[],isPointerSuspended:!1,isQueryOwnedByEditor:!1,setHoverState:r=>t(n=>n.hover===r?n:{hover:r}),setTooltipAnchor:r=>t(n=>Vc(n.tooltipAnchor,r)?n:{tooltipAnchor:r}),publishPointerRegions:(r,n)=>{n.length===0?e.delete(r):e.set(r,n);const o=(0,d.orderPointerRegions)(e);t(a=>(0,d.arePointerRegionListsEqual)(a.pointerRegions,o)?a:{pointerRegions:o})},setPointerSuspended:r=>t(n=>n.isPointerSuspended===r?n:{isPointerSuspended:r}),setQueryOwnedByEditor:r=>t(n=>n.isQueryOwnedByEditor===r?n:{isQueryOwnedByEditor:r})}))},Vc=(e,t)=>e===t?!0:e===null||t===null?!1:e.x===t.x&&e.y===t.y&&e.placement===t.placement&&e.annotationId===t.annotationId,Uc=(e,t)=>{const r=(0,v.useMemo)(()=>({layers:e,coordSystem:t}),[e,t]),n=(0,v.useRef)(null);n.current===null&&(n.current=new d.HoverEngine(r));const o=n.current,a=(0,v.useRef)(!1);return(0,v.useEffect)(()=>{if(!a.current){a.current=!0;return}o.update(r)},[o,r]),o},No=(0,v.createContext)(null),Do=({children:e})=>{const{layers:t,coordSystem:r}=M((0,q.useShallow)(l=>({layers:l.layers,coordSystem:l.coordSystem}))),n=Uc(t,r),[o]=(0,v.useState)(()=>Wc()),a=(0,v.useRef)(null),s=(0,v.useRef)(null);return s.current===null&&(s.current={engine:n,store:o,overlayRef:a}),(0,i.jsx)(No.Provider,{value:s.current,children:e})},xe=()=>{const e=(0,v.useContext)(No);if(e===null)throw new Error("useHoverContext must be used inside a <HoverProvider>.");return e};function Ho(e,t){const{engine:r}=xe(),n=(0,v.useRef)(t);(0,v.useEffect)(()=>{n.current=t},[t]),(0,v.useEffect)(()=>(r.registerHitTester(e,o=>n.current(o)),()=>r.unregisterHitTester(e)),[r,e])}var zc=({hitTest:e,input:t})=>{const r=(0,v.useMemo)(()=>e(t),[e,t.layer.data,t.panelRect.x,t.panelRect.y,t.panelRect.width,t.panelRect.height]);return Ho(t.layer.id,r),null},Yc="graphy_root",fr=()=>typeof document>"u"?null:document.getElementById(Yc)??document.body,Kc="_10igzta0",Go=({rect:e,zIndex:t,container:r,boxRef:n,children:o,...a})=>r===null?null:(0,Mn.createPortal)((0,i.jsx)("div",{...a,ref:n,className:Kc,style:{transform:`translate(${e.left}px, ${e.top}px)`,width:e.width,height:e.height,zIndex:t},children:o}),r),Xc=({rect:e,children:t})=>{const[r]=(0,v.useState)(fr);return(0,i.jsx)(Go,{rect:e,zIndex:Ce.panelOverlay,container:r,children:t})},Wo=(e,t)=>{const r=ft(e),n=ft(t),o=(0,v.useRef)(null),a=(0,v.useRef)(null),s=(0,v.useMemo)(()=>{const l=()=>{a.current!==null&&(clearTimeout(a.current),a.current=null),o.current=null},c=()=>{a.current!==null&&(clearTimeout(a.current),a.current=null);const h=o.current;h!==null&&(o.current=null,r.current(...h))};return{run:(...h)=>{if(n.current<=0){r.current(...h);return}o.current=h,a.current!==null&&clearTimeout(a.current),a.current=setTimeout(c,n.current)},flush:c,cancel:l}},[r,n]);return(0,v.useEffect)(()=>()=>{a.current!==null&&clearTimeout(a.current)},[]),s},Qc={width:0,height:0,isDefault:!0},Vo=({debounce:e=0,onResize:t}={})=>{const[r,n]=(0,v.useState)(Qc),o=(0,v.useRef)(null),a=Wo(u=>{const h=o.current;h&&h.width===u.width&&h.height===u.height||(o.current={width:u.width,height:u.height},t?.(u),n(u))},e),s=(0,v.useRef)(null),l=(0,v.useRef)(null),c=(0,v.useCallback)(u=>{s.current!==u&&(s.current&&l.current?.unobserve(s.current),s.current=u,u&&(l.current??=new ResizeObserver(([h])=>{if(!h)return;const g=Math.round(h.contentBoxSize[0]?.inlineSize??h.contentRect.width),p=Math.round(h.contentBoxSize[0]?.blockSize??h.contentRect.height);a.run({width:g,height:p,isDefault:!1})}),l.current.observe(u)))},[a]);return{...r,setElement:c}};function Uo(){const[e,t]=(0,v.useState)(null),r=(0,v.useRef)(null),n=(0,v.useRef)(null),o=(0,v.useRef)(null),a=(0,v.useCallback)(()=>{o.current=null;const u=n.current;if(!u)return;const h=u.getBoundingClientRect();if(h.width===0||h.height===0){r.current!==null&&(r.current=null,t(null));return}const g={left:h.left,top:h.top,width:h.width,height:h.height},p=r.current;p&&p.left===g.left&&p.top===g.top&&p.width===g.width&&p.height===g.height||(r.current=g,t(g))},[]),s=(0,v.useCallback)(()=>{o.current===null&&(o.current=requestAnimationFrame(a))},[a]),{setElement:l}=Vo({onResize:s}),c=(0,v.useCallback)(u=>{n.current=u,l(u),u&&a()},[l,a]);return(0,v.useEffect)(()=>(window.addEventListener("scroll",s,!0),window.addEventListener("resize",s),()=>{window.removeEventListener("scroll",s,!0),window.removeEventListener("resize",s),o.current!==null&&cancelAnimationFrame(o.current)}),[s]),{measureRef:c,screenRect:e}}function zo(e){const{engine:t,store:r}=xe();return(0,v.useCallback)((n,o)=>{const{hover:a,setHoverState:s,setTooltipAnchor:l}=r.getState(),c=n===null?d.RESTING_HOVER_STATE:t.resolveHoverByKey(e,n);if(c.primary===null){a.primary?.layerId===e&&(s(d.RESTING_HOVER_STATE),l(null));return}s(c),l(o?{x:o.clientX,y:o.clientY,placement:"top"}:null)},[t,r,e])}var qc=({render:e,input:t})=>{const r=zo(t.layer.id),{measureRef:n,screenRect:o}=Uo();return(0,v.useEffect)(()=>()=>r(null),[r]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("rect",{ref:n,x:0,y:0,width:"100%",height:"100%",fill:"none",pointerEvents:"none"}),o&&(0,i.jsx)(Xc,{rect:o,children:(0,i.jsx)(Jc,{render:e,input:t,pushHover:r,panelRect:o})})]})},Jc=({render:e,input:t,pushHover:r,panelRect:n})=>e({...t,overlay:{pushHover:r,panelRect:n}}),ae={readonly:"readonly",editable:"editable",pointAndEdit:"point-and-edit"},ge={[ae.readonly]:{tooltips:!0,annotations:!0,observationMenu:!1,hoverPaint:!0,editOutline:!1,overlayMenu:!1,observationsPress:!1,graphPress:!1,guidePress:!1,holdsHoverWhileSelected:!0,tolerance:null,editorSurface:!1,inlineTextEditing:!1},[ae.editable]:{tooltips:!1,annotations:!0,observationMenu:!0,hoverPaint:!0,editOutline:!1,overlayMenu:!1,observationsPress:!1,graphPress:!1,guidePress:!1,holdsHoverWhileSelected:!0,tolerance:null,editorSurface:!0,inlineTextEditing:!0},[ae.pointAndEdit]:{tooltips:!1,annotations:!1,observationMenu:!1,hoverPaint:!1,editOutline:!0,overlayMenu:!0,observationsPress:!0,graphPress:!0,guidePress:!0,holdsHoverWhileSelected:!1,tolerance:{on:{edge:2,stroke:5,point:14},near:{main:8,cross:20}},editorSurface:!0,inlineTextEditing:!1}},Zc=new Set(Object.values(ae)),_c=e=>Zc.has(e),vr=e=>_c(e)?e:ae.readonly,vt={enabled:!0,trigger:"mount",durationScale:1,stagger:!0,staggerOrder:"main-axis"},rn=1500,$c=(e,t)=>t?{intro:{...vt,enabled:!1},transitions:!1,maxAnimatedGeoms:rn}:typeof e=="boolean"?{intro:{...vt,enabled:e},transitions:e,maxAnimatedGeoms:rn}:{intro:ed(e?.intro),transitions:e?.transitions??!0,maxAnimatedGeoms:e?.maxAnimatedGeoms??1500},ed=e=>typeof e=="boolean"?{...vt,enabled:e}:(0,Ti.merge)({},vt,e),td=(e,t)=>{const r=(0,R.useReducedMotion)(),n=(0,v.useMemo)(()=>$c(e,r??!1),[e,r]),o=(0,v.useMemo)(()=>t.reduce((a,s)=>a+(0,d.countLayerGeoms)(s),0),[t]);return(0,v.useMemo)(()=>o<=n.maxAnimatedGeoms?n:{...n,intro:{...n.intro,enabled:!1},transitions:!1},[n,o])},rd={loading:"جاري التحميل",error:"حدث خطأ ما",axisLabels:{placeholder:"إضافة تسمية"},defaultPropertyLabels:{date:"التاريخ",year:"السنة",quarter:"الربع",month:"الشهر",week:"الأسبوع",series:"السلسلة",category:"الفئة",columnNumber:({number:e})=>`العمود ${e}`,rowNumber:({number:e})=>`الصف ${e}`,seriesNumber:({number:e})=>`السلسلة ${e}`},trendComparison:{fromPrevious:{long:({value:e})=>`${e} مقابل السابق`,short:({value:e})=>`${e} مقابل السابق`},fromPreviousYear:{long:({value:e})=>`${e} مقابل السنة السابقة`,short:({value:e})=>`${e} مقابل السنة السابقة`},fromPreviousMonth:{long:({value:e})=>`${e} مقابل الشهر السابق`,short:({value:e})=>`${e} مقابل الشهر السابق`},fromPreviousWeek:{long:({value:e})=>`${e} مقابل الأسبوع السابق`,short:({value:e})=>`${e} مقابل الأسبوع السابق`},fromPreviousDay:{long:({value:e})=>`${e} مقابل اليوم السابق`,short:({value:e})=>`${e} مقابل اليوم السابق`},fromPreviousHour:{long:({value:e})=>`${e} مقابل الساعة السابقة`,short:({value:e})=>`${e} مقابل الساعة السابقة`}},headlineMetrics:{averageLong:({value:e})=>`المتوسط ${e}`,averageShort:({value:e})=>`المتوسط ${e}`,total:({value:e})=>`المجموع ${e}`,totalConversionRate:({value:e})=>`معدل التحويل الإجمالي ${e}`,current:({value:e})=>e,comparisonReference:({value:e})=>`من ${e}`},legend:{hiddenItems:"عناصر وسيلة الإيضاح المخفية"}},nd={graph:rd,dir:"rtl"},od={loading:"Loading",error:"Something went wrong",axisLabels:{placeholder:"Add label"},defaultPropertyLabels:{date:"Date",year:"Year",quarter:"Quarter",month:"Month",week:"Week",series:"Series",category:"Category",columnNumber:({number:e})=>`Column ${e}`,rowNumber:({number:e})=>`Row ${e}`,seriesNumber:({number:e})=>`Series ${e}`},trendComparison:{fromPrevious:{long:({value:e})=>`${e} vs previous`,short:({value:e})=>`${e} vs prev`},fromPreviousYear:{long:({value:e})=>`${e} vs previous year`,short:({value:e})=>`${e} vs prev year`},fromPreviousMonth:{long:({value:e})=>`${e} vs previous month`,short:({value:e})=>`${e} vs prev month`},fromPreviousWeek:{long:({value:e})=>`${e} vs previous week`,short:({value:e})=>`${e} vs prev week`},fromPreviousDay:{long:({value:e})=>`${e} vs previous day`,short:({value:e})=>`${e} vs prev day`},fromPreviousHour:{long:({value:e})=>`${e} vs previous hour`,short:({value:e})=>`${e} vs prev hour`}},headlineMetrics:{averageLong:({value:e})=>`Average ${e}`,averageShort:({value:e})=>`Avg. ${e}`,total:({value:e})=>`Total ${e}`,totalConversionRate:({value:e})=>`Total conversion rate ${e}`,current:({value:e})=>e,comparisonReference:({value:e})=>`from ${e}`},legend:{hiddenItems:"Hidden legend items"}},ad={graph:od,dir:"ltr"},id={},sd={loading:"A carregar",error:"Algo correu mal",axisLabels:{placeholder:"Adicionar etiqueta"},defaultPropertyLabels:{date:"Data",year:"Ano",quarter:"Trimestre",month:"Mês",week:"Semana",series:"Série",category:"Categoria",columnNumber:({number:e})=>`Coluna ${e}`,rowNumber:({number:e})=>`Linha ${e}`,seriesNumber:({number:e})=>`Série ${e}`},trendComparison:{fromPrevious:{long:({value:e})=>`${e} vs anterior`,short:({value:e})=>`${e} vs ant`},fromPreviousYear:{long:({value:e})=>`${e} vs ano anterior`,short:({value:e})=>`${e} vs ano ant`},fromPreviousMonth:{long:({value:e})=>`${e} vs mês anterior`,short:({value:e})=>`${e} vs mês ant`},fromPreviousWeek:{long:({value:e})=>`${e} vs semana anterior`,short:({value:e})=>`${e} vs sem ant`},fromPreviousDay:{long:({value:e})=>`${e} vs dia anterior`,short:({value:e})=>`${e} vs dia ant`},fromPreviousHour:{long:({value:e})=>`${e} vs hora anterior`,short:({value:e})=>`${e} vs hora ant`}},headlineMetrics:{averageLong:({value:e})=>`Média ${e}`,averageShort:({value:e})=>`Méd. ${e}`,total:({value:e})=>`Total ${e}`,totalConversionRate:({value:e})=>`Taxa de conversão total ${e}`,current:({value:e})=>e,comparisonReference:({value:e})=>`de ${e}`},legend:{hiddenItems:"Itens de legenda ocultos"}},ld={graph:sd,dir:"ltr"},Ct={"en-GB":ad,"en-US":id,ar:nd,"pt-PT":ld},cd=({locale:e,overrides:t,fallbackLocale:r="en-GB",dictionaries:n})=>{const o=t??{},a=e??r,s=[...n.map(c=>c[a]),...n.map(c=>c[r])];return(c,u)=>{const h=u??{},g=c.split("."),p=o[c];if(p)return typeof p=="function"?p(h):p;for(const m of s){if(m===void 0)continue;const f=ud(m,g);if(f)return typeof f=="function"?f(h):f}return c}},dd=({locale:e,overrides:t})=>t?.dir??Ct[e].dir??"ltr",ud=(e,t)=>{let r=e;for(const n of t){if(typeof r!="object"||r===null)return;r=r[n]}if(typeof r=="string"||typeof r=="function")return r},hd=e=>{const t="en-GB";if(!e)return t;const r=e.trim().replace("_","-").toLowerCase();return Object.keys(Ct).find(n=>n.toLowerCase()===r)??t},Yo=(0,v.createContext)(null),gd=[Ct],pr=()=>fd().translator,Ko=({locale:e,children:t,i18nOverrides:r,dictionaries:n=gd})=>{const o=hd(e),a=(0,v.useMemo)(()=>({translator:cd({locale:o,overrides:r,fallbackLocale:"en-GB",dictionaries:n}),dir:dd({locale:o,overrides:r})}),[r,o,n]);return(0,i.jsx)(Bi.IntlProvider,{locale:o,timeZone:"UTC",children:(0,i.jsx)(Yo.Provider,{value:a,children:t})})},fd=()=>{const e=(0,v.useContext)(Yo);if(!e)throw new Error("useI18n must be used within IntlProvider");return e},Xo=e=>typeof e=="number"?{topLeft:e,topRight:e,bottomRight:e,bottomLeft:e}:e,It=e=>{if(typeof e=="number")return e;const{topLeft:t,topRight:r,bottomRight:n,bottomLeft:o}=e;return t===r&&r===n&&n===o?t:null},vd=e=>{const{topLeft:t,topRight:r,bottomRight:n,bottomLeft:o}=Xo(e);return t>0||r>0||n>0||o>0},Ge=(e,t=0)=>{const r=It(e);if(r!==null)return`${nn(r,t)}px`;const{topLeft:n,topRight:o,bottomRight:a,bottomLeft:s}=e;return[n,o,a,s].map(l=>`${nn(l,t)}px`).join(" ")},mr=(e,t)=>{const{x:r,y:n,width:o,height:a}=e,{topLeft:s,topRight:l,bottomRight:c,bottomLeft:u}=pd(Xo(t),o,a),h=r+o,g=n+a,p=(m,f,y)=>m>0?`A${m},${m},0,0,1,${f},${y}`:"";return[`M${r+s},${n}`,`H${h-l}`,p(l,h,n+l),`V${g-c}`,p(c,h-c,g),`H${r+u}`,p(u,r,g-u),`V${n+s}`,p(s,r+s,n),"Z"].filter(m=>m!=="").join("")},nn=(e,t)=>e===0?0:e+t,pd=(e,t,r)=>{const{topLeft:n,topRight:o,bottomRight:a,bottomLeft:s}=e,l=Math.min(1,...[[t,n+o],[t,s+a],[r,n+s],[r,o+a]].map(([u=0,h=0])=>h>0?u/h:1)),c=u=>Math.max(0,u*l);return{topLeft:c(n),topRight:c(o),bottomRight:c(a),bottomLeft:c(s)}},Te=(e,t)=>{if(typeof e=="string")return{background:e};if((0,d.isGradientPaint)(e)){const n=e.stops.map(o=>`${o.color} ${o.offset*100}%`).join(", ");return{background:e.gradient==="radial"?`radial-gradient(circle, ${n})`:`linear-gradient(${e.angle??180}deg, ${n})`}}if((0,d.isPatternPaint)(e)){const n=e.size??8,o=n/6;return{background:[...md(e,n,o),...e.background===void 0?[]:[e.background]].join(", "),backgroundSize:`${n}px ${n}px`}}if((e.fit??"tile")==="stretch")return{background:`${sn(an(e,{width:1,height:1}))} no-repeat center, ${e.fallback}`,backgroundSize:"100% 100%"};const r=zn(e,t);return{background:`${sn(an(e,r))} repeat, ${e.fallback}`,backgroundSize:`${r.width}px ${r.height}px`}},md=(e,t,r)=>{if(e.pattern==="dots")return[`radial-gradient(circle, ${e.color} ${r}px, transparent ${r}px)`];if(e.pattern==="lines"){const n=`${t*xs}px`;return[`linear-gradient(to bottom, ${e.color} ${n}, transparent ${n})`]}return[on(-45,e.color,t,r),...e.pattern==="crosshatch"?[on(45,e.color,t,r)]:[]]},on=(e,t,r,n)=>{const o=`${r/Math.SQRT2}px`,a=`${n/2}px`,s=`${r/Math.SQRT2-n/2}px`;return`repeating-linear-gradient(${e}deg, ${t} 0 ${a}, transparent ${a} ${s}, ${t} ${s} ${o})`},an=(e,t)=>{if(e.alpha===void 0||e.alpha>=1)return e.image;const r=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${t.width} ${t.height}" preserveAspectRatio="none"><image href="${xd(e.image)}" width="${t.width}" height="${t.height}" opacity="${e.alpha}" preserveAspectRatio="none"/></svg>`;return`data:image/svg+xml,${encodeURIComponent(r)}`},xd=e=>e.replace(/&/gu,"&").replace(/</gu,"<").replace(/>/gu,">").replace(/"/gu,"""),sn=e=>`url("${e.replace(/[\\"]/gu,"\\$&").replace(/[\n\r\f]/gu,t=>`\\${t.charCodeAt(0).toString(16)} `)}")`,yd="bow4tg0",bd="bow4tg1",Ad="bow4tg2",Sd="bow4tg3",Pd="bow4tg4",xr="_1ii3bsb0",Qo="_1ii3bsb1",qo=(0,v.createContext)({colorScheme:"light",themeClass:xr,inlineVarsStyle:{},themeValues:cr("light",{})}),Mt=()=>(0,v.useContext)(qo),Jo=({colorScheme:e,textScale:t=1,graphBackground:r,graphFontFamily:n,headingFontFamily:o,children:a})=>{const s=(0,v.useMemo)(()=>cr(e),[e]),l=(0,v.useMemo)(()=>{const u={[b.textScale]:String(t)};return r!==void 0&&(u[b.graphBackground]=r),n!==void 0&&(u[b.fontFamily]=n),o!==void 0&&(u[b.fontFamilyHeading]=o),(0,xt.assignInlineVars)(u)},[t,r,n,o]),c=(0,v.useMemo)(()=>({colorScheme:e,themeClass:e==="dark"?Qo:xr,inlineVarsStyle:l,themeValues:s}),[e,l,s]);return(0,i.jsx)(qo.Provider,{value:c,children:a})},Zo=({children:e,className:t,style:r})=>{const{colorScheme:n,themeClass:o,inlineVarsStyle:a}=Mt();return(0,i.jsx)("div",{className:(0,U.default)(o,bd,t),style:{...a,...r},"data-graphy-color-scheme":n,children:e})},_o={modern:"'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI', 'Roboto', 'Oxygen-Sans', 'Ubuntu', 'Cantarell', 'Helvetica Neue', sans-serif",timeless:"'Noto Serif', Georgia, 'Times New Roman', serif",fresh:"'Aeonik', 'Aeonik Fallback', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif",technical:"'PT Mono', 'Courier New', monospace",handwritten:"'Permanent Marker', cursive",fineliner:"'Intruding Cat', cursive"},$o=e=>{const t=e!==null&&typeof e=="object"?e.fontFamily:e;return typeof t=="string"&&t.length>0?t:void 0},Jt=e=>{const t=$o(e);if(t!==void 0)return _o[t]??t},wd="_1cocly40",Be=({content:e})=>(0,i.jsx)(i.Fragment,{children:ea(e.content??[e])}),ea=e=>e.map((t,r)=>jd(t,r)),jd=(e,t)=>{if(e.type==="text")return kd(e,t);if(e.type==="hardBreak"||e.type==="hard_break")return(0,i.jsx)("br",{},t);const r=e.content?ea(e.content):null;switch(e.type){case"doc":return(0,i.jsx)(v.Fragment,{children:r},t);case"heading":{const n=Id(e.attrs?.level);return Md(n,t,r,ln(e.attrs))}case"paragraph":return(0,i.jsx)("p",{"data-variant":yr(e.attrs?.variant)??void 0,style:ta(ln(e.attrs)),children:r},t);case"blockquote":return(0,i.jsx)("blockquote",{children:r},t);case"bulletList":case"bullet_list":return(0,i.jsx)("ul",{children:r},t);case"orderedList":case"ordered_list":return(0,i.jsx)("ol",{children:r},t);case"listItem":case"list_item":return(0,i.jsx)("li",{children:r},t);default:return(0,i.jsx)("span",{children:r},t)}},kd=(e,t)=>{const r=e.text??"";return!e.marks||e.marks.length===0?(0,i.jsx)("span",{children:r},t):e.marks.reduceRight((n,o,a)=>Ed(o,n,`${t}-${a}`),r)},Ed=(e,t,r)=>{switch(e.type){case"bold":case"strong":return(0,i.jsx)("strong",{children:t},r);case"italic":case"em":return(0,i.jsx)("em",{children:t},r);case"underline":return(0,i.jsx)("u",{children:t},r);case"strike":case"strikethrough":case"s":return(0,i.jsx)("s",{children:t},r);case"code":return(0,i.jsx)("code",{children:t},r);case"link":{const n=yr(e.attrs?.href);return(0,d.isSafeUrl)(n)?(0,i.jsx)("a",{className:wd,href:n,rel:"noopener noreferrer",target:"_blank",children:t},r):(0,i.jsx)("span",{children:t},r)}case"textStyle":{const n=Rd(e.attrs);return n?(0,i.jsx)("span",{style:n,children:t},r):(0,i.jsx)("span",{children:t},r)}default:return(0,i.jsx)("span",{children:t},r)}},Rd=e=>{if(!e)return null;const t={},r=yr(e.color);r&&(t.color=r);const n=Jt(e.font)??Jt(e.fontFamily);n&&(t.fontFamily=n);const o=Cd(e.fontSize);return o&&(t.fontSize=o),Object.keys(t).length>0?t:null},Cd=e=>{if(typeof e=="number"&&Number.isFinite(e))return`calc(${e}px * ${b.textScale})`},yr=e=>typeof e=="string"&&e.length>0?e:void 0,Id=e=>typeof e!="number"?3:e<1?1:e>3?3:Math.round(e),Md=(e,t,r,n)=>{const o=ta(n);switch(e){case 1:return(0,i.jsx)("h1",{style:o,children:r},t);case 2:return(0,i.jsx)("h2",{style:o,children:r},t);case 3:return(0,i.jsx)("h3",{style:o,children:r},t)}},ln=e=>{const t=e?.textAlign;if(t==="left"||t==="right"||t==="center"||t==="justify")return t},ta=e=>e?{textAlign:e}:void 0;function Ie(e){const{store:t}=xe();return(0,Oe.useStore)(t,e)}var Td="_19519k80";var Bd="_19519k82",Od="_19519k83";var Ld="_19519k86",Fd="_19519k87",Nd="_19519k88";var pt={plansByLayerId:null,coordKey:null,introEndsAtMs:0,isWaitingForView:!1},Dd={...pt,isWaitingForView:!0},Tt=(0,v.createContext)(pt),ra=.4,Hd=({intro:e,panelRect:t,children:r})=>{const{layers:n,coordSystem:o,scales:a}=M((0,q.useShallow)(g=>({layers:g.layers,coordSystem:g.coordSystem,scales:g.scales}))),[s,l]=(0,v.useState)(()=>cn(e)?Dd:dn({layers:n,coordSystem:o,scales:a,intro:e})),[c,u]=(0,v.useState)(null),h=Wd(c)||!cn(e);return s.isWaitingForView&&h&&l(dn({layers:n,coordSystem:o,scales:a,intro:e})),(0,i.jsxs)(Tt.Provider,{value:s,children:[s.isWaitingForView&&(0,i.jsx)("div",{ref:u,className:"_84o2bh0",style:{left:t.x,top:t.y,width:t.width,height:t.height}},`${t.width}x${t.height}`),r]})},je=()=>(0,v.useContext)(Tt).isWaitingForView,Gd=()=>{const{introEndsAtMs:e}=(0,v.useContext)(Tt),[t]=(0,v.useState)(()=>Ud(e)/1e3);return t},na=e=>{const{plansByLayerId:t,coordKey:r}=(0,v.useContext)(Tt),n=M(o=>oa(o.coordSystem));return t===null||r!==n?null:t.get(e)??null},cn=e=>e.enabled&&e.trigger==="inView"&&typeof IntersectionObserver<"u",dn=({layers:e,coordSystem:t,scales:r,intro:n})=>{if(!n.enabled)return pt;const o={durationScale:n.durationScale,stagger:n.stagger,staggerOrder:n.staggerOrder},a=new Map;for(const l of e){const c=(0,d.buildLayerIntroPlan)({layer:l,coordSystem:t,scales:r,options:o});c!==null&&a.set(l.id,c)}if(a.size===0)return pt;const s=[...a.values()].reduce((l,c)=>Math.max(l,ns(c)),0);return{plansByLayerId:a,coordKey:oa(t),introEndsAtMs:performance.now()+s*1e3,isWaitingForView:!1}},Wd=e=>{const[t,r]=(0,v.useState)(!1);return(0,v.useEffect)(()=>{if(e===null)return;const n=new IntersectionObserver(o=>{o.some(Vd)&&r(!0)},{threshold:ra});return n.observe(e),()=>n.disconnect()},[e]),t},Vd=({intersectionRatio:e,intersectionRect:t})=>t.width>0&&t.height>0&&e>=ra,Ud=e=>Math.max(0,e-performance.now()),oa=e=>e.type==="cartesian"?`cartesian-${e.mainAxis}`:e.type,zd=e=>{const{overlayRef:t}=xe(),r=(0,v.useRef)(null),[n,o]=(0,v.useState)(!1),a=ft(e);return(0,v.useEffect)(()=>{const s=t.current;if(!s)return;const l=u=>{r.current={clientX:u.clientX,clientY:u.clientY},o(!0),a.current?.()},c=()=>{r.current=null,o(!1)};return s.addEventListener("pointermove",l),s.addEventListener("pointerleave",c),()=>{s.removeEventListener("pointermove",l),s.removeEventListener("pointerleave",c)}},[t,a,je()]),{cursorRef:r,isInside:n}},Yd=24,Kd=8,Xd={x:0,y:0,top:0,left:0,right:0,bottom:0,width:0,height:0,toJSON:()=>({})},st={boundary:[],padding:Kd},Qd=()=>{const e=M((0,q.useShallow)(A=>({layers:A.layers,coordSystem:A.coordSystem,scales:A.scales,guides:A.guides,numberFormat:A.config.numberFormat,parsingLocale:A.config.parsingLocale,mode:A.config.tooltip.mode,comments:A.annotations.comments}))),{formattingLocale:t}=G(),r=B(),n=Ie(A=>A.hover),o=Ie(A=>A.tooltipAnchor),a=Ie(A=>A.isPointerSuspended),s=oe("Tooltip",aa),l=(0,v.useRef)(()=>{}),{cursorRef:c,isInside:u}=zd(()=>l.current()),h=(0,v.useMemo)(()=>(0,d.buildTooltipContent)({...e,hover:n,readers:r,formattingLocale:t,activeCalloutId:o?.annotationId??null}),[e,n,r,t,o]),g=!a&&h!==null&&(u||o!==null),p=(0,v.useMemo)(()=>({getBoundingClientRect:()=>{if(o!==null)return Zd(o);const A=c.current;return A===null?Xd:Jd(A)}}),[c,o]),{refs:m,floatingStyles:f,update:y}=(0,Z.useFloating)(_d({isOpen:g,tooltipAnchor:o,virtualReference:p}));if(l.current=y,!g)return null;const x=(0,i.jsx)("div",{ref:m.setFloating,role:"tooltip",className:Nd,style:f,"data-testid":"chart-tooltip",children:(0,i.jsx)(s,{content:h})}),S=fr();return S?(0,Mn.createPortal)((0,i.jsx)(Zo,{children:x}),S):x},aa=({content:e})=>{const t=se(),r=M(g=>g.coordSystem),n=I(d.resolveTooltipStyle,B()),o=De([n.box.fill]),a=D(n.heading),s=D(n.label),l=D(n.value),c={paddingInline:n.box.paddingInline},u=e.rows.some(g=>g.swatchColor!==null),h=e.rows.some(g=>!g.isPrimary);return(0,i.jsxs)("div",{className:Td,style:qd(n.box,o(n.box.fill)),"data-testid":"chart-tooltip-body",children:[e.comment!==null&&(0,i.jsx)("div",{style:{...s,color:n.value.textColor,...c},"data-testid":"chart-tooltip-comment",children:(0,i.jsx)(Be,{content:e.comment})}),e.heading!==null&&(0,i.jsx)("div",{className:"_19519k81",style:{...a,...c},"data-testid":"chart-tooltip-heading",children:e.heading}),(0,i.jsx)("div",{className:Bd,children:e.rows.map(g=>{const p=t(g.geom,r.type);return(0,i.jsx)($d,{row:g,swatchShape:p?.swatchShape??"square",mainAxis:(0,d.readMainAxis)(r),hasSwatches:u,shouldHighlight:g.isPrimary&&h,labelStyle:s,valueStyle:l,paddingInline:n.box.paddingInline,paddingBlock:n.box.gap,highlightBackground:(0,d.toPaintColor)(n.primaryRow.fill)},g.key)})})]})},qd=(e,t)=>({...Te(e.fill,t),borderRadius:Ge(e.cornerRadius),paddingBlock:e.paddingBlock,boxShadow:Le(e.shadow),...e.alpha===void 0?{}:{opacity:e.alpha},...e.strokeWidth>0?{border:`${e.strokeWidth}px solid ${e.stroke}`}:{}}),Jd=e=>({x:e.clientX,y:e.clientY,top:e.clientY,left:e.clientX,right:e.clientX,bottom:e.clientY,width:0,height:0,toJSON:()=>({})}),Zd=e=>({x:e.x,y:e.y,top:e.y,left:e.x,right:e.x,bottom:e.y,width:0,height:0,toJSON:()=>({})}),_d=({isOpen:e,tooltipAnchor:t,virtualReference:r})=>({open:e,placement:t!==null?t.placement:"right",middleware:t!==null?[(0,Z.offset)(d.ANNOTATION_TOOLTIP_MARKER_GAP_PX),(0,Z.shift)(st),(0,Z.flip)(st)]:[(0,Z.offset)(Yd),(0,Z.flip)(st),(0,Z.shift)(st)],elements:{reference:r}}),$d=({row:e,swatchShape:t,mainAxis:r,hasSwatches:n,shouldHighlight:o,labelStyle:a,valueStyle:s,paddingInline:l,paddingBlock:c,highlightBackground:u})=>(0,i.jsxs)("div",{className:Od,style:{paddingInline:l,paddingBlock:c,...o?{backgroundColor:u}:{}},"data-testid":"chart-tooltip-row",children:[e.swatchColor===null?n&&(0,i.jsx)("span",{className:"_19519k85","aria-hidden":!0}):(0,i.jsx)(rt,{shape:t,color:e.swatchColor,paint:e.swatchFill,surface:"tooltip",label:e.label,lineType:e.swatchLineType,alpha:e.swatchAlpha,cornerRadius:e.swatchCornerRadius,symbol:e.swatchSymbol,mainAxis:r}),(0,i.jsx)("span",{className:Ld,style:a,"data-testid":"chart-tooltip-label",children:e.label}),(0,i.jsx)("span",{className:Fd,style:s,"data-testid":"chart-tooltip-value",children:e.value})]}),ia=e=>({x:e.axisLabel.x().resolve(),y:e.axisLabel.y().resolve()}),sa=e=>({x:e.tickLine.x().resolve(),y:e.tickLine.y().resolve()}),eu=e=>{const t=e.graph();return(0,d.withAlpha)((0,d.toPaintColor)(t.get("fill")),t.get("alpha")??1)},br=e=>(t,r)=>r===void 0?e.tickLabel[t]().resolve():e.tickLabel[r](t).resolve(),Bt=e=>{const t={};for(const r of d.DATA_LABEL_ROLES){const n={};for(const o of d.RESOLVED_DATA_LABEL_POSITIONS)n[o]=(0,d.resolveDataLabelStyle)(e,r,o);t[r]=n}return t},la=e=>{const t=e.legend().resolve();return{gap:t.gap,focusStroke:t.focusStroke,popover:e.legend.popover().resolve()}},Ar=e=>e.headline().resolve(),tu=({textMeasurer:e,tickLabelStyles:t,tickLineStyles:r,familyDefault:n})=>o=>{const a=o.position==="top"||o.position==="bottom",s=(0,d.getAestheticFromScaleAestheticKey)(o.scaleAestheticKey),{offset:l,...c}=t(s,o.position),u=o.ticksVisible?Math.max(l,r[s].length):l,h=(0,d.toFontSpec)(c,n),g=o.ticks.map(m=>e.measureText(m.formattedLabel,h)),p=o.labelMaxWidthPx??Number.POSITIVE_INFINITY;if(a){if(o.labelRotation!==0){const m=g.map(f=>f.width);return un(m,p)+2*u}return Math.max(...g.map(m=>m.height))+u}return un(g.map(m=>m.width),p)+u},un=(e,t)=>Math.min(Math.max(...e),t),ru=({axisLabelStyles:e})=>t=>(0,d.computeLineBoxHeight)(e[(0,d.getAestheticFromScaleAestheticKey)(t.scaleAestheticKey)]),ca=({textMeasurer:e,dataLabelStyles:t,familyDefault:r})=>(n,o,a)=>{const s=t[n][o],l=e.measureText(a,(0,d.toFontSpec)(s,r));return{...l,width:l.width+s.paddingInline*2,height:l.height+s.paddingBlock*2}},nu=({textMeasurer:e,familyDefault:t})=>(r,n)=>e.measureText(r,(0,d.toFontSpec)(n,t)),ou=_.sm,au=({textMeasurer:e,familyDefault:t,itemGap:r,headlineItemStyles:n})=>(o,a)=>{const s=da(o,n[a],e,t);return{width:ua(s.map(l=>l.width))+Math.max(0,s.length-1)*r,height:Math.max(0,...s.map(l=>l.height))}},iu=({textMeasurer:e,familyDefault:t,headlineItemStyles:r})=>(n,o)=>da(n,r[o],e,t).map(a=>a.width),su=({textMeasurer:e,familyDefault:t,headlineItemStyles:r})=>(n,o,a=!1)=>{const s=(0,d.resolveHeadlineNumberStyle)(r[o],a);return{width:e.measureText(n,(0,d.toFontSpec)(s,t)).width,height:(0,d.computeLineBoxHeight)(s)}},lu=e=>{const t=au(e),r=su(e);return(n,o,a=!1)=>n.kind==="perGroup"?t(n,o):r(n.value,o,a)},da=(e,t,r,n)=>{const o=a=>cu(a,t,r,n);return e.items.map(a=>{const s=(0,d.buildHeadlineItemRows)(a,t).map(o),l=Math.max(0,s.length-1)*t.gap;return{width:Math.max(0,...s.map(c=>c.width)),height:ua(s.map(c=>c.height))+l}})},cu=(e,t,r,n)=>{let o=0,a=0;for(const s of e.segments)if(s.kind==="text"){const l=du(t,s.textRole);o+=r.measureText(s.text,(0,d.toFontSpec)(l,n)).width,a=Math.max(a,uu(l))}else o+=s.size,a=Math.max(a,s.size);return{width:o+Math.max(0,e.segments.length-1)*e.gap,height:a}},du=(e,t)=>{switch(t){case"value":return e.number;case"caption":return e.caption;case"label":return e.label;case"trendPercentage":case"trendReference":return e.trend;default:return t}},uu=e=>e.fontSize*(e.lineHeight??ou),ua=e=>e.reduce((t,r)=>t+r,0),hu=(e,t)=>e?t:0,mt=(e,t,r)=>{if(r){const n=Number(e.size);return Number.isFinite(n)&&n>0?n:0}return hu(e.color,t)},gu=({textMeasurer:e,familyDefault:t,legendItemStyle:r,directLabelStyle:n})=>o=>{const a=o.position==="top"||o.position==="bottom";if(o.display==="direct"){const f=(0,d.computeLineBoxHeight)(n);if(a)return f;const y=(0,d.toFontSpec)(n,t),x=o.items.map(S=>e.measureText(S.formattedLabel,y).width);return Math.max(...x)}const{item:s,swatch:l}=r,c=(0,d.computeLineBoxHeight)(s),u=(0,d.toFontSpec)(s,t),h=2*(s.paddingBlock+s.strokeWidth),g=2*(s.paddingInline+s.strokeWidth),p=o.aesthetics.includes("size");if(a){const f=p?Math.max(0,...o.items.map(y=>mt(y.visual,l.size,!0))):l.size;return Math.max(c,f)+h}const m=o.items.map(f=>{const y=e.measureText(f.formattedLabel,u).width,x=mt(f.visual,l.size,p);return x+(x>0?s.gap:0)+y});return Math.max(...m)+g},fu=({textMeasurer:e,tickLabelStyles:t,familyDefault:r})=>(n,o)=>e.measureText(n,(0,d.toFontSpec)(t(o),r)),vu=Object.freeze({}),pu=({textMeasurer:e,metrics:t,overrides:r=vu})=>{const n=B(),o=I(ia,n),a=I(Bt,n),s=I(d.resolveDirectLabelStyle,n),l=I(d.resolveLegendItemStyle,n),c=I(br,n),u=I(sa,n),h=(0,v.useRef)(r);return h.current=r,(0,v.useMemo)(()=>{if(!e)return null;const g=t.fonts.familyDefault,p=n.graph().get("textScale"),m={textMeasurer:e,familyDefault:g,itemGap:Ar(n).gap,headlineItemStyles:{small:(0,d.resolveHeadlineItemStyle)(n,"small"),medium:(0,d.resolveHeadlineItemStyle)(n,"medium"),large:(0,d.resolveHeadlineItemStyle)(n,"large")}},f=tu({textMeasurer:e,tickLabelStyles:c,tickLineStyles:u,familyDefault:g}),y=ru({axisLabelStyles:o}),x=gu({textMeasurer:e,familyDefault:g,legendItemStyle:l,directLabelStyle:s}),S=lu(m),A=iu(m),P={measureText:(w,k)=>e.measureText(w,k),textScale:p};return{measureAxis:w=>{if(xu(w))return 0;const k=h.current.measureAxis;return k?k(w,P):f(w)},measureAxisLabel:w=>{const k=h.current.measureAxisLabel;return k?k(w,P):y(w)},measureLegend:w=>{if(yu(w))return 0;const k=h.current.measureLegend;return k?k(w,P):x(w)},measureHeadline:(w,k,E)=>(h.current.measureHeadline??S)(w,k,E),measureHeadlineItemWidths:(w,k)=>(h.current.measureHeadlineItemWidths??A)(w,k),measureTickLabel:fu({textMeasurer:e,tickLabelStyles:c,familyDefault:g}),measureDifferenceArrowLabel:nu({textMeasurer:e,familyDefault:g}),measureDataLabel:ca({textMeasurer:e,dataLabelStyles:a,familyDefault:g})}},[e,t,o,a,s,l,c,u,n])},mu=({measurer:e,axes:t,numberFormat:r,parsingLocale:n,formattedLegends:o,containerSize:a,externalMeasurements:s,headline:l,formattingLocale:c,annotations:u,layers:h,coordSystem:g,overflowStrategy:p,panelBorder:m,padding:f,margins:y})=>{const x=B(),S=yt(),A=(0,v.useMemo)(()=>P=>(0,d.resolveDifferenceArrowAnnotationStyle)(x,P),[x]);return(0,v.useMemo)(()=>e?new d.LayoutCompiler(e).compile({axes:t,numberFormat:r,parsingLocale:n,formattedLegends:o,containerSize:a,externalMeasurements:s,headline:l,formattingLocale:c,annotations:u,resolveDifferenceArrowStyle:A,layers:h,readers:x,resolvePlacement:S,coordSystem:g,overflowStrategy:p,panelBorder:m,padding:f,margins:y}):null,[t,r,n,o,a,s,p,l,c,u,A,h,x,S,g,m,f,y,e])},xu=e=>!e.isVisible||e.ticks.length===0,yu=e=>e.items.length===0,ha=()=>{const{formattingLocale:e}=G(),t=M(r=>r.config.parsingLocale);return e??t},hn=.5,ga=(0,v.createContext)(new Map),fa=(0,v.createContext)(()=>{}),va=(0,v.createContext)(new Set),bu=({children:e})=>{const[t,r]=(0,v.useState)(()=>new Map),[n]=(0,v.useState)(()=>new Set),o=(0,v.useRef)(new Map),a=(0,v.useCallback)((s,l,c)=>{const u=o.current.get(s)??new Set;if(c!==null){u.add(l),o.current.set(s,u),r(h=>Pu(h,s,c));return}u.delete(l),!(u.size>0)&&(o.current.delete(s),r(h=>wu(h,s)))},[]);return(0,i.jsx)(fa.Provider,{value:a,children:(0,i.jsx)(va.Provider,{value:n,children:(0,i.jsx)(ga.Provider,{value:t,children:e})})})},pa=()=>(0,v.useContext)(ga),Au=()=>(0,v.useContext)(fa),ma=e=>{const t=Au(),r=(0,v.useId)(),n=(0,v.useRef)(null);return(0,v.useEffect)(()=>{if(typeof ResizeObserver>"u")return;const o=n.current;if(o===null)return;const a=()=>t(e,r,{width:o.offsetWidth,height:o.offsetHeight});a();const s=new ResizeObserver(a);return s.observe(o),()=>{s.disconnect(),t(e,r,null)}},[e,r,t]),n},Su=()=>(0,v.useContext)(va),Pu=(e,t,r)=>{const n=e.get(t);if(n!==void 0&&Math.abs(n.width-r.width)<hn&&Math.abs(n.height-r.height)<hn)return e;const o=new Map(e);return o.set(t,r),o},wu=(e,t)=>{if(!e.has(t))return e;const r=new Map(e);return r.delete(t),r},ju=(e,t)=>e!==null&&e.annotationId===t?e:null,ku=(e,t)=>e.annotationId===t.annotationId&&e.translation.x===t.translation.x&&e.translation.y===t.translation.y,Eu=(e,t,r)=>e!==null&&e.annotationId===t&&e.endpoint===r?e:null,Ru=(e,t)=>e.annotationId===t.annotationId&&e.endpoint===t.endpoint&&e.anchor.x===t.anchor.x&&e.anchor.y===t.anchor.y,Cu=(e,t,r)=>e!==null&&e.annotationId===t&&e.endpoint===r?e:null,Iu=(e,t)=>e.annotationId===t.annotationId&&e.endpoint===t.endpoint&&(0,d.areAnchorsEqual)(e.point.anchor,t.point.anchor),Mu=(e,t)=>e!==null&&e.annotationId===t?e:null,Tu=(e,t)=>e.annotationId===t.annotationId&&e.region.x===t.region.x&&e.region.y===t.region.y&&e.region.width===t.region.width&&e.region.height===t.region.height,Bu=(e,t)=>e!==null&&e.annotationId===t?e:null,Ou=(e,t)=>e.annotationId===t.annotationId&&e.at.x===t.at.x&&e.width===t.width&&e.shift===t.shift,Me=({standingInteraction:e},t)=>e!==null&&be(e,t)?e:null,Lu=(e,t)=>{if(e===null)return!1;switch(t.kind){case"difference-arrow-endpoint-drag":return be(e,t.kind)&&Iu(e,t);case"arrow-endpoint-drag":return be(e,t.kind)&&Ru(e,t);case"move-drag":return be(e,t.kind)&&ku(e,t);case"shape-resize-drag":return be(e,t.kind)&&Tu(e,t);case"text-resize-drag":return be(e,t.kind)&&Ou(e,t);case"chrome-popup":return be(e,t.kind);case"menu":return!1}},be=(e,t)=>e.kind===t,Fu=(e,t,r,n)=>{const o=xa(r.layerId,e,t,n);return o===null?null:{observationIndex:e,predicate:o.predicate,selectedFor:r}},Nu=({observationIndex:e,predicate:t,selectedFor:r},n,o)=>{const a=xa(r.layerId,e,n,o);return a!==null&&(0,d.arePredicatesEqual)(a.predicate,t)?a.standing:null},Du=(e,t)=>e===t?!0:e===null||t===null?!1:e.observationIndex===t.observationIndex&&(0,d.arePredicatesEqual)(e.predicate,t.predicate)&&(0,d.areEditTargetsEqual)(e.selectedFor,t.selectedFor),xa=(e,t,r,n)=>{const o=(0,d.findLayerById)(r,e),a=o?.data.getAt(t)??null;if(o===void 0||a===null)return null;const s=(0,d.buildObservationsTarget)({layer:o,observationIndex:t,scope:"data-point",parsingLocale:n});return s===null?null:{standing:{layer:o,observation:a},predicate:s.predicate}},Hu=({isMenuTrigger:e,stamped:t,observations:r})=>e?{kind:"menu-trigger"}:t!==null&&t.kind!=="grid"?t:r!==null?{kind:"observations",observations:r}:t,Gu=(e,t)=>{if(e===t)return!0;if(e===null||t===null)return!1;if(e.kind==="annotation"&&t.kind==="annotation")return(0,d.areEditTargetsEqual)(e.target,t.target);if(e.kind==="legend"&&t.kind==="legend")return e.part.legendIndex===t.part.legendIndex&&e.part.itemIndex===t.part.itemIndex;if(e.kind==="axis"&&t.kind==="axis")return(0,d.areEditTargetsEqual)(e.target,t.target)&&e.part?.tickIndex===t.part?.tickIndex;if(e.kind==="grid"&&t.kind==="grid")return(0,d.areEditTargetsEqual)(e.target,t.target);if(e.kind==="observations"&&t.kind==="observations"){const r=e.observations,n=t.observations;return r.layerId===n.layerId&&r.observationIndex===n.observationIndex&&r.target.scope===n.target.scope&&r.isOnObservation===n.isOnObservation}return e.kind==="menu-trigger"&&t.kind==="menu-trigger"},Sr=e=>{const t=e.editTargetUnderPointer;return t?.kind==="annotation"?t.target.id:null},Wu=e=>{const t=e.editTargetUnderPointer;return t!==null&&t.kind!=="menu-trigger"},ya=()=>(0,er.createStore)(e=>({menuTrigger:null,editTargetUnderPointer:null,standingInteraction:null,selectedOutline:null,caret:null,pressedObservation:null,setMenuTrigger:t=>e(r=>(0,d.areEditMenuTriggersEqual)(r.menuTrigger,t)?r:{menuTrigger:t}),setEditTargetUnderPointer:t=>e(r=>Gu(r.editTargetUnderPointer,t)?r:{editTargetUnderPointer:t}),claimInteraction:t=>e(r=>Lu(r.standingInteraction,t)?r:{standingInteraction:t}),releaseInteraction:t=>e(r=>r.standingInteraction?.kind===t?{standingInteraction:null}:r),setSelectedOutline:t=>e(r=>Vu(r.selectedOutline,t)?r:{selectedOutline:t}),setCaret:t=>e(r=>(r.caret?.annotationId??null)===t?r:{caret:t===null?null:{annotationId:t,editor:null}}),setCaretEditor:t=>e(r=>r.caret===null?r:{caret:{...r.caret,editor:t}}),setPressedObservation:t=>e(r=>Du(r.pressedObservation,t)?r:{pressedObservation:t})})),Vu=(e,t)=>e===t?!0:e===null||t===null?!1:(0,d.areEditTargetsEqual)(e.target,t.target)&&e.frameScale===t.frameScale&>(e.frame,t.frame)&&qt(e.frameSpans,t.frameSpans),Pr=(0,v.createContext)(null),Uu=ya(),zu=({children:e})=>{const[t]=(0,v.useState)(()=>ya());return(0,i.jsx)(Pr.Provider,{value:t,children:e})},Yu=()=>{const e=(0,v.useContext)(Pr);if(e===null)throw new Error("useEditorStore must be used inside an <EditorProvider>.");return e};function ue(e){return(0,Oe.useStore)((0,v.useContext)(Pr)??Uu,e)}var ba=(0,v.createContext)(null),Ku=({panelRect:e,children:t})=>{const r=Xu(e);return(0,i.jsx)(ba.Provider,{value:r,children:t})},Aa=()=>{const e=(0,v.useContext)(ba);if(e===null)throw new Error("Difference arrows read outside a <DifferenceArrowsProvider>.");return e},gn=(e,t,r)=>t.isStrokeAuthored?t.stroke:(0,d.resolveArrowColor)(e.start,e.end,{start:r(e.start),end:r(e.end)})??t.stroke,Xu=e=>{const{formattingLocale:t}=G(),r=he(),{fonts:n}=we(),o=ue(x=>Me(x,"difference-arrow-endpoint-drag")),a=zi(),s=B(),{differenceArrows:l,mainAxis:c,parsingLocale:u}=M((0,q.useShallow)(x=>({differenceArrows:x.annotations.differenceArrows,mainAxis:(0,d.readMainAxis)(x.coordSystem),parsingLocale:x.config.parsingLocale}))),h=t??u,{width:g,height:p}=e,m=(0,v.useMemo)(()=>({mainAxis:c,panelWidth:g,panelHeight:p,locale:h}),[c,g,p,h]),f=(0,v.useMemo)(()=>Qu(r,n.familyDefault),[r,n.familyDefault]),y=(0,v.useMemo)(()=>l.map(x=>{const S=(0,d.resolveDifferenceArrowAnnotationStyle)(s,x.id),A=fn(x,S,m,f);return{...A,arrow:x,style:S,color:gn(x,S,a),committedArrow:x,committedLabelBox:A.labelBox,committedLabelText:A.labelText,isDragged:!1,hasComparableEndpoints:(0,d.areEndpointsComparable)(x.start,x.end)}}),[l,m,f,a,s]);return(0,v.useMemo)(()=>o===null?y:y.map(x=>{if(x.id!==o.annotationId)return x;const S=qu(x.committedArrow,o);return{...fn(S,x.style,m,f),style:x.style,color:gn(S,x.style,a),arrow:S,committedArrow:x.committedArrow,committedLabelBox:x.committedLabelBox,committedLabelText:x.committedLabelText,isDragged:!0,hasComparableEndpoints:(0,d.areEndpointsComparable)(S.start,S.end)}}),[y,o,m,f,a])},fn=(e,t,r,n)=>{const o=(0,d.computeDifferenceArrow)({arrow:e,style:t,...r});return{...o,labelBox:(0,d.getDifferenceArrowLabelBox)({labelPosition:o.labelPosition,measuredTextWidth:n(o.labelText,t.label),label:t.label})}},Qu=(e,t)=>{const r=new Map;return(n,o)=>{const a=(0,d.toFontSpec)(o,t),s=[a.family,a.size,a.weight,a.style,a.letterSpacing,a.textTransform,n].join("|"),l=r.get(s);if(l!==void 0)return l;const{width:c}=e.measureText(n,a);return r.set(s,c),c}},qu=(e,t)=>({...e,start:t.endpoint==="start"?t.point:e.start,end:t.endpoint==="end"?t.point:e.end}),Ju="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEoAAABgCAYA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LnrcStNsFBdpNhpRYq2OkOOw8RdtCE7y+3psNSVwUp9ih+2gduU1L2Fmfh/t2jIUUNrJJkbBhxQIU5+Dy3SdSVEpx949JcNpV1NraW7wKxxhWj2ezIi+7VxJrq1o2DivhNr0OS9qUBFCkvN4XgDO6lazdphrvVJUFD5j1jmV5+QdMOFExzD3jGdKOGLcud1Gv0P/rGVyH29B6MiWcmBbARiVAHBNg9srvsqQdV3cDIXuz9ut88Tpp4cSi5I77RSWLGdKOGxUoBXq0Z8cW2C7D8X+n0XFXUtz9nJRhz1lt3xJkFxdvUMV7b7/K5tuAdEStpWgr8MpeVbNGVoHPwG20n6lBs21DhiGVLK9agOrZrwtxq7ePGm48X5PfgeuJWdvN381CG7+pIlBbfryEXCJpxlqRtBG10oHa6NXVx/8Ba+cluUx5B18AAAAASUVORK5CYII=",Zu=({className:e})=>(0,i.jsx)("img",{src:Ju,alt:"","aria-hidden":"true",className:e,draggable:!1}),_u="https://graphy.app/?utm_source=chart-mark&utm_medium=embed",$u="Made with Graphy — open graphy.app";var eh="vultop0";var th="vultop2",rh="vultop3",nh="vultop4",oh="vultop5",ah="vultop6",ih="vultop7",sh=e=>{const t=lh(e.trim());if(t===null)return"light";const r=ch(t);return r<=.22?"dark":r<=.65?"mid":"light"},lh=e=>{if(!e.startsWith("#"))return null;const t=e.slice(1);if(t.length===3){const r=t[0],n=t[1],o=t[2];return r===void 0||n===void 0||o===void 0?null:{red:Number.parseInt(r+r,16),green:Number.parseInt(n+n,16),blue:Number.parseInt(o+o,16)}}return t.length===6||t.length===8?{red:Number.parseInt(t.slice(0,2),16),green:Number.parseInt(t.slice(2,4),16),blue:Number.parseInt(t.slice(4,6),16)}:null},ch=({red:e,green:t,blue:r})=>{const n=o=>{const a=o/255;return a<=.03928?a/12.92:((a+.055)/1.055)**2.4};return .2126*n(e)+.7152*n(t)+.0722*n(r)},Sa=(e,t,r="full")=>!e||t.width<120||t.height<80?"hidden":t.width<200||r==="mini"?"mini":"full",wr=({visual:e,placement:t})=>{const r=sh((0,d.toPaintColor)(B().graph().get("fill")));return(0,i.jsxs)("a",{className:(0,U.default)(eh,e==="mini"&&"vultop1",t==="footer"?ah:ih),href:_u,target:"_blank",rel:"noopener noreferrer","aria-label":$u,"data-visual":e,"data-zone":r,children:[(0,i.jsx)("span",{className:th,children:(0,i.jsx)(Zu,{className:rh})}),(0,i.jsxs)("span",{className:nh,children:[(0,i.jsx)("span",{children:"Made with"}),(0,i.jsx)("span",{className:oh,children:"Graphy"})]})]})},Pa=(0,v.createContext)({Title:null,Caption:null,TextAnnotation:null}),dh=({editors:e,children:t})=>(0,i.jsx)(Pa.Provider,{value:e,children:t}),jr=()=>(0,v.useContext)(Pa),vn="_4dlrid0",uh="xfz7dq0";var hh="xfz7dq2",gh="xfz7dq3",fh="xfz7dq4",vh="xfz7dq5",wa=({ref:e,footerRect:t,mode:r=ae.readonly,caption:n,isCaptionVisible:o,source:a,isSourceVisible:s,captionStyle:l,sourceStyle:c,brandMark:u})=>{const{Caption:h}=jr(),g=ge[vr(r)].inlineTextEditing?h:null,p=o&&(g!==null||n!==null),m=s&&a!==null&&yh(a),f=u!=="hidden";return!p&&!m&&!f?null:(0,i.jsxs)("div",{ref:e,className:uh,style:{left:t.x,top:t.y,width:t.width},children:[p?g?(0,i.jsx)(g,{caption:n,captionStyle:l}):(0,i.jsx)(ph,{caption:n,captionStyle:l}):null,(m||f)&&(0,i.jsxs)("div",{className:"xfz7dq1",children:[m&&(0,i.jsx)(mh,{source:a,sourceStyle:c}),u!=="hidden"?(0,i.jsx)(wr,{visual:u,placement:"footer"}):null]})]})},ph=({caption:e,captionStyle:t})=>e===null?null:typeof e=="string"?(0,i.jsx)("p",{className:vn,style:D(t),children:e}):(0,i.jsx)("div",{className:vn,style:D(t),children:(0,i.jsx)(Be,{content:e})}),mh=({source:e,sourceStyle:t})=>{const r=(0,d.isSafeUrl)(e.url)?e.url:void 0,n=e.label??(r!==void 0?xh(r):"");return n===""&&r===void 0?null:(0,i.jsxs)("span",{className:hh,style:D(t.label),children:[(0,i.jsx)("span",{className:fh,children:"Source:"}),r!==void 0?(0,i.jsx)("a",{className:gh,href:r,target:"_blank",rel:"noopener noreferrer",style:D(t.link),children:n}):(0,i.jsx)("span",{className:vh,children:n})]})},xh=e=>{try{return new URL(e).hostname}catch{return e}},yh=e=>e.label!==void 0&&e.label!==""||e.url!==void 0&&e.url!==""&&(0,d.isSafeUrl)(e.url),bh="_1k4qtbg0";var Ah=22,ja=({ref:e,headerRect:t,mode:r=ae.readonly,title:n,isTitleVisible:o,subtitle:a,isSubtitleVisible:s,headingStyle:l,subtitleStyle:c,brandMark:u})=>{const{Title:h}=jr(),g=ge[vr(r)].inlineTextEditing?h:null,p=g!==null,m=o&&(p||n!==null),f=s&&(p||a!==null),y=u!=="hidden";return!m&&!f&&!y?null:(0,i.jsxs)("div",{ref:e,className:(0,U.default)(bh,y&&"_1k4qtbg1"),style:{left:t.x,top:t.y,width:t.width,...y&&!m&&!f?{minHeight:Ah}:{}},children:[g?(0,i.jsx)(g,{title:n,isTitleVisible:o,isSubtitleVisible:s,subtitle:a,headingStyle:l,subtitleStyle:c},[o?"title":"",s?"subtitle":""].join("-")):(0,i.jsx)(Sh,{title:n,isTitleVisible:o,isSubtitleVisible:s,subtitle:a,headingStyle:l,subtitleStyle:c}),u!=="hidden"?(0,i.jsx)(wr,{visual:u,placement:"header"}):null]})},Sh=({title:e,isTitleVisible:t,isSubtitleVisible:r,subtitle:n,headingStyle:o,subtitleStyle:a})=>{const s=t&&e!==null,l=r&&n!==null;return(0,i.jsxs)(i.Fragment,{children:[s&&(typeof e=="string"?(0,i.jsx)("h1",{className:"_4dlrid0",style:D(o),children:e}):(0,i.jsx)("div",{className:"_4dlrid0",style:D(o),children:(0,i.jsx)(Be,{content:e})})),l&&(typeof n=="string"?(0,i.jsx)("p",{className:"_4dlrid0",style:D(a),children:n}):(0,i.jsx)("div",{className:"_4dlrid0",style:D(a),children:(0,i.jsx)(Be,{content:n})}))]})},Ph="_1u9qprb0",wh="_1u9qprb1",jh=Ci({group:()=>Rh,item:()=>ka,trend:()=>Eh,value:()=>kh}),kh="_9aen060",Eh="_9aen061",Rh="_9aen062",ka="_9aen063",Ch={xxs:8,xs:12,sm:16,md:20,lg:24,xl:36},Ih={primary:"asohov1 asohov0",secondary:"asohov2 asohov0"},kr=({children:e,title:t,variant:r="primary",size:n="sm",...o})=>{const a=(0,v.useId)(),s=Ch[n];return(0,i.jsxs)("svg",{className:Ih[r],"aria-labelledby":t?a:void 0,height:s,width:s,fill:"none",viewBox:"0 0 24 24",role:"img",...o,children:[t&&(0,i.jsx)("title",{id:a,children:t}),e]})},Ea=e=>(0,i.jsx)(kr,{...e,children:(0,i.jsxs)("g",{stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[(0,i.jsx)("path",{d:"m5 12 7-7 7 7"}),(0,i.jsx)("path",{d:"M12 19V5"})]})}),Ra=e=>(0,i.jsx)(kr,{...e,children:(0,i.jsx)("g",{stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:(0,i.jsx)("path",{d:"M5 12h14"})})}),Mh="n7clvo0",Th="n7clvo1",Bh="n7clvo2";var Oh=({segment:e,itemStyle:t})=>{if(e.kind==="swatch")return(0,i.jsx)(Lh,{swatch:e.swatch,size:e.size});if(e.kind==="trendArrow"){const o=Ca(t,e.direction);return(0,i.jsx)("div",{className:(0,U.clsx)(Bh,e.direction==="down"&&"n7clvo3"),style:{color:o,backgroundColor:e.direction==="flat"?z(b.textPrimary,.1):z(o,.2)},children:e.direction==="flat"?(0,i.jsx)(Ra,{size:"xs",title:""}):(0,i.jsx)(Ea,{size:"xs",title:""})})}const{className:r,style:n}=Fh(e,t);return(0,i.jsx)("span",{className:r,style:n,children:e.text})},Lh=({swatch:e,size:t})=>{const r=se(),n=jt(e.layerId,e.value,t),o=wt(e.layerId,e.value,e.color)??e.color;return(0,i.jsx)(rt,{shape:r(e.geom,"cartesian")?.swatchShape??"square",color:o,paint:n.fill,surface:"headline",width:t,height:t,alpha:n.alpha,cornerRadius:n.cornerRadius,symbol:n.symbol})},Fh=(e,t)=>{switch(e.textRole){case"value":return{style:Re(t.number)};case"caption":return{className:Mh,style:Re(t.caption)};case"label":return{className:Th,style:Re(t.label)};case"trendPercentage":return{style:Re({...t.trend,textColor:Ca(t,e.trendDirection??"up")})};case"trendReference":return{style:Re(t.trend)};default:return e.textRole}},Ca=(e,t)=>{switch(t){case"up":return e.trendUp.textColor;case"down":return e.trendDown.textColor;case"flat":return e.trendFlat.textColor;default:return t}},Nh=({item:e,itemStyle:t})=>(0,i.jsx)("div",{className:ka,style:{gap:t.gap},children:(0,d.buildHeadlineItemRows)(e,t).map(r=>(0,i.jsx)(Dh,{row:r,itemStyle:t},r.role))}),Dh=({row:e,itemStyle:t})=>{const r=e.role==="trend";return(0,i.jsx)("div",{className:jh[e.role],style:{gap:e.gap},"data-testid":r?"headline-trend":void 0,"data-direction":r?Hh(e):void 0,role:r?"img":void 0,"aria-label":r?e.ariaLabel:void 0,children:e.segments.map((n,o)=>(0,i.jsx)(Oh,{segment:n,itemStyle:t},o))})},Hh=e=>{const t=e.segments.find(r=>r.kind==="trendArrow");return t?.kind==="trendArrow"?t.direction:void 0},Gh=({headline:e,rect:t,resolvedSize:r,visibleItemCount:n,isInDonutHole:o=!1})=>{const a=B(),s=I(Ar,a),l=I(d.resolveHeadlineItemStyle,a,r),c={left:t.x,top:t.y,width:t.width,height:t.height};if(e.kind==="grandTotal"){const u=(0,d.resolveHeadlineNumberStyle)(l,o);return(0,i.jsx)("div",{className:wh,style:c,children:(0,i.jsx)("span",{style:Re(u),children:e.value})})}return(0,i.jsx)("div",{className:Ph,style:{...c,gap:s.gap},children:e.items.slice(0,n).map((u,h)=>(0,i.jsx)(Nh,{item:u,itemStyle:l},`${u.label}-${h}`))})},Ia="data-legend-index",Ma="data-legend-item-index",Ta=({legendIndex:e,itemIndex:t})=>({[Ia]:String(e),[Ma]:String(t)}),Ba=e=>{const t=Zt(e,Ia),r=Zt(e,Ma);return t===null||r===null?null:{legendIndex:t,itemIndex:r}},Zt=(e,t)=>{const r=e.getAttribute(t);if(r===null||!/^(0|[1-9]\d*)$/.test(r))return null;const n=Number(r);return Number.isSafeInteger(n)?n:null},ye="data-edit-kind",Oa="data-edit-id",Ze="data-edit-axis",La="data-edit-tick-index",Fa="data-legend-overflow-control",Wh=`[${Fa}]`,Vh="observations",Uh=`[${ye}]`,nt=e=>({[ye]:e.kind,[Oa]:e.id}),Ot=(e,t)=>({[ye]:"axis",[Ze]:e,...t===void 0?{}:{[La]:String(t)}}),Lt=e=>({[ye]:"legend",...Ta(e)}),Er=e=>({[ye]:"grid",[Ze]:e}),zh=(e,t)=>{for(const r of e){const n=r.closest(Uh);if(n===null||!t.contains(n))continue;const o=Kh(n);if(o!==null)return o;if(n!==r)return null}return null},Yh=()=>({[ye]:Vh}),Kh=e=>{const t=e.getAttribute(ye);switch(t){case"annotation":{const r=e.getAttribute(Oa);return r===null||r===""?null:{kind:t,target:{kind:t,id:r}}}case"axis":{const r=e.getAttribute(Ze);if(!(0,d.isPositionScale)(r))return null;if(!e.hasAttribute("data-edit-tick-index"))return{kind:t,target:{kind:t,axis:r},part:null};const n=Zt(e,La);return n===null?null:{kind:t,target:{kind:t,axis:r},part:{tickIndex:n}}}case"legend":{const r=Ba(e);return r===null?null:{kind:t,target:{kind:t},part:r}}case"grid":{const r=e.getAttribute(Ze);return(0,d.isPositionScale)(r)?{kind:t,target:{kind:t,axis:(0,d.getAestheticFromScaleAestheticKey)(r)}}:null}default:return null}},Na=(0,v.createContext)(ae.readonly);function We(){return(0,v.useContext)(Na)}var fe=()=>ge[We()].guidePress,Xh=.25,Rr=e=>je()?null:(0,i.jsx)(Qh,{...e}),Qh=({children:e,as:t="g",...r})=>{const n=Gd(),o=t;if(n<=0)return(0,i.jsx)(o,{...r,children:e});const a=R.motion[t];return(0,i.jsx)(a,{...r,initial:{opacity:0},animate:{opacity:1},transition:{duration:Xh,delay:n},children:e})},qh=(e,t)=>e.isTextColorAuthored?e.textColor:t??e.textColor,Jh="_1oj6yix0";var Zh="_1oj6yix2";var _h=8,$h=16,eg=2,tg=({indexedLegends:e,containerRect:t})=>{const r=I(d.resolveDirectLabelStyle,B()),n=(0,d.computeLineBoxHeight)(r),{placements:o,hasOverlap:a}=rg(e,t,n),s=fe(),l=D(r);if(o.length===0)return null;const c=a?$h:_h,u=c-eg,h=(0,d.toStrokeDasharray)(r.dashArray,r.strokeWidth);return(0,i.jsxs)(Rr,{as:"div",className:Jh,"data-testid":"direct-labels",children:[a&&(0,i.jsx)("svg",{className:"_1oj6yix1",width:t.width,height:t.height,children:o.map(g=>(0,i.jsx)(ng,{anchorY:g.anchorY,labelY:g.y,endX:u,color:g.payload.color,strokeWidth:r.strokeWidth,dashArray:h},g.payload.key))}),o.map(g=>(0,i.jsx)("span",{className:(0,U.clsx)(Zh,s&&"_1oj6yix3"),style:{...l,left:c,top:g.y,color:qh(r,g.payload.color)},...s?Lt(g.payload.address):Ta(g.payload.address),children:g.payload.label},g.payload.key))]})},rg=(e,t,r)=>{const{colorScheme:n}=G(),o=M(a=>a.layers);return(0,v.useMemo)(()=>{const a=[];for(const{legend:s,legendIndex:l}of e)s.items.forEach((c,u)=>{if(c.normalizedY===null)return;const h=typeof c.visual.color=="string"?c.visual.color:void 0,g=c.layerId===void 0?void 0:(0,d.findLayerById)(o,c.layerId),p=g===void 0?h:(0,d.readPresentedGroupColor)(g,c.value,n)??h;a.push({normalizedY:c.normalizedY,payload:{key:String(a.length),label:c.formattedLabel,color:p,address:{legendIndex:l,itemIndex:u}}})});return a.length===0||t.height<=0?{placements:[],hasOverlap:!1}:(0,d.computeDirectLabelsLayout)({items:a,containerHeight:t.height,labelHeight:r})},[n,e,t.height,r,o])},ng=({anchorY:e,labelY:t,endX:r,color:n,strokeWidth:o,dashArray:a})=>{const s=r/2;return(0,i.jsx)("path",{d:`M0,${e} C${s},${e} ${s},${t} ${r},${t}`,fill:"none",stroke:n??"currentColor",strokeWidth:o,strokeDasharray:a})},og="_6a636s0";var ag=.6;var Da=(e,t)=>({...e.fill===void 0?{}:Te(e.fill,t),...e.cornerRadius===void 0?{}:{borderRadius:Ge(e.cornerRadius)},...e.shadow===void 0?{}:{boxShadow:Le(e.shadow)},...Wa(e.strokeWidth,e.stroke)}),Ha=(e,t)=>({...D(e),...Da(e,t),...e.alpha===void 0?{}:{opacity:e.alpha},paddingInline:e.paddingInline,paddingBlock:e.paddingBlock}),Ga=e=>e.fill!==void 0||e.strokeWidth>0,ig=(e,t,r)=>({...Te(e.fill,r),borderRadius:Ge(e.cornerRadius),paddingInline:e.paddingInline,paddingBlock:e.paddingBlock,boxShadow:Le(e.shadow),...e.alpha===void 0?{}:{opacity:e.alpha},...Wa(e.strokeWidth,e.stroke),...D(t)}),Wa=(e,t)=>e>0&&t!==void 0?{border:`${e}px solid ${t}`}:{},sg="var(--_1kjk02r0)",lg="_1kjk02r1",cg={1:"_1kjk02r2",2:"_1kjk02r3"},dg={1:"_1kjk02r4",2:"_1kjk02r5"};var ug={1:"_1kjk02r7",2:"_1kjk02r8"},hg={1:"_1kjk02r9",2:"_1kjk02ra"},gg="_1kjk02rb",fg="_1kjk02rc";var vg="_1dw9dgx0",Wt="\0",pg=(e,t)=>{const r=[];for(const{legend:n,legendIndex:o}of e){const a=n.aesthetics.includes("size");n.items.forEach((s,l)=>{if(a){const g=Number(s.visual.size);if(!Number.isFinite(g)||g<=0)return}const c=s.visual.color??"",u=a?`${Wt}${Number(s.visual.size)}`:"",h=s.visual.lineType;r.push({key:`${o}${Wt}${String(s.value)}${Wt}${c}${u}`,address:{legendIndex:o,itemIndex:l},formattedLabel:s.formattedLabel,visual:s.visual,swatchShape:t(s.geom),isBubble:a,primaryLineType:h,layerId:s.layerId,groupValue:s.value})})}return r},Va=({pill:e})=>e.isBubble?(0,i.jsx)(yg,{pill:e}):(0,i.jsx)(xg,{pill:e}),mg=({color:e,lineType:t,shape:r,label:n,layerId:o,groupValue:a})=>{const{swatch:s}=I(d.resolveLegendItemStyle,B()),l=jt(o,a,s.size),c=wt(o,a,e),u=M(g=>(0,d.readMainAxis)(g.coordSystem)),h=Ua(e,c);return h?(0,i.jsx)(rt,{shape:r,color:h,paint:l.fill,surface:"legend",label:n,lineType:t,width:s.size,height:s.size,strokeWidth:s.strokeWidth,alpha:l.alpha,cornerRadius:l.cornerRadius,symbol:l.symbol,mainAxis:u}):null},xg=({pill:e})=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(mg,{color:e.visual.color,lineType:e.primaryLineType,shape:e.swatchShape,label:e.formattedLabel,layerId:e.layerId,groupValue:e.groupValue}),(0,i.jsx)("span",{children:e.formattedLabel})]}),yg=({pill:e})=>{const t=Number(e.visual.size),r=jt(e.layerId,e.groupValue,t),n=wt(e.layerId,e.groupValue,e.visual.color),o=Ua(e.visual.color,n);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:vg,style:{width:t,height:t,backgroundColor:o,opacity:r.alpha}}),(0,i.jsx)("span",{children:e.formattedLabel})]})},Ua=(e,t)=>e===void 0?void 0:t,pn={[Fa]:""},bg=({hiddenPills:e,placement:t})=>{const r=pr(),[n,o]=(0,v.useState)(!1),a=B(),s=I(d.resolveLegendItemStyle,a),l=I(la,a),c=fe(),u=De([s.item.fill,l.popover.fill]),h=u(s.item.fill),g=Ha(s.item,h),p=Ag(e.length,s.item),m=p===null?void 0:{...Da(s.item,h),opacity:ag*(s.item.alpha??1)},{refs:f,floatingStyles:y}=(0,Z.useFloating)({open:n,placement:t,middleware:[(0,Z.offset)(4),(0,Z.flip)(),(0,Z.shift)({padding:8})]});(0,v.useEffect)(()=>{if(!n)return;const A=w=>{const k=w.target;if(!k)return;const E=f.reference.current,C=f.floating.current;E instanceof Element&&E.contains(k)||C instanceof Element&&C.contains(k)||o(!1)},P=w=>{w.key==="Escape"&&o(!1)};return document.addEventListener("pointerdown",A),document.addEventListener("keydown",P),()=>{document.removeEventListener("pointerdown",A),document.removeEventListener("keydown",P)}},[n,f.floating,f.reference]);const x=t==="left"||t==="right",S=p===null?[]:Array.from({length:p},(A,P)=>p-P);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{ref:f.setReference,className:(0,U.clsx)(lg,p!==null&&x&&dg[p],p!==null&&!x&&cg[p]),...pn,children:[p!==null&&S.map(A=>(0,i.jsx)("span",{className:(0,U.clsx)("_1kjk02r6",x?hg[p]:ug[p]),style:{...m,...Sg(A,x)},"aria-hidden":!0},A)),(0,i.jsx)("button",{type:"button",className:gg,style:{...g,...(0,xt.assignInlineVars)({[sg]:l.focusStroke})},onClick:()=>o(A=>!A),"aria-haspopup":"dialog","aria-expanded":n,"aria-label":`Show ${e.length} hidden legend ${e.length===1?"item":"items"}`,children:(0,i.jsxs)("span",{className:fg,children:["+",e.length]})})]}),n&&(0,i.jsx)("div",{ref:f.setFloating,role:"dialog","aria-label":r("graph.legend.hiddenItems"),className:"_1kjk02rd",style:{...y,...ig(l.popover,s.item,u(l.popover.fill))},...pn,children:(0,i.jsx)("ul",{className:"_1kjk02re",children:e.map(A=>(0,i.jsx)("li",{className:(0,U.clsx)("_1kjk02rf",c&&"_1kjk02rg"),style:{gap:s.item.gap},...c?Lt(A.address):void 0,children:(0,i.jsx)(Va,{pill:A})},A.key))})})]})},Ag=(e,t)=>{if(!Ga(t))return null;const r=Math.min(e-1,2);return r===1?1:r===2?2:null},Sg=(e,t)=>{const r=-e*4;return{transform:t?`translateY(${r}px)`:`translateX(${r}px)`}},Pg="_1cecisi0",wg="_1cecisi1",jg="_1cecisi2",kg={start:"_1cecisi3",center:"_1cecisi4",end:"_1cecisi5"},Eg={right:"_1cecisi6",left:"_1cecisi7"},Rg="_1cecisi8";var Cg=({edge:e,indexedLegends:t,containerWidth:r,containerHeight:n})=>{const o=he(),a=we(),s=B(),l=I(la,s),c=I(d.resolveLegendItemStyle,s),u=se(),h=M(E=>E.coordSystem.type),g=fe(),p=(0,v.useMemo)(()=>pg(t,E=>u(E,h)?.swatchShape??"square"),[t,u,h]),m=e==="left"||e==="right",f=m?n:r,y=t[0]?.legend.align??"start",x=(0,v.useMemo)(()=>{if(p.length===0)return{visibleCount:0,hasOverflow:!1};if(f<=0)return{visibleCount:p.length,hasOverflow:!1};const E=(0,d.toFontSpec)(c.item,a.fonts.familyDefault),C=(0,d.computeLineBoxHeight)(c.item),j=2*(c.item.paddingInline+c.item.strokeWidth),T=2*(c.item.paddingBlock+c.item.strokeWidth),O=H=>m?Ig(H,C,c.swatch.size,T):mn({label:H.formattedLabel,swatchInlineSize:Mg(H,c.swatch.size),textMeasurer:o,font:E,swatchGap:c.item.gap,horizontalChrome:j}),V=p.map(O),K=(m?C+T:mn({label:`+${p.length}`,swatchInlineSize:0,textMeasurer:o,font:E,swatchGap:c.item.gap,horizontalChrome:j}))+(Ga(c.item)?8:0);return Bg({pillSizes:V,overflowPillSize:K,containerSize:f,gap:l.gap})},[p,f,m,o,a,l,c]),S=De([c.item.fill]);if(p.length===0)return null;const A=p.slice(0,x.visibleCount),P=p.slice(x.visibleCount),w=x.hasOverflow&&P.length>0,k=Ha(c.item,S(c.item.fill));return(0,i.jsxs)("div",{className:(0,U.clsx)(kg[y],Pg,{[jg]:m,[wg]:!m,[Eg[e==="left"?"left":"right"]]:m}),style:{gap:l.gap},children:[A.map(E=>(0,i.jsx)("div",{className:(0,U.clsx)(Rg,g&&"_1cecisi9"),style:{...k,gap:c.item.gap},...g?Lt(E.address):void 0,children:(0,i.jsx)(Va,{pill:E})},E.key)),w&&(0,i.jsx)(bg,{hiddenPills:P,placement:Og(e)})]})},mn=({label:e,swatchInlineSize:t,textMeasurer:r,font:n,swatchGap:o,horizontalChrome:a})=>{const s=r.measureText(e,n).width;return t+(t>0?o:0)+s+a},Ig=(e,t,r,n)=>{const o=Tg(e,r);return Math.max(t,o)+n},Mg=(e,t)=>mt(e.visual,t,e.isBubble),Tg=(e,t)=>e.isBubble?mt(e.visual,t,!0):t,Bg=({pillSizes:e,overflowPillSize:t,containerSize:r,gap:n})=>{if(e.length===0)return{visibleCount:0,hasOverflow:!1};let o=0;for(let l=0;l<e.length;l+=1)l>0&&(o+=n),o+=e[l]??0;if(o<=r)return{visibleCount:e.length,hasOverflow:!1};let a=0,s=0;for(const l of e){const c=a+(s>0?n:0)+l;if(c+n+t>r)break;a=c,s+=1}return{visibleCount:s,hasOverflow:!0}},Og=e=>{switch(e){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left"}},Lg=(0,v.memo)(function({formattedLegends:t,rects:r}){const n=(0,v.useMemo)(()=>{const a=new Map;return t.forEach((s,l)=>{let c=a.get(s.position);c||(c={pill:[],direct:[]},a.set(s.position,c));const u={legend:s,legendIndex:l};s.display==="pill"?c.pill.push(u):c.direct.push(u)}),a},[t]),o=je();return(0,i.jsx)(i.Fragment,{children:Array.from(n,([a,s])=>{const l=r[a];return l===void 0?null:(0,i.jsxs)("div",{className:og,style:{left:l.x,top:l.y,width:l.width,height:l.height},children:[(0,i.jsx)(Cg,{edge:a,indexedLegends:s.pill,containerWidth:l.width,containerHeight:l.height}),!o&&(0,i.jsx)(tg,{indexedLegends:s.direct,containerRect:l})]},a)})})}),za=(e,t,r)=>{if(e.type==="cartesian")return(0,d.getHoverGuideLineProps)(e,t);const n=Fe(r),o=Q(t.x,e.innerRadius,n),a=Q(t.x,1,n);return{x1:o.x,y1:o.y,x2:a.x,y2:a.y}},Fg=({layers:e,primaryLayerId:t,coordSystem:r,resolveRenderer:n})=>{const o=e.find(s=>s.id===t);if(!o)return null;const a=n(o.geom,r.type);return a?a.guideMode??null:null},Ng=({panelRect:e})=>{const{coordSystem:t,layers:r,scales:n}=M((0,q.useShallow)(c=>({coordSystem:c.coordSystem,layers:c.layers,scales:c.scales}))),o=Ie(c=>c.hover.primary),a=se(),s=I(Wg,B());if(!ge[We()].hoverPaint||r.length===0||o===null||!o.anchored)return null;const l=Fg({layers:r,primaryLayerId:o.layerId,coordSystem:t,resolveRenderer:a});return l===null?null:l==="crosshair"?(0,i.jsx)(Dg,{coordSystem:t,primary:o,panelRect:e,guide:s}):t.type==="polar"?(0,i.jsx)(Gg,{coordSystem:t,primary:o,panelRect:e,guide:s}):(0,i.jsx)(Hg,{coordSystem:t,scales:n,primary:o,panelRect:e,guide:s})},Dg=({coordSystem:e,primary:t,panelRect:r,guide:n})=>{const o=za(e,t,r);return(0,i.jsx)(Cr,{panelRect:r,children:(0,i.jsx)("line",{...o,stroke:n.stroke,strokeWidth:1,strokeDasharray:"4 3",strokeLinecap:"round","data-testid":"hover-guide-line"})})},Hg=({coordSystem:e,scales:t,primary:r,panelRect:n,guide:o})=>{const a=(0,d.getHoverGuideRectProps)(e,t,r);return a===null?null:(0,i.jsx)(Cr,{panelRect:n,children:(0,i.jsx)("rect",{...a,fill:(0,d.toPaintColor)(o.fill),"data-testid":"hover-guide-rect"})})},Gg=({coordSystem:e,primary:t,panelRect:r,guide:n})=>{const o=(0,d.getPolarHoverGuideArcProps)(e,t);if(o===null)return null;const a=(0,d.buildPolarBarArcPath)(o);return a?(0,i.jsx)(Cr,{panelRect:r,children:(0,i.jsx)("svg",{viewBox:"-1 -1 2 2",preserveAspectRatio:"xMidYMid meet",width:"100%",height:"100%",style:{overflow:"visible"},children:(0,i.jsx)("path",{d:a,fill:(0,d.toPaintColor)(n.fill),"data-testid":"hover-guide-arc"})})}):null},Cr=({panelRect:e,children:t})=>(0,i.jsx)("svg",{x:e.x,y:e.y,width:e.width,height:e.height,style:{overflow:"visible",pointerEvents:"none"},"data-testid":"hover-guide",children:t}),Wg=e=>e.hoverGuide().resolve(),Vg=(e,t,r)=>{for(const n of Object.values(qa)){const o=n(e,t,r);if(o!==null)return o}return null},Ug=e=>qa[e]!==void 0,Ya=(e,t,r)=>Qa(e,r,t/2),Ka=(e,t)=>{const r=(0,d.projectAnchorToPanel)(e.start,t),n=(0,d.projectAnchorToPanel)(e.end,t);return r.x===n.x&&r.y===n.y?null:{shape:"segment",start:r,end:n}},Xa=(e,{panel:t,measuredBoxes:r})=>{const n=r.get(e.id);if(n===void 0)return null;const o=(0,d.alignUnitFractions)(e.align),a=(0,d.projectAnchorToPanel)(e.at,t);return{shape:"rect",rect:{x:a.x-o.x*n.width,y:a.y-(1-o.y)*n.height,width:n.width,height:n.height}}},lt=(e,t)=>(r,n,o)=>{const a=e(r).find(s=>s.id===n);return a===void 0?null:t(a,o)},Qa=(e,t,r=0)=>{const n=(0,d.projectRegionToPanel)(e,t);return{shape:"rect",rect:{x:n.x-r,y:n.y-r,width:n.width+r*2,height:n.height+r*2}}},qa={text:lt(e=>e.textAnnotations,Xa),shape:lt(e=>e.shapes,(e,t)=>Ya(e.region,t.readers.annotation.shape(e.id).get("strokeWidth"),t.panel)),image:lt(e=>e.images,(e,t)=>Qa(e.region,t.panel)),arrow:lt(e=>e.arrows,(e,t)=>Ka(e,t.panel))},Ja=(e,t)=>{const r=(0,d.findAnnotation)(e,t);return r!==null&&Ug(r.kind)&&(0,d.isAnnotationMovable)(r)},zg=200,Yg=({engine:e,store:t,overlayRef:r})=>{const{tolerance:n}=ge[We()],o=(0,Oe.useStore)(t,s=>s.isQueryOwnedByEditor),a=je();(0,v.useEffect)(()=>{const s=r.current;if(!s)return;const l=Kg(s,e),c=o||a?void 0:Qg(s,e,t,n??void 0);return()=>{c?.(),l()}},[e,t,r,n,o,a])},Kg=(e,t)=>{const r=()=>{const s=e.getBoundingClientRect();s.width===0||s.height===0||t.setViewport({width:s.width,height:s.height})};let n=null;const o=()=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{n=null,r()},zg)},a=new ResizeObserver(o);return a.observe(e),r(),()=>{a.disconnect(),n!==null&&clearTimeout(n)}},Xg=(e,t)=>e.kind==="cursor"?null:{x:t.left+e.point.x,y:t.top+e.point.y,placement:e.placement,annotationId:e.annotationId},Qg=(e,t,r,n)=>{let o=null,a=null;const s=()=>{const f=e.getBoundingClientRect();return f.width>0&&f.height>0?f:null},l=(f,y)=>({x:f.clientX-y.left,y:f.clientY-y.top}),c=()=>{a=null;const f=o;if(o=null,!f)return;const y=s();if(y===null)return;const x=l(f,y),S=r.getState();if(S.isPointerSuspended)return;const A=(0,d.findPointerRegion)(x,S.pointerRegions);if(A!==null){S.setHoverState(t.query(A.cursor,{tolerance:n})),S.setTooltipAnchor(Xg(A.tooltip,y));return}const P=(0,d.toPanelCursor)(x,y);S.setHoverState(t.query(P,{tolerance:n})),S.setTooltipAnchor(null)},u=()=>{const f=r.getState();f.hover.primary===null&&f.tooltipAnchor===null||(f.setHoverState(d.RESTING_HOVER_STATE),f.setTooltipAnchor(null))},h=f=>{const y=r.getState();if(y.pointerRegions.length===0)return!1;const x=s();return x===null?!1:(0,d.findPointerRegion)(l(f,x),y.pointerRegions)!==null},g=f=>{r.getState().isPointerSuspended||h(f)||(document.removeEventListener("pointermove",g),u())},p=f=>{document.removeEventListener("pointermove",g),o=f,a===null&&(a=requestAnimationFrame(c))},m=f=>{if(o=null,a!==null&&(cancelAnimationFrame(a),a=null),!r.getState().isPointerSuspended){if(h(f)){document.addEventListener("pointermove",g);return}u()}};return e.addEventListener("pointermove",p),e.addEventListener("pointerleave",m),()=>{e.removeEventListener("pointermove",p),e.removeEventListener("pointerleave",m),document.removeEventListener("pointermove",g),a!==null&&cancelAnimationFrame(a),o=null}},qg=({panelRect:e})=>{const{engine:t,store:r,overlayRef:n}=xe(),o=ue(Sr),a=ue(Wu),s=ue(c=>c.caret!==null);Yg({engine:t,store:r,overlayRef:n});const l=M(c=>o!==null&&Ja(c.spec.annotations,o));return(0,i.jsx)("rect",{ref:n,x:e.x,y:e.y,width:e.width,height:e.height,fill:"transparent",pointerEvents:s?"none":"all",cursor:Jg(l,a),"data-testid":"pointer-capture-layer"})},Jg=(e,t)=>e?"move":t?"pointer":void 0,Vt="data-hover-active",Zg=e=>{const{store:t}=xe(),r=ge[We()].hoverPaint,n=(0,Oe.useStore)(t,a=>a.hover.primary!==null),o=r&&n;(0,v.useEffect)(()=>{const a=e.current;if(a)return o?a.setAttribute(Vt,"true"):a.removeAttribute(Vt),()=>{a.removeAttribute(Vt)}},[e,o])},Ft=()=>ue(e=>Me(e,"move-drag")?.annotationId??Me(e,"shape-resize-drag")?.annotationId??Me(e,"arrow-endpoint-drag")?.annotationId??null),Ve=e=>{const t=M(s=>s.annotations),r=pa(),n=Su(),o=(0,v.useCallback)(s=>xn(n,"cycle",s,`Annotation reference cycle detected; dropping annotation(s): ${s.join(", ")}`),[n]),a=(0,v.useCallback)(s=>xn(n,"missing-ref",s,`Annotation reference target(s) no longer exist (dropped during compilation); dropping annotations referencing: ${s.join(", ")}`),[n]);return(0,v.useMemo)(()=>(0,d.resolveDeferredAnchors)({annotations:t,panelRect:e,measuredBoxes:r,onCycle:o,onMissingRef:a}),[t,e,r,o,a])},xn=(e,t,r,n)=>{const o=[t,...[...r].sort()].join("\0");e.has(o)||(e.add(o),console.warn(n))},_g=16,Za=({linePath:e,strokeWidth:t})=>(0,i.jsx)("path",{d:e,stroke:"transparent",strokeWidth:Math.max(t,_g),fill:"none",pointerEvents:"stroke"}),$g=1.4,ef={light:{primary:"#1D2129",inverse:"#FFFFFF"},dark:{primary:"#FFFFFF",inverse:"#1D2129"}},_a=({computed:e,style:t,isAddressable:r})=>{const n=(0,v.useId)(),{colorScheme:o}=Mt(),a=e.dashArray?{strokeDasharray:e.dashArray,strokeDashoffset:e.dashOffset}:{},s=t.outline.shadow==="none"?null:t.outline.shadow,l=t.outline.strokeWidth>0,c=ef[o],u=t.outline.stroke??nf(t.stroke,c.primary,c.inverse),h=s===null?null:rf(e,t.outline.strokeWidth,s.blur);return(0,i.jsxs)("g",{pointerEvents:r?void 0:"none",children:[r&&(0,i.jsx)(Za,{linePath:e.linePath,strokeWidth:e.strokeWidth}),s!==null&&h!==null&&(0,i.jsx)("defs",{children:(0,i.jsx)("filter",{id:n,filterUnits:"userSpaceOnUse",...h,children:(0,i.jsx)("feDropShadow",{dx:s.offsetX,dy:s.offsetY,stdDeviation:s.blur,floodColor:s.color})})}),(0,i.jsxs)("g",{filter:s===null?void 0:`url(#${n})`,children:[l&&(0,i.jsx)("path",{d:tf(e),stroke:u,strokeWidth:e.strokeWidth+2*t.outline.strokeWidth,strokeLinecap:"round",fill:"none"}),(0,i.jsx)("path",{d:e.linePath,stroke:t.stroke,strokeWidth:e.strokeWidth,strokeLinecap:"round",fill:"none",...a}),e.startArrowheadPath.length>0&&(0,i.jsx)("path",{d:e.startArrowheadPath,stroke:t.stroke,strokeWidth:e.strokeWidth,strokeLinecap:"round",fill:"none"}),e.endArrowheadPath.length>0&&(0,i.jsx)("path",{d:e.endArrowheadPath,stroke:t.stroke,strokeWidth:e.strokeWidth,strokeLinecap:"round",fill:"none"})]})]})},tf=e=>[e.linePath,e.startArrowheadPath,e.endArrowheadPath].filter(t=>t.length>0).join(" "),rf=(e,t,r)=>{const n=e.arrowheadExtent+e.strokeWidth+t+r;return{x:Math.min(e.startX,e.endX)-n,y:Math.min(e.startY,e.endY)-n,width:Math.abs(e.endX-e.startX)+2*n,height:Math.abs(e.endY-e.startY)+2*n}},nf=(e,t,r)=>{try{return(0,Oi.getContrast)(e,t)<$g?r:t}catch{return r}},of=({panelRect:e,isEditable:t})=>{const{arrows:r}=Ve(e),n=Ft(),o=B(),a=(0,v.useMemo)(()=>r.filter(s=>s.id!==n).flatMap(s=>{const l=(0,d.resolveArrowAnnotationStyle)(o,s.id),c=(0,d.computeArrow)({arrow:s,style:l,panelWidth:e.width,panelHeight:e.height});return c===null?[]:[{computed:c,style:l}]}),[r,n,e.width,e.height,o]);return a.length===0?null:(0,i.jsx)("g",{transform:`translate(${e.x}, ${e.y})`,"data-testid":"arrows",children:a.map(({computed:s,style:l})=>(0,i.jsx)("g",{...nt({kind:"annotation",id:s.id}),children:(0,i.jsx)(_a,{computed:s,style:l,isAddressable:t})},s.id))})},$a=()=>{const{selectionStore:e}=G();return(0,Oe.useStore)(e,t=>t.selection)},af=({linePath:e,arrowheadPath:t,stroke:r,strokeWidth:n,isAddressable:o})=>{const a={stroke:r,strokeWidth:n,strokeLinecap:"round",fill:"none"};return(0,i.jsxs)("g",{pointerEvents:o?void 0:"none",children:[o&&(0,i.jsx)(Za,{linePath:e,strokeWidth:n}),(0,i.jsx)("path",{d:e,...a}),(0,i.jsx)("path",{d:t,...a,strokeLinejoin:"round"})]})},sf=({x:e,y:t,text:r,box:n,label:o,arrowColor:a,isAddressable:s})=>{const{fonts:l}=we(),c=It(o.cornerRadius),u=o.shadow===void 0?void 0:Se(o.shadow),h={fill:(0,d.toPaintColor)(o.fill),stroke:o.stroke??a,strokeWidth:o.strokeWidth,style:u===void 0?void 0:{filter:u}};return(0,i.jsxs)("g",{pointerEvents:s?void 0:"none",opacity:o.alpha,children:[c===null?(0,i.jsx)("path",{d:mr(n,o.cornerRadius),...h}):(0,i.jsx)("rect",{x:n.x,y:n.y,width:n.width,height:n.height,rx:c,...h}),(0,i.jsx)("text",{x:e,y:t,dominantBaseline:"central",textAnchor:"middle",fill:o.textColor,style:{...He(o,l.familyDefault),...Et(o)},...kt(o),children:(0,d.applyTextTransform)(r,o.textTransform)})]})},lf="_1i8rg6j0",cf="75%",df=({panelRect:e,isEditable:t})=>{const r=Aa(),n=ue(Sr),o=$a(),a=(0,v.useMemo)(()=>new Set(o.filter(s=>s.kind==="annotation").map(s=>s.id)),[o]);return r.length===0?null:(0,i.jsx)("g",{transform:`translate(${e.x}, ${e.y})`,"data-testid":"difference-arrows",children:r.map(({color:s,style:l,id:c,linePath:u,arrowheadPath:h,labelPosition:g,labelBox:p,labelText:m,isDragged:f,hasComparableEndpoints:y})=>{const x=n===c||a.has(c),S=f&&!y,A=S?b.alert:s,P=x&&!S?uf(A):A;return(0,i.jsxs)("g",{className:n===c?lf:void 0,"data-warning":S||void 0,...nt({kind:"annotation",id:c}),children:[(0,i.jsx)(af,{linePath:u,arrowheadPath:h,stroke:P,strokeWidth:l.strokeWidth,isAddressable:t}),(0,i.jsx)(sf,{x:g.x,y:g.y,text:m,box:p,label:l.label,arrowColor:P,isAddressable:t})]},c)})})},uf=e=>`color-mix(in srgb, ${e} ${cf}, ${b.textPrimary})`,hf={fill:"none",contain:"xMidYMid meet",cover:"xMidYMid slice"},ei=({image:e,panel:t,style:r})=>{const n=(0,v.useId)(),{src:o,region:a,fit:s}=e,l=(0,d.projectRegionToPanel)(a,t),c=vd(r.cornerRadius),u=It(r.cornerRadius),h=r.shadow===void 0?void 0:Se(r.shadow);return(0,i.jsxs)("g",{opacity:r.alpha,style:h===void 0?void 0:{filter:h},children:[c&&(0,i.jsx)("clipPath",{id:n,children:u===null?(0,i.jsx)("path",{d:mr(l,r.cornerRadius)}):(0,i.jsx)("rect",{...l,rx:u})}),(0,i.jsx)("image",{href:o,...l,preserveAspectRatio:hf[s],clipPath:c?`url(#${n})`:void 0})]})},yn=({panelRect:e,zOrder:t})=>{const r=Ve(e).images,n=B(),o=Ft(),a=r.filter(s=>s.zOrder===t&&s.id!==o);return a.length===0?null:(0,i.jsx)("svg",{x:e.x,y:e.y,width:e.width,height:e.height,overflow:"visible","data-testid":`image-annotations-${t}`,children:a.map(s=>(0,i.jsx)("g",{...nt({kind:"annotation",id:s.id}),children:(0,i.jsx)(ei,{image:s,panel:e,style:n.annotation.image(s.id).resolve()})},s.id))})},ti=({shape:e,style:t,panel:r})=>{const n=(0,d.projectRegionToPanel)(e.region,r);return(0,i.jsx)("rect",{x:n.x,y:n.y,width:n.width,height:n.height,fill:(0,d.toPaintColor)(t.fill),fillOpacity:t.fillAlpha,opacity:t.alpha,stroke:(0,d.getShapeAnnotationStroke)(t)??"none",strokeWidth:t.strokeWidth})},bn=({panelRect:e,zOrder:t})=>{const r=Ve(e).shapes,n=B(),o=Ft(),a=r.filter(s=>s.zOrder===t&&s.id!==o);return a.length===0?null:(0,i.jsx)("svg",{x:e.x,y:e.y,width:e.width,height:e.height,overflow:"visible","data-testid":`shapes-${t}`,children:a.map(s=>(0,i.jsx)("g",{...nt({kind:"annotation",id:s.id}),children:(0,i.jsx)(ti,{shape:s,style:n.annotation.shape(s.id).resolve(),panel:e})},s.id))})},gf="_1aj6s5s0",ff="_1aj6s5s1",vf=.1,pf=({annotation:e,panel:t,style:r,blockRef:n})=>(0,i.jsx)(ri,{annotation:e,panel:t,style:r,blockRef:n,children:(0,i.jsx)(Be,{content:e.content})}),ri=({annotation:e,panel:t,style:r,blockRef:n,children:o})=>{const a=(0,d.projectAnchorToPanel)(e.at,t);return(0,i.jsx)("foreignObject",{x:a.x,y:a.y,width:(0,d.toPercent)(e.width),height:t.height,overflow:"visible",pointerEvents:"none",children:(0,i.jsx)("div",{ref:n,className:gf,style:{...xf(r),transform:mf(e.align)},children:o})})},mf=e=>{const t=(0,d.alignUnitFractions)(e);return`translate(${-t.x*100}%, ${-(1-t.y)*100}%)`},xf=e=>{const{backgroundColor:t,borderShadow:r}=yf(e),n=[r,e.shadow===void 0||e.shadow==="none"?void 0:Le(e.shadow)].filter(o=>o!==void 0);return{...D(e),padding:`${e.paddingBlock}px ${e.paddingInline}px`,borderRadius:Ge(e.cornerRadius),opacity:e.alpha,...t===void 0?{}:{backgroundColor:t},...n.length===0?{}:{boxShadow:n.join(", ")}}},yf=e=>{if(e.fill==="transparent")return{};const t=(0,d.toPaintColor)(e.fill),r=e.fillAlpha<1?z(t,e.fillAlpha):t;if(e.strokeWidth<=0)return{backgroundColor:r};const n=e.stroke??nl(t,vf);return{backgroundColor:r,borderShadow:`0 0 0 ${e.strokeWidth}px ${n}`}},bf=e=>{const t=Ve(e).textAnnotations,r=ue(n=>Me(n,"text-resize-drag"));return(0,v.useMemo)(()=>t.map(n=>ni(n,r)),[t,r])},ni=(e,t)=>t===null||t.annotationId!==e.id?e:{...e,at:{...e.at,x:e.at.x+t.shift},width:t.width},Af=({panelRect:e})=>{const t=bf(e),r=B(),n=Ft(),o=t.filter(a=>a.id!==n);return o.length===0?null:(0,i.jsx)("svg",{x:e.x,y:e.y,width:e.width,height:e.height,overflow:"visible","data-testid":"text-annotations",children:o.map(a=>(0,i.jsx)(Sf,{annotation:a,panel:e,style:r.annotation.text(a.id).resolve()},a.id))})},Sf=({annotation:e,panel:t,style:r})=>{const n=ma(e.id),o=ue(s=>s.caret?.annotationId===e.id),{TextAnnotation:a}=jr();return(0,i.jsx)("g",{...nt({kind:"annotation",id:e.id}),children:(0,i.jsx)(ri,{annotation:e,panel:t,style:r,blockRef:n,children:o&&a?(0,i.jsx)(a,{annotation:e}):(0,i.jsx)(Be,{content:e.content})})})},Pf="ph8bdc0";var wf="ph8bdc2",An={hittable:"ph8bdc4 ph8bdc3",inert:"ph8bdc5 ph8bdc3"},jf=({cx:e,cy:t,color:r,style:n})=>{const o=Se(n.shadow);return(0,i.jsx)("circle",{cx:e,cy:t,r:n.size/2,style:{fill:r,stroke:n.stroke,strokeWidth:n.strokeWidth,...o===void 0?{}:{filter:o}}})};function kf(e){const t=he(),{formattingLocale:r}=G(),n=B(),o=M((0,q.useShallow)(c=>({pinnedNumbers:c.annotations.pinnedNumbers,comments:c.annotations.comments,coordSystem:c.coordSystem,numberFormat:c.config.numberFormat,parsingLocale:c.config.parsingLocale}))),a=r??o.parsingLocale,s=(0,v.useMemo)(()=>(0,d.createPinnedNumberValueFormatter)({numberFormat:o.numberFormat,locale:a}),[o.numberFormat,a]),l=(0,v.useMemo)(()=>(c,u,h)=>{const g=(0,d.resolveCalloutAnnotationStyle)(n,c==="pinned-number"?"pinnedNumber":"comment",u).label,p=(0,d.toFontSpec)(g,tt),m=Ef(t,c,h,p),f=t.measureText(m,p),y=c==="pinned-number"?15:0;return{width:f.width+y+(g.paddingInline+g.strokeWidth)*2,height:Math.max(f.height,10)+(g.paddingBlock+g.strokeWidth)*2,text:m}},[t,n]);return(0,v.useMemo)(()=>(0,d.placeCallouts)({pinnedNumbers:o.pinnedNumbers,comments:o.comments,panelRect:e,coordSystem:o.coordSystem,measurer:l,formatPinnedNumber:c=>s(c.at)}),[o.pinnedNumbers,o.comments,e,o.coordSystem,l,s])}var Ef=(e,t,r,n)=>t!=="comment"?r:(0,d.truncateToWidth)(r,140,o=>e.measureText(o,n).width),Sn="callouts",Rf=({panelRect:e})=>{const{pinnedNumbers:t,comments:r}=M((0,q.useShallow)(f=>({pinnedNumbers:f.annotations.pinnedNumbers,comments:f.annotations.comments}))),n=M(f=>f.coordSystem),o=se(),a=Yi(10),s=B(),l=kf(e),{store:c}=xe(),u=(0,v.useMemo)(()=>{const f=new Map;for(const y of t)f.set(y.id,y.at);for(const y of r)f.set(y.id,y.at);return f},[t,r]),h=(0,v.useMemo)(()=>{const f=new Map;for(const[y,x]of u)f.set(y,a(x));return f},[u,a]),g=(0,v.useMemo)(()=>{const f=new Map;for(const y of t)f.set(y.id,(0,d.resolveCalloutAnnotationStyle)(s,"pinnedNumber",y.id));for(const y of r)f.set(y.id,(0,d.resolveCalloutAnnotationStyle)(s,"comment",y.id));return f},[t,r,s]),p=(0,v.useMemo)(()=>(0,d.buildCalloutHitRegions)(l,e),[l,e]),m=De([...g.values()].map(f=>f.label.fill));return(0,v.useEffect)(()=>{const f=c.getState();return f.publishPointerRegions(Sn,p),()=>{f.publishPointerRegions(Sn,[])}},[c,p]),t.length===0&&r.length===0?null:(0,i.jsx)("svg",{x:e.x,y:e.y,width:e.width,height:e.height,overflow:"visible",className:Pf,"data-testid":"callouts",children:l.map(f=>{if(!f.inView)return null;const y=u.get(f.id),x=g.get(f.id);if(y===void 0||x===void 0)return null;const S=h.get(f.id),A=S?.color,P=f.miniRect.width<=e.width&&f.miniRect.height<=e.height;return(0,i.jsxs)("g",{"data-testid":f.kind,children:[(0,i.jsx)("foreignObject",{x:f.miniRect.x,y:f.miniRect.y,width:f.miniRect.width,height:f.miniRect.height,overflow:"visible",children:(0,i.jsxs)("div",{className:P?An.hittable:An.inert,style:Mf(x.label,m(x.label.fill)),children:[f.kind==="pinned-number"&&(0,i.jsx)("span",{className:"ph8bdc1",children:(0,i.jsx)(rt,{shape:o(y.geom,n.type)?.swatchShape??"square",surface:"callout",color:A??"currentColor",paint:S?.fill,width:10,height:10,alpha:S?.alpha,cornerRadius:S?.cornerRadius,symbol:S?.symbol,mainAxis:(0,d.readMainAxis)(n)})}),(0,i.jsx)("span",{className:wf,style:Tf(x.label),children:f.text})]})}),(0,i.jsx)(jf,{cx:f.anchorPx.x,cy:f.anchorPx.y,color:Cf(x.marker,A),style:x.marker})]},f.id)})})},Cf=(e,t)=>e.isFillAuthored?(0,d.toPaintColor)(e.fill):t??(0,d.toPaintColor)(e.fill),If=e=>e.isTextColorAuthored?e.textColor:(0,d.ensureReadableTextColor)(e.textColor,(0,d.toPaintColor)(e.fill)),Mf=(e,t)=>({...Te(e.fill,t),borderRadius:Ge(e.cornerRadius),padding:`${e.paddingBlock}px ${e.paddingInline}px`,boxShadow:Le(e.shadow),...e.alpha===void 0?{}:{opacity:e.alpha},...e.strokeWidth>0?{border:`${e.strokeWidth}px solid ${e.stroke}`}:{}}),Tf=e=>({...D(e),color:If(e)}),Bf=(e,t)=>e*10*t,oi={"clapping-hands":{aspectRatio:1.059,src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEQAAABICAYAAABP0VPJAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABipSURBVHgB7VwJfFTVuf/uMvtMlplJJiEhBEhYwiIYNgExUBSQ6qMqblWrz5/WtfBa67NiH1iftbW1VqWghWqt+opFfajFBRcSUMImEBISspCFSTIh++zbXfqdO3cmswWSSPVHf/1+ub977znfPfec//m28507Afg3/ZvORsxwmEVRpJDo0tISCqA0XEzJBx06bwjXUXAB0lA7TZWUlDCtra3Mtm3vjCUF1113dbNWqxXItcfjod966718igpSubm5ow8fPnx8zZo1fQ0NMzlR/JuAIIrwL0LU6tWrmfz8fLXD4XgYJaRPlEkQhH6v1/s6lj9FrsU44nm+BevuAihWbNiwgYZ/ASLSw5aXfzU5EAjuFUdICNr/ElDgAlWhCBHJ2L//SFGy2R8uWa3ty9G2XNBSQhUVFSmJ2IvngdDGvEHaS/YeU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OHJNGU5z385//9vL+fsehoYKBvAcfffS3y1JTZ41LSbnESMD4V/jHDDT5wXJ6enGq0Th7tF4/eQouxt47GxCYAbMfPVr9tNE4s0itnpJHwPhn/Oj5WyXyS3CzeYHBaJyeq9dPnXzy5KkXZRUSwge5x/LN11xzzwKiZmbzpei6FxiG898pLiTEsK8laFd6VWazIsXlCmhYltLee++NuWPGjE757LO97Z988kUfRSmCHMd7WVbl1esBI9CvyM8S5ETKkF5ywRGCkotrpFEY2FEaQQgwosjTgYCCpyiBYxiFX612+7u6RHSp1STgGvL3ZXLjFxzhTDswS9cWTEubiYPmUQLSfCoVeO32dk9BAeWbM2dKoLq6TP7l0vDoQjYyUUnXUDqe0Nf9f0f/APDc5Dseec9LAAAAAElFTkSuQmCC"},"grinning-face":{aspectRatio:1.03,src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABECAYAAAA1DeP1AAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABeNSURBVHgB7VwJdFbVtd73/mP+/EMmEpL8CYFMECAQmWTwGRSf1ApUK/a19lULLQ6vqy19fVVfbRvreyxp7eBbrYWKtUuxtVBaZajWiQCCIMSHgQQSpiSEDGT8h/zzvfftc+cpQFB57Vrda93cc+490/7OPnvvs8/9A/AP+gepyQLXkDiOo5Do+vpxNEAzTfqfNWuWpaCgwNLdXYBj6bbU1tbSbW1zKHyPF1BwjeiT7oiqq6uj6uvrkfl6qqSkxLJ9+/aSwsLCaovFkmG1WktomvZh2kcKMwwTQLCG8d4eDofb9+zZc+zRRx8dbGtrY/A1i21xeLHw90Bk1kEA2FpWVubYtm1bfjAY/E48Ht/BsuwwN0YioJC6AwMDaxobGycDVNlBkORrJi1jJpwtGkXdtmvXrvHI/JpkMrmX+5iJtDk8PLwGpcuJXVrxouFviHAws2xk9lGk113NzI+ViKQMDg7e7/f707B/K5kE+H+UEux4JYppmSMYDH/nWgAwGiBkGQoTcnVgXC2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xAEEIJajamZPj8cXjIc/evS+vnj694gGD96knIhm9uxGYw8KXbhqTOwoRZr2ThTgjL2WzL1uFmMimptYNixbduYlh0kMYgw1eCQiExgoEIUt+/ixHKkV7g8ER99q195XV1X3jOYfDXnDFLRBgguJXLPxRisrs2rwC82lX3hyh4eFgw/r1Gx975pnfnmZZa9DjsYW7uxuIX3ZZED4K0eTXdR7P5Gyns2aC2z1l6oEDR76PyqmLu8aEZ7bBDz9s/pHbXVNFxuLxzM0mY1u5cuU1+5UzRX6Mihs0b05OTYHXO7M8I6Nmxv79h39wLQAhAJw4cXrDZz/74AKv97qy9PQ54wHmeUlwCa7it6BXszR09WtxqYTs4TC4rFZw4Tp1MEzM+de/vnDHtGmTl/t8nlnwMVIgEGxobj61ff365956/fX3+miajUajqUh+floMlwLZVpOlwI213Y8KhEQ0zoS1rw/ssViaE88TnTYbje55yrp27RdLli+/eW5FRWmt2+2qdDod+WNpmChADCg3XLjQe6Su7mfb3377wIDFkha3WKzxZDIVc7myo70k3g9j/4mjmj4uIKS2iEjSlZULneFw0j40xNgx/mh3u22OWCxisdnsttra2d677769sqhofGF2dlYhAuOx24kDQnGxWDyM56/BgYHB7nA4GnzrrYMnNm16uSuZTCRp2pqiaWcSj/HjiUQqjoo6XlWVSjY3T2XMfn9xNYP/uIn/DwHCT5RrrTk5SVt/P2tLT0/ZHQ7ayrIYeuEslliMoR38V0AszXFWjOEk+dlMJGjW4aC4eNzKoIvNxuPRpNttZzCfsNsHk/39JJJBIpYN/B4NPib6JICQiYDR1NREbd16FkHxEF1CJ5NOSyo1YmEY8vEhQ7lwNzUyEiaAUB5PJktRFi6MB0IWC5OyWtMZmy3GdHcHyPcyyHQDf4QMH2EJ/C0Q7rb5ACcxa+QfZljJD+vJD2SEf4VALpImF3/wZBFNoBQv/0Tp/wB4VebDeUtu1AAAAABJRU5ErkJggg=="},rocket:{aspectRatio:1.046,src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEEAAABECAYAAADeOlj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b338QukgYGhzfH4NQtbWz8xnQQJVyixtralkaamxbP27j38L+fL/JEjJ56Jx7sXRaPXt2LFiTbTLmm0uqQk/8hySSOp8o9//OoDWGofmIzxVGr8neeee+V+WvlodFkLCQ8uMfNTCisnGwNVWD99Wo8yFmmwrHLkqaf+edm113Zdn0jEZpbLRgYruSd7er7z8vbtu0byeZ4PBNRsJqPnqJrL+dn/6OmiJweXh4QQzpyJhUslHtX1QLBYNDRdl1kPYxjky9zAvKGk63ZhbGy8eD4FzSmZGFw+wrFWqm1tGb1QiOu42aJybiixWAzyedPSNNtMJMLlI0dwk5u/YV1xIe8CSHzxWP0PIzh/9i7+agAuM/0G5ili1qX1t5UAAAAASUVORK5CYII="},"thumbs-up":{aspectRatio:1.063,src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABECAYAAAAx+DPIAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABSHSURBVHgB7VwLcFzVef7PfezefWklZEl+BQQSGGQsMMa0vFXStCRAaQsaEpoyZTINTMkwHaAloWlRTcNQZkImSTNTmoG4YEoTOhkTkjF1gYgE6leEjQ0yorIs23pYLySttK/7Ov3/c+5Ku3uv1qJIUGfyjw93d+8595z/P//zO1cA/IZ+Qx8nMc45A+hQ8LMG0KZt2rRJpyvd89rHuyD4+IjmUpqbP6v94hdPtcXj8YvC4XCr4zjTuVzuYF/fwOuXXtrah30cbC42Dr8u1NHRobS0tISGhoauR4aP8QUom81u6+rqugBgk05j4BPQiCUnqfKb9HQ6/Q2+SKK+zc3NYRyuwOlMyAtdtEOHDl/BPyRls/ltjY2NBpzOQpC732hUUvvKQshuI9OB09UUyI7J7gO5Sx3kfPBJzoeeQU6HFxRCKpV6UEaK05Bo96amph7zcZUb4fytGzh/53PY8PrW73N+fGugAFzXndq+fftqL3QuOS2rfeHuqbquX+S7MfqinJmpwBUdeDgCMPFDgMPf8HVljCWvueaaO9rbO5bFDJZVAPl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jgcf/MozmEmtho9KqBFKQh45cLRZPnNEugEMrVSEG67UDhZpQPUmNR8RfVwrg/F+RqK/eE+8Wq/HILzi4sCSl2h2dnZ3bW0in05XZp5oAVwLlLq6lqjrJpOc55I//elTt6xff94fqCpU2bY7k05nhlKp2aGJiQ+GZmezqVdfffP99947mv7qV+9uu+SS9XcZRngVfEJkmubQd7+77bann/7mge7ubvKOvFL/hQQAmDioP//5ldFs1ozZdi4aj+vhfN6RJQqTBbJpauJqGOKtJ8wk8zpWk8ZLL239w02bLrz7kxDEa6/tvve2277yH+Pj2QmAbvNU/Vnl2+3q2rUDoYGBbDged0PIqJbJkAAshzHdVRQDr7NYQ0QFyGBZdsi2LUPXlYjj5IydO5/940su2fCxaASV8fv2vfP49dff8ZyqZiY+/emNaaxwnVONY6d+NLC2tjYVsTStv38V9h9GlboA26hLKFJnZ6enYgSkvKs2NGh6JmOiEBLRdDodjkY148knH/2tyy7beF1tbdXmeDx+Liwhob3/z+Dg6GsPPPD4v/7yl10jnOtTqZSJzq/LWsz4xQigvH9FmyK0bP16ekWtPnTixIxh23YYj6YM153VNC2sY0qrPvroX62rr1+RoJMPjv/QpOglcPHcX/2qexi1ZtUFFzSuQ81JGEYoiS1Gf1xCfoc6ou8Z3rfv0Huvv757sLNz95SqGmY6zTKhkJ6uq0tkent3VHwzrJyh5SDvuZsoylCBrJMJIRN6OKxorququZzL8HAHMLJhve4q+TxBwfJgW353WSiEJ6SQxRPrqGJZGdeDlKmmcNEfoflpDsIBFh54mOHwmvz4+E9y9LYotkW/VL1cAph7PiU/TPxFRAv6k6RqWWnFNHWNi+Se/iQuoszMzHqMUZ5cjVo0wVwXqyHMkriotYkcFo8nEbbLoMZkUYQRR9OyzthYEu18Gtt6bC/8//6z+/m3S0H1XnrW0L+QlhSaWtS8/7kCaVBLSP4NMTXxmxi/FH9i/7+rT2twf4PgbQAAAABJRU5ErkJggg=="}},Of=3.2,Lf=({panelRect:e})=>{const t=Ve(e).stickers,r=B().graph().get("textScale");if(t.length===0)return null;const n=Bf(Of,r);return(0,i.jsx)("svg",{x:e.x,y:e.y,width:e.width,height:e.height,overflow:"visible","data-testid":"stickers",children:t.map(o=>{const a=(0,d.projectAnchorToPanel)(o.at,e);return(0,i.jsx)(Ff,{sticker:o,sizePx:n,x:a.x,y:a.y},o.id)})})},Ff=({sticker:e,sizePx:t,x:r,y:n})=>{const o=oi[e.sticker];if(!o)return null;const{width:a,height:s}=Nf(o.aspectRatio,t);return(0,i.jsx)("image",{href:o.src,x:r,y:n,width:a,height:s,transform:`translate(${-a/2}, ${-s/2})`})},Nf=(e,t)=>e>=1?{width:t,height:t/e}:{width:t*e,height:t},Df="_1agclyl0",Hf="_1agclyl1",Gf="_1agclyl2",ai=({x:e,y:t,width:r,height:n,text:o,isRotated:a,labelRole:s,position:l,coordType:c,backdropColor:u})=>{const h=B(),g=I(Bt,h),p=I(eu,h),m=a?`rotate(-90 ${e} ${t})`:void 0,f=g[s][l],y=f.stroke!==void 0&&(f.strokeWidth??0)>0,x=Uf(s,c,f),S=Vf(f,x,u,p),A={x:e-r/2,y:t-n/2,width:r,height:n},P=It(f.cornerRadius),w=f.shadow===void 0?void 0:Se(f.shadow),k={className:Hf,fill:f.fill===void 0?void 0:(0,d.toPaintColor)(f.fill),style:w===void 0?void 0:{filter:w},...y?{stroke:f.stroke,strokeWidth:f.strokeWidth}:{}};return(0,i.jsxs)("g",{transform:m,opacity:f.alpha,children:[x&&(P===null?(0,i.jsx)("path",{d:mr(A,f.cornerRadius),...k}):(0,i.jsx)("rect",{...A,rx:P,ry:P,...k})),(0,i.jsx)("text",{className:Gf,style:{...He(f),...Et(f),fill:Wf(f,S)},...kt(f),x:e,y:t,textAnchor:"middle",dominantBaseline:"central",children:(0,d.applyTextTransform)(o,f.textTransform)})]})},Wf=(e,t)=>e.isTextColorAuthored||t===void 0?e.textColor:e.isTextColorThemed?(0,d.ensureReadableTextColor)(e.textColor,t):(0,d.pickReadableTextColor)(t),Vf=(e,t,r,n)=>{if(r===void 0)return;const o=t&&e.fill!==void 0?(0,d.toPaintColor)(e.fill):void 0,a=o===void 0?void 0:(0,d.compositeColor)(void 0,o);if(a!==void 0)return a;const s=(0,d.compositeColor)(r,n)??(0,d.removeAlpha)(r);if(s!==void 0)return(0,d.compositeColor)(o,s)},Uf=(e,t,r)=>r.fill===void 0?!1:e==="aggregate"||t==="cartesian",zf=({panelRect:e,formattingLocale:t,plotBottomY:r,isFooterChromeReserved:n})=>{const o=he(),a=we(),s=M((0,q.useShallow)(f=>({layers:f.layers,coordSystem:f.coordSystem,axes:f.guides.axes,numberFormat:f.config.numberFormat,parsingLocale:f.config.parsingLocale}))),l=B(),c=yt(),u=I(Bt,l),h=(0,v.useMemo)(()=>ca({textMeasurer:o,dataLabelStyles:u,familyDefault:a.fonts.familyDefault}),[o,u,a.fonts.familyDefault]),g=(0,v.useMemo)(()=>(0,d.buildDataLabelsContent)({...s,panelRect:e,measureDataLabel:h,readers:l,formattingLocale:t,plotBottomY:r,isFooterChromeReserved:n,resolvePlacement:c}),[s,e,h,l,t,r,n,c]),p=(0,v.useRef)("");(0,v.useEffect)(()=>{if(g.warnings.length===0){p.current="";return}const f=JSON.stringify(g.warnings);f!==p.current&&(p.current=f,Tn(g.warnings))},[g.warnings]);const m=g.labels.map((f,y)=>(0,i.jsx)(ai,{x:f.x,y:f.y,width:f.width,height:f.height,text:f.text,isRotated:f.isRotated,labelRole:f.role,position:f.position,coordType:s.coordSystem.type,backdropColor:f.backdropColor},`${f.layerId}:${y}`));return(0,i.jsx)(Rr,{className:Df,transform:`translate(${e.x}, ${e.y})`,"data-testid":"data-labels",children:m})},Yf=({edge:e,position:t,labelRotation:r,offset:n,axisSize:o})=>{if(r!==0&&(e==="top"||e==="bottom")){const a=e==="top",s=a?-n:n;return{x:0,y:s,textAnchor:a?"start":"end",dominantBaseline:"central",transform:`rotate(${r}, 0, ${s})`}}switch(e){case"bottom":return{x:t*o.width,y:n,textAnchor:"middle",dominantBaseline:"hanging",transform:void 0};case"top":return{x:t*o.width,y:o.height-n,textAnchor:"middle",dominantBaseline:"auto",transform:void 0};case"left":return{x:o.width-n,y:t*o.height,textAnchor:"end",dominantBaseline:"central",transform:void 0};case"right":return{x:n,y:t*o.height,textAnchor:"start",dominantBaseline:"central",transform:void 0}}},Kf=(e,t)=>{const r=t.height/2;switch(e){case"left":return{x:0,y:r,textAnchor:"start",dominantBaseline:"middle",transform:void 0};case"right":return{x:t.width,y:r,textAnchor:"end",dominantBaseline:"middle",transform:void 0};case"top":case"bottom":return{x:t.width/2,y:r,textAnchor:"middle",dominantBaseline:"middle",transform:void 0}}},Xf=(e,t,r,n)=>{const{width:o,ascent:a,descent:s}=t,l=a+s,c=_f(e,o),u=$f(e,a,l),h=qf(r,e,n,{x:c,y:u,width:o,height:l});return{x:c-h.left,y:u-h.top,width:o+h.left+h.right,height:l+h.top+h.bottom,transform:e.transform}},Qf=(e,t)=>{const r=e.map((o,a)=>({position:o,index:a})).sort((o,a)=>o.position-a.position),n=e.map(()=>1/0);return r.forEach((o,a)=>{const s=r[a-1],l=r[a+1],c=s===void 0?1/0:o.position-s.position,u=l===void 0?1/0:l.position-o.position,h=Math.min(c,u);n[o.index]=Number.isFinite(h)?h*t:1/0}),n},qf=(e,t,r,n)=>r===void 0?{left:e,right:e,top:e,bottom:e}:t.transform!==void 0?Jf(e,t):Zf(e,r,n),Jf=(e,{y:t,textAnchor:r})=>{const n=Qe(e,Math.abs(t));return r==="end"?{left:e,right:n,top:e,bottom:e}:{left:n,right:e,top:e,bottom:e}},Zf=(e,{edge:t,stepPx:r,axisSize:n},o)=>{const a=Pn(e,r,o.width),s=Pn(e,r,o.height);switch(t){case"bottom":return{left:a,right:a,top:Qe(e,o.y),bottom:e};case"top":return{left:a,right:a,top:e,bottom:Qe(e,n.height-o.y-o.height)};case"left":return{left:e,right:Qe(e,n.width-o.x-o.width),top:s,bottom:s};case"right":return{left:Qe(e,o.x),right:e,top:s,bottom:s}}},Qe=(e,t)=>Math.max(0,Math.min(e,t)),Pn=(e,t,r)=>Math.min(e,Math.max(0,(t-r)/2)),_f=({x:e,textAnchor:t},r)=>{switch(t){case"start":return e;case"middle":return e-r/2;case"end":return e-r}},$f=({y:e,dominantBaseline:t},r,n)=>{switch(t){case"hanging":return e;case"central":case"middle":return e-n/2;case"auto":return e-r}},ev={fill:"transparent",pointerEvents:"all"},Ir=({placement:e,text:t,style:r,isHitTestable:n,bounds:o})=>(0,i.jsxs)(i.Fragment,{children:[n&&(0,i.jsx)(tv,{placement:e,text:t,style:r,bounds:o}),(0,i.jsx)("text",{...e,style:{...He(r),...Et(r)},...kt(r),fill:r.textColor,children:(0,d.applyTextTransform)(t,r.textTransform)})]}),tv=({placement:e,text:t,style:r,bounds:n})=>{const o=he(),{fonts:a}=we();return(0,i.jsx)("rect",{...(0,v.useMemo)(()=>Xf(e,o.measureText(t,(0,d.toFontSpec)(r,a.familyDefault)),3,n),[e,o,t,r,a.familyDefault,n]),...ev})},rv=({edge:e,position:t,labelRotation:r,label:n,tickLabelStyle:o,axisSize:a,stepPx:s=1/0,isHitTestable:l=!1})=>{const{offset:c}=o,u=(0,v.useMemo)(()=>Yf({edge:e,position:t,labelRotation:r,offset:c,axisSize:a}),[e,t,r,c,a]),h=(0,i.jsx)(Ir,{placement:u,text:n,style:o,isHitTestable:l,bounds:(0,v.useMemo)(()=>({edge:e,stepPx:s,axisSize:a}),[e,s,a])});return u.transform===void 0?h:(0,i.jsx)("svg",{x:(0,d.toPercent)(t),y:e==="top"?"100%":0,style:{overflow:"visible"},children:h})},nv=({formattedAxis:e,rect:t})=>{const r=e.position==="bottom"||e.position==="top",n=(0,d.getAestheticFromScaleAestheticKey)(e.scaleAestheticKey),o=B(),a=I(br,o)(n,e.position),s=I(sa,o)[n],l=fe(),c=(0,v.useMemo)(()=>({width:t.width,height:t.height}),[t.width,t.height]),u=r?t.width:t.height,h=(0,v.useMemo)(()=>l?Qf(e.ticks.map(g=>g.position),u):void 0,[l,e.ticks,u]);return(0,i.jsxs)("svg",{x:t.x,y:t.y,width:t.width,height:t.height,style:{overflow:"visible"},children:[!1,e.ticks.map((g,p)=>{const m=g.formattedLabel,f=r?g.position:1-g.position,y=ov(e.position,f,t,s.length),x=l&&m!=="";return(0,i.jsxs)("g",{...x?Ot(e.scaleAestheticKey,p):void 0,cursor:x?"pointer":void 0,children:[e.ticksVisible&&(0,i.jsx)("line",{...y,stroke:s.stroke,strokeWidth:s.strokeWidth,strokeDasharray:(0,d.toStrokeDasharray)(s.dashArray,s.strokeWidth),pointerEvents:l?"none":void 0}),(0,i.jsx)(rv,{edge:e.position,position:f,labelRotation:e.labelRotation,label:m,tickLabelStyle:a,axisSize:c,stepPx:h?.[p],isHitTestable:x})]},p)})]})},ov=(e,t,r,n)=>{const o=(0,d.toPercent)(t);switch(e){case"bottom":return{x1:o,y1:0,x2:o,y2:n};case"top":return{x1:o,y1:r.height,x2:o,y2:r.height-n};case"left":return{x1:r.width,y1:o,x2:r.width-n,y2:o};case"right":return{x1:0,y1:o,x2:n,y2:o}}},av=({axes:e,rects:t})=>{const r=I(ia,B()),n=fe();return(0,i.jsx)(i.Fragment,{children:e.map(o=>{const a=t[o.position];return!a||!o.isVisible?null:(0,i.jsx)(iv,{axis:o,rect:a,labelStyle:r[(0,d.getAestheticFromScaleAestheticKey)(o.scaleAestheticKey)],isHitTestable:n},`axis-label-${o.position}`)})})},iv=({axis:e,rect:t,labelStyle:r,isHitTestable:n})=>{const o=(0,v.useMemo)(()=>Kf(e.position,t),[e.position,t]),a=n&&e.label!==null&&e.label!=="",s=a?Ot(e.scaleAestheticKey):void 0;return(0,i.jsxs)("g",{transform:`translate(${t.x}, ${t.y})`,...s,cursor:a?"pointer":void 0,children:[!1,(0,i.jsx)(Ir,{placement:o,text:e.label??"",style:r,isHitTestable:a})]})},sv=({formattedAxes:e,tickRects:t})=>(0,i.jsx)(i.Fragment,{children:e.map(r=>{if(r.geometry!=="linear")return null;const n=t[r.position];return!n||!r.isVisible?null:(0,i.jsx)(nv,{formattedAxis:r,rect:n},r.scaleAestheticKey)})}),lv=({formattedAxes:e,labelRects:t})=>(0,i.jsx)(av,{axes:e.filter(r=>r.geometry==="linear"),rects:t}),ii={strokeDashoffset:"0",strokeLinecap:"round"},_e=(e,t)=>e.gridLine[t]().resolve(),si=({axes:e,panelBorderSizes:t,panelFrameRect:r,panelRect:n})=>{const o=B(),a=fe(),s=I(_e,o,"x"),l=I(_e,o,"y"),c=n.x-r.x,u=n.y-r.y;return(0,i.jsx)("svg",{"data-testid":"grid",x:r.x,y:r.y,width:r.width,height:r.height,style:{overflow:"visible"},children:e.map(h=>{if(h.geometry!=="linear"||!h.gridVisible)return null;const g=(0,d.getAestheticFromScaleAestheticKey)(h.scaleAestheticKey)==="x"?s:l;if(g.strokeWidth<=0)return null;const p=h.position==="bottom"||h.position==="top",m=(0,d.toStrokeDasharray)(g.dashArray,g.strokeWidth);return(0,i.jsx)("g",{children:h.ticks.map((f,y)=>{const x=cv(p,f.position);if(x!==null&&t[x]>0)return null;const S=p?f.position:1-f.position;let A;if(p){const w=S*n.width+c;A={x1:w,y1:0,x2:w,y2:"100%"}}else{const w=S*n.height+u;A={x1:0,y1:w,x2:"100%",y2:w}}const P=(0,i.jsx)("line",{...A,...ii,strokeDasharray:m,strokeWidth:g.strokeWidth,stroke:g.stroke});return a?(0,i.jsxs)("g",{...Er(h.scaleAestheticKey),children:[P,(0,i.jsx)("line",{...A,stroke:"transparent",strokeWidth:7,pointerEvents:"stroke","data-testid":"grid-line-hit-area"})]},y):(0,i.jsx)(v.Fragment,{children:P},y)})},h.scaleAestheticKey)})})},cv=(e,t)=>t<=0?e?"left":"bottom":t>=1?e?"right":"top":null,dv=({sizes:e,panelFrameRect:t})=>{const r=M(a=>a.coordSystem.type==="polar"),n=I(d.resolvePanelBorderStyle,B());if(r)return null;const o=(0,d.computePanelBorderPaths)(n,{x:e.left/2,y:e.top/2,width:t.width-(e.left+e.right)/2,height:t.height-(e.top+e.bottom)/2});return o.length===0?null:(0,i.jsx)("svg",{"data-testid":"panel-border",x:t.x,y:t.y,width:t.width,height:t.height,style:{overflow:"visible"},children:o.map((a,s)=>(0,i.jsx)("path",{d:uv(a.segments),fill:"none",stroke:a.stroke,strokeDasharray:(0,d.toStrokeDasharray)(a.dashArray,a.strokeWidth),strokeWidth:a.strokeWidth,...ii},s))})},uv=e=>e.map(t=>{switch(t.type){case"move":return`M ${t.x} ${t.y}`;case"line":return`L ${t.x} ${t.y}`;case"arc":{const r=t.cx+t.radius*Math.cos(t.endAngle),n=t.cy+t.radius*Math.sin(t.endAngle);return`A ${t.radius} ${t.radius} 0 0 1 ${r} ${n}`}case"close":return"Z"}}).join(" ");var li=(e,t)=>{const r=M(c=>c.coordSystem);if(r.type!=="polar")return null;const n=t.find(c=>c.geometry==="circular");if(!n)return null;const{innerRadius:o,startAngle:a,spokeRotation:s}=r,l=Fe(e);return l.radius<=0?null:{circle:l,circularAxis:n,radialAxis:t.find(c=>c.geometry==="radial"),innerRadius:o,startAngle:a,angleFor:c=>(0,d.positionToAngle)(c,a,s),radiusNormFor:c=>o+c*(1-o)}},hv=16,gv=({formattedAxes:e,panelRect:t})=>{const r=I(br,B()),n=fe(),o=li(t,e);if(!o)return null;const{circle:a,circularAxis:s,radialAxis:l,startAngle:c,angleFor:u,radiusNormFor:h}=o,g=fv(l,h,a.radius),p=m=>r((0,d.getAestheticFromScaleAestheticKey)(m.scaleAestheticKey));return(0,i.jsxs)("svg",{x:t.x,y:t.y,width:t.width,height:t.height,overflow:"visible","data-testid":"polar-axis-ticks",children:[l?.isVisible&&g.map(({tick:m,tickIndex:f,radiusNorm:y})=>(0,i.jsx)(wn,{scaleAestheticKey:l.scaleAestheticKey,tickIndex:f,placement:jn(Q(c,y,a),"middle"),label:m.formattedLabel,labelStyle:p(l),isHitTestable:n},`radial-label-${f}`)),s.isVisible&&s.ticks.map((m,f)=>{if(m.position>=1-1e-9)return null;const y=u(m.position),x=Q(y,(a.radius+d.POLAR_RIM_LABEL_GAP_PX)/a.radius,a);return(0,i.jsx)(wn,{scaleAestheticKey:s.scaleAestheticKey,tickIndex:f,placement:jn(x,vv(y)),label:m.formattedLabel,labelStyle:p(s),isHitTestable:n},`rim-label-${f}`)})]})},wn=({scaleAestheticKey:e,tickIndex:t,placement:r,label:n,labelStyle:o,isHitTestable:a})=>{const s=(0,i.jsx)(Ir,{placement:r,text:n,style:o,isHitTestable:a});return a?(0,i.jsx)("g",{...Ot(e,t),cursor:"pointer",children:s}):s},fv=(e,t,r)=>{if(!e)return[];const n=[];let o=Number.NEGATIVE_INFINITY;for(const[a,s]of e.ticks.entries()){const l=t(s.position);if(l<=0)continue;const c=l*r;c-o<hv||(n.push({tick:s,tickIndex:a,radiusNorm:l}),o=c)}return n},jn=(e,t)=>({x:e.x,y:e.y,textAnchor:t,dominantBaseline:"central",transform:void 0}),vv=e=>{const t=Math.sin(e);return Math.abs(t)<.01?"middle":t>0?"start":"end"},pv=({formattedAxes:e,panelRect:t})=>{const r=B(),n=fe(),o=I(_e,r,"y"),a=I(_e,r,"x"),s=li(t,e);if(!s)return null;const{circle:l,circularAxis:c,radialAxis:u,innerRadius:h,angleFor:g,radiusNormFor:p}=s;return(0,i.jsxs)("svg",{x:t.x,y:t.y,width:t.width,height:t.height,overflow:"visible","data-testid":"polar-grid",children:[u?.gridVisible&&u.ticks.map((m,f)=>{const y=p(m.position)*l.radius;return y<=0||m.position>=1?null:(0,i.jsx)(Ut,{axis:(0,d.getAestheticFromScaleAestheticKey)(u.scaleAestheticKey),lineStyle:o,isHitTestable:n,draw:x=>(0,i.jsx)("circle",{cx:l.centerX,cy:l.centerY,r:y,fill:"none",...x})},`ring-${f}`)}),u?.gridVisible&&(0,i.jsx)(Ut,{axis:(0,d.getAestheticFromScaleAestheticKey)(u.scaleAestheticKey),lineStyle:o,isHitTestable:n,draw:m=>(0,i.jsx)("circle",{cx:l.centerX,cy:l.centerY,r:l.radius,fill:"none",...m})}),c.gridVisible&&c.ticks.map((m,f)=>{if(m.position>=1-1e-9)return null;const y=g(m.position),x=Q(y,h,l),S=Q(y,1,l);return(0,i.jsx)(Ut,{axis:(0,d.getAestheticFromScaleAestheticKey)(c.scaleAestheticKey),lineStyle:a,isHitTestable:n,draw:A=>(0,i.jsx)("line",{x1:x.x,y1:x.y,x2:S.x,y2:S.y,...A})},`spoke-${f}`)})]})},Ut=({axis:e,lineStyle:t,isHitTestable:r,draw:n})=>{if(t.strokeWidth<=0)return null;const o=n({stroke:t.stroke,strokeWidth:t.strokeWidth});return r?(0,i.jsxs)("g",{...Er(e),children:[o,n({stroke:"transparent",strokeWidth:7,pointerEvents:"stroke","data-testid":"grid-line-hit-area"})]}):o},mv=({layer:e,isDimmed:t,dimStyle:r,...n})=>{const o=na(e.id),a=Di(e,F(e)),s=t?r.filter:void 0,l=a&&s?`${a} ${s}`:a||s,c=o?.type==="fade",u=(0,v.useMemo)(()=>({layerId:e.id,paintsShadow:a!==void 0,isFading:c}),[e.id,a,c]),h=(0,i.jsx)("g",{style:{opacity:t?r.opacity:void 0,filter:l},children:(0,i.jsx)(bt.Provider,{value:u,children:(0,i.jsx)(xv,{layer:e,...n})})});return c?(0,i.jsx)(R.motion.g,{initial:{opacity:0},animate:{opacity:1},transition:Wn(o),children:h}):h},xv=({layer:e,coordSystem:t,shouldAnimateTransitions:r,formattingLocale:n,panelRect:o})=>{const a=se(),s=na(e.id),{colorScheme:l}=G(),c=F(e),u=a(e.geom,t.type);if(u===null)return null;const h=Rt(u.render);return h.overlay?null:h.fn({layer:e,coordSystem:t,shouldAnimateTransitions:r,formattingLocale:n,intro:s,panelRect:o,colorScheme:l,styleReaders:c})};function yv({renderer:e,layer:t,coordSystem:r,candidates:n}){if(e?.getOverlayAnchor===void 0||n.length===0)return[];const o=[];for(const{observation:a,observationIndex:s}of n){const l=e.getOverlayAnchor({layer:t,coordSystem:r,observation:a});l!==null&&o.push({observation:a,observationIndex:s,anchor:l})}return o}var bv=4,Av=({renderer:e,layer:t,matchedLayer:r,overlayCandidates:n,coordSystem:o,shouldAnimateTransitions:a,panelRect:s,formattingLocale:l})=>{const c=M(P=>P.config.numberFormat),u=(0,v.useMemo)(()=>yv({renderer:e,layer:t,coordSystem:o,candidates:n}),[e,t,o,n]),{colorScheme:h}=G(),g=F(t),p=B(),m=(0,v.useMemo)(()=>(0,d.createSegmentYReader)(t),[t]),f=(0,v.useMemo)(()=>(0,d.createLayerYValueFormatter)({layer:t,numberFormat:c,locale:l}),[c,t,l]),{fonts:y}=we(),x=I(Bt,B());if(e===null||r===null&&u.length===0)return null;const S=Rt(e.render);let A=null;if(r&&!S.overlay){const P={layer:r,sourceLayer:t,coordSystem:o,shouldAnimateTransitions:a,formattingLocale:l,panelRect:s,colorScheme:h,styleReaders:g};A=e.renderHighlight?e.renderHighlight(P):S.fn(P)}return(0,i.jsxs)(Rr,{children:[A,u.map(({observation:P,observationIndex:w,anchor:k})=>(0,i.jsx)(Sv,{observation:P,anchor:k,panelRect:s,fill:(0,d.readGeomColor)(p,t,P)??d.DEFAULT_GEOM_COLOR,symbol:g.get("symbol",P)??"circle",dotRadius:(g.get("size",P)??d.DEFAULT_POINT_SIZE_PX)/2,readSegmentY:m,formatYValue:f,labelStyle:x.observation.outside,familyDefault:y.familyDefault},Pv(P,w)))]})},Sv=({observation:e,anchor:t,panelRect:r,fill:n,symbol:o,dotRadius:a,readSegmentY:s,formatYValue:l,labelStyle:c,familyDefault:u})=>{const h=he(),g=(0,d.toViewBoxX)(t.x),p=(0,d.toViewBoxY)(t.y),m=s(e)??null,f=m!==null?l(m,e):null,y=(0,v.useMemo)(()=>{if(f===null)return null;const x=h.measureText(f,(0,d.toFontSpec)(c,u));return{width:x.width+c.paddingInline*2,height:x.height+c.paddingBlock*2}},[f,h,c,u]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(At,{symbol:o,cx:(0,d.toPercent)(g),cy:(0,d.toPercent)(p),size:a*2,fill:n,"data-testid":"highlight-overlay-dot"}),f!==null&&y!==null&&(0,i.jsx)(ai,{x:g*r.width,y:p*r.height-a-bv-y.height/2,width:y.width,height:y.height,text:f,isRotated:!1,labelRole:"observation",position:"outside",coordType:"cartesian"})]})},Pv=(e,t)=>{const r=e[d.GROUP_VARIABLES.group];return`${String(r??"")}\0${t}`},kn=64,_t=({overlay:e,panelRect:t,children:r})=>{const n=(0,v.useId)(),o=(0,v.useId)(),{fillFor:a,defs:s}=Y({paints:e}),l=(0,i.jsx)("g",{id:n,children:r});if(e.length===0)return l;const c={x:-64,y:-64,width:t.width+2*kn,height:t.height+2*kn};return(0,i.jsxs)(i.Fragment,{children:[l,s,(0,i.jsx)("mask",{id:o,maskUnits:"userSpaceOnUse",style:{maskType:"alpha"},...c,children:(0,i.jsx)("use",{href:`#${n}`})}),(0,i.jsx)("g",{mask:`url(#${o})`,pointerEvents:"none","data-testid":"layer-overlay",children:[...e].reverse().map((u,h)=>(0,i.jsx)("rect",{...c,fill:a(u)},h))})]})},En=[],ci=(e,t,r)=>{const n=F(e);return(0,v.useMemo)(()=>{const[o]=e.data,a=r??o;return a===void 0?En:n.get("overlay",a,t)??En},[e,n,t,r])},wv=({layer:e,coordSystem:t,panelRect:r})=>{const{primary:n,group:o,related:a}=Ie((0,q.useShallow)(f=>({primary:f.hover.primary,group:f.hover.group,related:f.hover.related}))),s=se(),{colorScheme:l}=G(),c=F(e),u=ge[We()].hoverPaint,h=n?.layerId===e.id,g=a.get(e.id)??[],p=ci(e,h?"hovered":void 0,h?n.observation:void 0);if(!u||n===null)return null;const m=s(e.geom,t.type);return m===null||Oo(m)?null:h?(0,i.jsx)(_t,{overlay:p,panelRect:r,children:m.renderHover({layer:e,coordSystem:t,primary:n,group:o,related:g,panelRect:r,colorScheme:l,styleReaders:c})}):g.length===0?null:(0,i.jsx)(_t,{overlay:p,panelRect:r,children:m.renderHoverCompanions({layer:e,coordSystem:t,primary:n,related:g,colorScheme:l,styleReaders:c})})},jv=e=>{const t=F(e);return(0,v.useMemo)(()=>{const[r]=e.data;if(r===void 0)return{opacity:void 0,filter:void 0};const n=t.resolveState("dimmed",r);return{opacity:n.alpha,filter:Hn((0,d.pickFilters)(n))}},[e,t])},kv="var(--to1jkx0)",Ev="var(--to1jkx1)",Rv="to1jkx2",Cv="to1jkx3",Iv=({shouldAnimateTransitions:e,panelRect:t,formattingLocale:r})=>{const{layers:n,coordSystem:o}=M((0,q.useShallow)(s=>({layers:s.layers,coordSystem:s.coordSystem}))),a=je()?[]:n;return(0,i.jsx)("svg",{x:t.x,y:t.y,width:t.width,height:t.height,className:Rv,"data-testid":"geom-layers",...Yh(),children:a.map(s=>(0,i.jsxs)(v.Fragment,{children:[(0,i.jsx)(Bv,{layer:s,coordSystem:o,shouldAnimateTransitions:e,panelRect:t,formattingLocale:r}),(0,i.jsx)(wv,{layer:s,coordSystem:o,panelRect:t})]},`${s.id}-${Mv(o)}`))})},Mv=e=>e.type==="cartesian"?`cartesian-${e.mainAxis}`:e.type,Tv=e=>(0,xt.assignInlineVars)({...e.opacity===void 0?{}:{[kv]:String(e.opacity)},...e.filter===void 0?{}:{[Ev]:e.filter}}),Bv=({layer:e,coordSystem:t,shouldAnimateTransitions:r,panelRect:n,formattingLocale:o})=>{const a=se(),s=(0,v.useMemo)(()=>a(e.geom,t.type),[a,e,t]),l=e.highlight,c=jv(e),u=ci(e),{colorScheme:h}=G(),g={layer:e,coordSystem:t,shouldAnimateTransitions:r,formattingLocale:o,panelRect:n,colorScheme:h,styleReaders:F(e)},p=s?Rt(s.render):null,m=e.spatialKind==="render-hit-test",f=c.opacity!==void 0||c.filter!==void 0;return(0,i.jsx)("g",{className:f?Cv:void 0,style:f?Tv(c):void 0,children:(0,i.jsxs)(_t,{overlay:p?.overlay?[]:u,panelRect:n,children:[(0,i.jsx)(mv,{layer:e,coordSystem:t,shouldAnimateTransitions:r,isDimmed:l?.composition.isDimmed??!1,dimStyle:c,formattingLocale:o,panelRect:n}),m&&!p?.overlay&&s?.hitTest&&(0,i.jsx)(zc,{hitTest:s.hitTest,input:g}),m&&p?.overlay&&(0,i.jsx)(qc,{render:p.fn,input:g}),l!==null&&(0,i.jsx)(Av,{renderer:s,layer:e,matchedLayer:l.composition.matchedLayer,overlayCandidates:l.composition.overlayCandidates,coordSystem:t,shouldAnimateTransitions:r,panelRect:n,formattingLocale:o})]})})},Ov="_17uhij30",Lv=({formattedAxes:e,plotRect:t,panelBorder:r,panelFrameRect:n,panelRect:o,axisRects:a,axisLabelRects:s,shouldAnimateTransitions:l,formattingLocale:c,plotBottomY:u,isFooterChromeReserved:h,isEditable:g,showAnnotations:p})=>{const m=(0,v.useRef)(null);Zg(m);const f=oe("Grid",si),y=oe("AxisTicks",sv),x=oe("AxisLabel",lv),S=(0,v.useMemo)(()=>$t(n,t),[n,t]),A=(0,v.useMemo)(()=>$t(o,t),[o,t]),P=(0,v.useMemo)(()=>Rn(a,t),[a,t]),w=(0,v.useMemo)(()=>Rn(s,t),[s,t]),k=je(),E=p&&!k;return(0,i.jsxs)("svg",{ref:m,className:Ov,width:t.width,height:t.height,style:{transform:`translate(${t.x}px, ${t.y}px)`},"data-testid":"plot",children:[(0,i.jsx)(f,{axes:e,panelBorderSizes:r,panelFrameRect:S,panelRect:A}),(0,i.jsx)(y,{formattedAxes:e,tickRects:P}),(0,i.jsx)(x,{formattedAxes:e,labelRects:w}),(0,i.jsx)(pv,{formattedAxes:e,panelRect:A}),(0,i.jsx)(Ng,{panelRect:A}),E&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(bn,{panelRect:A,zOrder:"background"}),(0,i.jsx)(yn,{panelRect:A,zOrder:"background"})]}),(0,i.jsx)(dv,{sizes:r,panelFrameRect:S}),(0,i.jsx)(Iv,{shouldAnimateTransitions:l,panelRect:A,formattingLocale:c}),(0,i.jsx)(gv,{formattedAxes:e,panelRect:A}),(0,i.jsx)(zf,{panelRect:A,formattingLocale:c,plotBottomY:u,isFooterChromeReserved:h}),E&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(df,{panelRect:A,isEditable:g}),(0,i.jsx)(bn,{panelRect:A,zOrder:"foreground"}),(0,i.jsx)(yn,{panelRect:A,zOrder:"foreground"}),(0,i.jsx)(of,{panelRect:A,isEditable:g}),(0,i.jsx)(Af,{panelRect:A}),(0,i.jsx)(Lf,{panelRect:A}),(0,i.jsx)(Rf,{panelRect:A})]}),(0,i.jsx)(qg,{panelRect:A})]})},$t=(e,t)=>({x:e.x-t.x,y:e.y-t.y,width:e.width,height:e.height}),Rn=(e,t)=>{const r={};for(const[n,o]of Object.entries(e))r[n]=$t(o,t);return r},Fv=e=>{let t,r;return"aspectRatio"in e?"intrinsicWidth"in e?(t=e.intrinsicWidth,r=t/e.aspectRatio):(r=e.intrinsicHeight,t=r*e.aspectRatio):(t=e.intrinsicWidth,r=e.intrinsicHeight),{width:Cn(t,"width"),height:Cn(r,"height")}},Cn=(e,t)=>{if(e<=0||Number.isNaN(e)||!Number.isFinite(e))throw new d.InternalError({message:`Expected ${t} to be a positive, finite number, but got ${e}.`});return e},Nv=({sizing:e,onResize:t,children:r})=>{const n=Vo({onResize:t}),o=(0,v.useRef)(!1);if((0,v.useEffect)(()=>{e.mode==="responsive"&&(n.isDefault||n.width>0&&n.height>0||o.current||(o.current=!0,console.warn(`[graphy] ZERO_SIZE_CONTAINER: GraphRenderer measured ${n.width}×${n.height}; the chart will not paint until the host has a positive width and height.`)))},[e.mode,n.isDefault,n.width,n.height]),e.mode==="keepAspectRatio"){const{intrinsicSize:s,canRender:l,outerStyles:c,innerStyles:u}=Dv(e,n.width,!n.isDefault);return(0,i.jsx)("div",{ref:n.setElement,style:c,"data-testid":"graph-sizer",children:l&&(0,i.jsx)("div",{style:u,children:r(s)})})}if(e.mode==="fixed")return(0,i.jsx)("div",{ref:n.setElement,style:{width:e.width,height:e.height},"data-testid":"graph-sizer",children:r({width:e.width,height:e.height})});const a=!n.isDefault&&n.width>0&&n.height>0;return(0,i.jsx)("div",{ref:n.setElement,style:{width:"100%",height:"100%"},"data-testid":"graph-sizer",children:a&&r({width:n.width,height:n.height})})},Dv=(e,t,r)=>{const n=Fv(e),o=t>0&&n.width>0?t/n.width:1;return{intrinsicSize:n,canRender:r,outerStyles:{width:"100%",...r?{height:n.height*o}:{aspectRatio:`${n.width} / ${n.height}`}},innerStyles:{transformOrigin:"top left",transform:`scale(${o})`,width:n.width,height:n.height}}},Hv={mode:"responsive"},zt={headerSize:{width:0,height:0},footerSize:{width:0,height:0}},Gv=()=>{const[e,t]=(0,v.useState)(null),[r,n]=(0,v.useState)(null),[o,a]=(0,v.useState)(zt);return(0,v.useLayoutEffect)(()=>{const s=()=>{const c=e?{width:e.offsetWidth,height:e.offsetHeight}:zt.headerSize,u=r?{width:r.offsetWidth,height:r.offsetHeight}:zt.footerSize;a(h=>Wv(h,{headerSize:c,footerSize:u})?{headerSize:c,footerSize:u}:h)};s();const l=new ResizeObserver(s);return e&&l.observe(e),r&&l.observe(r),()=>l.disconnect()},[e,r]),{headerRef:t,footerRef:n,measurements:o}},Wv=(e,t)=>e.headerSize.width!==t.headerSize.width||e.headerSize.height!==t.headerSize.height||e.footerSize.width!==t.footerSize.width||e.footerSize.height!==t.footerSize.height,Vv=()=>null,Uv="_1vl0pke0",zv="_1vl0pke1";var Yv=[],Kv=({graphChrome:e,isEditable:t,mode:r,style:n,contentRef:o,children:a})=>{const{themeClass:s,inlineVarsStyle:l}=Mt(),c=e.strokeWidth,u=c>0?e.stroke:void 0,h=Math.max(0,e.cornerRadius),g=h===0?0:h+c,{shadow:p,alpha:m,blendMode:f,fill:y,overlay:x=Yv}=e,S=De([y,...x]),A=S(y),P=typeof y!="string",w=(0,v.useMemo)(()=>({...n,borderRadius:`${g}px`,...l,...u===void 0?{}:{borderWidth:`${c}px`,borderStyle:"solid",borderColor:u},...p===void 0?{}:{boxShadow:Le(p)}}),[n,g,l,c,u,p]),k=(0,v.useMemo)(()=>({borderRadius:`${h}px`,...f==="normal"?{}:{mixBlendMode:f},...Xv(P,m)}),[h,f,P,m]),E=(0,v.useMemo)(()=>typeof y=="string"?void 0:{...Te(y,A),opacity:m},[y,A,m]),C=t&&y==="transparent";return(0,i.jsx)("div",{"data-testid":"graph-wrapper",className:(0,U.default)(yd,s),style:w,children:(0,i.jsxs)("div",{ref:o,"data-testid":"graph-inner","data-graph-mode":r,tabIndex:t?0:void 0,className:(0,U.default)(Ad,{[Sd]:t,[Pd]:C,[zv]:P}),style:k,children:[E&&(0,i.jsx)("div",{"aria-hidden":!0,"data-testid":"graph-fill",className:"_1vl0pke2",style:E}),a,[...x].reverse().map((j,T)=>(0,i.jsx)("div",{"aria-hidden":!0,"data-testid":"graph-overlay",className:Uv,style:Te(j,S(j))},T))]})})},Xv=(e,t)=>e?{backgroundColor:"transparent"}:t===void 0||t>=1?{}:{backgroundColor:`color-mix(in srgb, ${b.graphBackground} ${t*100}%, transparent)`},Qv=e=>(0,i.jsx)(Ko,{locale:ha(),children:(0,i.jsx)(di,{...e})}),di=({slots:e,sizing:t=Hv,onResize:r,...n})=>(0,i.jsx)(Do,{children:(0,i.jsx)(fo,{children:(0,i.jsx)(Gl,{slots:e,children:(0,i.jsx)(Nv,{sizing:t,onResize:r,children:({width:o,height:a})=>(0,i.jsx)(qv,{width:o,height:a,...n})})})})}),qv=({width:e,height:t,animation:r,showTooltips:n=!0,mode:o=ae.readonly})=>{const a=pr(),s=vr(o),{axes:l,legends:c,layers:u,numberFormat:h,parsingLocale:g,annotations:p,coordSystem:m,headline:f,headlineConfig:y,content:x,overflowStrategy:S}=M((0,q.useShallow)(J=>({axes:J.guides.axes,legends:J.guides.legends.drawn,layers:J.layers,numberFormat:J.config.numberFormat,parsingLocale:J.config.parsingLocale,annotations:J.annotations,coordSystem:J.coordSystem,headline:J.guides.headline,headlineConfig:J.config.headline,content:J.config.content,overflowStrategy:J.config.panel.overflow}))),{intro:A,transitions:P}=td(r,u),{headerRef:w,footerRef:k,measurements:E}=Gv(),{formattingLocale:C,colorScheme:j}=G(),T=ge[s],O=T.editorSurface,[V,K]=(0,v.useState)(null),H=oe("Header",ja),ve=oe("Footer",wa),ui=oe("Legend",Lg),hi=oe("Headline",Gh),gi=oe("EditorSurface",Vv),Mr=(0,v.useMemo)(()=>(0,d.formatLegends)({legends:c,numberFormat:h,parsingLocale:g,formattingLocale:C}),[c,h,g,C]),Ue=(0,v.useMemo)(()=>(0,d.formatHeadline)({headline:f,show:y.show,numberFormat:h,parsingLocale:g,formattingLocale:C,t:a}),[f,y.show,h,g,C,a]),fi=he(),le=B(),Tr=I(Jv,le),Br=I(d.resolvePanelBorderStyle,le),Or=I(Ar,le),Lr=I(Zv,le),vi=I(_v,le),pi=I($v,le),mi=I(e0,le),{fontFamily:Nt,textScale:xi,strokeWidth:Dt,fill:yi}=Tr,Fr=(0,v.useMemo)(()=>so(j,{},Nt),[j,Nt]),ze=(0,v.useMemo)(()=>({width:Math.max(0,e-2*Dt),height:Math.max(0,t-2*Dt)}),[e,t,Dt]),Nr=(0,v.useMemo)(()=>Sa(x.brandMark.enabled,ze,x.brandMark.variant),[x.brandMark.enabled,x.brandMark.variant,ze]),bi=x.brandMark.placement==="footer"?Nr:"hidden",Ai=x.brandMark.placement==="header"?Nr:"hidden",ke=(0,v.useMemo)(()=>Ue?{formatted:Ue,size:y.size,position:y.position,innerRadius:m.type==="polar"?m.innerRadius:0}:void 0,[Ue,y.size,y.position,m]),ot=pu({textMeasurer:fi,metrics:Fr,overrides:Wl()}),Dr=(0,v.useMemo)(()=>(0,d.computePanelBorderSizes)(Br),[Br]),Ye=mu({measurer:ot,axes:l,numberFormat:h,parsingLocale:g,formattedLegends:Mr,containerSize:ze,externalMeasurements:E,headline:ke,formattingLocale:C,annotations:p,layers:u,coordSystem:m,overflowStrategy:S,panelBorder:Dr,padding:I(d.resolveGraphPadding,le),margins:I(d.resolveChromeMargins,le)}),at=(0,v.useMemo)(()=>!Ye||!ke||!ot?null:(0,d.resolveHeadlinePlacement)({headline:ke,layout:Ye.layout,containerSize:ze,measurer:ot,itemGap:Or.gap}),[Ye,ke,ot,ze,Or.gap]);if(!Ye)return null;const{layout:X,formattedAxes:Hr,plotBottomY:Si}=Ye,Pi=X.footer.height>0;return(0,i.jsx)(Na.Provider,{value:s,children:(0,i.jsx)(Jo,{colorScheme:j,textScale:xi,graphBackground:(0,d.toPaintColor)(yi),graphFontFamily:Nt,headingFontFamily:Lr.fontFamily,children:(0,i.jsx)(bl,{metrics:Fr,children:(0,i.jsx)(bu,{children:(0,i.jsx)(Ku,{panelRect:X.panel,children:(0,i.jsx)(Kv,{graphChrome:Tr,isEditable:O,mode:s,contentRef:O?K:void 0,style:{width:"100%",height:"100%"},children:(0,i.jsxs)(Hd,{intro:A,panelRect:X.panel,children:[(0,i.jsx)(H,{ref:w,headerRect:X.header,mode:s,title:x.title,isTitleVisible:x.isTitleVisible,subtitle:x.subtitle,isSubtitleVisible:x.isSubtitleVisible,headingStyle:Lr,subtitleStyle:vi,brandMark:Ai}),(0,i.jsx)(Lv,{formattedAxes:Hr,plotRect:X.plot,panelBorder:Dr,panelFrameRect:X.panelFrame,panelRect:X.panel,axisRects:X.axes,axisLabelRects:X.axisLabels,shouldAnimateTransitions:P,formattingLocale:C??g,plotBottomY:Si,isFooterChromeReserved:Pi,isEditable:O,showAnnotations:T.annotations}),(0,i.jsx)(ve,{ref:k,footerRect:X.footer,mode:s,caption:x.caption,isCaptionVisible:x.isCaptionVisible,source:x.source,isSourceVisible:x.isSourceVisible,captionStyle:pi,sourceStyle:mi,brandMark:bi}),(0,i.jsx)(ui,{formattedLegends:Mr,rects:X.legends}),Ue&&at&&(0,i.jsx)(hi,{headline:Ue,rect:at.rect,resolvedSize:at.resolvedSize,visibleItemCount:at.visibleItemCount,isInDonutHole:ke!==void 0&&(0,d.paintsInDonutHole)(ke)}),O&&V!==null&&(0,i.jsx)(gi,{frameElement:V,panelRect:X.panel,formattedAxes:Hr,shouldAnimateTransitions:P}),n&&T.tooltips&&(0,i.jsx)(Qd,{})]})})})})})})})},Jv=e=>e.graph().resolve(),Zv=e=>e.heading.h1().resolve(),_v=e=>e.heading.h2().resolve(),$v=e=>e.caption().resolve(),e0=e=>({label:e.source().resolve(),link:e.source.link().resolve()}),t0=e=>{const t=(0,v.useContext)(tr),r=yt();return(0,v.useMemo)(()=>e||(t?{commands:t.commands,undo:t.history.undo,redo:t.history.redo,subscribe:t.store.subscribe,getScene:()=>t.store.getState().scene,getSelection:()=>t.selectionStore.getState().selection,setSelection:n=>t.selectionStore.getState().setSelection(n),subscribeSelection:t.selectionStore.subscribe,canPlaceDataLabels:r.hasCapability,canFormatDataLabelsAsPercentages:r.hasPercentageFormat}:null),[e,t,r])},r0=e=>(0,v.useSyncExternalStore)(e.subscribe,e.getScene,e.getScene),n0=()=>{const{commands:e}=G();return e},o0=e=>{if(e.altKey||!e.metaKey&&!e.ctrlKey)return null;const t=e.key.toLowerCase();return t==="z"?e.shiftKey?"redo":"undo":t==="y"&&e.ctrlKey&&!e.shiftKey?"redo":null};Object.defineProperty(exports,"ArrowAnnotation",{enumerable:!0,get:function(){return _a}});Object.defineProperty(exports,"ArrowIcon",{enumerable:!0,get:function(){return Ea}});Object.defineProperty(exports,"BUILT_IN_GEOM_RENDERERS",{enumerable:!0,get:function(){return Bo}});Object.defineProperty(exports,"BrandMark",{enumerable:!0,get:function(){return wr}});Object.defineProperty(exports,"CANVAS_COLOR_KEYS",{enumerable:!0,get:function(){return el}});Object.defineProperty(exports,"CanvasTextMeasurer",{enumerable:!0,get:function(){return uo}});Object.defineProperty(exports,"DEFAULT_FONT_FAMILY",{enumerable:!0,get:function(){return tt}});Object.defineProperty(exports,"DEFAULT_SPRING_TRANSITION",{enumerable:!0,get:function(){return ee}});Object.defineProperty(exports,"DataLabelPlacementResolverProvider",{enumerable:!0,get:function(){return Li}});Object.defineProperty(exports,"DefaultFooter",{enumerable:!0,get:function(){return wa}});Object.defineProperty(exports,"DefaultGrid",{enumerable:!0,get:function(){return si}});Object.defineProperty(exports,"DefaultHeader",{enumerable:!0,get:function(){return ja}});Object.defineProperty(exports,"DefaultSwatch",{enumerable:!0,get:function(){return xo}});Object.defineProperty(exports,"DefaultTooltip",{enumerable:!0,get:function(){return aa}});Object.defineProperty(exports,"EDIT_TARGET_AXIS_ATTRIBUTE",{enumerable:!0,get:function(){return Ze}});Object.defineProperty(exports,"EDIT_TARGET_KIND_ATTRIBUTE",{enumerable:!0,get:function(){return ye}});Object.defineProperty(exports,"EditorProvider",{enumerable:!0,get:function(){return zu}});Object.defineProperty(exports,"GRAPH_MODES",{enumerable:!0,get:function(){return ae}});Object.defineProperty(exports,"GeomRendererResolverProvider",{enumerable:!0,get:function(){return kl}});Object.defineProperty(exports,"GraphContext",{enumerable:!0,get:function(){return tr}});Object.defineProperty(exports,"GraphRenderer",{enumerable:!0,get:function(){return Qv}});Object.defineProperty(exports,"GraphRendererBody",{enumerable:!0,get:function(){return di}});Object.defineProperty(exports,"HoverProvider",{enumerable:!0,get:function(){return Do}});Object.defineProperty(exports,"Icon",{enumerable:!0,get:function(){return kr}});Object.defineProperty(exports,"ImageAnnotation",{enumerable:!0,get:function(){return ei}});Object.defineProperty(exports,"InlineEditorsProvider",{enumerable:!0,get:function(){return dh}});Object.defineProperty(exports,"IntlProvider",{enumerable:!0,get:function(){return Ko}});Object.defineProperty(exports,"IntroFade",{enumerable:!0,get:function(){return So}});Object.defineProperty(exports,"IntroWipeClip",{enumerable:!0,get:function(){return ar}});Object.defineProperty(exports,"LEGEND_OVERFLOW_CONTROL_SELECTOR",{enumerable:!0,get:function(){return Wh}});Object.defineProperty(exports,"MODE_SURFACES",{enumerable:!0,get:function(){return ge}});Object.defineProperty(exports,"MinusIcon",{enumerable:!0,get:function(){return Ra}});Object.defineProperty(exports,"OverlayPortal",{enumerable:!0,get:function(){return Go}});Object.defineProperty(exports,"PortalThemeProvider",{enumerable:!0,get:function(){return Zo}});Object.defineProperty(exports,"RICH_TEXT_FONT_FAMILIES",{enumerable:!0,get:function(){return _o}});Object.defineProperty(exports,"SIDE_KEYS",{enumerable:!0,get:function(){return Fo}});Object.defineProperty(exports,"STICKER_ASSETS",{enumerable:!0,get:function(){return oi}});Object.defineProperty(exports,"ShapeAnnotation",{enumerable:!0,get:function(){return ti}});Object.defineProperty(exports,"TextAnnotation",{enumerable:!0,get:function(){return pf}});Object.defineProperty(exports,"TextMeasurerProvider",{enumerable:!0,get:function(){return fo}});Object.defineProperty(exports,"ThemeProvider",{enumerable:!0,get:function(){return Jo}});Object.defineProperty(exports,"Z_INDEX",{enumerable:!0,get:function(){return Ce}});Object.defineProperty(exports,"__toESM",{enumerable:!0,get:function(){return In}});Object.defineProperty(exports,"areRectsEqual",{enumerable:!0,get:function(){return gt}});Object.defineProperty(exports,"assignTextStyleVars",{enumerable:!0,get:function(){return rc}});Object.defineProperty(exports,"buildDotsEditOutlineShapes",{enumerable:!0,get:function(){return Nn}});Object.defineProperty(exports,"buildDotsPath",{enumerable:!0,get:function(){return qi}});Object.defineProperty(exports,"buildRoundedRectPath",{enumerable:!0,get:function(){return de}});Object.defineProperty(exports,"canMoveAnnotationOnCanvas",{enumerable:!0,get:function(){return Ja}});Object.defineProperty(exports,"createGeomRendererResolver",{enumerable:!0,get:function(){return Lo}});Object.defineProperty(exports,"createTargetBoundaryStore",{enumerable:!0,get:function(){return Hc}});Object.defineProperty(exports,"darkTheme",{enumerable:!0,get:function(){return Qo}});Object.defineProperty(exports,"defineGeomRenderer",{enumerable:!0,get:function(){return Dc}});Object.defineProperty(exports,"dictionaries",{enumerable:!0,get:function(){return Ct}});Object.defineProperty(exports,"editor",{enumerable:!0,get:function(){return ff}});Object.defineProperty(exports,"findPressedObservation",{enumerable:!0,get:function(){return Nu}});Object.defineProperty(exports,"growRect",{enumerable:!0,get:function(){return Kt}});Object.defineProperty(exports,"isHex",{enumerable:!0,get:function(){return al}});Object.defineProperty(exports,"isOverlayHosted",{enumerable:!0,get:function(){return Oo}});Object.defineProperty(exports,"isValidCssColor",{enumerable:!0,get:function(){return il}});Object.defineProperty(exports,"lightTheme",{enumerable:!0,get:function(){return xr}});Object.defineProperty(exports,"lightenCss",{enumerable:!0,get:function(){return ol}});Object.defineProperty(exports,"logDiagnostics",{enumerable:!0,get:function(){return Tn}});Object.defineProperty(exports,"measureArrowEnds",{enumerable:!0,get:function(){return Ka}});Object.defineProperty(exports,"measureShapeRegion",{enumerable:!0,get:function(){return Ya}});Object.defineProperty(exports,"measureTextAnnotationBox",{enumerable:!0,get:function(){return Xa}});Object.defineProperty(exports,"previewResizedText",{enumerable:!0,get:function(){return ni}});Object.defineProperty(exports,"projectPointCartesian",{enumerable:!0,get:function(){return pe}});Object.defineProperty(exports,"readAnnotationUnderPointer",{enumerable:!0,get:function(){return Sr}});Object.defineProperty(exports,"readCrosshairLine",{enumerable:!0,get:function(){return za}});Object.defineProperty(exports,"readDraggedArrowEndpointFor",{enumerable:!0,get:function(){return Eu}});Object.defineProperty(exports,"readDraggedDifferenceArrowEndpointFor",{enumerable:!0,get:function(){return Cu}});Object.defineProperty(exports,"readGridLineStyle",{enumerable:!0,get:function(){return _e}});Object.defineProperty(exports,"readLegendItemAddress",{enumerable:!0,get:function(){return Ba}});Object.defineProperty(exports,"readMovedAnnotationFor",{enumerable:!0,get:function(){return ju}});Object.defineProperty(exports,"readPressedObservation",{enumerable:!0,get:function(){return Fu}});Object.defineProperty(exports,"readResizedShapeFor",{enumerable:!0,get:function(){return Mu}});Object.defineProperty(exports,"readResizedTextFor",{enumerable:!0,get:function(){return Bu}});Object.defineProperty(exports,"readRichTextFontId",{enumerable:!0,get:function(){return $o}});Object.defineProperty(exports,"readStampedEditTargetInStack",{enumerable:!0,get:function(){return zh}});Object.defineProperty(exports,"readStanding",{enumerable:!0,get:function(){return Me}});Object.defineProperty(exports,"resolveAnnotationChromeGeometry",{enumerable:!0,get:function(){return Vg}});Object.defineProperty(exports,"resolveBrandMarkVisual",{enumerable:!0,get:function(){return Sa}});Object.defineProperty(exports,"resolveEditTargetAtPoint",{enumerable:!0,get:function(){return Hu}});Object.defineProperty(exports,"resolveHistoryStep",{enumerable:!0,get:function(){return o0}});Object.defineProperty(exports,"resolvePortalContainer",{enumerable:!0,get:function(){return fr}});Object.defineProperty(exports,"resolveRichTextFontFamily",{enumerable:!0,get:function(){return Jt}});Object.defineProperty(exports,"scalePointToPanel",{enumerable:!0,get:function(){return Je}});Object.defineProperty(exports,"stampAxisEditTarget",{enumerable:!0,get:function(){return Ot}});Object.defineProperty(exports,"stampGridEditTarget",{enumerable:!0,get:function(){return Er}});Object.defineProperty(exports,"stampLegendEditTarget",{enumerable:!0,get:function(){return Lt}});Object.defineProperty(exports,"toBorderRadiusCss",{enumerable:!0,get:function(){return Ge}});Object.defineProperty(exports,"toHtmlTextCss",{enumerable:!0,get:function(){return D}});Object.defineProperty(exports,"useDataLabelPlacementResolver",{enumerable:!0,get:function(){return yt}});Object.defineProperty(exports,"useDebouncedCallback",{enumerable:!0,get:function(){return Wo}});Object.defineProperty(exports,"useDifferenceArrowGeometries",{enumerable:!0,get:function(){return Aa}});Object.defineProperty(exports,"useEditorState",{enumerable:!0,get:function(){return ue}});Object.defineProperty(exports,"useEditorStore",{enumerable:!0,get:function(){return Yu}});Object.defineProperty(exports,"useElementScreenRect",{enumerable:!0,get:function(){return Uo}});Object.defineProperty(exports,"useGeomHitTest",{enumerable:!0,get:function(){return Ho}});Object.defineProperty(exports,"useGeomHover",{enumerable:!0,get:function(){return zo}});Object.defineProperty(exports,"useGeomReaderTree",{enumerable:!0,get:function(){return Pe}});Object.defineProperty(exports,"useGeomRendererResolver",{enumerable:!0,get:function(){return se}});Object.defineProperty(exports,"useGeomStyleReader",{enumerable:!0,get:function(){return F}});Object.defineProperty(exports,"useGraphCommands",{enumerable:!0,get:function(){return n0}});Object.defineProperty(exports,"useGraphContext",{enumerable:!0,get:function(){return G}});Object.defineProperty(exports,"useGraphHandle",{enumerable:!0,get:function(){return t0}});Object.defineProperty(exports,"useGraphLocale",{enumerable:!0,get:function(){return ha}});Object.defineProperty(exports,"useGraphMode",{enumerable:!0,get:function(){return We}});Object.defineProperty(exports,"useGraphSelection",{enumerable:!0,get:function(){return $a}});Object.defineProperty(exports,"useGuidesTakePress",{enumerable:!0,get:function(){return fe}});Object.defineProperty(exports,"useHandleScene",{enumerable:!0,get:function(){return r0}});Object.defineProperty(exports,"useHoverContext",{enumerable:!0,get:function(){return xe}});Object.defineProperty(exports,"useHoverState",{enumerable:!0,get:function(){return Ie}});Object.defineProperty(exports,"useI18n",{enumerable:!0,get:function(){return pr}});Object.defineProperty(exports,"useIsIntroWaitingForView",{enumerable:!0,get:function(){return je}});Object.defineProperty(exports,"useLatestRef",{enumerable:!0,get:function(){return ft}});Object.defineProperty(exports,"useMeasuredBoxRef",{enumerable:!0,get:function(){return ma}});Object.defineProperty(exports,"useMeasuredBoxes",{enumerable:!0,get:function(){return pa}});Object.defineProperty(exports,"usePaintDefs",{enumerable:!0,get:function(){return Y}});Object.defineProperty(exports,"useResolvedAnnotations",{enumerable:!0,get:function(){return Ve}});Object.defineProperty(exports,"useResolvedStyle",{enumerable:!0,get:function(){return I}});Object.defineProperty(exports,"useSceneSelector",{enumerable:!0,get:function(){return M}});Object.defineProperty(exports,"useStyleReaderTree",{enumerable:!0,get:function(){return B}});Object.defineProperty(exports,"useStyleResolver",{enumerable:!0,get:function(){return rr}});Object.defineProperty(exports,"useSvgPathMorph",{enumerable:!0,get:function(){return dt}});Object.defineProperty(exports,"useTextMeasurer",{enumerable:!0,get:function(){return he}});Object.defineProperty(exports,"useThemeContext",{enumerable:!0,get:function(){return Mt}});Object.defineProperty(exports,"vars",{enumerable:!0,get:function(){return b}});
|
|
1
|
+
require('./history-chords.css');var wi=Object.create,ct=Object.defineProperty,ji=Object.getOwnPropertyDescriptor,ki=Object.getOwnPropertyNames,Ei=Object.getPrototypeOf,Ri=Object.prototype.hasOwnProperty,Ci=(e,t)=>{let r={};for(var n in e)ct(r,n,{get:e[n],enumerable:!0});return t||ct(r,Symbol.toStringTag,{value:"Module"}),r},Ii=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(var o=ki(t),a=0,s=o.length,l;a<s;a++)l=o[a],!Ri.call(e,l)&&l!==r&&ct(e,l,{get:(c=>t[c]).bind(null,l),enumerable:!(n=ji(t,l))||n.enumerable});return e},In=(e,t,r)=>(r=e!=null?wi(Ei(e)):{},Ii(t||!e||!e.__esModule?ct(r,"default",{value:e,enumerable:!0}):r,e));let d=require("@graphysdk/viz-engine"),v=require("react"),i=require("react/jsx-runtime"),Oe=require("zustand"),R=require("motion/react"),Mi=require("d3-interpolate-path"),q=require("zustand/react/shallow"),xt=require("@vanilla-extract/dynamic"),er=require("zustand/vanilla"),Mn=require("react-dom"),U=require("clsx");U=In(U,1);let Ti=require("lodash-es"),Bi=require("react-intl"),Z=require("@floating-ui/react-dom"),Oi=require("color2k");typeof window<"u"&&(window.__GRAPHY_SDK__??={},window.__GRAPHY_SDK__.reactRenderer="1.9.0-beta.1791817361884");function Tn(e){for(const t of e)(t.severity==="error"?console.error:console.warn)(`[graphy] ${t.code}: ${t.message}`,t)}var Bn=(0,v.createContext)(null),Li=Bn.Provider,Fi=null,yt=()=>(0,v.useContext)(Bn)??(Fi??=(0,d.createDataLabelPlacementResolver)());var tr=(0,v.createContext)(null),G=()=>{const e=(0,v.useContext)(tr);if(!e)throw new Error("useGraph* hooks must be used inside a <GraphProvider>");return e},M=e=>{const{store:t}=G();return(0,Oe.useStore)(t,r=>e(r.scene))},Le=e=>e==="none"?"none":`${e.offsetX}px ${e.offsetY}px ${e.blur}px ${e.color}`,Ni=e=>e==="none"?"none":`${e.offsetX}px ${e.offsetY}px ${e.blur}px ${e.color}`,Se=e=>{if(e!=="none")return`drop-shadow(${e.offsetX}px ${e.offsetY}px ${e.blur}px ${e.color})`},bt=(0,v.createContext)(null),Gr=["shadow","blendMode","alpha","fillAlpha","fill"],Di=(e,t)=>(0,v.useMemo)(()=>{if(Object.keys(e.styles.parts).length>0)return;const r=e.data.getFirst();if(r===null)return;const n=t.get("shadow",r),o=Se(n);if(o===void 0)return;const a=new Map,s=(u,h)=>{switch(h){case"shadow":return Vi(t.get("shadow",u),n);case"blendMode":return t.get("blendMode",u)==="normal";case"alpha":return t.get("alpha",u)>=1;case"fillAlpha":return(t.get("fillAlpha",u)??1)>=1;case"fill":{const g=t.get("fill",u);if(g===void 0)return!0;const p=(0,d.paintKey)(g);let m=a.get(p);return m===void 0&&(m=(0,d.isOpaquePaint)(g),a.set(p,m)),m}}},l=Gi(e.styles),c=Gr.filter(u=>l.has(u)||Wi(e,u));if(!Gr.filter(u=>!c.includes(u)).some(u=>!s(r,u)))return c.length===0||e.data.findFirst(u=>c.some(h=>!s(u,h)))===null?o:void 0},[e,t]),Hi=(e,t)=>{const r=(0,v.useContext)(bt),n=r?.layerId===e.id&&r.paintsShadow;return(0,v.useMemo)(()=>n?Ui(t):t,[n,t])},Gi=e=>{const t=new Set;for(const r of[...e.defaults,...e.overrides])if(!(r.matches===void 0||r.state!==void 0||r.part!==void 0))for(const n of Object.keys(r.declarations))t.add(n);return t},Wi=(e,t)=>{const r=e.styles.observation.aesthetics[t];return r===void 0||!Object.hasOwn(d.VISUAL_VARIABLES,r)?!1:e.data.hasVariable(d.VISUAL_VARIABLES[r])},Vi=(e,t)=>e==="none"||t==="none"?e===t:e.offsetX===t.offsetX&&e.offsetY===t.offsetY&&e.blur===t.blur&&e.color===t.color,Ui=e=>{const{get:t,resolve:r}=e;return{...e,get:(a,s,l)=>a==="shadow"&&l===void 0?"none":t(a,s,l),resolve:(a,s)=>{const l=r(a,s);return s===void 0&&(l.shadow="none"),l}}},rr=()=>G().styleResolver,F=e=>Hi(e,Pe()(e)),B=()=>{const e=rr(),t=M(r=>r.chrome);return e.readers({chrome:t})},On=e=>{const t=Pe(),r=M(n=>n.layers).find(n=>n.id===e);return r===void 0?null:t(r)},Ln=e=>{const t=Pe(),r=M(n=>n.layers).find(n=>n.id===e.layerId);return r===void 0?void 0:(0,d.readGeomColor)({geom:t},r,e.observation)},zi=()=>{const e=Pe(),t=M(r=>r.layers);return(0,v.useMemo)(()=>r=>{const n=(0,d.readAnchoredObservation)(t,r);if(n!==null)return(0,d.readGeomColor)({geom:e},n.layer,n.observation)},[t,e])},Yi=e=>{const t=Pe(),r=M(n=>n.layers);return(0,v.useMemo)(()=>n=>{const o=(0,d.readAnchoredObservation)(r,n);if(o===null)return{};const a=(0,d.resolveSwatchGeomPaint)(t,o.layer,o.observation,{width:e,height:e});return{color:(0,d.readGeomColor)({geom:t},o.layer,o.observation),fill:a.fill,alpha:a.alpha,cornerRadius:a.cornerRadiusPx,symbol:a.symbol}},[r,t,e])},Pe=()=>{const e=rr();return M(t=>e.readers(t).geom)},Ki={centerX:0,centerY:0,radius:1},Fe=e=>{const t=Math.min(e.width,e.height);return{centerX:(e.width-t)/2+t/2,centerY:(e.height-t)/2+t/2,radius:t/2}},$e=e=>{const{radius:t}=Fe(e),r=t>0?1/t:1;return{x:r,y:r}},Q=(e,t,r=Ki)=>{const n=(0,d.polarToUnit)(e,t);return{x:r.centerX+n.x*r.radius,y:r.centerY-n.y*r.radius}},pe=(e,t)=>({x:(0,d.toViewBoxX)(e),y:(0,d.toViewBoxY)(t)}),$=(e,t)=>{const r=Q(e,t);return{x:(r.x+1)/2,y:(r.y+1)/2}},At=({symbol:e,cx:t,cy:r,size:n,fill:o,fillOpacity:a,opacity:s,stroke:l,strokeOpacity:c,strokeWidth:u,style:h,motion:g,"data-testid":p})=>{const m={fill:o,fillOpacity:a,stroke:l,strokeOpacity:c,strokeWidth:u,style:h},f=g?.fadesIn?{opacity:0}:{};if(e==="circle"){const S=n/2;return g?(0,i.jsx)(R.motion.circle,{initial:g.intro?{cx:t,cy:r,r:0,...f}:!1,transition:g.transition,animate:{cx:t,cy:r,r:S,opacity:s},"data-testid":p,...m}):(0,i.jsx)("circle",{cx:t,cy:r,r:S,opacity:s,"data-testid":p,...m})}const y=(0,d.buildPointSymbolPath)(e,n),x={...m,strokeLinejoin:"round",style:{transformBox:"view-box",...h}};return g?(0,i.jsx)(R.motion.path,{initial:g.intro?{x:t,y:r,d:y,scale:0,...f}:!1,transition:g.transition,animate:{x:t,y:r,d:y,scale:1,opacity:s},"data-testid":p,...x,style:{...x.style,originX:0,originY:0}}):(0,i.jsx)("path",{d:y,opacity:s,"data-testid":p,...x,style:{...x.style,transform:`translate(${t}, ${r})`}})},Xi=2,Qi=.7,me=({hit:e,project:t=pe})=>{const r=On(e.layerId),n=Ln(e)??d.DEFAULT_GEOM_COLOR;if(!e.anchored)return null;const o=((0,d.getAlpha)(e.observation)??1)*Qi,a=r?.get("size",e.observation)??d.DEFAULT_POINT_SIZE_PX,s=r?.get("stroke",e.observation,"hovered")??d.DEFAULT_HOVER_AFFORDANCE_COLOR,l=t(e.x,e.y);return(0,i.jsx)(At,{symbol:r?.get("symbol",e.observation)??"circle",cx:(0,d.toPercent)(l.x),cy:(0,d.toPercent)(l.y),size:a,fill:n,opacity:o,stroke:s,strokeWidth:Xi,"data-testid":"companion-point"})};var Wr=10**2,N=e=>Math.round(e*Wr)/Wr,qi=(e,t)=>{const r=N(t),n=N(2*t),o=`a${r},${r} 0 1,0 ${n},0a${r},${r} 0 1,0 ${-n},0Z`;return e.map(({x:a,y:s})=>`M${N(a-t)},${N(s)}${o}`).join("")},Ji=(e,t,r)=>{const n=r.axis==="x",o=n?e.y:e.x,a=n?e.x:e.y,s=n?e.height:e.width,l=n?e.width:e.height,c=Math.max(Math.min(r.from,r.to),a),u=Math.min(Math.max(r.from,r.to),a+l);if(u-c<=0||s<=0)return"";const h=Math.max(0,Math.min(t,s/2)),g=Math.max(0,Math.min(t,l/2)),p=a+g,m=a+l-g,f=o+s,y=n?0:1,x=(j,T)=>{const[O,V]=n?[T,j]:[j,T];return`${N(O)},${N(V)}`},[S,A]=(n?[g,h]:[h,g]).map(N),P=(j,T)=>`A${S},${A} 0 0 ${y} ${x(j,T)}`,w=j=>{if(h<=0||g<=0)return 0;const T=j<p?p-j:j>m?j-m:0,O=Math.min(1,T/g);return h*(1-Math.sqrt(1-O*O))},k=(j,T)=>h>0&&g>0&&(Math.max(j,T)<=p||Math.min(j,T)>=m),E=[c,...new Set([p,m].filter(j=>j>c&&j<u)),u],C=[`M${x(o+w(c),c)}`,`L${x(f-w(c),c)}`];for(let j=1;j<E.length;j++){const T=E[j-1]??c,O=E[j]??u;C.push(k(T,O)?P(f-w(O),O):`L${x(f,O)}`)}C.push(`L${x(o+w(u),u)}`);for(let j=E.length-1;j>0;j--){const T=E[j]??u,O=E[j-1]??c;C.push(k(T,O)?P(o+w(O),O):`L${x(o,O)}`)}return`${C.join("")}Z`},Fn=(e,t,r)=>{const n=e.digits?.()??null,o=n===null?null:10**n,a=c=>o===null?c:Math.round(c*o)/o,s=(c,u)=>Dn(a(c),a(u),r);let l="";return e.context({moveTo:(c,u)=>{l+=`M${s(c,u)}`},lineTo:(c,u)=>{l+=`L${s(c,u)}`},bezierCurveTo:(c,u,h,g,p,m)=>{l+=`C${s(c,u)},${s(h,g)},${s(p,m)}`},closePath:()=>{l+="Z"}}),e(t),e.context(null),l},Yt=(e,t)=>{let r="";for(let n=0;n<e.length;n++){const o=e[n];o!==void 0&&(r+=`${n===0?"M":"L"}${Dn(o.x,o.y,t)}`)}return r===""?"":`${r}Z`},Je=(e,t)=>({x:e.x*t.width,y:e.y*t.height}),Nn=e=>{const t=new Map;for(const{center:r,size:n}of e){const o=t.get(n)??[];o.push(r),t.set(n,o)}return[...t].map(([r,n])=>({kind:"dots",centers:n,size:r}))},Dn=(e,t,{origin:r,scaleX:n,scaleY:o})=>`${N(r.x+e*n)},${N(r.y+t*o)}`,Zi=({layer:e,coordSystem:t,panelRect:r,shouldAnimateTransitions:n})=>{const{areaGenerator:o}=(0,d.createAreaPathGenerators)(t,e.params),a={origin:{x:0,y:0},scaleX:r.width,scaleY:r.height};let s="";const l=[];e.data.groupBy(d.GROUP_VARIABLES.group).forEach(u=>{const h=(0,d.prepareAreaObservations)([...u],e.params.missingValues),[g]=h;if(g!==void 0){if(h.length===1){const p=_i(g,t,r);p!==null&&l.push(p);return}s+=Fn(o,h,a)}});const c=s===""?[]:[{kind:"region",pathData:s,shouldAnimateTransitions:n}];return l.length>0&&c.push({kind:"dots",centers:l,size:d.DEFAULT_POINT_SIZE_PX}),c},_i=(e,t,r)=>{if(t.mainAxis==="y"){const a=(0,d.getY)(e),s=(0,d.getXMax)(e)??(0,d.getX)(e);return a===null||s===null?null:Je(pe(s,a),r)}const n=(0,d.getX)(e),o=(0,d.getYMax)(e)??(0,d.getY)(e);return n===null||o===null?null:Je(pe(n,o),r)},Hn=e=>{const t=[...e.brightness===void 0?[]:[`brightness(${e.brightness})`],...e.contrast===void 0?[]:[`contrast(${e.contrast})`],...e.saturation===void 0?[]:[`saturate(${e.saturation})`],...e.blur===void 0?[]:[`blur(${e.blur}px)`],...e.shadow===void 0?[]:[Se(e.shadow)??""]].filter(r=>r!=="");return t.length===0?void 0:t.join(" ")},W=e=>{const t=Hn(e),r=e.blendMode==="normal"?void 0:e.blendMode;if(!(t===void 0&&r===void 0))return{...t===void 0?{}:{filter:t},...r===void 0?{}:{mixBlendMode:r}}},te="_1d8mpa10",ee={type:"spring",stiffness:500,damping:60,mass:1},$i={duration:0},nr=e=>e?ee:$i,dt=(e,t,r)=>{const n=(0,R.useMotionValue)(e),o=(0,v.useRef)(r);return(0,v.useEffect)(()=>{const a=r!==void 0&&r===o.current;if(o.current=r,n.get()===e)return;if(a){n.set(e);return}const s=(0,Mi.interpolatePath)(n.get(),e),l=(0,R.animate)(0,1,{...t,onUpdate:c=>n.set(s(c))});return()=>l.stop()},[t,e,r,n]),n},Gn=({shouldAnimateTransitions:e,...t})=>e?(0,i.jsx)(ts,{...t}):(0,i.jsx)(es,{...t}),es=({fillPath:e,linePath:t,fill:r,fillOpacity:n,stroke:o,strokeWidth:a,strokeOpacity:s,strokeDasharray:l,lineCap:c,lineJoin:u,opacity:h})=>(0,i.jsxs)("g",{opacity:h,children:[(0,i.jsx)("path",{d:e,fill:r,fillOpacity:n,stroke:"none"}),(0,i.jsx)("path",{d:t,fill:"none",stroke:o,strokeWidth:a,strokeOpacity:s,strokeDasharray:l,strokeLinecap:c,strokeLinejoin:u,vectorEffect:"non-scaling-stroke"})]}),ts=({fillPath:e,linePath:t,fill:r,fillOpacity:n,stroke:o,strokeWidth:a,strokeOpacity:s,strokeDasharray:l,lineCap:c,lineJoin:u,opacity:h})=>{const g=dt(e,ee),p=dt(t,ee);return(0,i.jsxs)("g",{opacity:h,children:[(0,i.jsx)(R.motion.path,{d:g,fill:r,fillOpacity:n,stroke:"none"}),(0,i.jsx)(R.motion.path,{d:p,fill:"none",stroke:o,strokeWidth:a,strokeOpacity:s,strokeDasharray:l,strokeLinecap:c,strokeLinejoin:u,vectorEffect:"non-scaling-stroke"})]})},or=(e,t)=>{const r=(t!==void 0?e.delayByKey[t]:void 0)??0;return{duration:e.durationSeconds,ease:e.growAxis==="angle"?"circOut":"backOut",delay:r}},rs=e=>({duration:e.durationSeconds,ease:"easeOut"}),Wn=e=>({duration:e.durationSeconds,ease:"easeOut"}),ns=e=>os(e)+e.durationSeconds,os=e=>{switch(e.type){case"grow":return Object.values(e.delayByKey).reduce((t,r)=>Math.max(t,r),0);case"wipe":case"fade":return 0}},Vr=110,Ur=150,ar=({intro:e,children:t})=>{const r=(0,v.useId)();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("clipPath",{id:r,children:(0,i.jsx)(R.motion.rect,{...as(e.axis),transition:rs(e)})}),(0,i.jsx)("g",{clipPath:`url(#${r})`,children:t})]})},as=e=>e==="x"?{x:"-5%",y:"-25%",height:`${Ur}%`,initial:{width:"0%"},animate:{width:`${Vr}%`}}:{x:"-25%",y:"-5%",width:`${Ur}%`,initial:{height:"0%"},animate:{height:`${Vr}%`}},ie=({effects:e,...t})=>(0,i.jsx)("g",{style:e,children:(0,i.jsx)("svg",{...t})}),is=(0,v.memo)(function({layer:t,coordSystem:r,shouldAnimateTransitions:n,intro:o}){const a=o?.type==="wipe"?o:null,{lineGenerator:s,areaGenerator:l}=(0,v.useMemo)(()=>(0,d.createAreaPathGenerators)(r,t.params),[t.params,r]),c=F(t),u=(0,v.useMemo)(()=>{const h=(0,d.createStableKeyGenerator)(t.data,t.mapping,t.id),g=[];return t.data.groupBy(d.GROUP_VARIABLES.group).forEach(p=>{const m=(0,d.prepareAreaObservations)([...p],t.params.missingValues),f=l(m),y=s(m);if(!f||!y)return;const x=m[0];if(!x)return;const S=(0,d.toPaintColor)(c.get("fill",x)),A=c.get("stroke",x)??S,P=c.get("strokeWidth",x),w=(0,d.toStrokeDasharray)(c.get("dashArray",x),c.get("strokeWidth",x)),k=c.get("lineCap",x),E=c.get("lineJoin",x);g.push({key:h(x),areaPath:f,linePath:y,fill:S,stroke:A,fillOpacity:c.get("fillAlpha",x)*c.get("alpha",x),strokeWidth:P,strokeOpacity:c.get("strokeAlpha",x)*c.get("alpha",x),strokeDasharray:w,lineCap:k,lineJoin:E})}),g},[l,s,t.data,t.id,t.mapping,t.params,c]).map(h=>(0,i.jsx)(ss,{areaPath:h.areaPath,linePath:h.linePath,fill:h.fill,stroke:h.stroke,fillOpacity:h.fillOpacity,strokeWidth:h.strokeWidth,strokeOpacity:h.strokeOpacity,strokeDasharray:h.strokeDasharray,lineCap:h.lineCap,lineJoin:h.lineJoin,shouldAnimateTransitions:n},h.key));return(0,i.jsx)(ie,{viewBox:"0 0 1 1",preserveAspectRatio:"none",width:"100%",height:"100%","data-geom":"area",effects:W((0,d.readGeomEffects)(c,t.data.getFirst()??void 0)),className:te,children:a?(0,i.jsx)(ar,{intro:a,children:u}):u})}),ss=({areaPath:e,linePath:t,fill:r,stroke:n,fillOpacity:o,strokeWidth:a,strokeOpacity:s,strokeDasharray:l,lineCap:c,lineJoin:u,shouldAnimateTransitions:h})=>(0,i.jsx)(Gn,{fillPath:e,linePath:t,fill:r,fillOpacity:o,stroke:n,strokeWidth:a,strokeOpacity:s,strokeDasharray:l,lineCap:c,lineJoin:u,shouldAnimateTransitions:h}),Vn=1,ls=.4,cs=.2,ds=1,us=.5,hs=2.25,Ne=({hit:e,project:t=pe,...r})=>{const n=On(e.layerId),o=Ln(e)??d.DEFAULT_GEOM_COLOR;if(!e.anchored)return null;const a=(0,d.getAlpha)(e.observation)??1,s=n?.get("stroke",e.observation,"hovered")??d.DEFAULT_HOVER_AFFORDANCE_COLOR,l=n?.get("symbol",e.observation)??"circle",c=t(e.x,e.y),u=(0,d.toPercent)(c.x),h=(0,d.toPercent)(c.y),g=gs(e.observation,n),{ringRadius:p,ringWidth:m}=fs(g,(0,d.getPointSymbolOuterRadius)(l,g*2)),f=n?W((0,d.readGeomEffects)(n,e.observation,"hovered")):void 0;return(0,i.jsxs)("g",{...r,style:f,children:[(0,i.jsx)("circle",{cx:u,cy:h,r:p,fill:"none",stroke:s,strokeWidth:m}),(0,i.jsx)(At,{symbol:l,cx:u,cy:h,size:g*2,fill:o,opacity:a,stroke:s,strokeWidth:Vn})]})},gs=(e,t)=>{const r=t?.get("size",e),n=(0,d.getSize)(e)??null;return n!==null?(r??n)/hs:(r??12)/2},fs=(e,t)=>{const r=Math.max(ds,e*ls),n=Math.max(us,e*cs);return{ringRadius:t+Vn/2+n+r/2,ringWidth:r}},vs=({layer:e,coordSystem:t,primary:r,companions:n})=>{const o=F(e),a=(0,d.getGroup)(r.observation),s=(0,v.useMemo)(()=>(0,d.prepareAreaObservations)([...e.data.filter(d.GROUP_VARIABLES.group,"eq",a)],e.params.missingValues),[e.data,e.params.missingValues,a]),{areaPath:l,linePath:c}=(0,v.useMemo)(()=>{const{lineGenerator:A,areaGenerator:P}=(0,d.createAreaPathGenerators)(t,e.params);return{areaPath:P(s)??"",linePath:A(s)??""}},[t,e.params,s]);if(!l||!c)return null;const u=(0,d.toPaintColor)(o.get("fill",r.observation,"hovered")),h=o.get("stroke",r.observation,"hovered")??u,g=o.get("alpha",r.observation,"hovered"),p=o.get("fillAlpha",r.observation,"hovered")*g,m=o.get("strokeAlpha",r.observation,"hovered")*g,f=o.get("strokeWidth",r.observation,"hovered"),y=(0,d.toStrokeDasharray)(o.get("dashArray",r.observation,"hovered"),f),x=o.get("lineCap",r.observation,"hovered"),S=o.get("lineJoin",r.observation,"hovered");return(0,i.jsxs)("g",{"data-testid":"hovered-area",children:[(0,i.jsxs)(ie,{viewBox:"0 0 1 1",preserveAspectRatio:"none",width:"100%",height:"100%","data-geom":"area",effects:W((0,d.readGeomEffects)(o,r.observation,"hovered")),className:te,children:[(0,i.jsx)("path",{d:l,fill:u,fillOpacity:p,stroke:"none","data-testid":"hovered-area-fill"}),(0,i.jsx)("path",{d:c,fill:"none",stroke:h,strokeWidth:f,strokeOpacity:m,strokeDasharray:y,strokeLinecap:x,strokeLinejoin:S,vectorEffect:"non-scaling-stroke","data-testid":"hovered-area-edge"})]}),n.map(A=>(0,i.jsx)(me,{hit:A},`companion-${A.layerId}-${A.pointIndex}`)),(0,i.jsx)(Ne,{hit:r,"data-testid":"hovered-area-point"})]})},ps={geom:"area",coord:"cartesian",swatchShape:"area",guideMode:"crosshair",render:({layer:e,coordSystem:t,shouldAnimateTransitions:r,intro:n})=>(0,i.jsx)(is,{layer:e,coordSystem:t,shouldAnimateTransitions:r,intro:n}),renderHover:({layer:e,coordSystem:t,primary:r,group:n,related:o})=>(0,i.jsx)(vs,{layer:e,coordSystem:t,primary:r,companions:[...n,...o]}),renderHoverCompanions:({related:e})=>(0,i.jsx)(i.Fragment,{children:e.map(t=>(0,i.jsx)(me,{hit:t},`companion-${t.layerId}-${t.pointIndex}`))}),getEditOutlineShapes:Zi,getOverlayAnchor:({observation:e,coordSystem:t})=>{if(t.mainAxis==="x"){const o=(0,d.getX)(e),a=(0,d.getYMax)(e)??(0,d.getY)(e);return o===null||a===null?null:{x:o,y:a}}const r=(0,d.getY)(e),n=(0,d.getXMax)(e)??(0,d.getX)(e);return r===null||n===null?null:{x:n,y:r}}},Un=e=>{const t=new WeakMap;return(r,...n)=>{const o=t.get(r);if(o!==void 0&&o.args.every((s,l)=>s===n[l]))return o.result;const a=e(r,...n);return t.set(r,{args:n,result:a}),a}},St=(e,t)=>({stroke:e.get("stroke",t),strokeWidth:e.get("strokeWidth",t),cornerRadius:e.get("cornerRadius",t),strokeAlpha:e.get("strokeAlpha",t)}),et=(e,t)=>(0,v.useMemo)(()=>{const r=Array.from(e.data,o=>t.get("fill",o));return{paints:r,paintAt:o=>{const a=r[o];if(a===void 0)throw new Error(`No resolved fill for observation ${o}.`);return a}}},[e.data,t]);var zr="\0",zn=(e,t)=>{const r=e.size??32;return{width:r,height:t==null?r:r*t.height/t.width}},ms=e=>new Promise(t=>{if(typeof Image>"u"){t(null);return}const r=new Image;r.onload=()=>{const{naturalWidth:n,naturalHeight:o}=r;t(n>0&&o>0?{width:n,height:o}:null)},r.onerror=()=>t(null),r.src=e}),De=e=>{const t=[...new Set(e.map(Yr).filter(s=>s!==void 0))].join(zr),[r,n]=(0,v.useState)(()=>new Map),o=(0,v.useRef)(new Set),a=(0,v.useRef)(new Set);return(0,v.useEffect)(()=>()=>{o.current=new Set},[]),(0,v.useEffect)(()=>{const s=new Set(t===""?[]:t.split(zr));o.current=s;for(const l of a.current)s.has(l)||a.current.delete(l);n(l=>{const c=new Map([...l].filter(([u])=>s.has(u)));return c.size===l.size?l:c});for(const l of s)r.has(l)||a.current.has(l)||(a.current.add(l),ms(l).then(c=>{o.current.has(l)&&(a.current.delete(l),n(u=>new Map(u).set(l,c)))}))},[t,r]),(0,v.useCallback)(s=>{const l=Yr(s);return l===void 0?void 0:r.get(l)},[r])},Yr=e=>e!==void 0&&(0,d.isImagePaint)(e)&&(e.fit??"tile")==="tile"?e.image:void 0;var xs=1/3,ys={x:1,y:1},bs={x:0,y:0},Y=({paints:e,unitsPerPixel:t=ys,origin:r=bs})=>{const n=(0,v.useId)(),o=(0,v.useMemo)(()=>{const a=new Map,s=new Set;for(const l of e){if(typeof l=="string")continue;const c=(0,d.paintKey)(l);if(a.has(c))continue;const u=`${n}paint-${As(c)}`;let h=u,g=1;for(;s.has(h);)h=`${u}-${g++}`;s.add(h),a.set(c,{id:h,paint:l})}return a},[e,n]);return{fillFor:(0,v.useCallback)(a=>{if(typeof a=="string")return a;const s=o.get((0,d.paintKey)(a));if(s===void 0)throw new Error("fillFor requires a paint supplied to usePaintDefs.");return`url(#${s.id})`},[o]),defs:(0,i.jsx)(Ss,{entries:[...o.values()],unitsPerPixel:t,origin:r})}},As=e=>{let t=2166136261;for(let r=0;r<e.length;r++)t^=e.charCodeAt(r),t=Math.imul(t,16777619);return(t>>>0).toString(36)},Ss=({entries:e,unitsPerPixel:t,origin:r})=>{const n=De(e.map(({paint:o})=>o));return e.length===0?null:(0,i.jsx)("defs",{children:e.map(({id:o,paint:a})=>(0,i.jsx)(Ps,{id:o,paint:a,unitsPerPixel:t,origin:r,imageSize:n(a)},o))})},Ps=({id:e,paint:t,unitsPerPixel:r,origin:n,imageSize:o})=>(0,d.isGradientPaint)(t)?(0,i.jsx)(js,{id:e,paint:t}):(0,d.isPatternPaint)(t)?(0,i.jsx)(ks,{id:e,paint:t,unitsPerPixel:r,origin:n}):(0,i.jsx)(Es,{id:e,paint:t,unitsPerPixel:r,origin:n,imageSize:o}),Yn=e=>({x:(0,d.toPercent)(e.x),y:(0,d.toPercent)(e.y)}),ws=e=>{const t=(e-90)*Math.PI/180,r=Math.cos(t)/2,n=Math.sin(t)/2;return{x1:.5-r,y1:.5-n,x2:.5+r,y2:.5+n}},js=({id:e,paint:t})=>{const r=t.stops.map((n,o)=>(0,i.jsx)("stop",{offset:n.offset,stopColor:n.color},o));return t.gradient==="radial"?(0,i.jsx)("radialGradient",{id:e,gradientUnits:"objectBoundingBox",children:r}):(0,i.jsx)("linearGradient",{id:e,gradientUnits:"objectBoundingBox",...ws(t.angle??180),children:r})},ks=({id:e,paint:t,unitsPerPixel:r,origin:n})=>{const o=t.size??8,a=o/2;return(0,i.jsxs)("pattern",{id:e,...Yn(n),patternUnits:"userSpaceOnUse",width:o*r.x,height:o*r.y,viewBox:`0 0 ${o} ${o}`,preserveAspectRatio:"none",children:[t.background!==void 0&&(0,i.jsx)("rect",{width:o,height:o,fill:t.background}),t.pattern==="dots"&&(0,i.jsx)("circle",{cx:a,cy:a,r:o/6,fill:t.color}),t.pattern==="lines"&&(0,i.jsx)("rect",{width:o,height:o*.3333333333333333,fill:t.color}),(t.pattern==="diagonal"||t.pattern==="crosshatch")&&(0,i.jsx)("path",{d:`M0 ${o} L${o} 0`,stroke:t.color,strokeWidth:o/6,fill:"none"}),t.pattern==="crosshatch"&&(0,i.jsx)("path",{d:`M0 0 L${o} ${o}`,stroke:t.color,strokeWidth:o/6,fill:"none"})]})},Es=({id:e,paint:t,unitsPerPixel:r,origin:n,imageSize:o})=>{if((t.fit??"tile")==="stretch")return(0,i.jsxs)("pattern",{id:e,patternUnits:"objectBoundingBox",patternContentUnits:"objectBoundingBox",width:1,height:1,children:[(0,i.jsx)("rect",{width:1,height:1,fill:t.fallback}),(0,i.jsx)("image",{href:t.image,width:1,height:1,opacity:t.alpha,preserveAspectRatio:"none"})]});const a=zn(t,o);return(0,i.jsxs)("pattern",{id:e,...Yn(n),patternUnits:"userSpaceOnUse",width:a.width*r.x,height:a.height*r.y,viewBox:`0 0 ${a.width} ${a.height}`,preserveAspectRatio:"none",children:[(0,i.jsx)("rect",{width:a.width,height:a.height,fill:t.fallback}),(0,i.jsx)("image",{href:t.image,width:a.width,height:a.height,opacity:t.alpha,preserveAspectRatio:"none"})]})},Kn=(e,t,r,n)=>{const o=new Map;let a=-1;for(const l of e.data){a+=1;const c=(0,d.getBarRectBounds)(t,l);if(!c)continue;const u=(0,d.buildColumnKey)(t,c),h=n(l,c,a),g=o.get(u);g===void 0?o.set(u,{firstObservation:l,segments:[h]}):g.segments.push(h)}const s=new Map;for(const[l,{firstObservation:c,segments:u}]of o)s.set(l,{style:St(r,c),bounds:(0,d.getBoundingRect)(u),segments:u});return s},ir=(e,t,r)=>{const n=new Map;for(const[o,{style:a,bounds:s}]of Kn(e,t,r,Is))n.set(o,{style:a,bounds:s});return n},Xn=(e,t,r,n)=>{const o=(0,d.getBarRectBounds)(t,n);return o?e.get((0,d.buildColumnKey)(t,o))??{style:St(r,n),bounds:o}:null},Ae=(e,t)=>({x:e.x*t.width,y:e.y*t.height,width:e.width*t.width,height:e.height*t.height}),Kt=(e,t)=>({x:e.x-t,y:e.y-t,width:Math.max(0,e.width+t*2),height:Math.max(0,e.height+t*2)}),de=(e,t)=>{const r=N(e.x),n=N(e.y),o=N(e.x+e.width),a=N(e.y+e.height),s=N(Math.max(0,Math.min(t,e.width/2))),l=N(Math.max(0,Math.min(t,e.height/2)));if(s<=0||l<=0)return`M${r},${n}H${o}V${a}H${r}Z`;const c=`A${s},${l} 0 0 1 `,[u,h,g,p]=[`${r}`,`${n}`,`${o}`,`${a}`],m=`${N(r+s)}`,f=`${N(o-s)}`,y=`${N(n+l)}`,x=`${N(a-l)}`;return`M${m},${h}H${f}${c}${g},${y}V${x}${c}${f},${p}H${m}${c}${u},${x}V${y}${c}${m},${h}Z`},Rs=({observation:e,mainAxis:t,styleReaders:r,column:n,panelRect:o,fill:a})=>{const s=(0,v.useId)(),l=(0,v.useId)(),c=(0,d.getBarRectBounds)(t,e);if(!c)return null;const u=Ae(c,o),h=Ae(n.bounds,o),{stroke:g,strokeWidth:p,cornerRadius:m,strokeAlpha:f}=n.style,y=(0,d.resolveBarCornerRadiusPx)({cornerRadius:m,mainAxis:t,bounds:h}),x=de(u,0),S=de(h,y),A=r.get("alpha",e)*r.get("fillAlpha",e),P=(0,d.resolveBarBorderTreatment)(p);return(0,i.jsxs)("g",{clipPath:`url(#${s})`,children:[(0,i.jsx)("clipPath",{id:s,children:(0,i.jsx)("path",{d:x})}),(0,i.jsx)("clipPath",{id:l,children:(0,i.jsx)("path",{d:S})}),(0,i.jsxs)("g",{clipPath:`url(#${l})`,children:[(0,i.jsx)("path",{d:x,fill:a,opacity:A,"data-testid":"highlight-bar-segment"}),g!==void 0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("path",{d:x,fill:"none",stroke:g,strokeWidth:P.separatorWidth,opacity:A,"data-testid":"highlight-bar-segment-border"}),(0,i.jsx)("path",{d:S,fill:"none",stroke:g,strokeWidth:P.outlineWidth,opacity:f})]})]})]})},Cs=({layer:e,sourceLayer:t,coordSystem:r,panelRect:n})=>{const o=F(t),a=(0,v.useMemo)(()=>ir(t,r.mainAxis,o),[t,r.mainAxis,o]),{paints:s,paintAt:l}=et(e,o),{fillFor:c,defs:u}=Y({paints:s,origin:sr(t,r)}),h=(0,d.createStableKeyGenerator)(e.data,e.mapping,e.id),g=[];let p=-1;for(const m of e.data){p+=1;const f=Xn(a,r.mainAxis,o,m);f!==null&&g.push((0,i.jsx)(Rs,{observation:m,mainAxis:r.mainAxis,styleReaders:o,column:f,panelRect:n,fill:c(l(p))},h(m)))}return(0,i.jsxs)(i.Fragment,{children:[u,g]})},sr=(e,t)=>{const r=M(n=>n.scales);return(0,v.useMemo)(()=>(0,d.resolveBarPaintOrigin)(e,t,r),[e,t,r])},Is=(e,t)=>t,Ms=Un(ir),Ts=({layer:e,sourceLayer:t,coordSystem:r,panelRect:n,styleReaders:o,shouldAnimateTransitions:a})=>{const{mainAxis:s}=r,l=Ms(t,s,o),c=Bs(e.data);let u="";for(let h=0;h<e.data.size();h++){const g=(0,d.buildBarRectBounds)(s,{xMin:c.xMin[h]??null,xMax:c.xMax[h]??null,yMin:c.yMin[h]??null,yMax:c.yMax?.[h]??null,y:c.y?.[h]??null});if(g===null)continue;const p=l.get((0,d.buildColumnKey)(s,g));if(p===void 0)continue;const m=Ae(p.bounds,n),f=Ae(g,n),y=(0,d.resolveBarCornerRadiusPx)({cornerRadius:p.style.cornerRadius,mainAxis:s,bounds:m});u+=Os(f,m)?de(m,y):Ji(m,y,s==="x"?{axis:"y",from:f.y,to:f.y+f.height}:{axis:"x",from:f.x,to:f.x+f.width})}return u===""?[]:[{kind:"region",pathData:u,shouldAnimateTransitions:a}]},Bs=e=>{const t=r=>e.hasVariable(r)?e.getValues(r,{type:"numeric"}):null;return{xMin:e.getValues(d.POSITION_VARIABLES.xMin,{type:"numeric"}),xMax:e.getValues(d.POSITION_VARIABLES.xMax,{type:"numeric"}),yMin:e.getValues(d.POSITION_VARIABLES.yMin,{type:"numeric"}),yMax:t(d.POSITION_VARIABLES.yMax),y:t(d.POSITION_VARIABLES.y)}},Os=(e,t)=>Math.abs(e.x-t.x)<.5&&Math.abs(e.y-t.y)<.5&&Math.abs(e.width-t.width)<.5&&Math.abs(e.height-t.height)<.5,Xt=(e,t,r)=>{const n=r===void 0?e.activeIntro:r,o=(0,v.useRef)(n?or(n,t):null),a=(0,v.useRef)(e.shouldAnimateTransitions);return a.current=e.shouldAnimateTransitions,(0,v.useCallback)(()=>{const s=o.current;return o.current=null,s??nr(a.current)},[])},Pt=(e,t)=>{const r=(0,v.useRef)(!0);(0,v.useEffect)(()=>{r.current=!1},[]);const n=r.current;return(0,v.useMemo)(()=>({isAnimated:t||e!==null,isLayerEntrance:n,activeIntro:n?e:null,shouldAnimateTransitions:t}),[e,t,n])},Qn=(e,t)=>t.growAxis==="x"?{x:t.baseline,y:e.y,width:0,height:e.height}:{x:e.x,y:t.baseline,width:e.width,height:0},Ls=(0,v.memo)(function({layer:t,coordSystem:r,shouldAnimateTransitions:n,intro:o}){const a=(0,v.useId)(),s=F(t),l=Pt(o?.type==="grow"&&(o.growAxis==="x"||o.growAxis==="y")?o:null,n),{paints:c,paintAt:u}=et(t,s),{fillFor:h,defs:g}=Y({paints:c,origin:sr(t,r)});return(0,i.jsxs)(i.Fragment,{children:[g,(0,v.useMemo)(()=>{const p=(0,d.createStableKeyGenerator)(t.data,t.mapping,t.id);return[...Kn(t,r.mainAxis,s,(m,f,y)=>({key:p(m),...f,fill:h(u(y)),opacity:s.get("alpha",m)*s.get("fillAlpha",m),effects:W((0,d.readGeomEffects)(s,m))})).values()].map(({segments:m,style:f,bounds:y},x)=>{const S=f.stroke===void 0?void 0:(0,d.resolveBarBorderTreatment)(f.strokeWidth);return{key:m[0]?.key??String(x),id:`${a}${x}`,bars:m,effects:Hs(m),...y,radii:Ws({cornerRadius:f.cornerRadius,mainAxis:r.mainAxis,bounds:y}),stroke:f.stroke,outlineOpacity:f.strokeAlpha,clippedStrokeWidth:S?.outlineWidth,separatorStrokeWidth:S?.separatorWidth}})},[a,r.mainAxis,h,t,u,s]).map(p=>{const m=p.effects.scope==="column"?p.effects.style:void 0;if(p.bars.length===1&&p.stroke===void 0){const[f]=p.bars;if(!f)return null;const{key:y,effects:x,...S}=f,A=(0,i.jsx)(lr,{...S,...p.radii,animation:l,introKey:y},y);return m===void 0?A:(0,i.jsx)("g",{style:m,children:A},y)}return(0,i.jsx)("g",{style:m,children:l.isAnimated?(0,i.jsx)(Ns,{column:p,animation:l}):(0,i.jsx)(Fs,{column:p,animation:l})},p.key)})]})}),Fs=({column:e,animation:t})=>{const{id:r,bars:n,radii:o,stroke:a,outlineOpacity:s,clippedStrokeWidth:l}=e,c=a!==void 0,u=(0,i.jsx)("clipPath",{id:r,children:(0,i.jsx)(Kr,{bounds:e,radii:o})});if(n.length===1){const[h]=n;if(!h)return null;const{key:g,effects:p,...m}=h;return(0,i.jsxs)(i.Fragment,{children:[u,(0,i.jsx)("g",{clipPath:`url(#${r})`,children:(0,i.jsx)(lr,{...m,...o,stroke:a,strokeWidth:l,animation:t},g)})]})}return(0,i.jsxs)(i.Fragment,{children:[u,qn(e,t,c&&(0,i.jsx)(Kr,{bounds:e,radii:o,fill:"none",stroke:a,strokeWidth:l,opacity:s}))]})},Ns=({column:e,animation:t})=>{const{id:r,bars:n,radii:o,stroke:a,outlineOpacity:s,clippedStrokeWidth:l}=e,c=a!==void 0,u=Gs(e,t,n[0]?.key),h={x:u.x,y:u.y,width:u.width,height:u.height,rx:o.rx,ry:o.ry},g=(0,i.jsx)("clipPath",{id:r,children:(0,i.jsx)(R.motion.rect,{...h})});if(n.length===1){const[p]=n;return(0,i.jsxs)(i.Fragment,{children:[g,(0,i.jsx)("g",{clipPath:`url(#${r})`,children:(0,i.jsx)(R.motion.rect,{...h,fill:p?.fill,opacity:p?.opacity,stroke:a,strokeWidth:l})})]})}return(0,i.jsxs)(i.Fragment,{children:[g,qn(e,t,c&&(0,i.jsx)(R.motion.rect,{...h,fill:"none",stroke:a,strokeWidth:l,opacity:s}))]})},qn=(e,t,r)=>{const{id:n,bars:o,stroke:a,separatorStrokeWidth:s,effects:l}=e,c=`url(#${n})`;return(0,i.jsxs)(i.Fragment,{children:[o.map(({key:u,effects:h,...g})=>(0,i.jsx)("g",{style:l.scope==="bar"?h:void 0,children:(0,i.jsx)("g",{clipPath:c,children:(0,i.jsx)(lr,{...g,stroke:a,strokeWidth:s,animation:t,introKey:u})})},u)),r&&(0,i.jsx)("g",{clipPath:c,children:r})]})},Ds=(e,t)=>e===t||e!==void 0&&t!==void 0&&e.filter===t.filter&&e.mixBlendMode===t.mixBlendMode,Hs=e=>{const[t,...r]=e,n=t?.effects;return r.every(o=>Ds(o.effects,n))?{scope:"column",style:n}:{scope:"bar"}},lr=({animation:e,introKey:t,rx:r,ry:n,stroke:o,strokeWidth:a,...s})=>{const{isAnimated:l,activeIntro:c,shouldAnimateTransitions:u}=e;if(l){const h=c?Qn(s,c):null;return(0,i.jsx)(R.motion.rect,{initial:h?{attrX:(0,d.toPercent)(h.x),attrY:(0,d.toPercent)(h.y),width:(0,d.toPercent)(h.width),height:(0,d.toPercent)(h.height),opacity:s.opacity}:!1,transition:c?or(c,t):nr(u),fill:s.fill,opacity:s.opacity,rx:r,ry:n,stroke:o,strokeWidth:a,animate:{attrX:(0,d.toPercent)(s.x),attrY:(0,d.toPercent)(s.y),width:(0,d.toPercent)(s.width),height:(0,d.toPercent)(s.height),opacity:s.opacity}})}return(0,i.jsx)("rect",{x:(0,d.toPercent)(s.x),y:(0,d.toPercent)(s.y),width:(0,d.toPercent)(s.width),height:(0,d.toPercent)(s.height),fill:s.fill,opacity:s.opacity,rx:r,ry:n,stroke:o,strokeWidth:a})},Kr=({bounds:e,radii:t,fill:r,stroke:n,strokeWidth:o,opacity:a})=>(0,i.jsx)("rect",{x:(0,d.toPercent)(e.x),y:(0,d.toPercent)(e.y),width:(0,d.toPercent)(e.width),height:(0,d.toPercent)(e.height),rx:t.rx,ry:t.ry,fill:r,stroke:n,strokeWidth:o,opacity:a}),Gs=(e,t,r)=>{const n=t.activeIntro?Qn(e,t.activeIntro):e,o=(0,R.useMotionValue)(n.x),a=(0,R.useMotionValue)(n.y),s=(0,R.useMotionValue)(n.width),l=(0,R.useMotionValue)(n.height),c=Xt(t,r);return(0,v.useEffect)(()=>{const u=c(),h=[(0,R.animate)(o,e.x,u),(0,R.animate)(a,e.y,u),(0,R.animate)(s,e.width,u),(0,R.animate)(l,e.height,u)];return()=>{for(const g of h)g.stop()}},[o,a,s,l,e.x,e.y,e.width,e.height,c]),{x:(0,R.useTransform)(o,d.toPercent),y:(0,R.useTransform)(a,d.toPercent),width:(0,R.useTransform)(s,d.toPercent),height:(0,R.useTransform)(l,d.toPercent)}};function Ws(e){const t=(0,d.resolveBarCornerRadiiPx)(e);if(e.cornerRadius!=="full")return t;const r={};return t.rx!==void 0&&(r.rx=(0,d.toPercent)(t.rx)),t.ry!==void 0&&(r.ry=(0,d.toPercent)(t.ry)),r}var Ht=3,Vs=({layer:e,coordSystem:t,primary:r,panelRect:n})=>{const o=F(e),a=(0,v.useId)(),s=(0,v.useId)(),l=(0,v.useId)(),c=(0,v.useMemo)(()=>ir(e,t.mainAxis,o),[e,t.mainAxis,o]),u=o.get("fill",r.observation,"hovered"),{fillFor:h,defs:g}=Y({paints:[u],origin:sr(e,t)}),p=(0,d.getBarRectBounds)(t.mainAxis,r.observation),m=Xn(c,t.mainAxis,o,r.observation);if(!p||m===null)return null;const f=Ae(p,n),y=Ae(m.bounds,n),{stroke:x,strokeWidth:S,cornerRadius:A,strokeAlpha:P}=m.style,w=(0,d.resolveBarCornerRadiusPx)({cornerRadius:A,mainAxis:t.mainAxis,bounds:y}),k=de(f,0),E=de(y,w),C=de(Kt(f,Ht),0),j=de(Kt(y,Ht),w>0?w+Ht:0),T=h(u),O=o.get("alpha",r.observation,"hovered")*o.get("fillAlpha",r.observation,"hovered"),V=o.get("stroke",r.observation,"hovered"),K=(0,d.resolveBarBorderTreatment)(S);return(0,i.jsxs)("g",{"data-testid":"hovered-bar",style:W((0,d.readGeomEffects)(o,r.observation,"hovered")),children:[g,(0,i.jsx)("clipPath",{id:a,children:(0,i.jsx)("path",{d:j})}),(0,i.jsx)("clipPath",{id:s,children:(0,i.jsx)("path",{d:k})}),(0,i.jsx)("clipPath",{id:l,children:(0,i.jsx)("path",{d:E})}),(0,i.jsx)("g",{clipPath:`url(#${a})`,children:(0,i.jsx)("path",{d:C,fill:V,"data-testid":"hovered-bar-border"})}),(0,i.jsx)("g",{clipPath:`url(#${s})`,children:(0,i.jsxs)("g",{clipPath:`url(#${l})`,children:[(0,i.jsx)("path",{d:k,fill:T,opacity:O,"data-testid":"hovered-bar-fill"}),x!==void 0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("path",{d:k,fill:"none",stroke:x,strokeWidth:K.separatorWidth,opacity:O,"data-testid":"hovered-bar-inner-border"}),(0,i.jsx)("path",{d:E,fill:"none",stroke:x,strokeWidth:K.outlineWidth,opacity:P})]})]})})]})},Us={geom:"bar",coord:"cartesian",swatchShape:"square",guideMode:"band",render:({layer:e,coordSystem:t,shouldAnimateTransitions:r,intro:n})=>(0,i.jsx)(Ls,{layer:e,coordSystem:t,shouldAnimateTransitions:r,intro:n}),renderHighlight:({layer:e,sourceLayer:t,coordSystem:r,panelRect:n})=>(0,i.jsx)(Cs,{layer:e,sourceLayer:t,coordSystem:r,panelRect:n}),renderHover:({layer:e,coordSystem:t,primary:r,panelRect:n})=>(0,i.jsx)(Vs,{layer:e,coordSystem:t,primary:r,panelRect:n}),renderHoverCompanions:()=>null,getEditOutlineShapes:Ts},zs=({layer:e,panelRect:t,styleReaders:r,shouldAnimateTransitions:n})=>{const o=(0,d.createLinePathGenerator)(e.params),a={origin:{x:0,y:0},scaleX:t.width,scaleY:t.height},s=[],l=[];return e.data.groupBy(d.GROUP_VARIABLES.group).forEach(c=>{const u=(0,d.prepareLineObservations)([...c],e.params.missingValues),[h]=u;if(h===void 0)return;if(u.length===1){const p=Ys(h,t);p!==null&&l.push(p);return}const g=Fn(o,u,a);g!==""&&s.push({kind:"stroke",key:String((0,d.getGroup)(h)),pathData:g,width:r.get("strokeWidth",h),shouldAnimateTransitions:n})}),l.length>0&&s.push({kind:"dots",centers:l,size:d.DEFAULT_POINT_SIZE_PX}),s},Ys=(e,t)=>{const r=(0,d.getX)(e),n=(0,d.getY)(e);return r===null||n===null?null:Je(pe(r,n),t)},Ks=(0,v.memo)(function({layer:t,shouldAnimateTransitions:r,intro:n}){const o=n?.type==="wipe"?n:null,a=(0,v.useMemo)(()=>(0,d.createLinePathGenerator)(t.params),[t.params]),s=(0,v.useMemo)(()=>(0,d.createLineFillAreaGenerator)(t.params),[t.params]),l=F(t),c=(0,v.useMemo)(()=>{const u=(0,d.createStableKeyGenerator)(t.data,t.mapping,t.id),h=[];return t.data.groupBy(d.GROUP_VARIABLES.group).forEach(g=>{const p=(0,d.prepareLineObservations)([...g],t.params.missingValues),m=a(p);if(!m)return;const f=p[0];if(!f)return;const y=l.get("fillAlpha",f),x=y===void 0?void 0:s(p)??void 0,S=l.get("stroke",f),A=l.get("fill",f),P=A===void 0?S:(0,d.toPaintColor)(A),w=l.get("strokeWidth",f),k=(0,d.toStrokeDasharray)(l.get("dashArray",f),l.get("strokeWidth",f)),E=l.get("lineCap",f),C=l.get("lineJoin",f);h.push({key:u(f),pathData:m,fillPath:x,fillAlpha:y,stroke:S,fill:P,opacity:l.get("alpha",f),strokeAlpha:l.get("strokeAlpha",f),strokeWidth:w,strokeDasharray:k,lineCap:E,lineJoin:C})}),h},[a,s,t.data,t.id,t.mapping,t.params,l]).map(u=>(0,i.jsx)(Xs,{pathData:u.pathData,fillPath:u.fillPath,fillAlpha:u.fillAlpha,stroke:u.stroke,fill:u.fill,strokeWidth:u.strokeWidth,opacity:u.opacity,strokeAlpha:u.strokeAlpha,strokeDasharray:u.strokeDasharray,lineCap:u.lineCap,lineJoin:u.lineJoin,shouldAnimateTransitions:r},u.key));return(0,i.jsx)(ie,{viewBox:"0 0 1 1",preserveAspectRatio:"none",width:"100%",height:"100%","data-geom":"line",effects:W((0,d.readGeomEffects)(l,t.data.getFirst()??void 0)),className:te,children:o?(0,i.jsx)(ar,{intro:o,children:c}):c})}),Xs=({pathData:e,fillPath:t,fillAlpha:r,stroke:n,fill:o,strokeWidth:a,opacity:s,strokeAlpha:l,strokeDasharray:c,lineCap:u,lineJoin:h,shouldAnimateTransitions:g})=>t!==void 0&&r!==void 0?(0,i.jsx)(Qs,{fillPath:t,fillAlpha:r,fill:o,linePath:e,stroke:n,strokeWidth:a,opacity:s,strokeAlpha:l,strokeDasharray:c,lineCap:u,lineJoin:h,shouldAnimateTransitions:g}):g?(0,i.jsx)(qs,{pathData:e,stroke:n,strokeWidth:a,opacity:s,strokeAlpha:l,strokeDasharray:c,lineCap:u,lineJoin:h}):(0,i.jsx)("path",{d:e,fill:"none",stroke:n,strokeWidth:a,opacity:s,strokeOpacity:l,strokeDasharray:c,strokeLinecap:u,strokeLinejoin:h,vectorEffect:"non-scaling-stroke"}),Qs=({fillPath:e,fillAlpha:t,linePath:r,stroke:n,fill:o,strokeWidth:a,opacity:s,strokeAlpha:l,strokeDasharray:c,lineCap:u,lineJoin:h,shouldAnimateTransitions:g})=>{const p=`line_fill_gradient_${(0,v.useId)()}`;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("defs",{children:(0,i.jsxs)("linearGradient",{id:p,gradientTransform:"rotate(90 0.5 0.5)",children:[(0,i.jsx)("stop",{offset:"0%",stopColor:o}),(0,i.jsx)("stop",{offset:"70%",stopColor:o,stopOpacity:0}),(0,i.jsx)("stop",{offset:"100%",stopColor:o,stopOpacity:0})]})}),(0,i.jsx)(Gn,{fillPath:e,linePath:r,fill:`url(#${p})`,fillOpacity:t,stroke:n,strokeWidth:a,strokeOpacity:l,opacity:s,strokeDasharray:c,lineCap:u,lineJoin:h,shouldAnimateTransitions:g})]})},qs=({pathData:e,stroke:t,strokeWidth:r,opacity:n,strokeAlpha:o,strokeDasharray:a,lineCap:s,lineJoin:l})=>{const c=dt(e,ee);return(0,i.jsx)(R.motion.path,{d:c,fill:"none",stroke:t,strokeWidth:r,opacity:n,strokeOpacity:o,strokeDasharray:a,strokeLinecap:s,strokeLinejoin:l,vectorEffect:"non-scaling-stroke"})},Js=({layer:e,primary:t,companions:r})=>{const n=F(e),o=(0,d.getGroup)(t.observation),a=(0,v.useMemo)(()=>(0,d.prepareLineObservations)([...e.data.filter(d.GROUP_VARIABLES.group,"eq",o)],e.params.missingValues),[e.data,e.params.missingValues,o]),s=(0,v.useMemo)(()=>(0,d.createLinePathGenerator)(e.params)(a),[e.params,a]);if(!s)return null;const l=n.get("stroke",t.observation,"hovered"),c=n.get("alpha",t.observation,"hovered"),u=n.get("strokeAlpha",t.observation,"hovered"),h=n.get("strokeWidth",t.observation,"hovered"),g=(0,d.toStrokeDasharray)(n.get("dashArray",t.observation,"hovered"),h),p=n.get("lineCap",t.observation,"hovered"),m=n.get("lineJoin",t.observation,"hovered");return(0,i.jsxs)("g",{"data-testid":"hovered-line",children:[(0,i.jsx)(ie,{viewBox:"0 0 1 1",preserveAspectRatio:"none",width:"100%",height:"100%","data-geom":"line",effects:W((0,d.readGeomEffects)(n,t.observation,"hovered")),className:te,children:(0,i.jsx)("path",{d:s,fill:"none",stroke:l,strokeWidth:h,opacity:c,strokeOpacity:u,strokeDasharray:g,strokeLinecap:p,strokeLinejoin:m,vectorEffect:"non-scaling-stroke","data-testid":"hovered-line-path"})}),r.map(f=>(0,i.jsx)(me,{hit:f},`companion-${f.layerId}-${f.pointIndex}`)),(0,i.jsx)(Ne,{hit:t,"data-testid":"hovered-line-point"})]})},Zs={geom:"line",coord:"cartesian",swatchShape:"line",guideMode:"crosshair",render:({layer:e,shouldAnimateTransitions:t,intro:r})=>(0,i.jsx)(Ks,{layer:e,shouldAnimateTransitions:t,intro:r}),renderHover:({layer:e,primary:t,group:r,related:n})=>(0,i.jsx)(Js,{layer:e,primary:t,companions:[...r,...n]}),renderHoverCompanions:({related:e})=>(0,i.jsx)(i.Fragment,{children:e.map(t=>(0,i.jsx)(me,{hit:t},`companion-${t.layerId}-${t.pointIndex}`))}),getEditOutlineShapes:zs,getOverlayAnchor:({observation:e})=>{const t=(0,d.getX)(e),r=(0,d.getY)(e);return t===null||r===null?null:{x:t,y:r}}},Jn=({observation:e,project:t,styleReaders:r,animation:n,introKey:o})=>{const a=(0,v.useContext)(bt)?.paintsShadow===!0,s=Zn(e,t);if(s===null)return null;const{isAnimated:l,activeIntro:c,shouldAnimateTransitions:u}=n,h=l?{intro:c!==null,fadesIn:!a,transition:c?or(c,o):nr(u)}:null;return(0,i.jsx)(At,{symbol:r.get("symbol",e),cx:(0,d.toPercent)(s.x),cy:(0,d.toPercent)(s.y),size:r.get("size",e),fill:(0,d.toPaintColor)(r.get("fill",e)),fillOpacity:r.get("fillAlpha",e),opacity:r.get("alpha",e),stroke:r.get("stroke",e),strokeOpacity:r.get("strokeAlpha",e),strokeWidth:r.get("strokeWidth",e),style:W((0,d.readGeomEffects)(r,e)),motion:h})},Zn=(e,t)=>{const r=(0,d.getX)(e),n=(0,d.getY)(e);return r===null||n===null?null:t(r,n)},_n=({layer:e,panelRect:t,styleReaders:r,project:n})=>{const o=[];for(const a of e.data){const s=Zn(a,n);s!==null&&o.push({center:Je(s,t),size:r.get("size",a)+r.get("strokeWidth",a)})}return Nn(o)},_s=(0,v.memo)(function({layer:t,shouldAnimateTransitions:r,intro:n}){const o=F(t),a=Pt(n?.type==="grow"&&n.growAxis==="size"?n:null,r);return(0,v.useMemo)(()=>{const s=a.activeIntro?(0,d.createStableKeyGenerator)(t.data,t.mapping,t.id):null,l=[];let c=0;for(const u of t.data)l.push((0,i.jsx)(Jn,{observation:u,project:pe,styleReaders:o,animation:a,introKey:s?.(u)},String(c++)));return l},[t.data,t.mapping,t.id,o,a])}),Xr=({primary:e,companions:t})=>{const r=(0,i.jsxs)(i.Fragment,{children:[t.map(n=>(0,i.jsx)(me,{hit:n},`companion-${n.layerId}-${n.pointIndex}`)),e?(0,i.jsx)(Ne,{hit:e}):null]});return e?(0,i.jsx)("g",{"data-testid":"hovered-point",children:r}):r},$s={geom:"point",coord:"cartesian",swatchShape:"circle",render:({layer:e,shouldAnimateTransitions:t,intro:r})=>(0,i.jsx)(_s,{layer:e,shouldAnimateTransitions:t,intro:r}),renderHover:({primary:e,group:t,related:r})=>(0,i.jsx)(Xr,{primary:e,companions:[...t,...r]}),renderHoverCompanions:({related:e})=>(0,i.jsx)(Xr,{companions:e}),getEditOutlineShapes:e=>_n({...e,project:pe}),getOverlayAnchor:({observation:e})=>{const t=(0,d.getX)(e),r=(0,d.getY)(e);return t===null||r===null?null:{x:t,y:r}}},Ke="var(--graphy-editor-font-family, var(--graphy-font-family))",el=["canvasDefault","canvasBlue","canvasCyan","canvasGreen","canvasYellow","canvasOrange","canvasRed","canvasPink","canvasPurple","canvasGray","canvasInverse"],b={white:"var(--graphy-white)",black:"var(--graphy-black)",transparent:"var(--graphy-transparent)",gray100:"var(--graphy-gray-100)",gray95:"var(--graphy-gray-95)",gray90:"var(--graphy-gray-90)",gray85:"var(--graphy-gray-85)",gray80:"var(--graphy-gray-80)",gray75:"var(--graphy-gray-75)",gray70:"var(--graphy-gray-70)",gray60:"var(--graphy-gray-60)",gray50:"var(--graphy-gray-50)",gray0:"var(--graphy-gray-0)",grayGradient80:"var(--graphy-gray-gradient-80)",green60:"var(--graphy-green-60)",green50:"var(--graphy-green-50)",red60:"var(--graphy-red-60)",red50:"var(--graphy-red-50)",amber70:"var(--graphy-amber-70)",amber50:"var(--graphy-amber-50)",amber40:"var(--graphy-amber-40)",amber30:"var(--graphy-amber-30)",blue80:"var(--graphy-blue-80)",blue60:"var(--graphy-blue-60)",purple50:"var(--graphy-purple-50)",purple30:"var(--graphy-purple-30)",brand:"var(--graphy-brand)",success:"var(--graphy-success)",warning:"var(--graphy-warning)",alert:"var(--graphy-alert)",textPrimary:"var(--graphy-text-primary)",textSecondary:"var(--graphy-text-secondary)",textDisabled:"var(--graphy-text-disabled)",iconPrimary:"var(--graphy-icon-primary)",iconSecondary:"var(--graphy-icon-secondary)",iconStickerBackground:"var(--graphy-icon-sticker-background)",border100:"var(--graphy-border-100)",border50:"var(--graphy-border-50)",border10:"var(--graphy-border-10)",sunkenBackground:"var(--graphy-sunken-background)",defaultBackground:"var(--graphy-default-background)",raisedBackground:"var(--graphy-raised-background)",overlayBackground:"var(--graphy-overlay-background)",overlayBorderGradient:"var(--graphy-overlay-border-gradient)",graphBackground:"var(--graphy-graph-background)",editorDefaultAccent:"var(--graphy-editor-default-accent)",editorDefaultSurface:"var(--graphy-editor-default-surface)",editorDefaultText:"var(--graphy-editor-default-text)",editorDefaultShadow:"var(--graphy-editor-default-shadow)",editorControlHeight:"var(--graphy-editor-control-height)",canvasDefault:"var(--graphy-canvas-default)",canvasBlue:"var(--graphy-canvas-blue)",canvasCyan:"var(--graphy-canvas-cyan)",canvasGreen:"var(--graphy-canvas-green)",canvasYellow:"var(--graphy-canvas-yellow)",canvasOrange:"var(--graphy-canvas-orange)",canvasRed:"var(--graphy-canvas-red)",canvasPink:"var(--graphy-canvas-pink)",canvasPurple:"var(--graphy-canvas-purple)",canvasGray:"var(--graphy-canvas-gray)",canvasInverse:"var(--graphy-canvas-inverse)",elevationXs:"var(--graphy-elevation-xs)",elevationSm:"var(--graphy-elevation-sm)",elevationMd:"var(--graphy-elevation-md)",elevationLg:"var(--graphy-elevation-lg)",radiiXs:"var(--graphy-radii-xs)",radiiSm:"var(--graphy-radii-sm)",radiiMd:"var(--graphy-radii-md)",radiiLg:"var(--graphy-radii-lg)",spaceXxs:"var(--graphy-space-xxs)",spaceXs:"var(--graphy-space-xs)",spaceSm:"var(--graphy-space-sm)",spaceMd:"var(--graphy-space-md)",spaceLg:"var(--graphy-space-lg)",spaceXl:"var(--graphy-space-xl)",zIndexToolbar:"var(--graphy-z-index-toolbar)",zIndexToolbarTooltip:"var(--graphy-z-index-toolbar-tooltip)",zIndexToolbarPopover:"var(--graphy-z-index-toolbar-popover)",zIndexEditorPopover:"var(--graphy-z-index-editor-popover)",toolbarBackgroundColor:"var(--graphy-toolbar-background-color)",toolbarButtonBackgroundColor:"var(--graphy-toolbar-button-background-color)",toolbarButtonBackgroundColorHovered:"var(--graphy-toolbar-button-background-color-hovered)",toolbarButtonBackgroundColorSelected:"var(--graphy-toolbar-button-background-color-selected)",toolbarSeparatorColor:"var(--graphy-toolbar-separator-color)",fontFamily:"var(--graphy-font-family)",fontFamilyHeading:"var(--graphy-font-family-heading)",fontWeightRegular:"var(--graphy-font-weight-regular)",fontWeightMedium:"var(--graphy-font-weight-medium)",fontWeightSemibold:"var(--graphy-font-weight-semibold)",fontWeightBold:"var(--graphy-font-weight-bold)",fontWeightExtraBold:"var(--graphy-font-weight-extra-bold)",textScale:"var(--graphy-text-scale)",fontSizeXxs:"var(--graphy-font-size-xxs)",fontSizeXs:"var(--graphy-font-size-xs)",fontSizeSm:"var(--graphy-font-size-sm)",fontSizeMd:"var(--graphy-font-size-md)",fontSizeLg:"var(--graphy-font-size-lg)",fontSizeXl:"var(--graphy-font-size-xl)",fontLineHeightXxs:"var(--graphy-font-line-height-xxs)",fontLineHeightXs:"var(--graphy-font-line-height-xs)",fontLineHeightSm:"var(--graphy-font-line-height-sm)",fontLineHeightMd:"var(--graphy-font-line-height-md)",fontLineHeightLg:"var(--graphy-font-line-height-lg)",fontLineHeightXl:"var(--graphy-font-line-height-xl)",fontSizeEditorBody:"var(--graphy-font-size-editor-body)",fontSizeHeadingSm:"var(--graphy-font-size-heading-sm)",fontSizeHeadingMd:"var(--graphy-font-size-heading-md)",fontSizeHeadingLg:"var(--graphy-font-size-heading-lg)",fontLineHeightEditorBody:"var(--graphy-font-line-height-editor-body)",fontLineHeightHeadingSm:"var(--graphy-font-line-height-heading-sm)",fontLineHeightHeadingMd:"var(--graphy-font-line-height-heading-md)",fontLineHeightHeadingLg:"var(--graphy-font-line-height-heading-lg)",fontButton:"var(--graphy-font-button)",fontInput:"var(--graphy-font-input)",fontInputLabel:"var(--graphy-font-input-label)",fontSelectLabel:"var(--graphy-font-select-label)",fontSelectDescription:"var(--graphy-font-select-description)",fontColorSelectLabel:"var(--graphy-font-color-select-label)",fontMenuTitle:"var(--graphy-font-menu-title)",fontMenuGroupTitle:"var(--graphy-font-menu-group-title)",fontMenuItemLabel:"var(--graphy-font-menu-item-label)",fontMenuItemLabelSecondary:"var(--graphy-font-menu-item-label-secondary)",fontUITooltip:"var(--graphy-font-uitooltip)",fontUITooltipSecondary:"var(--graphy-font-uitooltip-secondary)",fontErrorBoundaryTitle:"var(--graphy-font-error-boundary-title)",fontErrorBoundaryMessage:"var(--graphy-font-error-boundary-message)",fontTableCell:"var(--graphy-font-table-cell)",fontTableHeaderCell:"var(--graphy-font-table-header-cell)",fontSourceLabel:"var(--graphy-font-source-label)",fontSourceLink:"var(--graphy-font-source-link)",fontTextEditorH1:"var(--graphy-font-text-editor-h1)",fontTextEditorH2:"var(--graphy-font-text-editor-h2)",fontTextEditorH3:"var(--graphy-font-text-editor-h3)",fontTextEditorH6:"var(--graphy-font-text-editor-h6)",fontTextEditorBody:"var(--graphy-font-text-editor-body)",fontTextEditorLink:"var(--graphy-font-text-editor-link)",fontHighlightModeTitle:"var(--graphy-font-highlight-mode-title)",fontHighlightModeSubtitle:"var(--graphy-font-highlight-mode-subtitle)",fontEditorControlLabel:"var(--graphy-font-editor-control-label)",fontEditorControlValue:"var(--graphy-font-editor-control-value)",fontEditorSectionTitle:"var(--graphy-font-editor-section-title)",fontEditorCaption:"var(--graphy-font-editor-caption)"},tt=`"Stack Sans Text", 'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI', 'Roboto', 'Oxygen-Sans', 'Ubuntu',
|
|
2
|
+
'Cantarell', 'Helvetica Neue', 'NotoSansArabic', 'NotoSansJP', 'NotoSansSC', 'NotoSansKR', 'NotoSerifKR', sans-serif, 'Apple Color Emoji', 'NotoColorEmoji'`,tl=tt,Xe={regular:d.NAMED_WEIGHTS.regular,medium:d.NAMED_WEIGHTS.medium,semibold:d.NAMED_WEIGHTS.semiBold,bold:d.NAMED_WEIGHTS.bold,extraBold:d.NAMED_WEIGHTS.extraBold},re={xxs:1,xs:1.1,sm:1.2,md:1.4,lg:1.6,xl:2,editorBody:1.5,headingSm:1.8,headingMd:2.2,headingLg:2.8},_={xxs:1,xs:1,sm:1.3,md:1.43,lg:1,xl:1,editorBody:1.47,headingSm:1.25,headingMd:1.41,headingLg:1.29},ne=e=>`${e}em`,$n={textScale:"1",fontFamily:tt,fontFamilyHeading:tl,fontWeightRegular:Xe.regular.toString(),fontWeightMedium:Xe.medium.toString(),fontWeightSemibold:Xe.semibold.toString(),fontWeightBold:Xe.bold.toString(),fontWeightExtraBold:Xe.extraBold.toString(),fontSizeXxs:ne(re.xxs),fontSizeXs:ne(re.xs),fontSizeSm:ne(re.sm),fontSizeMd:ne(re.md),fontSizeLg:ne(re.lg),fontSizeXl:ne(re.xl),fontLineHeightXxs:_.xxs.toString(),fontLineHeightXs:_.xs.toString(),fontLineHeightSm:_.sm.toString(),fontLineHeightMd:_.md.toString(),fontLineHeightLg:_.lg.toString(),fontLineHeightXl:_.xl.toString()},eo={fontSizeEditorBody:ne(re.editorBody),fontSizeHeadingSm:ne(re.headingSm),fontSizeHeadingMd:ne(re.headingMd),fontSizeHeadingLg:ne(re.headingLg),fontLineHeightEditorBody:_.editorBody.toString(),fontLineHeightHeadingSm:_.headingSm.toString(),fontLineHeightHeadingMd:_.headingMd.toString(),fontLineHeightHeadingLg:_.headingLg.toString()},L=(e,t,r,n=b.fontFamily)=>`${e} ${t}/${r} ${n}`,to={fontUITooltip:L(b.fontWeightMedium,b.fontSizeMd,b.fontLineHeightMd),fontUITooltipSecondary:L(b.fontWeightMedium,b.fontSizeSm,b.fontLineHeightSm,Ke),fontButton:L(b.fontWeightMedium,b.fontSizeMd,b.fontLineHeightMd),fontInput:L(b.fontWeightMedium,b.fontSizeMd,b.fontLineHeightMd),fontInputLabel:L(b.fontWeightMedium,b.fontSizeXxs,b.fontLineHeightXxs),fontSelectLabel:L(b.fontWeightMedium,b.fontSizeMd,b.fontLineHeightMd),fontSelectDescription:L(b.fontWeightMedium,b.fontSizeSm,b.fontLineHeightSm),fontColorSelectLabel:L(b.fontWeightMedium,b.fontSizeSm,b.fontLineHeightSm),fontMenuTitle:L(b.fontWeightSemibold,b.fontSizeMd,b.fontLineHeightMd),fontMenuGroupTitle:L(b.fontWeightMedium,b.fontSizeSm,b.fontLineHeightSm),fontMenuItemLabel:L(b.fontWeightMedium,b.fontSizeMd,b.fontLineHeightMd),fontMenuItemLabelSecondary:L(b.fontWeightMedium,b.fontSizeSm,b.fontLineHeightSm),fontErrorBoundaryTitle:L(b.fontWeightSemibold,b.fontSizeHeadingSm,b.fontLineHeightHeadingSm),fontErrorBoundaryMessage:L(b.fontWeightMedium,b.fontSizeMd,b.fontLineHeightMd),fontTableCell:L(b.fontWeightMedium,b.fontSizeMd,b.fontLineHeightMd),fontTableHeaderCell:L(b.fontWeightSemibold,b.fontSizeSm,b.fontLineHeightSm),fontSourceLabel:L(b.fontWeightMedium,b.fontSizeSm,b.fontLineHeightSm),fontSourceLink:L(b.fontWeightRegular,b.fontSizeSm,b.fontLineHeightSm),fontTextEditorH1:L(b.fontWeightBold,b.fontSizeHeadingLg,b.fontLineHeightHeadingLg,b.fontFamilyHeading),fontTextEditorH2:L(b.fontWeightBold,b.fontSizeHeadingMd,b.fontLineHeightHeadingMd,b.fontFamilyHeading),fontTextEditorH3:L(b.fontWeightSemibold,b.fontSizeHeadingSm,b.fontLineHeightHeadingSm,b.fontFamilyHeading),fontTextEditorH6:L(b.fontWeightMedium,b.fontSizeSm,b.fontLineHeightSm),fontTextEditorBody:L(b.fontWeightMedium,b.fontSizeEditorBody,b.fontLineHeightEditorBody),fontTextEditorLink:L(b.fontWeightRegular,b.fontSizeMd,b.fontLineHeightMd),fontHighlightModeTitle:L(b.fontWeightBold,b.fontSizeMd,b.fontLineHeightMd),fontHighlightModeSubtitle:L(b.fontWeightMedium,b.fontSizeSm,b.fontLineHeightSm),fontEditorControlLabel:L(b.fontWeightMedium,b.fontSizeSm,b.fontLineHeightSm,Ke),fontEditorControlValue:L(b.fontWeightMedium,b.fontSizeSm,b.fontLineHeightSm,Ke),fontEditorSectionTitle:L(b.fontWeightSemibold,b.fontSizeSm,b.fontLineHeightSm,Ke),fontEditorCaption:L(b.fontWeightMedium,b.fontSizeXxs,b.fontLineHeightXxs,Ke)},rl=(e,t)=>({familyDefault:Gt(t)??Gt(e.fontFamily)??Gt(tt)??""}),Gt=e=>e===void 0||e.includes("var(")?null:e.replace(/\s+/g," ").trim(),z=(e,t)=>`color-mix(in srgb, transparent, ${e} ${t*100}%)`,nl=(e,t)=>`hsl(from ${e} h s calc(l * ${1-t}))`,ol=(e,t)=>`hsl(from ${e} h s calc(l * ${1+t}))`,al=e=>/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(e),il=e=>e.length===0?!1:typeof CSS<"u"&&typeof CSS.supports=="function"?CSS.supports("color",e):/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(e),sl=e=>`${e}px`,ro={editorControlHeight:sl(32)},Ce={editOutline:1,panelOverlay:5,textToolbar:10,textToolbarTooltip:20,textToolbarPopover:30,legendPopover:40,editorOverlay:900,editorOverlayPopover:950,tooltip:1e3},no={elevationXs:"0 0 2px rgba(15, 15, 24, 0.12), 0 2px 2px rgba(14, 14, 52, 0.08)",elevationSm:"0 0 4px rgba(15, 15, 24, 0.12), 0 4px 4px rgba(14, 14, 52, 0.08)",elevationMd:"0 0 8px rgba(15, 15, 24, 0.12), 0 8px 8px rgba(14, 14, 52, 0.08)",elevationLg:"0 0 16px rgba(15, 15, 24, 0.12), 0 16px 16px rgba(14, 14, 52, 0.08)"},oo={radiiXs:"4px",radiiSm:"6px",radiiMd:"8px",radiiLg:"12px"},ao={zIndexToolbar:`${Ce.textToolbar}`,zIndexToolbarTooltip:`${Ce.textToolbarTooltip}`,zIndexToolbarPopover:`${Ce.textToolbarPopover}`,zIndexEditorPopover:`${Ce.editorOverlayPopover}`},ll=8,Ee=e=>`${ll*e}px`,io={spaceXxs:Ee(.25),spaceXs:Ee(.5),spaceSm:Ee(.75),spaceMd:Ee(1),spaceLg:Ee(1.5),spaceXl:Ee(2)},cl={transparent:"transparent",white:"#FFFFFF",black:"#000000",gray100:"#000000",gray95:"#0D0D0D",gray90:"#1A1A1A",gray85:"#1F1F1F",gray80:"#2A2A2A",gray75:"#2e2e2e",gray70:"#353535",gray60:"#494949",gray50:"#6F6F6F",gray0:"#FFFFFF",red60:"#CB3333",red50:"#F93939",amber70:"#F48135",amber50:"#FEAE47",amber40:"#FFC849",amber30:"#ffd061",green60:"#0AC600",green50:"#42CD69",blue80:"#2E62FF",blue60:"#3D70FF",purple50:"#7B56EA",purple30:"#E093FE",grayGradient80:"linear-gradient(to top, #222429, #31353f)"},dl={textPrimary:b.gray0,textSecondary:z(b.textPrimary,.8),textDisabled:z(b.textPrimary,.5),iconPrimary:"currentColor",iconSecondary:z(b.textPrimary,.6),iconStickerBackground:b.gray70,border100:b.gray0,border50:z(b.gray0,.5),border10:z(b.gray0,.1),brand:b.purple50,success:b.green50,warning:b.amber50,alert:b.red50,sunkenBackground:b.gray100,defaultBackground:b.gray90,raisedBackground:b.gray80,overlayBackground:b.gray90,overlayBorderGradient:b.grayGradient80},ul={graphBackground:b.gray90,toolbarBackgroundColor:b.overlayBackground,toolbarButtonBackgroundColor:"transparent",toolbarButtonBackgroundColorHovered:b.gray80,toolbarButtonBackgroundColorSelected:b.gray60,toolbarSeparatorColor:b.gray60,editorDefaultAccent:"#ECE7DF",editorDefaultSurface:"#26241F",editorDefaultText:"#ECE7DF",editorDefaultShadow:`${b.elevationMd}, 0 16px 40px rgba(0, 0, 0, 0.45)`},hl={canvasDefault:"#FFFFFF",canvasBlue:"#60a5fa",canvasCyan:"#22d3ee",canvasGreen:"#34d399",canvasYellow:"#FFC800",canvasOrange:"#fb923c",canvasRed:"#f87171",canvasPink:"#F979D9",canvasPurple:"#a78bfa",canvasGray:"#a8a29e",canvasInverse:"#000000"},gl={...cl,...dl,...no,...oo,...io,...ao,...ul,...hl,...ro,...$n,...eo,...to},fl={transparent:"transparent",white:"#FFFFFF",black:"#000000",gray100:"#FFFFFF",gray95:"#FCFCFC",gray90:"#FAFAFA",gray85:"#F5F5F5",gray80:"#F0F0F0",gray75:"#E8E8E8",gray70:"#E5E5E5",gray60:"#CCCCCC",gray50:"#C4C4C4",gray0:"#1D2129",red60:"#E14B49",red50:"#F93939",amber70:"#FFBA8C",amber50:"#FFC849",amber40:"#FEAE47",amber30:"#E7A816",green60:"#06B299",green50:"#42CD69",blue80:"#2E62FF",blue60:"#3D70FF",purple50:"#7B56EA",purple30:"#E093FE",grayGradient80:"linear-gradient(to top, #F0F0F1, #F9F9FF)"},vl={textPrimary:b.black,textSecondary:z(b.textPrimary,.6),textDisabled:z(b.textPrimary,.5),iconPrimary:"currentColor",iconSecondary:z(b.textPrimary,.6),iconStickerBackground:b.gray100,brand:b.purple50,success:b.green50,warning:b.amber50,alert:b.red50,border100:b.gray0,border50:z(b.gray0,.5),border10:z(b.gray0,.1),sunkenBackground:b.gray90,defaultBackground:b.gray100,raisedBackground:b.gray85,overlayBackground:b.gray100,overlayBorderGradient:b.border10},pl={graphBackground:b.gray100,toolbarBackgroundColor:b.overlayBackground,toolbarButtonBackgroundColor:"transparent",toolbarButtonBackgroundColorHovered:b.gray80,toolbarButtonBackgroundColorSelected:b.gray60,toolbarSeparatorColor:b.gray60,editorDefaultAccent:"#3B372F",editorDefaultSurface:"#FFFFFF",editorDefaultText:"#3B372F",editorDefaultShadow:`${b.elevationMd}, 0 16px 40px rgba(20, 18, 15, 0.14)`},ml={canvasDefault:"#000000",canvasBlue:"#3b82f6",canvasCyan:"#06b6d4",canvasGreen:"#10b981",canvasYellow:"#E5B400",canvasOrange:"#f97316",canvasRed:"#ef4444",canvasPink:"#E845BF",canvasPurple:"#8b5cf6",canvasGray:"#78716c",canvasInverse:"#ffffff"},xl={...fl,...vl,...no,...oo,...io,...ao,...pl,...ml,...ro,...$n,...eo,...to},cr=(e,t={})=>{const r={};for(const[n,o]of Object.entries(t))o!=null&&(r[n]=o);return{...e==="dark"?gl:xl,...r}},so=(e,t={},r)=>({fonts:rl(cr(e,t),r)}),yl=Object.freeze(so("light")),lo=(0,v.createContext)(yl),bl=({metrics:e,children:t})=>(0,i.jsx)(lo.Provider,{value:e,children:t}),we=()=>(0,v.useContext)(lo),wt=(e,t,r)=>{const{colorScheme:n}=G(),o=M(a=>e===void 0?void 0:(0,d.findLayerById)(a.layers,e));return(0,v.useMemo)(()=>o===void 0?r:(0,d.readPresentedGroupColor)(o,t,n)??r,[n,r,t,o])},I=(e,...t)=>(0,v.useMemo)(()=>e(...t),[e,...t]),jt=(e,t,r)=>{const n=Pe(),o=M(a=>e===void 0?void 0:(0,d.findLayerById)(a.layers,e));return(0,v.useMemo)(()=>{if(o===void 0)return{};const a=(0,d.readColorGroupObservation)(o,t),s=(0,d.resolveSwatchGeomPaint)(n,o,a,{width:r,height:r});return{alpha:s.alpha,fill:s.fill,cornerRadius:s.cornerRadiusPx,symbol:s.symbol}},[o,n,t,r])},Al=/\p{Emoji_Presentation}|\p{Emoji}\uFE0F/gu,co="😀",uo=class ho{constructor(){this.emojiCorrections=new Map,this.currentFont="";const t=new OffscreenCanvas(1,1).getContext("2d");if(!t)throw new Error("Failed to create OffscreenCanvas 2D context");this.ctx=t}static async create(){return typeof document<"u"&&"fonts"in document&&await document.fonts.ready,new ho}measureText(t,r){const n=(0,d.applyTextTransform)(t,r.textTransform),o=(0,d.buildFontString)(r);this.setFont(o);const{width:a,fontBoundingBoxAscent:s,fontBoundingBoxDescent:l}=this.ctx.measureText(n);let c=a+(0,d.computeLetterSpacingWidth)(n,r.letterSpacing);const u=Sl(n);if(u>0){const h=this.getEmojiCorrection(o);c-=h*u}return{width:c,height:s+l,ascent:s,descent:l}}setFont(t){this.currentFont!==t&&(this.ctx.font=t,this.currentFont=t)}getEmojiCorrection(t){const r=this.emojiCorrections.get(t);if(r!==void 0)return r;this.setFont(t);const n=this.ctx.measureText(co).width,o=Pl(t);let a=0;if(o!==null){const s=n-o;a=s>.5?s:0}return this.emojiCorrections.set(t,a),a}},ce=null,Sl=e=>{const t=e.match(Al);return t?t.length:0},Pl=e=>{const t=wl();return t?(t.style.font=e,t.getBoundingClientRect().width):null},wl=()=>typeof document>"u"?null:(ce||(ce=document.createElement("span"),ce.style.position="absolute",ce.style.visibility="hidden",ce.style.whiteSpace="nowrap",ce.style.left="-9999px",ce.textContent=co,document.body.appendChild(ce)),ce),go=(0,v.createContext)(null),Qr=3e3,fo=({children:e,measurer:t})=>{const[r,n]=(0,v.useState)(null);(0,v.useEffect)(()=>{if(t!==void 0)return;let a=!1;const s=()=>{a||n(jl())};if(!(typeof document<"u"&&"fonts"in document)){s();return}const l=setTimeout(()=>{a||(console.warn(`[graphy] FONT_READY_TIMEOUT: document.fonts.ready has not settled in ${Qr}ms; painting with the fonts available so far.`),s())},Qr),c=()=>{clearTimeout(l),s()};return document.fonts.ready.then(c,c),document.fonts.addEventListener("loadingdone",c),()=>{a=!0,clearTimeout(l),document.fonts.removeEventListener("loadingdone",c)}},[t]);const o=t??r;return o===null?null:(0,i.jsx)(go.Provider,{value:o,children:e})},he=()=>{const e=(0,v.useContext)(go);if(e===null)throw new Error("useTextMeasurer must be used inside a <TextMeasurerProvider>.");return e},jl=()=>{try{return new d.CachedTextMeasurer(new uo)}catch{return new d.CachedTextMeasurer(new d.HeuristicTextMeasurer)}},vo=(0,v.createContext)(null),kl=vo.Provider,El=null,se=()=>(0,v.useContext)(vo)??(El??=Lo()),Rl=11.7,Cl=.75,qr=21.6,Il="0 0 10 18",Ml="M2.48935 16.9323L9.07098 9.82964C9.51595 9.34944 9.51504 8.60728 9.0689 8.12818L2.48866 1.06172C1.85811 0.384586 0.974477 0 0.049217 0H0V18H0.0443689C0.972463 18 1.85854 17.6131 2.48935 16.9323Z",Tl="_16vokpr0",Bl=(e,t)=>e.mapping.y!==void 0!=(t.mainAxis==="y"),Ol=(e,t)=>{const r=(0,d.toPercent)(e?1-t:t);return e?{x1:"0%",y1:r,x2:"100%",y2:r}:{x1:r,y1:"0%",x2:r,y2:"100%"}},Ll=(e,t,r,n)=>{const o=(0,d.toStrokeDasharray)(e,t),a={...r===void 0?{}:{strokeLinecap:r},...n===void 0?{}:{strokeLinejoin:n}};return o===void 0?a:{strokeDasharray:o,strokeLinecap:"round",...a,...(e[0]??0)>1?{strokeMiterlimit:16}:{}}},Fl=(e,t)=>it(e)&&it(t)?`${e}: ${t}`:it(e)?e:it(t)?t:null,Nl=e=>e?14:0,Dl=(e,t)=>e*Cl-Nl(t)-10,Hl=(e,t,r)=>{const n=e*r,o=-13-n,a=r+13-n-t;return a<o?o:Math.min(Math.max(-t/2,o),a)},it=e=>e!=null&&e.trim()!=="",po=Object.freeze({}),dr=(0,v.createContext)(po),Gl=({slots:e,children:t})=>(0,i.jsx)(dr.Provider,{value:e??po,children:t});function oe(e,t){const r=(0,v.useContext)(dr)[e];return r===void 0?t:typeof r=="object"&&Vl(r)?r.render:r}function Wl(){const e=(0,v.useContext)(dr);return{measureAxis:e.AxisTicks?.measure,measureAxisLabel:e.AxisLabel?.measure,measureLegend:e.Legend?.measure,measureHeadline:e.Headline?.measure.measureHeadline,measureHeadlineItemWidths:e.Headline?.measure.measureHeadlineItemWidths}}function Vl(e){return"render"in e&&"measure"in e}var Ul="_2qyyu60",zl=2,Yl=12,Kl=12,Jr=1,Zr=2,Xl=4,Ql=3,ql=2,Jl=new Set(["square","slice"]),_r=.375,mo=1,rt=e=>(0,i.jsx)(oe("Swatch",xo),{...e}),xo=({shape:e,color:t,paint:r,lineType:n="solid",width:o=Yl,height:a=Kl,strokeWidth:s=zl,alpha:l,cornerRadius:c,symbol:u,mainAxis:h="x"})=>{const g=$l(e,t,r,Math.min(o,a)),p=Y({paints:[g]}),m=p.fillFor(g);return(0,i.jsxs)("svg",{className:Ul,width:o,height:a,viewBox:`0 0 ${o} ${a}`,"aria-hidden":!0,"data-testid":"chart-swatch","data-shape":e,children:[p.defs,Zl({shape:e,color:t,fill:m,lineType:n,width:o,height:a,strokeWidth:s,alpha:l,cornerRadius:c,symbol:u,mainAxis:h})]})},Zl=({shape:e,color:t,fill:r,lineType:n,width:o,height:a,strokeWidth:s,alpha:l,cornerRadius:c,symbol:u,mainAxis:h})=>{const g=tc(n,o);switch(e){case"square":return(0,i.jsx)("rect",{x:1,y:1,width:o-2,height:a-2,rx:c??2,fill:r,opacity:l});case"line":return(0,i.jsx)("line",{x1:g.x1,y1:a/2,x2:g.x2,y2:a/2,stroke:t,strokeWidth:s,strokeLinecap:g.linecap,strokeDasharray:g.dashArray,opacity:l});case"circle":{const p=Math.max(0,(Math.min(o,a)-2)/2);if(u!==void 0&&u!=="circle"){const m=(0,d.buildPointSymbolInBox)(u,o-2,a-2);return(0,i.jsx)("path",{transform:`translate(${o/2+m.offsetX} ${a/2+m.offsetY})`,d:m.path,fill:r,opacity:l})}return(0,i.jsx)("circle",{cx:o/2,cy:a/2,r:p,fill:r,opacity:l})}case"area":{const p=a/2-1;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("rect",{x:1,y:p,width:o-2,height:a-p-1,fill:r,opacity:l??.45}),(0,i.jsx)("line",{x1:g.x1,y1:p,x2:g.x2,y2:p,stroke:t,strokeWidth:s,strokeLinecap:g.linecap,strokeDasharray:g.dashArray})]})}case"slice":return(0,i.jsx)("path",{d:`M 0 ${a} L ${o} ${a} A ${o} ${a} 0 0 0 0 0 Z`,fill:r,opacity:l});case"interval":return(0,i.jsx)("path",{d:_l(o,a,h),fill:"none",stroke:t,strokeWidth:mo,opacity:l});default:return e}},_l=(e,t,r)=>{const n=mo/2;if(r==="x"){const l=e/2,c=e*_r,u=h=>`M ${l-c} ${h} H ${l+c}`;return`${u(n)} M ${l} ${n} V ${t-n} ${u(t-n)}`}const o=t/2,a=t*_r,s=l=>`M ${l} ${o-a} V ${o+a}`;return`${s(n)} M ${n} ${o} H ${e-n} ${s(e-n)}`},$l=(e,t,r,n)=>r===void 0?t:Jl.has(e)?ec(r,n):(0,d.toPaintColor)(r),ec=(e,t)=>{if(typeof e=="string"||!(0,d.isPatternPaint)(e))return e;const r=Math.max(ql,Math.floor(t/Ql));return{...e,size:Math.min(e.size??8,r)}},tc=(e,t)=>e==="solid"?{x1:0,x2:t,dashArray:void 0,linecap:"round"}:e==="dashed"?{x1:0,x2:t,dashArray:`${(t-Jr*(Zr-1))/Zr} ${Jr}`,linecap:"butt"}:{x1:0,x2:t,dashArray:`1 ${t/(Xl-1)}`,linecap:"round"},He=(e,t=b.fontFamily)=>({fontFamily:e.fontFamily??t,fontSize:e.fontSize,fontWeight:e.fontWeight,...e.fontStyle===void 0?{}:{fontStyle:e.fontStyle},...e.letterSpacing===void 0?{}:{letterSpacing:`${e.letterSpacing}px`},...e.textDecoration===void 0?{}:{textDecoration:e.textDecoration}}),kt=e=>Ao(e)?{stroke:e.textOutlineColor,strokeWidth:e.textOutlineWidth*2,strokeLinejoin:"round",paintOrder:"stroke"}:{},yo=e=>e.textShadow===void 0?{}:{textShadow:Ni(e.textShadow)},Et=e=>{const t=e.textShadow===void 0?void 0:Se(e.textShadow);return t===void 0?{}:{filter:t}},bo=e=>Ao(e)?{WebkitTextStroke:`${e.textOutlineWidth*2}px ${e.textOutlineColor}`,paintOrder:"stroke"}:{},Re=e=>({...He(e),lineHeight:e.lineHeight,color:e.textColor,...e.textTransform===void 0?{}:{textTransform:e.textTransform},...bo(e),...yo(e)}),D=e=>({...He(e),lineHeight:e.lineHeight,color:e.textColor,...e.textTransform===void 0?{}:{textTransform:e.textTransform},...bo(e),...yo(e)}),rc=(e,t)=>(0,xt.assignInlineVars)({[e.fontFamily]:t.fontFamily??b.fontFamily,[e.fontSize]:`${t.fontSize}px`,[e.fontWeight]:String(t.fontWeight),[e.lineHeight]:String(t.lineHeight),[e.textColor]:t.textColor}),Ao=e=>e.textOutlineColor!==void 0&&e.textOutlineWidth!==void 0&&e.textOutlineWidth>0,nc=({labelPosition:e,linePosition:t,color:r,pillWidth:n,pillHeight:o,text:a,shouldAnimateTransitions:s})=>{const l=e==="start",c=l?-13:-(n-13),u=l?c+n-5:c+5-12,h=l?void 0:`rotate(180 ${u+12/2} ${o/2})`,g=l?"0%":"100%",p=(0,d.toPercent)(1-t),m=(0,i.jsxs)("g",{transform:`translate(0, ${-o/2})`,pointerEvents:"none",children:[(0,i.jsx)("rect",{x:c,y:0,width:n,height:o,rx:6,fill:r}),(0,i.jsx)("g",{transform:h,children:(0,i.jsx)("svg",{x:u,y:(o-qr)/2,width:12,height:qr,viewBox:Il,overflow:"visible",children:(0,i.jsx)("path",{d:Ml,fill:r})})}),(0,i.jsx)("g",{transform:`translate(${c+5}, ${o/2})`,children:a})]});return s?(0,i.jsx)(R.motion.svg,{initial:!1,transition:ee,x:g,animate:{y:p},overflow:"visible",children:m}):(0,i.jsx)("svg",{x:g,y:p,overflow:"visible",children:m})},oc=({labelPosition:e,linePosition:t,color:r,pillWidth:n,pillHeight:o,panelWidth:a,text:s,shouldAnimateTransitions:l})=>{const c=e==="start",u=c?-13:-(o-13),h=(0,d.toPercent)(t),g=c?"100%":"0%",p=(0,i.jsxs)("g",{transform:`translate(${Hl(t,n,a)}, 0)`,pointerEvents:"none",children:[(0,i.jsx)("rect",{x:0,y:u,width:n,height:o,rx:6,fill:r}),(0,i.jsx)("g",{transform:`translate(5, ${u+o/2})`,children:s})]});return l?(0,i.jsx)(R.motion.svg,{initial:!1,transition:ee,y:g,animate:{x:h},overflow:"visible",children:p}):(0,i.jsx)("svg",{x:h,y:g,overflow:"visible",children:p})},ac=({label:e,textStyle:t,textWidth:r,labelPosition:n,isHorizontalLine:o,position:a,color:s,textColor:l,symbolShape:c,symbolColor:u,symbolPaint:h,symbolAlpha:g,symbolCornerRadius:p,symbolGlyph:m,symbolMainAxis:f,panelWidth:y,shouldAnimateTransitions:x})=>{const S=c===null?0:14,A=r+S+10,P=Math.max(Rl,(0,d.computeLineBoxHeight)(t))+10,w=(0,i.jsxs)(i.Fragment,{children:[c!==null&&u!==null&&(0,i.jsx)("g",{transform:`translate(0, ${-10/2})`,children:(0,i.jsx)(rt,{shape:c,color:u,paint:h,surface:"rule-label",width:10,height:10,alpha:g,cornerRadius:p,symbol:m,mainAxis:f})}),(0,i.jsx)("text",{x:S,textAnchor:"start",dominantBaseline:"central",fill:l,style:{...He(t),...Et(t)},...kt(t),children:(0,d.applyTextTransform)(e,t.textTransform)})]});return o?(0,i.jsx)(nc,{labelPosition:n,linePosition:a,color:s,pillWidth:A,pillHeight:P,text:w,shouldAnimateTransitions:x}):(0,i.jsx)(oc,{labelPosition:n,linePosition:a,color:s,pillWidth:A,pillHeight:P,panelWidth:y,text:w,shouldAnimateTransitions:x})},ic=({strokeWidth:e,dashArray:t,lineCap:r,lineJoin:n,isHorizontalLine:o,position:a,lineColor:s,effects:l,shouldAnimateTransitions:c})=>{const u=Ol(o,a),h=Ll(t,e,r,n);return c?(0,i.jsx)(R.motion.line,{initial:!1,transition:ee,animate:{x1:u.x1,y1:u.y1,x2:u.x2,y2:u.y2},...h,style:l,stroke:s,strokeWidth:e,vectorEffect:"non-scaling-stroke"}):(0,i.jsx)("line",{...u,...h,style:l,stroke:s,strokeWidth:e,vectorEffect:"non-scaling-stroke"})},sc=(0,v.memo)(function({layer:t,coordSystem:r,formattingLocale:n,shouldAnimateTransitions:o,panelWidth:a}){const s=he(),l=se(),{guides:c,numberFormat:u,specLayers:h,colorScale:g}=M((0,q.useShallow)(H=>({guides:H.guides,numberFormat:H.config.numberFormat,specLayers:H.spec.layers,colorScale:H.scales.color}))),p=(0,v.useMemo)(()=>(0,d.buildAverageLineSymbols)(h,g).get(t.id)??null,[h,g,t.id]),m=p?l(p.geom,r.type)?.swatchShape??"square":null,f=jt(p?.layerId,p?.groupValue,10),y=wt(p?.layerId,p?.groupValue,p?.color)??null,x=(0,v.useMemo)(()=>Fl(t.params.label,(0,d.formatRuleValue)({guides:c,numberFormat:u,layer:t,locale:n})),[c,u,n,t]),{fonts:S}=we(),A=B(),P=I(d.resolveRuleLabelStyle,A.geom.rule.label(t),A.graph()),w=(0,v.useMemo)(()=>(0,d.toFontSpec)(P,S.familyDefault),[P,S.familyDefault]),k=(0,v.useMemo)(()=>x===null?null:(0,d.truncateToWidth)(x,Dl(a,m!==null),H=>s.measureText(H,w).width),[x,a,m,w,s]),E=(0,v.useMemo)(()=>k===null?0:s.measureText(k,w).width,[k,w,s]),C=F(t),j=t.data.getFirst();if(!j)return null;const T=C.get("stroke",j),O=lc(P,T),V=Bl(t,r),K=V?(0,d.getY)(j):(0,d.getX)(j);return K===null?null:(0,i.jsxs)("g",{"data-geom":"rule",className:Tl,children:[(0,i.jsx)(ic,{strokeWidth:C.get("strokeWidth",j),dashArray:C.get("dashArray",j),lineCap:C.get("lineCap",j),lineJoin:C.get("lineJoin",j),isHorizontalLine:V,position:K,lineColor:T,effects:W((0,d.readGeomEffects)(C,j)),shouldAnimateTransitions:o}),k!==null&&k!==""&&(0,i.jsx)(ac,{label:k,textStyle:P,textWidth:E,labelPosition:t.params.labelPosition,isHorizontalLine:V,position:K,color:T,textColor:O,symbolShape:m,symbolColor:y,symbolPaint:f.fill,symbolAlpha:f.alpha,symbolCornerRadius:f.cornerRadius,symbolGlyph:f.symbol,symbolMainAxis:(0,d.readMainAxis)(r),panelWidth:a,shouldAnimateTransitions:o})]})}),lc=(e,t)=>e.textColor===void 0?(0,d.pickReadableTextColor)(t):e.isTextColorThemed?(0,d.ensureReadableTextColor)(e.textColor,t):e.textColor,cc={geom:"rule",coord:"cartesian",render:({layer:e,coordSystem:t,formattingLocale:r,shouldAnimateTransitions:n,panelRect:o})=>(0,i.jsx)(sc,{layer:e,coordSystem:t,formattingLocale:r,shouldAnimateTransitions:n,panelWidth:o.width}),renderHover:()=>null,renderHoverCompanions:()=>null},dc=({layer:e,panelRect:t,styleReaders:r,shouldAnimateTransitions:n})=>{let o="";for(const a of e.data){const s=(0,d.getPaintedTileRect)(a);s!==null&&(o+=de(Ae(s,t),r.get("cornerRadius",a)))}return o===""?[]:[{kind:"region",pathData:o,shouldAnimateTransitions:n}]},So=({intro:e,children:t})=>(0,v.useContext)(bt)?.isFading?t:(0,i.jsx)(R.motion.g,{initial:{opacity:0},animate:{opacity:1},transition:Wn(e),children:t}),uc=(0,v.memo)(function({layer:t,shouldAnimateTransitions:r,intro:n}){const o=n?.type==="fade"?n:null,a=F(t),{paints:s,paintAt:l}=et(t,a),{fillFor:c,defs:u}=Y({paints:s}),h=(0,v.useMemo)(()=>{const g=(0,d.createStableCellKeyGenerator)(t.data,t.mapping,t.id),p=[];let m=-1;for(const f of t.data){m+=1;const y=(0,d.getPaintedTileRect)(f);y&&p.push({key:g(f),...y,fill:c(l(m)),opacity:a.get("alpha",f)*a.get("fillAlpha",f),rx:a.get("cornerRadius",f),stroke:a.get("stroke",f),strokeWidth:a.get("strokeWidth",f),effects:W((0,d.readGeomEffects)(a,f))})}return p.map(({key:f,...y})=>(0,i.jsx)(hc,{...y,isAnimated:r},f))},[t,a,r,c,l]);return o?(0,i.jsxs)(So,{intro:o,children:[u,h]}):(0,i.jsxs)(i.Fragment,{children:[u,h]})}),hc=({isAnimated:e,...t})=>e?(0,i.jsx)(R.motion.rect,{initial:!1,style:t.effects,transition:ee,fill:t.fill,opacity:t.opacity,rx:t.rx,stroke:t.stroke,strokeWidth:t.strokeWidth,animate:{attrX:(0,d.toPercent)(t.x),attrY:(0,d.toPercent)(t.y),width:(0,d.toPercent)(t.width),height:(0,d.toPercent)(t.height)}}):(0,i.jsx)("rect",{style:t.effects,x:(0,d.toPercent)(t.x),y:(0,d.toPercent)(t.y),width:(0,d.toPercent)(t.width),height:(0,d.toPercent)(t.height),fill:t.fill,opacity:t.opacity,rx:t.rx,stroke:t.stroke,strokeWidth:t.strokeWidth}),gc=({layer:e,primary:t,panelRect:r})=>{const n=F(e),o=n.get("fill",t.observation),{fillFor:a,defs:s}=Y({paints:[o]}),l=(0,d.getPaintedTileRect)(t.observation);if(!l)return null;const c=a(o),u=n.get("alpha",t.observation)*n.get("fillAlpha",t.observation),h=n.get("stroke",t.observation,"hovered")??d.DEFAULT_HOVER_AFFORDANCE_COLOR,g=n.get("strokeWidth",t.observation,"hovered"),p=n.get("cornerRadius",t.observation,"hovered"),m=l.x*r.width,f=l.y*r.height,y=l.width*r.width,x=l.height*r.height;return(0,i.jsxs)("g",{"data-testid":"hovered-tile",children:[s,(0,i.jsx)("rect",{x:m-g,y:f-g,width:y+g*2,height:x+g*2,rx:p+g,fill:h,"data-testid":"hovered-tile-border"}),(0,i.jsx)("rect",{x:(0,d.toPercent)(l.x),y:(0,d.toPercent)(l.y),width:(0,d.toPercent)(l.width),height:(0,d.toPercent)(l.height),rx:p,fill:c,opacity:u,"data-testid":"hovered-tile-fill"})]})},fc={geom:"tile",coord:"cartesian",swatchShape:"square",guideMode:null,render:({layer:e,shouldAnimateTransitions:t,intro:r})=>(0,i.jsx)(uc,{layer:e,shouldAnimateTransitions:t,intro:r}),renderHover:({layer:e,primary:t,panelRect:r})=>(0,i.jsx)(gc,{layer:e,primary:t,panelRect:r}),renderHoverCompanions:()=>null,getEditOutlineShapes:dc},ut=({primary:e,companions:t})=>{const r=(0,i.jsxs)(i.Fragment,{children:[t.map(n=>(0,i.jsx)(me,{hit:n,project:$},`companion-${n.layerId}-${n.pointIndex}`)),e?(0,i.jsx)(Ne,{hit:e,project:$}):null]});return e?(0,i.jsx)("g",{"data-testid":"hovered-point",children:r}):r},Po=e=>{const t=Fe(e);return{origin:{x:t.centerX,y:t.centerY},scaleX:t.radius,scaleY:t.radius}},vc=e=>({...Fe(e),digits:2}),wo=(e,t,r)=>Q(e,t,Fe(r)),Qt=e=>{const[t,...r]=e;if(!t)return"";const n=r.map(o=>`L ${o.x} ${o.y}`).join(" ");return`M ${t.x} ${t.y} ${n} Z`},pc=(0,v.memo)(function({layer:t,panelRect:r}){const n=F(t),o=(0,v.useMemo)(()=>{const l=(0,d.createStableKeyGenerator)(t.data,t.mapping,t.id),c=[];return t.data.groupBy(d.GROUP_VARIABLES.group).forEach(u=>{const h=[...u],g=jo(h);if(!g)return;const p=h[0];if(!p)return;const m=n.get("fill",p);c.push({key:l(p),fillPath:g.fillPath,outlinePath:g.outlinePath,paint:m,stroke:n.get("stroke",p)??(0,d.toPaintColor)(m),fillOpacity:n.get("fillAlpha",p)*n.get("alpha",p),strokeOpacity:n.get("strokeAlpha",p)*n.get("alpha",p),strokeWidth:n.get("strokeWidth",p)})}),c},[t.data,t.id,t.mapping,n]),{fillFor:a,defs:s}=Y({paints:(0,v.useMemo)(()=>o.map(l=>l.paint),[o]),unitsPerPixel:$e(r)});return(0,i.jsxs)(ie,{viewBox:"-1 -1 2 2",preserveAspectRatio:"xMidYMid meet",width:"100%",height:"100%","data-geom":"area",effects:W((0,d.readGeomEffects)(n,t.data.getFirst()??void 0)),className:te,children:[s,o.map(l=>(0,i.jsxs)("g",{children:[(0,i.jsx)("path",{d:l.fillPath,fill:a(l.paint),fillOpacity:l.fillOpacity,fillRule:"evenodd"}),(0,i.jsx)("path",{d:l.outlinePath,fill:"none",stroke:l.stroke,strokeWidth:l.strokeWidth,opacity:l.strokeOpacity,vectorEffect:"non-scaling-stroke"})]},l.key))]})}),jo=e=>{const t=ko(e);if(t===null)return null;const r=Qt(t.outer);return{fillPath:t.hole===null?r:`${r} ${Qt(t.hole)}`,outlinePath:r}},ko=e=>{const t=[];for(const o of e){const a=(0,d.getX)(o),{innerRadius:s,outerRadius:l}=(0,d.getRadiusExtent)(o);a===null||s===null||l===null||t.push({angle:a,outer:Q(a,l),inner:Q(a,s)})}if(t.length===0)return null;t.sort((o,a)=>o.angle-a.angle);const r=t.map(o=>o.outer),n=t.map(o=>o.inner);return{outer:r,hole:n.some(o=>o.x!==0||o.y!==0)?[...n].reverse():null}},mc=({layer:e,panelRect:t})=>{const r=Po(t),n=[],o=[];return e.data.groupBy(d.GROUP_VARIABLES.group).forEach(a=>{const s=[...a],[l]=s;if(l===void 0)return;if(s.length===1){const h=(0,d.getX)(l),g=(0,d.getYMax)(l)??(0,d.getY)(l);h!==null&&g!==null&&o.push(wo(h,g,t));return}const c=ko(s);if(c===null)return;const u=c.hole===null?"":Yt(c.hole,r);n.push({kind:"region",key:String((0,d.getGroup)(l)),pathData:Yt(c.outer,r)+u,fillRule:"evenodd"})}),o.length>0&&n.push({kind:"dots",centers:o,size:d.DEFAULT_POINT_SIZE_PX}),n},xc=({layer:e,primary:t,companions:r,panelRect:n})=>{const o=F(e),a=(0,d.getGroup)(t.observation),s=o.get("fill",t.observation,"hovered"),{fillFor:l,defs:c}=Y({paints:[s],unitsPerPixel:$e(n)}),u=(0,v.useMemo)(()=>jo([...e.data.filter(d.GROUP_VARIABLES.group,"eq",a)]),[e.data,a]);if(!u)return null;const h=o.get("stroke",t.observation,"hovered")??(0,d.toPaintColor)(s),g=o.get("alpha",t.observation,"hovered"),p=o.get("fillAlpha",t.observation,"hovered")*g,m=o.get("strokeAlpha",t.observation,"hovered")*g,f=o.get("strokeWidth",t.observation,"hovered");return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(ie,{viewBox:"-1 -1 2 2",preserveAspectRatio:"xMidYMid meet",width:"100%",height:"100%","data-geom":"area","data-testid":"hovered-area",effects:W((0,d.readGeomEffects)(o,t.observation,"hovered")),className:te,children:[c,(0,i.jsx)("path",{d:u.fillPath,fill:l(s),fillOpacity:p,fillRule:"evenodd","data-testid":"hovered-area-fill"}),(0,i.jsx)("path",{d:u.outlinePath,fill:"none",stroke:h,strokeWidth:f,opacity:m,vectorEffect:"non-scaling-stroke","data-testid":"hovered-area-edge"})]}),r.map(y=>(0,i.jsx)(me,{hit:y,project:$},`companion-${y.layerId}-${y.pointIndex}`)),(0,i.jsx)(Ne,{hit:t,project:$,"data-testid":"hovered-area-point"})]})},yc={geom:"area",coord:"polar",swatchShape:"area",guideMode:"crosshair",render:({layer:e,panelRect:t})=>(0,i.jsx)(pc,{layer:e,panelRect:t}),renderHover:({layer:e,primary:t,group:r,related:n,panelRect:o})=>(0,i.jsx)(xc,{layer:e,primary:t,companions:[...r,...n],panelRect:o}),renderHoverCompanions:({related:e})=>(0,i.jsx)(ut,{companions:e}),getEditOutlineShapes:mc,getOverlayAnchor:({observation:e})=>{const t=(0,d.getX)(e),r=(0,d.getYMax)(e)??(0,d.getY)(e);if(t===null||r===null)return null;const{x:n,y:o}=$(t,r);return{x:n,y:1-o}}},ur=e=>{const{startAngle:t,endAngle:r}=(0,d.getAngleExtent)(e),{innerRadius:n,outerRadius:o}=(0,d.getRadiusExtent)(e);return t===null||r===null||n===null||o===null?null:{startAngle:t,endAngle:r,innerRadius:n,outerRadius:o}},Eo=(e,t,r,n)=>{const o=new Map;let a=-1;for(const l of e.data){a+=1;const c=ur(l);if(c===null)continue;const u=(0,d.buildSliceGroupKey)(t,c),h=n(l,c,a),g=o.get(u);g===void 0?o.set(u,{firstObservation:l,members:[h]}):g.members.push(h)}const s=new Map;for(const[l,{firstObservation:c,members:u}]of o)s.set(l,{style:St(r,c),union:(0,d.getUnionExtent)(u),members:u});return s},hr=(e,t,r)=>{const n=Eo(e,t,r,(a,s)=>s),o=new Map;for(const[a,{style:s,union:l}]of n)o.set(a,{style:s,union:l});return o},bc=(e,t,r,n,o)=>e.get((0,d.buildSliceGroupKey)(t,o))??{style:St(r,n),union:(0,d.getUnionExtent)([o])},gr=({style:e,union:t})=>(0,d.resolvePolarBarCornerRadiusUnit)(e.cornerRadius,t.outerRadius-t.innerRadius),Ro=(e,t,r,n)=>(0,d.buildPolarBarArcPath)({...t.union,cornerRadius:gr(t),slice:r==="x"?{axis:"radius",from:e.innerRadius,to:e.outerRadius}:{axis:"angle",from:e.startAngle,to:e.endAngle}},n),Ac=Un(hr),Sc=({layer:e,sourceLayer:t,coordSystem:r,panelRect:n,styleReaders:o,shouldAnimateTransitions:a})=>{const{bandAxis:s}=r,l=Ac(t,s,o),c=vc(n);let u="";for(const h of e.data){const g=ur(h);if(g===null)continue;const p=l.get((0,d.buildSliceGroupKey)(s,g));p!==void 0&&(u+=Ro(g,p,s,c)??"")}return u===""?[]:[{kind:"region",pathData:u,shouldAnimateTransitions:a}]},$r=Math.PI*2,ht=(e,t)=>({stroke:e,strokeWidth:t,vectorEffect:"non-scaling-stroke"}),Pc=(0,v.memo)(function({layer:t,coordSystem:r,shouldAnimateTransitions:n,intro:o,panelRect:a}){const s=(0,v.useId)(),l=Pt(o?.type==="grow"&&(o.growAxis==="angle"||o.growAxis==="radius")?o:null,n),c=r.bandAxis!=="x",u=F(t),{paints:h,paintAt:g}=et(t,u),{fillFor:p,defs:m}=Y({paints:h,unitsPerPixel:$e(a)}),f=(0,v.useMemo)(()=>{const y=(0,d.createStableKeyGenerator)(t.data,t.mapping,t.id);return[...Eo(t,r.bandAxis,u,(x,S,A)=>({key:y(x),...S,fill:p(g(A)),opacity:u.get("alpha",x)*u.get("fillAlpha",x)})).values()].map((x,S)=>({...x,key:x.members[0]?.key??String(S)}))},[t,r.bandAxis,u,p,g]);return(0,i.jsxs)(ie,{viewBox:"-1 -1 2 2",preserveAspectRatio:"xMidYMid meet",width:"100%",height:"100%","data-geom":"bar",effects:W((0,d.readGeomEffects)(u,t.data.getFirst()??void 0)),className:te,children:[m,f.map((y,x)=>{const{stroke:S,strokeWidth:A,strokeAlpha:P}=y.style,w=S!==void 0,k=(0,d.resolveBarBorderTreatment)(A),E=S===void 0?{}:ht(S,k.separatorWidth),C=S===void 0?void 0:ht(S,k.outlineWidth),j=y.members.map(K=>{const{key:H,...ve}=K;return l.isAnimated?(0,i.jsx)(wc,{...ve,animation:l,sweepsInOnLateMount:c,introKey:H,pathProps:{fill:ve.fill,opacity:ve.opacity,...E}},H):(0,i.jsx)("path",{d:(0,d.buildPolarBarArcPath)(ve)??void 0,fill:ve.fill,opacity:ve.opacity,...E},H)}),T=gr(y);if(!w&&T<=0)return(0,i.jsx)(v.Fragment,{children:j},y.key);const O=`${s}${x}`;if(l.isAnimated)return(0,i.jsx)("g",{clipPath:`url(#${O})`,children:(0,i.jsx)(jc,{...y.union,cornerRadius:T,animation:l,sweepsInOnLateMount:c,introKey:y.members[0]?.key,clipId:O,outlineProps:C,outlineOpacity:P,children:j})},y.key);const V=(0,d.buildPolarBarArcPath)({...y.union,cornerRadius:T});return(0,i.jsxs)("g",{clipPath:`url(#${O})`,children:[(0,i.jsx)("clipPath",{id:O,children:(0,i.jsx)("path",{d:V})}),j,C!==void 0&&(0,i.jsx)("path",{d:V,fill:"none",opacity:P,...C})]},y.key)})]})}),Co=({startAngle:e,endAngle:t,innerRadius:r,outerRadius:n,cornerRadius:o,animation:a,sweepsInOnLateMount:s,introKey:l})=>{const c=a.activeIntro?.growAxis==="angle"?a.activeIntro:null,u=a.activeIntro?.growAxis==="radius"?a.activeIntro:null,h=s&&!a.isLayerEntrance,g=c?.baseline??(h?$r:e),p=c?.baseline??(h?$r:t),m=u?u.baseline:r,f=u?u.baseline:n,y=(0,R.useMotionValue)(g),x=(0,R.useMotionValue)(p),S=(0,R.useMotionValue)(m),A=(0,R.useMotionValue)(f),P=(0,R.useMotionValue)((0,d.buildPolarBarArcPath)({startAngle:g,endAngle:p,innerRadius:m,outerRadius:f,cornerRadius:o})??""),w=Xt(a,l,c);(0,v.useEffect)(()=>{const E=w(),C=[(0,R.animate)(y,e,E),(0,R.animate)(x,t,E)];return()=>{for(const j of C)j.stop()}},[y,x,e,t,w]);const k=Xt(a,l,u);return(0,v.useEffect)(()=>{const E=k(),C=[(0,R.animate)(S,r,E),(0,R.animate)(A,n,E)];return()=>{for(const j of C)j.stop()}},[S,A,r,n,k]),(0,v.useEffect)(()=>{const E=()=>{P.set((0,d.buildPolarBarArcPath)({startAngle:y.get(),endAngle:x.get(),innerRadius:S.get(),outerRadius:A.get(),cornerRadius:o})??"")};E();const C=[y,x,S,A].map(j=>j.on("change",E));return()=>{for(const j of C)j()}},[y,x,S,A,o,P]),P},wc=({pathProps:e,...t})=>{const r=Co(t);return(0,i.jsx)(R.motion.path,{d:r,transition:ee,...e})},jc=({clipId:e,outlineProps:t,outlineOpacity:r,children:n,...o})=>{const a=Co(o);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("clipPath",{id:e,children:(0,i.jsx)(R.motion.path,{d:a})}),n,t!==void 0&&(0,i.jsx)(R.motion.path,{d:a,fill:"none",opacity:r,transition:ee,...t})]})},kc=(e,t,r)=>{const n=e==="solo"||e==="floor",o=e==="solo"||e==="ceiling",a=!(0,d.isFullTurnSweep)(r.startAngle,r.endAngle);return t==="x"?{innerArc:n,outerArc:o,startSpoke:a,endSpoke:a}:{innerArc:!0,outerArc:!0,startSpoke:n&&a,endSpoke:o&&a}},Io=({observation:e,bandAxis:t,styleReaders:r,groupPaints:n,state:o,fill:a})=>{const s=(0,v.useId)(),l=ur(e);if(l===null)return null;const c=bc(n,t,r,e,l),u=Ro(l,c,t);if(u===void 0)return null;const h=r.get("alpha",e,o)*r.get("fillAlpha",e,o),{stroke:g,strokeWidth:p,strokeAlpha:m}=c.style;if(g===void 0)return(0,i.jsx)("path",{d:u,fill:a,opacity:h,"data-testid":"arc-segment"});const f=(0,d.resolveBarBorderTreatment)(p),y=kc((0,d.getStackRole)(e),t,c.union),x=Rc(l,Cc(y)),S=(0,d.buildPolarBarArcPath)({...c.union,cornerRadius:gr(c)});return(0,i.jsxs)("g",{clipPath:`url(#${s})`,"data-testid":"arc-segment",children:[(0,i.jsx)("clipPath",{id:s,children:(0,i.jsx)("path",{d:u})}),(0,i.jsx)("path",{d:u,fill:a,opacity:h}),x!==""&&(0,i.jsx)("path",{d:x,fill:"none",opacity:h,...ht(g,f.separatorWidth)}),(0,i.jsx)("path",{d:S,fill:"none",opacity:m,...ht(g,f.outlineWidth)})]})},Ec=({layer:e,sourceLayer:t,coordSystem:r,panelRect:n})=>{const o=F(t),a=(0,v.useMemo)(()=>hr(t,r.bandAxis,o),[t,r.bandAxis,o]),{paints:s,paintAt:l}=et(e,o),{fillFor:c,defs:u}=Y({paints:s,unitsPerPixel:$e(n)}),h=(0,d.createStableKeyGenerator)(e.data,e.mapping,e.id),g=[];let p=-1;for(const m of e.data)p+=1,g.push((0,i.jsx)(Io,{observation:m,bandAxis:r.bandAxis,styleReaders:o,groupPaints:a,fill:c(l(p))},h(m)));return(0,i.jsxs)("svg",{viewBox:"-1 -1 2 2",preserveAspectRatio:"xMidYMid meet",width:"100%",height:"100%","data-geom":"bar",className:te,children:[u,g]})},qe=(e,t)=>{const r=Q(t,e);return`${r.x},${r.y}`},en=(e,t,r)=>{if(e<=0)return"";const n=qe(e,t);if((0,d.isFullTurnSweep)(t,r))return`M${n}A${e},${e} 0 1 1 ${qe(e,t+Math.PI)}A${e},${e} 0 1 1 ${n}`;const o=r-t;return`M${n}A${e},${e} 0 ${Math.abs(o)>Math.PI?1:0} ${o>=0?1:0} ${qe(e,r)}`},tn=(e,t,r)=>`M${qe(t,e)}L${qe(r,e)}`,Rc=(e,t)=>{const{startAngle:r,endAngle:n,innerRadius:o,outerRadius:a}=e,s=(0,d.isFullTurnSweep)(r,n);return[t.innerArc?en(o,r,n):"",t.outerArc?en(a,r,n):"",t.startSpoke&&!s?tn(r,o,a):"",t.endSpoke&&!s?tn(n,o,a):""].filter(Boolean).join("")},Cc=e=>({innerArc:!e.innerArc,outerArc:!e.outerArc,startSpoke:!e.startSpoke,endSpoke:!e.endSpoke}),Ic=({layer:e,coordSystem:t,primary:r,panelRect:n})=>{const o=F(e),a=(0,v.useMemo)(()=>hr(e,t.bandAxis,o),[e,t.bandAxis,o]),s=o.get("fill",r.observation,"hovered"),{fillFor:l,defs:c}=Y({paints:[s],unitsPerPixel:$e(n)});return(0,i.jsxs)(ie,{viewBox:"-1 -1 2 2",preserveAspectRatio:"xMidYMid meet",width:"100%",height:"100%","data-geom":"arc","data-testid":"hovered-arc",effects:W((0,d.readGeomEffects)(o,r.observation,"hovered")),className:te,children:[c,(0,i.jsx)(Io,{observation:r.observation,bandAxis:t.bandAxis,styleReaders:o,groupPaints:a,state:"hovered",fill:l(s)})]})},Mc={geom:"bar",coord:"polar",swatchShape:"slice",guideMode:"band",render:({layer:e,coordSystem:t,shouldAnimateTransitions:r,intro:n,panelRect:o})=>(0,i.jsx)(Pc,{layer:e,coordSystem:t,shouldAnimateTransitions:r,intro:n,panelRect:o}),renderHighlight:({layer:e,sourceLayer:t,coordSystem:r,panelRect:n})=>(0,i.jsx)(Ec,{layer:e,sourceLayer:t,coordSystem:r,panelRect:n}),renderHover:({layer:e,coordSystem:t,primary:r,panelRect:n})=>(0,i.jsx)(Ic,{layer:e,coordSystem:t,primary:r,panelRect:n}),renderHoverCompanions:()=>null,getEditOutlineShapes:Sc},Tc=(0,v.memo)(function({layer:t}){const r=F(t),n=(0,v.useMemo)(()=>{const o=(0,d.createStableKeyGenerator)(t.data,t.mapping,t.id),a=[];return t.data.groupBy(d.GROUP_VARIABLES.group).forEach(s=>{const l=[...s],c=Mo(l);if(!c)return;const u=l[0];u&&a.push({key:o(u),pathData:c,color:r.get("stroke",u),opacity:r.get("alpha",u),strokeOpacity:r.get("strokeAlpha",u),strokeWidth:r.get("strokeWidth",u),lineCap:r.get("lineCap",u),lineJoin:r.get("lineJoin",u),strokeDasharray:(0,d.toStrokeDasharray)(r.get("dashArray",u),r.get("strokeWidth",u))})}),a},[t.data,t.id,t.mapping,r]);return(0,i.jsx)(ie,{viewBox:"-1 -1 2 2",preserveAspectRatio:"xMidYMid meet",width:"100%",height:"100%","data-geom":"line",effects:W((0,d.readGeomEffects)(r,t.data.getFirst()??void 0)),className:te,children:n.map(o=>(0,i.jsx)("path",{d:o.pathData,fill:"none",stroke:o.color,strokeWidth:o.strokeWidth,opacity:o.opacity,strokeOpacity:o.strokeOpacity,strokeDasharray:o.strokeDasharray,strokeLinecap:o.lineCap,strokeLinejoin:o.lineJoin,vectorEffect:"non-scaling-stroke"},o.key))})}),Mo=e=>{const t=To(e);return t.length===0?null:Qt(t)},To=e=>{const t=[];for(const r of e){const n=(0,d.getX)(r),o=(0,d.getY)(r);n===null||o===null||t.push({angle:n,point:Q(n,o)})}return t.sort((r,n)=>r.angle-n.angle),t.map(r=>r.point)},Bc=({layer:e,panelRect:t,styleReaders:r})=>{const n=Po(t),o=[],a=[];return e.data.groupBy(d.GROUP_VARIABLES.group).forEach(s=>{const l=[...s],[c]=l;if(c===void 0)return;if(l.length===1){const h=(0,d.getX)(c),g=(0,d.getY)(c);h!==null&&g!==null&&a.push(wo(h,g,t));return}const u=Yt(To(l),n);u!==""&&o.push({kind:"stroke",key:String((0,d.getGroup)(c)),pathData:u,width:r.get("strokeWidth",c)})}),a.length>0&&o.push({kind:"dots",centers:a,size:d.DEFAULT_POINT_SIZE_PX}),o},Oc=({layer:e,primary:t,companions:r})=>{const n=F(e),o=(0,d.getGroup)(t.observation),a=(0,v.useMemo)(()=>Mo([...e.data.filter(d.GROUP_VARIABLES.group,"eq",o)]),[e.data,o]);if(!a)return null;const s=n.get("stroke",t.observation,"hovered"),l=n.get("alpha",t.observation,"hovered"),c=n.get("strokeAlpha",t.observation,"hovered"),u=n.get("strokeWidth",t.observation,"hovered"),h=(0,d.toStrokeDasharray)(n.get("dashArray",t.observation,"hovered"),u),g=n.get("lineCap",t.observation,"hovered"),p=n.get("lineJoin",t.observation,"hovered");return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ie,{viewBox:"-1 -1 2 2",preserveAspectRatio:"xMidYMid meet",width:"100%",height:"100%","data-geom":"line","data-testid":"hovered-line",effects:W((0,d.readGeomEffects)(n,t.observation,"hovered")),className:te,children:(0,i.jsx)("path",{d:a,fill:"none",stroke:s,strokeWidth:u,opacity:l,strokeOpacity:c,strokeDasharray:h,strokeLinecap:g,strokeLinejoin:p,vectorEffect:"non-scaling-stroke","data-testid":"hovered-line-path"})}),r.map(m=>(0,i.jsx)(me,{hit:m,project:$},`companion-${m.layerId}-${m.pointIndex}`)),(0,i.jsx)(Ne,{hit:t,project:$,"data-testid":"hovered-line-point"})]})},Lc={geom:"line",coord:"polar",swatchShape:"line",guideMode:"crosshair",render:({layer:e})=>(0,i.jsx)(Tc,{layer:e}),renderHover:({layer:e,primary:t,group:r,related:n})=>(0,i.jsx)(Oc,{layer:e,primary:t,companions:[...r,...n]}),renderHoverCompanions:({related:e})=>(0,i.jsx)(ut,{companions:e}),getEditOutlineShapes:Bc,getOverlayAnchor:({observation:e})=>{const t=(0,d.getX)(e),r=(0,d.getY)(e);if(t===null||r===null)return null;const{x:n,y:o}=$(t,r);return{x:n,y:1-o}}},Fc=(0,v.memo)(function({layer:t,shouldAnimateTransitions:r,intro:n}){const o=F(t),a=Pt(n?.type==="grow"&&n.growAxis==="size"?n:null,r);return(0,v.useMemo)(()=>{const s=a.activeIntro?(0,d.createStableKeyGenerator)(t.data,t.mapping,t.id):null,l=[];let c=0;for(const u of t.data)l.push((0,i.jsx)(Jn,{observation:u,project:$,styleReaders:o,animation:a,introKey:s?.(u)},String(c++)));return l},[t.data,t.mapping,t.id,o,a])}),Nc={geom:"point",coord:"polar",swatchShape:"circle",render:({layer:e,shouldAnimateTransitions:t,intro:r})=>(0,i.jsx)(Fc,{layer:e,shouldAnimateTransitions:t,intro:r}),renderHover:({primary:e,group:t,related:r})=>(0,i.jsx)(ut,{primary:e,companions:[...t,...r]}),renderHoverCompanions:({related:e})=>(0,i.jsx)(ut,{companions:e}),getEditOutlineShapes:e=>_n({...e,project:$}),getOverlayAnchor:({observation:e})=>{const t=(0,d.getX)(e),r=(0,d.getY)(e);if(t===null||r===null)return null;const{x:n,y:o}=$(t,r);return{x:n,y:1-o}}},Bo={bar:{cartesian:Us,polar:Mc},line:{cartesian:Zs,polar:Lc},area:{cartesian:ps,polar:yc},point:{cartesian:$s,polar:Nc},rule:{cartesian:cc},tile:{cartesian:fc}};function Rt(e){return typeof e=="function"?{overlay:!1,fn:e}:{overlay:!0,fn:e.fn}}function Oo(e){return e?Rt(e.render).overlay:!1}function Dc(e,t){return typeof e=="string"?{...t,geom:e}:{...t,definition:e,geom:e.type}}function Lo(e=[]){const t={};for(const[r,n]of Object.entries(Bo))t[r]={...n};for(const r of e)(t[r.geom]??={})[r.coord]=r;return(r,n)=>t[r]?.[n]??null}var Fo=["top","right","bottom","left"],Hc=()=>(0,er.createStore)(e=>({boundary:null,setBoundary:t=>e(r=>Gc(r.boundary,t)?r:{boundary:t})})),gt=(e,t)=>e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height,qt=(e,t)=>Fo.every(r=>e[r].from===t[r].from&&e[r].to===t[r].to),Gc=(e,t)=>e===t?!0:e===null||t===null?!1:gt(e.frame,t.frame)&>(e.client,t.client)&&qt(e.frameSpans,t.frameSpans)&&qt(e.clientSpans,t.clientSpans),ft=e=>{const t=(0,v.useRef)(e);return t.current=e,t},Wc=()=>{const e=new Map;return(0,er.createStore)(t=>({hover:d.RESTING_HOVER_STATE,tooltipAnchor:null,pointerRegions:[],isPointerSuspended:!1,isQueryOwnedByEditor:!1,setHoverState:r=>t(n=>n.hover===r?n:{hover:r}),setTooltipAnchor:r=>t(n=>Vc(n.tooltipAnchor,r)?n:{tooltipAnchor:r}),publishPointerRegions:(r,n)=>{n.length===0?e.delete(r):e.set(r,n);const o=(0,d.orderPointerRegions)(e);t(a=>(0,d.arePointerRegionListsEqual)(a.pointerRegions,o)?a:{pointerRegions:o})},setPointerSuspended:r=>t(n=>n.isPointerSuspended===r?n:{isPointerSuspended:r}),setQueryOwnedByEditor:r=>t(n=>n.isQueryOwnedByEditor===r?n:{isQueryOwnedByEditor:r})}))},Vc=(e,t)=>e===t?!0:e===null||t===null?!1:e.x===t.x&&e.y===t.y&&e.placement===t.placement&&e.annotationId===t.annotationId,Uc=(e,t)=>{const r=(0,v.useMemo)(()=>({layers:e,coordSystem:t}),[e,t]),n=(0,v.useRef)(null);n.current===null&&(n.current=new d.HoverEngine(r));const o=n.current,a=(0,v.useRef)(!1);return(0,v.useEffect)(()=>{if(!a.current){a.current=!0;return}o.update(r)},[o,r]),o},No=(0,v.createContext)(null),Do=({children:e})=>{const{layers:t,coordSystem:r}=M((0,q.useShallow)(l=>({layers:l.layers,coordSystem:l.coordSystem}))),n=Uc(t,r),[o]=(0,v.useState)(()=>Wc()),a=(0,v.useRef)(null),s=(0,v.useRef)(null);return s.current===null&&(s.current={engine:n,store:o,overlayRef:a}),(0,i.jsx)(No.Provider,{value:s.current,children:e})},xe=()=>{const e=(0,v.useContext)(No);if(e===null)throw new Error("useHoverContext must be used inside a <HoverProvider>.");return e};function Ho(e,t){const{engine:r}=xe(),n=(0,v.useRef)(t);(0,v.useEffect)(()=>{n.current=t},[t]),(0,v.useEffect)(()=>(r.registerHitTester(e,o=>n.current(o)),()=>r.unregisterHitTester(e)),[r,e])}var zc=({hitTest:e,input:t})=>{const r=(0,v.useMemo)(()=>e(t),[e,t.layer.data,t.panelRect.x,t.panelRect.y,t.panelRect.width,t.panelRect.height]);return Ho(t.layer.id,r),null},Yc="graphy_root",fr=()=>typeof document>"u"?null:document.getElementById(Yc)??document.body,Kc="_10igzta0",Go=({rect:e,zIndex:t,container:r,boxRef:n,children:o,...a})=>r===null?null:(0,Mn.createPortal)((0,i.jsx)("div",{...a,ref:n,className:Kc,style:{transform:`translate(${e.left}px, ${e.top}px)`,width:e.width,height:e.height,zIndex:t},children:o}),r),Xc=({rect:e,children:t})=>{const[r]=(0,v.useState)(fr);return(0,i.jsx)(Go,{rect:e,zIndex:Ce.panelOverlay,container:r,children:t})},Wo=(e,t)=>{const r=ft(e),n=ft(t),o=(0,v.useRef)(null),a=(0,v.useRef)(null),s=(0,v.useMemo)(()=>{const l=()=>{a.current!==null&&(clearTimeout(a.current),a.current=null),o.current=null},c=()=>{a.current!==null&&(clearTimeout(a.current),a.current=null);const h=o.current;h!==null&&(o.current=null,r.current(...h))};return{run:(...h)=>{if(n.current<=0){r.current(...h);return}o.current=h,a.current!==null&&clearTimeout(a.current),a.current=setTimeout(c,n.current)},flush:c,cancel:l}},[r,n]);return(0,v.useEffect)(()=>()=>{a.current!==null&&clearTimeout(a.current)},[]),s},Qc={width:0,height:0,isDefault:!0},Vo=({debounce:e=0,onResize:t}={})=>{const[r,n]=(0,v.useState)(Qc),o=(0,v.useRef)(null),a=Wo(u=>{const h=o.current;h&&h.width===u.width&&h.height===u.height||(o.current={width:u.width,height:u.height},t?.(u),n(u))},e),s=(0,v.useRef)(null),l=(0,v.useRef)(null),c=(0,v.useCallback)(u=>{s.current!==u&&(s.current&&l.current?.unobserve(s.current),s.current=u,u&&(l.current??=new ResizeObserver(([h])=>{if(!h)return;const g=Math.round(h.contentBoxSize[0]?.inlineSize??h.contentRect.width),p=Math.round(h.contentBoxSize[0]?.blockSize??h.contentRect.height);a.run({width:g,height:p,isDefault:!1})}),l.current.observe(u)))},[a]);return{...r,setElement:c}};function Uo(){const[e,t]=(0,v.useState)(null),r=(0,v.useRef)(null),n=(0,v.useRef)(null),o=(0,v.useRef)(null),a=(0,v.useCallback)(()=>{o.current=null;const u=n.current;if(!u)return;const h=u.getBoundingClientRect();if(h.width===0||h.height===0){r.current!==null&&(r.current=null,t(null));return}const g={left:h.left,top:h.top,width:h.width,height:h.height},p=r.current;p&&p.left===g.left&&p.top===g.top&&p.width===g.width&&p.height===g.height||(r.current=g,t(g))},[]),s=(0,v.useCallback)(()=>{o.current===null&&(o.current=requestAnimationFrame(a))},[a]),{setElement:l}=Vo({onResize:s}),c=(0,v.useCallback)(u=>{n.current=u,l(u),u&&a()},[l,a]);return(0,v.useEffect)(()=>(window.addEventListener("scroll",s,!0),window.addEventListener("resize",s),()=>{window.removeEventListener("scroll",s,!0),window.removeEventListener("resize",s),o.current!==null&&cancelAnimationFrame(o.current)}),[s]),{measureRef:c,screenRect:e}}function zo(e){const{engine:t,store:r}=xe();return(0,v.useCallback)((n,o)=>{const{hover:a,setHoverState:s,setTooltipAnchor:l}=r.getState(),c=n===null?d.RESTING_HOVER_STATE:t.resolveHoverByKey(e,n);if(c.primary===null){a.primary?.layerId===e&&(s(d.RESTING_HOVER_STATE),l(null));return}s(c),l(o?{x:o.clientX,y:o.clientY,placement:"top"}:null)},[t,r,e])}var qc=({render:e,input:t})=>{const r=zo(t.layer.id),{measureRef:n,screenRect:o}=Uo();return(0,v.useEffect)(()=>()=>r(null),[r]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("rect",{ref:n,x:0,y:0,width:"100%",height:"100%",fill:"none",pointerEvents:"none"}),o&&(0,i.jsx)(Xc,{rect:o,children:(0,i.jsx)(Jc,{render:e,input:t,pushHover:r,panelRect:o})})]})},Jc=({render:e,input:t,pushHover:r,panelRect:n})=>e({...t,overlay:{pushHover:r,panelRect:n}}),ae={readonly:"readonly",editable:"editable",pointAndEdit:"point-and-edit"},ge={[ae.readonly]:{tooltips:!0,annotations:!0,observationMenu:!1,hoverPaint:!0,editOutline:!1,overlayMenu:!1,observationsPress:!1,graphPress:!1,guidePress:!1,holdsHoverWhileSelected:!0,tolerance:null,editorSurface:!1,inlineTextEditing:!1},[ae.editable]:{tooltips:!1,annotations:!0,observationMenu:!0,hoverPaint:!0,editOutline:!1,overlayMenu:!1,observationsPress:!1,graphPress:!1,guidePress:!1,holdsHoverWhileSelected:!0,tolerance:null,editorSurface:!0,inlineTextEditing:!0},[ae.pointAndEdit]:{tooltips:!1,annotations:!1,observationMenu:!1,hoverPaint:!1,editOutline:!0,overlayMenu:!0,observationsPress:!0,graphPress:!0,guidePress:!0,holdsHoverWhileSelected:!1,tolerance:{on:{edge:2,stroke:5,point:14},near:{main:8,cross:20}},editorSurface:!0,inlineTextEditing:!1}},Zc=new Set(Object.values(ae)),_c=e=>Zc.has(e),vr=e=>_c(e)?e:ae.readonly,vt={enabled:!0,trigger:"mount",durationScale:1,stagger:!0,staggerOrder:"main-axis"},rn=1500,$c=(e,t)=>t?{intro:{...vt,enabled:!1},transitions:!1,maxAnimatedGeoms:rn}:typeof e=="boolean"?{intro:{...vt,enabled:e},transitions:e,maxAnimatedGeoms:rn}:{intro:ed(e?.intro),transitions:e?.transitions??!0,maxAnimatedGeoms:e?.maxAnimatedGeoms??1500},ed=e=>typeof e=="boolean"?{...vt,enabled:e}:(0,Ti.merge)({},vt,e),td=(e,t)=>{const r=(0,R.useReducedMotion)(),n=(0,v.useMemo)(()=>$c(e,r??!1),[e,r]),o=(0,v.useMemo)(()=>t.reduce((a,s)=>a+(0,d.countLayerGeoms)(s),0),[t]);return(0,v.useMemo)(()=>o<=n.maxAnimatedGeoms?n:{...n,intro:{...n.intro,enabled:!1},transitions:!1},[n,o])},rd={loading:"جاري التحميل",error:"حدث خطأ ما",axisLabels:{placeholder:"إضافة تسمية"},defaultPropertyLabels:{date:"التاريخ",year:"السنة",quarter:"الربع",month:"الشهر",week:"الأسبوع",series:"السلسلة",category:"الفئة",columnNumber:({number:e})=>`العمود ${e}`,rowNumber:({number:e})=>`الصف ${e}`,seriesNumber:({number:e})=>`السلسلة ${e}`},trendComparison:{fromPrevious:{long:({value:e})=>`${e} مقابل السابق`,short:({value:e})=>`${e} مقابل السابق`},fromPreviousYear:{long:({value:e})=>`${e} مقابل السنة السابقة`,short:({value:e})=>`${e} مقابل السنة السابقة`},fromPreviousMonth:{long:({value:e})=>`${e} مقابل الشهر السابق`,short:({value:e})=>`${e} مقابل الشهر السابق`},fromPreviousWeek:{long:({value:e})=>`${e} مقابل الأسبوع السابق`,short:({value:e})=>`${e} مقابل الأسبوع السابق`},fromPreviousDay:{long:({value:e})=>`${e} مقابل اليوم السابق`,short:({value:e})=>`${e} مقابل اليوم السابق`},fromPreviousHour:{long:({value:e})=>`${e} مقابل الساعة السابقة`,short:({value:e})=>`${e} مقابل الساعة السابقة`}},headlineMetrics:{averageLong:({value:e})=>`المتوسط ${e}`,averageShort:({value:e})=>`المتوسط ${e}`,total:({value:e})=>`المجموع ${e}`,totalConversionRate:({value:e})=>`معدل التحويل الإجمالي ${e}`,current:({value:e})=>e,comparisonReference:({value:e})=>`من ${e}`},legend:{hiddenItems:"عناصر وسيلة الإيضاح المخفية"}},nd={graph:rd,dir:"rtl"},od={loading:"Loading",error:"Something went wrong",axisLabels:{placeholder:"Add label"},defaultPropertyLabels:{date:"Date",year:"Year",quarter:"Quarter",month:"Month",week:"Week",series:"Series",category:"Category",columnNumber:({number:e})=>`Column ${e}`,rowNumber:({number:e})=>`Row ${e}`,seriesNumber:({number:e})=>`Series ${e}`},trendComparison:{fromPrevious:{long:({value:e})=>`${e} vs previous`,short:({value:e})=>`${e} vs prev`},fromPreviousYear:{long:({value:e})=>`${e} vs previous year`,short:({value:e})=>`${e} vs prev year`},fromPreviousMonth:{long:({value:e})=>`${e} vs previous month`,short:({value:e})=>`${e} vs prev month`},fromPreviousWeek:{long:({value:e})=>`${e} vs previous week`,short:({value:e})=>`${e} vs prev week`},fromPreviousDay:{long:({value:e})=>`${e} vs previous day`,short:({value:e})=>`${e} vs prev day`},fromPreviousHour:{long:({value:e})=>`${e} vs previous hour`,short:({value:e})=>`${e} vs prev hour`}},headlineMetrics:{averageLong:({value:e})=>`Average ${e}`,averageShort:({value:e})=>`Avg. ${e}`,total:({value:e})=>`Total ${e}`,totalConversionRate:({value:e})=>`Total conversion rate ${e}`,current:({value:e})=>e,comparisonReference:({value:e})=>`from ${e}`},legend:{hiddenItems:"Hidden legend items"}},ad={graph:od,dir:"ltr"},id={},sd={loading:"A carregar",error:"Algo correu mal",axisLabels:{placeholder:"Adicionar etiqueta"},defaultPropertyLabels:{date:"Data",year:"Ano",quarter:"Trimestre",month:"Mês",week:"Semana",series:"Série",category:"Categoria",columnNumber:({number:e})=>`Coluna ${e}`,rowNumber:({number:e})=>`Linha ${e}`,seriesNumber:({number:e})=>`Série ${e}`},trendComparison:{fromPrevious:{long:({value:e})=>`${e} vs anterior`,short:({value:e})=>`${e} vs ant`},fromPreviousYear:{long:({value:e})=>`${e} vs ano anterior`,short:({value:e})=>`${e} vs ano ant`},fromPreviousMonth:{long:({value:e})=>`${e} vs mês anterior`,short:({value:e})=>`${e} vs mês ant`},fromPreviousWeek:{long:({value:e})=>`${e} vs semana anterior`,short:({value:e})=>`${e} vs sem ant`},fromPreviousDay:{long:({value:e})=>`${e} vs dia anterior`,short:({value:e})=>`${e} vs dia ant`},fromPreviousHour:{long:({value:e})=>`${e} vs hora anterior`,short:({value:e})=>`${e} vs hora ant`}},headlineMetrics:{averageLong:({value:e})=>`Média ${e}`,averageShort:({value:e})=>`Méd. ${e}`,total:({value:e})=>`Total ${e}`,totalConversionRate:({value:e})=>`Taxa de conversão total ${e}`,current:({value:e})=>e,comparisonReference:({value:e})=>`de ${e}`},legend:{hiddenItems:"Itens de legenda ocultos"}},ld={graph:sd,dir:"ltr"},Ct={"en-GB":ad,"en-US":id,ar:nd,"pt-PT":ld},cd=({locale:e,overrides:t,fallbackLocale:r="en-GB",dictionaries:n})=>{const o=t??{},a=e??r,s=[...n.map(c=>c[a]),...n.map(c=>c[r])];return(c,u)=>{const h=u??{},g=c.split("."),p=o[c];if(p)return typeof p=="function"?p(h):p;for(const m of s){if(m===void 0)continue;const f=ud(m,g);if(f)return typeof f=="function"?f(h):f}return c}},dd=({locale:e,overrides:t})=>t?.dir??Ct[e].dir??"ltr",ud=(e,t)=>{let r=e;for(const n of t){if(typeof r!="object"||r===null)return;r=r[n]}if(typeof r=="string"||typeof r=="function")return r},hd=e=>{const t="en-GB";if(!e)return t;const r=e.trim().replace("_","-").toLowerCase();return Object.keys(Ct).find(n=>n.toLowerCase()===r)??t},Yo=(0,v.createContext)(null),gd=[Ct],pr=()=>fd().translator,Ko=({locale:e,children:t,i18nOverrides:r,dictionaries:n=gd})=>{const o=hd(e),a=(0,v.useMemo)(()=>({translator:cd({locale:o,overrides:r,fallbackLocale:"en-GB",dictionaries:n}),dir:dd({locale:o,overrides:r})}),[r,o,n]);return(0,i.jsx)(Bi.IntlProvider,{locale:o,timeZone:"UTC",children:(0,i.jsx)(Yo.Provider,{value:a,children:t})})},fd=()=>{const e=(0,v.useContext)(Yo);if(!e)throw new Error("useI18n must be used within IntlProvider");return e},Xo=e=>typeof e=="number"?{topLeft:e,topRight:e,bottomRight:e,bottomLeft:e}:e,It=e=>{if(typeof e=="number")return e;const{topLeft:t,topRight:r,bottomRight:n,bottomLeft:o}=e;return t===r&&r===n&&n===o?t:null},vd=e=>{const{topLeft:t,topRight:r,bottomRight:n,bottomLeft:o}=Xo(e);return t>0||r>0||n>0||o>0},Ge=(e,t=0)=>{const r=It(e);if(r!==null)return`${nn(r,t)}px`;const{topLeft:n,topRight:o,bottomRight:a,bottomLeft:s}=e;return[n,o,a,s].map(l=>`${nn(l,t)}px`).join(" ")},mr=(e,t)=>{const{x:r,y:n,width:o,height:a}=e,{topLeft:s,topRight:l,bottomRight:c,bottomLeft:u}=pd(Xo(t),o,a),h=r+o,g=n+a,p=(m,f,y)=>m>0?`A${m},${m},0,0,1,${f},${y}`:"";return[`M${r+s},${n}`,`H${h-l}`,p(l,h,n+l),`V${g-c}`,p(c,h-c,g),`H${r+u}`,p(u,r,g-u),`V${n+s}`,p(s,r+s,n),"Z"].filter(m=>m!=="").join("")},nn=(e,t)=>e===0?0:e+t,pd=(e,t,r)=>{const{topLeft:n,topRight:o,bottomRight:a,bottomLeft:s}=e,l=Math.min(1,...[[t,n+o],[t,s+a],[r,n+s],[r,o+a]].map(([u=0,h=0])=>h>0?u/h:1)),c=u=>Math.max(0,u*l);return{topLeft:c(n),topRight:c(o),bottomRight:c(a),bottomLeft:c(s)}},Te=(e,t)=>{if(typeof e=="string")return{background:e};if((0,d.isGradientPaint)(e)){const n=e.stops.map(o=>`${o.color} ${o.offset*100}%`).join(", ");return{background:e.gradient==="radial"?`radial-gradient(circle, ${n})`:`linear-gradient(${e.angle??180}deg, ${n})`}}if((0,d.isPatternPaint)(e)){const n=e.size??8,o=n/6;return{background:[...md(e,n,o),...e.background===void 0?[]:[e.background]].join(", "),backgroundSize:`${n}px ${n}px`}}if((e.fit??"tile")==="stretch")return{background:`${sn(an(e,{width:1,height:1}))} no-repeat center, ${e.fallback}`,backgroundSize:"100% 100%"};const r=zn(e,t);return{background:`${sn(an(e,r))} repeat, ${e.fallback}`,backgroundSize:`${r.width}px ${r.height}px`}},md=(e,t,r)=>{if(e.pattern==="dots")return[`radial-gradient(circle, ${e.color} ${r}px, transparent ${r}px)`];if(e.pattern==="lines"){const n=`${t*xs}px`;return[`linear-gradient(to bottom, ${e.color} ${n}, transparent ${n})`]}return[on(-45,e.color,t,r),...e.pattern==="crosshatch"?[on(45,e.color,t,r)]:[]]},on=(e,t,r,n)=>{const o=`${r/Math.SQRT2}px`,a=`${n/2}px`,s=`${r/Math.SQRT2-n/2}px`;return`repeating-linear-gradient(${e}deg, ${t} 0 ${a}, transparent ${a} ${s}, ${t} ${s} ${o})`},an=(e,t)=>{if(e.alpha===void 0||e.alpha>=1)return e.image;const r=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${t.width} ${t.height}" preserveAspectRatio="none"><image href="${xd(e.image)}" width="${t.width}" height="${t.height}" opacity="${e.alpha}" preserveAspectRatio="none"/></svg>`;return`data:image/svg+xml,${encodeURIComponent(r)}`},xd=e=>e.replace(/&/gu,"&").replace(/</gu,"<").replace(/>/gu,">").replace(/"/gu,"""),sn=e=>`url("${e.replace(/[\\"]/gu,"\\$&").replace(/[\n\r\f]/gu,t=>`\\${t.charCodeAt(0).toString(16)} `)}")`,yd="bow4tg0",bd="bow4tg1",Ad="bow4tg2",Sd="bow4tg3",Pd="bow4tg4",xr="_1ii3bsb0",Qo="_1ii3bsb1",qo=(0,v.createContext)({colorScheme:"light",themeClass:xr,inlineVarsStyle:{},themeValues:cr("light",{})}),Mt=()=>(0,v.useContext)(qo),Jo=({colorScheme:e,textScale:t=1,graphBackground:r,graphFontFamily:n,headingFontFamily:o,children:a})=>{const s=(0,v.useMemo)(()=>cr(e),[e]),l=(0,v.useMemo)(()=>{const u={[b.textScale]:String(t)};return r!==void 0&&(u[b.graphBackground]=r),n!==void 0&&(u[b.fontFamily]=n),o!==void 0&&(u[b.fontFamilyHeading]=o),(0,xt.assignInlineVars)(u)},[t,r,n,o]),c=(0,v.useMemo)(()=>({colorScheme:e,themeClass:e==="dark"?Qo:xr,inlineVarsStyle:l,themeValues:s}),[e,l,s]);return(0,i.jsx)(qo.Provider,{value:c,children:a})},Zo=({children:e,className:t,style:r})=>{const{colorScheme:n,themeClass:o,inlineVarsStyle:a}=Mt();return(0,i.jsx)("div",{className:(0,U.default)(o,bd,t),style:{...a,...r},"data-graphy-color-scheme":n,children:e})},_o={modern:"'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI', 'Roboto', 'Oxygen-Sans', 'Ubuntu', 'Cantarell', 'Helvetica Neue', sans-serif",timeless:"'Noto Serif', Georgia, 'Times New Roman', serif",fresh:"'Aeonik', 'Aeonik Fallback', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif",technical:"'PT Mono', 'Courier New', monospace",handwritten:"'Permanent Marker', cursive",fineliner:"'Intruding Cat', cursive"},$o=e=>{const t=e!==null&&typeof e=="object"?e.fontFamily:e;return typeof t=="string"&&t.length>0?t:void 0},Jt=e=>{const t=$o(e);if(t!==void 0)return _o[t]??t},wd="_1cocly40",Be=({content:e})=>(0,i.jsx)(i.Fragment,{children:ea(e.content??[e])}),ea=e=>e.map((t,r)=>jd(t,r)),jd=(e,t)=>{if(e.type==="text")return kd(e,t);if(e.type==="hardBreak"||e.type==="hard_break")return(0,i.jsx)("br",{},t);const r=e.content?ea(e.content):null;switch(e.type){case"doc":return(0,i.jsx)(v.Fragment,{children:r},t);case"heading":{const n=Id(e.attrs?.level);return Md(n,t,r,ln(e.attrs))}case"paragraph":return(0,i.jsx)("p",{"data-variant":yr(e.attrs?.variant)??void 0,style:ta(ln(e.attrs)),children:r},t);case"blockquote":return(0,i.jsx)("blockquote",{children:r},t);case"bulletList":case"bullet_list":return(0,i.jsx)("ul",{children:r},t);case"orderedList":case"ordered_list":return(0,i.jsx)("ol",{children:r},t);case"listItem":case"list_item":return(0,i.jsx)("li",{children:r},t);default:return(0,i.jsx)("span",{children:r},t)}},kd=(e,t)=>{const r=e.text??"";return!e.marks||e.marks.length===0?(0,i.jsx)("span",{children:r},t):e.marks.reduceRight((n,o,a)=>Ed(o,n,`${t}-${a}`),r)},Ed=(e,t,r)=>{switch(e.type){case"bold":case"strong":return(0,i.jsx)("strong",{children:t},r);case"italic":case"em":return(0,i.jsx)("em",{children:t},r);case"underline":return(0,i.jsx)("u",{children:t},r);case"strike":case"strikethrough":case"s":return(0,i.jsx)("s",{children:t},r);case"code":return(0,i.jsx)("code",{children:t},r);case"link":{const n=yr(e.attrs?.href);return(0,d.isSafeUrl)(n)?(0,i.jsx)("a",{className:wd,href:n,rel:"noopener noreferrer",target:"_blank",children:t},r):(0,i.jsx)("span",{children:t},r)}case"textStyle":{const n=Rd(e.attrs);return n?(0,i.jsx)("span",{style:n,children:t},r):(0,i.jsx)("span",{children:t},r)}default:return(0,i.jsx)("span",{children:t},r)}},Rd=e=>{if(!e)return null;const t={},r=yr(e.color);r&&(t.color=r);const n=Jt(e.font)??Jt(e.fontFamily);n&&(t.fontFamily=n);const o=Cd(e.fontSize);return o&&(t.fontSize=o),Object.keys(t).length>0?t:null},Cd=e=>{if(typeof e=="number"&&Number.isFinite(e))return`calc(${e}px * ${b.textScale})`},yr=e=>typeof e=="string"&&e.length>0?e:void 0,Id=e=>typeof e!="number"?3:e<1?1:e>3?3:Math.round(e),Md=(e,t,r,n)=>{const o=ta(n);switch(e){case 1:return(0,i.jsx)("h1",{style:o,children:r},t);case 2:return(0,i.jsx)("h2",{style:o,children:r},t);case 3:return(0,i.jsx)("h3",{style:o,children:r},t)}},ln=e=>{const t=e?.textAlign;if(t==="left"||t==="right"||t==="center"||t==="justify")return t},ta=e=>e?{textAlign:e}:void 0;function Ie(e){const{store:t}=xe();return(0,Oe.useStore)(t,e)}var Td="_19519k80";var Bd="_19519k82",Od="_19519k83";var Ld="_19519k86",Fd="_19519k87",Nd="_19519k88";var pt={plansByLayerId:null,coordKey:null,introEndsAtMs:0,isWaitingForView:!1},Dd={...pt,isWaitingForView:!0},Tt=(0,v.createContext)(pt),ra=.4,Hd=({intro:e,panelRect:t,children:r})=>{const{layers:n,coordSystem:o,scales:a}=M((0,q.useShallow)(g=>({layers:g.layers,coordSystem:g.coordSystem,scales:g.scales}))),[s,l]=(0,v.useState)(()=>cn(e)?Dd:dn({layers:n,coordSystem:o,scales:a,intro:e})),[c,u]=(0,v.useState)(null),h=Wd(c)||!cn(e);return s.isWaitingForView&&h&&l(dn({layers:n,coordSystem:o,scales:a,intro:e})),(0,i.jsxs)(Tt.Provider,{value:s,children:[s.isWaitingForView&&(0,i.jsx)("div",{ref:u,className:"_84o2bh0",style:{left:t.x,top:t.y,width:t.width,height:t.height}},`${t.width}x${t.height}`),r]})},je=()=>(0,v.useContext)(Tt).isWaitingForView,Gd=()=>{const{introEndsAtMs:e}=(0,v.useContext)(Tt),[t]=(0,v.useState)(()=>Ud(e)/1e3);return t},na=e=>{const{plansByLayerId:t,coordKey:r}=(0,v.useContext)(Tt),n=M(o=>oa(o.coordSystem));return t===null||r!==n?null:t.get(e)??null},cn=e=>e.enabled&&e.trigger==="inView"&&typeof IntersectionObserver<"u",dn=({layers:e,coordSystem:t,scales:r,intro:n})=>{if(!n.enabled)return pt;const o={durationScale:n.durationScale,stagger:n.stagger,staggerOrder:n.staggerOrder},a=new Map;for(const l of e){const c=(0,d.buildLayerIntroPlan)({layer:l,coordSystem:t,scales:r,options:o});c!==null&&a.set(l.id,c)}if(a.size===0)return pt;const s=[...a.values()].reduce((l,c)=>Math.max(l,ns(c)),0);return{plansByLayerId:a,coordKey:oa(t),introEndsAtMs:performance.now()+s*1e3,isWaitingForView:!1}},Wd=e=>{const[t,r]=(0,v.useState)(!1);return(0,v.useEffect)(()=>{if(e===null)return;const n=new IntersectionObserver(o=>{o.some(Vd)&&r(!0)},{threshold:ra});return n.observe(e),()=>n.disconnect()},[e]),t},Vd=({intersectionRatio:e,intersectionRect:t})=>t.width>0&&t.height>0&&e>=ra,Ud=e=>Math.max(0,e-performance.now()),oa=e=>e.type==="cartesian"?`cartesian-${e.mainAxis}`:e.type,zd=e=>{const{overlayRef:t}=xe(),r=(0,v.useRef)(null),[n,o]=(0,v.useState)(!1),a=ft(e);return(0,v.useEffect)(()=>{const s=t.current;if(!s)return;const l=u=>{r.current={clientX:u.clientX,clientY:u.clientY},o(!0),a.current?.()},c=()=>{r.current=null,o(!1)};return s.addEventListener("pointermove",l),s.addEventListener("pointerleave",c),()=>{s.removeEventListener("pointermove",l),s.removeEventListener("pointerleave",c)}},[t,a,je()]),{cursorRef:r,isInside:n}},Yd=24,Kd=8,Xd={x:0,y:0,top:0,left:0,right:0,bottom:0,width:0,height:0,toJSON:()=>({})},st={boundary:[],padding:Kd},Qd=()=>{const e=M((0,q.useShallow)(A=>({layers:A.layers,coordSystem:A.coordSystem,scales:A.scales,guides:A.guides,numberFormat:A.config.numberFormat,parsingLocale:A.config.parsingLocale,mode:A.config.tooltip.mode,comments:A.annotations.comments}))),{formattingLocale:t}=G(),r=B(),n=Ie(A=>A.hover),o=Ie(A=>A.tooltipAnchor),a=Ie(A=>A.isPointerSuspended),s=oe("Tooltip",aa),l=(0,v.useRef)(()=>{}),{cursorRef:c,isInside:u}=zd(()=>l.current()),h=(0,v.useMemo)(()=>(0,d.buildTooltipContent)({...e,hover:n,readers:r,formattingLocale:t,activeCalloutId:o?.annotationId??null}),[e,n,r,t,o]),g=!a&&h!==null&&(u||o!==null),p=(0,v.useMemo)(()=>({getBoundingClientRect:()=>{if(o!==null)return Zd(o);const A=c.current;return A===null?Xd:Jd(A)}}),[c,o]),{refs:m,floatingStyles:f,update:y}=(0,Z.useFloating)(_d({isOpen:g,tooltipAnchor:o,virtualReference:p}));if(l.current=y,!g)return null;const x=(0,i.jsx)("div",{ref:m.setFloating,role:"tooltip",className:Nd,style:f,"data-testid":"chart-tooltip",children:(0,i.jsx)(s,{content:h})}),S=fr();return S?(0,Mn.createPortal)((0,i.jsx)(Zo,{children:x}),S):x},aa=({content:e})=>{const t=se(),r=M(g=>g.coordSystem),n=I(d.resolveTooltipStyle,B()),o=De([n.box.fill]),a=D(n.heading),s=D(n.label),l=D(n.value),c={paddingInline:n.box.paddingInline},u=e.rows.some(g=>g.swatchColor!==null),h=e.rows.some(g=>!g.isPrimary);return(0,i.jsxs)("div",{className:Td,style:qd(n.box,o(n.box.fill)),"data-testid":"chart-tooltip-body",children:[e.comment!==null&&(0,i.jsx)("div",{style:{...s,color:n.value.textColor,...c},"data-testid":"chart-tooltip-comment",children:(0,i.jsx)(Be,{content:e.comment})}),e.heading!==null&&(0,i.jsx)("div",{className:"_19519k81",style:{...a,...c},"data-testid":"chart-tooltip-heading",children:e.heading}),(0,i.jsx)("div",{className:Bd,children:e.rows.map(g=>{const p=t(g.geom,r.type);return(0,i.jsx)($d,{row:g,swatchShape:p?.swatchShape??"square",mainAxis:(0,d.readMainAxis)(r),hasSwatches:u,shouldHighlight:g.isPrimary&&h,labelStyle:s,valueStyle:l,paddingInline:n.box.paddingInline,paddingBlock:n.box.gap,highlightBackground:(0,d.toPaintColor)(n.primaryRow.fill)},g.key)})})]})},qd=(e,t)=>({...Te(e.fill,t),borderRadius:Ge(e.cornerRadius),paddingBlock:e.paddingBlock,boxShadow:Le(e.shadow),...e.alpha===void 0?{}:{opacity:e.alpha},...e.strokeWidth>0?{border:`${e.strokeWidth}px solid ${e.stroke}`}:{}}),Jd=e=>({x:e.clientX,y:e.clientY,top:e.clientY,left:e.clientX,right:e.clientX,bottom:e.clientY,width:0,height:0,toJSON:()=>({})}),Zd=e=>({x:e.x,y:e.y,top:e.y,left:e.x,right:e.x,bottom:e.y,width:0,height:0,toJSON:()=>({})}),_d=({isOpen:e,tooltipAnchor:t,virtualReference:r})=>({open:e,placement:t!==null?t.placement:"right",middleware:t!==null?[(0,Z.offset)(d.ANNOTATION_TOOLTIP_MARKER_GAP_PX),(0,Z.shift)(st),(0,Z.flip)(st)]:[(0,Z.offset)(Yd),(0,Z.flip)(st),(0,Z.shift)(st)],elements:{reference:r}}),$d=({row:e,swatchShape:t,mainAxis:r,hasSwatches:n,shouldHighlight:o,labelStyle:a,valueStyle:s,paddingInline:l,paddingBlock:c,highlightBackground:u})=>(0,i.jsxs)("div",{className:Od,style:{paddingInline:l,paddingBlock:c,...o?{backgroundColor:u}:{}},"data-testid":"chart-tooltip-row",children:[e.swatchColor===null?n&&(0,i.jsx)("span",{className:"_19519k85","aria-hidden":!0}):(0,i.jsx)(rt,{shape:t,color:e.swatchColor,paint:e.swatchFill,surface:"tooltip",label:e.label,lineType:e.swatchLineType,alpha:e.swatchAlpha,cornerRadius:e.swatchCornerRadius,symbol:e.swatchSymbol,mainAxis:r}),(0,i.jsx)("span",{className:Ld,style:a,"data-testid":"chart-tooltip-label",children:e.label}),(0,i.jsx)("span",{className:Fd,style:s,"data-testid":"chart-tooltip-value",children:e.value})]}),ia=e=>({x:e.axisLabel.x().resolve(),y:e.axisLabel.y().resolve()}),sa=e=>({x:e.tickLine.x().resolve(),y:e.tickLine.y().resolve()}),eu=e=>{const t=e.graph();return(0,d.withAlpha)((0,d.toPaintColor)(t.get("fill")),t.get("alpha")??1)},br=e=>(t,r)=>r===void 0?e.tickLabel[t]().resolve():e.tickLabel[r](t).resolve(),Bt=e=>{const t={};for(const r of d.DATA_LABEL_ROLES){const n={};for(const o of d.RESOLVED_DATA_LABEL_POSITIONS)n[o]=(0,d.resolveDataLabelStyle)(e,r,o);t[r]=n}return t},la=e=>{const t=e.legend().resolve();return{gap:t.gap,focusStroke:t.focusStroke,popover:e.legend.popover().resolve()}},Ar=e=>e.headline().resolve(),tu=({textMeasurer:e,tickLabelStyles:t,tickLineStyles:r,familyDefault:n})=>o=>{const a=o.position==="top"||o.position==="bottom",s=(0,d.getAestheticFromScaleAestheticKey)(o.scaleAestheticKey),{offset:l,...c}=t(s,o.position),u=o.ticksVisible?Math.max(l,r[s].length):l,h=(0,d.toFontSpec)(c,n),g=o.ticks.map(m=>e.measureText(m.formattedLabel,h)),p=o.labelMaxWidthPx??Number.POSITIVE_INFINITY;if(a){if(o.labelRotation!==0){const m=g.map(f=>f.width);return un(m,p)+2*u}return Math.max(...g.map(m=>m.height))+u}return un(g.map(m=>m.width),p)+u},un=(e,t)=>Math.min(Math.max(...e),t),ru=({axisLabelStyles:e})=>t=>(0,d.computeLineBoxHeight)(e[(0,d.getAestheticFromScaleAestheticKey)(t.scaleAestheticKey)]),ca=({textMeasurer:e,dataLabelStyles:t,familyDefault:r})=>(n,o,a)=>{const s=t[n][o],l=e.measureText(a,(0,d.toFontSpec)(s,r));return{...l,width:l.width+s.paddingInline*2,height:l.height+s.paddingBlock*2}},nu=({textMeasurer:e,familyDefault:t})=>(r,n)=>e.measureText(r,(0,d.toFontSpec)(n,t)),ou=_.sm,au=({textMeasurer:e,familyDefault:t,itemGap:r,headlineItemStyles:n})=>(o,a)=>{const s=da(o,n[a],e,t);return{width:ua(s.map(l=>l.width))+Math.max(0,s.length-1)*r,height:Math.max(0,...s.map(l=>l.height))}},iu=({textMeasurer:e,familyDefault:t,headlineItemStyles:r})=>(n,o)=>da(n,r[o],e,t).map(a=>a.width),su=({textMeasurer:e,familyDefault:t,headlineItemStyles:r})=>(n,o,a=!1)=>{const s=(0,d.resolveHeadlineNumberStyle)(r[o],a);return{width:e.measureText(n,(0,d.toFontSpec)(s,t)).width,height:(0,d.computeLineBoxHeight)(s)}},lu=e=>{const t=au(e),r=su(e);return(n,o,a=!1)=>n.kind==="perGroup"?t(n,o):r(n.value,o,a)},da=(e,t,r,n)=>{const o=a=>cu(a,t,r,n);return e.items.map(a=>{const s=(0,d.buildHeadlineItemRows)(a,t).map(o),l=Math.max(0,s.length-1)*t.gap;return{width:Math.max(0,...s.map(c=>c.width)),height:ua(s.map(c=>c.height))+l}})},cu=(e,t,r,n)=>{let o=0,a=0;for(const s of e.segments)if(s.kind==="text"){const l=du(t,s.textRole);o+=r.measureText(s.text,(0,d.toFontSpec)(l,n)).width,a=Math.max(a,uu(l))}else o+=s.size,a=Math.max(a,s.size);return{width:o+Math.max(0,e.segments.length-1)*e.gap,height:a}},du=(e,t)=>{switch(t){case"value":return e.number;case"caption":return e.caption;case"label":return e.label;case"trendPercentage":case"trendReference":return e.trend;default:return t}},uu=e=>e.fontSize*(e.lineHeight??ou),ua=e=>e.reduce((t,r)=>t+r,0),hu=(e,t)=>e?t:0,mt=(e,t,r)=>{if(r){const n=Number(e.size);return Number.isFinite(n)&&n>0?n:0}return hu(e.color,t)},gu=({textMeasurer:e,familyDefault:t,legendItemStyle:r,directLabelStyle:n})=>o=>{const a=o.position==="top"||o.position==="bottom";if(o.display==="direct"){const f=(0,d.computeLineBoxHeight)(n);if(a)return f;const y=(0,d.toFontSpec)(n,t),x=o.items.map(S=>e.measureText(S.formattedLabel,y).width);return Math.max(...x)}const{item:s,swatch:l}=r,c=(0,d.computeLineBoxHeight)(s),u=(0,d.toFontSpec)(s,t),h=2*(s.paddingBlock+s.strokeWidth),g=2*(s.paddingInline+s.strokeWidth),p=o.aesthetics.includes("size");if(a){const f=p?Math.max(0,...o.items.map(y=>mt(y.visual,l.size,!0))):l.size;return Math.max(c,f)+h}const m=o.items.map(f=>{const y=e.measureText(f.formattedLabel,u).width,x=mt(f.visual,l.size,p);return x+(x>0?s.gap:0)+y});return Math.max(...m)+g},fu=({textMeasurer:e,tickLabelStyles:t,familyDefault:r})=>(n,o)=>e.measureText(n,(0,d.toFontSpec)(t(o),r)),vu=Object.freeze({}),pu=({textMeasurer:e,metrics:t,overrides:r=vu})=>{const n=B(),o=I(ia,n),a=I(Bt,n),s=I(d.resolveDirectLabelStyle,n),l=I(d.resolveLegendItemStyle,n),c=I(br,n),u=I(sa,n),h=(0,v.useRef)(r);return h.current=r,(0,v.useMemo)(()=>{if(!e)return null;const g=t.fonts.familyDefault,p=n.graph().get("textScale"),m={textMeasurer:e,familyDefault:g,itemGap:Ar(n).gap,headlineItemStyles:{small:(0,d.resolveHeadlineItemStyle)(n,"small"),medium:(0,d.resolveHeadlineItemStyle)(n,"medium"),large:(0,d.resolveHeadlineItemStyle)(n,"large")}},f=tu({textMeasurer:e,tickLabelStyles:c,tickLineStyles:u,familyDefault:g}),y=ru({axisLabelStyles:o}),x=gu({textMeasurer:e,familyDefault:g,legendItemStyle:l,directLabelStyle:s}),S=lu(m),A=iu(m),P={measureText:(w,k)=>e.measureText(w,k),textScale:p};return{measureAxis:w=>{if(xu(w))return 0;const k=h.current.measureAxis;return k?k(w,P):f(w)},measureAxisLabel:w=>{const k=h.current.measureAxisLabel;return k?k(w,P):y(w)},measureLegend:w=>{if(yu(w))return 0;const k=h.current.measureLegend;return k?k(w,P):x(w)},measureHeadline:(w,k,E)=>(h.current.measureHeadline??S)(w,k,E),measureHeadlineItemWidths:(w,k)=>(h.current.measureHeadlineItemWidths??A)(w,k),measureTickLabel:fu({textMeasurer:e,tickLabelStyles:c,familyDefault:g}),measureDifferenceArrowLabel:nu({textMeasurer:e,familyDefault:g}),measureDataLabel:ca({textMeasurer:e,dataLabelStyles:a,familyDefault:g})}},[e,t,o,a,s,l,c,u,n])},mu=({measurer:e,axes:t,numberFormat:r,parsingLocale:n,formattedLegends:o,containerSize:a,externalMeasurements:s,headline:l,formattingLocale:c,annotations:u,layers:h,coordSystem:g,overflowStrategy:p,panelBorder:m,padding:f,margins:y})=>{const x=B(),S=yt(),A=(0,v.useMemo)(()=>P=>(0,d.resolveDifferenceArrowAnnotationStyle)(x,P),[x]);return(0,v.useMemo)(()=>e?new d.LayoutCompiler(e).compile({axes:t,numberFormat:r,parsingLocale:n,formattedLegends:o,containerSize:a,externalMeasurements:s,headline:l,formattingLocale:c,annotations:u,resolveDifferenceArrowStyle:A,layers:h,readers:x,resolvePlacement:S,coordSystem:g,overflowStrategy:p,panelBorder:m,padding:f,margins:y}):null,[t,r,n,o,a,s,p,l,c,u,A,h,x,S,g,m,f,y,e])},xu=e=>!e.isVisible||e.ticks.length===0,yu=e=>e.items.length===0,ha=()=>{const{formattingLocale:e}=G(),t=M(r=>r.config.parsingLocale);return e??t},hn=.5,ga=(0,v.createContext)(new Map),fa=(0,v.createContext)(()=>{}),va=(0,v.createContext)(new Set),bu=({children:e})=>{const[t,r]=(0,v.useState)(()=>new Map),[n]=(0,v.useState)(()=>new Set),o=(0,v.useRef)(new Map),a=(0,v.useCallback)((s,l,c)=>{const u=o.current.get(s)??new Set;if(c!==null){u.add(l),o.current.set(s,u),r(h=>Pu(h,s,c));return}u.delete(l),!(u.size>0)&&(o.current.delete(s),r(h=>wu(h,s)))},[]);return(0,i.jsx)(fa.Provider,{value:a,children:(0,i.jsx)(va.Provider,{value:n,children:(0,i.jsx)(ga.Provider,{value:t,children:e})})})},pa=()=>(0,v.useContext)(ga),Au=()=>(0,v.useContext)(fa),ma=e=>{const t=Au(),r=(0,v.useId)(),n=(0,v.useRef)(null);return(0,v.useEffect)(()=>{if(typeof ResizeObserver>"u")return;const o=n.current;if(o===null)return;const a=()=>t(e,r,{width:o.offsetWidth,height:o.offsetHeight});a();const s=new ResizeObserver(a);return s.observe(o),()=>{s.disconnect(),t(e,r,null)}},[e,r,t]),n},Su=()=>(0,v.useContext)(va),Pu=(e,t,r)=>{const n=e.get(t);if(n!==void 0&&Math.abs(n.width-r.width)<hn&&Math.abs(n.height-r.height)<hn)return e;const o=new Map(e);return o.set(t,r),o},wu=(e,t)=>{if(!e.has(t))return e;const r=new Map(e);return r.delete(t),r},ju=(e,t)=>e!==null&&e.annotationId===t?e:null,ku=(e,t)=>e.annotationId===t.annotationId&&e.translation.x===t.translation.x&&e.translation.y===t.translation.y,Eu=(e,t,r)=>e!==null&&e.annotationId===t&&e.endpoint===r?e:null,Ru=(e,t)=>e.annotationId===t.annotationId&&e.endpoint===t.endpoint&&e.anchor.x===t.anchor.x&&e.anchor.y===t.anchor.y,Cu=(e,t,r)=>e!==null&&e.annotationId===t&&e.endpoint===r?e:null,Iu=(e,t)=>e.annotationId===t.annotationId&&e.endpoint===t.endpoint&&(0,d.areAnchorsEqual)(e.point.anchor,t.point.anchor),Mu=(e,t)=>e!==null&&e.annotationId===t?e:null,Tu=(e,t)=>e.annotationId===t.annotationId&&e.region.x===t.region.x&&e.region.y===t.region.y&&e.region.width===t.region.width&&e.region.height===t.region.height,Bu=(e,t)=>e!==null&&e.annotationId===t?e:null,Ou=(e,t)=>e.annotationId===t.annotationId&&e.at.x===t.at.x&&e.width===t.width&&e.shift===t.shift,Me=({standingInteraction:e},t)=>e!==null&&be(e,t)?e:null,Lu=(e,t)=>{if(e===null)return!1;switch(t.kind){case"difference-arrow-endpoint-drag":return be(e,t.kind)&&Iu(e,t);case"arrow-endpoint-drag":return be(e,t.kind)&&Ru(e,t);case"move-drag":return be(e,t.kind)&&ku(e,t);case"shape-resize-drag":return be(e,t.kind)&&Tu(e,t);case"text-resize-drag":return be(e,t.kind)&&Ou(e,t);case"chrome-popup":return be(e,t.kind);case"menu":return!1}},be=(e,t)=>e.kind===t,Fu=(e,t,r,n)=>{const o=xa(r.layerId,e,t,n);return o===null?null:{observationIndex:e,predicate:o.predicate,selectedFor:r}},Nu=({observationIndex:e,predicate:t,selectedFor:r},n,o)=>{const a=xa(r.layerId,e,n,o);return a!==null&&(0,d.arePredicatesEqual)(a.predicate,t)?a.standing:null},Du=(e,t)=>e===t?!0:e===null||t===null?!1:e.observationIndex===t.observationIndex&&(0,d.arePredicatesEqual)(e.predicate,t.predicate)&&(0,d.areEditTargetsEqual)(e.selectedFor,t.selectedFor),xa=(e,t,r,n)=>{const o=(0,d.findLayerById)(r,e),a=o?.data.getAt(t)??null;if(o===void 0||a===null)return null;const s=(0,d.buildObservationsTarget)({layer:o,observationIndex:t,scope:"data-point",parsingLocale:n});return s===null?null:{standing:{layer:o,observation:a},predicate:s.predicate}},Hu=({isMenuTrigger:e,stamped:t,observations:r})=>e?{kind:"menu-trigger"}:t!==null&&t.kind!=="grid"?t:r!==null?{kind:"observations",observations:r}:t,Gu=(e,t)=>{if(e===t)return!0;if(e===null||t===null)return!1;if(e.kind==="annotation"&&t.kind==="annotation")return(0,d.areEditTargetsEqual)(e.target,t.target);if(e.kind==="legend"&&t.kind==="legend")return e.part.legendIndex===t.part.legendIndex&&e.part.itemIndex===t.part.itemIndex;if(e.kind==="axis"&&t.kind==="axis")return(0,d.areEditTargetsEqual)(e.target,t.target)&&e.part?.tickIndex===t.part?.tickIndex;if(e.kind==="grid"&&t.kind==="grid")return(0,d.areEditTargetsEqual)(e.target,t.target);if(e.kind==="observations"&&t.kind==="observations"){const r=e.observations,n=t.observations;return r.layerId===n.layerId&&r.observationIndex===n.observationIndex&&r.target.scope===n.target.scope&&r.isOnObservation===n.isOnObservation}return e.kind==="menu-trigger"&&t.kind==="menu-trigger"},Sr=e=>{const t=e.editTargetUnderPointer;return t?.kind==="annotation"?t.target.id:null},Wu=e=>{const t=e.editTargetUnderPointer;return t!==null&&t.kind!=="menu-trigger"},ya=()=>(0,er.createStore)(e=>({menuTrigger:null,editTargetUnderPointer:null,standingInteraction:null,selectedOutline:null,caret:null,pressedObservation:null,setMenuTrigger:t=>e(r=>(0,d.areEditMenuTriggersEqual)(r.menuTrigger,t)?r:{menuTrigger:t}),setEditTargetUnderPointer:t=>e(r=>Gu(r.editTargetUnderPointer,t)?r:{editTargetUnderPointer:t}),claimInteraction:t=>e(r=>Lu(r.standingInteraction,t)?r:{standingInteraction:t}),releaseInteraction:t=>e(r=>r.standingInteraction?.kind===t?{standingInteraction:null}:r),setSelectedOutline:t=>e(r=>Vu(r.selectedOutline,t)?r:{selectedOutline:t}),setCaret:t=>e(r=>(r.caret?.annotationId??null)===t?r:{caret:t===null?null:{annotationId:t,editor:null}}),setCaretEditor:t=>e(r=>r.caret===null?r:{caret:{...r.caret,editor:t}}),setPressedObservation:t=>e(r=>Du(r.pressedObservation,t)?r:{pressedObservation:t})})),Vu=(e,t)=>e===t?!0:e===null||t===null?!1:(0,d.areEditTargetsEqual)(e.target,t.target)&&e.frameScale===t.frameScale&>(e.frame,t.frame)&&qt(e.frameSpans,t.frameSpans),Pr=(0,v.createContext)(null),Uu=ya(),zu=({children:e})=>{const[t]=(0,v.useState)(()=>ya());return(0,i.jsx)(Pr.Provider,{value:t,children:e})},Yu=()=>{const e=(0,v.useContext)(Pr);if(e===null)throw new Error("useEditorStore must be used inside an <EditorProvider>.");return e};function ue(e){return(0,Oe.useStore)((0,v.useContext)(Pr)??Uu,e)}var ba=(0,v.createContext)(null),Ku=({panelRect:e,children:t})=>{const r=Xu(e);return(0,i.jsx)(ba.Provider,{value:r,children:t})},Aa=()=>{const e=(0,v.useContext)(ba);if(e===null)throw new Error("Difference arrows read outside a <DifferenceArrowsProvider>.");return e},gn=(e,t,r)=>t.isStrokeAuthored?t.stroke:(0,d.resolveArrowColor)(e.start,e.end,{start:r(e.start),end:r(e.end)})??t.stroke,Xu=e=>{const{formattingLocale:t}=G(),r=he(),{fonts:n}=we(),o=ue(x=>Me(x,"difference-arrow-endpoint-drag")),a=zi(),s=B(),{differenceArrows:l,mainAxis:c,parsingLocale:u}=M((0,q.useShallow)(x=>({differenceArrows:x.annotations.differenceArrows,mainAxis:(0,d.readMainAxis)(x.coordSystem),parsingLocale:x.config.parsingLocale}))),h=t??u,{width:g,height:p}=e,m=(0,v.useMemo)(()=>({mainAxis:c,panelWidth:g,panelHeight:p,locale:h}),[c,g,p,h]),f=(0,v.useMemo)(()=>Qu(r,n.familyDefault),[r,n.familyDefault]),y=(0,v.useMemo)(()=>l.map(x=>{const S=(0,d.resolveDifferenceArrowAnnotationStyle)(s,x.id),A=fn(x,S,m,f);return{...A,arrow:x,style:S,color:gn(x,S,a),committedArrow:x,committedLabelBox:A.labelBox,committedLabelText:A.labelText,isDragged:!1,hasComparableEndpoints:(0,d.areEndpointsComparable)(x.start,x.end)}}),[l,m,f,a,s]);return(0,v.useMemo)(()=>o===null?y:y.map(x=>{if(x.id!==o.annotationId)return x;const S=qu(x.committedArrow,o);return{...fn(S,x.style,m,f),style:x.style,color:gn(S,x.style,a),arrow:S,committedArrow:x.committedArrow,committedLabelBox:x.committedLabelBox,committedLabelText:x.committedLabelText,isDragged:!0,hasComparableEndpoints:(0,d.areEndpointsComparable)(S.start,S.end)}}),[y,o,m,f,a])},fn=(e,t,r,n)=>{const o=(0,d.computeDifferenceArrow)({arrow:e,style:t,...r});return{...o,labelBox:(0,d.getDifferenceArrowLabelBox)({labelPosition:o.labelPosition,measuredTextWidth:n(o.labelText,t.label),label:t.label})}},Qu=(e,t)=>{const r=new Map;return(n,o)=>{const a=(0,d.toFontSpec)(o,t),s=[a.family,a.size,a.weight,a.style,a.letterSpacing,a.textTransform,n].join("|"),l=r.get(s);if(l!==void 0)return l;const{width:c}=e.measureText(n,a);return r.set(s,c),c}},qu=(e,t)=>({...e,start:t.endpoint==="start"?t.point:e.start,end:t.endpoint==="end"?t.point:e.end}),Ju="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEoAAABgCAYAAAC65+QhAAAKo0lEQVR42u2de4wdVR3HPzN32+oSUQSsikEoosR3iko08oovEkwMpmiIr/KHIomgUYyPiBofkRjjE+MjEk3RQNIYTdUotKkoaql0Wyympbtl2XbLtrW71n3v3ntnrn+c38n98cvcOzP3tfcud5LJ5u7Ozpz5nt/7nN/3QncfAVBQn18LfBd4GJgFYvm5B/iW/N0fBfn/VX9ogF4K3A0sAhV1xubzIrBFrk+6z6oDyEvCmcBXgTkFRgkoA5E6y/J7f80s8GXg2Uoyw9UCUGhm/wPAYQNQJFJkJUmDpgEbkfusCnW0dujNwM4aAEVGak4aaYvVdRqwHcAbexkwDdCLgZ8mqJgFaBo4BowD/wQOAbuBCSNhsVHJGPgJ8KJesl+hshnPBD4LTKqXLCUANAPsF0CKRvWm5W+Pi6RZwErqXqeA24DBhLF0rZptkhfUUhQbO7QEHBUJmjZqFhl7NQ/sEsCWjf2KjTo+AlzXbeoYAAPq80Zgmxp0McEOxQLOiNii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OIk8Q3Unwl+xLaV5ttgd2U4o0sndJVkmDHGceh28qmJNg8noGRbIeydXUZySxQJ+UhnQTK0phsydFEGZtW3kNisBcTSLU0QAdxK0CZe2uWzQt5HpVWNTLWA0rXrHzaMZnAm5J2LovK7DdEXUmsiaclcj8zbyf84+amscxK3EagLK/Be6hyouQlzhrHUYKcSOHhrIikbmi0N3lrAupHzINbBVSgCmfg2lb/2CCV0bxUVZ803FJJduhBsXlNMSNeZwYZKUq142oQjUqYv997eSp74p0JXJlZ7jeDYxCqZYdKhhbuw4Z2pOHYcQ1V1gxLbXRUim/TTXSo+3v5ZPUTRlqz0q0VxQ4dMgQ5SXSRC1IwPLfVdLdX1mF4Lkr5Ybfii8rLixlLcvlgg2o2JaFCLXevpejXEnm3fLOcR/rTNUizYsU2OCxiP9+EhOUByIcqRxUYtSi595o2/7a00nqwblHiW4t25Jh4mZM5wcpjhxZkUg4qd2/tUKzA/LhyEm1fJvM3v5ynklIVE8gjYgkrdhp67EaZfjTj4XEce8eJFDtUxNFLnrcStNsFBdpNhpRYq2OkOOw8RdtCE7y+3psNSVwUp9ih+2gduU1L2Fmfh/t2jIUUNrJJkbBhxQIU5+Dy3SdSVEpx949JcNpV1NraW7wKxxhWj2ezIi+7VxJrq1o2DivhNr0OS9qUBFCkvN4XgDO6lazdphrvVJUFD5j1jmV5+QdMOFExzD3jGdKOGLcud1Gv0P/rGVyH29B6MiWcmBbARiVAHBNg9srvsqQdV3cDIXuz9ut88Tpp4cSi5I77RSWLGdKOGxUoBXq0Z8cW2C7D8X+n0XFXUtz9nJRhz1lt3xJkFxdvUMV7b7/K5tuAdEStpWgr8MpeVbNGVoHPwG20n6lBs21DhiGVLK9agOrZrwtxq7ePGm48X5PfgeuJWdvN381CG7+pIlBbfryEXCJpxlqRtBG10oHa6NXVx/8Ba+cluUx5B18AAAAASUVORK5CYII=",Zu=({className:e})=>(0,i.jsx)("img",{src:Ju,alt:"","aria-hidden":"true",className:e,draggable:!1}),_u="https://graphy.app/?utm_source=chart-mark&utm_medium=embed",$u="Made with Graphy — open graphy.app";var eh="vultop0";var th="vultop2",rh="vultop3",nh="vultop4",oh="vultop5",ah="vultop6",ih="vultop7",sh=e=>{const t=lh(e.trim());if(t===null)return"light";const r=ch(t);return r<=.22?"dark":r<=.65?"mid":"light"},lh=e=>{if(!e.startsWith("#"))return null;const t=e.slice(1);if(t.length===3){const r=t[0],n=t[1],o=t[2];return r===void 0||n===void 0||o===void 0?null:{red:Number.parseInt(r+r,16),green:Number.parseInt(n+n,16),blue:Number.parseInt(o+o,16)}}return t.length===6||t.length===8?{red:Number.parseInt(t.slice(0,2),16),green:Number.parseInt(t.slice(2,4),16),blue:Number.parseInt(t.slice(4,6),16)}:null},ch=({red:e,green:t,blue:r})=>{const n=o=>{const a=o/255;return a<=.03928?a/12.92:((a+.055)/1.055)**2.4};return .2126*n(e)+.7152*n(t)+.0722*n(r)},Sa=(e,t,r="full")=>!e||t.width<120||t.height<80?"hidden":t.width<200||r==="mini"?"mini":"full",wr=({visual:e,placement:t})=>{const r=sh((0,d.toPaintColor)(B().graph().get("fill")));return(0,i.jsxs)("a",{className:(0,U.default)(eh,e==="mini"&&"vultop1",t==="footer"?ah:ih),href:_u,target:"_blank",rel:"noopener noreferrer","aria-label":$u,"data-visual":e,"data-zone":r,children:[(0,i.jsx)("span",{className:th,children:(0,i.jsx)(Zu,{className:rh})}),(0,i.jsxs)("span",{className:nh,children:[(0,i.jsx)("span",{children:"Made with"}),(0,i.jsx)("span",{className:oh,children:"Graphy"})]})]})},Pa=(0,v.createContext)({Title:null,Caption:null,TextAnnotation:null}),dh=({editors:e,children:t})=>(0,i.jsx)(Pa.Provider,{value:e,children:t}),jr=()=>(0,v.useContext)(Pa),vn="_4dlrid0",uh="xfz7dq0";var hh="xfz7dq2",gh="xfz7dq3",fh="xfz7dq4",vh="xfz7dq5",wa=({ref:e,footerRect:t,mode:r=ae.readonly,caption:n,isCaptionVisible:o,source:a,isSourceVisible:s,captionStyle:l,sourceStyle:c,brandMark:u})=>{const{Caption:h}=jr(),g=ge[vr(r)].inlineTextEditing?h:null,p=o&&(g!==null||n!==null),m=s&&a!==null&&yh(a),f=u!=="hidden";return!p&&!m&&!f?null:(0,i.jsxs)("div",{ref:e,className:uh,style:{left:t.x,top:t.y,width:t.width},children:[p?g?(0,i.jsx)(g,{caption:n,captionStyle:l}):(0,i.jsx)(ph,{caption:n,captionStyle:l}):null,(m||f)&&(0,i.jsxs)("div",{className:"xfz7dq1",children:[m&&(0,i.jsx)(mh,{source:a,sourceStyle:c}),u!=="hidden"?(0,i.jsx)(wr,{visual:u,placement:"footer"}):null]})]})},ph=({caption:e,captionStyle:t})=>e===null?null:typeof e=="string"?(0,i.jsx)("p",{className:vn,style:D(t),children:e}):(0,i.jsx)("div",{className:vn,style:D(t),children:(0,i.jsx)(Be,{content:e})}),mh=({source:e,sourceStyle:t})=>{const r=(0,d.isSafeUrl)(e.url)?e.url:void 0,n=e.label??(r!==void 0?xh(r):"");return n===""&&r===void 0?null:(0,i.jsxs)("span",{className:hh,style:D(t.label),children:[(0,i.jsx)("span",{className:fh,children:"Source:"}),r!==void 0?(0,i.jsx)("a",{className:gh,href:r,target:"_blank",rel:"noopener noreferrer",style:D(t.link),children:n}):(0,i.jsx)("span",{className:vh,children:n})]})},xh=e=>{try{return new URL(e).hostname}catch{return e}},yh=e=>e.label!==void 0&&e.label!==""||e.url!==void 0&&e.url!==""&&(0,d.isSafeUrl)(e.url),bh="_1k4qtbg0";var Ah=22,ja=({ref:e,headerRect:t,mode:r=ae.readonly,title:n,isTitleVisible:o,subtitle:a,isSubtitleVisible:s,headingStyle:l,subtitleStyle:c,brandMark:u})=>{const{Title:h}=jr(),g=ge[vr(r)].inlineTextEditing?h:null,p=g!==null,m=o&&(p||n!==null),f=s&&(p||a!==null),y=u!=="hidden";return!m&&!f&&!y?null:(0,i.jsxs)("div",{ref:e,className:(0,U.default)(bh,y&&"_1k4qtbg1"),style:{left:t.x,top:t.y,width:t.width,...y&&!m&&!f?{minHeight:Ah}:{}},children:[g?(0,i.jsx)(g,{title:n,isTitleVisible:o,isSubtitleVisible:s,subtitle:a,headingStyle:l,subtitleStyle:c},[o?"title":"",s?"subtitle":""].join("-")):(0,i.jsx)(Sh,{title:n,isTitleVisible:o,isSubtitleVisible:s,subtitle:a,headingStyle:l,subtitleStyle:c}),u!=="hidden"?(0,i.jsx)(wr,{visual:u,placement:"header"}):null]})},Sh=({title:e,isTitleVisible:t,isSubtitleVisible:r,subtitle:n,headingStyle:o,subtitleStyle:a})=>{const s=t&&e!==null,l=r&&n!==null;return(0,i.jsxs)(i.Fragment,{children:[s&&(typeof e=="string"?(0,i.jsx)("h1",{className:"_4dlrid0",style:D(o),children:e}):(0,i.jsx)("div",{className:"_4dlrid0",style:D(o),children:(0,i.jsx)(Be,{content:e})})),l&&(typeof n=="string"?(0,i.jsx)("p",{className:"_4dlrid0",style:D(a),children:n}):(0,i.jsx)("div",{className:"_4dlrid0",style:D(a),children:(0,i.jsx)(Be,{content:n})}))]})},Ph="_1u9qprb0",wh="_1u9qprb1",jh=Ci({group:()=>Rh,item:()=>ka,trend:()=>Eh,value:()=>kh}),kh="_9aen060",Eh="_9aen061",Rh="_9aen062",ka="_9aen063",Ch={xxs:8,xs:12,sm:16,md:20,lg:24,xl:36},Ih={primary:"asohov1 asohov0",secondary:"asohov2 asohov0"},kr=({children:e,title:t,variant:r="primary",size:n="sm",...o})=>{const a=(0,v.useId)(),s=Ch[n];return(0,i.jsxs)("svg",{className:Ih[r],"aria-labelledby":t?a:void 0,height:s,width:s,fill:"none",viewBox:"0 0 24 24",role:"img",...o,children:[t&&(0,i.jsx)("title",{id:a,children:t}),e]})},Ea=e=>(0,i.jsx)(kr,{...e,children:(0,i.jsxs)("g",{stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[(0,i.jsx)("path",{d:"m5 12 7-7 7 7"}),(0,i.jsx)("path",{d:"M12 19V5"})]})}),Ra=e=>(0,i.jsx)(kr,{...e,children:(0,i.jsx)("g",{stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:(0,i.jsx)("path",{d:"M5 12h14"})})}),Mh="n7clvo0",Th="n7clvo1",Bh="n7clvo2";var Oh=({segment:e,itemStyle:t})=>{if(e.kind==="swatch")return(0,i.jsx)(Lh,{swatch:e.swatch,size:e.size});if(e.kind==="trendArrow"){const o=Ca(t,e.direction);return(0,i.jsx)("div",{className:(0,U.clsx)(Bh,e.direction==="down"&&"n7clvo3"),style:{color:o,backgroundColor:e.direction==="flat"?z(b.textPrimary,.1):z(o,.2)},children:e.direction==="flat"?(0,i.jsx)(Ra,{size:"xs",title:""}):(0,i.jsx)(Ea,{size:"xs",title:""})})}const{className:r,style:n}=Fh(e,t);return(0,i.jsx)("span",{className:r,style:n,children:e.text})},Lh=({swatch:e,size:t})=>{const r=se(),n=jt(e.layerId,e.value,t),o=wt(e.layerId,e.value,e.color)??e.color;return(0,i.jsx)(rt,{shape:r(e.geom,"cartesian")?.swatchShape??"square",color:o,paint:n.fill,surface:"headline",width:t,height:t,alpha:n.alpha,cornerRadius:n.cornerRadius,symbol:n.symbol})},Fh=(e,t)=>{switch(e.textRole){case"value":return{style:Re(t.number)};case"caption":return{className:Mh,style:Re(t.caption)};case"label":return{className:Th,style:Re(t.label)};case"trendPercentage":return{style:Re({...t.trend,textColor:Ca(t,e.trendDirection??"up")})};case"trendReference":return{style:Re(t.trend)};default:return e.textRole}},Ca=(e,t)=>{switch(t){case"up":return e.trendUp.textColor;case"down":return e.trendDown.textColor;case"flat":return e.trendFlat.textColor;default:return t}},Nh=({item:e,itemStyle:t})=>(0,i.jsx)("div",{className:ka,style:{gap:t.gap},children:(0,d.buildHeadlineItemRows)(e,t).map(r=>(0,i.jsx)(Dh,{row:r,itemStyle:t},r.role))}),Dh=({row:e,itemStyle:t})=>{const r=e.role==="trend";return(0,i.jsx)("div",{className:jh[e.role],style:{gap:e.gap},"data-testid":r?"headline-trend":void 0,"data-direction":r?Hh(e):void 0,role:r?"img":void 0,"aria-label":r?e.ariaLabel:void 0,children:e.segments.map((n,o)=>(0,i.jsx)(Oh,{segment:n,itemStyle:t},o))})},Hh=e=>{const t=e.segments.find(r=>r.kind==="trendArrow");return t?.kind==="trendArrow"?t.direction:void 0},Gh=({headline:e,rect:t,resolvedSize:r,visibleItemCount:n,isInDonutHole:o=!1})=>{const a=B(),s=I(Ar,a),l=I(d.resolveHeadlineItemStyle,a,r),c={left:t.x,top:t.y,width:t.width,height:t.height};if(e.kind==="grandTotal"){const u=(0,d.resolveHeadlineNumberStyle)(l,o);return(0,i.jsx)("div",{className:wh,style:c,children:(0,i.jsx)("span",{style:Re(u),children:e.value})})}return(0,i.jsx)("div",{className:Ph,style:{...c,gap:s.gap},children:e.items.slice(0,n).map((u,h)=>(0,i.jsx)(Nh,{item:u,itemStyle:l},`${u.label}-${h}`))})},Ia="data-legend-index",Ma="data-legend-item-index",Ta=({legendIndex:e,itemIndex:t})=>({[Ia]:String(e),[Ma]:String(t)}),Ba=e=>{const t=Zt(e,Ia),r=Zt(e,Ma);return t===null||r===null?null:{legendIndex:t,itemIndex:r}},Zt=(e,t)=>{const r=e.getAttribute(t);if(r===null||!/^(0|[1-9]\d*)$/.test(r))return null;const n=Number(r);return Number.isSafeInteger(n)?n:null},ye="data-edit-kind",Oa="data-edit-id",Ze="data-edit-axis",La="data-edit-tick-index",Fa="data-legend-overflow-control",Wh=`[${Fa}]`,Vh="observations",Uh=`[${ye}]`,nt=e=>({[ye]:e.kind,[Oa]:e.id}),Ot=(e,t)=>({[ye]:"axis",[Ze]:e,...t===void 0?{}:{[La]:String(t)}}),Lt=e=>({[ye]:"legend",...Ta(e)}),Er=e=>({[ye]:"grid",[Ze]:e}),zh=(e,t)=>{for(const r of e){const n=r.closest(Uh);if(n===null||!t.contains(n))continue;const o=Kh(n);if(o!==null)return o;if(n!==r)return null}return null},Yh=()=>({[ye]:Vh}),Kh=e=>{const t=e.getAttribute(ye);switch(t){case"annotation":{const r=e.getAttribute(Oa);return r===null||r===""?null:{kind:t,target:{kind:t,id:r}}}case"axis":{const r=e.getAttribute(Ze);if(!(0,d.isPositionScale)(r))return null;if(!e.hasAttribute("data-edit-tick-index"))return{kind:t,target:{kind:t,axis:r},part:null};const n=Zt(e,La);return n===null?null:{kind:t,target:{kind:t,axis:r},part:{tickIndex:n}}}case"legend":{const r=Ba(e);return r===null?null:{kind:t,target:{kind:t},part:r}}case"grid":{const r=e.getAttribute(Ze);return(0,d.isPositionScale)(r)?{kind:t,target:{kind:t,axis:(0,d.getAestheticFromScaleAestheticKey)(r)}}:null}default:return null}},Na=(0,v.createContext)(ae.readonly);function We(){return(0,v.useContext)(Na)}var fe=()=>ge[We()].guidePress,Xh=.25,Rr=e=>je()?null:(0,i.jsx)(Qh,{...e}),Qh=({children:e,as:t="g",...r})=>{const n=Gd(),o=t;if(n<=0)return(0,i.jsx)(o,{...r,children:e});const a=R.motion[t];return(0,i.jsx)(a,{...r,initial:{opacity:0},animate:{opacity:1},transition:{duration:Xh,delay:n},children:e})},qh=(e,t)=>e.isTextColorAuthored?e.textColor:t??e.textColor,Jh="_1oj6yix0";var Zh="_1oj6yix2";var _h=8,$h=16,eg=2,tg=({indexedLegends:e,containerRect:t})=>{const r=I(d.resolveDirectLabelStyle,B()),n=(0,d.computeLineBoxHeight)(r),{placements:o,hasOverlap:a}=rg(e,t,n),s=fe(),l=D(r);if(o.length===0)return null;const c=a?$h:_h,u=c-eg,h=(0,d.toStrokeDasharray)(r.dashArray,r.strokeWidth);return(0,i.jsxs)(Rr,{as:"div",className:Jh,"data-testid":"direct-labels",children:[a&&(0,i.jsx)("svg",{className:"_1oj6yix1",width:t.width,height:t.height,children:o.map(g=>(0,i.jsx)(ng,{anchorY:g.anchorY,labelY:g.y,endX:u,color:g.payload.color,strokeWidth:r.strokeWidth,dashArray:h},g.payload.key))}),o.map(g=>(0,i.jsx)("span",{className:(0,U.clsx)(Zh,s&&"_1oj6yix3"),style:{...l,left:c,top:g.y,color:qh(r,g.payload.color)},...s?Lt(g.payload.address):Ta(g.payload.address),children:g.payload.label},g.payload.key))]})},rg=(e,t,r)=>{const{colorScheme:n}=G(),o=M(a=>a.layers);return(0,v.useMemo)(()=>{const a=[];for(const{legend:s,legendIndex:l}of e)s.items.forEach((c,u)=>{if(c.normalizedY===null)return;const h=typeof c.visual.color=="string"?c.visual.color:void 0,g=c.layerId===void 0?void 0:(0,d.findLayerById)(o,c.layerId),p=g===void 0?h:(0,d.readPresentedGroupColor)(g,c.value,n)??h;a.push({normalizedY:c.normalizedY,payload:{key:String(a.length),label:c.formattedLabel,color:p,address:{legendIndex:l,itemIndex:u}}})});return a.length===0||t.height<=0?{placements:[],hasOverlap:!1}:(0,d.computeDirectLabelsLayout)({items:a,containerHeight:t.height,labelHeight:r})},[n,e,t.height,r,o])},ng=({anchorY:e,labelY:t,endX:r,color:n,strokeWidth:o,dashArray:a})=>{const s=r/2;return(0,i.jsx)("path",{d:`M0,${e} C${s},${e} ${s},${t} ${r},${t}`,fill:"none",stroke:n??"currentColor",strokeWidth:o,strokeDasharray:a})},og="_6a636s0";var ag=.6;var Da=(e,t)=>({...e.fill===void 0?{}:Te(e.fill,t),...e.cornerRadius===void 0?{}:{borderRadius:Ge(e.cornerRadius)},...e.shadow===void 0?{}:{boxShadow:Le(e.shadow)},...Wa(e.strokeWidth,e.stroke)}),Ha=(e,t)=>({...D(e),...Da(e,t),...e.alpha===void 0?{}:{opacity:e.alpha},paddingInline:e.paddingInline,paddingBlock:e.paddingBlock}),Ga=e=>e.fill!==void 0||e.strokeWidth>0,ig=(e,t,r)=>({...Te(e.fill,r),borderRadius:Ge(e.cornerRadius),paddingInline:e.paddingInline,paddingBlock:e.paddingBlock,boxShadow:Le(e.shadow),...e.alpha===void 0?{}:{opacity:e.alpha},...Wa(e.strokeWidth,e.stroke),...D(t)}),Wa=(e,t)=>e>0&&t!==void 0?{border:`${e}px solid ${t}`}:{},sg="var(--_1kjk02r0)",lg="_1kjk02r1",cg={1:"_1kjk02r2",2:"_1kjk02r3"},dg={1:"_1kjk02r4",2:"_1kjk02r5"};var ug={1:"_1kjk02r7",2:"_1kjk02r8"},hg={1:"_1kjk02r9",2:"_1kjk02ra"},gg="_1kjk02rb",fg="_1kjk02rc";var vg="_1dw9dgx0",Wt="\0",pg=(e,t)=>{const r=[];for(const{legend:n,legendIndex:o}of e){const a=n.aesthetics.includes("size");n.items.forEach((s,l)=>{if(a){const g=Number(s.visual.size);if(!Number.isFinite(g)||g<=0)return}const c=s.visual.color??"",u=a?`${Wt}${Number(s.visual.size)}`:"",h=s.visual.lineType;r.push({key:`${o}${Wt}${String(s.value)}${Wt}${c}${u}`,address:{legendIndex:o,itemIndex:l},formattedLabel:s.formattedLabel,visual:s.visual,swatchShape:t(s.geom),isBubble:a,primaryLineType:h,layerId:s.layerId,groupValue:s.value})})}return r},Va=({pill:e})=>e.isBubble?(0,i.jsx)(yg,{pill:e}):(0,i.jsx)(xg,{pill:e}),mg=({color:e,lineType:t,shape:r,label:n,layerId:o,groupValue:a})=>{const{swatch:s}=I(d.resolveLegendItemStyle,B()),l=jt(o,a,s.size),c=wt(o,a,e),u=M(g=>(0,d.readMainAxis)(g.coordSystem)),h=Ua(e,c);return h?(0,i.jsx)(rt,{shape:r,color:h,paint:l.fill,surface:"legend",label:n,lineType:t,width:s.size,height:s.size,strokeWidth:s.strokeWidth,alpha:l.alpha,cornerRadius:l.cornerRadius,symbol:l.symbol,mainAxis:u}):null},xg=({pill:e})=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(mg,{color:e.visual.color,lineType:e.primaryLineType,shape:e.swatchShape,label:e.formattedLabel,layerId:e.layerId,groupValue:e.groupValue}),(0,i.jsx)("span",{children:e.formattedLabel})]}),yg=({pill:e})=>{const t=Number(e.visual.size),r=jt(e.layerId,e.groupValue,t),n=wt(e.layerId,e.groupValue,e.visual.color),o=Ua(e.visual.color,n);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:vg,style:{width:t,height:t,backgroundColor:o,opacity:r.alpha}}),(0,i.jsx)("span",{children:e.formattedLabel})]})},Ua=(e,t)=>e===void 0?void 0:t,pn={[Fa]:""},bg=({hiddenPills:e,placement:t})=>{const r=pr(),[n,o]=(0,v.useState)(!1),a=B(),s=I(d.resolveLegendItemStyle,a),l=I(la,a),c=fe(),u=De([s.item.fill,l.popover.fill]),h=u(s.item.fill),g=Ha(s.item,h),p=Ag(e.length,s.item),m=p===null?void 0:{...Da(s.item,h),opacity:ag*(s.item.alpha??1)},{refs:f,floatingStyles:y}=(0,Z.useFloating)({open:n,placement:t,middleware:[(0,Z.offset)(4),(0,Z.flip)(),(0,Z.shift)({padding:8})]});(0,v.useEffect)(()=>{if(!n)return;const A=w=>{const k=w.target;if(!k)return;const E=f.reference.current,C=f.floating.current;E instanceof Element&&E.contains(k)||C instanceof Element&&C.contains(k)||o(!1)},P=w=>{w.key==="Escape"&&o(!1)};return document.addEventListener("pointerdown",A),document.addEventListener("keydown",P),()=>{document.removeEventListener("pointerdown",A),document.removeEventListener("keydown",P)}},[n,f.floating,f.reference]);const x=t==="left"||t==="right",S=p===null?[]:Array.from({length:p},(A,P)=>p-P);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{ref:f.setReference,className:(0,U.clsx)(lg,p!==null&&x&&dg[p],p!==null&&!x&&cg[p]),...pn,children:[p!==null&&S.map(A=>(0,i.jsx)("span",{className:(0,U.clsx)("_1kjk02r6",x?hg[p]:ug[p]),style:{...m,...Sg(A,x)},"aria-hidden":!0},A)),(0,i.jsx)("button",{type:"button",className:gg,style:{...g,...(0,xt.assignInlineVars)({[sg]:l.focusStroke})},onClick:()=>o(A=>!A),"aria-haspopup":"dialog","aria-expanded":n,"aria-label":`Show ${e.length} hidden legend ${e.length===1?"item":"items"}`,children:(0,i.jsxs)("span",{className:fg,children:["+",e.length]})})]}),n&&(0,i.jsx)("div",{ref:f.setFloating,role:"dialog","aria-label":r("graph.legend.hiddenItems"),className:"_1kjk02rd",style:{...y,...ig(l.popover,s.item,u(l.popover.fill))},...pn,children:(0,i.jsx)("ul",{className:"_1kjk02re",children:e.map(A=>(0,i.jsx)("li",{className:(0,U.clsx)("_1kjk02rf",c&&"_1kjk02rg"),style:{gap:s.item.gap},...c?Lt(A.address):void 0,children:(0,i.jsx)(Va,{pill:A})},A.key))})})]})},Ag=(e,t)=>{if(!Ga(t))return null;const r=Math.min(e-1,2);return r===1?1:r===2?2:null},Sg=(e,t)=>{const r=-e*4;return{transform:t?`translateY(${r}px)`:`translateX(${r}px)`}},Pg="_1cecisi0",wg="_1cecisi1",jg="_1cecisi2",kg={start:"_1cecisi3",center:"_1cecisi4",end:"_1cecisi5"},Eg={right:"_1cecisi6",left:"_1cecisi7"},Rg="_1cecisi8";var Cg=({edge:e,indexedLegends:t,containerWidth:r,containerHeight:n})=>{const o=he(),a=we(),s=B(),l=I(la,s),c=I(d.resolveLegendItemStyle,s),u=se(),h=M(E=>E.coordSystem.type),g=fe(),p=(0,v.useMemo)(()=>pg(t,E=>u(E,h)?.swatchShape??"square"),[t,u,h]),m=e==="left"||e==="right",f=m?n:r,y=t[0]?.legend.align??"start",x=(0,v.useMemo)(()=>{if(p.length===0)return{visibleCount:0,hasOverflow:!1};if(f<=0)return{visibleCount:p.length,hasOverflow:!1};const E=(0,d.toFontSpec)(c.item,a.fonts.familyDefault),C=(0,d.computeLineBoxHeight)(c.item),j=2*(c.item.paddingInline+c.item.strokeWidth),T=2*(c.item.paddingBlock+c.item.strokeWidth),O=H=>m?Ig(H,C,c.swatch.size,T):mn({label:H.formattedLabel,swatchInlineSize:Mg(H,c.swatch.size),textMeasurer:o,font:E,swatchGap:c.item.gap,horizontalChrome:j}),V=p.map(O),K=(m?C+T:mn({label:`+${p.length}`,swatchInlineSize:0,textMeasurer:o,font:E,swatchGap:c.item.gap,horizontalChrome:j}))+(Ga(c.item)?8:0);return Bg({pillSizes:V,overflowPillSize:K,containerSize:f,gap:l.gap})},[p,f,m,o,a,l,c]),S=De([c.item.fill]);if(p.length===0)return null;const A=p.slice(0,x.visibleCount),P=p.slice(x.visibleCount),w=x.hasOverflow&&P.length>0,k=Ha(c.item,S(c.item.fill));return(0,i.jsxs)("div",{className:(0,U.clsx)(kg[y],Pg,{[jg]:m,[wg]:!m,[Eg[e==="left"?"left":"right"]]:m}),style:{gap:l.gap},children:[A.map(E=>(0,i.jsx)("div",{className:(0,U.clsx)(Rg,g&&"_1cecisi9"),style:{...k,gap:c.item.gap},...g?Lt(E.address):void 0,children:(0,i.jsx)(Va,{pill:E})},E.key)),w&&(0,i.jsx)(bg,{hiddenPills:P,placement:Og(e)})]})},mn=({label:e,swatchInlineSize:t,textMeasurer:r,font:n,swatchGap:o,horizontalChrome:a})=>{const s=r.measureText(e,n).width;return t+(t>0?o:0)+s+a},Ig=(e,t,r,n)=>{const o=Tg(e,r);return Math.max(t,o)+n},Mg=(e,t)=>mt(e.visual,t,e.isBubble),Tg=(e,t)=>e.isBubble?mt(e.visual,t,!0):t,Bg=({pillSizes:e,overflowPillSize:t,containerSize:r,gap:n})=>{if(e.length===0)return{visibleCount:0,hasOverflow:!1};let o=0;for(let l=0;l<e.length;l+=1)l>0&&(o+=n),o+=e[l]??0;if(o<=r)return{visibleCount:e.length,hasOverflow:!1};let a=0,s=0;for(const l of e){const c=a+(s>0?n:0)+l;if(c+n+t>r)break;a=c,s+=1}return{visibleCount:s,hasOverflow:!0}},Og=e=>{switch(e){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left"}},Lg=(0,v.memo)(function({formattedLegends:t,rects:r}){const n=(0,v.useMemo)(()=>{const a=new Map;return t.forEach((s,l)=>{let c=a.get(s.position);c||(c={pill:[],direct:[]},a.set(s.position,c));const u={legend:s,legendIndex:l};s.display==="pill"?c.pill.push(u):c.direct.push(u)}),a},[t]),o=je();return(0,i.jsx)(i.Fragment,{children:Array.from(n,([a,s])=>{const l=r[a];return l===void 0?null:(0,i.jsxs)("div",{className:og,style:{left:l.x,top:l.y,width:l.width,height:l.height},children:[(0,i.jsx)(Cg,{edge:a,indexedLegends:s.pill,containerWidth:l.width,containerHeight:l.height}),!o&&(0,i.jsx)(tg,{indexedLegends:s.direct,containerRect:l})]},a)})})}),za=(e,t,r)=>{if(e.type==="cartesian")return(0,d.getHoverGuideLineProps)(e,t);const n=Fe(r),o=Q(t.x,e.innerRadius,n),a=Q(t.x,1,n);return{x1:o.x,y1:o.y,x2:a.x,y2:a.y}},Fg=({layers:e,primaryLayerId:t,coordSystem:r,resolveRenderer:n})=>{const o=e.find(s=>s.id===t);if(!o)return null;const a=n(o.geom,r.type);return a?a.guideMode??null:null},Ng=({panelRect:e})=>{const{coordSystem:t,layers:r,scales:n}=M((0,q.useShallow)(c=>({coordSystem:c.coordSystem,layers:c.layers,scales:c.scales}))),o=Ie(c=>c.hover.primary),a=se(),s=I(Wg,B());if(!ge[We()].hoverPaint||r.length===0||o===null||!o.anchored)return null;const l=Fg({layers:r,primaryLayerId:o.layerId,coordSystem:t,resolveRenderer:a});return l===null?null:l==="crosshair"?(0,i.jsx)(Dg,{coordSystem:t,primary:o,panelRect:e,guide:s}):t.type==="polar"?(0,i.jsx)(Gg,{coordSystem:t,primary:o,panelRect:e,guide:s}):(0,i.jsx)(Hg,{coordSystem:t,scales:n,primary:o,panelRect:e,guide:s})},Dg=({coordSystem:e,primary:t,panelRect:r,guide:n})=>{const o=za(e,t,r);return(0,i.jsx)(Cr,{panelRect:r,children:(0,i.jsx)("line",{...o,stroke:n.stroke,strokeWidth:1,strokeDasharray:"4 3",strokeLinecap:"round","data-testid":"hover-guide-line"})})},Hg=({coordSystem:e,scales:t,primary:r,panelRect:n,guide:o})=>{const a=(0,d.getHoverGuideRectProps)(e,t,r);return a===null?null:(0,i.jsx)(Cr,{panelRect:n,children:(0,i.jsx)("rect",{...a,fill:(0,d.toPaintColor)(o.fill),"data-testid":"hover-guide-rect"})})},Gg=({coordSystem:e,primary:t,panelRect:r,guide:n})=>{const o=(0,d.getPolarHoverGuideArcProps)(e,t);if(o===null)return null;const a=(0,d.buildPolarBarArcPath)(o);return a?(0,i.jsx)(Cr,{panelRect:r,children:(0,i.jsx)("svg",{viewBox:"-1 -1 2 2",preserveAspectRatio:"xMidYMid meet",width:"100%",height:"100%",style:{overflow:"visible"},children:(0,i.jsx)("path",{d:a,fill:(0,d.toPaintColor)(n.fill),"data-testid":"hover-guide-arc"})})}):null},Cr=({panelRect:e,children:t})=>(0,i.jsx)("svg",{x:e.x,y:e.y,width:e.width,height:e.height,style:{overflow:"visible",pointerEvents:"none"},"data-testid":"hover-guide",children:t}),Wg=e=>e.hoverGuide().resolve(),Vg=(e,t,r)=>{for(const n of Object.values(qa)){const o=n(e,t,r);if(o!==null)return o}return null},Ug=e=>qa[e]!==void 0,Ya=(e,t,r)=>Qa(e,r,t/2),Ka=(e,t)=>{const r=(0,d.projectAnchorToPanel)(e.start,t),n=(0,d.projectAnchorToPanel)(e.end,t);return r.x===n.x&&r.y===n.y?null:{shape:"segment",start:r,end:n}},Xa=(e,{panel:t,measuredBoxes:r})=>{const n=r.get(e.id);if(n===void 0)return null;const o=(0,d.alignUnitFractions)(e.align),a=(0,d.projectAnchorToPanel)(e.at,t);return{shape:"rect",rect:{x:a.x-o.x*n.width,y:a.y-(1-o.y)*n.height,width:n.width,height:n.height}}},lt=(e,t)=>(r,n,o)=>{const a=e(r).find(s=>s.id===n);return a===void 0?null:t(a,o)},Qa=(e,t,r=0)=>{const n=(0,d.projectRegionToPanel)(e,t);return{shape:"rect",rect:{x:n.x-r,y:n.y-r,width:n.width+r*2,height:n.height+r*2}}},qa={text:lt(e=>e.textAnnotations,Xa),shape:lt(e=>e.shapes,(e,t)=>Ya(e.region,t.readers.annotation.shape(e.id).get("strokeWidth"),t.panel)),image:lt(e=>e.images,(e,t)=>Qa(e.region,t.panel)),arrow:lt(e=>e.arrows,(e,t)=>Ka(e,t.panel))},Ja=(e,t)=>{const r=(0,d.findAnnotation)(e,t);return r!==null&&Ug(r.kind)&&(0,d.isAnnotationMovable)(r)},zg=200,Yg=({engine:e,store:t,overlayRef:r})=>{const{tolerance:n}=ge[We()],o=(0,Oe.useStore)(t,s=>s.isQueryOwnedByEditor),a=je();(0,v.useEffect)(()=>{const s=r.current;if(!s)return;const l=Kg(s,e),c=o||a?void 0:Qg(s,e,t,n??void 0);return()=>{c?.(),l()}},[e,t,r,n,o,a])},Kg=(e,t)=>{const r=()=>{const s=e.getBoundingClientRect();s.width===0||s.height===0||t.setViewport({width:s.width,height:s.height})};let n=null;const o=()=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{n=null,r()},zg)},a=new ResizeObserver(o);return a.observe(e),r(),()=>{a.disconnect(),n!==null&&clearTimeout(n)}},Xg=(e,t)=>e.kind==="cursor"?null:{x:t.left+e.point.x,y:t.top+e.point.y,placement:e.placement,annotationId:e.annotationId},Qg=(e,t,r,n)=>{let o=null,a=null;const s=()=>{const f=e.getBoundingClientRect();return f.width>0&&f.height>0?f:null},l=(f,y)=>({x:f.clientX-y.left,y:f.clientY-y.top}),c=()=>{a=null;const f=o;if(o=null,!f)return;const y=s();if(y===null)return;const x=l(f,y),S=r.getState();if(S.isPointerSuspended)return;const A=(0,d.findPointerRegion)(x,S.pointerRegions);if(A!==null){S.setHoverState(t.query(A.cursor,{tolerance:n})),S.setTooltipAnchor(Xg(A.tooltip,y));return}const P=(0,d.toPanelCursor)(x,y);S.setHoverState(t.query(P,{tolerance:n})),S.setTooltipAnchor(null)},u=()=>{const f=r.getState();f.hover.primary===null&&f.tooltipAnchor===null||(f.setHoverState(d.RESTING_HOVER_STATE),f.setTooltipAnchor(null))},h=f=>{const y=r.getState();if(y.pointerRegions.length===0)return!1;const x=s();return x===null?!1:(0,d.findPointerRegion)(l(f,x),y.pointerRegions)!==null},g=f=>{r.getState().isPointerSuspended||h(f)||(document.removeEventListener("pointermove",g),u())},p=f=>{document.removeEventListener("pointermove",g),o=f,a===null&&(a=requestAnimationFrame(c))},m=f=>{if(o=null,a!==null&&(cancelAnimationFrame(a),a=null),!r.getState().isPointerSuspended){if(h(f)){document.addEventListener("pointermove",g);return}u()}};return e.addEventListener("pointermove",p),e.addEventListener("pointerleave",m),()=>{e.removeEventListener("pointermove",p),e.removeEventListener("pointerleave",m),document.removeEventListener("pointermove",g),a!==null&&cancelAnimationFrame(a),o=null}},qg=({panelRect:e})=>{const{engine:t,store:r,overlayRef:n}=xe(),o=ue(Sr),a=ue(Wu),s=ue(c=>c.caret!==null);Yg({engine:t,store:r,overlayRef:n});const l=M(c=>o!==null&&Ja(c.spec.annotations,o));return(0,i.jsx)("rect",{ref:n,x:e.x,y:e.y,width:e.width,height:e.height,fill:"transparent",pointerEvents:s?"none":"all",cursor:Jg(l,a),"data-testid":"pointer-capture-layer"})},Jg=(e,t)=>e?"move":t?"pointer":void 0,Vt="data-hover-active",Zg=e=>{const{store:t}=xe(),r=ge[We()].hoverPaint,n=(0,Oe.useStore)(t,a=>a.hover.primary!==null),o=r&&n;(0,v.useEffect)(()=>{const a=e.current;if(a)return o?a.setAttribute(Vt,"true"):a.removeAttribute(Vt),()=>{a.removeAttribute(Vt)}},[e,o])},Ft=()=>ue(e=>Me(e,"move-drag")?.annotationId??Me(e,"shape-resize-drag")?.annotationId??Me(e,"arrow-endpoint-drag")?.annotationId??null),Ve=e=>{const t=M(s=>s.annotations),r=pa(),n=Su(),o=(0,v.useCallback)(s=>xn(n,"cycle",s,`Annotation reference cycle detected; dropping annotation(s): ${s.join(", ")}`),[n]),a=(0,v.useCallback)(s=>xn(n,"missing-ref",s,`Annotation reference target(s) no longer exist (dropped during compilation); dropping annotations referencing: ${s.join(", ")}`),[n]);return(0,v.useMemo)(()=>(0,d.resolveDeferredAnchors)({annotations:t,panelRect:e,measuredBoxes:r,onCycle:o,onMissingRef:a}),[t,e,r,o,a])},xn=(e,t,r,n)=>{const o=[t,...[...r].sort()].join("\0");e.has(o)||(e.add(o),console.warn(n))},_g=16,Za=({linePath:e,strokeWidth:t})=>(0,i.jsx)("path",{d:e,stroke:"transparent",strokeWidth:Math.max(t,_g),fill:"none",pointerEvents:"stroke"}),$g=1.4,ef={light:{primary:"#1D2129",inverse:"#FFFFFF"},dark:{primary:"#FFFFFF",inverse:"#1D2129"}},_a=({computed:e,style:t,isAddressable:r})=>{const n=(0,v.useId)(),{colorScheme:o}=Mt(),a=e.dashArray?{strokeDasharray:e.dashArray,strokeDashoffset:e.dashOffset}:{},s=t.outline.shadow==="none"?null:t.outline.shadow,l=t.outline.strokeWidth>0,c=ef[o],u=t.outline.stroke??nf(t.stroke,c.primary,c.inverse),h=s===null?null:rf(e,t.outline.strokeWidth,s.blur);return(0,i.jsxs)("g",{pointerEvents:r?void 0:"none",children:[r&&(0,i.jsx)(Za,{linePath:e.linePath,strokeWidth:e.strokeWidth}),s!==null&&h!==null&&(0,i.jsx)("defs",{children:(0,i.jsx)("filter",{id:n,filterUnits:"userSpaceOnUse",...h,children:(0,i.jsx)("feDropShadow",{dx:s.offsetX,dy:s.offsetY,stdDeviation:s.blur,floodColor:s.color})})}),(0,i.jsxs)("g",{filter:s===null?void 0:`url(#${n})`,children:[l&&(0,i.jsx)("path",{d:tf(e),stroke:u,strokeWidth:e.strokeWidth+2*t.outline.strokeWidth,strokeLinecap:"round",fill:"none"}),(0,i.jsx)("path",{d:e.linePath,stroke:t.stroke,strokeWidth:e.strokeWidth,strokeLinecap:"round",fill:"none",...a}),e.startArrowheadPath.length>0&&(0,i.jsx)("path",{d:e.startArrowheadPath,stroke:t.stroke,strokeWidth:e.strokeWidth,strokeLinecap:"round",fill:"none"}),e.endArrowheadPath.length>0&&(0,i.jsx)("path",{d:e.endArrowheadPath,stroke:t.stroke,strokeWidth:e.strokeWidth,strokeLinecap:"round",fill:"none"})]})]})},tf=e=>[e.linePath,e.startArrowheadPath,e.endArrowheadPath].filter(t=>t.length>0).join(" "),rf=(e,t,r)=>{const n=e.arrowheadExtent+e.strokeWidth+t+r;return{x:Math.min(e.startX,e.endX)-n,y:Math.min(e.startY,e.endY)-n,width:Math.abs(e.endX-e.startX)+2*n,height:Math.abs(e.endY-e.startY)+2*n}},nf=(e,t,r)=>{try{return(0,Oi.getContrast)(e,t)<$g?r:t}catch{return r}},of=({panelRect:e,isEditable:t})=>{const{arrows:r}=Ve(e),n=Ft(),o=B(),a=(0,v.useMemo)(()=>r.filter(s=>s.id!==n).flatMap(s=>{const l=(0,d.resolveArrowAnnotationStyle)(o,s.id),c=(0,d.computeArrow)({arrow:s,style:l,panelWidth:e.width,panelHeight:e.height});return c===null?[]:[{computed:c,style:l}]}),[r,n,e.width,e.height,o]);return a.length===0?null:(0,i.jsx)("g",{transform:`translate(${e.x}, ${e.y})`,"data-testid":"arrows",children:a.map(({computed:s,style:l})=>(0,i.jsx)("g",{...nt({kind:"annotation",id:s.id}),children:(0,i.jsx)(_a,{computed:s,style:l,isAddressable:t})},s.id))})},$a=()=>{const{selectionStore:e}=G();return(0,Oe.useStore)(e,t=>t.selection)},af=({linePath:e,arrowheadPath:t,stroke:r,strokeWidth:n,isAddressable:o})=>{const a={stroke:r,strokeWidth:n,strokeLinecap:"round",fill:"none"};return(0,i.jsxs)("g",{pointerEvents:o?void 0:"none",children:[o&&(0,i.jsx)(Za,{linePath:e,strokeWidth:n}),(0,i.jsx)("path",{d:e,...a}),(0,i.jsx)("path",{d:t,...a,strokeLinejoin:"round"})]})},sf=({x:e,y:t,text:r,box:n,label:o,arrowColor:a,isAddressable:s})=>{const{fonts:l}=we(),c=It(o.cornerRadius),u=o.shadow===void 0?void 0:Se(o.shadow),h={fill:(0,d.toPaintColor)(o.fill),stroke:o.stroke??a,strokeWidth:o.strokeWidth,style:u===void 0?void 0:{filter:u}};return(0,i.jsxs)("g",{pointerEvents:s?void 0:"none",opacity:o.alpha,children:[c===null?(0,i.jsx)("path",{d:mr(n,o.cornerRadius),...h}):(0,i.jsx)("rect",{x:n.x,y:n.y,width:n.width,height:n.height,rx:c,...h}),(0,i.jsx)("text",{x:e,y:t,dominantBaseline:"central",textAnchor:"middle",fill:o.textColor,style:{...He(o,l.familyDefault),...Et(o)},...kt(o),children:(0,d.applyTextTransform)(r,o.textTransform)})]})},lf="_1i8rg6j0",cf="75%",df=({panelRect:e,isEditable:t})=>{const r=Aa(),n=ue(Sr),o=$a(),a=(0,v.useMemo)(()=>new Set(o.filter(s=>s.kind==="annotation").map(s=>s.id)),[o]);return r.length===0?null:(0,i.jsx)("g",{transform:`translate(${e.x}, ${e.y})`,"data-testid":"difference-arrows",children:r.map(({color:s,style:l,id:c,linePath:u,arrowheadPath:h,labelPosition:g,labelBox:p,labelText:m,isDragged:f,hasComparableEndpoints:y})=>{const x=n===c||a.has(c),S=f&&!y,A=S?b.alert:s,P=x&&!S?uf(A):A;return(0,i.jsxs)("g",{className:n===c?lf:void 0,"data-warning":S||void 0,...nt({kind:"annotation",id:c}),children:[(0,i.jsx)(af,{linePath:u,arrowheadPath:h,stroke:P,strokeWidth:l.strokeWidth,isAddressable:t}),(0,i.jsx)(sf,{x:g.x,y:g.y,text:m,box:p,label:l.label,arrowColor:P,isAddressable:t})]},c)})})},uf=e=>`color-mix(in srgb, ${e} ${cf}, ${b.textPrimary})`,hf={fill:"none",contain:"xMidYMid meet",cover:"xMidYMid slice"},ei=({image:e,panel:t,style:r})=>{const n=(0,v.useId)(),{src:o,region:a,fit:s}=e,l=(0,d.projectRegionToPanel)(a,t),c=vd(r.cornerRadius),u=It(r.cornerRadius),h=r.shadow===void 0?void 0:Se(r.shadow);return(0,i.jsxs)("g",{opacity:r.alpha,style:h===void 0?void 0:{filter:h},children:[c&&(0,i.jsx)("clipPath",{id:n,children:u===null?(0,i.jsx)("path",{d:mr(l,r.cornerRadius)}):(0,i.jsx)("rect",{...l,rx:u})}),(0,i.jsx)("image",{href:o,...l,preserveAspectRatio:hf[s],clipPath:c?`url(#${n})`:void 0})]})},yn=({panelRect:e,zOrder:t})=>{const r=Ve(e).images,n=B(),o=Ft(),a=r.filter(s=>s.zOrder===t&&s.id!==o);return a.length===0?null:(0,i.jsx)("svg",{x:e.x,y:e.y,width:e.width,height:e.height,overflow:"visible","data-testid":`image-annotations-${t}`,children:a.map(s=>(0,i.jsx)("g",{...nt({kind:"annotation",id:s.id}),children:(0,i.jsx)(ei,{image:s,panel:e,style:n.annotation.image(s.id).resolve()})},s.id))})},ti=({shape:e,style:t,panel:r})=>{const n=(0,d.projectRegionToPanel)(e.region,r);return(0,i.jsx)("rect",{x:n.x,y:n.y,width:n.width,height:n.height,fill:(0,d.toPaintColor)(t.fill),fillOpacity:t.fillAlpha,opacity:t.alpha,stroke:(0,d.getShapeAnnotationStroke)(t)??"none",strokeWidth:t.strokeWidth})},bn=({panelRect:e,zOrder:t})=>{const r=Ve(e).shapes,n=B(),o=Ft(),a=r.filter(s=>s.zOrder===t&&s.id!==o);return a.length===0?null:(0,i.jsx)("svg",{x:e.x,y:e.y,width:e.width,height:e.height,overflow:"visible","data-testid":`shapes-${t}`,children:a.map(s=>(0,i.jsx)("g",{...nt({kind:"annotation",id:s.id}),children:(0,i.jsx)(ti,{shape:s,style:n.annotation.shape(s.id).resolve(),panel:e})},s.id))})},gf="_1aj6s5s0",ff="_1aj6s5s1",vf=.1,pf=({annotation:e,panel:t,style:r,blockRef:n})=>(0,i.jsx)(ri,{annotation:e,panel:t,style:r,blockRef:n,children:(0,i.jsx)(Be,{content:e.content})}),ri=({annotation:e,panel:t,style:r,blockRef:n,children:o})=>{const a=(0,d.projectAnchorToPanel)(e.at,t);return(0,i.jsx)("foreignObject",{x:a.x,y:a.y,width:(0,d.toPercent)(e.width),height:t.height,overflow:"visible",pointerEvents:"none",children:(0,i.jsx)("div",{ref:n,className:gf,style:{...xf(r),transform:mf(e.align)},children:o})})},mf=e=>{const t=(0,d.alignUnitFractions)(e);return`translate(${-t.x*100}%, ${-(1-t.y)*100}%)`},xf=e=>{const{backgroundColor:t,borderShadow:r}=yf(e),n=[r,e.shadow===void 0||e.shadow==="none"?void 0:Le(e.shadow)].filter(o=>o!==void 0);return{...D(e),padding:`${e.paddingBlock}px ${e.paddingInline}px`,borderRadius:Ge(e.cornerRadius),opacity:e.alpha,...t===void 0?{}:{backgroundColor:t},...n.length===0?{}:{boxShadow:n.join(", ")}}},yf=e=>{if(e.fill==="transparent")return{};const t=(0,d.toPaintColor)(e.fill),r=e.fillAlpha<1?z(t,e.fillAlpha):t;if(e.strokeWidth<=0)return{backgroundColor:r};const n=e.stroke??nl(t,vf);return{backgroundColor:r,borderShadow:`0 0 0 ${e.strokeWidth}px ${n}`}},bf=e=>{const t=Ve(e).textAnnotations,r=ue(n=>Me(n,"text-resize-drag"));return(0,v.useMemo)(()=>t.map(n=>ni(n,r)),[t,r])},ni=(e,t)=>t===null||t.annotationId!==e.id?e:{...e,at:{...e.at,x:e.at.x+t.shift},width:t.width},Af=({panelRect:e})=>{const t=bf(e),r=B(),n=Ft(),o=t.filter(a=>a.id!==n);return o.length===0?null:(0,i.jsx)("svg",{x:e.x,y:e.y,width:e.width,height:e.height,overflow:"visible","data-testid":"text-annotations",children:o.map(a=>(0,i.jsx)(Sf,{annotation:a,panel:e,style:r.annotation.text(a.id).resolve()},a.id))})},Sf=({annotation:e,panel:t,style:r})=>{const n=ma(e.id),o=ue(s=>s.caret?.annotationId===e.id),{TextAnnotation:a}=jr();return(0,i.jsx)("g",{...nt({kind:"annotation",id:e.id}),children:(0,i.jsx)(ri,{annotation:e,panel:t,style:r,blockRef:n,children:o&&a?(0,i.jsx)(a,{annotation:e}):(0,i.jsx)(Be,{content:e.content})})})},Pf="ph8bdc0";var wf="ph8bdc2",An={hittable:"ph8bdc4 ph8bdc3",inert:"ph8bdc5 ph8bdc3"},jf=({cx:e,cy:t,color:r,style:n})=>{const o=Se(n.shadow);return(0,i.jsx)("circle",{cx:e,cy:t,r:n.size/2,style:{fill:r,stroke:n.stroke,strokeWidth:n.strokeWidth,...o===void 0?{}:{filter:o}}})};function kf(e){const t=he(),{formattingLocale:r}=G(),n=B(),o=M((0,q.useShallow)(c=>({pinnedNumbers:c.annotations.pinnedNumbers,comments:c.annotations.comments,coordSystem:c.coordSystem,numberFormat:c.config.numberFormat,parsingLocale:c.config.parsingLocale}))),a=r??o.parsingLocale,s=(0,v.useMemo)(()=>(0,d.createPinnedNumberValueFormatter)({numberFormat:o.numberFormat,locale:a}),[o.numberFormat,a]),l=(0,v.useMemo)(()=>(c,u,h)=>{const g=(0,d.resolveCalloutAnnotationStyle)(n,c==="pinned-number"?"pinnedNumber":"comment",u).label,p=(0,d.toFontSpec)(g,tt),m=Ef(t,c,h,p),f=t.measureText(m,p),y=c==="pinned-number"?15:0;return{width:f.width+y+(g.paddingInline+g.strokeWidth)*2,height:Math.max(f.height,10)+(g.paddingBlock+g.strokeWidth)*2,text:m}},[t,n]);return(0,v.useMemo)(()=>(0,d.placeCallouts)({pinnedNumbers:o.pinnedNumbers,comments:o.comments,panelRect:e,coordSystem:o.coordSystem,measurer:l,formatPinnedNumber:c=>s(c.at)}),[o.pinnedNumbers,o.comments,e,o.coordSystem,l,s])}var Ef=(e,t,r,n)=>t!=="comment"?r:(0,d.truncateToWidth)(r,140,o=>e.measureText(o,n).width),Sn="callouts",Rf=({panelRect:e})=>{const{pinnedNumbers:t,comments:r}=M((0,q.useShallow)(f=>({pinnedNumbers:f.annotations.pinnedNumbers,comments:f.annotations.comments}))),n=M(f=>f.coordSystem),o=se(),a=Yi(10),s=B(),l=kf(e),{store:c}=xe(),u=(0,v.useMemo)(()=>{const f=new Map;for(const y of t)f.set(y.id,y.at);for(const y of r)f.set(y.id,y.at);return f},[t,r]),h=(0,v.useMemo)(()=>{const f=new Map;for(const[y,x]of u)f.set(y,a(x));return f},[u,a]),g=(0,v.useMemo)(()=>{const f=new Map;for(const y of t)f.set(y.id,(0,d.resolveCalloutAnnotationStyle)(s,"pinnedNumber",y.id));for(const y of r)f.set(y.id,(0,d.resolveCalloutAnnotationStyle)(s,"comment",y.id));return f},[t,r,s]),p=(0,v.useMemo)(()=>(0,d.buildCalloutHitRegions)(l,e),[l,e]),m=De([...g.values()].map(f=>f.label.fill));return(0,v.useEffect)(()=>{const f=c.getState();return f.publishPointerRegions(Sn,p),()=>{f.publishPointerRegions(Sn,[])}},[c,p]),t.length===0&&r.length===0?null:(0,i.jsx)("svg",{x:e.x,y:e.y,width:e.width,height:e.height,overflow:"visible",className:Pf,"data-testid":"callouts",children:l.map(f=>{if(!f.inView)return null;const y=u.get(f.id),x=g.get(f.id);if(y===void 0||x===void 0)return null;const S=h.get(f.id),A=S?.color,P=f.miniRect.width<=e.width&&f.miniRect.height<=e.height;return(0,i.jsxs)("g",{"data-testid":f.kind,children:[(0,i.jsx)("foreignObject",{x:f.miniRect.x,y:f.miniRect.y,width:f.miniRect.width,height:f.miniRect.height,overflow:"visible",children:(0,i.jsxs)("div",{className:P?An.hittable:An.inert,style:Mf(x.label,m(x.label.fill)),children:[f.kind==="pinned-number"&&(0,i.jsx)("span",{className:"ph8bdc1",children:(0,i.jsx)(rt,{shape:o(y.geom,n.type)?.swatchShape??"square",surface:"callout",color:A??"currentColor",paint:S?.fill,width:10,height:10,alpha:S?.alpha,cornerRadius:S?.cornerRadius,symbol:S?.symbol,mainAxis:(0,d.readMainAxis)(n)})}),(0,i.jsx)("span",{className:wf,style:Tf(x.label),children:f.text})]})}),(0,i.jsx)(jf,{cx:f.anchorPx.x,cy:f.anchorPx.y,color:Cf(x.marker,A),style:x.marker})]},f.id)})})},Cf=(e,t)=>e.isFillAuthored?(0,d.toPaintColor)(e.fill):t??(0,d.toPaintColor)(e.fill),If=e=>e.isTextColorAuthored?e.textColor:(0,d.ensureReadableTextColor)(e.textColor,(0,d.toPaintColor)(e.fill)),Mf=(e,t)=>({...Te(e.fill,t),borderRadius:Ge(e.cornerRadius),padding:`${e.paddingBlock}px ${e.paddingInline}px`,boxShadow:Le(e.shadow),...e.alpha===void 0?{}:{opacity:e.alpha},...e.strokeWidth>0?{border:`${e.strokeWidth}px solid ${e.stroke}`}:{}}),Tf=e=>({...D(e),color:If(e)}),Bf=(e,t)=>e*10*t,oi={"clapping-hands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z+Dg6GsPPPD4v/7yl10jnOtTqZSJzq/LWsz4xQigvH9FmyK0bP16ekWtPnTixIxh23YYj6YM153VNC2sY0qrPvroX62rr1+RoJMPjv/QpOglcPHcX/2qexi1ZtUFFzSuQ81JGEYoiS1Gf1xCfoc6ou8Z3rfv0Huvv757sLNz95SqGmY6zTKhkJ6uq0tkent3VHwzrJyh5SDvuZsoylCBrJMJIRN6OKxorququZzL8HAHMLJhve4q+TxBwfJgW353WSiEJ6SQxRPrqGJZGdeDlKmmcNEfoflpDsIBFh54mOHwmvz4+E9y9LYotkW/VL1cAph7PiU/TPxFRAv6k6RqWWnFNHWNi+Se/iQuoszMzHqMUZ5cjVo0wVwXqyHMkriotYkcFo8nEbbLoMZkUYQRR9OyzthYEu18Gtt6bC/8//6z+/m3S0H1XnrW0L+QlhSaWtS8/7kCaVBLSP4NMTXxmxi/FH9i/7+rT2twf4PgbQAAAABJRU5ErkJggg=="}},Of=3.2,Lf=({panelRect:e})=>{const t=Ve(e).stickers,r=B().graph().get("textScale");if(t.length===0)return null;const n=Bf(Of,r);return(0,i.jsx)("svg",{x:e.x,y:e.y,width:e.width,height:e.height,overflow:"visible","data-testid":"stickers",children:t.map(o=>{const a=(0,d.projectAnchorToPanel)(o.at,e);return(0,i.jsx)(Ff,{sticker:o,sizePx:n,x:a.x,y:a.y},o.id)})})},Ff=({sticker:e,sizePx:t,x:r,y:n})=>{const o=oi[e.sticker];if(!o)return null;const{width:a,height:s}=Nf(o.aspectRatio,t);return(0,i.jsx)("image",{href:o.src,x:r,y:n,width:a,height:s,transform:`translate(${-a/2}, ${-s/2})`})},Nf=(e,t)=>e>=1?{width:t,height:t/e}:{width:t*e,height:t},Df="_1agclyl0",Hf="_1agclyl1",Gf="_1agclyl2",ai=({x:e,y:t,width:r,height:n,text:o,isRotated:a,labelRole:s,position:l,coordType:c,backdropColor:u})=>{const h=B(),g=I(Bt,h),p=I(eu,h),m=a?`rotate(-90 ${e} ${t})`:void 0,f=g[s][l],y=f.stroke!==void 0&&(f.strokeWidth??0)>0,x=Uf(s,c,f),S=Vf(f,x,u,p),A={x:e-r/2,y:t-n/2,width:r,height:n},P=It(f.cornerRadius),w=f.shadow===void 0?void 0:Se(f.shadow),k={className:Hf,fill:f.fill===void 0?void 0:(0,d.toPaintColor)(f.fill),style:w===void 0?void 0:{filter:w},...y?{stroke:f.stroke,strokeWidth:f.strokeWidth}:{}};return(0,i.jsxs)("g",{transform:m,opacity:f.alpha,children:[x&&(P===null?(0,i.jsx)("path",{d:mr(A,f.cornerRadius),...k}):(0,i.jsx)("rect",{...A,rx:P,ry:P,...k})),(0,i.jsx)("text",{className:Gf,style:{...He(f),...Et(f),fill:Wf(f,S)},...kt(f),x:e,y:t,textAnchor:"middle",dominantBaseline:"central",children:(0,d.applyTextTransform)(o,f.textTransform)})]})},Wf=(e,t)=>e.isTextColorAuthored||t===void 0?e.textColor:e.isTextColorThemed?(0,d.ensureReadableTextColor)(e.textColor,t):(0,d.pickReadableTextColor)(t),Vf=(e,t,r,n)=>{if(r===void 0)return;const o=t&&e.fill!==void 0?(0,d.toPaintColor)(e.fill):void 0,a=o===void 0?void 0:(0,d.compositeColor)(void 0,o);if(a!==void 0)return a;const s=(0,d.compositeColor)(r,n)??(0,d.removeAlpha)(r);if(s!==void 0)return(0,d.compositeColor)(o,s)},Uf=(e,t,r)=>r.fill===void 0?!1:e==="aggregate"||t==="cartesian",zf=({panelRect:e,formattingLocale:t,plotBottomY:r,isFooterChromeReserved:n})=>{const o=he(),a=we(),s=M((0,q.useShallow)(f=>({layers:f.layers,coordSystem:f.coordSystem,axes:f.guides.axes,numberFormat:f.config.numberFormat,parsingLocale:f.config.parsingLocale}))),l=B(),c=yt(),u=I(Bt,l),h=(0,v.useMemo)(()=>ca({textMeasurer:o,dataLabelStyles:u,familyDefault:a.fonts.familyDefault}),[o,u,a.fonts.familyDefault]),g=(0,v.useMemo)(()=>(0,d.buildDataLabelsContent)({...s,panelRect:e,measureDataLabel:h,readers:l,formattingLocale:t,plotBottomY:r,isFooterChromeReserved:n,resolvePlacement:c}),[s,e,h,l,t,r,n,c]),p=(0,v.useRef)("");(0,v.useEffect)(()=>{if(g.warnings.length===0){p.current="";return}const f=JSON.stringify(g.warnings);f!==p.current&&(p.current=f,Tn(g.warnings))},[g.warnings]);const m=g.labels.map((f,y)=>(0,i.jsx)(ai,{x:f.x,y:f.y,width:f.width,height:f.height,text:f.text,isRotated:f.isRotated,labelRole:f.role,position:f.position,coordType:s.coordSystem.type,backdropColor:f.backdropColor},`${f.layerId}:${y}`));return(0,i.jsx)(Rr,{className:Df,transform:`translate(${e.x}, ${e.y})`,"data-testid":"data-labels",children:m})},Yf=({edge:e,position:t,labelRotation:r,offset:n,axisSize:o})=>{if(r!==0&&(e==="top"||e==="bottom")){const a=e==="top",s=a?-n:n;return{x:0,y:s,textAnchor:a?"start":"end",dominantBaseline:"central",transform:`rotate(${r}, 0, ${s})`}}switch(e){case"bottom":return{x:t*o.width,y:n,textAnchor:"middle",dominantBaseline:"hanging",transform:void 0};case"top":return{x:t*o.width,y:o.height-n,textAnchor:"middle",dominantBaseline:"auto",transform:void 0};case"left":return{x:o.width-n,y:t*o.height,textAnchor:"end",dominantBaseline:"central",transform:void 0};case"right":return{x:n,y:t*o.height,textAnchor:"start",dominantBaseline:"central",transform:void 0}}},Kf=(e,t)=>{const r=t.height/2;switch(e){case"left":return{x:0,y:r,textAnchor:"start",dominantBaseline:"middle",transform:void 0};case"right":return{x:t.width,y:r,textAnchor:"end",dominantBaseline:"middle",transform:void 0};case"top":case"bottom":return{x:t.width/2,y:r,textAnchor:"middle",dominantBaseline:"middle",transform:void 0}}},Xf=(e,t,r,n)=>{const{width:o,ascent:a,descent:s}=t,l=a+s,c=_f(e,o),u=$f(e,a,l),h=qf(r,e,n,{x:c,y:u,width:o,height:l});return{x:c-h.left,y:u-h.top,width:o+h.left+h.right,height:l+h.top+h.bottom,transform:e.transform}},Qf=(e,t)=>{const r=e.map((o,a)=>({position:o,index:a})).sort((o,a)=>o.position-a.position),n=e.map(()=>1/0);return r.forEach((o,a)=>{const s=r[a-1],l=r[a+1],c=s===void 0?1/0:o.position-s.position,u=l===void 0?1/0:l.position-o.position,h=Math.min(c,u);n[o.index]=Number.isFinite(h)?h*t:1/0}),n},qf=(e,t,r,n)=>r===void 0?{left:e,right:e,top:e,bottom:e}:t.transform!==void 0?Jf(e,t):Zf(e,r,n),Jf=(e,{y:t,textAnchor:r})=>{const n=Qe(e,Math.abs(t));return r==="end"?{left:e,right:n,top:e,bottom:e}:{left:n,right:e,top:e,bottom:e}},Zf=(e,{edge:t,stepPx:r,axisSize:n},o)=>{const a=Pn(e,r,o.width),s=Pn(e,r,o.height);switch(t){case"bottom":return{left:a,right:a,top:Qe(e,o.y),bottom:e};case"top":return{left:a,right:a,top:e,bottom:Qe(e,n.height-o.y-o.height)};case"left":return{left:e,right:Qe(e,n.width-o.x-o.width),top:s,bottom:s};case"right":return{left:Qe(e,o.x),right:e,top:s,bottom:s}}},Qe=(e,t)=>Math.max(0,Math.min(e,t)),Pn=(e,t,r)=>Math.min(e,Math.max(0,(t-r)/2)),_f=({x:e,textAnchor:t},r)=>{switch(t){case"start":return e;case"middle":return e-r/2;case"end":return e-r}},$f=({y:e,dominantBaseline:t},r,n)=>{switch(t){case"hanging":return e;case"central":case"middle":return e-n/2;case"auto":return e-r}},e0={fill:"transparent",pointerEvents:"all"},Ir=({placement:e,text:t,style:r,isHitTestable:n,bounds:o})=>(0,i.jsxs)(i.Fragment,{children:[n&&(0,i.jsx)(t0,{placement:e,text:t,style:r,bounds:o}),(0,i.jsx)("text",{...e,style:{...He(r),...Et(r)},...kt(r),fill:r.textColor,children:(0,d.applyTextTransform)(t,r.textTransform)})]}),t0=({placement:e,text:t,style:r,bounds:n})=>{const o=he(),{fonts:a}=we();return(0,i.jsx)("rect",{...(0,v.useMemo)(()=>Xf(e,o.measureText(t,(0,d.toFontSpec)(r,a.familyDefault)),3,n),[e,o,t,r,a.familyDefault,n]),...e0})},r0=({edge:e,position:t,labelRotation:r,label:n,tickLabelStyle:o,axisSize:a,stepPx:s=1/0,isHitTestable:l=!1})=>{const{offset:c}=o,u=(0,v.useMemo)(()=>Yf({edge:e,position:t,labelRotation:r,offset:c,axisSize:a}),[e,t,r,c,a]),h=(0,i.jsx)(Ir,{placement:u,text:n,style:o,isHitTestable:l,bounds:(0,v.useMemo)(()=>({edge:e,stepPx:s,axisSize:a}),[e,s,a])});return u.transform===void 0?h:(0,i.jsx)("svg",{x:(0,d.toPercent)(t),y:e==="top"?"100%":0,style:{overflow:"visible"},children:h})},n0=({formattedAxis:e,rect:t})=>{const r=e.position==="bottom"||e.position==="top",n=(0,d.getAestheticFromScaleAestheticKey)(e.scaleAestheticKey),o=B(),a=I(br,o)(n,e.position),s=I(sa,o)[n],l=fe(),c=(0,v.useMemo)(()=>({width:t.width,height:t.height}),[t.width,t.height]),u=r?t.width:t.height,h=(0,v.useMemo)(()=>l?Qf(e.ticks.map(g=>g.position),u):void 0,[l,e.ticks,u]);return(0,i.jsxs)("svg",{x:t.x,y:t.y,width:t.width,height:t.height,style:{overflow:"visible"},children:[!1,e.ticks.map((g,p)=>{const m=g.formattedLabel,f=r?g.position:1-g.position,y=o0(e.position,f,t,s.length),x=l&&m!=="";return(0,i.jsxs)("g",{...x?Ot(e.scaleAestheticKey,p):void 0,cursor:x?"pointer":void 0,children:[e.ticksVisible&&(0,i.jsx)("line",{...y,stroke:s.stroke,strokeWidth:s.strokeWidth,strokeDasharray:(0,d.toStrokeDasharray)(s.dashArray,s.strokeWidth),pointerEvents:l?"none":void 0}),(0,i.jsx)(r0,{edge:e.position,position:f,labelRotation:e.labelRotation,label:m,tickLabelStyle:a,axisSize:c,stepPx:h?.[p],isHitTestable:x})]},p)})]})},o0=(e,t,r,n)=>{const o=(0,d.toPercent)(t);switch(e){case"bottom":return{x1:o,y1:0,x2:o,y2:n};case"top":return{x1:o,y1:r.height,x2:o,y2:r.height-n};case"left":return{x1:r.width,y1:o,x2:r.width-n,y2:o};case"right":return{x1:0,y1:o,x2:n,y2:o}}},a0=({axes:e,rects:t})=>{const r=I(ia,B()),n=fe();return(0,i.jsx)(i.Fragment,{children:e.map(o=>{const a=t[o.position];return!a||!o.isVisible?null:(0,i.jsx)(i0,{axis:o,rect:a,labelStyle:r[(0,d.getAestheticFromScaleAestheticKey)(o.scaleAestheticKey)],isHitTestable:n},`axis-label-${o.position}`)})})},i0=({axis:e,rect:t,labelStyle:r,isHitTestable:n})=>{const o=(0,v.useMemo)(()=>Kf(e.position,t),[e.position,t]),a=n&&e.label!==null&&e.label!=="",s=a?Ot(e.scaleAestheticKey):void 0;return(0,i.jsxs)("g",{transform:`translate(${t.x}, ${t.y})`,...s,cursor:a?"pointer":void 0,children:[!1,(0,i.jsx)(Ir,{placement:o,text:e.label??"",style:r,isHitTestable:a})]})},s0=({formattedAxes:e,tickRects:t})=>(0,i.jsx)(i.Fragment,{children:e.map(r=>{if(r.geometry!=="linear")return null;const n=t[r.position];return!n||!r.isVisible?null:(0,i.jsx)(n0,{formattedAxis:r,rect:n},r.scaleAestheticKey)})}),l0=({formattedAxes:e,labelRects:t})=>(0,i.jsx)(a0,{axes:e.filter(r=>r.geometry==="linear"),rects:t}),ii={strokeDashoffset:"0",strokeLinecap:"round"},_e=(e,t)=>e.gridLine[t]().resolve(),si=({axes:e,panelBorderSizes:t,panelFrameRect:r,panelRect:n})=>{const o=B(),a=fe(),s=I(_e,o,"x"),l=I(_e,o,"y"),c=n.x-r.x,u=n.y-r.y;return(0,i.jsx)("svg",{"data-testid":"grid",x:r.x,y:r.y,width:r.width,height:r.height,style:{overflow:"visible"},children:e.map(h=>{if(h.geometry!=="linear"||!h.gridVisible)return null;const g=(0,d.getAestheticFromScaleAestheticKey)(h.scaleAestheticKey)==="x"?s:l;if(g.strokeWidth<=0)return null;const p=h.position==="bottom"||h.position==="top",m=(0,d.toStrokeDasharray)(g.dashArray,g.strokeWidth);return(0,i.jsx)("g",{children:h.ticks.map((f,y)=>{const x=c0(p,f.position);if(x!==null&&t[x]>0)return null;const S=p?f.position:1-f.position;let A;if(p){const w=S*n.width+c;A={x1:w,y1:0,x2:w,y2:"100%"}}else{const w=S*n.height+u;A={x1:0,y1:w,x2:"100%",y2:w}}const P=(0,i.jsx)("line",{...A,...ii,strokeDasharray:m,strokeWidth:g.strokeWidth,stroke:g.stroke});return a?(0,i.jsxs)("g",{...Er(h.scaleAestheticKey),children:[P,(0,i.jsx)("line",{...A,stroke:"transparent",strokeWidth:7,pointerEvents:"stroke","data-testid":"grid-line-hit-area"})]},y):(0,i.jsx)(v.Fragment,{children:P},y)})},h.scaleAestheticKey)})})},c0=(e,t)=>t<=0?e?"left":"bottom":t>=1?e?"right":"top":null,d0=({sizes:e,panelFrameRect:t})=>{const r=M(a=>a.coordSystem.type==="polar"),n=I(d.resolvePanelBorderStyle,B());if(r)return null;const o=(0,d.computePanelBorderPaths)(n,{x:e.left/2,y:e.top/2,width:t.width-(e.left+e.right)/2,height:t.height-(e.top+e.bottom)/2});return o.length===0?null:(0,i.jsx)("svg",{"data-testid":"panel-border",x:t.x,y:t.y,width:t.width,height:t.height,style:{overflow:"visible"},children:o.map((a,s)=>(0,i.jsx)("path",{d:u0(a.segments),fill:"none",stroke:a.stroke,strokeDasharray:(0,d.toStrokeDasharray)(a.dashArray,a.strokeWidth),strokeWidth:a.strokeWidth,...ii},s))})},u0=e=>e.map(t=>{switch(t.type){case"move":return`M ${t.x} ${t.y}`;case"line":return`L ${t.x} ${t.y}`;case"arc":{const r=t.cx+t.radius*Math.cos(t.endAngle),n=t.cy+t.radius*Math.sin(t.endAngle);return`A ${t.radius} ${t.radius} 0 0 1 ${r} ${n}`}case"close":return"Z"}}).join(" ");var li=(e,t)=>{const r=M(c=>c.coordSystem);if(r.type!=="polar")return null;const n=t.find(c=>c.geometry==="circular");if(!n)return null;const{innerRadius:o,startAngle:a,spokeRotation:s}=r,l=Fe(e);return l.radius<=0?null:{circle:l,circularAxis:n,radialAxis:t.find(c=>c.geometry==="radial"),innerRadius:o,startAngle:a,angleFor:c=>(0,d.positionToAngle)(c,a,s),radiusNormFor:c=>o+c*(1-o)}},h0=16,g0=({formattedAxes:e,panelRect:t})=>{const r=I(br,B()),n=fe(),o=li(t,e);if(!o)return null;const{circle:a,circularAxis:s,radialAxis:l,startAngle:c,angleFor:u,radiusNormFor:h}=o,g=f0(l,h,a.radius),p=m=>r((0,d.getAestheticFromScaleAestheticKey)(m.scaleAestheticKey));return(0,i.jsxs)("svg",{x:t.x,y:t.y,width:t.width,height:t.height,overflow:"visible","data-testid":"polar-axis-ticks",children:[l?.isVisible&&g.map(({tick:m,tickIndex:f,radiusNorm:y})=>(0,i.jsx)(wn,{scaleAestheticKey:l.scaleAestheticKey,tickIndex:f,placement:jn(Q(c,y,a),"middle"),label:m.formattedLabel,labelStyle:p(l),isHitTestable:n},`radial-label-${f}`)),s.isVisible&&s.ticks.map((m,f)=>{if(m.position>=1-1e-9)return null;const y=u(m.position),x=Q(y,(a.radius+d.POLAR_RIM_LABEL_GAP_PX)/a.radius,a);return(0,i.jsx)(wn,{scaleAestheticKey:s.scaleAestheticKey,tickIndex:f,placement:jn(x,v0(y)),label:m.formattedLabel,labelStyle:p(s),isHitTestable:n},`rim-label-${f}`)})]})},wn=({scaleAestheticKey:e,tickIndex:t,placement:r,label:n,labelStyle:o,isHitTestable:a})=>{const s=(0,i.jsx)(Ir,{placement:r,text:n,style:o,isHitTestable:a});return a?(0,i.jsx)("g",{...Ot(e,t),cursor:"pointer",children:s}):s},f0=(e,t,r)=>{if(!e)return[];const n=[];let o=Number.NEGATIVE_INFINITY;for(const[a,s]of e.ticks.entries()){const l=t(s.position);if(l<=0)continue;const c=l*r;c-o<h0||(n.push({tick:s,tickIndex:a,radiusNorm:l}),o=c)}return n},jn=(e,t)=>({x:e.x,y:e.y,textAnchor:t,dominantBaseline:"central",transform:void 0}),v0=e=>{const t=Math.sin(e);return Math.abs(t)<.01?"middle":t>0?"start":"end"},p0=({formattedAxes:e,panelRect:t})=>{const r=B(),n=fe(),o=I(_e,r,"y"),a=I(_e,r,"x"),s=li(t,e);if(!s)return null;const{circle:l,circularAxis:c,radialAxis:u,innerRadius:h,angleFor:g,radiusNormFor:p}=s;return(0,i.jsxs)("svg",{x:t.x,y:t.y,width:t.width,height:t.height,overflow:"visible","data-testid":"polar-grid",children:[u?.gridVisible&&u.ticks.map((m,f)=>{const y=p(m.position)*l.radius;return y<=0||m.position>=1?null:(0,i.jsx)(Ut,{axis:(0,d.getAestheticFromScaleAestheticKey)(u.scaleAestheticKey),lineStyle:o,isHitTestable:n,draw:x=>(0,i.jsx)("circle",{cx:l.centerX,cy:l.centerY,r:y,fill:"none",...x})},`ring-${f}`)}),u?.gridVisible&&(0,i.jsx)(Ut,{axis:(0,d.getAestheticFromScaleAestheticKey)(u.scaleAestheticKey),lineStyle:o,isHitTestable:n,draw:m=>(0,i.jsx)("circle",{cx:l.centerX,cy:l.centerY,r:l.radius,fill:"none",...m})}),c.gridVisible&&c.ticks.map((m,f)=>{if(m.position>=1-1e-9)return null;const y=g(m.position),x=Q(y,h,l),S=Q(y,1,l);return(0,i.jsx)(Ut,{axis:(0,d.getAestheticFromScaleAestheticKey)(c.scaleAestheticKey),lineStyle:a,isHitTestable:n,draw:A=>(0,i.jsx)("line",{x1:x.x,y1:x.y,x2:S.x,y2:S.y,...A})},`spoke-${f}`)})]})},Ut=({axis:e,lineStyle:t,isHitTestable:r,draw:n})=>{if(t.strokeWidth<=0)return null;const o=n({stroke:t.stroke,strokeWidth:t.strokeWidth});return r?(0,i.jsxs)("g",{...Er(e),children:[o,n({stroke:"transparent",strokeWidth:7,pointerEvents:"stroke","data-testid":"grid-line-hit-area"})]}):o},m0=({layer:e,isDimmed:t,dimStyle:r,...n})=>{const o=na(e.id),a=Di(e,F(e)),s=t?r.filter:void 0,l=a&&s?`${a} ${s}`:a||s,c=o?.type==="fade",u=(0,v.useMemo)(()=>({layerId:e.id,paintsShadow:a!==void 0,isFading:c}),[e.id,a,c]),h=(0,i.jsx)("g",{style:{opacity:t?r.opacity:void 0,filter:l},children:(0,i.jsx)(bt.Provider,{value:u,children:(0,i.jsx)(x0,{layer:e,...n})})});return c?(0,i.jsx)(R.motion.g,{initial:{opacity:0},animate:{opacity:1},transition:Wn(o),children:h}):h},x0=({layer:e,coordSystem:t,shouldAnimateTransitions:r,formattingLocale:n,panelRect:o})=>{const a=se(),s=na(e.id),{colorScheme:l}=G(),c=F(e),u=a(e.geom,t.type);if(u===null)return null;const h=Rt(u.render);return h.overlay?null:h.fn({layer:e,coordSystem:t,shouldAnimateTransitions:r,formattingLocale:n,intro:s,panelRect:o,colorScheme:l,styleReaders:c})};function y0({renderer:e,layer:t,coordSystem:r,candidates:n}){if(e?.getOverlayAnchor===void 0||n.length===0)return[];const o=[];for(const{observation:a,observationIndex:s}of n){const l=e.getOverlayAnchor({layer:t,coordSystem:r,observation:a});l!==null&&o.push({observation:a,observationIndex:s,anchor:l})}return o}var b0=4,A0=({renderer:e,layer:t,matchedLayer:r,overlayCandidates:n,coordSystem:o,shouldAnimateTransitions:a,panelRect:s,formattingLocale:l})=>{const c=M(P=>P.config.numberFormat),u=(0,v.useMemo)(()=>y0({renderer:e,layer:t,coordSystem:o,candidates:n}),[e,t,o,n]),{colorScheme:h}=G(),g=F(t),p=B(),m=(0,v.useMemo)(()=>(0,d.createSegmentYReader)(t),[t]),f=(0,v.useMemo)(()=>(0,d.createLayerYValueFormatter)({layer:t,numberFormat:c,locale:l}),[c,t,l]),{fonts:y}=we(),x=I(Bt,B());if(e===null||r===null&&u.length===0)return null;const S=Rt(e.render);let A=null;if(r&&!S.overlay){const P={layer:r,sourceLayer:t,coordSystem:o,shouldAnimateTransitions:a,formattingLocale:l,panelRect:s,colorScheme:h,styleReaders:g};A=e.renderHighlight?e.renderHighlight(P):S.fn(P)}return(0,i.jsxs)(Rr,{children:[A,u.map(({observation:P,observationIndex:w,anchor:k})=>(0,i.jsx)(S0,{observation:P,anchor:k,panelRect:s,fill:(0,d.readGeomColor)(p,t,P)??d.DEFAULT_GEOM_COLOR,symbol:g.get("symbol",P)??"circle",dotRadius:(g.get("size",P)??d.DEFAULT_POINT_SIZE_PX)/2,readSegmentY:m,formatYValue:f,labelStyle:x.observation.outside,familyDefault:y.familyDefault},P0(P,w)))]})},S0=({observation:e,anchor:t,panelRect:r,fill:n,symbol:o,dotRadius:a,readSegmentY:s,formatYValue:l,labelStyle:c,familyDefault:u})=>{const h=he(),g=(0,d.toViewBoxX)(t.x),p=(0,d.toViewBoxY)(t.y),m=s(e)??null,f=m!==null?l(m,e):null,y=(0,v.useMemo)(()=>{if(f===null)return null;const x=h.measureText(f,(0,d.toFontSpec)(c,u));return{width:x.width+c.paddingInline*2,height:x.height+c.paddingBlock*2}},[f,h,c,u]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(At,{symbol:o,cx:(0,d.toPercent)(g),cy:(0,d.toPercent)(p),size:a*2,fill:n,"data-testid":"highlight-overlay-dot"}),f!==null&&y!==null&&(0,i.jsx)(ai,{x:g*r.width,y:p*r.height-a-b0-y.height/2,width:y.width,height:y.height,text:f,isRotated:!1,labelRole:"observation",position:"outside",coordType:"cartesian"})]})},P0=(e,t)=>{const r=e[d.GROUP_VARIABLES.group];return`${String(r??"")}\0${t}`},kn=64,_t=({overlay:e,panelRect:t,children:r})=>{const n=(0,v.useId)(),o=(0,v.useId)(),{fillFor:a,defs:s}=Y({paints:e}),l=(0,i.jsx)("g",{id:n,children:r});if(e.length===0)return l;const c={x:-64,y:-64,width:t.width+2*kn,height:t.height+2*kn};return(0,i.jsxs)(i.Fragment,{children:[l,s,(0,i.jsx)("mask",{id:o,maskUnits:"userSpaceOnUse",style:{maskType:"alpha"},...c,children:(0,i.jsx)("use",{href:`#${n}`})}),(0,i.jsx)("g",{mask:`url(#${o})`,pointerEvents:"none","data-testid":"layer-overlay",children:[...e].reverse().map((u,h)=>(0,i.jsx)("rect",{...c,fill:a(u)},h))})]})},En=[],ci=(e,t,r)=>{const n=F(e);return(0,v.useMemo)(()=>{const[o]=e.data,a=r??o;return a===void 0?En:n.get("overlay",a,t)??En},[e,n,t,r])},w0=({layer:e,coordSystem:t,panelRect:r})=>{const{primary:n,group:o,related:a}=Ie((0,q.useShallow)(f=>({primary:f.hover.primary,group:f.hover.group,related:f.hover.related}))),s=se(),{colorScheme:l}=G(),c=F(e),u=ge[We()].hoverPaint,h=n?.layerId===e.id,g=a.get(e.id)??[],p=ci(e,h?"hovered":void 0,h?n.observation:void 0);if(!u||n===null)return null;const m=s(e.geom,t.type);return m===null||Oo(m)?null:h?(0,i.jsx)(_t,{overlay:p,panelRect:r,children:m.renderHover({layer:e,coordSystem:t,primary:n,group:o,related:g,panelRect:r,colorScheme:l,styleReaders:c})}):g.length===0?null:(0,i.jsx)(_t,{overlay:p,panelRect:r,children:m.renderHoverCompanions({layer:e,coordSystem:t,primary:n,related:g,colorScheme:l,styleReaders:c})})},j0=e=>{const t=F(e);return(0,v.useMemo)(()=>{const[r]=e.data;if(r===void 0)return{opacity:void 0,filter:void 0};const n=t.resolveState("dimmed",r);return{opacity:n.alpha,filter:Hn((0,d.pickFilters)(n))}},[e,t])},k0="var(--to1jkx0)",E0="var(--to1jkx1)",R0="to1jkx2",C0="to1jkx3",I0=({shouldAnimateTransitions:e,panelRect:t,formattingLocale:r})=>{const{layers:n,coordSystem:o}=M((0,q.useShallow)(s=>({layers:s.layers,coordSystem:s.coordSystem}))),a=je()?[]:n;return(0,i.jsx)("svg",{x:t.x,y:t.y,width:t.width,height:t.height,className:R0,"data-testid":"geom-layers",...Yh(),children:a.map(s=>(0,i.jsxs)(v.Fragment,{children:[(0,i.jsx)(B0,{layer:s,coordSystem:o,shouldAnimateTransitions:e,panelRect:t,formattingLocale:r}),(0,i.jsx)(w0,{layer:s,coordSystem:o,panelRect:t})]},`${s.id}-${M0(o)}`))})},M0=e=>e.type==="cartesian"?`cartesian-${e.mainAxis}`:e.type,T0=e=>(0,xt.assignInlineVars)({...e.opacity===void 0?{}:{[k0]:String(e.opacity)},...e.filter===void 0?{}:{[E0]:e.filter}}),B0=({layer:e,coordSystem:t,shouldAnimateTransitions:r,panelRect:n,formattingLocale:o})=>{const a=se(),s=(0,v.useMemo)(()=>a(e.geom,t.type),[a,e,t]),l=e.highlight,c=j0(e),u=ci(e),{colorScheme:h}=G(),g={layer:e,coordSystem:t,shouldAnimateTransitions:r,formattingLocale:o,panelRect:n,colorScheme:h,styleReaders:F(e)},p=s?Rt(s.render):null,m=e.spatialKind==="render-hit-test",f=c.opacity!==void 0||c.filter!==void 0;return(0,i.jsx)("g",{className:f?C0:void 0,style:f?T0(c):void 0,children:(0,i.jsxs)(_t,{overlay:p?.overlay?[]:u,panelRect:n,children:[(0,i.jsx)(m0,{layer:e,coordSystem:t,shouldAnimateTransitions:r,isDimmed:l?.composition.isDimmed??!1,dimStyle:c,formattingLocale:o,panelRect:n}),m&&!p?.overlay&&s?.hitTest&&(0,i.jsx)(zc,{hitTest:s.hitTest,input:g}),m&&p?.overlay&&(0,i.jsx)(qc,{render:p.fn,input:g}),l!==null&&(0,i.jsx)(A0,{renderer:s,layer:e,matchedLayer:l.composition.matchedLayer,overlayCandidates:l.composition.overlayCandidates,coordSystem:t,shouldAnimateTransitions:r,panelRect:n,formattingLocale:o})]})})},O0="_17uhij30",L0=({formattedAxes:e,plotRect:t,panelBorder:r,panelFrameRect:n,panelRect:o,axisRects:a,axisLabelRects:s,shouldAnimateTransitions:l,formattingLocale:c,plotBottomY:u,isFooterChromeReserved:h,isEditable:g,showAnnotations:p})=>{const m=(0,v.useRef)(null);Zg(m);const f=oe("Grid",si),y=oe("AxisTicks",s0),x=oe("AxisLabel",l0),S=(0,v.useMemo)(()=>$t(n,t),[n,t]),A=(0,v.useMemo)(()=>$t(o,t),[o,t]),P=(0,v.useMemo)(()=>Rn(a,t),[a,t]),w=(0,v.useMemo)(()=>Rn(s,t),[s,t]),k=je(),E=p&&!k;return(0,i.jsxs)("svg",{ref:m,className:O0,width:t.width,height:t.height,style:{transform:`translate(${t.x}px, ${t.y}px)`},"data-testid":"plot",children:[(0,i.jsx)(f,{axes:e,panelBorderSizes:r,panelFrameRect:S,panelRect:A}),(0,i.jsx)(y,{formattedAxes:e,tickRects:P}),(0,i.jsx)(x,{formattedAxes:e,labelRects:w}),(0,i.jsx)(p0,{formattedAxes:e,panelRect:A}),(0,i.jsx)(Ng,{panelRect:A}),E&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(bn,{panelRect:A,zOrder:"background"}),(0,i.jsx)(yn,{panelRect:A,zOrder:"background"})]}),(0,i.jsx)(d0,{sizes:r,panelFrameRect:S}),(0,i.jsx)(I0,{shouldAnimateTransitions:l,panelRect:A,formattingLocale:c}),(0,i.jsx)(g0,{formattedAxes:e,panelRect:A}),(0,i.jsx)(zf,{panelRect:A,formattingLocale:c,plotBottomY:u,isFooterChromeReserved:h}),E&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(df,{panelRect:A,isEditable:g}),(0,i.jsx)(bn,{panelRect:A,zOrder:"foreground"}),(0,i.jsx)(yn,{panelRect:A,zOrder:"foreground"}),(0,i.jsx)(of,{panelRect:A,isEditable:g}),(0,i.jsx)(Af,{panelRect:A}),(0,i.jsx)(Lf,{panelRect:A}),(0,i.jsx)(Rf,{panelRect:A})]}),(0,i.jsx)(qg,{panelRect:A})]})},$t=(e,t)=>({x:e.x-t.x,y:e.y-t.y,width:e.width,height:e.height}),Rn=(e,t)=>{const r={};for(const[n,o]of Object.entries(e))r[n]=$t(o,t);return r},F0=e=>{let t,r;return"aspectRatio"in e?"intrinsicWidth"in e?(t=e.intrinsicWidth,r=t/e.aspectRatio):(r=e.intrinsicHeight,t=r*e.aspectRatio):(t=e.intrinsicWidth,r=e.intrinsicHeight),{width:Cn(t,"width"),height:Cn(r,"height")}},Cn=(e,t)=>{if(e<=0||Number.isNaN(e)||!Number.isFinite(e))throw new d.InternalError({message:`Expected ${t} to be a positive, finite number, but got ${e}.`});return e},N0=({sizing:e,onResize:t,children:r})=>{const n=Vo({onResize:t}),o=(0,v.useRef)(!1);if((0,v.useEffect)(()=>{e.mode==="responsive"&&(n.isDefault||n.width>0&&n.height>0||o.current||(o.current=!0,console.warn(`[graphy] ZERO_SIZE_CONTAINER: GraphRenderer measured ${n.width}×${n.height}; the chart will not paint until the host has a positive width and height.`)))},[e.mode,n.isDefault,n.width,n.height]),e.mode==="keepAspectRatio"){const{intrinsicSize:s,canRender:l,outerStyles:c,innerStyles:u}=D0(e,n.width,!n.isDefault);return(0,i.jsx)("div",{ref:n.setElement,style:c,"data-testid":"graph-sizer",children:l&&(0,i.jsx)("div",{style:u,children:r(s)})})}if(e.mode==="fixed")return(0,i.jsx)("div",{ref:n.setElement,style:{width:e.width,height:e.height},"data-testid":"graph-sizer",children:r({width:e.width,height:e.height})});const a=!n.isDefault&&n.width>0&&n.height>0;return(0,i.jsx)("div",{ref:n.setElement,style:{width:"100%",height:"100%"},"data-testid":"graph-sizer",children:a&&r({width:n.width,height:n.height})})},D0=(e,t,r)=>{const n=F0(e),o=t>0&&n.width>0?t/n.width:1;return{intrinsicSize:n,canRender:r,outerStyles:{width:"100%",...r?{height:n.height*o}:{aspectRatio:`${n.width} / ${n.height}`}},innerStyles:{transformOrigin:"top left",transform:`scale(${o})`,width:n.width,height:n.height}}},H0={mode:"responsive"},zt={headerSize:{width:0,height:0},footerSize:{width:0,height:0}},G0=()=>{const[e,t]=(0,v.useState)(null),[r,n]=(0,v.useState)(null),[o,a]=(0,v.useState)(zt);return(0,v.useLayoutEffect)(()=>{const s=()=>{const c=e?{width:e.offsetWidth,height:e.offsetHeight}:zt.headerSize,u=r?{width:r.offsetWidth,height:r.offsetHeight}:zt.footerSize;a(h=>W0(h,{headerSize:c,footerSize:u})?{headerSize:c,footerSize:u}:h)};s();const l=new ResizeObserver(s);return e&&l.observe(e),r&&l.observe(r),()=>l.disconnect()},[e,r]),{headerRef:t,footerRef:n,measurements:o}},W0=(e,t)=>e.headerSize.width!==t.headerSize.width||e.headerSize.height!==t.headerSize.height||e.footerSize.width!==t.footerSize.width||e.footerSize.height!==t.footerSize.height,V0=()=>null,U0="_1vl0pke0",z0="_1vl0pke1";var Y0=[],K0=({graphChrome:e,isEditable:t,mode:r,style:n,contentRef:o,children:a})=>{const{themeClass:s,inlineVarsStyle:l}=Mt(),c=e.strokeWidth,u=c>0?e.stroke:void 0,h=Math.max(0,e.cornerRadius),g=h===0?0:h+c,{shadow:p,alpha:m,blendMode:f,fill:y,overlay:x=Y0}=e,S=De([y,...x]),A=S(y),P=typeof y!="string",w=(0,v.useMemo)(()=>({...n,borderRadius:`${g}px`,...l,...u===void 0?{}:{borderWidth:`${c}px`,borderStyle:"solid",borderColor:u},...p===void 0?{}:{boxShadow:Le(p)}}),[n,g,l,c,u,p]),k=(0,v.useMemo)(()=>({borderRadius:`${h}px`,...f==="normal"?{}:{mixBlendMode:f},...X0(P,m)}),[h,f,P,m]),E=(0,v.useMemo)(()=>typeof y=="string"?void 0:{...Te(y,A),opacity:m},[y,A,m]),C=t&&y==="transparent";return(0,i.jsx)("div",{"data-testid":"graph-wrapper",className:(0,U.default)(yd,s),style:w,children:(0,i.jsxs)("div",{ref:o,"data-testid":"graph-inner","data-graph-mode":r,tabIndex:t?0:void 0,className:(0,U.default)(Ad,{[Sd]:t,[Pd]:C,[z0]:P}),style:k,children:[E&&(0,i.jsx)("div",{"aria-hidden":!0,"data-testid":"graph-fill",className:"_1vl0pke2",style:E}),a,[...x].reverse().map((j,T)=>(0,i.jsx)("div",{"aria-hidden":!0,"data-testid":"graph-overlay",className:U0,style:Te(j,S(j))},T))]})})},X0=(e,t)=>e?{backgroundColor:"transparent"}:t===void 0||t>=1?{}:{backgroundColor:`color-mix(in srgb, ${b.graphBackground} ${t*100}%, transparent)`},Q0=e=>(0,i.jsx)(Ko,{locale:ha(),children:(0,i.jsx)(di,{...e})}),di=({slots:e,sizing:t=H0,onResize:r,...n})=>(0,i.jsx)(Do,{children:(0,i.jsx)(fo,{children:(0,i.jsx)(Gl,{slots:e,children:(0,i.jsx)(N0,{sizing:t,onResize:r,children:({width:o,height:a})=>(0,i.jsx)(q0,{width:o,height:a,...n})})})})}),q0=({width:e,height:t,animation:r,showTooltips:n=!0,mode:o=ae.readonly})=>{const a=pr(),s=vr(o),{axes:l,legends:c,layers:u,numberFormat:h,parsingLocale:g,annotations:p,coordSystem:m,headline:f,headlineConfig:y,content:x,overflowStrategy:S}=M((0,q.useShallow)(J=>({axes:J.guides.axes,legends:J.guides.legends.drawn,layers:J.layers,numberFormat:J.config.numberFormat,parsingLocale:J.config.parsingLocale,annotations:J.annotations,coordSystem:J.coordSystem,headline:J.guides.headline,headlineConfig:J.config.headline,content:J.config.content,overflowStrategy:J.config.panel.overflow}))),{intro:A,transitions:P}=td(r,u),{headerRef:w,footerRef:k,measurements:E}=G0(),{formattingLocale:C,colorScheme:j}=G(),T=ge[s],O=T.editorSurface,[V,K]=(0,v.useState)(null),H=oe("Header",ja),ve=oe("Footer",wa),ui=oe("Legend",Lg),hi=oe("Headline",Gh),gi=oe("EditorSurface",V0),Mr=(0,v.useMemo)(()=>(0,d.formatLegends)({legends:c,numberFormat:h,parsingLocale:g,formattingLocale:C}),[c,h,g,C]),Ue=(0,v.useMemo)(()=>(0,d.formatHeadline)({headline:f,show:y.show,numberFormat:h,parsingLocale:g,formattingLocale:C,t:a}),[f,y.show,h,g,C,a]),fi=he(),le=B(),Tr=I(J0,le),Br=I(d.resolvePanelBorderStyle,le),Or=I(Ar,le),Lr=I(Z0,le),vi=I(_0,le),pi=I($0,le),mi=I(ev,le),{fontFamily:Nt,textScale:xi,strokeWidth:Dt,fill:yi}=Tr,Fr=(0,v.useMemo)(()=>so(j,{},Nt),[j,Nt]),ze=(0,v.useMemo)(()=>({width:Math.max(0,e-2*Dt),height:Math.max(0,t-2*Dt)}),[e,t,Dt]),Nr=(0,v.useMemo)(()=>Sa(x.brandMark.enabled,ze,x.brandMark.variant),[x.brandMark.enabled,x.brandMark.variant,ze]),bi=x.brandMark.placement==="footer"?Nr:"hidden",Ai=x.brandMark.placement==="header"?Nr:"hidden",ke=(0,v.useMemo)(()=>Ue?{formatted:Ue,size:y.size,position:y.position,innerRadius:m.type==="polar"?m.innerRadius:0}:void 0,[Ue,y.size,y.position,m]),ot=pu({textMeasurer:fi,metrics:Fr,overrides:Wl()}),Dr=(0,v.useMemo)(()=>(0,d.computePanelBorderSizes)(Br),[Br]),Ye=mu({measurer:ot,axes:l,numberFormat:h,parsingLocale:g,formattedLegends:Mr,containerSize:ze,externalMeasurements:E,headline:ke,formattingLocale:C,annotations:p,layers:u,coordSystem:m,overflowStrategy:S,panelBorder:Dr,padding:I(d.resolveGraphPadding,le),margins:I(d.resolveChromeMargins,le)}),at=(0,v.useMemo)(()=>!Ye||!ke||!ot?null:(0,d.resolveHeadlinePlacement)({headline:ke,layout:Ye.layout,containerSize:ze,measurer:ot,itemGap:Or.gap}),[Ye,ke,ot,ze,Or.gap]);if(!Ye)return null;const{layout:X,formattedAxes:Hr,plotBottomY:Si}=Ye,Pi=X.footer.height>0;return(0,i.jsx)(Na.Provider,{value:s,children:(0,i.jsx)(Jo,{colorScheme:j,textScale:xi,graphBackground:(0,d.toPaintColor)(yi),graphFontFamily:Nt,headingFontFamily:Lr.fontFamily,children:(0,i.jsx)(bl,{metrics:Fr,children:(0,i.jsx)(bu,{children:(0,i.jsx)(Ku,{panelRect:X.panel,children:(0,i.jsx)(K0,{graphChrome:Tr,isEditable:O,mode:s,contentRef:O?K:void 0,style:{width:"100%",height:"100%"},children:(0,i.jsxs)(Hd,{intro:A,panelRect:X.panel,children:[(0,i.jsx)(H,{ref:w,headerRect:X.header,mode:s,title:x.title,isTitleVisible:x.isTitleVisible,subtitle:x.subtitle,isSubtitleVisible:x.isSubtitleVisible,headingStyle:Lr,subtitleStyle:vi,brandMark:Ai}),(0,i.jsx)(L0,{formattedAxes:Hr,plotRect:X.plot,panelBorder:Dr,panelFrameRect:X.panelFrame,panelRect:X.panel,axisRects:X.axes,axisLabelRects:X.axisLabels,shouldAnimateTransitions:P,formattingLocale:C??g,plotBottomY:Si,isFooterChromeReserved:Pi,isEditable:O,showAnnotations:T.annotations}),(0,i.jsx)(ve,{ref:k,footerRect:X.footer,mode:s,caption:x.caption,isCaptionVisible:x.isCaptionVisible,source:x.source,isSourceVisible:x.isSourceVisible,captionStyle:pi,sourceStyle:mi,brandMark:bi}),(0,i.jsx)(ui,{formattedLegends:Mr,rects:X.legends}),Ue&&at&&(0,i.jsx)(hi,{headline:Ue,rect:at.rect,resolvedSize:at.resolvedSize,visibleItemCount:at.visibleItemCount,isInDonutHole:ke!==void 0&&(0,d.paintsInDonutHole)(ke)}),O&&V!==null&&(0,i.jsx)(gi,{frameElement:V,panelRect:X.panel,formattedAxes:Hr,shouldAnimateTransitions:P}),n&&T.tooltips&&(0,i.jsx)(Qd,{})]})})})})})})})},J0=e=>e.graph().resolve(),Z0=e=>e.heading.h1().resolve(),_0=e=>e.heading.h2().resolve(),$0=e=>e.caption().resolve(),ev=e=>({label:e.source().resolve(),link:e.source.link().resolve()}),tv=e=>{const t=(0,v.useContext)(tr),r=yt();return(0,v.useMemo)(()=>e||(t?{commands:t.commands,undo:t.history.undo,redo:t.history.redo,subscribe:t.store.subscribe,getScene:()=>t.store.getState().scene,getSelection:()=>t.selectionStore.getState().selection,setSelection:n=>t.selectionStore.getState().setSelection(n),subscribeSelection:t.selectionStore.subscribe,canPlaceDataLabels:r.hasCapability,canFormatDataLabelsAsPercentages:r.hasPercentageFormat}:null),[e,t,r])},rv=e=>(0,v.useSyncExternalStore)(e.subscribe,e.getScene,e.getScene),nv=()=>{const{commands:e}=G();return e},ov=e=>{if(e.altKey||!e.metaKey&&!e.ctrlKey)return null;const t=e.key.toLowerCase();return t==="z"?e.shiftKey?"redo":"undo":t==="y"&&e.ctrlKey&&!e.shiftKey?"redo":null};Object.defineProperty(exports,"ArrowAnnotation",{enumerable:!0,get:function(){return _a}});Object.defineProperty(exports,"ArrowIcon",{enumerable:!0,get:function(){return Ea}});Object.defineProperty(exports,"BUILT_IN_GEOM_RENDERERS",{enumerable:!0,get:function(){return Bo}});Object.defineProperty(exports,"BrandMark",{enumerable:!0,get:function(){return wr}});Object.defineProperty(exports,"CANVAS_COLOR_KEYS",{enumerable:!0,get:function(){return el}});Object.defineProperty(exports,"CanvasTextMeasurer",{enumerable:!0,get:function(){return uo}});Object.defineProperty(exports,"DEFAULT_FONT_FAMILY",{enumerable:!0,get:function(){return tt}});Object.defineProperty(exports,"DEFAULT_SPRING_TRANSITION",{enumerable:!0,get:function(){return ee}});Object.defineProperty(exports,"DataLabelPlacementResolverProvider",{enumerable:!0,get:function(){return Li}});Object.defineProperty(exports,"DefaultFooter",{enumerable:!0,get:function(){return wa}});Object.defineProperty(exports,"DefaultGrid",{enumerable:!0,get:function(){return si}});Object.defineProperty(exports,"DefaultHeader",{enumerable:!0,get:function(){return ja}});Object.defineProperty(exports,"DefaultSwatch",{enumerable:!0,get:function(){return xo}});Object.defineProperty(exports,"DefaultTooltip",{enumerable:!0,get:function(){return aa}});Object.defineProperty(exports,"EDIT_TARGET_AXIS_ATTRIBUTE",{enumerable:!0,get:function(){return Ze}});Object.defineProperty(exports,"EDIT_TARGET_KIND_ATTRIBUTE",{enumerable:!0,get:function(){return ye}});Object.defineProperty(exports,"EditorProvider",{enumerable:!0,get:function(){return zu}});Object.defineProperty(exports,"GRAPH_MODES",{enumerable:!0,get:function(){return ae}});Object.defineProperty(exports,"GeomRendererResolverProvider",{enumerable:!0,get:function(){return kl}});Object.defineProperty(exports,"GraphContext",{enumerable:!0,get:function(){return tr}});Object.defineProperty(exports,"GraphRenderer",{enumerable:!0,get:function(){return Q0}});Object.defineProperty(exports,"GraphRendererBody",{enumerable:!0,get:function(){return di}});Object.defineProperty(exports,"HoverProvider",{enumerable:!0,get:function(){return Do}});Object.defineProperty(exports,"Icon",{enumerable:!0,get:function(){return kr}});Object.defineProperty(exports,"ImageAnnotation",{enumerable:!0,get:function(){return ei}});Object.defineProperty(exports,"InlineEditorsProvider",{enumerable:!0,get:function(){return dh}});Object.defineProperty(exports,"IntlProvider",{enumerable:!0,get:function(){return Ko}});Object.defineProperty(exports,"IntroFade",{enumerable:!0,get:function(){return So}});Object.defineProperty(exports,"IntroWipeClip",{enumerable:!0,get:function(){return ar}});Object.defineProperty(exports,"LEGEND_OVERFLOW_CONTROL_SELECTOR",{enumerable:!0,get:function(){return Wh}});Object.defineProperty(exports,"MODE_SURFACES",{enumerable:!0,get:function(){return ge}});Object.defineProperty(exports,"MinusIcon",{enumerable:!0,get:function(){return Ra}});Object.defineProperty(exports,"OverlayPortal",{enumerable:!0,get:function(){return Go}});Object.defineProperty(exports,"PortalThemeProvider",{enumerable:!0,get:function(){return Zo}});Object.defineProperty(exports,"RICH_TEXT_FONT_FAMILIES",{enumerable:!0,get:function(){return _o}});Object.defineProperty(exports,"SIDE_KEYS",{enumerable:!0,get:function(){return Fo}});Object.defineProperty(exports,"STICKER_ASSETS",{enumerable:!0,get:function(){return oi}});Object.defineProperty(exports,"ShapeAnnotation",{enumerable:!0,get:function(){return ti}});Object.defineProperty(exports,"TextAnnotation",{enumerable:!0,get:function(){return pf}});Object.defineProperty(exports,"TextMeasurerProvider",{enumerable:!0,get:function(){return fo}});Object.defineProperty(exports,"ThemeProvider",{enumerable:!0,get:function(){return Jo}});Object.defineProperty(exports,"Z_INDEX",{enumerable:!0,get:function(){return Ce}});Object.defineProperty(exports,"__toESM",{enumerable:!0,get:function(){return In}});Object.defineProperty(exports,"areRectsEqual",{enumerable:!0,get:function(){return gt}});Object.defineProperty(exports,"assignTextStyleVars",{enumerable:!0,get:function(){return rc}});Object.defineProperty(exports,"buildCirclesPath",{enumerable:!0,get:function(){return qi}});Object.defineProperty(exports,"buildDotsEditOutlineShapes",{enumerable:!0,get:function(){return Nn}});Object.defineProperty(exports,"buildRoundedRectPath",{enumerable:!0,get:function(){return de}});Object.defineProperty(exports,"canMoveAnnotationOnCanvas",{enumerable:!0,get:function(){return Ja}});Object.defineProperty(exports,"createGeomRendererResolver",{enumerable:!0,get:function(){return Lo}});Object.defineProperty(exports,"createTargetBoundaryStore",{enumerable:!0,get:function(){return Hc}});Object.defineProperty(exports,"darkTheme",{enumerable:!0,get:function(){return Qo}});Object.defineProperty(exports,"defineGeomRenderer",{enumerable:!0,get:function(){return Dc}});Object.defineProperty(exports,"dictionaries",{enumerable:!0,get:function(){return Ct}});Object.defineProperty(exports,"editor",{enumerable:!0,get:function(){return ff}});Object.defineProperty(exports,"findPressedObservation",{enumerable:!0,get:function(){return Nu}});Object.defineProperty(exports,"growRect",{enumerable:!0,get:function(){return Kt}});Object.defineProperty(exports,"isHex",{enumerable:!0,get:function(){return al}});Object.defineProperty(exports,"isOverlayHosted",{enumerable:!0,get:function(){return Oo}});Object.defineProperty(exports,"isValidCssColor",{enumerable:!0,get:function(){return il}});Object.defineProperty(exports,"lightTheme",{enumerable:!0,get:function(){return xr}});Object.defineProperty(exports,"lightenCss",{enumerable:!0,get:function(){return ol}});Object.defineProperty(exports,"logDiagnostics",{enumerable:!0,get:function(){return Tn}});Object.defineProperty(exports,"measureArrowEnds",{enumerable:!0,get:function(){return Ka}});Object.defineProperty(exports,"measureShapeRegion",{enumerable:!0,get:function(){return Ya}});Object.defineProperty(exports,"measureTextAnnotationBox",{enumerable:!0,get:function(){return Xa}});Object.defineProperty(exports,"previewResizedText",{enumerable:!0,get:function(){return ni}});Object.defineProperty(exports,"projectPointCartesian",{enumerable:!0,get:function(){return pe}});Object.defineProperty(exports,"readAnnotationUnderPointer",{enumerable:!0,get:function(){return Sr}});Object.defineProperty(exports,"readCrosshairLine",{enumerable:!0,get:function(){return za}});Object.defineProperty(exports,"readDraggedArrowEndpointFor",{enumerable:!0,get:function(){return Eu}});Object.defineProperty(exports,"readDraggedDifferenceArrowEndpointFor",{enumerable:!0,get:function(){return Cu}});Object.defineProperty(exports,"readGridLineStyle",{enumerable:!0,get:function(){return _e}});Object.defineProperty(exports,"readLegendItemAddress",{enumerable:!0,get:function(){return Ba}});Object.defineProperty(exports,"readMovedAnnotationFor",{enumerable:!0,get:function(){return ju}});Object.defineProperty(exports,"readPressedObservation",{enumerable:!0,get:function(){return Fu}});Object.defineProperty(exports,"readResizedShapeFor",{enumerable:!0,get:function(){return Mu}});Object.defineProperty(exports,"readResizedTextFor",{enumerable:!0,get:function(){return Bu}});Object.defineProperty(exports,"readRichTextFontId",{enumerable:!0,get:function(){return $o}});Object.defineProperty(exports,"readStampedEditTargetInStack",{enumerable:!0,get:function(){return zh}});Object.defineProperty(exports,"readStanding",{enumerable:!0,get:function(){return Me}});Object.defineProperty(exports,"resolveAnnotationChromeGeometry",{enumerable:!0,get:function(){return Vg}});Object.defineProperty(exports,"resolveBrandMarkVisual",{enumerable:!0,get:function(){return Sa}});Object.defineProperty(exports,"resolveEditTargetAtPoint",{enumerable:!0,get:function(){return Hu}});Object.defineProperty(exports,"resolveHistoryStep",{enumerable:!0,get:function(){return ov}});Object.defineProperty(exports,"resolvePortalContainer",{enumerable:!0,get:function(){return fr}});Object.defineProperty(exports,"resolveRichTextFontFamily",{enumerable:!0,get:function(){return Jt}});Object.defineProperty(exports,"scalePointToPanel",{enumerable:!0,get:function(){return Je}});Object.defineProperty(exports,"stampAxisEditTarget",{enumerable:!0,get:function(){return Ot}});Object.defineProperty(exports,"stampGridEditTarget",{enumerable:!0,get:function(){return Er}});Object.defineProperty(exports,"stampLegendEditTarget",{enumerable:!0,get:function(){return Lt}});Object.defineProperty(exports,"toBorderRadiusCss",{enumerable:!0,get:function(){return Ge}});Object.defineProperty(exports,"toHtmlTextCss",{enumerable:!0,get:function(){return D}});Object.defineProperty(exports,"useDataLabelPlacementResolver",{enumerable:!0,get:function(){return yt}});Object.defineProperty(exports,"useDebouncedCallback",{enumerable:!0,get:function(){return Wo}});Object.defineProperty(exports,"useDifferenceArrowGeometries",{enumerable:!0,get:function(){return Aa}});Object.defineProperty(exports,"useEditorState",{enumerable:!0,get:function(){return ue}});Object.defineProperty(exports,"useEditorStore",{enumerable:!0,get:function(){return Yu}});Object.defineProperty(exports,"useElementScreenRect",{enumerable:!0,get:function(){return Uo}});Object.defineProperty(exports,"useGeomHitTest",{enumerable:!0,get:function(){return Ho}});Object.defineProperty(exports,"useGeomHover",{enumerable:!0,get:function(){return zo}});Object.defineProperty(exports,"useGeomReaderTree",{enumerable:!0,get:function(){return Pe}});Object.defineProperty(exports,"useGeomRendererResolver",{enumerable:!0,get:function(){return se}});Object.defineProperty(exports,"useGeomStyleReader",{enumerable:!0,get:function(){return F}});Object.defineProperty(exports,"useGraphCommands",{enumerable:!0,get:function(){return nv}});Object.defineProperty(exports,"useGraphContext",{enumerable:!0,get:function(){return G}});Object.defineProperty(exports,"useGraphHandle",{enumerable:!0,get:function(){return tv}});Object.defineProperty(exports,"useGraphLocale",{enumerable:!0,get:function(){return ha}});Object.defineProperty(exports,"useGraphMode",{enumerable:!0,get:function(){return We}});Object.defineProperty(exports,"useGraphSelection",{enumerable:!0,get:function(){return $a}});Object.defineProperty(exports,"useGuidesTakePress",{enumerable:!0,get:function(){return fe}});Object.defineProperty(exports,"useHandleScene",{enumerable:!0,get:function(){return rv}});Object.defineProperty(exports,"useHoverContext",{enumerable:!0,get:function(){return xe}});Object.defineProperty(exports,"useHoverState",{enumerable:!0,get:function(){return Ie}});Object.defineProperty(exports,"useI18n",{enumerable:!0,get:function(){return pr}});Object.defineProperty(exports,"useIsIntroWaitingForView",{enumerable:!0,get:function(){return je}});Object.defineProperty(exports,"useLatestRef",{enumerable:!0,get:function(){return ft}});Object.defineProperty(exports,"useMeasuredBoxRef",{enumerable:!0,get:function(){return ma}});Object.defineProperty(exports,"useMeasuredBoxes",{enumerable:!0,get:function(){return pa}});Object.defineProperty(exports,"usePaintDefs",{enumerable:!0,get:function(){return Y}});Object.defineProperty(exports,"useResolvedAnnotations",{enumerable:!0,get:function(){return Ve}});Object.defineProperty(exports,"useResolvedStyle",{enumerable:!0,get:function(){return I}});Object.defineProperty(exports,"useSceneSelector",{enumerable:!0,get:function(){return M}});Object.defineProperty(exports,"useStyleReaderTree",{enumerable:!0,get:function(){return B}});Object.defineProperty(exports,"useStyleResolver",{enumerable:!0,get:function(){return rr}});Object.defineProperty(exports,"useSvgPathMorph",{enumerable:!0,get:function(){return dt}});Object.defineProperty(exports,"useTextMeasurer",{enumerable:!0,get:function(){return he}});Object.defineProperty(exports,"useThemeContext",{enumerable:!0,get:function(){return Mt}});Object.defineProperty(exports,"vars",{enumerable:!0,get:function(){return b}});
|