@01.works/visual-review 0.9.6 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -7
- package/THIRD_PARTY_NOTICES.md +9 -0
- package/dist/active-review-mount-BW2oQDQ2.js +1517 -0
- package/dist/convex-runtime-8kViWXIL.js +2 -0
- package/dist/embedded-source-context-BTB3pFqv.js +1 -0
- package/dist/hosted-runtime-CP0aew_W.js +1 -0
- package/dist/index.d.ts +56 -14
- package/dist/index.js +1 -1
- package/dist/install-Crgjt0uw.js +2 -0
- package/dist/instant-runtime-CTh_DTHR.js +1 -0
- package/dist/react.js +1 -1
- package/dist/reviewer-auth-presentation-CAm-YbaR.js +13 -0
- package/dist/source-origin-BNA5RIlJ.js +1 -0
- package/dist/src-CjYM9---.js +1 -0
- package/package.json +1 -2
- package/dist/active-review-mount-DtVtT0xd.js +0 -1505
- package/dist/embedded-source-DSDHbbeU.js +0 -1
- package/dist/generated-source-context-D59o5CKS.js +0 -1
- package/dist/hosted-runtime-D6Xuc19F.js +0 -13
- package/dist/install-Dh6WT91E.js +0 -2
|
@@ -0,0 +1,1517 @@
|
|
|
1
|
+
const e=`visual-review:v1:`,t=4096;function n(t,n){return`${e}${encodeURIComponent(JSON.stringify({roots:t,target:n}))}`}function r(t){return t.startsWith(e)}function i(e=document){let t=[],n=[e],r=new Set;for(;n.length>0;){let e=n.shift();if(r.has(e))continue;r.add(e),t.push(e);let i=[];try{i=Array.from(e.querySelectorAll(`*`))}catch{continue}for(let e of i){let t=m(e);t&&!r.has(t)&&n.push(t);let i=h(e);i&&!r.has(i)&&n.push(i)}}return t}function a(e,t=document){if(!e)return[];let n=s(e);if(r(e))return n?o(n,t):[];let a=[];for(let n of i(t))try{a.push(...n.querySelectorAll(e))}catch{return[]}return a}function o(e,t){let n=[t];for(let t of e.roots){let e=[];for(let r of n){let n;try{n=r.querySelectorAll(t.selector)}catch{return[]}for(let r of n){let n=t.kind===`shadow`?m(r):h(r);n&&e.push(n)}}if(e.length===0)return[];n=e}let r=[];for(let t of n)try{r.push(...t.querySelectorAll(e.target))}catch{return[]}return r}function s(e){if(!r(e)||e.length>t)return null;try{let t=JSON.parse(decodeURIComponent(e.slice(17)));return!Array.isArray(t.roots)||t.roots.length===0||t.roots.length>16||!c(t.target)||!t.roots.every(e=>e&&(e.kind===`shadow`||e.kind===`frame`)&&c(e.selector))?null:{roots:t.roots,target:t.target}}catch{return null}}function c(e){return typeof e==`string`&&e.length>0&&e.length<=t}function l(e){let t=e.getBoundingClientRect(),n=t.left,r=t.top,i=t.width,a=t.height,o=e.ownerDocument.defaultView;for(;o&&typeof window<`u`&&o!==window;){let e=g(o);if(!e)break;let t=e.getBoundingClientRect(),s=u(e);n=t.left+(e.clientLeft+n)*s.x,r=t.top+(e.clientTop+r)*s.y,i*=s.x,a*=s.y,o=e.ownerDocument.defaultView}return new DOMRect(n,r,i,a)}function u(e){let t=e.getBoundingClientRect();return{x:e.offsetWidth>0?t.width/e.offsetWidth:1,y:e.offsetHeight>0?t.height/e.offsetHeight:1}}function d(e){return e.nodeType===11&&`host`in e}function f(e){return e.nodeType===9}function p(e){let t=e;for(;t;){if(t.closest(`[data-agency-review-root], [data-react-grab-ignore]`))return!0;let e=t.getRootNode();t=d(e)?e.host:null}return!1}function m(e){try{return e.shadowRoot}catch{return null}}function h(e){if(e.tagName.toLowerCase()!==`iframe`)return null;try{return e.contentDocument}catch{return null}}function g(e){try{let t=e.frameElement;return t&&`clientLeft`in t?t:null}catch{return null}}function _(e){return typeof CSS<`u`&&CSS.escape?CSS.escape(e):e.replace(/([^\w-])/g,`\\$1`)}function v(e){let t=S(e),r=y(e,t);if(t===document)return r;let i=[];for(;t!==document;){if(d(t)){let e=t.host,n=S(e);i.unshift({kind:`shadow`,selector:y(e,n)}),t=n;continue}let e=C(t);if(!e)return r;let n=S(e);i.unshift({kind:`frame`,selector:y(e,n)}),t=n}let a=n(i,r);return a.length<=4096?a:r}function y(e,t){let n=[],r=e,i=e.ownerDocument;for(;r&&r!==i.documentElement;){if(r===i.body){n.unshift(`body`);break}let e=x(r,t);if(e){n.unshift(e);break}let a=r.tagName.toLowerCase(),o=r.parentElement,s=o??b(r);if(s){let e=Array.from(s.children).filter(e=>e.tagName===r?.tagName);e.length>1&&(a+=`:nth-of-type(${e.indexOf(r)+1})`)}n.unshift(a),r=o}return n.join(` > `)}function b(e){let t=e.parentNode;return t&&`children`in t?t:null}function x(e,t){return[e.id?`#${_(e.id)}`:null,w(e,`data-review-id`),w(e,`data-testid`),w(e,`data-id`)].find(e=>{if(!e)return!1;try{return t.querySelectorAll(e).length===1}catch{return!1}})??null}function S(e){let t=e.getRootNode();return f(t)||d(t)?t:e.ownerDocument}function C(e){try{return e.defaultView?.frameElement??null}catch{return null}}function w(e,t){let n=e.getAttribute(t);return n?`[${t}="${_(n)}"]`:null}function T(e){if(!E(e))return!1;let t=ee(e);for(;t;){if(!E(t))return!1;t=ee(t)}let n=l(e);return n.width>0&&n.height>0&&e.getClientRects().length>0}function E(e){let t=e.ownerDocument.defaultView,n=t?.HTMLElement;if(n&&e instanceof n&&e.hidden)return!1;let r=t?.getComputedStyle(e);return!r||r.display===`none`||r.visibility===`hidden`||r.visibility===`collapse`?!1:r.opacity!==`0`&&r.contentVisibility!==`hidden`}function ee(e){if(e.assignedSlot)return e.assignedSlot;if(e.parentElement)return e.parentElement;let t=e.getRootNode();if(d(t))return t.host;if(t.nodeType===9&&t!==document)try{return t.defaultView?.frameElement??null}catch{return null}return null}function te(e){if(!e.selector)return[];if(r(e.selector))return a(e.selector).filter(e=>!p(e));try{let t=Array.from(document.querySelectorAll(e.selector)).filter(e=>!p(e));if(t.length>0)return t}catch{return[]}return a(e.selector).filter(e=>!p(e))}function D(e,t,n){let r=l(e),i=Math.max(r.width,1),a=Math.max(r.height,1);return{selector:v(e),offsetX:P((t-(r.left+window.scrollX))/i),offsetY:P((n-(r.top+window.scrollY))/a),viewportX:P((t-window.scrollX)/Math.max(window.innerWidth,1)),viewportY:P((n-window.scrollY)/Math.max(window.innerHeight,1))}}function O(e,t){return{selector:``,offsetX:P(e),offsetY:P(t),viewportX:P(e),viewportY:P(t)}}function k(e,t){let{element:n,confidence:r}=A(e,te(e),t);if(n){let t=l(n);return{x:t.left+window.scrollX+t.width*e.offsetX,y:t.top+window.scrollY+t.height*e.offsetY,anchored:!0,visible:T(n),element:n,confidence:r}}return{x:window.scrollX+window.innerWidth*e.viewportX,y:window.scrollY+window.innerHeight*e.viewportY,anchored:!1,visible:!0,element:null,confidence:r}}function A(e,t,n){if(t.length===0)return{element:null,confidence:`none`};if(!n)return{element:t.find(T)??t[0]??null,confidence:`high`};let r=t.map(e=>({element:e,evidence:ne(e,n)})).sort((e,t)=>t.evidence.score-e.evidence.score),i=r.find(({element:e})=>T(e))??r[0];return i?(t.length===1&&re(e.selector)?j(i.evidence):i.evidence.score>=.65)?{element:i.element,confidence:`high`}:{element:null,confidence:`low`}:{element:null,confidence:`none`}}function ne(e,t){let n=e.tagName.toLowerCase()===t.tagName.toLowerCase(),r=n?.25:0,i=M(t.textPreview),a=M(e.getAttribute(`aria-label`)||(e instanceof HTMLElement?e.innerText:``)||e.textContent||e.getAttribute(`alt`)||e.getAttribute(`title`)||``).slice(0,240),o=!!i&&a===i,s=!!(i&&a)&&(a.includes(i)||i.includes(a));o?r+=.55:s&&(r+=.25);let c=l(e),u=N(c.width,t.rect.width),d=N(c.height,t.rect.height),f=u>=.6&&d>=.6;f&&(r+=.1);let p=Math.max(t.rect.viewportWidth,1),m=Math.max(t.rect.viewportHeight,1),h=t.rect.viewportX+t.rect.width/2,g=t.rect.viewportY+t.rect.height/2,_=Math.hypot((c.left+c.width/2-h)/p,(c.top+c.height/2-g)/m)<=.15;return _&&(r+=.1),{score:r,tagMatches:n,expectedTextPresent:!!i,textMatches:o||s,dimensionsMatch:f,positionMatches:_}}function j(e){return e.expectedTextPresent?e.textMatches:e.tagMatches&&e.dimensionsMatch&&e.positionMatches}function re(e){return/(?:^|[ >])#|%23|data-(?:review-id|testid|id)/iu.test(e)}function M(e){return e.replace(/\s+/gu,` `).trim().toLocaleLowerCase()}function N(e,t){return e<=0||t<=0?0:Math.min(e,t)/Math.max(e,t)}function P(e){return Math.min(1,Math.max(0,Number.isFinite(e)?e:0))}let ie=null,F=null;function ae(e){se(e).catch(()=>void 0)}function oe(){return ie}function se(e){if(ie)return Promise.resolve(ie);if(F)return F;let t=ce(e);return F=t,t.catch(()=>{F===t&&(F=null)}),t}async function ce(e){let t=le(e);try{let e=await import(`./primitives-lxsPH8SN.js`);return ie=e,e}finally{t()}}function le(e){if(!e||typeof document>`u`)return()=>void 0;let t=[];for(let n of i()){if(!f(n)||!n.head||n.querySelector(`script[nonce], style[nonce]`)?.nonce===e)continue;let r=n.createElement(`style`);r.dataset.agencyReviewNonceMarker=``,r.nonce=e,n.head.prepend(r),t.push(r)}return()=>t.forEach(e=>e.remove())}function ue(e){ae(e)}function de(e,t){let n=oe();if(!n)return pe(e,t);try{let r=n.getElementAtPoint(e,t,{filter:e=>n.isElementGrabbable(e)&&!p(e)});return r?me(r,e,t):null}catch{return pe(e,t)}}function I(e){if(e.ownerDocument!==document)return l(e);let t=oe();if(!t)return e.getBoundingClientRect();try{let n=t.getElementBounds(e);return new DOMRect(n.x,n.y,n.width,n.height)}catch{return e.getBoundingClientRect()}}function fe(e){ae(e);let t=oe();if(!t)return()=>void 0;let n=!1;try{if(!t.isFreezeActive()){let r=le(e);try{t.freeze(),n=!0}finally{r()}}}catch{return()=>void 0}let r=!1;return()=>{if(!(r||!n)){r=!0;try{t.unfreeze()}catch{}}}}function pe(e,t){let n=(typeof document.elementsFromPoint==`function`?document.elementsFromPoint(e,t):typeof document.elementFromPoint==`function`?[document.elementFromPoint(e,t)].filter(e=>!!e):[]).find(e=>!p(e))??null;return n?me(n,e,t):null}function me(e,t,n){let r=e,i=t,a=n,o=new Set;for(;!o.has(r);){o.add(r);let e=he(r,i,a);if(e&&e!==r&&!p(e)){r=e;continue}let t=ge(r,i,a);if(!t)break;r=t.element,i=t.clientX,a=t.clientY}return r}function he(e,t,n){try{return e.shadowRoot?.elementFromPoint(t,n)??null}catch{return null}}function ge(e,t,n){if(e.tagName.toLowerCase()!==`iframe`)return null;try{let r=e,i=r.contentDocument;if(!i)return null;let a=e.getBoundingClientRect(),o=u(r),s=(t-a.left)/o.x-r.clientLeft,c=(n-a.top)/o.y-r.clientTop,l=i.elementFromPoint(s,c);return l&&!p(l)?{element:l,clientX:s,clientY:c}:null}catch{return null}}const _e=Symbol(`source-resolution-stopped`);function ve(e,t){let n=I(e),r=D(e,t.clientX+window.scrollX,t.clientY+window.scrollY),i=ze(n);return Ae(r,`element`,i,[Le(e,i)])}function ye(e){let t=de(e.clientX,e.clientY);return t?ve(t,e):Ae(O(e.clientX/Math.max(window.innerWidth,1),e.clientY/Math.max(window.innerHeight,1)),`viewport`,{pageX:e.clientX+window.scrollX,pageY:e.clientY+window.scrollY,width:0,height:0,viewportX:e.clientX,viewportY:e.clientY,viewportWidth:window.innerWidth,viewportHeight:window.innerHeight},[])}function be(e,t){let n=Math.min(e.clientX,t.clientX),r=Math.min(e.clientY,t.clientY),i=Math.abs(t.clientX-e.clientX),a=Math.abs(t.clientY-e.clientY),o=new DOMRect(n,r,i,a),s=we(xe(o),Ce(o)).slice(0,8),c={clientX:n+i/2,clientY:r+a/2},u=s[0];return Ae(u?D(u,c.clientX+window.scrollX,c.clientY+window.scrollY):O(c.clientX/Math.max(window.innerWidth,1),c.clientY/Math.max(window.innerHeight,1)),`region`,ze(o),s.map(e=>Le(e,ze(l(e)))))}function xe(e){let t=a(`*`).filter(t=>t===t.ownerDocument.body||t===t.ownerDocument.documentElement||p(t)||!T(t)?!1:Be(e,l(t))),n=new Set(t),r=new Set;return t.forEach(e=>{let t=Se(e);for(;t;)n.has(t)&&r.add(t),t=Se(t)}),t.filter(e=>!r.has(e))}function Se(e){if(e.assignedSlot)return e.assignedSlot;if(e.parentElement)return e.parentElement;let t=e.getRootNode();if(d(t))return t.host;if(f(t)&&t!==document)try{return t.defaultView?.frameElement??null}catch{return null}return null}function Ce(e){return{clientX:e.left+e.width/2,clientY:e.top+e.height/2}}function we(e,t){let n=e.findIndex(e=>{let n=l(e);return t.clientX>=n.left&&t.clientX<=n.right&&t.clientY>=n.top&&t.clientY<=n.bottom});return n<=0?e:[e[n],...e.slice(0,n),...e.slice(n+1)]}async function Te(e,t,n={}){if(n.signal?.aborted)return De(e,t);let r=Ee(n),i=e.elements.map(async e=>{let n=Ve(e);if(!n)return{context:e,provenance:void 0};let i=await t.resolve(n,{signal:r.signal});return{context:{...e,source:i.source,componentStack:i.componentStack},provenance:i.provenance}});try{let n=await Promise.allSettled(i.map(e=>Promise.race([e,r.stopped]))),a=n.map((t,n)=>t.status===`fulfilled`&&t.value!==_e?t.value.context:e.elements[n]),o=ke(n.flatMap(e=>e.status===`fulfilled`&&e.value!==_e&&e.value.provenance?[{located:e.value.context.source!==null,provenance:e.value.provenance}]:[]))??e.sourceProvenance??Oe(t);return{...e,elements:a,...o?{sourceProvenance:o}:{}}}finally{r.dispose()}}function Ee(e){let t=new AbortController,n=e.signal,r=()=>t.abort(n?.reason);n?.aborted?r():n?.addEventListener(`abort`,r,{once:!0});let i=e.deadlineMs??400,a=setTimeout(()=>t.abort(`source-resolution-deadline`),Number.isFinite(i)?Math.max(0,i):400),o=new Promise(e=>{if(t.signal.aborted){e(_e);return}t.signal.addEventListener(`abort`,()=>e(_e),{once:!0})});return{signal:t.signal,stopped:o,dispose(){clearTimeout(a),n?.removeEventListener(`abort`,r)}}}function De(e,t){let n=e.sourceProvenance??Oe(t);return{...e,...n?{sourceProvenance:n}:{}}}function Oe(e){try{return e.unavailableProvenance?.()}catch{return}}function ke(e){return(e.find(e=>e.located)??e[0])?.provenance}function Ae(e,t,n,r){return{kind:t,anchor:e,region:n,elements:r,pageUrl:`${window.location.origin}${window.location.pathname}`,pageTitle:document.title,capturedAt:Date.now(),environment:je()}}function je(){let e=navigator.userAgent,t=Math.max(1,window.innerWidth),n=navigator.maxTouchPoints,r=Ie(window.screen?.width,t),i=Ie(window.screen?.height,Math.max(1,window.innerHeight));return{browser:Me(e),operatingSystem:Ne(e,navigator.platform,n),deviceType:Pe(e,navigator.platform,t,n),screenWidth:r,screenHeight:i,devicePixelRatio:Ie(window.devicePixelRatio,1)}}function Me(e){let t=(e.match(/(?:Edg|Edge)\/([\d.]+)/)??e.match(/OPR\/([\d.]+)/)??e.match(/(?:Chrome|CriOS)\/([\d.]+)/)??e.match(/(?:Firefox|FxiOS)\/([\d.]+)/)??e.match(/Version\/([\d.]+).*Safari\//))?.[1]?.split(`.`)[0],n=/(?:Edg|Edge)\//.test(e)?`Edge`:/OPR\//.test(e)?`Opera`:/(?:Chrome|CriOS)\//.test(e)?`Chrome`:/(?:Firefox|FxiOS)\//.test(e)?`Firefox`:/Safari\//.test(e)?`Safari`:`알 수 없는 브라우저`;return t?`${n} ${t}`:n}function Ne(e,t,n){return Fe(e,t,n)?`iPadOS`:/iPhone|iPod/.test(e)?`iOS`:/Android/.test(e)?`Android`:/CrOS/.test(e)?`ChromeOS`:/Windows/.test(e)?`Windows`:/Mac OS X|Macintosh/.test(e)||/Mac/.test(t)?`macOS`:/Linux/.test(e)||/Linux/.test(t)?`Linux`:`알 수 없는 OS`}function Pe(e,t,n,r){return Fe(e,t,r)?`tablet`:/Mobi|iPhone|iPod|Android.*Mobile/.test(e)?`mobile`:/iPad|Tablet|Android/.test(e)||r>1&&n<=1024?`tablet`:`desktop`}function Fe(e,t,n){return/iPad/.test(e)||t===`MacIntel`&&n>1}function Ie(e,t){return typeof e==`number`&&Number.isFinite(e)&&e>0?e:t}function Le(e,t){return{selector:v(e),tagName:e.tagName.toLowerCase(),textPreview:Re(e),rect:t,source:null,componentStack:[]}}function Re(e){let t=(e instanceof HTMLElement?e.innerText:null)||e.textContent;return([e.getAttribute(`aria-label`),t,e.getAttribute(`alt`),e.getAttribute(`title`)].map(e=>(e??``).replace(/\s+/g,` `).trim()).find(Boolean)??``).slice(0,240)}function ze(e){return{pageX:e.left+window.scrollX,pageY:e.top+window.scrollY,width:e.width,height:e.height,viewportX:e.left,viewportY:e.top,viewportWidth:window.innerWidth,viewportHeight:window.innerHeight}}function Be(e,t){return e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top}function Ve(e){let{selector:t}=e;return t?k({selector:t,offsetX:0,offsetY:0,viewportX:0,viewportY:0},e).element:null}function He(e){let t,n=!1,r={pageId:e.pageId,peers:[]},i,a=!1,o=-1/0,s,c=!1,l=``,u=``,d,f=e.cursors||e.chat,p={x:Math.max(24,window.innerWidth-180),y:Math.max(24,window.innerHeight-96)},m=L(`rg-collaboration-cursors`);m.setAttribute(`aria-hidden`,`true`);let h=new Map,g=L(`rg-cursor-chat-announcements`);g.setAttribute(`role`,`log`),g.setAttribute(`aria-live`,`polite`),g.setAttribute(`aria-relevant`,`additions`);let _=new Map,v=L(`rg-collaboration-participants`);v.setAttribute(`role`,`status`);let y=L(`rg-cursor-chat-composer`);y.hidden=!0,y.setAttribute(`role`,`dialog`),y.setAttribute(`aria-label`,`커서 채팅`),y.style.setProperty(`--rg-local-color`,Je(e.session.reviewerId));let b=L(`rg-cursor-chat-header`),x=document.createElement(`strong`);x.textContent=e.session.displayName;let S=document.createElement(`span`);S.textContent=`Enter 전송 · 바깥 클릭 닫기`,b.append(x,S);let C=L(`rg-cursor-chat-preview`);C.hidden=!0;let w=document.createElement(`input`);w.className=`rg-cursor-chat-input`,w.type=`text`,w.maxLength=280,w.placeholder=`메시지 입력…`,w.setAttribute(`aria-label`,`커서 채팅 메시지`),y.append(b,C,w);let T=document.createElement(`button`);T.className=`rg-cursor-chat-mobile-trigger`,T.type=`button`,T.setAttribute(`aria-label`,`커서 채팅 시작`),T.title=`커서 채팅`,T.textContent=`채팅`;let E=()=>{We(v,r.peers,e.session.displayName),f&&ee(),e.chat&&Ue(g,_,r.peers)},ee=()=>{s!==void 0||n||(s=window.requestAnimationFrame(()=>{s=void 0,Ge(m,h,r.peers)}))},te=()=>(l.trim()||u).slice(0,280),D=()=>{C.textContent=u,C.hidden=!u,y.dataset.hasMessage=String(!!u);let e=Math.min(260,Math.max(180,window.innerWidth-24)),t=p.x>window.innerWidth/2,n=p.y>window.innerHeight/2,r=R(t?p.x-e-14:p.x+14,12,Math.max(12,window.innerWidth-e-12)),i=u?118:84,a=R(n?p.y-i-14:p.y+18,12,Math.max(12,window.innerHeight-i-12));y.dataset.horizontal=t?`left`:`right`,y.dataset.vertical=n?`above`:`below`,y.style.left=`${r}px`,y.style.top=`${a}px`},O=()=>{d!==void 0&&window.clearTimeout(d),d=window.setTimeout(()=>{d=void 0,!l.trim()&&(u=``,D(),j())},5e3)},k=e=>{c=e,y.hidden=!e,e?(D(),j(),queueMicrotask(()=>w.focus())):(d!==void 0&&(window.clearTimeout(d),d=void 0),l=``,u=``,w.value=``,j(),w.blur())};w.addEventListener(`input`,()=>{l=w.value,l.trim()&&(u=``),D(),M()}),w.addEventListener(`keydown`,e=>{if(e.key===`Escape`){e.preventDefault(),k(!1);return}if(e.key!==`Enter`||e.isComposing)return;e.preventDefault();let t=l.trim();t&&(u=t,l=``,w.value=``,D(),j(),O(),w.focus())});let A=t=>{!f||n||e.repository.publishPresence(e.pageId,e.roomId,{...t,cursorChat:te()})},ne=()=>{a=!1,i!==void 0&&(window.clearTimeout(i),i=void 0)},j=()=>{ne(),o=Date.now(),A(N())},re=()=>{i=void 0,a&&(a=!1,o=Date.now(),A(N()))},M=()=>{if(!f||n||(a=!0,i!==void 0))return;let e=Date.now()-o,t=Math.max(0,50-e);if(t===0){re();return}i=window.setTimeout(re,t)},N=()=>({reviewerId:e.session.reviewerId,displayName:e.session.displayName,color:Je(e.session.reviewerId),active:!0,pathname:e.pathname,cursorX:p.x,cursorY:p.y,viewportWidth:window.innerWidth,viewportHeight:window.innerHeight}),P=()=>({reviewerId:e.session.reviewerId,displayName:e.session.displayName,color:Je(e.session.reviewerId),active:!1,pathname:e.pathname}),ie=t=>{t.pointerType===`touch`||t.composedPath().includes(e.root.host)||(p.x=t.clientX,p.y=t.clientY,c&&D(),M())},F=()=>{document.visibilityState!==`visible`&&(c&&k(!1),ne(),A(P()))},ae=()=>{ne(),A(P())},oe=()=>{p.x=R(p.x,0,window.innerWidth),p.y=R(p.y,0,window.innerHeight),c&&D(),ee()},se=e=>{!c||e.composedPath().includes(y)||k(!1)},ce=()=>{c&&queueMicrotask(()=>{!c||y.contains(e.root.activeElement)||k(!1)})},le=t=>{t.key!==`/`||t.defaultPrevented||t.repeat||t.isComposing||t.metaKey||t.ctrlKey||t.altKey||c||Ye(t)||e.canOpenChat?.()===!1||(t.preventDefault(),k(!0))},ue=e=>{e instanceof KeyboardEvent&&le(e)};return{start(){if(n)return;let i=e.root.querySelector(`.rg-toolbar-actions`);f&&i?.append(v),e.chat&&(i?.append(T),e.root.append(y,g),T.addEventListener(`click`,()=>k(!0)),e.root.addEventListener(`keydown`,ue,!0),document.addEventListener(`keydown`,le),document.addEventListener(`pointerdown`,se,!0),y.addEventListener(`focusout`,ce)),f&&(e.root.prepend(m),document.addEventListener(`pointermove`,ie,{passive:!0}),document.addEventListener(`pointerleave`,ae),document.addEventListener(`visibilitychange`,F),window.addEventListener(`resize`,oe,{passive:!0})),t=e.repository.subscribe(e.pageId,{roomId:e.roomId,cursors:f,chat:!1},e=>{r=e,E()},e.onFailure),A(P()),E()},stop(){n||(n=!0,ne(),s!==void 0&&window.cancelAnimationFrame(s),d!==void 0&&window.clearTimeout(d),document.removeEventListener(`pointermove`,ie),document.removeEventListener(`pointerleave`,ae),document.removeEventListener(`visibilitychange`,F),window.removeEventListener(`resize`,oe),e.root.removeEventListener(`keydown`,ue,!0),document.removeEventListener(`keydown`,le),document.removeEventListener(`pointerdown`,se,!0),y.removeEventListener(`focusout`,ce),t?.(),m.remove(),v.remove(),T.remove(),y.remove(),g.remove())}}}function Ue(e,t,n){let r=new Set(n.map(({peerId:e})=>e));for(let e of t.keys())r.has(e)||t.delete(e);for(let r of n){let n=r.cursorChat?.trim()??``,i=t.get(r.peerId)??``;if(!n||n===i){t.set(r.peerId,n);continue}t.set(r.peerId,n);let a=L(`rg-cursor-chat-announcement`);for(a.textContent=`${r.displayName}, ${r.pathname||`/`}: ${n}`,e.append(a);e.childElementCount>20;)e.firstElementChild?.remove()}}function We(e,t,n){let r=[n,...t.map(({displayName:e})=>e)],i=r.length<2,a=i?``:`${r.length}명`,o=r.join(`, `);e.hidden!==i&&(e.hidden=i),e.textContent!==a&&(e.textContent=a),e.title!==o&&(e.title=o)}function Ge(e,t,n){let r=new Set;for(let i of n){if(!i.active||i.cursorX===void 0||i.cursorY===void 0||!i.viewportWidth||!i.viewportHeight)continue;r.add(i.reviewerId);let n=t.get(i.reviewerId);if(!n){let r=L(`rg-collaboration-cursor`);r.dataset.reviewerId=i.reviewerId;let a=L(`rg-collaboration-cursor-pointer`),o=L(`rg-collaboration-cursor-label`);r.append(a,o),e.append(r),n={element:r,label:o},t.set(i.reviewerId,n)}let{element:a}=n;Ke(a,`--rg-peer-color`,i.color);let o=i.cursorX/i.viewportWidth*window.innerWidth,s=i.cursorY/i.viewportHeight*window.innerHeight;if(Ke(a,`--rg-peer-x`,`${R(o,0,window.innerWidth)}px`),Ke(a,`--rg-peer-y`,`${R(s,0,window.innerHeight)}px`),qe(a,`horizontal`,o>window.innerWidth/2?`left`:`right`),qe(a,`vertical`,s>window.innerHeight/2?`above`:`below`),n.label.textContent!==i.displayName&&(n.label.textContent=i.displayName),i.cursorChat){n.chat||(n.chat=L(`rg-collaboration-cursor-chat`),n.page=L(`rg-collaboration-cursor-chat-page`),n.body=L(`rg-collaboration-cursor-chat-body`),n.chat.append(n.page,n.body),a.append(n.chat));let e=i.pathname||`/`;n.page.textContent!==e&&(n.page.textContent=e),n.body.textContent!==i.cursorChat&&(n.body.textContent=i.cursorChat)}else n.chat&&(n.chat.remove(),n.chat=void 0,n.page=void 0,n.body=void 0)}for(let[e,n]of t)r.has(e)||(n.element.remove(),t.delete(e))}function Ke(e,t,n){e.style.getPropertyValue(t)!==n&&e.style.setProperty(t,n)}function qe(e,t,n){e.dataset[t]!==n&&(e.dataset[t]=n)}function Je(e){let t=[`#7c3aed`,`#2563eb`,`#0891b2`,`#059669`,`#ca8a04`,`#ea580c`,`#dc2626`],n=0;for(let t of e)n=(n<<5)-n+t.charCodeAt(0)|0;return t[Math.abs(n)%t.length]}function Ye(e){let t=e.composedPath()[0];return t instanceof Element&&t.closest(`input, textarea, select, [contenteditable]:not([contenteditable="false"]), [role="textbox"]`)!==null}function L(e){let t=document.createElement(`div`);return t.className=e,t}function R(e,t,n){return Math.min(n,Math.max(t,e))}function Xe(e={}){let t=document.createElement(`div`);t.className=`rg-toolbar`,t.setAttribute(`role`,`toolbar`),t.setAttribute(`aria-label`,`Visual Review`);let n=V(`rg-toolbar-actions-shell`),r=V(`rg-toolbar-actions`);e.developerGrab&&r.append(Ze());let i=V(`rg-action-wrap`),a=at(`rg-action rg-feedback-tool`,`피드백 위치 선택`);e.developerGrab||(a.setAttribute(`aria-keyshortcuts`,`Meta+C Control+C`),a.setAttribute(`aria-description`,`Command 또는 Control C를 길게 누릅니다.`)),a.setAttribute(`aria-pressed`,`false`),a.append(tt());let o=document.createElement(`span`);o.className=`rg-tooltip`,o.setAttribute(`aria-hidden`,`true`),o.textContent=e.developerGrab?`피드백`:`피드백 · ⌘/Ctrl+C 길게`,i.append(a,o),r.append(i),n.append(r);let s=at(`rg-collapse`,`Visual Review 접기`);if(s.setAttribute(`aria-expanded`,`true`),s.append(rt()),t.append(n,s),e.developerGrab){let e=V(`rg-developer-status`);e.dataset.visible=`false`,e.dataset.tone=`neutral`,e.setAttribute(`aria-hidden`,`true`),t.append(e)}return t}function Ze(){let e=V(`rg-action-wrap`),t=at(`rg-action rg-developer-grab-tool`,`React Grab 코드 선택`);t.setAttribute(`aria-keyshortcuts`,`Meta+C Control+C`),t.setAttribute(`aria-description`,`Command 또는 Control C를 길게 누릅니다.`),t.setAttribute(`aria-pressed`,`false`),t.append(nt());let n=document.createElement(`span`);return n.className=`rg-tooltip`,n.setAttribute(`aria-hidden`,`true`),n.textContent=`코드 선택 · ⌘/Ctrl+C 길게`,e.append(t,n),e}function Qe(e,t,n=t){let r=document.createElement(`div`);r.className=`rg-selection-label`,r.setAttribute(`role`,`dialog`),r.setAttribute(`aria-label`,`새 피드백 작성`),r.style.opacity=`0`,r.style.left=`-1000px`,r.style.top=`-1000px`;let i=z(`0 0 16 8`,[B(`M0 8 L7.293 0.707 A1 1 0 0 1 8.707 0.707 L16 8 Z`)]);i.classList.add(`rg-label-arrow`);let a=V(`rg-surface`),o=V(`rg-tag-row`),s=document.createElement(`span`);s.className=`rg-tag`,s.textContent=e,o.append(s);let c=V(`rg-bottom-section`),l=document.createElement(`textarea`);l.setAttribute(`aria-keyshortcuts`,`Meta+Enter Control+Enter Escape`),l.maxLength=4e3,l.rows=1,l.placeholder=t,l.setAttribute(`aria-label`,n);let u=at(`rg-submit`,`피드백 저장`);return u.title=`저장 (⌘/Ctrl+Enter)`,u.append(it()),c.append(l,u),a.append(o,c),r.append(i,a),r}function $e(){return z(`0 0 12 12`,[B(`M2.47 1.76a.5.5 0 0 0-.71.71L5.29 6 1.76 9.53a.5.5 0 0 0 .71.71L6 6.71l3.53 3.53a.5.5 0 0 0 .71-.71L6.71 6l3.53-3.53a.5.5 0 0 0-.71-.71L6 5.29 2.47 1.76Z`)])}function et(e,t){queueMicrotask(()=>{let n=e.getBoundingClientRect();if(n.width<=0||n.height<=0)return;let r=window.visualViewport,i=r?.offsetLeft??0,a=r?.offsetTop??0,o=r?.width??window.innerWidth,s=r?.height??window.innerHeight,c=t.anchorX??t.x+t.width/2,l=ot(c,i+8+n.width/2,i+o-8-n.width/2),u=a+s-(t.y+t.height)>=n.height+12+8,d=u?t.y+t.height+12:Math.max(a+8,t.y-12-n.height);e.dataset.side=u?`below`:`above`,e.style.left=`${l}px`,e.style.top=`${d}px`,e.style.opacity=`1`;let f=ot(c-(l-n.width/2),16,n.width-16);e.style.setProperty(`--rg-arrow-left`,`${f}px`)})}function tt(){return z(`0 0 12 12`,[B(`M1 6C1 3.239 3.239 1 6 1C8.761 1 11 3.239 11 6C11 8.761 8.761 11 6 11C5.103 11 4.261 10.764 3.532 10.35C2.959 10.759 2.257 11 1.5 11C1.376 11 1.253 10.993 1.132 10.981C0.923 10.959 0.75 10.809 0.699 10.605C0.648 10.402 0.729 10.188 0.903 10.07C1.347 9.768 1.688 9.328 1.865 8.812C1.319 8.011 1 7.042 1 6Z`,{"fill-rule":`evenodd`,"clip-rule":`evenodd`})])}function nt(){return z(`0 0 12 12`,[B(`M4.25 2 1.5 6l2.75 4M7.75 2l2.75 4-2.75 4`,{fill:`none`,stroke:`currentColor`,"stroke-width":`1.25`,"stroke-linecap":`round`,"stroke-linejoin":`round`})])}function rt(){return z(`0 0 24 24`,[B(`M9.29289 16.7071C8.90237 16.3166 8.90237 15.6834 9.29289 15.2929L12.5858 12L9.29289 8.70711C8.90237 8.31658 8.90237 7.68342 9.29289 7.29289C9.68342 6.90237 10.3166 6.90237 10.7071 7.29289L14.7071 11.2929C14.8946 11.4804 15 11.7348 15 12C15 12.2652 14.8946 12.5196 14.7071 12.7071L10.7071 16.7071C10.3166 17.0976 9.68342 17.0976 9.29289 16.7071Z`,{"fill-rule":`evenodd`,"clip-rule":`evenodd`})])}function it(){return z(`0 0 24 24`,[B(`M19.2929 12.7071C19.6834 13.0976 20.3166 13.0976 20.7071 12.7071C21.0976 12.3166 21.0976 11.6834 20.7071 11.2929L12.7071 3.29289C12.5196 3.10536 12.2652 3 12 3C11.7348 3 11.4804 3.10536 11.2929 3.29289L3.29289 11.2929C2.90237 11.6834 2.90237 12.3166 3.29289 12.7071C3.68342 13.0976 4.31658 13.0976 4.70711 12.7071L11 6.41421L11 20C11 20.5523 11.4477 21 12 21C12.5523 21 13 20.5523 13 20L13 6.41422L19.2929 12.7071Z`,{"fill-rule":`evenodd`,"clip-rule":`evenodd`})])}function z(e,t){let n=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`);return n.setAttribute(`viewBox`,e),n.setAttribute(`aria-hidden`,`true`),n.setAttribute(`focusable`,`false`),n.append(...t),n}function B(e,t={}){let n=document.createElementNS(`http://www.w3.org/2000/svg`,`path`);n.setAttribute(`d`,e);for(let[e,r]of Object.entries(t))n.setAttribute(e,r);return n}function V(e){let t=document.createElement(`div`);return t.className=e,t}function at(e,t){let n=document.createElement(`button`);return n.type=`button`,n.className=e,n.setAttribute(`aria-label`,t),n}function ot(e,t,n){return Math.min(n,Math.max(t,e))}const st={width:106,height:30};function ct(e,t){return`agency-review:toolbar:v1:${encodeURIComponent(e)}:${encodeURIComponent(t)}`}function lt(e){switch(e){case`top-left`:return{edge:`top`,ratio:0};case`top`:return{edge:`top`,ratio:.5};case`top-right`:return{edge:`top`,ratio:1};case`right`:return{edge:`right`,ratio:.5};case`bottom`:return{edge:`bottom`,ratio:.5};case`bottom-left`:return{edge:`bottom`,ratio:0};case`left`:return{edge:`left`,ratio:.5};default:return{edge:`bottom`,ratio:1}}}function ut(e,t,n,r,i,a=16){let o=i.offsetLeft+a,s=Math.max(o,i.offsetLeft+i.width-n-a),c=i.offsetTop+a,l=Math.max(c,i.offsetTop+i.height-r-a),u=W(t,0,1);return e===`top`||e===`bottom`?{x:o+(s-o)*u,y:e===`top`?c:l}:{x:e===`left`?o:s,y:c+(l-c)*u}}function dt(e,t,n,r,i){if(e===`top`||e===`bottom`){let e=i.width-n-32;return e<=0?.5:W((t.x-i.offsetLeft-16)/e,0,1)}let a=i.height-r-32;return a<=0?.5:W((t.y-i.offsetTop-16)/a,0,1)}function ft(e,t,n,r,i){let a=e.x+r.x*150,o=e.y+r.y*150,s={top:o-i.offsetTop+n/2,bottom:i.offsetTop+i.height-o-n/2,left:a-i.offsetLeft+t/2,right:i.offsetLeft+i.width-a-t/2},c=Object.entries(s).reduce((e,t)=>t[1]<e[1]?t:e)[0],l=i.offsetLeft+16,u=Math.max(l,i.offsetLeft+i.width-t-16),d=i.offsetTop+16,f=Math.max(d,i.offsetTop+i.height-n-16);return{edge:c,x:c===`left`?l:c===`right`?u:W(a,l,u),y:c===`top`?d:c===`bottom`?f:W(o,d,f)}}function pt(e,t,n,r,i){if(e===`top`||e===`bottom`){let a=t.x+(n.width-r.width)/2,o=i.offsetLeft;return{x:W(a,o,Math.max(o,i.offsetLeft+i.width-r.width)),y:e===`top`?i.offsetTop:i.offsetTop+i.height-r.height}}let a=t.y+(n.height-r.height)/2,o=i.offsetTop,s=Math.max(o,i.offsetTop+i.height-r.height);return{x:e===`left`?i.offsetLeft:i.offsetLeft+i.width-r.width,y:W(a,o,s)}}function mt(e,t,n,r,i){if(e===`top`||e===`bottom`){let a=t.x-(n.width-r.width)/2,o=i.offsetLeft+16;return{x:W(a,o,Math.max(o,i.offsetLeft+i.width-n.width-16)),y:e===`top`?i.offsetTop+16:i.offsetTop+i.height-n.height-16}}let a=t.y-(n.height-r.height)/2,o=i.offsetTop+16,s=Math.max(o,i.offsetTop+i.height-n.height-16);return{x:e===`left`?i.offsetLeft+16:i.offsetLeft+i.width-n.width-16,y:W(a,o,s)}}function ht(e,t){let n=e.dataset.collapsed!==String(t),r=n?e.getBoundingClientRect():null,i=e.dataset.collapseAnimating===`true`;e.style.setProperty(`--rg-collapse-duration`,`${t?140:220}ms`),e.dataset.collapsed=String(t);let a=e.querySelector(`.rg-toolbar-actions-shell`);a&&(a.inert=t,a.setAttribute(`aria-hidden`,String(t)));let o=e.querySelector(`.rg-collapse`);o?.setAttribute(`aria-expanded`,String(!t)),o?.setAttribute(`aria-label`,t?`Visual Review 펼치기`:`Visual Review 접기`),n&&e.dispatchEvent(new CustomEvent(`review-dock-collapse`,{detail:{collapsed:t,previousRect:r,wasAnimating:i}}))}function gt(e){let{toolbar:t,offset:n,storageKey:r,signal:i}=e,a=lt(e.position),o=xt(r),s=o?.edge??a.edge,c=o?.ratio??a.ratio,l=o!==null,u=!1,d=!1,f=!1,p={x:0,y:0},m={x:0,y:0},h={x:0,y:0},g={x:0,y:0,time:0},_=!1,v=null,y=null,b=null,x=null,S=!1;t.dataset.dockManaged=`true`,t.dataset.dockEdge=s,l&&(t.dataset.position=s),ht(t,o?.collapsed??!1);let C=t.getBoundingClientRect(),w=t.dataset.collapsed===`false`&&U(C)?H(C):bt(t,s),T=t.dataset.collapsed===`true`&&U(C)?H(C):yt(s),E=e=>{let t=ut(s,c,w.width,w.height,e);return{x:t.x+(l?0:n.x),y:t.y+(l?0:n.y)}},ee=()=>{let e=t.getBoundingClientRect();U(e)&&(t.dataset.collapsed===`true`?T=H(e):w=H(e));let n=_t(),r=E(n),i=t.dataset.collapsed===`true`;vt(t,i?pt(s,r,w,T,n):r)},te=()=>{_||(_=!0,queueMicrotask(()=>{_=!1,S||ee()}))},D=()=>{St(r,{version:1,edge:s,ratio:c,collapsed:t.dataset.collapsed===`true`})},O=()=>{x?.abort(),x=null},k=n=>{if(!d){if(Math.hypot(n.clientX-m.x,n.clientY-m.y)<=5)return;d=!0,t.dataset.dragging=`true`,e.onDragStart?.()}n.preventDefault();let r=performance.now(),i=r-g.time;i>0&&(h={x:(n.clientX-g.x)/i,y:(n.clientY-g.y)/i}),g={x:n.clientX,y:n.clientY,time:r},vt(t,{x:n.clientX-p.x,y:n.clientY-p.y})},A=()=>{if(O(),u=!1,delete t.dataset.dragging,!d)return;f=!0;let e=t.getBoundingClientRect(),n=_t(),r=ft({x:e.left,y:e.top},e.width,e.height,h,n);s=r.edge,c=dt(s,r,e.width,e.height,n),l=!0,t.dataset.dockEdge=s,t.dataset.position=s,t.dataset.snapping=`true`,v!==null&&window.cancelAnimationFrame(v),v=window.requestAnimationFrame(()=>{v=window.requestAnimationFrame(()=>{v=null;let e=t.getBoundingClientRect();U(e)&&(w=H(e)),ee(),D(),y!==null&&window.clearTimeout(y),y=window.setTimeout(()=>{y=null,delete t.dataset.snapping},300)})})},ne=e=>{if(e.button!==0||t.dataset.collapsed===`true`||u)return;let n=t.getBoundingClientRect();u=!0,d=!1,h={x:0,y:0},m={x:e.clientX,y:e.clientY},p={x:e.clientX-n.left,y:e.clientY-n.top},g={x:e.clientX,y:e.clientY,time:performance.now()},O(),x=new AbortController;let r=x.signal;window.addEventListener(`pointermove`,k,{capture:!0,signal:r}),window.addEventListener(`pointerup`,A,{capture:!0,signal:r}),window.addEventListener(`pointercancel`,A,{capture:!0,signal:r})},j=e=>{f&&(f=!1,e.preventDefault(),e.stopImmediatePropagation())},re=e=>{let n=e.detail,r=n?.collapsed??t.dataset.collapsed===`true`,i=n?.previousRect,a=!n?.wasAnimating,o=_t();if(a&&i&&U(i)&&(r?w=H(i):T=H(i)),t.dataset.collapseAnimating=`true`,r){let e=a&&i&&U(i)?{x:i.left,y:i.top}:E(o);vt(t,pt(s,e,w,T,o))}else{let e=a&&i&&U(i)?{x:i.left,y:i.top}:pt(s,E(o),w,T,o);vt(t,mt(s,e,w,T,o))}D(),b!==null&&window.clearTimeout(b),b=window.setTimeout(()=>{b=null,delete t.dataset.collapseAnimating;let e=t.getBoundingClientRect();U(e)&&(r?T=H(e):w=H(e))},r?140:220)},M=()=>te();t.addEventListener(`pointerdown`,ne,{signal:i}),t.addEventListener(`click`,j,{capture:!0,signal:i}),t.addEventListener(`review-dock-collapse`,re,{signal:i}),window.addEventListener(`resize`,M,{passive:!0,signal:i}),window.visualViewport?.addEventListener(`resize`,M,{passive:!0,signal:i}),window.visualViewport?.addEventListener(`scroll`,M,{passive:!0,signal:i}),te();let N=()=>{S=!0,O(),v!==null&&window.cancelAnimationFrame(v),y!==null&&window.clearTimeout(y),b!==null&&window.clearTimeout(b),v=null,y=null,b=null};return i.addEventListener(`abort`,N,{once:!0}),N}function _t(){let e=window.visualViewport;return{offsetLeft:e?.offsetLeft??0,offsetTop:e?.offsetTop??0,width:e?.width??window.innerWidth,height:e?.height??window.innerHeight}}function vt(e,t){e.style.top=`${t.y}px`,e.style.right=`auto`,e.style.bottom=`auto`,e.style.left=`${t.x}px`,e.style.translate=`none`}function yt(e){return e===`top`||e===`bottom`?{width:32,height:28}:{width:28,height:32}}function H(e){return{width:e.width,height:e.height}}function U(e){return e.width>0&&e.height>0}function bt(e,t){let n=e.parentElement,r=t===`left`||t===`right`?{width:st.height,height:st.width}:st;if(!n)return r;let i=e.cloneNode(!0);i.dataset.collapsed=`false`,i.dataset.dockEdge=t,delete i.dataset.collapseAnimating,delete i.dataset.snapping,i.style.setProperty(`visibility`,`hidden`),i.style.setProperty(`pointer-events`,`none`),i.style.setProperty(`transition`,`none`,`important`),i.style.setProperty(`top`,`-10000px`),i.style.setProperty(`right`,`auto`),i.style.setProperty(`bottom`,`auto`),i.style.setProperty(`left`,`-10000px`),i.style.setProperty(`translate`,`none`);for(let e of i.querySelectorAll(`*`))e.style.setProperty(`transition`,`none`,`important`);n.append(i);let a=i.getBoundingClientRect();return i.remove(),U(a)?H(a):r}function xt(e){try{let t=window.localStorage.getItem(e);if(!t)return null;let n=JSON.parse(t);return n.version!==1||!Ct(n.edge)||typeof n.ratio!=`number`||!Number.isFinite(n.ratio)||typeof n.collapsed!=`boolean`?null:{version:1,edge:n.edge,ratio:W(n.ratio,0,1),collapsed:n.collapsed}}catch{return null}}function St(e,t){try{window.localStorage.setItem(e,JSON.stringify(t))}catch{}}function Ct(e){return e===`top`||e===`right`||e===`bottom`||e===`left`}function W(e,t,n){return Math.min(n,Math.max(t,e))}async function wt(e){let t=window.__REACT_GRAB__;if(Et(t))return Tt(t);let n=await se(e);return{async copyElement(e){let t=Array.isArray(e)?e:[e],r=(await Promise.allSettled(t.map(e=>n.getElementContext(e)))).flatMap(e=>e.status===`fulfilled`&&e.value.snippet.trim().length>0?[e.value.snippet.trim()]:[]);return r.length!==0&&n.copyContent(r.join(`
|
|
2
|
+
|
|
3
|
+
`))},dispose(){}}}function Tt(e){return{copyElement:t=>e.copyElement(t),dispose(){}}}function Et(e){return typeof e==`object`&&!!e&&`copyElement`in e&&typeof e.copyElement==`function`}function Dt(e,t=`all`){let n=[...e.comments].sort(kt),r=new Map;for(let e of n){if(!Ot(e.pageNumber))continue;let t=r.get(e.pageId);t||(t=new Set,r.set(e.pageId,t)),t.add(e.pageNumber)}let i=new Map,a=new Map;for(let e of n){let t=i.get(e.pageId);t||(t=new Set,i.set(e.pageId,t));let n=Ot(e.pageNumber)&&!t.has(e.pageNumber)?e.pageNumber:void 0,o=n??1,s=r.get(e.pageId);for(;t.has(o)||n===void 0&&s?.has(o);)o+=1;t.add(o),a.set(e.id,o)}let o=new Map;for(let t of e.replies){if(!a.has(t.commentId))continue;let e=o.get(t.commentId);e?(e.replyCount+=1,e.lastReplyAt=Math.max(e.lastReplyAt,t.updatedAt)):o.set(t.commentId,{replyCount:1,lastReplyAt:t.updatedAt})}let s=n.map(e=>{let t=o.get(e.id);return{comment:e,pinNumber:a.get(e.id),replyCount:t?.replyCount??0,lastActivityAt:Math.max(e.updatedAt,t?.lastReplyAt??e.updatedAt)}}),c={all:s.length,open:s.filter(({comment:e})=>e.status===`open`).length,resolved:s.filter(({comment:e})=>e.status===`resolved`).length};return{rows:s.filter(({comment:e})=>t===`all`||e.status===t).sort(At),counts:c,pinNumberByCommentId:a}}function Ot(e){return Number.isSafeInteger(e)&&(e??0)>=1}function kt(e,t){return e.createdAt-t.createdAt||e.id.localeCompare(t.id)}function At(e,t){return t.lastActivityAt-e.lastActivityAt||t.comment.createdAt-e.comment.createdAt||e.comment.id.localeCompare(t.comment.id)}const jt=`visual-review-feedback-navigator`,Mt=[`current`,`all`],Nt={current:`현재 페이지`,all:`전체 페이지`},Pt=[`all`,`open`,`resolved`],Ft={all:`전체`,open:`진행 중`,resolved:`완료`};function It(e,t={}){let n=t.controlsId??jt,r=K(`rg-action-wrap`),i=document.createElement(`button`);i.type=`button`,i.className=`rg-action rg-feedback-list-tool`,i.dataset.feedbackNavigatorAction=`toggle`,i.setAttribute(`aria-controls`,n),i.setAttribute(`aria-expanded`,String(t.expanded??!1)),t.presentation===`sheet`&&i.setAttribute(`aria-haspopup`,`dialog`),i.setAttribute(`aria-label`,`피드백 목록, 총 ${q(e)}개`),i.append(Gt(),Wt(e));let a=document.createElement(`span`);return a.className=`rg-tooltip`,a.setAttribute(`aria-hidden`,`true`),a.textContent=`피드백 ${q(e)}개`,r.append(i,a),r}function Lt(e,t={}){let n=t.id??jt,r=`${n}-title`,i=t.presentation??`tray`,a=document.createElement(`section`);a.id=n,a.className=`rg-feedback-navigator`,a.dataset.presentation=i,a.dataset.loadState=e.loadState??`ready`,a.dataset.filter=e.filter,a.dataset.scope=e.scope,a.setAttribute(`aria-labelledby`,r),a.setAttribute(`aria-busy`,String(e.loadState===`loading`)),i===`sheet`?(a.setAttribute(`role`,`dialog`),a.setAttribute(`aria-modal`,`true`)):a.setAttribute(`role`,`region`);let o=K(`rg-feedback-navigator-header`),s=K(`rg-feedback-navigator-heading`),c=document.createElement(`h2`);c.id=r,c.className=`rg-feedback-navigator-title`,c.textContent=t.title??`피드백`;let l=document.createElement(`span`);l.className=`rg-feedback-navigator-total`,l.setAttribute(`aria-hidden`,`true`),l.textContent=$t(e.counts.all,e.countsAreLowerBounds),s.append(c,l);let u=document.createElement(`button`);u.type=`button`,u.className=`rg-feedback-navigator-close`,u.dataset.feedbackNavigatorAction=`close`,u.setAttribute(`aria-label`,`피드백 목록 닫기`),u.append(Kt()),o.append(s,u);let d=K(`rg-feedback-navigator-content`);if(Xt(d,e),e.loadState!==`loading`&&e.loadState!==`error`&&(e.rows.length===0?d.append(Zt(e.scopeCounts.all===0,e.scope===`current`&&e.scopeCounts.current===0&&e.scopeCounts.all>0)):Vt(d,e)),a.append(o),e.scopeCounts.all>e.scopeCounts.current&&e.loadState!==`loading`&&e.loadState!==`error`){let t=K(`rg-feedback-scopes`);t.setAttribute(`role`,`group`),t.setAttribute(`aria-label`,`피드백 페이지 범위`);for(let n of Mt)t.append(zt(n,e.scopeCounts[n],e.scope===n,e.countsAreLowerBounds));a.append(t)}if(e.counts.all>0&&e.loadState!==`loading`&&e.loadState!==`error`){let t=K(`rg-feedback-filters`);t.setAttribute(`role`,`group`),t.setAttribute(`aria-label`,`피드백 상태 필터`);for(let n of Pt)t.append(Bt(n,e.counts[n],e.filter===n,e.countsAreLowerBounds));let n=document.createElement(`span`);n.className=`rg-feedback-sort-label`,n.textContent=`최근 활동순`,n.setAttribute(`aria-hidden`,`true`),t.append(n),a.append(t)}return a.append(d),t.exitReviewState&&a.append(Rt(t.exitReviewState)),a}function Rt(e){let t=K(`rg-feedback-navigator-footer`);if(t.dataset.exitState=e,e===`idle`){let e=document.createElement(`button`);return e.type=`button`,e.className=`rg-feedback-navigator-exit-link`,e.dataset.feedbackNavigatorAction=`exit-review`,e.setAttribute(`aria-label`,`이 브라우저에서 이 사이트의 리뷰 종료`),e.textContent=`리뷰 종료`,t.append(e),t}let n=K(`rg-feedback-navigator-exit-copy`),r=document.createElement(`strong`),i=document.createElement(`span`);if(e===`saving`)return r.textContent=`저장 중입니다`,i.textContent=`저장이 끝난 뒤 다시 시도해 주세요.`,n.append(r,i),t.append(n),t;r.textContent=e===`draft-warning`?`작성 중인 내용이 있습니다`:`리뷰를 종료할까요?`,i.textContent=e===`draft-warning`?`저장하지 않은 내용은 사라집니다.`:`저장된 피드백은 그대로 유지됩니다.`,n.append(r,i);let a=K(`rg-feedback-navigator-exit-actions`),o=document.createElement(`button`);o.type=`button`,o.className=`rg-feedback-navigator-exit-cancel`,o.dataset.feedbackNavigatorAction=`cancel-exit-review`,o.textContent=`취소`;let s=document.createElement(`button`);return s.type=`button`,s.className=`rg-feedback-navigator-exit-confirm`,s.dataset.feedbackNavigatorAction=`confirm-exit-review`,s.textContent=e===`draft-warning`?`그래도 종료`:`종료`,a.append(o,s),t.append(n,a),t}function zt(e,t,n,r=!1){let i=document.createElement(`button`);i.type=`button`,i.className=`rg-feedback-scope`,i.dataset.feedbackScope=e,i.dataset.feedbackNavigatorAction=`scope`,i.setAttribute(`aria-pressed`,String(n)),i.setAttribute(`aria-label`,`${Nt[e]} 피드백 ${r?`최소 `:``}${q(t)}개`);let a=document.createElement(`span`);a.textContent=Nt[e];let o=document.createElement(`span`);return o.className=`rg-feedback-scope-count`,o.setAttribute(`aria-hidden`,`true`),o.textContent=$t(t,r),i.append(a,o),i}function Bt(e,t,n,r=!1){let i=document.createElement(`button`);i.type=`button`,i.className=`rg-feedback-filter`,i.dataset.feedbackFilter=e,i.dataset.feedbackNavigatorAction=`filter`,i.setAttribute(`aria-pressed`,String(n)),i.setAttribute(`aria-label`,`${Ft[e]} 피드백 ${r?`최소 `:``}${q(t)}개`);let a=document.createElement(`span`);a.className=`rg-feedback-filter-label`,a.textContent=Ft[e];let o=document.createElement(`span`);return o.className=`rg-feedback-filter-count`,o.setAttribute(`aria-hidden`,`true`),o.textContent=$t(t,r),i.append(a,o),i}function Vt(e,t){if(t.scope!==`all`){e.append(Ht(t.rows,t.activeCommentId,!1));return}let n=new Map;for(let e of t.rows){let t=n.get(e.pageId);t?t.push(e):n.set(e.pageId,[e])}let r=[...n.values()].sort((e,t)=>Number(!!t[0]?.currentPage)-Number(!!e[0]?.currentPage));for(let n of r){let r=document.createElement(`section`);r.className=`rg-feedback-page-group`,r.setAttribute(`role`,`group`),n[0]?.currentPage&&(r.dataset.currentPage=`true`);let i=K(`rg-feedback-page-heading`),a=document.createElement(`span`);a.className=`rg-feedback-page-label`,a.textContent=n[0]?.pageLabel?.trim()||`알 수 없는 페이지`;let o=document.createElement(`span`);o.className=`rg-feedback-page-count`,o.textContent=$t(n.length,t.countsAreLowerBounds),o.setAttribute(`aria-hidden`,`true`),i.append(a,o),r.setAttribute(`aria-label`,`${a.textContent} 피드백 ${t.countsAreLowerBounds?`최소 `:``}${n.length}개`),r.append(i,Ht(n,t.activeCommentId,!0)),e.append(r)}}function Ht(e,t,n){let r=document.createElement(`ul`);r.className=`rg-feedback-list`,r.setAttribute(`aria-label`,n?`페이지 피드백 목록`:`피드백 목록`);for(let i of e)r.append(Ut(i,t,{showPageLabel:!n}));return r}function Ut(e,t,n={}){let r=document.createElement(`li`);r.className=`rg-feedback-item`,r.dataset.commentId=e.id;let i=document.createElement(`button`);i.type=`button`,i.className=`rg-feedback-row`,i.dataset.commentId=e.id,i.dataset.feedbackNavigatorAction=`open-comment`,i.dataset.status=e.status,i.dataset.currentPage=String(e.currentPage===!0),i.dataset.locationAvailable=String(e.locationAvailable!==!1),e.id===t&&i.setAttribute(`aria-current`,`true`),i.setAttribute(`aria-label`,Qt(e));let a=document.createElement(`span`);a.className=`rg-feedback-row-pin`,a.setAttribute(`aria-hidden`,`true`),a.textContent=`#${Math.max(1,Math.trunc(e.pinNumber))}`;let o=K(`rg-feedback-row-copy`),s=document.createElement(`span`);s.className=`rg-feedback-row-body`,s.textContent=e.body;let c=n.showPageLabel!==!1;if(c&&e.pageLabel?.trim()||e.targetLabel?.trim()){let t=document.createElement(`span`);t.className=`rg-feedback-row-context`,e.pageUrl?.trim()&&(t.dataset.pageUrl=e.pageUrl.trim(),t.title=e.pageUrl.trim()),e.currentPage&&(t.dataset.currentPage=`true`);let n=c?e.pageLabel?.trim():void 0;if(n&&t.append(document.createTextNode(n)),n&&e.targetLabel?.trim()&&t.append(document.createTextNode(` · `)),e.targetLabel?.trim()){let n=document.createElement(`span`);n.className=`rg-feedback-row-target`,n.textContent=e.targetLabel.trim(),t.append(n)}o.append(t)}let l=K(`rg-feedback-row-detail`),u=document.createElement(`span`);u.className=`rg-feedback-row-meta`,u.textContent=`${e.authorName} · ${e.timeLabel}`;let d=K(`rg-feedback-row-trailing`);if(!e.currentPage){let e=document.createElement(`span`);e.className=`rg-feedback-row-move`,e.setAttribute(`aria-hidden`,`true`),e.title=`이 페이지로 이동`;let t=document.createElement(`span`);t.textContent=`이동`,e.append(t,Yt()),d.append(e)}if(e.locationAvailable===!1){let e=document.createElement(`span`);e.className=`rg-feedback-row-location-missing`,e.setAttribute(`aria-hidden`,`true`),e.title=`현재 화면에서 위치를 찾을 수 없음`,e.append(qt()),d.append(e)}if(e.replyCount>0){let t=document.createElement(`span`);t.className=`rg-feedback-row-replies`,t.setAttribute(`aria-hidden`,`true`),t.textContent=`답글 ${$t(e.replyCount,e.replyCountIsLowerBound)}`,d.append(t)}if(e.status===`resolved`){let e=document.createElement(`span`);e.className=`rg-feedback-row-status`,e.setAttribute(`aria-hidden`,`true`),e.title=`완료`,e.append(Jt());let t=document.createElement(`span`);t.className=`rg-visually-hidden`,t.textContent=`완료`,e.append(t),d.append(e)}return l.append(u,d),o.append(s,l),i.append(a,o),r.append(i),r}function Wt(e){let t=document.createElement(`span`);return t.className=`rg-feedback-list-count`,t.dataset.feedbackCount=``,t.setAttribute(`aria-hidden`,`true`),t.hidden=q(e)===0,t.textContent=String(q(e)),t}function Gt(){return en(`0 0 14 14`,[G(`M4.75 3.25h6.5M4.75 7h6.5M4.75 10.75h6.5`),G(`M2.25 3.25h.01M2.25 7h.01M2.25 10.75h.01`,{"stroke-linecap":`round`,"stroke-width":`1.5`})])}function Kt(){return en(`0 0 12 12`,[G(`M2.47 1.76a.5.5 0 0 0-.71.71L5.29 6 1.76 9.53a.5.5 0 0 0 .71.71L6 6.71l3.53 3.53a.5.5 0 0 0 .71-.71L6.71 6l3.53-3.53a.5.5 0 0 0-.71-.71L6 5.29 2.47 1.76Z`,{fill:`currentColor`,stroke:`none`})])}function qt(){return en(`0 0 14 14`,[G(`M7 12.25s4-3.27 4-6.5a4 4 0 1 0-8 0c0 3.23 4 6.5 4 6.5Z`),G(`m4.75 3.5 4.5 4.5`)])}function Jt(){return en(`0 0 12 12`,[G(`m2.25 6.25 2.25 2.25 5.25-5.25`)])}function Yt(){return en(`0 0 12 12`,[G(`M2.25 6h7.5M6.75 3l3 3-3 3`)])}function Xt(e,t){let n=t.loadState??`ready`;if(n===`ready`)return;let r=K(`rg-feedback-navigator-state`);if(r.dataset.state=n,n===`error`){r.setAttribute(`role`,`alert`);let e=document.createElement(`span`);if(e.textContent=t.errorMessage?.trim()||`불러오지 못함`,r.append(e),t.errorRecovery!==`reauthenticate`){let e=document.createElement(`button`);e.type=`button`,e.className=`rg-feedback-navigator-retry`,e.dataset.feedbackNavigatorAction=`retry`,e.textContent=`재시도`,r.append(e)}}else r.setAttribute(`role`,`status`),r.setAttribute(`aria-live`,`polite`),r.textContent=n===`loading`?`불러오는 중`:`연결 확인 중`;e.append(r)}function Zt(e,t=!1){let n=K(`rg-feedback-navigator-empty`);return n.setAttribute(`role`,`status`),n.textContent=e?`피드백 없음`:t?`현재 페이지 피드백 없음`:`해당 피드백 없음`,n}function Qt(e){let t=[`피드백 #${Math.max(1,Math.trunc(e.pinNumber))}`,...e.pageLabel?.trim()?[`페이지 ${e.pageLabel.trim()}`]:[],...e.targetLabel?.trim()?[`대상 ${e.targetLabel.trim()}`]:[],e.body,e.authorName,`최근 활동 ${e.timeLabel}`];return e.replyCount>0&&t.push(`답글 ${e.replyCountIsLowerBound?`최소 `:``}${q(e.replyCount)}개`),t.push(e.status===`resolved`?`완료`:`진행 중`),e.locationAvailable===!1&&t.push(`현재 화면에서 위치를 찾을 수 없음`),e.currentPage||t.push(`다른 페이지로 이동`),t.join(`, `)}function $t(e,t=!1){return`${q(e)}${t?`+`:``}`}function en(e,t){let n=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`);n.setAttribute(`viewBox`,e),n.setAttribute(`aria-hidden`,`true`),n.setAttribute(`focusable`,`false`);for(let e of t)n.append(e);return n}function G(e,t={}){let n=document.createElementNS(`http://www.w3.org/2000/svg`,`path`);n.setAttribute(`d`,e),n.setAttribute(`fill`,`none`),n.setAttribute(`stroke`,`currentColor`),n.setAttribute(`stroke-width`,`1.25`),n.setAttribute(`stroke-linecap`,`round`),n.setAttribute(`stroke-linejoin`,`round`);for(let[e,r]of Object.entries(t))n.setAttribute(e,r);return n}function K(e){let t=document.createElement(`div`);return t.className=e,t}function q(e){return Math.max(0,Math.trunc(Number.isFinite(e)?e:0))}function tn(e){let t=e.elements.map(({textPreview:e})=>e.replace(/\s+/g,` `).trim()).find(Boolean);return t?t.length>48?`${t.slice(0,47).trimEnd()}…`:t:e.kind===`region`?`선택 영역`:e.kind===`viewport`?`화면 위치`:`선택 요소`}function nn(e){let t=k(e.anchor,J(e)),n=t.x-window.scrollX;if(e.kind===`element`&&t.element){let e=I(t.element);return{x:e.left,y:e.top,width:e.width,height:e.height,anchorX:n}}if(e.kind===`viewport`){let t=un(e);return{x:t.left,y:t.top,width:t.width,height:t.height,anchorX:t.left+t.width/2}}let r=sn(e);return{x:r.left,y:r.top,width:r.width,height:r.height,anchorX:e.kind===`region`?r.left+r.width/2:n}}function rn(e){if(e.target.kind===`element`){if(an(e).available)return nn(e.target);let t=window.visualViewport,n=t?.offsetLeft??0,r=t?.offsetTop??0,i=t?.width??window.innerWidth;return{x:n+i/2,y:r+16,width:0,height:0,anchorX:n+i/2}}if(e.target.kind===`viewport`){let t=un(e.target);return{x:t.left,y:t.top,width:t.width,height:t.height,anchorX:t.left+t.width/2}}let t=sn(e.target);return{x:t.left,y:t.top,width:t.width,height:t.height,anchorX:t.left+t.width/2}}function an(e,t){if(e.target.kind===`element`){let n=t??k(e.anchor,J(e.target));return n.anchored&&n.visible&&n.element?{available:!0,pageX:n.x,pageY:n.y}:{available:!1,pageX:null,pageY:null}}if(e.target.kind===`region`){let t=cn(e.target);return Number.isFinite(t.pageX)&&Number.isFinite(t.pageY)?{available:!0,pageX:t.pageX,pageY:t.pageY}:{available:!1,pageX:null,pageY:null}}let n=fn(e.target);return Number.isFinite(n.pageX)&&Number.isFinite(n.pageY)?{available:!0,pageX:n.pageX,pageY:n.pageY}:{available:!1,pageX:null,pageY:null}}function on(e){return`visual-review-thread-${e.replace(/[^a-zA-Z0-9_-]/g,`-`)}`}function sn(e){let t=pn(e),n=cn(e,t),r=vn(e.region.width)*t.x,i=vn(e.region.height)*t.y;return mn(new DOMRect(n.pageX-window.scrollX-r/2,n.pageY-window.scrollY-i/2,r,i))}function cn(e,t=pn(e)){return ln(e,t)??dn(e,t)}function ln(e,t){if(e.kind!==`region`||!e.anchor.selector)return null;let n=k(e.anchor,J(e));if(!n.anchored||!n.visible||!n.element)return null;let r=e.elements.find(({selector:t})=>t===e.anchor.selector);if(!r)return{pageX:n.x,pageY:n.y};let i=r.rect.pageX+r.rect.width*e.anchor.offsetX,a=r.rect.pageY+r.rect.height*e.anchor.offsetY,o=e.region.pageX+e.region.width/2,s=e.region.pageY+e.region.height/2;return{pageX:n.x+(o-i)*t.x,pageY:n.y+(s-a)*t.y}}function J(e){return e.elements.find(({selector:t})=>t===e.anchor.selector)??e.elements[0]}function un(e){let t=fn(e);return hn(new DOMRect(t.pageX-window.scrollX-7,t.pageY-window.scrollY-7,14,14))}function dn(e,t=pn(e)){let n=fn(e,t);return{pageX:n.pageX+n.width/2,pageY:n.pageY+n.height/2}}function fn(e,t=pn(e)){let n=e.region,r=Y(n.viewportX,n.pageX),i=Y(n.viewportY,n.pageY),a=Y(n.pageX,window.scrollX+r),o=Y(n.pageY,window.scrollY+i),s=a-r,c=o-i;return{pageX:s+r*t.x,pageY:c+i*t.y,width:vn(n.width)*t.x,height:vn(n.height)*t.y}}function pn(e){let t=_n(window.innerWidth,1),n=_n(window.innerHeight,1),r=_n(e.region.viewportWidth,t),i=_n(e.region.viewportHeight,n);return{x:t/r,y:n/i}}function mn(e){let t=gn(),n=X(Y(e.left,t.left),t.left,t.right),r=X(Y(e.top,t.top),t.top,t.bottom),i=X(Y(e.right,n),t.left,t.right),a=X(Y(e.bottom,r),t.top,t.bottom);return new DOMRect(n,r,Math.max(0,i-n),Math.max(0,a-r))}function hn(e){let t=gn(),n=Math.min(vn(e.width),t.width),r=Math.min(vn(e.height),t.height);return new DOMRect(X(Y(e.left,t.left),t.left,t.right-n),X(Y(e.top,t.top),t.top,t.bottom-r),n,r)}function gn(){let e=window.visualViewport;return new DOMRect(Y(e?.offsetLeft,0),Y(e?.offsetTop,0),_n(e?.width,window.innerWidth),_n(e?.height,window.innerHeight))}function _n(e,t){return Number.isFinite(e)&&(e??0)>0?e:Math.max(Number.isFinite(t)?t:1,1)}function vn(e){return Number.isFinite(e)?Math.max(0,e):0}function Y(e,t){return Number.isFinite(e)?e:Number.isFinite(t)?t:0}function X(e,t,n){return Math.min(n,Math.max(t,e))}const yn=1e6;async function bn(e){if(!document.body||typeof HTMLCanvasElement>`u`)return null;let t=Cn(e);document.body.append(t);try{let{toCanvas:t}=await import(`./es-BeyOi4lh.js`),n=Sn(e,window.innerWidth,window.innerHeight),r=xn(await t(document.body,{width:Math.max(1,Math.round(window.innerWidth)),height:Math.max(1,Math.round(window.innerHeight)),pixelRatio:1,cacheBust:!0,skipAutoScale:!0,backgroundColor:Tn(),filter:e=>!wn(e),style:{margin:`0`,transform:`translate(${-window.scrollX}px, ${-window.scrollY}px)`,transformOrigin:`top left`}}),n),i=await Dn(r);return!i||i.size>yn?null:{bytes:new Uint8Array(await i.arrayBuffer()),contentType:i.type===`image/png`?`image/png`:`image/webp`,width:r.width,height:r.height}}catch{return null}finally{t.remove()}}function xn(e,t){let n=document.createElement(`canvas`);n.width=t.outputWidth,n.height=t.outputHeight;let r=n.getContext(`2d`);if(!r)throw Error(`A 2D canvas context is required to crop review screenshots`);return r.drawImage(e,t.left,t.top,t.width,t.height,0,0,t.outputWidth,t.outputHeight),n}function Sn(e,t,n){let r=On(t),i=On(n),a=e.region,o=kn(a.viewportX,a.pageX-window.scrollX),s=kn(a.viewportY,a.pageY-window.scrollY),c=Math.max(18,kn(a.width,0)),l=Math.max(18,kn(a.height,0)),u=An(o+c/2,0,r),d=An(s+l/2,0,i),f=Math.min(r,Math.max(Math.min(640,r),c+192)),p=Math.min(i,Math.max(Math.min(420,i),l+160)),m=An(u-f/2,0,r-f),h=An(d-p/2,0,i-p),g=Math.min(1,960/f,640/p);return{left:m,top:h,width:f,height:p,scale:g,outputWidth:Math.max(1,Math.round(f*g)),outputHeight:Math.max(1,Math.round(p*g))}}function Cn(e){let t=e.region,n=document.createElement(`div`);return n.dataset.reviewCaptureMarker=`true`,Object.assign(n.style,{position:`absolute`,zIndex:`2147483646`,pointerEvents:`none`,boxSizing:`border-box`,left:`${Math.max(0,t.pageX)}px`,top:`${Math.max(0,t.pageY)}px`,width:`${Math.max(18,t.width)}px`,height:`${Math.max(18,t.height)}px`,border:`3px solid #ff4d67`,borderRadius:`6px`,background:`rgba(255, 77, 103, .12)`,boxShadow:`0 0 0 3px rgba(255,255,255,.92), 0 4px 18px rgba(0,0,0,.24)`}),n}function wn(e){return e instanceof HTMLElement?e.tagName===`AGENCY-REVIEW-WIDGET`||e.dataset.reviewCaptureExclude===`true`||e.id===`__next-build-watcher`||!!e.closest?.(`nextjs-portal`):!1}function Tn(){let e=getComputedStyle(document.body).backgroundColor;if(e&&e!==`rgba(0, 0, 0, 0)`)return e;let t=getComputedStyle(document.documentElement).backgroundColor;return t&&t!==`rgba(0, 0, 0, 0)`?t:`#ffffff`}function En(e,t,n){return new Promise(r=>e.toBlob(r,t,n))}async function Dn(e){for(let t of[.78,.64,.5]){let n=await En(e,`image/webp`,t);if(n&&n.size<=yn)return n}let t=await En(e,`image/png`);return t&&t.size<=yn?t:null}function On(e){return Number.isFinite(e)&&e>0?e:1}function kn(e,t){return Number.isFinite(e)?e:Number.isFinite(t)?t:0}function An(e,t,n){return Math.min(n,Math.max(t,e))}function jn(e,t,n){if(e.length===0||!Number.isFinite(t)||t<=0)return[];let r=t/Math.SQRT2,i=e.map((e,t)=>t),a=e.map(()=>0),o=new Map,s=e=>{let t=e;for(;i[t]!==t;)t=i[t];for(;i[e]!==e;){let n=i[e];i[e]=t,e=n}return t},c=(e,t)=>{let n=s(e),r=s(t);n!==r&&(a[n]<a[r]&&([n,r]=[r,n]),i[r]=n,a[n]===a[r]&&(a[n]+=1))};e.forEach((e,t)=>{let n=Math.floor(e.x/r),i=Math.floor(e.y/r),a=`${n}:${i}`,s=o.get(a);s?(c(s.indices[0],t),s.indices.push(t)):o.set(a,{x:n,y:i,indices:[t]})});let l=[...o.values()],u=t*t;for(let t of l)for(let r=-2;r<=2;r+=1)for(let i=-2;i<=2;i+=1){if(r<0||r===0&&i<=0)continue;let a=o.get(`${t.x+r}:${t.y+i}`);if(!a)continue;let s=!1;for(let r of t.indices){for(let t of a.indices){n?.();let i=e[r].x-e[t].x,a=e[r].y-e[t].y;if(!(i*i+a*a>u)){c(r,t),s=!0;break}}if(s)break}}let d=new Map;return e.forEach((e,t)=>{let n=s(t),r=d.get(n);r?r.push(t):d.set(n,[t])}),[...d.values()]}var Mn=class{limit;#e=new Map;constructor(e=32){if(this.limit=e,!Number.isSafeInteger(e)||e<1)throw RangeError(`Page review vault limit must be a positive integer`)}store(e,t){let n=t.pendingCommentSave?.comment?{target:t.pendingCommentSave.target,body:t.pendingCommentSave.body,comment:t.pendingCommentSave.comment}:t.failedCommentSave,r=new Map(t.replyDrafts),i=new Map(t.replySaveErrors),a=new Map(t.failedReplySaves);for(let[e,{body:n,reply:o}]of t.pendingReplyRequests)r.set(e,n),a.set(e,{body:n,reply:o}),i.set(e,`저장 확인이 중단되었습니다. 다시 시도하세요.`);let o=t.draftTarget??n?.target??null,s=t.draftTarget?t.commentDraft:n?.body??``,c=t.suspendedComposer??(o&&t.navigatorOpen?{target:o,body:s}:null);if(!(o||c||n||r.size>0||a.size>0||t.activeCommentId))return this.#e.delete(e),{stored:!1,evictedPageId:null};let l=new Set([...t.activeCommentId?[t.activeCommentId]:[],...r.keys(),...a.keys()]),u=t.snapshot??t.restoredSnapshot,d=u?.comments.filter(({id:e})=>l.has(e))??[],f=new Set(d.map(({id:e})=>e)),p=u&&d.length>0?{...u,comments:d,replies:u.replies.filter(({commentId:e})=>f.has(e))}:null;this.#e.delete(e),this.#e.set(e,{draftTarget:c?null:o,commentDraft:c?``:s,commentSaveError:n?`저장 확인이 중단되었습니다. 다시 시도하세요.`:t.commentSaveError,failedCommentSave:n,suspendedComposer:c,activeCommentId:t.activeCommentId,activeCommentOrigin:t.activeCommentOrigin,replyDrafts:r,replySaveErrors:i,failedReplySaves:a,snapshotSeed:p});let m=null;return this.#e.size>this.limit&&(m=this.#e.keys().next().value,this.#e.delete(m)),{stored:!0,evictedPageId:m}}take(e){let t=this.#e.get(e)??null;return this.#e.delete(e),t}clear(){this.#e.clear()}},Nn=class{#e=new Map;#t=!0;get observersDirty(){return this.#t}markObserversSynchronized(){this.#t=!1}clear(){this.#e.clear(),this.#t=!0}invalidate(e){if(this.#e.size!==0)for(let[t,n]of this.#e)(n?e.some(e=>Ln(e,n)):e.some(e=>e.type!==`characterData`))&&(this.#e.delete(t),this.#t=!0)}retryMissing(){for(let[e,t]of this.#e)t===null&&this.#e.delete(e);this.#t=!0}resolveTarget(e){let t=Fn(e);if(!this.#e.has(t)){let n=k(e.anchor,J(e));return this.#e.set(t,n.element),n}let n=this.#e.get(t)??null;if(n&&n.isConnected){let t=l(n);return{x:t.left+window.scrollX+t.width*e.anchor.offsetX,y:t.top+window.scrollY+t.height*e.anchor.offsetY,anchored:!0,visible:T(n),element:n,confidence:`high`}}return n?(this.#e.delete(t),this.#t=!0,this.resolveTarget(e)):{x:window.scrollX+window.innerWidth*e.anchor.viewportX,y:window.scrollY+window.innerHeight*e.anchor.viewportY,anchored:!1,visible:!0,element:null,confidence:`none`}}commentLocation(e){return an(e,e.target.kind===`element`?this.resolveTarget(e.target):void 0)}};function Pn(e){return e.type===`childList`&&[...e.addedNodes,...e.removedNodes].some(In)}function Fn(e){let t=J(e);return JSON.stringify([e.anchor.selector,t?.tagName??``,t?.textPreview??``,t?.rect.pageX??null,t?.rect.pageY??null,t?.rect.width??null,t?.rect.height??null])}function In(e){if(e.nodeType!==Node.ELEMENT_NODE&&e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE)return!1;if(e.nodeType===Node.ELEMENT_NODE){let t=e;if(t.localName===`iframe`||t.shadowRoot)return!0}let t;try{t=e.querySelectorAll(`*`)}catch{return!1}return[...t].some(e=>e.localName===`iframe`||e.shadowRoot)}function Ln(e,t){return e.target===t?!0:e.type===`characterData`?t.contains(e.target):e.type===`childList`&&[...e.removedNodes].some(e=>Rn(e,t))}function Rn(e,t){let n=t;for(;n;){if(n===e)return!0;if(n.parentNode){n=n.parentNode;continue}let t=n.getRootNode();if(t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&`host`in t){n=t.host;continue}if(t.nodeType===Node.DOCUMENT_NODE){n=t.defaultView?.frameElement??null;continue}n=null}return!1}const zn=[`top-left`,`top`,`top-right`,`right`,`bottom-right`,`bottom`,`bottom-left`,`left`],Bn=`agency-review-widget`,Vn=1e4,Hn=`visual-review-feedback-navigator`,Un=`${Hn}-surface`,Wn=new Set([`combobox`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`radio`,`searchbox`,`slider`,`spinbutton`,`textbox`]);var Gn=class extends HTMLElement{#e=this.attachShadow({mode:`open`});#t=null;#n=null;#r=null;#i=null;#a=null;#o=null;#s=null;#c=!1;#l=null;#u=null;#d=null;#f=null;#p=``;#m=``;#h=null;#g=null;#_=null;#v=null;#y=null;#b=null;#x=!1;#S=0;#C=`current`;#w=`all`;#T=`idle`;#E=`loading`;#D=``;#O=`retry`;#k=!1;#A=!1;#j=0;#M=0;#N=0;#P=!navigator.onLine;#F=null;#I=null;#L=null;#R=null;#z=null;#B=null;#V=null;#H=!1;#U=!1;#W=null;#G=null;#K=!1;#q=null;#J=null;#Y=!1;#X=null;#Z=new Set;#Q=new Nn;#$=new Map;#ee=new Map;#te=new Map;#ne=new Map;#re=new Map;#ie=new Map;#ae=new Mn;configure(e){if(this.#t)throw Error(`Review widget is already configured`);if(!qn(window.location,e.allowedStagingHosts))throw Error(`Review widget refused to activate on non-staging host: ${window.location.host}`);if(!e.session.invitationId||e.session.projectId.length===0)throw Error(`An accepted review invitation session is required`);this.#t=e,this.isConnected&&this.#oe()}setPage(e,t){let n=this.#t;if(!n)throw Error(`Review widget is not configured`);let r=n.collaboration&&e.collaboration?{...n.collaboration,roomId:e.collaboration.roomId,scopeId:e.collaboration.scopeId}:n.collaboration;if(t?.reload!==!0&&!this.#A&&n.pageId===e.pageId&&r?.roomId===n.collaboration?.roomId&&r?.scopeId===n.collaboration?.scopeId)return;let i=this.#A,a=n.pageId;this.#A=!1,this.#t={...n,pageId:e.pageId,collaboration:r},this.#F&&(i||this.#ve(a),this.#_e(e.pageId),this.#i?.stop(),this.#i=null,this.#xe(),this.#Ce(),this.#se())}beginPageTransition(){!this.#t||this.#A||(this.#A=!0,this.#F&&(this.#ve(this.#t.pageId),this.#i?.stop(),this.#i=null,this.#Ce()))}connectedCallback(){this.dataset.agencyReviewRoot=``,this.dataset.reactGrabIgnore=``,this.dataset.rgTheme=Er(),this.#t&&this.#oe()}disconnectedCallback(){this.#ye()}async#oe(){!this.#t||this.#F||(this.#F=new AbortController,this.#P=!navigator.onLine,this.#be(),this.#xe(),this.#Ce(),this.#wt(),document.addEventListener(`keydown`,this.#ft,{capture:!0,signal:this.#F.signal}),document.addEventListener(`keyup`,this.#pt,{capture:!0,signal:this.#F.signal}),window.addEventListener(`blur`,this.#mt,{signal:this.#F.signal}),document.addEventListener(`visibilitychange`,this.#mt,{signal:this.#F.signal}),document.addEventListener(`pointerdown`,this.#_t,{capture:!0,signal:this.#F.signal}),document.addEventListener(`click`,this.#vt,{capture:!0,signal:this.#F.signal}),document.addEventListener(`focusin`,this.#ut,{capture:!0,signal:this.#F.signal}),document.addEventListener(`scroll`,this.#xt,{capture:!0,passive:!0,signal:this.#F.signal}),window.addEventListener(`scroll`,this.#xt,{passive:!0,signal:this.#F.signal}),window.addEventListener(`resize`,this.#xt,{passive:!0,signal:this.#F.signal}),window.visualViewport?.addEventListener(`scroll`,this.#xt,{passive:!0,signal:this.#F.signal}),window.visualViewport?.addEventListener(`resize`,this.#xt,{passive:!0,signal:this.#F.signal}),window.addEventListener(`online`,this.#he,{signal:this.#F.signal}),window.addEventListener(`offline`,this.#he,{signal:this.#F.signal}),await this.#se())}async#se(){if(!this.#t||!this.#F)return;let e=null,t=null,n=this.#E===`error`,r=++this.#M,i=this.#F.signal,{pageId:a,repository:o,session:s}=this.#t,c=o,l=!!(c.getProjectSnapshot&&c.subscribeProject);this.#E=`loading`,this.#D=``,this.#Te(),this.#Me();try{let n,o=null;if(l?[n,o]=await Promise.all([c.getSnapshot(a),c.getProjectSnapshot(s.projectId)]):n=await c.getSnapshot(a),i.aborted||r!==this.#M)return;let u=this.#n,d=this.#r;this.#n=null,this.#r=null,$(u,d);let f=!1,p=!1,m=n,h=o,g=e=>{i.aborted||r!==this.#M||!this.#F||(f=!0,this.#pe(e))};if(e=c.subscribe(a,e=>{if(!(i.aborted||r!==this.#M||!this.#F)){if(!p){m=e;return}this.#ue(e)}},g),t=o&&c.subscribeProject?c.subscribeProject(s.projectId,e=>{if(!(i.aborted||r!==this.#M||!this.#F)){if(!p){h=e;return}this.#fe(e)}},g):null,f){$(e,t);return}if(i.aborted||r!==this.#M||!this.#F){$(e,t);return}this.#n=e,this.#r=t,e=null,t=null,p=!0,this.#ue(m),h&&this.#fe(h)}catch(a){if($(e,t),i.aborted||r!==this.#M)return;let o=sr(a)?a:{type:`error`,code:`unknown`,recovery:`retry`,clearSnapshot:!0};this.#pe(o,o.type===`access-lost`),n&&this.#x&&queueMicrotask(()=>this.#e.querySelector(`.rg-feedback-navigator-retry`)?.focus({preventScroll:!0}))}}#ce=new Map;#le=new Map;#ue=e=>{if(this.#A)return;if(this.#o?.pageId===e.pageId){let t=this.#a;this.#a=this.#o,e=this.#de(e),this.#a=t,this.#o=null}else e=this.#de(e);for(let[t,n]of[...this.#ce])e.comments.some(({id:e})=>e===t)&&(this.#ce.delete(t),n(!0));for(let[t,{commentId:n,settle:r}]of[...this.#le])e.replies.some(e=>e.id===t&&e.commentId===n)&&(this.#le.delete(t),r());this.#E=`ready`,this.#O=`retry`,this.#k=!1,this.#a=e,this.#me(e);let t=!1;if(this.#v&&!e.comments.some(({id:e})=>e===this.#v)){let e=this.#v;t=!0,this.#te.delete(e),this.#ne.delete(e),this.#re.delete(e),this.#ie.delete(e),this.#v=null,this.#y=null,this.#Ze(`열려 있던 피드백이 삭제되었습니다.`)}this.#Ce();let n=this.#b;n&&e.comments.some(({id:e})=>e===n)&&(this.#b=null,queueMicrotask(()=>void this.#Je(n,{origin:`pin`,navigate:!1,announceOpened:!0})));let r=t&&this.#x&&this.#Fe()===`sheet`&&this.#_?this.#ke(!1,{restoreFocus:!1,cancelNavigation:!1}):t&&!this.#x?this.#je():!1;t&&queueMicrotask(()=>{r||(this.#x?this.#Re():this.#ze()?.focus())})};#de(e){if(!e.window?.hasMoreComments||!this.#a)return e;let t=new Set([...this.#v?[this.#v]:[],...this.#b?[this.#b]:[],...this.#te.keys(),...this.#ne.keys(),...this.#re.keys(),...this.#ie.keys()]),n=new Set(e.comments.map(({id:e})=>e)),r=this.#a.comments.filter(({id:e})=>t.has(e)&&!n.has(e));if(r.length===0)return e;let i=new Set(r.map(({id:e})=>e)),a=new Set(e.replies.map(({id:e})=>e)),o=this.#a.replies.filter(({id:e,commentId:t})=>i.has(t)&&!a.has(e));return{...e,comments:[...r,...e.comments].sort((e,t)=>e.createdAt-t.createdAt||e.id.localeCompare(t.id)),replies:[...o,...e.replies].sort((e,t)=>e.createdAt-t.createdAt||e.id.localeCompare(t.id))}}#fe=e=>{this.#A||e.projectId===this.#t?.session.projectId&&(this.#s=e,this.#Rt(),this.#Me(),this.#Pe())};#pe(e,t=!0){let n=e.type===`access-lost`;this.#M+=1,this.#N+=1;let r=this.#n,i=this.#r;if(this.#n=null,this.#r=null,e.clearSnapshot&&(this.#a=null,this.#s=null),!n&&this.#f){let e=this.#e.querySelector(`.rg-selection-label:not(.rg-thread-label) textarea`);this.#_={target:this.#f,body:e?.value??this.#p},this.#f=null,this.#p=``}if(!n&&this.#g?.comment){let{target:e,body:t,comment:n}=this.#g;this.#h??={target:e,body:t,comment:n},this.#m||=`저장하지 못했습니다. 다시 시도하세요.`}if(n||this.#ne.forEach(({body:e,reply:t},n)=>{this.#te.set(n,e),this.#ie.has(n)||this.#ie.set(n,{body:e,reply:t}),this.#re.has(n)||this.#re.set(n,`답글을 저장하지 못했습니다. 다시 시도하세요.`)}),this.#g=null,this.#ne.clear(),n&&(this.#ae.clear(),this.#o=null,this.#f=null,this.#p=``,this.#m=``,this.#h=null,this.#_=null,this.#v=null,this.#y=null,this.#te.clear(),this.#re.clear(),this.#ie.clear()),this.#c?this.#we(!1):this.#Ft(),this.#E=`error`,this.#O=e.recovery,this.#k=e.type===`access-lost`,this.#D=e.type===`access-lost`?cr(e.code):`다시 시도하세요.`,t&&(this.#x=!0),$(r,i),this.#Te(),this.#Ce(),this.#Ze(this.#D),e.type===`access-lost`){try{this.#t?.onReauthenticationRequired?.(e)}catch{}this.dispatchEvent(new CustomEvent(`visual-review:reauthenticate-required`,{bubbles:!0,composed:!0,detail:{code:e.code}}))}}#me(e){let t=new Set(e.comments.map(({id:e})=>e)),n=this.#g,r=this.#h,i=!!(n?.comment&&t.has(n.comment.id)),a=!!(r&&t.has(r.comment.id)),o=[...i&&n?[n.target]:[],...a&&r?[r.target]:[]];if(o.length>0){let e=this.#f!==null&&o.includes(this.#f);this.#f&&o.includes(this.#f)&&(this.#f=null,this.#p=``),this.#_&&o.includes(this.#_.target)&&(this.#_=null),i&&(this.#g=null),a&&(this.#h=null),this.#m=``,this.#Ze(`피드백을 저장했습니다.`),e&&queueMicrotask(()=>this.#e.querySelector(`.rg-feedback-tool`)?.focus({preventScroll:!0}))}new Set([...this.#te.keys(),...this.#ne.keys(),...this.#re.keys(),...this.#ie.keys()]).forEach(n=>{if(!t.has(n)){this.#te.delete(n),this.#ne.delete(n),this.#re.delete(n),this.#ie.delete(n);return}let r=this.#ne.get(n),i=this.#ie.get(n),a=!!(r&&e.replies.some(e=>e.id===r.reply.id&&e.commentId===n)),o=!!(i&&e.replies.some(e=>e.id===i.reply.id&&e.commentId===n));!a&&!o||(a&&this.#ne.delete(n),o&&this.#ie.delete(n),this.#re.delete(n),this.#te.delete(n),this.#Ze(`답글을 저장했습니다.`))})}#he=()=>{this.#P=!navigator.onLine,this.#Me()};#ge(e){let t=this.#e.querySelector(`.rg-selection-label:not(.rg-thread-label) textarea`)?.value;t!==void 0&&this.#f&&(this.#p=t);let{evictedPageId:n}=this.#ae.store(e,{draftTarget:this.#f,commentDraft:this.#p,commentSaveError:this.#m,failedCommentSave:this.#h,pendingCommentSave:this.#g,suspendedComposer:this.#_,activeCommentId:this.#v,activeCommentOrigin:this.#y,navigatorOpen:this.#x,replyDrafts:this.#te,pendingReplyRequests:this.#ne,replySaveErrors:this.#re,failedReplySaves:this.#ie,snapshot:this.#a,restoredSnapshot:this.#o});n&&this.#Ze(`오래된 페이지의 저장되지 않은 초안을 정리했습니다.`)}#_e(e){let t=this.#ae.take(e);t&&(this.#f=t.draftTarget,this.#p=t.commentDraft,this.#m=t.commentSaveError,this.#h=t.failedCommentSave,this.#_=t.suspendedComposer,this.#v=t.activeCommentId,this.#y=t.activeCommentOrigin,t.replyDrafts.forEach((e,t)=>this.#te.set(t,e)),t.replySaveErrors.forEach((e,t)=>{this.#re.set(t,e)}),t.failedReplySaves.forEach((e,t)=>{this.#ie.set(t,e)}),this.#o=t.snapshotSeed)}#ve(e){this.#ge(e),this.#j+=1,this.#Q.clear(),this.#M+=1,this.#N+=1;let t=this.#n,n=this.#r;this.#n=null,this.#r=null;for(let[e,t]of[...this.#ce])this.#ce.delete(e),t(!1);for(let[e,{settle:t}]of[...this.#le])this.#le.delete(e),t();this.#c?this.#we(!1):this.#Ft(),this.#a=null,this.#o=null,this.#s=null,this.#E=`loading`,this.#D=``,this.#O=`retry`,this.#k=!1,this.#f=null,this.#p=``,this.#m=``,this.#h=null,this.#g=null,this.#_=null,this.#v=null,this.#y=null,this.#te.clear(),this.#ne.clear(),this.#re.clear(),this.#ie.clear(),$(t,n)}#ye(){this.#M+=1,this.#N+=1,this.#ht(),this.#$e(),this.#bt(),this.#ct(),this.#kt(),this.#c&&this.#we(!1),this.#L?.(),this.#L=null,this.#I?.(),this.#I=null;let e=this.#n,t=this.#r;this.#n=null,this.#r=null,this.#i?.stop(),this.#i=null,this.#F?.abort(),this.#F=null,this.#a=null,this.#o=null,this.#s=null,this.#E=`loading`,this.#D=``,this.#O=`retry`,this.#k=!1,this.#f=null,this.#p=``,this.#m=``,this.#h=null,this.#g=null,this.#_=null,this.#v=null,this.#y=null,this.#x=!1,this.#C=`current`,this.#w=`all`,this.#U=!1,this.#te.clear(),this.#ne.clear(),this.#re.clear(),this.#ie.clear(),this.#ae.clear(),this.#e.replaceChildren(),$(e,t)}#be(){this.#e.replaceChildren();let e=e=>e.stopPropagation();[`change`,`click`,`contextmenu`,`dblclick`,`input`,`keydown`,`keyup`,`pointercancel`,`pointerdown`,`pointermove`,`pointerup`,`submit`].forEach(t=>{this.#e.addEventListener(t,e,{signal:this.#F?.signal})});let t=document.createElement(`style`);this.#t?.styleNonce&&(t.nonce=this.#t.styleNonce),t.textContent=`
|
|
4
|
+
:host {
|
|
5
|
+
all: initial;
|
|
6
|
+
/* The reviewer sees this pin on the staging page and the owner sees the
|
|
7
|
+
same pin in the dashboard, so both surfaces read one value. It is also
|
|
8
|
+
dark enough for the white count badge to clear AA; the previous red sat
|
|
9
|
+
at 3.9:1 behind 8px text. */
|
|
10
|
+
--review-accent: #cf3339;
|
|
11
|
+
position: fixed;
|
|
12
|
+
inset: 0;
|
|
13
|
+
z-index: 2147483000;
|
|
14
|
+
pointer-events: none;
|
|
15
|
+
direction: ltr;
|
|
16
|
+
color: #171918;
|
|
17
|
+
font: 500 14px/1.45 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
* { box-sizing: border-box; }
|
|
21
|
+
button, textarea { font: inherit; }
|
|
22
|
+
|
|
23
|
+
.highlight, .region {
|
|
24
|
+
position: fixed;
|
|
25
|
+
display: none;
|
|
26
|
+
border: 2px solid var(--review-accent);
|
|
27
|
+
border-radius: 6px;
|
|
28
|
+
background: rgba(207, 51, 57, 0.07);
|
|
29
|
+
box-shadow: 0 0 0 1px rgba(255,255,255,.8), 0 0 0 4px rgba(207,51,57,.12);
|
|
30
|
+
}
|
|
31
|
+
.region { border-radius: 4px; }
|
|
32
|
+
.highlight[data-context-target="true"],
|
|
33
|
+
.region[data-context-target="true"] {
|
|
34
|
+
background: rgba(207, 51, 57, 0.05);
|
|
35
|
+
}
|
|
36
|
+
.region[data-point="true"] {
|
|
37
|
+
border-radius: 50%;
|
|
38
|
+
background: rgba(207, 51, 57, 0.14);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.pin {
|
|
42
|
+
position: fixed;
|
|
43
|
+
display: grid;
|
|
44
|
+
place-items: center;
|
|
45
|
+
width: 26px;
|
|
46
|
+
height: 26px;
|
|
47
|
+
padding: 0;
|
|
48
|
+
z-index: 1;
|
|
49
|
+
transform: translate(-8px, -21px);
|
|
50
|
+
pointer-events: auto;
|
|
51
|
+
border: 2px solid #fff;
|
|
52
|
+
border-radius: 50%;
|
|
53
|
+
color: #fff;
|
|
54
|
+
background: #18181b;
|
|
55
|
+
box-shadow:
|
|
56
|
+
0 0 0 1px rgba(0, 0, 0, .18),
|
|
57
|
+
0 2px 6px rgba(0, 0, 0, .28),
|
|
58
|
+
0 6px 16px rgba(0, 0, 0, .14);
|
|
59
|
+
cursor: pointer;
|
|
60
|
+
appearance: none;
|
|
61
|
+
isolation: isolate;
|
|
62
|
+
font: 700 11px/1 Geist, ui-sans-serif, system-ui, sans-serif;
|
|
63
|
+
font-variant-numeric: tabular-nums;
|
|
64
|
+
font-synthesis: none;
|
|
65
|
+
text-shadow: 0 1px 1px rgba(0, 0, 0, .24);
|
|
66
|
+
-webkit-tap-highlight-color: transparent;
|
|
67
|
+
transition:
|
|
68
|
+
opacity 100ms ease-out,
|
|
69
|
+
background 150ms ease-out,
|
|
70
|
+
box-shadow 150ms ease-out,
|
|
71
|
+
transform 300ms var(--rg-ease-spring);
|
|
72
|
+
}
|
|
73
|
+
.pins[data-selection-suppressed="true"] .pin {
|
|
74
|
+
opacity: 0;
|
|
75
|
+
pointer-events: none;
|
|
76
|
+
transform: translate(-8px, -21px) scale(.82);
|
|
77
|
+
transition-duration: 80ms;
|
|
78
|
+
}
|
|
79
|
+
.pin::after {
|
|
80
|
+
position: absolute;
|
|
81
|
+
inset: -2px;
|
|
82
|
+
content: '';
|
|
83
|
+
}
|
|
84
|
+
@media (hover: hover) and (pointer: fine) {
|
|
85
|
+
.pin:hover {
|
|
86
|
+
z-index: 3;
|
|
87
|
+
background: #09090b;
|
|
88
|
+
box-shadow:
|
|
89
|
+
0 0 0 1px rgba(0, 0, 0, .22),
|
|
90
|
+
0 3px 8px rgba(0, 0, 0, .32),
|
|
91
|
+
0 8px 20px rgba(0, 0, 0, .16);
|
|
92
|
+
transform: translate(-8px, -21px) scale(1.1);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
.pin[data-active="true"] {
|
|
96
|
+
z-index: 4;
|
|
97
|
+
background: #18181b;
|
|
98
|
+
box-shadow:
|
|
99
|
+
0 0 0 2px var(--review-accent),
|
|
100
|
+
0 0 0 4px #fff,
|
|
101
|
+
0 5px 16px rgba(0, 0, 0, .3);
|
|
102
|
+
transform: translate(-8px, -21px) scale(1.1);
|
|
103
|
+
}
|
|
104
|
+
.pin:active,
|
|
105
|
+
.pin[data-active="true"]:active {
|
|
106
|
+
transform: translate(-8px, -21px) scale(.96);
|
|
107
|
+
transition-duration: 60ms;
|
|
108
|
+
}
|
|
109
|
+
.pin:focus-visible {
|
|
110
|
+
z-index: 5;
|
|
111
|
+
outline: 3px solid var(--review-accent);
|
|
112
|
+
outline-offset: 3px;
|
|
113
|
+
}
|
|
114
|
+
.pin[data-resolved="true"] {
|
|
115
|
+
color: #fff;
|
|
116
|
+
background: #737373;
|
|
117
|
+
}
|
|
118
|
+
.pin[data-resolved="true"][data-active="true"] { background: #404040; }
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
:host {
|
|
122
|
+
--rg-panel-bg: #151618;
|
|
123
|
+
--rg-panel-secondary: #1d1f22;
|
|
124
|
+
--rg-text-primary: #f4f4f2;
|
|
125
|
+
--rg-text-secondary: #9b9c9f;
|
|
126
|
+
--rg-surface-hover: rgba(255, 255, 255, 0.07);
|
|
127
|
+
--rg-border-subtle: rgba(255, 255, 255, 0.1);
|
|
128
|
+
--rg-submit-bg: #f4f4f2;
|
|
129
|
+
--rg-submit-fg: #151618;
|
|
130
|
+
--rg-status-error: #ff8a8f;
|
|
131
|
+
--rg-shadow: 0 12px 40px rgba(0, 0, 0, 0.34), inset 0 1px rgba(255, 255, 255, 0.04);
|
|
132
|
+
--rg-drop-shadow: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.28));
|
|
133
|
+
--rg-ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
|
|
134
|
+
--rg-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
:host([data-rg-theme="light"]) {
|
|
138
|
+
--rg-panel-bg: #ffffff;
|
|
139
|
+
--rg-panel-secondary: #f5f5f5;
|
|
140
|
+
--rg-text-primary: #171717;
|
|
141
|
+
--rg-text-secondary: #737373;
|
|
142
|
+
--rg-surface-hover: rgba(0, 0, 0, 0.05);
|
|
143
|
+
--rg-border-subtle: rgba(0, 0, 0, 0.08);
|
|
144
|
+
--rg-submit-bg: #171717;
|
|
145
|
+
--rg-submit-fg: #ffffff;
|
|
146
|
+
--rg-status-error: #b42318;
|
|
147
|
+
--rg-shadow: 0 10px 32px rgba(0, 0, 0, 0.16), inset 0 1px rgba(255, 255, 255, 0.7);
|
|
148
|
+
--rg-drop-shadow: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.14));
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.rg-toolbar {
|
|
152
|
+
--rg-toolbar-offset-x: 0px;
|
|
153
|
+
--rg-toolbar-offset-y: 0px;
|
|
154
|
+
--rg-collapse-duration: 220ms;
|
|
155
|
+
position: fixed;
|
|
156
|
+
top: auto;
|
|
157
|
+
right: max(12px, env(safe-area-inset-right));
|
|
158
|
+
bottom: max(12px, env(safe-area-inset-bottom));
|
|
159
|
+
left: auto;
|
|
160
|
+
translate: var(--rg-toolbar-offset-x) var(--rg-toolbar-offset-y);
|
|
161
|
+
display: flex;
|
|
162
|
+
align-items: center;
|
|
163
|
+
justify-content: center;
|
|
164
|
+
width: max-content;
|
|
165
|
+
height: max-content;
|
|
166
|
+
min-width: 0;
|
|
167
|
+
min-height: 28px;
|
|
168
|
+
padding: 2px 4px;
|
|
169
|
+
pointer-events: auto;
|
|
170
|
+
border: .5px solid var(--rg-border-subtle);
|
|
171
|
+
border-radius: 13px;
|
|
172
|
+
color: var(--rg-text-secondary);
|
|
173
|
+
background: var(--rg-panel-bg);
|
|
174
|
+
box-shadow: var(--rg-shadow);
|
|
175
|
+
font: 500 13px/16px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
176
|
+
font-synthesis: none;
|
|
177
|
+
z-index: 2147483647;
|
|
178
|
+
transition:
|
|
179
|
+
padding var(--rg-collapse-duration) var(--rg-ease-drawer),
|
|
180
|
+
border-radius var(--rg-collapse-duration) var(--rg-ease-drawer),
|
|
181
|
+
opacity 400ms var(--rg-ease-drawer),
|
|
182
|
+
transform 400ms var(--rg-ease-drawer);
|
|
183
|
+
}
|
|
184
|
+
.rg-toolbar[data-dock-managed="true"] {
|
|
185
|
+
touch-action: none;
|
|
186
|
+
user-select: none;
|
|
187
|
+
cursor: grab;
|
|
188
|
+
}
|
|
189
|
+
.rg-toolbar[data-dragging="true"] {
|
|
190
|
+
cursor: grabbing;
|
|
191
|
+
transition: none;
|
|
192
|
+
}
|
|
193
|
+
.rg-toolbar[data-dragging="true"] * { cursor: grabbing; }
|
|
194
|
+
.rg-toolbar[data-collapse-animating="true"] {
|
|
195
|
+
transition:
|
|
196
|
+
top var(--rg-collapse-duration) var(--rg-ease-drawer),
|
|
197
|
+
left var(--rg-collapse-duration) var(--rg-ease-drawer),
|
|
198
|
+
padding var(--rg-collapse-duration) var(--rg-ease-drawer),
|
|
199
|
+
border-radius var(--rg-collapse-duration) var(--rg-ease-drawer),
|
|
200
|
+
opacity 400ms var(--rg-ease-drawer),
|
|
201
|
+
transform 400ms var(--rg-ease-drawer);
|
|
202
|
+
}
|
|
203
|
+
.rg-toolbar[data-snapping="true"] {
|
|
204
|
+
transition:
|
|
205
|
+
top 300ms var(--rg-ease-drawer),
|
|
206
|
+
left 300ms var(--rg-ease-drawer),
|
|
207
|
+
padding 220ms var(--rg-ease-drawer),
|
|
208
|
+
border-radius 220ms var(--rg-ease-drawer),
|
|
209
|
+
opacity 400ms var(--rg-ease-drawer),
|
|
210
|
+
transform 400ms var(--rg-ease-drawer);
|
|
211
|
+
}
|
|
212
|
+
.rg-toolbar[data-position="top-left"] {
|
|
213
|
+
top: max(12px, env(safe-area-inset-top));
|
|
214
|
+
right: auto;
|
|
215
|
+
bottom: auto;
|
|
216
|
+
left: max(12px, env(safe-area-inset-left));
|
|
217
|
+
}
|
|
218
|
+
.rg-toolbar[data-position="top"] {
|
|
219
|
+
top: max(12px, env(safe-area-inset-top));
|
|
220
|
+
right: auto;
|
|
221
|
+
bottom: auto;
|
|
222
|
+
left: 50%;
|
|
223
|
+
translate: calc(-50% + var(--rg-toolbar-offset-x)) var(--rg-toolbar-offset-y);
|
|
224
|
+
}
|
|
225
|
+
.rg-toolbar[data-position="top-right"] {
|
|
226
|
+
top: max(12px, env(safe-area-inset-top));
|
|
227
|
+
right: max(12px, env(safe-area-inset-right));
|
|
228
|
+
bottom: auto;
|
|
229
|
+
left: auto;
|
|
230
|
+
}
|
|
231
|
+
.rg-toolbar[data-position="right"] {
|
|
232
|
+
top: 50%;
|
|
233
|
+
right: max(12px, env(safe-area-inset-right));
|
|
234
|
+
bottom: auto;
|
|
235
|
+
left: auto;
|
|
236
|
+
translate: var(--rg-toolbar-offset-x) calc(-50% + var(--rg-toolbar-offset-y));
|
|
237
|
+
}
|
|
238
|
+
.rg-toolbar[data-position="bottom-right"] {
|
|
239
|
+
top: auto;
|
|
240
|
+
right: max(12px, env(safe-area-inset-right));
|
|
241
|
+
bottom: max(12px, env(safe-area-inset-bottom));
|
|
242
|
+
left: auto;
|
|
243
|
+
}
|
|
244
|
+
.rg-toolbar[data-position="bottom"] {
|
|
245
|
+
top: auto;
|
|
246
|
+
right: auto;
|
|
247
|
+
bottom: max(12px, env(safe-area-inset-bottom));
|
|
248
|
+
left: 50%;
|
|
249
|
+
translate: calc(-50% + var(--rg-toolbar-offset-x)) var(--rg-toolbar-offset-y);
|
|
250
|
+
}
|
|
251
|
+
.rg-toolbar[data-position="bottom-left"] {
|
|
252
|
+
top: auto;
|
|
253
|
+
right: auto;
|
|
254
|
+
bottom: max(12px, env(safe-area-inset-bottom));
|
|
255
|
+
left: max(12px, env(safe-area-inset-left));
|
|
256
|
+
}
|
|
257
|
+
.rg-toolbar[data-position="left"] {
|
|
258
|
+
top: 50%;
|
|
259
|
+
right: auto;
|
|
260
|
+
bottom: auto;
|
|
261
|
+
left: max(12px, env(safe-area-inset-left));
|
|
262
|
+
translate: var(--rg-toolbar-offset-x) calc(-50% + var(--rg-toolbar-offset-y));
|
|
263
|
+
}
|
|
264
|
+
.rg-toolbar-actions-shell {
|
|
265
|
+
display: grid;
|
|
266
|
+
grid-template-columns: 1fr;
|
|
267
|
+
min-width: 0;
|
|
268
|
+
overflow: visible;
|
|
269
|
+
transition: grid-template-columns var(--rg-collapse-duration) var(--rg-ease-drawer);
|
|
270
|
+
}
|
|
271
|
+
.rg-toolbar-actions {
|
|
272
|
+
display: flex;
|
|
273
|
+
align-items: center;
|
|
274
|
+
min-width: 0;
|
|
275
|
+
opacity: 1;
|
|
276
|
+
transition: opacity 180ms var(--rg-ease-drawer) 80ms;
|
|
277
|
+
}
|
|
278
|
+
.rg-action-wrap {
|
|
279
|
+
position: relative;
|
|
280
|
+
display: flex;
|
|
281
|
+
align-items: center;
|
|
282
|
+
justify-content: center;
|
|
283
|
+
width: 24px;
|
|
284
|
+
height: 24px;
|
|
285
|
+
margin-right: 0;
|
|
286
|
+
}
|
|
287
|
+
.rg-action, .rg-collapse, .rg-submit {
|
|
288
|
+
all: unset;
|
|
289
|
+
display: flex;
|
|
290
|
+
align-items: center;
|
|
291
|
+
justify-content: center;
|
|
292
|
+
flex: none;
|
|
293
|
+
cursor: pointer;
|
|
294
|
+
color: var(--rg-text-secondary);
|
|
295
|
+
-webkit-tap-highlight-color: transparent;
|
|
296
|
+
transition: color 150ms var(--rg-ease-drawer), transform 400ms var(--rg-ease-spring);
|
|
297
|
+
}
|
|
298
|
+
.rg-submit::after {
|
|
299
|
+
position: absolute;
|
|
300
|
+
width: max(24px, 100%);
|
|
301
|
+
height: max(24px, 100%);
|
|
302
|
+
content: '';
|
|
303
|
+
}
|
|
304
|
+
.rg-action, .rg-collapse, .rg-submit { position: relative; }
|
|
305
|
+
.rg-action:focus-visible,
|
|
306
|
+
.rg-collapse:focus-visible,
|
|
307
|
+
.rg-submit:focus-visible,
|
|
308
|
+
.rg-thread-close:focus-visible {
|
|
309
|
+
outline: 2px solid var(--review-accent);
|
|
310
|
+
outline-offset: 3px;
|
|
311
|
+
}
|
|
312
|
+
.rg-action { width: 24px; height: 24px; }
|
|
313
|
+
.rg-action svg { width: 14px; height: 14px; fill: currentColor; }
|
|
314
|
+
.rg-action:hover,
|
|
315
|
+
.rg-action[aria-pressed="true"],
|
|
316
|
+
.rg-feedback-list-tool[aria-expanded="true"],
|
|
317
|
+
.rg-collapse:hover {
|
|
318
|
+
color: var(--rg-text-primary);
|
|
319
|
+
}
|
|
320
|
+
@media (hover: hover) and (pointer: fine) {
|
|
321
|
+
.rg-action:hover, .rg-collapse:hover, .rg-submit:hover { transform: scale(1.05); }
|
|
322
|
+
}
|
|
323
|
+
.rg-action:active, .rg-collapse:active, .rg-submit:active {
|
|
324
|
+
transform: scale(.96);
|
|
325
|
+
transition-duration: 60ms;
|
|
326
|
+
transition-timing-function: cubic-bezier(0, 0, .2, 1);
|
|
327
|
+
}
|
|
328
|
+
.rg-collapse { width: 24px; height: 24px; }
|
|
329
|
+
.rg-collapse svg {
|
|
330
|
+
width: 18px;
|
|
331
|
+
height: 18px;
|
|
332
|
+
margin: -2px;
|
|
333
|
+
fill: currentColor;
|
|
334
|
+
transform: rotate(90deg);
|
|
335
|
+
transition: transform 150ms var(--rg-ease-drawer), color 150ms var(--rg-ease-drawer);
|
|
336
|
+
}
|
|
337
|
+
.rg-tooltip {
|
|
338
|
+
position: absolute;
|
|
339
|
+
left: 50%;
|
|
340
|
+
bottom: calc(100% + 10px);
|
|
341
|
+
transform: translate(-50%, 2px) scale(.97);
|
|
342
|
+
padding: 2px 8px;
|
|
343
|
+
pointer-events: none;
|
|
344
|
+
border-radius: 999px;
|
|
345
|
+
color: var(--rg-text-primary);
|
|
346
|
+
background: var(--rg-panel-bg);
|
|
347
|
+
box-shadow: var(--rg-shadow);
|
|
348
|
+
opacity: 0;
|
|
349
|
+
font: 500 10px/16px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
350
|
+
white-space: nowrap;
|
|
351
|
+
transition: opacity 100ms ease-out, transform 100ms ease-out;
|
|
352
|
+
transition-delay: 0ms;
|
|
353
|
+
}
|
|
354
|
+
.rg-action-wrap:hover .rg-tooltip, .rg-action-wrap:focus-within .rg-tooltip {
|
|
355
|
+
transform: translate(-50%, 0) scale(1);
|
|
356
|
+
opacity: 1;
|
|
357
|
+
transition-delay: 400ms;
|
|
358
|
+
}
|
|
359
|
+
.rg-toolbar[data-selecting="true"]:not(:hover) {
|
|
360
|
+
transform: scale(.97);
|
|
361
|
+
opacity: .55;
|
|
362
|
+
}
|
|
363
|
+
.rg-toolbar[data-selecting="true"] .rg-tooltip,
|
|
364
|
+
.rg-toolbar[data-collapsed="true"] .rg-tooltip { display: none; }
|
|
365
|
+
.rg-toolbar[data-collapsed="true"] {
|
|
366
|
+
padding: 1px 3px;
|
|
367
|
+
}
|
|
368
|
+
.rg-toolbar[data-position^="top"][data-collapsed="true"] {
|
|
369
|
+
top: 0;
|
|
370
|
+
padding: 1px 3px;
|
|
371
|
+
border-radius: 0 0 10px 10px;
|
|
372
|
+
}
|
|
373
|
+
.rg-toolbar[data-position^="bottom"][data-collapsed="true"] {
|
|
374
|
+
bottom: 0;
|
|
375
|
+
border-radius: 10px 10px 0 0;
|
|
376
|
+
}
|
|
377
|
+
.rg-toolbar[data-position="left"][data-collapsed="true"] {
|
|
378
|
+
left: 0;
|
|
379
|
+
border-radius: 0 10px 10px 0;
|
|
380
|
+
}
|
|
381
|
+
.rg-toolbar[data-position="right"][data-collapsed="true"] {
|
|
382
|
+
right: 0;
|
|
383
|
+
border-radius: 10px 0 0 10px;
|
|
384
|
+
}
|
|
385
|
+
.rg-toolbar[data-collapsed="true"] .rg-toolbar-actions-shell {
|
|
386
|
+
grid-template-columns: 0fr;
|
|
387
|
+
pointer-events: none;
|
|
388
|
+
}
|
|
389
|
+
.rg-toolbar[data-collapsed="true"] .rg-toolbar-actions {
|
|
390
|
+
overflow: hidden;
|
|
391
|
+
opacity: 0;
|
|
392
|
+
transition: opacity 100ms var(--rg-ease-drawer);
|
|
393
|
+
}
|
|
394
|
+
.rg-toolbar[data-collapsed="true"] .rg-collapse svg { transform: rotate(-90deg); }
|
|
395
|
+
.rg-toolbar[data-position^="top"] .rg-collapse svg { transform: rotate(-90deg); }
|
|
396
|
+
.rg-toolbar[data-position^="top"][data-collapsed="true"] .rg-collapse svg {
|
|
397
|
+
transform: rotate(90deg);
|
|
398
|
+
}
|
|
399
|
+
.rg-toolbar[data-position="left"] .rg-collapse svg { transform: rotate(180deg); }
|
|
400
|
+
.rg-toolbar[data-position="left"][data-collapsed="true"] .rg-collapse svg {
|
|
401
|
+
transform: rotate(0deg);
|
|
402
|
+
}
|
|
403
|
+
.rg-toolbar[data-position="right"] .rg-collapse svg { transform: rotate(0deg); }
|
|
404
|
+
.rg-toolbar[data-position="right"][data-collapsed="true"] .rg-collapse svg {
|
|
405
|
+
transform: rotate(180deg);
|
|
406
|
+
}
|
|
407
|
+
.rg-toolbar[data-dock-edge="left"],
|
|
408
|
+
.rg-toolbar[data-dock-edge="right"] {
|
|
409
|
+
flex-direction: column;
|
|
410
|
+
}
|
|
411
|
+
.rg-toolbar[data-dock-edge="left"] .rg-toolbar-actions-shell,
|
|
412
|
+
.rg-toolbar[data-dock-edge="right"] .rg-toolbar-actions-shell {
|
|
413
|
+
grid-template-columns: 1fr;
|
|
414
|
+
grid-template-rows: 1fr;
|
|
415
|
+
min-height: 0;
|
|
416
|
+
transition: grid-template-rows var(--rg-collapse-duration) var(--rg-ease-drawer);
|
|
417
|
+
}
|
|
418
|
+
.rg-toolbar[data-dock-edge="left"] .rg-toolbar-actions,
|
|
419
|
+
.rg-toolbar[data-dock-edge="right"] .rg-toolbar-actions {
|
|
420
|
+
flex-direction: column;
|
|
421
|
+
min-height: 0;
|
|
422
|
+
}
|
|
423
|
+
.rg-toolbar[data-dock-edge="left"] .rg-action-wrap,
|
|
424
|
+
.rg-toolbar[data-dock-edge="right"] .rg-action-wrap {
|
|
425
|
+
margin-right: 0;
|
|
426
|
+
margin-bottom: 0;
|
|
427
|
+
}
|
|
428
|
+
.rg-toolbar[data-dock-edge="left"][data-collapsed="true"] .rg-toolbar-actions-shell,
|
|
429
|
+
.rg-toolbar[data-dock-edge="right"][data-collapsed="true"] .rg-toolbar-actions-shell {
|
|
430
|
+
grid-template-columns: 1fr;
|
|
431
|
+
grid-template-rows: 0fr;
|
|
432
|
+
}
|
|
433
|
+
.rg-toolbar[data-dock-edge="left"][data-collapsed="true"],
|
|
434
|
+
.rg-toolbar[data-dock-edge="right"][data-collapsed="true"] {
|
|
435
|
+
padding: 3px 1px;
|
|
436
|
+
}
|
|
437
|
+
.rg-toolbar[data-dock-edge="top"] .rg-collapse svg { transform: rotate(-90deg); }
|
|
438
|
+
.rg-toolbar[data-dock-edge="top"][data-collapsed="true"] .rg-collapse svg {
|
|
439
|
+
transform: rotate(90deg);
|
|
440
|
+
}
|
|
441
|
+
.rg-toolbar[data-dock-edge="bottom"] .rg-collapse svg { transform: rotate(90deg); }
|
|
442
|
+
.rg-toolbar[data-dock-edge="bottom"][data-collapsed="true"] .rg-collapse svg {
|
|
443
|
+
transform: rotate(-90deg);
|
|
444
|
+
}
|
|
445
|
+
.rg-toolbar[data-dock-edge="left"] .rg-collapse svg { transform: rotate(180deg); }
|
|
446
|
+
.rg-toolbar[data-dock-edge="left"][data-collapsed="true"] .rg-collapse svg {
|
|
447
|
+
transform: rotate(0deg);
|
|
448
|
+
}
|
|
449
|
+
.rg-toolbar[data-dock-edge="right"] .rg-collapse svg { transform: rotate(0deg); }
|
|
450
|
+
.rg-toolbar[data-dock-edge="right"][data-collapsed="true"] .rg-collapse svg {
|
|
451
|
+
transform: rotate(180deg);
|
|
452
|
+
}
|
|
453
|
+
.rg-toolbar[data-dock-edge="left"] .rg-tooltip {
|
|
454
|
+
top: 50%;
|
|
455
|
+
right: auto;
|
|
456
|
+
bottom: auto;
|
|
457
|
+
left: calc(100% + 10px);
|
|
458
|
+
transform: translate(2px, -50%) scale(.97);
|
|
459
|
+
}
|
|
460
|
+
.rg-toolbar[data-dock-edge="right"] .rg-tooltip {
|
|
461
|
+
top: 50%;
|
|
462
|
+
right: calc(100% + 10px);
|
|
463
|
+
bottom: auto;
|
|
464
|
+
left: auto;
|
|
465
|
+
transform: translate(-2px, -50%) scale(.97);
|
|
466
|
+
}
|
|
467
|
+
.rg-toolbar[data-dock-edge="left"] .rg-action-wrap:hover .rg-tooltip,
|
|
468
|
+
.rg-toolbar[data-dock-edge="left"] .rg-action-wrap:focus-within .rg-tooltip,
|
|
469
|
+
.rg-toolbar[data-dock-edge="right"] .rg-action-wrap:hover .rg-tooltip,
|
|
470
|
+
.rg-toolbar[data-dock-edge="right"] .rg-action-wrap:focus-within .rg-tooltip {
|
|
471
|
+
transform: translate(0, -50%) scale(1);
|
|
472
|
+
}
|
|
473
|
+
.rg-toolbar[data-position^="top"] .rg-tooltip {
|
|
474
|
+
top: calc(100% + 10px);
|
|
475
|
+
bottom: auto;
|
|
476
|
+
}
|
|
477
|
+
.rg-developer-status {
|
|
478
|
+
position: absolute;
|
|
479
|
+
left: 50%;
|
|
480
|
+
bottom: calc(100% + 8px);
|
|
481
|
+
transform: translate(-50%, 4px) scale(.98);
|
|
482
|
+
padding: 4px 8px;
|
|
483
|
+
pointer-events: none;
|
|
484
|
+
border-radius: 999px;
|
|
485
|
+
color: var(--rg-text-primary);
|
|
486
|
+
background: var(--rg-panel-bg);
|
|
487
|
+
box-shadow: var(--rg-shadow);
|
|
488
|
+
opacity: 0;
|
|
489
|
+
white-space: nowrap;
|
|
490
|
+
font: 500 11px/16px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
491
|
+
transition: opacity 120ms ease-out, transform 120ms ease-out;
|
|
492
|
+
}
|
|
493
|
+
.rg-developer-status[data-tone="error"] { color: var(--rg-status-error); }
|
|
494
|
+
.rg-developer-status[data-visible="true"] {
|
|
495
|
+
transform: translate(-50%, 0) scale(1);
|
|
496
|
+
opacity: 1;
|
|
497
|
+
}
|
|
498
|
+
.rg-toolbar[data-position^="top"] .rg-developer-status {
|
|
499
|
+
top: calc(100% + 8px);
|
|
500
|
+
bottom: auto;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
.rg-selection-label {
|
|
504
|
+
position: fixed;
|
|
505
|
+
transform: translateX(-50%);
|
|
506
|
+
z-index: 2147483002;
|
|
507
|
+
width: min(264px, calc(100vw - 16px));
|
|
508
|
+
min-width: 0;
|
|
509
|
+
max-width: none;
|
|
510
|
+
pointer-events: auto;
|
|
511
|
+
color: var(--rg-text-primary);
|
|
512
|
+
filter: var(--rg-drop-shadow);
|
|
513
|
+
font: 500 13px/16px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
514
|
+
font-synthesis: none;
|
|
515
|
+
transition: opacity 125ms ease-out, filter 125ms ease-out;
|
|
516
|
+
}
|
|
517
|
+
.rg-selection-label:focus { outline: none; }
|
|
518
|
+
.rg-surface {
|
|
519
|
+
overflow: hidden;
|
|
520
|
+
width: 100%;
|
|
521
|
+
min-width: 0;
|
|
522
|
+
max-width: none;
|
|
523
|
+
border: .5px solid var(--rg-border-subtle);
|
|
524
|
+
border-radius: 8px;
|
|
525
|
+
corner-shape: superellipse(1.25);
|
|
526
|
+
background: var(--rg-panel-bg);
|
|
527
|
+
}
|
|
528
|
+
.rg-tag-row {
|
|
529
|
+
display: flex;
|
|
530
|
+
align-items: center;
|
|
531
|
+
max-width: none;
|
|
532
|
+
padding: 4px 7px 3px;
|
|
533
|
+
overflow: hidden;
|
|
534
|
+
}
|
|
535
|
+
.rg-tag {
|
|
536
|
+
overflow: hidden;
|
|
537
|
+
color: var(--rg-text-primary);
|
|
538
|
+
text-overflow: ellipsis;
|
|
539
|
+
white-space: nowrap;
|
|
540
|
+
}
|
|
541
|
+
.rg-bottom-section {
|
|
542
|
+
display: flex;
|
|
543
|
+
align-items: center;
|
|
544
|
+
width: auto;
|
|
545
|
+
min-height: 38px;
|
|
546
|
+
padding: 4px 7px;
|
|
547
|
+
border-top: .5px solid var(--rg-border-subtle);
|
|
548
|
+
}
|
|
549
|
+
.rg-bottom-section textarea {
|
|
550
|
+
flex: 1;
|
|
551
|
+
field-sizing: content;
|
|
552
|
+
min-width: 0;
|
|
553
|
+
min-height: 28px;
|
|
554
|
+
max-height: 84px;
|
|
555
|
+
margin: 0;
|
|
556
|
+
padding: 0;
|
|
557
|
+
resize: none;
|
|
558
|
+
outline: none;
|
|
559
|
+
border: 0;
|
|
560
|
+
border-radius: 0;
|
|
561
|
+
color: var(--rg-text-primary);
|
|
562
|
+
background: transparent;
|
|
563
|
+
box-shadow: none;
|
|
564
|
+
overflow-y: auto;
|
|
565
|
+
scrollbar-width: none;
|
|
566
|
+
font: 500 12px/16px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
567
|
+
overflow-wrap: break-word;
|
|
568
|
+
word-break: keep-all;
|
|
569
|
+
}
|
|
570
|
+
.rg-bottom-section textarea::placeholder { color: var(--rg-text-secondary); }
|
|
571
|
+
.rg-thread-label .rg-surface {
|
|
572
|
+
display: flex;
|
|
573
|
+
flex-direction: column;
|
|
574
|
+
width: min(264px, calc(100vw - 16px));
|
|
575
|
+
max-height: min(340px, calc(100vh - 16px));
|
|
576
|
+
max-height: min(340px, calc(100dvh - 16px));
|
|
577
|
+
}
|
|
578
|
+
.rg-thread-label .rg-tag-row { flex: none; gap: 8px; }
|
|
579
|
+
.rg-thread-close {
|
|
580
|
+
all: unset;
|
|
581
|
+
position: relative;
|
|
582
|
+
display: flex;
|
|
583
|
+
align-items: center;
|
|
584
|
+
justify-content: center;
|
|
585
|
+
flex: none;
|
|
586
|
+
width: 28px;
|
|
587
|
+
height: 28px;
|
|
588
|
+
margin-left: auto;
|
|
589
|
+
color: var(--rg-text-secondary);
|
|
590
|
+
cursor: pointer;
|
|
591
|
+
-webkit-tap-highlight-color: transparent;
|
|
592
|
+
transition: color 150ms var(--rg-ease-drawer), transform 400ms var(--rg-ease-spring);
|
|
593
|
+
}
|
|
594
|
+
.rg-thread-close::after {
|
|
595
|
+
position: absolute;
|
|
596
|
+
width: 44px;
|
|
597
|
+
height: 44px;
|
|
598
|
+
content: '';
|
|
599
|
+
}
|
|
600
|
+
.rg-thread-close svg { width: 10px; height: 10px; fill: currentColor; }
|
|
601
|
+
.rg-thread-close:hover { color: var(--rg-text-primary); }
|
|
602
|
+
.rg-thread-close:active {
|
|
603
|
+
transform: scale(.96);
|
|
604
|
+
transition-duration: 60ms;
|
|
605
|
+
}
|
|
606
|
+
.rg-thread-messages {
|
|
607
|
+
min-height: 0;
|
|
608
|
+
overflow: auto;
|
|
609
|
+
scrollbar-width: none;
|
|
610
|
+
border-top: .5px solid var(--rg-border-subtle);
|
|
611
|
+
}
|
|
612
|
+
.rg-thread-messages::-webkit-scrollbar { display: none; }
|
|
613
|
+
.rg-message { padding: 5px 7px; }
|
|
614
|
+
.rg-message + .rg-message { border-top: .5px solid var(--rg-border-subtle); }
|
|
615
|
+
.rg-message-meta {
|
|
616
|
+
overflow: hidden;
|
|
617
|
+
color: var(--rg-text-secondary);
|
|
618
|
+
font: 500 10px/14px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
619
|
+
text-overflow: ellipsis;
|
|
620
|
+
white-space: nowrap;
|
|
621
|
+
}
|
|
622
|
+
.rg-message-body {
|
|
623
|
+
margin: 2px 0 0;
|
|
624
|
+
color: var(--rg-text-primary);
|
|
625
|
+
font: 500 12px/16px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
626
|
+
overflow-wrap: anywhere;
|
|
627
|
+
white-space: pre-wrap;
|
|
628
|
+
}
|
|
629
|
+
.rg-thread-label .rg-bottom-section { flex: none; }
|
|
630
|
+
.rg-submit {
|
|
631
|
+
width: 28px;
|
|
632
|
+
height: 28px;
|
|
633
|
+
margin-left: 3px;
|
|
634
|
+
border-radius: 50%;
|
|
635
|
+
color: var(--rg-submit-fg);
|
|
636
|
+
background: var(--rg-submit-bg);
|
|
637
|
+
}
|
|
638
|
+
.rg-submit svg { width: 10px; height: 10px; fill: currentColor; }
|
|
639
|
+
.rg-submit:disabled { cursor: wait; opacity: .5; }
|
|
640
|
+
.rg-label-arrow {
|
|
641
|
+
position: absolute;
|
|
642
|
+
left: var(--rg-arrow-left, 50%);
|
|
643
|
+
display: block;
|
|
644
|
+
width: 16px;
|
|
645
|
+
height: 8px;
|
|
646
|
+
translate: -50% 0;
|
|
647
|
+
fill: var(--rg-panel-bg);
|
|
648
|
+
}
|
|
649
|
+
.rg-selection-label[data-side="below"] .rg-label-arrow {
|
|
650
|
+
top: -7px;
|
|
651
|
+
}
|
|
652
|
+
.rg-selection-label[data-side="above"] .rg-label-arrow {
|
|
653
|
+
bottom: -7px;
|
|
654
|
+
transform: rotate(180deg);
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
@media (hover: none), (pointer: coarse) {
|
|
658
|
+
.rg-thread-close::after,
|
|
659
|
+
.rg-submit::after {
|
|
660
|
+
width: 100%;
|
|
661
|
+
height: 100%;
|
|
662
|
+
}
|
|
663
|
+
.rg-thread-label .rg-tag-row,
|
|
664
|
+
.rg-thread-label .rg-bottom-section {
|
|
665
|
+
min-height: 44px;
|
|
666
|
+
padding-top: 0;
|
|
667
|
+
padding-bottom: 0;
|
|
668
|
+
}
|
|
669
|
+
.rg-thread-close,
|
|
670
|
+
.rg-submit {
|
|
671
|
+
width: 44px;
|
|
672
|
+
height: 44px;
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
@media (max-width: 640px) {
|
|
677
|
+
.rg-selection-label {
|
|
678
|
+
width: min(360px, calc(100vw - 16px));
|
|
679
|
+
}
|
|
680
|
+
.rg-thread-label .rg-tag-row,
|
|
681
|
+
.rg-thread-label .rg-bottom-section {
|
|
682
|
+
min-height: 44px;
|
|
683
|
+
}
|
|
684
|
+
.rg-thread-close,
|
|
685
|
+
.rg-submit {
|
|
686
|
+
width: 44px;
|
|
687
|
+
height: 44px;
|
|
688
|
+
}
|
|
689
|
+
.rg-toolbar[data-mobile-position="bottom-left"] {
|
|
690
|
+
top: auto;
|
|
691
|
+
right: auto;
|
|
692
|
+
bottom: max(16px, env(safe-area-inset-bottom));
|
|
693
|
+
left: max(16px, env(safe-area-inset-left));
|
|
694
|
+
translate: var(--rg-toolbar-offset-x) var(--rg-toolbar-offset-y);
|
|
695
|
+
}
|
|
696
|
+
.rg-toolbar[data-mobile-position="bottom-right"] {
|
|
697
|
+
top: auto;
|
|
698
|
+
right: max(16px, env(safe-area-inset-right));
|
|
699
|
+
bottom: max(16px, env(safe-area-inset-bottom));
|
|
700
|
+
left: auto;
|
|
701
|
+
translate: var(--rg-toolbar-offset-x) var(--rg-toolbar-offset-y);
|
|
702
|
+
}
|
|
703
|
+
.rg-toolbar[data-mobile-position][data-collapsed="true"] {
|
|
704
|
+
top: auto;
|
|
705
|
+
bottom: 0;
|
|
706
|
+
padding: 1px 3px;
|
|
707
|
+
border-radius: 10px 10px 0 0;
|
|
708
|
+
}
|
|
709
|
+
.rg-toolbar[data-dock-edge="left"][data-collapsed="true"],
|
|
710
|
+
.rg-toolbar[data-dock-edge="right"][data-collapsed="true"] {
|
|
711
|
+
padding: 3px 1px;
|
|
712
|
+
}
|
|
713
|
+
.rg-toolbar[data-mobile-position] .rg-collapse svg { transform: rotate(90deg); }
|
|
714
|
+
.rg-toolbar[data-mobile-position][data-collapsed="true"] .rg-collapse svg {
|
|
715
|
+
transform: rotate(-90deg);
|
|
716
|
+
}
|
|
717
|
+
.rg-toolbar[data-mobile-position] .rg-tooltip {
|
|
718
|
+
top: auto;
|
|
719
|
+
bottom: calc(100% + 10px);
|
|
720
|
+
}
|
|
721
|
+
.rg-toolbar[data-mobile-position] .rg-developer-status {
|
|
722
|
+
top: auto;
|
|
723
|
+
bottom: calc(100% + 8px);
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
@media (prefers-reduced-motion: reduce) {
|
|
728
|
+
.rg-toolbar, .rg-toolbar *, .rg-selection-label, .rg-selection-label * {
|
|
729
|
+
animation: none !important;
|
|
730
|
+
transition: none !important;
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
@supports (-webkit-touch-callout: none) {
|
|
735
|
+
.rg-bottom-section textarea { font-size: 16px; }
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
|
|
739
|
+
.rg-visually-hidden {
|
|
740
|
+
position: fixed;
|
|
741
|
+
width: 1px;
|
|
742
|
+
height: 1px;
|
|
743
|
+
padding: 0;
|
|
744
|
+
overflow: hidden;
|
|
745
|
+
clip: rect(0 0 0 0);
|
|
746
|
+
clip-path: inset(50%);
|
|
747
|
+
white-space: nowrap;
|
|
748
|
+
border: 0;
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
.rg-feedback-navigator-scrim {
|
|
752
|
+
display: none;
|
|
753
|
+
position: fixed;
|
|
754
|
+
inset: 0;
|
|
755
|
+
z-index: 2147483001;
|
|
756
|
+
pointer-events: auto;
|
|
757
|
+
background: rgba(0, 0, 0, .08);
|
|
758
|
+
touch-action: none;
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
.rg-feedback-navigator {
|
|
762
|
+
position: fixed;
|
|
763
|
+
right: auto;
|
|
764
|
+
bottom: calc(max(12px, env(safe-area-inset-bottom)) + 32px);
|
|
765
|
+
left: max(8px, calc(50% - 160px));
|
|
766
|
+
z-index: 2147483646;
|
|
767
|
+
display: flex;
|
|
768
|
+
flex-direction: column;
|
|
769
|
+
width: min(320px, calc(100vw - 16px));
|
|
770
|
+
max-height: min(380px, calc(100dvh - 58px));
|
|
771
|
+
overflow: hidden;
|
|
772
|
+
pointer-events: auto;
|
|
773
|
+
border: .5px solid var(--rg-border-subtle);
|
|
774
|
+
border-radius: 8px;
|
|
775
|
+
corner-shape: superellipse(1.25);
|
|
776
|
+
color: var(--rg-text-primary);
|
|
777
|
+
background: var(--rg-panel-bg);
|
|
778
|
+
box-shadow: var(--rg-shadow);
|
|
779
|
+
font: 500 13px/16px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
780
|
+
font-synthesis: none;
|
|
781
|
+
transform-origin: var(--rg-navigator-origin, 50% calc(100% + 8px));
|
|
782
|
+
}
|
|
783
|
+
.rg-feedback-navigator[data-motion="enter"] {
|
|
784
|
+
animation: rg-feedback-navigator-enter 220ms var(--rg-ease-spring) both;
|
|
785
|
+
}
|
|
786
|
+
.rg-feedback-navigator-detail {
|
|
787
|
+
position: absolute;
|
|
788
|
+
inset: 0;
|
|
789
|
+
z-index: 1;
|
|
790
|
+
display: flex;
|
|
791
|
+
min-width: 0;
|
|
792
|
+
min-height: 0;
|
|
793
|
+
background: var(--rg-panel-bg);
|
|
794
|
+
}
|
|
795
|
+
.rg-feedback-navigator[data-presentation="sheet"][data-detail-open="true"] {
|
|
796
|
+
height: min(360px, calc(100dvh - 96px));
|
|
797
|
+
}
|
|
798
|
+
.rg-feedback-navigator[data-presentation="sheet"][data-detail-open="true"]
|
|
799
|
+
> :not(.rg-feedback-navigator-detail) {
|
|
800
|
+
visibility: hidden;
|
|
801
|
+
pointer-events: none;
|
|
802
|
+
}
|
|
803
|
+
.rg-feedback-navigator-detail .rg-feedback-navigator-thread {
|
|
804
|
+
position: relative !important;
|
|
805
|
+
top: auto !important;
|
|
806
|
+
left: auto !important;
|
|
807
|
+
display: flex;
|
|
808
|
+
flex: 1;
|
|
809
|
+
width: 100%;
|
|
810
|
+
min-width: 0;
|
|
811
|
+
opacity: 1 !important;
|
|
812
|
+
filter: none;
|
|
813
|
+
transform: none !important;
|
|
814
|
+
}
|
|
815
|
+
.rg-feedback-navigator-detail .rg-feedback-navigator-thread .rg-surface {
|
|
816
|
+
display: flex;
|
|
817
|
+
flex: 1;
|
|
818
|
+
flex-direction: column;
|
|
819
|
+
width: 100%;
|
|
820
|
+
max-height: none;
|
|
821
|
+
border: 0;
|
|
822
|
+
border-radius: inherit;
|
|
823
|
+
}
|
|
824
|
+
.rg-feedback-navigator-detail .rg-thread-messages {
|
|
825
|
+
flex: 1;
|
|
826
|
+
}
|
|
827
|
+
.rg-thread-partial-notice {
|
|
828
|
+
padding: 6px 8px;
|
|
829
|
+
border-radius: 6px;
|
|
830
|
+
color: var(--rg-text-secondary);
|
|
831
|
+
background: var(--rg-surface-hover);
|
|
832
|
+
font: 500 10px/14px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
833
|
+
text-align: center;
|
|
834
|
+
}
|
|
835
|
+
.rg-feedback-navigator-detail .rg-label-arrow { display: none; }
|
|
836
|
+
.rg-feedback-navigator-detail .rg-feedback-navigator-back {
|
|
837
|
+
order: -1;
|
|
838
|
+
margin-right: 2px;
|
|
839
|
+
margin-left: 0;
|
|
840
|
+
}
|
|
841
|
+
.rg-feedback-navigator-detail .rg-feedback-navigator-back svg {
|
|
842
|
+
width: 16px;
|
|
843
|
+
height: 16px;
|
|
844
|
+
}
|
|
845
|
+
.rg-feedback-navigator-header {
|
|
846
|
+
display: flex;
|
|
847
|
+
align-items: center;
|
|
848
|
+
flex: none;
|
|
849
|
+
min-height: 30px;
|
|
850
|
+
padding: 3px 4px 2px 7px;
|
|
851
|
+
}
|
|
852
|
+
.rg-feedback-navigator-heading {
|
|
853
|
+
display: flex;
|
|
854
|
+
align-items: center;
|
|
855
|
+
min-width: 0;
|
|
856
|
+
gap: 4px;
|
|
857
|
+
}
|
|
858
|
+
.rg-feedback-navigator-title {
|
|
859
|
+
overflow: hidden;
|
|
860
|
+
margin: 0;
|
|
861
|
+
color: var(--rg-text-primary);
|
|
862
|
+
font: 500 12px/16px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
863
|
+
text-overflow: ellipsis;
|
|
864
|
+
white-space: nowrap;
|
|
865
|
+
}
|
|
866
|
+
.rg-feedback-navigator-total {
|
|
867
|
+
color: var(--rg-text-secondary);
|
|
868
|
+
font: 500 10px/14px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
869
|
+
font-variant-numeric: tabular-nums;
|
|
870
|
+
}
|
|
871
|
+
.rg-feedback-list-count {
|
|
872
|
+
position: absolute;
|
|
873
|
+
top: 1px;
|
|
874
|
+
right: 0;
|
|
875
|
+
display: grid;
|
|
876
|
+
place-items: center;
|
|
877
|
+
min-width: 13px;
|
|
878
|
+
height: 13px;
|
|
879
|
+
padding: 0 3px;
|
|
880
|
+
border: 1.5px solid var(--rg-panel-bg);
|
|
881
|
+
border-radius: 999px;
|
|
882
|
+
color: #fff;
|
|
883
|
+
background: var(--review-accent);
|
|
884
|
+
font: 700 8px/1 Geist, ui-sans-serif, system-ui, sans-serif;
|
|
885
|
+
font-variant-numeric: tabular-nums;
|
|
886
|
+
transform: translate(25%, -18%);
|
|
887
|
+
}
|
|
888
|
+
.rg-feedback-list-count:empty,
|
|
889
|
+
.rg-feedback-list-count[hidden] { display: none; }
|
|
890
|
+
|
|
891
|
+
.rg-feedback-navigator-close,
|
|
892
|
+
.rg-feedback-scope,
|
|
893
|
+
.rg-feedback-filter,
|
|
894
|
+
.rg-feedback-row,
|
|
895
|
+
.rg-feedback-navigator-retry,
|
|
896
|
+
.rg-feedback-navigator-exit-link,
|
|
897
|
+
.rg-feedback-navigator-exit-cancel,
|
|
898
|
+
.rg-feedback-navigator-exit-confirm {
|
|
899
|
+
all: unset;
|
|
900
|
+
box-sizing: border-box;
|
|
901
|
+
cursor: pointer;
|
|
902
|
+
-webkit-tap-highlight-color: transparent;
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
.rg-inline-error {
|
|
906
|
+
padding: 5px 8px;
|
|
907
|
+
border-top: .5px solid var(--rg-border-subtle);
|
|
908
|
+
color: var(--review-accent);
|
|
909
|
+
font: 500 10px/14px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
910
|
+
}
|
|
911
|
+
.rg-feedback-navigator-close {
|
|
912
|
+
position: relative;
|
|
913
|
+
display: flex;
|
|
914
|
+
align-items: center;
|
|
915
|
+
justify-content: center;
|
|
916
|
+
flex: none;
|
|
917
|
+
width: 22px;
|
|
918
|
+
height: 22px;
|
|
919
|
+
margin-left: auto;
|
|
920
|
+
border-radius: 6px;
|
|
921
|
+
color: var(--rg-text-secondary);
|
|
922
|
+
transition:
|
|
923
|
+
color 150ms var(--rg-ease-drawer),
|
|
924
|
+
background 150ms var(--rg-ease-drawer),
|
|
925
|
+
transform 400ms var(--rg-ease-spring);
|
|
926
|
+
}
|
|
927
|
+
.rg-feedback-navigator-close svg {
|
|
928
|
+
width: 14px;
|
|
929
|
+
height: 14px;
|
|
930
|
+
fill: currentColor;
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
.rg-feedback-filters {
|
|
934
|
+
display: flex;
|
|
935
|
+
align-items: center;
|
|
936
|
+
flex: none;
|
|
937
|
+
gap: 2px;
|
|
938
|
+
margin: 0 3px 3px;
|
|
939
|
+
}
|
|
940
|
+
.rg-feedback-scopes {
|
|
941
|
+
display: grid;
|
|
942
|
+
grid-template-columns: 1fr 1fr;
|
|
943
|
+
flex: none;
|
|
944
|
+
gap: 2px;
|
|
945
|
+
margin: 0 3px 3px;
|
|
946
|
+
padding: 2px;
|
|
947
|
+
border-radius: 8px;
|
|
948
|
+
background: var(--rg-surface-hover);
|
|
949
|
+
}
|
|
950
|
+
.rg-feedback-scope {
|
|
951
|
+
display: flex;
|
|
952
|
+
align-items: center;
|
|
953
|
+
justify-content: center;
|
|
954
|
+
min-width: 0;
|
|
955
|
+
min-height: 22px;
|
|
956
|
+
padding: 3px 6px;
|
|
957
|
+
gap: 5px;
|
|
958
|
+
border-radius: 6px;
|
|
959
|
+
color: var(--rg-text-secondary);
|
|
960
|
+
text-align: center;
|
|
961
|
+
transition:
|
|
962
|
+
color 150ms var(--rg-ease-drawer),
|
|
963
|
+
background 150ms var(--rg-ease-drawer),
|
|
964
|
+
transform 400ms var(--rg-ease-spring);
|
|
965
|
+
}
|
|
966
|
+
.rg-feedback-scope[aria-pressed="true"] {
|
|
967
|
+
color: var(--rg-text-primary);
|
|
968
|
+
background: var(--rg-panel-bg);
|
|
969
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
|
|
970
|
+
}
|
|
971
|
+
.rg-feedback-scope-count {
|
|
972
|
+
color: var(--rg-text-secondary);
|
|
973
|
+
font: 500 10px/14px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
974
|
+
font-variant-numeric: tabular-nums;
|
|
975
|
+
}
|
|
976
|
+
.rg-feedback-filter {
|
|
977
|
+
display: flex;
|
|
978
|
+
align-items: center;
|
|
979
|
+
min-width: 0;
|
|
980
|
+
min-height: 22px;
|
|
981
|
+
padding: 3px 5px;
|
|
982
|
+
gap: 4px;
|
|
983
|
+
border-radius: 6px;
|
|
984
|
+
color: var(--rg-text-secondary);
|
|
985
|
+
text-align: center;
|
|
986
|
+
transition:
|
|
987
|
+
color 150ms var(--rg-ease-drawer),
|
|
988
|
+
background 150ms var(--rg-ease-drawer),
|
|
989
|
+
transform 400ms var(--rg-ease-spring);
|
|
990
|
+
}
|
|
991
|
+
.rg-feedback-filter[aria-pressed="true"] {
|
|
992
|
+
color: var(--rg-text-primary);
|
|
993
|
+
background: var(--rg-surface-hover);
|
|
994
|
+
}
|
|
995
|
+
.rg-feedback-filter-label {
|
|
996
|
+
overflow: hidden;
|
|
997
|
+
text-overflow: ellipsis;
|
|
998
|
+
white-space: nowrap;
|
|
999
|
+
}
|
|
1000
|
+
.rg-feedback-filter-count {
|
|
1001
|
+
color: var(--rg-text-secondary);
|
|
1002
|
+
font: 500 10px/14px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
1003
|
+
font-variant-numeric: tabular-nums;
|
|
1004
|
+
}
|
|
1005
|
+
.rg-feedback-sort-label {
|
|
1006
|
+
overflow: hidden;
|
|
1007
|
+
margin-left: auto;
|
|
1008
|
+
padding-right: 4px;
|
|
1009
|
+
color: var(--rg-text-secondary);
|
|
1010
|
+
font: 500 9px/14px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
1011
|
+
text-overflow: ellipsis;
|
|
1012
|
+
white-space: nowrap;
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
.rg-feedback-navigator-content {
|
|
1016
|
+
min-height: 0;
|
|
1017
|
+
overflow: auto;
|
|
1018
|
+
overscroll-behavior: contain;
|
|
1019
|
+
scrollbar-color: var(--rg-border-subtle) transparent;
|
|
1020
|
+
scrollbar-width: thin;
|
|
1021
|
+
border-top: .5px solid var(--rg-border-subtle);
|
|
1022
|
+
}
|
|
1023
|
+
.rg-feedback-navigator-footer {
|
|
1024
|
+
display: flex;
|
|
1025
|
+
align-items: center;
|
|
1026
|
+
justify-content: flex-end;
|
|
1027
|
+
flex: none;
|
|
1028
|
+
min-height: 28px;
|
|
1029
|
+
padding: 3px 6px;
|
|
1030
|
+
gap: 8px;
|
|
1031
|
+
border-top: .5px solid var(--rg-border-subtle);
|
|
1032
|
+
}
|
|
1033
|
+
.rg-feedback-navigator-exit-link {
|
|
1034
|
+
min-height: 22px;
|
|
1035
|
+
padding: 0 4px;
|
|
1036
|
+
border-radius: 5px;
|
|
1037
|
+
color: var(--rg-text-secondary);
|
|
1038
|
+
font: 500 10px/22px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
1039
|
+
}
|
|
1040
|
+
.rg-feedback-navigator-exit-link:hover {
|
|
1041
|
+
color: var(--rg-text-primary);
|
|
1042
|
+
background: var(--rg-surface-hover);
|
|
1043
|
+
}
|
|
1044
|
+
.rg-feedback-navigator-exit-copy {
|
|
1045
|
+
display: grid;
|
|
1046
|
+
flex: 1;
|
|
1047
|
+
min-width: 0;
|
|
1048
|
+
gap: 1px;
|
|
1049
|
+
}
|
|
1050
|
+
.rg-feedback-navigator-exit-copy strong {
|
|
1051
|
+
color: var(--rg-text-primary);
|
|
1052
|
+
font: 600 10px/14px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
1053
|
+
}
|
|
1054
|
+
.rg-feedback-navigator-exit-copy span {
|
|
1055
|
+
overflow: hidden;
|
|
1056
|
+
color: var(--rg-text-secondary);
|
|
1057
|
+
font: 500 9px/13px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
1058
|
+
text-overflow: ellipsis;
|
|
1059
|
+
white-space: nowrap;
|
|
1060
|
+
}
|
|
1061
|
+
.rg-feedback-navigator-exit-actions {
|
|
1062
|
+
display: flex;
|
|
1063
|
+
flex: none;
|
|
1064
|
+
gap: 3px;
|
|
1065
|
+
}
|
|
1066
|
+
.rg-feedback-navigator-exit-cancel,
|
|
1067
|
+
.rg-feedback-navigator-exit-confirm {
|
|
1068
|
+
min-height: 22px;
|
|
1069
|
+
padding: 0 6px;
|
|
1070
|
+
border-radius: 5px;
|
|
1071
|
+
font: 600 10px/22px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
1072
|
+
}
|
|
1073
|
+
.rg-feedback-navigator-exit-cancel { color: var(--rg-text-secondary); }
|
|
1074
|
+
.rg-feedback-navigator-exit-cancel:hover {
|
|
1075
|
+
color: var(--rg-text-primary);
|
|
1076
|
+
background: var(--rg-surface-hover);
|
|
1077
|
+
}
|
|
1078
|
+
.rg-feedback-navigator-exit-confirm { color: #b52e35; }
|
|
1079
|
+
.rg-feedback-navigator-exit-confirm:hover { background: rgba(181, 46, 53, .08); }
|
|
1080
|
+
.rg-feedback-navigator-exit-link:focus-visible,
|
|
1081
|
+
.rg-feedback-navigator-exit-cancel:focus-visible,
|
|
1082
|
+
.rg-feedback-navigator-exit-confirm:focus-visible {
|
|
1083
|
+
outline: 2px solid var(--review-accent);
|
|
1084
|
+
outline-offset: 1px;
|
|
1085
|
+
}
|
|
1086
|
+
.rg-feedback-list {
|
|
1087
|
+
margin: 0;
|
|
1088
|
+
padding: 3px;
|
|
1089
|
+
list-style: none;
|
|
1090
|
+
}
|
|
1091
|
+
.rg-feedback-page-group + .rg-feedback-page-group {
|
|
1092
|
+
border-top: .5px solid var(--rg-border-subtle);
|
|
1093
|
+
}
|
|
1094
|
+
.rg-feedback-page-heading {
|
|
1095
|
+
position: sticky;
|
|
1096
|
+
top: 0;
|
|
1097
|
+
z-index: 1;
|
|
1098
|
+
display: flex;
|
|
1099
|
+
align-items: center;
|
|
1100
|
+
min-height: 24px;
|
|
1101
|
+
padding: 4px 8px 2px;
|
|
1102
|
+
gap: 5px;
|
|
1103
|
+
color: var(--rg-text-secondary);
|
|
1104
|
+
background: var(--rg-panel-bg);
|
|
1105
|
+
backdrop-filter: blur(8px);
|
|
1106
|
+
font: 600 10px/14px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
1107
|
+
}
|
|
1108
|
+
.rg-feedback-page-group[data-current-page="true"] .rg-feedback-page-heading {
|
|
1109
|
+
color: var(--rg-text-primary);
|
|
1110
|
+
}
|
|
1111
|
+
.rg-feedback-page-label {
|
|
1112
|
+
overflow: hidden;
|
|
1113
|
+
text-overflow: ellipsis;
|
|
1114
|
+
white-space: nowrap;
|
|
1115
|
+
}
|
|
1116
|
+
.rg-feedback-page-count {
|
|
1117
|
+
flex: none;
|
|
1118
|
+
color: var(--rg-text-secondary);
|
|
1119
|
+
font-variant-numeric: tabular-nums;
|
|
1120
|
+
}
|
|
1121
|
+
.rg-feedback-page-group .rg-feedback-list { padding-top: 0; }
|
|
1122
|
+
.rg-feedback-row {
|
|
1123
|
+
display: grid;
|
|
1124
|
+
grid-template-columns: 18px minmax(0, 1fr);
|
|
1125
|
+
align-items: start;
|
|
1126
|
+
width: 100%;
|
|
1127
|
+
min-height: 44px;
|
|
1128
|
+
padding: 5px 7px;
|
|
1129
|
+
gap: 5px;
|
|
1130
|
+
border-radius: 5px;
|
|
1131
|
+
color: var(--rg-text-primary);
|
|
1132
|
+
text-align: left;
|
|
1133
|
+
transition:
|
|
1134
|
+
background 150ms var(--rg-ease-drawer),
|
|
1135
|
+
opacity 150ms var(--rg-ease-drawer);
|
|
1136
|
+
}
|
|
1137
|
+
.rg-feedback-row[aria-current="true"] {
|
|
1138
|
+
background: var(--rg-surface-hover);
|
|
1139
|
+
box-shadow: inset 2px 0 var(--review-accent);
|
|
1140
|
+
}
|
|
1141
|
+
.rg-feedback-row[data-status="resolved"] .rg-feedback-row-copy {
|
|
1142
|
+
opacity: .68;
|
|
1143
|
+
}
|
|
1144
|
+
.rg-feedback-row-pin {
|
|
1145
|
+
display: grid;
|
|
1146
|
+
place-items: center;
|
|
1147
|
+
width: 18px;
|
|
1148
|
+
height: 18px;
|
|
1149
|
+
color: var(--rg-text-secondary);
|
|
1150
|
+
font: 600 9px/14px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
1151
|
+
font-variant-numeric: tabular-nums;
|
|
1152
|
+
}
|
|
1153
|
+
.rg-feedback-row-copy {
|
|
1154
|
+
display: flex;
|
|
1155
|
+
flex-direction: column;
|
|
1156
|
+
min-width: 0;
|
|
1157
|
+
gap: 2px;
|
|
1158
|
+
}
|
|
1159
|
+
.rg-feedback-row-body {
|
|
1160
|
+
display: -webkit-box;
|
|
1161
|
+
overflow: hidden;
|
|
1162
|
+
color: var(--rg-text-primary);
|
|
1163
|
+
overflow-wrap: anywhere;
|
|
1164
|
+
white-space: pre-wrap;
|
|
1165
|
+
-webkit-box-orient: vertical;
|
|
1166
|
+
-webkit-line-clamp: 2;
|
|
1167
|
+
}
|
|
1168
|
+
.rg-feedback-row-context {
|
|
1169
|
+
overflow: hidden;
|
|
1170
|
+
color: var(--rg-text-secondary);
|
|
1171
|
+
font: 500 10px/14px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
1172
|
+
text-overflow: ellipsis;
|
|
1173
|
+
white-space: nowrap;
|
|
1174
|
+
}
|
|
1175
|
+
.rg-feedback-row-context[data-current-page="true"] {
|
|
1176
|
+
color: var(--rg-text-primary);
|
|
1177
|
+
}
|
|
1178
|
+
.rg-feedback-row-detail {
|
|
1179
|
+
display: flex;
|
|
1180
|
+
align-items: center;
|
|
1181
|
+
min-width: 0;
|
|
1182
|
+
color: var(--rg-text-secondary);
|
|
1183
|
+
}
|
|
1184
|
+
.rg-feedback-row-meta {
|
|
1185
|
+
overflow: hidden;
|
|
1186
|
+
color: var(--rg-text-secondary);
|
|
1187
|
+
font: 500 10px/14px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
1188
|
+
text-overflow: ellipsis;
|
|
1189
|
+
white-space: nowrap;
|
|
1190
|
+
}
|
|
1191
|
+
.rg-feedback-row-trailing {
|
|
1192
|
+
display: flex;
|
|
1193
|
+
align-items: center;
|
|
1194
|
+
min-width: 0;
|
|
1195
|
+
margin-left: 6px;
|
|
1196
|
+
gap: 6px;
|
|
1197
|
+
color: var(--rg-text-secondary);
|
|
1198
|
+
font: 500 10px/14px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
1199
|
+
white-space: nowrap;
|
|
1200
|
+
}
|
|
1201
|
+
.rg-feedback-row-move {
|
|
1202
|
+
display: inline-flex;
|
|
1203
|
+
align-items: center;
|
|
1204
|
+
gap: 2px;
|
|
1205
|
+
color: var(--review-accent);
|
|
1206
|
+
}
|
|
1207
|
+
.rg-feedback-row-move svg {
|
|
1208
|
+
width: 11px;
|
|
1209
|
+
height: 11px;
|
|
1210
|
+
}
|
|
1211
|
+
.rg-feedback-row-location-missing {
|
|
1212
|
+
display: flex;
|
|
1213
|
+
align-items: center;
|
|
1214
|
+
justify-content: center;
|
|
1215
|
+
width: 12px;
|
|
1216
|
+
height: 12px;
|
|
1217
|
+
color: var(--review-accent);
|
|
1218
|
+
}
|
|
1219
|
+
.rg-feedback-row-location-missing svg {
|
|
1220
|
+
width: 12px;
|
|
1221
|
+
height: 12px;
|
|
1222
|
+
}
|
|
1223
|
+
.rg-feedback-row-replies,
|
|
1224
|
+
.rg-feedback-row-status {
|
|
1225
|
+
display: inline-flex;
|
|
1226
|
+
align-items: center;
|
|
1227
|
+
min-height: 14px;
|
|
1228
|
+
}
|
|
1229
|
+
.rg-feedback-row-status {
|
|
1230
|
+
width: 12px;
|
|
1231
|
+
height: 12px;
|
|
1232
|
+
}
|
|
1233
|
+
.rg-feedback-row-status svg {
|
|
1234
|
+
width: 12px;
|
|
1235
|
+
height: 12px;
|
|
1236
|
+
}
|
|
1237
|
+
|
|
1238
|
+
.rg-feedback-navigator-state,
|
|
1239
|
+
.rg-feedback-navigator-empty {
|
|
1240
|
+
display: flex;
|
|
1241
|
+
align-items: center;
|
|
1242
|
+
justify-content: center;
|
|
1243
|
+
min-height: 52px;
|
|
1244
|
+
padding: 10px;
|
|
1245
|
+
color: var(--rg-text-secondary);
|
|
1246
|
+
text-align: center;
|
|
1247
|
+
}
|
|
1248
|
+
.rg-feedback-navigator-state[data-state="reconnecting"] {
|
|
1249
|
+
min-height: 0;
|
|
1250
|
+
padding: 5px 8px;
|
|
1251
|
+
border-bottom: .5px solid var(--rg-border-subtle);
|
|
1252
|
+
color: var(--rg-text-secondary);
|
|
1253
|
+
background: var(--rg-surface-hover);
|
|
1254
|
+
font: 500 10px/14px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
1255
|
+
}
|
|
1256
|
+
.rg-feedback-navigator-state[data-state="loading"]::before {
|
|
1257
|
+
width: 12px;
|
|
1258
|
+
height: 12px;
|
|
1259
|
+
margin-right: 8px;
|
|
1260
|
+
border: 1.5px solid var(--rg-border-subtle);
|
|
1261
|
+
border-top-color: var(--rg-text-secondary);
|
|
1262
|
+
border-radius: 50%;
|
|
1263
|
+
content: '';
|
|
1264
|
+
animation: rg-feedback-spinner 700ms linear infinite;
|
|
1265
|
+
}
|
|
1266
|
+
.rg-feedback-navigator-state[data-state="error"] {
|
|
1267
|
+
flex-wrap: wrap;
|
|
1268
|
+
gap: 8px;
|
|
1269
|
+
}
|
|
1270
|
+
.rg-feedback-navigator-retry {
|
|
1271
|
+
display: inline-flex;
|
|
1272
|
+
align-items: center;
|
|
1273
|
+
justify-content: center;
|
|
1274
|
+
min-height: 17px;
|
|
1275
|
+
padding: 1px 4px;
|
|
1276
|
+
border: .5px solid var(--rg-border-subtle);
|
|
1277
|
+
border-radius: 4px;
|
|
1278
|
+
color: var(--rg-text-primary);
|
|
1279
|
+
background: var(--rg-panel-bg);
|
|
1280
|
+
transition:
|
|
1281
|
+
background 150ms var(--rg-ease-drawer),
|
|
1282
|
+
transform 400ms var(--rg-ease-spring);
|
|
1283
|
+
}
|
|
1284
|
+
|
|
1285
|
+
.rg-feedback-list-tool:focus-visible,
|
|
1286
|
+
.rg-feedback-navigator-close:focus-visible,
|
|
1287
|
+
.rg-feedback-scope:focus-visible,
|
|
1288
|
+
.rg-feedback-filter:focus-visible,
|
|
1289
|
+
.rg-feedback-row:focus-visible,
|
|
1290
|
+
.rg-feedback-navigator-retry:focus-visible {
|
|
1291
|
+
outline: 2px solid var(--review-accent);
|
|
1292
|
+
outline-offset: 2px;
|
|
1293
|
+
}
|
|
1294
|
+
.rg-feedback-row:focus-visible {
|
|
1295
|
+
outline-offset: -2px;
|
|
1296
|
+
}
|
|
1297
|
+
|
|
1298
|
+
@media (hover: hover) and (pointer: fine) {
|
|
1299
|
+
.rg-feedback-navigator-close:hover,
|
|
1300
|
+
.rg-feedback-scope:hover,
|
|
1301
|
+
.rg-feedback-filter:hover,
|
|
1302
|
+
.rg-feedback-navigator-retry:hover {
|
|
1303
|
+
color: var(--rg-text-primary);
|
|
1304
|
+
background: var(--rg-surface-hover);
|
|
1305
|
+
}
|
|
1306
|
+
.rg-feedback-row:hover { background: var(--rg-surface-hover); }
|
|
1307
|
+
.rg-feedback-navigator-close:active,
|
|
1308
|
+
.rg-feedback-scope:active,
|
|
1309
|
+
.rg-feedback-filter:active,
|
|
1310
|
+
.rg-feedback-navigator-retry:active {
|
|
1311
|
+
transform: scale(.96);
|
|
1312
|
+
transition-duration: 60ms;
|
|
1313
|
+
}
|
|
1314
|
+
.rg-feedback-row:active {
|
|
1315
|
+
background: var(--rg-surface-hover);
|
|
1316
|
+
transform: translateY(1px);
|
|
1317
|
+
transition-duration: 60ms;
|
|
1318
|
+
}
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1321
|
+
@media (max-width: 640px) {
|
|
1322
|
+
.pin::after {
|
|
1323
|
+
top: 50%;
|
|
1324
|
+
left: 50%;
|
|
1325
|
+
width: 44px;
|
|
1326
|
+
height: 44px;
|
|
1327
|
+
transform: translate(-50%, -50%);
|
|
1328
|
+
}
|
|
1329
|
+
.rg-feedback-navigator-scrim {
|
|
1330
|
+
display: block;
|
|
1331
|
+
}
|
|
1332
|
+
.rg-feedback-navigator-scrim[data-motion="enter"] {
|
|
1333
|
+
animation: rg-feedback-scrim-enter 160ms ease-out both;
|
|
1334
|
+
}
|
|
1335
|
+
.rg-feedback-navigator {
|
|
1336
|
+
right: auto;
|
|
1337
|
+
bottom: calc(max(16px, env(safe-area-inset-bottom)) + 38px);
|
|
1338
|
+
left: 50%;
|
|
1339
|
+
width: min(360px, calc(100vw - 16px));
|
|
1340
|
+
max-height: min(70dvh, 480px);
|
|
1341
|
+
border-radius: 14px;
|
|
1342
|
+
transform: translateX(-50%);
|
|
1343
|
+
}
|
|
1344
|
+
.rg-feedback-navigator[data-motion="enter"] {
|
|
1345
|
+
animation: rg-feedback-sheet-enter 220ms var(--rg-ease-drawer) both;
|
|
1346
|
+
}
|
|
1347
|
+
.rg-feedback-navigator-header { min-height: 44px; padding-top: 5px; }
|
|
1348
|
+
.rg-feedback-navigator-content { -webkit-overflow-scrolling: touch; }
|
|
1349
|
+
.rg-feedback-scope { min-height: 44px; }
|
|
1350
|
+
.rg-feedback-filter { min-height: 44px; }
|
|
1351
|
+
.rg-feedback-row { min-height: 56px; padding-top: 8px; padding-bottom: 8px; }
|
|
1352
|
+
.rg-feedback-navigator-close,
|
|
1353
|
+
.rg-feedback-navigator-retry,
|
|
1354
|
+
.rg-feedback-navigator-exit-link,
|
|
1355
|
+
.rg-feedback-navigator-exit-cancel,
|
|
1356
|
+
.rg-feedback-navigator-exit-confirm { min-width: 44px; min-height: 44px; }
|
|
1357
|
+
}
|
|
1358
|
+
|
|
1359
|
+
@media (hover: none), (pointer: coarse) {
|
|
1360
|
+
.rg-feedback-list-tool svg {
|
|
1361
|
+
width: 14px;
|
|
1362
|
+
height: 14px;
|
|
1363
|
+
}
|
|
1364
|
+
.pin::after {
|
|
1365
|
+
top: 50%;
|
|
1366
|
+
left: 50%;
|
|
1367
|
+
width: 44px;
|
|
1368
|
+
height: 44px;
|
|
1369
|
+
transform: translate(-50%, -50%);
|
|
1370
|
+
}
|
|
1371
|
+
.rg-feedback-filter { min-height: 44px; }
|
|
1372
|
+
.rg-feedback-scope { min-height: 44px; }
|
|
1373
|
+
.rg-feedback-row { min-height: 56px; }
|
|
1374
|
+
.rg-feedback-navigator-close,
|
|
1375
|
+
.rg-feedback-navigator-retry,
|
|
1376
|
+
.rg-feedback-navigator-exit-link,
|
|
1377
|
+
.rg-feedback-navigator-exit-cancel,
|
|
1378
|
+
.rg-feedback-navigator-exit-confirm { min-width: 44px; min-height: 44px; }
|
|
1379
|
+
}
|
|
1380
|
+
|
|
1381
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1382
|
+
.pin,
|
|
1383
|
+
.rg-feedback-navigator-scrim,
|
|
1384
|
+
.rg-feedback-navigator,
|
|
1385
|
+
.rg-feedback-navigator *,
|
|
1386
|
+
.rg-feedback-list-tool {
|
|
1387
|
+
animation: none !important;
|
|
1388
|
+
transition: none !important;
|
|
1389
|
+
}
|
|
1390
|
+
}
|
|
1391
|
+
|
|
1392
|
+
@media (forced-colors: active) {
|
|
1393
|
+
.pin,
|
|
1394
|
+
.pin[data-resolved="true"],
|
|
1395
|
+
.pin[data-resolved="true"][data-active="true"] {
|
|
1396
|
+
border-color: Canvas;
|
|
1397
|
+
color: Canvas;
|
|
1398
|
+
background: CanvasText;
|
|
1399
|
+
box-shadow: 0 0 0 1px CanvasText;
|
|
1400
|
+
}
|
|
1401
|
+
.pin[data-active="true"],
|
|
1402
|
+
.pin:focus-visible {
|
|
1403
|
+
outline: 3px solid Highlight;
|
|
1404
|
+
outline-offset: 3px;
|
|
1405
|
+
}
|
|
1406
|
+
}
|
|
1407
|
+
|
|
1408
|
+
@keyframes rg-feedback-navigator-enter {
|
|
1409
|
+
from { opacity: 0; transform: translateY(2px) scale(.92); }
|
|
1410
|
+
to { opacity: 1; transform: translateY(0) scale(1); }
|
|
1411
|
+
}
|
|
1412
|
+
@keyframes rg-feedback-sheet-enter {
|
|
1413
|
+
from { opacity: 0; transform: translate(-50%, 12px) scale(.98); }
|
|
1414
|
+
to { opacity: 1; transform: translate(-50%, 0) scale(1); }
|
|
1415
|
+
}
|
|
1416
|
+
@keyframes rg-feedback-scrim-enter {
|
|
1417
|
+
from { opacity: 0; }
|
|
1418
|
+
to { opacity: 1; }
|
|
1419
|
+
}
|
|
1420
|
+
@keyframes rg-feedback-spinner {
|
|
1421
|
+
to { transform: rotate(360deg); }
|
|
1422
|
+
}
|
|
1423
|
+
|
|
1424
|
+
|
|
1425
|
+
.rg-collaboration-cursors { position: fixed; inset: 0; z-index: 2147483645; pointer-events: none; }
|
|
1426
|
+
.rg-collaboration-cursor {
|
|
1427
|
+
position: fixed; left: 0; top: 0;
|
|
1428
|
+
transform: translate3d(calc(var(--rg-peer-x) - 2px), calc(var(--rg-peer-y) - 2px), 0);
|
|
1429
|
+
color: var(--rg-peer-color); will-change: transform;
|
|
1430
|
+
}
|
|
1431
|
+
.rg-collaboration-cursor-pointer {
|
|
1432
|
+
width: 14px; height: 18px; background: currentColor;
|
|
1433
|
+
clip-path: polygon(0 0, 100% 68%, 58% 72%, 40% 100%);
|
|
1434
|
+
filter: drop-shadow(0 1px 1px rgba(0,0,0,.28));
|
|
1435
|
+
}
|
|
1436
|
+
.rg-collaboration-cursor-label {
|
|
1437
|
+
margin: -1px 0 0 11px; padding: 2px 6px; border-radius: 0 6px 6px 6px;
|
|
1438
|
+
color: #fff; background: var(--rg-peer-color); white-space: nowrap;
|
|
1439
|
+
font: 600 11px/16px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
1440
|
+
text-shadow: 0 1px 1px rgba(0,0,0,.18);
|
|
1441
|
+
}
|
|
1442
|
+
.rg-collaboration-cursor-chat {
|
|
1443
|
+
position: absolute; left: 11px; top: 22px; width: max-content;
|
|
1444
|
+
max-width: min(260px, calc(100vw - 24px)); padding: 7px 9px;
|
|
1445
|
+
border-radius: 3px 10px 10px 10px;
|
|
1446
|
+
color: #fff; background: var(--rg-peer-color); white-space: pre-wrap; overflow-wrap: anywhere;
|
|
1447
|
+
font: 600 13px/18px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
1448
|
+
box-shadow: 0 3px 14px rgba(0,0,0,.2);
|
|
1449
|
+
}
|
|
1450
|
+
.rg-collaboration-cursor[data-horizontal="left"] .rg-collaboration-cursor-chat {
|
|
1451
|
+
right: 12px; left: auto; border-radius: 10px 3px 10px 10px;
|
|
1452
|
+
}
|
|
1453
|
+
.rg-collaboration-cursor[data-vertical="above"] .rg-collaboration-cursor-chat {
|
|
1454
|
+
top: auto; bottom: 20px; border-bottom-left-radius: 3px; border-top-left-radius: 10px;
|
|
1455
|
+
}
|
|
1456
|
+
.rg-collaboration-cursor-chat-page {
|
|
1457
|
+
margin-bottom: 2px; opacity: .72; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
|
|
1458
|
+
font: 500 10px/14px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
1459
|
+
}
|
|
1460
|
+
.rg-collaboration-cursor-chat-body { white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
1461
|
+
.rg-collaboration-participants {
|
|
1462
|
+
all: unset; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center;
|
|
1463
|
+
flex: none; width: 28px; height: 28px; color: var(--rg-text-secondary);
|
|
1464
|
+
font: 600 10px/1 Geist, ui-sans-serif, system-ui, sans-serif;
|
|
1465
|
+
}
|
|
1466
|
+
.rg-collaboration-participants[hidden] { display: none; }
|
|
1467
|
+
.rg-cursor-chat-mobile-trigger {
|
|
1468
|
+
all: unset; box-sizing: border-box; display: none; align-items: center; justify-content: center;
|
|
1469
|
+
flex: none; min-width: 44px; height: 44px; padding: 0 8px; cursor: pointer;
|
|
1470
|
+
color: var(--rg-text-secondary); font: 600 11px/1 Geist, ui-sans-serif, system-ui, sans-serif;
|
|
1471
|
+
}
|
|
1472
|
+
.rg-cursor-chat-mobile-trigger:focus-visible {
|
|
1473
|
+
outline: 2px solid var(--review-accent); outline-offset: 2px;
|
|
1474
|
+
}
|
|
1475
|
+
.rg-cursor-chat-composer {
|
|
1476
|
+
position: fixed; z-index: 2147483646; display: grid; gap: 5px;
|
|
1477
|
+
width: min(260px, calc(100vw - 24px)); padding: 7px; border: 0;
|
|
1478
|
+
border-left: 3px solid var(--rg-local-color); border-radius: 5px 13px 13px 13px;
|
|
1479
|
+
color: var(--rg-text-primary); background: var(--rg-panel-bg);
|
|
1480
|
+
box-shadow: 0 8px 28px rgba(0,0,0,.22), 0 0 0 1px var(--rg-border-subtle);
|
|
1481
|
+
font: 13px/18px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
1482
|
+
}
|
|
1483
|
+
.rg-cursor-chat-composer::before {
|
|
1484
|
+
position: absolute; top: 8px; left: -6px; width: 9px; height: 9px;
|
|
1485
|
+
border-radius: 2px; background: var(--rg-local-color); content: ''; transform: rotate(45deg);
|
|
1486
|
+
}
|
|
1487
|
+
.rg-cursor-chat-composer[data-horizontal="left"] {
|
|
1488
|
+
border-right: 3px solid var(--rg-local-color); border-left: 0;
|
|
1489
|
+
border-radius: 13px 5px 13px 13px;
|
|
1490
|
+
}
|
|
1491
|
+
.rg-cursor-chat-composer[data-horizontal="left"]::before { right: -6px; left: auto; }
|
|
1492
|
+
.rg-cursor-chat-composer[hidden] { display: none; }
|
|
1493
|
+
.rg-cursor-chat-header { display: flex; align-items: center; min-width: 0; padding: 1px 6px 3px; gap: 7px; }
|
|
1494
|
+
.rg-cursor-chat-header strong { overflow: hidden; color: var(--rg-local-color); font: 650 11px/15px Geist, ui-sans-serif, system-ui, sans-serif; text-overflow: ellipsis; white-space: nowrap; }
|
|
1495
|
+
.rg-cursor-chat-header span { margin-left: auto; color: var(--rg-text-secondary); font: 500 9px/13px Geist, ui-sans-serif, system-ui, sans-serif; white-space: nowrap; }
|
|
1496
|
+
.rg-cursor-chat-preview { padding: 4px 7px; border-radius: 8px; color: var(--rg-text-primary); background: color-mix(in srgb, var(--rg-local-color) 10%, transparent); overflow-wrap: anywhere; }
|
|
1497
|
+
.rg-cursor-chat-preview[hidden] { display: none; }
|
|
1498
|
+
.rg-cursor-chat-input {
|
|
1499
|
+
all: unset; box-sizing: border-box; width: 100%; min-height: 32px; padding: 6px 8px;
|
|
1500
|
+
border-radius: 8px; color: var(--rg-text-primary); background: var(--rg-panel-secondary);
|
|
1501
|
+
font: inherit;
|
|
1502
|
+
}
|
|
1503
|
+
.rg-cursor-chat-input::placeholder { color: var(--rg-text-secondary); }
|
|
1504
|
+
.rg-cursor-chat-input:focus, .rg-cursor-chat-input:focus-visible { outline: none; }
|
|
1505
|
+
.rg-cursor-chat-announcements {
|
|
1506
|
+
position: fixed; width: 1px; height: 1px; overflow: hidden;
|
|
1507
|
+
clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
|
|
1508
|
+
}
|
|
1509
|
+
@media (pointer: coarse) {
|
|
1510
|
+
.rg-cursor-chat-mobile-trigger { display: inline-flex; }
|
|
1511
|
+
.rg-cursor-chat-composer {
|
|
1512
|
+
right: 12px; bottom: 64px; left: 12px !important; top: auto !important; width: auto;
|
|
1513
|
+
border-right: 0; border-left: 3px solid var(--rg-local-color); border-radius: 5px 13px 13px 13px;
|
|
1514
|
+
}
|
|
1515
|
+
.rg-cursor-chat-composer::before { right: auto; left: -6px; }
|
|
1516
|
+
}
|
|
1517
|
+
`;let n=Z(`highlight`);n.dataset.slot=`highlight`;let r=Z(`region`);r.dataset.slot=`region`;let i=Z(`pins`);i.dataset.slot=`pins`;let a=Z(`panels`);a.dataset.slot=`panels`;let o=Z(`navigator-slot`);o.dataset.slot=`navigator`,o.id=Hn,o.addEventListener(`click`,this.#Ke),o.addEventListener(`keydown`,this.#qe);let s=Z(`rg-visually-hidden`);s.dataset.slot=`announcer`,s.setAttribute(`aria-live`,`polite`),s.setAttribute(`aria-atomic`,`true`);let c=Xe({developerGrab:this.#t?.developerTools?.codeContextCopy===!0}),l=mr(this.#t?.position);c.dataset.position=l,c.dataset.mobilePosition=hr(l),c.style.setProperty(`--rg-toolbar-offset-x`,`${_r(this.#t?.offset?.x)}px`),c.style.setProperty(`--rg-toolbar-offset-y`,`${_r(this.#t?.offset?.y)}px`),c.querySelector(`.rg-toolbar-actions`)?.append(It(0,{controlsId:Hn,presentation:this.#Fe()})),c.querySelector(`.rg-feedback-tool`)?.addEventListener(`click`,()=>{if(!this.#Ee()){this.#x||this.#ke(!0),this.#Ze(this.#De());return}if(this.#x&&this.#ke(!1,{restoreFocus:!1,restoreComposer:!0}))return;if(this.#g){this.#Ze(`피드백을 저장하는 중입니다.`);return}if(this.#c&&this.#l===`react-grab`&&this.#_){this.#we(!1);return}let e=this.#c&&this.#l===`feedback`;this.#we(!e,`feedback`)}),c.querySelector(`.rg-developer-grab-tool`)?.addEventListener(`click`,()=>{if(this.#U){this.#Ze(`코드 컨텍스트를 복사하는 중입니다.`);return}if(this.#g){this.#Ze(`피드백을 저장하는 중입니다.`);return}this.#x&&this.#ke(!1,{restoreFocus:!1});let e=this.#c&&this.#l===`react-grab`;e||this.#Ae(),this.#we(!e,`react-grab`)}),c.querySelector(`.rg-feedback-list-tool`)?.addEventListener(`click`,()=>{this.#ke(!this.#x)}),c.querySelector(`.rg-collapse`)?.addEventListener(`click`,()=>{let e=c.dataset.collapsed===`true`;!e&&this.#c&&this.#we(!1),!e&&this.#x&&this.#ke(!1,{restoreFocus:!1}),ht(c,!e)}),this.#e.append(t,n,r,i,a,o,s,c),this.#t&&this.#F&>({toolbar:c,position:l,offset:{x:_r(this.#t.offset?.x),y:_r(this.#t.offset?.y)},storageKey:ct(this.#t.session.projectId,this.#t.session.reviewerId),signal:this.#F.signal,onDragStart:()=>{this.#c&&this.#we(!1),this.#x&&this.#ke(!1,{restoreFocus:!1})}})}#xe(){let e=this.#t?.collaboration,t=e?.repository;if(!this.#t||!t||!e.cursors&&!e.chat)return;let n=e.roomId??e.scopeId;this.#i=He({root:this.#e,pageId:this.#t.pageId,pathname:vr(window.location.pathname),roomId:n,session:this.#t.session,repository:t,cursors:e.cursors,chat:e.chat,canOpenChat:()=>this.#Se(),onFailure:e=>{e.type===`access-lost`?(this.#i?.stop(),this.#i=null,this.#pe(e)):this.#Ze(`실시간 협업 연결이 불안정합니다. 다시 연결하는 중입니다.`)}}),this.#i.start()}#Se(){return this.#g||this.#U?!1:(this.#c&&this.#we(!1),this.#x&&this.#ke(!1,{restoreFocus:!1,restoreComposer:!1}),this.#f&&(this.#Ae(),this.#Vt()),this.#v&&this.#jt(!1,!1),!this.#c&&!this.#x&&!this.#f&&!this.#v)}#Ce(){this.#Rt(),this.#Vt(),this.#Me(),this.#Pe(),this.#Te(),this.#Ot(),this.#At()}#we(e,t=`feedback`){let n=this.#l;if(e&&(this.#N+=1),e&&t===`feedback`&&!this.#Ee()){this.#x||this.#ke(!0),this.#Ze(this.#De());return}if(e&&t===`feedback`&&this.#g){this.#Ze(`피드백을 저장하는 중입니다.`);return}if(e&&t===`feedback`&&this.#_){this.#v?this.#jt(!1):this.#je(),this.#Ze(`작성 중인 피드백을 복원했습니다.`);return}if(e&&this.#c){this.#l=t,this.#u=null,this.#d=null,this.#Ft(),this.#Te();return}this.#c=e,this.#l=e?t:null,this.#Te(),e?(this.#v=null,this.#y=null,this.#f=null,this.#p=``,this.#m=``,this.#h=null,this.#Ft(),document.addEventListener(`pointermove`,this.#et,!0),document.addEventListener(`pointerdown`,this.#tt,!0),document.addEventListener(`pointerup`,this.#nt,!0),document.addEventListener(`pointercancel`,this.#rt,!0),document.addEventListener(`keydown`,this.#it,!0),this.#R={value:document.body.style.getPropertyValue(`cursor`),priority:document.body.style.getPropertyPriority(`cursor`)},document.body.style.setProperty(`cursor`,`crosshair`),this.#I=fe(this.#t?.styleNonce),queueMicrotask(()=>this.#dt())):(document.removeEventListener(`pointermove`,this.#et,!0),document.removeEventListener(`pointerdown`,this.#tt,!0),document.removeEventListener(`pointerup`,this.#nt,!0),document.removeEventListener(`pointercancel`,this.#rt,!0),document.removeEventListener(`keydown`,this.#it,!0),this.#R&&=(Tr(document.body,`cursor`,this.#R),null),this.#I?.(),this.#I=null,this.#u=null,this.#d=null,this.#Ft()),this.#Vt(),!e&&n===`react-grab`&&this.#je()}#Te(){let e=this.#e.querySelector(`.rg-toolbar`),t=this.#e.querySelector(`[data-slot="pins"]`),n=this.#e.querySelector(`.rg-feedback-tool`),r=this.#e.querySelector(`.rg-developer-grab-tool`),i=this.#c&&this.#l===`feedback`,a=this.#c&&this.#l===`react-grab`;e&&(e.dataset.selecting=String(this.#c)),t&&(t.dataset.selectionSuppressed=String(this.#c),t.toggleAttribute(`inert`,this.#c),t.setAttribute(`aria-hidden`,String(this.#c))),n&&(n.setAttribute(`aria-pressed`,String(i)),n.setAttribute(`aria-label`,i?`선택 취소`:`피드백 위치 선택`),n.setAttribute(`aria-disabled`,String(!this.#Ee()))),r&&(r.setAttribute(`aria-pressed`,String(a)),r.setAttribute(`aria-label`,a?`코드 선택 취소`:`React Grab 코드 선택`),r.setAttribute(`aria-disabled`,String(this.#U)))}#Ee(){return!this.#k&&this.#E===`ready`&&this.#a!==null}#De(){return this.#k?`다시 인증하세요.`:this.#E===`loading`?`불러오는 중입니다.`:`다시 시도하세요.`}#Oe(){return this.#p.trim().length>0||!!this.#_?.body.trim().length||[...this.#te.values()].some(e=>e.trim().length>0)||this.#h!==null||this.#ie.size>0}#ke(e,t={}){let n=t.restoreFocus??!0,r=t.restoreComposer??!0;if(e===this.#x)return!1;if(e)return this.#N+=1,this.#c&&this.#we(!1),this.#Ae(),this.#T=`idle`,this.#x=!0,this.#Vt(),this.#Me(),this.#Pe(),queueMicrotask(()=>this.#Re()),!1;(t.cancelNavigation??!0)&&(this.#N+=1),this.#x=!1,this.#T=`idle`,this.#L?.(),this.#L=null,this.#Vt(),this.#Me(),this.#Pe(),queueMicrotask(()=>this.#Mt());let i=r&&this.#je();return n&&!i&&queueMicrotask(()=>this.#ze()?.focus()),i}#Ae(){if(!this.#f)return!1;let e=this.#e.querySelector(`.rg-selection-label:not(.rg-thread-label) textarea`);return this.#_={target:this.#f,body:e?.value??this.#p},this.#f=null,this.#p=``,!0}#je(){if(!this.#_||this.#x||this.#v)return!1;let e=this.#_;return this.#_=null,this.#f=e.target,this.#p=e.body,this.#Vt(),queueMicrotask(()=>{let e=this.#e.querySelector(`.rg-selection-label:not(.rg-thread-label) textarea`);e?.focus(),e?.setSelectionRange(e.value.length,e.value.length)}),!0}#Me(){let e=this.#e.querySelector(`[data-slot="navigator"]`);if(!e)return;this.#T===`saving`&&!this.#g&&this.#ne.size===0&&(this.#T=this.#Oe()?`draft-warning`:`confirm`);let t=e.querySelector(`.rg-feedback-navigator`),n=t?.querySelector(`.rg-feedback-navigator-content`),r=t?.dataset.presentation,i=t?`refresh`:`enter`,a=t?.dataset.presentation===`sheet`&&t.dataset.detailOpen===`true`,o=this.#x&&!!this.#v&&this.#Fe()===`sheet`,s=n&&!a&&!o?n.scrollTop:this.#S;this.#S=s;let c=this.#e.activeElement instanceof HTMLElement?this.#e.activeElement:null,l=c?.closest(`.rg-feedback-row[data-comment-id]`)?.dataset.commentId,u=c?.closest(`[data-feedback-filter]`)?.dataset.feedbackFilter,d=c?.closest(`[data-feedback-scope]`)?.dataset.feedbackScope,f=!!c?.closest(`.rg-feedback-navigator-close`),p=!!c?.closest(`.rg-feedback-navigator-retry`),m=c instanceof HTMLTextAreaElement&&c.closest(`.rg-feedback-navigator-detail`)!==null?c:null,h=m?{start:m.selectionStart,end:m.selectionEnd,direction:m.selectionDirection}:null,g=t?.querySelector(`.rg-feedback-navigator-detail .rg-thread-messages`)?.scrollTop??0;if(e.replaceChildren(),!this.#x){this.#S=0;return}let _=this.#Fe(),v=Z(`rg-feedback-navigator-scrim`);v.dataset.motion=i,v.dataset.feedbackNavigatorAction=`close`,v.setAttribute(`aria-hidden`,`true`);let y=Lt(this.#Ne(),{id:Un,presentation:_,exitReviewState:this.#t?.onExitReview?this.#T:void 0});y.dataset.motion=i;let b=_===`sheet`&&this.#v?this.#a?.comments.find(({id:e})=>e===this.#v):null;if(y.dataset.detailOpen=String(!!this.#v),b){y.removeAttribute(`aria-labelledby`),y.setAttribute(`aria-label`,`피드백 상세`),[...y.children].forEach(e=>{e instanceof HTMLElement&&(e.inert=!0)});let e=Z(`rg-feedback-navigator-detail`),t=this.#Gt(b);t.classList.add(`rg-feedback-navigator-thread`);let n=t.querySelector(`.rg-thread-close`);n&&(n.classList.add(`rg-feedback-navigator-back`),n.setAttribute(`aria-label`,`피드백 목록으로 돌아가기`),n.replaceChildren(fr()),n.closest(`.rg-tag-row`)?.prepend(n)),e.append(t),y.append(e)}e.append(v,y),this.#Le(_),queueMicrotask(()=>this.#Ie()),queueMicrotask(()=>{if(!this.#x)return;let t=e.querySelector(`.rg-feedback-navigator-content`);if(t&&(t.scrollTop=s),b){let e=y.querySelector(`.rg-feedback-navigator-detail .rg-thread-messages`);if(e&&(e.scrollTop=g),m&&h){let e=y.querySelector(`.rg-feedback-navigator-detail textarea`);e?.focus({preventScroll:!0}),e?.setSelectionRange(h.start,h.end,h.direction);return}}if(l){let e=this.#Be(l);e?e.focus({preventScroll:!0}):this.#Re()}else if(u&&lr(u))e.querySelector(`[data-feedback-filter="${u}"]`)?.focus({preventScroll:!0});else if(d&&ur(d))e.querySelector(`[data-feedback-scope="${d}"]`)?.focus({preventScroll:!0});else if(f)e.querySelector(`.rg-feedback-navigator-close`)?.focus({preventScroll:!0});else if(p){let t=e.querySelector(`.rg-feedback-navigator-retry`);t?t.focus({preventScroll:!0}):this.#Re()}else _===`sheet`&&r!==`sheet`&&this.#Re()})}#Ne(){let e=this.#Ve(),t=e.comments.filter(e=>this.#He(e)),n=this.#C===`current`?t:e.comments,r=new Set(n.map(({id:e})=>e)),i={pageId:e.pageId,comments:n,replies:e.replies.filter(({commentId:e})=>r.has(e)),...e.window===void 0?{}:{window:e.window}},a=Dt(i,this.#w),o=new Set(i.window?.possiblyPartialReplyThreadIds??[]),s=this.#t?.now?.()??Date.now(),c=this.#P&&this.#E===`ready`?`reconnecting`:this.#E;return{scope:this.#C,scopeCounts:{current:t.length,all:e.comments.length},filter:this.#w,counts:a.counts,countsAreLowerBounds:i.window?.hasMoreComments===!0,rows:a.rows.map(({comment:e,pinNumber:t,replyCount:n,lastActivityAt:r})=>({id:e.id,pageId:e.pageId,pinNumber:t,pageLabel:this.#Ge(e),pageUrl:this.#Ue(e)?.href,currentPage:this.#He(e),targetLabel:this.#We(e),authorName:e.authorName,body:e.body,timeLabel:Sr(r,s),replyCount:n,replyCountIsLowerBound:o.has(e.id),status:e.status,locationAvailable:!this.#He(e)||this.#Q.commentLocation(e).available})),activeCommentId:this.#v,loadState:c,errorMessage:this.#D,errorRecovery:this.#O}}#Pe(){let e=this.#ze();if(!e)return;let t=this.#Ve(),n=t.comments.length,r=t.window?.hasMoreComments===!0,i=`${n}${r?`+`:``}`;e.setAttribute(`aria-label`,r?`피드백 목록, 최소 ${n}개`:`피드백 목록, 총 ${n}개`);let a=e.querySelector(`[data-feedback-count]`);a&&(a.textContent=i,a.hidden=n===0);let o=e.closest(`.rg-action-wrap`)?.querySelector(`.rg-tooltip`);o&&(o.textContent=r?`피드백 최소 ${n}개`:`피드백 ${n}개`),e.setAttribute(`aria-expanded`,String(this.#x)),e.setAttribute(`aria-controls`,Hn),this.#Fe()===`sheet`?e.setAttribute(`aria-haspopup`,`dialog`):e.removeAttribute(`aria-haspopup`),e.removeAttribute(`aria-pressed`)}#Fe(){return window.matchMedia?.(`(max-width: 640px)`).matches||window.innerWidth<=640?`sheet`:`tray`}#Ie(){let e=this.#e.querySelector(`.rg-feedback-navigator`),t=this.#ze(),n=this.#e.querySelector(`.rg-toolbar`);if(!e||!t||!n||e.dataset.presentation!==`tray`)return;let r=t.getBoundingClientRect(),i=n.getBoundingClientRect(),a=e.offsetWidth;if(r.width<=0||r.height<=0||a<=0)return;let o=gr(mr(n.dataset.position)),s=r.left+r.width/2,c=r.top+r.height/2;if(o===`top`||o===`bottom`){let t=pr(s-a/2,8,Math.max(8,window.innerWidth-a-8));e.style.left=`${t}px`,e.style.right=`auto`,o===`top`?(e.style.top=`${Math.max(8,i.bottom+8)}px`,e.style.bottom=`auto`):(e.style.top=`auto`,e.style.bottom=`${Math.max(8,window.innerHeight-i.top+8)}px`);let n=`${pr(s-t,16,a-16)}px`;e.style.setProperty(`--rg-navigator-origin`,o===`top`?`${n} -8px`:`${n} calc(100% + 8px)`)}else{let t=e.offsetHeight;if(t<=0)return;let n=pr(c-t/2,8,Math.max(8,window.innerHeight-t-8)),r=o===`left`?Math.min(window.innerWidth-a-8,i.right+8):Math.max(8,i.left-a-8);e.style.top=`${n}px`,e.style.right=`auto`,e.style.bottom=`auto`,e.style.left=`${Math.max(8,r)}px`,e.style.setProperty(`--rg-navigator-origin`,o===`left`?`-8px 50%`:`calc(100% + 8px) 50%`)}}#Le(e){if(e!==`sheet`){this.#L?.(),this.#L=null;return}if(this.#L)return;let t=[...[...document.body.children].filter(e=>e!==this),...this.#e.querySelectorAll(`[data-slot="pins"], [data-slot="panels"], .rg-toolbar`)].filter(e=>e instanceof HTMLElement),n=t.map(e=>({element:e,inert:e.inert}));t.forEach(e=>{e.inert=!0});let r=this.#e.querySelector(`[data-slot="panels"]`),i=r?wr(r,`visibility`):null;r&&r.style.setProperty(`visibility`,`hidden`);let a=wr(document.body,`overflow`),o=wr(document.documentElement,`overflow`),s=e=>{let t=this.#e.querySelector(`.rg-feedback-navigator`);!t||e.composedPath().includes(t)||queueMicrotask(()=>this.#Re())};document.addEventListener(`focusin`,s,!0),document.body.style.setProperty(`overflow`,`hidden`),document.documentElement.style.setProperty(`overflow`,`hidden`),this.#L=()=>{n.forEach(({element:e,inert:t})=>{e.inert=t}),r&&i&&Tr(r,`visibility`,i),document.removeEventListener(`focusin`,s,!0),Tr(document.body,`overflow`,a),Tr(document.documentElement,`overflow`,o)}}#Re(){if(!this.#x)return;let e=this.#e.querySelector(`.rg-feedback-navigator-detail .rg-thread-label`);if(e){e.focus({preventScroll:!0});return}let t=this.#v?this.#Be(this.#v):null,n=this.#e.querySelector(`.rg-feedback-row`),r=this.#e.querySelector(`.rg-feedback-navigator-retry`),i=this.#e.querySelector(`.rg-feedback-navigator-close`);(t??n??r??i)?.focus({preventScroll:!0})}#ze(){return this.#e.querySelector(`.rg-feedback-list-tool`)}#Be(e){return[...this.#e.querySelectorAll(`.rg-feedback-row[data-comment-id]`)].find(({dataset:t})=>t.commentId===e)}#Ve(){let e=this.#a??{pageId:this.#t?.pageId??``,comments:[],replies:[]},t=this.#s;if(!t)return e;let n=this.#t?.pageId??e.pageId,r=t.comments.filter(({pageId:e})=>e!==n),i=new Set(r.map(({id:e})=>e)),a=new Set(e.comments.map(({id:e})=>e));return{pageId:n,comments:[...r.filter(({id:e})=>!a.has(e)),...e.comments],replies:[...t.replies.filter(({commentId:e})=>i.has(e)),...e.replies],...xr(e.window,t.window)}}#He(e){return e.pageId===this.#t?.pageId}#Ue(e){let t=this.#s?.pages?.find(({id:t})=>t===e.pageId);return br(e,t?.routeKey)}#We(e){return tn(e.target)}#Ge(e){let t=this.#Ue(e);if(t)return yr(t);let n=this.#s?.pages?.find(({id:t})=>t===e.pageId);return n?.name.trim()?n.name.trim():e.target.pageTitle.trim()||`알 수 없는 페이지`}#Ke=e=>{e.stopPropagation();let t=e.target instanceof Element?e.target.closest(`[data-feedback-navigator-action]`):null,n=t?.dataset.feedbackNavigatorAction;if(n){if(n===`close`||n===`toggle`){this.#ke(!1);return}if(n===`retry`){this.#se();return}if(n===`exit-review`){this.#T=this.#g||this.#ne.size>0?`saving`:this.#Oe()?`draft-warning`:`confirm`,this.#Me(),queueMicrotask(()=>{this.#e.querySelector(this.#T===`saving`?`.rg-feedback-navigator-close`:`.rg-feedback-navigator-exit-cancel`)?.focus({preventScroll:!0})});return}if(n===`cancel-exit-review`){this.#T=`idle`,this.#Me(),queueMicrotask(()=>this.#e.querySelector(`.rg-feedback-navigator-exit-link`)?.focus({preventScroll:!0}));return}if(n===`confirm-exit-review`){if(this.#g||this.#ne.size>0){this.#T=`saving`,this.#Me();return}this.#t?.onExitReview?.();return}if(n===`filter`){let e=t.dataset.feedbackFilter;if(!lr(e)||e===this.#w)return;this.#w=e,this.#Me();return}if(n===`scope`){let e=t.dataset.feedbackScope;if(!ur(e)||e===this.#C)return;this.#C=e,this.#w=`all`,this.#Me();return}n===`open-comment`&&t.dataset.commentId&&this.#Je(t.dataset.commentId,{origin:`navigator`,navigate:!0})}};#qe=e=>{if(e.stopPropagation(),e.isComposing)return;let t=[...this.#e.querySelectorAll(`.rg-feedback-row`)],n=e.target instanceof Element?e.target.closest(`.rg-feedback-row`):null;if(n&&[`ArrowDown`,`ArrowUp`,`Home`,`End`].includes(e.key)){e.preventDefault();let r=t.indexOf(n);t[e.key===`Home`?0:e.key===`End`?t.length-1:e.key===`ArrowDown`?Math.min(t.length-1,r+1):Math.max(0,r-1)]?.focus();return}if(e.key!==`Tab`||this.#Fe()!==`sheet`)return;let r=this.#e.querySelector(`.rg-feedback-navigator`),i=r?[...r.querySelectorAll(`button:not(:disabled), [tabindex]:not([tabindex="-1"])`)].filter(e=>!e.closest(`[inert]`)):[];if(i.length===0)return;let a=i[0],o=i.at(-1);e.shiftKey&&this.#e.activeElement===a?(e.preventDefault(),o.focus()):!e.shiftKey&&this.#e.activeElement===o&&(e.preventDefault(),a.focus())};async#Je(e,t){let n=this.#Ve().comments.find(({id:t})=>t===e);if(!n)return;if(t.origin===`navigator`){let e=this.#e.querySelector(`.rg-feedback-navigator-content`);e&&(this.#S=e.scrollTop)}this.#c&&this.#we(!1);let r=++this.#N,i=t.navigate&&!this.#He(n),a=i?this.#Ue(n):null,o=!!(a&&a.origin===window.location.origin);if(t.origin===`navigator`&&this.#x&&i&&o&&(this.#ke(!1,{restoreFocus:!1,restoreComposer:!1,cancelNavigation:!1}),await Cr()),r!==this.#N||!this.#F)return;if(!this.#Ve().comments.some(({id:t})=>t===e)){this.#Ye();return}let s=t.origin===`navigator`&&this.#x&&this.#Fe()===`sheet`;s&&(this.#L?.(),this.#L=null);let c=!0;try{t.navigate&&(c=await this.#Xe(n))}finally{s&&this.#x&&this.#Le(`sheet`)}if(c&&r===this.#N){if(!this.#Ve().comments.some(({id:t})=>t===e)){this.#Ye();return}if(this.#f=null,this.#v=e,this.#y=t.origin,this.#Ce(),!this.#Q.commentLocation(n).available)this.#Ze(`현재 화면에서 피드백 위치를 찾을 수 없습니다.`);else if(t.announceOpened){let e=Dt(this.#Ve()).pinNumberByCommentId.get(n.id)??1;this.#Ze(`피드백 #${e} 대화를 열었습니다.`)}queueMicrotask(()=>this.#e.querySelector(`.rg-thread-label`)?.focus({preventScroll:!0}))}}#Ye(){if(this.#_&&this.#x&&this.#Fe()===`sheet`){this.#ke(!1,{restoreFocus:!1,cancelNavigation:!1});return}!this.#x&&this.#je()||queueMicrotask(()=>{this.#x?this.#Re():this.#ze()?.focus({preventScroll:!0})})}async#Xe(e){if(!this.#He(e)){let t=this.#Ue(e);if(!t||t.origin!==window.location.origin)return this.#Ze(`이 피드백의 페이지로 이동할 수 없습니다.`),!1;this.#Ze(`${vr(t.pathname)} 페이지로 이동합니다.`),this.#b=e.id;try{this.#t?.onNavigateToFeedback?await this.#t.onNavigateToFeedback(t.href,e):window.location.assign(t.href)}catch{this.#b=null,this.#Ze(`피드백 페이지로 이동하지 못했습니다.`)}return!1}let t=this.#Q.commentLocation(e);if(!t.available||t.pageY===null)return!0;let n=window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches?`auto`:`smooth`;if(e.target.kind!==`viewport`){let t=k(e.anchor,J(e.target)).element;if(t&&typeof t.scrollIntoView==`function`)try{return t.scrollIntoView({block:`center`,inline:`center`,behavior:n}),await Cr(),await Cr(),!0}catch{}}let r=window.visualViewport?.height??window.innerHeight,i=window.visualViewport?.width??window.innerWidth,a=Math.max(0,t.pageY-r/3),o=Math.max(0,(t.pageX??window.scrollX)-i/2);try{window.scrollTo({left:o,top:a,behavior:n})}catch{}return await Cr(),await Cr(),!0}#Ze(e){let t=this.#e.querySelector(`[data-slot="announcer"]`);t&&(t.textContent=``,queueMicrotask(()=>{t.textContent=e}))}#Qe(e,t=`neutral`){let n=this.#e.querySelector(`.rg-developer-status`);n&&(this.#$e(),n.textContent=e,n.dataset.tone=t,n.dataset.visible=`true`,this.#B=window.setTimeout(()=>{this.#B=null,n.isConnected&&(n.dataset.visible=`false`)},1800))}#$e(){this.#B!==null&&(window.clearTimeout(this.#B),this.#B=null)}#et=e=>{if(!this.#c||this.#Xt(e)||this.#u&&e.pointerId!==this.#d)return;let t=rr(e);if(this.#u&&Jn(this.#u,t)>=6){this.#Pt(this.#u,t);return}this.#Nt(t)};#tt=e=>{!this.#c||this.#Xt(e)||e.button!==0||this.#u||(e.preventDefault(),e.stopImmediatePropagation(),this.#u=rr(e),this.#d=e.pointerId)};#nt=e=>{if(!this.#c||!this.#u||e.pointerId!==this.#d)return;if(this.#Xt(e)){this.#u=null,this.#d=null,this.#Ft();return}e.preventDefault(),e.stopImmediatePropagation();let t=this.#u,n=this.#l,r=rr(e),i=Jn(t,r)>=6;n===`feedback`&&(this.#f=i?be(t,r):ye(r));let a=n===`react-grab`?this.#at(t,r,i):[];this.#yt(),this.#we(!1),n===`react-grab`?this.#ot(a):queueMicrotask(()=>this.#e.querySelector(`.rg-selection-label textarea`)?.focus())};#rt=e=>{!this.#c||!this.#u||e.pointerId!==this.#d||(e.preventDefault(),e.stopImmediatePropagation(),this.#u=null,this.#d=null,this.#Ft())};#it=e=>{if(!this.#c)return;if(e.key===`Escape`){e.preventDefault(),e.stopImmediatePropagation(),this.#we(!1);return}if(e.key!==`Enter`||e.isComposing||this.#Xt(e)||Zn(e))return;let t=$n(e);if(!t)return;let n=I(t);if(n.width<=0||n.height<=0)return;e.preventDefault(),e.stopImmediatePropagation();let r=this.#l;r===`feedback`&&(this.#f=ve(t,{clientX:n.left+n.width/2,clientY:n.top+n.height/2})),this.#we(!1),r===`react-grab`?this.#ot([t]):queueMicrotask(()=>this.#e.querySelector(`.rg-selection-label textarea`)?.focus())};#at(e,t,n){if(!n){let e=de(t.clientX,t.clientY);return e?[e]:[]}return xe(new DOMRect(Math.min(e.clientX,t.clientX),Math.min(e.clientY,t.clientY),Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))).slice(0,8)}async#ot(e){if(e.length===0){this.#Ze(`선택할 요소를 찾지 못했습니다.`),this.#Qe(`선택할 요소가 없습니다`,`error`),this.#lt();return}if(!this.#F||this.#U)return;let t=this.#F.signal;this.#U=!0,this.#Te(),this.#Ze(`코드 컨텍스트를 복사하는 중입니다.`),this.#Qe(`코드 컨텍스트 복사 중…`);try{let n=this.#st(),r=await n;if(t.aborted||n!==this.#W)return;let i=await r.copyElement(e.length===1?e[0]:e);if(t.aborted)return;this.#Ze(i?`코드 컨텍스트를 복사했습니다.`:`코드 컨텍스트를 복사하지 못했습니다. 다시 시도하세요.`),this.#Qe(i?`코드 컨텍스트 복사됨`:`복사 실패 · 다시 시도`,i?`neutral`:`error`)}catch{t.aborted||(this.#Ze(`코드 컨텍스트를 복사하지 못했습니다. 다시 시도하세요.`),this.#Qe(`복사 실패 · 다시 시도`,`error`))}finally{t.aborted||(this.#U=!1,this.#Te(),this.#lt())}}#st(){if(this.#W)return this.#W;let e=(this.#t?.developerTools?.loadReactGrab??(()=>wt(this.#t?.styleNonce)))();return this.#W=e,e.catch(()=>{this.#W===e&&(this.#W=null)}),e}#ct(){let e=this.#W;this.#W=null,e&&e.then(e=>e.dispose()).catch(()=>void 0)}#lt(){this.#f||queueMicrotask(()=>this.#e.querySelector(`.rg-developer-grab-tool`)?.focus({preventScroll:!0}))}#ut=e=>{if(!this.#c)return;if(this.#Xt(e)||Zn(e)){this.#Ft();return}let t=$n(e);if(!t){this.#Ft();return}let n=I(t);if(n.width<=0||n.height<=0){this.#Ft();return}let r=this.#e.querySelector(`[data-slot="region"]`);r&&(r.style.display=`none`);let i=this.#e.querySelector(`[data-slot="highlight"]`);i&&Q(i,n)};#dt(){if(!this.#c)return;let e=er(document);if(!e||p(e)||Qn(e))return;let t=I(e);if(t.width<=0||t.height<=0)return;let n=this.#e.querySelector(`[data-slot="highlight"]`);n&&Q(n,t)}#ft=e=>{if(e.key===`Escape`&&!e.isComposing){let t=!!this.#e.activeElement?.closest(`.rg-thread-label`);if(this.#v&&t){e.preventDefault(),e.stopImmediatePropagation(),this.#jt(!0);return}if(this.#x){e.preventDefault(),e.stopImmediatePropagation(),this.#ke(!1);return}if(this.#v){e.preventDefault(),e.stopImmediatePropagation(),this.#jt(!0);return}if(this.#f){if(e.preventDefault(),e.stopImmediatePropagation(),this.#g?.target===this.#f){this.#Ze(`피드백을 저장하는 중입니다.`);return}this.#f=null,this.#p=``,this.#m=``,this.#h=null,this.#Vt(),queueMicrotask(()=>this.#e.querySelector(`.rg-feedback-tool`)?.focus({preventScroll:!0}));return}}!((e.metaKey||e.ctrlKey)&&!e.shiftKey&&!e.altKey&&(e.code===`KeyC`||e.key.toLowerCase()===`c`))||e.repeat||this.#c||this.#f||this.#v||this.#x||this.#U||this.#z!==null||Zn(e)||nr(e)||(this.#z=window.setTimeout(()=>{this.#z=null,!(this.#c||this.#f||this.#v||this.#x||this.#g||this.#U)&&this.#gt()},100))};#pt=e=>{let t=e.code===`KeyC`||e.key.toLowerCase()===`c`,n=e.key===`Meta`||e.key===`Control`;(t||n)&&this.#ht()};#mt=()=>{this.#ht()};#ht(){this.#z!==null&&(window.clearTimeout(this.#z),this.#z=null)}#gt(){let e=this.#e.querySelector(`.rg-toolbar`);e?.dataset.collapsed===`true`&&ht(e,!1),this.#we(!0,this.#t?.developerTools?.codeContextCopy===!0?`react-grab`:`feedback`)}#_t=e=>{!this.#v||this.#Xt(e)||this.#jt(!1)};#vt=e=>{!this.#H||this.#Xt(e)||(e.preventDefault(),e.stopImmediatePropagation(),this.#bt())};#yt(){this.#bt(),this.#H=!0,this.#V=window.setTimeout(()=>{this.#V=null,this.#H=!1},0)}#bt(){this.#V!==null&&(window.clearTimeout(this.#V),this.#V=null),this.#H=!1}#xt=()=>{this.#St()};#St(){if(!(!this.#F||this.#G!==null)){if(typeof window.requestAnimationFrame==`function`){this.#K=!0,this.#G=-1;let e=window.requestAnimationFrame(()=>{this.#G=null,this.#Ct()});this.#G!==null&&(this.#G=e);return}this.#K=!1,this.#G=window.setTimeout(()=>{this.#G=null,this.#Ct()},16)}}#Ct(){if(!this.#F)return;this.#Y&&(this.#Y=!1,this.#Tt()),this.#Q.observersDirty&&(this.#Q.markObserversSynchronized(),this.#Ot()),this.#Bt(),this.#It(),this.#Mt();let e=this.#e.querySelector(`.rg-feedback-navigator`);e&&e.dataset.presentation!==this.#Fe()?(this.#Vt(),this.#Me(),this.#Pe()):this.#Ie(),this.#At()}#wt(){typeof window.ResizeObserver==`function`&&(this.#q=new window.ResizeObserver(this.#xt)),typeof window.MutationObserver==`function`&&(this.#J=new window.MutationObserver(e=>{e.some(Pn)&&(this.#Y=!0),this.#Q.invalidate(e),this.#xt()}),this.#Tt()),this.#Ot()}#Tt(){let e=this.#J;if(!e)return;e.disconnect();let t=i();this.#Et(t),this.#Dt();for(let n of t){if(n===this.#e)continue;let t=f(n)?n.documentElement:n;if(t)try{e.observe(t,{attributes:!0,characterData:!0,childList:!0,subtree:!0,attributeFilter:[`class`,`style`,`hidden`,`open`,`aria-hidden`,`id`,`data-review-id`,`data-testid`,`data-id`,`slot`]})}catch{}}}#Et(e){let t=new Set(e.filter(e=>f(e)&&e!==document));for(let[e,n]of this.#$)t.has(e)||(n(),this.#$.delete(e));for(let e of t){if(this.#$.has(e))continue;let t=[],n=(n,r,i=!0)=>{e.addEventListener(n,r,{capture:i,passive:n===`scroll`}),t.push({type:n,listener:r,capture:i})};n(`keydown`,this.#ft),n(`keyup`,this.#pt),n(`keydown`,this.#it),n(`pointermove`,this.#et),n(`pointerdown`,this.#_t),n(`pointerdown`,this.#tt),n(`pointerup`,this.#nt),n(`pointercancel`,this.#rt),n(`click`,this.#vt),n(`focusin`,this.#ut),n(`scroll`,this.#xt);let r=e.defaultView;r?.addEventListener(`blur`,this.#mt),r?.addEventListener(`resize`,this.#xt,{passive:!0}),r?.visualViewport?.addEventListener(`scroll`,this.#xt,{passive:!0}),r?.visualViewport?.addEventListener(`resize`,this.#xt,{passive:!0}),this.#$.set(e,()=>{t.forEach(({type:t,listener:n,capture:r})=>{e.removeEventListener(t,n,r)}),r?.removeEventListener(`blur`,this.#mt),r?.removeEventListener(`resize`,this.#xt),r?.visualViewport?.removeEventListener(`scroll`,this.#xt),r?.visualViewport?.removeEventListener(`resize`,this.#xt)})}}#Dt(){let e=new Set(a(`iframe`));for(let[t,n]of this.#ee)e.has(t)||(n(),this.#ee.delete(t));for(let t of e){if(this.#ee.has(t))continue;let e=()=>{this.#Y=!0,this.#St()};t.addEventListener(`load`,e),this.#ee.set(t,()=>{t.removeEventListener(`load`,e)})}}#Ot(){let e=this.#q;if(!e)return;let t=new Set,n=new Set;for(let e of this.#a?.comments??[]){let n=this.#Q.resolveTarget(e.target).element;n&&tr(n,t)}if(this.#f){let e=this.#Q.resolveTarget(this.#f).element;e&&tr(e,t)}for(let r of this.#Z){if(t.has(r)){n.add(r);continue}try{e.unobserve(r)}catch{}}for(let r of t)if(!n.has(r))try{e.observe(r),n.add(r)}catch{}this.#Z.clear(),n.forEach(e=>this.#Z.add(e))}#kt(){this.#G!==null&&(this.#K&&typeof window.cancelAnimationFrame==`function`?window.cancelAnimationFrame(this.#G):window.clearTimeout(this.#G),this.#G=null),this.#X!==null&&(window.clearTimeout(this.#X),this.#X=null),this.#q?.disconnect(),this.#q=null,this.#J?.disconnect(),this.#J=null,this.#Y=!1,this.#Q.clear(),this.#Z.clear(),this.#$.forEach(e=>e()),this.#$.clear(),this.#ee.forEach(e=>e()),this.#ee.clear()}#At(){let e=(this.#a?.comments??[]).some(e=>e.target.kind===`element`&&r(e.anchor.selector)&&!this.#Q.commentLocation(e).available);if(!this.#F||!e){this.#X!==null&&(window.clearTimeout(this.#X),this.#X=null);return}this.#X===null&&(this.#X=window.setTimeout(()=>{this.#X=null,this.#Y=!0,this.#Q.retryMissing(),this.#St()},750))}#jt(e,t=!0){let n=this.#v;if(!n)return;let r=this.#y;this.#N+=1,this.#v=null,this.#y=null,this.#Rt(),this.#Vt(),this.#Me(),!(t&&!this.#x&&this.#je())&&e&&queueMicrotask(()=>{if(r===`navigator`&&this.#x){let e=this.#Be(n);e?e.focus({preventScroll:!0}):this.#Re();return}if(r===`navigator`){this.#ze()?.focus({preventScroll:!0});return}let e=[...this.#e.querySelectorAll(`.pin[data-comment-id]`)].find(({dataset:e})=>e.commentId===n);e?e.focus():this.#ze()?.focus({preventScroll:!0})})}#Mt(){let e=this.#e.querySelector(`.rg-selection-label`);if(!e)return;if(this.#f){et(e,nn(this.#f));return}if(!this.#v)return;let t=this.#a?.comments.find(({id:e})=>e===this.#v);t&&(e.removeAttribute(`data-layout`),et(e,rn(t)))}#Nt(e){let t=de(e.clientX,e.clientY),n=this.#e.querySelector(`[data-slot="highlight"]`),r=this.#e.querySelector(`[data-slot="region"]`);if(r&&(r.style.display=`none`),!n||!t){n&&(n.style.display=`none`);return}Q(n,I(t))}#Pt(e,t){let n=this.#e.querySelector(`[data-slot="highlight"]`),r=this.#e.querySelector(`[data-slot="region"]`);n&&(n.style.display=`none`),r&&(r.removeAttribute(`data-point`),r.removeAttribute(`data-context-target`),Q(r,new DOMRect(Math.min(e.clientX,t.clientX),Math.min(e.clientY,t.clientY),Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))))}#Ft(){this.#e.querySelectorAll(`.highlight, .region`).forEach(e=>{e.style.display=`none`,e.removeAttribute(`data-context-target`),e.removeAttribute(`data-point`)})}#It(){if(this.#c)return;if(this.#f){this.#Lt(this.#f);return}let e=this.#a?.comments.find(({id:e})=>e===this.#v);if(e){this.#Lt(e.target);return}this.#Ft()}#Lt(e){let t=this.#e.querySelector(`[data-slot="highlight"]`),n=this.#e.querySelector(`[data-slot="region"]`);if(!(!t||!n)){if(t.style.display=`none`,n.style.display=`none`,t.removeAttribute(`data-context-target`),n.removeAttribute(`data-context-target`),n.removeAttribute(`data-point`),e.kind===`element`){let n=k(e.anchor,J(e));if(!n.anchored||!n.visible||!n.element)return;let r=I(n.element);t.dataset.contextTarget=`true`,Q(t,r);return}if(n.dataset.contextTarget=`true`,e.kind===`viewport`){n.dataset.point=`true`,Q(n,un(e));return}Q(n,sn(e))}}#Rt(){let e=this.#e.querySelector(`[data-slot="pins"]`);if(!e)return;let t=this.#e.activeElement instanceof HTMLElement&&this.#e.activeElement.matches(`.pin[data-comment-id]`)?this.#e.activeElement.dataset.commentId:void 0;e.replaceChildren();let n=this.#a;if(!n)return;let r=Dt(this.#Ve()).pinNumberByCommentId,i=this.#zt(n.comments);n.comments.forEach(t=>{if(!this.#He(t))return;let n=this.#Q.commentLocation(t);if(!n.available||n.pageX===null||n.pageY===null)return;let a=r.get(t.id)??1,o=i.get(t.id)??{x:0,y:0},s=document.createElement(`button`);s.type=`button`,s.className=`pin`,s.dataset.commentId=t.id,s.dataset.resolved=String(t.status===`resolved`),s.dataset.active=String(t.id===this.#v),s.dataset.collided=String(i.has(t.id)),s.style.display=`grid`,s.style.left=`${n.pageX+o.x-window.scrollX}px`,s.style.top=`${n.pageY+o.y-window.scrollY}px`,s.textContent=String(a),s.setAttribute(`aria-label`,`피드백 #${a}: ${t.body.slice(0,80)}`),s.setAttribute(`aria-expanded`,String(t.id===this.#v)),s.setAttribute(`aria-controls`,on(t.id)),s.addEventListener(`click`,()=>{if(!this.#c){if(this.#v===t.id){this.#jt(!0);return}this.#Je(t.id,{origin:`pin`,navigate:!1})}}),e.append(s)}),t&&queueMicrotask(()=>{[...e.querySelectorAll(`.pin[data-comment-id]`)].find(({dataset:e})=>e.commentId===t)?.focus({preventScroll:!0})})}#zt(e){if(!(window.innerWidth<=640||window.matchMedia?.(`(pointer: coarse)`).matches===!0))return new Map;let t=e.flatMap(e=>{if(!this.#He(e))return[];let t=this.#Q.commentLocation(e);return!t.available||t.pageX===null||t.pageY===null?[]:[{comment:e,x:t.pageX,y:t.pageY}]}),n=new Map;for(let e of jn(t,40)){if(e.length<2)continue;e.sort((e,n)=>dr(t[e].comment,t[n].comment));let r=e.reduce((n,r)=>({x:n.x+t[r].x/e.length,y:n.y+t[r].y/e.length}),{x:0,y:0}),i=Math.ceil(Math.sqrt(e.length)),a=Math.ceil(e.length/i),o=(i-1)*50/2,s=(a-1)*50/2,c=window.scrollX,l=window.scrollY;if(r.x>=c&&r.x<=c+window.innerWidth&&r.y>=l&&r.y<=l+window.innerHeight){let e=c+17+o,t=c+window.innerWidth-27-o,n=l+30+s,i=l+window.innerHeight-14-s;e<=t&&(r.x=pr(r.x,e,t)),n<=i&&(r.y=pr(r.y,n,i))}e.forEach((o,s)=>{let c=Math.floor(s/i),l=s%i,u=Math.min(i,e.length-c*i),d=t[o];n.set(d.comment.id,{x:Math.round(r.x+(l-(u-1)/2)*50-d.x),y:Math.round(r.y+(c-(a-1)/2)*50-d.y)})})}return n}#Bt(){let e=new Map(this.#a?.comments.map(e=>[e.id,e])??[]),t=this.#zt([...e.values()]),n=[...this.#e.querySelectorAll(`.pin[data-comment-id]`)],r=new Set(n.map(({dataset:e})=>e.commentId??``));if([...e.values()].some(e=>{if(!this.#He(e)||r.has(e.id))return!1;let t=this.#Q.commentLocation(e);return t.available&&t.pageX!==null&&t.pageY!==null})){this.#Rt();return}n.forEach(n=>{let r=e.get(n.dataset.commentId??``);if(!r)return;if(!this.#He(r)){n.style.display=`none`;return}let i=this.#Q.commentLocation(r);if(!i.available||i.pageX===null||i.pageY===null){n.style.display=`none`;return}let a=t.get(r.id)??{x:0,y:0};n.dataset.collided=String(t.has(r.id)),n.style.display=`grid`,n.style.left=`${i.pageX+a.x-window.scrollX}px`,n.style.top=`${i.pageY+a.y-window.scrollY}px`})}#Vt(){let e=this.#e.querySelector(`[data-slot="panels"]`);if(!e)return;let t=this.#e.activeElement,n=t instanceof HTMLTextAreaElement&&t.closest(`.rg-thread-label`)!==null,r=t instanceof HTMLTextAreaElement&&t.closest(`.rg-selection-label:not(.rg-thread-label)`)!==null,i=n||r?{start:t.selectionStart,end:t.selectionEnd,direction:t.selectionDirection}:null,a=e.querySelector(`.rg-thread-messages`)?.scrollTop??0;if(e.replaceChildren(),this.#f){this.#Lt(this.#f),e.append(this.#Ht(this.#f)),r&&i&&queueMicrotask(()=>{let t=e.querySelector(`.rg-selection-label:not(.rg-thread-label) textarea`);t?.focus({preventScroll:!0}),t?.setSelectionRange(i.start,i.end,i.direction)});return}let o=this.#a?.comments.find(({id:e})=>e===this.#v);if(o){if(this.#Lt(o.target),this.#x&&this.#Fe()===`sheet`)return;e.append(this.#Gt(o)),queueMicrotask(()=>{let t=e.querySelector(`.rg-thread-messages`);if(t&&(t.scrollTop=a),!n||!i)return;let r=e.querySelector(`.rg-thread-label textarea`);r?.focus({preventScroll:!0}),r?.setSelectionRange(i.start,i.end,i.direction)});return}this.#c||this.#Ft()}#Ht(e){let t=Qe(`피드백`,`변경할 점`,`변경할 점 입력`);et(t,nn(e));let n=t.querySelector(`textarea`),r=t.querySelector(`.rg-submit`);n.value=this.#p;let i=this.#g?.target===e&&this.#g.body===n.value.trim();n.disabled=i,r.disabled=i||!this.#Ee();let a=()=>{n.style.height=`auto`,n.style.height=`${Math.min(n.scrollHeight,95)}px`};return n.addEventListener(`input`,()=>{this.#p=n.value,r.disabled=!this.#Ee()||!n.value.trim(),this.#h?.body!==n.value.trim()&&(this.#h=null,this.#m=``,t.querySelector(`.rg-inline-error`)?.remove()),a()}),n.addEventListener(`keydown`,t=>{if(t.key===`Escape`){if(t.preventDefault(),this.#g?.target===e){this.#Ze(`피드백을 저장하는 중입니다.`);return}this.#f=null,this.#p=``,this.#m=``,this.#h=null,this.#Vt(),queueMicrotask(()=>this.#e.querySelector(`.rg-feedback-tool`)?.focus({preventScroll:!0}))}t.key===`Enter`&&(t.metaKey||t.ctrlKey)&&!t.shiftKey&&!t.altKey&&!t.isComposing&&(t.preventDefault(),r.click())}),r.addEventListener(`click`,()=>void this.#Ut(t,e)),this.#m&&Xn(t,this.#m),t}async#Ut(e,t){if(!this.#t||this.#g||!this.#Ee())return;let n=this.#t,r=n.pageId,i=this.#j,a=n.repository,o=this.#F?.signal;if(!o)return;let s=e.querySelector(`textarea`),c=e.querySelector(`.rg-submit`),l=s?.value.trim()??``;if(!l||!s||!c)return;c.disabled=!0,s.disabled=!0;let u=this.#h?.target===t&&this.#h.body===l?this.#h.comment:null,d=n.now?.()??Date.now(),f=u??{id:n.id?.()??crypto.randomUUID(),pageId:r,authorId:n.session.reviewerId,authorName:n.session.displayName,body:l,anchor:t.anchor,target:t,status:`open`,createdAt:d,updatedAt:d},p={target:t,body:l,comment:f};this.#g=p;let m=a.attachScreenshot?bn(t):Promise.resolve(null);if(!u){let e=t;if(n.sourceContextResolver)try{e=await Te(t,n.sourceContextResolver,{signal:o})}catch{}if(o.aborted||i!==this.#j||this.#g!==p)return;f={...f,anchor:e.anchor,target:e},p.comment=f}let h=!1;try{if(await a.mutate(r,{type:`comment.upsert`,comment:f}),o.aborted||i!==this.#j)return;h=await this.#Wt(f.id,o)}catch{if(o.aborted||i!==this.#j||this.#g!==p)return;this.#g=null,this.#h={target:t,body:l,comment:f},this.#m=`저장하지 못했습니다. 다시 시도하세요.`,!this.#x&&this.#f===t&&(this.#Vt(),queueMicrotask(()=>this.#e.querySelector(`.rg-selection-label:not(.rg-thread-label) textarea`)?.focus({preventScroll:!0})));return}if(o.aborted||i!==this.#j||!h)return;this.#g===p&&(this.#g=null),this.#h=null,this.#m=``,this.#_?.target===t&&(this.#_=null),this.#f===t&&(this.#f=null,this.#p=``,this.#Vt(),queueMicrotask(()=>this.#e.querySelector(`.rg-feedback-tool`)?.focus({preventScroll:!0})));let g=await m;if(g&&a.attachScreenshot)try{await a.attachScreenshot(r,f.id,g),this.#Ze(`피드백과 위치 캡처를 저장했습니다.`);return}catch{this.#Ze(`피드백은 저장했지만 위치 캡처는 저장하지 못했습니다.`);return}this.#Ze(`피드백을 저장했습니다.`)}async#Wt(e,t){return this.#a?.comments.some(({id:t})=>t===e)?!0:await new Promise((n,r)=>{let i=()=>{clearTimeout(o),t.removeEventListener(`abort`,a),this.#ce.delete(e)},a=()=>{i(),n(!1)},o=setTimeout(()=>{i(),r(Error(`Comment was not confirmed by the review service`))},Vn);this.#ce.set(e,e=>{i(),n(e)}),t.addEventListener(`abort`,a,{once:!0})})}#Gt(e){let t=this.#a?Dt(this.#a).pinNumberByCommentId.get(e.id)??1:1,n=!this.#Q.commentLocation(e).available,r=Qe(`피드백 #${t}${e.status===`resolved`?` · 완료`:``}${n?` · 위치 없음`:``}`,`답글`,`답글 입력`);r.classList.add(`rg-thread-label`),r.id=on(e.id),r.tabIndex=-1,r.dataset.commentId=e.id,r.setAttribute(`aria-label`,`피드백 대화`),et(r,rn(e));let i=r.querySelector(`.rg-tag-row`),a=document.createElement(`button`);a.type=`button`,a.className=`rg-thread-close`,a.setAttribute(`aria-label`,`피드백 닫기`),a.append($e()),i.append(a);let o=Z(`rg-thread-messages`);o.append(Yn(e.authorName,e.body,e.createdAt));let s=this.#a?.replies.filter(({commentId:t})=>t===e.id)??[];if(this.#a?.window?.possiblyPartialReplyThreadIds.includes(e.id)){let e=Z(`rg-thread-partial-notice`);e.setAttribute(`role`,`status`),e.textContent=`최근 답글 ${this.#a.window.replyLimitPerComment}개만 표시합니다.`,o.append(e)}s.forEach(e=>o.append(Yn(e.authorName,e.body,e.createdAt))),r.querySelector(`.rg-surface`)?.insertBefore(o,r.querySelector(`.rg-bottom-section`));let c=r.querySelector(`textarea`),l=r.querySelector(`.rg-submit`);c.value=this.#te.get(e.id)??``;let u=this.#ne.has(e.id);c.disabled=u,l.disabled=u,l.setAttribute(`aria-label`,`답글 저장`);let d=()=>{c.style.height=`auto`,c.style.height=`${Math.min(c.scrollHeight,95)}px`};c.addEventListener(`input`,()=>{this.#te.set(e.id,c.value),this.#ie.get(e.id)?.body!==c.value.trim()&&(this.#ie.delete(e.id),this.#re.delete(e.id),r.querySelector(`.rg-inline-error`)?.remove()),d()}),c.addEventListener(`keydown`,e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&!e.shiftKey&&!e.altKey&&!e.isComposing&&(e.preventDefault(),l.click())}),a.addEventListener(`click`,()=>this.#jt(!0)),l.addEventListener(`click`,()=>void this.#Kt(r,e));let f=this.#re.get(e.id);return f&&Xn(r,f),queueMicrotask(d),r}async#Kt(e,t){if(!this.#t||!this.#Ee())return;let n=this.#t,r=n.pageId,i=this.#j,a=this.#F?.signal;if(!a||this.#ne.has(t.id))return;let o=e.querySelector(`textarea`),s=e.querySelector(`.rg-submit`),c=o?.value.trim()??``;if(!c||!o||!s)return;let l=this.#ie.get(t.id),u=n.now?.()??Date.now(),d=l?.body===c?l.reply:{id:n.id?.()??crypto.randomUUID(),commentId:t.id,authorId:n.session.reviewerId,authorName:n.session.displayName,body:c,createdAt:u,updatedAt:u},f=Symbol(t.id);this.#ne.set(t.id,{request:f,body:c,reply:d}),this.#Jt(t.id,!0);try{if(await n.repository.mutate(r,{type:`reply.upsert`,reply:d}),a.aborted||i!==this.#j)return;await this.#qt(d,a)}catch{if(a.aborted||i!==this.#j||this.#ne.get(t.id)?.request!==f)return;this.#ne.delete(t.id),this.#ie.set(t.id,{body:c,reply:d}),this.#re.set(t.id,`답글을 저장하지 못했습니다. 다시 시도하세요.`),s.disabled=!1,o.disabled=!1,this.#v===t.id&&(this.#x&&this.#Fe()===`sheet`?this.#Me():this.#Vt(),queueMicrotask(()=>this.#Yt(t.id)?.querySelector(`textarea`)?.focus({preventScroll:!0})));return}if(a.aborted||i!==this.#j||this.#ne.get(t.id)?.request!==f)return;this.#ne.delete(t.id),this.#ie.delete(t.id),this.#re.delete(t.id),this.#te.delete(t.id);let p=this.#Yt(t.id)?.querySelector(`textarea`);p&&(p.value=``,p.style.height=`auto`),this.#Jt(t.id,!1),this.#Ze(`답글을 저장했습니다.`)}async#qt(e,t){this.#a?.replies.some(({id:t,commentId:n})=>t===e.id&&n===e.commentId)||await new Promise((n,r)=>{let i=()=>{clearTimeout(o),t.removeEventListener(`abort`,a),this.#le.delete(e.id)},a=()=>{i(),n()},o=setTimeout(()=>{i(),r(Error(`Reply was not confirmed by the review service`))},Vn);this.#le.set(e.id,{commentId:e.commentId,settle:()=>{i(),n()}}),t.addEventListener(`abort`,a,{once:!0})})}#Jt(e,t){let n=this.#Yt(e),r=n?.querySelector(`textarea`),i=n?.querySelector(`.rg-submit`);r&&(r.disabled=t),i&&(i.disabled=t)}#Yt(e){return[...this.#e.querySelectorAll(`.rg-thread-label`)].find(({dataset:t})=>t.commentId===e)}#Xt(e){return e.composedPath().includes(this)}};function Kn(e){ue(e.styleNonce),customElements.get(`agency-review-widget`)||customElements.define(Bn,Gn);let t=document.createElement(Bn);return t.configure(e),document.body.append(t),t}function qn(e,t){let n=e.hostname.toLowerCase();return t.some(e=>e.toLowerCase()===n)||n===`localhost`||n===`127.0.0.1`||n.endsWith(`.test`)||n.endsWith(`.local`)}function Z(e){let t=document.createElement(`div`);return t.className=e,t}function Q(e,t){e.style.display=`block`,e.style.left=`${t.left}px`,e.style.top=`${t.top}px`,e.style.width=`${t.width}px`,e.style.height=`${t.height}px`}function Jn(e,t){return Math.hypot(e.clientX-t.clientX,e.clientY-t.clientY)}function Yn(e,t,n){let r=document.createElement(`article`);r.className=`rg-message`;let i=Z(`rg-message-meta`);i.textContent=`${e} · ${new Date(n).toLocaleString(void 0,{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})}`;let a=document.createElement(`p`);return a.className=`rg-message-body`,a.textContent=t,r.append(i,a),r}function Xn(e,t){let n=e.querySelector(`.rg-inline-error`);if(!n){n=Z(`rg-inline-error`),n.setAttribute(`role`,`alert`);let t=e.querySelector(`.rg-surface`);t?.insertBefore(n,t.querySelector(`.rg-bottom-section`))}n.textContent=t}function Zn(e){return ir(e).designMode===`on`||e.composedPath().some(e=>{let t=ar(e);return t?Qn(t):!1})}function Qn(e){let t=e.tagName.toLowerCase();return t===`input`||t===`textarea`||t===`select`||`isContentEditable`in e&&!!e.isContentEditable||Wn.has(e.getAttribute(`role`)??``)}function $n(e){let t=e.composedPath().map(ar).find(Boolean)??null;return!t||t===t.ownerDocument.documentElement||t===t.ownerDocument.body||p(t)?null:t}function er(e){let t=e.activeElement,n=new Set;for(;t&&!n.has(t);){n.add(t);let e=t.shadowRoot?.activeElement;if(e){t=e;continue}if(t.tagName.toLowerCase()===`iframe`)try{let e=t.contentDocument?.activeElement;if(e){t=e;continue}}catch{}break}return t}function tr(e,t){let n=e,r=new Set;for(;n&&!r.has(n);){r.add(n),t.add(n);let e=n.getRootNode();if(d(e)){n=e.host;continue}if(f(e)&&e!==document){try{n=e.defaultView?.frameElement??null}catch{n=null}continue}n=null}}function nr(e){let t=ir(e).defaultView?.getSelection();return!!(t&&!t.isCollapsed&&t.toString().length>0)}function rr(e){let t=e.clientX,n=e.clientY,r=ir(e);for(;r!==document;){let e=null;try{e=r.defaultView?.frameElement??null}catch{break}if(!e)break;let i=e.getBoundingClientRect(),a=e,o=u(a);t=i.left+(a.clientLeft+t)*o.x,n=i.top+(a.clientTop+n)*o.y,r=e.ownerDocument}return{clientX:t,clientY:n}}function ir(e){for(let t of e.composedPath()){if(or(t))return t;let e=ar(t);if(e)return e.ownerDocument}return document}function ar(e){return e&&`nodeType`in e&&e.nodeType===1?e:null}function or(e){return`nodeType`in e&&e.nodeType===9}function sr(e){if(!e||typeof e!=`object`)return!1;let t=e;return t.clearSnapshot===!0?t.type===`access-lost`?t.recovery===`reauthenticate`&&[`permission-denied`,`session-expired`,`membership-revoked`].includes(t.code??``):t.type===`error`&&t.recovery===`retry`&&[`transport`,`data-integrity`,`unknown`].includes(t.code??``):!1}function cr(e){return e===`membership-revoked`?`리뷰 권한이 취소되었습니다. 작성 중인 내용은 저장되지 않았습니다.`:e===`session-expired`?`세션이 만료되었습니다. 다시 인증하세요.`:`이 리뷰에 접근할 수 없습니다. 다시 인증하세요.`}function lr(e){return e===`all`||e===`open`||e===`resolved`}function ur(e){return e===`current`||e===`all`}function dr(e,t){return e.createdAt-t.createdAt||e.id.localeCompare(t.id)}function fr(){let e=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`);e.setAttribute(`viewBox`,`0 0 16 16`),e.setAttribute(`aria-hidden`,`true`);let t=document.createElementNS(`http://www.w3.org/2000/svg`,`path`);return t.setAttribute(`d`,`M9.78 3.47a.75.75 0 0 1 0 1.06L6.31 8l3.47 3.47a.75.75 0 1 1-1.06 1.06l-4-4a.75.75 0 0 1 0-1.06l4-4a.75.75 0 0 1 1.06 0Z`),e.append(t),e}function pr(e,t,n){return Math.min(n,Math.max(t,e))}function mr(e){return zn.includes(e)?e:`bottom-right`}function hr(e){return e===`top-left`||e===`left`||e===`bottom-left`?`bottom-left`:`bottom-right`}function gr(e){return e===`top-left`||e===`top`||e===`top-right`?`top`:e===`bottom-left`||e===`bottom`||e===`bottom-right`?`bottom`:e}function _r(e){return Number.isFinite(e)?e:0}function vr(e){return e.replace(/\/+$/,``)||`/`}function yr(e){let t=`${vr(e.pathname)}${e.search}${e.hash}`,n=`${e.host}${t}`;try{return decodeURI(n)}catch{return n}}function br(e,t){try{let n=new URL(e.target.pageUrl,window.location.href);return t===void 0?n:new URL(t,n.origin)}catch{return null}}function xr(e,t){return!e&&!t?{}:e?t?{window:{commentLimit:Math.max(e.commentLimit,t.commentLimit),hasMoreComments:e.hasMoreComments||t.hasMoreComments,replyLimitPerComment:Math.max(e.replyLimitPerComment,t.replyLimitPerComment),possiblyPartialReplyThreadIds:[...new Set([...e.possiblyPartialReplyThreadIds,...t.possiblyPartialReplyThreadIds])]}}:{window:structuredClone(e)}:{window:structuredClone(t)}}function $(...e){e.forEach(e=>{try{e?.()}catch{}})}function Sr(e,t){let n=Math.max(0,Math.floor((t-e)/1e3));if(n<60)return`방금`;let r=Math.floor(n/60);if(r<60)return`${r}분 전`;let i=Math.floor(r/60);if(i<24)return`${i}시간 전`;let a=Math.floor(i/24);return a<7?`${a}일 전`:new Date(e).toLocaleDateString(void 0,{month:`short`,day:`numeric`})}function Cr(){return new Promise(e=>{if(typeof window.requestAnimationFrame==`function`){window.requestAnimationFrame(()=>e());return}queueMicrotask(e)})}function wr(e,t){return{value:e.style.getPropertyValue(t),priority:e.style.getPropertyPriority(t)}}function Tr(e,t,n){n.value?e.style.setProperty(t,n.value,n.priority):e.style.removeProperty(t)}function Er(){for(let e of[document.body,document.documentElement]){let t=getComputedStyle(e).backgroundColor.match(/[\d.]+/g)?.map(Number);if(!t||t.length<3)continue;let[n=0,r=0,i=0,a=1]=t;if(!(a<.5))return(n*.2126+r*.7152+i*.0722)/255<.45?`light`:`dark`}return window.matchMedia?.(`(prefers-color-scheme: dark)`).matches??!1?`light`:`dark`}function Dr(e){let t,n=!1,r=(r,i)=>{if(n||t?.invitationId!==r)return;let a=t;if(t=void 0,i)try{e.storage?.setItem(a.exitKey,r)}catch{}try{a.clearLocalSession?.()}catch{}e.onExit(r)},i=()=>{let n=t;if(n)try{e.storage?.getItem(n.exitKey)===n.invitationId&&r(n.invitationId,!1)}catch{}},a=e=>{let n=t;n&&e.key===n.exitKey&&e.newValue===n.invitationId&&r(n.invitationId,!1)},o=()=>{e.document.visibilityState===`visible`&&i()},s=n=>{if(!t?.widget||n.target!==t.widget)return;let r=n instanceof CustomEvent&&n.detail&&typeof n.detail==`object`&&`code`in n.detail?n.detail.code:void 0;e.onReauthenticationRequired(r)};return e.window.addEventListener(`storage`,a),e.window.addEventListener(`pageshow`,i),e.window.addEventListener(`visual-review:reauthenticate-required`,s),e.document.addEventListener(`visibilitychange`,o),{bindSession(e,n,a){return t={invitationId:e,exitKey:n,clearLocalSession:a},i(),()=>r(e,!0)},attachWidget(e){t&&(t.widget=e)},suspendSession(){t=void 0},dispose(){n||(n=!0,t=void 0,e.window.removeEventListener(`storage`,a),e.window.removeEventListener(`pageshow`,i),e.window.removeEventListener(`visual-review:reauthenticate-required`,s),e.document.removeEventListener(`visibilitychange`,o))}}}function Or(e,t){return async n=>{let r=new URL(n,e.location.href);if(r.origin!==e.location.origin)throw Error(`Visual Review route navigation must stay on the staging origin`);if(t){await t(r.href);return}e.location.assign(r.href)}}export{Dr as createActiveReviewSessionLifecycle,Or as createReviewNavigationHandler,Kn as mountReviewWidget};
|