1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7459],{60850:function(e,t,i){i.d(t,{CZ:function(){return r},R2:function(){return s},T9:function(){return l},fk:function(){return a},mK:function(){return o}}),i(83079);var n=i(12119),r=(0,n.$)("489a0c9551b931e08d89f7f5f5c892c7b23fefff"),s=(0,n.$)("2a95e2f3f90e7fed938e495986951730a05744b5"),a=(0,n.$)("b4d076709ab489b493a50d11e39e0979ff1959b6"),l=(0,n.$)("b9f327ac565182d2647700118e1b3771a61f0997"),o=(0,n.$)("0fc61a8119cacee671e8cde298a46648317d4bef")},48313:function(e,t,i){i.d(t,{Z:function(){return s}});var n=i(2265),r=i(54887);function s(e){let{children:t}=e,[i,s]=(0,n.useState)(!1);return(0,n.useEffect)(()=>(s(!0),()=>s(!1)),[]),i?(0,r.createPortal)(t,document.body):null}},35596:function(e,t,i){i.d(t,{Z:function(){return m}});var n=i(57437),r=i(2265),s=i(59717),a=i(81906),l=i(33728),o=i(57586),d=i(13100),c=i(93448),u=i(21652);let h=0;function m(e){let{isOpen:t,onClose:i,title:m,children:f,footer:x,className:v}=e,g=(0,s.o)(),b=(0,a.c)(0);(0,r.useEffect)(()=>{t&&b.set(0)},[t,b]);let p=(0,l.H)(b,[0,240],[1,0]),w=(0,r.useRef)(i),k=(0,r.useRef)(!1);(0,r.useEffect)(()=>{w.current=i},[i]),(0,r.useEffect)(()=>{if(!t)return;h++,document.body.style.overflow="hidden";let e=(0,u.UM)(),i=window.history.state||{};!e||k.current||i.isBottomSheet||(window.history.pushState({...i,isBottomSheet:!0},""),k.current=!0);let n=()=>{k.current&&(k.current=!1,w.current())};return window.addEventListener("popstate",n),()=>{window.removeEventListener("popstate",n),--h<=0&&(h=0,document.body.style.overflow="")}},[t]);let y=(0,r.useCallback)(()=>{k.current&&(k.current=!1,window.history.back()),i()},[i]),j=(0,r.useCallback)((e,t)=>{(t.velocity.y>500||t.offset.y>100)&&y()},[y]),z=(0,r.useRef)(null),N=(0,r.useRef)(null);return(0,r.useEffect)(()=>{if(!t)return;let e=z.current;if(!e)return;let i=[],n=function(t){let i=!(arguments.length>1)||void 0===arguments[1]||arguments[1];if(!e||!e.contains(t))return;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),s=r.top-n.top,a=Math.min(24,Math.max(12,(e.clientHeight-r.height)/2)),l=e.scrollTop+s-a;e.scrollTo({top:Math.max(0,l),behavior:i?"smooth":"auto"})},r=e=>{let t=e.target;t&&("INPUT"===t.tagName||"TEXTAREA"===t.tagName||"SELECT"===t.tagName||t.isContentEditable)&&(N.current=t,n(t,!1),i.push(setTimeout(()=>n(t,!0),120)),i.push(setTimeout(()=>n(t,!0),300)),i.push(setTimeout(()=>n(t,!0),500)))},s=()=>{N.current=null},a=()=>{N.current&&n(N.current,!0)};e.addEventListener("focusin",r),e.addEventListener("focusout",s);let l=window.visualViewport;return null==l||l.addEventListener("resize",a),()=>{i.forEach(clearTimeout),e.removeEventListener("focusin",r),e.removeEventListener("focusout",s),null==l||l.removeEventListener("resize",a)}},[t]),(0,n.jsx)(o.M,{children:t&&(0,n.jsxs)("div",{className:"md:hidden fixed inset-x-0 z-[100] flex items-end",role:"dialog","aria-modal":"true","aria-label":m,style:{top:"var(--vv-offset-top, 0px)",height:"var(--app-height)"},children:[(0,n.jsx)(d.E.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},transition:{duration:.22,ease:[.22,1,.36,1]},className:"absolute inset-0",children:(0,n.jsx)(d.E.div,{style:{opacity:p},onClick:y,className:"absolute inset-0 bg-black/50 backdrop-blur-sm"})}),(0,n.jsxs)(d.E.div,{style:{y:b,maxHeight:"90%"},initial:{y:"100%"},animate:{y:0},exit:{y:"100%"},transition:{type:"spring",damping:30,stiffness:320,mass:.8},drag:"y",dragListener:!1,dragControls:g,dragConstraints:{top:0},dragElastic:{top:.12,bottom:.75},onDragEnd:j,role:"dialog","aria-modal":"true",className:(0,c.cn)("relative w-full bg-white dark:bg-[#18181b] border-t border-transparent dark:border-white/[0.08] rounded-t-2xl","flex flex-col overflow-hidden mobile-sheet-pad shadow-2xl",v),children:[(0,n.jsx)("div",{onPointerDown:e=>g.start(e),className:"flex justify-center pt-3 pb-2 shrink-0 cursor-grab active:cursor-grabbing touch-none select-none",children:(0,n.jsx)("div",{className:"w-9 h-1 rounded-full bg-zinc-300 dark:bg-zinc-700"})}),m&&(0,n.jsx)("div",{className:"px-4 pb-3 border-b border-zinc-200/40 dark:border-zinc-800/60 shrink-0",children:(0,n.jsx)("h3",{className:"text-[var(--mobile-font-h2)] font-semibold text-zinc-900 dark:text-zinc-100",children:m})}),(0,n.jsx)("div",{ref:z,className:"flex-1 overflow-y-auto overflow-x-hidden px-4 pt-3 pb-2 mobile-scroll mobile-sheet-scroll",children:f}),x&&(0,n.jsx)("div",{className:"shrink-0 px-4 pt-2.5 pb-1 border-t border-zinc-100 dark:border-zinc-800/80 bg-white/95 dark:bg-[#18181b]/95 backdrop-blur-md",children:x})]})]})})}},59112:function(e,t,i){i.r(t),i.d(t,{default:function(){return j}});var n=i(57437),r=i(2265),s=i(98319),a=i(10136),l=i(49717),o=i(22606),d=i(67920),c=i(83008),u=i(93448),h=i(95805),m=i(88501),f=i(38553),x=i(69076),v=i(30401),g=i(21047),b=i(99397),p=i(48013);let w={timetableView:"my",setTimetableView:()=>{},timetableData:{},todayInfo:{index:1,key:"mon"},memo:"ë©ëª¨ ìì ¯ ììì
ëë¤.",onMemoChange:()=>{},scheduleEvents:[{id:"1",title:"êµì§ì íì",date:"2026-03-15",tag:"red",createdAt:""},{id:"2",title:"íë¶ëª¨ ìë´",date:"2026-03-16",tag:"green",createdAt:""}],isGuest:!0,attendanceStats:{absent:1,late:0,early:1,passing:0},attendanceRecords:[],homeroomStudents:[],roleAssignments:[{id:"1",studentId:"s1",studentName:"ê¹ì² ì",role:"ì¹ í ì§ì°ê¸°"},{id:"2",studentId:"s2",studentName:"ì´ìí¬",role:"ì°ì ë¹ë²"}],onReload:()=>{}},k=[{id:"timetable",label:"ìê°í",icon:(0,n.jsx)(function(e){let{size:t=18,className:i="",...r}=e;return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 24 24",fill:"none",className:i,...r,children:(0,n.jsx)("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M19.25 3c.966 0 1.75.784 1.75 1.75v14.5A1.75 1.75 0 0 1 19.25 21H4.75A1.75 1.75 0 0 1 3 19.25V4.75C3 3.784 3.784 3 4.75 3zM4.5 10v9.25c0 .138.112.25.25.25H8.5V10zm5.5 0v9.5h4V10zm5.5 0v9.5h3.75a.25.25 0 0 0 .25-.25V10zM4.75 4.5a.25.25 0 0 0-.25.25V8.5h4v-4zm5.25 4h4v-4h-4zm5.5 0h4V4.75a.25.25 0 0 0-.25-.25H15.5z"})})},{size:18})},{id:"memo",label:"ë©ëª¨",icon:(0,n.jsx)(function(e){let{size:t=18,className:i="",...r}=e;return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 24 24",fill:"none",className:i,...r,children:(0,n.jsx)("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M19.25 3c.966 0 1.75.784 1.75 1.75v9.005l-.004.067-.001.013-.002.015-.012.068-.002.008a1 1 0 0 1-.03.095l-.005.012-.006.016-.005.01-.016.034-.005.01-.007.013-.01.018-.006.009a1 1 0 0 1-.082.109l-.003.004-.024.024-6.5 6.5-.024.023-.004.004-.024.02-.002.002a1 1 0 0 1-.083.06l-.01.005-.017.01-.013.008-.01.005-.033.016-.011.005-.016.007-.012.004-.069.023-.004.001-.022.006-.008.002-.068.012-.015.002-.013.001-.03.003h-.037L13.75 21h-9A1.75 1.75 0 0 1 3 19.25V4.75C3 3.784 3.784 3 4.75 3zM4.75 4.5a.25.25 0 0 0-.25.25v14.5c0 .138.112.25.25.25H13v-5.75a.75.75 0 0 1 .75-.75h5.75V4.75a.25.25 0 0 0-.25-.25zm9.75 13.94 3.94-3.94H14.5z"})})},{size:18})},{id:"attendance",label:"ì¶ê²° íí©",icon:(0,n.jsx)(h.Z,{size:18,strokeWidth:1.5})},{id:"roles",label:"íìë³ ìí ",icon:(0,n.jsx)(function(e){let{size:t=18,className:i="",...r}=e;return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 24 24",fill:"none",className:i,...r,children:(0,n.jsxs)("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",children:[(0,n.jsx)("path",{d:"M12 5.5a4.5 4.5 0 1 1 0 9 4.5 4.5 0 0 1 0-9M12 7a3 3 0 1 0 0 6 3 3 0 0 0 0-6"}),(0,n.jsx)("path",{d:"M12 2a8 8 0 0 1 7.705 10.146l3.037 3.036c.977.976.49 2.646-.858 2.946l-2.256.5-.501 2.257c-.3 1.347-1.969 1.834-2.945.858l-3.756-3.756A8 8 0 0 1 12 18q-.215 0-.428-.013l-3.754 3.756c-.976.976-2.646.49-2.946-.858l-.502-2.256-2.255-.501c-1.347-.3-1.833-1.97-.857-2.946l3.036-3.037A8 8 0 0 1 12 2M2.318 16.243a.25.25 0 0 0 .122.42l2.722.606.104.03a.75.75 0 0 1 .465.539l.606 2.722a.25.25 0 0 0 .42.122l3-3A8.02 8.02 0 0 1 4.89 13.67zm16.792-2.572a8.02 8.02 0 0 1-4.868 4.01l3 3c.14.14.378.07.421-.121l.605-2.722.03-.104a.75.75 0 0 1 .539-.465l2.722-.606a.25.25 0 0 0 .123-.42zM12 3.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13"})]})})},{size:18})}
1,{id:"schedule",label:"ë¤ê°ì¤ë ì¼ì ",icon:(0,n.jsx)(m.Z,{size:18,strokeWidth:1.5})},{id:"meal",label:"ì¤ëì ê¸ì",icon:(0,n.jsx)(f.Z,{size:18,strokeWidth:1.5})},{id:"checklist",label:"ì²´í¬ë¦¬ì¤í¸",icon:(0,n.jsx)(function(e){let{size:t=18,className:i="",...r}=e;return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 24 24",fill:"none",className:i,...r,children:(0,n.jsxs)("g",{fill:"currentColor",children:[(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.25 16a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-.75.75h-3.5a.75.75 0 0 1-.75-.75v-3.5a.75.75 0 0 1 .75-.75zM4.5 19.5h2v-2h-2z"}),(0,n.jsx)("path",{d:"M20.25 17.25a.75.75 0 0 1 0 1.5h-9.5a.75.75 0 0 1 0-1.5z"}),(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.25 9.5a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-.75.75h-3.5a.75.75 0 0 1-.75-.75v-3.5a.75.75 0 0 1 .75-.75zM4.5 13h2v-2h-2z"}),(0,n.jsx)("path",{d:"M20.25 11.25a.75.75 0 0 1 0 1.5h-9.5a.75.75 0 0 1 0-1.5z"}),(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.25 3a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-.75.75h-3.5A.75.75 0 0 1 3 7.25v-3.5A.75.75 0 0 1 3.75 3zM4.5 6.5h2v-2h-2z"}),(0,n.jsx)("path",{d:"M20.25 5.5a.75.75 0 0 1 0 1.5h-9.5a.75.75 0 0 1 0-1.5z"})]})})},{size:18})},{id:"work-note-shortcut",label:"ì
무ë
¸í¸ ë°ë¡ê°ê¸°",icon:(0,n.jsx)(p.k7,{size:18,strokeWidth:1.5})},{id:"dday",label:"D-DAY",icon:(0,n.jsx)(function(e){let{size:t=18,className:i="",...r}=e;return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 24 24",fill:"none",className:i,...r,children:(0,n.jsx)("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M9.68 3a2.75 2.75 0 0 1 2.738 2.492l.048.508h7.784a.75.75 0 0 1 .75.75v10.5a.75.75 0 0 1-.75.75h-5.668a2.75 2.75 0 0 1-2.74-2.51l-.086-.99H4.5v5.75a.75.75 0 0 1-1.5 0V3.75A.75.75 0 0 1 3.75 3zm3.51 10.68v.005l.147 1.674a1.25 1.25 0 0 0 1.245 1.141H19.5v-9h-6.894zM4.5 13h7.12l-.696-7.367A1.25 1.25 0 0 0 9.68 4.5H4.5z"})})},{size:18})},{id:"weather",label:"ì¤ëì ë ì¨",icon:(0,n.jsx)(function(e){let{size:t=18,className:i="",...r}=e;return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 24 24",fill:"none",className:i,...r,children:(0,n.jsx)("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M12 3a7.25 7.25 0 0 1 7.183 6.263A5.502 5.502 0 0 1 17.5 20h-12a4.5 4.5 0 0 1-.706-8.945A7.25 7.25 0 0 1 12 3m0 1.5a5.75 5.75 0 0 0-5.595 7.081.75.75 0 0 1-.764.922L5.5 12.5a3 3 0 1 0 0 6h12a4 4 0 0 0 .833-7.913.75.75 0 0 1-.593-.689A5.75 5.75 0 0 0 12 4.5"})})},{size:18})}];function y(){let{visibleWidgets:e,layouts:t,setConfig:i}=(0,o.Ln)(),h=(0,d.XC)(),m=(0,a.N)(),{showToast:f}=(0,s.p)(),p=r.useRef(null),[y,j]=r.useState(1),[z,N]=r.useState(!1),[M,L]=r.useState(t),[E,C]=r.useState(e),[R,B]=r.useState(!1),[D,W]=r.useState(!1);r.useEffect(()=>{R||(L(t),C(e))},[t,e,R]);let A=r.useMemo(()=>{let e=(null==M?void 0:M.lg)||[],t=new Set(E),i=e.filter(e=>t.has(e.i)).reduce((e,t)=>Math.max(e,(t.y||0)+(t.h||0)),0);return Math.max(520,180*i+16*Math.max(0,i-1)+48)},[M,E]),S=e=>{E.includes(e)?C(t=>t.filter(t=>t!==e)):(C(t=>[...t,e]),L(t=>{let i={...t},n=o.DV[e];return["lg","md","sm"].forEach(t=>{let r=i[t]?[...i[t]]:[];if(!r.some(t=>t.i===e)&&n){let t=r.reduce((e,t)=>Math.max(e,(t.y||0)+(t.h||0)),0);r.push({i:e,x:0,y:t,w:n.defaultW,h:n.defaultH,minW:n.minW,minH:n.minH,maxW:n.maxW,maxH:n.maxH})}i[t]=r}),i})),B(!0)},T=async()=>{N(!0);try{let e=await (0,c.X)("saveDashboardConfig",{layouts:M,visibleWidgets:E},h);if(!e.success){if("Unauthorized"===e.error||"Unauthorized"===e.message){i(M,E),B(!1),W(!0),f("ì²´í 모ëììë íì¬ ë¸ë¼ì°ì ì ìì ì ì¥ë©ëë¤.","info"),setTimeout(()=>W(!1),2e3);return}f(e.error||"ì ì¥ì ì¤í¨íìµëë¤. ë¤ì ìëí´ì£¼ì¸ì.","error");return}i(M,E),B(!1),W(!0),setTimeout(()=>W(!1),2e3)}catch(e){console.error("Failed to save dashboard config:",e),f("ì ì¥ ì¤ ì¤ë¥ê° ë°ìíìµëë¤. ë¤ì ìëí´ì£¼ì¸ì.","error")}finally{N(!1)}};return r.useEffect(()=>{let e=()=>{if(p.current){let{width:e}=p.current.getBoundingClientRect();j(Math.max(.1,Math.min(1,(e-48)/1200)))}};e();let t=new ResizeObserver(e);return p.current&&t.observe(p.current),()=>t.disconnect()},[]),(0,n.jsxs)("div",{className:"flex flex-col h-full",children:[(0,n.jsxs)("div",{className:"flex items-end justify-between pb-2 mb-4 border-b border-zinc-200 dark:border-[#27272a] shrink-0",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{className:"text-[17px] font-medium text-zinc-900 dark:text-white",children:"ëìë³´ë í¸ì§"}),(0,n.jsx)("p",{className:"text-[13px] text-zinc-500 mt-1",children:"ì¼ìª½ìì ìì ¯ì ì¼ê³ ëê³ , ì¤ë¥¸ìª½ìì ëì´ í¬ê¸°ì ì리를 ì íì¸ì."})]}),(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsxs)("button",{onClick:()=>{(async()=>{await m({title:"기본 ì¤ì ì¼ë¡ ëë릴ê¹ì?",description:"ì§ê¸ ë°°ì¹í ìì ¯ 구ì±ì´ ì²ì ìíë¡ ëìê°ëë¤.",confirmLabel:"ëë리기",tone
1:"default"})&&(L(o.Gj),C(o.h4),B(!0))})()},className:"flex items-center gap-2 px-3 py-1.5 rounded-lg text-sm text-zinc-500 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-zinc-200 hover:bg-zinc-100 dark:hover:bg-zinc-800 transition-colors",children:[(0,n.jsx)(x.Z,{size:16}),"ì´ê¸°í"]}),(0,n.jsxs)("button",{onClick:T,disabled:!R||z,className:(0,u.cn)("flex items-center gap-2 px-3 py-1.5 rounded-lg text-sm font-medium transition-colors",R&&!z?"bg-[#007AFF] dark:bg-[#2883DE] text-white hover:opacity-90":D?"text-[#007AFF] dark:text-[#2883DE]":"text-zinc-400 cursor-not-allowed"),children:[(0,n.jsx)(v.Z,{size:16}),z?"ì ì¥ ì¤...":D?"ì ì¥ë¨":"ì ì¥"]})]})]}),(0,n.jsxs)("div",{className:"flex flex-1 gap-6 min-h-0",children:[(0,n.jsx)("div",{className:"w-64 shrink-0 flex flex-col gap-4",children:(0,n.jsxs)("div",{className:"bg-zinc-50 dark:bg-[#18181b] rounded-xl p-3 border border-zinc-200 dark:border-[#27272a] h-full overflow-y-auto flex flex-col",children:[(0,n.jsx)("h4",{className:"text-[14px] font-medium text-zinc-700 dark:text-zinc-300 mb-4",children:"ìì ¯ 목ë¡"}),(0,n.jsx)("div",{className:"space-y-2 flex-1",children:k.map(e=>{let t=e.id,i=E.includes(t);return(0,n.jsxs)("button",{onClick:()=>S(t),"aria-pressed":i,className:(0,u.cn)("w-full flex items-center justify-between py-2 px-3 rounded-md border transition-colors text-sm","bg-white dark:bg-[#18181b] border-zinc-200 dark:border-[#27272a]","hover:border-zinc-300 dark:hover:border-[#3f3f46]",i?"text-zinc-900 dark:text-zinc-100":"text-zinc-400 dark:text-zinc-500"),children:[(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[e.icon,(0,n.jsx)("span",{children:e.label})]}),i?(0,n.jsx)(g.Z,{size:16,className:"shrink-0 text-[#007AFF] dark:text-[#2883DE]"}):(0,n.jsx)(b.Z,{size:16,className:"shrink-0"})]},t)})})]})}),(0,n.jsxs)("div",{ref:p,className:"flex-1 bg-zinc-100 dark:bg-[#18181b] rounded-xl border border-zinc-200 dark:border-[#27272a] overflow-hidden relative",children:[(0,n.jsx)("div",{className:"absolute inset-0 overflow-y-auto custom-scrollbar p-6 flex flex-col items-center",children:(0,n.jsx)("div",{style:{width:1200*y,height:A*y,position:"relative",transition:"width 0.2s, height 0.2s"},children:(0,n.jsx)("div",{className:"transform origin-top-left transition-transform",style:{width:"1200px",transform:"scale(".concat(y,")")},children:(0,n.jsx)(l.Z,{data:w,isEditing:!0,customLayouts:M,customVisibleWidgets:E,onLayoutChangeOverride:e=>{L(e),B(!0)},onRemoveWidget:S,transformScale:y})})})}),0===E.length&&(0,n.jsx)("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:(0,n.jsxs)("div",{className:"text-center text-[13px] text-zinc-500",children:["ëìë³´ëì ì¬ë¦° ìì ¯ì´ ììµëë¤.",(0,n.jsx)("br",{}),"ì¼ìª½ 목ë¡ìì ìì ¯ì ëë¬ ì¶ê°íì¸ì."]})})]})]})]})}function j(){return(0,n.jsx)("div",{className:"h-full flex flex-col",children:(0,n.jsx)("div",{className:"flex-1 min-h-0",children:(0,n.jsx)(y,{})})})}},21652:function(e,t,i){i.d(t,{RS:function(){return n},UM:function(){return r},nX:function(){return s}});let n="(max-width: ".concat(599,"px), (max-height: ").concat(599,"px) and (max-width: ").concat(1023,"px) and (hover: none)");function r(){var e,t,i;let n=!1;if("function"==typeof window.matchMedia)try{n=window.matchMedia("(hover: hover)").matches}catch(e){n=!1}return e=window.innerWidth,t=window.innerHeight,i=n,e<=599||!i&&t<=599&&e<=1023}function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"undefined"==typeof navigator?{}:navigator,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.matchMedia.bind(window);if(!0===e.standalone)return!0;if(!t)return!1;try{return["standalone","fullscreen","minimal-ui"].some(e=>t("(display-mode: ".concat(e,")")).matches)}catch(e){return!1}}},16338:function(e,t,i){i.d(t,{o:function(){return l}});var n=i(3011),r=i(89134),s=i(83008);let a=null,l=(0,n.U)()((0,r.tJ)((e,t)=>({title:"ì²´í¬ë¦¬ì¤í¸",items:[],isLoaded:!1,isLoading:!1,syncWithDB:async e=>{var i;if((null==e?void 0:null===(i=e.user)||void 0===i?void 0:i.id)&&"teacher-1"!==e.user.id){if(!t().isLoaded){console.warn("[checklist] ìë²ìì ìì§ ë¶ë¬ì¤ì§ ëª»í´ ì ì¥ì ë³´ë¥í©ëë¤.");return}a&&clearTimeout(a),a=setTimeout(async()=>{a=null;let{title:i,items:n}=t();try{await (0,s.X)("saveChecklist",{title:i,items:n},e)}catch(e){console.error("Failed to sync checklist with DB:",e)}},700)}},flushSync:async e=>{var i;if(!(null==e?void 0:null===(i=e.user)||void 0===i?void 0:i.id)||"teacher-1"===e.user.id||!t().isLoaded||!a)return;clearTimeout(a),a=null;let{title:n,items:r}=t();try{await (0,s.X)("saveChecklist",{title:n,items:r},e)}catch(e){console.error("Failed to flush checklist to DB:",e)}},loadFromDB:async i=>{if(i&&"teacher-1"!==i.user.id&&!t().isLoading&&!t().isLoaded){e({isLoading:!0});try{let t=await (0,s.X)("getChecklist",{},i);t.success?t.data?e({title:t.data.title||"ì²´í¬ë¦¬ì¤í¸",items:t.data.items||[],isLoaded:!0,isLoading:!1}):e({isLoaded:!0,isLoading:!1}):(console.warn("[checklist] load failed, keeping local data:",t.message||t.error),e({isLoading:!1}))}catch(t){console.error("Failed to load checklist from DB:",t),e({isLoading:!1})}}},setTitle:(i,n)=>{e({title:i}),t().syncWithDB(n)},addItem:function(i){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=crypto.randomUUID();return e(e=>({items:[...e.items,{id:r,text:n,checked:!1}
1]})),t().syncWithDB(i),r},updateItem:(i,n,r)=>{e(e=>({items:e.items.map(e=>e.id===i?{...e,text:n}:e)})),t().syncWithDB(r)},toggleItem:(i,n)=>{e(e=>({items:e.items.map(e=>e.id===i?{...e,checked:!e.checked}:e)})),t().syncWithDB(n)},deleteItem:(i,n)=>{e(e=>({items:e.items.filter(e=>e.id!==i)})),t().syncWithDB(n)},reorderItems:(i,n)=>{e({items:i}),t().syncWithDB(n)},clearItems:()=>{a&&(clearTimeout(a),a=null),e({items:[],isLoaded:!1,isLoading:!1})}}),{name:"checklist-storage-v1",partialize:e=>({title:e.title,items:e.items})}))},86267:function(e,t,i){i.d(t,{X:function(){return a}});var n=i(3011),r=i(89134),s=i(83008);let a=(0,n.U)()((0,r.tJ)((e,t)=>({linkedNotes:[],targetNoteId:null,isLoaded:!1,syncWithDB:async()=>{if(!t().isLoaded){console.warn("[workNoteShortcut] ìë²ìì ìì§ ë¶ë¬ì¤ì§ ëª»í´ ì ì¥ì ë³´ë¥í©ëë¤.");return}let{linkedNotes:e}=t();try{await (0,s.X)("saveWorkNoteShortcut",{linkedNotes:e},{user:{id:"",name:"",role:""}})}catch(e){console.error("Failed to sync work note shortcuts with DB:",e)}},loadFromDB:async()=>{try{let r=await (0,s.X)("getWorkNoteShortcut",{},{user:{id:"",name:"",role:""}});if(r.success){var i,n;e({linkedNotes:null!==(n=null===(i=r.data)||void 0===i?void 0:i.linkedNotes)&&void 0!==n?n:t().linkedNotes,isLoaded:!0})}else console.warn("[workNoteShortcut] ë¶ë¬ì¤ê¸° ì¤í¨, ì´ ê¸°ê¸° ë°ì´í°ë¥¼ ì ì§í©ëë¤.")}catch(e){console.error("Failed to load work note shortcuts from DB:",e)}},addLinkedNote:(i,n)=>{e(e=>e.linkedNotes.some(e=>e.id===i)?e:{linkedNotes:[...e.linkedNotes,{id:i,title:n}]}),t().syncWithDB()},removeLinkedNote:i=>{e(e=>({linkedNotes:e.linkedNotes.filter(e=>e.id!==i)})),t().syncWithDB()},setTargetNoteId:t=>e({targetNoteId:t}),clearTargetNoteId:()=>e({targetNoteId:null}),clear:()=>e({linkedNotes:[],targetNoteId:null,isLoaded:!1})}),{name:"work-note-shortcut-v2",partialize:e=>({linkedNotes:e.linkedNotes})}))}}]);
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.