/opt/canhelp/apps/web/.next/cache/webpack/server-production
NameSizeModeActions
0.pack925145390644editdlrm
1.pack12673790644editdlrm
2.pack43735990644editdlrm
3.pack7451990644editdlrm
4.pack65204660644editdlrm
5.pack259717610644editdlrm
6.pack7518430644editdlrm
7.pack46388840644editdlrm
8.pack48452960644editdlrm
9.pack97020644editdlrm
10.pack27038500644editdlrm
11.pack1361530644editdlrm
12.pack24060644editdlrm
13.pack4277340644editdlrm
14.pack6358240644editdlrm
15.pack19769150644editdlrm
16.pack85740644editdlrm
17.pack24591570644editdlrm
18.pack119171890644editdlrm
19.pack768050644editdlrm
20.pack31443360644editdlrm
21.pack60115380644editdlrm
22.pack10241010644editdlrm
index.pack77214480644editdlrm
index.pack.old84399530644editdlrm
Edit: /opt/canhelp/apps/web/.next/cache/webpack/server-production/15.pack (1976915B)
wpcG*webpack/lib/cache/PackFileCacheStrategyPackContentItems `AResolverCachePlugin|normal|default|dependencyType=|esm|modules=[|0=|node_modules|]|fallback=|false|exportsFields=[|0=|exports|]|importsFields=[|0=|imports|]|conditionNames=[|0=|node|1=|import|]|descriptionFiles=[|0=|package.json|]|extensions=[|0=|.js|1=|.json|2=|.node|]|enforceExtensions=|false|symlinks=|true|mainFields=[|0=|main|]|mainFiles=[|0=|index|]|roots=[|]|fullySpecified=|true|preferRelative=|false|preferAbsolute=|false|restrictions=[|]|alias=|false|path=|/opt/canhelp/apps/web|request=|next-app-loader?page=%2Fspecialist-setup%2Fpage&name=app%2Fspecialist-setup%2Fpage&pagePath=private-next-app-dir%2Fspecialist-setup%2Fpage.tsx&appDir=%2Fopt%2Fcanhelp%2Fapps%2Fweb%2Fsrc%2Fapp&appPaths=%2Fspecialist-setup%2Fpage&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js&basePath=&assetPrefix=&nextConfigOutput=&preferredRegion=&middlewareConfig=e30%3D&isGlobalNotFoundEnabled=!ResolverCachePlugin|normal|default|dependencyType=|commonjs|modules=[|0=|node_modules|]|fallback=|false|exportsFields=[|0=|exports|]|importsFields=[|0=|imports|]|conditionNames=[|0=|node|1=|require|]|descriptionFiles=[|0=|package.json|]|extensions=[|0=|.js|1=|.json|2=|.node|]|enforceExtensions=|false|symlinks=|true|mainFields=[|0=|main|]|mainFiles=[|0=|index|]|roots=[|]|fullySpecified=|false|preferRelative=|false|preferAbsolute=|false|restrictions=[|]|path=|/opt/canhelp/apps/web|request=|next-app-loader?page=%2Fspecialist-setup%2Fpage&name=app%2Fspecialist-setup%2Fpage&pagePath=private-next-app-dir%2Fspecialist-setup%2Fpage.tsx&appDir=%2Fopt%2Fcanhelp%2Fapps%2Fweb%2Fsrc%2Fapp&appPaths=%2Fspecialist-setup%2Fpage&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js&basePath=&assetPrefix=&nextConfigOutput=&preferredRegion=&middlewareConfig=e30%3D&isGlobalNotFoundEnabled=!Compilation/modules|javascript/auto|/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-app-loader/index.js?page=%2Fspecialist-setup%2Fpage&name=app%2Fspecialist-setup%2Fpage&pagePath=private-next-app-dir%2Fspecialist-setup%2Fpage.tsx&appDir=%2Fopt%2Fcanhelp%2Fapps%2Fweb%2Fsrc%2Fapp&appPaths=%2Fspecialist-setup%2Fpage&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js&basePath=&assetPrefix=&nextConfigOutput=&preferredRegion=&middlewareConfig=e30%3D&isGlobalNotFoundEnabled=!|rsc+ResolverCachePlugin|normal|default|alias=|false|dependencyType=|esm|modules=[|0=|node_modules|]|fallback=|false|exportsFields=[|0=|exports|]|importsFields=[|0=|imports|]|conditionNames=[|0=|node|1=|import|]|descriptionFiles=[|0=|package.json|]|extensions=[|0=|.js|1=|.json|2=|.node|]|enforceExtensions=|false|symlinks=|true|mainFields=[|0=|main|]|mainFiles=[|0=|index|]|roots=[|]|fullySpecified=|true|preferRelative=|false|preferAbsolute=|false|restrictions=[|]|path=|/opt/canhelp/apps/web|request=|/opt/canhelp/apps/web/src/app/become-specialist/page.tsx#ResolverCachePlugin|normal|default|alias=|false|dependencyType=|esm|modules=[|0=|node_modules|]|fallback=|false|exportsFields=[|0=|exports|]|importsFields=[|0=|imports|]|conditionNames=[|0=|node|1=|import|]|descriptionFiles=[|0=|package.json|]|extensions=[|0=|.js|1=|.json|2=|.node|]|enforceExtensions=|false|symlinks=|true|mainFields=[|0=|main|]|mainFiles=[|0=|index|]|roots=[|]|fullySpecified=|true|preferRelative=|false|preferAbsolute=|false|restrictions=[|]|path=|/opt/canhelp/apps/web|request=|/opt/canhelp/apps/web/src/app/dashboard/page.tsxSResolverCachePlugin|normal|default|alias=[|server-only$=|next/dist/compiled/server-only/empty|client-only$=|next/dist/compiled/client-only/error|next/dist/compiled/server-only$=|next/dist/compiled/server-only/empty|next/dist/compiled/client-only$=|next/dist/compiled/client-only/error|/opt/canhelp/node_modules/next/head.js=|next/dist/client/components/noop-head|/opt/canhelp/node_modules/next/image.js=|next/dist/api/image|/opt/canhelp/node_modules/next/constants.js=|next/dist/api/constants|/opt/canhelp/node_modules/next/router.js=|next/dist/api/router|/opt/canhelp/node_modules/next/dynamic.js=|next/dist/api/app-dynamic|/opt/canhelp/node_modules/next/script.js=|next/dist/api/script|/opt/canhelp/node_modules/next/link.js=|next/dist/client/app-dir/link|/opt/canhelp/node_modules/next/form.js=|next/dist/client/app-dir/form|/opt/canhelp/node_modules/next/navigation.js=|next/dist/api/navigation.react-server|/opt/canhelp/node_modules/next/headers.js=|next/dist/api/headers|/opt/canhelp/node_modules/next/og.js=|next/dist/api/og|/opt/canhelp/node_modules/next/server.js=|next/dist/api/server|/opt/canhelp/node_modules/next/document.js=|next/dist/api/document|/opt/canhelp/node_modules/next/app.js=|next/dist/api/app|next=|/opt/canhelp/node_modules/next|]|dependencyType=|esm|path=|/opt/canhelp/apps/web|request=|/opt/canhelp/apps/web/src/app/dashboard/page.tsx[ResolverCachePlugin|normal|default|alias=[|server-only$=|next/dist/compiled/server-only/empty|client-only$=|next/dist/compiled/client-only/error|next/dist/compiled/server-only$=|next/dist/compiled/server-only/empty|next/dist/compiled/client-only$=|next/dist/compiled/client-only/error|/opt/canhelp/node_modules/next/head.js=|next/dist/client/components/noop-head|/opt/canhelp/node_modules/next/image.js=|next/dist/api/image|/opt/canhelp/node_modules/next/constants.js=|next/dist/api/constants|/opt/canhelp/node_modules/next/router.js=|next/dist/api/router|/opt/canhelp/node_modules/next/dynamic.js=|next/dist/api/app-dynamic|/opt/canhelp/node_modules/next/script.js=|next/dist/api/script|/opt/canhelp/node_modules/next/link.js=|next/dist/client/app-dir/link|/opt/canhelp/node_modules/next/form.js=|next/dist/client/app-dir/form|/opt/canhelp/node_modules/next/navigation.js=|next/dist/api/navigation.react-server|/opt/canhelp/node_modules/next/headers.js=|next/dist/api/headers|/opt/canhelp/node_modules/next/og.js=|next/dist/api/og|/opt/canhelp/node_modules/next/server.js=|next/dist/api/server|/opt/canhelp/node_modules/next/document.js=|next/dist/api/document|/opt/canhelp/node_modules/next/app.js=|next/dist/api/app|next=|/opt/canhelp/node_modules/next|]|dependencyType=|esm|path=|/opt/canhelp/apps/web|request=|/opt/canhelp/apps/web/src/app/become-specialist/page.tsx*ResolverCachePlugin|normal|default|alias=|false|dependencyType=|esm|modules=[|0=|node_modules|]|fallback=|false|exportsFields=[|0=|exports|]|importsFields=[|0=|imports|]|conditionNames=[|0=|node|1=|import|]|descriptionFiles=[|0=|package.json|]|extensions=[|0=|.js|1=|.json|2=|.node|]|enforceExtensions=|false|symlinks=|true|mainFields=[|0=|main|]|mainFiles=[|0=|index|]|roots=[|]|fullySpecified=|true|preferRelative=|false|preferAbsolute=|false|restrictions=[|]|path=|/opt/canhelp/apps/web|request=|/opt/canhelp/apps/web/src/app/specialist-setup/page.tsx!Compilation/modules|javascript/auto|/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[16].oneOf[4].use[0]!/opt/canhelp/apps/web/src/app/dashboard/page.tsx|rsc)Compilation/modules|javascript/auto|/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[16].oneOf[4].use[0]!/opt/canhelp/apps/web/src/app/become-specialist/page.tsx|rscZResolverCachePlugin|normal|default|alias=[|server-only$=|next/dist/compiled/server-only/empty|client-only$=|next/dist/compiled/client-only/error|next/dist/compiled/server-only$=|next/dist/compiled/server-only/empty|next/dist/compiled/client-only$=|next/dist/compiled/client-only/error|/opt/canhelp/node_modules/next/head.js=|next/dist/client/components/noop-head|/opt/canhelp/node_modules/next/image.js=|next/dist/api/image|/opt/canhelp/node_modules/next/constants.js=|next/dist/api/constants|/opt/canhelp/node_modules/next/router.js=|next/dist/api/router|/opt/canhelp/node_modules/next/dynamic.js=|next/dist/api/app-dynamic|/opt/canhelp/node_modules/next/script.js=|next/dist/api/script|/opt/canhelp/node_modules/next/link.js=|next/dist/client/app-dir/link|/opt/canhelp/node_modules/next/form.js=|next/dist/client/app-dir/form|/opt/canhelp/node_modules/next/navigation.js=|next/dist/api/navigation.react-server|/opt/canhelp/node_modules/next/headers.js=|next/dist/api/headers|/opt/canhelp/node_modules/next/og.js=|next/dist/api/og|/opt/canhelp/node_modules/next/server.js=|next/dist/api/server|/opt/canhelp/node_modules/next/document.js=|next/dist/api/document|/opt/canhelp/node_modules/next/app.js=|next/dist/api/app|next=|/opt/canhelp/node_modules/next|]|dependencyType=|esm|path=|/opt/canhelp/apps/web|request=|/opt/canhelp/apps/web/src/app/specialist-setup/page.tsx(Compilation/modules|javascript/auto|/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[16].oneOf[4].use[0]!/opt/canhelp/apps/web/src/app/specialist-setup/page.tsx|rsc+ResolverCachePlugin|normal|default|alias=|false|mainFields=[|0=|main|]|conditionNames=[|0=|node|1=|import|]|dependencyType=|esm|modules=[|0=|node_modules|]|fallback=|false|exportsFields=[|0=|exports|]|importsFields=[|0=|imports|]|descriptionFiles=[|0=|package.json|]|extensions=[|0=|.js|1=|.json|2=|.node|]|enforceExtensions=|false|symlinks=|true|mainFiles=[|0=|index|]|roots=[|]|fullySpecified=|true|preferRelative=|false|preferAbsolute=|false|restrictions=[|]|path=|/opt/canhelp/apps/web/src/app/specialist-setup|request=|react-server-dom-webpack/server ResolverCachePlugin|normal|default|alias=[|server-only$=|next/dist/compiled/server-only/empty|client-only$=|next/dist/compiled/client-only/error|next/dist/compiled/server-only$=|next/dist/compiled/server-only/empty|next/dist/compiled/client-only$=|next/dist/compiled/client-only/error|/opt/canhelp/node_modules/next/head.js=|next/dist/client/components/noop-head|/opt/canhelp/node_modules/next/image.js=|next/dist/api/image|/opt/canhelp/node_modules/next/constants.js=|next/dist/api/constants|/opt/canhelp/node_modules/next/router.js=|next/dist/api/router|/opt/canhelp/node_modules/next/dynamic.js=|next/dist/api/app-dynamic|/opt/canhelp/node_modules/next/script.js=|next/dist/api/script|/opt/canhelp/node_modules/next/link.js=|next/dist/client/app-dir/link|/opt/canhelp/node_modules/next/form.js=|next/dist/client/app-dir/form|/opt/canhelp/node_modules/next/navigation.js=|next/dist/api/navigation.react-server|/opt/canhelp/node_modules/next/headers.js=|next/dist/api/headers|/opt/canhelp/node_modules/next/og.js=|next/dist/api/og|/opt/canhelp/node_modules/next/server.js=|next/dist/api/server|/opt/canhelp/node_modules/next/document.js=|next/dist/api/document|/opt/canhelp/node_modules/next/app.js=|next/dist/api/app|react$=|next/dist/server/route-modules/app-page/vendored/rsc/react|react/compiler-runtime$=|next/dist/server/route-modules/app-page/vendored/rsc/react-compiler-runtime|react/jsx-dev-runtime$=|next/dist/server/route-modules/app-page/vendored/rsc/react-jsx-dev-runtime|react/jsx-runtime$=|next/dist/server/route-modules/app-page/vendored/rsc/react-jsx-runtime|react-dom$=|next/dist/server/route-modules/app-page/vendored/rsc/react-dom|react-dom/client$=|next/dist/compiled/react-dom/client|react-dom/server$=|next/dist/compiled/react-dom/server.node|react-dom/server.browser$=|next/dist/compiled/react-dom/server.browser|react-dom/server.edge$=|next/dist/build/webpack/alias/react-dom-server.js|react-dom/static$=|next/dist/compiled/react-dom/static.node|react-dom/static.browser$=|next/dist/compiled/react-dom/static.browser|react-dom/static.edge$=|next/dist/compiled/react-dom/static.edge|react-server-dom-webpack/client$=|next/dist/compiled/react-server-dom-webpack/client.node|react-server-dom-webpack/server$=|next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-webpack-server|react-server-dom-webpack/server.node$=|next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-webpack-server|react-server-dom-webpack/static$=|next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-webpack-static|@vercel/turbopack-ecmascript-runtime/browser/dev/hmr-client/hmr-client.ts=|next/dist/client/dev/noop-turbopack-hmr|next=|/opt/canhelp/node_modules/next|]|mainFields=[|0=|main|]|conditionNames=[|0=|node|1=|require|]|dependencyType=|commonjs|modules=[|0=|node_modules|]|fallback=|false|exportsFields=[|0=|exports|]|importsFields=[|0=|imports|]|descriptionFiles=[|0=|package.json|]|extensions=[|0=|.js|1=|.json|2=|.node|]|enforceExtensions=|false|symlinks=|true|mainFiles=[|0=|index|]|roots=[|]|fullySpecified=|false|preferRelative=|false|preferAbsolute=|false|restrictions=[|]|path=|/opt/canhelp/apps/web/src/app/specialist-setup|request=|react-server-dom-webpack/serverV ResolverCachePlugin|normal|default|alias=[|server-only$=|next/dist/compiled/server-only/empty|client-only$=|next/dist/compiled/client-only/error|next/dist/compiled/server-only$=|next/dist/compiled/server-only/empty|next/dist/compiled/client-only$=|next/dist/compiled/client-only/error|/opt/canhelp/node_modules/next/head.js=|next/dist/client/components/noop-head|/opt/canhelp/node_modules/next/image.js=|next/dist/api/image|/opt/canhelp/node_modules/next/constants.js=|next/dist/api/constants|/opt/canhelp/node_modules/next/router.js=|next/dist/api/router|/opt/canhelp/node_modules/next/dynamic.js=|next/dist/api/app-dynamic|/opt/canhelp/node_modules/next/script.js=|next/dist/api/script|/opt/canhelp/node_modules/next/link.js=|next/dist/client/app-dir/link|/opt/canhelp/node_modules/next/form.js=|next/dist/client/app-dir/form|/opt/canhelp/node_modules/next/navigation.js=|next/dist/api/navigation.react-server|/opt/canhelp/node_modules/next/headers.js=|next/dist/api/headers|/opt/canhelp/node_modules/next/og.js=|next/dist/api/og|/opt/canhelp/node_modules/next/server.js=|next/dist/api/server|/opt/canhelp/node_modules/next/document.js=|next/dist/api/document|/opt/canhelp/node_modules/next/app.js=|next/dist/api/app|react$=|next/dist/server/route-modules/app-page/vendored/rsc/react|react/compiler-runtime$=|next/dist/server/route-modules/app-page/vendored/rsc/react-compiler-runtime|react/jsx-dev-runtime$=|next/dist/server/route-modules/app-page/vendored/rsc/react-jsx-dev-runtime|react/jsx-runtime$=|next/dist/server/route-modules/app-page/vendored/rsc/react-jsx-runtime|react-dom$=|next/dist/server/route-modules/app-page/vendored/rsc/react-dom|react-dom/client$=|next/dist/compiled/react-dom/client|react-dom/server$=|next/dist/compiled/react-dom/server.node|react-dom/server.browser$=|next/dist/compiled/react-dom/server.browser|react-dom/server.edge$=|next/dist/build/webpack/alias/react-dom-server.js|react-dom/static$=|next/dist/compiled/react-dom/static.node|react-dom/static.browser$=|next/dist/compiled/react-dom/static.browser|react-dom/static.edge$=|next/dist/compiled/react-dom/static.edge|react-server-dom-webpack/client$=|next/dist/compiled/react-server-dom-webpack/client.node|react-server-dom-webpack/server$=|next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-webpack-server|react-server-dom-webpack/server.node$=|next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-webpack-server|react-server-dom-webpack/static$=|next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-webpack-static|@vercel/turbopack-ecmascript-runtime/browser/dev/hmr-client/hmr-client.ts=|next/dist/client/dev/noop-turbopack-hmr|next=|/opt/canhelp/node_modules/next|]|mainFields=[|0=|module|1=|main|]|conditionNames=[|0=|react-server|1=|...|]|dependencyType=|esm|path=|/opt/canhelp/apps/web/src/app/specialist-setup|request=|react-server-dom-webpack/serverResolverCachePlugin|normal|default|dependencyType=|esm|modules=[|0=|node_modules|]|fallback=|false|exportsFields=[|0=|exports|]|importsFields=[|0=|imports|]|conditionNames=[|0=|node|1=|import|]|descriptionFiles=[|0=|package.json|]|extensions=[|0=|.js|1=|.json|2=|.node|]|enforceExtensions=|false|symlinks=|true|mainFields=[|0=|main|]|mainFiles=[|0=|index|]|roots=[|]|fullySpecified=|true|preferRelative=|false|preferAbsolute=|false|restrictions=[|]|alias=|false|path=|/opt/canhelp/apps/web|request=|next-flight-client-entry-loader?modules=%7B%22request%22%3A%22%2Fopt%2Fcanhelp%2Fapps%2Fweb%2Fsrc%2Fapp%2Fspecialist-setup%2Fpage.tsx%22%2C%22ids%22%3A%5B%5D%7D&server=true!ResolverCachePlugin|normal|default|dependencyType=|commonjs|modules=[|0=|node_modules|]|fallback=|false|exportsFields=[|0=|exports|]|importsFields=[|0=|imports|]|conditionNames=[|0=|node|1=|require|]|descriptionFiles=[|0=|package.json|]|extensions=[|0=|.js|1=|.json|2=|.node|]|enforceExtensions=|false|symlinks=|true|mainFields=[|0=|main|]|mainFiles=[|0=|index|]|roots=[|]|fullySpecified=|false|preferRelative=|false|preferAbsolute=|false|restrictions=[|]|path=|/opt/canhelp/apps/web|request=|next-flight-client-entry-loader?modules=%7B%22request%22%3A%22%2Fopt%2Fcanhelp%2Fapps%2Fweb%2Fsrc%2Fapp%2Fspecialist-setup%2Fpage.tsx%22%2C%22ids%22%3A%5B%5D%7D&server=true!Compilation/modules|javascript/auto|/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-flight-client-entry-loader.js?modules=%7B%22request%22%3A%22%2Fopt%2Fcanhelp%2Fapps%2Fweb%2Fsrc%2Fapp%2Fspecialist-setup%2Fpage.tsx%22%2C%22ids%22%3A%5B%5D%7D&server=true!|ssrCompilation/modules|javascript/auto|/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-flight-client-entry-loader.js?modules=%7B%22request%22%3A%22%2Fopt%2Fcanhelp%2Fapps%2Fweb%2Fsrc%2Fapp%2Fspecialist-setup%2Fpage.tsx%22%2C%22ids%22%3A%5B%5D%7D&server=true!|rscMResolverCachePlugin|normal|default|alias=[|server-only$=|next/dist/compiled/server-only/index|client-only$=|next/dist/compiled/client-only/index|next/dist/compiled/client-only$=|next/dist/compiled/client-only/index|next/dist/compiled/server-only=|next/dist/compiled/server-only/index|/opt/canhelp/node_modules/next/head.js=|next/dist/client/components/noop-head|/opt/canhelp/node_modules/next/image.js=|next/dist/api/image|/opt/canhelp/node_modules/next/constants.js=|next/dist/api/constants|/opt/canhelp/node_modules/next/router.js=|next/dist/api/router|/opt/canhelp/node_modules/next/dynamic.js=|next/dist/api/app-dynamic|/opt/canhelp/node_modules/next/script.js=|next/dist/api/script|/opt/canhelp/node_modules/next/link.js=|next/dist/client/app-dir/link|/opt/canhelp/node_modules/next/form.js=|next/dist/client/app-dir/form|/opt/canhelp/node_modules/next/navigation.js=|next/dist/api/navigation|/opt/canhelp/node_modules/next/headers.js=|next/dist/api/headers|/opt/canhelp/node_modules/next/og.js=|next/dist/api/og|/opt/canhelp/node_modules/next/server.js=|next/dist/api/server|/opt/canhelp/node_modules/next/document.js=|next/dist/api/document|/opt/canhelp/node_modules/next/app.js=|next/dist/api/app|next=|/opt/canhelp/node_modules/next|]|dependencyType=|esm|path=|/opt/canhelp/apps/web|request=|/opt/canhelp/apps/web/src/app/become-specialist/page.tsxEResolverCachePlugin|normal|default|alias=[|server-only$=|next/dist/compiled/server-only/index|client-only$=|next/dist/compiled/client-only/index|next/dist/compiled/client-only$=|next/dist/compiled/client-only/index|next/dist/compiled/server-only=|next/dist/compiled/server-only/index|/opt/canhelp/node_modules/next/head.js=|next/dist/client/components/noop-head|/opt/canhelp/node_modules/next/image.js=|next/dist/api/image|/opt/canhelp/node_modules/next/constants.js=|next/dist/api/constants|/opt/canhelp/node_modules/next/router.js=|next/dist/api/router|/opt/canhelp/node_modules/next/dynamic.js=|next/dist/api/app-dynamic|/opt/canhelp/node_modules/next/script.js=|next/dist/api/script|/opt/canhelp/node_modules/next/link.js=|next/dist/client/app-dir/link|/opt/canhelp/node_modules/next/form.js=|next/dist/client/app-dir/form|/opt/canhelp/node_modules/next/navigation.js=|next/dist/api/navigation|/opt/canhelp/node_modules/next/headers.js=|next/dist/api/headers|/opt/canhelp/node_modules/next/og.js=|next/dist/api/og|/opt/canhelp/node_modules/next/server.js=|next/dist/api/server|/opt/canhelp/node_modules/next/document.js=|next/dist/api/document|/opt/canhelp/node_modules/next/app.js=|next/dist/api/app|next=|/opt/canhelp/node_modules/next|]|dependencyType=|esm|path=|/opt/canhelp/apps/web|request=|/opt/canhelp/apps/web/src/app/dashboard/page.tsxLResolverCachePlugin|normal|default|alias=[|server-only$=|next/dist/compiled/server-only/index|client-only$=|next/dist/compiled/client-only/index|next/dist/compiled/client-only$=|next/dist/compiled/client-only/index|next/dist/compiled/server-only=|next/dist/compiled/server-only/index|/opt/canhelp/node_modules/next/head.js=|next/dist/client/components/noop-head|/opt/canhelp/node_modules/next/image.js=|next/dist/api/image|/opt/canhelp/node_modules/next/constants.js=|next/dist/api/constants|/opt/canhelp/node_modules/next/router.js=|next/dist/api/router|/opt/canhelp/node_modules/next/dynamic.js=|next/dist/api/app-dynamic|/opt/canhelp/node_modules/next/script.js=|next/dist/api/script|/opt/canhelp/node_modules/next/link.js=|next/dist/client/app-dir/link|/opt/canhelp/node_modules/next/form.js=|next/dist/client/app-dir/form|/opt/canhelp/node_modules/next/navigation.js=|next/dist/api/navigation|/opt/canhelp/node_modules/next/headers.js=|next/dist/api/headers|/opt/canhelp/node_modules/next/og.js=|next/dist/api/og|/opt/canhelp/node_modules/next/server.js=|next/dist/api/server|/opt/canhelp/node_modules/next/document.js=|next/dist/api/document|/opt/canhelp/node_modules/next/app.js=|next/dist/api/app|next=|/opt/canhelp/node_modules/next|]|dependencyType=|esm|path=|/opt/canhelp/apps/web|request=|/opt/canhelp/apps/web/src/app/specialist-setup/page.tsx1Compilation/modules|javascript/auto|/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-flight-client-module-loader.js!/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[16].oneOf[7].use[1]!/opt/canhelp/apps/web/src/app/become-specialist/page.tsx|ssr)Compilation/modules|javascript/auto|/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-flight-client-module-loader.js!/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[16].oneOf[7].use[1]!/opt/canhelp/apps/web/src/app/dashboard/page.tsx|ssrResolverCachePlugin|normal|default|alias=|false|mainFields=[|0=|main|]|dependencyType=|esm|modules=[|0=|node_modules|]|fallback=|false|exportsFields=[|0=|exports|]|importsFields=[|0=|imports|]|conditionNames=[|0=|node|1=|import|]|descriptionFiles=[|0=|package.json|]|extensions=[|0=|.js|1=|.json|2=|.node|]|enforceExtensions=|false|symlinks=|true|mainFiles=[|0=|index|]|roots=[|]|fullySpecified=|true|preferRelative=|false|preferAbsolute=|false|restrictions=[|]|path=|/opt/canhelp/apps/web/src/app/specialist-setup|request=|react/jsx-runtimeResolverCachePlugin|normal|default|alias=|false|mainFields=[|0=|main|]|dependencyType=|esm|modules=[|0=|node_modules|]|fallback=|false|exportsFields=[|0=|exports|]|importsFields=[|0=|imports|]|conditionNames=[|0=|node|1=|import|]|descriptionFiles=[|0=|package.json|]|extensions=[|0=|.js|1=|.json|2=|.node|]|enforceExtensions=|false|symlinks=|true|mainFiles=[|0=|index|]|roots=[|]|fullySpecified=|true|preferRelative=|false|preferAbsolute=|false|restrictions=[|]|path=|/opt/canhelp/apps/web/src/app/specialist-setup|request=|reactResolverCachePlugin|normal|default|alias=|false|mainFields=[|0=|main|]|dependencyType=|esm|modules=[|0=|node_modules|]|fallback=|false|exportsFields=[|0=|exports|]|importsFields=[|0=|imports|]|conditionNames=[|0=|node|1=|import|]|descriptionFiles=[|0=|package.json|]|extensions=[|0=|.js|1=|.json|2=|.node|]|enforceExtensions=|false|symlinks=|true|mainFiles=[|0=|index|]|roots=[|]|fullySpecified=|true|preferRelative=|false|preferAbsolute=|false|restrictions=[|]|path=|/opt/canhelp/apps/web/src/app/specialist-setup|request=|@/lib/authResolverCachePlugin|normal|default|alias=|false|mainFields=[|0=|main|]|dependencyType=|esm|modules=[|0=|node_modules|]|fallback=|false|exportsFields=[|0=|exports|]|importsFields=[|0=|imports|]|conditionNames=[|0=|node|1=|import|]|descriptionFiles=[|0=|package.json|]|extensions=[|0=|.js|1=|.json|2=|.node|]|enforceExtensions=|false|symlinks=|true|mainFiles=[|0=|index|]|roots=[|]|fullySpecified=|true|preferRelative=|false|preferAbsolute=|false|restrictions=[|]|path=|/opt/canhelp/apps/web/src/app/specialist-setup|request=|@/context/localeResolverCachePlugin|normal|default|alias=|false|mainFields=[|0=|main|]|dependencyType=|esm|modules=[|0=|node_modules|]|fallback=|false|exportsFields=[|0=|exports|]|importsFields=[|0=|imports|]|conditionNames=[|0=|node|1=|import|]|descriptionFiles=[|0=|package.json|]|extensions=[|0=|.js|1=|.json|2=|.node|]|enforceExtensions=|false|symlinks=|true|mainFiles=[|0=|index|]|roots=[|]|fullySpecified=|true|preferRelative=|false|preferAbsolute=|false|restrictions=[|]|path=|/opt/canhelp/apps/web/src/app/specialist-setup|request=|@/lib/api ResolverCachePlugin|normal|default|alias=[|server-only$=|next/dist/compiled/server-only/index|client-only$=|next/dist/compiled/client-only/index|next/dist/compiled/client-only$=|next/dist/compiled/client-only/index|next/dist/compiled/server-only=|next/dist/compiled/server-only/index|/opt/canhelp/node_modules/next/head.js=|next/dist/client/components/noop-head|/opt/canhelp/node_modules/next/image.js=|next/dist/api/image|/opt/canhelp/node_modules/next/constants.js=|next/dist/api/constants|/opt/canhelp/node_modules/next/router.js=|next/dist/api/router|/opt/canhelp/node_modules/next/dynamic.js=|next/dist/api/app-dynamic|/opt/canhelp/node_modules/next/script.js=|next/dist/api/script|/opt/canhelp/node_modules/next/link.js=|next/dist/client/app-dir/link|/opt/canhelp/node_modules/next/form.js=|next/dist/client/app-dir/form|/opt/canhelp/node_modules/next/navigation.js=|next/dist/api/navigation|/opt/canhelp/node_modules/next/headers.js=|next/dist/api/headers|/opt/canhelp/node_modules/next/og.js=|next/dist/api/og|/opt/canhelp/node_modules/next/server.js=|next/dist/api/server|/opt/canhelp/node_modules/next/document.js=|next/dist/api/document|/opt/canhelp/node_modules/next/app.js=|next/dist/api/app|react$=|next/dist/server/route-modules/app-page/vendored/ssr/react|react/compiler-runtime$=|next/dist/server/route-modules/app-page/vendored/ssr/react-compiler-runtime|react/jsx-dev-runtime$=|next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-dev-runtime|react/jsx-runtime$=|next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime|react-dom$=|next/dist/server/route-modules/app-page/vendored/ssr/react-dom|react-dom/client$=|next/dist/compiled/react-dom/client|react-dom/server$=|next/dist/compiled/react-dom/server.node|react-dom/server.browser$=|next/dist/compiled/react-dom/server.browser|react-dom/server.edge$=|next/dist/build/webpack/alias/react-dom-server.js|react-dom/static$=|next/dist/compiled/react-dom/static.node|react-dom/static.browser$=|next/dist/compiled/react-dom/static.browser|react-dom/static.edge$=|next/dist/compiled/react-dom/static.edge|react-server-dom-webpack/client$=|next/dist/server/route-modules/app-page/vendored/ssr/react-server-dom-webpack-client|react-server-dom-webpack/server$=|next/dist/compiled/react-server-dom-webpack/server.node|react-server-dom-webpack/server.node$=|next/dist/compiled/react-server-dom-webpack/server.node|react-server-dom-webpack/static$=|next/dist/compiled/react-server-dom-webpack/static.node|@vercel/turbopack-ecmascript-runtime/browser/dev/hmr-client/hmr-client.ts=|next/dist/client/dev/noop-turbopack-hmr|next=|/opt/canhelp/node_modules/next|]|mainFields=[|0=|module|1=|main|]|dependencyType=|esm|path=|/opt/canhelp/apps/web/src/app/specialist-setup|request=|next/navigation?ResolverCachePlugin|normal|default|alias=|false|mainFields=[|0=|main|]|dependencyType=|esm|modules=[|0=|node_modules|]|fallback=|false|exportsFields=[|0=|exports|]|importsFields=[|0=|imports|]|conditionNames=[|0=|node|1=|import|]|descriptionFiles=[|0=|package.json|]|extensions=[|0=|.js|1=|.json|2=|.node|]|enforceExtensions=|false|symlinks=|true|mainFiles=[|0=|index|]|roots=[|]|fullySpecified=|true|preferRelative=|false|preferAbsolute=|false|restrictions=[|]|path=|/opt/canhelp/apps/web/src/app/specialist-setup|request=|/opt/canhelp/apps/web/src/context/locale|query=||fragment=||module=|true|directory=|false|file=|false|internal=|false|fullySpecified=|true|descriptionFilePath=|/opt/canhelp/apps/web/package.json|descriptionFileData=[|name=|web|version=|0.1.0|private=|true|scripts=[|dev=|next dev --port 3000|build=|next build|start=|next start|lint=|next lint|typecheck=|tsc --noEmit|]|dependencies=[|@canhelp/shared=|*|@marsidev/react-turnstile=|^1.5.0|better-auth=|^1.2.7|nanostores=|^1.2.0|next=|^15.1.6|react=|^19.0.0|react-dom=|^19.0.0|socket.io-client=|^4.8.1|zod=|^3.24.1|]|devDependencies=[|@types/node=|^22.10.7|@types/react=|^19.0.6|@types/react-dom=|^19.0.3|autoprefixer=|^10.4.20|postcss=|^8.5.1|tailwindcss=|^3.4.17|typescript=|^5.7.3|]|]|descriptionFileRoot=|/opt/canhelp/apps/web|relativePath=|./src/app/specialist-setup8ResolverCachePlugin|normal|default|alias=|false|mainFields=[|0=|main|]|dependencyType=|esm|modules=[|0=|node_modules|]|fallback=|false|exportsFields=[|0=|exports|]|importsFields=[|0=|imports|]|conditionNames=[|0=|node|1=|import|]|descriptionFiles=[|0=|package.json|]|extensions=[|0=|.js|1=|.json|2=|.node|]|enforceExtensions=|false|symlinks=|true|mainFiles=[|0=|index|]|roots=[|]|fullySpecified=|true|preferRelative=|false|preferAbsolute=|false|restrictions=[|]|path=|/opt/canhelp/apps/web/src/app/specialist-setup|request=|/opt/canhelp/apps/web/src/lib/api|query=||fragment=||module=|true|directory=|false|file=|false|internal=|false|fullySpecified=|true|descriptionFilePath=|/opt/canhelp/apps/web/package.json|descriptionFileData=[|name=|web|version=|0.1.0|private=|true|scripts=[|dev=|next dev --port 3000|build=|next build|start=|next start|lint=|next lint|typecheck=|tsc --noEmit|]|dependencies=[|@canhelp/shared=|*|@marsidev/react-turnstile=|^1.5.0|better-auth=|^1.2.7|nanostores=|^1.2.0|next=|^15.1.6|react=|^19.0.0|react-dom=|^19.0.0|socket.io-client=|^4.8.1|zod=|^3.24.1|]|devDependencies=[|@types/node=|^22.10.7|@types/react=|^19.0.6|@types/react-dom=|^19.0.3|autoprefixer=|^10.4.20|postcss=|^8.5.1|tailwindcss=|^3.4.17|typescript=|^5.7.3|]|]|descriptionFileRoot=|/opt/canhelp/apps/web|relativePath=|./src/app/specialist-setupE ResolverCachePlugin|normal|default|alias=[|server-only$=|next/dist/compiled/server-only/index|client-only$=|next/dist/compiled/client-only/index|next/dist/compiled/client-only$=|next/dist/compiled/client-only/index|next/dist/compiled/server-only=|next/dist/compiled/server-only/index|/opt/canhelp/node_modules/next/head.js=|next/dist/client/components/noop-head|/opt/canhelp/node_modules/next/image.js=|next/dist/api/image|/opt/canhelp/node_modules/next/constants.js=|next/dist/api/constants|/opt/canhelp/node_modules/next/router.js=|next/dist/api/router|/opt/canhelp/node_modules/next/dynamic.js=|next/dist/api/app-dynamic|/opt/canhelp/node_modules/next/script.js=|next/dist/api/script|/opt/canhelp/node_modules/next/link.js=|next/dist/client/app-dir/link|/opt/canhelp/node_modules/next/form.js=|next/dist/client/app-dir/form|/opt/canhelp/node_modules/next/navigation.js=|next/dist/api/navigation|/opt/canhelp/node_modules/next/headers.js=|next/dist/api/headers|/opt/canhelp/node_modules/next/og.js=|next/dist/api/og|/opt/canhelp/node_modules/next/server.js=|next/dist/api/server|/opt/canhelp/node_modules/next/document.js=|next/dist/api/document|/opt/canhelp/node_modules/next/app.js=|next/dist/api/app|react$=|next/dist/server/route-modules/app-page/vendored/ssr/react|react/compiler-runtime$=|next/dist/server/route-modules/app-page/vendored/ssr/react-compiler-runtime|react/jsx-dev-runtime$=|next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-dev-runtime|react/jsx-runtime$=|next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime|react-dom$=|next/dist/server/route-modules/app-page/vendored/ssr/react-dom|react-dom/client$=|next/dist/compiled/react-dom/client|react-dom/server$=|next/dist/compiled/react-dom/server.node|react-dom/server.browser$=|next/dist/compiled/react-dom/server.browser|react-dom/server.edge$=|next/dist/build/webpack/alias/react-dom-server.js|react-dom/static$=|next/dist/compiled/react-dom/static.node|react-dom/static.browser$=|next/dist/compiled/react-dom/static.browser|react-dom/static.edge$=|next/dist/compiled/react-dom/static.edge|react-server-dom-webpack/client$=|next/dist/server/route-modules/app-page/vendored/ssr/react-server-dom-webpack-client|react-server-dom-webpack/server$=|next/dist/compiled/react-server-dom-webpack/server.node|react-server-dom-webpack/server.node$=|next/dist/compiled/react-server-dom-webpack/server.node|react-server-dom-webpack/static$=|next/dist/compiled/react-server-dom-webpack/static.node|@vercel/turbopack-ecmascript-runtime/browser/dev/hmr-client/hmr-client.ts=|next/dist/client/dev/noop-turbopack-hmr|next=|/opt/canhelp/node_modules/next|]|mainFields=[|0=|main|]|dependencyType=|commonjs|modules=[|0=|node_modules|]|fallback=|false|exportsFields=[|0=|exports|]|importsFields=[|0=|imports|]|conditionNames=[|0=|node|1=|require|]|descriptionFiles=[|0=|package.json|]|extensions=[|0=|.js|1=|.json|2=|.node|]|enforceExtensions=|false|symlinks=|true|mainFiles=[|0=|index|]|roots=[|]|fullySpecified=|false|preferRelative=|false|preferAbsolute=|false|restrictions=[|]|path=|/opt/canhelp/apps/web/src/app/specialist-setup|request=|@/context/locale> ResolverCachePlugin|normal|default|alias=[|server-only$=|next/dist/compiled/server-only/index|client-only$=|next/dist/compiled/client-only/index|next/dist/compiled/client-only$=|next/dist/compiled/client-only/index|next/dist/compiled/server-only=|next/dist/compiled/server-only/index|/opt/canhelp/node_modules/next/head.js=|next/dist/client/components/noop-head|/opt/canhelp/node_modules/next/image.js=|next/dist/api/image|/opt/canhelp/node_modules/next/constants.js=|next/dist/api/constants|/opt/canhelp/node_modules/next/router.js=|next/dist/api/router|/opt/canhelp/node_modules/next/dynamic.js=|next/dist/api/app-dynamic|/opt/canhelp/node_modules/next/script.js=|next/dist/api/script|/opt/canhelp/node_modules/next/link.js=|next/dist/client/app-dir/link|/opt/canhelp/node_modules/next/form.js=|next/dist/client/app-dir/form|/opt/canhelp/node_modules/next/navigation.js=|next/dist/api/navigation|/opt/canhelp/node_modules/next/headers.js=|next/dist/api/headers|/opt/canhelp/node_modules/next/og.js=|next/dist/api/og|/opt/canhelp/node_modules/next/server.js=|next/dist/api/server|/opt/canhelp/node_modules/next/document.js=|next/dist/api/document|/opt/canhelp/node_modules/next/app.js=|next/dist/api/app|react$=|next/dist/server/route-modules/app-page/vendored/ssr/react|react/compiler-runtime$=|next/dist/server/route-modules/app-page/vendored/ssr/react-compiler-runtime|react/jsx-dev-runtime$=|next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-dev-runtime|react/jsx-runtime$=|next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime|react-dom$=|next/dist/server/route-modules/app-page/vendored/ssr/react-dom|react-dom/client$=|next/dist/compiled/react-dom/client|react-dom/server$=|next/dist/compiled/react-dom/server.node|react-dom/server.browser$=|next/dist/compiled/react-dom/server.browser|react-dom/server.edge$=|next/dist/build/webpack/alias/react-dom-server.js|react-dom/static$=|next/dist/compiled/react-dom/static.node|react-dom/static.browser$=|next/dist/compiled/react-dom/static.browser|react-dom/static.edge$=|next/dist/compiled/react-dom/static.edge|react-server-dom-webpack/client$=|next/dist/server/route-modules/app-page/vendored/ssr/react-server-dom-webpack-client|react-server-dom-webpack/server$=|next/dist/compiled/react-server-dom-webpack/server.node|react-server-dom-webpack/server.node$=|next/dist/compiled/react-server-dom-webpack/server.node|react-server-dom-webpack/static$=|next/dist/compiled/react-server-dom-webpack/static.node|@vercel/turbopack-ecmascript-runtime/browser/dev/hmr-client/hmr-client.ts=|next/dist/client/dev/noop-turbopack-hmr|next=|/opt/canhelp/node_modules/next|]|mainFields=[|0=|main|]|dependencyType=|commonjs|modules=[|0=|node_modules|]|fallback=|false|exportsFields=[|0=|exports|]|importsFields=[|0=|imports|]|conditionNames=[|0=|node|1=|require|]|descriptionFiles=[|0=|package.json|]|extensions=[|0=|.js|1=|.json|2=|.node|]|enforceExtensions=|false|symlinks=|true|mainFiles=[|0=|index|]|roots=[|]|fullySpecified=|false|preferRelative=|false|preferAbsolute=|false|restrictions=[|]|path=|/opt/canhelp/apps/web/src/app/specialist-setup|request=|@/lib/apiiResolverCachePlugin|normal|default|alias=[|server-only$=|next/dist/compiled/server-only/index|client-only$=|next/dist/compiled/client-only/index|next/dist/compiled/client-only$=|next/dist/compiled/client-only/index|next/dist/compiled/server-only=|next/dist/compiled/server-only/index|/opt/canhelp/node_modules/next/head.js=|next/dist/client/components/noop-head|/opt/canhelp/node_modules/next/image.js=|next/dist/api/image|/opt/canhelp/node_modules/next/constants.js=|next/dist/api/constants|/opt/canhelp/node_modules/next/router.js=|next/dist/api/router|/opt/canhelp/node_modules/next/dynamic.js=|next/dist/api/app-dynamic|/opt/canhelp/node_modules/next/script.js=|next/dist/api/script|/opt/canhelp/node_modules/next/link.js=|next/dist/client/app-dir/link|/opt/canhelp/node_modules/next/form.js=|next/dist/client/app-dir/form|/opt/canhelp/node_modules/next/navigation.js=|next/dist/api/navigation|/opt/canhelp/node_modules/next/headers.js=|next/dist/api/headers|/opt/canhelp/node_modules/next/og.js=|next/dist/api/og|/opt/canhelp/node_modules/next/server.js=|next/dist/api/server|/opt/canhelp/node_modules/next/document.js=|next/dist/api/document|/opt/canhelp/node_modules/next/app.js=|next/dist/api/app|react$=|next/dist/server/route-modules/app-page/vendored/ssr/react|react/compiler-runtime$=|next/dist/server/route-modules/app-page/vendored/ssr/react-compiler-runtime|react/jsx-dev-runtime$=|next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-dev-runtime|react/jsx-runtime$=|next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime|react-dom$=|next/dist/server/route-modules/app-page/vendored/ssr/react-dom|react-dom/client$=|next/dist/compiled/react-dom/client|react-dom/server$=|next/dist/compiled/react-dom/server.node|react-dom/server.browser$=|next/dist/compiled/react-dom/server.browser|react-dom/server.edge$=|next/dist/build/webpack/alias/react-dom-server.js|react-dom/static$=|next/dist/compiled/react-dom/static.node|react-dom/static.browser$=|next/dist/compiled/react-dom/static.browser|react-dom/static.edge$=|next/dist/compiled/react-dom/static.edge|react-server-dom-webpack/client$=|next/dist/server/route-modules/app-page/vendored/ssr/react-server-dom-webpack-client|react-server-dom-webpack/server$=|next/dist/compiled/react-server-dom-webpack/server.node|react-server-dom-webpack/server.node$=|next/dist/compiled/react-server-dom-webpack/server.node|react-server-dom-webpack/static$=|next/dist/compiled/react-server-dom-webpack/static.node|@vercel/turbopack-ecmascript-runtime/browser/dev/hmr-client/hmr-client.ts=|next/dist/client/dev/noop-turbopack-hmr|next=|/opt/canhelp/node_modules/next|]|mainFields=[|0=|main|]|dependencyType=|commonjs|modules=[|0=|node_modules|]|fallback=|false|exportsFields=[|0=|exports|]|importsFields=[|0=|imports|]|conditionNames=[|0=|node|1=|require|]|descriptionFiles=[|0=|package.json|]|extensions=[|0=|.js|1=|.json|2=|.node|]|enforceExtensions=|false|symlinks=|true|mainFiles=[|0=|index|]|roots=[|]|fullySpecified=|false|preferRelative=|false|preferAbsolute=|false|restrictions=[|]|path=|/opt/canhelp/apps/web/src/app/specialist-setup|request=|/opt/canhelp/apps/web/src/context/locale|query=||fragment=||module=|true|directory=|false|file=|false|internal=|false|fullySpecified=|false|descriptionFilePath=|/opt/canhelp/apps/web/package.json|descriptionFileData=[|name=|web|version=|0.1.0|private=|true|scripts=[|dev=|next dev --port 3000|build=|next build|start=|next start|lint=|next lint|typecheck=|tsc --noEmit|]|dependencies=[|@canhelp/shared=|*|@marsidev/react-turnstile=|^1.5.0|better-auth=|^1.2.7|nanostores=|^1.2.0|next=|^15.1.6|react=|^19.0.0|react-dom=|^19.0.0|socket.io-client=|^4.8.1|zod=|^3.24.1|]|devDependencies=[|@types/node=|^22.10.7|@types/react=|^19.0.6|@types/react-dom=|^19.0.3|autoprefixer=|^10.4.20|postcss=|^8.5.1|tailwindcss=|^3.4.17|typescript=|^5.7.3|]|]|descriptionFileRoot=|/opt/canhelp/apps/web|relativePath=|./src/app/specialist-setupbResolverCachePlugin|normal|default|alias=[|server-only$=|next/dist/compiled/server-only/index|client-only$=|next/dist/compiled/client-only/index|next/dist/compiled/client-only$=|next/dist/compiled/client-only/index|next/dist/compiled/server-only=|next/dist/compiled/server-only/index|/opt/canhelp/node_modules/next/head.js=|next/dist/client/components/noop-head|/opt/canhelp/node_modules/next/image.js=|next/dist/api/image|/opt/canhelp/node_modules/next/constants.js=|next/dist/api/constants|/opt/canhelp/node_modules/next/router.js=|next/dist/api/router|/opt/canhelp/node_modules/next/dynamic.js=|next/dist/api/app-dynamic|/opt/canhelp/node_modules/next/script.js=|next/dist/api/script|/opt/canhelp/node_modules/next/link.js=|next/dist/client/app-dir/link|/opt/canhelp/node_modules/next/form.js=|next/dist/client/app-dir/form|/opt/canhelp/node_modules/next/navigation.js=|next/dist/api/navigation|/opt/canhelp/node_modules/next/headers.js=|next/dist/api/headers|/opt/canhelp/node_modules/next/og.js=|next/dist/api/og|/opt/canhelp/node_modules/next/server.js=|next/dist/api/server|/opt/canhelp/node_modules/next/document.js=|next/dist/api/document|/opt/canhelp/node_modules/next/app.js=|next/dist/api/app|react$=|next/dist/server/route-modules/app-page/vendored/ssr/react|react/compiler-runtime$=|next/dist/server/route-modules/app-page/vendored/ssr/react-compiler-runtime|react/jsx-dev-runtime$=|next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-dev-runtime|react/jsx-runtime$=|next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime|react-dom$=|next/dist/server/route-modules/app-page/vendored/ssr/react-dom|react-dom/client$=|next/dist/compiled/react-dom/client|react-dom/server$=|next/dist/compiled/react-dom/server.node|react-dom/server.browser$=|next/dist/compiled/react-dom/server.browser|react-dom/server.edge$=|next/dist/build/webpack/alias/react-dom-server.js|react-dom/static$=|next/dist/compiled/react-dom/static.node|react-dom/static.browser$=|next/dist/compiled/react-dom/static.browser|react-dom/static.edge$=|next/dist/compiled/react-dom/static.edge|react-server-dom-webpack/client$=|next/dist/server/route-modules/app-page/vendored/ssr/react-server-dom-webpack-client|react-server-dom-webpack/server$=|next/dist/compiled/react-server-dom-webpack/server.node|react-server-dom-webpack/server.node$=|next/dist/compiled/react-server-dom-webpack/server.node|react-server-dom-webpack/static$=|next/dist/compiled/react-server-dom-webpack/static.node|@vercel/turbopack-ecmascript-runtime/browser/dev/hmr-client/hmr-client.ts=|next/dist/client/dev/noop-turbopack-hmr|next=|/opt/canhelp/node_modules/next|]|mainFields=[|0=|main|]|dependencyType=|commonjs|modules=[|0=|node_modules|]|fallback=|false|exportsFields=[|0=|exports|]|importsFields=[|0=|imports|]|conditionNames=[|0=|node|1=|require|]|descriptionFiles=[|0=|package.json|]|extensions=[|0=|.js|1=|.json|2=|.node|]|enforceExtensions=|false|symlinks=|true|mainFiles=[|0=|index|]|roots=[|]|fullySpecified=|false|preferRelative=|false|preferAbsolute=|false|restrictions=[|]|path=|/opt/canhelp/apps/web/src/app/specialist-setup|request=|/opt/canhelp/apps/web/src/lib/api|query=||fragment=||module=|true|directory=|false|file=|false|internal=|false|fullySpecified=|false|descriptionFilePath=|/opt/canhelp/apps/web/package.json|descriptionFileData=[|name=|web|version=|0.1.0|private=|true|scripts=[|dev=|next dev --port 3000|build=|next build|start=|next start|lint=|next lint|typecheck=|tsc --noEmit|]|dependencies=[|@canhelp/shared=|*|@marsidev/react-turnstile=|^1.5.0|better-auth=|^1.2.7|nanostores=|^1.2.0|next=|^15.1.6|react=|^19.0.0|react-dom=|^19.0.0|socket.io-client=|^4.8.1|zod=|^3.24.1|]|devDependencies=[|@types/node=|^22.10.7|@types/react=|^19.0.6|@types/react-dom=|^19.0.3|autoprefixer=|^10.4.20|postcss=|^8.5.1|tailwindcss=|^3.4.17|typescript=|^5.7.3|]|]|descriptionFileRoot=|/opt/canhelp/apps/web|relativePath=|./src/app/specialist-setup ResolverCachePlugin|normal|default|alias=[|server-only$=|next/dist/compiled/server-only/index|client-only$=|next/dist/compiled/client-only/index|next/dist/compiled/client-only$=|next/dist/compiled/client-only/index|next/dist/compiled/server-only=|next/dist/compiled/server-only/index|/opt/canhelp/node_modules/next/head.js=|next/dist/client/components/noop-head|/opt/canhelp/node_modules/next/image.js=|next/dist/api/image|/opt/canhelp/node_modules/next/constants.js=|next/dist/api/constants|/opt/canhelp/node_modules/next/router.js=|next/dist/api/router|/opt/canhelp/node_modules/next/dynamic.js=|next/dist/api/app-dynamic|/opt/canhelp/node_modules/next/script.js=|next/dist/api/script|/opt/canhelp/node_modules/next/link.js=|next/dist/client/app-dir/link|/opt/canhelp/node_modules/next/form.js=|next/dist/client/app-dir/form|/opt/canhelp/node_modules/next/navigation.js=|next/dist/api/navigation|/opt/canhelp/node_modules/next/headers.js=|next/dist/api/headers|/opt/canhelp/node_modules/next/og.js=|next/dist/api/og|/opt/canhelp/node_modules/next/server.js=|next/dist/api/server|/opt/canhelp/node_modules/next/document.js=|next/dist/api/document|/opt/canhelp/node_modules/next/app.js=|next/dist/api/app|react$=|next/dist/server/route-modules/app-page/vendored/ssr/react|react/compiler-runtime$=|next/dist/server/route-modules/app-page/vendored/ssr/react-compiler-runtime|react/jsx-dev-runtime$=|next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-dev-runtime|react/jsx-runtime$=|next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime|react-dom$=|next/dist/server/route-modules/app-page/vendored/ssr/react-dom|react-dom/client$=|next/dist/compiled/react-dom/client|react-dom/server$=|next/dist/compiled/react-dom/server.node|react-dom/server.browser$=|next/dist/compiled/react-dom/server.browser|react-dom/server.edge$=|next/dist/build/webpack/alias/react-dom-server.js|react-dom/static$=|next/dist/compiled/react-dom/static.node|react-dom/static.browser$=|next/dist/compiled/react-dom/static.browser|react-dom/static.edge$=|next/dist/compiled/react-dom/static.edge|react-server-dom-webpack/client$=|next/dist/server/route-modules/app-page/vendored/ssr/react-server-dom-webpack-client|react-server-dom-webpack/server$=|next/dist/compiled/react-server-dom-webpack/server.node|react-server-dom-webpack/server.node$=|next/dist/compiled/react-server-dom-webpack/server.node|react-server-dom-webpack/static$=|next/dist/compiled/react-server-dom-webpack/static.node|@vercel/turbopack-ecmascript-runtime/browser/dev/hmr-client/hmr-client.ts=|next/dist/client/dev/noop-turbopack-hmr|next=|/opt/canhelp/node_modules/next|]|mainFields=[|0=|module|1=|main|]|dependencyType=|esm|path=|/opt/canhelp/apps/web/src/app/specialist-setup|request=|@/context/locale9ResolverCachePlugin|normal|default|alias=|false|mainFields=[|0=|main|]|dependencyType=|esm|modules=[|0=|node_modules|]|fallback=|false|exportsFields=[|0=|exports|]|importsFields=[|0=|imports|]|conditionNames=[|0=|node|1=|import|]|descriptionFiles=[|0=|package.json|]|extensions=[|0=|.js|1=|.json|2=|.node|]|enforceExtensions=|false|symlinks=|true|mainFiles=[|0=|index|]|roots=[|]|fullySpecified=|true|preferRelative=|false|preferAbsolute=|false|restrictions=[|]|path=|/opt/canhelp/apps/web/src/app/specialist-setup|request=|/opt/canhelp/apps/web/src/lib/auth|query=||fragment=||module=|true|directory=|false|file=|false|internal=|false|fullySpecified=|true|descriptionFilePath=|/opt/canhelp/apps/web/package.json|descriptionFileData=[|name=|web|version=|0.1.0|private=|true|scripts=[|dev=|next dev --port 3000|build=|next build|start=|next start|lint=|next lint|typecheck=|tsc --noEmit|]|dependencies=[|@canhelp/shared=|*|@marsidev/react-turnstile=|^1.5.0|better-auth=|^1.2.7|nanostores=|^1.2.0|next=|^15.1.6|react=|^19.0.0|react-dom=|^19.0.0|socket.io-client=|^4.8.1|zod=|^3.24.1|]|devDependencies=[|@types/node=|^22.10.7|@types/react=|^19.0.6|@types/react-dom=|^19.0.3|autoprefixer=|^10.4.20|postcss=|^8.5.1|tailwindcss=|^3.4.17|typescript=|^5.7.3|]|]|descriptionFileRoot=|/opt/canhelp/apps/web|relativePath=|./src/app/specialist-setup? ResolverCachePlugin|normal|default|alias=[|server-only$=|next/dist/compiled/server-only/index|client-only$=|next/dist/compiled/client-only/index|next/dist/compiled/client-only$=|next/dist/compiled/client-only/index|next/dist/compiled/server-only=|next/dist/compiled/server-only/index|/opt/canhelp/node_modules/next/head.js=|next/dist/client/components/noop-head|/opt/canhelp/node_modules/next/image.js=|next/dist/api/image|/opt/canhelp/node_modules/next/constants.js=|next/dist/api/constants|/opt/canhelp/node_modules/next/router.js=|next/dist/api/router|/opt/canhelp/node_modules/next/dynamic.js=|next/dist/api/app-dynamic|/opt/canhelp/node_modules/next/script.js=|next/dist/api/script|/opt/canhelp/node_modules/next/link.js=|next/dist/client/app-dir/link|/opt/canhelp/node_modules/next/form.js=|next/dist/client/app-dir/form|/opt/canhelp/node_modules/next/navigation.js=|next/dist/api/navigation|/opt/canhelp/node_modules/next/headers.js=|next/dist/api/headers|/opt/canhelp/node_modules/next/og.js=|next/dist/api/og|/opt/canhelp/node_modules/next/server.js=|next/dist/api/server|/opt/canhelp/node_modules/next/document.js=|next/dist/api/document|/opt/canhelp/node_modules/next/app.js=|next/dist/api/app|react$=|next/dist/server/route-modules/app-page/vendored/ssr/react|react/compiler-runtime$=|next/dist/server/route-modules/app-page/vendored/ssr/react-compiler-runtime|react/jsx-dev-runtime$=|next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-dev-runtime|react/jsx-runtime$=|next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime|react-dom$=|next/dist/server/route-modules/app-page/vendored/ssr/react-dom|react-dom/client$=|next/dist/compiled/react-dom/client|react-dom/server$=|next/dist/compiled/react-dom/server.node|react-dom/server.browser$=|next/dist/compiled/react-dom/server.browser|react-dom/server.edge$=|next/dist/build/webpack/alias/react-dom-server.js|react-dom/static$=|next/dist/compiled/react-dom/static.node|react-dom/static.browser$=|next/dist/compiled/react-dom/static.browser|react-dom/static.edge$=|next/dist/compiled/react-dom/static.edge|react-server-dom-webpack/client$=|next/dist/server/route-modules/app-page/vendored/ssr/react-server-dom-webpack-client|react-server-dom-webpack/server$=|next/dist/compiled/react-server-dom-webpack/server.node|react-server-dom-webpack/server.node$=|next/dist/compiled/react-server-dom-webpack/server.node|react-server-dom-webpack/static$=|next/dist/compiled/react-server-dom-webpack/static.node|@vercel/turbopack-ecmascript-runtime/browser/dev/hmr-client/hmr-client.ts=|next/dist/client/dev/noop-turbopack-hmr|next=|/opt/canhelp/node_modules/next|]|mainFields=[|0=|main|]|dependencyType=|commonjs|modules=[|0=|node_modules|]|fallback=|false|exportsFields=[|0=|exports|]|importsFields=[|0=|imports|]|conditionNames=[|0=|node|1=|require|]|descriptionFiles=[|0=|package.json|]|extensions=[|0=|.js|1=|.json|2=|.node|]|enforceExtensions=|false|symlinks=|true|mainFiles=[|0=|index|]|roots=[|]|fullySpecified=|false|preferRelative=|false|preferAbsolute=|false|restrictions=[|]|path=|/opt/canhelp/apps/web/src/app/specialist-setup|request=|@/lib/authcResolverCachePlugin|normal|default|alias=[|server-only$=|next/dist/compiled/server-only/index|client-only$=|next/dist/compiled/client-only/index|next/dist/compiled/client-only$=|next/dist/compiled/client-only/index|next/dist/compiled/server-only=|next/dist/compiled/server-only/index|/opt/canhelp/node_modules/next/head.js=|next/dist/client/components/noop-head|/opt/canhelp/node_modules/next/image.js=|next/dist/api/image|/opt/canhelp/node_modules/next/constants.js=|next/dist/api/constants|/opt/canhelp/node_modules/next/router.js=|next/dist/api/router|/opt/canhelp/node_modules/next/dynamic.js=|next/dist/api/app-dynamic|/opt/canhelp/node_modules/next/script.js=|next/dist/api/script|/opt/canhelp/node_modules/next/link.js=|next/dist/client/app-dir/link|/opt/canhelp/node_modules/next/form.js=|next/dist/client/app-dir/form|/opt/canhelp/node_modules/next/navigation.js=|next/dist/api/navigation|/opt/canhelp/node_modules/next/headers.js=|next/dist/api/headers|/opt/canhelp/node_modules/next/og.js=|next/dist/api/og|/opt/canhelp/node_modules/next/server.js=|next/dist/api/server|/opt/canhelp/node_modules/next/document.js=|next/dist/api/document|/opt/canhelp/node_modules/next/app.js=|next/dist/api/app|react$=|next/dist/server/route-modules/app-page/vendored/ssr/react|react/compiler-runtime$=|next/dist/server/route-modules/app-page/vendored/ssr/react-compiler-runtime|react/jsx-dev-runtime$=|next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-dev-runtime|react/jsx-runtime$=|next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime|react-dom$=|next/dist/server/route-modules/app-page/vendored/ssr/react-dom|react-dom/client$=|next/dist/compiled/react-dom/client|react-dom/server$=|next/dist/compiled/react-dom/server.node|react-dom/server.browser$=|next/dist/compiled/react-dom/server.browser|react-dom/server.edge$=|next/dist/build/webpack/alias/react-dom-server.js|react-dom/static$=|next/dist/compiled/react-dom/static.node|react-dom/static.browser$=|next/dist/compiled/react-dom/static.browser|react-dom/static.edge$=|next/dist/compiled/react-dom/static.edge|react-server-dom-webpack/client$=|next/dist/server/route-modules/app-page/vendored/ssr/react-server-dom-webpack-client|react-server-dom-webpack/server$=|next/dist/compiled/react-server-dom-webpack/server.node|react-server-dom-webpack/server.node$=|next/dist/compiled/react-server-dom-webpack/server.node|react-server-dom-webpack/static$=|next/dist/compiled/react-server-dom-webpack/static.node|@vercel/turbopack-ecmascript-runtime/browser/dev/hmr-client/hmr-client.ts=|next/dist/client/dev/noop-turbopack-hmr|next=|/opt/canhelp/node_modules/next|]|mainFields=[|0=|main|]|dependencyType=|commonjs|modules=[|0=|node_modules|]|fallback=|false|exportsFields=[|0=|exports|]|importsFields=[|0=|imports|]|conditionNames=[|0=|node|1=|require|]|descriptionFiles=[|0=|package.json|]|extensions=[|0=|.js|1=|.json|2=|.node|]|enforceExtensions=|false|symlinks=|true|mainFiles=[|0=|index|]|roots=[|]|fullySpecified=|false|preferRelative=|false|preferAbsolute=|false|restrictions=[|]|path=|/opt/canhelp/apps/web/src/app/specialist-setup|request=|/opt/canhelp/apps/web/src/lib/auth|query=||fragment=||module=|true|directory=|false|file=|false|internal=|false|fullySpecified=|false|descriptionFilePath=|/opt/canhelp/apps/web/package.json|descriptionFileData=[|name=|web|version=|0.1.0|private=|true|scripts=[|dev=|next dev --port 3000|build=|next build|start=|next start|lint=|next lint|typecheck=|tsc --noEmit|]|dependencies=[|@canhelp/shared=|*|@marsidev/react-turnstile=|^1.5.0|better-auth=|^1.2.7|nanostores=|^1.2.0|next=|^15.1.6|react=|^19.0.0|react-dom=|^19.0.0|socket.io-client=|^4.8.1|zod=|^3.24.1|]|devDependencies=[|@types/node=|^22.10.7|@types/react=|^19.0.6|@types/react-dom=|^19.0.3|autoprefixer=|^10.4.20|postcss=|^8.5.1|tailwindcss=|^3.4.17|typescript=|^5.7.3|]|]|descriptionFileRoot=|/opt/canhelp/apps/web|relativePath=|./src/app/specialist-setup ResolverCachePlugin|normal|default|alias=[|server-only$=|next/dist/compiled/server-only/index|client-only$=|next/dist/compiled/client-only/index|next/dist/compiled/client-only$=|next/dist/compiled/client-only/index|next/dist/compiled/server-only=|next/dist/compiled/server-only/index|/opt/canhelp/node_modules/next/head.js=|next/dist/client/components/noop-head|/opt/canhelp/node_modules/next/image.js=|next/dist/api/image|/opt/canhelp/node_modules/next/constants.js=|next/dist/api/constants|/opt/canhelp/node_modules/next/router.js=|next/dist/api/router|/opt/canhelp/node_modules/next/dynamic.js=|next/dist/api/app-dynamic|/opt/canhelp/node_modules/next/script.js=|next/dist/api/script|/opt/canhelp/node_modules/next/link.js=|next/dist/client/app-dir/link|/opt/canhelp/node_modules/next/form.js=|next/dist/client/app-dir/form|/opt/canhelp/node_modules/next/navigation.js=|next/dist/api/navigation|/opt/canhelp/node_modules/next/headers.js=|next/dist/api/headers|/opt/canhelp/node_modules/next/og.js=|next/dist/api/og|/opt/canhelp/node_modules/next/server.js=|next/dist/api/server|/opt/canhelp/node_modules/next/document.js=|next/dist/api/document|/opt/canhelp/node_modules/next/app.js=|next/dist/api/app|react$=|next/dist/server/route-modules/app-page/vendored/ssr/react|react/compiler-runtime$=|next/dist/server/route-modules/app-page/vendored/ssr/react-compiler-runtime|react/jsx-dev-runtime$=|next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-dev-runtime|react/jsx-runtime$=|next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime|react-dom$=|next/dist/server/route-modules/app-page/vendored/ssr/react-dom|react-dom/client$=|next/dist/compiled/react-dom/client|react-dom/server$=|next/dist/compiled/react-dom/server.node|react-dom/server.browser$=|next/dist/compiled/react-dom/server.browser|react-dom/server.edge$=|next/dist/build/webpack/alias/react-dom-server.js|react-dom/static$=|next/dist/compiled/react-dom/static.node|react-dom/static.browser$=|next/dist/compiled/react-dom/static.browser|react-dom/static.edge$=|next/dist/compiled/react-dom/static.edge|react-server-dom-webpack/client$=|next/dist/server/route-modules/app-page/vendored/ssr/react-server-dom-webpack-client|react-server-dom-webpack/server$=|next/dist/compiled/react-server-dom-webpack/server.node|react-server-dom-webpack/server.node$=|next/dist/compiled/react-server-dom-webpack/server.node|react-server-dom-webpack/static$=|next/dist/compiled/react-server-dom-webpack/static.node|@vercel/turbopack-ecmascript-runtime/browser/dev/hmr-client/hmr-client.ts=|next/dist/client/dev/noop-turbopack-hmr|next=|/opt/canhelp/node_modules/next|]|mainFields=[|0=|module|1=|main|]|dependencyType=|esm|path=|/opt/canhelp/apps/web/src/app/specialist-setup|request=|@/lib/auth ResolverCachePlugin|normal|default|alias=[|server-only$=|next/dist/compiled/server-only/index|client-only$=|next/dist/compiled/client-only/index|next/dist/compiled/client-only$=|next/dist/compiled/client-only/index|next/dist/compiled/server-only=|next/dist/compiled/server-only/index|/opt/canhelp/node_modules/next/head.js=|next/dist/client/components/noop-head|/opt/canhelp/node_modules/next/image.js=|next/dist/api/image|/opt/canhelp/node_modules/next/constants.js=|next/dist/api/constants|/opt/canhelp/node_modules/next/router.js=|next/dist/api/router|/opt/canhelp/node_modules/next/dynamic.js=|next/dist/api/app-dynamic|/opt/canhelp/node_modules/next/script.js=|next/dist/api/script|/opt/canhelp/node_modules/next/link.js=|next/dist/client/app-dir/link|/opt/canhelp/node_modules/next/form.js=|next/dist/client/app-dir/form|/opt/canhelp/node_modules/next/navigation.js=|next/dist/api/navigation|/opt/canhelp/node_modules/next/headers.js=|next/dist/api/headers|/opt/canhelp/node_modules/next/og.js=|next/dist/api/og|/opt/canhelp/node_modules/next/server.js=|next/dist/api/server|/opt/canhelp/node_modules/next/document.js=|next/dist/api/document|/opt/canhelp/node_modules/next/app.js=|next/dist/api/app|react$=|next/dist/server/route-modules/app-page/vendored/ssr/react|react/compiler-runtime$=|next/dist/server/route-modules/app-page/vendored/ssr/react-compiler-runtime|react/jsx-dev-runtime$=|next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-dev-runtime|react/jsx-runtime$=|next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime|react-dom$=|next/dist/server/route-modules/app-page/vendored/ssr/react-dom|react-dom/client$=|next/dist/compiled/react-dom/client|react-dom/server$=|next/dist/compiled/react-dom/server.node|react-dom/server.browser$=|next/dist/compiled/react-dom/server.browser|react-dom/server.edge$=|next/dist/build/webpack/alias/react-dom-server.js|react-dom/static$=|next/dist/compiled/react-dom/static.node|react-dom/static.browser$=|next/dist/compiled/react-dom/static.browser|react-dom/static.edge$=|next/dist/compiled/react-dom/static.edge|react-server-dom-webpack/client$=|next/dist/server/route-modules/app-page/vendored/ssr/react-server-dom-webpack-client|react-server-dom-webpack/server$=|next/dist/compiled/react-server-dom-webpack/server.node|react-server-dom-webpack/server.node$=|next/dist/compiled/react-server-dom-webpack/server.node|react-server-dom-webpack/static$=|next/dist/compiled/react-server-dom-webpack/static.node|@vercel/turbopack-ecmascript-runtime/browser/dev/hmr-client/hmr-client.ts=|next/dist/client/dev/noop-turbopack-hmr|next=|/opt/canhelp/node_modules/next|]|mainFields=[|0=|module|1=|main|]|dependencyType=|esm|path=|/opt/canhelp/apps/web/src/app/specialist-setup|request=|react/jsx-runtime ResolverCachePlugin|normal|default|alias=[|server-only$=|next/dist/compiled/server-only/index|client-only$=|next/dist/compiled/client-only/index|next/dist/compiled/client-only$=|next/dist/compiled/client-only/index|next/dist/compiled/server-only=|next/dist/compiled/server-only/index|/opt/canhelp/node_modules/next/head.js=|next/dist/client/components/noop-head|/opt/canhelp/node_modules/next/image.js=|next/dist/api/image|/opt/canhelp/node_modules/next/constants.js=|next/dist/api/constants|/opt/canhelp/node_modules/next/router.js=|next/dist/api/router|/opt/canhelp/node_modules/next/dynamic.js=|next/dist/api/app-dynamic|/opt/canhelp/node_modules/next/script.js=|next/dist/api/script|/opt/canhelp/node_modules/next/link.js=|next/dist/client/app-dir/link|/opt/canhelp/node_modules/next/form.js=|next/dist/client/app-dir/form|/opt/canhelp/node_modules/next/navigation.js=|next/dist/api/navigation|/opt/canhelp/node_modules/next/headers.js=|next/dist/api/headers|/opt/canhelp/node_modules/next/og.js=|next/dist/api/og|/opt/canhelp/node_modules/next/server.js=|next/dist/api/server|/opt/canhelp/node_modules/next/document.js=|next/dist/api/document|/opt/canhelp/node_modules/next/app.js=|next/dist/api/app|react$=|next/dist/server/route-modules/app-page/vendored/ssr/react|react/compiler-runtime$=|next/dist/server/route-modules/app-page/vendored/ssr/react-compiler-runtime|react/jsx-dev-runtime$=|next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-dev-runtime|react/jsx-runtime$=|next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime|react-dom$=|next/dist/server/route-modules/app-page/vendored/ssr/react-dom|react-dom/client$=|next/dist/compiled/react-dom/client|react-dom/server$=|next/dist/compiled/react-dom/server.node|react-dom/server.browser$=|next/dist/compiled/react-dom/server.browser|react-dom/server.edge$=|next/dist/build/webpack/alias/react-dom-server.js|react-dom/static$=|next/dist/compiled/react-dom/static.node|react-dom/static.browser$=|next/dist/compiled/react-dom/static.browser|react-dom/static.edge$=|next/dist/compiled/react-dom/static.edge|react-server-dom-webpack/client$=|next/dist/server/route-modules/app-page/vendored/ssr/react-server-dom-webpack-client|react-server-dom-webpack/server$=|next/dist/compiled/react-server-dom-webpack/server.node|react-server-dom-webpack/server.node$=|next/dist/compiled/react-server-dom-webpack/server.node|react-server-dom-webpack/static$=|next/dist/compiled/react-server-dom-webpack/static.node|@vercel/turbopack-ecmascript-runtime/browser/dev/hmr-client/hmr-client.ts=|next/dist/client/dev/noop-turbopack-hmr|next=|/opt/canhelp/node_modules/next|]|mainFields=[|0=|module|1=|main|]|dependencyType=|esm|path=|/opt/canhelp/apps/web/src/app/specialist-setup|request=|reactResolverCachePlugin|normal|default|dependencyType=|esm|fallback=|false|exportsFields=[|0=|exports|]|importsFields=[|0=|imports|]|conditionNames=[|0=|node|1=|import|]|descriptionFiles=[|0=|package.json|]|enforceExtensions=|false|symlinks=|true|mainFields=[|0=|main|]|mainFiles=[|0=|index|]|roots=[|]|preferRelative=|false|preferAbsolute=|false|restrictions=[|]|alias=|false|path=|/opt/canhelp/apps/web/src/app/specialist-setup|request=|react-server-dom-webpack/serverResolverCachePlugin|normal|default|dependencyType=|commonjs|fallback=|false|exportsFields=[|0=|exports|]|importsFields=[|0=|imports|]|conditionNames=[|0=|node|1=|require|]|descriptionFiles=[|0=|package.json|]|enforceExtensions=|false|symlinks=|true|mainFields=[|0=|main|]|mainFiles=[|0=|index|]|roots=[|]|preferRelative=|false|preferAbsolute=|false|restrictions=[|]|path=|/opt/canhelp/apps/web/src/app/specialist-setup|request=|react-server-dom-webpack/server0FlagDependencyExportsPlugin|javascript/auto|/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[16].oneOf[4].use[0]!/opt/canhelp/apps/web/src/app/specialist-setup/page.tsx|rsc9FlagDependencyExportsPlugin|javascript/auto|/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-flight-client-module-loader.js!/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[16].oneOf[7].use[1]!/opt/canhelp/apps/web/src/app/become-specialist/page.tsx|ssr1FlagDependencyExportsPlugin|javascript/auto|/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-flight-client-module-loader.js!/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[16].oneOf[7].use[1]!/opt/canhelp/apps/web/src/app/dashboard/page.tsx|ssr8FlagDependencyExportsPlugin|javascript/auto|/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-flight-client-module-loader.js!/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[16].oneOf[7].use[1]!/opt/canhelp/apps/web/src/app/specialist-setup/page.tsx|ssrCompilation/codeGeneration|javascript/auto|/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-app-loader/index.js?page=%2Fspecialist-setup%2Fpage&name=app%2Fspecialist-setup%2Fpage&pagePath=private-next-app-dir%2Fspecialist-setup%2Fpage.tsx&appDir=%2Fopt%2Fcanhelp%2Fapps%2Fweb%2Fsrc%2Fapp&appPaths=%2Fspecialist-setup%2Fpage&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js&basePath=&assetPrefix=&nextConfigOutput=&preferredRegion=&middlewareConfig=e30%3D&isGlobalNotFoundEnabled=!|rsc|webpack-runtime9Compilation/codeGeneration|javascript/auto|/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[16].oneOf[4].use[0]!/opt/canhelp/apps/web/src/app/tasks/[id]/page.tsx|rsc|webpack-runtime?Compilation/codeGeneration|javascript/auto|/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[16].oneOf[4].use[0]!/opt/canhelp/apps/web/src/app/specialist-setup/page.tsx|rsc|webpack-runtime)Compilation/codeGeneration|javascript/auto|/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-flight-client-entry-loader.js?modules=%7B%22request%22%3A%22%2Fopt%2Fcanhelp%2Fapps%2Fweb%2Fsrc%2Fapp%2Fspecialist-setup%2Fpage.tsx%22%2C%22ids%22%3A%5B%5D%7D&server=true!|ssr|webpack-runtime)Compilation/codeGeneration|javascript/auto|/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-flight-client-entry-loader.js?modules=%7B%22request%22%3A%22%2Fopt%2Fcanhelp%2Fapps%2Fweb%2Fsrc%2Fapp%2Fspecialist-setup%2Fpage.tsx%22%2C%22ids%22%3A%5B%5D%7D&server=true!|rsc|webpack-runtime@Compilation/codeGeneration|javascript/auto|/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-flight-client-module-loader.js!/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[16].oneOf[7].use[1]!/opt/canhelp/apps/web/src/app/favorites/page.tsx|ssr|webpack-runtime>Compilation/codeGeneration|javascript/auto|/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-flight-client-module-loader.js!/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[16].oneOf[7].use[1]!/opt/canhelp/apps/web/src/app/payment/page.tsx|ssr|webpack-runtimeBCompilation/codeGeneration|javascript/auto|/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-flight-client-module-loader.js!/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[16].oneOf[7].use[1]!/opt/canhelp/apps/web/src/app/site/[slug]/page.tsx|ssr|webpack-runtimeHCompilation/codeGeneration|javascript/auto|/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-flight-client-module-loader.js!/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[16].oneOf[7].use[1]!/opt/canhelp/apps/web/src/app/become-specialist/page.tsx|ssr|webpack-runtimeGCompilation/codeGeneration|javascript/auto|/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-flight-client-module-loader.js!/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[16].oneOf[7].use[1]!/opt/canhelp/apps/web/src/app/tasks/[id]/offer/page.tsx|ssr|webpack-runtimeDCompilation/codeGeneration|javascript/auto|/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-flight-client-module-loader.js!/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[16].oneOf[7].use[1]!/opt/canhelp/apps/web/src/app/notifications/page.tsx|ssr|webpack-runtimeQCompilation/codeGeneration|javascript/auto|/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-flight-client-module-loader.js!/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[16].oneOf[7].use[1]!/opt/canhelp/apps/web/src/components/FavoriteSpecialistButton.tsx|ssr|webpack-runtimeMCompilation/codeGeneration|javascript/auto|/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-flight-client-module-loader.js!/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[16].oneOf[7].use[1]!/opt/canhelp/apps/web/src/app/tasks/[id]/TaskDetailClient.tsx|ssr|webpack-runtime>Compilation/codeGeneration|javascript/auto|/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-flight-client-module-loader.js!/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[16].oneOf[7].use[1]!/opt/canhelp/apps/web/src/context/location.tsx|ssr|webpack-runtimeQCompilation/codeGeneration|javascript/auto|/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-flight-client-module-loader.js!/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[16].oneOf[7].use[1]!/opt/canhelp/apps/web/src/app/dashboard/page.tsx|ssr|be875e28ad14eb03|webpack-runtimeRCompilation/codeGeneration|javascript/auto|/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-flight-client-module-loader.js!/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[16].oneOf[7].use[1]!/opt/canhelp/apps/web/src/app/users/[id]/page.tsx|ssr|90446bdbfd2696db|webpack-runtimewebpack/lib/cache/ResolverCachePlugin webpack/lib/FileSystemInfoSnapshot@ yB/opt/canhelp/apps/web/package.json/opt/canhelp/package.jsonsafeTimetimestamphash!eyBeyBd659fc12c42d40f9!yByB1cd76598202b1233@/opt/canhelp/apps/web/node_modules/opt/canhelp/apps/node_modules/opt/node_modules/node_modules@/opt/canhelp/node_modules/package.json/opt/canhelp/node_modules/next-app-loader/opt/canhelp/node_modules/next-app-loader.js/opt/canhelp/node_modules/next-app-loader.json/opt/canhelp/node_modules/next-app-loader.node*missing@@  `- yBwebpack/lib/NormalModulewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSourceconst module0 = () => import(/* webpackMode: "eager" */ "/opt/canhelp/apps/web/src/app/layout.tsx"); const module1 = () => import(/* webpackMode: "eager" */ "next/dist/client/components/builtin/global-error.js"); const module2 = () => import(/* webpackMode: "eager" */ "/opt/canhelp/apps/web/src/app/not-found.tsx"); const module3 = () => import(/* webpackMode: "eager" */ "next/dist/client/components/builtin/forbidden.js"); const module4 = () => import(/* webpackMode: "eager" */ "next/dist/client/components/builtin/unauthorized.js"); const page5 = () => import(/* webpackMode: "eager" */ "/opt/canhelp/apps/web/src/app/specialist-setup/page.tsx"); import { AppPageRouteModule } from "next/dist/server/route-modules/app-page/module.compiled" with { 'turbopack-transition': 'next-ssr' }; import { RouteKind } from "next/dist/server/route-kind" with { 'turbopack-transition': 'next-server-utility' }; import { getRevalidateReason } from "next/dist/server/instrumentation/utils"; import { getTracer, SpanKind } from "next/dist/server/lib/trace/tracer"; import { getRequestMeta } from "next/dist/server/request-meta"; import { BaseServerSpan } from "next/dist/server/lib/trace/constants"; import { interopDefault } from "next/dist/server/app-render/interop-default"; import { stripFlightHeaders } from "next/dist/server/app-render/strip-flight-headers"; import { NodeNextRequest, NodeNextResponse } from "next/dist/server/base-http/node"; import { checkIsAppPPREnabled } from "next/dist/server/lib/experimental/ppr"; import { getFallbackRouteParams } from "next/dist/server/request/fallback-params"; import { setReferenceManifestsSingleton } from "next/dist/server/app-render/encryption-utils"; import { isHtmlBotRequest, shouldServeStreamingMetadata } from "next/dist/server/lib/streaming-metadata"; import { createServerModuleMap } from "next/dist/server/app-render/action-utils"; import { normalizeAppPath } from "next/dist/shared/lib/router/utils/app-paths"; import { getIsPossibleServerAction } from "next/dist/server/lib/server-action-request-meta"; import { RSC_HEADER, NEXT_ROUTER_PREFETCH_HEADER, NEXT_IS_PRERENDER_HEADER, NEXT_DID_POSTPONE_HEADER, RSC_CONTENT_TYPE_HEADER } from "next/dist/client/components/app-router-headers"; import { getBotType, isBot } from "next/dist/shared/lib/router/utils/is-bot"; import { CachedRouteKind } from "next/dist/server/response-cache"; import { FallbackMode, parseFallbackField } from "next/dist/lib/fallback"; import RenderResult from "next/dist/server/render-result"; import { CACHE_ONE_YEAR, HTML_CONTENT_TYPE_HEADER, NEXT_CACHE_TAGS_HEADER } from "next/dist/lib/constants"; import { ENCODED_TAGS } from "next/dist/server/stream-utils/encoded-tags"; import { sendRenderResult } from "next/dist/server/send-payload"; import { NoFallbackError } from "next/dist/shared/lib/no-fallback-error.external"; // We inject the tree and pages here so that we can use them in the route // module. const tree = { children: [ '', { children: [ 'specialist-setup', { children: ['__PAGE__', {}, { page: [page5, "/opt/canhelp/apps/web/src/app/specialist-setup/page.tsx"], }] }, { metadata: { icon: [(async (props) => (await import(/* webpackMode: "eager" */ "next-metadata-image-loader?type=icon&segment=&basePath=&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js!/opt/canhelp/apps/web/src/app/icon.svg?__next_metadata__")).default(props))], apple: [], openGraph: [], twitter: [], manifest: undefined } } ] }, { 'layout': [module0, "/opt/canhelp/apps/web/src/app/layout.tsx"], 'global-error': [module1, "next/dist/client/components/builtin/global-error.js"], 'not-found': [module2, "/opt/canhelp/apps/web/src/app/not-found.tsx"], 'forbidden': [module3, "next/dist/client/components/builtin/forbidden.js"], 'unauthorized': [module4, "next/dist/client/components/builtin/unauthorized.js"], metadata: { icon: [(async (props) => (await import(/* webpackMode: "eager" */ "next-metadata-image-loader?type=icon&segment=&basePath=&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js!/opt/canhelp/apps/web/src/app/icon.svg?__next_metadata__")).default(props))], apple: [], openGraph: [], twitter: [], manifest: undefined } } ] }.children; const pages = ["/opt/canhelp/apps/web/src/app/specialist-setup/page.tsx"]; export { tree, pages }; import GlobalError from "next/dist/client/components/builtin/global-error.js" with { 'turbopack-transition': 'next-server-utility' }; export { GlobalError }; const __next_app_require__ = __webpack_require__ const __next_app_load_chunk__ = () => Promise.resolve() export const __next_app__ = { require: __next_app_require__, loadChunk: __next_app_load_chunk__ }; import * as entryBase from "next/dist/server/app-render/entry-base" with { 'turbopack-transition': 'next-server-utility' }; import { RedirectStatusCode } from "next/dist/client/components/redirect-status-code"; export * from "next/dist/server/app-render/entry-base" with { 'turbopack-transition': 'next-server-utility' }; // Create and export the route module that will be consumed. export const routeModule = new AppPageRouteModule({ definition: { kind: RouteKind.APP_PAGE, page: "/specialist-setup/page", pathname: "/specialist-setup", // The following aren't used in production. bundlePath: '', filename: '', appPaths: [] }, userland: { loaderTree: tree }, distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '', relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '' }); export async function handler(req, res, ctx) { var _this; let srcPage = "/specialist-setup/page"; // turbopack doesn't normalize `/index` in the page name // so we need to to process dynamic routes properly // TODO: fix turbopack providing differing value from webpack if (process.env.TURBOPACK) { srcPage = srcPage.replace(/\/index$/, '') || '/'; } else if (srcPage === '/index') { // we always normalize /index specifically srcPage = '/'; } const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE; const initialPostponed = getRequestMeta(req, 'postponed'); // TODO: replace with more specific flags const minimalMode = getRequestMeta(req, 'minimalMode'); const prepareResult = await routeModule.prepare(req, res, { srcPage, multiZoneDraftMode }); if (!prepareResult) { res.statusCode = 400; res.end('Bad Request'); ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve()); return null; } const { buildId, query, params, parsedUrl, pageIsDynamic, buildManifest, nextFontManifest, reactLoadableManifest, serverActionsManifest, clientReferenceManifest, subresourceIntegrityManifest, prerenderManifest, isDraftMode, resolvedPathname, revalidateOnlyGenerated, routerServerContext, nextConfig, interceptionRoutePatterns } = prepareResult; const pathname = parsedUrl.pathname || '/'; const normalizedSrcPage = normalizeAppPath(srcPage); let { isOnDemandRevalidate } = prepareResult; const prerenderInfo = routeModule.match(pathname, prerenderManifest); const isPrerendered = !!prerenderManifest.routes[resolvedPathname]; let isSSG = Boolean(prerenderInfo || isPrerendered || prerenderManifest.routes[normalizedSrcPage]); const userAgent = req.headers['user-agent'] || ''; const botType = getBotType(userAgent); const isHtmlBot = isHtmlBotRequest(req); /** * If true, this indicates that the request being made is for an app * prefetch request. */ const isPrefetchRSCRequest = getRequestMeta(req, 'isPrefetchRSCRequest') ?? req.headers[NEXT_ROUTER_PREFETCH_HEADER] === '1' // exclude runtime prefetches, which use '2' ; // NOTE: Don't delete headers[RSC] yet, it still needs to be used in renderToHTML later const isRSCRequest = getRequestMeta(req, 'isRSCRequest') ?? Boolean(req.headers[RSC_HEADER]); const isPossibleServerAction = getIsPossibleServerAction(req); /** * If the route being rendered is an app page, and the ppr feature has been * enabled, then the given route _could_ support PPR. */ const couldSupportPPR = checkIsAppPPREnabled(nextConfig.experimental.ppr); // When enabled, this will allow the use of the `?__nextppronly` query to // enable debugging of the static shell. const hasDebugStaticShellQuery = process.env.__NEXT_EXPERIMENTAL_STATIC_SHELL_DEBUGGING === '1' && typeof query.__nextppronly !== 'undefined' && couldSupportPPR; // When enabled, this will allow the use of the `?__nextppronly` query // to enable debugging of the fallback shell. const hasDebugFallbackShellQuery = hasDebugStaticShellQuery && query.__nextppronly === 'fallback'; // This page supports PPR if it is marked as being `PARTIALLY_STATIC` in the // prerender manifest and this is an app page. const isRoutePPREnabled = couldSupportPPR && (((_this = prerenderManifest.routes[normalizedSrcPage] ?? prerenderManifest.dynamicRoutes[normalizedSrcPage]) == null ? void 0 : _this.renderingMode) === 'PARTIALLY_STATIC' || // Ideally we'd want to check the appConfig to see if this page has PPR // enabled or not, but that would require plumbing the appConfig through // to the server during development. We assume that the page supports it // but only during development. hasDebugStaticShellQuery && (routeModule.isDev === true || (routerServerContext == null ? void 0 : routerServerContext.experimentalTestProxy) === true)); const isDebugStaticShell = hasDebugStaticShellQuery && isRoutePPREnabled; // We should enable debugging dynamic accesses when the static shell // debugging has been enabled and we're also in development mode. const isDebugDynamicAccesses = isDebugStaticShell && routeModule.isDev === true; const isDebugFallbackShell = hasDebugFallbackShellQuery && isRoutePPREnabled; // If we're in minimal mode, then try to get the postponed information from // the request metadata. If available, use it for resuming the postponed // render. const minimalPostponed = isRoutePPREnabled ? initialPostponed : undefined; // If PPR is enabled, and this is a RSC request (but not a prefetch), then // we can use this fact to only generate the flight data for the request // because we can't cache the HTML (as it's also dynamic). const isDynamicRSCRequest = isRoutePPREnabled && isRSCRequest && !isPrefetchRSCRequest; // Need to read this before it's stripped by stripFlightHeaders. We don't // need to transfer it to the request meta because it's only read // within this function; the static segment data should have already been // generated, so we will always either return a static response or a 404. const segmentPrefetchHeader = getRequestMeta(req, 'segmentPrefetchRSCRequest'); // TODO: investigate existing bug with shouldServeStreamingMetadata always // being true for a revalidate due to modifying the base-server this.renderOpts // when fixing this to correct logic it causes hydration issue since we set // serveStreamingMetadata to true during export let serveStreamingMetadata = !userAgent ? true : shouldServeStreamingMetadata(userAgent, nextConfig.htmlLimitedBots); if (isHtmlBot && isRoutePPREnabled) { isSSG = false; serveStreamingMetadata = false; } // In development, we always want to generate dynamic HTML. let supportsDynamicResponse = // If we're in development, we always support dynamic HTML, unless it's // a data request, in which case we only produce static HTML. routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports // dynamic HTML. !isSSG || // If this request has provided postponed data, it supports dynamic // HTML. typeof initialPostponed === 'string' || // If this is a dynamic RSC request, then this render supports dynamic // HTML (it's dynamic). isDynamicRSCRequest; // When html bots request PPR page, perform the full dynamic rendering. const shouldWaitOnAllReady = isHtmlBot && isRoutePPREnabled; let ssgCacheKey = null; if (!isDraftMode && isSSG && !supportsDynamicResponse && !isPossibleServerAction && !minimalPostponed && !isDynamicRSCRequest) { ssgCacheKey = resolvedPathname; } // the staticPathKey differs from ssgCacheKey since // ssgCacheKey is null in dev since we're always in "dynamic" // mode in dev to bypass the cache, but we still need to honor // dynamicParams = false in dev mode let staticPathKey = ssgCacheKey; if (!staticPathKey && routeModule.isDev) { staticPathKey = resolvedPathname; } // If this is a request for an app path that should be statically generated // and we aren't in the edge runtime, strip the flight headers so it will // generate the static response. if (!routeModule.isDev && !isDraftMode && isSSG && isRSCRequest && !isDynamicRSCRequest) { stripFlightHeaders(req.headers); } const ComponentMod = { ...entryBase, tree, pages, GlobalError, handler, routeModule, __next_app__ }; // Before rendering (which initializes component tree modules), we have to // set the reference manifests to our global store so Server Action's // encryption util can access to them at the top level of the page module. if (serverActionsManifest && clientReferenceManifest) { setReferenceManifestsSingleton({ page: srcPage, clientReferenceManifest, serverActionsManifest, serverModuleMap: createServerModuleMap({ serverActionsManifest }) }); } const method = req.method || 'GET'; const tracer = getTracer(); const activeSpan = tracer.getActiveScopeSpan(); try { const varyHeader = routeModule.getVaryHeader(resolvedPathname, interceptionRoutePatterns); res.setHeader('Vary', varyHeader); const invokeRouteModule = async (span, context)=>{ const nextReq = new NodeNextRequest(req); const nextRes = new NodeNextResponse(res); // TODO: adapt for putting the RDC inside the postponed data // If we're in dev, and this isn't a prefetch or a server action, // we should seed the resume data cache. if (process.env.NODE_ENV === 'development') { if (nextConfig.experimental.cacheComponents && !isPrefetchRSCRequest && !context.renderOpts.isPossibleServerAction) { const warmup = await routeModule.warmup(nextReq, nextRes, context); // If the warmup is successful, we should use the resume data // cache from the warmup. if (warmup.metadata.renderResumeDataCache) { context.renderOpts.renderResumeDataCache = warmup.metadata.renderResumeDataCache; } } } return routeModule.render(nextReq, nextRes, context).finally(()=>{ if (!span) return; span.setAttributes({ 'http.status_code': res.statusCode, 'next.rsc': false }); const rootSpanAttributes = tracer.getRootSpanAttributes(); // We were unable to get attributes, probably OTEL is not enabled if (!rootSpanAttributes) { return; } if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) { console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`); return; } const route = rootSpanAttributes.get('next.route'); if (route) { const name = `${method} ${route}`; span.setAttributes({ 'next.route': route, 'http.route': route, 'next.span_name': name }); span.updateName(name); } else { span.updateName(`${method} ${req.url}`); } }); }; const doRender = async ({ span, postponed, fallbackRouteParams })=>{ const context = { query, params, page: normalizedSrcPage, sharedContext: { buildId }, serverComponentsHmrCache: getRequestMeta(req, 'serverComponentsHmrCache'), fallbackRouteParams, renderOpts: { App: ()=>null, Document: ()=>null, pageConfig: {}, ComponentMod, Component: interopDefault(ComponentMod), params, routeModule, page: srcPage, postponed, shouldWaitOnAllReady, serveStreamingMetadata, supportsDynamicResponse: typeof postponed === 'string' || supportsDynamicResponse, buildManifest, nextFontManifest, reactLoadableManifest, subresourceIntegrityManifest, serverActionsManifest, clientReferenceManifest, setIsrStatus: routerServerContext == null ? void 0 : routerServerContext.setIsrStatus, dir: process.env.NEXT_RUNTIME === 'nodejs' ? require('path').join(/* turbopackIgnore: true */ process.cwd(), routeModule.relativeProjectDir) : `${process.cwd()}/${routeModule.relativeProjectDir}`, isDraftMode, isRevalidate: isSSG && !postponed && !isDynamicRSCRequest, botType, isOnDemandRevalidate, isPossibleServerAction, assetPrefix: nextConfig.assetPrefix, nextConfigOutput: nextConfig.output, crossOrigin: nextConfig.crossOrigin, trailingSlash: nextConfig.trailingSlash, previewProps: prerenderManifest.preview, deploymentId: nextConfig.deploymentId, enableTainting: nextConfig.experimental.taint, htmlLimitedBots: nextConfig.htmlLimitedBots, devtoolSegmentExplorer: nextConfig.experimental.devtoolSegmentExplorer, reactMaxHeadersLength: nextConfig.reactMaxHeadersLength, multiZoneDraftMode, incrementalCache: getRequestMeta(req, 'incrementalCache'), cacheLifeProfiles: nextConfig.experimental.cacheLife, basePath: nextConfig.basePath, serverActions: nextConfig.experimental.serverActions, ...isDebugStaticShell || isDebugDynamicAccesses ? { nextExport: true, supportsDynamicResponse: false, isStaticGeneration: true, isRevalidate: true, isDebugDynamicAccesses: isDebugDynamicAccesses } : {}, experimental: { isRoutePPREnabled, expireTime: nextConfig.expireTime, staleTimes: nextConfig.experimental.staleTimes, cacheComponents: Boolean(nextConfig.experimental.cacheComponents), clientSegmentCache: Boolean(nextConfig.experimental.clientSegmentCache), clientParamParsing: Boolean(nextConfig.experimental.clientParamParsing), dynamicOnHover: Boolean(nextConfig.experimental.dynamicOnHover), inlineCss: Boolean(nextConfig.experimental.inlineCss), authInterrupts: Boolean(nextConfig.experimental.authInterrupts), clientTraceMetadata: nextConfig.experimental.clientTraceMetadata || [] }, waitUntil: ctx.waitUntil, onClose: (cb)=>{ res.on('close', cb); }, onAfterTaskError: ()=>{}, onInstrumentationRequestError: (error, _request, errorContext)=>routeModule.onRequestError(req, error, errorContext, routerServerContext), err: getRequestMeta(req, 'invokeError'), dev: routeModule.isDev } }; const result = await invokeRouteModule(span, context); const { metadata } = result; const { cacheControl, headers = {}, // Add any fetch tags that were on the page to the response headers. fetchTags: cacheTags } = metadata; if (cacheTags) { headers[NEXT_CACHE_TAGS_HEADER] = cacheTags; } // Pull any fetch metrics from the render onto the request. ; req.fetchMetrics = metadata.fetchMetrics; // we don't throw static to dynamic errors in dev as isSSG // is a best guess in dev since we don't have the prerender pass // to know whether the path is actually static or not if (isSSG && (cacheControl == null ? void 0 : cacheControl.revalidate) === 0 && !routeModule.isDev && !isRoutePPREnabled) { const staticBailoutInfo = metadata.staticBailoutInfo; const err = Object.defineProperty(new Error(`Page changed from static to dynamic at runtime ${resolvedPathname}${(staticBailoutInfo == null ? void 0 : staticBailoutInfo.description) ? `, reason: ${staticBailoutInfo.description}` : ``}` + `\nsee more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`), "__NEXT_ERROR_CODE", { value: "E132", enumerable: false, configurable: true }); if (staticBailoutInfo == null ? void 0 : staticBailoutInfo.stack) { const stack = staticBailoutInfo.stack; err.stack = err.message + stack.substring(stack.indexOf('\n')); } throw err; } return { value: { kind: CachedRouteKind.APP_PAGE, html: result, headers, rscData: metadata.flightData, postponed: metadata.postponed, status: metadata.statusCode, segmentData: metadata.segmentData }, cacheControl }; }; const responseGenerator = async ({ hasResolved, previousCacheEntry, isRevalidating, span })=>{ const isProduction = routeModule.isDev === false; const didRespond = hasResolved || res.writableEnded; // skip on-demand revalidate if cache is not present and // revalidate-if-generated is set if (isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry && !minimalMode) { if (routerServerContext == null ? void 0 : routerServerContext.render404) { await routerServerContext.render404(req, res); } else { res.statusCode = 404; res.end('This page could not be found'); } return null; } let fallbackMode; if (prerenderInfo) { fallbackMode = parseFallbackField(prerenderInfo.fallback); } // When serving a HTML bot request, we want to serve a blocking render and // not the prerendered page. This ensures that the correct content is served // to the bot in the head. if (fallbackMode === FallbackMode.PRERENDER && isBot(userAgent)) { if (!isRoutePPREnabled || isHtmlBot) { fallbackMode = FallbackMode.BLOCKING_STATIC_RENDER; } } if ((previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) === -1) { isOnDemandRevalidate = true; } // TODO: adapt for PPR // only allow on-demand revalidate for fallback: true/blocking // or for prerendered fallback: false paths if (isOnDemandRevalidate && (fallbackMode !== FallbackMode.NOT_FOUND || previousCacheEntry)) { fallbackMode = FallbackMode.BLOCKING_STATIC_RENDER; } if (!minimalMode && fallbackMode !== FallbackMode.BLOCKING_STATIC_RENDER && staticPathKey && !didRespond && !isDraftMode && pageIsDynamic && (isProduction || !isPrerendered)) { // if the page has dynamicParams: false and this pathname wasn't // prerendered trigger the no fallback handling if (// In development, fall through to render to handle missing // getStaticPaths. (isProduction || prerenderInfo) && // When fallback isn't present, abort this render so we 404 fallbackMode === FallbackMode.NOT_FOUND) { throw new NoFallbackError(); } let fallbackResponse; if (isRoutePPREnabled && !isRSCRequest) { const cacheKey = typeof (prerenderInfo == null ? void 0 : prerenderInfo.fallback) === 'string' ? prerenderInfo.fallback : isProduction ? normalizedSrcPage : null; // We use the response cache here to handle the revalidation and // management of the fallback shell. fallbackResponse = await routeModule.handleResponse({ cacheKey, req, nextConfig, routeKind: RouteKind.APP_PAGE, isFallback: true, prerenderManifest, isRoutePPREnabled, responseGenerator: async ()=>doRender({ span, // We pass `undefined` as rendering a fallback isn't resumed // here. postponed: undefined, fallbackRouteParams: // If we're in production or we're debugging the fallback // shell then we should postpone when dynamic params are // accessed. isProduction || isDebugFallbackShell ? getFallbackRouteParams(normalizedSrcPage) : null }), waitUntil: ctx.waitUntil }); // If the fallback response was set to null, then we should return null. if (fallbackResponse === null) return null; // Otherwise, if we did get a fallback response, we should return it. if (fallbackResponse) { // Remove the cache control from the response to prevent it from being // used in the surrounding cache. delete fallbackResponse.cacheControl; return fallbackResponse; } } } // Only requests that aren't revalidating can be resumed. If we have the // minimal postponed data, then we should resume the render with it. const postponed = !isOnDemandRevalidate && !isRevalidating && minimalPostponed ? minimalPostponed : undefined; // When we're in minimal mode, if we're trying to debug the static shell, // we should just return nothing instead of resuming the dynamic render. if ((isDebugStaticShell || isDebugDynamicAccesses) && typeof postponed !== 'undefined') { return { cacheControl: { revalidate: 1, expire: undefined }, value: { kind: CachedRouteKind.PAGES, html: RenderResult.EMPTY, pageData: {}, headers: undefined, status: undefined } }; } // If this is a dynamic route with PPR enabled and the default route // matches were set, then we should pass the fallback route params to // the renderer as this is a fallback revalidation request. const fallbackRouteParams = pageIsDynamic && isRoutePPREnabled && (getRequestMeta(req, 'renderFallbackShell') || isDebugFallbackShell) ? getFallbackRouteParams(pathname) : null; // Perform the render. return doRender({ span, postponed, fallbackRouteParams }); }; const handleResponse = async (span)=>{ var _cacheEntry_value, _cachedData_headers; const cacheEntry = await routeModule.handleResponse({ cacheKey: ssgCacheKey, responseGenerator: (c)=>responseGenerator({ span, ...c }), routeKind: RouteKind.APP_PAGE, isOnDemandRevalidate, isRoutePPREnabled, req, nextConfig, prerenderManifest, waitUntil: ctx.waitUntil }); if (isDraftMode) { res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate'); } // In dev, we should not cache pages for any reason. if (routeModule.isDev) { res.setHeader('Cache-Control', 'no-store, must-revalidate'); } if (!cacheEntry) { if (ssgCacheKey) { // A cache entry might not be generated if a response is written // in `getInitialProps` or `getServerSideProps`, but those shouldn't // have a cache key. If we do have a cache key but we don't end up // with a cache entry, then either Next.js or the application has a // bug that needs fixing. throw Object.defineProperty(new Error('invariant: cache entry required but not generated'), "__NEXT_ERROR_CODE", { value: "E62", enumerable: false, configurable: true }); } return null; } if (((_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_PAGE) { var _cacheEntry_value1; throw Object.defineProperty(new Error(`Invariant app-page handler received invalid cache entry ${(_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), "__NEXT_ERROR_CODE", { value: "E707", enumerable: false, configurable: true }); } const didPostpone = typeof cacheEntry.value.postponed === 'string'; if (isSSG && // We don't want to send a cache header for requests that contain dynamic // data. If this is a Dynamic RSC request or wasn't a Prefetch RSC // request, then we should set the cache header. !isDynamicRSCRequest && (!didPostpone || isPrefetchRSCRequest)) { if (!minimalMode) { // set x-nextjs-cache header to match the header // we set for the image-optimizer res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT'); } // Set a header used by the client router to signal the response is static // and should respect the `static` cache staleTime value. res.setHeader(NEXT_IS_PRERENDER_HEADER, '1'); } const { value: cachedData } = cacheEntry; // Coerce the cache control parameter from the render. let cacheControl; // If this is a resume request in minimal mode it is streamed with dynamic // content and should not be cached. if (minimalPostponed) { cacheControl = { revalidate: 0, expire: undefined }; } else if (minimalMode && isRSCRequest && !isPrefetchRSCRequest && isRoutePPREnabled) { cacheControl = { revalidate: 0, expire: undefined }; } else if (!routeModule.isDev) { // If this is a preview mode request, we shouldn't cache it if (isDraftMode) { cacheControl = { revalidate: 0, expire: undefined }; } else if (!isSSG) { if (!res.getHeader('Cache-Control')) { cacheControl = { revalidate: 0, expire: undefined }; } } else if (cacheEntry.cacheControl) { // If the cache entry has a cache control with a revalidate value that's // a number, use it. if (typeof cacheEntry.cacheControl.revalidate === 'number') { var _cacheEntry_cacheControl; if (cacheEntry.cacheControl.revalidate < 1) { throw Object.defineProperty(new Error(`Invalid revalidate configuration provided: ${cacheEntry.cacheControl.revalidate} < 1`), "__NEXT_ERROR_CODE", { value: "E22", enumerable: false, configurable: true }); } cacheControl = { revalidate: cacheEntry.cacheControl.revalidate, expire: ((_cacheEntry_cacheControl = cacheEntry.cacheControl) == null ? void 0 : _cacheEntry_cacheControl.expire) ?? nextConfig.expireTime }; } else { cacheControl = { revalidate: CACHE_ONE_YEAR, expire: undefined }; } } } cacheEntry.cacheControl = cacheControl; if (typeof segmentPrefetchHeader === 'string' && (cachedData == null ? void 0 : cachedData.kind) === CachedRouteKind.APP_PAGE && cachedData.segmentData) { var _cachedData_headers1; // This is a prefetch request issued by the client Segment Cache. These // should never reach the application layer (lambda). We should either // respond from the cache (HIT) or respond with 204 No Content (MISS). // Set a header to indicate that PPR is enabled for this route. This // lets the client distinguish between a regular cache miss and a cache // miss due to PPR being disabled. In other contexts this header is used // to indicate that the response contains dynamic data, but here we're // only using it to indicate that the feature is enabled — the segment // response itself contains whether the data is dynamic. res.setHeader(NEXT_DID_POSTPONE_HEADER, '2'); // Add the cache tags header to the response if it exists and we're in // minimal mode while rendering a static page. const tags = (_cachedData_headers1 = cachedData.headers) == null ? void 0 : _cachedData_headers1[NEXT_CACHE_TAGS_HEADER]; if (minimalMode && isSSG && tags && typeof tags === 'string') { res.setHeader(NEXT_CACHE_TAGS_HEADER, tags); } const matchedSegment = cachedData.segmentData.get(segmentPrefetchHeader); if (matchedSegment !== undefined) { // Cache hit return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: RenderResult.fromStatic(matchedSegment, RSC_CONTENT_TYPE_HEADER), cacheControl: cacheEntry.cacheControl }); } // Cache miss. Either a cache entry for this route has not been generated // (which technically should not be possible when PPR is enabled, because // at a minimum there should always be a fallback entry) or there's no // match for the requested segment. Respond with a 204 No Content. We // don't bother to respond with 404, because these requests are only // issued as part of a prefetch. res.statusCode = 204; return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: RenderResult.EMPTY, cacheControl: cacheEntry.cacheControl }); } // If there's a callback for `onCacheEntry`, call it with the cache entry // and the revalidate options. const onCacheEntry = getRequestMeta(req, 'onCacheEntry'); if (onCacheEntry) { const finished = await onCacheEntry({ ...cacheEntry, // TODO: remove this when upstream doesn't // always expect this value to be "PAGE" value: { ...cacheEntry.value, kind: 'PAGE' } }, { url: getRequestMeta(req, 'initURL') }); if (finished) { // TODO: maybe we have to end the request? return null; } } // If the request has a postponed state and it's a resume request we // should error. if (didPostpone && minimalPostponed) { throw Object.defineProperty(new Error('Invariant: postponed state should not be present on a resume request'), "__NEXT_ERROR_CODE", { value: "E396", enumerable: false, configurable: true }); } if (cachedData.headers) { const headers = { ...cachedData.headers }; if (!minimalMode || !isSSG) { delete headers[NEXT_CACHE_TAGS_HEADER]; } for (let [key, value] of Object.entries(headers)){ if (typeof value === 'undefined') continue; if (Array.isArray(value)) { for (const v of value){ res.appendHeader(key, v); } } else if (typeof value === 'number') { value = value.toString(); res.appendHeader(key, value); } else { res.appendHeader(key, value); } } } // Add the cache tags header to the response if it exists and we're in // minimal mode while rendering a static page. const tags = (_cachedData_headers = cachedData.headers) == null ? void 0 : _cachedData_headers[NEXT_CACHE_TAGS_HEADER]; if (minimalMode && isSSG && tags && typeof tags === 'string') { res.setHeader(NEXT_CACHE_TAGS_HEADER, tags); } // If the request is a data request, then we shouldn't set the status code // from the response because it should always be 200. This should be gated // behind the experimental PPR flag. if (cachedData.status && (!isRSCRequest || !isRoutePPREnabled)) { res.statusCode = cachedData.status; } // Redirect information is encoded in RSC payload, so we don't need to use redirect status codes if (!minimalMode && cachedData.status && RedirectStatusCode[cachedData.status] && isRSCRequest) { res.statusCode = 200; } // Mark that the request did postpone. if (didPostpone) { res.setHeader(NEXT_DID_POSTPONE_HEADER, '1'); } // we don't go through this block when preview mode is true // as preview mode is a dynamic request (bypasses cache) and doesn't // generate both HTML and payloads in the same request so continue to just // return the generated payload if (isRSCRequest && !isDraftMode) { // If this is a dynamic RSC request, then stream the response. if (typeof cachedData.rscData === 'undefined') { if (cachedData.postponed) { throw Object.defineProperty(new Error('Invariant: Expected postponed to be undefined'), "__NEXT_ERROR_CODE", { value: "E372", enumerable: false, configurable: true }); } return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: cachedData.html, // Dynamic RSC responses cannot be cached, even if they're // configured with `force-static` because we have no way of // distinguishing between `force-static` and pages that have no // postponed state. // TODO: distinguish `force-static` from pages with no postponed state (static) cacheControl: isDynamicRSCRequest ? { revalidate: 0, expire: undefined } : cacheEntry.cacheControl }); } // As this isn't a prefetch request, we should serve the static flight // data. return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: RenderResult.fromStatic(cachedData.rscData, RSC_CONTENT_TYPE_HEADER), cacheControl: cacheEntry.cacheControl }); } // This is a request for HTML data. let body = cachedData.html; // If there's no postponed state, we should just serve the HTML. This // should also be the case for a resume request because it's completed // as a server render (rather than a static render). if (!didPostpone || minimalMode || isRSCRequest) { // If we're in test mode, we should add a sentinel chunk to the response // that's between the static and dynamic parts so we can compare the // chunks and add assertions. if (process.env.__NEXT_TEST_MODE && minimalMode && isRoutePPREnabled && body.contentType === HTML_CONTENT_TYPE_HEADER) { // As we're in minimal mode, the static part would have already been // streamed first. The only part that this streams is the dynamic part // so we should FIRST stream the sentinel and THEN the dynamic part. body.unshift(createPPRBoundarySentinel()); } return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: body, cacheControl: cacheEntry.cacheControl }); } // If we're debugging the static shell or the dynamic API accesses, we // should just serve the HTML without resuming the render. The returned // HTML will be the static shell so all the Dynamic API's will be used // during static generation. if (isDebugStaticShell || isDebugDynamicAccesses) { // Since we're not resuming the render, we need to at least add the // closing body and html tags to create valid HTML. body.push(new ReadableStream({ start (controller) { controller.enqueue(ENCODED_TAGS.CLOSED.BODY_AND_HTML); controller.close(); } })); return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: body, cacheControl: { revalidate: 0, expire: undefined } }); } // If we're in test mode, we should add a sentinel chunk to the response // that's between the static and dynamic parts so we can compare the // chunks and add assertions. if (process.env.__NEXT_TEST_MODE) { body.push(createPPRBoundarySentinel()); } // This request has postponed, so let's create a new transformer that the // dynamic data can pipe to that will attach the dynamic data to the end // of the response. const transformer = new TransformStream(); body.push(transformer.readable); // Perform the render again, but this time, provide the postponed state. // We don't await because we want the result to start streaming now, and // we've already chained the transformer's readable to the render result. doRender({ span, postponed: cachedData.postponed, // This is a resume render, not a fallback render, so we don't need to // set this. fallbackRouteParams: null }).then(async (result)=>{ var _result_value; if (!result) { throw Object.defineProperty(new Error('Invariant: expected a result to be returned'), "__NEXT_ERROR_CODE", { value: "E463", enumerable: false, configurable: true }); } if (((_result_value = result.value) == null ? void 0 : _result_value.kind) !== CachedRouteKind.APP_PAGE) { var _result_value1; throw Object.defineProperty(new Error(`Invariant: expected a page response, got ${(_result_value1 = result.value) == null ? void 0 : _result_value1.kind}`), "__NEXT_ERROR_CODE", { value: "E305", enumerable: false, configurable: true }); } // Pipe the resume result to the transformer. await result.value.html.pipeTo(transformer.writable); }).catch((err)=>{ // An error occurred during piping or preparing the render, abort // the transformers writer so we can terminate the stream. transformer.writable.abort(err).catch((e)=>{ console.error("couldn't abort transformer", e); }); }); return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: body, // We don't want to cache the response if it has postponed data because // the response being sent to the client it's dynamic parts are streamed // to the client on the same request. cacheControl: { revalidate: 0, expire: undefined } }); }; // TODO: activeSpan code path is for when wrapped by // next-server can be removed when this is no longer used if (activeSpan) { await handleResponse(activeSpan); } else { return await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, { spanName: `${method} ${req.url}`, kind: SpanKind.SERVER, attributes: { 'http.method': method, 'http.target': req.url } }, handleResponse)); } } catch (err) { if (!(err instanceof NoFallbackError)) { await routeModule.onRequestError(req, err, { routerKind: 'App Router', routePath: srcPage, routeType: 'render', revalidateReason: getRevalidateReason({ isRevalidate: isSSG, isOnDemandRevalidate }) }, routerServerContext); } // rethrow so that we can handle serving error page throw err; } } // TODO: omit this from production builds, only test builds should include it /** * Creates a readable stream that emits a PPR boundary sentinel. * * @returns A readable stream that emits a PPR boundary sentinel. */ function createPPRBoundarySentinel() { return new ReadableStream({ start (controller) { controller.enqueue(new TextEncoder().encode('')); controller.close(); } }); } //# sourceMappingURL=app-page.js.map exportsTypenamespace javascript/autorscalias`server-only$client-only$next/dist/compiled/server-only$next/dist/compiled/client-only$/opt/canhelp/node_modules/next/head.js/opt/canhelp/node_modules/next/image.js/opt/canhelp/node_modules/next/constants.js/opt/canhelp/node_modules/next/router.js/opt/canhelp/node_modules/next/dynamic.js/opt/canhelp/node_modules/next/script.js/opt/canhelp/node_modules/next/link.js/opt/canhelp/node_modules/next/form.js/opt/canhelp/node_modules/next/navigation.js/opt/canhelp/node_modules/next/headers.js/opt/canhelp/node_modules/next/og.js/opt/canhelp/node_modules/next/server.js/opt/canhelp/node_modules/next/document.js/opt/canhelp/node_modules/next/app.jsnextnext/dist/compiled/server-only/emptynext/dist/compiled/client-only/errornext/dist/client/components/noop-headnext/dist/api/imagenext/dist/api/constantsnext/dist/api/routernext/dist/api/app-dynamicnext/dist/api/scriptnext/dist/client/app-dir/linknext/dist/client/app-dir/formnext/dist/api/navigation.react-servernext/dist/api/headersnext/dist/api/ognext/dist/api/servernext/dist/api/documentnext/dist/api/app/opt/canhelp/node_modules/next`cacheableparsedfileDependenciescontextDependenciesmissingDependenciesbuildDependenciesvalueDependenciesassetsassetsInforoutestrictexportsArgumenttopLevelDeclarationssnapshot webpack/lib/util/LazySet/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-app-loader/index.js webpack/DefinePlugin_hashwebpack/DefinePlugin process.env.__NEXT_RELATIVE_DIST_DIRwebpack/DefinePlugin process.env.__NEXT_RELATIVE_PROJECT_DIRwebpack/DefinePlugin process.env.TURBOPACKwebpack/DefinePlugin process.env.__NEXT_MULTI_ZONE_DRAFT_MODEwebpack/DefinePlugin process.env.__NEXT_EXPERIMENTAL_STATIC_SHELL_DEBUGGINGwebpack/DefinePlugin process.env.NODE_ENVwebpack/DefinePlugin process.env.NEXT_RUNTIMEwebpack/DefinePlugin process.env.__NEXT_TEST_MODE4028310f".next"""false"production""nodejs"5637118ff10f6590pageabsolutePagePathpreferredRegionmiddlewareConfigrelatedModules/specialist-setup/page/opt/canhelp/apps/web/src/app/specialist-setup/page.tsx  __webpack_exports__`createPPRBoundarySentinelmodule0module1module2module3module4page5treepages__next_app_require____next_app_load_chunk____next_app__routeModulehandler@ yB @ /opt/canhelp/apps/web/src/app/icon.ico/opt/canhelp/apps/web/src/app/icon.jpg/opt/canhelp/apps/web/src/app/icon.jpeg/opt/canhelp/apps/web/src/app/icon.png/opt/canhelp/apps/web/src/app/icon.svg/opt/canhelp/apps/web/src/app/icon.tsx/opt/canhelp/apps/web/src/app/icon.ts/opt/canhelp/apps/web/src/app/icon.jsx/opt/canhelp/apps/web/src/app/icon.js/opt/canhelp/apps/web/src/app/icon0.ico/opt/canhelp/apps/web/src/app/icon0.jpg/opt/canhelp/apps/web/src/app/icon0.jpeg/opt/canhelp/apps/web/src/app/icon0.png/opt/canhelp/apps/web/src/app/icon0.svg/opt/canhelp/apps/web/src/app/icon0.tsx/opt/canhelp/apps/web/src/app/icon0.ts/opt/canhelp/apps/web/src/app/icon0.jsx/opt/canhelp/apps/web/src/app/icon0.js/opt/canhelp/apps/web/src/app/icon1.ico/opt/canhelp/apps/web/src/app/icon1.jpg/opt/canhelp/apps/web/src/app/icon1.jpeg/opt/canhelp/apps/web/src/app/icon1.png/opt/canhelp/apps/web/src/app/icon1.svg/opt/canhelp/apps/web/src/app/icon1.tsx/opt/canhelp/apps/web/src/app/icon1.ts/opt/canhelp/apps/web/src/app/icon1.jsx/opt/canhelp/apps/web/src/app/icon1.js/opt/canhelp/apps/web/src/app/icon2.ico/opt/canhelp/apps/web/src/app/icon2.jpg/opt/canhelp/apps/web/src/app/icon2.jpeg/opt/canhelp/apps/web/src/app/icon2.png/opt/canhelp/apps/web/src/app/icon2.svg/opt/canhelp/apps/web/src/app/icon2.tsx/opt/canhelp/apps/web/src/app/icon2.ts/opt/canhelp/apps/web/src/app/icon2.jsx/opt/canhelp/apps/web/src/app/icon2.js/opt/canhelp/apps/web/src/app/icon3.ico/opt/canhelp/apps/web/src/app/icon3.jpg/opt/canhelp/apps/web/src/app/icon3.jpeg/opt/canhelp/apps/web/src/app/icon3.png/opt/canhelp/apps/web/src/app/icon3.svg/opt/canhelp/apps/web/src/app/icon3.tsx/opt/canhelp/apps/web/src/app/icon3.ts/opt/canhelp/apps/web/src/app/icon3.jsx/opt/canhelp/apps/web/src/app/icon3.js/opt/canhelp/apps/web/src/app/icon4.ico/opt/canhelp/apps/web/src/app/icon4.jpg/opt/canhelp/apps/web/src/app/icon4.jpeg/opt/canhelp/apps/web/src/app/icon4.png/opt/canhelp/apps/web/src/app/icon4.svg/opt/canhelp/apps/web/src/app/icon4.tsx/opt/canhelp/apps/web/src/app/icon4.ts/opt/canhelp/apps/web/src/app/icon4.jsx/opt/canhelp/apps/web/src/app/icon4.js/opt/canhelp/apps/web/src/app/icon5.ico/opt/canhelp/apps/web/src/app/icon5.jpg/opt/canhelp/apps/web/src/app/icon5.jpeg/opt/canhelp/apps/web/src/app/icon5.png/opt/canhelp/apps/web/src/app/icon5.svg/opt/canhelp/apps/web/src/app/icon5.tsx/opt/canhelp/apps/web/src/app/icon5.ts/opt/canhelp/apps/web/src/app/icon5.jsx/opt/canhelp/apps/web/src/app/icon5.js/opt/canhelp/apps/web/src/app/icon6.ico/opt/canhelp/apps/web/src/app/icon6.jpg/opt/canhelp/apps/web/src/app/icon6.jpeg/opt/canhelp/apps/web/src/app/icon6.png/opt/canhelp/apps/web/src/app/icon6.svg/opt/canhelp/apps/web/src/app/icon6.tsx/opt/canhelp/apps/web/src/app/icon6.ts/opt/canhelp/apps/web/src/app/icon6.jsx/opt/canhelp/apps/web/src/app/icon6.js/opt/canhelp/apps/web/src/app/icon7.ico/opt/canhelp/apps/web/src/app/icon7.jpg/opt/canhelp/apps/web/src/app/icon7.jpeg/opt/canhelp/apps/web/src/app/icon7.png/opt/canhelp/apps/web/src/app/icon7.svg/opt/canhelp/apps/web/src/app/icon7.tsx/opt/canhelp/apps/web/src/app/icon7.ts/opt/canhelp/apps/web/src/app/icon7.jsx/opt/canhelp/apps/web/src/app/icon7.js/opt/canhelp/apps/web/src/app/icon8.ico/opt/canhelp/apps/web/src/app/icon8.jpg/opt/canhelp/apps/web/src/app/icon8.jpeg/opt/canhelp/apps/web/src/app/icon8.png/opt/canhelp/apps/web/src/app/icon8.svg/opt/canhelp/apps/web/src/app/icon8.tsx/opt/canhelp/apps/web/src/app/icon8.ts/opt/canhelp/apps/web/src/app/icon8.jsx/opt/canhelp/apps/web/src/app/icon8.js/opt/canhelp/apps/web/src/app/icon9.ico/opt/canhelp/apps/web/src/app/icon9.jpg/opt/canhelp/apps/web/src/app/icon9.jpeg/opt/canhelp/apps/web/src/app/icon9.png/opt/canhelp/apps/web/src/app/icon9.svg/opt/canhelp/apps/web/src/app/icon9.tsx/opt/canhelp/apps/web/src/app/icon9.ts/opt/canhelp/apps/web/src/app/icon9.jsx/opt/canhelp/apps/web/src/app/icon9.js/opt/canhelp/apps/web/src/app/apple-icon.jpg/opt/canhelp/apps/web/src/app/apple-icon.jpeg/opt/canhelp/apps/web/src/app/apple-icon.png/opt/canhelp/apps/web/src/app/apple-icon.tsx/opt/canhelp/apps/web/src/app/apple-icon.ts/opt/canhelp/apps/web/src/app/apple-icon.jsx/opt/canhelp/apps/web/src/app/apple-icon.js/opt/canhelp/apps/web/src/app/apple-icon0.jpg/opt/canhelp/apps/web/src/app/apple-icon0.jpeg/opt/canhelp/apps/web/src/app/apple-icon0.png/opt/canhelp/apps/web/src/app/apple-icon0.tsx/opt/canhelp/apps/web/src/app/apple-icon0.ts/opt/canhelp/apps/web/src/app/apple-icon0.jsx/opt/canhelp/apps/web/src/app/apple-icon0.js/opt/canhelp/apps/web/src/app/apple-icon1.jpg/opt/canhelp/apps/web/src/app/apple-icon1.jpeg/opt/canhelp/apps/web/src/app/apple-icon1.png/opt/canhelp/apps/web/src/app/apple-icon1.tsx/opt/canhelp/apps/web/src/app/apple-icon1.ts/opt/canhelp/apps/web/src/app/apple-icon1.jsx/opt/canhelp/apps/web/src/app/apple-icon1.js/opt/canhelp/apps/web/src/app/apple-icon2.jpg/opt/canhelp/apps/web/src/app/apple-icon2.jpeg/opt/canhelp/apps/web/src/app/apple-icon2.png/opt/canhelp/apps/web/src/app/apple-icon2.tsx/opt/canhelp/apps/web/src/app/apple-icon2.ts/opt/canhelp/apps/web/src/app/apple-icon2.jsx/opt/canhelp/apps/web/src/app/apple-icon2.js/opt/canhelp/apps/web/src/app/apple-icon3.jpg/opt/canhelp/apps/web/src/app/apple-icon3.jpeg/opt/canhelp/apps/web/src/app/apple-icon3.png/opt/canhelp/apps/web/src/app/apple-icon3.tsx/opt/canhelp/apps/web/src/app/apple-icon3.ts/opt/canhelp/apps/web/src/app/apple-icon3.jsx/opt/canhelp/apps/web/src/app/apple-icon3.js/opt/canhelp/apps/web/src/app/apple-icon4.jpg/opt/canhelp/apps/web/src/app/apple-icon4.jpeg/opt/canhelp/apps/web/src/app/apple-icon4.png/opt/canhelp/apps/web/src/app/apple-icon4.tsx/opt/canhelp/apps/web/src/app/apple-icon4.ts/opt/canhelp/apps/web/src/app/apple-icon4.jsx/opt/canhelp/apps/web/src/app/apple-icon4.js/opt/canhelp/apps/web/src/app/apple-icon5.jpg/opt/canhelp/apps/web/src/app/apple-icon5.jpeg/opt/canhelp/apps/web/src/app/apple-icon5.png/opt/canhelp/apps/web/src/app/apple-icon5.tsx/opt/canhelp/apps/web/src/app/apple-icon5.ts/opt/canhelp/apps/web/src/app/apple-icon5.jsx/opt/canhelp/apps/web/src/app/apple-icon5.js/opt/canhelp/apps/web/src/app/apple-icon6.jpg/opt/canhelp/apps/web/src/app/apple-icon6.jpeg/opt/canhelp/apps/web/src/app/apple-icon6.png/opt/canhelp/apps/web/src/app/apple-icon6.tsx/opt/canhelp/apps/web/src/app/apple-icon6.ts/opt/canhelp/apps/web/src/app/apple-icon6.jsx/opt/canhelp/apps/web/src/app/apple-icon6.js/opt/canhelp/apps/web/src/app/apple-icon7.jpg/opt/canhelp/apps/web/src/app/apple-icon7.jpeg/opt/canhelp/apps/web/src/app/apple-icon7.png/opt/canhelp/apps/web/src/app/apple-icon7.tsx/opt/canhelp/apps/web/src/app/apple-icon7.ts/opt/canhelp/apps/web/src/app/apple-icon7.jsx/opt/canhelp/apps/web/src/app/apple-icon7.js/opt/canhelp/apps/web/src/app/apple-icon8.jpg/opt/canhelp/apps/web/src/app/apple-icon8.jpeg/opt/canhelp/apps/web/src/app/apple-icon8.png/opt/canhelp/apps/web/src/app/apple-icon8.tsx/opt/canhelp/apps/web/src/app/apple-icon8.ts/opt/canhelp/apps/web/src/app/apple-icon8.jsx/opt/canhelp/apps/web/src/app/apple-icon8.js/opt/canhelp/apps/web/src/app/apple-icon9.jpg/opt/canhelp/apps/web/src/app/apple-icon9.jpeg/opt/canhelp/apps/web/src/app/apple-icon9.png/opt/canhelp/apps/web/src/app/apple-icon9.tsx/opt/canhelp/apps/web/src/app/apple-icon9.ts/opt/canhelp/apps/web/src/app/apple-icon9.jsx/opt/canhelp/apps/web/src/app/apple-icon9.js/opt/canhelp/apps/web/src/app/opengraph-image.jpg/opt/canhelp/apps/web/src/app/opengraph-image.jpeg/opt/canhelp/apps/web/src/app/opengraph-image.png/opt/canhelp/apps/web/src/app/opengraph-image.gif/opt/canhelp/apps/web/src/app/opengraph-image.tsx/opt/canhelp/apps/web/src/app/opengraph-image.ts/opt/canhelp/apps/web/src/app/opengraph-image.jsx/opt/canhelp/apps/web/src/app/opengraph-image.js/opt/canhelp/apps/web/src/app/opengraph-image0.jpg/opt/canhelp/apps/web/src/app/opengraph-image0.jpeg/opt/canhelp/apps/web/src/app/opengraph-image0.png/opt/canhelp/apps/web/src/app/opengraph-image0.gif/opt/canhelp/apps/web/src/app/opengraph-image0.tsx/opt/canhelp/apps/web/src/app/opengraph-image0.ts/opt/canhelp/apps/web/src/app/opengraph-image0.jsx/opt/canhelp/apps/web/src/app/opengraph-image0.js/opt/canhelp/apps/web/src/app/opengraph-image1.jpg/opt/canhelp/apps/web/src/app/opengraph-image1.jpeg/opt/canhelp/apps/web/src/app/opengraph-image1.png/opt/canhelp/apps/web/src/app/opengraph-image1.gif/opt/canhelp/apps/web/src/app/opengraph-image1.tsx/opt/canhelp/apps/web/src/app/opengraph-image1.ts/opt/canhelp/apps/web/src/app/opengraph-image1.jsx/opt/canhelp/apps/web/src/app/opengraph-image1.js/opt/canhelp/apps/web/src/app/opengraph-image2.jpg/opt/canhelp/apps/web/src/app/opengraph-image2.jpeg/opt/canhelp/apps/web/src/app/opengraph-image2.png/opt/canhelp/apps/web/src/app/opengraph-image2.gif/opt/canhelp/apps/web/src/app/opengraph-image2.tsx/opt/canhelp/apps/web/src/app/opengraph-image2.ts/opt/canhelp/apps/web/src/app/opengraph-image2.jsx/opt/canhelp/apps/web/src/app/opengraph-image2.js/opt/canhelp/apps/web/src/app/opengraph-image3.jpg/opt/canhelp/apps/web/src/app/opengraph-image3.jpeg/opt/canhelp/apps/web/src/app/opengraph-image3.png/opt/canhelp/apps/web/src/app/opengraph-image3.gif/opt/canhelp/apps/web/src/app/opengraph-image3.tsx/opt/canhelp/apps/web/src/app/opengraph-image3.ts/opt/canhelp/apps/web/src/app/opengraph-image3.jsx/opt/canhelp/apps/web/src/app/opengraph-image3.js/opt/canhelp/apps/web/src/app/opengraph-image4.jpg/opt/canhelp/apps/web/src/app/opengraph-image4.jpeg/opt/canhelp/apps/web/src/app/opengraph-image4.png/opt/canhelp/apps/web/src/app/opengraph-image4.gif/opt/canhelp/apps/web/src/app/opengraph-image4.tsx/opt/canhelp/apps/web/src/app/opengraph-image4.ts/opt/canhelp/apps/web/src/app/opengraph-image4.jsx/opt/canhelp/apps/web/src/app/opengraph-image4.js/opt/canhelp/apps/web/src/app/opengraph-image5.jpg/opt/canhelp/apps/web/src/app/opengraph-image5.jpeg/opt/canhelp/apps/web/src/app/opengraph-image5.png/opt/canhelp/apps/web/src/app/opengraph-image5.gif/opt/canhelp/apps/web/src/app/opengraph-image5.tsx/opt/canhelp/apps/web/src/app/opengraph-image5.ts/opt/canhelp/apps/web/src/app/opengraph-image5.jsx/opt/canhelp/apps/web/src/app/opengraph-image5.js/opt/canhelp/apps/web/src/app/opengraph-image6.jpg/opt/canhelp/apps/web/src/app/opengraph-image6.jpeg/opt/canhelp/apps/web/src/app/opengraph-image6.png/opt/canhelp/apps/web/src/app/opengraph-image6.gif/opt/canhelp/apps/web/src/app/opengraph-image6.tsx/opt/canhelp/apps/web/src/app/opengraph-image6.ts/opt/canhelp/apps/web/src/app/opengraph-image6.jsx/opt/canhelp/apps/web/src/app/opengraph-image6.js/opt/canhelp/apps/web/src/app/opengraph-image7.jpg/opt/canhelp/apps/web/src/app/opengraph-image7.jpeg/opt/canhelp/apps/web/src/app/opengraph-image7.png/opt/canhelp/apps/web/src/app/opengraph-image7.gif/opt/canhelp/apps/web/src/app/opengraph-image7.tsx/opt/canhelp/apps/web/src/app/opengraph-image7.ts/opt/canhelp/apps/web/src/app/opengraph-image7.jsx/opt/canhelp/apps/web/src/app/opengraph-image7.js/opt/canhelp/apps/web/src/app/opengraph-image8.jpg/opt/canhelp/apps/web/src/app/opengraph-image8.jpeg/opt/canhelp/apps/web/src/app/opengraph-image8.png/opt/canhelp/apps/web/src/app/opengraph-image8.gif/opt/canhelp/apps/web/src/app/opengraph-image8.tsx/opt/canhelp/apps/web/src/app/opengraph-image8.ts/opt/canhelp/apps/web/src/app/opengraph-image8.jsx/opt/canhelp/apps/web/src/app/opengraph-image8.js/opt/canhelp/apps/web/src/app/opengraph-image9.jpg/opt/canhelp/apps/web/src/app/opengraph-image9.jpeg/opt/canhelp/apps/web/src/app/opengraph-image9.png/opt/canhelp/apps/web/src/app/opengraph-image9.gif/opt/canhelp/apps/web/src/app/opengraph-image9.tsx/opt/canhelp/apps/web/src/app/opengraph-image9.ts/opt/canhelp/apps/web/src/app/opengraph-image9.jsx/opt/canhelp/apps/web/src/app/opengraph-image9.js/opt/canhelp/apps/web/src/app/twitter-image.jpg/opt/canhelp/apps/web/src/app/twitter-image.jpeg/opt/canhelp/apps/web/src/app/twitter-image.png/opt/canhelp/apps/web/src/app/twitter-image.gif/opt/canhelp/apps/web/src/app/twitter-image.tsx/opt/canhelp/apps/web/src/app/twitter-image.ts/opt/canhelp/apps/web/src/app/twitter-image.jsx/opt/canhelp/apps/web/src/app/twitter-image.js/opt/canhelp/apps/web/src/app/twitter-image0.jpg/opt/canhelp/apps/web/src/app/twitter-image0.jpeg/opt/canhelp/apps/web/src/app/twitter-image0.png/opt/canhelp/apps/web/src/app/twitter-image0.gif/opt/canhelp/apps/web/src/app/twitter-image0.tsx/opt/canhelp/apps/web/src/app/twitter-image0.ts/opt/canhelp/apps/web/src/app/twitter-image0.jsx/opt/canhelp/apps/web/src/app/twitter-image0.js/opt/canhelp/apps/web/src/app/twitter-image1.jpg/opt/canhelp/apps/web/src/app/twitter-image1.jpeg/opt/canhelp/apps/web/src/app/twitter-image1.png/opt/canhelp/apps/web/src/app/twitter-image1.gif/opt/canhelp/apps/web/src/app/twitter-image1.tsx/opt/canhelp/apps/web/src/app/twitter-image1.ts/opt/canhelp/apps/web/src/app/twitter-image1.jsx/opt/canhelp/apps/web/src/app/twitter-image1.js/opt/canhelp/apps/web/src/app/twitter-image2.jpg/opt/canhelp/apps/web/src/app/twitter-image2.jpeg/opt/canhelp/apps/web/src/app/twitter-image2.png/opt/canhelp/apps/web/src/app/twitter-image2.gif/opt/canhelp/apps/web/src/app/twitter-image2.tsx/opt/canhelp/apps/web/src/app/twitter-image2.ts/opt/canhelp/apps/web/src/app/twitter-image2.jsx/opt/canhelp/apps/web/src/app/twitter-image2.js/opt/canhelp/apps/web/src/app/twitter-image3.jpg/opt/canhelp/apps/web/src/app/twitter-image3.jpeg/opt/canhelp/apps/web/src/app/twitter-image3.png/opt/canhelp/apps/web/src/app/twitter-image3.gif/opt/canhelp/apps/web/src/app/twitter-image3.tsx/opt/canhelp/apps/web/src/app/twitter-image3.ts/opt/canhelp/apps/web/src/app/twitter-image3.jsx/opt/canhelp/apps/web/src/app/twitter-image3.js/opt/canhelp/apps/web/src/app/twitter-image4.jpg/opt/canhelp/apps/web/src/app/twitter-image4.jpeg/opt/canhelp/apps/web/src/app/twitter-image4.png/opt/canhelp/apps/web/src/app/twitter-image4.gif/opt/canhelp/apps/web/src/app/twitter-image4.tsx/opt/canhelp/apps/web/src/app/twitter-image4.ts/opt/canhelp/apps/web/src/app/twitter-image4.jsx/opt/canhelp/apps/web/src/app/twitter-image4.js/opt/canhelp/apps/web/src/app/twitter-image5.jpg/opt/canhelp/apps/web/src/app/twitter-image5.jpeg/opt/canhelp/apps/web/src/app/twitter-image5.png/opt/canhelp/apps/web/src/app/twitter-image5.gif/opt/canhelp/apps/web/src/app/twitter-image5.tsx/opt/canhelp/apps/web/src/app/twitter-image5.ts/opt/canhelp/apps/web/src/app/twitter-image5.jsx/opt/canhelp/apps/web/src/app/twitter-image5.js/opt/canhelp/apps/web/src/app/twitter-image6.jpg/opt/canhelp/apps/web/src/app/twitter-image6.jpeg/opt/canhelp/apps/web/src/app/twitter-image6.png/opt/canhelp/apps/web/src/app/twitter-image6.gif/opt/canhelp/apps/web/src/app/twitter-image6.tsx/opt/canhelp/apps/web/src/app/twitter-image6.ts/opt/canhelp/apps/web/src/app/twitter-image6.jsx/opt/canhelp/apps/web/src/app/twitter-image6.js/opt/canhelp/apps/web/src/app/twitter-image7.jpg/opt/canhelp/apps/web/src/app/twitter-image7.jpeg/opt/canhelp/apps/web/src/app/twitter-image7.png/opt/canhelp/apps/web/src/app/twitter-image7.gif/opt/canhelp/apps/web/src/app/twitter-image7.tsx/opt/canhelp/apps/web/src/app/twitter-image7.ts/opt/canhelp/apps/web/src/app/twitter-image7.jsx/opt/canhelp/apps/web/src/app/twitter-image7.js/opt/canhelp/apps/web/src/app/twitter-image8.jpg/opt/canhelp/apps/web/src/app/twitter-image8.jpeg/opt/canhelp/apps/web/src/app/twitter-image8.png/opt/canhelp/apps/web/src/app/twitter-image8.gif/opt/canhelp/apps/web/src/app/twitter-image8.tsx/opt/canhelp/apps/web/src/app/twitter-image8.ts/opt/canhelp/apps/web/src/app/twitter-image8.jsx/opt/canhelp/apps/web/src/app/twitter-image8.js/opt/canhelp/apps/web/src/app/twitter-image9.jpg/opt/canhelp/apps/web/src/app/twitter-image9.jpeg/opt/canhelp/apps/web/src/app/twitter-image9.png/opt/canhelp/apps/web/src/app/twitter-image9.gif/opt/canhelp/apps/web/src/app/twitter-image9.tsx/opt/canhelp/apps/web/src/app/twitter-image9.ts/opt/canhelp/apps/web/src/app/twitter-image9.jsx/opt/canhelp/apps/web/src/app/twitter-image9.js/opt/canhelp/apps/web/src/app/favicon.ico/opt/canhelp/apps/web/src/app/manifest.webmanifest/opt/canhelp/apps/web/src/app/manifest.json/opt/canhelp/apps/web/src/app/manifest.tsx/opt/canhelp/apps/web/src/app/manifest.ts/opt/canhelp/apps/web/src/app/manifest.jsx/opt/canhelp/apps/web/src/app/manifest.js/opt/canhelp/apps/web/src/app/layout.tsx/opt/canhelp/apps/web/src/app/layout.ts/opt/canhelp/apps/web/src/app/layout.jsx/opt/canhelp/apps/web/src/app/layout.js/opt/canhelp/apps/web/src/app/template.tsx/opt/canhelp/apps/web/src/app/error.tsx/opt/canhelp/apps/web/src/app/loading.tsx/opt/canhelp/apps/web/src/app/global-error.tsx/opt/canhelp/apps/web/src/app/not-found.tsx/opt/canhelp/apps/web/src/app/not-found.ts/opt/canhelp/apps/web/src/app/not-found.jsx/opt/canhelp/apps/web/src/app/not-found.js/opt/canhelp/apps/web/src/app/forbidden.tsx/opt/canhelp/apps/web/src/app/unauthorized.tsx/opt/canhelp/apps/web/src/app/template.ts/opt/canhelp/apps/web/src/app/error.ts/opt/canhelp/apps/web/src/app/loading.ts/opt/canhelp/apps/web/src/app/global-error.ts/opt/canhelp/apps/web/src/app/forbidden.ts/opt/canhelp/apps/web/src/app/unauthorized.ts/opt/canhelp/apps/web/src/app/template.jsx/opt/canhelp/apps/web/src/app/error.jsx/opt/canhelp/apps/web/src/app/loading.jsx/opt/canhelp/apps/web/src/app/global-error.jsx/opt/canhelp/apps/web/src/app/forbidden.jsx/opt/canhelp/apps/web/src/app/unauthorized.jsx/opt/canhelp/apps/web/src/app/template.js/opt/canhelp/apps/web/src/app/error.js/opt/canhelp/apps/web/src/app/loading.js/opt/canhelp/apps/web/src/app/global-error.js/opt/canhelp/apps/web/src/app/forbidden.js/opt/canhelp/apps/web/src/app/unauthorized.js/opt/canhelp/apps/web/src/app/specialist-setup/layout.tsx/opt/canhelp/apps/web/src/app/specialist-setup/template.tsx/opt/canhelp/apps/web/src/app/specialist-setup/error.tsx/opt/canhelp/apps/web/src/app/specialist-setup/loading.tsx/opt/canhelp/apps/web/src/app/specialist-setup/global-error.tsx/opt/canhelp/apps/web/src/app/specialist-setup/not-found.tsx/opt/canhelp/apps/web/src/app/specialist-setup/forbidden.tsx/opt/canhelp/apps/web/src/app/specialist-setup/unauthorized.tsx/opt/canhelp/apps/web/src/app/specialist-setup/layout.ts/opt/canhelp/apps/web/src/app/specialist-setup/template.ts/opt/canhelp/apps/web/src/app/specialist-setup/error.ts/opt/canhelp/apps/web/src/app/specialist-setup/loading.ts/opt/canhelp/apps/web/src/app/specialist-setup/global-error.ts/opt/canhelp/apps/web/src/app/specialist-setup/not-found.ts/opt/canhelp/apps/web/src/app/specialist-setup/forbidden.ts/opt/canhelp/apps/web/src/app/specialist-setup/unauthorized.ts/opt/canhelp/apps/web/src/app/specialist-setup/layout.jsx/opt/canhelp/apps/web/src/app/specialist-setup/template.jsx/opt/canhelp/apps/web/src/app/specialist-setup/error.jsx/opt/canhelp/apps/web/src/app/specialist-setup/loading.jsx/opt/canhelp/apps/web/src/app/specialist-setup/global-error.jsx/opt/canhelp/apps/web/src/app/specialist-setup/not-found.jsx/opt/canhelp/apps/web/src/app/specialist-setup/forbidden.jsx/opt/canhelp/apps/web/src/app/specialist-setup/unauthorized.jsx/opt/canhelp/apps/web/src/app/specialist-setup/layout.js/opt/canhelp/apps/web/src/app/specialist-setup/template.js/opt/canhelp/apps/web/src/app/specialist-setup/error.js/opt/canhelp/apps/web/src/app/specialist-setup/loading.js/opt/canhelp/apps/web/src/app/specialist-setup/global-error.js/opt/canhelp/apps/web/src/app/specialist-setup/not-found.js/opt/canhelp/apps/web/src/app/specialist-setup/forbidden.js/opt/canhelp/apps/web/src/app/specialist-setup/unauthorized.js/opt/canhelp/apps/web/src/app/specialist-setup/icon.ico/opt/canhelp/apps/web/src/app/specialist-setup/icon.jpg/opt/canhelp/apps/web/src/app/specialist-setup/icon.jpeg/opt/canhelp/apps/web/src/app/specialist-setup/icon.png/opt/canhelp/apps/web/src/app/specialist-setup/icon.svg/opt/canhelp/apps/web/src/app/specialist-setup/icon.tsx/opt/canhelp/apps/web/src/app/specialist-setup/icon.ts/opt/canhelp/apps/web/src/app/specialist-setup/icon.jsx/opt/canhelp/apps/web/src/app/specialist-setup/icon.js/opt/canhelp/apps/web/src/app/specialist-setup/icon0.ico/opt/canhelp/apps/web/src/app/specialist-setup/icon0.jpg/opt/canhelp/apps/web/src/app/specialist-setup/icon0.jpeg/opt/canhelp/apps/web/src/app/specialist-setup/icon0.png/opt/canhelp/apps/web/src/app/specialist-setup/icon0.svg/opt/canhelp/apps/web/src/app/specialist-setup/icon0.tsx/opt/canhelp/apps/web/src/app/specialist-setup/icon0.ts/opt/canhelp/apps/web/src/app/specialist-setup/icon0.jsx/opt/canhelp/apps/web/src/app/specialist-setup/icon0.js/opt/canhelp/apps/web/src/app/specialist-setup/icon1.ico/opt/canhelp/apps/web/src/app/specialist-setup/icon1.jpg/opt/canhelp/apps/web/src/app/specialist-setup/icon1.jpeg/opt/canhelp/apps/web/src/app/specialist-setup/icon1.png/opt/canhelp/apps/web/src/app/specialist-setup/icon1.svg/opt/canhelp/apps/web/src/app/specialist-setup/icon1.tsx/opt/canhelp/apps/web/src/app/specialist-setup/icon1.ts/opt/canhelp/apps/web/src/app/specialist-setup/icon1.jsx/opt/canhelp/apps/web/src/app/specialist-setup/icon1.js/opt/canhelp/apps/web/src/app/specialist-setup/icon2.ico/opt/canhelp/apps/web/src/app/specialist-setup/icon2.jpg/opt/canhelp/apps/web/src/app/specialist-setup/icon2.jpeg/opt/canhelp/apps/web/src/app/specialist-setup/icon2.png/opt/canhelp/apps/web/src/app/specialist-setup/icon2.svg/opt/canhelp/apps/web/src/app/specialist-setup/icon2.tsx/opt/canhelp/apps/web/src/app/specialist-setup/icon2.ts/opt/canhelp/apps/web/src/app/specialist-setup/icon2.jsx/opt/canhelp/apps/web/src/app/specialist-setup/icon2.js/opt/canhelp/apps/web/src/app/specialist-setup/icon3.ico/opt/canhelp/apps/web/src/app/specialist-setup/icon3.jpg/opt/canhelp/apps/web/src/app/specialist-setup/icon3.jpeg/opt/canhelp/apps/web/src/app/specialist-setup/icon3.png/opt/canhelp/apps/web/src/app/specialist-setup/icon3.svg/opt/canhelp/apps/web/src/app/specialist-setup/icon3.tsx/opt/canhelp/apps/web/src/app/specialist-setup/icon3.ts/opt/canhelp/apps/web/src/app/specialist-setup/icon3.jsx/opt/canhelp/apps/web/src/app/specialist-setup/icon3.js/opt/canhelp/apps/web/src/app/specialist-setup/icon4.ico/opt/canhelp/apps/web/src/app/specialist-setup/icon4.jpg/opt/canhelp/apps/web/src/app/specialist-setup/icon4.jpeg/opt/canhelp/apps/web/src/app/specialist-setup/icon4.png/opt/canhelp/apps/web/src/app/specialist-setup/icon4.svg/opt/canhelp/apps/web/src/app/specialist-setup/icon4.tsx/opt/canhelp/apps/web/src/app/specialist-setup/icon4.ts/opt/canhelp/apps/web/src/app/specialist-setup/icon4.jsx/opt/canhelp/apps/web/src/app/specialist-setup/icon4.js/opt/canhelp/apps/web/src/app/specialist-setup/icon5.ico/opt/canhelp/apps/web/src/app/specialist-setup/icon5.jpg/opt/canhelp/apps/web/src/app/specialist-setup/icon5.jpeg/opt/canhelp/apps/web/src/app/specialist-setup/icon5.png/opt/canhelp/apps/web/src/app/specialist-setup/icon5.svg/opt/canhelp/apps/web/src/app/specialist-setup/icon5.tsx/opt/canhelp/apps/web/src/app/specialist-setup/icon5.ts/opt/canhelp/apps/web/src/app/specialist-setup/icon5.jsx/opt/canhelp/apps/web/src/app/specialist-setup/icon5.js/opt/canhelp/apps/web/src/app/specialist-setup/icon6.ico/opt/canhelp/apps/web/src/app/specialist-setup/icon6.jpg/opt/canhelp/apps/web/src/app/specialist-setup/icon6.jpeg/opt/canhelp/apps/web/src/app/specialist-setup/icon6.png/opt/canhelp/apps/web/src/app/specialist-setup/icon6.svg/opt/canhelp/apps/web/src/app/specialist-setup/icon6.tsx/opt/canhelp/apps/web/src/app/specialist-setup/icon6.ts/opt/canhelp/apps/web/src/app/specialist-setup/icon6.jsx/opt/canhelp/apps/web/src/app/specialist-setup/icon6.js/opt/canhelp/apps/web/src/app/specialist-setup/icon7.ico/opt/canhelp/apps/web/src/app/specialist-setup/icon7.jpg/opt/canhelp/apps/web/src/app/specialist-setup/icon7.jpeg/opt/canhelp/apps/web/src/app/specialist-setup/icon7.png/opt/canhelp/apps/web/src/app/specialist-setup/icon7.svg/opt/canhelp/apps/web/src/app/specialist-setup/icon7.tsx/opt/canhelp/apps/web/src/app/specialist-setup/icon7.ts/opt/canhelp/apps/web/src/app/specialist-setup/icon7.jsx/opt/canhelp/apps/web/src/app/specialist-setup/icon7.js/opt/canhelp/apps/web/src/app/specialist-setup/icon8.ico/opt/canhelp/apps/web/src/app/specialist-setup/icon8.jpg/opt/canhelp/apps/web/src/app/specialist-setup/icon8.jpeg/opt/canhelp/apps/web/src/app/specialist-setup/icon8.png/opt/canhelp/apps/web/src/app/specialist-setup/icon8.svg/opt/canhelp/apps/web/src/app/specialist-setup/icon8.tsx/opt/canhelp/apps/web/src/app/specialist-setup/icon8.ts/opt/canhelp/apps/web/src/app/specialist-setup/icon8.jsx/opt/canhelp/apps/web/src/app/specialist-setup/icon8.js/opt/canhelp/apps/web/src/app/specialist-setup/icon9.ico/opt/canhelp/apps/web/src/app/specialist-setup/icon9.jpg/opt/canhelp/apps/web/src/app/specialist-setup/icon9.jpeg/opt/canhelp/apps/web/src/app/specialist-setup/icon9.png/opt/canhelp/apps/web/src/app/specialist-setup/icon9.svg/opt/canhelp/apps/web/src/app/specialist-setup/icon9.tsx/opt/canhelp/apps/web/src/app/specialist-setup/icon9.ts/opt/canhelp/apps/web/src/app/specialist-setup/icon9.jsx/opt/canhelp/apps/web/src/app/specialist-setup/icon9.js/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon.jpg/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon.jpeg/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon.png/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon.tsx/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon.ts/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon.jsx/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon.js/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon0.jpg/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon0.jpeg/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon0.png/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon0.tsx/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon0.ts/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon0.jsx/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon0.js/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon1.jpg/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon1.jpeg/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon1.png/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon1.tsx/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon1.ts/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon1.jsx/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon1.js/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon2.jpg/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon2.jpeg/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon2.png/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon2.tsx/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon2.ts/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon2.jsx/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon2.js/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon3.jpg/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon3.jpeg/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon3.png/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon3.tsx/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon3.ts/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon3.jsx/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon3.js/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon4.jpg/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon4.jpeg/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon4.png/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon4.tsx/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon4.ts/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon4.jsx/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon4.js/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon5.jpg/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon5.jpeg/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon5.png/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon5.tsx/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon5.ts/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon5.jsx/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon5.js/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon6.jpg/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon6.jpeg/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon6.png/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon6.tsx/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon6.ts/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon6.jsx/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon6.js/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon7.jpg/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon7.jpeg/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon7.png/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon7.tsx/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon7.ts/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon7.jsx/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon7.js/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon8.jpg/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon8.jpeg/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon8.png/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon8.tsx/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon8.ts/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon8.jsx/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon8.js/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon9.jpg/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon9.jpeg/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon9.png/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon9.tsx/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon9.ts/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon9.jsx/opt/canhelp/apps/web/src/app/specialist-setup/apple-icon9.js/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image.jpg/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image.jpeg/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image.png/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image.gif/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image.tsx/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image.ts/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image.jsx/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image.js/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image0.jpg/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image0.jpeg/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image0.png/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image0.gif/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image0.tsx/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image0.ts/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image0.jsx/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image0.js/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image1.jpg/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image1.jpeg/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image1.png/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image1.gif/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image1.tsx/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image1.ts/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image1.jsx/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image1.js/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image2.jpg/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image2.jpeg/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image2.png/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image2.gif/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image2.tsx/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image2.ts/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image2.jsx/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image2.js/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image3.jpg/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image3.jpeg/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image3.png/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image3.gif/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image3.tsx/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image3.ts/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image3.jsx/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image3.js/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image4.jpg/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image4.jpeg/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image4.png/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image4.gif/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image4.tsx/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image4.ts/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image4.jsx/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image4.js/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image5.jpg/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image5.jpeg/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image5.png/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image5.gif/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image5.tsx/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image5.ts/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image5.jsx/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image5.js/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image6.jpg/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image6.jpeg/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image6.png/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image6.gif/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image6.tsx/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image6.ts/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image6.jsx/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image6.js/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image7.jpg/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image7.jpeg/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image7.png/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image7.gif/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image7.tsx/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image7.ts/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image7.jsx/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image7.js/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image8.jpg/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image8.jpeg/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image8.png/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image8.gif/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image8.tsx/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image8.ts/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image8.jsx/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image8.js/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image9.jpg/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image9.jpeg/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image9.png/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image9.gif/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image9.tsx/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image9.ts/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image9.jsx/opt/canhelp/apps/web/src/app/specialist-setup/opengraph-image9.js/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image.jpg/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image.jpeg/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image.png/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image.gif/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image.tsx/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image.ts/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image.jsx/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image.js/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image0.jpg/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image0.jpeg/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image0.png/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image0.gif/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image0.tsx/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image0.ts/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image0.jsx/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image0.js/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image1.jpg/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image1.jpeg/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image1.png/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image1.gif/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image1.tsx/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image1.ts/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image1.jsx/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image1.js/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image2.jpg/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image2.jpeg/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image2.png/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image2.gif/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image2.tsx/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image2.ts/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image2.jsx/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image2.js/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image3.jpg/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image3.jpeg/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image3.png/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image3.gif/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image3.tsx/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image3.ts/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image3.jsx/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image3.js/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image4.jpg/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image4.jpeg/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image4.png/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image4.gif/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image4.tsx/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image4.ts/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image4.jsx/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image4.js/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image5.jpg/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image5.jpeg/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image5.png/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image5.gif/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image5.tsx/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image5.ts/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image5.jsx/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image5.js/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image6.jpg/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image6.jpeg/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image6.png/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image6.gif/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image6.tsx/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image6.ts/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image6.jsx/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image6.js/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image7.jpg/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image7.jpeg/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image7.png/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image7.gif/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image7.tsx/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image7.ts/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image7.jsx/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image7.js/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image8.jpg/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image8.jpeg/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image8.png/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image8.gif/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image8.tsx/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image8.ts/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image8.jsx/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image8.js/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image9.jpg/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image9.jpeg/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image9.png/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image9.gif/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image9.tsx/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image9.ts/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image9.jsx/opt/canhelp/apps/web/src/app/specialist-setup/twitter-image9.js/opt/canhelp/apps/web/src/app/specialist-setup/page.ts/opt/canhelp/apps/web/src/app/specialist-setup/page.jsx/opt/canhelp/apps/web/src/app/specialist-setup/page.js `4webpack/lib/dependencies/HarmonyCompatibilityDependency dwebpack/lib/dependencies/ConstDependencyA  A a A c MA$ cHA%d c?Ae cFA cMAP cVAQ cTA cMAF cRAG c^A ciAa cQAb cOA c\A b@A  cMA V  cBAW  cJA  c:A H  c kAI  c!!JA  c""AA (  c##Rwebpack/lib/dependencies/HarmonyExportHeaderDependencyA cOOAA cPRABY cSSA-A- cVYA. cZ\A c]]VAw c^`AA cbqA A  ar@__webpack_require__Aw cTT0A'K co o10AOQ co o7 falseAk cppEA cx}{}A cxz{A c~~GA!G" @`%A0AK"Z" @`%AuA99 @ ` @` A9; @ `8@`  trueAxFF @O`AO0AG6G COOlAbӯ @0`@5`Aկ4 B05`hA+ @[` @]` A-t @[`.@]` `|webpack/lib/dependencies/HarmonyImportSideEffectDependency turbopack-transitionnext-ssrnext/dist/server/route-modules/app-page/module.compiled   next-server-utilitynext/dist/server/route-kind a next/dist/server/instrumentation/utils c Mnext/dist/server/lib/trace/tracer cHnext/dist/server/request-meta c?next/dist/server/lib/trace/constants cFnext/dist/server/app-render/interop-default cMnext/dist/server/app-render/strip-flight-headers cV next/dist/server/base-http/node cT next/dist/server/lib/experimental/ppr cM` next/dist/server/request/fallback-params cR` next/dist/server/app-render/encryption-utils c^` next/dist/server/lib/streaming-metadata ci`next/dist/server/app-render/action-utils cQ`next/dist/shared/lib/router/utils/app-paths cO`next/dist/server/lib/server-action-request-meta c\`next/dist/client/components/app-router-headers b@`next/dist/shared/lib/router/utils/is-bot cM`next/dist/server/response-cache cB`next/dist/lib/fallback cJ`next/dist/server/render-result c:`next/dist/lib/constants c k`next/dist/server/stream-utils/encoded-tags c!!J`next/dist/server/send-payload c""A`next/dist/shared/lib/no-fallback-error.external c##Rwebpack/lib/dependencies/PureExpressionDependency Ac DI cNNIwebpack/lib/dependencies/HarmonyExportSpecifierDependency@AA cOOAA cOO` next/dist/client/components/builtin/global-error.js cPRwebpack/lib/dependencies/HarmonyExportImportedSpecifierDependencya defaultGlobalError 89<=>`  cSS99 cVY` next/dist/server/app-render/entry-base cZ\`next/dist/client/components/redirect-status-code c]]V`  d^` ` webpack/lib/dependencies/HarmonyExportImportedSpecifierDependencyHarmonyStarExportsList ` d^`++ cbqwebpack/lib/dependencies/HarmonyImportSpecifierDependencyaAppPageRouteModuleAt cbb1RouteKindAPP_PAGEA A    cdd  ar@getRequestMetaA   c+A^l  @`@`&normalizeAppPathAiy ` @`@`.getBotTypeA ` @`@`isHtmlBotRequestA(8 `  @`@`&A  @`#@`1NEXT_ROUTER_PREFETCH_HEADERA4` @`^@`yA  @`@`'RSC_HEADERA  4` @`T@`^getIsPossibleServerActionA< U  ` @`#@`<checkIsAppPPREnabledA!!  ~~ @`@`2AQ+_+ pp @`"@`0shouldServeStreamingMetadataA,, ` {{ @`5@`QstripFlightHeadersA34 ll @@`entryBaseA@4I44`TY @` @`Ap4{4  ` @@`setReferenceManifestsSingletonA5 6 ` ff @@`&createServerModuleMapA66 `ee @`@`2getTracerA&7/7 LL @`@`NodeNextRequestAZ8i84 QQ @` @`/NodeNextResponseA884 LL @` @`0BaseServerSpanhandleRequestA,>H>A,>:>  ?? @`A@`]AxBB 99 @9`*@9`8interopDefaultACC 88 @@`@@`-webpack/lib/dependencies/CommonJsFullRequireDependencyajoinAFF pathAFF @O`A@O`UAJK )) @``&@``4A4RBR %% @}`@}`'NEXT_CACHE_TAGS_HEADERASS4|`BB @`@`.CachedRouteKindnAYYAYY  v`66 @`@`2parseFallbackFieldA^^ q`33 @`@`1FallbackModePRERENDERA__A__  j`,, @`!@`7isBotA__ e`## @`;@`@BLOCKING_STATIC_RENDERAC`f`AC`O`  _`!! @`#@`FNOT_FOUNDAbbAb b  Y` @`:@`PAPbsbAPb\b  T` @`@`BAbbAbb  O` @`1@`TAddAdd  J`   @`!@`7NoFallbackErrorA ee4E` @`@`-786AggAgg  @9 @`#@`5getFallbackRouteParamsAjj ;`  @`G@`]PAGESAppApp  5` @`@`3 EMPTYRenderResultAppApp  .` @`@`0)(Arr * @`O@`]A!s7s &`  CAuuuAuu~u  ! @`@`-AD{\{AD{S{  ` @=`g@=`NEXT_IS_PRERENDER_HEADERA4` @Q`@Q`6CACHE_ONE_YEARATb4` @`(@`6AA   ` @`qANEXT_DID_POSTPONE_HEADERA !4` @`@`6A0F4` @`qAAѐ4` @`"@`8sendRenderResultAƑ ` @`@`+fromStaticAA  ` @` @`7RSC_CONTENT_TYPE_HEADERAђ4` @`H@`_Aw ` @`@`'AVhAVb  ` @`@`.Ahv  @`!@`/A5C  @`@`'a`A4` @`#@`9^]A,B4` @`kA[ZAŠ4` @`@`4RedirectStatusCodeA4` @`5@`GAʣ4` @`@`6Aaq ` @ `@ `+At ` @`@`'ASjAS_  ` @#`@#`3A4`|| @#`H@#`_AL\ ` @6`@6`'ENCODED_TAGSCLOSEDBODY_AND_HTMLA ,A A   `{{ @H`+@H`LA `yy @L`@L`'32AA  `jj @u`_@u`wA9I `pp @`@`#AA  GG @`T@`pSpanKindSERVERA#2A#+  << @`@`)QPA*94`cc @`@`,getRevalidateReasonA  22 @`"@`5webpack/lib/dependencies/ImportEagerDependencycc  `{@ bb A;  AS next/dist/client/components/builtin/forbidden.js A next/dist/client/components/builtin/unauthorized.js A.  A  next-metadata-image-loader?type=icon&segment=&basePath=&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js!/opt/canhelp/apps/web/src/app/icon.svg?__next_metadata__ A  `_ResolverCachePluginCacheMisscontextrequestqueryfragmentmoduledirectoryfileinternalfullySpecifieddescriptionFilePathdescriptionFileDatadescriptionFileRootrelativePath  /opt/canhelp/apps/web/src/app/become-specialist/page.tsx0nameversionprivatescriptsdependenciesdevDependenciesweb0.1.0 devbuildstartlinttypechecknext dev --port 3000next buildnext startnext linttsc --noEmit @canhelp/shared@marsidev/react-turnstilebetter-authnanostoresreactreact-domsocket.io-clientzod*^1.5.0^1.2.7^1.2.0^15.1.6^19.0.0^4.8.1^3.24.1@types/node@types/react@types/react-domautoprefixerpostcsstailwindcsstypescript^22.10.7^19.0.6^19.0.3^10.4.20^8.5.1^3.4.17^5.7.3/opt/canhelp/apps/web./src/app/become-specialist/page.tsx@ yB/opt/canhelp/opt/@/opt/canhelp/apps/web/src/app/become-specialist/package.json/opt/canhelp/apps/web/src/app/package.json/opt/canhelp/apps/web/src/package.json yB/opt/canhelp/apps/web/src/app/become-specialist/opt/canhelp/apps/web/src/app/opt/canhelp/apps/web/src/opt/canhelp/apps!pJ yB`J yBf960364c5f724fc3  /opt/canhelp/apps/web/src/app/dashboard/page.tsx0ߜ./src/app/dashboard/page.tsx@ yB/opt/canhelp/apps/web/src/app/dashboard!pJ yB`J yB54b9246d0ec1fc12@  yB@  yB yBՁ/@/opt/canhelp/apps/web/src/app/dashboard/package.json issuerissuerLayercompilerserver w@  yB@/opt/canhelp/apps/web/opt/canhelp/apps/web/src/app/package.json @/opt/canhelp/apps/web/opt/canhelp/apps/web/src/package.json/opt/canhelp/apps/web/opt/canhelp/apps/web/package.json/opt/canhelp/apps/web/opt/canhelp/apps/package.json/opt/canhelp/apps/web/opt/canhelp/package.json/opt/canhelp/apps/web/opt/package.json @ /opt/canhelp/apps/web/opt/canhelp/apps/web/src/app/dashboard/package.json/opt/canhelp/apps/web/opt/canhelp/apps/web/src/app/dashboard/page.tsx/opt/canhelp/apps/web/opt/canhelp/apps/web/src/app/dashboard/page.tsx.js/opt/canhelp/apps/web/opt/canhelp/apps/web/src/app/dashboard/page.tsx.mjs/opt/canhelp/apps/web/opt/canhelp/apps/web/src/app/dashboard/page.tsx.tsx/opt/canhelp/apps/web/opt/canhelp/apps/web/src/app/dashboard/page.tsx.ts/opt/canhelp/apps/web/opt/canhelp/apps/web/src/app/dashboard/page.tsx.jsx/opt/canhelp/apps/web/opt/canhelp/apps/web/src/app/dashboard/page.tsx.json/opt/canhelp/apps/web/opt/canhelp/apps/web/src/app/dashboard/page.tsx.wasmf g Z@  yBf@ /opt/canhelp/apps/web/opt/canhelp/apps/web/src/app/become-specialist/package.json/opt/canhelp/apps/web/opt/canhelp/apps/web/src/app/become-specialist/page.tsx/opt/canhelp/apps/web/opt/canhelp/apps/web/src/app/become-specialist/page.tsx.js/opt/canhelp/apps/web/opt/canhelp/apps/web/src/app/become-specialist/page.tsx.mjs/opt/canhelp/apps/web/opt/canhelp/apps/web/src/app/become-specialist/page.tsx.tsx/opt/canhelp/apps/web/opt/canhelp/apps/web/src/app/become-specialist/page.tsx.ts/opt/canhelp/apps/web/opt/canhelp/apps/web/src/app/become-specialist/page.tsx.jsx/opt/canhelp/apps/web/opt/canhelp/apps/web/src/app/become-specialist/page.tsx.json/opt/canhelp/apps/web/opt/canhelp/apps/web/src/app/become-specialist/page.tsx.wasmT  0H./src/app/specialist-setup/page.tsx@  yB/opt/canhelp/apps/web/src/app/specialist-setupJ!pJ yB`J yB386cb8af793ff7aaHF@/opt/canhelp/apps/web/src/app/specialist-setup/package.json ,// This file is generated by the Webpack next-flight-loader. import { registerClientReference } from "react-server-dom-webpack/server"; export default registerClientReference( function() { throw new Error("Attempted to call the default export of \"/opt/canhelp/apps/web/src/app/dashboard/page.tsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component."); }, "/opt/canhelp/apps/web/src/app/dashboard/page.tsx", "default", ); `_` abcmainFieldsconditionNames`$abcdefghijklmnopqrreact$react/compiler-runtime$react/jsx-dev-runtime$react/jsx-runtime$react-dom$react-dom/client$react-dom/server$react-dom/server.browser$react-dom/server.edge$react-dom/static$react-dom/static.browser$react-dom/static.edge$react-server-dom-webpack/client$react-server-dom-webpack/server$react-server-dom-webpack/server.node$react-server-dom-webpack/static$@vercel/turbopack-ecmascript-runtime/browser/dev/hmr-client/hmr-client.tsbcdcdefghijklmnopqrnext/dist/server/route-modules/app-page/vendored/rsc/reactnext/dist/server/route-modules/app-page/vendored/rsc/react-compiler-runtimenext/dist/server/route-modules/app-page/vendored/rsc/react-jsx-dev-runtimenext/dist/server/route-modules/app-page/vendored/rsc/react-jsx-runtimenext/dist/server/route-modules/app-page/vendored/rsc/react-domnext/dist/compiled/react-dom/clientnext/dist/compiled/react-dom/server.nodenext/dist/compiled/react-dom/server.browsernext/dist/build/webpack/alias/react-dom-server.jsnext/dist/compiled/react-dom/static.nodenext/dist/compiled/react-dom/static.browsernext/dist/compiled/react-dom/static.edgenext/dist/compiled/react-server-dom-webpack/client.nodenext/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-webpack-servernext/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-webpack-staticnext/dist/client/dev/noop-turbopack-hmrcmainreact-server...`_`abcdefg6ijkl  /opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-swc-loader.jslu3a3d700c7aa20be9typeactionIdsclientRefsclientEntryTypeisClientRefclientLauto  |*default* yB]b d `=@ `J A*A+ react-server-dom-webpack/server `Jwebpack/lib/dependencies/HarmonyExportExpressionDependency` registerClientReferenceA  b&<// This file is generated by the Webpack next-flight-loader. import { registerClientReference } from "react-server-dom-webpack/server"; export default registerClientReference( function() { throw new Error("Attempted to call the default export of \"/opt/canhelp/apps/web/src/app/become-specialist/page.tsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component."); }, "/opt/canhelp/apps/web/src/app/become-specialist/page.tsx", "default", ); `    3  DM8b949ca63e93259a+  \ yB2 d `=@ `J A:A;   `J A  b& LMC   }@  yBB~>X@ /opt/canhelp/apps/web/opt/canhelp/apps/web/src/app/specialist-setup/package.json/opt/canhelp/apps/web/opt/canhelp/apps/web/src/app/specialist-setup/page.tsx/opt/canhelp/apps/web/opt/canhelp/apps/web/src/app/specialist-setup/page.tsx.js/opt/canhelp/apps/web/opt/canhelp/apps/web/src/app/specialist-setup/page.tsx.mjs/opt/canhelp/apps/web/opt/canhelp/apps/web/src/app/specialist-setup/page.tsx.tsx/opt/canhelp/apps/web/opt/canhelp/apps/web/src/app/specialist-setup/page.tsx.ts/opt/canhelp/apps/web/opt/canhelp/apps/web/src/app/specialist-setup/page.tsx.jsx/opt/canhelp/apps/web/opt/canhelp/apps/web/src/app/specialist-setup/page.tsx.json/opt/canhelp/apps/web/opt/canhelp/apps/web/src/app/specialist-setup/page.tsx.wasm:// This file is generated by the Webpack next-flight-loader. import { registerClientReference } from "react-server-dom-webpack/server"; export default registerClientReference( function() { throw new Error("Attempted to call the default export of \"/opt/canhelp/apps/web/src/app/specialist-setup/page.tsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component."); }, "/opt/canhelp/apps/web/src/app/specialist-setup/page.tsx", "default", ); ` j  a4803d4eab8253a1  - yB(f d `=@ `J A8A9   `J A  b&@ 2 yB/opt/canhelp/node_modules/react-server-dom-webpackT@/opt/canhelp/apps/web/src/app/specialist-setup/node_modules/opt/canhelp/apps/web/src/app/node_modules/opt/canhelp/apps/web/src/node_modules  /opt/canhelp/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-webpack-server.js /opt/canhelp/node_modules/next/package.json`descriptionvlicenserepositorybugshomepagetypesfilesbintaskrpeerDependenciespeerDependenciesMetaoptionalDependencieskeywordsengines15.5.14The React Framework./dist/server/next.jsMITvercel/next.jshttps://github.com/vercel/next.js/issueshttps://nextjs.orgindex.d.ts`Ddistapp.jsapp.d.tsbabel.jsbabel.d.tsclient.jsclient.d.tscompatcache.jscache.d.tsconfig.jsconfig.d.tsconstants.jsconstants.d.tsdocument.jsdocument.d.tsdynamic.jsdynamic.d.tserror.jserror.d.tsfuturelegacyscript.jsscript.d.tsserver.jsserver.d.tshead.jshead.d.tsimage.jsimage.d.tslink.jslink.d.tsform.jsform.d.tsrouter.jsrouter.d.tsjest.jsjest.d.tsamp.jsamp.d.tsog.jsog.d.tsroot-params.jsroot-params.d.tstypes.d.tstypes.jsёtypes/global.d.tstypes/compiled.d.tsimage-types/global.d.tsnavigation-types/navigation.d.tsnavigation-types/compat/navigation.d.tsfontnavigation.jsnavigation.d.tsheaders.jsheaders.d.tsnavigation-typesweb-vitals.jsweb-vitals.d.tsexperimental/testing/server.jsexperimental/testing/server.d.tsexperimental/testmode/playwright.jsexperimental/testmode/playwright.d.tsexperimental/testmode/playwright/msw.jsexperimental/testmode/playwright/msw.d.tsexperimental/testmode/proxy.jsexperimental/testmode/proxy.d.tsl./dist/bin/next AreleaseAprepublishOnlybncc-compiledstorybookbuild-storybooktest-storybookcross-env NEXT_SERVER_NO_MANGLE=1 taskrtaskr releasepnpm releasecd ../../ && turbo run buildtsc --project tsconfig.build.json --declaration --emitDeclarationOnly --stripInternal --declarationDir disttsec --noEmittaskr nccBROWSER=none storybook dev -p 6006storybook buildrequires./taskfile-webpack.js./taskfile-ncc.js./taskfile-swc.js./taskfile-watch.js@next/env@swc/helperscaniuse-liteGstyled-jsx0.5.15^1.0.300015798.4.315.1.6@opentelemetry/api@playwright/testbabel-plugin-react-compiler,-sass^1.1.0^1.51.1*^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0^1.3.0optional     sharp@next/swc-darwin-arm64@next/swc-darwin-x64@next/swc-linux-arm64-gnu@next/swc-linux-arm64-musl@next/swc-linux-x64-gnu@next/swc-linux-x64-musl@next/swc-win32-arm64-msvc@next/swc-win32-x64-msvc^0.34.3tttttttt@@ampproject/toolbox-optimizer@babel/code-frame@babel/core@babel/eslint-parser@babel/generator@babel/plugin-syntax-bigint@babel/plugin-syntax-dynamic-import@babel/plugin-syntax-import-attributes@babel/plugin-syntax-jsx@babel/plugin-syntax-typescript@babel/plugin-transform-class-properties@babel/plugin-transform-export-namespace-from@babel/plugin-transform-modules-commonjs@babel/plugin-transform-numeric-separator@babel/plugin-transform-object-rest-spread@babel/plugin-transform-runtime@babel/preset-env@babel/preset-react@babel/preset-typescript@babel/runtime@babel/traverse@babel/types@base-ui-components/react@capsizecss/metrics@edge-runtime/cookies@edge-runtime/ponyfill@edge-runtime/primitives@hapi/accept@jest/transform@jest/types@mswjs/interceptors@napi-rs/triples@next/font@next/polyfill-module@next/polyfill-nomodule@next/react-refresh-utils@next/swc@rspack/core@storybook/addon-a11y@storybook/addon-essentials@storybook/addon-interactions@storybook/addon-webpack5-compiler-swc@storybook/blocks@storybook/react@storybook/react-webpack5@storybook/test@storybook/test-runner@swc/core@swc/types@taskr/clear@taskr/esnext@types/amphtml-validator@types/babel__code-frame@types/babel__core@types/babel__generator@types/babel__template@types/babel__traverse@types/bytes@types/ci-info@types/compression@types/content-disposition@types/content-type@types/cookie@types/cross-spawn@types/debug@types/express-serve-static-core@types/fresh@types/glob@types/jsonwebtoken@types/lodash@types/lodash.curry@types/path-to-regexp@types/picomatch@types/platform@types/react-is@types/semver@types/send@types/shell-quote@types/tar@types/text-table@types/ua-parser-js@types/webpack-sources1@types/ws@vercel/ncc@vercel/nft@vercel/turbopack-ecmascript-runtimeacornamphtml-validatoranserargassertasync-retryasync-semaaxe-playwrightbabel-loaderbabel-plugin-transform-definebabel-plugin-transform-react-remove-prop-typesbrowserify-zlibbrowserslistbufferbusboybytesci-infocli-selectclient-onlycommandercomment-jsoncompressionconfconstants-browserifycontent-dispositioncontent-typecookiecross-envcross-spawncrypto-browserifycss-loadercss.escapecssnano-preset-defaultdata-uri-to-bufferdebugdevaluedomain-browseredge-runtimeeventsfind-upfreshglobgzip-sizehttp-proxyhttp-proxy-agenthttps-browserifyhttps-proxy-agenticss-utilsignore-loaderimage-sizeis-dockeris-wsljest-workerjson5jsonwebtokenloader-runnerloader-utils2loader-utils3lodash.currymini-css-extract-pluginmswnanoidnative-urlneo-asyncnode-html-parseroraos-browserifyp-limitp-queuepath-browserifypath-to-regexppicomatchpostcss-flexbugs-fixespostcss-modules-extract-importspostcss-modules-local-by-defaultpostcss-modules-scopepostcss-modules-valuespostcss-preset-envpostcss-safe-parserpostcss-scsspostcss-value-parserprocesspunycodequerystring-es3raw-bodyreact-refreshrecastregenerator-runtimesafe-stable-stringifysass-loaderschema-utils2schema-utils3semversendserver-onlysetimmediateshell-quotesource-mapsource-map-loadersource-map08stacktrace-parser stream-browserifystream-httpstrict-event-emitterstring-hashstring_decoderstrip-ansistyle-loadersuperstructtarterserterser-webpack-plugintext-tabletimers-browserifytty-browserify\ua-parser-jsunistoreutilvm-browserifywatchpackweb-vitalswebpackwebpack-sources1webpack-sources3wsBzod-validation-error2.8.37.26.27.26.107.24.67.27.07.8.37.26.07.25.97.25.47.26.37.26.91.0.0-beta.23.4.06.0.04.0.05.0.229.5.00.23.01.2.01.6.01.51.11.4.58.6.03.0.00.21.01.11.240.1.71.1.01.0.07.0.67.20.57.4.47.20.73.1.12.0.00.0.360.5.41.1.30.3.34.1.54.17.330.5.07.1.19.0.04.14.1984.1.61.7.02.3.31.3.419.0.819.0.318.2.47.3.10.14.41.7.16.1.50.2.10.7.36npm:@types/webpack-sources@0.1.58.2.00.34.00.27.1*8.14.01.0.381.4.94.1.01.2.3ԅ2.0.310.0.019.1.0-rc.2܆0.4.240.2.04.24.45.6.0׷watson/ci-info#f43f6a1cefff47fb361c88cf4b943fdbcaafe5401.1.20.0.112.1.03.0.31.7.45.0.0˅0.5.31.0.40.4.16.0.37.0.33.12.07.1.21.5.1ą3.0.14.1.12.0.14.19.04.0.13.3.00.5.27.1.75.1.11.18.15.0.15.1.00.1.21.2.12.2.027.5.12.2.34.3.0npm:loader-utils@2.0.4npm:loader-utils@3.1.32.4.42.3.03.1.320.3.42.6.15.3.34.0.40.3.03.1.06.6.21.0.16.3.04.2.07.4.34.0.30.11.102.1.12.4.10.12.00.23.110.13.42.5.015.0.0npm:schema-utils@2.7.1npm:schema-utils@3.0.07.3.20.18.0ą1.0.51.7.30.6.1śnpm:source-map@0.8.0-beta.00.1.101.3.01.0.36.1.155.27.05.3.92.0.125.8.21.0.353.4.10.12.42.4.04.2.15.98.0npm:webpack-sources@1.4.3npm:webpack-sources@3.2.38.2.33.25.76n frameworknextjsnodefront-endbackendclivercel^18.18.0 || ^19.8.0 || >= 20.0.0./dist/server/route-modules/app-page/vendored/rsc/react-server-dom-webpack-server.js@  2 yB/opt/canhelp/node_modulesnlnext@15.5.14%@/opt/canhelp/node_modules/next/dist/server/route-modules/app-page/vendored/rsc@/opt/canhelp/node_modules/next/dist/server/route-modules/app-page/vendored/opt/canhelp/node_modules/next/dist/server/route-modules/app-page/opt/canhelp/node_modules/next/dist/server/route-modules/opt/canhelp/node_modules/next/dist/server@/opt/canhelp/node_modules/next/dist@/opt/canhelp/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/package.json/opt/canhelp/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-webpack-server@/opt/canhelp/node_modules/next/dist/server/route-modules/app-page/vendored/package.json/opt/canhelp/node_modules/next/dist/server/route-modules/app-page/package.json/opt/canhelp/node_modules/next/dist/server/route-modules/package.json/opt/canhelp/node_modules/next/dist/server/package.json/opt/canhelp/node_modules/next/dist/package.jsonQ r @ G yB  /opt/canhelp/apps/web/opt/canhelp/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/package.json/opt/canhelp/apps/web/opt/canhelp/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-webpack-server/opt/canhelp/apps/web/opt/canhelp/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-webpack-server.js/opt/canhelp/apps/web/opt/canhelp/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-webpack-server.mjs/opt/canhelp/apps/web/opt/canhelp/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-webpack-server.tsx/opt/canhelp/apps/web/opt/canhelp/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-webpack-server.ts/opt/canhelp/apps/web/opt/canhelp/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-webpack-server.jsx/opt/canhelp/apps/web/opt/canhelp/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-webpack-server.json/opt/canhelp/apps/web/opt/canhelp/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-webpack-server.wasm@/opt/canhelp/apps/web/opt/canhelp/node_modules/next/opt/canhelp/apps/web/opt/canhelp/node_modules/package.jsonNN@/opt/canhelp/apps/web/opt/canhelp/node_modules/next/dist/server/route-modules/app-page/vendored/package.json/opt/canhelp/apps/web/opt/canhelp/node_modules/next/dist/server/route-modules/app-page/package.json/opt/canhelp/apps/web/opt/canhelp/node_modules/next/dist/server/route-modules/package.json/opt/canhelp/apps/web/opt/canhelp/node_modules/next/dist/server/package.json@/opt/canhelp/apps/web/opt/canhelp/node_modules/next/dist/package.json/opt/canhelp/apps/web/opt/canhelp/node_modules/next/package.json@  0 yB%&,.5@6/opt/canhelp/node_modules/next-flight-client-entry-loader/opt/canhelp/node_modules/next-flight-client-entry-loader.js/opt/canhelp/node_modules/next-flight-client-entry-loader.json/opt/canhelp/node_modules/next-flight-client-entry-loader.node77777@0@  @ yB )^import(/* webpackMode: "eager" */ "/opt/canhelp/apps/web/src/app/specialist-setup/page.tsx"); ` :ssr;`<=?next/dist/compiled/server-only?@ABCDEFGHIJKLMnext/dist/compiled/server-only/indexnext/dist/compiled/client-only/indexNOPQRSTUnext/dist/api/navigationVWXYZ[` \]^_`ab cd3hi  /opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-flight-client-entry-loader.jsjsc6530003adc5b415 yB`\ {{  ` !"J  [d yB`\ mm  qr ./0@ yBaI< lmJ )*K@  yBIL9:);NOWu^ bcY  @  yBX/01Q!om/* __next_internal_client_entry_do_not_use__ default auto */ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { useState, useEffect } from 'react'; import { useRouter } from 'next/navigation'; import { useSession } from '@/lib/auth'; import { useLocale } from '@/context/locale'; import { request } from '@/lib/api'; export default function BecomeSpecialistPage() { const { data: session, isPending } = useSession(); const router = useRouter(); const { t } = useLocale(); const [loading, setLoading] = useState(false); const [error, setError] = useState(''); const role = session?.user?.role; process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (!isPending && session && role === 'specialist') router.push('/tasks'); }, [ session, isPending, role ]); async function handleBecome() { setLoading(true); setError(''); try { await request('/users/me/become-specialist', { method: 'POST' }); router.push('/specialist-setup'); } catch { setError(t('common.error')); setLoading(false); } } if (isPending || session && role === 'specialist') { return /*#__PURE__*/ _jsx("div", { className: "text-center py-20 text-white", children: t('common.loading') }); } const steps = [ { n: 1, title: t('become_specialist.step1.title'), desc: t('become_specialist.step1.desc'), icon: '🗂️' }, { n: 2, title: t('become_specialist.step2.title'), desc: t('become_specialist.step2.desc'), icon: '🔍' }, { n: 3, title: t('become_specialist.step3.title'), desc: t('become_specialist.step3.desc'), icon: '💰' } ]; const benefits = [ { icon: '🎯', text: t('become_specialist.benefit1') }, { icon: '⭐', text: t('become_specialist.benefit2') }, { icon: '📅', text: t('become_specialist.benefit3') }, { icon: '❤️', text: t('become_specialist.benefit4') } ]; return /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("section", { className: "bg-gradient-to-br from-blue-700 to-blue-500 text-white py-20 px-4", children: /*#__PURE__*/ _jsxs("div", { className: "max-w-3xl mx-auto text-center", children: [ /*#__PURE__*/ _jsx("h1", { className: "text-4xl md:text-5xl font-bold mb-4", children: t('become_specialist.hero.title') }), /*#__PURE__*/ _jsx("p", { className: "text-xl text-blue-100 mb-8", children: t('become_specialist.hero.subtitle') }) ] }) }), /*#__PURE__*/ _jsxs("section", { className: "max-w-4xl mx-auto px-4 py-16", children: [ /*#__PURE__*/ _jsx("h2", { className: "text-2xl font-bold text-white mb-10 text-center", children: t('become_specialist.how.title') }), /*#__PURE__*/ _jsx("div", { className: "grid md:grid-cols-3 gap-8", children: steps.map((step)=>/*#__PURE__*/ _jsxs("div", { className: "text-center", children: [ /*#__PURE__*/ _jsx("div", { className: "w-14 h-14 bg-blue-50 border-2 border-blue-200 rounded-2xl flex items-center justify-center text-2xl mx-auto mb-4", children: step.icon }), /*#__PURE__*/ _jsx("div", { className: "w-7 h-7 bg-blue-600 text-white rounded-full flex items-center justify-center text-sm font-bold mx-auto -mt-1 mb-3", children: step.n }), /*#__PURE__*/ _jsx("h3", { className: "font-semibold text-white text-lg mb-2", children: step.title }), /*#__PURE__*/ _jsx("p", { className: "text-blue-100 text-sm leading-relaxed", children: step.desc }) ] }, step.n)) }) ] }), /*#__PURE__*/ _jsx("section", { className: "bg-gray-50 py-14 px-4", children: /*#__PURE__*/ _jsxs("div", { className: "max-w-3xl mx-auto", children: [ /*#__PURE__*/ _jsx("h2", { className: "text-2xl font-bold text-gray-900 mb-8 text-center", children: t('become_specialist.benefits.title') }), /*#__PURE__*/ _jsx("div", { className: "grid sm:grid-cols-2 gap-4", children: benefits.map((b, i)=>/*#__PURE__*/ _jsxs("div", { className: "flex items-start gap-4 bg-white rounded-xl border border-gray-200 p-5", children: [ /*#__PURE__*/ _jsx("span", { className: "text-2xl shrink-0", children: b.icon }), /*#__PURE__*/ _jsx("p", { className: "text-gray-700 font-medium leading-snug", children: b.text }) ] }, i)) }) ] }) }), /*#__PURE__*/ _jsx("section", { className: "py-16 px-4 text-center", children: /*#__PURE__*/ _jsxs("div", { className: "max-w-md mx-auto", children: [ error && /*#__PURE__*/ _jsx("p", { className: "text-red-500 text-sm mb-4", children: error }), session ? /*#__PURE__*/ _jsx("button", { onClick: handleBecome, disabled: loading, className: "w-full bg-blue-600 text-white px-8 py-4 rounded-xl font-bold text-lg hover:bg-blue-700 disabled:opacity-60 transition", children: loading ? t('common.loading') : t('profile.become_specialist') }) : /*#__PURE__*/ _jsx("a", { href: "/register?role=specialist", className: "block w-full bg-blue-600 text-white px-8 py-4 rounded-xl font-bold text-lg hover:bg-blue-700 transition text-center", children: t('profile.become_specialist') }) ] }) }) ] }); } `sideEffectFree  $`$     next/dist/server/route-modules/app-page/vendored/ssr/reactnext/dist/server/route-modules/app-page/vendored/ssr/react-compiler-runtimenext/dist/server/route-modules/app-page/vendored/ssr/react-jsx-dev-runtimenext/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtimenext/dist/server/route-modules/app-page/vendored/ssr/react-domnext/dist/server/route-modules/app-page/vendored/ssr/react-server-dom-webpack-clientnext/dist/compiled/react-server-dom-webpack/server.nodenext/dist/compiled/react-server-dom-webpack/static.node  /opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-flight-client-module-loader.js(1552d077f220356c9  @BecomeSpecialistPage yB d a=| b=| `}@ `, A `, A `( A- `- A.R `$ AbZASZ @`( react/jsx-runtime b=|  `, next/navigation `, @/lib/auth `( @/context/locale `- @/lib/api `$ @useSessionA  b)3useRouterA  b useLocaleA  b useStateA$  c " *AKS  c  &useEffectA  c7@}|A  cjsx_jsxA  c##!jsxs_jsxsAa f   cNNA   cPPA8 =   cR(R-A   cU&U*A   cY&Y*A   c``AH L   cc"c&A(,  cg"g&A  ciBiGA_c  cl2l6A  cp2p6A  ct2t6A  cx2x6A[_  @`@`A  @`(@`-ARV  @`&@`*AIM  @`&@`*A  @`I@`NA  @`6@`:A {{ @`6@`:A[_ ww @`@`A ss @`(@`-A[_ oo @`/@`3A#' {kk @`0@`4A wgg @`+@`//* __next_internal_client_entry_do_not_use__ default auto */ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime"; import { useEffect, useState } from 'react'; import { useRouter } from 'next/navigation'; import Link from 'next/link'; import { useSession } from '@/lib/auth'; import { useLocale } from '@/context/locale'; import { getMyTasks, getMyOffers, getMyReviews, getNotifications, getMyDashboard, getSpecialistFomoDashboard, getCustomerFomoDashboard, getMySpecialistCards } from '@/lib/api'; import { formatPrice, taskTitle } from '@/lib/taskLocale'; import { PlanBadge } from '@/components/PlanBadge'; import { UsageMeter } from '@/components/UsageMeter'; /** Extract the quoted task title from a stored notification body (any locale) */ function extractNotifParam(body) { if (!body) return null; const m = body.match(/[«""](.+?)[»""]/); return m?.[1] ?? null; } function PlanBlock({ dashboard, t }) { const plan = dashboard.plan; const expiry = dashboard.planExpiration; const usage = dashboard.usage; const stats = dashboard.stats; const expiryPct = expiry ? Math.max(0, Math.min(100, Math.round(expiry.daysLeft / 30 * 100))) : 100; const expiryColor = expiry ? expiry.daysLeft <= 3 ? 'bg-red-500' : expiry.daysLeft <= 7 ? 'bg-amber-400' : 'bg-green-400' : 'bg-green-400'; return /*#__PURE__*/ _jsxs("div", { className: "bg-white rounded-2xl border border-gray-200 p-5 mb-6", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center justify-between mb-4", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-2", children: [ /*#__PURE__*/ _jsx("h2", { className: "font-semibold text-gray-800 text-sm", children: t('dashboard.plan.title', 'My Plan') }), plan ? /*#__PURE__*/ _jsx(PlanBadge, { tier: plan.tier, size: "sm" }) : /*#__PURE__*/ _jsx("span", { className: "text-xs text-gray-400", children: t('dashboard.plan.no_plan', 'Free') }) ] }), /*#__PURE__*/ _jsx(Link, { href: "/pricing", className: "text-xs font-medium text-blue-600 hover:underline", children: plan?.tier === 'ultimate' ? null : t('dashboard.plan.upgrade', 'Upgrade') }) ] }), expiry && /*#__PURE__*/ _jsxs("div", { className: "mb-4", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex justify-between text-xs text-gray-500 mb-1", children: [ /*#__PURE__*/ _jsx("span", { children: t('dashboard.plan.expires', 'Expires in {n} days').replace('{n}', String(expiry.daysLeft)) }), /*#__PURE__*/ _jsxs("span", { children: [ expiry.daysLeft, " ", t('pricing.days', 'days') ] }) ] }), /*#__PURE__*/ _jsx("div", { className: "h-1.5 rounded-full bg-gray-100", children: /*#__PURE__*/ _jsx("div", { className: `h-full rounded-full transition-all ${expiryColor}`, style: { width: `${expiryPct}%` } }) }) ] }), (usage.messagesSent !== undefined || usage.ordersMade !== undefined) && /*#__PURE__*/ _jsxs("div", { className: "space-y-2 mb-4", children: [ /*#__PURE__*/ _jsx("p", { className: "text-xs font-medium text-gray-500 uppercase tracking-wide", children: t('dashboard.plan.limits', 'Daily limits') }), /*#__PURE__*/ _jsx(UsageMeter, { current: usage.messagesSent, limit: usage.messagesLeft !== null ? usage.messagesSent + usage.messagesLeft : null, label: t('dashboard.plan.messages', 'Messages') }), /*#__PURE__*/ _jsx(UsageMeter, { current: usage.ordersMade, limit: usage.ordersLeft !== null ? usage.ordersMade + usage.ordersLeft : null, label: t('dashboard.plan.orders', 'Orders') }) ] }), Object.keys(stats).length > 0 && /*#__PURE__*/ _jsx("div", { className: "grid grid-cols-2 gap-2", children: Object.entries(stats).map(([key, val])=>/*#__PURE__*/ _jsxs("div", { className: "bg-gray-50 rounded-xl px-3 py-2 text-center", children: [ /*#__PURE__*/ _jsx("p", { className: "text-lg font-bold text-gray-800", children: val }), /*#__PURE__*/ _jsx("p", { className: "text-[10px] text-gray-400 uppercase tracking-wide", children: t(`dashboard.stats.${key}`, key) }) ] }, key)) }) ] }); } export default function DashboardPage() { const { data: session, isPending } = useSession(); const router = useRouter(); const { t, locale } = useLocale(); const [tasks, setTasks] = useState([]); const [offers, setOffers] = useState([]); const [myReviews, setMyReviews] = useState([]); const [invitations, setInvitations] = useState([]); const [loading, setLoading] = useState(true); const [dashboard, setDashboard] = useState(null); const [fomoData, setFomoData] = useState(null); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (!isPending && !session) router.push('/login'); }, [ session, isPending ]); // Redirect new specialists without any cards to the setup wizard process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (!session) return; const role = session.user?.role; if (role !== 'specialist') return; getMySpecialistCards().then(({ cards })=>{ if (cards.length === 0) router.push('/specialist-setup'); }).catch(()=>{}); }, [ session ]); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (!session) return; Promise.all([ getMyTasks(), getMyOffers(), getMyReviews(), getNotifications(), getMyDashboard() ]).then(([t, o, r, notifs, dash])=>{ setTasks(t); setOffers(o); setMyReviews(r); setInvitations(notifs.filter((n)=>n.type === 'task_invite')); setDashboard(dash); }).catch(()=>{}).finally(()=>setLoading(false)); }, [ session ]); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (!session) return; const role = session.user?.role; if (role === 'specialist') { getSpecialistFomoDashboard().then(setFomoData).catch(()=>{}); } else { getCustomerFomoDashboard().then(setFomoData).catch(()=>{}); } }, [ session ]); if (isPending || loading) return /*#__PURE__*/ _jsx("div", { className: "text-center py-20 text-white", children: t('common.loading') }); const dateLocale = locale === 'ru' ? 'ru-RU' : locale === 'en' ? 'en-US' : 'el-GR'; const activeTasks = tasks.filter((task)=>task.status !== 'completed' && task.status !== 'cancelled'); const completedTasks = tasks.filter((task)=>task.status === 'completed' || task.status === 'cancelled'); const activeOffers = offers.filter((row)=>{ const offer = row.offer || row; const task = row.task; return offer.status !== 'other_accepted' && task?.status !== 'completed' && task?.status !== 'cancelled'; }); const completedOffers = offers.filter((row)=>{ const offer = row.offer || row; const task = row.task; return offer.status === 'other_accepted' || task?.status === 'completed' || task?.status === 'cancelled'; }); function TaskCard({ task }) { const offerCount = task.offerCount ?? 0; const declinedCount = task.declinedCount ?? 0; const activeOfferCount = offerCount - declinedCount; return /*#__PURE__*/ _jsx(Link, { href: `/tasks/${task.id}`, className: "block bg-white rounded-xl border border-gray-200 p-4 hover:shadow-sm hover:border-blue-300 transition", children: /*#__PURE__*/ _jsxs("div", { className: "flex justify-between items-start", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex-1 min-w-0", children: [ /*#__PURE__*/ _jsx("p", { className: "font-medium text-gray-900 truncate", children: taskTitle(task, locale) }), /*#__PURE__*/ _jsx("p", { className: "text-xs text-gray-400 mt-1", children: new Date(task.createdAt).toLocaleDateString(dateLocale) }), offerCount > 0 && /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-2 mt-1.5", children: [ /*#__PURE__*/ _jsxs("span", { className: "text-xs text-blue-600 font-medium", children: [ "\uD83D\uDCBC ", offerCount, " ", t('dashboard.offers_count', 'предл.') ] }), declinedCount > 0 && /*#__PURE__*/ _jsxs("span", { className: "text-xs text-red-400", children: [ "✕ ", declinedCount, " ", t('dashboard.declined_count', 'откл.') ] }) ] }) ] }), /*#__PURE__*/ _jsxs("div", { className: "ml-3 text-right shrink-0", children: [ /*#__PURE__*/ _jsx("span", { className: `text-xs px-2 py-0.5 rounded-full ${task.status === 'open' ? 'bg-green-100 text-green-700' : task.status === 'in_progress' ? 'bg-blue-100 text-blue-700' : task.status === 'completed' ? 'bg-gray-100 text-gray-600' : 'bg-red-100 text-red-600'}`, children: t(`task.status.${task.status}`, task.status) }), task.budget && /*#__PURE__*/ _jsxs("p", { className: "text-sm font-bold text-green-600 mt-1", children: [ formatPrice(task.budget), "€" ] }) ] }) ] }) }); } function OfferCard({ row }) { const offer = row.offer || row; const task = row.task; const reviewReceived = task?.status === 'completed' && offer.status === 'accepted' ? myReviews.find((r)=>r.review?.taskId === task?.id)?.review ?? null : null; return /*#__PURE__*/ _jsxs(Link, { href: task ? `/tasks/${task.id}` : '#', className: "block bg-white rounded-xl border border-gray-200 p-4 hover:shadow-sm hover:border-blue-300 transition", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex justify-between items-start", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex-1 min-w-0", children: [ /*#__PURE__*/ _jsx("p", { className: "font-medium text-gray-900 truncate", children: task?.title || t('chat.task_fallback') }), /*#__PURE__*/ _jsx("p", { className: "text-xs text-gray-400 mt-1", children: new Date(offer.createdAt).toLocaleDateString(dateLocale) }) ] }), /*#__PURE__*/ _jsxs("div", { className: "ml-3 text-right shrink-0", children: [ /*#__PURE__*/ _jsxs("p", { className: "font-bold text-green-600", children: [ formatPrice(offer.price), "€" ] }), /*#__PURE__*/ _jsx("span", { className: `text-xs px-2 py-0.5 rounded-full mt-1 inline-block ${offer.status === 'accepted' ? 'bg-green-100 text-green-700' : offer.status === 'declined' ? 'bg-red-100 text-red-700' : offer.status === 'other_accepted' ? 'bg-orange-100 text-orange-600' : 'bg-gray-100 text-gray-700'}`, children: t(`offer.status.${offer.status}`, offer.status) }) ] }) ] }), reviewReceived && /*#__PURE__*/ _jsxs("div", { className: "mt-3 pt-3 border-t border-gray-100 flex items-center gap-2", children: [ /*#__PURE__*/ _jsx("div", { className: "flex gap-0.5", children: [ 1, 2, 3, 4, 5 ].map((star)=>/*#__PURE__*/ _jsx("span", { className: `text-sm ${star <= reviewReceived.rating ? 'text-yellow-400' : 'text-gray-200'}`, children: "★" }, star)) }), /*#__PURE__*/ _jsxs("span", { className: "text-sm font-semibold text-gray-700", children: [ reviewReceived.rating, "/5" ] }), reviewReceived.comment && /*#__PURE__*/ _jsx("span", { className: "text-xs text-gray-500 truncate", children: reviewReceived.comment }) ] }), task?.status === 'completed' && offer.status === 'accepted' && !reviewReceived && /*#__PURE__*/ _jsx("p", { className: "mt-2 text-xs text-gray-400", children: t('dashboard.review_pending') }) ] }); } const isSpecialist = session?.user?.role === 'specialist'; return /*#__PURE__*/ _jsxs("div", { className: "max-w-5xl mx-auto px-4 py-8", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex justify-between items-center mb-8", children: [ /*#__PURE__*/ _jsx("h1", { className: "text-2xl font-bold text-white", children: t('dashboard.title') }), /*#__PURE__*/ _jsx(Link, { href: "/tasks/new", className: "bg-blue-600 text-white px-4 py-2 rounded-lg text-sm font-medium hover:bg-blue-700", children: t('dashboard.new_task') }) ] }), dashboard && /*#__PURE__*/ _jsx(PlanBlock, { dashboard: dashboard, t: t }), fomoData && (isSpecialist ? (fomoData.missedCount > 0 || fomoData.missedEarnings > 0) && /*#__PURE__*/ _jsxs("div", { className: "mb-6 bg-amber-50 border border-amber-200 rounded-xl px-5 py-4 flex items-start gap-3", children: [ /*#__PURE__*/ _jsx("div", { className: "shrink-0 mt-0.5", children: /*#__PURE__*/ _jsx("svg", { className: "w-5 h-5 text-amber-500", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 9v2m0 4h.01M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z" }) }) }), /*#__PURE__*/ _jsxs("div", { className: "flex-1 min-w-0", children: [ /*#__PURE__*/ _jsxs("p", { className: "text-base font-semibold text-amber-800", children: [ t('fomo.specialist_missed', 'Вы пропустили {n} заказов').replace('{n}', String(fomoData.missedCount ?? 0)), fomoData.missedEarnings > 0 && /*#__PURE__*/ _jsxs("span", { className: "ml-1 text-amber-600", children: [ "на €", fomoData.missedEarnings ] }) ] }), fomoData.topCategories?.length > 0 && /*#__PURE__*/ _jsxs("p", { className: "text-sm text-amber-600 mt-0.5", children: [ t('fomo.top_categories', 'Категории'), ": ", fomoData.topCategories.slice(0, 3).join(', ') ] }) ] }), /*#__PURE__*/ _jsx(Link, { href: "/pricing", className: "shrink-0 text-xs font-medium text-amber-700 bg-amber-100 px-3 py-1.5 rounded-lg hover:bg-amber-200 transition", children: t('dashboard.plan.upgrade') }) ] }) : fomoData.totalTasks > 0 && /*#__PURE__*/ _jsx("div", { className: "mb-6 bg-blue-50 border border-blue-200 rounded-xl px-5 py-4", children: /*#__PURE__*/ _jsxs("div", { className: "flex items-center justify-between gap-4 flex-wrap", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-3", children: [ /*#__PURE__*/ _jsx("div", { className: "shrink-0 bg-blue-100 rounded-xl p-2", children: /*#__PURE__*/ _jsx("svg", { className: "w-5 h-5 text-blue-600", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z" }) }) }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsxs("p", { className: "text-base font-semibold text-blue-800", children: [ fomoData.totalOffers, " ", t('fomo.offers_received', 'предложений получено') ] }), fomoData.avgOffersPerTask > 0 && /*#__PURE__*/ _jsx("p", { className: "text-sm text-blue-500", children: t('fomo.avg_offers', 'В среднем {n}/задача').replace('{n}', Number(fomoData.avgOffersPerTask).toFixed(1)) }) ] }) ] }), fomoData.completionRate !== undefined && /*#__PURE__*/ _jsxs("div", { className: "text-right", children: [ /*#__PURE__*/ _jsxs("p", { className: "text-2xl font-bold text-blue-700", children: [ Math.round(fomoData.completionRate * 100), "%" ] }), /*#__PURE__*/ _jsx("p", { className: "text-sm text-blue-400", children: t('fomo.completion_rate', 'завершено') }) ] }) ] }) })), isSpecialist && /*#__PURE__*/ _jsxs(Link, { href: "/tasks", className: "flex items-center justify-between gap-4 bg-blue-600 text-white rounded-xl px-5 py-4 mb-8 hover:bg-blue-700 transition", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-4", children: [ /*#__PURE__*/ _jsx("div", { className: "shrink-0 bg-white/20 rounded-xl p-2.5", children: /*#__PURE__*/ _jsxs("svg", { className: "w-6 h-6 text-white", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: [ /*#__PURE__*/ _jsx("circle", { cx: "11", cy: "11", r: "7" }), /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M21 21l-4.35-4.35" }) ] }) }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("p", { className: "font-semibold text-base", children: t('find_tasks.title') }), /*#__PURE__*/ _jsx("p", { className: "text-blue-100 text-sm mt-0.5", children: t('find_tasks.banner_hint') }) ] }) ] }), /*#__PURE__*/ _jsx("svg", { className: "w-5 h-5 shrink-0 text-white/70", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) }) ] }), /*#__PURE__*/ _jsxs("div", { className: "grid md:grid-cols-2 gap-8", children: [ /*#__PURE__*/ _jsxs("div", { className: "space-y-8", children: [ /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsxs("h2", { className: "text-lg font-semibold text-white mb-4", children: [ t('dashboard.my_tasks'), " ", /*#__PURE__*/ _jsxs("span", { className: "text-white/60 font-normal text-base", children: [ "(", activeTasks.length, ")" ] }) ] }), activeTasks.length === 0 ? /*#__PURE__*/ _jsxs("div", { className: "bg-white rounded-xl border border-gray-200 p-6 text-center text-gray-500", children: [ /*#__PURE__*/ _jsx("p", { children: t('dashboard.tasks.empty') }), /*#__PURE__*/ _jsx(Link, { href: "/tasks/new", className: "text-blue-600 hover:underline text-sm mt-2 inline-block", children: t('dashboard.tasks.empty.cta') }) ] }) : /*#__PURE__*/ _jsx("div", { className: "space-y-3", children: activeTasks.map((task)=>/*#__PURE__*/ _jsx(TaskCard, { task: task }, task.id)) }) ] }), completedTasks.length > 0 && /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsxs("h2", { className: "text-lg font-semibold text-white/70 mb-4", children: [ t('dashboard.completed_tasks'), " ", /*#__PURE__*/ _jsxs("span", { className: "font-normal text-base text-white/50", children: [ "(", completedTasks.length, ")" ] }) ] }), /*#__PURE__*/ _jsx("div", { className: "space-y-3 opacity-75", children: completedTasks.map((task)=>/*#__PURE__*/ _jsx(TaskCard, { task: task }, task.id)) }) ] }) ] }), /*#__PURE__*/ _jsx("div", { className: "space-y-8", children: isSpecialist ? /*#__PURE__*/ _jsxs(_Fragment, { children: [ invitations.length > 0 && /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsxs("h2", { className: "text-lg font-semibold text-white mb-4", children: [ t('dashboard.invitations'), " ", /*#__PURE__*/ _jsxs("span", { className: "text-white/60 font-normal text-base", children: [ "(", invitations.length, ")" ] }) ] }), /*#__PURE__*/ _jsx("div", { className: "space-y-3", children: invitations.map((inv)=>/*#__PURE__*/ _jsxs(Link, { href: inv.referenceId ? `/tasks/${inv.referenceId}` : '/tasks', className: `flex items-start gap-3 p-4 rounded-xl border transition cursor-pointer ${inv.isRead ? 'bg-white/90 border-white/20 hover:bg-white' : 'bg-white border-amber-300 shadow-sm hover:bg-amber-50'}`, children: [ /*#__PURE__*/ _jsx("span", { className: "text-2xl", children: "\uD83D\uDCCB" }), /*#__PURE__*/ _jsxs("div", { className: "flex-1 min-w-0", children: [ /*#__PURE__*/ _jsx("p", { className: `font-medium truncate ${inv.isRead ? 'text-gray-600' : 'text-gray-900'}`, children: t('notif.type.task_invite', inv.title) }), inv.body && /*#__PURE__*/ _jsx("p", { className: "text-sm text-gray-500 mt-0.5 truncate", children: (()=>{ const title = extractNotifParam(inv.body); const tpl = t('notif.body.task_invite', ''); return title && tpl ? tpl.replace('{title}', title) : inv.body; })() }), /*#__PURE__*/ _jsx("p", { className: "text-xs text-gray-400 mt-1", children: new Date(inv.createdAt).toLocaleDateString(dateLocale) }) ] }), /*#__PURE__*/ _jsxs("div", { className: "flex flex-col items-end gap-1.5 shrink-0", children: [ !inv.isRead && /*#__PURE__*/ _jsx("span", { className: "w-2 h-2 bg-amber-400 rounded-full mt-2" }), /*#__PURE__*/ _jsx("span", { className: "text-xs text-gray-400", children: "→" }) ] }) ] }, inv.id)) }) ] }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsxs("h2", { className: "text-lg font-semibold text-white mb-4", children: [ t('dashboard.my_offers'), " ", /*#__PURE__*/ _jsxs("span", { className: "text-white/60 font-normal text-base", children: [ "(", activeOffers.length, ")" ] }) ] }), activeOffers.length === 0 ? /*#__PURE__*/ _jsxs("div", { className: "bg-white rounded-xl border border-gray-200 p-6 text-center text-gray-500", children: [ /*#__PURE__*/ _jsx("p", { children: t('dashboard.offers.empty') }), /*#__PURE__*/ _jsx(Link, { href: "/tasks", className: "text-blue-600 hover:underline text-sm mt-2 inline-block", children: t('dashboard.offers.empty.cta') }) ] }) : /*#__PURE__*/ _jsx("div", { className: "space-y-3", children: activeOffers.map((row)=>/*#__PURE__*/ _jsx(OfferCard, { row: row }, (row.offer || row).id)) }) ] }), completedOffers.length > 0 && /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsxs("h2", { className: "text-lg font-semibold text-white/70 mb-4", children: [ t('dashboard.completed_offers'), " ", /*#__PURE__*/ _jsxs("span", { className: "font-normal text-base text-white/50", children: [ "(", completedOffers.length, ")" ] }) ] }), /*#__PURE__*/ _jsx("div", { className: "space-y-3 opacity-75", children: completedOffers.map((row)=>/*#__PURE__*/ _jsx(OfferCard, { row: row }, (row.offer || row).id)) }) ] }) ] }) : /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs(Link, { href: "/specialists", className: "flex items-center justify-between gap-4 bg-blue-600 text-white rounded-xl px-5 py-4 hover:bg-blue-700 transition", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-4", children: [ /*#__PURE__*/ _jsx("div", { className: "shrink-0 bg-white/20 rounded-xl p-2.5", children: /*#__PURE__*/ _jsx("svg", { className: "w-6 h-6 text-white", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0z" }) }) }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("p", { className: "font-semibold text-base", children: t('dashboard.customer.specialists_title') }), /*#__PURE__*/ _jsx("p", { className: "text-blue-100 text-sm mt-0.5", children: t('dashboard.customer.specialists_hint') }) ] }) ] }), /*#__PURE__*/ _jsx("svg", { className: "w-5 h-5 shrink-0 text-white/70", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) }) ] }), /*#__PURE__*/ _jsxs("div", { className: "bg-white rounded-xl border border-gray-200 p-5", children: [ /*#__PURE__*/ _jsx("h2", { className: "text-base font-semibold text-gray-800 mb-4", children: t('dashboard.customer.how_title') }), /*#__PURE__*/ _jsx("div", { className: "space-y-3", children: [ { num: '1', text: t('dashboard.customer.step1'), icon: 'M12 4v16m8-8H4' }, { num: '2', text: t('dashboard.customer.step2'), icon: 'M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z' }, { num: '3', text: t('dashboard.customer.step3'), icon: 'M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z' } ].map(({ num, text, icon })=>/*#__PURE__*/ _jsxs("div", { className: "flex items-start gap-3", children: [ /*#__PURE__*/ _jsx("span", { className: "shrink-0 w-7 h-7 rounded-full bg-blue-100 text-blue-600 text-sm font-bold flex items-center justify-center", children: num }), /*#__PURE__*/ _jsx("p", { className: "text-sm text-gray-600 pt-1", children: text }) ] }, num)) }), /*#__PURE__*/ _jsxs(Link, { href: "/tasks/new", className: "mt-4 inline-block text-sm font-medium text-blue-600 hover:underline", children: [ tasks.length > 0 ? t('dashboard.tasks.add_new') : t('dashboard.tasks.empty.cta'), " →" ] }) ] }) ] }) }) ] }) ] }); } `61  2oB  Cluaccca28cf815fd5aD  extractNotifParamPlanBlockDashboardPage yBdi`  d `=@ a=@ A `, A `, A  ` A 4 `( A5b `- Ac @ AN `: AO `3 A `5 AA aw@D@ ;; a=@    `, << `, next/link ` ;; `( << `- == @ @/lib/taskLocale `: @/components/PlanBadge `3 @/components/UsageMeter `5abAaf !)) c\]A %% cXYA{ !! c"'NOA  c * .JKA  c$1$5PlanBadgeA#4  c$6$?ABA  c'/'3=>A     c-"-&LinkA 4 c-'-+:;A #   c4$4)67A   c7"7',-AA E   c:*:../A $   c=*=/$%A  cF"F& !A  cH0H4"#A  cQbQgA#'  cT"T&A  cX"X&UsageMeterA%4  cX'X1  AMQ  c]"]&AR\4  c]']1A  cd;d?AEJ  cfPfUA  ci*i.A  cm*m.m aw@DAIS  cx)x3Ajs  cyyA  czz#A  c{{&A  c| |(A& || c}&}.AV^ xx c~*~2A tt c"*A pp @`&@`.A ll @`$@`,A7@ hh @`7@`@A3< dd @`7@`@getMySpecialistCardsA  @@`A [[ @`7@`@getMyTasksA  @` @`getMyOffersA   @` @`getMyReviewsA%1  @` @`getNotificationsAAQ  @` @`getMyDashboardAao || @` @`A >> @`7@`@getSpecialistFomoDashboardAr ss @` @`&getCustomerFomoDashboardA nn @` @`$Ag k  aa @`3@`7A$$ ]] @`@`!QRA$$4"" @`"@`&A%% VV @`$@`)A2&7& RR @`"@`'A&& NN @`*@`.taskTitleAK'T'  @`*@`3vwA'' EE @`*@`.xyA(( AA @`<@`AtuAz)) {== @`2@`7pqA++ w99 @`G@`LlmA .. s55 @`"@`'bcA.. o11 @`*@`.deA00 k-- @`9@`>formatPriceA81C1 f @`$@`/[\AM3R3 b$$ @`@`"AS3W34_ @`#@`'TUAE4J4 [ @ `@ `#PQA44 W @`&@`+FGA{55 S @`.@`2BCA66 O @`.@`2DEA77 K   @`&@`+@AAn8s8 G   @`.@`3A9)9 C @!`(@!`323A99 ? @%`.@%`245AA<F< ; @-`0@-`5*+A<< 7 @0`&@0`*&'AF>J> 3 @8`8@8`<()At?y? / @=`&@=`+A@@ + @D`@@D`DABB ' @J`p@J`tA*C/C # @R`@R`ACC  @U`@U`A+D/D  @X`"@X`&  ADD  @\`"@\`&ADD4 @\`'@\`+A8FARR  @`(@`-AgSlS  @`&@`+ATT  @`.@`2ATT  @`<@`@A4V8V  @`@@`DAfXkX  @`.@`3AXX  @`6@`;A[[  @`W@`[A] ]  @`O@`TA]]  @`.@`3A(_,_ {{ @`.@`2A`` ww @`*@`/klA``4<< @`0@`4Aaa pp @`"@`'A,b0b ll @`*@`.Abb hh @`8@`=A\d`d dd @`6@`:Anere `` @`6@`:Ag g \\ @`*@`/Atgxg XX @`2@`6Aphth TT @`2@`6Aii PP @`"@`&}~Ak k LL @`0@`4Al!l HH @`@`{|All DD @`"@`'wxA.m3m ~@@ @`*@`/stAmm z<< @`2@`7opAnn v88 @`:@`?klAPqUq r44 @%`M@%`RabALrPr n00 @(`:@(`>]^Ass j,, @+`:@+`> !As s4g @+`?@+`CVWAtt c%% @1`7@1`;RSAmuqu _!! @3`X@3`\TUAvv [ @9`G@9`LPQAww W @;`2@;`7LMAgxlx S @@`:@@`?BCAzz O @J`2@J`6>?Aj{n{ K   @L`[@L`_:;A|| G   @T`"@T`&<=A(}-} C @V`?@V`DFragment_FragmentA.}7}4= @V`E@V`N23A}} 9 @X`H@X`M./A ~%~ 5 @Z`6@Z`;*+A 1 @_`>@_`C !A - @i`6@i`:"#A ) @k`[@k``A4& @k`a@k`eA " @o`F@o`JA  @s`F@s`K A  @v`N@v`R  A  @z`Z@z`^Aŋ  @`N@`RAǍ  @`F@`KA   @`]@`aA  @`N@`RA  @`.@`3A  @`6@`;Aty  @`>@`CA   @`R@`WA   @`>@`BA  @`>@`BA4uu @`C@`GA  @`;@`?AX\  @`\@``A  @`L@`QA(-  @`6@`;A  @`>@`CA   @`6@`:Aɡ͡  @`_@`cA %  @`+@`0A&/4 @`1@`:A  @`.@`3z{A4KK @`4@`8Aڤߤ  @`6@`;A {{ @`>@`BAsw ww @`L@`PAVZ ss @`P@`TA oo @`>@`CA kk @`F@`JA gg @`F@`JA  cc @`6@`:A __ @`D@`HAch [[ @ `.@ `3A9= WW @`6@`:Aei SS @`6@`:A OO @%`W@%`\|}A} KK @(`F@(`JxyA  GG @,`F@,`Jz{Aսڽ CC @3`6@3`;78A۽߽4~ @3`<@3`@  /opt/canhelp/node_modules/react/jsx-runtime.js0/opt/canhelp/node_modules/react/package.json` Zf^][`exports[fReact is a JavaScript library for building user interfaces.19.2.4https://react.dev/https://github.com/facebook/react/issuese LICENSEREADME.mdindex.jscjs/compiler-runtime.jsjsx-runtime.jsjsx-runtime.react-server.jsjsx-dev-runtime.jsjsx-dev-runtime.react-server.jsreact.react-server.js../package.json./jsx-runtime./jsx-dev-runtime./compiler-runtime./react.react-server.js./index.js./jsx-runtime.react-server.js./jsx-runtime.js./jsx-dev-runtime.react-server.js./jsx-dev-runtime.js./compiler-runtime.jsurlgithttps://github.com/facebook/react.gitpackages/reactB>=0.10.0/opt/canhelp/node_modules/react@ yBHI react@19.2.4%o  /opt/canhelp/node_modules/react/index.js @ yB=> /opt/canhelp/node_modules/react.js/opt/canhelp/node_modules/react.json/opt/canhelp/node_modules/react.nodea@ yB/opt/canhelp/apps/web/src/lib/package.json/opt/canhelp/apps/web/src/lib/auth /opt/canhelp/node_modules/@/libW@ yB/opt/canhelp/apps/web/src/context/package.json/opt/canhelp/apps/web/src/context/locale /opt/canhelp/node_modules/@/contextM@ yB/opt/canhelp/apps/web/src/lib/api E q/opt/canhelp/node_modules/next/dist/api/navigation.js ./dist/api/navigation.js@ yB  /opt/canhelp/node_modules/next/dist/api`/opt/canhelp/apps/web/opt/canhelp/node_modules/next/navigation/opt/canhelp/apps/web/opt/canhelp/node_modules/next/navigation.js/opt/canhelp/apps/web/opt/canhelp/node_modules/next/navigation.mjs/opt/canhelp/apps/web/opt/canhelp/node_modules/next/navigation.tsx/opt/canhelp/apps/web/opt/canhelp/node_modules/next/navigation.ts/opt/canhelp/apps/web/opt/canhelp/node_modules/next/navigation.jsx/opt/canhelp/apps/web/opt/canhelp/node_modules/next/navigation.json/opt/canhelp/apps/web/opt/canhelp/node_modules/next/navigation.wasm/opt/canhelp/node_modules/next/navigation/opt/canhelp/node_modules/next/navigation.js/package.json/opt/canhelp/apps/web/opt/canhelp/node_modules/next/dist/api/package.json/opt/canhelp/apps/web/opt/canhelp/node_modules/next/dist/api/navigation/opt/canhelp/apps/web/opt/canhelp/node_modules/next/dist/api/navigation.js/opt/canhelp/apps/web/opt/canhelp/node_modules/next/dist/api/navigation.mjs/opt/canhelp/apps/web/opt/canhelp/node_modules/next/dist/api/navigation.tsx/opt/canhelp/apps/web/opt/canhelp/node_modules/next/dist/api/navigation.ts/opt/canhelp/apps/web/opt/canhelp/node_modules/next/dist/api/navigation.jsx/opt/canhelp/apps/web/opt/canhelp/node_modules/next/dist/api/navigation.json/opt/canhelp/apps/web/opt/canhelp/node_modules/next/dist/api/navigation.wasm/opt/canhelp/node_modules/next/dist/api/package.json/opt/canhelp/node_modules/next/dist/api/navigation$.7@ @ yB  @ @ yB @  yBW^nf@/opt/canhelp/apps/web/src/context/locale.json/opt/canhelp/apps/web/src/context/locale.node @/opt/canhelp/apps/web/src/context/locale.js@  yBHO/opt/canhelp/apps/web/src/lib/api.json/opt/canhelp/apps/web/src/lib/api.node ]@/opt/canhelp/apps/web/src/lib/api.jsR@  yB@  yB @ &/opt/canhelp/apps/web/src/context/locale.tsx 3wx./src/context/locale.tsx@  yBv/opt/canhelp/apps/web/src/contextMNO534!`fyBPfyBa87dc9e560a3dfb8 /opt/canhelp/apps/web/opt/canhelp/apps/web/src/context/package.json/opt/canhelp/apps/web/opt/canhelp/apps/web/src/context/locale/opt/canhelp/apps/web/opt/canhelp/apps/web/src/context/locale.js/opt/canhelp/apps/web/opt/canhelp/apps/web/src/context/locale.mjs/opt/canhelp/apps/web/opt/canhelp/apps/web/src/context/locale.tsx/opt/canhelp/apps/web/opt/canhelp/apps/web/src/context/locale.ts/opt/canhelp/apps/web/opt/canhelp/apps/web/src/context/locale.jsx/opt/canhelp/apps/web/opt/canhelp/apps/web/src/context/locale.json/opt/canhelp/apps/web/opt/canhelp/apps/web/src/context/locale.wasm/opt/canhelp/apps/web/src/context/locale.mjs@ yB @ @ yB!1)@/opt/canhelp/apps/web/src/lib/auth.json/opt/canhelp/apps/web/src/lib/auth.node @xy/opt/canhelp/apps/web/src/lib/auth.js@  yB /opt/canhelp/apps/web/src/lib/auth.ts JK./src/lib/auth.ts@ @ yB/opt/canhelp/apps/web/src/libYHZ !!`fyBPfyBeca3d166f7d8d806` /opt/canhelp/apps/web/opt/canhelp/apps/web/src/lib/package.json/opt/canhelp/apps/web/opt/canhelp/apps/web/src/lib/auth/opt/canhelp/apps/web/opt/canhelp/apps/web/src/lib/auth.js/opt/canhelp/apps/web/opt/canhelp/apps/web/src/lib/auth.mjs/opt/canhelp/apps/web/opt/canhelp/apps/web/src/lib/auth.tsx/opt/canhelp/apps/web/opt/canhelp/apps/web/src/lib/auth.ts/opt/canhelp/apps/web/opt/canhelp/apps/web/src/lib/auth.jsx/opt/canhelp/apps/web/opt/canhelp/apps/web/src/lib/auth.json/opt/canhelp/apps/web/opt/canhelp/apps/web/src/lib/auth.wasm/opt/canhelp/apps/web/src/lib/auth.mjs/opt/canhelp/apps/web/src/lib/auth.tsxk vnw/opt/canhelp/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.js f@./dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.js@ " yB|} /opt/canhelp/node_modules/next/dist/server/route-modules/app-page/vendored/ssr` /opt/canhelp/apps/web/opt/canhelp/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/package.json/opt/canhelp/apps/web/opt/canhelp/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime/opt/canhelp/apps/web/opt/canhelp/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.js/opt/canhelp/apps/web/opt/canhelp/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.mjs/opt/canhelp/apps/web/opt/canhelp/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.tsx/opt/canhelp/apps/web/opt/canhelp/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.ts/opt/canhelp/apps/web/opt/canhelp/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.jsx/opt/canhelp/apps/web/opt/canhelp/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.json/opt/canhelp/apps/web/opt/canhelp/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.wasm/opt/canhelp/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/package.json/opt/canhelp/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtimeT _W`/opt/canhelp/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js Oj)./dist/server/route-modules/app-page/vendored/ssr/react.js@ 1 yBklef ` /opt/canhelp/apps/web/opt/canhelp/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react/opt/canhelp/apps/web/opt/canhelp/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js/opt/canhelp/apps/web/opt/canhelp/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.mjs/opt/canhelp/apps/web/opt/canhelp/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.tsx/opt/canhelp/apps/web/opt/canhelp/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.ts/opt/canhelp/apps/web/opt/canhelp/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.jsx/opt/canhelp/apps/web/opt/canhelp/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.json/opt/canhelp/apps/web/opt/canhelp/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.wasm/opt/canhelp/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react@p|@  0J yB/.4@  J yB)(~.webpack/lib/ModuleGraphRestoreProvidedDataprovidedcanMangleProvideterminalBindingexportsInfo    sourcesruntimeRequirementsdatajavascriptwebpack/lib/util/registerExternalSerializerwebpack-sources/CachedSource 7webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource#__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ GlobalError: () => (/* reexport default from dynamic */ next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_25___default.a), /* harmony export */ __next_app__: () => (/* binding */ __next_app__), /* harmony export */ handler: () => (/* binding */ handler), /* harmony export */ pages: () => (/* binding */ pages), /* harmony export */ routeModule: () => (/* binding */ routeModule), /* harmony export */ tree: () => (/* binding */ tree) /* harmony export */ }); /* harmony import */ var next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73653); /* harmony import */ var next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(97714); /* harmony import */ var next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(85250); /* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(37587); /* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(22369); /* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1889); /* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var next_dist_server_app_render_interop_default__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(96232); /* harmony import */ var next_dist_server_app_render_strip_flight_headers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(22841); /* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(46537); /* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(46027); /* harmony import */ var next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(78559); /* harmony import */ var next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(75928); /* harmony import */ var next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(19374); /* harmony import */ var next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12__); /* harmony import */ var next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(65971); /* harmony import */ var next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_13__); /* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(261); /* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_14__); /* harmony import */ var next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(79898); /* harmony import */ var next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_15__); /* harmony import */ var next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(32967); /* harmony import */ var next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__); /* harmony import */ var next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(26713); /* harmony import */ var next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17__); /* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(40139); /* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__); /* harmony import */ var next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(14248); /* harmony import */ var next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__); /* harmony import */ var next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(59580); /* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(57749); /* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__); /* harmony import */ var next_dist_server_stream_utils_encoded_tags__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(53123); /* harmony import */ var next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(89745); /* harmony import */ var next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__); /* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(86439); /* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24__); /* harmony import */ var next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(58671); /* harmony import */ var next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_25__); /* harmony import */ var next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(18283); /* harmony import */ var next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__); /* harmony import */ var next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(39818); /* harmony import */ var next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_27__); /* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {}; /* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__) if(["default","tree","pages","GlobalError","__next_app__","routeModule","handler"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__[__WEBPACK_IMPORT_KEY__] /* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__); webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourceconst module0 = () => import(/* webpackMode: "eager" */ "/opt/canhelp/apps/web/src/app/layout.tsx"); const module1 = () => import(/* webpackMode: "eager" */ "next/dist/client/components/builtin/global-error.js"); const module2 = () => import(/* webpackMode: "eager" */ "/opt/canhelp/apps/web/src/app/not-found.tsx"); const module3 = () => import(/* webpackMode: "eager" */ "next/dist/client/components/builtin/forbidden.js"); const module4 = () => import(/* webpackMode: "eager" */ "next/dist/client/components/builtin/unauthorized.js"); const page5 = () => import(/* webpackMode: "eager" */ "/opt/canhelp/apps/web/src/app/specialist-setup/page.tsx"); import { AppPageRouteModule } from "next/dist/server/route-modules/app-page/module.compiled" with { 'turbopack-transition': 'next-ssr' }; import { RouteKind } from "next/dist/server/route-kind" with { 'turbopack-transition': 'next-server-utility' }; import { getRevalidateReason } from "next/dist/server/instrumentation/utils"; import { getTracer, SpanKind } from "next/dist/server/lib/trace/tracer"; import { getRequestMeta } from "next/dist/server/request-meta"; import { BaseServerSpan } from "next/dist/server/lib/trace/constants"; import { interopDefault } from "next/dist/server/app-render/interop-default"; import { stripFlightHeaders } from "next/dist/server/app-render/strip-flight-headers"; import { NodeNextRequest, NodeNextResponse } from "next/dist/server/base-http/node"; import { checkIsAppPPREnabled } from "next/dist/server/lib/experimental/ppr"; import { getFallbackRouteParams } from "next/dist/server/request/fallback-params"; import { setReferenceManifestsSingleton } from "next/dist/server/app-render/encryption-utils"; import { isHtmlBotRequest, shouldServeStreamingMetadata } from "next/dist/server/lib/streaming-metadata"; import { createServerModuleMap } from "next/dist/server/app-render/action-utils"; import { normalizeAppPath } from "next/dist/shared/lib/router/utils/app-paths"; import { getIsPossibleServerAction } from "next/dist/server/lib/server-action-request-meta"; import { RSC_HEADER, NEXT_ROUTER_PREFETCH_HEADER, NEXT_IS_PRERENDER_HEADER, NEXT_DID_POSTPONE_HEADER, RSC_CONTENT_TYPE_HEADER } from "next/dist/client/components/app-router-headers"; import { getBotType, isBot } from "next/dist/shared/lib/router/utils/is-bot"; import { CachedRouteKind } from "next/dist/server/response-cache"; import { FallbackMode, parseFallbackField } from "next/dist/lib/fallback"; import RenderResult from "next/dist/server/render-result"; import { CACHE_ONE_YEAR, HTML_CONTENT_TYPE_HEADER, NEXT_CACHE_TAGS_HEADER } from "next/dist/lib/constants"; import { ENCODED_TAGS } from "next/dist/server/stream-utils/encoded-tags"; import { sendRenderResult } from "next/dist/server/send-payload"; import { NoFallbackError } from "next/dist/shared/lib/no-fallback-error.external"; // We inject the tree and pages here so that we can use them in the route // module. const tree = { children: [ '', { children: [ 'specialist-setup', { children: ['__PAGE__', {}, { page: [page5, "/opt/canhelp/apps/web/src/app/specialist-setup/page.tsx"], }] }, { metadata: { icon: [(async (props) => (await import(/* webpackMode: "eager" */ "next-metadata-image-loader?type=icon&segment=&basePath=&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js!/opt/canhelp/apps/web/src/app/icon.svg?__next_metadata__")).default(props))], apple: [], openGraph: [], twitter: [], manifest: undefined } } ] }, { 'layout': [module0, "/opt/canhelp/apps/web/src/app/layout.tsx"], 'global-error': [module1, "next/dist/client/components/builtin/global-error.js"], 'not-found': [module2, "/opt/canhelp/apps/web/src/app/not-found.tsx"], 'forbidden': [module3, "next/dist/client/components/builtin/forbidden.js"], 'unauthorized': [module4, "next/dist/client/components/builtin/unauthorized.js"], metadata: { icon: [(async (props) => (await import(/* webpackMode: "eager" */ "next-metadata-image-loader?type=icon&segment=&basePath=&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js!/opt/canhelp/apps/web/src/app/icon.svg?__next_metadata__")).default(props))], apple: [], openGraph: [], twitter: [], manifest: undefined } } ] }.children; const pages = ["/opt/canhelp/apps/web/src/app/specialist-setup/page.tsx"]; export { tree, pages }; import GlobalError from "next/dist/client/components/builtin/global-error.js" with { 'turbopack-transition': 'next-server-utility' }; export { GlobalError }; const __next_app_require__ = __webpack_require__ const __next_app_load_chunk__ = () => Promise.resolve() export const __next_app__ = { require: __next_app_require__, loadChunk: __next_app_load_chunk__ }; import * as entryBase from "next/dist/server/app-render/entry-base" with { 'turbopack-transition': 'next-server-utility' }; import { RedirectStatusCode } from "next/dist/client/components/redirect-status-code"; export * from "next/dist/server/app-render/entry-base" with { 'turbopack-transition': 'next-server-utility' }; // Create and export the route module that will be consumed. export const routeModule = new AppPageRouteModule({ definition: { kind: RouteKind.APP_PAGE, page: "/specialist-setup/page", pathname: "/specialist-setup", // The following aren't used in production. bundlePath: '', filename: '', appPaths: [] }, userland: { loaderTree: tree }, distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '', relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '' }); export async function handler(req, res, ctx) { var _this; let srcPage = "/specialist-setup/page"; // turbopack doesn't normalize `/index` in the page name // so we need to to process dynamic routes properly // TODO: fix turbopack providing differing value from webpack if (process.env.TURBOPACK) { srcPage = srcPage.replace(/\/index$/, '') || '/'; } else if (srcPage === '/index') { // we always normalize /index specifically srcPage = '/'; } const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE; const initialPostponed = getRequestMeta(req, 'postponed'); // TODO: replace with more specific flags const minimalMode = getRequestMeta(req, 'minimalMode'); const prepareResult = await routeModule.prepare(req, res, { srcPage, multiZoneDraftMode }); if (!prepareResult) { res.statusCode = 400; res.end('Bad Request'); ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve()); return null; } const { buildId, query, params, parsedUrl, pageIsDynamic, buildManifest, nextFontManifest, reactLoadableManifest, serverActionsManifest, clientReferenceManifest, subresourceIntegrityManifest, prerenderManifest, isDraftMode, resolvedPathname, revalidateOnlyGenerated, routerServerContext, nextConfig, interceptionRoutePatterns } = prepareResult; const pathname = parsedUrl.pathname || '/'; const normalizedSrcPage = normalizeAppPath(srcPage); let { isOnDemandRevalidate } = prepareResult; const prerenderInfo = routeModule.match(pathname, prerenderManifest); const isPrerendered = !!prerenderManifest.routes[resolvedPathname]; let isSSG = Boolean(prerenderInfo || isPrerendered || prerenderManifest.routes[normalizedSrcPage]); const userAgent = req.headers['user-agent'] || ''; const botType = getBotType(userAgent); const isHtmlBot = isHtmlBotRequest(req); /** * If true, this indicates that the request being made is for an app * prefetch request. */ const isPrefetchRSCRequest = getRequestMeta(req, 'isPrefetchRSCRequest') ?? req.headers[NEXT_ROUTER_PREFETCH_HEADER] === '1' // exclude runtime prefetches, which use '2' ; // NOTE: Don't delete headers[RSC] yet, it still needs to be used in renderToHTML later const isRSCRequest = getRequestMeta(req, 'isRSCRequest') ?? Boolean(req.headers[RSC_HEADER]); const isPossibleServerAction = getIsPossibleServerAction(req); /** * If the route being rendered is an app page, and the ppr feature has been * enabled, then the given route _could_ support PPR. */ const couldSupportPPR = checkIsAppPPREnabled(nextConfig.experimental.ppr); // When enabled, this will allow the use of the `?__nextppronly` query to // enable debugging of the static shell. const hasDebugStaticShellQuery = process.env.__NEXT_EXPERIMENTAL_STATIC_SHELL_DEBUGGING === '1' && typeof query.__nextppronly !== 'undefined' && couldSupportPPR; // When enabled, this will allow the use of the `?__nextppronly` query // to enable debugging of the fallback shell. const hasDebugFallbackShellQuery = hasDebugStaticShellQuery && query.__nextppronly === 'fallback'; // This page supports PPR if it is marked as being `PARTIALLY_STATIC` in the // prerender manifest and this is an app page. const isRoutePPREnabled = couldSupportPPR && (((_this = prerenderManifest.routes[normalizedSrcPage] ?? prerenderManifest.dynamicRoutes[normalizedSrcPage]) == null ? void 0 : _this.renderingMode) === 'PARTIALLY_STATIC' || // Ideally we'd want to check the appConfig to see if this page has PPR // enabled or not, but that would require plumbing the appConfig through // to the server during development. We assume that the page supports it // but only during development. hasDebugStaticShellQuery && (routeModule.isDev === true || (routerServerContext == null ? void 0 : routerServerContext.experimentalTestProxy) === true)); const isDebugStaticShell = hasDebugStaticShellQuery && isRoutePPREnabled; // We should enable debugging dynamic accesses when the static shell // debugging has been enabled and we're also in development mode. const isDebugDynamicAccesses = isDebugStaticShell && routeModule.isDev === true; const isDebugFallbackShell = hasDebugFallbackShellQuery && isRoutePPREnabled; // If we're in minimal mode, then try to get the postponed information from // the request metadata. If available, use it for resuming the postponed // render. const minimalPostponed = isRoutePPREnabled ? initialPostponed : undefined; // If PPR is enabled, and this is a RSC request (but not a prefetch), then // we can use this fact to only generate the flight data for the request // because we can't cache the HTML (as it's also dynamic). const isDynamicRSCRequest = isRoutePPREnabled && isRSCRequest && !isPrefetchRSCRequest; // Need to read this before it's stripped by stripFlightHeaders. We don't // need to transfer it to the request meta because it's only read // within this function; the static segment data should have already been // generated, so we will always either return a static response or a 404. const segmentPrefetchHeader = getRequestMeta(req, 'segmentPrefetchRSCRequest'); // TODO: investigate existing bug with shouldServeStreamingMetadata always // being true for a revalidate due to modifying the base-server this.renderOpts // when fixing this to correct logic it causes hydration issue since we set // serveStreamingMetadata to true during export let serveStreamingMetadata = !userAgent ? true : shouldServeStreamingMetadata(userAgent, nextConfig.htmlLimitedBots); if (isHtmlBot && isRoutePPREnabled) { isSSG = false; serveStreamingMetadata = false; } // In development, we always want to generate dynamic HTML. let supportsDynamicResponse = // If we're in development, we always support dynamic HTML, unless it's // a data request, in which case we only produce static HTML. routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports // dynamic HTML. !isSSG || // If this request has provided postponed data, it supports dynamic // HTML. typeof initialPostponed === 'string' || // If this is a dynamic RSC request, then this render supports dynamic // HTML (it's dynamic). isDynamicRSCRequest; // When html bots request PPR page, perform the full dynamic rendering. const shouldWaitOnAllReady = isHtmlBot && isRoutePPREnabled; let ssgCacheKey = null; if (!isDraftMode && isSSG && !supportsDynamicResponse && !isPossibleServerAction && !minimalPostponed && !isDynamicRSCRequest) { ssgCacheKey = resolvedPathname; } // the staticPathKey differs from ssgCacheKey since // ssgCacheKey is null in dev since we're always in "dynamic" // mode in dev to bypass the cache, but we still need to honor // dynamicParams = false in dev mode let staticPathKey = ssgCacheKey; if (!staticPathKey && routeModule.isDev) { staticPathKey = resolvedPathname; } // If this is a request for an app path that should be statically generated // and we aren't in the edge runtime, strip the flight headers so it will // generate the static response. if (!routeModule.isDev && !isDraftMode && isSSG && isRSCRequest && !isDynamicRSCRequest) { stripFlightHeaders(req.headers); } const ComponentMod = { ...entryBase, tree, pages, GlobalError, handler, routeModule, __next_app__ }; // Before rendering (which initializes component tree modules), we have to // set the reference manifests to our global store so Server Action's // encryption util can access to them at the top level of the page module. if (serverActionsManifest && clientReferenceManifest) { setReferenceManifestsSingleton({ page: srcPage, clientReferenceManifest, serverActionsManifest, serverModuleMap: createServerModuleMap({ serverActionsManifest }) }); } const method = req.method || 'GET'; const tracer = getTracer(); const activeSpan = tracer.getActiveScopeSpan(); try { const varyHeader = routeModule.getVaryHeader(resolvedPathname, interceptionRoutePatterns); res.setHeader('Vary', varyHeader); const invokeRouteModule = async (span, context)=>{ const nextReq = new NodeNextRequest(req); const nextRes = new NodeNextResponse(res); // TODO: adapt for putting the RDC inside the postponed data // If we're in dev, and this isn't a prefetch or a server action, // we should seed the resume data cache. if (process.env.NODE_ENV === 'development') { if (nextConfig.experimental.cacheComponents && !isPrefetchRSCRequest && !context.renderOpts.isPossibleServerAction) { const warmup = await routeModule.warmup(nextReq, nextRes, context); // If the warmup is successful, we should use the resume data // cache from the warmup. if (warmup.metadata.renderResumeDataCache) { context.renderOpts.renderResumeDataCache = warmup.metadata.renderResumeDataCache; } } } return routeModule.render(nextReq, nextRes, context).finally(()=>{ if (!span) return; span.setAttributes({ 'http.status_code': res.statusCode, 'next.rsc': false }); const rootSpanAttributes = tracer.getRootSpanAttributes(); // We were unable to get attributes, probably OTEL is not enabled if (!rootSpanAttributes) { return; } if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) { console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`); return; } const route = rootSpanAttributes.get('next.route'); if (route) { const name = `${method} ${route}`; span.setAttributes({ 'next.route': route, 'http.route': route, 'next.span_name': name }); span.updateName(name); } else { span.updateName(`${method} ${req.url}`); } }); }; const doRender = async ({ span, postponed, fallbackRouteParams })=>{ const context = { query, params, page: normalizedSrcPage, sharedContext: { buildId }, serverComponentsHmrCache: getRequestMeta(req, 'serverComponentsHmrCache'), fallbackRouteParams, renderOpts: { App: ()=>null, Document: ()=>null, pageConfig: {}, ComponentMod, Component: interopDefault(ComponentMod), params, routeModule, page: srcPage, postponed, shouldWaitOnAllReady, serveStreamingMetadata, supportsDynamicResponse: typeof postponed === 'string' || supportsDynamicResponse, buildManifest, nextFontManifest, reactLoadableManifest, subresourceIntegrityManifest, serverActionsManifest, clientReferenceManifest, setIsrStatus: routerServerContext == null ? void 0 : routerServerContext.setIsrStatus, dir: process.env.NEXT_RUNTIME === 'nodejs' ? require('path').join(/* turbopackIgnore: true */ process.cwd(), routeModule.relativeProjectDir) : `${process.cwd()}/${routeModule.relativeProjectDir}`, isDraftMode, isRevalidate: isSSG && !postponed && !isDynamicRSCRequest, botType, isOnDemandRevalidate, isPossibleServerAction, assetPrefix: nextConfig.assetPrefix, nextConfigOutput: nextConfig.output, crossOrigin: nextConfig.crossOrigin, trailingSlash: nextConfig.trailingSlash, previewProps: prerenderManifest.preview, deploymentId: nextConfig.deploymentId, enableTainting: nextConfig.experimental.taint, htmlLimitedBots: nextConfig.htmlLimitedBots, devtoolSegmentExplorer: nextConfig.experimental.devtoolSegmentExplorer, reactMaxHeadersLength: nextConfig.reactMaxHeadersLength, multiZoneDraftMode, incrementalCache: getRequestMeta(req, 'incrementalCache'), cacheLifeProfiles: nextConfig.experimental.cacheLife, basePath: nextConfig.basePath, serverActions: nextConfig.experimental.serverActions, ...isDebugStaticShell || isDebugDynamicAccesses ? { nextExport: true, supportsDynamicResponse: false, isStaticGeneration: true, isRevalidate: true, isDebugDynamicAccesses: isDebugDynamicAccesses } : {}, experimental: { isRoutePPREnabled, expireTime: nextConfig.expireTime, staleTimes: nextConfig.experimental.staleTimes, cacheComponents: Boolean(nextConfig.experimental.cacheComponents), clientSegmentCache: Boolean(nextConfig.experimental.clientSegmentCache), clientParamParsing: Boolean(nextConfig.experimental.clientParamParsing), dynamicOnHover: Boolean(nextConfig.experimental.dynamicOnHover), inlineCss: Boolean(nextConfig.experimental.inlineCss), authInterrupts: Boolean(nextConfig.experimental.authInterrupts), clientTraceMetadata: nextConfig.experimental.clientTraceMetadata || [] }, waitUntil: ctx.waitUntil, onClose: (cb)=>{ res.on('close', cb); }, onAfterTaskError: ()=>{}, onInstrumentationRequestError: (error, _request, errorContext)=>routeModule.onRequestError(req, error, errorContext, routerServerContext), err: getRequestMeta(req, 'invokeError'), dev: routeModule.isDev } }; const result = await invokeRouteModule(span, context); const { metadata } = result; const { cacheControl, headers = {}, // Add any fetch tags that were on the page to the response headers. fetchTags: cacheTags } = metadata; if (cacheTags) { headers[NEXT_CACHE_TAGS_HEADER] = cacheTags; } // Pull any fetch metrics from the render onto the request. ; req.fetchMetrics = metadata.fetchMetrics; // we don't throw static to dynamic errors in dev as isSSG // is a best guess in dev since we don't have the prerender pass // to know whether the path is actually static or not if (isSSG && (cacheControl == null ? void 0 : cacheControl.revalidate) === 0 && !routeModule.isDev && !isRoutePPREnabled) { const staticBailoutInfo = metadata.staticBailoutInfo; const err = Object.defineProperty(new Error(`Page changed from static to dynamic at runtime ${resolvedPathname}${(staticBailoutInfo == null ? void 0 : staticBailoutInfo.description) ? `, reason: ${staticBailoutInfo.description}` : ``}` + `\nsee more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`), "__NEXT_ERROR_CODE", { value: "E132", enumerable: false, configurable: true }); if (staticBailoutInfo == null ? void 0 : staticBailoutInfo.stack) { const stack = staticBailoutInfo.stack; err.stack = err.message + stack.substring(stack.indexOf('\n')); } throw err; } return { value: { kind: CachedRouteKind.APP_PAGE, html: result, headers, rscData: metadata.flightData, postponed: metadata.postponed, status: metadata.statusCode, segmentData: metadata.segmentData }, cacheControl }; }; const responseGenerator = async ({ hasResolved, previousCacheEntry, isRevalidating, span })=>{ const isProduction = routeModule.isDev === false; const didRespond = hasResolved || res.writableEnded; // skip on-demand revalidate if cache is not present and // revalidate-if-generated is set if (isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry && !minimalMode) { if (routerServerContext == null ? void 0 : routerServerContext.render404) { await routerServerContext.render404(req, res); } else { res.statusCode = 404; res.end('This page could not be found'); } return null; } let fallbackMode; if (prerenderInfo) { fallbackMode = parseFallbackField(prerenderInfo.fallback); } // When serving a HTML bot request, we want to serve a blocking render and // not the prerendered page. This ensures that the correct content is served // to the bot in the head. if (fallbackMode === FallbackMode.PRERENDER && isBot(userAgent)) { if (!isRoutePPREnabled || isHtmlBot) { fallbackMode = FallbackMode.BLOCKING_STATIC_RENDER; } } if ((previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) === -1) { isOnDemandRevalidate = true; } // TODO: adapt for PPR // only allow on-demand revalidate for fallback: true/blocking // or for prerendered fallback: false paths if (isOnDemandRevalidate && (fallbackMode !== FallbackMode.NOT_FOUND || previousCacheEntry)) { fallbackMode = FallbackMode.BLOCKING_STATIC_RENDER; } if (!minimalMode && fallbackMode !== FallbackMode.BLOCKING_STATIC_RENDER && staticPathKey && !didRespond && !isDraftMode && pageIsDynamic && (isProduction || !isPrerendered)) { // if the page has dynamicParams: false and this pathname wasn't // prerendered trigger the no fallback handling if (// In development, fall through to render to handle missing // getStaticPaths. (isProduction || prerenderInfo) && // When fallback isn't present, abort this render so we 404 fallbackMode === FallbackMode.NOT_FOUND) { throw new NoFallbackError(); } let fallbackResponse; if (isRoutePPREnabled && !isRSCRequest) { const cacheKey = typeof (prerenderInfo == null ? void 0 : prerenderInfo.fallback) === 'string' ? prerenderInfo.fallback : isProduction ? normalizedSrcPage : null; // We use the response cache here to handle the revalidation and // management of the fallback shell. fallbackResponse = await routeModule.handleResponse({ cacheKey, req, nextConfig, routeKind: RouteKind.APP_PAGE, isFallback: true, prerenderManifest, isRoutePPREnabled, responseGenerator: async ()=>doRender({ span, // We pass `undefined` as rendering a fallback isn't resumed // here. postponed: undefined, fallbackRouteParams: // If we're in production or we're debugging the fallback // shell then we should postpone when dynamic params are // accessed. isProduction || isDebugFallbackShell ? getFallbackRouteParams(normalizedSrcPage) : null }), waitUntil: ctx.waitUntil }); // If the fallback response was set to null, then we should return null. if (fallbackResponse === null) return null; // Otherwise, if we did get a fallback response, we should return it. if (fallbackResponse) { // Remove the cache control from the response to prevent it from being // used in the surrounding cache. delete fallbackResponse.cacheControl; return fallbackResponse; } } } // Only requests that aren't revalidating can be resumed. If we have the // minimal postponed data, then we should resume the render with it. const postponed = !isOnDemandRevalidate && !isRevalidating && minimalPostponed ? minimalPostponed : undefined; // When we're in minimal mode, if we're trying to debug the static shell, // we should just return nothing instead of resuming the dynamic render. if ((isDebugStaticShell || isDebugDynamicAccesses) && typeof postponed !== 'undefined') { return { cacheControl: { revalidate: 1, expire: undefined }, value: { kind: CachedRouteKind.PAGES, html: RenderResult.EMPTY, pageData: {}, headers: undefined, status: undefined } }; } // If this is a dynamic route with PPR enabled and the default route // matches were set, then we should pass the fallback route params to // the renderer as this is a fallback revalidation request. const fallbackRouteParams = pageIsDynamic && isRoutePPREnabled && (getRequestMeta(req, 'renderFallbackShell') || isDebugFallbackShell) ? getFallbackRouteParams(pathname) : null; // Perform the render. return doRender({ span, postponed, fallbackRouteParams }); }; const handleResponse = async (span)=>{ var _cacheEntry_value, _cachedData_headers; const cacheEntry = await routeModule.handleResponse({ cacheKey: ssgCacheKey, responseGenerator: (c)=>responseGenerator({ span, ...c }), routeKind: RouteKind.APP_PAGE, isOnDemandRevalidate, isRoutePPREnabled, req, nextConfig, prerenderManifest, waitUntil: ctx.waitUntil }); if (isDraftMode) { res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate'); } // In dev, we should not cache pages for any reason. if (routeModule.isDev) { res.setHeader('Cache-Control', 'no-store, must-revalidate'); } if (!cacheEntry) { if (ssgCacheKey) { // A cache entry might not be generated if a response is written // in `getInitialProps` or `getServerSideProps`, but those shouldn't // have a cache key. If we do have a cache key but we don't end up // with a cache entry, then either Next.js or the application has a // bug that needs fixing. throw Object.defineProperty(new Error('invariant: cache entry required but not generated'), "__NEXT_ERROR_CODE", { value: "E62", enumerable: false, configurable: true }); } return null; } if (((_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_PAGE) { var _cacheEntry_value1; throw Object.defineProperty(new Error(`Invariant app-page handler received invalid cache entry ${(_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), "__NEXT_ERROR_CODE", { value: "E707", enumerable: false, configurable: true }); } const didPostpone = typeof cacheEntry.value.postponed === 'string'; if (isSSG && // We don't want to send a cache header for requests that contain dynamic // data. If this is a Dynamic RSC request or wasn't a Prefetch RSC // request, then we should set the cache header. !isDynamicRSCRequest && (!didPostpone || isPrefetchRSCRequest)) { if (!minimalMode) { // set x-nextjs-cache header to match the header // we set for the image-optimizer res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT'); } // Set a header used by the client router to signal the response is static // and should respect the `static` cache staleTime value. res.setHeader(NEXT_IS_PRERENDER_HEADER, '1'); } const { value: cachedData } = cacheEntry; // Coerce the cache control parameter from the render. let cacheControl; // If this is a resume request in minimal mode it is streamed with dynamic // content and should not be cached. if (minimalPostponed) { cacheControl = { revalidate: 0, expire: undefined }; } else if (minimalMode && isRSCRequest && !isPrefetchRSCRequest && isRoutePPREnabled) { cacheControl = { revalidate: 0, expire: undefined }; } else if (!routeModule.isDev) { // If this is a preview mode request, we shouldn't cache it if (isDraftMode) { cacheControl = { revalidate: 0, expire: undefined }; } else if (!isSSG) { if (!res.getHeader('Cache-Control')) { cacheControl = { revalidate: 0, expire: undefined }; } } else if (cacheEntry.cacheControl) { // If the cache entry has a cache control with a revalidate value that's // a number, use it. if (typeof cacheEntry.cacheControl.revalidate === 'number') { var _cacheEntry_cacheControl; if (cacheEntry.cacheControl.revalidate < 1) { throw Object.defineProperty(new Error(`Invalid revalidate configuration provided: ${cacheEntry.cacheControl.revalidate} < 1`), "__NEXT_ERROR_CODE", { value: "E22", enumerable: false, configurable: true }); } cacheControl = { revalidate: cacheEntry.cacheControl.revalidate, expire: ((_cacheEntry_cacheControl = cacheEntry.cacheControl) == null ? void 0 : _cacheEntry_cacheControl.expire) ?? nextConfig.expireTime }; } else { cacheControl = { revalidate: CACHE_ONE_YEAR, expire: undefined }; } } } cacheEntry.cacheControl = cacheControl; if (typeof segmentPrefetchHeader === 'string' && (cachedData == null ? void 0 : cachedData.kind) === CachedRouteKind.APP_PAGE && cachedData.segmentData) { var _cachedData_headers1; // This is a prefetch request issued by the client Segment Cache. These // should never reach the application layer (lambda). We should either // respond from the cache (HIT) or respond with 204 No Content (MISS). // Set a header to indicate that PPR is enabled for this route. This // lets the client distinguish between a regular cache miss and a cache // miss due to PPR being disabled. In other contexts this header is used // to indicate that the response contains dynamic data, but here we're // only using it to indicate that the feature is enabled — the segment // response itself contains whether the data is dynamic. res.setHeader(NEXT_DID_POSTPONE_HEADER, '2'); // Add the cache tags header to the response if it exists and we're in // minimal mode while rendering a static page. const tags = (_cachedData_headers1 = cachedData.headers) == null ? void 0 : _cachedData_headers1[NEXT_CACHE_TAGS_HEADER]; if (minimalMode && isSSG && tags && typeof tags === 'string') { res.setHeader(NEXT_CACHE_TAGS_HEADER, tags); } const matchedSegment = cachedData.segmentData.get(segmentPrefetchHeader); if (matchedSegment !== undefined) { // Cache hit return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: RenderResult.fromStatic(matchedSegment, RSC_CONTENT_TYPE_HEADER), cacheControl: cacheEntry.cacheControl }); } // Cache miss. Either a cache entry for this route has not been generated // (which technically should not be possible when PPR is enabled, because // at a minimum there should always be a fallback entry) or there's no // match for the requested segment. Respond with a 204 No Content. We // don't bother to respond with 404, because these requests are only // issued as part of a prefetch. res.statusCode = 204; return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: RenderResult.EMPTY, cacheControl: cacheEntry.cacheControl }); } // If there's a callback for `onCacheEntry`, call it with the cache entry // and the revalidate options. const onCacheEntry = getRequestMeta(req, 'onCacheEntry'); if (onCacheEntry) { const finished = await onCacheEntry({ ...cacheEntry, // TODO: remove this when upstream doesn't // always expect this value to be "PAGE" value: { ...cacheEntry.value, kind: 'PAGE' } }, { url: getRequestMeta(req, 'initURL') }); if (finished) { // TODO: maybe we have to end the request? return null; } } // If the request has a postponed state and it's a resume request we // should error. if (didPostpone && minimalPostponed) { throw Object.defineProperty(new Error('Invariant: postponed state should not be present on a resume request'), "__NEXT_ERROR_CODE", { value: "E396", enumerable: false, configurable: true }); } if (cachedData.headers) { const headers = { ...cachedData.headers }; if (!minimalMode || !isSSG) { delete headers[NEXT_CACHE_TAGS_HEADER]; } for (let [key, value] of Object.entries(headers)){ if (typeof value === 'undefined') continue; if (Array.isArray(value)) { for (const v of value){ res.appendHeader(key, v); } } else if (typeof value === 'number') { value = value.toString(); res.appendHeader(key, value); } else { res.appendHeader(key, value); } } } // Add the cache tags header to the response if it exists and we're in // minimal mode while rendering a static page. const tags = (_cachedData_headers = cachedData.headers) == null ? void 0 : _cachedData_headers[NEXT_CACHE_TAGS_HEADER]; if (minimalMode && isSSG && tags && typeof tags === 'string') { res.setHeader(NEXT_CACHE_TAGS_HEADER, tags); } // If the request is a data request, then we shouldn't set the status code // from the response because it should always be 200. This should be gated // behind the experimental PPR flag. if (cachedData.status && (!isRSCRequest || !isRoutePPREnabled)) { res.statusCode = cachedData.status; } // Redirect information is encoded in RSC payload, so we don't need to use redirect status codes if (!minimalMode && cachedData.status && RedirectStatusCode[cachedData.status] && isRSCRequest) { res.statusCode = 200; } // Mark that the request did postpone. if (didPostpone) { res.setHeader(NEXT_DID_POSTPONE_HEADER, '1'); } // we don't go through this block when preview mode is true // as preview mode is a dynamic request (bypasses cache) and doesn't // generate both HTML and payloads in the same request so continue to just // return the generated payload if (isRSCRequest && !isDraftMode) { // If this is a dynamic RSC request, then stream the response. if (typeof cachedData.rscData === 'undefined') { if (cachedData.postponed) { throw Object.defineProperty(new Error('Invariant: Expected postponed to be undefined'), "__NEXT_ERROR_CODE", { value: "E372", enumerable: false, configurable: true }); } return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: cachedData.html, // Dynamic RSC responses cannot be cached, even if they're // configured with `force-static` because we have no way of // distinguishing between `force-static` and pages that have no // postponed state. // TODO: distinguish `force-static` from pages with no postponed state (static) cacheControl: isDynamicRSCRequest ? { revalidate: 0, expire: undefined } : cacheEntry.cacheControl }); } // As this isn't a prefetch request, we should serve the static flight // data. return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: RenderResult.fromStatic(cachedData.rscData, RSC_CONTENT_TYPE_HEADER), cacheControl: cacheEntry.cacheControl }); } // This is a request for HTML data. let body = cachedData.html; // If there's no postponed state, we should just serve the HTML. This // should also be the case for a resume request because it's completed // as a server render (rather than a static render). if (!didPostpone || minimalMode || isRSCRequest) { // If we're in test mode, we should add a sentinel chunk to the response // that's between the static and dynamic parts so we can compare the // chunks and add assertions. if (process.env.__NEXT_TEST_MODE && minimalMode && isRoutePPREnabled && body.contentType === HTML_CONTENT_TYPE_HEADER) { // As we're in minimal mode, the static part would have already been // streamed first. The only part that this streams is the dynamic part // so we should FIRST stream the sentinel and THEN the dynamic part. body.unshift(createPPRBoundarySentinel()); } return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: body, cacheControl: cacheEntry.cacheControl }); } // If we're debugging the static shell or the dynamic API accesses, we // should just serve the HTML without resuming the render. The returned // HTML will be the static shell so all the Dynamic API's will be used // during static generation. if (isDebugStaticShell || isDebugDynamicAccesses) { // Since we're not resuming the render, we need to at least add the // closing body and html tags to create valid HTML. body.push(new ReadableStream({ start (controller) { controller.enqueue(ENCODED_TAGS.CLOSED.BODY_AND_HTML); controller.close(); } })); return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: body, cacheControl: { revalidate: 0, expire: undefined } }); } // If we're in test mode, we should add a sentinel chunk to the response // that's between the static and dynamic parts so we can compare the // chunks and add assertions. if (process.env.__NEXT_TEST_MODE) { body.push(createPPRBoundarySentinel()); } // This request has postponed, so let's create a new transformer that the // dynamic data can pipe to that will attach the dynamic data to the end // of the response. const transformer = new TransformStream(); body.push(transformer.readable); // Perform the render again, but this time, provide the postponed state. // We don't await because we want the result to start streaming now, and // we've already chained the transformer's readable to the render result. doRender({ span, postponed: cachedData.postponed, // This is a resume render, not a fallback render, so we don't need to // set this. fallbackRouteParams: null }).then(async (result)=>{ var _result_value; if (!result) { throw Object.defineProperty(new Error('Invariant: expected a result to be returned'), "__NEXT_ERROR_CODE", { value: "E463", enumerable: false, configurable: true }); } if (((_result_value = result.value) == null ? void 0 : _result_value.kind) !== CachedRouteKind.APP_PAGE) { var _result_value1; throw Object.defineProperty(new Error(`Invariant: expected a page response, got ${(_result_value1 = result.value) == null ? void 0 : _result_value1.kind}`), "__NEXT_ERROR_CODE", { value: "E305", enumerable: false, configurable: true }); } // Pipe the resume result to the transformer. await result.value.html.pipeTo(transformer.writable); }).catch((err)=>{ // An error occurred during piping or preparing the render, abort // the transformers writer so we can terminate the stream. transformer.writable.abort(err).catch((e)=>{ console.error("couldn't abort transformer", e); }); }); return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: body, // We don't want to cache the response if it has postponed data because // the response being sent to the client it's dynamic parts are streamed // to the client on the same request. cacheControl: { revalidate: 0, expire: undefined } }); }; // TODO: activeSpan code path is for when wrapped by // next-server can be removed when this is no longer used if (activeSpan) { await handleResponse(activeSpan); } else { return await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, { spanName: `${method} ${req.url}`, kind: SpanKind.SERVER, attributes: { 'http.method': method, 'http.target': req.url } }, handleResponse)); } } catch (err) { if (!(err instanceof NoFallbackError)) { await routeModule.onRequestError(req, err, { routerKind: 'App Router', routePath: srcPage, routeType: 'render', revalidateReason: getRevalidateReason({ isRevalidate: isSSG, isOnDemandRevalidate }) }, routerServerContext); } // rethrow so that we can handle serving error page throw err; } } // TODO: omit this from production builds, only test builds should include it /** * Creates a readable stream that emits a PPR boundary sentinel. * * @returns A readable stream that emits a PPR boundary sentinel. */ function createPPRBoundarySentinel() { return new ReadableStream({ start (controller) { controller.enqueue(new TextEncoder().encode('')); controller.close(); } }); } //# sourceMappingURL=app-page.js.map @bb{_:S.#%ceOQEG_`b   U W G I ' _@BXw.v 'JOPk_^kix(7  < T !!!F"K"Y"Q+^+,_,34@4H4{4z45666&7.7Z8h888999;,>9>xBBCCxFFFFG_5GJK4RARSSYY^^____C`N`b bPb[bbbdd eeggjjp_ppprr!s6suu}uD{R{Ta 0EАőђwV_ahu5B,AĠʣaptS^bүկ3L[ P*-s9H#**8 Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 47570))Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 58671, 23))Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 33506))Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 15034, 23))Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 54693, 23))Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 2069))Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 91946))__webpack_require__next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__.AppPageRouteModulenext_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind".next"0 falsefalse{}(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(0,next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_14__.normalizeAppPath)(0,next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17__.getBotType)(0,next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12__.isHtmlBotRequest)next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.NEXT_ROUTER_PREFETCH_HEADERnext_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.RSC_HEADER(0,next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_15__.getIsPossibleServerAction)(0,next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__.checkIsAppPPREnabled)0(0,next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12__.shouldServeStreamingMetadata)(0,next_dist_server_app_render_strip_flight_headers__WEBPACK_IMPORTED_MODULE_7__/* .stripFlightHeaders */ .d)next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__: (next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_25___default())(0,next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_11__.setReferenceManifestsSingleton)(0,next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_13__.createServerModuleMap)(0,next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__.getTracer)next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__.NodeNextRequestnext_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__.NodeNextResponsenext_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__.BaseServerSpan(0,next_dist_server_app_render_interop_default__WEBPACK_IMPORTED_MODULE_6__/* .interopDefault */ .T) true(__webpack_require__(33873).join)0next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADERnext_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKind(0,next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.parseFallbackField)next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackMode(0,next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17__.isBot)next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24__.NoFallbackError(0,next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_10__/* .getFallbackRouteParams */ .u)next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__["default"]next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.NEXT_IS_PRERENDER_HEADERnext_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.CACHE_ONE_YEARnext_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.NEXT_DID_POSTPONE_HEADER(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.RSC_CONTENT_TYPE_HEADERnext_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_27__.RedirectStatusCodenext_dist_server_stream_utils_encoded_tags__WEBPACK_IMPORTED_MODULE_22__.ENCODED_TAGSnext_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__.SpanKind(0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_2__/* .getRevalidateReason */ .c)sourcesizemaps__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ GlobalError: () => (/* reexport default from dynamic */ next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_25___default.a), /* harmony export */ __next_app__: () => (/* binding */ __next_app__), /* harmony export */ handler: () => (/* binding */ handler), /* harmony export */ pages: () => (/* binding */ pages), /* harmony export */ routeModule: () => (/* binding */ routeModule), /* harmony export */ tree: () => (/* binding */ tree) /* harmony export */ }); /* harmony import */ var next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73653); /* harmony import */ var next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(97714); /* harmony import */ var next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(85250); /* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(37587); /* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(22369); /* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1889); /* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var next_dist_server_app_render_interop_default__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(96232); /* harmony import */ var next_dist_server_app_render_strip_flight_headers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(22841); /* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(46537); /* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(46027); /* harmony import */ var next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(78559); /* harmony import */ var next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(75928); /* harmony import */ var next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(19374); /* harmony import */ var next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12__); /* harmony import */ var next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(65971); /* harmony import */ var next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_13__); /* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(261); /* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_14__); /* harmony import */ var next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(79898); /* harmony import */ var next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_15__); /* harmony import */ var next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(32967); /* harmony import */ var next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__); /* harmony import */ var next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(26713); /* harmony import */ var next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17__); /* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(40139); /* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__); /* harmony import */ var next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(14248); /* harmony import */ var next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__); /* harmony import */ var next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(59580); /* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(57749); /* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__); /* harmony import */ var next_dist_server_stream_utils_encoded_tags__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(53123); /* harmony import */ var next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(89745); /* harmony import */ var next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__); /* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(86439); /* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24__); /* harmony import */ var next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(58671); /* harmony import */ var next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_25__); /* harmony import */ var next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(18283); /* harmony import */ var next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__); /* harmony import */ var next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(39818); /* harmony import */ var next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_27__); /* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {}; /* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__) if(["default","tree","pages","GlobalError","__next_app__","routeModule","handler"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__[__WEBPACK_IMPORT_KEY__] /* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__); const module0 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 47570)); const module1 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 58671, 23)); const module2 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 33506)); const module3 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 15034, 23)); const module4 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 54693, 23)); const page5 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 2069)); // We inject the tree and pages here so that we can use them in the route // module. const tree = { children: [ '', { children: [ 'specialist-setup', { children: ['__PAGE__', {}, { page: [page5, "/opt/canhelp/apps/web/src/app/specialist-setup/page.tsx"], }] }, { metadata: { icon: [(async (props) => (await Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 91946))).default(props))], apple: [], openGraph: [], twitter: [], manifest: undefined } } ] }, { 'layout': [module0, "/opt/canhelp/apps/web/src/app/layout.tsx"], 'global-error': [module1, "next/dist/client/components/builtin/global-error.js"], 'not-found': [module2, "/opt/canhelp/apps/web/src/app/not-found.tsx"], 'forbidden': [module3, "next/dist/client/components/builtin/forbidden.js"], 'unauthorized': [module4, "next/dist/client/components/builtin/unauthorized.js"], metadata: { icon: [(async (props) => (await Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 91946))).default(props))], apple: [], openGraph: [], twitter: [], manifest: undefined } } ] }.children; const pages = ["/opt/canhelp/apps/web/src/app/specialist-setup/page.tsx"]; const __next_app_require__ = __webpack_require__ const __next_app_load_chunk__ = () => Promise.resolve() const __next_app__ = { require: __next_app_require__, loadChunk: __next_app_load_chunk__ }; // Create and export the route module that will be consumed. const routeModule = new next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__.AppPageRouteModule({ definition: { kind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_PAGE, page: "/specialist-setup/page", pathname: "/specialist-setup", // The following aren't used in production. bundlePath: '', filename: '', appPaths: [] }, userland: { loaderTree: tree }, distDir: ".next" || 0, relativeProjectDir: false || '' }); async function handler(req, res, ctx) { var _this; let srcPage = "/specialist-setup/page"; // turbopack doesn't normalize `/index` in the page name // so we need to to process dynamic routes properly // TODO: fix turbopack providing differing value from webpack if (false) {} else if (srcPage === '/index') { // we always normalize /index specifically srcPage = '/'; } const multiZoneDraftMode = false; const initialPostponed = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'postponed'); // TODO: replace with more specific flags const minimalMode = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'minimalMode'); const prepareResult = await routeModule.prepare(req, res, { srcPage, multiZoneDraftMode }); if (!prepareResult) { res.statusCode = 400; res.end('Bad Request'); ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve()); return null; } const { buildId, query, params, parsedUrl, pageIsDynamic, buildManifest, nextFontManifest, reactLoadableManifest, serverActionsManifest, clientReferenceManifest, subresourceIntegrityManifest, prerenderManifest, isDraftMode, resolvedPathname, revalidateOnlyGenerated, routerServerContext, nextConfig, interceptionRoutePatterns } = prepareResult; const pathname = parsedUrl.pathname || '/'; const normalizedSrcPage = (0,next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_14__.normalizeAppPath)(srcPage); let { isOnDemandRevalidate } = prepareResult; const prerenderInfo = routeModule.match(pathname, prerenderManifest); const isPrerendered = !!prerenderManifest.routes[resolvedPathname]; let isSSG = Boolean(prerenderInfo || isPrerendered || prerenderManifest.routes[normalizedSrcPage]); const userAgent = req.headers['user-agent'] || ''; const botType = (0,next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17__.getBotType)(userAgent); const isHtmlBot = (0,next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12__.isHtmlBotRequest)(req); /** * If true, this indicates that the request being made is for an app * prefetch request. */ const isPrefetchRSCRequest = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'isPrefetchRSCRequest') ?? req.headers[next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.NEXT_ROUTER_PREFETCH_HEADER] === '1' // exclude runtime prefetches, which use '2' ; // NOTE: Don't delete headers[RSC] yet, it still needs to be used in renderToHTML later const isRSCRequest = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'isRSCRequest') ?? Boolean(req.headers[next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.RSC_HEADER]); const isPossibleServerAction = (0,next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_15__.getIsPossibleServerAction)(req); /** * If the route being rendered is an app page, and the ppr feature has been * enabled, then the given route _could_ support PPR. */ const couldSupportPPR = (0,next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__.checkIsAppPPREnabled)(nextConfig.experimental.ppr); // When enabled, this will allow the use of the `?__nextppronly` query to // enable debugging of the static shell. const hasDebugStaticShellQuery = false && 0; // When enabled, this will allow the use of the `?__nextppronly` query // to enable debugging of the fallback shell. const hasDebugFallbackShellQuery = hasDebugStaticShellQuery && query.__nextppronly === 'fallback'; // This page supports PPR if it is marked as being `PARTIALLY_STATIC` in the // prerender manifest and this is an app page. const isRoutePPREnabled = couldSupportPPR && (((_this = prerenderManifest.routes[normalizedSrcPage] ?? prerenderManifest.dynamicRoutes[normalizedSrcPage]) == null ? void 0 : _this.renderingMode) === 'PARTIALLY_STATIC' || // Ideally we'd want to check the appConfig to see if this page has PPR // enabled or not, but that would require plumbing the appConfig through // to the server during development. We assume that the page supports it // but only during development. hasDebugStaticShellQuery && (routeModule.isDev === true || (routerServerContext == null ? void 0 : routerServerContext.experimentalTestProxy) === true)); const isDebugStaticShell = hasDebugStaticShellQuery && isRoutePPREnabled; // We should enable debugging dynamic accesses when the static shell // debugging has been enabled and we're also in development mode. const isDebugDynamicAccesses = isDebugStaticShell && routeModule.isDev === true; const isDebugFallbackShell = hasDebugFallbackShellQuery && isRoutePPREnabled; // If we're in minimal mode, then try to get the postponed information from // the request metadata. If available, use it for resuming the postponed // render. const minimalPostponed = isRoutePPREnabled ? initialPostponed : undefined; // If PPR is enabled, and this is a RSC request (but not a prefetch), then // we can use this fact to only generate the flight data for the request // because we can't cache the HTML (as it's also dynamic). const isDynamicRSCRequest = isRoutePPREnabled && isRSCRequest && !isPrefetchRSCRequest; // Need to read this before it's stripped by stripFlightHeaders. We don't // need to transfer it to the request meta because it's only read // within this function; the static segment data should have already been // generated, so we will always either return a static response or a 404. const segmentPrefetchHeader = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'segmentPrefetchRSCRequest'); // TODO: investigate existing bug with shouldServeStreamingMetadata always // being true for a revalidate due to modifying the base-server this.renderOpts // when fixing this to correct logic it causes hydration issue since we set // serveStreamingMetadata to true during export let serveStreamingMetadata = !userAgent ? true : (0,next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12__.shouldServeStreamingMetadata)(userAgent, nextConfig.htmlLimitedBots); if (isHtmlBot && isRoutePPREnabled) { isSSG = false; serveStreamingMetadata = false; } // In development, we always want to generate dynamic HTML. let supportsDynamicResponse = // If we're in development, we always support dynamic HTML, unless it's // a data request, in which case we only produce static HTML. routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports // dynamic HTML. !isSSG || // If this request has provided postponed data, it supports dynamic // HTML. typeof initialPostponed === 'string' || // If this is a dynamic RSC request, then this render supports dynamic // HTML (it's dynamic). isDynamicRSCRequest; // When html bots request PPR page, perform the full dynamic rendering. const shouldWaitOnAllReady = isHtmlBot && isRoutePPREnabled; let ssgCacheKey = null; if (!isDraftMode && isSSG && !supportsDynamicResponse && !isPossibleServerAction && !minimalPostponed && !isDynamicRSCRequest) { ssgCacheKey = resolvedPathname; } // the staticPathKey differs from ssgCacheKey since // ssgCacheKey is null in dev since we're always in "dynamic" // mode in dev to bypass the cache, but we still need to honor // dynamicParams = false in dev mode let staticPathKey = ssgCacheKey; if (!staticPathKey && routeModule.isDev) { staticPathKey = resolvedPathname; } // If this is a request for an app path that should be statically generated // and we aren't in the edge runtime, strip the flight headers so it will // generate the static response. if (!routeModule.isDev && !isDraftMode && isSSG && isRSCRequest && !isDynamicRSCRequest) { (0,next_dist_server_app_render_strip_flight_headers__WEBPACK_IMPORTED_MODULE_7__/* .stripFlightHeaders */ .d)(req.headers); } const ComponentMod = { ...next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__, tree, pages, GlobalError: (next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_25___default()), handler, routeModule, __next_app__ }; // Before rendering (which initializes component tree modules), we have to // set the reference manifests to our global store so Server Action's // encryption util can access to them at the top level of the page module. if (serverActionsManifest && clientReferenceManifest) { (0,next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_11__.setReferenceManifestsSingleton)({ page: srcPage, clientReferenceManifest, serverActionsManifest, serverModuleMap: (0,next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_13__.createServerModuleMap)({ serverActionsManifest }) }); } const method = req.method || 'GET'; const tracer = (0,next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__.getTracer)(); const activeSpan = tracer.getActiveScopeSpan(); try { const varyHeader = routeModule.getVaryHeader(resolvedPathname, interceptionRoutePatterns); res.setHeader('Vary', varyHeader); const invokeRouteModule = async (span, context)=>{ const nextReq = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__.NodeNextRequest(req); const nextRes = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__.NodeNextResponse(res); // TODO: adapt for putting the RDC inside the postponed data // If we're in dev, and this isn't a prefetch or a server action, // we should seed the resume data cache. if (false) {} return routeModule.render(nextReq, nextRes, context).finally(()=>{ if (!span) return; span.setAttributes({ 'http.status_code': res.statusCode, 'next.rsc': false }); const rootSpanAttributes = tracer.getRootSpanAttributes(); // We were unable to get attributes, probably OTEL is not enabled if (!rootSpanAttributes) { return; } if (rootSpanAttributes.get('next.span_type') !== next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__.BaseServerSpan.handleRequest) { console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`); return; } const route = rootSpanAttributes.get('next.route'); if (route) { const name = `${method} ${route}`; span.setAttributes({ 'next.route': route, 'http.route': route, 'next.span_name': name }); span.updateName(name); } else { span.updateName(`${method} ${req.url}`); } }); }; const doRender = async ({ span, postponed, fallbackRouteParams })=>{ const context = { query, params, page: normalizedSrcPage, sharedContext: { buildId }, serverComponentsHmrCache: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'serverComponentsHmrCache'), fallbackRouteParams, renderOpts: { App: ()=>null, Document: ()=>null, pageConfig: {}, ComponentMod, Component: (0,next_dist_server_app_render_interop_default__WEBPACK_IMPORTED_MODULE_6__/* .interopDefault */ .T)(ComponentMod), params, routeModule, page: srcPage, postponed, shouldWaitOnAllReady, serveStreamingMetadata, supportsDynamicResponse: typeof postponed === 'string' || supportsDynamicResponse, buildManifest, nextFontManifest, reactLoadableManifest, subresourceIntegrityManifest, serverActionsManifest, clientReferenceManifest, setIsrStatus: routerServerContext == null ? void 0 : routerServerContext.setIsrStatus, dir: true ? (__webpack_require__(33873).join)(/* turbopackIgnore: true */ process.cwd(), routeModule.relativeProjectDir) : 0, isDraftMode, isRevalidate: isSSG && !postponed && !isDynamicRSCRequest, botType, isOnDemandRevalidate, isPossibleServerAction, assetPrefix: nextConfig.assetPrefix, nextConfigOutput: nextConfig.output, crossOrigin: nextConfig.crossOrigin, trailingSlash: nextConfig.trailingSlash, previewProps: prerenderManifest.preview, deploymentId: nextConfig.deploymentId, enableTainting: nextConfig.experimental.taint, htmlLimitedBots: nextConfig.htmlLimitedBots, devtoolSegmentExplorer: nextConfig.experimental.devtoolSegmentExplorer, reactMaxHeadersLength: nextConfig.reactMaxHeadersLength, multiZoneDraftMode, incrementalCache: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'incrementalCache'), cacheLifeProfiles: nextConfig.experimental.cacheLife, basePath: nextConfig.basePath, serverActions: nextConfig.experimental.serverActions, ...isDebugStaticShell || isDebugDynamicAccesses ? { nextExport: true, supportsDynamicResponse: false, isStaticGeneration: true, isRevalidate: true, isDebugDynamicAccesses: isDebugDynamicAccesses } : {}, experimental: { isRoutePPREnabled, expireTime: nextConfig.expireTime, staleTimes: nextConfig.experimental.staleTimes, cacheComponents: Boolean(nextConfig.experimental.cacheComponents), clientSegmentCache: Boolean(nextConfig.experimental.clientSegmentCache), clientParamParsing: Boolean(nextConfig.experimental.clientParamParsing), dynamicOnHover: Boolean(nextConfig.experimental.dynamicOnHover), inlineCss: Boolean(nextConfig.experimental.inlineCss), authInterrupts: Boolean(nextConfig.experimental.authInterrupts), clientTraceMetadata: nextConfig.experimental.clientTraceMetadata || [] }, waitUntil: ctx.waitUntil, onClose: (cb)=>{ res.on('close', cb); }, onAfterTaskError: ()=>{}, onInstrumentationRequestError: (error, _request, errorContext)=>routeModule.onRequestError(req, error, errorContext, routerServerContext), err: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'invokeError'), dev: routeModule.isDev } }; const result = await invokeRouteModule(span, context); const { metadata } = result; const { cacheControl, headers = {}, // Add any fetch tags that were on the page to the response headers. fetchTags: cacheTags } = metadata; if (cacheTags) { headers[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADER] = cacheTags; } // Pull any fetch metrics from the render onto the request. ; req.fetchMetrics = metadata.fetchMetrics; // we don't throw static to dynamic errors in dev as isSSG // is a best guess in dev since we don't have the prerender pass // to know whether the path is actually static or not if (isSSG && (cacheControl == null ? void 0 : cacheControl.revalidate) === 0 && !routeModule.isDev && !isRoutePPREnabled) { const staticBailoutInfo = metadata.staticBailoutInfo; const err = Object.defineProperty(new Error(`Page changed from static to dynamic at runtime ${resolvedPathname}${(staticBailoutInfo == null ? void 0 : staticBailoutInfo.description) ? `, reason: ${staticBailoutInfo.description}` : ``}` + `\nsee more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`), "__NEXT_ERROR_CODE", { value: "E132", enumerable: false, configurable: true }); if (staticBailoutInfo == null ? void 0 : staticBailoutInfo.stack) { const stack = staticBailoutInfo.stack; err.stack = err.message + stack.substring(stack.indexOf('\n')); } throw err; } return { value: { kind: next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKind.APP_PAGE, html: result, headers, rscData: metadata.flightData, postponed: metadata.postponed, status: metadata.statusCode, segmentData: metadata.segmentData }, cacheControl }; }; const responseGenerator = async ({ hasResolved, previousCacheEntry, isRevalidating, span })=>{ const isProduction = routeModule.isDev === false; const didRespond = hasResolved || res.writableEnded; // skip on-demand revalidate if cache is not present and // revalidate-if-generated is set if (isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry && !minimalMode) { if (routerServerContext == null ? void 0 : routerServerContext.render404) { await routerServerContext.render404(req, res); } else { res.statusCode = 404; res.end('This page could not be found'); } return null; } let fallbackMode; if (prerenderInfo) { fallbackMode = (0,next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.parseFallbackField)(prerenderInfo.fallback); } // When serving a HTML bot request, we want to serve a blocking render and // not the prerendered page. This ensures that the correct content is served // to the bot in the head. if (fallbackMode === next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackMode.PRERENDER && (0,next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17__.isBot)(userAgent)) { if (!isRoutePPREnabled || isHtmlBot) { fallbackMode = next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackMode.BLOCKING_STATIC_RENDER; } } if ((previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) === -1) { isOnDemandRevalidate = true; } // TODO: adapt for PPR // only allow on-demand revalidate for fallback: true/blocking // or for prerendered fallback: false paths if (isOnDemandRevalidate && (fallbackMode !== next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackMode.NOT_FOUND || previousCacheEntry)) { fallbackMode = next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackMode.BLOCKING_STATIC_RENDER; } if (!minimalMode && fallbackMode !== next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackMode.BLOCKING_STATIC_RENDER && staticPathKey && !didRespond && !isDraftMode && pageIsDynamic && (isProduction || !isPrerendered)) { // if the page has dynamicParams: false and this pathname wasn't // prerendered trigger the no fallback handling if (// In development, fall through to render to handle missing // getStaticPaths. (isProduction || prerenderInfo) && // When fallback isn't present, abort this render so we 404 fallbackMode === next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackMode.NOT_FOUND) { throw new next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24__.NoFallbackError(); } let fallbackResponse; if (isRoutePPREnabled && !isRSCRequest) { const cacheKey = typeof (prerenderInfo == null ? void 0 : prerenderInfo.fallback) === 'string' ? prerenderInfo.fallback : isProduction ? normalizedSrcPage : null; // We use the response cache here to handle the revalidation and // management of the fallback shell. fallbackResponse = await routeModule.handleResponse({ cacheKey, req, nextConfig, routeKind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_PAGE, isFallback: true, prerenderManifest, isRoutePPREnabled, responseGenerator: async ()=>doRender({ span, // We pass `undefined` as rendering a fallback isn't resumed // here. postponed: undefined, fallbackRouteParams: // If we're in production or we're debugging the fallback // shell then we should postpone when dynamic params are // accessed. isProduction || isDebugFallbackShell ? (0,next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_10__/* .getFallbackRouteParams */ .u)(normalizedSrcPage) : null }), waitUntil: ctx.waitUntil }); // If the fallback response was set to null, then we should return null. if (fallbackResponse === null) return null; // Otherwise, if we did get a fallback response, we should return it. if (fallbackResponse) { // Remove the cache control from the response to prevent it from being // used in the surrounding cache. delete fallbackResponse.cacheControl; return fallbackResponse; } } } // Only requests that aren't revalidating can be resumed. If we have the // minimal postponed data, then we should resume the render with it. const postponed = !isOnDemandRevalidate && !isRevalidating && minimalPostponed ? minimalPostponed : undefined; // When we're in minimal mode, if we're trying to debug the static shell, // we should just return nothing instead of resuming the dynamic render. if ((isDebugStaticShell || isDebugDynamicAccesses) && typeof postponed !== 'undefined') { return { cacheControl: { revalidate: 1, expire: undefined }, value: { kind: next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKind.PAGES, html: next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__["default"].EMPTY, pageData: {}, headers: undefined, status: undefined } }; } // If this is a dynamic route with PPR enabled and the default route // matches were set, then we should pass the fallback route params to // the renderer as this is a fallback revalidation request. const fallbackRouteParams = pageIsDynamic && isRoutePPREnabled && ((0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'renderFallbackShell') || isDebugFallbackShell) ? (0,next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_10__/* .getFallbackRouteParams */ .u)(pathname) : null; // Perform the render. return doRender({ span, postponed, fallbackRouteParams }); }; const handleResponse = async (span)=>{ var _cacheEntry_value, _cachedData_headers; const cacheEntry = await routeModule.handleResponse({ cacheKey: ssgCacheKey, responseGenerator: (c)=>responseGenerator({ span, ...c }), routeKind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_PAGE, isOnDemandRevalidate, isRoutePPREnabled, req, nextConfig, prerenderManifest, waitUntil: ctx.waitUntil }); if (isDraftMode) { res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate'); } // In dev, we should not cache pages for any reason. if (routeModule.isDev) { res.setHeader('Cache-Control', 'no-store, must-revalidate'); } if (!cacheEntry) { if (ssgCacheKey) { // A cache entry might not be generated if a response is written // in `getInitialProps` or `getServerSideProps`, but those shouldn't // have a cache key. If we do have a cache key but we don't end up // with a cache entry, then either Next.js or the application has a // bug that needs fixing. throw Object.defineProperty(new Error('invariant: cache entry required but not generated'), "__NEXT_ERROR_CODE", { value: "E62", enumerable: false, configurable: true }); } return null; } if (((_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKind.APP_PAGE) { var _cacheEntry_value1; throw Object.defineProperty(new Error(`Invariant app-page handler received invalid cache entry ${(_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), "__NEXT_ERROR_CODE", { value: "E707", enumerable: false, configurable: true }); } const didPostpone = typeof cacheEntry.value.postponed === 'string'; if (isSSG && // We don't want to send a cache header for requests that contain dynamic // data. If this is a Dynamic RSC request or wasn't a Prefetch RSC // request, then we should set the cache header. !isDynamicRSCRequest && (!didPostpone || isPrefetchRSCRequest)) { if (!minimalMode) { // set x-nextjs-cache header to match the header // we set for the image-optimizer res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT'); } // Set a header used by the client router to signal the response is static // and should respect the `static` cache staleTime value. res.setHeader(next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.NEXT_IS_PRERENDER_HEADER, '1'); } const { value: cachedData } = cacheEntry; // Coerce the cache control parameter from the render. let cacheControl; // If this is a resume request in minimal mode it is streamed with dynamic // content and should not be cached. if (minimalPostponed) { cacheControl = { revalidate: 0, expire: undefined }; } else if (minimalMode && isRSCRequest && !isPrefetchRSCRequest && isRoutePPREnabled) { cacheControl = { revalidate: 0, expire: undefined }; } else if (!routeModule.isDev) { // If this is a preview mode request, we shouldn't cache it if (isDraftMode) { cacheControl = { revalidate: 0, expire: undefined }; } else if (!isSSG) { if (!res.getHeader('Cache-Control')) { cacheControl = { revalidate: 0, expire: undefined }; } } else if (cacheEntry.cacheControl) { // If the cache entry has a cache control with a revalidate value that's // a number, use it. if (typeof cacheEntry.cacheControl.revalidate === 'number') { var _cacheEntry_cacheControl; if (cacheEntry.cacheControl.revalidate < 1) { throw Object.defineProperty(new Error(`Invalid revalidate configuration provided: ${cacheEntry.cacheControl.revalidate} < 1`), "__NEXT_ERROR_CODE", { value: "E22", enumerable: false, configurable: true }); } cacheControl = { revalidate: cacheEntry.cacheControl.revalidate, expire: ((_cacheEntry_cacheControl = cacheEntry.cacheControl) == null ? void 0 : _cacheEntry_cacheControl.expire) ?? nextConfig.expireTime }; } else { cacheControl = { revalidate: next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.CACHE_ONE_YEAR, expire: undefined }; } } } cacheEntry.cacheControl = cacheControl; if (typeof segmentPrefetchHeader === 'string' && (cachedData == null ? void 0 : cachedData.kind) === next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKind.APP_PAGE && cachedData.segmentData) { var _cachedData_headers1; // This is a prefetch request issued by the client Segment Cache. These // should never reach the application layer (lambda). We should either // respond from the cache (HIT) or respond with 204 No Content (MISS). // Set a header to indicate that PPR is enabled for this route. This // lets the client distinguish between a regular cache miss and a cache // miss due to PPR being disabled. In other contexts this header is used // to indicate that the response contains dynamic data, but here we're // only using it to indicate that the feature is enabled — the segment // response itself contains whether the data is dynamic. res.setHeader(next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.NEXT_DID_POSTPONE_HEADER, '2'); // Add the cache tags header to the response if it exists and we're in // minimal mode while rendering a static page. const tags = (_cachedData_headers1 = cachedData.headers) == null ? void 0 : _cachedData_headers1[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADER]; if (minimalMode && isSSG && tags && typeof tags === 'string') { res.setHeader(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADER, tags); } const matchedSegment = cachedData.segmentData.get(segmentPrefetchHeader); if (matchedSegment !== undefined) { // Cache hit return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__["default"].fromStatic(matchedSegment, next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.RSC_CONTENT_TYPE_HEADER), cacheControl: cacheEntry.cacheControl }); } // Cache miss. Either a cache entry for this route has not been generated // (which technically should not be possible when PPR is enabled, because // at a minimum there should always be a fallback entry) or there's no // match for the requested segment. Respond with a 204 No Content. We // don't bother to respond with 404, because these requests are only // issued as part of a prefetch. res.statusCode = 204; return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__["default"].EMPTY, cacheControl: cacheEntry.cacheControl }); } // If there's a callback for `onCacheEntry`, call it with the cache entry // and the revalidate options. const onCacheEntry = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'onCacheEntry'); if (onCacheEntry) { const finished = await onCacheEntry({ ...cacheEntry, // TODO: remove this when upstream doesn't // always expect this value to be "PAGE" value: { ...cacheEntry.value, kind: 'PAGE' } }, { url: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'initURL') }); if (finished) { // TODO: maybe we have to end the request? return null; } } // If the request has a postponed state and it's a resume request we // should error. if (didPostpone && minimalPostponed) { throw Object.defineProperty(new Error('Invariant: postponed state should not be present on a resume request'), "__NEXT_ERROR_CODE", { value: "E396", enumerable: false, configurable: true }); } if (cachedData.headers) { const headers = { ...cachedData.headers }; if (!minimalMode || !isSSG) { delete headers[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADER]; } for (let [key, value] of Object.entries(headers)){ if (typeof value === 'undefined') continue; if (Array.isArray(value)) { for (const v of value){ res.appendHeader(key, v); } } else if (typeof value === 'number') { value = value.toString(); res.appendHeader(key, value); } else { res.appendHeader(key, value); } } } // Add the cache tags header to the response if it exists and we're in // minimal mode while rendering a static page. const tags = (_cachedData_headers = cachedData.headers) == null ? void 0 : _cachedData_headers[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADER]; if (minimalMode && isSSG && tags && typeof tags === 'string') { res.setHeader(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADER, tags); } // If the request is a data request, then we shouldn't set the status code // from the response because it should always be 200. This should be gated // behind the experimental PPR flag. if (cachedData.status && (!isRSCRequest || !isRoutePPREnabled)) { res.statusCode = cachedData.status; } // Redirect information is encoded in RSC payload, so we don't need to use redirect status codes if (!minimalMode && cachedData.status && next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_27__.RedirectStatusCode[cachedData.status] && isRSCRequest) { res.statusCode = 200; } // Mark that the request did postpone. if (didPostpone) { res.setHeader(next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.NEXT_DID_POSTPONE_HEADER, '1'); } // we don't go through this block when preview mode is true // as preview mode is a dynamic request (bypasses cache) and doesn't // generate both HTML and payloads in the same request so continue to just // return the generated payload if (isRSCRequest && !isDraftMode) { // If this is a dynamic RSC request, then stream the response. if (typeof cachedData.rscData === 'undefined') { if (cachedData.postponed) { throw Object.defineProperty(new Error('Invariant: Expected postponed to be undefined'), "__NEXT_ERROR_CODE", { value: "E372", enumerable: false, configurable: true }); } return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: cachedData.html, // Dynamic RSC responses cannot be cached, even if they're // configured with `force-static` because we have no way of // distinguishing between `force-static` and pages that have no // postponed state. // TODO: distinguish `force-static` from pages with no postponed state (static) cacheControl: isDynamicRSCRequest ? { revalidate: 0, expire: undefined } : cacheEntry.cacheControl }); } // As this isn't a prefetch request, we should serve the static flight // data. return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__["default"].fromStatic(cachedData.rscData, next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.RSC_CONTENT_TYPE_HEADER), cacheControl: cacheEntry.cacheControl }); } // This is a request for HTML data. let body = cachedData.html; // If there's no postponed state, we should just serve the HTML. This // should also be the case for a resume request because it's completed // as a server render (rather than a static render). if (!didPostpone || minimalMode || isRSCRequest) { // If we're in test mode, we should add a sentinel chunk to the response // that's between the static and dynamic parts so we can compare the // chunks and add assertions. if (false) {} return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: body, cacheControl: cacheEntry.cacheControl }); } // If we're debugging the static shell or the dynamic API accesses, we // should just serve the HTML without resuming the render. The returned // HTML will be the static shell so all the Dynamic API's will be used // during static generation. if (isDebugStaticShell || isDebugDynamicAccesses) { // Since we're not resuming the render, we need to at least add the // closing body and html tags to create valid HTML. body.push(new ReadableStream({ start (controller) { controller.enqueue(next_dist_server_stream_utils_encoded_tags__WEBPACK_IMPORTED_MODULE_22__.ENCODED_TAGS.CLOSED.BODY_AND_HTML); controller.close(); } })); return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: body, cacheControl: { revalidate: 0, expire: undefined } }); } // If we're in test mode, we should add a sentinel chunk to the response // that's between the static and dynamic parts so we can compare the // chunks and add assertions. if (false) {} // This request has postponed, so let's create a new transformer that the // dynamic data can pipe to that will attach the dynamic data to the end // of the response. const transformer = new TransformStream(); body.push(transformer.readable); // Perform the render again, but this time, provide the postponed state. // We don't await because we want the result to start streaming now, and // we've already chained the transformer's readable to the render result. doRender({ span, postponed: cachedData.postponed, // This is a resume render, not a fallback render, so we don't need to // set this. fallbackRouteParams: null }).then(async (result)=>{ var _result_value; if (!result) { throw Object.defineProperty(new Error('Invariant: expected a result to be returned'), "__NEXT_ERROR_CODE", { value: "E463", enumerable: false, configurable: true }); } if (((_result_value = result.value) == null ? void 0 : _result_value.kind) !== next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKind.APP_PAGE) { var _result_value1; throw Object.defineProperty(new Error(`Invariant: expected a page response, got ${(_result_value1 = result.value) == null ? void 0 : _result_value1.kind}`), "__NEXT_ERROR_CODE", { value: "E305", enumerable: false, configurable: true }); } // Pipe the resume result to the transformer. await result.value.html.pipeTo(transformer.writable); }).catch((err)=>{ // An error occurred during piping or preparing the render, abort // the transformers writer so we can terminate the stream. transformer.writable.abort(err).catch((e)=>{ console.error("couldn't abort transformer", e); }); }); return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: body, // We don't want to cache the response if it has postponed data because // the response being sent to the client it's dynamic parts are streamed // to the client on the same request. cacheControl: { revalidate: 0, expire: undefined } }); }; // TODO: activeSpan code path is for when wrapped by // next-server can be removed when this is no longer used if (activeSpan) { await handleResponse(activeSpan); } else { return await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__.BaseServerSpan.handleRequest, { spanName: `${method} ${req.url}`, kind: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__.SpanKind.SERVER, attributes: { 'http.method': method, 'http.target': req.url } }, handleResponse)); } } catch (err) { if (!(err instanceof next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24__.NoFallbackError)) { await routeModule.onRequestError(req, err, { routerKind: 'App Router', routePath: srcPage, routeType: 'render', revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_2__/* .getRevalidateReason */ .c)({ isRevalidate: isSSG, isOnDemandRevalidate }) }, routerServerContext); } // rethrow so that we can handle serving error page throw err; } } // TODO: omit this from production builds, only test builds should include it /** * Creates a readable stream that emits a PPR boundary sentinel. * * @returns A readable stream that emits a PPR boundary sentinel. */ function createPPRBoundarySentinel() { return new ReadableStream({ start (controller) { controller.enqueue(new TextEncoder().encode('')); controller.close(); } }); } //# sourceMappingURL=app-page.js.map {"finalSource":true}mapbufferedMap ConcatSourceRawSource#__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ GlobalError: () => (/* reexport default from dynamic */ next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_25___default.a), /* harmony export */ __next_app__: () => (/* binding */ __next_app__), /* harmony export */ handler: () => (/* binding */ handler), /* harmony export */ pages: () => (/* binding */ pages), /* harmony export */ routeModule: () => (/* binding */ routeModule), /* harmony export */ tree: () => (/* binding */ tree) /* harmony export */ }); /* harmony import */ var next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73653); /* harmony import */ var next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(97714); /* harmony import */ var next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(85250); /* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(37587); /* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(22369); /* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1889); /* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var next_dist_server_app_render_interop_default__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(96232); /* harmony import */ var next_dist_server_app_render_strip_flight_headers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(22841); /* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(46537); /* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(46027); /* harmony import */ var next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(78559); /* harmony import */ var next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(75928); /* harmony import */ var next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(19374); /* harmony import */ var next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12__); /* harmony import */ var next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(65971); /* harmony import */ var next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_13__); /* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(261); /* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_14__); /* harmony import */ var next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(79898); /* harmony import */ var next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_15__); /* harmony import */ var next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(32967); /* harmony import */ var next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__); /* harmony import */ var next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(26713); /* harmony import */ var next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17__); /* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(40139); /* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__); /* harmony import */ var next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(14248); /* harmony import */ var next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__); /* harmony import */ var next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(59580); /* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(57749); /* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__); /* harmony import */ var next_dist_server_stream_utils_encoded_tags__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(53123); /* harmony import */ var next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(89745); /* harmony import */ var next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__); /* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(86439); /* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24__); /* harmony import */ var next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(58671); /* harmony import */ var next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_25__); /* harmony import */ var next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(18283); /* harmony import */ var next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__); /* harmony import */ var next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(39818); /* harmony import */ var next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_27__); /* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {}; /* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__) if(["default","tree","pages","GlobalError","__next_app__","routeModule","handler"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__[__WEBPACK_IMPORT_KEY__] /* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__); ReplaceSourceRawSourceD&2298Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 47570))undefined123210Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 58671, 23))undefined235314Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 33506))undefined339423Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 15034, 23))undefined448535Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 54693, 23))undefined558649Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 2069))undefined652792undefined794908undefined910986undefined9881059undefined10611123undefined11251194undefined11961272undefined12741359undefined13611444undefined14461522undefined15241605undefined16071700undefined17021806undefined18081888undefined18901968undefined19702061undefined20632244undefined22462322undefined23242389undefined23912464undefined24662523undefined25252631undefined26332706undefined27082772undefined27742855undefined32843506Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 91946))undefined40814303Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 91946))undefined45124534undefined45364672undefined46744696undefined47274745__webpack_require__undefined48034809undefined49105036undefined50385123undefined51255238undefined53015307undefined53325349next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__.AppPageRouteModuleundefined53855393next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKindundefined56715706".next"undefined571157120undefined57395777 falseundefined57895795undefined60866106falseundefined61096173{}undefined63196358falseundefined63906403(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined64946507(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined72737288(0,next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_14__.normalizeAppPath)undefined76757684(0,next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17__.getBotType)undefined77207735(0,next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12__.isHtmlBotRequest)undefined78807893(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined79397965next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.NEXT_ROUTER_PREFETCH_HEADERundefined81448157(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined82038212next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.RSC_HEADERundefined82528276(0,next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_15__.getIsPossibleServerAction)undefined84568475(0,next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__.checkIsAppPPREnabled)undefined86678774 falseundefined877987930undefined1108911102(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined1148711514(0,next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12__.shouldServeStreamingMetadata)undefined1329913316(0,next_dist_server_app_render_strip_flight_headers__WEBPACK_IMPORTED_MODULE_7__/* .stripFlightHeaders */ .d)undefined1337613384next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__undefined1343513434: (next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_25___default())undefined1380313832(0,next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_11__.setReferenceManifestsSingleton)undefined1396413984(0,next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_13__.createServerModuleMap)undefined1411814126(0,next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__.getTracer)undefined1442614440next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__.NodeNextRequestundefined1448014495next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__.NodeNextResponseundefined1472314760falseundefined1476315338{}undefined1591615929next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__.BaseServerSpanundefined1701617029(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined1730817321(0,next_dist_server_app_render_interop_default__WEBPACK_IMPORTED_MODULE_6__/* .interopDefault */ .T)undefined1804018076 trueundefined1808018099(__webpack_require__(33873).join)undefined18178182290undefined1919019203(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined2104421057(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined2148121502next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADERundefined2294122955next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKindundefined2420124218(0,next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.parseFallbackField)undefined2450724518next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackModeundefined2453324537(0,next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17__.isBot)undefined2464324654next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackModeundefined2508825099next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackModeundefined2516825179next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackModeundefined2526825279next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackModeundefined2581225823next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackModeundefined2586825882next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24__.NoFallbackErrorundefined2653426542next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKindundefined2728827309(0,next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_10__/* .getFallbackRouteParams */ .u)undefined2883728851next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKindundefined2889028901next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__["default"]undefined2940329416(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined2947329494(0,next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_10__/* .getFallbackRouteParams */ .u)undefined3006930077next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKindundefined3155631570next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKindundefined3292232945next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.NEXT_IS_PRERENDER_HEADERundefined3541235425next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.CACHE_ONE_YEARundefined3572035734next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKindundefined3661736640next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.NEXT_DID_POSTPONE_HEADERundefined3691236933next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADERundefined3705137072next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADERundefined3730237317(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)undefined3754537556next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__["default"]undefined3758537607next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.RSC_CONTENT_TYPE_HEADERundefined3826338278(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)undefined3848638497next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__["default"]undefined3876038773(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined3922139234(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined4010440125next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADERundefined4100441025next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADERundefined4113541156next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADERundefined4170941726next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_27__.RedirectStatusCodeundefined4193041953next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.NEXT_DID_POSTPONE_HEADERundefined4284942864(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)undefined4389243907(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)undefined4411544126next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__["default"]undefined4415944181next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.RSC_CONTENT_TYPE_HEADERundefined4489845010falseundefined4501345363{}undefined4538845403(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)undefined4634746358next_dist_server_stream_utils_encoded_tags__WEBPACK_IMPORTED_MODULE_22__.ENCODED_TAGSundefined4649346508(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)undefined4711947146falseundefined4714947219{}undefined4852748541next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKindundefined4946549480(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)undefined5035550368next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__.BaseServerSpanundefined5046750474next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__.SpanKindundefined5073050744next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24__.NoFallbackErrorundefined5095650974(0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_2__/* .getRevalidateReason */ .c)undefinedw__webpack_require__.n__webpack_require__.d__webpack_require__.t__webpack_require__.r  webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ TaskDetailPage), /* harmony export */ generateMetadata: () => (/* binding */ generateMetadata) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5939); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _lib_api__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(59902); /* harmony import */ var next_navigation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22134); /* harmony import */ var next_headers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(56057); /* harmony import */ var _TaskDetailClient__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21180); webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourceimport { jsx as _jsx } from "react/jsx-runtime"; import { getTask, getCategories, getLocations } from '@/lib/api'; import { notFound } from 'next/navigation'; import { cookies } from 'next/headers'; import TaskDetailClient from './TaskDetailClient'; export async function generateMetadata({ params }) { const { id } = await params; try { const { task } = await getTask(id); return { title: `${task.title} — CanHelp`, description: task.description.slice(0, 160) }; } catch { return { title: 'Εργασία — CanHelp' }; } } export default async function TaskDetailPage({ params }) { const { id } = await params; let taskData; try { taskData = await getTask(id); } catch { notFound(); } const cookieStore = await cookies(); const locale = cookieStore.get('canhelp_locale')?.value ?? 'el'; const [cats, locs] = await Promise.all([ getCategories().catch(()=>[]), getLocations().catch(()=>[]) ]); const catMap = {}; for (const cat of cats){ catMap[cat.slug] = cat.names[locale] ?? cat.names.el; for (const sub of cat.children ?? []){ catMap[sub.slug] = sub.names[locale] ?? sub.names.el; } } const locMap = {}; for (const city of locs){ locMap[city.slug] = city.names[locale] ?? city.names.el; for (const d of city.children ?? []){ locMap[d.slug] = d.names[locale] ?? d.names.el; } } return /*#__PURE__*/ _jsx(TaskDetailClient, { taskId: id, initialTask: taskData.task, initialCustomer: taskData.customer, catMap: catMap, locMap: locMap }); } e/1qsXybpGM((0,_lib_api__WEBPACK_IMPORTED_MODULE_4__/* .getTask */ .gg)(0,next_navigation__WEBPACK_IMPORTED_MODULE_1__.notFound)(0,next_headers__WEBPACK_IMPORTED_MODULE_2__/* .cookies */ .UL)(0,_lib_api__WEBPACK_IMPORTED_MODULE_4__/* .getCategories */ .bW)(0,_lib_api__WEBPACK_IMPORTED_MODULE_4__/* .getLocations */ .Vs)(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)_TaskDetailClient__WEBPACK_IMPORTED_MODULE_3__["default"] __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ TaskDetailPage), /* harmony export */ generateMetadata: () => (/* binding */ generateMetadata) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5939); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _lib_api__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(59902); /* harmony import */ var next_navigation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22134); /* harmony import */ var next_headers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(56057); /* harmony import */ var _TaskDetailClient__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21180); async function generateMetadata({ params }) { const { id } = await params; try { const { task } = await (0,_lib_api__WEBPACK_IMPORTED_MODULE_4__/* .getTask */ .gg)(id); return { title: `${task.title} — CanHelp`, description: task.description.slice(0, 160) }; } catch { return { title: 'Εργασία — CanHelp' }; } } async function TaskDetailPage({ params }) { const { id } = await params; let taskData; try { taskData = await (0,_lib_api__WEBPACK_IMPORTED_MODULE_4__/* .getTask */ .gg)(id); } catch { (0,next_navigation__WEBPACK_IMPORTED_MODULE_1__.notFound)(); } const cookieStore = await (0,next_headers__WEBPACK_IMPORTED_MODULE_2__/* .cookies */ .UL)(); const locale = cookieStore.get('canhelp_locale')?.value ?? 'el'; const [cats, locs] = await Promise.all([ (0,_lib_api__WEBPACK_IMPORTED_MODULE_4__/* .getCategories */ .bW)().catch(()=>[]), (0,_lib_api__WEBPACK_IMPORTED_MODULE_4__/* .getLocations */ .Vs)().catch(()=>[]) ]); const catMap = {}; for (const cat of cats){ catMap[cat.slug] = cat.names[locale] ?? cat.names.el; for (const sub of cat.children ?? []){ catMap[sub.slug] = sub.names[locale] ?? sub.names.el; } } const locMap = {}; for (const city of locs){ locMap[city.slug] = city.names[locale] ?? city.names.el; for (const d of city.children ?? []){ locMap[d.slug] = d.names[locale] ?? d.names.el; } } return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_TaskDetailClient__WEBPACK_IMPORTED_MODULE_3__["default"], { taskId: id, initialTask: taskData.task, initialCustomer: taskData.customer, catMap: catMap, locMap: locMap }); }  __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ TaskDetailPage), /* harmony export */ generateMetadata: () => (/* binding */ generateMetadata) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5939); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _lib_api__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(59902); /* harmony import */ var next_navigation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22134); /* harmony import */ var next_headers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(56057); /* harmony import */ var _TaskDetailClient__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21180); import { jsx as _jsx } from "react/jsx-runtime"; import { getTask, getCategories, getLocations } from '@/lib/api'; import { notFound } from 'next/navigation'; import { cookies } from 'next/headers'; import TaskDetailClient from './TaskDetailClient'; export async function generateMetadata({ params }) { const { id } = await params; try { const { task } = await getTask(id); return { title: `${task.title} — CanHelp`, description: task.description.slice(0, 160) }; } catch { return { title: 'Εργασία — CanHelp' }; } } export default async function TaskDetailPage({ params }) { const { id } = await params; let taskData; try { taskData = await getTask(id); } catch { notFound(); } const cookieStore = await cookies(); const locale = cookieStore.get('canhelp_locale')?.value ?? 'el'; const [cats, locs] = await Promise.all([ getCategories().catch(()=>[]), getLocations().catch(()=>[]) ]); const catMap = {}; for (const cat of cats){ catMap[cat.slug] = cat.names[locale] ?? cat.names.el; for (const sub of cat.children ?? []){ catMap[sub.slug] = sub.names[locale] ?? sub.names.el; } } const locMap = {}; for (const city of locs){ locMap[city.slug] = city.names[locale] ?? city.names.el; for (const d of city.children ?? []){ locMap[d.slug] = d.names[locale] ?? d.names.el; } } return /*#__PURE__*/ _jsx(TaskDetailClient, { taskId: id, initialTask: taskData.task, initialCustomer: taskData.customer, catMap: catMap, locMap: locMap }); } 047undefined49113undefined115157undefined159197undefined199248undefined250256undefined377383(0,_lib_api__WEBPACK_IMPORTED_MODULE_4__/* .getTask */ .gg)undefined610624undefined755761(0,_lib_api__WEBPACK_IMPORTED_MODULE_4__/* .getTask */ .gg)undefined791798(0,next_navigation__WEBPACK_IMPORTED_MODULE_1__.notFound)undefined839845(0,next_headers__WEBPACK_IMPORTED_MODULE_2__/* .cookies */ .UL)undefined972984(0,_lib_api__WEBPACK_IMPORTED_MODULE_4__/* .getCategories */ .bW)undefined10111022(0,_lib_api__WEBPACK_IMPORTED_MODULE_4__/* .getLocations */ .Vs)undefined15561559(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined15611576_TaskDetailClient__WEBPACK_IMPORTED_MODULE_3__["default"]undefinedg webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25459); /* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__); webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSource:// This file is generated by the Webpack next-flight-loader. import { registerClientReference } from "react-server-dom-webpack/server"; export default registerClientReference( function() { throw new Error("Attempted to call the default export of \"/opt/canhelp/apps/web/src/app/specialist-setup/page.tsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component."); }, "/opt/canhelp/apps/web/src/app/specialist-setup/page.tsx", "default", ); `=G8 ā@/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__.registerClientReference));f__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25459); /* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__); // This file is generated by the Webpack next-flight-loader. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__.registerClientReference)( function() { throw new Error("Attempted to call the default export of \"/opt/canhelp/apps/web/src/app/specialist-setup/page.tsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component."); }, "/opt/canhelp/apps/web/src/app/specialist-setup/page.tsx", "default", ));  __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25459); /* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__); 61134undefined136150/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (undefined136150undefined151173(0,react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__.registerClientReference)undefined568568.5);undefined[ `webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource^import(/* webpackMode: "eager" */ "/opt/canhelp/apps/web/src/app/specialist-setup/page.tsx"); `[Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 28527))bPromise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 28527));  \l091Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 28527))undefinedQY _webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource^import(/* webpackMode: "eager" */ "/opt/canhelp/apps/web/src/app/specialist-setup/page.tsx"); `[Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 2069))aPromise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 2069));  Rk091Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 2069))undefinedGh  webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ FavoritesPage) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(78157); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31768); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(94496); /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(next_link__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var next_navigation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(71159); /* harmony import */ var _lib_auth__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(13260); /* harmony import */ var _context_locale__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(96484); /* harmony import */ var _lib_api__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(91864); /* harmony import */ var _lib_formatName__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(48178); webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSource%/* __next_internal_client_entry_do_not_use__ default auto */ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { useState, useEffect } from 'react'; import Link from 'next/link'; import { useRouter } from 'next/navigation'; import { useSession } from '@/lib/auth'; import { useLocale } from '@/context/locale'; import { getSpecialistFavorites, removeSpecialistFavorite } from '@/lib/api'; import { formatShortName } from '@/lib/formatName'; export default function FavoritesPage() { const { data: session, isPending } = useSession(); const router = useRouter(); const { t } = useLocale(); const [favorites, setFavorites] = useState([]); const [loading, setLoading] = useState(true); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (!isPending && !session) { router.push('/login'); return; } if (!session) return; getSpecialistFavorites().then(setFavorites).catch(()=>{}).finally(()=>setLoading(false)); }, [ session, isPending ]); async function handleRemove(specialistId) { await removeSpecialistFavorite(specialistId).catch(()=>{}); setFavorites((prev)=>prev.filter((r)=>r.specialist?.id !== specialistId)); } if (isPending || loading) { return /*#__PURE__*/ _jsx("div", { className: "text-center py-20 text-white", children: t('common.loading') }); } return /*#__PURE__*/ _jsxs("div", { className: "max-w-3xl mx-auto px-4 py-10", children: [ /*#__PURE__*/ _jsx("h1", { className: "text-2xl font-bold text-white mb-6", children: t('favorites.specialists.title') }), favorites.length === 0 ? /*#__PURE__*/ _jsxs("div", { className: "text-center py-20 text-white/70", children: [ /*#__PURE__*/ _jsx("p", { className: "text-4xl mb-4", children: "\uD83E\uDD0D" }), /*#__PURE__*/ _jsx("p", { className: "text-lg", children: t('favorites.specialists.empty') }), /*#__PURE__*/ _jsxs(Link, { href: "/specialists", className: "mt-4 inline-block text-white hover:text-white/80 text-sm", children: [ t('specialists.view'), " →" ] }) ] }) : /*#__PURE__*/ _jsx("div", { className: "space-y-3", children: favorites.map((row)=>{ const u = row.specialist; if (!u) return null; const name = formatShortName(u.firstName, u.lastName, u.name); const initials = `${u.firstName?.[0] ?? ''}${u.lastName?.[0] ?? ''}`.toUpperCase() || u.name?.[0]?.toUpperCase() || '?'; return /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-4 bg-white rounded-xl border border-gray-200 p-4 hover:shadow-sm transition", children: [ /*#__PURE__*/ _jsxs(Link, { href: `/users/${u.id}`, className: "flex items-center gap-3 flex-1 min-w-0", children: [ /*#__PURE__*/ _jsx("div", { className: "w-12 h-12 rounded-full bg-blue-100 flex-shrink-0 flex items-center justify-center text-blue-700 font-bold text-sm overflow-hidden border border-gray-100", children: u.image ? /*#__PURE__*/ _jsx("img", { src: u.image, alt: name, className: "w-full h-full object-cover" }) : initials }), /*#__PURE__*/ _jsxs("div", { className: "min-w-0", children: [ /*#__PURE__*/ _jsx("p", { className: "font-semibold text-gray-900 truncate", children: name }), u.bio && /*#__PURE__*/ _jsx("p", { className: "text-sm text-gray-500 line-clamp-1", children: u.bio }) ] }) ] }), /*#__PURE__*/ _jsx("button", { onClick: ()=>handleRemove(u.id), title: t('specialist.unfavorite'), className: "flex-shrink-0 w-8 h-8 flex items-center justify-center text-pink-400 hover:text-pink-600 hover:bg-pink-50 rounded-full transition", children: "❤️" }) ] }, row.id); }) }) ] }); } c$={}_JL!*BJai t@_CJMLO  x { W e ? C $ ( * -  DGbDe(0,_lib_auth__WEBPACK_IMPORTED_MODULE_4__/* .useSession */ .wV)(0,next_navigation__WEBPACK_IMPORTED_MODULE_3__.useRouter)(0,_context_locale__WEBPACK_IMPORTED_MODULE_5__/* .useLocale */ .Y)(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(0,_lib_api__WEBPACK_IMPORTED_MODULE_6__/* .getSpecialistFavorites */ .pD)(0,_lib_api__WEBPACK_IMPORTED_MODULE_6__/* .removeSpecialistFavorite */ .sD)(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(next_link__WEBPACK_IMPORTED_MODULE_2___default())(0,_lib_formatName__WEBPACK_IMPORTED_MODULE_7__/* .formatShortName */ .H)\__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ FavoritesPage) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(78157); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31768); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(94496); /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(next_link__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var next_navigation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(71159); /* harmony import */ var _lib_auth__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(13260); /* harmony import */ var _context_locale__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(96484); /* harmony import */ var _lib_api__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(91864); /* harmony import */ var _lib_formatName__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(48178); /* __next_internal_client_entry_do_not_use__ default auto */ function FavoritesPage() { const { data: session, isPending } = (0,_lib_auth__WEBPACK_IMPORTED_MODULE_4__/* .useSession */ .wV)(); const router = (0,next_navigation__WEBPACK_IMPORTED_MODULE_3__.useRouter)(); const { t } = (0,_context_locale__WEBPACK_IMPORTED_MODULE_5__/* .useLocale */ .Y)(); const [favorites, setFavorites] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)([]); const [loading, setLoading] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(true); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{ if (!isPending && !session) { router.push('/login'); return; } if (!session) return; (0,_lib_api__WEBPACK_IMPORTED_MODULE_6__/* .getSpecialistFavorites */ .pD)().then(setFavorites).catch(()=>{}).finally(()=>setLoading(false)); }, [ session, isPending ]); async function handleRemove(specialistId) { await (0,_lib_api__WEBPACK_IMPORTED_MODULE_6__/* .removeSpecialistFavorite */ .sD)(specialistId).catch(()=>{}); setFavorites((prev)=>prev.filter((r)=>r.specialist?.id !== specialistId)); } if (isPending || loading) { return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "text-center py-20 text-white", children: t('common.loading') }); } return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "max-w-3xl mx-auto px-4 py-10", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h1", { className: "text-2xl font-bold text-white mb-6", children: t('favorites.specialists.title') }), favorites.length === 0 ? /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "text-center py-20 text-white/70", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-4xl mb-4", children: "\uD83E\uDD0D" }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-lg", children: t('favorites.specialists.empty') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)((next_link__WEBPACK_IMPORTED_MODULE_2___default()), { href: "/specialists", className: "mt-4 inline-block text-white hover:text-white/80 text-sm", children: [ t('specialists.view'), " →" ] }) ] }) : /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "space-y-3", children: favorites.map((row)=>{ const u = row.specialist; if (!u) return null; const name = (0,_lib_formatName__WEBPACK_IMPORTED_MODULE_7__/* .formatShortName */ .H)(u.firstName, u.lastName, u.name); const initials = `${u.firstName?.[0] ?? ''}${u.lastName?.[0] ?? ''}`.toUpperCase() || u.name?.[0]?.toUpperCase() || '?'; return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "flex items-center gap-4 bg-white rounded-xl border border-gray-200 p-4 hover:shadow-sm transition", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)((next_link__WEBPACK_IMPORTED_MODULE_2___default()), { href: `/users/${u.id}`, className: "flex items-center gap-3 flex-1 min-w-0", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "w-12 h-12 rounded-full bg-blue-100 flex-shrink-0 flex items-center justify-center text-blue-700 font-bold text-sm overflow-hidden border border-gray-100", children: u.image ? /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("img", { src: u.image, alt: name, className: "w-full h-full object-cover" }) : initials }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "min-w-0", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "font-semibold text-gray-900 truncate", children: name }), u.bio && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-sm text-gray-500 line-clamp-1", children: u.bio }) ] }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { onClick: ()=>handleRemove(u.id), title: t('specialist.unfavorite'), className: "flex-shrink-0 w-8 h-8 flex items-center justify-center text-pink-400 hover:text-pink-600 hover:bg-pink-50 rounded-full transition", children: "❤️" }) ] }, row.id); }) }) ] }); }  __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ FavoritesPage) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(78157); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31768); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(94496); /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(next_link__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var next_navigation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(71159); /* harmony import */ var _lib_auth__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(13260); /* harmony import */ var _context_locale__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(96484); /* harmony import */ var _lib_api__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(91864); /* harmony import */ var _lib_formatName__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(48178); %/* __next_internal_client_entry_do_not_use__ default auto */ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { useState, useEffect } from 'react'; import Link from 'next/link'; import { useRouter } from 'next/navigation'; import { useSession } from '@/lib/auth'; import { useLocale } from '@/context/locale'; import { getSpecialistFavorites, removeSpecialistFavorite } from '@/lib/api'; import { formatShortName } from '@/lib/formatName'; export default function FavoritesPage() { const { data: session, isPending } = useSession(); const router = useRouter(); const { t } = useLocale(); const [favorites, setFavorites] = useState([]); const [loading, setLoading] = useState(true); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (!isPending && !session) { router.push('/login'); return; } if (!session) return; getSpecialistFavorites().then(setFavorites).catch(()=>{}).finally(()=>setLoading(false)); }, [ session, isPending ]); async function handleRemove(specialistId) { await removeSpecialistFavorite(specialistId).catch(()=>{}); setFavorites((prev)=>prev.filter((r)=>r.specialist?.id !== specialistId)); } if (isPending || loading) { return /*#__PURE__*/ _jsx("div", { className: "text-center py-20 text-white", children: t('common.loading') }); } return /*#__PURE__*/ _jsxs("div", { className: "max-w-3xl mx-auto px-4 py-10", children: [ /*#__PURE__*/ _jsx("h1", { className: "text-2xl font-bold text-white mb-6", children: t('favorites.specialists.title') }), favorites.length === 0 ? /*#__PURE__*/ _jsxs("div", { className: "text-center py-20 text-white/70", children: [ /*#__PURE__*/ _jsx("p", { className: "text-4xl mb-4", children: "\uD83E\uDD0D" }), /*#__PURE__*/ _jsx("p", { className: "text-lg", children: t('favorites.specialists.empty') }), /*#__PURE__*/ _jsxs(Link, { href: "/specialists", className: "mt-4 inline-block text-white hover:text-white/80 text-sm", children: [ t('specialists.view'), " →" ] }) ] }) : /*#__PURE__*/ _jsx("div", { className: "space-y-3", children: favorites.map((row)=>{ const u = row.specialist; if (!u) return null; const name = formatShortName(u.firstName, u.lastName, u.name); const initials = `${u.firstName?.[0] ?? ''}${u.lastName?.[0] ?? ''}`.toUpperCase() || u.name?.[0]?.toUpperCase() || '?'; return /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-4 bg-white rounded-xl border border-gray-200 p-4 hover:shadow-sm transition", children: [ /*#__PURE__*/ _jsxs(Link, { href: `/users/${u.id}`, className: "flex items-center gap-3 flex-1 min-w-0", children: [ /*#__PURE__*/ _jsx("div", { className: "w-12 h-12 rounded-full bg-blue-100 flex-shrink-0 flex items-center justify-center text-blue-700 font-bold text-sm overflow-hidden border border-gray-100", children: u.image ? /*#__PURE__*/ _jsx("img", { src: u.image, alt: name, className: "w-full h-full object-cover" }) : initials }), /*#__PURE__*/ _jsxs("div", { className: "min-w-0", children: [ /*#__PURE__*/ _jsx("p", { className: "font-semibold text-gray-900 truncate", children: name }), u.bio && /*#__PURE__*/ _jsx("p", { className: "text-sm text-gray-500 line-clamp-1", children: u.bio }) ] }) ] }), /*#__PURE__*/ _jsx("button", { onClick: ()=>handleRemove(u.id), title: t('specialist.unfavorite'), className: "flex-shrink-0 w-8 h-8 flex items-center justify-center text-pink-400 hover:text-pink-600 hover:bg-pink-50 rounded-full transition", children: "❤️" }) ] }, row.id); }) }) ] }); } 661123undefined125168undefined170198undefined200243undefined245284undefined286330undefined332408undefined410460undefined462476undefined545554(0,_lib_auth__WEBPACK_IMPORTED_MODULE_4__/* .useSession */ .wV)undefined578586(0,next_navigation__WEBPACK_IMPORTED_MODULE_3__.useRouter)undefined609617(0,_context_locale__WEBPACK_IMPORTED_MODULE_5__/* .useLocale */ .Y)undefined660667(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined708715(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined779787(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)undefined936957(0,_lib_api__WEBPACK_IMPORTED_MODULE_6__/* .getSpecialistFavorites */ .pD)undefined11401163(0,_lib_api__WEBPACK_IMPORTED_MODULE_6__/* .removeSpecialistFavorite */ .sD)undefined13441347(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined14981502(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined16101613(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined18141818(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined19531956(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined21242127(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined23072311(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined23132316(next_link__WEBPACK_IMPORTED_MODULE_2___default())undefined26802683(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined29032917(0,_lib_formatName__WEBPACK_IMPORTED_MODULE_7__/* .formatShortName */ .H)undefined31353139(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined33643368(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined33703373(next_link__WEBPACK_IMPORTED_MODULE_2___default())undefined36133616(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined39083911(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined42634267(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined44504453(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined47394742(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined51485151(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined; u'webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ PaymentPage) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(78157); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31768); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var next_navigation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(71159); /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(94496); /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_link__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _context_locale__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(96484); /* harmony import */ var _lib_api__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(91864); webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSource/* __next_internal_client_entry_do_not_use__ default auto */ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { useEffect, useState } from 'react'; import { useSearchParams } from 'next/navigation'; import Link from 'next/link'; import { useLocale } from '@/context/locale'; import * as api from '@/lib/api'; // Status is determined either by: // 1. ?status=cancelled (from our cancel redirect) // 2. ?ref=ORDER_REF → we poll /payments/history to check the order status export default function PaymentPage() { const searchParams = useSearchParams(); const { t } = useLocale(); const statusParam = searchParams.get('status'); const ref = searchParams.get('ref'); const [status, setStatus] = useState(statusParam === 'cancelled' ? 'cancelled' : ref ? 'loading' : 'pending'); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (statusParam === 'cancelled') { setStatus('cancelled'); return; } if (!ref) return; // Poll payment history to find the order status let attempts = 0; const MAX = 12 // ~24 seconds total ; const INTERVAL = 2000; const check = async ()=>{ attempts++; try { const history = await api.getPaymentHistory(); const payment = history.find((p)=>p.orderRef === ref); if (payment && payment.status !== 'pending') { setStatus(payment.status); return; } } catch {} if (attempts < MAX) { setTimeout(check, INTERVAL); } else { setStatus('pending'); // timeout - show pending message } }; setTimeout(check, INTERVAL); }, [ ref, statusParam ]); const config = { success: { icon: /*#__PURE__*/ _jsx("svg", { className: "w-16 h-16 text-green-500", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z" }) }), title: t('payment.success.title'), desc: t('payment.success.desc'), color: 'text-green-700', bg: 'bg-green-50', border: 'border-green-200' }, cancelled: { icon: /*#__PURE__*/ _jsx("svg", { className: "w-16 h-16 text-yellow-500", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z" }) }), title: t('payment.cancelled.title'), desc: t('payment.cancelled.desc'), color: 'text-yellow-700', bg: 'bg-yellow-50', border: 'border-yellow-200' }, failed: { icon: /*#__PURE__*/ _jsx("svg", { className: "w-16 h-16 text-red-500", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z" }) }), title: t('payment.cancelled.title'), desc: t('payment.cancelled.desc'), color: 'text-red-700', bg: 'bg-red-50', border: 'border-red-200' }, pending: { icon: /*#__PURE__*/ _jsx("svg", { className: "w-16 h-16 text-blue-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z" }) }), title: t('payment.pending.title'), desc: t('payment.pending.desc'), color: 'text-blue-700', bg: 'bg-blue-50', border: 'border-blue-200' }, loading: { icon: /*#__PURE__*/ _jsxs("svg", { className: "w-16 h-16 text-gray-400 animate-spin", fill: "none", viewBox: "0 0 24 24", children: [ /*#__PURE__*/ _jsx("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), /*#__PURE__*/ _jsx("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8v8z" }) ] }), title: t('payment.pending.title'), desc: t('payment.pending.desc'), color: 'text-gray-700', bg: 'bg-gray-50', border: 'border-gray-200' } }; const current = config[status] ?? config.pending; return /*#__PURE__*/ _jsx("div", { className: "min-h-screen bg-gray-50 flex items-center justify-center p-4", children: /*#__PURE__*/ _jsxs("div", { className: `bg-white rounded-2xl border ${current.border} shadow-sm p-10 max-w-sm w-full text-center`, children: [ /*#__PURE__*/ _jsx("div", { className: "flex justify-center mb-5", children: current.icon }), /*#__PURE__*/ _jsx("h1", { className: `text-2xl font-bold mb-2 ${current.color}`, children: current.title }), /*#__PURE__*/ _jsx("p", { className: "text-gray-500 text-sm mb-8", children: current.desc }), /*#__PURE__*/ _jsxs(Link, { href: "/profile", className: "inline-flex items-center gap-2 px-6 py-3 bg-blue-600 hover:bg-blue-700 text-white font-semibold rounded-xl transition-colors text-sm", children: [ /*#__PURE__*/ _jsx("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M10 19l-7-7m0 0l7-7m-7 7h18" }) }), t('payment.back_to_profile') ] }) ] }) }); } c ={}_')I-;RZfn+q t m p e h ^\aX[nq$'(0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useSearchParams)(0,_context_locale__WEBPACK_IMPORTED_MODULE_4__/* .useLocale */ .Y)(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)_lib_api__WEBPACK_IMPORTED_MODULE_5__/* .getPaymentHistory */ .pK(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(next_link__WEBPACK_IMPORTED_MODULE_3___default())$'__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ PaymentPage) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(78157); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31768); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var next_navigation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(71159); /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(94496); /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_link__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _context_locale__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(96484); /* harmony import */ var _lib_api__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(91864); /* __next_internal_client_entry_do_not_use__ default auto */ // Status is determined either by: // 1. ?status=cancelled (from our cancel redirect) // 2. ?ref=ORDER_REF → we poll /payments/history to check the order status function PaymentPage() { const searchParams = (0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useSearchParams)(); const { t } = (0,_context_locale__WEBPACK_IMPORTED_MODULE_4__/* .useLocale */ .Y)(); const statusParam = searchParams.get('status'); const ref = searchParams.get('ref'); const [status, setStatus] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(statusParam === 'cancelled' ? 'cancelled' : ref ? 'loading' : 'pending'); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{ if (statusParam === 'cancelled') { setStatus('cancelled'); return; } if (!ref) return; // Poll payment history to find the order status let attempts = 0; const MAX = 12 // ~24 seconds total ; const INTERVAL = 2000; const check = async ()=>{ attempts++; try { const history = await _lib_api__WEBPACK_IMPORTED_MODULE_5__/* .getPaymentHistory */ .pK(); const payment = history.find((p)=>p.orderRef === ref); if (payment && payment.status !== 'pending') { setStatus(payment.status); return; } } catch {} if (attempts < MAX) { setTimeout(check, INTERVAL); } else { setStatus('pending'); // timeout - show pending message } }; setTimeout(check, INTERVAL); }, [ ref, statusParam ]); const config = { success: { icon: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", { className: "w-16 h-16 text-green-500", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z" }) }), title: t('payment.success.title'), desc: t('payment.success.desc'), color: 'text-green-700', bg: 'bg-green-50', border: 'border-green-200' }, cancelled: { icon: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", { className: "w-16 h-16 text-yellow-500", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z" }) }), title: t('payment.cancelled.title'), desc: t('payment.cancelled.desc'), color: 'text-yellow-700', bg: 'bg-yellow-50', border: 'border-yellow-200' }, failed: { icon: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", { className: "w-16 h-16 text-red-500", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z" }) }), title: t('payment.cancelled.title'), desc: t('payment.cancelled.desc'), color: 'text-red-700', bg: 'bg-red-50', border: 'border-red-200' }, pending: { icon: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", { className: "w-16 h-16 text-blue-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z" }) }), title: t('payment.pending.title'), desc: t('payment.pending.desc'), color: 'text-blue-700', bg: 'bg-blue-50', border: 'border-blue-200' }, loading: { icon: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("svg", { className: "w-16 h-16 text-gray-400 animate-spin", fill: "none", viewBox: "0 0 24 24", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8v8z" }) ] }), title: t('payment.pending.title'), desc: t('payment.pending.desc'), color: 'text-gray-700', bg: 'bg-gray-50', border: 'border-gray-200' } }; const current = config[status] ?? config.pending; return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "min-h-screen bg-gray-50 flex items-center justify-center p-4", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: `bg-white rounded-2xl border ${current.border} shadow-sm p-10 max-w-sm w-full text-center`, children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "flex justify-center mb-5", children: current.icon }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h1", { className: `text-2xl font-bold mb-2 ${current.color}`, children: current.title }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-gray-500 text-sm mb-8", children: current.desc }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)((next_link__WEBPACK_IMPORTED_MODULE_3___default()), { href: "/profile", className: "inline-flex items-center gap-2 px-6 py-3 bg-blue-600 hover:bg-blue-700 text-white font-semibold rounded-xl transition-colors text-sm", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M10 19l-7-7m0 0l7-7m-7 7h18" }) }), t('payment.back_to_profile') ] }) ] }) }); }  __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ PaymentPage) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(78157); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31768); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var next_navigation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(71159); /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(94496); /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_link__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _context_locale__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(96484); /* harmony import */ var _lib_api__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(91864); /* __next_internal_client_entry_do_not_use__ default auto */ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { useEffect, useState } from 'react'; import { useSearchParams } from 'next/navigation'; import Link from 'next/link'; import { useLocale } from '@/context/locale'; import * as api from '@/lib/api'; // Status is determined either by: // 1. ?status=cancelled (from our cancel redirect) // 2. ?ref=ORDER_REF → we poll /payments/history to check the order status export default function PaymentPage() { const searchParams = useSearchParams(); const { t } = useLocale(); const statusParam = searchParams.get('status'); const ref = searchParams.get('ref'); const [status, setStatus] = useState(statusParam === 'cancelled' ? 'cancelled' : ref ? 'loading' : 'pending'); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (statusParam === 'cancelled') { setStatus('cancelled'); return; } if (!ref) return; // Poll payment history to find the order status let attempts = 0; const MAX = 12 // ~24 seconds total ; const INTERVAL = 2000; const check = async ()=>{ attempts++; try { const history = await api.getPaymentHistory(); const payment = history.find((p)=>p.orderRef === ref); if (payment && payment.status !== 'pending') { setStatus(payment.status); return; } } catch {} if (attempts < MAX) { setTimeout(check, INTERVAL); } else { setStatus('pending'); // timeout - show pending message } }; setTimeout(check, INTERVAL); }, [ ref, statusParam ]); const config = { success: { icon: /*#__PURE__*/ _jsx("svg", { className: "w-16 h-16 text-green-500", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z" }) }), title: t('payment.success.title'), desc: t('payment.success.desc'), color: 'text-green-700', bg: 'bg-green-50', border: 'border-green-200' }, cancelled: { icon: /*#__PURE__*/ _jsx("svg", { className: "w-16 h-16 text-yellow-500", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z" }) }), title: t('payment.cancelled.title'), desc: t('payment.cancelled.desc'), color: 'text-yellow-700', bg: 'bg-yellow-50', border: 'border-yellow-200' }, failed: { icon: /*#__PURE__*/ _jsx("svg", { className: "w-16 h-16 text-red-500", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z" }) }), title: t('payment.cancelled.title'), desc: t('payment.cancelled.desc'), color: 'text-red-700', bg: 'bg-red-50', border: 'border-red-200' }, pending: { icon: /*#__PURE__*/ _jsx("svg", { className: "w-16 h-16 text-blue-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z" }) }), title: t('payment.pending.title'), desc: t('payment.pending.desc'), color: 'text-blue-700', bg: 'bg-blue-50', border: 'border-blue-200' }, loading: { icon: /*#__PURE__*/ _jsxs("svg", { className: "w-16 h-16 text-gray-400 animate-spin", fill: "none", viewBox: "0 0 24 24", children: [ /*#__PURE__*/ _jsx("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), /*#__PURE__*/ _jsx("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8v8z" }) ] }), title: t('payment.pending.title'), desc: t('payment.pending.desc'), color: 'text-gray-700', bg: 'bg-gray-50', border: 'border-gray-200' } }; const current = config[status] ?? config.pending; return /*#__PURE__*/ _jsx("div", { className: "min-h-screen bg-gray-50 flex items-center justify-center p-4", children: /*#__PURE__*/ _jsxs("div", { className: `bg-white rounded-2xl border ${current.border} shadow-sm p-10 max-w-sm w-full text-center`, children: [ /*#__PURE__*/ _jsx("div", { className: "flex justify-center mb-5", children: current.icon }), /*#__PURE__*/ _jsx("h1", { className: `text-2xl font-bold mb-2 ${current.color}`, children: current.title }), /*#__PURE__*/ _jsx("p", { className: "text-gray-500 text-sm mb-8", children: current.desc }), /*#__PURE__*/ _jsxs(Link, { href: "/profile", className: "inline-flex items-center gap-2 px-6 py-3 bg-blue-600 hover:bg-blue-700 text-white font-semibold rounded-xl transition-colors text-sm", children: [ /*#__PURE__*/ _jsx("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M10 19l-7-7m0 0l7-7m-7 7h18" }) }), t('payment.back_to_profile') ] }) ] }) }); } c61123undefined125168undefined170219undefined221249undefined251295undefined297329undefined492506undefined557571(0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useSearchParams)undefined594602(0,_context_locale__WEBPACK_IMPORTED_MODULE_4__/* .useLocale */ .Y)undefined732739(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined870878(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)undefined13031323_lib_api__WEBPACK_IMPORTED_MODULE_5__/* .getPaymentHistory */ .pKundefined19351938(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined21862189(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined26732676(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined29252928(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined34293432(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined36783681(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined42784281(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined45284531(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined49965000(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined52085211(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined55225525(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined60316034(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined61606164(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined63446347(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined65106513(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined66926695(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined68586862(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined68646867(next_link__WEBPACK_IMPORTED_MODULE_3___default())undefined71477150(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined74517454(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined.  webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ PersonalSitePage) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(78157); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31768); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var next_navigation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(71159); /* harmony import */ var _context_locale__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(96484); /* harmony import */ var _lib_auth__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(13260); /* harmony import */ var _lib_api__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(91864); /* harmony import */ var _components_PlanBadge__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(25701); webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourceM/* __next_internal_client_entry_do_not_use__ default auto */ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime"; import { useEffect, useState, useCallback } from 'react'; import { useParams, useRouter } from 'next/navigation'; import { useLocale } from '@/context/locale'; import { useSession } from '@/lib/auth'; import { getPublicSiteProfile, getOrCreateDirectRoom, sendMessage, request, getCategories, getLocations, trackSiteMessage } from '@/lib/api'; import { PlanBadge } from '@/components/PlanBadge'; export default function PersonalSitePage() { const { slug } = useParams(); const { t, locale, setLocale } = useLocale(); const { data: session } = useSession(); const router = useRouter(); const [profile, setProfile] = useState(null); const [loading, setLoading] = useState(true); const [notFound, setNotFound] = useState(false); const [msgLoading, setMsgLoading] = useState(false); const [linkCopied, setLinkCopied] = useState(false); const [lightbox, setLightbox] = useState(null); const [contactSent, setContactSent] = useState(false); const [contactForm, setContactForm] = useState({ name: '', email: '', message: '' }); const [contactLoading, setContactLoading] = useState(false); const [langOpen, setLangOpen] = useState(false); const [msgModal, setMsgModal] = useState(false); const [authModal, setAuthModal] = useState(false); const [msgText, setMsgText] = useState(''); const [msgSent, setMsgSent] = useState(false); const [catMap, setCatMap] = useState({}); const [locMap, setLocMap] = useState({}); const [locParentMap, setLocParentMap] = useState({}); const [scrolled, setScrolled] = useState(false); const dateLocale = locale === 'ru' ? 'ru-RU' : locale === 'en' ? 'en-US' : 'el-GR'; process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ const onScroll = ()=>setScrolled(window.scrollY > 100); window.addEventListener('scroll', onScroll, { passive: true }); return ()=>window.removeEventListener('scroll', onScroll); }, []); const LANG_MAP = { el: { flag: '🇬🇷', label: 'Ελληνικά' }, en: { flag: '🇬🇧', label: 'English' }, ru: { flag: '🇷🇺', label: 'Русский' }, uk: { flag: '🇺🇦', label: 'Українська' }, de: { flag: '🇩🇪', label: 'Deutsch' }, fr: { flag: '🇫🇷', label: 'Français' }, it: { flag: '🇮🇹', label: 'Italiano' }, es: { flag: '🇪🇸', label: 'Español' }, ar: { flag: '🇸🇦', label: 'العربية' }, zh: { flag: '🇨🇳', label: '中文' } }; const SITE_LOCALES = [ { code: 'el', flag: '🇬🇷', label: 'Ελληνικά' }, { code: 'en', flag: '🇬🇧', label: 'English' }, { code: 'ru', flag: '🇷🇺', label: 'Русский' } ]; process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (!slug) return; getPublicSiteProfile(slug).then(setProfile).catch(()=>setNotFound(true)).finally(()=>setLoading(false)); }, [ slug ]); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ const catLocale = locale; getCategories().then((cats)=>{ const m = {}; for (const c of cats){ m[c.slug] = c.names[catLocale] ?? c.names.el; for (const sub of c.children ?? []){ m[sub.slug] = sub.names[catLocale] ?? sub.names.el; } } setCatMap(m); }).catch(()=>{}); getLocations().then((locs)=>{ const m = {}; const pm = {}; for (const loc of locs){ const parentName = loc.names?.[catLocale] ?? loc.names?.el ?? loc.slug; m[loc.slug] = parentName; for (const child of loc.children ?? []){ m[child.slug] = child.names?.[catLocale] ?? child.names?.el ?? child.slug; pm[child.slug] = parentName; } } setLocMap(m); setLocParentMap(pm); }).catch(()=>{}); }, [ locale ]); function handleMessage() { if (!session) { setAuthModal(true); return; } setMsgModal(true); } async function handleSendMessage(e) { e.preventDefault(); if (!msgText.trim()) return; setMsgLoading(true); try { const { room } = await getOrCreateDirectRoom(profile.id); await sendMessage(room.id, msgText.trim()); trackSiteMessage(slug); setMsgSent(true); setMsgText(''); } catch {} finally{ setMsgLoading(false); } } const handleContactSubmit = useCallback(async (e)=>{ e.preventDefault(); if (!contactForm.name.trim() || !contactForm.message.trim()) return; setContactLoading(true); try { await request(`/users/site/${slug}/contact`, { method: 'POST', body: JSON.stringify(contactForm) }); setContactSent(true); setContactForm({ name: '', email: '', message: '' }); } catch {} finally{ setContactLoading(false); } }, [ contactForm, slug ]); // Lightbox keyboard nav process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (lightbox === null) return; const handler = (e)=>{ if (e.key === 'Escape') setLightbox(null); if (e.key === 'ArrowRight') setLightbox((i)=>i !== null ? Math.min(i + 1, (profile?.portfolio?.length ?? 1) - 1) : null); if (e.key === 'ArrowLeft') setLightbox((i)=>i !== null ? Math.max(i - 1, 0) : null); }; document.addEventListener('keydown', handler); return ()=>document.removeEventListener('keydown', handler); }, [ lightbox, profile?.portfolio?.length ]); if (loading) return /*#__PURE__*/ _jsx("div", { className: "min-h-screen flex items-center justify-center", style: { background: 'var(--site-bg)' }, children: /*#__PURE__*/ _jsxs("div", { className: "relative w-12 h-12", children: [ /*#__PURE__*/ _jsx("div", { className: "absolute inset-0 rounded-full border-2 border-blue-500/20" }), /*#__PURE__*/ _jsx("div", { className: "absolute inset-0 rounded-full border-2 border-transparent border-t-blue-500 animate-spin" }) ] }) }); if (notFound || !profile) return /*#__PURE__*/ _jsxs("div", { className: "min-h-screen flex flex-col items-center justify-center gap-6", style: { background: 'var(--site-bg)' }, children: [ /*#__PURE__*/ _jsx("div", { className: "w-20 h-20 rounded-full flex items-center justify-center", style: { background: 'var(--site-surface)' }, children: /*#__PURE__*/ _jsx("svg", { className: "w-10 h-10 text-gray-500", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.182 16.318A4.486 4.486 0 0012.016 15a4.486 4.486 0 00-3.198 1.318M21 12a9 9 0 11-18 0 9 9 0 0118 0zM9.75 9.75c0 .414-.168.75-.375.75S9 10.164 9 9.75 9.168 9 9.375 9s.375.336.375.75zm-.375 0h.008v.015h-.008V9.75zm5.625 0c0 .414-.168.75-.375.75s-.375-.336-.375-.75.168-.75.375-.75.375.336.375.75zm-.375 0h.008v.015h-.008V9.75z" }) }) }), /*#__PURE__*/ _jsx("p", { className: "text-gray-400 text-lg", children: t('common.not_found', 'Страница не найдена') }), /*#__PURE__*/ _jsx("a", { href: "/", className: "text-blue-400 hover:text-blue-300 text-sm transition", children: t('nav.home', 'На главную') }) ] }); const initials = `${profile.firstName?.[0] ?? ''}${profile.lastName?.[0] ?? ''}`.toUpperCase() || profile.name?.[0]?.toUpperCase() || '?'; const displayName = [ profile.firstName, profile.lastName ].filter(Boolean).join(' ') || profile.name || ''; const memberYear = profile.memberSince ? new Date(profile.memberSince).getFullYear() : null; const hasStats = profile.completedTasks > 0 || profile.rating || profile.reviewCount && profile.reviewCount > 0; const isLight = profile.siteSettings?.siteTheme === 'light'; return /*#__PURE__*/ _jsxs("div", { className: `site-theme min-h-screen selection:bg-blue-500/30 ${isLight ? 'site-light' : ''}`, style: { background: 'var(--site-bg)', color: 'var(--site-text)' }, children: [ lightbox !== null && profile.portfolio?.[lightbox] && /*#__PURE__*/ _jsxs("div", { className: "fixed inset-0 z-50 bg-black/90 backdrop-blur-xl flex items-center justify-center p-4", onClick: ()=>setLightbox(null), children: [ /*#__PURE__*/ _jsx("button", { onClick: ()=>setLightbox(null), className: "absolute top-6 right-6 w-10 h-10 rounded-full bg-white/10 hover:bg-white/20 flex items-center justify-center transition", children: /*#__PURE__*/ _jsx("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" }) }) }), lightbox > 0 && /*#__PURE__*/ _jsx("button", { onClick: (e)=>{ e.stopPropagation(); setLightbox(lightbox - 1); }, className: "absolute left-4 top-1/2 -translate-y-1/2 w-10 h-10 rounded-full bg-white/10 hover:bg-white/20 flex items-center justify-center transition", children: /*#__PURE__*/ _jsx("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 19l-7-7 7-7" }) }) }), lightbox < (profile.portfolio?.length ?? 1) - 1 && /*#__PURE__*/ _jsx("button", { onClick: (e)=>{ e.stopPropagation(); setLightbox(lightbox + 1); }, className: "absolute right-4 top-1/2 -translate-y-1/2 w-10 h-10 rounded-full bg-white/10 hover:bg-white/20 flex items-center justify-center transition", children: /*#__PURE__*/ _jsx("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) }) }), /*#__PURE__*/ _jsx("img", { src: profile.portfolio[lightbox].imageUrl, alt: profile.portfolio[lightbox].title ?? '', className: "max-w-full max-h-[85vh] rounded-2xl object-contain", onClick: (e)=>e.stopPropagation() }), profile.portfolio[lightbox].title && /*#__PURE__*/ _jsx("div", { className: "absolute bottom-6 left-1/2 -translate-x-1/2 bg-black/60 backdrop-blur-md px-5 py-2.5 rounded-full text-sm", children: profile.portfolio[lightbox].title }) ] }), authModal && /*#__PURE__*/ _jsx("div", { className: "fixed inset-0 z-50 bg-black/70 backdrop-blur-sm flex items-center justify-center p-4", onClick: ()=>setAuthModal(false), children: /*#__PURE__*/ _jsxs("div", { className: "relative w-full max-w-sm rounded-2xl shadow-2xl p-6", style: { background: 'var(--site-modal-bg)', border: '1px solid var(--site-border)' }, onClick: (e)=>e.stopPropagation(), children: [ /*#__PURE__*/ _jsx("button", { type: "button", onClick: ()=>setAuthModal(false), className: "absolute top-4 right-4 w-8 h-8 rounded-full flex items-center justify-center transition", style: { background: 'var(--site-surface)', color: 'var(--site-text-muted)' }, children: /*#__PURE__*/ _jsx("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" }) }) }), /*#__PURE__*/ _jsx("div", { className: "w-12 h-12 rounded-full bg-blue-500/10 flex items-center justify-center mb-4", children: /*#__PURE__*/ _jsx("svg", { className: "w-6 h-6 text-blue-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8 10h.01M12 10h.01M16 10h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z" }) }) }), /*#__PURE__*/ _jsx("h3", { className: "text-base font-semibold mb-2", style: { color: 'var(--site-text)' }, children: t('site.auth_required_title', 'Нужна авторизация') }), /*#__PURE__*/ _jsx("p", { className: "text-sm mb-5", style: { color: 'var(--site-text-muted)' }, children: t('site.auth_required_desc', 'Чтобы написать в чат, необходимо войти в аккаунт CanHelp.') }), /*#__PURE__*/ _jsxs("div", { className: "flex flex-col gap-2.5", children: [ /*#__PURE__*/ _jsxs("a", { href: "/login", className: "w-full flex items-center justify-center gap-2 bg-blue-600 hover:bg-blue-500 text-white font-medium text-sm px-4 py-2.5 rounded-xl transition", children: [ /*#__PURE__*/ _jsx("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M11 16l-4-4m0 0l4-4m-4 4h14m-5 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h7a3 3 0 013 3v1" }) }), t('site.auth_login_btn', 'Войти в аккаунт') ] }), /*#__PURE__*/ _jsxs("button", { type: "button", onClick: ()=>{ setAuthModal(false); setTimeout(()=>{ document.getElementById('contact')?.scrollIntoView({ behavior: 'smooth', block: 'start' }); }, 100); }, className: "w-full flex items-center justify-center gap-2 text-sm font-medium px-4 py-2.5 rounded-xl transition", style: { background: 'var(--site-surface)', color: 'var(--site-text-secondary)', border: '1px solid var(--site-border)' }, children: [ /*#__PURE__*/ _jsx("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" }) }), t('site.auth_contact_form_btn', 'Написать через форму обратной связи') ] }) ] }) ] }) }), msgModal && /*#__PURE__*/ _jsx("div", { className: "fixed inset-0 z-50 bg-black/70 backdrop-blur-sm flex items-center justify-center p-4", onClick: ()=>{ if (!msgLoading) { setMsgModal(false); setMsgSent(false); } }, children: /*#__PURE__*/ _jsxs("div", { className: "relative w-full max-w-md rounded-2xl shadow-2xl", style: { background: 'var(--site-modal-bg)', border: '1px solid var(--site-border)' }, onClick: (e)=>e.stopPropagation(), children: [ /*#__PURE__*/ _jsx("button", { type: "button", onClick: ()=>{ setMsgModal(false); setMsgSent(false); }, className: "absolute top-4 right-4 w-8 h-8 rounded-full flex items-center justify-center transition", style: { background: 'var(--site-surface)', color: 'var(--site-text-muted)' }, children: /*#__PURE__*/ _jsx("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" }) }) }), /*#__PURE__*/ _jsxs("div", { className: "p-6", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-3 mb-5", children: [ /*#__PURE__*/ _jsx("div", { className: "w-10 h-10 rounded-full bg-blue-500/10 flex items-center justify-center", children: /*#__PURE__*/ _jsx("svg", { className: "w-5 h-5 text-blue-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8 10h.01M12 10h.01M16 10h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z" }) }) }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("h3", { className: "text-base font-semibold", style: { color: 'var(--site-text)' }, children: t('site.write_to_chat', 'Написать в чат') }), /*#__PURE__*/ _jsx("p", { className: "text-xs", style: { color: 'var(--site-text-muted)' }, children: displayName }) ] }) ] }), msgSent ? /*#__PURE__*/ _jsxs("div", { className: "text-center py-6", children: [ /*#__PURE__*/ _jsx("div", { className: "w-12 h-12 rounded-full bg-emerald-500/20 flex items-center justify-center mx-auto mb-3", children: /*#__PURE__*/ _jsx("svg", { className: "w-6 h-6 text-emerald-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 13l4 4L19 7" }) }) }), /*#__PURE__*/ _jsx("p", { className: "text-emerald-400 font-medium mb-1", children: t('site.message_sent', 'Сообщение отправлено!') }), /*#__PURE__*/ _jsx("p", { className: "text-sm mb-4", style: { color: 'var(--site-text-muted)' }, children: t('site.message_sent_desc', 'Специалист получит его в чате') }), /*#__PURE__*/ _jsx("button", { type: "button", onClick: ()=>{ setMsgModal(false); setMsgSent(false); }, className: "text-sm text-blue-400 hover:text-blue-300 transition", children: t('common.close', 'Закрыть') }) ] }) : /*#__PURE__*/ _jsxs("form", { onSubmit: handleSendMessage, children: [ /*#__PURE__*/ _jsx("textarea", { autoFocus: true, rows: 4, value: msgText, onChange: (e)=>setMsgText(e.target.value), className: "w-full rounded-xl px-4 py-3 text-sm focus:outline-none focus:border-blue-500/50 transition resize-none mb-4", style: { background: 'var(--site-input-bg)', border: '1px solid var(--site-input-border)', color: 'var(--site-input-text)' }, placeholder: t('site.message_placeholder', 'Напишите сообщение...') }), /*#__PURE__*/ _jsxs("div", { className: "flex items-center justify-end gap-3", children: [ /*#__PURE__*/ _jsx("button", { type: "button", onClick: ()=>setMsgModal(false), className: "text-sm transition px-4 py-2", style: { color: 'var(--site-text-muted)' }, children: t('common.cancel', 'Отмена') }), /*#__PURE__*/ _jsxs("button", { type: "submit", disabled: msgLoading || !msgText.trim(), className: "inline-flex items-center gap-2 bg-blue-600 hover:bg-blue-500 text-white font-medium text-sm px-5 py-2.5 rounded-xl transition disabled:opacity-50", children: [ msgLoading ? /*#__PURE__*/ _jsx("div", { className: "w-4 h-4 rounded-full border-2 border-white/30 border-t-white animate-spin" }) : /*#__PURE__*/ _jsx("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 19l9 2-9-18-9 18 9-2zm0 0v-8" }) }), t('site.contact_send', 'Отправить') ] }) ] }) ] }) ] }) ] }) }), /*#__PURE__*/ _jsx("nav", { className: "sticky top-0 z-40 backdrop-blur-xl", style: { background: 'var(--site-nav-bg)', borderBottom: '1px solid var(--site-border)' }, children: /*#__PURE__*/ _jsxs("div", { className: "max-w-5xl mx-auto px-4 sm:px-6 h-14 flex items-center justify-between", children: [ /*#__PURE__*/ _jsx("a", { href: "/", className: `logo-text-mini tracking-tight${scrolled ? ' scrolled' : ''}`, style: { color: 'var(--site-text-secondary)' }, children: "CanHelp" }), /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-2", children: [ profile?.rating && /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-1 text-xs mr-1", style: { color: 'var(--site-text-secondary)' }, children: [ /*#__PURE__*/ _jsx("svg", { className: "w-3.5 h-3.5 text-amber-400", fill: "currentColor", viewBox: "0 0 20 20", children: /*#__PURE__*/ _jsx("path", { d: "M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" }) }), /*#__PURE__*/ _jsx("span", { className: "font-medium", children: Number(profile.rating).toFixed(1) }) ] }), /*#__PURE__*/ _jsxs("div", { className: "relative", children: [ /*#__PURE__*/ _jsxs("button", { type: "button", onClick: ()=>setLangOpen(!langOpen), className: "flex items-center gap-1.5 text-xs transition px-2 py-1 rounded-lg", style: { color: 'var(--site-text-muted)' }, children: [ /*#__PURE__*/ _jsx("svg", { className: "w-3.5 h-3.5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3 5h12M9 3v2m1.048 9.5A18.022 18.022 0 016.412 9m6.088 9h7M11 21l5-10 5 10M12.751 5C11.783 10.77 8.07 15.61 3 18.129" }) }), SITE_LOCALES.find((l)=>l.code === locale)?.flag ?? '🌐' ] }), langOpen && /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsx("div", { className: "fixed inset-0 z-40", onClick: ()=>setLangOpen(false) }), /*#__PURE__*/ _jsx("div", { className: "absolute right-0 top-full mt-1 z-50 rounded-xl shadow-xl overflow-hidden min-w-[140px]", style: { background: 'var(--site-lang-dropdown)', border: '1px solid var(--site-border)' }, children: SITE_LOCALES.map((l)=>/*#__PURE__*/ _jsxs("button", { type: "button", onClick: ()=>{ setLocale(l.code); setLangOpen(false); }, className: `w-full flex items-center gap-2 px-3 py-2 text-xs transition ${locale === l.code ? 'text-blue-400 bg-blue-500/10' : ''}`, style: locale === l.code ? {} : { color: 'var(--site-text-secondary)' }, children: [ /*#__PURE__*/ _jsx("span", { children: l.flag }), /*#__PURE__*/ _jsx("span", { children: l.label }) ] }, l.code)) }) ] }) ] }), /*#__PURE__*/ _jsx("div", { className: "w-px h-4", style: { background: 'var(--site-divider)' } }), /*#__PURE__*/ _jsxs("button", { type: "button", onClick: async ()=>{ const url = window.location.href; if (navigator.share) { try { await navigator.share({ title: displayName, url }); } catch {} } else { navigator.clipboard.writeText(url); setLinkCopied(true); setTimeout(()=>setLinkCopied(false), 2000); } }, className: "flex items-center gap-1.5 text-xs transition", style: { color: 'var(--site-text-muted)' }, children: [ /*#__PURE__*/ _jsx("svg", { className: "w-3.5 h-3.5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.368 2.684 3 3 0 00-5.368-2.684z" }) }), linkCopied ? t('profile.site.copied') : t('site.share', 'Поделиться') ] }) ] }) ] }) }), /*#__PURE__*/ _jsxs("section", { className: "relative overflow-hidden", children: [ /*#__PURE__*/ _jsx("div", { className: "absolute top-0 left-1/4 w-[500px] h-[500px] bg-blue-600/10 rounded-full blur-[120px] pointer-events-none" }), /*#__PURE__*/ _jsx("div", { className: "absolute top-20 right-1/4 w-[400px] h-[400px] bg-purple-600/8 rounded-full blur-[100px] pointer-events-none" }), /*#__PURE__*/ _jsx("div", { className: "relative max-w-5xl mx-auto px-4 sm:px-6 pt-16 pb-20 sm:pt-24 sm:pb-28", children: /*#__PURE__*/ _jsxs("div", { className: "flex flex-col items-center text-center", children: [ /*#__PURE__*/ _jsxs("div", { className: "relative group mb-6", children: [ /*#__PURE__*/ _jsx("div", { className: "absolute -inset-1 bg-gradient-to-br from-blue-500 to-purple-500 rounded-full opacity-60 blur group-hover:opacity-80 transition-opacity" }), /*#__PURE__*/ _jsx("div", { className: "relative w-28 h-28 sm:w-32 sm:h-32 rounded-full overflow-hidden border-2 flex items-center justify-center text-4xl font-bold", style: { borderColor: 'var(--site-avatar-border)', background: 'var(--site-avatar-bg)', color: 'var(--site-text)' }, children: profile.image ? /*#__PURE__*/ _jsx("img", { src: profile.image, alt: displayName, className: "w-full h-full object-cover" }) : initials }), Array.isArray(profile.activeStatuses) && profile.activeStatuses.includes('canhelp_now') && /*#__PURE__*/ _jsx("div", { className: "absolute bottom-1 right-1 w-5 h-5 bg-emerald-500 rounded-full border-2 flex items-center justify-center", style: { borderColor: 'var(--site-status-border-color)' }, children: /*#__PURE__*/ _jsx("span", { className: "w-2 h-2 rounded-full bg-white animate-pulse" }) }) ] }), /*#__PURE__*/ _jsx("h1", { className: "text-3xl sm:text-5xl font-bold tracking-tight bg-clip-text text-transparent mb-3 pb-1", style: { backgroundImage: 'linear-gradient(to bottom, var(--site-name-from), var(--site-name-to))' }, children: displayName }), /*#__PURE__*/ _jsxs("div", { className: "flex items-center justify-center gap-2 flex-wrap mb-4", children: [ profile.planTier && profile.planTier !== 'free' && /*#__PURE__*/ _jsx(PlanBadge, { tier: profile.planTier, verified: profile.hasVerifiedBadge, size: "md" }), Array.isArray(profile.activeStatuses) && profile.activeStatuses.includes('canhelp_now') && /*#__PURE__*/ _jsxs("span", { className: "inline-flex items-center gap-1.5 text-xs font-medium text-emerald-400 bg-emerald-500/10 border border-emerald-500/20 px-3 py-1.5 rounded-full", children: [ /*#__PURE__*/ _jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-emerald-400 animate-pulse" }), t('status.can_help_now', 'Готов помочь') ] }), memberYear && /*#__PURE__*/ _jsxs("span", { className: "text-xs px-3 py-1.5 rounded-full", style: { color: 'var(--site-text-muted)', background: 'var(--site-surface)' }, children: [ t('site.member_since', 'С нами с'), " ", memberYear ] }) ] }), profile.bio && /*#__PURE__*/ _jsx("p", { className: "max-w-xl text-base sm:text-lg leading-relaxed mb-8", style: { color: 'var(--site-text-secondary)' }, children: profile.bio }), /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-3 flex-wrap justify-center", children: [ /*#__PURE__*/ _jsxs("button", { onClick: handleMessage, disabled: msgLoading, className: "group inline-flex items-center gap-2.5 bg-blue-600 hover:bg-blue-500 text-white font-semibold px-7 py-3.5 rounded-full transition-all hover:shadow-lg hover:shadow-blue-500/25 disabled:opacity-50", children: [ /*#__PURE__*/ _jsx("svg", { className: "w-5 h-5 group-hover:scale-110 transition-transform", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8 10h.01M12 10h.01M16 10h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z" }) }), t('site.write_to_chat', 'Написать в чат') ] }), profile.phone && /*#__PURE__*/ _jsxs("a", { href: `tel:${profile.phone}`, className: "group inline-flex items-center gap-2.5 border font-medium px-7 py-3.5 rounded-full transition-all", style: { background: 'var(--site-phone-bg)', borderColor: 'var(--site-phone-border)', color: 'var(--site-phone-text)' }, children: [ /*#__PURE__*/ _jsx("svg", { className: "w-5 h-5 group-hover:scale-110 transition-transform", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z" }) }), profile.phone ] }) ] }) ] }) }) ] }), hasStats && /*#__PURE__*/ _jsx("section", { className: "border-y", style: { borderColor: 'var(--site-border)', background: 'var(--site-surface)' }, children: /*#__PURE__*/ _jsx("div", { className: "max-w-5xl mx-auto px-4 sm:px-6 py-8", children: /*#__PURE__*/ _jsxs("div", { className: "grid grid-cols-2 sm:grid-cols-4 gap-6", children: [ profile.rating && /*#__PURE__*/ _jsxs("div", { className: "text-center", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center justify-center gap-1 mb-1", children: [ /*#__PURE__*/ _jsx("svg", { className: "w-5 h-5 text-amber-400", fill: "currentColor", viewBox: "0 0 20 20", children: /*#__PURE__*/ _jsx("path", { d: "M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" }) }), /*#__PURE__*/ _jsx("span", { className: "text-2xl font-bold", children: Number(profile.rating).toFixed(1) }) ] }), /*#__PURE__*/ _jsx("p", { className: "text-xs uppercase tracking-wider", style: { color: 'var(--site-text-muted)' }, children: t('site.rating', 'Рейтинг') }) ] }), profile.reviewCount > 0 && /*#__PURE__*/ _jsxs("div", { className: "text-center", children: [ /*#__PURE__*/ _jsx("p", { className: "text-2xl font-bold mb-1", children: profile.reviewCount }), /*#__PURE__*/ _jsx("p", { className: "text-xs uppercase tracking-wider", style: { color: 'var(--site-text-muted)' }, children: t('profile.reviews') }) ] }), profile.completedTasks > 0 && /*#__PURE__*/ _jsxs("div", { className: "text-center", children: [ /*#__PURE__*/ _jsx("p", { className: "text-2xl font-bold mb-1", children: profile.completedTasks }), /*#__PURE__*/ _jsx("p", { className: "text-xs uppercase tracking-wider", style: { color: 'var(--site-text-muted)' }, children: t('site.completed_tasks', 'Выполнено') }) ] }), Array.isArray(profile.languages) && profile.languages.length > 0 && /*#__PURE__*/ _jsxs("div", { className: "text-center", children: [ /*#__PURE__*/ _jsx("p", { className: "text-2xl font-bold mb-1", children: profile.languages.length }), /*#__PURE__*/ _jsx("p", { className: "text-xs uppercase tracking-wider", style: { color: 'var(--site-text-muted)' }, children: t('site.languages', 'Языков') }) ] }) ] }) }) }), Array.isArray(profile.languages) && profile.languages.length > 0 && /*#__PURE__*/ _jsxs("section", { className: "max-w-5xl mx-auto px-4 sm:px-6 pt-10", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-3 mb-3", children: [ /*#__PURE__*/ _jsx("svg", { className: "w-4 h-4 shrink-0", style: { color: 'var(--site-text-muted)' }, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3 5h12M9 3v2m1.048 9.5A18.022 18.022 0 016.412 9m6.088 9h7M11 21l5-10 5 10M12.751 5C11.783 10.77 8.07 15.61 3 18.129" }) }), /*#__PURE__*/ _jsx("span", { className: "text-sm", style: { color: 'var(--site-text-muted)' }, children: t('site.speaks_languages', 'Говорит на языках') }) ] }), /*#__PURE__*/ _jsx("div", { className: "flex items-center gap-2 flex-wrap", children: profile.languages.map((lang)=>{ const info = LANG_MAP[lang]; return /*#__PURE__*/ _jsx("span", { className: "text-xs px-3 py-1.5 rounded-full flex items-center gap-1.5", style: { color: 'var(--site-tag-text)', background: 'var(--site-tag-bg)', border: '1px solid var(--site-tag-border)' }, children: info ? /*#__PURE__*/ _jsxs(_Fragment, { children: [ info.flag, " ", info.label ] }) : lang }, lang); }) }) ] }), /*#__PURE__*/ _jsxs("div", { className: "max-w-5xl mx-auto px-4 sm:px-6 pb-20 space-y-16 mt-10", children: [ Array.isArray(profile.cards) && profile.cards.length > 0 && /*#__PURE__*/ _jsxs("section", { children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-3 mb-6", children: [ /*#__PURE__*/ _jsx("div", { className: "w-8 h-8 rounded-lg bg-blue-500/10 flex items-center justify-center", children: /*#__PURE__*/ _jsx("svg", { className: "w-4 h-4 text-blue-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M21 13.255A23.931 23.931 0 0112 15c-3.183 0-6.22-.62-9-1.745M16 6V4a2 2 0 00-2-2h-4a2 2 0 00-2 2v2m4 6h.01M5 20h14a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" }) }) }), /*#__PURE__*/ _jsx("h2", { className: "text-xl font-bold", children: t('specialist.services', 'Услуги') }) ] }), /*#__PURE__*/ _jsx("div", { className: "grid gap-4 sm:grid-cols-2", children: profile.cards.map((card)=>{ // Group locations by parent const grouped = {}; if (Array.isArray(card.locations)) { for (const slug of card.locations){ const parent = locParentMap[slug]; if (parent) { if (!grouped[parent]) grouped[parent] = []; grouped[parent].push(locMap[slug] || slug); } else { const name = locMap[slug] || slug; if (!grouped[name]) grouped[name] = []; } } } return /*#__PURE__*/ _jsxs("div", { className: "group relative rounded-2xl p-6 transition-all", style: { background: 'var(--site-card-bg)', border: '1px solid var(--site-card-border)' }, children: [ /*#__PURE__*/ _jsx("h3", { className: "font-semibold mb-2", style: { color: 'var(--site-text)' }, children: card.title }), card.description && /*#__PURE__*/ _jsx("p", { className: "text-sm leading-relaxed mb-3", style: { color: 'var(--site-text-muted)' }, children: card.description }), Array.isArray(card.categories) && card.categories.length > 0 && /*#__PURE__*/ _jsx("div", { className: "flex flex-wrap gap-1.5 mb-3", children: card.categories.map((slug)=>/*#__PURE__*/ _jsx("span", { className: "text-[11px] px-2.5 py-1 rounded-full bg-purple-500/10 text-purple-400 border border-purple-500/10", children: catMap[slug] || slug }, slug)) }), Object.keys(grouped).length > 0 && /*#__PURE__*/ _jsx("div", { className: "mb-3 space-y-1", children: Object.entries(grouped).map(([parent, children])=>/*#__PURE__*/ _jsxs("div", { className: "flex items-start gap-1.5 text-xs", style: { color: 'var(--site-text-muted)' }, children: [ /*#__PURE__*/ _jsxs("svg", { className: "w-3.5 h-3.5 shrink-0 mt-0.5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: [ /*#__PURE__*/ _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" }), /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 11a3 3 0 11-6 0 3 3 0 016 0z" }) ] }), /*#__PURE__*/ _jsxs("span", { children: [ /*#__PURE__*/ _jsx("span", { className: "font-medium", style: { color: 'var(--site-text-secondary)' }, children: parent }), children.length > 0 && /*#__PURE__*/ _jsxs("span", { style: { color: 'var(--site-text-hint)' }, children: [ " — ", children.join(', ') ] }) ] }) ] }, parent)) }), Array.isArray(card.skills) && card.skills.length > 0 && /*#__PURE__*/ _jsx("div", { className: "flex flex-wrap gap-1.5", children: card.skills.map((s)=>/*#__PURE__*/ _jsx("span", { className: "text-[11px] px-2.5 py-1 rounded-full bg-blue-500/10 text-blue-400 border border-blue-500/10", children: s }, s)) }) ] }, card.id); }) }) ] }), Array.isArray(profile.portfolio) && profile.portfolio.length > 0 && /*#__PURE__*/ _jsxs("section", { children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-3 mb-6", children: [ /*#__PURE__*/ _jsx("div", { className: "w-8 h-8 rounded-lg bg-purple-500/10 flex items-center justify-center", children: /*#__PURE__*/ _jsx("svg", { className: "w-4 h-4 text-purple-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z" }) }) }), /*#__PURE__*/ _jsx("h2", { className: "text-xl font-bold", children: t('portfolio.title', 'Портфолио') }), /*#__PURE__*/ _jsxs("span", { className: "text-xs ml-auto", style: { color: 'var(--site-text-hint)' }, children: [ profile.portfolio.length, " ", t('site.photos', 'фото') ] }) ] }), /*#__PURE__*/ _jsx("div", { className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-3", children: profile.portfolio.map((item, idx)=>/*#__PURE__*/ _jsxs("button", { onClick: ()=>item.imageUrl && setLightbox(idx), className: "group relative aspect-square rounded-xl overflow-hidden transition-all", style: { background: 'var(--site-surface)', border: '1px solid var(--site-card-border)' }, children: [ item.imageUrl && /*#__PURE__*/ _jsx("img", { src: item.imageUrl, alt: item.title ?? '', className: "w-full h-full object-cover group-hover:scale-105 transition-transform duration-500" }), /*#__PURE__*/ _jsx("div", { className: "absolute inset-0 bg-gradient-to-t from-black/60 via-transparent to-transparent opacity-0 group-hover:opacity-100 transition-opacity flex items-end p-3", children: item.title && /*#__PURE__*/ _jsx("p", { className: "text-xs font-medium text-white truncate", children: item.title }) }), /*#__PURE__*/ _jsx("div", { className: "absolute top-2 right-2 w-7 h-7 rounded-full bg-black/40 backdrop-blur-md flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity", children: /*#__PURE__*/ _jsx("svg", { className: "w-3.5 h-3.5 text-white/80", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM10 7v3m0 0v3m0-3h3m-3 0H7" }) }) }) ] }, item.id)) }) ] }), Array.isArray(profile.reviews) && profile.reviews.length > 0 && /*#__PURE__*/ _jsxs("section", { children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-3 mb-6", children: [ /*#__PURE__*/ _jsx("div", { className: "w-8 h-8 rounded-lg bg-amber-500/10 flex items-center justify-center", children: /*#__PURE__*/ _jsx("svg", { className: "w-4 h-4 text-amber-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z" }) }) }), /*#__PURE__*/ _jsx("h2", { className: "text-xl font-bold", children: t('profile.reviews') }), /*#__PURE__*/ _jsx("span", { className: "text-xs ml-auto", style: { color: 'var(--site-text-hint)' }, children: profile.reviewCount }) ] }), /*#__PURE__*/ _jsx("div", { className: "space-y-3", children: profile.reviews.slice(0, 6).map((review)=>{ const authorName = [ review.authorFirstName, review.authorLastName ].filter(Boolean).join(' ') || review.authorName || null; return /*#__PURE__*/ _jsxs("div", { className: "rounded-2xl p-5", style: { background: 'var(--site-card-bg)', border: '1px solid var(--site-card-border)' }, children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-start gap-3 mb-3", children: [ /*#__PURE__*/ _jsx("div", { className: "w-9 h-9 rounded-full flex items-center justify-center text-xs font-bold overflow-hidden shrink-0", style: { background: 'var(--site-surface)', color: 'var(--site-text-muted)' }, children: review.authorImage ? /*#__PURE__*/ _jsx("img", { src: review.authorImage, alt: "", className: "w-full h-full object-cover" }) : (review.authorFirstName?.[0] ?? review.authorName?.[0] ?? '?').toUpperCase() }), /*#__PURE__*/ _jsxs("div", { className: "flex-1 min-w-0", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center justify-between gap-2", children: [ /*#__PURE__*/ _jsx("p", { className: "text-sm font-medium", style: { color: 'var(--site-text-secondary)' }, children: authorName ?? t('common.anonymous', 'Анонимно') }), /*#__PURE__*/ _jsx("span", { className: "shrink-0 text-[11px]", style: { color: 'var(--site-text-hint)' }, children: new Date(review.createdAt).toLocaleDateString(dateLocale) }) ] }), /*#__PURE__*/ _jsx("div", { className: "flex gap-0.5 mt-0.5", children: Array.from({ length: 5 }).map((_, i)=>/*#__PURE__*/ _jsx("svg", { className: `w-3.5 h-3.5 ${i < Math.round(review.rating) ? 'text-amber-400' : ''}`, style: i < Math.round(review.rating) ? {} : { color: 'var(--site-border)' }, fill: "currentColor", viewBox: "0 0 20 20", children: /*#__PURE__*/ _jsx("path", { d: "M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" }) }, i)) }) ] }) ] }), review.comment && /*#__PURE__*/ _jsx("p", { className: "text-sm leading-relaxed pl-12", style: { color: 'var(--site-text-muted)' }, children: review.comment }) ] }, review.id); }) }) ] }), /*#__PURE__*/ _jsxs("section", { id: "contact", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-3 mb-6", children: [ /*#__PURE__*/ _jsx("div", { className: "w-8 h-8 rounded-lg bg-emerald-500/10 flex items-center justify-center", children: /*#__PURE__*/ _jsx("svg", { className: "w-4 h-4 text-emerald-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" }) }) }), /*#__PURE__*/ _jsx("h2", { className: "text-xl font-bold", children: t('site.contact_form', 'Связаться') }) ] }), contactSent ? /*#__PURE__*/ _jsxs("div", { className: "bg-emerald-500/10 border border-emerald-500/20 rounded-2xl p-8 text-center", children: [ /*#__PURE__*/ _jsx("div", { className: "w-12 h-12 rounded-full bg-emerald-500/20 flex items-center justify-center mx-auto mb-3", children: /*#__PURE__*/ _jsx("svg", { className: "w-6 h-6 text-emerald-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 13l4 4L19 7" }) }) }), /*#__PURE__*/ _jsx("p", { className: "text-emerald-400 font-medium", children: t('site.contact_sent', 'Сообщение отправлено!') }), /*#__PURE__*/ _jsx("p", { className: "text-sm mt-1", style: { color: 'var(--site-text-muted)' }, children: t('site.contact_sent_desc', 'Специалист свяжется с вами в ближайшее время') }) ] }) : /*#__PURE__*/ _jsxs("form", { onSubmit: handleContactSubmit, className: "rounded-2xl p-6 space-y-4", style: { background: 'var(--site-card-bg)', border: '1px solid var(--site-card-border)' }, children: [ /*#__PURE__*/ _jsxs("div", { className: "grid gap-4 sm:grid-cols-2", children: [ /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsxs("label", { className: "text-xs uppercase tracking-wider mb-1.5 block", style: { color: 'var(--site-text-muted)' }, children: [ t('site.contact_name', 'Имя'), " *" ] }), /*#__PURE__*/ _jsx("input", { type: "text", required: true, value: contactForm.name, onChange: (e)=>setContactForm((f)=>({ ...f, name: e.target.value })), className: "w-full rounded-xl px-4 py-3 text-sm focus:outline-none focus:border-blue-500/50 transition", style: { background: 'var(--site-input-bg)', border: '1px solid var(--site-input-border)', color: 'var(--site-input-text)' }, placeholder: t('site.contact_name_ph', 'Ваше имя') }) ] }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("label", { className: "text-xs uppercase tracking-wider mb-1.5 block", style: { color: 'var(--site-text-muted)' }, children: "Email" }), /*#__PURE__*/ _jsx("input", { type: "email", value: contactForm.email, onChange: (e)=>setContactForm((f)=>({ ...f, email: e.target.value })), className: "w-full rounded-xl px-4 py-3 text-sm focus:outline-none focus:border-blue-500/50 transition", style: { background: 'var(--site-input-bg)', border: '1px solid var(--site-input-border)', color: 'var(--site-input-text)' }, placeholder: t('site.contact_email_ph', 'your@email.com') }) ] }) ] }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsxs("label", { className: "text-xs uppercase tracking-wider mb-1.5 block", style: { color: 'var(--site-text-muted)' }, children: [ t('site.contact_message', 'Сообщение'), " *" ] }), /*#__PURE__*/ _jsx("textarea", { required: true, rows: 4, value: contactForm.message, onChange: (e)=>setContactForm((f)=>({ ...f, message: e.target.value })), className: "w-full rounded-xl px-4 py-3 text-sm focus:outline-none focus:border-blue-500/50 transition resize-none", style: { background: 'var(--site-input-bg)', border: '1px solid var(--site-input-border)', color: 'var(--site-input-text)' }, placeholder: t('site.contact_message_ph', 'Опишите вашу задачу...') }) ] }), /*#__PURE__*/ _jsxs("button", { type: "submit", disabled: contactLoading, className: "inline-flex items-center gap-2 bg-blue-600 hover:bg-blue-500 text-white font-medium px-6 py-3 rounded-xl transition disabled:opacity-50", children: [ contactLoading ? /*#__PURE__*/ _jsx("div", { className: "w-4 h-4 rounded-full border-2 border-white/30 border-t-white animate-spin" }) : /*#__PURE__*/ _jsx("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 19l9 2-9-18-9 18 9-2zm0 0v-8" }) }), t('site.contact_send', 'Отправить') ] }) ] }) ] }), /*#__PURE__*/ _jsx("footer", { className: "border-t pt-8 pb-4", style: { borderColor: 'var(--site-border)' }, children: /*#__PURE__*/ _jsxs("div", { className: "flex items-center justify-between text-xs", style: { color: 'var(--site-footer-text)' }, children: [ /*#__PURE__*/ _jsx("a", { href: "/", className: "transition", children: "CanHelp.gr" }), /*#__PURE__*/ _jsxs("p", { children: [ "\xa9 ", new Date().getFullYear() ] }) ] }) }) ] }), /*#__PURE__*/ _jsx("button", { onClick: ()=>window.scrollTo({ top: 0, behavior: 'smooth' }), className: `fixed bottom-6 right-6 z-50 w-10 h-10 rounded-full flex items-center justify-center backdrop-blur-sm transition-all duration-300 ${scrolled ? 'opacity-100 translate-y-0' : 'opacity-0 translate-y-4 pointer-events-none'}`, style: { background: 'var(--site-scroll-btn-bg)', border: '1px solid var(--site-scroll-btn-border)', color: 'var(--site-scroll-btn-text)' }, "aria-label": "Scroll to top", children: /*#__PURE__*/ _jsx("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 15l7-7 7 7" }) }) }) ] }); } @`=_24[]-ai@Gt{_"U\ AHv}AHov{9 A l _ *2dp~iohpWZE_HWZ!!2"5"G%K%&&|''(())++,,--)/,/0011334_45566S8V8K:N:;;<<==>>@@+B.BCCYD]DEEOGRGII:N_=NOORRT"TUUXX^YaYZZ;[?[[\\\^^``PaSaWcZceef_flgog%i(ijj l lmmipmp q#quuuuxxzz{{}}%(?C_IM^bSVruؖܖš_UXBFʩͩy|#'٬ݬĮǮ:= Դ״_!%(*2ú ½ wzhl25 _=A~beim _ ;>RUTW/35='+DGz_}9=   j n   (,]ai_l^b  ""##O&R&''))++P,S,--..003_33344l5o5 7799::<<>>w@{@^AaACCEEFFGGrJuJM_MOOQQUU2X6XXXrYuY (/* binding */ PersonalSitePage) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(78157); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31768); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var next_navigation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(71159); /* harmony import */ var _context_locale__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(96484); /* harmony import */ var _lib_auth__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(13260); /* harmony import */ var _lib_api__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(91864); /* harmony import */ var _components_PlanBadge__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(25701); /* __next_internal_client_entry_do_not_use__ default auto */ function PersonalSitePage() { const { slug } = (0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useParams)(); const { t, locale, setLocale } = (0,_context_locale__WEBPACK_IMPORTED_MODULE_3__/* .useLocale */ .Y)(); const { data: session } = (0,_lib_auth__WEBPACK_IMPORTED_MODULE_4__/* .useSession */ .wV)(); const router = (0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useRouter)(); const [profile, setProfile] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null); const [loading, setLoading] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(true); const [notFound, setNotFound] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [msgLoading, setMsgLoading] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [linkCopied, setLinkCopied] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [lightbox, setLightbox] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null); const [contactSent, setContactSent] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [contactForm, setContactForm] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)({ name: '', email: '', message: '' }); const [contactLoading, setContactLoading] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [langOpen, setLangOpen] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [msgModal, setMsgModal] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [authModal, setAuthModal] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [msgText, setMsgText] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''); const [msgSent, setMsgSent] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [catMap, setCatMap] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)({}); const [locMap, setLocMap] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)({}); const [locParentMap, setLocParentMap] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)({}); const [scrolled, setScrolled] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const dateLocale = locale === 'ru' ? 'ru-RU' : locale === 'en' ? 'en-US' : 'el-GR'; process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{ const onScroll = ()=>setScrolled(window.scrollY > 100); window.addEventListener('scroll', onScroll, { passive: true }); return ()=>window.removeEventListener('scroll', onScroll); }, []); const LANG_MAP = { el: { flag: '🇬🇷', label: 'Ελληνικά' }, en: { flag: '🇬🇧', label: 'English' }, ru: { flag: '🇷🇺', label: 'Русский' }, uk: { flag: '🇺🇦', label: 'Українська' }, de: { flag: '🇩🇪', label: 'Deutsch' }, fr: { flag: '🇫🇷', label: 'Français' }, it: { flag: '🇮🇹', label: 'Italiano' }, es: { flag: '🇪🇸', label: 'Español' }, ar: { flag: '🇸🇦', label: 'العربية' }, zh: { flag: '🇨🇳', label: '中文' } }; const SITE_LOCALES = [ { code: 'el', flag: '🇬🇷', label: 'Ελληνικά' }, { code: 'en', flag: '🇬🇧', label: 'English' }, { code: 'ru', flag: '🇷🇺', label: 'Русский' } ]; process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{ if (!slug) return; (0,_lib_api__WEBPACK_IMPORTED_MODULE_6__/* .getPublicSiteProfile */ .S$)(slug).then(setProfile).catch(()=>setNotFound(true)).finally(()=>setLoading(false)); }, [ slug ]); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{ const catLocale = locale; (0,_lib_api__WEBPACK_IMPORTED_MODULE_6__/* .getCategories */ .bW)().then((cats)=>{ const m = {}; for (const c of cats){ m[c.slug] = c.names[catLocale] ?? c.names.el; for (const sub of c.children ?? []){ m[sub.slug] = sub.names[catLocale] ?? sub.names.el; } } setCatMap(m); }).catch(()=>{}); (0,_lib_api__WEBPACK_IMPORTED_MODULE_6__/* .getLocations */ .Vs)().then((locs)=>{ const m = {}; const pm = {}; for (const loc of locs){ const parentName = loc.names?.[catLocale] ?? loc.names?.el ?? loc.slug; m[loc.slug] = parentName; for (const child of loc.children ?? []){ m[child.slug] = child.names?.[catLocale] ?? child.names?.el ?? child.slug; pm[child.slug] = parentName; } } setLocMap(m); setLocParentMap(pm); }).catch(()=>{}); }, [ locale ]); function handleMessage() { if (!session) { setAuthModal(true); return; } setMsgModal(true); } async function handleSendMessage(e) { e.preventDefault(); if (!msgText.trim()) return; setMsgLoading(true); try { const { room } = await (0,_lib_api__WEBPACK_IMPORTED_MODULE_6__/* .getOrCreateDirectRoom */ .QN)(profile.id); await (0,_lib_api__WEBPACK_IMPORTED_MODULE_6__/* .sendMessage */ ._z)(room.id, msgText.trim()); (0,_lib_api__WEBPACK_IMPORTED_MODULE_6__/* .trackSiteMessage */ .UE)(slug); setMsgSent(true); setMsgText(''); } catch {} finally{ setMsgLoading(false); } } const handleContactSubmit = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(async (e)=>{ e.preventDefault(); if (!contactForm.name.trim() || !contactForm.message.trim()) return; setContactLoading(true); try { await (0,_lib_api__WEBPACK_IMPORTED_MODULE_6__/* .request */ .Em)(`/users/site/${slug}/contact`, { method: 'POST', body: JSON.stringify(contactForm) }); setContactSent(true); setContactForm({ name: '', email: '', message: '' }); } catch {} finally{ setContactLoading(false); } }, [ contactForm, slug ]); // Lightbox keyboard nav process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{ if (lightbox === null) return; const handler = (e)=>{ if (e.key === 'Escape') setLightbox(null); if (e.key === 'ArrowRight') setLightbox((i)=>i !== null ? Math.min(i + 1, (profile?.portfolio?.length ?? 1) - 1) : null); if (e.key === 'ArrowLeft') setLightbox((i)=>i !== null ? Math.max(i - 1, 0) : null); }; document.addEventListener('keydown', handler); return ()=>document.removeEventListener('keydown', handler); }, [ lightbox, profile?.portfolio?.length ]); if (loading) return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "min-h-screen flex items-center justify-center", style: { background: 'var(--site-bg)' }, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "relative w-12 h-12", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "absolute inset-0 rounded-full border-2 border-blue-500/20" }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "absolute inset-0 rounded-full border-2 border-transparent border-t-blue-500 animate-spin" }) ] }) }); if (notFound || !profile) return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "min-h-screen flex flex-col items-center justify-center gap-6", style: { background: 'var(--site-bg)' }, children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "w-20 h-20 rounded-full flex items-center justify-center", style: { background: 'var(--site-surface)' }, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", { className: "w-10 h-10 text-gray-500", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.182 16.318A4.486 4.486 0 0012.016 15a4.486 4.486 0 00-3.198 1.318M21 12a9 9 0 11-18 0 9 9 0 0118 0zM9.75 9.75c0 .414-.168.75-.375.75S9 10.164 9 9.75 9.168 9 9.375 9s.375.336.375.75zm-.375 0h.008v.015h-.008V9.75zm5.625 0c0 .414-.168.75-.375.75s-.375-.336-.375-.75.168-.75.375-.75.375.336.375.75zm-.375 0h.008v.015h-.008V9.75z" }) }) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-gray-400 text-lg", children: t('common.not_found', 'Страница не найдена') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("a", { href: "/", className: "text-blue-400 hover:text-blue-300 text-sm transition", children: t('nav.home', 'На главную') }) ] }); const initials = `${profile.firstName?.[0] ?? ''}${profile.lastName?.[0] ?? ''}`.toUpperCase() || profile.name?.[0]?.toUpperCase() || '?'; const displayName = [ profile.firstName, profile.lastName ].filter(Boolean).join(' ') || profile.name || ''; const memberYear = profile.memberSince ? new Date(profile.memberSince).getFullYear() : null; const hasStats = profile.completedTasks > 0 || profile.rating || profile.reviewCount && profile.reviewCount > 0; const isLight = profile.siteSettings?.siteTheme === 'light'; return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: `site-theme min-h-screen selection:bg-blue-500/30 ${isLight ? 'site-light' : ''}`, style: { background: 'var(--site-bg)', color: 'var(--site-text)' }, children: [ lightbox !== null && profile.portfolio?.[lightbox] && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "fixed inset-0 z-50 bg-black/90 backdrop-blur-xl flex items-center justify-center p-4", onClick: ()=>setLightbox(null), children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { onClick: ()=>setLightbox(null), className: "absolute top-6 right-6 w-10 h-10 rounded-full bg-white/10 hover:bg-white/20 flex items-center justify-center transition", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" }) }) }), lightbox > 0 && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { onClick: (e)=>{ e.stopPropagation(); setLightbox(lightbox - 1); }, className: "absolute left-4 top-1/2 -translate-y-1/2 w-10 h-10 rounded-full bg-white/10 hover:bg-white/20 flex items-center justify-center transition", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 19l-7-7 7-7" }) }) }), lightbox < (profile.portfolio?.length ?? 1) - 1 && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { onClick: (e)=>{ e.stopPropagation(); setLightbox(lightbox + 1); }, className: "absolute right-4 top-1/2 -translate-y-1/2 w-10 h-10 rounded-full bg-white/10 hover:bg-white/20 flex items-center justify-center transition", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) }) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("img", { src: profile.portfolio[lightbox].imageUrl, alt: profile.portfolio[lightbox].title ?? '', className: "max-w-full max-h-[85vh] rounded-2xl object-contain", onClick: (e)=>e.stopPropagation() }), profile.portfolio[lightbox].title && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "absolute bottom-6 left-1/2 -translate-x-1/2 bg-black/60 backdrop-blur-md px-5 py-2.5 rounded-full text-sm", children: profile.portfolio[lightbox].title }) ] }), authModal && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "fixed inset-0 z-50 bg-black/70 backdrop-blur-sm flex items-center justify-center p-4", onClick: ()=>setAuthModal(false), children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "relative w-full max-w-sm rounded-2xl shadow-2xl p-6", style: { background: 'var(--site-modal-bg)', border: '1px solid var(--site-border)' }, onClick: (e)=>e.stopPropagation(), children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { type: "button", onClick: ()=>setAuthModal(false), className: "absolute top-4 right-4 w-8 h-8 rounded-full flex items-center justify-center transition", style: { background: 'var(--site-surface)', color: 'var(--site-text-muted)' }, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" }) }) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "w-12 h-12 rounded-full bg-blue-500/10 flex items-center justify-center mb-4", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", { className: "w-6 h-6 text-blue-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8 10h.01M12 10h.01M16 10h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z" }) }) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h3", { className: "text-base font-semibold mb-2", style: { color: 'var(--site-text)' }, children: t('site.auth_required_title', 'Нужна авторизация') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-sm mb-5", style: { color: 'var(--site-text-muted)' }, children: t('site.auth_required_desc', 'Чтобы написать в чат, необходимо войти в аккаунт CanHelp.') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "flex flex-col gap-2.5", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("a", { href: "/login", className: "w-full flex items-center justify-center gap-2 bg-blue-600 hover:bg-blue-500 text-white font-medium text-sm px-4 py-2.5 rounded-xl transition", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M11 16l-4-4m0 0l4-4m-4 4h14m-5 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h7a3 3 0 013 3v1" }) }), t('site.auth_login_btn', 'Войти в аккаунт') ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("button", { type: "button", onClick: ()=>{ setAuthModal(false); setTimeout(()=>{ document.getElementById('contact')?.scrollIntoView({ behavior: 'smooth', block: 'start' }); }, 100); }, className: "w-full flex items-center justify-center gap-2 text-sm font-medium px-4 py-2.5 rounded-xl transition", style: { background: 'var(--site-surface)', color: 'var(--site-text-secondary)', border: '1px solid var(--site-border)' }, children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" }) }), t('site.auth_contact_form_btn', 'Написать через форму обратной связи') ] }) ] }) ] }) }), msgModal && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "fixed inset-0 z-50 bg-black/70 backdrop-blur-sm flex items-center justify-center p-4", onClick: ()=>{ if (!msgLoading) { setMsgModal(false); setMsgSent(false); } }, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "relative w-full max-w-md rounded-2xl shadow-2xl", style: { background: 'var(--site-modal-bg)', border: '1px solid var(--site-border)' }, onClick: (e)=>e.stopPropagation(), children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { type: "button", onClick: ()=>{ setMsgModal(false); setMsgSent(false); }, className: "absolute top-4 right-4 w-8 h-8 rounded-full flex items-center justify-center transition", style: { background: 'var(--site-surface)', color: 'var(--site-text-muted)' }, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" }) }) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "p-6", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "flex items-center gap-3 mb-5", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "w-10 h-10 rounded-full bg-blue-500/10 flex items-center justify-center", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", { className: "w-5 h-5 text-blue-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8 10h.01M12 10h.01M16 10h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z" }) }) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h3", { className: "text-base font-semibold", style: { color: 'var(--site-text)' }, children: t('site.write_to_chat', 'Написать в чат') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-xs", style: { color: 'var(--site-text-muted)' }, children: displayName }) ] }) ] }), msgSent ? /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "text-center py-6", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "w-12 h-12 rounded-full bg-emerald-500/20 flex items-center justify-center mx-auto mb-3", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", { className: "w-6 h-6 text-emerald-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 13l4 4L19 7" }) }) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-emerald-400 font-medium mb-1", children: t('site.message_sent', 'Сообщение отправлено!') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-sm mb-4", style: { color: 'var(--site-text-muted)' }, children: t('site.message_sent_desc', 'Специалист получит его в чате') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { type: "button", onClick: ()=>{ setMsgModal(false); setMsgSent(false); }, className: "text-sm text-blue-400 hover:text-blue-300 transition", children: t('common.close', 'Закрыть') }) ] }) : /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("form", { onSubmit: handleSendMessage, children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("textarea", { autoFocus: true, rows: 4, value: msgText, onChange: (e)=>setMsgText(e.target.value), className: "w-full rounded-xl px-4 py-3 text-sm focus:outline-none focus:border-blue-500/50 transition resize-none mb-4", style: { background: 'var(--site-input-bg)', border: '1px solid var(--site-input-border)', color: 'var(--site-input-text)' }, placeholder: t('site.message_placeholder', 'Напишите сообщение...') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "flex items-center justify-end gap-3", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { type: "button", onClick: ()=>setMsgModal(false), className: "text-sm transition px-4 py-2", style: { color: 'var(--site-text-muted)' }, children: t('common.cancel', 'Отмена') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("button", { type: "submit", disabled: msgLoading || !msgText.trim(), className: "inline-flex items-center gap-2 bg-blue-600 hover:bg-blue-500 text-white font-medium text-sm px-5 py-2.5 rounded-xl transition disabled:opacity-50", children: [ msgLoading ? /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "w-4 h-4 rounded-full border-2 border-white/30 border-t-white animate-spin" }) : /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 19l9 2-9-18-9 18 9-2zm0 0v-8" }) }), t('site.contact_send', 'Отправить') ] }) ] }) ] }) ] }) ] }) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("nav", { className: "sticky top-0 z-40 backdrop-blur-xl", style: { background: 'var(--site-nav-bg)', borderBottom: '1px solid var(--site-border)' }, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "max-w-5xl mx-auto px-4 sm:px-6 h-14 flex items-center justify-between", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("a", { href: "/", className: `logo-text-mini tracking-tight${scrolled ? ' scrolled' : ''}`, style: { color: 'var(--site-text-secondary)' }, children: "CanHelp" }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "flex items-center gap-2", children: [ profile?.rating && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "flex items-center gap-1 text-xs mr-1", style: { color: 'var(--site-text-secondary)' }, children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", { className: "w-3.5 h-3.5 text-amber-400", fill: "currentColor", viewBox: "0 0 20 20", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { d: "M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" }) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: "font-medium", children: Number(profile.rating).toFixed(1) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "relative", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("button", { type: "button", onClick: ()=>setLangOpen(!langOpen), className: "flex items-center gap-1.5 text-xs transition px-2 py-1 rounded-lg", style: { color: 'var(--site-text-muted)' }, children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", { className: "w-3.5 h-3.5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3 5h12M9 3v2m1.048 9.5A18.022 18.022 0 016.412 9m6.088 9h7M11 21l5-10 5 10M12.751 5C11.783 10.77 8.07 15.61 3 18.129" }) }), SITE_LOCALES.find((l)=>l.code === locale)?.flag ?? '🌐' ] }), langOpen && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "fixed inset-0 z-40", onClick: ()=>setLangOpen(false) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "absolute right-0 top-full mt-1 z-50 rounded-xl shadow-xl overflow-hidden min-w-[140px]", style: { background: 'var(--site-lang-dropdown)', border: '1px solid var(--site-border)' }, children: SITE_LOCALES.map((l)=>/*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("button", { type: "button", onClick: ()=>{ setLocale(l.code); setLangOpen(false); }, className: `w-full flex items-center gap-2 px-3 py-2 text-xs transition ${locale === l.code ? 'text-blue-400 bg-blue-500/10' : ''}`, style: locale === l.code ? {} : { color: 'var(--site-text-secondary)' }, children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { children: l.flag }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { children: l.label }) ] }, l.code)) }) ] }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "w-px h-4", style: { background: 'var(--site-divider)' } }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("button", { type: "button", onClick: async ()=>{ const url = window.location.href; if (navigator.share) { try { await navigator.share({ title: displayName, url }); } catch {} } else { navigator.clipboard.writeText(url); setLinkCopied(true); setTimeout(()=>setLinkCopied(false), 2000); } }, className: "flex items-center gap-1.5 text-xs transition", style: { color: 'var(--site-text-muted)' }, children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", { className: "w-3.5 h-3.5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.368 2.684 3 3 0 00-5.368-2.684z" }) }), linkCopied ? t('profile.site.copied') : t('site.share', 'Поделиться') ] }) ] }) ] }) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("section", { className: "relative overflow-hidden", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "absolute top-0 left-1/4 w-[500px] h-[500px] bg-blue-600/10 rounded-full blur-[120px] pointer-events-none" }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "absolute top-20 right-1/4 w-[400px] h-[400px] bg-purple-600/8 rounded-full blur-[100px] pointer-events-none" }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "relative max-w-5xl mx-auto px-4 sm:px-6 pt-16 pb-20 sm:pt-24 sm:pb-28", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "flex flex-col items-center text-center", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "relative group mb-6", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "absolute -inset-1 bg-gradient-to-br from-blue-500 to-purple-500 rounded-full opacity-60 blur group-hover:opacity-80 transition-opacity" }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "relative w-28 h-28 sm:w-32 sm:h-32 rounded-full overflow-hidden border-2 flex items-center justify-center text-4xl font-bold", style: { borderColor: 'var(--site-avatar-border)', background: 'var(--site-avatar-bg)', color: 'var(--site-text)' }, children: profile.image ? /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("img", { src: profile.image, alt: displayName, className: "w-full h-full object-cover" }) : initials }), Array.isArray(profile.activeStatuses) && profile.activeStatuses.includes('canhelp_now') && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "absolute bottom-1 right-1 w-5 h-5 bg-emerald-500 rounded-full border-2 flex items-center justify-center", style: { borderColor: 'var(--site-status-border-color)' }, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: "w-2 h-2 rounded-full bg-white animate-pulse" }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h1", { className: "text-3xl sm:text-5xl font-bold tracking-tight bg-clip-text text-transparent mb-3 pb-1", style: { backgroundImage: 'linear-gradient(to bottom, var(--site-name-from), var(--site-name-to))' }, children: displayName }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "flex items-center justify-center gap-2 flex-wrap mb-4", children: [ profile.planTier && profile.planTier !== 'free' && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_PlanBadge__WEBPACK_IMPORTED_MODULE_5__/* .PlanBadge */ .d, { tier: profile.planTier, verified: profile.hasVerifiedBadge, size: "md" }), Array.isArray(profile.activeStatuses) && profile.activeStatuses.includes('canhelp_now') && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("span", { className: "inline-flex items-center gap-1.5 text-xs font-medium text-emerald-400 bg-emerald-500/10 border border-emerald-500/20 px-3 py-1.5 rounded-full", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: "w-1.5 h-1.5 rounded-full bg-emerald-400 animate-pulse" }), t('status.can_help_now', 'Готов помочь') ] }), memberYear && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("span", { className: "text-xs px-3 py-1.5 rounded-full", style: { color: 'var(--site-text-muted)', background: 'var(--site-surface)' }, children: [ t('site.member_since', 'С нами с'), " ", memberYear ] }) ] }), profile.bio && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "max-w-xl text-base sm:text-lg leading-relaxed mb-8", style: { color: 'var(--site-text-secondary)' }, children: profile.bio }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "flex items-center gap-3 flex-wrap justify-center", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("button", { onClick: handleMessage, disabled: msgLoading, className: "group inline-flex items-center gap-2.5 bg-blue-600 hover:bg-blue-500 text-white font-semibold px-7 py-3.5 rounded-full transition-all hover:shadow-lg hover:shadow-blue-500/25 disabled:opacity-50", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", { className: "w-5 h-5 group-hover:scale-110 transition-transform", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8 10h.01M12 10h.01M16 10h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z" }) }), t('site.write_to_chat', 'Написать в чат') ] }), profile.phone && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("a", { href: `tel:${profile.phone}`, className: "group inline-flex items-center gap-2.5 border font-medium px-7 py-3.5 rounded-full transition-all", style: { background: 'var(--site-phone-bg)', borderColor: 'var(--site-phone-border)', color: 'var(--site-phone-text)' }, children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", { className: "w-5 h-5 group-hover:scale-110 transition-transform", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z" }) }), profile.phone ] }) ] }) ] }) }) ] }), hasStats && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("section", { className: "border-y", style: { borderColor: 'var(--site-border)', background: 'var(--site-surface)' }, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "max-w-5xl mx-auto px-4 sm:px-6 py-8", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "grid grid-cols-2 sm:grid-cols-4 gap-6", children: [ profile.rating && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "text-center", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "flex items-center justify-center gap-1 mb-1", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", { className: "w-5 h-5 text-amber-400", fill: "currentColor", viewBox: "0 0 20 20", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { d: "M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" }) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: "text-2xl font-bold", children: Number(profile.rating).toFixed(1) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-xs uppercase tracking-wider", style: { color: 'var(--site-text-muted)' }, children: t('site.rating', 'Рейтинг') }) ] }), profile.reviewCount > 0 && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "text-center", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-2xl font-bold mb-1", children: profile.reviewCount }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-xs uppercase tracking-wider", style: { color: 'var(--site-text-muted)' }, children: t('profile.reviews') }) ] }), profile.completedTasks > 0 && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "text-center", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-2xl font-bold mb-1", children: profile.completedTasks }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-xs uppercase tracking-wider", style: { color: 'var(--site-text-muted)' }, children: t('site.completed_tasks', 'Выполнено') }) ] }), Array.isArray(profile.languages) && profile.languages.length > 0 && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "text-center", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-2xl font-bold mb-1", children: profile.languages.length }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-xs uppercase tracking-wider", style: { color: 'var(--site-text-muted)' }, children: t('site.languages', 'Языков') }) ] }) ] }) }) }), Array.isArray(profile.languages) && profile.languages.length > 0 && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("section", { className: "max-w-5xl mx-auto px-4 sm:px-6 pt-10", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "flex items-center gap-3 mb-3", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", { className: "w-4 h-4 shrink-0", style: { color: 'var(--site-text-muted)' }, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3 5h12M9 3v2m1.048 9.5A18.022 18.022 0 016.412 9m6.088 9h7M11 21l5-10 5 10M12.751 5C11.783 10.77 8.07 15.61 3 18.129" }) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: "text-sm", style: { color: 'var(--site-text-muted)' }, children: t('site.speaks_languages', 'Говорит на языках') }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "flex items-center gap-2 flex-wrap", children: profile.languages.map((lang)=>{ const info = LANG_MAP[lang]; return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: "text-xs px-3 py-1.5 rounded-full flex items-center gap-1.5", style: { color: 'var(--site-tag-text)', background: 'var(--site-tag-bg)', border: '1px solid var(--site-tag-border)' }, children: info ? /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { children: [ info.flag, " ", info.label ] }) : lang }, lang); }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "max-w-5xl mx-auto px-4 sm:px-6 pb-20 space-y-16 mt-10", children: [ Array.isArray(profile.cards) && profile.cards.length > 0 && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("section", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "flex items-center gap-3 mb-6", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "w-8 h-8 rounded-lg bg-blue-500/10 flex items-center justify-center", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", { className: "w-4 h-4 text-blue-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M21 13.255A23.931 23.931 0 0112 15c-3.183 0-6.22-.62-9-1.745M16 6V4a2 2 0 00-2-2h-4a2 2 0 00-2 2v2m4 6h.01M5 20h14a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" }) }) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h2", { className: "text-xl font-bold", children: t('specialist.services', 'Услуги') }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "grid gap-4 sm:grid-cols-2", children: profile.cards.map((card)=>{ // Group locations by parent const grouped = {}; if (Array.isArray(card.locations)) { for (const slug of card.locations){ const parent = locParentMap[slug]; if (parent) { if (!grouped[parent]) grouped[parent] = []; grouped[parent].push(locMap[slug] || slug); } else { const name = locMap[slug] || slug; if (!grouped[name]) grouped[name] = []; } } } return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "group relative rounded-2xl p-6 transition-all", style: { background: 'var(--site-card-bg)', border: '1px solid var(--site-card-border)' }, children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h3", { className: "font-semibold mb-2", style: { color: 'var(--site-text)' }, children: card.title }), card.description && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-sm leading-relaxed mb-3", style: { color: 'var(--site-text-muted)' }, children: card.description }), Array.isArray(card.categories) && card.categories.length > 0 && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "flex flex-wrap gap-1.5 mb-3", children: card.categories.map((slug)=>/*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: "text-[11px] px-2.5 py-1 rounded-full bg-purple-500/10 text-purple-400 border border-purple-500/10", children: catMap[slug] || slug }, slug)) }), Object.keys(grouped).length > 0 && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "mb-3 space-y-1", children: Object.entries(grouped).map(([parent, children])=>/*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "flex items-start gap-1.5 text-xs", style: { color: 'var(--site-text-muted)' }, children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("svg", { className: "w-3.5 h-3.5 shrink-0 mt-0.5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.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" }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 11a3 3 0 11-6 0 3 3 0 016 0z" }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("span", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: "font-medium", style: { color: 'var(--site-text-secondary)' }, children: parent }), children.length > 0 && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("span", { style: { color: 'var(--site-text-hint)' }, children: [ " — ", children.join(', ') ] }) ] }) ] }, parent)) }), Array.isArray(card.skills) && card.skills.length > 0 && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "flex flex-wrap gap-1.5", children: card.skills.map((s)=>/*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: "text-[11px] px-2.5 py-1 rounded-full bg-blue-500/10 text-blue-400 border border-blue-500/10", children: s }, s)) }) ] }, card.id); }) }) ] }), Array.isArray(profile.portfolio) && profile.portfolio.length > 0 && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("section", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "flex items-center gap-3 mb-6", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "w-8 h-8 rounded-lg bg-purple-500/10 flex items-center justify-center", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", { className: "w-4 h-4 text-purple-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z" }) }) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h2", { className: "text-xl font-bold", children: t('portfolio.title', 'Портфолио') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("span", { className: "text-xs ml-auto", style: { color: 'var(--site-text-hint)' }, children: [ profile.portfolio.length, " ", t('site.photos', 'фото') ] }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-3", children: profile.portfolio.map((item, idx)=>/*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("button", { onClick: ()=>item.imageUrl && setLightbox(idx), className: "group relative aspect-square rounded-xl overflow-hidden transition-all", style: { background: 'var(--site-surface)', border: '1px solid var(--site-card-border)' }, children: [ item.imageUrl && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("img", { src: item.imageUrl, alt: item.title ?? '', className: "w-full h-full object-cover group-hover:scale-105 transition-transform duration-500" }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "absolute inset-0 bg-gradient-to-t from-black/60 via-transparent to-transparent opacity-0 group-hover:opacity-100 transition-opacity flex items-end p-3", children: item.title && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-xs font-medium text-white truncate", children: item.title }) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "absolute top-2 right-2 w-7 h-7 rounded-full bg-black/40 backdrop-blur-md flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", { className: "w-3.5 h-3.5 text-white/80", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM10 7v3m0 0v3m0-3h3m-3 0H7" }) }) }) ] }, item.id)) }) ] }), Array.isArray(profile.reviews) && profile.reviews.length > 0 && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("section", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "flex items-center gap-3 mb-6", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "w-8 h-8 rounded-lg bg-amber-500/10 flex items-center justify-center", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", { className: "w-4 h-4 text-amber-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z" }) }) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h2", { className: "text-xl font-bold", children: t('profile.reviews') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: "text-xs ml-auto", style: { color: 'var(--site-text-hint)' }, children: profile.reviewCount }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "space-y-3", children: profile.reviews.slice(0, 6).map((review)=>{ const authorName = [ review.authorFirstName, review.authorLastName ].filter(Boolean).join(' ') || review.authorName || null; return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "rounded-2xl p-5", style: { background: 'var(--site-card-bg)', border: '1px solid var(--site-card-border)' }, children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "flex items-start gap-3 mb-3", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "w-9 h-9 rounded-full flex items-center justify-center text-xs font-bold overflow-hidden shrink-0", style: { background: 'var(--site-surface)', color: 'var(--site-text-muted)' }, children: review.authorImage ? /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("img", { src: review.authorImage, alt: "", className: "w-full h-full object-cover" }) : (review.authorFirstName?.[0] ?? review.authorName?.[0] ?? '?').toUpperCase() }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "flex-1 min-w-0", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-sm font-medium", style: { color: 'var(--site-text-secondary)' }, children: authorName ?? t('common.anonymous', 'Анонимно') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: "shrink-0 text-[11px]", style: { color: 'var(--site-text-hint)' }, children: new Date(review.createdAt).toLocaleDateString(dateLocale) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "flex gap-0.5 mt-0.5", children: Array.from({ length: 5 }).map((_, i)=>/*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", { className: `w-3.5 h-3.5 ${i < Math.round(review.rating) ? 'text-amber-400' : ''}`, style: i < Math.round(review.rating) ? {} : { color: 'var(--site-border)' }, fill: "currentColor", viewBox: "0 0 20 20", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { d: "M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" }) }, i)) }) ] }) ] }), review.comment && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-sm leading-relaxed pl-12", style: { color: 'var(--site-text-muted)' }, children: review.comment }) ] }, review.id); }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("section", { id: "contact", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "flex items-center gap-3 mb-6", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "w-8 h-8 rounded-lg bg-emerald-500/10 flex items-center justify-center", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", { className: "w-4 h-4 text-emerald-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" }) }) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h2", { className: "text-xl font-bold", children: t('site.contact_form', 'Связаться') }) ] }), contactSent ? /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "bg-emerald-500/10 border border-emerald-500/20 rounded-2xl p-8 text-center", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "w-12 h-12 rounded-full bg-emerald-500/20 flex items-center justify-center mx-auto mb-3", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", { className: "w-6 h-6 text-emerald-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 13l4 4L19 7" }) }) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-emerald-400 font-medium", children: t('site.contact_sent', 'Сообщение отправлено!') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-sm mt-1", style: { color: 'var(--site-text-muted)' }, children: t('site.contact_sent_desc', 'Специалист свяжется с вами в ближайшее время') }) ] }) : /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("form", { onSubmit: handleContactSubmit, className: "rounded-2xl p-6 space-y-4", style: { background: 'var(--site-card-bg)', border: '1px solid var(--site-card-border)' }, children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "grid gap-4 sm:grid-cols-2", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("label", { className: "text-xs uppercase tracking-wider mb-1.5 block", style: { color: 'var(--site-text-muted)' }, children: [ t('site.contact_name', 'Имя'), " *" ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input", { type: "text", required: true, value: contactForm.name, onChange: (e)=>setContactForm((f)=>({ ...f, name: e.target.value })), className: "w-full rounded-xl px-4 py-3 text-sm focus:outline-none focus:border-blue-500/50 transition", style: { background: 'var(--site-input-bg)', border: '1px solid var(--site-input-border)', color: 'var(--site-input-text)' }, placeholder: t('site.contact_name_ph', 'Ваше имя') }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("label", { className: "text-xs uppercase tracking-wider mb-1.5 block", style: { color: 'var(--site-text-muted)' }, children: "Email" }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input", { type: "email", value: contactForm.email, onChange: (e)=>setContactForm((f)=>({ ...f, email: e.target.value })), className: "w-full rounded-xl px-4 py-3 text-sm focus:outline-none focus:border-blue-500/50 transition", style: { background: 'var(--site-input-bg)', border: '1px solid var(--site-input-border)', color: 'var(--site-input-text)' }, placeholder: t('site.contact_email_ph', 'your@email.com') }) ] }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("label", { className: "text-xs uppercase tracking-wider mb-1.5 block", style: { color: 'var(--site-text-muted)' }, children: [ t('site.contact_message', 'Сообщение'), " *" ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("textarea", { required: true, rows: 4, value: contactForm.message, onChange: (e)=>setContactForm((f)=>({ ...f, message: e.target.value })), className: "w-full rounded-xl px-4 py-3 text-sm focus:outline-none focus:border-blue-500/50 transition resize-none", style: { background: 'var(--site-input-bg)', border: '1px solid var(--site-input-border)', color: 'var(--site-input-text)' }, placeholder: t('site.contact_message_ph', 'Опишите вашу задачу...') }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("button", { type: "submit", disabled: contactLoading, className: "inline-flex items-center gap-2 bg-blue-600 hover:bg-blue-500 text-white font-medium px-6 py-3 rounded-xl transition disabled:opacity-50", children: [ contactLoading ? /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "w-4 h-4 rounded-full border-2 border-white/30 border-t-white animate-spin" }) : /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 19l9 2-9-18-9 18 9-2zm0 0v-8" }) }), t('site.contact_send', 'Отправить') ] }) ] }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("footer", { className: "border-t pt-8 pb-4", style: { borderColor: 'var(--site-border)' }, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "flex items-center justify-between text-xs", style: { color: 'var(--site-footer-text)' }, children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("a", { href: "/", className: "transition", children: "CanHelp.gr" }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("p", { children: [ "\xa9 ", new Date().getFullYear() ] }) ] }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { onClick: ()=>window.scrollTo({ top: 0, behavior: 'smooth' }), className: `fixed bottom-6 right-6 z-50 w-10 h-10 rounded-full flex items-center justify-center backdrop-blur-sm transition-all duration-300 ${scrolled ? 'opacity-100 translate-y-0' : 'opacity-0 translate-y-4 pointer-events-none'}`, style: { background: 'var(--site-scroll-btn-bg)', border: '1px solid var(--site-scroll-btn-border)', color: 'var(--site-scroll-btn-text)' }, "aria-label": "Scroll to top", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 15l7-7 7 7" }) }) }) ] }); }  __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ PersonalSitePage) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(78157); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31768); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var next_navigation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(71159); /* harmony import */ var _context_locale__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(96484); /* harmony import */ var _lib_auth__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(13260); /* harmony import */ var _lib_api__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(91864); /* harmony import */ var _components_PlanBadge__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(25701); M/* __next_internal_client_entry_do_not_use__ default auto */ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime"; import { useEffect, useState, useCallback } from 'react'; import { useParams, useRouter } from 'next/navigation'; import { useLocale } from '@/context/locale'; import { useSession } from '@/lib/auth'; import { getPublicSiteProfile, getOrCreateDirectRoom, sendMessage, request, getCategories, getLocations, trackSiteMessage } from '@/lib/api'; import { PlanBadge } from '@/components/PlanBadge'; export default function PersonalSitePage() { const { slug } = useParams(); const { t, locale, setLocale } = useLocale(); const { data: session } = useSession(); const router = useRouter(); const [profile, setProfile] = useState(null); const [loading, setLoading] = useState(true); const [notFound, setNotFound] = useState(false); const [msgLoading, setMsgLoading] = useState(false); const [linkCopied, setLinkCopied] = useState(false); const [lightbox, setLightbox] = useState(null); const [contactSent, setContactSent] = useState(false); const [contactForm, setContactForm] = useState({ name: '', email: '', message: '' }); const [contactLoading, setContactLoading] = useState(false); const [langOpen, setLangOpen] = useState(false); const [msgModal, setMsgModal] = useState(false); const [authModal, setAuthModal] = useState(false); const [msgText, setMsgText] = useState(''); const [msgSent, setMsgSent] = useState(false); const [catMap, setCatMap] = useState({}); const [locMap, setLocMap] = useState({}); const [locParentMap, setLocParentMap] = useState({}); const [scrolled, setScrolled] = useState(false); const dateLocale = locale === 'ru' ? 'ru-RU' : locale === 'en' ? 'en-US' : 'el-GR'; process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ const onScroll = ()=>setScrolled(window.scrollY > 100); window.addEventListener('scroll', onScroll, { passive: true }); return ()=>window.removeEventListener('scroll', onScroll); }, []); const LANG_MAP = { el: { flag: '🇬🇷', label: 'Ελληνικά' }, en: { flag: '🇬🇧', label: 'English' }, ru: { flag: '🇷🇺', label: 'Русский' }, uk: { flag: '🇺🇦', label: 'Українська' }, de: { flag: '🇩🇪', label: 'Deutsch' }, fr: { flag: '🇫🇷', label: 'Français' }, it: { flag: '🇮🇹', label: 'Italiano' }, es: { flag: '🇪🇸', label: 'Español' }, ar: { flag: '🇸🇦', label: 'العربية' }, zh: { flag: '🇨🇳', label: '中文' } }; const SITE_LOCALES = [ { code: 'el', flag: '🇬🇷', label: 'Ελληνικά' }, { code: 'en', flag: '🇬🇧', label: 'English' }, { code: 'ru', flag: '🇷🇺', label: 'Русский' } ]; process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (!slug) return; getPublicSiteProfile(slug).then(setProfile).catch(()=>setNotFound(true)).finally(()=>setLoading(false)); }, [ slug ]); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ const catLocale = locale; getCategories().then((cats)=>{ const m = {}; for (const c of cats){ m[c.slug] = c.names[catLocale] ?? c.names.el; for (const sub of c.children ?? []){ m[sub.slug] = sub.names[catLocale] ?? sub.names.el; } } setCatMap(m); }).catch(()=>{}); getLocations().then((locs)=>{ const m = {}; const pm = {}; for (const loc of locs){ const parentName = loc.names?.[catLocale] ?? loc.names?.el ?? loc.slug; m[loc.slug] = parentName; for (const child of loc.children ?? []){ m[child.slug] = child.names?.[catLocale] ?? child.names?.el ?? child.slug; pm[child.slug] = parentName; } } setLocMap(m); setLocParentMap(pm); }).catch(()=>{}); }, [ locale ]); function handleMessage() { if (!session) { setAuthModal(true); return; } setMsgModal(true); } async function handleSendMessage(e) { e.preventDefault(); if (!msgText.trim()) return; setMsgLoading(true); try { const { room } = await getOrCreateDirectRoom(profile.id); await sendMessage(room.id, msgText.trim()); trackSiteMessage(slug); setMsgSent(true); setMsgText(''); } catch {} finally{ setMsgLoading(false); } } const handleContactSubmit = useCallback(async (e)=>{ e.preventDefault(); if (!contactForm.name.trim() || !contactForm.message.trim()) return; setContactLoading(true); try { await request(`/users/site/${slug}/contact`, { method: 'POST', body: JSON.stringify(contactForm) }); setContactSent(true); setContactForm({ name: '', email: '', message: '' }); } catch {} finally{ setContactLoading(false); } }, [ contactForm, slug ]); // Lightbox keyboard nav process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (lightbox === null) return; const handler = (e)=>{ if (e.key === 'Escape') setLightbox(null); if (e.key === 'ArrowRight') setLightbox((i)=>i !== null ? Math.min(i + 1, (profile?.portfolio?.length ?? 1) - 1) : null); if (e.key === 'ArrowLeft') setLightbox((i)=>i !== null ? Math.max(i - 1, 0) : null); }; document.addEventListener('keydown', handler); return ()=>document.removeEventListener('keydown', handler); }, [ lightbox, profile?.portfolio?.length ]); if (loading) return /*#__PURE__*/ _jsx("div", { className: "min-h-screen flex items-center justify-center", style: { background: 'var(--site-bg)' }, children: /*#__PURE__*/ _jsxs("div", { className: "relative w-12 h-12", children: [ /*#__PURE__*/ _jsx("div", { className: "absolute inset-0 rounded-full border-2 border-blue-500/20" }), /*#__PURE__*/ _jsx("div", { className: "absolute inset-0 rounded-full border-2 border-transparent border-t-blue-500 animate-spin" }) ] }) }); if (notFound || !profile) return /*#__PURE__*/ _jsxs("div", { className: "min-h-screen flex flex-col items-center justify-center gap-6", style: { background: 'var(--site-bg)' }, children: [ /*#__PURE__*/ _jsx("div", { className: "w-20 h-20 rounded-full flex items-center justify-center", style: { background: 'var(--site-surface)' }, children: /*#__PURE__*/ _jsx("svg", { className: "w-10 h-10 text-gray-500", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.182 16.318A4.486 4.486 0 0012.016 15a4.486 4.486 0 00-3.198 1.318M21 12a9 9 0 11-18 0 9 9 0 0118 0zM9.75 9.75c0 .414-.168.75-.375.75S9 10.164 9 9.75 9.168 9 9.375 9s.375.336.375.75zm-.375 0h.008v.015h-.008V9.75zm5.625 0c0 .414-.168.75-.375.75s-.375-.336-.375-.75.168-.75.375-.75.375.336.375.75zm-.375 0h.008v.015h-.008V9.75z" }) }) }), /*#__PURE__*/ _jsx("p", { className: "text-gray-400 text-lg", children: t('common.not_found', 'Страница не найдена') }), /*#__PURE__*/ _jsx("a", { href: "/", className: "text-blue-400 hover:text-blue-300 text-sm transition", children: t('nav.home', 'На главную') }) ] }); const initials = `${profile.firstName?.[0] ?? ''}${profile.lastName?.[0] ?? ''}`.toUpperCase() || profile.name?.[0]?.toUpperCase() || '?'; const displayName = [ profile.firstName, profile.lastName ].filter(Boolean).join(' ') || profile.name || ''; const memberYear = profile.memberSince ? new Date(profile.memberSince).getFullYear() : null; const hasStats = profile.completedTasks > 0 || profile.rating || profile.reviewCount && profile.reviewCount > 0; const isLight = profile.siteSettings?.siteTheme === 'light'; return /*#__PURE__*/ _jsxs("div", { className: `site-theme min-h-screen selection:bg-blue-500/30 ${isLight ? 'site-light' : ''}`, style: { background: 'var(--site-bg)', color: 'var(--site-text)' }, children: [ lightbox !== null && profile.portfolio?.[lightbox] && /*#__PURE__*/ _jsxs("div", { className: "fixed inset-0 z-50 bg-black/90 backdrop-blur-xl flex items-center justify-center p-4", onClick: ()=>setLightbox(null), children: [ /*#__PURE__*/ _jsx("button", { onClick: ()=>setLightbox(null), className: "absolute top-6 right-6 w-10 h-10 rounded-full bg-white/10 hover:bg-white/20 flex items-center justify-center transition", children: /*#__PURE__*/ _jsx("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" }) }) }), lightbox > 0 && /*#__PURE__*/ _jsx("button", { onClick: (e)=>{ e.stopPropagation(); setLightbox(lightbox - 1); }, className: "absolute left-4 top-1/2 -translate-y-1/2 w-10 h-10 rounded-full bg-white/10 hover:bg-white/20 flex items-center justify-center transition", children: /*#__PURE__*/ _jsx("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 19l-7-7 7-7" }) }) }), lightbox < (profile.portfolio?.length ?? 1) - 1 && /*#__PURE__*/ _jsx("button", { onClick: (e)=>{ e.stopPropagation(); setLightbox(lightbox + 1); }, className: "absolute right-4 top-1/2 -translate-y-1/2 w-10 h-10 rounded-full bg-white/10 hover:bg-white/20 flex items-center justify-center transition", children: /*#__PURE__*/ _jsx("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) }) }), /*#__PURE__*/ _jsx("img", { src: profile.portfolio[lightbox].imageUrl, alt: profile.portfolio[lightbox].title ?? '', className: "max-w-full max-h-[85vh] rounded-2xl object-contain", onClick: (e)=>e.stopPropagation() }), profile.portfolio[lightbox].title && /*#__PURE__*/ _jsx("div", { className: "absolute bottom-6 left-1/2 -translate-x-1/2 bg-black/60 backdrop-blur-md px-5 py-2.5 rounded-full text-sm", children: profile.portfolio[lightbox].title }) ] }), authModal && /*#__PURE__*/ _jsx("div", { className: "fixed inset-0 z-50 bg-black/70 backdrop-blur-sm flex items-center justify-center p-4", onClick: ()=>setAuthModal(false), children: /*#__PURE__*/ _jsxs("div", { className: "relative w-full max-w-sm rounded-2xl shadow-2xl p-6", style: { background: 'var(--site-modal-bg)', border: '1px solid var(--site-border)' }, onClick: (e)=>e.stopPropagation(), children: [ /*#__PURE__*/ _jsx("button", { type: "button", onClick: ()=>setAuthModal(false), className: "absolute top-4 right-4 w-8 h-8 rounded-full flex items-center justify-center transition", style: { background: 'var(--site-surface)', color: 'var(--site-text-muted)' }, children: /*#__PURE__*/ _jsx("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" }) }) }), /*#__PURE__*/ _jsx("div", { className: "w-12 h-12 rounded-full bg-blue-500/10 flex items-center justify-center mb-4", children: /*#__PURE__*/ _jsx("svg", { className: "w-6 h-6 text-blue-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8 10h.01M12 10h.01M16 10h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z" }) }) }), /*#__PURE__*/ _jsx("h3", { className: "text-base font-semibold mb-2", style: { color: 'var(--site-text)' }, children: t('site.auth_required_title', 'Нужна авторизация') }), /*#__PURE__*/ _jsx("p", { className: "text-sm mb-5", style: { color: 'var(--site-text-muted)' }, children: t('site.auth_required_desc', 'Чтобы написать в чат, необходимо войти в аккаунт CanHelp.') }), /*#__PURE__*/ _jsxs("div", { className: "flex flex-col gap-2.5", children: [ /*#__PURE__*/ _jsxs("a", { href: "/login", className: "w-full flex items-center justify-center gap-2 bg-blue-600 hover:bg-blue-500 text-white font-medium text-sm px-4 py-2.5 rounded-xl transition", children: [ /*#__PURE__*/ _jsx("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M11 16l-4-4m0 0l4-4m-4 4h14m-5 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h7a3 3 0 013 3v1" }) }), t('site.auth_login_btn', 'Войти в аккаунт') ] }), /*#__PURE__*/ _jsxs("button", { type: "button", onClick: ()=>{ setAuthModal(false); setTimeout(()=>{ document.getElementById('contact')?.scrollIntoView({ behavior: 'smooth', block: 'start' }); }, 100); }, className: "w-full flex items-center justify-center gap-2 text-sm font-medium px-4 py-2.5 rounded-xl transition", style: { background: 'var(--site-surface)', color: 'var(--site-text-secondary)', border: '1px solid var(--site-border)' }, children: [ /*#__PURE__*/ _jsx("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" }) }), t('site.auth_contact_form_btn', 'Написать через форму обратной связи') ] }) ] }) ] }) }), msgModal && /*#__PURE__*/ _jsx("div", { className: "fixed inset-0 z-50 bg-black/70 backdrop-blur-sm flex items-center justify-center p-4", onClick: ()=>{ if (!msgLoading) { setMsgModal(false); setMsgSent(false); } }, children: /*#__PURE__*/ _jsxs("div", { className: "relative w-full max-w-md rounded-2xl shadow-2xl", style: { background: 'var(--site-modal-bg)', border: '1px solid var(--site-border)' }, onClick: (e)=>e.stopPropagation(), children: [ /*#__PURE__*/ _jsx("button", { type: "button", onClick: ()=>{ setMsgModal(false); setMsgSent(false); }, className: "absolute top-4 right-4 w-8 h-8 rounded-full flex items-center justify-center transition", style: { background: 'var(--site-surface)', color: 'var(--site-text-muted)' }, children: /*#__PURE__*/ _jsx("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" }) }) }), /*#__PURE__*/ _jsxs("div", { className: "p-6", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-3 mb-5", children: [ /*#__PURE__*/ _jsx("div", { className: "w-10 h-10 rounded-full bg-blue-500/10 flex items-center justify-center", children: /*#__PURE__*/ _jsx("svg", { className: "w-5 h-5 text-blue-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8 10h.01M12 10h.01M16 10h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z" }) }) }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("h3", { className: "text-base font-semibold", style: { color: 'var(--site-text)' }, children: t('site.write_to_chat', 'Написать в чат') }), /*#__PURE__*/ _jsx("p", { className: "text-xs", style: { color: 'var(--site-text-muted)' }, children: displayName }) ] }) ] }), msgSent ? /*#__PURE__*/ _jsxs("div", { className: "text-center py-6", children: [ /*#__PURE__*/ _jsx("div", { className: "w-12 h-12 rounded-full bg-emerald-500/20 flex items-center justify-center mx-auto mb-3", children: /*#__PURE__*/ _jsx("svg", { className: "w-6 h-6 text-emerald-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 13l4 4L19 7" }) }) }), /*#__PURE__*/ _jsx("p", { className: "text-emerald-400 font-medium mb-1", children: t('site.message_sent', 'Сообщение отправлено!') }), /*#__PURE__*/ _jsx("p", { className: "text-sm mb-4", style: { color: 'var(--site-text-muted)' }, children: t('site.message_sent_desc', 'Специалист получит его в чате') }), /*#__PURE__*/ _jsx("button", { type: "button", onClick: ()=>{ setMsgModal(false); setMsgSent(false); }, className: "text-sm text-blue-400 hover:text-blue-300 transition", children: t('common.close', 'Закрыть') }) ] }) : /*#__PURE__*/ _jsxs("form", { onSubmit: handleSendMessage, children: [ /*#__PURE__*/ _jsx("textarea", { autoFocus: true, rows: 4, value: msgText, onChange: (e)=>setMsgText(e.target.value), className: "w-full rounded-xl px-4 py-3 text-sm focus:outline-none focus:border-blue-500/50 transition resize-none mb-4", style: { background: 'var(--site-input-bg)', border: '1px solid var(--site-input-border)', color: 'var(--site-input-text)' }, placeholder: t('site.message_placeholder', 'Напишите сообщение...') }), /*#__PURE__*/ _jsxs("div", { className: "flex items-center justify-end gap-3", children: [ /*#__PURE__*/ _jsx("button", { type: "button", onClick: ()=>setMsgModal(false), className: "text-sm transition px-4 py-2", style: { color: 'var(--site-text-muted)' }, children: t('common.cancel', 'Отмена') }), /*#__PURE__*/ _jsxs("button", { type: "submit", disabled: msgLoading || !msgText.trim(), className: "inline-flex items-center gap-2 bg-blue-600 hover:bg-blue-500 text-white font-medium text-sm px-5 py-2.5 rounded-xl transition disabled:opacity-50", children: [ msgLoading ? /*#__PURE__*/ _jsx("div", { className: "w-4 h-4 rounded-full border-2 border-white/30 border-t-white animate-spin" }) : /*#__PURE__*/ _jsx("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 19l9 2-9-18-9 18 9-2zm0 0v-8" }) }), t('site.contact_send', 'Отправить') ] }) ] }) ] }) ] }) ] }) }), /*#__PURE__*/ _jsx("nav", { className: "sticky top-0 z-40 backdrop-blur-xl", style: { background: 'var(--site-nav-bg)', borderBottom: '1px solid var(--site-border)' }, children: /*#__PURE__*/ _jsxs("div", { className: "max-w-5xl mx-auto px-4 sm:px-6 h-14 flex items-center justify-between", children: [ /*#__PURE__*/ _jsx("a", { href: "/", className: `logo-text-mini tracking-tight${scrolled ? ' scrolled' : ''}`, style: { color: 'var(--site-text-secondary)' }, children: "CanHelp" }), /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-2", children: [ profile?.rating && /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-1 text-xs mr-1", style: { color: 'var(--site-text-secondary)' }, children: [ /*#__PURE__*/ _jsx("svg", { className: "w-3.5 h-3.5 text-amber-400", fill: "currentColor", viewBox: "0 0 20 20", children: /*#__PURE__*/ _jsx("path", { d: "M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" }) }), /*#__PURE__*/ _jsx("span", { className: "font-medium", children: Number(profile.rating).toFixed(1) }) ] }), /*#__PURE__*/ _jsxs("div", { className: "relative", children: [ /*#__PURE__*/ _jsxs("button", { type: "button", onClick: ()=>setLangOpen(!langOpen), className: "flex items-center gap-1.5 text-xs transition px-2 py-1 rounded-lg", style: { color: 'var(--site-text-muted)' }, children: [ /*#__PURE__*/ _jsx("svg", { className: "w-3.5 h-3.5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3 5h12M9 3v2m1.048 9.5A18.022 18.022 0 016.412 9m6.088 9h7M11 21l5-10 5 10M12.751 5C11.783 10.77 8.07 15.61 3 18.129" }) }), SITE_LOCALES.find((l)=>l.code === locale)?.flag ?? '🌐' ] }), langOpen && /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsx("div", { className: "fixed inset-0 z-40", onClick: ()=>setLangOpen(false) }), /*#__PURE__*/ _jsx("div", { className: "absolute right-0 top-full mt-1 z-50 rounded-xl shadow-xl overflow-hidden min-w-[140px]", style: { background: 'var(--site-lang-dropdown)', border: '1px solid var(--site-border)' }, children: SITE_LOCALES.map((l)=>/*#__PURE__*/ _jsxs("button", { type: "button", onClick: ()=>{ setLocale(l.code); setLangOpen(false); }, className: `w-full flex items-center gap-2 px-3 py-2 text-xs transition ${locale === l.code ? 'text-blue-400 bg-blue-500/10' : ''}`, style: locale === l.code ? {} : { color: 'var(--site-text-secondary)' }, children: [ /*#__PURE__*/ _jsx("span", { children: l.flag }), /*#__PURE__*/ _jsx("span", { children: l.label }) ] }, l.code)) }) ] }) ] }), /*#__PURE__*/ _jsx("div", { className: "w-px h-4", style: { background: 'var(--site-divider)' } }), /*#__PURE__*/ _jsxs("button", { type: "button", onClick: async ()=>{ const url = window.location.href; if (navigator.share) { try { await navigator.share({ title: displayName, url }); } catch {} } else { navigator.clipboard.writeText(url); setLinkCopied(true); setTimeout(()=>setLinkCopied(false), 2000); } }, className: "flex items-center gap-1.5 text-xs transition", style: { color: 'var(--site-text-muted)' }, children: [ /*#__PURE__*/ _jsx("svg", { className: "w-3.5 h-3.5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.368 2.684 3 3 0 00-5.368-2.684z" }) }), linkCopied ? t('profile.site.copied') : t('site.share', 'Поделиться') ] }) ] }) ] }) }), /*#__PURE__*/ _jsxs("section", { className: "relative overflow-hidden", children: [ /*#__PURE__*/ _jsx("div", { className: "absolute top-0 left-1/4 w-[500px] h-[500px] bg-blue-600/10 rounded-full blur-[120px] pointer-events-none" }), /*#__PURE__*/ _jsx("div", { className: "absolute top-20 right-1/4 w-[400px] h-[400px] bg-purple-600/8 rounded-full blur-[100px] pointer-events-none" }), /*#__PURE__*/ _jsx("div", { className: "relative max-w-5xl mx-auto px-4 sm:px-6 pt-16 pb-20 sm:pt-24 sm:pb-28", children: /*#__PURE__*/ _jsxs("div", { className: "flex flex-col items-center text-center", children: [ /*#__PURE__*/ _jsxs("div", { className: "relative group mb-6", children: [ /*#__PURE__*/ _jsx("div", { className: "absolute -inset-1 bg-gradient-to-br from-blue-500 to-purple-500 rounded-full opacity-60 blur group-hover:opacity-80 transition-opacity" }), /*#__PURE__*/ _jsx("div", { className: "relative w-28 h-28 sm:w-32 sm:h-32 rounded-full overflow-hidden border-2 flex items-center justify-center text-4xl font-bold", style: { borderColor: 'var(--site-avatar-border)', background: 'var(--site-avatar-bg)', color: 'var(--site-text)' }, children: profile.image ? /*#__PURE__*/ _jsx("img", { src: profile.image, alt: displayName, className: "w-full h-full object-cover" }) : initials }), Array.isArray(profile.activeStatuses) && profile.activeStatuses.includes('canhelp_now') && /*#__PURE__*/ _jsx("div", { className: "absolute bottom-1 right-1 w-5 h-5 bg-emerald-500 rounded-full border-2 flex items-center justify-center", style: { borderColor: 'var(--site-status-border-color)' }, children: /*#__PURE__*/ _jsx("span", { className: "w-2 h-2 rounded-full bg-white animate-pulse" }) }) ] }), /*#__PURE__*/ _jsx("h1", { className: "text-3xl sm:text-5xl font-bold tracking-tight bg-clip-text text-transparent mb-3 pb-1", style: { backgroundImage: 'linear-gradient(to bottom, var(--site-name-from), var(--site-name-to))' }, children: displayName }), /*#__PURE__*/ _jsxs("div", { className: "flex items-center justify-center gap-2 flex-wrap mb-4", children: [ profile.planTier && profile.planTier !== 'free' && /*#__PURE__*/ _jsx(PlanBadge, { tier: profile.planTier, verified: profile.hasVerifiedBadge, size: "md" }), Array.isArray(profile.activeStatuses) && profile.activeStatuses.includes('canhelp_now') && /*#__PURE__*/ _jsxs("span", { className: "inline-flex items-center gap-1.5 text-xs font-medium text-emerald-400 bg-emerald-500/10 border border-emerald-500/20 px-3 py-1.5 rounded-full", children: [ /*#__PURE__*/ _jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-emerald-400 animate-pulse" }), t('status.can_help_now', 'Готов помочь') ] }), memberYear && /*#__PURE__*/ _jsxs("span", { className: "text-xs px-3 py-1.5 rounded-full", style: { color: 'var(--site-text-muted)', background: 'var(--site-surface)' }, children: [ t('site.member_since', 'С нами с'), " ", memberYear ] }) ] }), profile.bio && /*#__PURE__*/ _jsx("p", { className: "max-w-xl text-base sm:text-lg leading-relaxed mb-8", style: { color: 'var(--site-text-secondary)' }, children: profile.bio }), /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-3 flex-wrap justify-center", children: [ /*#__PURE__*/ _jsxs("button", { onClick: handleMessage, disabled: msgLoading, className: "group inline-flex items-center gap-2.5 bg-blue-600 hover:bg-blue-500 text-white font-semibold px-7 py-3.5 rounded-full transition-all hover:shadow-lg hover:shadow-blue-500/25 disabled:opacity-50", children: [ /*#__PURE__*/ _jsx("svg", { className: "w-5 h-5 group-hover:scale-110 transition-transform", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8 10h.01M12 10h.01M16 10h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z" }) }), t('site.write_to_chat', 'Написать в чат') ] }), profile.phone && /*#__PURE__*/ _jsxs("a", { href: `tel:${profile.phone}`, className: "group inline-flex items-center gap-2.5 border font-medium px-7 py-3.5 rounded-full transition-all", style: { background: 'var(--site-phone-bg)', borderColor: 'var(--site-phone-border)', color: 'var(--site-phone-text)' }, children: [ /*#__PURE__*/ _jsx("svg", { className: "w-5 h-5 group-hover:scale-110 transition-transform", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z" }) }), profile.phone ] }) ] }) ] }) }) ] }), hasStats && /*#__PURE__*/ _jsx("section", { className: "border-y", style: { borderColor: 'var(--site-border)', background: 'var(--site-surface)' }, children: /*#__PURE__*/ _jsx("div", { className: "max-w-5xl mx-auto px-4 sm:px-6 py-8", children: /*#__PURE__*/ _jsxs("div", { className: "grid grid-cols-2 sm:grid-cols-4 gap-6", children: [ profile.rating && /*#__PURE__*/ _jsxs("div", { className: "text-center", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center justify-center gap-1 mb-1", children: [ /*#__PURE__*/ _jsx("svg", { className: "w-5 h-5 text-amber-400", fill: "currentColor", viewBox: "0 0 20 20", children: /*#__PURE__*/ _jsx("path", { d: "M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" }) }), /*#__PURE__*/ _jsx("span", { className: "text-2xl font-bold", children: Number(profile.rating).toFixed(1) }) ] }), /*#__PURE__*/ _jsx("p", { className: "text-xs uppercase tracking-wider", style: { color: 'var(--site-text-muted)' }, children: t('site.rating', 'Рейтинг') }) ] }), profile.reviewCount > 0 && /*#__PURE__*/ _jsxs("div", { className: "text-center", children: [ /*#__PURE__*/ _jsx("p", { className: "text-2xl font-bold mb-1", children: profile.reviewCount }), /*#__PURE__*/ _jsx("p", { className: "text-xs uppercase tracking-wider", style: { color: 'var(--site-text-muted)' }, children: t('profile.reviews') }) ] }), profile.completedTasks > 0 && /*#__PURE__*/ _jsxs("div", { className: "text-center", children: [ /*#__PURE__*/ _jsx("p", { className: "text-2xl font-bold mb-1", children: profile.completedTasks }), /*#__PURE__*/ _jsx("p", { className: "text-xs uppercase tracking-wider", style: { color: 'var(--site-text-muted)' }, children: t('site.completed_tasks', 'Выполнено') }) ] }), Array.isArray(profile.languages) && profile.languages.length > 0 && /*#__PURE__*/ _jsxs("div", { className: "text-center", children: [ /*#__PURE__*/ _jsx("p", { className: "text-2xl font-bold mb-1", children: profile.languages.length }), /*#__PURE__*/ _jsx("p", { className: "text-xs uppercase tracking-wider", style: { color: 'var(--site-text-muted)' }, children: t('site.languages', 'Языков') }) ] }) ] }) }) }), Array.isArray(profile.languages) && profile.languages.length > 0 && /*#__PURE__*/ _jsxs("section", { className: "max-w-5xl mx-auto px-4 sm:px-6 pt-10", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-3 mb-3", children: [ /*#__PURE__*/ _jsx("svg", { className: "w-4 h-4 shrink-0", style: { color: 'var(--site-text-muted)' }, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3 5h12M9 3v2m1.048 9.5A18.022 18.022 0 016.412 9m6.088 9h7M11 21l5-10 5 10M12.751 5C11.783 10.77 8.07 15.61 3 18.129" }) }), /*#__PURE__*/ _jsx("span", { className: "text-sm", style: { color: 'var(--site-text-muted)' }, children: t('site.speaks_languages', 'Говорит на языках') }) ] }), /*#__PURE__*/ _jsx("div", { className: "flex items-center gap-2 flex-wrap", children: profile.languages.map((lang)=>{ const info = LANG_MAP[lang]; return /*#__PURE__*/ _jsx("span", { className: "text-xs px-3 py-1.5 rounded-full flex items-center gap-1.5", style: { color: 'var(--site-tag-text)', background: 'var(--site-tag-bg)', border: '1px solid var(--site-tag-border)' }, children: info ? /*#__PURE__*/ _jsxs(_Fragment, { children: [ info.flag, " ", info.label ] }) : lang }, lang); }) }) ] }), /*#__PURE__*/ _jsxs("div", { className: "max-w-5xl mx-auto px-4 sm:px-6 pb-20 space-y-16 mt-10", children: [ Array.isArray(profile.cards) && profile.cards.length > 0 && /*#__PURE__*/ _jsxs("section", { children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-3 mb-6", children: [ /*#__PURE__*/ _jsx("div", { className: "w-8 h-8 rounded-lg bg-blue-500/10 flex items-center justify-center", children: /*#__PURE__*/ _jsx("svg", { className: "w-4 h-4 text-blue-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M21 13.255A23.931 23.931 0 0112 15c-3.183 0-6.22-.62-9-1.745M16 6V4a2 2 0 00-2-2h-4a2 2 0 00-2 2v2m4 6h.01M5 20h14a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" }) }) }), /*#__PURE__*/ _jsx("h2", { className: "text-xl font-bold", children: t('specialist.services', 'Услуги') }) ] }), /*#__PURE__*/ _jsx("div", { className: "grid gap-4 sm:grid-cols-2", children: profile.cards.map((card)=>{ // Group locations by parent const grouped = {}; if (Array.isArray(card.locations)) { for (const slug of card.locations){ const parent = locParentMap[slug]; if (parent) { if (!grouped[parent]) grouped[parent] = []; grouped[parent].push(locMap[slug] || slug); } else { const name = locMap[slug] || slug; if (!grouped[name]) grouped[name] = []; } } } return /*#__PURE__*/ _jsxs("div", { className: "group relative rounded-2xl p-6 transition-all", style: { background: 'var(--site-card-bg)', border: '1px solid var(--site-card-border)' }, children: [ /*#__PURE__*/ _jsx("h3", { className: "font-semibold mb-2", style: { color: 'var(--site-text)' }, children: card.title }), card.description && /*#__PURE__*/ _jsx("p", { className: "text-sm leading-relaxed mb-3", style: { color: 'var(--site-text-muted)' }, children: card.description }), Array.isArray(card.categories) && card.categories.length > 0 && /*#__PURE__*/ _jsx("div", { className: "flex flex-wrap gap-1.5 mb-3", children: card.categories.map((slug)=>/*#__PURE__*/ _jsx("span", { className: "text-[11px] px-2.5 py-1 rounded-full bg-purple-500/10 text-purple-400 border border-purple-500/10", children: catMap[slug] || slug }, slug)) }), Object.keys(grouped).length > 0 && /*#__PURE__*/ _jsx("div", { className: "mb-3 space-y-1", children: Object.entries(grouped).map(([parent, children])=>/*#__PURE__*/ _jsxs("div", { className: "flex items-start gap-1.5 text-xs", style: { color: 'var(--site-text-muted)' }, children: [ /*#__PURE__*/ _jsxs("svg", { className: "w-3.5 h-3.5 shrink-0 mt-0.5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: [ /*#__PURE__*/ _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" }), /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 11a3 3 0 11-6 0 3 3 0 016 0z" }) ] }), /*#__PURE__*/ _jsxs("span", { children: [ /*#__PURE__*/ _jsx("span", { className: "font-medium", style: { color: 'var(--site-text-secondary)' }, children: parent }), children.length > 0 && /*#__PURE__*/ _jsxs("span", { style: { color: 'var(--site-text-hint)' }, children: [ " — ", children.join(', ') ] }) ] }) ] }, parent)) }), Array.isArray(card.skills) && card.skills.length > 0 && /*#__PURE__*/ _jsx("div", { className: "flex flex-wrap gap-1.5", children: card.skills.map((s)=>/*#__PURE__*/ _jsx("span", { className: "text-[11px] px-2.5 py-1 rounded-full bg-blue-500/10 text-blue-400 border border-blue-500/10", children: s }, s)) }) ] }, card.id); }) }) ] }), Array.isArray(profile.portfolio) && profile.portfolio.length > 0 && /*#__PURE__*/ _jsxs("section", { children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-3 mb-6", children: [ /*#__PURE__*/ _jsx("div", { className: "w-8 h-8 rounded-lg bg-purple-500/10 flex items-center justify-center", children: /*#__PURE__*/ _jsx("svg", { className: "w-4 h-4 text-purple-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z" }) }) }), /*#__PURE__*/ _jsx("h2", { className: "text-xl font-bold", children: t('portfolio.title', 'Портфолио') }), /*#__PURE__*/ _jsxs("span", { className: "text-xs ml-auto", style: { color: 'var(--site-text-hint)' }, children: [ profile.portfolio.length, " ", t('site.photos', 'фото') ] }) ] }), /*#__PURE__*/ _jsx("div", { className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-3", children: profile.portfolio.map((item, idx)=>/*#__PURE__*/ _jsxs("button", { onClick: ()=>item.imageUrl && setLightbox(idx), className: "group relative aspect-square rounded-xl overflow-hidden transition-all", style: { background: 'var(--site-surface)', border: '1px solid var(--site-card-border)' }, children: [ item.imageUrl && /*#__PURE__*/ _jsx("img", { src: item.imageUrl, alt: item.title ?? '', className: "w-full h-full object-cover group-hover:scale-105 transition-transform duration-500" }), /*#__PURE__*/ _jsx("div", { className: "absolute inset-0 bg-gradient-to-t from-black/60 via-transparent to-transparent opacity-0 group-hover:opacity-100 transition-opacity flex items-end p-3", children: item.title && /*#__PURE__*/ _jsx("p", { className: "text-xs font-medium text-white truncate", children: item.title }) }), /*#__PURE__*/ _jsx("div", { className: "absolute top-2 right-2 w-7 h-7 rounded-full bg-black/40 backdrop-blur-md flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity", children: /*#__PURE__*/ _jsx("svg", { className: "w-3.5 h-3.5 text-white/80", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM10 7v3m0 0v3m0-3h3m-3 0H7" }) }) }) ] }, item.id)) }) ] }), Array.isArray(profile.reviews) && profile.reviews.length > 0 && /*#__PURE__*/ _jsxs("section", { children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-3 mb-6", children: [ /*#__PURE__*/ _jsx("div", { className: "w-8 h-8 rounded-lg bg-amber-500/10 flex items-center justify-center", children: /*#__PURE__*/ _jsx("svg", { className: "w-4 h-4 text-amber-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z" }) }) }), /*#__PURE__*/ _jsx("h2", { className: "text-xl font-bold", children: t('profile.reviews') }), /*#__PURE__*/ _jsx("span", { className: "text-xs ml-auto", style: { color: 'var(--site-text-hint)' }, children: profile.reviewCount }) ] }), /*#__PURE__*/ _jsx("div", { className: "space-y-3", children: profile.reviews.slice(0, 6).map((review)=>{ const authorName = [ review.authorFirstName, review.authorLastName ].filter(Boolean).join(' ') || review.authorName || null; return /*#__PURE__*/ _jsxs("div", { className: "rounded-2xl p-5", style: { background: 'var(--site-card-bg)', border: '1px solid var(--site-card-border)' }, children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-start gap-3 mb-3", children: [ /*#__PURE__*/ _jsx("div", { className: "w-9 h-9 rounded-full flex items-center justify-center text-xs font-bold overflow-hidden shrink-0", style: { background: 'var(--site-surface)', color: 'var(--site-text-muted)' }, children: review.authorImage ? /*#__PURE__*/ _jsx("img", { src: review.authorImage, alt: "", className: "w-full h-full object-cover" }) : (review.authorFirstName?.[0] ?? review.authorName?.[0] ?? '?').toUpperCase() }), /*#__PURE__*/ _jsxs("div", { className: "flex-1 min-w-0", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center justify-between gap-2", children: [ /*#__PURE__*/ _jsx("p", { className: "text-sm font-medium", style: { color: 'var(--site-text-secondary)' }, children: authorName ?? t('common.anonymous', 'Анонимно') }), /*#__PURE__*/ _jsx("span", { className: "shrink-0 text-[11px]", style: { color: 'var(--site-text-hint)' }, children: new Date(review.createdAt).toLocaleDateString(dateLocale) }) ] }), /*#__PURE__*/ _jsx("div", { className: "flex gap-0.5 mt-0.5", children: Array.from({ length: 5 }).map((_, i)=>/*#__PURE__*/ _jsx("svg", { className: `w-3.5 h-3.5 ${i < Math.round(review.rating) ? 'text-amber-400' : ''}`, style: i < Math.round(review.rating) ? {} : { color: 'var(--site-border)' }, fill: "currentColor", viewBox: "0 0 20 20", children: /*#__PURE__*/ _jsx("path", { d: "M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" }) }, i)) }) ] }) ] }), review.comment && /*#__PURE__*/ _jsx("p", { className: "text-sm leading-relaxed pl-12", style: { color: 'var(--site-text-muted)' }, children: review.comment }) ] }, review.id); }) }) ] }), /*#__PURE__*/ _jsxs("section", { id: "contact", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-3 mb-6", children: [ /*#__PURE__*/ _jsx("div", { className: "w-8 h-8 rounded-lg bg-emerald-500/10 flex items-center justify-center", children: /*#__PURE__*/ _jsx("svg", { className: "w-4 h-4 text-emerald-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" }) }) }), /*#__PURE__*/ _jsx("h2", { className: "text-xl font-bold", children: t('site.contact_form', 'Связаться') }) ] }), contactSent ? /*#__PURE__*/ _jsxs("div", { className: "bg-emerald-500/10 border border-emerald-500/20 rounded-2xl p-8 text-center", children: [ /*#__PURE__*/ _jsx("div", { className: "w-12 h-12 rounded-full bg-emerald-500/20 flex items-center justify-center mx-auto mb-3", children: /*#__PURE__*/ _jsx("svg", { className: "w-6 h-6 text-emerald-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 13l4 4L19 7" }) }) }), /*#__PURE__*/ _jsx("p", { className: "text-emerald-400 font-medium", children: t('site.contact_sent', 'Сообщение отправлено!') }), /*#__PURE__*/ _jsx("p", { className: "text-sm mt-1", style: { color: 'var(--site-text-muted)' }, children: t('site.contact_sent_desc', 'Специалист свяжется с вами в ближайшее время') }) ] }) : /*#__PURE__*/ _jsxs("form", { onSubmit: handleContactSubmit, className: "rounded-2xl p-6 space-y-4", style: { background: 'var(--site-card-bg)', border: '1px solid var(--site-card-border)' }, children: [ /*#__PURE__*/ _jsxs("div", { className: "grid gap-4 sm:grid-cols-2", children: [ /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsxs("label", { className: "text-xs uppercase tracking-wider mb-1.5 block", style: { color: 'var(--site-text-muted)' }, children: [ t('site.contact_name', 'Имя'), " *" ] }), /*#__PURE__*/ _jsx("input", { type: "text", required: true, value: contactForm.name, onChange: (e)=>setContactForm((f)=>({ ...f, name: e.target.value })), className: "w-full rounded-xl px-4 py-3 text-sm focus:outline-none focus:border-blue-500/50 transition", style: { background: 'var(--site-input-bg)', border: '1px solid var(--site-input-border)', color: 'var(--site-input-text)' }, placeholder: t('site.contact_name_ph', 'Ваше имя') }) ] }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("label", { className: "text-xs uppercase tracking-wider mb-1.5 block", style: { color: 'var(--site-text-muted)' }, children: "Email" }), /*#__PURE__*/ _jsx("input", { type: "email", value: contactForm.email, onChange: (e)=>setContactForm((f)=>({ ...f, email: e.target.value })), className: "w-full rounded-xl px-4 py-3 text-sm focus:outline-none focus:border-blue-500/50 transition", style: { background: 'var(--site-input-bg)', border: '1px solid var(--site-input-border)', color: 'var(--site-input-text)' }, placeholder: t('site.contact_email_ph', 'your@email.com') }) ] }) ] }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsxs("label", { className: "text-xs uppercase tracking-wider mb-1.5 block", style: { color: 'var(--site-text-muted)' }, children: [ t('site.contact_message', 'Сообщение'), " *" ] }), /*#__PURE__*/ _jsx("textarea", { required: true, rows: 4, value: contactForm.message, onChange: (e)=>setContactForm((f)=>({ ...f, message: e.target.value })), className: "w-full rounded-xl px-4 py-3 text-sm focus:outline-none focus:border-blue-500/50 transition resize-none", style: { background: 'var(--site-input-bg)', border: '1px solid var(--site-input-border)', color: 'var(--site-input-text)' }, placeholder: t('site.contact_message_ph', 'Опишите вашу задачу...') }) ] }), /*#__PURE__*/ _jsxs("button", { type: "submit", disabled: contactLoading, className: "inline-flex items-center gap-2 bg-blue-600 hover:bg-blue-500 text-white font-medium px-6 py-3 rounded-xl transition disabled:opacity-50", children: [ contactLoading ? /*#__PURE__*/ _jsx("div", { className: "w-4 h-4 rounded-full border-2 border-white/30 border-t-white animate-spin" }) : /*#__PURE__*/ _jsx("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 19l9 2-9-18-9 18 9-2zm0 0v-8" }) }), t('site.contact_send', 'Отправить') ] }) ] }) ] }), /*#__PURE__*/ _jsx("footer", { className: "border-t pt-8 pb-4", style: { borderColor: 'var(--site-border)' }, children: /*#__PURE__*/ _jsxs("div", { className: "flex items-center justify-between text-xs", style: { color: 'var(--site-footer-text)' }, children: [ /*#__PURE__*/ _jsx("a", { href: "/", className: "transition", children: "CanHelp.gr" }), /*#__PURE__*/ _jsxs("p", { children: [ "\xa9 ", new Date().getFullYear() ] }) ] }) }) ] }), /*#__PURE__*/ _jsx("button", { onClick: ()=>window.scrollTo({ top: 0, behavior: 'smooth' }), className: `fixed bottom-6 right-6 z-50 w-10 h-10 rounded-full flex items-center justify-center backdrop-blur-sm transition-all duration-300 ${scrolled ? 'opacity-100 translate-y-0' : 'opacity-0 translate-y-4 pointer-events-none'}`, style: { background: 'var(--site-scroll-btn-bg)', border: '1px solid var(--site-scroll-btn-border)', color: 'var(--site-scroll-btn-text)' }, "aria-label": "Scroll to top", children: /*#__PURE__*/ _jsx("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 15l7-7 7 7" }) }) }) ] }); } LM61146undefined148204undefined206260undefined262306undefined308347undefined349489undefined491541undefined543557undefined609617(0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useParams)undefined659667(0,_context_locale__WEBPACK_IMPORTED_MODULE_3__/* .useLocale */ .Y)undefined702711(0,_lib_auth__WEBPACK_IMPORTED_MODULE_4__/* .useSession */ .wV)undefined735743(0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useRouter)undefined782789(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined832839(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined884891(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined941948(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined9981005(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined10511058(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined11091116(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined11681175(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined12921299(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined13451352(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined13981405(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined14531460(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined15041511(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined15521559(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined16011608(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined16471654(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined17051712(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined17551762(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined19151923(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)undefined33853393(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)undefined34363455(0,_lib_api__WEBPACK_IMPORTED_MODULE_6__/* .getPublicSiteProfile */ .S$)undefined36263634(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)undefined36843696(0,_lib_api__WEBPACK_IMPORTED_MODULE_6__/* .getCategories */ .bW)undefined40554066(0,_lib_api__WEBPACK_IMPORTED_MODULE_6__/* .getLocations */ .Vs)undefined49905010(0,_lib_api__WEBPACK_IMPORTED_MODULE_6__/* .getOrCreateDirectRoom */ .QN)undefined50435053(0,_lib_api__WEBPACK_IMPORTED_MODULE_6__/* .sendMessage */ ._z)undefined50935108(0,_lib_api__WEBPACK_IMPORTED_MODULE_6__/* .trackSiteMessage */ .UE)undefined52865296(0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)undefined54815487(0,_lib_api__WEBPACK_IMPORTED_MODULE_6__/* .request */ .Em)undefined59926000(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)undefined66076610(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined67906794(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined69046907(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined70597062(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined72987302(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined75117514(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined77497752(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined80238026(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined85778580(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined87548757(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined95439547(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined98689872(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined1010810111(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1038710390(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1069110694(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1100911012(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1142111424(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1172511728(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1207312076(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1248612489(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1279012793(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1308413087(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1347713480(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1379913802(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1401814022(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined1441914422(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1492314926(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1525115254(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1558115584(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1576515768(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1610716110(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1657416577(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1693916942(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1733217336(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined1749717501(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined1785517858(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1825518258(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1885618860(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined2002620029(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2042620429(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2116721170(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2153421538(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined2193121934(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2255022553(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2287822881(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2320823212(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined2335523359(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined2355123554(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2376223765(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2420024203(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2477924783(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined2491224915(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2543125434(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2606526069(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined2624926252(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2647626479(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2691726920(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2735327356(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2765727660(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2813328136(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2877728781(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined2896028963(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2997429978(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined3020130204(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3087530879(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined3141331416(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3164931652(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3214532148(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3306133064(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3334333347(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined3353233535(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3393533939(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined3412134125(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined3448534488(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3478434787(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3534235345(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3567835682(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined3585435858(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined3643536438(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3688736890(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3760937613(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined3761537623react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragmentundefined3774637749(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3804338046(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3861638620(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined3961539618(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3986139864(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4041940422(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4073140735(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined4206942072(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4247342476(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4333043334(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined4346643469(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4368043683(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4389743900(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4406744071(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined4424944253(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined4443644439(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4474044743(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4537045373(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4585345856(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4629246295(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4662246625(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4712547129(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined4739747400(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4740247410_components_PlanBadge__WEBPACK_IMPORTED_MODULE_5__/* .PlanBadge */ .dundefined4780747811(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined4814148144(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4857448578(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined4942049423(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4983349837(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined5004950053(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined5057250575(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined5106351066(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined5181651820(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined5253052533(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined5302153024(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined5395553958(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined5420554208(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined5433354337(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined5452054524(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined5468754691(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined5491054913(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined5522155224(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined5579555798(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined5616256165(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined5668156685(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined5684856851(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined5709857101(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined5761357617(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined5778057783(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined5803358036(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined5860458608(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined5877158774(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined5902659029(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined5965559659(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined5980359807(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined5996359966(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined6044460447(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined6084860851(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined6126661269(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined6152461527(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined6199962003(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined6200562013react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragmentundefined6244162445(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined6266262666(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined6275962763(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined6294362946(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined6314263145(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined6355663559(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined6412264125(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined6443964442(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined6559365597(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined6607766080(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined6655266555(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined6709267095(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined6729667299(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined6776967772(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined6798267986(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined6845868462(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined6906969072(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined6959169594(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined7018470188(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined7035870361(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined7100571009(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined7210572108(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined7229772300(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined7295772961(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined7305473058(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined7323873241(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined7343973442(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined7385573858(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined7440274405(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined7466174665(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined7534375346(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined7554775551(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined7616476167(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined7656776570(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined7688076883(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined7722877231(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined7753577538(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined7800178004(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined7873178735(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined7882878832(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined7901279015(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined7921279215(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined7962779630(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined8038080383(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined8062680629(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined8109581098(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined8158581589(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined8203982043(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined8227082273(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined8286382866(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined8339183395(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined8363383637(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined8392483927(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined8459484597(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined8539485397(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined8576485767(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined8651486517(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined8745587458(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined8811488118(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined8825088254(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined8843488437(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined8863688639(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined8905389056(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined8954789550(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined8987989883(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined9010990112(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined9032890331(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined9074590748(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined9115391156(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined9143691439(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined9192991933(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined9240192405(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined9260692610(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined9274792751(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined9350093503(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined9496294966(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined9510395106(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined9564795650(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined9712097124(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined9724597249(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined9792797930(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined9927899282(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined9973599738(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined9994799950(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined100371100374(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined101038101041(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined101282101286(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined101600101603(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined101861101865(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined102249102252(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined102981102984(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined103237103240(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined! (webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSourceK__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ BecomeSpecialistPage) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(78157); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31768); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var next_navigation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(71159); /* harmony import */ var _lib_auth__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(13260); /* harmony import */ var _context_locale__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(96484); /* harmony import */ var _lib_api__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(91864); webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcem/* __next_internal_client_entry_do_not_use__ default auto */ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { useState, useEffect } from 'react'; import { useRouter } from 'next/navigation'; import { useSession } from '@/lib/auth'; import { useLocale } from '@/context/locale'; import { request } from '@/lib/api'; export default function BecomeSpecialistPage() { const { data: session, isPending } = useSession(); const router = useRouter(); const { t } = useLocale(); const [loading, setLoading] = useState(false); const [error, setError] = useState(''); const role = session?.user?.role; process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (!isPending && session && role === 'specialist') router.push('/tasks'); }, [ session, isPending, role ]); async function handleBecome() { setLoading(true); setError(''); try { await request('/users/me/become-specialist', { method: 'POST' }); router.push('/specialist-setup'); } catch { setError(t('common.error')); setLoading(false); } } if (isPending || session && role === 'specialist') { return /*#__PURE__*/ _jsx("div", { className: "text-center py-20 text-white", children: t('common.loading') }); } const steps = [ { n: 1, title: t('become_specialist.step1.title'), desc: t('become_specialist.step1.desc'), icon: '🗂️' }, { n: 2, title: t('become_specialist.step2.title'), desc: t('become_specialist.step2.desc'), icon: '🔍' }, { n: 3, title: t('become_specialist.step3.title'), desc: t('become_specialist.step3.desc'), icon: '💰' } ]; const benefits = [ { icon: '🎯', text: t('become_specialist.benefit1') }, { icon: '⭐', text: t('become_specialist.benefit2') }, { icon: '📅', text: t('become_specialist.benefit3') }, { icon: '❤️', text: t('become_specialist.benefit4') } ]; return /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("section", { className: "bg-gradient-to-br from-blue-700 to-blue-500 text-white py-20 px-4", children: /*#__PURE__*/ _jsxs("div", { className: "max-w-3xl mx-auto text-center", children: [ /*#__PURE__*/ _jsx("h1", { className: "text-4xl md:text-5xl font-bold mb-4", children: t('become_specialist.hero.title') }), /*#__PURE__*/ _jsx("p", { className: "text-xl text-blue-100 mb-8", children: t('become_specialist.hero.subtitle') }) ] }) }), /*#__PURE__*/ _jsxs("section", { className: "max-w-4xl mx-auto px-4 py-16", children: [ /*#__PURE__*/ _jsx("h2", { className: "text-2xl font-bold text-white mb-10 text-center", children: t('become_specialist.how.title') }), /*#__PURE__*/ _jsx("div", { className: "grid md:grid-cols-3 gap-8", children: steps.map((step)=>/*#__PURE__*/ _jsxs("div", { className: "text-center", children: [ /*#__PURE__*/ _jsx("div", { className: "w-14 h-14 bg-blue-50 border-2 border-blue-200 rounded-2xl flex items-center justify-center text-2xl mx-auto mb-4", children: step.icon }), /*#__PURE__*/ _jsx("div", { className: "w-7 h-7 bg-blue-600 text-white rounded-full flex items-center justify-center text-sm font-bold mx-auto -mt-1 mb-3", children: step.n }), /*#__PURE__*/ _jsx("h3", { className: "font-semibold text-white text-lg mb-2", children: step.title }), /*#__PURE__*/ _jsx("p", { className: "text-blue-100 text-sm leading-relaxed", children: step.desc }) ] }, step.n)) }) ] }), /*#__PURE__*/ _jsx("section", { className: "bg-gray-50 py-14 px-4", children: /*#__PURE__*/ _jsxs("div", { className: "max-w-3xl mx-auto", children: [ /*#__PURE__*/ _jsx("h2", { className: "text-2xl font-bold text-gray-900 mb-8 text-center", children: t('become_specialist.benefits.title') }), /*#__PURE__*/ _jsx("div", { className: "grid sm:grid-cols-2 gap-4", children: benefits.map((b, i)=>/*#__PURE__*/ _jsxs("div", { className: "flex items-start gap-4 bg-white rounded-xl border border-gray-200 p-5", children: [ /*#__PURE__*/ _jsx("span", { className: "text-2xl shrink-0", children: b.icon }), /*#__PURE__*/ _jsx("p", { className: "text-gray-700 font-medium leading-snug", children: b.text }) ] }, i)) }) ] }) }), /*#__PURE__*/ _jsx("section", { className: "py-16 px-4 text-center", children: /*#__PURE__*/ _jsxs("div", { className: "max-w-md mx-auto", children: [ error && /*#__PURE__*/ _jsx("p", { className: "text-red-500 text-sm mb-4", children: error }), session ? /*#__PURE__*/ _jsx("button", { onClick: handleBecome, disabled: loading, className: "w-full bg-blue-600 text-white px-8 py-4 rounded-xl font-bold text-lg hover:bg-blue-700 disabled:opacity-60 transition", children: loading ? t('common.loading') : t('profile.become_specialist') }) : /*#__PURE__*/ _jsx("a", { href: "/register?role=specialist", className: "block w-full bg-blue-600 text-white px-8 py-4 rounded-xl font-bold text-lg hover:bg-blue-700 transition text-center", children: t('profile.become_specialist') }) ] }) }) ] }); } c(={}_,.QSa#KRa e 8 _< H K (+_b[^RUILL[^[^#&(0,_lib_auth__WEBPACK_IMPORTED_MODULE_3__/* .useSession */ .wV)(0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useRouter)(0,_context_locale__WEBPACK_IMPORTED_MODULE_4__/* .useLocale */ .Y)(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(0,_lib_api__WEBPACK_IMPORTED_MODULE_5__/* .request */ .Em)(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ BecomeSpecialistPage) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(78157); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31768); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var next_navigation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(71159); /* harmony import */ var _lib_auth__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(13260); /* harmony import */ var _context_locale__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(96484); /* harmony import */ var _lib_api__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(91864); /* __next_internal_client_entry_do_not_use__ default auto */ function BecomeSpecialistPage() { const { data: session, isPending } = (0,_lib_auth__WEBPACK_IMPORTED_MODULE_3__/* .useSession */ .wV)(); const router = (0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useRouter)(); const { t } = (0,_context_locale__WEBPACK_IMPORTED_MODULE_4__/* .useLocale */ .Y)(); const [loading, setLoading] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [error, setError] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''); const role = session?.user?.role; process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{ if (!isPending && session && role === 'specialist') router.push('/tasks'); }, [ session, isPending, role ]); async function handleBecome() { setLoading(true); setError(''); try { await (0,_lib_api__WEBPACK_IMPORTED_MODULE_5__/* .request */ .Em)('/users/me/become-specialist', { method: 'POST' }); router.push('/specialist-setup'); } catch { setError(t('common.error')); setLoading(false); } } if (isPending || session && role === 'specialist') { return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "text-center py-20 text-white", children: t('common.loading') }); } const steps = [ { n: 1, title: t('become_specialist.step1.title'), desc: t('become_specialist.step1.desc'), icon: '🗂️' }, { n: 2, title: t('become_specialist.step2.title'), desc: t('become_specialist.step2.desc'), icon: '🔍' }, { n: 3, title: t('become_specialist.step3.title'), desc: t('become_specialist.step3.desc'), icon: '💰' } ]; const benefits = [ { icon: '🎯', text: t('become_specialist.benefit1') }, { icon: '⭐', text: t('become_specialist.benefit2') }, { icon: '📅', text: t('become_specialist.benefit3') }, { icon: '❤️', text: t('become_specialist.benefit4') } ]; return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("section", { className: "bg-gradient-to-br from-blue-700 to-blue-500 text-white py-20 px-4", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "max-w-3xl mx-auto text-center", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h1", { className: "text-4xl md:text-5xl font-bold mb-4", children: t('become_specialist.hero.title') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-xl text-blue-100 mb-8", children: t('become_specialist.hero.subtitle') }) ] }) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("section", { className: "max-w-4xl mx-auto px-4 py-16", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h2", { className: "text-2xl font-bold text-white mb-10 text-center", children: t('become_specialist.how.title') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "grid md:grid-cols-3 gap-8", children: steps.map((step)=>/*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "text-center", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "w-14 h-14 bg-blue-50 border-2 border-blue-200 rounded-2xl flex items-center justify-center text-2xl mx-auto mb-4", children: step.icon }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "w-7 h-7 bg-blue-600 text-white rounded-full flex items-center justify-center text-sm font-bold mx-auto -mt-1 mb-3", children: step.n }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h3", { className: "font-semibold text-white text-lg mb-2", children: step.title }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-blue-100 text-sm leading-relaxed", children: step.desc }) ] }, step.n)) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("section", { className: "bg-gray-50 py-14 px-4", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "max-w-3xl mx-auto", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h2", { className: "text-2xl font-bold text-gray-900 mb-8 text-center", children: t('become_specialist.benefits.title') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "grid sm:grid-cols-2 gap-4", children: benefits.map((b, i)=>/*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "flex items-start gap-4 bg-white rounded-xl border border-gray-200 p-5", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: "text-2xl shrink-0", children: b.icon }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-gray-700 font-medium leading-snug", children: b.text }) ] }, i)) }) ] }) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("section", { className: "py-16 px-4 text-center", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "max-w-md mx-auto", children: [ error && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-red-500 text-sm mb-4", children: error }), session ? /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { onClick: handleBecome, disabled: loading, className: "w-full bg-blue-600 text-white px-8 py-4 rounded-xl font-bold text-lg hover:bg-blue-700 disabled:opacity-60 transition", children: loading ? t('common.loading') : t('profile.become_specialist') }) : /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("a", { href: "/register?role=specialist", className: "block w-full bg-blue-600 text-white px-8 py-4 rounded-xl font-bold text-lg hover:bg-blue-700 transition text-center", children: t('profile.become_specialist') }) ] }) }) ] }); }  K__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ BecomeSpecialistPage) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(78157); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31768); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var next_navigation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(71159); /* harmony import */ var _lib_auth__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(13260); /* harmony import */ var _context_locale__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(96484); /* harmony import */ var _lib_api__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(91864); ] 61123undefined125168undefined170213undefined215254undefined256300undefined302337undefined339353undefined429438(0,_lib_auth__WEBPACK_IMPORTED_MODULE_3__/* .useSession */ .wV)undefined462470(0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useRouter)undefined493501(0,_context_locale__WEBPACK_IMPORTED_MODULE_4__/* .useLocale */ .Y)undefined540547(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined587594(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined694702(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)undefined975981(0,_lib_api__WEBPACK_IMPORTED_MODULE_5__/* .request */ .Em)undefined13021305(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined24012405(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined24622465(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined26162620(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined27652768(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined29942997(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined32603264(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined34003403(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined36243627(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined37683772(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined39353938(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined42664269(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined45954598(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined48514854(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined52115214(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined53215325(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined54585461(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined57055708(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined58605864(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined60976100(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined63476350(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined67476750(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined68586862(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined70037006(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined72037206(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined76227625(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined\ (<webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ MakeOfferPage) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(78157); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31768); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var next_navigation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(71159); /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(94496); /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_link__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _lib_auth__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(13260); /* harmony import */ var _context_locale__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(96484); /* harmony import */ var _lib_api__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(91864); /* harmony import */ var _lib_formatName__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(48178); /* harmony import */ var _lib_taskLocale__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(8293); webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSource./* __next_internal_client_entry_do_not_use__ default auto */ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { useState, useEffect } from 'react'; import { useRouter, useParams } from 'next/navigation'; import Link from 'next/link'; import { useSession } from '@/lib/auth'; import { useLocale } from '@/context/locale'; import { getTask, createOffer, getLocations } from '@/lib/api'; import { shortName } from '@/lib/formatName'; import { formatPrice, taskTitle, taskDescription } from '@/lib/taskLocale'; export default function MakeOfferPage() { const { id } = useParams(); const router = useRouter(); const { data: session, isPending } = useSession(); const { t, locale } = useLocale(); const [task, setTask] = useState(null); const [loading, setLoading] = useState(true); const [rawLocs, setRawLocs] = useState([]); const [submitting, setSubmitting] = useState(false); const [error, setError] = useState(''); const locMap = rawLocs.reduce((acc, city)=>{ acc[city.slug] = city.names?.[locale] ?? city.names?.el ?? city.slug; for (const d of city.children ?? []){ acc[d.slug] = d.names?.[locale] ?? d.names?.el ?? d.slug; } return acc; }, {}); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (!isPending && !session) router.push('/login'); }, [ session, isPending ]); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (!id) return; getTask(id).then((data)=>setTask(data)).catch(()=>router.push(`/tasks/${id}`)).finally(()=>setLoading(false)); getLocations().then((locs)=>setRawLocs(locs)).catch(()=>{}); }, [ id ]); async function handleSubmit(e) { e.preventDefault(); setError(''); setSubmitting(true); const form = new FormData(e.currentTarget); try { await createOffer({ taskId: id, price: Number(form.get('price')), message: form.get('message') || undefined }); router.push(`/tasks/${id}`); } catch (err) { setError(err.message || t('common.error')); } finally{ setSubmitting(false); } } if (isPending || loading) { return /*#__PURE__*/ _jsx("div", { className: "text-center py-20 text-white", children: t('common.loading') }); } const taskData = task?.task ?? task; const customer = task?.customer; const customerName = customer?.name ? shortName(customer.name) : null; return /*#__PURE__*/ _jsxs("div", { className: "max-w-xl mx-auto px-4 py-10", children: [ /*#__PURE__*/ _jsxs(Link, { href: `/tasks/${id}`, className: "inline-flex items-center gap-1.5 text-sm text-white/70 hover:text-white mb-8 transition", children: [ /*#__PURE__*/ _jsx("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 19l-7-7 7-7" }) }), taskData?.title ?? t('common.back') ] }), /*#__PURE__*/ _jsx("h1", { className: "text-2xl font-bold text-white mb-1", children: t('task.offer.btn') }), customerName && /*#__PURE__*/ _jsxs("p", { className: "text-sm text-white/60 mb-6", children: [ t('common.from'), " ", customerName ] }), taskData && /*#__PURE__*/ _jsxs("div", { className: "bg-white rounded-xl border border-gray-200 p-4 mb-6 shadow-sm", children: [ /*#__PURE__*/ _jsx("p", { className: "font-semibold text-gray-900 text-sm line-clamp-2", children: taskTitle(taskData, locale) }), taskDescription(taskData, locale) && /*#__PURE__*/ _jsx("p", { className: "text-gray-500 text-xs mt-1 line-clamp-2", children: taskDescription(taskData, locale) }), /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-4 mt-2", children: [ taskData.budget && /*#__PURE__*/ _jsxs("span", { className: "text-xs text-gray-500", children: [ "\uD83D\uDCB0 ", t('task.budget'), ": ", /*#__PURE__*/ _jsxs("strong", { className: "text-gray-900", children: [ formatPrice(taskData.budget), "€" ] }) ] }), taskData.budgetNegotiable && !taskData.budget && /*#__PURE__*/ _jsxs("span", { className: "text-xs text-gray-500", children: [ "\uD83D\uDCAC ", t('task.budget_negotiable') ] }), taskData.location && /*#__PURE__*/ _jsxs("span", { className: "text-xs text-gray-500", children: [ "\uD83D\uDCCD ", locMap[taskData.location] ?? taskData.location ] }) ] }) ] }), /*#__PURE__*/ _jsxs("form", { onSubmit: handleSubmit, className: "bg-white rounded-2xl border border-gray-100 p-6 shadow-sm space-y-5", children: [ error && /*#__PURE__*/ _jsx("div", { className: "bg-red-50 text-red-700 p-3 rounded-lg text-sm", children: error }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsxs("label", { className: "block text-sm font-medium text-gray-700 mb-1.5", children: [ t('offer.price'), " (€) ", /*#__PURE__*/ _jsx("span", { className: "text-red-500", children: "*" }) ] }), /*#__PURE__*/ _jsxs("div", { className: "relative", children: [ /*#__PURE__*/ _jsx("span", { className: "absolute left-3 top-1/2 -translate-y-1/2 text-gray-400 font-medium select-none", children: "€" }), /*#__PURE__*/ _jsx("input", { name: "price", type: "number", required: true, min: 1, step: 1, placeholder: t('offer.price.placeholder'), className: "w-full border border-gray-200 rounded-xl pl-8 pr-3 py-3 focus:outline-none focus:ring-2 focus:ring-blue-400 text-xl font-bold text-gray-900" }) ] }), taskData?.budget && /*#__PURE__*/ _jsxs("p", { className: "text-xs text-gray-400 mt-1.5", children: [ t('offer.customer_budget'), ": ", /*#__PURE__*/ _jsxs("strong", { children: [ formatPrice(taskData.budget), "€" ] }) ] }) ] }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsxs("label", { className: "block text-sm font-medium text-gray-700 mb-1.5", children: [ t('offer.message'), /*#__PURE__*/ _jsxs("span", { className: "text-gray-400 font-normal ml-1", children: [ "(", t('offer.optional'), ")" ] }) ] }), /*#__PURE__*/ _jsx("textarea", { name: "message", rows: 5, maxLength: 2000, placeholder: t('offer.message.placeholder'), className: "w-full border border-gray-200 rounded-xl px-3 py-2.5 focus:outline-none focus:ring-2 focus:ring-blue-400 resize-none text-sm text-gray-700" }) ] }), /*#__PURE__*/ _jsxs("div", { className: "flex gap-3 pt-1", children: [ /*#__PURE__*/ _jsx("button", { type: "submit", disabled: submitting, className: "flex-1 bg-blue-600 text-white py-3 rounded-xl font-semibold hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed transition", children: submitting ? t('offer.submitting') : t('task.offer.btn') }), /*#__PURE__*/ _jsx(Link, { href: `/tasks/${id}`, className: "px-5 py-3 rounded-xl border border-gray-200 text-gray-600 hover:bg-gray-50 font-medium text-sm flex items-center transition", children: t('common.cancel') }) ] }) ] }) ] }); } c@={}_')UWNVnv'.Y`_ ( ~@ C 9 A s w 25_ (hv%sw&*mq#-_clo04\{~r"v"##$$8%<%%%&&((**:+=+----(0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useParams)(0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useRouter)(0,_lib_auth__WEBPACK_IMPORTED_MODULE_4__/* .useSession */ .wV)(0,_context_locale__WEBPACK_IMPORTED_MODULE_5__/* .useLocale */ .Y)(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(0,_lib_api__WEBPACK_IMPORTED_MODULE_6__/* .getTask */ .gg)(0,_lib_api__WEBPACK_IMPORTED_MODULE_6__/* .getLocations */ .Vs)(0,_lib_api__WEBPACK_IMPORTED_MODULE_6__/* .createOffer */ .ts)(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(0,_lib_formatName__WEBPACK_IMPORTED_MODULE_7__/* .shortName */ .E)(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(next_link__WEBPACK_IMPORTED_MODULE_3___default())(0,_lib_taskLocale__WEBPACK_IMPORTED_MODULE_8__/* .taskTitle */ .Oj)(0,_lib_taskLocale__WEBPACK_IMPORTED_MODULE_8__/* .taskDescription */ .GZ)(0,_lib_taskLocale__WEBPACK_IMPORTED_MODULE_8__/* .formatPrice */ .$g)l=__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ MakeOfferPage) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(78157); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31768); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var next_navigation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(71159); /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(94496); /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_link__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _lib_auth__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(13260); /* harmony import */ var _context_locale__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(96484); /* harmony import */ var _lib_api__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(91864); /* harmony import */ var _lib_formatName__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(48178); /* harmony import */ var _lib_taskLocale__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(8293); /* __next_internal_client_entry_do_not_use__ default auto */ function MakeOfferPage() { const { id } = (0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useParams)(); const router = (0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useRouter)(); const { data: session, isPending } = (0,_lib_auth__WEBPACK_IMPORTED_MODULE_4__/* .useSession */ .wV)(); const { t, locale } = (0,_context_locale__WEBPACK_IMPORTED_MODULE_5__/* .useLocale */ .Y)(); const [task, setTask] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null); const [loading, setLoading] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(true); const [rawLocs, setRawLocs] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)([]); const [submitting, setSubmitting] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [error, setError] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''); const locMap = rawLocs.reduce((acc, city)=>{ acc[city.slug] = city.names?.[locale] ?? city.names?.el ?? city.slug; for (const d of city.children ?? []){ acc[d.slug] = d.names?.[locale] ?? d.names?.el ?? d.slug; } return acc; }, {}); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{ if (!isPending && !session) router.push('/login'); }, [ session, isPending ]); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{ if (!id) return; (0,_lib_api__WEBPACK_IMPORTED_MODULE_6__/* .getTask */ .gg)(id).then((data)=>setTask(data)).catch(()=>router.push(`/tasks/${id}`)).finally(()=>setLoading(false)); (0,_lib_api__WEBPACK_IMPORTED_MODULE_6__/* .getLocations */ .Vs)().then((locs)=>setRawLocs(locs)).catch(()=>{}); }, [ id ]); async function handleSubmit(e) { e.preventDefault(); setError(''); setSubmitting(true); const form = new FormData(e.currentTarget); try { await (0,_lib_api__WEBPACK_IMPORTED_MODULE_6__/* .createOffer */ .ts)({ taskId: id, price: Number(form.get('price')), message: form.get('message') || undefined }); router.push(`/tasks/${id}`); } catch (err) { setError(err.message || t('common.error')); } finally{ setSubmitting(false); } } if (isPending || loading) { return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "text-center py-20 text-white", children: t('common.loading') }); } const taskData = task?.task ?? task; const customer = task?.customer; const customerName = customer?.name ? (0,_lib_formatName__WEBPACK_IMPORTED_MODULE_7__/* .shortName */ .E)(customer.name) : null; return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "max-w-xl mx-auto px-4 py-10", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)((next_link__WEBPACK_IMPORTED_MODULE_3___default()), { href: `/tasks/${id}`, className: "inline-flex items-center gap-1.5 text-sm text-white/70 hover:text-white mb-8 transition", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 19l-7-7 7-7" }) }), taskData?.title ?? t('common.back') ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h1", { className: "text-2xl font-bold text-white mb-1", children: t('task.offer.btn') }), customerName && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("p", { className: "text-sm text-white/60 mb-6", children: [ t('common.from'), " ", customerName ] }), taskData && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "bg-white rounded-xl border border-gray-200 p-4 mb-6 shadow-sm", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "font-semibold text-gray-900 text-sm line-clamp-2", children: (0,_lib_taskLocale__WEBPACK_IMPORTED_MODULE_8__/* .taskTitle */ .Oj)(taskData, locale) }), (0,_lib_taskLocale__WEBPACK_IMPORTED_MODULE_8__/* .taskDescription */ .GZ)(taskData, locale) && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-gray-500 text-xs mt-1 line-clamp-2", children: (0,_lib_taskLocale__WEBPACK_IMPORTED_MODULE_8__/* .taskDescription */ .GZ)(taskData, locale) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "flex items-center gap-4 mt-2", children: [ taskData.budget && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("span", { className: "text-xs text-gray-500", children: [ "\uD83D\uDCB0 ", t('task.budget'), ": ", /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("strong", { className: "text-gray-900", children: [ (0,_lib_taskLocale__WEBPACK_IMPORTED_MODULE_8__/* .formatPrice */ .$g)(taskData.budget), "€" ] }) ] }), taskData.budgetNegotiable && !taskData.budget && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("span", { className: "text-xs text-gray-500", children: [ "\uD83D\uDCAC ", t('task.budget_negotiable') ] }), taskData.location && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("span", { className: "text-xs text-gray-500", children: [ "\uD83D\uDCCD ", locMap[taskData.location] ?? taskData.location ] }) ] }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("form", { onSubmit: handleSubmit, className: "bg-white rounded-2xl border border-gray-100 p-6 shadow-sm space-y-5", children: [ error && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "bg-red-50 text-red-700 p-3 rounded-lg text-sm", children: error }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("label", { className: "block text-sm font-medium text-gray-700 mb-1.5", children: [ t('offer.price'), " (€) ", /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: "text-red-500", children: "*" }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "relative", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: "absolute left-3 top-1/2 -translate-y-1/2 text-gray-400 font-medium select-none", children: "€" }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input", { name: "price", type: "number", required: true, min: 1, step: 1, placeholder: t('offer.price.placeholder'), className: "w-full border border-gray-200 rounded-xl pl-8 pr-3 py-3 focus:outline-none focus:ring-2 focus:ring-blue-400 text-xl font-bold text-gray-900" }) ] }), taskData?.budget && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("p", { className: "text-xs text-gray-400 mt-1.5", children: [ t('offer.customer_budget'), ": ", /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("strong", { children: [ (0,_lib_taskLocale__WEBPACK_IMPORTED_MODULE_8__/* .formatPrice */ .$g)(taskData.budget), "€" ] }) ] }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("label", { className: "block text-sm font-medium text-gray-700 mb-1.5", children: [ t('offer.message'), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("span", { className: "text-gray-400 font-normal ml-1", children: [ "(", t('offer.optional'), ")" ] }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("textarea", { name: "message", rows: 5, maxLength: 2000, placeholder: t('offer.message.placeholder'), className: "w-full border border-gray-200 rounded-xl px-3 py-2.5 focus:outline-none focus:ring-2 focus:ring-blue-400 resize-none text-sm text-gray-700" }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "flex gap-3 pt-1", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { type: "submit", disabled: submitting, className: "flex-1 bg-blue-600 text-white py-3 rounded-xl font-semibold hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed transition", children: submitting ? t('offer.submitting') : t('task.offer.btn') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)((next_link__WEBPACK_IMPORTED_MODULE_3___default()), { href: `/tasks/${id}`, className: "px-5 py-3 rounded-xl border border-gray-200 text-gray-600 hover:bg-gray-50 font-medium text-sm flex items-center transition", children: t('common.cancel') }) ] }) ] }) ] }); }  __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ MakeOfferPage) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(78157); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31768); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var next_navigation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(71159); /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(94496); /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_link__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _lib_auth__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(13260); /* harmony import */ var _context_locale__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(96484); /* harmony import */ var _lib_api__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(91864); /* harmony import */ var _lib_formatName__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(48178); /* harmony import */ var _lib_taskLocale__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(8293); ./* __next_internal_client_entry_do_not_use__ default auto */ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { useState, useEffect } from 'react'; import { useRouter, useParams } from 'next/navigation'; import Link from 'next/link'; import { useSession } from '@/lib/auth'; import { useLocale } from '@/context/locale'; import { getTask, createOffer, getLocations } from '@/lib/api'; import { shortName } from '@/lib/formatName'; import { formatPrice, taskTitle, taskDescription } from '@/lib/taskLocale'; export default function MakeOfferPage() { const { id } = useParams(); const router = useRouter(); const { data: session, isPending } = useSession(); const { t, locale } = useLocale(); const [task, setTask] = useState(null); const [loading, setLoading] = useState(true); const [rawLocs, setRawLocs] = useState([]); const [submitting, setSubmitting] = useState(false); const [error, setError] = useState(''); const locMap = rawLocs.reduce((acc, city)=>{ acc[city.slug] = city.names?.[locale] ?? city.names?.el ?? city.slug; for (const d of city.children ?? []){ acc[d.slug] = d.names?.[locale] ?? d.names?.el ?? d.slug; } return acc; }, {}); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (!isPending && !session) router.push('/login'); }, [ session, isPending ]); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (!id) return; getTask(id).then((data)=>setTask(data)).catch(()=>router.push(`/tasks/${id}`)).finally(()=>setLoading(false)); getLocations().then((locs)=>setRawLocs(locs)).catch(()=>{}); }, [ id ]); async function handleSubmit(e) { e.preventDefault(); setError(''); setSubmitting(true); const form = new FormData(e.currentTarget); try { await createOffer({ taskId: id, price: Number(form.get('price')), message: form.get('message') || undefined }); router.push(`/tasks/${id}`); } catch (err) { setError(err.message || t('common.error')); } finally{ setSubmitting(false); } } if (isPending || loading) { return /*#__PURE__*/ _jsx("div", { className: "text-center py-20 text-white", children: t('common.loading') }); } const taskData = task?.task ?? task; const customer = task?.customer; const customerName = customer?.name ? shortName(customer.name) : null; return /*#__PURE__*/ _jsxs("div", { className: "max-w-xl mx-auto px-4 py-10", children: [ /*#__PURE__*/ _jsxs(Link, { href: `/tasks/${id}`, className: "inline-flex items-center gap-1.5 text-sm text-white/70 hover:text-white mb-8 transition", children: [ /*#__PURE__*/ _jsx("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 19l-7-7 7-7" }) }), taskData?.title ?? t('common.back') ] }), /*#__PURE__*/ _jsx("h1", { className: "text-2xl font-bold text-white mb-1", children: t('task.offer.btn') }), customerName && /*#__PURE__*/ _jsxs("p", { className: "text-sm text-white/60 mb-6", children: [ t('common.from'), " ", customerName ] }), taskData && /*#__PURE__*/ _jsxs("div", { className: "bg-white rounded-xl border border-gray-200 p-4 mb-6 shadow-sm", children: [ /*#__PURE__*/ _jsx("p", { className: "font-semibold text-gray-900 text-sm line-clamp-2", children: taskTitle(taskData, locale) }), taskDescription(taskData, locale) && /*#__PURE__*/ _jsx("p", { className: "text-gray-500 text-xs mt-1 line-clamp-2", children: taskDescription(taskData, locale) }), /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-4 mt-2", children: [ taskData.budget && /*#__PURE__*/ _jsxs("span", { className: "text-xs text-gray-500", children: [ "\uD83D\uDCB0 ", t('task.budget'), ": ", /*#__PURE__*/ _jsxs("strong", { className: "text-gray-900", children: [ formatPrice(taskData.budget), "€" ] }) ] }), taskData.budgetNegotiable && !taskData.budget && /*#__PURE__*/ _jsxs("span", { className: "text-xs text-gray-500", children: [ "\uD83D\uDCAC ", t('task.budget_negotiable') ] }), taskData.location && /*#__PURE__*/ _jsxs("span", { className: "text-xs text-gray-500", children: [ "\uD83D\uDCCD ", locMap[taskData.location] ?? taskData.location ] }) ] }) ] }), /*#__PURE__*/ _jsxs("form", { onSubmit: handleSubmit, className: "bg-white rounded-2xl border border-gray-100 p-6 shadow-sm space-y-5", children: [ error && /*#__PURE__*/ _jsx("div", { className: "bg-red-50 text-red-700 p-3 rounded-lg text-sm", children: error }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsxs("label", { className: "block text-sm font-medium text-gray-700 mb-1.5", children: [ t('offer.price'), " (€) ", /*#__PURE__*/ _jsx("span", { className: "text-red-500", children: "*" }) ] }), /*#__PURE__*/ _jsxs("div", { className: "relative", children: [ /*#__PURE__*/ _jsx("span", { className: "absolute left-3 top-1/2 -translate-y-1/2 text-gray-400 font-medium select-none", children: "€" }), /*#__PURE__*/ _jsx("input", { name: "price", type: "number", required: true, min: 1, step: 1, placeholder: t('offer.price.placeholder'), className: "w-full border border-gray-200 rounded-xl pl-8 pr-3 py-3 focus:outline-none focus:ring-2 focus:ring-blue-400 text-xl font-bold text-gray-900" }) ] }), taskData?.budget && /*#__PURE__*/ _jsxs("p", { className: "text-xs text-gray-400 mt-1.5", children: [ t('offer.customer_budget'), ": ", /*#__PURE__*/ _jsxs("strong", { children: [ formatPrice(taskData.budget), "€" ] }) ] }) ] }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsxs("label", { className: "block text-sm font-medium text-gray-700 mb-1.5", children: [ t('offer.message'), /*#__PURE__*/ _jsxs("span", { className: "text-gray-400 font-normal ml-1", children: [ "(", t('offer.optional'), ")" ] }) ] }), /*#__PURE__*/ _jsx("textarea", { name: "message", rows: 5, maxLength: 2000, placeholder: t('offer.message.placeholder'), className: "w-full border border-gray-200 rounded-xl px-3 py-2.5 focus:outline-none focus:ring-2 focus:ring-blue-400 resize-none text-sm text-gray-700" }) ] }), /*#__PURE__*/ _jsxs("div", { className: "flex gap-3 pt-1", children: [ /*#__PURE__*/ _jsx("button", { type: "submit", disabled: submitting, className: "flex-1 bg-blue-600 text-white py-3 rounded-xl font-semibold hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed transition", children: submitting ? t('offer.submitting') : t('task.offer.btn') }), /*#__PURE__*/ _jsx(Link, { href: `/tasks/${id}`, className: "px-5 py-3 rounded-xl border border-gray-200 text-gray-600 hover:bg-gray-50 font-medium text-sm flex items-center transition", children: t('common.cancel') }) ] }) ] }) ] }); } 61123undefined125168undefined170224undefined226254undefined256295undefined297341undefined343405undefined407451undefined453527undefined529543undefined590598(0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useParams)undefined622630(0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useRouter)undefined676685(0,_lib_auth__WEBPACK_IMPORTED_MODULE_4__/* .useSession */ .wV)undefined716724(0,_context_locale__WEBPACK_IMPORTED_MODULE_5__/* .useLocale */ .Y)undefined757764(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined807814(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined857864(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined911918(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined958965(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined13121320(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)undefined14941502(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)undefined15431549(0,_lib_api__WEBPACK_IMPORTED_MODULE_6__/* .getTask */ .gg)undefined16621673(0,_lib_api__WEBPACK_IMPORTED_MODULE_6__/* .getLocations */ .Vs)undefined19511961(0,_lib_api__WEBPACK_IMPORTED_MODULE_6__/* .createOffer */ .ts)undefined23682371(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined26172625(0,_lib_formatName__WEBPACK_IMPORTED_MODULE_7__/* .shortName */ .E)undefined26752679(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined27862790(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined27922795(next_link__WEBPACK_IMPORTED_MODULE_3___default())undefined30183021(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined32983301(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined36343637(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined38163820(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined40824086(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined42514254(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined43844392(0,_lib_taskLocale__WEBPACK_IMPORTED_MODULE_8__/* .taskTitle */ .Oj)undefined44564470(0,_lib_taskLocale__WEBPACK_IMPORTED_MODULE_8__/* .taskDescription */ .GZ)undefined45074510(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined46314645(0,_lib_taskLocale__WEBPACK_IMPORTED_MODULE_8__/* .taskDescription */ .GZ)undefined47234727(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined49024906(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined52295233(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined54115421(0,_lib_taskLocale__WEBPACK_IMPORTED_MODULE_8__/* .formatPrice */ .$g)undefined57275731(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined61016105(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined65396543(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined67646767(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined69606964(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined70537057(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined73567359(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined76397643(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined78037806(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined80958098(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined88188822(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined91069110(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined92209230(0,_lib_taskLocale__WEBPACK_IMPORTED_MODULE_8__/* .formatPrice */ .$g)undefined95289532(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined96219625(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined98819885(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined1038510388(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1091910923(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined1106611069(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1154111544(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1154611549(next_link__WEBPACK_IMPORTED_MODULE_3___default())undefined z{ |Pwebpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSourceH__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ NotificationsPage) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(78157); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31768); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var next_navigation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(71159); /* harmony import */ var _lib_auth__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(13260); /* harmony import */ var _context_locale__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(96484); /* harmony import */ var _lib_api__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(91864); webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourceE/* __next_internal_client_entry_do_not_use__ default auto */ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { useEffect, useState } from 'react'; import { useRouter } from 'next/navigation'; import { useSession } from '@/lib/auth'; import { useLocale } from '@/context/locale'; import { getNotifications, markAllRead, markRead, dismissNotification } from '@/lib/api'; function NotifIcon({ type }) { const cls = 'w-5 h-5'; switch(type){ case 'new_offer': return /*#__PURE__*/ _jsxs("svg", { className: cls, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [ /*#__PURE__*/ _jsx("rect", { x: "2", y: "7", width: "20", height: "14", rx: "2" }), /*#__PURE__*/ _jsx("path", { d: "M16 21V5a2 2 0 00-2-2h-4a2 2 0 00-2 2v16" }) ] }); case 'offer_accepted': return /*#__PURE__*/ _jsxs("svg", { className: cls, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [ /*#__PURE__*/ _jsx("circle", { cx: "12", cy: "12", r: "10" }), /*#__PURE__*/ _jsx("polyline", { points: "9 12 11 14 15 10" }) ] }); case 'offer_declined': return /*#__PURE__*/ _jsxs("svg", { className: cls, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [ /*#__PURE__*/ _jsx("circle", { cx: "12", cy: "12", r: "10" }), /*#__PURE__*/ _jsx("line", { x1: "15", y1: "9", x2: "9", y2: "15" }), /*#__PURE__*/ _jsx("line", { x1: "9", y1: "9", x2: "15", y2: "15" }) ] }); case 'task_completed': return /*#__PURE__*/ _jsx("svg", { className: cls, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: /*#__PURE__*/ _jsx("polyline", { points: "20 6 9 17 4 12" }) }); case 'task_cancelled': return /*#__PURE__*/ _jsxs("svg", { className: cls, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [ /*#__PURE__*/ _jsx("path", { d: "M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z" }), /*#__PURE__*/ _jsx("line", { x1: "12", y1: "9", x2: "12", y2: "13" }), /*#__PURE__*/ _jsx("line", { x1: "12", y1: "17", x2: "12.01", y2: "17" }) ] }); case 'new_message': return /*#__PURE__*/ _jsx("svg", { className: cls, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: /*#__PURE__*/ _jsx("path", { d: "M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z" }) }); case 'new_review': return /*#__PURE__*/ _jsx("svg", { className: cls, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: /*#__PURE__*/ _jsx("polygon", { points: "12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" }) }); case 'task_invite': return /*#__PURE__*/ _jsxs("svg", { className: cls, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [ /*#__PURE__*/ _jsx("path", { d: "M16 4h2a2 2 0 012 2v14a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2h2" }), /*#__PURE__*/ _jsx("rect", { x: "8", y: "2", width: "8", height: "4", rx: "1", ry: "1" }) ] }); default: return /*#__PURE__*/ _jsxs("svg", { className: cls, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [ /*#__PURE__*/ _jsx("path", { d: "M18 8A6 6 0 006 8c0 7-3 9-3 9h18s-3-2-3-9" }), /*#__PURE__*/ _jsx("path", { d: "M13.73 21a2 2 0 01-3.46 0" }) ] }); } } const typeColor = { new_offer: 'bg-blue-100 text-blue-600', offer_accepted: 'bg-green-100 text-green-600', offer_declined: 'bg-red-100 text-red-600', task_completed: 'bg-emerald-100 text-emerald-600', task_cancelled: 'bg-amber-100 text-amber-600', new_message: 'bg-purple-100 text-purple-600', new_review: 'bg-yellow-100 text-yellow-600', task_invite: 'bg-indigo-100 text-indigo-600' }; /** Extract the quoted task title from a stored body string (any locale) */ function extractParam(body) { if (!body) return null; const m = body.match(/[«""](.+?)[»""]/); return m?.[1] ?? null; } /** Extract rating number from a stored review body */ function extractRating(body) { if (!body) return null; const m = body.match(/(\d+)\s*[★\*]/); return m?.[1] ?? null; } export default function NotificationsPage() { const { data: session, isPending } = useSession(); const router = useRouter(); const { t, locale } = useLocale(); const [notifications, setNotifications] = useState([]); const [loading, setLoading] = useState(true); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (!isPending && !session) router.push('/login'); }, [ session, isPending ]); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (!session) return; getNotifications().then(setNotifications).catch(()=>{}).finally(()=>setLoading(false)); }, [ session ]); async function handleMarkAll() { await markAllRead(); setNotifications((prev)=>prev.map((n)=>({ ...n, isRead: true }))); } async function handleMark(id) { await markRead(id); setNotifications((prev)=>prev.map((n)=>n.id === id ? { ...n, isRead: true } : n)); } async function handleDismiss(e, id) { e.stopPropagation(); await dismissNotification(id).catch(()=>{}); setNotifications((prev)=>prev.filter((n)=>n.id !== id)); } if (isPending || loading) return /*#__PURE__*/ _jsx("div", { className: "text-center py-20 text-white", children: t('common.loading') }); function relativeTime(dateStr) { const diff = Date.now() - new Date(dateStr).getTime(); const sec = Math.floor(diff / 1000); const min = Math.floor(sec / 60); const hrs = Math.floor(min / 60); const days = Math.floor(hrs / 24); if (locale === 'ru') { if (sec < 60) return 'только что'; if (min < 60) return `${min} мин. назад`; if (hrs < 24) return `${hrs} ч. назад`; if (days === 1) return 'вчера'; if (days < 7) return `${days} дн. назад`; } else if (locale === 'en') { if (sec < 60) return 'just now'; if (min < 60) return `${min}m ago`; if (hrs < 24) return `${hrs}h ago`; if (days === 1) return 'yesterday'; if (days < 7) return `${days}d ago`; } else { if (sec < 60) return 'μόλις τώρα'; if (min < 60) return `${min} λ. πριν`; if (hrs < 24) return `${hrs} ω. πριν`; if (days === 1) return 'χθες'; if (days < 7) return `${days} μ. πριν`; } return new Date(dateStr).toLocaleDateString(dateLocale, { day: 'numeric', month: 'short', year: days > 365 ? 'numeric' : undefined }); } const unreadCount = notifications.filter((n)=>!n.isRead).length; const dateLocale = locale === 'ru' ? 'ru-RU' : locale === 'en' ? 'en-US' : 'el-GR'; return /*#__PURE__*/ _jsxs("div", { className: "max-w-2xl mx-auto px-4 py-8", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex justify-between items-center mb-6", children: [ /*#__PURE__*/ _jsxs("h1", { className: "text-2xl font-bold text-white", children: [ t('notif.title'), " ", unreadCount > 0 && /*#__PURE__*/ _jsxs("span", { className: "text-white/70 font-normal text-xl", children: [ "(", unreadCount, ")" ] }) ] }), unreadCount > 0 && /*#__PURE__*/ _jsx("button", { onClick: handleMarkAll, className: "text-sm text-white/80 hover:text-white hover:underline transition", children: t('notif.mark_all') }) ] }), notifications.length === 0 ? /*#__PURE__*/ _jsx("div", { className: "text-center py-20 text-white/60", children: t('notif.empty') }) : /*#__PURE__*/ _jsx("div", { className: "space-y-2", children: notifications.map((n)=>{ const link = n.referenceId ? n.type === 'new_message' ? `/chat?room=${n.referenceId}` : `/tasks/${n.referenceId}` : null; const handleClick = async ()=>{ if (!n.isRead) await handleMark(n.id); if (link) router.push(link); }; return /*#__PURE__*/ _jsxs("div", { onClick: handleClick, className: `flex items-start gap-3 p-4 rounded-xl border transition ${link ? 'cursor-pointer' : 'cursor-default'} ${n.isRead ? 'bg-white/90 border-white/20 hover:bg-white' : 'bg-white border-blue-300 shadow-sm hover:bg-blue-50'}`, children: [ /*#__PURE__*/ _jsx("div", { className: `p-2.5 rounded-xl flex-shrink-0 ${typeColor[n.type] ?? 'bg-gray-100 text-gray-500'}`, children: /*#__PURE__*/ _jsx(NotifIcon, { type: n.type }) }), /*#__PURE__*/ _jsxs("div", { className: "flex-1 min-w-0", children: [ /*#__PURE__*/ _jsx("p", { className: `font-medium ${n.isRead ? 'text-gray-600' : 'text-gray-900'}`, children: t(`notif.type.${n.type}`, n.title) }), n.body && /*#__PURE__*/ _jsx("p", { className: "text-sm text-gray-500 mt-0.5 truncate", children: (()=>{ if (n.type === 'new_message') return n.body; if (n.type === 'new_review') { const rating = extractRating(n.body); const tpl = t(`notif.body.new_review`, ''); return rating && tpl ? tpl.replace('{rating}', rating) : n.body; } const title = extractParam(n.body); const tpl = t(`notif.body.${n.type}`, ''); return title && tpl ? tpl.replace('{title}', title) : n.body; })() }), /*#__PURE__*/ _jsx("p", { className: "text-xs text-gray-400 mt-1", children: relativeTime(n.createdAt) }) ] }), /*#__PURE__*/ _jsxs("div", { className: "flex flex-col items-end gap-2 shrink-0", onClick: (e)=>e.stopPropagation(), children: [ /*#__PURE__*/ _jsx("button", { onClick: (e)=>handleDismiss(e, n.id), className: "p-1 rounded-md text-gray-300 hover:text-red-400 hover:bg-red-50 transition", title: "Удалить", children: /*#__PURE__*/ _jsxs("svg", { className: "w-4 h-4", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [ /*#__PURE__*/ _jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), /*#__PURE__*/ _jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" }) ] }) }), /*#__PURE__*/ _jsx("div", { className: "flex items-center gap-1.5", children: !n.isRead && /*#__PURE__*/ _jsx("span", { className: "w-2 h-2 bg-blue-500 rounded-full" }) }) ] }) ] }, n.id); }) }) ] }); } cB={}_,.Y\MPeh _ } PS_bRUtxgj9G_CJ@ H v "!,!!!""##))+*/***++u-_x-..Z/]/91=12233:4>44466I:L:;;<<==0@3@AACC;D@>D(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(0,_lib_auth__WEBPACK_IMPORTED_MODULE_3__/* .useSession */ .wV)(0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useRouter)(0,_context_locale__WEBPACK_IMPORTED_MODULE_4__/* .useLocale */ .Y)(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(0,_lib_api__WEBPACK_IMPORTED_MODULE_5__/* .getNotifications */ .Tr)(0,_lib_api__WEBPACK_IMPORTED_MODULE_5__/* .markAllRead */ .NL)(0,_lib_api__WEBPACK_IMPORTED_MODULE_5__/* .markRead */ .Ip)(0,_lib_api__WEBPACK_IMPORTED_MODULE_5__/* .dismissNotification */ .yk)OT__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ NotificationsPage) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(78157); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31768); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var next_navigation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(71159); /* harmony import */ var _lib_auth__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(13260); /* harmony import */ var _context_locale__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(96484); /* harmony import */ var _lib_api__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(91864); /* __next_internal_client_entry_do_not_use__ default auto */ function NotifIcon({ type }) { const cls = 'w-5 h-5'; switch(type){ case 'new_offer': return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("svg", { className: cls, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("rect", { x: "2", y: "7", width: "20", height: "14", rx: "2" }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { d: "M16 21V5a2 2 0 00-2-2h-4a2 2 0 00-2 2v16" }) ] }); case 'offer_accepted': return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("svg", { className: cls, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("circle", { cx: "12", cy: "12", r: "10" }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("polyline", { points: "9 12 11 14 15 10" }) ] }); case 'offer_declined': return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("svg", { className: cls, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("circle", { cx: "12", cy: "12", r: "10" }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("line", { x1: "15", y1: "9", x2: "9", y2: "15" }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("line", { x1: "9", y1: "9", x2: "15", y2: "15" }) ] }); case 'task_completed': return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", { className: cls, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("polyline", { points: "20 6 9 17 4 12" }) }); case 'task_cancelled': return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("svg", { className: cls, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { d: "M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z" }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("line", { x1: "12", y1: "9", x2: "12", y2: "13" }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("line", { x1: "12", y1: "17", x2: "12.01", y2: "17" }) ] }); case 'new_message': return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", { className: cls, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { d: "M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z" }) }); case 'new_review': return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", { className: cls, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("polygon", { points: "12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" }) }); case 'task_invite': return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("svg", { className: cls, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { d: "M16 4h2a2 2 0 012 2v14a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2h2" }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("rect", { x: "8", y: "2", width: "8", height: "4", rx: "1", ry: "1" }) ] }); default: return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("svg", { className: cls, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { d: "M18 8A6 6 0 006 8c0 7-3 9-3 9h18s-3-2-3-9" }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { d: "M13.73 21a2 2 0 01-3.46 0" }) ] }); } } const typeColor = { new_offer: 'bg-blue-100 text-blue-600', offer_accepted: 'bg-green-100 text-green-600', offer_declined: 'bg-red-100 text-red-600', task_completed: 'bg-emerald-100 text-emerald-600', task_cancelled: 'bg-amber-100 text-amber-600', new_message: 'bg-purple-100 text-purple-600', new_review: 'bg-yellow-100 text-yellow-600', task_invite: 'bg-indigo-100 text-indigo-600' }; /** Extract the quoted task title from a stored body string (any locale) */ function extractParam(body) { if (!body) return null; const m = body.match(/[«""](.+?)[»""]/); return m?.[1] ?? null; } /** Extract rating number from a stored review body */ function extractRating(body) { if (!body) return null; const m = body.match(/(\d+)\s*[★\*]/); return m?.[1] ?? null; } function NotificationsPage() { const { data: session, isPending } = (0,_lib_auth__WEBPACK_IMPORTED_MODULE_3__/* .useSession */ .wV)(); const router = (0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useRouter)(); const { t, locale } = (0,_context_locale__WEBPACK_IMPORTED_MODULE_4__/* .useLocale */ .Y)(); const [notifications, setNotifications] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)([]); const [loading, setLoading] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(true); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{ if (!isPending && !session) router.push('/login'); }, [ session, isPending ]); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{ if (!session) return; (0,_lib_api__WEBPACK_IMPORTED_MODULE_5__/* .getNotifications */ .Tr)().then(setNotifications).catch(()=>{}).finally(()=>setLoading(false)); }, [ session ]); async function handleMarkAll() { await (0,_lib_api__WEBPACK_IMPORTED_MODULE_5__/* .markAllRead */ .NL)(); setNotifications((prev)=>prev.map((n)=>({ ...n, isRead: true }))); } async function handleMark(id) { await (0,_lib_api__WEBPACK_IMPORTED_MODULE_5__/* .markRead */ .Ip)(id); setNotifications((prev)=>prev.map((n)=>n.id === id ? { ...n, isRead: true } : n)); } async function handleDismiss(e, id) { e.stopPropagation(); await (0,_lib_api__WEBPACK_IMPORTED_MODULE_5__/* .dismissNotification */ .yk)(id).catch(()=>{}); setNotifications((prev)=>prev.filter((n)=>n.id !== id)); } if (isPending || loading) return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "text-center py-20 text-white", children: t('common.loading') }); function relativeTime(dateStr) { const diff = Date.now() - new Date(dateStr).getTime(); const sec = Math.floor(diff / 1000); const min = Math.floor(sec / 60); const hrs = Math.floor(min / 60); const days = Math.floor(hrs / 24); if (locale === 'ru') { if (sec < 60) return 'только что'; if (min < 60) return `${min} мин. назад`; if (hrs < 24) return `${hrs} ч. назад`; if (days === 1) return 'вчера'; if (days < 7) return `${days} дн. назад`; } else if (locale === 'en') { if (sec < 60) return 'just now'; if (min < 60) return `${min}m ago`; if (hrs < 24) return `${hrs}h ago`; if (days === 1) return 'yesterday'; if (days < 7) return `${days}d ago`; } else { if (sec < 60) return 'μόλις τώρα'; if (min < 60) return `${min} λ. πριν`; if (hrs < 24) return `${hrs} ω. πριν`; if (days === 1) return 'χθες'; if (days < 7) return `${days} μ. πριν`; } return new Date(dateStr).toLocaleDateString(dateLocale, { day: 'numeric', month: 'short', year: days > 365 ? 'numeric' : undefined }); } const unreadCount = notifications.filter((n)=>!n.isRead).length; const dateLocale = locale === 'ru' ? 'ru-RU' : locale === 'en' ? 'en-US' : 'el-GR'; return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "max-w-2xl mx-auto px-4 py-8", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "flex justify-between items-center mb-6", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("h1", { className: "text-2xl font-bold text-white", children: [ t('notif.title'), " ", unreadCount > 0 && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("span", { className: "text-white/70 font-normal text-xl", children: [ "(", unreadCount, ")" ] }) ] }), unreadCount > 0 && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { onClick: handleMarkAll, className: "text-sm text-white/80 hover:text-white hover:underline transition", children: t('notif.mark_all') }) ] }), notifications.length === 0 ? /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "text-center py-20 text-white/60", children: t('notif.empty') }) : /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "space-y-2", children: notifications.map((n)=>{ const link = n.referenceId ? n.type === 'new_message' ? `/chat?room=${n.referenceId}` : `/tasks/${n.referenceId}` : null; const handleClick = async ()=>{ if (!n.isRead) await handleMark(n.id); if (link) router.push(link); }; return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { onClick: handleClick, className: `flex items-start gap-3 p-4 rounded-xl border transition ${link ? 'cursor-pointer' : 'cursor-default'} ${n.isRead ? 'bg-white/90 border-white/20 hover:bg-white' : 'bg-white border-blue-300 shadow-sm hover:bg-blue-50'}`, children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: `p-2.5 rounded-xl flex-shrink-0 ${typeColor[n.type] ?? 'bg-gray-100 text-gray-500'}`, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(NotifIcon, { type: n.type }) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "flex-1 min-w-0", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: `font-medium ${n.isRead ? 'text-gray-600' : 'text-gray-900'}`, children: t(`notif.type.${n.type}`, n.title) }), n.body && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-sm text-gray-500 mt-0.5 truncate", children: (()=>{ if (n.type === 'new_message') return n.body; if (n.type === 'new_review') { const rating = extractRating(n.body); const tpl = t(`notif.body.new_review`, ''); return rating && tpl ? tpl.replace('{rating}', rating) : n.body; } const title = extractParam(n.body); const tpl = t(`notif.body.${n.type}`, ''); return title && tpl ? tpl.replace('{title}', title) : n.body; })() }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-xs text-gray-400 mt-1", children: relativeTime(n.createdAt) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "flex flex-col items-end gap-2 shrink-0", onClick: (e)=>e.stopPropagation(), children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { onClick: (e)=>handleDismiss(e, n.id), className: "p-1 rounded-md text-gray-300 hover:text-red-400 hover:bg-red-50 transition", title: "Удалить", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("svg", { className: "w-4 h-4", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("line", { x1: "6", y1: "6", x2: "18", y2: "18" }) ] }) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "flex items-center gap-1.5", children: !n.isRead && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: "w-2 h-2 bg-blue-500 rounded-full" }) }) ] }) ] }, n.id); }) }) ] }); }  H__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ NotificationsPage) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(78157); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31768); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var next_navigation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(71159); /* harmony import */ var _lib_auth__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(13260); /* harmony import */ var _context_locale__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(96484); /* harmony import */ var _lib_api__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(91864); E/* __next_internal_client_entry_do_not_use__ default auto */ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { useEffect, useState } from 'react'; import { useRouter } from 'next/navigation'; import { useSession } from '@/lib/auth'; import { useLocale } from '@/context/locale'; import { getNotifications, markAllRead, markRead, dismissNotification } from '@/lib/api'; function NotifIcon({ type }) { const cls = 'w-5 h-5'; switch(type){ case 'new_offer': return /*#__PURE__*/ _jsxs("svg", { className: cls, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [ /*#__PURE__*/ _jsx("rect", { x: "2", y: "7", width: "20", height: "14", rx: "2" }), /*#__PURE__*/ _jsx("path", { d: "M16 21V5a2 2 0 00-2-2h-4a2 2 0 00-2 2v16" }) ] }); case 'offer_accepted': return /*#__PURE__*/ _jsxs("svg", { className: cls, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [ /*#__PURE__*/ _jsx("circle", { cx: "12", cy: "12", r: "10" }), /*#__PURE__*/ _jsx("polyline", { points: "9 12 11 14 15 10" }) ] }); case 'offer_declined': return /*#__PURE__*/ _jsxs("svg", { className: cls, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [ /*#__PURE__*/ _jsx("circle", { cx: "12", cy: "12", r: "10" }), /*#__PURE__*/ _jsx("line", { x1: "15", y1: "9", x2: "9", y2: "15" }), /*#__PURE__*/ _jsx("line", { x1: "9", y1: "9", x2: "15", y2: "15" }) ] }); case 'task_completed': return /*#__PURE__*/ _jsx("svg", { className: cls, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: /*#__PURE__*/ _jsx("polyline", { points: "20 6 9 17 4 12" }) }); case 'task_cancelled': return /*#__PURE__*/ _jsxs("svg", { className: cls, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [ /*#__PURE__*/ _jsx("path", { d: "M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z" }), /*#__PURE__*/ _jsx("line", { x1: "12", y1: "9", x2: "12", y2: "13" }), /*#__PURE__*/ _jsx("line", { x1: "12", y1: "17", x2: "12.01", y2: "17" }) ] }); case 'new_message': return /*#__PURE__*/ _jsx("svg", { className: cls, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: /*#__PURE__*/ _jsx("path", { d: "M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z" }) }); case 'new_review': return /*#__PURE__*/ _jsx("svg", { className: cls, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: /*#__PURE__*/ _jsx("polygon", { points: "12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" }) }); case 'task_invite': return /*#__PURE__*/ _jsxs("svg", { className: cls, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [ /*#__PURE__*/ _jsx("path", { d: "M16 4h2a2 2 0 012 2v14a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2h2" }), /*#__PURE__*/ _jsx("rect", { x: "8", y: "2", width: "8", height: "4", rx: "1", ry: "1" }) ] }); default: return /*#__PURE__*/ _jsxs("svg", { className: cls, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [ /*#__PURE__*/ _jsx("path", { d: "M18 8A6 6 0 006 8c0 7-3 9-3 9h18s-3-2-3-9" }), /*#__PURE__*/ _jsx("path", { d: "M13.73 21a2 2 0 01-3.46 0" }) ] }); } } const typeColor = { new_offer: 'bg-blue-100 text-blue-600', offer_accepted: 'bg-green-100 text-green-600', offer_declined: 'bg-red-100 text-red-600', task_completed: 'bg-emerald-100 text-emerald-600', task_cancelled: 'bg-amber-100 text-amber-600', new_message: 'bg-purple-100 text-purple-600', new_review: 'bg-yellow-100 text-yellow-600', task_invite: 'bg-indigo-100 text-indigo-600' }; /** Extract the quoted task title from a stored body string (any locale) */ function extractParam(body) { if (!body) return null; const m = body.match(/[«""](.+?)[»""]/); return m?.[1] ?? null; } /** Extract rating number from a stored review body */ function extractRating(body) { if (!body) return null; const m = body.match(/(\d+)\s*[★\*]/); return m?.[1] ?? null; } export default function NotificationsPage() { const { data: session, isPending } = useSession(); const router = useRouter(); const { t, locale } = useLocale(); const [notifications, setNotifications] = useState([]); const [loading, setLoading] = useState(true); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (!isPending && !session) router.push('/login'); }, [ session, isPending ]); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (!session) return; getNotifications().then(setNotifications).catch(()=>{}).finally(()=>setLoading(false)); }, [ session ]); async function handleMarkAll() { await markAllRead(); setNotifications((prev)=>prev.map((n)=>({ ...n, isRead: true }))); } async function handleMark(id) { await markRead(id); setNotifications((prev)=>prev.map((n)=>n.id === id ? { ...n, isRead: true } : n)); } async function handleDismiss(e, id) { e.stopPropagation(); await dismissNotification(id).catch(()=>{}); setNotifications((prev)=>prev.filter((n)=>n.id !== id)); } if (isPending || loading) return /*#__PURE__*/ _jsx("div", { className: "text-center py-20 text-white", children: t('common.loading') }); function relativeTime(dateStr) { const diff = Date.now() - new Date(dateStr).getTime(); const sec = Math.floor(diff / 1000); const min = Math.floor(sec / 60); const hrs = Math.floor(min / 60); const days = Math.floor(hrs / 24); if (locale === 'ru') { if (sec < 60) return 'только что'; if (min < 60) return `${min} мин. назад`; if (hrs < 24) return `${hrs} ч. назад`; if (days === 1) return 'вчера'; if (days < 7) return `${days} дн. назад`; } else if (locale === 'en') { if (sec < 60) return 'just now'; if (min < 60) return `${min}m ago`; if (hrs < 24) return `${hrs}h ago`; if (days === 1) return 'yesterday'; if (days < 7) return `${days}d ago`; } else { if (sec < 60) return 'μόλις τώρα'; if (min < 60) return `${min} λ. πριν`; if (hrs < 24) return `${hrs} ω. πριν`; if (days === 1) return 'χθες'; if (days < 7) return `${days} μ. πριν`; } return new Date(dateStr).toLocaleDateString(dateLocale, { day: 'numeric', month: 'short', year: days > 365 ? 'numeric' : undefined }); } const unreadCount = notifications.filter((n)=>!n.isRead).length; const dateLocale = locale === 'ru' ? 'ru-RU' : locale === 'en' ? 'en-US' : 'el-GR'; return /*#__PURE__*/ _jsxs("div", { className: "max-w-2xl mx-auto px-4 py-8", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex justify-between items-center mb-6", children: [ /*#__PURE__*/ _jsxs("h1", { className: "text-2xl font-bold text-white", children: [ t('notif.title'), " ", unreadCount > 0 && /*#__PURE__*/ _jsxs("span", { className: "text-white/70 font-normal text-xl", children: [ "(", unreadCount, ")" ] }) ] }), unreadCount > 0 && /*#__PURE__*/ _jsx("button", { onClick: handleMarkAll, className: "text-sm text-white/80 hover:text-white hover:underline transition", children: t('notif.mark_all') }) ] }), notifications.length === 0 ? /*#__PURE__*/ _jsx("div", { className: "text-center py-20 text-white/60", children: t('notif.empty') }) : /*#__PURE__*/ _jsx("div", { className: "space-y-2", children: notifications.map((n)=>{ const link = n.referenceId ? n.type === 'new_message' ? `/chat?room=${n.referenceId}` : `/tasks/${n.referenceId}` : null; const handleClick = async ()=>{ if (!n.isRead) await handleMark(n.id); if (link) router.push(link); }; return /*#__PURE__*/ _jsxs("div", { onClick: handleClick, className: `flex items-start gap-3 p-4 rounded-xl border transition ${link ? 'cursor-pointer' : 'cursor-default'} ${n.isRead ? 'bg-white/90 border-white/20 hover:bg-white' : 'bg-white border-blue-300 shadow-sm hover:bg-blue-50'}`, children: [ /*#__PURE__*/ _jsx("div", { className: `p-2.5 rounded-xl flex-shrink-0 ${typeColor[n.type] ?? 'bg-gray-100 text-gray-500'}`, children: /*#__PURE__*/ _jsx(NotifIcon, { type: n.type }) }), /*#__PURE__*/ _jsxs("div", { className: "flex-1 min-w-0", children: [ /*#__PURE__*/ _jsx("p", { className: `font-medium ${n.isRead ? 'text-gray-600' : 'text-gray-900'}`, children: t(`notif.type.${n.type}`, n.title) }), n.body && /*#__PURE__*/ _jsx("p", { className: "text-sm text-gray-500 mt-0.5 truncate", children: (()=>{ if (n.type === 'new_message') return n.body; if (n.type === 'new_review') { const rating = extractRating(n.body); const tpl = t(`notif.body.new_review`, ''); return rating && tpl ? tpl.replace('{rating}', rating) : n.body; } const title = extractParam(n.body); const tpl = t(`notif.body.${n.type}`, ''); return title && tpl ? tpl.replace('{title}', title) : n.body; })() }), /*#__PURE__*/ _jsx("p", { className: "text-xs text-gray-400 mt-1", children: relativeTime(n.createdAt) }) ] }), /*#__PURE__*/ _jsxs("div", { className: "flex flex-col items-end gap-2 shrink-0", onClick: (e)=>e.stopPropagation(), children: [ /*#__PURE__*/ _jsx("button", { onClick: (e)=>handleDismiss(e, n.id), className: "p-1 rounded-md text-gray-300 hover:text-red-400 hover:bg-red-50 transition", title: "Удалить", children: /*#__PURE__*/ _jsxs("svg", { className: "w-4 h-4", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [ /*#__PURE__*/ _jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), /*#__PURE__*/ _jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" }) ] }) }), /*#__PURE__*/ _jsx("div", { className: "flex items-center gap-1.5", children: !n.isRead && /*#__PURE__*/ _jsx("span", { className: "w-2 h-2 bg-blue-500 rounded-full" }) }) ] }) ] }, n.id); }) }) ] }); } )61123undefined125168undefined170213undefined215254undefined256300undefined302390undefined527531(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined857860(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined11011104(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined13071311(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined16371640(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined18121815(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined20032007(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined23332336(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined25082511(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined27142717(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined29832986(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined32903293(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined34533457(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined37833786(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined39693972(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined41764179(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined44474450(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined47544757(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined49464949(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined52535256(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined54925496(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined58225825(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined59915994(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined63156319(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined66456648(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined67896792(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined77377751undefined78247833(0,_lib_auth__WEBPACK_IMPORTED_MODULE_3__/* .useSession */ .wV)undefined78577865(0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useRouter)undefined78967904(0,_context_locale__WEBPACK_IMPORTED_MODULE_4__/* .useLocale */ .Y)undefined79557962(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined80038010(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined80748082(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)undefined82568264(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)undefined83108325(0,_lib_api__WEBPACK_IMPORTED_MODULE_5__/* .getNotifications */ .Tr)undefined84828492(0,_lib_api__WEBPACK_IMPORTED_MODULE_5__/* .markAllRead */ .NL)undefined86848691(0,_lib_api__WEBPACK_IMPORTED_MODULE_5__/* .markRead */ .Ip)undefined89368954(0,_lib_api__WEBPACK_IMPORTED_MODULE_5__/* .dismissNotification */ .yk)undefined90979100(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1068410688(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined1079510799(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined1094110945(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined1119911203(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined1163711640(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1197211975(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1212212125(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1260112605(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined1299512998(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1319413197(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1337013374(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined1354013543(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1385113854(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1492114924(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1523715241(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined1549815501(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1584415848(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined1643216435(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1680616809(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1729617299(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1746717470(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefinedmn  webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSourcej/* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ FavoriteSpecialistButton: () => (/* binding */ FavoriteSpecialistButton) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(78157); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31768); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _lib_auth__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(13260); /* harmony import */ var _lib_api__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(91864); webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSource/* __next_internal_client_entry_do_not_use__ FavoriteSpecialistButton auto */ import { jsx as _jsx } from "react/jsx-runtime"; import { useState } from 'react'; import { useSession } from '@/lib/auth'; import { addSpecialistFavorite, removeSpecialistFavorite } from '@/lib/api'; export function FavoriteSpecialistButton({ specialistId, initialFavorite = false, favoriteLabel, unfavoriteLabel }) { const { data: session } = useSession(); const [isFavorite, setIsFavorite] = useState(initialFavorite); const [loading, setLoading] = useState(false); if (!session) return null; async function toggle(e) { e.preventDefault(); e.stopPropagation(); setLoading(true); try { if (isFavorite) { await removeSpecialistFavorite(specialistId); setIsFavorite(false); } else { await addSpecialistFavorite(specialistId); setIsFavorite(true); } } catch {} setLoading(false); } return /*#__PURE__*/ _jsx("button", { onClick: toggle, disabled: loading, title: isFavorite ? unfavoriteLabel : favoriteLabel, className: `absolute top-3 right-3 w-8 h-8 flex items-center justify-center rounded-full text-base transition disabled:opacity-50 ${isFavorite ? 'bg-pink-50 text-pink-500 hover:bg-pink-100' : 'bg-gray-50 text-gray-300 hover:text-pink-400 hover:bg-pink-50'}`, children: isFavorite ? '❤️' : '🤍' }); } c N}R%{!$(0,_lib_auth__WEBPACK_IMPORTED_MODULE_2__/* .useSession */ .wV)(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(0,_lib_api__WEBPACK_IMPORTED_MODULE_3__/* .removeSpecialistFavorite */ .sD)(0,_lib_api__WEBPACK_IMPORTED_MODULE_3__/* .addSpecialistFavorite */ .V)(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)r /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ FavoriteSpecialistButton: () => (/* binding */ FavoriteSpecialistButton) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(78157); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31768); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _lib_auth__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(13260); /* harmony import */ var _lib_api__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(91864); /* __next_internal_client_entry_do_not_use__ FavoriteSpecialistButton auto */ function FavoriteSpecialistButton({ specialistId, initialFavorite = false, favoriteLabel, unfavoriteLabel }) { const { data: session } = (0,_lib_auth__WEBPACK_IMPORTED_MODULE_2__/* .useSession */ .wV)(); const [isFavorite, setIsFavorite] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(initialFavorite); const [loading, setLoading] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false); if (!session) return null; async function toggle(e) { e.preventDefault(); e.stopPropagation(); setLoading(true); try { if (isFavorite) { await (0,_lib_api__WEBPACK_IMPORTED_MODULE_3__/* .removeSpecialistFavorite */ .sD)(specialistId); setIsFavorite(false); } else { await (0,_lib_api__WEBPACK_IMPORTED_MODULE_3__/* .addSpecialistFavorite */ .V)(specialistId); setIsFavorite(true); } } catch {} setLoading(false); } return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { onClick: toggle, disabled: loading, title: isFavorite ? unfavoriteLabel : favoriteLabel, className: `absolute top-3 right-3 w-8 h-8 flex items-center justify-center rounded-full text-base transition disabled:opacity-50 ${isFavorite ? 'bg-pink-50 text-pink-500 hover:bg-pink-100' : 'bg-gray-50 text-gray-300 hover:text-pink-400 hover:bg-pink-50'}`, children: isFavorite ? '❤️' : '🤍' }); } sv wj/* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ FavoriteSpecialistButton: () => (/* binding */ FavoriteSpecialistButton) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(78157); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31768); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _lib_auth__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(13260); /* harmony import */ var _lib_api__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(91864); x/* __next_internal_client_entry_do_not_use__ FavoriteSpecialistButton auto */ import { jsx as _jsx } from "react/jsx-runtime"; import { useState } from 'react'; import { useSession } from '@/lib/auth'; import { addSpecialistFavorite, removeSpecialistFavorite } from '@/lib/api'; export function FavoriteSpecialistButton({ specialistId, initialFavorite = false, favoriteLabel, unfavoriteLabel }) { const { data: session } = useSession(); const [isFavorite, setIsFavorite] = useState(initialFavorite); const [loading, setLoading] = useState(false); if (!session) return null; async function toggle(e) { e.preventDefault(); e.stopPropagation(); setLoading(true); try { if (isFavorite) { await removeSpecialistFavorite(specialistId); setIsFavorite(false); } else { await addSpecialistFavorite(specialistId); setIsFavorite(true); } } catch {} setLoading(false); } return /*#__PURE__*/ _jsx("button", { onClick: toggle, disabled: loading, title: isFavorite ? unfavoriteLabel : favoriteLabel, className: `absolute top-3 right-3 w-8 h-8 flex items-center justify-center rounded-full text-base transition disabled:opacity-50 ${isFavorite ? 'bg-pink-50 text-pink-500 hover:bg-pink-100' : 'bg-gray-50 text-gray-300 hover:text-pink-400 hover:bg-pink-50'}`, children: isFavorite ? '❤️' : '🤍' }); }  78125undefined127159undefined161200undefined202277undefined279285undefined427436(0,_lib_auth__WEBPACK_IMPORTED_MODULE_2__/* .useSession */ .wV)undefined481488(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined542549(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined770793(0,_lib_api__WEBPACK_IMPORTED_MODULE_3__/* .removeSpecialistFavorite */ .sD)undefined891911(0,_lib_api__WEBPACK_IMPORTED_MODULE_3__/* .addSpecialistFavorite */ .V)undefined10571060(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefinedxy`a \xwebpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource@/* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ TaskDetailClient) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(78157); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31768); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(94496); /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(next_link__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var next_navigation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(71159); /* harmony import */ var _lib_auth__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(13260); /* harmony import */ var _context_locale__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(96484); /* harmony import */ var _lib_api__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(91864); /* harmony import */ var _lib_taskLocale__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(8293); /* harmony import */ var _lib_formatName__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(48178); /* harmony import */ var _components_PlanBadge__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(25701); webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSource]/* __next_internal_client_entry_do_not_use__ default auto */ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime"; import { useState, useEffect } from 'react'; import Link from 'next/link'; import { useRouter } from 'next/navigation'; import { useSession } from '@/lib/auth'; import { useLocale } from '@/context/locale'; import { getOffers, acceptOffer, declineOffer, completeTask, createReview, getMyOffers, getTaskReviews, getTaskInvite, dismissNotification, getOrCreateDirectRoom, updateTask, getTaskStats, runAutoMatch, getMyDashboard } from '@/lib/api'; import { taskTitle, taskDescription, formatPrice } from '@/lib/taskLocale'; import { shortName } from '@/lib/formatName'; import { PlanBadge } from '@/components/PlanBadge'; const statusColors = { open: 'bg-green-100 text-green-700', in_progress: 'bg-blue-100 text-blue-700', completed: 'bg-gray-100 text-gray-700', cancelled: 'bg-red-100 text-red-700', draft: 'bg-yellow-100 text-yellow-700' }; export default function TaskDetailClient({ taskId, initialTask, initialCustomer, catMap = {}, locMap = {} }) { const { data: session } = useSession(); const { t, locale } = useLocale(); const router = useRouter(); const [task, setTask] = useState(initialTask); const [customer] = useState(initialCustomer); const [offers, setOffers] = useState([]); const [offersLoaded, setOffersLoaded] = useState(false); const [myOffer, setMyOffer] = useState(null); const [myOfferLoaded, setMyOfferLoaded] = useState(false); const [myReview, setMyReview] = useState(null); const [myReviewLoaded, setMyReviewLoaded] = useState(false); const [reviewTargetId, setReviewTargetId] = useState(null); const [reviewRating, setReviewRating] = useState(5); const [reviewComment, setReviewComment] = useState(''); const [reviewSubmitting, setReviewSubmitting] = useState(false); const [reviewDone, setReviewDone] = useState(false); const [invite, setInvite] = useState(null); const [inviteLoaded, setInviteLoaded] = useState(false); const [inviteDeclining, setInviteDeclining] = useState(false); const [msgLoading, setMsgLoading] = useState(false); const [lightboxIndex, setLightboxIndex] = useState(null); // FOMO stats + auto-match const [taskStats, setTaskStats] = useState(null); const [autoMatchResults, setAutoMatchResults] = useState(null); const [autoMatchLoading, setAutoMatchLoading] = useState(false); const [hasAutoMatch, setHasAutoMatch] = useState(false); // Edit task state const [editing, setEditing] = useState(false); const [editSaving, setEditSaving] = useState(false); const [editForm, setEditForm] = useState(null); // Keyboard navigation for lightbox process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ const handler = (e)=>{ if (e.key === 'Escape') setLightboxIndex(null); if (e.key === 'ArrowLeft') setLightboxIndex((prev)=>prev !== null && prev > 0 ? prev - 1 : prev); if (e.key === 'ArrowRight') setLightboxIndex((prev)=>{ if (prev === null) return prev; const imgs = task.images; return imgs && prev < imgs.length - 1 ? prev + 1 : prev; }); }; window.addEventListener('keydown', handler); return ()=>window.removeEventListener('keydown', handler); }, [ task.images ]); const dateLocale = locale === 'ru' ? 'ru-RU' : locale === 'en' ? 'en-US' : 'el-GR'; const currentUserId = session?.user?.id; const isOwner = currentUserId === task.customerId; // Load offers if owner process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (!isOwner || offersLoaded) return; getOffers(taskId).then((data)=>{ setOffers(data); setOffersLoaded(true); }).catch(()=>setOffersLoaded(true)); }, [ isOwner, taskId, offersLoaded ]); // Load task stats + dashboard features for owner process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (!isOwner) return; getTaskStats(taskId).then(setTaskStats).catch(()=>{}); getMyDashboard().then((d)=>setHasAutoMatch(!!d.features?.hasAutoMatch)).catch(()=>{}); }, [ isOwner, taskId ]); // Load specialist's own offer process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (!currentUserId || isOwner || myOfferLoaded) return; getMyOffers().then((rows)=>{ const found = rows.find((r)=>r.task?.id === taskId); setMyOffer(found?.offer ?? null); setMyOfferLoaded(true); }).catch(()=>setMyOfferLoaded(true)); }, [ currentUserId, isOwner, taskId, myOfferLoaded ]); // Load task invite for specialist process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (!currentUserId || isOwner || inviteLoaded) return; getTaskInvite(taskId).then((rows)=>{ setInvite(rows[0] ?? null); setInviteLoaded(true); }).catch(()=>setInviteLoaded(true)); }, [ currentUserId, isOwner, taskId, inviteLoaded ]); // Load review for specialist when task completed process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (!currentUserId || isOwner || myReviewLoaded || task.status !== 'completed') return; getTaskReviews(taskId).then((rows)=>{ const found = rows.find((r)=>r.targetId === currentUserId); setMyReview(found ?? null); setMyReviewLoaded(true); }).catch(()=>setMyReviewLoaded(true)); }, [ currentUserId, isOwner, taskId, task.status, myReviewLoaded ]); async function handleAccept(offerId) { const updated = await acceptOffer(offerId).catch(()=>null); if (updated) { setOffers((prev)=>prev.map((r)=>r.offer.id === offerId ? { ...r, offer: updated } : r)); setTask((t)=>({ ...t, status: 'in_progress' })); } } async function handleDecline(offerId) { const updated = await declineOffer(offerId).catch(()=>null); if (updated) { setOffers((prev)=>prev.map((r)=>r.offer.id === offerId ? { ...r, offer: updated } : r)); } } async function handleComplete() { if (!window.confirm(t('task.complete.confirm'))) return; const updated = await completeTask(taskId).catch(()=>null); if (updated) setTask((t)=>({ ...t, status: 'completed' })); } async function handleReview(e) { e.preventDefault(); if (!reviewTargetId) return; setReviewSubmitting(true); const ok = await createReview({ taskId, targetId: reviewTargetId, rating: reviewRating, comment: reviewComment || undefined }).catch(()=>null); setReviewSubmitting(false); if (ok) { setReviewDone(true); setReviewTargetId(null); } } async function handleMessage(otherUserId) { setMsgLoading(true); try { const { room } = await getOrCreateDirectRoom(otherUserId); router.push(`/chat?room=${room.id}`); } catch {} setMsgLoading(false); } function handleEditOpen() { setEditForm({ title: task.title, description: task.description, budget: task.budget ? Number(task.budget) : '', budgetNegotiable: task.budgetNegotiable ?? false, category: task.category ?? '', location: task.location ?? '', district: task.district ?? '', street: task.street ?? '', houseNumber: task.houseNumber ?? '', timeSlot: task.timeSlot ?? '', confidentialNote: task.confidentialNote ?? '', deadline: task.deadline ? new Date(task.deadline).toISOString().slice(0, 10) : '', status: task.status === 'draft' ? 'draft' : 'open' }); setEditing(true); } async function handleEditSave(e) { e.preventDefault(); if (!editForm) return; setEditSaving(true); try { const payload = { title: editForm.title, description: editForm.description, budgetNegotiable: editForm.budgetNegotiable, status: editForm.status }; if (editForm.budget !== '' && editForm.budget > 0) payload.budget = Number(editForm.budget); if (editForm.category) payload.category = editForm.category; if (editForm.location) payload.location = editForm.location; if (editForm.district) payload.district = editForm.district; if (editForm.street) payload.street = editForm.street; if (editForm.houseNumber) payload.houseNumber = editForm.houseNumber; if (editForm.timeSlot) payload.timeSlot = editForm.timeSlot; if (editForm.confidentialNote !== undefined) payload.confidentialNote = editForm.confidentialNote; if (editForm.deadline) payload.deadline = new Date(editForm.deadline).toISOString(); const updated = await updateTask(taskId, payload); setTask((prev)=>({ ...prev, ...updated })); setEditing(false); } catch (err) { alert(err?.message || t('common.error')); } finally{ setEditSaving(false); } } const acceptedOffer = offers.find((r)=>r.offer.status === 'accepted'); return /*#__PURE__*/ _jsxs("div", { className: "max-w-4xl mx-auto px-4 py-8", children: [ /*#__PURE__*/ _jsxs("div", { className: "bg-white rounded-xl border border-gray-200 p-6 mb-6", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex justify-between items-start gap-4 mb-4", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [ /*#__PURE__*/ _jsx("span", { className: `text-xs font-medium px-2 py-1 rounded-full ${statusColors[task.status]}`, children: t(`task.status.${task.status}`, task.status) }), task.category && /*#__PURE__*/ _jsx("span", { className: "text-xs font-medium text-blue-600 bg-blue-50 px-2 py-1 rounded-full", children: catMap[task.category] ?? task.category }), isOwner && /*#__PURE__*/ _jsx("span", { className: "text-xs text-gray-400 bg-gray-100 px-2 py-1 rounded-full", children: t('task.yours') }) ] }), /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-2 shrink-0", children: [ isOwner && (task.status === 'draft' || task.status === 'open') && /*#__PURE__*/ _jsxs("button", { onClick: handleEditOpen, className: "flex items-center gap-1.5 text-xs font-medium text-blue-600 bg-blue-50 hover:bg-blue-100 px-3 py-1.5 rounded-lg transition", children: [ /*#__PURE__*/ _jsx("svg", { className: "w-3.5 h-3.5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125" }) }), t('task.edit') ] }), /*#__PURE__*/ _jsx("p", { className: "text-sm text-gray-400", children: new Date(task.createdAt).toLocaleDateString(dateLocale) }) ] }) ] }), /*#__PURE__*/ _jsx("h1", { className: "text-2xl font-bold text-gray-900 mb-4", children: taskTitle(task, locale) }), /*#__PURE__*/ _jsx("p", { className: "text-gray-700 whitespace-pre-wrap mb-6", children: taskDescription(task, locale) }), /*#__PURE__*/ _jsxs("div", { className: "grid grid-cols-2 md:grid-cols-4 gap-4 p-4 bg-gray-50 rounded-lg", children: [ task.budget && /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("p", { className: "text-xs text-gray-500", children: t('task.budget') }), /*#__PURE__*/ _jsxs("p", { className: "font-bold text-green-600 text-lg", children: [ task.budget, "€" ] }), task.budgetNegotiable && /*#__PURE__*/ _jsx("p", { className: "text-xs text-green-600 mt-0.5", children: t('task.budget_negotiable') }) ] }), !task.budget && task.budgetNegotiable && /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("p", { className: "text-xs text-gray-500", children: t('task.budget') }), /*#__PURE__*/ _jsx("p", { className: "font-medium text-green-600", children: t('task.budget_negotiable') }) ] }), task.location && /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("p", { className: "text-xs text-gray-500", children: t('task.location') }), /*#__PURE__*/ _jsxs("p", { className: "font-medium", children: [ "\uD83D\uDCCD ", locMap[task.location] ?? task.location ] }), (task.street || task.district) && /*#__PURE__*/ _jsx("p", { className: "text-xs text-gray-500 mt-0.5", children: [ task.district, task.street, task.houseNumber ].filter(Boolean).join(', ') }) ] }), task.deadline && /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("p", { className: "text-xs text-gray-500", children: t('task.deadline') }), /*#__PURE__*/ _jsx("p", { className: "font-medium", children: new Date(task.deadline).toLocaleDateString(dateLocale) }), task.timeSlot && task.timeSlot !== '' && /*#__PURE__*/ _jsx("p", { className: "text-xs text-gray-500 mt-0.5", children: t(`create.field.time_slot.${task.timeSlot}`, task.timeSlot) }) ] }), !task.deadline && task.timeSlot && task.timeSlot !== '' && /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("p", { className: "text-xs text-gray-500", children: t('task.time_slot') }), /*#__PURE__*/ _jsx("p", { className: "font-medium", children: t(`create.field.time_slot.${task.timeSlot}`, task.timeSlot) }) ] }), customer && /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("p", { className: "text-xs text-gray-500", children: t('task.customer') }), /*#__PURE__*/ _jsxs(Link, { href: `/users/${customer.id}`, className: "flex items-center gap-2 mt-1 group", children: [ /*#__PURE__*/ _jsx("div", { className: "w-8 h-8 rounded-full overflow-hidden bg-blue-100 shrink-0 flex items-center justify-center", children: customer.image ? /*#__PURE__*/ _jsx("img", { src: customer.image, alt: shortName(customer.name), className: "w-full h-full object-cover" }) : /*#__PURE__*/ _jsx("span", { className: "text-blue-600 font-semibold text-xs", children: shortName(customer.name).charAt(0).toUpperCase() }) }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("p", { className: "font-medium text-gray-900 group-hover:text-blue-600 leading-none", children: shortName(customer.name) }), customer.rating && /*#__PURE__*/ _jsxs("p", { className: "text-xs text-yellow-500 leading-none mt-0.5", children: [ "★ ", Number(customer.rating).toFixed(1) ] }) ] }) ] }) ] }) ] }), task.images && task.images.length > 0 && /*#__PURE__*/ _jsx("div", { className: "mt-4", children: /*#__PURE__*/ _jsx("div", { className: "flex flex-wrap gap-2", children: task.images.map((url, i)=>/*#__PURE__*/ _jsx("button", { onClick: ()=>setLightboxIndex(i), className: "block w-24 h-24 rounded-lg overflow-hidden border border-gray-200 hover:opacity-90 hover:border-blue-300 transition", children: /*#__PURE__*/ _jsx("img", { src: url, alt: "", className: "w-full h-full object-cover" }) }, i)) }) }), lightboxIndex !== null && task.images && /*#__PURE__*/ _jsx("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/85", onClick: ()=>setLightboxIndex(null), children: /*#__PURE__*/ _jsxs("div", { className: "relative max-w-4xl w-full mx-4", onClick: (e)=>e.stopPropagation(), children: [ /*#__PURE__*/ _jsx("img", { src: task.images[lightboxIndex], alt: "", className: "w-full max-h-[80vh] object-contain rounded-lg" }), /*#__PURE__*/ _jsx("button", { onClick: ()=>setLightboxIndex(null), className: "absolute -top-10 right-0 text-white/80 hover:text-white p-2", children: /*#__PURE__*/ _jsx("svg", { className: "w-6 h-6", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" }) }) }), lightboxIndex > 0 && /*#__PURE__*/ _jsx("button", { onClick: ()=>setLightboxIndex(lightboxIndex - 1), className: "absolute left-0 top-1/2 -translate-y-1/2 -translate-x-12 text-white/80 hover:text-white p-2", children: /*#__PURE__*/ _jsx("svg", { className: "w-8 h-8", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 19l-7-7 7-7" }) }) }), lightboxIndex < task.images.length - 1 && /*#__PURE__*/ _jsx("button", { onClick: ()=>setLightboxIndex(lightboxIndex + 1), className: "absolute right-0 top-1/2 -translate-y-1/2 translate-x-12 text-white/80 hover:text-white p-2", children: /*#__PURE__*/ _jsx("svg", { className: "w-8 h-8", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) }) }), task.images.length > 1 && /*#__PURE__*/ _jsxs("p", { className: "text-white/60 text-sm text-center mt-3", children: [ lightboxIndex + 1, " / ", task.images.length ] }) ] }) }), task.confidentialNote && (isOwner || myOffer?.status === 'accepted') && /*#__PURE__*/ _jsxs("div", { className: "mt-4 p-3 bg-yellow-50 border border-yellow-200 rounded-lg", children: [ /*#__PURE__*/ _jsxs("p", { className: "text-xs font-medium text-yellow-700 mb-1 flex items-center gap-1", children: [ /*#__PURE__*/ _jsx("svg", { className: "w-3.5 h-3.5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2.5, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z" }) }), t('task.confidential') ] }), /*#__PURE__*/ _jsx("p", { className: "text-sm text-yellow-800", children: task.confidentialNote }) ] }), /*#__PURE__*/ _jsxs("div", { className: "mt-6 flex flex-wrap gap-3", children: [ isOwner && task.status === 'in_progress' && /*#__PURE__*/ _jsx("button", { onClick: handleComplete, className: "bg-green-600 text-white px-6 py-3 rounded-xl font-semibold hover:bg-green-700", children: t('task.complete') }), isOwner && acceptedOffer?.specialist?.id && /*#__PURE__*/ _jsxs("button", { onClick: ()=>handleMessage(acceptedOffer.specialist.id), disabled: msgLoading, className: "flex items-center gap-2 bg-blue-50 text-blue-600 border border-blue-200 px-4 py-2.5 rounded-xl font-medium hover:bg-blue-100 disabled:opacity-50", children: [ /*#__PURE__*/ _jsx("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.8, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8 10h.01M12 10h.01M16 10h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z" }) }), t('chat.write_specialist') ] }), isOwner && task.status === 'completed' && acceptedOffer && !reviewDone && /*#__PURE__*/ _jsx("button", { onClick: ()=>setReviewTargetId(acceptedOffer.specialist?.id ?? null), className: "bg-yellow-500 text-white px-6 py-3 rounded-xl font-semibold hover:bg-yellow-600", children: t('review.leave') }), reviewDone && /*#__PURE__*/ _jsx("span", { className: "text-green-600 font-medium py-3", children: t('review.done') }) ] }), reviewTargetId && /*#__PURE__*/ _jsxs("form", { onSubmit: handleReview, className: "mt-6 border-t border-gray-100 pt-6 space-y-4", children: [ /*#__PURE__*/ _jsx("h3", { className: "font-semibold text-gray-800", children: t('review.leave') }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("p", { className: "text-sm font-medium text-gray-700 mb-2", children: t('review.rating') }), /*#__PURE__*/ _jsx("div", { className: "flex gap-1", children: [ 1, 2, 3, 4, 5 ].map((star)=>/*#__PURE__*/ _jsx("button", { type: "button", onClick: ()=>setReviewRating(star), className: `text-2xl transition ${star <= reviewRating ? 'text-yellow-400' : 'text-gray-300'}`, children: "★" }, star)) }) ] }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: t('review.comment') }), /*#__PURE__*/ _jsx("textarea", { value: reviewComment, onChange: (e)=>setReviewComment(e.target.value), rows: 3, maxLength: 2000, placeholder: t('review.comment.placeholder'), className: "w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400 resize-none" }) ] }), /*#__PURE__*/ _jsxs("div", { className: "flex gap-3", children: [ /*#__PURE__*/ _jsx("button", { type: "submit", disabled: reviewSubmitting, className: "bg-blue-600 text-white px-5 py-2 rounded-xl font-semibold hover:bg-blue-700 disabled:opacity-50", children: reviewSubmitting ? t('review.submitting') : t('review.submit') }), /*#__PURE__*/ _jsx("button", { type: "button", onClick: ()=>setReviewTargetId(null), className: "px-5 py-2 rounded-xl border border-gray-200 text-gray-600 hover:bg-gray-50", children: t('common.cancel') }) ] }) ] }) ] }), isOwner && /*#__PURE__*/ _jsxs("div", { className: "bg-white rounded-xl border border-gray-200 p-6", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center justify-between mb-4 flex-wrap gap-2", children: [ /*#__PURE__*/ _jsxs("h2", { className: "text-lg font-bold text-gray-900", children: [ t('task.offers'), " (", offers.length, ")" ] }), taskStats && /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-3 text-xs text-gray-500", children: [ taskStats.totalViews > 0 && /*#__PURE__*/ _jsxs("span", { className: "flex items-center gap-1", children: [ /*#__PURE__*/ _jsxs("svg", { className: "w-3.5 h-3.5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.8, children: [ /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z" }), /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z" }) ] }), taskStats.totalViews ] }), taskStats.offerCount > 0 && /*#__PURE__*/ _jsxs("span", { className: "font-medium text-blue-600", children: [ "⚡ ", taskStats.offerCount, " ", t('task.offers').toLowerCase() ] }) ] }), hasAutoMatch && task.status === 'open' && /*#__PURE__*/ _jsxs("button", { onClick: async ()=>{ setAutoMatchLoading(true); try { const res = await runAutoMatch(taskId); setAutoMatchResults(res.matches ?? []); } catch {} finally{ setAutoMatchLoading(false); } }, disabled: autoMatchLoading, className: "flex items-center gap-1.5 text-xs font-medium bg-purple-50 text-purple-700 border border-purple-200 px-3 py-1.5 rounded-lg hover:bg-purple-100 transition disabled:opacity-50", children: [ /*#__PURE__*/ _jsx("svg", { className: "w-3.5 h-3.5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M13 10V3L4 14h7v7l9-11h-7z" }) }), autoMatchLoading ? t('common.loading') : t('task.auto_match', 'Авто-матч') ] }) ] }), autoMatchResults && autoMatchResults.length > 0 && /*#__PURE__*/ _jsxs("div", { className: "mb-4 p-3 bg-purple-50 rounded-xl border border-purple-100", children: [ /*#__PURE__*/ _jsx("p", { className: "text-xs font-medium text-purple-700 mb-2", children: t('task.auto_match_results', 'Топ специалисты') }), /*#__PURE__*/ _jsx("div", { className: "space-y-2", children: autoMatchResults.slice(0, 5).map((s)=>/*#__PURE__*/ _jsxs("div", { className: "flex items-center justify-between gap-2", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-2", children: [ /*#__PURE__*/ _jsx("div", { className: "w-7 h-7 rounded-full bg-purple-100 flex items-center justify-center text-purple-700 text-xs font-bold overflow-hidden", children: s.image ? /*#__PURE__*/ _jsx("img", { src: s.image, alt: "", className: "w-full h-full object-cover" }) : s.name?.[0]?.toUpperCase() }), /*#__PURE__*/ _jsx("span", { className: "text-sm text-gray-800", children: s.firstName ?? s.name }), s.rating && /*#__PURE__*/ _jsxs("span", { className: "text-xs text-yellow-500", children: [ "★", Number(s.rating).toFixed(1) ] }) ] }), /*#__PURE__*/ _jsx("button", { onClick: ()=>handleMessage(s.id), className: "text-xs text-blue-600 hover:underline", children: t('chat.write_btn') }) ] }, s.id)) }) ] }), !offersLoaded ? /*#__PURE__*/ _jsx("p", { className: "text-gray-400 text-sm", children: t('common.loading') }) : offers.length === 0 ? /*#__PURE__*/ _jsx("p", { className: "text-gray-500 text-sm", children: t('task.offers.none') }) : /*#__PURE__*/ _jsx("div", { className: "space-y-4", children: offers.map((row)=>{ const offer = row.offer; const specialist = row.specialist; return /*#__PURE__*/ _jsxs("div", { className: "border border-gray-100 rounded-xl p-4", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex justify-between items-start gap-4", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-start gap-3", children: [ /*#__PURE__*/ _jsx("div", { className: "w-10 h-10 rounded-full bg-blue-100 flex-shrink-0 flex items-center justify-center text-blue-700 font-bold overflow-hidden", children: specialist?.image ? /*#__PURE__*/ _jsx("img", { src: specialist.image, alt: specialist.name, className: "w-full h-full object-cover" }) : specialist?.name?.[0]?.toUpperCase() ?? '?' }), /*#__PURE__*/ _jsxs("div", { children: [ specialist && /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-1.5", children: [ /*#__PURE__*/ _jsx(Link, { href: `/users/${specialist.id}`, className: "font-medium text-gray-900 hover:text-blue-600", children: shortName(specialist.name) }), specialist.planTier && specialist.planTier !== 'free' && /*#__PURE__*/ _jsx(PlanBadge, { tier: specialist.planTier }), specialist.hasVerifiedBadge && /*#__PURE__*/ _jsx("svg", { className: "w-3.5 h-3.5 text-blue-500", viewBox: "0 0 24 24", fill: "currentColor", children: /*#__PURE__*/ _jsx("path", { d: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" }) }) ] }), offer.message && /*#__PURE__*/ _jsx("p", { className: "text-sm text-gray-600 mt-1", children: offer.message }) ] }) ] }), /*#__PURE__*/ _jsxs("div", { className: "text-right shrink-0", children: [ /*#__PURE__*/ _jsxs("p", { className: "text-lg font-bold text-green-600", children: [ formatPrice(offer.price), "€" ] }), /*#__PURE__*/ _jsx("span", { className: `text-xs px-2 py-0.5 rounded-full ${offer.status === 'accepted' ? 'bg-green-100 text-green-700' : offer.status === 'declined' ? 'bg-red-100 text-red-700' : 'bg-gray-100 text-gray-700'}`, children: t(`offer.status.${offer.status}`, offer.status) }) ] }) ] }), offer.status === 'pending' && task.status === 'open' && /*#__PURE__*/ _jsxs("div", { className: "flex gap-2 mt-3 pt-3 border-t border-gray-50", children: [ /*#__PURE__*/ _jsx("button", { onClick: ()=>handleAccept(offer.id), className: "flex-1 bg-green-600 text-white py-2 rounded-lg text-sm font-semibold hover:bg-green-700", children: t('offer.accept') }), /*#__PURE__*/ _jsx("button", { onClick: ()=>handleDecline(offer.id), className: "flex-1 bg-gray-100 text-gray-700 py-2 rounded-lg text-sm font-semibold hover:bg-gray-200", children: t('offer.decline') }) ] }) ] }, offer.id); }) }) ] }), !isOwner && session && invite && inviteLoaded && task.status === 'open' && !myOffer && /*#__PURE__*/ _jsx("div", { className: "rounded-xl border border-blue-200 bg-blue-50 p-5", children: /*#__PURE__*/ _jsxs("div", { className: "flex items-center justify-between gap-4 flex-wrap gap-y-3", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-3", children: [ /*#__PURE__*/ _jsx("div", { className: "w-10 h-10 rounded-full bg-blue-100 flex items-center justify-center shrink-0", children: /*#__PURE__*/ _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: "w-5 h-5 text-blue-600", children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M21.75 6.75v10.5a2.25 2.25 0 0 1-2.25 2.25h-15a2.25 2.25 0 0 1-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25m19.5 0v.243a2.25 2.25 0 0 1-1.07 1.916l-7.5 4.615a2.25 2.25 0 0 1-2.36 0L3.32 8.91a2.25 2.25 0 0 1-1.07-1.916V6.75" }) }) }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("p", { className: "font-semibold text-gray-900 text-sm", children: t('task.invite.banner_title') }), /*#__PURE__*/ _jsx("p", { className: "text-gray-500 text-sm mt-0.5", children: t('task.invite.banner_hint') }) ] }) ] }), /*#__PURE__*/ _jsxs("div", { className: "flex gap-2 shrink-0", children: [ /*#__PURE__*/ _jsx(Link, { href: `/tasks/${taskId}/offer`, className: "bg-blue-600 text-white px-4 py-2 rounded-lg text-sm font-semibold hover:bg-blue-700 transition", children: t('task.invite.accept') }), /*#__PURE__*/ _jsx("button", { onClick: async ()=>{ if (!invite) return; setInviteDeclining(true); await dismissNotification(invite.id).catch(()=>{}); setInvite(null); setInviteDeclining(false); }, disabled: inviteDeclining, className: "border border-gray-300 bg-white text-gray-600 px-4 py-2 rounded-lg text-sm font-medium hover:bg-gray-50 disabled:opacity-50 transition", children: t('task.invite.decline') }) ] }) ] }) }), !isOwner && session && myOfferLoaded && /*#__PURE__*/ _jsxs("div", { className: "space-y-4", children: [ task.status === 'completed' && myOffer?.status === 'accepted' && /*#__PURE__*/ _jsxs("div", { className: "bg-green-50 border border-green-200 rounded-xl p-5 flex items-center gap-4", children: [ /*#__PURE__*/ _jsx("span", { className: "text-3xl", children: "\uD83C\uDF89" }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("p", { className: "font-bold text-green-800 text-lg", children: "Задание завершено!" }), /*#__PURE__*/ _jsx("p", { className: "text-green-700 text-sm", children: "Заказчик отметил задание как выполненное." }) ] }), /*#__PURE__*/ _jsxs("button", { onClick: ()=>handleMessage(task.customerId), disabled: msgLoading, className: "ml-auto flex items-center gap-2 bg-white text-blue-600 border border-blue-200 px-4 py-2 rounded-xl text-sm font-medium hover:bg-blue-50 disabled:opacity-50", children: [ /*#__PURE__*/ _jsx("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.8, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8 10h.01M12 10h.01M16 10h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z" }) }), t('chat.write_customer') ] }) ] }), (myOffer || task.status === 'open' && !invite || task.status !== 'open') && /*#__PURE__*/ _jsxs("div", { className: "bg-white rounded-xl border border-gray-200 p-6", children: [ /*#__PURE__*/ _jsx("h2", { className: "text-lg font-bold text-gray-900 mb-4", children: "Моё предложение" }), myOffer ? /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-start justify-between gap-4", children: [ /*#__PURE__*/ _jsxs("div", { className: "space-y-1", children: [ myOffer.message && /*#__PURE__*/ _jsx("p", { className: "text-sm text-gray-600", children: myOffer.message }), /*#__PURE__*/ _jsx("p", { className: "text-xs text-gray-400", children: new Date(myOffer.createdAt).toLocaleString(dateLocale) }) ] }), /*#__PURE__*/ _jsxs("div", { className: "text-right shrink-0", children: [ /*#__PURE__*/ _jsxs("p", { className: "text-xl font-bold text-green-600", children: [ formatPrice(myOffer.price), "€" ] }), /*#__PURE__*/ _jsx("span", { className: `text-xs px-2 py-0.5 rounded-full font-medium ${myOffer.status === 'accepted' ? 'bg-green-100 text-green-700' : myOffer.status === 'declined' ? 'bg-red-100 text-red-700' : 'bg-yellow-100 text-yellow-700'}`, children: myOffer.status === 'accepted' ? '✓ Принято' : myOffer.status === 'declined' ? '✗ Отклонено' : '⏳ На рассмотрении' }) ] }) ] }), myOffer.status === 'accepted' && task.status === 'in_progress' && /*#__PURE__*/ _jsx("div", { className: "mt-3 pt-3 border-t border-gray-100", children: /*#__PURE__*/ _jsxs("button", { onClick: ()=>handleMessage(task.customerId), disabled: msgLoading, className: "flex items-center gap-2 bg-blue-50 text-blue-600 border border-blue-200 px-4 py-2 rounded-xl text-sm font-medium hover:bg-blue-100 disabled:opacity-50", children: [ /*#__PURE__*/ _jsx("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.8, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8 10h.01M12 10h.01M16 10h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z" }) }), t('chat.write_customer') ] }) }) ] }) : task.status === 'open' && !invite ? /*#__PURE__*/ _jsxs("div", { className: "space-y-3", children: [ taskStats && taskStats.offerCount > 0 && /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-2 p-2.5 bg-amber-50 rounded-lg border border-amber-100", children: [ /*#__PURE__*/ _jsx("svg", { className: "w-4 h-4 text-amber-500 shrink-0", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M13 10V3L4 14h7v7l9-11h-7z" }) }), /*#__PURE__*/ _jsx("p", { className: "text-xs text-amber-700", children: t('fomo.already_offered', '\u0423\u0436\u0435 {n} \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u043e\u0432 \u043e\u0442\u043a\u043b\u0438\u043a\u043d\u0443\u043b\u0438\u0441\u044c').replace('{n}', String(taskStats.offerCount)) }) ] }), /*#__PURE__*/ _jsxs("div", { className: "flex items-center justify-between", children: [ /*#__PURE__*/ _jsx("p", { className: "text-sm text-gray-500", children: t('task.no_offer_yet', '\u0412\u044b \u0435\u0449\u0451 \u043d\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u043b\u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435') }), /*#__PURE__*/ _jsx(Link, { href: `/tasks/${taskId}/offer`, className: "bg-blue-600 text-white px-4 py-2 rounded-lg text-sm font-semibold hover:bg-blue-700", children: t('task.make_offer', '\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435') }) ] }) ] }) : null ] }), task.status === 'completed' && myOffer?.status === 'accepted' && /*#__PURE__*/ _jsxs("div", { className: "bg-white rounded-xl border border-gray-200 p-6", children: [ /*#__PURE__*/ _jsx("h2", { className: "text-lg font-bold text-gray-900 mb-4", children: "Оценка заказчика" }), !myReviewLoaded ? /*#__PURE__*/ _jsx("p", { className: "text-sm text-gray-400", children: "Загрузка..." }) : myReview ? /*#__PURE__*/ _jsxs("div", { className: "space-y-3", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-1", children: [ [ 1, 2, 3, 4, 5 ].map((star)=>/*#__PURE__*/ _jsx("span", { className: `text-2xl ${star <= myReview.rating ? 'text-yellow-400' : 'text-gray-200'}`, children: "★" }, star)), /*#__PURE__*/ _jsxs("span", { className: "ml-2 text-lg font-bold text-gray-800", children: [ myReview.rating, "/5" ] }) ] }), myReview.comment && /*#__PURE__*/ _jsx("p", { className: "text-gray-700 text-sm leading-relaxed", children: myReview.comment }), /*#__PURE__*/ _jsx("p", { className: "text-xs text-gray-400", children: new Date(myReview.createdAt).toLocaleDateString(dateLocale) }) ] }) : /*#__PURE__*/ _jsx("p", { className: "text-sm text-gray-500", children: "Заказчик ещё не оставил оценку." }) ] }) ] }), editing && editForm && /*#__PURE__*/ _jsx("div", { className: "fixed inset-0 z-50 flex items-start justify-center bg-black/50 overflow-y-auto py-8 px-4", children: /*#__PURE__*/ _jsxs("div", { className: "bg-white rounded-2xl w-full max-w-2xl shadow-xl", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center justify-between px-6 py-4 border-b border-gray-100", children: [ /*#__PURE__*/ _jsx("h2", { className: "text-lg font-bold text-gray-900", children: t('task.edit') }), /*#__PURE__*/ _jsx("button", { onClick: ()=>setEditing(false), className: "text-gray-400 hover:text-gray-600 p-1", children: /*#__PURE__*/ _jsx("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" }) }) }) ] }), /*#__PURE__*/ _jsxs("form", { onSubmit: handleEditSave, className: "p-6 space-y-4", children: [ /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsxs("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: [ t('create.field.title'), " *" ] }), /*#__PURE__*/ _jsx("input", { type: "text", required: true, minLength: 5, maxLength: 200, value: editForm.title, onChange: (e)=>setEditForm((p)=>({ ...p, title: e.target.value })), className: "w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400" }) ] }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsxs("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: [ t('create.field.description'), " *" ] }), /*#__PURE__*/ _jsx("textarea", { required: true, minLength: 20, value: editForm.description, onChange: (e)=>setEditForm((p)=>({ ...p, description: e.target.value })), rows: 4, className: "w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400 resize-none" }) ] }), /*#__PURE__*/ _jsxs("div", { className: "grid grid-cols-2 gap-4", children: [ /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: t('create.field.budget') }), /*#__PURE__*/ _jsx("input", { type: "number", min: 1, value: editForm.budget, onChange: (e)=>setEditForm((p)=>({ ...p, budget: e.target.value })), placeholder: "€", className: "w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400" }) ] }), /*#__PURE__*/ _jsx("div", { className: "flex items-end pb-2", children: /*#__PURE__*/ _jsxs("label", { className: "flex items-center gap-2 cursor-pointer", children: [ /*#__PURE__*/ _jsx("input", { type: "checkbox", checked: editForm.budgetNegotiable, onChange: (e)=>setEditForm((p)=>({ ...p, budgetNegotiable: e.target.checked })), className: "w-4 h-4 rounded text-blue-600" }), /*#__PURE__*/ _jsx("span", { className: "text-sm text-gray-700", children: t('create.field.budget_negotiable') }) ] }) }) ] }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: t('create.field.deadline') }), /*#__PURE__*/ _jsx("input", { type: "date", value: editForm.deadline, onChange: (e)=>setEditForm((p)=>({ ...p, deadline: e.target.value })), className: "w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400" }) ] }), /*#__PURE__*/ _jsxs("div", { className: "grid grid-cols-3 gap-3", children: [ /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: t('create.field.address.district') }), /*#__PURE__*/ _jsx("input", { type: "text", value: editForm.district, onChange: (e)=>setEditForm((p)=>({ ...p, district: e.target.value })), className: "w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400" }) ] }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: t('create.field.address.street') }), /*#__PURE__*/ _jsx("input", { type: "text", value: editForm.street, onChange: (e)=>setEditForm((p)=>({ ...p, street: e.target.value })), className: "w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400" }) ] }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: t('create.field.address.house') }), /*#__PURE__*/ _jsx("input", { type: "text", value: editForm.houseNumber, onChange: (e)=>setEditForm((p)=>({ ...p, houseNumber: e.target.value })), className: "w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400" }) ] }) ] }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: t('create.field.confidential') }), /*#__PURE__*/ _jsx("textarea", { value: editForm.confidentialNote, onChange: (e)=>setEditForm((p)=>({ ...p, confidentialNote: e.target.value })), rows: 2, className: "w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400 resize-none" }) ] }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: t('task.status_label', 'Статус') }), /*#__PURE__*/ _jsxs("select", { value: editForm.status, onChange: (e)=>setEditForm((p)=>({ ...p, status: e.target.value })), className: "w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400", children: [ /*#__PURE__*/ _jsx("option", { value: "open", children: t('task.status.open') }), /*#__PURE__*/ _jsx("option", { value: "draft", children: t('task.status.draft') }) ] }) ] }), /*#__PURE__*/ _jsxs("div", { className: "flex gap-3 pt-2", children: [ /*#__PURE__*/ _jsx("button", { type: "submit", disabled: editSaving, className: "flex-1 bg-blue-600 text-white py-2.5 rounded-xl font-semibold hover:bg-blue-700 disabled:opacity-50 transition", children: editSaving ? t('common.saving', '...') : t('common.save') }), /*#__PURE__*/ _jsx("button", { type: "button", onClick: ()=>setEditing(false), className: "px-6 py-2.5 rounded-xl border border-gray-200 text-gray-600 hover:bg-gray-50 transition", children: t('common.cancel') }) ] }) ] }) ] }) }) ] }); } @*`=_  35acOQ~$X__ 8?x07ry[b( _/ l s 7 > p w   "*Xcylt_+3KU |{%%<'@'''J(N((()) ++T,W,-_-..0011b4e455[6c666(76777R8V88899R;U;<<)=,=>_!>m?q???@@BBDD$E'EFFUGXGHH]I`IUJXJKKL LMMMM0N_3N0O3OOOyP|P,Q4QQQRR\SdSTTGWJWWWKXNXYY[[[[\\^_^__``#b&bTcWcddsfvfggiijjllmmnnpp,r/r1s5ss_ssuwu1w4wxxZ{]{||~~~~+.36 $MQ_"rv.2ߒĔǔLO+/"% ɣ_̣ФӤtxOS25VY),rvʭͭKNdh%)_ ͹йҹչ! 47ξѾx_{*- <@be ), 2_ TXFI"15 '_*NQPTPS_  N Q G J      +.03nqZ^_$' $  |$$$$&&.*2***q+t+,,00#1'12_2447 7|7788;;V<Z<<<->0>wA{AAALCOCFFGGfHiHKKlLRoLMMPPQQKRORTTUUWWTXWX^ZaZ(0,_lib_auth__WEBPACK_IMPORTED_MODULE_4__/* .useSession */ .wV)(0,_context_locale__WEBPACK_IMPORTED_MODULE_5__/* .useLocale */ .Y)(0,next_navigation__WEBPACK_IMPORTED_MODULE_3__.useRouter)(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(0,_lib_api__WEBPACK_IMPORTED_MODULE_7__/* .getOffers */ .Sw)(0,_lib_api__WEBPACK_IMPORTED_MODULE_7__/* .getTaskStats */ .vh)(0,_lib_api__WEBPACK_IMPORTED_MODULE_7__/* .getMyDashboard */ .H)(0,_lib_api__WEBPACK_IMPORTED_MODULE_7__/* .getMyOffers */ .aT)(0,_lib_api__WEBPACK_IMPORTED_MODULE_7__/* .getTaskInvite */ .F9)(0,_lib_api__WEBPACK_IMPORTED_MODULE_7__/* .getTaskReviews */ .H6)(0,_lib_api__WEBPACK_IMPORTED_MODULE_7__/* .acceptOffer */ .$H)(0,_lib_api__WEBPACK_IMPORTED_MODULE_7__/* .declineOffer */ .Lb)(0,_lib_api__WEBPACK_IMPORTED_MODULE_7__/* .completeTask */ .Rt)(0,_lib_api__WEBPACK_IMPORTED_MODULE_7__/* .createReview */ .bx)(0,_lib_api__WEBPACK_IMPORTED_MODULE_7__/* .getOrCreateDirectRoom */ .QN)(0,_lib_api__WEBPACK_IMPORTED_MODULE_7__/* .updateTask */ .lC)(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(0,_lib_taskLocale__WEBPACK_IMPORTED_MODULE_8__/* .taskTitle */ .Oj)(0,_lib_taskLocale__WEBPACK_IMPORTED_MODULE_8__/* .taskDescription */ .GZ)(next_link__WEBPACK_IMPORTED_MODULE_2___default())(0,_lib_formatName__WEBPACK_IMPORTED_MODULE_9__/* .shortName */ .E)(0,_lib_api__WEBPACK_IMPORTED_MODULE_7__/* .runAutoMatch */ .OV)_components_PlanBadge__WEBPACK_IMPORTED_MODULE_6__/* .PlanBadge */ .d(0,_lib_taskLocale__WEBPACK_IMPORTED_MODULE_8__/* .formatPrice */ .$g)(0,_lib_api__WEBPACK_IMPORTED_MODULE_7__/* .dismissNotification */ .yk)react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragmente!/* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ TaskDetailClient) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(78157); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31768); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(94496); /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(next_link__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var next_navigation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(71159); /* harmony import */ var _lib_auth__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(13260); /* harmony import */ var _context_locale__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(96484); /* harmony import */ var _lib_api__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(91864); /* harmony import */ var _lib_taskLocale__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(8293); /* harmony import */ var _lib_formatName__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(48178); /* harmony import */ var _components_PlanBadge__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(25701); /* __next_internal_client_entry_do_not_use__ default auto */ const statusColors = { open: 'bg-green-100 text-green-700', in_progress: 'bg-blue-100 text-blue-700', completed: 'bg-gray-100 text-gray-700', cancelled: 'bg-red-100 text-red-700', draft: 'bg-yellow-100 text-yellow-700' }; function TaskDetailClient({ taskId, initialTask, initialCustomer, catMap = {}, locMap = {} }) { const { data: session } = (0,_lib_auth__WEBPACK_IMPORTED_MODULE_4__/* .useSession */ .wV)(); const { t, locale } = (0,_context_locale__WEBPACK_IMPORTED_MODULE_5__/* .useLocale */ .Y)(); const router = (0,next_navigation__WEBPACK_IMPORTED_MODULE_3__.useRouter)(); const [task, setTask] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(initialTask); const [customer] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(initialCustomer); const [offers, setOffers] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)([]); const [offersLoaded, setOffersLoaded] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [myOffer, setMyOffer] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null); const [myOfferLoaded, setMyOfferLoaded] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [myReview, setMyReview] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null); const [myReviewLoaded, setMyReviewLoaded] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [reviewTargetId, setReviewTargetId] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null); const [reviewRating, setReviewRating] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(5); const [reviewComment, setReviewComment] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''); const [reviewSubmitting, setReviewSubmitting] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [reviewDone, setReviewDone] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [invite, setInvite] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null); const [inviteLoaded, setInviteLoaded] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [inviteDeclining, setInviteDeclining] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [msgLoading, setMsgLoading] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [lightboxIndex, setLightboxIndex] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null); // FOMO stats + auto-match const [taskStats, setTaskStats] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null); const [autoMatchResults, setAutoMatchResults] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null); const [autoMatchLoading, setAutoMatchLoading] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [hasAutoMatch, setHasAutoMatch] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false); // Edit task state const [editing, setEditing] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [editSaving, setEditSaving] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [editForm, setEditForm] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null); // Keyboard navigation for lightbox process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{ const handler = (e)=>{ if (e.key === 'Escape') setLightboxIndex(null); if (e.key === 'ArrowLeft') setLightboxIndex((prev)=>prev !== null && prev > 0 ? prev - 1 : prev); if (e.key === 'ArrowRight') setLightboxIndex((prev)=>{ if (prev === null) return prev; const imgs = task.images; return imgs && prev < imgs.length - 1 ? prev + 1 : prev; }); }; window.addEventListener('keydown', handler); return ()=>window.removeEventListener('keydown', handler); }, [ task.images ]); const dateLocale = locale === 'ru' ? 'ru-RU' : locale === 'en' ? 'en-US' : 'el-GR'; const currentUserId = session?.user?.id; const isOwner = currentUserId === task.customerId; // Load offers if owner process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{ if (!isOwner || offersLoaded) return; (0,_lib_api__WEBPACK_IMPORTED_MODULE_7__/* .getOffers */ .Sw)(taskId).then((data)=>{ setOffers(data); setOffersLoaded(true); }).catch(()=>setOffersLoaded(true)); }, [ isOwner, taskId, offersLoaded ]); // Load task stats + dashboard features for owner process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{ if (!isOwner) return; (0,_lib_api__WEBPACK_IMPORTED_MODULE_7__/* .getTaskStats */ .vh)(taskId).then(setTaskStats).catch(()=>{}); (0,_lib_api__WEBPACK_IMPORTED_MODULE_7__/* .getMyDashboard */ .H)().then((d)=>setHasAutoMatch(!!d.features?.hasAutoMatch)).catch(()=>{}); }, [ isOwner, taskId ]); // Load specialist's own offer process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{ if (!currentUserId || isOwner || myOfferLoaded) return; (0,_lib_api__WEBPACK_IMPORTED_MODULE_7__/* .getMyOffers */ .aT)().then((rows)=>{ const found = rows.find((r)=>r.task?.id === taskId); setMyOffer(found?.offer ?? null); setMyOfferLoaded(true); }).catch(()=>setMyOfferLoaded(true)); }, [ currentUserId, isOwner, taskId, myOfferLoaded ]); // Load task invite for specialist process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{ if (!currentUserId || isOwner || inviteLoaded) return; (0,_lib_api__WEBPACK_IMPORTED_MODULE_7__/* .getTaskInvite */ .F9)(taskId).then((rows)=>{ setInvite(rows[0] ?? null); setInviteLoaded(true); }).catch(()=>setInviteLoaded(true)); }, [ currentUserId, isOwner, taskId, inviteLoaded ]); // Load review for specialist when task completed process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{ if (!currentUserId || isOwner || myReviewLoaded || task.status !== 'completed') return; (0,_lib_api__WEBPACK_IMPORTED_MODULE_7__/* .getTaskReviews */ .H6)(taskId).then((rows)=>{ const found = rows.find((r)=>r.targetId === currentUserId); setMyReview(found ?? null); setMyReviewLoaded(true); }).catch(()=>setMyReviewLoaded(true)); }, [ currentUserId, isOwner, taskId, task.status, myReviewLoaded ]); async function handleAccept(offerId) { const updated = await (0,_lib_api__WEBPACK_IMPORTED_MODULE_7__/* .acceptOffer */ .$H)(offerId).catch(()=>null); if (updated) { setOffers((prev)=>prev.map((r)=>r.offer.id === offerId ? { ...r, offer: updated } : r)); setTask((t)=>({ ...t, status: 'in_progress' })); } } async function handleDecline(offerId) { const updated = await (0,_lib_api__WEBPACK_IMPORTED_MODULE_7__/* .declineOffer */ .Lb)(offerId).catch(()=>null); if (updated) { setOffers((prev)=>prev.map((r)=>r.offer.id === offerId ? { ...r, offer: updated } : r)); } } async function handleComplete() { if (!window.confirm(t('task.complete.confirm'))) return; const updated = await (0,_lib_api__WEBPACK_IMPORTED_MODULE_7__/* .completeTask */ .Rt)(taskId).catch(()=>null); if (updated) setTask((t)=>({ ...t, status: 'completed' })); } async function handleReview(e) { e.preventDefault(); if (!reviewTargetId) return; setReviewSubmitting(true); const ok = await (0,_lib_api__WEBPACK_IMPORTED_MODULE_7__/* .createReview */ .bx)({ taskId, targetId: reviewTargetId, rating: reviewRating, comment: reviewComment || undefined }).catch(()=>null); setReviewSubmitting(false); if (ok) { setReviewDone(true); setReviewTargetId(null); } } async function handleMessage(otherUserId) { setMsgLoading(true); try { const { room } = await (0,_lib_api__WEBPACK_IMPORTED_MODULE_7__/* .getOrCreateDirectRoom */ .QN)(otherUserId); router.push(`/chat?room=${room.id}`); } catch {} setMsgLoading(false); } function handleEditOpen() { setEditForm({ title: task.title, description: task.description, budget: task.budget ? Number(task.budget) : '', budgetNegotiable: task.budgetNegotiable ?? false, category: task.category ?? '', location: task.location ?? '', district: task.district ?? '', street: task.street ?? '', houseNumber: task.houseNumber ?? '', timeSlot: task.timeSlot ?? '', confidentialNote: task.confidentialNote ?? '', deadline: task.deadline ? new Date(task.deadline).toISOString().slice(0, 10) : '', status: task.status === 'draft' ? 'draft' : 'open' }); setEditing(true); } async function handleEditSave(e) { e.preventDefault(); if (!editForm) return; setEditSaving(true); try { const payload = { title: editForm.title, description: editForm.description, budgetNegotiable: editForm.budgetNegotiable, status: editForm.status }; if (editForm.budget !== '' && editForm.budget > 0) payload.budget = Number(editForm.budget); if (editForm.category) payload.category = editForm.category; if (editForm.location) payload.location = editForm.location; if (editForm.district) payload.district = editForm.district; if (editForm.street) payload.street = editForm.street; if (editForm.houseNumber) payload.houseNumber = editForm.houseNumber; if (editForm.timeSlot) payload.timeSlot = editForm.timeSlot; if (editForm.confidentialNote !== undefined) payload.confidentialNote = editForm.confidentialNote; if (editForm.deadline) payload.deadline = new Date(editForm.deadline).toISOString(); const updated = await (0,_lib_api__WEBPACK_IMPORTED_MODULE_7__/* .updateTask */ .lC)(taskId, payload); setTask((prev)=>({ ...prev, ...updated })); setEditing(false); } catch (err) { alert(err?.message || t('common.error')); } finally{ setEditSaving(false); } } const acceptedOffer = offers.find((r)=>r.offer.status === 'accepted'); return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "max-w-4xl mx-auto px-4 py-8", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "bg-white rounded-xl border border-gray-200 p-6 mb-6", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "flex justify-between items-start gap-4 mb-4", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "flex flex-wrap items-center gap-2", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: `text-xs font-medium px-2 py-1 rounded-full ${statusColors[task.status]}`, children: t(`task.status.${task.status}`, task.status) }), task.category && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: "text-xs font-medium text-blue-600 bg-blue-50 px-2 py-1 rounded-full", children: catMap[task.category] ?? task.category }), isOwner && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: "text-xs text-gray-400 bg-gray-100 px-2 py-1 rounded-full", children: t('task.yours') }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "flex items-center gap-2 shrink-0", children: [ isOwner && (task.status === 'draft' || task.status === 'open') && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("button", { onClick: handleEditOpen, className: "flex items-center gap-1.5 text-xs font-medium text-blue-600 bg-blue-50 hover:bg-blue-100 px-3 py-1.5 rounded-lg transition", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", { className: "w-3.5 h-3.5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125" }) }), t('task.edit') ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-sm text-gray-400", children: new Date(task.createdAt).toLocaleDateString(dateLocale) }) ] }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h1", { className: "text-2xl font-bold text-gray-900 mb-4", children: (0,_lib_taskLocale__WEBPACK_IMPORTED_MODULE_8__/* .taskTitle */ .Oj)(task, locale) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-gray-700 whitespace-pre-wrap mb-6", children: (0,_lib_taskLocale__WEBPACK_IMPORTED_MODULE_8__/* .taskDescription */ .GZ)(task, locale) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "grid grid-cols-2 md:grid-cols-4 gap-4 p-4 bg-gray-50 rounded-lg", children: [ task.budget && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-xs text-gray-500", children: t('task.budget') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("p", { className: "font-bold text-green-600 text-lg", children: [ task.budget, "€" ] }), task.budgetNegotiable && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-xs text-green-600 mt-0.5", children: t('task.budget_negotiable') }) ] }), !task.budget && task.budgetNegotiable && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-xs text-gray-500", children: t('task.budget') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "font-medium text-green-600", children: t('task.budget_negotiable') }) ] }), task.location && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-xs text-gray-500", children: t('task.location') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("p", { className: "font-medium", children: [ "\uD83D\uDCCD ", locMap[task.location] ?? task.location ] }), (task.street || task.district) && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-xs text-gray-500 mt-0.5", children: [ task.district, task.street, task.houseNumber ].filter(Boolean).join(', ') }) ] }), task.deadline && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-xs text-gray-500", children: t('task.deadline') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "font-medium", children: new Date(task.deadline).toLocaleDateString(dateLocale) }), task.timeSlot && task.timeSlot !== '' && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-xs text-gray-500 mt-0.5", children: t(`create.field.time_slot.${task.timeSlot}`, task.timeSlot) }) ] }), !task.deadline && task.timeSlot && task.timeSlot !== '' && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-xs text-gray-500", children: t('task.time_slot') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "font-medium", children: t(`create.field.time_slot.${task.timeSlot}`, task.timeSlot) }) ] }), customer && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-xs text-gray-500", children: t('task.customer') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)((next_link__WEBPACK_IMPORTED_MODULE_2___default()), { href: `/users/${customer.id}`, className: "flex items-center gap-2 mt-1 group", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "w-8 h-8 rounded-full overflow-hidden bg-blue-100 shrink-0 flex items-center justify-center", children: customer.image ? /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("img", { src: customer.image, alt: (0,_lib_formatName__WEBPACK_IMPORTED_MODULE_9__/* .shortName */ .E)(customer.name), className: "w-full h-full object-cover" }) : /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: "text-blue-600 font-semibold text-xs", children: (0,_lib_formatName__WEBPACK_IMPORTED_MODULE_9__/* .shortName */ .E)(customer.name).charAt(0).toUpperCase() }) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "font-medium text-gray-900 group-hover:text-blue-600 leading-none", children: (0,_lib_formatName__WEBPACK_IMPORTED_MODULE_9__/* .shortName */ .E)(customer.name) }), customer.rating && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("p", { className: "text-xs text-yellow-500 leading-none mt-0.5", children: [ "★ ", Number(customer.rating).toFixed(1) ] }) ] }) ] }) ] }) ] }), task.images && task.images.length > 0 && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "mt-4", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "flex flex-wrap gap-2", children: task.images.map((url, i)=>/*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { onClick: ()=>setLightboxIndex(i), className: "block w-24 h-24 rounded-lg overflow-hidden border border-gray-200 hover:opacity-90 hover:border-blue-300 transition", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("img", { src: url, alt: "", className: "w-full h-full object-cover" }) }, i)) }) }), lightboxIndex !== null && task.images && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/85", onClick: ()=>setLightboxIndex(null), children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "relative max-w-4xl w-full mx-4", onClick: (e)=>e.stopPropagation(), children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("img", { src: task.images[lightboxIndex], alt: "", className: "w-full max-h-[80vh] object-contain rounded-lg" }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { onClick: ()=>setLightboxIndex(null), className: "absolute -top-10 right-0 text-white/80 hover:text-white p-2", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", { className: "w-6 h-6", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" }) }) }), lightboxIndex > 0 && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { onClick: ()=>setLightboxIndex(lightboxIndex - 1), className: "absolute left-0 top-1/2 -translate-y-1/2 -translate-x-12 text-white/80 hover:text-white p-2", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", { className: "w-8 h-8", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 19l-7-7 7-7" }) }) }), lightboxIndex < task.images.length - 1 && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { onClick: ()=>setLightboxIndex(lightboxIndex + 1), className: "absolute right-0 top-1/2 -translate-y-1/2 translate-x-12 text-white/80 hover:text-white p-2", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", { className: "w-8 h-8", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) }) }), task.images.length > 1 && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("p", { className: "text-white/60 text-sm text-center mt-3", children: [ lightboxIndex + 1, " / ", task.images.length ] }) ] }) }), task.confidentialNote && (isOwner || myOffer?.status === 'accepted') && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "mt-4 p-3 bg-yellow-50 border border-yellow-200 rounded-lg", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("p", { className: "text-xs font-medium text-yellow-700 mb-1 flex items-center gap-1", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", { className: "w-3.5 h-3.5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2.5, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z" }) }), t('task.confidential') ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-sm text-yellow-800", children: task.confidentialNote }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "mt-6 flex flex-wrap gap-3", children: [ isOwner && task.status === 'in_progress' && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { onClick: handleComplete, className: "bg-green-600 text-white px-6 py-3 rounded-xl font-semibold hover:bg-green-700", children: t('task.complete') }), isOwner && acceptedOffer?.specialist?.id && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("button", { onClick: ()=>handleMessage(acceptedOffer.specialist.id), disabled: msgLoading, className: "flex items-center gap-2 bg-blue-50 text-blue-600 border border-blue-200 px-4 py-2.5 rounded-xl font-medium hover:bg-blue-100 disabled:opacity-50", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.8, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8 10h.01M12 10h.01M16 10h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z" }) }), t('chat.write_specialist') ] }), isOwner && task.status === 'completed' && acceptedOffer && !reviewDone && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { onClick: ()=>setReviewTargetId(acceptedOffer.specialist?.id ?? null), className: "bg-yellow-500 text-white px-6 py-3 rounded-xl font-semibold hover:bg-yellow-600", children: t('review.leave') }), reviewDone && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: "text-green-600 font-medium py-3", children: t('review.done') }) ] }), reviewTargetId && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("form", { onSubmit: handleReview, className: "mt-6 border-t border-gray-100 pt-6 space-y-4", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h3", { className: "font-semibold text-gray-800", children: t('review.leave') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-sm font-medium text-gray-700 mb-2", children: t('review.rating') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "flex gap-1", children: [ 1, 2, 3, 4, 5 ].map((star)=>/*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { type: "button", onClick: ()=>setReviewRating(star), className: `text-2xl transition ${star <= reviewRating ? 'text-yellow-400' : 'text-gray-300'}`, children: "★" }, star)) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: t('review.comment') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("textarea", { value: reviewComment, onChange: (e)=>setReviewComment(e.target.value), rows: 3, maxLength: 2000, placeholder: t('review.comment.placeholder'), className: "w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400 resize-none" }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "flex gap-3", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { type: "submit", disabled: reviewSubmitting, className: "bg-blue-600 text-white px-5 py-2 rounded-xl font-semibold hover:bg-blue-700 disabled:opacity-50", children: reviewSubmitting ? t('review.submitting') : t('review.submit') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { type: "button", onClick: ()=>setReviewTargetId(null), className: "px-5 py-2 rounded-xl border border-gray-200 text-gray-600 hover:bg-gray-50", children: t('common.cancel') }) ] }) ] }) ] }), isOwner && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "bg-white rounded-xl border border-gray-200 p-6", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "flex items-center justify-between mb-4 flex-wrap gap-2", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("h2", { className: "text-lg font-bold text-gray-900", children: [ t('task.offers'), " (", offers.length, ")" ] }), taskStats && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "flex items-center gap-3 text-xs text-gray-500", children: [ taskStats.totalViews > 0 && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("span", { className: "flex items-center gap-1", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("svg", { className: "w-3.5 h-3.5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.8, children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z" }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z" }) ] }), taskStats.totalViews ] }), taskStats.offerCount > 0 && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("span", { className: "font-medium text-blue-600", children: [ "⚡ ", taskStats.offerCount, " ", t('task.offers').toLowerCase() ] }) ] }), hasAutoMatch && task.status === 'open' && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("button", { onClick: async ()=>{ setAutoMatchLoading(true); try { const res = await (0,_lib_api__WEBPACK_IMPORTED_MODULE_7__/* .runAutoMatch */ .OV)(taskId); setAutoMatchResults(res.matches ?? []); } catch {} finally{ setAutoMatchLoading(false); } }, disabled: autoMatchLoading, className: "flex items-center gap-1.5 text-xs font-medium bg-purple-50 text-purple-700 border border-purple-200 px-3 py-1.5 rounded-lg hover:bg-purple-100 transition disabled:opacity-50", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", { className: "w-3.5 h-3.5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M13 10V3L4 14h7v7l9-11h-7z" }) }), autoMatchLoading ? t('common.loading') : t('task.auto_match', 'Авто-матч') ] }) ] }), autoMatchResults && autoMatchResults.length > 0 && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "mb-4 p-3 bg-purple-50 rounded-xl border border-purple-100", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-xs font-medium text-purple-700 mb-2", children: t('task.auto_match_results', 'Топ специалисты') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "space-y-2", children: autoMatchResults.slice(0, 5).map((s)=>/*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "flex items-center gap-2", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "w-7 h-7 rounded-full bg-purple-100 flex items-center justify-center text-purple-700 text-xs font-bold overflow-hidden", children: s.image ? /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("img", { src: s.image, alt: "", className: "w-full h-full object-cover" }) : s.name?.[0]?.toUpperCase() }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: "text-sm text-gray-800", children: s.firstName ?? s.name }), s.rating && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("span", { className: "text-xs text-yellow-500", children: [ "★", Number(s.rating).toFixed(1) ] }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { onClick: ()=>handleMessage(s.id), className: "text-xs text-blue-600 hover:underline", children: t('chat.write_btn') }) ] }, s.id)) }) ] }), !offersLoaded ? /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-gray-400 text-sm", children: t('common.loading') }) : offers.length === 0 ? /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-gray-500 text-sm", children: t('task.offers.none') }) : /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "space-y-4", children: offers.map((row)=>{ const offer = row.offer; const specialist = row.specialist; return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "border border-gray-100 rounded-xl p-4", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "flex justify-between items-start gap-4", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "flex items-start gap-3", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "w-10 h-10 rounded-full bg-blue-100 flex-shrink-0 flex items-center justify-center text-blue-700 font-bold overflow-hidden", children: specialist?.image ? /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("img", { src: specialist.image, alt: specialist.name, className: "w-full h-full object-cover" }) : specialist?.name?.[0]?.toUpperCase() ?? '?' }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [ specialist && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "flex items-center gap-1.5", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)((next_link__WEBPACK_IMPORTED_MODULE_2___default()), { href: `/users/${specialist.id}`, className: "font-medium text-gray-900 hover:text-blue-600", children: (0,_lib_formatName__WEBPACK_IMPORTED_MODULE_9__/* .shortName */ .E)(specialist.name) }), specialist.planTier && specialist.planTier !== 'free' && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_PlanBadge__WEBPACK_IMPORTED_MODULE_6__/* .PlanBadge */ .d, { tier: specialist.planTier }), specialist.hasVerifiedBadge && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", { className: "w-3.5 h-3.5 text-blue-500", viewBox: "0 0 24 24", fill: "currentColor", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { d: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" }) }) ] }), offer.message && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-sm text-gray-600 mt-1", children: offer.message }) ] }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "text-right shrink-0", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("p", { className: "text-lg font-bold text-green-600", children: [ (0,_lib_taskLocale__WEBPACK_IMPORTED_MODULE_8__/* .formatPrice */ .$g)(offer.price), "€" ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: `text-xs px-2 py-0.5 rounded-full ${offer.status === 'accepted' ? 'bg-green-100 text-green-700' : offer.status === 'declined' ? 'bg-red-100 text-red-700' : 'bg-gray-100 text-gray-700'}`, children: t(`offer.status.${offer.status}`, offer.status) }) ] }) ] }), offer.status === 'pending' && task.status === 'open' && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "flex gap-2 mt-3 pt-3 border-t border-gray-50", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { onClick: ()=>handleAccept(offer.id), className: "flex-1 bg-green-600 text-white py-2 rounded-lg text-sm font-semibold hover:bg-green-700", children: t('offer.accept') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { onClick: ()=>handleDecline(offer.id), className: "flex-1 bg-gray-100 text-gray-700 py-2 rounded-lg text-sm font-semibold hover:bg-gray-200", children: t('offer.decline') }) ] }) ] }, offer.id); }) }) ] }), !isOwner && session && invite && inviteLoaded && task.status === 'open' && !myOffer && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "rounded-xl border border-blue-200 bg-blue-50 p-5", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "flex items-center justify-between gap-4 flex-wrap gap-y-3", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "flex items-center gap-3", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "w-10 h-10 rounded-full bg-blue-100 flex items-center justify-center shrink-0", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: "w-5 h-5 text-blue-600", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M21.75 6.75v10.5a2.25 2.25 0 0 1-2.25 2.25h-15a2.25 2.25 0 0 1-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25m19.5 0v.243a2.25 2.25 0 0 1-1.07 1.916l-7.5 4.615a2.25 2.25 0 0 1-2.36 0L3.32 8.91a2.25 2.25 0 0 1-1.07-1.916V6.75" }) }) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "font-semibold text-gray-900 text-sm", children: t('task.invite.banner_title') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-gray-500 text-sm mt-0.5", children: t('task.invite.banner_hint') }) ] }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "flex gap-2 shrink-0", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)((next_link__WEBPACK_IMPORTED_MODULE_2___default()), { href: `/tasks/${taskId}/offer`, className: "bg-blue-600 text-white px-4 py-2 rounded-lg text-sm font-semibold hover:bg-blue-700 transition", children: t('task.invite.accept') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { onClick: async ()=>{ if (!invite) return; setInviteDeclining(true); await (0,_lib_api__WEBPACK_IMPORTED_MODULE_7__/* .dismissNotification */ .yk)(invite.id).catch(()=>{}); setInvite(null); setInviteDeclining(false); }, disabled: inviteDeclining, className: "border border-gray-300 bg-white text-gray-600 px-4 py-2 rounded-lg text-sm font-medium hover:bg-gray-50 disabled:opacity-50 transition", children: t('task.invite.decline') }) ] }) ] }) }), !isOwner && session && myOfferLoaded && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "space-y-4", children: [ task.status === 'completed' && myOffer?.status === 'accepted' && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "bg-green-50 border border-green-200 rounded-xl p-5 flex items-center gap-4", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: "text-3xl", children: "\uD83C\uDF89" }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "font-bold text-green-800 text-lg", children: "Задание завершено!" }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-green-700 text-sm", children: "Заказчик отметил задание как выполненное." }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("button", { onClick: ()=>handleMessage(task.customerId), disabled: msgLoading, className: "ml-auto flex items-center gap-2 bg-white text-blue-600 border border-blue-200 px-4 py-2 rounded-xl text-sm font-medium hover:bg-blue-50 disabled:opacity-50", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.8, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8 10h.01M12 10h.01M16 10h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z" }) }), t('chat.write_customer') ] }) ] }), (myOffer || task.status === 'open' && !invite || task.status !== 'open') && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "bg-white rounded-xl border border-gray-200 p-6", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h2", { className: "text-lg font-bold text-gray-900 mb-4", children: "Моё предложение" }), myOffer ? /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "flex items-start justify-between gap-4", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "space-y-1", children: [ myOffer.message && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-sm text-gray-600", children: myOffer.message }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-xs text-gray-400", children: new Date(myOffer.createdAt).toLocaleString(dateLocale) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "text-right shrink-0", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("p", { className: "text-xl font-bold text-green-600", children: [ (0,_lib_taskLocale__WEBPACK_IMPORTED_MODULE_8__/* .formatPrice */ .$g)(myOffer.price), "€" ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: `text-xs px-2 py-0.5 rounded-full font-medium ${myOffer.status === 'accepted' ? 'bg-green-100 text-green-700' : myOffer.status === 'declined' ? 'bg-red-100 text-red-700' : 'bg-yellow-100 text-yellow-700'}`, children: myOffer.status === 'accepted' ? '✓ Принято' : myOffer.status === 'declined' ? '✗ Отклонено' : '⏳ На рассмотрении' }) ] }) ] }), myOffer.status === 'accepted' && task.status === 'in_progress' && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "mt-3 pt-3 border-t border-gray-100", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("button", { onClick: ()=>handleMessage(task.customerId), disabled: msgLoading, className: "flex items-center gap-2 bg-blue-50 text-blue-600 border border-blue-200 px-4 py-2 rounded-xl text-sm font-medium hover:bg-blue-100 disabled:opacity-50", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.8, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8 10h.01M12 10h.01M16 10h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z" }) }), t('chat.write_customer') ] }) }) ] }) : task.status === 'open' && !invite ? /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "space-y-3", children: [ taskStats && taskStats.offerCount > 0 && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "flex items-center gap-2 p-2.5 bg-amber-50 rounded-lg border border-amber-100", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", { className: "w-4 h-4 text-amber-500 shrink-0", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M13 10V3L4 14h7v7l9-11h-7z" }) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-xs text-amber-700", children: t('fomo.already_offered', '\u0423\u0436\u0435 {n} \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u043e\u0432 \u043e\u0442\u043a\u043b\u0438\u043a\u043d\u0443\u043b\u0438\u0441\u044c').replace('{n}', String(taskStats.offerCount)) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "flex items-center justify-between", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-sm text-gray-500", children: t('task.no_offer_yet', '\u0412\u044b \u0435\u0449\u0451 \u043d\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u043b\u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)((next_link__WEBPACK_IMPORTED_MODULE_2___default()), { href: `/tasks/${taskId}/offer`, className: "bg-blue-600 text-white px-4 py-2 rounded-lg text-sm font-semibold hover:bg-blue-700", children: t('task.make_offer', '\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435') }) ] }) ] }) : null ] }), task.status === 'completed' && myOffer?.status === 'accepted' && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "bg-white rounded-xl border border-gray-200 p-6", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h2", { className: "text-lg font-bold text-gray-900 mb-4", children: "Оценка заказчика" }), !myReviewLoaded ? /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-sm text-gray-400", children: "Загрузка..." }) : myReview ? /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "space-y-3", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "flex items-center gap-1", children: [ [ 1, 2, 3, 4, 5 ].map((star)=>/*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: `text-2xl ${star <= myReview.rating ? 'text-yellow-400' : 'text-gray-200'}`, children: "★" }, star)), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("span", { className: "ml-2 text-lg font-bold text-gray-800", children: [ myReview.rating, "/5" ] }) ] }), myReview.comment && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-gray-700 text-sm leading-relaxed", children: myReview.comment }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-xs text-gray-400", children: new Date(myReview.createdAt).toLocaleDateString(dateLocale) }) ] }) : /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-sm text-gray-500", children: "Заказчик ещё не оставил оценку." }) ] }) ] }), editing && editForm && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "fixed inset-0 z-50 flex items-start justify-center bg-black/50 overflow-y-auto py-8 px-4", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "bg-white rounded-2xl w-full max-w-2xl shadow-xl", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "flex items-center justify-between px-6 py-4 border-b border-gray-100", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h2", { className: "text-lg font-bold text-gray-900", children: t('task.edit') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { onClick: ()=>setEditing(false), className: "text-gray-400 hover:text-gray-600 p-1", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" }) }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("form", { onSubmit: handleEditSave, className: "p-6 space-y-4", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: [ t('create.field.title'), " *" ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input", { type: "text", required: true, minLength: 5, maxLength: 200, value: editForm.title, onChange: (e)=>setEditForm((p)=>({ ...p, title: e.target.value })), className: "w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400" }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: [ t('create.field.description'), " *" ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("textarea", { required: true, minLength: 20, value: editForm.description, onChange: (e)=>setEditForm((p)=>({ ...p, description: e.target.value })), rows: 4, className: "w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400 resize-none" }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "grid grid-cols-2 gap-4", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: t('create.field.budget') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input", { type: "number", min: 1, value: editForm.budget, onChange: (e)=>setEditForm((p)=>({ ...p, budget: e.target.value })), placeholder: "€", className: "w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400" }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "flex items-end pb-2", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("label", { className: "flex items-center gap-2 cursor-pointer", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input", { type: "checkbox", checked: editForm.budgetNegotiable, onChange: (e)=>setEditForm((p)=>({ ...p, budgetNegotiable: e.target.checked })), className: "w-4 h-4 rounded text-blue-600" }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: "text-sm text-gray-700", children: t('create.field.budget_negotiable') }) ] }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: t('create.field.deadline') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input", { type: "date", value: editForm.deadline, onChange: (e)=>setEditForm((p)=>({ ...p, deadline: e.target.value })), className: "w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400" }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "grid grid-cols-3 gap-3", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: t('create.field.address.district') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input", { type: "text", value: editForm.district, onChange: (e)=>setEditForm((p)=>({ ...p, district: e.target.value })), className: "w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400" }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: t('create.field.address.street') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input", { type: "text", value: editForm.street, onChange: (e)=>setEditForm((p)=>({ ...p, street: e.target.value })), className: "w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400" }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: t('create.field.address.house') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input", { type: "text", value: editForm.houseNumber, onChange: (e)=>setEditForm((p)=>({ ...p, houseNumber: e.target.value })), className: "w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400" }) ] }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: t('create.field.confidential') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("textarea", { value: editForm.confidentialNote, onChange: (e)=>setEditForm((p)=>({ ...p, confidentialNote: e.target.value })), rows: 2, className: "w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400 resize-none" }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: t('task.status_label', 'Статус') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("select", { value: editForm.status, onChange: (e)=>setEditForm((p)=>({ ...p, status: e.target.value })), className: "w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("option", { value: "open", children: t('task.status.open') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("option", { value: "draft", children: t('task.status.draft') }) ] }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "flex gap-3 pt-2", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { type: "submit", disabled: editSaving, className: "flex-1 bg-blue-600 text-white py-2.5 rounded-xl font-semibold hover:bg-blue-700 disabled:opacity-50 transition", children: editSaving ? t('common.saving', '...') : t('common.save') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { type: "button", onClick: ()=>setEditing(false), className: "px-6 py-2.5 rounded-xl border border-gray-200 text-gray-600 hover:bg-gray-50 transition", children: t('common.cancel') }) ] }) ] }) ] }) }) ] }); } fi j@/* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ TaskDetailClient) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(78157); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31768); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(94496); /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(next_link__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var next_navigation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(71159); /* harmony import */ var _lib_auth__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(13260); /* harmony import */ var _context_locale__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(96484); /* harmony import */ var _lib_api__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(91864); /* harmony import */ var _lib_taskLocale__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(8293); /* harmony import */ var _lib_formatName__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(48178); /* harmony import */ var _components_PlanBadge__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(25701); k]/* __next_internal_client_entry_do_not_use__ default auto */ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime"; import { useState, useEffect } from 'react'; import Link from 'next/link'; import { useRouter } from 'next/navigation'; import { useSession } from '@/lib/auth'; import { useLocale } from '@/context/locale'; import { getOffers, acceptOffer, declineOffer, completeTask, createReview, getMyOffers, getTaskReviews, getTaskInvite, dismissNotification, getOrCreateDirectRoom, updateTask, getTaskStats, runAutoMatch, getMyDashboard } from '@/lib/api'; import { taskTitle, taskDescription, formatPrice } from '@/lib/taskLocale'; import { shortName } from '@/lib/formatName'; import { PlanBadge } from '@/components/PlanBadge'; const statusColors = { open: 'bg-green-100 text-green-700', in_progress: 'bg-blue-100 text-blue-700', completed: 'bg-gray-100 text-gray-700', cancelled: 'bg-red-100 text-red-700', draft: 'bg-yellow-100 text-yellow-700' }; export default function TaskDetailClient({ taskId, initialTask, initialCustomer, catMap = {}, locMap = {} }) { const { data: session } = useSession(); const { t, locale } = useLocale(); const router = useRouter(); const [task, setTask] = useState(initialTask); const [customer] = useState(initialCustomer); const [offers, setOffers] = useState([]); const [offersLoaded, setOffersLoaded] = useState(false); const [myOffer, setMyOffer] = useState(null); const [myOfferLoaded, setMyOfferLoaded] = useState(false); const [myReview, setMyReview] = useState(null); const [myReviewLoaded, setMyReviewLoaded] = useState(false); const [reviewTargetId, setReviewTargetId] = useState(null); const [reviewRating, setReviewRating] = useState(5); const [reviewComment, setReviewComment] = useState(''); const [reviewSubmitting, setReviewSubmitting] = useState(false); const [reviewDone, setReviewDone] = useState(false); const [invite, setInvite] = useState(null); const [inviteLoaded, setInviteLoaded] = useState(false); const [inviteDeclining, setInviteDeclining] = useState(false); const [msgLoading, setMsgLoading] = useState(false); const [lightboxIndex, setLightboxIndex] = useState(null); // FOMO stats + auto-match const [taskStats, setTaskStats] = useState(null); const [autoMatchResults, setAutoMatchResults] = useState(null); const [autoMatchLoading, setAutoMatchLoading] = useState(false); const [hasAutoMatch, setHasAutoMatch] = useState(false); // Edit task state const [editing, setEditing] = useState(false); const [editSaving, setEditSaving] = useState(false); const [editForm, setEditForm] = useState(null); // Keyboard navigation for lightbox process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ const handler = (e)=>{ if (e.key === 'Escape') setLightboxIndex(null); if (e.key === 'ArrowLeft') setLightboxIndex((prev)=>prev !== null && prev > 0 ? prev - 1 : prev); if (e.key === 'ArrowRight') setLightboxIndex((prev)=>{ if (prev === null) return prev; const imgs = task.images; return imgs && prev < imgs.length - 1 ? prev + 1 : prev; }); }; window.addEventListener('keydown', handler); return ()=>window.removeEventListener('keydown', handler); }, [ task.images ]); const dateLocale = locale === 'ru' ? 'ru-RU' : locale === 'en' ? 'en-US' : 'el-GR'; const currentUserId = session?.user?.id; const isOwner = currentUserId === task.customerId; // Load offers if owner process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (!isOwner || offersLoaded) return; getOffers(taskId).then((data)=>{ setOffers(data); setOffersLoaded(true); }).catch(()=>setOffersLoaded(true)); }, [ isOwner, taskId, offersLoaded ]); // Load task stats + dashboard features for owner process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (!isOwner) return; getTaskStats(taskId).then(setTaskStats).catch(()=>{}); getMyDashboard().then((d)=>setHasAutoMatch(!!d.features?.hasAutoMatch)).catch(()=>{}); }, [ isOwner, taskId ]); // Load specialist's own offer process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (!currentUserId || isOwner || myOfferLoaded) return; getMyOffers().then((rows)=>{ const found = rows.find((r)=>r.task?.id === taskId); setMyOffer(found?.offer ?? null); setMyOfferLoaded(true); }).catch(()=>setMyOfferLoaded(true)); }, [ currentUserId, isOwner, taskId, myOfferLoaded ]); // Load task invite for specialist process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (!currentUserId || isOwner || inviteLoaded) return; getTaskInvite(taskId).then((rows)=>{ setInvite(rows[0] ?? null); setInviteLoaded(true); }).catch(()=>setInviteLoaded(true)); }, [ currentUserId, isOwner, taskId, inviteLoaded ]); // Load review for specialist when task completed process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (!currentUserId || isOwner || myReviewLoaded || task.status !== 'completed') return; getTaskReviews(taskId).then((rows)=>{ const found = rows.find((r)=>r.targetId === currentUserId); setMyReview(found ?? null); setMyReviewLoaded(true); }).catch(()=>setMyReviewLoaded(true)); }, [ currentUserId, isOwner, taskId, task.status, myReviewLoaded ]); async function handleAccept(offerId) { const updated = await acceptOffer(offerId).catch(()=>null); if (updated) { setOffers((prev)=>prev.map((r)=>r.offer.id === offerId ? { ...r, offer: updated } : r)); setTask((t)=>({ ...t, status: 'in_progress' })); } } async function handleDecline(offerId) { const updated = await declineOffer(offerId).catch(()=>null); if (updated) { setOffers((prev)=>prev.map((r)=>r.offer.id === offerId ? { ...r, offer: updated } : r)); } } async function handleComplete() { if (!window.confirm(t('task.complete.confirm'))) return; const updated = await completeTask(taskId).catch(()=>null); if (updated) setTask((t)=>({ ...t, status: 'completed' })); } async function handleReview(e) { e.preventDefault(); if (!reviewTargetId) return; setReviewSubmitting(true); const ok = await createReview({ taskId, targetId: reviewTargetId, rating: reviewRating, comment: reviewComment || undefined }).catch(()=>null); setReviewSubmitting(false); if (ok) { setReviewDone(true); setReviewTargetId(null); } } async function handleMessage(otherUserId) { setMsgLoading(true); try { const { room } = await getOrCreateDirectRoom(otherUserId); router.push(`/chat?room=${room.id}`); } catch {} setMsgLoading(false); } function handleEditOpen() { setEditForm({ title: task.title, description: task.description, budget: task.budget ? Number(task.budget) : '', budgetNegotiable: task.budgetNegotiable ?? false, category: task.category ?? '', location: task.location ?? '', district: task.district ?? '', street: task.street ?? '', houseNumber: task.houseNumber ?? '', timeSlot: task.timeSlot ?? '', confidentialNote: task.confidentialNote ?? '', deadline: task.deadline ? new Date(task.deadline).toISOString().slice(0, 10) : '', status: task.status === 'draft' ? 'draft' : 'open' }); setEditing(true); } async function handleEditSave(e) { e.preventDefault(); if (!editForm) return; setEditSaving(true); try { const payload = { title: editForm.title, description: editForm.description, budgetNegotiable: editForm.budgetNegotiable, status: editForm.status }; if (editForm.budget !== '' && editForm.budget > 0) payload.budget = Number(editForm.budget); if (editForm.category) payload.category = editForm.category; if (editForm.location) payload.location = editForm.location; if (editForm.district) payload.district = editForm.district; if (editForm.street) payload.street = editForm.street; if (editForm.houseNumber) payload.houseNumber = editForm.houseNumber; if (editForm.timeSlot) payload.timeSlot = editForm.timeSlot; if (editForm.confidentialNote !== undefined) payload.confidentialNote = editForm.confidentialNote; if (editForm.deadline) payload.deadline = new Date(editForm.deadline).toISOString(); const updated = await updateTask(taskId, payload); setTask((prev)=>({ ...prev, ...updated })); setEditing(false); } catch (err) { alert(err?.message || t('common.error')); } finally{ setEditSaving(false); } } const acceptedOffer = offers.find((r)=>r.offer.status === 'accepted'); return /*#__PURE__*/ _jsxs("div", { className: "max-w-4xl mx-auto px-4 py-8", children: [ /*#__PURE__*/ _jsxs("div", { className: "bg-white rounded-xl border border-gray-200 p-6 mb-6", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex justify-between items-start gap-4 mb-4", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [ /*#__PURE__*/ _jsx("span", { className: `text-xs font-medium px-2 py-1 rounded-full ${statusColors[task.status]}`, children: t(`task.status.${task.status}`, task.status) }), task.category && /*#__PURE__*/ _jsx("span", { className: "text-xs font-medium text-blue-600 bg-blue-50 px-2 py-1 rounded-full", children: catMap[task.category] ?? task.category }), isOwner && /*#__PURE__*/ _jsx("span", { className: "text-xs text-gray-400 bg-gray-100 px-2 py-1 rounded-full", children: t('task.yours') }) ] }), /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-2 shrink-0", children: [ isOwner && (task.status === 'draft' || task.status === 'open') && /*#__PURE__*/ _jsxs("button", { onClick: handleEditOpen, className: "flex items-center gap-1.5 text-xs font-medium text-blue-600 bg-blue-50 hover:bg-blue-100 px-3 py-1.5 rounded-lg transition", children: [ /*#__PURE__*/ _jsx("svg", { className: "w-3.5 h-3.5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125" }) }), t('task.edit') ] }), /*#__PURE__*/ _jsx("p", { className: "text-sm text-gray-400", children: new Date(task.createdAt).toLocaleDateString(dateLocale) }) ] }) ] }), /*#__PURE__*/ _jsx("h1", { className: "text-2xl font-bold text-gray-900 mb-4", children: taskTitle(task, locale) }), /*#__PURE__*/ _jsx("p", { className: "text-gray-700 whitespace-pre-wrap mb-6", children: taskDescription(task, locale) }), /*#__PURE__*/ _jsxs("div", { className: "grid grid-cols-2 md:grid-cols-4 gap-4 p-4 bg-gray-50 rounded-lg", children: [ task.budget && /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("p", { className: "text-xs text-gray-500", children: t('task.budget') }), /*#__PURE__*/ _jsxs("p", { className: "font-bold text-green-600 text-lg", children: [ task.budget, "€" ] }), task.budgetNegotiable && /*#__PURE__*/ _jsx("p", { className: "text-xs text-green-600 mt-0.5", children: t('task.budget_negotiable') }) ] }), !task.budget && task.budgetNegotiable && /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("p", { className: "text-xs text-gray-500", children: t('task.budget') }), /*#__PURE__*/ _jsx("p", { className: "font-medium text-green-600", children: t('task.budget_negotiable') }) ] }), task.location && /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("p", { className: "text-xs text-gray-500", children: t('task.location') }), /*#__PURE__*/ _jsxs("p", { className: "font-medium", children: [ "\uD83D\uDCCD ", locMap[task.location] ?? task.location ] }), (task.street || task.district) && /*#__PURE__*/ _jsx("p", { className: "text-xs text-gray-500 mt-0.5", children: [ task.district, task.street, task.houseNumber ].filter(Boolean).join(', ') }) ] }), task.deadline && /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("p", { className: "text-xs text-gray-500", children: t('task.deadline') }), /*#__PURE__*/ _jsx("p", { className: "font-medium", children: new Date(task.deadline).toLocaleDateString(dateLocale) }), task.timeSlot && task.timeSlot !== '' && /*#__PURE__*/ _jsx("p", { className: "text-xs text-gray-500 mt-0.5", children: t(`create.field.time_slot.${task.timeSlot}`, task.timeSlot) }) ] }), !task.deadline && task.timeSlot && task.timeSlot !== '' && /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("p", { className: "text-xs text-gray-500", children: t('task.time_slot') }), /*#__PURE__*/ _jsx("p", { className: "font-medium", children: t(`create.field.time_slot.${task.timeSlot}`, task.timeSlot) }) ] }), customer && /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("p", { className: "text-xs text-gray-500", children: t('task.customer') }), /*#__PURE__*/ _jsxs(Link, { href: `/users/${customer.id}`, className: "flex items-center gap-2 mt-1 group", children: [ /*#__PURE__*/ _jsx("div", { className: "w-8 h-8 rounded-full overflow-hidden bg-blue-100 shrink-0 flex items-center justify-center", children: customer.image ? /*#__PURE__*/ _jsx("img", { src: customer.image, alt: shortName(customer.name), className: "w-full h-full object-cover" }) : /*#__PURE__*/ _jsx("span", { className: "text-blue-600 font-semibold text-xs", children: shortName(customer.name).charAt(0).toUpperCase() }) }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("p", { className: "font-medium text-gray-900 group-hover:text-blue-600 leading-none", children: shortName(customer.name) }), customer.rating && /*#__PURE__*/ _jsxs("p", { className: "text-xs text-yellow-500 leading-none mt-0.5", children: [ "★ ", Number(customer.rating).toFixed(1) ] }) ] }) ] }) ] }) ] }), task.images && task.images.length > 0 && /*#__PURE__*/ _jsx("div", { className: "mt-4", children: /*#__PURE__*/ _jsx("div", { className: "flex flex-wrap gap-2", children: task.images.map((url, i)=>/*#__PURE__*/ _jsx("button", { onClick: ()=>setLightboxIndex(i), className: "block w-24 h-24 rounded-lg overflow-hidden border border-gray-200 hover:opacity-90 hover:border-blue-300 transition", children: /*#__PURE__*/ _jsx("img", { src: url, alt: "", className: "w-full h-full object-cover" }) }, i)) }) }), lightboxIndex !== null && task.images && /*#__PURE__*/ _jsx("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/85", onClick: ()=>setLightboxIndex(null), children: /*#__PURE__*/ _jsxs("div", { className: "relative max-w-4xl w-full mx-4", onClick: (e)=>e.stopPropagation(), children: [ /*#__PURE__*/ _jsx("img", { src: task.images[lightboxIndex], alt: "", className: "w-full max-h-[80vh] object-contain rounded-lg" }), /*#__PURE__*/ _jsx("button", { onClick: ()=>setLightboxIndex(null), className: "absolute -top-10 right-0 text-white/80 hover:text-white p-2", children: /*#__PURE__*/ _jsx("svg", { className: "w-6 h-6", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" }) }) }), lightboxIndex > 0 && /*#__PURE__*/ _jsx("button", { onClick: ()=>setLightboxIndex(lightboxIndex - 1), className: "absolute left-0 top-1/2 -translate-y-1/2 -translate-x-12 text-white/80 hover:text-white p-2", children: /*#__PURE__*/ _jsx("svg", { className: "w-8 h-8", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 19l-7-7 7-7" }) }) }), lightboxIndex < task.images.length - 1 && /*#__PURE__*/ _jsx("button", { onClick: ()=>setLightboxIndex(lightboxIndex + 1), className: "absolute right-0 top-1/2 -translate-y-1/2 translate-x-12 text-white/80 hover:text-white p-2", children: /*#__PURE__*/ _jsx("svg", { className: "w-8 h-8", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) }) }), task.images.length > 1 && /*#__PURE__*/ _jsxs("p", { className: "text-white/60 text-sm text-center mt-3", children: [ lightboxIndex + 1, " / ", task.images.length ] }) ] }) }), task.confidentialNote && (isOwner || myOffer?.status === 'accepted') && /*#__PURE__*/ _jsxs("div", { className: "mt-4 p-3 bg-yellow-50 border border-yellow-200 rounded-lg", children: [ /*#__PURE__*/ _jsxs("p", { className: "text-xs font-medium text-yellow-700 mb-1 flex items-center gap-1", children: [ /*#__PURE__*/ _jsx("svg", { className: "w-3.5 h-3.5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2.5, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z" }) }), t('task.confidential') ] }), /*#__PURE__*/ _jsx("p", { className: "text-sm text-yellow-800", children: task.confidentialNote }) ] }), /*#__PURE__*/ _jsxs("div", { className: "mt-6 flex flex-wrap gap-3", children: [ isOwner && task.status === 'in_progress' && /*#__PURE__*/ _jsx("button", { onClick: handleComplete, className: "bg-green-600 text-white px-6 py-3 rounded-xl font-semibold hover:bg-green-700", children: t('task.complete') }), isOwner && acceptedOffer?.specialist?.id && /*#__PURE__*/ _jsxs("button", { onClick: ()=>handleMessage(acceptedOffer.specialist.id), disabled: msgLoading, className: "flex items-center gap-2 bg-blue-50 text-blue-600 border border-blue-200 px-4 py-2.5 rounded-xl font-medium hover:bg-blue-100 disabled:opacity-50", children: [ /*#__PURE__*/ _jsx("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.8, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8 10h.01M12 10h.01M16 10h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z" }) }), t('chat.write_specialist') ] }), isOwner && task.status === 'completed' && acceptedOffer && !reviewDone && /*#__PURE__*/ _jsx("button", { onClick: ()=>setReviewTargetId(acceptedOffer.specialist?.id ?? null), className: "bg-yellow-500 text-white px-6 py-3 rounded-xl font-semibold hover:bg-yellow-600", children: t('review.leave') }), reviewDone && /*#__PURE__*/ _jsx("span", { className: "text-green-600 font-medium py-3", children: t('review.done') }) ] }), reviewTargetId && /*#__PURE__*/ _jsxs("form", { onSubmit: handleReview, className: "mt-6 border-t border-gray-100 pt-6 space-y-4", children: [ /*#__PURE__*/ _jsx("h3", { className: "font-semibold text-gray-800", children: t('review.leave') }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("p", { className: "text-sm font-medium text-gray-700 mb-2", children: t('review.rating') }), /*#__PURE__*/ _jsx("div", { className: "flex gap-1", children: [ 1, 2, 3, 4, 5 ].map((star)=>/*#__PURE__*/ _jsx("button", { type: "button", onClick: ()=>setReviewRating(star), className: `text-2xl transition ${star <= reviewRating ? 'text-yellow-400' : 'text-gray-300'}`, children: "★" }, star)) }) ] }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: t('review.comment') }), /*#__PURE__*/ _jsx("textarea", { value: reviewComment, onChange: (e)=>setReviewComment(e.target.value), rows: 3, maxLength: 2000, placeholder: t('review.comment.placeholder'), className: "w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400 resize-none" }) ] }), /*#__PURE__*/ _jsxs("div", { className: "flex gap-3", children: [ /*#__PURE__*/ _jsx("button", { type: "submit", disabled: reviewSubmitting, className: "bg-blue-600 text-white px-5 py-2 rounded-xl font-semibold hover:bg-blue-700 disabled:opacity-50", children: reviewSubmitting ? t('review.submitting') : t('review.submit') }), /*#__PURE__*/ _jsx("button", { type: "button", onClick: ()=>setReviewTargetId(null), className: "px-5 py-2 rounded-xl border border-gray-200 text-gray-600 hover:bg-gray-50", children: t('common.cancel') }) ] }) ] }) ] }), isOwner && /*#__PURE__*/ _jsxs("div", { className: "bg-white rounded-xl border border-gray-200 p-6", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center justify-between mb-4 flex-wrap gap-2", children: [ /*#__PURE__*/ _jsxs("h2", { className: "text-lg font-bold text-gray-900", children: [ t('task.offers'), " (", offers.length, ")" ] }), taskStats && /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-3 text-xs text-gray-500", children: [ taskStats.totalViews > 0 && /*#__PURE__*/ _jsxs("span", { className: "flex items-center gap-1", children: [ /*#__PURE__*/ _jsxs("svg", { className: "w-3.5 h-3.5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.8, children: [ /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z" }), /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z" }) ] }), taskStats.totalViews ] }), taskStats.offerCount > 0 && /*#__PURE__*/ _jsxs("span", { className: "font-medium text-blue-600", children: [ "⚡ ", taskStats.offerCount, " ", t('task.offers').toLowerCase() ] }) ] }), hasAutoMatch && task.status === 'open' && /*#__PURE__*/ _jsxs("button", { onClick: async ()=>{ setAutoMatchLoading(true); try { const res = await runAutoMatch(taskId); setAutoMatchResults(res.matches ?? []); } catch {} finally{ setAutoMatchLoading(false); } }, disabled: autoMatchLoading, className: "flex items-center gap-1.5 text-xs font-medium bg-purple-50 text-purple-700 border border-purple-200 px-3 py-1.5 rounded-lg hover:bg-purple-100 transition disabled:opacity-50", children: [ /*#__PURE__*/ _jsx("svg", { className: "w-3.5 h-3.5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M13 10V3L4 14h7v7l9-11h-7z" }) }), autoMatchLoading ? t('common.loading') : t('task.auto_match', 'Авто-матч') ] }) ] }), autoMatchResults && autoMatchResults.length > 0 && /*#__PURE__*/ _jsxs("div", { className: "mb-4 p-3 bg-purple-50 rounded-xl border border-purple-100", children: [ /*#__PURE__*/ _jsx("p", { className: "text-xs font-medium text-purple-700 mb-2", children: t('task.auto_match_results', 'Топ специалисты') }), /*#__PURE__*/ _jsx("div", { className: "space-y-2", children: autoMatchResults.slice(0, 5).map((s)=>/*#__PURE__*/ _jsxs("div", { className: "flex items-center justify-between gap-2", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-2", children: [ /*#__PURE__*/ _jsx("div", { className: "w-7 h-7 rounded-full bg-purple-100 flex items-center justify-center text-purple-700 text-xs font-bold overflow-hidden", children: s.image ? /*#__PURE__*/ _jsx("img", { src: s.image, alt: "", className: "w-full h-full object-cover" }) : s.name?.[0]?.toUpperCase() }), /*#__PURE__*/ _jsx("span", { className: "text-sm text-gray-800", children: s.firstName ?? s.name }), s.rating && /*#__PURE__*/ _jsxs("span", { className: "text-xs text-yellow-500", children: [ "★", Number(s.rating).toFixed(1) ] }) ] }), /*#__PURE__*/ _jsx("button", { onClick: ()=>handleMessage(s.id), className: "text-xs text-blue-600 hover:underline", children: t('chat.write_btn') }) ] }, s.id)) }) ] }), !offersLoaded ? /*#__PURE__*/ _jsx("p", { className: "text-gray-400 text-sm", children: t('common.loading') }) : offers.length === 0 ? /*#__PURE__*/ _jsx("p", { className: "text-gray-500 text-sm", children: t('task.offers.none') }) : /*#__PURE__*/ _jsx("div", { className: "space-y-4", children: offers.map((row)=>{ const offer = row.offer; const specialist = row.specialist; return /*#__PURE__*/ _jsxs("div", { className: "border border-gray-100 rounded-xl p-4", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex justify-between items-start gap-4", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-start gap-3", children: [ /*#__PURE__*/ _jsx("div", { className: "w-10 h-10 rounded-full bg-blue-100 flex-shrink-0 flex items-center justify-center text-blue-700 font-bold overflow-hidden", children: specialist?.image ? /*#__PURE__*/ _jsx("img", { src: specialist.image, alt: specialist.name, className: "w-full h-full object-cover" }) : specialist?.name?.[0]?.toUpperCase() ?? '?' }), /*#__PURE__*/ _jsxs("div", { children: [ specialist && /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-1.5", children: [ /*#__PURE__*/ _jsx(Link, { href: `/users/${specialist.id}`, className: "font-medium text-gray-900 hover:text-blue-600", children: shortName(specialist.name) }), specialist.planTier && specialist.planTier !== 'free' && /*#__PURE__*/ _jsx(PlanBadge, { tier: specialist.planTier }), specialist.hasVerifiedBadge && /*#__PURE__*/ _jsx("svg", { className: "w-3.5 h-3.5 text-blue-500", viewBox: "0 0 24 24", fill: "currentColor", children: /*#__PURE__*/ _jsx("path", { d: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" }) }) ] }), offer.message && /*#__PURE__*/ _jsx("p", { className: "text-sm text-gray-600 mt-1", children: offer.message }) ] }) ] }), /*#__PURE__*/ _jsxs("div", { className: "text-right shrink-0", children: [ /*#__PURE__*/ _jsxs("p", { className: "text-lg font-bold text-green-600", children: [ formatPrice(offer.price), "€" ] }), /*#__PURE__*/ _jsx("span", { className: `text-xs px-2 py-0.5 rounded-full ${offer.status === 'accepted' ? 'bg-green-100 text-green-700' : offer.status === 'declined' ? 'bg-red-100 text-red-700' : 'bg-gray-100 text-gray-700'}`, children: t(`offer.status.${offer.status}`, offer.status) }) ] }) ] }), offer.status === 'pending' && task.status === 'open' && /*#__PURE__*/ _jsxs("div", { className: "flex gap-2 mt-3 pt-3 border-t border-gray-50", children: [ /*#__PURE__*/ _jsx("button", { onClick: ()=>handleAccept(offer.id), className: "flex-1 bg-green-600 text-white py-2 rounded-lg text-sm font-semibold hover:bg-green-700", children: t('offer.accept') }), /*#__PURE__*/ _jsx("button", { onClick: ()=>handleDecline(offer.id), className: "flex-1 bg-gray-100 text-gray-700 py-2 rounded-lg text-sm font-semibold hover:bg-gray-200", children: t('offer.decline') }) ] }) ] }, offer.id); }) }) ] }), !isOwner && session && invite && inviteLoaded && task.status === 'open' && !myOffer && /*#__PURE__*/ _jsx("div", { className: "rounded-xl border border-blue-200 bg-blue-50 p-5", children: /*#__PURE__*/ _jsxs("div", { className: "flex items-center justify-between gap-4 flex-wrap gap-y-3", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-3", children: [ /*#__PURE__*/ _jsx("div", { className: "w-10 h-10 rounded-full bg-blue-100 flex items-center justify-center shrink-0", children: /*#__PURE__*/ _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: "w-5 h-5 text-blue-600", children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M21.75 6.75v10.5a2.25 2.25 0 0 1-2.25 2.25h-15a2.25 2.25 0 0 1-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25m19.5 0v.243a2.25 2.25 0 0 1-1.07 1.916l-7.5 4.615a2.25 2.25 0 0 1-2.36 0L3.32 8.91a2.25 2.25 0 0 1-1.07-1.916V6.75" }) }) }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("p", { className: "font-semibold text-gray-900 text-sm", children: t('task.invite.banner_title') }), /*#__PURE__*/ _jsx("p", { className: "text-gray-500 text-sm mt-0.5", children: t('task.invite.banner_hint') }) ] }) ] }), /*#__PURE__*/ _jsxs("div", { className: "flex gap-2 shrink-0", children: [ /*#__PURE__*/ _jsx(Link, { href: `/tasks/${taskId}/offer`, className: "bg-blue-600 text-white px-4 py-2 rounded-lg text-sm font-semibold hover:bg-blue-700 transition", children: t('task.invite.accept') }), /*#__PURE__*/ _jsx("button", { onClick: async ()=>{ if (!invite) return; setInviteDeclining(true); await dismissNotification(invite.id).catch(()=>{}); setInvite(null); setInviteDeclining(false); }, disabled: inviteDeclining, className: "border border-gray-300 bg-white text-gray-600 px-4 py-2 rounded-lg text-sm font-medium hover:bg-gray-50 disabled:opacity-50 transition", children: t('task.invite.decline') }) ] }) ] }) }), !isOwner && session && myOfferLoaded && /*#__PURE__*/ _jsxs("div", { className: "space-y-4", children: [ task.status === 'completed' && myOffer?.status === 'accepted' && /*#__PURE__*/ _jsxs("div", { className: "bg-green-50 border border-green-200 rounded-xl p-5 flex items-center gap-4", children: [ /*#__PURE__*/ _jsx("span", { className: "text-3xl", children: "\uD83C\uDF89" }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("p", { className: "font-bold text-green-800 text-lg", children: "Задание завершено!" }), /*#__PURE__*/ _jsx("p", { className: "text-green-700 text-sm", children: "Заказчик отметил задание как выполненное." }) ] }), /*#__PURE__*/ _jsxs("button", { onClick: ()=>handleMessage(task.customerId), disabled: msgLoading, className: "ml-auto flex items-center gap-2 bg-white text-blue-600 border border-blue-200 px-4 py-2 rounded-xl text-sm font-medium hover:bg-blue-50 disabled:opacity-50", children: [ /*#__PURE__*/ _jsx("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.8, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8 10h.01M12 10h.01M16 10h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z" }) }), t('chat.write_customer') ] }) ] }), (myOffer || task.status === 'open' && !invite || task.status !== 'open') && /*#__PURE__*/ _jsxs("div", { className: "bg-white rounded-xl border border-gray-200 p-6", children: [ /*#__PURE__*/ _jsx("h2", { className: "text-lg font-bold text-gray-900 mb-4", children: "Моё предложение" }), myOffer ? /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-start justify-between gap-4", children: [ /*#__PURE__*/ _jsxs("div", { className: "space-y-1", children: [ myOffer.message && /*#__PURE__*/ _jsx("p", { className: "text-sm text-gray-600", children: myOffer.message }), /*#__PURE__*/ _jsx("p", { className: "text-xs text-gray-400", children: new Date(myOffer.createdAt).toLocaleString(dateLocale) }) ] }), /*#__PURE__*/ _jsxs("div", { className: "text-right shrink-0", children: [ /*#__PURE__*/ _jsxs("p", { className: "text-xl font-bold text-green-600", children: [ formatPrice(myOffer.price), "€" ] }), /*#__PURE__*/ _jsx("span", { className: `text-xs px-2 py-0.5 rounded-full font-medium ${myOffer.status === 'accepted' ? 'bg-green-100 text-green-700' : myOffer.status === 'declined' ? 'bg-red-100 text-red-700' : 'bg-yellow-100 text-yellow-700'}`, children: myOffer.status === 'accepted' ? '✓ Принято' : myOffer.status === 'declined' ? '✗ Отклонено' : '⏳ На рассмотрении' }) ] }) ] }), myOffer.status === 'accepted' && task.status === 'in_progress' && /*#__PURE__*/ _jsx("div", { className: "mt-3 pt-3 border-t border-gray-100", children: /*#__PURE__*/ _jsxs("button", { onClick: ()=>handleMessage(task.customerId), disabled: msgLoading, className: "flex items-center gap-2 bg-blue-50 text-blue-600 border border-blue-200 px-4 py-2 rounded-xl text-sm font-medium hover:bg-blue-100 disabled:opacity-50", children: [ /*#__PURE__*/ _jsx("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.8, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8 10h.01M12 10h.01M16 10h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z" }) }), t('chat.write_customer') ] }) }) ] }) : task.status === 'open' && !invite ? /*#__PURE__*/ _jsxs("div", { className: "space-y-3", children: [ taskStats && taskStats.offerCount > 0 && /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-2 p-2.5 bg-amber-50 rounded-lg border border-amber-100", children: [ /*#__PURE__*/ _jsx("svg", { className: "w-4 h-4 text-amber-500 shrink-0", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M13 10V3L4 14h7v7l9-11h-7z" }) }), /*#__PURE__*/ _jsx("p", { className: "text-xs text-amber-700", children: t('fomo.already_offered', '\u0423\u0436\u0435 {n} \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u043e\u0432 \u043e\u0442\u043a\u043b\u0438\u043a\u043d\u0443\u043b\u0438\u0441\u044c').replace('{n}', String(taskStats.offerCount)) }) ] }), /*#__PURE__*/ _jsxs("div", { className: "flex items-center justify-between", children: [ /*#__PURE__*/ _jsx("p", { className: "text-sm text-gray-500", children: t('task.no_offer_yet', '\u0412\u044b \u0435\u0449\u0451 \u043d\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u043b\u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435') }), /*#__PURE__*/ _jsx(Link, { href: `/tasks/${taskId}/offer`, className: "bg-blue-600 text-white px-4 py-2 rounded-lg text-sm font-semibold hover:bg-blue-700", children: t('task.make_offer', '\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435') }) ] }) ] }) : null ] }), task.status === 'completed' && myOffer?.status === 'accepted' && /*#__PURE__*/ _jsxs("div", { className: "bg-white rounded-xl border border-gray-200 p-6", children: [ /*#__PURE__*/ _jsx("h2", { className: "text-lg font-bold text-gray-900 mb-4", children: "Оценка заказчика" }), !myReviewLoaded ? /*#__PURE__*/ _jsx("p", { className: "text-sm text-gray-400", children: "Загрузка..." }) : myReview ? /*#__PURE__*/ _jsxs("div", { className: "space-y-3", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-1", children: [ [ 1, 2, 3, 4, 5 ].map((star)=>/*#__PURE__*/ _jsx("span", { className: `text-2xl ${star <= myReview.rating ? 'text-yellow-400' : 'text-gray-200'}`, children: "★" }, star)), /*#__PURE__*/ _jsxs("span", { className: "ml-2 text-lg font-bold text-gray-800", children: [ myReview.rating, "/5" ] }) ] }), myReview.comment && /*#__PURE__*/ _jsx("p", { className: "text-gray-700 text-sm leading-relaxed", children: myReview.comment }), /*#__PURE__*/ _jsx("p", { className: "text-xs text-gray-400", children: new Date(myReview.createdAt).toLocaleDateString(dateLocale) }) ] }) : /*#__PURE__*/ _jsx("p", { className: "text-sm text-gray-500", children: "Заказчик ещё не оставил оценку." }) ] }) ] }), editing && editForm && /*#__PURE__*/ _jsx("div", { className: "fixed inset-0 z-50 flex items-start justify-center bg-black/50 overflow-y-auto py-8 px-4", children: /*#__PURE__*/ _jsxs("div", { className: "bg-white rounded-2xl w-full max-w-2xl shadow-xl", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center justify-between px-6 py-4 border-b border-gray-100", children: [ /*#__PURE__*/ _jsx("h2", { className: "text-lg font-bold text-gray-900", children: t('task.edit') }), /*#__PURE__*/ _jsx("button", { onClick: ()=>setEditing(false), className: "text-gray-400 hover:text-gray-600 p-1", children: /*#__PURE__*/ _jsx("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" }) }) }) ] }), /*#__PURE__*/ _jsxs("form", { onSubmit: handleEditSave, className: "p-6 space-y-4", children: [ /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsxs("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: [ t('create.field.title'), " *" ] }), /*#__PURE__*/ _jsx("input", { type: "text", required: true, minLength: 5, maxLength: 200, value: editForm.title, onChange: (e)=>setEditForm((p)=>({ ...p, title: e.target.value })), className: "w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400" }) ] }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsxs("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: [ t('create.field.description'), " *" ] }), /*#__PURE__*/ _jsx("textarea", { required: true, minLength: 20, value: editForm.description, onChange: (e)=>setEditForm((p)=>({ ...p, description: e.target.value })), rows: 4, className: "w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400 resize-none" }) ] }), /*#__PURE__*/ _jsxs("div", { className: "grid grid-cols-2 gap-4", children: [ /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: t('create.field.budget') }), /*#__PURE__*/ _jsx("input", { type: "number", min: 1, value: editForm.budget, onChange: (e)=>setEditForm((p)=>({ ...p, budget: e.target.value })), placeholder: "€", className: "w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400" }) ] }), /*#__PURE__*/ _jsx("div", { className: "flex items-end pb-2", children: /*#__PURE__*/ _jsxs("label", { className: "flex items-center gap-2 cursor-pointer", children: [ /*#__PURE__*/ _jsx("input", { type: "checkbox", checked: editForm.budgetNegotiable, onChange: (e)=>setEditForm((p)=>({ ...p, budgetNegotiable: e.target.checked })), className: "w-4 h-4 rounded text-blue-600" }), /*#__PURE__*/ _jsx("span", { className: "text-sm text-gray-700", children: t('create.field.budget_negotiable') }) ] }) }) ] }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: t('create.field.deadline') }), /*#__PURE__*/ _jsx("input", { type: "date", value: editForm.deadline, onChange: (e)=>setEditForm((p)=>({ ...p, deadline: e.target.value })), className: "w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400" }) ] }), /*#__PURE__*/ _jsxs("div", { className: "grid grid-cols-3 gap-3", children: [ /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: t('create.field.address.district') }), /*#__PURE__*/ _jsx("input", { type: "text", value: editForm.district, onChange: (e)=>setEditForm((p)=>({ ...p, district: e.target.value })), className: "w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400" }) ] }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: t('create.field.address.street') }), /*#__PURE__*/ _jsx("input", { type: "text", value: editForm.street, onChange: (e)=>setEditForm((p)=>({ ...p, street: e.target.value })), className: "w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400" }) ] }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: t('create.field.address.house') }), /*#__PURE__*/ _jsx("input", { type: "text", value: editForm.houseNumber, onChange: (e)=>setEditForm((p)=>({ ...p, houseNumber: e.target.value })), className: "w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400" }) ] }) ] }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: t('create.field.confidential') }), /*#__PURE__*/ _jsx("textarea", { value: editForm.confidentialNote, onChange: (e)=>setEditForm((p)=>({ ...p, confidentialNote: e.target.value })), rows: 2, className: "w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400 resize-none" }) ] }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: t('task.status_label', 'Статус') }), /*#__PURE__*/ _jsxs("select", { value: editForm.status, onChange: (e)=>setEditForm((p)=>({ ...p, status: e.target.value })), className: "w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400", children: [ /*#__PURE__*/ _jsx("option", { value: "open", children: t('task.status.open') }), /*#__PURE__*/ _jsx("option", { value: "draft", children: t('task.status.draft') }) ] }) ] }), /*#__PURE__*/ _jsxs("div", { className: "flex gap-3 pt-2", children: [ /*#__PURE__*/ _jsx("button", { type: "submit", disabled: editSaving, className: "flex-1 bg-blue-600 text-white py-2.5 rounded-xl font-semibold hover:bg-blue-700 disabled:opacity-50 transition", children: editSaving ? t('common.saving', '...') : t('common.save') }), /*#__PURE__*/ _jsx("button", { type: "button", onClick: ()=>setEditing(false), className: "px-6 py-2.5 rounded-xl border border-gray-200 text-gray-600 hover:bg-gray-50 transition", children: t('common.cancel') }) ] }) ] }) ] }) }) ] }); } R61146undefined148191undefined193221undefined223266undefined268307undefined309353undefined355591undefined593667undefined669713undefined715765undefined10091023undefined11501159(0,_lib_auth__WEBPACK_IMPORTED_MODULE_4__/* .useSession */ .wV)undefined11901198(0,_context_locale__WEBPACK_IMPORTED_MODULE_5__/* .useLocale */ .Y)undefined12221230(0,next_navigation__WEBPACK_IMPORTED_MODULE_3__.useRouter)undefined12631270(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined13091316(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined13681375(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined14261433(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined14771484(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined15391546(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined15921599(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined16561663(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined17211728(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined17811788(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined18401847(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined19061913(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined19631970(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined20122019(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined20722079(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined21392146(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined21962203(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined22592266(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined23442351(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined24122419(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined24802487(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined25412548(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined26152622(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined26722679(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined27252732(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined28362844(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)undefined37383746(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)undefined38083816(0,_lib_api__WEBPACK_IMPORTED_MODULE_7__/* .getOffers */ .Sw)undefined41304138(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)undefined41844195(0,_lib_api__WEBPACK_IMPORTED_MODULE_7__/* .getTaskStats */ .vh)undefined42474260(0,_lib_api__WEBPACK_IMPORTED_MODULE_7__/* .getMyDashboard */ .H)undefined44734481(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)undefined45614571(0,_lib_api__WEBPACK_IMPORTED_MODULE_7__/* .getMyOffers */ .aT)undefined49724980(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)undefined50595071(0,_lib_api__WEBPACK_IMPORTED_MODULE_7__/* .getTaskInvite */ .F9)undefined54195427(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)undefined55395552(0,_lib_api__WEBPACK_IMPORTED_MODULE_7__/* .getTaskReviews */ .H6)undefined59635973(0,_lib_api__WEBPACK_IMPORTED_MODULE_7__/* .acceptOffer */ .$H)undefined64006411(0,_lib_api__WEBPACK_IMPORTED_MODULE_7__/* .declineOffer */ .Lb)undefined67806791(0,_lib_api__WEBPACK_IMPORTED_MODULE_7__/* .completeTask */ .Rt)undefined70987109(0,_lib_api__WEBPACK_IMPORTED_MODULE_7__/* .createReview */ .bx)undefined75477567(0,_lib_api__WEBPACK_IMPORTED_MODULE_7__/* .getOrCreateDirectRoom */ .QN)undefined96259634(0,_lib_api__WEBPACK_IMPORTED_MODULE_7__/* .updateTask */ .lC)undefined1004410048(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined1015510159(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined1031410318(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined1048910493(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined1067810681(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1102111024(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1134811351(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1168711691(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined1194111945(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined1231112314(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1273912742(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1341013413(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1379213795(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1391513923(0,_lib_taskLocale__WEBPACK_IMPORTED_MODULE_8__/* .taskTitle */ .Oj)undefined1399714000(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1412014134(0,_lib_taskLocale__WEBPACK_IMPORTED_MODULE_8__/* .taskDescription */ .GZ)undefined1420814212(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined1441814422(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined1452714530(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1477214776(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined1518615189(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1554815552(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined1565715660(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1590215905(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1623716241(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined1634616349(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1659316597(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined1703417037(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1759117595(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined1770017703(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1794717950(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1826118264(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1867218676(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined1878118784(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1902919032(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1937619380(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined1948519488(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1973219736(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined1973819741(next_link__WEBPACK_IMPORTED_MODULE_2___default())undefined2001620019(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2027220275(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2041620424(0,_lib_formatName__WEBPACK_IMPORTED_MODULE_9__/* .shortName */ .E)undefined2060120604(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2078020788(0,_lib_formatName__WEBPACK_IMPORTED_MODULE_9__/* .shortName */ .E)undefined2098620990(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined2112721130(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2134021348(0,_lib_formatName__WEBPACK_IMPORTED_MODULE_9__/* .shortName */ .E)undefined2150621510(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined2234322346(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2244822451(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2260322606(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2291622919(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2331323316(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2353823542(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined2377523778(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2408024083(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2434024343(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2471624719(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2512325126(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2542825431(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2580425807(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2622726230(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2653226535(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2690826911(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2731227316(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined2788727891(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined2807628080(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined2829428297(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2867628679(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2922829231(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2948929493(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined2969029693(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3006730071(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined3051330516(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3089130894(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3157831581(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3197131974(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3225632260(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined3248132484(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3270232706(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined3281132814(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3307533078(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3350833511(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3408034084(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined3418934192(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3446434467(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3514935153(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined3531535318(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3580935812(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3638236386(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined3653636540(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined3672236726(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined3716637170(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined3739537399(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined3759937603(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined3808438087(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3847638479(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3921139215(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined3983039834(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined4006440075(0,_lib_api__WEBPACK_IMPORTED_MODULE_7__/* .runAutoMatch */ .OV)undefined4073840741(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4111841121(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4174041744(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined4192941932(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4219242195(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4235642360(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined4257542579(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined4280242805(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4309443097(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4356143564(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4389043894(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined4449044493(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4503345036(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4522045223(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4538745390(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4566845672(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined4586145865(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined4607946083(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined4630546308(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4661146614(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4711747121(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined4728847292(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined4756547568(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4757047573(next_link__WEBPACK_IMPORTED_MODULE_2___default())undefined4789747905(0,_lib_formatName__WEBPACK_IMPORTED_MODULE_9__/* .shortName */ .E)undefined4813548138(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4814048148_components_PlanBadge__WEBPACK_IMPORTED_MODULE_6__/* .PlanBadge */ .dundefined4843648439(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4884648849(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4935549358(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4989249896(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined5011550119(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined5035950369(0,_lib_taskLocale__WEBPACK_IMPORTED_MODULE_8__/* .formatPrice */ .$g)undefined5062950632(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined5135251356(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined5157651579(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined5201052013(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined5274252745(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined5287552879(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined5305253056(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined5321953222(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined5342053423(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined5388953892(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined5450954513(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined5462654629(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined5491454917(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined5530855312(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined5547155474(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined5547655479(next_link__WEBPACK_IMPORTED_MODULE_2___default())undefined5584955852(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined5609656114(0,_lib_api__WEBPACK_IMPORTED_MODULE_7__/* .dismissNotification */ .yk)undefined5683956843(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined5702157025(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined5722757230(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined5742857432(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined5753757540(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined5779757800(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined5812758131(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined5857258575(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined5895058953(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined5967859682(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined5985659859(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined6009660100(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined6010260110react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragmentundefined6020960213(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined6042760431(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined6065960662(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined6096760970(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined6140361407(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined6162661630(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined6187061880(0,_lib_taskLocale__WEBPACK_IMPORTED_MODULE_8__/* .formatPrice */ .$g)undefined6214262145(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined6296162964(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined6312863132(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined6362863631(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined6407864081(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined6489864902(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined6510465108(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined6536065363(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined6580865811(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined6621766220(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined6679466798(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined6700767010(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined6746067463(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined6746567468(next_link__WEBPACK_IMPORTED_MODULE_2___default())undefined6825268256(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined6843068433(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined6867968682(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined6887368877(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined6903869042(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined6955569558(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined6989369897(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined7044370446(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined7070470707(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined7102271025(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined7134171344(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined7151471518(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined7168171685(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined7189371896(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined7213172134(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined7236472367(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined7274072743(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined7317573179(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined7338773391(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined7350473508(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined7395073953(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined7487674880(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined7499374997(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined7544575448(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined7633476338(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined7652476528(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined7665776660(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined7698576988(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined7795577958(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined7811578119(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined7835978362(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined7909979102(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined7962379627(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined7974079743(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined8003880041(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined8079280796(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined8098280986(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined8111581118(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined8145381456(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined8229582299(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined8242882431(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined8276482767(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined8360283606(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined8373583738(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined8407084073(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined8498384987(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined8510085103(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined8540285405(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined8618286186(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined8629986302(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined8660386607(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined8725387256(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined8753587538(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined8796587969(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined8814888151(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined8867088673(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefinedk}lST webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource9/* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ LocationProvider: () => (/* binding */ LocationProvider), /* harmony export */ z: () => (/* binding */ useLocation) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(78157); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31768); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _lib_api__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(91864); webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourceB /* __next_internal_client_entry_do_not_use__ LocationProvider,useLocation auto */ import { jsx as _jsx } from "react/jsx-runtime"; import { createContext, useContext, useState, useEffect, useCallback } from 'react'; import { getLocations } from '@/lib/api'; const LocationContext = /*#__PURE__*/ createContext({ locationSlug: '', locationTree: [], locationLoading: true, setLocation: ()=>{}, getLabel: ()=>'' }); function readCookieLocation() { if (typeof document === 'undefined') return ''; const match = document.cookie.match(/(?:^|;\s*)canhelp_location=([^;]+)/); return match?.[1] ? decodeURIComponent(match[1]) : ''; } export function LocationProvider({ children, initialSlug = '' }) { const [locationSlug, setLocationSlug] = useState(initialSlug); const [locationTree, setLocationTree] = useState([]); const [locationLoading, setLocationLoading] = useState(true); // Sync from cookie on client mount process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ const cookieSlug = readCookieLocation(); setLocationSlug(cookieSlug); }, []); // Load location tree once process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ getLocations().then((tree)=>setLocationTree(tree)).catch(()=>{}).finally(()=>setLocationLoading(false)); }, []); const setLocation = useCallback((slug)=>{ setLocationSlug(slug); const encoded = encodeURIComponent(slug); document.cookie = `canhelp_location=${encoded}; path=/; max-age=31536000; SameSite=Lax`; }, []); const getLabel = useCallback((locale)=>{ if (!locationSlug) return ''; for (const city of locationTree){ if (city.slug === locationSlug) return city.names[locale] ?? city.names.el; for (const d of city.children ?? []){ if (d.slug === locationSlug) return d.names[locale] ?? d.names.el; } } return locationSlug; }, [ locationSlug, locationTree ]); return /*#__PURE__*/ _jsx(LocationContext.Provider, { value: { locationSlug, locationTree, locationLoading, setLocation, getLabel }, children: children }); } export function useLocation() { return useContext(LocationContext); } aR^(4CJ_iHR# , (0,react__WEBPACK_IMPORTED_MODULE_1__.createContext)(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(0,_lib_api__WEBPACK_IMPORTED_MODULE_2__/* .getLocations */ .Vs)(0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)X /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ LocationProvider: () => (/* binding */ LocationProvider), /* harmony export */ z: () => (/* binding */ useLocation) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(78157); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31768); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _lib_api__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(91864); /* __next_internal_client_entry_do_not_use__ LocationProvider,useLocation auto */ const LocationContext = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createContext)({ locationSlug: '', locationTree: [], locationLoading: true, setLocation: ()=>{}, getLabel: ()=>'' }); function readCookieLocation() { if (typeof document === 'undefined') return ''; const match = document.cookie.match(/(?:^|;\s*)canhelp_location=([^;]+)/); return match?.[1] ? decodeURIComponent(match[1]) : ''; } function LocationProvider({ children, initialSlug = '' }) { const [locationSlug, setLocationSlug] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(initialSlug); const [locationTree, setLocationTree] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)([]); const [locationLoading, setLocationLoading] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(true); // Sync from cookie on client mount process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{ const cookieSlug = readCookieLocation(); setLocationSlug(cookieSlug); }, []); // Load location tree once process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{ (0,_lib_api__WEBPACK_IMPORTED_MODULE_2__/* .getLocations */ .Vs)().then((tree)=>setLocationTree(tree)).catch(()=>{}).finally(()=>setLocationLoading(false)); }, []); const setLocation = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)((slug)=>{ setLocationSlug(slug); const encoded = encodeURIComponent(slug); document.cookie = `canhelp_location=${encoded}; path=/; max-age=31536000; SameSite=Lax`; }, []); const getLabel = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)((locale)=>{ if (!locationSlug) return ''; for (const city of locationTree){ if (city.slug === locationSlug) return city.names[locale] ?? city.names.el; for (const d of city.children ?? []){ if (d.slug === locationSlug) return d.names[locale] ?? d.names.el; } } return locationSlug; }, [ locationSlug, locationTree ]); return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(LocationContext.Provider, { value: { locationSlug, locationTree, locationLoading, setLocation, getLabel }, children: children }); } function useLocation() { return (0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)(LocationContext); } Y\ ]9/* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ LocationProvider: () => (/* binding */ LocationProvider), /* harmony export */ z: () => (/* binding */ useLocation) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(78157); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31768); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _lib_api__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(91864); ^B /* __next_internal_client_entry_do_not_use__ LocationProvider,useLocation auto */ import { jsx as _jsx } from "react/jsx-runtime"; import { createContext, useContext, useState, useEffect, useCallback } from 'react'; import { getLocations } from '@/lib/api'; const LocationContext = /*#__PURE__*/ createContext({ locationSlug: '', locationTree: [], locationLoading: true, setLocation: ()=>{}, getLabel: ()=>'' }); function readCookieLocation() { if (typeof document === 'undefined') return ''; const match = document.cookie.match(/(?:^|;\s*)canhelp_location=([^;]+)/); return match?.[1] ? decodeURIComponent(match[1]) : ''; } export function LocationProvider({ children, initialSlug = '' }) { const [locationSlug, setLocationSlug] = useState(initialSlug); const [locationTree, setLocationTree] = useState([]); const [locationLoading, setLocationLoading] = useState(true); // Sync from cookie on client mount process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ const cookieSlug = readCookieLocation(); setLocationSlug(cookieSlug); }, []); // Load location tree once process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ getLocations().then((tree)=>setLocationTree(tree)).catch(()=>{}).finally(()=>setLocationLoading(false)); }, []); const setLocation = useCallback((slug)=>{ setLocationSlug(slug); const encoded = encodeURIComponent(slug); document.cookie = `canhelp_location=${encoded}; path=/; max-age=31536000; SameSite=Lax`; }, []); const getLabel = useCallback((locale)=>{ if (!locationSlug) return ''; for (const city of locationTree){ if (city.slug === locationSlug) return city.names[locale] ?? city.names.el; for (const d of city.children ?? []){ if (d.slug === locationSlug) return d.names[locale] ?? d.names.el; } } return locationSlug; }, [ locationSlug, locationTree ]); return /*#__PURE__*/ _jsx(LocationContext.Provider, { value: { locationSlug, locationTree, locationLoading, setLocation, getLabel }, children: children }); } export function useLocation() { return useContext(LocationContext); } +82129undefined131214undefined216256undefined296308(0,react__WEBPACK_IMPORTED_MODULE_1__.createContext)undefined657663undefined768775(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined835842(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined899906(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined10101018(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)undefined12101218(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)undefined12341245(0,_lib_api__WEBPACK_IMPORTED_MODULE_2__/* .getLocations */ .Vs)undefined13751385(0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)undefined16081618(0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)undefined20712074(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined22962302undefined23392348(0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)undefined^p_CEDF webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource// ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { "default": () => (/* binding */ DashboardPage) }); // EXTERNAL MODULE: ../../node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.js var react_jsx_runtime = __webpack_require__(78157); // EXTERNAL MODULE: ../../node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js var react = __webpack_require__(31768); // EXTERNAL MODULE: ../../node_modules/next/dist/api/navigation.js var navigation = __webpack_require__(71159); // EXTERNAL MODULE: ../../node_modules/next/dist/client/app-dir/link.js var app_dir_link = __webpack_require__(94496); var link_default = /*#__PURE__*/__webpack_require__.n(app_dir_link); // EXTERNAL MODULE: ./src/lib/auth.ts var auth = __webpack_require__(13260); // EXTERNAL MODULE: ./src/context/locale.tsx var context_locale = __webpack_require__(96484); // EXTERNAL MODULE: ./src/lib/api.ts var api = __webpack_require__(91864); // EXTERNAL MODULE: ./src/lib/taskLocale.ts var taskLocale = __webpack_require__(8293); // EXTERNAL MODULE: ./src/components/PlanBadge.tsx var PlanBadge = __webpack_require__(25701); ;// ./src/components/UsageMeter.tsx webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/CachedSource  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSourceJ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; export function UsageMeter({ current, limit, label, className = '' }) { if (limit === null) { return /*#__PURE__*/ _jsxs("div", { className: `${className}`, children: [ /*#__PURE__*/ _jsxs("div", { className: "flex justify-between items-center mb-1", children: [ /*#__PURE__*/ _jsx("span", { className: "text-xs text-gray-500", children: label }), /*#__PURE__*/ _jsx("span", { className: "text-xs font-semibold text-green-600", children: "∞" }) ] }), /*#__PURE__*/ _jsx("div", { className: "h-1.5 rounded-full bg-green-100", children: /*#__PURE__*/ _jsx("div", { className: "h-full w-full rounded-full bg-green-400" }) }) ] }); } const pct = limit > 0 ? Math.min(100, Math.round(current / limit * 100)) : 100; const remaining = Math.max(0, limit - current); const barColor = pct >= 100 ? 'bg-red-500' : pct >= 80 ? 'bg-amber-400' : 'bg-blue-500'; const textColor = pct >= 100 ? 'text-red-600' : pct >= 80 ? 'text-amber-600' : 'text-gray-600'; return /*#__PURE__*/ _jsxs("div", { className: className, children: [ /*#__PURE__*/ _jsxs("div", { className: "flex justify-between items-center mb-1", children: [ /*#__PURE__*/ _jsx("span", { className: "text-xs text-gray-500", children: label }), /*#__PURE__*/ _jsxs("span", { className: `text-xs font-semibold ${textColor}`, children: [ remaining, " / ", limit ] }) ] }), /*#__PURE__*/ _jsx("div", { className: "h-1.5 rounded-full bg-gray-100", children: /*#__PURE__*/ _jsx("div", { className: `h-full rounded-full transition-all ${barColor}`, style: { width: `${pct}%` } }) }) ] }); } d>@FW+/qtOSW Z __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._buffersourcesizemapshash] function UsageMeter({ current, limit, label, className = '' }) { if (limit === null) { return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: `${className}`, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "flex justify-between items-center mb-1", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: "text-xs text-gray-500", children: label }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: "text-xs font-semibold text-green-600", children: "∞" }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "h-1.5 rounded-full bg-green-100", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "h-full w-full rounded-full bg-green-400" }) }) ] }); } const pct = limit > 0 ? Math.min(100, Math.round(current / limit * 100)) : 100; const remaining = Math.max(0, limit - current); const barColor = pct >= 100 ? 'bg-red-500' : pct >= 80 ? 'bg-amber-400' : 'bg-blue-500'; const textColor = pct >= 100 ? 'text-red-600' : pct >= 80 ? 'text-amber-600' : 'text-gray-600'; return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: className, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "flex justify-between items-center mb-1", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: "text-xs text-gray-500", children: label }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("span", { className: `text-xs font-semibold ${textColor}`, children: [ remaining, " / ", limit ] }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "h-1.5 rounded-full bg-gray-100", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: `h-full rounded-full transition-all ${barColor}`, style: { width: `${pct}%` } }) }) ] }); } {"finalSource":false}mapbufferedMap ReplaceSourceRawSourceJ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; export function UsageMeter({ current, limit, label, className = '' }) { if (limit === null) { return /*#__PURE__*/ _jsxs("div", { className: `${className}`, children: [ /*#__PURE__*/ _jsxs("div", { className: "flex justify-between items-center mb-1", children: [ /*#__PURE__*/ _jsx("span", { className: "text-xs text-gray-500", children: label }), /*#__PURE__*/ _jsx("span", { className: "text-xs font-semibold text-green-600", children: "∞" }) ] }), /*#__PURE__*/ _jsx("div", { className: "h-1.5 rounded-full bg-green-100", children: /*#__PURE__*/ _jsx("div", { className: "h-full w-full rounded-full bg-green-400" }) }) ] }); } const pct = limit > 0 ? Math.min(100, Math.round(current / limit * 100)) : 100; const remaining = Math.max(0, limit - current); const barColor = pct >= 100 ? 'bg-red-500' : pct >= 80 ? 'bg-amber-400' : 'bg-blue-500'; const textColor = pct >= 100 ? 'text-red-600' : pct >= 80 ? 'text-amber-600' : 'text-gray-600'; return /*#__PURE__*/ _jsxs("div", { className: className, children: [ /*#__PURE__*/ _jsxs("div", { className: "flex justify-between items-center mb-1", children: [ /*#__PURE__*/ _jsx("span", { className: "text-xs text-gray-500", children: label }), /*#__PURE__*/ _jsxs("span", { className: `text-xs font-semibold ${textColor}`, children: [ remaining, " / ", limit ] }) ] }), /*#__PURE__*/ _jsx("div", { className: "h-1.5 rounded-full bg-gray-100", children: /*#__PURE__*/ _jsx("div", { className: `h-full rounded-full transition-all ${barColor}`, style: { width: `${pct}%` } }) }) ] }); } i062undefined6470undefined191195__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined299303__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined457460__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined646649__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined881884__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined10051008__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined15241528__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined16151619__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined17611764__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined19341938__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined22762279__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined23912394__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefineda yV-y]aI VZI!  i # m (0,react_jsx_runtime.jsxs)(0,react_jsx_runtime.jsx)" ;// ./src/app/dashboard/page.tsx  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource/* __next_internal_client_entry_do_not_use__ default auto */ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime"; import { useEffect, useState } from 'react'; import { useRouter } from 'next/navigation'; import Link from 'next/link'; import { useSession } from '@/lib/auth'; import { useLocale } from '@/context/locale'; import { getMyTasks, getMyOffers, getMyReviews, getNotifications, getMyDashboard, getSpecialistFomoDashboard, getCustomerFomoDashboard, getMySpecialistCards } from '@/lib/api'; import { formatPrice, taskTitle } from '@/lib/taskLocale'; import { PlanBadge } from '@/components/PlanBadge'; import { UsageMeter } from '@/components/UsageMeter'; /** Extract the quoted task title from a stored notification body (any locale) */ function extractNotifParam(body) { if (!body) return null; const m = body.match(/[«""](.+?)[»""]/); return m?.[1] ?? null; } function PlanBlock({ dashboard, t }) { const plan = dashboard.plan; const expiry = dashboard.planExpiration; const usage = dashboard.usage; const stats = dashboard.stats; const expiryPct = expiry ? Math.max(0, Math.min(100, Math.round(expiry.daysLeft / 30 * 100))) : 100; const expiryColor = expiry ? expiry.daysLeft <= 3 ? 'bg-red-500' : expiry.daysLeft <= 7 ? 'bg-amber-400' : 'bg-green-400' : 'bg-green-400'; return /*#__PURE__*/ _jsxs("div", { className: "bg-white rounded-2xl border border-gray-200 p-5 mb-6", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center justify-between mb-4", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-2", children: [ /*#__PURE__*/ _jsx("h2", { className: "font-semibold text-gray-800 text-sm", children: t('dashboard.plan.title', 'My Plan') }), plan ? /*#__PURE__*/ _jsx(PlanBadge, { tier: plan.tier, size: "sm" }) : /*#__PURE__*/ _jsx("span", { className: "text-xs text-gray-400", children: t('dashboard.plan.no_plan', 'Free') }) ] }), /*#__PURE__*/ _jsx(Link, { href: "/pricing", className: "text-xs font-medium text-blue-600 hover:underline", children: plan?.tier === 'ultimate' ? null : t('dashboard.plan.upgrade', 'Upgrade') }) ] }), expiry && /*#__PURE__*/ _jsxs("div", { className: "mb-4", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex justify-between text-xs text-gray-500 mb-1", children: [ /*#__PURE__*/ _jsx("span", { children: t('dashboard.plan.expires', 'Expires in {n} days').replace('{n}', String(expiry.daysLeft)) }), /*#__PURE__*/ _jsxs("span", { children: [ expiry.daysLeft, " ", t('pricing.days', 'days') ] }) ] }), /*#__PURE__*/ _jsx("div", { className: "h-1.5 rounded-full bg-gray-100", children: /*#__PURE__*/ _jsx("div", { className: `h-full rounded-full transition-all ${expiryColor}`, style: { width: `${expiryPct}%` } }) }) ] }), (usage.messagesSent !== undefined || usage.ordersMade !== undefined) && /*#__PURE__*/ _jsxs("div", { className: "space-y-2 mb-4", children: [ /*#__PURE__*/ _jsx("p", { className: "text-xs font-medium text-gray-500 uppercase tracking-wide", children: t('dashboard.plan.limits', 'Daily limits') }), /*#__PURE__*/ _jsx(UsageMeter, { current: usage.messagesSent, limit: usage.messagesLeft !== null ? usage.messagesSent + usage.messagesLeft : null, label: t('dashboard.plan.messages', 'Messages') }), /*#__PURE__*/ _jsx(UsageMeter, { current: usage.ordersMade, limit: usage.ordersLeft !== null ? usage.ordersMade + usage.ordersLeft : null, label: t('dashboard.plan.orders', 'Orders') }) ] }), Object.keys(stats).length > 0 && /*#__PURE__*/ _jsx("div", { className: "grid grid-cols-2 gap-2", children: Object.entries(stats).map(([key, val])=>/*#__PURE__*/ _jsxs("div", { className: "bg-gray-50 rounded-xl px-3 py-2 text-center", children: [ /*#__PURE__*/ _jsx("p", { className: "text-lg font-bold text-gray-800", children: val }), /*#__PURE__*/ _jsx("p", { className: "text-[10px] text-gray-400 uppercase tracking-wide", children: t(`dashboard.stats.${key}`, key) }) ] }, key)) }) ] }); } export default function DashboardPage() { const { data: session, isPending } = useSession(); const router = useRouter(); const { t, locale } = useLocale(); const [tasks, setTasks] = useState([]); const [offers, setOffers] = useState([]); const [myReviews, setMyReviews] = useState([]); const [invitations, setInvitations] = useState([]); const [loading, setLoading] = useState(true); const [dashboard, setDashboard] = useState(null); const [fomoData, setFomoData] = useState(null); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (!isPending && !session) router.push('/login'); }, [ session, isPending ]); // Redirect new specialists without any cards to the setup wizard process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (!session) return; const role = session.user?.role; if (role !== 'specialist') return; getMySpecialistCards().then(({ cards })=>{ if (cards.length === 0) router.push('/specialist-setup'); }).catch(()=>{}); }, [ session ]); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (!session) return; Promise.all([ getMyTasks(), getMyOffers(), getMyReviews(), getNotifications(), getMyDashboard() ]).then(([t, o, r, notifs, dash])=>{ setTasks(t); setOffers(o); setMyReviews(r); setInvitations(notifs.filter((n)=>n.type === 'task_invite')); setDashboard(dash); }).catch(()=>{}).finally(()=>setLoading(false)); }, [ session ]); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (!session) return; const role = session.user?.role; if (role === 'specialist') { getSpecialistFomoDashboard().then(setFomoData).catch(()=>{}); } else { getCustomerFomoDashboard().then(setFomoData).catch(()=>{}); } }, [ session ]); if (isPending || loading) return /*#__PURE__*/ _jsx("div", { className: "text-center py-20 text-white", children: t('common.loading') }); const dateLocale = locale === 'ru' ? 'ru-RU' : locale === 'en' ? 'en-US' : 'el-GR'; const activeTasks = tasks.filter((task)=>task.status !== 'completed' && task.status !== 'cancelled'); const completedTasks = tasks.filter((task)=>task.status === 'completed' || task.status === 'cancelled'); const activeOffers = offers.filter((row)=>{ const offer = row.offer || row; const task = row.task; return offer.status !== 'other_accepted' && task?.status !== 'completed' && task?.status !== 'cancelled'; }); const completedOffers = offers.filter((row)=>{ const offer = row.offer || row; const task = row.task; return offer.status === 'other_accepted' || task?.status === 'completed' || task?.status === 'cancelled'; }); function TaskCard({ task }) { const offerCount = task.offerCount ?? 0; const declinedCount = task.declinedCount ?? 0; const activeOfferCount = offerCount - declinedCount; return /*#__PURE__*/ _jsx(Link, { href: `/tasks/${task.id}`, className: "block bg-white rounded-xl border border-gray-200 p-4 hover:shadow-sm hover:border-blue-300 transition", children: /*#__PURE__*/ _jsxs("div", { className: "flex justify-between items-start", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex-1 min-w-0", children: [ /*#__PURE__*/ _jsx("p", { className: "font-medium text-gray-900 truncate", children: taskTitle(task, locale) }), /*#__PURE__*/ _jsx("p", { className: "text-xs text-gray-400 mt-1", children: new Date(task.createdAt).toLocaleDateString(dateLocale) }), offerCount > 0 && /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-2 mt-1.5", children: [ /*#__PURE__*/ _jsxs("span", { className: "text-xs text-blue-600 font-medium", children: [ "\uD83D\uDCBC ", offerCount, " ", t('dashboard.offers_count', 'предл.') ] }), declinedCount > 0 && /*#__PURE__*/ _jsxs("span", { className: "text-xs text-red-400", children: [ "✕ ", declinedCount, " ", t('dashboard.declined_count', 'откл.') ] }) ] }) ] }), /*#__PURE__*/ _jsxs("div", { className: "ml-3 text-right shrink-0", children: [ /*#__PURE__*/ _jsx("span", { className: `text-xs px-2 py-0.5 rounded-full ${task.status === 'open' ? 'bg-green-100 text-green-700' : task.status === 'in_progress' ? 'bg-blue-100 text-blue-700' : task.status === 'completed' ? 'bg-gray-100 text-gray-600' : 'bg-red-100 text-red-600'}`, children: t(`task.status.${task.status}`, task.status) }), task.budget && /*#__PURE__*/ _jsxs("p", { className: "text-sm font-bold text-green-600 mt-1", children: [ formatPrice(task.budget), "€" ] }) ] }) ] }) }); } function OfferCard({ row }) { const offer = row.offer || row; const task = row.task; const reviewReceived = task?.status === 'completed' && offer.status === 'accepted' ? myReviews.find((r)=>r.review?.taskId === task?.id)?.review ?? null : null; return /*#__PURE__*/ _jsxs(Link, { href: task ? `/tasks/${task.id}` : '#', className: "block bg-white rounded-xl border border-gray-200 p-4 hover:shadow-sm hover:border-blue-300 transition", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex justify-between items-start", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex-1 min-w-0", children: [ /*#__PURE__*/ _jsx("p", { className: "font-medium text-gray-900 truncate", children: task?.title || t('chat.task_fallback') }), /*#__PURE__*/ _jsx("p", { className: "text-xs text-gray-400 mt-1", children: new Date(offer.createdAt).toLocaleDateString(dateLocale) }) ] }), /*#__PURE__*/ _jsxs("div", { className: "ml-3 text-right shrink-0", children: [ /*#__PURE__*/ _jsxs("p", { className: "font-bold text-green-600", children: [ formatPrice(offer.price), "€" ] }), /*#__PURE__*/ _jsx("span", { className: `text-xs px-2 py-0.5 rounded-full mt-1 inline-block ${offer.status === 'accepted' ? 'bg-green-100 text-green-700' : offer.status === 'declined' ? 'bg-red-100 text-red-700' : offer.status === 'other_accepted' ? 'bg-orange-100 text-orange-600' : 'bg-gray-100 text-gray-700'}`, children: t(`offer.status.${offer.status}`, offer.status) }) ] }) ] }), reviewReceived && /*#__PURE__*/ _jsxs("div", { className: "mt-3 pt-3 border-t border-gray-100 flex items-center gap-2", children: [ /*#__PURE__*/ _jsx("div", { className: "flex gap-0.5", children: [ 1, 2, 3, 4, 5 ].map((star)=>/*#__PURE__*/ _jsx("span", { className: `text-sm ${star <= reviewReceived.rating ? 'text-yellow-400' : 'text-gray-200'}`, children: "★" }, star)) }), /*#__PURE__*/ _jsxs("span", { className: "text-sm font-semibold text-gray-700", children: [ reviewReceived.rating, "/5" ] }), reviewReceived.comment && /*#__PURE__*/ _jsx("span", { className: "text-xs text-gray-500 truncate", children: reviewReceived.comment }) ] }), task?.status === 'completed' && offer.status === 'accepted' && !reviewReceived && /*#__PURE__*/ _jsx("p", { className: "mt-2 text-xs text-gray-400", children: t('dashboard.review_pending') }) ] }); } const isSpecialist = session?.user?.role === 'specialist'; return /*#__PURE__*/ _jsxs("div", { className: "max-w-5xl mx-auto px-4 py-8", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex justify-between items-center mb-8", children: [ /*#__PURE__*/ _jsx("h1", { className: "text-2xl font-bold text-white", children: t('dashboard.title') }), /*#__PURE__*/ _jsx(Link, { href: "/tasks/new", className: "bg-blue-600 text-white px-4 py-2 rounded-lg text-sm font-medium hover:bg-blue-700", children: t('dashboard.new_task') }) ] }), dashboard && /*#__PURE__*/ _jsx(PlanBlock, { dashboard: dashboard, t: t }), fomoData && (isSpecialist ? (fomoData.missedCount > 0 || fomoData.missedEarnings > 0) && /*#__PURE__*/ _jsxs("div", { className: "mb-6 bg-amber-50 border border-amber-200 rounded-xl px-5 py-4 flex items-start gap-3", children: [ /*#__PURE__*/ _jsx("div", { className: "shrink-0 mt-0.5", children: /*#__PURE__*/ _jsx("svg", { className: "w-5 h-5 text-amber-500", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 9v2m0 4h.01M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z" }) }) }), /*#__PURE__*/ _jsxs("div", { className: "flex-1 min-w-0", children: [ /*#__PURE__*/ _jsxs("p", { className: "text-base font-semibold text-amber-800", children: [ t('fomo.specialist_missed', 'Вы пропустили {n} заказов').replace('{n}', String(fomoData.missedCount ?? 0)), fomoData.missedEarnings > 0 && /*#__PURE__*/ _jsxs("span", { className: "ml-1 text-amber-600", children: [ "на €", fomoData.missedEarnings ] }) ] }), fomoData.topCategories?.length > 0 && /*#__PURE__*/ _jsxs("p", { className: "text-sm text-amber-600 mt-0.5", children: [ t('fomo.top_categories', 'Категории'), ": ", fomoData.topCategories.slice(0, 3).join(', ') ] }) ] }), /*#__PURE__*/ _jsx(Link, { href: "/pricing", className: "shrink-0 text-xs font-medium text-amber-700 bg-amber-100 px-3 py-1.5 rounded-lg hover:bg-amber-200 transition", children: t('dashboard.plan.upgrade') }) ] }) : fomoData.totalTasks > 0 && /*#__PURE__*/ _jsx("div", { className: "mb-6 bg-blue-50 border border-blue-200 rounded-xl px-5 py-4", children: /*#__PURE__*/ _jsxs("div", { className: "flex items-center justify-between gap-4 flex-wrap", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-3", children: [ /*#__PURE__*/ _jsx("div", { className: "shrink-0 bg-blue-100 rounded-xl p-2", children: /*#__PURE__*/ _jsx("svg", { className: "w-5 h-5 text-blue-600", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z" }) }) }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsxs("p", { className: "text-base font-semibold text-blue-800", children: [ fomoData.totalOffers, " ", t('fomo.offers_received', 'предложений получено') ] }), fomoData.avgOffersPerTask > 0 && /*#__PURE__*/ _jsx("p", { className: "text-sm text-blue-500", children: t('fomo.avg_offers', 'В среднем {n}/задача').replace('{n}', Number(fomoData.avgOffersPerTask).toFixed(1)) }) ] }) ] }), fomoData.completionRate !== undefined && /*#__PURE__*/ _jsxs("div", { className: "text-right", children: [ /*#__PURE__*/ _jsxs("p", { className: "text-2xl font-bold text-blue-700", children: [ Math.round(fomoData.completionRate * 100), "%" ] }), /*#__PURE__*/ _jsx("p", { className: "text-sm text-blue-400", children: t('fomo.completion_rate', 'завершено') }) ] }) ] }) })), isSpecialist && /*#__PURE__*/ _jsxs(Link, { href: "/tasks", className: "flex items-center justify-between gap-4 bg-blue-600 text-white rounded-xl px-5 py-4 mb-8 hover:bg-blue-700 transition", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-4", children: [ /*#__PURE__*/ _jsx("div", { className: "shrink-0 bg-white/20 rounded-xl p-2.5", children: /*#__PURE__*/ _jsxs("svg", { className: "w-6 h-6 text-white", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: [ /*#__PURE__*/ _jsx("circle", { cx: "11", cy: "11", r: "7" }), /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M21 21l-4.35-4.35" }) ] }) }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("p", { className: "font-semibold text-base", children: t('find_tasks.title') }), /*#__PURE__*/ _jsx("p", { className: "text-blue-100 text-sm mt-0.5", children: t('find_tasks.banner_hint') }) ] }) ] }), /*#__PURE__*/ _jsx("svg", { className: "w-5 h-5 shrink-0 text-white/70", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) }) ] }), /*#__PURE__*/ _jsxs("div", { className: "grid md:grid-cols-2 gap-8", children: [ /*#__PURE__*/ _jsxs("div", { className: "space-y-8", children: [ /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsxs("h2", { className: "text-lg font-semibold text-white mb-4", children: [ t('dashboard.my_tasks'), " ", /*#__PURE__*/ _jsxs("span", { className: "text-white/60 font-normal text-base", children: [ "(", activeTasks.length, ")" ] }) ] }), activeTasks.length === 0 ? /*#__PURE__*/ _jsxs("div", { className: "bg-white rounded-xl border border-gray-200 p-6 text-center text-gray-500", children: [ /*#__PURE__*/ _jsx("p", { children: t('dashboard.tasks.empty') }), /*#__PURE__*/ _jsx(Link, { href: "/tasks/new", className: "text-blue-600 hover:underline text-sm mt-2 inline-block", children: t('dashboard.tasks.empty.cta') }) ] }) : /*#__PURE__*/ _jsx("div", { className: "space-y-3", children: activeTasks.map((task)=>/*#__PURE__*/ _jsx(TaskCard, { task: task }, task.id)) }) ] }), completedTasks.length > 0 && /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsxs("h2", { className: "text-lg font-semibold text-white/70 mb-4", children: [ t('dashboard.completed_tasks'), " ", /*#__PURE__*/ _jsxs("span", { className: "font-normal text-base text-white/50", children: [ "(", completedTasks.length, ")" ] }) ] }), /*#__PURE__*/ _jsx("div", { className: "space-y-3 opacity-75", children: completedTasks.map((task)=>/*#__PURE__*/ _jsx(TaskCard, { task: task }, task.id)) }) ] }) ] }), /*#__PURE__*/ _jsx("div", { className: "space-y-8", children: isSpecialist ? /*#__PURE__*/ _jsxs(_Fragment, { children: [ invitations.length > 0 && /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsxs("h2", { className: "text-lg font-semibold text-white mb-4", children: [ t('dashboard.invitations'), " ", /*#__PURE__*/ _jsxs("span", { className: "text-white/60 font-normal text-base", children: [ "(", invitations.length, ")" ] }) ] }), /*#__PURE__*/ _jsx("div", { className: "space-y-3", children: invitations.map((inv)=>/*#__PURE__*/ _jsxs(Link, { href: inv.referenceId ? `/tasks/${inv.referenceId}` : '/tasks', className: `flex items-start gap-3 p-4 rounded-xl border transition cursor-pointer ${inv.isRead ? 'bg-white/90 border-white/20 hover:bg-white' : 'bg-white border-amber-300 shadow-sm hover:bg-amber-50'}`, children: [ /*#__PURE__*/ _jsx("span", { className: "text-2xl", children: "\uD83D\uDCCB" }), /*#__PURE__*/ _jsxs("div", { className: "flex-1 min-w-0", children: [ /*#__PURE__*/ _jsx("p", { className: `font-medium truncate ${inv.isRead ? 'text-gray-600' : 'text-gray-900'}`, children: t('notif.type.task_invite', inv.title) }), inv.body && /*#__PURE__*/ _jsx("p", { className: "text-sm text-gray-500 mt-0.5 truncate", children: (()=>{ const title = extractNotifParam(inv.body); const tpl = t('notif.body.task_invite', ''); return title && tpl ? tpl.replace('{title}', title) : inv.body; })() }), /*#__PURE__*/ _jsx("p", { className: "text-xs text-gray-400 mt-1", children: new Date(inv.createdAt).toLocaleDateString(dateLocale) }) ] }), /*#__PURE__*/ _jsxs("div", { className: "flex flex-col items-end gap-1.5 shrink-0", children: [ !inv.isRead && /*#__PURE__*/ _jsx("span", { className: "w-2 h-2 bg-amber-400 rounded-full mt-2" }), /*#__PURE__*/ _jsx("span", { className: "text-xs text-gray-400", children: "→" }) ] }) ] }, inv.id)) }) ] }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsxs("h2", { className: "text-lg font-semibold text-white mb-4", children: [ t('dashboard.my_offers'), " ", /*#__PURE__*/ _jsxs("span", { className: "text-white/60 font-normal text-base", children: [ "(", activeOffers.length, ")" ] }) ] }), activeOffers.length === 0 ? /*#__PURE__*/ _jsxs("div", { className: "bg-white rounded-xl border border-gray-200 p-6 text-center text-gray-500", children: [ /*#__PURE__*/ _jsx("p", { children: t('dashboard.offers.empty') }), /*#__PURE__*/ _jsx(Link, { href: "/tasks", className: "text-blue-600 hover:underline text-sm mt-2 inline-block", children: t('dashboard.offers.empty.cta') }) ] }) : /*#__PURE__*/ _jsx("div", { className: "space-y-3", children: activeOffers.map((row)=>/*#__PURE__*/ _jsx(OfferCard, { row: row }, (row.offer || row).id)) }) ] }), completedOffers.length > 0 && /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsxs("h2", { className: "text-lg font-semibold text-white/70 mb-4", children: [ t('dashboard.completed_offers'), " ", /*#__PURE__*/ _jsxs("span", { className: "font-normal text-base text-white/50", children: [ "(", completedOffers.length, ")" ] }) ] }), /*#__PURE__*/ _jsx("div", { className: "space-y-3 opacity-75", children: completedOffers.map((row)=>/*#__PURE__*/ _jsx(OfferCard, { row: row }, (row.offer || row).id)) }) ] }) ] }) : /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs(Link, { href: "/specialists", className: "flex items-center justify-between gap-4 bg-blue-600 text-white rounded-xl px-5 py-4 hover:bg-blue-700 transition", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-4", children: [ /*#__PURE__*/ _jsx("div", { className: "shrink-0 bg-white/20 rounded-xl p-2.5", children: /*#__PURE__*/ _jsx("svg", { className: "w-6 h-6 text-white", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0z" }) }) }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("p", { className: "font-semibold text-base", children: t('dashboard.customer.specialists_title') }), /*#__PURE__*/ _jsx("p", { className: "text-blue-100 text-sm mt-0.5", children: t('dashboard.customer.specialists_hint') }) ] }) ] }), /*#__PURE__*/ _jsx("svg", { className: "w-5 h-5 shrink-0 text-white/70", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) }) ] }), /*#__PURE__*/ _jsxs("div", { className: "bg-white rounded-xl border border-gray-200 p-5", children: [ /*#__PURE__*/ _jsx("h2", { className: "text-base font-semibold text-gray-800 mb-4", children: t('dashboard.customer.how_title') }), /*#__PURE__*/ _jsx("div", { className: "space-y-3", children: [ { num: '1', text: t('dashboard.customer.step1'), icon: 'M12 4v16m8-8H4' }, { num: '2', text: t('dashboard.customer.step2'), icon: 'M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z' }, { num: '3', text: t('dashboard.customer.step3'), icon: 'M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z' } ].map(({ num, text, icon })=>/*#__PURE__*/ _jsxs("div", { className: "flex items-start gap-3", children: [ /*#__PURE__*/ _jsx("span", { className: "shrink-0 w-7 h-7 rounded-full bg-blue-100 text-blue-600 text-sm font-bold flex items-center justify-center", children: num }), /*#__PURE__*/ _jsx("p", { className: "text-sm text-gray-600 pt-1", children: text }) ] }, num)) }), /*#__PURE__*/ _jsxs(Link, { href: "/tasks/new", className: "mt-4 inline-block text-sm font-medium text-blue-600 hover:underline", children: [ tasks.length > 0 ? t('dashboard.tasks.add_new') : t('dashboard.tasks.empty.cta'), " →" ] }) ] }) ] }) }) ] }) ] }); } @`=_  35acMOae{"_  " A D  # #&$MPR[E_IIRjr%V]7?3;_ %0APanrg j $$$$%%2&6&&&K'_S'''((z)~)++ ....0081B1M3Q3S3V3E4I444{5~56677n8_r89(999A<E<<<F>I>t?x?@@BB*C.CCC+D.DDDDD8F;FG GG_G 0 && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "grid grid-cols-2 gap-2", children: Object.entries(stats).map(([key, val])=>/*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "bg-gray-50 rounded-xl px-3 py-2 text-center", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { className: "text-lg font-bold text-gray-800", children: val }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { className: "text-[10px] text-gray-400 uppercase tracking-wide", children: t(`dashboard.stats.${key}`, key) }) ] }, key)) }) ] }); } function DashboardPage() { const { data: session, isPending } = __WEBPACK_MODULE_REFERENCE__4_5b2275736553657373696f6e225d_call_directImport_asiSafe1__._(); const router = __WEBPACK_MODULE_REFERENCE__2_5b22757365526f75746572225d_call_directImport_asiSafe1__._(); const { t, locale } = __WEBPACK_MODULE_REFERENCE__5_5b227573654c6f63616c65225d_call_directImport_asiSafe1__._(); const [tasks, setTasks] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._([]); const [offers, setOffers] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._([]); const [myReviews, setMyReviews] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._([]); const [invitations, setInvitations] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._([]); const [loading, setLoading] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(true); const [dashboard, setDashboard] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(null); const [fomoData, setFomoData] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(null); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && __WEBPACK_MODULE_REFERENCE__1_5b22757365456666656374225d_call_directImport_asiSafe1__._(()=>{ if (!isPending && !session) router.push('/login'); }, [ session, isPending ]); // Redirect new specialists without any cards to the setup wizard process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && __WEBPACK_MODULE_REFERENCE__1_5b22757365456666656374225d_call_directImport_asiSafe1__._(()=>{ if (!session) return; const role = session.user?.role; if (role !== 'specialist') return; __WEBPACK_MODULE_REFERENCE__6_5b226765744d795370656369616c6973744361726473225d_call_directImport_asiSafe1__._().then(({ cards })=>{ if (cards.length === 0) router.push('/specialist-setup'); }).catch(()=>{}); }, [ session ]); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && __WEBPACK_MODULE_REFERENCE__1_5b22757365456666656374225d_call_directImport_asiSafe1__._(()=>{ if (!session) return; Promise.all([ __WEBPACK_MODULE_REFERENCE__6_5b226765744d795461736b73225d_call_directImport_asiSafe1__._(), __WEBPACK_MODULE_REFERENCE__6_5b226765744d794f6666657273225d_call_directImport_asiSafe1__._(), __WEBPACK_MODULE_REFERENCE__6_5b226765744d7952657669657773225d_call_directImport_asiSafe1__._(), __WEBPACK_MODULE_REFERENCE__6_5b226765744e6f74696669636174696f6e73225d_call_directImport_asiSafe1__._(), __WEBPACK_MODULE_REFERENCE__6_5b226765744d7944617368626f617264225d_call_directImport_asiSafe1__._() ]).then(([t, o, r, notifs, dash])=>{ setTasks(t); setOffers(o); setMyReviews(r); setInvitations(notifs.filter((n)=>n.type === 'task_invite')); setDashboard(dash); }).catch(()=>{}).finally(()=>setLoading(false)); }, [ session ]); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && __WEBPACK_MODULE_REFERENCE__1_5b22757365456666656374225d_call_directImport_asiSafe1__._(()=>{ if (!session) return; const role = session.user?.role; if (role === 'specialist') { __WEBPACK_MODULE_REFERENCE__6_5b226765745370656369616c697374466f6d6f44617368626f617264225d_call_directImport_asiSafe1__._().then(setFomoData).catch(()=>{}); } else { __WEBPACK_MODULE_REFERENCE__6_5b22676574437573746f6d6572466f6d6f44617368626f617264225d_call_directImport_asiSafe1__._().then(setFomoData).catch(()=>{}); } }, [ session ]); if (isPending || loading) return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "text-center py-20 text-white", children: t('common.loading') }); const dateLocale = locale === 'ru' ? 'ru-RU' : locale === 'en' ? 'en-US' : 'el-GR'; const activeTasks = tasks.filter((task)=>task.status !== 'completed' && task.status !== 'cancelled'); const completedTasks = tasks.filter((task)=>task.status === 'completed' || task.status === 'cancelled'); const activeOffers = offers.filter((row)=>{ const offer = row.offer || row; const task = row.task; return offer.status !== 'other_accepted' && task?.status !== 'completed' && task?.status !== 'cancelled'; }); const completedOffers = offers.filter((row)=>{ const offer = row.offer || row; const task = row.task; return offer.status === 'other_accepted' || task?.status === 'completed' || task?.status === 'cancelled'; }); function TaskCard({ task }) { const offerCount = task.offerCount ?? 0; const declinedCount = task.declinedCount ?? 0; const activeOfferCount = offerCount - declinedCount; return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__3_5b2264656661756c74225d_directImport_asiSafe1__._, { href: `/tasks/${task.id}`, className: "block bg-white rounded-xl border border-gray-200 p-4 hover:shadow-sm hover:border-blue-300 transition", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "flex justify-between items-start", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "flex-1 min-w-0", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { className: "font-medium text-gray-900 truncate", children: __WEBPACK_MODULE_REFERENCE__7_5b227461736b5469746c65225d_call_directImport_asiSafe1__._(task, locale) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { className: "text-xs text-gray-400 mt-1", children: new Date(task.createdAt).toLocaleDateString(dateLocale) }), offerCount > 0 && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "flex items-center gap-2 mt-1.5", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("span", { className: "text-xs text-blue-600 font-medium", children: [ "\uD83D\uDCBC ", offerCount, " ", t('dashboard.offers_count', 'предл.') ] }), declinedCount > 0 && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("span", { className: "text-xs text-red-400", children: [ "✕ ", declinedCount, " ", t('dashboard.declined_count', 'откл.') ] }) ] }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "ml-3 text-right shrink-0", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: `text-xs px-2 py-0.5 rounded-full ${task.status === 'open' ? 'bg-green-100 text-green-700' : task.status === 'in_progress' ? 'bg-blue-100 text-blue-700' : task.status === 'completed' ? 'bg-gray-100 text-gray-600' : 'bg-red-100 text-red-600'}`, children: t(`task.status.${task.status}`, task.status) }), task.budget && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("p", { className: "text-sm font-bold text-green-600 mt-1", children: [ __WEBPACK_MODULE_REFERENCE__7_5b22666f726d61745072696365225d_call_directImport_asiSafe1__._(task.budget), "€" ] }) ] }) ] }) }); } function OfferCard({ row }) { const offer = row.offer || row; const task = row.task; const reviewReceived = task?.status === 'completed' && offer.status === 'accepted' ? myReviews.find((r)=>r.review?.taskId === task?.id)?.review ?? null : null; return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__3_5b2264656661756c74225d_directImport_asiSafe1__._, { href: task ? `/tasks/${task.id}` : '#', className: "block bg-white rounded-xl border border-gray-200 p-4 hover:shadow-sm hover:border-blue-300 transition", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "flex justify-between items-start", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "flex-1 min-w-0", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { className: "font-medium text-gray-900 truncate", children: task?.title || t('chat.task_fallback') }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { className: "text-xs text-gray-400 mt-1", children: new Date(offer.createdAt).toLocaleDateString(dateLocale) }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "ml-3 text-right shrink-0", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("p", { className: "font-bold text-green-600", children: [ __WEBPACK_MODULE_REFERENCE__7_5b22666f726d61745072696365225d_call_directImport_asiSafe1__._(offer.price), "€" ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: `text-xs px-2 py-0.5 rounded-full mt-1 inline-block ${offer.status === 'accepted' ? 'bg-green-100 text-green-700' : offer.status === 'declined' ? 'bg-red-100 text-red-700' : offer.status === 'other_accepted' ? 'bg-orange-100 text-orange-600' : 'bg-gray-100 text-gray-700'}`, children: t(`offer.status.${offer.status}`, offer.status) }) ] }) ] }), reviewReceived && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "mt-3 pt-3 border-t border-gray-100 flex items-center gap-2", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "flex gap-0.5", children: [ 1, 2, 3, 4, 5 ].map((star)=>/*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: `text-sm ${star <= reviewReceived.rating ? 'text-yellow-400' : 'text-gray-200'}`, children: "★" }, star)) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("span", { className: "text-sm font-semibold text-gray-700", children: [ reviewReceived.rating, "/5" ] }), reviewReceived.comment && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: "text-xs text-gray-500 truncate", children: reviewReceived.comment }) ] }), task?.status === 'completed' && offer.status === 'accepted' && !reviewReceived && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { className: "mt-2 text-xs text-gray-400", children: t('dashboard.review_pending') }) ] }); } const isSpecialist = session?.user?.role === 'specialist'; return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "max-w-5xl mx-auto px-4 py-8", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "flex justify-between items-center mb-8", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("h1", { className: "text-2xl font-bold text-white", children: t('dashboard.title') }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__3_5b2264656661756c74225d_directImport_asiSafe1__._, { href: "/tasks/new", className: "bg-blue-600 text-white px-4 py-2 rounded-lg text-sm font-medium hover:bg-blue-700", children: t('dashboard.new_task') }) ] }), dashboard && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(PlanBlock, { dashboard: dashboard, t: t }), fomoData && (isSpecialist ? (fomoData.missedCount > 0 || fomoData.missedEarnings > 0) && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "mb-6 bg-amber-50 border border-amber-200 rounded-xl px-5 py-4 flex items-start gap-3", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "shrink-0 mt-0.5", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("svg", { className: "w-5 h-5 text-amber-500", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 9v2m0 4h.01M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z" }) }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "flex-1 min-w-0", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("p", { className: "text-base font-semibold text-amber-800", children: [ t('fomo.specialist_missed', 'Вы пропустили {n} заказов').replace('{n}', String(fomoData.missedCount ?? 0)), fomoData.missedEarnings > 0 && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("span", { className: "ml-1 text-amber-600", children: [ "на €", fomoData.missedEarnings ] }) ] }), fomoData.topCategories?.length > 0 && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("p", { className: "text-sm text-amber-600 mt-0.5", children: [ t('fomo.top_categories', 'Категории'), ": ", fomoData.topCategories.slice(0, 3).join(', ') ] }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__3_5b2264656661756c74225d_directImport_asiSafe1__._, { href: "/pricing", className: "shrink-0 text-xs font-medium text-amber-700 bg-amber-100 px-3 py-1.5 rounded-lg hover:bg-amber-200 transition", children: t('dashboard.plan.upgrade') }) ] }) : fomoData.totalTasks > 0 && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "mb-6 bg-blue-50 border border-blue-200 rounded-xl px-5 py-4", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "flex items-center justify-between gap-4 flex-wrap", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "flex items-center gap-3", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "shrink-0 bg-blue-100 rounded-xl p-2", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("svg", { className: "w-5 h-5 text-blue-600", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z" }) }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("p", { className: "text-base font-semibold text-blue-800", children: [ fomoData.totalOffers, " ", t('fomo.offers_received', 'предложений получено') ] }), fomoData.avgOffersPerTask > 0 && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { className: "text-sm text-blue-500", children: t('fomo.avg_offers', 'В среднем {n}/задача').replace('{n}', Number(fomoData.avgOffersPerTask).toFixed(1)) }) ] }) ] }), fomoData.completionRate !== undefined && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "text-right", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("p", { className: "text-2xl font-bold text-blue-700", children: [ Math.round(fomoData.completionRate * 100), "%" ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { className: "text-sm text-blue-400", children: t('fomo.completion_rate', 'завершено') }) ] }) ] }) })), isSpecialist && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__3_5b2264656661756c74225d_directImport_asiSafe1__._, { href: "/tasks", className: "flex items-center justify-between gap-4 bg-blue-600 text-white rounded-xl px-5 py-4 mb-8 hover:bg-blue-700 transition", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "flex items-center gap-4", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "shrink-0 bg-white/20 rounded-xl p-2.5", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("svg", { className: "w-6 h-6 text-white", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("circle", { cx: "11", cy: "11", r: "7" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M21 21l-4.35-4.35" }) ] }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { className: "font-semibold text-base", children: t('find_tasks.title') }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { className: "text-blue-100 text-sm mt-0.5", children: t('find_tasks.banner_hint') }) ] }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("svg", { className: "w-5 h-5 shrink-0 text-white/70", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "grid md:grid-cols-2 gap-8", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "space-y-8", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("h2", { className: "text-lg font-semibold text-white mb-4", children: [ t('dashboard.my_tasks'), " ", /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("span", { className: "text-white/60 font-normal text-base", children: [ "(", activeTasks.length, ")" ] }) ] }), activeTasks.length === 0 ? /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "bg-white rounded-xl border border-gray-200 p-6 text-center text-gray-500", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { children: t('dashboard.tasks.empty') }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__3_5b2264656661756c74225d_directImport_asiSafe1__._, { href: "/tasks/new", className: "text-blue-600 hover:underline text-sm mt-2 inline-block", children: t('dashboard.tasks.empty.cta') }) ] }) : /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "space-y-3", children: activeTasks.map((task)=>/*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(TaskCard, { task: task }, task.id)) }) ] }), completedTasks.length > 0 && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("h2", { className: "text-lg font-semibold text-white/70 mb-4", children: [ t('dashboard.completed_tasks'), " ", /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("span", { className: "font-normal text-base text-white/50", children: [ "(", completedTasks.length, ")" ] }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "space-y-3 opacity-75", children: completedTasks.map((task)=>/*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(TaskCard, { task: task }, task.id)) }) ] }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "space-y-8", children: isSpecialist ? /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._, { children: [ invitations.length > 0 && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("h2", { className: "text-lg font-semibold text-white mb-4", children: [ t('dashboard.invitations'), " ", /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("span", { className: "text-white/60 font-normal text-base", children: [ "(", invitations.length, ")" ] }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "space-y-3", children: invitations.map((inv)=>/*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__3_5b2264656661756c74225d_directImport_asiSafe1__._, { href: inv.referenceId ? `/tasks/${inv.referenceId}` : '/tasks', className: `flex items-start gap-3 p-4 rounded-xl border transition cursor-pointer ${inv.isRead ? 'bg-white/90 border-white/20 hover:bg-white' : 'bg-white border-amber-300 shadow-sm hover:bg-amber-50'}`, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: "text-2xl", children: "\uD83D\uDCCB" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "flex-1 min-w-0", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { className: `font-medium truncate ${inv.isRead ? 'text-gray-600' : 'text-gray-900'}`, children: t('notif.type.task_invite', inv.title) }), inv.body && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { className: "text-sm text-gray-500 mt-0.5 truncate", children: (()=>{ const title = extractNotifParam(inv.body); const tpl = t('notif.body.task_invite', ''); return title && tpl ? tpl.replace('{title}', title) : inv.body; })() }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { className: "text-xs text-gray-400 mt-1", children: new Date(inv.createdAt).toLocaleDateString(dateLocale) }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "flex flex-col items-end gap-1.5 shrink-0", children: [ !inv.isRead && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: "w-2 h-2 bg-amber-400 rounded-full mt-2" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: "text-xs text-gray-400", children: "→" }) ] }) ] }, inv.id)) }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("h2", { className: "text-lg font-semibold text-white mb-4", children: [ t('dashboard.my_offers'), " ", /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("span", { className: "text-white/60 font-normal text-base", children: [ "(", activeOffers.length, ")" ] }) ] }), activeOffers.length === 0 ? /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "bg-white rounded-xl border border-gray-200 p-6 text-center text-gray-500", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { children: t('dashboard.offers.empty') }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__3_5b2264656661756c74225d_directImport_asiSafe1__._, { href: "/tasks", className: "text-blue-600 hover:underline text-sm mt-2 inline-block", children: t('dashboard.offers.empty.cta') }) ] }) : /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "space-y-3", children: activeOffers.map((row)=>/*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(OfferCard, { row: row }, (row.offer || row).id)) }) ] }), completedOffers.length > 0 && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("h2", { className: "text-lg font-semibold text-white/70 mb-4", children: [ t('dashboard.completed_offers'), " ", /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("span", { className: "font-normal text-base text-white/50", children: [ "(", completedOffers.length, ")" ] }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "space-y-3 opacity-75", children: completedOffers.map((row)=>/*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(OfferCard, { row: row }, (row.offer || row).id)) }) ] }) ] }) : /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._, { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__3_5b2264656661756c74225d_directImport_asiSafe1__._, { href: "/specialists", className: "flex items-center justify-between gap-4 bg-blue-600 text-white rounded-xl px-5 py-4 hover:bg-blue-700 transition", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "flex items-center gap-4", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "shrink-0 bg-white/20 rounded-xl p-2.5", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("svg", { className: "w-6 h-6 text-white", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0z" }) }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { className: "font-semibold text-base", children: t('dashboard.customer.specialists_title') }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { className: "text-blue-100 text-sm mt-0.5", children: t('dashboard.customer.specialists_hint') }) ] }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("svg", { className: "w-5 h-5 shrink-0 text-white/70", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "bg-white rounded-xl border border-gray-200 p-5", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("h2", { className: "text-base font-semibold text-gray-800 mb-4", children: t('dashboard.customer.how_title') }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "space-y-3", children: [ { num: '1', text: t('dashboard.customer.step1'), icon: 'M12 4v16m8-8H4' }, { num: '2', text: t('dashboard.customer.step2'), icon: 'M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z' }, { num: '3', text: t('dashboard.customer.step3'), icon: 'M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z' } ].map(({ num, text, icon })=>/*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "flex items-start gap-3", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: "shrink-0 w-7 h-7 rounded-full bg-blue-100 text-blue-600 text-sm font-bold flex items-center justify-center", children: num }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { className: "text-sm text-gray-600 pt-1", children: text }) ] }, num)) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__3_5b2264656661756c74225d_directImport_asiSafe1__._, { href: "/tasks/new", className: "mt-4 inline-block text-sm font-medium text-blue-600 hover:underline", children: [ tasks.length > 0 ? t('dashboard.tasks.add_new') : t('dashboard.tasks.empty.cta'), " →" ] }) ] }) ] }) }) ] }) ] }); }  /* __next_internal_client_entry_do_not_use__ default auto */ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime"; import { useEffect, useState } from 'react'; import { useRouter } from 'next/navigation'; import Link from 'next/link'; import { useSession } from '@/lib/auth'; import { useLocale } from '@/context/locale'; import { getMyTasks, getMyOffers, getMyReviews, getNotifications, getMyDashboard, getSpecialistFomoDashboard, getCustomerFomoDashboard, getMySpecialistCards } from '@/lib/api'; import { formatPrice, taskTitle } from '@/lib/taskLocale'; import { PlanBadge } from '@/components/PlanBadge'; import { UsageMeter } from '@/components/UsageMeter'; /** Extract the quoted task title from a stored notification body (any locale) */ function extractNotifParam(body) { if (!body) return null; const m = body.match(/[«""](.+?)[»""]/); return m?.[1] ?? null; } function PlanBlock({ dashboard, t }) { const plan = dashboard.plan; const expiry = dashboard.planExpiration; const usage = dashboard.usage; const stats = dashboard.stats; const expiryPct = expiry ? Math.max(0, Math.min(100, Math.round(expiry.daysLeft / 30 * 100))) : 100; const expiryColor = expiry ? expiry.daysLeft <= 3 ? 'bg-red-500' : expiry.daysLeft <= 7 ? 'bg-amber-400' : 'bg-green-400' : 'bg-green-400'; return /*#__PURE__*/ _jsxs("div", { className: "bg-white rounded-2xl border border-gray-200 p-5 mb-6", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center justify-between mb-4", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-2", children: [ /*#__PURE__*/ _jsx("h2", { className: "font-semibold text-gray-800 text-sm", children: t('dashboard.plan.title', 'My Plan') }), plan ? /*#__PURE__*/ _jsx(PlanBadge, { tier: plan.tier, size: "sm" }) : /*#__PURE__*/ _jsx("span", { className: "text-xs text-gray-400", children: t('dashboard.plan.no_plan', 'Free') }) ] }), /*#__PURE__*/ _jsx(Link, { href: "/pricing", className: "text-xs font-medium text-blue-600 hover:underline", children: plan?.tier === 'ultimate' ? null : t('dashboard.plan.upgrade', 'Upgrade') }) ] }), expiry && /*#__PURE__*/ _jsxs("div", { className: "mb-4", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex justify-between text-xs text-gray-500 mb-1", children: [ /*#__PURE__*/ _jsx("span", { children: t('dashboard.plan.expires', 'Expires in {n} days').replace('{n}', String(expiry.daysLeft)) }), /*#__PURE__*/ _jsxs("span", { children: [ expiry.daysLeft, " ", t('pricing.days', 'days') ] }) ] }), /*#__PURE__*/ _jsx("div", { className: "h-1.5 rounded-full bg-gray-100", children: /*#__PURE__*/ _jsx("div", { className: `h-full rounded-full transition-all ${expiryColor}`, style: { width: `${expiryPct}%` } }) }) ] }), (usage.messagesSent !== undefined || usage.ordersMade !== undefined) && /*#__PURE__*/ _jsxs("div", { className: "space-y-2 mb-4", children: [ /*#__PURE__*/ _jsx("p", { className: "text-xs font-medium text-gray-500 uppercase tracking-wide", children: t('dashboard.plan.limits', 'Daily limits') }), /*#__PURE__*/ _jsx(UsageMeter, { current: usage.messagesSent, limit: usage.messagesLeft !== null ? usage.messagesSent + usage.messagesLeft : null, label: t('dashboard.plan.messages', 'Messages') }), /*#__PURE__*/ _jsx(UsageMeter, { current: usage.ordersMade, limit: usage.ordersLeft !== null ? usage.ordersMade + usage.ordersLeft : null, label: t('dashboard.plan.orders', 'Orders') }) ] }), Object.keys(stats).length > 0 && /*#__PURE__*/ _jsx("div", { className: "grid grid-cols-2 gap-2", children: Object.entries(stats).map(([key, val])=>/*#__PURE__*/ _jsxs("div", { className: "bg-gray-50 rounded-xl px-3 py-2 text-center", children: [ /*#__PURE__*/ _jsx("p", { className: "text-lg font-bold text-gray-800", children: val }), /*#__PURE__*/ _jsx("p", { className: "text-[10px] text-gray-400 uppercase tracking-wide", children: t(`dashboard.stats.${key}`, key) }) ] }, key)) }) ] }); } export default function DashboardPage() { const { data: session, isPending } = useSession(); const router = useRouter(); const { t, locale } = useLocale(); const [tasks, setTasks] = useState([]); const [offers, setOffers] = useState([]); const [myReviews, setMyReviews] = useState([]); const [invitations, setInvitations] = useState([]); const [loading, setLoading] = useState(true); const [dashboard, setDashboard] = useState(null); const [fomoData, setFomoData] = useState(null); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (!isPending && !session) router.push('/login'); }, [ session, isPending ]); // Redirect new specialists without any cards to the setup wizard process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (!session) return; const role = session.user?.role; if (role !== 'specialist') return; getMySpecialistCards().then(({ cards })=>{ if (cards.length === 0) router.push('/specialist-setup'); }).catch(()=>{}); }, [ session ]); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (!session) return; Promise.all([ getMyTasks(), getMyOffers(), getMyReviews(), getNotifications(), getMyDashboard() ]).then(([t, o, r, notifs, dash])=>{ setTasks(t); setOffers(o); setMyReviews(r); setInvitations(notifs.filter((n)=>n.type === 'task_invite')); setDashboard(dash); }).catch(()=>{}).finally(()=>setLoading(false)); }, [ session ]); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (!session) return; const role = session.user?.role; if (role === 'specialist') { getSpecialistFomoDashboard().then(setFomoData).catch(()=>{}); } else { getCustomerFomoDashboard().then(setFomoData).catch(()=>{}); } }, [ session ]); if (isPending || loading) return /*#__PURE__*/ _jsx("div", { className: "text-center py-20 text-white", children: t('common.loading') }); const dateLocale = locale === 'ru' ? 'ru-RU' : locale === 'en' ? 'en-US' : 'el-GR'; const activeTasks = tasks.filter((task)=>task.status !== 'completed' && task.status !== 'cancelled'); const completedTasks = tasks.filter((task)=>task.status === 'completed' || task.status === 'cancelled'); const activeOffers = offers.filter((row)=>{ const offer = row.offer || row; const task = row.task; return offer.status !== 'other_accepted' && task?.status !== 'completed' && task?.status !== 'cancelled'; }); const completedOffers = offers.filter((row)=>{ const offer = row.offer || row; const task = row.task; return offer.status === 'other_accepted' || task?.status === 'completed' || task?.status === 'cancelled'; }); function TaskCard({ task }) { const offerCount = task.offerCount ?? 0; const declinedCount = task.declinedCount ?? 0; const activeOfferCount = offerCount - declinedCount; return /*#__PURE__*/ _jsx(Link, { href: `/tasks/${task.id}`, className: "block bg-white rounded-xl border border-gray-200 p-4 hover:shadow-sm hover:border-blue-300 transition", children: /*#__PURE__*/ _jsxs("div", { className: "flex justify-between items-start", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex-1 min-w-0", children: [ /*#__PURE__*/ _jsx("p", { className: "font-medium text-gray-900 truncate", children: taskTitle(task, locale) }), /*#__PURE__*/ _jsx("p", { className: "text-xs text-gray-400 mt-1", children: new Date(task.createdAt).toLocaleDateString(dateLocale) }), offerCount > 0 && /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-2 mt-1.5", children: [ /*#__PURE__*/ _jsxs("span", { className: "text-xs text-blue-600 font-medium", children: [ "\uD83D\uDCBC ", offerCount, " ", t('dashboard.offers_count', 'предл.') ] }), declinedCount > 0 && /*#__PURE__*/ _jsxs("span", { className: "text-xs text-red-400", children: [ "✕ ", declinedCount, " ", t('dashboard.declined_count', 'откл.') ] }) ] }) ] }), /*#__PURE__*/ _jsxs("div", { className: "ml-3 text-right shrink-0", children: [ /*#__PURE__*/ _jsx("span", { className: `text-xs px-2 py-0.5 rounded-full ${task.status === 'open' ? 'bg-green-100 text-green-700' : task.status === 'in_progress' ? 'bg-blue-100 text-blue-700' : task.status === 'completed' ? 'bg-gray-100 text-gray-600' : 'bg-red-100 text-red-600'}`, children: t(`task.status.${task.status}`, task.status) }), task.budget && /*#__PURE__*/ _jsxs("p", { className: "text-sm font-bold text-green-600 mt-1", children: [ formatPrice(task.budget), "€" ] }) ] }) ] }) }); } function OfferCard({ row }) { const offer = row.offer || row; const task = row.task; const reviewReceived = task?.status === 'completed' && offer.status === 'accepted' ? myReviews.find((r)=>r.review?.taskId === task?.id)?.review ?? null : null; return /*#__PURE__*/ _jsxs(Link, { href: task ? `/tasks/${task.id}` : '#', className: "block bg-white rounded-xl border border-gray-200 p-4 hover:shadow-sm hover:border-blue-300 transition", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex justify-between items-start", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex-1 min-w-0", children: [ /*#__PURE__*/ _jsx("p", { className: "font-medium text-gray-900 truncate", children: task?.title || t('chat.task_fallback') }), /*#__PURE__*/ _jsx("p", { className: "text-xs text-gray-400 mt-1", children: new Date(offer.createdAt).toLocaleDateString(dateLocale) }) ] }), /*#__PURE__*/ _jsxs("div", { className: "ml-3 text-right shrink-0", children: [ /*#__PURE__*/ _jsxs("p", { className: "font-bold text-green-600", children: [ formatPrice(offer.price), "€" ] }), /*#__PURE__*/ _jsx("span", { className: `text-xs px-2 py-0.5 rounded-full mt-1 inline-block ${offer.status === 'accepted' ? 'bg-green-100 text-green-700' : offer.status === 'declined' ? 'bg-red-100 text-red-700' : offer.status === 'other_accepted' ? 'bg-orange-100 text-orange-600' : 'bg-gray-100 text-gray-700'}`, children: t(`offer.status.${offer.status}`, offer.status) }) ] }) ] }), reviewReceived && /*#__PURE__*/ _jsxs("div", { className: "mt-3 pt-3 border-t border-gray-100 flex items-center gap-2", children: [ /*#__PURE__*/ _jsx("div", { className: "flex gap-0.5", children: [ 1, 2, 3, 4, 5 ].map((star)=>/*#__PURE__*/ _jsx("span", { className: `text-sm ${star <= reviewReceived.rating ? 'text-yellow-400' : 'text-gray-200'}`, children: "★" }, star)) }), /*#__PURE__*/ _jsxs("span", { className: "text-sm font-semibold text-gray-700", children: [ reviewReceived.rating, "/5" ] }), reviewReceived.comment && /*#__PURE__*/ _jsx("span", { className: "text-xs text-gray-500 truncate", children: reviewReceived.comment }) ] }), task?.status === 'completed' && offer.status === 'accepted' && !reviewReceived && /*#__PURE__*/ _jsx("p", { className: "mt-2 text-xs text-gray-400", children: t('dashboard.review_pending') }) ] }); } const isSpecialist = session?.user?.role === 'specialist'; return /*#__PURE__*/ _jsxs("div", { className: "max-w-5xl mx-auto px-4 py-8", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex justify-between items-center mb-8", children: [ /*#__PURE__*/ _jsx("h1", { className: "text-2xl font-bold text-white", children: t('dashboard.title') }), /*#__PURE__*/ _jsx(Link, { href: "/tasks/new", className: "bg-blue-600 text-white px-4 py-2 rounded-lg text-sm font-medium hover:bg-blue-700", children: t('dashboard.new_task') }) ] }), dashboard && /*#__PURE__*/ _jsx(PlanBlock, { dashboard: dashboard, t: t }), fomoData && (isSpecialist ? (fomoData.missedCount > 0 || fomoData.missedEarnings > 0) && /*#__PURE__*/ _jsxs("div", { className: "mb-6 bg-amber-50 border border-amber-200 rounded-xl px-5 py-4 flex items-start gap-3", children: [ /*#__PURE__*/ _jsx("div", { className: "shrink-0 mt-0.5", children: /*#__PURE__*/ _jsx("svg", { className: "w-5 h-5 text-amber-500", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 9v2m0 4h.01M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z" }) }) }), /*#__PURE__*/ _jsxs("div", { className: "flex-1 min-w-0", children: [ /*#__PURE__*/ _jsxs("p", { className: "text-base font-semibold text-amber-800", children: [ t('fomo.specialist_missed', 'Вы пропустили {n} заказов').replace('{n}', String(fomoData.missedCount ?? 0)), fomoData.missedEarnings > 0 && /*#__PURE__*/ _jsxs("span", { className: "ml-1 text-amber-600", children: [ "на €", fomoData.missedEarnings ] }) ] }), fomoData.topCategories?.length > 0 && /*#__PURE__*/ _jsxs("p", { className: "text-sm text-amber-600 mt-0.5", children: [ t('fomo.top_categories', 'Категории'), ": ", fomoData.topCategories.slice(0, 3).join(', ') ] }) ] }), /*#__PURE__*/ _jsx(Link, { href: "/pricing", className: "shrink-0 text-xs font-medium text-amber-700 bg-amber-100 px-3 py-1.5 rounded-lg hover:bg-amber-200 transition", children: t('dashboard.plan.upgrade') }) ] }) : fomoData.totalTasks > 0 && /*#__PURE__*/ _jsx("div", { className: "mb-6 bg-blue-50 border border-blue-200 rounded-xl px-5 py-4", children: /*#__PURE__*/ _jsxs("div", { className: "flex items-center justify-between gap-4 flex-wrap", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-3", children: [ /*#__PURE__*/ _jsx("div", { className: "shrink-0 bg-blue-100 rounded-xl p-2", children: /*#__PURE__*/ _jsx("svg", { className: "w-5 h-5 text-blue-600", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z" }) }) }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsxs("p", { className: "text-base font-semibold text-blue-800", children: [ fomoData.totalOffers, " ", t('fomo.offers_received', 'предложений получено') ] }), fomoData.avgOffersPerTask > 0 && /*#__PURE__*/ _jsx("p", { className: "text-sm text-blue-500", children: t('fomo.avg_offers', 'В среднем {n}/задача').replace('{n}', Number(fomoData.avgOffersPerTask).toFixed(1)) }) ] }) ] }), fomoData.completionRate !== undefined && /*#__PURE__*/ _jsxs("div", { className: "text-right", children: [ /*#__PURE__*/ _jsxs("p", { className: "text-2xl font-bold text-blue-700", children: [ Math.round(fomoData.completionRate * 100), "%" ] }), /*#__PURE__*/ _jsx("p", { className: "text-sm text-blue-400", children: t('fomo.completion_rate', 'завершено') }) ] }) ] }) })), isSpecialist && /*#__PURE__*/ _jsxs(Link, { href: "/tasks", className: "flex items-center justify-between gap-4 bg-blue-600 text-white rounded-xl px-5 py-4 mb-8 hover:bg-blue-700 transition", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-4", children: [ /*#__PURE__*/ _jsx("div", { className: "shrink-0 bg-white/20 rounded-xl p-2.5", children: /*#__PURE__*/ _jsxs("svg", { className: "w-6 h-6 text-white", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: [ /*#__PURE__*/ _jsx("circle", { cx: "11", cy: "11", r: "7" }), /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M21 21l-4.35-4.35" }) ] }) }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("p", { className: "font-semibold text-base", children: t('find_tasks.title') }), /*#__PURE__*/ _jsx("p", { className: "text-blue-100 text-sm mt-0.5", children: t('find_tasks.banner_hint') }) ] }) ] }), /*#__PURE__*/ _jsx("svg", { className: "w-5 h-5 shrink-0 text-white/70", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) }) ] }), /*#__PURE__*/ _jsxs("div", { className: "grid md:grid-cols-2 gap-8", children: [ /*#__PURE__*/ _jsxs("div", { className: "space-y-8", children: [ /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsxs("h2", { className: "text-lg font-semibold text-white mb-4", children: [ t('dashboard.my_tasks'), " ", /*#__PURE__*/ _jsxs("span", { className: "text-white/60 font-normal text-base", children: [ "(", activeTasks.length, ")" ] }) ] }), activeTasks.length === 0 ? /*#__PURE__*/ _jsxs("div", { className: "bg-white rounded-xl border border-gray-200 p-6 text-center text-gray-500", children: [ /*#__PURE__*/ _jsx("p", { children: t('dashboard.tasks.empty') }), /*#__PURE__*/ _jsx(Link, { href: "/tasks/new", className: "text-blue-600 hover:underline text-sm mt-2 inline-block", children: t('dashboard.tasks.empty.cta') }) ] }) : /*#__PURE__*/ _jsx("div", { className: "space-y-3", children: activeTasks.map((task)=>/*#__PURE__*/ _jsx(TaskCard, { task: task }, task.id)) }) ] }), completedTasks.length > 0 && /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsxs("h2", { className: "text-lg font-semibold text-white/70 mb-4", children: [ t('dashboard.completed_tasks'), " ", /*#__PURE__*/ _jsxs("span", { className: "font-normal text-base text-white/50", children: [ "(", completedTasks.length, ")" ] }) ] }), /*#__PURE__*/ _jsx("div", { className: "space-y-3 opacity-75", children: completedTasks.map((task)=>/*#__PURE__*/ _jsx(TaskCard, { task: task }, task.id)) }) ] }) ] }), /*#__PURE__*/ _jsx("div", { className: "space-y-8", children: isSpecialist ? /*#__PURE__*/ _jsxs(_Fragment, { children: [ invitations.length > 0 && /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsxs("h2", { className: "text-lg font-semibold text-white mb-4", children: [ t('dashboard.invitations'), " ", /*#__PURE__*/ _jsxs("span", { className: "text-white/60 font-normal text-base", children: [ "(", invitations.length, ")" ] }) ] }), /*#__PURE__*/ _jsx("div", { className: "space-y-3", children: invitations.map((inv)=>/*#__PURE__*/ _jsxs(Link, { href: inv.referenceId ? `/tasks/${inv.referenceId}` : '/tasks', className: `flex items-start gap-3 p-4 rounded-xl border transition cursor-pointer ${inv.isRead ? 'bg-white/90 border-white/20 hover:bg-white' : 'bg-white border-amber-300 shadow-sm hover:bg-amber-50'}`, children: [ /*#__PURE__*/ _jsx("span", { className: "text-2xl", children: "\uD83D\uDCCB" }), /*#__PURE__*/ _jsxs("div", { className: "flex-1 min-w-0", children: [ /*#__PURE__*/ _jsx("p", { className: `font-medium truncate ${inv.isRead ? 'text-gray-600' : 'text-gray-900'}`, children: t('notif.type.task_invite', inv.title) }), inv.body && /*#__PURE__*/ _jsx("p", { className: "text-sm text-gray-500 mt-0.5 truncate", children: (()=>{ const title = extractNotifParam(inv.body); const tpl = t('notif.body.task_invite', ''); return title && tpl ? tpl.replace('{title}', title) : inv.body; })() }), /*#__PURE__*/ _jsx("p", { className: "text-xs text-gray-400 mt-1", children: new Date(inv.createdAt).toLocaleDateString(dateLocale) }) ] }), /*#__PURE__*/ _jsxs("div", { className: "flex flex-col items-end gap-1.5 shrink-0", children: [ !inv.isRead && /*#__PURE__*/ _jsx("span", { className: "w-2 h-2 bg-amber-400 rounded-full mt-2" }), /*#__PURE__*/ _jsx("span", { className: "text-xs text-gray-400", children: "→" }) ] }) ] }, inv.id)) }) ] }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsxs("h2", { className: "text-lg font-semibold text-white mb-4", children: [ t('dashboard.my_offers'), " ", /*#__PURE__*/ _jsxs("span", { className: "text-white/60 font-normal text-base", children: [ "(", activeOffers.length, ")" ] }) ] }), activeOffers.length === 0 ? /*#__PURE__*/ _jsxs("div", { className: "bg-white rounded-xl border border-gray-200 p-6 text-center text-gray-500", children: [ /*#__PURE__*/ _jsx("p", { children: t('dashboard.offers.empty') }), /*#__PURE__*/ _jsx(Link, { href: "/tasks", className: "text-blue-600 hover:underline text-sm mt-2 inline-block", children: t('dashboard.offers.empty.cta') }) ] }) : /*#__PURE__*/ _jsx("div", { className: "space-y-3", children: activeOffers.map((row)=>/*#__PURE__*/ _jsx(OfferCard, { row: row }, (row.offer || row).id)) }) ] }), completedOffers.length > 0 && /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsxs("h2", { className: "text-lg font-semibold text-white/70 mb-4", children: [ t('dashboard.completed_offers'), " ", /*#__PURE__*/ _jsxs("span", { className: "font-normal text-base text-white/50", children: [ "(", completedOffers.length, ")" ] }) ] }), /*#__PURE__*/ _jsx("div", { className: "space-y-3 opacity-75", children: completedOffers.map((row)=>/*#__PURE__*/ _jsx(OfferCard, { row: row }, (row.offer || row).id)) }) ] }) ] }) : /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs(Link, { href: "/specialists", className: "flex items-center justify-between gap-4 bg-blue-600 text-white rounded-xl px-5 py-4 hover:bg-blue-700 transition", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-4", children: [ /*#__PURE__*/ _jsx("div", { className: "shrink-0 bg-white/20 rounded-xl p-2.5", children: /*#__PURE__*/ _jsx("svg", { className: "w-6 h-6 text-white", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0z" }) }) }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("p", { className: "font-semibold text-base", children: t('dashboard.customer.specialists_title') }), /*#__PURE__*/ _jsx("p", { className: "text-blue-100 text-sm mt-0.5", children: t('dashboard.customer.specialists_hint') }) ] }) ] }), /*#__PURE__*/ _jsx("svg", { className: "w-5 h-5 shrink-0 text-white/70", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) }) ] }), /*#__PURE__*/ _jsxs("div", { className: "bg-white rounded-xl border border-gray-200 p-5", children: [ /*#__PURE__*/ _jsx("h2", { className: "text-base font-semibold text-gray-800 mb-4", children: t('dashboard.customer.how_title') }), /*#__PURE__*/ _jsx("div", { className: "space-y-3", children: [ { num: '1', text: t('dashboard.customer.step1'), icon: 'M12 4v16m8-8H4' }, { num: '2', text: t('dashboard.customer.step2'), icon: 'M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z' }, { num: '3', text: t('dashboard.customer.step3'), icon: 'M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z' } ].map(({ num, text, icon })=>/*#__PURE__*/ _jsxs("div", { className: "flex items-start gap-3", children: [ /*#__PURE__*/ _jsx("span", { className: "shrink-0 w-7 h-7 rounded-full bg-blue-100 text-blue-600 text-sm font-bold flex items-center justify-center", children: num }), /*#__PURE__*/ _jsx("p", { className: "text-sm text-gray-600 pt-1", children: text }) ] }, num)) }), /*#__PURE__*/ _jsxs(Link, { href: "/tasks/new", className: "mt-4 inline-block text-sm font-medium text-blue-600 hover:underline", children: [ tasks.length > 0 ? t('dashboard.tasks.add_new') : t('dashboard.tasks.empty.cta'), " →" ] }) ] }) ] }) }) ] }) ] }); } F61146undefined148191undefined193236undefined238266undefined268307undefined309353undefined355530undefined532589undefined591641undefined643695undefined13771381__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined15131517__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined16591663__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined18141817__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined20692072__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined20742082__WEBPACK_MODULE_REFERENCE__8_5b22506c616e4261646765225d_directImport_asiSafe1__._undefined22262229__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined25022505__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined25072510__WEBPACK_MODULE_REFERENCE__3_5b2264656661756c74225d_directImport_asiSafe1__._undefined28462850__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined29582962__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined31373140__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined33593363__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined37243727__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined38553858__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined42654269__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined43874390__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined46304633__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined46354644__WEBPACK_MODULE_REFERENCE__9_5b2255736167654d65746572225d_directImport_asiSafe1__._undefined49414944__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined49464955__WEBPACK_MODULE_REFERENCE__9_5b2255736167654d65746572225d_directImport_asiSafe1__._undefined52985301__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined54455449__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined56205623__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined58305833__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined61346148undefined62176226__WEBPACK_MODULE_REFERENCE__4_5b2275736553657373696f6e225d_call_directImport_asiSafe1__._undefined62506258__WEBPACK_MODULE_REFERENCE__2_5b22757365526f75746572225d_call_directImport_asiSafe1__._undefined62896297__WEBPACK_MODULE_REFERENCE__5_5b227573654c6f63616c65225d_call_directImport_asiSafe1__._undefined63326339__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined63786385__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined64306437__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined64866493__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined65346541__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined65886595__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined66406647__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined67116719__WEBPACK_MODULE_REFERENCE__1_5b22757365456666656374225d_call_directImport_asiSafe1__._undefined69636971__WEBPACK_MODULE_REFERENCE__1_5b22757365456666656374225d_call_directImport_asiSafe1__._undefined71017120__WEBPACK_MODULE_REFERENCE__6_5b226765744d795370656369616c6973744361726473225d_call_directImport_asiSafe1__._undefined73287336__WEBPACK_MODULE_REFERENCE__1_5b22757365456666656374225d_call_directImport_asiSafe1__._undefined74087417__WEBPACK_MODULE_REFERENCE__6_5b226765744d795461736b73225d_call_directImport_asiSafe1__._undefined74347444__WEBPACK_MODULE_REFERENCE__6_5b226765744d794f6666657273225d_call_directImport_asiSafe1__._undefined74617472__WEBPACK_MODULE_REFERENCE__6_5b226765744d7952657669657773225d_call_directImport_asiSafe1__._undefined74897504__WEBPACK_MODULE_REFERENCE__6_5b226765744e6f74696669636174696f6e73225d_call_directImport_asiSafe1__._undefined75217534__WEBPACK_MODULE_REFERENCE__6_5b226765744d7944617368626f617264225d_call_directImport_asiSafe1__._undefined79147922__WEBPACK_MODULE_REFERENCE__1_5b22757365456666656374225d_call_directImport_asiSafe1__._undefined80508075__WEBPACK_MODULE_REFERENCE__6_5b226765745370656369616c697374466f6d6f44617368626f617264225d_call_directImport_asiSafe1__._undefined81418164__WEBPACK_MODULE_REFERENCE__6_5b22676574437573746f6d6572466f6d6f44617368626f617264225d_call_directImport_asiSafe1__._undefined82958298__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined94229425__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined94279430__WEBPACK_MODULE_REFERENCE__3_5b2264656661756c74225d_directImport_asiSafe1__._undefined96389642__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined97789782__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined99249927__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1005910067__WEBPACK_MODULE_REFERENCE__7_5b227461736b5469746c65225d_call_directImport_asiSafe1__._undefined1015710160__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1043210436__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1061810622__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1117511179__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1178911793__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1194511948__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1242312427__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1260012610__WEBPACK_MODULE_REFERENCE__7_5b22666f726d61745072696365225d_call_directImport_asiSafe1__._undefined1313313137__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1313913142__WEBPACK_MODULE_REFERENCE__3_5b2264656661756c74225d_directImport_asiSafe1__._undefined1338113385__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1353313537__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1369113694__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1395513958__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1427814282__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1444614450__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1462214632__WEBPACK_MODULE_REFERENCE__7_5b22666f726d61745072696365225d_call_directImport_asiSafe1__._undefined1481214815__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1542515429__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1560315606__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1594215945__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1624416248__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1659216595__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1692216925__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1719417198__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1730517309__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1745117454__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1764517648__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1765017653__WEBPACK_MODULE_REFERENCE__3_5b2264656661756c74225d_directImport_asiSafe1__._undefined1797617979__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1818418188__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1837618379__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1849218495__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1881118814__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1919119195__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1933719341__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1970419708__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2019320197__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2067420677__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2067920682__WEBPACK_MODULE_REFERENCE__3_5b2264656661756c74225d_directImport_asiSafe1__._undefined2103821041__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2118221186__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2135121355__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2151821521__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2167821681__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2206822071__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2263022634__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2274722751__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2331023313__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2381523819__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2396923973__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2436024363__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2472124725__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2472724730__WEBPACK_MODULE_REFERENCE__3_5b2264656661756c74225d_directImport_asiSafe1__._undefined2497724981__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2513225135__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2528625290__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2569225695__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2596625969__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2637526379__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2648426487__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2673626739__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2709727100__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2740027403__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2767627680__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2780927813__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2795027954__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2805928063__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2839328397__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2900829012__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2926029263__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2946329466__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2946829471__WEBPACK_MODULE_REFERENCE__3_5b2264656661756c74225d_directImport_asiSafe1__._undefined2989529898__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3006130064__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3037030374__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3047930483__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3082330827__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3141431417__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3159431597__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3191531918__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3204032044__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3204632054__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined3217132175__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3228832292__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3264532649__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3327333276__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3344633450__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3345233455__WEBPACK_MODULE_REFERENCE__3_5b2264656661756c74225d_directImport_asiSafe1__._undefined3396633969__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3427934283__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3453334536__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3497334976__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3577735780__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3629036294__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3658536588__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3686636869__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3753237536__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3764937653__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3800438008__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3866138665__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3892538928__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3914139144__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3914639149__WEBPACK_MODULE_REFERENCE__3_5b2264656661756c74225d_directImport_asiSafe1__._undefined3959439597__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3976839771__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4011540119__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4023240236__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4059740601__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4122941232__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4141741420__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4176041764__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4176641774__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined4186541869__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4187141874__WEBPACK_MODULE_REFERENCE__3_5b2264656661756c74225d_directImport_asiSafe1__._undefined4220242206__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4241742420__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4261142614__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4309443097__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4377343777__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4392243925__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4427444277__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4480844811__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4523145234__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4566745671__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4588145884__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4618146184__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4750347507__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4774147744__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4814148144__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4859748601__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4860348606__WEBPACK_MODULE_REFERENCE__3_5b2264656661756c74225d_directImport_asiSafe1__._undefined_; | _9J 3  7 0 W k_-wg/y{%oK@Y":(|$x_& z *!~!!"#^##L$%r%%&#&}&&&&_'p''L))"***P++_,00011622 333f445`5p66r7793:<<y==??@@BHCJC_CDDfEELFFGG%IqIJaJ KgKLeLNOO P[QQRStTTVOV\WWX__XX7YY@ZBZZ[\\5]];^^^2`|`aAbbcddfgh*i,iyij'kk_lllmm{nnHppr s~ssuCv9xxygyz4{|||5},~x~Y<΁_'qSI%őM"n׍#mh`r _hљqRMՠOajˤѧ{Ǩɨ__ۭ%گ$EٵF\=F~79C8_&L VYJ@$LT#mKPlanBadge/* PlanBadge */.d(link_default())UsageMeter(0,auth/* useSession */.wV)(0,navigation.useRouter)(0,context_locale/* useLocale */.Y)(0,react.useState)(0,react.useEffect)(0,api/* getMySpecialistCards */.Bb)(0,api/* getMyTasks */.Fu)(0,api/* getMyOffers */.aT)(0,api/* getMyReviews */.q7)(0,api/* getNotifications */.Tr)(0,api/* getMyDashboard */.H)(0,api/* getSpecialistFomoDashboard */.zk)(0,api/* getCustomerFomoDashboard */.ML)(0,taskLocale/* taskTitle */.Oj)(0,taskLocale/* formatPrice */.$g)react_jsx_runtime.FragmentJ// ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { "default": () => (/* binding */ DashboardPage) }); // EXTERNAL MODULE: ../../node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.js var react_jsx_runtime = __webpack_require__(78157); // EXTERNAL MODULE: ../../node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js var react = __webpack_require__(31768); // EXTERNAL MODULE: ../../node_modules/next/dist/api/navigation.js var navigation = __webpack_require__(71159); // EXTERNAL MODULE: ../../node_modules/next/dist/client/app-dir/link.js var app_dir_link = __webpack_require__(94496); var link_default = /*#__PURE__*/__webpack_require__.n(app_dir_link); // EXTERNAL MODULE: ./src/lib/auth.ts var auth = __webpack_require__(13260); // EXTERNAL MODULE: ./src/context/locale.tsx var context_locale = __webpack_require__(96484); // EXTERNAL MODULE: ./src/lib/api.ts var api = __webpack_require__(91864); // EXTERNAL MODULE: ./src/lib/taskLocale.ts var taskLocale = __webpack_require__(8293); // EXTERNAL MODULE: ./src/components/PlanBadge.tsx var PlanBadge = __webpack_require__(25701); ;// ./src/components/UsageMeter.tsx function UsageMeter({ current, limit, label, className = '' }) { if (limit === null) { return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: `${className}`, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "flex justify-between items-center mb-1", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "text-xs text-gray-500", children: label }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "text-xs font-semibold text-green-600", children: "∞" }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "h-1.5 rounded-full bg-green-100", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "h-full w-full rounded-full bg-green-400" }) }) ] }); } const pct = limit > 0 ? Math.min(100, Math.round(current / limit * 100)) : 100; const remaining = Math.max(0, limit - current); const barColor = pct >= 100 ? 'bg-red-500' : pct >= 80 ? 'bg-amber-400' : 'bg-blue-500'; const textColor = pct >= 100 ? 'text-red-600' : pct >= 80 ? 'text-amber-600' : 'text-gray-600'; return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: className, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "flex justify-between items-center mb-1", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "text-xs text-gray-500", children: label }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("span", { className: `text-xs font-semibold ${textColor}`, children: [ remaining, " / ", limit ] }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "h-1.5 rounded-full bg-gray-100", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: `h-full rounded-full transition-all ${barColor}`, style: { width: `${pct}%` } }) }) ] }); } ;// ./src/app/dashboard/page.tsx /* __next_internal_client_entry_do_not_use__ default auto */ /** Extract the quoted task title from a stored notification body (any locale) */ function extractNotifParam(body) { if (!body) return null; const m = body.match(/[«""](.+?)[»""]/); return m?.[1] ?? null; } function PlanBlock({ dashboard, t }) { const plan = dashboard.plan; const expiry = dashboard.planExpiration; const usage = dashboard.usage; const stats = dashboard.stats; const expiryPct = expiry ? Math.max(0, Math.min(100, Math.round(expiry.daysLeft / 30 * 100))) : 100; const expiryColor = expiry ? expiry.daysLeft <= 3 ? 'bg-red-500' : expiry.daysLeft <= 7 ? 'bg-amber-400' : 'bg-green-400' : 'bg-green-400'; return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "bg-white rounded-2xl border border-gray-200 p-5 mb-6", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "flex items-center justify-between mb-4", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h2", { className: "font-semibold text-gray-800 text-sm", children: t('dashboard.plan.title', 'My Plan') }), plan ? /*#__PURE__*/ (0,react_jsx_runtime.jsx)(PlanBadge/* PlanBadge */.d, { tier: plan.tier, size: "sm" }) : /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "text-xs text-gray-400", children: t('dashboard.plan.no_plan', 'Free') }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)((link_default()), { href: "/pricing", className: "text-xs font-medium text-blue-600 hover:underline", children: plan?.tier === 'ultimate' ? null : t('dashboard.plan.upgrade', 'Upgrade') }) ] }), expiry && /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "mb-4", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "flex justify-between text-xs text-gray-500 mb-1", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { children: t('dashboard.plan.expires', 'Expires in {n} days').replace('{n}', String(expiry.daysLeft)) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("span", { children: [ expiry.daysLeft, " ", t('pricing.days', 'days') ] }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "h-1.5 rounded-full bg-gray-100", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: `h-full rounded-full transition-all ${expiryColor}`, style: { width: `${expiryPct}%` } }) }) ] }), (usage.messagesSent !== undefined || usage.ordersMade !== undefined) && /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "space-y-2 mb-4", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "text-xs font-medium text-gray-500 uppercase tracking-wide", children: t('dashboard.plan.limits', 'Daily limits') }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(UsageMeter, { current: usage.messagesSent, limit: usage.messagesLeft !== null ? usage.messagesSent + usage.messagesLeft : null, label: t('dashboard.plan.messages', 'Messages') }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(UsageMeter, { current: usage.ordersMade, limit: usage.ordersLeft !== null ? usage.ordersMade + usage.ordersLeft : null, label: t('dashboard.plan.orders', 'Orders') }) ] }), Object.keys(stats).length > 0 && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "grid grid-cols-2 gap-2", children: Object.entries(stats).map(([key, val])=>/*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "bg-gray-50 rounded-xl px-3 py-2 text-center", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "text-lg font-bold text-gray-800", children: val }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "text-[10px] text-gray-400 uppercase tracking-wide", children: t(`dashboard.stats.${key}`, key) }) ] }, key)) }) ] }); } function DashboardPage() { const { data: session, isPending } = (0,auth/* useSession */.wV)(); const router = (0,navigation.useRouter)(); const { t, locale } = (0,context_locale/* useLocale */.Y)(); const [tasks, setTasks] = (0,react.useState)([]); const [offers, setOffers] = (0,react.useState)([]); const [myReviews, setMyReviews] = (0,react.useState)([]); const [invitations, setInvitations] = (0,react.useState)([]); const [loading, setLoading] = (0,react.useState)(true); const [dashboard, setDashboard] = (0,react.useState)(null); const [fomoData, setFomoData] = (0,react.useState)(null); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react.useEffect)(()=>{ if (!isPending && !session) router.push('/login'); }, [ session, isPending ]); // Redirect new specialists without any cards to the setup wizard process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react.useEffect)(()=>{ if (!session) return; const role = session.user?.role; if (role !== 'specialist') return; (0,api/* getMySpecialistCards */.Bb)().then(({ cards })=>{ if (cards.length === 0) router.push('/specialist-setup'); }).catch(()=>{}); }, [ session ]); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react.useEffect)(()=>{ if (!session) return; Promise.all([ (0,api/* getMyTasks */.Fu)(), (0,api/* getMyOffers */.aT)(), (0,api/* getMyReviews */.q7)(), (0,api/* getNotifications */.Tr)(), (0,api/* getMyDashboard */.H)() ]).then(([t, o, r, notifs, dash])=>{ setTasks(t); setOffers(o); setMyReviews(r); setInvitations(notifs.filter((n)=>n.type === 'task_invite')); setDashboard(dash); }).catch(()=>{}).finally(()=>setLoading(false)); }, [ session ]); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react.useEffect)(()=>{ if (!session) return; const role = session.user?.role; if (role === 'specialist') { (0,api/* getSpecialistFomoDashboard */.zk)().then(setFomoData).catch(()=>{}); } else { (0,api/* getCustomerFomoDashboard */.ML)().then(setFomoData).catch(()=>{}); } }, [ session ]); if (isPending || loading) return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "text-center py-20 text-white", children: t('common.loading') }); const dateLocale = locale === 'ru' ? 'ru-RU' : locale === 'en' ? 'en-US' : 'el-GR'; const activeTasks = tasks.filter((task)=>task.status !== 'completed' && task.status !== 'cancelled'); const completedTasks = tasks.filter((task)=>task.status === 'completed' || task.status === 'cancelled'); const activeOffers = offers.filter((row)=>{ const offer = row.offer || row; const task = row.task; return offer.status !== 'other_accepted' && task?.status !== 'completed' && task?.status !== 'cancelled'; }); const completedOffers = offers.filter((row)=>{ const offer = row.offer || row; const task = row.task; return offer.status === 'other_accepted' || task?.status === 'completed' || task?.status === 'cancelled'; }); function TaskCard({ task }) { const offerCount = task.offerCount ?? 0; const declinedCount = task.declinedCount ?? 0; const activeOfferCount = offerCount - declinedCount; return /*#__PURE__*/ (0,react_jsx_runtime.jsx)((link_default()), { href: `/tasks/${task.id}`, className: "block bg-white rounded-xl border border-gray-200 p-4 hover:shadow-sm hover:border-blue-300 transition", children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "flex justify-between items-start", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "flex-1 min-w-0", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "font-medium text-gray-900 truncate", children: (0,taskLocale/* taskTitle */.Oj)(task, locale) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "text-xs text-gray-400 mt-1", children: new Date(task.createdAt).toLocaleDateString(dateLocale) }), offerCount > 0 && /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2 mt-1.5", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("span", { className: "text-xs text-blue-600 font-medium", children: [ "\uD83D\uDCBC ", offerCount, " ", t('dashboard.offers_count', 'предл.') ] }), declinedCount > 0 && /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("span", { className: "text-xs text-red-400", children: [ "✕ ", declinedCount, " ", t('dashboard.declined_count', 'откл.') ] }) ] }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "ml-3 text-right shrink-0", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: `text-xs px-2 py-0.5 rounded-full ${task.status === 'open' ? 'bg-green-100 text-green-700' : task.status === 'in_progress' ? 'bg-blue-100 text-blue-700' : task.status === 'completed' ? 'bg-gray-100 text-gray-600' : 'bg-red-100 text-red-600'}`, children: t(`task.status.${task.status}`, task.status) }), task.budget && /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("p", { className: "text-sm font-bold text-green-600 mt-1", children: [ (0,taskLocale/* formatPrice */.$g)(task.budget), "€" ] }) ] }) ] }) }); } function OfferCard({ row }) { const offer = row.offer || row; const task = row.task; const reviewReceived = task?.status === 'completed' && offer.status === 'accepted' ? myReviews.find((r)=>r.review?.taskId === task?.id)?.review ?? null : null; return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)((link_default()), { href: task ? `/tasks/${task.id}` : '#', className: "block bg-white rounded-xl border border-gray-200 p-4 hover:shadow-sm hover:border-blue-300 transition", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "flex justify-between items-start", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "flex-1 min-w-0", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "font-medium text-gray-900 truncate", children: task?.title || t('chat.task_fallback') }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "text-xs text-gray-400 mt-1", children: new Date(offer.createdAt).toLocaleDateString(dateLocale) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "ml-3 text-right shrink-0", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("p", { className: "font-bold text-green-600", children: [ (0,taskLocale/* formatPrice */.$g)(offer.price), "€" ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: `text-xs px-2 py-0.5 rounded-full mt-1 inline-block ${offer.status === 'accepted' ? 'bg-green-100 text-green-700' : offer.status === 'declined' ? 'bg-red-100 text-red-700' : offer.status === 'other_accepted' ? 'bg-orange-100 text-orange-600' : 'bg-gray-100 text-gray-700'}`, children: t(`offer.status.${offer.status}`, offer.status) }) ] }) ] }), reviewReceived && /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "mt-3 pt-3 border-t border-gray-100 flex items-center gap-2", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "flex gap-0.5", children: [ 1, 2, 3, 4, 5 ].map((star)=>/*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: `text-sm ${star <= reviewReceived.rating ? 'text-yellow-400' : 'text-gray-200'}`, children: "★" }, star)) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("span", { className: "text-sm font-semibold text-gray-700", children: [ reviewReceived.rating, "/5" ] }), reviewReceived.comment && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "text-xs text-gray-500 truncate", children: reviewReceived.comment }) ] }), task?.status === 'completed' && offer.status === 'accepted' && !reviewReceived && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "mt-2 text-xs text-gray-400", children: t('dashboard.review_pending') }) ] }); } const isSpecialist = session?.user?.role === 'specialist'; return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "max-w-5xl mx-auto px-4 py-8", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "flex justify-between items-center mb-8", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h1", { className: "text-2xl font-bold text-white", children: t('dashboard.title') }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)((link_default()), { href: "/tasks/new", className: "bg-blue-600 text-white px-4 py-2 rounded-lg text-sm font-medium hover:bg-blue-700", children: t('dashboard.new_task') }) ] }), dashboard && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(PlanBlock, { dashboard: dashboard, t: t }), fomoData && (isSpecialist ? (fomoData.missedCount > 0 || fomoData.missedEarnings > 0) && /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "mb-6 bg-amber-50 border border-amber-200 rounded-xl px-5 py-4 flex items-start gap-3", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "shrink-0 mt-0.5", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("svg", { className: "w-5 h-5 text-amber-500", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 9v2m0 4h.01M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z" }) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "flex-1 min-w-0", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("p", { className: "text-base font-semibold text-amber-800", children: [ t('fomo.specialist_missed', 'Вы пропустили {n} заказов').replace('{n}', String(fomoData.missedCount ?? 0)), fomoData.missedEarnings > 0 && /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("span", { className: "ml-1 text-amber-600", children: [ "на €", fomoData.missedEarnings ] }) ] }), fomoData.topCategories?.length > 0 && /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("p", { className: "text-sm text-amber-600 mt-0.5", children: [ t('fomo.top_categories', 'Категории'), ": ", fomoData.topCategories.slice(0, 3).join(', ') ] }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)((link_default()), { href: "/pricing", className: "shrink-0 text-xs font-medium text-amber-700 bg-amber-100 px-3 py-1.5 rounded-lg hover:bg-amber-200 transition", children: t('dashboard.plan.upgrade') }) ] }) : fomoData.totalTasks > 0 && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "mb-6 bg-blue-50 border border-blue-200 rounded-xl px-5 py-4", children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "flex items-center justify-between gap-4 flex-wrap", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "flex items-center gap-3", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "shrink-0 bg-blue-100 rounded-xl p-2", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("svg", { className: "w-5 h-5 text-blue-600", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z" }) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("p", { className: "text-base font-semibold text-blue-800", children: [ fomoData.totalOffers, " ", t('fomo.offers_received', 'предложений получено') ] }), fomoData.avgOffersPerTask > 0 && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "text-sm text-blue-500", children: t('fomo.avg_offers', 'В среднем {n}/задача').replace('{n}', Number(fomoData.avgOffersPerTask).toFixed(1)) }) ] }) ] }), fomoData.completionRate !== undefined && /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "text-right", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("p", { className: "text-2xl font-bold text-blue-700", children: [ Math.round(fomoData.completionRate * 100), "%" ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "text-sm text-blue-400", children: t('fomo.completion_rate', 'завершено') }) ] }) ] }) })), isSpecialist && /*#__PURE__*/ (0,react_jsx_runtime.jsxs)((link_default()), { href: "/tasks", className: "flex items-center justify-between gap-4 bg-blue-600 text-white rounded-xl px-5 py-4 mb-8 hover:bg-blue-700 transition", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "flex items-center gap-4", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "shrink-0 bg-white/20 rounded-xl p-2.5", children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("svg", { className: "w-6 h-6 text-white", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("circle", { cx: "11", cy: "11", r: "7" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M21 21l-4.35-4.35" }) ] }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "font-semibold text-base", children: t('find_tasks.title') }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "text-blue-100 text-sm mt-0.5", children: t('find_tasks.banner_hint') }) ] }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("svg", { className: "w-5 h-5 shrink-0 text-white/70", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "grid md:grid-cols-2 gap-8", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "space-y-8", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("h2", { className: "text-lg font-semibold text-white mb-4", children: [ t('dashboard.my_tasks'), " ", /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("span", { className: "text-white/60 font-normal text-base", children: [ "(", activeTasks.length, ")" ] }) ] }), activeTasks.length === 0 ? /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "bg-white rounded-xl border border-gray-200 p-6 text-center text-gray-500", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: t('dashboard.tasks.empty') }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)((link_default()), { href: "/tasks/new", className: "text-blue-600 hover:underline text-sm mt-2 inline-block", children: t('dashboard.tasks.empty.cta') }) ] }) : /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "space-y-3", children: activeTasks.map((task)=>/*#__PURE__*/ (0,react_jsx_runtime.jsx)(TaskCard, { task: task }, task.id)) }) ] }), completedTasks.length > 0 && /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("h2", { className: "text-lg font-semibold text-white/70 mb-4", children: [ t('dashboard.completed_tasks'), " ", /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("span", { className: "font-normal text-base text-white/50", children: [ "(", completedTasks.length, ")" ] }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "space-y-3 opacity-75", children: completedTasks.map((task)=>/*#__PURE__*/ (0,react_jsx_runtime.jsx)(TaskCard, { task: task }, task.id)) }) ] }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "space-y-8", children: isSpecialist ? /*#__PURE__*/ (0,react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ invitations.length > 0 && /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("h2", { className: "text-lg font-semibold text-white mb-4", children: [ t('dashboard.invitations'), " ", /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("span", { className: "text-white/60 font-normal text-base", children: [ "(", invitations.length, ")" ] }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "space-y-3", children: invitations.map((inv)=>/*#__PURE__*/ (0,react_jsx_runtime.jsxs)((link_default()), { href: inv.referenceId ? `/tasks/${inv.referenceId}` : '/tasks', className: `flex items-start gap-3 p-4 rounded-xl border transition cursor-pointer ${inv.isRead ? 'bg-white/90 border-white/20 hover:bg-white' : 'bg-white border-amber-300 shadow-sm hover:bg-amber-50'}`, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "text-2xl", children: "\uD83D\uDCCB" }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "flex-1 min-w-0", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: `font-medium truncate ${inv.isRead ? 'text-gray-600' : 'text-gray-900'}`, children: t('notif.type.task_invite', inv.title) }), inv.body && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "text-sm text-gray-500 mt-0.5 truncate", children: (()=>{ const title = extractNotifParam(inv.body); const tpl = t('notif.body.task_invite', ''); return title && tpl ? tpl.replace('{title}', title) : inv.body; })() }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "text-xs text-gray-400 mt-1", children: new Date(inv.createdAt).toLocaleDateString(dateLocale) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "flex flex-col items-end gap-1.5 shrink-0", children: [ !inv.isRead && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "w-2 h-2 bg-amber-400 rounded-full mt-2" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "text-xs text-gray-400", children: "→" }) ] }) ] }, inv.id)) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("h2", { className: "text-lg font-semibold text-white mb-4", children: [ t('dashboard.my_offers'), " ", /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("span", { className: "text-white/60 font-normal text-base", children: [ "(", activeOffers.length, ")" ] }) ] }), activeOffers.length === 0 ? /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "bg-white rounded-xl border border-gray-200 p-6 text-center text-gray-500", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: t('dashboard.offers.empty') }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)((link_default()), { href: "/tasks", className: "text-blue-600 hover:underline text-sm mt-2 inline-block", children: t('dashboard.offers.empty.cta') }) ] }) : /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "space-y-3", children: activeOffers.map((row)=>/*#__PURE__*/ (0,react_jsx_runtime.jsx)(OfferCard, { row: row }, (row.offer || row).id)) }) ] }), completedOffers.length > 0 && /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("h2", { className: "text-lg font-semibold text-white/70 mb-4", children: [ t('dashboard.completed_offers'), " ", /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("span", { className: "font-normal text-base text-white/50", children: [ "(", completedOffers.length, ")" ] }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "space-y-3 opacity-75", children: completedOffers.map((row)=>/*#__PURE__*/ (0,react_jsx_runtime.jsx)(OfferCard, { row: row }, (row.offer || row).id)) }) ] }) ] }) : /*#__PURE__*/ (0,react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)((link_default()), { href: "/specialists", className: "flex items-center justify-between gap-4 bg-blue-600 text-white rounded-xl px-5 py-4 hover:bg-blue-700 transition", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "flex items-center gap-4", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "shrink-0 bg-white/20 rounded-xl p-2.5", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("svg", { className: "w-6 h-6 text-white", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0z" }) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "font-semibold text-base", children: t('dashboard.customer.specialists_title') }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "text-blue-100 text-sm mt-0.5", children: t('dashboard.customer.specialists_hint') }) ] }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("svg", { className: "w-5 h-5 shrink-0 text-white/70", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "bg-white rounded-xl border border-gray-200 p-5", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h2", { className: "text-base font-semibold text-gray-800 mb-4", children: t('dashboard.customer.how_title') }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "space-y-3", children: [ { num: '1', text: t('dashboard.customer.step1'), icon: 'M12 4v16m8-8H4' }, { num: '2', text: t('dashboard.customer.step2'), icon: 'M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z' }, { num: '3', text: t('dashboard.customer.step3'), icon: 'M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z' } ].map(({ num, text, icon })=>/*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "flex items-start gap-3", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "shrink-0 w-7 h-7 rounded-full bg-blue-100 text-blue-600 text-sm font-bold flex items-center justify-center", children: num }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "text-sm text-gray-600 pt-1", children: text }) ] }, num)) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)((link_default()), { href: "/tasks/new", className: "mt-4 inline-block text-sm font-medium text-blue-600 hover:underline", children: [ tasks.length > 0 ? t('dashboard.tasks.add_new') : t('dashboard.tasks.empty.cta'), " →" ] }) ] }) ] }) }) ] }) ] }); } KN ` O// ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { "default": () => (/* binding */ DashboardPage) }); // EXTERNAL MODULE: ../../node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.js var react_jsx_runtime = __webpack_require__(78157); // EXTERNAL MODULE: ../../node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js var react = __webpack_require__(31768); // EXTERNAL MODULE: ../../node_modules/next/dist/api/navigation.js var navigation = __webpack_require__(71159); // EXTERNAL MODULE: ../../node_modules/next/dist/client/app-dir/link.js var app_dir_link = __webpack_require__(94496); var link_default = /*#__PURE__*/__webpack_require__.n(app_dir_link); // EXTERNAL MODULE: ./src/lib/auth.ts var auth = __webpack_require__(13260); // EXTERNAL MODULE: ./src/context/locale.tsx var context_locale = __webpack_require__(96484); // EXTERNAL MODULE: ./src/lib/api.ts var api = __webpack_require__(91864); // EXTERNAL MODULE: ./src/lib/taskLocale.ts var taskLocale = __webpack_require__(8293); // EXTERNAL MODULE: ./src/components/PlanBadge.tsx var PlanBadge = __webpack_require__(25701); ;// ./src/components/UsageMeter.tsx  ReplaceSourceOJ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; export function UsageMeter({ current, limit, label, className = '' }) { if (limit === null) { return /*#__PURE__*/ _jsxs("div", { className: `${className}`, children: [ /*#__PURE__*/ _jsxs("div", { className: "flex justify-between items-center mb-1", children: [ /*#__PURE__*/ _jsx("span", { className: "text-xs text-gray-500", children: label }), /*#__PURE__*/ _jsx("span", { className: "text-xs font-semibold text-green-600", children: "∞" }) ] }), /*#__PURE__*/ _jsx("div", { className: "h-1.5 rounded-full bg-green-100", children: /*#__PURE__*/ _jsx("div", { className: "h-full w-full rounded-full bg-green-400" }) }) ] }); } const pct = limit > 0 ? Math.min(100, Math.round(current / limit * 100)) : 100; const remaining = Math.max(0, limit - current); const barColor = pct >= 100 ? 'bg-red-500' : pct >= 80 ? 'bg-amber-400' : 'bg-blue-500'; const textColor = pct >= 100 ? 'text-red-600' : pct >= 80 ? 'text-amber-600' : 'text-gray-600'; return /*#__PURE__*/ _jsxs("div", { className: className, children: [ /*#__PURE__*/ _jsxs("div", { className: "flex justify-between items-center mb-1", children: [ /*#__PURE__*/ _jsx("span", { className: "text-xs text-gray-500", children: label }), /*#__PURE__*/ _jsxs("span", { className: `text-xs font-semibold ${textColor}`, children: [ remaining, " / ", limit ] }) ] }), /*#__PURE__*/ _jsx("div", { className: "h-1.5 rounded-full bg-gray-100", children: /*#__PURE__*/ _jsx("div", { className: `h-full rounded-full transition-all ${barColor}`, style: { width: `${pct}%` } }) }) ] }); } i062undefined6470undefined191195__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined299303__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined457460__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined646649__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined881884__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined10051008__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined15241528__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined16151619__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined17611764__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined19341938__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined22762279__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined23912394__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined121197(0,react_jsx_runtime.jsxs)undefined301377(0,react_jsx_runtime.jsxs)undefined531605(0,react_jsx_runtime.jsx)undefined791865(0,react_jsx_runtime.jsx)undefined10971171(0,react_jsx_runtime.jsx)undefined12921366(0,react_jsx_runtime.jsx)undefined18821958(0,react_jsx_runtime.jsxs)undefined20452121(0,react_jsx_runtime.jsxs)undefined22632337(0,react_jsx_runtime.jsx)undefined25072583(0,react_jsx_runtime.jsxs)undefined29212995(0,react_jsx_runtime.jsx)undefined31073181(0,react_jsx_runtime.jsx)undefinedRawSource" ;// ./src/app/dashboard/page.tsx KF61146undefined148191undefined193236undefined238266undefined268307undefined309353undefined355530undefined532589undefined591641undefined643695undefined13771381__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined15131517__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined16591663__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined18141817__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined20692072__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined20742082__WEBPACK_MODULE_REFERENCE__8_5b22506c616e4261646765225d_directImport_asiSafe1__._undefined22262229__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined25022505__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined25072510__WEBPACK_MODULE_REFERENCE__3_5b2264656661756c74225d_directImport_asiSafe1__._undefined28462850__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined29582962__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined31373140__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined33593363__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined37243727__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined38553858__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined42654269__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined43874390__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined46304633__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined46354644__WEBPACK_MODULE_REFERENCE__9_5b2255736167654d65746572225d_directImport_asiSafe1__._undefined49414944__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined49464955__WEBPACK_MODULE_REFERENCE__9_5b2255736167654d65746572225d_directImport_asiSafe1__._undefined52985301__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined54455449__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined56205623__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined58305833__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined61346148undefined62176226__WEBPACK_MODULE_REFERENCE__4_5b2275736553657373696f6e225d_call_directImport_asiSafe1__._undefined62506258__WEBPACK_MODULE_REFERENCE__2_5b22757365526f75746572225d_call_directImport_asiSafe1__._undefined62896297__WEBPACK_MODULE_REFERENCE__5_5b227573654c6f63616c65225d_call_directImport_asiSafe1__._undefined63326339__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined63786385__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined64306437__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined64866493__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined65346541__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined65886595__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined66406647__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined67116719__WEBPACK_MODULE_REFERENCE__1_5b22757365456666656374225d_call_directImport_asiSafe1__._undefined69636971__WEBPACK_MODULE_REFERENCE__1_5b22757365456666656374225d_call_directImport_asiSafe1__._undefined71017120__WEBPACK_MODULE_REFERENCE__6_5b226765744d795370656369616c6973744361726473225d_call_directImport_asiSafe1__._undefined73287336__WEBPACK_MODULE_REFERENCE__1_5b22757365456666656374225d_call_directImport_asiSafe1__._undefined74087417__WEBPACK_MODULE_REFERENCE__6_5b226765744d795461736b73225d_call_directImport_asiSafe1__._undefined74347444__WEBPACK_MODULE_REFERENCE__6_5b226765744d794f6666657273225d_call_directImport_asiSafe1__._undefined74617472__WEBPACK_MODULE_REFERENCE__6_5b226765744d7952657669657773225d_call_directImport_asiSafe1__._undefined74897504__WEBPACK_MODULE_REFERENCE__6_5b226765744e6f74696669636174696f6e73225d_call_directImport_asiSafe1__._undefined75217534__WEBPACK_MODULE_REFERENCE__6_5b226765744d7944617368626f617264225d_call_directImport_asiSafe1__._undefined79147922__WEBPACK_MODULE_REFERENCE__1_5b22757365456666656374225d_call_directImport_asiSafe1__._undefined80508075__WEBPACK_MODULE_REFERENCE__6_5b226765745370656369616c697374466f6d6f44617368626f617264225d_call_directImport_asiSafe1__._undefined81418164__WEBPACK_MODULE_REFERENCE__6_5b22676574437573746f6d6572466f6d6f44617368626f617264225d_call_directImport_asiSafe1__._undefined82958298__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined94229425__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined94279430__WEBPACK_MODULE_REFERENCE__3_5b2264656661756c74225d_directImport_asiSafe1__._undefined96389642__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined97789782__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined99249927__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1005910067__WEBPACK_MODULE_REFERENCE__7_5b227461736b5469746c65225d_call_directImport_asiSafe1__._undefined1015710160__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1043210436__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1061810622__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1117511179__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1178911793__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1194511948__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1242312427__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1260012610__WEBPACK_MODULE_REFERENCE__7_5b22666f726d61745072696365225d_call_directImport_asiSafe1__._undefined1313313137__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1313913142__WEBPACK_MODULE_REFERENCE__3_5b2264656661756c74225d_directImport_asiSafe1__._undefined1338113385__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1353313537__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1369113694__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1395513958__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1427814282__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1444614450__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1462214632__WEBPACK_MODULE_REFERENCE__7_5b22666f726d61745072696365225d_call_directImport_asiSafe1__._undefined1481214815__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1542515429__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1560315606__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1594215945__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1624416248__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1659216595__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1692216925__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1719417198__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1730517309__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1745117454__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1764517648__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1765017653__WEBPACK_MODULE_REFERENCE__3_5b2264656661756c74225d_directImport_asiSafe1__._undefined1797617979__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1818418188__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1837618379__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1849218495__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1881118814__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1919119195__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1933719341__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1970419708__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2019320197__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2067420677__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2067920682__WEBPACK_MODULE_REFERENCE__3_5b2264656661756c74225d_directImport_asiSafe1__._undefined2103821041__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2118221186__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2135121355__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2151821521__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2167821681__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2206822071__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2263022634__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2274722751__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2331023313__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2381523819__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2396923973__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2436024363__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2472124725__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2472724730__WEBPACK_MODULE_REFERENCE__3_5b2264656661756c74225d_directImport_asiSafe1__._undefined2497724981__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2513225135__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2528625290__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2569225695__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2596625969__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2637526379__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2648426487__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2673626739__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2709727100__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2740027403__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2767627680__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2780927813__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2795027954__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2805928063__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2839328397__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2900829012__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2926029263__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2946329466__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2946829471__WEBPACK_MODULE_REFERENCE__3_5b2264656661756c74225d_directImport_asiSafe1__._undefined2989529898__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3006130064__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3037030374__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3047930483__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3082330827__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3141431417__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3159431597__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3191531918__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3204032044__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3204632054__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined3217132175__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3228832292__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3264532649__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3327333276__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3344633450__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3345233455__WEBPACK_MODULE_REFERENCE__3_5b2264656661756c74225d_directImport_asiSafe1__._undefined3396633969__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3427934283__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3453334536__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3497334976__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3577735780__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3629036294__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3658536588__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3686636869__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3753237536__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3764937653__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3800438008__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3866138665__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3892538928__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3914139144__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3914639149__WEBPACK_MODULE_REFERENCE__3_5b2264656661756c74225d_directImport_asiSafe1__._undefined3959439597__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3976839771__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4011540119__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4023240236__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4059740601__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4122941232__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4141741420__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4176041764__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4176641774__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined4186541869__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4187141874__WEBPACK_MODULE_REFERENCE__3_5b2264656661756c74225d_directImport_asiSafe1__._undefined4220242206__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4241742420__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4261142614__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4309443097__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4377343777__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4392243925__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4427444277__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4480844811__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4523145234__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4566745671__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4588145884__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4618146184__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4750347507__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4774147744__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4814148144__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4859748601__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4860348606__WEBPACK_MODULE_REFERENCE__3_5b2264656661756c74225d_directImport_asiSafe1__._undefined~751827(0,react_jsx_runtime.jsxs)undefined9591035(0,react_jsx_runtime.jsxs)undefined11771253(0,react_jsx_runtime.jsxs)undefined14041478(0,react_jsx_runtime.jsx)undefined17301804(0,react_jsx_runtime.jsx)undefined18061887PlanBadge/* PlanBadge */.dundefined20312105(0,react_jsx_runtime.jsx)undefined23782452(0,react_jsx_runtime.jsx)undefined24542531(link_default())undefined28672943(0,react_jsx_runtime.jsxs)undefined30513127(0,react_jsx_runtime.jsxs)undefined33023376(0,react_jsx_runtime.jsx)undefined35953671(0,react_jsx_runtime.jsxs)undefined40324106(0,react_jsx_runtime.jsx)undefined42344308(0,react_jsx_runtime.jsx)undefined47154791(0,react_jsx_runtime.jsxs)undefined49094983(0,react_jsx_runtime.jsx)undefined52235297(0,react_jsx_runtime.jsx)undefined52995382UsageMeterundefined56795753(0,react_jsx_runtime.jsx)undefined57555838UsageMeterundefined61816255(0,react_jsx_runtime.jsx)undefined63996475(0,react_jsx_runtime.jsxs)undefined66466720(0,react_jsx_runtime.jsx)undefined69277001(0,react_jsx_runtime.jsx)undefined73707458(0,auth/* useSession */.wV)undefined74827568(0,navigation.useRouter)undefined75997685(0,context_locale/* useLocale */.Y)undefined77207804(0,react.useState)undefined78437927(0,react.useState)undefined79728056(0,react.useState)undefined81058189(0,react.useState)undefined82308314(0,react.useState)undefined83618445(0,react.useState)undefined84908574(0,react.useState)undefined86388724(0,react.useEffect)undefined89689054(0,react.useEffect)undefined91849292(0,api/* getMySpecialistCards */.Bb)undefined95009586(0,react.useEffect)undefined96589746(0,api/* getMyTasks */.Fu)undefined97639853(0,api/* getMyOffers */.aT)undefined98709962(0,api/* getMyReviews */.q7)undefined997910079(0,api/* getNotifications */.Tr)undefined1009610192(0,api/* getMyDashboard */.H)undefined1057210658(0,react.useEffect)undefined1078610906(0,api/* getSpecialistFomoDashboard */.zk)undefined1097211088(0,api/* getCustomerFomoDashboard */.ML)undefined1121911293(0,react_jsx_runtime.jsx)undefined1241712491(0,react_jsx_runtime.jsx)undefined1249312570(link_default())undefined1277812854(0,react_jsx_runtime.jsxs)undefined1299013066(0,react_jsx_runtime.jsxs)undefined1320813282(0,react_jsx_runtime.jsx)undefined1341413500(0,taskLocale/* taskTitle */.Oj)undefined1359013664(0,react_jsx_runtime.jsx)undefined1393614012(0,react_jsx_runtime.jsxs)undefined1419414270(0,react_jsx_runtime.jsxs)undefined1482314899(0,react_jsx_runtime.jsxs)undefined1550915585(0,react_jsx_runtime.jsxs)undefined1573715811(0,react_jsx_runtime.jsx)undefined1628616362(0,react_jsx_runtime.jsxs)undefined1653516625(0,taskLocale/* formatPrice */.$g)undefined1714817224(0,react_jsx_runtime.jsxs)undefined1722617303(link_default())undefined1754217618(0,react_jsx_runtime.jsxs)undefined1776617842(0,react_jsx_runtime.jsxs)undefined1799618070(0,react_jsx_runtime.jsx)undefined1833118405(0,react_jsx_runtime.jsx)undefined1872518801(0,react_jsx_runtime.jsxs)undefined1896519041(0,react_jsx_runtime.jsxs)undefined1921319303(0,taskLocale/* formatPrice */.$g)undefined1948319557(0,react_jsx_runtime.jsx)undefined2016720243(0,react_jsx_runtime.jsxs)undefined2041720491(0,react_jsx_runtime.jsx)undefined2082720901(0,react_jsx_runtime.jsx)undefined2120021276(0,react_jsx_runtime.jsxs)undefined2162021694(0,react_jsx_runtime.jsx)undefined2202122095(0,react_jsx_runtime.jsx)undefined2236422440(0,react_jsx_runtime.jsxs)undefined2254722623(0,react_jsx_runtime.jsxs)undefined2276522839(0,react_jsx_runtime.jsx)undefined2303023104(0,react_jsx_runtime.jsx)undefined2310623183(link_default())undefined2350623580(0,react_jsx_runtime.jsx)undefined2378523861(0,react_jsx_runtime.jsxs)undefined2404924123(0,react_jsx_runtime.jsx)undefined2423624310(0,react_jsx_runtime.jsx)undefined2462624700(0,react_jsx_runtime.jsx)undefined2507725153(0,react_jsx_runtime.jsxs)undefined2529525371(0,react_jsx_runtime.jsxs)undefined2573425810(0,react_jsx_runtime.jsxs)undefined2629526371(0,react_jsx_runtime.jsxs)undefined2684826922(0,react_jsx_runtime.jsx)undefined2692427001(link_default())undefined2735727431(0,react_jsx_runtime.jsx)undefined2757227648(0,react_jsx_runtime.jsxs)undefined2781327889(0,react_jsx_runtime.jsxs)undefined2805228126(0,react_jsx_runtime.jsx)undefined2828328357(0,react_jsx_runtime.jsx)undefined2874428818(0,react_jsx_runtime.jsx)undefined2937729453(0,react_jsx_runtime.jsxs)undefined2956629642(0,react_jsx_runtime.jsxs)undefined3020130275(0,react_jsx_runtime.jsx)undefined3077730853(0,react_jsx_runtime.jsxs)undefined3100331079(0,react_jsx_runtime.jsxs)undefined3146631540(0,react_jsx_runtime.jsx)undefined3189831974(0,react_jsx_runtime.jsxs)undefined3197632053(link_default())undefined3230032376(0,react_jsx_runtime.jsxs)undefined3252732601(0,react_jsx_runtime.jsx)undefined3275232828(0,react_jsx_runtime.jsxs)undefined3323033304(0,react_jsx_runtime.jsx)undefined3357533649(0,react_jsx_runtime.jsx)undefined3405534131(0,react_jsx_runtime.jsxs)undefined3423634310(0,react_jsx_runtime.jsx)undefined3455934633(0,react_jsx_runtime.jsx)undefined3499135065(0,react_jsx_runtime.jsx)undefined3536535439(0,react_jsx_runtime.jsx)undefined3571235788(0,react_jsx_runtime.jsxs)undefined3591735993(0,react_jsx_runtime.jsxs)undefined3613036206(0,react_jsx_runtime.jsxs)undefined3631136387(0,react_jsx_runtime.jsxs)undefined3671736793(0,react_jsx_runtime.jsxs)undefined3740437480(0,react_jsx_runtime.jsxs)undefined3772837802(0,react_jsx_runtime.jsx)undefined3800238076(0,react_jsx_runtime.jsx)undefined3807838155(link_default())undefined3857938653(0,react_jsx_runtime.jsx)undefined3881638890(0,react_jsx_runtime.jsx)undefined3919639272(0,react_jsx_runtime.jsxs)undefined3937739453(0,react_jsx_runtime.jsxs)undefined3979339869(0,react_jsx_runtime.jsxs)undefined4045640530(0,react_jsx_runtime.jsx)undefined4070740781(0,react_jsx_runtime.jsx)undefined4109941173(0,react_jsx_runtime.jsx)undefined4129541371(0,react_jsx_runtime.jsxs)undefined4137341452react_jsx_runtime.Fragmentundefined4156941645(0,react_jsx_runtime.jsxs)undefined4175841834(0,react_jsx_runtime.jsxs)undefined4218742263(0,react_jsx_runtime.jsxs)undefined4288742961(0,react_jsx_runtime.jsx)undefined4313143207(0,react_jsx_runtime.jsxs)undefined4320943286(link_default())undefined4379743871(0,react_jsx_runtime.jsx)undefined4418144257(0,react_jsx_runtime.jsxs)undefined4450744581(0,react_jsx_runtime.jsx)undefined4501845092(0,react_jsx_runtime.jsx)undefined4589345967(0,react_jsx_runtime.jsx)undefined4647746553(0,react_jsx_runtime.jsxs)undefined4684446918(0,react_jsx_runtime.jsx)undefined4719647270(0,react_jsx_runtime.jsx)undefined4793348009(0,react_jsx_runtime.jsxs)undefined4812248198(0,react_jsx_runtime.jsxs)undefined4854948625(0,react_jsx_runtime.jsxs)undefined4927849354(0,react_jsx_runtime.jsxs)undefined4961449688(0,react_jsx_runtime.jsx)undefined4990149975(0,react_jsx_runtime.jsx)undefined4997750054(link_default())undefined5049950573(0,react_jsx_runtime.jsx)undefined5074450818(0,react_jsx_runtime.jsx)undefined5116251238(0,react_jsx_runtime.jsxs)undefined5135151427(0,react_jsx_runtime.jsxs)undefined5178851864(0,react_jsx_runtime.jsxs)undefined5249252566(0,react_jsx_runtime.jsx)undefined5275152825(0,react_jsx_runtime.jsx)undefined5316553241(0,react_jsx_runtime.jsxs)undefined5324353322react_jsx_runtime.Fragmentundefined5341353489(0,react_jsx_runtime.jsxs)undefined5349153568(link_default())undefined5389653972(0,react_jsx_runtime.jsxs)undefined5418354257(0,react_jsx_runtime.jsx)undefined5444854522(0,react_jsx_runtime.jsx)undefined5500255076(0,react_jsx_runtime.jsx)undefined5575255828(0,react_jsx_runtime.jsxs)undefined5597356047(0,react_jsx_runtime.jsx)undefined5639656470(0,react_jsx_runtime.jsx)undefined5700157075(0,react_jsx_runtime.jsx)undefined5749557569(0,react_jsx_runtime.jsx)undefined5800258078(0,react_jsx_runtime.jsxs)undefined5828858362(0,react_jsx_runtime.jsx)undefined5865958733(0,react_jsx_runtime.jsx)undefined6005260128(0,react_jsx_runtime.jsxs)undefined6036260436(0,react_jsx_runtime.jsx)undefined6083360907(0,react_jsx_runtime.jsx)undefined6136061436(0,react_jsx_runtime.jsxs)undefined6143861515(link_default())undefined<`react_jsx_runtimereact_jsx_runtime_namespaceObjectreact_jsx_runtime_defaultreact_namespaceObjectreact_defaultnavigationapp_dir_linklink_namespaceObjectlink_defaultauthcontext_localeapitaskLocaleDUsageMeter_namespaceObjectpage_namespaceObjectL;=:$ G8webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource+// ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { "default": () => (/* binding */ UserProfilePage) }); // EXTERNAL MODULE: ../../node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.js var react_jsx_runtime = __webpack_require__(78157); // EXTERNAL MODULE: ../../node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js var react = __webpack_require__(31768); // EXTERNAL MODULE: ../../node_modules/next/dist/api/navigation.js var navigation = __webpack_require__(71159); // EXTERNAL MODULE: ./src/context/locale.tsx var context_locale = __webpack_require__(96484); // EXTERNAL MODULE: ./src/lib/auth.ts var auth = __webpack_require__(13260); // EXTERNAL MODULE: ./src/lib/api.ts var api = __webpack_require__(91864); // EXTERNAL MODULE: ../../node_modules/next/dist/client/app-dir/link.js var app_dir_link = __webpack_require__(94496); var link_default = /*#__PURE__*/__webpack_require__.n(app_dir_link); ;// ./src/components/UpgradePrompt.tsx webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/CachedSource webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSourcefimport { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import Link from 'next/link'; const tierLabels = { free: 'Free', pro: 'Pro', ultimate: 'Ultimate' }; const tierColors = { free: 'bg-gray-50 border-gray-200 text-gray-700', pro: 'bg-blue-50 border-blue-200 text-blue-800', ultimate: 'bg-amber-50 border-amber-200 text-amber-800' }; const tierBtnColors = { free: 'bg-gray-600 hover:bg-gray-700 text-white', pro: 'bg-blue-600 hover:bg-blue-700 text-white', ultimate: 'bg-amber-500 hover:bg-amber-600 text-white' }; export function UpgradePrompt({ feature, requiredTier, variant = 'inline', t, className = '' }) { const tierLabel = tierLabels[requiredTier]; if (variant === 'banner') { return /*#__PURE__*/ _jsxs("div", { className: `flex items-center justify-between gap-3 rounded-xl border px-4 py-3 ${tierColors[requiredTier]} ${className}`, children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-2 min-w-0", children: [ /*#__PURE__*/ _jsx(LockIcon, { className: "w-4 h-4 shrink-0 opacity-60" }), /*#__PURE__*/ _jsxs("span", { className: "text-sm font-medium truncate", children: [ feature, " — ", t('upgrade.available_in', 'доступно в'), " ", /*#__PURE__*/ _jsx("b", { children: tierLabel }) ] }) ] }), /*#__PURE__*/ _jsx(Link, { href: `/pricing?highlight=${requiredTier}`, className: `shrink-0 text-xs font-semibold px-3 py-1.5 rounded-lg transition ${tierBtnColors[requiredTier]}`, children: t('upgrade.cta', 'Улучшить') }) ] }); } if (variant === 'block') { return /*#__PURE__*/ _jsxs("div", { className: `rounded-2xl border p-6 text-center ${tierColors[requiredTier]} ${className}`, children: [ /*#__PURE__*/ _jsx(LockIcon, { className: "w-8 h-8 mx-auto mb-3 opacity-40" }), /*#__PURE__*/ _jsx("p", { className: "font-semibold text-base mb-1", children: feature }), /*#__PURE__*/ _jsxs("p", { className: "text-sm opacity-70 mb-4", children: [ t('upgrade.available_in', 'Доступно в плане'), " ", /*#__PURE__*/ _jsx("b", { children: tierLabel }) ] }), /*#__PURE__*/ _jsx(Link, { href: `/pricing?highlight=${requiredTier}`, className: `inline-block text-sm font-semibold px-5 py-2 rounded-xl transition ${tierBtnColors[requiredTier]}`, children: t('upgrade.cta', 'Улучшить план') }) ] }); } // inline variant return /*#__PURE__*/ _jsxs("div", { className: `flex items-center gap-2 text-sm ${className}`, children: [ /*#__PURE__*/ _jsx(LockIcon, { className: "w-4 h-4 text-gray-400 shrink-0" }), /*#__PURE__*/ _jsxs("span", { className: "text-gray-500", children: [ t('upgrade.available_in', 'Доступно в'), " ", /*#__PURE__*/ _jsx("b", { className: "text-gray-700", children: tierLabel }), ".", ' ', /*#__PURE__*/ _jsx(Link, { href: `/pricing?highlight=${requiredTier}`, className: "text-blue-600 hover:underline", children: t('upgrade.cta', 'Улучшить') }) ] }) ] }); } function LockIcon({ className = '' }) { return /*#__PURE__*/ _jsx("svg", { viewBox: "0 0 20 20", fill: "currentColor", className: className, children: /*#__PURE__*/ _jsx("path", { fillRule: "evenodd", d: "M10 1a4.5 4.5 0 00-4.5 4.5V9H5a2 2 0 00-2 2v6a2 2 0 002 2h10a2 2 0 002-2v-6a2 2 0 00-2-2h-.5V5.5A4.5 4.5 0 0010 1zm3 8V5.5a3 3 0 10-6 0V9h6z", clipRule: "evenodd" }) }); } d>@\_17cffiNQSVr u ) , . 1 Mcf;>@C$'__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__6_5b2264656661756c74225d_directImport_asiSafe1__._buffersourcesizemapshash- const tierLabels = { free: 'Free', pro: 'Pro', ultimate: 'Ultimate' }; const tierColors = { free: 'bg-gray-50 border-gray-200 text-gray-700', pro: 'bg-blue-50 border-blue-200 text-blue-800', ultimate: 'bg-amber-50 border-amber-200 text-amber-800' }; const tierBtnColors = { free: 'bg-gray-600 hover:bg-gray-700 text-white', pro: 'bg-blue-600 hover:bg-blue-700 text-white', ultimate: 'bg-amber-500 hover:bg-amber-600 text-white' }; function UpgradePrompt({ feature, requiredTier, variant = 'inline', t, className = '' }) { const tierLabel = tierLabels[requiredTier]; if (variant === 'banner') { return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: `flex items-center justify-between gap-3 rounded-xl border px-4 py-3 ${tierColors[requiredTier]} ${className}`, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "flex items-center gap-2 min-w-0", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(LockIcon, { className: "w-4 h-4 shrink-0 opacity-60" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("span", { className: "text-sm font-medium truncate", children: [ feature, " — ", t('upgrade.available_in', 'доступно в'), " ", /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("b", { children: tierLabel }) ] }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__6_5b2264656661756c74225d_directImport_asiSafe1__._, { href: `/pricing?highlight=${requiredTier}`, className: `shrink-0 text-xs font-semibold px-3 py-1.5 rounded-lg transition ${tierBtnColors[requiredTier]}`, children: t('upgrade.cta', 'Улучшить') }) ] }); } if (variant === 'block') { return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: `rounded-2xl border p-6 text-center ${tierColors[requiredTier]} ${className}`, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(LockIcon, { className: "w-8 h-8 mx-auto mb-3 opacity-40" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { className: "font-semibold text-base mb-1", children: feature }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("p", { className: "text-sm opacity-70 mb-4", children: [ t('upgrade.available_in', 'Доступно в плане'), " ", /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("b", { children: tierLabel }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__6_5b2264656661756c74225d_directImport_asiSafe1__._, { href: `/pricing?highlight=${requiredTier}`, className: `inline-block text-sm font-semibold px-5 py-2 rounded-xl transition ${tierBtnColors[requiredTier]}`, children: t('upgrade.cta', 'Улучшить план') }) ] }); } // inline variant return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: `flex items-center gap-2 text-sm ${className}`, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(LockIcon, { className: "w-4 h-4 text-gray-400 shrink-0" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("span", { className: "text-gray-500", children: [ t('upgrade.available_in', 'Доступно в'), " ", /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("b", { className: "text-gray-700", children: tierLabel }), ".", ' ', /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__6_5b2264656661756c74225d_directImport_asiSafe1__._, { href: `/pricing?highlight=${requiredTier}`, className: "text-blue-600 hover:underline", children: t('upgrade.cta', 'Улучшить') }) ] }) ] }); } function LockIcon({ className = '' }) { return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("svg", { viewBox: "0 0 20 20", fill: "currentColor", className: className, children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("path", { fillRule: "evenodd", d: "M10 1a4.5 4.5 0 00-4.5 4.5V9H5a2 2 0 00-2 2v6a2 2 0 002 2h10a2 2 0 002-2v-6a2 2 0 00-2-2h-.5V5.5A4.5 4.5 0 0010 1zm3 8V5.5a3 3 0 10-6 0V9h6z", clipRule: "evenodd" }) }); } {"finalSource":false}mapbufferedMap ReplaceSourceRawSourcefimport { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import Link from 'next/link'; const tierLabels = { free: 'Free', pro: 'Pro', ultimate: 'Ultimate' }; const tierColors = { free: 'bg-gray-50 border-gray-200 text-gray-700', pro: 'bg-blue-50 border-blue-200 text-blue-800', ultimate: 'bg-amber-50 border-amber-200 text-amber-800' }; const tierBtnColors = { free: 'bg-gray-600 hover:bg-gray-700 text-white', pro: 'bg-blue-600 hover:bg-blue-700 text-white', ultimate: 'bg-amber-500 hover:bg-amber-600 text-white' }; export function UpgradePrompt({ feature, requiredTier, variant = 'inline', t, className = '' }) { const tierLabel = tierLabels[requiredTier]; if (variant === 'banner') { return /*#__PURE__*/ _jsxs("div", { className: `flex items-center justify-between gap-3 rounded-xl border px-4 py-3 ${tierColors[requiredTier]} ${className}`, children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-2 min-w-0", children: [ /*#__PURE__*/ _jsx(LockIcon, { className: "w-4 h-4 shrink-0 opacity-60" }), /*#__PURE__*/ _jsxs("span", { className: "text-sm font-medium truncate", children: [ feature, " — ", t('upgrade.available_in', 'доступно в'), " ", /*#__PURE__*/ _jsx("b", { children: tierLabel }) ] }) ] }), /*#__PURE__*/ _jsx(Link, { href: `/pricing?highlight=${requiredTier}`, className: `shrink-0 text-xs font-semibold px-3 py-1.5 rounded-lg transition ${tierBtnColors[requiredTier]}`, children: t('upgrade.cta', 'Улучшить') }) ] }); } if (variant === 'block') { return /*#__PURE__*/ _jsxs("div", { className: `rounded-2xl border p-6 text-center ${tierColors[requiredTier]} ${className}`, children: [ /*#__PURE__*/ _jsx(LockIcon, { className: "w-8 h-8 mx-auto mb-3 opacity-40" }), /*#__PURE__*/ _jsx("p", { className: "font-semibold text-base mb-1", children: feature }), /*#__PURE__*/ _jsxs("p", { className: "text-sm opacity-70 mb-4", children: [ t('upgrade.available_in', 'Доступно в плане'), " ", /*#__PURE__*/ _jsx("b", { children: tierLabel }) ] }), /*#__PURE__*/ _jsx(Link, { href: `/pricing?highlight=${requiredTier}`, className: `inline-block text-sm font-semibold px-5 py-2 rounded-xl transition ${tierBtnColors[requiredTier]}`, children: t('upgrade.cta', 'Улучшить план') }) ] }); } // inline variant return /*#__PURE__*/ _jsxs("div", { className: `flex items-center gap-2 text-sm ${className}`, children: [ /*#__PURE__*/ _jsx(LockIcon, { className: "w-4 h-4 text-gray-400 shrink-0" }), /*#__PURE__*/ _jsxs("span", { className: "text-gray-500", children: [ t('upgrade.available_in', 'Доступно в'), " ", /*#__PURE__*/ _jsx("b", { className: "text-gray-700", children: tierLabel }), ".", ' ', /*#__PURE__*/ _jsx(Link, { href: `/pricing?highlight=${requiredTier}`, className: "text-blue-600 hover:underline", children: t('upgrade.cta', 'Улучшить') }) ] }) ] }); } function LockIcon({ className = '' }) { return /*#__PURE__*/ _jsx("svg", { viewBox: "0 0 20 20", fill: "currentColor", className: className, children: /*#__PURE__*/ _jsx("path", { fillRule: "evenodd", d: "M10 1a4.5 4.5 0 00-4.5 4.5V9H5a2 2 0 00-2 2v6a2 2 0 002 2h10a2 2 0 002-2v-6a2 2 0 00-2-2h-.5V5.5A4.5 4.5 0 0010 1zm3 8V5.5a3 3 0 10-6 0V9h6z", clipRule: "evenodd" }) }); } #062undefined6492undefined561567undefined768772__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined972976__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined11231126__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined12751279__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined16381641__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined18701873__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined18751878__WEBPACK_MODULE_REFERENCE__6_5b2264656661756c74225d_directImport_asiSafe1__._undefined22472251__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined24182421__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined25502553__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined27132717__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined29542957__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined31133116__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined31183121__WEBPACK_MODULE_REFERENCE__6_5b2264656661756c74225d_directImport_asiSafe1__._undefined34843488__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined36123615__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined37313735__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined39393942__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined41554158__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined41604163__WEBPACK_MODULE_REFERENCE__6_5b2264656661756c74225d_directImport_asiSafe1__._undefined45084511__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined46444647__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined`_o"lQ[ N  c  O <"ln&r8K-/|(0,react_jsx_runtime.jsxs)(0,react_jsx_runtime.jsx)(link_default())< // EXTERNAL MODULE: ./src/lib/formatName.ts var formatName = __webpack_require__(48178); // EXTERNAL MODULE: ./src/lib/formatLastSeen.ts var formatLastSeen = __webpack_require__(49598); // EXTERNAL MODULE: ./src/components/PlanBadge.tsx var PlanBadge = __webpack_require__(25701); ;// ./src/app/users/[id]/page.tsx  webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSourceW/* __next_internal_client_entry_do_not_use__ default auto */ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { useState, useEffect } from 'react'; import { useParams, useRouter } from 'next/navigation'; import { useLocale } from '@/context/locale'; import { useSession } from '@/lib/auth'; import { getUserProfile, getUserReviews, getUserRating, getSpecialistAvailability, getSpecialistCards, getCategories, getLocations, getSpecialistFavorites, addSpecialistFavorite, removeSpecialistFavorite, getOrCreateDirectRoom, getCanMessage } from '@/lib/api'; import { UpgradePrompt } from '@/components/UpgradePrompt'; import { formatShortName, shortName } from '@/lib/formatName'; import { formatLastSeen } from '@/lib/formatLastSeen'; import { PlanBadge } from '@/components/PlanBadge'; const MONTHS_BY_LOCALE = { ru: [ 'Январь', 'Февраль', 'Март', 'Апрель', 'Май', 'Июнь', 'Июль', 'Август', 'Сентябрь', 'Октябрь', 'Ноябрь', 'Декабрь' ], en: [ 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' ], el: [ 'Ιανουάριος', 'Φεβρουάριος', 'Μάρτιος', 'Απρίλιος', 'Μάιος', 'Ιούνιος', 'Ιούλιος', 'Αύγουστος', 'Σεπτέμβριος', 'Οκτώβριος', 'Νοέμβριος', 'Δεκέμβριος' ] }; const WEEK_DAYS_BY_LOCALE = { ru: [ 'Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб', 'Вс' ], en: [ 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa', 'Su' ], el: [ 'Δε', 'Τρ', 'Τε', 'Πε', 'Πα', 'Σά', 'Κυ' ] }; export default function UserProfilePage() { const { id } = useParams(); const { t, locale } = useLocale(); const { data: session } = useSession(); const router = useRouter(); const [user, setUser] = useState(null); const [reviews, setReviews] = useState([]); const [rating, setRating] = useState(null); const [loading, setLoading] = useState(true); const [specialistCards, setSpecialistCards] = useState([]); const [catMap, setCatMap] = useState(new Map()); const [locMap, setLocMap] = useState(new Map()); const [isFavorite, setIsFavorite] = useState(false); const [favLoading, setFavLoading] = useState(false); const [msgLoading, setMsgLoading] = useState(false); const [canMsg, setCanMsg] = useState(null); // Availability const now = new Date(); const [availYear, setAvailYear] = useState(now.getFullYear()); const [availMonth, setAvailMonth] = useState(now.getMonth()); const [availMap, setAvailMap] = useState({}); const today = new Date().toISOString().slice(0, 10); const dateLocale = locale === 'ru' ? 'ru-RU' : locale === 'en' ? 'en-US' : 'el-GR'; process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (!id) return; Promise.all([ getUserProfile(id), getUserReviews(id), getUserRating(id), getCategories().catch(()=>[]), getLocations().catch(()=>[]) ]).then(([u, r, rt, cats, locs])=>{ setUser(u); setReviews(r); setRating(rt.avg); setCatMap(new Map(flattenTree(cats).map((c)=>[ c.slug, c ]))); setLocMap(new Map(flattenTree(locs).map((l)=>[ l.slug, l ]))); if (u.role === 'specialist' || u.role === 'admin') { getSpecialistCards(id).then(setSpecialistCards).catch(()=>{}); } }).catch(()=>{}).finally(()=>setLoading(false)); }, [ id ]); // Load favorite status when session available process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (!session || !id) return; getSpecialistFavorites().then((rows)=>setIsFavorite(rows.some((r)=>r.specialist?.id === id))).catch(()=>{}); // Check if current user can message this person const myId = session.user?.id; if (myId && myId !== id) { getCanMessage(id).then(setCanMsg).catch(()=>{}); } }, [ session, id ]); async function toggleFavorite() { if (!session) return; setFavLoading(true); try { if (isFavorite) { await removeSpecialistFavorite(id); setIsFavorite(false); } else { await addSpecialistFavorite(id); setIsFavorite(true); } } catch {} setFavLoading(false); } async function handleMessage() { if (!session) { router.push('/login'); return; } setMsgLoading(true); try { const { room } = await getOrCreateDirectRoom(id); router.push(`/chat?room=${room.id}`); } catch {} setMsgLoading(false); } process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (!id) return; const monthKey = `${availYear}-${String(availMonth + 1).padStart(2, '0')}`; getSpecialistAvailability(id, monthKey).then((rows)=>{ setAvailMap((prev)=>{ const next = { ...prev }; rows.forEach((r)=>{ next[r.date] = r.status; }); return next; }); }).catch(()=>{}); }, [ id, availYear, availMonth ]); if (loading) return /*#__PURE__*/ _jsx("div", { className: "text-center py-20 text-white", children: t('common.loading') }); if (!user) return /*#__PURE__*/ _jsx("div", { className: "text-center py-20 text-white/70", children: t('common.error') }); const initials = `${user.firstName?.[0] ?? ''}${user.lastName?.[0] ?? ''}`.toUpperCase() || user.name?.[0]?.toUpperCase() || '?'; const displayName = formatShortName(user.firstName, user.lastName, user.name); const roleColors = { specialist: 'bg-purple-100 text-purple-700', admin: 'bg-red-100 text-red-700', customer: 'bg-green-100 text-green-700' }; const roleLabels = { specialist: t('profile.role.specialist'), admin: t('profile.role.admin'), customer: t('profile.role.customer') }; return /*#__PURE__*/ _jsxs("div", { className: "max-w-3xl mx-auto px-4 py-10", children: [ /*#__PURE__*/ _jsxs("div", { className: "bg-white rounded-xl border border-gray-200 p-6 mb-6", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-start gap-5", children: [ /*#__PURE__*/ _jsx("div", { className: "w-20 h-20 rounded-full bg-blue-100 flex-shrink-0 flex items-center justify-center text-blue-700 text-2xl font-bold overflow-hidden border-2 border-gray-100", children: user.image ? /*#__PURE__*/ _jsx("img", { src: user.image, alt: displayName, className: "w-full h-full object-cover" }) : initials }), /*#__PURE__*/ _jsxs("div", { className: "flex-1 min-w-0", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-2 flex-wrap mb-1", children: [ /*#__PURE__*/ _jsx("h1", { className: "text-xl font-bold text-gray-900", children: displayName }), user.planTier && user.planTier !== 'free' && /*#__PURE__*/ _jsx(PlanBadge, { tier: user.planTier, verified: user.hasVerifiedBadge, size: "sm" }), user.hasVerifiedBadge && user.planTier === 'free' && /*#__PURE__*/ _jsx(PlanBadge, { tier: "free", verified: true, size: "sm" }), /*#__PURE__*/ _jsx("span", { className: `text-xs px-2 py-0.5 rounded-full font-medium ${roleColors[user.role] ?? 'bg-gray-100 text-gray-600'}`, children: roleLabels[user.role] ?? user.role }), Array.isArray(user.activeStatuses) && user.activeStatuses.includes('can_help_now') && /*#__PURE__*/ _jsxs("span", { className: "inline-flex items-center gap-1 text-xs font-medium text-green-700 bg-green-50 border border-green-200 px-2 py-0.5 rounded-full", children: [ /*#__PURE__*/ _jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-green-500 animate-pulse" }), t('status.can_help_now', 'Готов помочь') ] }), Array.isArray(user.activeStatuses) && user.activeStatuses.includes('need_help') && /*#__PURE__*/ _jsxs("span", { className: "inline-flex items-center gap-1 text-xs font-medium text-blue-700 bg-blue-50 border border-blue-200 px-2 py-0.5 rounded-full", children: [ /*#__PURE__*/ _jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-blue-500" }), t('status.need_help', 'Нужна помощь') ] }), session && session.user?.id !== id && /*#__PURE__*/ _jsxs("div", { className: "ml-auto flex items-center gap-2", children: [ canMsg?.allowed === false ? /*#__PURE__*/ _jsx(UpgradePrompt, { feature: t('chat.write_btn', 'Написать'), requiredTier: "pro", variant: "inline", t: t }) : /*#__PURE__*/ _jsxs("button", { onClick: handleMessage, disabled: msgLoading, className: "flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-sm font-medium bg-blue-50 text-blue-600 border border-blue-200 hover:bg-blue-100 transition disabled:opacity-50", children: [ /*#__PURE__*/ _jsx("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.8, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8 10h.01M12 10h.01M16 10h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z" }) }), /*#__PURE__*/ _jsx("span", { children: t('chat.write_btn') }) ] }), /*#__PURE__*/ _jsxs("button", { onClick: toggleFavorite, disabled: favLoading, title: isFavorite ? t('specialist.unfavorite') : t('specialist.favorite'), className: `flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-sm font-medium transition disabled:opacity-50 ${isFavorite ? 'bg-pink-50 text-pink-600 border border-pink-200 hover:bg-pink-100' : 'bg-gray-50 text-gray-600 border border-gray-200 hover:bg-gray-100'}`, children: [ /*#__PURE__*/ _jsx("span", { children: isFavorite ? '❤️' : '🤍' }), /*#__PURE__*/ _jsx("span", { children: isFavorite ? t('specialist.unfavorite') : t('specialist.favorite') }) ] }) ] }) ] }), rating && /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-1.5 mb-2", children: [ /*#__PURE__*/ _jsx("span", { className: "text-yellow-400 text-lg", children: "★" }), /*#__PURE__*/ _jsx("span", { className: "font-semibold text-gray-800", children: Number(rating).toFixed(1) }), /*#__PURE__*/ _jsxs("span", { className: "text-sm text-gray-400", children: [ "(", reviews.length, " ", t('profile.reviews').toLowerCase(), ")" ] }) ] }), /*#__PURE__*/ _jsxs("p", { className: "text-sm text-gray-400", children: [ t('profile.member_since'), " ", new Date(user.createdAt).toLocaleDateString(dateLocale), user.lastSeenAt && /*#__PURE__*/ _jsxs("span", { className: "ml-2", children: [ "\xb7 ", formatLastSeen(user.lastSeenAt, t) ] }) ] }) ] }) ] }), user.bio && /*#__PURE__*/ _jsx("p", { className: "mt-4 text-gray-700 text-sm leading-relaxed border-t border-gray-100 pt-4", children: user.bio }), user.phone && /*#__PURE__*/ _jsxs("div", { className: "mt-4 border-t border-gray-100 pt-4 flex items-center gap-2", children: [ /*#__PURE__*/ _jsx("svg", { className: "w-4 h-4 text-gray-400 shrink-0", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.8, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z" }) }), /*#__PURE__*/ _jsx("a", { href: `tel:${user.phone}`, className: "text-sm font-medium text-gray-700 hover:text-blue-600", children: user.phone }) ] }), user.personalSiteSlug && /*#__PURE__*/ _jsxs("div", { className: "mt-3 flex items-center gap-2", children: [ /*#__PURE__*/ _jsx("svg", { className: "w-4 h-4 text-gray-400 shrink-0", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.8, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14" }) }), /*#__PURE__*/ _jsxs("a", { href: `/site/${user.personalSiteSlug}`, target: "_blank", rel: "noopener noreferrer", className: "text-sm text-blue-600 hover:underline", children: [ "canhelp.gr/site/", user.personalSiteSlug ] }) ] }), user.languages && user.languages.length > 0 && /*#__PURE__*/ _jsxs("div", { className: "mt-4 border-t border-gray-100 pt-4", children: [ /*#__PURE__*/ _jsx("p", { className: "text-xs font-medium text-gray-500 mb-2 uppercase tracking-wide", children: t('profile.languages') }), /*#__PURE__*/ _jsx("div", { className: "flex flex-wrap gap-2", children: user.languages.map((code)=>{ const langMap = { el: { flag: '🇬🇷', label: 'Ελληνικά' }, en: { flag: '🇬🇧', label: 'English' }, ru: { flag: '🇷🇺', label: 'Русский' }, uk: { flag: '🇺🇦', label: 'Українська' }, de: { flag: '🇩🇪', label: 'Deutsch' }, fr: { flag: '🇫🇷', label: 'Français' }, it: { flag: '🇮🇹', label: 'Italiano' }, es: { flag: '🇪🇸', label: 'Español' }, ar: { flag: '🇸🇦', label: 'العربية' }, zh: { flag: '🇨🇳', label: '中文' } }; const lang = langMap[code]; if (!lang) return null; return /*#__PURE__*/ _jsxs("span", { className: "flex items-center gap-1.5 bg-indigo-50 text-indigo-700 text-sm px-3 py-1 rounded-full border border-indigo-100", children: [ /*#__PURE__*/ _jsx("span", { children: lang.flag }), /*#__PURE__*/ _jsx("span", { children: lang.label }) ] }, code); }) }) ] }), user.skills && user.skills.length > 0 && specialistCards.length === 0 && /*#__PURE__*/ _jsxs("div", { className: "mt-4 border-t border-gray-100 pt-4", children: [ /*#__PURE__*/ _jsx("p", { className: "text-xs font-medium text-gray-500 mb-2 uppercase tracking-wide", children: t('profile.skills.label') }), /*#__PURE__*/ _jsx("div", { className: "flex flex-wrap gap-2", children: user.skills.map((skill)=>/*#__PURE__*/ _jsx("span", { className: "bg-blue-50 text-blue-700 text-sm px-3 py-1 rounded-full", children: skill }, skill)) }) ] }), user.role === 'specialist' && user.specialistCategories && user.specialistCategories.length > 0 && specialistCards.length === 0 && /*#__PURE__*/ _jsxs("div", { className: "mt-4 border-t border-gray-100 pt-4", children: [ /*#__PURE__*/ _jsx("p", { className: "text-xs font-medium text-gray-500 mb-2 uppercase tracking-wide", children: t('user.categories') }), /*#__PURE__*/ _jsx("div", { className: "flex flex-wrap gap-2", children: user.specialistCategories.map((slug)=>/*#__PURE__*/ _jsx("span", { className: "bg-purple-50 text-purple-700 text-sm px-3 py-1 rounded-full", children: slug }, slug)) }) ] }), user.role === 'specialist' && user.specialistLocations && user.specialistLocations.length > 0 && specialistCards.length === 0 && /*#__PURE__*/ _jsxs("div", { className: "mt-4 border-t border-gray-100 pt-4", children: [ /*#__PURE__*/ _jsx("p", { className: "text-xs font-medium text-gray-500 mb-2 uppercase tracking-wide", children: t('user.work_area') }), /*#__PURE__*/ _jsx("div", { className: "flex flex-wrap gap-2", children: user.specialistLocations.map((slug)=>/*#__PURE__*/ _jsxs("span", { className: "bg-emerald-50 text-emerald-700 text-sm px-3 py-1 rounded-full", children: [ "\uD83D\uDCCD ", slug ] }, slug)) }) ] }) ] }), user.role === 'specialist' && /*#__PURE__*/ _jsxs("div", { className: "bg-white rounded-xl border border-gray-200 p-6 mb-6", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center justify-between mb-4", children: [ /*#__PURE__*/ _jsxs("h2", { className: "font-bold text-gray-900 text-lg", children: [ "\uD83D\uDCC5 ", t('nav.schedule') ] }), /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-3 text-xs text-gray-500", children: [ /*#__PURE__*/ _jsxs("span", { className: "flex items-center gap-1.5", children: [ /*#__PURE__*/ _jsx("span", { className: "w-3 h-3 rounded bg-emerald-200 border border-emerald-400 inline-block" }), t('schedule.available') ] }), /*#__PURE__*/ _jsxs("span", { className: "flex items-center gap-1.5", children: [ /*#__PURE__*/ _jsx("span", { className: "w-3 h-3 rounded bg-red-200 border border-red-400 inline-block" }), t('schedule.busy') ] }) ] }) ] }), /*#__PURE__*/ _jsx(ReadOnlyCalendar, { year: availYear, month: availMonth, availMap: availMap, today: today, onPrev: ()=>{ if (availMonth === 0) { setAvailYear((y)=>y - 1); setAvailMonth(11); } else setAvailMonth((m)=>m - 1); }, onNext: ()=>{ if (availMonth === 11) { setAvailYear((y)=>y + 1); setAvailMonth(0); } else setAvailMonth((m)=>m + 1); } }) ] }), (user.role === 'specialist' || user.role === 'admin') && specialistCards.length > 0 && /*#__PURE__*/ _jsxs("div", { className: "space-y-4 mb-6", children: [ /*#__PURE__*/ _jsx("h2", { className: "font-bold text-white text-lg", children: t('user.specialist_cards') }), specialistCards.map((card)=>/*#__PURE__*/ _jsx(PublicCardView, { card: card, locale: locale, catMap: catMap, locMap: locMap }, card.id)) ] }), /*#__PURE__*/ _jsxs("div", { className: "bg-white rounded-xl border border-gray-200 p-6", children: [ /*#__PURE__*/ _jsxs("h2", { className: "font-bold text-gray-900 text-lg mb-4", children: [ t('profile.reviews'), reviews.length > 0 && /*#__PURE__*/ _jsxs("span", { className: "text-gray-400 font-normal text-base ml-2", children: [ "(", reviews.length, ")" ] }) ] }), reviews.length === 0 ? /*#__PURE__*/ _jsx("p", { className: "text-gray-500 text-sm", children: t('profile.no_reviews') }) : /*#__PURE__*/ _jsx("div", { className: "space-y-4", children: reviews.map(({ review, author })=>/*#__PURE__*/ _jsx("div", { className: "border-b border-gray-50 pb-4 last:border-0 last:pb-0", children: /*#__PURE__*/ _jsxs("div", { className: "flex items-start gap-3", children: [ /*#__PURE__*/ _jsx("div", { className: "w-8 h-8 rounded-full bg-gray-100 flex-shrink-0 flex items-center justify-center text-gray-600 text-sm font-bold overflow-hidden", children: author?.image ? /*#__PURE__*/ _jsx("img", { src: author.image, alt: author.name, className: "w-full h-full object-cover" }) : author?.name?.[0]?.toUpperCase() ?? '?' }), /*#__PURE__*/ _jsxs("div", { className: "flex-1", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-2 mb-1", children: [ /*#__PURE__*/ _jsx("span", { className: "text-sm font-medium text-gray-800", children: shortName(author?.name) ?? '—' }), /*#__PURE__*/ _jsxs("span", { className: "text-yellow-400", children: [ '★'.repeat(review.rating), '☆'.repeat(5 - review.rating) ] }) ] }), review.comment && /*#__PURE__*/ _jsx("p", { className: "text-sm text-gray-600", children: review.comment }), /*#__PURE__*/ _jsx("p", { className: "text-xs text-gray-400 mt-1", children: new Date(review.createdAt).toLocaleDateString(dateLocale) }) ] }) ] }) }, review.id)) }) ] }) ] }); } function ReadOnlyCalendar({ year, month, availMap, today, onPrev, onNext }) { const { locale, t } = useLocale(); const weekDays = WEEK_DAYS_BY_LOCALE[locale] ?? WEEK_DAYS_BY_LOCALE.ru; const months = MONTHS_BY_LOCALE[locale] ?? MONTHS_BY_LOCALE.ru; const firstDay = new Date(year, month, 1); const startDow = (firstDay.getDay() + 6) % 7; const daysInMonth = new Date(year, month + 1, 0).getDate(); const prevMonthDays = new Date(year, month, 0).getDate(); const cells = []; for(let i = startDow - 1; i >= 0; i--){ cells.push({ day: prevMonthDays - i, cur: false, dateKey: '' }); } for(let d = 1; d <= daysInMonth; d++){ const dateKey = `${year}-${String(month + 1).padStart(2, '0')}-${String(d).padStart(2, '0')}`; cells.push({ day: d, cur: true, dateKey }); } const remainder = cells.length % 7; if (remainder !== 0) { for(let d = 1; d <= 7 - remainder; d++){ cells.push({ day: d, cur: false, dateKey: '' }); } } const monthPrefix = `${year}-${String(month + 1).padStart(2, '0')}`; const availCount = Object.entries(availMap).filter(([k, v])=>k.startsWith(monthPrefix) && k >= today && v === 'available').length; return /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center justify-between mb-3", children: [ /*#__PURE__*/ _jsx("button", { onClick: onPrev, className: "w-7 h-7 rounded-lg hover:bg-gray-100 flex items-center justify-center text-gray-500", children: "‹" }), /*#__PURE__*/ _jsxs("div", { className: "text-center", children: [ /*#__PURE__*/ _jsxs("span", { className: "font-medium text-gray-800 text-sm", children: [ months[month], " ", year ] }), availCount > 0 && /*#__PURE__*/ _jsxs("span", { className: "ml-2 text-xs text-emerald-600", children: [ availCount, " ", t('schedule.free_days') ] }) ] }), /*#__PURE__*/ _jsx("button", { onClick: onNext, className: "w-7 h-7 rounded-lg hover:bg-gray-100 flex items-center justify-center text-gray-500", children: "›" }) ] }), /*#__PURE__*/ _jsx("div", { className: "grid grid-cols-7 mb-1", children: weekDays.map((d)=>/*#__PURE__*/ _jsx("div", { className: "text-center text-xs text-gray-400 py-1", children: d }, d)) }), /*#__PURE__*/ _jsx("div", { className: "grid grid-cols-7 gap-0.5", children: cells.map((cell, idx)=>{ if (!cell.cur) { return /*#__PURE__*/ _jsx("div", { className: "h-9 flex items-center justify-center text-xs text-gray-200", children: cell.day }, `e-${idx}`); } const status = availMap[cell.dateKey]; const isPast = cell.dateKey < today; const isToday = cell.dateKey === today; let cls = 'h-9 flex items-center justify-center rounded-lg text-sm font-medium '; if (isPast) { cls += 'text-gray-200 '; } else if (status === 'available') { cls += 'bg-emerald-100 border border-emerald-300 text-emerald-700 '; } else if (status === 'busy') { cls += 'bg-red-100 border border-red-300 text-red-600 '; } else { cls += 'text-gray-500 '; } if (isToday) cls += 'ring-2 ring-blue-400 ring-offset-1 '; return /*#__PURE__*/ _jsx("div", { className: cls, children: cell.day }, cell.dateKey); }) }) ] }); } // ─── Public card view ───────────────────────────────────────────────────────── function flattenTree(nodes) { return nodes.flatMap((n)=>[ n, ...flattenTree(n.children ?? []) ]); } function PublicCardView({ card, locale, catMap, locMap }) { const [lightbox, setLightbox] = useState(null); const lbl = (ru, en, el)=>locale === 'ru' ? ru : locale === 'en' ? en : el; return /*#__PURE__*/ _jsxs("div", { className: "bg-white rounded-xl border border-gray-200 overflow-hidden", children: [ /*#__PURE__*/ _jsxs("div", { className: "px-5 py-4 border-b border-gray-100", children: [ /*#__PURE__*/ _jsx("h3", { className: "font-bold text-gray-900", children: card.title }), card.description && /*#__PURE__*/ _jsx("p", { className: "text-sm text-gray-600 mt-1", children: card.description }) ] }), /*#__PURE__*/ _jsxs("div", { className: "p-5 space-y-4", children: [ card.skills && card.skills.length > 0 && /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("p", { className: "text-xs font-semibold text-gray-500 uppercase tracking-wide mb-2", children: lbl('Навыки', 'Skills', 'Δεξιότητες') }), /*#__PURE__*/ _jsx("div", { className: "flex flex-wrap gap-2", children: card.skills.map((s)=>/*#__PURE__*/ _jsx("span", { className: "bg-blue-50 text-blue-700 text-sm px-3 py-1 rounded-full", children: s }, s)) }) ] }), card.categories && card.categories.length > 0 && /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("p", { className: "text-xs font-semibold text-gray-500 uppercase tracking-wide mb-2", children: lbl('Категории', 'Categories', 'Κατηγορίες') }), /*#__PURE__*/ _jsx("div", { className: "flex flex-wrap gap-2", children: card.categories.map((s)=>{ const cat = catMap.get(s); const name = cat ? cat.names?.[locale] || cat.names?.el || s : s; return /*#__PURE__*/ _jsxs("span", { className: "bg-purple-50 text-purple-700 text-sm px-3 py-1 rounded-full", children: [ cat?.icon ? `${cat.icon} ` : '', name ] }, s); }) }) ] }), card.locations && card.locations.length > 0 && /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("p", { className: "text-xs font-semibold text-gray-500 uppercase tracking-wide mb-2", children: lbl('Район работы', 'Work area', 'Περιοχή εργασίας') }), /*#__PURE__*/ _jsx("div", { className: "flex flex-wrap gap-2", children: card.locations.map((s)=>{ const loc = locMap.get(s); const name = loc ? loc.names?.[locale] || loc.names?.el || s : s; return /*#__PURE__*/ _jsxs("span", { className: "bg-emerald-50 text-emerald-700 text-sm px-3 py-1 rounded-full", children: [ "\uD83D\uDCCD ", name ] }, s); }) }) ] }), card.portfolio && card.portfolio.length > 0 && /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("p", { className: "text-xs font-semibold text-gray-500 uppercase tracking-wide mb-2", children: lbl('Галерея работ', 'Portfolio', 'Χαρτοφυλάκιο') }), /*#__PURE__*/ _jsx("div", { className: "grid grid-cols-2 sm:grid-cols-3 gap-3", children: card.portfolio.map((item)=>/*#__PURE__*/ _jsxs("button", { type: "button", onClick: ()=>setLightbox(item), className: "group relative rounded-xl overflow-hidden border border-gray-200 bg-gray-50 text-left", children: [ /*#__PURE__*/ _jsx("img", { src: item.imageUrl, alt: item.title ?? '', className: "w-full aspect-square object-cover group-hover:scale-105 transition-transform duration-200" }), item.title && /*#__PURE__*/ _jsx("div", { className: "px-2 py-1.5", children: /*#__PURE__*/ _jsx("p", { className: "text-xs font-medium text-gray-700 truncate", children: item.title }) }) ] }, item.id)) }) ] }) ] }), lightbox && /*#__PURE__*/ _jsx("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/80 px-4", onClick: ()=>setLightbox(null), children: /*#__PURE__*/ _jsxs("div", { className: "bg-white rounded-2xl overflow-hidden max-w-lg w-full shadow-2xl", onClick: (e)=>e.stopPropagation(), children: [ /*#__PURE__*/ _jsx("img", { src: lightbox.imageUrl, alt: lightbox.title ?? '', className: "w-full max-h-[60vh] object-contain bg-gray-900" }), (lightbox.title || lightbox.description) && /*#__PURE__*/ _jsxs("div", { className: "p-4", children: [ lightbox.title && /*#__PURE__*/ _jsx("p", { className: "font-semibold text-gray-800 mb-1", children: lightbox.title }), lightbox.description && /*#__PURE__*/ _jsx("p", { className: "text-sm text-gray-600", children: lightbox.description }) ] }), /*#__PURE__*/ _jsx("div", { className: "flex justify-end px-4 pb-4", children: /*#__PURE__*/ _jsx("button", { type: "button", onClick: ()=>setLightbox(null), className: "text-sm text-gray-500 hover:text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100", children: lbl('Закрыть', 'Close', 'Κλείσιμο') }) }) ] }) }) ] }); } @b={}_79=?y{#'?Gho_ < C j q   N U  * 1 h o > F _   NcJVUl*Wo^bm_q $'ae -!0!2!:!""""##%%&' ))R*U*,#,&-_)-+-7-..0022j5m56699::= ===>> @@BBDDEEG_GGGHHJJL LrMvMNNsOvOPPWS[SSTUU^^__``ebib c_cddddff4g7g6h9hhhjjekhkflilmmȥ˥ae`cux _ΰҰ+.OR³Ƴ_b59Ĺil #׿ڿHbe__WEBPACK_MODULE_REFERENCE__2_5b22757365506172616d73225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__3_5b227573654c6f63616c65225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__4_5b2275736553657373696f6e225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__2_5b22757365526f75746572225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__1_5b22757365456666656374225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__5_5b226765745573657250726f66696c65225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__5_5b226765745573657252657669657773225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__5_5b2267657455736572526174696e67225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__5_5b2267657443617465676f72696573225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__5_5b226765744c6f636174696f6e73225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__5_5b226765745370656369616c6973744361726473225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__5_5b226765745370656369616c6973744661766f7269746573225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__5_5b2267657443616e4d657373616765225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__5_5b2272656d6f76655370656369616c6973744661766f72697465225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__5_5b226164645370656369616c6973744661766f72697465225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__5_5b226765744f72437265617465446972656374526f6f6d225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__5_5b226765745370656369616c697374417661696c6162696c697479225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__8_5b22666f726d617453686f72744e616d65225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__10_5b22506c616e4261646765225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__7_5b225570677261646550726f6d7074225d_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__9_5b22666f726d61744c6173745365656e225d_call_directImport_asiSafe1__.___WEBPACK_MODULE_REFERENCE__8_5b2273686f72744e616d65225d_call_directImport_asiSafe1__._/* __next_internal_client_entry_do_not_use__ default auto */ const MONTHS_BY_LOCALE = { ru: [ 'Январь', 'Февраль', 'Март', 'Апрель', 'Май', 'Июнь', 'Июль', 'Август', 'Сентябрь', 'Октябрь', 'Ноябрь', 'Декабрь' ], en: [ 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' ], el: [ 'Ιανουάριος', 'Φεβρουάριος', 'Μάρτιος', 'Απρίλιος', 'Μάιος', 'Ιούνιος', 'Ιούλιος', 'Αύγουστος', 'Σεπτέμβριος', 'Οκτώβριος', 'Νοέμβριος', 'Δεκέμβριος' ] }; const WEEK_DAYS_BY_LOCALE = { ru: [ 'Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб', 'Вс' ], en: [ 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa', 'Su' ], el: [ 'Δε', 'Τρ', 'Τε', 'Πε', 'Πα', 'Σά', 'Κυ' ] }; function UserProfilePage() { const { id } = __WEBPACK_MODULE_REFERENCE__2_5b22757365506172616d73225d_call_directImport_asiSafe1__._(); const { t, locale } = __WEBPACK_MODULE_REFERENCE__3_5b227573654c6f63616c65225d_call_directImport_asiSafe1__._(); const { data: session } = __WEBPACK_MODULE_REFERENCE__4_5b2275736553657373696f6e225d_call_directImport_asiSafe1__._(); const router = __WEBPACK_MODULE_REFERENCE__2_5b22757365526f75746572225d_call_directImport_asiSafe1__._(); const [user, setUser] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(null); const [reviews, setReviews] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._([]); const [rating, setRating] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(null); const [loading, setLoading] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(true); const [specialistCards, setSpecialistCards] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._([]); const [catMap, setCatMap] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(new Map()); const [locMap, setLocMap] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(new Map()); const [isFavorite, setIsFavorite] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(false); const [favLoading, setFavLoading] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(false); const [msgLoading, setMsgLoading] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(false); const [canMsg, setCanMsg] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(null); // Availability const now = new Date(); const [availYear, setAvailYear] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(now.getFullYear()); const [availMonth, setAvailMonth] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(now.getMonth()); const [availMap, setAvailMap] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._({}); const today = new Date().toISOString().slice(0, 10); const dateLocale = locale === 'ru' ? 'ru-RU' : locale === 'en' ? 'en-US' : 'el-GR'; process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && __WEBPACK_MODULE_REFERENCE__1_5b22757365456666656374225d_call_directImport_asiSafe1__._(()=>{ if (!id) return; Promise.all([ __WEBPACK_MODULE_REFERENCE__5_5b226765745573657250726f66696c65225d_call_directImport_asiSafe1__._(id), __WEBPACK_MODULE_REFERENCE__5_5b226765745573657252657669657773225d_call_directImport_asiSafe1__._(id), __WEBPACK_MODULE_REFERENCE__5_5b2267657455736572526174696e67225d_call_directImport_asiSafe1__._(id), __WEBPACK_MODULE_REFERENCE__5_5b2267657443617465676f72696573225d_call_directImport_asiSafe1__._().catch(()=>[]), __WEBPACK_MODULE_REFERENCE__5_5b226765744c6f636174696f6e73225d_call_directImport_asiSafe1__._().catch(()=>[]) ]).then(([u, r, rt, cats, locs])=>{ setUser(u); setReviews(r); setRating(rt.avg); setCatMap(new Map(flattenTree(cats).map((c)=>[ c.slug, c ]))); setLocMap(new Map(flattenTree(locs).map((l)=>[ l.slug, l ]))); if (u.role === 'specialist' || u.role === 'admin') { __WEBPACK_MODULE_REFERENCE__5_5b226765745370656369616c6973744361726473225d_call_directImport_asiSafe1__._(id).then(setSpecialistCards).catch(()=>{}); } }).catch(()=>{}).finally(()=>setLoading(false)); }, [ id ]); // Load favorite status when session available process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && __WEBPACK_MODULE_REFERENCE__1_5b22757365456666656374225d_call_directImport_asiSafe1__._(()=>{ if (!session || !id) return; __WEBPACK_MODULE_REFERENCE__5_5b226765745370656369616c6973744661766f7269746573225d_call_directImport_asiSafe1__._().then((rows)=>setIsFavorite(rows.some((r)=>r.specialist?.id === id))).catch(()=>{}); // Check if current user can message this person const myId = session.user?.id; if (myId && myId !== id) { __WEBPACK_MODULE_REFERENCE__5_5b2267657443616e4d657373616765225d_call_directImport_asiSafe1__._(id).then(setCanMsg).catch(()=>{}); } }, [ session, id ]); async function toggleFavorite() { if (!session) return; setFavLoading(true); try { if (isFavorite) { await __WEBPACK_MODULE_REFERENCE__5_5b2272656d6f76655370656369616c6973744661766f72697465225d_call_directImport_asiSafe1__._(id); setIsFavorite(false); } else { await __WEBPACK_MODULE_REFERENCE__5_5b226164645370656369616c6973744661766f72697465225d_call_directImport_asiSafe1__._(id); setIsFavorite(true); } } catch {} setFavLoading(false); } async function handleMessage() { if (!session) { router.push('/login'); return; } setMsgLoading(true); try { const { room } = await __WEBPACK_MODULE_REFERENCE__5_5b226765744f72437265617465446972656374526f6f6d225d_call_directImport_asiSafe1__._(id); router.push(`/chat?room=${room.id}`); } catch {} setMsgLoading(false); } process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && __WEBPACK_MODULE_REFERENCE__1_5b22757365456666656374225d_call_directImport_asiSafe1__._(()=>{ if (!id) return; const monthKey = `${availYear}-${String(availMonth + 1).padStart(2, '0')}`; __WEBPACK_MODULE_REFERENCE__5_5b226765745370656369616c697374417661696c6162696c697479225d_call_directImport_asiSafe1__._(id, monthKey).then((rows)=>{ setAvailMap((prev)=>{ const next = { ...prev }; rows.forEach((r)=>{ next[r.date] = r.status; }); return next; }); }).catch(()=>{}); }, [ id, availYear, availMonth ]); if (loading) return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "text-center py-20 text-white", children: t('common.loading') }); if (!user) return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "text-center py-20 text-white/70", children: t('common.error') }); const initials = `${user.firstName?.[0] ?? ''}${user.lastName?.[0] ?? ''}`.toUpperCase() || user.name?.[0]?.toUpperCase() || '?'; const displayName = __WEBPACK_MODULE_REFERENCE__8_5b22666f726d617453686f72744e616d65225d_call_directImport_asiSafe1__._(user.firstName, user.lastName, user.name); const roleColors = { specialist: 'bg-purple-100 text-purple-700', admin: 'bg-red-100 text-red-700', customer: 'bg-green-100 text-green-700' }; const roleLabels = { specialist: t('profile.role.specialist'), admin: t('profile.role.admin'), customer: t('profile.role.customer') }; return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "max-w-3xl mx-auto px-4 py-10", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "bg-white rounded-xl border border-gray-200 p-6 mb-6", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "flex items-start gap-5", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "w-20 h-20 rounded-full bg-blue-100 flex-shrink-0 flex items-center justify-center text-blue-700 text-2xl font-bold overflow-hidden border-2 border-gray-100", children: user.image ? /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("img", { src: user.image, alt: displayName, className: "w-full h-full object-cover" }) : initials }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "flex-1 min-w-0", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "flex items-center gap-2 flex-wrap mb-1", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("h1", { className: "text-xl font-bold text-gray-900", children: displayName }), user.planTier && user.planTier !== 'free' && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__10_5b22506c616e4261646765225d_directImport_asiSafe1__._, { tier: user.planTier, verified: user.hasVerifiedBadge, size: "sm" }), user.hasVerifiedBadge && user.planTier === 'free' && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__10_5b22506c616e4261646765225d_directImport_asiSafe1__._, { tier: "free", verified: true, size: "sm" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: `text-xs px-2 py-0.5 rounded-full font-medium ${roleColors[user.role] ?? 'bg-gray-100 text-gray-600'}`, children: roleLabels[user.role] ?? user.role }), Array.isArray(user.activeStatuses) && user.activeStatuses.includes('can_help_now') && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("span", { className: "inline-flex items-center gap-1 text-xs font-medium text-green-700 bg-green-50 border border-green-200 px-2 py-0.5 rounded-full", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: "w-1.5 h-1.5 rounded-full bg-green-500 animate-pulse" }), t('status.can_help_now', 'Готов помочь') ] }), Array.isArray(user.activeStatuses) && user.activeStatuses.includes('need_help') && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("span", { className: "inline-flex items-center gap-1 text-xs font-medium text-blue-700 bg-blue-50 border border-blue-200 px-2 py-0.5 rounded-full", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: "w-1.5 h-1.5 rounded-full bg-blue-500" }), t('status.need_help', 'Нужна помощь') ] }), session && session.user?.id !== id && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "ml-auto flex items-center gap-2", children: [ canMsg?.allowed === false ? /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__7_5b225570677261646550726f6d7074225d_directImport_asiSafe1__._, { feature: t('chat.write_btn', 'Написать'), requiredTier: "pro", variant: "inline", t: t }) : /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("button", { onClick: handleMessage, disabled: msgLoading, className: "flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-sm font-medium bg-blue-50 text-blue-600 border border-blue-200 hover:bg-blue-100 transition disabled:opacity-50", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.8, children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8 10h.01M12 10h.01M16 10h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z" }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { children: t('chat.write_btn') }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("button", { onClick: toggleFavorite, disabled: favLoading, title: isFavorite ? t('specialist.unfavorite') : t('specialist.favorite'), className: `flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-sm font-medium transition disabled:opacity-50 ${isFavorite ? 'bg-pink-50 text-pink-600 border border-pink-200 hover:bg-pink-100' : 'bg-gray-50 text-gray-600 border border-gray-200 hover:bg-gray-100'}`, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { children: isFavorite ? '❤️' : '🤍' }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { children: isFavorite ? t('specialist.unfavorite') : t('specialist.favorite') }) ] }) ] }) ] }), rating && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "flex items-center gap-1.5 mb-2", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: "text-yellow-400 text-lg", children: "★" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: "font-semibold text-gray-800", children: Number(rating).toFixed(1) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("span", { className: "text-sm text-gray-400", children: [ "(", reviews.length, " ", t('profile.reviews').toLowerCase(), ")" ] }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("p", { className: "text-sm text-gray-400", children: [ t('profile.member_since'), " ", new Date(user.createdAt).toLocaleDateString(dateLocale), user.lastSeenAt && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("span", { className: "ml-2", children: [ "\xb7 ", __WEBPACK_MODULE_REFERENCE__9_5b22666f726d61744c6173745365656e225d_call_directImport_asiSafe1__._(user.lastSeenAt, t) ] }) ] }) ] }) ] }), user.bio && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { className: "mt-4 text-gray-700 text-sm leading-relaxed border-t border-gray-100 pt-4", children: user.bio }), user.phone && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "mt-4 border-t border-gray-100 pt-4 flex items-center gap-2", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("svg", { className: "w-4 h-4 text-gray-400 shrink-0", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.8, children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z" }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("a", { href: `tel:${user.phone}`, className: "text-sm font-medium text-gray-700 hover:text-blue-600", children: user.phone }) ] }), user.personalSiteSlug && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "mt-3 flex items-center gap-2", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("svg", { className: "w-4 h-4 text-gray-400 shrink-0", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.8, children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14" }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("a", { href: `/site/${user.personalSiteSlug}`, target: "_blank", rel: "noopener noreferrer", className: "text-sm text-blue-600 hover:underline", children: [ "canhelp.gr/site/", user.personalSiteSlug ] }) ] }), user.languages && user.languages.length > 0 && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "mt-4 border-t border-gray-100 pt-4", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { className: "text-xs font-medium text-gray-500 mb-2 uppercase tracking-wide", children: t('profile.languages') }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "flex flex-wrap gap-2", children: user.languages.map((code)=>{ const langMap = { el: { flag: '🇬🇷', label: 'Ελληνικά' }, en: { flag: '🇬🇧', label: 'English' }, ru: { flag: '🇷🇺', label: 'Русский' }, uk: { flag: '🇺🇦', label: 'Українська' }, de: { flag: '🇩🇪', label: 'Deutsch' }, fr: { flag: '🇫🇷', label: 'Français' }, it: { flag: '🇮🇹', label: 'Italiano' }, es: { flag: '🇪🇸', label: 'Español' }, ar: { flag: '🇸🇦', label: 'العربية' }, zh: { flag: '🇨🇳', label: '中文' } }; const lang = langMap[code]; if (!lang) return null; return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("span", { className: "flex items-center gap-1.5 bg-indigo-50 text-indigo-700 text-sm px-3 py-1 rounded-full border border-indigo-100", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { children: lang.flag }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { children: lang.label }) ] }, code); }) }) ] }), user.skills && user.skills.length > 0 && specialistCards.length === 0 && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "mt-4 border-t border-gray-100 pt-4", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { className: "text-xs font-medium text-gray-500 mb-2 uppercase tracking-wide", children: t('profile.skills.label') }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "flex flex-wrap gap-2", children: user.skills.map((skill)=>/*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: "bg-blue-50 text-blue-700 text-sm px-3 py-1 rounded-full", children: skill }, skill)) }) ] }), user.role === 'specialist' && user.specialistCategories && user.specialistCategories.length > 0 && specialistCards.length === 0 && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "mt-4 border-t border-gray-100 pt-4", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { className: "text-xs font-medium text-gray-500 mb-2 uppercase tracking-wide", children: t('user.categories') }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "flex flex-wrap gap-2", children: user.specialistCategories.map((slug)=>/*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: "bg-purple-50 text-purple-700 text-sm px-3 py-1 rounded-full", children: slug }, slug)) }) ] }), user.role === 'specialist' && user.specialistLocations && user.specialistLocations.length > 0 && specialistCards.length === 0 && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "mt-4 border-t border-gray-100 pt-4", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { className: "text-xs font-medium text-gray-500 mb-2 uppercase tracking-wide", children: t('user.work_area') }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "flex flex-wrap gap-2", children: user.specialistLocations.map((slug)=>/*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("span", { className: "bg-emerald-50 text-emerald-700 text-sm px-3 py-1 rounded-full", children: [ "\uD83D\uDCCD ", slug ] }, slug)) }) ] }) ] }), user.role === 'specialist' && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "bg-white rounded-xl border border-gray-200 p-6 mb-6", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "flex items-center justify-between mb-4", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("h2", { className: "font-bold text-gray-900 text-lg", children: [ "\uD83D\uDCC5 ", t('nav.schedule') ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "flex items-center gap-3 text-xs text-gray-500", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("span", { className: "flex items-center gap-1.5", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: "w-3 h-3 rounded bg-emerald-200 border border-emerald-400 inline-block" }), t('schedule.available') ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("span", { className: "flex items-center gap-1.5", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: "w-3 h-3 rounded bg-red-200 border border-red-400 inline-block" }), t('schedule.busy') ] }) ] }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(ReadOnlyCalendar, { year: availYear, month: availMonth, availMap: availMap, today: today, onPrev: ()=>{ if (availMonth === 0) { setAvailYear((y)=>y - 1); setAvailMonth(11); } else setAvailMonth((m)=>m - 1); }, onNext: ()=>{ if (availMonth === 11) { setAvailYear((y)=>y + 1); setAvailMonth(0); } else setAvailMonth((m)=>m + 1); } }) ] }), (user.role === 'specialist' || user.role === 'admin') && specialistCards.length > 0 && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "space-y-4 mb-6", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("h2", { className: "font-bold text-white text-lg", children: t('user.specialist_cards') }), specialistCards.map((card)=>/*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(PublicCardView, { card: card, locale: locale, catMap: catMap, locMap: locMap }, card.id)) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "bg-white rounded-xl border border-gray-200 p-6", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("h2", { className: "font-bold text-gray-900 text-lg mb-4", children: [ t('profile.reviews'), reviews.length > 0 && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("span", { className: "text-gray-400 font-normal text-base ml-2", children: [ "(", reviews.length, ")" ] }) ] }), reviews.length === 0 ? /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { className: "text-gray-500 text-sm", children: t('profile.no_reviews') }) : /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "space-y-4", children: reviews.map(({ review, author })=>/*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "border-b border-gray-50 pb-4 last:border-0 last:pb-0", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "flex items-start gap-3", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "w-8 h-8 rounded-full bg-gray-100 flex-shrink-0 flex items-center justify-center text-gray-600 text-sm font-bold overflow-hidden", children: author?.image ? /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("img", { src: author.image, alt: author.name, className: "w-full h-full object-cover" }) : author?.name?.[0]?.toUpperCase() ?? '?' }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "flex-1", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "flex items-center gap-2 mb-1", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: "text-sm font-medium text-gray-800", children: __WEBPACK_MODULE_REFERENCE__8_5b2273686f72744e616d65225d_call_directImport_asiSafe1__._(author?.name) ?? '—' }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("span", { className: "text-yellow-400", children: [ '★'.repeat(review.rating), '☆'.repeat(5 - review.rating) ] }) ] }), review.comment && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { className: "text-sm text-gray-600", children: review.comment }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { className: "text-xs text-gray-400 mt-1", children: new Date(review.createdAt).toLocaleDateString(dateLocale) }) ] }) ] }) }, review.id)) }) ] }) ] }); } function ReadOnlyCalendar({ year, month, availMap, today, onPrev, onNext }) { const { locale, t } = __WEBPACK_MODULE_REFERENCE__3_5b227573654c6f63616c65225d_call_directImport_asiSafe1__._(); const weekDays = WEEK_DAYS_BY_LOCALE[locale] ?? WEEK_DAYS_BY_LOCALE.ru; const months = MONTHS_BY_LOCALE[locale] ?? MONTHS_BY_LOCALE.ru; const firstDay = new Date(year, month, 1); const startDow = (firstDay.getDay() + 6) % 7; const daysInMonth = new Date(year, month + 1, 0).getDate(); const prevMonthDays = new Date(year, month, 0).getDate(); const cells = []; for(let i = startDow - 1; i >= 0; i--){ cells.push({ day: prevMonthDays - i, cur: false, dateKey: '' }); } for(let d = 1; d <= daysInMonth; d++){ const dateKey = `${year}-${String(month + 1).padStart(2, '0')}-${String(d).padStart(2, '0')}`; cells.push({ day: d, cur: true, dateKey }); } const remainder = cells.length % 7; if (remainder !== 0) { for(let d = 1; d <= 7 - remainder; d++){ cells.push({ day: d, cur: false, dateKey: '' }); } } const monthPrefix = `${year}-${String(month + 1).padStart(2, '0')}`; const availCount = Object.entries(availMap).filter(([k, v])=>k.startsWith(monthPrefix) && k >= today && v === 'available').length; return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "flex items-center justify-between mb-3", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { onClick: onPrev, className: "w-7 h-7 rounded-lg hover:bg-gray-100 flex items-center justify-center text-gray-500", children: "‹" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "text-center", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("span", { className: "font-medium text-gray-800 text-sm", children: [ months[month], " ", year ] }), availCount > 0 && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("span", { className: "ml-2 text-xs text-emerald-600", children: [ availCount, " ", t('schedule.free_days') ] }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { onClick: onNext, className: "w-7 h-7 rounded-lg hover:bg-gray-100 flex items-center justify-center text-gray-500", children: "›" }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "grid grid-cols-7 mb-1", children: weekDays.map((d)=>/*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "text-center text-xs text-gray-400 py-1", children: d }, d)) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "grid grid-cols-7 gap-0.5", children: cells.map((cell, idx)=>{ if (!cell.cur) { return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "h-9 flex items-center justify-center text-xs text-gray-200", children: cell.day }, `e-${idx}`); } const status = availMap[cell.dateKey]; const isPast = cell.dateKey < today; const isToday = cell.dateKey === today; let cls = 'h-9 flex items-center justify-center rounded-lg text-sm font-medium '; if (isPast) { cls += 'text-gray-200 '; } else if (status === 'available') { cls += 'bg-emerald-100 border border-emerald-300 text-emerald-700 '; } else if (status === 'busy') { cls += 'bg-red-100 border border-red-300 text-red-600 '; } else { cls += 'text-gray-500 '; } if (isToday) cls += 'ring-2 ring-blue-400 ring-offset-1 '; return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: cls, children: cell.day }, cell.dateKey); }) }) ] }); } // ─── Public card view ───────────────────────────────────────────────────────── function flattenTree(nodes) { return nodes.flatMap((n)=>[ n, ...flattenTree(n.children ?? []) ]); } function PublicCardView({ card, locale, catMap, locMap }) { const [lightbox, setLightbox] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(null); const lbl = (ru, en, el)=>locale === 'ru' ? ru : locale === 'en' ? en : el; return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "bg-white rounded-xl border border-gray-200 overflow-hidden", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "px-5 py-4 border-b border-gray-100", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("h3", { className: "font-bold text-gray-900", children: card.title }), card.description && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { className: "text-sm text-gray-600 mt-1", children: card.description }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "p-5 space-y-4", children: [ card.skills && card.skills.length > 0 && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { className: "text-xs font-semibold text-gray-500 uppercase tracking-wide mb-2", children: lbl('Навыки', 'Skills', 'Δεξιότητες') }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "flex flex-wrap gap-2", children: card.skills.map((s)=>/*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: "bg-blue-50 text-blue-700 text-sm px-3 py-1 rounded-full", children: s }, s)) }) ] }), card.categories && card.categories.length > 0 && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { className: "text-xs font-semibold text-gray-500 uppercase tracking-wide mb-2", children: lbl('Категории', 'Categories', 'Κατηγορίες') }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "flex flex-wrap gap-2", children: card.categories.map((s)=>{ const cat = catMap.get(s); const name = cat ? cat.names?.[locale] || cat.names?.el || s : s; return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("span", { className: "bg-purple-50 text-purple-700 text-sm px-3 py-1 rounded-full", children: [ cat?.icon ? `${cat.icon} ` : '', name ] }, s); }) }) ] }), card.locations && card.locations.length > 0 && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { className: "text-xs font-semibold text-gray-500 uppercase tracking-wide mb-2", children: lbl('Район работы', 'Work area', 'Περιοχή εργασίας') }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "flex flex-wrap gap-2", children: card.locations.map((s)=>{ const loc = locMap.get(s); const name = loc ? loc.names?.[locale] || loc.names?.el || s : s; return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("span", { className: "bg-emerald-50 text-emerald-700 text-sm px-3 py-1 rounded-full", children: [ "\uD83D\uDCCD ", name ] }, s); }) }) ] }), card.portfolio && card.portfolio.length > 0 && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { className: "text-xs font-semibold text-gray-500 uppercase tracking-wide mb-2", children: lbl('Галерея работ', 'Portfolio', 'Χαρτοφυλάκιο') }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "grid grid-cols-2 sm:grid-cols-3 gap-3", children: card.portfolio.map((item)=>/*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("button", { type: "button", onClick: ()=>setLightbox(item), className: "group relative rounded-xl overflow-hidden border border-gray-200 bg-gray-50 text-left", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("img", { src: item.imageUrl, alt: item.title ?? '', className: "w-full aspect-square object-cover group-hover:scale-105 transition-transform duration-200" }), item.title && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "px-2 py-1.5", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { className: "text-xs font-medium text-gray-700 truncate", children: item.title }) }) ] }, item.id)) }) ] }) ] }), lightbox && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/80 px-4", onClick: ()=>setLightbox(null), children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "bg-white rounded-2xl overflow-hidden max-w-lg w-full shadow-2xl", onClick: (e)=>e.stopPropagation(), children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("img", { src: lightbox.imageUrl, alt: lightbox.title ?? '', className: "w-full max-h-[60vh] object-contain bg-gray-900" }), (lightbox.title || lightbox.description) && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "p-4", children: [ lightbox.title && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { className: "font-semibold text-gray-800 mb-1", children: lightbox.title }), lightbox.description && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { className: "text-sm text-gray-600", children: lightbox.description }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "flex justify-end px-4 pb-4", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { type: "button", onClick: ()=>setLightbox(null), className: "text-sm text-gray-500 hover:text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100", children: lbl('Закрыть', 'Close', 'Κλείσιμο') }) }) ] }) }) ] }); }  W/* __next_internal_client_entry_do_not_use__ default auto */ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { useState, useEffect } from 'react'; import { useParams, useRouter } from 'next/navigation'; import { useLocale } from '@/context/locale'; import { useSession } from '@/lib/auth'; import { getUserProfile, getUserReviews, getUserRating, getSpecialistAvailability, getSpecialistCards, getCategories, getLocations, getSpecialistFavorites, addSpecialistFavorite, removeSpecialistFavorite, getOrCreateDirectRoom, getCanMessage } from '@/lib/api'; import { UpgradePrompt } from '@/components/UpgradePrompt'; import { formatShortName, shortName } from '@/lib/formatName'; import { formatLastSeen } from '@/lib/formatLastSeen'; import { PlanBadge } from '@/components/PlanBadge'; const MONTHS_BY_LOCALE = { ru: [ 'Январь', 'Февраль', 'Март', 'Апрель', 'Май', 'Июнь', 'Июль', 'Август', 'Сентябрь', 'Октябрь', 'Ноябрь', 'Декабрь' ], en: [ 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' ], el: [ 'Ιανουάριος', 'Φεβρουάριος', 'Μάρτιος', 'Απρίλιος', 'Μάιος', 'Ιούνιος', 'Ιούλιος', 'Αύγουστος', 'Σεπτέμβριος', 'Οκτώβριος', 'Νοέμβριος', 'Δεκέμβριος' ] }; const WEEK_DAYS_BY_LOCALE = { ru: [ 'Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб', 'Вс' ], en: [ 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa', 'Su' ], el: [ 'Δε', 'Τρ', 'Τε', 'Πε', 'Πα', 'Σά', 'Κυ' ] }; export default function UserProfilePage() { const { id } = useParams(); const { t, locale } = useLocale(); const { data: session } = useSession(); const router = useRouter(); const [user, setUser] = useState(null); const [reviews, setReviews] = useState([]); const [rating, setRating] = useState(null); const [loading, setLoading] = useState(true); const [specialistCards, setSpecialistCards] = useState([]); const [catMap, setCatMap] = useState(new Map()); const [locMap, setLocMap] = useState(new Map()); const [isFavorite, setIsFavorite] = useState(false); const [favLoading, setFavLoading] = useState(false); const [msgLoading, setMsgLoading] = useState(false); const [canMsg, setCanMsg] = useState(null); // Availability const now = new Date(); const [availYear, setAvailYear] = useState(now.getFullYear()); const [availMonth, setAvailMonth] = useState(now.getMonth()); const [availMap, setAvailMap] = useState({}); const today = new Date().toISOString().slice(0, 10); const dateLocale = locale === 'ru' ? 'ru-RU' : locale === 'en' ? 'en-US' : 'el-GR'; process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (!id) return; Promise.all([ getUserProfile(id), getUserReviews(id), getUserRating(id), getCategories().catch(()=>[]), getLocations().catch(()=>[]) ]).then(([u, r, rt, cats, locs])=>{ setUser(u); setReviews(r); setRating(rt.avg); setCatMap(new Map(flattenTree(cats).map((c)=>[ c.slug, c ]))); setLocMap(new Map(flattenTree(locs).map((l)=>[ l.slug, l ]))); if (u.role === 'specialist' || u.role === 'admin') { getSpecialistCards(id).then(setSpecialistCards).catch(()=>{}); } }).catch(()=>{}).finally(()=>setLoading(false)); }, [ id ]); // Load favorite status when session available process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (!session || !id) return; getSpecialistFavorites().then((rows)=>setIsFavorite(rows.some((r)=>r.specialist?.id === id))).catch(()=>{}); // Check if current user can message this person const myId = session.user?.id; if (myId && myId !== id) { getCanMessage(id).then(setCanMsg).catch(()=>{}); } }, [ session, id ]); async function toggleFavorite() { if (!session) return; setFavLoading(true); try { if (isFavorite) { await removeSpecialistFavorite(id); setIsFavorite(false); } else { await addSpecialistFavorite(id); setIsFavorite(true); } } catch {} setFavLoading(false); } async function handleMessage() { if (!session) { router.push('/login'); return; } setMsgLoading(true); try { const { room } = await getOrCreateDirectRoom(id); router.push(`/chat?room=${room.id}`); } catch {} setMsgLoading(false); } process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (!id) return; const monthKey = `${availYear}-${String(availMonth + 1).padStart(2, '0')}`; getSpecialistAvailability(id, monthKey).then((rows)=>{ setAvailMap((prev)=>{ const next = { ...prev }; rows.forEach((r)=>{ next[r.date] = r.status; }); return next; }); }).catch(()=>{}); }, [ id, availYear, availMonth ]); if (loading) return /*#__PURE__*/ _jsx("div", { className: "text-center py-20 text-white", children: t('common.loading') }); if (!user) return /*#__PURE__*/ _jsx("div", { className: "text-center py-20 text-white/70", children: t('common.error') }); const initials = `${user.firstName?.[0] ?? ''}${user.lastName?.[0] ?? ''}`.toUpperCase() || user.name?.[0]?.toUpperCase() || '?'; const displayName = formatShortName(user.firstName, user.lastName, user.name); const roleColors = { specialist: 'bg-purple-100 text-purple-700', admin: 'bg-red-100 text-red-700', customer: 'bg-green-100 text-green-700' }; const roleLabels = { specialist: t('profile.role.specialist'), admin: t('profile.role.admin'), customer: t('profile.role.customer') }; return /*#__PURE__*/ _jsxs("div", { className: "max-w-3xl mx-auto px-4 py-10", children: [ /*#__PURE__*/ _jsxs("div", { className: "bg-white rounded-xl border border-gray-200 p-6 mb-6", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-start gap-5", children: [ /*#__PURE__*/ _jsx("div", { className: "w-20 h-20 rounded-full bg-blue-100 flex-shrink-0 flex items-center justify-center text-blue-700 text-2xl font-bold overflow-hidden border-2 border-gray-100", children: user.image ? /*#__PURE__*/ _jsx("img", { src: user.image, alt: displayName, className: "w-full h-full object-cover" }) : initials }), /*#__PURE__*/ _jsxs("div", { className: "flex-1 min-w-0", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-2 flex-wrap mb-1", children: [ /*#__PURE__*/ _jsx("h1", { className: "text-xl font-bold text-gray-900", children: displayName }), user.planTier && user.planTier !== 'free' && /*#__PURE__*/ _jsx(PlanBadge, { tier: user.planTier, verified: user.hasVerifiedBadge, size: "sm" }), user.hasVerifiedBadge && user.planTier === 'free' && /*#__PURE__*/ _jsx(PlanBadge, { tier: "free", verified: true, size: "sm" }), /*#__PURE__*/ _jsx("span", { className: `text-xs px-2 py-0.5 rounded-full font-medium ${roleColors[user.role] ?? 'bg-gray-100 text-gray-600'}`, children: roleLabels[user.role] ?? user.role }), Array.isArray(user.activeStatuses) && user.activeStatuses.includes('can_help_now') && /*#__PURE__*/ _jsxs("span", { className: "inline-flex items-center gap-1 text-xs font-medium text-green-700 bg-green-50 border border-green-200 px-2 py-0.5 rounded-full", children: [ /*#__PURE__*/ _jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-green-500 animate-pulse" }), t('status.can_help_now', 'Готов помочь') ] }), Array.isArray(user.activeStatuses) && user.activeStatuses.includes('need_help') && /*#__PURE__*/ _jsxs("span", { className: "inline-flex items-center gap-1 text-xs font-medium text-blue-700 bg-blue-50 border border-blue-200 px-2 py-0.5 rounded-full", children: [ /*#__PURE__*/ _jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-blue-500" }), t('status.need_help', 'Нужна помощь') ] }), session && session.user?.id !== id && /*#__PURE__*/ _jsxs("div", { className: "ml-auto flex items-center gap-2", children: [ canMsg?.allowed === false ? /*#__PURE__*/ _jsx(UpgradePrompt, { feature: t('chat.write_btn', 'Написать'), requiredTier: "pro", variant: "inline", t: t }) : /*#__PURE__*/ _jsxs("button", { onClick: handleMessage, disabled: msgLoading, className: "flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-sm font-medium bg-blue-50 text-blue-600 border border-blue-200 hover:bg-blue-100 transition disabled:opacity-50", children: [ /*#__PURE__*/ _jsx("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.8, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8 10h.01M12 10h.01M16 10h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z" }) }), /*#__PURE__*/ _jsx("span", { children: t('chat.write_btn') }) ] }), /*#__PURE__*/ _jsxs("button", { onClick: toggleFavorite, disabled: favLoading, title: isFavorite ? t('specialist.unfavorite') : t('specialist.favorite'), className: `flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-sm font-medium transition disabled:opacity-50 ${isFavorite ? 'bg-pink-50 text-pink-600 border border-pink-200 hover:bg-pink-100' : 'bg-gray-50 text-gray-600 border border-gray-200 hover:bg-gray-100'}`, children: [ /*#__PURE__*/ _jsx("span", { children: isFavorite ? '❤️' : '🤍' }), /*#__PURE__*/ _jsx("span", { children: isFavorite ? t('specialist.unfavorite') : t('specialist.favorite') }) ] }) ] }) ] }), rating && /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-1.5 mb-2", children: [ /*#__PURE__*/ _jsx("span", { className: "text-yellow-400 text-lg", children: "★" }), /*#__PURE__*/ _jsx("span", { className: "font-semibold text-gray-800", children: Number(rating).toFixed(1) }), /*#__PURE__*/ _jsxs("span", { className: "text-sm text-gray-400", children: [ "(", reviews.length, " ", t('profile.reviews').toLowerCase(), ")" ] }) ] }), /*#__PURE__*/ _jsxs("p", { className: "text-sm text-gray-400", children: [ t('profile.member_since'), " ", new Date(user.createdAt).toLocaleDateString(dateLocale), user.lastSeenAt && /*#__PURE__*/ _jsxs("span", { className: "ml-2", children: [ "\xb7 ", formatLastSeen(user.lastSeenAt, t) ] }) ] }) ] }) ] }), user.bio && /*#__PURE__*/ _jsx("p", { className: "mt-4 text-gray-700 text-sm leading-relaxed border-t border-gray-100 pt-4", children: user.bio }), user.phone && /*#__PURE__*/ _jsxs("div", { className: "mt-4 border-t border-gray-100 pt-4 flex items-center gap-2", children: [ /*#__PURE__*/ _jsx("svg", { className: "w-4 h-4 text-gray-400 shrink-0", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.8, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z" }) }), /*#__PURE__*/ _jsx("a", { href: `tel:${user.phone}`, className: "text-sm font-medium text-gray-700 hover:text-blue-600", children: user.phone }) ] }), user.personalSiteSlug && /*#__PURE__*/ _jsxs("div", { className: "mt-3 flex items-center gap-2", children: [ /*#__PURE__*/ _jsx("svg", { className: "w-4 h-4 text-gray-400 shrink-0", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.8, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14" }) }), /*#__PURE__*/ _jsxs("a", { href: `/site/${user.personalSiteSlug}`, target: "_blank", rel: "noopener noreferrer", className: "text-sm text-blue-600 hover:underline", children: [ "canhelp.gr/site/", user.personalSiteSlug ] }) ] }), user.languages && user.languages.length > 0 && /*#__PURE__*/ _jsxs("div", { className: "mt-4 border-t border-gray-100 pt-4", children: [ /*#__PURE__*/ _jsx("p", { className: "text-xs font-medium text-gray-500 mb-2 uppercase tracking-wide", children: t('profile.languages') }), /*#__PURE__*/ _jsx("div", { className: "flex flex-wrap gap-2", children: user.languages.map((code)=>{ const langMap = { el: { flag: '🇬🇷', label: 'Ελληνικά' }, en: { flag: '🇬🇧', label: 'English' }, ru: { flag: '🇷🇺', label: 'Русский' }, uk: { flag: '🇺🇦', label: 'Українська' }, de: { flag: '🇩🇪', label: 'Deutsch' }, fr: { flag: '🇫🇷', label: 'Français' }, it: { flag: '🇮🇹', label: 'Italiano' }, es: { flag: '🇪🇸', label: 'Español' }, ar: { flag: '🇸🇦', label: 'العربية' }, zh: { flag: '🇨🇳', label: '中文' } }; const lang = langMap[code]; if (!lang) return null; return /*#__PURE__*/ _jsxs("span", { className: "flex items-center gap-1.5 bg-indigo-50 text-indigo-700 text-sm px-3 py-1 rounded-full border border-indigo-100", children: [ /*#__PURE__*/ _jsx("span", { children: lang.flag }), /*#__PURE__*/ _jsx("span", { children: lang.label }) ] }, code); }) }) ] }), user.skills && user.skills.length > 0 && specialistCards.length === 0 && /*#__PURE__*/ _jsxs("div", { className: "mt-4 border-t border-gray-100 pt-4", children: [ /*#__PURE__*/ _jsx("p", { className: "text-xs font-medium text-gray-500 mb-2 uppercase tracking-wide", children: t('profile.skills.label') }), /*#__PURE__*/ _jsx("div", { className: "flex flex-wrap gap-2", children: user.skills.map((skill)=>/*#__PURE__*/ _jsx("span", { className: "bg-blue-50 text-blue-700 text-sm px-3 py-1 rounded-full", children: skill }, skill)) }) ] }), user.role === 'specialist' && user.specialistCategories && user.specialistCategories.length > 0 && specialistCards.length === 0 && /*#__PURE__*/ _jsxs("div", { className: "mt-4 border-t border-gray-100 pt-4", children: [ /*#__PURE__*/ _jsx("p", { className: "text-xs font-medium text-gray-500 mb-2 uppercase tracking-wide", children: t('user.categories') }), /*#__PURE__*/ _jsx("div", { className: "flex flex-wrap gap-2", children: user.specialistCategories.map((slug)=>/*#__PURE__*/ _jsx("span", { className: "bg-purple-50 text-purple-700 text-sm px-3 py-1 rounded-full", children: slug }, slug)) }) ] }), user.role === 'specialist' && user.specialistLocations && user.specialistLocations.length > 0 && specialistCards.length === 0 && /*#__PURE__*/ _jsxs("div", { className: "mt-4 border-t border-gray-100 pt-4", children: [ /*#__PURE__*/ _jsx("p", { className: "text-xs font-medium text-gray-500 mb-2 uppercase tracking-wide", children: t('user.work_area') }), /*#__PURE__*/ _jsx("div", { className: "flex flex-wrap gap-2", children: user.specialistLocations.map((slug)=>/*#__PURE__*/ _jsxs("span", { className: "bg-emerald-50 text-emerald-700 text-sm px-3 py-1 rounded-full", children: [ "\uD83D\uDCCD ", slug ] }, slug)) }) ] }) ] }), user.role === 'specialist' && /*#__PURE__*/ _jsxs("div", { className: "bg-white rounded-xl border border-gray-200 p-6 mb-6", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center justify-between mb-4", children: [ /*#__PURE__*/ _jsxs("h2", { className: "font-bold text-gray-900 text-lg", children: [ "\uD83D\uDCC5 ", t('nav.schedule') ] }), /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-3 text-xs text-gray-500", children: [ /*#__PURE__*/ _jsxs("span", { className: "flex items-center gap-1.5", children: [ /*#__PURE__*/ _jsx("span", { className: "w-3 h-3 rounded bg-emerald-200 border border-emerald-400 inline-block" }), t('schedule.available') ] }), /*#__PURE__*/ _jsxs("span", { className: "flex items-center gap-1.5", children: [ /*#__PURE__*/ _jsx("span", { className: "w-3 h-3 rounded bg-red-200 border border-red-400 inline-block" }), t('schedule.busy') ] }) ] }) ] }), /*#__PURE__*/ _jsx(ReadOnlyCalendar, { year: availYear, month: availMonth, availMap: availMap, today: today, onPrev: ()=>{ if (availMonth === 0) { setAvailYear((y)=>y - 1); setAvailMonth(11); } else setAvailMonth((m)=>m - 1); }, onNext: ()=>{ if (availMonth === 11) { setAvailYear((y)=>y + 1); setAvailMonth(0); } else setAvailMonth((m)=>m + 1); } }) ] }), (user.role === 'specialist' || user.role === 'admin') && specialistCards.length > 0 && /*#__PURE__*/ _jsxs("div", { className: "space-y-4 mb-6", children: [ /*#__PURE__*/ _jsx("h2", { className: "font-bold text-white text-lg", children: t('user.specialist_cards') }), specialistCards.map((card)=>/*#__PURE__*/ _jsx(PublicCardView, { card: card, locale: locale, catMap: catMap, locMap: locMap }, card.id)) ] }), /*#__PURE__*/ _jsxs("div", { className: "bg-white rounded-xl border border-gray-200 p-6", children: [ /*#__PURE__*/ _jsxs("h2", { className: "font-bold text-gray-900 text-lg mb-4", children: [ t('profile.reviews'), reviews.length > 0 && /*#__PURE__*/ _jsxs("span", { className: "text-gray-400 font-normal text-base ml-2", children: [ "(", reviews.length, ")" ] }) ] }), reviews.length === 0 ? /*#__PURE__*/ _jsx("p", { className: "text-gray-500 text-sm", children: t('profile.no_reviews') }) : /*#__PURE__*/ _jsx("div", { className: "space-y-4", children: reviews.map(({ review, author })=>/*#__PURE__*/ _jsx("div", { className: "border-b border-gray-50 pb-4 last:border-0 last:pb-0", children: /*#__PURE__*/ _jsxs("div", { className: "flex items-start gap-3", children: [ /*#__PURE__*/ _jsx("div", { className: "w-8 h-8 rounded-full bg-gray-100 flex-shrink-0 flex items-center justify-center text-gray-600 text-sm font-bold overflow-hidden", children: author?.image ? /*#__PURE__*/ _jsx("img", { src: author.image, alt: author.name, className: "w-full h-full object-cover" }) : author?.name?.[0]?.toUpperCase() ?? '?' }), /*#__PURE__*/ _jsxs("div", { className: "flex-1", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-2 mb-1", children: [ /*#__PURE__*/ _jsx("span", { className: "text-sm font-medium text-gray-800", children: shortName(author?.name) ?? '—' }), /*#__PURE__*/ _jsxs("span", { className: "text-yellow-400", children: [ '★'.repeat(review.rating), '☆'.repeat(5 - review.rating) ] }) ] }), review.comment && /*#__PURE__*/ _jsx("p", { className: "text-sm text-gray-600", children: review.comment }), /*#__PURE__*/ _jsx("p", { className: "text-xs text-gray-400 mt-1", children: new Date(review.createdAt).toLocaleDateString(dateLocale) }) ] }) ] }) }, review.id)) }) ] }) ] }); } function ReadOnlyCalendar({ year, month, availMap, today, onPrev, onNext }) { const { locale, t } = useLocale(); const weekDays = WEEK_DAYS_BY_LOCALE[locale] ?? WEEK_DAYS_BY_LOCALE.ru; const months = MONTHS_BY_LOCALE[locale] ?? MONTHS_BY_LOCALE.ru; const firstDay = new Date(year, month, 1); const startDow = (firstDay.getDay() + 6) % 7; const daysInMonth = new Date(year, month + 1, 0).getDate(); const prevMonthDays = new Date(year, month, 0).getDate(); const cells = []; for(let i = startDow - 1; i >= 0; i--){ cells.push({ day: prevMonthDays - i, cur: false, dateKey: '' }); } for(let d = 1; d <= daysInMonth; d++){ const dateKey = `${year}-${String(month + 1).padStart(2, '0')}-${String(d).padStart(2, '0')}`; cells.push({ day: d, cur: true, dateKey }); } const remainder = cells.length % 7; if (remainder !== 0) { for(let d = 1; d <= 7 - remainder; d++){ cells.push({ day: d, cur: false, dateKey: '' }); } } const monthPrefix = `${year}-${String(month + 1).padStart(2, '0')}`; const availCount = Object.entries(availMap).filter(([k, v])=>k.startsWith(monthPrefix) && k >= today && v === 'available').length; return /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center justify-between mb-3", children: [ /*#__PURE__*/ _jsx("button", { onClick: onPrev, className: "w-7 h-7 rounded-lg hover:bg-gray-100 flex items-center justify-center text-gray-500", children: "‹" }), /*#__PURE__*/ _jsxs("div", { className: "text-center", children: [ /*#__PURE__*/ _jsxs("span", { className: "font-medium text-gray-800 text-sm", children: [ months[month], " ", year ] }), availCount > 0 && /*#__PURE__*/ _jsxs("span", { className: "ml-2 text-xs text-emerald-600", children: [ availCount, " ", t('schedule.free_days') ] }) ] }), /*#__PURE__*/ _jsx("button", { onClick: onNext, className: "w-7 h-7 rounded-lg hover:bg-gray-100 flex items-center justify-center text-gray-500", children: "›" }) ] }), /*#__PURE__*/ _jsx("div", { className: "grid grid-cols-7 mb-1", children: weekDays.map((d)=>/*#__PURE__*/ _jsx("div", { className: "text-center text-xs text-gray-400 py-1", children: d }, d)) }), /*#__PURE__*/ _jsx("div", { className: "grid grid-cols-7 gap-0.5", children: cells.map((cell, idx)=>{ if (!cell.cur) { return /*#__PURE__*/ _jsx("div", { className: "h-9 flex items-center justify-center text-xs text-gray-200", children: cell.day }, `e-${idx}`); } const status = availMap[cell.dateKey]; const isPast = cell.dateKey < today; const isToday = cell.dateKey === today; let cls = 'h-9 flex items-center justify-center rounded-lg text-sm font-medium '; if (isPast) { cls += 'text-gray-200 '; } else if (status === 'available') { cls += 'bg-emerald-100 border border-emerald-300 text-emerald-700 '; } else if (status === 'busy') { cls += 'bg-red-100 border border-red-300 text-red-600 '; } else { cls += 'text-gray-500 '; } if (isToday) cls += 'ring-2 ring-blue-400 ring-offset-1 '; return /*#__PURE__*/ _jsx("div", { className: cls, children: cell.day }, cell.dateKey); }) }) ] }); } // ─── Public card view ───────────────────────────────────────────────────────── function flattenTree(nodes) { return nodes.flatMap((n)=>[ n, ...flattenTree(n.children ?? []) ]); } function PublicCardView({ card, locale, catMap, locMap }) { const [lightbox, setLightbox] = useState(null); const lbl = (ru, en, el)=>locale === 'ru' ? ru : locale === 'en' ? en : el; return /*#__PURE__*/ _jsxs("div", { className: "bg-white rounded-xl border border-gray-200 overflow-hidden", children: [ /*#__PURE__*/ _jsxs("div", { className: "px-5 py-4 border-b border-gray-100", children: [ /*#__PURE__*/ _jsx("h3", { className: "font-bold text-gray-900", children: card.title }), card.description && /*#__PURE__*/ _jsx("p", { className: "text-sm text-gray-600 mt-1", children: card.description }) ] }), /*#__PURE__*/ _jsxs("div", { className: "p-5 space-y-4", children: [ card.skills && card.skills.length > 0 && /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("p", { className: "text-xs font-semibold text-gray-500 uppercase tracking-wide mb-2", children: lbl('Навыки', 'Skills', 'Δεξιότητες') }), /*#__PURE__*/ _jsx("div", { className: "flex flex-wrap gap-2", children: card.skills.map((s)=>/*#__PURE__*/ _jsx("span", { className: "bg-blue-50 text-blue-700 text-sm px-3 py-1 rounded-full", children: s }, s)) }) ] }), card.categories && card.categories.length > 0 && /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("p", { className: "text-xs font-semibold text-gray-500 uppercase tracking-wide mb-2", children: lbl('Категории', 'Categories', 'Κατηγορίες') }), /*#__PURE__*/ _jsx("div", { className: "flex flex-wrap gap-2", children: card.categories.map((s)=>{ const cat = catMap.get(s); const name = cat ? cat.names?.[locale] || cat.names?.el || s : s; return /*#__PURE__*/ _jsxs("span", { className: "bg-purple-50 text-purple-700 text-sm px-3 py-1 rounded-full", children: [ cat?.icon ? `${cat.icon} ` : '', name ] }, s); }) }) ] }), card.locations && card.locations.length > 0 && /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("p", { className: "text-xs font-semibold text-gray-500 uppercase tracking-wide mb-2", children: lbl('Район работы', 'Work area', 'Περιοχή εργασίας') }), /*#__PURE__*/ _jsx("div", { className: "flex flex-wrap gap-2", children: card.locations.map((s)=>{ const loc = locMap.get(s); const name = loc ? loc.names?.[locale] || loc.names?.el || s : s; return /*#__PURE__*/ _jsxs("span", { className: "bg-emerald-50 text-emerald-700 text-sm px-3 py-1 rounded-full", children: [ "\uD83D\uDCCD ", name ] }, s); }) }) ] }), card.portfolio && card.portfolio.length > 0 && /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("p", { className: "text-xs font-semibold text-gray-500 uppercase tracking-wide mb-2", children: lbl('Галерея работ', 'Portfolio', 'Χαρτοφυλάκιο') }), /*#__PURE__*/ _jsx("div", { className: "grid grid-cols-2 sm:grid-cols-3 gap-3", children: card.portfolio.map((item)=>/*#__PURE__*/ _jsxs("button", { type: "button", onClick: ()=>setLightbox(item), className: "group relative rounded-xl overflow-hidden border border-gray-200 bg-gray-50 text-left", children: [ /*#__PURE__*/ _jsx("img", { src: item.imageUrl, alt: item.title ?? '', className: "w-full aspect-square object-cover group-hover:scale-105 transition-transform duration-200" }), item.title && /*#__PURE__*/ _jsx("div", { className: "px-2 py-1.5", children: /*#__PURE__*/ _jsx("p", { className: "text-xs font-medium text-gray-700 truncate", children: item.title }) }) ] }, item.id)) }) ] }) ] }), lightbox && /*#__PURE__*/ _jsx("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/80 px-4", onClick: ()=>setLightbox(null), children: /*#__PURE__*/ _jsxs("div", { className: "bg-white rounded-2xl overflow-hidden max-w-lg w-full shadow-2xl", onClick: (e)=>e.stopPropagation(), children: [ /*#__PURE__*/ _jsx("img", { src: lightbox.imageUrl, alt: lightbox.title ?? '', className: "w-full max-h-[60vh] object-contain bg-gray-900" }), (lightbox.title || lightbox.description) && /*#__PURE__*/ _jsxs("div", { className: "p-4", children: [ lightbox.title && /*#__PURE__*/ _jsx("p", { className: "font-semibold text-gray-800 mb-1", children: lightbox.title }), lightbox.description && /*#__PURE__*/ _jsx("p", { className: "text-sm text-gray-600", children: lightbox.description }) ] }), /*#__PURE__*/ _jsx("div", { className: "flex justify-end px-4 pb-4", children: /*#__PURE__*/ _jsx("button", { type: "button", onClick: ()=>setLightbox(null), className: "text-sm text-gray-500 hover:text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100", children: lbl('Закрыть', 'Close', 'Κλείσιμο') }) }) ] }) }) ] }); } #B61123undefined125168undefined170224undefined226270undefined272311undefined313573undefined575633undefined635696undefined698751undefined753803undefined19331947undefined19962004__WEBPACK_MODULE_REFERENCE__2_5b22757365506172616d73225d_call_directImport_asiSafe1__._undefined20352043__WEBPACK_MODULE_REFERENCE__3_5b227573654c6f63616c65225d_call_directImport_asiSafe1__._undefined20782087__WEBPACK_MODULE_REFERENCE__4_5b2275736553657373696f6e225d_call_directImport_asiSafe1__._undefined21112119__WEBPACK_MODULE_REFERENCE__2_5b22757365526f75746572225d_call_directImport_asiSafe1__._undefined21522159__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined22022209__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined22482255__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined22982305__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined23642371__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined24102417__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined24632470__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined25242531__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined25812588__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined26382645__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined26872694__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined27892796__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined28582865__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined29202927__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined31343142__WEBPACK_MODULE_REFERENCE__1_5b22757365456666656374225d_call_directImport_asiSafe1__._undefined32093222__WEBPACK_MODULE_REFERENCE__5_5b226765745573657250726f66696c65225d_call_directImport_asiSafe1__._undefined32413254__WEBPACK_MODULE_REFERENCE__5_5b226765745573657252657669657773225d_call_directImport_asiSafe1__._undefined32733285__WEBPACK_MODULE_REFERENCE__5_5b2267657455736572526174696e67225d_call_directImport_asiSafe1__._undefined33043316__WEBPACK_MODULE_REFERENCE__5_5b2267657443617465676f72696573225d_call_directImport_asiSafe1__._undefined33473358__WEBPACK_MODULE_REFERENCE__5_5b226765744c6f636174696f6e73225d_call_directImport_asiSafe1__._undefined38453862__WEBPACK_MODULE_REFERENCE__5_5b226765745370656369616c6973744361726473225d_call_directImport_asiSafe1__._undefined41134121__WEBPACK_MODULE_REFERENCE__1_5b22757365456666656374225d_call_directImport_asiSafe1__._undefined41744195__WEBPACK_MODULE_REFERENCE__5_5b226765745370656369616c6973744661766f7269746573225d_call_directImport_asiSafe1__._undefined44264438__WEBPACK_MODULE_REFERENCE__5_5b2267657443616e4d657373616765225d_call_directImport_asiSafe1__._undefined46934716__WEBPACK_MODULE_REFERENCE__5_5b2272656d6f76655370656369616c6973744661766f72697465225d_call_directImport_asiSafe1__._undefined48044824__WEBPACK_MODULE_REFERENCE__5_5b226164645370656369616c6973744661766f72697465225d_call_directImport_asiSafe1__._undefined51425162__WEBPACK_MODULE_REFERENCE__5_5b226765744f72437265617465446972656374526f6f6d225d_call_directImport_asiSafe1__._undefined53305338__WEBPACK_MODULE_REFERENCE__1_5b22757365456666656374225d_call_directImport_asiSafe1__._undefined54635487__WEBPACK_MODULE_REFERENCE__5_5b226765745370656369616c697374417661696c6162696c697479225d_call_directImport_asiSafe1__._undefined59075910__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined60546057__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined63246338__WEBPACK_MODULE_REFERENCE__8_5b22666f726d617453686f72744e616d65225d_call_directImport_asiSafe1__._undefined67506754__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined68626866__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined70217025__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined71757178__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined74607463__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined77777781__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined79477951__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined81658168__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined84938496__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined84988506__WEBPACK_MODULE_REFERENCE__10_5b22506c616e4261646765225d_directImport_asiSafe1__._undefined88798882__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined88848892__WEBPACK_MODULE_REFERENCE__10_5b22506c616e4261646765225d_directImport_asiSafe1__._undefined91889191__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined96519655__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined99829985__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1050610510__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1083410837__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1129511299__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1155811561__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1156311575__WEBPACK_MODULE_REFERENCE__7_5b225570677261646550726f6d7074225d_directImport_asiSafe1__._undefined1196211966__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1251612519__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1303813041__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1367413677__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1402614030__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1480014803__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1505215055__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1562315627__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1583315836__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1610216105__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1639716401__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1711217116__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1755117555__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1780717820__WEBPACK_MODULE_REFERENCE__9_5b22666f726d61744c6173745365656e225d_call_directImport_asiSafe1__._undefined1818118184__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1841918423__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1860918612__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1896218965__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1946219465__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1982619830__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1998619989__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2033920342__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2070220706__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2133521339__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2150121504__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2176121764__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2426724271__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2455824561__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2474724750__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2518925193__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2535525358__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2561825621__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2578025783__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2625426258__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2642026423__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2667826681__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2685326856__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2732727331__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2749327496__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2775027753__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2792427928__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2847628480__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2863528639__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2880528809__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2915629160__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2935729361__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2956329566__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2995729961__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3016330166__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3064230645__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3157831582__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3170031703__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3192731930__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3221832222__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3237232376__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3261132615__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3306333066__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3323233235__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3337633379__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3354533549__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3373533738__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3401934022__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3444134445__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3463934643__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3488334886__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3507635084__WEBPACK_MODULE_REFERENCE__8_5b2273686f72744e616d65225d_call_directImport_asiSafe1__._undefined3523735241__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3590735910__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3619836201__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3685936867__WEBPACK_MODULE_REFERENCE__3_5b227573654c6f63616c65225d_call_directImport_asiSafe1__._undefined3816238166__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3822338227__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3836938372__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3864538649__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3878838792__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3918739191__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3962139624__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3992239925__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4004640049__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4024240245__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4044440447__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4153241535__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4203542042__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined4215642160__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4229842302__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4244042443__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4263842641__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4284942853__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4301143015__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4310443107__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4338143384__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4353943542__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4392343927__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4401644019__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4430044303__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4467244676__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4526245266__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4535545358__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4564745650__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4601846022__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4659446598__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4668746690__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4697646979__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4715747161__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4755347556__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4797747980__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4813748140__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4867248675__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4887348877__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4911149114__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4943049434__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4959549598__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4985749860__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5013950142__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5027450277__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined_5T%=3- 7 C  O ! _  f Y,?-p)^L_sg !"#r##Y$$;%%&&#(o()a)7**+,,d,-#.%._w.//12H3355+7u7?99:::3;<=(?r?yAA (/* binding */ UserProfilePage) }); // EXTERNAL MODULE: ../../node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.js var react_jsx_runtime = __webpack_require__(78157); // EXTERNAL MODULE: ../../node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js var react = __webpack_require__(31768); // EXTERNAL MODULE: ../../node_modules/next/dist/api/navigation.js var navigation = __webpack_require__(71159); // EXTERNAL MODULE: ./src/context/locale.tsx var context_locale = __webpack_require__(96484); // EXTERNAL MODULE: ./src/lib/auth.ts var auth = __webpack_require__(13260); // EXTERNAL MODULE: ./src/lib/api.ts var api = __webpack_require__(91864); // EXTERNAL MODULE: ../../node_modules/next/dist/client/app-dir/link.js var app_dir_link = __webpack_require__(94496); var link_default = /*#__PURE__*/__webpack_require__.n(app_dir_link); ;// ./src/components/UpgradePrompt.tsx const tierLabels = { free: 'Free', pro: 'Pro', ultimate: 'Ultimate' }; const tierColors = { free: 'bg-gray-50 border-gray-200 text-gray-700', pro: 'bg-blue-50 border-blue-200 text-blue-800', ultimate: 'bg-amber-50 border-amber-200 text-amber-800' }; const tierBtnColors = { free: 'bg-gray-600 hover:bg-gray-700 text-white', pro: 'bg-blue-600 hover:bg-blue-700 text-white', ultimate: 'bg-amber-500 hover:bg-amber-600 text-white' }; function UpgradePrompt({ feature, requiredTier, variant = 'inline', t, className = '' }) { const tierLabel = tierLabels[requiredTier]; if (variant === 'banner') { return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: `flex items-center justify-between gap-3 rounded-xl border px-4 py-3 ${tierColors[requiredTier]} ${className}`, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2 min-w-0", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)(LockIcon, { className: "w-4 h-4 shrink-0 opacity-60" }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("span", { className: "text-sm font-medium truncate", children: [ feature, " — ", t('upgrade.available_in', 'доступно в'), " ", /*#__PURE__*/ (0,react_jsx_runtime.jsx)("b", { children: tierLabel }) ] }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)((link_default()), { href: `/pricing?highlight=${requiredTier}`, className: `shrink-0 text-xs font-semibold px-3 py-1.5 rounded-lg transition ${tierBtnColors[requiredTier]}`, children: t('upgrade.cta', 'Улучшить') }) ] }); } if (variant === 'block') { return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: `rounded-2xl border p-6 text-center ${tierColors[requiredTier]} ${className}`, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)(LockIcon, { className: "w-8 h-8 mx-auto mb-3 opacity-40" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "font-semibold text-base mb-1", children: feature }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("p", { className: "text-sm opacity-70 mb-4", children: [ t('upgrade.available_in', 'Доступно в плане'), " ", /*#__PURE__*/ (0,react_jsx_runtime.jsx)("b", { children: tierLabel }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)((link_default()), { href: `/pricing?highlight=${requiredTier}`, className: `inline-block text-sm font-semibold px-5 py-2 rounded-xl transition ${tierBtnColors[requiredTier]}`, children: t('upgrade.cta', 'Улучшить план') }) ] }); } // inline variant return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: `flex items-center gap-2 text-sm ${className}`, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)(LockIcon, { className: "w-4 h-4 text-gray-400 shrink-0" }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("span", { className: "text-gray-500", children: [ t('upgrade.available_in', 'Доступно в'), " ", /*#__PURE__*/ (0,react_jsx_runtime.jsx)("b", { className: "text-gray-700", children: tierLabel }), ".", ' ', /*#__PURE__*/ (0,react_jsx_runtime.jsx)((link_default()), { href: `/pricing?highlight=${requiredTier}`, className: "text-blue-600 hover:underline", children: t('upgrade.cta', 'Улучшить') }) ] }) ] }); } function LockIcon({ className = '' }) { return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("svg", { viewBox: "0 0 20 20", fill: "currentColor", className: className, children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("path", { fillRule: "evenodd", d: "M10 1a4.5 4.5 0 00-4.5 4.5V9H5a2 2 0 00-2 2v6a2 2 0 002 2h10a2 2 0 002-2v-6a2 2 0 00-2-2h-.5V5.5A4.5 4.5 0 0010 1zm3 8V5.5a3 3 0 10-6 0V9h6z", clipRule: "evenodd" }) }); } // EXTERNAL MODULE: ./src/lib/formatName.ts var formatName = __webpack_require__(48178); // EXTERNAL MODULE: ./src/lib/formatLastSeen.ts var formatLastSeen = __webpack_require__(49598); // EXTERNAL MODULE: ./src/components/PlanBadge.tsx var PlanBadge = __webpack_require__(25701); ;// ./src/app/users/[id]/page.tsx /* __next_internal_client_entry_do_not_use__ default auto */ const MONTHS_BY_LOCALE = { ru: [ 'Январь', 'Февраль', 'Март', 'Апрель', 'Май', 'Июнь', 'Июль', 'Август', 'Сентябрь', 'Октябрь', 'Ноябрь', 'Декабрь' ], en: [ 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' ], el: [ 'Ιανουάριος', 'Φεβρουάριος', 'Μάρτιος', 'Απρίλιος', 'Μάιος', 'Ιούνιος', 'Ιούλιος', 'Αύγουστος', 'Σεπτέμβριος', 'Οκτώβριος', 'Νοέμβριος', 'Δεκέμβριος' ] }; const WEEK_DAYS_BY_LOCALE = { ru: [ 'Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб', 'Вс' ], en: [ 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa', 'Su' ], el: [ 'Δε', 'Τρ', 'Τε', 'Πε', 'Πα', 'Σά', 'Κυ' ] }; function UserProfilePage() { const { id } = (0,navigation.useParams)(); const { t, locale } = (0,context_locale/* useLocale */.Y)(); const { data: session } = (0,auth/* useSession */.wV)(); const router = (0,navigation.useRouter)(); const [user, setUser] = (0,react.useState)(null); const [reviews, setReviews] = (0,react.useState)([]); const [rating, setRating] = (0,react.useState)(null); const [loading, setLoading] = (0,react.useState)(true); const [specialistCards, setSpecialistCards] = (0,react.useState)([]); const [catMap, setCatMap] = (0,react.useState)(new Map()); const [locMap, setLocMap] = (0,react.useState)(new Map()); const [isFavorite, setIsFavorite] = (0,react.useState)(false); const [favLoading, setFavLoading] = (0,react.useState)(false); const [msgLoading, setMsgLoading] = (0,react.useState)(false); const [canMsg, setCanMsg] = (0,react.useState)(null); // Availability const now = new Date(); const [availYear, setAvailYear] = (0,react.useState)(now.getFullYear()); const [availMonth, setAvailMonth] = (0,react.useState)(now.getMonth()); const [availMap, setAvailMap] = (0,react.useState)({}); const today = new Date().toISOString().slice(0, 10); const dateLocale = locale === 'ru' ? 'ru-RU' : locale === 'en' ? 'en-US' : 'el-GR'; process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react.useEffect)(()=>{ if (!id) return; Promise.all([ (0,api/* getUserProfile */.VM)(id), (0,api/* getUserReviews */.v9)(id), (0,api/* getUserRating */.Bm)(id), (0,api/* getCategories */.bW)().catch(()=>[]), (0,api/* getLocations */.Vs)().catch(()=>[]) ]).then(([u, r, rt, cats, locs])=>{ setUser(u); setReviews(r); setRating(rt.avg); setCatMap(new Map(flattenTree(cats).map((c)=>[ c.slug, c ]))); setLocMap(new Map(flattenTree(locs).map((l)=>[ l.slug, l ]))); if (u.role === 'specialist' || u.role === 'admin') { (0,api/* getSpecialistCards */.Bq)(id).then(setSpecialistCards).catch(()=>{}); } }).catch(()=>{}).finally(()=>setLoading(false)); }, [ id ]); // Load favorite status when session available process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react.useEffect)(()=>{ if (!session || !id) return; (0,api/* getSpecialistFavorites */.pD)().then((rows)=>setIsFavorite(rows.some((r)=>r.specialist?.id === id))).catch(()=>{}); // Check if current user can message this person const myId = session.user?.id; if (myId && myId !== id) { (0,api/* getCanMessage */.On)(id).then(setCanMsg).catch(()=>{}); } }, [ session, id ]); async function toggleFavorite() { if (!session) return; setFavLoading(true); try { if (isFavorite) { await (0,api/* removeSpecialistFavorite */.sD)(id); setIsFavorite(false); } else { await (0,api/* addSpecialistFavorite */.V)(id); setIsFavorite(true); } } catch {} setFavLoading(false); } async function handleMessage() { if (!session) { router.push('/login'); return; } setMsgLoading(true); try { const { room } = await (0,api/* getOrCreateDirectRoom */.QN)(id); router.push(`/chat?room=${room.id}`); } catch {} setMsgLoading(false); } process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react.useEffect)(()=>{ if (!id) return; const monthKey = `${availYear}-${String(availMonth + 1).padStart(2, '0')}`; (0,api/* getSpecialistAvailability */.Xz)(id, monthKey).then((rows)=>{ setAvailMap((prev)=>{ const next = { ...prev }; rows.forEach((r)=>{ next[r.date] = r.status; }); return next; }); }).catch(()=>{}); }, [ id, availYear, availMonth ]); if (loading) return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "text-center py-20 text-white", children: t('common.loading') }); if (!user) return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "text-center py-20 text-white/70", children: t('common.error') }); const initials = `${user.firstName?.[0] ?? ''}${user.lastName?.[0] ?? ''}`.toUpperCase() || user.name?.[0]?.toUpperCase() || '?'; const displayName = (0,formatName/* formatShortName */.H)(user.firstName, user.lastName, user.name); const roleColors = { specialist: 'bg-purple-100 text-purple-700', admin: 'bg-red-100 text-red-700', customer: 'bg-green-100 text-green-700' }; const roleLabels = { specialist: t('profile.role.specialist'), admin: t('profile.role.admin'), customer: t('profile.role.customer') }; return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "max-w-3xl mx-auto px-4 py-10", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "bg-white rounded-xl border border-gray-200 p-6 mb-6", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "flex items-start gap-5", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "w-20 h-20 rounded-full bg-blue-100 flex-shrink-0 flex items-center justify-center text-blue-700 text-2xl font-bold overflow-hidden border-2 border-gray-100", children: user.image ? /*#__PURE__*/ (0,react_jsx_runtime.jsx)("img", { src: user.image, alt: displayName, className: "w-full h-full object-cover" }) : initials }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "flex-1 min-w-0", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2 flex-wrap mb-1", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h1", { className: "text-xl font-bold text-gray-900", children: displayName }), user.planTier && user.planTier !== 'free' && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(PlanBadge/* PlanBadge */.d, { tier: user.planTier, verified: user.hasVerifiedBadge, size: "sm" }), user.hasVerifiedBadge && user.planTier === 'free' && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(PlanBadge/* PlanBadge */.d, { tier: "free", verified: true, size: "sm" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: `text-xs px-2 py-0.5 rounded-full font-medium ${roleColors[user.role] ?? 'bg-gray-100 text-gray-600'}`, children: roleLabels[user.role] ?? user.role }), Array.isArray(user.activeStatuses) && user.activeStatuses.includes('can_help_now') && /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("span", { className: "inline-flex items-center gap-1 text-xs font-medium text-green-700 bg-green-50 border border-green-200 px-2 py-0.5 rounded-full", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "w-1.5 h-1.5 rounded-full bg-green-500 animate-pulse" }), t('status.can_help_now', 'Готов помочь') ] }), Array.isArray(user.activeStatuses) && user.activeStatuses.includes('need_help') && /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("span", { className: "inline-flex items-center gap-1 text-xs font-medium text-blue-700 bg-blue-50 border border-blue-200 px-2 py-0.5 rounded-full", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "w-1.5 h-1.5 rounded-full bg-blue-500" }), t('status.need_help', 'Нужна помощь') ] }), session && session.user?.id !== id && /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "ml-auto flex items-center gap-2", children: [ canMsg?.allowed === false ? /*#__PURE__*/ (0,react_jsx_runtime.jsx)(UpgradePrompt, { feature: t('chat.write_btn', 'Написать'), requiredTier: "pro", variant: "inline", t: t }) : /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("button", { onClick: handleMessage, disabled: msgLoading, className: "flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-sm font-medium bg-blue-50 text-blue-600 border border-blue-200 hover:bg-blue-100 transition disabled:opacity-50", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.8, children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8 10h.01M12 10h.01M16 10h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z" }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { children: t('chat.write_btn') }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("button", { onClick: toggleFavorite, disabled: favLoading, title: isFavorite ? t('specialist.unfavorite') : t('specialist.favorite'), className: `flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-sm font-medium transition disabled:opacity-50 ${isFavorite ? 'bg-pink-50 text-pink-600 border border-pink-200 hover:bg-pink-100' : 'bg-gray-50 text-gray-600 border border-gray-200 hover:bg-gray-100'}`, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { children: isFavorite ? '❤️' : '🤍' }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { children: isFavorite ? t('specialist.unfavorite') : t('specialist.favorite') }) ] }) ] }) ] }), rating && /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "flex items-center gap-1.5 mb-2", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "text-yellow-400 text-lg", children: "★" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "font-semibold text-gray-800", children: Number(rating).toFixed(1) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("span", { className: "text-sm text-gray-400", children: [ "(", reviews.length, " ", t('profile.reviews').toLowerCase(), ")" ] }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("p", { className: "text-sm text-gray-400", children: [ t('profile.member_since'), " ", new Date(user.createdAt).toLocaleDateString(dateLocale), user.lastSeenAt && /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("span", { className: "ml-2", children: [ "\xb7 ", (0,formatLastSeen/* formatLastSeen */.V)(user.lastSeenAt, t) ] }) ] }) ] }) ] }), user.bio && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "mt-4 text-gray-700 text-sm leading-relaxed border-t border-gray-100 pt-4", children: user.bio }), user.phone && /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "mt-4 border-t border-gray-100 pt-4 flex items-center gap-2", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("svg", { className: "w-4 h-4 text-gray-400 shrink-0", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.8, children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z" }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("a", { href: `tel:${user.phone}`, className: "text-sm font-medium text-gray-700 hover:text-blue-600", children: user.phone }) ] }), user.personalSiteSlug && /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "mt-3 flex items-center gap-2", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("svg", { className: "w-4 h-4 text-gray-400 shrink-0", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.8, children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14" }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("a", { href: `/site/${user.personalSiteSlug}`, target: "_blank", rel: "noopener noreferrer", className: "text-sm text-blue-600 hover:underline", children: [ "canhelp.gr/site/", user.personalSiteSlug ] }) ] }), user.languages && user.languages.length > 0 && /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "mt-4 border-t border-gray-100 pt-4", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "text-xs font-medium text-gray-500 mb-2 uppercase tracking-wide", children: t('profile.languages') }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "flex flex-wrap gap-2", children: user.languages.map((code)=>{ const langMap = { el: { flag: '🇬🇷', label: 'Ελληνικά' }, en: { flag: '🇬🇧', label: 'English' }, ru: { flag: '🇷🇺', label: 'Русский' }, uk: { flag: '🇺🇦', label: 'Українська' }, de: { flag: '🇩🇪', label: 'Deutsch' }, fr: { flag: '🇫🇷', label: 'Français' }, it: { flag: '🇮🇹', label: 'Italiano' }, es: { flag: '🇪🇸', label: 'Español' }, ar: { flag: '🇸🇦', label: 'العربية' }, zh: { flag: '🇨🇳', label: '中文' } }; const lang = langMap[code]; if (!lang) return null; return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("span", { className: "flex items-center gap-1.5 bg-indigo-50 text-indigo-700 text-sm px-3 py-1 rounded-full border border-indigo-100", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { children: lang.flag }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { children: lang.label }) ] }, code); }) }) ] }), user.skills && user.skills.length > 0 && specialistCards.length === 0 && /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "mt-4 border-t border-gray-100 pt-4", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "text-xs font-medium text-gray-500 mb-2 uppercase tracking-wide", children: t('profile.skills.label') }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "flex flex-wrap gap-2", children: user.skills.map((skill)=>/*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "bg-blue-50 text-blue-700 text-sm px-3 py-1 rounded-full", children: skill }, skill)) }) ] }), user.role === 'specialist' && user.specialistCategories && user.specialistCategories.length > 0 && specialistCards.length === 0 && /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "mt-4 border-t border-gray-100 pt-4", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "text-xs font-medium text-gray-500 mb-2 uppercase tracking-wide", children: t('user.categories') }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "flex flex-wrap gap-2", children: user.specialistCategories.map((slug)=>/*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "bg-purple-50 text-purple-700 text-sm px-3 py-1 rounded-full", children: slug }, slug)) }) ] }), user.role === 'specialist' && user.specialistLocations && user.specialistLocations.length > 0 && specialistCards.length === 0 && /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "mt-4 border-t border-gray-100 pt-4", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "text-xs font-medium text-gray-500 mb-2 uppercase tracking-wide", children: t('user.work_area') }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "flex flex-wrap gap-2", children: user.specialistLocations.map((slug)=>/*#__PURE__*/ (0,react_jsx_runtime.jsxs)("span", { className: "bg-emerald-50 text-emerald-700 text-sm px-3 py-1 rounded-full", children: [ "\uD83D\uDCCD ", slug ] }, slug)) }) ] }) ] }), user.role === 'specialist' && /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "bg-white rounded-xl border border-gray-200 p-6 mb-6", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "flex items-center justify-between mb-4", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("h2", { className: "font-bold text-gray-900 text-lg", children: [ "\uD83D\uDCC5 ", t('nav.schedule') ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "flex items-center gap-3 text-xs text-gray-500", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("span", { className: "flex items-center gap-1.5", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "w-3 h-3 rounded bg-emerald-200 border border-emerald-400 inline-block" }), t('schedule.available') ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("span", { className: "flex items-center gap-1.5", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "w-3 h-3 rounded bg-red-200 border border-red-400 inline-block" }), t('schedule.busy') ] }) ] }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ReadOnlyCalendar, { year: availYear, month: availMonth, availMap: availMap, today: today, onPrev: ()=>{ if (availMonth === 0) { setAvailYear((y)=>y - 1); setAvailMonth(11); } else setAvailMonth((m)=>m - 1); }, onNext: ()=>{ if (availMonth === 11) { setAvailYear((y)=>y + 1); setAvailMonth(0); } else setAvailMonth((m)=>m + 1); } }) ] }), (user.role === 'specialist' || user.role === 'admin') && specialistCards.length > 0 && /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "space-y-4 mb-6", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h2", { className: "font-bold text-white text-lg", children: t('user.specialist_cards') }), specialistCards.map((card)=>/*#__PURE__*/ (0,react_jsx_runtime.jsx)(PublicCardView, { card: card, locale: locale, catMap: catMap, locMap: locMap }, card.id)) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "bg-white rounded-xl border border-gray-200 p-6", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("h2", { className: "font-bold text-gray-900 text-lg mb-4", children: [ t('profile.reviews'), reviews.length > 0 && /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("span", { className: "text-gray-400 font-normal text-base ml-2", children: [ "(", reviews.length, ")" ] }) ] }), reviews.length === 0 ? /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "text-gray-500 text-sm", children: t('profile.no_reviews') }) : /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "space-y-4", children: reviews.map(({ review, author })=>/*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "border-b border-gray-50 pb-4 last:border-0 last:pb-0", children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "flex items-start gap-3", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "w-8 h-8 rounded-full bg-gray-100 flex-shrink-0 flex items-center justify-center text-gray-600 text-sm font-bold overflow-hidden", children: author?.image ? /*#__PURE__*/ (0,react_jsx_runtime.jsx)("img", { src: author.image, alt: author.name, className: "w-full h-full object-cover" }) : author?.name?.[0]?.toUpperCase() ?? '?' }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "flex-1", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2 mb-1", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "text-sm font-medium text-gray-800", children: (0,formatName/* shortName */.E)(author?.name) ?? '—' }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("span", { className: "text-yellow-400", children: [ '★'.repeat(review.rating), '☆'.repeat(5 - review.rating) ] }) ] }), review.comment && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "text-sm text-gray-600", children: review.comment }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "text-xs text-gray-400 mt-1", children: new Date(review.createdAt).toLocaleDateString(dateLocale) }) ] }) ] }) }, review.id)) }) ] }) ] }); } function ReadOnlyCalendar({ year, month, availMap, today, onPrev, onNext }) { const { locale, t } = (0,context_locale/* useLocale */.Y)(); const weekDays = WEEK_DAYS_BY_LOCALE[locale] ?? WEEK_DAYS_BY_LOCALE.ru; const months = MONTHS_BY_LOCALE[locale] ?? MONTHS_BY_LOCALE.ru; const firstDay = new Date(year, month, 1); const startDow = (firstDay.getDay() + 6) % 7; const daysInMonth = new Date(year, month + 1, 0).getDate(); const prevMonthDays = new Date(year, month, 0).getDate(); const cells = []; for(let i = startDow - 1; i >= 0; i--){ cells.push({ day: prevMonthDays - i, cur: false, dateKey: '' }); } for(let d = 1; d <= daysInMonth; d++){ const dateKey = `${year}-${String(month + 1).padStart(2, '0')}-${String(d).padStart(2, '0')}`; cells.push({ day: d, cur: true, dateKey }); } const remainder = cells.length % 7; if (remainder !== 0) { for(let d = 1; d <= 7 - remainder; d++){ cells.push({ day: d, cur: false, dateKey: '' }); } } const monthPrefix = `${year}-${String(month + 1).padStart(2, '0')}`; const availCount = Object.entries(availMap).filter(([k, v])=>k.startsWith(monthPrefix) && k >= today && v === 'available').length; return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "flex items-center justify-between mb-3", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { onClick: onPrev, className: "w-7 h-7 rounded-lg hover:bg-gray-100 flex items-center justify-center text-gray-500", children: "‹" }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "text-center", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("span", { className: "font-medium text-gray-800 text-sm", children: [ months[month], " ", year ] }), availCount > 0 && /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("span", { className: "ml-2 text-xs text-emerald-600", children: [ availCount, " ", t('schedule.free_days') ] }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { onClick: onNext, className: "w-7 h-7 rounded-lg hover:bg-gray-100 flex items-center justify-center text-gray-500", children: "›" }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "grid grid-cols-7 mb-1", children: weekDays.map((d)=>/*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "text-center text-xs text-gray-400 py-1", children: d }, d)) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "grid grid-cols-7 gap-0.5", children: cells.map((cell, idx)=>{ if (!cell.cur) { return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "h-9 flex items-center justify-center text-xs text-gray-200", children: cell.day }, `e-${idx}`); } const status = availMap[cell.dateKey]; const isPast = cell.dateKey < today; const isToday = cell.dateKey === today; let cls = 'h-9 flex items-center justify-center rounded-lg text-sm font-medium '; if (isPast) { cls += 'text-gray-200 '; } else if (status === 'available') { cls += 'bg-emerald-100 border border-emerald-300 text-emerald-700 '; } else if (status === 'busy') { cls += 'bg-red-100 border border-red-300 text-red-600 '; } else { cls += 'text-gray-500 '; } if (isToday) cls += 'ring-2 ring-blue-400 ring-offset-1 '; return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: cls, children: cell.day }, cell.dateKey); }) }) ] }); } // ─── Public card view ───────────────────────────────────────────────────────── function flattenTree(nodes) { return nodes.flatMap((n)=>[ n, ...flattenTree(n.children ?? []) ]); } function PublicCardView({ card, locale, catMap, locMap }) { const [lightbox, setLightbox] = (0,react.useState)(null); const lbl = (ru, en, el)=>locale === 'ru' ? ru : locale === 'en' ? en : el; return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "bg-white rounded-xl border border-gray-200 overflow-hidden", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "px-5 py-4 border-b border-gray-100", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h3", { className: "font-bold text-gray-900", children: card.title }), card.description && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "text-sm text-gray-600 mt-1", children: card.description }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "p-5 space-y-4", children: [ card.skills && card.skills.length > 0 && /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "text-xs font-semibold text-gray-500 uppercase tracking-wide mb-2", children: lbl('Навыки', 'Skills', 'Δεξιότητες') }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "flex flex-wrap gap-2", children: card.skills.map((s)=>/*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "bg-blue-50 text-blue-700 text-sm px-3 py-1 rounded-full", children: s }, s)) }) ] }), card.categories && card.categories.length > 0 && /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "text-xs font-semibold text-gray-500 uppercase tracking-wide mb-2", children: lbl('Категории', 'Categories', 'Κατηγορίες') }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "flex flex-wrap gap-2", children: card.categories.map((s)=>{ const cat = catMap.get(s); const name = cat ? cat.names?.[locale] || cat.names?.el || s : s; return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("span", { className: "bg-purple-50 text-purple-700 text-sm px-3 py-1 rounded-full", children: [ cat?.icon ? `${cat.icon} ` : '', name ] }, s); }) }) ] }), card.locations && card.locations.length > 0 && /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "text-xs font-semibold text-gray-500 uppercase tracking-wide mb-2", children: lbl('Район работы', 'Work area', 'Περιοχή εργασίας') }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "flex flex-wrap gap-2", children: card.locations.map((s)=>{ const loc = locMap.get(s); const name = loc ? loc.names?.[locale] || loc.names?.el || s : s; return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("span", { className: "bg-emerald-50 text-emerald-700 text-sm px-3 py-1 rounded-full", children: [ "\uD83D\uDCCD ", name ] }, s); }) }) ] }), card.portfolio && card.portfolio.length > 0 && /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "text-xs font-semibold text-gray-500 uppercase tracking-wide mb-2", children: lbl('Галерея работ', 'Portfolio', 'Χαρτοφυλάκιο') }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "grid grid-cols-2 sm:grid-cols-3 gap-3", children: card.portfolio.map((item)=>/*#__PURE__*/ (0,react_jsx_runtime.jsxs)("button", { type: "button", onClick: ()=>setLightbox(item), className: "group relative rounded-xl overflow-hidden border border-gray-200 bg-gray-50 text-left", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("img", { src: item.imageUrl, alt: item.title ?? '', className: "w-full aspect-square object-cover group-hover:scale-105 transition-transform duration-200" }), item.title && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "px-2 py-1.5", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "text-xs font-medium text-gray-700 truncate", children: item.title }) }) ] }, item.id)) }) ] }) ] }), lightbox && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/80 px-4", onClick: ()=>setLightbox(null), children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "bg-white rounded-2xl overflow-hidden max-w-lg w-full shadow-2xl", onClick: (e)=>e.stopPropagation(), children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("img", { src: lightbox.imageUrl, alt: lightbox.title ?? '', className: "w-full max-h-[60vh] object-contain bg-gray-900" }), (lightbox.title || lightbox.description) && /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "p-4", children: [ lightbox.title && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "font-semibold text-gray-800 mb-1", children: lightbox.title }), lightbox.description && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "text-sm text-gray-600", children: lightbox.description }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "flex justify-end px-4 pb-4", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { type: "button", onClick: ()=>setLightbox(null), className: "text-sm text-gray-500 hover:text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100", children: lbl('Закрыть', 'Close', 'Κλείσιμο') }) }) ] }) }) ] }); } ), ` -+// ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { "default": () => (/* binding */ UserProfilePage) }); // EXTERNAL MODULE: ../../node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.js var react_jsx_runtime = __webpack_require__(78157); // EXTERNAL MODULE: ../../node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js var react = __webpack_require__(31768); // EXTERNAL MODULE: ../../node_modules/next/dist/api/navigation.js var navigation = __webpack_require__(71159); // EXTERNAL MODULE: ./src/context/locale.tsx var context_locale = __webpack_require__(96484); // EXTERNAL MODULE: ./src/lib/auth.ts var auth = __webpack_require__(13260); // EXTERNAL MODULE: ./src/lib/api.ts var api = __webpack_require__(91864); // EXTERNAL MODULE: ../../node_modules/next/dist/client/app-dir/link.js var app_dir_link = __webpack_require__(94496); var link_default = /*#__PURE__*/__webpack_require__.n(app_dir_link); ;// ./src/components/UpgradePrompt.tsx .fimport { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import Link from 'next/link'; const tierLabels = { free: 'Free', pro: 'Pro', ultimate: 'Ultimate' }; const tierColors = { free: 'bg-gray-50 border-gray-200 text-gray-700', pro: 'bg-blue-50 border-blue-200 text-blue-800', ultimate: 'bg-amber-50 border-amber-200 text-amber-800' }; const tierBtnColors = { free: 'bg-gray-600 hover:bg-gray-700 text-white', pro: 'bg-blue-600 hover:bg-blue-700 text-white', ultimate: 'bg-amber-500 hover:bg-amber-600 text-white' }; export function UpgradePrompt({ feature, requiredTier, variant = 'inline', t, className = '' }) { const tierLabel = tierLabels[requiredTier]; if (variant === 'banner') { return /*#__PURE__*/ _jsxs("div", { className: `flex items-center justify-between gap-3 rounded-xl border px-4 py-3 ${tierColors[requiredTier]} ${className}`, children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-2 min-w-0", children: [ /*#__PURE__*/ _jsx(LockIcon, { className: "w-4 h-4 shrink-0 opacity-60" }), /*#__PURE__*/ _jsxs("span", { className: "text-sm font-medium truncate", children: [ feature, " — ", t('upgrade.available_in', 'доступно в'), " ", /*#__PURE__*/ _jsx("b", { children: tierLabel }) ] }) ] }), /*#__PURE__*/ _jsx(Link, { href: `/pricing?highlight=${requiredTier}`, className: `shrink-0 text-xs font-semibold px-3 py-1.5 rounded-lg transition ${tierBtnColors[requiredTier]}`, children: t('upgrade.cta', 'Улучшить') }) ] }); } if (variant === 'block') { return /*#__PURE__*/ _jsxs("div", { className: `rounded-2xl border p-6 text-center ${tierColors[requiredTier]} ${className}`, children: [ /*#__PURE__*/ _jsx(LockIcon, { className: "w-8 h-8 mx-auto mb-3 opacity-40" }), /*#__PURE__*/ _jsx("p", { className: "font-semibold text-base mb-1", children: feature }), /*#__PURE__*/ _jsxs("p", { className: "text-sm opacity-70 mb-4", children: [ t('upgrade.available_in', 'Доступно в плане'), " ", /*#__PURE__*/ _jsx("b", { children: tierLabel }) ] }), /*#__PURE__*/ _jsx(Link, { href: `/pricing?highlight=${requiredTier}`, className: `inline-block text-sm font-semibold px-5 py-2 rounded-xl transition ${tierBtnColors[requiredTier]}`, children: t('upgrade.cta', 'Улучшить план') }) ] }); } // inline variant return /*#__PURE__*/ _jsxs("div", { className: `flex items-center gap-2 text-sm ${className}`, children: [ /*#__PURE__*/ _jsx(LockIcon, { className: "w-4 h-4 text-gray-400 shrink-0" }), /*#__PURE__*/ _jsxs("span", { className: "text-gray-500", children: [ t('upgrade.available_in', 'Доступно в'), " ", /*#__PURE__*/ _jsx("b", { className: "text-gray-700", children: tierLabel }), ".", ' ', /*#__PURE__*/ _jsx(Link, { href: `/pricing?highlight=${requiredTier}`, className: "text-blue-600 hover:underline", children: t('upgrade.cta', 'Улучшить') }) ] }) ] }); } function LockIcon({ className = '' }) { return /*#__PURE__*/ _jsx("svg", { viewBox: "0 0 20 20", fill: "currentColor", className: className, children: /*#__PURE__*/ _jsx("path", { fillRule: "evenodd", d: "M10 1a4.5 4.5 0 00-4.5 4.5V9H5a2 2 0 00-2 2v6a2 2 0 002 2h10a2 2 0 002-2v-6a2 2 0 00-2-2h-.5V5.5A4.5 4.5 0 0010 1zm3 8V5.5a3 3 0 10-6 0V9h6z", clipRule: "evenodd" }) }); } #062undefined6492undefined561567undefined768772__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined972976__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined11231126__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined12751279__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined16381641__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined18701873__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined18751878__WEBPACK_MODULE_REFERENCE__6_5b2264656661756c74225d_directImport_asiSafe1__._undefined22472251__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined24182421__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined25502553__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined27132717__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined29542957__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined31133116__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined31183121__WEBPACK_MODULE_REFERENCE__6_5b2264656661756c74225d_directImport_asiSafe1__._undefined34843488__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined36123615__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined37313735__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined39393942__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined41554158__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined41604163__WEBPACK_MODULE_REFERENCE__6_5b2264656661756c74225d_directImport_asiSafe1__._undefined45084511__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined46444647__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined669745(0,react_jsx_runtime.jsxs)undefined9451021(0,react_jsx_runtime.jsxs)undefined11681242(0,react_jsx_runtime.jsx)undefined13911467(0,react_jsx_runtime.jsxs)undefined18261900(0,react_jsx_runtime.jsx)undefined21292203(0,react_jsx_runtime.jsx)undefined22052282(link_default())undefined26512727(0,react_jsx_runtime.jsxs)undefined28942968(0,react_jsx_runtime.jsx)undefined30973171(0,react_jsx_runtime.jsx)undefined33313407(0,react_jsx_runtime.jsxs)undefined36443718(0,react_jsx_runtime.jsx)undefined38743948(0,react_jsx_runtime.jsx)undefined39504027(link_default())undefined43904466(0,react_jsx_runtime.jsxs)undefined45904664(0,react_jsx_runtime.jsx)undefined47804856(0,react_jsx_runtime.jsxs)undefined50605134(0,react_jsx_runtime.jsx)undefined53475421(0,react_jsx_runtime.jsx)undefined54235500(link_default())undefined58455919(0,react_jsx_runtime.jsx)undefined60526126(0,react_jsx_runtime.jsx)undefinedRawSource< // EXTERNAL MODULE: ./src/lib/formatName.ts var formatName = __webpack_require__(48178); // EXTERNAL MODULE: ./src/lib/formatLastSeen.ts var formatLastSeen = __webpack_require__(49598); // EXTERNAL MODULE: ./src/components/PlanBadge.tsx var PlanBadge = __webpack_require__(25701); ;// ./src/app/users/[id]/page.tsx *W/* __next_internal_client_entry_do_not_use__ default auto */ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { useState, useEffect } from 'react'; import { useParams, useRouter } from 'next/navigation'; import { useLocale } from '@/context/locale'; import { useSession } from '@/lib/auth'; import { getUserProfile, getUserReviews, getUserRating, getSpecialistAvailability, getSpecialistCards, getCategories, getLocations, getSpecialistFavorites, addSpecialistFavorite, removeSpecialistFavorite, getOrCreateDirectRoom, getCanMessage } from '@/lib/api'; import { UpgradePrompt } from '@/components/UpgradePrompt'; import { formatShortName, shortName } from '@/lib/formatName'; import { formatLastSeen } from '@/lib/formatLastSeen'; import { PlanBadge } from '@/components/PlanBadge'; const MONTHS_BY_LOCALE = { ru: [ 'Январь', 'Февраль', 'Март', 'Апрель', 'Май', 'Июнь', 'Июль', 'Август', 'Сентябрь', 'Октябрь', 'Ноябрь', 'Декабрь' ], en: [ 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' ], el: [ 'Ιανουάριος', 'Φεβρουάριος', 'Μάρτιος', 'Απρίλιος', 'Μάιος', 'Ιούνιος', 'Ιούλιος', 'Αύγουστος', 'Σεπτέμβριος', 'Οκτώβριος', 'Νοέμβριος', 'Δεκέμβριος' ] }; const WEEK_DAYS_BY_LOCALE = { ru: [ 'Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб', 'Вс' ], en: [ 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa', 'Su' ], el: [ 'Δε', 'Τρ', 'Τε', 'Πε', 'Πα', 'Σά', 'Κυ' ] }; export default function UserProfilePage() { const { id } = useParams(); const { t, locale } = useLocale(); const { data: session } = useSession(); const router = useRouter(); const [user, setUser] = useState(null); const [reviews, setReviews] = useState([]); const [rating, setRating] = useState(null); const [loading, setLoading] = useState(true); const [specialistCards, setSpecialistCards] = useState([]); const [catMap, setCatMap] = useState(new Map()); const [locMap, setLocMap] = useState(new Map()); const [isFavorite, setIsFavorite] = useState(false); const [favLoading, setFavLoading] = useState(false); const [msgLoading, setMsgLoading] = useState(false); const [canMsg, setCanMsg] = useState(null); // Availability const now = new Date(); const [availYear, setAvailYear] = useState(now.getFullYear()); const [availMonth, setAvailMonth] = useState(now.getMonth()); const [availMap, setAvailMap] = useState({}); const today = new Date().toISOString().slice(0, 10); const dateLocale = locale === 'ru' ? 'ru-RU' : locale === 'en' ? 'en-US' : 'el-GR'; process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (!id) return; Promise.all([ getUserProfile(id), getUserReviews(id), getUserRating(id), getCategories().catch(()=>[]), getLocations().catch(()=>[]) ]).then(([u, r, rt, cats, locs])=>{ setUser(u); setReviews(r); setRating(rt.avg); setCatMap(new Map(flattenTree(cats).map((c)=>[ c.slug, c ]))); setLocMap(new Map(flattenTree(locs).map((l)=>[ l.slug, l ]))); if (u.role === 'specialist' || u.role === 'admin') { getSpecialistCards(id).then(setSpecialistCards).catch(()=>{}); } }).catch(()=>{}).finally(()=>setLoading(false)); }, [ id ]); // Load favorite status when session available process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (!session || !id) return; getSpecialistFavorites().then((rows)=>setIsFavorite(rows.some((r)=>r.specialist?.id === id))).catch(()=>{}); // Check if current user can message this person const myId = session.user?.id; if (myId && myId !== id) { getCanMessage(id).then(setCanMsg).catch(()=>{}); } }, [ session, id ]); async function toggleFavorite() { if (!session) return; setFavLoading(true); try { if (isFavorite) { await removeSpecialistFavorite(id); setIsFavorite(false); } else { await addSpecialistFavorite(id); setIsFavorite(true); } } catch {} setFavLoading(false); } async function handleMessage() { if (!session) { router.push('/login'); return; } setMsgLoading(true); try { const { room } = await getOrCreateDirectRoom(id); router.push(`/chat?room=${room.id}`); } catch {} setMsgLoading(false); } process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (!id) return; const monthKey = `${availYear}-${String(availMonth + 1).padStart(2, '0')}`; getSpecialistAvailability(id, monthKey).then((rows)=>{ setAvailMap((prev)=>{ const next = { ...prev }; rows.forEach((r)=>{ next[r.date] = r.status; }); return next; }); }).catch(()=>{}); }, [ id, availYear, availMonth ]); if (loading) return /*#__PURE__*/ _jsx("div", { className: "text-center py-20 text-white", children: t('common.loading') }); if (!user) return /*#__PURE__*/ _jsx("div", { className: "text-center py-20 text-white/70", children: t('common.error') }); const initials = `${user.firstName?.[0] ?? ''}${user.lastName?.[0] ?? ''}`.toUpperCase() || user.name?.[0]?.toUpperCase() || '?'; const displayName = formatShortName(user.firstName, user.lastName, user.name); const roleColors = { specialist: 'bg-purple-100 text-purple-700', admin: 'bg-red-100 text-red-700', customer: 'bg-green-100 text-green-700' }; const roleLabels = { specialist: t('profile.role.specialist'), admin: t('profile.role.admin'), customer: t('profile.role.customer') }; return /*#__PURE__*/ _jsxs("div", { className: "max-w-3xl mx-auto px-4 py-10", children: [ /*#__PURE__*/ _jsxs("div", { className: "bg-white rounded-xl border border-gray-200 p-6 mb-6", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-start gap-5", children: [ /*#__PURE__*/ _jsx("div", { className: "w-20 h-20 rounded-full bg-blue-100 flex-shrink-0 flex items-center justify-center text-blue-700 text-2xl font-bold overflow-hidden border-2 border-gray-100", children: user.image ? /*#__PURE__*/ _jsx("img", { src: user.image, alt: displayName, className: "w-full h-full object-cover" }) : initials }), /*#__PURE__*/ _jsxs("div", { className: "flex-1 min-w-0", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-2 flex-wrap mb-1", children: [ /*#__PURE__*/ _jsx("h1", { className: "text-xl font-bold text-gray-900", children: displayName }), user.planTier && user.planTier !== 'free' && /*#__PURE__*/ _jsx(PlanBadge, { tier: user.planTier, verified: user.hasVerifiedBadge, size: "sm" }), user.hasVerifiedBadge && user.planTier === 'free' && /*#__PURE__*/ _jsx(PlanBadge, { tier: "free", verified: true, size: "sm" }), /*#__PURE__*/ _jsx("span", { className: `text-xs px-2 py-0.5 rounded-full font-medium ${roleColors[user.role] ?? 'bg-gray-100 text-gray-600'}`, children: roleLabels[user.role] ?? user.role }), Array.isArray(user.activeStatuses) && user.activeStatuses.includes('can_help_now') && /*#__PURE__*/ _jsxs("span", { className: "inline-flex items-center gap-1 text-xs font-medium text-green-700 bg-green-50 border border-green-200 px-2 py-0.5 rounded-full", children: [ /*#__PURE__*/ _jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-green-500 animate-pulse" }), t('status.can_help_now', 'Готов помочь') ] }), Array.isArray(user.activeStatuses) && user.activeStatuses.includes('need_help') && /*#__PURE__*/ _jsxs("span", { className: "inline-flex items-center gap-1 text-xs font-medium text-blue-700 bg-blue-50 border border-blue-200 px-2 py-0.5 rounded-full", children: [ /*#__PURE__*/ _jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-blue-500" }), t('status.need_help', 'Нужна помощь') ] }), session && session.user?.id !== id && /*#__PURE__*/ _jsxs("div", { className: "ml-auto flex items-center gap-2", children: [ canMsg?.allowed === false ? /*#__PURE__*/ _jsx(UpgradePrompt, { feature: t('chat.write_btn', 'Написать'), requiredTier: "pro", variant: "inline", t: t }) : /*#__PURE__*/ _jsxs("button", { onClick: handleMessage, disabled: msgLoading, className: "flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-sm font-medium bg-blue-50 text-blue-600 border border-blue-200 hover:bg-blue-100 transition disabled:opacity-50", children: [ /*#__PURE__*/ _jsx("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.8, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8 10h.01M12 10h.01M16 10h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z" }) }), /*#__PURE__*/ _jsx("span", { children: t('chat.write_btn') }) ] }), /*#__PURE__*/ _jsxs("button", { onClick: toggleFavorite, disabled: favLoading, title: isFavorite ? t('specialist.unfavorite') : t('specialist.favorite'), className: `flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-sm font-medium transition disabled:opacity-50 ${isFavorite ? 'bg-pink-50 text-pink-600 border border-pink-200 hover:bg-pink-100' : 'bg-gray-50 text-gray-600 border border-gray-200 hover:bg-gray-100'}`, children: [ /*#__PURE__*/ _jsx("span", { children: isFavorite ? '❤️' : '🤍' }), /*#__PURE__*/ _jsx("span", { children: isFavorite ? t('specialist.unfavorite') : t('specialist.favorite') }) ] }) ] }) ] }), rating && /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-1.5 mb-2", children: [ /*#__PURE__*/ _jsx("span", { className: "text-yellow-400 text-lg", children: "★" }), /*#__PURE__*/ _jsx("span", { className: "font-semibold text-gray-800", children: Number(rating).toFixed(1) }), /*#__PURE__*/ _jsxs("span", { className: "text-sm text-gray-400", children: [ "(", reviews.length, " ", t('profile.reviews').toLowerCase(), ")" ] }) ] }), /*#__PURE__*/ _jsxs("p", { className: "text-sm text-gray-400", children: [ t('profile.member_since'), " ", new Date(user.createdAt).toLocaleDateString(dateLocale), user.lastSeenAt && /*#__PURE__*/ _jsxs("span", { className: "ml-2", children: [ "\xb7 ", formatLastSeen(user.lastSeenAt, t) ] }) ] }) ] }) ] }), user.bio && /*#__PURE__*/ _jsx("p", { className: "mt-4 text-gray-700 text-sm leading-relaxed border-t border-gray-100 pt-4", children: user.bio }), user.phone && /*#__PURE__*/ _jsxs("div", { className: "mt-4 border-t border-gray-100 pt-4 flex items-center gap-2", children: [ /*#__PURE__*/ _jsx("svg", { className: "w-4 h-4 text-gray-400 shrink-0", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.8, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z" }) }), /*#__PURE__*/ _jsx("a", { href: `tel:${user.phone}`, className: "text-sm font-medium text-gray-700 hover:text-blue-600", children: user.phone }) ] }), user.personalSiteSlug && /*#__PURE__*/ _jsxs("div", { className: "mt-3 flex items-center gap-2", children: [ /*#__PURE__*/ _jsx("svg", { className: "w-4 h-4 text-gray-400 shrink-0", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.8, children: /*#__PURE__*/ _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14" }) }), /*#__PURE__*/ _jsxs("a", { href: `/site/${user.personalSiteSlug}`, target: "_blank", rel: "noopener noreferrer", className: "text-sm text-blue-600 hover:underline", children: [ "canhelp.gr/site/", user.personalSiteSlug ] }) ] }), user.languages && user.languages.length > 0 && /*#__PURE__*/ _jsxs("div", { className: "mt-4 border-t border-gray-100 pt-4", children: [ /*#__PURE__*/ _jsx("p", { className: "text-xs font-medium text-gray-500 mb-2 uppercase tracking-wide", children: t('profile.languages') }), /*#__PURE__*/ _jsx("div", { className: "flex flex-wrap gap-2", children: user.languages.map((code)=>{ const langMap = { el: { flag: '🇬🇷', label: 'Ελληνικά' }, en: { flag: '🇬🇧', label: 'English' }, ru: { flag: '🇷🇺', label: 'Русский' }, uk: { flag: '🇺🇦', label: 'Українська' }, de: { flag: '🇩🇪', label: 'Deutsch' }, fr: { flag: '🇫🇷', label: 'Français' }, it: { flag: '🇮🇹', label: 'Italiano' }, es: { flag: '🇪🇸', label: 'Español' }, ar: { flag: '🇸🇦', label: 'العربية' }, zh: { flag: '🇨🇳', label: '中文' } }; const lang = langMap[code]; if (!lang) return null; return /*#__PURE__*/ _jsxs("span", { className: "flex items-center gap-1.5 bg-indigo-50 text-indigo-700 text-sm px-3 py-1 rounded-full border border-indigo-100", children: [ /*#__PURE__*/ _jsx("span", { children: lang.flag }), /*#__PURE__*/ _jsx("span", { children: lang.label }) ] }, code); }) }) ] }), user.skills && user.skills.length > 0 && specialistCards.length === 0 && /*#__PURE__*/ _jsxs("div", { className: "mt-4 border-t border-gray-100 pt-4", children: [ /*#__PURE__*/ _jsx("p", { className: "text-xs font-medium text-gray-500 mb-2 uppercase tracking-wide", children: t('profile.skills.label') }), /*#__PURE__*/ _jsx("div", { className: "flex flex-wrap gap-2", children: user.skills.map((skill)=>/*#__PURE__*/ _jsx("span", { className: "bg-blue-50 text-blue-700 text-sm px-3 py-1 rounded-full", children: skill }, skill)) }) ] }), user.role === 'specialist' && user.specialistCategories && user.specialistCategories.length > 0 && specialistCards.length === 0 && /*#__PURE__*/ _jsxs("div", { className: "mt-4 border-t border-gray-100 pt-4", children: [ /*#__PURE__*/ _jsx("p", { className: "text-xs font-medium text-gray-500 mb-2 uppercase tracking-wide", children: t('user.categories') }), /*#__PURE__*/ _jsx("div", { className: "flex flex-wrap gap-2", children: user.specialistCategories.map((slug)=>/*#__PURE__*/ _jsx("span", { className: "bg-purple-50 text-purple-700 text-sm px-3 py-1 rounded-full", children: slug }, slug)) }) ] }), user.role === 'specialist' && user.specialistLocations && user.specialistLocations.length > 0 && specialistCards.length === 0 && /*#__PURE__*/ _jsxs("div", { className: "mt-4 border-t border-gray-100 pt-4", children: [ /*#__PURE__*/ _jsx("p", { className: "text-xs font-medium text-gray-500 mb-2 uppercase tracking-wide", children: t('user.work_area') }), /*#__PURE__*/ _jsx("div", { className: "flex flex-wrap gap-2", children: user.specialistLocations.map((slug)=>/*#__PURE__*/ _jsxs("span", { className: "bg-emerald-50 text-emerald-700 text-sm px-3 py-1 rounded-full", children: [ "\uD83D\uDCCD ", slug ] }, slug)) }) ] }) ] }), user.role === 'specialist' && /*#__PURE__*/ _jsxs("div", { className: "bg-white rounded-xl border border-gray-200 p-6 mb-6", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center justify-between mb-4", children: [ /*#__PURE__*/ _jsxs("h2", { className: "font-bold text-gray-900 text-lg", children: [ "\uD83D\uDCC5 ", t('nav.schedule') ] }), /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-3 text-xs text-gray-500", children: [ /*#__PURE__*/ _jsxs("span", { className: "flex items-center gap-1.5", children: [ /*#__PURE__*/ _jsx("span", { className: "w-3 h-3 rounded bg-emerald-200 border border-emerald-400 inline-block" }), t('schedule.available') ] }), /*#__PURE__*/ _jsxs("span", { className: "flex items-center gap-1.5", children: [ /*#__PURE__*/ _jsx("span", { className: "w-3 h-3 rounded bg-red-200 border border-red-400 inline-block" }), t('schedule.busy') ] }) ] }) ] }), /*#__PURE__*/ _jsx(ReadOnlyCalendar, { year: availYear, month: availMonth, availMap: availMap, today: today, onPrev: ()=>{ if (availMonth === 0) { setAvailYear((y)=>y - 1); setAvailMonth(11); } else setAvailMonth((m)=>m - 1); }, onNext: ()=>{ if (availMonth === 11) { setAvailYear((y)=>y + 1); setAvailMonth(0); } else setAvailMonth((m)=>m + 1); } }) ] }), (user.role === 'specialist' || user.role === 'admin') && specialistCards.length > 0 && /*#__PURE__*/ _jsxs("div", { className: "space-y-4 mb-6", children: [ /*#__PURE__*/ _jsx("h2", { className: "font-bold text-white text-lg", children: t('user.specialist_cards') }), specialistCards.map((card)=>/*#__PURE__*/ _jsx(PublicCardView, { card: card, locale: locale, catMap: catMap, locMap: locMap }, card.id)) ] }), /*#__PURE__*/ _jsxs("div", { className: "bg-white rounded-xl border border-gray-200 p-6", children: [ /*#__PURE__*/ _jsxs("h2", { className: "font-bold text-gray-900 text-lg mb-4", children: [ t('profile.reviews'), reviews.length > 0 && /*#__PURE__*/ _jsxs("span", { className: "text-gray-400 font-normal text-base ml-2", children: [ "(", reviews.length, ")" ] }) ] }), reviews.length === 0 ? /*#__PURE__*/ _jsx("p", { className: "text-gray-500 text-sm", children: t('profile.no_reviews') }) : /*#__PURE__*/ _jsx("div", { className: "space-y-4", children: reviews.map(({ review, author })=>/*#__PURE__*/ _jsx("div", { className: "border-b border-gray-50 pb-4 last:border-0 last:pb-0", children: /*#__PURE__*/ _jsxs("div", { className: "flex items-start gap-3", children: [ /*#__PURE__*/ _jsx("div", { className: "w-8 h-8 rounded-full bg-gray-100 flex-shrink-0 flex items-center justify-center text-gray-600 text-sm font-bold overflow-hidden", children: author?.image ? /*#__PURE__*/ _jsx("img", { src: author.image, alt: author.name, className: "w-full h-full object-cover" }) : author?.name?.[0]?.toUpperCase() ?? '?' }), /*#__PURE__*/ _jsxs("div", { className: "flex-1", children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center gap-2 mb-1", children: [ /*#__PURE__*/ _jsx("span", { className: "text-sm font-medium text-gray-800", children: shortName(author?.name) ?? '—' }), /*#__PURE__*/ _jsxs("span", { className: "text-yellow-400", children: [ '★'.repeat(review.rating), '☆'.repeat(5 - review.rating) ] }) ] }), review.comment && /*#__PURE__*/ _jsx("p", { className: "text-sm text-gray-600", children: review.comment }), /*#__PURE__*/ _jsx("p", { className: "text-xs text-gray-400 mt-1", children: new Date(review.createdAt).toLocaleDateString(dateLocale) }) ] }) ] }) }, review.id)) }) ] }) ] }); } function ReadOnlyCalendar({ year, month, availMap, today, onPrev, onNext }) { const { locale, t } = useLocale(); const weekDays = WEEK_DAYS_BY_LOCALE[locale] ?? WEEK_DAYS_BY_LOCALE.ru; const months = MONTHS_BY_LOCALE[locale] ?? MONTHS_BY_LOCALE.ru; const firstDay = new Date(year, month, 1); const startDow = (firstDay.getDay() + 6) % 7; const daysInMonth = new Date(year, month + 1, 0).getDate(); const prevMonthDays = new Date(year, month, 0).getDate(); const cells = []; for(let i = startDow - 1; i >= 0; i--){ cells.push({ day: prevMonthDays - i, cur: false, dateKey: '' }); } for(let d = 1; d <= daysInMonth; d++){ const dateKey = `${year}-${String(month + 1).padStart(2, '0')}-${String(d).padStart(2, '0')}`; cells.push({ day: d, cur: true, dateKey }); } const remainder = cells.length % 7; if (remainder !== 0) { for(let d = 1; d <= 7 - remainder; d++){ cells.push({ day: d, cur: false, dateKey: '' }); } } const monthPrefix = `${year}-${String(month + 1).padStart(2, '0')}`; const availCount = Object.entries(availMap).filter(([k, v])=>k.startsWith(monthPrefix) && k >= today && v === 'available').length; return /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsxs("div", { className: "flex items-center justify-between mb-3", children: [ /*#__PURE__*/ _jsx("button", { onClick: onPrev, className: "w-7 h-7 rounded-lg hover:bg-gray-100 flex items-center justify-center text-gray-500", children: "‹" }), /*#__PURE__*/ _jsxs("div", { className: "text-center", children: [ /*#__PURE__*/ _jsxs("span", { className: "font-medium text-gray-800 text-sm", children: [ months[month], " ", year ] }), availCount > 0 && /*#__PURE__*/ _jsxs("span", { className: "ml-2 text-xs text-emerald-600", children: [ availCount, " ", t('schedule.free_days') ] }) ] }), /*#__PURE__*/ _jsx("button", { onClick: onNext, className: "w-7 h-7 rounded-lg hover:bg-gray-100 flex items-center justify-center text-gray-500", children: "›" }) ] }), /*#__PURE__*/ _jsx("div", { className: "grid grid-cols-7 mb-1", children: weekDays.map((d)=>/*#__PURE__*/ _jsx("div", { className: "text-center text-xs text-gray-400 py-1", children: d }, d)) }), /*#__PURE__*/ _jsx("div", { className: "grid grid-cols-7 gap-0.5", children: cells.map((cell, idx)=>{ if (!cell.cur) { return /*#__PURE__*/ _jsx("div", { className: "h-9 flex items-center justify-center text-xs text-gray-200", children: cell.day }, `e-${idx}`); } const status = availMap[cell.dateKey]; const isPast = cell.dateKey < today; const isToday = cell.dateKey === today; let cls = 'h-9 flex items-center justify-center rounded-lg text-sm font-medium '; if (isPast) { cls += 'text-gray-200 '; } else if (status === 'available') { cls += 'bg-emerald-100 border border-emerald-300 text-emerald-700 '; } else if (status === 'busy') { cls += 'bg-red-100 border border-red-300 text-red-600 '; } else { cls += 'text-gray-500 '; } if (isToday) cls += 'ring-2 ring-blue-400 ring-offset-1 '; return /*#__PURE__*/ _jsx("div", { className: cls, children: cell.day }, cell.dateKey); }) }) ] }); } // ─── Public card view ───────────────────────────────────────────────────────── function flattenTree(nodes) { return nodes.flatMap((n)=>[ n, ...flattenTree(n.children ?? []) ]); } function PublicCardView({ card, locale, catMap, locMap }) { const [lightbox, setLightbox] = useState(null); const lbl = (ru, en, el)=>locale === 'ru' ? ru : locale === 'en' ? en : el; return /*#__PURE__*/ _jsxs("div", { className: "bg-white rounded-xl border border-gray-200 overflow-hidden", children: [ /*#__PURE__*/ _jsxs("div", { className: "px-5 py-4 border-b border-gray-100", children: [ /*#__PURE__*/ _jsx("h3", { className: "font-bold text-gray-900", children: card.title }), card.description && /*#__PURE__*/ _jsx("p", { className: "text-sm text-gray-600 mt-1", children: card.description }) ] }), /*#__PURE__*/ _jsxs("div", { className: "p-5 space-y-4", children: [ card.skills && card.skills.length > 0 && /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("p", { className: "text-xs font-semibold text-gray-500 uppercase tracking-wide mb-2", children: lbl('Навыки', 'Skills', 'Δεξιότητες') }), /*#__PURE__*/ _jsx("div", { className: "flex flex-wrap gap-2", children: card.skills.map((s)=>/*#__PURE__*/ _jsx("span", { className: "bg-blue-50 text-blue-700 text-sm px-3 py-1 rounded-full", children: s }, s)) }) ] }), card.categories && card.categories.length > 0 && /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("p", { className: "text-xs font-semibold text-gray-500 uppercase tracking-wide mb-2", children: lbl('Категории', 'Categories', 'Κατηγορίες') }), /*#__PURE__*/ _jsx("div", { className: "flex flex-wrap gap-2", children: card.categories.map((s)=>{ const cat = catMap.get(s); const name = cat ? cat.names?.[locale] || cat.names?.el || s : s; return /*#__PURE__*/ _jsxs("span", { className: "bg-purple-50 text-purple-700 text-sm px-3 py-1 rounded-full", children: [ cat?.icon ? `${cat.icon} ` : '', name ] }, s); }) }) ] }), card.locations && card.locations.length > 0 && /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("p", { className: "text-xs font-semibold text-gray-500 uppercase tracking-wide mb-2", children: lbl('Район работы', 'Work area', 'Περιοχή εργασίας') }), /*#__PURE__*/ _jsx("div", { className: "flex flex-wrap gap-2", children: card.locations.map((s)=>{ const loc = locMap.get(s); const name = loc ? loc.names?.[locale] || loc.names?.el || s : s; return /*#__PURE__*/ _jsxs("span", { className: "bg-emerald-50 text-emerald-700 text-sm px-3 py-1 rounded-full", children: [ "\uD83D\uDCCD ", name ] }, s); }) }) ] }), card.portfolio && card.portfolio.length > 0 && /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("p", { className: "text-xs font-semibold text-gray-500 uppercase tracking-wide mb-2", children: lbl('Галерея работ', 'Portfolio', 'Χαρτοφυλάκιο') }), /*#__PURE__*/ _jsx("div", { className: "grid grid-cols-2 sm:grid-cols-3 gap-3", children: card.portfolio.map((item)=>/*#__PURE__*/ _jsxs("button", { type: "button", onClick: ()=>setLightbox(item), className: "group relative rounded-xl overflow-hidden border border-gray-200 bg-gray-50 text-left", children: [ /*#__PURE__*/ _jsx("img", { src: item.imageUrl, alt: item.title ?? '', className: "w-full aspect-square object-cover group-hover:scale-105 transition-transform duration-200" }), item.title && /*#__PURE__*/ _jsx("div", { className: "px-2 py-1.5", children: /*#__PURE__*/ _jsx("p", { className: "text-xs font-medium text-gray-700 truncate", children: item.title }) }) ] }, item.id)) }) ] }) ] }), lightbox && /*#__PURE__*/ _jsx("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/80 px-4", onClick: ()=>setLightbox(null), children: /*#__PURE__*/ _jsxs("div", { className: "bg-white rounded-2xl overflow-hidden max-w-lg w-full shadow-2xl", onClick: (e)=>e.stopPropagation(), children: [ /*#__PURE__*/ _jsx("img", { src: lightbox.imageUrl, alt: lightbox.title ?? '', className: "w-full max-h-[60vh] object-contain bg-gray-900" }), (lightbox.title || lightbox.description) && /*#__PURE__*/ _jsxs("div", { className: "p-4", children: [ lightbox.title && /*#__PURE__*/ _jsx("p", { className: "font-semibold text-gray-800 mb-1", children: lightbox.title }), lightbox.description && /*#__PURE__*/ _jsx("p", { className: "text-sm text-gray-600", children: lightbox.description }) ] }), /*#__PURE__*/ _jsx("div", { className: "flex justify-end px-4 pb-4", children: /*#__PURE__*/ _jsx("button", { type: "button", onClick: ()=>setLightbox(null), className: "text-sm text-gray-500 hover:text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100", children: lbl('Закрыть', 'Close', 'Κλείσιμο') }) }) ] }) }) ] }); } #B61123undefined125168undefined170224undefined226270undefined272311undefined313573undefined575633undefined635696undefined698751undefined753803undefined19331947undefined19962004__WEBPACK_MODULE_REFERENCE__2_5b22757365506172616d73225d_call_directImport_asiSafe1__._undefined20352043__WEBPACK_MODULE_REFERENCE__3_5b227573654c6f63616c65225d_call_directImport_asiSafe1__._undefined20782087__WEBPACK_MODULE_REFERENCE__4_5b2275736553657373696f6e225d_call_directImport_asiSafe1__._undefined21112119__WEBPACK_MODULE_REFERENCE__2_5b22757365526f75746572225d_call_directImport_asiSafe1__._undefined21522159__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined22022209__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined22482255__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined22982305__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined23642371__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined24102417__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined24632470__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined25242531__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined25812588__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined26382645__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined26872694__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined27892796__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined28582865__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined29202927__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined31343142__WEBPACK_MODULE_REFERENCE__1_5b22757365456666656374225d_call_directImport_asiSafe1__._undefined32093222__WEBPACK_MODULE_REFERENCE__5_5b226765745573657250726f66696c65225d_call_directImport_asiSafe1__._undefined32413254__WEBPACK_MODULE_REFERENCE__5_5b226765745573657252657669657773225d_call_directImport_asiSafe1__._undefined32733285__WEBPACK_MODULE_REFERENCE__5_5b2267657455736572526174696e67225d_call_directImport_asiSafe1__._undefined33043316__WEBPACK_MODULE_REFERENCE__5_5b2267657443617465676f72696573225d_call_directImport_asiSafe1__._undefined33473358__WEBPACK_MODULE_REFERENCE__5_5b226765744c6f636174696f6e73225d_call_directImport_asiSafe1__._undefined38453862__WEBPACK_MODULE_REFERENCE__5_5b226765745370656369616c6973744361726473225d_call_directImport_asiSafe1__._undefined41134121__WEBPACK_MODULE_REFERENCE__1_5b22757365456666656374225d_call_directImport_asiSafe1__._undefined41744195__WEBPACK_MODULE_REFERENCE__5_5b226765745370656369616c6973744661766f7269746573225d_call_directImport_asiSafe1__._undefined44264438__WEBPACK_MODULE_REFERENCE__5_5b2267657443616e4d657373616765225d_call_directImport_asiSafe1__._undefined46934716__WEBPACK_MODULE_REFERENCE__5_5b2272656d6f76655370656369616c6973744661766f72697465225d_call_directImport_asiSafe1__._undefined48044824__WEBPACK_MODULE_REFERENCE__5_5b226164645370656369616c6973744661766f72697465225d_call_directImport_asiSafe1__._undefined51425162__WEBPACK_MODULE_REFERENCE__5_5b226765744f72437265617465446972656374526f6f6d225d_call_directImport_asiSafe1__._undefined53305338__WEBPACK_MODULE_REFERENCE__1_5b22757365456666656374225d_call_directImport_asiSafe1__._undefined54635487__WEBPACK_MODULE_REFERENCE__5_5b226765745370656369616c697374417661696c6162696c697479225d_call_directImport_asiSafe1__._undefined59075910__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined60546057__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined63246338__WEBPACK_MODULE_REFERENCE__8_5b22666f726d617453686f72744e616d65225d_call_directImport_asiSafe1__._undefined67506754__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined68626866__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined70217025__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined71757178__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined74607463__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined77777781__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined79477951__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined81658168__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined84938496__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined84988506__WEBPACK_MODULE_REFERENCE__10_5b22506c616e4261646765225d_directImport_asiSafe1__._undefined88798882__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined88848892__WEBPACK_MODULE_REFERENCE__10_5b22506c616e4261646765225d_directImport_asiSafe1__._undefined91889191__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined96519655__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined99829985__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1050610510__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1083410837__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1129511299__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1155811561__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1156311575__WEBPACK_MODULE_REFERENCE__7_5b225570677261646550726f6d7074225d_directImport_asiSafe1__._undefined1196211966__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1251612519__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1303813041__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1367413677__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1402614030__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1480014803__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1505215055__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1562315627__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1583315836__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1610216105__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1639716401__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1711217116__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1755117555__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1780717820__WEBPACK_MODULE_REFERENCE__9_5b22666f726d61744c6173745365656e225d_call_directImport_asiSafe1__._undefined1818118184__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1841918423__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1860918612__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1896218965__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1946219465__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1982619830__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1998619989__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2033920342__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2070220706__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2133521339__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2150121504__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2176121764__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2426724271__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2455824561__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2474724750__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2518925193__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2535525358__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2561825621__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2578025783__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2625426258__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2642026423__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2667826681__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2685326856__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2732727331__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2749327496__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2775027753__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2792427928__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2847628480__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2863528639__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2880528809__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2915629160__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2935729361__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2956329566__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2995729961__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3016330166__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3064230645__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3157831582__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3170031703__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3192731930__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3221832222__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3237232376__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3261132615__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3306333066__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3323233235__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3337633379__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3354533549__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3373533738__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3401934022__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3444134445__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3463934643__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3488334886__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3507635084__WEBPACK_MODULE_REFERENCE__8_5b2273686f72744e616d65225d_call_directImport_asiSafe1__._undefined3523735241__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3590735910__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3619836201__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3685936867__WEBPACK_MODULE_REFERENCE__3_5b227573654c6f63616c65225d_call_directImport_asiSafe1__._undefined3816238166__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3822338227__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3836938372__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3864538649__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3878838792__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3918739191__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3962139624__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3992239925__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4004640049__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4024240245__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4044440447__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4153241535__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4203542042__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined4215642160__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4229842302__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4244042443__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4263842641__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4284942853__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4301143015__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4310443107__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4338143384__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4353943542__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4392343927__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4401644019__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4430044303__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4467244676__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4526245266__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4535545358__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4564745650__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4601846022__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4659446598__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4668746690__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4697646979__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4715747161__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4755347556__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4797747980__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4813748140__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4867248675__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4887348877__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4911149114__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4943049434__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4959549598__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4985749860__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5013950142__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5027450277__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined]12471333(0,navigation.useParams)undefined13641450(0,context_locale/* useLocale */.Y)undefined14851573(0,auth/* useSession */.wV)undefined15971683(0,navigation.useRouter)undefined17161800(0,react.useState)undefined18431927(0,react.useState)undefined19662050(0,react.useState)undefined20932177(0,react.useState)undefined22362320(0,react.useState)undefined23592443(0,react.useState)undefined24892573(0,react.useState)undefined26272711(0,react.useState)undefined27612845(0,react.useState)undefined28952979(0,react.useState)undefined30213105(0,react.useState)undefined32003284(0,react.useState)undefined33463430(0,react.useState)undefined34853569(0,react.useState)undefined37763862(0,react.useEffect)undefined39294025(0,api/* getUserProfile */.VM)undefined40444140(0,api/* getUserReviews */.v9)undefined41594253(0,api/* getUserRating */.Bm)undefined42724366(0,api/* getCategories */.bW)undefined43974489(0,api/* getLocations */.Vs)undefined49765080(0,api/* getSpecialistCards */.Bq)undefined53315417(0,react.useEffect)undefined54705582(0,api/* getSpecialistFavorites */.pD)undefined58135907(0,api/* getCanMessage */.On)undefined61626278(0,api/* removeSpecialistFavorite */.sD)undefined63666476(0,api/* addSpecialistFavorite */.V)undefined67946904(0,api/* getOrCreateDirectRoom */.QN)undefined70727158(0,react.useEffect)undefined72837401(0,api/* getSpecialistAvailability */.Xz)undefined78217895(0,react_jsx_runtime.jsx)undefined80398113(0,react_jsx_runtime.jsx)undefined83808478(0,formatName/* formatShortName */.H)undefined88908966(0,react_jsx_runtime.jsxs)undefined90749150(0,react_jsx_runtime.jsxs)undefined93059381(0,react_jsx_runtime.jsxs)undefined95319605(0,react_jsx_runtime.jsx)undefined98879961(0,react_jsx_runtime.jsx)undefined1027510351(0,react_jsx_runtime.jsxs)undefined1051710593(0,react_jsx_runtime.jsxs)undefined1080710881(0,react_jsx_runtime.jsx)undefined1120611280(0,react_jsx_runtime.jsx)undefined1128211364PlanBadge/* PlanBadge */.dundefined1173711811(0,react_jsx_runtime.jsx)undefined1181311895PlanBadge/* PlanBadge */.dundefined1219112265(0,react_jsx_runtime.jsx)undefined1272512801(0,react_jsx_runtime.jsxs)undefined1312813202(0,react_jsx_runtime.jsx)undefined1372313799(0,react_jsx_runtime.jsxs)undefined1412314197(0,react_jsx_runtime.jsx)undefined1465514731(0,react_jsx_runtime.jsxs)undefined1499015064(0,react_jsx_runtime.jsx)undefined1506615155UpgradePromptundefined1554215618(0,react_jsx_runtime.jsxs)undefined1616816242(0,react_jsx_runtime.jsx)undefined1676116835(0,react_jsx_runtime.jsx)undefined1746817542(0,react_jsx_runtime.jsx)undefined1789117967(0,react_jsx_runtime.jsxs)undefined1873718811(0,react_jsx_runtime.jsx)undefined1906019134(0,react_jsx_runtime.jsx)undefined1970219778(0,react_jsx_runtime.jsxs)undefined1998420058(0,react_jsx_runtime.jsx)undefined2032420398(0,react_jsx_runtime.jsx)undefined2069020766(0,react_jsx_runtime.jsxs)undefined2147721553(0,react_jsx_runtime.jsxs)undefined2198822064(0,react_jsx_runtime.jsxs)undefined2231622412(0,formatLastSeen/* formatLastSeen */.V)undefined2277322847(0,react_jsx_runtime.jsx)undefined2308223158(0,react_jsx_runtime.jsxs)undefined2334423418(0,react_jsx_runtime.jsx)undefined2376823842(0,react_jsx_runtime.jsx)undefined2433924413(0,react_jsx_runtime.jsx)undefined2477424850(0,react_jsx_runtime.jsxs)undefined2500625080(0,react_jsx_runtime.jsx)undefined2543025504(0,react_jsx_runtime.jsx)undefined2586425940(0,react_jsx_runtime.jsxs)undefined2656926645(0,react_jsx_runtime.jsxs)undefined2680726881(0,react_jsx_runtime.jsx)undefined2713827212(0,react_jsx_runtime.jsx)undefined2971529791(0,react_jsx_runtime.jsxs)undefined3007830152(0,react_jsx_runtime.jsx)undefined3033830412(0,react_jsx_runtime.jsx)undefined3085130927(0,react_jsx_runtime.jsxs)undefined3108931163(0,react_jsx_runtime.jsx)undefined3142331497(0,react_jsx_runtime.jsx)undefined3165631730(0,react_jsx_runtime.jsx)undefined3220132277(0,react_jsx_runtime.jsxs)undefined3243932513(0,react_jsx_runtime.jsx)undefined3276832842(0,react_jsx_runtime.jsx)undefined3301433088(0,react_jsx_runtime.jsx)undefined3355933635(0,react_jsx_runtime.jsxs)undefined3379733871(0,react_jsx_runtime.jsx)undefined3412534199(0,react_jsx_runtime.jsx)undefined3437034446(0,react_jsx_runtime.jsxs)undefined3499435070(0,react_jsx_runtime.jsxs)undefined3522535301(0,react_jsx_runtime.jsxs)undefined3546735543(0,react_jsx_runtime.jsxs)undefined3589035966(0,react_jsx_runtime.jsxs)undefined3616336239(0,react_jsx_runtime.jsxs)undefined3644136515(0,react_jsx_runtime.jsx)undefined3690636982(0,react_jsx_runtime.jsxs)undefined3718437258(0,react_jsx_runtime.jsx)undefined3773437808(0,react_jsx_runtime.jsx)undefined3874138817(0,react_jsx_runtime.jsxs)undefined3893539009(0,react_jsx_runtime.jsx)undefined3923339307(0,react_jsx_runtime.jsx)undefined3959539671(0,react_jsx_runtime.jsxs)undefined3982139897(0,react_jsx_runtime.jsxs)undefined4013240208(0,react_jsx_runtime.jsxs)undefined4065640730(0,react_jsx_runtime.jsx)undefined4089640970(0,react_jsx_runtime.jsx)undefined4111141185(0,react_jsx_runtime.jsx)undefined4135141427(0,react_jsx_runtime.jsxs)undefined4161341687(0,react_jsx_runtime.jsx)undefined4196842042(0,react_jsx_runtime.jsx)undefined4246142537(0,react_jsx_runtime.jsxs)undefined4273142807(0,react_jsx_runtime.jsxs)undefined4304743121(0,react_jsx_runtime.jsx)undefined4331143397(0,formatName/* shortName */.E)undefined4355043626(0,react_jsx_runtime.jsxs)undefined4429244366(0,react_jsx_runtime.jsx)undefined4465444728(0,react_jsx_runtime.jsx)undefined4538645472(0,context_locale/* useLocale */.Y)undefined4676746843(0,react_jsx_runtime.jsxs)undefined4690046976(0,react_jsx_runtime.jsxs)undefined4711847192(0,react_jsx_runtime.jsx)undefined4746547541(0,react_jsx_runtime.jsxs)undefined4768047756(0,react_jsx_runtime.jsxs)undefined4815148227(0,react_jsx_runtime.jsxs)undefined4865748731(0,react_jsx_runtime.jsx)undefined4902949103(0,react_jsx_runtime.jsx)undefined4922449298(0,react_jsx_runtime.jsx)undefined4949149565(0,react_jsx_runtime.jsx)undefined4976449838(0,react_jsx_runtime.jsx)undefined5092350997(0,react_jsx_runtime.jsx)undefined5149751581(0,react.useState)undefined5169551771(0,react_jsx_runtime.jsxs)undefined5190951985(0,react_jsx_runtime.jsxs)undefined5212352197(0,react_jsx_runtime.jsx)undefined5239252466(0,react_jsx_runtime.jsx)undefined5267452750(0,react_jsx_runtime.jsxs)undefined5290852984(0,react_jsx_runtime.jsxs)undefined5307353147(0,react_jsx_runtime.jsx)undefined5342153495(0,react_jsx_runtime.jsx)undefined5365053724(0,react_jsx_runtime.jsx)undefined5410554181(0,react_jsx_runtime.jsxs)undefined5427054344(0,react_jsx_runtime.jsx)undefined5462554699(0,react_jsx_runtime.jsx)undefined5506855144(0,react_jsx_runtime.jsxs)undefined5573055806(0,react_jsx_runtime.jsxs)undefined5589555969(0,react_jsx_runtime.jsx)undefined5625856332(0,react_jsx_runtime.jsx)undefined5670056776(0,react_jsx_runtime.jsxs)undefined5734857424(0,react_jsx_runtime.jsxs)undefined5751357587(0,react_jsx_runtime.jsx)undefined5787357947(0,react_jsx_runtime.jsx)undefined5812558201(0,react_jsx_runtime.jsxs)undefined5859358667(0,react_jsx_runtime.jsx)undefined5908859162(0,react_jsx_runtime.jsx)undefined5931959393(0,react_jsx_runtime.jsx)undefined5992559999(0,react_jsx_runtime.jsx)undefined6019760273(0,react_jsx_runtime.jsxs)undefined6050760581(0,react_jsx_runtime.jsx)undefined6089760973(0,react_jsx_runtime.jsxs)undefined6113461208(0,react_jsx_runtime.jsx)undefined6146761541(0,react_jsx_runtime.jsx)undefined6182061894(0,react_jsx_runtime.jsx)undefined6202662100(0,react_jsx_runtime.jsx)undefined`tierLabelstierColorstierBtnColorsUpgradePromptLockIconUpgradePrompt_namespaceObjectformatNameformatLastSeenMONTHS_BY_LOCALEWEEK_DAYS_BY_LOCALEUserProfilePageReadOnlyCalendarflattenTreePublicCardView+