(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,95203,e=>{"use strict";var s=e.i(43476),t=e.i(71645),l=e.i(76639),a=e.i(19455),o=e.i(18533),r=e.i(43625),n=e.i(31334),i=e.i(83086),d=e.i(16715);function c({open:e,onOpenChange:c}){let x=(0,o.useGameStore)(e=>e.pendingPerkChoices),h=(0,o.useGameStore)(e=>e.constellation??[]),m=(0,o.useGameStore)(e=>e.chooseConstellationPerk),u=(0,o.useGameStore)(e=>e.rerollPerkChoices),[f,g]=(0,t.useState)(null);if((0,t.useEffect)(()=>{e||g(null)},[e]),(0,t.useEffect)(()=>{x&&x.length>0&&!e&&c(!0),(!x||0===x.length)&&e&&c(!1)},[x,e,c]),!x||0===x.length)return null;let p=(0,r.constellationProgress)(h);return(0,s.jsx)(l.Dialog,{open:e,onOpenChange:c,children:(0,s.jsxs)(l.DialogContent,{className:"max-w-md border-fuchsia-400/30 bg-gradient-to-br from-[#0a0820]/95 to-[#1a0f30]/95 backdrop-blur-md",children:[(0,s.jsxs)(l.DialogHeader,{children:[(0,s.jsxs)(l.DialogTitle,{className:"flex items-center gap-2 text-fuchsia-200",children:[(0,s.jsx)(i.Sparkles,{className:"h-4 w-4"}),"星图觉醒"]}),(0,s.jsxs)(l.DialogDescription,{className:"text-muted-foreground text-xs",children:["飞升带来的回响在星图上凝聚。从 3 道星辉中选择 1 道，永久获得其加成。",(0,s.jsx)("br",{}),(0,s.jsxs)("span",{className:"text-fuchsia-300/80",children:["当前已觉醒 ",p.unlocked,"/",p.total]})]})]}),(0,s.jsx)("div",{className:"grid grid-cols-1 gap-2 mt-1",children:x.map(e=>{let t=(0,r.getPerk)(e);if(!t)return null;let l=r.CONSTELLATION_CATEGORY_META[t.category],a=f===e;return(0,s.jsxs)("button",{onClick:()=>{g(e),m(e)&&((0,n.sfx)("constellation"),setTimeout(()=>c(!1),500))},disabled:!!f,className:`group relative w-full text-left rounded-lg border px-3 py-2.5 transition-all overflow-hidden ${a?"border-fuchsia-400/80 bg-fuchsia-500/10 scale-[1.02]":f?"border-white/5 opacity-40":"border-white/10 hover:border-white/30 hover:bg-white/5"}`,style:{boxShadow:a?`0 0 20px ${l.glow}`:void 0},children:[(0,s.jsx)("div",{className:"absolute left-0 top-0 bottom-0 w-1",style:{background:l.hex,boxShadow:`0 0 8px ${l.hex}`}}),(0,s.jsxs)("div",{className:"pl-2 flex items-start gap-3",children:[(0,s.jsx)("div",{className:"flex-shrink-0 mt-0.5 h-8 w-8 rounded-full flex items-center justify-center text-sm font-bold",style:{background:`${l.hex}20`,color:l.hex,border:`1px solid ${l.hex}40`},children:l.name.charAt(0)}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 mb-0.5",children:[(0,s.jsx)("span",{className:"text-sm font-bold text-foreground",children:t.name}),(0,s.jsx)("span",{className:"text-[9px] px-1 py-0.5 rounded font-mono",style:{background:`${l.hex}20`,color:l.hex},children:l.name})]}),(0,s.jsx)("div",{className:"text-[11px] text-muted-foreground",children:t.desc})]})]}),a&&(0,s.jsx)("div",{className:"absolute inset-0 pointer-events-none",children:[...Array(8)].map((e,t)=>(0,s.jsx)("span",{className:"absolute h-1 w-1 rounded-full animate-ping",style:{background:l.hex,left:`${20+8*t}%`,top:`${30+t%3*20}%`,animationDelay:`${50*t}ms`,animationDuration:"800ms"}},t))})]},e)})}),(0,s.jsxs)("div",{className:"flex items-center justify-between mt-3 pt-2 border-t border-white/5",children:[(0,s.jsxs)(a.Button,{variant:"ghost",size:"sm",onClick:()=>{u(),(0,n.sfx)("uiClick")},disabled:!!f,className:"text-muted-foreground hover:text-foreground h-7 text-[11px]",children:[(0,s.jsx)(d.RefreshCw,{className:"h-3 w-3 mr-1"}),"重新抽取"]}),(0,s.jsx)("span",{className:"text-[10px] text-muted-foreground/60",children:"✦ 选择后永久保留，跨周目生效"})]})]})})}e.s(["ConstellationDialog",()=>c])},76103,e=>{e.n(e.i(95203))}]);