@impakers/debug 1.5.1 → 1.5.3

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.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- "use client";import{useEffect as Et,useState as Rt,useCallback as Mt}from"react";var Ut="impakers-debug-token",Bn="impakers-debug-token-data";function fn(){if(typeof window>"u")return null;try{let e=localStorage.getItem(Bn);if(!e)return null;let n=JSON.parse(e);return new Date(n.expiresAt)<new Date?(rt(),null):n.token}catch{return null}}function Qe(){return fn()!==null}function Xt(){if(typeof window>"u")return null;try{let e=localStorage.getItem(Bn);return e?JSON.parse(e).serviceName:null}catch{return null}}function cs(e){if(!(typeof window>"u"))try{let n={token:e.token,serviceName:e.serviceName,expiresAt:e.expiresAt};localStorage.setItem(Bn,JSON.stringify(n)),localStorage.setItem(Ut,e.token)}catch{}}function rt(){if(!(typeof window>"u"))try{localStorage.removeItem(Bn),localStorage.removeItem(Ut)}catch{}}async function Yt(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 cs(s),s}var Fe=class Fe{static showAuth(){Fe._eventTarget?.dispatchEvent(new CustomEvent("impakers-debug:show-auth"))}static isActive(){return Qe()}static deactivate(){rt(),Fe._eventTarget?.dispatchEvent(new CustomEvent("impakers-debug:deactivate"))}static open(){if(!Qe()){Fe.showAuth();return}Fe._eventTarget?.dispatchEvent(new CustomEvent("impakers-debug:open"))}static _on(n,o){return Fe._eventTarget?.addEventListener(n,o),()=>Fe._eventTarget?.removeEventListener(n,o)}};Fe._eventTarget=typeof EventTarget<"u"?new EventTarget:null;var Oe=Fe;import{useState as U,useCallback as we,useEffect as Ae,useRef as Rn,useMemo as Gr}from"react";import{createPortal as Jr}from"react-dom";import{useState as gn,useRef as zn,useEffect as Gt,useCallback as Dn,forwardRef as fs,useImperativeHandle as gs}from"react";var us=`.styles-module__popup___IhzrD svg[fill=none] {
2
+ "use client";import{useEffect as jt,useState as Wt,useCallback as Ot}from"react";var Qt="impakers-debug-token",Qn="impakers-debug-token-data";function en(){if(typeof window>"u")return null;try{let e=localStorage.getItem(Qn);if(!e)return null;let n=JSON.parse(e);return new Date(n.expiresAt)<new Date?(gt(),null):n.token}catch{return null}}function cn(){return en()!==null}function qt(){if(typeof window>"u")return null;try{let e=localStorage.getItem(Qn);return e?JSON.parse(e).serviceName:null}catch{return null}}function _s(e){if(!(typeof window>"u"))try{let n={token:e.token,serviceName:e.serviceName,expiresAt:e.expiresAt};localStorage.setItem(Qn,JSON.stringify(n)),localStorage.setItem(Qt,e.token)}catch{}}function gt(){if(!(typeof window>"u"))try{localStorage.removeItem(Qn),localStorage.removeItem(Qt)}catch{}}async function Gt(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 _s(s),s}var We=class We{static showAuth(){We._eventTarget?.dispatchEvent(new CustomEvent("impakers-debug:show-auth"))}static isActive(){return cn()}static deactivate(){gt(),We._eventTarget?.dispatchEvent(new CustomEvent("impakers-debug:deactivate"))}static open(){if(!cn()){We.showAuth();return}We._eventTarget?.dispatchEvent(new CustomEvent("impakers-debug:open"))}static _on(n,o){return We._eventTarget?.addEventListener(n,o),()=>We._eventTarget?.removeEventListener(n,o)}};We._eventTarget=typeof EventTarget<"u"?new EventTarget:null;var nn=We;import{useState as ne,useCallback as Re,useEffect as je,useRef as Vn,useMemo as si}from"react";import{createPortal as ri}from"react-dom";import{useState as In,useRef as qn,useEffect as no,useCallback as Gn,forwardRef as hs,useImperativeHandle as ys}from"react";var ms=`.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
- }`,_s={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=us}var D=_s;import{jsx as Qt,jsxs as hi}from"react/jsx-runtime";var qt=({size:e=24})=>Qt("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Qt("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 ms=["data-feedback-toolbar","data-annotation-popup","data-annotation-marker"],bi=ms.flatMap(e=>[`:not([${e}])`,`:not([${e}] *)`]).join("");var it="__agentation_freeze";function ps(){if(typeof window>"u")return{frozen:!1,installed:!0,origSetTimeout:setTimeout,origSetInterval:setInterval,origRAF:n=>0,pausedAnimations:[],frozenTimeoutQueue:[],frozenRAFQueue:[]};let e=window;return e[it]||(e[it]={frozen:!1,installed:!1,origSetTimeout:null,origSetInterval:null,origRAF:null,pausedAnimations:[],frozenTimeoutQueue:[],frozenRAFQueue:[]}),e[it]}var ae=ps();typeof window<"u"&&!ae.installed&&(ae.origSetTimeout=window.setTimeout.bind(window),ae.origSetInterval=window.setInterval.bind(window),ae.origRAF=window.requestAnimationFrame.bind(window),window.setTimeout=(e,n,...o)=>typeof e=="string"?ae.origSetTimeout(e,n):ae.origSetTimeout((...t)=>{ae.frozen?ae.frozenTimeoutQueue.push(()=>e(...t)):e(...t)},n,...o),window.setInterval=(e,n,...o)=>typeof e=="string"?ae.origSetInterval(e,n):ae.origSetInterval((...t)=>{ae.frozen||e(...t)},n,...o),window.requestAnimationFrame=e=>ae.origRAF(n=>{ae.frozen?ae.frozenRAFQueue.push(e):e(n)}),ae.installed=!0);var ge=ae.origSetTimeout,xi=ae.origSetInterval,ki=ae.origRAF;import{jsx as fe,jsxs as Ve}from"react/jsx-runtime";function at(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 Jt=fs(function({element:n,timestamp:o,selectedText:t,placeholder:s="What should change?",initialValue:r="",submitLabel:a="Add",onSubmit:i,onCancel:_,onDelete:b,style:h,accentColor:k="#3c82f7",isExiting:x=!1,lightMode:P=!1,computedStyles:M},$){let[j,re]=gn(r),[de,L]=gn(!1),[v,N]=gn("initial"),[W,y]=gn(!1),[R,T]=gn(!1),X=zn(null),E=zn(null),Q=zn(null),J=zn(null);Gt(()=>{x&&v!=="exit"&&N("exit")},[x,v]),Gt(()=>{ge(()=>{N("enter")},0);let p=ge(()=>{N("entered")},200),H=ge(()=>{let A=X.current;A&&(at(A),A.selectionStart=A.selectionEnd=A.value.length,A.scrollTop=A.scrollHeight)},50);return()=>{clearTimeout(p),clearTimeout(H),Q.current&&clearTimeout(Q.current),J.current&&clearTimeout(J.current)}},[]);let ce=Dn(()=>{J.current&&clearTimeout(J.current),L(!0),J.current=ge(()=>{L(!1),at(X.current)},250)},[]);gs($,()=>({shake:ce}),[ce]);let he=Dn(()=>{N("exit"),Q.current=ge(()=>{_()},150)},[_]),ee=Dn(()=>{j.trim()&&i(j.trim())},[j,i]),te=Dn(p=>{p.stopPropagation(),!p.nativeEvent.isComposing&&(p.key==="Enter"&&(p.metaKey||p.ctrlKey)&&(p.preventDefault(),ee()),p.key==="Escape"&&he())},[ee,he]),g=[D.popup,P?D.light:"",v==="enter"?D.enter:"",v==="entered"?D.entered:"",v==="exit"?D.exit:"",de?D.shake:""].filter(Boolean).join(" ");return Ve("div",{ref:E,className:g,"data-annotation-popup":!0,style:h,onClick:p=>p.stopPropagation(),children:[Ve("div",{className:D.header,children:[M&&Object.keys(M).length>0?Ve("button",{className:D.headerToggle,onClick:()=>{let p=R;T(!R),p&&ge(()=>at(X.current),0)},type:"button",children:[fe("svg",{className:`${D.chevron} ${R?D.expanded:""}`,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:fe("path",{d:"M5.5 10.25L9 7.25L5.75 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),fe("span",{className:D.element,children:n})]}):fe("span",{className:D.element,children:n}),o&&fe("span",{className:D.timestamp,children:o})]}),M&&Object.keys(M).length>0&&fe("div",{className:`${D.stylesWrapper} ${R?D.expanded:""}`,children:fe("div",{className:D.stylesInner,children:fe("div",{className:D.stylesBlock,children:Object.entries(M).map(([p,H])=>Ve("div",{className:D.styleLine,children:[fe("span",{className:D.styleProperty,children:p.replace(/([A-Z])/g,"-$1").toLowerCase()}),": ",fe("span",{className:D.styleValue,children:H}),";"]},p))})})}),t&&Ve("div",{className:D.quote,children:["\u201C",t.slice(0,80),t.length>80?"...":"","\u201D"]}),fe("textarea",{ref:X,className:D.textarea,style:{borderColor:W?k:void 0},placeholder:s,value:j,onChange:p=>{re(p.target.value);let H=p.target;H.style.height="auto",H.style.height=`${Math.min(H.scrollHeight,200)}px`},onFocus:()=>y(!0),onBlur:()=>y(!1),rows:4,onKeyDown:te}),Ve("div",{className:D.actions,children:[b&&fe("div",{className:D.deleteWrapper,children:fe("button",{className:D.deleteButton,onClick:b,type:"button",children:fe(qt,{size:22})})}),fe("button",{className:D.cancel,onClick:he,children:"Cancel"}),fe("button",{className:D.submit,style:{backgroundColor:k,opacity:j.trim()?1:.4},onClick:ee,disabled:!j.trim(),children:a})]}),Ve("div",{className:D.shortcutHint,children:[navigator?.platform?.includes("Mac")?"\u2318":"Ctrl","+Enter to submit"]})]})});function hn(e){if(e.parentElement)return e.parentElement;let n=e.getRootNode();return n instanceof ShadowRoot?n.host:null}function Ze(e,n){let o=e;for(;o;){if(o.matches(n))return o;o=hn(o)}return null}function hs(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 a=r;if(t.id)a=`#${t.id}`;else if(t.className&&typeof t.className=="string"){let _=t.className.split(/\s+/).find(b=>b.length>2&&!b.match(/^[a-z]{1,2}$/)&&!b.match(/[A-Z0-9]{5,}/));_&&(a=`.${_.split("_")[0]}`)}let i=hn(t);!t.parentElement&&i&&(a=`\u27E8shadow\u27E9 ${a}`),o.unshift(a),t=i,s++}return o.join(" > ")}function lt(e){let n=hs(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=Ze(e,"svg");if(t){let s=hn(t);if(s instanceof HTMLElement)return{name:`graphic in ${lt(s).name}`,path:n}}return{name:"graphic element",path:n}}if(o==="svg"){let t=hn(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 a=t.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:o==="div"?"container":o,path:n}}return{name:o,path:n}}function eo(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 no(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 to=new Set(["none","normal","auto","0px","rgba(0, 0, 0, 0)","transparent","static","visible"]),ys=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"]),bs=new Set(["input","textarea","select"]),xs=new Set(["img","video","canvas","svg"]),ks=new Set(["div","section","article","nav","header","footer","aside","main","ul","ol","form","fieldset"]);function oo(e){if(typeof window>"u")return{};let n=window.getComputedStyle(e),o={},t=e.tagName.toLowerCase(),s;ys.has(t)?s=["color","fontSize","fontWeight","fontFamily","lineHeight"]:t==="button"||t==="a"&&e.getAttribute("role")==="button"?s=["backgroundColor","color","padding","borderRadius","fontSize"]:bs.has(t)?s=["backgroundColor","color","padding","borderRadius","fontSize"]:xs.has(t)?s=["width","height","objectFit","borderRadius"]:ks.has(t)?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&&!to.has(i)&&(o[r]=i)}return o}var vs=["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 so(e){if(typeof window>"u")return"";let n=window.getComputedStyle(e),o=[];for(let t of vs){let s=t.replace(/([A-Z])/g,"-$1").toLowerCase(),r=n.getPropertyValue(s);r&&!to.has(r)&&o.push(`${s}: ${r}`)}return o.join("; ")}function ro(e){let n=[],o=e.getAttribute("role"),t=e.getAttribute("aria-label"),s=e.getAttribute("aria-describedby"),r=e.getAttribute("tabindex"),a=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}`),a==="true"&&n.push("aria-hidden"),e.matches("a, button, input, select, textarea, [tabindex]")&&n.push("focusable"),n.join(", ")}function io(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 a=o.className.split(/\s+/).map(i=>i.replace(/[_][a-zA-Z0-9]{5,}.*$/,"")).find(i=>i.length>2);a&&(s=`${t}.${a}`)}let r=hn(o);!o.parentElement&&r&&(s=`\u27E8shadow\u27E9 ${s}`),n.unshift(s),o=r}return n.join(" > ")}var B={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},ao=new Set(["Component","PureComponent","Fragment","Suspense","Profiler","StrictMode","Routes","Route","Outlet","Root","ErrorBoundaryHandler","HotReload","Hot"]),lo=[/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$/],Cs=[/Page$/,/View$/,/Screen$/,/Section$/,/Card$/,/List$/,/Item$/,/Form$/,/Modal$/,/Dialog$/,/Button$/,/Nav$/,/Header$/,/Footer$/,/Layout$/,/Panel$/,/Tab$/,/Menu$/];function ws(e){let n=e?.mode??"filtered",o=ao;if(e?.skipExact){let t=e.skipExact instanceof Set?e.skipExact:new Set(e.skipExact);o=new Set([...ao,...t])}return{maxComponents:e?.maxComponents??6,maxDepth:e?.maxDepth??30,mode:n,skipExact:o,skipPatterns:e?.skipPatterns?[...lo,...e.skipPatterns]:lo,userPatterns:e?.userPatterns??Cs,filter:e?.filter}}function Ss(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/([A-Z])([A-Z][a-z])/g,"$1-$2").toLowerCase()}function Ls(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 a=r.replace(/[_][a-zA-Z0-9]{5,}.*$/,"").toLowerCase();a.length>1&&o.add(a)}}),t=t.parentElement,s++;return o}function Ns(e,n){let o=Ss(e);for(let t of n){if(t===o)return!0;let s=o.split("-").filter(a=>a.length>2),r=t.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 Ts(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&&Ns(e,t)||o.userPatterns.some(s=>s.test(e)));default:return!0}}var qe=null,Is=new WeakMap;function dt(e){return Object.keys(e).some(n=>n.startsWith("__reactFiber$")||n.startsWith("__reactInternalInstance$")||n.startsWith("__reactProps$"))}function Es(){if(qe!==null)return qe;if(typeof document>"u")return!1;if(document.body&&dt(document.body))return qe=!0,!0;let e=["#root","#app","#__next","[data-reactroot]"];for(let n of e){let o=document.querySelector(n);if(o&&dt(o))return qe=!0,!0}if(document.body){for(let n of document.body.children)if(dt(n))return qe=!0,!0}return qe=!1,!1}var yn={map:Is};function Rs(e){return Object.keys(e).find(o=>o.startsWith("__reactFiber$")||o.startsWith("__reactInternalInstance$"))||null}function Ms(e){let n=Rs(e);return n?e[n]:null}function Ke(e){return e?e.displayName?e.displayName:e.name?e.name:null:null}function As(e){let{tag:n,type:o,elementType:t}=e;if(n===B.HostComponent||n===B.HostText||n===B.HostHoistable||n===B.HostSingleton||n===B.Fragment||n===B.Mode||n===B.Profiler||n===B.DehydratedFragment||n===B.HostRoot||n===B.HostPortal||n===B.ScopeComponent||n===B.OffscreenComponent||n===B.LegacyHiddenComponent||n===B.CacheComponent||n===B.TracingMarkerComponent||n===B.Throw||n===B.ViewTransitionComponent||n===B.ActivityComponent)return null;if(n===B.ForwardRef){let s=t;if(s?.render){let r=Ke(s.render);if(r)return r}return s?.displayName?s.displayName:Ke(o)}if(n===B.MemoComponent||n===B.SimpleMemoComponent){let s=t;if(s?.type){let r=Ke(s.type);if(r)return r}return s?.displayName?s.displayName:Ke(o)}if(n===B.ContextProvider){let s=o;return s?._context?.displayName?`${s._context.displayName}.Provider`:null}if(n===B.ContextConsumer){let s=o;return s?.displayName?`${s.displayName}.Consumer`:null}if(n===B.LazyComponent){let s=t;return s?._status===1&&s._result?Ke(s._result):null}return n===B.SuspenseComponent||n===B.SuspenseListComponent?null:n===B.IncompleteClassComponent||n===B.IncompleteFunctionComponent||n===B.FunctionComponent||n===B.ClassComponent||n===B.IndeterminateComponent?Ke(o):null}function Fs(e){return e.length<=2||e.length<=3&&e===e.toLowerCase()}function co(e,n){let o=ws(n),t=o.mode==="all";if(t){let _=yn.map.get(e);if(_!==void 0)return _}if(!Es()){let _={path:null,components:[]};return t&&yn.map.set(e,_),_}let s=o.mode==="smart"?Ls(e):void 0,r=[];try{let _=Ms(e),b=0;for(;_&&b<o.maxDepth&&r.length<o.maxComponents;){let h=As(_);h&&!Fs(h)&&Ts(h,b,o,s)&&r.push(h),_=_.return,b++}}catch{let _={path:null,components:[]};return t&&yn.map.set(e,_),_}if(r.length===0){let _={path:null,components:[]};return t&&yn.map.set(e,_),_}let i={path:r.slice().reverse().map(_=>`<${_}>`).join(" "),components:r};return t&&yn.map.set(e,i),i}import Ps from"react";var bn={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 $s(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 a=e[r];return a&&typeof a=="object"&&"_debugSource"in a});return s&&e[s]||null}function xn(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 o=e,t=0;for(;o&&t<n;){if(o._debugSource)return{source:o._debugSource,componentName:xn(o)};if(o._debugOwner?._debugSource)return{source:o._debugOwner._debugSource,componentName:xn(o._debugOwner)};o=o.return,t++}return null}function Bs(e){let n=e,o=0,t=50;for(;n&&o<t;){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:xn(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:xn(n)}}}n=n.return,o++}return null}var jn=new Map;function zs(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===bn.FunctionComponent||n===bn.IndeterminateComponent)&&typeof o=="function")return o;if(n===bn.ForwardRef&&t){let s=t.render;if(typeof s=="function")return s}if((n===bn.MemoComponent||n===bn.SimpleMemoComponent)&&t){let s=t.type;if(typeof s=="function")return s}return typeof o=="function"?o:null}function Ds(){let e=Ps,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 js(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 a of n){let i=a.trim();if(!i||o.some(b=>b.test(i)))continue;let _=t.exec(i)||s.exec(i);if(_&&(r++,r>=3))return{fileName:_[1],line:parseInt(_[2],10),column:parseInt(_[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 Os(e){let n=zs(e);if(!n)return null;if(jn.has(n))return jn.get(n);let o=Ds();if(!o)return jn.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(a){if(a instanceof Error&&a.stack){let i=js(a.stack);i&&(s={fileName:Ws(i.fileName),lineNumber:i.line,columnNumber:i.column,componentName:xn(e)||void 0})}}}finally{o.set(t)}return jn.set(n,s),s}function Vs(e,n=15){let o=[],t=new Set,s=e,r=0;for(;s&&r<n;){let a=Os(s);a&&!t.has(a.fileName)&&(t.add(a.fileName),o.push(a)),s=s.return,r++}return o}function kn(e){let n=$s(e);if(!n)return{found:!1,reason:"no-fiber",isReactApp:!1,isProduction:!1};let o=Hs(n);if(o||(o=Bs(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=Vs(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 Wn(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 ct(e,n=10){let o=e,t=0;for(;o&&t<n;){let s=kn(o);if(s.found)return s;o=o.parentElement,t++}return kn(e)}async function On(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 uo(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(_=>_.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 be=[],Cn=[],_o=!1;function ut(e){return e.map(n=>{if(n instanceof Error)return`${n.message}
332
+ }`,ps={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=ms}var U=ps;import{jsx as Jt,jsxs as Ci}from"react/jsx-runtime";var eo=({size:e=24})=>Jt("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Jt("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 fs=["data-feedback-toolbar","data-annotation-popup","data-annotation-marker"],Si=fs.flatMap(e=>[`:not([${e}])`,`:not([${e}] *)`]).join("");var ht="__agentation_freeze";function gs(){if(typeof window>"u")return{frozen:!1,installed:!0,origSetTimeout:setTimeout,origSetInterval:setInterval,origRAF:n=>0,pausedAnimations:[],frozenTimeoutQueue:[],frozenRAFQueue:[]};let e=window;return e[ht]||(e[ht]={frozen:!1,installed:!1,origSetTimeout:null,origSetInterval:null,origRAF:null,pausedAnimations:[],frozenTimeoutQueue:[],frozenRAFQueue:[]}),e[ht]}var ge=gs();typeof window<"u"&&!ge.installed&&(ge.origSetTimeout=window.setTimeout.bind(window),ge.origSetInterval=window.setInterval.bind(window),ge.origRAF=window.requestAnimationFrame.bind(window),window.setTimeout=(e,n,...o)=>typeof e=="string"?ge.origSetTimeout(e,n):ge.origSetTimeout((...t)=>{ge.frozen?ge.frozenTimeoutQueue.push(()=>e(...t)):e(...t)},n,...o),window.setInterval=(e,n,...o)=>typeof e=="string"?ge.origSetInterval(e,n):ge.origSetInterval((...t)=>{ge.frozen||e(...t)},n,...o),window.requestAnimationFrame=e=>ge.origRAF(n=>{ge.frozen?ge.frozenRAFQueue.push(e):e(n)}),ge.installed=!0);var Ne=ge.origSetTimeout,Ni=ge.origSetInterval,Li=ge.origRAF;import{jsx as Ce,jsxs as tn}from"react/jsx-runtime";function yt(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 to=hs(function({element:n,timestamp:o,selectedText:t,placeholder:s="What should change?",initialValue:r="",submitLabel:i="Add",onSubmit:a,onCancel:_,onDelete:k,style:v,accentColor:C="#3c82f7",isExiting:w=!1,lightMode:B=!1,computedStyles:R},D){let[K,ce]=In(r),[ue,re]=In(!1),[A,M]=In("initial"),[Y,h]=In(!1),[z,T]=In(!1),_e=qn(null),I=qn(null),J=qn(null),oe=qn(null);no(()=>{w&&A!=="exit"&&M("exit")},[w,A]),no(()=>{Ne(()=>{M("enter")},0);let x=Ne(()=>{M("entered")},200),ee=Ne(()=>{let p=_e.current;p&&(yt(p),p.selectionStart=p.selectionEnd=p.value.length,p.scrollTop=p.scrollHeight)},50);return()=>{clearTimeout(x),clearTimeout(ee),J.current&&clearTimeout(J.current),oe.current&&clearTimeout(oe.current)}},[]);let me=Gn(()=>{oe.current&&clearTimeout(oe.current),re(!0),oe.current=Ne(()=>{re(!1),yt(_e.current)},250)},[]);ys(D,()=>({shake:me}),[me]);let Me=Gn(()=>{M("exit"),J.current=Ne(()=>{_()},150)},[_]),we=Gn(()=>{K.trim()&&a(K.trim())},[K,a]),pe=Gn(x=>{x.stopPropagation(),!x.nativeEvent.isComposing&&(x.key==="Enter"&&(x.metaKey||x.ctrlKey)&&(x.preventDefault(),we()),x.key==="Escape"&&Me())},[we,Me]),b=[U.popup,B?U.light:"",A==="enter"?U.enter:"",A==="entered"?U.entered:"",A==="exit"?U.exit:"",ue?U.shake:""].filter(Boolean).join(" ");return tn("div",{ref:I,className:b,"data-annotation-popup":!0,style:v,onClick:x=>x.stopPropagation(),children:[tn("div",{className:U.header,children:[R&&Object.keys(R).length>0?tn("button",{className:U.headerToggle,onClick:()=>{let x=z;T(!z),x&&Ne(()=>yt(_e.current),0)},type:"button",children:[Ce("svg",{className:`${U.chevron} ${z?U.expanded:""}`,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Ce("path",{d:"M5.5 10.25L9 7.25L5.75 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Ce("span",{className:U.element,children:n})]}):Ce("span",{className:U.element,children:n}),o&&Ce("span",{className:U.timestamp,children:o})]}),R&&Object.keys(R).length>0&&Ce("div",{className:`${U.stylesWrapper} ${z?U.expanded:""}`,children:Ce("div",{className:U.stylesInner,children:Ce("div",{className:U.stylesBlock,children:Object.entries(R).map(([x,ee])=>tn("div",{className:U.styleLine,children:[Ce("span",{className:U.styleProperty,children:x.replace(/([A-Z])/g,"-$1").toLowerCase()}),": ",Ce("span",{className:U.styleValue,children:ee}),";"]},x))})})}),t&&tn("div",{className:U.quote,children:["\u201C",t.slice(0,80),t.length>80?"...":"","\u201D"]}),Ce("textarea",{ref:_e,className:U.textarea,style:{borderColor:Y?C:void 0},placeholder:s,value:K,onChange:x=>{ce(x.target.value);let ee=x.target;ee.style.height="auto",ee.style.height=`${Math.min(ee.scrollHeight,200)}px`},onFocus:()=>h(!0),onBlur:()=>h(!1),rows:4,onKeyDown:pe}),tn("div",{className:U.actions,children:[k&&Ce("div",{className:U.deleteWrapper,children:Ce("button",{className:U.deleteButton,onClick:k,type:"button",children:Ce(eo,{size:22})})}),Ce("button",{className:U.cancel,onClick:Me,children:"Cancel"}),Ce("button",{className:U.submit,style:{backgroundColor:C,opacity:K.trim()?1:.4},onClick:we,disabled:!K.trim(),children:i})]}),tn("div",{className:U.shortcutHint,children:[navigator?.platform?.includes("Mac")?"\u2318":"Ctrl","+Enter to submit"]})]})});function En(e){if(e.parentElement)return e.parentElement;let n=e.getRootNode();return n instanceof ShadowRoot?n.host:null}function on(e,n){let o=e;for(;o;){if(o.matches(n))return o;o=En(o)}return null}function bs(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 _=t.className.split(/\s+/).find(k=>k.length>2&&!k.match(/^[a-z]{1,2}$/)&&!k.match(/[A-Z0-9]{5,}/));_&&(i=`.${_.split("_")[0]}`)}let a=En(t);!t.parentElement&&a&&(i=`\u27E8shadow\u27E9 ${i}`),o.unshift(i),t=a,s++}return o.join(" > ")}function bt(e){let n=bs(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=on(e,"svg");if(t){let s=En(t);if(s instanceof HTMLElement)return{name:`graphic in ${bt(s).name}`,path:n}}return{name:"graphic element",path:n}}if(o==="svg"){let t=En(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 oo(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 so(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 ro=new Set(["none","normal","auto","0px","rgba(0, 0, 0, 0)","transparent","static","visible"]),xs=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"]),ks=new Set(["input","textarea","select"]),vs=new Set(["img","video","canvas","svg"]),Cs=new Set(["div","section","article","nav","header","footer","aside","main","ul","ol","form","fieldset"]);function io(e){if(typeof window>"u")return{};let n=window.getComputedStyle(e),o={},t=e.tagName.toLowerCase(),s;xs.has(t)?s=["color","fontSize","fontWeight","fontFamily","lineHeight"]:t==="button"||t==="a"&&e.getAttribute("role")==="button"?s=["backgroundColor","color","padding","borderRadius","fontSize"]:ks.has(t)?s=["backgroundColor","color","padding","borderRadius","fontSize"]:vs.has(t)?s=["width","height","objectFit","borderRadius"]:Cs.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&&!ro.has(a)&&(o[r]=a)}return o}var ws=["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 ao(e){if(typeof window>"u")return"";let n=window.getComputedStyle(e),o=[];for(let t of ws){let s=t.replace(/([A-Z])/g,"-$1").toLowerCase(),r=n.getPropertyValue(s);r&&!ro.has(r)&&o.push(`${s}: ${r}`)}return o.join("; ")}function lo(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 co(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=En(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},uo=new Set(["Component","PureComponent","Fragment","Suspense","Profiler","StrictMode","Routes","Route","Outlet","Root","ErrorBoundaryHandler","HotReload","Hot"]),_o=[/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 Ns(e){let n=e?.mode??"filtered",o=uo;if(e?.skipExact){let t=e.skipExact instanceof Set?e.skipExact:new Set(e.skipExact);o=new Set([...uo,...t])}return{maxComponents:e?.maxComponents??6,maxDepth:e?.maxDepth??30,mode:n,skipExact:o,skipPatterns:e?.skipPatterns?[..._o,...e.skipPatterns]:_o,userPatterns:e?.userPatterns??Ss,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 Ts(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 Is(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 Es(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&&Is(e,t)||o.userPatterns.some(s=>s.test(e)));default:return!0}}var un=null,Rs=new WeakMap;function xt(e){return Object.keys(e).some(n=>n.startsWith("__reactFiber$")||n.startsWith("__reactInternalInstance$")||n.startsWith("__reactProps$"))}function Ms(){if(un!==null)return un;if(typeof document>"u")return!1;if(document.body&&xt(document.body))return un=!0,!0;let e=["#root","#app","#__next","[data-reactroot]"];for(let n of e){let o=document.querySelector(n);if(o&&xt(o))return un=!0,!0}if(document.body){for(let n of document.body.children)if(xt(n))return un=!0,!0}return un=!1,!1}var Rn={map:Rs};function As(e){return Object.keys(e).find(o=>o.startsWith("__reactFiber$")||o.startsWith("__reactInternalInstance$"))||null}function Ps(e){let n=As(e);return n?e[n]:null}function sn(e){return e?e.displayName?e.displayName:e.name?e.name:null:null}function Fs(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=sn(s.render);if(r)return r}return s?.displayName?s.displayName:sn(o)}if(n===W.MemoComponent||n===W.SimpleMemoComponent){let s=t;if(s?.type){let r=sn(s.type);if(r)return r}return s?.displayName?s.displayName:sn(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?sn(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?sn(o):null}function $s(e){return e.length<=2||e.length<=3&&e===e.toLowerCase()}function mo(e,n){let o=Ns(n),t=o.mode==="all";if(t){let _=Rn.map.get(e);if(_!==void 0)return _}if(!Ms()){let _={path:null,components:[]};return t&&Rn.map.set(e,_),_}let s=o.mode==="smart"?Ts(e):void 0,r=[];try{let _=Ps(e),k=0;for(;_&&k<o.maxDepth&&r.length<o.maxComponents;){let v=Fs(_);v&&!$s(v)&&Es(v,k,o,s)&&r.push(v),_=_.return,k++}}catch{let _={path:null,components:[]};return t&&Rn.map.set(e,_),_}if(r.length===0){let _={path:null,components:[]};return t&&Rn.map.set(e,_),_}let a={path:r.slice().reverse().map(_=>`<${_}>`).join(" "),components:r};return t&&Rn.map.set(e,a),a}import Bs from"react";var Mn={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 Hs(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 An(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 zs(e,n=50){let o=e,t=0;for(;o&&t<n;){if(o._debugSource)return{source:o._debugSource,componentName:An(o)};if(o._debugOwner?._debugSource)return{source:o._debugOwner._debugSource,componentName:An(o._debugOwner)};o=o.return,t++}return null}function Ds(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:An(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:An(n)}}}n=n.return,o++}return null}var Jn=new Map;function js(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===Mn.FunctionComponent||n===Mn.IndeterminateComponent)&&typeof o=="function")return o;if(n===Mn.ForwardRef&&t){let s=t.render;if(typeof s=="function")return s}if((n===Mn.MemoComponent||n===Mn.SimpleMemoComponent)&&t){let s=t.type;if(typeof s=="function")return s}return typeof o=="function"?o:null}function Ws(){let e=Bs,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 Os(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(k=>k.test(a)))continue;let _=t.exec(a)||s.exec(a);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 Us(e){let n=js(e);if(!n)return null;if(Jn.has(n))return Jn.get(n);let o=Ws();if(!o)return Jn.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=Os(i.stack);a&&(s={fileName:Vs(a.fileName),lineNumber:a.line,columnNumber:a.column,componentName:An(e)||void 0})}}}finally{o.set(t)}return Jn.set(n,s),s}function Ks(e,n=15){let o=[],t=new Set,s=e,r=0;for(;s&&r<n;){let i=Us(s);i&&!t.has(i.fileName)&&(t.add(i.fileName),o.push(i)),s=s.return,r++}return o}function Pn(e){let n=Hs(e);if(!n)return{found:!1,reason:"no-fiber",isReactApp:!1,isProduction:!1};let o=zs(n);if(o||(o=Ds(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=Ks(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 et(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 kt(e,n=10){let o=e,t=0;for(;o&&t<n;){let s=Pn(o);if(s.found)return s;o=o.parentElement,t++}return Pn(e)}async function nt(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 po(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(_=>_.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 Te=[],$n=[],fo=!1;function vt(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 vn(e,n){Cn.push({level:e,message:n.slice(0,500),timestamp:Date.now()}),Cn.length>50&&Cn.shift()}function Zs(){if(_o||typeof window>"u")return;_o=!0;let e=console.error,n=console.warn,o=console.log;console.error=(...t)=>{let s=ut(t);be.push(s.slice(0,500)),be.length>20&&be.shift(),vn("error",s),e.apply(console,t)},console.warn=(...t)=>{let s=ut(t);be.push(`[warn] ${s}`.slice(0,500)),be.length>20&&be.shift(),vn("warn",s),n.apply(console,t)},console.log=(...t)=>{vn("log",ut(t)),o.apply(console,t)},window.addEventListener("error",t=>{let s=`${t.message} (${t.filename}:${t.lineno})`;be.push(s.slice(0,500)),be.length>20&&be.shift(),vn("error",s)}),window.addEventListener("unhandledrejection",t=>{let s=`Unhandled Promise: ${t.reason}`;be.push(s.slice(0,500)),be.length>20&&be.shift(),vn("error",s)})}Zs();function Ks(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 Us=[/session/i,/csrf/i,/xsrf/i,/secret/i,/password/i,/key/i];function Xs(){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=Us.some(a=>a.test(s));e[s]=r?"[masked]":decodeURIComponent(t.join("=")).slice(0,200)})}catch{}return e}function mo(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 Ys(){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=mo(t);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 o of n){let[,...t]=o.trim().split("="),s=t.join("="),r=mo(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 Ge(e){let n=Math.round(e);return isNaN(n)||!isFinite(n)?void 0:n}function Qs(){if(typeof performance>"u")return{};let e={};try{let n=performance.getEntriesByType("navigation")[0];if(n){let s=Ge(n.loadEventEnd-n.startTime),r=Ge(n.domContentLoadedEventEnd-n.startTime),a=Ge(n.responseStart-n.requestStart);s&&(e.pageLoadTime=s),r&&(e.domContentLoaded=r),a&&(e.ttfb=a)}let o=performance.getEntriesByName("first-contentful-paint")[0];if(o){let s=Ge(o.startTime);s&&(e.firstContentfulPaint=s)}let t=performance.memory;if(t){let s=Ge(t.usedJSHeapSize/1024/1024),r=Ge(t.totalJSHeapSize/1024/1024);s&&(e.usedJSHeapMB=s),r&&(e.totalJSHeapMB=r)}}catch{}return e}function po(e){let n={url:window.location.href,timestamp:new Date().toISOString(),browser:Ks(navigator.userAgent),userAgent:navigator.userAgent,viewport:`${window.innerWidth}x${window.innerHeight}`,pixelRatio:window.devicePixelRatio,language:navigator.language,referrer:document.referrer,cookies:Xs(),jwtClaims:Ys()??void 0,consoleErrors:be.length>0?[...be]:void 0,consoleLogs:Cn.length>0?[...Cn]:void 0,performance:Qs()};if(e)try{let o=e();o&&(n.user={...o,id:String(o.id),name:String(o.name||"")})}catch{}return n}var qs="/_next/static/chunks/impakers-debug-route-manifest.json",Vn=null,Zn=!1;function fo(e){return!e||e==="/"?"/":e.endsWith("/")?e.slice(0,-1)||"/":e}function Gs(e){let n=fo(e);return n==="/"?[]:n.slice(1).split("/").map(o=>decodeURIComponent(o)).filter(Boolean)}function Js(e){return/^\[[^\]]+\]$/.test(e)}function er(e){return/^\[\.\.\.[^\]]+\]$/.test(e)}function nr(e){return/^\[\[\.\.\.[^\]]+\]\]$/.test(e)}function tr(e,n){let o=0,t=0,s=0;for(;o<e.length;){let r=e[o];if(nr(r)){s+=1,t=n.length,o+=1;break}if(er(r)){if(t>=n.length)return null;s+=2,t=n.length,o+=1;break}let a=n[t];if(a===void 0)return null;if(Js(r)){s+=5,o+=1,t+=1;continue}if(r!==a)return null;s+=20,o+=1,t+=1}return o!==e.length||t!==n.length?null:s}async function or(){return Zn?null:Vn||(Vn=(async()=>{try{let e=await fetch(qs,{cache:"force-cache"});if(!e.ok)return Zn=!0,null;let n=await e.json();return!n||typeof n!="object"||!Array.isArray(n.entries)?(Zn=!0,null):n}catch{return Zn=!0,null}})(),Vn)}function sr(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 go(e){if(typeof window>"u")return null;let n=e??window.location.pathname,o=await or();if(!o)return null;let t=Gs(n),s=null,r=-1;for(let a of o.entries){let i=tr(a.segments,t);i!==null&&i>r&&(r=i,s=a)}return s?{targets:sr(s),context:{pathname:fo(n),matchedRoute:s.route,source:"next-route-manifest"}}:null}function ho(...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 yo(){let e=fn();if(!e)throw new Error("\uC778\uC99D\uC774 \uD544\uC694\uD569\uB2C8\uB2E4");return e}async function Pe(e,n={}){let o=yo(),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 Kn=new Map,_t=new Map,wn=new Map,rr=3e4;function Be(e){return`feedbacks:${e}`}function Je(){return"feedbacks:__all__"}function De(e){return`comments:${e}`}function Me(e,n){Kn.set(e,{data:n,timestamp:Date.now()});let o=wn.get(e);o&&o.forEach(t=>t(n))}function ze(e){return Kn.get(e)?.data??null}function ir(e){let n=Kn.get(e);return n?Date.now()-n.timestamp<=rr:!1}function pt(e){return Array.from(Kn.keys()).filter(n=>n.includes(e))}function ar(e){let n=new Map;for(let o of pt(e)){let t=ze(o);t!==null&&n.set(o,t)}return n}function lr(e){e.forEach((n,o)=>Me(o,n))}function mt(e,n){let o=n(ze(e));return Me(e,o),o}function dr(e,n){for(let o of pt(e)){let t=ze(o);t!==null&&Me(o,n(t))}}async function Sn(e,n){let o=_t.get(e);if(o)return o;let t=(async()=>{try{let s=await n();return Me(e,s),s}finally{_t.delete(e)}})();return _t.set(e,t),t}async function ft(e,n,o={}){let t=ze(e);return t!==null&&!o.force?((o.staleWhileRevalidate||!ir(e))&&Sn(e,n),t):Sn(e,n)}function Ln(e,n){let o=wn.get(e)||new Set;return o.add(n),wn.set(e,o),()=>{let t=wn.get(e);t&&(t.delete(n),t.size===0&&wn.delete(e))}}function en(e){return ze(e)}async function bo(e,n){let o=`temp-task-${Date.now()}`,t=n.feedbackUrl,s=n.feedbackMarker,r=t?ze(Be(t))||[]:null,a=ze(Je()),i=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&&i&&(Me(Be(t),[i,...r]),a&&Me(Je(),[i,...a]));try{let b=await(await Pe(e,{method:"POST",body:JSON.stringify(n)})).json().catch(()=>({}));if(t&&i){let h={...i,id:b.taskId||o,taskNumber:b.taskNumber||0,_optimistic:!1};mt(Be(t),k=>(k||[]).map(x=>x.id===o?h:x)),a&&mt(Je(),k=>(k||[]).map(x=>x.id===o?h:x)),vo(e,t).catch(()=>{}),a&&Co(e).catch(()=>{})}return b}catch(_){throw t&&r&&Me(Be(t),r),a&&Me(Je(),a),_}}async function xo(e,n,o={}){let t=Be(n);return ft(t,async()=>(await(await Pe(`${e}?url=${encodeURIComponent(n)}`)).json()).tasks||[],o)}async function ko(e,n={}){let o=Je();return ft(o,async()=>(await(await Pe(`${e}?url=__all__`)).json()).tasks||[],n)}async function vo(e,n){let o=Be(n);return Sn(o,async()=>(await(await Pe(`${e}?url=${encodeURIComponent(n)}`)).json()).tasks||[])}async function Co(e){let n=Je();return Sn(n,async()=>(await(await Pe(`${e}?url=__all__`)).json()).tasks||[])}async function Un(e,n,o={}){let t=De(n);return ft(t,async()=>(await(await Pe(`${e}/${n}/comments`)).json()).comments||[],o)}async function cr(e,n){let o=De(n);return Sn(o,async()=>(await(await Pe(`${e}/${n}/comments`)).json()).comments||[])}function ur(e,n){dr("feedbacks:",o=>o.map(t=>t.id===e?{...t,commentCount:Math.max(0,(t.commentCount||0)+n)}:t))}function _r(e){pt("feedbacks:").forEach(o=>{let t=o.replace("feedbacks:","");t==="__all__"?Co(e).catch(()=>{}):vo(e,t).catch(()=>{})})}async function Xn(e,n,o,t,s,r,a){let i={id:`temp-${Date.now()}`,content:o,authorName:t,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()},_=De(n),b=ze(_)||[],h=ar("feedbacks:");Me(_,[...b,i]),ur(n,1);try{let P=(await(await Pe(`${e}/${n}/comments`,{method:"POST",body:JSON.stringify({content:o,authorName:t,authorId:s,screenshot:r,...a&&{fileUrl:a.url,fileName:a.fileName,fileType:a.fileType,fileSize:a.fileSize,fileSource:a.fileSource}})})).json()).comment;return mt(_,M=>(M||[]).map($=>$.id===i.id?P:$)),cr(e,n),_r(e),P}catch(k){throw Me(_,b),lr(h),k}}var mr=4.5*1024*1024;async function Yn(e,n,o,t){if(n.size>mr)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=yo(),r=new FormData;r.append("file",n),r.append("context",o),t&&r.append("taskId",t);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 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 Pe(s)).json()).events||[]}import{AnyMap as wo,originalPositionFor as pr}from"@jridgewell/trace-mapping";var Nn=new Map,So=new Set;async function fr(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 gr(e){if(Nn.has(e))return Nn.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 wo(s);return Nn.set(e,r),r}}catch{}let o=await fr(e);if(o)try{let t=await fetch(o,{cache:"force-cache"});if(t.ok){let s=await t.json(),r=new wo(s);return Nn.set(e,r),r}}catch{}return So.add(e),Nn.set(e,null),null}async function hr(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 gr(t);if(!s)return null;try{let r=pr(s,{line:n,column:o});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 gt(e){if(!e)return null;let n=e.match(/^(.+):(\d+):(\d+)$/);if(!n)return null;let[,o,t,s]=n,r=parseInt(t,10),a=parseInt(s,10);return isNaN(r)||isNaN(a)?null:hr(o,r,a)}var yr=`@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 Fn(e,n){$n.push({level:e,message:n.slice(0,500),timestamp:Date.now()}),$n.length>50&&$n.shift()}function Zs(){if(fo||typeof window>"u")return;fo=!0;let e=console.error,n=console.warn,o=console.log;console.error=(...t)=>{let s=vt(t);Te.push(s.slice(0,500)),Te.length>20&&Te.shift(),Fn("error",s),e.apply(console,t)},console.warn=(...t)=>{let s=vt(t);Te.push(`[warn] ${s}`.slice(0,500)),Te.length>20&&Te.shift(),Fn("warn",s),n.apply(console,t)},console.log=(...t)=>{Fn("log",vt(t)),o.apply(console,t)},window.addEventListener("error",t=>{let s=`${t.message} (${t.filename}:${t.lineno})`;Te.push(s.slice(0,500)),Te.length>20&&Te.shift(),Fn("error",s)}),window.addEventListener("unhandledrejection",t=>{let s=`Unhandled Promise: ${t.reason}`;Te.push(s.slice(0,500)),Te.length>20&&Te.shift(),Fn("error",s)})}Zs();function Xs(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 Ys=[/session/i,/csrf/i,/xsrf/i,/secret/i,/password/i,/key/i];function Qs(){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=Ys.some(i=>i.test(s));e[s]=r?"[masked]":decodeURIComponent(t.join("=")).slice(0,200)})}catch{}return e}function go(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 qs(){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=go(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=go(s);if(r&&r.sub){let i={},a=["sub","email","name","role","roles","org","iat","exp"];for(let _ of a)_ in r&&(i[_]=r[_]);return Object.keys(i).length>0?i:null}}}catch{}return null}function _n(e){let n=Math.round(e);return isNaN(n)||!isFinite(n)?void 0:n}function Gs(){if(typeof performance>"u")return{};let e={};try{let n=performance.getEntriesByType("navigation")[0];if(n){let s=_n(n.loadEventEnd-n.startTime),r=_n(n.domContentLoadedEventEnd-n.startTime),i=_n(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=_n(o.startTime);s&&(e.firstContentfulPaint=s)}let t=performance.memory;if(t){let s=_n(t.usedJSHeapSize/1024/1024),r=_n(t.totalJSHeapSize/1024/1024);s&&(e.usedJSHeapMB=s),r&&(e.totalJSHeapMB=r)}}catch{}return e}function ho(e){let n={url:window.location.href,timestamp:new Date().toISOString(),browser:Xs(navigator.userAgent),userAgent:navigator.userAgent,viewport:`${window.innerWidth}x${window.innerHeight}`,pixelRatio:window.devicePixelRatio,language:navigator.language,referrer:document.referrer,cookies:Qs(),jwtClaims:qs()??void 0,consoleErrors:Te.length>0?[...Te]:void 0,consoleLogs:$n.length>0?[...$n]:void 0,performance:Gs()};if(e)try{let o=e();o&&(n.user={...o,id:String(o.id),name:String(o.name||"")})}catch{}return n}var Js="/_next/static/chunks/impakers-debug-route-manifest.json",tt=null,ot=!1;function yo(e){return!e||e==="/"?"/":e.endsWith("/")?e.slice(0,-1)||"/":e}function er(e){let n=yo(e);return n==="/"?[]:n.slice(1).split("/").map(o=>decodeURIComponent(o)).filter(Boolean)}function nr(e){return/^\[[^\]]+\]$/.test(e)}function tr(e){return/^\[\.\.\.[^\]]+\]$/.test(e)}function or(e){return/^\[\[\.\.\.[^\]]+\]\]$/.test(e)}function sr(e,n){let o=0,t=0,s=0;for(;o<e.length;){let r=e[o];if(or(r)){s+=1,t=n.length,o+=1;break}if(tr(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(nr(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 rr(){return ot?null:tt||(tt=(async()=>{try{let e=await fetch(Js,{cache:"force-cache"});if(!e.ok)return ot=!0,null;let n=await e.json();return!n||typeof n!="object"||!Array.isArray(n.entries)?(ot=!0,null):n}catch{return ot=!0,null}})(),tt)}function ir(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 bo(e){if(typeof window>"u")return null;let n=e??window.location.pathname,o=await rr();if(!o)return null;let t=er(n),s=null,r=-1;for(let i of o.entries){let a=sr(i.segments,t);a!==null&&a>r&&(r=a,s=i)}return s?{targets:ir(s),context:{pathname:yo(n),matchedRoute:s.route,source:"next-route-manifest"}}:null}function xo(...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 ko(){let e=en();if(!e)throw new Error("\uC778\uC99D\uC774 \uD544\uC694\uD569\uB2C8\uB2E4");return e}async function Oe(e,n={}){let o=ko(),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 st=new Map,Ct=new Map,Bn=new Map,ar=3e4;function Ye(e){return`feedbacks:${e}`}function mn(){return"feedbacks:__all__"}function qe(e){return`comments:${e}`}function De(e,n){st.set(e,{data:n,timestamp:Date.now()});let o=Bn.get(e);o&&o.forEach(t=>t(n))}function Qe(e){return st.get(e)?.data??null}function lr(e){let n=st.get(e);return n?Date.now()-n.timestamp<=ar:!1}function St(e){return Array.from(st.keys()).filter(n=>n.includes(e))}function dr(e){let n=new Map;for(let o of St(e)){let t=Qe(o);t!==null&&n.set(o,t)}return n}function cr(e){e.forEach((n,o)=>De(o,n))}function wt(e,n){let o=n(Qe(e));return De(e,o),o}function ur(e,n){for(let o of St(e)){let t=Qe(o);t!==null&&De(o,n(t))}}async function Hn(e,n){let o=Ct.get(e);if(o)return o;let t=(async()=>{try{let s=await n();return De(e,s),s}finally{Ct.delete(e)}})();return Ct.set(e,t),t}async function Nt(e,n,o={}){let t=Qe(e);return t!==null&&!o.force?((o.staleWhileRevalidate||!lr(e))&&Hn(e,n),t):Hn(e,n)}function zn(e,n){let o=Bn.get(e)||new Set;return o.add(n),Bn.set(e,o),()=>{let t=Bn.get(e);t&&(t.delete(n),t.size===0&&Bn.delete(e))}}function pn(e){return Qe(e)}async function vo(e,n){let o=`temp-task-${Date.now()}`,t=n.feedbackUrl,s=n.feedbackMarker,r=t?Qe(Ye(t))||[]:null,i=Qe(mn()),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&&(De(Ye(t),[a,...r]),i&&De(mn(),[a,...i]));try{let k=await(await Oe(e,{method:"POST",body:JSON.stringify(n)})).json().catch(()=>({}));if(t&&a){let v={...a,id:k.taskId||o,taskNumber:k.taskNumber||0,_optimistic:!1};wt(Ye(t),C=>(C||[]).map(w=>w.id===o?v:w)),i&&wt(mn(),C=>(C||[]).map(w=>w.id===o?v:w)),So(e,t).catch(()=>{}),i&&No(e).catch(()=>{})}return k}catch(_){throw t&&r&&De(Ye(t),r),i&&De(mn(),i),_}}async function Co(e,n,o={}){let t=Ye(n);return Nt(t,async()=>(await(await Oe(`${e}?url=${encodeURIComponent(n)}`)).json()).tasks||[],o)}async function wo(e,n={}){let o=mn();return Nt(o,async()=>(await(await Oe(`${e}?url=__all__`)).json()).tasks||[],n)}async function So(e,n){let o=Ye(n);return Hn(o,async()=>(await(await Oe(`${e}?url=${encodeURIComponent(n)}`)).json()).tasks||[])}async function No(e){let n=mn();return Hn(n,async()=>(await(await Oe(`${e}?url=__all__`)).json()).tasks||[])}async function rt(e,n,o={}){let t=qe(n);return Nt(t,async()=>(await(await Oe(`${e}/${n}/comments`)).json()).comments||[],o)}async function _r(e,n){let o=qe(n);return Hn(o,async()=>(await(await Oe(`${e}/${n}/comments`)).json()).comments||[])}function mr(e,n){ur("feedbacks:",o=>o.map(t=>t.id===e?{...t,commentCount:Math.max(0,(t.commentCount||0)+n)}:t))}function pr(e){St("feedbacks:").forEach(o=>{let t=o.replace("feedbacks:","");t==="__all__"?No(e).catch(()=>{}):So(e,t).catch(()=>{})})}async function it(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()},_=qe(n),k=Qe(_)||[],v=dr("feedbacks:");De(_,[...k,a]),mr(n,1);try{let B=(await(await Oe(`${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 wt(_,R=>(R||[]).map(D=>D.id===a.id?B:D)),_r(e,n),pr(e),B}catch(C){throw De(_,k),cr(v),C}}var fr=4.5*1024*1024;async function at(e,n,o,t){if(n.size>fr)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=ko(),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 lt(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 Oe(s)).json()).events||[]}import{AnyMap as Lo,originalPositionFor as gr}from"@jridgewell/trace-mapping";var Dn=new Map,To=new Set;async function hr(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 yr(e){if(Dn.has(e))return Dn.get(e)??null;if(To.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 Lo(s);return Dn.set(e,r),r}}catch{}let o=await hr(e);if(o)try{let t=await fetch(o,{cache:"force-cache"});if(t.ok){let s=await t.json(),r=new Lo(s);return Dn.set(e,r),r}}catch{}return To.add(e),Dn.set(e,null),null}async function br(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 yr(t);if(!s)return null;try{let r=gr(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 Lt(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:br(o,r,i)}var xr=`@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
- }`,br={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=yr}var Ee=br;import{jsx as nn,jsxs as ht}from"react/jsx-runtime";var xr="#3b82f6",kr="#9ca3af";function yt({annotation:e,layerIndex:n,isAnimated:o,isHovered:t,accentColor:s,onHover:r,onHoverEnd:a,onClick:i}){let _=o?"":Ee.enter,b=e.status==="done"||e.status==="resolved",h=e.status==="in_progress",k=b?kr:h?xr:s;return ht("div",{className:`${Ee.marker} ${_} ${t?Ee.hovered:""} ${b?Ee.done:""}`,"data-annotation-marker":!0,style:{left:`${e.x}%`,top:e.y,backgroundColor:k,animationDelay:`${n*20}ms`},onMouseEnter:r,onMouseLeave:a,onClick:x=>{x.stopPropagation(),i()},children:[nn("span",{children:n+1}),t&&ht("div",{className:`${Ee.markerTooltip} ${Ee.enter}`,children:[nn("span",{className:Ee.markerQuote,children:e.element}),e.comment&&nn("span",{className:Ee.markerNote,children:e.comment})]})]})}function Lo({x:e,y:n,accentColor:o}){return nn("div",{className:`${Ee.pending} ${Ee.enter}`,"data-annotation-marker":!0,style:{left:`${e}%`,top:n,backgroundColor:o},children:ht("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",children:[nn("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),nn("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})})}import{useState as tn,useRef as bt,useEffect as To,useCallback as Ue}from"react";var vr=`@keyframes styles-module__spin___h0C6p {
443
+ }`,kr={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=xr}var He=kr;import{jsx as fn,jsxs as Tt}from"react/jsx-runtime";var vr="#3b82f6",Cr="#9ca3af";function It({annotation:e,layerIndex:n,isAnimated:o,isHovered:t,accentColor:s,onHover:r,onHoverEnd:i,onClick:a}){let _=o?"":He.enter,k=e.status==="done"||e.status==="resolved",v=e.status==="in_progress",C=k?Cr:v?vr:s;return Tt("div",{className:`${He.marker} ${_} ${t?He.hovered:""} ${k?He.done:""}`,"data-annotation-marker":!0,style:{left:`${e.x}%`,top:e.y,backgroundColor:C,animationDelay:`${n*20}ms`},onMouseEnter:r,onMouseLeave:i,onClick:w=>{w.stopPropagation(),a()},children:[fn("span",{children:n+1}),t&&Tt("div",{className:`${He.markerTooltip} ${He.enter}`,children:[fn("span",{className:He.markerQuote,children:e.element}),e.comment&&fn("span",{className:He.markerNote,children:e.comment})]})]})}function Io({x:e,y:n,accentColor:o}){return fn("div",{className:`${He.pending} ${He.enter}`,"data-annotation-marker":!0,style:{left:`${e}%`,top:n,backgroundColor:o},children:Tt("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",children:[fn("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),fn("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})})}import{useState as gn,useRef as Et,useEffect as Ro,useCallback as rn}from"react";var wr=`@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
- }`,Cr={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=vr}var qn=Cr;import{jsx as No,jsxs as wr}from"react/jsx-runtime";function Gn({message:e="\uB85C\uB529 \uC911..."}){return wr("div",{className:qn.container,children:[No("div",{className:qn.spinner}),No("span",{className:qn.message,children:e})]})}var Sr=`@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=wr}var dt=Sr;import{jsx as Eo,jsxs as Nr}from"react/jsx-runtime";function ct({message:e="\uB85C\uB529 \uC911..."}){return Nr("div",{className:dt.container,children:[Eo("div",{className:dt.spinner}),Eo("span",{className:dt.message,children:e})]})}var Lr=`@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
- }`,Lr={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=Sr}var w=Lr;import{Fragment as Ao,jsx as I,jsxs as se}from"react/jsx-runtime";function Io(e){let n=new Date(e),o=Date.now()-n.getTime(),t=_=>String(_).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 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 Eo(e){return e.slice(0,1).toUpperCase()}function Ro(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 Fo({task:e,currentUserName:n,currentUserId:o,left:t,top:s,bottom:r,loading:a,onClose:i,onReply:_}){let[b,h]=tn(""),[k,x]=tn(!1),[P,M]=tn(null),[$,j]=tn(null),[re,de]=tn(!1),L=bt(null),v=bt(null),[N,W]=tn(null),y=bt(null);To(()=>{v.current&&(v.current.scrollTop=v.current.scrollHeight),L.current?.focus()},[e.comments.length]),To(()=>{if(re)return;let g=p=>{let H=p.target;H.closest(`.${w.thread}`)||H.closest("[data-annotation-marker]")||H.closest("[data-impakers-debug]")||R()};return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[re]);let R=Ue(()=>{x(!0),setTimeout(()=>i(),120)},[i]),T=Ue(()=>{!b.trim()&&!P&&!$||(_(e.id,b.trim(),P||void 0,$||void 0),h(""),M(null),j(null))},[b,P,$,e.id,_]),X=Ue(g=>{g.stopPropagation(),!g.nativeEvent.isComposing&&(g.key==="Enter"&&!g.shiftKey&&(g.preventDefault(),T()),g.key==="Escape"&&R())},[R,T]),E=Ue(()=>{de(!0);let g=document.querySelectorAll("[data-impakers-debug], [data-annotation-marker]");g.forEach(Y=>Y.style.visibility="hidden"),document.documentElement.classList.add("impakers-selecting");let p=null,H=Y=>{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=`${Y.left}px`,p.style.top=`${Y.top}px`,p.style.width=`${Y.width}px`,p.style.height=`${Y.height}px`},A=()=>{document.removeEventListener("mousemove",ke),document.removeEventListener("click",Te,!0),document.removeEventListener("keydown",ve),document.documentElement.classList.remove("impakers-selecting"),p?.remove(),g.forEach(Y=>Y.style.visibility=""),de(!1)},ke=Y=>{let Se=document.elementFromPoint(Y.clientX,Y.clientY);!Se||Se===p||H(Se.getBoundingClientRect())},ve=Y=>{Y.key==="Escape"&&A()},Te=async Y=>{Y.preventDefault(),Y.stopPropagation(),Y.stopImmediatePropagation();let Se=document.elementFromPoint(Y.clientX,Y.clientY);if(A(),!!Se){try{let ue=await On(Se);M(ue)}catch(ue){console.error("[@impakers/debug] DOM \uC2A4\uD06C\uB9B0\uC0F7 \uC2E4\uD328:",ue)}L.current?.focus()}};document.addEventListener("mousemove",ke),document.addEventListener("click",Te,!0),document.addEventListener("keydown",ve)},[]),Q=Ue(()=>{E()},[E]),J=Ue(()=>{y.current?.click()},[]),ce=Ue(g=>{let p=g.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."),g.target.value="";return}if(p.type.startsWith("image/")){j(null);let H=new FileReader;H.onload=()=>{M(H.result)},H.readAsDataURL(p)}else M(null),j(p);g.target.value=""}},[]),he=e.title.replace(/^\[피드백\]\s*/,""),te={left:t,...s!==void 0?{top:s}:{},...r!==void 0?{bottom:r}:{},"--thread-top":`${s!==void 0?s:40}px`};return se("div",{className:`${w.thread} ${k?w.exiting:""}`,style:te,"data-impakers-debug":"",onClick:g=>g.stopPropagation(),children:[se("div",{className:w.header,children:[I("div",{className:w.avatar,children:Eo(e.authorName||n)}),se("div",{className:w.headerInfo,children:[se("div",{className:w.headerTop,children:[I("span",{className:w.authorName,children:e.authorName||n}),I("span",{className:w.timestamp,children:Io(e.createdAt)})]}),I("div",{className:w.title,children:he})]}),I("div",{className:w.headerActions,children:I("button",{className:w.headerAction,onClick:R,title:"\uB2EB\uAE30",type:"button",children:I("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:I("path",{d:"M18 6L6 18M6 6l12 12"})})})})]}),a&&e.comments.length===0&&se(Ao,{children:[I("div",{className:w.divider}),I(Gn,{message:"\uB313\uAE00 \uB85C\uB529 \uC911..."})]}),e.comments.length>0&&se(Ao,{children:[I("div",{className:w.divider}),I("div",{className:w.commentsList,ref:v,children:e.comments.map(g=>se("div",{className:w.comment,children:[I("div",{className:w.avatar,style:{width:22,height:22,fontSize:10},children:Eo(g.authorName)}),se("div",{className:w.commentContent,children:[se("div",{className:w.commentTop,children:[I("span",{className:w.commentAuthor,children:g.authorName}),I("span",{className:w.commentTime,children:Io(g.createdAt)})]}),g.content&&I("div",{className:w.commentText,children:g.content}),g.imageUrl&&g.imageUrl!=="loading..."&&I("div",{className:w.screenshot,onClick:()=>W(g.imageUrl),style:{cursor:"pointer"},children:I("img",{src:g.imageUrl,alt:"screenshot"})}),g.fileUrl&&se("a",{className:w.fileCard,href:g.fileUrl,target:"_blank",rel:"noopener noreferrer",onClick:p=>p.stopPropagation(),children:[I("span",{className:w.fileIcon,children:Mo(g.fileType||"")}),se("span",{className:w.fileInfo,children:[I("span",{className:w.fileCardName,children:g.fileName||"\uD30C\uC77C"}),g.fileSize!=null&&I("span",{className:w.fileCardSize,children:Ro(g.fileSize)})]})]})]})]},g.id))})]}),P&&se("div",{className:w.pendingImage,children:[I("img",{src:P,alt:"pending"}),I("button",{className:w.pendingRemove,onClick:()=>M(null),type:"button",children:"\xD7"})]}),$&&se("div",{className:w.pendingFile,children:[I("span",{className:w.fileIcon,children:Mo($.type)}),se("span",{className:w.fileInfo,children:[I("span",{className:w.fileCardName,children:$.name}),I("span",{className:w.fileCardSize,children:Ro($.size)})]}),I("button",{className:w.pendingRemove,onClick:()=>j(null),type:"button",children:"\xD7"})]}),I("div",{className:w.replyArea,children:I("textarea",{ref:L,className:w.replyInput,placeholder:"Reply...",value:b,onChange:g=>{h(g.target.value);let p=g.target;p.style.height="auto",p.style.height=`${Math.min(p.scrollHeight,120)}px`},onKeyDown:X,rows:2})}),se("div",{className:w.replyToolbar,children:[I("button",{className:w.replyTool,onClick:J,type:"button",title:"\uD30C\uC77C \uCCA8\uBD80",children:se("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[I("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),I("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}),I("button",{className:w.replyTool,onClick:Q,type:"button",title:"\uC694\uC18C \uC2A4\uD06C\uB9B0\uC0F7",children:se("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[I("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"}),I("circle",{cx:"12",cy:"13",r:"3"})]})}),I("button",{className:`${w.replySend} ${b.trim()||P||$?w.active:""}`,onClick:T,disabled:!b.trim()&&!P&&!$,type:"button",title:"\uC804\uC1A1",children:se("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[I("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),I("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]}),I("input",{ref:y,type:"file",accept:"*/*",style:{display:"none"},onChange:ce}),N&&se("div",{className:w.lightbox,onClick:()=>W(null),"data-impakers-debug":"",children:[I("img",{src:N,alt:"enlarged",onClick:g=>g.stopPropagation()}),I("button",{className:w.lightboxClose,onClick:()=>W(null),type:"button",children:"\xD7"})]})]})}import{useState as Jn,useRef as on,useCallback as Tn,useEffect as Ir}from"react";var Nr=`@keyframes styles-module__fabEnter___DMJoo {
953
+ }`,Tr={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=Lr}var N=Tr;import{Fragment as $o,jsx as E,jsxs as de}from"react/jsx-runtime";function Mo(e){let n=new Date(e),o=Date.now()-n.getTime(),t=_=>String(_).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 Po(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 Bo({task:e,currentUserName:n,currentUserId:o,left:t,top:s,bottom:r,loading:i,onClose:a,onReply:_}){let[k,v]=gn(""),[C,w]=gn(!1),[B,R]=gn(null),[D,K]=gn(null),[ce,ue]=gn(!1),re=Et(null),A=Et(null),[M,Y]=gn(null),h=Et(null);Ro(()=>{A.current&&(A.current.scrollTop=A.current.scrollHeight),re.current?.focus()},[e.comments.length]),Ro(()=>{if(ce)return;let b=x=>{let ee=x.target;ee.closest(`.${N.thread}`)||ee.closest("[data-annotation-marker]")||ee.closest("[data-impakers-debug]")||z()};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[ce]);let z=rn(()=>{w(!0),setTimeout(()=>a(),120)},[a]),T=rn(()=>{!k.trim()&&!B&&!D||(_(e.id,k.trim(),B||void 0,D||void 0),v(""),R(null),K(null))},[k,B,D,e.id,_]),_e=rn(b=>{b.stopPropagation(),!b.nativeEvent.isComposing&&(b.key==="Enter"&&!b.shiftKey&&(b.preventDefault(),T()),b.key==="Escape"&&z())},[z,T]),I=rn(()=>{ue(!0);let b=document.querySelectorAll("[data-impakers-debug], [data-annotation-marker]");b.forEach(F=>F.style.visibility="hidden"),document.documentElement.classList.add("impakers-selecting");let x=null,ee=F=>{x||(x=document.createElement("div"),x.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(x)),x.style.left=`${F.left}px`,x.style.top=`${F.top}px`,x.style.width=`${F.width}px`,x.style.height=`${F.height}px`},p=()=>{document.removeEventListener("mousemove",P),document.removeEventListener("click",ie,!0),document.removeEventListener("keydown",H),document.documentElement.classList.remove("impakers-selecting"),x?.remove(),b.forEach(F=>F.style.visibility=""),ue(!1)},P=F=>{let Z=document.elementFromPoint(F.clientX,F.clientY);!Z||Z===x||ee(Z.getBoundingClientRect())},H=F=>{F.key==="Escape"&&p()},ie=async F=>{F.preventDefault(),F.stopPropagation(),F.stopImmediatePropagation();let Z=document.elementFromPoint(F.clientX,F.clientY);if(p(),!!Z){try{let te=await nt(Z);R(te)}catch(te){console.error("[@impakers/debug] DOM \uC2A4\uD06C\uB9B0\uC0F7 \uC2E4\uD328:",te)}re.current?.focus()}};document.addEventListener("mousemove",P),document.addEventListener("click",ie,!0),document.addEventListener("keydown",H)},[]),J=rn(()=>{I()},[I]),oe=rn(()=>{h.current?.click()},[]),me=rn(b=>{let x=b.target.files?.[0];if(x){if(x.size>4.5*1024*1024){console.warn("[@impakers/debug] \uD30C\uC77C \uD06C\uAE30\uAC00 4.5MB\uB97C \uCD08\uACFC\uD569\uB2C8\uB2E4."),b.target.value="";return}if(x.type.startsWith("image/")){K(null);let ee=new FileReader;ee.onload=()=>{R(ee.result)},ee.readAsDataURL(x)}else R(null),K(x);b.target.value=""}},[]),Me=e.title.replace(/^\[피드백\]\s*/,""),pe={left:t,...s!==void 0?{top:s}:{},...r!==void 0?{bottom:r}:{},"--thread-top":`${s!==void 0?s:40}px`};return de("div",{className:`${N.thread} ${C?N.exiting:""}`,style:pe,"data-impakers-debug":"",onClick:b=>b.stopPropagation(),children:[de("div",{className:N.header,children:[E("div",{className:N.avatar,children:Ao(e.authorName||n)}),de("div",{className:N.headerInfo,children:[de("div",{className:N.headerTop,children:[E("span",{className:N.authorName,children:e.authorName||n}),E("span",{className:N.timestamp,children:Mo(e.createdAt)})]}),E("div",{className:N.title,children:Me})]}),E("div",{className:N.headerActions,children:E("button",{className:N.headerAction,onClick:z,title:"\uB2EB\uAE30",type:"button",children:E("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:E("path",{d:"M18 6L6 18M6 6l12 12"})})})})]}),i&&e.comments.length===0&&de($o,{children:[E("div",{className:N.divider}),E(ct,{message:"\uB313\uAE00 \uB85C\uB529 \uC911..."})]}),e.comments.length>0&&de($o,{children:[E("div",{className:N.divider}),E("div",{className:N.commentsList,ref:A,children:e.comments.map(b=>de("div",{className:N.comment,children:[E("div",{className:N.avatar,style:{width:22,height:22,fontSize:10},children:Ao(b.authorName)}),de("div",{className:N.commentContent,children:[de("div",{className:N.commentTop,children:[E("span",{className:N.commentAuthor,children:b.authorName}),E("span",{className:N.commentTime,children:Mo(b.createdAt)})]}),b.content&&E("div",{className:N.commentText,children:b.content}),b.imageUrl&&b.imageUrl!=="loading..."&&E("div",{className:N.screenshot,onClick:()=>Y(b.imageUrl),style:{cursor:"pointer"},children:E("img",{src:b.imageUrl,alt:"screenshot"})}),b.fileUrl&&de("a",{className:N.fileCard,href:b.fileUrl,target:"_blank",rel:"noopener noreferrer",onClick:x=>x.stopPropagation(),children:[E("span",{className:N.fileIcon,children:Fo(b.fileType||"")}),de("span",{className:N.fileInfo,children:[E("span",{className:N.fileCardName,children:b.fileName||"\uD30C\uC77C"}),b.fileSize!=null&&E("span",{className:N.fileCardSize,children:Po(b.fileSize)})]})]})]})]},b.id))})]}),B&&de("div",{className:N.pendingImage,children:[E("img",{src:B,alt:"pending"}),E("button",{className:N.pendingRemove,onClick:()=>R(null),type:"button",children:"\xD7"})]}),D&&de("div",{className:N.pendingFile,children:[E("span",{className:N.fileIcon,children:Fo(D.type)}),de("span",{className:N.fileInfo,children:[E("span",{className:N.fileCardName,children:D.name}),E("span",{className:N.fileCardSize,children:Po(D.size)})]}),E("button",{className:N.pendingRemove,onClick:()=>K(null),type:"button",children:"\xD7"})]}),E("div",{className:N.replyArea,children:E("textarea",{ref:re,className:N.replyInput,placeholder:"Reply...",value:k,onChange:b=>{v(b.target.value);let x=b.target;x.style.height="auto",x.style.height=`${Math.min(x.scrollHeight,120)}px`},onKeyDown:_e,rows:2})}),de("div",{className:N.replyToolbar,children:[E("button",{className:N.replyTool,onClick:oe,type:"button",title:"\uD30C\uC77C \uCCA8\uBD80",children:de("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[E("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),E("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}),E("button",{className:N.replyTool,onClick:J,type:"button",title:"\uC694\uC18C \uC2A4\uD06C\uB9B0\uC0F7",children:de("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[E("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"}),E("circle",{cx:"12",cy:"13",r:"3"})]})}),E("button",{className:`${N.replySend} ${k.trim()||B||D?N.active:""}`,onClick:T,disabled:!k.trim()&&!B&&!D,type:"button",title:"\uC804\uC1A1",children:de("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[E("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),E("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]}),E("input",{ref:h,type:"file",accept:"*/*",style:{display:"none"},onChange:me}),M&&de("div",{className:N.lightbox,onClick:()=>Y(null),"data-impakers-debug":"",children:[E("img",{src:M,alt:"enlarged",onClick:b=>b.stopPropagation()}),E("button",{className:N.lightboxClose,onClick:()=>Y(null),type:"button",children:"\xD7"})]})]})}import{useState as ut,useRef as hn,useCallback as jn,useEffect as Rr}from"react";var Ir=`@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
- }`,Tr={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=Nr}var Re=Tr;import{Fragment as Er,jsx as $e,jsxs as xt}from"react/jsx-runtime";function Po({items:e,onSelect:n,onHide:o,onDoubleTap:t}){let[s,r]=Jn(!1),[a,i]=Jn(!1),[_,b]=Jn({right:24,bottom:24}),[h,k]=Jn(null),x=on(null),P=on(!1),M=on({x:0,y:0}),$=on({x:0,y:0}),j=on(!1),re=on(0),de=Tn(y=>{if(y.button===2)return;P.current=!0,j.current=!1;let R=x.current;if(!R)return;R.setPointerCapture(y.pointerId);let T=R.getBoundingClientRect();M.current={x:y.clientX,y:y.clientY},$.current={x:y.clientX-T.left,y:y.clientY-T.top}},[]),L=Tn(y=>{P.current&&((Math.abs(y.clientX-M.current.x)>3||Math.abs(y.clientY-M.current.y)>3)&&(j.current=!0),j.current&&b({right:Math.max(8,Math.min(window.innerWidth-y.clientX-(44-$.current.x),window.innerWidth-52)),bottom:Math.max(8,Math.min(window.innerHeight-y.clientY-(44-$.current.y),window.innerHeight-52))}))},[]),v=Tn(y=>{if(P.current&&(x.current?.releasePointerCapture(y.pointerId),P.current=!1,!j.current)){let R=Date.now(),T=R-re.current<350;if(re.current=R,T&&t){s&&N(),t();return}s?N():r(!0)}},[s,t]),N=Tn(()=>{i(!0),setTimeout(()=>{r(!1),i(!1)},150)},[]),W=Tn(y=>{y.preventDefault(),y.stopPropagation(),k({x:y.clientX,y:y.clientY})},[]);return Ir(()=>{if(!s&&!h)return;let y=R=>{if(!R.target.closest("[data-impakers-fab]")){if(h){k(null);return}s&&N()}};return document.addEventListener("mousedown",y),()=>document.removeEventListener("mousedown",y)},[s,h,N]),xt(Er,{children:[(s||a)&&$e("div",{className:Re.menuItems,style:{position:"fixed",right:_.right+4/2,bottom:_.bottom+44+8},"data-impakers-debug":"","data-impakers-fab":"",children:[...e].reverse().map((y,R)=>xt("button",{className:`${Re.menuItem} ${y.active?Re.active:""} ${a?Re.menuItemClosing:""}`,style:{animationDelay:a?`${R*30}ms`:`${(e.length-1-R)*40}ms`},onClick:T=>{T.stopPropagation(),n(y.id),N()},type:"button","data-impakers-fab":"","data-impakers-debug":"",children:[y.icon,$e("span",{className:Re.tooltip,children:y.label}),y.badge&&y.badge>0?$e("span",{className:Re.badge,children:y.badge>99?"99+":y.badge}):null]},y.id))}),$e("button",{ref:x,className:`${Re.fab} ${s?Re.expanded:""}`,style:{position:"fixed",right:_.right,bottom:_.bottom},onPointerDown:de,onPointerMove:L,onPointerUp:v,onContextMenu:W,type:"button","aria-label":"\uD53C\uB4DC\uBC31 \uBA54\uB274","data-impakers-debug":"","data-impakers-fab":"",children:xt("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[$e("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),$e("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}),h&&$e("div",{style:{position:"fixed",inset:0,zIndex:2147483647},onMouseDown:()=>k(null),"data-impakers-debug":"","data-impakers-fab":"",children:$e("div",{className:Re.contextMenu,style:{position:"fixed",left:h.x,top:h.y,zIndex:2147483647},onMouseDown:y=>y.stopPropagation(),"data-impakers-fab":"",children:$e("button",{className:Re.contextMenuItem,onMouseDown:y=>{y.stopPropagation(),k(null),o?.()},type:"button",children:"\uC704\uC82F \uC228\uAE30\uAE30"})})})]})}import{useState as Le,useCallback as kt,useEffect as rn,useRef as Bo}from"react";import{createPortal as Hr}from"react-dom";import{useState as et,useRef as $o,useCallback as In}from"react";var Rr=`.styles-module__replyWrapper___wuGqO {
1146
+ }`,Er={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=Ir}var ze=Er;import{Fragment as Mr,jsx as Ve,jsxs as Rt}from"react/jsx-runtime";function Ho({items:e,onSelect:n,onHide:o,onDoubleTap:t}){let[s,r]=ut(!1),[i,a]=ut(!1),[_,k]=ut({right:24,bottom:24}),[v,C]=ut(null),w=hn(null),B=hn(!1),R=hn({x:0,y:0}),D=hn({x:0,y:0}),K=hn(!1),ce=hn(0),ue=jn(h=>{if(h.button===2)return;B.current=!0,K.current=!1;let z=w.current;if(!z)return;z.setPointerCapture(h.pointerId);let T=z.getBoundingClientRect();R.current={x:h.clientX,y:h.clientY},D.current={x:h.clientX-T.left,y:h.clientY-T.top}},[]),re=jn(h=>{B.current&&((Math.abs(h.clientX-R.current.x)>3||Math.abs(h.clientY-R.current.y)>3)&&(K.current=!0),K.current&&k({right:Math.max(8,Math.min(window.innerWidth-h.clientX-(44-D.current.x),window.innerWidth-52)),bottom:Math.max(8,Math.min(window.innerHeight-h.clientY-(44-D.current.y),window.innerHeight-52))}))},[]),A=jn(h=>{if(B.current&&(w.current?.releasePointerCapture(h.pointerId),B.current=!1,!K.current)){let z=Date.now(),T=z-ce.current<350;if(ce.current=z,T&&t){s&&M(),t();return}s?M():r(!0)}},[s,t]),M=jn(()=>{a(!0),setTimeout(()=>{r(!1),a(!1)},150)},[]),Y=jn(h=>{h.preventDefault(),h.stopPropagation(),C({x:h.clientX,y:h.clientY})},[]);return Rr(()=>{if(!s&&!v)return;let h=z=>{if(!z.target.closest("[data-impakers-fab]")){if(v){C(null);return}s&&M()}};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[s,v,M]),Rt(Mr,{children:[(s||i)&&Ve("div",{className:ze.menuItems,style:{position:"fixed",right:_.right+4/2,bottom:_.bottom+44+8},"data-impakers-debug":"","data-impakers-fab":"",children:[...e].reverse().map((h,z)=>Rt("button",{className:`${ze.menuItem} ${h.active?ze.active:""} ${i?ze.menuItemClosing:""}`,style:{animationDelay:i?`${z*30}ms`:`${(e.length-1-z)*40}ms`},onClick:T=>{T.stopPropagation(),n(h.id),M()},type:"button","data-impakers-fab":"","data-impakers-debug":"",children:[h.icon,Ve("span",{className:ze.tooltip,children:h.label}),h.badge&&h.badge>0?Ve("span",{className:ze.badge,children:h.badge>99?"99+":h.badge}):null]},h.id))}),Ve("button",{ref:w,className:`${ze.fab} ${s?ze.expanded:""}`,style:{position:"fixed",right:_.right,bottom:_.bottom},onPointerDown:ue,onPointerMove:re,onPointerUp:A,onContextMenu:Y,type:"button","aria-label":"\uD53C\uB4DC\uBC31 \uBA54\uB274","data-impakers-debug":"","data-impakers-fab":"",children:Rt("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[Ve("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),Ve("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}),v&&Ve("div",{style:{position:"fixed",inset:0,zIndex:2147483647},onMouseDown:()=>C(null),"data-impakers-debug":"","data-impakers-fab":"",children:Ve("div",{className:ze.contextMenu,style:{position:"fixed",left:v.x,top:v.y,zIndex:2147483647},onMouseDown:h=>h.stopPropagation(),"data-impakers-fab":"",children:Ve("button",{className:ze.contextMenuItem,onMouseDown:h=>{h.stopPropagation(),C(null),o?.()},type:"button",children:"\uC704\uC82F \uC228\uAE30\uAE30"})})})]})}import{useState as Fe,useCallback as Mt,useEffect as bn,useRef as jo}from"react";import{createPortal as zr}from"react-dom";import{useState as _t,useRef as zo,useCallback as Wn}from"react";var Ar=`.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
- }`,Mr={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=Rr}var _e=Mr;import{jsx as le,jsxs as je}from"react/jsx-runtime";function Ar(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(0)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`}function Fr(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 Ho({onSend:e,onEscape:n,placeholder:o="Reply...",autoFocus:t=!1}){let[s,r]=et(""),[a,i]=et(null),[_,b]=et(null),[h,k]=et(!1),x=$o(null),P=$o(null),M=s.trim()||a||_,$=In(()=>{M&&(e(s.trim(),a||void 0,_||void 0),r(""),i(null),b(null),x.current&&(x.current.style.height="auto"))},[s,a,_,M,e]),j=In(v=>{v.stopPropagation(),!v.nativeEvent.isComposing&&(v.key==="Enter"&&!v.shiftKey&&(v.preventDefault(),$()),v.key==="Escape"&&n?.())},[$,n]),re=In(()=>{k(!0);let v=document.querySelectorAll("[data-impakers-debug], [data-annotation-marker]");v.forEach(E=>E.style.visibility="hidden"),document.documentElement.classList.add("impakers-selecting");let N=null,W=E=>{N||(N=document.createElement("div"),N.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(N)),N.style.left=`${E.left}px`,N.style.top=`${E.top}px`,N.style.width=`${E.width}px`,N.style.height=`${E.height}px`},y=()=>{document.removeEventListener("mousemove",R),document.removeEventListener("click",X,!0),document.removeEventListener("keydown",T),document.documentElement.classList.remove("impakers-selecting"),N?.remove(),v.forEach(E=>E.style.visibility=""),k(!1)},R=E=>{let Q=document.elementFromPoint(E.clientX,E.clientY);!Q||Q===N||W(Q.getBoundingClientRect())},T=E=>{E.key==="Escape"&&y()},X=async E=>{E.preventDefault(),E.stopPropagation(),E.stopImmediatePropagation();let Q=document.elementFromPoint(E.clientX,E.clientY);if(y(),!!Q){try{let J=await On(Q);i(J)}catch(J){console.error("[@impakers/debug] DOM \uC2A4\uD06C\uB9B0\uC0F7 \uC2E4\uD328:",J)}x.current?.focus()}};document.addEventListener("mousemove",R),document.addEventListener("click",X,!0),document.addEventListener("keydown",T)},[]),de=In(()=>{P.current?.click()},[]),L=In(v=>{let N=v.target.files?.[0];if(N){if(N.size>4.5*1024*1024){console.warn("[@impakers/debug] \uD30C\uC77C \uD06C\uAE30\uAC00 4.5MB\uB97C \uCD08\uACFC\uD569\uB2C8\uB2E4."),v.target.value="";return}if(N.type.startsWith("image/")){b(null);let W=new FileReader;W.onload=()=>i(W.result),W.readAsDataURL(N)}else i(null),b(N);v.target.value=""}},[]);return je("div",{className:_e.replyWrapper,"data-impakers-debug":"",children:[a&&je("div",{className:_e.pendingImage,children:[le("img",{src:a,alt:"pending"}),le("button",{className:_e.pendingRemove,onClick:()=>i(null),type:"button",children:"\xD7"})]}),_&&je("div",{className:_e.pendingFile,children:[le("span",{className:_e.fileIcon,children:Fr(_.type)}),je("span",{className:_e.fileInfo,children:[le("span",{className:_e.fileCardName,children:_.name}),le("span",{className:_e.fileCardSize,children:Ar(_.size)})]}),le("button",{className:_e.pendingRemove,onClick:()=>b(null),type:"button",children:"\xD7"})]}),le("div",{className:_e.replyArea,children:le("textarea",{ref:x,className:_e.replyInput,placeholder:o,value:s,onChange:v=>{r(v.target.value);let N=v.target;N.style.height="auto",N.style.height=`${Math.min(N.scrollHeight,120)}px`},onKeyDown:j,rows:2,autoFocus:t})}),je("div",{className:_e.replyToolbar,children:[le("button",{className:_e.replyTool,onClick:de,type:"button",title:"\uD30C\uC77C \uCCA8\uBD80",children:je("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[le("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),le("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}),le("button",{className:_e.replyTool,onClick:re,type:"button",title:"\uC694\uC18C \uC2A4\uD06C\uB9B0\uC0F7",children:je("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[le("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"}),le("circle",{cx:"12",cy:"13",r:"3"})]})}),le("button",{className:`${_e.replySend} ${M?_e.active:""}`,onClick:$,disabled:!M,type:"button",title:"\uC804\uC1A1",children:je("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[le("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),le("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]}),le("input",{ref:P,type:"file",accept:"*/*",style:{display:"none"},onChange:L})]})}var Pr=`@keyframes styles-module__slideIn___0o0s- {
1315
+ }`,Pr={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 be=Pr;import{jsx as he,jsxs as Ge}from"react/jsx-runtime";function Fr(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 Do({onSend:e,onEscape:n,placeholder:o="Reply...",autoFocus:t=!1}){let[s,r]=_t(""),[i,a]=_t(null),[_,k]=_t(null),[v,C]=_t(!1),w=zo(null),B=zo(null),R=s.trim()||i||_,D=Wn(()=>{R&&(e(s.trim(),i||void 0,_||void 0),r(""),a(null),k(null),w.current&&(w.current.style.height="auto"))},[s,i,_,R,e]),K=Wn(A=>{A.stopPropagation(),!A.nativeEvent.isComposing&&(A.key==="Enter"&&!A.shiftKey&&(A.preventDefault(),D()),A.key==="Escape"&&n?.())},[D,n]),ce=Wn(()=>{C(!0);let A=document.querySelectorAll("[data-impakers-debug], [data-annotation-marker]");A.forEach(I=>I.style.visibility="hidden"),document.documentElement.classList.add("impakers-selecting");let M=null,Y=I=>{M||(M=document.createElement("div"),M.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(M)),M.style.left=`${I.left}px`,M.style.top=`${I.top}px`,M.style.width=`${I.width}px`,M.style.height=`${I.height}px`},h=()=>{document.removeEventListener("mousemove",z),document.removeEventListener("click",_e,!0),document.removeEventListener("keydown",T),document.documentElement.classList.remove("impakers-selecting"),M?.remove(),A.forEach(I=>I.style.visibility=""),C(!1)},z=I=>{let J=document.elementFromPoint(I.clientX,I.clientY);!J||J===M||Y(J.getBoundingClientRect())},T=I=>{I.key==="Escape"&&h()},_e=async I=>{I.preventDefault(),I.stopPropagation(),I.stopImmediatePropagation();let J=document.elementFromPoint(I.clientX,I.clientY);if(h(),!!J){try{let oe=await nt(J);a(oe)}catch(oe){console.error("[@impakers/debug] DOM \uC2A4\uD06C\uB9B0\uC0F7 \uC2E4\uD328:",oe)}w.current?.focus()}};document.addEventListener("mousemove",z),document.addEventListener("click",_e,!0),document.addEventListener("keydown",T)},[]),ue=Wn(()=>{B.current?.click()},[]),re=Wn(A=>{let M=A.target.files?.[0];if(M){if(M.size>4.5*1024*1024){console.warn("[@impakers/debug] \uD30C\uC77C \uD06C\uAE30\uAC00 4.5MB\uB97C \uCD08\uACFC\uD569\uB2C8\uB2E4."),A.target.value="";return}if(M.type.startsWith("image/")){k(null);let Y=new FileReader;Y.onload=()=>a(Y.result),Y.readAsDataURL(M)}else a(null),k(M);A.target.value=""}},[]);return Ge("div",{className:be.replyWrapper,"data-impakers-debug":"",children:[i&&Ge("div",{className:be.pendingImage,children:[he("img",{src:i,alt:"pending"}),he("button",{className:be.pendingRemove,onClick:()=>a(null),type:"button",children:"\xD7"})]}),_&&Ge("div",{className:be.pendingFile,children:[he("span",{className:be.fileIcon,children:$r(_.type)}),Ge("span",{className:be.fileInfo,children:[he("span",{className:be.fileCardName,children:_.name}),he("span",{className:be.fileCardSize,children:Fr(_.size)})]}),he("button",{className:be.pendingRemove,onClick:()=>k(null),type:"button",children:"\xD7"})]}),he("div",{className:be.replyArea,children:he("textarea",{ref:w,className:be.replyInput,placeholder:o,value:s,onChange:A=>{r(A.target.value);let M=A.target;M.style.height="auto",M.style.height=`${Math.min(M.scrollHeight,120)}px`},onKeyDown:K,rows:2,autoFocus:t})}),Ge("div",{className:be.replyToolbar,children:[he("button",{className:be.replyTool,onClick:ue,type:"button",title:"\uD30C\uC77C \uCCA8\uBD80",children:Ge("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[he("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),he("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}),he("button",{className:be.replyTool,onClick:ce,type:"button",title:"\uC694\uC18C \uC2A4\uD06C\uB9B0\uC0F7",children:Ge("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[he("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"}),he("circle",{cx:"12",cy:"13",r:"3"})]})}),he("button",{className:`${be.replySend} ${R?be.active:""}`,onClick:D,disabled:!R,type:"button",title:"\uC804\uC1A1",children:Ge("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[he("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),he("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]}),he("input",{ref:B,type:"file",accept:"*/*",style:{display:"none"},onChange:re})]})}var Br=`@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=Pr}var l=$r;import{Fragment as Ct,jsx as u,jsxs as f}from"react/jsx-runtime";function Br({src:e,onClose:n}){return rn(()=>{let o=t=>{t.key==="Escape"&&n()};return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)},[n]),f("div",{className:l.lightbox,onClick:n,"data-impakers-debug":"",children:[u("img",{src:e,alt:"enlarged",onClick:o=>o.stopPropagation()}),u("button",{className:l.lightboxClose,onClick:n,type:"button",children:"\xD7"})]})}function zr(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(0)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`}function zo(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 Dr(e){let n=e.match(/\/d\/([^/]+)/);return n?n[1]:null}function jr(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=Dr(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 Wr({fileUrl:e,fileName:n,fileType:o,fileSource:t,onClose:s}){rn(()=>{let a=i=>{i.key==="Escape"&&s()};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[s]);let r=jr(e,o,t);return u("div",{className:l.filePreviewOverlay,onClick:s,"data-impakers-debug":"",children:f("div",{className:l.filePreviewModal,onClick:a=>a.stopPropagation(),children:[f("div",{className:l.filePreviewHeader,children:[u("span",{className:l.filePreviewName,children:n}),f("div",{className:l.filePreviewActions,children:[f("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:l.filePreviewOpen,children:[f("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"14",height:"14",children:[u("path",{d:"M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6"}),u("polyline",{points:"15 3 21 3 21 9"}),u("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]}),"\uC5F4\uAE30"]}),u("button",{className:l.filePreviewClose,onClick:s,type:"button",children:"\xD7"})]})]}),u("div",{className:l.filePreviewBody,children:r?u("iframe",{src:r,className:l.filePreviewIframe,title:n}):f("div",{className:l.filePreviewFallback,children:[u("span",{className:l.filePreviewFallbackIcon,children:zo(o)}),u("span",{children:"\uBBF8\uB9AC\uBCF4\uAE30\uB97C \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 \uD30C\uC77C \uD615\uC2DD\uC785\uB2C8\uB2E4"}),u("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:"\uD30C\uC77C \uC5F4\uAE30"})]})})]})})}function sn(e){let n=new Date(e),o=Date.now()-n.getTime(),t=_=>String(_).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 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 vt(e){return e.slice(0,1).toUpperCase()}function Do({pageItems:e,allItems:n,currentPath:o,serviceName:t,endpoint:s,currentUserName:r,currentUserId:a,onClose:i,onHistoryViewed:_,newNotiCount:b}){let[h,k]=Le("page"),[x,P]=Le("todo"),[M,$]=Le(""),[j,re]=Le(!1),de=Bo(null),[L,v]=Le([]),[N,W]=Le(!1),[y,R]=Le(!1),[T,X]=Le(null),[E,Q]=Le([]),[J,ce]=Le(!1),[he,ee]=Le(null),[te,g]=Le(null),p=Bo(null),H=kt(()=>{if(T){X(null),Q([]);return}R(!0),setTimeout(()=>i(),150)},[i,T]),A=kt(async m=>{X(m);let q=en(De(m.id));Q(q||[]),ce(!q)},[s]);rn(()=>{if(!T)return;let m=De(T.id),q=en(m);q&&(Q(q),ce(!1));let Xe=Ln(m,Ie=>{Q(Ie),ce(!1)});return Un(s,T.id,{staleWhileRevalidate:!0}).then(Ie=>{Q(Ie),ce(!1)}).catch(()=>{ce(!1)}),Xe},[T,s]),rn(()=>{p.current?.scrollIntoView({behavior:"smooth"})},[E.length]),rn(()=>{if(!j)return;let m=q=>{de.current&&!de.current.contains(q.target)&&re(!1)};return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[j]);let ke=kt(async(m,q,Xe)=>{if(T)try{let Ie;if(Xe)try{Ie=await Yn(s,Xe,"comment",T.id)}catch(ln){console.error("[@impakers/debug] \uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328:",ln)}await Xn(s,T.id,m,r,a,q,Ie)}catch(Ie){console.error("[@impakers/debug] \uCF54\uBA58\uD2B8 \uC804\uC1A1 \uC2E4\uD328:",Ie)}},[T,s,r,a]),ve=h==="page"?e:h==="all"?n:[],Te=ve.filter(m=>m.status===x),Y=ve.filter(m=>m.status==="todo").length,Se=ve.filter(m=>m.status==="in_progress").length,ue=ve.filter(m=>m.status==="done").length;return rn(()=>{h==="history"&&(W(!0),Qn(s,{date:M||void 0,limit:200}).then(v).catch(()=>v([])).finally(()=>W(!1)))},[h,M,s]),typeof document>"u"?null:Hr(f("div",{"data-impakers-debug":"",children:[u("div",{className:l.backdrop,onClick:H}),f("div",{className:`${l.panel} ${y?l.exiting:""}`,"data-impakers-debug":"",children:[f("div",{className:l.header,children:[f("div",{className:l.headerLeft,children:[T&&u("button",{className:l.backBtn,onClick:H,type:"button",children:u("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"16",height:"16",children:u("polyline",{points:"15 18 9 12 15 6"})})}),u("span",{className:l.headerTitle,children:T?"\uD53C\uB4DC\uBC31 \uC0C1\uC138":t||"Feedback"})]}),u("button",{className:l.closeBtn,onClick:()=>{R(!0),setTimeout(()=>i(),150)},type:"button",children:u("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:u("path",{d:"M18 6L6 18M6 6l12 12"})})})]}),T?f("div",{className:l.detailView,children:[f("div",{className:l.detailHeader,children:[u("div",{className:l.cardAvatar,children:vt(T.authorName)}),f("div",{children:[f("div",{className:l.cardMeta,children:[u("span",{className:l.cardAuthor,children:T.authorName}),u("span",{className:l.cardTime,children:sn(T.createdAt)})]}),u("div",{className:l.detailTitle,children:T.title.replace(/^\[피드백\]\s*/,"")})]})]}),T.screenshot&&u("div",{className:l.detailScreenshot,children:u("img",{src:T.screenshot,alt:"screenshot"})}),f("div",{className:l.commentsList,children:[J&&u(Gn,{message:"\uB313\uAE00 \uB85C\uB529 \uC911..."}),!J&&E.length===0&&u("div",{className:l.noComments,children:"\uC544\uC9C1 \uB313\uAE00\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"}),E.map(m=>f("div",{className:l.commentItem,children:[u("div",{className:l.commentAvatar,style:{width:22,height:22,fontSize:10},children:vt(m.authorName)}),f("div",{className:l.commentBody,children:[f("div",{className:l.commentMeta,children:[u("span",{className:l.commentAuthorName,children:m.authorName}),u("span",{className:l.commentTime,children:sn(m.createdAt)})]}),m.content&&u("div",{className:l.commentContent,children:m.content}),m.imageUrl&&u("div",{className:l.commentImage,onClick:q=>{q.stopPropagation(),ee(m.imageUrl)},children:u("img",{src:m.imageUrl,alt:"attachment"})}),m.fileUrl&&f("div",{className:l.commentFileCard,onClick:q=>{q.stopPropagation(),g({url:m.fileUrl,name:m.fileName||"\uD30C\uC77C",type:m.fileType||"",source:m.fileSource})},children:[u("span",{className:l.commentFileIcon,children:zo(m.fileType||"")}),f("span",{className:l.commentFileInfo,children:[u("span",{className:l.commentFileName,children:m.fileName||"\uD30C\uC77C"}),m.fileSize!=null&&u("span",{className:l.commentFileSize,children:zr(m.fileSize)})]})]})]})]},m.id)),u("div",{ref:p})]}),u(Ho,{onSend:ke,onEscape:H,autoFocus:!0})]}):f(Ct,{children:[f("div",{className:l.tabs,children:[f("button",{className:`${l.tab} ${h==="page"?l.active:""}`,onClick:()=>k("page"),type:"button",children:["This Page",e.length>0&&u("span",{className:l.tabBadge,children:e.length})]}),f("button",{className:`${l.tab} ${h==="all"?l.active:""}`,onClick:()=>k("all"),type:"button",children:["All",n.length>0&&u("span",{className:l.tabBadge,children:n.length})]}),f("button",{className:`${l.tab} ${h==="history"?l.active:""}`,onClick:()=>{k("history"),_?.()},type:"button",children:["History",b&&b>0?u("span",{className:l.tabBadge,children:b}):null]})]}),h==="history"?f(Ct,{children:[f("div",{className:l.historyFilter,children:[f("div",{className:l.historyDateWrap,ref:de,children:[f("button",{className:`${l.filterChip} ${M?l.active:""}`,onClick:()=>re(m=>!m),type:"button",children:[f("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"13",height:"13",children:[u("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2",ry:"2"}),u("line",{x1:"16",y1:"2",x2:"16",y2:"6"}),u("line",{x1:"8",y1:"2",x2:"8",y2:"6"}),u("line",{x1:"3",y1:"10",x2:"21",y2:"10"})]}),M?`${new Date(M).getMonth()+1}/${new Date(M).getDate()}`:"\uB0A0\uC9DC"]}),j&&u("div",{className:l.datePopover,children:u("input",{type:"date",value:M,onChange:m=>{$(m.target.value),re(!1)},className:l.dateInput,autoFocus:!0})})]}),M&&u("button",{className:l.filterChipClear,onClick:()=>$(""),type:"button",title:"\uD544\uD130 \uCD08\uAE30\uD654",children:"\xD7"})]}),u("div",{className:l.content,children:N?u("div",{className:l.empty,children:"\uB85C\uB529 \uC911..."}):L.length===0?f("div",{className:l.empty,children:[u("div",{className:l.emptyIcon,children:f("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[u("circle",{cx:"12",cy:"12",r:"10"}),u("polyline",{points:"12 6 12 12 16 14"})]})}),"\uD788\uC2A4\uD1A0\uB9AC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4"]}):L.map((m,q)=>f("div",{className:l.historyItem,children:[u("div",{className:`${l.historyDot} ${l[`historyDot_${m.action}`]}`}),f("div",{className:l.historyBody,children:[m.action==="status_changed"&&f("div",{className:l.historyStatusChange,children:[u("span",{className:`${l.historyStatusBadge} ${l[`status_${m.fromStatus}`]}`,children:m.fromStatus==="todo"?"\uB300\uAE30":m.fromStatus==="in_progress"?"\uC9C4\uD589\uC911":"\uC644\uB8CC"}),u("span",{className:l.historyArrow,children:"\u2192"}),u("span",{className:`${l.historyStatusBadge} ${l[`status_${m.toStatus}`]}`,children:m.toStatus==="todo"?"\uB300\uAE30":m.toStatus==="in_progress"?"\uC9C4\uD589\uC911":"\uC644\uB8CC"})]}),m.action==="created"&&f("div",{className:l.historyStatusChange,children:[u("span",{className:l.historyLabel,children:"\uC0DD\uC131"}),u("span",{className:`${l.historyStatusBadge} ${l.status_todo}`,children:"\uB300\uAE30"})]}),m.action==="comment_added"&&f("div",{className:l.historyComment,children:[u("span",{className:l.historyCommentAuthor,children:m.actorName||"\uC775\uBA85"}),m.metadata?.content&&u("span",{className:l.historyCommentContent,children:String(m.metadata.content).slice(0,100)})]}),f("div",{className:l.historyFooter,children:[u("span",{className:l.historyTime,children:sn(m.createdAt)}),u("span",{className:l.historyRef,children:(m.taskTitle||"").replace(/^\[피드백\]\s*/,"")})]})]})]},`${m.id}-${m.action}-${q}`))})]}):f(Ct,{children:[f("div",{className:l.statusFilter,children:[f("button",{className:`${l.filterChip} ${x==="todo"?l.active:""}`,onClick:()=>P("todo"),type:"button",children:["\uC9C4\uD589\uC804",Y>0&&u("span",{className:l.filterCount,children:Y})]}),f("button",{className:`${l.filterChip} ${x==="in_progress"?l.active:""}`,onClick:()=>P("in_progress"),type:"button",children:["\uC9C4\uD589\uC911",Se>0&&u("span",{className:l.filterCount,children:Se})]}),f("button",{className:`${l.filterChip} ${x==="done"?l.active:""}`,onClick:()=>P("done"),type:"button",children:["\uC644\uB8CC",ue>0&&u("span",{className:l.filterCount,children:ue})]})]}),u("div",{className:l.content,children:Te.length===0?f("div",{className:l.empty,children:[u("div",{className:l.emptyIcon,children:u("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:u("path",{d:"M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z"})})}),h==="page"?"\uC774 \uD398\uC774\uC9C0\uC5D0 \uD53C\uB4DC\uBC31\uC774 \uC5C6\uC2B5\uB2C8\uB2E4":"\uD53C\uB4DC\uBC31\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"]}):Te.map(m=>f("div",{className:`${l.card} ${m.status==="done"?l.cardDone:""}`,onClick:()=>A(m),children:[f("div",{className:l.cardHeader,children:[u("div",{className:l.cardAvatar,children:vt(m.authorName)}),u("div",{className:l.cardInfo,children:f("div",{className:l.cardMeta,children:[u("span",{className:l.cardAuthor,children:m.authorName}),u("span",{className:l.cardTime,children:sn(m.createdAt)})]})})]}),u("div",{className:l.cardTitle,children:m.title.replace(/^\[피드백\]\s*/,"")}),m.screenshot&&u("div",{className:l.cardScreenshot,children:u("img",{src:m.screenshot,alt:"screenshot"})}),h==="all"&&m.feedbackUrl&&f("div",{className:l.cardRoute,onClick:q=>{q.stopPropagation(),window.location.href=m.feedbackUrl},title:"\uD398\uC774\uC9C0\uB85C \uC774\uB3D9",children:[u("span",{className:l.cardRoutePath,children:m.feedbackUrl}),f("svg",{className:l.cardRouteIcon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"12",height:"12",children:[u("path",{d:"M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6"}),u("polyline",{points:"15 3 21 3 21 9"}),u("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]})]}),(m.startedAt||m.completedAt)&&f("div",{className:l.cardStatusTime,children:[m.startedAt&&m.status!=="todo"&&f("span",{children:["\uC9C4\uD589 \uC2DC\uC791: ",sn(m.startedAt)]}),m.completedAt&&m.status==="done"&&f("span",{children:["\uC644\uB8CC: ",sn(m.completedAt)]})]}),f("div",{className:l.cardFooter,children:[u("span",{className:l.cardReplyDot}),f("span",{className:l.cardReplyCount,children:[m.commentCount," ",m.commentCount===1?"Reply":"Replies"]})]})]},m.id))})]})]})]}),he&&u(Br,{src:he,onClose:()=>ee(null)}),te&&u(Wr,{fileUrl:te.url,fileName:te.name,fileType:te.type,fileSource:te.source,onClose:()=>g(null)})]}),document.body)}import{useState as En,useRef as wt,useEffect as jo,useCallback as nt}from"react";import{createPortal as Zr}from"react-dom";var Or=`@keyframes styles-module__slideIn___Wx-kZ {
2383
+ }`,Hr={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=Br}var l=Hr;import{Fragment as Pt,jsx as m,jsxs as y}from"react/jsx-runtime";function Dr({src:e,onClose:n}){return bn(()=>{let o=t=>{t.key==="Escape"&&n()};return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)},[n]),y("div",{className:l.lightbox,onClick:n,"data-impakers-debug":"",children:[m("img",{src:e,alt:"enlarged",onClick:o=>o.stopPropagation()}),m("button",{className:l.lightboxClose,onClick:n,type:"button",children:"\xD7"})]})}function jr(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(0)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`}function Wo(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 Wr(e){let n=e.match(/\/d\/([^/]+)/);return n?n[1]:null}function Or(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=Wr(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 Vr({fileUrl:e,fileName:n,fileType:o,fileSource:t,onClose:s}){bn(()=>{let i=a=>{a.key==="Escape"&&s()};return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},[s]);let r=Or(e,o,t);return m("div",{className:l.filePreviewOverlay,onClick:s,"data-impakers-debug":"",children:y("div",{className:l.filePreviewModal,onClick:i=>i.stopPropagation(),children:[y("div",{className:l.filePreviewHeader,children:[m("span",{className:l.filePreviewName,children:n}),y("div",{className:l.filePreviewActions,children:[y("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:l.filePreviewOpen,children:[y("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"14",height:"14",children:[m("path",{d:"M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6"}),m("polyline",{points:"15 3 21 3 21 9"}),m("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]}),"\uC5F4\uAE30"]}),m("button",{className:l.filePreviewClose,onClick:s,type:"button",children:"\xD7"})]})]}),m("div",{className:l.filePreviewBody,children:r?m("iframe",{src:r,className:l.filePreviewIframe,title:n}):y("div",{className:l.filePreviewFallback,children:[m("span",{className:l.filePreviewFallbackIcon,children:Wo(o)}),m("span",{children:"\uBBF8\uB9AC\uBCF4\uAE30\uB97C \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 \uD30C\uC77C \uD615\uC2DD\uC785\uB2C8\uB2E4"}),m("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:"\uD30C\uC77C \uC5F4\uAE30"})]})})]})})}function yn(e){let n=new Date(e),o=Date.now()-n.getTime(),t=_=>String(_).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 At(e){return e.slice(0,1).toUpperCase()}function Oo({pageItems:e,allItems:n,currentPath:o,serviceName:t,endpoint:s,currentUserName:r,currentUserId:i,onClose:a,onHistoryViewed:_,newNotiCount:k}){let[v,C]=Fe("page"),[w,B]=Fe("todo"),[R,D]=Fe(""),[K,ce]=Fe(!1),ue=jo(null),[re,A]=Fe([]),[M,Y]=Fe(!1),[h,z]=Fe(!1),[T,_e]=Fe(null),[I,J]=Fe([]),[oe,me]=Fe(!1),[Me,we]=Fe(null),[pe,b]=Fe(null),x=jo(null),ee=Mt(()=>{if(T){_e(null),J([]);return}z(!0),setTimeout(()=>a(),150)},[a,T]),p=Mt(async u=>{_e(u);let j=pn(qe(u.id));J(j||[]),me(!j)},[s]);bn(()=>{if(!T)return;let u=qe(T.id),j=pn(u);j&&(J(j),me(!1));let Ae=zn(u,ye=>{J(ye),me(!1)});return rt(s,T.id,{staleWhileRevalidate:!0}).then(ye=>{J(ye),me(!1)}).catch(()=>{me(!1)}),Ae},[T,s]),bn(()=>{x.current?.scrollIntoView({behavior:"smooth"})},[I.length]),bn(()=>{if(!K)return;let u=j=>{ue.current&&!ue.current.contains(j.target)&&ce(!1)};return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)},[K]);let P=Mt(async(u,j,Ae)=>{if(T)try{let ye;if(Ae)try{ye=await at(s,Ae,"comment",T.id)}catch(Pe){console.error("[@impakers/debug] \uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328:",Pe)}await it(s,T.id,u,r,i,j,ye)}catch(ye){console.error("[@impakers/debug] \uCF54\uBA58\uD2B8 \uC804\uC1A1 \uC2E4\uD328:",ye)}},[T,s,r,i]),H=v==="page"?e:v==="all"?n:[],ie=H.filter(u=>u.status===w),F=H.filter(u=>u.status==="todo").length,Z=H.filter(u=>u.status==="in_progress").length,te=H.filter(u=>u.status==="done").length;return bn(()=>{v==="history"&&(Y(!0),lt(s,{date:R||void 0,limit:200}).then(A).catch(()=>A([])).finally(()=>Y(!1)))},[v,R,s]),typeof document>"u"?null:zr(y("div",{"data-impakers-debug":"",children:[m("div",{className:l.backdrop,onClick:ee}),y("div",{className:`${l.panel} ${h?l.exiting:""}`,"data-impakers-debug":"",children:[y("div",{className:l.header,children:[y("div",{className:l.headerLeft,children:[T&&m("button",{className:l.backBtn,onClick:ee,type:"button",children:m("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"16",height:"16",children:m("polyline",{points:"15 18 9 12 15 6"})})}),m("span",{className:l.headerTitle,children:T?"\uD53C\uB4DC\uBC31 \uC0C1\uC138":t||"Feedback"})]}),m("button",{className:l.closeBtn,onClick:()=>{z(!0),setTimeout(()=>a(),150)},type:"button",children:m("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:m("path",{d:"M18 6L6 18M6 6l12 12"})})})]}),T?y("div",{className:l.detailView,children:[y("div",{className:l.detailHeader,children:[m("div",{className:l.cardAvatar,children:At(T.authorName)}),y("div",{children:[y("div",{className:l.cardMeta,children:[m("span",{className:l.cardAuthor,children:T.authorName}),m("span",{className:l.cardTime,children:yn(T.createdAt)})]}),m("div",{className:l.detailTitle,children:T.title.replace(/^\[피드백\]\s*/,"")})]})]}),T.screenshot&&m("div",{className:l.detailScreenshot,children:m("img",{src:T.screenshot,alt:"screenshot"})}),y("div",{className:l.commentsList,children:[oe&&m(ct,{message:"\uB313\uAE00 \uB85C\uB529 \uC911..."}),!oe&&I.length===0&&m("div",{className:l.noComments,children:"\uC544\uC9C1 \uB313\uAE00\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"}),I.map(u=>y("div",{className:l.commentItem,children:[m("div",{className:l.commentAvatar,style:{width:22,height:22,fontSize:10},children:At(u.authorName)}),y("div",{className:l.commentBody,children:[y("div",{className:l.commentMeta,children:[m("span",{className:l.commentAuthorName,children:u.authorName}),m("span",{className:l.commentTime,children:yn(u.createdAt)})]}),u.content&&m("div",{className:l.commentContent,children:u.content}),u.imageUrl&&m("div",{className:l.commentImage,onClick:j=>{j.stopPropagation(),we(u.imageUrl)},children:m("img",{src:u.imageUrl,alt:"attachment"})}),u.fileUrl&&y("div",{className:l.commentFileCard,onClick:j=>{j.stopPropagation(),b({url:u.fileUrl,name:u.fileName||"\uD30C\uC77C",type:u.fileType||"",source:u.fileSource})},children:[m("span",{className:l.commentFileIcon,children:Wo(u.fileType||"")}),y("span",{className:l.commentFileInfo,children:[m("span",{className:l.commentFileName,children:u.fileName||"\uD30C\uC77C"}),u.fileSize!=null&&m("span",{className:l.commentFileSize,children:jr(u.fileSize)})]})]})]})]},u.id)),m("div",{ref:x})]}),m(Do,{onSend:P,onEscape:ee,autoFocus:!0})]}):y(Pt,{children:[y("div",{className:l.tabs,children:[y("button",{className:`${l.tab} ${v==="page"?l.active:""}`,onClick:()=>C("page"),type:"button",children:["This Page",e.length>0&&m("span",{className:l.tabBadge,children:e.length})]}),y("button",{className:`${l.tab} ${v==="all"?l.active:""}`,onClick:()=>C("all"),type:"button",children:["All",n.length>0&&m("span",{className:l.tabBadge,children:n.length})]}),y("button",{className:`${l.tab} ${v==="history"?l.active:""}`,onClick:()=>{C("history"),_?.()},type:"button",children:["History",k&&k>0?m("span",{className:l.tabBadge,children:k}):null]})]}),v==="history"?y(Pt,{children:[y("div",{className:l.historyFilter,children:[y("div",{className:l.historyDateWrap,ref:ue,children:[y("button",{className:`${l.filterChip} ${R?l.active:""}`,onClick:()=>ce(u=>!u),type:"button",children:[y("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"13",height:"13",children:[m("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2",ry:"2"}),m("line",{x1:"16",y1:"2",x2:"16",y2:"6"}),m("line",{x1:"8",y1:"2",x2:"8",y2:"6"}),m("line",{x1:"3",y1:"10",x2:"21",y2:"10"})]}),R?`${new Date(R).getMonth()+1}/${new Date(R).getDate()}`:"\uB0A0\uC9DC"]}),K&&m("div",{className:l.datePopover,children:m("input",{type:"date",value:R,onChange:u=>{D(u.target.value),ce(!1)},className:l.dateInput,autoFocus:!0})})]}),R&&m("button",{className:l.filterChipClear,onClick:()=>D(""),type:"button",title:"\uD544\uD130 \uCD08\uAE30\uD654",children:"\xD7"})]}),m("div",{className:l.content,children:M?m("div",{className:l.empty,children:"\uB85C\uB529 \uC911..."}):re.length===0?y("div",{className:l.empty,children:[m("div",{className:l.emptyIcon,children:y("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[m("circle",{cx:"12",cy:"12",r:"10"}),m("polyline",{points:"12 6 12 12 16 14"})]})}),"\uD788\uC2A4\uD1A0\uB9AC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4"]}):re.map((u,j)=>y("div",{className:l.historyItem,children:[m("div",{className:`${l.historyDot} ${l[`historyDot_${u.action}`]}`}),y("div",{className:l.historyBody,children:[u.action==="status_changed"&&y("div",{className:l.historyStatusChange,children:[m("span",{className:`${l.historyStatusBadge} ${l[`status_${u.fromStatus}`]}`,children:u.fromStatus==="todo"?"\uB300\uAE30":u.fromStatus==="in_progress"?"\uC9C4\uD589\uC911":"\uC644\uB8CC"}),m("span",{className:l.historyArrow,children:"\u2192"}),m("span",{className:`${l.historyStatusBadge} ${l[`status_${u.toStatus}`]}`,children:u.toStatus==="todo"?"\uB300\uAE30":u.toStatus==="in_progress"?"\uC9C4\uD589\uC911":"\uC644\uB8CC"})]}),u.action==="created"&&y("div",{className:l.historyStatusChange,children:[m("span",{className:l.historyLabel,children:"\uC0DD\uC131"}),m("span",{className:`${l.historyStatusBadge} ${l.status_todo}`,children:"\uB300\uAE30"})]}),u.action==="comment_added"&&y("div",{className:l.historyComment,children:[m("span",{className:l.historyCommentAuthor,children:u.actorName||"\uC775\uBA85"}),u.metadata?.content&&m("span",{className:l.historyCommentContent,children:String(u.metadata.content).slice(0,100)})]}),y("div",{className:l.historyFooter,children:[m("span",{className:l.historyTime,children:yn(u.createdAt)}),m("span",{className:l.historyRef,children:(u.taskTitle||"").replace(/^\[피드백\]\s*/,"")})]})]})]},`${u.id}-${u.action}-${j}`))})]}):y(Pt,{children:[y("div",{className:l.statusFilter,children:[y("button",{className:`${l.filterChip} ${w==="todo"?l.active:""}`,onClick:()=>B("todo"),type:"button",children:["\uC9C4\uD589\uC804",F>0&&m("span",{className:l.filterCount,children:F})]}),y("button",{className:`${l.filterChip} ${w==="in_progress"?l.active:""}`,onClick:()=>B("in_progress"),type:"button",children:["\uC9C4\uD589\uC911",Z>0&&m("span",{className:l.filterCount,children:Z})]}),y("button",{className:`${l.filterChip} ${w==="done"?l.active:""}`,onClick:()=>B("done"),type:"button",children:["\uC644\uB8CC",te>0&&m("span",{className:l.filterCount,children:te})]})]}),m("div",{className:l.content,children:ie.length===0?y("div",{className:l.empty,children:[m("div",{className:l.emptyIcon,children:m("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:m("path",{d:"M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z"})})}),v==="page"?"\uC774 \uD398\uC774\uC9C0\uC5D0 \uD53C\uB4DC\uBC31\uC774 \uC5C6\uC2B5\uB2C8\uB2E4":"\uD53C\uB4DC\uBC31\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"]}):ie.map(u=>y("div",{className:`${l.card} ${u.status==="done"?l.cardDone:""}`,onClick:()=>p(u),children:[y("div",{className:l.cardHeader,children:[m("div",{className:l.cardAvatar,children:At(u.authorName)}),m("div",{className:l.cardInfo,children:y("div",{className:l.cardMeta,children:[m("span",{className:l.cardAuthor,children:u.authorName}),m("span",{className:l.cardTime,children:yn(u.createdAt)})]})})]}),m("div",{className:l.cardTitle,children:u.title.replace(/^\[피드백\]\s*/,"")}),u.screenshot&&m("div",{className:l.cardScreenshot,children:m("img",{src:u.screenshot,alt:"screenshot"})}),v==="all"&&u.feedbackUrl&&y("div",{className:l.cardRoute,onClick:j=>{j.stopPropagation(),window.location.href=u.feedbackUrl},title:"\uD398\uC774\uC9C0\uB85C \uC774\uB3D9",children:[m("span",{className:l.cardRoutePath,children:u.feedbackUrl}),y("svg",{className:l.cardRouteIcon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"12",height:"12",children:[m("path",{d:"M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6"}),m("polyline",{points:"15 3 21 3 21 9"}),m("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]})]}),(u.startedAt||u.completedAt)&&y("div",{className:l.cardStatusTime,children:[u.startedAt&&u.status!=="todo"&&y("span",{children:["\uC9C4\uD589 \uC2DC\uC791: ",yn(u.startedAt)]}),u.completedAt&&u.status==="done"&&y("span",{children:["\uC644\uB8CC: ",yn(u.completedAt)]})]}),y("div",{className:l.cardFooter,children:[m("span",{className:l.cardReplyDot}),y("span",{className:l.cardReplyCount,children:[u.commentCount," ",u.commentCount===1?"Reply":"Replies"]})]})]},u.id))})]})]})]}),Me&&m(Dr,{src:Me,onClose:()=>we(null)}),pe&&m(Vr,{fileUrl:pe.url,fileName:pe.name,fileType:pe.type,fileSource:pe.source,onClose:()=>b(null)})]}),document.body)}import{useState as Ie,useRef as On,useEffect as Ft,useCallback as Ue}from"react";import{createPortal as Zr}from"react-dom";var Ur=`@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
- }`,Vr={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=Or}var z=Vr;import{jsx as K,jsxs as xe}from"react/jsx-runtime";function Kr(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 Wo({endpoint:e,onClose:n}){let[o,t]=En([]),[s,r]=En(""),[a,i]=En(!1),[_,b]=En(()=>{try{return localStorage.getItem("impakers-agent-session")||null}catch{return null}}),[h,k]=En(!1),x=wt(null),P=wt(null),M=wt(null);jo(()=>{x.current?.scrollIntoView({behavior:"smooth"})},[o]),jo(()=>{P.current?.focus()},[]);let $=nt(()=>{k(!0),setTimeout(()=>n(),150)},[n]),j=nt(async()=>{let L=s.trim();if(!L||a)return;let v=fn();if(!v)return;let N={id:`user-${Date.now()}`,role:"user",content:L,createdAt:Date.now()};t(R=>[...R,N]),r(""),i(!0),P.current&&(P.current.style.height="auto");let W=`assistant-${Date.now()}`,y={id:W,role:"assistant",content:"",toolCalls:[],createdAt:Date.now()};t(R=>[...R,y]);try{let R=new AbortController;M.current=R;let T=e.replace(/\/api\/external\/feedback\/?$/,""),X=await fetch(`${T}/api/agent`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${v}`},body:JSON.stringify({message:L,agentId:"cs-assistant",sessionId:_||void 0}),signal:R.signal});if(!X.ok){let ce=await X.json().catch(()=>({error:"\uC694\uCCAD \uC2E4\uD328"}));t(he=>he.map(ee=>ee.id===W?{...ee,content:`\uC624\uB958: ${ce.error||"\uC694\uCCAD \uC2E4\uD328"}`}:ee)),i(!1);return}let E=X.body.getReader(),Q=new TextDecoder,J="";for(;;){let{done:ce,value:he}=await E.read();if(ce)break;J+=Q.decode(he,{stream:!0});let ee=J.split(`
2699
- `);J=ee.pop()||"";for(let te of ee){if(!te.startsWith("data: "))continue;let g=te.slice(6).trim();if(g)try{let p=JSON.parse(g);switch(p.type){case"meta":if(p.conversationId){b(p.conversationId);try{localStorage.setItem("impakers-agent-session",p.conversationId)}catch{}}break;case"content":t(H=>H.map(A=>A.id===W?{...A,content:A.content+(p.content||"")}:A));break;case"tool_call":t(H=>H.map(A=>A.id===W?{...A,toolCalls:[...A.toolCalls||[],{name:p.name||"",input:p.input||{},status:"running"}]}:A));break;case"tool_result":t(H=>H.map(A=>{if(A.id!==W)return A;let ke=[...A.toolCalls||[]],ve=ke.findLastIndex(Te=>Te.name===p.name&&Te.status==="running");return ve>=0&&(ke[ve]={...ke[ve],status:p.result?.success?"success":"error"}),{...A,toolCalls:ke}}));break;case"error":t(H=>H.map(A=>A.id===W?{...A,content:A.content+`
2700
-
2701
- \uC624\uB958: ${p.error}`}:A));break;case"done":break}}catch{}}}}catch(R){R?.name!=="AbortError"&&t(T=>T.map(X=>X.id===W?{...X,content:X.content||"\uC5F0\uACB0\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4."}:X))}finally{i(!1),M.current=null}},[s,a,_,e]),re=nt(L=>{L.stopPropagation(),!L.nativeEvent.isComposing&&(L.key==="Enter"&&!L.shiftKey&&(L.preventDefault(),j()),L.key==="Escape"&&$())},[j,$]),de=nt(()=>{t([]),b(null);try{localStorage.removeItem("impakers-agent-session")}catch{}},[]);return typeof document>"u"?null:Zr(xe("div",{"data-impakers-debug":"",children:[K("div",{className:z.backdrop,onClick:$}),xe("div",{className:`${z.panel} ${h?z.exiting:""}`,"data-impakers-debug":"",children:[xe("div",{className:z.header,children:[xe("div",{className:z.headerLeft,children:[K("span",{className:z.headerIcon,children:"\u2726"}),K("span",{className:z.headerTitle,children:"AI \uC5D0\uC774\uC804\uD2B8"})]}),xe("div",{className:z.headerActions,children:[K("button",{className:z.headerBtn,onClick:de,type:"button",title:"\uC0C8 \uB300\uD654",children:xe("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"15",height:"15",children:[K("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),K("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}),K("button",{className:z.headerBtn,onClick:$,type:"button",title:"\uB2EB\uAE30",children:K("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"15",height:"15",children:K("path",{d:"M18 6L6 18M6 6l12 12"})})})]})]}),xe("div",{className:z.messages,children:[o.length===0&&xe("div",{className:z.welcome,children:[K("div",{className:z.welcomeIcon,children:"\u2726"}),K("div",{className:z.welcomeText,children:"\uBB34\uC5C7\uC744 \uB3C4\uC640\uB4DC\uB9B4\uAE4C\uC694?"}),K("div",{className:z.welcomeHint,children:"\uC0AC\uC6A9 \uC911 \uAD81\uAE08\uD55C \uC810\uC774\uB098 \uBB38\uC81C\uB97C \uBB3C\uC5B4\uBCF4\uC138\uC694"})]}),o.map(L=>xe("div",{className:`${z.message} ${z[L.role]}`,children:[L.role==="assistant"&&K("div",{className:z.msgAvatar,children:"\u2726"}),xe("div",{className:z.msgBody,children:[L.toolCalls&&L.toolCalls.length>0&&K("div",{className:z.toolCalls,children:L.toolCalls.map((v,N)=>xe("div",{className:`${z.toolCall} ${z[`tool_${v.status}`]}`,children:[K("span",{className:z.toolIcon,children:v.status==="running"?"\u23F3":v.status==="success"?"\u2713":"\u2717"}),K("span",{className:z.toolName,children:Kr(v.name)})]},N))}),L.content&&K("div",{className:z.msgContent,children:L.content}),L.role==="assistant"&&a&&L.id===o[o.length-1]?.id&&!L.content&&xe("div",{className:z.typing,children:[K("span",{}),K("span",{}),K("span",{})]})]})]},L.id)),K("div",{ref:x})]}),xe("div",{className:z.inputArea,children:[K("textarea",{ref:P,className:z.input,placeholder:"\uBA54\uC2DC\uC9C0\uB97C \uC785\uB825\uD558\uC138\uC694...",value:s,onChange:L=>{r(L.target.value);let v=L.target;v.style.height="auto",v.style.height=`${Math.min(v.scrollHeight,120)}px`},onKeyDown:re,rows:1,disabled:a}),K("button",{className:`${z.sendBtn} ${s.trim()&&!a?z.active:""}`,onClick:j,disabled:!s.trim()||a,type:"button",children:xe("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"16",height:"16",children:[K("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),K("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]})]})]}),document.body)}import{useCallback as tt}from"react";import{createPortal as Yr}from"react-dom";var Oo="impakers-debug-settings",St={markerColor:"#6366f1",markersVisible:!0,hideDoneMarkers:!1,showOnlyMine:!1};function Vo(){try{let e=localStorage.getItem(Oo);return e?{...St,...JSON.parse(e)}:{...St}}catch{return{...St}}}function Zo(e){try{localStorage.setItem(Oo,JSON.stringify(e))}catch{}}var Ko=[{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 Ur=`@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=Ur}var f=Kr;import{Fragment as Gr,jsx as g,jsxs as O}from"react/jsx-runtime";function Uo(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 Xr(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(O("div",{className:f.codeBlock,children:[r&&g("div",{className:f.codeLang,children:r}),g("pre",{children:g("code",{children:i.join(`
3105
+ `)})}),g("button",{className:f.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(g("div",{className:f[`heading${r}`],children:Vo(i)},`h-${t}`)),t++;continue}if(!s.trim()){t++;continue}n.push(g("p",{className:f.paragraph,children:Vo(s)},`p-${t}`)),t++}return n}function Vo(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(g("strong",{children:s[2]},r++)):s[3]&&n.push(g("code",{className:f.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]:g(Gr,{children:n})}function Yr({content:e}){let[n,o]=Ie(!1),t=e.split(`
3107
+ `);return t.length>8?O("div",{className:f.msgContent,children:[n?e:t.slice(0,6).join(`
3108
+ `)+"...",g("button",{className:f.expandBtn,onClick:()=>o(!n),type:"button",children:n?"\uC811\uAE30":"\uB354\uBCF4\uAE30"})]}):g("div",{className:f.msgContent,children:e})}function Qr({text:e}){let[n,o]=Ie(!1),t=Ue(()=>{navigator.clipboard?.writeText(e),o(!0),setTimeout(()=>o(!1),1500)},[e]);return g("button",{className:f.copyBtn,onClick:t,type:"button",children:n?"\u2713 \uBCF5\uC0AC\uB428":"\uBCF5\uC0AC"})}function qr({calls:e}){let[n,o]=Ie(!1);if(!e.length)return null;let t=e.filter(r=>r.status==="error").length,s=e.filter(r=>r.isSubAgent).length;return O("div",{className:f.toolCompact,children:[O("button",{className:f.toolCompactToggle,onClick:()=>o(!n),type:"button",children:[g("span",{className:f.toolCompactIcon,children:n?"\u25BE":"\u25B8"}),"\uB3C4\uAD6C ",e.length,"\uAC1C \uC0AC\uC6A9",t>0&&O("span",{className:f.toolCompactError,children:[" (",t," \uC2E4\uD328)"]}),s>0&&O("span",{className:f.toolCompactSub,children:[" \xB7 \uC11C\uBE0C ",s]})]}),n&&g("div",{className:f.toolCompactList,children:e.map((r,i)=>O("div",{className:`${f.toolCompactItem} ${f[`tool_${r.status}`]}`,children:[g("span",{children:r.status==="success"?"\u2713":r.status==="error"?"\u2717":"\u23F3"}),g("span",{children:Uo(r.name)}),r.isSubAgent&&g("span",{className:f.subBadge,children:"sub"}),r.summary&&g("span",{className:f.toolSummary,children:r.summary})]},i))})]})}function Ko({endpoint:e,onClose:n}){let[o,t]=Ie([]),[s,r]=Ie(""),[i,a]=Ie(!1),[_,k]=Ie(()=>{try{return localStorage.getItem("impakers-agent-session")||null}catch{return null}}),[v,C]=Ie(!1),[w,B]=Ie(!1),[R,D]=Ie([]),[K,ce]=Ie(420),[ue,re]=Ie(!1),[A,M]=Ie([]),[Y,h]=Ie([]),z=On(null),T=On(null),_e=On(null),I=On(null),J=On(!1);Ft(()=>{z.current?.scrollIntoView({behavior:"smooth"})},[o,Y]),Ft(()=>{T.current?.focus()},[]);let oe=Ue(()=>{let p=en();if(!p)return;let P=e.replace(/\/api\/external\/feedback\/?$/,"");fetch(`${P}/api/agent/sessions?agentId=cs-assistant`,{headers:{Authorization:`Bearer ${p}`}}).then(H=>H.json()).then(H=>M(H.sessions||[])).catch(()=>{})},[e]);Ft(()=>{oe()},[oe]);let me=Ue(()=>{C(!0),setTimeout(()=>n(),150)},[n]),Me=Ue(p=>{p.preventDefault(),J.current=!0;let P=p.clientX,H=K,ie=Z=>{if(!J.current)return;let te=P-Z.clientX;ce(Math.max(360,Math.min(H+te,window.innerWidth-40)))},F=()=>{J.current=!1,document.removeEventListener("mousemove",ie),document.removeEventListener("mouseup",F)};document.addEventListener("mousemove",ie),document.addEventListener("mouseup",F)},[K]),we=Ue(p=>{let P=p.target.files;P&&(Array.from(P).forEach(H=>{if(!H.type.startsWith("image/")||H.size>5*1024*1024)return;let ie=new FileReader;ie.onload=()=>{let F=ie.result.split(",")[1];D(Z=>[...Z,{base64:F,mediaType:H.type}])},ie.readAsDataURL(H)}),p.target.value="")},[]),pe=Ue(async p=>{let P=en();if(!P)return;let H=e.replace(/\/api\/external\/feedback\/?$/,"");try{let F=await(await fetch(`${H}/api/agent/sessions?sessionId=${p}`,{headers:{Authorization:`Bearer ${P}`}})).json();if(F.messages){t(F.messages.map((Z,te)=>({id:`loaded-${te}`,role:Z.role,content:Z.content,createdAt:new Date(Z.createdAt||Date.now()).getTime()}))),k(p);try{localStorage.setItem("impakers-agent-session",p)}catch{}re(!1)}}catch{}},[e]),b=Ue(async p=>{let P=p||s.trim(),H=R;if(!P&&H.length===0||i)return;let ie=en();if(!ie)return;let F={id:`user-${Date.now()}`,role:"user",content:P||"\uC774\uBBF8\uC9C0\uB97C \uBD84\uC11D\uD574\uC8FC\uC138\uC694.",images:H.length>0?H:void 0,createdAt:Date.now()};t(j=>[...j,F]),r(""),D([]),a(!0),B(!1),h([]),T.current&&(T.current.style.height="auto");let Z=`assistant-${Date.now()}`,te={id:Z,role:"assistant",content:"",toolCalls:[],createdAt:Date.now()};t(j=>[...j,te]);let u=!1;try{let j=new AbortController;_e.current=j;let Ae=e.replace(/\/api\/external\/feedback\/?$/,""),ye=await fetch(`${Ae}/api/agent`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${ie}`},body:JSON.stringify({message:P||"\uC774\uBBF8\uC9C0\uB97C \uBD84\uC11D\uD574\uC8FC\uC138\uC694.",agentId:"cs-assistant",sessionId:_||void 0,images:H.length>0?H.map(Ze=>({type:"image",...Ze})):void 0}),signal:j.signal});if(!ye.ok){let Ze=await ye.json().catch(()=>({error:"\uC694\uCCAD \uC2E4\uD328"}));t(Xe=>Xe.map(Be=>Be.id===Z?{...Be,content:`\uC624\uB958: ${Ze.error||"\uC694\uCCAD \uC2E4\uD328"}`}:Be)),a(!1);return}let Pe=ye.body.getReader(),Un=new TextDecoder,an="";for(;;){let{done:Ze,value:Xe}=await Pe.read();if(Ze)break;an+=Un.decode(Xe,{stream:!0});let Be=an.split(`
3109
+ `);an=Be.pop()||"";for(let kn of Be){if(!kn.startsWith("data: "))continue;let vn=kn.slice(6).trim();if(vn)try{let q=JSON.parse(vn);switch(q.type){case"meta":if(q.conversationId){k(q.conversationId);try{localStorage.setItem("impakers-agent-session",q.conversationId)}catch{}}break;case"content":t(Se=>Se.map(V=>V.id===Z?{...V,content:V.content+(q.content||"")}:V));break;case"tool_call":{let Se={name:q.name||"",input:q.input||{},status:"running"};h(V=>[...V,Se]),t(V=>V.map(ke=>ke.id===Z?{...ke,toolCalls:[...ke.toolCalls||[],Se]}:ke));break}case"tool_result":h(Se=>Se.map(V=>V.name===q.name&&V.status==="running"?{...V,status:q.result?.success?"success":"error",summary:q.result?.summary}:V)),t(Se=>Se.map(V=>{if(V.id!==Z)return V;let ke=[...V.toolCalls||[]],ln=ke.findLastIndex(Cn=>Cn.name===q.name&&Cn.status==="running");return ln>=0&&(ke[ln]={...ke[ln],status:q.result?.success?"success":"error",summary:q.result?.summary}),{...V,toolCalls:ke}}));break;case"sub_agent_tool":{let Se={name:q.toolName||q.agentName||"sub-agent",input:{},status:q.status==="done"?"success":"running",isSubAgent:!0,summary:q.summary};q.status==="running"?h(V=>[...V,Se]):h(V=>V.map(ke=>ke.isSubAgent&&ke.status==="running"?{...ke,status:"success",summary:q.summary}:ke));break}case"error":t(Se=>Se.map(V=>V.id===Z?{...V,content:V.content+`
3110
+
3111
+ \uC624\uB958: ${q.error}`}:V));break;case"done":u=!0;break}}catch{}}}u||B(!0)}catch(j){if(j?.name!=="AbortError"){t(ye=>ye.map(Pe=>Pe.id===Z?{...Pe,content:Pe.content||"\uC5F0\uACB0\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4."}:Pe));let Ae=j?.message||"";(Ae.includes("timeout")||Ae.includes("aborted")||Ae.includes("network"))&&B(!0)}}finally{a(!1),h([]),_e.current=null,oe()}},[s,R,i,_,e,oe]),x=Ue(p=>{p.stopPropagation(),!p.nativeEvent.isComposing&&(p.key==="Enter"&&!p.shiftKey&&(p.preventDefault(),b()),p.key==="Escape"&&me())},[b,me]),ee=Ue(()=>{t([]),k(null),B(!1),h([]);try{localStorage.removeItem("impakers-agent-session")}catch{}},[]);return typeof document>"u"?null:Zr(O("div",{"data-impakers-debug":"",children:[g("div",{className:f.backdrop,onClick:me}),O("div",{className:`${f.panel} ${v?f.exiting:""}`,style:{width:K},"data-impakers-debug":"",children:[g("div",{className:f.resizeHandle,onMouseDown:Me}),O("div",{className:f.header,children:[O("div",{className:f.headerLeft,children:[g("button",{className:f.headerBtn,onClick:()=>re(!ue),type:"button",title:"\uB300\uD654 \uAE30\uB85D",children:O("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"15",height:"15",children:[g("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),g("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),g("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]})}),g("span",{className:f.headerIcon,children:"\u2726"}),g("span",{className:f.headerTitle,children:"AI \uC5D0\uC774\uC804\uD2B8"})]}),O("div",{className:f.headerActions,children:[g("button",{className:f.headerBtn,onClick:ee,type:"button",title:"\uC0C8 \uB300\uD654",children:O("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"15",height:"15",children:[g("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),g("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}),g("button",{className:f.headerBtn,onClick:me,type:"button",title:"\uB2EB\uAE30",children:g("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"15",height:"15",children:g("path",{d:"M18 6L6 18M6 6l12 12"})})})]})]}),O("div",{className:f.body,children:[ue&&O("div",{className:f.sidebar,children:[g("div",{className:f.sidebarHeader,children:"\uB300\uD654 \uAE30\uB85D"}),O("div",{className:f.sidebarList,children:[A.length===0&&g("div",{className:f.sidebarEmpty,children:"\uAE30\uB85D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"}),A.map(p=>O("button",{className:`${f.sidebarItem} ${p.id===_?f.sidebarActive:""}`,onClick:()=>pe(p.id),type:"button",children:[g("div",{className:f.sidebarTitle,children:p.title||"\uC0C8 \uB300\uD654"}),g("div",{className:f.sidebarDate,children:new Date(p.createdAt).toLocaleDateString("ko-KR",{month:"short",day:"numeric"})})]},p.id))]})]}),O("div",{className:f.messages,children:[o.length===0&&O("div",{className:f.welcome,children:[g("div",{className:f.welcomeIcon,children:"\u2726"}),g("div",{className:f.welcomeText,children:"\uBB34\uC5C7\uC744 \uB3C4\uC640\uB4DC\uB9B4\uAE4C\uC694?"}),g("div",{className:f.welcomeHint,children:"\uC0AC\uC6A9 \uC911 \uAD81\uAE08\uD55C \uC810\uC774\uB098 \uBB38\uC81C\uB97C \uBB3C\uC5B4\uBCF4\uC138\uC694"})]}),o.map(p=>O("div",{className:`${f.message} ${f[p.role]}`,children:[p.role==="assistant"&&g("div",{className:f.msgAvatar,children:"\u2726"}),O("div",{className:f.msgBody,children:[p.images&&p.images.length>0&&g("div",{className:f.msgImages,children:p.images.map((P,H)=>g("img",{src:`data:${P.mediaType};base64,${P.base64}`,alt:"",className:f.msgImage},H))}),p.toolCalls&&p.toolCalls.length>0&&!i&&g(qr,{calls:p.toolCalls}),i&&p.id===o[o.length-1]?.id&&Y.length>0&&O("div",{className:f.toolCalls,children:[Y.slice(-3).map((P,H)=>O("div",{className:`${f.toolCall} ${f[`tool_${P.status}`]}`,children:[g("span",{className:f.toolIcon,children:P.status==="running"?"\u23F3":P.status==="success"?"\u2713":"\u2717"}),g("span",{className:f.toolName,children:Uo(P.name)}),P.isSubAgent&&g("span",{className:f.subBadge,children:"sub"})]},H)),Y.length>3&&O("div",{className:f.toolMore,children:["+",Y.length-3,"\uAC1C \uC644\uB8CC"]})]}),p.content&&p.role==="assistant"&&g("div",{className:f.msgMarkdown,children:Xr(p.content)}),p.content&&p.role==="user"&&g(Yr,{content:p.content}),p.role==="assistant"&&i&&p.id===o[o.length-1]?.id&&!p.content&&Y.length===0&&O("div",{className:f.typing,children:[g("span",{}),g("span",{}),g("span",{})]}),p.role==="assistant"&&p.content&&!i&&g(Qr,{text:p.content})]})]},p.id)),w&&!i&&O("div",{className:f.continueBar,children:[g("span",{children:"\uD0C0\uC784\uC544\uC6C3\uC73C\uB85C \uBA48\uCDC4\uC2B5\uB2C8\uB2E4."}),g("button",{onClick:()=>{B(!1),b("\uC774\uC5B4\uC11C \uACC4\uC18D \uBD84\uC11D\uD574\uC918")},type:"button",children:"\uACC4\uC18D\uD558\uAE30 \u2192"})]}),g("div",{ref:z})]})]}),R.length>0&&g("div",{className:f.imagePreview,children:R.map((p,P)=>O("div",{className:f.imageThumb,children:[g("img",{src:`data:${p.mediaType};base64,${p.base64}`,alt:""}),g("button",{className:f.imageRemove,onClick:()=>D(H=>H.filter((ie,F)=>F!==P)),type:"button",children:"\xD7"})]},P))}),O("div",{className:f.inputArea,children:[g("button",{className:f.attachBtn,onClick:()=>I.current?.click(),type:"button",title:"\uC774\uBBF8\uC9C0 \uCCA8\uBD80",children:O("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"16",height:"16",children:[g("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}),g("circle",{cx:"8.5",cy:"8.5",r:"1.5"}),g("polyline",{points:"21 15 16 10 5 21"})]})}),g("textarea",{ref:T,className:f.input,placeholder:"\uBA54\uC2DC\uC9C0\uB97C \uC785\uB825\uD558\uC138\uC694...",value:s,onChange:p=>{r(p.target.value);let P=p.target;P.style.height="auto",P.style.height=`${Math.min(P.scrollHeight,120)}px`},onKeyDown:x,rows:1,disabled:i}),g("button",{className:`${f.sendBtn} ${(s.trim()||R.length>0)&&!i?f.active:""}`,onClick:()=>b(),disabled:!s.trim()&&R.length===0||i,type:"button",children:O("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"16",height:"16",children:[g("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),g("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]}),g("input",{ref:I,type:"file",accept:"image/jpeg,image/png,image/gif,image/webp",multiple:!0,style:{display:"none"},onChange:we})]})]}),document.body)}import{useCallback as mt}from"react";import{createPortal as ni}from"react-dom";var Zo="impakers-debug-settings",$t={markerColor:"#6366f1",markersVisible:!0,hideDoneMarkers:!1,showOnlyMine:!1};function Xo(){try{let e=localStorage.getItem(Zo);return e?{...$t,...JSON.parse(e)}:{...$t}}catch{return{...$t}}}function Yo(e){try{localStorage.setItem(Zo,JSON.stringify(e))}catch{}}var Qo=[{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 Jr=`@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
- }`,Xr={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=Ur}var V=Xr;import{jsx as me,jsxs as We}from"react/jsx-runtime";function Uo({settings:e,onChange:n,onClose:o}){let t=tt(()=>{n({...e,markersVisible:!e.markersVisible})},[e,n]),s=tt(()=>{n({...e,hideDoneMarkers:!e.hideDoneMarkers})},[e,n]),r=tt(()=>{n({...e,showOnlyMine:!e.showOnlyMine})},[e,n]),a=tt(i=>{n({...e,markerColor:i})},[e,n]);return typeof document>"u"?null:Yr(We("div",{"data-impakers-debug":"",children:[me("div",{className:V.backdrop,onClick:o}),We("div",{className:V.panel,"data-impakers-debug":"",children:[We("div",{className:V.header,children:[me("span",{className:V.title,children:"\uC124\uC815"}),me("button",{className:V.closeBtn,onClick:o,type:"button",children:me("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:me("path",{d:"M18 6L6 18M6 6l12 12"})})})]}),We("div",{className:V.body,children:[We("div",{className:V.field,children:[me("div",{className:V.fieldLabel,children:"\uB9C8\uCEE4 \uD45C\uC2DC"}),me("button",{className:`${V.toggle} ${e.markersVisible?V.on:""}`,onClick:t,type:"button",children:me("span",{className:V.toggleThumb})})]}),We("div",{className:V.field,children:[me("div",{className:V.fieldLabel,children:"\uC644\uB8CC \uD540 \uC228\uAE30\uAE30"}),me("button",{className:`${V.toggle} ${e.hideDoneMarkers?V.on:""}`,onClick:s,type:"button",children:me("span",{className:V.toggleThumb})})]}),We("div",{className:V.field,children:[me("div",{className:V.fieldLabel,children:"\uB0B4\uAC00 \uCD94\uAC00\uD55C \uAC83\uB9CC"}),me("button",{className:`${V.toggle} ${e.showOnlyMine?V.on:""}`,onClick:r,type:"button",children:me("span",{className:V.toggleThumb})})]}),We("div",{className:V.field,children:[me("div",{className:V.fieldLabel,children:"\uB9C8\uCEE4 \uC0C9\uC0C1"}),me("div",{className:V.colors,children:Ko.map(i=>me("button",{className:`${V.colorBtn} ${e.markerColor===i.value?V.selected:""}`,style:{background:i.value},onClick:()=>a(i.value),title:i.label,type:"button"},i.id))})]})]})]})]}),document.body)}var Qr=`.styles-module__markersLayer___VR1cD svg[fill=none],
3240
+ }`,ei={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=Jr}var Q=ei;import{jsx as xe,jsxs as Je}from"react/jsx-runtime";function qo({settings:e,onChange:n,onClose:o}){let t=mt(()=>{n({...e,markersVisible:!e.markersVisible})},[e,n]),s=mt(()=>{n({...e,hideDoneMarkers:!e.hideDoneMarkers})},[e,n]),r=mt(()=>{n({...e,showOnlyMine:!e.showOnlyMine})},[e,n]),i=mt(a=>{n({...e,markerColor:a})},[e,n]);return typeof document>"u"?null:ni(Je("div",{"data-impakers-debug":"",children:[xe("div",{className:Q.backdrop,onClick:o}),Je("div",{className:Q.panel,"data-impakers-debug":"",children:[Je("div",{className:Q.header,children:[xe("span",{className:Q.title,children:"\uC124\uC815"}),xe("button",{className:Q.closeBtn,onClick:o,type:"button",children:xe("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:xe("path",{d:"M18 6L6 18M6 6l12 12"})})})]}),Je("div",{className:Q.body,children:[Je("div",{className:Q.field,children:[xe("div",{className:Q.fieldLabel,children:"\uB9C8\uCEE4 \uD45C\uC2DC"}),xe("button",{className:`${Q.toggle} ${e.markersVisible?Q.on:""}`,onClick:t,type:"button",children:xe("span",{className:Q.toggleThumb})})]}),Je("div",{className:Q.field,children:[xe("div",{className:Q.fieldLabel,children:"\uC644\uB8CC \uD540 \uC228\uAE30\uAE30"}),xe("button",{className:`${Q.toggle} ${e.hideDoneMarkers?Q.on:""}`,onClick:s,type:"button",children:xe("span",{className:Q.toggleThumb})})]}),Je("div",{className:Q.field,children:[xe("div",{className:Q.fieldLabel,children:"\uB0B4\uAC00 \uCD94\uAC00\uD55C \uAC83\uB9CC"}),xe("button",{className:`${Q.toggle} ${e.showOnlyMine?Q.on:""}`,onClick:r,type:"button",children:xe("span",{className:Q.toggleThumb})})]}),Je("div",{className:Q.field,children:[xe("div",{className:Q.fieldLabel,children:"\uB9C8\uCEE4 \uC0C9\uC0C1"}),xe("div",{className:Q.colors,children:Qo.map(a=>xe("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 ti=`.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
- }`,qr={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=Qr}var ne=qr;import{Fragment as ii,jsx as F,jsxs as Ne}from"react/jsx-runtime";function Lt(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 ei(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 Xo(e){let{name:n,path:o}=lt(e),t=co(e,{mode:"filtered"});return{name:t.path?`${t.path} ${n}`:n,elementName:n,path:o,reactComponents:t.path}}function ni(e){let n=kn(e),o=n.found?n:ct(e);if(o.found&&o.source)return Wn(o.source,"path")}function ti(e){let n=kn(e),o=n.found?n:ct(e);return o.found&&o.sourceCandidates&&o.sourceCandidates.length>0?o.sourceCandidates.map(t=>Wn(t,"path")):o.found&&o.source?[Wn(o.source,"path")]:[]}function oi(e,n){let o=e.match(/^(.+):(\d+)(?::(\d+))?$/);if(!o)return null;let[,t,s,r]=o,a=Number.parseInt(s,10),i=r?Number.parseInt(r,10):void 0;return!t||Number.isNaN(a)?null:{kind:"component",file:t,line:a,column:i,label:n||"Resolved component source",confidence:.98,reason:"resolved-from-source-map"}}var si="impakers-debug-markers-";function Tt(){return si+window.location.pathname}function Nt(){try{let e=localStorage.getItem(Tt());return e?JSON.parse(e):[]}catch{return[]}}function Yo(e){try{e.length===0?localStorage.removeItem(Tt()):localStorage.setItem(Tt(),JSON.stringify(e))}catch{}}function ri(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 Qo({endpoint:e,getUser:n,onHide:o}){let[t,s]=U(!1),[r,a]=U(()=>Nt()),[i,_]=U(null),[b,h]=U(!1),[k,x]=U(null),[P,M]=U({x:0,y:0}),[$,j]=U(new Set),[re,de]=U(!1),[L,v]=U(null),[N,W]=U(null),[y,R]=U(!1),[T,X]=U(null),[E,Q]=U(null),[J,ce]=U({}),[he,ee]=U(!1),[te,g]=U([]),[p,H]=U([]),[A,ke]=U(!1),[ve,Te]=U(!1),[Y,Se]=U(!1),[ue,m]=U(()=>Vo()),[q,Xe]=U(()=>window.location.pathname),[Ie,ln]=U(!1),[At,Ft]=U(0),[Pt,Mn]=U(null),An=Rn(null),$t=Rn(null),Ht=Rn(null),dn=Rn(!1),Bt=we(()=>{Mn(3);let d=3,c=()=>{d-=1,d<=0?(Mn(null),s(!0),document.documentElement.classList.add("impakers-selecting")):(Mn(d),An.current=setTimeout(c,1e3))};An.current=setTimeout(c,1e3)},[]),Jo=we(d=>{d==="comment"?zt():d==="delay-capture"?Bt():d==="agent"?Te(!0):d==="inbox"?(ke(!0),ko(e,{staleWhileRevalidate:!0}).then(H).catch(()=>{}),t&&(s(!1),document.documentElement.classList.remove("impakers-selecting"),x(null),_(null))):d==="settings"&&Se(!0)},[t,Bt]),es=we(d=>{m(d),Zo(d)},[]),zt=we(()=>{s(d=>{let c=!d;return c?document.documentElement.classList.add("impakers-selecting"):(document.documentElement.classList.remove("impakers-selecting"),x(null),_(null)),c})},[]);Ae(()=>()=>{document.documentElement.classList.remove("impakers-selecting")},[]),Ae(()=>{a(Nt());let d=()=>{Xe(window.location.pathname),a(Nt()),_(null),x(null)};window.addEventListener("popstate",d);let c=history.pushState.bind(history);return history.pushState=(...O)=>{c(...O),setTimeout(d,50)},()=>{window.removeEventListener("popstate",d),history.pushState=c}},[]),Ae(()=>{let d=Be(q),c=en(d);c&&(g(c),ln(!0));let O=Ln(d,S=>{g(S),ln(!0)});return xo(e,q,{staleWhileRevalidate:!0}).then(S=>{g(S),ln(!0)}).catch(()=>{}),O},[e,q]);let Dt="impakers-debug-history-last-seen";Ae(()=>{let d=localStorage.getItem(Dt)||new Date(0).toISOString();Qn(e,{since:d,limit:100}).then(c=>Ft(c.length)).catch(()=>{})},[e]);let ns=we(()=>{localStorage.setItem(Dt,new Date().toISOString()),Ft(0)},[]);Ae(()=>{if(!Ie)return;let d=te.map(ri).filter(c=>c!==null);a(d),Yo(d)},[te,Ie]);let jt=Rn(!0);Ae(()=>{if(jt.current){jt.current=!1;return}Yo(r)},[r]),Ae(()=>{let d=c=>{if(c.key==="Escape"){if(A){ke(!1);return}if(i){c.preventDefault(),h(!0),ge(()=>{_(null),h(!1)},150);return}t&&(c.preventDefault(),s(!1),document.documentElement.classList.remove("impakers-selecting"),x(null))}};return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[A,i,t]),Ae(()=>{if(!t||i)return;let d=c=>{let O=c.composedPath()[0]||c.target;if(Ze(O,"[data-impakers-debug]")){x(null);return}let S=Lt(c.clientX,c.clientY);if(!S||Ze(S,"[data-impakers-debug]")){x(null);return}let{name:ie,elementName:ye,path:pe,reactComponents:G}=Xo(S),C=S.getBoundingClientRect();x({element:ie,elementName:ye,elementPath:pe,rect:C,reactComponents:G}),M({x:c.clientX,y:c.clientY})};return document.addEventListener("mousemove",d),()=>document.removeEventListener("mousemove",d)},[t,i]),Ae(()=>{if(!t)return;let d=c=>{if(dn.current)return;let O=c.composedPath()[0]||c.target;if(Ze(O,"[data-impakers-debug]")||Ze(O,"[data-annotation-popup]")||Ze(O,"[data-annotation-marker]"))return;if(i){c.preventDefault(),c.stopPropagation(),$t.current?.shake();return}c.preventDefault(),c.stopPropagation();let S=Lt(c.clientX,c.clientY);if(!S)return;let{name:ie,path:ye,reactComponents:pe}=Xo(S),G=S.getBoundingClientRect(),C=c.clientX/window.innerWidth*100,oe=ei(S),Pn=oe?c.clientY:c.clientY+window.scrollY,mn=window.getSelection(),Ye;mn&&mn.toString().trim().length>0&&(Ye=mn.toString().trim().slice(0,500));let Z=oo(S),Ce=so(S);_({x:C,y:Pn,clientY:c.clientY,element:ie,elementPath:ye,selectedText:Ye,boundingBox:{x:G.left,y:oe?G.top:G.top+window.scrollY,width:G.width,height:G.height},nearbyText:eo(S),cssClasses:no(S),isFixed:oe,fullPath:io(S),accessibility:ro(S),computedStyles:Ce,computedStylesObj:Z,reactComponents:pe??void 0,sourceFile:ni(S),targetElement:S}),x(null);let $n=ti(S).filter(pn=>pn.includes("/chunks/"));$n.length>0&&(async()=>{for(let pn of $n)try{let Hn=await gt(pn);if(Hn){_(st=>st&&{...st,resolvedSource:`${Hn.source}:${Hn.line}`,resolvedName:Hn.name??void 0});break}}catch{}})()};return document.addEventListener("click",d,!0),()=>document.removeEventListener("click",d,!0)},[t,i]);let cn=we(d=>{X(d),ge(()=>X(null),4e3)},[]),ts=we(async d=>{if(!(!i||re)){de(!0);try{let c=po(n),O=await uo(),S=i.resolvedSource||i.sourceFile||"",ie=i.resolvedName||null;if(!i.resolvedSource&&i.sourceFile?.includes("/chunks/"))try{let Z=await gt(i.sourceFile);Z&&(S=`${Z.source}:${Z.line}:${Z.column}`,ie=Z.name)}catch{}let ye=await go(window.location.pathname),pe=S&&!S.includes("/chunks/")?oi(S,ie):null,G=ho(pe?[pe]:void 0,ye?.targets);G.length>0&&(c.debugTargets=G),ye?.context&&(c.routeDebug=ye.context);let C=[];C.push(`## \uD53C\uB4DC\uBC31 ${d}`),G.length>0&&(C.push(""),C.push("---"),C.push(""),C.push("**\uB514\uBC84\uAE45 \uD0C0\uAC9F \uD30C\uC77C**:"),G.forEach(Z=>{let Ce=Z.line?`:${Z.line}${typeof Z.column=="number"?`:${Z.column}`:""}`:"";C.push(`- [${Z.kind}] \`${Z.file}${Ce}\` (${Z.reason})`)}));let oe=[];if(i.element&&oe.push(`**\uC120\uD0DD\uB41C \uC694\uC18C**: ${i.element}`),i.elementPath&&oe.push(`**DOM \uACBD\uB85C**: \`${i.elementPath}\``),i.selectedText&&oe.push(`**\uC120\uD0DD\uB41C \uD14D\uC2A4\uD2B8**: "${i.selectedText}"`),i.reactComponents?.trim()?oe.push(`**React \uCEF4\uD3EC\uB10C\uD2B8**: ${i.reactComponents}`):ie&&oe.push(`**\uCEF4\uD3EC\uB10C\uD2B8/\uD568\uC218**: ${ie}`),S&&!S.includes("/chunks/")&&oe.push(`**\uC18C\uC2A4 \uD30C\uC77C**: \`${S}\``),i.cssClasses&&oe.push(`**CSS \uD074\uB798\uC2A4**: \`${i.cssClasses}\``),i.nearbyText&&oe.push(`**\uC8FC\uBCC0 \uD14D\uC2A4\uD2B8**: ${i.nearbyText}`),i.accessibility&&oe.push(`**\uC811\uADFC\uC131**: ${i.accessibility}`),oe.length>0&&(C.push(""),C.push("---"),C.push(""),oe.forEach(Z=>C.push(Z))),c.consoleErrors?.length&&(C.push(""),C.push("---"),C.push(""),C.push("**\uCD5C\uADFC \uCF58\uC194 \uC5D0\uB7EC**:"),c.consoleErrors.slice(-10).forEach(Z=>C.push(`- \`${Z.slice(0,200)}\``))),c.consoleLogs?.length){let Z=c.consoleLogs.filter(Ce=>Ce.level==="error"||Ce.level==="warn").slice(-10);Z.length>0&&(C.push(""),C.push("**\uCD5C\uADFC \uCF58\uC194 \uB85C\uADF8**:"),Z.forEach(Ce=>C.push(`- [${Ce.level}] \`${Ce.message.slice(0,200)}\``)))}if(C.push(""),C.push("---"),C.push(""),C.push("## \uD658\uACBD \uC815\uBCF4"),C.push(""),C.push(`- **URL**: ${c.url}`),C.push(`- **\uC2DC\uC810**: ${new Date(c.timestamp).toLocaleString("ko-KR")}`),C.push(`- **\uBE0C\uB77C\uC6B0\uC800**: ${c.browser}`),C.push(`- **\uD654\uBA74**: ${c.viewport} (@${c.pixelRatio}x)`),C.push(`- **\uC5B8\uC5B4**: ${c.language}`),c.user?.name&&C.push(`- **\uC0AC\uC6A9\uC790**: ${c.user.name}`),c.performance&&Object.keys(c.performance).length>0){C.push(""),C.push("---"),C.push(""),C.push("## \uC131\uB2A5"),C.push(""),C.push("| \uD56D\uBAA9 | \uAC12 |"),C.push("|------|-----|");let Z={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[Ce,Kt]of Object.entries(c.performance)){let $n=Z[Ce]||Ce,pn=Ce.includes("Heap")?"MB":"ms";C.push(`| ${$n} | ${Kt}${pn} |`)}}let Pn=C.join(`
3156
- `),mn=await bo(e,{title:d.slice(0,100),description:"",priority:"medium",metadata:c,debugInfo:Pn,debug_info:Pn,screenshot:O,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});R(!0),ge(()=>R(!1),3e3);let Ye=mn.taskId||null;Ht.current=Ye,ge(()=>{Ht.current=null},300),ge(()=>{Ye&&j(Z=>new Set(Z).add(Ye))},250),h(!0),ge(()=>{_(null),h(!1),s(!1),document.documentElement.classList.remove("impakers-selecting"),dn.current=!0,setTimeout(()=>{dn.current=!1},300)},150),window.getSelection()?.removeAllRanges()}catch(c){let O=c?.message||"\uD53C\uB4DC\uBC31 \uC804\uC1A1 \uC2E4\uD328";cn(O),console.error("[@impakers/debug] \uD53C\uB4DC\uBC31 \uC804\uC1A1 \uC2E4\uD328:",c)}finally{de(!1)}}},[i,re,e,n,cn]),os=we(()=>{h(!0),ge(()=>{_(null),h(!1),s(!1),document.documentElement.classList.remove("impakers-selecting"),dn.current=!0,setTimeout(()=>{dn.current=!1},300)},150)},[]),Wt=we(d=>{let c=d.id;Q(O=>O===c?null:c)},[]);Ae(()=>{if(!E)return;let d=De(E),c=en(d);c?(ce(S=>({...S,[E]:c})),ee(!1)):ee(!0);let O=Ln(d,S=>{ce(ie=>({...ie,[E]:S})),ee(!1)});return Un(e,E,{staleWhileRevalidate:!0}).then(()=>ee(!1)).catch(()=>ee(!1)),O},[E,e]);let ss=we(async(d,c,O,S)=>{let ie=n?.()?.name?String(n().name):"\uC775\uBA85",ye=n?.()?.id?String(n().id):void 0;try{let pe;if(S)try{pe=await Yn(e,S,"comment",d)}catch(G){let C=G?.message||"\uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328";cn(C),console.error("[@impakers/debug] \uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328:",G)}await Xn(e,d,c,ie,ye,O,pe)}catch(pe){let G=pe?.message||"\uCF54\uBA58\uD2B8 \uC804\uC1A1 \uC2E4\uD328";cn(G),console.error("[@impakers/debug] \uCF54\uBA58\uD2B8 \uC804\uC1A1 \uC2E4\uD328:",pe)}},[n,e,cn]),rs=we(()=>{Q(null)},[]),Fn=we(d=>{if(!d){v(null),W(null);return}if(v(d.id),d.boundingBox){let c=d.boundingBox,O=c.x+c.width/2,S=d.isFixed?c.y+c.height/2:c.y+c.height/2-window.scrollY,ie=Lt(O,S);if(ie){let ye=ie.getBoundingClientRect(),pe=ye.width/c.width,G=ye.height/c.height;if(pe>=.5&&G>=.5){W(ie);return}}}W(null)},[]),is=we(()=>{if(!i)return{left:0,top:0};let d=i.x/100*window.innerWidth,c=i.isFixed?i.y:i.y-window.scrollY,O=Math.max(160,Math.min(window.innerWidth-160,d));return c>window.innerHeight-290?{left:O,bottom:window.innerHeight-c+20}:{left:O,top:c+20}},[i]);if(typeof document>"u")return null;let un=is(),_n=N?.getBoundingClientRect(),as=[{id:"comment",label:"\uD53C\uB4DC\uBC31",active:t,icon:F("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:F("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:Ne("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[F("circle",{cx:"12",cy:"12",r:"10"}),F("polyline",{points:"12 6 12 12 16 14"})]})},{id:"agent",label:"\uC5D0\uC774\uC804\uD2B8",icon:Ne("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[F("path",{d:"M12 2L2 7l10 5 10-5-10-5z"}),F("path",{d:"M2 17l10 5 10-5"}),F("path",{d:"M2 12l10 5 10-5"})]})},{id:"inbox",label:"Inbox",badge:At||void 0,icon:Ne("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[F("polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12"}),F("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:Ne("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[F("circle",{cx:"12",cy:"12",r:"3"}),F("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"})]})}],Ot=q,ot=n?.()?.name?String(n().name):null,Vt=Gr(()=>r.filter(d=>{let c=te.find(O=>O.id===d.id);return!(ue.hideDoneMarkers&&(d.status==="done"||d.status==="resolved")||ue.showOnlyMine&&c?.authorName&&ot&&c.authorName!==ot)}),[r,te,ue.hideDoneMarkers,ue.showOnlyMine,ot]),Zt=(d,c)=>({id:d.id,title:d.title||"\uD53C\uB4DC\uBC31",status:d.status,priority:d.priority,authorName:d.authorName||"\uC775\uBA85",feedbackUrl:d.feedbackUrl||c,createdAt:d.createdAt,startedAt:d.startedAt,completedAt:d.completedAt,commentCount:d.commentCount||0}),ls=te.map(d=>Zt(d,Ot)),ds=p.map(d=>Zt(d,""));return Jr(Ne("div",{"data-impakers-debug":"",children:[F(Po,{items:as,onSelect:Jo,onHide:o,onDoubleTap:zt}),A&&F(Do,{pageItems:ls,allItems:ds,currentPath:Ot,serviceName:Xt()||void 0,endpoint:e,currentUserName:n?.()?.name?String(n().name):"\uC775\uBA85",currentUserId:n?.()?.id?String(n().id):void 0,onClose:()=>ke(!1),onHistoryViewed:ns,newNotiCount:At}),ve&&F(Wo,{endpoint:e,onClose:()=>Te(!1)}),Y&&F(Uo,{settings:ue,onChange:es,onClose:()=>Se(!1)}),t&&Ne(ii,{children:[k?.rect&&!i&&F("div",{className:`${ne.hoverHighlight} ${ne.enter}`,style:{left:k.rect.left,top:k.rect.top,width:k.rect.width,height:k.rect.height}}),k&&!i&&Ne("div",{className:`${ne.hoverTooltip} ${ne.enter}`,style:{left:Math.min(P.x+14,window.innerWidth-200),top:P.y+14},children:[k.reactComponents&&F("div",{className:ne.hoverReactPath,children:k.reactComponents}),F("div",{className:ne.hoverElementName,children:k.elementName})]}),_n&&L&&F("div",{className:`${ne.singleSelectOutline} ${ne.enter}`,style:{left:_n.left,top:_n.top,width:_n.width,height:_n.height}}),i?.targetElement&&(()=>{let d=i.targetElement.getBoundingClientRect();return F("div",{className:`${ne.singleSelectOutline} ${ne.enter}`,style:{left:d.left,top:d.top,width:d.width,height:d.height}})})()]}),F("div",{className:ne.markersLayer,"data-impakers-debug":"",style:{display:ue.markersVisible?void 0:"none"},children:Vt.filter(d=>!d.isFixed).map((d,c)=>F(yt,{annotation:d,layerIndex:c,isAnimated:$.has(d.id),isHovered:L===d.id,isDeleting:!1,markerClickBehavior:"edit",accentColor:ue.markerColor,onHover:()=>Fn(d),onHoverEnd:()=>Fn(null),onClick:()=>Wt(d),onContextMenu:()=>{}},d.id))}),Ne("div",{className:ne.fixedMarkersLayer,"data-impakers-debug":"",style:{display:ue.markersVisible?void 0:"none"},children:[Vt.filter(d=>d.isFixed).map((d,c)=>F(yt,{annotation:d,layerIndex:c,isAnimated:$.has(d.id),isHovered:L===d.id,isDeleting:!1,markerClickBehavior:"edit",accentColor:ue.markerColor,onHover:()=>Fn(d),onHoverEnd:()=>Fn(null),onClick:()=>Wt(d),onContextMenu:()=>{}},d.id)),i&&F(Lo,{x:i.x,y:i.clientY,isMultiSelect:!1,accentColor:ue.markerColor})]}),i&&F(Jt,{ref:$t,element:i.resolvedSource||i.resolvedName||i.element,selectedText:i.selectedText,isExiting:b,style:{position:"fixed",left:un.left,..."top"in un?{top:un.top}:{},..."bottom"in un?{bottom:un.bottom}:{},transform:"translateX(-50%)",zIndex:100001},onSubmit:ts,onCancel:os}),E&&(()=>{let d=r.find(oe=>oe.id===E),c=te.find(oe=>oe.id===E);if(!d)return null;let O=d.x/100*window.innerWidth,S=d.isFixed?d.y:d.y-window.scrollY,ie=Math.max(10,Math.min(O+20,window.innerWidth-360)),ye=window.innerHeight-S,pe=S,G=ye>=300?Math.min(S,window.innerHeight-60):Math.max(10,S-Math.min(480,pe-10)),C={id:d.id,title:c?.title||d.comment||"\uD53C\uB4DC\uBC31",status:c?.status||"todo",authorName:c?.authorName||void 0,createdAt:c?.createdAt||new Date(d.timestamp).toISOString(),comments:J[d.id]||[]};return F(Fo,{task:C,currentUserName:n?.()?.name?String(n().name):"\uC775\uBA85",currentUserId:n?.()?.id?String(n().id):void 0,left:ie,top:G,loading:he,onClose:rs,onReply:ss})})(),Pt!==null&&Ne("div",{className:ne.countdownOverlay,"data-impakers-debug":"",children:[F("div",{className:ne.countdownNumber,children:Pt}),F("div",{className:ne.countdownLabel,children:"\uD53C\uB4DC\uBC31 \uBAA8\uB4DC \uD65C\uC131\uD654\uAE4C\uC9C0..."}),F("button",{className:ne.countdownCancel,onClick:()=>{An.current&&clearTimeout(An.current),Mn(null)},type:"button",children:"\uCDE8\uC18C"})]}),y&&Ne("div",{className:ne.toast,"data-impakers-debug":"",children:[F("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#16a34a",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:F("polyline",{points:"20 6 9 17 4 12"})}),F("span",{children:"\uD0DC\uC2A4\uD06C \uC0DD\uC131\uC774 \uC644\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4"})]}),T&&Ne("div",{className:`${ne.toast} ${ne.toastError}`,"data-impakers-debug":"",children:[Ne("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#ef4444",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[F("circle",{cx:"12",cy:"12",r:"10"}),F("line",{x1:"15",y1:"9",x2:"9",y2:"15"}),F("line",{x1:"9",y1:"9",x2:"15",y2:"15"})]}),F("span",{children:T})]})]}),document.body)}import{useState as It,useCallback as ai}from"react";import{createPortal as li}from"react-dom";import{jsx as He,jsxs as an}from"react/jsx-runtime";function qo({endpoint:e,onSuccess:n,onClose:o}){let[t,s]=It(""),[r,a]=It(!1),[i,_]=It(null),b=ai(async h=>{if(h.preventDefault(),!(!t.trim()||r)){a(!0),_(null);try{let k=await Yt(e,t.trim().toUpperCase());n(k.serviceName)}catch(k){_(k instanceof Error?k.message:"\uC778\uC99D \uC2E4\uD328")}finally{a(!1)}}},[t,e,r,n]);return typeof document>"u"?null:li(an("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:[He("div",{onClick:o,style:{position:"absolute",inset:0,background:"rgba(0, 0, 0, 0.4)"}}),an("div",{style:{position:"relative",width:360,background:"white",borderRadius:12,boxShadow:"0 16px 48px rgba(0,0,0,0.16)",overflow:"hidden"},children:[an("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"16px 20px",borderBottom:"1px solid #e5e5e5"},children:[He("h3",{style:{fontSize:15,fontWeight:600,color:"#18181b",margin:0},children:"\uD53C\uB4DC\uBC31 \uC704\uC82F \uC778\uC99D"}),He("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:He("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:He("path",{d:"M18 6L6 18M6 6l12 12"})})})]}),an("div",{style:{padding:20},children:[an("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.",He("br",{}),"\uCF54\uB4DC\uB294 \uC784\uD328\uCEE4\uC2A4 OS\uC5D0\uC11C \uD655\uC778\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."]}),i&&He("div",{style:{background:"#fef2f2",border:"1px solid #fecaca",color:"#dc2626",padding:"8px 12px",borderRadius:8,fontSize:13,marginBottom:12},children:i}),an("form",{onSubmit:b,children:[He("input",{type:"text",maxLength:6,placeholder:"A3F9K2",value:t,onChange:h=>s(h.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"}}),He("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)}import{Fragment as di,jsx as Go,jsxs as ci}from"react/jsx-runtime";function vl({endpoint:e,getUser:n}){let[o,t]=Rt(!1),[s,r]=Rt(!1),[a,i]=Rt(()=>{try{return localStorage.getItem("impakers-debug-hidden")==="1"}catch{return!1}});Et(()=>{t(Qe())},[]),Et(()=>{let k=[Oe._on("impakers-debug:show-auth",()=>{r(!0),i(!1);try{localStorage.removeItem("impakers-debug-hidden")}catch{}}),Oe._on("impakers-debug:open",()=>{i(!1);try{localStorage.removeItem("impakers-debug-hidden")}catch{}}),Oe._on("impakers-debug:deactivate",()=>{t(!1),r(!1)})];return()=>k.forEach(x=>x())},[]),Et(()=>{function k(x){if((x.ctrlKey||x.metaKey)&&x.shiftKey&&(x.key==="."||x.key===">"||x.code==="Period")){if(x.preventDefault(),a){i(!1);try{localStorage.removeItem("impakers-debug-hidden")}catch{}return}Qe()?t(!0):r(P=>!P)}}return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[a]);let _=Mt(k=>{t(!0),r(!1)},[]),b=Mt(()=>{r(!1)},[]),h=Mt(()=>{i(!0);try{localStorage.setItem("impakers-debug-hidden","1")}catch{}},[]);return ci(di,{children:[o&&!a&&Go(Qo,{endpoint:e,getUser:n,onHide:h}),s&&!o&&Go(qo,{endpoint:e,onSuccess:_,onClose:b})]})}export{Oe as ImpakersDebug,vl as ImpakersDebugProvider};
3565
+ }`,oi={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=ti}var ae=oi;import{Fragment as _i,jsx as $,jsxs as $e}from"react/jsx-runtime";function Bt(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 ii(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 Go(e){let{name:n,path:o}=bt(e),t=mo(e,{mode:"filtered"});return{name:t.path?`${t.path} ${n}`:n,elementName:n,path:o,reactComponents:t.path}}function ai(e){let n=Pn(e),o=n.found?n:kt(e);if(o.found&&o.source)return et(o.source,"path")}function li(e){let n=Pn(e),o=n.found?n:kt(e);return o.found&&o.sourceCandidates&&o.sourceCandidates.length>0?o.sourceCandidates.map(t=>et(t,"path")):o.found&&o.source?[et(o.source,"path")]:[]}function di(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 ci="impakers-debug-markers-";function zt(){return ci+window.location.pathname}function Ht(){try{let e=localStorage.getItem(zt());return e?JSON.parse(e):[]}catch{return[]}}function Jo(e){try{e.length===0?localStorage.removeItem(zt()):localStorage.setItem(zt(),JSON.stringify(e))}catch{}}function ui(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 es({endpoint:e,getUser:n,onHide:o}){let[t,s]=ne(!1),[r,i]=ne(()=>Ht()),[a,_]=ne(null),[k,v]=ne(!1),[C,w]=ne(null),[B,R]=ne({x:0,y:0}),[D,K]=ne(new Set),[ce,ue]=ne(!1),[re,A]=ne(null),[M,Y]=ne(null),[h,z]=ne(!1),[T,_e]=ne(null),[I,J]=ne(null),[oe,me]=ne({}),[Me,we]=ne(!1),[pe,b]=ne([]),[x,ee]=ne([]),[p,P]=ne(!1),[H,ie]=ne(!1),[F,Z]=ne(!1),[te,u]=ne(()=>Xo()),[j,Ae]=ne(()=>window.location.pathname),[ye,Pe]=ne(!1),[Un,an]=ne(0),[Ze,Xe]=ne(null),Be=Vn(null),kn=Vn(null),vn=Vn(null),q=Vn(!1),Se=Re(()=>{Xe(3);let d=3,c=()=>{d-=1,d<=0?(Xe(null),s(!0),document.documentElement.classList.add("impakers-selecting")):(Xe(d),Be.current=setTimeout(c,1e3))};Be.current=setTimeout(c,1e3)},[]),V=Re(d=>{d==="comment"?ln():d==="delay-capture"?Se():d==="agent"?ie(!0):d==="inbox"?(P(!0),wo(e,{staleWhileRevalidate:!0}).then(ee).catch(()=>{}),t&&(s(!1),document.documentElement.classList.remove("impakers-selecting"),w(null),_(null))):d==="settings"&&Z(!0)},[t,Se]),ke=Re(d=>{u(d),Yo(d)},[]),ln=Re(()=>{s(d=>{let c=!d;return c?document.documentElement.classList.add("impakers-selecting"):(document.documentElement.classList.remove("impakers-selecting"),w(null),_(null)),c})},[]);je(()=>()=>{document.documentElement.classList.remove("impakers-selecting")},[]),je(()=>{i(Ht());let d=()=>{Ae(window.location.pathname),i(Ht()),_(null),w(null)};window.addEventListener("popstate",d);let c=history.pushState.bind(history);return history.pushState=(...X)=>{c(...X),setTimeout(d,50)},()=>{window.removeEventListener("popstate",d),history.pushState=c}},[]),je(()=>{let d=Ye(j),c=pn(d);c&&(b(c),Pe(!0));let X=zn(d,L=>{b(L),Pe(!0)});return Co(e,j,{staleWhileRevalidate:!0}).then(L=>{b(L),Pe(!0)}).catch(()=>{}),X},[e,j]);let Cn="impakers-debug-history-last-seen";je(()=>{let d=localStorage.getItem(Cn)||new Date(0).toISOString();lt(e,{since:d,limit:100}).then(c=>an(c.length)).catch(()=>{})},[e]);let os=Re(()=>{localStorage.setItem(Cn,new Date().toISOString()),an(0)},[]);je(()=>{if(!ye)return;let d=pe.map(ui).filter(c=>c!==null);i(d),Jo(d)},[pe,ye]);let Vt=Vn(!0);je(()=>{if(Vt.current){Vt.current=!1;return}Jo(r)},[r]),je(()=>{let d=c=>{if(c.key==="Escape"){if(p){P(!1);return}if(a){c.preventDefault(),v(!0),Ne(()=>{_(null),v(!1)},150);return}t&&(c.preventDefault(),s(!1),document.documentElement.classList.remove("impakers-selecting"),w(null))}};return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[p,a,t]),je(()=>{if(!t||a)return;let d=c=>{let X=c.composedPath()[0]||c.target;if(on(X,"[data-impakers-debug]")){w(null);return}let L=Bt(c.clientX,c.clientY);if(!L||on(L,"[data-impakers-debug]")){w(null);return}let{name:fe,elementName:Le,path:ve,reactComponents:se}=Go(L),S=L.getBoundingClientRect();w({element:fe,elementName:Le,elementPath:ve,rect:S,reactComponents:se}),R({x:c.clientX,y:c.clientY})};return document.addEventListener("mousemove",d),()=>document.removeEventListener("mousemove",d)},[t,a]),je(()=>{if(!t)return;let d=c=>{if(q.current)return;let X=c.composedPath()[0]||c.target;if(on(X,"[data-impakers-debug]")||on(X,"[data-annotation-popup]")||on(X,"[data-annotation-marker]"))return;if(a){c.preventDefault(),c.stopPropagation(),kn.current?.shake();return}c.preventDefault(),c.stopPropagation();let L=Bt(c.clientX,c.clientY);if(!L)return;let{name:fe,path:Le,reactComponents:ve}=Go(L),se=L.getBoundingClientRect(),S=c.clientX/window.innerWidth*100,le=ii(L),Zn=le?c.clientY:c.clientY+window.scrollY,Ln=window.getSelection(),dn;Ln&&Ln.toString().trim().length>0&&(dn=Ln.toString().trim().slice(0,500));let G=io(L),Ee=ao(L);_({x:S,y:Zn,clientY:c.clientY,element:fe,elementPath:Le,selectedText:dn,boundingBox:{x:se.left,y:le?se.top:se.top+window.scrollY,width:se.width,height:se.height},nearbyText:oo(L),cssClasses:so(L),isFixed:le,fullPath:co(L),accessibility:lo(L),computedStyles:Ee,computedStylesObj:G,reactComponents:ve??void 0,sourceFile:ai(L),targetElement:L}),w(null);let Xn=li(L).filter(Tn=>Tn.includes("/chunks/"));Xn.length>0&&(async()=>{for(let Tn of Xn)try{let Yn=await Lt(Tn);if(Yn){_(ft=>ft&&{...ft,resolvedSource:`${Yn.source}:${Yn.line}`,resolvedName:Yn.name??void 0});break}}catch{}})()};return document.addEventListener("click",d,!0),()=>document.removeEventListener("click",d,!0)},[t,a]);let wn=Re(d=>{_e(d),Ne(()=>_e(null),4e3)},[]),ss=Re(async d=>{if(!(!a||ce)){ue(!0);try{let c=ho(n),X=await po(),L=a.resolvedSource||a.sourceFile||"",fe=a.resolvedName||null;if(!a.resolvedSource&&a.sourceFile?.includes("/chunks/"))try{let G=await Lt(a.sourceFile);G&&(L=`${G.source}:${G.line}:${G.column}`,fe=G.name)}catch{}let Le=await bo(window.location.pathname),ve=L&&!L.includes("/chunks/")?di(L,fe):null,se=xo(ve?[ve]:void 0,Le?.targets);se.length>0&&(c.debugTargets=se),Le?.context&&(c.routeDebug=Le.context);let S=[];S.push(`## \uD53C\uB4DC\uBC31 ${d}`),se.length>0&&(S.push(""),S.push("---"),S.push(""),S.push("**\uB514\uBC84\uAE45 \uD0C0\uAC9F \uD30C\uC77C**:"),se.forEach(G=>{let Ee=G.line?`:${G.line}${typeof G.column=="number"?`:${G.column}`:""}`:"";S.push(`- [${G.kind}] \`${G.file}${Ee}\` (${G.reason})`)}));let le=[];if(a.element&&le.push(`**\uC120\uD0DD\uB41C \uC694\uC18C**: ${a.element}`),a.elementPath&&le.push(`**DOM \uACBD\uB85C**: \`${a.elementPath}\``),a.selectedText&&le.push(`**\uC120\uD0DD\uB41C \uD14D\uC2A4\uD2B8**: "${a.selectedText}"`),a.reactComponents?.trim()?le.push(`**React \uCEF4\uD3EC\uB10C\uD2B8**: ${a.reactComponents}`):fe&&le.push(`**\uCEF4\uD3EC\uB10C\uD2B8/\uD568\uC218**: ${fe}`),L&&!L.includes("/chunks/")&&le.push(`**\uC18C\uC2A4 \uD30C\uC77C**: \`${L}\``),a.cssClasses&&le.push(`**CSS \uD074\uB798\uC2A4**: \`${a.cssClasses}\``),a.nearbyText&&le.push(`**\uC8FC\uBCC0 \uD14D\uC2A4\uD2B8**: ${a.nearbyText}`),a.accessibility&&le.push(`**\uC811\uADFC\uC131**: ${a.accessibility}`),le.length>0&&(S.push(""),S.push("---"),S.push(""),le.forEach(G=>S.push(G))),c.consoleErrors?.length&&(S.push(""),S.push("---"),S.push(""),S.push("**\uCD5C\uADFC \uCF58\uC194 \uC5D0\uB7EC**:"),c.consoleErrors.slice(-10).forEach(G=>S.push(`- \`${G.slice(0,200)}\``))),c.consoleLogs?.length){let G=c.consoleLogs.filter(Ee=>Ee.level==="error"||Ee.level==="warn").slice(-10);G.length>0&&(S.push(""),S.push("**\uCD5C\uADFC \uCF58\uC194 \uB85C\uADF8**:"),G.forEach(Ee=>S.push(`- [${Ee.level}] \`${Ee.message.slice(0,200)}\``)))}if(S.push(""),S.push("---"),S.push(""),S.push("## \uD658\uACBD \uC815\uBCF4"),S.push(""),S.push(`- **URL**: ${c.url}`),S.push(`- **\uC2DC\uC810**: ${new Date(c.timestamp).toLocaleString("ko-KR")}`),S.push(`- **\uBE0C\uB77C\uC6B0\uC800**: ${c.browser}`),S.push(`- **\uD654\uBA74**: ${c.viewport} (@${c.pixelRatio}x)`),S.push(`- **\uC5B8\uC5B4**: ${c.language}`),c.user?.name&&S.push(`- **\uC0AC\uC6A9\uC790**: ${c.user.name}`),c.performance&&Object.keys(c.performance).length>0){S.push(""),S.push("---"),S.push(""),S.push("## \uC131\uB2A5"),S.push(""),S.push("| \uD56D\uBAA9 | \uAC12 |"),S.push("|------|-----|");let G={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[Ee,Yt]of Object.entries(c.performance)){let Xn=G[Ee]||Ee,Tn=Ee.includes("Heap")?"MB":"ms";S.push(`| ${Xn} | ${Yt}${Tn} |`)}}let Zn=S.join(`
3566
+ `),Ln=await vo(e,{title:d.slice(0,100),description:"",priority:"medium",metadata:c,debugInfo:Zn,debug_info:Zn,screenshot:X,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),Ne(()=>z(!1),3e3);let dn=Ln.taskId||null;vn.current=dn,Ne(()=>{vn.current=null},300),Ne(()=>{dn&&K(G=>new Set(G).add(dn))},250),v(!0),Ne(()=>{_(null),v(!1),s(!1),document.documentElement.classList.remove("impakers-selecting"),q.current=!0,setTimeout(()=>{q.current=!1},300)},150),window.getSelection()?.removeAllRanges()}catch(c){let X=c?.message||"\uD53C\uB4DC\uBC31 \uC804\uC1A1 \uC2E4\uD328";wn(X),console.error("[@impakers/debug] \uD53C\uB4DC\uBC31 \uC804\uC1A1 \uC2E4\uD328:",c)}finally{ue(!1)}}},[a,ce,e,n,wn]),rs=Re(()=>{v(!0),Ne(()=>{_(null),v(!1),s(!1),document.documentElement.classList.remove("impakers-selecting"),q.current=!0,setTimeout(()=>{q.current=!1},300)},150)},[]),Ut=Re(d=>{let c=d.id;J(X=>X===c?null:c)},[]);je(()=>{if(!I)return;let d=qe(I),c=pn(d);c?(me(L=>({...L,[I]:c})),we(!1)):we(!0);let X=zn(d,L=>{me(fe=>({...fe,[I]:L})),we(!1)});return rt(e,I,{staleWhileRevalidate:!0}).then(()=>we(!1)).catch(()=>we(!1)),X},[I,e]);let is=Re(async(d,c,X,L)=>{let fe=n?.()?.name?String(n().name):"\uC775\uBA85",Le=n?.()?.id?String(n().id):void 0;try{let ve;if(L)try{ve=await at(e,L,"comment",d)}catch(se){let S=se?.message||"\uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328";wn(S),console.error("[@impakers/debug] \uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328:",se)}await it(e,d,c,fe,Le,X,ve)}catch(ve){let se=ve?.message||"\uCF54\uBA58\uD2B8 \uC804\uC1A1 \uC2E4\uD328";wn(se),console.error("[@impakers/debug] \uCF54\uBA58\uD2B8 \uC804\uC1A1 \uC2E4\uD328:",ve)}},[n,e,wn]),as=Re(()=>{J(null)},[]),Kn=Re(d=>{if(!d){A(null),Y(null);return}if(A(d.id),d.boundingBox){let c=d.boundingBox,X=c.x+c.width/2,L=d.isFixed?c.y+c.height/2:c.y+c.height/2-window.scrollY,fe=Bt(X,L);if(fe){let Le=fe.getBoundingClientRect(),ve=Le.width/c.width,se=Le.height/c.height;if(ve>=.5&&se>=.5){Y(fe);return}}}Y(null)},[]),ls=Re(()=>{if(!a)return{left:0,top:0};let d=a.x/100*window.innerWidth,c=a.isFixed?a.y:a.y-window.scrollY,X=Math.max(160,Math.min(window.innerWidth-160,d));return c>window.innerHeight-290?{left:X,bottom:window.innerHeight-c+20}:{left:X,top:c+20}},[a]);if(typeof document>"u")return null;let Sn=ls(),Nn=M?.getBoundingClientRect(),ds=[{id:"comment",label:"\uD53C\uB4DC\uBC31",active:t,icon:$("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:$("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:$e("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[$("circle",{cx:"12",cy:"12",r:"10"}),$("polyline",{points:"12 6 12 12 16 14"})]})},{id:"agent",label:"\uC5D0\uC774\uC804\uD2B8",icon:$e("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[$("path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z"}),$("path",{d:"M20 3v4"}),$("path",{d:"M22 5h-4"})]})},{id:"inbox",label:"Inbox",badge:Un||void 0,icon:$e("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[$("polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12"}),$("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:$e("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[$("circle",{cx:"12",cy:"12",r:"3"}),$("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"})]})}],Kt=j,pt=n?.()?.name?String(n().name):null,Zt=si(()=>r.filter(d=>{let c=pe.find(X=>X.id===d.id);return!(te.hideDoneMarkers&&(d.status==="done"||d.status==="resolved")||te.showOnlyMine&&c?.authorName&&pt&&c.authorName!==pt)}),[r,pe,te.hideDoneMarkers,te.showOnlyMine,pt]),Xt=(d,c)=>({id:d.id,title:d.title||"\uD53C\uB4DC\uBC31",status:d.status,priority:d.priority,authorName:d.authorName||"\uC775\uBA85",feedbackUrl:d.feedbackUrl||c,createdAt:d.createdAt,startedAt:d.startedAt,completedAt:d.completedAt,commentCount:d.commentCount||0}),cs=pe.map(d=>Xt(d,Kt)),us=x.map(d=>Xt(d,""));return ri($e("div",{"data-impakers-debug":"",children:[$(Ho,{items:ds,onSelect:V,onHide:o,onDoubleTap:ln}),p&&$(Oo,{pageItems:cs,allItems:us,currentPath:Kt,serviceName:qt()||void 0,endpoint:e,currentUserName:n?.()?.name?String(n().name):"\uC775\uBA85",currentUserId:n?.()?.id?String(n().id):void 0,onClose:()=>P(!1),onHistoryViewed:os,newNotiCount:Un}),H&&$(Ko,{endpoint:e,onClose:()=>ie(!1)}),F&&$(qo,{settings:te,onChange:ke,onClose:()=>Z(!1)}),t&&$e(_i,{children:[C?.rect&&!a&&$("div",{className:`${ae.hoverHighlight} ${ae.enter}`,style:{left:C.rect.left,top:C.rect.top,width:C.rect.width,height:C.rect.height}}),C&&!a&&$e("div",{className:`${ae.hoverTooltip} ${ae.enter}`,style:{left:Math.min(B.x+14,window.innerWidth-200),top:B.y+14},children:[C.reactComponents&&$("div",{className:ae.hoverReactPath,children:C.reactComponents}),$("div",{className:ae.hoverElementName,children:C.elementName})]}),Nn&&re&&$("div",{className:`${ae.singleSelectOutline} ${ae.enter}`,style:{left:Nn.left,top:Nn.top,width:Nn.width,height:Nn.height}}),a?.targetElement&&(()=>{let d=a.targetElement.getBoundingClientRect();return $("div",{className:`${ae.singleSelectOutline} ${ae.enter}`,style:{left:d.left,top:d.top,width:d.width,height:d.height}})})()]}),$("div",{className:ae.markersLayer,"data-impakers-debug":"",style:{display:te.markersVisible?void 0:"none"},children:Zt.filter(d=>!d.isFixed).map((d,c)=>$(It,{annotation:d,layerIndex:c,isAnimated:D.has(d.id),isHovered:re===d.id,isDeleting:!1,markerClickBehavior:"edit",accentColor:te.markerColor,onHover:()=>Kn(d),onHoverEnd:()=>Kn(null),onClick:()=>Ut(d),onContextMenu:()=>{}},d.id))}),$e("div",{className:ae.fixedMarkersLayer,"data-impakers-debug":"",style:{display:te.markersVisible?void 0:"none"},children:[Zt.filter(d=>d.isFixed).map((d,c)=>$(It,{annotation:d,layerIndex:c,isAnimated:D.has(d.id),isHovered:re===d.id,isDeleting:!1,markerClickBehavior:"edit",accentColor:te.markerColor,onHover:()=>Kn(d),onHoverEnd:()=>Kn(null),onClick:()=>Ut(d),onContextMenu:()=>{}},d.id)),a&&$(Io,{x:a.x,y:a.clientY,isMultiSelect:!1,accentColor:te.markerColor})]}),a&&$(to,{ref:kn,element:a.resolvedSource||a.resolvedName||a.element,selectedText:a.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:ss,onCancel:rs}),I&&(()=>{let d=r.find(le=>le.id===I),c=pe.find(le=>le.id===I);if(!d)return null;let X=d.x/100*window.innerWidth,L=d.isFixed?d.y:d.y-window.scrollY,fe=Math.max(10,Math.min(X+20,window.innerWidth-360)),Le=window.innerHeight-L,ve=L,se=Le>=300?Math.min(L,window.innerHeight-60):Math.max(10,L-Math.min(480,ve-10)),S={id:d.id,title:c?.title||d.comment||"\uD53C\uB4DC\uBC31",status:c?.status||"todo",authorName:c?.authorName||void 0,createdAt:c?.createdAt||new Date(d.timestamp).toISOString(),comments:oe[d.id]||[]};return $(Bo,{task:S,currentUserName:n?.()?.name?String(n().name):"\uC775\uBA85",currentUserId:n?.()?.id?String(n().id):void 0,left:fe,top:se,loading:Me,onClose:as,onReply:is})})(),Ze!==null&&$e("div",{className:ae.countdownOverlay,"data-impakers-debug":"",children:[$("div",{className:ae.countdownNumber,children:Ze}),$("div",{className:ae.countdownLabel,children:"\uD53C\uB4DC\uBC31 \uBAA8\uB4DC \uD65C\uC131\uD654\uAE4C\uC9C0..."}),$("button",{className:ae.countdownCancel,onClick:()=>{Be.current&&clearTimeout(Be.current),Xe(null)},type:"button",children:"\uCDE8\uC18C"})]}),h&&$e("div",{className:ae.toast,"data-impakers-debug":"",children:[$("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#16a34a",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:$("polyline",{points:"20 6 9 17 4 12"})}),$("span",{children:"\uD0DC\uC2A4\uD06C \uC0DD\uC131\uC774 \uC644\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4"})]}),T&&$e("div",{className:`${ae.toast} ${ae.toastError}`,"data-impakers-debug":"",children:[$e("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#ef4444",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[$("circle",{cx:"12",cy:"12",r:"10"}),$("line",{x1:"15",y1:"9",x2:"9",y2:"15"}),$("line",{x1:"9",y1:"9",x2:"15",y2:"15"})]}),$("span",{children:T})]})]}),document.body)}import{useState as Dt,useCallback as mi}from"react";import{createPortal as pi}from"react-dom";import{jsx as Ke,jsxs as xn}from"react/jsx-runtime";function ns({endpoint:e,onSuccess:n,onClose:o}){let[t,s]=Dt(""),[r,i]=Dt(!1),[a,_]=Dt(null),k=mi(async v=>{if(v.preventDefault(),!(!t.trim()||r)){i(!0),_(null);try{let C=await Gt(e,t.trim().toUpperCase());n(C.serviceName)}catch(C){_(C instanceof Error?C.message:"\uC778\uC99D \uC2E4\uD328")}finally{i(!1)}}},[t,e,r,n]);return typeof document>"u"?null:pi(xn("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:[Ke("div",{onClick:o,style:{position:"absolute",inset:0,background:"rgba(0, 0, 0, 0.4)"}}),xn("div",{style:{position:"relative",width:360,background:"white",borderRadius:12,boxShadow:"0 16px 48px rgba(0,0,0,0.16)",overflow:"hidden"},children:[xn("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"16px 20px",borderBottom:"1px solid #e5e5e5"},children:[Ke("h3",{style:{fontSize:15,fontWeight:600,color:"#18181b",margin:0},children:"\uD53C\uB4DC\uBC31 \uC704\uC82F \uC778\uC99D"}),Ke("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:Ke("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:Ke("path",{d:"M18 6L6 18M6 6l12 12"})})})]}),xn("div",{style:{padding:20},children:[xn("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.",Ke("br",{}),"\uCF54\uB4DC\uB294 \uC784\uD328\uCEE4\uC2A4 OS\uC5D0\uC11C \uD655\uC778\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."]}),a&&Ke("div",{style:{background:"#fef2f2",border:"1px solid #fecaca",color:"#dc2626",padding:"8px 12px",borderRadius:8,fontSize:13,marginBottom:12},children:a}),xn("form",{onSubmit:k,children:[Ke("input",{type:"text",maxLength:6,placeholder:"A3F9K2",value:t,onChange:v=>s(v.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"}}),Ke("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)}import{Fragment as fi,jsx as ts,jsxs as gi}from"react/jsx-runtime";function Il({endpoint:e,getUser:n}){let[o,t]=Wt(!1),[s,r]=Wt(!1),[i,a]=Wt(()=>{try{return localStorage.getItem("impakers-debug-hidden")==="1"}catch{return!1}});jt(()=>{t(cn())},[]),jt(()=>{let C=[nn._on("impakers-debug:show-auth",()=>{r(!0),a(!1);try{localStorage.removeItem("impakers-debug-hidden")}catch{}}),nn._on("impakers-debug:open",()=>{a(!1);try{localStorage.removeItem("impakers-debug-hidden")}catch{}}),nn._on("impakers-debug:deactivate",()=>{t(!1),r(!1)})];return()=>C.forEach(w=>w())},[]),jt(()=>{function C(w){if((w.ctrlKey||w.metaKey)&&w.shiftKey&&(w.key==="."||w.key===">"||w.code==="Period")){if(w.preventDefault(),i){a(!1);try{localStorage.removeItem("impakers-debug-hidden")}catch{}return}cn()?t(!0):r(B=>!B)}}return document.addEventListener("keydown",C),()=>document.removeEventListener("keydown",C)},[i]);let _=Ot(C=>{t(!0),r(!1)},[]),k=Ot(()=>{r(!1)},[]),v=Ot(()=>{a(!0);try{localStorage.setItem("impakers-debug-hidden","1")}catch{}},[]);return gi(fi,{children:[o&&!i&&ts(es,{endpoint:e,getUser:n,onHide:v}),s&&!o&&ts(ns,{endpoint:e,onSuccess:_,onClose:k})]})}export{nn as ImpakersDebug,Il as ImpakersDebugProvider};