@01.works/visual-review 0.10.0 → 0.12.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 +45 -12
- package/THIRD_PARTY_NOTICES.md +0 -4
- package/dist/active-review-mount-DcY2o2bT.js +1391 -0
- package/dist/cli.js +912 -0
- package/dist/convex-runtime-DcOYTgPd.js +2 -0
- package/dist/cursor-chat-repository-Cjy9pxGa.js +1 -0
- package/dist/cursor-chat-ui-Cu42FHov.js +94 -0
- package/dist/hosted-runtime-BrJNjnKj.js +1 -0
- package/dist/index.d.ts +57 -59
- package/dist/index.js +1 -1
- package/dist/install-CxzNo7RN.js +2 -0
- package/dist/instant-runtime-UFycxLQ8.js +1 -0
- package/dist/react.js +1 -1
- package/dist/review-repository-B3NZ_Tqo.js +1 -0
- package/dist/reviewer-auth-presentation-CAm-YbaR.js +13 -0
- package/package.json +7 -2
- package/dist/active-review-mount-BW2oQDQ2.js +0 -1517
- package/dist/convex-runtime-8kViWXIL.js +0 -2
- package/dist/hosted-runtime-Sar8A9oH.js +0 -1
- package/dist/install-DaKugI9S.js +0 -2
- package/dist/instant-runtime-CFL7Ffms.js +0 -1
- package/dist/reviewer-auth-presentation-DusgaOej.js +0 -13
|
@@ -0,0 +1,1391 @@
|
|
|
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 ne(e,t,n){let r=l(e),i=Math.max(r.width,1),a=Math.max(r.height,1);return{selector:v(e),offsetX:A((t-(r.left+window.scrollX))/i),offsetY:A((n-(r.top+window.scrollY))/a),viewportX:A((t-window.scrollX)/Math.max(window.innerWidth,1)),viewportY:A((n-window.scrollY)/Math.max(window.innerHeight,1))}}function D(e,t){return{selector:``,offsetX:A(e),offsetY:A(t),viewportX:A(e),viewportY:A(t)}}function O(e,t){let{element:n,confidence:r}=re(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 re(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:ie(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&&oe(e.selector)?ae(i.evidence):i.evidence.score>=.65)?{element:i.element,confidence:`high`}:{element:null,confidence:`low`}:{element:null,confidence:`none`}}function ie(e,t){let n=e.tagName.toLowerCase()===t.tagName.toLowerCase(),r=n?.25:0,i=k(t.textPreview),a=k(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=se(c.width,t.rect.width),d=se(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 ae(e){return e.expectedTextPresent?e.textMatches:e.tagMatches&&e.dimensionsMatch&&e.positionMatches}function oe(e){return/(?:^|[ >])#|%23|data-(?:review-id|testid|id)/iu.test(e)}function k(e){return e.replace(/\s+/gu,` `).trim().toLocaleLowerCase()}function se(e,t){return e<=0||t<=0?0:Math.min(e,t)/Math.max(e,t)}function A(e){return Math.min(1,Math.max(0,Number.isFinite(e)?e:0))}let ce=null,j=null;function le(e){de(e).catch(()=>void 0)}function ue(){return ce}function de(e){if(ce)return Promise.resolve(ce);if(j)return j;let t=fe(e);return j=t,t.catch(()=>{j===t&&(j=null)}),t}async function fe(e){let t=pe(e);try{let e=await import(`./primitives-lxsPH8SN.js`);return ce=e,e}finally{t()}}function pe(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 me(e){le(e)}function he(e,t){let n=ue();if(!n)return _e(e,t);try{let r=n.getElementAtPoint(e,t,{filter:e=>n.isElementGrabbable(e)&&!p(e)});return r?ve(r,e,t):null}catch{return _e(e,t)}}function M(e){if(e.ownerDocument!==document)return l(e);let t=ue();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 ge(e){le(e);let t=ue();if(!t)return()=>void 0;let n=!1;try{if(!t.isFreezeActive()){let r=pe(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 _e(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?ve(n,e,t):null}function ve(e,t,n){let r=e,i=t,a=n,o=new Set;for(;!o.has(r);){o.add(r);let e=ye(r,i,a);if(e&&e!==r&&!p(e)){r=e;continue}let t=be(r,i,a);if(!t)break;r=t.element,i=t.clientX,a=t.clientY}return r}function ye(e,t,n){try{return e.shadowRoot?.elementFromPoint(t,n)??null}catch{return null}}function be(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 xe=Symbol(`source-resolution-stopped`);function Se(e,t){let n=M(e),r=ne(e,t.clientX+window.scrollX,t.clientY+window.scrollY),i=Ue(n);return Pe(r,`element`,i,[Ve(e,i)])}function Ce(e){let t=he(e.clientX,e.clientY);return t?Se(t,e):Pe(D(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 we(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=Oe(Te(o),De(o)).slice(0,8),c={clientX:n+i/2,clientY:r+a/2},u=s[0];return Pe(u?ne(u,c.clientX+window.scrollX,c.clientY+window.scrollY):D(c.clientX/Math.max(window.innerWidth,1),c.clientY/Math.max(window.innerHeight,1)),`region`,Ue(o),s.map(e=>Ve(e,Ue(l(e)))))}function Te(e){let t=a(`*`).filter(t=>t===t.ownerDocument.body||t===t.ownerDocument.documentElement||p(t)||!T(t)?!1:We(e,l(t))),n=new Set(t),r=new Set;return t.forEach(e=>{let t=Ee(e);for(;t;)n.has(t)&&r.add(t),t=Ee(t)}),t.filter(e=>!r.has(e))}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(f(t)&&t!==document)try{return t.defaultView?.frameElement??null}catch{return null}return null}function De(e){return{clientX:e.left+e.width/2,clientY:e.top+e.height/2}}function Oe(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 ke(e,t,n={}){if(n.signal?.aborted)return je(e,t);let r=Ae(n),i=e.elements.map(async e=>{let n=Ge(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!==xe?t.value.context:e.elements[n]),o=Ne(n.flatMap(e=>e.status===`fulfilled`&&e.value!==xe&&e.value.provenance?[{located:e.value.context.source!==null,provenance:e.value.provenance}]:[]))??e.sourceProvenance??Me(t);return{...e,elements:a,...o?{sourceProvenance:o}:{}}}finally{r.dispose()}}function Ae(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(xe);return}t.signal.addEventListener(`abort`,()=>e(xe),{once:!0})});return{signal:t.signal,stopped:o,dispose(){clearTimeout(a),n?.removeEventListener(`abort`,r)}}}function je(e,t){let n=e.sourceProvenance??Me(t);return{...e,...n?{sourceProvenance:n}:{}}}function Me(e){try{return e.unavailableProvenance?.()}catch{return}}function Ne(e){return(e.find(e=>e.located)??e[0])?.provenance}function Pe(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:Fe()}}function Fe(){let e=navigator.userAgent,t=Math.max(1,window.innerWidth),n=navigator.maxTouchPoints,r=Be(window.screen?.width,t),i=Be(window.screen?.height,Math.max(1,window.innerHeight));return{browser:Ie(e),operatingSystem:Le(e,navigator.platform,n),deviceType:Re(e,navigator.platform,t,n),screenWidth:r,screenHeight:i,devicePixelRatio:Be(window.devicePixelRatio,1)}}function Ie(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 Le(e,t,n){return ze(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 Re(e,t,n,r){return ze(e,t,r)?`tablet`:/Mobi|iPhone|iPod|Android.*Mobile/.test(e)?`mobile`:/iPad|Tablet|Android/.test(e)||r>1&&n<=1024?`tablet`:`desktop`}function ze(e,t,n){return/iPad/.test(e)||t===`MacIntel`&&n>1}function Be(e,t){return typeof e==`number`&&Number.isFinite(e)&&e>0?e:t}function Ve(e,t){return{selector:v(e),tagName:e.tagName.toLowerCase(),textPreview:He(e),rect:t,source:null,componentStack:[]}}function He(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 Ue(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 We(e,t){return e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top}function Ge(e){let{selector:t}=e;return t?O({selector:t,offsetX:0,offsetY:0,viewportX:0,viewportY:0},e).element:null}function Ke(){let e=document.createElement(`div`);e.className=`rg-toolbar`,e.setAttribute(`role`,`toolbar`),e.setAttribute(`aria-label`,`Visual Review`);let t=F(`rg-toolbar-actions-shell`),n=F(`rg-toolbar-actions`),r=F(`rg-action-wrap`),i=$e(`rg-action rg-feedback-tool`,`피드백 위치 선택`);i.setAttribute(`aria-keyshortcuts`,`Meta+C Control+C`),i.setAttribute(`aria-description`,`Command 또는 Control C를 길게 누릅니다.`),i.setAttribute(`aria-pressed`,`false`),i.append(Xe());let a=document.createElement(`span`);a.className=`rg-tooltip`,a.setAttribute(`aria-hidden`,`true`),a.textContent=`피드백 · ⌘/Ctrl+C 길게`,r.append(i,a),n.append(r),t.append(n);let o=$e(`rg-collapse`,`Visual Review 접기`);return o.setAttribute(`aria-expanded`,`true`),o.append(Ze()),e.append(t,o),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=N(`0 0 16 8`,[P(`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=F(`rg-surface`),o=F(`rg-tag-row`),s=document.createElement(`span`);s.className=`rg-tag`,s.textContent=e,o.append(s);let c=F(`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=$e(`rg-submit`,`피드백 저장`);return u.title=`저장 (⌘/Ctrl+Enter)`,u.append(Qe()),c.append(l,u),a.append(o,c),r.append(i,a),r}function Je(){return N(`0 0 12 12`,[P(`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 Ye(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=et(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=et(c-(l-n.width/2),16,n.width-16);e.style.setProperty(`--rg-arrow-left`,`${f}px`)})}function Xe(){return N(`0 0 12 12`,[P(`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 Ze(){return N(`0 0 24 24`,[P(`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 Qe(){return N(`0 0 24 24`,[P(`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 N(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 P(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 F(e){let t=document.createElement(`div`);return t.className=e,t}function $e(e,t){let n=document.createElement(`button`);return n.type=`button`,n.className=e,n.setAttribute(`aria-label`,t),n}function et(e,t,n){return Math.min(n,Math.max(t,e))}const tt={width:106,height:30};function nt(e,t){return`agency-review:toolbar:v1:${encodeURIComponent(e)}:${encodeURIComponent(t)}`}function rt(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 it(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=R(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 at(e,t,n,r,i){if(e===`top`||e===`bottom`){let e=i.width-n-32;return e<=0?.5:R((t.x-i.offsetLeft-16)/e,0,1)}let a=i.height-r-32;return a<=0?.5:R((t.y-i.offsetTop-16)/a,0,1)}function ot(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:R(a,l,u),y:c===`top`?d:c===`bottom`?f:R(o,d,f)}}function st(e,t,n,r,i){if(e===`top`||e===`bottom`){let a=t.x+(n.width-r.width)/2,o=i.offsetLeft;return{x:R(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:R(a,o,s)}}function ct(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:R(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:R(a,o,s)}}function lt(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 ut(e){let{toolbar:t,offset:n,storageKey:r,signal:i}=e,a=rt(e.position),o=ht(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),lt(t,o?.collapsed??!1);let C=t.getBoundingClientRect(),w=t.dataset.collapsed===`false`&&L(C)?I(C):mt(t,s),T=t.dataset.collapsed===`true`&&L(C)?I(C):pt(s),E=e=>{let t=it(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();L(e)&&(t.dataset.collapsed===`true`?T=I(e):w=I(e));let n=dt(),r=E(n),i=t.dataset.collapsed===`true`;ft(t,i?st(s,r,w,T,n):r)},te=()=>{_||(_=!0,queueMicrotask(()=>{_=!1,S||ee()}))},ne=()=>{gt(r,{version:1,edge:s,ratio:c,collapsed:t.dataset.collapsed===`true`})},D=()=>{x?.abort(),x=null},O=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},ft(t,{x:n.clientX-p.x,y:n.clientY-p.y})},re=()=>{if(D(),u=!1,delete t.dataset.dragging,!d)return;f=!0;let e=t.getBoundingClientRect(),n=dt(),r=ot({x:e.left,y:e.top},e.width,e.height,h,n);s=r.edge,c=at(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();L(e)&&(w=I(e)),ee(),ne(),y!==null&&window.clearTimeout(y),y=window.setTimeout(()=>{y=null,delete t.dataset.snapping},300)})})},ie=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()},D(),x=new AbortController;let r=x.signal;window.addEventListener(`pointermove`,O,{capture:!0,signal:r}),window.addEventListener(`pointerup`,re,{capture:!0,signal:r}),window.addEventListener(`pointercancel`,re,{capture:!0,signal:r})},ae=e=>{f&&(f=!1,e.preventDefault(),e.stopImmediatePropagation())},oe=e=>{let n=e.detail,r=n?.collapsed??t.dataset.collapsed===`true`,i=n?.previousRect,a=!n?.wasAnimating,o=dt();if(a&&i&&L(i)&&(r?w=I(i):T=I(i)),t.dataset.collapseAnimating=`true`,r){let e=a&&i&&L(i)?{x:i.left,y:i.top}:E(o);ft(t,st(s,e,w,T,o))}else{let e=a&&i&&L(i)?{x:i.left,y:i.top}:st(s,E(o),w,T,o);ft(t,ct(s,e,w,T,o))}ne(),b!==null&&window.clearTimeout(b),b=window.setTimeout(()=>{b=null,delete t.dataset.collapseAnimating;let e=t.getBoundingClientRect();L(e)&&(r?T=I(e):w=I(e))},r?140:220)},k=()=>te();t.addEventListener(`pointerdown`,ie,{signal:i}),t.addEventListener(`click`,ae,{capture:!0,signal:i}),t.addEventListener(`review-dock-collapse`,oe,{signal:i}),window.addEventListener(`resize`,k,{passive:!0,signal:i}),window.visualViewport?.addEventListener(`resize`,k,{passive:!0,signal:i}),window.visualViewport?.addEventListener(`scroll`,k,{passive:!0,signal:i}),te();let se=()=>{S=!0,D(),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`,se,{once:!0}),se}function dt(){let e=window.visualViewport;return{offsetLeft:e?.offsetLeft??0,offsetTop:e?.offsetTop??0,width:e?.width??window.innerWidth,height:e?.height??window.innerHeight}}function ft(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 pt(e){return e===`top`||e===`bottom`?{width:32,height:28}:{width:28,height:32}}function I(e){return{width:e.width,height:e.height}}function L(e){return e.width>0&&e.height>0}function mt(e,t){let n=e.parentElement,r=t===`left`||t===`right`?{width:tt.height,height:tt.width}:tt;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(),L(a)?I(a):r}function ht(e){try{let t=window.localStorage.getItem(e);if(!t)return null;let n=JSON.parse(t);return n.version!==1||!_t(n.edge)||typeof n.ratio!=`number`||!Number.isFinite(n.ratio)||typeof n.collapsed!=`boolean`?null:{version:1,edge:n.edge,ratio:R(n.ratio,0,1),collapsed:n.collapsed}}catch{return null}}function gt(e,t){try{window.localStorage.setItem(e,JSON.stringify(t))}catch{}}function _t(e){return e===`top`||e===`right`||e===`bottom`||e===`left`}function R(e,t,n){return Math.min(n,Math.max(t,e))}function vt(e,t=`all`){let n=[...e.comments].sort(bt),r=new Map;for(let e of n){if(!yt(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=yt(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(xt),counts:c,pinNumberByCommentId:a}}function yt(e){return Number.isSafeInteger(e)&&(e??0)>=1}function bt(e,t){return e.createdAt-t.createdAt||e.id.localeCompare(t.id)}function xt(e,t){return t.lastActivityAt-e.lastActivityAt||t.comment.createdAt-e.comment.createdAt||e.comment.id.localeCompare(t.comment.id)}const St=`visual-review-feedback-navigator`,Ct=[`current`,`all`],wt={current:`현재 페이지`,all:`전체 페이지`},Tt=[`all`,`open`,`resolved`],Et={all:`전체`,open:`진행 중`,resolved:`완료`};function Dt(e,t={}){let n=t.controlsId??St,r=H(`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`,`피드백 목록, 총 ${U(e)}개`),i.append(It(),Ft(e));let a=document.createElement(`span`);return a.className=`rg-tooltip`,a.setAttribute(`aria-hidden`,`true`),a.textContent=`피드백 ${U(e)}개`,r.append(i,a),r}function Ot(e,t={}){let n=t.id??St,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=H(`rg-feedback-navigator-header`),s=H(`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=z(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(Lt()),o.append(s,u);let d=H(`rg-feedback-navigator-content`);if(Vt(d,e),e.loadState!==`loading`&&e.loadState!==`error`&&(e.rows.length===0?d.append(Ht(e.scopeCounts.all===0,e.scope===`current`&&e.scopeCounts.current===0&&e.scopeCounts.all>0)):Mt(d,e)),a.append(o),e.scopeCounts.all>e.scopeCounts.current&&e.loadState!==`loading`&&e.loadState!==`error`){let t=H(`rg-feedback-scopes`);t.setAttribute(`role`,`group`),t.setAttribute(`aria-label`,`피드백 페이지 범위`);for(let n of Ct)t.append(At(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=H(`rg-feedback-filters`);t.setAttribute(`role`,`group`),t.setAttribute(`aria-label`,`피드백 상태 필터`);for(let n of Tt)t.append(jt(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(kt(t.exitReviewState)),a}function kt(e){let t=H(`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=H(`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=H(`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 At(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`,`${wt[e]} 피드백 ${r?`최소 `:``}${U(t)}개`);let a=document.createElement(`span`);a.textContent=wt[e];let o=document.createElement(`span`);return o.className=`rg-feedback-scope-count`,o.setAttribute(`aria-hidden`,`true`),o.textContent=z(t,r),i.append(a,o),i}function jt(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`,`${Et[e]} 피드백 ${r?`최소 `:``}${U(t)}개`);let a=document.createElement(`span`);a.className=`rg-feedback-filter-label`,a.textContent=Et[e];let o=document.createElement(`span`);return o.className=`rg-feedback-filter-count`,o.setAttribute(`aria-hidden`,`true`),o.textContent=z(t,r),i.append(a,o),i}function Mt(e,t){if(t.scope!==`all`){e.append(Nt(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=H(`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=z(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,Nt(n,t.activeCommentId,!0)),e.append(r)}}function Nt(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(Pt(i,t,{showPageLabel:!n}));return r}function Pt(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`,Ut(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=H(`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=H(`rg-feedback-row-detail`),u=document.createElement(`span`);u.className=`rg-feedback-row-meta`,u.textContent=`${e.authorName} · ${e.timeLabel}`;let d=H(`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,Bt()),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(Rt()),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=`답글 ${z(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(zt());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 Ft(e){let t=document.createElement(`span`);return t.className=`rg-feedback-list-count`,t.dataset.feedbackCount=``,t.setAttribute(`aria-hidden`,`true`),t.hidden=U(e)===0,t.textContent=String(U(e)),t}function It(){return B(`0 0 14 14`,[V(`M4.75 3.25h6.5M4.75 7h6.5M4.75 10.75h6.5`),V(`M2.25 3.25h.01M2.25 7h.01M2.25 10.75h.01`,{"stroke-linecap":`round`,"stroke-width":`1.5`})])}function Lt(){return B(`0 0 12 12`,[V(`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 Rt(){return B(`0 0 14 14`,[V(`M7 12.25s4-3.27 4-6.5a4 4 0 1 0-8 0c0 3.23 4 6.5 4 6.5Z`),V(`m4.75 3.5 4.5 4.5`)])}function zt(){return B(`0 0 12 12`,[V(`m2.25 6.25 2.25 2.25 5.25-5.25`)])}function Bt(){return B(`0 0 12 12`,[V(`M2.25 6h7.5M6.75 3l3 3-3 3`)])}function Vt(e,t){let n=t.loadState??`ready`;if(n===`ready`)return;let r=H(`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 Ht(e,t=!1){let n=H(`rg-feedback-navigator-empty`);return n.setAttribute(`role`,`status`),n.textContent=e?`피드백 없음`:t?`현재 페이지 피드백 없음`:`해당 피드백 없음`,n}function Ut(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?`최소 `:``}${U(e.replyCount)}개`),t.push(e.status===`resolved`?`완료`:`진행 중`),e.locationAvailable===!1&&t.push(`현재 화면에서 위치를 찾을 수 없음`),e.currentPage||t.push(`다른 페이지로 이동`),t.join(`, `)}function z(e,t=!1){return`${U(e)}${t?`+`:``}`}function B(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 V(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 H(e){let t=document.createElement(`div`);return t.className=e,t}function U(e){return Math.max(0,Math.trunc(Number.isFinite(e)?e:0))}function Wt(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 Gt(e){let t=O(e.anchor,W(e)),n=t.x-window.scrollX;if(e.kind===`element`&&t.element){let e=M(t.element);return{x:e.left,y:e.top,width:e.width,height:e.height,anchorX:n}}if(e.kind===`viewport`){let t=Qt(e);return{x:t.left,y:t.top,width:t.width,height:t.height,anchorX:t.left+t.width/2}}let r=Yt(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 Kt(e){if(e.target.kind===`element`){if(qt(e).available)return Gt(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=Qt(e.target);return{x:t.left,y:t.top,width:t.width,height:t.height,anchorX:t.left+t.width/2}}let t=Yt(e.target);return{x:t.left,y:t.top,width:t.width,height:t.height,anchorX:t.left+t.width/2}}function qt(e,t){if(e.target.kind===`element`){let n=t??O(e.anchor,W(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=Xt(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=en(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 Jt(e){return`visual-review-thread-${e.replace(/[^a-zA-Z0-9_-]/g,`-`)}`}function Yt(e){let t=tn(e),n=Xt(e,t),r=K(e.region.width)*t.x,i=K(e.region.height)*t.y;return nn(new DOMRect(n.pageX-window.scrollX-r/2,n.pageY-window.scrollY-i/2,r,i))}function Xt(e,t=tn(e)){return Zt(e,t)??$t(e,t)}function Zt(e,t){if(e.kind!==`region`||!e.anchor.selector)return null;let n=O(e.anchor,W(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 W(e){return e.elements.find(({selector:t})=>t===e.anchor.selector)??e.elements[0]}function Qt(e){let t=en(e);return rn(new DOMRect(t.pageX-window.scrollX-7,t.pageY-window.scrollY-7,14,14))}function $t(e,t=tn(e)){let n=en(e,t);return{pageX:n.pageX+n.width/2,pageY:n.pageY+n.height/2}}function en(e,t=tn(e)){let n=e.region,r=q(n.viewportX,n.pageX),i=q(n.viewportY,n.pageY),a=q(n.pageX,window.scrollX+r),o=q(n.pageY,window.scrollY+i),s=a-r,c=o-i;return{pageX:s+r*t.x,pageY:c+i*t.y,width:K(n.width)*t.x,height:K(n.height)*t.y}}function tn(e){let t=G(window.innerWidth,1),n=G(window.innerHeight,1),r=G(e.region.viewportWidth,t),i=G(e.region.viewportHeight,n);return{x:t/r,y:n/i}}function nn(e){let t=an(),n=J(q(e.left,t.left),t.left,t.right),r=J(q(e.top,t.top),t.top,t.bottom),i=J(q(e.right,n),t.left,t.right),a=J(q(e.bottom,r),t.top,t.bottom);return new DOMRect(n,r,Math.max(0,i-n),Math.max(0,a-r))}function rn(e){let t=an(),n=Math.min(K(e.width),t.width),r=Math.min(K(e.height),t.height);return new DOMRect(J(q(e.left,t.left),t.left,t.right-n),J(q(e.top,t.top),t.top,t.bottom-r),n,r)}function an(){let e=window.visualViewport;return new DOMRect(q(e?.offsetLeft,0),q(e?.offsetTop,0),G(e?.width,window.innerWidth),G(e?.height,window.innerHeight))}function G(e,t){return Number.isFinite(e)&&(e??0)>0?e:Math.max(Number.isFinite(t)?t:1,1)}function K(e){return Number.isFinite(e)?Math.max(0,e):0}function q(e,t){return Number.isFinite(e)?e:Number.isFinite(t)?t:0}function J(e,t,n){return Math.min(n,Math.max(t,e))}const on=1e6;async function sn(e){if(!document.body||typeof HTMLCanvasElement>`u`)return null;let t=un(e);document.body.append(t);try{let{toCanvas:t}=await import(`./es-BeyOi4lh.js`),n=ln(e,window.innerWidth,window.innerHeight),r=cn(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:fn(),filter:e=>!dn(e),style:{margin:`0`,transform:`translate(${-window.scrollX}px, ${-window.scrollY}px)`,transformOrigin:`top left`}}),n),i=await mn(r);return!i||i.size>on?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 cn(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 ln(e,t,n){let r=hn(t),i=hn(n),a=e.region,o=gn(a.viewportX,a.pageX-window.scrollX),s=gn(a.viewportY,a.pageY-window.scrollY),c=Math.max(18,gn(a.width,0)),l=Math.max(18,gn(a.height,0)),u=_n(o+c/2,0,r),d=_n(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=_n(u-f/2,0,r-f),h=_n(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 un(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 dn(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 fn(){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 pn(e,t,n){return new Promise(r=>e.toBlob(r,t,n))}async function mn(e){for(let t of[.78,.64,.5]){let n=await pn(e,`image/webp`,t);if(n&&n.size<=on)return n}let t=await pn(e,`image/png`);return t&&t.size<=on?t:null}function hn(e){return Number.isFinite(e)&&e>0?e:1}function gn(e,t){return Number.isFinite(e)?e:Number.isFinite(t)?t:0}function _n(e,t,n){return Math.min(n,Math.max(t,e))}function vn(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 yn=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()}},bn=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=>wn(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=Sn(e);if(!this.#e.has(t)){let n=O(e.anchor,W(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 qt(e,e.target.kind===`element`?this.resolveTarget(e.target):void 0)}};function xn(e){return e.type===`childList`&&[...e.addedNodes,...e.removedNodes].some(Cn)}function Sn(e){let t=W(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 Cn(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 wn(e,t){return e.target===t?!0:e.type===`characterData`?t.contains(e.target):e.type===`childList`&&[...e.removedNodes].some(e=>Tn(e,t))}function Tn(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 En=[`top-left`,`top`,`top-right`,`right`,`bottom-right`,`bottom`,`bottom-left`,`left`],Dn=`agency-review-widget`,On=1e4,kn=`visual-review-feedback-navigator`,An=`${kn}-surface`,jn=new Set([`combobox`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`radio`,`searchbox`,`slider`,`spinbutton`,`textbox`]);var Mn=class extends HTMLElement{#e=this.attachShadow({mode:`open`});#t=null;#n=null;#r=null;#i=null;#a=0;#o=null;#s=null;#c=null;#l=!1;#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=!1;#H=null;#U=!1;#W=null;#G=null;#K=!1;#q=null;#J=new Set;#Y=new bn;#X=new Map;#Z=new Map;#Q=new Map;#$=new Map;#ee=new Map;#te=new Map;#ne=new yn;configure(e){if(this.#t)throw Error(`Review widget is already configured`);if(!Pn(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.#re()}setPage(e,t){let n=this.#t;if(!n)throw Error(`Review widget is not configured`);let r=n.cursorChat&&e.cursorChat?{...n.cursorChat,roomId:e.cursorChat.roomId}:n.cursorChat;if(t?.reload!==!0&&!this.#A&&n.pageId===e.pageId&&r?.roomId===n.cursorChat?.roomId)return;let i=this.#A,a=n.pageId;this.#A=!1,this.#t={...n,pageId:e.pageId,cursorChat:r},this.#F&&(i||this.#he(a),this.#me(e.pageId),this.#be(),this.#ye(),this.#ve(),this.#ie())}beginPageTransition(){!this.#t||this.#A||(this.#A=!0,this.#F&&(this.#he(this.#t.pageId),this.#be(),this.#ve()))}connectedCallback(){this.dataset.agencyReviewRoot=``,this.dataset.reactGrabIgnore=``,this.dataset.rgTheme=dr(),this.#t&&this.#re()}disconnectedCallback(){this.#ge()}async#re(){!this.#t||this.#F||(this.#F=new AbortController,this.#P=!navigator.onLine,this.#_e(),this.#ye(),this.#ve(),this.#ht(),document.addEventListener(`keydown`,this.#rt,{capture:!0,signal:this.#F.signal}),document.addEventListener(`keyup`,this.#it,{capture:!0,signal:this.#F.signal}),window.addEventListener(`blur`,this.#at,{signal:this.#F.signal}),document.addEventListener(`visibilitychange`,this.#at,{signal:this.#F.signal}),document.addEventListener(`pointerdown`,this.#ct,{capture:!0,signal:this.#F.signal}),document.addEventListener(`click`,this.#lt,{capture:!0,signal:this.#F.signal}),document.addEventListener(`focusin`,this.#tt,{capture:!0,signal:this.#F.signal}),document.addEventListener(`scroll`,this.#ft,{capture:!0,passive:!0,signal:this.#F.signal}),window.addEventListener(`scroll`,this.#ft,{passive:!0,signal:this.#F.signal}),window.addEventListener(`resize`,this.#ft,{passive:!0,signal:this.#F.signal}),window.visualViewport?.addEventListener(`scroll`,this.#ft,{passive:!0,signal:this.#F.signal}),window.visualViewport?.addEventListener(`resize`,this.#ft,{passive:!0,signal:this.#F.signal}),window.addEventListener(`online`,this.#fe,{signal:this.#F.signal}),window.addEventListener(`offline`,this.#fe,{signal:this.#F.signal}),await this.#ie())}async#ie(){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.#Ce(),this.#Ae();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,Q(u,d);let f=!1,p=!1,m=n,h=o,g=e=>{i.aborted||r!==this.#M||!this.#F||(f=!0,this.#ue(e))};if(e=c.subscribe(a,e=>{if(!(i.aborted||r!==this.#M||!this.#F)){if(!p){m=e;return}this.#se(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.#le(e)}},g):null,f){Q(e,t);return}if(i.aborted||r!==this.#M||!this.#F){Q(e,t);return}this.#n=e,this.#r=t,e=null,t=null,p=!0,this.#se(m),h&&this.#le(h)}catch(a){if(Q(e,t),i.aborted||r!==this.#M)return;let o=Jn(a)?a:{type:`error`,code:`unknown`,recovery:`retry`,clearSnapshot:!0};this.#ue(o,o.type===`access-lost`),n&&this.#x&&queueMicrotask(()=>this.#e.querySelector(`.rg-feedback-navigator-retry`)?.focus({preventScroll:!0}))}}#ae=new Map;#oe=new Map;#se=e=>{if(this.#A)return;if(this.#s?.pageId===e.pageId){let t=this.#o;this.#o=this.#s,e=this.#ce(e),this.#o=t,this.#s=null}else e=this.#ce(e);for(let[t,n]of[...this.#ae])e.comments.some(({id:e})=>e===t)&&(this.#ae.delete(t),n(!0));for(let[t,{commentId:n,settle:r}]of[...this.#oe])e.replies.some(e=>e.id===t&&e.commentId===n)&&(this.#oe.delete(t),r());this.#E=`ready`,this.#O=`retry`,this.#k=!1,this.#o=e,this.#de(e);let t=!1;if(this.#v&&!e.comments.some(({id:e})=>e===this.#v)){let e=this.#v;t=!0,this.#Q.delete(e),this.#$.delete(e),this.#ee.delete(e),this.#te.delete(e),this.#v=null,this.#y=null,this.#Ye(`열려 있던 피드백이 삭제되었습니다.`)}this.#ve();let n=this.#b;n&&e.comments.some(({id:e})=>e===n)&&(this.#b=null,queueMicrotask(()=>void this.#Ke(n,{origin:`pin`,navigate:!1,announceOpened:!0})));let r=t&&this.#x&&this.#Ne()===`sheet`&&this.#_?this.#De(!1,{restoreFocus:!1,cancelNavigation:!1}):t&&!this.#x?this.#ke():!1;t&&queueMicrotask(()=>{r||(this.#x?this.#Ie():this.#Le()?.focus())})};#ce(e){if(!e.window?.hasMoreComments||!this.#o)return e;let t=new Set([...this.#v?[this.#v]:[],...this.#b?[this.#b]:[],...this.#Q.keys(),...this.#$.keys(),...this.#ee.keys(),...this.#te.keys()]),n=new Set(e.comments.map(({id:e})=>e)),r=this.#o.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.#o.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))}}#le=e=>{this.#A||e.projectId===this.#t?.session.projectId&&(this.#c=e,this.#kt(),this.#Ae(),this.#Me())};#ue(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,this.#be(),e.clearSnapshot&&(this.#o=null,this.#c=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.#$.forEach(({body:e,reply:t},n)=>{this.#Q.set(n,e),this.#te.has(n)||this.#te.set(n,{body:e,reply:t}),this.#ee.has(n)||this.#ee.set(n,`답글을 저장하지 못했습니다. 다시 시도하세요.`)}),this.#g=null,this.#$.clear(),n&&(this.#ne.clear(),this.#s=null,this.#f=null,this.#p=``,this.#m=``,this.#h=null,this.#_=null,this.#v=null,this.#y=null,this.#Q.clear(),this.#ee.clear(),this.#te.clear()),this.#l?this.#Se(!1):this.#Et(),this.#E=`error`,this.#O=e.recovery,this.#k=e.type===`access-lost`,this.#D=e.type===`access-lost`?Yn(e.code):`다시 시도하세요.`,t&&(this.#x=!0),Q(r,i),this.#Ce(),this.#ve(),this.#Ye(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}}))}}#de(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.#Ye(`피드백을 저장했습니다.`),e&&queueMicrotask(()=>this.#e.querySelector(`.rg-feedback-tool`)?.focus({preventScroll:!0}))}new Set([...this.#Q.keys(),...this.#$.keys(),...this.#ee.keys(),...this.#te.keys()]).forEach(n=>{if(!t.has(n)){this.#Q.delete(n),this.#$.delete(n),this.#ee.delete(n),this.#te.delete(n);return}let r=this.#$.get(n),i=this.#te.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.#$.delete(n),o&&this.#te.delete(n),this.#ee.delete(n),this.#Q.delete(n),this.#Ye(`답글을 저장했습니다.`))})}#fe=()=>{this.#P=!navigator.onLine,this.#Ae()};#pe(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.#ne.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.#Q,pendingReplyRequests:this.#$,replySaveErrors:this.#ee,failedReplySaves:this.#te,snapshot:this.#o,restoredSnapshot:this.#s});n&&this.#Ye(`오래된 페이지의 저장되지 않은 초안을 정리했습니다.`)}#me(e){let t=this.#ne.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.#Q.set(t,e)),t.replySaveErrors.forEach((e,t)=>{this.#ee.set(t,e)}),t.failedReplySaves.forEach((e,t)=>{this.#te.set(t,e)}),this.#s=t.snapshotSeed)}#he(e){this.#pe(e),this.#j+=1,this.#Y.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.#ae])this.#ae.delete(e),t(!1);for(let[e,{settle:t}]of[...this.#oe])this.#oe.delete(e),t();this.#l?this.#Se(!1):this.#Et(),this.#o=null,this.#s=null,this.#c=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.#Q.clear(),this.#$.clear(),this.#ee.clear(),this.#te.clear(),Q(t,n)}#ge(){this.#M+=1,this.#N+=1,this.#ot(),this.#dt(),this.#bt(),this.#l&&this.#Se(!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.#be(),this.#F?.abort(),this.#F=null,this.#o=null,this.#s=null,this.#c=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.#Q.clear(),this.#$.clear(),this.#ee.clear(),this.#te.clear(),this.#ne.clear(),this.#e.replaceChildren(),Q(e,t)}#_e(){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=`
|
|
2
|
+
:host {
|
|
3
|
+
all: initial;
|
|
4
|
+
/* The reviewer sees this pin on the staging page and the owner sees the
|
|
5
|
+
same pin in the dashboard, so both surfaces read one value. It is also
|
|
6
|
+
dark enough for the white count badge to clear AA; the previous red sat
|
|
7
|
+
at 3.9:1 behind 8px text. */
|
|
8
|
+
--review-accent: #cf3339;
|
|
9
|
+
position: fixed;
|
|
10
|
+
inset: 0;
|
|
11
|
+
z-index: 2147483000;
|
|
12
|
+
pointer-events: none;
|
|
13
|
+
direction: ltr;
|
|
14
|
+
color: #171918;
|
|
15
|
+
font: 500 14px/1.45 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
* { box-sizing: border-box; }
|
|
19
|
+
button, textarea { font: inherit; }
|
|
20
|
+
|
|
21
|
+
.highlight, .region {
|
|
22
|
+
position: fixed;
|
|
23
|
+
display: none;
|
|
24
|
+
border: 2px solid var(--review-accent);
|
|
25
|
+
border-radius: 6px;
|
|
26
|
+
background: rgba(207, 51, 57, 0.07);
|
|
27
|
+
box-shadow: 0 0 0 1px rgba(255,255,255,.8), 0 0 0 4px rgba(207,51,57,.12);
|
|
28
|
+
}
|
|
29
|
+
.region { border-radius: 4px; }
|
|
30
|
+
.highlight[data-context-target="true"],
|
|
31
|
+
.region[data-context-target="true"] {
|
|
32
|
+
background: rgba(207, 51, 57, 0.05);
|
|
33
|
+
}
|
|
34
|
+
.region[data-point="true"] {
|
|
35
|
+
border-radius: 50%;
|
|
36
|
+
background: rgba(207, 51, 57, 0.14);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.pin {
|
|
40
|
+
position: fixed;
|
|
41
|
+
display: grid;
|
|
42
|
+
place-items: center;
|
|
43
|
+
width: 26px;
|
|
44
|
+
height: 26px;
|
|
45
|
+
padding: 0;
|
|
46
|
+
z-index: 1;
|
|
47
|
+
transform: translate(-8px, -21px);
|
|
48
|
+
pointer-events: auto;
|
|
49
|
+
border: 2px solid #fff;
|
|
50
|
+
border-radius: 50%;
|
|
51
|
+
color: #fff;
|
|
52
|
+
background: #18181b;
|
|
53
|
+
box-shadow:
|
|
54
|
+
0 0 0 1px rgba(0, 0, 0, .18),
|
|
55
|
+
0 2px 6px rgba(0, 0, 0, .28),
|
|
56
|
+
0 6px 16px rgba(0, 0, 0, .14);
|
|
57
|
+
cursor: pointer;
|
|
58
|
+
appearance: none;
|
|
59
|
+
isolation: isolate;
|
|
60
|
+
font: 700 11px/1 Geist, ui-sans-serif, system-ui, sans-serif;
|
|
61
|
+
font-variant-numeric: tabular-nums;
|
|
62
|
+
font-synthesis: none;
|
|
63
|
+
text-shadow: 0 1px 1px rgba(0, 0, 0, .24);
|
|
64
|
+
-webkit-tap-highlight-color: transparent;
|
|
65
|
+
transition:
|
|
66
|
+
opacity 100ms ease-out,
|
|
67
|
+
background 150ms ease-out,
|
|
68
|
+
box-shadow 150ms ease-out,
|
|
69
|
+
transform 300ms var(--rg-ease-spring);
|
|
70
|
+
}
|
|
71
|
+
.pins[data-selection-suppressed="true"] .pin {
|
|
72
|
+
opacity: 0;
|
|
73
|
+
pointer-events: none;
|
|
74
|
+
transform: translate(-8px, -21px) scale(.82);
|
|
75
|
+
transition-duration: 80ms;
|
|
76
|
+
}
|
|
77
|
+
.pin::after {
|
|
78
|
+
position: absolute;
|
|
79
|
+
inset: -2px;
|
|
80
|
+
content: '';
|
|
81
|
+
}
|
|
82
|
+
@media (hover: hover) and (pointer: fine) {
|
|
83
|
+
.pin:hover {
|
|
84
|
+
z-index: 3;
|
|
85
|
+
background: #09090b;
|
|
86
|
+
box-shadow:
|
|
87
|
+
0 0 0 1px rgba(0, 0, 0, .22),
|
|
88
|
+
0 3px 8px rgba(0, 0, 0, .32),
|
|
89
|
+
0 8px 20px rgba(0, 0, 0, .16);
|
|
90
|
+
transform: translate(-8px, -21px) scale(1.1);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
.pin[data-active="true"] {
|
|
94
|
+
z-index: 4;
|
|
95
|
+
background: #18181b;
|
|
96
|
+
box-shadow:
|
|
97
|
+
0 0 0 2px var(--review-accent),
|
|
98
|
+
0 0 0 4px #fff,
|
|
99
|
+
0 5px 16px rgba(0, 0, 0, .3);
|
|
100
|
+
transform: translate(-8px, -21px) scale(1.1);
|
|
101
|
+
}
|
|
102
|
+
.pin:active,
|
|
103
|
+
.pin[data-active="true"]:active {
|
|
104
|
+
transform: translate(-8px, -21px) scale(.96);
|
|
105
|
+
transition-duration: 60ms;
|
|
106
|
+
}
|
|
107
|
+
.pin:focus-visible {
|
|
108
|
+
z-index: 5;
|
|
109
|
+
outline: 3px solid var(--review-accent);
|
|
110
|
+
outline-offset: 3px;
|
|
111
|
+
}
|
|
112
|
+
.pin[data-resolved="true"] {
|
|
113
|
+
color: #fff;
|
|
114
|
+
background: #737373;
|
|
115
|
+
}
|
|
116
|
+
.pin[data-resolved="true"][data-active="true"] { background: #404040; }
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
:host {
|
|
120
|
+
--rg-panel-bg: #151618;
|
|
121
|
+
--rg-panel-secondary: #1d1f22;
|
|
122
|
+
--rg-text-primary: #f4f4f2;
|
|
123
|
+
--rg-text-secondary: #9b9c9f;
|
|
124
|
+
--rg-surface-hover: rgba(255, 255, 255, 0.07);
|
|
125
|
+
--rg-border-subtle: rgba(255, 255, 255, 0.1);
|
|
126
|
+
--rg-submit-bg: #f4f4f2;
|
|
127
|
+
--rg-submit-fg: #151618;
|
|
128
|
+
--rg-status-error: #ff8a8f;
|
|
129
|
+
--rg-shadow: 0 12px 40px rgba(0, 0, 0, 0.34), inset 0 1px rgba(255, 255, 255, 0.04);
|
|
130
|
+
--rg-drop-shadow: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.28));
|
|
131
|
+
--rg-ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
|
|
132
|
+
--rg-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
:host([data-rg-theme="light"]) {
|
|
136
|
+
--rg-panel-bg: #ffffff;
|
|
137
|
+
--rg-panel-secondary: #f5f5f5;
|
|
138
|
+
--rg-text-primary: #171717;
|
|
139
|
+
--rg-text-secondary: #737373;
|
|
140
|
+
--rg-surface-hover: rgba(0, 0, 0, 0.05);
|
|
141
|
+
--rg-border-subtle: rgba(0, 0, 0, 0.08);
|
|
142
|
+
--rg-submit-bg: #171717;
|
|
143
|
+
--rg-submit-fg: #ffffff;
|
|
144
|
+
--rg-status-error: #b42318;
|
|
145
|
+
--rg-shadow: 0 10px 32px rgba(0, 0, 0, 0.16), inset 0 1px rgba(255, 255, 255, 0.7);
|
|
146
|
+
--rg-drop-shadow: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.14));
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.rg-toolbar {
|
|
150
|
+
--rg-toolbar-offset-x: 0px;
|
|
151
|
+
--rg-toolbar-offset-y: 0px;
|
|
152
|
+
--rg-collapse-duration: 220ms;
|
|
153
|
+
position: fixed;
|
|
154
|
+
top: auto;
|
|
155
|
+
right: max(12px, env(safe-area-inset-right));
|
|
156
|
+
bottom: max(12px, env(safe-area-inset-bottom));
|
|
157
|
+
left: auto;
|
|
158
|
+
translate: var(--rg-toolbar-offset-x) var(--rg-toolbar-offset-y);
|
|
159
|
+
display: flex;
|
|
160
|
+
align-items: center;
|
|
161
|
+
justify-content: center;
|
|
162
|
+
width: max-content;
|
|
163
|
+
height: max-content;
|
|
164
|
+
min-width: 0;
|
|
165
|
+
min-height: 28px;
|
|
166
|
+
padding: 2px 4px;
|
|
167
|
+
pointer-events: auto;
|
|
168
|
+
border: .5px solid var(--rg-border-subtle);
|
|
169
|
+
border-radius: 13px;
|
|
170
|
+
color: var(--rg-text-secondary);
|
|
171
|
+
background: var(--rg-panel-bg);
|
|
172
|
+
box-shadow: var(--rg-shadow);
|
|
173
|
+
font: 500 13px/16px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
174
|
+
font-synthesis: none;
|
|
175
|
+
z-index: 2147483647;
|
|
176
|
+
transition:
|
|
177
|
+
padding var(--rg-collapse-duration) var(--rg-ease-drawer),
|
|
178
|
+
border-radius var(--rg-collapse-duration) var(--rg-ease-drawer),
|
|
179
|
+
opacity 400ms var(--rg-ease-drawer),
|
|
180
|
+
transform 400ms var(--rg-ease-drawer);
|
|
181
|
+
}
|
|
182
|
+
.rg-toolbar[data-dock-managed="true"] {
|
|
183
|
+
touch-action: none;
|
|
184
|
+
user-select: none;
|
|
185
|
+
cursor: grab;
|
|
186
|
+
}
|
|
187
|
+
.rg-toolbar[data-dragging="true"] {
|
|
188
|
+
cursor: grabbing;
|
|
189
|
+
transition: none;
|
|
190
|
+
}
|
|
191
|
+
.rg-toolbar[data-dragging="true"] * { cursor: grabbing; }
|
|
192
|
+
.rg-toolbar[data-collapse-animating="true"] {
|
|
193
|
+
transition:
|
|
194
|
+
top var(--rg-collapse-duration) var(--rg-ease-drawer),
|
|
195
|
+
left var(--rg-collapse-duration) var(--rg-ease-drawer),
|
|
196
|
+
padding var(--rg-collapse-duration) var(--rg-ease-drawer),
|
|
197
|
+
border-radius var(--rg-collapse-duration) var(--rg-ease-drawer),
|
|
198
|
+
opacity 400ms var(--rg-ease-drawer),
|
|
199
|
+
transform 400ms var(--rg-ease-drawer);
|
|
200
|
+
}
|
|
201
|
+
.rg-toolbar[data-snapping="true"] {
|
|
202
|
+
transition:
|
|
203
|
+
top 300ms var(--rg-ease-drawer),
|
|
204
|
+
left 300ms var(--rg-ease-drawer),
|
|
205
|
+
padding 220ms var(--rg-ease-drawer),
|
|
206
|
+
border-radius 220ms var(--rg-ease-drawer),
|
|
207
|
+
opacity 400ms var(--rg-ease-drawer),
|
|
208
|
+
transform 400ms var(--rg-ease-drawer);
|
|
209
|
+
}
|
|
210
|
+
.rg-toolbar[data-position="top-left"] {
|
|
211
|
+
top: max(12px, env(safe-area-inset-top));
|
|
212
|
+
right: auto;
|
|
213
|
+
bottom: auto;
|
|
214
|
+
left: max(12px, env(safe-area-inset-left));
|
|
215
|
+
}
|
|
216
|
+
.rg-toolbar[data-position="top"] {
|
|
217
|
+
top: max(12px, env(safe-area-inset-top));
|
|
218
|
+
right: auto;
|
|
219
|
+
bottom: auto;
|
|
220
|
+
left: 50%;
|
|
221
|
+
translate: calc(-50% + var(--rg-toolbar-offset-x)) var(--rg-toolbar-offset-y);
|
|
222
|
+
}
|
|
223
|
+
.rg-toolbar[data-position="top-right"] {
|
|
224
|
+
top: max(12px, env(safe-area-inset-top));
|
|
225
|
+
right: max(12px, env(safe-area-inset-right));
|
|
226
|
+
bottom: auto;
|
|
227
|
+
left: auto;
|
|
228
|
+
}
|
|
229
|
+
.rg-toolbar[data-position="right"] {
|
|
230
|
+
top: 50%;
|
|
231
|
+
right: max(12px, env(safe-area-inset-right));
|
|
232
|
+
bottom: auto;
|
|
233
|
+
left: auto;
|
|
234
|
+
translate: var(--rg-toolbar-offset-x) calc(-50% + var(--rg-toolbar-offset-y));
|
|
235
|
+
}
|
|
236
|
+
.rg-toolbar[data-position="bottom-right"] {
|
|
237
|
+
top: auto;
|
|
238
|
+
right: max(12px, env(safe-area-inset-right));
|
|
239
|
+
bottom: max(12px, env(safe-area-inset-bottom));
|
|
240
|
+
left: auto;
|
|
241
|
+
}
|
|
242
|
+
.rg-toolbar[data-position="bottom"] {
|
|
243
|
+
top: auto;
|
|
244
|
+
right: auto;
|
|
245
|
+
bottom: max(12px, env(safe-area-inset-bottom));
|
|
246
|
+
left: 50%;
|
|
247
|
+
translate: calc(-50% + var(--rg-toolbar-offset-x)) var(--rg-toolbar-offset-y);
|
|
248
|
+
}
|
|
249
|
+
.rg-toolbar[data-position="bottom-left"] {
|
|
250
|
+
top: auto;
|
|
251
|
+
right: auto;
|
|
252
|
+
bottom: max(12px, env(safe-area-inset-bottom));
|
|
253
|
+
left: max(12px, env(safe-area-inset-left));
|
|
254
|
+
}
|
|
255
|
+
.rg-toolbar[data-position="left"] {
|
|
256
|
+
top: 50%;
|
|
257
|
+
right: auto;
|
|
258
|
+
bottom: auto;
|
|
259
|
+
left: max(12px, env(safe-area-inset-left));
|
|
260
|
+
translate: var(--rg-toolbar-offset-x) calc(-50% + var(--rg-toolbar-offset-y));
|
|
261
|
+
}
|
|
262
|
+
.rg-toolbar-actions-shell {
|
|
263
|
+
display: grid;
|
|
264
|
+
grid-template-columns: 1fr;
|
|
265
|
+
min-width: 0;
|
|
266
|
+
overflow: visible;
|
|
267
|
+
transition: grid-template-columns var(--rg-collapse-duration) var(--rg-ease-drawer);
|
|
268
|
+
}
|
|
269
|
+
.rg-toolbar-actions {
|
|
270
|
+
display: flex;
|
|
271
|
+
align-items: center;
|
|
272
|
+
min-width: 0;
|
|
273
|
+
opacity: 1;
|
|
274
|
+
transition: opacity 180ms var(--rg-ease-drawer) 80ms;
|
|
275
|
+
}
|
|
276
|
+
.rg-action-wrap {
|
|
277
|
+
position: relative;
|
|
278
|
+
display: flex;
|
|
279
|
+
align-items: center;
|
|
280
|
+
justify-content: center;
|
|
281
|
+
width: 24px;
|
|
282
|
+
height: 24px;
|
|
283
|
+
margin-right: 0;
|
|
284
|
+
}
|
|
285
|
+
.rg-action, .rg-collapse, .rg-submit {
|
|
286
|
+
all: unset;
|
|
287
|
+
display: flex;
|
|
288
|
+
align-items: center;
|
|
289
|
+
justify-content: center;
|
|
290
|
+
flex: none;
|
|
291
|
+
cursor: pointer;
|
|
292
|
+
color: var(--rg-text-secondary);
|
|
293
|
+
-webkit-tap-highlight-color: transparent;
|
|
294
|
+
transition: color 150ms var(--rg-ease-drawer), transform 400ms var(--rg-ease-spring);
|
|
295
|
+
}
|
|
296
|
+
.rg-submit::after {
|
|
297
|
+
position: absolute;
|
|
298
|
+
width: max(24px, 100%);
|
|
299
|
+
height: max(24px, 100%);
|
|
300
|
+
content: '';
|
|
301
|
+
}
|
|
302
|
+
.rg-action, .rg-collapse, .rg-submit { position: relative; }
|
|
303
|
+
.rg-action:focus-visible,
|
|
304
|
+
.rg-collapse:focus-visible,
|
|
305
|
+
.rg-submit:focus-visible,
|
|
306
|
+
.rg-thread-close:focus-visible {
|
|
307
|
+
outline: 2px solid var(--review-accent);
|
|
308
|
+
outline-offset: 3px;
|
|
309
|
+
}
|
|
310
|
+
.rg-action { width: 24px; height: 24px; }
|
|
311
|
+
.rg-action svg { width: 14px; height: 14px; fill: currentColor; }
|
|
312
|
+
.rg-action:hover,
|
|
313
|
+
.rg-action[aria-pressed="true"],
|
|
314
|
+
.rg-feedback-list-tool[aria-expanded="true"],
|
|
315
|
+
.rg-collapse:hover {
|
|
316
|
+
color: var(--rg-text-primary);
|
|
317
|
+
}
|
|
318
|
+
@media (hover: hover) and (pointer: fine) {
|
|
319
|
+
.rg-action:hover, .rg-collapse:hover, .rg-submit:hover { transform: scale(1.05); }
|
|
320
|
+
}
|
|
321
|
+
.rg-action:active, .rg-collapse:active, .rg-submit:active {
|
|
322
|
+
transform: scale(.96);
|
|
323
|
+
transition-duration: 60ms;
|
|
324
|
+
transition-timing-function: cubic-bezier(0, 0, .2, 1);
|
|
325
|
+
}
|
|
326
|
+
.rg-collapse { width: 24px; height: 24px; }
|
|
327
|
+
.rg-collapse svg {
|
|
328
|
+
width: 18px;
|
|
329
|
+
height: 18px;
|
|
330
|
+
margin: -2px;
|
|
331
|
+
fill: currentColor;
|
|
332
|
+
transform: rotate(90deg);
|
|
333
|
+
transition: transform 150ms var(--rg-ease-drawer), color 150ms var(--rg-ease-drawer);
|
|
334
|
+
}
|
|
335
|
+
.rg-tooltip {
|
|
336
|
+
position: absolute;
|
|
337
|
+
left: 50%;
|
|
338
|
+
bottom: calc(100% + 10px);
|
|
339
|
+
transform: translate(-50%, 2px) scale(.97);
|
|
340
|
+
padding: 2px 8px;
|
|
341
|
+
pointer-events: none;
|
|
342
|
+
border-radius: 999px;
|
|
343
|
+
color: var(--rg-text-primary);
|
|
344
|
+
background: var(--rg-panel-bg);
|
|
345
|
+
box-shadow: var(--rg-shadow);
|
|
346
|
+
opacity: 0;
|
|
347
|
+
font: 500 10px/16px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
348
|
+
white-space: nowrap;
|
|
349
|
+
transition: opacity 100ms ease-out, transform 100ms ease-out;
|
|
350
|
+
transition-delay: 0ms;
|
|
351
|
+
}
|
|
352
|
+
.rg-action-wrap:hover .rg-tooltip, .rg-action-wrap:focus-within .rg-tooltip {
|
|
353
|
+
transform: translate(-50%, 0) scale(1);
|
|
354
|
+
opacity: 1;
|
|
355
|
+
transition-delay: 400ms;
|
|
356
|
+
}
|
|
357
|
+
.rg-toolbar[data-selecting="true"]:not(:hover) {
|
|
358
|
+
transform: scale(.97);
|
|
359
|
+
opacity: .55;
|
|
360
|
+
}
|
|
361
|
+
.rg-toolbar[data-selecting="true"] .rg-tooltip,
|
|
362
|
+
.rg-toolbar[data-collapsed="true"] .rg-tooltip { display: none; }
|
|
363
|
+
.rg-toolbar[data-collapsed="true"] {
|
|
364
|
+
padding: 1px 3px;
|
|
365
|
+
}
|
|
366
|
+
.rg-toolbar[data-position^="top"][data-collapsed="true"] {
|
|
367
|
+
top: 0;
|
|
368
|
+
padding: 1px 3px;
|
|
369
|
+
border-radius: 0 0 10px 10px;
|
|
370
|
+
}
|
|
371
|
+
.rg-toolbar[data-position^="bottom"][data-collapsed="true"] {
|
|
372
|
+
bottom: 0;
|
|
373
|
+
border-radius: 10px 10px 0 0;
|
|
374
|
+
}
|
|
375
|
+
.rg-toolbar[data-position="left"][data-collapsed="true"] {
|
|
376
|
+
left: 0;
|
|
377
|
+
border-radius: 0 10px 10px 0;
|
|
378
|
+
}
|
|
379
|
+
.rg-toolbar[data-position="right"][data-collapsed="true"] {
|
|
380
|
+
right: 0;
|
|
381
|
+
border-radius: 10px 0 0 10px;
|
|
382
|
+
}
|
|
383
|
+
.rg-toolbar[data-collapsed="true"] .rg-toolbar-actions-shell {
|
|
384
|
+
grid-template-columns: 0fr;
|
|
385
|
+
pointer-events: none;
|
|
386
|
+
}
|
|
387
|
+
.rg-toolbar[data-collapsed="true"] .rg-toolbar-actions {
|
|
388
|
+
overflow: hidden;
|
|
389
|
+
opacity: 0;
|
|
390
|
+
transition: opacity 100ms var(--rg-ease-drawer);
|
|
391
|
+
}
|
|
392
|
+
.rg-toolbar[data-collapsed="true"] .rg-collapse svg { transform: rotate(-90deg); }
|
|
393
|
+
.rg-toolbar[data-position^="top"] .rg-collapse svg { transform: rotate(-90deg); }
|
|
394
|
+
.rg-toolbar[data-position^="top"][data-collapsed="true"] .rg-collapse svg {
|
|
395
|
+
transform: rotate(90deg);
|
|
396
|
+
}
|
|
397
|
+
.rg-toolbar[data-position="left"] .rg-collapse svg { transform: rotate(180deg); }
|
|
398
|
+
.rg-toolbar[data-position="left"][data-collapsed="true"] .rg-collapse svg {
|
|
399
|
+
transform: rotate(0deg);
|
|
400
|
+
}
|
|
401
|
+
.rg-toolbar[data-position="right"] .rg-collapse svg { transform: rotate(0deg); }
|
|
402
|
+
.rg-toolbar[data-position="right"][data-collapsed="true"] .rg-collapse svg {
|
|
403
|
+
transform: rotate(180deg);
|
|
404
|
+
}
|
|
405
|
+
.rg-toolbar[data-dock-edge="left"],
|
|
406
|
+
.rg-toolbar[data-dock-edge="right"] {
|
|
407
|
+
flex-direction: column;
|
|
408
|
+
}
|
|
409
|
+
.rg-toolbar[data-dock-edge="left"] .rg-toolbar-actions-shell,
|
|
410
|
+
.rg-toolbar[data-dock-edge="right"] .rg-toolbar-actions-shell {
|
|
411
|
+
grid-template-columns: 1fr;
|
|
412
|
+
grid-template-rows: 1fr;
|
|
413
|
+
min-height: 0;
|
|
414
|
+
transition: grid-template-rows var(--rg-collapse-duration) var(--rg-ease-drawer);
|
|
415
|
+
}
|
|
416
|
+
.rg-toolbar[data-dock-edge="left"] .rg-toolbar-actions,
|
|
417
|
+
.rg-toolbar[data-dock-edge="right"] .rg-toolbar-actions {
|
|
418
|
+
flex-direction: column;
|
|
419
|
+
min-height: 0;
|
|
420
|
+
}
|
|
421
|
+
.rg-toolbar[data-dock-edge="left"] .rg-action-wrap,
|
|
422
|
+
.rg-toolbar[data-dock-edge="right"] .rg-action-wrap {
|
|
423
|
+
margin-right: 0;
|
|
424
|
+
margin-bottom: 0;
|
|
425
|
+
}
|
|
426
|
+
.rg-toolbar[data-dock-edge="left"][data-collapsed="true"] .rg-toolbar-actions-shell,
|
|
427
|
+
.rg-toolbar[data-dock-edge="right"][data-collapsed="true"] .rg-toolbar-actions-shell {
|
|
428
|
+
grid-template-columns: 1fr;
|
|
429
|
+
grid-template-rows: 0fr;
|
|
430
|
+
}
|
|
431
|
+
.rg-toolbar[data-dock-edge="left"][data-collapsed="true"],
|
|
432
|
+
.rg-toolbar[data-dock-edge="right"][data-collapsed="true"] {
|
|
433
|
+
padding: 3px 1px;
|
|
434
|
+
}
|
|
435
|
+
.rg-toolbar[data-dock-edge="top"] .rg-collapse svg { transform: rotate(-90deg); }
|
|
436
|
+
.rg-toolbar[data-dock-edge="top"][data-collapsed="true"] .rg-collapse svg {
|
|
437
|
+
transform: rotate(90deg);
|
|
438
|
+
}
|
|
439
|
+
.rg-toolbar[data-dock-edge="bottom"] .rg-collapse svg { transform: rotate(90deg); }
|
|
440
|
+
.rg-toolbar[data-dock-edge="bottom"][data-collapsed="true"] .rg-collapse svg {
|
|
441
|
+
transform: rotate(-90deg);
|
|
442
|
+
}
|
|
443
|
+
.rg-toolbar[data-dock-edge="left"] .rg-collapse svg { transform: rotate(180deg); }
|
|
444
|
+
.rg-toolbar[data-dock-edge="left"][data-collapsed="true"] .rg-collapse svg {
|
|
445
|
+
transform: rotate(0deg);
|
|
446
|
+
}
|
|
447
|
+
.rg-toolbar[data-dock-edge="right"] .rg-collapse svg { transform: rotate(0deg); }
|
|
448
|
+
.rg-toolbar[data-dock-edge="right"][data-collapsed="true"] .rg-collapse svg {
|
|
449
|
+
transform: rotate(180deg);
|
|
450
|
+
}
|
|
451
|
+
.rg-toolbar[data-dock-edge="left"] .rg-tooltip {
|
|
452
|
+
top: 50%;
|
|
453
|
+
right: auto;
|
|
454
|
+
bottom: auto;
|
|
455
|
+
left: calc(100% + 10px);
|
|
456
|
+
transform: translate(2px, -50%) scale(.97);
|
|
457
|
+
}
|
|
458
|
+
.rg-toolbar[data-dock-edge="right"] .rg-tooltip {
|
|
459
|
+
top: 50%;
|
|
460
|
+
right: calc(100% + 10px);
|
|
461
|
+
bottom: auto;
|
|
462
|
+
left: auto;
|
|
463
|
+
transform: translate(-2px, -50%) scale(.97);
|
|
464
|
+
}
|
|
465
|
+
.rg-toolbar[data-dock-edge="left"] .rg-action-wrap:hover .rg-tooltip,
|
|
466
|
+
.rg-toolbar[data-dock-edge="left"] .rg-action-wrap:focus-within .rg-tooltip,
|
|
467
|
+
.rg-toolbar[data-dock-edge="right"] .rg-action-wrap:hover .rg-tooltip,
|
|
468
|
+
.rg-toolbar[data-dock-edge="right"] .rg-action-wrap:focus-within .rg-tooltip {
|
|
469
|
+
transform: translate(0, -50%) scale(1);
|
|
470
|
+
}
|
|
471
|
+
.rg-toolbar[data-position^="top"] .rg-tooltip {
|
|
472
|
+
top: calc(100% + 10px);
|
|
473
|
+
bottom: auto;
|
|
474
|
+
}
|
|
475
|
+
.rg-selection-label {
|
|
476
|
+
position: fixed;
|
|
477
|
+
transform: translateX(-50%);
|
|
478
|
+
z-index: 2147483002;
|
|
479
|
+
width: min(264px, calc(100vw - 16px));
|
|
480
|
+
min-width: 0;
|
|
481
|
+
max-width: none;
|
|
482
|
+
pointer-events: auto;
|
|
483
|
+
color: var(--rg-text-primary);
|
|
484
|
+
filter: var(--rg-drop-shadow);
|
|
485
|
+
font: 500 13px/16px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
486
|
+
font-synthesis: none;
|
|
487
|
+
transition: opacity 125ms ease-out, filter 125ms ease-out;
|
|
488
|
+
}
|
|
489
|
+
.rg-selection-label:focus { outline: none; }
|
|
490
|
+
.rg-surface {
|
|
491
|
+
overflow: hidden;
|
|
492
|
+
width: 100%;
|
|
493
|
+
min-width: 0;
|
|
494
|
+
max-width: none;
|
|
495
|
+
border: .5px solid var(--rg-border-subtle);
|
|
496
|
+
border-radius: 8px;
|
|
497
|
+
corner-shape: superellipse(1.25);
|
|
498
|
+
background: var(--rg-panel-bg);
|
|
499
|
+
}
|
|
500
|
+
.rg-tag-row {
|
|
501
|
+
display: flex;
|
|
502
|
+
align-items: center;
|
|
503
|
+
max-width: none;
|
|
504
|
+
padding: 4px 7px 3px;
|
|
505
|
+
overflow: hidden;
|
|
506
|
+
}
|
|
507
|
+
.rg-tag {
|
|
508
|
+
overflow: hidden;
|
|
509
|
+
color: var(--rg-text-primary);
|
|
510
|
+
text-overflow: ellipsis;
|
|
511
|
+
white-space: nowrap;
|
|
512
|
+
}
|
|
513
|
+
.rg-bottom-section {
|
|
514
|
+
display: flex;
|
|
515
|
+
align-items: center;
|
|
516
|
+
width: auto;
|
|
517
|
+
min-height: 38px;
|
|
518
|
+
padding: 4px 7px;
|
|
519
|
+
border-top: .5px solid var(--rg-border-subtle);
|
|
520
|
+
}
|
|
521
|
+
.rg-bottom-section textarea {
|
|
522
|
+
flex: 1;
|
|
523
|
+
field-sizing: content;
|
|
524
|
+
min-width: 0;
|
|
525
|
+
min-height: 28px;
|
|
526
|
+
max-height: 84px;
|
|
527
|
+
margin: 0;
|
|
528
|
+
padding: 0;
|
|
529
|
+
resize: none;
|
|
530
|
+
outline: none;
|
|
531
|
+
border: 0;
|
|
532
|
+
border-radius: 0;
|
|
533
|
+
color: var(--rg-text-primary);
|
|
534
|
+
background: transparent;
|
|
535
|
+
box-shadow: none;
|
|
536
|
+
overflow-y: auto;
|
|
537
|
+
scrollbar-width: none;
|
|
538
|
+
font: 500 12px/16px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
539
|
+
overflow-wrap: break-word;
|
|
540
|
+
word-break: keep-all;
|
|
541
|
+
}
|
|
542
|
+
.rg-bottom-section textarea::placeholder { color: var(--rg-text-secondary); }
|
|
543
|
+
.rg-thread-label .rg-surface {
|
|
544
|
+
display: flex;
|
|
545
|
+
flex-direction: column;
|
|
546
|
+
width: min(264px, calc(100vw - 16px));
|
|
547
|
+
max-height: min(340px, calc(100vh - 16px));
|
|
548
|
+
max-height: min(340px, calc(100dvh - 16px));
|
|
549
|
+
}
|
|
550
|
+
.rg-thread-label .rg-tag-row { flex: none; gap: 8px; }
|
|
551
|
+
.rg-thread-close {
|
|
552
|
+
all: unset;
|
|
553
|
+
position: relative;
|
|
554
|
+
display: flex;
|
|
555
|
+
align-items: center;
|
|
556
|
+
justify-content: center;
|
|
557
|
+
flex: none;
|
|
558
|
+
width: 28px;
|
|
559
|
+
height: 28px;
|
|
560
|
+
margin-left: auto;
|
|
561
|
+
color: var(--rg-text-secondary);
|
|
562
|
+
cursor: pointer;
|
|
563
|
+
-webkit-tap-highlight-color: transparent;
|
|
564
|
+
transition: color 150ms var(--rg-ease-drawer), transform 400ms var(--rg-ease-spring);
|
|
565
|
+
}
|
|
566
|
+
.rg-thread-close::after {
|
|
567
|
+
position: absolute;
|
|
568
|
+
width: 44px;
|
|
569
|
+
height: 44px;
|
|
570
|
+
content: '';
|
|
571
|
+
}
|
|
572
|
+
.rg-thread-close svg { width: 10px; height: 10px; fill: currentColor; }
|
|
573
|
+
.rg-thread-close:hover { color: var(--rg-text-primary); }
|
|
574
|
+
.rg-thread-close:active {
|
|
575
|
+
transform: scale(.96);
|
|
576
|
+
transition-duration: 60ms;
|
|
577
|
+
}
|
|
578
|
+
.rg-thread-messages {
|
|
579
|
+
min-height: 0;
|
|
580
|
+
overflow: auto;
|
|
581
|
+
scrollbar-width: none;
|
|
582
|
+
border-top: .5px solid var(--rg-border-subtle);
|
|
583
|
+
}
|
|
584
|
+
.rg-thread-messages::-webkit-scrollbar { display: none; }
|
|
585
|
+
.rg-message { padding: 5px 7px; }
|
|
586
|
+
.rg-message + .rg-message { border-top: .5px solid var(--rg-border-subtle); }
|
|
587
|
+
.rg-message-meta {
|
|
588
|
+
overflow: hidden;
|
|
589
|
+
color: var(--rg-text-secondary);
|
|
590
|
+
font: 500 10px/14px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
591
|
+
text-overflow: ellipsis;
|
|
592
|
+
white-space: nowrap;
|
|
593
|
+
}
|
|
594
|
+
.rg-message-body {
|
|
595
|
+
margin: 2px 0 0;
|
|
596
|
+
color: var(--rg-text-primary);
|
|
597
|
+
font: 500 12px/16px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
598
|
+
overflow-wrap: anywhere;
|
|
599
|
+
white-space: pre-wrap;
|
|
600
|
+
}
|
|
601
|
+
.rg-thread-label .rg-bottom-section { flex: none; }
|
|
602
|
+
.rg-submit {
|
|
603
|
+
width: 28px;
|
|
604
|
+
height: 28px;
|
|
605
|
+
margin-left: 3px;
|
|
606
|
+
border-radius: 50%;
|
|
607
|
+
color: var(--rg-submit-fg);
|
|
608
|
+
background: var(--rg-submit-bg);
|
|
609
|
+
}
|
|
610
|
+
.rg-submit svg { width: 10px; height: 10px; fill: currentColor; }
|
|
611
|
+
.rg-submit:disabled { cursor: wait; opacity: .5; }
|
|
612
|
+
.rg-label-arrow {
|
|
613
|
+
position: absolute;
|
|
614
|
+
left: var(--rg-arrow-left, 50%);
|
|
615
|
+
display: block;
|
|
616
|
+
width: 16px;
|
|
617
|
+
height: 8px;
|
|
618
|
+
translate: -50% 0;
|
|
619
|
+
fill: var(--rg-panel-bg);
|
|
620
|
+
}
|
|
621
|
+
.rg-selection-label[data-side="below"] .rg-label-arrow {
|
|
622
|
+
top: -7px;
|
|
623
|
+
}
|
|
624
|
+
.rg-selection-label[data-side="above"] .rg-label-arrow {
|
|
625
|
+
bottom: -7px;
|
|
626
|
+
transform: rotate(180deg);
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
@media (hover: none), (pointer: coarse) {
|
|
630
|
+
.rg-thread-close::after,
|
|
631
|
+
.rg-submit::after {
|
|
632
|
+
width: 100%;
|
|
633
|
+
height: 100%;
|
|
634
|
+
}
|
|
635
|
+
.rg-thread-label .rg-tag-row,
|
|
636
|
+
.rg-thread-label .rg-bottom-section {
|
|
637
|
+
min-height: 44px;
|
|
638
|
+
padding-top: 0;
|
|
639
|
+
padding-bottom: 0;
|
|
640
|
+
}
|
|
641
|
+
.rg-thread-close,
|
|
642
|
+
.rg-submit {
|
|
643
|
+
width: 44px;
|
|
644
|
+
height: 44px;
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
@media (max-width: 640px) {
|
|
649
|
+
.rg-selection-label {
|
|
650
|
+
width: min(360px, calc(100vw - 16px));
|
|
651
|
+
}
|
|
652
|
+
.rg-thread-label .rg-tag-row,
|
|
653
|
+
.rg-thread-label .rg-bottom-section {
|
|
654
|
+
min-height: 44px;
|
|
655
|
+
}
|
|
656
|
+
.rg-thread-close,
|
|
657
|
+
.rg-submit {
|
|
658
|
+
width: 44px;
|
|
659
|
+
height: 44px;
|
|
660
|
+
}
|
|
661
|
+
.rg-toolbar[data-mobile-position="bottom-left"] {
|
|
662
|
+
top: auto;
|
|
663
|
+
right: auto;
|
|
664
|
+
bottom: max(16px, env(safe-area-inset-bottom));
|
|
665
|
+
left: max(16px, env(safe-area-inset-left));
|
|
666
|
+
translate: var(--rg-toolbar-offset-x) var(--rg-toolbar-offset-y);
|
|
667
|
+
}
|
|
668
|
+
.rg-toolbar[data-mobile-position="bottom-right"] {
|
|
669
|
+
top: auto;
|
|
670
|
+
right: max(16px, env(safe-area-inset-right));
|
|
671
|
+
bottom: max(16px, env(safe-area-inset-bottom));
|
|
672
|
+
left: auto;
|
|
673
|
+
translate: var(--rg-toolbar-offset-x) var(--rg-toolbar-offset-y);
|
|
674
|
+
}
|
|
675
|
+
.rg-toolbar[data-mobile-position][data-collapsed="true"] {
|
|
676
|
+
top: auto;
|
|
677
|
+
bottom: 0;
|
|
678
|
+
padding: 1px 3px;
|
|
679
|
+
border-radius: 10px 10px 0 0;
|
|
680
|
+
}
|
|
681
|
+
.rg-toolbar[data-dock-edge="left"][data-collapsed="true"],
|
|
682
|
+
.rg-toolbar[data-dock-edge="right"][data-collapsed="true"] {
|
|
683
|
+
padding: 3px 1px;
|
|
684
|
+
}
|
|
685
|
+
.rg-toolbar[data-mobile-position] .rg-collapse svg { transform: rotate(90deg); }
|
|
686
|
+
.rg-toolbar[data-mobile-position][data-collapsed="true"] .rg-collapse svg {
|
|
687
|
+
transform: rotate(-90deg);
|
|
688
|
+
}
|
|
689
|
+
.rg-toolbar[data-mobile-position] .rg-tooltip {
|
|
690
|
+
top: auto;
|
|
691
|
+
bottom: calc(100% + 10px);
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
@media (prefers-reduced-motion: reduce) {
|
|
696
|
+
.rg-toolbar, .rg-toolbar *, .rg-selection-label, .rg-selection-label * {
|
|
697
|
+
animation: none !important;
|
|
698
|
+
transition: none !important;
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
@supports (-webkit-touch-callout: none) {
|
|
703
|
+
.rg-bottom-section textarea { font-size: 16px; }
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
|
|
707
|
+
.rg-visually-hidden {
|
|
708
|
+
position: fixed;
|
|
709
|
+
width: 1px;
|
|
710
|
+
height: 1px;
|
|
711
|
+
padding: 0;
|
|
712
|
+
overflow: hidden;
|
|
713
|
+
clip: rect(0 0 0 0);
|
|
714
|
+
clip-path: inset(50%);
|
|
715
|
+
white-space: nowrap;
|
|
716
|
+
border: 0;
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
.rg-feedback-navigator-scrim {
|
|
720
|
+
display: none;
|
|
721
|
+
position: fixed;
|
|
722
|
+
inset: 0;
|
|
723
|
+
z-index: 2147483001;
|
|
724
|
+
pointer-events: auto;
|
|
725
|
+
background: rgba(0, 0, 0, .08);
|
|
726
|
+
touch-action: none;
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
.rg-feedback-navigator {
|
|
730
|
+
position: fixed;
|
|
731
|
+
right: auto;
|
|
732
|
+
bottom: calc(max(12px, env(safe-area-inset-bottom)) + 32px);
|
|
733
|
+
left: max(8px, calc(50% - 160px));
|
|
734
|
+
z-index: 2147483646;
|
|
735
|
+
display: flex;
|
|
736
|
+
flex-direction: column;
|
|
737
|
+
width: min(320px, calc(100vw - 16px));
|
|
738
|
+
max-height: min(380px, calc(100dvh - 58px));
|
|
739
|
+
overflow: hidden;
|
|
740
|
+
pointer-events: auto;
|
|
741
|
+
border: .5px solid var(--rg-border-subtle);
|
|
742
|
+
border-radius: 8px;
|
|
743
|
+
corner-shape: superellipse(1.25);
|
|
744
|
+
color: var(--rg-text-primary);
|
|
745
|
+
background: var(--rg-panel-bg);
|
|
746
|
+
box-shadow: var(--rg-shadow);
|
|
747
|
+
font: 500 13px/16px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
748
|
+
font-synthesis: none;
|
|
749
|
+
transform-origin: var(--rg-navigator-origin, 50% calc(100% + 8px));
|
|
750
|
+
}
|
|
751
|
+
.rg-feedback-navigator[data-motion="enter"] {
|
|
752
|
+
animation: rg-feedback-navigator-enter 220ms var(--rg-ease-spring) both;
|
|
753
|
+
}
|
|
754
|
+
.rg-feedback-navigator-detail {
|
|
755
|
+
position: absolute;
|
|
756
|
+
inset: 0;
|
|
757
|
+
z-index: 1;
|
|
758
|
+
display: flex;
|
|
759
|
+
min-width: 0;
|
|
760
|
+
min-height: 0;
|
|
761
|
+
background: var(--rg-panel-bg);
|
|
762
|
+
}
|
|
763
|
+
.rg-feedback-navigator[data-presentation="sheet"][data-detail-open="true"] {
|
|
764
|
+
height: min(360px, calc(100dvh - 96px));
|
|
765
|
+
}
|
|
766
|
+
.rg-feedback-navigator[data-presentation="sheet"][data-detail-open="true"]
|
|
767
|
+
> :not(.rg-feedback-navigator-detail) {
|
|
768
|
+
visibility: hidden;
|
|
769
|
+
pointer-events: none;
|
|
770
|
+
}
|
|
771
|
+
.rg-feedback-navigator-detail .rg-feedback-navigator-thread {
|
|
772
|
+
position: relative !important;
|
|
773
|
+
top: auto !important;
|
|
774
|
+
left: auto !important;
|
|
775
|
+
display: flex;
|
|
776
|
+
flex: 1;
|
|
777
|
+
width: 100%;
|
|
778
|
+
min-width: 0;
|
|
779
|
+
opacity: 1 !important;
|
|
780
|
+
filter: none;
|
|
781
|
+
transform: none !important;
|
|
782
|
+
}
|
|
783
|
+
.rg-feedback-navigator-detail .rg-feedback-navigator-thread .rg-surface {
|
|
784
|
+
display: flex;
|
|
785
|
+
flex: 1;
|
|
786
|
+
flex-direction: column;
|
|
787
|
+
width: 100%;
|
|
788
|
+
max-height: none;
|
|
789
|
+
border: 0;
|
|
790
|
+
border-radius: inherit;
|
|
791
|
+
}
|
|
792
|
+
.rg-feedback-navigator-detail .rg-thread-messages {
|
|
793
|
+
flex: 1;
|
|
794
|
+
}
|
|
795
|
+
.rg-thread-partial-notice {
|
|
796
|
+
padding: 6px 8px;
|
|
797
|
+
border-radius: 6px;
|
|
798
|
+
color: var(--rg-text-secondary);
|
|
799
|
+
background: var(--rg-surface-hover);
|
|
800
|
+
font: 500 10px/14px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
801
|
+
text-align: center;
|
|
802
|
+
}
|
|
803
|
+
.rg-feedback-navigator-detail .rg-label-arrow { display: none; }
|
|
804
|
+
.rg-feedback-navigator-detail .rg-feedback-navigator-back {
|
|
805
|
+
order: -1;
|
|
806
|
+
margin-right: 2px;
|
|
807
|
+
margin-left: 0;
|
|
808
|
+
}
|
|
809
|
+
.rg-feedback-navigator-detail .rg-feedback-navigator-back svg {
|
|
810
|
+
width: 16px;
|
|
811
|
+
height: 16px;
|
|
812
|
+
}
|
|
813
|
+
.rg-feedback-navigator-header {
|
|
814
|
+
display: flex;
|
|
815
|
+
align-items: center;
|
|
816
|
+
flex: none;
|
|
817
|
+
min-height: 30px;
|
|
818
|
+
padding: 3px 4px 2px 7px;
|
|
819
|
+
}
|
|
820
|
+
.rg-feedback-navigator-heading {
|
|
821
|
+
display: flex;
|
|
822
|
+
align-items: center;
|
|
823
|
+
min-width: 0;
|
|
824
|
+
gap: 4px;
|
|
825
|
+
}
|
|
826
|
+
.rg-feedback-navigator-title {
|
|
827
|
+
overflow: hidden;
|
|
828
|
+
margin: 0;
|
|
829
|
+
color: var(--rg-text-primary);
|
|
830
|
+
font: 500 12px/16px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
831
|
+
text-overflow: ellipsis;
|
|
832
|
+
white-space: nowrap;
|
|
833
|
+
}
|
|
834
|
+
.rg-feedback-navigator-total {
|
|
835
|
+
color: var(--rg-text-secondary);
|
|
836
|
+
font: 500 10px/14px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
837
|
+
font-variant-numeric: tabular-nums;
|
|
838
|
+
}
|
|
839
|
+
.rg-feedback-list-count {
|
|
840
|
+
position: absolute;
|
|
841
|
+
top: 1px;
|
|
842
|
+
right: 0;
|
|
843
|
+
display: grid;
|
|
844
|
+
place-items: center;
|
|
845
|
+
min-width: 13px;
|
|
846
|
+
height: 13px;
|
|
847
|
+
padding: 0 3px;
|
|
848
|
+
border: 1.5px solid var(--rg-panel-bg);
|
|
849
|
+
border-radius: 999px;
|
|
850
|
+
color: #fff;
|
|
851
|
+
background: var(--review-accent);
|
|
852
|
+
font: 700 8px/1 Geist, ui-sans-serif, system-ui, sans-serif;
|
|
853
|
+
font-variant-numeric: tabular-nums;
|
|
854
|
+
transform: translate(25%, -18%);
|
|
855
|
+
}
|
|
856
|
+
.rg-feedback-list-count:empty,
|
|
857
|
+
.rg-feedback-list-count[hidden] { display: none; }
|
|
858
|
+
|
|
859
|
+
.rg-feedback-navigator-close,
|
|
860
|
+
.rg-feedback-scope,
|
|
861
|
+
.rg-feedback-filter,
|
|
862
|
+
.rg-feedback-row,
|
|
863
|
+
.rg-feedback-navigator-retry,
|
|
864
|
+
.rg-feedback-navigator-exit-link,
|
|
865
|
+
.rg-feedback-navigator-exit-cancel,
|
|
866
|
+
.rg-feedback-navigator-exit-confirm {
|
|
867
|
+
all: unset;
|
|
868
|
+
box-sizing: border-box;
|
|
869
|
+
cursor: pointer;
|
|
870
|
+
-webkit-tap-highlight-color: transparent;
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
.rg-inline-error {
|
|
874
|
+
padding: 5px 8px;
|
|
875
|
+
border-top: .5px solid var(--rg-border-subtle);
|
|
876
|
+
color: var(--review-accent);
|
|
877
|
+
font: 500 10px/14px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
878
|
+
}
|
|
879
|
+
.rg-feedback-navigator-close {
|
|
880
|
+
position: relative;
|
|
881
|
+
display: flex;
|
|
882
|
+
align-items: center;
|
|
883
|
+
justify-content: center;
|
|
884
|
+
flex: none;
|
|
885
|
+
width: 22px;
|
|
886
|
+
height: 22px;
|
|
887
|
+
margin-left: auto;
|
|
888
|
+
border-radius: 6px;
|
|
889
|
+
color: var(--rg-text-secondary);
|
|
890
|
+
transition:
|
|
891
|
+
color 150ms var(--rg-ease-drawer),
|
|
892
|
+
background 150ms var(--rg-ease-drawer),
|
|
893
|
+
transform 400ms var(--rg-ease-spring);
|
|
894
|
+
}
|
|
895
|
+
.rg-feedback-navigator-close svg {
|
|
896
|
+
width: 14px;
|
|
897
|
+
height: 14px;
|
|
898
|
+
fill: currentColor;
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
.rg-feedback-filters {
|
|
902
|
+
display: flex;
|
|
903
|
+
align-items: center;
|
|
904
|
+
flex: none;
|
|
905
|
+
gap: 2px;
|
|
906
|
+
margin: 0 3px 3px;
|
|
907
|
+
}
|
|
908
|
+
.rg-feedback-scopes {
|
|
909
|
+
display: grid;
|
|
910
|
+
grid-template-columns: 1fr 1fr;
|
|
911
|
+
flex: none;
|
|
912
|
+
gap: 2px;
|
|
913
|
+
margin: 0 3px 3px;
|
|
914
|
+
padding: 2px;
|
|
915
|
+
border-radius: 8px;
|
|
916
|
+
background: var(--rg-surface-hover);
|
|
917
|
+
}
|
|
918
|
+
.rg-feedback-scope {
|
|
919
|
+
display: flex;
|
|
920
|
+
align-items: center;
|
|
921
|
+
justify-content: center;
|
|
922
|
+
min-width: 0;
|
|
923
|
+
min-height: 22px;
|
|
924
|
+
padding: 3px 6px;
|
|
925
|
+
gap: 5px;
|
|
926
|
+
border-radius: 6px;
|
|
927
|
+
color: var(--rg-text-secondary);
|
|
928
|
+
text-align: center;
|
|
929
|
+
transition:
|
|
930
|
+
color 150ms var(--rg-ease-drawer),
|
|
931
|
+
background 150ms var(--rg-ease-drawer),
|
|
932
|
+
transform 400ms var(--rg-ease-spring);
|
|
933
|
+
}
|
|
934
|
+
.rg-feedback-scope[aria-pressed="true"] {
|
|
935
|
+
color: var(--rg-text-primary);
|
|
936
|
+
background: var(--rg-panel-bg);
|
|
937
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
|
|
938
|
+
}
|
|
939
|
+
.rg-feedback-scope-count {
|
|
940
|
+
color: var(--rg-text-secondary);
|
|
941
|
+
font: 500 10px/14px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
942
|
+
font-variant-numeric: tabular-nums;
|
|
943
|
+
}
|
|
944
|
+
.rg-feedback-filter {
|
|
945
|
+
display: flex;
|
|
946
|
+
align-items: center;
|
|
947
|
+
min-width: 0;
|
|
948
|
+
min-height: 22px;
|
|
949
|
+
padding: 3px 5px;
|
|
950
|
+
gap: 4px;
|
|
951
|
+
border-radius: 6px;
|
|
952
|
+
color: var(--rg-text-secondary);
|
|
953
|
+
text-align: center;
|
|
954
|
+
transition:
|
|
955
|
+
color 150ms var(--rg-ease-drawer),
|
|
956
|
+
background 150ms var(--rg-ease-drawer),
|
|
957
|
+
transform 400ms var(--rg-ease-spring);
|
|
958
|
+
}
|
|
959
|
+
.rg-feedback-filter[aria-pressed="true"] {
|
|
960
|
+
color: var(--rg-text-primary);
|
|
961
|
+
background: var(--rg-surface-hover);
|
|
962
|
+
}
|
|
963
|
+
.rg-feedback-filter-label {
|
|
964
|
+
overflow: hidden;
|
|
965
|
+
text-overflow: ellipsis;
|
|
966
|
+
white-space: nowrap;
|
|
967
|
+
}
|
|
968
|
+
.rg-feedback-filter-count {
|
|
969
|
+
color: var(--rg-text-secondary);
|
|
970
|
+
font: 500 10px/14px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
971
|
+
font-variant-numeric: tabular-nums;
|
|
972
|
+
}
|
|
973
|
+
.rg-feedback-sort-label {
|
|
974
|
+
overflow: hidden;
|
|
975
|
+
margin-left: auto;
|
|
976
|
+
padding-right: 4px;
|
|
977
|
+
color: var(--rg-text-secondary);
|
|
978
|
+
font: 500 9px/14px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
979
|
+
text-overflow: ellipsis;
|
|
980
|
+
white-space: nowrap;
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
.rg-feedback-navigator-content {
|
|
984
|
+
min-height: 0;
|
|
985
|
+
overflow: auto;
|
|
986
|
+
overscroll-behavior: contain;
|
|
987
|
+
scrollbar-color: var(--rg-border-subtle) transparent;
|
|
988
|
+
scrollbar-width: thin;
|
|
989
|
+
border-top: .5px solid var(--rg-border-subtle);
|
|
990
|
+
}
|
|
991
|
+
.rg-feedback-navigator-footer {
|
|
992
|
+
display: flex;
|
|
993
|
+
align-items: center;
|
|
994
|
+
justify-content: flex-end;
|
|
995
|
+
flex: none;
|
|
996
|
+
min-height: 28px;
|
|
997
|
+
padding: 3px 6px;
|
|
998
|
+
gap: 8px;
|
|
999
|
+
border-top: .5px solid var(--rg-border-subtle);
|
|
1000
|
+
}
|
|
1001
|
+
.rg-feedback-navigator-exit-link {
|
|
1002
|
+
min-height: 22px;
|
|
1003
|
+
padding: 0 4px;
|
|
1004
|
+
border-radius: 5px;
|
|
1005
|
+
color: var(--rg-text-secondary);
|
|
1006
|
+
font: 500 10px/22px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
1007
|
+
}
|
|
1008
|
+
.rg-feedback-navigator-exit-link:hover {
|
|
1009
|
+
color: var(--rg-text-primary);
|
|
1010
|
+
background: var(--rg-surface-hover);
|
|
1011
|
+
}
|
|
1012
|
+
.rg-feedback-navigator-exit-copy {
|
|
1013
|
+
display: grid;
|
|
1014
|
+
flex: 1;
|
|
1015
|
+
min-width: 0;
|
|
1016
|
+
gap: 1px;
|
|
1017
|
+
}
|
|
1018
|
+
.rg-feedback-navigator-exit-copy strong {
|
|
1019
|
+
color: var(--rg-text-primary);
|
|
1020
|
+
font: 600 10px/14px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
1021
|
+
}
|
|
1022
|
+
.rg-feedback-navigator-exit-copy span {
|
|
1023
|
+
overflow: hidden;
|
|
1024
|
+
color: var(--rg-text-secondary);
|
|
1025
|
+
font: 500 9px/13px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
1026
|
+
text-overflow: ellipsis;
|
|
1027
|
+
white-space: nowrap;
|
|
1028
|
+
}
|
|
1029
|
+
.rg-feedback-navigator-exit-actions {
|
|
1030
|
+
display: flex;
|
|
1031
|
+
flex: none;
|
|
1032
|
+
gap: 3px;
|
|
1033
|
+
}
|
|
1034
|
+
.rg-feedback-navigator-exit-cancel,
|
|
1035
|
+
.rg-feedback-navigator-exit-confirm {
|
|
1036
|
+
min-height: 22px;
|
|
1037
|
+
padding: 0 6px;
|
|
1038
|
+
border-radius: 5px;
|
|
1039
|
+
font: 600 10px/22px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
1040
|
+
}
|
|
1041
|
+
.rg-feedback-navigator-exit-cancel { color: var(--rg-text-secondary); }
|
|
1042
|
+
.rg-feedback-navigator-exit-cancel:hover {
|
|
1043
|
+
color: var(--rg-text-primary);
|
|
1044
|
+
background: var(--rg-surface-hover);
|
|
1045
|
+
}
|
|
1046
|
+
.rg-feedback-navigator-exit-confirm { color: #b52e35; }
|
|
1047
|
+
.rg-feedback-navigator-exit-confirm:hover { background: rgba(181, 46, 53, .08); }
|
|
1048
|
+
.rg-feedback-navigator-exit-link:focus-visible,
|
|
1049
|
+
.rg-feedback-navigator-exit-cancel:focus-visible,
|
|
1050
|
+
.rg-feedback-navigator-exit-confirm:focus-visible {
|
|
1051
|
+
outline: 2px solid var(--review-accent);
|
|
1052
|
+
outline-offset: 1px;
|
|
1053
|
+
}
|
|
1054
|
+
.rg-feedback-list {
|
|
1055
|
+
margin: 0;
|
|
1056
|
+
padding: 3px;
|
|
1057
|
+
list-style: none;
|
|
1058
|
+
}
|
|
1059
|
+
.rg-feedback-page-group + .rg-feedback-page-group {
|
|
1060
|
+
border-top: .5px solid var(--rg-border-subtle);
|
|
1061
|
+
}
|
|
1062
|
+
.rg-feedback-page-heading {
|
|
1063
|
+
position: sticky;
|
|
1064
|
+
top: 0;
|
|
1065
|
+
z-index: 1;
|
|
1066
|
+
display: flex;
|
|
1067
|
+
align-items: center;
|
|
1068
|
+
min-height: 24px;
|
|
1069
|
+
padding: 4px 8px 2px;
|
|
1070
|
+
gap: 5px;
|
|
1071
|
+
color: var(--rg-text-secondary);
|
|
1072
|
+
background: var(--rg-panel-bg);
|
|
1073
|
+
backdrop-filter: blur(8px);
|
|
1074
|
+
font: 600 10px/14px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
1075
|
+
}
|
|
1076
|
+
.rg-feedback-page-group[data-current-page="true"] .rg-feedback-page-heading {
|
|
1077
|
+
color: var(--rg-text-primary);
|
|
1078
|
+
}
|
|
1079
|
+
.rg-feedback-page-label {
|
|
1080
|
+
overflow: hidden;
|
|
1081
|
+
text-overflow: ellipsis;
|
|
1082
|
+
white-space: nowrap;
|
|
1083
|
+
}
|
|
1084
|
+
.rg-feedback-page-count {
|
|
1085
|
+
flex: none;
|
|
1086
|
+
color: var(--rg-text-secondary);
|
|
1087
|
+
font-variant-numeric: tabular-nums;
|
|
1088
|
+
}
|
|
1089
|
+
.rg-feedback-page-group .rg-feedback-list { padding-top: 0; }
|
|
1090
|
+
.rg-feedback-row {
|
|
1091
|
+
display: grid;
|
|
1092
|
+
grid-template-columns: 18px minmax(0, 1fr);
|
|
1093
|
+
align-items: start;
|
|
1094
|
+
width: 100%;
|
|
1095
|
+
min-height: 44px;
|
|
1096
|
+
padding: 5px 7px;
|
|
1097
|
+
gap: 5px;
|
|
1098
|
+
border-radius: 5px;
|
|
1099
|
+
color: var(--rg-text-primary);
|
|
1100
|
+
text-align: left;
|
|
1101
|
+
transition:
|
|
1102
|
+
background 150ms var(--rg-ease-drawer),
|
|
1103
|
+
opacity 150ms var(--rg-ease-drawer);
|
|
1104
|
+
}
|
|
1105
|
+
.rg-feedback-row[aria-current="true"] {
|
|
1106
|
+
background: var(--rg-surface-hover);
|
|
1107
|
+
box-shadow: inset 2px 0 var(--review-accent);
|
|
1108
|
+
}
|
|
1109
|
+
.rg-feedback-row[data-status="resolved"] .rg-feedback-row-copy {
|
|
1110
|
+
opacity: .68;
|
|
1111
|
+
}
|
|
1112
|
+
.rg-feedback-row-pin {
|
|
1113
|
+
display: grid;
|
|
1114
|
+
place-items: center;
|
|
1115
|
+
width: 18px;
|
|
1116
|
+
height: 18px;
|
|
1117
|
+
color: var(--rg-text-secondary);
|
|
1118
|
+
font: 600 9px/14px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
1119
|
+
font-variant-numeric: tabular-nums;
|
|
1120
|
+
}
|
|
1121
|
+
.rg-feedback-row-copy {
|
|
1122
|
+
display: flex;
|
|
1123
|
+
flex-direction: column;
|
|
1124
|
+
min-width: 0;
|
|
1125
|
+
gap: 2px;
|
|
1126
|
+
}
|
|
1127
|
+
.rg-feedback-row-body {
|
|
1128
|
+
display: -webkit-box;
|
|
1129
|
+
overflow: hidden;
|
|
1130
|
+
color: var(--rg-text-primary);
|
|
1131
|
+
overflow-wrap: anywhere;
|
|
1132
|
+
white-space: pre-wrap;
|
|
1133
|
+
-webkit-box-orient: vertical;
|
|
1134
|
+
-webkit-line-clamp: 2;
|
|
1135
|
+
}
|
|
1136
|
+
.rg-feedback-row-context {
|
|
1137
|
+
overflow: hidden;
|
|
1138
|
+
color: var(--rg-text-secondary);
|
|
1139
|
+
font: 500 10px/14px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
1140
|
+
text-overflow: ellipsis;
|
|
1141
|
+
white-space: nowrap;
|
|
1142
|
+
}
|
|
1143
|
+
.rg-feedback-row-context[data-current-page="true"] {
|
|
1144
|
+
color: var(--rg-text-primary);
|
|
1145
|
+
}
|
|
1146
|
+
.rg-feedback-row-detail {
|
|
1147
|
+
display: flex;
|
|
1148
|
+
align-items: center;
|
|
1149
|
+
min-width: 0;
|
|
1150
|
+
color: var(--rg-text-secondary);
|
|
1151
|
+
}
|
|
1152
|
+
.rg-feedback-row-meta {
|
|
1153
|
+
overflow: hidden;
|
|
1154
|
+
color: var(--rg-text-secondary);
|
|
1155
|
+
font: 500 10px/14px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
1156
|
+
text-overflow: ellipsis;
|
|
1157
|
+
white-space: nowrap;
|
|
1158
|
+
}
|
|
1159
|
+
.rg-feedback-row-trailing {
|
|
1160
|
+
display: flex;
|
|
1161
|
+
align-items: center;
|
|
1162
|
+
min-width: 0;
|
|
1163
|
+
margin-left: 6px;
|
|
1164
|
+
gap: 6px;
|
|
1165
|
+
color: var(--rg-text-secondary);
|
|
1166
|
+
font: 500 10px/14px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
1167
|
+
white-space: nowrap;
|
|
1168
|
+
}
|
|
1169
|
+
.rg-feedback-row-move {
|
|
1170
|
+
display: inline-flex;
|
|
1171
|
+
align-items: center;
|
|
1172
|
+
gap: 2px;
|
|
1173
|
+
color: var(--review-accent);
|
|
1174
|
+
}
|
|
1175
|
+
.rg-feedback-row-move svg {
|
|
1176
|
+
width: 11px;
|
|
1177
|
+
height: 11px;
|
|
1178
|
+
}
|
|
1179
|
+
.rg-feedback-row-location-missing {
|
|
1180
|
+
display: flex;
|
|
1181
|
+
align-items: center;
|
|
1182
|
+
justify-content: center;
|
|
1183
|
+
width: 12px;
|
|
1184
|
+
height: 12px;
|
|
1185
|
+
color: var(--review-accent);
|
|
1186
|
+
}
|
|
1187
|
+
.rg-feedback-row-location-missing svg {
|
|
1188
|
+
width: 12px;
|
|
1189
|
+
height: 12px;
|
|
1190
|
+
}
|
|
1191
|
+
.rg-feedback-row-replies,
|
|
1192
|
+
.rg-feedback-row-status {
|
|
1193
|
+
display: inline-flex;
|
|
1194
|
+
align-items: center;
|
|
1195
|
+
min-height: 14px;
|
|
1196
|
+
}
|
|
1197
|
+
.rg-feedback-row-status {
|
|
1198
|
+
width: 12px;
|
|
1199
|
+
height: 12px;
|
|
1200
|
+
}
|
|
1201
|
+
.rg-feedback-row-status svg {
|
|
1202
|
+
width: 12px;
|
|
1203
|
+
height: 12px;
|
|
1204
|
+
}
|
|
1205
|
+
|
|
1206
|
+
.rg-feedback-navigator-state,
|
|
1207
|
+
.rg-feedback-navigator-empty {
|
|
1208
|
+
display: flex;
|
|
1209
|
+
align-items: center;
|
|
1210
|
+
justify-content: center;
|
|
1211
|
+
min-height: 52px;
|
|
1212
|
+
padding: 10px;
|
|
1213
|
+
color: var(--rg-text-secondary);
|
|
1214
|
+
text-align: center;
|
|
1215
|
+
}
|
|
1216
|
+
.rg-feedback-navigator-state[data-state="reconnecting"] {
|
|
1217
|
+
min-height: 0;
|
|
1218
|
+
padding: 5px 8px;
|
|
1219
|
+
border-bottom: .5px solid var(--rg-border-subtle);
|
|
1220
|
+
color: var(--rg-text-secondary);
|
|
1221
|
+
background: var(--rg-surface-hover);
|
|
1222
|
+
font: 500 10px/14px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
1223
|
+
}
|
|
1224
|
+
.rg-feedback-navigator-state[data-state="loading"]::before {
|
|
1225
|
+
width: 12px;
|
|
1226
|
+
height: 12px;
|
|
1227
|
+
margin-right: 8px;
|
|
1228
|
+
border: 1.5px solid var(--rg-border-subtle);
|
|
1229
|
+
border-top-color: var(--rg-text-secondary);
|
|
1230
|
+
border-radius: 50%;
|
|
1231
|
+
content: '';
|
|
1232
|
+
animation: rg-feedback-spinner 700ms linear infinite;
|
|
1233
|
+
}
|
|
1234
|
+
.rg-feedback-navigator-state[data-state="error"] {
|
|
1235
|
+
flex-wrap: wrap;
|
|
1236
|
+
gap: 8px;
|
|
1237
|
+
}
|
|
1238
|
+
.rg-feedback-navigator-retry {
|
|
1239
|
+
display: inline-flex;
|
|
1240
|
+
align-items: center;
|
|
1241
|
+
justify-content: center;
|
|
1242
|
+
min-height: 17px;
|
|
1243
|
+
padding: 1px 4px;
|
|
1244
|
+
border: .5px solid var(--rg-border-subtle);
|
|
1245
|
+
border-radius: 4px;
|
|
1246
|
+
color: var(--rg-text-primary);
|
|
1247
|
+
background: var(--rg-panel-bg);
|
|
1248
|
+
transition:
|
|
1249
|
+
background 150ms var(--rg-ease-drawer),
|
|
1250
|
+
transform 400ms var(--rg-ease-spring);
|
|
1251
|
+
}
|
|
1252
|
+
|
|
1253
|
+
.rg-feedback-list-tool:focus-visible,
|
|
1254
|
+
.rg-feedback-navigator-close:focus-visible,
|
|
1255
|
+
.rg-feedback-scope:focus-visible,
|
|
1256
|
+
.rg-feedback-filter:focus-visible,
|
|
1257
|
+
.rg-feedback-row:focus-visible,
|
|
1258
|
+
.rg-feedback-navigator-retry:focus-visible {
|
|
1259
|
+
outline: 2px solid var(--review-accent);
|
|
1260
|
+
outline-offset: 2px;
|
|
1261
|
+
}
|
|
1262
|
+
.rg-feedback-row:focus-visible {
|
|
1263
|
+
outline-offset: -2px;
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
@media (hover: hover) and (pointer: fine) {
|
|
1267
|
+
.rg-feedback-navigator-close:hover,
|
|
1268
|
+
.rg-feedback-scope:hover,
|
|
1269
|
+
.rg-feedback-filter:hover,
|
|
1270
|
+
.rg-feedback-navigator-retry:hover {
|
|
1271
|
+
color: var(--rg-text-primary);
|
|
1272
|
+
background: var(--rg-surface-hover);
|
|
1273
|
+
}
|
|
1274
|
+
.rg-feedback-row:hover { background: var(--rg-surface-hover); }
|
|
1275
|
+
.rg-feedback-navigator-close:active,
|
|
1276
|
+
.rg-feedback-scope:active,
|
|
1277
|
+
.rg-feedback-filter:active,
|
|
1278
|
+
.rg-feedback-navigator-retry:active {
|
|
1279
|
+
transform: scale(.96);
|
|
1280
|
+
transition-duration: 60ms;
|
|
1281
|
+
}
|
|
1282
|
+
.rg-feedback-row:active {
|
|
1283
|
+
background: var(--rg-surface-hover);
|
|
1284
|
+
transform: translateY(1px);
|
|
1285
|
+
transition-duration: 60ms;
|
|
1286
|
+
}
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
@media (max-width: 640px) {
|
|
1290
|
+
.pin::after {
|
|
1291
|
+
top: 50%;
|
|
1292
|
+
left: 50%;
|
|
1293
|
+
width: 44px;
|
|
1294
|
+
height: 44px;
|
|
1295
|
+
transform: translate(-50%, -50%);
|
|
1296
|
+
}
|
|
1297
|
+
.rg-feedback-navigator-scrim {
|
|
1298
|
+
display: block;
|
|
1299
|
+
}
|
|
1300
|
+
.rg-feedback-navigator-scrim[data-motion="enter"] {
|
|
1301
|
+
animation: rg-feedback-scrim-enter 160ms ease-out both;
|
|
1302
|
+
}
|
|
1303
|
+
.rg-feedback-navigator {
|
|
1304
|
+
right: auto;
|
|
1305
|
+
bottom: calc(max(16px, env(safe-area-inset-bottom)) + 38px);
|
|
1306
|
+
left: 50%;
|
|
1307
|
+
width: min(360px, calc(100vw - 16px));
|
|
1308
|
+
max-height: min(70dvh, 480px);
|
|
1309
|
+
border-radius: 14px;
|
|
1310
|
+
transform: translateX(-50%);
|
|
1311
|
+
}
|
|
1312
|
+
.rg-feedback-navigator[data-motion="enter"] {
|
|
1313
|
+
animation: rg-feedback-sheet-enter 220ms var(--rg-ease-drawer) both;
|
|
1314
|
+
}
|
|
1315
|
+
.rg-feedback-navigator-header { min-height: 44px; padding-top: 5px; }
|
|
1316
|
+
.rg-feedback-navigator-content { -webkit-overflow-scrolling: touch; }
|
|
1317
|
+
.rg-feedback-scope { min-height: 44px; }
|
|
1318
|
+
.rg-feedback-filter { min-height: 44px; }
|
|
1319
|
+
.rg-feedback-row { min-height: 56px; padding-top: 8px; padding-bottom: 8px; }
|
|
1320
|
+
.rg-feedback-navigator-close,
|
|
1321
|
+
.rg-feedback-navigator-retry,
|
|
1322
|
+
.rg-feedback-navigator-exit-link,
|
|
1323
|
+
.rg-feedback-navigator-exit-cancel,
|
|
1324
|
+
.rg-feedback-navigator-exit-confirm { min-width: 44px; min-height: 44px; }
|
|
1325
|
+
}
|
|
1326
|
+
|
|
1327
|
+
@media (hover: none), (pointer: coarse) {
|
|
1328
|
+
.rg-feedback-list-tool svg {
|
|
1329
|
+
width: 14px;
|
|
1330
|
+
height: 14px;
|
|
1331
|
+
}
|
|
1332
|
+
.pin::after {
|
|
1333
|
+
top: 50%;
|
|
1334
|
+
left: 50%;
|
|
1335
|
+
width: 44px;
|
|
1336
|
+
height: 44px;
|
|
1337
|
+
transform: translate(-50%, -50%);
|
|
1338
|
+
}
|
|
1339
|
+
.rg-feedback-filter { min-height: 44px; }
|
|
1340
|
+
.rg-feedback-scope { min-height: 44px; }
|
|
1341
|
+
.rg-feedback-row { min-height: 56px; }
|
|
1342
|
+
.rg-feedback-navigator-close,
|
|
1343
|
+
.rg-feedback-navigator-retry,
|
|
1344
|
+
.rg-feedback-navigator-exit-link,
|
|
1345
|
+
.rg-feedback-navigator-exit-cancel,
|
|
1346
|
+
.rg-feedback-navigator-exit-confirm { min-width: 44px; min-height: 44px; }
|
|
1347
|
+
}
|
|
1348
|
+
|
|
1349
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1350
|
+
.pin,
|
|
1351
|
+
.rg-feedback-navigator-scrim,
|
|
1352
|
+
.rg-feedback-navigator,
|
|
1353
|
+
.rg-feedback-navigator *,
|
|
1354
|
+
.rg-feedback-list-tool {
|
|
1355
|
+
animation: none !important;
|
|
1356
|
+
transition: none !important;
|
|
1357
|
+
}
|
|
1358
|
+
}
|
|
1359
|
+
|
|
1360
|
+
@media (forced-colors: active) {
|
|
1361
|
+
.pin,
|
|
1362
|
+
.pin[data-resolved="true"],
|
|
1363
|
+
.pin[data-resolved="true"][data-active="true"] {
|
|
1364
|
+
border-color: Canvas;
|
|
1365
|
+
color: Canvas;
|
|
1366
|
+
background: CanvasText;
|
|
1367
|
+
box-shadow: 0 0 0 1px CanvasText;
|
|
1368
|
+
}
|
|
1369
|
+
.pin[data-active="true"],
|
|
1370
|
+
.pin:focus-visible {
|
|
1371
|
+
outline: 3px solid Highlight;
|
|
1372
|
+
outline-offset: 3px;
|
|
1373
|
+
}
|
|
1374
|
+
}
|
|
1375
|
+
|
|
1376
|
+
@keyframes rg-feedback-navigator-enter {
|
|
1377
|
+
from { opacity: 0; transform: translateY(2px) scale(.92); }
|
|
1378
|
+
to { opacity: 1; transform: translateY(0) scale(1); }
|
|
1379
|
+
}
|
|
1380
|
+
@keyframes rg-feedback-sheet-enter {
|
|
1381
|
+
from { opacity: 0; transform: translate(-50%, 12px) scale(.98); }
|
|
1382
|
+
to { opacity: 1; transform: translate(-50%, 0) scale(1); }
|
|
1383
|
+
}
|
|
1384
|
+
@keyframes rg-feedback-scrim-enter {
|
|
1385
|
+
from { opacity: 0; }
|
|
1386
|
+
to { opacity: 1; }
|
|
1387
|
+
}
|
|
1388
|
+
@keyframes rg-feedback-spinner {
|
|
1389
|
+
to { transform: rotate(360deg); }
|
|
1390
|
+
}
|
|
1391
|
+
`;let n=Y(`highlight`);n.dataset.slot=`highlight`;let r=Y(`region`);r.dataset.slot=`region`;let i=Y(`pins`);i.dataset.slot=`pins`;let a=Y(`panels`);a.dataset.slot=`panels`;let o=Y(`navigator-slot`);o.dataset.slot=`navigator`,o.id=kn,o.addEventListener(`click`,this.#We),o.addEventListener(`keydown`,this.#Ge);let s=Y(`rg-visually-hidden`);s.dataset.slot=`announcer`,s.setAttribute(`aria-live`,`polite`),s.setAttribute(`aria-atomic`,`true`);let c=Ke(),l=er(this.#t?.position);c.dataset.position=l,c.dataset.mobilePosition=tr(l),c.style.setProperty(`--rg-toolbar-offset-x`,`${rr(this.#t?.offset?.x)}px`),c.style.setProperty(`--rg-toolbar-offset-y`,`${rr(this.#t?.offset?.y)}px`),c.querySelector(`.rg-toolbar-actions`)?.append(Dt(0,{controlsId:kn,presentation:this.#Ne()})),c.querySelector(`.rg-feedback-tool`)?.addEventListener(`click`,()=>{if(!this.#we()){this.#x||this.#De(!0),this.#Ye(this.#Te());return}if(!(this.#x&&this.#De(!1,{restoreFocus:!1,restoreComposer:!0}))){if(this.#g){this.#Ye(`피드백을 저장하는 중입니다.`);return}this.#Se(!this.#l)}}),c.querySelector(`.rg-feedback-list-tool`)?.addEventListener(`click`,()=>{this.#De(!this.#x)}),c.querySelector(`.rg-collapse`)?.addEventListener(`click`,()=>{let e=c.dataset.collapsed===`true`;!e&&this.#l&&this.#Se(!1),!e&&this.#x&&this.#De(!1,{restoreFocus:!1}),lt(c,!e)}),this.#e.append(t,n,r,i,a,o,s,c),this.#t&&this.#F&&ut({toolbar:c,position:l,offset:{x:rr(this.#t.offset?.x),y:rr(this.#t.offset?.y)},storageKey:nt(this.#t.session.projectId,this.#t.session.reviewerId),signal:this.#F.signal,onDragStart:()=>{this.#l&&this.#Se(!1),this.#x&&this.#De(!1,{restoreFocus:!1})}})}#ve(){this.#kt(),this.#Mt(),this.#Ae(),this.#Me(),this.#Ce(),this.#yt(),this.#xt()}#ye(){let e=this.#t,t=e?.cursorChat?.repository,n=e?.cursorChat?.roomId,r=this.#F,i=++this.#a;if(!e||!t||!n||!r)return;let a=e.pageId;import(`./cursor-chat-ui-Cu42FHov.js`).then(({createReviewCursorChatController:o})=>{if(i!==this.#a||r.signal.aborted||this.#t?.pageId!==a)return;let s=o({root:this.#e,pageId:a,pathname:ir(window.location.pathname),roomId:n,session:e.session,repository:t,styleNonce:e.styleNonce,canOpenChat:()=>this.#xe(),onFailure:e=>{e.type===`access-lost`?(this.#be(),this.#ue(e)):(this.#be(),this.#Ye(`커서 채팅 연결이 중단되었습니다. 기본 리뷰 기능은 계속 사용할 수 있습니다.`))}});this.#i=s,s.start()}).catch(()=>{i===this.#a&&!r.signal.aborted&&(this.#i?.stop(),this.#i=null,this.#Ye(`커서 채팅을 불러오지 못했습니다.`))})}#be(){this.#a+=1,this.#i?.stop(),this.#i=null}#xe(){return this.#g?!1:(this.#l&&this.#Se(!1),this.#x&&this.#De(!1,{restoreFocus:!1,restoreComposer:!1}),this.#f&&(this.#Oe(),this.#Mt()),this.#v&&this.#St(!1,!1),!this.#l&&!this.#x&&!this.#f&&!this.#v)}#Se(e){if(e&&(this.#N+=1),e&&!this.#we()){this.#x||this.#De(!0),this.#Ye(this.#Te());return}if(e&&this.#g){this.#Ye(`피드백을 저장하는 중입니다.`);return}if(e&&this.#_){this.#v?this.#St(!1):this.#ke(),this.#Ye(`작성 중인 피드백을 복원했습니다.`);return}if(e&&this.#l){this.#u=null,this.#d=null,this.#Et(),this.#Ce();return}this.#l=e,this.#Ce(),e?(this.#v=null,this.#y=null,this.#f=null,this.#p=``,this.#m=``,this.#h=null,this.#Et(),document.addEventListener(`pointermove`,this.#Xe,!0),document.addEventListener(`pointerdown`,this.#Ze,!0),document.addEventListener(`pointerup`,this.#Qe,!0),document.addEventListener(`pointercancel`,this.#$e,!0),document.addEventListener(`keydown`,this.#et,!0),this.#R={value:document.body.style.getPropertyValue(`cursor`),priority:document.body.style.getPropertyPriority(`cursor`)},document.body.style.setProperty(`cursor`,`crosshair`),this.#I=ge(this.#t?.styleNonce),queueMicrotask(()=>this.#nt())):(document.removeEventListener(`pointermove`,this.#Xe,!0),document.removeEventListener(`pointerdown`,this.#Ze,!0),document.removeEventListener(`pointerup`,this.#Qe,!0),document.removeEventListener(`pointercancel`,this.#$e,!0),document.removeEventListener(`keydown`,this.#et,!0),this.#R&&=(ur(document.body,`cursor`,this.#R),null),this.#I?.(),this.#I=null,this.#u=null,this.#d=null,this.#Et()),this.#Mt()}#Ce(){let e=this.#e.querySelector(`.rg-toolbar`),t=this.#e.querySelector(`[data-slot="pins"]`),n=this.#e.querySelector(`.rg-feedback-tool`),r=this.#l;e&&(e.dataset.selecting=String(this.#l)),t&&(t.dataset.selectionSuppressed=String(this.#l),t.toggleAttribute(`inert`,this.#l),t.setAttribute(`aria-hidden`,String(this.#l))),n&&(n.setAttribute(`aria-pressed`,String(r)),n.setAttribute(`aria-label`,r?`선택 취소`:`피드백 위치 선택`),n.setAttribute(`aria-disabled`,String(!this.#we())))}#we(){return!this.#k&&this.#E===`ready`&&this.#o!==null}#Te(){return this.#k?`다시 인증하세요.`:this.#E===`loading`?`불러오는 중입니다.`:`다시 시도하세요.`}#Ee(){return this.#p.trim().length>0||!!this.#_?.body.trim().length||[...this.#Q.values()].some(e=>e.trim().length>0)||this.#h!==null||this.#te.size>0}#De(e,t={}){let n=t.restoreFocus??!0,r=t.restoreComposer??!0;if(e===this.#x)return!1;if(e)return this.#N+=1,this.#l&&this.#Se(!1),this.#Oe(),this.#T=`idle`,this.#x=!0,this.#Mt(),this.#Ae(),this.#Me(),queueMicrotask(()=>this.#Ie()),!1;(t.cancelNavigation??!0)&&(this.#N+=1),this.#x=!1,this.#T=`idle`,this.#L?.(),this.#L=null,this.#Mt(),this.#Ae(),this.#Me(),queueMicrotask(()=>this.#Ct());let i=r&&this.#ke();return n&&!i&&queueMicrotask(()=>this.#Le()?.focus()),i}#Oe(){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}#ke(){if(!this.#_||this.#x||this.#v)return!1;let e=this.#_;return this.#_=null,this.#f=e.target,this.#p=e.body,this.#Mt(),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}#Ae(){let e=this.#e.querySelector(`[data-slot="navigator"]`);if(!e)return;this.#T===`saving`&&!this.#g&&this.#$.size===0&&(this.#T=this.#Ee()?`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.#Ne()===`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.#Ne(),v=Y(`rg-feedback-navigator-scrim`);v.dataset.motion=i,v.dataset.feedbackNavigatorAction=`close`,v.setAttribute(`aria-hidden`,`true`);let y=Ot(this.#je(),{id:An,presentation:_,exitReviewState:this.#t?.onExitReview?this.#T:void 0});y.dataset.motion=i;let b=_===`sheet`&&this.#v?this.#o?.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=Y(`rg-feedback-navigator-detail`),t=this.#It(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($n()),n.closest(`.rg-tag-row`)?.prepend(n)),e.append(t),y.append(e)}e.append(v,y),this.#Fe(_),queueMicrotask(()=>this.#Pe()),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.#Re(l);e?e.focus({preventScroll:!0}):this.#Ie()}else if(u&&Xn(u))e.querySelector(`[data-feedback-filter="${u}"]`)?.focus({preventScroll:!0});else if(d&&Zn(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.#Ie()}else _===`sheet`&&r!==`sheet`&&this.#Ie()})}#je(){let e=this.#ze(),t=e.comments.filter(e=>this.#Be(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=vt(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.#Ue(e),pageUrl:this.#Ve(e)?.href,currentPage:this.#Be(e),targetLabel:this.#He(e),authorName:e.authorName,body:e.body,timeLabel:cr(r,s),replyCount:n,replyCountIsLowerBound:o.has(e.id),status:e.status,locationAvailable:!this.#Be(e)||this.#Y.commentLocation(e).available})),activeCommentId:this.#v,loadState:c,errorMessage:this.#D,errorRecovery:this.#O}}#Me(){let e=this.#Le();if(!e)return;let t=this.#ze(),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`,kn),this.#Ne()===`sheet`?e.setAttribute(`aria-haspopup`,`dialog`):e.removeAttribute(`aria-haspopup`),e.removeAttribute(`aria-pressed`)}#Ne(){return window.matchMedia?.(`(max-width: 640px)`).matches||window.innerWidth<=640?`sheet`:`tray`}#Pe(){let e=this.#e.querySelector(`.rg-feedback-navigator`),t=this.#Le(),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=nr(er(n.dataset.position)),s=r.left+r.width/2,c=r.top+r.height/2;if(o===`top`||o===`bottom`){let t=Z(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=`${Z(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=Z(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%`)}}#Fe(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?lr(r,`visibility`):null;r&&r.style.setProperty(`visibility`,`hidden`);let a=lr(document.body,`overflow`),o=lr(document.documentElement,`overflow`),s=e=>{let t=this.#e.querySelector(`.rg-feedback-navigator`);!t||e.composedPath().includes(t)||queueMicrotask(()=>this.#Ie())};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&&ur(r,`visibility`,i),document.removeEventListener(`focusin`,s,!0),ur(document.body,`overflow`,a),ur(document.documentElement,`overflow`,o)}}#Ie(){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.#Re(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})}#Le(){return this.#e.querySelector(`.rg-feedback-list-tool`)}#Re(e){return[...this.#e.querySelectorAll(`.rg-feedback-row[data-comment-id]`)].find(({dataset:t})=>t.commentId===e)}#ze(){let e=this.#o??{pageId:this.#t?.pageId??``,comments:[],replies:[]},t=this.#c;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],...sr(e.window,t.window)}}#Be(e){return e.pageId===this.#t?.pageId}#Ve(e){let t=this.#c?.pages?.find(({id:t})=>t===e.pageId);return or(e,t?.routeKey)}#He(e){return Wt(e.target)}#Ue(e){let t=this.#Ve(e);if(t)return ar(t);let n=this.#c?.pages?.find(({id:t})=>t===e.pageId);return n?.name.trim()?n.name.trim():e.target.pageTitle.trim()||`알 수 없는 페이지`}#We=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.#De(!1);return}if(n===`retry`){this.#ie();return}if(n===`exit-review`){this.#T=this.#g||this.#$.size>0?`saving`:this.#Ee()?`draft-warning`:`confirm`,this.#Ae(),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.#Ae(),queueMicrotask(()=>this.#e.querySelector(`.rg-feedback-navigator-exit-link`)?.focus({preventScroll:!0}));return}if(n===`confirm-exit-review`){if(this.#g||this.#$.size>0){this.#T=`saving`,this.#Ae();return}this.#t?.onExitReview?.();return}if(n===`filter`){let e=t.dataset.feedbackFilter;if(!Xn(e)||e===this.#w)return;this.#w=e,this.#Ae();return}if(n===`scope`){let e=t.dataset.feedbackScope;if(!Zn(e)||e===this.#C)return;this.#C=e,this.#w=`all`,this.#Ae();return}n===`open-comment`&&t.dataset.commentId&&this.#Ke(t.dataset.commentId,{origin:`navigator`,navigate:!0})}};#Ge=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.#Ne()!==`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#Ke(e,t){let n=this.#ze().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.#l&&this.#Se(!1);let r=++this.#N,i=t.navigate&&!this.#Be(n),a=i?this.#Ve(n):null,o=!!(a&&a.origin===window.location.origin);if(t.origin===`navigator`&&this.#x&&i&&o&&(this.#De(!1,{restoreFocus:!1,restoreComposer:!1,cancelNavigation:!1}),await $()),r!==this.#N||!this.#F)return;if(!this.#ze().comments.some(({id:t})=>t===e)){this.#qe();return}let s=t.origin===`navigator`&&this.#x&&this.#Ne()===`sheet`;s&&(this.#L?.(),this.#L=null);let c=!0;try{t.navigate&&(c=await this.#Je(n))}finally{s&&this.#x&&this.#Fe(`sheet`)}if(c&&r===this.#N){if(!this.#ze().comments.some(({id:t})=>t===e)){this.#qe();return}if(this.#f=null,this.#v=e,this.#y=t.origin,this.#ve(),!this.#Y.commentLocation(n).available)this.#Ye(`현재 화면에서 피드백 위치를 찾을 수 없습니다.`);else if(t.announceOpened){let e=vt(this.#ze()).pinNumberByCommentId.get(n.id)??1;this.#Ye(`피드백 #${e} 대화를 열었습니다.`)}queueMicrotask(()=>this.#e.querySelector(`.rg-thread-label`)?.focus({preventScroll:!0}))}}#qe(){if(this.#_&&this.#x&&this.#Ne()===`sheet`){this.#De(!1,{restoreFocus:!1,cancelNavigation:!1});return}!this.#x&&this.#ke()||queueMicrotask(()=>{this.#x?this.#Ie():this.#Le()?.focus({preventScroll:!0})})}async#Je(e){if(!this.#Be(e)){let t=this.#Ve(e);if(!t||t.origin!==window.location.origin)return this.#Ye(`이 피드백의 페이지로 이동할 수 없습니다.`),!1;this.#Ye(`${ir(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.#Ye(`피드백 페이지로 이동하지 못했습니다.`)}return!1}let t=this.#Y.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=O(e.anchor,W(e.target)).element;if(t&&typeof t.scrollIntoView==`function`)try{return t.scrollIntoView({block:`center`,inline:`center`,behavior:n}),await $(),await $(),!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 $(),await $(),!0}#Ye(e){let t=this.#e.querySelector(`[data-slot="announcer"]`);t&&(t.textContent=``,queueMicrotask(()=>{t.textContent=e}))}#Xe=e=>{if(!this.#l||this.#Vt(e)||this.#u&&e.pointerId!==this.#d)return;let t=Wn(e);if(this.#u&&Fn(this.#u,t)>=6){this.#Tt(this.#u,t);return}this.#wt(t)};#Ze=e=>{!this.#l||this.#Vt(e)||e.button!==0||this.#u||(e.preventDefault(),e.stopImmediatePropagation(),this.#u=Wn(e),this.#d=e.pointerId)};#Qe=e=>{if(!this.#l||!this.#u||e.pointerId!==this.#d)return;if(this.#Vt(e)){this.#u=null,this.#d=null,this.#Et();return}e.preventDefault(),e.stopImmediatePropagation();let t=this.#u,n=Wn(e),r=Fn(t,n)>=6;this.#f=r?we(t,n):Ce(n),this.#ut(),this.#Se(!1),queueMicrotask(()=>this.#e.querySelector(`.rg-selection-label textarea`)?.focus())};#$e=e=>{!this.#l||!this.#u||e.pointerId!==this.#d||(e.preventDefault(),e.stopImmediatePropagation(),this.#u=null,this.#d=null,this.#Et())};#et=e=>{if(!this.#l)return;if(e.key===`Escape`){e.preventDefault(),e.stopImmediatePropagation(),this.#Se(!1);return}if(e.key!==`Enter`||e.isComposing||this.#Vt(e)||Rn(e))return;let t=Bn(e);if(!t)return;let n=M(t);n.width<=0||n.height<=0||(e.preventDefault(),e.stopImmediatePropagation(),this.#f=Se(t,{clientX:n.left+n.width/2,clientY:n.top+n.height/2}),this.#Se(!1),queueMicrotask(()=>this.#e.querySelector(`.rg-selection-label textarea`)?.focus()))};#tt=e=>{if(!this.#l)return;if(this.#Vt(e)||Rn(e)){this.#Et();return}let t=Bn(e);if(!t){this.#Et();return}let n=M(t);if(n.width<=0||n.height<=0){this.#Et();return}let r=this.#e.querySelector(`[data-slot="region"]`);r&&(r.style.display=`none`);let i=this.#e.querySelector(`[data-slot="highlight"]`);i&&X(i,n)};#nt(){if(!this.#l)return;let e=Vn(document);if(!e||p(e)||zn(e))return;let t=M(e);if(t.width<=0||t.height<=0)return;let n=this.#e.querySelector(`[data-slot="highlight"]`);n&&X(n,t)}#rt=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.#St(!0);return}if(this.#x){e.preventDefault(),e.stopImmediatePropagation(),this.#De(!1);return}if(this.#v){e.preventDefault(),e.stopImmediatePropagation(),this.#St(!0);return}if(this.#f){if(e.preventDefault(),e.stopImmediatePropagation(),this.#g?.target===this.#f){this.#Ye(`피드백을 저장하는 중입니다.`);return}this.#f=null,this.#p=``,this.#m=``,this.#h=null,this.#Mt(),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.#l||this.#f||this.#v||this.#x||this.#z!==null||Rn(e)||Un(e)||(this.#z=window.setTimeout(()=>{this.#z=null,!(this.#l||this.#f||this.#v||this.#x||this.#g)&&this.#st()},100))};#it=e=>{let t=e.code===`KeyC`||e.key.toLowerCase()===`c`,n=e.key===`Meta`||e.key===`Control`;(t||n)&&this.#ot()};#at=()=>{this.#ot()};#ot(){this.#z!==null&&(window.clearTimeout(this.#z),this.#z=null)}#st(){let e=this.#e.querySelector(`.rg-toolbar`);e?.dataset.collapsed===`true`&<(e,!1),this.#Se(!0)}#ct=e=>{!this.#v||this.#Vt(e)||this.#St(!1)};#lt=e=>{!this.#V||this.#Vt(e)||(e.preventDefault(),e.stopImmediatePropagation(),this.#dt())};#ut(){this.#dt(),this.#V=!0,this.#B=window.setTimeout(()=>{this.#B=null,this.#V=!1},0)}#dt(){this.#B!==null&&(window.clearTimeout(this.#B),this.#B=null),this.#V=!1}#ft=()=>{this.#pt()};#pt(){if(!(!this.#F||this.#H!==null)){if(typeof window.requestAnimationFrame==`function`){this.#U=!0,this.#H=-1;let e=window.requestAnimationFrame(()=>{this.#H=null,this.#mt()});this.#H!==null&&(this.#H=e);return}this.#U=!1,this.#H=window.setTimeout(()=>{this.#H=null,this.#mt()},16)}}#mt(){if(!this.#F)return;this.#K&&(this.#K=!1,this.#gt()),this.#Y.observersDirty&&(this.#Y.markObserversSynchronized(),this.#yt()),this.#jt(),this.#Dt(),this.#Ct();let e=this.#e.querySelector(`.rg-feedback-navigator`);e&&e.dataset.presentation!==this.#Ne()?(this.#Mt(),this.#Ae(),this.#Me()):this.#Pe(),this.#xt()}#ht(){typeof window.ResizeObserver==`function`&&(this.#W=new window.ResizeObserver(this.#ft)),typeof window.MutationObserver==`function`&&(this.#G=new window.MutationObserver(e=>{e.some(xn)&&(this.#K=!0),this.#Y.invalidate(e),this.#ft()}),this.#gt()),this.#yt()}#gt(){let e=this.#G;if(!e)return;e.disconnect();let t=i();this.#_t(t),this.#vt();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{}}}#_t(e){let t=new Set(e.filter(e=>f(e)&&e!==document));for(let[e,n]of this.#X)t.has(e)||(n(),this.#X.delete(e));for(let e of t){if(this.#X.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.#rt),n(`keyup`,this.#it),n(`keydown`,this.#et),n(`pointermove`,this.#Xe),n(`pointerdown`,this.#ct),n(`pointerdown`,this.#Ze),n(`pointerup`,this.#Qe),n(`pointercancel`,this.#$e),n(`click`,this.#lt),n(`focusin`,this.#tt),n(`scroll`,this.#ft);let r=e.defaultView;r?.addEventListener(`blur`,this.#at),r?.addEventListener(`resize`,this.#ft,{passive:!0}),r?.visualViewport?.addEventListener(`scroll`,this.#ft,{passive:!0}),r?.visualViewport?.addEventListener(`resize`,this.#ft,{passive:!0}),this.#X.set(e,()=>{t.forEach(({type:t,listener:n,capture:r})=>{e.removeEventListener(t,n,r)}),r?.removeEventListener(`blur`,this.#at),r?.removeEventListener(`resize`,this.#ft),r?.visualViewport?.removeEventListener(`scroll`,this.#ft),r?.visualViewport?.removeEventListener(`resize`,this.#ft)})}}#vt(){let e=new Set(a(`iframe`));for(let[t,n]of this.#Z)e.has(t)||(n(),this.#Z.delete(t));for(let t of e){if(this.#Z.has(t))continue;let e=()=>{this.#K=!0,this.#pt()};t.addEventListener(`load`,e),this.#Z.set(t,()=>{t.removeEventListener(`load`,e)})}}#yt(){let e=this.#W;if(!e)return;let t=new Set,n=new Set;for(let e of this.#o?.comments??[]){let n=this.#Y.resolveTarget(e.target).element;n&&Hn(n,t)}if(this.#f){let e=this.#Y.resolveTarget(this.#f).element;e&&Hn(e,t)}for(let r of this.#J){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.#J.clear(),n.forEach(e=>this.#J.add(e))}#bt(){this.#H!==null&&(this.#U&&typeof window.cancelAnimationFrame==`function`?window.cancelAnimationFrame(this.#H):window.clearTimeout(this.#H),this.#H=null),this.#q!==null&&(window.clearTimeout(this.#q),this.#q=null),this.#W?.disconnect(),this.#W=null,this.#G?.disconnect(),this.#G=null,this.#K=!1,this.#Y.clear(),this.#J.clear(),this.#X.forEach(e=>e()),this.#X.clear(),this.#Z.forEach(e=>e()),this.#Z.clear()}#xt(){let e=(this.#o?.comments??[]).some(e=>e.target.kind===`element`&&r(e.anchor.selector)&&!this.#Y.commentLocation(e).available);if(!this.#F||!e){this.#q!==null&&(window.clearTimeout(this.#q),this.#q=null);return}this.#q===null&&(this.#q=window.setTimeout(()=>{this.#q=null,this.#K=!0,this.#Y.retryMissing(),this.#pt()},750))}#St(e,t=!0){let n=this.#v;if(!n)return;let r=this.#y;this.#N+=1,this.#v=null,this.#y=null,this.#kt(),this.#Mt(),this.#Ae(),!(t&&!this.#x&&this.#ke())&&e&&queueMicrotask(()=>{if(r===`navigator`&&this.#x){let e=this.#Re(n);e?e.focus({preventScroll:!0}):this.#Ie();return}if(r===`navigator`){this.#Le()?.focus({preventScroll:!0});return}let e=[...this.#e.querySelectorAll(`.pin[data-comment-id]`)].find(({dataset:e})=>e.commentId===n);e?e.focus():this.#Le()?.focus({preventScroll:!0})})}#Ct(){let e=this.#e.querySelector(`.rg-selection-label`);if(!e)return;if(this.#f){Ye(e,Gt(this.#f));return}if(!this.#v)return;let t=this.#o?.comments.find(({id:e})=>e===this.#v);t&&(e.removeAttribute(`data-layout`),Ye(e,Kt(t)))}#wt(e){let t=he(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}X(n,M(t))}#Tt(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`),X(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))))}#Et(){this.#e.querySelectorAll(`.highlight, .region`).forEach(e=>{e.style.display=`none`,e.removeAttribute(`data-context-target`),e.removeAttribute(`data-point`)})}#Dt(){if(this.#l)return;if(this.#f){this.#Ot(this.#f);return}let e=this.#o?.comments.find(({id:e})=>e===this.#v);if(e){this.#Ot(e.target);return}this.#Et()}#Ot(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=O(e.anchor,W(e));if(!n.anchored||!n.visible||!n.element)return;let r=M(n.element);t.dataset.contextTarget=`true`,X(t,r);return}if(n.dataset.contextTarget=`true`,e.kind===`viewport`){n.dataset.point=`true`,X(n,Qt(e));return}X(n,Yt(e))}}#kt(){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.#o;if(!n)return;let r=vt(this.#ze()).pinNumberByCommentId,i=this.#At(n.comments);n.comments.forEach(t=>{if(!this.#Be(t))return;let n=this.#Y.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`,Jt(t.id)),s.addEventListener(`click`,()=>{if(!this.#l){if(this.#v===t.id){this.#St(!0);return}this.#Ke(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})})}#At(e){if(!(window.innerWidth<=640||window.matchMedia?.(`(pointer: coarse)`).matches===!0))return new Map;let t=e.flatMap(e=>{if(!this.#Be(e))return[];let t=this.#Y.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 vn(t,40)){if(e.length<2)continue;e.sort((e,n)=>Qn(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=Z(r.x,e,t)),n<=i&&(r.y=Z(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}#jt(){let e=new Map(this.#o?.comments.map(e=>[e.id,e])??[]),t=this.#At([...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.#Be(e)||r.has(e.id))return!1;let t=this.#Y.commentLocation(e);return t.available&&t.pageX!==null&&t.pageY!==null})){this.#kt();return}n.forEach(n=>{let r=e.get(n.dataset.commentId??``);if(!r)return;if(!this.#Be(r)){n.style.display=`none`;return}let i=this.#Y.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`})}#Mt(){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.#Ot(this.#f),e.append(this.#Nt(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.#o?.comments.find(({id:e})=>e===this.#v);if(o){if(this.#Ot(o.target),this.#x&&this.#Ne()===`sheet`)return;e.append(this.#It(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.#l||this.#Et()}#Nt(e){let t=qe(`피드백`,`변경할 점`,`변경할 점 입력`);Ye(t,Gt(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.#we();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.#we()||!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.#Ye(`피드백을 저장하는 중입니다.`);return}this.#f=null,this.#p=``,this.#m=``,this.#h=null,this.#Mt(),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.#Pt(t,e)),this.#m&&Ln(t,this.#m),t}async#Pt(e,t){if(!this.#t||this.#g||!this.#we())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?sn(t):Promise.resolve(null);if(!u){let e=t;if(n.sourceContextResolver)try{e=await ke(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.#Ft(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.#Mt(),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.#Mt(),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.#Ye(`피드백과 위치 캡처를 저장했습니다.`);return}catch{this.#Ye(`피드백은 저장했지만 위치 캡처는 저장하지 못했습니다.`);return}this.#Ye(`피드백을 저장했습니다.`)}async#Ft(e,t){return this.#o?.comments.some(({id:t})=>t===e)?!0:await new Promise((n,r)=>{let i=()=>{clearTimeout(o),t.removeEventListener(`abort`,a),this.#ae.delete(e)},a=()=>{i(),n(!1)},o=setTimeout(()=>{i(),r(Error(`Comment was not confirmed by the review service`))},On);this.#ae.set(e,e=>{i(),n(e)}),t.addEventListener(`abort`,a,{once:!0})})}#It(e){let t=this.#o?vt(this.#o).pinNumberByCommentId.get(e.id)??1:1,n=!this.#Y.commentLocation(e).available,r=qe(`피드백 #${t}${e.status===`resolved`?` · 완료`:``}${n?` · 위치 없음`:``}`,`답글`,`답글 입력`);r.classList.add(`rg-thread-label`),r.id=Jt(e.id),r.tabIndex=-1,r.dataset.commentId=e.id,r.setAttribute(`aria-label`,`피드백 대화`),Ye(r,Kt(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(Je()),i.append(a);let o=Y(`rg-thread-messages`);o.append(In(e.authorName,e.body,e.createdAt));let s=this.#o?.replies.filter(({commentId:t})=>t===e.id)??[];if(this.#o?.window?.possiblyPartialReplyThreadIds.includes(e.id)){let e=Y(`rg-thread-partial-notice`);e.setAttribute(`role`,`status`),e.textContent=`최근 답글 ${this.#o.window.replyLimitPerComment}개만 표시합니다.`,o.append(e)}s.forEach(e=>o.append(In(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.#Q.get(e.id)??``;let u=this.#$.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.#Q.set(e.id,c.value),this.#te.get(e.id)?.body!==c.value.trim()&&(this.#te.delete(e.id),this.#ee.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.#St(!0)),l.addEventListener(`click`,()=>void this.#Lt(r,e));let f=this.#ee.get(e.id);return f&&Ln(r,f),queueMicrotask(d),r}async#Lt(e,t){if(!this.#t||!this.#we())return;let n=this.#t,r=n.pageId,i=this.#j,a=this.#F?.signal;if(!a||this.#$.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.#te.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.#$.set(t.id,{request:f,body:c,reply:d}),this.#zt(t.id,!0);try{if(await n.repository.mutate(r,{type:`reply.upsert`,reply:d}),a.aborted||i!==this.#j)return;await this.#Rt(d,a)}catch{if(a.aborted||i!==this.#j||this.#$.get(t.id)?.request!==f)return;this.#$.delete(t.id),this.#te.set(t.id,{body:c,reply:d}),this.#ee.set(t.id,`답글을 저장하지 못했습니다. 다시 시도하세요.`),s.disabled=!1,o.disabled=!1,this.#v===t.id&&(this.#x&&this.#Ne()===`sheet`?this.#Ae():this.#Mt(),queueMicrotask(()=>this.#Bt(t.id)?.querySelector(`textarea`)?.focus({preventScroll:!0})));return}if(a.aborted||i!==this.#j||this.#$.get(t.id)?.request!==f)return;this.#$.delete(t.id),this.#te.delete(t.id),this.#ee.delete(t.id),this.#Q.delete(t.id);let p=this.#Bt(t.id)?.querySelector(`textarea`);p&&(p.value=``,p.style.height=`auto`),this.#zt(t.id,!1),this.#Ye(`답글을 저장했습니다.`)}async#Rt(e,t){this.#o?.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.#oe.delete(e.id)},a=()=>{i(),n()},o=setTimeout(()=>{i(),r(Error(`Reply was not confirmed by the review service`))},On);this.#oe.set(e.id,{commentId:e.commentId,settle:()=>{i(),n()}}),t.addEventListener(`abort`,a,{once:!0})})}#zt(e,t){let n=this.#Bt(e),r=n?.querySelector(`textarea`),i=n?.querySelector(`.rg-submit`);r&&(r.disabled=t),i&&(i.disabled=t)}#Bt(e){return[...this.#e.querySelectorAll(`.rg-thread-label`)].find(({dataset:t})=>t.commentId===e)}#Vt(e){return e.composedPath().includes(this)}};function Nn(e){me(e.styleNonce),customElements.get(`agency-review-widget`)||customElements.define(Dn,Mn);let t=document.createElement(Dn);return t.configure(e),document.body.append(t),t}function Pn(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 Y(e){let t=document.createElement(`div`);return t.className=e,t}function X(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 Fn(e,t){return Math.hypot(e.clientX-t.clientX,e.clientY-t.clientY)}function In(e,t,n){let r=document.createElement(`article`);r.className=`rg-message`;let i=Y(`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 Ln(e,t){let n=e.querySelector(`.rg-inline-error`);if(!n){n=Y(`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 Rn(e){return Gn(e).designMode===`on`||e.composedPath().some(e=>{let t=Kn(e);return t?zn(t):!1})}function zn(e){let t=e.tagName.toLowerCase();return t===`input`||t===`textarea`||t===`select`||`isContentEditable`in e&&!!e.isContentEditable||jn.has(e.getAttribute(`role`)??``)}function Bn(e){let t=e.composedPath().map(Kn).find(Boolean)??null;return!t||t===t.ownerDocument.documentElement||t===t.ownerDocument.body||p(t)?null:t}function Vn(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 Hn(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 Un(e){let t=Gn(e).defaultView?.getSelection();return!!(t&&!t.isCollapsed&&t.toString().length>0)}function Wn(e){let t=e.clientX,n=e.clientY,r=Gn(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 Gn(e){for(let t of e.composedPath()){if(qn(t))return t;let e=Kn(t);if(e)return e.ownerDocument}return document}function Kn(e){return e&&`nodeType`in e&&e.nodeType===1?e:null}function qn(e){return`nodeType`in e&&e.nodeType===9}function Jn(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 Yn(e){return e===`membership-revoked`?`리뷰 권한이 취소되었습니다. 작성 중인 내용은 저장되지 않았습니다.`:e===`session-expired`?`세션이 만료되었습니다. 다시 인증하세요.`:`이 리뷰에 접근할 수 없습니다. 다시 인증하세요.`}function Xn(e){return e===`all`||e===`open`||e===`resolved`}function Zn(e){return e===`current`||e===`all`}function Qn(e,t){return e.createdAt-t.createdAt||e.id.localeCompare(t.id)}function $n(){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 Z(e,t,n){return Math.min(n,Math.max(t,e))}function er(e){return En.includes(e)?e:`bottom-right`}function tr(e){return e===`top-left`||e===`left`||e===`bottom-left`?`bottom-left`:`bottom-right`}function nr(e){return e===`top-left`||e===`top`||e===`top-right`?`top`:e===`bottom-left`||e===`bottom`||e===`bottom-right`?`bottom`:e}function rr(e){return Number.isFinite(e)?e:0}function ir(e){return e.replace(/\/+$/,``)||`/`}function ar(e){let t=`${ir(e.pathname)}${e.search}${e.hash}`,n=`${e.host}${t}`;try{return decodeURI(n)}catch{return n}}function or(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 sr(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 Q(...e){e.forEach(e=>{try{e?.()}catch{}})}function cr(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 $(){return new Promise(e=>{if(typeof window.requestAnimationFrame==`function`){window.requestAnimationFrame(()=>e());return}queueMicrotask(e)})}function lr(e,t){return{value:e.style.getPropertyValue(t),priority:e.style.getPropertyPriority(t)}}function ur(e,t,n){n.value?e.style.setProperty(t,n.value,n.priority):e.style.removeProperty(t)}function dr(){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 fr(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 pr(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{fr as createActiveReviewSessionLifecycle,pr as createReviewNavigationHandler,Nn as mountReviewWidget};
|