1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6327],{23237:(e,r,t)=>{t.d(r,{A:()=>k});var n=t(95155),a=t(12115),i=t(19221),o=t(44401),l=t(67295),s=t(85412),c=t(45917),u=t(21227),d=t(74052),x=t(69422),y=t(36892),h=t(74952),p=t(38318),f=t(82623),g=t(43084),v=t(47758),w=t(64248),b=t(86102);let m={x:70,y:20,width:500,height:360};function k(e){let{graphId:r,interactive:t=!0,withPriceControls:s=!1}=e,k=(0,d.useSupplyDemandStore)(),P=(0,x.useADASStore)(),A=(0,y.useMoneyMarketStore)(),E=(0,h.useLoanableFundsStore)(),D=(0,p.usePhillipsCurveStore)(),C=(0,f.useExchangeRateStore)(),S=(0,g.useFactorMarketsStore)(),j=(0,v.useFiscalPolicyStore)(),R=(0,w.usePPCStore)(),L=(0,b.useInternationalTradeStore)(),_=u.DRAW_ADAPTERS[r],{lineCurves:U,verticalValues:W}=(0,a.useMemo)(()=>{let e={},t={};switch(r){case"supply-demand":e.demand=k.demand,e.supply=k.supply;break;case"adas":e.ad=P.ad,e.sras=P.sras,t.lras=P.lrasY;break;case"monetary-policy":e.md=A.md,t.ms=A.msQuantity;break;case"loanable-funds":e.demand=E.demand,e.supply=E.supply;break;case"phillips-curve":e.srpc=D.srpc,t.lrpc=D.naturalRate;break;case"exchange-rates":e.demand=C.demand,e.supply=C.supply;break;case"factor-markets":e.laborDemand=S.laborDemand,e.laborSupply=S.laborSupply;break;case"fiscal-policy":e.ad=j.ad,e.sras=j.sras,t.lras=j.lrasY;break;case"international-trade":e.demand=L.domesticDemand,e.supply=L.domesticSupply}return{lineCurves:e,verticalValues:t}},[r,k,P,A,E,D,C,S,j,L]),q=(0,a.useCallback)((e,r)=>_.shift(e,r),[_]),F=_.lines.map(e=>({id:e.key,curve:U[e.key],color:e.color,label:e.label,draggable:t,onShift:t?r=>q(e.key,r):void 0})),B="monetary-policy"===r?(0,c.UO)({x:A.msQuantity,y:A.interestRate},m,_.domain):null;return(0,n.jsxs)(i.Ay,{curves:F,domain:_.domain,xLabel:_.xLabel,yLabel:_.yLabel,equilibriumPair:_.equilibriumPair,showEquilibrium:!!_.equilibriumPair,priceControls:s&&"supply-demand"===r?[{type:"floor",price:k.priceFloor,onPriceChange:k.setPriceFloor,visible:k.showPriceFloor},{type:"ceiling",price:k.priceCeiling,onPriceChange:k.setPriceCeiling,visible:k.showPriceCeiling}]:void 0,children:[_.verticals.map(e=>(0,n.jsx)(o.A,{xValue:W[e.key],color:e.color,label:e.label,graphArea:m,domain:_.domain,draggable:t,onShift:t?r=>q(e.key,r):void 0},e.key)),B&&A.interestRate>0&&(0,n.jsx)("circle",{cx:B.x,cy:B.y,r:5,fill:"var(--graph-equilibrium)",stroke:"white",strokeWidth:2}),"international-trade"===r&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.A,{yValue:L.worldPrice,color:"#14B8A6",label:"Pw",graphArea:m,domain:_.domain,draggable:t,onChange:t?e=>L.setWorldPrice(e):void 0}),(0,n.jsx)(l.A,{yValue:L.worldPrice+L.tariff,color:"#A855F7",label:"Pw + t",graphArea:m,domain:_.domain,visible:L.tariff>.5,dashed:!0,draggable:t,onChange:t?e=>L.setTariff(e-L.worldPrice):void 0})]}),"ppc"===r&&(0,n.jsx)(M,{interactive:t,domain:_.domain,maxX:R.maxX,maxY:R.maxY})]})}function M(e){let{interactive:r,domain:t,maxX:a,maxY:i}=e,o=(0,s.Q)({viewBoxWidth:600,viewBoxHeight:450,onDrag:e=>{let r=e.x/m.width*(t.xMax-t.xMin);u.DRAW_ADAPTERS.ppc.shift("frontier",r)}}),l=[];for(let e=0;e<=60;e++){let r=e/60*a;l.push((0,c.UO)({x:r,y:(0,w.yOnPPC)(r,a,i)},m,t))}let d=(0,c.cE)(l);return(0,n.jsxs)("g",{children:[(0,n.jsx)("path",{d:d,fill:"none",stroke:"#3B82F6",strokeWidth:o.isDragging?3:2.5}),(0,n.jsx)("path",{ref:o.targetRef,d:d,fill:"none",stroke:"transparent",strokeWidth:24,strokeLinecap:"round",pointerEvents:r?"stroke":"none",onPointerDown:r?o.handlePointerDown:void 0,style:{cursor:r?o.isDragging?"grabbing":"grab":"default",touchAction:"none"}}),l.length>0&&(0,n.jsx)("text",{x:l[Math.floor(.7*l.length)].x+12,y:l[Math.floor(.7*l.length)].y-8,fontSize:11,fontWeight:700,fill:"#3B82F6",fontFamily:"var(--font-inter), system-ui, sans-serif",children:"PPC"})]})}},44401:(e,r,t)=>{t.d(r,{A:()=>o});var n=t(95155),a=t(12115),i=t(45917);function o(e){let{xValue:r,color:t,label:o,graphArea:l,domain:s,visible:c=!0,dashed:u=!1,draggable:d=!0,onShift:x}=e,[y,h]=(0,a.useState)(!1),p=(0,a.useRef)(null),f=(0,a.useRef)(0),g=(0,a.useRef)(null),v=(0,i.qE)(r,s.xMin,s.xMax),w=(0,i.UO)({x:v,y:s.yMax},l,s),b=(0,i.UO)({x:v,y:s.yMin},l,s),m=9*o.length+14,k=(0,i.qE)(w.x+6,l.x+4,l.x+l.width-m-4),M=l.y+4,P=(0,a.useCallback)(e=>{var r;let t=null==(r=g.current)?void 0:r.closest("svg");if(!t)return{x:0,y:0};let n=t.getBoundingClientRect();return{x:(e.clientX-n.left)*(600/n.width),y:(e.clientY-n.top)*(450/n.height)}},[]),A=(0,a.useCallback)(e=>{if(!d||!x)return;e.preventDefault(),e.stopPropagation(),h(!0),p.current=P(e),f.current=0,e.currentTarget.setPointerCapture(e.pointerId);let t=e=>{if(!p.current)return;let t=(0,i.Ux)(p.current,l,s),n=(0,i.Ux)(P(e),l,s),a=(0,i.qE)(n.x-t.x,s.xMin-r,s.xMax-r),o=a-f.current;Math.abs(o)>.001&&(x(o),f.current=a)},n=()=>{h(!1),p.current=null,f.current=0,window.removeEventListener("pointermove",t),window.removeEventListener("pointerup",n),window.removeEventListener("pointercancel",n)};window.addEventListener("pointermove",t),window.addEventListener("pointerup",n),window.addEventListener("pointercancel",n)},[d,x,P,l,s,r]),E=(s.xMax-s.xMin)*.04,D=(0,a.useCallback)(e=>{if(!d||!x)return;let t=0;switch(e.key){case"ArrowRight":case"ArrowUp":t=E;break;case"ArrowLeft":case"ArrowDown":t=-E;break;case"PageUp":t=2.5*E;break;case"PageDown":t=-(2.5*E);break;case"Home":t=s.xMin-r;break;case"End":t=s.xMax-r;break;default:return}e.preventDefault(),x((0,i.qE)(t,s.xMin-r,s.xMax-r))},[d,x,E,s,r]),C=Math.round(v);return(0,n.jsxs)("g",{ref:g,onPointerDown:A,...d&&x&&c?{role:"slider",tabIndex:0,"aria-label":"".concat(o,". Use arrow keys to shift"),"aria-orientation":"horizontal","aria-valuemin":Math.round(s.xMin),"aria-valuemax":Math.round(s.xMax),"aria-valuenow":C,"aria-valuetext":"".concat(o," at ").concat(C),onKeyDown:D}:{},style:{opacity:+!!c,transition:"opacity 0.2s",cursor:d?y?"grabbing":"grab":"default",touchAction:"none"},pointerEvents:c?"auto":"none",children:[(0,n.jsx)("line",{x1:w.x,y1:w.y,x2:b.x,y2:b.y,stroke:t,strokeWidth:y?3:2.5,strokeDasharray:u?"6 4":void 0}),d&&(0,n.jsx)("line",{x1:w.x,y1:w.y,x2:b.x,y2:b.y,stroke:"transparent",strokeWidth:24,pointerEvents:"stroke"}),(0,n.jsx)("rect",{x:k,y:M,width:m,height:20,rx:4,fill:t,opacity:.9}),(0,n.jsx)("text",{x:k+m/2,y:M+14,textAnchor:"middle",fontSize:11,fontWeight:700,fill:"white",fontFamily:"var(--font-inter), system-ui, sans-serif",children:o})]})}}
1,49132:(e,r,t)=>{t.d(r,{$4:()=>c,Ay:()=>s,FX:()=>d,JO:()=>l,M0:()=>o,Re:()=>i,Rz:()=>u});var n=t(12973);function a(e,r){let t=0,a=()=>{if("function"==typeof window.va)return void(0,n.u4)(e,r);++t>20||setTimeout(a,100)};a()}function i(e,r){a("share_link_created",{graph:e,method:r})}function o(e){a("share_link_opened",{graph:e})}function l(e){a("predict_assigned",{scenario:e})}function s(e,r){a("predict_submitted",{scenario:e,outcome:r})}function c(e,r){a("graph_exported",{graph:e,format:r})}function u(e){a("teacher_referral_started",{surface:e})}function d(e,r){a("activity_template_".concat(e),{course:r})}},67295:(e,r,t)=>{t.d(r,{A:()=>l});var n=t(95155),a=t(12115),i=t(45917),o=t(85412);function l(e){let{yValue:r,color:t,label:l,graphArea:s,domain:c,visible:u=!0,dashed:d=!1,draggable:x=!0,onChange:y}=e,h=(0,i.qE)(r,c.yMin,c.yMax),p=(0,i.UO)({x:c.xMin,y:h},s,c),f=(0,i.UO)({x:c.xMax,y:h},s,c),g=7*l.length+14,v=(0,i.qE)(f.x-g-6,s.x+4,s.x+s.width-g-4),w=(0,i.qE)(p.y-24,s.y+4,s.y+s.height-24),b=(0,a.useCallback)((e,t,n)=>{if(!y)return;let a=(0,i.Ux)(n,s,c),o=(0,i.qE)(a.y,c.yMin,c.yMax);y(o);let l=c.yMax-c.yMin;return{x:t.x,y:-((o-r)/l)*s.height}},[c,s,y,r]),m=(0,o.Q)({viewBoxWidth:600,viewBoxHeight:450,onDrag:b}),k=(c.yMax-c.yMin)*.04,M=(0,a.useCallback)(e=>{if(!y)return;let r=0;switch(e.key){case"ArrowRight":case"ArrowUp":r=k;break;case"ArrowLeft":case"ArrowDown":r=-k;break;case"PageUp":r=2.5*k;break;case"PageDown":r=-(2.5*k);break;case"Home":r=c.yMin-h;break;case"End":r=c.yMax-h;break;default:return}e.preventDefault(),y((0,i.qE)(h+r,c.yMin,c.yMax))},[y,k,c,h]);if(!u)return null;let P=Math.round(h);return(0,n.jsxs)("g",{ref:m.targetRef,onPointerDown:x&&y?m.handlePointerDown:void 0,...x&&y?{role:"slider",tabIndex:0,"aria-label":"".concat(l,". Use arrow keys to move"),"aria-orientation":"vertical","aria-valuemin":Math.round(c.yMin),"aria-valuemax":Math.round(c.yMax),"aria-valuenow":P,"aria-valuetext":"".concat(l," at ").concat(P),onKeyDown:M}:{},style:{cursor:x&&y?m.isDragging?"grabbing":"grab":"default",touchAction:"none"},children:[(0,n.jsx)("line",{x1:p.x,y1:p.y,x2:f.x,y2:f.y,stroke:t,strokeWidth:m.isDragging?2.8:2,strokeDasharray:d?"8 4":void 0}),x&&y&&(0,n.jsx)("line",{x1:p.x,y1:p.y,x2:f.x,y2:f.y,stroke:"transparent",strokeWidth:24,pointerEvents:"stroke"}),(0,n.jsx)("rect",{x:v,y:w,width:g,height:20,rx:4,fill:t,opacity:.92}),(0,n.jsx)("text",{x:v+g/2,y:w+14,textAnchor:"middle",fontSize:10,fontWeight:700,fill:"white",fontFamily:"var(--font-inter), system-ui, sans-serif",children:l})]})}},84878:(e,r,t)=>{t.d(r,{e:()=>l,u:()=>o});var n=t(95155),a=t(12115);let i=(0,a.createContext)({});function o(e){let{downloadName:r,children:t}=e;return(0,n.jsx)(i.Provider,{value:{downloadName:r},children:t})}function l(){return(0,a.useContext)(i)}},85412:(e,r,t)=>{t.d(r,{Q:()=>a});var n=t(12115);function a(e){let{viewBoxWidth:r,viewBoxHeight:t,onDrag:a}=e,[i,o]=(0,n.useState)(!1),l=(0,n.useRef)(null),s=(0,n.useRef)({x:0,y:0}),c=(0,n.useRef)(null),u=(0,n.useCallback)(e=>{var n;let a=null==(n=c.current)?void 0:n.closest("svg");if(!a)return{x:0,y:0};let i=a.getBoundingClientRect();return{x:(e.clientX-i.left)*(r/i.width),y:(e.clientY-i.top)*(t/i.height)}},[t,r]);return{isDragging:i,targetRef:c,handlePointerDown:(0,n.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),o(!0),l.current=u(e),s.current={x:0,y:0},e.currentTarget.setPointerCapture(e.pointerId);let r=e=>{if(!l.current)return;let r=u(e),t={x:r.x-l.current.x,y:r.y-l.current.y},n={x:t.x-s.current.x,y:t.y-s.current.y};if(Math.abs(n.x)>.001||Math.abs(n.y)>.001){let e=a(n,t,r,l.current);s.current=null!=e?e:t}},t=()=>{o(!1),l.current=null,s.current={x:0,y:0},window.removeEventListener("pointermove",r),window.removeEventListener("pointerup",t),window.removeEventListener("pointercancel",t)};window.addEventListener("pointermove",r),window.addEventListener("pointerup",t),window.addEventListener("pointercancel",t)},[u,a])}}}}]);
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.