/opt/canhelp/apps/web/.next/cache/webpack/client-production
Edit: /opt/canhelp/apps/web/.next/cache/webpack/client-production/13.pack (11588B)
wpc 8- §webpack/lib/cache/PackFileCacheStrategyPackContentItems€¼MinifierWebpackPlugin|static/chunks/1530-924600c14b8d5b20.jsÄRealContentHashPlugin|analyse|static/chunks/1530-924600c14b8d5b20.js€†source«webpack/lib/util/registerExternalSerializer™webpack-sources/RawSource
, "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1530],{2818:(e,t,r)=>{r.d(t,{W:()=>a});var n=r(4568),s=r(7620),l=r(5940);function o(e,t){var r;let n="string"==typeof e?e.trim():"";return!n||(r=n).startsWith("/api/")||r.startsWith("/uploads/")||r.startsWith("http://")||r.startsWith("https://")?t.split("-").filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "):n}function a(e){let{categories:t,locale:r,value:a,onChange:i,placeholder:c}=e,[u,d]=(0,s.useState)(!1),[g,x]=(0,s.useState)(null),h=(0,s.useRef)(null);(0,s.useEffect)(()=>{function e(e){h.current&&!h.current.contains(e.target)&&(d(!1),x(null))}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,s.useEffect)(()=>{if(!a)return void x(null);for(let r of t){var e;for(let t of null!=(e=r.children)?e:[])if(t.slug===a)return void x(r.slug)}},[a,t]);let m="",f="";e:for(let e of t){var p,k,b,j,v;if(e.slug===a){m=o(null!=(p=e.names[r])?p:e.names.el,e.slug),f=null!=(k=e.icon)?k:"";break}for(let t of null!=(b=e.children)?b:[])if(t.slug===a){m=o(null!=(j=t.names[r])?j:t.names.el,t.slug),f=null!=(v=e.icon)?v:"";break e}}function y(){d(!1),x(null)}return(0,n.jsxs)("div",{className:"relative",ref:h,children:[(0,n.jsx)("input",{type:"hidden",name:"category",value:a}),(0,n.jsxs)("button",{type:"button",onClick:()=>d(!u),className:"w-full flex items-center gap-1.5 px-3 py-2 text-sm transition-colors ".concat(u?"rounded-t-lg border border-green-400 bg-white text-gray-900":"rounded-lg border border-gray-200 bg-gray-50 hover:bg-gray-100 text-gray-600 hover:text-gray-900"),children:[f?(0,n.jsx)(l.Ez,{icon:f,alt:m||c,className:"h-4 w-4 object-contain text-base leading-none shrink-0",fallback:"\uD83D\uDCE6"}):(0,n.jsx)("svg",{className:"w-4 h-4 text-gray-500 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 6h16M4 10h16M4 14h16M4 18h16"})}),(0,n.jsx)("span",{className:"flex-1 text-left truncate font-medium",children:m||c}),(0,n.jsx)("svg",{className:"w-3.5 h-3.5 text-gray-400 shrink-0 transition-transform ".concat(u?"rotate-180":""),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})]}),u&&(0,n.jsxs)("div",{className:"absolute left-0 top-full w-full min-w-[240px] bg-white border border-t-0 border-green-400 rounded-b-xl shadow-lg z-50 max-h-96 overflow-y-auto",children:[(0,n.jsxs)("button",{className:"w-full flex items-center gap-2.5 px-4 py-2.5 text-sm hover:bg-gray-50 text-left border-b border-gray-100 ".concat(a?"text-gray-700":"text-green-600 font-medium"),onClick:()=>{i(""),y()},children:[(0,n.jsx)("span",{className:"flex-1",children:c}),!a&&(0,n.jsx)("svg",{className:"w-4 h-4 text-green-600 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})]}),t.map(e=>{var t,s,c;let u=o(null!=(t=e.names[r])?t:e.names.el,e.slug),d=null!=(s=e.icon)?s:"",h=null!=(c=e.children)?c:[],m=g===e.slug,f=h.length>0;return(0,n.jsxs)("div",{children:[(0,n.jsxs)("button",{type:"button",className:"w-full flex items-center gap-2 px-4 py-2.5 text-sm text-left transition-colors ".concat(f?"hover:bg-gray-50 text-gray-800":a===e.slug?"text-green-600 font-medium hover:bg-green-50":"hover:bg-gray-50 text-gray-700"),onClick:()=>{f?x(m?null:e.slug):(i(e.slug),y())},children:[d?(0,n.jsx)(l.Ez,{icon:d,alt:u,className:"h-4 w-4 object-contain text-base leading-none shrink-0",fallback:"\uD83D\uDCE6"}):null,(0,n.jsx)("span",{className:"flex-1 font-medium",children:u}),f?(0,n.jsx)("svg",{className:"w-4 h-4 text-gray-400 shrink-0 transition-transform ".concat(m?"rotate-90":""),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})}):a===e.slug?(0,n.jsx)("svg",{className:"w-4 h-4 text-green-600 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})}):null]}),f&&m&&(0,n.jsx)("div",{className:"bg-gray-50 border-t border-b border-gray-100",children:h.map(e=>{var t;let s=o(null!=(t=e.names[r])?t:e.names.el,e.slug),l=a===e.slug;return(0,n.jsxs)("button",{type:"button",className:"w-full flex items-center gap-2 pl-10 pr-4 py-2 text-sm text-left transition-colors ".concat(l?"text-green-600 font-medium bg-green-50":"text-gray-600 hover:bg-gray-100"),onClick:()=>{i(e.slug),y()},children:[(0,n.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-gray-300 shrink-0"}),(0,n.jsx)("span",{className:"flex-1",children:s}),l&&(0,n.jsx)("svg",{className:"w-4 h-4 text-green-600 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})]},e.id)})})]},e.id)})]})]})}},3119:(e,t,r)=>{r.d(t,{V:()=>o});var n=r(4568),s=r(7620),l=r(9906);function o(e){let{locations:t,value:r,onChange:o,anyLabel:a,allLabel:i}=e,[c,u]=(0,s.useState)(!1),[d,g]=(0,s.useState)(null),x=(0,s.useRef)(null),{locale:h}=(0,l.Y)();(0,s.useEffect)(()=>{function e(e){x.current&&!x.current.contains(e.target)&&(u(!1),g(null))}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,s.useEffect)(()=>{if(!r)return void g(null);for(let n of t){var e;if(n.slug===r)return;for(let t of null!=(e=n.children)?e:[])if(t.slug===r)return void g(n.slug)}},[r,t]);let m=a;e:for(let e of t){var f,p,k;if(e.slug===r){m=null!=(f=e.names[h])?f:e.names.el;break}for(let t of null!=(p=e.children)?p:[])if(t.slug===r){m=null!=(k=t.names[h])?k:t.names.el;break e}}function b(){u(!1),g(null)}return(0,n.jsxs)("div",{className:"relative",ref:x,children:[(0,n.jsx)("input",{type:"hidden",name:"location",value:r}),(0,n.jsxs)("button",{type:"button",onClick:()=>u(!c),className:"w-full flex items-center gap-1.5 px-3 py-2 text-sm transition-colors ".concat(c?"rounded-t-lg border border-green-400 bg-white text-gray-900":"rounded-lg border border-gray-200 bg-gray-50 hover:bg-gray-100 text-gray-600 hover:text-gray-900"),children:[(0,n.jsxs)("svg",{className:"w-4 h-4 text-gray-500 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:[(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"}),(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 11a3 3 0 11-6 0 3 3 0 016 0z"})]}),(0,n.jsx)("span",{className:"flex-1 text-left truncate font-medium",children:m}),(0,n.jsx)("svg",{className:"w-3.5 h-3.5 text-gray-400 shrink-0 transition-transform ".concat(c?"rotate-180":""),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})]}),c&&(0,n.jsxs)("div",{className:"absolute left-0 top-full w-full min-w-[220px] bg-white border border-t-0 border-green-400 rounded-b-xl shadow-lg z-50 max-h-96 overflow-y-auto",children:[(0,n.jsxs)("button",{className:"w-full flex items-center gap-2.5 px-4 py-2.5 text-sm hover:bg-gray-50 text-left border-b border-gray-100 ".concat(r?"text-gray-700":"text-green-600 font-medium"),onClick:()=>{o(""),b()},children:[(0,n.jsx)("span",{className:"flex-1",children:a}),!r&&(0,n.jsx)("svg",{className:"w-4 h-4 text-green-600 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})]}),t.map(e=>{var t,s;let l=null!=(t=e.names[h])?t:e.names.el,a=null!=(s=e.children)?s:[],c=a.length>0,u=r===e.slug,x=d===e.slug;return(0,n.jsxs)("div",{children:[(0,n.jsxs)("button",{type:"button",className:"w-full flex items-center gap-2 px-4 py-2.5 text-sm text-left transition-colors ".concat(u?"text-green-600 font-medium hover:bg-green-50":"text-gray-800 hover:bg-gray-50"),onClick:()=>{c?g(x?null:e.slug):(o(e.slug),b())},children:[(0,n.jsx)("svg",{className:"w-3.5 h-3.5 text-gray-300 shrink-0",fill:"currentColor",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"})}),(0,n.jsx)("span",{className:"flex-1 font-medium",children:l}),c?(0,n.jsx)("svg",{className:"w-4 h-4 text-gray-400 shrink-0 transition-transform ".concat(x?"rotate-90":""),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})}):u?(0,n.jsx)("svg",{className:"w-4 h-4 text-green-600 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})}):null]}),c&&x&&(0,n.jsxs)("div",{className:"bg-gray-50 border-t border-b border-gray-100",children:[(0,n.jsxs)("button",{type:"button",className:"w-full flex items-center gap-2 pl-8 pr-4 py-2 text-sm text-left transition-colors ".concat(u?"text-green-600 font-medium bg-green-50":"text-gray-600 hover:bg-gray-100"),onClick:()=>{o(e.slug),b()},children:[(0,n.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-gray-300 shrink-0"}),(0,n.jsxs)("span",{className:"flex-1",children:[l," — ",i]}),u&&(0,n.jsx)("svg",{className:"w-4 h-4 text-green-600 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})]}),a.map(e=>{var t;let s=null!=(t=e.names[h])?t:e.names.el,l=r===e.slug;return(0,n.jsxs)("button",{type:"button",className:"w-full flex items-center gap-2 pl-8 pr-4 py-2 text-sm text-left transition-colors ".concat(l?"text-green-600 font-medium bg-green-50":"text-gray-600 hover:bg-gray-100"),onClick:()=>{o(e.slug),b()},children:[(0,n.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-gray-300 shrink-0"}),(0,n.jsx)("span",{className:"flex-1",children:s}),l&&(0,n.jsx)("svg",{className:"w-4 h-4 text-green-600 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})]},e.id)})]})]},e.id)})]})]})}},5940:(e,t,r)=>{r.d(t,{Ez:()=>o,V:()=>l});var n=r(4568),s=r(7620);function l(e){if(!e)return!1;let t=e.trim();return t.startsWith("http://")||t.startsWith("https://")||t.startsWith("/")}function o(e){let{icon:t,alt:r="",className:o,fallback:a="\uD83D\uDCE6"}=e,i=(t||"").trim(),[c,u]=(0,s.useState)(!1);(0,s.useEffect)(()=>{u(!1)},[i]);let d=(0,s.useMemo)(()=>l(i)?i.startsWith("/api/")?"".concat("https://api.canhelp.gr").concat(i):i:"",[i]),g="/category-icons/package.svg";return l(i)?c&&i!==g?(0,n.jsx)("img",{src:g,alt:r,className:o,loading:"lazy",onError:()=>u(!0)}):c&&i===g?(0,n.jsx)("span",{className:o,children:a}):(0,n.jsx)("img",{src:d,alt:r,className:o,loading:"lazy",onError:()=>u(!0)}):(0,n.jsx)("span",{className:o,children:i||a})}}}]);€€