@impakers/debug 1.4.22 → 1.5.0

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 +331 -13
  2. package/dist/react.mjs +331 -13
  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 wt,useState as St,useCallback as Lt}from"react";var zt="impakers-debug-token",Fn="impakers-debug-token-data";function Gn(){if(typeof window>"u")return null;try{let e=localStorage.getItem(Fn);if(!e)return null;let n=JSON.parse(e);return new Date(n.expiresAt)<new Date?(et(),null):n.token}catch{return null}}function Ue(){return Gn()!==null}function Dt(){if(typeof window>"u")return null;try{let e=localStorage.getItem(Fn);return e?JSON.parse(e).serviceName:null}catch{return null}}function er(e){if(!(typeof window>"u"))try{let n={token:e.token,serviceName:e.serviceName,expiresAt:e.expiresAt};localStorage.setItem(Fn,JSON.stringify(n)),localStorage.setItem(zt,e.token)}catch{}}function et(){if(!(typeof window>"u"))try{localStorage.removeItem(Fn),localStorage.removeItem(zt)}catch{}}async function jt(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 s=await t.json().catch(()=>({message:"\uC778\uC99D \uC2E4\uD328"}));throw new Error(s.message||"\uC778\uC99D \uC2E4\uD328")}let r=await t.json();return er(r),r}var Te=class Te{static showAuth(){Te._eventTarget?.dispatchEvent(new CustomEvent("impakers-debug:show-auth"))}static isActive(){return Ue()}static deactivate(){et(),Te._eventTarget?.dispatchEvent(new CustomEvent("impakers-debug:deactivate"))}static open(){if(!Ue()){Te.showAuth();return}Te._eventTarget?.dispatchEvent(new CustomEvent("impakers-debug:open"))}static _on(n,o){return Te._eventTarget?.addEventListener(n,o),()=>Te._eventTarget?.removeEventListener(n,o)}};Te._eventTarget=typeof EventTarget<"u"?new EventTarget:null;var je=Te;import{useState as W,useCallback as he,useEffect as Ne,useRef as Sn,useMemo as Bs}from"react";import{createPortal as zs}from"react-dom";import{useState as un,useRef as Pn,useEffect as Vt,useCallback as An,forwardRef as sr,useImperativeHandle as ir}from"react";var nr=`.styles-module__popup___IhzrD svg[fill=none] {
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] {
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
- }`,tr={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=nr}var $=tr;import{jsx as Wt,jsxs as oi}from"react/jsx-runtime";var Ot=({size:e=24})=>Wt("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Wt("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 or=["data-feedback-toolbar","data-annotation-popup","data-annotation-marker"],si=or.flatMap(e=>[`:not([${e}])`,`:not([${e}] *)`]).join("");var nt="__agentation_freeze";function rr(){if(typeof window>"u")return{frozen:!1,installed:!0,origSetTimeout:setTimeout,origSetInterval:setInterval,origRAF:n=>0,pausedAnimations:[],frozenTimeoutQueue:[],frozenRAFQueue:[]};let e=window;return e[nt]||(e[nt]={frozen:!1,installed:!1,origSetTimeout:null,origSetInterval:null,origRAF:null,pausedAnimations:[],frozenTimeoutQueue:[],frozenRAFQueue:[]}),e[nt]}var J=rr();typeof window<"u"&&!J.installed&&(J.origSetTimeout=window.setTimeout.bind(window),J.origSetInterval=window.setInterval.bind(window),J.origRAF=window.requestAnimationFrame.bind(window),window.setTimeout=(e,n,...o)=>typeof e=="string"?J.origSetTimeout(e,n):J.origSetTimeout((...t)=>{J.frozen?J.frozenTimeoutQueue.push(()=>e(...t)):e(...t)},n,...o),window.setInterval=(e,n,...o)=>typeof e=="string"?J.origSetInterval(e,n):J.origSetInterval((...t)=>{J.frozen||e(...t)},n,...o),window.requestAnimationFrame=e=>J.origRAF(n=>{J.frozen?J.frozenRAFQueue.push(e):e(n)}),J.installed=!0);var ue=J.origSetTimeout,ii=J.origSetInterval,ai=J.origRAF;import{jsx as le,jsxs as We}from"react/jsx-runtime";function tt(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 Kt=sr(function({element:n,timestamp:o,selectedText:t,placeholder:r="What should change?",initialValue:s="",submitLabel:a="Add",onSubmit:i,onCancel:_,onDelete:b,style:h,accentColor:x="#3c82f7",isExiting:k=!1,lightMode:A=!1,computedStyles:R},H){let[j,oe]=un(s),[de,ee]=un(!1),[T,L]=un("initial"),[Z,y]=un(!1),[P,N]=un(!1),ce=Pn(null),E=Pn(null),V=Pn(null),re=Pn(null);Vt(()=>{k&&T!=="exit"&&L("exit")},[k,T]),Vt(()=>{ue(()=>{L("enter")},0);let g=ue(()=>{L("entered")},200),O=ue(()=>{let ie=ce.current;ie&&(tt(ie),ie.selectionStart=ie.selectionEnd=ie.value.length,ie.scrollTop=ie.scrollHeight)},50);return()=>{clearTimeout(g),clearTimeout(O),V.current&&clearTimeout(V.current),re.current&&clearTimeout(re.current)}},[]);let pe=An(()=>{re.current&&clearTimeout(re.current),ee(!0),re.current=ue(()=>{ee(!1),tt(ce.current)},250)},[]);ir(H,()=>({shake:pe}),[pe]);let Se=An(()=>{L("exit"),V.current=ue(()=>{_()},150)},[_]),fe=An(()=>{j.trim()&&i(j.trim())},[j,i]),se=An(g=>{g.stopPropagation(),!g.nativeEvent.isComposing&&(g.key==="Enter"&&(g.metaKey||g.ctrlKey)&&(g.preventDefault(),fe()),g.key==="Escape"&&Se())},[fe,Se]),f=[$.popup,A?$.light:"",T==="enter"?$.enter:"",T==="entered"?$.entered:"",T==="exit"?$.exit:"",de?$.shake:""].filter(Boolean).join(" ");return We("div",{ref:E,className:f,"data-annotation-popup":!0,style:h,onClick:g=>g.stopPropagation(),children:[We("div",{className:$.header,children:[R&&Object.keys(R).length>0?We("button",{className:$.headerToggle,onClick:()=>{let g=P;N(!P),g&&ue(()=>tt(ce.current),0)},type:"button",children:[le("svg",{className:`${$.chevron} ${P?$.expanded:""}`,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:le("path",{d:"M5.5 10.25L9 7.25L5.75 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),le("span",{className:$.element,children:n})]}):le("span",{className:$.element,children:n}),o&&le("span",{className:$.timestamp,children:o})]}),R&&Object.keys(R).length>0&&le("div",{className:`${$.stylesWrapper} ${P?$.expanded:""}`,children:le("div",{className:$.stylesInner,children:le("div",{className:$.stylesBlock,children:Object.entries(R).map(([g,O])=>We("div",{className:$.styleLine,children:[le("span",{className:$.styleProperty,children:g.replace(/([A-Z])/g,"-$1").toLowerCase()}),": ",le("span",{className:$.styleValue,children:O}),";"]},g))})})}),t&&We("div",{className:$.quote,children:["\u201C",t.slice(0,80),t.length>80?"...":"","\u201D"]}),le("textarea",{ref:ce,className:$.textarea,style:{borderColor:Z?x:void 0},placeholder:r,value:j,onChange:g=>{oe(g.target.value);let O=g.target;O.style.height="auto",O.style.height=`${Math.min(O.scrollHeight,200)}px`},onFocus:()=>y(!0),onBlur:()=>y(!1),rows:4,onKeyDown:se}),We("div",{className:$.actions,children:[b&&le("div",{className:$.deleteWrapper,children:le("button",{className:$.deleteButton,onClick:b,type:"button",children:le(Ot,{size:22})})}),le("button",{className:$.cancel,onClick:Se,children:"Cancel"}),le("button",{className:$.submit,style:{backgroundColor:x,opacity:j.trim()?1:.4},onClick:fe,disabled:!j.trim(),children:a})]}),We("div",{className:$.shortcutHint,children:[navigator?.platform?.includes("Mac")?"\u2318":"Ctrl","+Enter to submit"]})]})});function mn(e){if(e.parentElement)return e.parentElement;let n=e.getRootNode();return n instanceof ShadowRoot?n.host:null}function Oe(e,n){let o=e;for(;o;){if(o.matches(n))return o;o=mn(o)}return null}function ar(e,n=4){let o=[],t=e,r=0;for(;t&&r<n;){let s=t.tagName.toLowerCase();if(s==="html"||s==="body")break;let a=s;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=mn(t);!t.parentElement&&i&&(a=`\u27E8shadow\u27E9 ${a}`),o.unshift(a),t=i,r++}return o.join(" > ")}function ot(e){let n=ar(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=Oe(e,"svg");if(t){let r=mn(t);if(r instanceof HTMLElement)return{name:`graphic in ${ot(r).name}`,path:n}}return{name:"graphic element",path:n}}if(o==="svg"){let t=mn(e);if(t?.tagName.toLowerCase()==="button"){let r=t.textContent?.trim();return{name:r?`icon in "${r}" button`:"button icon",path:n}}return{name:"icon",path:n}}if(o==="button"){let t=e.textContent?.trim(),r=e.getAttribute("aria-label");return r?{name:`button [${r}]`,path:n}:{name:t?`button "${t.slice(0,25)}"`:"button",path:n}}if(o==="a"){let t=e.textContent?.trim(),r=e.getAttribute("href");return t?{name:`link "${t.slice(0,25)}"`,path:n}:r?{name:`link to ${r.slice(0,30)}`,path:n}:{name:"link",path:n}}if(o==="input"){let t=e.getAttribute("type")||"text",r=e.getAttribute("placeholder"),s=e.getAttribute("name");return r?{name:`input "${r}"`,path:n}:s?{name:`input [${s}]`,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,r=e.getAttribute("role"),s=e.getAttribute("aria-label");if(s)return{name:`${o} [${s}]`,path:n};if(r)return{name:`${r}`,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 Zt(e){let n=[],o=e.textContent?.trim();o&&o.length<100&&n.push(o);let t=e.previousElementSibling;if(t){let s=t.textContent?.trim();s&&s.length<50&&n.unshift(`[before: "${s.slice(0,40)}"]`)}let r=e.nextElementSibling;if(r){let s=r.textContent?.trim();s&&s.length<50&&n.push(`[after: "${s.slice(0,40)}"]`)}return n.join(" ")}function Ut(e){let n=e.className;return typeof n!="string"||!n?"":n.split(/\s+/).filter(t=>t.length>0).map(t=>{let r=t.match(/^([a-zA-Z][a-zA-Z0-9_-]*?)(?:_[a-zA-Z0-9]{5,})?$/);return r?r[1]:t}).filter((t,r,s)=>s.indexOf(t)===r).join(", ")}var Xt=new Set(["none","normal","auto","0px","rgba(0, 0, 0, 0)","transparent","static","visible"]),lr=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"]),dr=new Set(["input","textarea","select"]),cr=new Set(["img","video","canvas","svg"]),ur=new Set(["div","section","article","nav","header","footer","aside","main","ul","ol","form","fieldset"]);function Yt(e){if(typeof window>"u")return{};let n=window.getComputedStyle(e),o={},t=e.tagName.toLowerCase(),r;lr.has(t)?r=["color","fontSize","fontWeight","fontFamily","lineHeight"]:t==="button"||t==="a"&&e.getAttribute("role")==="button"?r=["backgroundColor","color","padding","borderRadius","fontSize"]:dr.has(t)?r=["backgroundColor","color","padding","borderRadius","fontSize"]:cr.has(t)?r=["width","height","objectFit","borderRadius"]:ur.has(t)?r=["display","padding","margin","gap","backgroundColor"]:r=["color","fontSize","margin","padding","backgroundColor"];for(let s of r){let a=s.replace(/([A-Z])/g,"-$1").toLowerCase(),i=n.getPropertyValue(a);i&&!Xt.has(i)&&(o[s]=i)}return o}var mr=["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 Qt(e){if(typeof window>"u")return"";let n=window.getComputedStyle(e),o=[];for(let t of mr){let r=t.replace(/([A-Z])/g,"-$1").toLowerCase(),s=n.getPropertyValue(r);s&&!Xt.has(s)&&o.push(`${r}: ${s}`)}return o.join("; ")}function qt(e){let n=[],o=e.getAttribute("role"),t=e.getAttribute("aria-label"),r=e.getAttribute("aria-describedby"),s=e.getAttribute("tabindex"),a=e.getAttribute("aria-hidden");return o&&n.push(`role="${o}"`),t&&n.push(`aria-label="${t}"`),r&&n.push(`aria-describedby="${r}"`),s&&n.push(`tabindex=${s}`),a==="true"&&n.push("aria-hidden"),e.matches("a, button, input, select, textarea, [tabindex]")&&n.push("focusable"),n.join(", ")}function Jt(e){let n=[],o=e;for(;o&&o.tagName.toLowerCase()!=="html";){let t=o.tagName.toLowerCase(),r=t;if(o.id)r=`${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&&(r=`${t}.${a}`)}let s=mn(o);!o.parentElement&&s&&(r=`\u27E8shadow\u27E9 ${r}`),n.unshift(r),o=s}return n.join(" > ")}var F={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},Gt=new Set(["Component","PureComponent","Fragment","Suspense","Profiler","StrictMode","Routes","Route","Outlet","Root","ErrorBoundaryHandler","HotReload","Hot"]),eo=[/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$/],_r=[/Page$/,/View$/,/Screen$/,/Section$/,/Card$/,/List$/,/Item$/,/Form$/,/Modal$/,/Dialog$/,/Button$/,/Nav$/,/Header$/,/Footer$/,/Layout$/,/Panel$/,/Tab$/,/Menu$/];function pr(e){let n=e?.mode??"filtered",o=Gt;if(e?.skipExact){let t=e.skipExact instanceof Set?e.skipExact:new Set(e.skipExact);o=new Set([...Gt,...t])}return{maxComponents:e?.maxComponents??6,maxDepth:e?.maxDepth??30,mode:n,skipExact:o,skipPatterns:e?.skipPatterns?[...eo,...e.skipPatterns]:eo,userPatterns:e?.userPatterns??_r,filter:e?.filter}}function fr(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/([A-Z])([A-Z][a-z])/g,"$1-$2").toLowerCase()}function gr(e,n=10){let o=new Set,t=e,r=0;for(;t&&r<n;)t.className&&typeof t.className=="string"&&t.className.split(/\s+/).forEach(s=>{if(s.length>1){let a=s.replace(/[_][a-zA-Z0-9]{5,}.*$/,"").toLowerCase();a.length>1&&o.add(a)}}),t=t.parentElement,r++;return o}function hr(e,n){let o=fr(e);for(let t of n){if(t===o)return!0;let r=o.split("-").filter(a=>a.length>2),s=t.split("-").filter(a=>a.length>2);for(let a of r)for(let i of s)if(a===i||a.includes(i)||i.includes(a))return!0}return!1}function yr(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(r=>r.test(e)));case"smart":return o.skipExact.has(e)||o.skipPatterns.some(r=>r.test(e))?!1:!!(t&&hr(e,t)||o.userPatterns.some(r=>r.test(e)));default:return!0}}var Xe=null,br=new WeakMap;function rt(e){return Object.keys(e).some(n=>n.startsWith("__reactFiber$")||n.startsWith("__reactInternalInstance$")||n.startsWith("__reactProps$"))}function xr(){if(Xe!==null)return Xe;if(typeof document>"u")return!1;if(document.body&&rt(document.body))return Xe=!0,!0;let e=["#root","#app","#__next","[data-reactroot]"];for(let n of e){let o=document.querySelector(n);if(o&&rt(o))return Xe=!0,!0}if(document.body){for(let n of document.body.children)if(rt(n))return Xe=!0,!0}return Xe=!1,!1}var _n={map:br};function kr(e){return Object.keys(e).find(o=>o.startsWith("__reactFiber$")||o.startsWith("__reactInternalInstance$"))||null}function vr(e){let n=kr(e);return n?e[n]:null}function Ve(e){return e?e.displayName?e.displayName:e.name?e.name:null:null}function Cr(e){let{tag:n,type:o,elementType:t}=e;if(n===F.HostComponent||n===F.HostText||n===F.HostHoistable||n===F.HostSingleton||n===F.Fragment||n===F.Mode||n===F.Profiler||n===F.DehydratedFragment||n===F.HostRoot||n===F.HostPortal||n===F.ScopeComponent||n===F.OffscreenComponent||n===F.LegacyHiddenComponent||n===F.CacheComponent||n===F.TracingMarkerComponent||n===F.Throw||n===F.ViewTransitionComponent||n===F.ActivityComponent)return null;if(n===F.ForwardRef){let r=t;if(r?.render){let s=Ve(r.render);if(s)return s}return r?.displayName?r.displayName:Ve(o)}if(n===F.MemoComponent||n===F.SimpleMemoComponent){let r=t;if(r?.type){let s=Ve(r.type);if(s)return s}return r?.displayName?r.displayName:Ve(o)}if(n===F.ContextProvider){let r=o;return r?._context?.displayName?`${r._context.displayName}.Provider`:null}if(n===F.ContextConsumer){let r=o;return r?.displayName?`${r.displayName}.Consumer`:null}if(n===F.LazyComponent){let r=t;return r?._status===1&&r._result?Ve(r._result):null}return n===F.SuspenseComponent||n===F.SuspenseListComponent?null:n===F.IncompleteClassComponent||n===F.IncompleteFunctionComponent||n===F.FunctionComponent||n===F.ClassComponent||n===F.IndeterminateComponent?Ve(o):null}function wr(e){return e.length<=2||e.length<=3&&e===e.toLowerCase()}function no(e,n){let o=pr(n),t=o.mode==="all";if(t){let _=_n.map.get(e);if(_!==void 0)return _}if(!xr()){let _={path:null,components:[]};return t&&_n.map.set(e,_),_}let r=o.mode==="smart"?gr(e):void 0,s=[];try{let _=vr(e),b=0;for(;_&&b<o.maxDepth&&s.length<o.maxComponents;){let h=Cr(_);h&&!wr(h)&&yr(h,b,o,r)&&s.push(h),_=_.return,b++}}catch{let _={path:null,components:[]};return t&&_n.map.set(e,_),_}if(s.length===0){let _={path:null,components:[]};return t&&_n.map.set(e,_),_}let i={path:s.slice().reverse().map(_=>`<${_}>`).join(" "),components:s};return t&&_n.map.set(e,i),i}import Sr from"react";var pn={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 Lr(e){if(!e||typeof e!="object")return null;let n=Object.keys(e),o=n.find(s=>s.startsWith("__reactFiber$"));if(o)return e[o]||null;let t=n.find(s=>s.startsWith("__reactInternalInstance$"));if(t)return e[t]||null;let r=n.find(s=>{if(!s.startsWith("__react"))return!1;let a=e[s];return a&&typeof a=="object"&&"_debugSource"in a});return r&&e[r]||null}function fn(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 Nr(e,n=50){let o=e,t=0;for(;o&&t<n;){if(o._debugSource)return{source:o._debugSource,componentName:fn(o)};if(o._debugOwner?._debugSource)return{source:o._debugOwner._debugSource,componentName:fn(o._debugOwner)};o=o.return,t++}return null}function Er(e){let n=e,o=0,t=50;for(;n&&o<t;){let r=n,s=["_debugSource","__source","_source","debugSource"];for(let a of s){let i=r[a];if(i&&typeof i=="object"&&"fileName"in i)return{source:i,componentName:fn(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:fn(n)}}}n=n.return,o++}return null}var $n=new Map;function Tr(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===pn.FunctionComponent||n===pn.IndeterminateComponent)&&typeof o=="function")return o;if(n===pn.ForwardRef&&t){let r=t.render;if(typeof r=="function")return r}if((n===pn.MemoComponent||n===pn.SimpleMemoComponent)&&t){let r=t.type;if(typeof r=="function")return r}return typeof o=="function"?o:null}function Rr(){let e=Sr,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:r=>{t.current=r}}}return null}function Ir(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+)\)?$/,r=/^[^@]*@(.+?):(\d+):(\d+)$/,s=0;for(let a of n){let i=a.trim();if(!i||o.some(b=>b.test(i)))continue;let _=t.exec(i)||r.exec(i);if(_&&(s++,s>=3))return{fileName:_[1],line:parseInt(_[2],10),column:parseInt(_[3],10)}}return null}function Mr(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 Fr(e){let n=Tr(e);if(!n)return null;if($n.has(n))return $n.get(n);let o=Rr();if(!o)return $n.set(n,null),null;let t=o.get(),r=null;try{let s=new Proxy({},{get(){throw new Error("probe")}});o.set(s);try{n({})}catch(a){if(a instanceof Error&&a.stack){let i=Ir(a.stack);i&&(r={fileName:Mr(i.fileName),lineNumber:i.line,columnNumber:i.column,componentName:fn(e)||void 0})}}}finally{o.set(t)}return $n.set(n,r),r}function Pr(e,n=15){let o=[],t=new Set,r=e,s=0;for(;r&&s<n;){let a=Fr(r);a&&!t.has(a.fileName)&&(t.add(a.fileName),o.push(a)),r=r.return,s++}return o}function gn(e){let n=Lr(e);if(!n)return{found:!1,reason:"no-fiber",isReactApp:!1,isProduction:!1};let o=Nr(n);if(o||(o=Er(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=Pr(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 Hn(e,n="path"){let{fileName:o,lineNumber:t,columnNumber:r}=e,s=`${o}:${t}`;return r!==void 0&&(s+=`:${r}`),n==="vscode"?`vscode://file${o.startsWith("/")?"":"/"}${s}`:s}function st(e,n=10){let o=e,t=0;for(;o&&t<n;){let r=gn(o);if(r.found)return r;o=o.parentElement,t++}return gn(e)}async function Bn(e,n={}){let{quality:o=.7,maxScale:t=2}=n,r=(await import("html2canvas-pro")).default;return(await r(e,{useCORS:!0,allowTaint:!0,scale:Math.min(window.devicePixelRatio,t),logging:!1})).toDataURL("image/jpeg",o)}async function to(e={}){let{quality:n=.5,hideSelectors:o=[]}=e,r=[...["[data-impakers-debug]","[data-annotation-popup]","[data-annotation-marker]"],...o],s=document.querySelectorAll(r.join(", "));try{s.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{s.forEach(a=>a.style.visibility="")}}var _e=[],yn=[],oo=!1;function it(e){return e.map(n=>{if(n instanceof Error)return`${n.message}
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}
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 hn(e,n){yn.push({level:e,message:n.slice(0,500),timestamp:Date.now()}),yn.length>50&&yn.shift()}function Ar(){if(oo||typeof window>"u")return;oo=!0;let e=console.error,n=console.warn,o=console.log;console.error=(...t)=>{let r=it(t);_e.push(r.slice(0,500)),_e.length>20&&_e.shift(),hn("error",r),e.apply(console,t)},console.warn=(...t)=>{let r=it(t);_e.push(`[warn] ${r}`.slice(0,500)),_e.length>20&&_e.shift(),hn("warn",r),n.apply(console,t)},console.log=(...t)=>{hn("log",it(t)),o.apply(console,t)},window.addEventListener("error",t=>{let r=`${t.message} (${t.filename}:${t.lineno})`;_e.push(r.slice(0,500)),_e.length>20&&_e.shift(),hn("error",r)}),window.addEventListener("unhandledrejection",t=>{let r=`Unhandled Promise: ${t.reason}`;_e.push(r.slice(0,500)),_e.length>20&&_e.shift(),hn("error",r)})}Ar();function $r(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 r=e.match(/Version\/(\d+[\d.]*).*Safari/);if(r)return`Safari ${r[1]}`;let s=e.match(/OPR\/(\d+[\d.]*)/);return s?`Opera ${s[1]}`:e}var Hr=[/session/i,/csrf/i,/xsrf/i,/secret/i,/password/i,/key/i];function Br(){if(typeof document>"u")return{};let e={};try{document.cookie.split(";").forEach(n=>{let[o,...t]=n.trim().split("=");if(!o)return;let r=o.trim(),s=Hr.some(a=>a.test(r));e[r]=s?"[masked]":decodeURIComponent(t.join("=")).slice(0,200)})}catch{}return e}function ro(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 zr(){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,r=ro(t);if(r){let s={},a=["sub","email","name","role","roles","org","iat","exp","aud","iss","user_id","user_role"];for(let i of a)i in r&&(s[i]=r[i]);return Object.keys(s).length>0?s:null}}}catch{continue}try{let n=document.cookie.split(";");for(let o of n){let[,...t]=o.trim().split("="),r=t.join("="),s=ro(r);if(s&&s.sub){let a={},i=["sub","email","name","role","roles","org","iat","exp"];for(let _ of i)_ in s&&(a[_]=s[_]);return Object.keys(a).length>0?a:null}}}catch{}return null}function Ye(e){let n=Math.round(e);return isNaN(n)||!isFinite(n)?void 0:n}function Dr(){if(typeof performance>"u")return{};let e={};try{let n=performance.getEntriesByType("navigation")[0];if(n){let r=Ye(n.loadEventEnd-n.startTime),s=Ye(n.domContentLoadedEventEnd-n.startTime),a=Ye(n.responseStart-n.requestStart);r&&(e.pageLoadTime=r),s&&(e.domContentLoaded=s),a&&(e.ttfb=a)}let o=performance.getEntriesByName("first-contentful-paint")[0];if(o){let r=Ye(o.startTime);r&&(e.firstContentfulPaint=r)}let t=performance.memory;if(t){let r=Ye(t.usedJSHeapSize/1024/1024),s=Ye(t.totalJSHeapSize/1024/1024);r&&(e.usedJSHeapMB=r),s&&(e.totalJSHeapMB=s)}}catch{}return e}function so(e){let n={url:window.location.href,timestamp:new Date().toISOString(),browser:$r(navigator.userAgent),userAgent:navigator.userAgent,viewport:`${window.innerWidth}x${window.innerHeight}`,pixelRatio:window.devicePixelRatio,language:navigator.language,referrer:document.referrer,cookies:Br(),jwtClaims:zr()??void 0,consoleErrors:_e.length>0?[..._e]:void 0,consoleLogs:yn.length>0?[...yn]:void 0,performance:Dr()};if(e)try{let o=e();o&&(n.user={...o,id:String(o.id),name:String(o.name||"")})}catch{}return n}var jr="/_next/static/chunks/impakers-debug-route-manifest.json",zn=null,Dn=!1;function io(e){return!e||e==="/"?"/":e.endsWith("/")?e.slice(0,-1)||"/":e}function Wr(e){let n=io(e);return n==="/"?[]:n.slice(1).split("/").map(o=>decodeURIComponent(o)).filter(Boolean)}function Or(e){return/^\[[^\]]+\]$/.test(e)}function Vr(e){return/^\[\.\.\.[^\]]+\]$/.test(e)}function Kr(e){return/^\[\[\.\.\.[^\]]+\]\]$/.test(e)}function Zr(e,n){let o=0,t=0,r=0;for(;o<e.length;){let s=e[o];if(Kr(s)){r+=1,t=n.length,o+=1;break}if(Vr(s)){if(t>=n.length)return null;r+=2,t=n.length,o+=1;break}let a=n[t];if(a===void 0)return null;if(Or(s)){r+=5,o+=1,t+=1;continue}if(s!==a)return null;r+=20,o+=1,t+=1}return o!==e.length||t!==n.length?null:r}async function Ur(){return Dn?null:zn||(zn=(async()=>{try{let e=await fetch(jr,{cache:"force-cache"});if(!e.ok)return Dn=!0,null;let n=await e.json();return!n||typeof n!="object"||!Array.isArray(n.entries)?(Dn=!0,null):n}catch{return Dn=!0,null}})(),zn)}function Xr(e){let n=e.files.find(r=>r.kind==="page"),o=e.files.filter(r=>r.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((r,s)=>{t.push({kind:"route-layout",file:r.file,label:s===o.length-1?"Nearest layout":"Ancestor layout",confidence:Math.max(.7,.95-s*.08),reason:"matched-layout-chain"})}),t}async function ao(e){if(typeof window>"u")return null;let n=e??window.location.pathname,o=await Ur();if(!o)return null;let t=Wr(n),r=null,s=-1;for(let a of o.entries){let i=Zr(a.segments,t);i!==null&&i>s&&(s=i,r=a)}return r?{targets:Xr(r),context:{pathname:io(n),matchedRoute:r.route,source:"next-route-manifest"}}:null}function lo(...e){let n=[],o=new Set;return e.forEach(t=>{t?.forEach(r=>{let s=`${r.kind}:${r.file}:${r.line??""}:${r.column??""}`;o.has(s)||(o.add(s),n.push(r))})}),n.sort((t,r)=>r.confidence-t.confidence)}function co(){let e=Gn();if(!e)throw new Error("\uC778\uC99D\uC774 \uD544\uC694\uD569\uB2C8\uB2E4");return e}async function Re(e,n={}){let o=co(),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 r=await t.json().catch(()=>({error:"\uC694\uCCAD \uC2E4\uD328"}));throw new Error(r.error||r.message||"\uC694\uCCAD \uC2E4\uD328")}return t}var jn=new Map,at=new Map,bn=new Map,Yr=3e4;function $e(e){return`feedbacks:${e}`}function Qe(){return"feedbacks:__all__"}function Be(e){return`comments:${e}`}function Le(e,n){jn.set(e,{data:n,timestamp:Date.now()});let o=bn.get(e);o&&o.forEach(t=>t(n))}function He(e){return jn.get(e)?.data??null}function Qr(e){let n=jn.get(e);return n?Date.now()-n.timestamp<=Yr:!1}function dt(e){return Array.from(jn.keys()).filter(n=>n.includes(e))}function qr(e){let n=new Map;for(let o of dt(e)){let t=He(o);t!==null&&n.set(o,t)}return n}function Jr(e){e.forEach((n,o)=>Le(o,n))}function lt(e,n){let o=n(He(e));return Le(e,o),o}function Gr(e,n){for(let o of dt(e)){let t=He(o);t!==null&&Le(o,n(t))}}async function xn(e,n){let o=at.get(e);if(o)return o;let t=(async()=>{try{let r=await n();return Le(e,r),r}finally{at.delete(e)}})();return at.set(e,t),t}async function ct(e,n,o={}){let t=He(e);return t!==null&&!o.force?((o.staleWhileRevalidate||!Qr(e))&&xn(e,n),t):xn(e,n)}function kn(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 qe(e){return He(e)}async function uo(e,n){let o=`temp-task-${Date.now()}`,t=n.feedbackUrl,r=n.feedbackMarker,s=t?He($e(t))||[]:null,a=He(Qe()),i=t?{id:o,taskNumber:0,title:n.title,status:"todo",priority:n.priority,feedbackUrl:t,feedbackMarker:r||null,createdAt:new Date().toISOString(),commentCount:0,_optimistic:!0}:null;t&&i&&(Le($e(t),[i,...s]),a&&Le(Qe(),[i,...a]));try{let b=await(await Re(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};lt($e(t),x=>(x||[]).map(k=>k.id===o?h:k)),a&&lt(Qe(),x=>(x||[]).map(k=>k.id===o?h:k)),po(e,t).catch(()=>{}),a&&fo(e).catch(()=>{})}return b}catch(_){throw t&&s&&Le($e(t),s),a&&Le(Qe(),a),_}}async function mo(e,n,o={}){let t=$e(n);return ct(t,async()=>(await(await Re(`${e}?url=${encodeURIComponent(n)}`)).json()).tasks||[],o)}async function _o(e,n={}){let o=Qe();return ct(o,async()=>(await(await Re(`${e}?url=__all__`)).json()).tasks||[],n)}async function po(e,n){let o=$e(n);return xn(o,async()=>(await(await Re(`${e}?url=${encodeURIComponent(n)}`)).json()).tasks||[])}async function fo(e){let n=Qe();return xn(n,async()=>(await(await Re(`${e}?url=__all__`)).json()).tasks||[])}async function Wn(e,n,o={}){let t=Be(n);return ct(t,async()=>(await(await Re(`${e}/${n}/comments`)).json()).comments||[],o)}async function es(e,n){let o=Be(n);return xn(o,async()=>(await(await Re(`${e}/${n}/comments`)).json()).comments||[])}function ns(e,n){Gr("feedbacks:",o=>o.map(t=>t.id===e?{...t,commentCount:Math.max(0,(t.commentCount||0)+n)}:t))}function ts(e){dt("feedbacks:").forEach(o=>{let t=o.replace("feedbacks:","");t==="__all__"?fo(e).catch(()=>{}):po(e,t).catch(()=>{})})}async function On(e,n,o,t,r,s,a){let i={id:`temp-${Date.now()}`,content:o,authorName:t,authorId:r,imageUrl:s||void 0,fileUrl:a?.url,fileName:a?.fileName,fileType:a?.fileType,fileSize:a?.fileSize,fileSource:a?.fileSource,createdAt:new Date().toISOString()},_=Be(n),b=He(_)||[],h=qr("feedbacks:");Le(_,[...b,i]),ns(n,1);try{let A=(await(await Re(`${e}/${n}/comments`,{method:"POST",body:JSON.stringify({content:o,authorName:t,authorId:r,screenshot:s,...a&&{fileUrl:a.url,fileName:a.fileName,fileType:a.fileType,fileSize:a.fileSize,fileSource:a.fileSource}})})).json()).comment;return lt(_,R=>(R||[]).map(H=>H.id===i.id?A:H)),es(e,n),ts(e),A}catch(x){throw Le(_,b),Jr(h),x}}var os=4.5*1024*1024;async function Vn(e,n,o,t){if(n.size>os)throw new Error(`\uD30C\uC77C \uD06C\uAE30\uAC00 4.5MB\uB97C \uCD08\uACFC\uD569\uB2C8\uB2E4. (${(n.size/1024/1024).toFixed(1)}MB)`);let r=co(),s=new FormData;s.append("file",n),s.append("context",o),t&&s.append("taskId",t);let a=await fetch(`${e}/upload`,{method:"POST",headers:{Authorization:`Bearer ${r}`},body:s});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 Kn(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(),r=`${e}/history${t?`?${t}`:""}`;return(await(await Re(r)).json()).events||[]}import{AnyMap as go,originalPositionFor as rs}from"@jridgewell/trace-mapping";var vn=new Map,ho=new Set;async function ss(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 r=t[1];return r.startsWith("http")?r:e.substring(0,e.lastIndexOf("/")+1)+r}catch{return null}}async function is(e){if(vn.has(e))return vn.get(e)??null;if(ho.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 r=await t.json(),s=new go(r);return vn.set(e,s),s}}catch{}let o=await ss(e);if(o)try{let t=await fetch(o,{cache:"force-cache"});if(t.ok){let r=await t.json(),s=new go(r);return vn.set(e,s),s}}catch{}return ho.add(e),vn.set(e,null),null}async function as(e,n,o){let t;try{e.startsWith("http")?t=e:t=new URL(e,window.location.origin).href}catch{return null}let r=await is(t);if(!r)return null;try{let s=rs(r,{line:n,column:o});if(!s.source)return null;let a=s.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:s.line??0,column:s.column??0,name:s.name??null}}catch{return null}}async function ut(e){if(!e)return null;let n=e.match(/^(.+):(\d+):(\d+)$/);if(!n)return null;let[,o,t,r]=n,s=parseInt(t,10),a=parseInt(r,10);return isNaN(s)||isNaN(a)?null:as(o,s,a)}var ls=`@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 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 {
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
- }`,ds={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=ls}var ve=ds;import{jsx as Je,jsxs as mt}from"react/jsx-runtime";var cs="#3b82f6",us="#9ca3af";function _t({annotation:e,layerIndex:n,isAnimated:o,isHovered:t,accentColor:r,onHover:s,onHoverEnd:a,onClick:i}){let _=o?"":ve.enter,b=e.status==="done"||e.status==="resolved",h=e.status==="in_progress",x=b?us:h?cs:r;return mt("div",{className:`${ve.marker} ${_} ${t?ve.hovered:""} ${b?ve.done:""}`,"data-annotation-marker":!0,style:{left:`${e.x}%`,top:e.y,backgroundColor:x,animationDelay:`${n*20}ms`},onMouseEnter:s,onMouseLeave:a,onClick:k=>{k.stopPropagation(),i()},children:[Je("span",{children:n+1}),t&&mt("div",{className:`${ve.markerTooltip} ${ve.enter}`,children:[Je("span",{className:ve.markerQuote,children:e.element}),e.comment&&Je("span",{className:ve.markerNote,children:e.comment})]})]})}function yo({x:e,y:n,accentColor:o}){return Je("div",{className:`${ve.pending} ${ve.enter}`,"data-annotation-marker":!0,style:{left:`${e}%`,top:n,backgroundColor:o},children:mt("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",children:[Je("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),Je("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})})}import{useState as Ge,useRef as pt,useEffect as xo,useCallback as Ke}from"react";var ms=`@keyframes styles-module__spin___h0C6p {
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 {
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
- }`,_s={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=ms}var Zn=_s;import{jsx as bo,jsxs as ps}from"react/jsx-runtime";function Un({message:e="\uB85C\uB529 \uC911..."}){return ps("div",{className:Zn.container,children:[bo("div",{className:Zn.spinner}),bo("span",{className:Zn.message,children:e})]})}var fs=`@keyframes styles-module__threadIn___pBTFZ {
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 {
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
- }`,gs={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=fs}var C=gs;import{Fragment as So,jsx as S,jsxs as Q}from"react/jsx-runtime";function ko(e){let n=new Date(e),o=Date.now()-n.getTime(),t=_=>String(_).padStart(2,"0"),r=`${n.getMonth()+1}/${n.getDate()} ${t(n.getHours())}:${t(n.getMinutes())}`,s=Math.floor(o/6e4);if(s<1)return`${r} (\uBC29\uAE08)`;if(s<60)return`${r} (${s}\uBD84 \uC804)`;let a=Math.floor(s/60);if(a<24)return`${r} (${a}\uC2DC\uAC04 \uC804)`;let i=Math.floor(a/24);return`${r} (${i}\uC77C \uC804)`}function vo(e){return e.slice(0,1).toUpperCase()}function Co(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 Lo({task:e,currentUserName:n,currentUserId:o,left:t,top:r,bottom:s,loading:a,onClose:i,onReply:_}){let[b,h]=Ge(""),[x,k]=Ge(!1),[A,R]=Ge(null),[H,j]=Ge(null),[oe,de]=Ge(!1),ee=pt(null),T=pt(null),[L,Z]=Ge(null),y=pt(null);xo(()=>{T.current&&(T.current.scrollTop=T.current.scrollHeight),ee.current?.focus()},[e.comments.length]),xo(()=>{if(oe)return;let f=g=>{let O=g.target;O.closest(`.${C.thread}`)||O.closest("[data-annotation-marker]")||O.closest("[data-impakers-debug]")||P()};return document.addEventListener("mousedown",f),()=>document.removeEventListener("mousedown",f)},[oe]);let P=Ke(()=>{k(!0),setTimeout(()=>i(),120)},[i]),N=Ke(()=>{!b.trim()&&!A&&!H||(_(e.id,b.trim(),A||void 0,H||void 0),h(""),R(null),j(null))},[b,A,H,e.id,_]),ce=Ke(f=>{f.stopPropagation(),!f.nativeEvent.isComposing&&(f.key==="Enter"&&!f.shiftKey&&(f.preventDefault(),N()),f.key==="Escape"&&P())},[P,N]),E=Ke(()=>{de(!0);let f=document.querySelectorAll("[data-impakers-debug], [data-annotation-marker]");f.forEach(I=>I.style.visibility="hidden"),document.documentElement.classList.add("impakers-selecting");let g=null,O=I=>{g||(g=document.createElement("div"),g.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(g)),g.style.left=`${I.left}px`,g.style.top=`${I.top}px`,g.style.width=`${I.width}px`,g.style.height=`${I.height}px`},ie=()=>{document.removeEventListener("mousemove",Fe),document.removeEventListener("click",Pe,!0),document.removeEventListener("keydown",Ee),document.documentElement.classList.remove("impakers-selecting"),g?.remove(),f.forEach(I=>I.style.visibility=""),de(!1)},Fe=I=>{let be=document.elementFromPoint(I.clientX,I.clientY);!be||be===g||O(be.getBoundingClientRect())},Ee=I=>{I.key==="Escape"&&ie()},Pe=async I=>{I.preventDefault(),I.stopPropagation(),I.stopImmediatePropagation();let be=document.elementFromPoint(I.clientX,I.clientY);if(ie(),!!be){try{let xe=await Bn(be);R(xe)}catch(xe){console.error("[@impakers/debug] DOM \uC2A4\uD06C\uB9B0\uC0F7 \uC2E4\uD328:",xe)}ee.current?.focus()}};document.addEventListener("mousemove",Fe),document.addEventListener("click",Pe,!0),document.addEventListener("keydown",Ee)},[]),V=Ke(()=>{E()},[E]),re=Ke(()=>{y.current?.click()},[]),pe=Ke(f=>{let g=f.target.files?.[0];if(g){if(g.size>4.5*1024*1024){console.warn("[@impakers/debug] \uD30C\uC77C \uD06C\uAE30\uAC00 4.5MB\uB97C \uCD08\uACFC\uD569\uB2C8\uB2E4."),f.target.value="";return}if(g.type.startsWith("image/")){j(null);let O=new FileReader;O.onload=()=>{R(O.result)},O.readAsDataURL(g)}else R(null),j(g);f.target.value=""}},[]),Se=e.title.replace(/^\[피드백\]\s*/,""),se={left:t,...r!==void 0?{top:r}:{},...s!==void 0?{bottom:s}:{},"--thread-top":`${r!==void 0?r:40}px`};return Q("div",{className:`${C.thread} ${x?C.exiting:""}`,style:se,"data-impakers-debug":"",onClick:f=>f.stopPropagation(),children:[Q("div",{className:C.header,children:[S("div",{className:C.avatar,children:vo(e.authorName||n)}),Q("div",{className:C.headerInfo,children:[Q("div",{className:C.headerTop,children:[S("span",{className:C.authorName,children:e.authorName||n}),S("span",{className:C.timestamp,children:ko(e.createdAt)})]}),S("div",{className:C.title,children:Se})]}),S("div",{className:C.headerActions,children:S("button",{className:C.headerAction,onClick:P,title:"\uB2EB\uAE30",type:"button",children:S("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:S("path",{d:"M18 6L6 18M6 6l12 12"})})})})]}),a&&e.comments.length===0&&Q(So,{children:[S("div",{className:C.divider}),S(Un,{message:"\uB313\uAE00 \uB85C\uB529 \uC911..."})]}),e.comments.length>0&&Q(So,{children:[S("div",{className:C.divider}),S("div",{className:C.commentsList,ref:T,children:e.comments.map(f=>Q("div",{className:C.comment,children:[S("div",{className:C.avatar,style:{width:22,height:22,fontSize:10},children:vo(f.authorName)}),Q("div",{className:C.commentContent,children:[Q("div",{className:C.commentTop,children:[S("span",{className:C.commentAuthor,children:f.authorName}),S("span",{className:C.commentTime,children:ko(f.createdAt)})]}),f.content&&S("div",{className:C.commentText,children:f.content}),f.imageUrl&&f.imageUrl!=="loading..."&&S("div",{className:C.screenshot,onClick:()=>Z(f.imageUrl),style:{cursor:"pointer"},children:S("img",{src:f.imageUrl,alt:"screenshot"})}),f.fileUrl&&Q("a",{className:C.fileCard,href:f.fileUrl,target:"_blank",rel:"noopener noreferrer",onClick:g=>g.stopPropagation(),children:[S("span",{className:C.fileIcon,children:wo(f.fileType||"")}),Q("span",{className:C.fileInfo,children:[S("span",{className:C.fileCardName,children:f.fileName||"\uD30C\uC77C"}),f.fileSize!=null&&S("span",{className:C.fileCardSize,children:Co(f.fileSize)})]})]})]})]},f.id))})]}),A&&Q("div",{className:C.pendingImage,children:[S("img",{src:A,alt:"pending"}),S("button",{className:C.pendingRemove,onClick:()=>R(null),type:"button",children:"\xD7"})]}),H&&Q("div",{className:C.pendingFile,children:[S("span",{className:C.fileIcon,children:wo(H.type)}),Q("span",{className:C.fileInfo,children:[S("span",{className:C.fileCardName,children:H.name}),S("span",{className:C.fileCardSize,children:Co(H.size)})]}),S("button",{className:C.pendingRemove,onClick:()=>j(null),type:"button",children:"\xD7"})]}),S("div",{className:C.replyArea,children:S("textarea",{ref:ee,className:C.replyInput,placeholder:"Reply...",value:b,onChange:f=>{h(f.target.value);let g=f.target;g.style.height="auto",g.style.height=`${Math.min(g.scrollHeight,120)}px`},onKeyDown:ce,rows:2})}),Q("div",{className:C.replyToolbar,children:[S("button",{className:C.replyTool,onClick:re,type:"button",title:"\uD30C\uC77C \uCCA8\uBD80",children:Q("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[S("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),S("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}),S("button",{className:C.replyTool,onClick:V,type:"button",title:"\uC694\uC18C \uC2A4\uD06C\uB9B0\uC0F7",children:Q("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[S("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"}),S("circle",{cx:"12",cy:"13",r:"3"})]})}),S("button",{className:`${C.replySend} ${b.trim()||A||H?C.active:""}`,onClick:N,disabled:!b.trim()&&!A&&!H,type:"button",title:"\uC804\uC1A1",children:Q("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[S("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),S("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]}),S("input",{ref:y,type:"file",accept:"*/*",style:{display:"none"},onChange:pe}),L&&Q("div",{className:C.lightbox,onClick:()=>Z(null),"data-impakers-debug":"",children:[S("img",{src:L,alt:"enlarged",onClick:f=>f.stopPropagation()}),S("button",{className:C.lightboxClose,onClick:()=>Z(null),type:"button",children:"\xD7"})]})]})}import{useState as Xn,useRef as en,useCallback as Cn,useEffect as bs}from"react";var hs=`@keyframes styles-module__fabEnter___DMJoo {
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 {
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
- }`,ys={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=hs}var Ce=ys;import{Fragment as xs,jsx as Ie,jsxs as ft}from"react/jsx-runtime";function No({items:e,onSelect:n,onHide:o,onDoubleTap:t}){let[r,s]=Xn(!1),[a,i]=Xn(!1),[_,b]=Xn({right:24,bottom:24}),[h,x]=Xn(null),k=en(null),A=en(!1),R=en({x:0,y:0}),H=en({x:0,y:0}),j=en(!1),oe=en(0),de=Cn(y=>{if(y.button===2)return;A.current=!0,j.current=!1;let P=k.current;if(!P)return;P.setPointerCapture(y.pointerId);let N=P.getBoundingClientRect();R.current={x:y.clientX,y:y.clientY},H.current={x:y.clientX-N.left,y:y.clientY-N.top}},[]),ee=Cn(y=>{A.current&&((Math.abs(y.clientX-R.current.x)>3||Math.abs(y.clientY-R.current.y)>3)&&(j.current=!0),j.current&&b({right:Math.max(8,Math.min(window.innerWidth-y.clientX-(44-H.current.x),window.innerWidth-52)),bottom:Math.max(8,Math.min(window.innerHeight-y.clientY-(44-H.current.y),window.innerHeight-52))}))},[]),T=Cn(y=>{if(A.current&&(k.current?.releasePointerCapture(y.pointerId),A.current=!1,!j.current)){let P=Date.now(),N=P-oe.current<350;if(oe.current=P,N&&t){r&&L(),t();return}r?L():s(!0)}},[r,t]),L=Cn(()=>{i(!0),setTimeout(()=>{s(!1),i(!1)},150)},[]),Z=Cn(y=>{y.preventDefault(),y.stopPropagation(),x({x:y.clientX,y:y.clientY})},[]);return bs(()=>{if(!r&&!h)return;let y=P=>{if(!P.target.closest("[data-impakers-fab]")){if(h){x(null);return}r&&L()}};return document.addEventListener("mousedown",y),()=>document.removeEventListener("mousedown",y)},[r,h,L]),ft(xs,{children:[(r||a)&&Ie("div",{className:Ce.menuItems,style:{position:"fixed",right:_.right+4/2,bottom:_.bottom+44+8},"data-impakers-debug":"","data-impakers-fab":"",children:[...e].reverse().map((y,P)=>ft("button",{className:`${Ce.menuItem} ${y.active?Ce.active:""} ${a?Ce.menuItemClosing:""}`,style:{animationDelay:a?`${P*30}ms`:`${(e.length-1-P)*40}ms`},onClick:N=>{N.stopPropagation(),n(y.id),L()},type:"button","data-impakers-fab":"","data-impakers-debug":"",children:[y.icon,Ie("span",{className:Ce.tooltip,children:y.label}),y.badge&&y.badge>0?Ie("span",{className:Ce.badge,children:y.badge>99?"99+":y.badge}):null]},y.id))}),Ie("button",{ref:k,className:`${Ce.fab} ${r?Ce.expanded:""}`,style:{position:"fixed",right:_.right,bottom:_.bottom},onPointerDown:de,onPointerMove:ee,onPointerUp:T,onContextMenu:Z,type:"button","aria-label":"\uD53C\uB4DC\uBC31 \uBA54\uB274","data-impakers-debug":"","data-impakers-fab":"",children:ft("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[Ie("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),Ie("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}),h&&Ie("div",{style:{position:"fixed",inset:0,zIndex:2147483647},onMouseDown:()=>x(null),"data-impakers-debug":"","data-impakers-fab":"",children:Ie("div",{className:Ce.contextMenu,style:{position:"fixed",left:h.x,top:h.y,zIndex:2147483647},onMouseDown:y=>y.stopPropagation(),"data-impakers-fab":"",children:Ie("button",{className:Ce.contextMenuItem,onMouseDown:y=>{y.stopPropagation(),x(null),o?.()},type:"button",children:"\uC704\uC82F \uC228\uAE30\uAE30"})})})]})}import{useState as ye,useCallback as gt,useEffect as tn,useRef as Ro}from"react";import{createPortal as Ns}from"react-dom";import{useState as Yn,useRef as Eo,useCallback as wn}from"react";var ks=`.styles-module__replyWrapper___wuGqO {
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 {
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
- }`,vs={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=ks}var ne=vs;import{jsx as G,jsxs as ze}from"react/jsx-runtime";function Cs(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(0)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`}function ws(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 To({onSend:e,onEscape:n,placeholder:o="Reply...",autoFocus:t=!1}){let[r,s]=Yn(""),[a,i]=Yn(null),[_,b]=Yn(null),[h,x]=Yn(!1),k=Eo(null),A=Eo(null),R=r.trim()||a||_,H=wn(()=>{R&&(e(r.trim(),a||void 0,_||void 0),s(""),i(null),b(null),k.current&&(k.current.style.height="auto"))},[r,a,_,R,e]),j=wn(T=>{T.stopPropagation(),!T.nativeEvent.isComposing&&(T.key==="Enter"&&!T.shiftKey&&(T.preventDefault(),H()),T.key==="Escape"&&n?.())},[H,n]),oe=wn(()=>{x(!0);let T=document.querySelectorAll("[data-impakers-debug], [data-annotation-marker]");T.forEach(E=>E.style.visibility="hidden"),document.documentElement.classList.add("impakers-selecting");let L=null,Z=E=>{L||(L=document.createElement("div"),L.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(L)),L.style.left=`${E.left}px`,L.style.top=`${E.top}px`,L.style.width=`${E.width}px`,L.style.height=`${E.height}px`},y=()=>{document.removeEventListener("mousemove",P),document.removeEventListener("click",ce,!0),document.removeEventListener("keydown",N),document.documentElement.classList.remove("impakers-selecting"),L?.remove(),T.forEach(E=>E.style.visibility=""),x(!1)},P=E=>{let V=document.elementFromPoint(E.clientX,E.clientY);!V||V===L||Z(V.getBoundingClientRect())},N=E=>{E.key==="Escape"&&y()},ce=async E=>{E.preventDefault(),E.stopPropagation(),E.stopImmediatePropagation();let V=document.elementFromPoint(E.clientX,E.clientY);if(y(),!!V){try{let re=await Bn(V);i(re)}catch(re){console.error("[@impakers/debug] DOM \uC2A4\uD06C\uB9B0\uC0F7 \uC2E4\uD328:",re)}k.current?.focus()}};document.addEventListener("mousemove",P),document.addEventListener("click",ce,!0),document.addEventListener("keydown",N)},[]),de=wn(()=>{A.current?.click()},[]),ee=wn(T=>{let L=T.target.files?.[0];if(L){if(L.size>4.5*1024*1024){console.warn("[@impakers/debug] \uD30C\uC77C \uD06C\uAE30\uAC00 4.5MB\uB97C \uCD08\uACFC\uD569\uB2C8\uB2E4."),T.target.value="";return}if(L.type.startsWith("image/")){b(null);let Z=new FileReader;Z.onload=()=>i(Z.result),Z.readAsDataURL(L)}else i(null),b(L);T.target.value=""}},[]);return ze("div",{className:ne.replyWrapper,"data-impakers-debug":"",children:[a&&ze("div",{className:ne.pendingImage,children:[G("img",{src:a,alt:"pending"}),G("button",{className:ne.pendingRemove,onClick:()=>i(null),type:"button",children:"\xD7"})]}),_&&ze("div",{className:ne.pendingFile,children:[G("span",{className:ne.fileIcon,children:ws(_.type)}),ze("span",{className:ne.fileInfo,children:[G("span",{className:ne.fileCardName,children:_.name}),G("span",{className:ne.fileCardSize,children:Cs(_.size)})]}),G("button",{className:ne.pendingRemove,onClick:()=>b(null),type:"button",children:"\xD7"})]}),G("div",{className:ne.replyArea,children:G("textarea",{ref:k,className:ne.replyInput,placeholder:o,value:r,onChange:T=>{s(T.target.value);let L=T.target;L.style.height="auto",L.style.height=`${Math.min(L.scrollHeight,120)}px`},onKeyDown:j,rows:2,autoFocus:t})}),ze("div",{className:ne.replyToolbar,children:[G("button",{className:ne.replyTool,onClick:de,type:"button",title:"\uD30C\uC77C \uCCA8\uBD80",children:ze("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[G("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),G("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}),G("button",{className:ne.replyTool,onClick:oe,type:"button",title:"\uC694\uC18C \uC2A4\uD06C\uB9B0\uC0F7",children:ze("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[G("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"}),G("circle",{cx:"12",cy:"13",r:"3"})]})}),G("button",{className:`${ne.replySend} ${R?ne.active:""}`,onClick:H,disabled:!R,type:"button",title:"\uC804\uC1A1",children:ze("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",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:A,type:"file",accept:"*/*",style:{display:"none"},onChange:ee})]})}var Ss=`@keyframes styles-module__slideIn___0o0s- {
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- {
1316
1316
  from {
1317
1317
  transform: translateX(100%);
1318
1318
  }
@@ -2380,7 +2380,325 @@ ${n.stack?.split(`
2380
2380
  white-space: nowrap;
2381
2381
  overflow: hidden;
2382
2382
  text-overflow: ellipsis;
2383
- }`,Ls={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=Ss}var l=Ls;import{Fragment as yt,jsx as u,jsxs as p}from"react/jsx-runtime";function Es({src:e,onClose:n}){return tn(()=>{let o=t=>{t.key==="Escape"&&n()};return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)},[n]),p("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 Ts(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(0)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`}function Io(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 Rs(e){let n=e.match(/\/d\/([^/]+)/);return n?n[1]:null}function Is(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 r=Rs(e);if(r)return`https://drive.google.com/file/d/${r}/preview`}return t&&o!=="google_drive"?`https://view.officeapps.live.com/op/embed.aspx?src=${encodeURIComponent(e)}`:n.includes("pdf")?e:null}function Ms({fileUrl:e,fileName:n,fileType:o,fileSource:t,onClose:r}){tn(()=>{let a=i=>{i.key==="Escape"&&r()};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[r]);let s=Is(e,o,t);return u("div",{className:l.filePreviewOverlay,onClick:r,"data-impakers-debug":"",children:p("div",{className:l.filePreviewModal,onClick:a=>a.stopPropagation(),children:[p("div",{className:l.filePreviewHeader,children:[u("span",{className:l.filePreviewName,children:n}),p("div",{className:l.filePreviewActions,children:[p("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:l.filePreviewOpen,children:[p("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:r,type:"button",children:"\xD7"})]})]}),u("div",{className:l.filePreviewBody,children:s?u("iframe",{src:s,className:l.filePreviewIframe,title:n}):p("div",{className:l.filePreviewFallback,children:[u("span",{className:l.filePreviewFallbackIcon,children:Io(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 nn(e){let n=new Date(e),o=Date.now()-n.getTime(),t=_=>String(_).padStart(2,"0"),r=`${n.getMonth()+1}/${n.getDate()} ${t(n.getHours())}:${t(n.getMinutes())}`,s=Math.floor(o/6e4);if(s<1)return`${r} (\uBC29\uAE08)`;if(s<60)return`${r} (${s}\uBD84 \uC804)`;let a=Math.floor(s/60);if(a<24)return`${r} (${a}\uC2DC\uAC04 \uC804)`;let i=Math.floor(a/24);return`${r} (${i}\uC77C \uC804)`}function ht(e){return e.slice(0,1).toUpperCase()}function Mo({pageItems:e,allItems:n,currentPath:o,serviceName:t,endpoint:r,currentUserName:s,currentUserId:a,onClose:i,onHistoryViewed:_,newNotiCount:b}){let[h,x]=ye("page"),[k,A]=ye("todo"),[R,H]=ye(""),[j,oe]=ye(!1),de=Ro(null),[ee,T]=ye([]),[L,Z]=ye(!1),[y,P]=ye(!1),[N,ce]=ye(null),[E,V]=ye([]),[re,pe]=ye(!1),[Se,fe]=ye(null),[se,f]=ye(null),g=Ro(null),O=gt(()=>{if(N){ce(null),V([]);return}P(!0),setTimeout(()=>i(),150)},[i,N]),ie=gt(async m=>{ce(m);let U=qe(Be(m.id));V(U||[]),pe(!U)},[r]);tn(()=>{if(!N)return;let m=Be(N.id),U=qe(m);U&&(V(U),pe(!1));let Ae=kn(m,ke=>{V(ke),pe(!1)});return Wn(r,N.id,{staleWhileRevalidate:!0}).then(ke=>{V(ke),pe(!1)}).catch(()=>{pe(!1)}),Ae},[N,r]),tn(()=>{g.current?.scrollIntoView({behavior:"smooth"})},[E.length]),tn(()=>{if(!j)return;let m=U=>{de.current&&!de.current.contains(U.target)&&oe(!1)};return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[j]);let Fe=gt(async(m,U,Ae)=>{if(N)try{let ke;if(Ae)try{ke=await Vn(r,Ae,"comment",N.id)}catch(Ln){console.error("[@impakers/debug] \uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328:",Ln)}await On(r,N.id,m,s,a,U,ke)}catch(ke){console.error("[@impakers/debug] \uCF54\uBA58\uD2B8 \uC804\uC1A1 \uC2E4\uD328:",ke)}},[N,r,s,a]),Ee=h==="page"?e:h==="all"?n:[],Pe=Ee.filter(m=>m.status===k),I=Ee.filter(m=>m.status==="todo").length,be=Ee.filter(m=>m.status==="in_progress").length,xe=Ee.filter(m=>m.status==="done").length;return tn(()=>{h==="history"&&(Z(!0),Kn(r,{date:R||void 0,limit:200}).then(T).catch(()=>T([])).finally(()=>Z(!1)))},[h,R,r]),typeof document>"u"?null:Ns(p("div",{"data-impakers-debug":"",children:[u("div",{className:l.backdrop,onClick:O}),p("div",{className:`${l.panel} ${y?l.exiting:""}`,"data-impakers-debug":"",children:[p("div",{className:l.header,children:[p("div",{className:l.headerLeft,children:[N&&u("button",{className:l.backBtn,onClick:O,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:N?"\uD53C\uB4DC\uBC31 \uC0C1\uC138":t||"Feedback"})]}),u("button",{className:l.closeBtn,onClick:()=>{P(!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"})})})]}),N?p("div",{className:l.detailView,children:[p("div",{className:l.detailHeader,children:[u("div",{className:l.cardAvatar,children:ht(N.authorName)}),p("div",{children:[p("div",{className:l.cardMeta,children:[u("span",{className:l.cardAuthor,children:N.authorName}),u("span",{className:l.cardTime,children:nn(N.createdAt)})]}),u("div",{className:l.detailTitle,children:N.title.replace(/^\[피드백\]\s*/,"")})]})]}),N.screenshot&&u("div",{className:l.detailScreenshot,children:u("img",{src:N.screenshot,alt:"screenshot"})}),p("div",{className:l.commentsList,children:[re&&u(Un,{message:"\uB313\uAE00 \uB85C\uB529 \uC911..."}),!re&&E.length===0&&u("div",{className:l.noComments,children:"\uC544\uC9C1 \uB313\uAE00\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"}),E.map(m=>p("div",{className:l.commentItem,children:[u("div",{className:l.commentAvatar,style:{width:22,height:22,fontSize:10},children:ht(m.authorName)}),p("div",{className:l.commentBody,children:[p("div",{className:l.commentMeta,children:[u("span",{className:l.commentAuthorName,children:m.authorName}),u("span",{className:l.commentTime,children:nn(m.createdAt)})]}),m.content&&u("div",{className:l.commentContent,children:m.content}),m.imageUrl&&u("div",{className:l.commentImage,onClick:U=>{U.stopPropagation(),fe(m.imageUrl)},children:u("img",{src:m.imageUrl,alt:"attachment"})}),m.fileUrl&&p("div",{className:l.commentFileCard,onClick:U=>{U.stopPropagation(),f({url:m.fileUrl,name:m.fileName||"\uD30C\uC77C",type:m.fileType||"",source:m.fileSource})},children:[u("span",{className:l.commentFileIcon,children:Io(m.fileType||"")}),p("span",{className:l.commentFileInfo,children:[u("span",{className:l.commentFileName,children:m.fileName||"\uD30C\uC77C"}),m.fileSize!=null&&u("span",{className:l.commentFileSize,children:Ts(m.fileSize)})]})]})]})]},m.id)),u("div",{ref:g})]}),u(To,{onSend:Fe,onEscape:O,autoFocus:!0})]}):p(yt,{children:[p("div",{className:l.tabs,children:[p("button",{className:`${l.tab} ${h==="page"?l.active:""}`,onClick:()=>x("page"),type:"button",children:["This Page",e.length>0&&u("span",{className:l.tabBadge,children:e.length})]}),p("button",{className:`${l.tab} ${h==="all"?l.active:""}`,onClick:()=>x("all"),type:"button",children:["All",n.length>0&&u("span",{className:l.tabBadge,children:n.length})]}),p("button",{className:`${l.tab} ${h==="history"?l.active:""}`,onClick:()=>{x("history"),_?.()},type:"button",children:["History",b&&b>0?u("span",{className:l.tabBadge,children:b}):null]})]}),h==="history"?p(yt,{children:[p("div",{className:l.historyFilter,children:[p("div",{className:l.historyDateWrap,ref:de,children:[p("button",{className:`${l.filterChip} ${R?l.active:""}`,onClick:()=>oe(m=>!m),type:"button",children:[p("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"})]}),R?`${new Date(R).getMonth()+1}/${new Date(R).getDate()}`:"\uB0A0\uC9DC"]}),j&&u("div",{className:l.datePopover,children:u("input",{type:"date",value:R,onChange:m=>{H(m.target.value),oe(!1)},className:l.dateInput,autoFocus:!0})})]}),R&&u("button",{className:l.filterChipClear,onClick:()=>H(""),type:"button",title:"\uD544\uD130 \uCD08\uAE30\uD654",children:"\xD7"})]}),u("div",{className:l.content,children:L?u("div",{className:l.empty,children:"\uB85C\uB529 \uC911..."}):ee.length===0?p("div",{className:l.empty,children:[u("div",{className:l.emptyIcon,children:p("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"]}):ee.map((m,U)=>p("div",{className:l.historyItem,children:[u("div",{className:`${l.historyDot} ${l[`historyDot_${m.action}`]}`}),p("div",{className:l.historyBody,children:[m.action==="status_changed"&&p("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"&&p("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"&&p("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)})]}),p("div",{className:l.historyFooter,children:[u("span",{className:l.historyTime,children:nn(m.createdAt)}),u("span",{className:l.historyRef,children:(m.taskTitle||"").replace(/^\[피드백\]\s*/,"")})]})]})]},`${m.id}-${m.action}-${U}`))})]}):p(yt,{children:[p("div",{className:l.statusFilter,children:[p("button",{className:`${l.filterChip} ${k==="todo"?l.active:""}`,onClick:()=>A("todo"),type:"button",children:["\uC9C4\uD589\uC804",I>0&&u("span",{className:l.filterCount,children:I})]}),p("button",{className:`${l.filterChip} ${k==="in_progress"?l.active:""}`,onClick:()=>A("in_progress"),type:"button",children:["\uC9C4\uD589\uC911",be>0&&u("span",{className:l.filterCount,children:be})]}),p("button",{className:`${l.filterChip} ${k==="done"?l.active:""}`,onClick:()=>A("done"),type:"button",children:["\uC644\uB8CC",xe>0&&u("span",{className:l.filterCount,children:xe})]})]}),u("div",{className:l.content,children:Pe.length===0?p("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"]}):Pe.map(m=>p("div",{className:`${l.card} ${m.status==="done"?l.cardDone:""}`,onClick:()=>ie(m),children:[p("div",{className:l.cardHeader,children:[u("div",{className:l.cardAvatar,children:ht(m.authorName)}),u("div",{className:l.cardInfo,children:p("div",{className:l.cardMeta,children:[u("span",{className:l.cardAuthor,children:m.authorName}),u("span",{className:l.cardTime,children:nn(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&&p("div",{className:l.cardRoute,onClick:U=>{U.stopPropagation(),window.location.href=m.feedbackUrl},title:"\uD398\uC774\uC9C0\uB85C \uC774\uB3D9",children:[u("span",{className:l.cardRoutePath,children:m.feedbackUrl}),p("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)&&p("div",{className:l.cardStatusTime,children:[m.startedAt&&m.status!=="todo"&&p("span",{children:["\uC9C4\uD589 \uC2DC\uC791: ",nn(m.startedAt)]}),m.completedAt&&m.status==="done"&&p("span",{children:["\uC644\uB8CC: ",nn(m.completedAt)]})]}),p("div",{className:l.cardFooter,children:[u("span",{className:l.cardReplyDot}),p("span",{className:l.cardReplyCount,children:[m.commentCount," ",m.commentCount===1?"Reply":"Replies"]})]})]},m.id))})]})]})]}),Se&&u(Es,{src:Se,onClose:()=>fe(null)}),se&&u(Ms,{fileUrl:se.url,fileName:se.name,fileType:se.type,fileSource:se.source,onClose:()=>f(null)})]}),document.body)}import{useCallback as Qn}from"react";import{createPortal as As}from"react-dom";var Fo="impakers-debug-settings",bt={markerColor:"#6366f1",markersVisible:!0,hideDoneMarkers:!1,showOnlyMine:!1};function Po(){try{let e=localStorage.getItem(Fo);return e?{...bt,...JSON.parse(e)}:{...bt}}catch{return{...bt}}}function Ao(e){try{localStorage.setItem(Fo,JSON.stringify(e))}catch{}}var $o=[{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 Fs=`@keyframes styles-module__panelIn___SmRh6 {
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 {
2384
+ from {
2385
+ transform: translateX(100%);
2386
+ }
2387
+ to {
2388
+ transform: translateX(0);
2389
+ }
2390
+ }
2391
+ @keyframes styles-module__slideOut___1n8cb {
2392
+ from {
2393
+ transform: translateX(0);
2394
+ }
2395
+ to {
2396
+ transform: translateX(100%);
2397
+ }
2398
+ }
2399
+ @keyframes styles-module__fadeIn___lF-be {
2400
+ from {
2401
+ opacity: 0;
2402
+ }
2403
+ to {
2404
+ opacity: 1;
2405
+ }
2406
+ }
2407
+ @keyframes styles-module__typingDot___-XQcu {
2408
+ 0%, 60%, 100% {
2409
+ opacity: 0.3;
2410
+ transform: scale(0.8);
2411
+ }
2412
+ 30% {
2413
+ opacity: 1;
2414
+ transform: scale(1);
2415
+ }
2416
+ }
2417
+ .styles-module__backdrop___qExl6 {
2418
+ position: fixed;
2419
+ inset: 0;
2420
+ z-index: 100003;
2421
+ animation: styles-module__fadeIn___lF-be 0.15s ease-out;
2422
+ }
2423
+
2424
+ .styles-module__panel___ri2CN {
2425
+ position: fixed;
2426
+ top: 0;
2427
+ right: 0;
2428
+ bottom: 0;
2429
+ width: 420px;
2430
+ max-width: 100vw;
2431
+ background: #fafafa;
2432
+ z-index: 100004;
2433
+ display: flex;
2434
+ flex-direction: column;
2435
+ box-shadow: -4px 0 24px rgba(0, 0, 0, 0.08);
2436
+ animation: styles-module__slideIn___Wx-kZ 0.2s ease-out;
2437
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
2438
+ -webkit-font-smoothing: antialiased;
2439
+ }
2440
+ .styles-module__panel___ri2CN.styles-module__exiting___iE6TS {
2441
+ animation: styles-module__slideOut___1n8cb 0.15s ease-in forwards;
2442
+ }
2443
+
2444
+ .styles-module__header___gmriy {
2445
+ display: flex;
2446
+ align-items: center;
2447
+ justify-content: space-between;
2448
+ padding: 14px 16px;
2449
+ border-bottom: 1px solid #e5e7eb;
2450
+ background: #fff;
2451
+ flex-shrink: 0;
2452
+ }
2453
+
2454
+ .styles-module__headerLeft___M17Y1 {
2455
+ display: flex;
2456
+ align-items: center;
2457
+ gap: 8px;
2458
+ }
2459
+
2460
+ .styles-module__headerIcon___PsSMZ {
2461
+ font-size: 16px;
2462
+ color: #6366f1;
2463
+ }
2464
+
2465
+ .styles-module__headerTitle___Y96x8 {
2466
+ font-size: 14px;
2467
+ font-weight: 600;
2468
+ color: #18181b;
2469
+ }
2470
+
2471
+ .styles-module__headerActions___-rG09 {
2472
+ display: flex;
2473
+ gap: 4px;
2474
+ }
2475
+
2476
+ .styles-module__headerBtn___eSTQN {
2477
+ width: 30px;
2478
+ height: 30px;
2479
+ border: none;
2480
+ background: none;
2481
+ cursor: pointer;
2482
+ display: flex;
2483
+ align-items: center;
2484
+ justify-content: center;
2485
+ border-radius: 6px;
2486
+ color: #6b7280;
2487
+ transition: background 0.12s, color 0.12s;
2488
+ }
2489
+ .styles-module__headerBtn___eSTQN:hover {
2490
+ background: #f3f4f6;
2491
+ color: #18181b;
2492
+ }
2493
+
2494
+ .styles-module__messages___Al0UY {
2495
+ flex: 1;
2496
+ overflow-y: auto;
2497
+ padding: 16px;
2498
+ display: flex;
2499
+ flex-direction: column;
2500
+ gap: 16px;
2501
+ }
2502
+ .styles-module__messages___Al0UY::-webkit-scrollbar {
2503
+ width: 4px;
2504
+ }
2505
+ .styles-module__messages___Al0UY::-webkit-scrollbar-thumb {
2506
+ background: #d1d5db;
2507
+ border-radius: 2px;
2508
+ }
2509
+
2510
+ .styles-module__welcome___7MKNO {
2511
+ display: flex;
2512
+ flex-direction: column;
2513
+ align-items: center;
2514
+ justify-content: center;
2515
+ flex: 1;
2516
+ text-align: center;
2517
+ gap: 8px;
2518
+ padding: 40px 20px;
2519
+ }
2520
+
2521
+ .styles-module__welcomeIcon___gd4O6 {
2522
+ font-size: 32px;
2523
+ color: #6366f1;
2524
+ margin-bottom: 4px;
2525
+ }
2526
+
2527
+ .styles-module__welcomeText___-aHqH {
2528
+ font-size: 16px;
2529
+ font-weight: 600;
2530
+ color: #18181b;
2531
+ }
2532
+
2533
+ .styles-module__welcomeHint___zUsgp {
2534
+ font-size: 13px;
2535
+ color: #9ca3af;
2536
+ }
2537
+
2538
+ .styles-module__message___-0C3Z {
2539
+ display: flex;
2540
+ gap: 8px;
2541
+ max-width: 100%;
2542
+ }
2543
+ .styles-module__message___-0C3Z.styles-module__user___V0NWN {
2544
+ justify-content: flex-end;
2545
+ }
2546
+ .styles-module__message___-0C3Z.styles-module__user___V0NWN .styles-module__msgBody___YMLmR {
2547
+ background: #6366f1;
2548
+ color: #fff;
2549
+ border-radius: 16px 16px 4px 16px;
2550
+ max-width: 80%;
2551
+ }
2552
+ .styles-module__message___-0C3Z.styles-module__user___V0NWN .styles-module__msgContent___ur5dX {
2553
+ color: #fff;
2554
+ }
2555
+ .styles-module__message___-0C3Z.styles-module__assistant___sS3g4 .styles-module__msgBody___YMLmR {
2556
+ background: #fff;
2557
+ border: 1px solid #e5e7eb;
2558
+ border-radius: 16px 16px 16px 4px;
2559
+ max-width: 85%;
2560
+ }
2561
+
2562
+ .styles-module__msgAvatar___AAtdS {
2563
+ width: 28px;
2564
+ height: 28px;
2565
+ border-radius: 50%;
2566
+ background: #eef2ff;
2567
+ color: #6366f1;
2568
+ display: flex;
2569
+ align-items: center;
2570
+ justify-content: center;
2571
+ font-size: 14px;
2572
+ flex-shrink: 0;
2573
+ margin-top: 2px;
2574
+ }
2575
+
2576
+ .styles-module__msgBody___YMLmR {
2577
+ padding: 10px 14px;
2578
+ min-width: 0;
2579
+ }
2580
+
2581
+ .styles-module__msgContent___ur5dX {
2582
+ font-size: 13px;
2583
+ line-height: 1.6;
2584
+ color: #1a1a1a;
2585
+ white-space: pre-wrap;
2586
+ word-break: break-word;
2587
+ }
2588
+
2589
+ .styles-module__toolCalls___YDi5U {
2590
+ display: flex;
2591
+ flex-wrap: wrap;
2592
+ gap: 4px;
2593
+ margin-bottom: 8px;
2594
+ }
2595
+
2596
+ .styles-module__toolCall___YG3jW {
2597
+ display: inline-flex;
2598
+ align-items: center;
2599
+ gap: 4px;
2600
+ padding: 3px 8px;
2601
+ border-radius: 6px;
2602
+ font-size: 11px;
2603
+ font-weight: 500;
2604
+ background: #fef3c7;
2605
+ color: #92400e;
2606
+ }
2607
+ .styles-module__toolCall___YG3jW.styles-module__tool_success___-qmku {
2608
+ background: #dcfce7;
2609
+ color: #166534;
2610
+ }
2611
+ .styles-module__toolCall___YG3jW.styles-module__tool_error___tmRla {
2612
+ background: #fef2f2;
2613
+ color: #991b1b;
2614
+ }
2615
+
2616
+ .styles-module__toolIcon___w-g-Z {
2617
+ font-size: 10px;
2618
+ }
2619
+
2620
+ .styles-module__toolName___yBXu6 {
2621
+ white-space: nowrap;
2622
+ }
2623
+
2624
+ .styles-module__typing___SxFST {
2625
+ display: flex;
2626
+ gap: 4px;
2627
+ padding: 4px 0;
2628
+ }
2629
+ .styles-module__typing___SxFST span {
2630
+ width: 6px;
2631
+ height: 6px;
2632
+ border-radius: 50%;
2633
+ background: #9ca3af;
2634
+ animation: styles-module__typingDot___-XQcu 1.2s infinite;
2635
+ }
2636
+ .styles-module__typing___SxFST span:nth-child(2) {
2637
+ animation-delay: 0.2s;
2638
+ }
2639
+ .styles-module__typing___SxFST span:nth-child(3) {
2640
+ animation-delay: 0.4s;
2641
+ }
2642
+
2643
+ .styles-module__inputArea___ySM3W {
2644
+ display: flex;
2645
+ align-items: flex-end;
2646
+ gap: 8px;
2647
+ padding: 12px 16px;
2648
+ border-top: 1px solid #e5e7eb;
2649
+ background: #fff;
2650
+ flex-shrink: 0;
2651
+ }
2652
+
2653
+ .styles-module__input___UnN4A {
2654
+ flex: 1;
2655
+ border: 1px solid #e5e7eb;
2656
+ border-radius: 12px;
2657
+ padding: 10px 14px;
2658
+ font-size: 13px;
2659
+ font-family: inherit;
2660
+ color: #1a1a1a;
2661
+ resize: none;
2662
+ outline: none;
2663
+ min-height: 20px;
2664
+ max-height: 120px;
2665
+ line-height: 1.5;
2666
+ transition: border-color 0.12s;
2667
+ }
2668
+ .styles-module__input___UnN4A:focus {
2669
+ border-color: #6366f1;
2670
+ }
2671
+ .styles-module__input___UnN4A::placeholder {
2672
+ color: #9ca3af;
2673
+ }
2674
+ .styles-module__input___UnN4A:disabled {
2675
+ opacity: 0.6;
2676
+ }
2677
+
2678
+ .styles-module__sendBtn___WLa8O {
2679
+ width: 36px;
2680
+ height: 36px;
2681
+ border: none;
2682
+ background: #e5e7eb;
2683
+ cursor: pointer;
2684
+ display: flex;
2685
+ align-items: center;
2686
+ justify-content: center;
2687
+ border-radius: 10px;
2688
+ color: #9ca3af;
2689
+ transition: background 0.12s, color 0.12s;
2690
+ flex-shrink: 0;
2691
+ }
2692
+ .styles-module__sendBtn___WLa8O.styles-module__active___SooZB {
2693
+ background: #6366f1;
2694
+ color: #fff;
2695
+ }
2696
+ .styles-module__sendBtn___WLa8O:disabled {
2697
+ 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 {
2384
2702
  from {
2385
2703
  opacity: 0;
2386
2704
  transform: translateY(8px) scale(0.96);
@@ -2509,7 +2827,7 @@ ${n.stack?.split(`
2509
2827
  .styles-module__colorBtn___N7dGu.styles-module__selected___0tVDH {
2510
2828
  border-color: #18181b;
2511
2829
  transform: scale(1.15);
2512
- }`,Ps={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=Fs}var z=Ps;import{jsx as te,jsxs as De}from"react/jsx-runtime";function Ho({settings:e,onChange:n,onClose:o}){let t=Qn(()=>{n({...e,markersVisible:!e.markersVisible})},[e,n]),r=Qn(()=>{n({...e,hideDoneMarkers:!e.hideDoneMarkers})},[e,n]),s=Qn(()=>{n({...e,showOnlyMine:!e.showOnlyMine})},[e,n]),a=Qn(i=>{n({...e,markerColor:i})},[e,n]);return typeof document>"u"?null:As(De("div",{"data-impakers-debug":"",children:[te("div",{className:z.backdrop,onClick:o}),De("div",{className:z.panel,"data-impakers-debug":"",children:[De("div",{className:z.header,children:[te("span",{className:z.title,children:"\uC124\uC815"}),te("button",{className:z.closeBtn,onClick:o,type:"button",children:te("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:te("path",{d:"M18 6L6 18M6 6l12 12"})})})]}),De("div",{className:z.body,children:[De("div",{className:z.field,children:[te("div",{className:z.fieldLabel,children:"\uB9C8\uCEE4 \uD45C\uC2DC"}),te("button",{className:`${z.toggle} ${e.markersVisible?z.on:""}`,onClick:t,type:"button",children:te("span",{className:z.toggleThumb})})]}),De("div",{className:z.field,children:[te("div",{className:z.fieldLabel,children:"\uC644\uB8CC \uD540 \uC228\uAE30\uAE30"}),te("button",{className:`${z.toggle} ${e.hideDoneMarkers?z.on:""}`,onClick:r,type:"button",children:te("span",{className:z.toggleThumb})})]}),De("div",{className:z.field,children:[te("div",{className:z.fieldLabel,children:"\uB0B4\uAC00 \uCD94\uAC00\uD55C \uAC83\uB9CC"}),te("button",{className:`${z.toggle} ${e.showOnlyMine?z.on:""}`,onClick:s,type:"button",children:te("span",{className:z.toggleThumb})})]}),De("div",{className:z.field,children:[te("div",{className:z.fieldLabel,children:"\uB9C8\uCEE4 \uC0C9\uC0C1"}),te("div",{className:z.colors,children:$o.map(i=>te("button",{className:`${z.colorBtn} ${e.markerColor===i.value?z.selected:""}`,style:{background:i.value},onClick:()=>a(i.value),title:i.label,type:"button"},i.id))})]})]})]})]}),document.body)}var $s=`.styles-module__markersLayer___VR1cD svg[fill=none],
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],
2513
2831
  .styles-module__fixedMarkersLayer___wBuxm svg[fill=none] {
2514
2832
  fill: none !important;
2515
2833
  }
@@ -2834,5 +3152,5 @@ html.impakers-selecting {
2834
3152
  }
2835
3153
  html.impakers-selecting * {
2836
3154
  cursor: crosshair !important;
2837
- }`,Hs={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=$s}var X=Hs;import{Fragment as Zs,jsx as M,jsxs as we}from"react/jsx-runtime";function xt(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 Ds(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 Bo(e){let{name:n,path:o}=ot(e),t=no(e,{mode:"filtered"});return{name:t.path?`${t.path} ${n}`:n,elementName:n,path:o,reactComponents:t.path}}function js(e){let n=gn(e),o=n.found?n:st(e);if(o.found&&o.source)return Hn(o.source,"path")}function Ws(e){let n=gn(e),o=n.found?n:st(e);return o.found&&o.sourceCandidates&&o.sourceCandidates.length>0?o.sourceCandidates.map(t=>Hn(t,"path")):o.found&&o.source?[Hn(o.source,"path")]:[]}function Os(e,n){let o=e.match(/^(.+):(\d+)(?::(\d+))?$/);if(!o)return null;let[,t,r,s]=o,a=Number.parseInt(r,10),i=s?Number.parseInt(s,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 Vs="impakers-debug-markers-";function vt(){return Vs+window.location.pathname}function kt(){try{let e=localStorage.getItem(vt());return e?JSON.parse(e):[]}catch{return[]}}function zo(e){try{e.length===0?localStorage.removeItem(vt()):localStorage.setItem(vt(),JSON.stringify(e))}catch{}}function Ks(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 Do({endpoint:e,getUser:n,onHide:o}){let[t,r]=W(!1),[s,a]=W(()=>kt()),[i,_]=W(null),[b,h]=W(!1),[x,k]=W(null),[A,R]=W({x:0,y:0}),[H,j]=W(new Set),[oe,de]=W(!1),[ee,T]=W(null),[L,Z]=W(null),[y,P]=W(!1),[N,ce]=W(null),[E,V]=W(null),[re,pe]=W({}),[Se,fe]=W(!1),[se,f]=W([]),[g,O]=W([]),[ie,Fe]=W(!1),[Ee,Pe]=W(!1),[I,be]=W(()=>Po()),[xe,m]=W(()=>window.location.pathname),[U,Ae]=W(!1),[ke,Ln]=W(0),[Nt,Nn]=W(null),En=Sn(null),Et=Sn(null),Tt=Sn(null),rn=Sn(!1),Rt=he(()=>{Nn(3);let d=3,c=()=>{d-=1,d<=0?(Nn(null),r(!0),document.documentElement.classList.add("impakers-selecting")):(Nn(d),En.current=setTimeout(c,1e3))};En.current=setTimeout(c,1e3)},[]),Oo=he(d=>{d==="comment"?It():d==="delay-capture"?Rt():d==="inbox"?(Fe(!0),_o(e,{staleWhileRevalidate:!0}).then(O).catch(()=>{}),t&&(r(!1),document.documentElement.classList.remove("impakers-selecting"),k(null),_(null))):d==="settings"&&Pe(!0)},[t,Rt]),Vo=he(d=>{be(d),Ao(d)},[]),It=he(()=>{r(d=>{let c=!d;return c?document.documentElement.classList.add("impakers-selecting"):(document.documentElement.classList.remove("impakers-selecting"),k(null),_(null)),c})},[]);Ne(()=>()=>{document.documentElement.classList.remove("impakers-selecting")},[]),Ne(()=>{a(kt());let d=()=>{m(window.location.pathname),a(kt()),_(null),k(null)};window.addEventListener("popstate",d);let c=history.pushState.bind(history);return history.pushState=(...B)=>{c(...B),setTimeout(d,50)},()=>{window.removeEventListener("popstate",d),history.pushState=c}},[]),Ne(()=>{let d=$e(xe),c=qe(d);c&&(f(c),Ae(!0));let B=kn(d,w=>{f(w),Ae(!0)});return mo(e,xe,{staleWhileRevalidate:!0}).then(w=>{f(w),Ae(!0)}).catch(()=>{}),B},[e,xe]);let Mt="impakers-debug-history-last-seen";Ne(()=>{let d=localStorage.getItem(Mt)||new Date(0).toISOString();Kn(e,{since:d,limit:100}).then(c=>Ln(c.length)).catch(()=>{})},[e]);let Ko=he(()=>{localStorage.setItem(Mt,new Date().toISOString()),Ln(0)},[]);Ne(()=>{if(!U)return;let d=se.map(Ks).filter(c=>c!==null);a(d),zo(d)},[se,U]);let Ft=Sn(!0);Ne(()=>{if(Ft.current){Ft.current=!1;return}zo(s)},[s]),Ne(()=>{let d=c=>{if(c.key==="Escape"){if(ie){Fe(!1);return}if(i){c.preventDefault(),h(!0),ue(()=>{_(null),h(!1)},150);return}t&&(c.preventDefault(),r(!1),document.documentElement.classList.remove("impakers-selecting"),k(null))}};return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[ie,i,t]),Ne(()=>{if(!t||i)return;let d=c=>{let B=c.composedPath()[0]||c.target;if(Oe(B,"[data-impakers-debug]")){k(null);return}let w=xt(c.clientX,c.clientY);if(!w||Oe(w,"[data-impakers-debug]")){k(null);return}let{name:q,elementName:me,path:ae,reactComponents:K}=Bo(w),v=w.getBoundingClientRect();k({element:q,elementName:me,elementPath:ae,rect:v,reactComponents:K}),R({x:c.clientX,y:c.clientY})};return document.addEventListener("mousemove",d),()=>document.removeEventListener("mousemove",d)},[t,i]),Ne(()=>{if(!t)return;let d=c=>{if(rn.current)return;let B=c.composedPath()[0]||c.target;if(Oe(B,"[data-impakers-debug]")||Oe(B,"[data-annotation-popup]")||Oe(B,"[data-annotation-marker]"))return;if(i){c.preventDefault(),c.stopPropagation(),Et.current?.shake();return}c.preventDefault(),c.stopPropagation();let w=xt(c.clientX,c.clientY);if(!w)return;let{name:q,path:me,reactComponents:ae}=Bo(w),K=w.getBoundingClientRect(),v=c.clientX/window.innerWidth*100,Y=Ds(w),Rn=Y?c.clientY:c.clientY+window.scrollY,dn=window.getSelection(),Ze;dn&&dn.toString().trim().length>0&&(Ze=dn.toString().trim().slice(0,500));let D=Yt(w),ge=Qt(w);_({x:v,y:Rn,clientY:c.clientY,element:q,elementPath:me,selectedText:Ze,boundingBox:{x:K.left,y:Y?K.top:K.top+window.scrollY,width:K.width,height:K.height},nearbyText:Zt(w),cssClasses:Ut(w),isFixed:Y,fullPath:Jt(w),accessibility:qt(w),computedStyles:ge,computedStylesObj:D,reactComponents:ae??void 0,sourceFile:js(w),targetElement:w}),k(null);let In=Ws(w).filter(cn=>cn.includes("/chunks/"));In.length>0&&(async()=>{for(let cn of In)try{let Mn=await ut(cn);if(Mn){_(Jn=>Jn&&{...Jn,resolvedSource:`${Mn.source}:${Mn.line}`,resolvedName:Mn.name??void 0});break}}catch{}})()};return document.addEventListener("click",d,!0),()=>document.removeEventListener("click",d,!0)},[t,i]);let sn=he(d=>{ce(d),ue(()=>ce(null),4e3)},[]),Zo=he(async d=>{if(!(!i||oe)){de(!0);try{let c=so(n),B=await to(),w=i.resolvedSource||i.sourceFile||"",q=i.resolvedName||null;if(!i.resolvedSource&&i.sourceFile?.includes("/chunks/"))try{let D=await ut(i.sourceFile);D&&(w=`${D.source}:${D.line}:${D.column}`,q=D.name)}catch{}let me=await ao(window.location.pathname),ae=w&&!w.includes("/chunks/")?Os(w,q):null,K=lo(ae?[ae]:void 0,me?.targets);K.length>0&&(c.debugTargets=K),me?.context&&(c.routeDebug=me.context);let v=[];v.push(`## \uD53C\uB4DC\uBC31 ${d}`),K.length>0&&(v.push(""),v.push("---"),v.push(""),v.push("**\uB514\uBC84\uAE45 \uD0C0\uAC9F \uD30C\uC77C**:"),K.forEach(D=>{let ge=D.line?`:${D.line}${typeof D.column=="number"?`:${D.column}`:""}`:"";v.push(`- [${D.kind}] \`${D.file}${ge}\` (${D.reason})`)}));let Y=[];if(i.element&&Y.push(`**\uC120\uD0DD\uB41C \uC694\uC18C**: ${i.element}`),i.elementPath&&Y.push(`**DOM \uACBD\uB85C**: \`${i.elementPath}\``),i.selectedText&&Y.push(`**\uC120\uD0DD\uB41C \uD14D\uC2A4\uD2B8**: "${i.selectedText}"`),i.reactComponents?.trim()?Y.push(`**React \uCEF4\uD3EC\uB10C\uD2B8**: ${i.reactComponents}`):q&&Y.push(`**\uCEF4\uD3EC\uB10C\uD2B8/\uD568\uC218**: ${q}`),w&&!w.includes("/chunks/")&&Y.push(`**\uC18C\uC2A4 \uD30C\uC77C**: \`${w}\``),i.cssClasses&&Y.push(`**CSS \uD074\uB798\uC2A4**: \`${i.cssClasses}\``),i.nearbyText&&Y.push(`**\uC8FC\uBCC0 \uD14D\uC2A4\uD2B8**: ${i.nearbyText}`),i.accessibility&&Y.push(`**\uC811\uADFC\uC131**: ${i.accessibility}`),Y.length>0&&(v.push(""),v.push("---"),v.push(""),Y.forEach(D=>v.push(D))),c.consoleErrors?.length&&(v.push(""),v.push("---"),v.push(""),v.push("**\uCD5C\uADFC \uCF58\uC194 \uC5D0\uB7EC**:"),c.consoleErrors.slice(-10).forEach(D=>v.push(`- \`${D.slice(0,200)}\``))),c.consoleLogs?.length){let D=c.consoleLogs.filter(ge=>ge.level==="error"||ge.level==="warn").slice(-10);D.length>0&&(v.push(""),v.push("**\uCD5C\uADFC \uCF58\uC194 \uB85C\uADF8**:"),D.forEach(ge=>v.push(`- [${ge.level}] \`${ge.message.slice(0,200)}\``)))}if(v.push(""),v.push("---"),v.push(""),v.push("## \uD658\uACBD \uC815\uBCF4"),v.push(""),v.push(`- **URL**: ${c.url}`),v.push(`- **\uC2DC\uC810**: ${new Date(c.timestamp).toLocaleString("ko-KR")}`),v.push(`- **\uBE0C\uB77C\uC6B0\uC800**: ${c.browser}`),v.push(`- **\uD654\uBA74**: ${c.viewport} (@${c.pixelRatio}x)`),v.push(`- **\uC5B8\uC5B4**: ${c.language}`),c.user?.name&&v.push(`- **\uC0AC\uC6A9\uC790**: ${c.user.name}`),c.performance&&Object.keys(c.performance).length>0){v.push(""),v.push("---"),v.push(""),v.push("## \uC131\uB2A5"),v.push(""),v.push("| \uD56D\uBAA9 | \uAC12 |"),v.push("|------|-----|");let D={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[ge,Bt]of Object.entries(c.performance)){let In=D[ge]||ge,cn=ge.includes("Heap")?"MB":"ms";v.push(`| ${In} | ${Bt}${cn} |`)}}let Rn=v.join(`
2838
- `),dn=await uo(e,{title:d.slice(0,100),description:"",priority:"medium",metadata:c,debugInfo:Rn,debug_info:Rn,screenshot:B,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});P(!0),ue(()=>P(!1),3e3);let Ze=dn.taskId||null;Tt.current=Ze,ue(()=>{Tt.current=null},300),ue(()=>{Ze&&j(D=>new Set(D).add(Ze))},250),h(!0),ue(()=>{_(null),h(!1),r(!1),document.documentElement.classList.remove("impakers-selecting"),rn.current=!0,setTimeout(()=>{rn.current=!1},300)},150),window.getSelection()?.removeAllRanges()}catch(c){let B=c?.message||"\uD53C\uB4DC\uBC31 \uC804\uC1A1 \uC2E4\uD328";sn(B),console.error("[@impakers/debug] \uD53C\uB4DC\uBC31 \uC804\uC1A1 \uC2E4\uD328:",c)}finally{de(!1)}}},[i,oe,e,n,sn]),Uo=he(()=>{h(!0),ue(()=>{_(null),h(!1),r(!1),document.documentElement.classList.remove("impakers-selecting"),rn.current=!0,setTimeout(()=>{rn.current=!1},300)},150)},[]),Pt=he(d=>{let c=d.id;V(B=>B===c?null:c)},[]);Ne(()=>{if(!E)return;let d=Be(E),c=qe(d);c?(pe(w=>({...w,[E]:c})),fe(!1)):fe(!0);let B=kn(d,w=>{pe(q=>({...q,[E]:w})),fe(!1)});return Wn(e,E,{staleWhileRevalidate:!0}).then(()=>fe(!1)).catch(()=>fe(!1)),B},[E,e]);let Xo=he(async(d,c,B,w)=>{let q=n?.()?.name?String(n().name):"\uC775\uBA85",me=n?.()?.id?String(n().id):void 0;try{let ae;if(w)try{ae=await Vn(e,w,"comment",d)}catch(K){let v=K?.message||"\uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328";sn(v),console.error("[@impakers/debug] \uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328:",K)}await On(e,d,c,q,me,B,ae)}catch(ae){let K=ae?.message||"\uCF54\uBA58\uD2B8 \uC804\uC1A1 \uC2E4\uD328";sn(K),console.error("[@impakers/debug] \uCF54\uBA58\uD2B8 \uC804\uC1A1 \uC2E4\uD328:",ae)}},[n,e,sn]),Yo=he(()=>{V(null)},[]),Tn=he(d=>{if(!d){T(null),Z(null);return}if(T(d.id),d.boundingBox){let c=d.boundingBox,B=c.x+c.width/2,w=d.isFixed?c.y+c.height/2:c.y+c.height/2-window.scrollY,q=xt(B,w);if(q){let me=q.getBoundingClientRect(),ae=me.width/c.width,K=me.height/c.height;if(ae>=.5&&K>=.5){Z(q);return}}}Z(null)},[]),Qo=he(()=>{if(!i)return{left:0,top:0};let d=i.x/100*window.innerWidth,c=i.isFixed?i.y:i.y-window.scrollY,B=Math.max(160,Math.min(window.innerWidth-160,d));return c>window.innerHeight-290?{left:B,bottom:window.innerHeight-c+20}:{left:B,top:c+20}},[i]);if(typeof document>"u")return null;let an=Qo(),ln=L?.getBoundingClientRect(),qo=[{id:"comment",label:"\uD53C\uB4DC\uBC31",active:t,icon:M("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",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"})})},{id:"delay-capture",label:"\uB51C\uB808\uC774 \uCEA1\uCC98",icon:we("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[M("circle",{cx:"12",cy:"12",r:"10"}),M("polyline",{points:"12 6 12 12 16 14"})]})},{id:"inbox",label:"Inbox",badge:ke||void 0,icon:we("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[M("polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12"}),M("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:we("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[M("circle",{cx:"12",cy:"12",r:"3"}),M("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"})]})}],At=xe,qn=n?.()?.name?String(n().name):null,$t=Bs(()=>s.filter(d=>{let c=se.find(B=>B.id===d.id);return!(I.hideDoneMarkers&&(d.status==="done"||d.status==="resolved")||I.showOnlyMine&&c?.authorName&&qn&&c.authorName!==qn)}),[s,se,I.hideDoneMarkers,I.showOnlyMine,qn]),Ht=(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}),Jo=se.map(d=>Ht(d,At)),Go=g.map(d=>Ht(d,""));return zs(we("div",{"data-impakers-debug":"",children:[M(No,{items:qo,onSelect:Oo,onHide:o,onDoubleTap:It}),ie&&M(Mo,{pageItems:Jo,allItems:Go,currentPath:At,serviceName:Dt()||void 0,endpoint:e,currentUserName:n?.()?.name?String(n().name):"\uC775\uBA85",currentUserId:n?.()?.id?String(n().id):void 0,onClose:()=>Fe(!1),onHistoryViewed:Ko,newNotiCount:ke}),Ee&&M(Ho,{settings:I,onChange:Vo,onClose:()=>Pe(!1)}),t&&we(Zs,{children:[x?.rect&&!i&&M("div",{className:`${X.hoverHighlight} ${X.enter}`,style:{left:x.rect.left,top:x.rect.top,width:x.rect.width,height:x.rect.height}}),x&&!i&&we("div",{className:`${X.hoverTooltip} ${X.enter}`,style:{left:Math.min(A.x+14,window.innerWidth-200),top:A.y+14},children:[x.reactComponents&&M("div",{className:X.hoverReactPath,children:x.reactComponents}),M("div",{className:X.hoverElementName,children:x.elementName})]}),ln&&ee&&M("div",{className:`${X.singleSelectOutline} ${X.enter}`,style:{left:ln.left,top:ln.top,width:ln.width,height:ln.height}}),i?.targetElement&&(()=>{let d=i.targetElement.getBoundingClientRect();return M("div",{className:`${X.singleSelectOutline} ${X.enter}`,style:{left:d.left,top:d.top,width:d.width,height:d.height}})})()]}),M("div",{className:X.markersLayer,"data-impakers-debug":"",style:{display:I.markersVisible?void 0:"none"},children:$t.filter(d=>!d.isFixed).map((d,c)=>M(_t,{annotation:d,layerIndex:c,isAnimated:H.has(d.id),isHovered:ee===d.id,isDeleting:!1,markerClickBehavior:"edit",accentColor:I.markerColor,onHover:()=>Tn(d),onHoverEnd:()=>Tn(null),onClick:()=>Pt(d),onContextMenu:()=>{}},d.id))}),we("div",{className:X.fixedMarkersLayer,"data-impakers-debug":"",style:{display:I.markersVisible?void 0:"none"},children:[$t.filter(d=>d.isFixed).map((d,c)=>M(_t,{annotation:d,layerIndex:c,isAnimated:H.has(d.id),isHovered:ee===d.id,isDeleting:!1,markerClickBehavior:"edit",accentColor:I.markerColor,onHover:()=>Tn(d),onHoverEnd:()=>Tn(null),onClick:()=>Pt(d),onContextMenu:()=>{}},d.id)),i&&M(yo,{x:i.x,y:i.clientY,isMultiSelect:!1,accentColor:I.markerColor})]}),i&&M(Kt,{ref:Et,element:i.resolvedSource||i.resolvedName||i.element,selectedText:i.selectedText,isExiting:b,style:{position:"fixed",left:an.left,..."top"in an?{top:an.top}:{},..."bottom"in an?{bottom:an.bottom}:{},transform:"translateX(-50%)",zIndex:100001},onSubmit:Zo,onCancel:Uo}),E&&(()=>{let d=s.find(Y=>Y.id===E),c=se.find(Y=>Y.id===E);if(!d)return null;let B=d.x/100*window.innerWidth,w=d.isFixed?d.y:d.y-window.scrollY,q=Math.max(10,Math.min(B+20,window.innerWidth-360)),me=window.innerHeight-w,ae=w,K=me>=300?Math.min(w,window.innerHeight-60):Math.max(10,w-Math.min(480,ae-10)),v={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:re[d.id]||[]};return M(Lo,{task:v,currentUserName:n?.()?.name?String(n().name):"\uC775\uBA85",currentUserId:n?.()?.id?String(n().id):void 0,left:q,top:K,loading:Se,onClose:Yo,onReply:Xo})})(),Nt!==null&&we("div",{className:X.countdownOverlay,"data-impakers-debug":"",children:[M("div",{className:X.countdownNumber,children:Nt}),M("div",{className:X.countdownLabel,children:"\uD53C\uB4DC\uBC31 \uBAA8\uB4DC \uD65C\uC131\uD654\uAE4C\uC9C0..."}),M("button",{className:X.countdownCancel,onClick:()=>{En.current&&clearTimeout(En.current),Nn(null)},type:"button",children:"\uCDE8\uC18C"})]}),y&&we("div",{className:X.toast,"data-impakers-debug":"",children:[M("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#16a34a",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:M("polyline",{points:"20 6 9 17 4 12"})}),M("span",{children:"\uD0DC\uC2A4\uD06C \uC0DD\uC131\uC774 \uC644\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4"})]}),N&&we("div",{className:`${X.toast} ${X.toastError}`,"data-impakers-debug":"",children:[we("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#ef4444",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[M("circle",{cx:"12",cy:"12",r:"10"}),M("line",{x1:"15",y1:"9",x2:"9",y2:"15"}),M("line",{x1:"9",y1:"9",x2:"15",y2:"15"})]}),M("span",{children:N})]})]}),document.body)}import{useState as Ct,useCallback as Us}from"react";import{createPortal as Xs}from"react-dom";import{jsx as Me,jsxs as on}from"react/jsx-runtime";function jo({endpoint:e,onSuccess:n,onClose:o}){let[t,r]=Ct(""),[s,a]=Ct(!1),[i,_]=Ct(null),b=Us(async h=>{if(h.preventDefault(),!(!t.trim()||s)){a(!0),_(null);try{let x=await jt(e,t.trim().toUpperCase());n(x.serviceName)}catch(x){_(x instanceof Error?x.message:"\uC778\uC99D \uC2E4\uD328")}finally{a(!1)}}},[t,e,s,n]);return typeof document>"u"?null:Xs(on("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:[Me("div",{onClick:o,style:{position:"absolute",inset:0,background:"rgba(0, 0, 0, 0.4)"}}),on("div",{style:{position:"relative",width:360,background:"white",borderRadius:12,boxShadow:"0 16px 48px rgba(0,0,0,0.16)",overflow:"hidden"},children:[on("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"16px 20px",borderBottom:"1px solid #e5e5e5"},children:[Me("h3",{style:{fontSize:15,fontWeight:600,color:"#18181b",margin:0},children:"\uD53C\uB4DC\uBC31 \uC704\uC82F \uC778\uC99D"}),Me("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:Me("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:Me("path",{d:"M18 6L6 18M6 6l12 12"})})})]}),on("div",{style:{padding:20},children:[on("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.",Me("br",{}),"\uCF54\uB4DC\uB294 \uC784\uD328\uCEE4\uC2A4 OS\uC5D0\uC11C \uD655\uC778\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."]}),i&&Me("div",{style:{background:"#fef2f2",border:"1px solid #fecaca",color:"#dc2626",padding:"8px 12px",borderRadius:8,fontSize:13,marginBottom:12},children:i}),on("form",{onSubmit:b,children:[Me("input",{type:"text",maxLength:6,placeholder:"A3F9K2",value:t,onChange:h=>r(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"}}),Me("button",{type:"submit",disabled:t.trim().length<6||s,style:{width:"100%",marginTop:16,padding:"10px 16px",border:"none",borderRadius:8,fontSize:14,fontWeight:500,cursor:t.trim().length<6||s?"not-allowed":"pointer",background:t.trim().length<6||s?"#a1a1aa":"#18181b",color:"white",fontFamily:"inherit"},children:s?"\uC778\uC99D \uC911...":"\uC778\uC99D\uD558\uAE30"})]})]})]})]}),document.body)}import{Fragment as Ys,jsx as Wo,jsxs as Qs}from"react/jsx-runtime";function el({endpoint:e,getUser:n}){let[o,t]=St(!1),[r,s]=St(!1),[a,i]=St(()=>{try{return localStorage.getItem("impakers-debug-hidden")==="1"}catch{return!1}});wt(()=>{t(Ue())},[]),wt(()=>{let x=[je._on("impakers-debug:show-auth",()=>{s(!0),i(!1);try{localStorage.removeItem("impakers-debug-hidden")}catch{}}),je._on("impakers-debug:open",()=>{i(!1);try{localStorage.removeItem("impakers-debug-hidden")}catch{}}),je._on("impakers-debug:deactivate",()=>{t(!1),s(!1)})];return()=>x.forEach(k=>k())},[]),wt(()=>{function x(k){if((k.ctrlKey||k.metaKey)&&k.shiftKey&&(k.key==="."||k.key===">"||k.code==="Period")){if(k.preventDefault(),a){i(!1);try{localStorage.removeItem("impakers-debug-hidden")}catch{}return}Ue()?t(!0):s(A=>!A)}}return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[a]);let _=Lt(x=>{t(!0),s(!1)},[]),b=Lt(()=>{s(!1)},[]),h=Lt(()=>{i(!0);try{localStorage.setItem("impakers-debug-hidden","1")}catch{}},[]);return Qs(Ys,{children:[o&&!a&&Wo(Do,{endpoint:e,getUser:n,onHide:h}),r&&!o&&Wo(jo,{endpoint:e,onSuccess:_,onClose:b})]})}export{je as ImpakersDebug,el as ImpakersDebugProvider};
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};