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SAAA,CAAAA,GAAA,KAAAI,UAAA,CAC7B,CACA,EACA,CACAA,WAAA,CAAoB1G,MAAAkE,OAAAkE,MAAA,CAAA7B,EAAA,EACpBD,UAAA,CAAmBtG,MAAAkE,OAAAkE,MAAA,CAAA9B,EAAA,CACnB,EAEA,EAlHA,CACA0B,KAAA,SAAAhI,CAAA,EAIA,MAHA,MAAAA,CAAA,KACAA,CAAAA,EAAAA,EAAA6H,KAAA,QAEA7H,EAAAgH,OAAA,oBAAsCC,mBACtC,EACAM,MAAA,SAAAvH,CAAA,EACA,OAAA+G,mBAAA/G,GAAAgH,OAAA,CACA,2CACAC,mBAEA,CACA,EAuGA,CAAmC5I,KAAA","sources":["webpack://_N_E/?3114","webpack://_N_E/./src/app/[lang]/(guest)/layout.tsx","webpack://_N_E/./src/components/providers/AuthProvider.tsx","webpack://_N_E/./src/libs/apiUrls.ts","webpack://_N_E/../../node_modules/next/dist/compiled/react/cjs/react-jsx-runtime.production.min.js","webpack://_N_E/../../node_modules/next/dist/compiled/react/jsx-runtime.js","webpack://_N_E/../../node_modules/next/navigation.js","webpack://_N_E/../../node_modules/next/script.js","webpack://_N_E/../../node_modules/js-cookie/dist/js.cookie.mjs","webpack://_N_E/"],"sourcesContent":["import(/* webpackMode: \"eager\" */ \"/codebuild/output/src487489695/src/frontend/apps/researchers/src/app/[lang]/(guest)/layout.tsx\")","'use client'\nimport Script from 'next/script'\nimport { getTUser, getToken } from '@/components/providers/AuthProvider'\nimport { appUrls } from '@/libs/appUrls'\nimport { redirect } from 'next/navigation'\nimport { usePathname } from 'next/navigation'\nimport { useEffect } from 'react'\n\n// 環境変数から GTM のコンテナID を取得\nconst GA_MEASUREMENT_ID = process.env.NEXT_PUBLIC_GOOGLE_ANALYTICS_ID || ''\n/**\n * GATracking コンポーネント\n * - ページ遷移時に dataLayer に pageview イベントを送信します。\n * - 認証済みの場合はユーザーID (tUser.id) を一緒に送信します。\n */\nfunction GATracking() {\n const pathname = usePathname()\n useEffect(() => {\n const handleRouteChange = (url: string) => {\n window.gtag('config', GA_MEASUREMENT_ID, {\n page_path: url,\n })\n }\n\n handleRouteChange(pathname)\n }, [pathname])\n\n return null\n}\n\nexport default function layout({\n params: { lang },\n children,\n}: {\n params: { lang: string }\n children: React.ReactNode\n}) {\n // ログイン済の場合にリダイレクトする\n if (getTUser() && getToken()) {\n redirect(appUrls.index(lang))\n }\n\n return (\n <>\n {/* gtag.js のスクリプト読み込み */}\n \n \n \n {children}\n \n )\n}\n","'use client'\n\nimport { useRouter } from 'next/navigation'\nimport { TUser } from '@/libs/types/TUser'\nimport { ReactNode, createContext, useContext, useEffect, useState } from 'react'\nimport { appUrls } from '@/libs/appUrls'\nimport { apiUrls } from '@/libs/apiUrls'\nimport Cookies from 'js-cookie'\nimport { useLocale } from '@/features/i18n/hooks/useLocale'\n\nexport function getTUser(): TUser | undefined {\n const json = window.sessionStorage.getItem('user') ?? Cookies.get('user')\n return json && JSON.parse(json)\n}\n\nexport function setTUser(tUser: TUser, remember: boolean) {\n const json = JSON.stringify(tUser)\n const expires = remember ? 30 : 0.5 // 30 or 0.5日\n Cookies.set('user', json, { secure: true, expires: expires, path: '/' })\n}\n\nexport function getToken(): string | undefined {\n return window.sessionStorage.getItem('token') ?? Cookies.get('token')\n}\n\nexport function setToken(token: string, remember: boolean) {\n const expires = remember ? 30 : 0.5 // 30 or 0.5日\n Cookies.set('token', token, { secure: true, expires: expires, path: '/' })\n}\n\ninterface Props {\n tUser: TUser\n token: string\n signOut: () => void\n}\n\nconst AuthContext = createContext(undefined)\n\nexport const AuthProvider = ({ children }: { children: ReactNode }) => {\n const { locale } = useLocale()\n const router = useRouter()\n\n const [tUser, setTUser] = useState()\n const [token, setToken] = useState()\n\n useEffect(() => {\n const tUser = getTUser()\n const token = getToken()\n if (tUser && token) {\n setTUser(tUser)\n setToken(token)\n } else {\n router.push(appUrls.login(locale))\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [])\n\n const signOut = () => {\n if (!tUser || !token) {\n setTUser(undefined)\n setToken(undefined)\n window.sessionStorage.removeItem('user')\n window.sessionStorage.removeItem('token')\n\n router.push(appUrls.login(locale))\n return\n }\n\n const data = {\n userId: tUser.id,\n roleId: 30, // 研究者ユーザーと企業ユーザーの設定値を分ける処理(研究者: 30, 企業: 200)\n token: token,\n pageViewCount: 0,\n }\n\n setTUser(undefined)\n setToken(undefined)\n window.sessionStorage.removeItem('user')\n window.sessionStorage.removeItem('token')\n Cookies.remove('user')\n Cookies.remove('token')\n\n fetch(apiUrls.auth.logout(), {\n method: 'post',\n body: JSON.stringify(data),\n headers: { Accept: 'application/json', 'Content-Type': 'application/json;charset=utf-8' },\n cache: 'no-store',\n })\n\n router.push(appUrls.login(locale))\n }\n\n const context = {\n tUser: tUser!,\n token: token!,\n signOut,\n }\n return {children}\n}\n\nexport const useAuth = (): Props => {\n const context = useContext(AuthContext)\n\n if (!context) {\n throw new Error('context is missing')\n }\n\n return context\n}\n","export const apiUrls = {\n apiHost: () => {\n return process.env.NEXT_PUBLIC_API_DOMAIN ?? ''\n },\n auth: {\n login: () => `${apiUrls.apiHost()}/api/user/doLogin`,\n logout: () => `${apiUrls.apiHost()}/api/user/invalidateUser`,\n },\n user: {\n changePassword: () => `${apiUrls.apiHost()}/api/user/changePassWord`,\n changeUserEmail: () => `${apiUrls.apiHost()}/api/email/changeUserEmail`,\n sendResetPasswordEmail: () => `${apiUrls.apiHost()}/api/email/checkUser`,\n getResearchArea: () => `${apiUrls.apiHost()}/api/user/getResearchArea`,\n checkAccountExist: () => `${apiUrls.apiHost()}/api/user/checkAccountExist`,\n doRegister: () => `${apiUrls.apiHost()}/api/user/doRegister`,\n doFollow: () => `${apiUrls.apiHost()}/api/user/doFollow`,\n },\n company: {\n getCompanyInfo: () => `${apiUrls.apiHost()}/api/company/getCompanyInfoByID`,\n },\n personal: {\n getPersonInfo: () => `${apiUrls.apiHost()}/api/personal/getPersonInfo`,\n savePersonInfo: () => `${apiUrls.apiHost()}/api/personal/savePersonInfo`,\n getWorkExperience: () => `${apiUrls.apiHost()}/api/personal/getWorkExperience`,\n addWorkExperience: () => `${apiUrls.apiHost()}/api/personal/addWorkExperience`,\n editWorkExperience: () => `${apiUrls.apiHost()}/api/personal/editWorkExperience`,\n deleteWorkExperience: () => `${apiUrls.apiHost()}/api/personal/deleteWorkExperience`,\n getPaperByPersonId: () => `${apiUrls.apiHost()}/api/personal/getPaperByPersonId`,\n getAchievementByPersonId: () => `${apiUrls.apiHost()}/api/personal/getAchievementByPersonId`,\n upAchievement: () => `${apiUrls.apiHost()}/api/personal/upResearchAchievement`,\n updateAchievement: () => `${apiUrls.apiHost()}/api/personal/updateResearchAchievement`,\n deleteAchievement: () => `${apiUrls.apiHost()}/api/personal/deleteResearchAchievement`,\n upPaper: () => `${apiUrls.apiHost()}/api/personal/upPaper`,\n uploadPaper: () => `${apiUrls.apiHost()}/api/personal/uploadPaper`,\n updatePaper: () => `${apiUrls.apiHost()}/api/personal/updatePaper`,\n deletePaper: () => `${apiUrls.apiHost()}/api/personal/deletePaper`,\n getRecruitmentInfoList: () => `${apiUrls.apiHost()}/api/company/getRecruitmentInfoList`,\n getRecruitmentSimilarList: () => `${apiUrls.apiHost()}/api/company/getSimilarRecruitment`,\n getRecruitmentList: () => `${apiUrls.apiHost()}/api/company/getRecruitmentList`,\n getRecruitmentRecentList: () => `${apiUrls.apiHost()}/api/history/getRecentlyView`,\n saveRecruitmentRecent: () => `${apiUrls.apiHost()}/api/history/saveViewedJobHistory`,\n getFollowList: () => `${apiUrls.apiHost()}/api/company/getFollowList`,\n createJobInfo: () => `${apiUrls.apiHost()}/api/personal/addJobInfo`,\n editJobInfo: () => `${apiUrls.apiHost()}/api/personal/modJobInfo`,\n },\n recruitment: {\n addInterview: () => `${apiUrls.apiHost()}/api/interview/addInterview`,\n getFillPercent: () => `${apiUrls.apiHost()}/api/personal/getFillPercent`,\n },\n chat: {\n list: () => `${apiUrls.apiHost()}/api/chat/getChatInfo`,\n archiveList: () => `${apiUrls.apiHost()}/api/chat/getArchivedChatInfo`,\n messages: () => `${apiUrls.apiHost()}/api/chat/getChatMessage`,\n archive: () => `${apiUrls.apiHost()}/api/chat/archive`,\n delete: () => `${apiUrls.apiHost()}/api/chat/deleteChatInfo`,\n count: () => `${apiUrls.apiHost()}/api/chat/getChatCount`,\n sendReminder: () => `${apiUrls.apiHost()}/api/chat/emailMessageReminder`,\n sendRecruit: () => `${apiUrls.apiHost()}/api/chat/saveRecruitMsg`,\n send: () => `${apiUrls.apiHost()}/api/chat/saveRecruitMsg`,\n getChatInfoOfOtherSend: () => `${apiUrls.apiHost()}/api/chat/getChatInfoOfOtherSend`,\n getChatInfoOfSelfSend: () => `${apiUrls.apiHost()}/api/chat/getChatInfoOfSelfSend`,\n },\n file: {\n upload: () => `${apiUrls.apiHost()}/page/file/upload`,\n uploadBase64: () => `${apiUrls.apiHost()}/api/file/uploadBase64Image`,\n },\n}\n","/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"next/dist/compiled/react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","module.exports = require('./dist/client/components/navigation')\n","module.exports = require('./dist/client/script')\n","/*! js-cookie v3.0.5 | MIT */\n/* eslint-disable no-var */\nfunction assign (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n target[key] = source[key];\n }\n }\n return target\n}\n/* eslint-enable no-var */\n\n/* eslint-disable no-var */\nvar defaultConverter = {\n read: function (value) {\n if (value[0] === '\"') {\n value = value.slice(1, -1);\n }\n return value.replace(/(%[\\dA-F]{2})+/gi, decodeURIComponent)\n },\n write: function (value) {\n return encodeURIComponent(value).replace(\n /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,\n decodeURIComponent\n )\n }\n};\n/* eslint-enable no-var */\n\n/* eslint-disable no-var */\n\nfunction init (converter, defaultAttributes) {\n function set (name, value, attributes) {\n if (typeof document === 'undefined') {\n return\n }\n\n attributes = assign({}, defaultAttributes, attributes);\n\n if (typeof attributes.expires === 'number') {\n attributes.expires = new Date(Date.now() + attributes.expires * 864e5);\n }\n if (attributes.expires) {\n attributes.expires = attributes.expires.toUTCString();\n }\n\n name = encodeURIComponent(name)\n .replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)\n .replace(/[()]/g, escape);\n\n var stringifiedAttributes = '';\n for (var attributeName in attributes) {\n if (!attributes[attributeName]) {\n continue\n }\n\n stringifiedAttributes += '; ' + attributeName;\n\n if (attributes[attributeName] === true) {\n continue\n }\n\n // Considers RFC 6265 section 5.2:\n // ...\n // 3. If the remaining unparsed-attributes contains a %x3B (\";\")\n // character:\n // Consume the characters of the unparsed-attributes up to,\n // not including, the first %x3B (\";\") character.\n // ...\n stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];\n }\n\n return (document.cookie =\n name + '=' + converter.write(value, name) + stringifiedAttributes)\n }\n\n function get (name) {\n if (typeof document === 'undefined' || (arguments.length && !name)) {\n return\n }\n\n // To prevent the for loop in the first place assign an empty array\n // in case there are no cookies at all.\n var cookies = document.cookie ? document.cookie.split('; ') : [];\n var jar = {};\n for (var i = 0; i < cookies.length; i++) {\n var parts = cookies[i].split('=');\n var value = parts.slice(1).join('=');\n\n try {\n var found = decodeURIComponent(parts[0]);\n jar[found] = converter.read(value, found);\n\n if (name === found) {\n break\n }\n } catch (e) {}\n }\n\n return name ? jar[name] : jar\n }\n\n return Object.create(\n {\n set,\n get,\n remove: function (name, attributes) {\n set(\n name,\n '',\n assign({}, attributes, {\n expires: -1\n })\n );\n },\n withAttributes: function (attributes) {\n return init(this.converter, assign({}, this.attributes, attributes))\n },\n withConverter: function (converter) {\n return init(assign({}, this.converter, converter), this.attributes)\n }\n },\n {\n attributes: { value: Object.freeze(defaultAttributes) },\n converter: { value: Object.freeze(converter) }\n }\n )\n}\n\nvar api = init(defaultConverter, { path: '/' });\n/* eslint-enable no-var */\n\nexport { api as default };\n"],"names":["Promise","resolve","then","__webpack_require__","bind","GA_MEASUREMENT_ID","process","GATracking","pathname","usePathname","useEffect","window","gtag","page_path","layout","param","params","lang","children","getTUser","getToken","redirect","appUrls","react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__","jsxs","Fragment","jsx","Script","src","concat","strategy","id","json","sessionStorage","getItem","Cookies","JSON","parse","setTUser","tUser","remember","stringify","secure","expires","path","setToken","token","AuthContext","createContext","undefined","AuthProvider","locale","useLocale","router","useRouter","useState","push","signOut","removeItem","data","userId","roleId","pageViewCount","fetch","apiUrls","method","body","headers","Accept","cache","Provider","value","useAuth","context","useContext","apiHost","auth","login","logout","user","changePassword","changeUserEmail","sendResetPasswordEmail","getResearchArea","checkAccountExist","doRegister","doFollow","company","getCompanyInfo","personal","getPersonInfo","savePersonInfo","getWorkExperience","addWorkExperience","editWorkExperience","deleteWorkExperience","getPaperByPersonId","getAchievementByPersonId","upAchievement","updateAchievement","deleteAchievement","upPaper","uploadPaper","updatePaper","deletePaper","getRecruitmentInfoList","getRecruitmentSimilarList","getRecruitmentList","getRecruitmentRecentList","saveRecruitmentRecent","getFollowList","createJobInfo","editJobInfo","recruitment","addInterview","getFillPercent","chat","list","archiveList","messages","archive","delete","count","sendReminder","sendRecruit","send","getChatInfoOfOtherSend","getChatInfoOfSelfSend","file","upload","uploadBase64","f","k","Symbol","for","l","m","Object","prototype","hasOwnProperty","n","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","ReactCurrentOwner","p","key","ref","__self","__source","q","c","a","g","b","d","e","h","call","defaultProps","$$typeof","type","props","_owner","current","exports","module","assign","target","i","arguments","length","source","api","init","converter","defaultAttributes","set","name","attributes","document","Date","now","toUTCString","encodeURIComponent","replace","decodeURIComponent","escape","stringifiedAttributes","attributeName","split","cookie","write","create","get","cookies","jar","parts","slice","join","found","read","remove","withAttributes","withConverter","freeze"],"sourceRoot":""}