PageSourceSearch

https://www.career-reveal.com/_next/static/chunks/1310.529f6354f265914a.js

js career-reveal.com collected 2026-10-05 11:17:37 UTC 9,803 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1310],{3786:(e,t,i)=>{i.d(t,{A:()=>s});let s=(0,i(84519).A)("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]])},11310:(e,t,i)=>{i.r(t),i.d(t,{CompanyDiversityInitiatives:()=>o});var s=i(58250),r=i(77911),a=i(38221),n=i(65684),l=i(62197),c=i(35989);function o(e){let{initiatives:t}=e;if(!t||0===t.length)return(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("h3",{className:"text-lg font-medium text-purple-700 dark:text-purple-300 flex items-center gap-2",children:[(0,s.jsx)(a.A,{className:"h-5 w-5"}),"多様性の取り組み"]}),(0,s.jsx)("div",{className:"bg-white dark:bg-gray-800 p-8 rounded-lg shadow-sm text-center",children:(0,s.jsx)("p",{className:"text-gray-500 dark:text-gray-400",children:"多様性に関する取り組み情報はまだ登録されていません。"})})]});let i=[...t].sort((e,t)=>(e.display_order??1e9)-(t.display_order??1e9)||(e.start_year??0)-(t.start_year??0)||e.title.localeCompare(t.title));return(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("h3",{className:"text-lg font-medium text-purple-700 dark:text-purple-300 flex items-center gap-2",children:[(0,s.jsx)(a.A,{className:"h-5 w-5"}),"多様性の取り組み"]}),(0,s.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:i.map((e,t)=>(0,s.jsxs)(l.P.div,{id:`initiative-${e.id}`,className:"scroll-mt-24 rounded-xl border-l-4 border-purple-500 bg-white dark:bg-gray-800 p-4 sm:p-5 shadow-sm hover:shadow-md transition",initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{delay:.06*t},children:[(0,s.jsx)("h4",{className:"text-[17px] sm:text-lg font-semibold text-blue-700 dark:text-blue-400 [writing-mode:horizontal-tb] break-words leading-snug",children:e.title}),e.start_year&&e.start_year>0&&(0,s.jsx)("div",{className:"mt-1",children:(0,s.jsxs)(r.E,{variant:"outline",className:"inline-flex items-center gap-1",children:[(0,s.jsx)(n.A,{className:"h-3 w-3"}),e.start_year,"年開始"]})}),e.description&&(0,s.jsx)("p",{className:"mt-2 text-sm text-gray-600 dark:text-gray-300 whitespace-pre-line break-words leading-relaxed",children:e.description}),(0,s.jsx)("div",{className:"mt-2 md:mt-3",children:(0,s.jsx)(c.$,{initiativeId:e.id,initiativeTitle:e.title,categoryLabel:"多様性"})}),e.impact&&""!==e.impact.trim()&&(0,s.jsxs)("div",{className:"mt-3 p-3 bg-purple-50 dark:bg-purple-900/20 rounded-md",children:[(0,s.jsx)("h5",{className:"text-sm font-medium text-purple-900 dark:text-purple-300 mb-1",children:"効果・影響"}),(0,s.jsx)("p",{className:"text-sm text-purple-800 dark:text-purple-200 whitespace-pre-line break-words",children:e.impact})]})]},e.id))})]})}},35989:(e,t,i)=>{i.d(t,{$:()=>f});var s=i(58250),r=i(66658),a=i(90894),n=i(3786),l=i(85734),c=i(87979),o=i(78430),d=i(69113),h=i(61333),u=i(39421),v=i(99223),m=i.n(v);let p="initiative_nudge_shown";function f(e){let{initiativeId:t,initiativeTitle:i,categoryLabel:v,className:f,size:b="sm"}=e,{isAuthenticated:x}=(0,o.A)(),{isFavorited:g,toggleFavorite:y}=(0,d.H)(),[w,S]=(0,r.useState)(!1),[_,j]=(0,r.useState)(!1),N=String(t),E=g(N),k=(0,s.jsxs)("span",{className:"whitespace-pre-line",children:[`マイページでは、この取り組みに関する質問メモを記入できます。 `,(0,s.jsx)(m(),{href:"/jobseeker/mypage?tab=initiatives",className:"underline underline-offset-2",children:"マイページを開く"})]}),C=async e=>{if(e.preventDefault(),e.stopPropagation(),!x)return void j(!0);if(!w){S(!0);try{if(!await y(N,{title:i,category:v}))return void(0,u.oR)({title:"エラー",description:"お気に入りの更新に失敗しました。しばらくしてから再度お試しください。"});E?(0,u.oR)({title:"取り組みを解除しました",description:i?`「${i}」をマイページから削除しました。`:"マイページから削除しました。"}):(sessionStorage.getItem(p)||sessionStorage.setItem(p,"1"),(0,u.oR)({title:"取り組みをマイページに保存しました",description:k}))}catch{(0,u.oR)({title:"エラー",description:"お気に入りの更新に失敗しました。"})}finally{S(!1)}}},I=async()=>{try{let e=new URL(window.location.href);e.hash=`initiative-${N}`;let t=e.toString();navigator.share?await navigator.share({title:i??"取り組みを共有",text:i??"",url:t}):(await navigator.clipboard.writeText(t),(0,u.oR)({title:"リンクをコピーしました",description:"この取り組みへのURLをコピーしました。"}))}catch{}};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:(0,h.cn)("mt-2 md:mt-3 flex items-center justify-between gap-2",f),children:[(0,s.jsxs)(l.$,{type:"button",size:b,variant:E?"default":"outline",className:"flex-1 flex items-center justify-center gap-2",onClick:C,disabled:w,"data-testid":"initiative-fav-button",children:[(0,s.jsx)(a.A,{className:(0,h.cn)("h-4 w-4",E?"fill-rose-500 text-rose-500":"text-muted-foreground")}),(0,s.jsx)("span",{className:"text-sm font-medium",children:E?"保存済み":"気になる"})]}),(0,s.jsxs)(l.$,{type:"button",size:b,variant:"outline",className:"flex-1 flex items-center justify-center gap-2",onClick:I,children:[(0,s.jsx)(n.A,{className:"h-4 w-4"}),(0,s.jsx)("span",{className:"text-sm font-medium",children:"共有"})]})]}),(0,s.jsx)(c.LoginPromptModal,{isOpen:_,onClose:()=>
1j(!1),message:"この取り組みを保存するには、ログインまたは新規登録が必要です。",gate:"initiative_save"})]})}},69113:(e,t,i)=>{i.d(t,{H:()=>d,S:()=>c});var s=i(66658),r=i(95888),a=i(67955),n=i(86826);let l=e=>!!e&&"object"==typeof e&&"initiative_id"in e,c="initiative-favorites-sync";class o{static #e=this.instance=null;static getInstance(){return o.instance||(o.instance=new o),o.instance}subscribe(e,t){return this.subscribers.add(e),this.currentUserId!==t?this.setupChannel(t):e(Array.from(this.favorites)),()=>{this.subscribers.delete(e),0===this.subscribers.size&&this.cleanup()}}async setupChannel(e){if(this.channel){try{await this.supabase.removeChannel(this.channel)}catch(e){console.warn("Error removing existing initiative favorites channel:",e)}this.channel=null,this.isSubscribed=!1}if(this.currentUserId=e,await this.fetchFavorites(e),!this.isSubscribed)try{let t=`initiative_favorites_${e}_${Date.now()}`;this.channel=this.supabase.channel(t).on("postgres_changes",{event:"*",schema:"public",table:"user_initiative_favorites",filter:`user_id=eq.${e}`},e=>{let t=l(e.new)?String(e.new.initiative_id):l(e.old)?String(e.old.initiative_id):"";t&&("INSERT"===e.eventType?this.favorites.has(t)||(this.favorites.add(t),this.notifySubscribers(),window.dispatchEvent(new CustomEvent(c,{detail:{action:"add",initiativeId:t,record:e.new}}))):"DELETE"===e.eventType&&this.favorites.delete(t)&&(this.notifySubscribers(),window.dispatchEvent(new CustomEvent(c,{detail:{action:"remove",initiativeId:t,record:e.old}}))))}).subscribe(e=>{"SUBSCRIBED"===e?this.isSubscribed=!0:"CLOSED"===e&&(this.isSubscribed=!1)})}catch(e){console.error("Error setting up initiative favorites subscription:",e)}}async fetchFavorites(e){try{let{data:t,error:i}=await this.supabase.from("user_initiative_favorites").select("initiative_id").eq("user_id",e);i?(console.error("Failed to fetch initiative favorites:",i),this.favorites=new Set):this.favorites=new Set((t||[]).map(e=>e?.initiative_id!=null?String(e.initiative_id):null).filter(e=>!!e)),this.notifySubscribers()}catch(e){console.error("Error fetching initiative favorites:",e),this.favorites=new Set,this.notifySubscribers()}}notifySubscribers(){let e=Array.from(this.favorites);this.subscribers.forEach(t=>{try{t(e)}catch(e){console.error("Error notifying initiative favorites subscriber:",e)}})}async cleanup(){if(this.channel&&this.isSubscribed)try{await this.supabase.removeChannel(this.channel)}catch(e){console.warn("Error cleaning up initiative favorites channel:",e)}this.channel=null,this.isSubscribed=!1,this.currentUserId=null,this.favorites=new Set}async toggleFavorite(e,t,i){let s=String(e);if(this.favorites.has(s)){this.favorites.delete(s),this.notifySubscribers(),window.dispatchEvent(new CustomEvent(c,{detail:{action:"remove",initiativeId:s,metadata:i}}));let{error:e}=await this.supabase.from("user_initiative_favorites").delete().eq("user_id",t).eq("initiative_id",s);return!e||(console.error("Error removing initiative favorite:",e),this.favorites.add(s),this.notifySubscribers(),window.dispatchEvent(new CustomEvent(c,{detail:{action:"add",initiativeId:s,metadata:i}})),!1)}this.favorites.add(s),this.notifySubscribers(),window.dispatchEvent(new CustomEvent(c,{detail:{action:"add",initiativeId:s,metadata:i}}));let{error:r}=await this.supabase.from("user_initiative_favorites").insert({user_id:t,initiative_id:s});return r?(console.error("Error adding initiative favorite:",r),this.favorites.delete(s),this.notifySubscribers(),window.dispatchEvent(new CustomEvent(c,{detail:{action:"remove",initiativeId:s,metadata:i}})),!1):((0,n.v6)({kind:"initiative",slugOrId:s}),!0)}constructor(){this.supabase=(0,r.U)(),this.channel=null,this.subscribers=new Set,this.favorites=new Set,this.currentUserId=null,this.isSubscribed=!1}}function d(){let{user:e,loading:t}=(0,a.J)(),[i,r]=(0,s.useState)([]),[n,l]=(0,s.useState)(!0);return(0,s.useEffect)(()=>{if(t)return;if(!e){r([]),l(!1);return}let i=o.getInstance();l(!0);let s=i.subscribe(e=>{r(e),l(!1)},e.id);return()=>{s()}},[e,t]),{favorites:i,isFavorited:e=>{let t=String(e);return i.includes(t)},toggleFavorite:async(t,i)=>!!e&&o.getInstance().toggleFavorite(t,e.id,i),isLoading:n}}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.