PageSourceSearch

https://www.planetparasol.ai/_next/static/chunks/74.b988e19870308e9f.js

js planetparasol.ai collected 2026-10-03 23:43:50 UTC 9,041 bytes, 11 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[74],{55074:function(e,a,r){r.r(a),r.d(a,{VariableInjectionModal:function(){return VariableInjectionModal}});var t=r(85893),i=r(22042),l=r(91373);/**
2 * @license lucide-react v0.427.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */let n=(0,l.Z)("SlidersVertical",[["line",{x1:"4",x2:"4",y1:"21",y2:"14",key:"1p332r"}],["line",{x1:"4",x2:"4",y1:"10",y2:"3",key:"gb41h5"}],["line",{x1:"12",x2:"12",y1:"21",y2:"12",key:"hf2csr"}],["line",{x1:"12",x2:"12",y1:"8",y2:"3",key:"1kfi7u"}],["line",{x1:"20",x2:"20",y1:"21",y2:"16",key:"1lhrwl"}],["line",{x1:"20",x2:"20",y1:"12",y2:"3",key:"16vvfq"}],["line",{x1:"2",x2:"6",y1:"14",y2:"14",key:"1uebub"}],["line",{x1:"10",x2:"14",y1:"8",y2:"8",key:"1yglbp"}],["line",{x1:"18",x2:"22",y1:"16",y2:"16",key:"1jxqpz"}]]);var o=r(67369);/**
7 * @license lucide-react v0.427.0 - ISC
8 *
9 * This source code is licensed under the ISC license.
10 * See the LICENSE file in the root directory of this source tree.
11 */let s=(0,l.Z)("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);var c=r(1571),d=r(67294),x=r(29009),g=r(57699),h=r(56880),y=r(3023),u=r(75358),f=r(97187),p=(0,g.z)({chartName:"LineChart",GraphicalChild:h.x,axisComponents:[{axisType:"xAxis",AxisComp:y.K},{axisType:"yAxis",AxisComp:u.B}],formatAxisMap:f.t9}),m=r(14195),v=r(26050),b=r(4545),j=r(22126),k=r(53395),C=r(34572);let calculateColumnSums=(e,a)=>{let r={};return a.forEach(a=>{let t=e.reduce((e,r)=>e+(r[a]||0),0);r[a]=Number(t.toFixed(2))}),r},VariableInjectionModal=e=>{let{open:a=!1,onOpenChange:r,initialScheme:l=null,onSaveScheme:g}=e,[f,z]=(0,d.useState)([]),[V,A]=(0,d.useState)("config"),{resolvedTheme:M}=(0,c.F)(),S="dark"===M,T=(0,d.useRef)(S);T.current=S,(0,d.useEffect)(()=>{let e=(0,C.b5)(l),a=e||(0,C.DR)(l,k.m9,k.d9,!0);z(a),A("config")},[l,a]);let w=(0,d.useMemo)(()=>{let getColorForValue=(e,a)=>a?e<=0?"#9ca3af":e<1?"#5aa6da":e<2.5?"#7cbbe0":e<5?"#f78b66":e<7.5?"#ef6f66":"#e8645a":e<=0?"#808080":e<1?"#1a6fb0":e<2.5?"#4393c3":e<5?"#f46d43":e<7.5?"#d73027":"#a50026",getBackgroundForValue=(e,a)=>a?e<=0?"transparent":e<1?"rgba(67, 147, 195, 0.12)":e<2.5?"rgba(67, 147, 195, 0.18)":e<5?"rgba(244, 109, 67, 0.16)":e<7.5?"rgba(215, 48, 39, 0.18)":"rgba(215, 48, 39, 0.26)":e<=0?"#ffffff":e<1?"#edf4fa":e<2.5?"#e9f4fa":e<5?"#fef4ee":e<7.5?"#fcedeb":"#fbebe9";return[...k.d9.map(e=>({data:e,title:e,type:"numeric",className:"htCenter htMiddle",numericCellDecorator:(e,a)=>{let{value:r,isSumRow:t}=a;if(null==r)return;if(t){e.style.backgroundColor="var(--gray-2)",e.style.borderTop="1px solid var(--gray-6)",e.innerHTML='<span style="color: '.concat("var(--gray-11)","; font-size: 12px; font-weight: ").concat(r>0?"bold":"normal",';">').concat(r,'</span> <span style="color: var(--gray-9); font-size: 11px;">Tg</span>');return}let i=T.current,l=getColorForValue(r,i);e.style.backgroundColor=getBackgroundForValue(r,i),e.innerHTML='<span style="color: '.concat(l,"; font-weight: ").concat(r>0?"bold":"normal",';">').concat(r,'</span> <span style="color: var(--gray-9); font-size: 12px;">Tg</span>')}}))]},[]),handleDataChange=(e,a)=>{if("loadData"!==a&&e&&e.length>0){let a=[...f];e.forEach(e=>{let[r,t,i,l]=e;i!==l&&(a[r][t]=""===l?0:parseFloat(l)||0)}),z(a)}},F=(0,d.useCallback)(e=>{let a=S?["#b794f6","#c084fc","#d0a2f7","#f0abfc","#7dd3fc","#60a5fa","#93c5fd"]:["#3b0764","#6b21a8","#9333ea","#d946ef","#0ea5e9","#0284c7","#0c4a6e"];return a[e]||"var(--blue-9)"},[S]),D=(0,d.useMemo)(()=>{if(!f.length)return[];let e=(0,C.W9)(f,k.m9,k.d9);return k.m9.map((a,r)=>{let t=e[r]||[],i=t.map((e,a)=>({year:2035+a,value:e}));return{latitude:a,data:i,color:F(r)}})},[f,F]),N=(0,d.useMemo)(()=>{if(!D.length)return 4;let e=D.flatMap(e=>e.data.map(e=>e.value));return 2*Math.ceil(Math.max(...e,.1)/2)||4},[D]),q=S?"var(--gray-a5)":void 0,H=S?"var(--gray-a6)":void 0,L=S?{fill:"var(--gray-11)",fontSize:10}:void 0,B=S?"var(--gray-a6)":void 0;return(0,t.jsx)(i.Vq.fC,{open:a,onOpenChange:r,onOpenAutoFocus:e=>e.preventDefault(),children:(0,t.jsxs)(i.Vq.VY,{style:{maxWidth:732,paddingBottom:0,backgroundColor:"var(--color-panel-solid)",color:"var(--gray-12)"},children:[(0,t.jsx)(i.TX,{children:(0,t.jsx)(i.Vq.Dx,{children:"Editing injection scheme"})}),(0,t.jsx)(i.eB,{mb:"7",children:(0,t.jsxs)(i.kC,{align:"center",gap:"3",px:"4",py:"3",style:{borderBottom:"1px solid var(--gray-a3)"},children:[(0,t.jsx)(n,{size:16,color:"var(--gray-9)"}),(0,t.jsx)(i.X6,{size:"4",style:{fontWeight:600,color:"var(--gray-12)"},children:"Editing injection scheme"})]})}),(0,t.jsxs)(i.kC,{direction:"column",children:[(0,t.jsx)(i.Vq.dk,{size:"2",color:"gray",mb:"3",children:"Customize your SAI deployment strategy by specifying exact SO₂ quantities for each latitude band across different decades. This direct approach provides greater control than a cooling target."}),(0,t.jsx)(i.xv,{size:"2",color:"gray",mb:"5",children:"We note that the injection amount and locations are specific to the underlying model. Alternative models utilize modified injection strategies (e.g. greater relative injection in the Northern Hemisphere) to achieve uniform global cooling."}),(0,t.jsxs)(i.mQ.fC,{value:V,onValueChange:A,children:[(0,t.jsxs)(i.mQ.aV,{children:[(0,t.jsx)(i.mQ.xz,{value:"config",children:"Configure"}),(0,t.jsx)(i.mQ.xz,{value:"visualization",children:"Visualization"})]}),(0,t.jsx)(i.mQ.VY,{value:"config",children:(0,t.jsxs)(i.kC,{gap:"4",mt:"2",pt:"4",direction:"column",children:[(0,t.jsx)(j._,{className:"injection-grid",height:336,data:[...f,{latitude:"Total",...calculateColumnSums(f,k.d9)}],columns:w,afterChange:(e,a)=>{if(e){let r=e.filter(e=>{let[a]=e;return a<f.length});r.length>0&&handleDataChange(r,a)}},fixedColumnsLeft:0,stretchH:"all",rowHeaders:[...k.m9,"Total"],enterMoves:{row:0,col:0},rowHeights:e=>e===f.length?32:36,cells:(e,a)=>{if(e===f.length)return{readOnly:!0,className:"htDimmed htMiddle htCenter"}}}),(0,t.jsx)(i.xv,{size:"1",style:{margin:"-24px 0 8px",color:"var(--gray-9)"},children:"Note: SO₂ amounts are expressed as yearly totals (Tg/year)"})]})}),(0,t.jsx)(i.mQ.VY,{value:"visualization",children:(0,t.jsx)(i.kC,{direction:"column",gap:"2",pt:"5",pb:"4",style:{maxHeight:640},children:D.length>0?(0,t.jsx)(i.iA.fC,{style:{border:"1px solid var(--gray-a5)",borderRadius:"6px",overflow:"hidden"},children:(0,t.jsx)(i.iA.uT,{children:D.map((e,a)=>{let{latitude:r,data:l,color:n}=e;return(0,t.jsxs)(i.iA.X2,{children:[(0,t.jsx)(i.iA.bL,{style:{width:"60px",padding:"12px 8px",verticalAlign:"middle",borderRight:"1px solid var(--gray-a5)",backgroundColor:"var(--gray-2)",color:"var(--gray-12)",textAlign:"center"},children:(0,t.jsx)(i.xv,{size:"1",weight:"medium",children:r})}),(0,t.jsx)(i.iA.bL,{style:{padding:"12px 8px"},children:(0,t.jsx)("div",{style:{height:56,width:"100%"},children:(0,t.jsx)(x.h,{width:"100%",height:"100%",debounce:150,children:(0,t.jsxs)(p,{data:l,margin:{top:2,right:20,left
11:10,bottom:0},children:[(0,t.jsx)(m.q,{strokeDasharray:"3 3",vertical:!1,stroke:q}),(0,t.jsx)(y.K,{dataKey:"year",type:"number",domain:[2035,2100],ticks:[2035,2040,2045,2050,2055,2060,2065,2070,2075,2080,2085,2090,2095,2100],fontSize:10,height:15,stroke:H,tick:L,tickFormatter:e=>e%10==0||2035===e?e:""}),(0,t.jsx)(u.B,{domain:[0,N],label:{value:"Tg",position:"insideLeft",angle:-90,style:{fontSize:10,textAnchor:"middle",fill:S?"var(--gray-11)":void 0},dy:30},fontSize:10,width:25,stroke:H,tick:L}),(0,t.jsx)(v.u,{formatter:e=>["Value: ".concat(Number(e).toFixed(2)," Tg")],labelFormatter:e=>"Year: ".concat(e),isAnimationActive:!1,cursor:{strokeDasharray:"3 3",stroke:B},contentStyle:{backgroundColor:"var(--color-panel-solid)",border:"1px solid var(--gray-a5)",borderRadius:"6px",fontFamily:"var(--default-font-family)",padding:"8px 12px",fontWeight:500,boxShadow:"0px 1px 4px 0px rgba(0, 0, 0, 0.1)"},offset:16}),(0,t.jsx)(b.d,{y:0,stroke:"var(--gray-6)"}),(0,t.jsx)(h.x,{type:"monotone",dataKey:"value",stroke:n,strokeWidth:2,dot:!1,activeDot:{r:4},isAnimationActive:!1})]})})})})]},r)})})}):(0,t.jsxs)(i.kC,{direction:"column",align:"center",justify:"center",style:{height:240},children:[(0,t.jsx)(o.Z,{size:40,color:"var(--gray-7)"}),(0,t.jsx)(i.xv,{size:"3",color:"gray",mt:"3",children:"No data available for visualization"})]})})})]})]}),(0,t.jsx)(i.kC,{gap:"3",align:"center",justify:"end",mt:"2",style:{background:"var(--gray-2)",borderTop:"1px solid var(--gray-a3)",marginLeft:"-24px",marginRight:"-24px",padding:"16px 24px"},children:(0,t.jsxs)(i.kC,{gap:"3",children:[(0,t.jsx)(i.Vq.x8,{children:(0,t.jsx)(i.zx,{variant:"soft",color:"gray",children:"Cancel"})}),(0,t.jsxs)(i.zx,{onClick:()=>{let e=(0,C.W9)(f,k.m9,k.d9);(0,C.Rn)(e,f),null==g||g(e),null==r||r(!1)},children:[(0,t.jsx)(s,{size:14}),"Save"]})]})})]})})}}}]);

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.