{"version":3,"file":"ScaleEndLabels.DZAcy7gC.mjs","names":["_Fragment","_Fragment","__esmMin","init_jsx_runtime","c","p","ControlType","addPropertyControls","init_framer_DcGZRLrs","init_controls","MONO","libraryControls","init_score","init_tokens","useClaims","init_type","TK","init_claims","bellPoint","z","v","w","base","amp","bellPath","n","j","byIndex","bellBox","h","pad","line","init_bellGeometry","MedianMark","median","l","variant","x","top","labelY","color","init_MedianMark","ScaleEndLabels","width","init_ScaleEndLabels"],"sources":["https:/framerusercontent.com/modules/L9chcJS3km9FfsrPvUVL/teyDDnFAWT5Z5kLwuBww/bellGeometry.js","https:/framerusercontent.com/modules/2MTfcisXxfU9dsHEbKZ9/vy4yaqfSDekBFklUwZZ8/MedianMark.js","https:/framerusercontent.com/modules/ZfmJmxMDDuW8yWnisrQk/RYkD7OH6Ib45060czrou/ScaleEndLabels.js"],"sourcesContent":["import{SCORE_MEAN,SCORE_SD}from\"https://framerusercontent.com/modules/432Y04q6cyEs05fR5tUG/nkpXnnYarRVYGSUn5wnM/score.js\";// The bell of the companies we measure, on the 400–900 scale (the product's mean and SD). `bellPoint`: where a score\n// sits, x across `w` (400 at 0, 900 at w) and y up from the baseline by the curve's height there (`amp` at the mean).\nexport function bellPoint(v,w,base,amp){const z=(v-SCORE_MEAN)/SCORE_SD;return{x:(v-400)/500*w,y:base-Math.exp(-(z*z)/2)*amp};}// The curve as an SVG path through `n + 1` evenly spaced scores, to one decimal place. `byIndex` places each point\n// by its sample number (j / n of the width) rather than by its score, as some charts draw it.\nexport function bellPath(w,base,amp,n=60,byIndex=false){const pts=Array.from({length:n+1},(_,j)=>{const p=bellPoint(400+j/n*500,w,base,amp);return byIndex?{x:j/n*w,y:p.y}:p;});return\"M\"+pts.map(p=>`${p.x.toFixed(1)},${p.y.toFixed(1)}`).join(\" L\");}// The bell in a w×h box with its baseline `pad` above the bottom and its peak at h - pad * 3.4 above the baseline: the\n// line, the same line closed down to the baseline (for a fill), the baseline, and where a score sits on the curve.\nexport function bellBox(w,h,pad){const base=h-pad;const amp=h-pad*3.4;const line=bellPath(w,base,amp,60,true);const fill=`${line} L${w},${base} L0,${base} Z`;const at=v=>bellPoint(v,w,base,amp);return{line,fill,base,at};}\nexport const __FramerMetadata__ = {\"exports\":{\"bellBox\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"bellPoint\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"bellPath\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{TK}from\"https://framerusercontent.com/modules/XYv1NfgVaYsANsDhO2yE/WMQkHzvF6OJdd6xtzyXY/tokens.js\";import{MONO}from\"https://framerusercontent.com/modules/kiPsqGNhgPpVPmkw1qzv/Xzh9kLxSi9YW63zi2w4M/type.js\";import{SCORE_MEAN}from\"https://framerusercontent.com/modules/432Y04q6cyEs05fR5tUG/nkpXnnYarRVYGSUn5wnM/score.js\";import{libraryControls}from\"https://framerusercontent.com/modules/EU2jFfE6TAu3e3BOpKgE/Z2idxPgVcsAvUKEJw8op/controls.js\";import{useClaims}from\"https://framerusercontent.com/modules/AXzBREEtQw648wSCcEZ5/L8Kl9V4FSixWUY4kD6VS/claims.js\";export function MedianMark({x,base,labelY,variant=\"tick\",top=40,fontSize=10.5,stroke=TK.g300,color=TK.g400,letterSpacing=\".12em\"}){const{median}=useClaims();if(!median)return null;return /*#__PURE__*/_jsxs(_Fragment,{children:[variant===\"dashed\"?/*#__PURE__*/_jsx(\"line\",{x1:x,x2:x,y1:top,y2:base,stroke:stroke,strokeDasharray:\"3 4\"}):/*#__PURE__*/_jsx(\"line\",{x1:x,x2:x,y1:base,y2:base+5,stroke:stroke}),/*#__PURE__*/_jsxs(\"text\",{x:x,y:labelY,textAnchor:\"middle\",fill:color,style:{fontFamily:MONO,fontSize,letterSpacing},children:[\"MEDIAN \",SCORE_MEAN]})]});}addPropertyControls(MedianMark,libraryControls({variant:{type:ControlType.Enum,title:\"Variant\",options:[\"tick\",\"dashed\"],defaultValue:\"tick\"},fontSize:{type:ControlType.Number,title:\"Label size\",defaultValue:10.5}}));\nexport const __FramerMetadata__ = {\"exports\":{\"MedianMark\":{\"type\":\"reactComponent\",\"name\":\"MedianMark\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"MedianMarkProps\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{TK}from\"https://framerusercontent.com/modules/XYv1NfgVaYsANsDhO2yE/WMQkHzvF6OJdd6xtzyXY/tokens.js\";import{MONO}from\"https://framerusercontent.com/modules/kiPsqGNhgPpVPmkw1qzv/Xzh9kLxSi9YW63zi2w4M/type.js\";import{libraryControls}from\"https://framerusercontent.com/modules/EU2jFfE6TAu3e3BOpKgE/Z2idxPgVcsAvUKEJw8op/controls.js\";// The scale's two ends, 400 and 900, under a chart (inside its SVG): one at the left edge, one at the right.\nexport function ScaleEndLabels({width,y,fontSize=11,color=TK.g400}){return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"text\",{x:0,y:y,fill:color,style:{fontFamily:MONO,fontSize},children:\"400\"}),/*#__PURE__*/_jsx(\"text\",{x:width,y:y,textAnchor:\"end\",fill:color,style:{fontFamily:MONO,fontSize},children:\"900\"})]});}addPropertyControls(ScaleEndLabels,libraryControls({fontSize:{type:ControlType.Number,title:\"Size\",defaultValue:11},color:{type:ControlType.Color,title:\"Colour\",defaultValue:TK.g400}}));\nexport const __FramerMetadata__ = {\"exports\":{\"ScaleEndLabels\":{\"type\":\"reactComponent\",\"name\":\"ScaleEndLabels\",\"slots\":[],\"annotations\":{\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