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