1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7079],{19345:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(79065).A)("building-2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]])},55037:(e,t,n)=>{n.d(t,{Dy:()=>y,Ih:()=>i,K$:()=>b,MT:()=>g,Ov:()=>d,fM:()=>c,k_:()=>m});var r=n(14232),l=n(2219),a=n(70045);let s=null;function i(){let[e,t]=(0,r.useState)([]),[n,i]=(0,r.useState)(!0),[c,u]=(0,r.useState)(null);return(0,r.useEffect)(()=>{let e=!1;return(async()=>{if(null!==s&&Date.now()-s.fetchedAt<6e5){t(s.data),i(!1);return}i(!0),u(null);try{let n=(0,a.hY)(),r=(await l.default.get(`${n}/pricing/regions`)).data.regions??[];s={data:r,fetchedAt:Date.now()},e||t(r)}catch(t){e||u(t instanceof Error?t.message:"Failed to fetch pricing regions")}finally{e||i(!1)}})(),()=>{e=!0}},[]),{regions:e,isLoading:n,error:c}}function c(e){let[t,n]=(0,r.useState)(null),[s,i]=(0,r.useState)(!0),[c,u]=(0,r.useState)(null),o=JSON.stringify(e),[d,f]=(0,r.useState)(0),h=(0,r.useCallback)(()=>{f(e=>e+1)},[]);return(0,r.useEffect)(()=>{let e=!1;return(async()=>{i(!0),u(null);try{let t=(0,a.hY)(),r=JSON.parse(o),s=new URLSearchParams;Object.entries(r).forEach(([e,t])=>{null!=t&&""!==t&&s.append(e,String(t))});let i=s.toString(),c=`${t}/pricing/instances${i?`?${i}`:""}`,u=await l.default.get(c);e||n(u.data)}catch(t){e||u(t instanceof Error?t.message:"Failed to fetch instance pricing")}finally{e||i(!1)}})(),()=>{e=!0}},[o,d]),{data:t,isLoading:s,error:c,refetch:h}}let u=null,o=null;function d(){let[e,t]=(0,r.useState)(u),[n,s]=(0,r.useState)(null===u),[i,c]=(0,r.useState)(null);return(0,r.useEffect)(()=>{let e=!1;if(null!==u){t(u),s(!1);return}return(async()=>{try{null===o&&(o=(async()=>{let e=(0,a.hY)(),t=await l.default.get(`${e}/pricing/spec-bounds`);return u=t.data,t.data})());let n=await o;e||t(n)}catch(t){o=null,e||c(t instanceof Error?t.message:"Failed to fetch spec bounds")}finally{e||s(!1)}})(),()=>{e=!0}},[]),{bounds:e,isLoading:n,error:i}}let f=null,h=null;function g(){let[e,t]=(0,r.useState)(f??[]),[n,s]=(0,r.useState)(null===f),[i,c]=(0,r.useState)(null);return(0,r.useEffect)(()=>{let e=!1;if(null!==f){t(f),s(!1);return}return(async()=>{try{null===h&&(h=(async()=>{let e=(0,a.hY)();return f=(await l.default.get(`${e}/pricing/gpu-models`)).data.gpu_models??[]})());let n=await h;e||t(n)}catch(t){h=null,e||c(t instanceof Error?t.message:"Failed to fetch GPU models")}finally{e||s(!1)}})(),()=>{e=!0}},[]),{models:e,isLoading:n,error:i}}function m(e,t){return`${e}|${t}`}let p=null,x=null;function y(){let[e,t]=(0,r.useState)(p??new Map),[n,s]=(0,r.useState)(null===p),[i,c]=(0,r.useState)(null);return(0,r.useEffect)(()=>{let e=!1;if(null!==p){t(p),s(!1);return}return(async()=>{try{null===x&&(x=(async()=>{let e=(0,a.hY)(),t=await l.default.get(`${e}/pricing/region-labels`),n=new Map;for(let e of t.data.regions??[])n.set(m(e.provider,e.region_id),e.index);return p=n,n})());let n=await x;e||t(n)}catch(t){x=null,e||c(t instanceof Error?t.message:"Failed to fetch region labels")}finally{e||s(!1)}})(),()=>{e=!0}},[]),{labels:e,isLoading:n,error:i}}function b(e){let[t,n]=(0,r.useState)(null),[s,i]=(0,r.useState)(!0),[c,u]=(0,r.useState)(null),o=JSON.stringify(e);return(0,r.useEffect)(()=>{let e=!1;return(async()=>{i(!0),u(null);try{let t=(0,a.hY)(),r=JSON.parse(o),s=new URLSearchParams;Object.entries(r).forEach(([e,t])=>{null!=t&&""!==t&&s.append(e,String(t))});let i=s.toString(),c=`${t}/pricing/featured${i?`?${i}`:""}`,u=await l.default.get(c);e||n(u.data)}catch(t){e||u(t instanceof Error?t.message:"Failed to fetch featured instances")}finally{e||i(!1)}})(),()=>{e=!0}},[o]),{data:t,isLoading:s,error:c}}},67079:(e,t,n)=>{n.r(t),n.d(t,{default:()=>g});var r=n(37876),l=n(14232),a=n(18847),s=n.n(a),i=n(18500),c=n(79890),u=n(19345),o=n(19005),d=n(55037);let f=s()(()=>Promise.all([n.e(4572),n.e(2829)]).then(n.bind(n,82829)),{loadableGenerated:{webpack:()=>[82829]},ssr:!1,loading:()=>(0,r.jsx)("div",{className:"h-full flex items-center justify-center text-muted-foreground text-sm",children:"Loading map..."})}),h={k:3.5,x:-1148,y:-328},g=(0,l.memo)(function({onSelect:e,disabled:t}){let[n,a]=(0,l.useState)(null),[s,g]=(0,l.useState)("United Kingdom"),{regions:m,isLoading:p,error:x}=(0,d.Ih)(),y=(0,l.useMemo)(()=>({country:s??void 0,sort_by:"selling_price_hourly",sort_dir:"asc",page_size:100}),[s]),{data:b,isLoading:j}=(0,d.fM)(y),S=(0,l.useMemo)(()=>b?.rows??[],[b]),N=(0,l.useMemo)(()=>{let e=new Set;for(let t of S)t.city&&e.add(t.city);return e.size},[S]),v=(0,l.useMemo)(()=>s?m.filter(e=>e.country===s).length:0,[m,s]),[w,k]=(0,l.useState)(!1);(0,l.useEffect)(()=>
1{if(S.length>0&&!w){let t=S[0];k(!0),e({city:t.city??"",country:t.country??"",provider:t.provider??"",region:t.region??"",instanceType:t.instance_id??"",providerInstanceType:t.provider_instance_type??t.instance_id??"",priceHourly:t.selling_price_hourly??0,priceMonthly:t.selling_price_monthly??0})}},[S]),(0,l.useEffect)(()=>{k(!1)},[s]);let _=()=>{t||(a(null),g(null))},E=s?[s]:[],M=N||v,$=b?.total_rows??S.length;return(0,r.jsxs)("div",{className:"relative rounded-xl border border-border/50 overflow-hidden bg-card h-full min-h-[300px]",children:[p?(0,r.jsxs)("div",{className:"h-full flex items-center justify-center text-muted-foreground text-sm gap-2",children:[(0,r.jsx)(i.A,{className:"w-4 h-4 animate-spin"}),"Loading regions..."]}):x||0===m.length?(0,r.jsxs)("div",{className:"h-full flex flex-col items-center justify-center text-muted-foreground text-sm gap-2 px-4 text-center",children:[(0,r.jsx)("p",{className:"font-medium text-foreground",children:"Region data unavailable"}),(0,r.jsx)("p",{className:"text-xs",children:"The pricing service is not connected."})]}):(0,r.jsx)(f,{regionData:m,initialZoom:h,selectedCountries:E,selectedCities:n?[n]:[],onCountryToggle:e=>{t||(g(t=>t===e?null:e),a(null))},onCityToggle:e=>{t||a(t=>t===e?null:e)},onClearSelection:_,className:"h-full"}),s&&(0,r.jsxs)("div",{className:"absolute bottom-0 left-0 right-0 bg-background/85 dark:bg-[#0B1120]/90 backdrop-blur-md border-t border-border/30 px-4 py-2.5 flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center gap-4",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(c.A,{className:"w-3.5 h-3.5 text-primary"}),(0,r.jsx)("span",{className:"text-sm font-semibold text-foreground",children:s})]}),j?(0,r.jsx)("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:(0,r.jsx)(i.A,{className:"w-3 h-3 animate-spin"})}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[(0,r.jsx)(u.A,{className:"w-3 h-3"}),(0,r.jsxs)("span",{children:[(0,r.jsx)("span",{className:"font-semibold text-foreground",children:M})," data center",1!==M?"s":""]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[(0,r.jsx)(o.A,{className:"w-3 h-3"}),(0,r.jsxs)("span",{children:[(0,r.jsx)("span",{className:"font-semibold text-foreground",children:$})," instances"]})]})]})]}),(0,r.jsx)("button",{onClick:_,className:"text-[11px] text-muted-foreground/50 hover:text-foreground border-none bg-transparent cursor-pointer transition-colors",children:"Clear"})]}),!s&&!p&&m.length>0&&(0,r.jsx)("div",{className:"absolute bottom-0 left-0 right-0 bg-background/80 dark:bg-[#0B1120]/85 backdrop-blur-md border-t border-border/30 px-4 py-3 flex items-center justify-center",children:(0,r.jsx)("span",{className:"text-sm text-muted-foreground",children:"Click a country on the map to select a region"})})]})})},79890:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(79065).A)("map-pin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]])}}]);
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.