@impakers/debug 1.4.22 → 1.5.1

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.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- "use strict";"use client";var Fo=Object.create;var Ln=Object.defineProperty;var Po=Object.getOwnPropertyDescriptor;var Ao=Object.getOwnPropertyNames;var $o=Object.getPrototypeOf,Ho=Object.prototype.hasOwnProperty;var Bo=(e,n)=>{for(var t in n)Ln(e,t,{get:n[t],enumerable:!0})},kt=(e,n,t,o)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of Ao(n))!Ho.call(e,r)&&r!==t&&Ln(e,r,{get:()=>n[r],enumerable:!(o=Po(n,r))||o.enumerable});return e};var On=(e,n,t)=>(t=e!=null?Fo($o(e)):{},kt(n||!e||!e.__esModule?Ln(t,"default",{value:e,enumerable:!0}):t,e)),zo=e=>kt(Ln({},"__esModule",{value:!0}),e);var vs={};Bo(vs,{ImpakersDebug:()=>He,ImpakersDebugProvider:()=>ks});module.exports=zo(vs);var ve=require("react");var vt="impakers-debug-token",Nn="impakers-debug-token-data";function Vn(){if(typeof window>"u")return null;try{let e=localStorage.getItem(Nn);if(!e)return null;let n=JSON.parse(e);return new Date(n.expiresAt)<new Date?(Kn(),null):n.token}catch{return null}}function Ke(){return Vn()!==null}function Ct(){if(typeof window>"u")return null;try{let e=localStorage.getItem(Nn);return e?JSON.parse(e).serviceName:null}catch{return null}}function Do(e){if(!(typeof window>"u"))try{let n={token:e.token,serviceName:e.serviceName,expiresAt:e.expiresAt};localStorage.setItem(Nn,JSON.stringify(n)),localStorage.setItem(vt,e.token)}catch{}}function Kn(){if(!(typeof window>"u"))try{localStorage.removeItem(Nn),localStorage.removeItem(vt)}catch{}}async function wt(e,n){let t=window.location.hostname,o=await fetch(`${e}/auth`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:n,domain:t})});if(!o.ok){let s=await o.json().catch(()=>({message:"\uC778\uC99D \uC2E4\uD328"}));throw new Error(s.message||"\uC778\uC99D \uC2E4\uD328")}let r=await o.json();return Do(r),r}var Me=class Me{static showAuth(){Me._eventTarget?.dispatchEvent(new CustomEvent("impakers-debug:show-auth"))}static isActive(){return Ke()}static deactivate(){Kn(),Me._eventTarget?.dispatchEvent(new CustomEvent("impakers-debug:deactivate"))}static open(){if(!Ke()){Me.showAuth();return}Me._eventTarget?.dispatchEvent(new CustomEvent("impakers-debug:open"))}static _on(n,t){return Me._eventTarget?.addEventListener(n,t),()=>Me._eventTarget?.removeEventListener(n,t)}};Me._eventTarget=typeof EventTarget<"u"?new EventTarget:null;var He=Me;var f=require("react"),yo=require("react-dom");var U=require("react");var jo=`.styles-module__popup___IhzrD svg[fill=none] {
2
+ "use strict";"use client";var Do=Object.create;var En=Object.defineProperty;var jo=Object.getOwnPropertyDescriptor;var Wo=Object.getOwnPropertyNames;var Oo=Object.getPrototypeOf,Vo=Object.prototype.hasOwnProperty;var Zo=(e,n)=>{for(var t in n)En(e,t,{get:n[t],enumerable:!0})},Lt=(e,n,t,o)=>{if(n&&typeof n=="object"||typeof n=="function")for(let s of Wo(n))!Vo.call(e,s)&&s!==t&&En(e,s,{get:()=>n[s],enumerable:!(o=jo(n,s))||o.enumerable});return e};var Un=(e,n,t)=>(t=e!=null?Do(Oo(e)):{},Lt(n||!e||!e.__esModule?En(t,"default",{value:e,enumerable:!0}):t,e)),Ko=e=>Lt(En({},"__esModule",{value:!0}),e);var Mr={};Zo(Mr,{ImpakersDebug:()=>ze,ImpakersDebugProvider:()=>Rr});module.exports=Ko(Mr);var Ee=require("react");var Nt="impakers-debug-token",Rn="impakers-debug-token-data";function dn(){if(typeof window>"u")return null;try{let e=localStorage.getItem(Rn);if(!e)return null;let n=JSON.parse(e);return new Date(n.expiresAt)<new Date?(Xn(),null):n.token}catch{return null}}function Xe(){return dn()!==null}function Tt(){if(typeof window>"u")return null;try{let e=localStorage.getItem(Rn);return e?JSON.parse(e).serviceName:null}catch{return null}}function Uo(e){if(!(typeof window>"u"))try{let n={token:e.token,serviceName:e.serviceName,expiresAt:e.expiresAt};localStorage.setItem(Rn,JSON.stringify(n)),localStorage.setItem(Nt,e.token)}catch{}}function Xn(){if(!(typeof window>"u"))try{localStorage.removeItem(Rn),localStorage.removeItem(Nt)}catch{}}async function It(e,n){let t=window.location.hostname,o=await fetch(`${e}/auth`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:n,domain:t})});if(!o.ok){let r=await o.json().catch(()=>({message:"\uC778\uC99D \uC2E4\uD328"}));throw new Error(r.message||"\uC778\uC99D \uC2E4\uD328")}let s=await o.json();return Uo(s),s}var He=class He{static showAuth(){He._eventTarget?.dispatchEvent(new CustomEvent("impakers-debug:show-auth"))}static isActive(){return Xe()}static deactivate(){Xn(),He._eventTarget?.dispatchEvent(new CustomEvent("impakers-debug:deactivate"))}static open(){if(!Xe()){He.showAuth();return}He._eventTarget?.dispatchEvent(new CustomEvent("impakers-debug:open"))}static _on(n,t){return He._eventTarget?.addEventListener(n,t),()=>He._eventTarget?.removeEventListener(n,t)}};He._eventTarget=typeof EventTarget<"u"?new EventTarget:null;var ze=He;var g=require("react"),So=require("react-dom");var ee=require("react");var Xo=`.styles-module__popup___IhzrD svg[fill=none] {
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
- }`,Wo={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=jo}var $=Wo;var En=require("react/jsx-runtime");var St=({size:e=24})=>(0,En.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,En.jsx)("path",{d:"M13.5 4C14.7426 4 15.75 5.00736 15.75 6.25V7H18.5C18.9142 7 19.25 7.33579 19.25 7.75C19.25 8.16421 18.9142 8.5 18.5 8.5H17.9678L17.6328 16.2217C17.61 16.7475 17.5912 17.1861 17.5469 17.543C17.5015 17.9087 17.4225 18.2506 17.2461 18.5723C16.9747 19.0671 16.5579 19.4671 16.0518 19.7168C15.7227 19.8791 15.3772 19.9422 15.0098 19.9717C14.6514 20.0004 14.2126 20 13.6865 20H10.3135C9.78735 20 9.34856 20.0004 8.99023 19.9717C8.62278 19.9422 8.27729 19.8791 7.94824 19.7168C7.44205 19.4671 7.02532 19.0671 6.75391 18.5723C6.57751 18.2506 6.49853 17.9087 6.45312 17.543C6.40883 17.1861 6.39005 16.7475 6.36719 16.2217L6.03223 8.5H5.5C5.08579 8.5 4.75 8.16421 4.75 7.75C4.75 7.33579 5.08579 7 5.5 7H8.25V6.25C8.25 5.00736 9.25736 4 10.5 4H13.5ZM7.86621 16.1562C7.89013 16.7063 7.90624 17.0751 7.94141 17.3584C7.97545 17.6326 8.02151 17.7644 8.06934 17.8516C8.19271 18.0763 8.38239 18.2577 8.6123 18.3711C8.70153 18.4151 8.83504 18.4545 9.11035 18.4766C9.39482 18.4994 9.76335 18.5 10.3135 18.5H13.6865C14.2367 18.5 14.6052 18.4994 14.8896 18.4766C15.165 18.4545 15.2985 18.4151 15.3877 18.3711C15.6176 18.2577 15.8073 18.0763 15.9307 17.8516C15.9785 17.7644 16.0245 17.6326 16.0586 17.3584C16.0938 17.0751 16.1099 16.7063 16.1338 16.1562L16.4668 8.5H7.5332L7.86621 16.1562ZM9.97656 10.75C10.3906 10.7371 10.7371 11.0626 10.75 11.4766L10.875 15.4766C10.8879 15.8906 10.5624 16.2371 10.1484 16.25C9.73443 16.2629 9.38794 15.9374 9.375 15.5234L9.25 11.5234C9.23706 11.1094 9.56255 10.7629 9.97656 10.75ZM14.0244 10.75C14.4383 10.7635 14.7635 11.1105 14.75 11.5244L14.6201 15.5244C14.6066 15.9384 14.2596 16.2634 13.8457 16.25C13.4317 16.2365 13.1067 15.8896 13.1201 15.4756L13.251 11.4756C13.2645 11.0617 13.6105 10.7366 14.0244 10.75ZM10.5 5.5C10.0858 5.5 9.75 5.83579 9.75 6.25V7H14.25V6.25C14.25 5.83579 13.9142 5.5 13.5 5.5H10.5Z",fill:"currentColor"})});var Oo=["data-feedback-toolbar","data-annotation-popup","data-annotation-marker"],Rs=Oo.flatMap(e=>[`:not([${e}])`,`:not([${e}] *)`]).join("");var Zn="__agentation_freeze";function Vo(){if(typeof window>"u")return{frozen:!1,installed:!0,origSetTimeout:setTimeout,origSetInterval:setInterval,origRAF:n=>0,pausedAnimations:[],frozenTimeoutQueue:[],frozenRAFQueue:[]};let e=window;return e[Zn]||(e[Zn]={frozen:!1,installed:!1,origSetTimeout:null,origSetInterval:null,origRAF:null,pausedAnimations:[],frozenTimeoutQueue:[],frozenRAFQueue:[]}),e[Zn]}var oe=Vo();typeof window<"u"&&!oe.installed&&(oe.origSetTimeout=window.setTimeout.bind(window),oe.origSetInterval=window.setInterval.bind(window),oe.origRAF=window.requestAnimationFrame.bind(window),window.setTimeout=(e,n,...t)=>typeof e=="string"?oe.origSetTimeout(e,n):oe.origSetTimeout((...o)=>{oe.frozen?oe.frozenTimeoutQueue.push(()=>e(...o)):e(...o)},n,...t),window.setInterval=(e,n,...t)=>typeof e=="string"?oe.origSetInterval(e,n):oe.origSetInterval((...o)=>{oe.frozen||e(...o)},n,...t),window.requestAnimationFrame=e=>oe.origRAF(n=>{oe.frozen?oe.frozenRAFQueue.push(e):e(n)}),oe.installed=!0);var fe=oe.origSetTimeout,Is=oe.origSetInterval,Ms=oe.origRAF;var V=require("react/jsx-runtime");function Un(e){if(!e)return;let n=t=>t.stopImmediatePropagation();document.addEventListener("focusin",n,!0),document.addEventListener("focusout",n,!0);try{e.focus()}finally{document.removeEventListener("focusin",n,!0),document.removeEventListener("focusout",n,!0)}}var Lt=(0,U.forwardRef)(function({element:n,timestamp:t,selectedText:o,placeholder:r="What should change?",initialValue:s="",submitLabel:a="Add",onSubmit:i,onCancel:_,onDelete:k,style:y,accentColor:v="#3c82f7",isExiting:C=!1,lightMode:A=!1,computedStyles:I},H){let[K,ae]=(0,U.useState)(s),[_e,re]=(0,U.useState)(!1),[R,N]=(0,U.useState)("initial"),[q,b]=(0,U.useState)(!1),[P,E]=(0,U.useState)(!1),pe=(0,U.useRef)(null),T=(0,U.useRef)(null),Y=(0,U.useRef)(null),le=(0,U.useRef)(null);(0,U.useEffect)(()=>{C&&R!=="exit"&&N("exit")},[C,R]),(0,U.useEffect)(()=>{fe(()=>{N("enter")},0);let h=fe(()=>{N("entered")},200),Z=fe(()=>{let ce=pe.current;ce&&(Un(ce),ce.selectionStart=ce.selectionEnd=ce.value.length,ce.scrollTop=ce.scrollHeight)},50);return()=>{clearTimeout(h),clearTimeout(Z),Y.current&&clearTimeout(Y.current),le.current&&clearTimeout(le.current)}},[]);let be=(0,U.useCallback)(()=>{le.current&&clearTimeout(le.current),re(!0),le.current=fe(()=>{re(!1),Un(pe.current)},250)},[]);(0,U.useImperativeHandle)(H,()=>({shake:be}),[be]);let Te=(0,U.useCallback)(()=>{N("exit"),Y.current=fe(()=>{_()},150)},[_]),xe=(0,U.useCallback)(()=>{K.trim()&&i(K.trim())},[K,i]),de=(0,U.useCallback)(h=>{h.stopPropagation(),!h.nativeEvent.isComposing&&(h.key==="Enter"&&(h.metaKey||h.ctrlKey)&&(h.preventDefault(),xe()),h.key==="Escape"&&Te())},[xe,Te]),g=[$.popup,A?$.light:"",R==="enter"?$.enter:"",R==="entered"?$.entered:"",R==="exit"?$.exit:"",_e?$.shake:""].filter(Boolean).join(" ");return(0,V.jsxs)("div",{ref:T,className:g,"data-annotation-popup":!0,style:y,onClick:h=>h.stopPropagation(),children:[(0,V.jsxs)("div",{className:$.header,children:[I&&Object.keys(I).length>0?(0,V.jsxs)("button",{className:$.headerToggle,onClick:()=>{let h=P;E(!P),h&&fe(()=>Un(pe.current),0)},type:"button",children:[(0,V.jsx)("svg",{className:`${$.chevron} ${P?$.expanded:""}`,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,V.jsx)("path",{d:"M5.5 10.25L9 7.25L5.75 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,V.jsx)("span",{className:$.element,children:n})]}):(0,V.jsx)("span",{className:$.element,children:n}),t&&(0,V.jsx)("span",{className:$.timestamp,children:t})]}),I&&Object.keys(I).length>0&&(0,V.jsx)("div",{className:`${$.stylesWrapper} ${P?$.expanded:""}`,children:(0,V.jsx)("div",{className:$.stylesInner,children:(0,V.jsx)("div",{className:$.stylesBlock,children:Object.entries(I).map(([h,Z])=>(0,V.jsxs)("div",{className:$.styleLine,children:[(0,V.jsx)("span",{className:$.styleProperty,children:h.replace(/([A-Z])/g,"-$1").toLowerCase()}),": ",(0,V.jsx)("span",{className:$.styleValue,children:Z}),";"]},h))})})}),o&&(0,V.jsxs)("div",{className:$.quote,children:["\u201C",o.slice(0,80),o.length>80?"...":"","\u201D"]}),(0,V.jsx)("textarea",{ref:pe,className:$.textarea,style:{borderColor:q?v:void 0},placeholder:r,value:K,onChange:h=>{ae(h.target.value);let Z=h.target;Z.style.height="auto",Z.style.height=`${Math.min(Z.scrollHeight,200)}px`},onFocus:()=>b(!0),onBlur:()=>b(!1),rows:4,onKeyDown:de}),(0,V.jsxs)("div",{className:$.actions,children:[k&&(0,V.jsx)("div",{className:$.deleteWrapper,children:(0,V.jsx)("button",{className:$.deleteButton,onClick:k,type:"button",children:(0,V.jsx)(St,{size:22})})}),(0,V.jsx)("button",{className:$.cancel,onClick:Te,children:"Cancel"}),(0,V.jsx)("button",{className:$.submit,style:{backgroundColor:v,opacity:K.trim()?1:.4},onClick:xe,disabled:!K.trim(),children:a})]}),(0,V.jsxs)("div",{className:$.shortcutHint,children:[navigator?.platform?.includes("Mac")?"\u2318":"Ctrl","+Enter to submit"]})]})});function rn(e){if(e.parentElement)return e.parentElement;let n=e.getRootNode();return n instanceof ShadowRoot?n.host:null}function je(e,n){let t=e;for(;t;){if(t.matches(n))return t;t=rn(t)}return null}function Ko(e,n=4){let t=[],o=e,r=0;for(;o&&r<n;){let s=o.tagName.toLowerCase();if(s==="html"||s==="body")break;let a=s;if(o.id)a=`#${o.id}`;else if(o.className&&typeof o.className=="string"){let _=o.className.split(/\s+/).find(k=>k.length>2&&!k.match(/^[a-z]{1,2}$/)&&!k.match(/[A-Z0-9]{5,}/));_&&(a=`.${_.split("_")[0]}`)}let i=rn(o);!o.parentElement&&i&&(a=`\u27E8shadow\u27E9 ${a}`),t.unshift(a),o=i,r++}return t.join(" > ")}function Xn(e){let n=Ko(e);if(e.dataset.element)return{name:e.dataset.element,path:n};let t=e.tagName.toLowerCase();if(["path","circle","rect","line","g"].includes(t)){let o=je(e,"svg");if(o){let r=rn(o);if(r instanceof HTMLElement)return{name:`graphic in ${Xn(r).name}`,path:n}}return{name:"graphic element",path:n}}if(t==="svg"){let o=rn(e);if(o?.tagName.toLowerCase()==="button"){let r=o.textContent?.trim();return{name:r?`icon in "${r}" button`:"button icon",path:n}}return{name:"icon",path:n}}if(t==="button"){let o=e.textContent?.trim(),r=e.getAttribute("aria-label");return r?{name:`button [${r}]`,path:n}:{name:o?`button "${o.slice(0,25)}"`:"button",path:n}}if(t==="a"){let o=e.textContent?.trim(),r=e.getAttribute("href");return o?{name:`link "${o.slice(0,25)}"`,path:n}:r?{name:`link to ${r.slice(0,30)}`,path:n}:{name:"link",path:n}}if(t==="input"){let o=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:`${o} input`,path:n}}if(["h1","h2","h3","h4","h5","h6"].includes(t)){let o=e.textContent?.trim();return{name:o?`${t} "${o.slice(0,35)}"`:t,path:n}}if(t==="p"){let o=e.textContent?.trim();return o?{name:`paragraph: "${o.slice(0,40)}${o.length>40?"...":""}"`,path:n}:{name:"paragraph",path:n}}if(t==="span"||t==="label"){let o=e.textContent?.trim();return o&&o.length<40?{name:`"${o}"`,path:n}:{name:t,path:n}}if(t==="li"){let o=e.textContent?.trim();return o&&o.length<40?{name:`list item: "${o.slice(0,35)}"`,path:n}:{name:"list item",path:n}}if(t==="blockquote")return{name:"blockquote",path:n};if(t==="code"){let o=e.textContent?.trim();return o&&o.length<30?{name:`code: \`${o}\``,path:n}:{name:"code",path:n}}if(t==="pre")return{name:"code block",path:n};if(t==="img"){let o=e.getAttribute("alt");return{name:o?`image "${o.slice(0,30)}"`:"image",path:n}}if(t==="video")return{name:"video",path:n};if(["div","section","article","nav","header","footer","aside","main"].includes(t)){let o=e.className,r=e.getAttribute("role"),s=e.getAttribute("aria-label");if(s)return{name:`${t} [${s}]`,path:n};if(r)return{name:`${r}`,path:n};if(typeof o=="string"&&o){let a=o.split(/[\s_-]+/).map(i=>i.replace(/[A-Z0-9]{5,}.*$/,"")).filter(i=>i.length>2&&!/^[a-z]{1,2}$/.test(i)).slice(0,2);if(a.length>0)return{name:a.join(" "),path:n}}return{name:t==="div"?"container":t,path:n}}return{name:t,path:n}}function Nt(e){let n=[],t=e.textContent?.trim();t&&t.length<100&&n.push(t);let o=e.previousElementSibling;if(o){let s=o.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 Et(e){let n=e.className;return typeof n!="string"||!n?"":n.split(/\s+/).filter(o=>o.length>0).map(o=>{let r=o.match(/^([a-zA-Z][a-zA-Z0-9_-]*?)(?:_[a-zA-Z0-9]{5,})?$/);return r?r[1]:o}).filter((o,r,s)=>s.indexOf(o)===r).join(", ")}var Tt=new Set(["none","normal","auto","0px","rgba(0, 0, 0, 0)","transparent","static","visible"]),Zo=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"]),Uo=new Set(["input","textarea","select"]),Xo=new Set(["img","video","canvas","svg"]),Yo=new Set(["div","section","article","nav","header","footer","aside","main","ul","ol","form","fieldset"]);function Rt(e){if(typeof window>"u")return{};let n=window.getComputedStyle(e),t={},o=e.tagName.toLowerCase(),r;Zo.has(o)?r=["color","fontSize","fontWeight","fontFamily","lineHeight"]:o==="button"||o==="a"&&e.getAttribute("role")==="button"?r=["backgroundColor","color","padding","borderRadius","fontSize"]:Uo.has(o)?r=["backgroundColor","color","padding","borderRadius","fontSize"]:Xo.has(o)?r=["width","height","objectFit","borderRadius"]:Yo.has(o)?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&&!Tt.has(i)&&(t[s]=i)}return t}var Qo=["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 It(e){if(typeof window>"u")return"";let n=window.getComputedStyle(e),t=[];for(let o of Qo){let r=o.replace(/([A-Z])/g,"-$1").toLowerCase(),s=n.getPropertyValue(r);s&&!Tt.has(s)&&t.push(`${r}: ${s}`)}return t.join("; ")}function Mt(e){let n=[],t=e.getAttribute("role"),o=e.getAttribute("aria-label"),r=e.getAttribute("aria-describedby"),s=e.getAttribute("tabindex"),a=e.getAttribute("aria-hidden");return t&&n.push(`role="${t}"`),o&&n.push(`aria-label="${o}"`),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 Ft(e){let n=[],t=e;for(;t&&t.tagName.toLowerCase()!=="html";){let o=t.tagName.toLowerCase(),r=o;if(t.id)r=`${o}#${t.id}`;else if(t.className&&typeof t.className=="string"){let a=t.className.split(/\s+/).map(i=>i.replace(/[_][a-zA-Z0-9]{5,}.*$/,"")).find(i=>i.length>2);a&&(r=`${o}.${a}`)}let s=rn(t);!t.parentElement&&s&&(r=`\u27E8shadow\u27E9 ${r}`),n.unshift(r),t=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},Pt=new Set(["Component","PureComponent","Fragment","Suspense","Profiler","StrictMode","Routes","Route","Outlet","Root","ErrorBoundaryHandler","HotReload","Hot"]),At=[/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$/],qo=[/Page$/,/View$/,/Screen$/,/Section$/,/Card$/,/List$/,/Item$/,/Form$/,/Modal$/,/Dialog$/,/Button$/,/Nav$/,/Header$/,/Footer$/,/Layout$/,/Panel$/,/Tab$/,/Menu$/];function Jo(e){let n=e?.mode??"filtered",t=Pt;if(e?.skipExact){let o=e.skipExact instanceof Set?e.skipExact:new Set(e.skipExact);t=new Set([...Pt,...o])}return{maxComponents:e?.maxComponents??6,maxDepth:e?.maxDepth??30,mode:n,skipExact:t,skipPatterns:e?.skipPatterns?[...At,...e.skipPatterns]:At,userPatterns:e?.userPatterns??qo,filter:e?.filter}}function Go(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/([A-Z])([A-Z][a-z])/g,"$1-$2").toLowerCase()}function er(e,n=10){let t=new Set,o=e,r=0;for(;o&&r<n;)o.className&&typeof o.className=="string"&&o.className.split(/\s+/).forEach(s=>{if(s.length>1){let a=s.replace(/[_][a-zA-Z0-9]{5,}.*$/,"").toLowerCase();a.length>1&&t.add(a)}}),o=o.parentElement,r++;return t}function nr(e,n){let t=Go(e);for(let o of n){if(o===t)return!0;let r=t.split("-").filter(a=>a.length>2),s=o.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 tr(e,n,t,o){if(t.filter)return t.filter(e,n);switch(t.mode){case"all":return!0;case"filtered":return!(t.skipExact.has(e)||t.skipPatterns.some(r=>r.test(e)));case"smart":return t.skipExact.has(e)||t.skipPatterns.some(r=>r.test(e))?!1:!!(o&&nr(e,o)||t.userPatterns.some(r=>r.test(e)));default:return!0}}var Ze=null,or=new WeakMap;function Yn(e){return Object.keys(e).some(n=>n.startsWith("__reactFiber$")||n.startsWith("__reactInternalInstance$")||n.startsWith("__reactProps$"))}function rr(){if(Ze!==null)return Ze;if(typeof document>"u")return!1;if(document.body&&Yn(document.body))return Ze=!0,!0;let e=["#root","#app","#__next","[data-reactroot]"];for(let n of e){let t=document.querySelector(n);if(t&&Yn(t))return Ze=!0,!0}if(document.body){for(let n of document.body.children)if(Yn(n))return Ze=!0,!0}return Ze=!1,!1}var sn={map:or};function sr(e){return Object.keys(e).find(t=>t.startsWith("__reactFiber$")||t.startsWith("__reactInternalInstance$"))||null}function ir(e){let n=sr(e);return n?e[n]:null}function We(e){return e?e.displayName?e.displayName:e.name?e.name:null:null}function ar(e){let{tag:n,type:t,elementType:o}=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=o;if(r?.render){let s=We(r.render);if(s)return s}return r?.displayName?r.displayName:We(t)}if(n===F.MemoComponent||n===F.SimpleMemoComponent){let r=o;if(r?.type){let s=We(r.type);if(s)return s}return r?.displayName?r.displayName:We(t)}if(n===F.ContextProvider){let r=t;return r?._context?.displayName?`${r._context.displayName}.Provider`:null}if(n===F.ContextConsumer){let r=t;return r?.displayName?`${r.displayName}.Consumer`:null}if(n===F.LazyComponent){let r=o;return r?._status===1&&r._result?We(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?We(t):null}function lr(e){return e.length<=2||e.length<=3&&e===e.toLowerCase()}function $t(e,n){let t=Jo(n),o=t.mode==="all";if(o){let _=sn.map.get(e);if(_!==void 0)return _}if(!rr()){let _={path:null,components:[]};return o&&sn.map.set(e,_),_}let r=t.mode==="smart"?er(e):void 0,s=[];try{let _=ir(e),k=0;for(;_&&k<t.maxDepth&&s.length<t.maxComponents;){let y=ar(_);y&&!lr(y)&&tr(y,k,t,r)&&s.push(y),_=_.return,k++}}catch{let _={path:null,components:[]};return o&&sn.map.set(e,_),_}if(s.length===0){let _={path:null,components:[]};return o&&sn.map.set(e,_),_}let i={path:s.slice().reverse().map(_=>`<${_}>`).join(" "),components:s};return o&&sn.map.set(e,i),i}var Ht=On(require("react")),an={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 dr(e){if(!e||typeof e!="object")return null;let n=Object.keys(e),t=n.find(s=>s.startsWith("__reactFiber$"));if(t)return e[t]||null;let o=n.find(s=>s.startsWith("__reactInternalInstance$"));if(o)return e[o]||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 ln(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 cr(e,n=50){let t=e,o=0;for(;t&&o<n;){if(t._debugSource)return{source:t._debugSource,componentName:ln(t)};if(t._debugOwner?._debugSource)return{source:t._debugOwner._debugSource,componentName:ln(t._debugOwner)};t=t.return,o++}return null}function ur(e){let n=e,t=0,o=50;for(;n&&t<o;){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:ln(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:ln(n)}}}n=n.return,t++}return null}var Tn=new Map;function mr(e){let n=e.tag,t=e.type,o=e.elementType;if(typeof t=="string"||t==null||typeof t=="function"&&t.prototype?.isReactComponent)return null;if((n===an.FunctionComponent||n===an.IndeterminateComponent)&&typeof t=="function")return t;if(n===an.ForwardRef&&o){let r=o.render;if(typeof r=="function")return r}if((n===an.MemoComponent||n===an.SimpleMemoComponent)&&o){let r=o.type;if(typeof r=="function")return r}return typeof t=="function"?t:null}function _r(){let e=Ht.default,n=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;if(n&&"H"in n)return{get:()=>n.H,set:o=>{n.H=o}};let t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;if(t){let o=t.ReactCurrentDispatcher;if(o&&"current"in o)return{get:()=>o.current,set:r=>{o.current=r}}}return null}function pr(e){let n=e.split(`
333
- `),t=[/source-location/,/\/dist\/index\./,/\/dist\/react\./,/node_modules\//,/react-dom/,/react\.development/,/react\.production/,/chunk-[A-Z0-9]+/i,/react-stack-bottom-frame/,/react-reconciler/,/scheduler/,/at <anonymous>:/],o=/^\s*at\s+(?:.*?\s+\()?(.+?):(\d+):(\d+)\)?$/,r=/^[^@]*@(.+?):(\d+):(\d+)$/,s=0;for(let a of n){let i=a.trim();if(!i||t.some(k=>k.test(i)))continue;let _=o.exec(i)||r.exec(i);if(_&&(s++,s>=3))return{fileName:_[1],line:parseInt(_[2],10),column:parseInt(_[3],10)}}return null}function fr(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 gr(e){let n=mr(e);if(!n)return null;if(Tn.has(n))return Tn.get(n);let t=_r();if(!t)return Tn.set(n,null),null;let o=t.get(),r=null;try{let s=new Proxy({},{get(){throw new Error("probe")}});t.set(s);try{n({})}catch(a){if(a instanceof Error&&a.stack){let i=pr(a.stack);i&&(r={fileName:fr(i.fileName),lineNumber:i.line,columnNumber:i.column,componentName:ln(e)||void 0})}}}finally{t.set(o)}return Tn.set(n,r),r}function hr(e,n=15){let t=[],o=new Set,r=e,s=0;for(;r&&s<n;){let a=gr(r);a&&!o.has(a.fileName)&&(o.add(a.fileName),t.push(a)),r=r.return,s++}return t}function dn(e){let n=dr(e);if(!n)return{found:!1,reason:"no-fiber",isReactApp:!1,isProduction:!1};let t=cr(n);if(t||(t=ur(n)),t?.source)return{found:!0,source:{fileName:t.source.fileName,lineNumber:t.source.lineNumber,columnNumber:t.source.columnNumber,componentName:t.componentName||void 0},isReactApp:!0,isProduction:!1};let o=hr(n);return o.length>0?{found:!0,source:o[0],sourceCandidates:o,isReactApp:!0,isProduction:!1}:{found:!1,reason:"no-debug-source",isReactApp:!0,isProduction:!1}}function Rn(e,n="path"){let{fileName:t,lineNumber:o,columnNumber:r}=e,s=`${t}:${o}`;return r!==void 0&&(s+=`:${r}`),n==="vscode"?`vscode://file${t.startsWith("/")?"":"/"}${s}`:s}function Qn(e,n=10){let t=e,o=0;for(;t&&o<n;){let r=dn(t);if(r.found)return r;t=t.parentElement,o++}return dn(e)}async function In(e,n={}){let{quality:t=.7,maxScale:o=2}=n,r=(await import("html2canvas-pro")).default;return(await r(e,{useCORS:!0,allowTaint:!0,scale:Math.min(window.devicePixelRatio,o),logging:!1})).toDataURL("image/jpeg",t)}async function Bt(e={}){let{quality:n=.5,hideSelectors:t=[]}=e,r=[...["[data-impakers-debug]","[data-annotation-popup]","[data-annotation-marker]"],...t],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 he=[],un=[],zt=!1;function qn(e){return e.map(n=>{if(n instanceof Error)return`${n.message}
332
+ }`,Yo={popup:"styles-module__popup___IhzrD",enter:"styles-module__enter___L7U7N",popupEnter:"styles-module__popupEnter___AuQDN",entered:"styles-module__entered___COX-w",exit:"styles-module__exit___5eGjE",popupExit:"styles-module__popupExit___JJKQX",shake:"styles-module__shake___jdbWe",header:"styles-module__header___wWsSi",element:"styles-module__element___fTV2z",headerToggle:"styles-module__headerToggle___WpW0b",chevron:"styles-module__chevron___ZZJlR",expanded:"styles-module__expanded___2Hxgv",stylesWrapper:"styles-module__stylesWrapper___pnHgy",stylesInner:"styles-module__stylesInner___YYZe2",stylesBlock:"styles-module__stylesBlock___VfQKn",styleLine:"styles-module__styleLine___1YQiD",styleProperty:"styles-module__styleProperty___84L1i",styleValue:"styles-module__styleValue___q51-h",timestamp:"styles-module__timestamp___Dtpsv",quote:"styles-module__quote___mcMmQ",textarea:"styles-module__textarea___jrSae",green:"styles-module__green___99l3h",actions:"styles-module__actions___D6x3f",cancel:"styles-module__cancel___hRjnL",submit:"styles-module__submit___K-mIR",shortcutHint:"styles-module__shortcutHint___ihsrd",deleteWrapper:"styles-module__deleteWrapper___oSjdo",deleteButton:"styles-module__deleteButton___4VuAE",light:"styles-module__light___6AaSQ"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-annotation-popup-css-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-annotation-popup-css-styles",document.head.appendChild(e)),e.textContent=Xo}var j=Yo;var Mn=require("react/jsx-runtime");var Et=({size:e=24})=>(0,Mn.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,Mn.jsx)("path",{d:"M13.5 4C14.7426 4 15.75 5.00736 15.75 6.25V7H18.5C18.9142 7 19.25 7.33579 19.25 7.75C19.25 8.16421 18.9142 8.5 18.5 8.5H17.9678L17.6328 16.2217C17.61 16.7475 17.5912 17.1861 17.5469 17.543C17.5015 17.9087 17.4225 18.2506 17.2461 18.5723C16.9747 19.0671 16.5579 19.4671 16.0518 19.7168C15.7227 19.8791 15.3772 19.9422 15.0098 19.9717C14.6514 20.0004 14.2126 20 13.6865 20H10.3135C9.78735 20 9.34856 20.0004 8.99023 19.9717C8.62278 19.9422 8.27729 19.8791 7.94824 19.7168C7.44205 19.4671 7.02532 19.0671 6.75391 18.5723C6.57751 18.2506 6.49853 17.9087 6.45312 17.543C6.40883 17.1861 6.39005 16.7475 6.36719 16.2217L6.03223 8.5H5.5C5.08579 8.5 4.75 8.16421 4.75 7.75C4.75 7.33579 5.08579 7 5.5 7H8.25V6.25C8.25 5.00736 9.25736 4 10.5 4H13.5ZM7.86621 16.1562C7.89013 16.7063 7.90624 17.0751 7.94141 17.3584C7.97545 17.6326 8.02151 17.7644 8.06934 17.8516C8.19271 18.0763 8.38239 18.2577 8.6123 18.3711C8.70153 18.4151 8.83504 18.4545 9.11035 18.4766C9.39482 18.4994 9.76335 18.5 10.3135 18.5H13.6865C14.2367 18.5 14.6052 18.4994 14.8896 18.4766C15.165 18.4545 15.2985 18.4151 15.3877 18.3711C15.6176 18.2577 15.8073 18.0763 15.9307 17.8516C15.9785 17.7644 16.0245 17.6326 16.0586 17.3584C16.0938 17.0751 16.1099 16.7063 16.1338 16.1562L16.4668 8.5H7.5332L7.86621 16.1562ZM9.97656 10.75C10.3906 10.7371 10.7371 11.0626 10.75 11.4766L10.875 15.4766C10.8879 15.8906 10.5624 16.2371 10.1484 16.25C9.73443 16.2629 9.38794 15.9374 9.375 15.5234L9.25 11.5234C9.23706 11.1094 9.56255 10.7629 9.97656 10.75ZM14.0244 10.75C14.4383 10.7635 14.7635 11.1105 14.75 11.5244L14.6201 15.5244C14.6066 15.9384 14.2596 16.2634 13.8457 16.25C13.4317 16.2365 13.1067 15.8896 13.1201 15.4756L13.251 11.4756C13.2645 11.0617 13.6105 10.7366 14.0244 10.75ZM10.5 5.5C10.0858 5.5 9.75 5.83579 9.75 6.25V7H14.25V6.25C14.25 5.83579 13.9142 5.5 13.5 5.5H10.5Z",fill:"currentColor"})});var Qo=["data-feedback-toolbar","data-annotation-popup","data-annotation-marker"],Dr=Qo.flatMap(e=>[`:not([${e}])`,`:not([${e}] *)`]).join("");var Yn="__agentation_freeze";function qo(){if(typeof window>"u")return{frozen:!1,installed:!0,origSetTimeout:setTimeout,origSetInterval:setInterval,origRAF:n=>0,pausedAnimations:[],frozenTimeoutQueue:[],frozenRAFQueue:[]};let e=window;return e[Yn]||(e[Yn]={frozen:!1,installed:!1,origSetTimeout:null,origSetInterval:null,origRAF:null,pausedAnimations:[],frozenTimeoutQueue:[],frozenRAFQueue:[]}),e[Yn]}var _e=qo();typeof window<"u"&&!_e.installed&&(_e.origSetTimeout=window.setTimeout.bind(window),_e.origSetInterval=window.setInterval.bind(window),_e.origRAF=window.requestAnimationFrame.bind(window),window.setTimeout=(e,n,...t)=>typeof e=="string"?_e.origSetTimeout(e,n):_e.origSetTimeout((...o)=>{_e.frozen?_e.frozenTimeoutQueue.push(()=>e(...o)):e(...o)},n,...t),window.setInterval=(e,n,...t)=>typeof e=="string"?_e.origSetInterval(e,n):_e.origSetInterval((...o)=>{_e.frozen||e(...o)},n,...t),window.requestAnimationFrame=e=>_e.origRAF(n=>{_e.frozen?_e.frozenRAFQueue.push(e):e(n)}),_e.installed=!0);var ke=_e.origSetTimeout,jr=_e.origSetInterval,Wr=_e.origRAF;var Q=require("react/jsx-runtime");function Qn(e){if(!e)return;let n=t=>t.stopImmediatePropagation();document.addEventListener("focusin",n,!0),document.addEventListener("focusout",n,!0);try{e.focus()}finally{document.removeEventListener("focusin",n,!0),document.removeEventListener("focusout",n,!0)}}var Rt=(0,ee.forwardRef)(function({element:n,timestamp:t,selectedText:o,placeholder:s="What should change?",initialValue:r="",submitLabel:a="Add",onSubmit:i,onCancel:_,onDelete:k,style:b,accentColor:C="#3c82f7",isExiting:v=!1,lightMode:$=!1,computedStyles:F},H){let[W,ce]=(0,ee.useState)(r),[pe,T]=(0,ee.useState)(!1),[w,I]=(0,ee.useState)("initial"),[O,x]=(0,ee.useState)(!1),[A,E]=(0,ee.useState)(!1),q=(0,ee.useRef)(null),M=(0,ee.useRef)(null),J=(0,ee.useRef)(null),se=(0,ee.useRef)(null);(0,ee.useEffect)(()=>{v&&w!=="exit"&&I("exit")},[v,w]),(0,ee.useEffect)(()=>{ke(()=>{I("enter")},0);let f=ke(()=>{I("entered")},200),B=ke(()=>{let P=q.current;P&&(Qn(P),P.selectionStart=P.selectionEnd=P.value.length,P.scrollTop=P.scrollHeight)},50);return()=>{clearTimeout(f),clearTimeout(B),J.current&&clearTimeout(J.current),se.current&&clearTimeout(se.current)}},[]);let fe=(0,ee.useCallback)(()=>{se.current&&clearTimeout(se.current),T(!0),se.current=ke(()=>{T(!1),Qn(q.current)},250)},[]);(0,ee.useImperativeHandle)(H,()=>({shake:fe}),[fe]);let ve=(0,ee.useCallback)(()=>{I("exit"),J.current=ke(()=>{_()},150)},[_]),re=(0,ee.useCallback)(()=>{W.trim()&&i(W.trim())},[W,i]),le=(0,ee.useCallback)(f=>{f.stopPropagation(),!f.nativeEvent.isComposing&&(f.key==="Enter"&&(f.metaKey||f.ctrlKey)&&(f.preventDefault(),re()),f.key==="Escape"&&ve())},[re,ve]),h=[j.popup,$?j.light:"",w==="enter"?j.enter:"",w==="entered"?j.entered:"",w==="exit"?j.exit:"",pe?j.shake:""].filter(Boolean).join(" ");return(0,Q.jsxs)("div",{ref:M,className:h,"data-annotation-popup":!0,style:b,onClick:f=>f.stopPropagation(),children:[(0,Q.jsxs)("div",{className:j.header,children:[F&&Object.keys(F).length>0?(0,Q.jsxs)("button",{className:j.headerToggle,onClick:()=>{let f=A;E(!A),f&&ke(()=>Qn(q.current),0)},type:"button",children:[(0,Q.jsx)("svg",{className:`${j.chevron} ${A?j.expanded:""}`,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,Q.jsx)("path",{d:"M5.5 10.25L9 7.25L5.75 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,Q.jsx)("span",{className:j.element,children:n})]}):(0,Q.jsx)("span",{className:j.element,children:n}),t&&(0,Q.jsx)("span",{className:j.timestamp,children:t})]}),F&&Object.keys(F).length>0&&(0,Q.jsx)("div",{className:`${j.stylesWrapper} ${A?j.expanded:""}`,children:(0,Q.jsx)("div",{className:j.stylesInner,children:(0,Q.jsx)("div",{className:j.stylesBlock,children:Object.entries(F).map(([f,B])=>(0,Q.jsxs)("div",{className:j.styleLine,children:[(0,Q.jsx)("span",{className:j.styleProperty,children:f.replace(/([A-Z])/g,"-$1").toLowerCase()}),": ",(0,Q.jsx)("span",{className:j.styleValue,children:B}),";"]},f))})})}),o&&(0,Q.jsxs)("div",{className:j.quote,children:["\u201C",o.slice(0,80),o.length>80?"...":"","\u201D"]}),(0,Q.jsx)("textarea",{ref:q,className:j.textarea,style:{borderColor:O?C:void 0},placeholder:s,value:W,onChange:f=>{ce(f.target.value);let B=f.target;B.style.height="auto",B.style.height=`${Math.min(B.scrollHeight,200)}px`},onFocus:()=>x(!0),onBlur:()=>x(!1),rows:4,onKeyDown:le}),(0,Q.jsxs)("div",{className:j.actions,children:[k&&(0,Q.jsx)("div",{className:j.deleteWrapper,children:(0,Q.jsx)("button",{className:j.deleteButton,onClick:k,type:"button",children:(0,Q.jsx)(Et,{size:22})})}),(0,Q.jsx)("button",{className:j.cancel,onClick:ve,children:"Cancel"}),(0,Q.jsx)("button",{className:j.submit,style:{backgroundColor:C,opacity:W.trim()?1:.4},onClick:re,disabled:!W.trim(),children:a})]}),(0,Q.jsxs)("div",{className:j.shortcutHint,children:[navigator?.platform?.includes("Mac")?"\u2318":"Ctrl","+Enter to submit"]})]})});function cn(e){if(e.parentElement)return e.parentElement;let n=e.getRootNode();return n instanceof ShadowRoot?n.host:null}function Oe(e,n){let t=e;for(;t;){if(t.matches(n))return t;t=cn(t)}return null}function Go(e,n=4){let t=[],o=e,s=0;for(;o&&s<n;){let r=o.tagName.toLowerCase();if(r==="html"||r==="body")break;let a=r;if(o.id)a=`#${o.id}`;else if(o.className&&typeof o.className=="string"){let _=o.className.split(/\s+/).find(k=>k.length>2&&!k.match(/^[a-z]{1,2}$/)&&!k.match(/[A-Z0-9]{5,}/));_&&(a=`.${_.split("_")[0]}`)}let i=cn(o);!o.parentElement&&i&&(a=`\u27E8shadow\u27E9 ${a}`),t.unshift(a),o=i,s++}return t.join(" > ")}function qn(e){let n=Go(e);if(e.dataset.element)return{name:e.dataset.element,path:n};let t=e.tagName.toLowerCase();if(["path","circle","rect","line","g"].includes(t)){let o=Oe(e,"svg");if(o){let s=cn(o);if(s instanceof HTMLElement)return{name:`graphic in ${qn(s).name}`,path:n}}return{name:"graphic element",path:n}}if(t==="svg"){let o=cn(e);if(o?.tagName.toLowerCase()==="button"){let s=o.textContent?.trim();return{name:s?`icon in "${s}" button`:"button icon",path:n}}return{name:"icon",path:n}}if(t==="button"){let o=e.textContent?.trim(),s=e.getAttribute("aria-label");return s?{name:`button [${s}]`,path:n}:{name:o?`button "${o.slice(0,25)}"`:"button",path:n}}if(t==="a"){let o=e.textContent?.trim(),s=e.getAttribute("href");return o?{name:`link "${o.slice(0,25)}"`,path:n}:s?{name:`link to ${s.slice(0,30)}`,path:n}:{name:"link",path:n}}if(t==="input"){let o=e.getAttribute("type")||"text",s=e.getAttribute("placeholder"),r=e.getAttribute("name");return s?{name:`input "${s}"`,path:n}:r?{name:`input [${r}]`,path:n}:{name:`${o} input`,path:n}}if(["h1","h2","h3","h4","h5","h6"].includes(t)){let o=e.textContent?.trim();return{name:o?`${t} "${o.slice(0,35)}"`:t,path:n}}if(t==="p"){let o=e.textContent?.trim();return o?{name:`paragraph: "${o.slice(0,40)}${o.length>40?"...":""}"`,path:n}:{name:"paragraph",path:n}}if(t==="span"||t==="label"){let o=e.textContent?.trim();return o&&o.length<40?{name:`"${o}"`,path:n}:{name:t,path:n}}if(t==="li"){let o=e.textContent?.trim();return o&&o.length<40?{name:`list item: "${o.slice(0,35)}"`,path:n}:{name:"list item",path:n}}if(t==="blockquote")return{name:"blockquote",path:n};if(t==="code"){let o=e.textContent?.trim();return o&&o.length<30?{name:`code: \`${o}\``,path:n}:{name:"code",path:n}}if(t==="pre")return{name:"code block",path:n};if(t==="img"){let o=e.getAttribute("alt");return{name:o?`image "${o.slice(0,30)}"`:"image",path:n}}if(t==="video")return{name:"video",path:n};if(["div","section","article","nav","header","footer","aside","main"].includes(t)){let o=e.className,s=e.getAttribute("role"),r=e.getAttribute("aria-label");if(r)return{name:`${t} [${r}]`,path:n};if(s)return{name:`${s}`,path:n};if(typeof o=="string"&&o){let a=o.split(/[\s_-]+/).map(i=>i.replace(/[A-Z0-9]{5,}.*$/,"")).filter(i=>i.length>2&&!/^[a-z]{1,2}$/.test(i)).slice(0,2);if(a.length>0)return{name:a.join(" "),path:n}}return{name:t==="div"?"container":t,path:n}}return{name:t,path:n}}function Mt(e){let n=[],t=e.textContent?.trim();t&&t.length<100&&n.push(t);let o=e.previousElementSibling;if(o){let r=o.textContent?.trim();r&&r.length<50&&n.unshift(`[before: "${r.slice(0,40)}"]`)}let s=e.nextElementSibling;if(s){let r=s.textContent?.trim();r&&r.length<50&&n.push(`[after: "${r.slice(0,40)}"]`)}return n.join(" ")}function At(e){let n=e.className;return typeof n!="string"||!n?"":n.split(/\s+/).filter(o=>o.length>0).map(o=>{let s=o.match(/^([a-zA-Z][a-zA-Z0-9_-]*?)(?:_[a-zA-Z0-9]{5,})?$/);return s?s[1]:o}).filter((o,s,r)=>r.indexOf(o)===s).join(", ")}var Ft=new Set(["none","normal","auto","0px","rgba(0, 0, 0, 0)","transparent","static","visible"]),Jo=new Set(["p","span","h1","h2","h3","h4","h5","h6","label","li","td","th","blockquote","figcaption","caption","legend","dt","dd","pre","code","em","strong","b","i","a","time","cite","q"]),es=new Set(["input","textarea","select"]),ns=new Set(["img","video","canvas","svg"]),ts=new Set(["div","section","article","nav","header","footer","aside","main","ul","ol","form","fieldset"]);function Pt(e){if(typeof window>"u")return{};let n=window.getComputedStyle(e),t={},o=e.tagName.toLowerCase(),s;Jo.has(o)?s=["color","fontSize","fontWeight","fontFamily","lineHeight"]:o==="button"||o==="a"&&e.getAttribute("role")==="button"?s=["backgroundColor","color","padding","borderRadius","fontSize"]:es.has(o)?s=["backgroundColor","color","padding","borderRadius","fontSize"]:ns.has(o)?s=["width","height","objectFit","borderRadius"]:ts.has(o)?s=["display","padding","margin","gap","backgroundColor"]:s=["color","fontSize","margin","padding","backgroundColor"];for(let r of s){let a=r.replace(/([A-Z])/g,"-$1").toLowerCase(),i=n.getPropertyValue(a);i&&!Ft.has(i)&&(t[r]=i)}return t}var os=["color","backgroundColor","borderColor","fontSize","fontWeight","fontFamily","lineHeight","letterSpacing","textAlign","width","height","padding","margin","border","borderRadius","display","position","top","right","bottom","left","zIndex","flexDirection","justifyContent","alignItems","gap","opacity","visibility","overflow","boxShadow","transform"];function $t(e){if(typeof window>"u")return"";let n=window.getComputedStyle(e),t=[];for(let o of os){let s=o.replace(/([A-Z])/g,"-$1").toLowerCase(),r=n.getPropertyValue(s);r&&!Ft.has(r)&&t.push(`${s}: ${r}`)}return t.join("; ")}function Ht(e){let n=[],t=e.getAttribute("role"),o=e.getAttribute("aria-label"),s=e.getAttribute("aria-describedby"),r=e.getAttribute("tabindex"),a=e.getAttribute("aria-hidden");return t&&n.push(`role="${t}"`),o&&n.push(`aria-label="${o}"`),s&&n.push(`aria-describedby="${s}"`),r&&n.push(`tabindex=${r}`),a==="true"&&n.push("aria-hidden"),e.matches("a, button, input, select, textarea, [tabindex]")&&n.push("focusable"),n.join(", ")}function Bt(e){let n=[],t=e;for(;t&&t.tagName.toLowerCase()!=="html";){let o=t.tagName.toLowerCase(),s=o;if(t.id)s=`${o}#${t.id}`;else if(t.className&&typeof t.className=="string"){let a=t.className.split(/\s+/).map(i=>i.replace(/[_][a-zA-Z0-9]{5,}.*$/,"")).find(i=>i.length>2);a&&(s=`${o}.${a}`)}let r=cn(t);!t.parentElement&&r&&(s=`\u27E8shadow\u27E9 ${s}`),n.unshift(s),t=r}return n.join(" > ")}var z={FunctionComponent:0,ClassComponent:1,IndeterminateComponent:2,HostRoot:3,HostPortal:4,HostComponent:5,HostText:6,Fragment:7,Mode:8,ContextConsumer:9,ContextProvider:10,ForwardRef:11,Profiler:12,SuspenseComponent:13,MemoComponent:14,SimpleMemoComponent:15,LazyComponent:16,IncompleteClassComponent:17,DehydratedFragment:18,SuspenseListComponent:19,ScopeComponent:21,OffscreenComponent:22,LegacyHiddenComponent:23,CacheComponent:24,TracingMarkerComponent:25,HostHoistable:26,HostSingleton:27,IncompleteFunctionComponent:28,Throw:29,ViewTransitionComponent:30,ActivityComponent:31},zt=new Set(["Component","PureComponent","Fragment","Suspense","Profiler","StrictMode","Routes","Route","Outlet","Root","ErrorBoundaryHandler","HotReload","Hot"]),Dt=[/Boundary$/,/BoundaryHandler$/,/Provider$/,/Consumer$/,/^(Inner|Outer)/,/Router$/,/^Client(Page|Segment|Root)/,/^Segment(ViewNode|Node)$/,/^LayoutSegment/,/^Server(Root|Component|Render)/,/^RSC/,/Context$/,/^Hot(Reload)?$/,/^(Dev|React)(Overlay|Tools|Root)/,/Overlay$/,/Handler$/,/^With[A-Z]/,/Wrapper$/,/^Root$/],ss=[/Page$/,/View$/,/Screen$/,/Section$/,/Card$/,/List$/,/Item$/,/Form$/,/Modal$/,/Dialog$/,/Button$/,/Nav$/,/Header$/,/Footer$/,/Layout$/,/Panel$/,/Tab$/,/Menu$/];function rs(e){let n=e?.mode??"filtered",t=zt;if(e?.skipExact){let o=e.skipExact instanceof Set?e.skipExact:new Set(e.skipExact);t=new Set([...zt,...o])}return{maxComponents:e?.maxComponents??6,maxDepth:e?.maxDepth??30,mode:n,skipExact:t,skipPatterns:e?.skipPatterns?[...Dt,...e.skipPatterns]:Dt,userPatterns:e?.userPatterns??ss,filter:e?.filter}}function is(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/([A-Z])([A-Z][a-z])/g,"$1-$2").toLowerCase()}function as(e,n=10){let t=new Set,o=e,s=0;for(;o&&s<n;)o.className&&typeof o.className=="string"&&o.className.split(/\s+/).forEach(r=>{if(r.length>1){let a=r.replace(/[_][a-zA-Z0-9]{5,}.*$/,"").toLowerCase();a.length>1&&t.add(a)}}),o=o.parentElement,s++;return t}function ls(e,n){let t=is(e);for(let o of n){if(o===t)return!0;let s=t.split("-").filter(a=>a.length>2),r=o.split("-").filter(a=>a.length>2);for(let a of s)for(let i of r)if(a===i||a.includes(i)||i.includes(a))return!0}return!1}function ds(e,n,t,o){if(t.filter)return t.filter(e,n);switch(t.mode){case"all":return!0;case"filtered":return!(t.skipExact.has(e)||t.skipPatterns.some(s=>s.test(e)));case"smart":return t.skipExact.has(e)||t.skipPatterns.some(s=>s.test(e))?!1:!!(o&&ls(e,o)||t.userPatterns.some(s=>s.test(e)));default:return!0}}var Ye=null,cs=new WeakMap;function Gn(e){return Object.keys(e).some(n=>n.startsWith("__reactFiber$")||n.startsWith("__reactInternalInstance$")||n.startsWith("__reactProps$"))}function us(){if(Ye!==null)return Ye;if(typeof document>"u")return!1;if(document.body&&Gn(document.body))return Ye=!0,!0;let e=["#root","#app","#__next","[data-reactroot]"];for(let n of e){let t=document.querySelector(n);if(t&&Gn(t))return Ye=!0,!0}if(document.body){for(let n of document.body.children)if(Gn(n))return Ye=!0,!0}return Ye=!1,!1}var un={map:cs};function _s(e){return Object.keys(e).find(t=>t.startsWith("__reactFiber$")||t.startsWith("__reactInternalInstance$"))||null}function ms(e){let n=_s(e);return n?e[n]:null}function Ve(e){return e?e.displayName?e.displayName:e.name?e.name:null:null}function ps(e){let{tag:n,type:t,elementType:o}=e;if(n===z.HostComponent||n===z.HostText||n===z.HostHoistable||n===z.HostSingleton||n===z.Fragment||n===z.Mode||n===z.Profiler||n===z.DehydratedFragment||n===z.HostRoot||n===z.HostPortal||n===z.ScopeComponent||n===z.OffscreenComponent||n===z.LegacyHiddenComponent||n===z.CacheComponent||n===z.TracingMarkerComponent||n===z.Throw||n===z.ViewTransitionComponent||n===z.ActivityComponent)return null;if(n===z.ForwardRef){let s=o;if(s?.render){let r=Ve(s.render);if(r)return r}return s?.displayName?s.displayName:Ve(t)}if(n===z.MemoComponent||n===z.SimpleMemoComponent){let s=o;if(s?.type){let r=Ve(s.type);if(r)return r}return s?.displayName?s.displayName:Ve(t)}if(n===z.ContextProvider){let s=t;return s?._context?.displayName?`${s._context.displayName}.Provider`:null}if(n===z.ContextConsumer){let s=t;return s?.displayName?`${s.displayName}.Consumer`:null}if(n===z.LazyComponent){let s=o;return s?._status===1&&s._result?Ve(s._result):null}return n===z.SuspenseComponent||n===z.SuspenseListComponent?null:n===z.IncompleteClassComponent||n===z.IncompleteFunctionComponent||n===z.FunctionComponent||n===z.ClassComponent||n===z.IndeterminateComponent?Ve(t):null}function fs(e){return e.length<=2||e.length<=3&&e===e.toLowerCase()}function jt(e,n){let t=rs(n),o=t.mode==="all";if(o){let _=un.map.get(e);if(_!==void 0)return _}if(!us()){let _={path:null,components:[]};return o&&un.map.set(e,_),_}let s=t.mode==="smart"?as(e):void 0,r=[];try{let _=ms(e),k=0;for(;_&&k<t.maxDepth&&r.length<t.maxComponents;){let b=ps(_);b&&!fs(b)&&ds(b,k,t,s)&&r.push(b),_=_.return,k++}}catch{let _={path:null,components:[]};return o&&un.map.set(e,_),_}if(r.length===0){let _={path:null,components:[]};return o&&un.map.set(e,_),_}let i={path:r.slice().reverse().map(_=>`<${_}>`).join(" "),components:r};return o&&un.map.set(e,i),i}var Wt=Un(require("react")),_n={FunctionComponent:0,ClassComponent:1,IndeterminateComponent:2,HostRoot:3,HostPortal:4,HostComponent:5,HostText:6,Fragment:7,Mode:8,ContextConsumer:9,ContextProvider:10,ForwardRef:11,Profiler:12,SuspenseComponent:13,MemoComponent:14,SimpleMemoComponent:15,LazyComponent:16};function gs(e){if(!e||typeof e!="object")return null;let n=Object.keys(e),t=n.find(r=>r.startsWith("__reactFiber$"));if(t)return e[t]||null;let o=n.find(r=>r.startsWith("__reactInternalInstance$"));if(o)return e[o]||null;let s=n.find(r=>{if(!r.startsWith("__react"))return!1;let a=e[r];return a&&typeof a=="object"&&"_debugSource"in a});return s&&e[s]||null}function mn(e){if(!e.type||typeof e.type=="string")return null;if(typeof e.type=="object"||typeof e.type=="function"){let n=e.type;if(n.displayName)return n.displayName;if(n.name)return n.name}return null}function hs(e,n=50){let t=e,o=0;for(;t&&o<n;){if(t._debugSource)return{source:t._debugSource,componentName:mn(t)};if(t._debugOwner?._debugSource)return{source:t._debugOwner._debugSource,componentName:mn(t._debugOwner)};t=t.return,o++}return null}function ys(e){let n=e,t=0,o=50;for(;n&&t<o;){let s=n,r=["_debugSource","__source","_source","debugSource"];for(let a of r){let i=s[a];if(i&&typeof i=="object"&&"fileName"in i)return{source:i,componentName:mn(n)}}if(n.memoizedProps){let a=n.memoizedProps;if(a.__source&&typeof a.__source=="object"){let i=a.__source;if(i.fileName&&i.lineNumber)return{source:{fileName:i.fileName,lineNumber:i.lineNumber,columnNumber:i.columnNumber},componentName:mn(n)}}}n=n.return,t++}return null}var An=new Map;function bs(e){let n=e.tag,t=e.type,o=e.elementType;if(typeof t=="string"||t==null||typeof t=="function"&&t.prototype?.isReactComponent)return null;if((n===_n.FunctionComponent||n===_n.IndeterminateComponent)&&typeof t=="function")return t;if(n===_n.ForwardRef&&o){let s=o.render;if(typeof s=="function")return s}if((n===_n.MemoComponent||n===_n.SimpleMemoComponent)&&o){let s=o.type;if(typeof s=="function")return s}return typeof t=="function"?t:null}function xs(){let e=Wt.default,n=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;if(n&&"H"in n)return{get:()=>n.H,set:o=>{n.H=o}};let t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;if(t){let o=t.ReactCurrentDispatcher;if(o&&"current"in o)return{get:()=>o.current,set:s=>{o.current=s}}}return null}function ks(e){let n=e.split(`
333
+ `),t=[/source-location/,/\/dist\/index\./,/\/dist\/react\./,/node_modules\//,/react-dom/,/react\.development/,/react\.production/,/chunk-[A-Z0-9]+/i,/react-stack-bottom-frame/,/react-reconciler/,/scheduler/,/at <anonymous>:/],o=/^\s*at\s+(?:.*?\s+\()?(.+?):(\d+):(\d+)\)?$/,s=/^[^@]*@(.+?):(\d+):(\d+)$/,r=0;for(let a of n){let i=a.trim();if(!i||t.some(k=>k.test(i)))continue;let _=o.exec(i)||s.exec(i);if(_&&(r++,r>=3))return{fileName:_[1],line:parseInt(_[2],10),column:parseInt(_[3],10)}}return null}function vs(e){let n=e;return n=n.replace(/[?#].*$/,""),n=n.replace(/^turbopack:\/\/\/\[project\]\//,""),n=n.replace(/^webpack-internal:\/\/\/\.\//,""),n=n.replace(/^webpack-internal:\/\/\//,""),n=n.replace(/^webpack:\/\/\/\.\//,""),n=n.replace(/^webpack:\/\/\//,""),n=n.replace(/^turbopack:\/\/\//,""),n=n.replace(/^https?:\/\/[^/]+\//,""),n=n.replace(/^file:\/\/\//,"/"),n=n.replace(/^\([^)]+\)\/\.\//,""),n=n.replace(/^\.\//,""),n}function Cs(e){let n=bs(e);if(!n)return null;if(An.has(n))return An.get(n);let t=xs();if(!t)return An.set(n,null),null;let o=t.get(),s=null;try{let r=new Proxy({},{get(){throw new Error("probe")}});t.set(r);try{n({})}catch(a){if(a instanceof Error&&a.stack){let i=ks(a.stack);i&&(s={fileName:vs(i.fileName),lineNumber:i.line,columnNumber:i.column,componentName:mn(e)||void 0})}}}finally{t.set(o)}return An.set(n,s),s}function ws(e,n=15){let t=[],o=new Set,s=e,r=0;for(;s&&r<n;){let a=Cs(s);a&&!o.has(a.fileName)&&(o.add(a.fileName),t.push(a)),s=s.return,r++}return t}function pn(e){let n=gs(e);if(!n)return{found:!1,reason:"no-fiber",isReactApp:!1,isProduction:!1};let t=hs(n);if(t||(t=ys(n)),t?.source)return{found:!0,source:{fileName:t.source.fileName,lineNumber:t.source.lineNumber,columnNumber:t.source.columnNumber,componentName:t.componentName||void 0},isReactApp:!0,isProduction:!1};let o=ws(n);return o.length>0?{found:!0,source:o[0],sourceCandidates:o,isReactApp:!0,isProduction:!1}:{found:!1,reason:"no-debug-source",isReactApp:!0,isProduction:!1}}function Fn(e,n="path"){let{fileName:t,lineNumber:o,columnNumber:s}=e,r=`${t}:${o}`;return s!==void 0&&(r+=`:${s}`),n==="vscode"?`vscode://file${t.startsWith("/")?"":"/"}${r}`:r}function Jn(e,n=10){let t=e,o=0;for(;t&&o<n;){let s=pn(t);if(s.found)return s;t=t.parentElement,o++}return pn(e)}async function Pn(e,n={}){let{quality:t=.7,maxScale:o=2}=n,s=(await import("html2canvas-pro")).default;return(await s(e,{useCORS:!0,allowTaint:!0,scale:Math.min(window.devicePixelRatio,o),logging:!1})).toDataURL("image/jpeg",t)}async function Ot(e={}){let{quality:n=.5,hideSelectors:t=[]}=e,s=[...["[data-impakers-debug]","[data-annotation-popup]","[data-annotation-marker]"],...t],r=document.querySelectorAll(s.join(", "));try{r.forEach(_=>_.style.visibility="hidden");let a=(await import("html2canvas-pro")).default;return(await a(document.body,{useCORS:!0,allowTaint:!0,scale:1,logging:!1,width:window.innerWidth,height:window.innerHeight})).toDataURL("image/jpeg",n)}catch{return}finally{r.forEach(a=>a.style.visibility="")}}var we=[],gn=[],Vt=!1;function et(e){return e.map(n=>{if(n instanceof Error)return`${n.message}
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 cn(e,n){un.push({level:e,message:n.slice(0,500),timestamp:Date.now()}),un.length>50&&un.shift()}function yr(){if(zt||typeof window>"u")return;zt=!0;let e=console.error,n=console.warn,t=console.log;console.error=(...o)=>{let r=qn(o);he.push(r.slice(0,500)),he.length>20&&he.shift(),cn("error",r),e.apply(console,o)},console.warn=(...o)=>{let r=qn(o);he.push(`[warn] ${r}`.slice(0,500)),he.length>20&&he.shift(),cn("warn",r),n.apply(console,o)},console.log=(...o)=>{cn("log",qn(o)),t.apply(console,o)},window.addEventListener("error",o=>{let r=`${o.message} (${o.filename}:${o.lineno})`;he.push(r.slice(0,500)),he.length>20&&he.shift(),cn("error",r)}),window.addEventListener("unhandledrejection",o=>{let r=`Unhandled Promise: ${o.reason}`;he.push(r.slice(0,500)),he.length>20&&he.shift(),cn("error",r)})}yr();function br(e){let n=e.match(/Edg\/(\d+[\d.]*)/);if(n)return`Edge ${n[1]}`;let t=e.match(/Chrome\/(\d+[\d.]*)/);if(t&&!e.includes("Edg/")&&!e.includes("OPR/"))return`Chrome ${t[1]}`;let o=e.match(/Firefox\/(\d+[\d.]*)/);if(o)return`Firefox ${o[1]}`;let 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 xr=[/session/i,/csrf/i,/xsrf/i,/secret/i,/password/i,/key/i];function kr(){if(typeof document>"u")return{};let e={};try{document.cookie.split(";").forEach(n=>{let[t,...o]=n.trim().split("=");if(!t)return;let r=t.trim(),s=xr.some(a=>a.test(r));e[r]=s?"[masked]":decodeURIComponent(o.join("=")).slice(0,200)})}catch{}return e}function Dt(e){try{let n=e.split(".");if(n.length!==3)return null;let t=n[1].replace(/-/g,"+").replace(/_/g,"/"),o=t+"==".slice(0,(4-t.length%4)%4);return JSON.parse(atob(o))}catch{return null}}function vr(){if(typeof window>"u")return null;let e=["token","access_token","accessToken","auth_token","authToken","jwt","id_token","idToken"];for(let n of e)try{let t=localStorage.getItem(n);if(t){let o=t.startsWith('"')?JSON.parse(t):t,r=Dt(o);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 t of n){let[,...o]=t.trim().split("="),r=o.join("="),s=Dt(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 Ue(e){let n=Math.round(e);return isNaN(n)||!isFinite(n)?void 0:n}function Cr(){if(typeof performance>"u")return{};let e={};try{let n=performance.getEntriesByType("navigation")[0];if(n){let r=Ue(n.loadEventEnd-n.startTime),s=Ue(n.domContentLoadedEventEnd-n.startTime),a=Ue(n.responseStart-n.requestStart);r&&(e.pageLoadTime=r),s&&(e.domContentLoaded=s),a&&(e.ttfb=a)}let t=performance.getEntriesByName("first-contentful-paint")[0];if(t){let r=Ue(t.startTime);r&&(e.firstContentfulPaint=r)}let o=performance.memory;if(o){let r=Ue(o.usedJSHeapSize/1024/1024),s=Ue(o.totalJSHeapSize/1024/1024);r&&(e.usedJSHeapMB=r),s&&(e.totalJSHeapMB=s)}}catch{}return e}function jt(e){let n={url:window.location.href,timestamp:new Date().toISOString(),browser:br(navigator.userAgent),userAgent:navigator.userAgent,viewport:`${window.innerWidth}x${window.innerHeight}`,pixelRatio:window.devicePixelRatio,language:navigator.language,referrer:document.referrer,cookies:kr(),jwtClaims:vr()??void 0,consoleErrors:he.length>0?[...he]:void 0,consoleLogs:un.length>0?[...un]:void 0,performance:Cr()};if(e)try{let t=e();t&&(n.user={...t,id:String(t.id),name:String(t.name||"")})}catch{}return n}var wr="/_next/static/chunks/impakers-debug-route-manifest.json",Mn=null,Fn=!1;function Wt(e){return!e||e==="/"?"/":e.endsWith("/")?e.slice(0,-1)||"/":e}function Sr(e){let n=Wt(e);return n==="/"?[]:n.slice(1).split("/").map(t=>decodeURIComponent(t)).filter(Boolean)}function Lr(e){return/^\[[^\]]+\]$/.test(e)}function Nr(e){return/^\[\.\.\.[^\]]+\]$/.test(e)}function Er(e){return/^\[\[\.\.\.[^\]]+\]\]$/.test(e)}function Tr(e,n){let t=0,o=0,r=0;for(;t<e.length;){let s=e[t];if(Er(s)){r+=1,o=n.length,t+=1;break}if(Nr(s)){if(o>=n.length)return null;r+=2,o=n.length,t+=1;break}let a=n[o];if(a===void 0)return null;if(Lr(s)){r+=5,t+=1,o+=1;continue}if(s!==a)return null;r+=20,t+=1,o+=1}return t!==e.length||o!==n.length?null:r}async function Rr(){return Fn?null:Mn||(Mn=(async()=>{try{let e=await fetch(wr,{cache:"force-cache"});if(!e.ok)return Fn=!0,null;let n=await e.json();return!n||typeof n!="object"||!Array.isArray(n.entries)?(Fn=!0,null):n}catch{return Fn=!0,null}})(),Mn)}function Ir(e){let n=e.files.find(r=>r.kind==="page"),t=e.files.filter(r=>r.kind==="layout"),o=[];return n&&o.push({kind:"route-page",file:n.file,label:"Current page route",confidence:1,reason:"matched-current-url"}),t.forEach((r,s)=>{o.push({kind:"route-layout",file:r.file,label:s===t.length-1?"Nearest layout":"Ancestor layout",confidence:Math.max(.7,.95-s*.08),reason:"matched-layout-chain"})}),o}async function Ot(e){if(typeof window>"u")return null;let n=e??window.location.pathname,t=await Rr();if(!t)return null;let o=Sr(n),r=null,s=-1;for(let a of t.entries){let i=Tr(a.segments,o);i!==null&&i>s&&(s=i,r=a)}return r?{targets:Ir(r),context:{pathname:Wt(n),matchedRoute:r.route,source:"next-route-manifest"}}:null}function Vt(...e){let n=[],t=new Set;return e.forEach(o=>{o?.forEach(r=>{let s=`${r.kind}:${r.file}:${r.line??""}:${r.column??""}`;t.has(s)||(t.add(s),n.push(r))})}),n.sort((o,r)=>r.confidence-o.confidence)}function Kt(){let e=Vn();if(!e)throw new Error("\uC778\uC99D\uC774 \uD544\uC694\uD569\uB2C8\uB2E4");return e}async function Fe(e,n={}){let t=Kt(),o=await fetch(e,{...n,headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`,...n.headers}});if(!o.ok){if(o.status===401)throw new Error("\uC778\uC99D\uC774 \uB9CC\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.");let r=await o.json().catch(()=>({error:"\uC694\uCCAD \uC2E4\uD328"}));throw new Error(r.error||r.message||"\uC694\uCCAD \uC2E4\uD328")}return o}var Pn=new Map,Jn=new Map,mn=new Map,Mr=3e4;function Be(e){return`feedbacks:${e}`}function Xe(){return"feedbacks:__all__"}function De(e){return`comments:${e}`}function Re(e,n){Pn.set(e,{data:n,timestamp:Date.now()});let t=mn.get(e);t&&t.forEach(o=>o(n))}function ze(e){return Pn.get(e)?.data??null}function Fr(e){let n=Pn.get(e);return n?Date.now()-n.timestamp<=Mr:!1}function et(e){return Array.from(Pn.keys()).filter(n=>n.includes(e))}function Pr(e){let n=new Map;for(let t of et(e)){let o=ze(t);o!==null&&n.set(t,o)}return n}function Ar(e){e.forEach((n,t)=>Re(t,n))}function Gn(e,n){let t=n(ze(e));return Re(e,t),t}function $r(e,n){for(let t of et(e)){let o=ze(t);o!==null&&Re(t,n(o))}}async function _n(e,n){let t=Jn.get(e);if(t)return t;let o=(async()=>{try{let r=await n();return Re(e,r),r}finally{Jn.delete(e)}})();return Jn.set(e,o),o}async function nt(e,n,t={}){let o=ze(e);return o!==null&&!t.force?((t.staleWhileRevalidate||!Fr(e))&&_n(e,n),o):_n(e,n)}function pn(e,n){let t=mn.get(e)||new Set;return t.add(n),mn.set(e,t),()=>{let o=mn.get(e);o&&(o.delete(n),o.size===0&&mn.delete(e))}}function Ye(e){return ze(e)}async function Zt(e,n){let t=`temp-task-${Date.now()}`,o=n.feedbackUrl,r=n.feedbackMarker,s=o?ze(Be(o))||[]:null,a=ze(Xe()),i=o?{id:t,taskNumber:0,title:n.title,status:"todo",priority:n.priority,feedbackUrl:o,feedbackMarker:r||null,createdAt:new Date().toISOString(),commentCount:0,_optimistic:!0}:null;o&&i&&(Re(Be(o),[i,...s]),a&&Re(Xe(),[i,...a]));try{let k=await(await Fe(e,{method:"POST",body:JSON.stringify(n)})).json().catch(()=>({}));if(o&&i){let y={...i,id:k.taskId||t,taskNumber:k.taskNumber||0,_optimistic:!1};Gn(Be(o),v=>(v||[]).map(C=>C.id===t?y:C)),a&&Gn(Xe(),v=>(v||[]).map(C=>C.id===t?y:C)),Yt(e,o).catch(()=>{}),a&&Qt(e).catch(()=>{})}return k}catch(_){throw o&&s&&Re(Be(o),s),a&&Re(Xe(),a),_}}async function Ut(e,n,t={}){let o=Be(n);return nt(o,async()=>(await(await Fe(`${e}?url=${encodeURIComponent(n)}`)).json()).tasks||[],t)}async function Xt(e,n={}){let t=Xe();return nt(t,async()=>(await(await Fe(`${e}?url=__all__`)).json()).tasks||[],n)}async function Yt(e,n){let t=Be(n);return _n(t,async()=>(await(await Fe(`${e}?url=${encodeURIComponent(n)}`)).json()).tasks||[])}async function Qt(e){let n=Xe();return _n(n,async()=>(await(await Fe(`${e}?url=__all__`)).json()).tasks||[])}async function An(e,n,t={}){let o=De(n);return nt(o,async()=>(await(await Fe(`${e}/${n}/comments`)).json()).comments||[],t)}async function Hr(e,n){let t=De(n);return _n(t,async()=>(await(await Fe(`${e}/${n}/comments`)).json()).comments||[])}function Br(e,n){$r("feedbacks:",t=>t.map(o=>o.id===e?{...o,commentCount:Math.max(0,(o.commentCount||0)+n)}:o))}function zr(e){et("feedbacks:").forEach(t=>{let o=t.replace("feedbacks:","");o==="__all__"?Qt(e).catch(()=>{}):Yt(e,o).catch(()=>{})})}async function $n(e,n,t,o,r,s,a){let i={id:`temp-${Date.now()}`,content:t,authorName:o,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()},_=De(n),k=ze(_)||[],y=Pr("feedbacks:");Re(_,[...k,i]),Br(n,1);try{let A=(await(await Fe(`${e}/${n}/comments`,{method:"POST",body:JSON.stringify({content:t,authorName:o,authorId:r,screenshot:s,...a&&{fileUrl:a.url,fileName:a.fileName,fileType:a.fileType,fileSize:a.fileSize,fileSource:a.fileSource}})})).json()).comment;return Gn(_,I=>(I||[]).map(H=>H.id===i.id?A:H)),Hr(e,n),zr(e),A}catch(v){throw Re(_,k),Ar(y),v}}var Dr=4.5*1024*1024;async function Hn(e,n,t,o){if(n.size>Dr)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=Kt(),s=new FormData;s.append("file",n),s.append("context",t),o&&s.append("taskId",o);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 Bn(e,n={}){let t=new URLSearchParams;n.since&&t.set("since",n.since),n.date&&t.set("date",n.date),n.limit&&t.set("limit",String(n.limit));let o=t.toString(),r=`${e}/history${o?`?${o}`:""}`;return(await(await Fe(r)).json()).events||[]}var gn=require("@jridgewell/trace-mapping"),fn=new Map,qt=new Set;async function jr(e){try{let n=await fetch(e,{cache:"force-cache"});if(!n.ok)return null;let o=(await n.text()).match(/\/\/[#@]\s*sourceMappingURL\s*=\s*(\S+)\s*$/m);if(!o)return null;let r=o[1];return r.startsWith("http")?r:e.substring(0,e.lastIndexOf("/")+1)+r}catch{return null}}async function Wr(e){if(fn.has(e))return fn.get(e)??null;if(qt.has(e))return null;let n=e.endsWith(".map")?e:`${e}.map`;try{let o=await fetch(n,{cache:"force-cache"});if(o.ok){let r=await o.json(),s=new gn.AnyMap(r);return fn.set(e,s),s}}catch{}let t=await jr(e);if(t)try{let o=await fetch(t,{cache:"force-cache"});if(o.ok){let r=await o.json(),s=new gn.AnyMap(r);return fn.set(e,s),s}}catch{}return qt.add(e),fn.set(e,null),null}async function Or(e,n,t){let o;try{e.startsWith("http")?o=e:o=new URL(e,window.location.origin).href}catch{return null}let r=await Wr(o);if(!r)return null;try{let s=(0,gn.originalPositionFor)(r,{line:n,column:t});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 tt(e){if(!e)return null;let n=e.match(/^(.+):(\d+):(\d+)$/);if(!n)return null;let[,t,o,r]=n,s=parseInt(o,10),a=parseInt(r,10);return isNaN(s)||isNaN(a)?null:Or(t,s,a)}var Vr=`@keyframes styles-module__markerIn___7B1j9 {
336
+ `)}`;if(typeof n=="object"&&n!==null)try{return JSON.stringify(n).slice(0,300)}catch{return String(n)}return String(n)}).join(" ")}function fn(e,n){gn.push({level:e,message:n.slice(0,500),timestamp:Date.now()}),gn.length>50&&gn.shift()}function Ss(){if(Vt||typeof window>"u")return;Vt=!0;let e=console.error,n=console.warn,t=console.log;console.error=(...o)=>{let s=et(o);we.push(s.slice(0,500)),we.length>20&&we.shift(),fn("error",s),e.apply(console,o)},console.warn=(...o)=>{let s=et(o);we.push(`[warn] ${s}`.slice(0,500)),we.length>20&&we.shift(),fn("warn",s),n.apply(console,o)},console.log=(...o)=>{fn("log",et(o)),t.apply(console,o)},window.addEventListener("error",o=>{let s=`${o.message} (${o.filename}:${o.lineno})`;we.push(s.slice(0,500)),we.length>20&&we.shift(),fn("error",s)}),window.addEventListener("unhandledrejection",o=>{let s=`Unhandled Promise: ${o.reason}`;we.push(s.slice(0,500)),we.length>20&&we.shift(),fn("error",s)})}Ss();function Ls(e){let n=e.match(/Edg\/(\d+[\d.]*)/);if(n)return`Edge ${n[1]}`;let t=e.match(/Chrome\/(\d+[\d.]*)/);if(t&&!e.includes("Edg/")&&!e.includes("OPR/"))return`Chrome ${t[1]}`;let o=e.match(/Firefox\/(\d+[\d.]*)/);if(o)return`Firefox ${o[1]}`;let s=e.match(/Version\/(\d+[\d.]*).*Safari/);if(s)return`Safari ${s[1]}`;let r=e.match(/OPR\/(\d+[\d.]*)/);return r?`Opera ${r[1]}`:e}var Ns=[/session/i,/csrf/i,/xsrf/i,/secret/i,/password/i,/key/i];function Ts(){if(typeof document>"u")return{};let e={};try{document.cookie.split(";").forEach(n=>{let[t,...o]=n.trim().split("=");if(!t)return;let s=t.trim(),r=Ns.some(a=>a.test(s));e[s]=r?"[masked]":decodeURIComponent(o.join("=")).slice(0,200)})}catch{}return e}function Zt(e){try{let n=e.split(".");if(n.length!==3)return null;let t=n[1].replace(/-/g,"+").replace(/_/g,"/"),o=t+"==".slice(0,(4-t.length%4)%4);return JSON.parse(atob(o))}catch{return null}}function Is(){if(typeof window>"u")return null;let e=["token","access_token","accessToken","auth_token","authToken","jwt","id_token","idToken"];for(let n of e)try{let t=localStorage.getItem(n);if(t){let o=t.startsWith('"')?JSON.parse(t):t,s=Zt(o);if(s){let r={},a=["sub","email","name","role","roles","org","iat","exp","aud","iss","user_id","user_role"];for(let i of a)i in s&&(r[i]=s[i]);return Object.keys(r).length>0?r:null}}}catch{continue}try{let n=document.cookie.split(";");for(let t of n){let[,...o]=t.trim().split("="),s=o.join("="),r=Zt(s);if(r&&r.sub){let a={},i=["sub","email","name","role","roles","org","iat","exp"];for(let _ of i)_ in r&&(a[_]=r[_]);return Object.keys(a).length>0?a:null}}}catch{}return null}function Qe(e){let n=Math.round(e);return isNaN(n)||!isFinite(n)?void 0:n}function Es(){if(typeof performance>"u")return{};let e={};try{let n=performance.getEntriesByType("navigation")[0];if(n){let s=Qe(n.loadEventEnd-n.startTime),r=Qe(n.domContentLoadedEventEnd-n.startTime),a=Qe(n.responseStart-n.requestStart);s&&(e.pageLoadTime=s),r&&(e.domContentLoaded=r),a&&(e.ttfb=a)}let t=performance.getEntriesByName("first-contentful-paint")[0];if(t){let s=Qe(t.startTime);s&&(e.firstContentfulPaint=s)}let o=performance.memory;if(o){let s=Qe(o.usedJSHeapSize/1024/1024),r=Qe(o.totalJSHeapSize/1024/1024);s&&(e.usedJSHeapMB=s),r&&(e.totalJSHeapMB=r)}}catch{}return e}function Kt(e){let n={url:window.location.href,timestamp:new Date().toISOString(),browser:Ls(navigator.userAgent),userAgent:navigator.userAgent,viewport:`${window.innerWidth}x${window.innerHeight}`,pixelRatio:window.devicePixelRatio,language:navigator.language,referrer:document.referrer,cookies:Ts(),jwtClaims:Is()??void 0,consoleErrors:we.length>0?[...we]:void 0,consoleLogs:gn.length>0?[...gn]:void 0,performance:Es()};if(e)try{let t=e();t&&(n.user={...t,id:String(t.id),name:String(t.name||"")})}catch{}return n}var Rs="/_next/static/chunks/impakers-debug-route-manifest.json",$n=null,Hn=!1;function Ut(e){return!e||e==="/"?"/":e.endsWith("/")?e.slice(0,-1)||"/":e}function Ms(e){let n=Ut(e);return n==="/"?[]:n.slice(1).split("/").map(t=>decodeURIComponent(t)).filter(Boolean)}function As(e){return/^\[[^\]]+\]$/.test(e)}function Fs(e){return/^\[\.\.\.[^\]]+\]$/.test(e)}function Ps(e){return/^\[\[\.\.\.[^\]]+\]\]$/.test(e)}function $s(e,n){let t=0,o=0,s=0;for(;t<e.length;){let r=e[t];if(Ps(r)){s+=1,o=n.length,t+=1;break}if(Fs(r)){if(o>=n.length)return null;s+=2,o=n.length,t+=1;break}let a=n[o];if(a===void 0)return null;if(As(r)){s+=5,t+=1,o+=1;continue}if(r!==a)return null;s+=20,t+=1,o+=1}return t!==e.length||o!==n.length?null:s}async function Hs(){return Hn?null:$n||($n=(async()=>{try{let e=await fetch(Rs,{cache:"force-cache"});if(!e.ok)return Hn=!0,null;let n=await e.json();return!n||typeof n!="object"||!Array.isArray(n.entries)?(Hn=!0,null):n}catch{return Hn=!0,null}})(),$n)}function Bs(e){let n=e.files.find(s=>s.kind==="page"),t=e.files.filter(s=>s.kind==="layout"),o=[];return n&&o.push({kind:"route-page",file:n.file,label:"Current page route",confidence:1,reason:"matched-current-url"}),t.forEach((s,r)=>{o.push({kind:"route-layout",file:s.file,label:r===t.length-1?"Nearest layout":"Ancestor layout",confidence:Math.max(.7,.95-r*.08),reason:"matched-layout-chain"})}),o}async function Xt(e){if(typeof window>"u")return null;let n=e??window.location.pathname,t=await Hs();if(!t)return null;let o=Ms(n),s=null,r=-1;for(let a of t.entries){let i=$s(a.segments,o);i!==null&&i>r&&(r=i,s=a)}return s?{targets:Bs(s),context:{pathname:Ut(n),matchedRoute:s.route,source:"next-route-manifest"}}:null}function Yt(...e){let n=[],t=new Set;return e.forEach(o=>{o?.forEach(s=>{let r=`${s.kind}:${s.file}:${s.line??""}:${s.column??""}`;t.has(r)||(t.add(r),n.push(s))})}),n.sort((o,s)=>s.confidence-o.confidence)}function Qt(){let e=dn();if(!e)throw new Error("\uC778\uC99D\uC774 \uD544\uC694\uD569\uB2C8\uB2E4");return e}async function Be(e,n={}){let t=Qt(),o=await fetch(e,{...n,headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`,...n.headers}});if(!o.ok){if(o.status===401)throw new Error("\uC778\uC99D\uC774 \uB9CC\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.");let s=await o.json().catch(()=>({error:"\uC694\uCCAD \uC2E4\uD328"}));throw new Error(s.error||s.message||"\uC694\uCCAD \uC2E4\uD328")}return o}var Bn=new Map,nt=new Map,hn=new Map,zs=3e4;function De(e){return`feedbacks:${e}`}function qe(){return"feedbacks:__all__"}function We(e){return`comments:${e}`}function $e(e,n){Bn.set(e,{data:n,timestamp:Date.now()});let t=hn.get(e);t&&t.forEach(o=>o(n))}function je(e){return Bn.get(e)?.data??null}function Ds(e){let n=Bn.get(e);return n?Date.now()-n.timestamp<=zs:!1}function ot(e){return Array.from(Bn.keys()).filter(n=>n.includes(e))}function js(e){let n=new Map;for(let t of ot(e)){let o=je(t);o!==null&&n.set(t,o)}return n}function Ws(e){e.forEach((n,t)=>$e(t,n))}function tt(e,n){let t=n(je(e));return $e(e,t),t}function Os(e,n){for(let t of ot(e)){let o=je(t);o!==null&&$e(t,n(o))}}async function yn(e,n){let t=nt.get(e);if(t)return t;let o=(async()=>{try{let s=await n();return $e(e,s),s}finally{nt.delete(e)}})();return nt.set(e,o),o}async function st(e,n,t={}){let o=je(e);return o!==null&&!t.force?((t.staleWhileRevalidate||!Ds(e))&&yn(e,n),o):yn(e,n)}function bn(e,n){let t=hn.get(e)||new Set;return t.add(n),hn.set(e,t),()=>{let o=hn.get(e);o&&(o.delete(n),o.size===0&&hn.delete(e))}}function Ge(e){return je(e)}async function qt(e,n){let t=`temp-task-${Date.now()}`,o=n.feedbackUrl,s=n.feedbackMarker,r=o?je(De(o))||[]:null,a=je(qe()),i=o?{id:t,taskNumber:0,title:n.title,status:"todo",priority:n.priority,feedbackUrl:o,feedbackMarker:s||null,createdAt:new Date().toISOString(),commentCount:0,_optimistic:!0}:null;o&&i&&($e(De(o),[i,...r]),a&&$e(qe(),[i,...a]));try{let k=await(await Be(e,{method:"POST",body:JSON.stringify(n)})).json().catch(()=>({}));if(o&&i){let b={...i,id:k.taskId||t,taskNumber:k.taskNumber||0,_optimistic:!1};tt(De(o),C=>(C||[]).map(v=>v.id===t?b:v)),a&&tt(qe(),C=>(C||[]).map(v=>v.id===t?b:v)),eo(e,o).catch(()=>{}),a&&no(e).catch(()=>{})}return k}catch(_){throw o&&r&&$e(De(o),r),a&&$e(qe(),a),_}}async function Gt(e,n,t={}){let o=De(n);return st(o,async()=>(await(await Be(`${e}?url=${encodeURIComponent(n)}`)).json()).tasks||[],t)}async function Jt(e,n={}){let t=qe();return st(t,async()=>(await(await Be(`${e}?url=__all__`)).json()).tasks||[],n)}async function eo(e,n){let t=De(n);return yn(t,async()=>(await(await Be(`${e}?url=${encodeURIComponent(n)}`)).json()).tasks||[])}async function no(e){let n=qe();return yn(n,async()=>(await(await Be(`${e}?url=__all__`)).json()).tasks||[])}async function zn(e,n,t={}){let o=We(n);return st(o,async()=>(await(await Be(`${e}/${n}/comments`)).json()).comments||[],t)}async function Vs(e,n){let t=We(n);return yn(t,async()=>(await(await Be(`${e}/${n}/comments`)).json()).comments||[])}function Zs(e,n){Os("feedbacks:",t=>t.map(o=>o.id===e?{...o,commentCount:Math.max(0,(o.commentCount||0)+n)}:o))}function Ks(e){ot("feedbacks:").forEach(t=>{let o=t.replace("feedbacks:","");o==="__all__"?no(e).catch(()=>{}):eo(e,o).catch(()=>{})})}async function Dn(e,n,t,o,s,r,a){let i={id:`temp-${Date.now()}`,content:t,authorName:o,authorId:s,imageUrl:r||void 0,fileUrl:a?.url,fileName:a?.fileName,fileType:a?.fileType,fileSize:a?.fileSize,fileSource:a?.fileSource,createdAt:new Date().toISOString()},_=We(n),k=je(_)||[],b=js("feedbacks:");$e(_,[...k,i]),Zs(n,1);try{let $=(await(await Be(`${e}/${n}/comments`,{method:"POST",body:JSON.stringify({content:t,authorName:o,authorId:s,screenshot:r,...a&&{fileUrl:a.url,fileName:a.fileName,fileType:a.fileType,fileSize:a.fileSize,fileSource:a.fileSource}})})).json()).comment;return tt(_,F=>(F||[]).map(H=>H.id===i.id?$:H)),Vs(e,n),Ks(e),$}catch(C){throw $e(_,k),Ws(b),C}}var Us=4.5*1024*1024;async function jn(e,n,t,o){if(n.size>Us)throw new Error(`\uD30C\uC77C \uD06C\uAE30\uAC00 4.5MB\uB97C \uCD08\uACFC\uD569\uB2C8\uB2E4. (${(n.size/1024/1024).toFixed(1)}MB)`);let s=Qt(),r=new FormData;r.append("file",n),r.append("context",t),o&&r.append("taskId",o);let a=await fetch(`${e}/upload`,{method:"POST",headers:{Authorization:`Bearer ${s}`},body:r});if(!a.ok){if(a.status===401)throw new Error("\uC778\uC99D\uC774 \uB9CC\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.");if(a.status===413)throw new Error("\uD30C\uC77C \uD06C\uAE30\uAC00 4.5MB\uB97C \uCD08\uACFC\uD569\uB2C8\uB2E4.");let i=await a.json().catch(()=>({error:"\uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328"}));throw new Error(i.error||"\uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328")}return a.json()}async function Wn(e,n={}){let t=new URLSearchParams;n.since&&t.set("since",n.since),n.date&&t.set("date",n.date),n.limit&&t.set("limit",String(n.limit));let o=t.toString(),s=`${e}/history${o?`?${o}`:""}`;return(await(await Be(s)).json()).events||[]}var kn=require("@jridgewell/trace-mapping"),xn=new Map,to=new Set;async function Xs(e){try{let n=await fetch(e,{cache:"force-cache"});if(!n.ok)return null;let o=(await n.text()).match(/\/\/[#@]\s*sourceMappingURL\s*=\s*(\S+)\s*$/m);if(!o)return null;let s=o[1];return s.startsWith("http")?s:e.substring(0,e.lastIndexOf("/")+1)+s}catch{return null}}async function Ys(e){if(xn.has(e))return xn.get(e)??null;if(to.has(e))return null;let n=e.endsWith(".map")?e:`${e}.map`;try{let o=await fetch(n,{cache:"force-cache"});if(o.ok){let s=await o.json(),r=new kn.AnyMap(s);return xn.set(e,r),r}}catch{}let t=await Xs(e);if(t)try{let o=await fetch(t,{cache:"force-cache"});if(o.ok){let s=await o.json(),r=new kn.AnyMap(s);return xn.set(e,r),r}}catch{}return to.add(e),xn.set(e,null),null}async function Qs(e,n,t){let o;try{e.startsWith("http")?o=e:o=new URL(e,window.location.origin).href}catch{return null}let s=await Ys(o);if(!s)return null;try{let r=(0,kn.originalPositionFor)(s,{line:n,column:t});if(!r.source)return null;let a=r.source;return a=a.replace(/^webpack:\/\/\//,""),a=a.replace(/^turbopack:\/\/\//,""),a=a.replace(/^\[project\]\//,""),a=a.replace(/^\.\//,""),a.includes("node_modules/")?null:{source:a,line:r.line??0,column:r.column??0,name:r.name??null}}catch{return null}}async function rt(e){if(!e)return null;let n=e.match(/^(.+):(\d+):(\d+)$/);if(!n)return null;let[,t,o,s]=n,r=parseInt(o,10),a=parseInt(s,10);return isNaN(r)||isNaN(a)?null:Qs(t,r,a)}var qs=`@keyframes styles-module__markerIn___7B1j9 {
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
- }`,Kr={marker:"styles-module__marker___7PVX9",enter:"styles-module__enter___V7KfW",markerIn:"styles-module__markerIn___7B1j9",hovered:"styles-module__hovered___ojzb7",done:"styles-module__done___J6WOE",pending:"styles-module__pending___qQbOR",markerTooltip:"styles-module__markerTooltip___ns-gQ",tooltipIn:"styles-module__tooltipIn___3o7t0",markerQuote:"styles-module__markerQuote___1bRQp",markerNote:"styles-module__markerNote___3iWm4"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-annotation-marker-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-annotation-marker-styles",document.head.appendChild(e)),e.textContent=Vr}var Le=Kr;var Ne=require("react/jsx-runtime"),Zr="#3b82f6",Ur="#9ca3af";function ot({annotation:e,layerIndex:n,isAnimated:t,isHovered:o,accentColor:r,onHover:s,onHoverEnd:a,onClick:i}){let _=t?"":Le.enter,k=e.status==="done"||e.status==="resolved",y=e.status==="in_progress",v=k?Ur:y?Zr:r;return(0,Ne.jsxs)("div",{className:`${Le.marker} ${_} ${o?Le.hovered:""} ${k?Le.done:""}`,"data-annotation-marker":!0,style:{left:`${e.x}%`,top:e.y,backgroundColor:v,animationDelay:`${n*20}ms`},onMouseEnter:s,onMouseLeave:a,onClick:C=>{C.stopPropagation(),i()},children:[(0,Ne.jsx)("span",{children:n+1}),o&&(0,Ne.jsxs)("div",{className:`${Le.markerTooltip} ${Le.enter}`,children:[(0,Ne.jsx)("span",{className:Le.markerQuote,children:e.element}),e.comment&&(0,Ne.jsx)("span",{className:Le.markerNote,children:e.comment})]})]})}function Jt({x:e,y:n,accentColor:t}){return(0,Ne.jsx)("div",{className:`${Le.pending} ${Le.enter}`,"data-annotation-marker":!0,style:{left:`${e}%`,top:n,backgroundColor:t},children:(0,Ne.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",children:[(0,Ne.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,Ne.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})})}var X=require("react");var Xr=`@keyframes styles-module__spin___h0C6p {
443
+ }`,Gs={marker:"styles-module__marker___7PVX9",enter:"styles-module__enter___V7KfW",markerIn:"styles-module__markerIn___7B1j9",hovered:"styles-module__hovered___ojzb7",done:"styles-module__done___J6WOE",pending:"styles-module__pending___qQbOR",markerTooltip:"styles-module__markerTooltip___ns-gQ",tooltipIn:"styles-module__tooltipIn___3o7t0",markerQuote:"styles-module__markerQuote___1bRQp",markerNote:"styles-module__markerNote___3iWm4"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-annotation-marker-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-annotation-marker-styles",document.head.appendChild(e)),e.textContent=qs}var Ae=Gs;var Fe=require("react/jsx-runtime"),Js="#3b82f6",er="#9ca3af";function it({annotation:e,layerIndex:n,isAnimated:t,isHovered:o,accentColor:s,onHover:r,onHoverEnd:a,onClick:i}){let _=t?"":Ae.enter,k=e.status==="done"||e.status==="resolved",b=e.status==="in_progress",C=k?er:b?Js:s;return(0,Fe.jsxs)("div",{className:`${Ae.marker} ${_} ${o?Ae.hovered:""} ${k?Ae.done:""}`,"data-annotation-marker":!0,style:{left:`${e.x}%`,top:e.y,backgroundColor:C,animationDelay:`${n*20}ms`},onMouseEnter:r,onMouseLeave:a,onClick:v=>{v.stopPropagation(),i()},children:[(0,Fe.jsx)("span",{children:n+1}),o&&(0,Fe.jsxs)("div",{className:`${Ae.markerTooltip} ${Ae.enter}`,children:[(0,Fe.jsx)("span",{className:Ae.markerQuote,children:e.element}),e.comment&&(0,Fe.jsx)("span",{className:Ae.markerNote,children:e.comment})]})]})}function oo({x:e,y:n,accentColor:t}){return(0,Fe.jsx)("div",{className:`${Ae.pending} ${Ae.enter}`,"data-annotation-marker":!0,style:{left:`${e}%`,top:n,backgroundColor:t},children:(0,Fe.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",children:[(0,Fe.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,Fe.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})})}var te=require("react");var nr=`@keyframes styles-module__spin___h0C6p {
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
- }`,Yr={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=Xr}var zn=Yr;var hn=require("react/jsx-runtime");function Dn({message:e="\uB85C\uB529 \uC911..."}){return(0,hn.jsxs)("div",{className:zn.container,children:[(0,hn.jsx)("div",{className:zn.spinner}),(0,hn.jsx)("span",{className:zn.message,children:e})]})}var Qr=`@keyframes styles-module__threadIn___pBTFZ {
469
+ }`,tr={container:"styles-module__container___YKn1h",spinner:"styles-module__spinner___4ELZK",spin:"styles-module__spin___h0C6p",message:"styles-module__message___70Ayy"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-loading-spinner-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-loading-spinner-styles",document.head.appendChild(e)),e.textContent=nr}var On=tr;var vn=require("react/jsx-runtime");function Vn({message:e="\uB85C\uB529 \uC911..."}){return(0,vn.jsxs)("div",{className:On.container,children:[(0,vn.jsx)("div",{className:On.spinner}),(0,vn.jsx)("span",{className:On.message,children:e})]})}var or=`@keyframes styles-module__threadIn___pBTFZ {
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
- }`,qr={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=Qr}var S=qr;var p=require("react/jsx-runtime");function Gt(e){let n=new Date(e),t=Date.now()-n.getTime(),o=_=>String(_).padStart(2,"0"),r=`${n.getMonth()+1}/${n.getDate()} ${o(n.getHours())}:${o(n.getMinutes())}`,s=Math.floor(t/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 eo(e){return e.slice(0,1).toUpperCase()}function no(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(0)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`}function to(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 oo({task:e,currentUserName:n,currentUserId:t,left:o,top:r,bottom:s,loading:a,onClose:i,onReply:_}){let[k,y]=(0,X.useState)(""),[v,C]=(0,X.useState)(!1),[A,I]=(0,X.useState)(null),[H,K]=(0,X.useState)(null),[ae,_e]=(0,X.useState)(!1),re=(0,X.useRef)(null),R=(0,X.useRef)(null),[N,q]=(0,X.useState)(null),b=(0,X.useRef)(null);(0,X.useEffect)(()=>{R.current&&(R.current.scrollTop=R.current.scrollHeight),re.current?.focus()},[e.comments.length]),(0,X.useEffect)(()=>{if(ae)return;let g=h=>{let Z=h.target;Z.closest(`.${S.thread}`)||Z.closest("[data-annotation-marker]")||Z.closest("[data-impakers-debug]")||P()};return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[ae]);let P=(0,X.useCallback)(()=>{C(!0),setTimeout(()=>i(),120)},[i]),E=(0,X.useCallback)(()=>{!k.trim()&&!A&&!H||(_(e.id,k.trim(),A||void 0,H||void 0),y(""),I(null),K(null))},[k,A,H,e.id,_]),pe=(0,X.useCallback)(g=>{g.stopPropagation(),!g.nativeEvent.isComposing&&(g.key==="Enter"&&!g.shiftKey&&(g.preventDefault(),E()),g.key==="Escape"&&P())},[P,E]),T=(0,X.useCallback)(()=>{_e(!0);let g=document.querySelectorAll("[data-impakers-debug], [data-annotation-marker]");g.forEach(M=>M.style.visibility="hidden"),document.documentElement.classList.add("impakers-selecting");let h=null,Z=M=>{h||(h=document.createElement("div"),h.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(h)),h.style.left=`${M.left}px`,h.style.top=`${M.top}px`,h.style.width=`${M.width}px`,h.style.height=`${M.height}px`},ce=()=>{document.removeEventListener("mousemove",Pe),document.removeEventListener("click",Ae,!0),document.removeEventListener("keydown",Ie),document.documentElement.classList.remove("impakers-selecting"),h?.remove(),g.forEach(M=>M.style.visibility=""),_e(!1)},Pe=M=>{let Ce=document.elementFromPoint(M.clientX,M.clientY);!Ce||Ce===h||Z(Ce.getBoundingClientRect())},Ie=M=>{M.key==="Escape"&&ce()},Ae=async M=>{M.preventDefault(),M.stopPropagation(),M.stopImmediatePropagation();let Ce=document.elementFromPoint(M.clientX,M.clientY);if(ce(),!!Ce){try{let we=await In(Ce);I(we)}catch(we){console.error("[@impakers/debug] DOM \uC2A4\uD06C\uB9B0\uC0F7 \uC2E4\uD328:",we)}re.current?.focus()}};document.addEventListener("mousemove",Pe),document.addEventListener("click",Ae,!0),document.addEventListener("keydown",Ie)},[]),Y=(0,X.useCallback)(()=>{T()},[T]),le=(0,X.useCallback)(()=>{b.current?.click()},[]),be=(0,X.useCallback)(g=>{let h=g.target.files?.[0];if(h){if(h.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(h.type.startsWith("image/")){K(null);let Z=new FileReader;Z.onload=()=>{I(Z.result)},Z.readAsDataURL(h)}else I(null),K(h);g.target.value=""}},[]),Te=e.title.replace(/^\[피드백\]\s*/,""),de={left:o,...r!==void 0?{top:r}:{},...s!==void 0?{bottom:s}:{},"--thread-top":`${r!==void 0?r:40}px`};return(0,p.jsxs)("div",{className:`${S.thread} ${v?S.exiting:""}`,style:de,"data-impakers-debug":"",onClick:g=>g.stopPropagation(),children:[(0,p.jsxs)("div",{className:S.header,children:[(0,p.jsx)("div",{className:S.avatar,children:eo(e.authorName||n)}),(0,p.jsxs)("div",{className:S.headerInfo,children:[(0,p.jsxs)("div",{className:S.headerTop,children:[(0,p.jsx)("span",{className:S.authorName,children:e.authorName||n}),(0,p.jsx)("span",{className:S.timestamp,children:Gt(e.createdAt)})]}),(0,p.jsx)("div",{className:S.title,children:Te})]}),(0,p.jsx)("div",{className:S.headerActions,children:(0,p.jsx)("button",{className:S.headerAction,onClick:P,title:"\uB2EB\uAE30",type:"button",children:(0,p.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,p.jsx)("path",{d:"M18 6L6 18M6 6l12 12"})})})})]}),a&&e.comments.length===0&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("div",{className:S.divider}),(0,p.jsx)(Dn,{message:"\uB313\uAE00 \uB85C\uB529 \uC911..."})]}),e.comments.length>0&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("div",{className:S.divider}),(0,p.jsx)("div",{className:S.commentsList,ref:R,children:e.comments.map(g=>(0,p.jsxs)("div",{className:S.comment,children:[(0,p.jsx)("div",{className:S.avatar,style:{width:22,height:22,fontSize:10},children:eo(g.authorName)}),(0,p.jsxs)("div",{className:S.commentContent,children:[(0,p.jsxs)("div",{className:S.commentTop,children:[(0,p.jsx)("span",{className:S.commentAuthor,children:g.authorName}),(0,p.jsx)("span",{className:S.commentTime,children:Gt(g.createdAt)})]}),g.content&&(0,p.jsx)("div",{className:S.commentText,children:g.content}),g.imageUrl&&g.imageUrl!=="loading..."&&(0,p.jsx)("div",{className:S.screenshot,onClick:()=>q(g.imageUrl),style:{cursor:"pointer"},children:(0,p.jsx)("img",{src:g.imageUrl,alt:"screenshot"})}),g.fileUrl&&(0,p.jsxs)("a",{className:S.fileCard,href:g.fileUrl,target:"_blank",rel:"noopener noreferrer",onClick:h=>h.stopPropagation(),children:[(0,p.jsx)("span",{className:S.fileIcon,children:to(g.fileType||"")}),(0,p.jsxs)("span",{className:S.fileInfo,children:[(0,p.jsx)("span",{className:S.fileCardName,children:g.fileName||"\uD30C\uC77C"}),g.fileSize!=null&&(0,p.jsx)("span",{className:S.fileCardSize,children:no(g.fileSize)})]})]})]})]},g.id))})]}),A&&(0,p.jsxs)("div",{className:S.pendingImage,children:[(0,p.jsx)("img",{src:A,alt:"pending"}),(0,p.jsx)("button",{className:S.pendingRemove,onClick:()=>I(null),type:"button",children:"\xD7"})]}),H&&(0,p.jsxs)("div",{className:S.pendingFile,children:[(0,p.jsx)("span",{className:S.fileIcon,children:to(H.type)}),(0,p.jsxs)("span",{className:S.fileInfo,children:[(0,p.jsx)("span",{className:S.fileCardName,children:H.name}),(0,p.jsx)("span",{className:S.fileCardSize,children:no(H.size)})]}),(0,p.jsx)("button",{className:S.pendingRemove,onClick:()=>K(null),type:"button",children:"\xD7"})]}),(0,p.jsx)("div",{className:S.replyArea,children:(0,p.jsx)("textarea",{ref:re,className:S.replyInput,placeholder:"Reply...",value:k,onChange:g=>{y(g.target.value);let h=g.target;h.style.height="auto",h.style.height=`${Math.min(h.scrollHeight,120)}px`},onKeyDown:pe,rows:2})}),(0,p.jsxs)("div",{className:S.replyToolbar,children:[(0,p.jsx)("button",{className:S.replyTool,onClick:le,type:"button",title:"\uD30C\uC77C \uCCA8\uBD80",children:(0,p.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,p.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,p.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}),(0,p.jsx)("button",{className:S.replyTool,onClick:Y,type:"button",title:"\uC694\uC18C \uC2A4\uD06C\uB9B0\uC0F7",children:(0,p.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,p.jsx)("path",{d:"M14.5 4h-5L7 7H4a2 2 0 00-2 2v9a2 2 0 002 2h16a2 2 0 002-2V9a2 2 0 00-2-2h-3l-2.5-3z"}),(0,p.jsx)("circle",{cx:"12",cy:"13",r:"3"})]})}),(0,p.jsx)("button",{className:`${S.replySend} ${k.trim()||A||H?S.active:""}`,onClick:E,disabled:!k.trim()&&!A&&!H,type:"button",title:"\uC804\uC1A1",children:(0,p.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,p.jsx)("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),(0,p.jsx)("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]}),(0,p.jsx)("input",{ref:b,type:"file",accept:"*/*",style:{display:"none"},onChange:be}),N&&(0,p.jsxs)("div",{className:S.lightbox,onClick:()=>q(null),"data-impakers-debug":"",children:[(0,p.jsx)("img",{src:N,alt:"enlarged",onClick:g=>g.stopPropagation()}),(0,p.jsx)("button",{className:S.lightboxClose,onClick:()=>q(null),type:"button",children:"\xD7"})]})]})}var G=require("react");var Jr=`@keyframes styles-module__fabEnter___DMJoo {
953
+ }`,sr={thread:"styles-module__thread___ua2EO",threadIn:"styles-module__threadIn___pBTFZ",exiting:"styles-module__exiting___RIPeX",threadOut:"styles-module__threadOut___-ccKh",header:"styles-module__header___GiEBq",avatar:"styles-module__avatar___JElAd",headerInfo:"styles-module__headerInfo___E8809",headerTop:"styles-module__headerTop___eDiCd",authorName:"styles-module__authorName___T1BfB",timestamp:"styles-module__timestamp___WusBf",headerActions:"styles-module__headerActions___8FsMY",headerAction:"styles-module__headerAction___Tinmq",title:"styles-module__title___qkfqY",commentsList:"styles-module__commentsList___kYqAR",comment:"styles-module__comment___pW3IO",commentActions:"styles-module__commentActions___wO0fs",commentHighlight:"styles-module__commentHighlight___EiTmx",commentContent:"styles-module__commentContent___RObGr",commentTop:"styles-module__commentTop___BbTF3",commentAuthor:"styles-module__commentAuthor___tBjpl",commentTime:"styles-module__commentTime___0OLrz",commentText:"styles-module__commentText___ldy2V",screenshot:"styles-module__screenshot___jUqau",screenshotBadge:"styles-module__screenshotBadge___roEqY",fileCard:"styles-module__fileCard___-iOro",fileIcon:"styles-module__fileIcon___dNJMT",fileInfo:"styles-module__fileInfo___dVrLV",fileCardName:"styles-module__fileCardName___SHOj-",fileCardSize:"styles-module__fileCardSize___W53JL",pendingFile:"styles-module__pendingFile___-OSRs",divider:"styles-module__divider___kDjxN",pendingImage:"styles-module__pendingImage___gHaF3",pendingRemove:"styles-module__pendingRemove___FRL4h",replyArea:"styles-module__replyArea___VQn9b",replyInput:"styles-module__replyInput___uZNBW",replyToolbar:"styles-module__replyToolbar___fTFJU",replyTool:"styles-module__replyTool___Ho-Rx",replySend:"styles-module__replySend___e0VSb",active:"styles-module__active___R--Jj",empty:"styles-module__empty___XXGiw",statusBadge:"styles-module__statusBadge___el8ml",todo:"styles-module__todo___rUWBr",inProgress:"styles-module__inProgress___HEWgU",done:"styles-module__done___zC12n",lightbox:"styles-module__lightbox___KoWEF",lightboxClose:"styles-module__lightboxClose___tGZlm"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-comment-thread-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-comment-thread-styles",document.head.appendChild(e)),e.textContent=or}var L=sr;var p=require("react/jsx-runtime");function so(e){let n=new Date(e),t=Date.now()-n.getTime(),o=_=>String(_).padStart(2,"0"),s=`${n.getMonth()+1}/${n.getDate()} ${o(n.getHours())}:${o(n.getMinutes())}`,r=Math.floor(t/6e4);if(r<1)return`${s} (\uBC29\uAE08)`;if(r<60)return`${s} (${r}\uBD84 \uC804)`;let a=Math.floor(r/60);if(a<24)return`${s} (${a}\uC2DC\uAC04 \uC804)`;let i=Math.floor(a/24);return`${s} (${i}\uC77C \uC804)`}function ro(e){return e.slice(0,1).toUpperCase()}function io(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(0)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`}function ao(e){return e.includes("pdf")?"PDF":e.includes("spreadsheet")||e.includes("excel")||e.includes("csv")?"XLS":e.includes("presentation")||e.includes("powerpoint")?"PPT":e.includes("document")||e.includes("word")?"DOC":e.includes("zip")||e.includes("compressed")||e.includes("archive")?"ZIP":e.includes("video")?"VID":e.includes("audio")?"AUD":"FILE"}function lo({task:e,currentUserName:n,currentUserId:t,left:o,top:s,bottom:r,loading:a,onClose:i,onReply:_}){let[k,b]=(0,te.useState)(""),[C,v]=(0,te.useState)(!1),[$,F]=(0,te.useState)(null),[H,W]=(0,te.useState)(null),[ce,pe]=(0,te.useState)(!1),T=(0,te.useRef)(null),w=(0,te.useRef)(null),[I,O]=(0,te.useState)(null),x=(0,te.useRef)(null);(0,te.useEffect)(()=>{w.current&&(w.current.scrollTop=w.current.scrollHeight),T.current?.focus()},[e.comments.length]),(0,te.useEffect)(()=>{if(ce)return;let h=f=>{let B=f.target;B.closest(`.${L.thread}`)||B.closest("[data-annotation-marker]")||B.closest("[data-impakers-debug]")||A()};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[ce]);let A=(0,te.useCallback)(()=>{v(!0),setTimeout(()=>i(),120)},[i]),E=(0,te.useCallback)(()=>{!k.trim()&&!$&&!H||(_(e.id,k.trim(),$||void 0,H||void 0),b(""),F(null),W(null))},[k,$,H,e.id,_]),q=(0,te.useCallback)(h=>{h.stopPropagation(),!h.nativeEvent.isComposing&&(h.key==="Enter"&&!h.shiftKey&&(h.preventDefault(),E()),h.key==="Escape"&&A())},[A,E]),M=(0,te.useCallback)(()=>{pe(!0);let h=document.querySelectorAll("[data-impakers-debug], [data-annotation-marker]");h.forEach(G=>G.style.visibility="hidden"),document.documentElement.classList.add("impakers-selecting");let f=null,B=G=>{f||(f=document.createElement("div"),f.style.cssText="position:fixed;border:2px solid #3b82f6;background:rgba(59,130,246,0.05);border-radius:4px;pointer-events:none;z-index:999999;transition:all 0.08s ease",document.body.appendChild(f)),f.style.left=`${G.left}px`,f.style.top=`${G.top}px`,f.style.width=`${G.width}px`,f.style.height=`${G.height}px`},P=()=>{document.removeEventListener("mousemove",Le),document.removeEventListener("click",Re,!0),document.removeEventListener("keydown",Ne),document.documentElement.classList.remove("impakers-selecting"),f?.remove(),h.forEach(G=>G.style.visibility=""),pe(!1)},Le=G=>{let Ie=document.elementFromPoint(G.clientX,G.clientY);!Ie||Ie===f||B(Ie.getBoundingClientRect())},Ne=G=>{G.key==="Escape"&&P()},Re=async G=>{G.preventDefault(),G.stopPropagation(),G.stopImmediatePropagation();let Ie=document.elementFromPoint(G.clientX,G.clientY);if(P(),!!Ie){try{let ge=await Pn(Ie);F(ge)}catch(ge){console.error("[@impakers/debug] DOM \uC2A4\uD06C\uB9B0\uC0F7 \uC2E4\uD328:",ge)}T.current?.focus()}};document.addEventListener("mousemove",Le),document.addEventListener("click",Re,!0),document.addEventListener("keydown",Ne)},[]),J=(0,te.useCallback)(()=>{M()},[M]),se=(0,te.useCallback)(()=>{x.current?.click()},[]),fe=(0,te.useCallback)(h=>{let f=h.target.files?.[0];if(f){if(f.size>4.5*1024*1024){console.warn("[@impakers/debug] \uD30C\uC77C \uD06C\uAE30\uAC00 4.5MB\uB97C \uCD08\uACFC\uD569\uB2C8\uB2E4."),h.target.value="";return}if(f.type.startsWith("image/")){W(null);let B=new FileReader;B.onload=()=>{F(B.result)},B.readAsDataURL(f)}else F(null),W(f);h.target.value=""}},[]),ve=e.title.replace(/^\[피드백\]\s*/,""),le={left:o,...s!==void 0?{top:s}:{},...r!==void 0?{bottom:r}:{},"--thread-top":`${s!==void 0?s:40}px`};return(0,p.jsxs)("div",{className:`${L.thread} ${C?L.exiting:""}`,style:le,"data-impakers-debug":"",onClick:h=>h.stopPropagation(),children:[(0,p.jsxs)("div",{className:L.header,children:[(0,p.jsx)("div",{className:L.avatar,children:ro(e.authorName||n)}),(0,p.jsxs)("div",{className:L.headerInfo,children:[(0,p.jsxs)("div",{className:L.headerTop,children:[(0,p.jsx)("span",{className:L.authorName,children:e.authorName||n}),(0,p.jsx)("span",{className:L.timestamp,children:so(e.createdAt)})]}),(0,p.jsx)("div",{className:L.title,children:ve})]}),(0,p.jsx)("div",{className:L.headerActions,children:(0,p.jsx)("button",{className:L.headerAction,onClick:A,title:"\uB2EB\uAE30",type:"button",children:(0,p.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,p.jsx)("path",{d:"M18 6L6 18M6 6l12 12"})})})})]}),a&&e.comments.length===0&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("div",{className:L.divider}),(0,p.jsx)(Vn,{message:"\uB313\uAE00 \uB85C\uB529 \uC911..."})]}),e.comments.length>0&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("div",{className:L.divider}),(0,p.jsx)("div",{className:L.commentsList,ref:w,children:e.comments.map(h=>(0,p.jsxs)("div",{className:L.comment,children:[(0,p.jsx)("div",{className:L.avatar,style:{width:22,height:22,fontSize:10},children:ro(h.authorName)}),(0,p.jsxs)("div",{className:L.commentContent,children:[(0,p.jsxs)("div",{className:L.commentTop,children:[(0,p.jsx)("span",{className:L.commentAuthor,children:h.authorName}),(0,p.jsx)("span",{className:L.commentTime,children:so(h.createdAt)})]}),h.content&&(0,p.jsx)("div",{className:L.commentText,children:h.content}),h.imageUrl&&h.imageUrl!=="loading..."&&(0,p.jsx)("div",{className:L.screenshot,onClick:()=>O(h.imageUrl),style:{cursor:"pointer"},children:(0,p.jsx)("img",{src:h.imageUrl,alt:"screenshot"})}),h.fileUrl&&(0,p.jsxs)("a",{className:L.fileCard,href:h.fileUrl,target:"_blank",rel:"noopener noreferrer",onClick:f=>f.stopPropagation(),children:[(0,p.jsx)("span",{className:L.fileIcon,children:ao(h.fileType||"")}),(0,p.jsxs)("span",{className:L.fileInfo,children:[(0,p.jsx)("span",{className:L.fileCardName,children:h.fileName||"\uD30C\uC77C"}),h.fileSize!=null&&(0,p.jsx)("span",{className:L.fileCardSize,children:io(h.fileSize)})]})]})]})]},h.id))})]}),$&&(0,p.jsxs)("div",{className:L.pendingImage,children:[(0,p.jsx)("img",{src:$,alt:"pending"}),(0,p.jsx)("button",{className:L.pendingRemove,onClick:()=>F(null),type:"button",children:"\xD7"})]}),H&&(0,p.jsxs)("div",{className:L.pendingFile,children:[(0,p.jsx)("span",{className:L.fileIcon,children:ao(H.type)}),(0,p.jsxs)("span",{className:L.fileInfo,children:[(0,p.jsx)("span",{className:L.fileCardName,children:H.name}),(0,p.jsx)("span",{className:L.fileCardSize,children:io(H.size)})]}),(0,p.jsx)("button",{className:L.pendingRemove,onClick:()=>W(null),type:"button",children:"\xD7"})]}),(0,p.jsx)("div",{className:L.replyArea,children:(0,p.jsx)("textarea",{ref:T,className:L.replyInput,placeholder:"Reply...",value:k,onChange:h=>{b(h.target.value);let f=h.target;f.style.height="auto",f.style.height=`${Math.min(f.scrollHeight,120)}px`},onKeyDown:q,rows:2})}),(0,p.jsxs)("div",{className:L.replyToolbar,children:[(0,p.jsx)("button",{className:L.replyTool,onClick:se,type:"button",title:"\uD30C\uC77C \uCCA8\uBD80",children:(0,p.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,p.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,p.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}),(0,p.jsx)("button",{className:L.replyTool,onClick:J,type:"button",title:"\uC694\uC18C \uC2A4\uD06C\uB9B0\uC0F7",children:(0,p.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,p.jsx)("path",{d:"M14.5 4h-5L7 7H4a2 2 0 00-2 2v9a2 2 0 002 2h16a2 2 0 002-2V9a2 2 0 00-2-2h-3l-2.5-3z"}),(0,p.jsx)("circle",{cx:"12",cy:"13",r:"3"})]})}),(0,p.jsx)("button",{className:`${L.replySend} ${k.trim()||$||H?L.active:""}`,onClick:E,disabled:!k.trim()&&!$&&!H,type:"button",title:"\uC804\uC1A1",children:(0,p.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,p.jsx)("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),(0,p.jsx)("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]}),(0,p.jsx)("input",{ref:x,type:"file",accept:"*/*",style:{display:"none"},onChange:fe}),I&&(0,p.jsxs)("div",{className:L.lightbox,onClick:()=>O(null),"data-impakers-debug":"",children:[(0,p.jsx)("img",{src:I,alt:"enlarged",onClick:h=>h.stopPropagation()}),(0,p.jsx)("button",{className:L.lightboxClose,onClick:()=>O(null),type:"button",children:"\xD7"})]})]})}var ie=require("react");var rr=`@keyframes styles-module__fabEnter___DMJoo {
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
- }`,Gr={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=Jr}var Ee=Gr;var me=require("react/jsx-runtime");function ro({items:e,onSelect:n,onHide:t,onDoubleTap:o}){let[r,s]=(0,G.useState)(!1),[a,i]=(0,G.useState)(!1),[_,k]=(0,G.useState)({right:24,bottom:24}),[y,v]=(0,G.useState)(null),C=(0,G.useRef)(null),A=(0,G.useRef)(!1),I=(0,G.useRef)({x:0,y:0}),H=(0,G.useRef)({x:0,y:0}),K=(0,G.useRef)(!1),ae=(0,G.useRef)(0),_e=(0,G.useCallback)(b=>{if(b.button===2)return;A.current=!0,K.current=!1;let P=C.current;if(!P)return;P.setPointerCapture(b.pointerId);let E=P.getBoundingClientRect();I.current={x:b.clientX,y:b.clientY},H.current={x:b.clientX-E.left,y:b.clientY-E.top}},[]),re=(0,G.useCallback)(b=>{A.current&&((Math.abs(b.clientX-I.current.x)>3||Math.abs(b.clientY-I.current.y)>3)&&(K.current=!0),K.current&&k({right:Math.max(8,Math.min(window.innerWidth-b.clientX-(44-H.current.x),window.innerWidth-52)),bottom:Math.max(8,Math.min(window.innerHeight-b.clientY-(44-H.current.y),window.innerHeight-52))}))},[]),R=(0,G.useCallback)(b=>{if(A.current&&(C.current?.releasePointerCapture(b.pointerId),A.current=!1,!K.current)){let P=Date.now(),E=P-ae.current<350;if(ae.current=P,E&&o){r&&N(),o();return}r?N():s(!0)}},[r,o]),N=(0,G.useCallback)(()=>{i(!0),setTimeout(()=>{s(!1),i(!1)},150)},[]),q=(0,G.useCallback)(b=>{b.preventDefault(),b.stopPropagation(),v({x:b.clientX,y:b.clientY})},[]);return(0,G.useEffect)(()=>{if(!r&&!y)return;let b=P=>{if(!P.target.closest("[data-impakers-fab]")){if(y){v(null);return}r&&N()}};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[r,y,N]),(0,me.jsxs)(me.Fragment,{children:[(r||a)&&(0,me.jsx)("div",{className:Ee.menuItems,style:{position:"fixed",right:_.right+4/2,bottom:_.bottom+44+8},"data-impakers-debug":"","data-impakers-fab":"",children:[...e].reverse().map((b,P)=>(0,me.jsxs)("button",{className:`${Ee.menuItem} ${b.active?Ee.active:""} ${a?Ee.menuItemClosing:""}`,style:{animationDelay:a?`${P*30}ms`:`${(e.length-1-P)*40}ms`},onClick:E=>{E.stopPropagation(),n(b.id),N()},type:"button","data-impakers-fab":"","data-impakers-debug":"",children:[b.icon,(0,me.jsx)("span",{className:Ee.tooltip,children:b.label}),b.badge&&b.badge>0?(0,me.jsx)("span",{className:Ee.badge,children:b.badge>99?"99+":b.badge}):null]},b.id))}),(0,me.jsx)("button",{ref:C,className:`${Ee.fab} ${r?Ee.expanded:""}`,style:{position:"fixed",right:_.right,bottom:_.bottom},onPointerDown:_e,onPointerMove:re,onPointerUp:R,onContextMenu:q,type:"button","aria-label":"\uD53C\uB4DC\uBC31 \uBA54\uB274","data-impakers-debug":"","data-impakers-fab":"",children:(0,me.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,me.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,me.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}),y&&(0,me.jsx)("div",{style:{position:"fixed",inset:0,zIndex:2147483647},onMouseDown:()=>v(null),"data-impakers-debug":"","data-impakers-fab":"",children:(0,me.jsx)("div",{className:Ee.contextMenu,style:{position:"fixed",left:y.x,top:y.y,zIndex:2147483647},onMouseDown:b=>b.stopPropagation(),"data-impakers-fab":"",children:(0,me.jsx)("button",{className:Ee.contextMenuItem,onMouseDown:b=>{b.stopPropagation(),v(null),t?.()},type:"button",children:"\uC704\uC82F \uC228\uAE30\uAE30"})})})]})}var D=require("react"),io=require("react-dom");var ye=require("react");var es=`.styles-module__replyWrapper___wuGqO {
1146
+ }`,ir={fab:"styles-module__fab___wShP-",fabEnter:"styles-module__fabEnter___DMJoo",expanded:"styles-module__expanded___qyto6",menuItems:"styles-module__menuItems___1qNsE",menuItem:"styles-module__menuItem___pB75H",active:"styles-module__active___7ktmc",menuItemIn:"styles-module__menuItemIn___GfmJ3",menuItemClosing:"styles-module__menuItemClosing___m4o-a",menuItemOut:"styles-module__menuItemOut___s0nQD",tooltip:"styles-module__tooltip___Cy6kg",contextMenu:"styles-module__contextMenu___A8fQt",contextMenuItem:"styles-module__contextMenuItem___1u9io",badge:"styles-module__badge___zmiZx"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-fab-menu-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-fab-menu-styles",document.head.appendChild(e)),e.textContent=rr}var Pe=ir;var xe=require("react/jsx-runtime");function co({items:e,onSelect:n,onHide:t,onDoubleTap:o}){let[s,r]=(0,ie.useState)(!1),[a,i]=(0,ie.useState)(!1),[_,k]=(0,ie.useState)({right:24,bottom:24}),[b,C]=(0,ie.useState)(null),v=(0,ie.useRef)(null),$=(0,ie.useRef)(!1),F=(0,ie.useRef)({x:0,y:0}),H=(0,ie.useRef)({x:0,y:0}),W=(0,ie.useRef)(!1),ce=(0,ie.useRef)(0),pe=(0,ie.useCallback)(x=>{if(x.button===2)return;$.current=!0,W.current=!1;let A=v.current;if(!A)return;A.setPointerCapture(x.pointerId);let E=A.getBoundingClientRect();F.current={x:x.clientX,y:x.clientY},H.current={x:x.clientX-E.left,y:x.clientY-E.top}},[]),T=(0,ie.useCallback)(x=>{$.current&&((Math.abs(x.clientX-F.current.x)>3||Math.abs(x.clientY-F.current.y)>3)&&(W.current=!0),W.current&&k({right:Math.max(8,Math.min(window.innerWidth-x.clientX-(44-H.current.x),window.innerWidth-52)),bottom:Math.max(8,Math.min(window.innerHeight-x.clientY-(44-H.current.y),window.innerHeight-52))}))},[]),w=(0,ie.useCallback)(x=>{if($.current&&(v.current?.releasePointerCapture(x.pointerId),$.current=!1,!W.current)){let A=Date.now(),E=A-ce.current<350;if(ce.current=A,E&&o){s&&I(),o();return}s?I():r(!0)}},[s,o]),I=(0,ie.useCallback)(()=>{i(!0),setTimeout(()=>{r(!1),i(!1)},150)},[]),O=(0,ie.useCallback)(x=>{x.preventDefault(),x.stopPropagation(),C({x:x.clientX,y:x.clientY})},[]);return(0,ie.useEffect)(()=>{if(!s&&!b)return;let x=A=>{if(!A.target.closest("[data-impakers-fab]")){if(b){C(null);return}s&&I()}};return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[s,b,I]),(0,xe.jsxs)(xe.Fragment,{children:[(s||a)&&(0,xe.jsx)("div",{className:Pe.menuItems,style:{position:"fixed",right:_.right+4/2,bottom:_.bottom+44+8},"data-impakers-debug":"","data-impakers-fab":"",children:[...e].reverse().map((x,A)=>(0,xe.jsxs)("button",{className:`${Pe.menuItem} ${x.active?Pe.active:""} ${a?Pe.menuItemClosing:""}`,style:{animationDelay:a?`${A*30}ms`:`${(e.length-1-A)*40}ms`},onClick:E=>{E.stopPropagation(),n(x.id),I()},type:"button","data-impakers-fab":"","data-impakers-debug":"",children:[x.icon,(0,xe.jsx)("span",{className:Pe.tooltip,children:x.label}),x.badge&&x.badge>0?(0,xe.jsx)("span",{className:Pe.badge,children:x.badge>99?"99+":x.badge}):null]},x.id))}),(0,xe.jsx)("button",{ref:v,className:`${Pe.fab} ${s?Pe.expanded:""}`,style:{position:"fixed",right:_.right,bottom:_.bottom},onPointerDown:pe,onPointerMove:T,onPointerUp:w,onContextMenu:O,type:"button","aria-label":"\uD53C\uB4DC\uBC31 \uBA54\uB274","data-impakers-debug":"","data-impakers-fab":"",children:(0,xe.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,xe.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,xe.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}),b&&(0,xe.jsx)("div",{style:{position:"fixed",inset:0,zIndex:2147483647},onMouseDown:()=>C(null),"data-impakers-debug":"","data-impakers-fab":"",children:(0,xe.jsx)("div",{className:Pe.contextMenu,style:{position:"fixed",left:b.x,top:b.y,zIndex:2147483647},onMouseDown:x=>x.stopPropagation(),"data-impakers-fab":"",children:(0,xe.jsx)("button",{className:Pe.contextMenuItem,onMouseDown:x=>{x.stopPropagation(),C(null),t?.()},type:"button",children:"\uC704\uC82F \uC228\uAE30\uAE30"})})})]})}var K=require("react"),_o=require("react-dom");var Se=require("react");var ar=`.styles-module__replyWrapper___wuGqO {
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
- }`,ns={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=es}var se=ns;var z=require("react/jsx-runtime");function ts(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(0)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`}function os(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 so({onSend:e,onEscape:n,placeholder:t="Reply...",autoFocus:o=!1}){let[r,s]=(0,ye.useState)(""),[a,i]=(0,ye.useState)(null),[_,k]=(0,ye.useState)(null),[y,v]=(0,ye.useState)(!1),C=(0,ye.useRef)(null),A=(0,ye.useRef)(null),I=r.trim()||a||_,H=(0,ye.useCallback)(()=>{I&&(e(r.trim(),a||void 0,_||void 0),s(""),i(null),k(null),C.current&&(C.current.style.height="auto"))},[r,a,_,I,e]),K=(0,ye.useCallback)(R=>{R.stopPropagation(),!R.nativeEvent.isComposing&&(R.key==="Enter"&&!R.shiftKey&&(R.preventDefault(),H()),R.key==="Escape"&&n?.())},[H,n]),ae=(0,ye.useCallback)(()=>{v(!0);let R=document.querySelectorAll("[data-impakers-debug], [data-annotation-marker]");R.forEach(T=>T.style.visibility="hidden"),document.documentElement.classList.add("impakers-selecting");let N=null,q=T=>{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=`${T.left}px`,N.style.top=`${T.top}px`,N.style.width=`${T.width}px`,N.style.height=`${T.height}px`},b=()=>{document.removeEventListener("mousemove",P),document.removeEventListener("click",pe,!0),document.removeEventListener("keydown",E),document.documentElement.classList.remove("impakers-selecting"),N?.remove(),R.forEach(T=>T.style.visibility=""),v(!1)},P=T=>{let Y=document.elementFromPoint(T.clientX,T.clientY);!Y||Y===N||q(Y.getBoundingClientRect())},E=T=>{T.key==="Escape"&&b()},pe=async T=>{T.preventDefault(),T.stopPropagation(),T.stopImmediatePropagation();let Y=document.elementFromPoint(T.clientX,T.clientY);if(b(),!!Y){try{let le=await In(Y);i(le)}catch(le){console.error("[@impakers/debug] DOM \uC2A4\uD06C\uB9B0\uC0F7 \uC2E4\uD328:",le)}C.current?.focus()}};document.addEventListener("mousemove",P),document.addEventListener("click",pe,!0),document.addEventListener("keydown",E)},[]),_e=(0,ye.useCallback)(()=>{A.current?.click()},[]),re=(0,ye.useCallback)(R=>{let N=R.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."),R.target.value="";return}if(N.type.startsWith("image/")){k(null);let q=new FileReader;q.onload=()=>i(q.result),q.readAsDataURL(N)}else i(null),k(N);R.target.value=""}},[]);return(0,z.jsxs)("div",{className:se.replyWrapper,"data-impakers-debug":"",children:[a&&(0,z.jsxs)("div",{className:se.pendingImage,children:[(0,z.jsx)("img",{src:a,alt:"pending"}),(0,z.jsx)("button",{className:se.pendingRemove,onClick:()=>i(null),type:"button",children:"\xD7"})]}),_&&(0,z.jsxs)("div",{className:se.pendingFile,children:[(0,z.jsx)("span",{className:se.fileIcon,children:os(_.type)}),(0,z.jsxs)("span",{className:se.fileInfo,children:[(0,z.jsx)("span",{className:se.fileCardName,children:_.name}),(0,z.jsx)("span",{className:se.fileCardSize,children:ts(_.size)})]}),(0,z.jsx)("button",{className:se.pendingRemove,onClick:()=>k(null),type:"button",children:"\xD7"})]}),(0,z.jsx)("div",{className:se.replyArea,children:(0,z.jsx)("textarea",{ref:C,className:se.replyInput,placeholder:t,value:r,onChange:R=>{s(R.target.value);let N=R.target;N.style.height="auto",N.style.height=`${Math.min(N.scrollHeight,120)}px`},onKeyDown:K,rows:2,autoFocus:o})}),(0,z.jsxs)("div",{className:se.replyToolbar,children:[(0,z.jsx)("button",{className:se.replyTool,onClick:_e,type:"button",title:"\uD30C\uC77C \uCCA8\uBD80",children:(0,z.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,z.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,z.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}),(0,z.jsx)("button",{className:se.replyTool,onClick:ae,type:"button",title:"\uC694\uC18C \uC2A4\uD06C\uB9B0\uC0F7",children:(0,z.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,z.jsx)("path",{d:"M14.5 4h-5L7 7H4a2 2 0 00-2 2v9a2 2 0 002 2h16a2 2 0 002-2V9a2 2 0 00-2-2h-3l-2.5-3z"}),(0,z.jsx)("circle",{cx:"12",cy:"13",r:"3"})]})}),(0,z.jsx)("button",{className:`${se.replySend} ${I?se.active:""}`,onClick:H,disabled:!I,type:"button",title:"\uC804\uC1A1",children:(0,z.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,z.jsx)("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),(0,z.jsx)("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]}),(0,z.jsx)("input",{ref:A,type:"file",accept:"*/*",style:{display:"none"},onChange:re})]})}var rs=`@keyframes styles-module__slideIn___0o0s- {
1315
+ }`,lr={replyWrapper:"styles-module__replyWrapper___wuGqO",pendingImage:"styles-module__pendingImage___Sc3K4",pendingRemove:"styles-module__pendingRemove___ftBrZ",pendingFile:"styles-module__pendingFile___ss0Dp",fileIcon:"styles-module__fileIcon___lCxGN",fileInfo:"styles-module__fileInfo___WpCET",fileCardName:"styles-module__fileCardName___0idJU",fileCardSize:"styles-module__fileCardSize___b9sJT",replyArea:"styles-module__replyArea___tmywT",replyInput:"styles-module__replyInput___UAMsE",replyToolbar:"styles-module__replyToolbar___c6TcW",replyTool:"styles-module__replyTool___RBxLW",replySend:"styles-module__replySend___eTc6O",active:"styles-module__active___-Ce1c"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-reply-input-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-reply-input-styles",document.head.appendChild(e)),e.textContent=ar}var he=lr;var Z=require("react/jsx-runtime");function dr(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(0)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`}function cr(e){return e.includes("pdf")?"PDF":e.includes("spreadsheet")||e.includes("excel")||e.includes("csv")?"XLS":e.includes("presentation")||e.includes("powerpoint")?"PPT":e.includes("document")||e.includes("word")?"DOC":e.includes("zip")||e.includes("compressed")||e.includes("archive")?"ZIP":e.includes("video")?"VID":e.includes("audio")?"AUD":"FILE"}function uo({onSend:e,onEscape:n,placeholder:t="Reply...",autoFocus:o=!1}){let[s,r]=(0,Se.useState)(""),[a,i]=(0,Se.useState)(null),[_,k]=(0,Se.useState)(null),[b,C]=(0,Se.useState)(!1),v=(0,Se.useRef)(null),$=(0,Se.useRef)(null),F=s.trim()||a||_,H=(0,Se.useCallback)(()=>{F&&(e(s.trim(),a||void 0,_||void 0),r(""),i(null),k(null),v.current&&(v.current.style.height="auto"))},[s,a,_,F,e]),W=(0,Se.useCallback)(w=>{w.stopPropagation(),!w.nativeEvent.isComposing&&(w.key==="Enter"&&!w.shiftKey&&(w.preventDefault(),H()),w.key==="Escape"&&n?.())},[H,n]),ce=(0,Se.useCallback)(()=>{C(!0);let w=document.querySelectorAll("[data-impakers-debug], [data-annotation-marker]");w.forEach(M=>M.style.visibility="hidden"),document.documentElement.classList.add("impakers-selecting");let I=null,O=M=>{I||(I=document.createElement("div"),I.style.cssText="position:fixed;border:2px solid #3b82f6;background:rgba(59,130,246,0.05);border-radius:4px;pointer-events:none;z-index:999999;transition:all 0.08s ease",document.body.appendChild(I)),I.style.left=`${M.left}px`,I.style.top=`${M.top}px`,I.style.width=`${M.width}px`,I.style.height=`${M.height}px`},x=()=>{document.removeEventListener("mousemove",A),document.removeEventListener("click",q,!0),document.removeEventListener("keydown",E),document.documentElement.classList.remove("impakers-selecting"),I?.remove(),w.forEach(M=>M.style.visibility=""),C(!1)},A=M=>{let J=document.elementFromPoint(M.clientX,M.clientY);!J||J===I||O(J.getBoundingClientRect())},E=M=>{M.key==="Escape"&&x()},q=async M=>{M.preventDefault(),M.stopPropagation(),M.stopImmediatePropagation();let J=document.elementFromPoint(M.clientX,M.clientY);if(x(),!!J){try{let se=await Pn(J);i(se)}catch(se){console.error("[@impakers/debug] DOM \uC2A4\uD06C\uB9B0\uC0F7 \uC2E4\uD328:",se)}v.current?.focus()}};document.addEventListener("mousemove",A),document.addEventListener("click",q,!0),document.addEventListener("keydown",E)},[]),pe=(0,Se.useCallback)(()=>{$.current?.click()},[]),T=(0,Se.useCallback)(w=>{let I=w.target.files?.[0];if(I){if(I.size>4.5*1024*1024){console.warn("[@impakers/debug] \uD30C\uC77C \uD06C\uAE30\uAC00 4.5MB\uB97C \uCD08\uACFC\uD569\uB2C8\uB2E4."),w.target.value="";return}if(I.type.startsWith("image/")){k(null);let O=new FileReader;O.onload=()=>i(O.result),O.readAsDataURL(I)}else i(null),k(I);w.target.value=""}},[]);return(0,Z.jsxs)("div",{className:he.replyWrapper,"data-impakers-debug":"",children:[a&&(0,Z.jsxs)("div",{className:he.pendingImage,children:[(0,Z.jsx)("img",{src:a,alt:"pending"}),(0,Z.jsx)("button",{className:he.pendingRemove,onClick:()=>i(null),type:"button",children:"\xD7"})]}),_&&(0,Z.jsxs)("div",{className:he.pendingFile,children:[(0,Z.jsx)("span",{className:he.fileIcon,children:cr(_.type)}),(0,Z.jsxs)("span",{className:he.fileInfo,children:[(0,Z.jsx)("span",{className:he.fileCardName,children:_.name}),(0,Z.jsx)("span",{className:he.fileCardSize,children:dr(_.size)})]}),(0,Z.jsx)("button",{className:he.pendingRemove,onClick:()=>k(null),type:"button",children:"\xD7"})]}),(0,Z.jsx)("div",{className:he.replyArea,children:(0,Z.jsx)("textarea",{ref:v,className:he.replyInput,placeholder:t,value:s,onChange:w=>{r(w.target.value);let I=w.target;I.style.height="auto",I.style.height=`${Math.min(I.scrollHeight,120)}px`},onKeyDown:W,rows:2,autoFocus:o})}),(0,Z.jsxs)("div",{className:he.replyToolbar,children:[(0,Z.jsx)("button",{className:he.replyTool,onClick:pe,type:"button",title:"\uD30C\uC77C \uCCA8\uBD80",children:(0,Z.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Z.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,Z.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}),(0,Z.jsx)("button",{className:he.replyTool,onClick:ce,type:"button",title:"\uC694\uC18C \uC2A4\uD06C\uB9B0\uC0F7",children:(0,Z.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Z.jsx)("path",{d:"M14.5 4h-5L7 7H4a2 2 0 00-2 2v9a2 2 0 002 2h16a2 2 0 002-2V9a2 2 0 00-2-2h-3l-2.5-3z"}),(0,Z.jsx)("circle",{cx:"12",cy:"13",r:"3"})]})}),(0,Z.jsx)("button",{className:`${he.replySend} ${F?he.active:""}`,onClick:H,disabled:!F,type:"button",title:"\uC804\uC1A1",children:(0,Z.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Z.jsx)("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),(0,Z.jsx)("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]}),(0,Z.jsx)("input",{ref:$,type:"file",accept:"*/*",style:{display:"none"},onChange:T})]})}var ur=`@keyframes styles-module__slideIn___0o0s- {
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
- }`,ss={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=rs}var d=ss;var l=require("react/jsx-runtime");function is({src:e,onClose:n}){return(0,D.useEffect)(()=>{let t=o=>{o.key==="Escape"&&n()};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[n]),(0,l.jsxs)("div",{className:d.lightbox,onClick:n,"data-impakers-debug":"",children:[(0,l.jsx)("img",{src:e,alt:"enlarged",onClick:t=>t.stopPropagation()}),(0,l.jsx)("button",{className:d.lightboxClose,onClick:n,type:"button",children:"\xD7"})]})}function as(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(0)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`}function ao(e){return e.includes("pdf")?"PDF":e.includes("spreadsheet")||e.includes("excel")||e.includes("csv")?"XLS":e.includes("presentation")||e.includes("powerpoint")?"PPT":e.includes("document")||e.includes("word")?"DOC":e.includes("zip")||e.includes("compressed")||e.includes("archive")?"ZIP":e.includes("video")?"VID":e.includes("audio")?"AUD":"FILE"}function ls(e){let n=e.match(/\/d\/([^/]+)/);return n?n[1]:null}function ds(e,n,t){let o=/\.(pptx?|xlsx?|docx?)$/i.test(e)||n.includes("presentation")||n.includes("powerpoint")||n.includes("spreadsheet")||n.includes("excel")||n.includes("document")||n.includes("word")||n.includes("msword");if(t==="google_drive"){let r=ls(e);if(r)return`https://drive.google.com/file/d/${r}/preview`}return o&&t!=="google_drive"?`https://view.officeapps.live.com/op/embed.aspx?src=${encodeURIComponent(e)}`:n.includes("pdf")?e:null}function cs({fileUrl:e,fileName:n,fileType:t,fileSource:o,onClose:r}){(0,D.useEffect)(()=>{let a=i=>{i.key==="Escape"&&r()};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[r]);let s=ds(e,t,o);return(0,l.jsx)("div",{className:d.filePreviewOverlay,onClick:r,"data-impakers-debug":"",children:(0,l.jsxs)("div",{className:d.filePreviewModal,onClick:a=>a.stopPropagation(),children:[(0,l.jsxs)("div",{className:d.filePreviewHeader,children:[(0,l.jsx)("span",{className:d.filePreviewName,children:n}),(0,l.jsxs)("div",{className:d.filePreviewActions,children:[(0,l.jsxs)("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:d.filePreviewOpen,children:[(0,l.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"14",height:"14",children:[(0,l.jsx)("path",{d:"M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6"}),(0,l.jsx)("polyline",{points:"15 3 21 3 21 9"}),(0,l.jsx)("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]}),"\uC5F4\uAE30"]}),(0,l.jsx)("button",{className:d.filePreviewClose,onClick:r,type:"button",children:"\xD7"})]})]}),(0,l.jsx)("div",{className:d.filePreviewBody,children:s?(0,l.jsx)("iframe",{src:s,className:d.filePreviewIframe,title:n}):(0,l.jsxs)("div",{className:d.filePreviewFallback,children:[(0,l.jsx)("span",{className:d.filePreviewFallbackIcon,children:ao(t)}),(0,l.jsx)("span",{children:"\uBBF8\uB9AC\uBCF4\uAE30\uB97C \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 \uD30C\uC77C \uD615\uC2DD\uC785\uB2C8\uB2E4"}),(0,l.jsx)("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:"\uD30C\uC77C \uC5F4\uAE30"})]})})]})})}function Qe(e){let n=new Date(e),t=Date.now()-n.getTime(),o=_=>String(_).padStart(2,"0"),r=`${n.getMonth()+1}/${n.getDate()} ${o(n.getHours())}:${o(n.getMinutes())}`,s=Math.floor(t/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 rt(e){return e.slice(0,1).toUpperCase()}function lo({pageItems:e,allItems:n,currentPath:t,serviceName:o,endpoint:r,currentUserName:s,currentUserId:a,onClose:i,onHistoryViewed:_,newNotiCount:k}){let[y,v]=(0,D.useState)("page"),[C,A]=(0,D.useState)("todo"),[I,H]=(0,D.useState)(""),[K,ae]=(0,D.useState)(!1),_e=(0,D.useRef)(null),[re,R]=(0,D.useState)([]),[N,q]=(0,D.useState)(!1),[b,P]=(0,D.useState)(!1),[E,pe]=(0,D.useState)(null),[T,Y]=(0,D.useState)([]),[le,be]=(0,D.useState)(!1),[Te,xe]=(0,D.useState)(null),[de,g]=(0,D.useState)(null),h=(0,D.useRef)(null),Z=(0,D.useCallback)(()=>{if(E){pe(null),Y([]);return}P(!0),setTimeout(()=>i(),150)},[i,E]),ce=(0,D.useCallback)(async m=>{pe(m);let J=Ye(De(m.id));Y(J||[]),be(!J)},[r]);(0,D.useEffect)(()=>{if(!E)return;let m=De(E.id),J=Ye(m);J&&(Y(J),be(!1));let $e=pn(m,Se=>{Y(Se),be(!1)});return An(r,E.id,{staleWhileRevalidate:!0}).then(Se=>{Y(Se),be(!1)}).catch(()=>{be(!1)}),$e},[E,r]),(0,D.useEffect)(()=>{h.current?.scrollIntoView({behavior:"smooth"})},[T.length]),(0,D.useEffect)(()=>{if(!K)return;let m=J=>{_e.current&&!_e.current.contains(J.target)&&ae(!1)};return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[K]);let Pe=(0,D.useCallback)(async(m,J,$e)=>{if(E)try{let Se;if($e)try{Se=await Hn(r,$e,"comment",E.id)}catch(bn){console.error("[@impakers/debug] \uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328:",bn)}await $n(r,E.id,m,s,a,J,Se)}catch(Se){console.error("[@impakers/debug] \uCF54\uBA58\uD2B8 \uC804\uC1A1 \uC2E4\uD328:",Se)}},[E,r,s,a]),Ie=y==="page"?e:y==="all"?n:[],Ae=Ie.filter(m=>m.status===C),M=Ie.filter(m=>m.status==="todo").length,Ce=Ie.filter(m=>m.status==="in_progress").length,we=Ie.filter(m=>m.status==="done").length;return(0,D.useEffect)(()=>{y==="history"&&(q(!0),Bn(r,{date:I||void 0,limit:200}).then(R).catch(()=>R([])).finally(()=>q(!1)))},[y,I,r]),typeof document>"u"?null:(0,io.createPortal)((0,l.jsxs)("div",{"data-impakers-debug":"",children:[(0,l.jsx)("div",{className:d.backdrop,onClick:Z}),(0,l.jsxs)("div",{className:`${d.panel} ${b?d.exiting:""}`,"data-impakers-debug":"",children:[(0,l.jsxs)("div",{className:d.header,children:[(0,l.jsxs)("div",{className:d.headerLeft,children:[E&&(0,l.jsx)("button",{className:d.backBtn,onClick:Z,type:"button",children:(0,l.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"16",height:"16",children:(0,l.jsx)("polyline",{points:"15 18 9 12 15 6"})})}),(0,l.jsx)("span",{className:d.headerTitle,children:E?"\uD53C\uB4DC\uBC31 \uC0C1\uC138":o||"Feedback"})]}),(0,l.jsx)("button",{className:d.closeBtn,onClick:()=>{P(!0),setTimeout(()=>i(),150)},type:"button",children:(0,l.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,l.jsx)("path",{d:"M18 6L6 18M6 6l12 12"})})})]}),E?(0,l.jsxs)("div",{className:d.detailView,children:[(0,l.jsxs)("div",{className:d.detailHeader,children:[(0,l.jsx)("div",{className:d.cardAvatar,children:rt(E.authorName)}),(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:d.cardMeta,children:[(0,l.jsx)("span",{className:d.cardAuthor,children:E.authorName}),(0,l.jsx)("span",{className:d.cardTime,children:Qe(E.createdAt)})]}),(0,l.jsx)("div",{className:d.detailTitle,children:E.title.replace(/^\[피드백\]\s*/,"")})]})]}),E.screenshot&&(0,l.jsx)("div",{className:d.detailScreenshot,children:(0,l.jsx)("img",{src:E.screenshot,alt:"screenshot"})}),(0,l.jsxs)("div",{className:d.commentsList,children:[le&&(0,l.jsx)(Dn,{message:"\uB313\uAE00 \uB85C\uB529 \uC911..."}),!le&&T.length===0&&(0,l.jsx)("div",{className:d.noComments,children:"\uC544\uC9C1 \uB313\uAE00\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"}),T.map(m=>(0,l.jsxs)("div",{className:d.commentItem,children:[(0,l.jsx)("div",{className:d.commentAvatar,style:{width:22,height:22,fontSize:10},children:rt(m.authorName)}),(0,l.jsxs)("div",{className:d.commentBody,children:[(0,l.jsxs)("div",{className:d.commentMeta,children:[(0,l.jsx)("span",{className:d.commentAuthorName,children:m.authorName}),(0,l.jsx)("span",{className:d.commentTime,children:Qe(m.createdAt)})]}),m.content&&(0,l.jsx)("div",{className:d.commentContent,children:m.content}),m.imageUrl&&(0,l.jsx)("div",{className:d.commentImage,onClick:J=>{J.stopPropagation(),xe(m.imageUrl)},children:(0,l.jsx)("img",{src:m.imageUrl,alt:"attachment"})}),m.fileUrl&&(0,l.jsxs)("div",{className:d.commentFileCard,onClick:J=>{J.stopPropagation(),g({url:m.fileUrl,name:m.fileName||"\uD30C\uC77C",type:m.fileType||"",source:m.fileSource})},children:[(0,l.jsx)("span",{className:d.commentFileIcon,children:ao(m.fileType||"")}),(0,l.jsxs)("span",{className:d.commentFileInfo,children:[(0,l.jsx)("span",{className:d.commentFileName,children:m.fileName||"\uD30C\uC77C"}),m.fileSize!=null&&(0,l.jsx)("span",{className:d.commentFileSize,children:as(m.fileSize)})]})]})]})]},m.id)),(0,l.jsx)("div",{ref:h})]}),(0,l.jsx)(so,{onSend:Pe,onEscape:Z,autoFocus:!0})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:d.tabs,children:[(0,l.jsxs)("button",{className:`${d.tab} ${y==="page"?d.active:""}`,onClick:()=>v("page"),type:"button",children:["This Page",e.length>0&&(0,l.jsx)("span",{className:d.tabBadge,children:e.length})]}),(0,l.jsxs)("button",{className:`${d.tab} ${y==="all"?d.active:""}`,onClick:()=>v("all"),type:"button",children:["All",n.length>0&&(0,l.jsx)("span",{className:d.tabBadge,children:n.length})]}),(0,l.jsxs)("button",{className:`${d.tab} ${y==="history"?d.active:""}`,onClick:()=>{v("history"),_?.()},type:"button",children:["History",k&&k>0?(0,l.jsx)("span",{className:d.tabBadge,children:k}):null]})]}),y==="history"?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:d.historyFilter,children:[(0,l.jsxs)("div",{className:d.historyDateWrap,ref:_e,children:[(0,l.jsxs)("button",{className:`${d.filterChip} ${I?d.active:""}`,onClick:()=>ae(m=>!m),type:"button",children:[(0,l.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"13",height:"13",children:[(0,l.jsx)("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2",ry:"2"}),(0,l.jsx)("line",{x1:"16",y1:"2",x2:"16",y2:"6"}),(0,l.jsx)("line",{x1:"8",y1:"2",x2:"8",y2:"6"}),(0,l.jsx)("line",{x1:"3",y1:"10",x2:"21",y2:"10"})]}),I?`${new Date(I).getMonth()+1}/${new Date(I).getDate()}`:"\uB0A0\uC9DC"]}),K&&(0,l.jsx)("div",{className:d.datePopover,children:(0,l.jsx)("input",{type:"date",value:I,onChange:m=>{H(m.target.value),ae(!1)},className:d.dateInput,autoFocus:!0})})]}),I&&(0,l.jsx)("button",{className:d.filterChipClear,onClick:()=>H(""),type:"button",title:"\uD544\uD130 \uCD08\uAE30\uD654",children:"\xD7"})]}),(0,l.jsx)("div",{className:d.content,children:N?(0,l.jsx)("div",{className:d.empty,children:"\uB85C\uB529 \uC911..."}):re.length===0?(0,l.jsxs)("div",{className:d.empty,children:[(0,l.jsx)("div",{className:d.emptyIcon,children:(0,l.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,l.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,l.jsx)("polyline",{points:"12 6 12 12 16 14"})]})}),"\uD788\uC2A4\uD1A0\uB9AC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4"]}):re.map((m,J)=>(0,l.jsxs)("div",{className:d.historyItem,children:[(0,l.jsx)("div",{className:`${d.historyDot} ${d[`historyDot_${m.action}`]}`}),(0,l.jsxs)("div",{className:d.historyBody,children:[m.action==="status_changed"&&(0,l.jsxs)("div",{className:d.historyStatusChange,children:[(0,l.jsx)("span",{className:`${d.historyStatusBadge} ${d[`status_${m.fromStatus}`]}`,children:m.fromStatus==="todo"?"\uB300\uAE30":m.fromStatus==="in_progress"?"\uC9C4\uD589\uC911":"\uC644\uB8CC"}),(0,l.jsx)("span",{className:d.historyArrow,children:"\u2192"}),(0,l.jsx)("span",{className:`${d.historyStatusBadge} ${d[`status_${m.toStatus}`]}`,children:m.toStatus==="todo"?"\uB300\uAE30":m.toStatus==="in_progress"?"\uC9C4\uD589\uC911":"\uC644\uB8CC"})]}),m.action==="created"&&(0,l.jsxs)("div",{className:d.historyStatusChange,children:[(0,l.jsx)("span",{className:d.historyLabel,children:"\uC0DD\uC131"}),(0,l.jsx)("span",{className:`${d.historyStatusBadge} ${d.status_todo}`,children:"\uB300\uAE30"})]}),m.action==="comment_added"&&(0,l.jsxs)("div",{className:d.historyComment,children:[(0,l.jsx)("span",{className:d.historyCommentAuthor,children:m.actorName||"\uC775\uBA85"}),m.metadata?.content&&(0,l.jsx)("span",{className:d.historyCommentContent,children:String(m.metadata.content).slice(0,100)})]}),(0,l.jsxs)("div",{className:d.historyFooter,children:[(0,l.jsx)("span",{className:d.historyTime,children:Qe(m.createdAt)}),(0,l.jsx)("span",{className:d.historyRef,children:(m.taskTitle||"").replace(/^\[피드백\]\s*/,"")})]})]})]},`${m.id}-${m.action}-${J}`))})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:d.statusFilter,children:[(0,l.jsxs)("button",{className:`${d.filterChip} ${C==="todo"?d.active:""}`,onClick:()=>A("todo"),type:"button",children:["\uC9C4\uD589\uC804",M>0&&(0,l.jsx)("span",{className:d.filterCount,children:M})]}),(0,l.jsxs)("button",{className:`${d.filterChip} ${C==="in_progress"?d.active:""}`,onClick:()=>A("in_progress"),type:"button",children:["\uC9C4\uD589\uC911",Ce>0&&(0,l.jsx)("span",{className:d.filterCount,children:Ce})]}),(0,l.jsxs)("button",{className:`${d.filterChip} ${C==="done"?d.active:""}`,onClick:()=>A("done"),type:"button",children:["\uC644\uB8CC",we>0&&(0,l.jsx)("span",{className:d.filterCount,children:we})]})]}),(0,l.jsx)("div",{className:d.content,children:Ae.length===0?(0,l.jsxs)("div",{className:d.empty,children:[(0,l.jsx)("div",{className:d.emptyIcon,children:(0,l.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:(0,l.jsx)("path",{d:"M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z"})})}),y==="page"?"\uC774 \uD398\uC774\uC9C0\uC5D0 \uD53C\uB4DC\uBC31\uC774 \uC5C6\uC2B5\uB2C8\uB2E4":"\uD53C\uB4DC\uBC31\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"]}):Ae.map(m=>(0,l.jsxs)("div",{className:`${d.card} ${m.status==="done"?d.cardDone:""}`,onClick:()=>ce(m),children:[(0,l.jsxs)("div",{className:d.cardHeader,children:[(0,l.jsx)("div",{className:d.cardAvatar,children:rt(m.authorName)}),(0,l.jsx)("div",{className:d.cardInfo,children:(0,l.jsxs)("div",{className:d.cardMeta,children:[(0,l.jsx)("span",{className:d.cardAuthor,children:m.authorName}),(0,l.jsx)("span",{className:d.cardTime,children:Qe(m.createdAt)})]})})]}),(0,l.jsx)("div",{className:d.cardTitle,children:m.title.replace(/^\[피드백\]\s*/,"")}),m.screenshot&&(0,l.jsx)("div",{className:d.cardScreenshot,children:(0,l.jsx)("img",{src:m.screenshot,alt:"screenshot"})}),y==="all"&&m.feedbackUrl&&(0,l.jsxs)("div",{className:d.cardRoute,onClick:J=>{J.stopPropagation(),window.location.href=m.feedbackUrl},title:"\uD398\uC774\uC9C0\uB85C \uC774\uB3D9",children:[(0,l.jsx)("span",{className:d.cardRoutePath,children:m.feedbackUrl}),(0,l.jsxs)("svg",{className:d.cardRouteIcon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"12",height:"12",children:[(0,l.jsx)("path",{d:"M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6"}),(0,l.jsx)("polyline",{points:"15 3 21 3 21 9"}),(0,l.jsx)("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]})]}),(m.startedAt||m.completedAt)&&(0,l.jsxs)("div",{className:d.cardStatusTime,children:[m.startedAt&&m.status!=="todo"&&(0,l.jsxs)("span",{children:["\uC9C4\uD589 \uC2DC\uC791: ",Qe(m.startedAt)]}),m.completedAt&&m.status==="done"&&(0,l.jsxs)("span",{children:["\uC644\uB8CC: ",Qe(m.completedAt)]})]}),(0,l.jsxs)("div",{className:d.cardFooter,children:[(0,l.jsx)("span",{className:d.cardReplyDot}),(0,l.jsxs)("span",{className:d.cardReplyCount,children:[m.commentCount," ",m.commentCount===1?"Reply":"Replies"]})]})]},m.id))})]})]})]}),Te&&(0,l.jsx)(is,{src:Te,onClose:()=>xe(null)}),de&&(0,l.jsx)(cs,{fileUrl:de.url,fileName:de.name,fileType:de.type,fileSource:de.source,onClose:()=>g(null)})]}),document.body)}var yn=require("react"),po=require("react-dom");var co="impakers-debug-settings",st={markerColor:"#6366f1",markersVisible:!0,hideDoneMarkers:!1,showOnlyMine:!1};function uo(){try{let e=localStorage.getItem(co);return e?{...st,...JSON.parse(e)}:{...st}}catch{return{...st}}}function mo(e){try{localStorage.setItem(co,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 us=`@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=ur}var d=_r;var l=require("react/jsx-runtime");function mr({src:e,onClose:n}){return(0,K.useEffect)(()=>{let t=o=>{o.key==="Escape"&&n()};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[n]),(0,l.jsxs)("div",{className:d.lightbox,onClick:n,"data-impakers-debug":"",children:[(0,l.jsx)("img",{src:e,alt:"enlarged",onClick:t=>t.stopPropagation()}),(0,l.jsx)("button",{className:d.lightboxClose,onClick:n,type:"button",children:"\xD7"})]})}function pr(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(0)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`}function mo(e){return e.includes("pdf")?"PDF":e.includes("spreadsheet")||e.includes("excel")||e.includes("csv")?"XLS":e.includes("presentation")||e.includes("powerpoint")?"PPT":e.includes("document")||e.includes("word")?"DOC":e.includes("zip")||e.includes("compressed")||e.includes("archive")?"ZIP":e.includes("video")?"VID":e.includes("audio")?"AUD":"FILE"}function fr(e){let n=e.match(/\/d\/([^/]+)/);return n?n[1]:null}function gr(e,n,t){let o=/\.(pptx?|xlsx?|docx?)$/i.test(e)||n.includes("presentation")||n.includes("powerpoint")||n.includes("spreadsheet")||n.includes("excel")||n.includes("document")||n.includes("word")||n.includes("msword");if(t==="google_drive"){let s=fr(e);if(s)return`https://drive.google.com/file/d/${s}/preview`}return o&&t!=="google_drive"?`https://view.officeapps.live.com/op/embed.aspx?src=${encodeURIComponent(e)}`:n.includes("pdf")?e:null}function hr({fileUrl:e,fileName:n,fileType:t,fileSource:o,onClose:s}){(0,K.useEffect)(()=>{let a=i=>{i.key==="Escape"&&s()};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[s]);let r=gr(e,t,o);return(0,l.jsx)("div",{className:d.filePreviewOverlay,onClick:s,"data-impakers-debug":"",children:(0,l.jsxs)("div",{className:d.filePreviewModal,onClick:a=>a.stopPropagation(),children:[(0,l.jsxs)("div",{className:d.filePreviewHeader,children:[(0,l.jsx)("span",{className:d.filePreviewName,children:n}),(0,l.jsxs)("div",{className:d.filePreviewActions,children:[(0,l.jsxs)("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:d.filePreviewOpen,children:[(0,l.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"14",height:"14",children:[(0,l.jsx)("path",{d:"M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6"}),(0,l.jsx)("polyline",{points:"15 3 21 3 21 9"}),(0,l.jsx)("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]}),"\uC5F4\uAE30"]}),(0,l.jsx)("button",{className:d.filePreviewClose,onClick:s,type:"button",children:"\xD7"})]})]}),(0,l.jsx)("div",{className:d.filePreviewBody,children:r?(0,l.jsx)("iframe",{src:r,className:d.filePreviewIframe,title:n}):(0,l.jsxs)("div",{className:d.filePreviewFallback,children:[(0,l.jsx)("span",{className:d.filePreviewFallbackIcon,children:mo(t)}),(0,l.jsx)("span",{children:"\uBBF8\uB9AC\uBCF4\uAE30\uB97C \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 \uD30C\uC77C \uD615\uC2DD\uC785\uB2C8\uB2E4"}),(0,l.jsx)("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:"\uD30C\uC77C \uC5F4\uAE30"})]})})]})})}function Je(e){let n=new Date(e),t=Date.now()-n.getTime(),o=_=>String(_).padStart(2,"0"),s=`${n.getMonth()+1}/${n.getDate()} ${o(n.getHours())}:${o(n.getMinutes())}`,r=Math.floor(t/6e4);if(r<1)return`${s} (\uBC29\uAE08)`;if(r<60)return`${s} (${r}\uBD84 \uC804)`;let a=Math.floor(r/60);if(a<24)return`${s} (${a}\uC2DC\uAC04 \uC804)`;let i=Math.floor(a/24);return`${s} (${i}\uC77C \uC804)`}function at(e){return e.slice(0,1).toUpperCase()}function po({pageItems:e,allItems:n,currentPath:t,serviceName:o,endpoint:s,currentUserName:r,currentUserId:a,onClose:i,onHistoryViewed:_,newNotiCount:k}){let[b,C]=(0,K.useState)("page"),[v,$]=(0,K.useState)("todo"),[F,H]=(0,K.useState)(""),[W,ce]=(0,K.useState)(!1),pe=(0,K.useRef)(null),[T,w]=(0,K.useState)([]),[I,O]=(0,K.useState)(!1),[x,A]=(0,K.useState)(!1),[E,q]=(0,K.useState)(null),[M,J]=(0,K.useState)([]),[se,fe]=(0,K.useState)(!1),[ve,re]=(0,K.useState)(null),[le,h]=(0,K.useState)(null),f=(0,K.useRef)(null),B=(0,K.useCallback)(()=>{if(E){q(null),J([]);return}A(!0),setTimeout(()=>i(),150)},[i,E]),P=(0,K.useCallback)(async m=>{q(m);let ne=Ge(We(m.id));J(ne||[]),fe(!ne)},[s]);(0,K.useEffect)(()=>{if(!E)return;let m=We(E.id),ne=Ge(m);ne&&(J(ne),fe(!1));let Ke=bn(m,Me=>{J(Me),fe(!1)});return zn(s,E.id,{staleWhileRevalidate:!0}).then(Me=>{J(Me),fe(!1)}).catch(()=>{fe(!1)}),Ke},[E,s]),(0,K.useEffect)(()=>{f.current?.scrollIntoView({behavior:"smooth"})},[M.length]),(0,K.useEffect)(()=>{if(!W)return;let m=ne=>{pe.current&&!pe.current.contains(ne.target)&&ce(!1)};return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[W]);let Le=(0,K.useCallback)(async(m,ne,Ke)=>{if(E)try{let Me;if(Ke)try{Me=await jn(s,Ke,"comment",E.id)}catch(nn){console.error("[@impakers/debug] \uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328:",nn)}await Dn(s,E.id,m,r,a,ne,Me)}catch(Me){console.error("[@impakers/debug] \uCF54\uBA58\uD2B8 \uC804\uC1A1 \uC2E4\uD328:",Me)}},[E,s,r,a]),Ne=b==="page"?e:b==="all"?n:[],Re=Ne.filter(m=>m.status===v),G=Ne.filter(m=>m.status==="todo").length,Ie=Ne.filter(m=>m.status==="in_progress").length,ge=Ne.filter(m=>m.status==="done").length;return(0,K.useEffect)(()=>{b==="history"&&(O(!0),Wn(s,{date:F||void 0,limit:200}).then(w).catch(()=>w([])).finally(()=>O(!1)))},[b,F,s]),typeof document>"u"?null:(0,_o.createPortal)((0,l.jsxs)("div",{"data-impakers-debug":"",children:[(0,l.jsx)("div",{className:d.backdrop,onClick:B}),(0,l.jsxs)("div",{className:`${d.panel} ${x?d.exiting:""}`,"data-impakers-debug":"",children:[(0,l.jsxs)("div",{className:d.header,children:[(0,l.jsxs)("div",{className:d.headerLeft,children:[E&&(0,l.jsx)("button",{className:d.backBtn,onClick:B,type:"button",children:(0,l.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"16",height:"16",children:(0,l.jsx)("polyline",{points:"15 18 9 12 15 6"})})}),(0,l.jsx)("span",{className:d.headerTitle,children:E?"\uD53C\uB4DC\uBC31 \uC0C1\uC138":o||"Feedback"})]}),(0,l.jsx)("button",{className:d.closeBtn,onClick:()=>{A(!0),setTimeout(()=>i(),150)},type:"button",children:(0,l.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,l.jsx)("path",{d:"M18 6L6 18M6 6l12 12"})})})]}),E?(0,l.jsxs)("div",{className:d.detailView,children:[(0,l.jsxs)("div",{className:d.detailHeader,children:[(0,l.jsx)("div",{className:d.cardAvatar,children:at(E.authorName)}),(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:d.cardMeta,children:[(0,l.jsx)("span",{className:d.cardAuthor,children:E.authorName}),(0,l.jsx)("span",{className:d.cardTime,children:Je(E.createdAt)})]}),(0,l.jsx)("div",{className:d.detailTitle,children:E.title.replace(/^\[피드백\]\s*/,"")})]})]}),E.screenshot&&(0,l.jsx)("div",{className:d.detailScreenshot,children:(0,l.jsx)("img",{src:E.screenshot,alt:"screenshot"})}),(0,l.jsxs)("div",{className:d.commentsList,children:[se&&(0,l.jsx)(Vn,{message:"\uB313\uAE00 \uB85C\uB529 \uC911..."}),!se&&M.length===0&&(0,l.jsx)("div",{className:d.noComments,children:"\uC544\uC9C1 \uB313\uAE00\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"}),M.map(m=>(0,l.jsxs)("div",{className:d.commentItem,children:[(0,l.jsx)("div",{className:d.commentAvatar,style:{width:22,height:22,fontSize:10},children:at(m.authorName)}),(0,l.jsxs)("div",{className:d.commentBody,children:[(0,l.jsxs)("div",{className:d.commentMeta,children:[(0,l.jsx)("span",{className:d.commentAuthorName,children:m.authorName}),(0,l.jsx)("span",{className:d.commentTime,children:Je(m.createdAt)})]}),m.content&&(0,l.jsx)("div",{className:d.commentContent,children:m.content}),m.imageUrl&&(0,l.jsx)("div",{className:d.commentImage,onClick:ne=>{ne.stopPropagation(),re(m.imageUrl)},children:(0,l.jsx)("img",{src:m.imageUrl,alt:"attachment"})}),m.fileUrl&&(0,l.jsxs)("div",{className:d.commentFileCard,onClick:ne=>{ne.stopPropagation(),h({url:m.fileUrl,name:m.fileName||"\uD30C\uC77C",type:m.fileType||"",source:m.fileSource})},children:[(0,l.jsx)("span",{className:d.commentFileIcon,children:mo(m.fileType||"")}),(0,l.jsxs)("span",{className:d.commentFileInfo,children:[(0,l.jsx)("span",{className:d.commentFileName,children:m.fileName||"\uD30C\uC77C"}),m.fileSize!=null&&(0,l.jsx)("span",{className:d.commentFileSize,children:pr(m.fileSize)})]})]})]})]},m.id)),(0,l.jsx)("div",{ref:f})]}),(0,l.jsx)(uo,{onSend:Le,onEscape:B,autoFocus:!0})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:d.tabs,children:[(0,l.jsxs)("button",{className:`${d.tab} ${b==="page"?d.active:""}`,onClick:()=>C("page"),type:"button",children:["This Page",e.length>0&&(0,l.jsx)("span",{className:d.tabBadge,children:e.length})]}),(0,l.jsxs)("button",{className:`${d.tab} ${b==="all"?d.active:""}`,onClick:()=>C("all"),type:"button",children:["All",n.length>0&&(0,l.jsx)("span",{className:d.tabBadge,children:n.length})]}),(0,l.jsxs)("button",{className:`${d.tab} ${b==="history"?d.active:""}`,onClick:()=>{C("history"),_?.()},type:"button",children:["History",k&&k>0?(0,l.jsx)("span",{className:d.tabBadge,children:k}):null]})]}),b==="history"?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:d.historyFilter,children:[(0,l.jsxs)("div",{className:d.historyDateWrap,ref:pe,children:[(0,l.jsxs)("button",{className:`${d.filterChip} ${F?d.active:""}`,onClick:()=>ce(m=>!m),type:"button",children:[(0,l.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"13",height:"13",children:[(0,l.jsx)("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2",ry:"2"}),(0,l.jsx)("line",{x1:"16",y1:"2",x2:"16",y2:"6"}),(0,l.jsx)("line",{x1:"8",y1:"2",x2:"8",y2:"6"}),(0,l.jsx)("line",{x1:"3",y1:"10",x2:"21",y2:"10"})]}),F?`${new Date(F).getMonth()+1}/${new Date(F).getDate()}`:"\uB0A0\uC9DC"]}),W&&(0,l.jsx)("div",{className:d.datePopover,children:(0,l.jsx)("input",{type:"date",value:F,onChange:m=>{H(m.target.value),ce(!1)},className:d.dateInput,autoFocus:!0})})]}),F&&(0,l.jsx)("button",{className:d.filterChipClear,onClick:()=>H(""),type:"button",title:"\uD544\uD130 \uCD08\uAE30\uD654",children:"\xD7"})]}),(0,l.jsx)("div",{className:d.content,children:I?(0,l.jsx)("div",{className:d.empty,children:"\uB85C\uB529 \uC911..."}):T.length===0?(0,l.jsxs)("div",{className:d.empty,children:[(0,l.jsx)("div",{className:d.emptyIcon,children:(0,l.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,l.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,l.jsx)("polyline",{points:"12 6 12 12 16 14"})]})}),"\uD788\uC2A4\uD1A0\uB9AC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4"]}):T.map((m,ne)=>(0,l.jsxs)("div",{className:d.historyItem,children:[(0,l.jsx)("div",{className:`${d.historyDot} ${d[`historyDot_${m.action}`]}`}),(0,l.jsxs)("div",{className:d.historyBody,children:[m.action==="status_changed"&&(0,l.jsxs)("div",{className:d.historyStatusChange,children:[(0,l.jsx)("span",{className:`${d.historyStatusBadge} ${d[`status_${m.fromStatus}`]}`,children:m.fromStatus==="todo"?"\uB300\uAE30":m.fromStatus==="in_progress"?"\uC9C4\uD589\uC911":"\uC644\uB8CC"}),(0,l.jsx)("span",{className:d.historyArrow,children:"\u2192"}),(0,l.jsx)("span",{className:`${d.historyStatusBadge} ${d[`status_${m.toStatus}`]}`,children:m.toStatus==="todo"?"\uB300\uAE30":m.toStatus==="in_progress"?"\uC9C4\uD589\uC911":"\uC644\uB8CC"})]}),m.action==="created"&&(0,l.jsxs)("div",{className:d.historyStatusChange,children:[(0,l.jsx)("span",{className:d.historyLabel,children:"\uC0DD\uC131"}),(0,l.jsx)("span",{className:`${d.historyStatusBadge} ${d.status_todo}`,children:"\uB300\uAE30"})]}),m.action==="comment_added"&&(0,l.jsxs)("div",{className:d.historyComment,children:[(0,l.jsx)("span",{className:d.historyCommentAuthor,children:m.actorName||"\uC775\uBA85"}),m.metadata?.content&&(0,l.jsx)("span",{className:d.historyCommentContent,children:String(m.metadata.content).slice(0,100)})]}),(0,l.jsxs)("div",{className:d.historyFooter,children:[(0,l.jsx)("span",{className:d.historyTime,children:Je(m.createdAt)}),(0,l.jsx)("span",{className:d.historyRef,children:(m.taskTitle||"").replace(/^\[피드백\]\s*/,"")})]})]})]},`${m.id}-${m.action}-${ne}`))})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:d.statusFilter,children:[(0,l.jsxs)("button",{className:`${d.filterChip} ${v==="todo"?d.active:""}`,onClick:()=>$("todo"),type:"button",children:["\uC9C4\uD589\uC804",G>0&&(0,l.jsx)("span",{className:d.filterCount,children:G})]}),(0,l.jsxs)("button",{className:`${d.filterChip} ${v==="in_progress"?d.active:""}`,onClick:()=>$("in_progress"),type:"button",children:["\uC9C4\uD589\uC911",Ie>0&&(0,l.jsx)("span",{className:d.filterCount,children:Ie})]}),(0,l.jsxs)("button",{className:`${d.filterChip} ${v==="done"?d.active:""}`,onClick:()=>$("done"),type:"button",children:["\uC644\uB8CC",ge>0&&(0,l.jsx)("span",{className:d.filterCount,children:ge})]})]}),(0,l.jsx)("div",{className:d.content,children:Re.length===0?(0,l.jsxs)("div",{className:d.empty,children:[(0,l.jsx)("div",{className:d.emptyIcon,children:(0,l.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:(0,l.jsx)("path",{d:"M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z"})})}),b==="page"?"\uC774 \uD398\uC774\uC9C0\uC5D0 \uD53C\uB4DC\uBC31\uC774 \uC5C6\uC2B5\uB2C8\uB2E4":"\uD53C\uB4DC\uBC31\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"]}):Re.map(m=>(0,l.jsxs)("div",{className:`${d.card} ${m.status==="done"?d.cardDone:""}`,onClick:()=>P(m),children:[(0,l.jsxs)("div",{className:d.cardHeader,children:[(0,l.jsx)("div",{className:d.cardAvatar,children:at(m.authorName)}),(0,l.jsx)("div",{className:d.cardInfo,children:(0,l.jsxs)("div",{className:d.cardMeta,children:[(0,l.jsx)("span",{className:d.cardAuthor,children:m.authorName}),(0,l.jsx)("span",{className:d.cardTime,children:Je(m.createdAt)})]})})]}),(0,l.jsx)("div",{className:d.cardTitle,children:m.title.replace(/^\[피드백\]\s*/,"")}),m.screenshot&&(0,l.jsx)("div",{className:d.cardScreenshot,children:(0,l.jsx)("img",{src:m.screenshot,alt:"screenshot"})}),b==="all"&&m.feedbackUrl&&(0,l.jsxs)("div",{className:d.cardRoute,onClick:ne=>{ne.stopPropagation(),window.location.href=m.feedbackUrl},title:"\uD398\uC774\uC9C0\uB85C \uC774\uB3D9",children:[(0,l.jsx)("span",{className:d.cardRoutePath,children:m.feedbackUrl}),(0,l.jsxs)("svg",{className:d.cardRouteIcon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"12",height:"12",children:[(0,l.jsx)("path",{d:"M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6"}),(0,l.jsx)("polyline",{points:"15 3 21 3 21 9"}),(0,l.jsx)("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]})]}),(m.startedAt||m.completedAt)&&(0,l.jsxs)("div",{className:d.cardStatusTime,children:[m.startedAt&&m.status!=="todo"&&(0,l.jsxs)("span",{children:["\uC9C4\uD589 \uC2DC\uC791: ",Je(m.startedAt)]}),m.completedAt&&m.status==="done"&&(0,l.jsxs)("span",{children:["\uC644\uB8CC: ",Je(m.completedAt)]})]}),(0,l.jsxs)("div",{className:d.cardFooter,children:[(0,l.jsx)("span",{className:d.cardReplyDot}),(0,l.jsxs)("span",{className:d.cardReplyCount,children:[m.commentCount," ",m.commentCount===1?"Reply":"Replies"]})]})]},m.id))})]})]})]}),ve&&(0,l.jsx)(mr,{src:ve,onClose:()=>re(null)}),le&&(0,l.jsx)(hr,{fileUrl:le.url,fileName:le.name,fileType:le.type,fileSource:le.source,onClose:()=>h(null)})]}),document.body)}var me=require("react"),fo=require("react-dom");var yr=`@keyframes styles-module__slideIn___Wx-kZ {
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
+ }`,br={backdrop:"styles-module__backdrop___qExl6",fadeIn:"styles-module__fadeIn___lF-be",panel:"styles-module__panel___ri2CN",slideIn:"styles-module__slideIn___Wx-kZ",exiting:"styles-module__exiting___iE6TS",slideOut:"styles-module__slideOut___1n8cb",header:"styles-module__header___gmriy",headerLeft:"styles-module__headerLeft___M17Y1",headerIcon:"styles-module__headerIcon___PsSMZ",headerTitle:"styles-module__headerTitle___Y96x8",headerActions:"styles-module__headerActions___-rG09",headerBtn:"styles-module__headerBtn___eSTQN",messages:"styles-module__messages___Al0UY",welcome:"styles-module__welcome___7MKNO",welcomeIcon:"styles-module__welcomeIcon___gd4O6",welcomeText:"styles-module__welcomeText___-aHqH",welcomeHint:"styles-module__welcomeHint___zUsgp",message:"styles-module__message___-0C3Z",user:"styles-module__user___V0NWN",msgBody:"styles-module__msgBody___YMLmR",msgContent:"styles-module__msgContent___ur5dX",assistant:"styles-module__assistant___sS3g4",msgAvatar:"styles-module__msgAvatar___AAtdS",toolCalls:"styles-module__toolCalls___YDi5U",toolCall:"styles-module__toolCall___YG3jW",tool_success:"styles-module__tool_success___-qmku",tool_error:"styles-module__tool_error___tmRla",toolIcon:"styles-module__toolIcon___w-g-Z",toolName:"styles-module__toolName___yBXu6",typing:"styles-module__typing___SxFST",typingDot:"styles-module__typingDot___-XQcu",inputArea:"styles-module__inputArea___ySM3W",input:"styles-module__input___UnN4A",sendBtn:"styles-module__sendBtn___WLa8O",active:"styles-module__active___SooZB"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-agent-chat-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-agent-chat-styles",document.head.appendChild(e)),e.textContent=yr}var D=br;var R=require("react/jsx-runtime");function xr(e){return{github_read_file:"\uD30C\uC77C \uC77D\uAE30",github_search_code:"\uCF54\uB4DC \uAC80\uC0C9",github_grep_code:"\uCF54\uB4DC \uB0B4\uC6A9 \uAC80\uC0C9",github_get_tree:"\uB514\uB809\uD1A0\uB9AC \uAD6C\uC870",github_get_commits:"\uCEE4\uBC0B \uC774\uB825",supabase_query_db:"DB \uC870\uD68C",supabase_list_tables:"\uD14C\uC774\uBE14 \uBAA9\uB85D",supabase_get_api_logs:"API \uB85C\uADF8",vercel_get_runtime_logs:"\uB7F0\uD0C0\uC784 \uB85C\uADF8",vercel_get_deployments:"\uBC30\uD3EC \uC774\uB825",spawn_agent:"\uC11C\uBE0C \uC5D0\uC774\uC804\uD2B8"}[e]||e}function go({endpoint:e,onClose:n}){let[t,o]=(0,me.useState)([]),[s,r]=(0,me.useState)(""),[a,i]=(0,me.useState)(!1),[_,k]=(0,me.useState)(()=>{try{return localStorage.getItem("impakers-agent-session")||null}catch{return null}}),[b,C]=(0,me.useState)(!1),v=(0,me.useRef)(null),$=(0,me.useRef)(null),F=(0,me.useRef)(null);(0,me.useEffect)(()=>{v.current?.scrollIntoView({behavior:"smooth"})},[t]),(0,me.useEffect)(()=>{$.current?.focus()},[]);let H=(0,me.useCallback)(()=>{C(!0),setTimeout(()=>n(),150)},[n]),W=(0,me.useCallback)(async()=>{let T=s.trim();if(!T||a)return;let w=dn();if(!w)return;let I={id:`user-${Date.now()}`,role:"user",content:T,createdAt:Date.now()};o(A=>[...A,I]),r(""),i(!0),$.current&&($.current.style.height="auto");let O=`assistant-${Date.now()}`,x={id:O,role:"assistant",content:"",toolCalls:[],createdAt:Date.now()};o(A=>[...A,x]);try{let A=new AbortController;F.current=A;let E=e.replace(/\/api\/external\/feedback\/?$/,""),q=await fetch(`${E}/api/agent`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${w}`},body:JSON.stringify({message:T,agentId:"cs-assistant",sessionId:_||void 0}),signal:A.signal});if(!q.ok){let fe=await q.json().catch(()=>({error:"\uC694\uCCAD \uC2E4\uD328"}));o(ve=>ve.map(re=>re.id===O?{...re,content:`\uC624\uB958: ${fe.error||"\uC694\uCCAD \uC2E4\uD328"}`}:re)),i(!1);return}let M=q.body.getReader(),J=new TextDecoder,se="";for(;;){let{done:fe,value:ve}=await M.read();if(fe)break;se+=J.decode(ve,{stream:!0});let re=se.split(`
2699
+ `);se=re.pop()||"";for(let le of re){if(!le.startsWith("data: "))continue;let h=le.slice(6).trim();if(h)try{let f=JSON.parse(h);switch(f.type){case"meta":if(f.conversationId){k(f.conversationId);try{localStorage.setItem("impakers-agent-session",f.conversationId)}catch{}}break;case"content":o(B=>B.map(P=>P.id===O?{...P,content:P.content+(f.content||"")}:P));break;case"tool_call":o(B=>B.map(P=>P.id===O?{...P,toolCalls:[...P.toolCalls||[],{name:f.name||"",input:f.input||{},status:"running"}]}:P));break;case"tool_result":o(B=>B.map(P=>{if(P.id!==O)return P;let Le=[...P.toolCalls||[]],Ne=Le.findLastIndex(Re=>Re.name===f.name&&Re.status==="running");return Ne>=0&&(Le[Ne]={...Le[Ne],status:f.result?.success?"success":"error"}),{...P,toolCalls:Le}}));break;case"error":o(B=>B.map(P=>P.id===O?{...P,content:P.content+`
2700
+
2701
+ \uC624\uB958: ${f.error}`}:P));break;case"done":break}}catch{}}}}catch(A){A?.name!=="AbortError"&&o(E=>E.map(q=>q.id===O?{...q,content:q.content||"\uC5F0\uACB0\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4."}:q))}finally{i(!1),F.current=null}},[s,a,_,e]),ce=(0,me.useCallback)(T=>{T.stopPropagation(),!T.nativeEvent.isComposing&&(T.key==="Enter"&&!T.shiftKey&&(T.preventDefault(),W()),T.key==="Escape"&&H())},[W,H]),pe=(0,me.useCallback)(()=>{o([]),k(null);try{localStorage.removeItem("impakers-agent-session")}catch{}},[]);return typeof document>"u"?null:(0,fo.createPortal)((0,R.jsxs)("div",{"data-impakers-debug":"",children:[(0,R.jsx)("div",{className:D.backdrop,onClick:H}),(0,R.jsxs)("div",{className:`${D.panel} ${b?D.exiting:""}`,"data-impakers-debug":"",children:[(0,R.jsxs)("div",{className:D.header,children:[(0,R.jsxs)("div",{className:D.headerLeft,children:[(0,R.jsx)("span",{className:D.headerIcon,children:"\u2726"}),(0,R.jsx)("span",{className:D.headerTitle,children:"AI \uC5D0\uC774\uC804\uD2B8"})]}),(0,R.jsxs)("div",{className:D.headerActions,children:[(0,R.jsx)("button",{className:D.headerBtn,onClick:pe,type:"button",title:"\uC0C8 \uB300\uD654",children:(0,R.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"15",height:"15",children:[(0,R.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,R.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}),(0,R.jsx)("button",{className:D.headerBtn,onClick:H,type:"button",title:"\uB2EB\uAE30",children:(0,R.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"15",height:"15",children:(0,R.jsx)("path",{d:"M18 6L6 18M6 6l12 12"})})})]})]}),(0,R.jsxs)("div",{className:D.messages,children:[t.length===0&&(0,R.jsxs)("div",{className:D.welcome,children:[(0,R.jsx)("div",{className:D.welcomeIcon,children:"\u2726"}),(0,R.jsx)("div",{className:D.welcomeText,children:"\uBB34\uC5C7\uC744 \uB3C4\uC640\uB4DC\uB9B4\uAE4C\uC694?"}),(0,R.jsx)("div",{className:D.welcomeHint,children:"\uC0AC\uC6A9 \uC911 \uAD81\uAE08\uD55C \uC810\uC774\uB098 \uBB38\uC81C\uB97C \uBB3C\uC5B4\uBCF4\uC138\uC694"})]}),t.map(T=>(0,R.jsxs)("div",{className:`${D.message} ${D[T.role]}`,children:[T.role==="assistant"&&(0,R.jsx)("div",{className:D.msgAvatar,children:"\u2726"}),(0,R.jsxs)("div",{className:D.msgBody,children:[T.toolCalls&&T.toolCalls.length>0&&(0,R.jsx)("div",{className:D.toolCalls,children:T.toolCalls.map((w,I)=>(0,R.jsxs)("div",{className:`${D.toolCall} ${D[`tool_${w.status}`]}`,children:[(0,R.jsx)("span",{className:D.toolIcon,children:w.status==="running"?"\u23F3":w.status==="success"?"\u2713":"\u2717"}),(0,R.jsx)("span",{className:D.toolName,children:xr(w.name)})]},I))}),T.content&&(0,R.jsx)("div",{className:D.msgContent,children:T.content}),T.role==="assistant"&&a&&T.id===t[t.length-1]?.id&&!T.content&&(0,R.jsxs)("div",{className:D.typing,children:[(0,R.jsx)("span",{}),(0,R.jsx)("span",{}),(0,R.jsx)("span",{})]})]})]},T.id)),(0,R.jsx)("div",{ref:v})]}),(0,R.jsxs)("div",{className:D.inputArea,children:[(0,R.jsx)("textarea",{ref:$,className:D.input,placeholder:"\uBA54\uC2DC\uC9C0\uB97C \uC785\uB825\uD558\uC138\uC694...",value:s,onChange:T=>{r(T.target.value);let w=T.target;w.style.height="auto",w.style.height=`${Math.min(w.scrollHeight,120)}px`},onKeyDown:ce,rows:1,disabled:a}),(0,R.jsx)("button",{className:`${D.sendBtn} ${s.trim()&&!a?D.active:""}`,onClick:W,disabled:!s.trim()||a,type:"button",children:(0,R.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"16",height:"16",children:[(0,R.jsx)("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),(0,R.jsx)("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]})]})]}),document.body)}var Cn=require("react"),ko=require("react-dom");var ho="impakers-debug-settings",lt={markerColor:"#6366f1",markersVisible:!0,hideDoneMarkers:!1,showOnlyMine:!1};function yo(){try{let e=localStorage.getItem(ho);return e?{...lt,...JSON.parse(e)}:{...lt}}catch{return{...lt}}}function bo(e){try{localStorage.setItem(ho,JSON.stringify(e))}catch{}}var xo=[{id:"indigo",label:"\uC778\uB514\uACE0",value:"#6366f1"},{id:"blue",label:"\uBE14\uB8E8",value:"#3b82f6"},{id:"red",label:"\uB808\uB4DC",value:"#ef4444"},{id:"green",label:"\uADF8\uB9B0",value:"#16a34a"},{id:"orange",label:"\uC624\uB80C\uC9C0",value:"#f97316"},{id:"pink",label:"\uD551\uD06C",value:"#ec4899"}];var kr=`@keyframes styles-module__panelIn___SmRh6 {
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
- }`,ms={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=us}var j=ms;var W=require("react/jsx-runtime");function fo({settings:e,onChange:n,onClose:t}){let o=(0,yn.useCallback)(()=>{n({...e,markersVisible:!e.markersVisible})},[e,n]),r=(0,yn.useCallback)(()=>{n({...e,hideDoneMarkers:!e.hideDoneMarkers})},[e,n]),s=(0,yn.useCallback)(()=>{n({...e,showOnlyMine:!e.showOnlyMine})},[e,n]),a=(0,yn.useCallback)(i=>{n({...e,markerColor:i})},[e,n]);return typeof document>"u"?null:(0,po.createPortal)((0,W.jsxs)("div",{"data-impakers-debug":"",children:[(0,W.jsx)("div",{className:j.backdrop,onClick:t}),(0,W.jsxs)("div",{className:j.panel,"data-impakers-debug":"",children:[(0,W.jsxs)("div",{className:j.header,children:[(0,W.jsx)("span",{className:j.title,children:"\uC124\uC815"}),(0,W.jsx)("button",{className:j.closeBtn,onClick:t,type:"button",children:(0,W.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,W.jsx)("path",{d:"M18 6L6 18M6 6l12 12"})})})]}),(0,W.jsxs)("div",{className:j.body,children:[(0,W.jsxs)("div",{className:j.field,children:[(0,W.jsx)("div",{className:j.fieldLabel,children:"\uB9C8\uCEE4 \uD45C\uC2DC"}),(0,W.jsx)("button",{className:`${j.toggle} ${e.markersVisible?j.on:""}`,onClick:o,type:"button",children:(0,W.jsx)("span",{className:j.toggleThumb})})]}),(0,W.jsxs)("div",{className:j.field,children:[(0,W.jsx)("div",{className:j.fieldLabel,children:"\uC644\uB8CC \uD540 \uC228\uAE30\uAE30"}),(0,W.jsx)("button",{className:`${j.toggle} ${e.hideDoneMarkers?j.on:""}`,onClick:r,type:"button",children:(0,W.jsx)("span",{className:j.toggleThumb})})]}),(0,W.jsxs)("div",{className:j.field,children:[(0,W.jsx)("div",{className:j.fieldLabel,children:"\uB0B4\uAC00 \uCD94\uAC00\uD55C \uAC83\uB9CC"}),(0,W.jsx)("button",{className:`${j.toggle} ${e.showOnlyMine?j.on:""}`,onClick:s,type:"button",children:(0,W.jsx)("span",{className:j.toggleThumb})})]}),(0,W.jsxs)("div",{className:j.field,children:[(0,W.jsx)("div",{className:j.fieldLabel,children:"\uB9C8\uCEE4 \uC0C9\uC0C1"}),(0,W.jsx)("div",{className:j.colors,children:_o.map(i=>(0,W.jsx)("button",{className:`${j.colorBtn} ${e.markerColor===i.value?j.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
+ }`,vr={backdrop:"styles-module__backdrop___--cMp",panel:"styles-module__panel___z6xiJ",panelIn:"styles-module__panelIn___SmRh6",header:"styles-module__header___NkOur",title:"styles-module__title___tsKZw",closeBtn:"styles-module__closeBtn___-OQ4Y",body:"styles-module__body___9pyCP",field:"styles-module__field___vnQMl",fieldLabel:"styles-module__fieldLabel___2WUKB",toggle:"styles-module__toggle___uWsqC",on:"styles-module__on___W27kf",toggleThumb:"styles-module__toggleThumb___wyckC",colors:"styles-module__colors___vgFGZ",colorBtn:"styles-module__colorBtn___N7dGu",selected:"styles-module__selected___0tVDH"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-settings-panel-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-settings-panel-styles",document.head.appendChild(e)),e.textContent=kr}var U=vr;var X=require("react/jsx-runtime");function vo({settings:e,onChange:n,onClose:t}){let o=(0,Cn.useCallback)(()=>{n({...e,markersVisible:!e.markersVisible})},[e,n]),s=(0,Cn.useCallback)(()=>{n({...e,hideDoneMarkers:!e.hideDoneMarkers})},[e,n]),r=(0,Cn.useCallback)(()=>{n({...e,showOnlyMine:!e.showOnlyMine})},[e,n]),a=(0,Cn.useCallback)(i=>{n({...e,markerColor:i})},[e,n]);return typeof document>"u"?null:(0,ko.createPortal)((0,X.jsxs)("div",{"data-impakers-debug":"",children:[(0,X.jsx)("div",{className:U.backdrop,onClick:t}),(0,X.jsxs)("div",{className:U.panel,"data-impakers-debug":"",children:[(0,X.jsxs)("div",{className:U.header,children:[(0,X.jsx)("span",{className:U.title,children:"\uC124\uC815"}),(0,X.jsx)("button",{className:U.closeBtn,onClick:t,type:"button",children:(0,X.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,X.jsx)("path",{d:"M18 6L6 18M6 6l12 12"})})})]}),(0,X.jsxs)("div",{className:U.body,children:[(0,X.jsxs)("div",{className:U.field,children:[(0,X.jsx)("div",{className:U.fieldLabel,children:"\uB9C8\uCEE4 \uD45C\uC2DC"}),(0,X.jsx)("button",{className:`${U.toggle} ${e.markersVisible?U.on:""}`,onClick:o,type:"button",children:(0,X.jsx)("span",{className:U.toggleThumb})})]}),(0,X.jsxs)("div",{className:U.field,children:[(0,X.jsx)("div",{className:U.fieldLabel,children:"\uC644\uB8CC \uD540 \uC228\uAE30\uAE30"}),(0,X.jsx)("button",{className:`${U.toggle} ${e.hideDoneMarkers?U.on:""}`,onClick:s,type:"button",children:(0,X.jsx)("span",{className:U.toggleThumb})})]}),(0,X.jsxs)("div",{className:U.field,children:[(0,X.jsx)("div",{className:U.fieldLabel,children:"\uB0B4\uAC00 \uCD94\uAC00\uD55C \uAC83\uB9CC"}),(0,X.jsx)("button",{className:`${U.toggle} ${e.showOnlyMine?U.on:""}`,onClick:r,type:"button",children:(0,X.jsx)("span",{className:U.toggleThumb})})]}),(0,X.jsxs)("div",{className:U.field,children:[(0,X.jsx)("div",{className:U.fieldLabel,children:"\uB9C8\uCEE4 \uC0C9\uC0C1"}),(0,X.jsx)("div",{className:U.colors,children:xo.map(i=>(0,X.jsx)("button",{className:`${U.colorBtn} ${e.markerColor===i.value?U.selected:""}`,style:{background:i.value},onClick:()=>a(i.value),title:i.label,type:"button"},i.id))})]})]})]})]}),document.body)}var Cr=`.styles-module__markersLayer___VR1cD svg[fill=none],
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
- }`,ps={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 ee=ps;var x=require("react/jsx-runtime");function it(e,n){let t=document.elementFromPoint(e,n);if(!t)return null;for(;t?.shadowRoot;){let o=t.shadowRoot.elementFromPoint(e,n);if(!o||o===t)break;t=o}return t}function fs(e){let n=e;for(;n&&n!==document.body;){let t=window.getComputedStyle(n);if(t.position==="fixed"||t.position==="sticky")return!0;n=n.parentElement}return!1}function go(e){let{name:n,path:t}=Xn(e),o=$t(e,{mode:"filtered"});return{name:o.path?`${o.path} ${n}`:n,elementName:n,path:t,reactComponents:o.path}}function gs(e){let n=dn(e),t=n.found?n:Qn(e);if(t.found&&t.source)return Rn(t.source,"path")}function hs(e){let n=dn(e),t=n.found?n:Qn(e);return t.found&&t.sourceCandidates&&t.sourceCandidates.length>0?t.sourceCandidates.map(o=>Rn(o,"path")):t.found&&t.source?[Rn(t.source,"path")]:[]}function ys(e,n){let t=e.match(/^(.+):(\d+)(?::(\d+))?$/);if(!t)return null;let[,o,r,s]=t,a=Number.parseInt(r,10),i=s?Number.parseInt(s,10):void 0;return!o||Number.isNaN(a)?null:{kind:"component",file:o,line:a,column:i,label:n||"Resolved component source",confidence:.98,reason:"resolved-from-source-map"}}var bs="impakers-debug-markers-";function lt(){return bs+window.location.pathname}function at(){try{let e=localStorage.getItem(lt());return e?JSON.parse(e):[]}catch{return[]}}function ho(e){try{e.length===0?localStorage.removeItem(lt()):localStorage.setItem(lt(),JSON.stringify(e))}catch{}}function xs(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 bo({endpoint:e,getUser:n,onHide:t}){let[o,r]=(0,f.useState)(!1),[s,a]=(0,f.useState)(()=>at()),[i,_]=(0,f.useState)(null),[k,y]=(0,f.useState)(!1),[v,C]=(0,f.useState)(null),[A,I]=(0,f.useState)({x:0,y:0}),[H,K]=(0,f.useState)(new Set),[ae,_e]=(0,f.useState)(!1),[re,R]=(0,f.useState)(null),[N,q]=(0,f.useState)(null),[b,P]=(0,f.useState)(!1),[E,pe]=(0,f.useState)(null),[T,Y]=(0,f.useState)(null),[le,be]=(0,f.useState)({}),[Te,xe]=(0,f.useState)(!1),[de,g]=(0,f.useState)([]),[h,Z]=(0,f.useState)([]),[ce,Pe]=(0,f.useState)(!1),[Ie,Ae]=(0,f.useState)(!1),[M,Ce]=(0,f.useState)(()=>uo()),[we,m]=(0,f.useState)(()=>window.location.pathname),[J,$e]=(0,f.useState)(!1),[Se,bn]=(0,f.useState)(0),[dt,xn]=(0,f.useState)(null),kn=(0,f.useRef)(null),ct=(0,f.useRef)(null),ut=(0,f.useRef)(null),Je=(0,f.useRef)(!1),mt=(0,f.useCallback)(()=>{xn(3);let c=3,u=()=>{c-=1,c<=0?(xn(null),r(!0),document.documentElement.classList.add("impakers-selecting")):(xn(c),kn.current=setTimeout(u,1e3))};kn.current=setTimeout(u,1e3)},[]),vo=(0,f.useCallback)(c=>{c==="comment"?_t():c==="delay-capture"?mt():c==="inbox"?(Pe(!0),Xt(e,{staleWhileRevalidate:!0}).then(Z).catch(()=>{}),o&&(r(!1),document.documentElement.classList.remove("impakers-selecting"),C(null),_(null))):c==="settings"&&Ae(!0)},[o,mt]),Co=(0,f.useCallback)(c=>{Ce(c),mo(c)},[]),_t=(0,f.useCallback)(()=>{r(c=>{let u=!c;return u?document.documentElement.classList.add("impakers-selecting"):(document.documentElement.classList.remove("impakers-selecting"),C(null),_(null)),u})},[]);(0,f.useEffect)(()=>()=>{document.documentElement.classList.remove("impakers-selecting")},[]),(0,f.useEffect)(()=>{a(at());let c=()=>{m(window.location.pathname),a(at()),_(null),C(null)};window.addEventListener("popstate",c);let u=history.pushState.bind(history);return history.pushState=(...B)=>{u(...B),setTimeout(c,50)},()=>{window.removeEventListener("popstate",c),history.pushState=u}},[]),(0,f.useEffect)(()=>{let c=Be(we),u=Ye(c);u&&(g(u),$e(!0));let B=pn(c,L=>{g(L),$e(!0)});return Ut(e,we,{staleWhileRevalidate:!0}).then(L=>{g(L),$e(!0)}).catch(()=>{}),B},[e,we]);let pt="impakers-debug-history-last-seen";(0,f.useEffect)(()=>{let c=localStorage.getItem(pt)||new Date(0).toISOString();Bn(e,{since:c,limit:100}).then(u=>bn(u.length)).catch(()=>{})},[e]);let wo=(0,f.useCallback)(()=>{localStorage.setItem(pt,new Date().toISOString()),bn(0)},[]);(0,f.useEffect)(()=>{if(!J)return;let c=de.map(xs).filter(u=>u!==null);a(c),ho(c)},[de,J]);let ft=(0,f.useRef)(!0);(0,f.useEffect)(()=>{if(ft.current){ft.current=!1;return}ho(s)},[s]),(0,f.useEffect)(()=>{let c=u=>{if(u.key==="Escape"){if(ce){Pe(!1);return}if(i){u.preventDefault(),y(!0),fe(()=>{_(null),y(!1)},150);return}o&&(u.preventDefault(),r(!1),document.documentElement.classList.remove("impakers-selecting"),C(null))}};return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[ce,i,o]),(0,f.useEffect)(()=>{if(!o||i)return;let c=u=>{let B=u.composedPath()[0]||u.target;if(je(B,"[data-impakers-debug]")){C(null);return}let L=it(u.clientX,u.clientY);if(!L||je(L,"[data-impakers-debug]")){C(null);return}let{name:te,elementName:ge,path:ue,reactComponents:Q}=go(L),w=L.getBoundingClientRect();C({element:te,elementName:ge,elementPath:ue,rect:w,reactComponents:Q}),I({x:u.clientX,y:u.clientY})};return document.addEventListener("mousemove",c),()=>document.removeEventListener("mousemove",c)},[o,i]),(0,f.useEffect)(()=>{if(!o)return;let c=u=>{if(Je.current)return;let B=u.composedPath()[0]||u.target;if(je(B,"[data-impakers-debug]")||je(B,"[data-annotation-popup]")||je(B,"[data-annotation-marker]"))return;if(i){u.preventDefault(),u.stopPropagation(),ct.current?.shake();return}u.preventDefault(),u.stopPropagation();let L=it(u.clientX,u.clientY);if(!L)return;let{name:te,path:ge,reactComponents:ue}=go(L),Q=L.getBoundingClientRect(),w=u.clientX/window.innerWidth*100,ne=fs(L),Cn=ne?u.clientY:u.clientY+window.scrollY,tn=window.getSelection(),Ve;tn&&tn.toString().trim().length>0&&(Ve=tn.toString().trim().slice(0,500));let O=Rt(L),ke=It(L);_({x:w,y:Cn,clientY:u.clientY,element:te,elementPath:ge,selectedText:Ve,boundingBox:{x:Q.left,y:ne?Q.top:Q.top+window.scrollY,width:Q.width,height:Q.height},nearbyText:Nt(L),cssClasses:Et(L),isFixed:ne,fullPath:Ft(L),accessibility:Mt(L),computedStyles:ke,computedStylesObj:O,reactComponents:ue??void 0,sourceFile:gs(L),targetElement:L}),C(null);let wn=hs(L).filter(on=>on.includes("/chunks/"));wn.length>0&&(async()=>{for(let on of wn)try{let Sn=await tt(on);if(Sn){_(Wn=>Wn&&{...Wn,resolvedSource:`${Sn.source}:${Sn.line}`,resolvedName:Sn.name??void 0});break}}catch{}})()};return document.addEventListener("click",c,!0),()=>document.removeEventListener("click",c,!0)},[o,i]);let Ge=(0,f.useCallback)(c=>{pe(c),fe(()=>pe(null),4e3)},[]),So=(0,f.useCallback)(async c=>{if(!(!i||ae)){_e(!0);try{let u=jt(n),B=await Bt(),L=i.resolvedSource||i.sourceFile||"",te=i.resolvedName||null;if(!i.resolvedSource&&i.sourceFile?.includes("/chunks/"))try{let O=await tt(i.sourceFile);O&&(L=`${O.source}:${O.line}:${O.column}`,te=O.name)}catch{}let ge=await Ot(window.location.pathname),ue=L&&!L.includes("/chunks/")?ys(L,te):null,Q=Vt(ue?[ue]:void 0,ge?.targets);Q.length>0&&(u.debugTargets=Q),ge?.context&&(u.routeDebug=ge.context);let w=[];w.push(`## \uD53C\uB4DC\uBC31 ${c}`),Q.length>0&&(w.push(""),w.push("---"),w.push(""),w.push("**\uB514\uBC84\uAE45 \uD0C0\uAC9F \uD30C\uC77C**:"),Q.forEach(O=>{let ke=O.line?`:${O.line}${typeof O.column=="number"?`:${O.column}`:""}`:"";w.push(`- [${O.kind}] \`${O.file}${ke}\` (${O.reason})`)}));let ne=[];if(i.element&&ne.push(`**\uC120\uD0DD\uB41C \uC694\uC18C**: ${i.element}`),i.elementPath&&ne.push(`**DOM \uACBD\uB85C**: \`${i.elementPath}\``),i.selectedText&&ne.push(`**\uC120\uD0DD\uB41C \uD14D\uC2A4\uD2B8**: "${i.selectedText}"`),i.reactComponents?.trim()?ne.push(`**React \uCEF4\uD3EC\uB10C\uD2B8**: ${i.reactComponents}`):te&&ne.push(`**\uCEF4\uD3EC\uB10C\uD2B8/\uD568\uC218**: ${te}`),L&&!L.includes("/chunks/")&&ne.push(`**\uC18C\uC2A4 \uD30C\uC77C**: \`${L}\``),i.cssClasses&&ne.push(`**CSS \uD074\uB798\uC2A4**: \`${i.cssClasses}\``),i.nearbyText&&ne.push(`**\uC8FC\uBCC0 \uD14D\uC2A4\uD2B8**: ${i.nearbyText}`),i.accessibility&&ne.push(`**\uC811\uADFC\uC131**: ${i.accessibility}`),ne.length>0&&(w.push(""),w.push("---"),w.push(""),ne.forEach(O=>w.push(O))),u.consoleErrors?.length&&(w.push(""),w.push("---"),w.push(""),w.push("**\uCD5C\uADFC \uCF58\uC194 \uC5D0\uB7EC**:"),u.consoleErrors.slice(-10).forEach(O=>w.push(`- \`${O.slice(0,200)}\``))),u.consoleLogs?.length){let O=u.consoleLogs.filter(ke=>ke.level==="error"||ke.level==="warn").slice(-10);O.length>0&&(w.push(""),w.push("**\uCD5C\uADFC \uCF58\uC194 \uB85C\uADF8**:"),O.forEach(ke=>w.push(`- [${ke.level}] \`${ke.message.slice(0,200)}\``)))}if(w.push(""),w.push("---"),w.push(""),w.push("## \uD658\uACBD \uC815\uBCF4"),w.push(""),w.push(`- **URL**: ${u.url}`),w.push(`- **\uC2DC\uC810**: ${new Date(u.timestamp).toLocaleString("ko-KR")}`),w.push(`- **\uBE0C\uB77C\uC6B0\uC800**: ${u.browser}`),w.push(`- **\uD654\uBA74**: ${u.viewport} (@${u.pixelRatio}x)`),w.push(`- **\uC5B8\uC5B4**: ${u.language}`),u.user?.name&&w.push(`- **\uC0AC\uC6A9\uC790**: ${u.user.name}`),u.performance&&Object.keys(u.performance).length>0){w.push(""),w.push("---"),w.push(""),w.push("## \uC131\uB2A5"),w.push(""),w.push("| \uD56D\uBAA9 | \uAC12 |"),w.push("|------|-----|");let O={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[ke,xt]of Object.entries(u.performance)){let wn=O[ke]||ke,on=ke.includes("Heap")?"MB":"ms";w.push(`| ${wn} | ${xt}${on} |`)}}let Cn=w.join(`
2838
- `),tn=await Zt(e,{title:c.slice(0,100),description:"",priority:"medium",metadata:u,debugInfo:Cn,debug_info:Cn,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),fe(()=>P(!1),3e3);let Ve=tn.taskId||null;ut.current=Ve,fe(()=>{ut.current=null},300),fe(()=>{Ve&&K(O=>new Set(O).add(Ve))},250),y(!0),fe(()=>{_(null),y(!1),r(!1),document.documentElement.classList.remove("impakers-selecting"),Je.current=!0,setTimeout(()=>{Je.current=!1},300)},150),window.getSelection()?.removeAllRanges()}catch(u){let B=u?.message||"\uD53C\uB4DC\uBC31 \uC804\uC1A1 \uC2E4\uD328";Ge(B),console.error("[@impakers/debug] \uD53C\uB4DC\uBC31 \uC804\uC1A1 \uC2E4\uD328:",u)}finally{_e(!1)}}},[i,ae,e,n,Ge]),Lo=(0,f.useCallback)(()=>{y(!0),fe(()=>{_(null),y(!1),r(!1),document.documentElement.classList.remove("impakers-selecting"),Je.current=!0,setTimeout(()=>{Je.current=!1},300)},150)},[]),gt=(0,f.useCallback)(c=>{let u=c.id;Y(B=>B===u?null:u)},[]);(0,f.useEffect)(()=>{if(!T)return;let c=De(T),u=Ye(c);u?(be(L=>({...L,[T]:u})),xe(!1)):xe(!0);let B=pn(c,L=>{be(te=>({...te,[T]:L})),xe(!1)});return An(e,T,{staleWhileRevalidate:!0}).then(()=>xe(!1)).catch(()=>xe(!1)),B},[T,e]);let No=(0,f.useCallback)(async(c,u,B,L)=>{let te=n?.()?.name?String(n().name):"\uC775\uBA85",ge=n?.()?.id?String(n().id):void 0;try{let ue;if(L)try{ue=await Hn(e,L,"comment",c)}catch(Q){let w=Q?.message||"\uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328";Ge(w),console.error("[@impakers/debug] \uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328:",Q)}await $n(e,c,u,te,ge,B,ue)}catch(ue){let Q=ue?.message||"\uCF54\uBA58\uD2B8 \uC804\uC1A1 \uC2E4\uD328";Ge(Q),console.error("[@impakers/debug] \uCF54\uBA58\uD2B8 \uC804\uC1A1 \uC2E4\uD328:",ue)}},[n,e,Ge]),Eo=(0,f.useCallback)(()=>{Y(null)},[]),vn=(0,f.useCallback)(c=>{if(!c){R(null),q(null);return}if(R(c.id),c.boundingBox){let u=c.boundingBox,B=u.x+u.width/2,L=c.isFixed?u.y+u.height/2:u.y+u.height/2-window.scrollY,te=it(B,L);if(te){let ge=te.getBoundingClientRect(),ue=ge.width/u.width,Q=ge.height/u.height;if(ue>=.5&&Q>=.5){q(te);return}}}q(null)},[]),To=(0,f.useCallback)(()=>{if(!i)return{left:0,top:0};let c=i.x/100*window.innerWidth,u=i.isFixed?i.y:i.y-window.scrollY,B=Math.max(160,Math.min(window.innerWidth-160,c));return u>window.innerHeight-290?{left:B,bottom:window.innerHeight-u+20}:{left:B,top:u+20}},[i]);if(typeof document>"u")return null;let en=To(),nn=N?.getBoundingClientRect(),Ro=[{id:"comment",label:"\uD53C\uB4DC\uBC31",active:o,icon:(0,x.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,x.jsx)("path",{d:"M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z"})})},{id:"delay-capture",label:"\uB51C\uB808\uC774 \uCEA1\uCC98",icon:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,x.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,x.jsx)("polyline",{points:"12 6 12 12 16 14"})]})},{id:"inbox",label:"Inbox",badge:Se||void 0,icon:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,x.jsx)("polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12"}),(0,x.jsx)("path",{d:"M5.45 5.11L2 12v6a2 2 0 002 2h16a2 2 0 002-2v-6l-3.45-6.89A2 2 0 0016.76 4H7.24a2 2 0 00-1.79 1.11z"})]})},{id:"settings",label:"\uC124\uC815",icon:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,x.jsx)("circle",{cx:"12",cy:"12",r:"3"}),(0,x.jsx)("path",{d:"M19.4 15a1.65 1.65 0 00.33 1.82l.06.06a2 2 0 010 2.83 2 2 0 01-2.83 0l-.06-.06a1.65 1.65 0 00-1.82-.33 1.65 1.65 0 00-1 1.51V21a2 2 0 01-4 0v-.09A1.65 1.65 0 009 19.4a1.65 1.65 0 00-1.82.33l-.06.06a2 2 0 01-2.83-2.83l.06-.06A1.65 1.65 0 004.68 15a1.65 1.65 0 00-1.51-1H3a2 2 0 010-4h.09A1.65 1.65 0 004.6 9a1.65 1.65 0 00-.33-1.82l-.06-.06a2 2 0 012.83-2.83l.06.06A1.65 1.65 0 009 4.68a1.65 1.65 0 001-1.51V3a2 2 0 014 0v.09a1.65 1.65 0 001 1.51 1.65 1.65 0 001.82-.33l.06-.06a2 2 0 012.83 2.83l-.06.06A1.65 1.65 0 0019.4 9a1.65 1.65 0 001.51 1H21a2 2 0 010 4h-.09a1.65 1.65 0 00-1.51 1z"})]})}],ht=we,jn=n?.()?.name?String(n().name):null,yt=(0,f.useMemo)(()=>s.filter(c=>{let u=de.find(B=>B.id===c.id);return!(M.hideDoneMarkers&&(c.status==="done"||c.status==="resolved")||M.showOnlyMine&&u?.authorName&&jn&&u.authorName!==jn)}),[s,de,M.hideDoneMarkers,M.showOnlyMine,jn]),bt=(c,u)=>({id:c.id,title:c.title||"\uD53C\uB4DC\uBC31",status:c.status,priority:c.priority,authorName:c.authorName||"\uC775\uBA85",feedbackUrl:c.feedbackUrl||u,createdAt:c.createdAt,startedAt:c.startedAt,completedAt:c.completedAt,commentCount:c.commentCount||0}),Io=de.map(c=>bt(c,ht)),Mo=h.map(c=>bt(c,""));return(0,yo.createPortal)((0,x.jsxs)("div",{"data-impakers-debug":"",children:[(0,x.jsx)(ro,{items:Ro,onSelect:vo,onHide:t,onDoubleTap:_t}),ce&&(0,x.jsx)(lo,{pageItems:Io,allItems:Mo,currentPath:ht,serviceName:Ct()||void 0,endpoint:e,currentUserName:n?.()?.name?String(n().name):"\uC775\uBA85",currentUserId:n?.()?.id?String(n().id):void 0,onClose:()=>Pe(!1),onHistoryViewed:wo,newNotiCount:Se}),Ie&&(0,x.jsx)(fo,{settings:M,onChange:Co,onClose:()=>Ae(!1)}),o&&(0,x.jsxs)(x.Fragment,{children:[v?.rect&&!i&&(0,x.jsx)("div",{className:`${ee.hoverHighlight} ${ee.enter}`,style:{left:v.rect.left,top:v.rect.top,width:v.rect.width,height:v.rect.height}}),v&&!i&&(0,x.jsxs)("div",{className:`${ee.hoverTooltip} ${ee.enter}`,style:{left:Math.min(A.x+14,window.innerWidth-200),top:A.y+14},children:[v.reactComponents&&(0,x.jsx)("div",{className:ee.hoverReactPath,children:v.reactComponents}),(0,x.jsx)("div",{className:ee.hoverElementName,children:v.elementName})]}),nn&&re&&(0,x.jsx)("div",{className:`${ee.singleSelectOutline} ${ee.enter}`,style:{left:nn.left,top:nn.top,width:nn.width,height:nn.height}}),i?.targetElement&&(()=>{let c=i.targetElement.getBoundingClientRect();return(0,x.jsx)("div",{className:`${ee.singleSelectOutline} ${ee.enter}`,style:{left:c.left,top:c.top,width:c.width,height:c.height}})})()]}),(0,x.jsx)("div",{className:ee.markersLayer,"data-impakers-debug":"",style:{display:M.markersVisible?void 0:"none"},children:yt.filter(c=>!c.isFixed).map((c,u)=>(0,x.jsx)(ot,{annotation:c,layerIndex:u,isAnimated:H.has(c.id),isHovered:re===c.id,isDeleting:!1,markerClickBehavior:"edit",accentColor:M.markerColor,onHover:()=>vn(c),onHoverEnd:()=>vn(null),onClick:()=>gt(c),onContextMenu:()=>{}},c.id))}),(0,x.jsxs)("div",{className:ee.fixedMarkersLayer,"data-impakers-debug":"",style:{display:M.markersVisible?void 0:"none"},children:[yt.filter(c=>c.isFixed).map((c,u)=>(0,x.jsx)(ot,{annotation:c,layerIndex:u,isAnimated:H.has(c.id),isHovered:re===c.id,isDeleting:!1,markerClickBehavior:"edit",accentColor:M.markerColor,onHover:()=>vn(c),onHoverEnd:()=>vn(null),onClick:()=>gt(c),onContextMenu:()=>{}},c.id)),i&&(0,x.jsx)(Jt,{x:i.x,y:i.clientY,isMultiSelect:!1,accentColor:M.markerColor})]}),i&&(0,x.jsx)(Lt,{ref:ct,element:i.resolvedSource||i.resolvedName||i.element,selectedText:i.selectedText,isExiting:k,style:{position:"fixed",left:en.left,..."top"in en?{top:en.top}:{},..."bottom"in en?{bottom:en.bottom}:{},transform:"translateX(-50%)",zIndex:100001},onSubmit:So,onCancel:Lo}),T&&(()=>{let c=s.find(ne=>ne.id===T),u=de.find(ne=>ne.id===T);if(!c)return null;let B=c.x/100*window.innerWidth,L=c.isFixed?c.y:c.y-window.scrollY,te=Math.max(10,Math.min(B+20,window.innerWidth-360)),ge=window.innerHeight-L,ue=L,Q=ge>=300?Math.min(L,window.innerHeight-60):Math.max(10,L-Math.min(480,ue-10)),w={id:c.id,title:u?.title||c.comment||"\uD53C\uB4DC\uBC31",status:u?.status||"todo",authorName:u?.authorName||void 0,createdAt:u?.createdAt||new Date(c.timestamp).toISOString(),comments:le[c.id]||[]};return(0,x.jsx)(oo,{task:w,currentUserName:n?.()?.name?String(n().name):"\uC775\uBA85",currentUserId:n?.()?.id?String(n().id):void 0,left:te,top:Q,loading:Te,onClose:Eo,onReply:No})})(),dt!==null&&(0,x.jsxs)("div",{className:ee.countdownOverlay,"data-impakers-debug":"",children:[(0,x.jsx)("div",{className:ee.countdownNumber,children:dt}),(0,x.jsx)("div",{className:ee.countdownLabel,children:"\uD53C\uB4DC\uBC31 \uBAA8\uB4DC \uD65C\uC131\uD654\uAE4C\uC9C0..."}),(0,x.jsx)("button",{className:ee.countdownCancel,onClick:()=>{kn.current&&clearTimeout(kn.current),xn(null)},type:"button",children:"\uCDE8\uC18C"})]}),b&&(0,x.jsxs)("div",{className:ee.toast,"data-impakers-debug":"",children:[(0,x.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#16a34a",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,x.jsx)("polyline",{points:"20 6 9 17 4 12"})}),(0,x.jsx)("span",{children:"\uD0DC\uC2A4\uD06C \uC0DD\uC131\uC774 \uC644\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4"})]}),E&&(0,x.jsxs)("div",{className:`${ee.toast} ${ee.toastError}`,"data-impakers-debug":"",children:[(0,x.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#ef4444",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,x.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,x.jsx)("line",{x1:"15",y1:"9",x2:"9",y2:"15"}),(0,x.jsx)("line",{x1:"9",y1:"9",x2:"15",y2:"15"})]}),(0,x.jsx)("span",{children:E})]})]}),document.body)}var qe=require("react"),xo=require("react-dom");var ie=require("react/jsx-runtime");function ko({endpoint:e,onSuccess:n,onClose:t}){let[o,r]=(0,qe.useState)(""),[s,a]=(0,qe.useState)(!1),[i,_]=(0,qe.useState)(null),k=(0,qe.useCallback)(async y=>{if(y.preventDefault(),!(!o.trim()||s)){a(!0),_(null);try{let v=await wt(e,o.trim().toUpperCase());n(v.serviceName)}catch(v){_(v instanceof Error?v.message:"\uC778\uC99D \uC2E4\uD328")}finally{a(!1)}}},[o,e,s,n]);return typeof document>"u"?null:(0,xo.createPortal)((0,ie.jsxs)("div",{"data-impakers-debug":"",style:{position:"fixed",inset:0,zIndex:2147483647,display:"flex",alignItems:"center",justifyContent:"center",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif"},children:[(0,ie.jsx)("div",{onClick:t,style:{position:"absolute",inset:0,background:"rgba(0, 0, 0, 0.4)"}}),(0,ie.jsxs)("div",{style:{position:"relative",width:360,background:"white",borderRadius:12,boxShadow:"0 16px 48px rgba(0,0,0,0.16)",overflow:"hidden"},children:[(0,ie.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"16px 20px",borderBottom:"1px solid #e5e5e5"},children:[(0,ie.jsx)("h3",{style:{fontSize:15,fontWeight:600,color:"#18181b",margin:0},children:"\uD53C\uB4DC\uBC31 \uC704\uC82F \uC778\uC99D"}),(0,ie.jsx)("button",{onClick:t,type:"button",style:{width:28,height:28,border:"none",background:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:6,color:"#71717a"},children:(0,ie.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,ie.jsx)("path",{d:"M18 6L6 18M6 6l12 12"})})})]}),(0,ie.jsxs)("div",{style:{padding:20},children:[(0,ie.jsxs)("p",{style:{fontSize:13,color:"#71717a",textAlign:"center",marginBottom:16,lineHeight:1.5},children:["\uC11C\uBE44\uC2A4 \uC2DC\uD06C\uB9BF \uCF54\uB4DC\uB97C \uC785\uB825\uD574\uC8FC\uC138\uC694.",(0,ie.jsx)("br",{}),"\uCF54\uB4DC\uB294 \uC784\uD328\uCEE4\uC2A4 OS\uC5D0\uC11C \uD655\uC778\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."]}),i&&(0,ie.jsx)("div",{style:{background:"#fef2f2",border:"1px solid #fecaca",color:"#dc2626",padding:"8px 12px",borderRadius:8,fontSize:13,marginBottom:12},children:i}),(0,ie.jsxs)("form",{onSubmit:k,children:[(0,ie.jsx)("input",{type:"text",maxLength:6,placeholder:"A3F9K2",value:o,onChange:y=>r(y.target.value.toUpperCase()),autoFocus:!0,autoComplete:"off",style:{width:"100%",padding:"12px 16px",border:"1px solid #d4d4d8",borderRadius:8,fontSize:24,fontWeight:600,textAlign:"center",letterSpacing:8,textTransform:"uppercase",outline:"none",boxSizing:"border-box",fontFamily:"inherit",color:"#18181b"}}),(0,ie.jsx)("button",{type:"submit",disabled:o.trim().length<6||s,style:{width:"100%",marginTop:16,padding:"10px 16px",border:"none",borderRadius:8,fontSize:14,fontWeight:500,cursor:o.trim().length<6||s?"not-allowed":"pointer",background:o.trim().length<6||s?"#a1a1aa":"#18181b",color:"white",fontFamily:"inherit"},children:s?"\uC778\uC99D \uC911...":"\uC778\uC99D\uD558\uAE30"})]})]})]})]}),document.body)}var Oe=require("react/jsx-runtime");function ks({endpoint:e,getUser:n}){let[t,o]=(0,ve.useState)(!1),[r,s]=(0,ve.useState)(!1),[a,i]=(0,ve.useState)(()=>{try{return localStorage.getItem("impakers-debug-hidden")==="1"}catch{return!1}});(0,ve.useEffect)(()=>{o(Ke())},[]),(0,ve.useEffect)(()=>{let v=[He._on("impakers-debug:show-auth",()=>{s(!0),i(!1);try{localStorage.removeItem("impakers-debug-hidden")}catch{}}),He._on("impakers-debug:open",()=>{i(!1);try{localStorage.removeItem("impakers-debug-hidden")}catch{}}),He._on("impakers-debug:deactivate",()=>{o(!1),s(!1)})];return()=>v.forEach(C=>C())},[]),(0,ve.useEffect)(()=>{function v(C){if((C.ctrlKey||C.metaKey)&&C.shiftKey&&(C.key==="."||C.key===">"||C.code==="Period")){if(C.preventDefault(),a){i(!1);try{localStorage.removeItem("impakers-debug-hidden")}catch{}return}Ke()?o(!0):s(A=>!A)}}return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[a]);let _=(0,ve.useCallback)(v=>{o(!0),s(!1)},[]),k=(0,ve.useCallback)(()=>{s(!1)},[]),y=(0,ve.useCallback)(()=>{i(!0);try{localStorage.setItem("impakers-debug-hidden","1")}catch{}},[]);return(0,Oe.jsxs)(Oe.Fragment,{children:[t&&!a&&(0,Oe.jsx)(bo,{endpoint:e,getUser:n,onHide:y}),r&&!t&&(0,Oe.jsx)(ko,{endpoint:e,onSuccess:_,onClose:k})]})}0&&(module.exports={ImpakersDebug,ImpakersDebugProvider});
3155
+ }`,wr={markersLayer:"styles-module__markersLayer___VR1cD",fixedMarkersLayer:"styles-module__fixedMarkersLayer___wBuxm",fab:"styles-module__fab___6FrCF",fabEnter:"styles-module__fabEnter___9koyT",active:"styles-module__active___X5PRD",hoverHighlight:"styles-module__hoverHighlight___9kGLL",enter:"styles-module__enter___jAi-c",hoverHighlightIn:"styles-module__hoverHighlightIn___ljC4F",singleSelectOutline:"styles-module__singleSelectOutline___2meUm",fadeIn:"styles-module__fadeIn___PpRqy",hoverTooltip:"styles-module__hoverTooltip___JE1Bs",hoverTooltipIn:"styles-module__hoverTooltipIn___tncNM",hoverReactPath:"styles-module__hoverReactPath___wPGYi",hoverElementName:"styles-module__hoverElementName___lNqTP",contextMenu:"styles-module__contextMenu___nDXft",contextMenuItem:"styles-module__contextMenuItem___69GKu",toast:"styles-module__toast___gV3Sa",toastIn:"styles-module__toastIn___V382h",toastOut:"styles-module__toastOut___zlqxG",toastError:"styles-module__toastError___Q-8dn",countdownOverlay:"styles-module__countdownOverlay___GruQJ",countdownNumber:"styles-module__countdownNumber___VAmkI",countdownPulse:"styles-module__countdownPulse___ngZrL",countdownLabel:"styles-module__countdownLabel___px-ao",countdownCancel:"styles-module__countdownCancel___8cRgZ",fadeOut:"styles-module__fadeOut___tZb9S"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-debug-widget-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-debug-widget-styles",document.head.appendChild(e)),e.textContent=Cr}var ae=wr;var y=require("react/jsx-runtime");function dt(e,n){let t=document.elementFromPoint(e,n);if(!t)return null;for(;t?.shadowRoot;){let o=t.shadowRoot.elementFromPoint(e,n);if(!o||o===t)break;t=o}return t}function Sr(e){let n=e;for(;n&&n!==document.body;){let t=window.getComputedStyle(n);if(t.position==="fixed"||t.position==="sticky")return!0;n=n.parentElement}return!1}function Co(e){let{name:n,path:t}=qn(e),o=jt(e,{mode:"filtered"});return{name:o.path?`${o.path} ${n}`:n,elementName:n,path:t,reactComponents:o.path}}function Lr(e){let n=pn(e),t=n.found?n:Jn(e);if(t.found&&t.source)return Fn(t.source,"path")}function Nr(e){let n=pn(e),t=n.found?n:Jn(e);return t.found&&t.sourceCandidates&&t.sourceCandidates.length>0?t.sourceCandidates.map(o=>Fn(o,"path")):t.found&&t.source?[Fn(t.source,"path")]:[]}function Tr(e,n){let t=e.match(/^(.+):(\d+)(?::(\d+))?$/);if(!t)return null;let[,o,s,r]=t,a=Number.parseInt(s,10),i=r?Number.parseInt(r,10):void 0;return!o||Number.isNaN(a)?null:{kind:"component",file:o,line:a,column:i,label:n||"Resolved component source",confidence:.98,reason:"resolved-from-source-map"}}var Ir="impakers-debug-markers-";function ut(){return Ir+window.location.pathname}function ct(){try{let e=localStorage.getItem(ut());return e?JSON.parse(e):[]}catch{return[]}}function wo(e){try{e.length===0?localStorage.removeItem(ut()):localStorage.setItem(ut(),JSON.stringify(e))}catch{}}function Er(e){return e.feedbackMarker?{id:e.id,x:e.feedbackMarker.x,y:e.feedbackMarker.y,comment:e.title.replace(/^\[피드백\]\s*/,""),element:e.feedbackMarker.element||"",elementPath:"",timestamp:new Date(e.createdAt).getTime(),isFixed:e.feedbackMarker.isFixed,boundingBox:e.feedbackMarker.boundingBox,status:e.status}:null}function Lo({endpoint:e,getUser:n,onHide:t}){let[o,s]=(0,g.useState)(!1),[r,a]=(0,g.useState)(()=>ct()),[i,_]=(0,g.useState)(null),[k,b]=(0,g.useState)(!1),[C,v]=(0,g.useState)(null),[$,F]=(0,g.useState)({x:0,y:0}),[H,W]=(0,g.useState)(new Set),[ce,pe]=(0,g.useState)(!1),[T,w]=(0,g.useState)(null),[I,O]=(0,g.useState)(null),[x,A]=(0,g.useState)(!1),[E,q]=(0,g.useState)(null),[M,J]=(0,g.useState)(null),[se,fe]=(0,g.useState)({}),[ve,re]=(0,g.useState)(!1),[le,h]=(0,g.useState)([]),[f,B]=(0,g.useState)([]),[P,Le]=(0,g.useState)(!1),[Ne,Re]=(0,g.useState)(!1),[G,Ie]=(0,g.useState)(!1),[ge,m]=(0,g.useState)(()=>yo()),[ne,Ke]=(0,g.useState)(()=>window.location.pathname),[Me,nn]=(0,g.useState)(!1),[_t,mt]=(0,g.useState)(0),[pt,wn]=(0,g.useState)(null),Sn=(0,g.useRef)(null),ft=(0,g.useRef)(null),gt=(0,g.useRef)(null),tn=(0,g.useRef)(!1),ht=(0,g.useCallback)(()=>{wn(3);let c=3,u=()=>{c-=1,c<=0?(wn(null),s(!0),document.documentElement.classList.add("impakers-selecting")):(wn(c),Sn.current=setTimeout(u,1e3))};Sn.current=setTimeout(u,1e3)},[]),Io=(0,g.useCallback)(c=>{c==="comment"?yt():c==="delay-capture"?ht():c==="agent"?Re(!0):c==="inbox"?(Le(!0),Jt(e,{staleWhileRevalidate:!0}).then(B).catch(()=>{}),o&&(s(!1),document.documentElement.classList.remove("impakers-selecting"),v(null),_(null))):c==="settings"&&Ie(!0)},[o,ht]),Eo=(0,g.useCallback)(c=>{m(c),bo(c)},[]),yt=(0,g.useCallback)(()=>{s(c=>{let u=!c;return u?document.documentElement.classList.add("impakers-selecting"):(document.documentElement.classList.remove("impakers-selecting"),v(null),_(null)),u})},[]);(0,g.useEffect)(()=>()=>{document.documentElement.classList.remove("impakers-selecting")},[]),(0,g.useEffect)(()=>{a(ct());let c=()=>{Ke(window.location.pathname),a(ct()),_(null),v(null)};window.addEventListener("popstate",c);let u=history.pushState.bind(history);return history.pushState=(...V)=>{u(...V),setTimeout(c,50)},()=>{window.removeEventListener("popstate",c),history.pushState=u}},[]),(0,g.useEffect)(()=>{let c=De(ne),u=Ge(c);u&&(h(u),nn(!0));let V=bn(c,N=>{h(N),nn(!0)});return Gt(e,ne,{staleWhileRevalidate:!0}).then(N=>{h(N),nn(!0)}).catch(()=>{}),V},[e,ne]);let bt="impakers-debug-history-last-seen";(0,g.useEffect)(()=>{let c=localStorage.getItem(bt)||new Date(0).toISOString();Wn(e,{since:c,limit:100}).then(u=>mt(u.length)).catch(()=>{})},[e]);let Ro=(0,g.useCallback)(()=>{localStorage.setItem(bt,new Date().toISOString()),mt(0)},[]);(0,g.useEffect)(()=>{if(!Me)return;let c=le.map(Er).filter(u=>u!==null);a(c),wo(c)},[le,Me]);let xt=(0,g.useRef)(!0);(0,g.useEffect)(()=>{if(xt.current){xt.current=!1;return}wo(r)},[r]),(0,g.useEffect)(()=>{let c=u=>{if(u.key==="Escape"){if(P){Le(!1);return}if(i){u.preventDefault(),b(!0),ke(()=>{_(null),b(!1)},150);return}o&&(u.preventDefault(),s(!1),document.documentElement.classList.remove("impakers-selecting"),v(null))}};return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[P,i,o]),(0,g.useEffect)(()=>{if(!o||i)return;let c=u=>{let V=u.composedPath()[0]||u.target;if(Oe(V,"[data-impakers-debug]")){v(null);return}let N=dt(u.clientX,u.clientY);if(!N||Oe(N,"[data-impakers-debug]")){v(null);return}let{name:ue,elementName:Ce,path:be,reactComponents:oe}=Co(N),S=N.getBoundingClientRect();v({element:ue,elementName:Ce,elementPath:be,rect:S,reactComponents:oe}),F({x:u.clientX,y:u.clientY})};return document.addEventListener("mousemove",c),()=>document.removeEventListener("mousemove",c)},[o,i]),(0,g.useEffect)(()=>{if(!o)return;let c=u=>{if(tn.current)return;let V=u.composedPath()[0]||u.target;if(Oe(V,"[data-impakers-debug]")||Oe(V,"[data-annotation-popup]")||Oe(V,"[data-annotation-marker]"))return;if(i){u.preventDefault(),u.stopPropagation(),ft.current?.shake();return}u.preventDefault(),u.stopPropagation();let N=dt(u.clientX,u.clientY);if(!N)return;let{name:ue,path:Ce,reactComponents:be}=Co(N),oe=N.getBoundingClientRect(),S=u.clientX/window.innerWidth*100,de=Sr(N),Nn=de?u.clientY:u.clientY+window.scrollY,an=window.getSelection(),Ue;an&&an.toString().trim().length>0&&(Ue=an.toString().trim().slice(0,500));let Y=Pt(N),Te=$t(N);_({x:S,y:Nn,clientY:u.clientY,element:ue,elementPath:Ce,selectedText:Ue,boundingBox:{x:oe.left,y:de?oe.top:oe.top+window.scrollY,width:oe.width,height:oe.height},nearbyText:Mt(N),cssClasses:At(N),isFixed:de,fullPath:Bt(N),accessibility:Ht(N),computedStyles:Te,computedStylesObj:Y,reactComponents:be??void 0,sourceFile:Lr(N),targetElement:N}),v(null);let Tn=Nr(N).filter(ln=>ln.includes("/chunks/"));Tn.length>0&&(async()=>{for(let ln of Tn)try{let In=await rt(ln);if(In){_(Kn=>Kn&&{...Kn,resolvedSource:`${In.source}:${In.line}`,resolvedName:In.name??void 0});break}}catch{}})()};return document.addEventListener("click",c,!0),()=>document.removeEventListener("click",c,!0)},[o,i]);let on=(0,g.useCallback)(c=>{q(c),ke(()=>q(null),4e3)},[]),Mo=(0,g.useCallback)(async c=>{if(!(!i||ce)){pe(!0);try{let u=Kt(n),V=await Ot(),N=i.resolvedSource||i.sourceFile||"",ue=i.resolvedName||null;if(!i.resolvedSource&&i.sourceFile?.includes("/chunks/"))try{let Y=await rt(i.sourceFile);Y&&(N=`${Y.source}:${Y.line}:${Y.column}`,ue=Y.name)}catch{}let Ce=await Xt(window.location.pathname),be=N&&!N.includes("/chunks/")?Tr(N,ue):null,oe=Yt(be?[be]:void 0,Ce?.targets);oe.length>0&&(u.debugTargets=oe),Ce?.context&&(u.routeDebug=Ce.context);let S=[];S.push(`## \uD53C\uB4DC\uBC31 ${c}`),oe.length>0&&(S.push(""),S.push("---"),S.push(""),S.push("**\uB514\uBC84\uAE45 \uD0C0\uAC9F \uD30C\uC77C**:"),oe.forEach(Y=>{let Te=Y.line?`:${Y.line}${typeof Y.column=="number"?`:${Y.column}`:""}`:"";S.push(`- [${Y.kind}] \`${Y.file}${Te}\` (${Y.reason})`)}));let de=[];if(i.element&&de.push(`**\uC120\uD0DD\uB41C \uC694\uC18C**: ${i.element}`),i.elementPath&&de.push(`**DOM \uACBD\uB85C**: \`${i.elementPath}\``),i.selectedText&&de.push(`**\uC120\uD0DD\uB41C \uD14D\uC2A4\uD2B8**: "${i.selectedText}"`),i.reactComponents?.trim()?de.push(`**React \uCEF4\uD3EC\uB10C\uD2B8**: ${i.reactComponents}`):ue&&de.push(`**\uCEF4\uD3EC\uB10C\uD2B8/\uD568\uC218**: ${ue}`),N&&!N.includes("/chunks/")&&de.push(`**\uC18C\uC2A4 \uD30C\uC77C**: \`${N}\``),i.cssClasses&&de.push(`**CSS \uD074\uB798\uC2A4**: \`${i.cssClasses}\``),i.nearbyText&&de.push(`**\uC8FC\uBCC0 \uD14D\uC2A4\uD2B8**: ${i.nearbyText}`),i.accessibility&&de.push(`**\uC811\uADFC\uC131**: ${i.accessibility}`),de.length>0&&(S.push(""),S.push("---"),S.push(""),de.forEach(Y=>S.push(Y))),u.consoleErrors?.length&&(S.push(""),S.push("---"),S.push(""),S.push("**\uCD5C\uADFC \uCF58\uC194 \uC5D0\uB7EC**:"),u.consoleErrors.slice(-10).forEach(Y=>S.push(`- \`${Y.slice(0,200)}\``))),u.consoleLogs?.length){let Y=u.consoleLogs.filter(Te=>Te.level==="error"||Te.level==="warn").slice(-10);Y.length>0&&(S.push(""),S.push("**\uCD5C\uADFC \uCF58\uC194 \uB85C\uADF8**:"),Y.forEach(Te=>S.push(`- [${Te.level}] \`${Te.message.slice(0,200)}\``)))}if(S.push(""),S.push("---"),S.push(""),S.push("## \uD658\uACBD \uC815\uBCF4"),S.push(""),S.push(`- **URL**: ${u.url}`),S.push(`- **\uC2DC\uC810**: ${new Date(u.timestamp).toLocaleString("ko-KR")}`),S.push(`- **\uBE0C\uB77C\uC6B0\uC800**: ${u.browser}`),S.push(`- **\uD654\uBA74**: ${u.viewport} (@${u.pixelRatio}x)`),S.push(`- **\uC5B8\uC5B4**: ${u.language}`),u.user?.name&&S.push(`- **\uC0AC\uC6A9\uC790**: ${u.user.name}`),u.performance&&Object.keys(u.performance).length>0){S.push(""),S.push("---"),S.push(""),S.push("## \uC131\uB2A5"),S.push(""),S.push("| \uD56D\uBAA9 | \uAC12 |"),S.push("|------|-----|");let Y={pageLoadTime:"\uD398\uC774\uC9C0 \uB85C\uB529",domContentLoaded:"DOM \uB85C\uB4DC",ttfb:"TTFB",firstContentfulPaint:"FCP",usedJSHeapMB:"\uBA54\uBAA8\uB9AC \uC0AC\uC6A9",totalJSHeapMB:"\uBA54\uBAA8\uB9AC \uC804\uCCB4"};for(let[Te,St]of Object.entries(u.performance)){let Tn=Y[Te]||Te,ln=Te.includes("Heap")?"MB":"ms";S.push(`| ${Tn} | ${St}${ln} |`)}}let Nn=S.join(`
3156
+ `),an=await qt(e,{title:c.slice(0,100),description:"",priority:"medium",metadata:u,debugInfo:Nn,debug_info:Nn,screenshot:V,feedbackUrl:window.location.pathname,feedbackMarker:{x:i.x,y:i.y,isFixed:i.isFixed||!1,element:i.element,boundingBox:i.boundingBox},authorName:n?.()?.name?String(n().name):void 0});A(!0),ke(()=>A(!1),3e3);let Ue=an.taskId||null;gt.current=Ue,ke(()=>{gt.current=null},300),ke(()=>{Ue&&W(Y=>new Set(Y).add(Ue))},250),b(!0),ke(()=>{_(null),b(!1),s(!1),document.documentElement.classList.remove("impakers-selecting"),tn.current=!0,setTimeout(()=>{tn.current=!1},300)},150),window.getSelection()?.removeAllRanges()}catch(u){let V=u?.message||"\uD53C\uB4DC\uBC31 \uC804\uC1A1 \uC2E4\uD328";on(V),console.error("[@impakers/debug] \uD53C\uB4DC\uBC31 \uC804\uC1A1 \uC2E4\uD328:",u)}finally{pe(!1)}}},[i,ce,e,n,on]),Ao=(0,g.useCallback)(()=>{b(!0),ke(()=>{_(null),b(!1),s(!1),document.documentElement.classList.remove("impakers-selecting"),tn.current=!0,setTimeout(()=>{tn.current=!1},300)},150)},[]),kt=(0,g.useCallback)(c=>{let u=c.id;J(V=>V===u?null:u)},[]);(0,g.useEffect)(()=>{if(!M)return;let c=We(M),u=Ge(c);u?(fe(N=>({...N,[M]:u})),re(!1)):re(!0);let V=bn(c,N=>{fe(ue=>({...ue,[M]:N})),re(!1)});return zn(e,M,{staleWhileRevalidate:!0}).then(()=>re(!1)).catch(()=>re(!1)),V},[M,e]);let Fo=(0,g.useCallback)(async(c,u,V,N)=>{let ue=n?.()?.name?String(n().name):"\uC775\uBA85",Ce=n?.()?.id?String(n().id):void 0;try{let be;if(N)try{be=await jn(e,N,"comment",c)}catch(oe){let S=oe?.message||"\uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328";on(S),console.error("[@impakers/debug] \uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328:",oe)}await Dn(e,c,u,ue,Ce,V,be)}catch(be){let oe=be?.message||"\uCF54\uBA58\uD2B8 \uC804\uC1A1 \uC2E4\uD328";on(oe),console.error("[@impakers/debug] \uCF54\uBA58\uD2B8 \uC804\uC1A1 \uC2E4\uD328:",be)}},[n,e,on]),Po=(0,g.useCallback)(()=>{J(null)},[]),Ln=(0,g.useCallback)(c=>{if(!c){w(null),O(null);return}if(w(c.id),c.boundingBox){let u=c.boundingBox,V=u.x+u.width/2,N=c.isFixed?u.y+u.height/2:u.y+u.height/2-window.scrollY,ue=dt(V,N);if(ue){let Ce=ue.getBoundingClientRect(),be=Ce.width/u.width,oe=Ce.height/u.height;if(be>=.5&&oe>=.5){O(ue);return}}}O(null)},[]),$o=(0,g.useCallback)(()=>{if(!i)return{left:0,top:0};let c=i.x/100*window.innerWidth,u=i.isFixed?i.y:i.y-window.scrollY,V=Math.max(160,Math.min(window.innerWidth-160,c));return u>window.innerHeight-290?{left:V,bottom:window.innerHeight-u+20}:{left:V,top:u+20}},[i]);if(typeof document>"u")return null;let sn=$o(),rn=I?.getBoundingClientRect(),Ho=[{id:"comment",label:"\uD53C\uB4DC\uBC31",active:o,icon:(0,y.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,y.jsx)("path",{d:"M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z"})})},{id:"delay-capture",label:"\uB51C\uB808\uC774 \uCEA1\uCC98",icon:(0,y.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,y.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,y.jsx)("polyline",{points:"12 6 12 12 16 14"})]})},{id:"agent",label:"\uC5D0\uC774\uC804\uD2B8",icon:(0,y.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,y.jsx)("path",{d:"M12 2L2 7l10 5 10-5-10-5z"}),(0,y.jsx)("path",{d:"M2 17l10 5 10-5"}),(0,y.jsx)("path",{d:"M2 12l10 5 10-5"})]})},{id:"inbox",label:"Inbox",badge:_t||void 0,icon:(0,y.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,y.jsx)("polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12"}),(0,y.jsx)("path",{d:"M5.45 5.11L2 12v6a2 2 0 002 2h16a2 2 0 002-2v-6l-3.45-6.89A2 2 0 0016.76 4H7.24a2 2 0 00-1.79 1.11z"})]})},{id:"settings",label:"\uC124\uC815",icon:(0,y.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,y.jsx)("circle",{cx:"12",cy:"12",r:"3"}),(0,y.jsx)("path",{d:"M19.4 15a1.65 1.65 0 00.33 1.82l.06.06a2 2 0 010 2.83 2 2 0 01-2.83 0l-.06-.06a1.65 1.65 0 00-1.82-.33 1.65 1.65 0 00-1 1.51V21a2 2 0 01-4 0v-.09A1.65 1.65 0 009 19.4a1.65 1.65 0 00-1.82.33l-.06.06a2 2 0 01-2.83-2.83l.06-.06A1.65 1.65 0 004.68 15a1.65 1.65 0 00-1.51-1H3a2 2 0 010-4h.09A1.65 1.65 0 004.6 9a1.65 1.65 0 00-.33-1.82l-.06-.06a2 2 0 012.83-2.83l.06.06A1.65 1.65 0 009 4.68a1.65 1.65 0 001-1.51V3a2 2 0 014 0v.09a1.65 1.65 0 001 1.51 1.65 1.65 0 001.82-.33l.06-.06a2 2 0 012.83 2.83l-.06.06A1.65 1.65 0 0019.4 9a1.65 1.65 0 001.51 1H21a2 2 0 010 4h-.09a1.65 1.65 0 00-1.51 1z"})]})}],vt=ne,Zn=n?.()?.name?String(n().name):null,Ct=(0,g.useMemo)(()=>r.filter(c=>{let u=le.find(V=>V.id===c.id);return!(ge.hideDoneMarkers&&(c.status==="done"||c.status==="resolved")||ge.showOnlyMine&&u?.authorName&&Zn&&u.authorName!==Zn)}),[r,le,ge.hideDoneMarkers,ge.showOnlyMine,Zn]),wt=(c,u)=>({id:c.id,title:c.title||"\uD53C\uB4DC\uBC31",status:c.status,priority:c.priority,authorName:c.authorName||"\uC775\uBA85",feedbackUrl:c.feedbackUrl||u,createdAt:c.createdAt,startedAt:c.startedAt,completedAt:c.completedAt,commentCount:c.commentCount||0}),Bo=le.map(c=>wt(c,vt)),zo=f.map(c=>wt(c,""));return(0,So.createPortal)((0,y.jsxs)("div",{"data-impakers-debug":"",children:[(0,y.jsx)(co,{items:Ho,onSelect:Io,onHide:t,onDoubleTap:yt}),P&&(0,y.jsx)(po,{pageItems:Bo,allItems:zo,currentPath:vt,serviceName:Tt()||void 0,endpoint:e,currentUserName:n?.()?.name?String(n().name):"\uC775\uBA85",currentUserId:n?.()?.id?String(n().id):void 0,onClose:()=>Le(!1),onHistoryViewed:Ro,newNotiCount:_t}),Ne&&(0,y.jsx)(go,{endpoint:e,onClose:()=>Re(!1)}),G&&(0,y.jsx)(vo,{settings:ge,onChange:Eo,onClose:()=>Ie(!1)}),o&&(0,y.jsxs)(y.Fragment,{children:[C?.rect&&!i&&(0,y.jsx)("div",{className:`${ae.hoverHighlight} ${ae.enter}`,style:{left:C.rect.left,top:C.rect.top,width:C.rect.width,height:C.rect.height}}),C&&!i&&(0,y.jsxs)("div",{className:`${ae.hoverTooltip} ${ae.enter}`,style:{left:Math.min($.x+14,window.innerWidth-200),top:$.y+14},children:[C.reactComponents&&(0,y.jsx)("div",{className:ae.hoverReactPath,children:C.reactComponents}),(0,y.jsx)("div",{className:ae.hoverElementName,children:C.elementName})]}),rn&&T&&(0,y.jsx)("div",{className:`${ae.singleSelectOutline} ${ae.enter}`,style:{left:rn.left,top:rn.top,width:rn.width,height:rn.height}}),i?.targetElement&&(()=>{let c=i.targetElement.getBoundingClientRect();return(0,y.jsx)("div",{className:`${ae.singleSelectOutline} ${ae.enter}`,style:{left:c.left,top:c.top,width:c.width,height:c.height}})})()]}),(0,y.jsx)("div",{className:ae.markersLayer,"data-impakers-debug":"",style:{display:ge.markersVisible?void 0:"none"},children:Ct.filter(c=>!c.isFixed).map((c,u)=>(0,y.jsx)(it,{annotation:c,layerIndex:u,isAnimated:H.has(c.id),isHovered:T===c.id,isDeleting:!1,markerClickBehavior:"edit",accentColor:ge.markerColor,onHover:()=>Ln(c),onHoverEnd:()=>Ln(null),onClick:()=>kt(c),onContextMenu:()=>{}},c.id))}),(0,y.jsxs)("div",{className:ae.fixedMarkersLayer,"data-impakers-debug":"",style:{display:ge.markersVisible?void 0:"none"},children:[Ct.filter(c=>c.isFixed).map((c,u)=>(0,y.jsx)(it,{annotation:c,layerIndex:u,isAnimated:H.has(c.id),isHovered:T===c.id,isDeleting:!1,markerClickBehavior:"edit",accentColor:ge.markerColor,onHover:()=>Ln(c),onHoverEnd:()=>Ln(null),onClick:()=>kt(c),onContextMenu:()=>{}},c.id)),i&&(0,y.jsx)(oo,{x:i.x,y:i.clientY,isMultiSelect:!1,accentColor:ge.markerColor})]}),i&&(0,y.jsx)(Rt,{ref:ft,element:i.resolvedSource||i.resolvedName||i.element,selectedText:i.selectedText,isExiting:k,style:{position:"fixed",left:sn.left,..."top"in sn?{top:sn.top}:{},..."bottom"in sn?{bottom:sn.bottom}:{},transform:"translateX(-50%)",zIndex:100001},onSubmit:Mo,onCancel:Ao}),M&&(()=>{let c=r.find(de=>de.id===M),u=le.find(de=>de.id===M);if(!c)return null;let V=c.x/100*window.innerWidth,N=c.isFixed?c.y:c.y-window.scrollY,ue=Math.max(10,Math.min(V+20,window.innerWidth-360)),Ce=window.innerHeight-N,be=N,oe=Ce>=300?Math.min(N,window.innerHeight-60):Math.max(10,N-Math.min(480,be-10)),S={id:c.id,title:u?.title||c.comment||"\uD53C\uB4DC\uBC31",status:u?.status||"todo",authorName:u?.authorName||void 0,createdAt:u?.createdAt||new Date(c.timestamp).toISOString(),comments:se[c.id]||[]};return(0,y.jsx)(lo,{task:S,currentUserName:n?.()?.name?String(n().name):"\uC775\uBA85",currentUserId:n?.()?.id?String(n().id):void 0,left:ue,top:oe,loading:ve,onClose:Po,onReply:Fo})})(),pt!==null&&(0,y.jsxs)("div",{className:ae.countdownOverlay,"data-impakers-debug":"",children:[(0,y.jsx)("div",{className:ae.countdownNumber,children:pt}),(0,y.jsx)("div",{className:ae.countdownLabel,children:"\uD53C\uB4DC\uBC31 \uBAA8\uB4DC \uD65C\uC131\uD654\uAE4C\uC9C0..."}),(0,y.jsx)("button",{className:ae.countdownCancel,onClick:()=>{Sn.current&&clearTimeout(Sn.current),wn(null)},type:"button",children:"\uCDE8\uC18C"})]}),x&&(0,y.jsxs)("div",{className:ae.toast,"data-impakers-debug":"",children:[(0,y.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#16a34a",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,y.jsx)("polyline",{points:"20 6 9 17 4 12"})}),(0,y.jsx)("span",{children:"\uD0DC\uC2A4\uD06C \uC0DD\uC131\uC774 \uC644\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4"})]}),E&&(0,y.jsxs)("div",{className:`${ae.toast} ${ae.toastError}`,"data-impakers-debug":"",children:[(0,y.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#ef4444",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,y.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,y.jsx)("line",{x1:"15",y1:"9",x2:"9",y2:"15"}),(0,y.jsx)("line",{x1:"9",y1:"9",x2:"15",y2:"15"})]}),(0,y.jsx)("span",{children:E})]})]}),document.body)}var en=require("react"),No=require("react-dom");var ye=require("react/jsx-runtime");function To({endpoint:e,onSuccess:n,onClose:t}){let[o,s]=(0,en.useState)(""),[r,a]=(0,en.useState)(!1),[i,_]=(0,en.useState)(null),k=(0,en.useCallback)(async b=>{if(b.preventDefault(),!(!o.trim()||r)){a(!0),_(null);try{let C=await It(e,o.trim().toUpperCase());n(C.serviceName)}catch(C){_(C instanceof Error?C.message:"\uC778\uC99D \uC2E4\uD328")}finally{a(!1)}}},[o,e,r,n]);return typeof document>"u"?null:(0,No.createPortal)((0,ye.jsxs)("div",{"data-impakers-debug":"",style:{position:"fixed",inset:0,zIndex:2147483647,display:"flex",alignItems:"center",justifyContent:"center",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif"},children:[(0,ye.jsx)("div",{onClick:t,style:{position:"absolute",inset:0,background:"rgba(0, 0, 0, 0.4)"}}),(0,ye.jsxs)("div",{style:{position:"relative",width:360,background:"white",borderRadius:12,boxShadow:"0 16px 48px rgba(0,0,0,0.16)",overflow:"hidden"},children:[(0,ye.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"16px 20px",borderBottom:"1px solid #e5e5e5"},children:[(0,ye.jsx)("h3",{style:{fontSize:15,fontWeight:600,color:"#18181b",margin:0},children:"\uD53C\uB4DC\uBC31 \uC704\uC82F \uC778\uC99D"}),(0,ye.jsx)("button",{onClick:t,type:"button",style:{width:28,height:28,border:"none",background:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:6,color:"#71717a"},children:(0,ye.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,ye.jsx)("path",{d:"M18 6L6 18M6 6l12 12"})})})]}),(0,ye.jsxs)("div",{style:{padding:20},children:[(0,ye.jsxs)("p",{style:{fontSize:13,color:"#71717a",textAlign:"center",marginBottom:16,lineHeight:1.5},children:["\uC11C\uBE44\uC2A4 \uC2DC\uD06C\uB9BF \uCF54\uB4DC\uB97C \uC785\uB825\uD574\uC8FC\uC138\uC694.",(0,ye.jsx)("br",{}),"\uCF54\uB4DC\uB294 \uC784\uD328\uCEE4\uC2A4 OS\uC5D0\uC11C \uD655\uC778\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."]}),i&&(0,ye.jsx)("div",{style:{background:"#fef2f2",border:"1px solid #fecaca",color:"#dc2626",padding:"8px 12px",borderRadius:8,fontSize:13,marginBottom:12},children:i}),(0,ye.jsxs)("form",{onSubmit:k,children:[(0,ye.jsx)("input",{type:"text",maxLength:6,placeholder:"A3F9K2",value:o,onChange:b=>s(b.target.value.toUpperCase()),autoFocus:!0,autoComplete:"off",style:{width:"100%",padding:"12px 16px",border:"1px solid #d4d4d8",borderRadius:8,fontSize:24,fontWeight:600,textAlign:"center",letterSpacing:8,textTransform:"uppercase",outline:"none",boxSizing:"border-box",fontFamily:"inherit",color:"#18181b"}}),(0,ye.jsx)("button",{type:"submit",disabled:o.trim().length<6||r,style:{width:"100%",marginTop:16,padding:"10px 16px",border:"none",borderRadius:8,fontSize:14,fontWeight:500,cursor:o.trim().length<6||r?"not-allowed":"pointer",background:o.trim().length<6||r?"#a1a1aa":"#18181b",color:"white",fontFamily:"inherit"},children:r?"\uC778\uC99D \uC911...":"\uC778\uC99D\uD558\uAE30"})]})]})]})]}),document.body)}var Ze=require("react/jsx-runtime");function Rr({endpoint:e,getUser:n}){let[t,o]=(0,Ee.useState)(!1),[s,r]=(0,Ee.useState)(!1),[a,i]=(0,Ee.useState)(()=>{try{return localStorage.getItem("impakers-debug-hidden")==="1"}catch{return!1}});(0,Ee.useEffect)(()=>{o(Xe())},[]),(0,Ee.useEffect)(()=>{let C=[ze._on("impakers-debug:show-auth",()=>{r(!0),i(!1);try{localStorage.removeItem("impakers-debug-hidden")}catch{}}),ze._on("impakers-debug:open",()=>{i(!1);try{localStorage.removeItem("impakers-debug-hidden")}catch{}}),ze._on("impakers-debug:deactivate",()=>{o(!1),r(!1)})];return()=>C.forEach(v=>v())},[]),(0,Ee.useEffect)(()=>{function C(v){if((v.ctrlKey||v.metaKey)&&v.shiftKey&&(v.key==="."||v.key===">"||v.code==="Period")){if(v.preventDefault(),a){i(!1);try{localStorage.removeItem("impakers-debug-hidden")}catch{}return}Xe()?o(!0):r($=>!$)}}return document.addEventListener("keydown",C),()=>document.removeEventListener("keydown",C)},[a]);let _=(0,Ee.useCallback)(C=>{o(!0),r(!1)},[]),k=(0,Ee.useCallback)(()=>{r(!1)},[]),b=(0,Ee.useCallback)(()=>{i(!0);try{localStorage.setItem("impakers-debug-hidden","1")}catch{}},[]);return(0,Ze.jsxs)(Ze.Fragment,{children:[t&&!a&&(0,Ze.jsx)(Lo,{endpoint:e,getUser:n,onHide:b}),s&&!t&&(0,Ze.jsx)(To,{endpoint:e,onSuccess:_,onClose:k})]})}0&&(module.exports={ImpakersDebug,ImpakersDebugProvider});