@impakers/debug 1.5.0 → 1.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/react.js +461 -51
  2. package/dist/react.mjs +461 -51
  3. package/package.json +1 -1
package/dist/react.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- "use strict";"use client";var Do=Object.create;var En=Object.defineProperty;var jo=Object.getOwnPropertyDescriptor;var Wo=Object.getOwnPropertyNames;var Oo=Object.getPrototypeOf,Vo=Object.prototype.hasOwnProperty;var Zo=(e,n)=>{for(var t in n)En(e,t,{get:n[t],enumerable:!0})},Lt=(e,n,t,o)=>{if(n&&typeof n=="object"||typeof n=="function")for(let s of Wo(n))!Vo.call(e,s)&&s!==t&&En(e,s,{get:()=>n[s],enumerable:!(o=jo(n,s))||o.enumerable});return e};var Un=(e,n,t)=>(t=e!=null?Do(Oo(e)):{},Lt(n||!e||!e.__esModule?En(t,"default",{value:e,enumerable:!0}):t,e)),Ko=e=>Lt(En({},"__esModule",{value:!0}),e);var Mr={};Zo(Mr,{ImpakersDebug:()=>ze,ImpakersDebugProvider:()=>Rr});module.exports=Ko(Mr);var Ee=require("react");var Nt="impakers-debug-token",Rn="impakers-debug-token-data";function dn(){if(typeof window>"u")return null;try{let e=localStorage.getItem(Rn);if(!e)return null;let n=JSON.parse(e);return new Date(n.expiresAt)<new Date?(Xn(),null):n.token}catch{return null}}function Xe(){return dn()!==null}function Tt(){if(typeof window>"u")return null;try{let e=localStorage.getItem(Rn);return e?JSON.parse(e).serviceName:null}catch{return null}}function Uo(e){if(!(typeof window>"u"))try{let n={token:e.token,serviceName:e.serviceName,expiresAt:e.expiresAt};localStorage.setItem(Rn,JSON.stringify(n)),localStorage.setItem(Nt,e.token)}catch{}}function Xn(){if(!(typeof window>"u"))try{localStorage.removeItem(Rn),localStorage.removeItem(Nt)}catch{}}async function It(e,n){let t=window.location.hostname,o=await fetch(`${e}/auth`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:n,domain:t})});if(!o.ok){let r=await o.json().catch(()=>({message:"\uC778\uC99D \uC2E4\uD328"}));throw new Error(r.message||"\uC778\uC99D \uC2E4\uD328")}let s=await o.json();return Uo(s),s}var He=class He{static showAuth(){He._eventTarget?.dispatchEvent(new CustomEvent("impakers-debug:show-auth"))}static isActive(){return Xe()}static deactivate(){Xn(),He._eventTarget?.dispatchEvent(new CustomEvent("impakers-debug:deactivate"))}static open(){if(!Xe()){He.showAuth();return}He._eventTarget?.dispatchEvent(new CustomEvent("impakers-debug:open"))}static _on(n,t){return He._eventTarget?.addEventListener(n,t),()=>He._eventTarget?.removeEventListener(n,t)}};He._eventTarget=typeof EventTarget<"u"?new EventTarget:null;var ze=He;var g=require("react"),So=require("react-dom");var ee=require("react");var Xo=`.styles-module__popup___IhzrD svg[fill=none] {
2
+ "use strict";"use client";var Wo=Object.create;var zn=Object.defineProperty;var Oo=Object.getOwnPropertyDescriptor;var Vo=Object.getOwnPropertyNames;var Uo=Object.getPrototypeOf,Ko=Object.prototype.hasOwnProperty;var Zo=(e,n)=>{for(var o in n)zn(e,o,{get:n[o],enumerable:!0})},Tt=(e,n,o,t)=>{if(n&&typeof n=="object"||typeof n=="function")for(let s of Vo(n))!Ko.call(e,s)&&s!==o&&zn(e,s,{get:()=>n[s],enumerable:!(t=Oo(n,s))||t.enumerable});return e};var tt=(e,n,o)=>(o=e!=null?Wo(Uo(e)):{},Tt(n||!e||!e.__esModule?zn(o,"default",{value:e,enumerable:!0}):o,e)),Xo=e=>Tt(zn({},"__esModule",{value:!0}),e);var Br={};Zo(Br,{ImpakersDebug:()=>Ke,ImpakersDebugProvider:()=>$r});module.exports=Xo(Br);var Be=require("react");var It="impakers-debug-token",Dn="impakers-debug-token-data";function Ge(){if(typeof window>"u")return null;try{let e=localStorage.getItem(Dn);if(!e)return null;let n=JSON.parse(e);return new Date(n.expiresAt)<new Date?(ot(),null):n.token}catch{return null}}function rn(){return Ge()!==null}function Et(){if(typeof window>"u")return null;try{let e=localStorage.getItem(Dn);return e?JSON.parse(e).serviceName:null}catch{return null}}function Yo(e){if(!(typeof window>"u"))try{let n={token:e.token,serviceName:e.serviceName,expiresAt:e.expiresAt};localStorage.setItem(Dn,JSON.stringify(n)),localStorage.setItem(It,e.token)}catch{}}function ot(){if(!(typeof window>"u"))try{localStorage.removeItem(Dn),localStorage.removeItem(It)}catch{}}async function Rt(e,n){let o=window.location.hostname,t=await fetch(`${e}/auth`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:n,domain:o})});if(!t.ok){let r=await t.json().catch(()=>({message:"\uC778\uC99D \uC2E4\uD328"}));throw new Error(r.message||"\uC778\uC99D \uC2E4\uD328")}let s=await t.json();return Yo(s),s}var Oe=class Oe{static showAuth(){Oe._eventTarget?.dispatchEvent(new CustomEvent("impakers-debug:show-auth"))}static isActive(){return rn()}static deactivate(){ot(),Oe._eventTarget?.dispatchEvent(new CustomEvent("impakers-debug:deactivate"))}static open(){if(!rn()){Oe.showAuth();return}Oe._eventTarget?.dispatchEvent(new CustomEvent("impakers-debug:open"))}static _on(n,o){return Oe._eventTarget?.addEventListener(n,o),()=>Oe._eventTarget?.removeEventListener(n,o)}};Oe._eventTarget=typeof EventTarget<"u"?new EventTarget:null;var Ke=Oe;var y=require("react"),Io=require("react-dom");var oe=require("react");var Qo=`.styles-module__popup___IhzrD svg[fill=none] {
3
3
  fill: none !important;
4
4
  }
5
5
  .styles-module__popup___IhzrD svg[fill=none] :not([fill]) {
@@ -329,11 +329,11 @@
329
329
  .styles-module__light___6AaSQ .styles-module__deleteButton___4VuAE:hover {
330
330
  background-color: color-mix(in srgb, var(--agentation-color-red) 25%, transparent);
331
331
  color: var(--agentation-color-red);
332
- }`,Yo={popup:"styles-module__popup___IhzrD",enter:"styles-module__enter___L7U7N",popupEnter:"styles-module__popupEnter___AuQDN",entered:"styles-module__entered___COX-w",exit:"styles-module__exit___5eGjE",popupExit:"styles-module__popupExit___JJKQX",shake:"styles-module__shake___jdbWe",header:"styles-module__header___wWsSi",element:"styles-module__element___fTV2z",headerToggle:"styles-module__headerToggle___WpW0b",chevron:"styles-module__chevron___ZZJlR",expanded:"styles-module__expanded___2Hxgv",stylesWrapper:"styles-module__stylesWrapper___pnHgy",stylesInner:"styles-module__stylesInner___YYZe2",stylesBlock:"styles-module__stylesBlock___VfQKn",styleLine:"styles-module__styleLine___1YQiD",styleProperty:"styles-module__styleProperty___84L1i",styleValue:"styles-module__styleValue___q51-h",timestamp:"styles-module__timestamp___Dtpsv",quote:"styles-module__quote___mcMmQ",textarea:"styles-module__textarea___jrSae",green:"styles-module__green___99l3h",actions:"styles-module__actions___D6x3f",cancel:"styles-module__cancel___hRjnL",submit:"styles-module__submit___K-mIR",shortcutHint:"styles-module__shortcutHint___ihsrd",deleteWrapper:"styles-module__deleteWrapper___oSjdo",deleteButton:"styles-module__deleteButton___4VuAE",light:"styles-module__light___6AaSQ"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-annotation-popup-css-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-annotation-popup-css-styles",document.head.appendChild(e)),e.textContent=Xo}var j=Yo;var Mn=require("react/jsx-runtime");var Et=({size:e=24})=>(0,Mn.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,Mn.jsx)("path",{d:"M13.5 4C14.7426 4 15.75 5.00736 15.75 6.25V7H18.5C18.9142 7 19.25 7.33579 19.25 7.75C19.25 8.16421 18.9142 8.5 18.5 8.5H17.9678L17.6328 16.2217C17.61 16.7475 17.5912 17.1861 17.5469 17.543C17.5015 17.9087 17.4225 18.2506 17.2461 18.5723C16.9747 19.0671 16.5579 19.4671 16.0518 19.7168C15.7227 19.8791 15.3772 19.9422 15.0098 19.9717C14.6514 20.0004 14.2126 20 13.6865 20H10.3135C9.78735 20 9.34856 20.0004 8.99023 19.9717C8.62278 19.9422 8.27729 19.8791 7.94824 19.7168C7.44205 19.4671 7.02532 19.0671 6.75391 18.5723C6.57751 18.2506 6.49853 17.9087 6.45312 17.543C6.40883 17.1861 6.39005 16.7475 6.36719 16.2217L6.03223 8.5H5.5C5.08579 8.5 4.75 8.16421 4.75 7.75C4.75 7.33579 5.08579 7 5.5 7H8.25V6.25C8.25 5.00736 9.25736 4 10.5 4H13.5ZM7.86621 16.1562C7.89013 16.7063 7.90624 17.0751 7.94141 17.3584C7.97545 17.6326 8.02151 17.7644 8.06934 17.8516C8.19271 18.0763 8.38239 18.2577 8.6123 18.3711C8.70153 18.4151 8.83504 18.4545 9.11035 18.4766C9.39482 18.4994 9.76335 18.5 10.3135 18.5H13.6865C14.2367 18.5 14.6052 18.4994 14.8896 18.4766C15.165 18.4545 15.2985 18.4151 15.3877 18.3711C15.6176 18.2577 15.8073 18.0763 15.9307 17.8516C15.9785 17.7644 16.0245 17.6326 16.0586 17.3584C16.0938 17.0751 16.1099 16.7063 16.1338 16.1562L16.4668 8.5H7.5332L7.86621 16.1562ZM9.97656 10.75C10.3906 10.7371 10.7371 11.0626 10.75 11.4766L10.875 15.4766C10.8879 15.8906 10.5624 16.2371 10.1484 16.25C9.73443 16.2629 9.38794 15.9374 9.375 15.5234L9.25 11.5234C9.23706 11.1094 9.56255 10.7629 9.97656 10.75ZM14.0244 10.75C14.4383 10.7635 14.7635 11.1105 14.75 11.5244L14.6201 15.5244C14.6066 15.9384 14.2596 16.2634 13.8457 16.25C13.4317 16.2365 13.1067 15.8896 13.1201 15.4756L13.251 11.4756C13.2645 11.0617 13.6105 10.7366 14.0244 10.75ZM10.5 5.5C10.0858 5.5 9.75 5.83579 9.75 6.25V7H14.25V6.25C14.25 5.83579 13.9142 5.5 13.5 5.5H10.5Z",fill:"currentColor"})});var Qo=["data-feedback-toolbar","data-annotation-popup","data-annotation-marker"],Dr=Qo.flatMap(e=>[`:not([${e}])`,`:not([${e}] *)`]).join("");var Yn="__agentation_freeze";function qo(){if(typeof window>"u")return{frozen:!1,installed:!0,origSetTimeout:setTimeout,origSetInterval:setInterval,origRAF:n=>0,pausedAnimations:[],frozenTimeoutQueue:[],frozenRAFQueue:[]};let e=window;return e[Yn]||(e[Yn]={frozen:!1,installed:!1,origSetTimeout:null,origSetInterval:null,origRAF:null,pausedAnimations:[],frozenTimeoutQueue:[],frozenRAFQueue:[]}),e[Yn]}var _e=qo();typeof window<"u"&&!_e.installed&&(_e.origSetTimeout=window.setTimeout.bind(window),_e.origSetInterval=window.setInterval.bind(window),_e.origRAF=window.requestAnimationFrame.bind(window),window.setTimeout=(e,n,...t)=>typeof e=="string"?_e.origSetTimeout(e,n):_e.origSetTimeout((...o)=>{_e.frozen?_e.frozenTimeoutQueue.push(()=>e(...o)):e(...o)},n,...t),window.setInterval=(e,n,...t)=>typeof e=="string"?_e.origSetInterval(e,n):_e.origSetInterval((...o)=>{_e.frozen||e(...o)},n,...t),window.requestAnimationFrame=e=>_e.origRAF(n=>{_e.frozen?_e.frozenRAFQueue.push(e):e(n)}),_e.installed=!0);var ke=_e.origSetTimeout,jr=_e.origSetInterval,Wr=_e.origRAF;var Q=require("react/jsx-runtime");function Qn(e){if(!e)return;let n=t=>t.stopImmediatePropagation();document.addEventListener("focusin",n,!0),document.addEventListener("focusout",n,!0);try{e.focus()}finally{document.removeEventListener("focusin",n,!0),document.removeEventListener("focusout",n,!0)}}var Rt=(0,ee.forwardRef)(function({element:n,timestamp:t,selectedText:o,placeholder:s="What should change?",initialValue:r="",submitLabel:a="Add",onSubmit:i,onCancel:_,onDelete:k,style:b,accentColor:C="#3c82f7",isExiting:v=!1,lightMode:$=!1,computedStyles:F},H){let[W,ce]=(0,ee.useState)(r),[pe,T]=(0,ee.useState)(!1),[w,I]=(0,ee.useState)("initial"),[O,x]=(0,ee.useState)(!1),[A,E]=(0,ee.useState)(!1),q=(0,ee.useRef)(null),M=(0,ee.useRef)(null),J=(0,ee.useRef)(null),se=(0,ee.useRef)(null);(0,ee.useEffect)(()=>{v&&w!=="exit"&&I("exit")},[v,w]),(0,ee.useEffect)(()=>{ke(()=>{I("enter")},0);let f=ke(()=>{I("entered")},200),B=ke(()=>{let P=q.current;P&&(Qn(P),P.selectionStart=P.selectionEnd=P.value.length,P.scrollTop=P.scrollHeight)},50);return()=>{clearTimeout(f),clearTimeout(B),J.current&&clearTimeout(J.current),se.current&&clearTimeout(se.current)}},[]);let fe=(0,ee.useCallback)(()=>{se.current&&clearTimeout(se.current),T(!0),se.current=ke(()=>{T(!1),Qn(q.current)},250)},[]);(0,ee.useImperativeHandle)(H,()=>({shake:fe}),[fe]);let ve=(0,ee.useCallback)(()=>{I("exit"),J.current=ke(()=>{_()},150)},[_]),re=(0,ee.useCallback)(()=>{W.trim()&&i(W.trim())},[W,i]),le=(0,ee.useCallback)(f=>{f.stopPropagation(),!f.nativeEvent.isComposing&&(f.key==="Enter"&&(f.metaKey||f.ctrlKey)&&(f.preventDefault(),re()),f.key==="Escape"&&ve())},[re,ve]),h=[j.popup,$?j.light:"",w==="enter"?j.enter:"",w==="entered"?j.entered:"",w==="exit"?j.exit:"",pe?j.shake:""].filter(Boolean).join(" ");return(0,Q.jsxs)("div",{ref:M,className:h,"data-annotation-popup":!0,style:b,onClick:f=>f.stopPropagation(),children:[(0,Q.jsxs)("div",{className:j.header,children:[F&&Object.keys(F).length>0?(0,Q.jsxs)("button",{className:j.headerToggle,onClick:()=>{let f=A;E(!A),f&&ke(()=>Qn(q.current),0)},type:"button",children:[(0,Q.jsx)("svg",{className:`${j.chevron} ${A?j.expanded:""}`,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,Q.jsx)("path",{d:"M5.5 10.25L9 7.25L5.75 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,Q.jsx)("span",{className:j.element,children:n})]}):(0,Q.jsx)("span",{className:j.element,children:n}),t&&(0,Q.jsx)("span",{className:j.timestamp,children:t})]}),F&&Object.keys(F).length>0&&(0,Q.jsx)("div",{className:`${j.stylesWrapper} ${A?j.expanded:""}`,children:(0,Q.jsx)("div",{className:j.stylesInner,children:(0,Q.jsx)("div",{className:j.stylesBlock,children:Object.entries(F).map(([f,B])=>(0,Q.jsxs)("div",{className:j.styleLine,children:[(0,Q.jsx)("span",{className:j.styleProperty,children:f.replace(/([A-Z])/g,"-$1").toLowerCase()}),": ",(0,Q.jsx)("span",{className:j.styleValue,children:B}),";"]},f))})})}),o&&(0,Q.jsxs)("div",{className:j.quote,children:["\u201C",o.slice(0,80),o.length>80?"...":"","\u201D"]}),(0,Q.jsx)("textarea",{ref:q,className:j.textarea,style:{borderColor:O?C:void 0},placeholder:s,value:W,onChange:f=>{ce(f.target.value);let B=f.target;B.style.height="auto",B.style.height=`${Math.min(B.scrollHeight,200)}px`},onFocus:()=>x(!0),onBlur:()=>x(!1),rows:4,onKeyDown:le}),(0,Q.jsxs)("div",{className:j.actions,children:[k&&(0,Q.jsx)("div",{className:j.deleteWrapper,children:(0,Q.jsx)("button",{className:j.deleteButton,onClick:k,type:"button",children:(0,Q.jsx)(Et,{size:22})})}),(0,Q.jsx)("button",{className:j.cancel,onClick:ve,children:"Cancel"}),(0,Q.jsx)("button",{className:j.submit,style:{backgroundColor:C,opacity:W.trim()?1:.4},onClick:re,disabled:!W.trim(),children:a})]}),(0,Q.jsxs)("div",{className:j.shortcutHint,children:[navigator?.platform?.includes("Mac")?"\u2318":"Ctrl","+Enter to submit"]})]})});function cn(e){if(e.parentElement)return e.parentElement;let n=e.getRootNode();return n instanceof ShadowRoot?n.host:null}function Oe(e,n){let t=e;for(;t;){if(t.matches(n))return t;t=cn(t)}return null}function Go(e,n=4){let t=[],o=e,s=0;for(;o&&s<n;){let r=o.tagName.toLowerCase();if(r==="html"||r==="body")break;let a=r;if(o.id)a=`#${o.id}`;else if(o.className&&typeof o.className=="string"){let _=o.className.split(/\s+/).find(k=>k.length>2&&!k.match(/^[a-z]{1,2}$/)&&!k.match(/[A-Z0-9]{5,}/));_&&(a=`.${_.split("_")[0]}`)}let i=cn(o);!o.parentElement&&i&&(a=`\u27E8shadow\u27E9 ${a}`),t.unshift(a),o=i,s++}return t.join(" > ")}function qn(e){let n=Go(e);if(e.dataset.element)return{name:e.dataset.element,path:n};let t=e.tagName.toLowerCase();if(["path","circle","rect","line","g"].includes(t)){let o=Oe(e,"svg");if(o){let s=cn(o);if(s instanceof HTMLElement)return{name:`graphic in ${qn(s).name}`,path:n}}return{name:"graphic element",path:n}}if(t==="svg"){let o=cn(e);if(o?.tagName.toLowerCase()==="button"){let s=o.textContent?.trim();return{name:s?`icon in "${s}" button`:"button icon",path:n}}return{name:"icon",path:n}}if(t==="button"){let o=e.textContent?.trim(),s=e.getAttribute("aria-label");return s?{name:`button [${s}]`,path:n}:{name:o?`button "${o.slice(0,25)}"`:"button",path:n}}if(t==="a"){let o=e.textContent?.trim(),s=e.getAttribute("href");return o?{name:`link "${o.slice(0,25)}"`,path:n}:s?{name:`link to ${s.slice(0,30)}`,path:n}:{name:"link",path:n}}if(t==="input"){let o=e.getAttribute("type")||"text",s=e.getAttribute("placeholder"),r=e.getAttribute("name");return s?{name:`input "${s}"`,path:n}:r?{name:`input [${r}]`,path:n}:{name:`${o} input`,path:n}}if(["h1","h2","h3","h4","h5","h6"].includes(t)){let o=e.textContent?.trim();return{name:o?`${t} "${o.slice(0,35)}"`:t,path:n}}if(t==="p"){let o=e.textContent?.trim();return o?{name:`paragraph: "${o.slice(0,40)}${o.length>40?"...":""}"`,path:n}:{name:"paragraph",path:n}}if(t==="span"||t==="label"){let o=e.textContent?.trim();return o&&o.length<40?{name:`"${o}"`,path:n}:{name:t,path:n}}if(t==="li"){let o=e.textContent?.trim();return o&&o.length<40?{name:`list item: "${o.slice(0,35)}"`,path:n}:{name:"list item",path:n}}if(t==="blockquote")return{name:"blockquote",path:n};if(t==="code"){let o=e.textContent?.trim();return o&&o.length<30?{name:`code: \`${o}\``,path:n}:{name:"code",path:n}}if(t==="pre")return{name:"code block",path:n};if(t==="img"){let o=e.getAttribute("alt");return{name:o?`image "${o.slice(0,30)}"`:"image",path:n}}if(t==="video")return{name:"video",path:n};if(["div","section","article","nav","header","footer","aside","main"].includes(t)){let o=e.className,s=e.getAttribute("role"),r=e.getAttribute("aria-label");if(r)return{name:`${t} [${r}]`,path:n};if(s)return{name:`${s}`,path:n};if(typeof o=="string"&&o){let a=o.split(/[\s_-]+/).map(i=>i.replace(/[A-Z0-9]{5,}.*$/,"")).filter(i=>i.length>2&&!/^[a-z]{1,2}$/.test(i)).slice(0,2);if(a.length>0)return{name:a.join(" "),path:n}}return{name:t==="div"?"container":t,path:n}}return{name:t,path:n}}function Mt(e){let n=[],t=e.textContent?.trim();t&&t.length<100&&n.push(t);let o=e.previousElementSibling;if(o){let r=o.textContent?.trim();r&&r.length<50&&n.unshift(`[before: "${r.slice(0,40)}"]`)}let s=e.nextElementSibling;if(s){let r=s.textContent?.trim();r&&r.length<50&&n.push(`[after: "${r.slice(0,40)}"]`)}return n.join(" ")}function At(e){let n=e.className;return typeof n!="string"||!n?"":n.split(/\s+/).filter(o=>o.length>0).map(o=>{let s=o.match(/^([a-zA-Z][a-zA-Z0-9_-]*?)(?:_[a-zA-Z0-9]{5,})?$/);return s?s[1]:o}).filter((o,s,r)=>r.indexOf(o)===s).join(", ")}var Ft=new Set(["none","normal","auto","0px","rgba(0, 0, 0, 0)","transparent","static","visible"]),Jo=new Set(["p","span","h1","h2","h3","h4","h5","h6","label","li","td","th","blockquote","figcaption","caption","legend","dt","dd","pre","code","em","strong","b","i","a","time","cite","q"]),es=new Set(["input","textarea","select"]),ns=new Set(["img","video","canvas","svg"]),ts=new Set(["div","section","article","nav","header","footer","aside","main","ul","ol","form","fieldset"]);function Pt(e){if(typeof window>"u")return{};let n=window.getComputedStyle(e),t={},o=e.tagName.toLowerCase(),s;Jo.has(o)?s=["color","fontSize","fontWeight","fontFamily","lineHeight"]:o==="button"||o==="a"&&e.getAttribute("role")==="button"?s=["backgroundColor","color","padding","borderRadius","fontSize"]:es.has(o)?s=["backgroundColor","color","padding","borderRadius","fontSize"]:ns.has(o)?s=["width","height","objectFit","borderRadius"]:ts.has(o)?s=["display","padding","margin","gap","backgroundColor"]:s=["color","fontSize","margin","padding","backgroundColor"];for(let r of s){let a=r.replace(/([A-Z])/g,"-$1").toLowerCase(),i=n.getPropertyValue(a);i&&!Ft.has(i)&&(t[r]=i)}return t}var os=["color","backgroundColor","borderColor","fontSize","fontWeight","fontFamily","lineHeight","letterSpacing","textAlign","width","height","padding","margin","border","borderRadius","display","position","top","right","bottom","left","zIndex","flexDirection","justifyContent","alignItems","gap","opacity","visibility","overflow","boxShadow","transform"];function $t(e){if(typeof window>"u")return"";let n=window.getComputedStyle(e),t=[];for(let o of os){let s=o.replace(/([A-Z])/g,"-$1").toLowerCase(),r=n.getPropertyValue(s);r&&!Ft.has(r)&&t.push(`${s}: ${r}`)}return t.join("; ")}function Ht(e){let n=[],t=e.getAttribute("role"),o=e.getAttribute("aria-label"),s=e.getAttribute("aria-describedby"),r=e.getAttribute("tabindex"),a=e.getAttribute("aria-hidden");return t&&n.push(`role="${t}"`),o&&n.push(`aria-label="${o}"`),s&&n.push(`aria-describedby="${s}"`),r&&n.push(`tabindex=${r}`),a==="true"&&n.push("aria-hidden"),e.matches("a, button, input, select, textarea, [tabindex]")&&n.push("focusable"),n.join(", ")}function Bt(e){let n=[],t=e;for(;t&&t.tagName.toLowerCase()!=="html";){let o=t.tagName.toLowerCase(),s=o;if(t.id)s=`${o}#${t.id}`;else if(t.className&&typeof t.className=="string"){let a=t.className.split(/\s+/).map(i=>i.replace(/[_][a-zA-Z0-9]{5,}.*$/,"")).find(i=>i.length>2);a&&(s=`${o}.${a}`)}let r=cn(t);!t.parentElement&&r&&(s=`\u27E8shadow\u27E9 ${s}`),n.unshift(s),t=r}return n.join(" > ")}var z={FunctionComponent:0,ClassComponent:1,IndeterminateComponent:2,HostRoot:3,HostPortal:4,HostComponent:5,HostText:6,Fragment:7,Mode:8,ContextConsumer:9,ContextProvider:10,ForwardRef:11,Profiler:12,SuspenseComponent:13,MemoComponent:14,SimpleMemoComponent:15,LazyComponent:16,IncompleteClassComponent:17,DehydratedFragment:18,SuspenseListComponent:19,ScopeComponent:21,OffscreenComponent:22,LegacyHiddenComponent:23,CacheComponent:24,TracingMarkerComponent:25,HostHoistable:26,HostSingleton:27,IncompleteFunctionComponent:28,Throw:29,ViewTransitionComponent:30,ActivityComponent:31},zt=new Set(["Component","PureComponent","Fragment","Suspense","Profiler","StrictMode","Routes","Route","Outlet","Root","ErrorBoundaryHandler","HotReload","Hot"]),Dt=[/Boundary$/,/BoundaryHandler$/,/Provider$/,/Consumer$/,/^(Inner|Outer)/,/Router$/,/^Client(Page|Segment|Root)/,/^Segment(ViewNode|Node)$/,/^LayoutSegment/,/^Server(Root|Component|Render)/,/^RSC/,/Context$/,/^Hot(Reload)?$/,/^(Dev|React)(Overlay|Tools|Root)/,/Overlay$/,/Handler$/,/^With[A-Z]/,/Wrapper$/,/^Root$/],ss=[/Page$/,/View$/,/Screen$/,/Section$/,/Card$/,/List$/,/Item$/,/Form$/,/Modal$/,/Dialog$/,/Button$/,/Nav$/,/Header$/,/Footer$/,/Layout$/,/Panel$/,/Tab$/,/Menu$/];function rs(e){let n=e?.mode??"filtered",t=zt;if(e?.skipExact){let o=e.skipExact instanceof Set?e.skipExact:new Set(e.skipExact);t=new Set([...zt,...o])}return{maxComponents:e?.maxComponents??6,maxDepth:e?.maxDepth??30,mode:n,skipExact:t,skipPatterns:e?.skipPatterns?[...Dt,...e.skipPatterns]:Dt,userPatterns:e?.userPatterns??ss,filter:e?.filter}}function is(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/([A-Z])([A-Z][a-z])/g,"$1-$2").toLowerCase()}function as(e,n=10){let t=new Set,o=e,s=0;for(;o&&s<n;)o.className&&typeof o.className=="string"&&o.className.split(/\s+/).forEach(r=>{if(r.length>1){let a=r.replace(/[_][a-zA-Z0-9]{5,}.*$/,"").toLowerCase();a.length>1&&t.add(a)}}),o=o.parentElement,s++;return t}function ls(e,n){let t=is(e);for(let o of n){if(o===t)return!0;let s=t.split("-").filter(a=>a.length>2),r=o.split("-").filter(a=>a.length>2);for(let a of s)for(let i of r)if(a===i||a.includes(i)||i.includes(a))return!0}return!1}function ds(e,n,t,o){if(t.filter)return t.filter(e,n);switch(t.mode){case"all":return!0;case"filtered":return!(t.skipExact.has(e)||t.skipPatterns.some(s=>s.test(e)));case"smart":return t.skipExact.has(e)||t.skipPatterns.some(s=>s.test(e))?!1:!!(o&&ls(e,o)||t.userPatterns.some(s=>s.test(e)));default:return!0}}var Ye=null,cs=new WeakMap;function Gn(e){return Object.keys(e).some(n=>n.startsWith("__reactFiber$")||n.startsWith("__reactInternalInstance$")||n.startsWith("__reactProps$"))}function us(){if(Ye!==null)return Ye;if(typeof document>"u")return!1;if(document.body&&Gn(document.body))return Ye=!0,!0;let e=["#root","#app","#__next","[data-reactroot]"];for(let n of e){let t=document.querySelector(n);if(t&&Gn(t))return Ye=!0,!0}if(document.body){for(let n of document.body.children)if(Gn(n))return Ye=!0,!0}return Ye=!1,!1}var un={map:cs};function _s(e){return Object.keys(e).find(t=>t.startsWith("__reactFiber$")||t.startsWith("__reactInternalInstance$"))||null}function ms(e){let n=_s(e);return n?e[n]:null}function Ve(e){return e?e.displayName?e.displayName:e.name?e.name:null:null}function ps(e){let{tag:n,type:t,elementType:o}=e;if(n===z.HostComponent||n===z.HostText||n===z.HostHoistable||n===z.HostSingleton||n===z.Fragment||n===z.Mode||n===z.Profiler||n===z.DehydratedFragment||n===z.HostRoot||n===z.HostPortal||n===z.ScopeComponent||n===z.OffscreenComponent||n===z.LegacyHiddenComponent||n===z.CacheComponent||n===z.TracingMarkerComponent||n===z.Throw||n===z.ViewTransitionComponent||n===z.ActivityComponent)return null;if(n===z.ForwardRef){let s=o;if(s?.render){let r=Ve(s.render);if(r)return r}return s?.displayName?s.displayName:Ve(t)}if(n===z.MemoComponent||n===z.SimpleMemoComponent){let s=o;if(s?.type){let r=Ve(s.type);if(r)return r}return s?.displayName?s.displayName:Ve(t)}if(n===z.ContextProvider){let s=t;return s?._context?.displayName?`${s._context.displayName}.Provider`:null}if(n===z.ContextConsumer){let s=t;return s?.displayName?`${s.displayName}.Consumer`:null}if(n===z.LazyComponent){let s=o;return s?._status===1&&s._result?Ve(s._result):null}return n===z.SuspenseComponent||n===z.SuspenseListComponent?null:n===z.IncompleteClassComponent||n===z.IncompleteFunctionComponent||n===z.FunctionComponent||n===z.ClassComponent||n===z.IndeterminateComponent?Ve(t):null}function fs(e){return e.length<=2||e.length<=3&&e===e.toLowerCase()}function jt(e,n){let t=rs(n),o=t.mode==="all";if(o){let _=un.map.get(e);if(_!==void 0)return _}if(!us()){let _={path:null,components:[]};return o&&un.map.set(e,_),_}let s=t.mode==="smart"?as(e):void 0,r=[];try{let _=ms(e),k=0;for(;_&&k<t.maxDepth&&r.length<t.maxComponents;){let b=ps(_);b&&!fs(b)&&ds(b,k,t,s)&&r.push(b),_=_.return,k++}}catch{let _={path:null,components:[]};return o&&un.map.set(e,_),_}if(r.length===0){let _={path:null,components:[]};return o&&un.map.set(e,_),_}let i={path:r.slice().reverse().map(_=>`<${_}>`).join(" "),components:r};return o&&un.map.set(e,i),i}var Wt=Un(require("react")),_n={FunctionComponent:0,ClassComponent:1,IndeterminateComponent:2,HostRoot:3,HostPortal:4,HostComponent:5,HostText:6,Fragment:7,Mode:8,ContextConsumer:9,ContextProvider:10,ForwardRef:11,Profiler:12,SuspenseComponent:13,MemoComponent:14,SimpleMemoComponent:15,LazyComponent:16};function gs(e){if(!e||typeof e!="object")return null;let n=Object.keys(e),t=n.find(r=>r.startsWith("__reactFiber$"));if(t)return e[t]||null;let o=n.find(r=>r.startsWith("__reactInternalInstance$"));if(o)return e[o]||null;let s=n.find(r=>{if(!r.startsWith("__react"))return!1;let a=e[r];return a&&typeof a=="object"&&"_debugSource"in a});return s&&e[s]||null}function mn(e){if(!e.type||typeof e.type=="string")return null;if(typeof e.type=="object"||typeof e.type=="function"){let n=e.type;if(n.displayName)return n.displayName;if(n.name)return n.name}return null}function hs(e,n=50){let t=e,o=0;for(;t&&o<n;){if(t._debugSource)return{source:t._debugSource,componentName:mn(t)};if(t._debugOwner?._debugSource)return{source:t._debugOwner._debugSource,componentName:mn(t._debugOwner)};t=t.return,o++}return null}function ys(e){let n=e,t=0,o=50;for(;n&&t<o;){let s=n,r=["_debugSource","__source","_source","debugSource"];for(let a of r){let i=s[a];if(i&&typeof i=="object"&&"fileName"in i)return{source:i,componentName:mn(n)}}if(n.memoizedProps){let a=n.memoizedProps;if(a.__source&&typeof a.__source=="object"){let i=a.__source;if(i.fileName&&i.lineNumber)return{source:{fileName:i.fileName,lineNumber:i.lineNumber,columnNumber:i.columnNumber},componentName:mn(n)}}}n=n.return,t++}return null}var An=new Map;function bs(e){let n=e.tag,t=e.type,o=e.elementType;if(typeof t=="string"||t==null||typeof t=="function"&&t.prototype?.isReactComponent)return null;if((n===_n.FunctionComponent||n===_n.IndeterminateComponent)&&typeof t=="function")return t;if(n===_n.ForwardRef&&o){let s=o.render;if(typeof s=="function")return s}if((n===_n.MemoComponent||n===_n.SimpleMemoComponent)&&o){let s=o.type;if(typeof s=="function")return s}return typeof t=="function"?t:null}function xs(){let e=Wt.default,n=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;if(n&&"H"in n)return{get:()=>n.H,set:o=>{n.H=o}};let t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;if(t){let o=t.ReactCurrentDispatcher;if(o&&"current"in o)return{get:()=>o.current,set:s=>{o.current=s}}}return null}function ks(e){let n=e.split(`
333
- `),t=[/source-location/,/\/dist\/index\./,/\/dist\/react\./,/node_modules\//,/react-dom/,/react\.development/,/react\.production/,/chunk-[A-Z0-9]+/i,/react-stack-bottom-frame/,/react-reconciler/,/scheduler/,/at <anonymous>:/],o=/^\s*at\s+(?:.*?\s+\()?(.+?):(\d+):(\d+)\)?$/,s=/^[^@]*@(.+?):(\d+):(\d+)$/,r=0;for(let a of n){let i=a.trim();if(!i||t.some(k=>k.test(i)))continue;let _=o.exec(i)||s.exec(i);if(_&&(r++,r>=3))return{fileName:_[1],line:parseInt(_[2],10),column:parseInt(_[3],10)}}return null}function vs(e){let n=e;return n=n.replace(/[?#].*$/,""),n=n.replace(/^turbopack:\/\/\/\[project\]\//,""),n=n.replace(/^webpack-internal:\/\/\/\.\//,""),n=n.replace(/^webpack-internal:\/\/\//,""),n=n.replace(/^webpack:\/\/\/\.\//,""),n=n.replace(/^webpack:\/\/\//,""),n=n.replace(/^turbopack:\/\/\//,""),n=n.replace(/^https?:\/\/[^/]+\//,""),n=n.replace(/^file:\/\/\//,"/"),n=n.replace(/^\([^)]+\)\/\.\//,""),n=n.replace(/^\.\//,""),n}function Cs(e){let n=bs(e);if(!n)return null;if(An.has(n))return An.get(n);let t=xs();if(!t)return An.set(n,null),null;let o=t.get(),s=null;try{let r=new Proxy({},{get(){throw new Error("probe")}});t.set(r);try{n({})}catch(a){if(a instanceof Error&&a.stack){let i=ks(a.stack);i&&(s={fileName:vs(i.fileName),lineNumber:i.line,columnNumber:i.column,componentName:mn(e)||void 0})}}}finally{t.set(o)}return An.set(n,s),s}function ws(e,n=15){let t=[],o=new Set,s=e,r=0;for(;s&&r<n;){let a=Cs(s);a&&!o.has(a.fileName)&&(o.add(a.fileName),t.push(a)),s=s.return,r++}return t}function pn(e){let n=gs(e);if(!n)return{found:!1,reason:"no-fiber",isReactApp:!1,isProduction:!1};let t=hs(n);if(t||(t=ys(n)),t?.source)return{found:!0,source:{fileName:t.source.fileName,lineNumber:t.source.lineNumber,columnNumber:t.source.columnNumber,componentName:t.componentName||void 0},isReactApp:!0,isProduction:!1};let o=ws(n);return o.length>0?{found:!0,source:o[0],sourceCandidates:o,isReactApp:!0,isProduction:!1}:{found:!1,reason:"no-debug-source",isReactApp:!0,isProduction:!1}}function Fn(e,n="path"){let{fileName:t,lineNumber:o,columnNumber:s}=e,r=`${t}:${o}`;return s!==void 0&&(r+=`:${s}`),n==="vscode"?`vscode://file${t.startsWith("/")?"":"/"}${r}`:r}function Jn(e,n=10){let t=e,o=0;for(;t&&o<n;){let s=pn(t);if(s.found)return s;t=t.parentElement,o++}return pn(e)}async function Pn(e,n={}){let{quality:t=.7,maxScale:o=2}=n,s=(await import("html2canvas-pro")).default;return(await s(e,{useCORS:!0,allowTaint:!0,scale:Math.min(window.devicePixelRatio,o),logging:!1})).toDataURL("image/jpeg",t)}async function Ot(e={}){let{quality:n=.5,hideSelectors:t=[]}=e,s=[...["[data-impakers-debug]","[data-annotation-popup]","[data-annotation-marker]"],...t],r=document.querySelectorAll(s.join(", "));try{r.forEach(_=>_.style.visibility="hidden");let a=(await import("html2canvas-pro")).default;return(await a(document.body,{useCORS:!0,allowTaint:!0,scale:1,logging:!1,width:window.innerWidth,height:window.innerHeight})).toDataURL("image/jpeg",n)}catch{return}finally{r.forEach(a=>a.style.visibility="")}}var we=[],gn=[],Vt=!1;function et(e){return e.map(n=>{if(n instanceof Error)return`${n.message}
332
+ }`,qo={popup:"styles-module__popup___IhzrD",enter:"styles-module__enter___L7U7N",popupEnter:"styles-module__popupEnter___AuQDN",entered:"styles-module__entered___COX-w",exit:"styles-module__exit___5eGjE",popupExit:"styles-module__popupExit___JJKQX",shake:"styles-module__shake___jdbWe",header:"styles-module__header___wWsSi",element:"styles-module__element___fTV2z",headerToggle:"styles-module__headerToggle___WpW0b",chevron:"styles-module__chevron___ZZJlR",expanded:"styles-module__expanded___2Hxgv",stylesWrapper:"styles-module__stylesWrapper___pnHgy",stylesInner:"styles-module__stylesInner___YYZe2",stylesBlock:"styles-module__stylesBlock___VfQKn",styleLine:"styles-module__styleLine___1YQiD",styleProperty:"styles-module__styleProperty___84L1i",styleValue:"styles-module__styleValue___q51-h",timestamp:"styles-module__timestamp___Dtpsv",quote:"styles-module__quote___mcMmQ",textarea:"styles-module__textarea___jrSae",green:"styles-module__green___99l3h",actions:"styles-module__actions___D6x3f",cancel:"styles-module__cancel___hRjnL",submit:"styles-module__submit___K-mIR",shortcutHint:"styles-module__shortcutHint___ihsrd",deleteWrapper:"styles-module__deleteWrapper___oSjdo",deleteButton:"styles-module__deleteButton___4VuAE",light:"styles-module__light___6AaSQ"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-annotation-popup-css-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-annotation-popup-css-styles",document.head.appendChild(e)),e.textContent=Qo}var V=qo;var jn=require("react/jsx-runtime");var Mt=({size:e=24})=>(0,jn.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,jn.jsx)("path",{d:"M13.5 4C14.7426 4 15.75 5.00736 15.75 6.25V7H18.5C18.9142 7 19.25 7.33579 19.25 7.75C19.25 8.16421 18.9142 8.5 18.5 8.5H17.9678L17.6328 16.2217C17.61 16.7475 17.5912 17.1861 17.5469 17.543C17.5015 17.9087 17.4225 18.2506 17.2461 18.5723C16.9747 19.0671 16.5579 19.4671 16.0518 19.7168C15.7227 19.8791 15.3772 19.9422 15.0098 19.9717C14.6514 20.0004 14.2126 20 13.6865 20H10.3135C9.78735 20 9.34856 20.0004 8.99023 19.9717C8.62278 19.9422 8.27729 19.8791 7.94824 19.7168C7.44205 19.4671 7.02532 19.0671 6.75391 18.5723C6.57751 18.2506 6.49853 17.9087 6.45312 17.543C6.40883 17.1861 6.39005 16.7475 6.36719 16.2217L6.03223 8.5H5.5C5.08579 8.5 4.75 8.16421 4.75 7.75C4.75 7.33579 5.08579 7 5.5 7H8.25V6.25C8.25 5.00736 9.25736 4 10.5 4H13.5ZM7.86621 16.1562C7.89013 16.7063 7.90624 17.0751 7.94141 17.3584C7.97545 17.6326 8.02151 17.7644 8.06934 17.8516C8.19271 18.0763 8.38239 18.2577 8.6123 18.3711C8.70153 18.4151 8.83504 18.4545 9.11035 18.4766C9.39482 18.4994 9.76335 18.5 10.3135 18.5H13.6865C14.2367 18.5 14.6052 18.4994 14.8896 18.4766C15.165 18.4545 15.2985 18.4151 15.3877 18.3711C15.6176 18.2577 15.8073 18.0763 15.9307 17.8516C15.9785 17.7644 16.0245 17.6326 16.0586 17.3584C16.0938 17.0751 16.1099 16.7063 16.1338 16.1562L16.4668 8.5H7.5332L7.86621 16.1562ZM9.97656 10.75C10.3906 10.7371 10.7371 11.0626 10.75 11.4766L10.875 15.4766C10.8879 15.8906 10.5624 16.2371 10.1484 16.25C9.73443 16.2629 9.38794 15.9374 9.375 15.5234L9.25 11.5234C9.23706 11.1094 9.56255 10.7629 9.97656 10.75ZM14.0244 10.75C14.4383 10.7635 14.7635 11.1105 14.75 11.5244L14.6201 15.5244C14.6066 15.9384 14.2596 16.2634 13.8457 16.25C13.4317 16.2365 13.1067 15.8896 13.1201 15.4756L13.251 11.4756C13.2645 11.0617 13.6105 10.7366 14.0244 10.75ZM10.5 5.5C10.0858 5.5 9.75 5.83579 9.75 6.25V7H14.25V6.25C14.25 5.83579 13.9142 5.5 13.5 5.5H10.5Z",fill:"currentColor"})});var Go=["data-feedback-toolbar","data-annotation-popup","data-annotation-marker"],Ur=Go.flatMap(e=>[`:not([${e}])`,`:not([${e}] *)`]).join("");var st="__agentation_freeze";function Jo(){if(typeof window>"u")return{frozen:!1,installed:!0,origSetTimeout:setTimeout,origSetInterval:setInterval,origRAF:n=>0,pausedAnimations:[],frozenTimeoutQueue:[],frozenRAFQueue:[]};let e=window;return e[st]||(e[st]={frozen:!1,installed:!1,origSetTimeout:null,origSetInterval:null,origRAF:null,pausedAnimations:[],frozenTimeoutQueue:[],frozenRAFQueue:[]}),e[st]}var ve=Jo();typeof window<"u"&&!ve.installed&&(ve.origSetTimeout=window.setTimeout.bind(window),ve.origSetInterval=window.setInterval.bind(window),ve.origRAF=window.requestAnimationFrame.bind(window),window.setTimeout=(e,n,...o)=>typeof e=="string"?ve.origSetTimeout(e,n):ve.origSetTimeout((...t)=>{ve.frozen?ve.frozenTimeoutQueue.push(()=>e(...t)):e(...t)},n,...o),window.setInterval=(e,n,...o)=>typeof e=="string"?ve.origSetInterval(e,n):ve.origSetInterval((...t)=>{ve.frozen||e(...t)},n,...o),window.requestAnimationFrame=e=>ve.origRAF(n=>{ve.frozen?ve.frozenRAFQueue.push(e):e(n)}),ve.installed=!0);var Ee=ve.origSetTimeout,Kr=ve.origSetInterval,Zr=ve.origRAF;var ne=require("react/jsx-runtime");function rt(e){if(!e)return;let n=o=>o.stopImmediatePropagation();document.addEventListener("focusin",n,!0),document.addEventListener("focusout",n,!0);try{e.focus()}finally{document.removeEventListener("focusin",n,!0),document.removeEventListener("focusout",n,!0)}}var At=(0,oe.forwardRef)(function({element:n,timestamp:o,selectedText:t,placeholder:s="What should change?",initialValue:r="",submitLabel:i="Add",onSubmit:a,onCancel:p,onDelete:C,style:w,accentColor:S="#3c82f7",isExiting:N=!1,lightMode:B=!1,computedStyles:A},j){let[U,fe]=(0,oe.useState)(r),[ge,de]=(0,oe.useState)(!1),[$,P]=(0,oe.useState)("initial"),[Y,b]=(0,oe.useState)(!1),[z,R]=(0,oe.useState)(!1),he=(0,oe.useRef)(null),M=(0,oe.useRef)(null),ee=(0,oe.useRef)(null),re=(0,oe.useRef)(null);(0,oe.useEffect)(()=>{N&&$!=="exit"&&P("exit")},[N,$]),(0,oe.useEffect)(()=>{Ee(()=>{P("enter")},0);let v=Ee(()=>{P("entered")},200),f=Ee(()=>{let L=he.current;L&&(rt(L),L.selectionStart=L.selectionEnd=L.value.length,L.scrollTop=L.scrollHeight)},50);return()=>{clearTimeout(v),clearTimeout(f),ee.current&&clearTimeout(ee.current),re.current&&clearTimeout(re.current)}},[]);let Te=(0,oe.useCallback)(()=>{re.current&&clearTimeout(re.current),de(!0),re.current=Ee(()=>{de(!1),rt(he.current)},250)},[]);(0,oe.useImperativeHandle)(j,()=>({shake:Te}),[Te]);let Fe=(0,oe.useCallback)(()=>{P("exit"),ee.current=Ee(()=>{p()},150)},[p]),Ie=(0,oe.useCallback)(()=>{U.trim()&&a(U.trim())},[U,a]),ie=(0,oe.useCallback)(v=>{v.stopPropagation(),!v.nativeEvent.isComposing&&(v.key==="Enter"&&(v.metaKey||v.ctrlKey)&&(v.preventDefault(),Ie()),v.key==="Escape"&&Fe())},[Ie,Fe]),k=[V.popup,B?V.light:"",$==="enter"?V.enter:"",$==="entered"?V.entered:"",$==="exit"?V.exit:"",ge?V.shake:""].filter(Boolean).join(" ");return(0,ne.jsxs)("div",{ref:M,className:k,"data-annotation-popup":!0,style:w,onClick:v=>v.stopPropagation(),children:[(0,ne.jsxs)("div",{className:V.header,children:[A&&Object.keys(A).length>0?(0,ne.jsxs)("button",{className:V.headerToggle,onClick:()=>{let v=z;R(!z),v&&Ee(()=>rt(he.current),0)},type:"button",children:[(0,ne.jsx)("svg",{className:`${V.chevron} ${z?V.expanded:""}`,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,ne.jsx)("path",{d:"M5.5 10.25L9 7.25L5.75 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,ne.jsx)("span",{className:V.element,children:n})]}):(0,ne.jsx)("span",{className:V.element,children:n}),o&&(0,ne.jsx)("span",{className:V.timestamp,children:o})]}),A&&Object.keys(A).length>0&&(0,ne.jsx)("div",{className:`${V.stylesWrapper} ${z?V.expanded:""}`,children:(0,ne.jsx)("div",{className:V.stylesInner,children:(0,ne.jsx)("div",{className:V.stylesBlock,children:Object.entries(A).map(([v,f])=>(0,ne.jsxs)("div",{className:V.styleLine,children:[(0,ne.jsx)("span",{className:V.styleProperty,children:v.replace(/([A-Z])/g,"-$1").toLowerCase()}),": ",(0,ne.jsx)("span",{className:V.styleValue,children:f}),";"]},v))})})}),t&&(0,ne.jsxs)("div",{className:V.quote,children:["\u201C",t.slice(0,80),t.length>80?"...":"","\u201D"]}),(0,ne.jsx)("textarea",{ref:he,className:V.textarea,style:{borderColor:Y?S:void 0},placeholder:s,value:U,onChange:v=>{fe(v.target.value);let f=v.target;f.style.height="auto",f.style.height=`${Math.min(f.scrollHeight,200)}px`},onFocus:()=>b(!0),onBlur:()=>b(!1),rows:4,onKeyDown:ie}),(0,ne.jsxs)("div",{className:V.actions,children:[C&&(0,ne.jsx)("div",{className:V.deleteWrapper,children:(0,ne.jsx)("button",{className:V.deleteButton,onClick:C,type:"button",children:(0,ne.jsx)(Mt,{size:22})})}),(0,ne.jsx)("button",{className:V.cancel,onClick:Fe,children:"Cancel"}),(0,ne.jsx)("button",{className:V.submit,style:{backgroundColor:S,opacity:U.trim()?1:.4},onClick:Ie,disabled:!U.trim(),children:i})]}),(0,ne.jsxs)("div",{className:V.shortcutHint,children:[navigator?.platform?.includes("Mac")?"\u2318":"Ctrl","+Enter to submit"]})]})});function kn(e){if(e.parentElement)return e.parentElement;let n=e.getRootNode();return n instanceof ShadowRoot?n.host:null}function Je(e,n){let o=e;for(;o;){if(o.matches(n))return o;o=kn(o)}return null}function es(e,n=4){let o=[],t=e,s=0;for(;t&&s<n;){let r=t.tagName.toLowerCase();if(r==="html"||r==="body")break;let i=r;if(t.id)i=`#${t.id}`;else if(t.className&&typeof t.className=="string"){let p=t.className.split(/\s+/).find(C=>C.length>2&&!C.match(/^[a-z]{1,2}$/)&&!C.match(/[A-Z0-9]{5,}/));p&&(i=`.${p.split("_")[0]}`)}let a=kn(t);!t.parentElement&&a&&(i=`\u27E8shadow\u27E9 ${i}`),o.unshift(i),t=a,s++}return o.join(" > ")}function it(e){let n=es(e);if(e.dataset.element)return{name:e.dataset.element,path:n};let o=e.tagName.toLowerCase();if(["path","circle","rect","line","g"].includes(o)){let t=Je(e,"svg");if(t){let s=kn(t);if(s instanceof HTMLElement)return{name:`graphic in ${it(s).name}`,path:n}}return{name:"graphic element",path:n}}if(o==="svg"){let t=kn(e);if(t?.tagName.toLowerCase()==="button"){let s=t.textContent?.trim();return{name:s?`icon in "${s}" button`:"button icon",path:n}}return{name:"icon",path:n}}if(o==="button"){let t=e.textContent?.trim(),s=e.getAttribute("aria-label");return s?{name:`button [${s}]`,path:n}:{name:t?`button "${t.slice(0,25)}"`:"button",path:n}}if(o==="a"){let t=e.textContent?.trim(),s=e.getAttribute("href");return t?{name:`link "${t.slice(0,25)}"`,path:n}:s?{name:`link to ${s.slice(0,30)}`,path:n}:{name:"link",path:n}}if(o==="input"){let t=e.getAttribute("type")||"text",s=e.getAttribute("placeholder"),r=e.getAttribute("name");return s?{name:`input "${s}"`,path:n}:r?{name:`input [${r}]`,path:n}:{name:`${t} input`,path:n}}if(["h1","h2","h3","h4","h5","h6"].includes(o)){let t=e.textContent?.trim();return{name:t?`${o} "${t.slice(0,35)}"`:o,path:n}}if(o==="p"){let t=e.textContent?.trim();return t?{name:`paragraph: "${t.slice(0,40)}${t.length>40?"...":""}"`,path:n}:{name:"paragraph",path:n}}if(o==="span"||o==="label"){let t=e.textContent?.trim();return t&&t.length<40?{name:`"${t}"`,path:n}:{name:o,path:n}}if(o==="li"){let t=e.textContent?.trim();return t&&t.length<40?{name:`list item: "${t.slice(0,35)}"`,path:n}:{name:"list item",path:n}}if(o==="blockquote")return{name:"blockquote",path:n};if(o==="code"){let t=e.textContent?.trim();return t&&t.length<30?{name:`code: \`${t}\``,path:n}:{name:"code",path:n}}if(o==="pre")return{name:"code block",path:n};if(o==="img"){let t=e.getAttribute("alt");return{name:t?`image "${t.slice(0,30)}"`:"image",path:n}}if(o==="video")return{name:"video",path:n};if(["div","section","article","nav","header","footer","aside","main"].includes(o)){let t=e.className,s=e.getAttribute("role"),r=e.getAttribute("aria-label");if(r)return{name:`${o} [${r}]`,path:n};if(s)return{name:`${s}`,path:n};if(typeof t=="string"&&t){let i=t.split(/[\s_-]+/).map(a=>a.replace(/[A-Z0-9]{5,}.*$/,"")).filter(a=>a.length>2&&!/^[a-z]{1,2}$/.test(a)).slice(0,2);if(i.length>0)return{name:i.join(" "),path:n}}return{name:o==="div"?"container":o,path:n}}return{name:o,path:n}}function Pt(e){let n=[],o=e.textContent?.trim();o&&o.length<100&&n.push(o);let t=e.previousElementSibling;if(t){let r=t.textContent?.trim();r&&r.length<50&&n.unshift(`[before: "${r.slice(0,40)}"]`)}let s=e.nextElementSibling;if(s){let r=s.textContent?.trim();r&&r.length<50&&n.push(`[after: "${r.slice(0,40)}"]`)}return n.join(" ")}function Ft(e){let n=e.className;return typeof n!="string"||!n?"":n.split(/\s+/).filter(t=>t.length>0).map(t=>{let s=t.match(/^([a-zA-Z][a-zA-Z0-9_-]*?)(?:_[a-zA-Z0-9]{5,})?$/);return s?s[1]:t}).filter((t,s,r)=>r.indexOf(t)===s).join(", ")}var $t=new Set(["none","normal","auto","0px","rgba(0, 0, 0, 0)","transparent","static","visible"]),ns=new Set(["p","span","h1","h2","h3","h4","h5","h6","label","li","td","th","blockquote","figcaption","caption","legend","dt","dd","pre","code","em","strong","b","i","a","time","cite","q"]),ts=new Set(["input","textarea","select"]),os=new Set(["img","video","canvas","svg"]),ss=new Set(["div","section","article","nav","header","footer","aside","main","ul","ol","form","fieldset"]);function Bt(e){if(typeof window>"u")return{};let n=window.getComputedStyle(e),o={},t=e.tagName.toLowerCase(),s;ns.has(t)?s=["color","fontSize","fontWeight","fontFamily","lineHeight"]:t==="button"||t==="a"&&e.getAttribute("role")==="button"?s=["backgroundColor","color","padding","borderRadius","fontSize"]:ts.has(t)?s=["backgroundColor","color","padding","borderRadius","fontSize"]:os.has(t)?s=["width","height","objectFit","borderRadius"]:ss.has(t)?s=["display","padding","margin","gap","backgroundColor"]:s=["color","fontSize","margin","padding","backgroundColor"];for(let r of s){let i=r.replace(/([A-Z])/g,"-$1").toLowerCase(),a=n.getPropertyValue(i);a&&!$t.has(a)&&(o[r]=a)}return o}var rs=["color","backgroundColor","borderColor","fontSize","fontWeight","fontFamily","lineHeight","letterSpacing","textAlign","width","height","padding","margin","border","borderRadius","display","position","top","right","bottom","left","zIndex","flexDirection","justifyContent","alignItems","gap","opacity","visibility","overflow","boxShadow","transform"];function Ht(e){if(typeof window>"u")return"";let n=window.getComputedStyle(e),o=[];for(let t of rs){let s=t.replace(/([A-Z])/g,"-$1").toLowerCase(),r=n.getPropertyValue(s);r&&!$t.has(r)&&o.push(`${s}: ${r}`)}return o.join("; ")}function zt(e){let n=[],o=e.getAttribute("role"),t=e.getAttribute("aria-label"),s=e.getAttribute("aria-describedby"),r=e.getAttribute("tabindex"),i=e.getAttribute("aria-hidden");return o&&n.push(`role="${o}"`),t&&n.push(`aria-label="${t}"`),s&&n.push(`aria-describedby="${s}"`),r&&n.push(`tabindex=${r}`),i==="true"&&n.push("aria-hidden"),e.matches("a, button, input, select, textarea, [tabindex]")&&n.push("focusable"),n.join(", ")}function Dt(e){let n=[],o=e;for(;o&&o.tagName.toLowerCase()!=="html";){let t=o.tagName.toLowerCase(),s=t;if(o.id)s=`${t}#${o.id}`;else if(o.className&&typeof o.className=="string"){let i=o.className.split(/\s+/).map(a=>a.replace(/[_][a-zA-Z0-9]{5,}.*$/,"")).find(a=>a.length>2);i&&(s=`${t}.${i}`)}let r=kn(o);!o.parentElement&&r&&(s=`\u27E8shadow\u27E9 ${s}`),n.unshift(s),o=r}return n.join(" > ")}var W={FunctionComponent:0,ClassComponent:1,IndeterminateComponent:2,HostRoot:3,HostPortal:4,HostComponent:5,HostText:6,Fragment:7,Mode:8,ContextConsumer:9,ContextProvider:10,ForwardRef:11,Profiler:12,SuspenseComponent:13,MemoComponent:14,SimpleMemoComponent:15,LazyComponent:16,IncompleteClassComponent:17,DehydratedFragment:18,SuspenseListComponent:19,ScopeComponent:21,OffscreenComponent:22,LegacyHiddenComponent:23,CacheComponent:24,TracingMarkerComponent:25,HostHoistable:26,HostSingleton:27,IncompleteFunctionComponent:28,Throw:29,ViewTransitionComponent:30,ActivityComponent:31},jt=new Set(["Component","PureComponent","Fragment","Suspense","Profiler","StrictMode","Routes","Route","Outlet","Root","ErrorBoundaryHandler","HotReload","Hot"]),Wt=[/Boundary$/,/BoundaryHandler$/,/Provider$/,/Consumer$/,/^(Inner|Outer)/,/Router$/,/^Client(Page|Segment|Root)/,/^Segment(ViewNode|Node)$/,/^LayoutSegment/,/^Server(Root|Component|Render)/,/^RSC/,/Context$/,/^Hot(Reload)?$/,/^(Dev|React)(Overlay|Tools|Root)/,/Overlay$/,/Handler$/,/^With[A-Z]/,/Wrapper$/,/^Root$/],is=[/Page$/,/View$/,/Screen$/,/Section$/,/Card$/,/List$/,/Item$/,/Form$/,/Modal$/,/Dialog$/,/Button$/,/Nav$/,/Header$/,/Footer$/,/Layout$/,/Panel$/,/Tab$/,/Menu$/];function as(e){let n=e?.mode??"filtered",o=jt;if(e?.skipExact){let t=e.skipExact instanceof Set?e.skipExact:new Set(e.skipExact);o=new Set([...jt,...t])}return{maxComponents:e?.maxComponents??6,maxDepth:e?.maxDepth??30,mode:n,skipExact:o,skipPatterns:e?.skipPatterns?[...Wt,...e.skipPatterns]:Wt,userPatterns:e?.userPatterns??is,filter:e?.filter}}function ls(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/([A-Z])([A-Z][a-z])/g,"$1-$2").toLowerCase()}function ds(e,n=10){let o=new Set,t=e,s=0;for(;t&&s<n;)t.className&&typeof t.className=="string"&&t.className.split(/\s+/).forEach(r=>{if(r.length>1){let i=r.replace(/[_][a-zA-Z0-9]{5,}.*$/,"").toLowerCase();i.length>1&&o.add(i)}}),t=t.parentElement,s++;return o}function cs(e,n){let o=ls(e);for(let t of n){if(t===o)return!0;let s=o.split("-").filter(i=>i.length>2),r=t.split("-").filter(i=>i.length>2);for(let i of s)for(let a of r)if(i===a||i.includes(a)||a.includes(i))return!0}return!1}function us(e,n,o,t){if(o.filter)return o.filter(e,n);switch(o.mode){case"all":return!0;case"filtered":return!(o.skipExact.has(e)||o.skipPatterns.some(s=>s.test(e)));case"smart":return o.skipExact.has(e)||o.skipPatterns.some(s=>s.test(e))?!1:!!(t&&cs(e,t)||o.userPatterns.some(s=>s.test(e)));default:return!0}}var an=null,_s=new WeakMap;function at(e){return Object.keys(e).some(n=>n.startsWith("__reactFiber$")||n.startsWith("__reactInternalInstance$")||n.startsWith("__reactProps$"))}function ms(){if(an!==null)return an;if(typeof document>"u")return!1;if(document.body&&at(document.body))return an=!0,!0;let e=["#root","#app","#__next","[data-reactroot]"];for(let n of e){let o=document.querySelector(n);if(o&&at(o))return an=!0,!0}if(document.body){for(let n of document.body.children)if(at(n))return an=!0,!0}return an=!1,!1}var vn={map:_s};function ps(e){return Object.keys(e).find(o=>o.startsWith("__reactFiber$")||o.startsWith("__reactInternalInstance$"))||null}function fs(e){let n=ps(e);return n?e[n]:null}function en(e){return e?e.displayName?e.displayName:e.name?e.name:null:null}function gs(e){let{tag:n,type:o,elementType:t}=e;if(n===W.HostComponent||n===W.HostText||n===W.HostHoistable||n===W.HostSingleton||n===W.Fragment||n===W.Mode||n===W.Profiler||n===W.DehydratedFragment||n===W.HostRoot||n===W.HostPortal||n===W.ScopeComponent||n===W.OffscreenComponent||n===W.LegacyHiddenComponent||n===W.CacheComponent||n===W.TracingMarkerComponent||n===W.Throw||n===W.ViewTransitionComponent||n===W.ActivityComponent)return null;if(n===W.ForwardRef){let s=t;if(s?.render){let r=en(s.render);if(r)return r}return s?.displayName?s.displayName:en(o)}if(n===W.MemoComponent||n===W.SimpleMemoComponent){let s=t;if(s?.type){let r=en(s.type);if(r)return r}return s?.displayName?s.displayName:en(o)}if(n===W.ContextProvider){let s=o;return s?._context?.displayName?`${s._context.displayName}.Provider`:null}if(n===W.ContextConsumer){let s=o;return s?.displayName?`${s.displayName}.Consumer`:null}if(n===W.LazyComponent){let s=t;return s?._status===1&&s._result?en(s._result):null}return n===W.SuspenseComponent||n===W.SuspenseListComponent?null:n===W.IncompleteClassComponent||n===W.IncompleteFunctionComponent||n===W.FunctionComponent||n===W.ClassComponent||n===W.IndeterminateComponent?en(o):null}function hs(e){return e.length<=2||e.length<=3&&e===e.toLowerCase()}function Ot(e,n){let o=as(n),t=o.mode==="all";if(t){let p=vn.map.get(e);if(p!==void 0)return p}if(!ms()){let p={path:null,components:[]};return t&&vn.map.set(e,p),p}let s=o.mode==="smart"?ds(e):void 0,r=[];try{let p=fs(e),C=0;for(;p&&C<o.maxDepth&&r.length<o.maxComponents;){let w=gs(p);w&&!hs(w)&&us(w,C,o,s)&&r.push(w),p=p.return,C++}}catch{let p={path:null,components:[]};return t&&vn.map.set(e,p),p}if(r.length===0){let p={path:null,components:[]};return t&&vn.map.set(e,p),p}let a={path:r.slice().reverse().map(p=>`<${p}>`).join(" "),components:r};return t&&vn.map.set(e,a),a}var Vt=tt(require("react")),Cn={FunctionComponent:0,ClassComponent:1,IndeterminateComponent:2,HostRoot:3,HostPortal:4,HostComponent:5,HostText:6,Fragment:7,Mode:8,ContextConsumer:9,ContextProvider:10,ForwardRef:11,Profiler:12,SuspenseComponent:13,MemoComponent:14,SimpleMemoComponent:15,LazyComponent:16};function ys(e){if(!e||typeof e!="object")return null;let n=Object.keys(e),o=n.find(r=>r.startsWith("__reactFiber$"));if(o)return e[o]||null;let t=n.find(r=>r.startsWith("__reactInternalInstance$"));if(t)return e[t]||null;let s=n.find(r=>{if(!r.startsWith("__react"))return!1;let i=e[r];return i&&typeof i=="object"&&"_debugSource"in i});return s&&e[s]||null}function wn(e){if(!e.type||typeof e.type=="string")return null;if(typeof e.type=="object"||typeof e.type=="function"){let n=e.type;if(n.displayName)return n.displayName;if(n.name)return n.name}return null}function bs(e,n=50){let o=e,t=0;for(;o&&t<n;){if(o._debugSource)return{source:o._debugSource,componentName:wn(o)};if(o._debugOwner?._debugSource)return{source:o._debugOwner._debugSource,componentName:wn(o._debugOwner)};o=o.return,t++}return null}function xs(e){let n=e,o=0,t=50;for(;n&&o<t;){let s=n,r=["_debugSource","__source","_source","debugSource"];for(let i of r){let a=s[i];if(a&&typeof a=="object"&&"fileName"in a)return{source:a,componentName:wn(n)}}if(n.memoizedProps){let i=n.memoizedProps;if(i.__source&&typeof i.__source=="object"){let a=i.__source;if(a.fileName&&a.lineNumber)return{source:{fileName:a.fileName,lineNumber:a.lineNumber,columnNumber:a.columnNumber},componentName:wn(n)}}}n=n.return,o++}return null}var Wn=new Map;function ks(e){let n=e.tag,o=e.type,t=e.elementType;if(typeof o=="string"||o==null||typeof o=="function"&&o.prototype?.isReactComponent)return null;if((n===Cn.FunctionComponent||n===Cn.IndeterminateComponent)&&typeof o=="function")return o;if(n===Cn.ForwardRef&&t){let s=t.render;if(typeof s=="function")return s}if((n===Cn.MemoComponent||n===Cn.SimpleMemoComponent)&&t){let s=t.type;if(typeof s=="function")return s}return typeof o=="function"?o:null}function vs(){let e=Vt.default,n=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;if(n&&"H"in n)return{get:()=>n.H,set:t=>{n.H=t}};let o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;if(o){let t=o.ReactCurrentDispatcher;if(t&&"current"in t)return{get:()=>t.current,set:s=>{t.current=s}}}return null}function Cs(e){let n=e.split(`
333
+ `),o=[/source-location/,/\/dist\/index\./,/\/dist\/react\./,/node_modules\//,/react-dom/,/react\.development/,/react\.production/,/chunk-[A-Z0-9]+/i,/react-stack-bottom-frame/,/react-reconciler/,/scheduler/,/at <anonymous>:/],t=/^\s*at\s+(?:.*?\s+\()?(.+?):(\d+):(\d+)\)?$/,s=/^[^@]*@(.+?):(\d+):(\d+)$/,r=0;for(let i of n){let a=i.trim();if(!a||o.some(C=>C.test(a)))continue;let p=t.exec(a)||s.exec(a);if(p&&(r++,r>=3))return{fileName:p[1],line:parseInt(p[2],10),column:parseInt(p[3],10)}}return null}function ws(e){let n=e;return n=n.replace(/[?#].*$/,""),n=n.replace(/^turbopack:\/\/\/\[project\]\//,""),n=n.replace(/^webpack-internal:\/\/\/\.\//,""),n=n.replace(/^webpack-internal:\/\/\//,""),n=n.replace(/^webpack:\/\/\/\.\//,""),n=n.replace(/^webpack:\/\/\//,""),n=n.replace(/^turbopack:\/\/\//,""),n=n.replace(/^https?:\/\/[^/]+\//,""),n=n.replace(/^file:\/\/\//,"/"),n=n.replace(/^\([^)]+\)\/\.\//,""),n=n.replace(/^\.\//,""),n}function Ss(e){let n=ks(e);if(!n)return null;if(Wn.has(n))return Wn.get(n);let o=vs();if(!o)return Wn.set(n,null),null;let t=o.get(),s=null;try{let r=new Proxy({},{get(){throw new Error("probe")}});o.set(r);try{n({})}catch(i){if(i instanceof Error&&i.stack){let a=Cs(i.stack);a&&(s={fileName:ws(a.fileName),lineNumber:a.line,columnNumber:a.column,componentName:wn(e)||void 0})}}}finally{o.set(t)}return Wn.set(n,s),s}function Ns(e,n=15){let o=[],t=new Set,s=e,r=0;for(;s&&r<n;){let i=Ss(s);i&&!t.has(i.fileName)&&(t.add(i.fileName),o.push(i)),s=s.return,r++}return o}function Sn(e){let n=ys(e);if(!n)return{found:!1,reason:"no-fiber",isReactApp:!1,isProduction:!1};let o=bs(n);if(o||(o=xs(n)),o?.source)return{found:!0,source:{fileName:o.source.fileName,lineNumber:o.source.lineNumber,columnNumber:o.source.columnNumber,componentName:o.componentName||void 0},isReactApp:!0,isProduction:!1};let t=Ns(n);return t.length>0?{found:!0,source:t[0],sourceCandidates:t,isReactApp:!0,isProduction:!1}:{found:!1,reason:"no-debug-source",isReactApp:!0,isProduction:!1}}function On(e,n="path"){let{fileName:o,lineNumber:t,columnNumber:s}=e,r=`${o}:${t}`;return s!==void 0&&(r+=`:${s}`),n==="vscode"?`vscode://file${o.startsWith("/")?"":"/"}${r}`:r}function lt(e,n=10){let o=e,t=0;for(;o&&t<n;){let s=Sn(o);if(s.found)return s;o=o.parentElement,t++}return Sn(e)}async function Vn(e,n={}){let{quality:o=.7,maxScale:t=2}=n,s=(await import("html2canvas-pro")).default;return(await s(e,{useCORS:!0,allowTaint:!0,scale:Math.min(window.devicePixelRatio,t),logging:!1})).toDataURL("image/jpeg",o)}async function Ut(e={}){let{quality:n=.5,hideSelectors:o=[]}=e,s=[...["[data-impakers-debug]","[data-annotation-popup]","[data-annotation-marker]"],...o],r=document.querySelectorAll(s.join(", "));try{r.forEach(p=>p.style.visibility="hidden");let i=(await import("html2canvas-pro")).default;return(await i(document.body,{useCORS:!0,allowTaint:!0,scale:1,logging:!1,width:window.innerWidth,height:window.innerHeight})).toDataURL("image/jpeg",n)}catch{return}finally{r.forEach(i=>i.style.visibility="")}}var Me=[],Ln=[],Kt=!1;function dt(e){return e.map(n=>{if(n instanceof Error)return`${n.message}
334
334
  ${n.stack?.split(`
335
335
  `).slice(0,3).join(`
336
- `)}`;if(typeof n=="object"&&n!==null)try{return JSON.stringify(n).slice(0,300)}catch{return String(n)}return String(n)}).join(" ")}function fn(e,n){gn.push({level:e,message:n.slice(0,500),timestamp:Date.now()}),gn.length>50&&gn.shift()}function Ss(){if(Vt||typeof window>"u")return;Vt=!0;let e=console.error,n=console.warn,t=console.log;console.error=(...o)=>{let s=et(o);we.push(s.slice(0,500)),we.length>20&&we.shift(),fn("error",s),e.apply(console,o)},console.warn=(...o)=>{let s=et(o);we.push(`[warn] ${s}`.slice(0,500)),we.length>20&&we.shift(),fn("warn",s),n.apply(console,o)},console.log=(...o)=>{fn("log",et(o)),t.apply(console,o)},window.addEventListener("error",o=>{let s=`${o.message} (${o.filename}:${o.lineno})`;we.push(s.slice(0,500)),we.length>20&&we.shift(),fn("error",s)}),window.addEventListener("unhandledrejection",o=>{let s=`Unhandled Promise: ${o.reason}`;we.push(s.slice(0,500)),we.length>20&&we.shift(),fn("error",s)})}Ss();function Ls(e){let n=e.match(/Edg\/(\d+[\d.]*)/);if(n)return`Edge ${n[1]}`;let t=e.match(/Chrome\/(\d+[\d.]*)/);if(t&&!e.includes("Edg/")&&!e.includes("OPR/"))return`Chrome ${t[1]}`;let o=e.match(/Firefox\/(\d+[\d.]*)/);if(o)return`Firefox ${o[1]}`;let s=e.match(/Version\/(\d+[\d.]*).*Safari/);if(s)return`Safari ${s[1]}`;let r=e.match(/OPR\/(\d+[\d.]*)/);return r?`Opera ${r[1]}`:e}var Ns=[/session/i,/csrf/i,/xsrf/i,/secret/i,/password/i,/key/i];function Ts(){if(typeof document>"u")return{};let e={};try{document.cookie.split(";").forEach(n=>{let[t,...o]=n.trim().split("=");if(!t)return;let s=t.trim(),r=Ns.some(a=>a.test(s));e[s]=r?"[masked]":decodeURIComponent(o.join("=")).slice(0,200)})}catch{}return e}function Zt(e){try{let n=e.split(".");if(n.length!==3)return null;let t=n[1].replace(/-/g,"+").replace(/_/g,"/"),o=t+"==".slice(0,(4-t.length%4)%4);return JSON.parse(atob(o))}catch{return null}}function Is(){if(typeof window>"u")return null;let e=["token","access_token","accessToken","auth_token","authToken","jwt","id_token","idToken"];for(let n of e)try{let t=localStorage.getItem(n);if(t){let o=t.startsWith('"')?JSON.parse(t):t,s=Zt(o);if(s){let r={},a=["sub","email","name","role","roles","org","iat","exp","aud","iss","user_id","user_role"];for(let i of a)i in s&&(r[i]=s[i]);return Object.keys(r).length>0?r:null}}}catch{continue}try{let n=document.cookie.split(";");for(let t of n){let[,...o]=t.trim().split("="),s=o.join("="),r=Zt(s);if(r&&r.sub){let a={},i=["sub","email","name","role","roles","org","iat","exp"];for(let _ of i)_ in r&&(a[_]=r[_]);return Object.keys(a).length>0?a:null}}}catch{}return null}function Qe(e){let n=Math.round(e);return isNaN(n)||!isFinite(n)?void 0:n}function Es(){if(typeof performance>"u")return{};let e={};try{let n=performance.getEntriesByType("navigation")[0];if(n){let s=Qe(n.loadEventEnd-n.startTime),r=Qe(n.domContentLoadedEventEnd-n.startTime),a=Qe(n.responseStart-n.requestStart);s&&(e.pageLoadTime=s),r&&(e.domContentLoaded=r),a&&(e.ttfb=a)}let t=performance.getEntriesByName("first-contentful-paint")[0];if(t){let s=Qe(t.startTime);s&&(e.firstContentfulPaint=s)}let o=performance.memory;if(o){let s=Qe(o.usedJSHeapSize/1024/1024),r=Qe(o.totalJSHeapSize/1024/1024);s&&(e.usedJSHeapMB=s),r&&(e.totalJSHeapMB=r)}}catch{}return e}function Kt(e){let n={url:window.location.href,timestamp:new Date().toISOString(),browser:Ls(navigator.userAgent),userAgent:navigator.userAgent,viewport:`${window.innerWidth}x${window.innerHeight}`,pixelRatio:window.devicePixelRatio,language:navigator.language,referrer:document.referrer,cookies:Ts(),jwtClaims:Is()??void 0,consoleErrors:we.length>0?[...we]:void 0,consoleLogs:gn.length>0?[...gn]:void 0,performance:Es()};if(e)try{let t=e();t&&(n.user={...t,id:String(t.id),name:String(t.name||"")})}catch{}return n}var Rs="/_next/static/chunks/impakers-debug-route-manifest.json",$n=null,Hn=!1;function Ut(e){return!e||e==="/"?"/":e.endsWith("/")?e.slice(0,-1)||"/":e}function Ms(e){let n=Ut(e);return n==="/"?[]:n.slice(1).split("/").map(t=>decodeURIComponent(t)).filter(Boolean)}function As(e){return/^\[[^\]]+\]$/.test(e)}function Fs(e){return/^\[\.\.\.[^\]]+\]$/.test(e)}function Ps(e){return/^\[\[\.\.\.[^\]]+\]\]$/.test(e)}function $s(e,n){let t=0,o=0,s=0;for(;t<e.length;){let r=e[t];if(Ps(r)){s+=1,o=n.length,t+=1;break}if(Fs(r)){if(o>=n.length)return null;s+=2,o=n.length,t+=1;break}let a=n[o];if(a===void 0)return null;if(As(r)){s+=5,t+=1,o+=1;continue}if(r!==a)return null;s+=20,t+=1,o+=1}return t!==e.length||o!==n.length?null:s}async function Hs(){return Hn?null:$n||($n=(async()=>{try{let e=await fetch(Rs,{cache:"force-cache"});if(!e.ok)return Hn=!0,null;let n=await e.json();return!n||typeof n!="object"||!Array.isArray(n.entries)?(Hn=!0,null):n}catch{return Hn=!0,null}})(),$n)}function Bs(e){let n=e.files.find(s=>s.kind==="page"),t=e.files.filter(s=>s.kind==="layout"),o=[];return n&&o.push({kind:"route-page",file:n.file,label:"Current page route",confidence:1,reason:"matched-current-url"}),t.forEach((s,r)=>{o.push({kind:"route-layout",file:s.file,label:r===t.length-1?"Nearest layout":"Ancestor layout",confidence:Math.max(.7,.95-r*.08),reason:"matched-layout-chain"})}),o}async function Xt(e){if(typeof window>"u")return null;let n=e??window.location.pathname,t=await Hs();if(!t)return null;let o=Ms(n),s=null,r=-1;for(let a of t.entries){let i=$s(a.segments,o);i!==null&&i>r&&(r=i,s=a)}return s?{targets:Bs(s),context:{pathname:Ut(n),matchedRoute:s.route,source:"next-route-manifest"}}:null}function Yt(...e){let n=[],t=new Set;return e.forEach(o=>{o?.forEach(s=>{let r=`${s.kind}:${s.file}:${s.line??""}:${s.column??""}`;t.has(r)||(t.add(r),n.push(s))})}),n.sort((o,s)=>s.confidence-o.confidence)}function Qt(){let e=dn();if(!e)throw new Error("\uC778\uC99D\uC774 \uD544\uC694\uD569\uB2C8\uB2E4");return e}async function Be(e,n={}){let t=Qt(),o=await fetch(e,{...n,headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`,...n.headers}});if(!o.ok){if(o.status===401)throw new Error("\uC778\uC99D\uC774 \uB9CC\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.");let s=await o.json().catch(()=>({error:"\uC694\uCCAD \uC2E4\uD328"}));throw new Error(s.error||s.message||"\uC694\uCCAD \uC2E4\uD328")}return o}var Bn=new Map,nt=new Map,hn=new Map,zs=3e4;function De(e){return`feedbacks:${e}`}function qe(){return"feedbacks:__all__"}function We(e){return`comments:${e}`}function $e(e,n){Bn.set(e,{data:n,timestamp:Date.now()});let t=hn.get(e);t&&t.forEach(o=>o(n))}function je(e){return Bn.get(e)?.data??null}function Ds(e){let n=Bn.get(e);return n?Date.now()-n.timestamp<=zs:!1}function ot(e){return Array.from(Bn.keys()).filter(n=>n.includes(e))}function js(e){let n=new Map;for(let t of ot(e)){let o=je(t);o!==null&&n.set(t,o)}return n}function Ws(e){e.forEach((n,t)=>$e(t,n))}function tt(e,n){let t=n(je(e));return $e(e,t),t}function Os(e,n){for(let t of ot(e)){let o=je(t);o!==null&&$e(t,n(o))}}async function yn(e,n){let t=nt.get(e);if(t)return t;let o=(async()=>{try{let s=await n();return $e(e,s),s}finally{nt.delete(e)}})();return nt.set(e,o),o}async function st(e,n,t={}){let o=je(e);return o!==null&&!t.force?((t.staleWhileRevalidate||!Ds(e))&&yn(e,n),o):yn(e,n)}function bn(e,n){let t=hn.get(e)||new Set;return t.add(n),hn.set(e,t),()=>{let o=hn.get(e);o&&(o.delete(n),o.size===0&&hn.delete(e))}}function Ge(e){return je(e)}async function qt(e,n){let t=`temp-task-${Date.now()}`,o=n.feedbackUrl,s=n.feedbackMarker,r=o?je(De(o))||[]:null,a=je(qe()),i=o?{id:t,taskNumber:0,title:n.title,status:"todo",priority:n.priority,feedbackUrl:o,feedbackMarker:s||null,createdAt:new Date().toISOString(),commentCount:0,_optimistic:!0}:null;o&&i&&($e(De(o),[i,...r]),a&&$e(qe(),[i,...a]));try{let k=await(await Be(e,{method:"POST",body:JSON.stringify(n)})).json().catch(()=>({}));if(o&&i){let b={...i,id:k.taskId||t,taskNumber:k.taskNumber||0,_optimistic:!1};tt(De(o),C=>(C||[]).map(v=>v.id===t?b:v)),a&&tt(qe(),C=>(C||[]).map(v=>v.id===t?b:v)),eo(e,o).catch(()=>{}),a&&no(e).catch(()=>{})}return k}catch(_){throw o&&r&&$e(De(o),r),a&&$e(qe(),a),_}}async function Gt(e,n,t={}){let o=De(n);return st(o,async()=>(await(await Be(`${e}?url=${encodeURIComponent(n)}`)).json()).tasks||[],t)}async function Jt(e,n={}){let t=qe();return st(t,async()=>(await(await Be(`${e}?url=__all__`)).json()).tasks||[],n)}async function eo(e,n){let t=De(n);return yn(t,async()=>(await(await Be(`${e}?url=${encodeURIComponent(n)}`)).json()).tasks||[])}async function no(e){let n=qe();return yn(n,async()=>(await(await Be(`${e}?url=__all__`)).json()).tasks||[])}async function zn(e,n,t={}){let o=We(n);return st(o,async()=>(await(await Be(`${e}/${n}/comments`)).json()).comments||[],t)}async function Vs(e,n){let t=We(n);return yn(t,async()=>(await(await Be(`${e}/${n}/comments`)).json()).comments||[])}function Zs(e,n){Os("feedbacks:",t=>t.map(o=>o.id===e?{...o,commentCount:Math.max(0,(o.commentCount||0)+n)}:o))}function Ks(e){ot("feedbacks:").forEach(t=>{let o=t.replace("feedbacks:","");o==="__all__"?no(e).catch(()=>{}):eo(e,o).catch(()=>{})})}async function Dn(e,n,t,o,s,r,a){let i={id:`temp-${Date.now()}`,content:t,authorName:o,authorId:s,imageUrl:r||void 0,fileUrl:a?.url,fileName:a?.fileName,fileType:a?.fileType,fileSize:a?.fileSize,fileSource:a?.fileSource,createdAt:new Date().toISOString()},_=We(n),k=je(_)||[],b=js("feedbacks:");$e(_,[...k,i]),Zs(n,1);try{let $=(await(await Be(`${e}/${n}/comments`,{method:"POST",body:JSON.stringify({content:t,authorName:o,authorId:s,screenshot:r,...a&&{fileUrl:a.url,fileName:a.fileName,fileType:a.fileType,fileSize:a.fileSize,fileSource:a.fileSource}})})).json()).comment;return tt(_,F=>(F||[]).map(H=>H.id===i.id?$:H)),Vs(e,n),Ks(e),$}catch(C){throw $e(_,k),Ws(b),C}}var Us=4.5*1024*1024;async function jn(e,n,t,o){if(n.size>Us)throw new Error(`\uD30C\uC77C \uD06C\uAE30\uAC00 4.5MB\uB97C \uCD08\uACFC\uD569\uB2C8\uB2E4. (${(n.size/1024/1024).toFixed(1)}MB)`);let s=Qt(),r=new FormData;r.append("file",n),r.append("context",t),o&&r.append("taskId",o);let a=await fetch(`${e}/upload`,{method:"POST",headers:{Authorization:`Bearer ${s}`},body:r});if(!a.ok){if(a.status===401)throw new Error("\uC778\uC99D\uC774 \uB9CC\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.");if(a.status===413)throw new Error("\uD30C\uC77C \uD06C\uAE30\uAC00 4.5MB\uB97C \uCD08\uACFC\uD569\uB2C8\uB2E4.");let i=await a.json().catch(()=>({error:"\uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328"}));throw new Error(i.error||"\uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328")}return a.json()}async function Wn(e,n={}){let t=new URLSearchParams;n.since&&t.set("since",n.since),n.date&&t.set("date",n.date),n.limit&&t.set("limit",String(n.limit));let o=t.toString(),s=`${e}/history${o?`?${o}`:""}`;return(await(await Be(s)).json()).events||[]}var kn=require("@jridgewell/trace-mapping"),xn=new Map,to=new Set;async function Xs(e){try{let n=await fetch(e,{cache:"force-cache"});if(!n.ok)return null;let o=(await n.text()).match(/\/\/[#@]\s*sourceMappingURL\s*=\s*(\S+)\s*$/m);if(!o)return null;let s=o[1];return s.startsWith("http")?s:e.substring(0,e.lastIndexOf("/")+1)+s}catch{return null}}async function Ys(e){if(xn.has(e))return xn.get(e)??null;if(to.has(e))return null;let n=e.endsWith(".map")?e:`${e}.map`;try{let o=await fetch(n,{cache:"force-cache"});if(o.ok){let s=await o.json(),r=new kn.AnyMap(s);return xn.set(e,r),r}}catch{}let t=await Xs(e);if(t)try{let o=await fetch(t,{cache:"force-cache"});if(o.ok){let s=await o.json(),r=new kn.AnyMap(s);return xn.set(e,r),r}}catch{}return to.add(e),xn.set(e,null),null}async function Qs(e,n,t){let o;try{e.startsWith("http")?o=e:o=new URL(e,window.location.origin).href}catch{return null}let s=await Ys(o);if(!s)return null;try{let r=(0,kn.originalPositionFor)(s,{line:n,column:t});if(!r.source)return null;let a=r.source;return a=a.replace(/^webpack:\/\/\//,""),a=a.replace(/^turbopack:\/\/\//,""),a=a.replace(/^\[project\]\//,""),a=a.replace(/^\.\//,""),a.includes("node_modules/")?null:{source:a,line:r.line??0,column:r.column??0,name:r.name??null}}catch{return null}}async function rt(e){if(!e)return null;let n=e.match(/^(.+):(\d+):(\d+)$/);if(!n)return null;let[,t,o,s]=n,r=parseInt(o,10),a=parseInt(s,10);return isNaN(r)||isNaN(a)?null:Qs(t,r,a)}var qs=`@keyframes styles-module__markerIn___7B1j9 {
336
+ `)}`;if(typeof n=="object"&&n!==null)try{return JSON.stringify(n).slice(0,300)}catch{return String(n)}return String(n)}).join(" ")}function Nn(e,n){Ln.push({level:e,message:n.slice(0,500),timestamp:Date.now()}),Ln.length>50&&Ln.shift()}function Ls(){if(Kt||typeof window>"u")return;Kt=!0;let e=console.error,n=console.warn,o=console.log;console.error=(...t)=>{let s=dt(t);Me.push(s.slice(0,500)),Me.length>20&&Me.shift(),Nn("error",s),e.apply(console,t)},console.warn=(...t)=>{let s=dt(t);Me.push(`[warn] ${s}`.slice(0,500)),Me.length>20&&Me.shift(),Nn("warn",s),n.apply(console,t)},console.log=(...t)=>{Nn("log",dt(t)),o.apply(console,t)},window.addEventListener("error",t=>{let s=`${t.message} (${t.filename}:${t.lineno})`;Me.push(s.slice(0,500)),Me.length>20&&Me.shift(),Nn("error",s)}),window.addEventListener("unhandledrejection",t=>{let s=`Unhandled Promise: ${t.reason}`;Me.push(s.slice(0,500)),Me.length>20&&Me.shift(),Nn("error",s)})}Ls();function Ts(e){let n=e.match(/Edg\/(\d+[\d.]*)/);if(n)return`Edge ${n[1]}`;let o=e.match(/Chrome\/(\d+[\d.]*)/);if(o&&!e.includes("Edg/")&&!e.includes("OPR/"))return`Chrome ${o[1]}`;let t=e.match(/Firefox\/(\d+[\d.]*)/);if(t)return`Firefox ${t[1]}`;let s=e.match(/Version\/(\d+[\d.]*).*Safari/);if(s)return`Safari ${s[1]}`;let r=e.match(/OPR\/(\d+[\d.]*)/);return r?`Opera ${r[1]}`:e}var Is=[/session/i,/csrf/i,/xsrf/i,/secret/i,/password/i,/key/i];function Es(){if(typeof document>"u")return{};let e={};try{document.cookie.split(";").forEach(n=>{let[o,...t]=n.trim().split("=");if(!o)return;let s=o.trim(),r=Is.some(i=>i.test(s));e[s]=r?"[masked]":decodeURIComponent(t.join("=")).slice(0,200)})}catch{}return e}function Zt(e){try{let n=e.split(".");if(n.length!==3)return null;let o=n[1].replace(/-/g,"+").replace(/_/g,"/"),t=o+"==".slice(0,(4-o.length%4)%4);return JSON.parse(atob(t))}catch{return null}}function Rs(){if(typeof window>"u")return null;let e=["token","access_token","accessToken","auth_token","authToken","jwt","id_token","idToken"];for(let n of e)try{let o=localStorage.getItem(n);if(o){let t=o.startsWith('"')?JSON.parse(o):o,s=Zt(t);if(s){let r={},i=["sub","email","name","role","roles","org","iat","exp","aud","iss","user_id","user_role"];for(let a of i)a in s&&(r[a]=s[a]);return Object.keys(r).length>0?r:null}}}catch{continue}try{let n=document.cookie.split(";");for(let o of n){let[,...t]=o.trim().split("="),s=t.join("="),r=Zt(s);if(r&&r.sub){let i={},a=["sub","email","name","role","roles","org","iat","exp"];for(let p of a)p in r&&(i[p]=r[p]);return Object.keys(i).length>0?i:null}}}catch{}return null}function ln(e){let n=Math.round(e);return isNaN(n)||!isFinite(n)?void 0:n}function Ms(){if(typeof performance>"u")return{};let e={};try{let n=performance.getEntriesByType("navigation")[0];if(n){let s=ln(n.loadEventEnd-n.startTime),r=ln(n.domContentLoadedEventEnd-n.startTime),i=ln(n.responseStart-n.requestStart);s&&(e.pageLoadTime=s),r&&(e.domContentLoaded=r),i&&(e.ttfb=i)}let o=performance.getEntriesByName("first-contentful-paint")[0];if(o){let s=ln(o.startTime);s&&(e.firstContentfulPaint=s)}let t=performance.memory;if(t){let s=ln(t.usedJSHeapSize/1024/1024),r=ln(t.totalJSHeapSize/1024/1024);s&&(e.usedJSHeapMB=s),r&&(e.totalJSHeapMB=r)}}catch{}return e}function Xt(e){let n={url:window.location.href,timestamp:new Date().toISOString(),browser:Ts(navigator.userAgent),userAgent:navigator.userAgent,viewport:`${window.innerWidth}x${window.innerHeight}`,pixelRatio:window.devicePixelRatio,language:navigator.language,referrer:document.referrer,cookies:Es(),jwtClaims:Rs()??void 0,consoleErrors:Me.length>0?[...Me]:void 0,consoleLogs:Ln.length>0?[...Ln]:void 0,performance:Ms()};if(e)try{let o=e();o&&(n.user={...o,id:String(o.id),name:String(o.name||"")})}catch{}return n}var As="/_next/static/chunks/impakers-debug-route-manifest.json",Un=null,Kn=!1;function Yt(e){return!e||e==="/"?"/":e.endsWith("/")?e.slice(0,-1)||"/":e}function Ps(e){let n=Yt(e);return n==="/"?[]:n.slice(1).split("/").map(o=>decodeURIComponent(o)).filter(Boolean)}function Fs(e){return/^\[[^\]]+\]$/.test(e)}function $s(e){return/^\[\.\.\.[^\]]+\]$/.test(e)}function Bs(e){return/^\[\[\.\.\.[^\]]+\]\]$/.test(e)}function Hs(e,n){let o=0,t=0,s=0;for(;o<e.length;){let r=e[o];if(Bs(r)){s+=1,t=n.length,o+=1;break}if($s(r)){if(t>=n.length)return null;s+=2,t=n.length,o+=1;break}let i=n[t];if(i===void 0)return null;if(Fs(r)){s+=5,o+=1,t+=1;continue}if(r!==i)return null;s+=20,o+=1,t+=1}return o!==e.length||t!==n.length?null:s}async function zs(){return Kn?null:Un||(Un=(async()=>{try{let e=await fetch(As,{cache:"force-cache"});if(!e.ok)return Kn=!0,null;let n=await e.json();return!n||typeof n!="object"||!Array.isArray(n.entries)?(Kn=!0,null):n}catch{return Kn=!0,null}})(),Un)}function Ds(e){let n=e.files.find(s=>s.kind==="page"),o=e.files.filter(s=>s.kind==="layout"),t=[];return n&&t.push({kind:"route-page",file:n.file,label:"Current page route",confidence:1,reason:"matched-current-url"}),o.forEach((s,r)=>{t.push({kind:"route-layout",file:s.file,label:r===o.length-1?"Nearest layout":"Ancestor layout",confidence:Math.max(.7,.95-r*.08),reason:"matched-layout-chain"})}),t}async function Qt(e){if(typeof window>"u")return null;let n=e??window.location.pathname,o=await zs();if(!o)return null;let t=Ps(n),s=null,r=-1;for(let i of o.entries){let a=Hs(i.segments,t);a!==null&&a>r&&(r=a,s=i)}return s?{targets:Ds(s),context:{pathname:Yt(n),matchedRoute:s.route,source:"next-route-manifest"}}:null}function qt(...e){let n=[],o=new Set;return e.forEach(t=>{t?.forEach(s=>{let r=`${s.kind}:${s.file}:${s.line??""}:${s.column??""}`;o.has(r)||(o.add(r),n.push(s))})}),n.sort((t,s)=>s.confidence-t.confidence)}function Gt(){let e=Ge();if(!e)throw new Error("\uC778\uC99D\uC774 \uD544\uC694\uD569\uB2C8\uB2E4");return e}async function Ve(e,n={}){let o=Gt(),t=await fetch(e,{...n,headers:{"Content-Type":"application/json",Authorization:`Bearer ${o}`,...n.headers}});if(!t.ok){if(t.status===401)throw new Error("\uC778\uC99D\uC774 \uB9CC\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.");let s=await t.json().catch(()=>({error:"\uC694\uCCAD \uC2E4\uD328"}));throw new Error(s.error||s.message||"\uC694\uCCAD \uC2E4\uD328")}return t}var Zn=new Map,ct=new Map,Tn=new Map,js=3e4;function Ze(e){return`feedbacks:${e}`}function dn(){return"feedbacks:__all__"}function Ye(e){return`comments:${e}`}function We(e,n){Zn.set(e,{data:n,timestamp:Date.now()});let o=Tn.get(e);o&&o.forEach(t=>t(n))}function Xe(e){return Zn.get(e)?.data??null}function Ws(e){let n=Zn.get(e);return n?Date.now()-n.timestamp<=js:!1}function _t(e){return Array.from(Zn.keys()).filter(n=>n.includes(e))}function Os(e){let n=new Map;for(let o of _t(e)){let t=Xe(o);t!==null&&n.set(o,t)}return n}function Vs(e){e.forEach((n,o)=>We(o,n))}function ut(e,n){let o=n(Xe(e));return We(e,o),o}function Us(e,n){for(let o of _t(e)){let t=Xe(o);t!==null&&We(o,n(t))}}async function In(e,n){let o=ct.get(e);if(o)return o;let t=(async()=>{try{let s=await n();return We(e,s),s}finally{ct.delete(e)}})();return ct.set(e,t),t}async function mt(e,n,o={}){let t=Xe(e);return t!==null&&!o.force?((o.staleWhileRevalidate||!Ws(e))&&In(e,n),t):In(e,n)}function En(e,n){let o=Tn.get(e)||new Set;return o.add(n),Tn.set(e,o),()=>{let t=Tn.get(e);t&&(t.delete(n),t.size===0&&Tn.delete(e))}}function cn(e){return Xe(e)}async function Jt(e,n){let o=`temp-task-${Date.now()}`,t=n.feedbackUrl,s=n.feedbackMarker,r=t?Xe(Ze(t))||[]:null,i=Xe(dn()),a=t?{id:o,taskNumber:0,title:n.title,status:"todo",priority:n.priority,feedbackUrl:t,feedbackMarker:s||null,createdAt:new Date().toISOString(),commentCount:0,_optimistic:!0}:null;t&&a&&(We(Ze(t),[a,...r]),i&&We(dn(),[a,...i]));try{let C=await(await Ve(e,{method:"POST",body:JSON.stringify(n)})).json().catch(()=>({}));if(t&&a){let w={...a,id:C.taskId||o,taskNumber:C.taskNumber||0,_optimistic:!1};ut(Ze(t),S=>(S||[]).map(N=>N.id===o?w:N)),i&&ut(dn(),S=>(S||[]).map(N=>N.id===o?w:N)),to(e,t).catch(()=>{}),i&&oo(e).catch(()=>{})}return C}catch(p){throw t&&r&&We(Ze(t),r),i&&We(dn(),i),p}}async function eo(e,n,o={}){let t=Ze(n);return mt(t,async()=>(await(await Ve(`${e}?url=${encodeURIComponent(n)}`)).json()).tasks||[],o)}async function no(e,n={}){let o=dn();return mt(o,async()=>(await(await Ve(`${e}?url=__all__`)).json()).tasks||[],n)}async function to(e,n){let o=Ze(n);return In(o,async()=>(await(await Ve(`${e}?url=${encodeURIComponent(n)}`)).json()).tasks||[])}async function oo(e){let n=dn();return In(n,async()=>(await(await Ve(`${e}?url=__all__`)).json()).tasks||[])}async function Xn(e,n,o={}){let t=Ye(n);return mt(t,async()=>(await(await Ve(`${e}/${n}/comments`)).json()).comments||[],o)}async function Ks(e,n){let o=Ye(n);return In(o,async()=>(await(await Ve(`${e}/${n}/comments`)).json()).comments||[])}function Zs(e,n){Us("feedbacks:",o=>o.map(t=>t.id===e?{...t,commentCount:Math.max(0,(t.commentCount||0)+n)}:t))}function Xs(e){_t("feedbacks:").forEach(o=>{let t=o.replace("feedbacks:","");t==="__all__"?oo(e).catch(()=>{}):to(e,t).catch(()=>{})})}async function Yn(e,n,o,t,s,r,i){let a={id:`temp-${Date.now()}`,content:o,authorName:t,authorId:s,imageUrl:r||void 0,fileUrl:i?.url,fileName:i?.fileName,fileType:i?.fileType,fileSize:i?.fileSize,fileSource:i?.fileSource,createdAt:new Date().toISOString()},p=Ye(n),C=Xe(p)||[],w=Os("feedbacks:");We(p,[...C,a]),Zs(n,1);try{let B=(await(await Ve(`${e}/${n}/comments`,{method:"POST",body:JSON.stringify({content:o,authorName:t,authorId:s,screenshot:r,...i&&{fileUrl:i.url,fileName:i.fileName,fileType:i.fileType,fileSize:i.fileSize,fileSource:i.fileSource}})})).json()).comment;return ut(p,A=>(A||[]).map(j=>j.id===a.id?B:j)),Ks(e,n),Xs(e),B}catch(S){throw We(p,C),Vs(w),S}}var Ys=4.5*1024*1024;async function Qn(e,n,o,t){if(n.size>Ys)throw new Error(`\uD30C\uC77C \uD06C\uAE30\uAC00 4.5MB\uB97C \uCD08\uACFC\uD569\uB2C8\uB2E4. (${(n.size/1024/1024).toFixed(1)}MB)`);let s=Gt(),r=new FormData;r.append("file",n),r.append("context",o),t&&r.append("taskId",t);let i=await fetch(`${e}/upload`,{method:"POST",headers:{Authorization:`Bearer ${s}`},body:r});if(!i.ok){if(i.status===401)throw new Error("\uC778\uC99D\uC774 \uB9CC\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.");if(i.status===413)throw new Error("\uD30C\uC77C \uD06C\uAE30\uAC00 4.5MB\uB97C \uCD08\uACFC\uD569\uB2C8\uB2E4.");let a=await i.json().catch(()=>({error:"\uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328"}));throw new Error(a.error||"\uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328")}return i.json()}async function qn(e,n={}){let o=new URLSearchParams;n.since&&o.set("since",n.since),n.date&&o.set("date",n.date),n.limit&&o.set("limit",String(n.limit));let t=o.toString(),s=`${e}/history${t?`?${t}`:""}`;return(await(await Ve(s)).json()).events||[]}var Mn=require("@jridgewell/trace-mapping"),Rn=new Map,so=new Set;async function Qs(e){try{let n=await fetch(e,{cache:"force-cache"});if(!n.ok)return null;let t=(await n.text()).match(/\/\/[#@]\s*sourceMappingURL\s*=\s*(\S+)\s*$/m);if(!t)return null;let s=t[1];return s.startsWith("http")?s:e.substring(0,e.lastIndexOf("/")+1)+s}catch{return null}}async function qs(e){if(Rn.has(e))return Rn.get(e)??null;if(so.has(e))return null;let n=e.endsWith(".map")?e:`${e}.map`;try{let t=await fetch(n,{cache:"force-cache"});if(t.ok){let s=await t.json(),r=new Mn.AnyMap(s);return Rn.set(e,r),r}}catch{}let o=await Qs(e);if(o)try{let t=await fetch(o,{cache:"force-cache"});if(t.ok){let s=await t.json(),r=new Mn.AnyMap(s);return Rn.set(e,r),r}}catch{}return so.add(e),Rn.set(e,null),null}async function Gs(e,n,o){let t;try{e.startsWith("http")?t=e:t=new URL(e,window.location.origin).href}catch{return null}let s=await qs(t);if(!s)return null;try{let r=(0,Mn.originalPositionFor)(s,{line:n,column:o});if(!r.source)return null;let i=r.source;return i=i.replace(/^webpack:\/\/\//,""),i=i.replace(/^turbopack:\/\/\//,""),i=i.replace(/^\[project\]\//,""),i=i.replace(/^\.\//,""),i.includes("node_modules/")?null:{source:i,line:r.line??0,column:r.column??0,name:r.name??null}}catch{return null}}async function pt(e){if(!e)return null;let n=e.match(/^(.+):(\d+):(\d+)$/);if(!n)return null;let[,o,t,s]=n,r=parseInt(t,10),i=parseInt(s,10);return isNaN(r)||isNaN(i)?null:Gs(o,r,i)}var Js=`@keyframes styles-module__markerIn___7B1j9 {
337
337
  from {
338
338
  opacity: 0;
339
339
  transform: translate(-50%, -50%) scale(0.3);
@@ -440,7 +440,7 @@ ${n.stack?.split(`
440
440
  margin-top: 2px;
441
441
  overflow: hidden;
442
442
  text-overflow: ellipsis;
443
- }`,Gs={marker:"styles-module__marker___7PVX9",enter:"styles-module__enter___V7KfW",markerIn:"styles-module__markerIn___7B1j9",hovered:"styles-module__hovered___ojzb7",done:"styles-module__done___J6WOE",pending:"styles-module__pending___qQbOR",markerTooltip:"styles-module__markerTooltip___ns-gQ",tooltipIn:"styles-module__tooltipIn___3o7t0",markerQuote:"styles-module__markerQuote___1bRQp",markerNote:"styles-module__markerNote___3iWm4"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-annotation-marker-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-annotation-marker-styles",document.head.appendChild(e)),e.textContent=qs}var Ae=Gs;var Fe=require("react/jsx-runtime"),Js="#3b82f6",er="#9ca3af";function it({annotation:e,layerIndex:n,isAnimated:t,isHovered:o,accentColor:s,onHover:r,onHoverEnd:a,onClick:i}){let _=t?"":Ae.enter,k=e.status==="done"||e.status==="resolved",b=e.status==="in_progress",C=k?er:b?Js:s;return(0,Fe.jsxs)("div",{className:`${Ae.marker} ${_} ${o?Ae.hovered:""} ${k?Ae.done:""}`,"data-annotation-marker":!0,style:{left:`${e.x}%`,top:e.y,backgroundColor:C,animationDelay:`${n*20}ms`},onMouseEnter:r,onMouseLeave:a,onClick:v=>{v.stopPropagation(),i()},children:[(0,Fe.jsx)("span",{children:n+1}),o&&(0,Fe.jsxs)("div",{className:`${Ae.markerTooltip} ${Ae.enter}`,children:[(0,Fe.jsx)("span",{className:Ae.markerQuote,children:e.element}),e.comment&&(0,Fe.jsx)("span",{className:Ae.markerNote,children:e.comment})]})]})}function oo({x:e,y:n,accentColor:t}){return(0,Fe.jsx)("div",{className:`${Ae.pending} ${Ae.enter}`,"data-annotation-marker":!0,style:{left:`${e}%`,top:n,backgroundColor:t},children:(0,Fe.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",children:[(0,Fe.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,Fe.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})})}var te=require("react");var nr=`@keyframes styles-module__spin___h0C6p {
443
+ }`,er={marker:"styles-module__marker___7PVX9",enter:"styles-module__enter___V7KfW",markerIn:"styles-module__markerIn___7B1j9",hovered:"styles-module__hovered___ojzb7",done:"styles-module__done___J6WOE",pending:"styles-module__pending___qQbOR",markerTooltip:"styles-module__markerTooltip___ns-gQ",tooltipIn:"styles-module__tooltipIn___3o7t0",markerQuote:"styles-module__markerQuote___1bRQp",markerNote:"styles-module__markerNote___3iWm4"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-annotation-marker-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-annotation-marker-styles",document.head.appendChild(e)),e.textContent=Js}var ze=er;var De=require("react/jsx-runtime"),nr="#3b82f6",tr="#9ca3af";function ft({annotation:e,layerIndex:n,isAnimated:o,isHovered:t,accentColor:s,onHover:r,onHoverEnd:i,onClick:a}){let p=o?"":ze.enter,C=e.status==="done"||e.status==="resolved",w=e.status==="in_progress",S=C?tr:w?nr:s;return(0,De.jsxs)("div",{className:`${ze.marker} ${p} ${t?ze.hovered:""} ${C?ze.done:""}`,"data-annotation-marker":!0,style:{left:`${e.x}%`,top:e.y,backgroundColor:S,animationDelay:`${n*20}ms`},onMouseEnter:r,onMouseLeave:i,onClick:N=>{N.stopPropagation(),a()},children:[(0,De.jsx)("span",{children:n+1}),t&&(0,De.jsxs)("div",{className:`${ze.markerTooltip} ${ze.enter}`,children:[(0,De.jsx)("span",{className:ze.markerQuote,children:e.element}),e.comment&&(0,De.jsx)("span",{className:ze.markerNote,children:e.comment})]})]})}function ro({x:e,y:n,accentColor:o}){return(0,De.jsx)("div",{className:`${ze.pending} ${ze.enter}`,"data-annotation-marker":!0,style:{left:`${e}%`,top:n,backgroundColor:o},children:(0,De.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",children:[(0,De.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,De.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})})}var se=require("react");var or=`@keyframes styles-module__spin___h0C6p {
444
444
  to {
445
445
  transform: rotate(360deg);
446
446
  }
@@ -466,7 +466,7 @@ ${n.stack?.split(`
466
466
  .styles-module__message___70Ayy {
467
467
  font-size: 12px;
468
468
  color: #9ca3af;
469
- }`,tr={container:"styles-module__container___YKn1h",spinner:"styles-module__spinner___4ELZK",spin:"styles-module__spin___h0C6p",message:"styles-module__message___70Ayy"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-loading-spinner-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-loading-spinner-styles",document.head.appendChild(e)),e.textContent=nr}var On=tr;var vn=require("react/jsx-runtime");function Vn({message:e="\uB85C\uB529 \uC911..."}){return(0,vn.jsxs)("div",{className:On.container,children:[(0,vn.jsx)("div",{className:On.spinner}),(0,vn.jsx)("span",{className:On.message,children:e})]})}var or=`@keyframes styles-module__threadIn___pBTFZ {
469
+ }`,sr={container:"styles-module__container___YKn1h",spinner:"styles-module__spinner___4ELZK",spin:"styles-module__spin___h0C6p",message:"styles-module__message___70Ayy"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-loading-spinner-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-loading-spinner-styles",document.head.appendChild(e)),e.textContent=or}var Gn=sr;var An=require("react/jsx-runtime");function Jn({message:e="\uB85C\uB529 \uC911..."}){return(0,An.jsxs)("div",{className:Gn.container,children:[(0,An.jsx)("div",{className:Gn.spinner}),(0,An.jsx)("span",{className:Gn.message,children:e})]})}var rr=`@keyframes styles-module__threadIn___pBTFZ {
470
470
  from {
471
471
  opacity: 0;
472
472
  transform: scale(0.96) translateY(4px);
@@ -950,7 +950,7 @@ ${n.stack?.split(`
950
950
  }
951
951
  .styles-module__lightboxClose___tGZlm:hover {
952
952
  background: rgba(255, 255, 255, 0.25);
953
- }`,sr={thread:"styles-module__thread___ua2EO",threadIn:"styles-module__threadIn___pBTFZ",exiting:"styles-module__exiting___RIPeX",threadOut:"styles-module__threadOut___-ccKh",header:"styles-module__header___GiEBq",avatar:"styles-module__avatar___JElAd",headerInfo:"styles-module__headerInfo___E8809",headerTop:"styles-module__headerTop___eDiCd",authorName:"styles-module__authorName___T1BfB",timestamp:"styles-module__timestamp___WusBf",headerActions:"styles-module__headerActions___8FsMY",headerAction:"styles-module__headerAction___Tinmq",title:"styles-module__title___qkfqY",commentsList:"styles-module__commentsList___kYqAR",comment:"styles-module__comment___pW3IO",commentActions:"styles-module__commentActions___wO0fs",commentHighlight:"styles-module__commentHighlight___EiTmx",commentContent:"styles-module__commentContent___RObGr",commentTop:"styles-module__commentTop___BbTF3",commentAuthor:"styles-module__commentAuthor___tBjpl",commentTime:"styles-module__commentTime___0OLrz",commentText:"styles-module__commentText___ldy2V",screenshot:"styles-module__screenshot___jUqau",screenshotBadge:"styles-module__screenshotBadge___roEqY",fileCard:"styles-module__fileCard___-iOro",fileIcon:"styles-module__fileIcon___dNJMT",fileInfo:"styles-module__fileInfo___dVrLV",fileCardName:"styles-module__fileCardName___SHOj-",fileCardSize:"styles-module__fileCardSize___W53JL",pendingFile:"styles-module__pendingFile___-OSRs",divider:"styles-module__divider___kDjxN",pendingImage:"styles-module__pendingImage___gHaF3",pendingRemove:"styles-module__pendingRemove___FRL4h",replyArea:"styles-module__replyArea___VQn9b",replyInput:"styles-module__replyInput___uZNBW",replyToolbar:"styles-module__replyToolbar___fTFJU",replyTool:"styles-module__replyTool___Ho-Rx",replySend:"styles-module__replySend___e0VSb",active:"styles-module__active___R--Jj",empty:"styles-module__empty___XXGiw",statusBadge:"styles-module__statusBadge___el8ml",todo:"styles-module__todo___rUWBr",inProgress:"styles-module__inProgress___HEWgU",done:"styles-module__done___zC12n",lightbox:"styles-module__lightbox___KoWEF",lightboxClose:"styles-module__lightboxClose___tGZlm"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-comment-thread-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-comment-thread-styles",document.head.appendChild(e)),e.textContent=or}var L=sr;var p=require("react/jsx-runtime");function so(e){let n=new Date(e),t=Date.now()-n.getTime(),o=_=>String(_).padStart(2,"0"),s=`${n.getMonth()+1}/${n.getDate()} ${o(n.getHours())}:${o(n.getMinutes())}`,r=Math.floor(t/6e4);if(r<1)return`${s} (\uBC29\uAE08)`;if(r<60)return`${s} (${r}\uBD84 \uC804)`;let a=Math.floor(r/60);if(a<24)return`${s} (${a}\uC2DC\uAC04 \uC804)`;let i=Math.floor(a/24);return`${s} (${i}\uC77C \uC804)`}function ro(e){return e.slice(0,1).toUpperCase()}function io(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(0)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`}function ao(e){return e.includes("pdf")?"PDF":e.includes("spreadsheet")||e.includes("excel")||e.includes("csv")?"XLS":e.includes("presentation")||e.includes("powerpoint")?"PPT":e.includes("document")||e.includes("word")?"DOC":e.includes("zip")||e.includes("compressed")||e.includes("archive")?"ZIP":e.includes("video")?"VID":e.includes("audio")?"AUD":"FILE"}function lo({task:e,currentUserName:n,currentUserId:t,left:o,top:s,bottom:r,loading:a,onClose:i,onReply:_}){let[k,b]=(0,te.useState)(""),[C,v]=(0,te.useState)(!1),[$,F]=(0,te.useState)(null),[H,W]=(0,te.useState)(null),[ce,pe]=(0,te.useState)(!1),T=(0,te.useRef)(null),w=(0,te.useRef)(null),[I,O]=(0,te.useState)(null),x=(0,te.useRef)(null);(0,te.useEffect)(()=>{w.current&&(w.current.scrollTop=w.current.scrollHeight),T.current?.focus()},[e.comments.length]),(0,te.useEffect)(()=>{if(ce)return;let h=f=>{let B=f.target;B.closest(`.${L.thread}`)||B.closest("[data-annotation-marker]")||B.closest("[data-impakers-debug]")||A()};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[ce]);let A=(0,te.useCallback)(()=>{v(!0),setTimeout(()=>i(),120)},[i]),E=(0,te.useCallback)(()=>{!k.trim()&&!$&&!H||(_(e.id,k.trim(),$||void 0,H||void 0),b(""),F(null),W(null))},[k,$,H,e.id,_]),q=(0,te.useCallback)(h=>{h.stopPropagation(),!h.nativeEvent.isComposing&&(h.key==="Enter"&&!h.shiftKey&&(h.preventDefault(),E()),h.key==="Escape"&&A())},[A,E]),M=(0,te.useCallback)(()=>{pe(!0);let h=document.querySelectorAll("[data-impakers-debug], [data-annotation-marker]");h.forEach(G=>G.style.visibility="hidden"),document.documentElement.classList.add("impakers-selecting");let f=null,B=G=>{f||(f=document.createElement("div"),f.style.cssText="position:fixed;border:2px solid #3b82f6;background:rgba(59,130,246,0.05);border-radius:4px;pointer-events:none;z-index:999999;transition:all 0.08s ease",document.body.appendChild(f)),f.style.left=`${G.left}px`,f.style.top=`${G.top}px`,f.style.width=`${G.width}px`,f.style.height=`${G.height}px`},P=()=>{document.removeEventListener("mousemove",Le),document.removeEventListener("click",Re,!0),document.removeEventListener("keydown",Ne),document.documentElement.classList.remove("impakers-selecting"),f?.remove(),h.forEach(G=>G.style.visibility=""),pe(!1)},Le=G=>{let Ie=document.elementFromPoint(G.clientX,G.clientY);!Ie||Ie===f||B(Ie.getBoundingClientRect())},Ne=G=>{G.key==="Escape"&&P()},Re=async G=>{G.preventDefault(),G.stopPropagation(),G.stopImmediatePropagation();let Ie=document.elementFromPoint(G.clientX,G.clientY);if(P(),!!Ie){try{let ge=await Pn(Ie);F(ge)}catch(ge){console.error("[@impakers/debug] DOM \uC2A4\uD06C\uB9B0\uC0F7 \uC2E4\uD328:",ge)}T.current?.focus()}};document.addEventListener("mousemove",Le),document.addEventListener("click",Re,!0),document.addEventListener("keydown",Ne)},[]),J=(0,te.useCallback)(()=>{M()},[M]),se=(0,te.useCallback)(()=>{x.current?.click()},[]),fe=(0,te.useCallback)(h=>{let f=h.target.files?.[0];if(f){if(f.size>4.5*1024*1024){console.warn("[@impakers/debug] \uD30C\uC77C \uD06C\uAE30\uAC00 4.5MB\uB97C \uCD08\uACFC\uD569\uB2C8\uB2E4."),h.target.value="";return}if(f.type.startsWith("image/")){W(null);let B=new FileReader;B.onload=()=>{F(B.result)},B.readAsDataURL(f)}else F(null),W(f);h.target.value=""}},[]),ve=e.title.replace(/^\[피드백\]\s*/,""),le={left:o,...s!==void 0?{top:s}:{},...r!==void 0?{bottom:r}:{},"--thread-top":`${s!==void 0?s:40}px`};return(0,p.jsxs)("div",{className:`${L.thread} ${C?L.exiting:""}`,style:le,"data-impakers-debug":"",onClick:h=>h.stopPropagation(),children:[(0,p.jsxs)("div",{className:L.header,children:[(0,p.jsx)("div",{className:L.avatar,children:ro(e.authorName||n)}),(0,p.jsxs)("div",{className:L.headerInfo,children:[(0,p.jsxs)("div",{className:L.headerTop,children:[(0,p.jsx)("span",{className:L.authorName,children:e.authorName||n}),(0,p.jsx)("span",{className:L.timestamp,children:so(e.createdAt)})]}),(0,p.jsx)("div",{className:L.title,children:ve})]}),(0,p.jsx)("div",{className:L.headerActions,children:(0,p.jsx)("button",{className:L.headerAction,onClick:A,title:"\uB2EB\uAE30",type:"button",children:(0,p.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,p.jsx)("path",{d:"M18 6L6 18M6 6l12 12"})})})})]}),a&&e.comments.length===0&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("div",{className:L.divider}),(0,p.jsx)(Vn,{message:"\uB313\uAE00 \uB85C\uB529 \uC911..."})]}),e.comments.length>0&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("div",{className:L.divider}),(0,p.jsx)("div",{className:L.commentsList,ref:w,children:e.comments.map(h=>(0,p.jsxs)("div",{className:L.comment,children:[(0,p.jsx)("div",{className:L.avatar,style:{width:22,height:22,fontSize:10},children:ro(h.authorName)}),(0,p.jsxs)("div",{className:L.commentContent,children:[(0,p.jsxs)("div",{className:L.commentTop,children:[(0,p.jsx)("span",{className:L.commentAuthor,children:h.authorName}),(0,p.jsx)("span",{className:L.commentTime,children:so(h.createdAt)})]}),h.content&&(0,p.jsx)("div",{className:L.commentText,children:h.content}),h.imageUrl&&h.imageUrl!=="loading..."&&(0,p.jsx)("div",{className:L.screenshot,onClick:()=>O(h.imageUrl),style:{cursor:"pointer"},children:(0,p.jsx)("img",{src:h.imageUrl,alt:"screenshot"})}),h.fileUrl&&(0,p.jsxs)("a",{className:L.fileCard,href:h.fileUrl,target:"_blank",rel:"noopener noreferrer",onClick:f=>f.stopPropagation(),children:[(0,p.jsx)("span",{className:L.fileIcon,children:ao(h.fileType||"")}),(0,p.jsxs)("span",{className:L.fileInfo,children:[(0,p.jsx)("span",{className:L.fileCardName,children:h.fileName||"\uD30C\uC77C"}),h.fileSize!=null&&(0,p.jsx)("span",{className:L.fileCardSize,children:io(h.fileSize)})]})]})]})]},h.id))})]}),$&&(0,p.jsxs)("div",{className:L.pendingImage,children:[(0,p.jsx)("img",{src:$,alt:"pending"}),(0,p.jsx)("button",{className:L.pendingRemove,onClick:()=>F(null),type:"button",children:"\xD7"})]}),H&&(0,p.jsxs)("div",{className:L.pendingFile,children:[(0,p.jsx)("span",{className:L.fileIcon,children:ao(H.type)}),(0,p.jsxs)("span",{className:L.fileInfo,children:[(0,p.jsx)("span",{className:L.fileCardName,children:H.name}),(0,p.jsx)("span",{className:L.fileCardSize,children:io(H.size)})]}),(0,p.jsx)("button",{className:L.pendingRemove,onClick:()=>W(null),type:"button",children:"\xD7"})]}),(0,p.jsx)("div",{className:L.replyArea,children:(0,p.jsx)("textarea",{ref:T,className:L.replyInput,placeholder:"Reply...",value:k,onChange:h=>{b(h.target.value);let f=h.target;f.style.height="auto",f.style.height=`${Math.min(f.scrollHeight,120)}px`},onKeyDown:q,rows:2})}),(0,p.jsxs)("div",{className:L.replyToolbar,children:[(0,p.jsx)("button",{className:L.replyTool,onClick:se,type:"button",title:"\uD30C\uC77C \uCCA8\uBD80",children:(0,p.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,p.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,p.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}),(0,p.jsx)("button",{className:L.replyTool,onClick:J,type:"button",title:"\uC694\uC18C \uC2A4\uD06C\uB9B0\uC0F7",children:(0,p.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,p.jsx)("path",{d:"M14.5 4h-5L7 7H4a2 2 0 00-2 2v9a2 2 0 002 2h16a2 2 0 002-2V9a2 2 0 00-2-2h-3l-2.5-3z"}),(0,p.jsx)("circle",{cx:"12",cy:"13",r:"3"})]})}),(0,p.jsx)("button",{className:`${L.replySend} ${k.trim()||$||H?L.active:""}`,onClick:E,disabled:!k.trim()&&!$&&!H,type:"button",title:"\uC804\uC1A1",children:(0,p.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,p.jsx)("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),(0,p.jsx)("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]}),(0,p.jsx)("input",{ref:x,type:"file",accept:"*/*",style:{display:"none"},onChange:fe}),I&&(0,p.jsxs)("div",{className:L.lightbox,onClick:()=>O(null),"data-impakers-debug":"",children:[(0,p.jsx)("img",{src:I,alt:"enlarged",onClick:h=>h.stopPropagation()}),(0,p.jsx)("button",{className:L.lightboxClose,onClick:()=>O(null),type:"button",children:"\xD7"})]})]})}var ie=require("react");var rr=`@keyframes styles-module__fabEnter___DMJoo {
953
+ }`,ir={thread:"styles-module__thread___ua2EO",threadIn:"styles-module__threadIn___pBTFZ",exiting:"styles-module__exiting___RIPeX",threadOut:"styles-module__threadOut___-ccKh",header:"styles-module__header___GiEBq",avatar:"styles-module__avatar___JElAd",headerInfo:"styles-module__headerInfo___E8809",headerTop:"styles-module__headerTop___eDiCd",authorName:"styles-module__authorName___T1BfB",timestamp:"styles-module__timestamp___WusBf",headerActions:"styles-module__headerActions___8FsMY",headerAction:"styles-module__headerAction___Tinmq",title:"styles-module__title___qkfqY",commentsList:"styles-module__commentsList___kYqAR",comment:"styles-module__comment___pW3IO",commentActions:"styles-module__commentActions___wO0fs",commentHighlight:"styles-module__commentHighlight___EiTmx",commentContent:"styles-module__commentContent___RObGr",commentTop:"styles-module__commentTop___BbTF3",commentAuthor:"styles-module__commentAuthor___tBjpl",commentTime:"styles-module__commentTime___0OLrz",commentText:"styles-module__commentText___ldy2V",screenshot:"styles-module__screenshot___jUqau",screenshotBadge:"styles-module__screenshotBadge___roEqY",fileCard:"styles-module__fileCard___-iOro",fileIcon:"styles-module__fileIcon___dNJMT",fileInfo:"styles-module__fileInfo___dVrLV",fileCardName:"styles-module__fileCardName___SHOj-",fileCardSize:"styles-module__fileCardSize___W53JL",pendingFile:"styles-module__pendingFile___-OSRs",divider:"styles-module__divider___kDjxN",pendingImage:"styles-module__pendingImage___gHaF3",pendingRemove:"styles-module__pendingRemove___FRL4h",replyArea:"styles-module__replyArea___VQn9b",replyInput:"styles-module__replyInput___uZNBW",replyToolbar:"styles-module__replyToolbar___fTFJU",replyTool:"styles-module__replyTool___Ho-Rx",replySend:"styles-module__replySend___e0VSb",active:"styles-module__active___R--Jj",empty:"styles-module__empty___XXGiw",statusBadge:"styles-module__statusBadge___el8ml",todo:"styles-module__todo___rUWBr",inProgress:"styles-module__inProgress___HEWgU",done:"styles-module__done___zC12n",lightbox:"styles-module__lightbox___KoWEF",lightboxClose:"styles-module__lightboxClose___tGZlm"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-comment-thread-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-comment-thread-styles",document.head.appendChild(e)),e.textContent=rr}var I=ir;var h=require("react/jsx-runtime");function io(e){let n=new Date(e),o=Date.now()-n.getTime(),t=p=>String(p).padStart(2,"0"),s=`${n.getMonth()+1}/${n.getDate()} ${t(n.getHours())}:${t(n.getMinutes())}`,r=Math.floor(o/6e4);if(r<1)return`${s} (\uBC29\uAE08)`;if(r<60)return`${s} (${r}\uBD84 \uC804)`;let i=Math.floor(r/60);if(i<24)return`${s} (${i}\uC2DC\uAC04 \uC804)`;let a=Math.floor(i/24);return`${s} (${a}\uC77C \uC804)`}function ao(e){return e.slice(0,1).toUpperCase()}function lo(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(0)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`}function co(e){return e.includes("pdf")?"PDF":e.includes("spreadsheet")||e.includes("excel")||e.includes("csv")?"XLS":e.includes("presentation")||e.includes("powerpoint")?"PPT":e.includes("document")||e.includes("word")?"DOC":e.includes("zip")||e.includes("compressed")||e.includes("archive")?"ZIP":e.includes("video")?"VID":e.includes("audio")?"AUD":"FILE"}function uo({task:e,currentUserName:n,currentUserId:o,left:t,top:s,bottom:r,loading:i,onClose:a,onReply:p}){let[C,w]=(0,se.useState)(""),[S,N]=(0,se.useState)(!1),[B,A]=(0,se.useState)(null),[j,U]=(0,se.useState)(null),[fe,ge]=(0,se.useState)(!1),de=(0,se.useRef)(null),$=(0,se.useRef)(null),[P,Y]=(0,se.useState)(null),b=(0,se.useRef)(null);(0,se.useEffect)(()=>{$.current&&($.current.scrollTop=$.current.scrollHeight),de.current?.focus()},[e.comments.length]),(0,se.useEffect)(()=>{if(fe)return;let k=v=>{let f=v.target;f.closest(`.${I.thread}`)||f.closest("[data-annotation-marker]")||f.closest("[data-impakers-debug]")||z()};return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[fe]);let z=(0,se.useCallback)(()=>{N(!0),setTimeout(()=>a(),120)},[a]),R=(0,se.useCallback)(()=>{!C.trim()&&!B&&!j||(p(e.id,C.trim(),B||void 0,j||void 0),w(""),A(null),U(null))},[C,B,j,e.id,p]),he=(0,se.useCallback)(k=>{k.stopPropagation(),!k.nativeEvent.isComposing&&(k.key==="Enter"&&!k.shiftKey&&(k.preventDefault(),R()),k.key==="Escape"&&z())},[z,R]),M=(0,se.useCallback)(()=>{ge(!0);let k=document.querySelectorAll("[data-impakers-debug], [data-annotation-marker]");k.forEach(F=>F.style.visibility="hidden"),document.documentElement.classList.add("impakers-selecting");let v=null,f=F=>{v||(v=document.createElement("div"),v.style.cssText="position:fixed;border:2px solid #3b82f6;background:rgba(59,130,246,0.05);border-radius:4px;pointer-events:none;z-index:999999;transition:all 0.08s ease",document.body.appendChild(v)),v.style.left=`${F.left}px`,v.style.top=`${F.top}px`,v.style.width=`${F.width}px`,v.style.height=`${F.height}px`},L=()=>{document.removeEventListener("mousemove",D),document.removeEventListener("click",ce,!0),document.removeEventListener("keydown",ae),document.documentElement.classList.remove("impakers-selecting"),v?.remove(),k.forEach(F=>F.style.visibility=""),ge(!1)},D=F=>{let ye=document.elementFromPoint(F.clientX,F.clientY);!ye||ye===v||f(ye.getBoundingClientRect())},ae=F=>{F.key==="Escape"&&L()},ce=async F=>{F.preventDefault(),F.stopPropagation(),F.stopImmediatePropagation();let ye=document.elementFromPoint(F.clientX,F.clientY);if(L(),!!ye){try{let ue=await Vn(ye);A(ue)}catch(ue){console.error("[@impakers/debug] DOM \uC2A4\uD06C\uB9B0\uC0F7 \uC2E4\uD328:",ue)}de.current?.focus()}};document.addEventListener("mousemove",D),document.addEventListener("click",ce,!0),document.addEventListener("keydown",ae)},[]),ee=(0,se.useCallback)(()=>{M()},[M]),re=(0,se.useCallback)(()=>{b.current?.click()},[]),Te=(0,se.useCallback)(k=>{let v=k.target.files?.[0];if(v){if(v.size>4.5*1024*1024){console.warn("[@impakers/debug] \uD30C\uC77C \uD06C\uAE30\uAC00 4.5MB\uB97C \uCD08\uACFC\uD569\uB2C8\uB2E4."),k.target.value="";return}if(v.type.startsWith("image/")){U(null);let f=new FileReader;f.onload=()=>{A(f.result)},f.readAsDataURL(v)}else A(null),U(v);k.target.value=""}},[]),Fe=e.title.replace(/^\[피드백\]\s*/,""),ie={left:t,...s!==void 0?{top:s}:{},...r!==void 0?{bottom:r}:{},"--thread-top":`${s!==void 0?s:40}px`};return(0,h.jsxs)("div",{className:`${I.thread} ${S?I.exiting:""}`,style:ie,"data-impakers-debug":"",onClick:k=>k.stopPropagation(),children:[(0,h.jsxs)("div",{className:I.header,children:[(0,h.jsx)("div",{className:I.avatar,children:ao(e.authorName||n)}),(0,h.jsxs)("div",{className:I.headerInfo,children:[(0,h.jsxs)("div",{className:I.headerTop,children:[(0,h.jsx)("span",{className:I.authorName,children:e.authorName||n}),(0,h.jsx)("span",{className:I.timestamp,children:io(e.createdAt)})]}),(0,h.jsx)("div",{className:I.title,children:Fe})]}),(0,h.jsx)("div",{className:I.headerActions,children:(0,h.jsx)("button",{className:I.headerAction,onClick:z,title:"\uB2EB\uAE30",type:"button",children:(0,h.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,h.jsx)("path",{d:"M18 6L6 18M6 6l12 12"})})})})]}),i&&e.comments.length===0&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("div",{className:I.divider}),(0,h.jsx)(Jn,{message:"\uB313\uAE00 \uB85C\uB529 \uC911..."})]}),e.comments.length>0&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("div",{className:I.divider}),(0,h.jsx)("div",{className:I.commentsList,ref:$,children:e.comments.map(k=>(0,h.jsxs)("div",{className:I.comment,children:[(0,h.jsx)("div",{className:I.avatar,style:{width:22,height:22,fontSize:10},children:ao(k.authorName)}),(0,h.jsxs)("div",{className:I.commentContent,children:[(0,h.jsxs)("div",{className:I.commentTop,children:[(0,h.jsx)("span",{className:I.commentAuthor,children:k.authorName}),(0,h.jsx)("span",{className:I.commentTime,children:io(k.createdAt)})]}),k.content&&(0,h.jsx)("div",{className:I.commentText,children:k.content}),k.imageUrl&&k.imageUrl!=="loading..."&&(0,h.jsx)("div",{className:I.screenshot,onClick:()=>Y(k.imageUrl),style:{cursor:"pointer"},children:(0,h.jsx)("img",{src:k.imageUrl,alt:"screenshot"})}),k.fileUrl&&(0,h.jsxs)("a",{className:I.fileCard,href:k.fileUrl,target:"_blank",rel:"noopener noreferrer",onClick:v=>v.stopPropagation(),children:[(0,h.jsx)("span",{className:I.fileIcon,children:co(k.fileType||"")}),(0,h.jsxs)("span",{className:I.fileInfo,children:[(0,h.jsx)("span",{className:I.fileCardName,children:k.fileName||"\uD30C\uC77C"}),k.fileSize!=null&&(0,h.jsx)("span",{className:I.fileCardSize,children:lo(k.fileSize)})]})]})]})]},k.id))})]}),B&&(0,h.jsxs)("div",{className:I.pendingImage,children:[(0,h.jsx)("img",{src:B,alt:"pending"}),(0,h.jsx)("button",{className:I.pendingRemove,onClick:()=>A(null),type:"button",children:"\xD7"})]}),j&&(0,h.jsxs)("div",{className:I.pendingFile,children:[(0,h.jsx)("span",{className:I.fileIcon,children:co(j.type)}),(0,h.jsxs)("span",{className:I.fileInfo,children:[(0,h.jsx)("span",{className:I.fileCardName,children:j.name}),(0,h.jsx)("span",{className:I.fileCardSize,children:lo(j.size)})]}),(0,h.jsx)("button",{className:I.pendingRemove,onClick:()=>U(null),type:"button",children:"\xD7"})]}),(0,h.jsx)("div",{className:I.replyArea,children:(0,h.jsx)("textarea",{ref:de,className:I.replyInput,placeholder:"Reply...",value:C,onChange:k=>{w(k.target.value);let v=k.target;v.style.height="auto",v.style.height=`${Math.min(v.scrollHeight,120)}px`},onKeyDown:he,rows:2})}),(0,h.jsxs)("div",{className:I.replyToolbar,children:[(0,h.jsx)("button",{className:I.replyTool,onClick:re,type:"button",title:"\uD30C\uC77C \uCCA8\uBD80",children:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,h.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,h.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}),(0,h.jsx)("button",{className:I.replyTool,onClick:ee,type:"button",title:"\uC694\uC18C \uC2A4\uD06C\uB9B0\uC0F7",children:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,h.jsx)("path",{d:"M14.5 4h-5L7 7H4a2 2 0 00-2 2v9a2 2 0 002 2h16a2 2 0 002-2V9a2 2 0 00-2-2h-3l-2.5-3z"}),(0,h.jsx)("circle",{cx:"12",cy:"13",r:"3"})]})}),(0,h.jsx)("button",{className:`${I.replySend} ${C.trim()||B||j?I.active:""}`,onClick:R,disabled:!C.trim()&&!B&&!j,type:"button",title:"\uC804\uC1A1",children:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,h.jsx)("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),(0,h.jsx)("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]}),(0,h.jsx)("input",{ref:b,type:"file",accept:"*/*",style:{display:"none"},onChange:Te}),P&&(0,h.jsxs)("div",{className:I.lightbox,onClick:()=>Y(null),"data-impakers-debug":"",children:[(0,h.jsx)("img",{src:P,alt:"enlarged",onClick:k=>k.stopPropagation()}),(0,h.jsx)("button",{className:I.lightboxClose,onClick:()=>Y(null),type:"button",children:"\xD7"})]})]})}var _e=require("react");var ar=`@keyframes styles-module__fabEnter___DMJoo {
954
954
  from {
955
955
  opacity: 0;
956
956
  transform: scale(0.5);
@@ -1143,7 +1143,7 @@ ${n.stack?.split(`
1143
1143
  justify-content: center;
1144
1144
  padding: 0 4px;
1145
1145
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
1146
- }`,ir={fab:"styles-module__fab___wShP-",fabEnter:"styles-module__fabEnter___DMJoo",expanded:"styles-module__expanded___qyto6",menuItems:"styles-module__menuItems___1qNsE",menuItem:"styles-module__menuItem___pB75H",active:"styles-module__active___7ktmc",menuItemIn:"styles-module__menuItemIn___GfmJ3",menuItemClosing:"styles-module__menuItemClosing___m4o-a",menuItemOut:"styles-module__menuItemOut___s0nQD",tooltip:"styles-module__tooltip___Cy6kg",contextMenu:"styles-module__contextMenu___A8fQt",contextMenuItem:"styles-module__contextMenuItem___1u9io",badge:"styles-module__badge___zmiZx"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-fab-menu-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-fab-menu-styles",document.head.appendChild(e)),e.textContent=rr}var Pe=ir;var xe=require("react/jsx-runtime");function co({items:e,onSelect:n,onHide:t,onDoubleTap:o}){let[s,r]=(0,ie.useState)(!1),[a,i]=(0,ie.useState)(!1),[_,k]=(0,ie.useState)({right:24,bottom:24}),[b,C]=(0,ie.useState)(null),v=(0,ie.useRef)(null),$=(0,ie.useRef)(!1),F=(0,ie.useRef)({x:0,y:0}),H=(0,ie.useRef)({x:0,y:0}),W=(0,ie.useRef)(!1),ce=(0,ie.useRef)(0),pe=(0,ie.useCallback)(x=>{if(x.button===2)return;$.current=!0,W.current=!1;let A=v.current;if(!A)return;A.setPointerCapture(x.pointerId);let E=A.getBoundingClientRect();F.current={x:x.clientX,y:x.clientY},H.current={x:x.clientX-E.left,y:x.clientY-E.top}},[]),T=(0,ie.useCallback)(x=>{$.current&&((Math.abs(x.clientX-F.current.x)>3||Math.abs(x.clientY-F.current.y)>3)&&(W.current=!0),W.current&&k({right:Math.max(8,Math.min(window.innerWidth-x.clientX-(44-H.current.x),window.innerWidth-52)),bottom:Math.max(8,Math.min(window.innerHeight-x.clientY-(44-H.current.y),window.innerHeight-52))}))},[]),w=(0,ie.useCallback)(x=>{if($.current&&(v.current?.releasePointerCapture(x.pointerId),$.current=!1,!W.current)){let A=Date.now(),E=A-ce.current<350;if(ce.current=A,E&&o){s&&I(),o();return}s?I():r(!0)}},[s,o]),I=(0,ie.useCallback)(()=>{i(!0),setTimeout(()=>{r(!1),i(!1)},150)},[]),O=(0,ie.useCallback)(x=>{x.preventDefault(),x.stopPropagation(),C({x:x.clientX,y:x.clientY})},[]);return(0,ie.useEffect)(()=>{if(!s&&!b)return;let x=A=>{if(!A.target.closest("[data-impakers-fab]")){if(b){C(null);return}s&&I()}};return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[s,b,I]),(0,xe.jsxs)(xe.Fragment,{children:[(s||a)&&(0,xe.jsx)("div",{className:Pe.menuItems,style:{position:"fixed",right:_.right+4/2,bottom:_.bottom+44+8},"data-impakers-debug":"","data-impakers-fab":"",children:[...e].reverse().map((x,A)=>(0,xe.jsxs)("button",{className:`${Pe.menuItem} ${x.active?Pe.active:""} ${a?Pe.menuItemClosing:""}`,style:{animationDelay:a?`${A*30}ms`:`${(e.length-1-A)*40}ms`},onClick:E=>{E.stopPropagation(),n(x.id),I()},type:"button","data-impakers-fab":"","data-impakers-debug":"",children:[x.icon,(0,xe.jsx)("span",{className:Pe.tooltip,children:x.label}),x.badge&&x.badge>0?(0,xe.jsx)("span",{className:Pe.badge,children:x.badge>99?"99+":x.badge}):null]},x.id))}),(0,xe.jsx)("button",{ref:v,className:`${Pe.fab} ${s?Pe.expanded:""}`,style:{position:"fixed",right:_.right,bottom:_.bottom},onPointerDown:pe,onPointerMove:T,onPointerUp:w,onContextMenu:O,type:"button","aria-label":"\uD53C\uB4DC\uBC31 \uBA54\uB274","data-impakers-debug":"","data-impakers-fab":"",children:(0,xe.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,xe.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,xe.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}),b&&(0,xe.jsx)("div",{style:{position:"fixed",inset:0,zIndex:2147483647},onMouseDown:()=>C(null),"data-impakers-debug":"","data-impakers-fab":"",children:(0,xe.jsx)("div",{className:Pe.contextMenu,style:{position:"fixed",left:b.x,top:b.y,zIndex:2147483647},onMouseDown:x=>x.stopPropagation(),"data-impakers-fab":"",children:(0,xe.jsx)("button",{className:Pe.contextMenuItem,onMouseDown:x=>{x.stopPropagation(),C(null),t?.()},type:"button",children:"\uC704\uC82F \uC228\uAE30\uAE30"})})})]})}var K=require("react"),_o=require("react-dom");var Se=require("react");var ar=`.styles-module__replyWrapper___wuGqO {
1146
+ }`,lr={fab:"styles-module__fab___wShP-",fabEnter:"styles-module__fabEnter___DMJoo",expanded:"styles-module__expanded___qyto6",menuItems:"styles-module__menuItems___1qNsE",menuItem:"styles-module__menuItem___pB75H",active:"styles-module__active___7ktmc",menuItemIn:"styles-module__menuItemIn___GfmJ3",menuItemClosing:"styles-module__menuItemClosing___m4o-a",menuItemOut:"styles-module__menuItemOut___s0nQD",tooltip:"styles-module__tooltip___Cy6kg",contextMenu:"styles-module__contextMenu___A8fQt",contextMenuItem:"styles-module__contextMenuItem___1u9io",badge:"styles-module__badge___zmiZx"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-fab-menu-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-fab-menu-styles",document.head.appendChild(e)),e.textContent=ar}var je=lr;var Le=require("react/jsx-runtime");function _o({items:e,onSelect:n,onHide:o,onDoubleTap:t}){let[s,r]=(0,_e.useState)(!1),[i,a]=(0,_e.useState)(!1),[p,C]=(0,_e.useState)({right:24,bottom:24}),[w,S]=(0,_e.useState)(null),N=(0,_e.useRef)(null),B=(0,_e.useRef)(!1),A=(0,_e.useRef)({x:0,y:0}),j=(0,_e.useRef)({x:0,y:0}),U=(0,_e.useRef)(!1),fe=(0,_e.useRef)(0),ge=(0,_e.useCallback)(b=>{if(b.button===2)return;B.current=!0,U.current=!1;let z=N.current;if(!z)return;z.setPointerCapture(b.pointerId);let R=z.getBoundingClientRect();A.current={x:b.clientX,y:b.clientY},j.current={x:b.clientX-R.left,y:b.clientY-R.top}},[]),de=(0,_e.useCallback)(b=>{B.current&&((Math.abs(b.clientX-A.current.x)>3||Math.abs(b.clientY-A.current.y)>3)&&(U.current=!0),U.current&&C({right:Math.max(8,Math.min(window.innerWidth-b.clientX-(44-j.current.x),window.innerWidth-52)),bottom:Math.max(8,Math.min(window.innerHeight-b.clientY-(44-j.current.y),window.innerHeight-52))}))},[]),$=(0,_e.useCallback)(b=>{if(B.current&&(N.current?.releasePointerCapture(b.pointerId),B.current=!1,!U.current)){let z=Date.now(),R=z-fe.current<350;if(fe.current=z,R&&t){s&&P(),t();return}s?P():r(!0)}},[s,t]),P=(0,_e.useCallback)(()=>{a(!0),setTimeout(()=>{r(!1),a(!1)},150)},[]),Y=(0,_e.useCallback)(b=>{b.preventDefault(),b.stopPropagation(),S({x:b.clientX,y:b.clientY})},[]);return(0,_e.useEffect)(()=>{if(!s&&!w)return;let b=z=>{if(!z.target.closest("[data-impakers-fab]")){if(w){S(null);return}s&&P()}};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[s,w,P]),(0,Le.jsxs)(Le.Fragment,{children:[(s||i)&&(0,Le.jsx)("div",{className:je.menuItems,style:{position:"fixed",right:p.right+4/2,bottom:p.bottom+44+8},"data-impakers-debug":"","data-impakers-fab":"",children:[...e].reverse().map((b,z)=>(0,Le.jsxs)("button",{className:`${je.menuItem} ${b.active?je.active:""} ${i?je.menuItemClosing:""}`,style:{animationDelay:i?`${z*30}ms`:`${(e.length-1-z)*40}ms`},onClick:R=>{R.stopPropagation(),n(b.id),P()},type:"button","data-impakers-fab":"","data-impakers-debug":"",children:[b.icon,(0,Le.jsx)("span",{className:je.tooltip,children:b.label}),b.badge&&b.badge>0?(0,Le.jsx)("span",{className:je.badge,children:b.badge>99?"99+":b.badge}):null]},b.id))}),(0,Le.jsx)("button",{ref:N,className:`${je.fab} ${s?je.expanded:""}`,style:{position:"fixed",right:p.right,bottom:p.bottom},onPointerDown:ge,onPointerMove:de,onPointerUp:$,onContextMenu:Y,type:"button","aria-label":"\uD53C\uB4DC\uBC31 \uBA54\uB274","data-impakers-debug":"","data-impakers-fab":"",children:(0,Le.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Le.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,Le.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}),w&&(0,Le.jsx)("div",{style:{position:"fixed",inset:0,zIndex:2147483647},onMouseDown:()=>S(null),"data-impakers-debug":"","data-impakers-fab":"",children:(0,Le.jsx)("div",{className:je.contextMenu,style:{position:"fixed",left:w.x,top:w.y,zIndex:2147483647},onMouseDown:b=>b.stopPropagation(),"data-impakers-fab":"",children:(0,Le.jsx)("button",{className:je.contextMenuItem,onMouseDown:b=>{b.stopPropagation(),S(null),o?.()},type:"button",children:"\uC704\uC82F \uC228\uAE30\uAE30"})})})]})}var Q=require("react"),po=require("react-dom");var Ae=require("react");var dr=`.styles-module__replyWrapper___wuGqO {
1147
1147
  flex-shrink: 0;
1148
1148
  }
1149
1149
 
@@ -1312,7 +1312,7 @@ ${n.stack?.split(`
1312
1312
  .styles-module__replySend___eTc6O svg {
1313
1313
  width: 16px;
1314
1314
  height: 16px;
1315
- }`,lr={replyWrapper:"styles-module__replyWrapper___wuGqO",pendingImage:"styles-module__pendingImage___Sc3K4",pendingRemove:"styles-module__pendingRemove___ftBrZ",pendingFile:"styles-module__pendingFile___ss0Dp",fileIcon:"styles-module__fileIcon___lCxGN",fileInfo:"styles-module__fileInfo___WpCET",fileCardName:"styles-module__fileCardName___0idJU",fileCardSize:"styles-module__fileCardSize___b9sJT",replyArea:"styles-module__replyArea___tmywT",replyInput:"styles-module__replyInput___UAMsE",replyToolbar:"styles-module__replyToolbar___c6TcW",replyTool:"styles-module__replyTool___RBxLW",replySend:"styles-module__replySend___eTc6O",active:"styles-module__active___-Ce1c"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-reply-input-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-reply-input-styles",document.head.appendChild(e)),e.textContent=ar}var he=lr;var Z=require("react/jsx-runtime");function dr(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(0)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`}function cr(e){return e.includes("pdf")?"PDF":e.includes("spreadsheet")||e.includes("excel")||e.includes("csv")?"XLS":e.includes("presentation")||e.includes("powerpoint")?"PPT":e.includes("document")||e.includes("word")?"DOC":e.includes("zip")||e.includes("compressed")||e.includes("archive")?"ZIP":e.includes("video")?"VID":e.includes("audio")?"AUD":"FILE"}function uo({onSend:e,onEscape:n,placeholder:t="Reply...",autoFocus:o=!1}){let[s,r]=(0,Se.useState)(""),[a,i]=(0,Se.useState)(null),[_,k]=(0,Se.useState)(null),[b,C]=(0,Se.useState)(!1),v=(0,Se.useRef)(null),$=(0,Se.useRef)(null),F=s.trim()||a||_,H=(0,Se.useCallback)(()=>{F&&(e(s.trim(),a||void 0,_||void 0),r(""),i(null),k(null),v.current&&(v.current.style.height="auto"))},[s,a,_,F,e]),W=(0,Se.useCallback)(w=>{w.stopPropagation(),!w.nativeEvent.isComposing&&(w.key==="Enter"&&!w.shiftKey&&(w.preventDefault(),H()),w.key==="Escape"&&n?.())},[H,n]),ce=(0,Se.useCallback)(()=>{C(!0);let w=document.querySelectorAll("[data-impakers-debug], [data-annotation-marker]");w.forEach(M=>M.style.visibility="hidden"),document.documentElement.classList.add("impakers-selecting");let I=null,O=M=>{I||(I=document.createElement("div"),I.style.cssText="position:fixed;border:2px solid #3b82f6;background:rgba(59,130,246,0.05);border-radius:4px;pointer-events:none;z-index:999999;transition:all 0.08s ease",document.body.appendChild(I)),I.style.left=`${M.left}px`,I.style.top=`${M.top}px`,I.style.width=`${M.width}px`,I.style.height=`${M.height}px`},x=()=>{document.removeEventListener("mousemove",A),document.removeEventListener("click",q,!0),document.removeEventListener("keydown",E),document.documentElement.classList.remove("impakers-selecting"),I?.remove(),w.forEach(M=>M.style.visibility=""),C(!1)},A=M=>{let J=document.elementFromPoint(M.clientX,M.clientY);!J||J===I||O(J.getBoundingClientRect())},E=M=>{M.key==="Escape"&&x()},q=async M=>{M.preventDefault(),M.stopPropagation(),M.stopImmediatePropagation();let J=document.elementFromPoint(M.clientX,M.clientY);if(x(),!!J){try{let se=await Pn(J);i(se)}catch(se){console.error("[@impakers/debug] DOM \uC2A4\uD06C\uB9B0\uC0F7 \uC2E4\uD328:",se)}v.current?.focus()}};document.addEventListener("mousemove",A),document.addEventListener("click",q,!0),document.addEventListener("keydown",E)},[]),pe=(0,Se.useCallback)(()=>{$.current?.click()},[]),T=(0,Se.useCallback)(w=>{let I=w.target.files?.[0];if(I){if(I.size>4.5*1024*1024){console.warn("[@impakers/debug] \uD30C\uC77C \uD06C\uAE30\uAC00 4.5MB\uB97C \uCD08\uACFC\uD569\uB2C8\uB2E4."),w.target.value="";return}if(I.type.startsWith("image/")){k(null);let O=new FileReader;O.onload=()=>i(O.result),O.readAsDataURL(I)}else i(null),k(I);w.target.value=""}},[]);return(0,Z.jsxs)("div",{className:he.replyWrapper,"data-impakers-debug":"",children:[a&&(0,Z.jsxs)("div",{className:he.pendingImage,children:[(0,Z.jsx)("img",{src:a,alt:"pending"}),(0,Z.jsx)("button",{className:he.pendingRemove,onClick:()=>i(null),type:"button",children:"\xD7"})]}),_&&(0,Z.jsxs)("div",{className:he.pendingFile,children:[(0,Z.jsx)("span",{className:he.fileIcon,children:cr(_.type)}),(0,Z.jsxs)("span",{className:he.fileInfo,children:[(0,Z.jsx)("span",{className:he.fileCardName,children:_.name}),(0,Z.jsx)("span",{className:he.fileCardSize,children:dr(_.size)})]}),(0,Z.jsx)("button",{className:he.pendingRemove,onClick:()=>k(null),type:"button",children:"\xD7"})]}),(0,Z.jsx)("div",{className:he.replyArea,children:(0,Z.jsx)("textarea",{ref:v,className:he.replyInput,placeholder:t,value:s,onChange:w=>{r(w.target.value);let I=w.target;I.style.height="auto",I.style.height=`${Math.min(I.scrollHeight,120)}px`},onKeyDown:W,rows:2,autoFocus:o})}),(0,Z.jsxs)("div",{className:he.replyToolbar,children:[(0,Z.jsx)("button",{className:he.replyTool,onClick:pe,type:"button",title:"\uD30C\uC77C \uCCA8\uBD80",children:(0,Z.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Z.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,Z.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}),(0,Z.jsx)("button",{className:he.replyTool,onClick:ce,type:"button",title:"\uC694\uC18C \uC2A4\uD06C\uB9B0\uC0F7",children:(0,Z.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Z.jsx)("path",{d:"M14.5 4h-5L7 7H4a2 2 0 00-2 2v9a2 2 0 002 2h16a2 2 0 002-2V9a2 2 0 00-2-2h-3l-2.5-3z"}),(0,Z.jsx)("circle",{cx:"12",cy:"13",r:"3"})]})}),(0,Z.jsx)("button",{className:`${he.replySend} ${F?he.active:""}`,onClick:H,disabled:!F,type:"button",title:"\uC804\uC1A1",children:(0,Z.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Z.jsx)("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),(0,Z.jsx)("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]}),(0,Z.jsx)("input",{ref:$,type:"file",accept:"*/*",style:{display:"none"},onChange:T})]})}var ur=`@keyframes styles-module__slideIn___0o0s- {
1315
+ }`,cr={replyWrapper:"styles-module__replyWrapper___wuGqO",pendingImage:"styles-module__pendingImage___Sc3K4",pendingRemove:"styles-module__pendingRemove___ftBrZ",pendingFile:"styles-module__pendingFile___ss0Dp",fileIcon:"styles-module__fileIcon___lCxGN",fileInfo:"styles-module__fileInfo___WpCET",fileCardName:"styles-module__fileCardName___0idJU",fileCardSize:"styles-module__fileCardSize___b9sJT",replyArea:"styles-module__replyArea___tmywT",replyInput:"styles-module__replyInput___UAMsE",replyToolbar:"styles-module__replyToolbar___c6TcW",replyTool:"styles-module__replyTool___RBxLW",replySend:"styles-module__replySend___eTc6O",active:"styles-module__active___-Ce1c"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-reply-input-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-reply-input-styles",document.head.appendChild(e)),e.textContent=dr}var Ce=cr;var X=require("react/jsx-runtime");function ur(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(0)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`}function _r(e){return e.includes("pdf")?"PDF":e.includes("spreadsheet")||e.includes("excel")||e.includes("csv")?"XLS":e.includes("presentation")||e.includes("powerpoint")?"PPT":e.includes("document")||e.includes("word")?"DOC":e.includes("zip")||e.includes("compressed")||e.includes("archive")?"ZIP":e.includes("video")?"VID":e.includes("audio")?"AUD":"FILE"}function mo({onSend:e,onEscape:n,placeholder:o="Reply...",autoFocus:t=!1}){let[s,r]=(0,Ae.useState)(""),[i,a]=(0,Ae.useState)(null),[p,C]=(0,Ae.useState)(null),[w,S]=(0,Ae.useState)(!1),N=(0,Ae.useRef)(null),B=(0,Ae.useRef)(null),A=s.trim()||i||p,j=(0,Ae.useCallback)(()=>{A&&(e(s.trim(),i||void 0,p||void 0),r(""),a(null),C(null),N.current&&(N.current.style.height="auto"))},[s,i,p,A,e]),U=(0,Ae.useCallback)($=>{$.stopPropagation(),!$.nativeEvent.isComposing&&($.key==="Enter"&&!$.shiftKey&&($.preventDefault(),j()),$.key==="Escape"&&n?.())},[j,n]),fe=(0,Ae.useCallback)(()=>{S(!0);let $=document.querySelectorAll("[data-impakers-debug], [data-annotation-marker]");$.forEach(M=>M.style.visibility="hidden"),document.documentElement.classList.add("impakers-selecting");let P=null,Y=M=>{P||(P=document.createElement("div"),P.style.cssText="position:fixed;border:2px solid #3b82f6;background:rgba(59,130,246,0.05);border-radius:4px;pointer-events:none;z-index:999999;transition:all 0.08s ease",document.body.appendChild(P)),P.style.left=`${M.left}px`,P.style.top=`${M.top}px`,P.style.width=`${M.width}px`,P.style.height=`${M.height}px`},b=()=>{document.removeEventListener("mousemove",z),document.removeEventListener("click",he,!0),document.removeEventListener("keydown",R),document.documentElement.classList.remove("impakers-selecting"),P?.remove(),$.forEach(M=>M.style.visibility=""),S(!1)},z=M=>{let ee=document.elementFromPoint(M.clientX,M.clientY);!ee||ee===P||Y(ee.getBoundingClientRect())},R=M=>{M.key==="Escape"&&b()},he=async M=>{M.preventDefault(),M.stopPropagation(),M.stopImmediatePropagation();let ee=document.elementFromPoint(M.clientX,M.clientY);if(b(),!!ee){try{let re=await Vn(ee);a(re)}catch(re){console.error("[@impakers/debug] DOM \uC2A4\uD06C\uB9B0\uC0F7 \uC2E4\uD328:",re)}N.current?.focus()}};document.addEventListener("mousemove",z),document.addEventListener("click",he,!0),document.addEventListener("keydown",R)},[]),ge=(0,Ae.useCallback)(()=>{B.current?.click()},[]),de=(0,Ae.useCallback)($=>{let P=$.target.files?.[0];if(P){if(P.size>4.5*1024*1024){console.warn("[@impakers/debug] \uD30C\uC77C \uD06C\uAE30\uAC00 4.5MB\uB97C \uCD08\uACFC\uD569\uB2C8\uB2E4."),$.target.value="";return}if(P.type.startsWith("image/")){C(null);let Y=new FileReader;Y.onload=()=>a(Y.result),Y.readAsDataURL(P)}else a(null),C(P);$.target.value=""}},[]);return(0,X.jsxs)("div",{className:Ce.replyWrapper,"data-impakers-debug":"",children:[i&&(0,X.jsxs)("div",{className:Ce.pendingImage,children:[(0,X.jsx)("img",{src:i,alt:"pending"}),(0,X.jsx)("button",{className:Ce.pendingRemove,onClick:()=>a(null),type:"button",children:"\xD7"})]}),p&&(0,X.jsxs)("div",{className:Ce.pendingFile,children:[(0,X.jsx)("span",{className:Ce.fileIcon,children:_r(p.type)}),(0,X.jsxs)("span",{className:Ce.fileInfo,children:[(0,X.jsx)("span",{className:Ce.fileCardName,children:p.name}),(0,X.jsx)("span",{className:Ce.fileCardSize,children:ur(p.size)})]}),(0,X.jsx)("button",{className:Ce.pendingRemove,onClick:()=>C(null),type:"button",children:"\xD7"})]}),(0,X.jsx)("div",{className:Ce.replyArea,children:(0,X.jsx)("textarea",{ref:N,className:Ce.replyInput,placeholder:o,value:s,onChange:$=>{r($.target.value);let P=$.target;P.style.height="auto",P.style.height=`${Math.min(P.scrollHeight,120)}px`},onKeyDown:U,rows:2,autoFocus:t})}),(0,X.jsxs)("div",{className:Ce.replyToolbar,children:[(0,X.jsx)("button",{className:Ce.replyTool,onClick:ge,type:"button",title:"\uD30C\uC77C \uCCA8\uBD80",children:(0,X.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,X.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,X.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}),(0,X.jsx)("button",{className:Ce.replyTool,onClick:fe,type:"button",title:"\uC694\uC18C \uC2A4\uD06C\uB9B0\uC0F7",children:(0,X.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,X.jsx)("path",{d:"M14.5 4h-5L7 7H4a2 2 0 00-2 2v9a2 2 0 002 2h16a2 2 0 002-2V9a2 2 0 00-2-2h-3l-2.5-3z"}),(0,X.jsx)("circle",{cx:"12",cy:"13",r:"3"})]})}),(0,X.jsx)("button",{className:`${Ce.replySend} ${A?Ce.active:""}`,onClick:j,disabled:!A,type:"button",title:"\uC804\uC1A1",children:(0,X.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,X.jsx)("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),(0,X.jsx)("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]}),(0,X.jsx)("input",{ref:B,type:"file",accept:"*/*",style:{display:"none"},onChange:de})]})}var mr=`@keyframes styles-module__slideIn___0o0s- {
1316
1316
  from {
1317
1317
  transform: translateX(100%);
1318
1318
  }
@@ -2380,7 +2380,7 @@ ${n.stack?.split(`
2380
2380
  white-space: nowrap;
2381
2381
  overflow: hidden;
2382
2382
  text-overflow: ellipsis;
2383
- }`,_r={backdrop:"styles-module__backdrop___zYhcU",fadeIn:"styles-module__fadeIn___j09Ts",panel:"styles-module__panel___6YS8k",slideIn:"styles-module__slideIn___0o0s-",exiting:"styles-module__exiting___6A-Ag",slideOut:"styles-module__slideOut___nKrBX",header:"styles-module__header___fBbGz",headerLeft:"styles-module__headerLeft___e0YLf",headerTitle:"styles-module__headerTitle___oEPJa",closeBtn:"styles-module__closeBtn___-H8ra",tabs:"styles-module__tabs___nfuX7",tab:"styles-module__tab___Hc-jn",active:"styles-module__active___ZQzA5",tabBadge:"styles-module__tabBadge___IdFDQ",statusFilter:"styles-module__statusFilter___qtBXs",filterChip:"styles-module__filterChip___l2s74",filterCount:"styles-module__filterCount___KukiQ",content:"styles-module__content___L2lRw",card:"styles-module__card___F8qwd",cardHeader:"styles-module__cardHeader___QOVGR",cardAvatar:"styles-module__cardAvatar___FfKmW",cardInfo:"styles-module__cardInfo___BmrdF",cardMeta:"styles-module__cardMeta___7p9KD",cardAuthor:"styles-module__cardAuthor___YvnuR",cardTime:"styles-module__cardTime___N1Png",cardActions:"styles-module__cardActions___7QF72",cardAction:"styles-module__cardAction___t4b3V",cardTitle:"styles-module__cardTitle___xJxDN",cardScreenshot:"styles-module__cardScreenshot___I5-QL",cardRoute:"styles-module__cardRoute___U4gB6",cardRoutePath:"styles-module__cardRoutePath___zP-fh",cardRouteIcon:"styles-module__cardRouteIcon___SBqGj",cardRouteName:"styles-module__cardRouteName___BDH75",cardStatusTime:"styles-module__cardStatusTime___S62W1",cardFooter:"styles-module__cardFooter___wfPa4",cardReplyDot:"styles-module__cardReplyDot___YnqzI",cardReplyCount:"styles-module__cardReplyCount___O1khL",statusDot:"styles-module__statusDot___l4IHG",todo:"styles-module__todo___894P6",inProgress:"styles-module__inProgress___IZ1mJ",done:"styles-module__done___n4cWP",empty:"styles-module__empty___IADrw",emptyIcon:"styles-module__emptyIcon___1x5wT",checkBtn:"styles-module__checkBtn___KjHxm",checked:"styles-module__checked___8pype",cardDone:"styles-module__cardDone___-m4w-",backBtn:"styles-module__backBtn___PTIAl",detailView:"styles-module__detailView___36cvH",detailHeader:"styles-module__detailHeader___Hepgq",detailTitle:"styles-module__detailTitle___7TvrX",detailScreenshot:"styles-module__detailScreenshot___UPF0f",commentsList:"styles-module__commentsList___5Uigg",commentItem:"styles-module__commentItem___5u78u",commentAvatar:"styles-module__commentAvatar___OatKg",commentBody:"styles-module__commentBody___gmv1J",commentMeta:"styles-module__commentMeta___JNJa3",commentAuthorName:"styles-module__commentAuthorName___XNVRk",commentTime:"styles-module__commentTime___CokGf",commentContent:"styles-module__commentContent___yMiLR",loadingComments:"styles-module__loadingComments___zpATD",noComments:"styles-module__noComments___kvl90",replyBox:"styles-module__replyBox___FO-XS",replyInput:"styles-module__replyInput___k8C9e",sendBtn:"styles-module__sendBtn___pBzWa",commentImage:"styles-module__commentImage___LuH8X",commentFileCard:"styles-module__commentFileCard___XE44y",commentFileIcon:"styles-module__commentFileIcon___G58-y",commentFileInfo:"styles-module__commentFileInfo___OFIhR",commentFileName:"styles-module__commentFileName___NUoII",commentFileSize:"styles-module__commentFileSize___sokU8",filePreviewOverlay:"styles-module__filePreviewOverlay___5RxYd",filePreviewModal:"styles-module__filePreviewModal___MGJLW",filePreviewHeader:"styles-module__filePreviewHeader___E9SWJ",filePreviewName:"styles-module__filePreviewName___z8t-L",filePreviewActions:"styles-module__filePreviewActions___weizo",filePreviewOpen:"styles-module__filePreviewOpen___JpaEs",filePreviewClose:"styles-module__filePreviewClose___TFcbr",filePreviewBody:"styles-module__filePreviewBody___gwg1S",filePreviewIframe:"styles-module__filePreviewIframe___OQ3Oo",filePreviewFallback:"styles-module__filePreviewFallback___U1rB2",filePreviewFallbackIcon:"styles-module__filePreviewFallbackIcon___0--41",lightbox:"styles-module__lightbox___8CDdt",lightboxClose:"styles-module__lightboxClose___VGfjh",historyFilter:"styles-module__historyFilter___IoWL4",historyDateWrap:"styles-module__historyDateWrap___reBzb",filterChipClear:"styles-module__filterChipClear___Sx4c3",datePopover:"styles-module__datePopover___AYzLr",dateInput:"styles-module__dateInput___Ofr3Y",historyItem:"styles-module__historyItem___G4kbt",historyDot:"styles-module__historyDot___0z439",historyDot_created:"styles-module__historyDot_created___G-qjM",historyDot_status_changed:"styles-module__historyDot_status_changed___jsanw",historyDot_comment_added:"styles-module__historyDot_comment_added___5-lrl",historyBody:"styles-module__historyBody___i-k1p",historyStatusChange:"styles-module__historyStatusChange___1l8GK",historyStatusBadge:"styles-module__historyStatusBadge___H72NB",status_todo:"styles-module__status_todo___CsneX",status_in_progress:"styles-module__status_in_progress___7-R87",status_done:"styles-module__status_done___0cBE-",historyArrow:"styles-module__historyArrow___gcXso",historyLabel:"styles-module__historyLabel___rfxYN",historyComment:"styles-module__historyComment___U6jkL",historyCommentAuthor:"styles-module__historyCommentAuthor___waQnr",historyCommentContent:"styles-module__historyCommentContent___7hQJ7",historyFooter:"styles-module__historyFooter___RnBO3",historyTime:"styles-module__historyTime___bWpM4",historyRef:"styles-module__historyRef___X8lNJ"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-inbox-panel-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-inbox-panel-styles",document.head.appendChild(e)),e.textContent=ur}var d=_r;var l=require("react/jsx-runtime");function mr({src:e,onClose:n}){return(0,K.useEffect)(()=>{let t=o=>{o.key==="Escape"&&n()};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[n]),(0,l.jsxs)("div",{className:d.lightbox,onClick:n,"data-impakers-debug":"",children:[(0,l.jsx)("img",{src:e,alt:"enlarged",onClick:t=>t.stopPropagation()}),(0,l.jsx)("button",{className:d.lightboxClose,onClick:n,type:"button",children:"\xD7"})]})}function pr(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(0)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`}function mo(e){return e.includes("pdf")?"PDF":e.includes("spreadsheet")||e.includes("excel")||e.includes("csv")?"XLS":e.includes("presentation")||e.includes("powerpoint")?"PPT":e.includes("document")||e.includes("word")?"DOC":e.includes("zip")||e.includes("compressed")||e.includes("archive")?"ZIP":e.includes("video")?"VID":e.includes("audio")?"AUD":"FILE"}function fr(e){let n=e.match(/\/d\/([^/]+)/);return n?n[1]:null}function gr(e,n,t){let o=/\.(pptx?|xlsx?|docx?)$/i.test(e)||n.includes("presentation")||n.includes("powerpoint")||n.includes("spreadsheet")||n.includes("excel")||n.includes("document")||n.includes("word")||n.includes("msword");if(t==="google_drive"){let s=fr(e);if(s)return`https://drive.google.com/file/d/${s}/preview`}return o&&t!=="google_drive"?`https://view.officeapps.live.com/op/embed.aspx?src=${encodeURIComponent(e)}`:n.includes("pdf")?e:null}function hr({fileUrl:e,fileName:n,fileType:t,fileSource:o,onClose:s}){(0,K.useEffect)(()=>{let a=i=>{i.key==="Escape"&&s()};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[s]);let r=gr(e,t,o);return(0,l.jsx)("div",{className:d.filePreviewOverlay,onClick:s,"data-impakers-debug":"",children:(0,l.jsxs)("div",{className:d.filePreviewModal,onClick:a=>a.stopPropagation(),children:[(0,l.jsxs)("div",{className:d.filePreviewHeader,children:[(0,l.jsx)("span",{className:d.filePreviewName,children:n}),(0,l.jsxs)("div",{className:d.filePreviewActions,children:[(0,l.jsxs)("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:d.filePreviewOpen,children:[(0,l.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"14",height:"14",children:[(0,l.jsx)("path",{d:"M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6"}),(0,l.jsx)("polyline",{points:"15 3 21 3 21 9"}),(0,l.jsx)("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]}),"\uC5F4\uAE30"]}),(0,l.jsx)("button",{className:d.filePreviewClose,onClick:s,type:"button",children:"\xD7"})]})]}),(0,l.jsx)("div",{className:d.filePreviewBody,children:r?(0,l.jsx)("iframe",{src:r,className:d.filePreviewIframe,title:n}):(0,l.jsxs)("div",{className:d.filePreviewFallback,children:[(0,l.jsx)("span",{className:d.filePreviewFallbackIcon,children:mo(t)}),(0,l.jsx)("span",{children:"\uBBF8\uB9AC\uBCF4\uAE30\uB97C \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 \uD30C\uC77C \uD615\uC2DD\uC785\uB2C8\uB2E4"}),(0,l.jsx)("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:"\uD30C\uC77C \uC5F4\uAE30"})]})})]})})}function Je(e){let n=new Date(e),t=Date.now()-n.getTime(),o=_=>String(_).padStart(2,"0"),s=`${n.getMonth()+1}/${n.getDate()} ${o(n.getHours())}:${o(n.getMinutes())}`,r=Math.floor(t/6e4);if(r<1)return`${s} (\uBC29\uAE08)`;if(r<60)return`${s} (${r}\uBD84 \uC804)`;let a=Math.floor(r/60);if(a<24)return`${s} (${a}\uC2DC\uAC04 \uC804)`;let i=Math.floor(a/24);return`${s} (${i}\uC77C \uC804)`}function at(e){return e.slice(0,1).toUpperCase()}function po({pageItems:e,allItems:n,currentPath:t,serviceName:o,endpoint:s,currentUserName:r,currentUserId:a,onClose:i,onHistoryViewed:_,newNotiCount:k}){let[b,C]=(0,K.useState)("page"),[v,$]=(0,K.useState)("todo"),[F,H]=(0,K.useState)(""),[W,ce]=(0,K.useState)(!1),pe=(0,K.useRef)(null),[T,w]=(0,K.useState)([]),[I,O]=(0,K.useState)(!1),[x,A]=(0,K.useState)(!1),[E,q]=(0,K.useState)(null),[M,J]=(0,K.useState)([]),[se,fe]=(0,K.useState)(!1),[ve,re]=(0,K.useState)(null),[le,h]=(0,K.useState)(null),f=(0,K.useRef)(null),B=(0,K.useCallback)(()=>{if(E){q(null),J([]);return}A(!0),setTimeout(()=>i(),150)},[i,E]),P=(0,K.useCallback)(async m=>{q(m);let ne=Ge(We(m.id));J(ne||[]),fe(!ne)},[s]);(0,K.useEffect)(()=>{if(!E)return;let m=We(E.id),ne=Ge(m);ne&&(J(ne),fe(!1));let Ke=bn(m,Me=>{J(Me),fe(!1)});return zn(s,E.id,{staleWhileRevalidate:!0}).then(Me=>{J(Me),fe(!1)}).catch(()=>{fe(!1)}),Ke},[E,s]),(0,K.useEffect)(()=>{f.current?.scrollIntoView({behavior:"smooth"})},[M.length]),(0,K.useEffect)(()=>{if(!W)return;let m=ne=>{pe.current&&!pe.current.contains(ne.target)&&ce(!1)};return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[W]);let Le=(0,K.useCallback)(async(m,ne,Ke)=>{if(E)try{let Me;if(Ke)try{Me=await jn(s,Ke,"comment",E.id)}catch(nn){console.error("[@impakers/debug] \uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328:",nn)}await Dn(s,E.id,m,r,a,ne,Me)}catch(Me){console.error("[@impakers/debug] \uCF54\uBA58\uD2B8 \uC804\uC1A1 \uC2E4\uD328:",Me)}},[E,s,r,a]),Ne=b==="page"?e:b==="all"?n:[],Re=Ne.filter(m=>m.status===v),G=Ne.filter(m=>m.status==="todo").length,Ie=Ne.filter(m=>m.status==="in_progress").length,ge=Ne.filter(m=>m.status==="done").length;return(0,K.useEffect)(()=>{b==="history"&&(O(!0),Wn(s,{date:F||void 0,limit:200}).then(w).catch(()=>w([])).finally(()=>O(!1)))},[b,F,s]),typeof document>"u"?null:(0,_o.createPortal)((0,l.jsxs)("div",{"data-impakers-debug":"",children:[(0,l.jsx)("div",{className:d.backdrop,onClick:B}),(0,l.jsxs)("div",{className:`${d.panel} ${x?d.exiting:""}`,"data-impakers-debug":"",children:[(0,l.jsxs)("div",{className:d.header,children:[(0,l.jsxs)("div",{className:d.headerLeft,children:[E&&(0,l.jsx)("button",{className:d.backBtn,onClick:B,type:"button",children:(0,l.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"16",height:"16",children:(0,l.jsx)("polyline",{points:"15 18 9 12 15 6"})})}),(0,l.jsx)("span",{className:d.headerTitle,children:E?"\uD53C\uB4DC\uBC31 \uC0C1\uC138":o||"Feedback"})]}),(0,l.jsx)("button",{className:d.closeBtn,onClick:()=>{A(!0),setTimeout(()=>i(),150)},type:"button",children:(0,l.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,l.jsx)("path",{d:"M18 6L6 18M6 6l12 12"})})})]}),E?(0,l.jsxs)("div",{className:d.detailView,children:[(0,l.jsxs)("div",{className:d.detailHeader,children:[(0,l.jsx)("div",{className:d.cardAvatar,children:at(E.authorName)}),(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:d.cardMeta,children:[(0,l.jsx)("span",{className:d.cardAuthor,children:E.authorName}),(0,l.jsx)("span",{className:d.cardTime,children:Je(E.createdAt)})]}),(0,l.jsx)("div",{className:d.detailTitle,children:E.title.replace(/^\[피드백\]\s*/,"")})]})]}),E.screenshot&&(0,l.jsx)("div",{className:d.detailScreenshot,children:(0,l.jsx)("img",{src:E.screenshot,alt:"screenshot"})}),(0,l.jsxs)("div",{className:d.commentsList,children:[se&&(0,l.jsx)(Vn,{message:"\uB313\uAE00 \uB85C\uB529 \uC911..."}),!se&&M.length===0&&(0,l.jsx)("div",{className:d.noComments,children:"\uC544\uC9C1 \uB313\uAE00\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"}),M.map(m=>(0,l.jsxs)("div",{className:d.commentItem,children:[(0,l.jsx)("div",{className:d.commentAvatar,style:{width:22,height:22,fontSize:10},children:at(m.authorName)}),(0,l.jsxs)("div",{className:d.commentBody,children:[(0,l.jsxs)("div",{className:d.commentMeta,children:[(0,l.jsx)("span",{className:d.commentAuthorName,children:m.authorName}),(0,l.jsx)("span",{className:d.commentTime,children:Je(m.createdAt)})]}),m.content&&(0,l.jsx)("div",{className:d.commentContent,children:m.content}),m.imageUrl&&(0,l.jsx)("div",{className:d.commentImage,onClick:ne=>{ne.stopPropagation(),re(m.imageUrl)},children:(0,l.jsx)("img",{src:m.imageUrl,alt:"attachment"})}),m.fileUrl&&(0,l.jsxs)("div",{className:d.commentFileCard,onClick:ne=>{ne.stopPropagation(),h({url:m.fileUrl,name:m.fileName||"\uD30C\uC77C",type:m.fileType||"",source:m.fileSource})},children:[(0,l.jsx)("span",{className:d.commentFileIcon,children:mo(m.fileType||"")}),(0,l.jsxs)("span",{className:d.commentFileInfo,children:[(0,l.jsx)("span",{className:d.commentFileName,children:m.fileName||"\uD30C\uC77C"}),m.fileSize!=null&&(0,l.jsx)("span",{className:d.commentFileSize,children:pr(m.fileSize)})]})]})]})]},m.id)),(0,l.jsx)("div",{ref:f})]}),(0,l.jsx)(uo,{onSend:Le,onEscape:B,autoFocus:!0})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:d.tabs,children:[(0,l.jsxs)("button",{className:`${d.tab} ${b==="page"?d.active:""}`,onClick:()=>C("page"),type:"button",children:["This Page",e.length>0&&(0,l.jsx)("span",{className:d.tabBadge,children:e.length})]}),(0,l.jsxs)("button",{className:`${d.tab} ${b==="all"?d.active:""}`,onClick:()=>C("all"),type:"button",children:["All",n.length>0&&(0,l.jsx)("span",{className:d.tabBadge,children:n.length})]}),(0,l.jsxs)("button",{className:`${d.tab} ${b==="history"?d.active:""}`,onClick:()=>{C("history"),_?.()},type:"button",children:["History",k&&k>0?(0,l.jsx)("span",{className:d.tabBadge,children:k}):null]})]}),b==="history"?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:d.historyFilter,children:[(0,l.jsxs)("div",{className:d.historyDateWrap,ref:pe,children:[(0,l.jsxs)("button",{className:`${d.filterChip} ${F?d.active:""}`,onClick:()=>ce(m=>!m),type:"button",children:[(0,l.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"13",height:"13",children:[(0,l.jsx)("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2",ry:"2"}),(0,l.jsx)("line",{x1:"16",y1:"2",x2:"16",y2:"6"}),(0,l.jsx)("line",{x1:"8",y1:"2",x2:"8",y2:"6"}),(0,l.jsx)("line",{x1:"3",y1:"10",x2:"21",y2:"10"})]}),F?`${new Date(F).getMonth()+1}/${new Date(F).getDate()}`:"\uB0A0\uC9DC"]}),W&&(0,l.jsx)("div",{className:d.datePopover,children:(0,l.jsx)("input",{type:"date",value:F,onChange:m=>{H(m.target.value),ce(!1)},className:d.dateInput,autoFocus:!0})})]}),F&&(0,l.jsx)("button",{className:d.filterChipClear,onClick:()=>H(""),type:"button",title:"\uD544\uD130 \uCD08\uAE30\uD654",children:"\xD7"})]}),(0,l.jsx)("div",{className:d.content,children:I?(0,l.jsx)("div",{className:d.empty,children:"\uB85C\uB529 \uC911..."}):T.length===0?(0,l.jsxs)("div",{className:d.empty,children:[(0,l.jsx)("div",{className:d.emptyIcon,children:(0,l.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,l.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,l.jsx)("polyline",{points:"12 6 12 12 16 14"})]})}),"\uD788\uC2A4\uD1A0\uB9AC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4"]}):T.map((m,ne)=>(0,l.jsxs)("div",{className:d.historyItem,children:[(0,l.jsx)("div",{className:`${d.historyDot} ${d[`historyDot_${m.action}`]}`}),(0,l.jsxs)("div",{className:d.historyBody,children:[m.action==="status_changed"&&(0,l.jsxs)("div",{className:d.historyStatusChange,children:[(0,l.jsx)("span",{className:`${d.historyStatusBadge} ${d[`status_${m.fromStatus}`]}`,children:m.fromStatus==="todo"?"\uB300\uAE30":m.fromStatus==="in_progress"?"\uC9C4\uD589\uC911":"\uC644\uB8CC"}),(0,l.jsx)("span",{className:d.historyArrow,children:"\u2192"}),(0,l.jsx)("span",{className:`${d.historyStatusBadge} ${d[`status_${m.toStatus}`]}`,children:m.toStatus==="todo"?"\uB300\uAE30":m.toStatus==="in_progress"?"\uC9C4\uD589\uC911":"\uC644\uB8CC"})]}),m.action==="created"&&(0,l.jsxs)("div",{className:d.historyStatusChange,children:[(0,l.jsx)("span",{className:d.historyLabel,children:"\uC0DD\uC131"}),(0,l.jsx)("span",{className:`${d.historyStatusBadge} ${d.status_todo}`,children:"\uB300\uAE30"})]}),m.action==="comment_added"&&(0,l.jsxs)("div",{className:d.historyComment,children:[(0,l.jsx)("span",{className:d.historyCommentAuthor,children:m.actorName||"\uC775\uBA85"}),m.metadata?.content&&(0,l.jsx)("span",{className:d.historyCommentContent,children:String(m.metadata.content).slice(0,100)})]}),(0,l.jsxs)("div",{className:d.historyFooter,children:[(0,l.jsx)("span",{className:d.historyTime,children:Je(m.createdAt)}),(0,l.jsx)("span",{className:d.historyRef,children:(m.taskTitle||"").replace(/^\[피드백\]\s*/,"")})]})]})]},`${m.id}-${m.action}-${ne}`))})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:d.statusFilter,children:[(0,l.jsxs)("button",{className:`${d.filterChip} ${v==="todo"?d.active:""}`,onClick:()=>$("todo"),type:"button",children:["\uC9C4\uD589\uC804",G>0&&(0,l.jsx)("span",{className:d.filterCount,children:G})]}),(0,l.jsxs)("button",{className:`${d.filterChip} ${v==="in_progress"?d.active:""}`,onClick:()=>$("in_progress"),type:"button",children:["\uC9C4\uD589\uC911",Ie>0&&(0,l.jsx)("span",{className:d.filterCount,children:Ie})]}),(0,l.jsxs)("button",{className:`${d.filterChip} ${v==="done"?d.active:""}`,onClick:()=>$("done"),type:"button",children:["\uC644\uB8CC",ge>0&&(0,l.jsx)("span",{className:d.filterCount,children:ge})]})]}),(0,l.jsx)("div",{className:d.content,children:Re.length===0?(0,l.jsxs)("div",{className:d.empty,children:[(0,l.jsx)("div",{className:d.emptyIcon,children:(0,l.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:(0,l.jsx)("path",{d:"M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z"})})}),b==="page"?"\uC774 \uD398\uC774\uC9C0\uC5D0 \uD53C\uB4DC\uBC31\uC774 \uC5C6\uC2B5\uB2C8\uB2E4":"\uD53C\uB4DC\uBC31\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"]}):Re.map(m=>(0,l.jsxs)("div",{className:`${d.card} ${m.status==="done"?d.cardDone:""}`,onClick:()=>P(m),children:[(0,l.jsxs)("div",{className:d.cardHeader,children:[(0,l.jsx)("div",{className:d.cardAvatar,children:at(m.authorName)}),(0,l.jsx)("div",{className:d.cardInfo,children:(0,l.jsxs)("div",{className:d.cardMeta,children:[(0,l.jsx)("span",{className:d.cardAuthor,children:m.authorName}),(0,l.jsx)("span",{className:d.cardTime,children:Je(m.createdAt)})]})})]}),(0,l.jsx)("div",{className:d.cardTitle,children:m.title.replace(/^\[피드백\]\s*/,"")}),m.screenshot&&(0,l.jsx)("div",{className:d.cardScreenshot,children:(0,l.jsx)("img",{src:m.screenshot,alt:"screenshot"})}),b==="all"&&m.feedbackUrl&&(0,l.jsxs)("div",{className:d.cardRoute,onClick:ne=>{ne.stopPropagation(),window.location.href=m.feedbackUrl},title:"\uD398\uC774\uC9C0\uB85C \uC774\uB3D9",children:[(0,l.jsx)("span",{className:d.cardRoutePath,children:m.feedbackUrl}),(0,l.jsxs)("svg",{className:d.cardRouteIcon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"12",height:"12",children:[(0,l.jsx)("path",{d:"M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6"}),(0,l.jsx)("polyline",{points:"15 3 21 3 21 9"}),(0,l.jsx)("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]})]}),(m.startedAt||m.completedAt)&&(0,l.jsxs)("div",{className:d.cardStatusTime,children:[m.startedAt&&m.status!=="todo"&&(0,l.jsxs)("span",{children:["\uC9C4\uD589 \uC2DC\uC791: ",Je(m.startedAt)]}),m.completedAt&&m.status==="done"&&(0,l.jsxs)("span",{children:["\uC644\uB8CC: ",Je(m.completedAt)]})]}),(0,l.jsxs)("div",{className:d.cardFooter,children:[(0,l.jsx)("span",{className:d.cardReplyDot}),(0,l.jsxs)("span",{className:d.cardReplyCount,children:[m.commentCount," ",m.commentCount===1?"Reply":"Replies"]})]})]},m.id))})]})]})]}),ve&&(0,l.jsx)(mr,{src:ve,onClose:()=>re(null)}),le&&(0,l.jsx)(hr,{fileUrl:le.url,fileName:le.name,fileType:le.type,fileSource:le.source,onClose:()=>h(null)})]}),document.body)}var me=require("react"),fo=require("react-dom");var yr=`@keyframes styles-module__slideIn___Wx-kZ {
2383
+ }`,pr={backdrop:"styles-module__backdrop___zYhcU",fadeIn:"styles-module__fadeIn___j09Ts",panel:"styles-module__panel___6YS8k",slideIn:"styles-module__slideIn___0o0s-",exiting:"styles-module__exiting___6A-Ag",slideOut:"styles-module__slideOut___nKrBX",header:"styles-module__header___fBbGz",headerLeft:"styles-module__headerLeft___e0YLf",headerTitle:"styles-module__headerTitle___oEPJa",closeBtn:"styles-module__closeBtn___-H8ra",tabs:"styles-module__tabs___nfuX7",tab:"styles-module__tab___Hc-jn",active:"styles-module__active___ZQzA5",tabBadge:"styles-module__tabBadge___IdFDQ",statusFilter:"styles-module__statusFilter___qtBXs",filterChip:"styles-module__filterChip___l2s74",filterCount:"styles-module__filterCount___KukiQ",content:"styles-module__content___L2lRw",card:"styles-module__card___F8qwd",cardHeader:"styles-module__cardHeader___QOVGR",cardAvatar:"styles-module__cardAvatar___FfKmW",cardInfo:"styles-module__cardInfo___BmrdF",cardMeta:"styles-module__cardMeta___7p9KD",cardAuthor:"styles-module__cardAuthor___YvnuR",cardTime:"styles-module__cardTime___N1Png",cardActions:"styles-module__cardActions___7QF72",cardAction:"styles-module__cardAction___t4b3V",cardTitle:"styles-module__cardTitle___xJxDN",cardScreenshot:"styles-module__cardScreenshot___I5-QL",cardRoute:"styles-module__cardRoute___U4gB6",cardRoutePath:"styles-module__cardRoutePath___zP-fh",cardRouteIcon:"styles-module__cardRouteIcon___SBqGj",cardRouteName:"styles-module__cardRouteName___BDH75",cardStatusTime:"styles-module__cardStatusTime___S62W1",cardFooter:"styles-module__cardFooter___wfPa4",cardReplyDot:"styles-module__cardReplyDot___YnqzI",cardReplyCount:"styles-module__cardReplyCount___O1khL",statusDot:"styles-module__statusDot___l4IHG",todo:"styles-module__todo___894P6",inProgress:"styles-module__inProgress___IZ1mJ",done:"styles-module__done___n4cWP",empty:"styles-module__empty___IADrw",emptyIcon:"styles-module__emptyIcon___1x5wT",checkBtn:"styles-module__checkBtn___KjHxm",checked:"styles-module__checked___8pype",cardDone:"styles-module__cardDone___-m4w-",backBtn:"styles-module__backBtn___PTIAl",detailView:"styles-module__detailView___36cvH",detailHeader:"styles-module__detailHeader___Hepgq",detailTitle:"styles-module__detailTitle___7TvrX",detailScreenshot:"styles-module__detailScreenshot___UPF0f",commentsList:"styles-module__commentsList___5Uigg",commentItem:"styles-module__commentItem___5u78u",commentAvatar:"styles-module__commentAvatar___OatKg",commentBody:"styles-module__commentBody___gmv1J",commentMeta:"styles-module__commentMeta___JNJa3",commentAuthorName:"styles-module__commentAuthorName___XNVRk",commentTime:"styles-module__commentTime___CokGf",commentContent:"styles-module__commentContent___yMiLR",loadingComments:"styles-module__loadingComments___zpATD",noComments:"styles-module__noComments___kvl90",replyBox:"styles-module__replyBox___FO-XS",replyInput:"styles-module__replyInput___k8C9e",sendBtn:"styles-module__sendBtn___pBzWa",commentImage:"styles-module__commentImage___LuH8X",commentFileCard:"styles-module__commentFileCard___XE44y",commentFileIcon:"styles-module__commentFileIcon___G58-y",commentFileInfo:"styles-module__commentFileInfo___OFIhR",commentFileName:"styles-module__commentFileName___NUoII",commentFileSize:"styles-module__commentFileSize___sokU8",filePreviewOverlay:"styles-module__filePreviewOverlay___5RxYd",filePreviewModal:"styles-module__filePreviewModal___MGJLW",filePreviewHeader:"styles-module__filePreviewHeader___E9SWJ",filePreviewName:"styles-module__filePreviewName___z8t-L",filePreviewActions:"styles-module__filePreviewActions___weizo",filePreviewOpen:"styles-module__filePreviewOpen___JpaEs",filePreviewClose:"styles-module__filePreviewClose___TFcbr",filePreviewBody:"styles-module__filePreviewBody___gwg1S",filePreviewIframe:"styles-module__filePreviewIframe___OQ3Oo",filePreviewFallback:"styles-module__filePreviewFallback___U1rB2",filePreviewFallbackIcon:"styles-module__filePreviewFallbackIcon___0--41",lightbox:"styles-module__lightbox___8CDdt",lightboxClose:"styles-module__lightboxClose___VGfjh",historyFilter:"styles-module__historyFilter___IoWL4",historyDateWrap:"styles-module__historyDateWrap___reBzb",filterChipClear:"styles-module__filterChipClear___Sx4c3",datePopover:"styles-module__datePopover___AYzLr",dateInput:"styles-module__dateInput___Ofr3Y",historyItem:"styles-module__historyItem___G4kbt",historyDot:"styles-module__historyDot___0z439",historyDot_created:"styles-module__historyDot_created___G-qjM",historyDot_status_changed:"styles-module__historyDot_status_changed___jsanw",historyDot_comment_added:"styles-module__historyDot_comment_added___5-lrl",historyBody:"styles-module__historyBody___i-k1p",historyStatusChange:"styles-module__historyStatusChange___1l8GK",historyStatusBadge:"styles-module__historyStatusBadge___H72NB",status_todo:"styles-module__status_todo___CsneX",status_in_progress:"styles-module__status_in_progress___7-R87",status_done:"styles-module__status_done___0cBE-",historyArrow:"styles-module__historyArrow___gcXso",historyLabel:"styles-module__historyLabel___rfxYN",historyComment:"styles-module__historyComment___U6jkL",historyCommentAuthor:"styles-module__historyCommentAuthor___waQnr",historyCommentContent:"styles-module__historyCommentContent___7hQJ7",historyFooter:"styles-module__historyFooter___RnBO3",historyTime:"styles-module__historyTime___bWpM4",historyRef:"styles-module__historyRef___X8lNJ"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-inbox-panel-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-inbox-panel-styles",document.head.appendChild(e)),e.textContent=mr}var d=pr;var l=require("react/jsx-runtime");function fr({src:e,onClose:n}){return(0,Q.useEffect)(()=>{let o=t=>{t.key==="Escape"&&n()};return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)},[n]),(0,l.jsxs)("div",{className:d.lightbox,onClick:n,"data-impakers-debug":"",children:[(0,l.jsx)("img",{src:e,alt:"enlarged",onClick:o=>o.stopPropagation()}),(0,l.jsx)("button",{className:d.lightboxClose,onClick:n,type:"button",children:"\xD7"})]})}function gr(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(0)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`}function fo(e){return e.includes("pdf")?"PDF":e.includes("spreadsheet")||e.includes("excel")||e.includes("csv")?"XLS":e.includes("presentation")||e.includes("powerpoint")?"PPT":e.includes("document")||e.includes("word")?"DOC":e.includes("zip")||e.includes("compressed")||e.includes("archive")?"ZIP":e.includes("video")?"VID":e.includes("audio")?"AUD":"FILE"}function hr(e){let n=e.match(/\/d\/([^/]+)/);return n?n[1]:null}function yr(e,n,o){let t=/\.(pptx?|xlsx?|docx?)$/i.test(e)||n.includes("presentation")||n.includes("powerpoint")||n.includes("spreadsheet")||n.includes("excel")||n.includes("document")||n.includes("word")||n.includes("msword");if(o==="google_drive"){let s=hr(e);if(s)return`https://drive.google.com/file/d/${s}/preview`}return t&&o!=="google_drive"?`https://view.officeapps.live.com/op/embed.aspx?src=${encodeURIComponent(e)}`:n.includes("pdf")?e:null}function br({fileUrl:e,fileName:n,fileType:o,fileSource:t,onClose:s}){(0,Q.useEffect)(()=>{let i=a=>{a.key==="Escape"&&s()};return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},[s]);let r=yr(e,o,t);return(0,l.jsx)("div",{className:d.filePreviewOverlay,onClick:s,"data-impakers-debug":"",children:(0,l.jsxs)("div",{className:d.filePreviewModal,onClick:i=>i.stopPropagation(),children:[(0,l.jsxs)("div",{className:d.filePreviewHeader,children:[(0,l.jsx)("span",{className:d.filePreviewName,children:n}),(0,l.jsxs)("div",{className:d.filePreviewActions,children:[(0,l.jsxs)("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:d.filePreviewOpen,children:[(0,l.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"14",height:"14",children:[(0,l.jsx)("path",{d:"M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6"}),(0,l.jsx)("polyline",{points:"15 3 21 3 21 9"}),(0,l.jsx)("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]}),"\uC5F4\uAE30"]}),(0,l.jsx)("button",{className:d.filePreviewClose,onClick:s,type:"button",children:"\xD7"})]})]}),(0,l.jsx)("div",{className:d.filePreviewBody,children:r?(0,l.jsx)("iframe",{src:r,className:d.filePreviewIframe,title:n}):(0,l.jsxs)("div",{className:d.filePreviewFallback,children:[(0,l.jsx)("span",{className:d.filePreviewFallbackIcon,children:fo(o)}),(0,l.jsx)("span",{children:"\uBBF8\uB9AC\uBCF4\uAE30\uB97C \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 \uD30C\uC77C \uD615\uC2DD\uC785\uB2C8\uB2E4"}),(0,l.jsx)("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:"\uD30C\uC77C \uC5F4\uAE30"})]})})]})})}function un(e){let n=new Date(e),o=Date.now()-n.getTime(),t=p=>String(p).padStart(2,"0"),s=`${n.getMonth()+1}/${n.getDate()} ${t(n.getHours())}:${t(n.getMinutes())}`,r=Math.floor(o/6e4);if(r<1)return`${s} (\uBC29\uAE08)`;if(r<60)return`${s} (${r}\uBD84 \uC804)`;let i=Math.floor(r/60);if(i<24)return`${s} (${i}\uC2DC\uAC04 \uC804)`;let a=Math.floor(i/24);return`${s} (${a}\uC77C \uC804)`}function gt(e){return e.slice(0,1).toUpperCase()}function go({pageItems:e,allItems:n,currentPath:o,serviceName:t,endpoint:s,currentUserName:r,currentUserId:i,onClose:a,onHistoryViewed:p,newNotiCount:C}){let[w,S]=(0,Q.useState)("page"),[N,B]=(0,Q.useState)("todo"),[A,j]=(0,Q.useState)(""),[U,fe]=(0,Q.useState)(!1),ge=(0,Q.useRef)(null),[de,$]=(0,Q.useState)([]),[P,Y]=(0,Q.useState)(!1),[b,z]=(0,Q.useState)(!1),[R,he]=(0,Q.useState)(null),[M,ee]=(0,Q.useState)([]),[re,Te]=(0,Q.useState)(!1),[Fe,Ie]=(0,Q.useState)(null),[ie,k]=(0,Q.useState)(null),v=(0,Q.useRef)(null),f=(0,Q.useCallback)(()=>{if(R){he(null),ee([]);return}z(!0),setTimeout(()=>a(),150)},[a,R]),L=(0,Q.useCallback)(async m=>{he(m);let K=cn(Ye(m.id));ee(K||[]),Te(!K)},[s]);(0,Q.useEffect)(()=>{if(!R)return;let m=Ye(R.id),K=cn(m);K&&(ee(K),Te(!1));let $e=En(m,be=>{ee(be),Te(!1)});return Xn(s,R.id,{staleWhileRevalidate:!0}).then(be=>{ee(be),Te(!1)}).catch(()=>{Te(!1)}),$e},[R,s]),(0,Q.useEffect)(()=>{v.current?.scrollIntoView({behavior:"smooth"})},[M.length]),(0,Q.useEffect)(()=>{if(!U)return;let m=K=>{ge.current&&!ge.current.contains(K.target)&&fe(!1)};return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[U]);let D=(0,Q.useCallback)(async(m,K,$e)=>{if(R)try{let be;if($e)try{be=await Qn(s,$e,"comment",R.id)}catch(Qe){console.error("[@impakers/debug] \uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328:",Qe)}await Yn(s,R.id,m,r,i,K,be)}catch(be){console.error("[@impakers/debug] \uCF54\uBA58\uD2B8 \uC804\uC1A1 \uC2E4\uD328:",be)}},[R,s,r,i]),ae=w==="page"?e:w==="all"?n:[],ce=ae.filter(m=>m.status===N),F=ae.filter(m=>m.status==="todo").length,ye=ae.filter(m=>m.status==="in_progress").length,ue=ae.filter(m=>m.status==="done").length;return(0,Q.useEffect)(()=>{w==="history"&&(Y(!0),qn(s,{date:A||void 0,limit:200}).then($).catch(()=>$([])).finally(()=>Y(!1)))},[w,A,s]),typeof document>"u"?null:(0,po.createPortal)((0,l.jsxs)("div",{"data-impakers-debug":"",children:[(0,l.jsx)("div",{className:d.backdrop,onClick:f}),(0,l.jsxs)("div",{className:`${d.panel} ${b?d.exiting:""}`,"data-impakers-debug":"",children:[(0,l.jsxs)("div",{className:d.header,children:[(0,l.jsxs)("div",{className:d.headerLeft,children:[R&&(0,l.jsx)("button",{className:d.backBtn,onClick:f,type:"button",children:(0,l.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"16",height:"16",children:(0,l.jsx)("polyline",{points:"15 18 9 12 15 6"})})}),(0,l.jsx)("span",{className:d.headerTitle,children:R?"\uD53C\uB4DC\uBC31 \uC0C1\uC138":t||"Feedback"})]}),(0,l.jsx)("button",{className:d.closeBtn,onClick:()=>{z(!0),setTimeout(()=>a(),150)},type:"button",children:(0,l.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,l.jsx)("path",{d:"M18 6L6 18M6 6l12 12"})})})]}),R?(0,l.jsxs)("div",{className:d.detailView,children:[(0,l.jsxs)("div",{className:d.detailHeader,children:[(0,l.jsx)("div",{className:d.cardAvatar,children:gt(R.authorName)}),(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:d.cardMeta,children:[(0,l.jsx)("span",{className:d.cardAuthor,children:R.authorName}),(0,l.jsx)("span",{className:d.cardTime,children:un(R.createdAt)})]}),(0,l.jsx)("div",{className:d.detailTitle,children:R.title.replace(/^\[피드백\]\s*/,"")})]})]}),R.screenshot&&(0,l.jsx)("div",{className:d.detailScreenshot,children:(0,l.jsx)("img",{src:R.screenshot,alt:"screenshot"})}),(0,l.jsxs)("div",{className:d.commentsList,children:[re&&(0,l.jsx)(Jn,{message:"\uB313\uAE00 \uB85C\uB529 \uC911..."}),!re&&M.length===0&&(0,l.jsx)("div",{className:d.noComments,children:"\uC544\uC9C1 \uB313\uAE00\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"}),M.map(m=>(0,l.jsxs)("div",{className:d.commentItem,children:[(0,l.jsx)("div",{className:d.commentAvatar,style:{width:22,height:22,fontSize:10},children:gt(m.authorName)}),(0,l.jsxs)("div",{className:d.commentBody,children:[(0,l.jsxs)("div",{className:d.commentMeta,children:[(0,l.jsx)("span",{className:d.commentAuthorName,children:m.authorName}),(0,l.jsx)("span",{className:d.commentTime,children:un(m.createdAt)})]}),m.content&&(0,l.jsx)("div",{className:d.commentContent,children:m.content}),m.imageUrl&&(0,l.jsx)("div",{className:d.commentImage,onClick:K=>{K.stopPropagation(),Ie(m.imageUrl)},children:(0,l.jsx)("img",{src:m.imageUrl,alt:"attachment"})}),m.fileUrl&&(0,l.jsxs)("div",{className:d.commentFileCard,onClick:K=>{K.stopPropagation(),k({url:m.fileUrl,name:m.fileName||"\uD30C\uC77C",type:m.fileType||"",source:m.fileSource})},children:[(0,l.jsx)("span",{className:d.commentFileIcon,children:fo(m.fileType||"")}),(0,l.jsxs)("span",{className:d.commentFileInfo,children:[(0,l.jsx)("span",{className:d.commentFileName,children:m.fileName||"\uD30C\uC77C"}),m.fileSize!=null&&(0,l.jsx)("span",{className:d.commentFileSize,children:gr(m.fileSize)})]})]})]})]},m.id)),(0,l.jsx)("div",{ref:v})]}),(0,l.jsx)(mo,{onSend:D,onEscape:f,autoFocus:!0})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:d.tabs,children:[(0,l.jsxs)("button",{className:`${d.tab} ${w==="page"?d.active:""}`,onClick:()=>S("page"),type:"button",children:["This Page",e.length>0&&(0,l.jsx)("span",{className:d.tabBadge,children:e.length})]}),(0,l.jsxs)("button",{className:`${d.tab} ${w==="all"?d.active:""}`,onClick:()=>S("all"),type:"button",children:["All",n.length>0&&(0,l.jsx)("span",{className:d.tabBadge,children:n.length})]}),(0,l.jsxs)("button",{className:`${d.tab} ${w==="history"?d.active:""}`,onClick:()=>{S("history"),p?.()},type:"button",children:["History",C&&C>0?(0,l.jsx)("span",{className:d.tabBadge,children:C}):null]})]}),w==="history"?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:d.historyFilter,children:[(0,l.jsxs)("div",{className:d.historyDateWrap,ref:ge,children:[(0,l.jsxs)("button",{className:`${d.filterChip} ${A?d.active:""}`,onClick:()=>fe(m=>!m),type:"button",children:[(0,l.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"13",height:"13",children:[(0,l.jsx)("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2",ry:"2"}),(0,l.jsx)("line",{x1:"16",y1:"2",x2:"16",y2:"6"}),(0,l.jsx)("line",{x1:"8",y1:"2",x2:"8",y2:"6"}),(0,l.jsx)("line",{x1:"3",y1:"10",x2:"21",y2:"10"})]}),A?`${new Date(A).getMonth()+1}/${new Date(A).getDate()}`:"\uB0A0\uC9DC"]}),U&&(0,l.jsx)("div",{className:d.datePopover,children:(0,l.jsx)("input",{type:"date",value:A,onChange:m=>{j(m.target.value),fe(!1)},className:d.dateInput,autoFocus:!0})})]}),A&&(0,l.jsx)("button",{className:d.filterChipClear,onClick:()=>j(""),type:"button",title:"\uD544\uD130 \uCD08\uAE30\uD654",children:"\xD7"})]}),(0,l.jsx)("div",{className:d.content,children:P?(0,l.jsx)("div",{className:d.empty,children:"\uB85C\uB529 \uC911..."}):de.length===0?(0,l.jsxs)("div",{className:d.empty,children:[(0,l.jsx)("div",{className:d.emptyIcon,children:(0,l.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,l.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,l.jsx)("polyline",{points:"12 6 12 12 16 14"})]})}),"\uD788\uC2A4\uD1A0\uB9AC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4"]}):de.map((m,K)=>(0,l.jsxs)("div",{className:d.historyItem,children:[(0,l.jsx)("div",{className:`${d.historyDot} ${d[`historyDot_${m.action}`]}`}),(0,l.jsxs)("div",{className:d.historyBody,children:[m.action==="status_changed"&&(0,l.jsxs)("div",{className:d.historyStatusChange,children:[(0,l.jsx)("span",{className:`${d.historyStatusBadge} ${d[`status_${m.fromStatus}`]}`,children:m.fromStatus==="todo"?"\uB300\uAE30":m.fromStatus==="in_progress"?"\uC9C4\uD589\uC911":"\uC644\uB8CC"}),(0,l.jsx)("span",{className:d.historyArrow,children:"\u2192"}),(0,l.jsx)("span",{className:`${d.historyStatusBadge} ${d[`status_${m.toStatus}`]}`,children:m.toStatus==="todo"?"\uB300\uAE30":m.toStatus==="in_progress"?"\uC9C4\uD589\uC911":"\uC644\uB8CC"})]}),m.action==="created"&&(0,l.jsxs)("div",{className:d.historyStatusChange,children:[(0,l.jsx)("span",{className:d.historyLabel,children:"\uC0DD\uC131"}),(0,l.jsx)("span",{className:`${d.historyStatusBadge} ${d.status_todo}`,children:"\uB300\uAE30"})]}),m.action==="comment_added"&&(0,l.jsxs)("div",{className:d.historyComment,children:[(0,l.jsx)("span",{className:d.historyCommentAuthor,children:m.actorName||"\uC775\uBA85"}),m.metadata?.content&&(0,l.jsx)("span",{className:d.historyCommentContent,children:String(m.metadata.content).slice(0,100)})]}),(0,l.jsxs)("div",{className:d.historyFooter,children:[(0,l.jsx)("span",{className:d.historyTime,children:un(m.createdAt)}),(0,l.jsx)("span",{className:d.historyRef,children:(m.taskTitle||"").replace(/^\[피드백\]\s*/,"")})]})]})]},`${m.id}-${m.action}-${K}`))})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:d.statusFilter,children:[(0,l.jsxs)("button",{className:`${d.filterChip} ${N==="todo"?d.active:""}`,onClick:()=>B("todo"),type:"button",children:["\uC9C4\uD589\uC804",F>0&&(0,l.jsx)("span",{className:d.filterCount,children:F})]}),(0,l.jsxs)("button",{className:`${d.filterChip} ${N==="in_progress"?d.active:""}`,onClick:()=>B("in_progress"),type:"button",children:["\uC9C4\uD589\uC911",ye>0&&(0,l.jsx)("span",{className:d.filterCount,children:ye})]}),(0,l.jsxs)("button",{className:`${d.filterChip} ${N==="done"?d.active:""}`,onClick:()=>B("done"),type:"button",children:["\uC644\uB8CC",ue>0&&(0,l.jsx)("span",{className:d.filterCount,children:ue})]})]}),(0,l.jsx)("div",{className:d.content,children:ce.length===0?(0,l.jsxs)("div",{className:d.empty,children:[(0,l.jsx)("div",{className:d.emptyIcon,children:(0,l.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:(0,l.jsx)("path",{d:"M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z"})})}),w==="page"?"\uC774 \uD398\uC774\uC9C0\uC5D0 \uD53C\uB4DC\uBC31\uC774 \uC5C6\uC2B5\uB2C8\uB2E4":"\uD53C\uB4DC\uBC31\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"]}):ce.map(m=>(0,l.jsxs)("div",{className:`${d.card} ${m.status==="done"?d.cardDone:""}`,onClick:()=>L(m),children:[(0,l.jsxs)("div",{className:d.cardHeader,children:[(0,l.jsx)("div",{className:d.cardAvatar,children:gt(m.authorName)}),(0,l.jsx)("div",{className:d.cardInfo,children:(0,l.jsxs)("div",{className:d.cardMeta,children:[(0,l.jsx)("span",{className:d.cardAuthor,children:m.authorName}),(0,l.jsx)("span",{className:d.cardTime,children:un(m.createdAt)})]})})]}),(0,l.jsx)("div",{className:d.cardTitle,children:m.title.replace(/^\[피드백\]\s*/,"")}),m.screenshot&&(0,l.jsx)("div",{className:d.cardScreenshot,children:(0,l.jsx)("img",{src:m.screenshot,alt:"screenshot"})}),w==="all"&&m.feedbackUrl&&(0,l.jsxs)("div",{className:d.cardRoute,onClick:K=>{K.stopPropagation(),window.location.href=m.feedbackUrl},title:"\uD398\uC774\uC9C0\uB85C \uC774\uB3D9",children:[(0,l.jsx)("span",{className:d.cardRoutePath,children:m.feedbackUrl}),(0,l.jsxs)("svg",{className:d.cardRouteIcon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"12",height:"12",children:[(0,l.jsx)("path",{d:"M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6"}),(0,l.jsx)("polyline",{points:"15 3 21 3 21 9"}),(0,l.jsx)("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]})]}),(m.startedAt||m.completedAt)&&(0,l.jsxs)("div",{className:d.cardStatusTime,children:[m.startedAt&&m.status!=="todo"&&(0,l.jsxs)("span",{children:["\uC9C4\uD589 \uC2DC\uC791: ",un(m.startedAt)]}),m.completedAt&&m.status==="done"&&(0,l.jsxs)("span",{children:["\uC644\uB8CC: ",un(m.completedAt)]})]}),(0,l.jsxs)("div",{className:d.cardFooter,children:[(0,l.jsx)("span",{className:d.cardReplyDot}),(0,l.jsxs)("span",{className:d.cardReplyCount,children:[m.commentCount," ",m.commentCount===1?"Reply":"Replies"]})]})]},m.id))})]})]})]}),Fe&&(0,l.jsx)(fr,{src:Fe,onClose:()=>Ie(null)}),ie&&(0,l.jsx)(br,{fileUrl:ie.url,fileName:ie.name,fileType:ie.type,fileSource:ie.source,onClose:()=>k(null)})]}),document.body)}var H=require("react"),yo=require("react-dom");var xr=`@keyframes styles-module__slideIn___Wx-kZ {
2384
2384
  from {
2385
2385
  transform: translateX(100%);
2386
2386
  }
@@ -2426,8 +2426,8 @@ ${n.stack?.split(`
2426
2426
  top: 0;
2427
2427
  right: 0;
2428
2428
  bottom: 0;
2429
- width: 420px;
2430
- max-width: 100vw;
2429
+ min-width: 360px;
2430
+ max-width: calc(100vw - 40px);
2431
2431
  background: #fafafa;
2432
2432
  z-index: 100004;
2433
2433
  display: flex;
@@ -2441,11 +2441,24 @@ ${n.stack?.split(`
2441
2441
  animation: styles-module__slideOut___1n8cb 0.15s ease-in forwards;
2442
2442
  }
2443
2443
 
2444
+ .styles-module__resizeHandle___VGNx4 {
2445
+ position: absolute;
2446
+ left: -3px;
2447
+ top: 0;
2448
+ bottom: 0;
2449
+ width: 6px;
2450
+ cursor: col-resize;
2451
+ z-index: 10;
2452
+ }
2453
+ .styles-module__resizeHandle___VGNx4:hover {
2454
+ background: rgba(99, 102, 241, 0.15);
2455
+ }
2456
+
2444
2457
  .styles-module__header___gmriy {
2445
2458
  display: flex;
2446
2459
  align-items: center;
2447
2460
  justify-content: space-between;
2448
- padding: 14px 16px;
2461
+ padding: 12px 14px;
2449
2462
  border-bottom: 1px solid #e5e7eb;
2450
2463
  background: #fff;
2451
2464
  flex-shrink: 0;
@@ -2454,28 +2467,28 @@ ${n.stack?.split(`
2454
2467
  .styles-module__headerLeft___M17Y1 {
2455
2468
  display: flex;
2456
2469
  align-items: center;
2457
- gap: 8px;
2470
+ gap: 6px;
2458
2471
  }
2459
2472
 
2460
2473
  .styles-module__headerIcon___PsSMZ {
2461
- font-size: 16px;
2474
+ font-size: 15px;
2462
2475
  color: #6366f1;
2463
2476
  }
2464
2477
 
2465
2478
  .styles-module__headerTitle___Y96x8 {
2466
- font-size: 14px;
2479
+ font-size: 13px;
2467
2480
  font-weight: 600;
2468
2481
  color: #18181b;
2469
2482
  }
2470
2483
 
2471
2484
  .styles-module__headerActions___-rG09 {
2472
2485
  display: flex;
2473
- gap: 4px;
2486
+ gap: 2px;
2474
2487
  }
2475
2488
 
2476
2489
  .styles-module__headerBtn___eSTQN {
2477
- width: 30px;
2478
- height: 30px;
2490
+ width: 28px;
2491
+ height: 28px;
2479
2492
  border: none;
2480
2493
  background: none;
2481
2494
  cursor: pointer;
@@ -2491,13 +2504,94 @@ ${n.stack?.split(`
2491
2504
  color: #18181b;
2492
2505
  }
2493
2506
 
2507
+ .styles-module__body___bXbbW {
2508
+ flex: 1;
2509
+ display: flex;
2510
+ min-height: 0;
2511
+ }
2512
+
2513
+ .styles-module__sidebar___1NIqu {
2514
+ width: 200px;
2515
+ flex-shrink: 0;
2516
+ border-right: 1px solid #e5e7eb;
2517
+ background: #fff;
2518
+ display: flex;
2519
+ flex-direction: column;
2520
+ overflow: hidden;
2521
+ }
2522
+
2523
+ .styles-module__sidebarHeader___aMgpo {
2524
+ padding: 10px 12px;
2525
+ font-size: 12px;
2526
+ font-weight: 600;
2527
+ color: #6b7280;
2528
+ border-bottom: 1px solid #f3f4f6;
2529
+ flex-shrink: 0;
2530
+ }
2531
+
2532
+ .styles-module__sidebarList___Ob-c6 {
2533
+ flex: 1;
2534
+ overflow-y: auto;
2535
+ padding: 4px;
2536
+ }
2537
+ .styles-module__sidebarList___Ob-c6::-webkit-scrollbar {
2538
+ width: 3px;
2539
+ }
2540
+ .styles-module__sidebarList___Ob-c6::-webkit-scrollbar-thumb {
2541
+ background: #d1d5db;
2542
+ border-radius: 2px;
2543
+ }
2544
+
2545
+ .styles-module__sidebarEmpty___QNq3K {
2546
+ padding: 20px 12px;
2547
+ text-align: center;
2548
+ font-size: 12px;
2549
+ color: #9ca3af;
2550
+ }
2551
+
2552
+ .styles-module__sidebarItem___T8-S5 {
2553
+ display: block;
2554
+ width: 100%;
2555
+ text-align: left;
2556
+ padding: 8px 10px;
2557
+ border: none;
2558
+ background: none;
2559
+ cursor: pointer;
2560
+ border-radius: 6px;
2561
+ transition: background 0.1s;
2562
+ font-family: inherit;
2563
+ }
2564
+ .styles-module__sidebarItem___T8-S5:hover {
2565
+ background: #f3f4f6;
2566
+ }
2567
+
2568
+ .styles-module__sidebarActive___WVtxJ {
2569
+ background: #eef2ff;
2570
+ }
2571
+
2572
+ .styles-module__sidebarTitle___bkPQz {
2573
+ font-size: 12px;
2574
+ color: #1a1a1a;
2575
+ white-space: nowrap;
2576
+ overflow: hidden;
2577
+ text-overflow: ellipsis;
2578
+ line-height: 1.4;
2579
+ }
2580
+
2581
+ .styles-module__sidebarDate___QNxsK {
2582
+ font-size: 11px;
2583
+ color: #9ca3af;
2584
+ margin-top: 2px;
2585
+ }
2586
+
2494
2587
  .styles-module__messages___Al0UY {
2495
2588
  flex: 1;
2496
2589
  overflow-y: auto;
2497
- padding: 16px;
2590
+ padding: 14px;
2498
2591
  display: flex;
2499
2592
  flex-direction: column;
2500
- gap: 16px;
2593
+ gap: 14px;
2594
+ min-width: 0;
2501
2595
  }
2502
2596
  .styles-module__messages___Al0UY::-webkit-scrollbar {
2503
2597
  width: 4px;
@@ -2514,24 +2608,23 @@ ${n.stack?.split(`
2514
2608
  justify-content: center;
2515
2609
  flex: 1;
2516
2610
  text-align: center;
2517
- gap: 8px;
2518
- padding: 40px 20px;
2611
+ gap: 6px;
2612
+ padding: 40px 16px;
2519
2613
  }
2520
2614
 
2521
2615
  .styles-module__welcomeIcon___gd4O6 {
2522
- font-size: 32px;
2616
+ font-size: 28px;
2523
2617
  color: #6366f1;
2524
- margin-bottom: 4px;
2525
2618
  }
2526
2619
 
2527
2620
  .styles-module__welcomeText___-aHqH {
2528
- font-size: 16px;
2621
+ font-size: 15px;
2529
2622
  font-weight: 600;
2530
2623
  color: #18181b;
2531
2624
  }
2532
2625
 
2533
2626
  .styles-module__welcomeHint___zUsgp {
2534
- font-size: 13px;
2627
+ font-size: 12px;
2535
2628
  color: #9ca3af;
2536
2629
  }
2537
2630
 
@@ -2546,7 +2639,7 @@ ${n.stack?.split(`
2546
2639
  .styles-module__message___-0C3Z.styles-module__user___V0NWN .styles-module__msgBody___YMLmR {
2547
2640
  background: #6366f1;
2548
2641
  color: #fff;
2549
- border-radius: 16px 16px 4px 16px;
2642
+ border-radius: 14px 14px 4px 14px;
2550
2643
  max-width: 80%;
2551
2644
  }
2552
2645
  .styles-module__message___-0C3Z.styles-module__user___V0NWN .styles-module__msgContent___ur5dX {
@@ -2555,26 +2648,26 @@ ${n.stack?.split(`
2555
2648
  .styles-module__message___-0C3Z.styles-module__assistant___sS3g4 .styles-module__msgBody___YMLmR {
2556
2649
  background: #fff;
2557
2650
  border: 1px solid #e5e7eb;
2558
- border-radius: 16px 16px 16px 4px;
2559
- max-width: 85%;
2651
+ border-radius: 14px 14px 14px 4px;
2652
+ max-width: 88%;
2560
2653
  }
2561
2654
 
2562
2655
  .styles-module__msgAvatar___AAtdS {
2563
- width: 28px;
2564
- height: 28px;
2656
+ width: 26px;
2657
+ height: 26px;
2565
2658
  border-radius: 50%;
2566
2659
  background: #eef2ff;
2567
2660
  color: #6366f1;
2568
2661
  display: flex;
2569
2662
  align-items: center;
2570
2663
  justify-content: center;
2571
- font-size: 14px;
2664
+ font-size: 13px;
2572
2665
  flex-shrink: 0;
2573
2666
  margin-top: 2px;
2574
2667
  }
2575
2668
 
2576
2669
  .styles-module__msgBody___YMLmR {
2577
- padding: 10px 14px;
2670
+ padding: 10px 13px;
2578
2671
  min-width: 0;
2579
2672
  }
2580
2673
 
@@ -2586,9 +2679,154 @@ ${n.stack?.split(`
2586
2679
  word-break: break-word;
2587
2680
  }
2588
2681
 
2589
- .styles-module__toolCalls___YDi5U {
2682
+ .styles-module__msgImages___xdjr7 {
2590
2683
  display: flex;
2684
+ gap: 6px;
2591
2685
  flex-wrap: wrap;
2686
+ margin-bottom: 6px;
2687
+ }
2688
+
2689
+ .styles-module__msgImage___g9UKr {
2690
+ width: 120px;
2691
+ height: 80px;
2692
+ object-fit: cover;
2693
+ border-radius: 8px;
2694
+ }
2695
+
2696
+ .styles-module__msgMarkdown___2bE27 {
2697
+ font-size: 13px;
2698
+ line-height: 1.65;
2699
+ color: #1a1a1a;
2700
+ word-break: break-word;
2701
+ }
2702
+
2703
+ .styles-module__paragraph___0db50 {
2704
+ margin: 0 0 6px;
2705
+ }
2706
+ .styles-module__paragraph___0db50:last-child {
2707
+ margin-bottom: 0;
2708
+ }
2709
+
2710
+ .styles-module__heading1___ObrLl {
2711
+ font-size: 15px;
2712
+ font-weight: 700;
2713
+ margin: 10px 0 4px;
2714
+ }
2715
+
2716
+ .styles-module__heading2___2GDnb {
2717
+ font-size: 14px;
2718
+ font-weight: 600;
2719
+ margin: 8px 0 4px;
2720
+ }
2721
+
2722
+ .styles-module__heading3___dJGMW {
2723
+ font-size: 13px;
2724
+ font-weight: 600;
2725
+ margin: 6px 0 3px;
2726
+ }
2727
+
2728
+ .styles-module__inlineCode___fXbsw {
2729
+ background: #f3f4f6;
2730
+ color: #e11d48;
2731
+ padding: 1px 5px;
2732
+ border-radius: 4px;
2733
+ font-size: 12px;
2734
+ font-family: "SF Mono", Monaco, Consolas, monospace;
2735
+ }
2736
+
2737
+ .styles-module__codeBlock___77Vmy {
2738
+ position: relative;
2739
+ margin: 8px 0;
2740
+ background: #1e1e1e;
2741
+ border-radius: 8px;
2742
+ overflow: hidden;
2743
+ }
2744
+ .styles-module__codeBlock___77Vmy pre {
2745
+ margin: 0;
2746
+ padding: 12px;
2747
+ overflow-x: auto;
2748
+ font-size: 12px;
2749
+ line-height: 1.5;
2750
+ font-family: "SF Mono", Monaco, Consolas, monospace;
2751
+ }
2752
+ .styles-module__codeBlock___77Vmy pre::-webkit-scrollbar {
2753
+ height: 4px;
2754
+ }
2755
+ .styles-module__codeBlock___77Vmy pre::-webkit-scrollbar-thumb {
2756
+ background: #4b5563;
2757
+ border-radius: 2px;
2758
+ }
2759
+ .styles-module__codeBlock___77Vmy code {
2760
+ color: #e5e7eb;
2761
+ white-space: pre;
2762
+ }
2763
+
2764
+ .styles-module__codeLang___ANUgp {
2765
+ padding: 4px 12px;
2766
+ font-size: 11px;
2767
+ color: #9ca3af;
2768
+ background: #2d2d2d;
2769
+ }
2770
+
2771
+ .styles-module__codeCopy___UKHGh {
2772
+ position: absolute;
2773
+ top: 6px;
2774
+ right: 6px;
2775
+ padding: 3px 8px;
2776
+ font-size: 11px;
2777
+ color: #9ca3af;
2778
+ background: rgba(255, 255, 255, 0.1);
2779
+ border: none;
2780
+ border-radius: 4px;
2781
+ cursor: pointer;
2782
+ font-family: inherit;
2783
+ opacity: 0;
2784
+ transition: opacity 0.12s;
2785
+ }
2786
+ .styles-module__codeBlock___77Vmy:hover .styles-module__codeCopy___UKHGh {
2787
+ opacity: 1;
2788
+ }
2789
+ .styles-module__codeCopy___UKHGh:hover {
2790
+ color: #fff;
2791
+ background: rgba(255, 255, 255, 0.2);
2792
+ }
2793
+
2794
+ .styles-module__expandBtn___9EdJu {
2795
+ display: inline;
2796
+ border: none;
2797
+ background: none;
2798
+ color: #6366f1;
2799
+ font-size: 12px;
2800
+ cursor: pointer;
2801
+ padding: 0;
2802
+ margin-left: 4px;
2803
+ font-family: inherit;
2804
+ }
2805
+ .styles-module__expandBtn___9EdJu:hover {
2806
+ text-decoration: underline;
2807
+ }
2808
+
2809
+ .styles-module__copyBtn___gMgrH {
2810
+ display: inline-flex;
2811
+ align-items: center;
2812
+ gap: 3px;
2813
+ margin-top: 4px;
2814
+ border: none;
2815
+ background: none;
2816
+ color: #9ca3af;
2817
+ font-size: 11px;
2818
+ cursor: pointer;
2819
+ padding: 2px 0;
2820
+ font-family: inherit;
2821
+ transition: color 0.12s;
2822
+ }
2823
+ .styles-module__copyBtn___gMgrH:hover {
2824
+ color: #6366f1;
2825
+ }
2826
+
2827
+ .styles-module__toolCalls___YDi5U {
2828
+ display: flex;
2829
+ flex-direction: column;
2592
2830
  gap: 4px;
2593
2831
  margin-bottom: 8px;
2594
2832
  }
@@ -2621,14 +2859,95 @@ ${n.stack?.split(`
2621
2859
  white-space: nowrap;
2622
2860
  }
2623
2861
 
2862
+ .styles-module__toolMore___MSrrk {
2863
+ font-size: 11px;
2864
+ color: #9ca3af;
2865
+ padding-left: 4px;
2866
+ }
2867
+
2868
+ .styles-module__subBadge___bvbxD {
2869
+ font-size: 9px;
2870
+ font-weight: 600;
2871
+ background: #dbeafe;
2872
+ color: #2563eb;
2873
+ padding: 1px 4px;
2874
+ border-radius: 3px;
2875
+ }
2876
+
2877
+ .styles-module__toolCompact___i-o7k {
2878
+ margin-bottom: 6px;
2879
+ }
2880
+
2881
+ .styles-module__toolCompactToggle___uOgG4 {
2882
+ display: flex;
2883
+ align-items: center;
2884
+ gap: 4px;
2885
+ border: none;
2886
+ background: #f3f4f6;
2887
+ color: #6b7280;
2888
+ font-size: 11px;
2889
+ padding: 4px 8px;
2890
+ border-radius: 6px;
2891
+ cursor: pointer;
2892
+ font-family: inherit;
2893
+ transition: background 0.1s;
2894
+ }
2895
+ .styles-module__toolCompactToggle___uOgG4:hover {
2896
+ background: #e5e7eb;
2897
+ }
2898
+
2899
+ .styles-module__toolCompactIcon___onQV5 {
2900
+ font-size: 10px;
2901
+ }
2902
+
2903
+ .styles-module__toolCompactError___qcqEZ {
2904
+ color: #ef4444;
2905
+ }
2906
+
2907
+ .styles-module__toolCompactSub___awUyk {
2908
+ color: #6b7280;
2909
+ }
2910
+
2911
+ .styles-module__toolCompactList___pumTz {
2912
+ display: flex;
2913
+ flex-direction: column;
2914
+ gap: 2px;
2915
+ margin-top: 4px;
2916
+ padding-left: 8px;
2917
+ }
2918
+
2919
+ .styles-module__toolCompactItem___GN7IT {
2920
+ display: flex;
2921
+ align-items: center;
2922
+ gap: 4px;
2923
+ font-size: 11px;
2924
+ color: #6b7280;
2925
+ }
2926
+ .styles-module__toolCompactItem___GN7IT.styles-module__tool_success___-qmku {
2927
+ color: #16a34a;
2928
+ }
2929
+ .styles-module__toolCompactItem___GN7IT.styles-module__tool_error___tmRla {
2930
+ color: #ef4444;
2931
+ }
2932
+
2933
+ .styles-module__toolSummary___-ultc {
2934
+ font-size: 10px;
2935
+ color: #9ca3af;
2936
+ margin-left: 4px;
2937
+ white-space: nowrap;
2938
+ overflow: hidden;
2939
+ text-overflow: ellipsis;
2940
+ max-width: 150px;
2941
+ }
2942
+
2624
2943
  .styles-module__typing___SxFST {
2625
2944
  display: flex;
2626
2945
  gap: 4px;
2627
2946
  padding: 4px 0;
2628
2947
  }
2629
2948
  .styles-module__typing___SxFST span {
2630
- width: 6px;
2631
- height: 6px;
2949
+ width: 5px;
2950
+ height: 5px;
2632
2951
  border-radius: 50%;
2633
2952
  background: #9ca3af;
2634
2953
  animation: styles-module__typingDot___-XQcu 1.2s infinite;
@@ -2640,21 +2959,107 @@ ${n.stack?.split(`
2640
2959
  animation-delay: 0.4s;
2641
2960
  }
2642
2961
 
2962
+ .styles-module__continueBar___Ox1ee {
2963
+ display: flex;
2964
+ align-items: center;
2965
+ gap: 8px;
2966
+ padding: 8px 12px;
2967
+ background: #fef3c7;
2968
+ border-radius: 8px;
2969
+ font-size: 12px;
2970
+ color: #92400e;
2971
+ }
2972
+ .styles-module__continueBar___Ox1ee button {
2973
+ border: none;
2974
+ background: none;
2975
+ color: #6366f1;
2976
+ font-weight: 600;
2977
+ cursor: pointer;
2978
+ font-size: 12px;
2979
+ font-family: inherit;
2980
+ }
2981
+ .styles-module__continueBar___Ox1ee button:hover {
2982
+ text-decoration: underline;
2983
+ }
2984
+
2985
+ .styles-module__imagePreview___69vle {
2986
+ display: flex;
2987
+ gap: 6px;
2988
+ padding: 8px 14px 0;
2989
+ flex-wrap: wrap;
2990
+ flex-shrink: 0;
2991
+ }
2992
+
2993
+ .styles-module__imageThumb___5-tAx {
2994
+ position: relative;
2995
+ width: 56px;
2996
+ height: 56px;
2997
+ border-radius: 8px;
2998
+ overflow: hidden;
2999
+ border: 1px solid #e5e7eb;
3000
+ }
3001
+ .styles-module__imageThumb___5-tAx img {
3002
+ width: 100%;
3003
+ height: 100%;
3004
+ object-fit: cover;
3005
+ }
3006
+
3007
+ .styles-module__imageRemove___U8lFv {
3008
+ position: absolute;
3009
+ top: 2px;
3010
+ right: 2px;
3011
+ width: 16px;
3012
+ height: 16px;
3013
+ border-radius: 50%;
3014
+ background: rgba(0, 0, 0, 0.6);
3015
+ color: #fff;
3016
+ border: none;
3017
+ cursor: pointer;
3018
+ display: none;
3019
+ align-items: center;
3020
+ justify-content: center;
3021
+ font-size: 12px;
3022
+ line-height: 1;
3023
+ padding: 0;
3024
+ }
3025
+ .styles-module__imageThumb___5-tAx:hover .styles-module__imageRemove___U8lFv {
3026
+ display: flex;
3027
+ }
3028
+
2643
3029
  .styles-module__inputArea___ySM3W {
2644
3030
  display: flex;
2645
3031
  align-items: flex-end;
2646
- gap: 8px;
2647
- padding: 12px 16px;
3032
+ gap: 6px;
3033
+ padding: 10px 14px;
2648
3034
  border-top: 1px solid #e5e7eb;
2649
3035
  background: #fff;
2650
3036
  flex-shrink: 0;
2651
3037
  }
2652
3038
 
3039
+ .styles-module__attachBtn___uvYvg {
3040
+ width: 32px;
3041
+ height: 32px;
3042
+ border: none;
3043
+ background: none;
3044
+ cursor: pointer;
3045
+ display: flex;
3046
+ align-items: center;
3047
+ justify-content: center;
3048
+ border-radius: 8px;
3049
+ color: #9ca3af;
3050
+ flex-shrink: 0;
3051
+ transition: background 0.12s, color 0.12s;
3052
+ }
3053
+ .styles-module__attachBtn___uvYvg:hover {
3054
+ background: #f3f4f6;
3055
+ color: #374151;
3056
+ }
3057
+
2653
3058
  .styles-module__input___UnN4A {
2654
3059
  flex: 1;
2655
3060
  border: 1px solid #e5e7eb;
2656
- border-radius: 12px;
2657
- padding: 10px 14px;
3061
+ border-radius: 10px;
3062
+ padding: 8px 12px;
2658
3063
  font-size: 13px;
2659
3064
  font-family: inherit;
2660
3065
  color: #1a1a1a;
@@ -2676,15 +3081,15 @@ ${n.stack?.split(`
2676
3081
  }
2677
3082
 
2678
3083
  .styles-module__sendBtn___WLa8O {
2679
- width: 36px;
2680
- height: 36px;
3084
+ width: 32px;
3085
+ height: 32px;
2681
3086
  border: none;
2682
3087
  background: #e5e7eb;
2683
3088
  cursor: pointer;
2684
3089
  display: flex;
2685
3090
  align-items: center;
2686
3091
  justify-content: center;
2687
- border-radius: 10px;
3092
+ border-radius: 8px;
2688
3093
  color: #9ca3af;
2689
3094
  transition: background 0.12s, color 0.12s;
2690
3095
  flex-shrink: 0;
@@ -2695,10 +3100,15 @@ ${n.stack?.split(`
2695
3100
  }
2696
3101
  .styles-module__sendBtn___WLa8O:disabled {
2697
3102
  cursor: not-allowed;
2698
- }`,br={backdrop:"styles-module__backdrop___qExl6",fadeIn:"styles-module__fadeIn___lF-be",panel:"styles-module__panel___ri2CN",slideIn:"styles-module__slideIn___Wx-kZ",exiting:"styles-module__exiting___iE6TS",slideOut:"styles-module__slideOut___1n8cb",header:"styles-module__header___gmriy",headerLeft:"styles-module__headerLeft___M17Y1",headerIcon:"styles-module__headerIcon___PsSMZ",headerTitle:"styles-module__headerTitle___Y96x8",headerActions:"styles-module__headerActions___-rG09",headerBtn:"styles-module__headerBtn___eSTQN",messages:"styles-module__messages___Al0UY",welcome:"styles-module__welcome___7MKNO",welcomeIcon:"styles-module__welcomeIcon___gd4O6",welcomeText:"styles-module__welcomeText___-aHqH",welcomeHint:"styles-module__welcomeHint___zUsgp",message:"styles-module__message___-0C3Z",user:"styles-module__user___V0NWN",msgBody:"styles-module__msgBody___YMLmR",msgContent:"styles-module__msgContent___ur5dX",assistant:"styles-module__assistant___sS3g4",msgAvatar:"styles-module__msgAvatar___AAtdS",toolCalls:"styles-module__toolCalls___YDi5U",toolCall:"styles-module__toolCall___YG3jW",tool_success:"styles-module__tool_success___-qmku",tool_error:"styles-module__tool_error___tmRla",toolIcon:"styles-module__toolIcon___w-g-Z",toolName:"styles-module__toolName___yBXu6",typing:"styles-module__typing___SxFST",typingDot:"styles-module__typingDot___-XQcu",inputArea:"styles-module__inputArea___ySM3W",input:"styles-module__input___UnN4A",sendBtn:"styles-module__sendBtn___WLa8O",active:"styles-module__active___SooZB"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-agent-chat-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-agent-chat-styles",document.head.appendChild(e)),e.textContent=yr}var D=br;var R=require("react/jsx-runtime");function xr(e){return{github_read_file:"\uD30C\uC77C \uC77D\uAE30",github_search_code:"\uCF54\uB4DC \uAC80\uC0C9",github_grep_code:"\uCF54\uB4DC \uB0B4\uC6A9 \uAC80\uC0C9",github_get_tree:"\uB514\uB809\uD1A0\uB9AC \uAD6C\uC870",github_get_commits:"\uCEE4\uBC0B \uC774\uB825",supabase_query_db:"DB \uC870\uD68C",supabase_list_tables:"\uD14C\uC774\uBE14 \uBAA9\uB85D",supabase_get_api_logs:"API \uB85C\uADF8",vercel_get_runtime_logs:"\uB7F0\uD0C0\uC784 \uB85C\uADF8",vercel_get_deployments:"\uBC30\uD3EC \uC774\uB825",spawn_agent:"\uC11C\uBE0C \uC5D0\uC774\uC804\uD2B8"}[e]||e}function go({endpoint:e,onClose:n}){let[t,o]=(0,me.useState)([]),[s,r]=(0,me.useState)(""),[a,i]=(0,me.useState)(!1),[_,k]=(0,me.useState)(()=>{try{return localStorage.getItem("impakers-agent-session")||null}catch{return null}}),[b,C]=(0,me.useState)(!1),v=(0,me.useRef)(null),$=(0,me.useRef)(null),F=(0,me.useRef)(null);(0,me.useEffect)(()=>{v.current?.scrollIntoView({behavior:"smooth"})},[t]),(0,me.useEffect)(()=>{$.current?.focus()},[]);let H=(0,me.useCallback)(()=>{C(!0),setTimeout(()=>n(),150)},[n]),W=(0,me.useCallback)(async()=>{let T=s.trim();if(!T||a)return;let w=dn();if(!w)return;let I={id:`user-${Date.now()}`,role:"user",content:T,createdAt:Date.now()};o(A=>[...A,I]),r(""),i(!0),$.current&&($.current.style.height="auto");let O=`assistant-${Date.now()}`,x={id:O,role:"assistant",content:"",toolCalls:[],createdAt:Date.now()};o(A=>[...A,x]);try{let A=new AbortController;F.current=A;let E=e.replace(/\/api\/external\/feedback\/?$/,""),q=await fetch(`${E}/api/agent`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${w}`},body:JSON.stringify({message:T,agentId:"cs-assistant",sessionId:_||void 0}),signal:A.signal});if(!q.ok){let fe=await q.json().catch(()=>({error:"\uC694\uCCAD \uC2E4\uD328"}));o(ve=>ve.map(re=>re.id===O?{...re,content:`\uC624\uB958: ${fe.error||"\uC694\uCCAD \uC2E4\uD328"}`}:re)),i(!1);return}let M=q.body.getReader(),J=new TextDecoder,se="";for(;;){let{done:fe,value:ve}=await M.read();if(fe)break;se+=J.decode(ve,{stream:!0});let re=se.split(`
2699
- `);se=re.pop()||"";for(let le of re){if(!le.startsWith("data: "))continue;let h=le.slice(6).trim();if(h)try{let f=JSON.parse(h);switch(f.type){case"meta":if(f.conversationId){k(f.conversationId);try{localStorage.setItem("impakers-agent-session",f.conversationId)}catch{}}break;case"content":o(B=>B.map(P=>P.id===O?{...P,content:P.content+(f.content||"")}:P));break;case"tool_call":o(B=>B.map(P=>P.id===O?{...P,toolCalls:[...P.toolCalls||[],{name:f.name||"",input:f.input||{},status:"running"}]}:P));break;case"tool_result":o(B=>B.map(P=>{if(P.id!==O)return P;let Le=[...P.toolCalls||[]],Ne=Le.findLastIndex(Re=>Re.name===f.name&&Re.status==="running");return Ne>=0&&(Le[Ne]={...Le[Ne],status:f.result?.success?"success":"error"}),{...P,toolCalls:Le}}));break;case"error":o(B=>B.map(P=>P.id===O?{...P,content:P.content+`
2700
-
2701
- \uC624\uB958: ${f.error}`}:P));break;case"done":break}}catch{}}}}catch(A){A?.name!=="AbortError"&&o(E=>E.map(q=>q.id===O?{...q,content:q.content||"\uC5F0\uACB0\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4."}:q))}finally{i(!1),F.current=null}},[s,a,_,e]),ce=(0,me.useCallback)(T=>{T.stopPropagation(),!T.nativeEvent.isComposing&&(T.key==="Enter"&&!T.shiftKey&&(T.preventDefault(),W()),T.key==="Escape"&&H())},[W,H]),pe=(0,me.useCallback)(()=>{o([]),k(null);try{localStorage.removeItem("impakers-agent-session")}catch{}},[]);return typeof document>"u"?null:(0,fo.createPortal)((0,R.jsxs)("div",{"data-impakers-debug":"",children:[(0,R.jsx)("div",{className:D.backdrop,onClick:H}),(0,R.jsxs)("div",{className:`${D.panel} ${b?D.exiting:""}`,"data-impakers-debug":"",children:[(0,R.jsxs)("div",{className:D.header,children:[(0,R.jsxs)("div",{className:D.headerLeft,children:[(0,R.jsx)("span",{className:D.headerIcon,children:"\u2726"}),(0,R.jsx)("span",{className:D.headerTitle,children:"AI \uC5D0\uC774\uC804\uD2B8"})]}),(0,R.jsxs)("div",{className:D.headerActions,children:[(0,R.jsx)("button",{className:D.headerBtn,onClick:pe,type:"button",title:"\uC0C8 \uB300\uD654",children:(0,R.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"15",height:"15",children:[(0,R.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,R.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}),(0,R.jsx)("button",{className:D.headerBtn,onClick:H,type:"button",title:"\uB2EB\uAE30",children:(0,R.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"15",height:"15",children:(0,R.jsx)("path",{d:"M18 6L6 18M6 6l12 12"})})})]})]}),(0,R.jsxs)("div",{className:D.messages,children:[t.length===0&&(0,R.jsxs)("div",{className:D.welcome,children:[(0,R.jsx)("div",{className:D.welcomeIcon,children:"\u2726"}),(0,R.jsx)("div",{className:D.welcomeText,children:"\uBB34\uC5C7\uC744 \uB3C4\uC640\uB4DC\uB9B4\uAE4C\uC694?"}),(0,R.jsx)("div",{className:D.welcomeHint,children:"\uC0AC\uC6A9 \uC911 \uAD81\uAE08\uD55C \uC810\uC774\uB098 \uBB38\uC81C\uB97C \uBB3C\uC5B4\uBCF4\uC138\uC694"})]}),t.map(T=>(0,R.jsxs)("div",{className:`${D.message} ${D[T.role]}`,children:[T.role==="assistant"&&(0,R.jsx)("div",{className:D.msgAvatar,children:"\u2726"}),(0,R.jsxs)("div",{className:D.msgBody,children:[T.toolCalls&&T.toolCalls.length>0&&(0,R.jsx)("div",{className:D.toolCalls,children:T.toolCalls.map((w,I)=>(0,R.jsxs)("div",{className:`${D.toolCall} ${D[`tool_${w.status}`]}`,children:[(0,R.jsx)("span",{className:D.toolIcon,children:w.status==="running"?"\u23F3":w.status==="success"?"\u2713":"\u2717"}),(0,R.jsx)("span",{className:D.toolName,children:xr(w.name)})]},I))}),T.content&&(0,R.jsx)("div",{className:D.msgContent,children:T.content}),T.role==="assistant"&&a&&T.id===t[t.length-1]?.id&&!T.content&&(0,R.jsxs)("div",{className:D.typing,children:[(0,R.jsx)("span",{}),(0,R.jsx)("span",{}),(0,R.jsx)("span",{})]})]})]},T.id)),(0,R.jsx)("div",{ref:v})]}),(0,R.jsxs)("div",{className:D.inputArea,children:[(0,R.jsx)("textarea",{ref:$,className:D.input,placeholder:"\uBA54\uC2DC\uC9C0\uB97C \uC785\uB825\uD558\uC138\uC694...",value:s,onChange:T=>{r(T.target.value);let w=T.target;w.style.height="auto",w.style.height=`${Math.min(w.scrollHeight,120)}px`},onKeyDown:ce,rows:1,disabled:a}),(0,R.jsx)("button",{className:`${D.sendBtn} ${s.trim()&&!a?D.active:""}`,onClick:W,disabled:!s.trim()||a,type:"button",children:(0,R.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"16",height:"16",children:[(0,R.jsx)("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),(0,R.jsx)("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]})]})]}),document.body)}var Cn=require("react"),ko=require("react-dom");var ho="impakers-debug-settings",lt={markerColor:"#6366f1",markersVisible:!0,hideDoneMarkers:!1,showOnlyMine:!1};function yo(){try{let e=localStorage.getItem(ho);return e?{...lt,...JSON.parse(e)}:{...lt}}catch{return{...lt}}}function bo(e){try{localStorage.setItem(ho,JSON.stringify(e))}catch{}}var xo=[{id:"indigo",label:"\uC778\uB514\uACE0",value:"#6366f1"},{id:"blue",label:"\uBE14\uB8E8",value:"#3b82f6"},{id:"red",label:"\uB808\uB4DC",value:"#ef4444"},{id:"green",label:"\uADF8\uB9B0",value:"#16a34a"},{id:"orange",label:"\uC624\uB80C\uC9C0",value:"#f97316"},{id:"pink",label:"\uD551\uD06C",value:"#ec4899"}];var kr=`@keyframes styles-module__panelIn___SmRh6 {
3103
+ }`,kr={backdrop:"styles-module__backdrop___qExl6",fadeIn:"styles-module__fadeIn___lF-be",panel:"styles-module__panel___ri2CN",slideIn:"styles-module__slideIn___Wx-kZ",exiting:"styles-module__exiting___iE6TS",slideOut:"styles-module__slideOut___1n8cb",resizeHandle:"styles-module__resizeHandle___VGNx4",header:"styles-module__header___gmriy",headerLeft:"styles-module__headerLeft___M17Y1",headerIcon:"styles-module__headerIcon___PsSMZ",headerTitle:"styles-module__headerTitle___Y96x8",headerActions:"styles-module__headerActions___-rG09",headerBtn:"styles-module__headerBtn___eSTQN",body:"styles-module__body___bXbbW",sidebar:"styles-module__sidebar___1NIqu",sidebarHeader:"styles-module__sidebarHeader___aMgpo",sidebarList:"styles-module__sidebarList___Ob-c6",sidebarEmpty:"styles-module__sidebarEmpty___QNq3K",sidebarItem:"styles-module__sidebarItem___T8-S5",sidebarActive:"styles-module__sidebarActive___WVtxJ",sidebarTitle:"styles-module__sidebarTitle___bkPQz",sidebarDate:"styles-module__sidebarDate___QNxsK",messages:"styles-module__messages___Al0UY",welcome:"styles-module__welcome___7MKNO",welcomeIcon:"styles-module__welcomeIcon___gd4O6",welcomeText:"styles-module__welcomeText___-aHqH",welcomeHint:"styles-module__welcomeHint___zUsgp",message:"styles-module__message___-0C3Z",user:"styles-module__user___V0NWN",msgBody:"styles-module__msgBody___YMLmR",msgContent:"styles-module__msgContent___ur5dX",assistant:"styles-module__assistant___sS3g4",msgAvatar:"styles-module__msgAvatar___AAtdS",msgImages:"styles-module__msgImages___xdjr7",msgImage:"styles-module__msgImage___g9UKr",msgMarkdown:"styles-module__msgMarkdown___2bE27",paragraph:"styles-module__paragraph___0db50",heading1:"styles-module__heading1___ObrLl",heading2:"styles-module__heading2___2GDnb",heading3:"styles-module__heading3___dJGMW",inlineCode:"styles-module__inlineCode___fXbsw",codeBlock:"styles-module__codeBlock___77Vmy",codeLang:"styles-module__codeLang___ANUgp",codeCopy:"styles-module__codeCopy___UKHGh",expandBtn:"styles-module__expandBtn___9EdJu",copyBtn:"styles-module__copyBtn___gMgrH",toolCalls:"styles-module__toolCalls___YDi5U",toolCall:"styles-module__toolCall___YG3jW",tool_success:"styles-module__tool_success___-qmku",tool_error:"styles-module__tool_error___tmRla",toolIcon:"styles-module__toolIcon___w-g-Z",toolName:"styles-module__toolName___yBXu6",toolMore:"styles-module__toolMore___MSrrk",subBadge:"styles-module__subBadge___bvbxD",toolCompact:"styles-module__toolCompact___i-o7k",toolCompactToggle:"styles-module__toolCompactToggle___uOgG4",toolCompactIcon:"styles-module__toolCompactIcon___onQV5",toolCompactError:"styles-module__toolCompactError___qcqEZ",toolCompactSub:"styles-module__toolCompactSub___awUyk",toolCompactList:"styles-module__toolCompactList___pumTz",toolCompactItem:"styles-module__toolCompactItem___GN7IT",toolSummary:"styles-module__toolSummary___-ultc",typing:"styles-module__typing___SxFST",typingDot:"styles-module__typingDot___-XQcu",continueBar:"styles-module__continueBar___Ox1ee",imagePreview:"styles-module__imagePreview___69vle",imageThumb:"styles-module__imageThumb___5-tAx",imageRemove:"styles-module__imageRemove___U8lFv",inputArea:"styles-module__inputArea___ySM3W",attachBtn:"styles-module__attachBtn___uvYvg",input:"styles-module__input___UnN4A",sendBtn:"styles-module__sendBtn___WLa8O",active:"styles-module__active___SooZB"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-agent-chat-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-agent-chat-styles",document.head.appendChild(e)),e.textContent=xr}var g=kr;var u=require("react/jsx-runtime");function bo(e){return{github_read_file:"\uD30C\uC77C \uC77D\uAE30",github_search_code:"\uCF54\uB4DC \uAC80\uC0C9",github_grep_code:"\uCF54\uB4DC \uB0B4\uC6A9 \uAC80\uC0C9",github_get_tree:"\uB514\uB809\uD1A0\uB9AC \uAD6C\uC870",github_get_commits:"\uCEE4\uBC0B \uC774\uB825",supabase_query_db:"DB \uC870\uD68C",supabase_list_tables:"\uD14C\uC774\uBE14 \uBAA9\uB85D",supabase_get_api_logs:"API \uB85C\uADF8",vercel_get_runtime_logs:"\uB7F0\uD0C0\uC784 \uB85C\uADF8",vercel_get_deployments:"\uBC30\uD3EC \uC774\uB825",spawn_agent:"\uC11C\uBE0C \uC5D0\uC774\uC804\uD2B8",create_task:"\uD53C\uB4DC\uBC31 \uC0DD\uC131"}[e]||e}function vr(e){let n=[],o=e.split(`
3104
+ `),t=0;for(;t<o.length;){let s=o[t];if(s.startsWith("```")){let r=s.slice(3).trim(),i=[];for(t++;t<o.length&&!o[t].startsWith("```");)i.push(o[t]),t++;t++,n.push((0,u.jsxs)("div",{className:g.codeBlock,children:[r&&(0,u.jsx)("div",{className:g.codeLang,children:r}),(0,u.jsx)("pre",{children:(0,u.jsx)("code",{children:i.join(`
3105
+ `)})}),(0,u.jsx)("button",{className:g.codeCopy,onClick:()=>navigator.clipboard?.writeText(i.join(`
3106
+ `)),type:"button",children:"\uBCF5\uC0AC"})]},`code-${t}`));continue}if(/^#{1,3}\s/.test(s)){let r=s.match(/^(#{1,3})/)?.[1].length||1,i=s.replace(/^#{1,3}\s/,"");n.push((0,u.jsx)("div",{className:g[`heading${r}`],children:ho(i)},`h-${t}`)),t++;continue}if(!s.trim()){t++;continue}n.push((0,u.jsx)("p",{className:g.paragraph,children:ho(s)},`p-${t}`)),t++}return n}function ho(e){let n=[],o=/(\*\*(.+?)\*\*|`([^`]+)`)/g,t=0,s,r=0;for(;(s=o.exec(e))!==null;)s.index>t&&n.push(e.slice(t,s.index)),s[2]?n.push((0,u.jsx)("strong",{children:s[2]},r++)):s[3]&&n.push((0,u.jsx)("code",{className:g.inlineCode,children:s[3]},r++)),t=s.index+s[0].length;return t<e.length&&n.push(e.slice(t)),n.length===1&&typeof n[0]=="string"?n[0]:(0,u.jsx)(u.Fragment,{children:n})}function Cr({content:e}){let[n,o]=(0,H.useState)(!1),t=e.split(`
3107
+ `);return t.length>8?(0,u.jsxs)("div",{className:g.msgContent,children:[n?e:t.slice(0,6).join(`
3108
+ `)+"...",(0,u.jsx)("button",{className:g.expandBtn,onClick:()=>o(!n),type:"button",children:n?"\uC811\uAE30":"\uB354\uBCF4\uAE30"})]}):(0,u.jsx)("div",{className:g.msgContent,children:e})}function wr({text:e}){let[n,o]=(0,H.useState)(!1),t=(0,H.useCallback)(()=>{navigator.clipboard?.writeText(e),o(!0),setTimeout(()=>o(!1),1500)},[e]);return(0,u.jsx)("button",{className:g.copyBtn,onClick:t,type:"button",children:n?"\u2713 \uBCF5\uC0AC\uB428":"\uBCF5\uC0AC"})}function Sr({calls:e}){let[n,o]=(0,H.useState)(!1);if(!e.length)return null;let t=e.filter(r=>r.status==="error").length,s=e.filter(r=>r.isSubAgent).length;return(0,u.jsxs)("div",{className:g.toolCompact,children:[(0,u.jsxs)("button",{className:g.toolCompactToggle,onClick:()=>o(!n),type:"button",children:[(0,u.jsx)("span",{className:g.toolCompactIcon,children:n?"\u25BE":"\u25B8"}),"\uB3C4\uAD6C ",e.length,"\uAC1C \uC0AC\uC6A9",t>0&&(0,u.jsxs)("span",{className:g.toolCompactError,children:[" (",t," \uC2E4\uD328)"]}),s>0&&(0,u.jsxs)("span",{className:g.toolCompactSub,children:[" \xB7 \uC11C\uBE0C ",s]})]}),n&&(0,u.jsx)("div",{className:g.toolCompactList,children:e.map((r,i)=>(0,u.jsxs)("div",{className:`${g.toolCompactItem} ${g[`tool_${r.status}`]}`,children:[(0,u.jsx)("span",{children:r.status==="success"?"\u2713":r.status==="error"?"\u2717":"\u23F3"}),(0,u.jsx)("span",{children:bo(r.name)}),r.isSubAgent&&(0,u.jsx)("span",{className:g.subBadge,children:"sub"}),r.summary&&(0,u.jsx)("span",{className:g.toolSummary,children:r.summary})]},i))})]})}function xo({endpoint:e,onClose:n}){let[o,t]=(0,H.useState)([]),[s,r]=(0,H.useState)(""),[i,a]=(0,H.useState)(!1),[p,C]=(0,H.useState)(()=>{try{return localStorage.getItem("impakers-agent-session")||null}catch{return null}}),[w,S]=(0,H.useState)(!1),[N,B]=(0,H.useState)(!1),[A,j]=(0,H.useState)([]),[U,fe]=(0,H.useState)(420),[ge,de]=(0,H.useState)(!1),[$,P]=(0,H.useState)([]),[Y,b]=(0,H.useState)([]),z=(0,H.useRef)(null),R=(0,H.useRef)(null),he=(0,H.useRef)(null),M=(0,H.useRef)(null),ee=(0,H.useRef)(!1);(0,H.useEffect)(()=>{z.current?.scrollIntoView({behavior:"smooth"})},[o,Y]),(0,H.useEffect)(()=>{R.current?.focus()},[]),(0,H.useEffect)(()=>{let f=Ge();if(!f)return;let L=e.replace(/\/api\/external\/feedback\/?$/,"");fetch(`${L}/api/agent/sessions?agentId=cs-assistant`,{headers:{Authorization:`Bearer ${f}`}}).then(D=>D.json()).then(D=>P(D.sessions||[])).catch(()=>{})},[e]);let re=(0,H.useCallback)(()=>{S(!0),setTimeout(()=>n(),150)},[n]),Te=(0,H.useCallback)(f=>{f.preventDefault(),ee.current=!0;let L=f.clientX,D=U,ae=F=>{if(!ee.current)return;let ye=L-F.clientX;fe(Math.max(360,Math.min(D+ye,window.innerWidth-40)))},ce=()=>{ee.current=!1,document.removeEventListener("mousemove",ae),document.removeEventListener("mouseup",ce)};document.addEventListener("mousemove",ae),document.addEventListener("mouseup",ce)},[U]),Fe=(0,H.useCallback)(f=>{let L=f.target.files;L&&(Array.from(L).forEach(D=>{if(!D.type.startsWith("image/")||D.size>5*1024*1024)return;let ae=new FileReader;ae.onload=()=>{let ce=ae.result.split(",")[1];j(F=>[...F,{base64:ce,mediaType:D.type}])},ae.readAsDataURL(D)}),f.target.value="")},[]),Ie=(0,H.useCallback)(async f=>{let L=Ge();if(!L)return;let D=e.replace(/\/api\/external\/feedback\/?$/,"");try{let ce=await(await fetch(`${D}/api/agent/sessions?sessionId=${f}`,{headers:{Authorization:`Bearer ${L}`}})).json();if(ce.messages){t(ce.messages.map((F,ye)=>({id:`loaded-${ye}`,role:F.role,content:F.content,createdAt:new Date(F.createdAt||Date.now()).getTime()}))),C(f);try{localStorage.setItem("impakers-agent-session",f)}catch{}de(!1)}}catch{}},[e]),ie=(0,H.useCallback)(async f=>{let L=f||s.trim(),D=A;if(!L&&D.length===0||i)return;let ae=Ge();if(!ae)return;let ce={id:`user-${Date.now()}`,role:"user",content:L||"\uC774\uBBF8\uC9C0\uB97C \uBD84\uC11D\uD574\uC8FC\uC138\uC694.",images:D.length>0?D:void 0,createdAt:Date.now()};t(m=>[...m,ce]),r(""),j([]),a(!0),B(!1),b([]),R.current&&(R.current.style.height="auto");let F=`assistant-${Date.now()}`,ye={id:F,role:"assistant",content:"",toolCalls:[],createdAt:Date.now()};t(m=>[...m,ye]);let ue=!1;try{let m=new AbortController;he.current=m;let K=e.replace(/\/api\/external\/feedback\/?$/,""),$e=await fetch(`${K}/api/agent`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${ae}`},body:JSON.stringify({message:L||"\uC774\uBBF8\uC9C0\uB97C \uBD84\uC11D\uD574\uC8FC\uC138\uC694.",agentId:"cs-assistant",sessionId:p||void 0,images:D.length>0?D.map(Ue=>({type:"image",...Ue})):void 0}),signal:m.signal});if(!$e.ok){let Ue=await $e.json().catch(()=>({error:"\uC694\uCCAD \uC2E4\uD328"}));t(on=>on.map(He=>He.id===F?{...He,content:`\uC624\uB958: ${Ue.error||"\uC694\uCCAD \uC2E4\uD328"}`}:He)),a(!1);return}let be=$e.body.getReader(),Qe=new TextDecoder,tn="";for(;;){let{done:Ue,value:on}=await be.read();if(Ue)break;tn+=Qe.decode(on,{stream:!0});let He=tn.split(`
3109
+ `);tn=He.pop()||"";for(let qe of He){if(!qe.startsWith("data: "))continue;let mn=qe.slice(6).trim();if(mn)try{let te=JSON.parse(mn);switch(te.type){case"meta":if(te.conversationId){C(te.conversationId);try{localStorage.setItem("impakers-agent-session",te.conversationId)}catch{}}break;case"content":t(xe=>xe.map(O=>O.id===F?{...O,content:O.content+(te.content||"")}:O));break;case"tool_call":{let xe={name:te.name||"",input:te.input||{},status:"running"};b(O=>[...O,xe]),t(O=>O.map(Se=>Se.id===F?{...Se,toolCalls:[...Se.toolCalls||[],xe]}:Se));break}case"tool_result":b(xe=>xe.map(O=>O.name===te.name&&O.status==="running"?{...O,status:te.result?.success?"success":"error",summary:te.result?.summary}:O)),t(xe=>xe.map(O=>{if(O.id!==F)return O;let Se=[...O.toolCalls||[]],pn=Se.findLastIndex(fn=>fn.name===te.name&&fn.status==="running");return pn>=0&&(Se[pn]={...Se[pn],status:te.result?.success?"success":"error",summary:te.result?.summary}),{...O,toolCalls:Se}}));break;case"sub_agent_tool":{let xe={name:te.toolName||te.agentName||"sub-agent",input:{},status:te.status==="done"?"success":"running",isSubAgent:!0,summary:te.summary};te.status==="running"?b(O=>[...O,xe]):b(O=>O.map(Se=>Se.isSubAgent&&Se.status==="running"?{...Se,status:"success",summary:te.summary}:Se));break}case"error":t(xe=>xe.map(O=>O.id===F?{...O,content:O.content+`
3110
+
3111
+ \uC624\uB958: ${te.error}`}:O));break;case"done":ue=!0;break}}catch{}}}ue||B(!0)}catch(m){if(m?.name!=="AbortError"){t($e=>$e.map(be=>be.id===F?{...be,content:be.content||"\uC5F0\uACB0\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4."}:be));let K=m?.message||"";(K.includes("timeout")||K.includes("aborted")||K.includes("network"))&&B(!0)}}finally{a(!1),b([]),he.current=null}},[s,A,i,p,e]),k=(0,H.useCallback)(f=>{f.stopPropagation(),!f.nativeEvent.isComposing&&(f.key==="Enter"&&!f.shiftKey&&(f.preventDefault(),ie()),f.key==="Escape"&&re())},[ie,re]),v=(0,H.useCallback)(()=>{t([]),C(null),B(!1),b([]);try{localStorage.removeItem("impakers-agent-session")}catch{}},[]);return typeof document>"u"?null:(0,yo.createPortal)((0,u.jsxs)("div",{"data-impakers-debug":"",children:[(0,u.jsx)("div",{className:g.backdrop,onClick:re}),(0,u.jsxs)("div",{className:`${g.panel} ${w?g.exiting:""}`,style:{width:U},"data-impakers-debug":"",children:[(0,u.jsx)("div",{className:g.resizeHandle,onMouseDown:Te}),(0,u.jsxs)("div",{className:g.header,children:[(0,u.jsxs)("div",{className:g.headerLeft,children:[(0,u.jsx)("button",{className:g.headerBtn,onClick:()=>de(!ge),type:"button",title:"\uB300\uD654 \uAE30\uB85D",children:(0,u.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"15",height:"15",children:[(0,u.jsx)("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),(0,u.jsx)("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),(0,u.jsx)("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]})}),(0,u.jsx)("span",{className:g.headerIcon,children:"\u2726"}),(0,u.jsx)("span",{className:g.headerTitle,children:"AI \uC5D0\uC774\uC804\uD2B8"})]}),(0,u.jsxs)("div",{className:g.headerActions,children:[(0,u.jsx)("button",{className:g.headerBtn,onClick:v,type:"button",title:"\uC0C8 \uB300\uD654",children:(0,u.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"15",height:"15",children:[(0,u.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,u.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}),(0,u.jsx)("button",{className:g.headerBtn,onClick:re,type:"button",title:"\uB2EB\uAE30",children:(0,u.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"15",height:"15",children:(0,u.jsx)("path",{d:"M18 6L6 18M6 6l12 12"})})})]})]}),(0,u.jsxs)("div",{className:g.body,children:[ge&&(0,u.jsxs)("div",{className:g.sidebar,children:[(0,u.jsx)("div",{className:g.sidebarHeader,children:"\uB300\uD654 \uAE30\uB85D"}),(0,u.jsxs)("div",{className:g.sidebarList,children:[$.length===0&&(0,u.jsx)("div",{className:g.sidebarEmpty,children:"\uAE30\uB85D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"}),$.map(f=>(0,u.jsxs)("button",{className:`${g.sidebarItem} ${f.id===p?g.sidebarActive:""}`,onClick:()=>Ie(f.id),type:"button",children:[(0,u.jsx)("div",{className:g.sidebarTitle,children:f.title||"\uC0C8 \uB300\uD654"}),(0,u.jsx)("div",{className:g.sidebarDate,children:new Date(f.createdAt).toLocaleDateString("ko-KR",{month:"short",day:"numeric"})})]},f.id))]})]}),(0,u.jsxs)("div",{className:g.messages,children:[o.length===0&&(0,u.jsxs)("div",{className:g.welcome,children:[(0,u.jsx)("div",{className:g.welcomeIcon,children:"\u2726"}),(0,u.jsx)("div",{className:g.welcomeText,children:"\uBB34\uC5C7\uC744 \uB3C4\uC640\uB4DC\uB9B4\uAE4C\uC694?"}),(0,u.jsx)("div",{className:g.welcomeHint,children:"\uC0AC\uC6A9 \uC911 \uAD81\uAE08\uD55C \uC810\uC774\uB098 \uBB38\uC81C\uB97C \uBB3C\uC5B4\uBCF4\uC138\uC694"})]}),o.map(f=>(0,u.jsxs)("div",{className:`${g.message} ${g[f.role]}`,children:[f.role==="assistant"&&(0,u.jsx)("div",{className:g.msgAvatar,children:"\u2726"}),(0,u.jsxs)("div",{className:g.msgBody,children:[f.images&&f.images.length>0&&(0,u.jsx)("div",{className:g.msgImages,children:f.images.map((L,D)=>(0,u.jsx)("img",{src:`data:${L.mediaType};base64,${L.base64}`,alt:"",className:g.msgImage},D))}),f.toolCalls&&f.toolCalls.length>0&&!i&&(0,u.jsx)(Sr,{calls:f.toolCalls}),i&&f.id===o[o.length-1]?.id&&Y.length>0&&(0,u.jsxs)("div",{className:g.toolCalls,children:[Y.slice(-3).map((L,D)=>(0,u.jsxs)("div",{className:`${g.toolCall} ${g[`tool_${L.status}`]}`,children:[(0,u.jsx)("span",{className:g.toolIcon,children:L.status==="running"?"\u23F3":L.status==="success"?"\u2713":"\u2717"}),(0,u.jsx)("span",{className:g.toolName,children:bo(L.name)}),L.isSubAgent&&(0,u.jsx)("span",{className:g.subBadge,children:"sub"})]},D)),Y.length>3&&(0,u.jsxs)("div",{className:g.toolMore,children:["+",Y.length-3,"\uAC1C \uC644\uB8CC"]})]}),f.content&&f.role==="assistant"&&(0,u.jsx)("div",{className:g.msgMarkdown,children:vr(f.content)}),f.content&&f.role==="user"&&(0,u.jsx)(Cr,{content:f.content}),f.role==="assistant"&&i&&f.id===o[o.length-1]?.id&&!f.content&&Y.length===0&&(0,u.jsxs)("div",{className:g.typing,children:[(0,u.jsx)("span",{}),(0,u.jsx)("span",{}),(0,u.jsx)("span",{})]}),f.role==="assistant"&&f.content&&!i&&(0,u.jsx)(wr,{text:f.content})]})]},f.id)),N&&!i&&(0,u.jsxs)("div",{className:g.continueBar,children:[(0,u.jsx)("span",{children:"\uD0C0\uC784\uC544\uC6C3\uC73C\uB85C \uBA48\uCDC4\uC2B5\uB2C8\uB2E4."}),(0,u.jsx)("button",{onClick:()=>{B(!1),ie("\uC774\uC5B4\uC11C \uACC4\uC18D \uBD84\uC11D\uD574\uC918")},type:"button",children:"\uACC4\uC18D\uD558\uAE30 \u2192"})]}),(0,u.jsx)("div",{ref:z})]})]}),A.length>0&&(0,u.jsx)("div",{className:g.imagePreview,children:A.map((f,L)=>(0,u.jsxs)("div",{className:g.imageThumb,children:[(0,u.jsx)("img",{src:`data:${f.mediaType};base64,${f.base64}`,alt:""}),(0,u.jsx)("button",{className:g.imageRemove,onClick:()=>j(D=>D.filter((ae,ce)=>ce!==L)),type:"button",children:"\xD7"})]},L))}),(0,u.jsxs)("div",{className:g.inputArea,children:[(0,u.jsx)("button",{className:g.attachBtn,onClick:()=>M.current?.click(),type:"button",title:"\uC774\uBBF8\uC9C0 \uCCA8\uBD80",children:(0,u.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"16",height:"16",children:[(0,u.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}),(0,u.jsx)("circle",{cx:"8.5",cy:"8.5",r:"1.5"}),(0,u.jsx)("polyline",{points:"21 15 16 10 5 21"})]})}),(0,u.jsx)("textarea",{ref:R,className:g.input,placeholder:"\uBA54\uC2DC\uC9C0\uB97C \uC785\uB825\uD558\uC138\uC694...",value:s,onChange:f=>{r(f.target.value);let L=f.target;L.style.height="auto",L.style.height=`${Math.min(L.scrollHeight,120)}px`},onKeyDown:k,rows:1,disabled:i}),(0,u.jsx)("button",{className:`${g.sendBtn} ${(s.trim()||A.length>0)&&!i?g.active:""}`,onClick:()=>ie(),disabled:!s.trim()&&A.length===0||i,type:"button",children:(0,u.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"16",height:"16",children:[(0,u.jsx)("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),(0,u.jsx)("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]}),(0,u.jsx)("input",{ref:M,type:"file",accept:"image/jpeg,image/png,image/gif,image/webp",multiple:!0,style:{display:"none"},onChange:Fe})]})]}),document.body)}var Pn=require("react"),So=require("react-dom");var ko="impakers-debug-settings",ht={markerColor:"#6366f1",markersVisible:!0,hideDoneMarkers:!1,showOnlyMine:!1};function vo(){try{let e=localStorage.getItem(ko);return e?{...ht,...JSON.parse(e)}:{...ht}}catch{return{...ht}}}function Co(e){try{localStorage.setItem(ko,JSON.stringify(e))}catch{}}var wo=[{id:"indigo",label:"\uC778\uB514\uACE0",value:"#6366f1"},{id:"blue",label:"\uBE14\uB8E8",value:"#3b82f6"},{id:"red",label:"\uB808\uB4DC",value:"#ef4444"},{id:"green",label:"\uADF8\uB9B0",value:"#16a34a"},{id:"orange",label:"\uC624\uB80C\uC9C0",value:"#f97316"},{id:"pink",label:"\uD551\uD06C",value:"#ec4899"}];var Nr=`@keyframes styles-module__panelIn___SmRh6 {
2702
3112
  from {
2703
3113
  opacity: 0;
2704
3114
  transform: translateY(8px) scale(0.96);
@@ -2827,7 +3237,7 @@ ${n.stack?.split(`
2827
3237
  .styles-module__colorBtn___N7dGu.styles-module__selected___0tVDH {
2828
3238
  border-color: #18181b;
2829
3239
  transform: scale(1.15);
2830
- }`,vr={backdrop:"styles-module__backdrop___--cMp",panel:"styles-module__panel___z6xiJ",panelIn:"styles-module__panelIn___SmRh6",header:"styles-module__header___NkOur",title:"styles-module__title___tsKZw",closeBtn:"styles-module__closeBtn___-OQ4Y",body:"styles-module__body___9pyCP",field:"styles-module__field___vnQMl",fieldLabel:"styles-module__fieldLabel___2WUKB",toggle:"styles-module__toggle___uWsqC",on:"styles-module__on___W27kf",toggleThumb:"styles-module__toggleThumb___wyckC",colors:"styles-module__colors___vgFGZ",colorBtn:"styles-module__colorBtn___N7dGu",selected:"styles-module__selected___0tVDH"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-settings-panel-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-settings-panel-styles",document.head.appendChild(e)),e.textContent=kr}var U=vr;var X=require("react/jsx-runtime");function vo({settings:e,onChange:n,onClose:t}){let o=(0,Cn.useCallback)(()=>{n({...e,markersVisible:!e.markersVisible})},[e,n]),s=(0,Cn.useCallback)(()=>{n({...e,hideDoneMarkers:!e.hideDoneMarkers})},[e,n]),r=(0,Cn.useCallback)(()=>{n({...e,showOnlyMine:!e.showOnlyMine})},[e,n]),a=(0,Cn.useCallback)(i=>{n({...e,markerColor:i})},[e,n]);return typeof document>"u"?null:(0,ko.createPortal)((0,X.jsxs)("div",{"data-impakers-debug":"",children:[(0,X.jsx)("div",{className:U.backdrop,onClick:t}),(0,X.jsxs)("div",{className:U.panel,"data-impakers-debug":"",children:[(0,X.jsxs)("div",{className:U.header,children:[(0,X.jsx)("span",{className:U.title,children:"\uC124\uC815"}),(0,X.jsx)("button",{className:U.closeBtn,onClick:t,type:"button",children:(0,X.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,X.jsx)("path",{d:"M18 6L6 18M6 6l12 12"})})})]}),(0,X.jsxs)("div",{className:U.body,children:[(0,X.jsxs)("div",{className:U.field,children:[(0,X.jsx)("div",{className:U.fieldLabel,children:"\uB9C8\uCEE4 \uD45C\uC2DC"}),(0,X.jsx)("button",{className:`${U.toggle} ${e.markersVisible?U.on:""}`,onClick:o,type:"button",children:(0,X.jsx)("span",{className:U.toggleThumb})})]}),(0,X.jsxs)("div",{className:U.field,children:[(0,X.jsx)("div",{className:U.fieldLabel,children:"\uC644\uB8CC \uD540 \uC228\uAE30\uAE30"}),(0,X.jsx)("button",{className:`${U.toggle} ${e.hideDoneMarkers?U.on:""}`,onClick:s,type:"button",children:(0,X.jsx)("span",{className:U.toggleThumb})})]}),(0,X.jsxs)("div",{className:U.field,children:[(0,X.jsx)("div",{className:U.fieldLabel,children:"\uB0B4\uAC00 \uCD94\uAC00\uD55C \uAC83\uB9CC"}),(0,X.jsx)("button",{className:`${U.toggle} ${e.showOnlyMine?U.on:""}`,onClick:r,type:"button",children:(0,X.jsx)("span",{className:U.toggleThumb})})]}),(0,X.jsxs)("div",{className:U.field,children:[(0,X.jsx)("div",{className:U.fieldLabel,children:"\uB9C8\uCEE4 \uC0C9\uC0C1"}),(0,X.jsx)("div",{className:U.colors,children:xo.map(i=>(0,X.jsx)("button",{className:`${U.colorBtn} ${e.markerColor===i.value?U.selected:""}`,style:{background:i.value},onClick:()=>a(i.value),title:i.label,type:"button"},i.id))})]})]})]})]}),document.body)}var Cr=`.styles-module__markersLayer___VR1cD svg[fill=none],
3240
+ }`,Lr={backdrop:"styles-module__backdrop___--cMp",panel:"styles-module__panel___z6xiJ",panelIn:"styles-module__panelIn___SmRh6",header:"styles-module__header___NkOur",title:"styles-module__title___tsKZw",closeBtn:"styles-module__closeBtn___-OQ4Y",body:"styles-module__body___9pyCP",field:"styles-module__field___vnQMl",fieldLabel:"styles-module__fieldLabel___2WUKB",toggle:"styles-module__toggle___uWsqC",on:"styles-module__on___W27kf",toggleThumb:"styles-module__toggleThumb___wyckC",colors:"styles-module__colors___vgFGZ",colorBtn:"styles-module__colorBtn___N7dGu",selected:"styles-module__selected___0tVDH"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-settings-panel-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-settings-panel-styles",document.head.appendChild(e)),e.textContent=Nr}var q=Lr;var G=require("react/jsx-runtime");function No({settings:e,onChange:n,onClose:o}){let t=(0,Pn.useCallback)(()=>{n({...e,markersVisible:!e.markersVisible})},[e,n]),s=(0,Pn.useCallback)(()=>{n({...e,hideDoneMarkers:!e.hideDoneMarkers})},[e,n]),r=(0,Pn.useCallback)(()=>{n({...e,showOnlyMine:!e.showOnlyMine})},[e,n]),i=(0,Pn.useCallback)(a=>{n({...e,markerColor:a})},[e,n]);return typeof document>"u"?null:(0,So.createPortal)((0,G.jsxs)("div",{"data-impakers-debug":"",children:[(0,G.jsx)("div",{className:q.backdrop,onClick:o}),(0,G.jsxs)("div",{className:q.panel,"data-impakers-debug":"",children:[(0,G.jsxs)("div",{className:q.header,children:[(0,G.jsx)("span",{className:q.title,children:"\uC124\uC815"}),(0,G.jsx)("button",{className:q.closeBtn,onClick:o,type:"button",children:(0,G.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,G.jsx)("path",{d:"M18 6L6 18M6 6l12 12"})})})]}),(0,G.jsxs)("div",{className:q.body,children:[(0,G.jsxs)("div",{className:q.field,children:[(0,G.jsx)("div",{className:q.fieldLabel,children:"\uB9C8\uCEE4 \uD45C\uC2DC"}),(0,G.jsx)("button",{className:`${q.toggle} ${e.markersVisible?q.on:""}`,onClick:t,type:"button",children:(0,G.jsx)("span",{className:q.toggleThumb})})]}),(0,G.jsxs)("div",{className:q.field,children:[(0,G.jsx)("div",{className:q.fieldLabel,children:"\uC644\uB8CC \uD540 \uC228\uAE30\uAE30"}),(0,G.jsx)("button",{className:`${q.toggle} ${e.hideDoneMarkers?q.on:""}`,onClick:s,type:"button",children:(0,G.jsx)("span",{className:q.toggleThumb})})]}),(0,G.jsxs)("div",{className:q.field,children:[(0,G.jsx)("div",{className:q.fieldLabel,children:"\uB0B4\uAC00 \uCD94\uAC00\uD55C \uAC83\uB9CC"}),(0,G.jsx)("button",{className:`${q.toggle} ${e.showOnlyMine?q.on:""}`,onClick:r,type:"button",children:(0,G.jsx)("span",{className:q.toggleThumb})})]}),(0,G.jsxs)("div",{className:q.field,children:[(0,G.jsx)("div",{className:q.fieldLabel,children:"\uB9C8\uCEE4 \uC0C9\uC0C1"}),(0,G.jsx)("div",{className:q.colors,children:wo.map(a=>(0,G.jsx)("button",{className:`${q.colorBtn} ${e.markerColor===a.value?q.selected:""}`,style:{background:a.value},onClick:()=>i(a.value),title:a.label,type:"button"},a.id))})]})]})]})]}),document.body)}var Tr=`.styles-module__markersLayer___VR1cD svg[fill=none],
2831
3241
  .styles-module__fixedMarkersLayer___wBuxm svg[fill=none] {
2832
3242
  fill: none !important;
2833
3243
  }
@@ -3152,5 +3562,5 @@ html.impakers-selecting {
3152
3562
  }
3153
3563
  html.impakers-selecting * {
3154
3564
  cursor: crosshair !important;
3155
- }`,wr={markersLayer:"styles-module__markersLayer___VR1cD",fixedMarkersLayer:"styles-module__fixedMarkersLayer___wBuxm",fab:"styles-module__fab___6FrCF",fabEnter:"styles-module__fabEnter___9koyT",active:"styles-module__active___X5PRD",hoverHighlight:"styles-module__hoverHighlight___9kGLL",enter:"styles-module__enter___jAi-c",hoverHighlightIn:"styles-module__hoverHighlightIn___ljC4F",singleSelectOutline:"styles-module__singleSelectOutline___2meUm",fadeIn:"styles-module__fadeIn___PpRqy",hoverTooltip:"styles-module__hoverTooltip___JE1Bs",hoverTooltipIn:"styles-module__hoverTooltipIn___tncNM",hoverReactPath:"styles-module__hoverReactPath___wPGYi",hoverElementName:"styles-module__hoverElementName___lNqTP",contextMenu:"styles-module__contextMenu___nDXft",contextMenuItem:"styles-module__contextMenuItem___69GKu",toast:"styles-module__toast___gV3Sa",toastIn:"styles-module__toastIn___V382h",toastOut:"styles-module__toastOut___zlqxG",toastError:"styles-module__toastError___Q-8dn",countdownOverlay:"styles-module__countdownOverlay___GruQJ",countdownNumber:"styles-module__countdownNumber___VAmkI",countdownPulse:"styles-module__countdownPulse___ngZrL",countdownLabel:"styles-module__countdownLabel___px-ao",countdownCancel:"styles-module__countdownCancel___8cRgZ",fadeOut:"styles-module__fadeOut___tZb9S"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-debug-widget-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-debug-widget-styles",document.head.appendChild(e)),e.textContent=Cr}var ae=wr;var y=require("react/jsx-runtime");function dt(e,n){let t=document.elementFromPoint(e,n);if(!t)return null;for(;t?.shadowRoot;){let o=t.shadowRoot.elementFromPoint(e,n);if(!o||o===t)break;t=o}return t}function Sr(e){let n=e;for(;n&&n!==document.body;){let t=window.getComputedStyle(n);if(t.position==="fixed"||t.position==="sticky")return!0;n=n.parentElement}return!1}function Co(e){let{name:n,path:t}=qn(e),o=jt(e,{mode:"filtered"});return{name:o.path?`${o.path} ${n}`:n,elementName:n,path:t,reactComponents:o.path}}function Lr(e){let n=pn(e),t=n.found?n:Jn(e);if(t.found&&t.source)return Fn(t.source,"path")}function Nr(e){let n=pn(e),t=n.found?n:Jn(e);return t.found&&t.sourceCandidates&&t.sourceCandidates.length>0?t.sourceCandidates.map(o=>Fn(o,"path")):t.found&&t.source?[Fn(t.source,"path")]:[]}function Tr(e,n){let t=e.match(/^(.+):(\d+)(?::(\d+))?$/);if(!t)return null;let[,o,s,r]=t,a=Number.parseInt(s,10),i=r?Number.parseInt(r,10):void 0;return!o||Number.isNaN(a)?null:{kind:"component",file:o,line:a,column:i,label:n||"Resolved component source",confidence:.98,reason:"resolved-from-source-map"}}var Ir="impakers-debug-markers-";function ut(){return Ir+window.location.pathname}function ct(){try{let e=localStorage.getItem(ut());return e?JSON.parse(e):[]}catch{return[]}}function wo(e){try{e.length===0?localStorage.removeItem(ut()):localStorage.setItem(ut(),JSON.stringify(e))}catch{}}function Er(e){return e.feedbackMarker?{id:e.id,x:e.feedbackMarker.x,y:e.feedbackMarker.y,comment:e.title.replace(/^\[피드백\]\s*/,""),element:e.feedbackMarker.element||"",elementPath:"",timestamp:new Date(e.createdAt).getTime(),isFixed:e.feedbackMarker.isFixed,boundingBox:e.feedbackMarker.boundingBox,status:e.status}:null}function Lo({endpoint:e,getUser:n,onHide:t}){let[o,s]=(0,g.useState)(!1),[r,a]=(0,g.useState)(()=>ct()),[i,_]=(0,g.useState)(null),[k,b]=(0,g.useState)(!1),[C,v]=(0,g.useState)(null),[$,F]=(0,g.useState)({x:0,y:0}),[H,W]=(0,g.useState)(new Set),[ce,pe]=(0,g.useState)(!1),[T,w]=(0,g.useState)(null),[I,O]=(0,g.useState)(null),[x,A]=(0,g.useState)(!1),[E,q]=(0,g.useState)(null),[M,J]=(0,g.useState)(null),[se,fe]=(0,g.useState)({}),[ve,re]=(0,g.useState)(!1),[le,h]=(0,g.useState)([]),[f,B]=(0,g.useState)([]),[P,Le]=(0,g.useState)(!1),[Ne,Re]=(0,g.useState)(!1),[G,Ie]=(0,g.useState)(!1),[ge,m]=(0,g.useState)(()=>yo()),[ne,Ke]=(0,g.useState)(()=>window.location.pathname),[Me,nn]=(0,g.useState)(!1),[_t,mt]=(0,g.useState)(0),[pt,wn]=(0,g.useState)(null),Sn=(0,g.useRef)(null),ft=(0,g.useRef)(null),gt=(0,g.useRef)(null),tn=(0,g.useRef)(!1),ht=(0,g.useCallback)(()=>{wn(3);let c=3,u=()=>{c-=1,c<=0?(wn(null),s(!0),document.documentElement.classList.add("impakers-selecting")):(wn(c),Sn.current=setTimeout(u,1e3))};Sn.current=setTimeout(u,1e3)},[]),Io=(0,g.useCallback)(c=>{c==="comment"?yt():c==="delay-capture"?ht():c==="agent"?Re(!0):c==="inbox"?(Le(!0),Jt(e,{staleWhileRevalidate:!0}).then(B).catch(()=>{}),o&&(s(!1),document.documentElement.classList.remove("impakers-selecting"),v(null),_(null))):c==="settings"&&Ie(!0)},[o,ht]),Eo=(0,g.useCallback)(c=>{m(c),bo(c)},[]),yt=(0,g.useCallback)(()=>{s(c=>{let u=!c;return u?document.documentElement.classList.add("impakers-selecting"):(document.documentElement.classList.remove("impakers-selecting"),v(null),_(null)),u})},[]);(0,g.useEffect)(()=>()=>{document.documentElement.classList.remove("impakers-selecting")},[]),(0,g.useEffect)(()=>{a(ct());let c=()=>{Ke(window.location.pathname),a(ct()),_(null),v(null)};window.addEventListener("popstate",c);let u=history.pushState.bind(history);return history.pushState=(...V)=>{u(...V),setTimeout(c,50)},()=>{window.removeEventListener("popstate",c),history.pushState=u}},[]),(0,g.useEffect)(()=>{let c=De(ne),u=Ge(c);u&&(h(u),nn(!0));let V=bn(c,N=>{h(N),nn(!0)});return Gt(e,ne,{staleWhileRevalidate:!0}).then(N=>{h(N),nn(!0)}).catch(()=>{}),V},[e,ne]);let bt="impakers-debug-history-last-seen";(0,g.useEffect)(()=>{let c=localStorage.getItem(bt)||new Date(0).toISOString();Wn(e,{since:c,limit:100}).then(u=>mt(u.length)).catch(()=>{})},[e]);let Ro=(0,g.useCallback)(()=>{localStorage.setItem(bt,new Date().toISOString()),mt(0)},[]);(0,g.useEffect)(()=>{if(!Me)return;let c=le.map(Er).filter(u=>u!==null);a(c),wo(c)},[le,Me]);let xt=(0,g.useRef)(!0);(0,g.useEffect)(()=>{if(xt.current){xt.current=!1;return}wo(r)},[r]),(0,g.useEffect)(()=>{let c=u=>{if(u.key==="Escape"){if(P){Le(!1);return}if(i){u.preventDefault(),b(!0),ke(()=>{_(null),b(!1)},150);return}o&&(u.preventDefault(),s(!1),document.documentElement.classList.remove("impakers-selecting"),v(null))}};return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[P,i,o]),(0,g.useEffect)(()=>{if(!o||i)return;let c=u=>{let V=u.composedPath()[0]||u.target;if(Oe(V,"[data-impakers-debug]")){v(null);return}let N=dt(u.clientX,u.clientY);if(!N||Oe(N,"[data-impakers-debug]")){v(null);return}let{name:ue,elementName:Ce,path:be,reactComponents:oe}=Co(N),S=N.getBoundingClientRect();v({element:ue,elementName:Ce,elementPath:be,rect:S,reactComponents:oe}),F({x:u.clientX,y:u.clientY})};return document.addEventListener("mousemove",c),()=>document.removeEventListener("mousemove",c)},[o,i]),(0,g.useEffect)(()=>{if(!o)return;let c=u=>{if(tn.current)return;let V=u.composedPath()[0]||u.target;if(Oe(V,"[data-impakers-debug]")||Oe(V,"[data-annotation-popup]")||Oe(V,"[data-annotation-marker]"))return;if(i){u.preventDefault(),u.stopPropagation(),ft.current?.shake();return}u.preventDefault(),u.stopPropagation();let N=dt(u.clientX,u.clientY);if(!N)return;let{name:ue,path:Ce,reactComponents:be}=Co(N),oe=N.getBoundingClientRect(),S=u.clientX/window.innerWidth*100,de=Sr(N),Nn=de?u.clientY:u.clientY+window.scrollY,an=window.getSelection(),Ue;an&&an.toString().trim().length>0&&(Ue=an.toString().trim().slice(0,500));let Y=Pt(N),Te=$t(N);_({x:S,y:Nn,clientY:u.clientY,element:ue,elementPath:Ce,selectedText:Ue,boundingBox:{x:oe.left,y:de?oe.top:oe.top+window.scrollY,width:oe.width,height:oe.height},nearbyText:Mt(N),cssClasses:At(N),isFixed:de,fullPath:Bt(N),accessibility:Ht(N),computedStyles:Te,computedStylesObj:Y,reactComponents:be??void 0,sourceFile:Lr(N),targetElement:N}),v(null);let Tn=Nr(N).filter(ln=>ln.includes("/chunks/"));Tn.length>0&&(async()=>{for(let ln of Tn)try{let In=await rt(ln);if(In){_(Kn=>Kn&&{...Kn,resolvedSource:`${In.source}:${In.line}`,resolvedName:In.name??void 0});break}}catch{}})()};return document.addEventListener("click",c,!0),()=>document.removeEventListener("click",c,!0)},[o,i]);let on=(0,g.useCallback)(c=>{q(c),ke(()=>q(null),4e3)},[]),Mo=(0,g.useCallback)(async c=>{if(!(!i||ce)){pe(!0);try{let u=Kt(n),V=await Ot(),N=i.resolvedSource||i.sourceFile||"",ue=i.resolvedName||null;if(!i.resolvedSource&&i.sourceFile?.includes("/chunks/"))try{let Y=await rt(i.sourceFile);Y&&(N=`${Y.source}:${Y.line}:${Y.column}`,ue=Y.name)}catch{}let Ce=await Xt(window.location.pathname),be=N&&!N.includes("/chunks/")?Tr(N,ue):null,oe=Yt(be?[be]:void 0,Ce?.targets);oe.length>0&&(u.debugTargets=oe),Ce?.context&&(u.routeDebug=Ce.context);let S=[];S.push(`## \uD53C\uB4DC\uBC31 ${c}`),oe.length>0&&(S.push(""),S.push("---"),S.push(""),S.push("**\uB514\uBC84\uAE45 \uD0C0\uAC9F \uD30C\uC77C**:"),oe.forEach(Y=>{let Te=Y.line?`:${Y.line}${typeof Y.column=="number"?`:${Y.column}`:""}`:"";S.push(`- [${Y.kind}] \`${Y.file}${Te}\` (${Y.reason})`)}));let de=[];if(i.element&&de.push(`**\uC120\uD0DD\uB41C \uC694\uC18C**: ${i.element}`),i.elementPath&&de.push(`**DOM \uACBD\uB85C**: \`${i.elementPath}\``),i.selectedText&&de.push(`**\uC120\uD0DD\uB41C \uD14D\uC2A4\uD2B8**: "${i.selectedText}"`),i.reactComponents?.trim()?de.push(`**React \uCEF4\uD3EC\uB10C\uD2B8**: ${i.reactComponents}`):ue&&de.push(`**\uCEF4\uD3EC\uB10C\uD2B8/\uD568\uC218**: ${ue}`),N&&!N.includes("/chunks/")&&de.push(`**\uC18C\uC2A4 \uD30C\uC77C**: \`${N}\``),i.cssClasses&&de.push(`**CSS \uD074\uB798\uC2A4**: \`${i.cssClasses}\``),i.nearbyText&&de.push(`**\uC8FC\uBCC0 \uD14D\uC2A4\uD2B8**: ${i.nearbyText}`),i.accessibility&&de.push(`**\uC811\uADFC\uC131**: ${i.accessibility}`),de.length>0&&(S.push(""),S.push("---"),S.push(""),de.forEach(Y=>S.push(Y))),u.consoleErrors?.length&&(S.push(""),S.push("---"),S.push(""),S.push("**\uCD5C\uADFC \uCF58\uC194 \uC5D0\uB7EC**:"),u.consoleErrors.slice(-10).forEach(Y=>S.push(`- \`${Y.slice(0,200)}\``))),u.consoleLogs?.length){let Y=u.consoleLogs.filter(Te=>Te.level==="error"||Te.level==="warn").slice(-10);Y.length>0&&(S.push(""),S.push("**\uCD5C\uADFC \uCF58\uC194 \uB85C\uADF8**:"),Y.forEach(Te=>S.push(`- [${Te.level}] \`${Te.message.slice(0,200)}\``)))}if(S.push(""),S.push("---"),S.push(""),S.push("## \uD658\uACBD \uC815\uBCF4"),S.push(""),S.push(`- **URL**: ${u.url}`),S.push(`- **\uC2DC\uC810**: ${new Date(u.timestamp).toLocaleString("ko-KR")}`),S.push(`- **\uBE0C\uB77C\uC6B0\uC800**: ${u.browser}`),S.push(`- **\uD654\uBA74**: ${u.viewport} (@${u.pixelRatio}x)`),S.push(`- **\uC5B8\uC5B4**: ${u.language}`),u.user?.name&&S.push(`- **\uC0AC\uC6A9\uC790**: ${u.user.name}`),u.performance&&Object.keys(u.performance).length>0){S.push(""),S.push("---"),S.push(""),S.push("## \uC131\uB2A5"),S.push(""),S.push("| \uD56D\uBAA9 | \uAC12 |"),S.push("|------|-----|");let Y={pageLoadTime:"\uD398\uC774\uC9C0 \uB85C\uB529",domContentLoaded:"DOM \uB85C\uB4DC",ttfb:"TTFB",firstContentfulPaint:"FCP",usedJSHeapMB:"\uBA54\uBAA8\uB9AC \uC0AC\uC6A9",totalJSHeapMB:"\uBA54\uBAA8\uB9AC \uC804\uCCB4"};for(let[Te,St]of Object.entries(u.performance)){let Tn=Y[Te]||Te,ln=Te.includes("Heap")?"MB":"ms";S.push(`| ${Tn} | ${St}${ln} |`)}}let Nn=S.join(`
3156
- `),an=await qt(e,{title:c.slice(0,100),description:"",priority:"medium",metadata:u,debugInfo:Nn,debug_info:Nn,screenshot:V,feedbackUrl:window.location.pathname,feedbackMarker:{x:i.x,y:i.y,isFixed:i.isFixed||!1,element:i.element,boundingBox:i.boundingBox},authorName:n?.()?.name?String(n().name):void 0});A(!0),ke(()=>A(!1),3e3);let Ue=an.taskId||null;gt.current=Ue,ke(()=>{gt.current=null},300),ke(()=>{Ue&&W(Y=>new Set(Y).add(Ue))},250),b(!0),ke(()=>{_(null),b(!1),s(!1),document.documentElement.classList.remove("impakers-selecting"),tn.current=!0,setTimeout(()=>{tn.current=!1},300)},150),window.getSelection()?.removeAllRanges()}catch(u){let V=u?.message||"\uD53C\uB4DC\uBC31 \uC804\uC1A1 \uC2E4\uD328";on(V),console.error("[@impakers/debug] \uD53C\uB4DC\uBC31 \uC804\uC1A1 \uC2E4\uD328:",u)}finally{pe(!1)}}},[i,ce,e,n,on]),Ao=(0,g.useCallback)(()=>{b(!0),ke(()=>{_(null),b(!1),s(!1),document.documentElement.classList.remove("impakers-selecting"),tn.current=!0,setTimeout(()=>{tn.current=!1},300)},150)},[]),kt=(0,g.useCallback)(c=>{let u=c.id;J(V=>V===u?null:u)},[]);(0,g.useEffect)(()=>{if(!M)return;let c=We(M),u=Ge(c);u?(fe(N=>({...N,[M]:u})),re(!1)):re(!0);let V=bn(c,N=>{fe(ue=>({...ue,[M]:N})),re(!1)});return zn(e,M,{staleWhileRevalidate:!0}).then(()=>re(!1)).catch(()=>re(!1)),V},[M,e]);let Fo=(0,g.useCallback)(async(c,u,V,N)=>{let ue=n?.()?.name?String(n().name):"\uC775\uBA85",Ce=n?.()?.id?String(n().id):void 0;try{let be;if(N)try{be=await jn(e,N,"comment",c)}catch(oe){let S=oe?.message||"\uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328";on(S),console.error("[@impakers/debug] \uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328:",oe)}await Dn(e,c,u,ue,Ce,V,be)}catch(be){let oe=be?.message||"\uCF54\uBA58\uD2B8 \uC804\uC1A1 \uC2E4\uD328";on(oe),console.error("[@impakers/debug] \uCF54\uBA58\uD2B8 \uC804\uC1A1 \uC2E4\uD328:",be)}},[n,e,on]),Po=(0,g.useCallback)(()=>{J(null)},[]),Ln=(0,g.useCallback)(c=>{if(!c){w(null),O(null);return}if(w(c.id),c.boundingBox){let u=c.boundingBox,V=u.x+u.width/2,N=c.isFixed?u.y+u.height/2:u.y+u.height/2-window.scrollY,ue=dt(V,N);if(ue){let Ce=ue.getBoundingClientRect(),be=Ce.width/u.width,oe=Ce.height/u.height;if(be>=.5&&oe>=.5){O(ue);return}}}O(null)},[]),$o=(0,g.useCallback)(()=>{if(!i)return{left:0,top:0};let c=i.x/100*window.innerWidth,u=i.isFixed?i.y:i.y-window.scrollY,V=Math.max(160,Math.min(window.innerWidth-160,c));return u>window.innerHeight-290?{left:V,bottom:window.innerHeight-u+20}:{left:V,top:u+20}},[i]);if(typeof document>"u")return null;let sn=$o(),rn=I?.getBoundingClientRect(),Ho=[{id:"comment",label:"\uD53C\uB4DC\uBC31",active:o,icon:(0,y.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,y.jsx)("path",{d:"M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z"})})},{id:"delay-capture",label:"\uB51C\uB808\uC774 \uCEA1\uCC98",icon:(0,y.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,y.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,y.jsx)("polyline",{points:"12 6 12 12 16 14"})]})},{id:"agent",label:"\uC5D0\uC774\uC804\uD2B8",icon:(0,y.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,y.jsx)("path",{d:"M12 2L2 7l10 5 10-5-10-5z"}),(0,y.jsx)("path",{d:"M2 17l10 5 10-5"}),(0,y.jsx)("path",{d:"M2 12l10 5 10-5"})]})},{id:"inbox",label:"Inbox",badge:_t||void 0,icon:(0,y.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,y.jsx)("polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12"}),(0,y.jsx)("path",{d:"M5.45 5.11L2 12v6a2 2 0 002 2h16a2 2 0 002-2v-6l-3.45-6.89A2 2 0 0016.76 4H7.24a2 2 0 00-1.79 1.11z"})]})},{id:"settings",label:"\uC124\uC815",icon:(0,y.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,y.jsx)("circle",{cx:"12",cy:"12",r:"3"}),(0,y.jsx)("path",{d:"M19.4 15a1.65 1.65 0 00.33 1.82l.06.06a2 2 0 010 2.83 2 2 0 01-2.83 0l-.06-.06a1.65 1.65 0 00-1.82-.33 1.65 1.65 0 00-1 1.51V21a2 2 0 01-4 0v-.09A1.65 1.65 0 009 19.4a1.65 1.65 0 00-1.82.33l-.06.06a2 2 0 01-2.83-2.83l.06-.06A1.65 1.65 0 004.68 15a1.65 1.65 0 00-1.51-1H3a2 2 0 010-4h.09A1.65 1.65 0 004.6 9a1.65 1.65 0 00-.33-1.82l-.06-.06a2 2 0 012.83-2.83l.06.06A1.65 1.65 0 009 4.68a1.65 1.65 0 001-1.51V3a2 2 0 014 0v.09a1.65 1.65 0 001 1.51 1.65 1.65 0 001.82-.33l.06-.06a2 2 0 012.83 2.83l-.06.06A1.65 1.65 0 0019.4 9a1.65 1.65 0 001.51 1H21a2 2 0 010 4h-.09a1.65 1.65 0 00-1.51 1z"})]})}],vt=ne,Zn=n?.()?.name?String(n().name):null,Ct=(0,g.useMemo)(()=>r.filter(c=>{let u=le.find(V=>V.id===c.id);return!(ge.hideDoneMarkers&&(c.status==="done"||c.status==="resolved")||ge.showOnlyMine&&u?.authorName&&Zn&&u.authorName!==Zn)}),[r,le,ge.hideDoneMarkers,ge.showOnlyMine,Zn]),wt=(c,u)=>({id:c.id,title:c.title||"\uD53C\uB4DC\uBC31",status:c.status,priority:c.priority,authorName:c.authorName||"\uC775\uBA85",feedbackUrl:c.feedbackUrl||u,createdAt:c.createdAt,startedAt:c.startedAt,completedAt:c.completedAt,commentCount:c.commentCount||0}),Bo=le.map(c=>wt(c,vt)),zo=f.map(c=>wt(c,""));return(0,So.createPortal)((0,y.jsxs)("div",{"data-impakers-debug":"",children:[(0,y.jsx)(co,{items:Ho,onSelect:Io,onHide:t,onDoubleTap:yt}),P&&(0,y.jsx)(po,{pageItems:Bo,allItems:zo,currentPath:vt,serviceName:Tt()||void 0,endpoint:e,currentUserName:n?.()?.name?String(n().name):"\uC775\uBA85",currentUserId:n?.()?.id?String(n().id):void 0,onClose:()=>Le(!1),onHistoryViewed:Ro,newNotiCount:_t}),Ne&&(0,y.jsx)(go,{endpoint:e,onClose:()=>Re(!1)}),G&&(0,y.jsx)(vo,{settings:ge,onChange:Eo,onClose:()=>Ie(!1)}),o&&(0,y.jsxs)(y.Fragment,{children:[C?.rect&&!i&&(0,y.jsx)("div",{className:`${ae.hoverHighlight} ${ae.enter}`,style:{left:C.rect.left,top:C.rect.top,width:C.rect.width,height:C.rect.height}}),C&&!i&&(0,y.jsxs)("div",{className:`${ae.hoverTooltip} ${ae.enter}`,style:{left:Math.min($.x+14,window.innerWidth-200),top:$.y+14},children:[C.reactComponents&&(0,y.jsx)("div",{className:ae.hoverReactPath,children:C.reactComponents}),(0,y.jsx)("div",{className:ae.hoverElementName,children:C.elementName})]}),rn&&T&&(0,y.jsx)("div",{className:`${ae.singleSelectOutline} ${ae.enter}`,style:{left:rn.left,top:rn.top,width:rn.width,height:rn.height}}),i?.targetElement&&(()=>{let c=i.targetElement.getBoundingClientRect();return(0,y.jsx)("div",{className:`${ae.singleSelectOutline} ${ae.enter}`,style:{left:c.left,top:c.top,width:c.width,height:c.height}})})()]}),(0,y.jsx)("div",{className:ae.markersLayer,"data-impakers-debug":"",style:{display:ge.markersVisible?void 0:"none"},children:Ct.filter(c=>!c.isFixed).map((c,u)=>(0,y.jsx)(it,{annotation:c,layerIndex:u,isAnimated:H.has(c.id),isHovered:T===c.id,isDeleting:!1,markerClickBehavior:"edit",accentColor:ge.markerColor,onHover:()=>Ln(c),onHoverEnd:()=>Ln(null),onClick:()=>kt(c),onContextMenu:()=>{}},c.id))}),(0,y.jsxs)("div",{className:ae.fixedMarkersLayer,"data-impakers-debug":"",style:{display:ge.markersVisible?void 0:"none"},children:[Ct.filter(c=>c.isFixed).map((c,u)=>(0,y.jsx)(it,{annotation:c,layerIndex:u,isAnimated:H.has(c.id),isHovered:T===c.id,isDeleting:!1,markerClickBehavior:"edit",accentColor:ge.markerColor,onHover:()=>Ln(c),onHoverEnd:()=>Ln(null),onClick:()=>kt(c),onContextMenu:()=>{}},c.id)),i&&(0,y.jsx)(oo,{x:i.x,y:i.clientY,isMultiSelect:!1,accentColor:ge.markerColor})]}),i&&(0,y.jsx)(Rt,{ref:ft,element:i.resolvedSource||i.resolvedName||i.element,selectedText:i.selectedText,isExiting:k,style:{position:"fixed",left:sn.left,..."top"in sn?{top:sn.top}:{},..."bottom"in sn?{bottom:sn.bottom}:{},transform:"translateX(-50%)",zIndex:100001},onSubmit:Mo,onCancel:Ao}),M&&(()=>{let c=r.find(de=>de.id===M),u=le.find(de=>de.id===M);if(!c)return null;let V=c.x/100*window.innerWidth,N=c.isFixed?c.y:c.y-window.scrollY,ue=Math.max(10,Math.min(V+20,window.innerWidth-360)),Ce=window.innerHeight-N,be=N,oe=Ce>=300?Math.min(N,window.innerHeight-60):Math.max(10,N-Math.min(480,be-10)),S={id:c.id,title:u?.title||c.comment||"\uD53C\uB4DC\uBC31",status:u?.status||"todo",authorName:u?.authorName||void 0,createdAt:u?.createdAt||new Date(c.timestamp).toISOString(),comments:se[c.id]||[]};return(0,y.jsx)(lo,{task:S,currentUserName:n?.()?.name?String(n().name):"\uC775\uBA85",currentUserId:n?.()?.id?String(n().id):void 0,left:ue,top:oe,loading:ve,onClose:Po,onReply:Fo})})(),pt!==null&&(0,y.jsxs)("div",{className:ae.countdownOverlay,"data-impakers-debug":"",children:[(0,y.jsx)("div",{className:ae.countdownNumber,children:pt}),(0,y.jsx)("div",{className:ae.countdownLabel,children:"\uD53C\uB4DC\uBC31 \uBAA8\uB4DC \uD65C\uC131\uD654\uAE4C\uC9C0..."}),(0,y.jsx)("button",{className:ae.countdownCancel,onClick:()=>{Sn.current&&clearTimeout(Sn.current),wn(null)},type:"button",children:"\uCDE8\uC18C"})]}),x&&(0,y.jsxs)("div",{className:ae.toast,"data-impakers-debug":"",children:[(0,y.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#16a34a",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,y.jsx)("polyline",{points:"20 6 9 17 4 12"})}),(0,y.jsx)("span",{children:"\uD0DC\uC2A4\uD06C \uC0DD\uC131\uC774 \uC644\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4"})]}),E&&(0,y.jsxs)("div",{className:`${ae.toast} ${ae.toastError}`,"data-impakers-debug":"",children:[(0,y.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#ef4444",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,y.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,y.jsx)("line",{x1:"15",y1:"9",x2:"9",y2:"15"}),(0,y.jsx)("line",{x1:"9",y1:"9",x2:"15",y2:"15"})]}),(0,y.jsx)("span",{children:E})]})]}),document.body)}var en=require("react"),No=require("react-dom");var ye=require("react/jsx-runtime");function To({endpoint:e,onSuccess:n,onClose:t}){let[o,s]=(0,en.useState)(""),[r,a]=(0,en.useState)(!1),[i,_]=(0,en.useState)(null),k=(0,en.useCallback)(async b=>{if(b.preventDefault(),!(!o.trim()||r)){a(!0),_(null);try{let C=await It(e,o.trim().toUpperCase());n(C.serviceName)}catch(C){_(C instanceof Error?C.message:"\uC778\uC99D \uC2E4\uD328")}finally{a(!1)}}},[o,e,r,n]);return typeof document>"u"?null:(0,No.createPortal)((0,ye.jsxs)("div",{"data-impakers-debug":"",style:{position:"fixed",inset:0,zIndex:2147483647,display:"flex",alignItems:"center",justifyContent:"center",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif"},children:[(0,ye.jsx)("div",{onClick:t,style:{position:"absolute",inset:0,background:"rgba(0, 0, 0, 0.4)"}}),(0,ye.jsxs)("div",{style:{position:"relative",width:360,background:"white",borderRadius:12,boxShadow:"0 16px 48px rgba(0,0,0,0.16)",overflow:"hidden"},children:[(0,ye.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"16px 20px",borderBottom:"1px solid #e5e5e5"},children:[(0,ye.jsx)("h3",{style:{fontSize:15,fontWeight:600,color:"#18181b",margin:0},children:"\uD53C\uB4DC\uBC31 \uC704\uC82F \uC778\uC99D"}),(0,ye.jsx)("button",{onClick:t,type:"button",style:{width:28,height:28,border:"none",background:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:6,color:"#71717a"},children:(0,ye.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,ye.jsx)("path",{d:"M18 6L6 18M6 6l12 12"})})})]}),(0,ye.jsxs)("div",{style:{padding:20},children:[(0,ye.jsxs)("p",{style:{fontSize:13,color:"#71717a",textAlign:"center",marginBottom:16,lineHeight:1.5},children:["\uC11C\uBE44\uC2A4 \uC2DC\uD06C\uB9BF \uCF54\uB4DC\uB97C \uC785\uB825\uD574\uC8FC\uC138\uC694.",(0,ye.jsx)("br",{}),"\uCF54\uB4DC\uB294 \uC784\uD328\uCEE4\uC2A4 OS\uC5D0\uC11C \uD655\uC778\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."]}),i&&(0,ye.jsx)("div",{style:{background:"#fef2f2",border:"1px solid #fecaca",color:"#dc2626",padding:"8px 12px",borderRadius:8,fontSize:13,marginBottom:12},children:i}),(0,ye.jsxs)("form",{onSubmit:k,children:[(0,ye.jsx)("input",{type:"text",maxLength:6,placeholder:"A3F9K2",value:o,onChange:b=>s(b.target.value.toUpperCase()),autoFocus:!0,autoComplete:"off",style:{width:"100%",padding:"12px 16px",border:"1px solid #d4d4d8",borderRadius:8,fontSize:24,fontWeight:600,textAlign:"center",letterSpacing:8,textTransform:"uppercase",outline:"none",boxSizing:"border-box",fontFamily:"inherit",color:"#18181b"}}),(0,ye.jsx)("button",{type:"submit",disabled:o.trim().length<6||r,style:{width:"100%",marginTop:16,padding:"10px 16px",border:"none",borderRadius:8,fontSize:14,fontWeight:500,cursor:o.trim().length<6||r?"not-allowed":"pointer",background:o.trim().length<6||r?"#a1a1aa":"#18181b",color:"white",fontFamily:"inherit"},children:r?"\uC778\uC99D \uC911...":"\uC778\uC99D\uD558\uAE30"})]})]})]})]}),document.body)}var Ze=require("react/jsx-runtime");function Rr({endpoint:e,getUser:n}){let[t,o]=(0,Ee.useState)(!1),[s,r]=(0,Ee.useState)(!1),[a,i]=(0,Ee.useState)(()=>{try{return localStorage.getItem("impakers-debug-hidden")==="1"}catch{return!1}});(0,Ee.useEffect)(()=>{o(Xe())},[]),(0,Ee.useEffect)(()=>{let C=[ze._on("impakers-debug:show-auth",()=>{r(!0),i(!1);try{localStorage.removeItem("impakers-debug-hidden")}catch{}}),ze._on("impakers-debug:open",()=>{i(!1);try{localStorage.removeItem("impakers-debug-hidden")}catch{}}),ze._on("impakers-debug:deactivate",()=>{o(!1),r(!1)})];return()=>C.forEach(v=>v())},[]),(0,Ee.useEffect)(()=>{function C(v){if((v.ctrlKey||v.metaKey)&&v.shiftKey&&(v.key==="."||v.key===">"||v.code==="Period")){if(v.preventDefault(),a){i(!1);try{localStorage.removeItem("impakers-debug-hidden")}catch{}return}Xe()?o(!0):r($=>!$)}}return document.addEventListener("keydown",C),()=>document.removeEventListener("keydown",C)},[a]);let _=(0,Ee.useCallback)(C=>{o(!0),r(!1)},[]),k=(0,Ee.useCallback)(()=>{r(!1)},[]),b=(0,Ee.useCallback)(()=>{i(!0);try{localStorage.setItem("impakers-debug-hidden","1")}catch{}},[]);return(0,Ze.jsxs)(Ze.Fragment,{children:[t&&!a&&(0,Ze.jsx)(Lo,{endpoint:e,getUser:n,onHide:b}),s&&!t&&(0,Ze.jsx)(To,{endpoint:e,onSuccess:_,onClose:k})]})}0&&(module.exports={ImpakersDebug,ImpakersDebugProvider});
3565
+ }`,Ir={markersLayer:"styles-module__markersLayer___VR1cD",fixedMarkersLayer:"styles-module__fixedMarkersLayer___wBuxm",fab:"styles-module__fab___6FrCF",fabEnter:"styles-module__fabEnter___9koyT",active:"styles-module__active___X5PRD",hoverHighlight:"styles-module__hoverHighlight___9kGLL",enter:"styles-module__enter___jAi-c",hoverHighlightIn:"styles-module__hoverHighlightIn___ljC4F",singleSelectOutline:"styles-module__singleSelectOutline___2meUm",fadeIn:"styles-module__fadeIn___PpRqy",hoverTooltip:"styles-module__hoverTooltip___JE1Bs",hoverTooltipIn:"styles-module__hoverTooltipIn___tncNM",hoverReactPath:"styles-module__hoverReactPath___wPGYi",hoverElementName:"styles-module__hoverElementName___lNqTP",contextMenu:"styles-module__contextMenu___nDXft",contextMenuItem:"styles-module__contextMenuItem___69GKu",toast:"styles-module__toast___gV3Sa",toastIn:"styles-module__toastIn___V382h",toastOut:"styles-module__toastOut___zlqxG",toastError:"styles-module__toastError___Q-8dn",countdownOverlay:"styles-module__countdownOverlay___GruQJ",countdownNumber:"styles-module__countdownNumber___VAmkI",countdownPulse:"styles-module__countdownPulse___ngZrL",countdownLabel:"styles-module__countdownLabel___px-ao",countdownCancel:"styles-module__countdownCancel___8cRgZ",fadeOut:"styles-module__fadeOut___tZb9S"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-debug-widget-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-debug-widget-styles",document.head.appendChild(e)),e.textContent=Tr}var me=Ir;var x=require("react/jsx-runtime");function yt(e,n){let o=document.elementFromPoint(e,n);if(!o)return null;for(;o?.shadowRoot;){let t=o.shadowRoot.elementFromPoint(e,n);if(!t||t===o)break;o=t}return o}function Er(e){let n=e;for(;n&&n!==document.body;){let o=window.getComputedStyle(n);if(o.position==="fixed"||o.position==="sticky")return!0;n=n.parentElement}return!1}function Lo(e){let{name:n,path:o}=it(e),t=Ot(e,{mode:"filtered"});return{name:t.path?`${t.path} ${n}`:n,elementName:n,path:o,reactComponents:t.path}}function Rr(e){let n=Sn(e),o=n.found?n:lt(e);if(o.found&&o.source)return On(o.source,"path")}function Mr(e){let n=Sn(e),o=n.found?n:lt(e);return o.found&&o.sourceCandidates&&o.sourceCandidates.length>0?o.sourceCandidates.map(t=>On(t,"path")):o.found&&o.source?[On(o.source,"path")]:[]}function Ar(e,n){let o=e.match(/^(.+):(\d+)(?::(\d+))?$/);if(!o)return null;let[,t,s,r]=o,i=Number.parseInt(s,10),a=r?Number.parseInt(r,10):void 0;return!t||Number.isNaN(i)?null:{kind:"component",file:t,line:i,column:a,label:n||"Resolved component source",confidence:.98,reason:"resolved-from-source-map"}}var Pr="impakers-debug-markers-";function xt(){return Pr+window.location.pathname}function bt(){try{let e=localStorage.getItem(xt());return e?JSON.parse(e):[]}catch{return[]}}function To(e){try{e.length===0?localStorage.removeItem(xt()):localStorage.setItem(xt(),JSON.stringify(e))}catch{}}function Fr(e){return e.feedbackMarker?{id:e.id,x:e.feedbackMarker.x,y:e.feedbackMarker.y,comment:e.title.replace(/^\[피드백\]\s*/,""),element:e.feedbackMarker.element||"",elementPath:"",timestamp:new Date(e.createdAt).getTime(),isFixed:e.feedbackMarker.isFixed,boundingBox:e.feedbackMarker.boundingBox,status:e.status}:null}function Eo({endpoint:e,getUser:n,onHide:o}){let[t,s]=(0,y.useState)(!1),[r,i]=(0,y.useState)(()=>bt()),[a,p]=(0,y.useState)(null),[C,w]=(0,y.useState)(!1),[S,N]=(0,y.useState)(null),[B,A]=(0,y.useState)({x:0,y:0}),[j,U]=(0,y.useState)(new Set),[fe,ge]=(0,y.useState)(!1),[de,$]=(0,y.useState)(null),[P,Y]=(0,y.useState)(null),[b,z]=(0,y.useState)(!1),[R,he]=(0,y.useState)(null),[M,ee]=(0,y.useState)(null),[re,Te]=(0,y.useState)({}),[Fe,Ie]=(0,y.useState)(!1),[ie,k]=(0,y.useState)([]),[v,f]=(0,y.useState)([]),[L,D]=(0,y.useState)(!1),[ae,ce]=(0,y.useState)(!1),[F,ye]=(0,y.useState)(!1),[ue,m]=(0,y.useState)(()=>vo()),[K,$e]=(0,y.useState)(()=>window.location.pathname),[be,Qe]=(0,y.useState)(!1),[tn,Ue]=(0,y.useState)(0),[on,He]=(0,y.useState)(null),qe=(0,y.useRef)(null),mn=(0,y.useRef)(null),te=(0,y.useRef)(null),xe=(0,y.useRef)(!1),O=(0,y.useCallback)(()=>{He(3);let c=3,_=()=>{c-=1,c<=0?(He(null),s(!0),document.documentElement.classList.add("impakers-selecting")):(He(c),qe.current=setTimeout(_,1e3))};qe.current=setTimeout(_,1e3)},[]),Se=(0,y.useCallback)(c=>{c==="comment"?fn():c==="delay-capture"?O():c==="agent"?ce(!0):c==="inbox"?(D(!0),no(e,{staleWhileRevalidate:!0}).then(f).catch(()=>{}),t&&(s(!1),document.documentElement.classList.remove("impakers-selecting"),N(null),p(null))):c==="settings"&&ye(!0)},[t,O]),pn=(0,y.useCallback)(c=>{m(c),Co(c)},[]),fn=(0,y.useCallback)(()=>{s(c=>{let _=!c;return _?document.documentElement.classList.add("impakers-selecting"):(document.documentElement.classList.remove("impakers-selecting"),N(null),p(null)),_})},[]);(0,y.useEffect)(()=>()=>{document.documentElement.classList.remove("impakers-selecting")},[]),(0,y.useEffect)(()=>{i(bt());let c=()=>{$e(window.location.pathname),i(bt()),p(null),N(null)};window.addEventListener("popstate",c);let _=history.pushState.bind(history);return history.pushState=(...Z)=>{_(...Z),setTimeout(c,50)},()=>{window.removeEventListener("popstate",c),history.pushState=_}},[]),(0,y.useEffect)(()=>{let c=Ze(K),_=cn(c);_&&(k(_),Qe(!0));let Z=En(c,E=>{k(E),Qe(!0)});return eo(e,K,{staleWhileRevalidate:!0}).then(E=>{k(E),Qe(!0)}).catch(()=>{}),Z},[e,K]);let kt="impakers-debug-history-last-seen";(0,y.useEffect)(()=>{let c=localStorage.getItem(kt)||new Date(0).toISOString();qn(e,{since:c,limit:100}).then(_=>Ue(_.length)).catch(()=>{})},[e]);let Ao=(0,y.useCallback)(()=>{localStorage.setItem(kt,new Date().toISOString()),Ue(0)},[]);(0,y.useEffect)(()=>{if(!be)return;let c=ie.map(Fr).filter(_=>_!==null);i(c),To(c)},[ie,be]);let vt=(0,y.useRef)(!0);(0,y.useEffect)(()=>{if(vt.current){vt.current=!1;return}To(r)},[r]),(0,y.useEffect)(()=>{let c=_=>{if(_.key==="Escape"){if(L){D(!1);return}if(a){_.preventDefault(),w(!0),Ee(()=>{p(null),w(!1)},150);return}t&&(_.preventDefault(),s(!1),document.documentElement.classList.remove("impakers-selecting"),N(null))}};return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[L,a,t]),(0,y.useEffect)(()=>{if(!t||a)return;let c=_=>{let Z=_.composedPath()[0]||_.target;if(Je(Z,"[data-impakers-debug]")){N(null);return}let E=yt(_.clientX,_.clientY);if(!E||Je(E,"[data-impakers-debug]")){N(null);return}let{name:ke,elementName:Re,path:Ne,reactComponents:le}=Lo(E),T=E.getBoundingClientRect();N({element:ke,elementName:Re,elementPath:Ne,rect:T,reactComponents:le}),A({x:_.clientX,y:_.clientY})};return document.addEventListener("mousemove",c),()=>document.removeEventListener("mousemove",c)},[t,a]),(0,y.useEffect)(()=>{if(!t)return;let c=_=>{if(xe.current)return;let Z=_.composedPath()[0]||_.target;if(Je(Z,"[data-impakers-debug]")||Je(Z,"[data-annotation-popup]")||Je(Z,"[data-annotation-marker]"))return;if(a){_.preventDefault(),_.stopPropagation(),mn.current?.shake();return}_.preventDefault(),_.stopPropagation();let E=yt(_.clientX,_.clientY);if(!E)return;let{name:ke,path:Re,reactComponents:Ne}=Lo(E),le=E.getBoundingClientRect(),T=_.clientX/window.innerWidth*100,pe=Er(E),$n=pe?_.clientY:_.clientY+window.scrollY,bn=window.getSelection(),sn;bn&&bn.toString().trim().length>0&&(sn=bn.toString().trim().slice(0,500));let J=Bt(E),Pe=Ht(E);p({x:T,y:$n,clientY:_.clientY,element:ke,elementPath:Re,selectedText:sn,boundingBox:{x:le.left,y:pe?le.top:le.top+window.scrollY,width:le.width,height:le.height},nearbyText:Pt(E),cssClasses:Ft(E),isFixed:pe,fullPath:Dt(E),accessibility:zt(E),computedStyles:Pe,computedStylesObj:J,reactComponents:Ne??void 0,sourceFile:Rr(E),targetElement:E}),N(null);let Bn=Mr(E).filter(xn=>xn.includes("/chunks/"));Bn.length>0&&(async()=>{for(let xn of Bn)try{let Hn=await pt(xn);if(Hn){p(nt=>nt&&{...nt,resolvedSource:`${Hn.source}:${Hn.line}`,resolvedName:Hn.name??void 0});break}}catch{}})()};return document.addEventListener("click",c,!0),()=>document.removeEventListener("click",c,!0)},[t,a]);let gn=(0,y.useCallback)(c=>{he(c),Ee(()=>he(null),4e3)},[]),Po=(0,y.useCallback)(async c=>{if(!(!a||fe)){ge(!0);try{let _=Xt(n),Z=await Ut(),E=a.resolvedSource||a.sourceFile||"",ke=a.resolvedName||null;if(!a.resolvedSource&&a.sourceFile?.includes("/chunks/"))try{let J=await pt(a.sourceFile);J&&(E=`${J.source}:${J.line}:${J.column}`,ke=J.name)}catch{}let Re=await Qt(window.location.pathname),Ne=E&&!E.includes("/chunks/")?Ar(E,ke):null,le=qt(Ne?[Ne]:void 0,Re?.targets);le.length>0&&(_.debugTargets=le),Re?.context&&(_.routeDebug=Re.context);let T=[];T.push(`## \uD53C\uB4DC\uBC31 ${c}`),le.length>0&&(T.push(""),T.push("---"),T.push(""),T.push("**\uB514\uBC84\uAE45 \uD0C0\uAC9F \uD30C\uC77C**:"),le.forEach(J=>{let Pe=J.line?`:${J.line}${typeof J.column=="number"?`:${J.column}`:""}`:"";T.push(`- [${J.kind}] \`${J.file}${Pe}\` (${J.reason})`)}));let pe=[];if(a.element&&pe.push(`**\uC120\uD0DD\uB41C \uC694\uC18C**: ${a.element}`),a.elementPath&&pe.push(`**DOM \uACBD\uB85C**: \`${a.elementPath}\``),a.selectedText&&pe.push(`**\uC120\uD0DD\uB41C \uD14D\uC2A4\uD2B8**: "${a.selectedText}"`),a.reactComponents?.trim()?pe.push(`**React \uCEF4\uD3EC\uB10C\uD2B8**: ${a.reactComponents}`):ke&&pe.push(`**\uCEF4\uD3EC\uB10C\uD2B8/\uD568\uC218**: ${ke}`),E&&!E.includes("/chunks/")&&pe.push(`**\uC18C\uC2A4 \uD30C\uC77C**: \`${E}\``),a.cssClasses&&pe.push(`**CSS \uD074\uB798\uC2A4**: \`${a.cssClasses}\``),a.nearbyText&&pe.push(`**\uC8FC\uBCC0 \uD14D\uC2A4\uD2B8**: ${a.nearbyText}`),a.accessibility&&pe.push(`**\uC811\uADFC\uC131**: ${a.accessibility}`),pe.length>0&&(T.push(""),T.push("---"),T.push(""),pe.forEach(J=>T.push(J))),_.consoleErrors?.length&&(T.push(""),T.push("---"),T.push(""),T.push("**\uCD5C\uADFC \uCF58\uC194 \uC5D0\uB7EC**:"),_.consoleErrors.slice(-10).forEach(J=>T.push(`- \`${J.slice(0,200)}\``))),_.consoleLogs?.length){let J=_.consoleLogs.filter(Pe=>Pe.level==="error"||Pe.level==="warn").slice(-10);J.length>0&&(T.push(""),T.push("**\uCD5C\uADFC \uCF58\uC194 \uB85C\uADF8**:"),J.forEach(Pe=>T.push(`- [${Pe.level}] \`${Pe.message.slice(0,200)}\``)))}if(T.push(""),T.push("---"),T.push(""),T.push("## \uD658\uACBD \uC815\uBCF4"),T.push(""),T.push(`- **URL**: ${_.url}`),T.push(`- **\uC2DC\uC810**: ${new Date(_.timestamp).toLocaleString("ko-KR")}`),T.push(`- **\uBE0C\uB77C\uC6B0\uC800**: ${_.browser}`),T.push(`- **\uD654\uBA74**: ${_.viewport} (@${_.pixelRatio}x)`),T.push(`- **\uC5B8\uC5B4**: ${_.language}`),_.user?.name&&T.push(`- **\uC0AC\uC6A9\uC790**: ${_.user.name}`),_.performance&&Object.keys(_.performance).length>0){T.push(""),T.push("---"),T.push(""),T.push("## \uC131\uB2A5"),T.push(""),T.push("| \uD56D\uBAA9 | \uAC12 |"),T.push("|------|-----|");let J={pageLoadTime:"\uD398\uC774\uC9C0 \uB85C\uB529",domContentLoaded:"DOM \uB85C\uB4DC",ttfb:"TTFB",firstContentfulPaint:"FCP",usedJSHeapMB:"\uBA54\uBAA8\uB9AC \uC0AC\uC6A9",totalJSHeapMB:"\uBA54\uBAA8\uB9AC \uC804\uCCB4"};for(let[Pe,Lt]of Object.entries(_.performance)){let Bn=J[Pe]||Pe,xn=Pe.includes("Heap")?"MB":"ms";T.push(`| ${Bn} | ${Lt}${xn} |`)}}let $n=T.join(`
3566
+ `),bn=await Jt(e,{title:c.slice(0,100),description:"",priority:"medium",metadata:_,debugInfo:$n,debug_info:$n,screenshot:Z,feedbackUrl:window.location.pathname,feedbackMarker:{x:a.x,y:a.y,isFixed:a.isFixed||!1,element:a.element,boundingBox:a.boundingBox},authorName:n?.()?.name?String(n().name):void 0});z(!0),Ee(()=>z(!1),3e3);let sn=bn.taskId||null;te.current=sn,Ee(()=>{te.current=null},300),Ee(()=>{sn&&U(J=>new Set(J).add(sn))},250),w(!0),Ee(()=>{p(null),w(!1),s(!1),document.documentElement.classList.remove("impakers-selecting"),xe.current=!0,setTimeout(()=>{xe.current=!1},300)},150),window.getSelection()?.removeAllRanges()}catch(_){let Z=_?.message||"\uD53C\uB4DC\uBC31 \uC804\uC1A1 \uC2E4\uD328";gn(Z),console.error("[@impakers/debug] \uD53C\uB4DC\uBC31 \uC804\uC1A1 \uC2E4\uD328:",_)}finally{ge(!1)}}},[a,fe,e,n,gn]),Fo=(0,y.useCallback)(()=>{w(!0),Ee(()=>{p(null),w(!1),s(!1),document.documentElement.classList.remove("impakers-selecting"),xe.current=!0,setTimeout(()=>{xe.current=!1},300)},150)},[]),Ct=(0,y.useCallback)(c=>{let _=c.id;ee(Z=>Z===_?null:_)},[]);(0,y.useEffect)(()=>{if(!M)return;let c=Ye(M),_=cn(c);_?(Te(E=>({...E,[M]:_})),Ie(!1)):Ie(!0);let Z=En(c,E=>{Te(ke=>({...ke,[M]:E})),Ie(!1)});return Xn(e,M,{staleWhileRevalidate:!0}).then(()=>Ie(!1)).catch(()=>Ie(!1)),Z},[M,e]);let $o=(0,y.useCallback)(async(c,_,Z,E)=>{let ke=n?.()?.name?String(n().name):"\uC775\uBA85",Re=n?.()?.id?String(n().id):void 0;try{let Ne;if(E)try{Ne=await Qn(e,E,"comment",c)}catch(le){let T=le?.message||"\uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328";gn(T),console.error("[@impakers/debug] \uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328:",le)}await Yn(e,c,_,ke,Re,Z,Ne)}catch(Ne){let le=Ne?.message||"\uCF54\uBA58\uD2B8 \uC804\uC1A1 \uC2E4\uD328";gn(le),console.error("[@impakers/debug] \uCF54\uBA58\uD2B8 \uC804\uC1A1 \uC2E4\uD328:",Ne)}},[n,e,gn]),Bo=(0,y.useCallback)(()=>{ee(null)},[]),Fn=(0,y.useCallback)(c=>{if(!c){$(null),Y(null);return}if($(c.id),c.boundingBox){let _=c.boundingBox,Z=_.x+_.width/2,E=c.isFixed?_.y+_.height/2:_.y+_.height/2-window.scrollY,ke=yt(Z,E);if(ke){let Re=ke.getBoundingClientRect(),Ne=Re.width/_.width,le=Re.height/_.height;if(Ne>=.5&&le>=.5){Y(ke);return}}}Y(null)},[]),Ho=(0,y.useCallback)(()=>{if(!a)return{left:0,top:0};let c=a.x/100*window.innerWidth,_=a.isFixed?a.y:a.y-window.scrollY,Z=Math.max(160,Math.min(window.innerWidth-160,c));return _>window.innerHeight-290?{left:Z,bottom:window.innerHeight-_+20}:{left:Z,top:_+20}},[a]);if(typeof document>"u")return null;let hn=Ho(),yn=P?.getBoundingClientRect(),zo=[{id:"comment",label:"\uD53C\uB4DC\uBC31",active:t,icon:(0,x.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,x.jsx)("path",{d:"M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z"})})},{id:"delay-capture",label:"\uB51C\uB808\uC774 \uCEA1\uCC98",icon:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,x.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,x.jsx)("polyline",{points:"12 6 12 12 16 14"})]})},{id:"agent",label:"\uC5D0\uC774\uC804\uD2B8",icon:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,x.jsx)("path",{d:"M12 2L2 7l10 5 10-5-10-5z"}),(0,x.jsx)("path",{d:"M2 17l10 5 10-5"}),(0,x.jsx)("path",{d:"M2 12l10 5 10-5"})]})},{id:"inbox",label:"Inbox",badge:tn||void 0,icon:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,x.jsx)("polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12"}),(0,x.jsx)("path",{d:"M5.45 5.11L2 12v6a2 2 0 002 2h16a2 2 0 002-2v-6l-3.45-6.89A2 2 0 0016.76 4H7.24a2 2 0 00-1.79 1.11z"})]})},{id:"settings",label:"\uC124\uC815",icon:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,x.jsx)("circle",{cx:"12",cy:"12",r:"3"}),(0,x.jsx)("path",{d:"M19.4 15a1.65 1.65 0 00.33 1.82l.06.06a2 2 0 010 2.83 2 2 0 01-2.83 0l-.06-.06a1.65 1.65 0 00-1.82-.33 1.65 1.65 0 00-1 1.51V21a2 2 0 01-4 0v-.09A1.65 1.65 0 009 19.4a1.65 1.65 0 00-1.82.33l-.06.06a2 2 0 01-2.83-2.83l.06-.06A1.65 1.65 0 004.68 15a1.65 1.65 0 00-1.51-1H3a2 2 0 010-4h.09A1.65 1.65 0 004.6 9a1.65 1.65 0 00-.33-1.82l-.06-.06a2 2 0 012.83-2.83l.06.06A1.65 1.65 0 009 4.68a1.65 1.65 0 001-1.51V3a2 2 0 014 0v.09a1.65 1.65 0 001 1.51 1.65 1.65 0 001.82-.33l.06-.06a2 2 0 012.83 2.83l-.06.06A1.65 1.65 0 0019.4 9a1.65 1.65 0 001.51 1H21a2 2 0 010 4h-.09a1.65 1.65 0 00-1.51 1z"})]})}],wt=K,et=n?.()?.name?String(n().name):null,St=(0,y.useMemo)(()=>r.filter(c=>{let _=ie.find(Z=>Z.id===c.id);return!(ue.hideDoneMarkers&&(c.status==="done"||c.status==="resolved")||ue.showOnlyMine&&_?.authorName&&et&&_.authorName!==et)}),[r,ie,ue.hideDoneMarkers,ue.showOnlyMine,et]),Nt=(c,_)=>({id:c.id,title:c.title||"\uD53C\uB4DC\uBC31",status:c.status,priority:c.priority,authorName:c.authorName||"\uC775\uBA85",feedbackUrl:c.feedbackUrl||_,createdAt:c.createdAt,startedAt:c.startedAt,completedAt:c.completedAt,commentCount:c.commentCount||0}),Do=ie.map(c=>Nt(c,wt)),jo=v.map(c=>Nt(c,""));return(0,Io.createPortal)((0,x.jsxs)("div",{"data-impakers-debug":"",children:[(0,x.jsx)(_o,{items:zo,onSelect:Se,onHide:o,onDoubleTap:fn}),L&&(0,x.jsx)(go,{pageItems:Do,allItems:jo,currentPath:wt,serviceName:Et()||void 0,endpoint:e,currentUserName:n?.()?.name?String(n().name):"\uC775\uBA85",currentUserId:n?.()?.id?String(n().id):void 0,onClose:()=>D(!1),onHistoryViewed:Ao,newNotiCount:tn}),ae&&(0,x.jsx)(xo,{endpoint:e,onClose:()=>ce(!1)}),F&&(0,x.jsx)(No,{settings:ue,onChange:pn,onClose:()=>ye(!1)}),t&&(0,x.jsxs)(x.Fragment,{children:[S?.rect&&!a&&(0,x.jsx)("div",{className:`${me.hoverHighlight} ${me.enter}`,style:{left:S.rect.left,top:S.rect.top,width:S.rect.width,height:S.rect.height}}),S&&!a&&(0,x.jsxs)("div",{className:`${me.hoverTooltip} ${me.enter}`,style:{left:Math.min(B.x+14,window.innerWidth-200),top:B.y+14},children:[S.reactComponents&&(0,x.jsx)("div",{className:me.hoverReactPath,children:S.reactComponents}),(0,x.jsx)("div",{className:me.hoverElementName,children:S.elementName})]}),yn&&de&&(0,x.jsx)("div",{className:`${me.singleSelectOutline} ${me.enter}`,style:{left:yn.left,top:yn.top,width:yn.width,height:yn.height}}),a?.targetElement&&(()=>{let c=a.targetElement.getBoundingClientRect();return(0,x.jsx)("div",{className:`${me.singleSelectOutline} ${me.enter}`,style:{left:c.left,top:c.top,width:c.width,height:c.height}})})()]}),(0,x.jsx)("div",{className:me.markersLayer,"data-impakers-debug":"",style:{display:ue.markersVisible?void 0:"none"},children:St.filter(c=>!c.isFixed).map((c,_)=>(0,x.jsx)(ft,{annotation:c,layerIndex:_,isAnimated:j.has(c.id),isHovered:de===c.id,isDeleting:!1,markerClickBehavior:"edit",accentColor:ue.markerColor,onHover:()=>Fn(c),onHoverEnd:()=>Fn(null),onClick:()=>Ct(c),onContextMenu:()=>{}},c.id))}),(0,x.jsxs)("div",{className:me.fixedMarkersLayer,"data-impakers-debug":"",style:{display:ue.markersVisible?void 0:"none"},children:[St.filter(c=>c.isFixed).map((c,_)=>(0,x.jsx)(ft,{annotation:c,layerIndex:_,isAnimated:j.has(c.id),isHovered:de===c.id,isDeleting:!1,markerClickBehavior:"edit",accentColor:ue.markerColor,onHover:()=>Fn(c),onHoverEnd:()=>Fn(null),onClick:()=>Ct(c),onContextMenu:()=>{}},c.id)),a&&(0,x.jsx)(ro,{x:a.x,y:a.clientY,isMultiSelect:!1,accentColor:ue.markerColor})]}),a&&(0,x.jsx)(At,{ref:mn,element:a.resolvedSource||a.resolvedName||a.element,selectedText:a.selectedText,isExiting:C,style:{position:"fixed",left:hn.left,..."top"in hn?{top:hn.top}:{},..."bottom"in hn?{bottom:hn.bottom}:{},transform:"translateX(-50%)",zIndex:100001},onSubmit:Po,onCancel:Fo}),M&&(()=>{let c=r.find(pe=>pe.id===M),_=ie.find(pe=>pe.id===M);if(!c)return null;let Z=c.x/100*window.innerWidth,E=c.isFixed?c.y:c.y-window.scrollY,ke=Math.max(10,Math.min(Z+20,window.innerWidth-360)),Re=window.innerHeight-E,Ne=E,le=Re>=300?Math.min(E,window.innerHeight-60):Math.max(10,E-Math.min(480,Ne-10)),T={id:c.id,title:_?.title||c.comment||"\uD53C\uB4DC\uBC31",status:_?.status||"todo",authorName:_?.authorName||void 0,createdAt:_?.createdAt||new Date(c.timestamp).toISOString(),comments:re[c.id]||[]};return(0,x.jsx)(uo,{task:T,currentUserName:n?.()?.name?String(n().name):"\uC775\uBA85",currentUserId:n?.()?.id?String(n().id):void 0,left:ke,top:le,loading:Fe,onClose:Bo,onReply:$o})})(),on!==null&&(0,x.jsxs)("div",{className:me.countdownOverlay,"data-impakers-debug":"",children:[(0,x.jsx)("div",{className:me.countdownNumber,children:on}),(0,x.jsx)("div",{className:me.countdownLabel,children:"\uD53C\uB4DC\uBC31 \uBAA8\uB4DC \uD65C\uC131\uD654\uAE4C\uC9C0..."}),(0,x.jsx)("button",{className:me.countdownCancel,onClick:()=>{qe.current&&clearTimeout(qe.current),He(null)},type:"button",children:"\uCDE8\uC18C"})]}),b&&(0,x.jsxs)("div",{className:me.toast,"data-impakers-debug":"",children:[(0,x.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#16a34a",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,x.jsx)("polyline",{points:"20 6 9 17 4 12"})}),(0,x.jsx)("span",{children:"\uD0DC\uC2A4\uD06C \uC0DD\uC131\uC774 \uC644\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4"})]}),R&&(0,x.jsxs)("div",{className:`${me.toast} ${me.toastError}`,"data-impakers-debug":"",children:[(0,x.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#ef4444",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,x.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,x.jsx)("line",{x1:"15",y1:"9",x2:"9",y2:"15"}),(0,x.jsx)("line",{x1:"9",y1:"9",x2:"15",y2:"15"})]}),(0,x.jsx)("span",{children:R})]})]}),document.body)}var _n=require("react"),Ro=require("react-dom");var we=require("react/jsx-runtime");function Mo({endpoint:e,onSuccess:n,onClose:o}){let[t,s]=(0,_n.useState)(""),[r,i]=(0,_n.useState)(!1),[a,p]=(0,_n.useState)(null),C=(0,_n.useCallback)(async w=>{if(w.preventDefault(),!(!t.trim()||r)){i(!0),p(null);try{let S=await Rt(e,t.trim().toUpperCase());n(S.serviceName)}catch(S){p(S instanceof Error?S.message:"\uC778\uC99D \uC2E4\uD328")}finally{i(!1)}}},[t,e,r,n]);return typeof document>"u"?null:(0,Ro.createPortal)((0,we.jsxs)("div",{"data-impakers-debug":"",style:{position:"fixed",inset:0,zIndex:2147483647,display:"flex",alignItems:"center",justifyContent:"center",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif"},children:[(0,we.jsx)("div",{onClick:o,style:{position:"absolute",inset:0,background:"rgba(0, 0, 0, 0.4)"}}),(0,we.jsxs)("div",{style:{position:"relative",width:360,background:"white",borderRadius:12,boxShadow:"0 16px 48px rgba(0,0,0,0.16)",overflow:"hidden"},children:[(0,we.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"16px 20px",borderBottom:"1px solid #e5e5e5"},children:[(0,we.jsx)("h3",{style:{fontSize:15,fontWeight:600,color:"#18181b",margin:0},children:"\uD53C\uB4DC\uBC31 \uC704\uC82F \uC778\uC99D"}),(0,we.jsx)("button",{onClick:o,type:"button",style:{width:28,height:28,border:"none",background:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:6,color:"#71717a"},children:(0,we.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,we.jsx)("path",{d:"M18 6L6 18M6 6l12 12"})})})]}),(0,we.jsxs)("div",{style:{padding:20},children:[(0,we.jsxs)("p",{style:{fontSize:13,color:"#71717a",textAlign:"center",marginBottom:16,lineHeight:1.5},children:["\uC11C\uBE44\uC2A4 \uC2DC\uD06C\uB9BF \uCF54\uB4DC\uB97C \uC785\uB825\uD574\uC8FC\uC138\uC694.",(0,we.jsx)("br",{}),"\uCF54\uB4DC\uB294 \uC784\uD328\uCEE4\uC2A4 OS\uC5D0\uC11C \uD655\uC778\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."]}),a&&(0,we.jsx)("div",{style:{background:"#fef2f2",border:"1px solid #fecaca",color:"#dc2626",padding:"8px 12px",borderRadius:8,fontSize:13,marginBottom:12},children:a}),(0,we.jsxs)("form",{onSubmit:C,children:[(0,we.jsx)("input",{type:"text",maxLength:6,placeholder:"A3F9K2",value:t,onChange:w=>s(w.target.value.toUpperCase()),autoFocus:!0,autoComplete:"off",style:{width:"100%",padding:"12px 16px",border:"1px solid #d4d4d8",borderRadius:8,fontSize:24,fontWeight:600,textAlign:"center",letterSpacing:8,textTransform:"uppercase",outline:"none",boxSizing:"border-box",fontFamily:"inherit",color:"#18181b"}}),(0,we.jsx)("button",{type:"submit",disabled:t.trim().length<6||r,style:{width:"100%",marginTop:16,padding:"10px 16px",border:"none",borderRadius:8,fontSize:14,fontWeight:500,cursor:t.trim().length<6||r?"not-allowed":"pointer",background:t.trim().length<6||r?"#a1a1aa":"#18181b",color:"white",fontFamily:"inherit"},children:r?"\uC778\uC99D \uC911...":"\uC778\uC99D\uD558\uAE30"})]})]})]})]}),document.body)}var nn=require("react/jsx-runtime");function $r({endpoint:e,getUser:n}){let[o,t]=(0,Be.useState)(!1),[s,r]=(0,Be.useState)(!1),[i,a]=(0,Be.useState)(()=>{try{return localStorage.getItem("impakers-debug-hidden")==="1"}catch{return!1}});(0,Be.useEffect)(()=>{t(rn())},[]),(0,Be.useEffect)(()=>{let S=[Ke._on("impakers-debug:show-auth",()=>{r(!0),a(!1);try{localStorage.removeItem("impakers-debug-hidden")}catch{}}),Ke._on("impakers-debug:open",()=>{a(!1);try{localStorage.removeItem("impakers-debug-hidden")}catch{}}),Ke._on("impakers-debug:deactivate",()=>{t(!1),r(!1)})];return()=>S.forEach(N=>N())},[]),(0,Be.useEffect)(()=>{function S(N){if((N.ctrlKey||N.metaKey)&&N.shiftKey&&(N.key==="."||N.key===">"||N.code==="Period")){if(N.preventDefault(),i){a(!1);try{localStorage.removeItem("impakers-debug-hidden")}catch{}return}rn()?t(!0):r(B=>!B)}}return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[i]);let p=(0,Be.useCallback)(S=>{t(!0),r(!1)},[]),C=(0,Be.useCallback)(()=>{r(!1)},[]),w=(0,Be.useCallback)(()=>{a(!0);try{localStorage.setItem("impakers-debug-hidden","1")}catch{}},[]);return(0,nn.jsxs)(nn.Fragment,{children:[o&&!i&&(0,nn.jsx)(Eo,{endpoint:e,getUser:n,onHide:w}),s&&!o&&(0,nn.jsx)(Mo,{endpoint:e,onSuccess:p,onClose:C})]})}0&&(module.exports={ImpakersDebug,ImpakersDebugProvider});