PageSourceSearch

https://naemo.ai/_next/static/chunks/8331.11606a5c71c60271.js

js naemo.ai collected 2026-09-24 14:31:53 UTC 31,937 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8331],{92735:function(e,t,n){n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]])},49589:function(e,t,n){n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("LockOpen",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 9.9-1",key:"1mm8w8"}]])},45884:function(e,t,n){n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("Maximize",[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]])},34415:function(e,t,n){n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("Minimize",[["path",{d:"M8 3v3a2 2 0 0 1-2 2H3",key:"hohbtr"}],["path",{d:"M21 8h-3a2 2 0 0 1-2-2V3",key:"5jw1f3"}],["path",{d:"M3 16h3a2 2 0 0 1 2 2v3",key:"198tvr"}],["path",{d:"M16 21v-3a2 2 0 0 1 2-2h3",key:"ph8mxp"}]])},82431:function(e,t,n){n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},8522:function(e,t,n){n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("Shuffle",[["path",{d:"M2 18h1.4c1.3 0 2.5-.6 3.3-1.7l6.1-8.6c.7-1.1 2-1.7 3.3-1.7H22",key:"1wmou1"}],["path",{d:"m18 2 4 4-4 4",key:"pucp1d"}],["path",{d:"M2 6h1.9c1.5 0 2.9.9 3.6 2.2",key:"10bdb2"}],["path",{d:"M22 18h-5.9c-1.3 0-2.6-.7-3.3-1.8l-.5-.8",key:"vgxac0"}],["path",{d:"m18 14 4 4-4 4",key:"10pe0f"}]])},51013:function(e,t,n){n.d(t,{NU:function(){return u},ZP:function(){return o},nF:function(){return h}});var r=n(57437);n(2265);var i=n(76865),l=n(82431),s=n(64954),a=n(7888),d=n(92804),c=n(93448);function o(e){let{isLoading:t=!1,error:n=null,onRetry:o,isEmpty:h=!1,emptyTitle:x="아직 아무것도 없습니다",emptyDescription:m,emptyAction:p,skeleton:f,subject:b,size:g="md",className:v,children:w}=e;return n?(0,r.jsxs)("div",{role:"alert",className:(0,c.cn)("flex flex-col items-center justify-center text-center px-6 py-14 gap-3",v),children:[(0,r.jsx)(i.Z,{size:22,className:"text-red-600 dark:text-red-400","aria-hidden":"true"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-[14px] font-semibold text-zinc-900 dark:text-zinc-100 break-keep",children:b?"".concat(b).concat((0,d.Ge)(b,"을","를")," 불러오지 못했습니다"):"내용을 불러오지 못했습니다"}),(0,r.jsx)("p",{className:"mt-1 text-[13px] text-zinc-600 dark:text-zinc-300 break-keep max-w-[320px]",children:(0,a.q)(n,"잠시 후 다시 시도해 주세요. 계속 안 되면 네트워크 상태를 확인해 주세요.")})]}),o&&(0,r.jsxs)("button",{type:"button",onClick:o,className:"inline-flex items-center gap-1.5 min-h-[44px] px-4 rounded-xl text-[13px] font-semibold bg-zinc-100 dark:bg-zinc-800 text-zinc-800 dark:text-zinc-100 hover:bg-zinc-200 dark:hover:bg-zinc-700 active:scale-[0.97] transition",children:[(0,r.jsx)(l.Z,{size:14,"aria-hidden":"true"}),"다시 시도"]})]}):t?(0,r.jsxs)("div",{className:v,"aria-busy":"true","aria-live":"polite",children:[null!=f?f:(0,r.jsx)(u,{}),(0,r.jsx)("span",{className:"sr-only",children:"불러오는 중"})]}):h?(0,r.jsx)(s.Z,{title:x,description:m,action:p,size:g,className:v}):(0,r.jsx)(r.Fragment,{children:w})}function u(e){let{rows:t=5,className:n}=e;return(0,r.jsx)("div",{className:(0,c.cn)("space-y-2 py-2",n),"aria-hidden":"true",children:Array.from({length:t}).map((e,t)=>(0,r.jsxs)("div",{className:"flex items-center gap-2.5 px-2 py-1",children:[(0,r.jsx)("div",{className:"w-24 h-3 rounded bg-zinc-200/80 dark:bg-zinc-800 animate-pulse"}),(0,r.jsx)("div",{className:"flex-1 h-2 rounded-full bg-zinc-200/80 dark:bg-zinc-800 animate-pulse",style:{maxWidth:"".concat(70-8*t,"%")}})]},t))})}function h(e){let{cells:t=12,className:n,cellClassName:i}=e;
1return(0,r.jsx)("div",{className:(0,c.cn)("grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-3 p-4",n),"aria-hidden":"true",children:Array.from({length:t}).map((e,t)=>(0,r.jsx)("div",{className:(0,c.cn)("h-20 rounded-xl bg-zinc-200/70 dark:bg-zinc-800 animate-pulse",i),style:{animationDelay:"".concat(t%6*60,"ms")}},t))})}},58331:function(e,t,n){n.r(t),n.d(t,{default:function(){return A}});var r=n(57437),i=n(51013),l=n(2265),s=n(95805),a=n(8522),d=n(41905),c=n(92735);let o=(0,n(79205).Z)("Eraser",[["path",{d:"m7 21-4.3-4.3c-1-1-1-2.5 0-3.4l9.6-9.6c1-1 2.5-1 3.4 0l5.6 5.6c1 1 1 2.5 0 3.4L13 21",key:"182aya"}],["path",{d:"M22 21H7",key:"t4ddhn"}],["path",{d:"m5 11 9 9",key:"1mo9qw"}]]);var u=n(34415),h=n(45884),x=n(99397),m=n(30401),p=n(66337),f=n(49589),b=n(18930),g=n(32489),v=n(93448),w=n(4908),y=n(83008),k=n(67920),j=n(58652);let N=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"학급",r=e=>e.map(e=>{let n=t.find(t=>t.id===e);return n?"".concat(n.name):""}).filter(Boolean).join(", "),i="";return e.forEach(e=>{let t=r(e.studentIds),n=e.studentIds.length;i+='\n            <tr>\n                <td style="width: 25%; height: 40px; text-align: center; border: 0.12mm solid black; background-color: #f0f0f0; font-weight: bold;">'.concat(e.name,'</td>\n                <td style="width: 15%; height: 40px; text-align: center; border: 0.12mm solid black;">').concat(n,'명</td>\n                <td style="width: 60%; height: 40px; text-align: left; padding-left: 10px; border: 0.12mm solid black;">').concat(t||'<span style="color: #888;">(미배정)</span>',"</td>\n            </tr>\n        ")}),'\n<!DOCTYPE html>\n<html>\n<head>\n<meta charset="utf-8">\n<title>'.concat(n,' 청소 구역</title>\n<style>\n    @page { margin: 20mm; size: A4 portrait; }\n    body { font-family: \'Malgun Gothic\', sans-serif; }\n    table { width: 100%; border-collapse: collapse; }\n    td, th { font-size: 12pt; }\n</style>\n</head>\n<body>\n    <table>\n        <thead>\n            <tr>\n                <th style="background-color: #ddd; border: 0.12mm solid black; height: 50px; text-align: center; width: 25%;">청소 구역</th>\n                <th style="background-color: #ddd; border: 0.12mm solid black; height: 50px; text-align: center; width: 15%;">인원 수</th>\n                <th style="background-color: #ddd; border: 0.12mm solid black; height: 50px; text-align: center; width: 60%;">담당 학생</th>\n            </tr>\n        </thead>\n        <tbody>\n            ').concat(i,"\n        </tbody>\n    </table>\n    ").concat((0,j.mv)(),"\n</body>\n</html>\n    ")};var z=n(27526),I=n(54696),C=n(64954);function A(){let{students:e,isLoading:t}=(0,w.AF)(),j=(0,k.XC)(),{status:A}=(0,z.kP)(),D=(0,I.Dv)(),Z=D?e:e.filter(e=>"담임 학급"===e.homeClassId),[S,E]=(0,l.useState)([]),[M,L]=(0,l.useState)(null),[F,R]=(0,l.useState)(null),[T,_]=(0,l.useState)(null),[O,V]=(0,l.useState)(null),[q,P]=(0,l.useState)(null),[H,U]=(0,l.useState)(""),[G,B]=(0,l.useState)(!1),[J,K]=(0,l.useState)([]),[W,X]=(0,l.useState)(!1),[Y,Q]=(0,l.useState)({}),[$,ee]=(0,l.useState)(new Set),[et,en]=(0,l.useState)(!1),er=(0,l.useRef)([]),[ei,el]=(0,l.useState)(!1),es=(0,l.useRef)(null);(0,l.useEffect)(()=>{let e=()=>{el(!!(document.fullscreenElement||document.webkitFullscreenElement))};return document.addEventListener("fullscreenchange",e),document.addEventListener("webkitfullscreenchange",e),()=>{document.removeEventListener("fullscreenchange",e),document.removeEventListener("webkitfullscreenchange",e)}},[]);let ea=async()=>{if(ei)try{let e=document;e.exitFullscreen?await e.exitFullscreen():e.webkitExitFullscreen?await e.webkitExitFullscreen():el(!1)}catch(e){el(!1)}else try{let e=es.current;if(!e)return;e.requestFullscreen?await e.requestFullscreen():e.webkitRequestFullscreen?await e.webkitRequestFullscreen():el(!0)}catch(e){el(!0)}},ed=(0,l.useCallback)(()=>{er.current.push({zones:JSON.parse(JSON.stringify(S)),isShuffled:G,shuffledOrder:[...J]}),er.current.length>20&&er.current.shift()},[S,G,J]);(0,l.useEffect)(()=>{let e=e=>{if((e.metaKey||e.ctrlKey)&&"z"===e.key){e.preventDefault();let t=er.current.pop();t&&(E(t.zones),B(t.isShuffled),K(t.shuffledOrder))}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[]);let ec=(0,l.useRef)(!1),eo=(0,l.useRef)(!1),eu=(0,l.useRef)(!1),eh=(0,l.useRef)([]),ex=(0,l.useRef)(null),em=(0,l.useRef)(!1),ep=(0,l.useRef)(!1),ef=(0,l.useRef)(!1),eb=(0,l.useRef)(D);eb.current=D;let eg=(0,l.useRef)(j);eg.current=j;let ev=(0,l.useCallback)(async()=>{var e;if(console.log("[CleaningView] Loading zones..."),eb.current){let e=await Promise.resolve().then(n.bind(n,96214)),t=await e.getGuestCleaningZones();ec.current=!0,eo.current=!0,E(t);return}let t=await (0,y.X)("getCleaningZones",{},eg.current);if(console.log("[CleaningView] Load result:",t.success,"data count:",null===(e=t.data)||void 0===e?void 0:e.length),t.success&&t.data&&Array.isArray(t.data)){let e=t.data.map((e,t)=>{var n,r,i;return{id:e.id,name:e.name,studentIds:e.studentIds||[],order:null!==(n=e.sortOrder)&&void 0!==n?n:t,locked:null!==(r=e.locked)&&void 0!==r&&r,columnId:void 0!==e.columnId?e.columnId:t%4,capacity:null!==(i=e.capacity)&&void 0!==i?i:null}});console.log("[CleaningView] Setting zones:",e.length),ec.current=!0,eo.current=!0,E(e)}else console.error("[CleaningView] Load failed or no data")},[]),ew=(0,l.useCallback)(async e=>{if(eb.current){let t=await Promise.resolve().then(n.bind(n,96214));await t.saveGuestCleaningZones(e);return}let t={},r=e.map(e=>{var n,r,i;let l=null!==(n=e.columnId)&&void 0!==n?n:0;void 0===t[l]&&(t[l]=0);let s=t[l]++;return{id:e.id,name:e.name,studentIds:e.studentIds,columnId:l,sortOrder:s,locked:null!==(r=e.locked)&&void 0!==r&&r,capacity:null!==(i=e.capacity)&&void 0!==i?i:null}});try{console.log("[CleaningView] Saving zones:",r.length);let e=await (0,y.X)("saveAllCleaningZones",{zones:r},eg.current);e.success?console.log("[CleaningView] Save successful"):console.error("[CleaningView] Save failed:",e.error)}catch(e){console.error("[CleaningView] Save error:",e)}},[]),ey=(0,l.useCallback)(async()=>
1{if(!ec.current)return;if(em.current){ep.current=!0;return}em.current=!0;let e=!0;try{do{ep.current=!1;try{await ew(eh.current)}catch(t){console.error("[CleaningView] flush save error:",t),e=!1;break}}while(ep.current);e&&(ef.current=!1)}finally{em.current=!1}},[ew]),ek=(0,l.useCallback)(()=>{ex.current&&clearTimeout(ex.current),ex.current=setTimeout(()=>{ex.current=null,ey()},600)},[ey]);(0,l.useEffect)(()=>{"loading"!==A&&(eu.current||(eu.current=!0,ev()))},[A,ev]),(0,l.useEffect)(()=>{if(ec.current){if(eo.current){eo.current=!1;return}eh.current=S,ef.current=!0,ek()}},[S,ek]),(0,l.useEffect)(()=>{let e=()=>{ex.current&&(clearTimeout(ex.current),ex.current=null),ec.current&&ef.current&&ey()},t=()=>{"hidden"===document.visibilityState&&e()};return window.addEventListener("pagehide",e),document.addEventListener("visibilitychange",t),()=>{window.removeEventListener("pagehide",e),document.removeEventListener("visibilitychange",t),e()}},[ey]);let ej=()=>{let e=[,,,,].fill(0);S.forEach(t=>{var n;let r=null!==(n=t.columnId)&&void 0!==n?n:0;r>=0&&r<4&&e[r]++});let t=e.indexOf(Math.min(...e)),n={id:crypto.randomUUID(),name:"청소 구역 ".concat(S.length+1),studentIds:[],order:S.length,locked:!1,columnId:t,capacity:null};E(e=>[...e,n])},eN=(e,t)=>{let n=parseInt(t),r=isNaN(n)?null:Math.max(1,n);E(t=>t.map(t=>t.id===e?{...t,capacity:r}:t))},ez=e=>{E(t=>t.map(t=>t.id===e?{...t,locked:!t.locked}:t))},eI=e=>{E(t=>t.filter(t=>t.id!==e))},eC=(e,t)=>{E(n=>n.map(n=>n.id===e?{...n,name:t}:n)),P(null)},eA=(e,t)=>{e.stopPropagation(),L(t),e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",t)},eD=(e,t)=>{e.stopPropagation(),R(t),e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("zoneId",t);let n=e.currentTarget,r=n.cloneNode(!0);r.style.position="absolute",r.style.top="-9999px",r.style.left="-9999px",r.style.width="".concat(n.offsetWidth,"px"),r.style.height="".concat(n.offsetHeight,"px"),r.style.opacity="1",r.style.zIndex="9999",r.style.backgroundColor="#1A1A1A",document.body.appendChild(r),e.dataTransfer.setDragImage(r,n.offsetWidth/2,20),requestAnimationFrame(()=>{r.remove()})},eZ=()=>{L(null),R(null),_(null),V(null)},eS=(e,t)=>{if(e.preventDefault(),e.dataTransfer.dropEffect="move",F){if(F===t){_(null),V(null);return}let n=e.currentTarget.getBoundingClientRect(),r=e.clientY-n.top<n.height/2?"top":"bottom";_(t),V(r)}else M&&(_(t),V(null))},eE=()=>{_(null),V(null)},eM=(e,t,n)=>{if(e.preventDefault(),_(null),V(null),M){let r=e.dataTransfer.getData("text/plain");if(!r||"column"===n)return;E(e=>{let n=e.find(e=>e.id===t);return n&&(n.studentIds.includes(r)||null===n.capacity||!(n.studentIds.length>=n.capacity))?e.map(e=>({...e,studentIds:e.studentIds.filter(e=>e!==r)})).map(e=>e.id===t?{...e,studentIds:[...e.studentIds,r]}:e):e}),L(null);return}F&&(E(e=>{let r=[...e],i=r.findIndex(e=>e.id===F);if(i<0)return e;let l={...r[i]};if(r.splice(i,1),"column"===n){let e=parseInt(t);l.columnId=e,r.push(l)}else{let e=r.findIndex(e=>e.id===t);if(e<0)return r.push(l),r;let n=r[e];l.columnId=n.columnId,r.splice("bottom"===O?e+1:e,0,l)}return r}),R(null))},eL=(e,t)=>{e.preventDefault(),F&&(e.dataTransfer.dropEffect="move")},eF=(e,t)=>{eM(e,t.toString(),"column")},eR=(e,t)=>{E(n=>n.map(n=>n.id===e?{...n,studentIds:n.studentIds.filter(e=>e!==t)}:n))},eT=e=>{let t=[...e];for(let e=t.length-1;e>0;e--){let n=Math.floor(Math.random()*(e+1));[t[e],t[n]]=[t[n],t[e]]}return t},e_=e=>{ed();let t=new Set(e.flatMap(e=>e.studentIds)),n=eT(Z.filter(e=>!t.has(e.id))).map(e=>e.id),r=e.map(e=>({...e,studentIds:[...e.studentIds]})),i=r.filter(e=>!e.locked&&null!==e.capacity),l=0,s=!0;for(;l<n.length&&s;)for(let e of(s=!1,i)){if(l>=n.length)break;e.studentIds.length<e.capacity&&(e.studentIds.push(n[l]),l++,s=!0)}let a=new Set(n.slice(0,l));E(r),B(!1),K([]),ee(a),window.setTimeout(()=>ee(new Set),1600)},eO=S.length>0&&S.every(e=>{let t=Y[e.id];if(void 0===t||""===t.trim())return!1;let n=parseInt(t,10);return!isNaN(n)&&n>=1}),eV=new Set(S.flatMap(e=>e.studentIds)),eq=Z.filter(e=>!eV.has(e.id)),eP=G&&J.length>0?J.map(e=>eq.find(t=>t.id===e)).filter(e=>void 0!==e):[...eq].sort((e,t)=>
1(e.number||0)-(t.number||0)),eH=e=>Z.find(t=>t.id===e);return t&&0===e.length?(0,r.jsxs)("div",{className:"flex-1 overflow-hidden","aria-busy":"true","aria-live":"polite",children:[(0,r.jsx)(i.nF,{cells:12}),(0,r.jsx)("span",{className:"sr-only",children:"불러오는 중"})]}):(0,r.jsxs)("div",{ref:es,className:(0,v.cn)("h-full flex overflow-hidden bg-[#0D0D0D] print:overflow-visible print:h-auto print:bg-white",ei&&"absolute inset-0 z-[9999]"),children:[(0,r.jsxs)("div",{className:(0,v.cn)("border-r border-white/5 flex flex-col bg-[#0D0D0D] shrink-0 print:hidden transition-colors cleaning-sidebar nav-rail-shadow sub-sidebar-enter",ei?"w-80":"w-64",M&&"bg-white/[0.02] border-r-blue-500/30"),onDragOver:e=>e.preventDefault(),onDrop:e=>{e.preventDefault();let t=e.dataTransfer.getData("text/plain");t&&E(e=>e.map(e=>({...e,studentIds:e.studentIds.filter(e=>e!==t)}))),L(null)},children:[(0,r.jsxs)("div",{className:"p-4",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,r.jsxs)("h3",{className:"font-bold text-white flex items-center gap-2",children:[(0,r.jsx)(s.Z,{size:18}),"미배정 학생"]}),(0,r.jsx)("button",{onClick:()=>{if(ed(),G)B(!1),K([]);else{let e=new Set(S.flatMap(e=>e.studentIds));K(eT(Z.filter(t=>!e.has(t.id))).map(e=>e.id)),B(!0)}},className:(0,v.cn)("p-1.5 rounded transition-all",G?"bg-blue-500/20 text-blue-400 hover:bg-blue-500/30":"text-[#666] hover:text-white hover:bg-white/10"),title:G?"번호 순으로 정렬":"무작위로 섞기",children:(0,r.jsx)(a.Z,{size:16})})]}),(0,r.jsx)("p",{className:"text-xs text-[#666] mt-1",children:"드래그하여 구역에 배정"})]}),(0,r.jsx)("div",{className:"flex-1 overflow-y-auto custom-scrollbar px-2 pb-4",children:0===eq.length?(0,r.jsx)("div",{className:"text-center text-[#444] text-xs py-10",children:"모든 학생이 배정되었습니다."}):(0,r.jsx)("div",{className:"space-y-1",children:eP.map(e=>(0,r.jsxs)("div",{draggable:!0,onDragStart:t=>eA(t,e.id),onDragEnd:eZ,className:(0,v.cn)("flex items-center gap-2 px-3 py-2.5 rounded-lg cursor-grab active:cursor-grabbing transition-all border cleaning-student-card",M===e.id?"bg-blue-500/20 border-blue-500/50 scale-95 opacity-50":"bg-[#1A1A1A] border-transparent"),children:[(0,r.jsx)(d.Z,{size:14,className:"text-[#555] shrink-0"}),(0,r.jsx)("span",{className:(0,v.cn)("rounded-full flex items-center justify-center font-bold bg-white/10 text-[#888] cleaning-number-badge shrink-0",ei?"w-7 h-7 text-sm":"w-6 h-6 text-xs"),children:e.number}),(0,r.jsx)("span",{className:(0,v.cn)("text-[#CCC] flex-1",ei?"text-lg":"text-sm"),children:e.name})]},e.id))})})]}),(0,r.jsxs)("div",{className:"flex-1 p-3 overflow-auto print:overflow-visible print:p-0 flex flex-col",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-4 mb-4 print:mb-4",children:[(0,r.jsxs)("div",{className:"min-w-0 ml-2",children:[(0,r.jsx)("h2",{className:"text-xl font-bold text-white print:text-black",children:"청소 담당"}),(0,r.jsx)("p",{className:"text-sm text-[#666] mt-1 print:hidden",children:"청소 구역을 추가하고 학생을 배정하세요 (각 열로 드래그하여 이동 가능)"})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2 shrink-0 print:hidden",children:[(0,r.jsxs)("button",{onClick:()=>{let t=new Blob([N(S,e)],{type:"application/hwp"}),n=URL.createObjectURL(t),r=document.createElement("a");r.href=n;let i=(0,v.RJ)();r.download="청소구역배정_".concat(i,".hwp"),document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(n)},className:"h-10 px-3.5 rounded-lg bg-[#2A2A2A] hover:bg-[#333] border border-white/10 text-white/70 hover:text-white transition flex items-center justify-center gap-1.5 hover:shadow-xl active:scale-95 text-sm font-medium",title:"한글 파일 다운로드",children:[(0,r.jsx)(c.Z,{size:18}),(0,r.jsx)("span",{children:"한글"})]}),(0,r.jsxs)("button",{onClick:()=>{ed(),E(e=>e.map(e=>e.locked?e:{...e,studentIds:[]}))},className:"h-10 px-3.5 rounded-lg bg-[#2A2A2A] hover:bg-[#333] border border-white/10 text-white/70 hover:text-white transition flex items-center justify-center gap-1.5 hover:shadow-xl active:scale-95 text-sm font-medium",title:"잠금되지 않은 구역의 학생들을 미배정으로 되돌립니다",children:[(0,r.jsx)(o,{size:18}),(0,r.jsx)("span",{children:"배정 초기화"})]}),(0,r.jsxs)("button",{onClick:()=>
1{if(0!==S.length){if(en(!0),window.setTimeout(()=>en(!1),450),S.some(e=>null===e.capacity)){let e={};S.forEach(t=>{e[t.id]=null!==t.capacity?String(t.capacity):""}),Q(e),X(!0);return}e_(S)}},disabled:0===S.length,className:"h-10 px-3.5 rounded-lg bg-[#2A2A2A] hover:bg-[#333] border border-white/10 text-white/70 hover:text-white transition flex items-center justify-center gap-1.5 hover:shadow-xl active:scale-95 text-sm font-medium disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-[#2A2A2A] disabled:hover:text-white/70",title:"구역별 최대 인원에 맞게 미배정 학생을 랜덤으로 배치합니다",children:[(0,r.jsx)(a.Z,{size:18,className:(0,v.cn)(et&&"animate-shuffle-shake")}),(0,r.jsx)("span",{children:"랜덤 배치"})]}),(0,r.jsxs)("button",{onClick:ea,className:"h-10 px-3.5 rounded-lg bg-[#2A2A2A] hover:bg-[#333] border border-white/10 text-white/70 hover:text-white transition flex items-center justify-center gap-1.5 hover:shadow-xl active:scale-95 text-sm font-medium",title:ei?"전체화면 끄기":"전체화면으로 크게 보기",children:[ei?(0,r.jsx)(u.Z,{size:18}):(0,r.jsx)(h.Z,{size:18}),(0,r.jsx)("span",{children:ei?"전체화면 끄기":"전체화면"})]}),(0,r.jsxs)("button",{onClick:ej,className:"h-10 px-3.5 rounded-lg bg-[#007AFF] hover:bg-[#0066DD] text-white hover:shadow-blue-500/40 transition flex items-center justify-center gap-1.5 hover:shadow-xl active:scale-95 text-sm font-medium",title:"구역 추가",children:[(0,r.jsx)(x.Z,{size:18}),(0,r.jsx)("span",{children:"구역 추가"})]})]})]}),0===S.length?(0,r.jsx)("div",{className:"flex-1 flex items-center justify-center p-8",children:(0,r.jsx)(C.Z,{size:"lg",title:"청소 구역이 없습니다",description:"위의 '+ 구역 추가' 버튼을 눌러 청소 구역을 만들고 학생을 배정해 보세요.",action:(0,r.jsxs)("button",{onClick:ej,className:"px-6 py-2.5 bg-zinc-900 hover:bg-black dark:bg-white dark:hover:bg-zinc-100 text-white dark:text-zinc-900 rounded-xl text-sm font-semibold transition-all shadow-sm active:scale-95 flex items-center gap-1.5",children:[(0,r.jsx)(x.Z,{size:16}),"구역 추가하기"]})})}):(0,r.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4 pb-20 items-start min-h-full",children:[0,1,2,3].map(e=>(0,r.jsx)("div",{onDragOver:t=>eL(t,e),onDrop:t=>eF(t,e),className:(0,v.cn)("flex flex-col gap-4 min-h-[200px] min-h-full rounded-xl transition-colors p-2 -m-2",F&&"bg-white/5 border border-white/5 border-dashed"),children:S.filter(t=>{var n;return(null!==(n=t.columnId)&&void 0!==n?n:0)===e}).map(e=>{var t;return(0,r.jsxs)("div",{draggable:!0,onDragStart:t=>eD(t,e.id),onDragEnd:eZ,onDragOver:t=>eS(t,e.id),onDragLeave:eE,onDrop:t=>{t.stopPropagation(),eM(t,e.id,"zone")},className:(0,v.cn)("relative rounded-2xl border-2 p-4 min-h-[200px] transition group/card flex flex-col shrink-0",F===e.id&&"opacity-30 border-dashed",!M&&"cursor-grab active:cursor-grabbing",T!==e.id||M?T===e.id&&M?"border-blue-500 bg-blue-500/10 scale-[1.02]":null!==e.capacity&&e.studentIds.length>=e.capacity?"border-blue-500 shadow-[0_0_15px_rgba(59,130,246,0.15)]":"border-white/10 bg-[#121212] hover:border-white/20":"border-blue-500/50"),children:[T===e.id&&"top"===O&&!M&&(0,r.jsx)("div",{className:"absolute -top-3 left-0 right-0 h-1 bg-blue-500 rounded-full shadow-[0_0_10px_rgba(59,130,246,0.5)] z-50 pointer-events-none"}),T===e.id&&"bottom"===O&&!M&&(0,r.jsx)("div",{className:"absolute -bottom-3 left-0 right-0 h-1 bg-blue-500 rounded-full shadow-[0_0_10px_rgba(59,130,246,0.5)] z-50 pointer-events-none"}),(0,r.jsx)("div",{className:"absolute top-[18px] left-3 text-[#333] group-hover/card:text-[#666] transition-colors cursor-grab active:cursor-grabbing",children:(0,r.jsx)(d.Z,{size:20})}),(0,r.jsx)("div",{className:"flex items-center justify-between mb-3 pb-2 border-b border-white/5 pl-6 shrink-0",children:q===e.id?(0,r.jsxs)("div",{className:"flex items-center gap-2 flex-1",children:[(0,r.jsx)("input",{type:"text",value:H,onChange:e=>U(e.target.value),onKeyDown:t=>"Enter"===t.key&&eC(e.id,H),className:"flex-1 bg-[#1A1A1A] border border-white/10 rounded-lg px-2 py-1 text-sm text-white focus:outline-none focus:ring-2 focus:ring-blue-500/50",autoFocus:!0}),(0,r.jsx)("button",{"aria-label":"이름 저장",onClick:()=>eC(e.id,H),className:"p-1 text-green-500 hover:bg-green-500/10 rounded",children:(0,r.jsx)(m.Z,{size:16})})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("input",{type:"text",value:e.name,onChange:t=>eC(e.id,t.target.value),className:(0,v.cn)("bg-transparent font-bold text-white focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus:bg-white/5 rounded px-1 -ml-1 flex-1 min-w-0 cleaning-zone-name-input",ei?"text-lg":"text-sm")}),(0,r.jsxs)("div",{className:"flex items-center gap-1",children:[(0,r.jsx)("button",{"aria-label":e.locked?"잠금 해제":"잠금",onClick:()=>ez(e.id),className:(0,v.cn)("p-1.5 rounded transition-colors",e.locked?"text-amber-400 hover:bg-amber-500/10":"text-[#666] hover:text-white hover:bg-white/10"),children:e.locked?(0,r.jsx)(p.Z,{size:14}):(0,r.jsx)(f.Z,{size:14})}),(0,r.jsx)("button",{"aria-label":"삭제",onClick:()=>eI(e.id),className:"p-1.5 text-[#666] hover:text-red-400 hover:bg-red-500/10 rounded transition-colors zone-delete-btn",children:(0,r.jsx)(b.Z,{size:14})})]})]})}
1),(0,r.jsx)("div",{className:"space-y-1.5 flex-1 min-h-[60px]",children:0===e.studentIds.length?(0,r.jsx)("div",{className:"text-center text-[#444] text-xs py-6",children:"여기에 학생을 드래그하세요"}):e.studentIds.map((t,n)=>{let i=eH(t);if(!i)return null;let l=$.has(t);return(0,r.jsxs)("div",{draggable:!0,onDragStart:e=>eA(e,t),onDragEnd:eZ,className:(0,v.cn)("cleaning-student-block flex items-center justify-between px-3 py-2 bg-[#1A1A1A] rounded-lg group cursor-grab active:cursor-grabbing border border-transparent hover:border-white/10",l&&"animate-chip-pop-in"),style:l?{animationDelay:"".concat(50*n,"ms")}:void 0,children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 pointer-events-none",children:[(0,r.jsx)("span",{className:(0,v.cn)("rounded-full flex items-center justify-center font-bold bg-white/10 text-[#888] shrink-0",ei?"w-7 h-7 text-xs":"w-5 h-5 text-[10px]"),children:i.number}),(0,r.jsx)("span",{className:(0,v.cn)("text-white",ei?"text-xl":"text-sm"),children:i.name})]}),(0,r.jsx)("button",{"aria-label":"제외",onClick:()=>eR(e.id,t),className:"opacity-0 group-hover:opacity-100 p-1 text-[#666] hover:text-red-400 transition-all",children:(0,r.jsx)(g.Z,{size:14})})]},t)})}),(0,r.jsxs)("div",{className:(0,v.cn)("mt-auto pt-3 text-[#555] flex items-center justify-end gap-1 shrink-0",ei?"text-base":"text-sm"),children:[(0,r.jsxs)("span",{className:(0,v.cn)(null!==e.capacity&&e.studentIds.length>=e.capacity?"text-blue-400 font-bold":""),children:[0===e.studentIds.length?"-":e.studentIds.length,"명"]}),(0,r.jsx)("span",{className:"text-[#333]",children:"/"}),(0,r.jsxs)("div",{className:"relative group/input",children:[(0,r.jsx)("input",{type:"text",value:null!==(t=e.capacity)&&void 0!==t?t:"",placeholder:"-",onChange:t=>eN(e.id,t.target.value),className:"w-8 bg-transparent text-right focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus:bg-white/5 rounded px-0.5 m-0 p-0 h-auto font-medium text-[#666] hover:text-white transition-colors placeholder-[#666]"}),(0,r.jsx)("div",{className:"absolute inset-0 border border-white/10 rounded opacity-0 group-hover/input:opacity-100 pointer-events-none"})]}),(0,r.jsx)("span",{children:"명"})]})]},e.id)})},e))})]}),W&&(0,r.jsx)("div",{className:"modal-viewport z-[100] flex items-center justify-center bg-black/40 backdrop-blur-sm p-4 animate-in fade-in duration-200",children:(0,r.jsxs)("div",{className:"bg-white dark:bg-[#1c1c1e] rounded-2xl shadow-2xl w-full max-w-md border border-zinc-200 dark:border-white/10 overflow-hidden animate-in zoom-in-95 duration-200 flex flex-col max-h-[90vh]",children:[(0,r.jsxs)("div",{className:"px-6 py-5 flex items-center justify-between shrink-0",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-lg font-bold text-zinc-900 dark:text-white",children:"구역별 최대 인원 설정"}),(0,r.jsx)("p",{className:"text-xs text-zinc-500 mt-0.5",children:"각 구역의 최대 인원을 입력하면 미배정 학생을 랜덤으로 배치합니다."})]}),(0,r.jsx)("button",{"aria-label":"닫기",onClick:()=>X(!1),className:"p-2 hover:bg-zinc-100 dark:hover:bg-white/5 rounded-full transition-colors text-zinc-400",children:(0,r.jsx)(g.Z,{size:20})})]}),(0,r.jsx)("div",{className:"p-6 space-y-2.5 overflow-y-auto custom-scrollbar flex-1",children:S.map(e=>{var t;let n=null!==(t=Y[e.id])&&void 0!==t?t:"",i=""===n.trim()||isNaN(parseInt(n,10))||1>parseInt(n,10);return(0,r.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,r.jsxs)("span",{className:"text-sm font-medium text-zinc-700 dark:text-zinc-200 truncate flex items-center gap-1.5",children:[e.locked&&(0,r.jsx)(p.Z,{size:13,className:"text-zinc-400 shrink-0"}),e.name]}),(0,r.jsxs)("div",{className:"flex items-center gap-1.5 shrink-0",children:[(0,r.jsx)("input",{type:"number",min:1,inputMode:"numeric",value:n,placeholder:"예: 4",onChange:t=>Q(n=>({...n,[e.id]:t.target.value})),className:(0,v.cn)("w-20 h-10 px-3 text-right bg-zinc-50 dark:bg-white/5 border rounded-xl text-sm font-medium text-zinc-900 dark:text-zinc-100 focus:outline-none focus:ring-2 focus:ring-blue-500/20",i?"border-red-400/60 dark:border-red-500/40":"border-zinc-200 dark:border-white/10")}),(0,r.jsx)("span",{className:"text-sm text-zinc-500 w-5",children:"명"})]})]},e.id)})}),(0,r.jsxs)("div",{className:"px-6 py-4 flex items-center justify-end gap-2 shrink-0",children:[(0,r.jsx)("button",{onClick:()=>
1X(!1),className:"h-10 px-4 rounded-xl text-sm font-medium text-zinc-600 dark:text-zinc-300 hover:bg-zinc-100 dark:hover:bg-white/5 transition-colors",children:"취소"}),(0,r.jsxs)("button",{onClick:()=>{if(!eO)return;let e=S.map(e=>({...e,capacity:Math.max(1,parseInt(Y[e.id],10))}));X(!1),e_(e)},disabled:!eO,className:"h-10 px-4 rounded-xl text-sm font-semibold bg-[#007AFF] hover:bg-[#0066DD] text-white transition-colors flex items-center gap-1.5 disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-[#007AFF]",children:[(0,r.jsx)(a.Z,{size:16}),"배치하기"]})]})]})})]})}},7888:function(e,t,n){n.d(t,{q:function(){return r}});function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"요청을 처리하지 못했습니다. 잠시 후 다시 시도해 주세요.",n=e instanceof Error?e.message:String(null!=e?e:""),r=n.toLowerCase();return r.trim()?/[가-힣]/.test(n)&&!/error|exception|prisma|econn|timeout|undefined|null|\bp\d{4}\b|stack|<|\bat\s/i.test(n)?n:r.includes("unauthorized")||r.includes("unauthenticated")||r.includes("로그인 세션")?"로그인이 필요하거나 세션이 만료되었습니다. 페이지를 새로고침한 뒤 다시 시도해 주세요.":r.includes("permission denied")||r.includes("forbidden")||r.includes("access denied")||r.includes(" 403")?"이 작업을 수행할 권한이 없습니다.":r.includes("not found")||r.includes("no such")||r.includes("does not exist")?"대상을 찾을 수 없습니다. 목록을 새로고침한 뒤 다시 시도해 주세요.":r.includes("transaction")&&(r.includes("closed")||r.includes("timeout")||r.includes("aborted")||r.includes("expired"))?"한 번에 처리할 양이 많아 시간이 초과되었습니다. 나눠서 다시 시도해 주세요.":r.includes("econnreset")||r.includes("econnrefused")||r.includes("fetch failed")||r.includes("socket hang up")||r.includes("enotfound")||r.includes("network")?"서버 연결이 불안정합니다. 잠시 후 다시 시도해 주세요.":r.includes("timeout")||r.includes("timed out")||r.includes("etimedout")?"서버 응답 시간이 초과되었습니다. 잠시 후 다시 시도해 주세요.":r.includes("unique constraint")||r.includes("p2002")||r.includes("duplicate key")?"이미 등록되어 있는 항목입니다.":r.includes("no file provided")||r.includes("file provided")?"파일이 첨부되지 않았습니다. 파일을 선택한 뒤 다시 시도해 주세요.":r.includes("prisma")||/\bp\d{4}\b/.test(r)||r.includes("database")||r.includes("column ")||r.includes("relation ")?"데이터를 저장하는 중 문제가 발생했습니다. 잠시 후 다시 시도해 주세요.":t:t}},92804:function(e,t,n){n.d(t,{Ge:function(){return r}});function r(e,t,n){return!function(e){let t=e.trim().slice(-1);if(!t)return!1;let n=t.charCodeAt(0);return n>=44032&&n<=55203?(n-44032)%28!=0:t>="0"&&t<="9"&&["0","1","3","6","7","8"].includes(t)}(e)?n:t}},58652:function(e,t,n){n.d(t,{mv:function(){return r}});let r=()=>"<div style=\"margin-top: 6mm; text-align: right; font-size: 8pt; color: #A0A0A0; font-family: 'Malgun Gothic', sans-serif;\">".concat("내모","&nbsp;&nbsp;").concat("https://naemo.ai","</div>")}}]);

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.