1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="1b92fe7a-0a98-49ac-bad2-ed60a87e6f02",e._sentryDebugIdIdentifier="sentry-dbid-1b92fe7a-0a98-49ac-bad2-ed60a87e6f02")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4946],{7239:(e,t,a)=>{a.d(t,{q:()=>I,t:()=>S});var s=a(3729);let r=s.Ikc({start:s.aig().describe("The bin's left edge."),end:s.aig().describe("The bin's right edge."),count:s.aig().describe("How many observations fall in this bin (0 or more).")}).strict(),i=s.gMt("form",[s.Ikc({form:s.euz("bins"),bins:s.YOg(r).describe("The bins in ascending order, each one touching the next (a bin's `end` is the next bin's `start`).")}).strict().describe("Bins with counts â use when the question gives a frequency table, or asks for a distribution of a particular SHAPE with no data behind it."),s.Ikc({form:s.euz("values"),values:s.YOg(s.aig()).describe("Every observation the question lists, verbatim and in any order. Do NOT count them into bins yourself."),binWidth:s.aig().nullable().describe("The bin width the question asks for, or null to have a sensible one chosen.")}).strict().describe("The raw observations â use whenever the question LISTS the data. The binning is done for you.")]),n=s.Ikc({type:s.euz("histogram"),data:i.describe("The data, given whichever way the question gives it."),cumulative:s.zMY().describe("Also draw the cumulative-frequency curve (the ogive) rising across the bins to the total. True when the question asks for a cumulative or 'less-than' distribution, or for the histogram AND its running total together; false for a plain histogram.")}).strict().describe("A histogram of numeric data â the shape of one quantitative variable, optionally with its cumulative-frequency curve."),o=s.Ikc({label:s.YjP().describe('This group\'s name, drawn beside its box. Use "" for a single unnamed boxplot.'),min:s.aig().describe("The smallest non-outlier value â the left whisker's end."),q1:s.aig().describe("The first quartile â the box's left edge."),median:s.aig().describe("The median â the line inside the box."),q3:s.aig().describe("The third quartile â the box's right edge."),max:s.aig().describe("The largest non-outlier value â the right whisker's end."),outliers:s.YOg(s.aig()).describe("Values drawn as separate points beyond the whiskers. Empty if there are none.")}).strict(),c=s.Ikc({type:s.euz("boxplot"),groups:s.YOg(o).describe("One box per group, drawn stacked to compare distributions. Usually one.")}).strict().describe("A box plot from five-number summaries â centre, spread, skew, and outliers."),l=s.Ikc({x:s.aig(),y:s.aig(),size:s.aig().nullable().describe("A THIRD quantity this point carries (a population, a budget, a sample count), drawn as the bubble's AREA â this is what makes the figure a bubble chart. null on EVERY point for an ordinary scatter.")}
1).strict(),h=s.gMt("mode",[s.Ikc({mode:s.euz("none")}).strict().describe("No line."),s.Ikc({mode:s.euz("given"),slope:s.aig(),intercept:s.aig()}).strict().describe("Draw exactly this line â use when the question STATES the equation (e.g. Å· = 25.1 + 0.667x)."),s.Ikc({mode:s.euz("leastSquares")}).strict().describe("Fit the least-squares line to the points and draw it â use when the question asks for a line of best fit without giving one. Do NOT work out the slope yourself.")]),d=s.Ikc({type:s.euz("scatter"),points:s.YOg(l).describe("The observed (x, y) pairs."),fit:h.describe("The regression line, drawn solid and labelled with its own equation."),zeroLine:s.zMY().describe("Draw a dashed horizontal line at y = 0. True for a RESIDUAL plot (where it is the no-error reference), false otherwise."),sizeLabel:s.YjP().describe('The name of the quantity the bubble AREAS show, e.g. "Population" â it titles the size legend. Use "" when the points have no size.')}).strict().describe("A scatterplot of paired data, optionally with a regression line â association, form, and residuals. Give the points a `size` to make it a bubble chart."),u=s.Ikc({type:s.euz("dotplot"),values:s.YOg(s.aig()).describe("One value per observation, repeats included â the renderer stacks equal values into a column.")}).strict().describe("A dotplot â one dot per observation, good for small data sets and clusters."),g=s.Ikc({label:s.YjP().describe("The category's name."),value:s.aig().describe("Its height.")}).strict(),p=s.Ikc({type:s.euz("bar"),categories:s.YOg(g).describe("One bar per category, drawn in the order given.")}).strict().describe("A bar chart of values across named categories."),m=s.Ikc({label:s.YjP().describe("The slice's name, shown in the legend and on the slice."),value:s.aig().describe("The slice's amount â a count or a percentage. The renderer sizes each slice by its share of the total, so these need not sum to 100.")}).strict(),b=s.Ikc({type:s.euz("pie"),slices:s.YOg(m).describe("One slice per category, drawn clockwise in the order given."),donut:s.zMY().describe("Draw as a donut (a ring with a hollow centre) instead of a full pie. Usually false.")}).strict().describe("A pie or donut chart â parts of a whole across a few named categories."),f=s.Ikc({name:s.YjP().describe('This series\' name, shown in the legend (e.g. "2023", "Male").'),values:s.YOg(s.aig()).describe("One value per category, in the SAME ORDER as `categories` and exactly as many numbers as there are categories.")}).strict(),y=s.Ikc({type:s.euz("groupedBar"),categories:s.YOg(s.YjP()).describe("The category names along the x-axis, in order â the groups being compared (e.g. years, regions)."),series:s.YOg(f).describe("The data series â one colour each, compared across every category. Give two or more; for a single series use the `bar` chart instead."),mode:s.k5n(["grouped","stacked","normalized"]).describe('How the series share each category: "grouped" draws them side by side; "stacked" stacks them into one bar; "normalized" stacks them scaled to 100% to compare proportions.')}).strict().describe("A bar chart comparing TWO OR MORE data series across the same named categories â grouped side by side, stacked, or normalized to 100%."),w=s.gMt("dist",[s.Ikc({dist:s.euz("normal"),mean:s.aig().describe("μ â the centre."),sd:s.aig().describe("Ï â the standard deviation. Must be > 0."),label:s.YjP().describe('Legend text, e.g. "Normal". Use "" for no legend.')}
1).strict(),s.Ikc({dist:s.euz("t"),df:s.aig().describe("Degrees of freedom. Must be > 0."),label:s.YjP().describe('Legend text, e.g. "t, df = 3".')}).strict(),s.Ikc({dist:s.euz("chiSquare"),df:s.aig().describe("Degrees of freedom. Must be > 0."),label:s.YjP().describe('Legend text, e.g. "df = 4".')}).strict()]),v=s.Ikc({from:s.aig().nullable().describe("The region's left edge; null means the left tail (ââ)."),to:s.aig().nullable().describe("The region's right edge; null means the right tail (+â)."),label:s.YjP().describe('Text drawn on the region, e.g. "68%" or "α/2". Use "" for none.')}).strict(),k=s.Ikc({at:s.aig().describe("The x-value to mark."),label:s.YjP().describe('The tick label, e.g. "1.96" or "Ï\xb2 = 9.49". Use "" for none.')}).strict(),T=s.Ikc({type:s.euz("density"),curves:s.YOg(w).describe("The distribution curves to draw, usually one. Give two to compare (e.g. t against the standard normal)."),shade:s.YOg(v).describe("Regions shaded under the FIRST curve â a probability, a confidence interval, a rejection region. Empty for a bare curve."),markers:s.YOg(k).describe("Dashed vertical lines at critical values, drawn from the axis up to the curve. Empty for none.")}).strict().describe("A probability density curve (normal, t, or chi-square) with optional shaded regions and critical-value markers."),x=s.gMt("type",[n,c,d,u,p,T,b,y]);var A=a(62197),Y=a(9421),E=a(59310);let O=s.Ikc({min:s.aig().describe("The axis's smallest value."),max:s.aig().describe("The axis's largest value.")}).strict(),I=s.Ikc({domain:s.euz("chart"),title:A.A,xLabel:s.YjP().describe('The horizontal axis label, including units, e.g. "Wait Time (minutes)". Use "" for none.'),yLabel:s.YjP().describe('The vertical axis label, e.g. "Frequency". Use "" for none â box plots, dotplots and density curves n
1ormally have no y label.'),chart:x.describe("The figure itself â pick the kind that fits."),xRange:O.nullable().describe("The horizontal axis's range, or null to have one chosen to fit the data. Set it only when the question names a range for the value axis. Ignored by pie, bar and grouped-bar charts (their x-axis is categorical)."),yRange:O.nullable().describe("The vertical axis's range, or null to have one chosen to fit the data. Set it when the question names one (e.g. a residual plot asked to span â6 to 6). Ignored by pie charts and normalized (share-of-total) stacks.")}).strict().describe("A statistical chart of DATA: the summary statistics the question gives, plus axis labels. No pixels, no coordinates, no formulas â the renderer draws it."),P=(e,t,a)=>{let s=new Set,r=new Set;for(let t of e)s.has(t)&&r.add(t),s.add(t);return[...r].map(e=>"Duplicate ".concat(a,' "').concat(e,'": each ').concat(t," needs its own name, or they are drawn on top of each other."))},q={histogram:e=>{let t=[];if("values"===e.data.form)return 0===e.data.values.length&&t.push("Histogram is empty: give at least one observation."),null!==e.data.binWidth&&e.data.binWidth<=0&&t.push("binWidth (".concat(e.data.binWidth,") must be positive, or null.")),t;let a=e.data.bins;return 0===a.length&&t.push("Histogram is empty: give at least one bin."),a.forEach((e,s)=>{e.start>=e.end&&t.push("bins[".concat(s,"]: start (").concat(e.start,") must be less than end (").concat(e.end,").")),e.count<0&&t.push("bins[".concat(s,"]: count (").concat(e.count,") cannot be negative."));let r=a[s+1];r&&e.end>r.start&&t.push("bins[".concat(s,"] ends at ").concat(e.end," but bins[").concat(s+1,"] starts at ").concat(r.start," â bins must be in ascending order and must not overlap."))}),t},boxplot:e=>{let t=[];return 0===e.groups.length&&t.push("Box plot is empty: give at least one group."),e.groups.length>1&&t.push(...P(e.groups.map(e=>e.label),"group","group label")),e.groups.forEach((e,a)=>{let s=((e,t)=>{for(let a=0;a<t.length-1;a++){let[s,r]=t[a],[i,n]=t[a+1];if(r>n)return"".concat(e,": ").concat(s," (").concat(r,") is greater than ").concat(i," (").concat(n,") â a five-number summary must satisfy min ⤠q1 ⤠median ⤠q3 ⤠max.")}return null})("groups[".concat(a,"]").concat(e.label?' ("'.concat(e.label,'")'):""),[["min",e.min],["q1",e.q1],["median",e.median],["q3",e.q3],["max",e.max]]);s&&t.push(s)}),t},scatter:e=>{if(0===e.points.length)return["Scatterplot is empty: give at least one point."];let t=[],a=e.points.filter(e=>null!==e.size);return a.length>0&&a.length<e.points.length&&t.push("".concat(a.length," of ").concat(e.points.length," points have a size: give every point one to draw a bubble chart, or none at all â a mixed set draws some bubbles and some plain dots.")),e.points.forEach((e,a)=>{null!==e.size&&e.size<=0&&t.push("points[".concat(a,"]: size (").concat(e.size,") must be positive â it is drawn as the bubble's area."))}),""!==e.sizeLabel&&0===a.length&&t.push('sizeLabel ("'.concat(e.sizeLabel,'") names a quantity no point has a size for: give each point a size, or use "".')),t},dotplot:e=>0===e.values.length?["Dotplot is empty: give at least one value."]:[],bar:e=>0===e.categories.length?["Bar chart is empty: give at least one category."]:P(e.categories.map(e=>e.label),"bar","category label"),pie:e=>{let t=[];return 0===e.slices.length&&t.push("Pie chart is empty: give at least one slice."),t.push(...P(e.slices.map(e=>e.label),"slice","slice label")),e.slices.forEach((e,a)=>{e.value<0&&t.push("slices[".concat(a,'] ("').concat(e.label,'"): value (').concat(e.value,") cannot be negative â a pie shows parts of a whole."))}),e.slices.length>0&&e.slices.every(e=>0===e.value)&&t.push("Pie chart has no area: at least one slice must be positive."),t},groupedBar:e=>{let t=[];return 0===e.categories.length&&t.push("Grouped bar chart is empty: give at least one category."),0===e.series.length&&t.push("Grouped bar chart has no series: give at least one."),t.push(...P(e.categories,"category","category")),t.push(...P(e.series.map(e=>
1e.name),"series","series name")),e.series.forEach((a,s)=>{a.values.length!==e.categories.length&&t.push("series[".concat(s,'] ("').concat(a.name,'") has ').concat(a.values.length," values but there are ").concat(e.categories.length," categories â give exactly one value per category, in order."))}),t},density:e=>{let t=[];return 0===e.curves.length&&t.push("Density plot is empty: give at least one curve."),e.curves.forEach((e,a)=>{"normal"===e.dist&&e.sd<=0&&t.push("curves[".concat(a,"]: a normal distribution needs sd > 0 (got ").concat(e.sd,").")),"normal"!==e.dist&&e.df<=0&&t.push("curves[".concat(a,"]: a ").concat(e.dist," distribution needs df > 0 (got ").concat(e.df,")."))}),e.shade.forEach((e,a)=>{null!==e.from&&null!==e.to&&e.from>=e.to&&t.push("shade[".concat(a,"]: from (").concat(e.from,") must be less than to (").concat(e.to,")."))}),t}},j=(e,t)=>e&&e.min>=e.max?["".concat(t,": min (").concat(e.min,") must be less than max (").concat(e.max,").")]:[],S=e=>{let t=[];return(0,E.W)(e,"",t),t.push(...(0,Y.J)(q,e.chart)),t.push(...j(e.xRange,"xRange"),...j(e.yRange,"yRange")),t}},9421:(e,t,a)=>{a.d(t,{J:()=>r});let s=function(e,t,a){for(var s=arguments.length,r=Array(s>3?s-3:0),i=3;i<s;i++)r[i-3]=arguments[i];return e[a[t]](a,...r)},r=(e,t)=>s(e,"type",t)},11209:(e,t,a)=>{a.d(t,{tq:()=>R,u7:()=>C});var s=a(3729),r=a(59310);let i=(e,t)=>{var a,s;return{schema:e,declares:t.declares,refs:null!=(a=t.refs)?a:()=>[],validate:null!=(s=t.validate)?s:()=>[]}},n=s.Ikc({kind:s.euz("free"),x:s.aig().describe("x coordinate, in the figure's own arbitrary units."),y:s.aig().describe("y coordinate, in the figure's own arbitrary units.")}).strict().describe("A point you place yourself at (x, y). Use a few of these as anchors to fix the figure's shape; derive the rest with a construction so GeoGebra does the arithmetic."),o=s.Ikc({kind:s.euz("midpoint"),of:s.YjP().describe("id of the segment this point is the midpoint of.")}).strict().describe("The midpoint of a segment â GeoGebra computes its position."),c=s.Ikc({kind:s.euz("intersection"),a:s.YjP().describe("id of the first segment or circle."),b:s.YjP().describe("id of the second segment or circle.")}).strict().describe("Where two segments (or a segment and a circle, or two circles) cross â GeoGebra computes it. Let this place a vertex determined by given distances (as two circle intersections) instead of computing coordinates by hand."),l=s.Ikc({kind:s.euz("foot"),from:s.YjP().describe("id of the point the perpendicular drops from."),onto:s.YjP().describe("id of the segment it drops onto.")}).strict().describe("The foot of the perpendicular from a point onto a segment (the base of an altitude) â GeoGebra computes it, so the drop is exactly perpendicular."),h=s.gMt("kind",[n,o,c,l]),d=s.Ikc({id:s.YjP().describe('Unique identifier for this point â a short valid name starting with a letter, e.g. "A", "B", "P1". Referenced by segments, angles, circles, and assertions. Must be unique across ALL objects in the diagram.'),label:s.YjP().nullable().describe('Text shown next to the point, rendered as LaTeX (e.g. "A", "P_1", "\\\\theta"). Null falls back to the id. Empty string hides the label.'),at:h.describe("Where the point is: `free` with coordinates you choose, or a construction (`midpoint`/`intersection`/`foot`) GeoGebra computes from other objects.")}).strict(),u=s.Ikc({id:s.YjP().describe("Unique identifier for this segment. Must be unique across all objects."),from:s.YjP().describe("id of the start point."),to:s.YjP().describe("id of the end point."),label:s.YjP().nullable().default(null).describe('A text label drawn on the side, rendered as LaTeX â for a side named by a LETTER or an EXPRESSION rather than a number ("a", "c", "x", "2x+1", "\\\\ell"). To show a stated numeric length as the label, add a `length` assertion instead (it draws the number). Null for no text label.')}).strict().describe("A straight line segment between two points."),g=s.Ikc({id:s.YjP().describe("Unique identifier for this polygon. Must be unique across all objects."),vertices:s.YOg(s.YjP()).min(3).describe("Ordered ids of the corner points, going around the polygon (at least 3). Edges are drawn automatically between consecutive vertices and from the last back to the first â do NOT also declare those edges as segments (unless you want to label one, in which case declare just that side)."),shape:s.k5n(["generic","regular","rectangle","square","parallelogram","rhombus"]).describe('What the polygon IS, which marks it and tells the checker what to expect: "generic", "regular", "rectangle", "square", "parallelogram", "rhombus". Place the vertices so the shape actually holds (e.g. a square\'s four corners at right angles with equal sides); the checker confirms it. The last four need EXACTLY 4 vertices in order around the shape.'),shaded:s.zMY().default(!1).describe("If true, fill the polygon's interior with a translucent tint â use it to SHADE the region a question is about (an area to find, a set region). Default false = outline only.")}
1).strict().describe("A polygon from ordered vertex points; its edges are drawn automatically. Use this for squares, rectangles, parallelograms, rhombuses, and regular polygons. For a triangle use `triangles` instead."),p=s.Ikc({id:s.YjP().describe("Unique identifier for this triangle. Must be unique across all objects."),a:s.YjP().describe("id of the first vertex point."),b:s.YjP().describe("id of the second vertex point."),c:s.YjP().describe("id of the third vertex point."),shaded:s.zMY().default(!1).describe("If true, fill the triangle's interior with a translucent tint â use it to shade a region the question is about (an area to find). Default false = outline only.")}).strict().describe("A triangle from three vertex points. Its three sides are drawn automatically."),m=s.Ikc({id:s.YjP().describe("Unique identifier for this angle. Must be unique across all objects."),vertex:s.YjP().describe("id of the vertex point (where the angle opens)."),from:s.YjP().describe("id of a point on the first ray of the angle."),to:s.YjP().describe("id of a point on the second ray of the angle."),mark:s.k5n(["none","arc","right"]).describe('How to draw the angle: "arc" draws an arc (the default for a labelled or measured angle), "right" draws a right-angle square (use when the angle is 90\xb0), "none" draws nothing (the angle exists only to be measured or labelled). The stated measure goes in an `angleMeasure` assertion, not here.'),label:s.YjP().nullable().default(null).describe('A text label drawn at the angle, rendered as LaTeX â for an angle named by a LETTER or symbol ("x", "\\\\theta", "\\\\alpha"). Use this to NAME the angle the question asks the student to find. To show a stated numeric measure, add an `angleMeasure` assertion (it draws the number). Null for no text label.')}).strict().describe("An interior angle at `vertex`, opening from ray vertexâfrom to ray vertexâto."),b=s.Ikc({id:s.YjP().describe("Unique identifier for this circle. Must be unique across all objects."),center:s.YjP().describe("id of the center point."),through:s.YjP().describe("id of a point that lies on the circle (fixes the radius)."),shaded:s.zMY().default(!1).describe("If true, fill the disc with a translucent tint. Use it to shade a set-disc in a VENN diagram (place two circles so they OVERLAP and shade both â the lens reads darker where the tints cross) or any disc a question is about. Default false = outline only.")}).strict().describe("A circle defined by its center and a point on it."),f=s.Ikc({id:s.YjP().describe("Unique identifier for this region. Must be unique across all objects."),circle:s.YjP().describe("id of the circle this region belongs to."),from:s.YjP().describe("id of a point where the arc starts â a point you have placed ON this circle (add an `onCircle` assertion, or construct it as an `intersection`, so it truly lies on the circle)."),to:s.YjP().describe("id of a point where the arc ends â also a point placed ON this circle."),region:s.k5n(["sector","segment"]).describe('Which shaded region between `from` and `to`: "sector" is the pie-slice bounded by the two radii and the arc (reaches the centre); "segment" is the piece bounded by the CHORD from-to and the arc (does not reach the centre). Use "segment" for "the area of the segment cut off by a chord".'),major:s.zMY().default(!1).describe("Which of the two arcs from `from` to `to` bounds the region: false (default) = the minor (shorter) arc, the usual case; true = the major (longer) arc.")}).strict().describe("A shaded circular SECTOR (pie slice) or SEGMENT (chord-to-arc piece) of a circle, filled with a translucent tint and drawn with the arc as a TRUE curve. Use this â not a polygon over points on the circle â whenever a question is about the area between a chord/radii and the arc."),y={points:i(d,{declares:e=>({id:e.id,kind:"point"}),validate:e=>{let t=[],a=null!==e.label?(0,r.D)(e.label):null;return a&&t.push('Point "'.concat(e.id,'" label ').concat(a,".")),"free"!==e.at.kind||Number.isFinite(e.at.x)&&Number.isFinite(e.at.y)||t.push('Point "'.concat(e.id,'" has non-finite coordinates.')),t},refs:e=>(e=>{let t=e.at;switch(t.kind){case"free":return[];case"midpoint":return[{kind:"segment",id:t.of,role:"midpoint of"}];case"intersection":return[{kinds:["segment","circle"],id:t.a,role:"intersection a"},{kinds:["segment","circle"],id:t.b,role:"intersection b"}];case"foot":return[{kind:"point",id:t.from,role:"foot from"},{kind:"segment",id:t.onto,role:"foot onto"}]}})(e)}),segments:i(u,{declares:e=>({id:e.id,kind:"segment"}),validate:e=>{let t=null!=e.label?(0,r.D)(e.label):null;return t?['Segment "'.concat(e.id,'" label ').concat(t,".")]:[]},refs:e=>[{kind:"point",id:e.from,role:"from"},{kind:"point",id:e.to,role:"to"},{distinct:[["from",e.from],["to",e.to]]}]}),polygons:i(g,{declares:e=>({id:e.id,kind:"polygon"}),validate:e=>["rectangle","square","parallelogram","rhombus"].includes(e.shape)&&4!==e.vertices.length?['Polygon "'.concat(e.id,'" is a ').concat(e.shape,", which needs exactly 4 vertices (got ").concat(e.vertices.length,").")]:[],refs:e=>[...e.vertices.map((e,t)=>({kind:"point",id:e,role:"vertex ".concat(t+1)})),{distinct:e.vertices.map((e,t)=>["vertex ".concat(t+1),e])}]}),triangles:i(p,{declares:e=>({id:e.id,kind:"triangle"}),refs:e=>[{kind:"point",id:e.a,role:"a"},{kind:"point",id:e.b,role:"b"},{kind:"point",id:e.c,role:"c"},{distinct:[["a",e.a],["b",e.b],["c",e.c]]}]}),angles:i(m,{declares:e=>({id:e.id,kind:"angle"}),validate:e=>{let t=null!=e.label?(0,r.D)(e.label):null;return t?['Angle "'.concat(e.id,'" label ').concat(t,".")]:[]},refs:e=>[{kind:"point",id:e.vertex,role:"vertex"},{kind:"point",id:e.from,role:"from"},{kind:"point",id:e.to,role:"to"},{distinct:[["vertex",e.vertex],["from",e.from],["to",e.to]]}]}),circles:i(b,{declares:e=>({id:e.id,kind:"circle"}),refs:e=>[{kind:"point",id:e.center,role:"center"},{kind:"point",id:e.through,role:"through"},{distinct:[["center",e.center],["through",e.through]]}]}),sectors:i(f,{declares:e=>({id:e.id,kind:"sector"}),refs:e=>[{kind:"circle",id:e.circle,role:"circle"},{kind:"point",id:e.from,role:"from"},{kind:"point",id:e.to,role:"to"},{distinct:[["from",e.from],["to",e.to]]}]})};var w=a(9421);let v=s.aig().int().min(1).max(3).nullable().default(null),k=s.Ikc({type:s.euz("length"),segment:s.YjP().describe("id of the segment."),value:s.aig().positive().describe("The segment's stated length in the question's own units (e.g. 48), a POSITIVE number. Drawn as the side's label, and checked as a RATIO against every other stated length â so place the points to that scale, not to an absolute pixel size.")}
1).strict().describe("A stated side length. Drawn as the number on the side, checked as a ratio."),T=s.Ikc({type:s.euz("angleMeasure"),angle:s.YjP().describe("id of the angle."),value:s.aig().gt(0).lt(180).describe("The angle's stated measure in DEGREES (e.g. 64), strictly between 0 and 180. Drawn as the number at the angle, and checked against the realized angle.")}).strict().describe("A stated angle measure. Drawn as the number, checked against the figure."),x=s.Ikc({type:s.euz("equalLength"),segments:s.YOg(s.YjP()).min(2).describe("ids of the segments that must be equal in length (at least 2)."),mark:v.describe("Tick-mark count to draw on each of these segments (1â3), or null for no ticks. Congruent groups use different counts.")}).strict().describe("Segments that are equal in length. Checked, and optionally tick-marked."),A=s.Ikc({type:s.euz("equalAngle"),angles:s.YOg(s.YjP()).min(2).describe("ids of the angles that must be equal (at least 2)."),mark:v.describe("Arc-tick count to draw on each of these angles (1â3), or null for none.")}).strict().describe("Angles that are equal. Checked, and optionally arc-marked."),Y=s.Ikc({type:s.euz("parallel"),segments:s.YOg(s.YjP()).min(2).describe("ids of the segments that must be parallel (at least 2)."),mark:v.describe("Chevron count to draw on each of these segments (1â3), or null for none.")}).strict().describe("Segments that are parallel. Checked, and optionally chevron-marked."),E=s.Ikc({type:s.euz("perpendicular"),a:s.YjP().describe("id of the first segment."),b:s.YjP().describe("id of the second segment."),mark:s.zMY().describe("If true, draw a right-angle square where the two segments meet.")}).strict().describe("Two segments meet at a right angle. Checked, and optionally squared."),O=s.Ikc({type:s.euz("collinear"),points:s.YOg(s.YjP()).min(3).describe("ids of the points that must lie on one line (at least 3, in order).")}).strict().describe("Three or more points on one straight line. Checked."),I=s.Ikc({type:s.euz("on"),point:s.YjP().describe("id of the point."),segment:s.YjP().describe("id of the segment it must lie on.")}).strict().describe("A point lies on a segment. Checked. (To PLACE such a point exactly, use a `foot`/`intersection` construction instead.)"),P=s.Ikc({type:s.euz("onCircle"),circle:s.YjP().describe("id of the circle."),point:s.YjP().describe("id of the point that must lie on it.")}).strict().describe("A point lies on a circle. Checked."),q=s.Ikc({type:s.euz("tangent"),circle:s.YjP().describe("id of the circle."),segment:s.YjP().describe("id of the segment that must be tangent to it (touches at one point).")}).strict().describe("A segment is tangent to a circle (perpendicular to the radius at the contact). Checked."),j=s.gMt("type",[k,T,x,A,Y,E,O,I,P,q]).describe("A stated given the figure must satisfy â a length, an angle measure, congruent/parallel/perpendicular parts, collinearity, a point on a segment or circle, a tangent. Checked against the realized figure."),S={length:e=>[{kind:"segment",id:e.segment,role:"segment"}],angleMeasure:e=>[{kind:"angle",id:e.angle,role:"angle"}],equalLength:e=>e.segments.map((e,t)=>({kind:"segment",id:e,role:"segment ".concat(t+1)})),equalAngle:e=>e.angles.map((e,t)=>({kind:"angle",id:e,role:"angle ".concat(t+1)})),parallel:e=>e.segments.map((e,t)=>({kind:"segment",id:e,role:"segment ".concat(t+1)})),perpendicular:e=>[{kind:"segment",id:e.a,role:"a"},{kind:"segment",id:e.b,role:"b"}],collinear:e=>[...e.points.map((e,t)=>({kind:"point",id:e,role:"point ".concat(t+1)})),{distinct:e.points.map((e,t)=>["point ".concat(t+1),e])}],on:e=>[{kind:"point",id:e.point,role:"point"},{kind:"segment",id:e.segment,role:"segment"}],onCircle:e=>[{kind:"circle",id:e.circle,role:"circle"},{kind:"point",id:e.point,role:"point"}],tangent:e=>[{kind:"circle",id:e.circle,role:"circle"},{kind:"segment",id:e.segment,role:"segment"}]};var z=a(14131),N=a(62197);let M=s.Ikc({points:s.YOg(d).describe("All points. Each is placed FREE (with coordinates you choose) or DERIVED by a construction GeoGebra computes (midpoint / intersection / perpendicular foot) â so you do minimal arithmetic."),segments:s.YOg(u).describe("All segments."),polygons:s.YOg(g).describe("All polygons (squares, rectangles, parallelograms, rhombuses, regular polygons). Their edges are drawn automatically."),tri
1angles:s.YOg(p).describe("All triangles."),angles:s.YOg(m).describe("All angles."),circles:s.YOg(b).describe("All circles."),sectors:s.YOg(f).default([]).describe("All shaded circular sectors/segments (a region of a circle bounded by an arc). Empty when the figure shades no arc region."),assertions:s.YOg(j).describe("The problem's stated givens â lengths, angle measures, equal/parallel/perpendicular parts, collinearity, points on a segment or circle, tangents. Place the points so these hold; each is checked against the realized figure and drawn (a number, a tick, a square) where it applies.")}).strict(),C=s.Ikc({domain:s.euz("geometry"),title:N.A,...M.shape}).strict().describe("A single Euclidean geometry figure: declare points (placed by coordinates or by a construction), then segments/polygons/triangles/angles/circles, then the stated givens as assertions. You place the figure; GeoGebra draws it and the givens are checked. This produces exactly ONE figure â a request that needs two independent diagrams is composed by the caller, one generator call per figure."),L=(0,z.t)({objects:y,kinds:["point","segment","polygon","triangle","angle","circle","sector"],relationField:"assertions",refsOf:e=>(0,w.J)(S,e),check:e=>0===e.points.length?["Diagram is empty: declare at least one point."]:e.points.some(e=>"free"===e.at.kind)?[]:["No anchor: at least one point must be `free` with coordinates â the rest can be constructed, but something has to pin the figure down."]}),R=e=>L(e)},14131:(e,t,a)=>{a.d(t,{Y:()=>s,t:()=>n});let s=/^[A-Za-z_][A-Za-z0-9_]*$/,r=e=>e.charAt(0).toUpperCase()+e.slice(1),i=(e,t)=>{let a=new Map;for(let[s,r]of e){let e=a.get(r);if(e)return"".concat(t,": ").concat(e," and ").concat(s,' are both "').concat(r,'" â they must be distinct.');a.set(r,s)}return null},n=e=>t=>{var a,n;let o=[],c=Object.keys(e.objects),l=[...c,...e.relationField?[e.relationField]:[]].filter(e=>!Array.isArray(null==t?void 0:t[e]));if(l.length>0)return["Diagram data is malformed: missing or invalid ".concat(l.join(", "),".")];o.push(...null!=(n=null==(a=e.check)?void 0:a.call(e,t))?n:[]);let h=new Set,d=Object.fromEntries(e.kinds.map(e=>[e,new Set]));for(let a of c){let i=e.objects[a];for(let n of t[a]){let{id:t,kind:a}=i.declares(n);s.test(t)||o.push("".concat(r(a),' id "').concat(t,'" is not a valid identifier (letters, digits, underscore; must start with a letter or underscore).')),h.has(t)&&o.push('Duplicate id "'.concat(t,'": every object (').concat(e.kinds.join(", "),") needs a unique id.")),h.add(t),d[a].add(t)}}let u=(e,t)=>{for(let a of e)if("distinct"in a){let e=i(a.distinct,t);e&&o.push(e)}else"kinds"in a?a.kinds.some(e=>d[e].has(a.id))||o.push("".concat(t,".").concat(a.role," references unknown ").concat(a.kinds.join(" or "),' "').concat(a.id,'".')):d[a.kind].has(a.id)||o.push("".concat(t,".").concat(a.role," references unknown ").concat(a.kind,' "').concat(a.id,'".'))};for(let a of c){let s=e.objects[a];for(let e of t[a]){let{id:t,kind:a}=s.declares(e);u(s.refs(e),"".concat(r(a),' "').concat(t,'"')),o.push(...s.validate(e))}}if(e.relationField&&e.refsOf){let a=e.refsOf;t[e.relationField].forEach((t,s)=>{u(a(t),"".concat(e.relationField,"[").concat(s,"] (").concat(t.type,")"))})}return o}},49222:(e,t,a)=>{a.d(t,{t:()=>Y,J:()=>T});var s=a(3729);let r={id:s.YjP().describe('A short id for this curve, unique among the curves, so regions and annotations can refer to it (e.g. "d", "supply", "f"). Never drawn.'),label:s.YjP().describe('This curve\'s name, drawn in the legend and beside it, e.g. "Demand", "y = x\xb2", "T = 300 K". Use "" for no name (usual when there is only one curve).'),dashed:s.zMY().describe("Draw the curve dashed rather than solid. Use for a secondary curve â a comparison, or the AFTER curve of a before/after pair. False for the main curve.")},i="Use * for every multiplication (2*x, never 2x); write powers as x^2 or pow(x, 2). Available: + - * / ^, pow, sqrt, exp, log (natural log), abs, sin, cos, tan, asin, acos, atan, atan2, floor, ceil, round, min, max, PI, E.",n=s.Ikc({form:s.euz("equation"),...r,expression:s.YjP
1().describe('y as a formula in x, e.g. "x^2 + 1", "sqrt(x + 1) + 0.3", "3*sin(2*x)", "exp(0 - x)". '.concat(i)),from:s.aig().nullable().describe("Restrict the curve to x ⥠from. null (the default) draws it across the whole plot, extending as the view pans. Set from AND to together only when the curve exists or is asked for solely on [from, to] â a piecewise piece, or a graph the question limits to a stated domain. Use `xRange` to frame the view without limiting the curve."),to:s.aig().nullable().describe("Restrict the curve to x ⤠to; null to leave it unbounded. Pair with `from`.")}).strict().describe("A curve given by an EQUATION y = f(x) â use whenever the question states a formula. It is evaluated exactly for you: never work out the points yourself."),o=s.Ikc({form:s.euz("parametric"),...r,x:s.YjP().describe('x as a formula in t, e.g. "t - sin(t)". '.concat(i)),y:s.YjP().describe('y as a formula in t, e.g. "1 - cos(t)". '.concat(i)),from:s.aig().describe("The smallest value of t."),to:s.aig().describe("The largest value of t.")}).strict().describe("A curve given PARAMETRICALLY as x(t) and y(t) â a cycloid, an ellipse, a projectile's path. Use when the question gives both coordinates in terms of a parameter."),c=s.Ikc({form:s.euz("polar"),...r,expression:s.YjP().describe('r as a formula in theta, e.g. "3*cos(2*theta)", "1 + cos(theta)". Write the angle as "theta". '.concat(i)),from:s.aig().describe("The smallest value of theta, in RADIANS (0 for a full rose)."),to:s.aig().describe("The largest value of theta, in RADIANS (use 2*PI â 6.2832 for one full turn).")}).strict().describe("A curve given in POLAR form r = f(θ) â a rose, a cardioid, a spiral. The conversion to x and y is done for you."),l=s.Ikc({x:s.aig().describe("The point's x."),y:s.aig().describe("The point's y.")}).strict(),h=s.Ikc({form:s.euz("shape"),...r,points:s.YOg(l).describe("The points the curve passes through, in increasing x order. Give only the few that carry the SHAPE â where it starts, any peak/trough/kink, where it ends, and any value the question states. The curve is drawn through them for you."),interpolation:s.k5n(["smooth","linear"]).describe('How to join the points. "smooth" â a smooth curve that rises and falls exactly where the points do, for a curve the question describes in words (a demand curve, a growth curve). "linear" â straight lines between them, for a piecewise-linear graph or a set of measured readings.')}).strict().describe("A curve given by its SHAPE, for when the question states NO formula: a curve described in words (supply and demand, bowed outwards, rises then levels off), a piecewise-linear graph, or a table of readings. Choose axis values that make the described shape obvious â they are a schematic, not a measurement."),d=s.Ikc({form:s.euz("vertical"),...r,at:s.aig().describe("The x the line is drawn at.")}).strict().describe("A VERTICAL line at a given x, spanning the plot â a perfectly inelastic supply or demand curve, a fixed money supply, a long-run aggregate supply curve, the line x = 3 bounding a region. Use whenever the question calls a curve vertical: no other form can draw one."),u=s.Ikc({form:s.euz("polygon"),...r,points:s.YOg(l).describe("The vertices IN ORDER around the outline (NOT sorted by x) â a triangle is three points, a rectangle four, a vector two. They are joined in the order given."),closed:s.zMY().describe("Join the last vertex back to the first to close the outline. True for a triangle, rectangle or any closed polygon; false for an open path such as a vector or a run of connected segments."),arrowhead:s.k5n(["none","end","both"]).describe('An arrowhead turns this open path into a DIRECTED arrow â the thing the question means by "vector", "the direction of motion", "the movement from A to B", "the velocity", a rise/run indicator. "end" points at the last vertex; "both" is a double-headed arrow; "none" is a plain line or the sides of a closed shape. Only drawn on an OPEN path (closed: false) â a triangle or rectangle takes "none".')}).strict().describe("A straight-sided figure given by its VERTICES in order â a triangle, rectangle or polygon with
1named coordinates, a vector or arrow from one point to another, any outline that doubles back in x. Set `arrowhead` when the question wants a directed arrow (a movement, a velocity, a direction). Unlike `shape` it is NOT a function of x, so it cannot bound a region or carry an on-curve point."),g=s.gMt("form",[n,o,c,h,d,u]),p=["equation","shape"],m=s.gMt("between",[s.Ikc({between:s.euz("curveAndAxis"),curve:s.YjP().describe("The id of the curve bounding the region."),from:s.aig().nullable().describe("The x the region starts at; null means the start of the curve."),to:s.aig().nullable().describe("The x the region ends at; null means the end of the curve."),label:s.YjP().describe('Text drawn on the region, e.g. "Area = 6", "Work done". Use "" for none.')}).strict().describe("The area between a curve and the x-axis â an integral, the work done, the distance travelled."),s.Ikc({between:s.euz("curves"),curve:s.YjP().describe("The id of the first bounding curve."),other:s.YjP().describe("The id of the second bounding curve."),from:s.aig().nullable().describe("The x the region starts at; null means where the curves start."),to:s.aig().nullable().describe("The x the region ends at; null means where the curves end."),label:s.YjP().describe('Text drawn on the region. Use "" for none.')}).strict().describe("The area between TWO curves â the area enclosed, a surplus, a difference.")]),b=s.k5n(["none","closed","open"]).describe('The dot drawn at the point. "closed" â a filled dot, the value IS included. "open" â a hollow dot, the value is NOT included (the excluded end of a piecewise branch, a removable hole). "none" â label only, no dot.'),f=s.gMt("at",[s.Ikc({at:s.euz("point"),x:s.aig().describe("The point's x."),y:s.aig().describe("The point's y."),label:s.YjP().describe('A SHORT caption beside the point â a name or value of AT MOST 2 short words, like "P", "vertex", "K/2", "(2, 0)". It is a label, NOT an explanation: never a sentence, a definition, or a worked step (all of that goes in your written answer, not on the figure). Prefer "" (no label) for any point the question does not directly ask you to identify â every extra or wordy label crowds the plot and smears. Use "" for none.'),marker:b}).strict().describe("A point at coordinates the question GIVES (an intercept it states, an equilibrium you placed yourself on a shape curve)."),s.Ikc({at:s.euz("onCurve"),curve:s.YjP().describe("The id of the curve to mark."),x:s.aig().describe("The x at which to mark it."),label:s.YjP().describe('A SHORT caption beside the point â a name or value of AT MOST 2 short words, like "P", "vertex", "K/2", "(2, 0)". It is a label, NOT an explanation: never a sentence, a definition, or a worked step (all of that goes in your written answer, not on the figure). Prefer "" (no label) for any point the question does not directly ask you to identify â every extra or wordy label crowds the plot and smears. Use "" for none.'),marker:b}).strict().describe("A point ON a curve, at a given x â the curve's y there is worked out for you. Prefer this to `point` whenever the point sits on a curve: do NOT evaluate the formula yourself.")]),y=s.Ikc({axis:s.k5n(["x","y"]).describe('Which axis the value is on. "x" â a vertical line / a tick on the horizontal axis. "y" â a horizontal line / a tick on the vertical axis.'),at:s.aig().describe("The value on that axis."),label:s.YjP().describe('The text for it, drawn on the axis in place of the usual number, e.g. "Ï/2", "Q*", "K", "0". Use "" for no text.'),line:s.zMY().describe("Draw a dashed line right across the plot at this value (an asymptote, a threshold, a reference level). False to label the axis only.")}).strict();var w=a(59310),v=a(62197);let k=s.Ikc({min:s.aig().describe("The axis's smallest value."),max:s.aig().describe("The axis's largest value.")}).strict(),T=s.Ikc({domain:s.euz("plot"),title:v.A,xLabel:s.YjP().describe('The horizontal axis label, with units where there are any, e.g. "Time (s)", "Quantity", "x". Use "" for none.'),yLabel:s.YjP().describe('The vertical axis label, e.g. "Velocity (m/s)", "Price", "y". Use "" for none.'),curves:s.YOg(g).describe("The curves to draw â at least one. Give each one the form that matches what the question states."),regions:s.YOg(m).describe("Shaded areas under or between curves. Empty for none â most figures have none."),annotations:s.YOg(f).describe('Points to mark and name on the figure â an intercept, a maximum, an equilibrium, the excluded end of a piecewise branch. Give a TEXT LABEL to only the few points the question is actually about: labelling many nearby points collides the text into an unreadable smear. Plain data points the question asks you to plot are fine unlabelled (marker with label ""). Empty for none.'),markers:s.YOg(y).describe("Named values on an axis, each optionally with a dashed line across the plot â an asymptote, a threshold, a symbolic tick like Ï/2. Empty for none."),xRange:k.nullable().describe("The horizontal axis's range, or null to have one chosen to fit the curves. Set it when the question names one."),yRange:k.nullable().describe("The vertical axis's range, or null to have one chosen to fit the curves. Set it when the question names one, or when a curve runs off to infinity (a vertical asymptote) and would otherwise flatten everything else.")}
1).strict().describe("A plot of one or more CURVES on a pair of axes: functions, qualitative curves, piecewise graphs â with shaded regions, marked points and reference lines. Give the equation or the shape; never the plotted points of a formula."),x=new Set(["id","expression","x","y","curve","other"]),A=e=>{let t=new Set,a=new Set;for(let s of e)t.has(s)&&a.add(s),t.add(s);return[...a]},Y=e=>{let t=[];for(let a of((0,w.W)(e,"",t,x),0===e.curves.length&&t.push("The plot is empty: give at least one curve."),e.curves.forEach((e,a)=>{let s="curves[".concat(a,"]").concat(e.label?' ("'.concat(e.label,'")'):"");""===e.id&&t.push("".concat(s,": every curve needs a non-empty id.")),"shape"===e.form?(e.points.length<2&&t.push("".concat(s,": a shape curve needs at least two points to draw a curve through.")),e.points.forEach((a,r)=>{let i=e.points[r+1];i&&!(a.x<i.x)&&t.push(a.x===i.x?"".concat(s,".points[").concat(r,"]: two points share x (").concat(a.x,"), so the curve would go straight up â a shape curve is a function of x and cannot. For a single vertical line at x = ").concat(a.x,', give the curve `form: "vertical"` with `at: ').concat(a.x,'`; for a triangle, rectangle or other straight-sided outline whose sides run vertically, use `form: "polygon"` with the vertices in order.'):"".concat(s,".points[").concat(r,"]: x (").concat(a.x,") must be less than the next point's x (").concat(i.x,') â a shape curve is a function of x, drawn left to right, and cannot double back. Put the points in increasing x order; if this is really a closed outline or a shape that doubles back (a triangle, a rectangle, a vector), use `form: "polygon"` with the vertices in order around it.'))})):"polygon"===e.form?e.points.length<2&&t.push("".concat(s,": a polygon needs at least two vertices, given in order around the outline.")):"parametric"===e.form||"polar"===e.form?e.from>=e.to&&t.push("".concat(s,": from (").concat(e.from,") must be less than to (").concat(e.to,").")):"equation"===e.form&&(null===e.from!=(null===e.to)?t.push("".concat(s,": set from and to together to limit the curve to an interval, or leave both null to draw it across the whole plot.")):null!==e.from&&null!==e.to&&e.from>=e.to&&t.push("".concat(s,": from (").concat(e.from,") must be less than to (").concat(e.to,").")))}),A(e.curves.map(e=>e.id))))t.push('Duplicate curve id "'.concat(a,'": each curve needs its own, or a region or annotation cannot say which one it means.'));for(let a of A(e.curves.map(e=>e.label).filter(e=>""!==e)))t.push('Duplicate curve label "'.concat(a,'": each named curve needs its own name, or they share a legend entry and a colour.'));let a=new Map(e.curves.map(e=>[e.id,e])),s=(e,s)=>{let r=a.get(e);r?p.includes(r.form)||t.push("".concat(s,': curve "').concat(e,'" is a ').concat(r.form," curve, which has no single y at a given x, so nothing can be measured against it. Only equation and shape curves can.")):t.push("".concat(s,': no curve has the id "').concat(e,'".'))};e.regions.forEach((e,a)=>{let r="regions[".concat(a,"]");s(e.curve,"".concat(r,".curve")),"curves"===e.between&&(s(e.other,"".concat(r,".other")),e.curve===e.other&&t.push("".concat(r,': both edges are curve "').concat(e.curve,'" â the region between a curve and itself has no area.'))),null!==e.from&&null!==e.to&&e.from>=e.to&&t.push("".concat(r,": from (").concat(e.from,") must be less than to (").concat(e.to,")."))}),e.annotations.forEach((e,t)=>{"onCurve"===e.at&&s(e.curve,"annotations[".concat(t,"].curve"))});let r=(e=>{let t=e.annotations.filter(e=>{var t;return""!==(null!=(t=e.label)?t:"").trim()});if(t.length<=2)return null;let a=t.map(e=>e.x),[s,r]=e.xRange?[e.xRange.min,e.xRange.max]:[Math.min(...a),Math.max(...a)],i=r-s||1,n=t.map(e=>{let t=(e.x-s)/i*420;return{left:t,right:t+6*e.label.length}}).sort((e,t)=>e.left-t.left),o=[];for(let e of n){let t=0;for(;t<o.length&&o[t]>e.left;)t++;o[t]=e.right}return o.length>2?"".concat(t.length," annotation labels overlap into a stack ").concat(o.length,' lanes deep and will smear into unreadable text. Give a text label to only the few points the question is really about; leave the rest as unlabelled markers (label "") or explain them in your written answer.'):null})(e);
1r&&t.push(r),e.markers.forEach((e,a)=>{""!==e.label||e.line||t.push("markers[".concat(a,"]: has no label and draws no line, so it would draw nothing at all."))});let i=(e,t)=>e&&e.min>=e.max?"".concat(t,": min (").concat(e.min,") must be less than max (").concat(e.max,")."):null;for(let a of[i(e.xRange,"xRange"),i(e.yRange,"yRange")])a&&t.push(a);return t}},50054:(e,t,a)=>{a.d(t,{NM:()=>v,tq:()=>x});var s=a(3729),r=a(59310),i=a(14131),n=a(62197);let o=s.YjP().describe('Unique id, e.g. "R1" â referenced by `topology`.'),c=s.YjP().nullable().describe('Text drawn beside it: its name ("Râ") or a value the question STATES ("10 Ω"). Null falls back to the id, "" hides it. Never a value you worked out.'),l=s.zMY().describe("True flips which way it faces. False points it the way the topology is walked."),h=(e,t)=>s.Ikc({type:s.euz(e),id:o,label:c}).strict().describe(t),d=(e,t)=>s.Ikc({type:s.euz(e),id:o,label:c,reversed:l}).strict().describe(t),u=s.gMt("type",[d("battery","A cell or battery â the DC supply driving the loop."),h("resistor","A resistor."),h("bulb","A lamp or bulb."),h("capacitor","A capacitor."),h("inductor","An inductor â a coil."),h("variableResistor","A variable resistor or rheostat â a resistor with an arrow through it, for anything the question says is adjusted."),h("thermistor","A thermistor â a resistor whose resistance depends on temperature."),h("fuse","A fuse."),h("ammeter","An ammeter, which sits IN the current path, in series with whatever it measures."),s.Ikc({type:s.euz("switch"),id:o,label:c,open:s.zMY().describe("True draws it OPEN â the blade lifted, the circuit broken. False draws it closed, carrying current.")}).strict().describe("A switch."),d("diode","A diode â conducts one way only. Its direction is what most questions about it turn on."),d("led","A light-emitting diode."),d("zener","A Zener diode â the one drawn with the bent bar, used in reverse breakdown."),d("acSource","An AC supply â the circle with a sine wave through it."),d("voltageSource","An ideal voltage source, where the question means a supply rather than a chemical cell."),d("currentSource","An ideal current source.")]).describe("One component sitting in the current path. Pick the arm that says what the component IS â a voltmeter is not one of these, because it measures ACROSS a component instead of carrying the current, and a ground is not either."),g=s.Ikc({id:s.YjP().describe('Unique identifier for this voltmeter, e.g. "V1". Must be unique across ALL components and meters.'),across:s.YjP().describe("id of the component whose potential difference it reads. The meter is drawn beside that component with its two leads, and never in the current path â that is what makes it a voltmeter rather than an ammeter."),label:s.YjP().nullable().describe('Text for the meter â usually "Vâ" or a stated reading. Null falls back to the id; empty string leaves it marked only by its "V". Never a reading you worked out.')}).strict().describe("A voltmeter bridging one component, drawn beside it rather than in the loop."),p=s.Ikc({id:s.YjP().describe('Unique identifier for this ground, e.g. "gnd". Must be unique across ALL components, meters and grounds.'),at:s.YjP().describe("id of the component whose terminal this ground marks. A ground is not in the current path â it marks a point of the loop as the zero of potential."),side:s.k5n(["start","end"]).describe('Which of that component\'s two terminals to hang it from, "start" or "end", walking the topology in the order given.')}).strict().describe("An earth symbol marking one point of the circuit as 0 V."),m=s.Ikc({item:s.euz("element"),id:s.YjP().describe("id of the component that sits at this point.")}).strict().describe("One component, at its place along this run."),b=(e,t)=>s.Ikc({item:s.euz("parallel"),branches:s.YOg(e).describe("The branches the current splits between â at least TWO, each its own `series` run of one or more components. ".concat(t))}).strict().describe("A parallel group: the run splits here into branches that rejoin immediately after, so the same potential difference is across every branch."),f=s.Ikc({series:s.YOg(m).describe("The components of this branch, in order. At least one.")}
1).strict().describe("A run of components in series."),y=s.Ikc({series:s.YOg(s.gMt("item",[m,b(f,"These innermost branches hold components only â they cannot split again.")])).describe("What this branch holds, in order: components, and any parallel group nested inside it.")}).strict().describe("A run of components in series, which may itself split."),w=s.Ikc({series:s.YOg(s.gMt("item",[m,b(y,"A branch may itself hold one further parallel group, and no deeper.")])).describe("Everything on the main loop, in order round it: each component, and each parallel group, exactly once.")}).strict().describe("How the circuit is wired: one loop, walked in order, whose items are components and parallel groups. Every declared component appears here EXACTLY once."),v=s.Ikc({domain:s.euz("circuit"),title:n.A,elements:s.YOg(u).describe("Every component in the circuit â declared here once, then placed by `topology`."),voltmeters:s.YOg(g).describe("Voltmeters bridging a component. Usually empty: declare one only when the question puts a voltmeter in the circuit."),grounds:s.YOg(p).describe("Earth symbols marking a point of the circuit as 0 V. Usually empty: declare one only when the question earths the circuit or asks about potential relative to ground."),topology:w.describe("How those components are wired together.")}).strict().describe("A circuit schematic: components wired as one loop, with parallel groups where the current splits. Use it for series/parallel resistor networks, brightness-of-bulbs and equivalent-resistance questions, RC and LR circuits, and any circuit a switch, ammeter or voltmeter is added to. It draws ONE loop, so a multi-loop network with a battery in more than one loop â the Kirchhoff junction-and-loop problems â cannot be expressed: answer those in prose rather than forcing them into a single loop, which would draw a different circuit from the one asked about."),k=e=>e.series.flatMap(e=>"element"===e.item?[e.id]:e.branches.flatMap(k)),T=(e,t)=>{let a=[];for(let s of(0===e.series.length&&a.push("".concat(t," is empty, so the circuit has a stretch of wire where a component should be. Put the components the question puts there into it, or drop it.")),e.series))"element"!==s.item&&(s.branches.length<2&&a.push("A parallel group in ".concat(t," has ").concat(1===s.branches.length?"only one branch":"no branches",". Parallel means the current SPLITS, so a group needs at least two â put a lone run of components straight into the series instead.")),a.push(...s.branches.flatMap(e=>T(e,"a parallel branch"))));return a},x=e=>{if((e=>{var t;return!Array.isArray(null==e?void 0:e.elements)||!Array.isArray(null==e?void 0:e.voltmeters)||!Array.isArray(null==e?void 0:e.grounds)||!Array.isArray(null==e||null==(t=e.topology)?void 0:t.series)})(e))return["Circuit data is malformed: it needs `elements`, `voltmeters`, `grounds` and a `topology` with its `series`."];let t=[...T(e.topology,"the main loop")];(0,r.W)(e,"",t,new Set(["id","across","at"]));let a=new Set;for(let s of[...e.elements,...e.voltmeters,...e.grounds])i.Y.test(s.id)||t.push('Id "'.concat(s.id,'" is not a valid identifier (letters, digits, underscore; must start with a letter or underscore). Put the reading in `label`, which is free text, and keep the id a plain name like "R1".')),a.has(s.id)&&t.push('Duplicate id "'.concat(s.id,'": every component and meter needs a unique id.')),a.add(s.id);let s=new Set(["battery","acSource","voltageSource","currentSource"]);e.elements.some(e=>s.has(e.type))||t.push('The circuit has no supply, so nothing drives a current round it. Declare the one the question gives â "battery" for a cell, "acSource" for an AC supply, "voltageSource" or "currentSource" for an ideal one â and place it on the main loop.');let n=new Set(e.elements.map(e=>e.id)),o=new Set(e.voltmeters.map(e=>e.id)),c=new Map;for(let t of k(e.topology)){var l;c.set(t,(null!=(l=c.get(t))?l:0)+1)}for(let[e,a]of c)o.has(e)?t.push('The topology places "'.concat(e,'", which is a voltmeter. A voltmeter is not in the current path â it is drawn across the component named by its `across`, so take it out of the loop.')):n.has(e)?a>1&&t.push('Component "'.concat(e,'" is placed ').concat(a," times in the topology, but a component sits at ONE point in a circuit. Declare a second component with its own id if the question really has two of them.")):t.push('The topology places "'.concat(e,'", which is not a declared component. Add it to `elements`, or name one that is there.'));
1for(let a of e.elements)c.has(a.id)||t.push('Component "'.concat(a.id,'" is declared but never placed in the topology, so it is not wired into anything. Put it on the main loop or in one of the branches, or drop it.'));for(let a of e.voltmeters)o.has(a.across)?t.push('Voltmeter "'.concat(a.id,'" measures across "').concat(a.across,'", which is another voltmeter. A voltmeter reads the potential difference across a COMPONENT â name the resistor, bulb or battery the question puts it across.')):n.has(a.across)||t.push('Voltmeter "'.concat(a.id,'" measures across "').concat(a.across,'", which is not a declared component. Name one of the components in `elements`.'));for(let a of e.grounds)n.has(a.at)||t.push('Ground "'.concat(a.id,'" is placed at "').concat(a.at,"\", which is not a declared component. A ground hangs off one component's terminal â name one of the components in `elements`."));return t}},51555:(e,t,a)=>{a.d(t,{I2:()=>d,tq:()=>u});var s=a(3729),r=a(59310),i=a(14131),n=a(62197);let o=["not","buffer"],c=s.Ikc({id:s.YjP().describe('Unique identifier for this input signal, e.g. "A", "B", "Cin", "S". Referenced by a gate\'s `sources` and by an output\'s `from`. Must be unique across ALL inputs, gates and outputs.'),label:s.YjP().nullable().describe('The name drawn at the left-hand edge for this signal. Null falls back to the id, which is normally what you want; use this only when the name needs a character an id cannot hold ("AÌ
", "Sâ"). Empty string hides it.')}).strict().describe("One input signal entering the circuit from the left."),l=s.Ikc({id:s.YjP().describe('Unique identifier for this gate, e.g. "G1", "X1", "A1". Other gates and the outputs refer to it to take its result. Must be unique across ALL inputs, gates and outputs.'),type:s.k5n(["and","or","not","nand","nor","xor","xnor","buffer"]).describe('Which gate this is. "and", "or", "nand", "nor", "xor" and "xnor" take TWO OR MORE sources; "not" (an inverter) and "buffer" take EXACTLY ONE.'),sources:s.YOg(s.YjP()).describe("The ids of the signals feeding this gate, top to bottom â each one an input of the circuit, or another gate whose result this one consumes. A signal may feed as many gates as you like: name it in each, and the wire is drawn branching with a junction dot. This is what wires the circuit up, so it is also where a cycle would come from â a gate may never depend on itself, directly or through others, because that is sequential logic and this domain draws combinational circuits only."),label:s.YjP().nullable().describe("A short note drawn under the gate. Use empty string, which is almost always right: the SHAPE already says which gate it is, and a name on every gate is clutter. Give one only when the question names that intermediate signal or asks you to point a step out. Null falls back to the id, which is rarely what you want here.")}).strict().describe("One logic gate, taking named signals and producing a result."),h=s.Ikc({id:s.YjP().describe('Unique identifier for this output, e.g. "Y", "S", "Cout". Must be unique across ALL inputs, gates and outputs.'),from:s.YjP().describe("The id of the gate whose result this output carries. It may also be an input id, for a signal that passes through the circuit untouched."),label:s.YjP().nullable().describe('The name drawn at the right-hand edge, e.g. "Y", "Sum", "A\xb7B". Null falls back to the id. Empty string hides it. This names the signal â it is NEVER the value you worked out for it.')}).strict().describe("One result leaving the circuit at the right."),d=s.Ikc({domain:s.euz("logic"),title:n.A,inputs:s.YOg(c).describe("The signals entering the circuit, in the order they should be stacked down the left-hand edge."),gates:s.YOg(l).describe("Every gate in the circuit. Their columns, their rows and every wire between them are worked out from what each one takes as `sources` â you never place a gate or route a wire."),outputs:s.YOg(h).describe("The results leaving the circuit at the right-hand edge."),showTruthTable:s.zMY().describe("Draw the circuit's truth table beside it. TRUE whenever the question is about what the circuit DOES â its truth table, whether two circuits are equivalent, De Morgan's laws, what output a given set of inputs produces. The rows are COMPUTED by evaluating the circuit you wired up, over every combination of its inputs, so the table can never disagree with the figure and you must never work one out yourself. Requires at most "+"".concat(4," inputs, or the table is taller than the figure."))}).strict().describe("A LOGIC CIRCUIT: gates wired into a combinational network, drawn left to right from its inputs to its outputs, optionally with the truth table it computes. Use it for gate-level circuits (AND, OR, NOT, NAND, NOR, XOR), for realising a Boolean expression as gates, for adders, multiplexers, decoders and comparators, and for De Morgan and circuit-equivalence questions. It is COMBINATIONAL only: a circuit that feeds a signal back into itself â a flip-flop, a latch, a register, a counter, anything clocked or with memory â cannot be expressed, because the wiring here is required to run one way."),u=e=>{if((e=>!Array.isArray(null==e?void 0:e.inputs)||!Array.isArray(null==e?void 0:e.gates)||!Array.isArray(null==e?void 0:e.outputs))(e))return["Logic data is malformed: it needs `inputs`, `gates` and `outputs`."];let t=[];(0,r.W)(e,"",t,new Set(["id","from","sources"]));let a=new Set;for(let s of[...e.inputs,...e.gates,...e.outputs])i.Y.test(s.id)||t.pu
1sh('Id "'.concat(s.id,'" is not a valid identifier (letters, digits, underscore; must start with a letter or underscore). Put the name you want drawn in `label`, which is free text, and keep the id a plain name like "A" or "G1".')),a.has(s.id)&&t.push('Duplicate id "'.concat(s.id,'": every input, gate and output needs a unique id.')),a.add(s.id);0===e.inputs.length&&t.push("The circuit has no inputs, so there is nothing for the gates to act on. Declare the signals the question names in `inputs`."),0===e.gates.length&&t.push("The circuit has no gates. Declare the gates the question describes, or the expression it asks you to realise, in `gates`."),0===e.outputs.length&&t.push("The circuit has no outputs, so nothing leaves it. Declare the result the question asks about in `outputs`, naming the gate it comes from.");let s=new Set(e.inputs.map(e=>e.id)),n=new Set(e.gates.map(e=>e.id)),c=new Set(e.outputs.map(e=>e.id)),l=e=>s.has(e)||n.has(e),h=new Set;for(let a of e.gates){for(let e of a.sources)h.add(e),c.has(e)?t.push('Gate "'.concat(a.id,'" takes "').concat(e,'", which is an output. An output is where a signal LEAVES the circuit, not something a gate can read â name the gate that output\'s `from` points at, and feed that to "').concat(a.id,'" instead.')):l(e)||t.push('Gate "'.concat(a.id,'" takes "').concat(e,'", which is not a declared signal. Add it to `inputs` or `gates`, or name one that is there.'));let e=o.includes(a.type);(e?1!==a.sources.length:a.sources.length<2)&&t.push(e?'Gate "'.concat(a.id,'" is a ').concat(a.type," with ").concat(a.sources.length," sources, but a ").concat(a.type," acts on exactly ONE signal. Give it the single signal it inverts, or use a gate that combines several."):'Gate "'.concat(a.id,'" is a ').concat(a.type," with ").concat(1===a.sources.length?"only one source":"no sources",", but a ").concat(a.type," COMBINES signals and needs at least two. Give it the signals the question feeds it â a ").concat(a.type," of one signal is just that signal."))}for(let a of(e=>{let t=new Map(e.map(e=>[e.id,e])),a=new Set,s=new Set,r=new Set,i=e=>{var n,o;if(!a.has(e)){if(s.has(e))return void r.add(e);for(let a of(s.add(e),null!=(o=null==(n=t.get(e))?void 0:n.sources)?o:[]))t.has(a)&&i(a);s.delete(e),a.add(e)}};for(let t of e)i(t.id);return[...r]})(e.gates))t.push('Gate "'.concat(a,'" depends on itself, through the chain of gates feeding it. That is a FEEDBACK loop â a flip-flop, a latch or anything else with memory â and this domain draws combinational circuits, whose signals run one way from the inputs to the outputs. Draw the combinational part, and describe the feedback in prose.'));for(let a of e.outputs)h.add(a.from),c.has(a.from)?t.push('Output "'.concat(a.id,'" comes from "').concat(a.from,'", which is another output. Name the gate that produces the signal.')):l(a.from)||t.push('Output "'.concat(a.id,'" comes from "').concat(a.from,'", which is not a declared signal. Name one of the gates in `gates`, or an input that passes straight through.'));for(let a of e.gates)h.has(a.id)||t.push('Gate "'.concat(a.id,'" feeds nothing: no other gate takes it and no output comes from it, so it dangles off the side of the circuit. Wire it into the gate that uses its result, declare an output for it, or drop it.'));for(let a of e.inputs)h.has(a.id)||t.push('Input "'.concat(a.id,'" feeds nothing, so it is drawn entering the circuit and going nowhere. Name it in the `sources` of the gate that acts on it, or drop it.'));return e.showTruthTable&&e.inputs.length>4&&t.push("The truth table was asked for, but the circuit has ".concat(e.inputs.length," inputs, which is ").concat(2**e.input
1s.length," rows â taller than the figure it sits beside. Set `showTruthTable` false and let the schematic stand on its own (at most ").concat(4," inputs can be tabulated).")),t}},54946:(e,t,a)=>{a.d(t,{vZ:()=>h});var s=a(3729),r=a(11209),i=a(7239),n=a(49222),o=a(89860),c=a(50054),l=a(51555);let h=s.gMt("domain",[r.u7,i.q,n.J,o.K,c.NM,l.I2])},59310:(e,t,a)=>{a.d(t,{D:()=>s,W:()=>r});let s=e=>e.includes("$")?'contains "$" (reserved delimiter)':e.includes('"')?"contains a double quote":/[\n\r]/.test(e)?"contains a line break":e.includes("#")?'contains "#" (reserved by MathJax)':(e.match(/{/g)||[]).length!==(e.match(/}/g)||[]).length?"has unbalanced { } braces":null,r=function(e,t,a){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new Set;if("string"==typeof e){let s=e.includes("$")?'contains "$" â labels here are plain text, not LaTeX. Write the symbol itself (α, Ï, Ï\xb2, xÌ, Å·).':/\\[a-zA-Z]/.test(e)?"contains a LaTeX command â labels here are plain text and would render the backslash literally. Use the Unicode character instead (\\alpha â α, \\sigma â Ï, \\chi^2 â Ï\xb2, \\bar{x} â xÌ, \\hat{y} â Å·).":/[\n\r]/.test(e)?"contains a line break":null;s&&a.push("".concat(t," ").concat(s))}else if(Array.isArray(e))e.forEach((e,i)=>r(e,"".concat(t,"[").concat(i,"]"),a,s));else if(e&&"object"==typeof e)for(let[i,n]of Object.entries(e))s.has(i)||r(n,t?"".concat(t,".").concat(i):i,a,s)}},62197:(e,t,a)=>{a.d(t,{A:()=>s});let s=a(3729).YjP().describe("A short label for the figure â a few words naming what it shows, not a sentence.")},89860:(e,t,a)=>{a.d(t,{K:()=>Y,t:()=>j});var s=a(3729);let r=s.Ikc({id:s.YjP().describe("A unique id for this species (letters, digits, underscore; must start with a letter)."),smiles:s.YjP().describe('The species as a SMILES string â the standard line notation. Examples: "O" water, "
1N" ammonia, "O=C=O" carbon dioxide, "CC(=O)O" acetic acid, "c1ccccc1" benzene, "[NH4+]" ammonium, "[O-]S(=O)(=O)[O-]" sulfate, "F[Xe](F)(F)F" xenon tetrafluoride. Write the structure the question is about, with formal charges in brackets where an atom carries one. Do NOT use atom-map numbers (":1"); they suppress implicit hydrogens and silently turn atoms into radicals.'),formula:s.YjP().describe('The MOLECULAR FORMULA of this species, written plainly with ordinary digits: "H2O", "CO", "C2H6O", "NO3". This is CHECKED against the structure your SMILES actually builds, and a mismatch is reported back to you â it is the safety net against a SMILES that parses cleanly but is the wrong molecule (writing "CO" for carbon monoxide builds METHANOL, "NO" builds hydroxylamine). Count every atom including hydrogens. Do not use subscripts.'),label:s.YjP().describe('A short caption drawn under this structure â the name or formula, e.g. "HâO", "cis-2-butene", "resonance form 1". Use "" for none. PLAIN TEXT, drawn exactly as written: write Ï, δ, â» and â as characters, never "$" or a backslash command.'),style:s.k5n(["lewis","skeletal"]).describe('How to draw it. "lewis" shows EVERY atom and every hydrogen with explicit bonds â use it for Lewis-structure, octet, lone-pair, formal-charge, geometry and small-molecule questions. "skeletal" uses the organic convention (carbons implicit at line vertices, hydrogens on carbon not drawn) â use it for organic structures, functional groups, isomers and anything with a ring or a chain of several carbons.'),note:s.YjP().describe('An optional short note drawn with this structure â a shape name ("seesaw", "trigonal pyramidal"), a role ("major product"), or "" for none. PLAIN TEXT.'),transitionState:s.zMY().describe("TRUE if this structure is a TRANSITION STATE: it is drawn inside square brackets with the â¡ mark, the way an activated complex is written. Give the half-formed and half-broken bonds in the figure's `partialBonds` so they are drawn dotted. False for a real species."),repeatUnit:s.zMY().describe('TRUE for a POLYMER repeat unit: the structure is drawn inside square brackets with a subscript n, the way a repeat unit is written. Mark the two open bonds where the chain continues with `*` in the SMILES â "*CC(C)*" is the repeat unit of poly(propene), "*CC(Cl)*" of PVC. The `formula` is then the formula of what is inside the brackets, counting no `*` (C3H6 for poly(propene)). False for an ordinary molecule.')}).strict(),i=s.Ikc({from:s.YjP().describe("Id of the species DONATING the hydrogen bond (the one with an H on N, O or F)."),to:s.YjP().describe("Id of the species ACCEPTING it (the one offering a lone pair).")}).strict(),n=s.Ikc({species:s.YjP().describe("Id of the species this end of the arrow is on."),what:s.k5n(["lonePair","piBond","bond","atom"]).describe('What the electrons come FROM or go TO. "lonePair" a lone pair on an atom (where a nucleophile\'s arrow starts). "piBond" the Ï electrons of a DOUBLE or triple bond (what attacks an electrophile, and what a carbonyl pushes onto its oxygen) â this also picks that bond out from the single bonds between the same elements, so use it whenever the pair you mean is a Ï pair. "bond" a single bonding pair, the bond that breaks. "atom" an atom itself, where an arrow ENDS when a new bond forms there (the electrophilic carbon, the H being taken).'),atom:s.YjP().describe('The element symbol of the atom, e.g. "O", "C", "Br". For a bond, ONE of its two atoms.'),other:s.YjP().describe('For a "bond", the element at its OTHER end â "C"+"Br" is the CâBr bond, "C"+"O" the C=O. For an atom or lone pair, use it to say WHICH one when the molecule has several of that element: "C" with other "O" is the carbon bonded to oxygen. ELEMENT SYMBOLS ONLY, never prose; join them with "-" to walk further out, one bond at a time, so "C-Br" is a carbon that itself carries a bromine â that is how an E2\'s β hydrogen ("C-C-Br") is told apart from its α ("C-Br"). "" when the atom is already unambiguous.'),charge:s.aig().int().describe("The formal charge on that atom, which is often what picks it out (the Oâ» of an alkoxide, the Câ» of cyanide). 0 if it carries none.")}
1).strict(),o=s.Ikc({from:n.describe("Where the electron pair comes FROM."),to:n.describe("Where it GOES."),label:s.YjP().describe('An optional short label for this arrow, e.g. "1", "attack", or "".')}).strict(),c=s.Ikc({kind:s.euz("molecules"),species:s.YOg(r).describe("The structures to draw, left to right. One for a single Lewis structure; several for resonance forms, isomers, a reaction, or two molecules interacting."),connector:s.k5n(["none","resonance","reaction","equilibrium"]).describe('What to draw BETWEEN consecutive structures. "resonance" a double-headed arrow (resonance contributors of ONE species), "reaction" a single arrow (reactants â products), "equilibrium" paired half-arrows, "none" for structures merely shown side by side (isomers, a comparison).'),showLonePairs:s.zMY().describe("Draw lone-pair dots. TRUE for Lewis-structure, octet, VSEPR, formal-charge and hydrogen-bonding questions. False for a plain organic skeleton where dots would only add clutter. The COUNT is computed for you â never try to state it."),showPartialCharges:s.zMY().describe("Mark δ+ / δâ on the ends of polar bonds. TRUE for polarity, dipole, electronegativity and intermolecular-force questions. Which end is which is worked out from electronegativity â you do not state it."),showBondDipoles:s.zMY().describe("Draw a crossed dipole ARROW along each polar bond, pointing at the more electronegative atom. TRUE when the question asks about bond dipoles, dipole moment, or why a molecule with polar bonds is or is not polar overall. The direction is computed from electronegativity."),showSigmaPi:s.zMY().describe("Label each bond Ï or Ï. TRUE when the question asks which bonds are sigma and which are pi, or counts them. A single bond is one Ï; a double is Ï+Ï; a triple is Ï+2Ï â all worked out for you."),hydrogenBonds:s.YOg(i).describe("Dashed hydrogen bonds drawn BETWEEN two species. Usually empty; give one for an intermolecular-force figure (e.g. two water molecules). The donor H and acceptor lone pair are chosen for you."),arrows:s.YOg(o).describe("Curved electron-pushing arrows â the whole content of a MECHANISM figure. Each one runs from a pair of electrons to where that pair ends up; give one per step of the mechanism the question asks about. Usually empty for a figure that is not a mechanism."),partialBonds:s.YOg(s.Ikc({from:n.describe("One end of the half-made bond."),to:n.describe("The other end.")}).strict()).describe('Bonds drawn DOTTED because they are half-formed or half-broken â what makes a drawing a TRANSITION STATE rather than a molecule. For an SN2 transition state, write the species as the two fragments in one SMILES ("[OH-].CBr") and give the O\xb7\xb7\xb7C bond that is forming and the C\xb7\xb7\xb7Br bond that is breaking. Set the species\' `transitionState` too, so it is drawn in the â¡ brackets. Note that `other` names an atom the site is ALREADY bonded to, so leave it "" for the ends of a bond that is still FORMING â they are not bonded yet. Usually empty.')}).strict(),l=s.Ikc({label:s.YjP().describe('The subshell, e.g. "1s", "2p", "3d", "4s".'),electrons:s.aig().int().describe("How many electrons occupy it (s holds 2, p 6, d 10, f 14). The boxes and the up/down arrows are drawn for you, filling by Hund's rule â you give the COUNT only.")}).strict(),h=s.Ikc({kind:s.euz("orbitals"),diagrams:s.YOg(s.Ikc({id:s.YjP().describe("A unique id for this diagram."),label:s.YjP().describe('What this configuration is, e.g. "Fe", "Cr (actual)", "Cr (expected)". PLAIN TEXT.'),element:s.YjP().describe('The element symbol this configuration is of, e.g. "Fe", "N". Your subshells\' electrons are COUNTED against it, so a species drawn with the wrong number of electrons is caught â which is the commonest way this figure is wrong, and it draws perfectly either way. Use "" only when the diagram is not of one specific atom.'),charge:s.aig().int().describe("The charge of the species: 0 for a neutral atom, 2 for Fe\xb2âº, â1 for Clâ». Electrons are counted against the ION. A cation loses its OUTERMOST electrons first â 4s before 3d, so Fe\xb2⺠is [Ar] 3dâ¶ with an empty 4s, not [Ar] 4s\xb2 3dâ´ â and getting that right is usually the whole question."),subshells:s.YOg(l).describe("The occupied subshells, in energy order.")}
1).strict()).describe("One orbital diagram, or two side by side to compare (an expected vs actual configuration).")}).strict(),d=s.Ikc({id:s.YjP().describe("A unique id for this energy level."),label:s.YjP().describe('What sits at this level, e.g. "C(s) + Oâ(g)", "COâ(g)", "n = 2". PLAIN TEXT.'),value:s.aig().describe("This level's energy, in the units named by `unitLabel`. Levels are placed vertically in proportion to these â state the values the question gives and no others.")}).strict(),u=s.Ikc({from:s.YjP().describe("Id of the level the arrow starts at."),to:s.YjP().describe("Id of the level it ends at."),label:s.YjP().describe('What the arrow represents, e.g. "ÎH = â393 kJ/mol", "ionisation energy". PLAIN TEXT â write Î and â» as characters, never a backslash command.')}).strict(),g=s.Ikc({kind:s.euz("levels"),levels:s.YOg(d).describe("The horizontal energy levels, e.g. reactants, intermediates and products of a Hess-law or Born-Haber cycle, or an atom's n = 1, 2, 3 shells."),transitions:s.YOg(u).describe("Labelled arrows between levels â each enthalpy step of a cycle, or an electron transition."),unitLabel:s.YjP().describe('The energy axis label, e.g. "Enthalpy (kJ/mol)", "Energy (eV)". PLAIN TEXT.')}).strict(),p=s.Ikc({label:s.YjP().describe('What the reaction is at this point â "reactants", "CHâBr + OHâ»", "transition state", "intermediate", "products". Use "" to leave a peak unnamed. PLAIN TEXT.'),energy:s.aig().describe("This point's energy. Only the RELATIVE values matter â they set the shape of the curve. Use the numbers the question gives; if it gives none, choose any values that put the peaks and valleys in the right order."),transitionState:s.zMY().describe("TRUE for a PEAK (a transition state / activated complex), FALSE for a VALLEY (reactants, an intermediate, products). A path alternates valley, peak, valley, ⦠â it must begin and end in a valley, and every peak must be higher than the valleys on either side of it.")}).strict(),m=s.Ikc({id:s.YjP().describe("A unique id for this path."),label:s.YjP().describe('What this path is, when there are two to tell apart â "uncatalysed", "with catalyst", "" for a single path. PLAIN TEXT.'),stages:s.YOg(p).describe("The stationary points along the reaction, left to right: reactants, the transition state, products â with an extra peak and valley for each further step of a multi-step mechanism.")}).strict(),b=s.Ikc({kind:s.euz("profile"),paths:s.YOg(m).describe("One reaction path, or two drawn on the same axes to compare â catalysed against uncatalysed is the usual pair. Two paths must start and end at the same energies: a catalyst lowers the barrier, it does not change ÎH."),showActivationEnergy:s.zMY().describe("Mark the activation energy of each barrier with a measured arrow. TRUE for anything about Ea, catalysts or the rate-determining step. The VALUE is computed from your energies â never state it in a label."),showReverseActivationEnergy:s.zMY().describe("Also mark the REVERSE activation energy â the climb from the products back up to the same peak. TRUE whenever the question involves the reverse reaction, an equilibrium, or reading ÎH as Ea(forward) â Ea(reverse). Its value is computed too."),showEnthalpyChange:s.zMY().describe("Mark the overall ÎH from reactants to products, and say whether the reaction is exothermic or endothermic. Both are computed from your energies."),unitLabel:s.YjP().describe('The energy axis label, e.g. "Potential energy (kJ/mol)". Leave it "" when the question gives NO numbers â the axis is then drawn unscaled and the arrows are labelled "Ea" and "ÎH" with no values, so the figure never invents data the question did not give.')}).strict(),f=s.Ikc({subshell:s.YjP().describe('Which subshell these electrons came from, e.g. "1s", "2p", "3s".'),bindingEnergy:s.aig().describe("Its binding energy in the units named by `unitLabel` â the value the question gives, or the standard one for that element. Use 0 for every peak when the question gives no numbers: the peaks are then spread out evenly and no values are printed, so the figure never invents data. The horizontal axis and the order of the peaks are worked out from these."),electrons:s.aig().int().describe("How many electrons that subshell holds (s at most 2, p at most 6, d at most 10). This is the peak's HEIGHT â which is the whole point of a PES figure, so it must be the real occupancy.")}
1).strict(),y=s.Ikc({kind:s.euz("spectrum"),spectra:s.YOg(s.Ikc({id:s.YjP().describe("A unique id for this spectrum."),element:s.YjP().describe('The element symbol, e.g. "Cl". Its ground-state configuration is CHECKED against your peaks, so a spectrum that does not add up to that element is reported back to you. Use "" for an unknown element the student is being asked to identify â but if you know which element it is, name it and let the check run.'),charge:s.aig().int().describe("The charge of the species this spectrum is of: 0 for a neutral atom, +1 for Naâº, â2 for O\xb2â». The peaks are checked against the electrons the ION has, so a cation's spectrum simply LOSES its outermost peak â which is usually the whole point of the question."),label:s.YjP().describe('What to write above this spectrum, e.g. "chlorine", "Naâº", "unknown element". PLAIN TEXT.'),peaks:s.YOg(f).describe("One peak per occupied subshell, in any order.")}).strict()).describe("One photoelectron spectrum, or two side by side to compare two elements."),unitLabel:s.YjP().describe('The binding-energy axis label, e.g. "Binding energy (MJ/mol)". PLAIN TEXT.')}).strict(),w=s.Ikc({kind:s.euz("mo"),diagrams:s.YOg(s.Ikc({id:s.YjP().describe("A unique id for this diagram."),label:s.YjP().describe('What this species is, e.g. "Oâ", "Heâ", "Oââ»". PLAIN TEXT. Use "" to let the formula be written for you.'),atomA:s.YjP().describe('One atom of the diatomic, as an element symbol, e.g. "O". Both atoms must come from the same period â period 1 (H, He) or period 2 (Liâ¦Ne).'),atomB:s.YjP().describe('The other atom, e.g. "O" for Oâ, "N" for CNâ».'),charge:s.aig().int().describe("The ion's overall charge, 0 for a neutral molecule. â1 adds an electron, +1 removes one.")}).strict()).describe("One molecular-orbital diagram, or several side by side to compare (Oââº, Oâ, Oââ», Oâ\xb2â»; Hâ against Heâ).")}).strict(),v=s.Ikc({kind:s.euz("shells"),element:s.YjP().describe('The element symbol for a Bohr shell model, e.g. "Na", "Cl", "O". The number of electrons in each shell is worked out from the element â you give the symbol only.'),charge:s.aig().int().describe("The ion's charge, or 0 for a neutral atom. Electrons are added or removed accordingly.")}).strict(),k=s.gMt("kind",[c,h,g,v,b,y,w]);var T=a(59310),x=a(14131),A=a(62197);let Y=s.Ikc({domain:s.euz("chemistry"),title:A.A,figure:k.describe("The figure itself â pick the kind that fits what the question needs to show.")}).strict().describe("A chemistry figure: molecular structures (Lewis or skeletal, with resonance, mechanism arrows or polymer brackets), an orbital box diagram, a Bohr shell model, an energy-level ladder, a reaction-coordinate profile, a photoelectron spectrum, or a molecular-orbital diagram. No coordinates anywhere â the structures are laid out, and lone pairs, charges, hydrogens, orbital filling and bond order all worked out, by the renderer."),E={s:2,p:6,d:10,f:14},O=e=>{let t=e.trim(),a=t.slice(-1).toLowerCase(),s=E[a],r=Number.parseInt(t,10);return void 0===s||!Number.isFinite(r)||r<1?{error:'"'.concat(e,'" does not name a subshell â use a shell number followed by s, p, d or f (e.g. "2p").')}:"spdf".indexOf(a)>=r?{error:'"'.concat(e,'" is not a subshell that exists: shell ').concat(r," has only ").concat("spdf".slice(0,r).split("").join(", "),".")}:{capacity:s}},I=e=>{let t=e.trim().replace(/[â°Â¹Â²Â³â´]/g,e=>"01234"["â°\xb9\xb2\xb3â´".indexOf(e)]).replace(/[âºâ»]/g,e=>"âº"===e?"+":"-").match(/(\d*)\s*([+-])$/);if(!t)return;let a=t[1]?Number.parseInt(t[1],10):1;return"+"===t[2]?a:-a},P=(e,t)=>{let a=new Set,s=new Set;for(let t of e)a.has(t)&&s.add(t),a.add(t);return[...s].map(e=>"Duplicate ".concat(t,' id "').concat(e,'": each one needs its own id.'))},q=(e,t)=>e.filter(e=>!x.Y.test(e)).map(e=>"".concat(t,' id "').concat(e,'" is not a valid identifier (letters, digits, underscore; must start with a letter or underscore).')),j=e=>{var t,a,s,r,i,n;let o=[];(0,T.W)(e,"",o,new Set(["smiles","id"]));let c=e.figure;if("molecules"===c.kind){let e=c.species.map(e=>e.id);0===c.species.length&&o.push("Figure is empty: give at least one species to draw."),o.push(...q(e,"Species"),...P(e,"species"));let i=new Set(e);null==(t=c.hydrogenBonds)||t.forEach((e,t)=>{i.has(e.from)||o.push("hydrogenBonds[".concat(t,'].from references unknown species "').concat(e.from,'".')),i.has(e.to)||o.push("hydrogenBonds[".concat(t,'].to references unknown species "').concat(e.to,'".')),e.from===e.to&&o.push("hydrogenBonds[".concat(t,'] joins species "').concat(e.from,'" to itself â a hydrogen bond is drawn BETWEEN two different species.'))}),[...(null!=(a=c.arrows)?a:[]).map((e,t)=>["arrows[".concat(t,"]"),e]),...(null!=(s=c.partialBonds)?s:[]).map((e,t)=>
1["partialBonds[".concat(t,"]"),e])].forEach(e=>{let[t,a]=e;for(let[e,s]of[["from",a.from],["to",a.to]])i.has(s.species)||o.push("".concat(t,".").concat(e,' references unknown species "').concat(s.species,'".'))});let n=c.species.filter(e=>e.transitionState);return n.length>0&&0===(null!=(r=c.partialBonds)?r:[]).length&&o.push('species "'.concat(n[0].id,'" is marked as a transition state but no `partialBonds` are given, so it would be drawn as an ordinary molecule inside â¡ brackets. Give the bonds that are forming and breaking.')),c.species.forEach((e,t)=>{e.repeatUnit&&!e.smiles.includes("*")&&o.push("species[".concat(t,'] ("').concat(e.id,'") is marked as a repeat unit but its SMILES has no open bond. Put a `*` where the chain continues at each end â "*CC(C)*" for poly(propene), "*CC(Cl)*" for PVC.'))}),"none"!==c.connector&&c.species.length<2&&o.push('connector is "'.concat(c.connector,'" but there is only one species â an arrow is drawn between structures, so give at least two (or use "none").')),o}if("orbitals"===c.kind){0===c.diagrams.length&&o.push("Figure is empty: give at least one orbital diagram.");let e=c.diagrams.map(e=>e.id);return o.push(...q(e,"Diagram"),...P(e,"diagram")),c.diagrams.forEach((e,t)=>{0===e.subshells.length&&o.push("diagrams[".concat(t,'] ("').concat(e.label,'") has no subshells.'));let a=I(e.label);void 0!==a&&a!==e.charge&&o.push("diagrams[".concat(t,'] is titled "').concat(e.label,'", a charge of ').concat(a,", but its `charge` is ").concat(e.charge,". The electrons are counted against `charge`, so the boxes would be filled for a different species than the title claims.")),o.push(...P(e.subshells.map(e=>e.label.trim()),"subshell")),e.subshells.forEach((e,a)=>{let s=e.label.trim().slice(-1).toLowerCase(),r=O(e.label);if("error"in r)return void o.push("diagrams[".concat(t,"].subshells[").concat(a,"]: ").concat(r.error));let i=r.capacity;(e.electrons<0||e.electrons>i)&&o.push("diagrams[".concat(t,"].subshells[").concat(a,'] ("').concat(e.label,'") holds ').concat(e.electrons," electrons, but ").concat(s," holds at most ").concat(i,"."))})}),o}if("shells"===c.kind)return o;if("spectrum"===c.kind){let e=c.spectra.map(e=>e.id);if(0===c.spectra.length&&o.push("Figure is empty: give at least one spectrum."),o.push(...q(e,"Spectrum"),...P(e,"spectrum")),c.spectra.forEach((e,t)=>{let a="spectra[".concat(t,"]").concat(e.label?' ("'.concat(e.label,'")'):"");0===e.peaks.length&&o.push("".concat(a," has no peaks.")),o.push(...P(e.peaks.map(e=>e.subshell.trim()),"peak subshell")),e.peaks.forEach((e,t)=>{let s=e.subshell.trim().slice(-1).toLowerCase(),r=O(e.subshell);if("error"in r)return void o.push("".concat(a,".peaks[").concat(t,"]: ").concat(r.error));let i=r.capacity;(e.electrons<1||e.electrons>i)&&o.push("".concat(a,".peaks[").concat(t,'] ("').concat(e.subshell,'") is drawn for ').concat(e.electrons," electrons, but ").concat(s," holds 1 to ").concat(i,".")),e.bindingEnergy<0&&o.push("".concat(a,".peaks[").concat(t,'] has a negative binding energy â binding energies are positive, and 0 means "not given".'))});let s=e.peaks.filter(e=>0===e.bindingEnergy).length;s>0&&s<e.peaks.length&&o.push("".concat(a," gives a binding energy for some peaks and 0 for others. Give every peak its value, or give 0 for all of them and the peaks are spread evenly with no scale."))}),c.spectra.length>1){let e=c.spectra.filter(e=>e.peaks.some(e=>e.bindingEnergy>0)).length;0===e?o.push("Two spectra are drawn to be compared, but every binding energy is 0, so the peaks are placed in shell order and both elements' 1s peaks land at the same spot. Give each peak its binding energy (the standard MJ/mol values are fine) so the shift between the elements is visible."):e<c.spectra.length&&o.push("Some spectra in this figure give binding energies and others give 0 for every peak. The spectra share one energy axis, which is built from the values that exist, so the spectrum without them cannot be placed on it. Give every spectrum its binding energies, or give none of them.")}return o}if("mo"===c.kind){let e=c.diagrams.map(e=>e.id);return 0===c.diagrams.length&&o.push("Figure is empty: give at least one molecular-orbital diagram."),o.push(...q(e,"Diagram"),...P(e,"diagram")),c.diagrams.forEac
1h((e,t)=>{let a=I(e.label);void 0!==a&&a!==e.charge&&o.push("diagrams[".concat(t,'] is titled "').concat(e.label,'", a charge of ').concat(a,", but its `charge` is ").concat(e.charge,". The ladder is filled from `charge`, so the diagram would be drawn for a different ion than the one it is titled."))}),o}if("profile"===c.kind){let t=c.paths.map(e=>e.id);0===c.paths.length&&o.push("Figure is empty: give at least one reaction path."),o.push(...q(t,"Path"),...P(t,"path")),c.paths.forEach((e,t)=>{let a="paths[".concat(t,"]").concat(e.label?' ("'.concat(e.label,'")'):""),s=e.stages;if(s.length<3)return void o.push("".concat(a," has ").concat(s.length," stage(s): a reaction profile needs at least reactants, a transition state and products."));(s[0].transitionState||s[s.length-1].transitionState)&&o.push("".concat(a," begins or ends on a transition state. A profile starts at the reactants and ends at the products â both are valleys (transitionState false).")),s.some(e=>e.transitionState)||o.push("".concat(a," has no transition state: every stage is a valley, so no activation energy can be marked. Set `transitionState: true` on the stage at the top of each barrier.")),s.forEac
1h((e,t)=>{/transition state|activated complex/i.test(e.label)&&!e.transitionState&&o.push("".concat(a,": stage ").concat(t,' is labelled "').concat(e.label,'" but has `transitionState: false`, so it would be drawn as a valley. A transition state is a peak.')),e.transitionState&&/^(reactants?|products?|intermediate)$/i.test(e.label.trim())&&o.push("".concat(a,": stage ").concat(t,' is labelled "').concat(e.label,'" but flagged as a transition state. Reactants, products and intermediates are valleys.'))}),s.forEach((e,t)=>{if(!e.transitionState&&t>0&&t<s.length-1&&e.energy>s[t-1].energy&&e.energy>s[t+1].energy&&o.push("".concat(a,": stage ").concat(t,' ("').concat(e.label,'") is at energy ').concat(e.energy,", above both of its neighbours, so it is the top of a barrier â but `transitionState` is false and it would be drawn as a valley. Set `transitionState: true`, or lower its energy below its neighbours if it is meant to be an intermediate.")),!e.transitionState)return;if(t>0&&s[t-1].transitionState)return void o.push("".concat(a,": stages ").concat(t-1," and ").concat(t," are both transition states. Peaks are separated by valleys â put the intermediate between them."));let r=[s[t-1],s[t+1]].filter(e=>void 0!==e),i=Math.max(...r.map(e=>e.energy));r.length>0&&e.energy<=i&&o.push("".concat(a,": the transition state at stage ").concat(t,' ("').concat(e.label,'") has energy ').concat(e.energy,", but the stage next to it is at ").concat(i,". A transition state is the HIGHEST point of its step â give it an energy above both of its neighbours."))})});let a=null==(i=c.paths[0])?void 0:i.stages[0],s=null==(n=c.paths[0])?void 0:n.stages[c.paths[0].stages.length-1];if(a&&s&&a!==s){let t=s.energy-a.energy,r=/exothermic/i.test(e.title),i=/endothermic/i.test(e.title);if(r!==i&&0!==t){let e=t<0?"exothermic":"endothermic";(r&&"exothermic"!==e||i&&"endothermic"!==e)&&o.push("The title calls this reaction ".concat(r?"exothermic":"endothermic",", but the products are drawn ").concat(t>0?"ABOVE":"BELOW"," the reactants, so the figure says ").concat(e," â and prints that word itself. Put the products on the side that matches."))}let n=e.title.match(/ÎH\s*=\s*([+â-]?\d+(?:\.\d+)?)/);if(n&&c.unitLabel.trim()){let e=Number(n[1].replace("â","-"));Number.isFinite(e)&&Math.abs(e-t)>.51&&o.push("The title states ÎH = ".concat(n[1],", but the energies you gave put the products ").concat(t," from the reactants, and that computed value is what the figure draws and labels. Make the energies match the ÎH the question gives."))}}let r=e=>/uncatalys|without a? ?catalyst|no catalyst/i.test(e),l=c.paths.filter(e=>/catalys|enzyme/i.test(e.label)&&!r(e.label)),h=c.paths.filter(e=>r(e.label));if(1===l.length&&1===h.length){let e=e=>Math.max(...e.stages.map(e=>e.energy));e(l[0])>=e(h[0])&&o.push('"'.concat(l[0].label,'" peaks at ').concat(e(l[0]),' and "').concat(h[0].label,'" at ').concat(e(h[0]),", so the catalysed route is drawn needing at least as much activation energy as the uncatalysed one. A catalyst offers a path over a LOWER barrier â that is what the figure exists to show."))}let d=c.paths.filter(e=>e.stages.length>0).map(e=>[e.stages[0].energy,e.stages[e.stages.length-1].energy]);return d.length>1&&d.some(e=>
1{let[t,a]=e;return t!==d[0][0]||a!==d[0][1]})&&o.push("The paths start or end at different energies. Paths share one pair of axes to compare routes between the SAME reactants and products â a catalyst lowers the barrier and leaves ÎH unchanged â so give every path the same first and last energy."),o}let l=c.levels.map(e=>e.id);0===c.levels.length&&o.push("Figure is empty: give at least one energy level."),o.push(...q(l,"Level"),...P(l,"level"));let h=new Set(l);return c.transitions.forEach((e,t)=>{h.has(e.from)||o.push("transitions[".concat(t,'].from references unknown level "').concat(e.from,'".')),h.has(e.to)||o.push("transitions[".concat(t,'].to references unknown level "').concat(e.to,'".')),e.from===e.to&&o.push("transitions[".concat(t,'] runs from level "').concat(e.from,'" to itself â an arrow must join two different levels.'))}),c.levels.length>1&&1===new Set(c.levels.map(e=>e.value)).size&&o.push("Every level has the same energy, so they would all be drawn on top of each other â give each the value the question states."),o}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.