PageSourceSearch

https://boinspekt.se/static/js/321.857819c9.chunk.js

js boinspekt.se collected 2026-10-02 02:08:36 UTC 4,893 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkKBPortal=self.webpackChunkKBPortal||[]).push([[321],{75537(n,e,t){t.d(e,{C_:()=>d,G8:()=>i,J1:()=>l});var a=t(12452),r=t(77463);const o="omradeskarta_tool_draft",s=n=>{const e=(n||"").toLowerCase();return e.includes("adressen kunde inte hittas")?"address_not_found":e.includes("v\xe4nta en stund")||e.includes("m\xe5nga kartor")?"rate_limited":e.includes("avst\xe4ngt")?"disabled":"error"},i=async n=>{try{const e=await(0,a.Ay)({method:"POST",endpoint:"/public/area_map/fetch",body:{address:n}});return(0,r.s)("omradeskarta_fetch",{result:"success"}),e}catch(e){throw(0,r.s)("omradeskarta_fetch",{result:s(e.message)}),e}},d=()=>{try{const n=window.localStorage.getItem(o);if(!n)return null;const e=JSON.parse(n);return null!==e&&void 0!==e&&e.baseData?Date.now()-(e.savedAt||0)>6048e5?(window.localStorage.removeItem(o),null):e:null}catch(n){return window.localStorage.removeItem(o),null}},l=n=>{let e=n.baseData,t=n.annotations,a=n.settings,r=n.fetchAddress;try{window.localStorage.setItem(o,JSON.stringify({baseData:e,annotations:t||[],settings:a||null,fetchAddress:r||"",savedAt:Date.now()}))}catch(s){}}},20321(n,e,t){t.r(e),t.d(e,{default:()=>S});var a,r,o,s,i,d=t(57528),l=t(5544),c=t(9950),u=t(84127),h=t(28429),m=t(32856),p=t(16289),f=t(40978),g=t(17155),b=t(59905),w=t(77463),x=t(75537),k=t(24384),y=t(44414);const A=u.Ay.div(a||(a=(0,d.A)(["\n  min-height: 100vh;\n  background: #fffcf8;\n"]))),v=u.Ay.button(r||(r=(0,d.A)(["\n  display: flex;\n  align-items: center;\n  gap: 6px;\n  padding: 8px 10px;\n  background: transparent;\n  border: none;\n  border-radius: 8px;\n  font-size: 0.9rem;\n  color: #666;\n  cursor: pointer;\n  transition: all 0.2s;\n\n  &:hover {\n    background: #f5f5f5;\n    color: #333;\n  }\n\n  @media (max-width: 900px) {\n    span {\n      display: none;\n    }\n  }\n"]))),j=u.Ay.h1(o||(o=(0,d.A)(["\n  font-size: 1.05rem;\n  font-weight: 600;\n  color: #1a1a1a;\n  margin: 0;\n  white-space: nowrap;\n"]))),_=u.Ay.button(s||(s=(0,d.A)(["\n  display: inline-flex;\n  align-items: center;\n  gap: 6px;\n  height: 34px;\n  padding: 0 14px;\n  background: transparent;\n  color: #1a1a1a;\n  font-weight: 600;\n  font-size: 0.85rem;\n  border-radius: 999px;\n  border: 1px solid #e0e0e0;\n  cursor: pointer;\n  transition: all 0.2s;\n\n  &:hover {\n    background: #f5f5f5;\n    border-color: #d0d0d0;\n  }\n\n  @media (max-width: 700px) {\n    display: none;\n  }\n"]))),C=u.Ay.button(i||(i=(0,d.A)(["\n  display: inline-flex;\n  align-items: center;\n  gap: 8px;\n  height: 34px;\n  padding: 0 16px;\n  background: linear-gradient(135deg, #f5a623 0%, #e08e0b 100%);\n  color: white;\n  font-weight: 600;\n  font-size: 0.85rem;\n  border-radius: 999px;\n  border: none;\n  cursor: pointer;\n  transition: transform 0.2s;\n\n  &:hover {\n    transform: translateY(-1px);\n  }\n"]))),S=()=>{const n=(0,h.Zp)(),e=(0,c.useRef)(null),t=(0,c.useRef)(new Set),a=(0,c.useState)(null),r=(0,l.A)(a,2),o=r[0],s=r[1];(0,c.useEffect)(()=>{const e=(0,x.C_)();e?s(e):(s(!1),n("/verktyg/omradeskarta",{replace:!0}))},[n]);const i=(0,c.useRef)(null),d=(0,c.useRef)(null),u=()=>{const n=d.current;null!==n&&void 0!==n&&n.baseData&&(0,x.J1)(n)};(0,c.useEffect)(()=>(window.addEventListener("beforeunload",u),()=>{window.clearTimeout(i.current),u(),window.removeEventListener("beforeunload",u)}),[]);return o?(0,y.jsxs)(A,{children:[(0,y.jsx)(b.j,{title:"Redigera omr\xe5deskarta"}),(0,y.jsx)(m.mg,{children:(0,y.jsx)("meta",{name:"robots",content:"noindex, nofollow"})}),(0,y.jsx)(k.A,{ref:e,initialBaseData:o.baseData,initialAnnotations:o.annotations||[],initialSettings:o.settings||null,initialFetchAddress:o.fetchAddress||"",onFetchData:x.G8,onToolUsed:n=>{t.current.has(n)||(t.current.add(n),(0,w.s)("omradeskarta_tool_used",{tool:n}))},onStateChange:n=>{d.current=n,window.clearTimeout(i.current),i.current=window.setTimeout(u,600)},headerLeft:(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(v,{type:"button",title:"Tillbaka till startsidan f\xf6r verktyget",onClick:()=>n("/verktyg/omradeskarta"),children:[(0,y.jsx)(g.A,{width:20,height:20}),(0,y.jsx)("span",{children:"Tillbaka"})]}),(0,y.jsx)(j,{children:"Din omr\xe5deskarta"})]}),headerActions:(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(_,{type:"button",onClick:()=>{(0,w.s)("omradeskarta_cta_click",{cta:"demo"}),n("/demo-booking")},children:["Boka demo",(0,y.jsx)(p.A,{width:14,height:14})]}),(0,y.jsxs)(C,{type:"button",onClick:async()=>{try{const n=await e.current.exportImage(),t="image/webp"===n.type?"webp":"png",a=URL.createObjectURL(n),r=document.createElement("a");r.href=a,r.download="omradeskarta.".concat(t),document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(a),(0,w.s)("omradeskarta_download",{format:t})}catch(n){}},"data-testid":"public-download",children:[(0,y.jsx)(f.A,{width:16,height:16}),"Ladda ner bild"]})]})})]}):null}}}]);

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.