1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9729],{19729:(e,a,s)=>{"use strict";s.r(a),s.d(a,{default:()=>j});var l=s(37876),t=s(14232),c=s(62002),r=s(34930),o=s(18025),i=s(26401),n=s.n(i),d=s(21954),u=s(1575);let h=[{key:"daily",days:1},{key:"every3days",days:3},{key:"weekly",days:7},{key:"biweekly",days:14}],x=[.5,1,2,3,5],m=[1,3,5,10,20],g=[10,20,30,40,60],p=o.tf/o.Sd,_=e=>Math.round(e).toLocaleString("en-US");function y(e){let a=["ArrowRight","ArrowDown"].includes(e.key)?1:["ArrowLeft","ArrowUp"].includes(e.key)?-1:0;if(!a)return;let s=e.target.closest('[role="radiogroup"]');if(!s)return;let l=[...s.querySelectorAll('[role="radio"]')],t=l[(l.indexOf(e.target)+a+l.length)%l.length];e.preventDefault(),t.focus(),t.click()}function j(e){let{className:a,headless:s=!1}=e,{t:i}=(0,c.Bd)("localTracker"),[j,N]=(0,t.useState)("grid"),[k,v]=(0,t.useState)(5),[f,w]=(0,t.useState)(1),[S,M]=(0,t.useState)(20),[L,C]=(0,t.useState)(5),[B,A]=(0,t.useState)("daily"),G=(0,t.useMemo)(()=>"custom"===j?S:(0,r.VJ)({mode:j,size:k,stepKm:f}),[j,k,f,S]),E=G*L,I=E*Math.ceil(30/h.find(e=>e.key===B).days),q=I*p,z=o.Sd-I,P=(k-1)*f;return(0,l.jsxs)("div",{className:"".concat(n().wrapper," ").concat(a||""),children:[!s&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("h2",{className:"section-title",children:i("calculator.label")}),(0,l.jsx)("p",{className:n().subtitle,children:i("calculator.subtitle")})]}),(0,l.jsxs)(d.IR,{className:n().calculator,view:"calm",screws:"corners",children:[(0,l.jsxs)("div",{className:n().controls,onKeyDown:y,children:[(0,l.jsxs)("div",{className:n().control,children:[(0,l.jsx)(d.Gf,{className:n().controlLabel,children:i("calculator.shape")}),(0,l.jsx)("div",{className:n().toggle,role:"radiogroup","aria-label":i("calculator.shape"),children:["grid","circle","custom"].map(e=>(0,l.jsx)(d.xS,{type:"button",role:"radio","aria-pressed":void 0,"aria-checked":j===e,pressed:j===e,tabIndex:j===e?0:-1,className:n().toggleBtn,onClick:()=>N(e),children:i("calculator.shape.".concat(e))},e))})]}),"custom"!==j&&(0,l.jsxs)("div",{className:n().control,children:[(0,l.jsx)(d.Gf,{className:n().controlLabel,children:i("calculator.size")}),(0,l.jsx)("div",{className:"".concat(n().toggle," ").concat(n().sizeToggle),role:"radiogroup","aria-label":i("calculator.size"),children:r.Ec.SIZE_PRESETS.map(e=>(0,l.jsxs)(d.xS,{type:"button",role:"radio","aria-pressed":void 0,"aria-checked":k===e,pressed:k===e,tabIndex:k===e?0:-1,className:n().toggleBtn,onClick:()=>v(e),children:[e,"\xd7",e]},e))})]}),"custom"!==j&&(0,l.jsxs)("div",{className:n().control,children:[(0,l.jsx)(d.Gf,{className:n().controlLabel,children:i("calculator.step")}),(0,l.jsx)("div",{className:n().toggle,role:"radiogroup","aria-label":i("calculator.step"),children:x.map(e=>(0,l.jsxs)(d.xS,{type:"button",role:"radio","aria-pressed":void 0,"aria-checked":f===e,pressed:f===e,tabIndex:f===e?0:-1,className:n().toggleBtn,onClick:()=>w(e),children:[e," km"]},e))})]}),"custom"===j&&(0,l.jsxs)("div",{className:n().control,children:[(0,l.jsx)(d.Gf,{className:n().controlLabel,children:i("calculator.points")}),(0,l.jsx)("div",{className:n().toggle,role:"radiogroup","aria-label":i("calculator.points"),children:g.map(e=>(0,l.jsx)(d.xS,{type:"button",role:"radio","aria-pressed":void 0,"aria-checked":S===e,pressed:S===e,tabIndex:S===e?0:-1,className:n().toggleBtn,onClick:()=>M(e),children:e},e))}),(0,l.jsx)("p",{className:n().warning,style:{marginTop:"0.5rem"},children:i("calculator.custom.hint")})]}),(0,l.jsxs)("div",{className:n().control,children:[(0,l.jsx)(d.Gf,{className:n().controlLabel,children:i("calculator.keywords")}),(0,l.jsx)("div",{className:n().toggle,role:"radiogroup","aria-label":i("calculator.keywords"),children:m.map(e=>(0,l.jsx)(d.xS,{type:"button",role:"radio","aria-pressed":void 0,"aria-checked":L===e,pressed:L===e,tabIndex:L===e?0:-1,className:n().toggleBtn,onClick:()=>C(e),children:e},e))})]}),(0,l.jsxs)("div",{className:n().control,children:[(0,l.jsx)(d.Gf,{className:n().controlLabel,children:i("calculator.frequency")}),(0,l.jsx)("div",{className:n().toggle,role:"radiogroup","aria-label":i("calculator.frequency"),children:h.map(e=>(0,l.jsx)(d.xS,{type:"button",role:"radio","aria-pressed":void 0,"aria-checked":B===e.key,pressed:B===e.key,tabIndex:B===e.key?0:-1,className:n().toggleBtn,onClick:()=>A(e.key),children:i("calculator.freq.".concat(e.key))},e.key))})]})]}),(0,l.jsxs)(u.A,{className:n().readout,contentClassName:n().screenContent,"aria-live":"polite","aria-atomic":"true",children:[(0,l.jsx)(b,{size:k,points:G,mode:j}),(0,l.jsxs)("div",{className:n().headline,children:[(0,l.jsxs)("span",{className:n().c
1ost,children:[(0,l.jsx)("span",{"aria-hidden":"true",children:"$"}),(0,l.jsx)(d.cb,{value:q.toFixed(2),label:"$".concat(q.toFixed(2))})]}),(0,l.jsx)("span",{className:n().costLabel,children:i("calculator.out.cost")})]}),(0,l.jsxs)("dl",{className:n().stats,children:[(0,l.jsxs)("div",{className:n().stat,children:[(0,l.jsx)("dt",{children:i("calculator.out.points",{points:G})}),(0,l.jsx)("dd",{children:"custom"===j?i("calculator.out.coverage.custom"):i("calculator.out.coverage",{distance:"".concat(P.toFixed(+(P<10))," km")})})]}),(0,l.jsxs)("div",{className:n().stat,children:[(0,l.jsx)("dt",{children:_(E)}),(0,l.jsx)("dd",{children:i("calculator.out.perScan")})]}),(0,l.jsxs)("div",{className:n().stat,children:[(0,l.jsx)("dt",{children:_(I)}),(0,l.jsx)("dd",{children:i("calculator.out.perMonth")})]})]}),(0,l.jsx)("p",{className:n().budget,children:z>=0?i("calculator.out.left",{credits:_(z),plan:"$".concat(o.tf)}):i("calculator.out.over",{credits:_(-z),price:o.tf,max:o.q2})})]})]}),(0,l.jsx)("p",{className:n().warning,children:i("calculator.warning")})]})}function b(e){let{mode:a,size:s,points:t}=e,c="circle"===a?(0,r.r5)({lat:0,lng:0},s,1):[],o=Math.max(...c.map(e=>Math.abs(e.lng)),.001),i="grid"===a?Array.from({length:s*s},(e,a)=>[20+a%s*160/(s-1),20+120*Math.floor(a/s)/(s-1)]):"circle"===a?c.map(e=>[100+e.lng/o*80,80-e.lat/o*60]):Array.from({length:t},(e,a)=>{let s=2.39996*a,l=Math.sqrt(a/Math.max(1,t-1));return[100+Math.cos(s)*l*80,80+Math.sin(s)*l*60]});return(0,l.jsxs)("svg",{className:n().gridPreview,viewBox:"0 0 200 160","aria-hidden":"true",children:[(0,l.jsx)("path",{d:"M0 50h200M0 110h200M60 0v160M140 0v160",stroke:"#4c5840",strokeWidth:"12"}),i.map((e,t)=>{let[c,r]=e;return(0,l.jsx)("circle",{cx:c,cy:r,r:s>11&&"grid"===a?1.5:3,fill:"#b5c896"},t)}),(0,l.jsx)("path",{d:"M100 62c-9 0-14 7-14 14 0 10 14 23 14 23s14-13 14-23c0-7-5-14-14-14Z",fill:"#e8b58b",stroke:"#30372a",strokeWidth:"3"}),(0,l.jsx)("circle",{cx:"100",cy:"76",r:"4",fill:"#30372a"})]})}},26401:e=>{e.exports={wrapper:"styles_wrapper__E42ee",subtitle:"styles_subtitle__wGP9s",calculator:"styles_calculator__Mo0K_",controls:"styles_controls__rPNsc",control:"styles_control__AVt02",controlLabel:"styles_controlLabel__V2KZj",toggle:"styles_toggle__0lz8m",toggleBtn:"styles_toggleBtn__GsmRx",readout:"styles_readout__yiOJc",screenContent:"styles_screenContent__f_mCX",gridPreview:"styles_gridPreview__YoxE1",headline:"styles_headline__eqY0R",cost:"styles_cost__lGmT7",costLabel:"styles_costLabel___2JU1",stats:"styles_stats__rxK54",stat:"styles_stat__LnKLF",budget:"styles_budget__LwvyK",warning:"styles_warning__caNa2",sizeToggle:"styles_sizeToggle__Fxa_P"}}}]);
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.