1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1544,6242],{11544:(e,t,n)=>{n.r(t),n.d(t,{AddCommentIcon:()=>l,default:()=>l});var a=n(12115),o=n(95155);let l=(0,a.forwardRef)(function(e,t){return(0,o.jsx)("svg",{"data-sanity-icon":"add-comment",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,ref:t,children:(0,o.jsx)("path",{d:"M13 6.5H7.5C6.39543 6.5 5.5 7.39543 5.5 8.5V14.5C5.5 15.6046 6.39543 16.5 7.5 16.5H9.5V20.5L13.5 16.5H16.5C17.6046 16.5 18.5 15.6046 18.5 14.5V12M15 6.5H22M18.5 10V3",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})},86242:(e,t,n)=>{n.r(t),n.d(t,{CommentsField:()=>E});var a=n(30200),o=n(37846),l=n(62858),i=n(54796),r=n(80985),d=n(11695),s=n(96869),c=n(22776),p=n(97922),h=n(50549),m=n(12115),u=n(19749),f=n(95155),g=n(80825),x=n(21565),C=n(30457),I=n(67460),b=n(51862),y=n(6052),v=n(97931),j=n(20129),w=n(18608),k=n(46983),P=n(69685),_=n(70574),D=n(11544);let S=(0,b.I4)(y.so).withConfig({displayName:"ContentStack",componentId:"sc-u7vi1f-0"})`width:320px;`;function $(e){let t,n,a,r,s,g=(0,u.c)(69),{count:I,currentUser:b,fieldTitle:v,mentionOptions:j,onChange:w,onClick:k,onClose:P,onCommentAdd:$,onDiscard:A,onInputKeyDown:N,open:H,readOnly:E,value:M}=e,{t:z}=(0,o.t)(p.a),R=(0,m.useRef)(null),[T,V]=(0,m.useState)(null),K=(0,m.useRef)(null),L=I>0,F;g[0]!==T||g[1]!==P||g[2]!==H?(F=()=>{H&&(P(),T?.focus())},g[0]=T,g[1]=P,g[2]=H,g[3]=F):F=g[3];let O=F,Y;g[4]!==O||g[5]!==$?(Y=e=>{$(e),O()},g[4]=O,g[5]=$,g[6]=Y):Y=g[6];let B=Y,J;g[7]===M?J=g[8]:(J=(0,c.n)(M),g[7]=M,g[8]=J);let W=J,Z;g[9]!==O||g[10]!==W?(Z=()=>{W?K.current?.discardDialogController.open():O()},g[9]=O,g[10]=W,g[11]=Z):Z=g[11];let q=Z,G;g[12]===N?G=g[13]:(G=e=>{e.isDefaultPrevented()||N&&N(e)},g[12]=N,g[13]=G);let Q=G,U;g[14]===Symbol.for("react.memo_cache_sentinel")?(U=()=>{K.current?.discardDialogController.close()},g[14]=U):U=g[14];let X=U,ee;g[15]!==O||g[16]!==A?(ee=()=>{K.current?.discardDialogController.close(),O(),A()},g[15]=O,g[16]=A,g[17]=ee):ee=g[17];let et=ee,en;g[18]===q?en=g[19]:(en=e=>{"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),q())},g[18]=q,g[19]=en);let ea=en,eo;if(g[20]===Symbol.for("react.memo_cache_sentinel")?(eo=()=>[R.current],g[20]=eo):eo=g[20],(0,x.t)(H&&q,eo),!L){let e,t,n,a,o,r,s;g[21]===v?e=g[22]:(e={field:v},g[21]=v,g[22]=e),g[23]!==z||g[24]!==e?(t=(0,f.jsx)(i.t,{t:z,i18nKey:"compose.add-comment-input-placeholder",values:e}),g[23]=z,g[24]=e,g[25]=t):t=g[25];let c=t,p;g[26]!==b||g[27]!==et||g[28]!==Q||g[29]!==B||g[30]!==j||g[31]!==w||g[32]!==c||g[33]!==E||g[34]!==M?(p=(0,f.jsx)(S,{padding:2,gap:4,flexDirection:"column",children:(0,f.jsx)(h.t,{currentUser:b,focusLock:!0,focusOnMount:!0,mentionOptions:j,onChange:w,onDiscardCancel:X,onDiscardConfirm:et,onKeyDown:Q,onSubmit:B,placeholder:c,readOnly:E,ref:K,value:M})}),g[26]=b,g[27]=et,g[28]=Q,g[29]=B,g[30]=j,g[31]=w,g[32]=c,g[33]=E,g[34]=M,g[35]=p):p=g[35];let m=p,u;return g[36]===Symbol.for("react.memo_cache_sentinel")?(u=["bottom-end"],g[36]=u):u=g[36],g[37]===z?n=g[38]:(n=z("field-button.aria-label-add"),g[37]=z,g[38]=n),g[39]===z?a=g[40]:(a=z("field-button.title"),g[39]=z,g[40]=a),g[41]===a?o=g[42]:(o={content:a,placement:"top"},g[41]=a,g[42]=o),g[43]!==k||g[44]!==H||g[45]!==E||g[46]!==n||g[47]!==o?(r=(0,f.jsx)("div",{children:(0,f.jsx)(l.o,{"aria-label":n,disabled:E,icon:D.AddCommentIcon,mode:"bleed",onClick:k,ref:V,selected:H,tooltipProps:o})}),g[43]=k,g[44]=H,g[45]=E,g[46]=n,g[47]=o,g[48]=r):r=g[48],g[49]!==m||g[50]!==ea||g[51]!==H||g[52]!==r?(s=(0,f.jsx)(d.r,{constrainSize:!0,content:m,fallbackPlacements:u,open:H,placement:"right-start",portal:!0,ref:R,onKeyDown:ea,children:r}),g[49]=m,g[50]=ea,g[51]=H,g[52]=r,g[53]=s):s=g[53],s}g[54]!==I||g[55]!==z?(t=z("field-button.content",{count:I}),g[54]=I,g[55]=z,g[56]=t):t=g[56],g[57]===z?n=g[58]:(n=z("field-button.aria-label-open"),g[57]=z,g[58]=n),g[59]===Symbol.for("react.memo_cache_sentinel")?(a=(0,f.jsx)(y.In,{muted:!0,size:1,icon:_.CommentIcon,style:{margin:"-0.375rem"}}),g[59]=a):a=g[59];let el=I>9?"9+":I,ei;return g[60]===el?ei=g[61]:(ei=(0,f.jsxs)(y.so,{alignItems:"center",gap:2,children:[a,(0,f.jsx)(y.EY,{size:0,as:"div",trim:!0,children:el})]}),g[60]=el,g[61]=ei),g[62]!==k||g[63]!==n||g[64]!==ei?(r=(0,f.jsx)(C.t,{"aria-label":n,mode:"bleed",onClick:k,padding:2,gap:2,children:ei}),g[62]=k,g[63]=n,g[64]=ei,g[65]=r):r=g[65],g[66]!==r||g[67]!==t?(s=(0,f.jsx)(l.s,{portal:!0,placement:"top",content:t,children:r}),g[66]=r,g[67]=t,g[68]=s):s=g[68],s}let A=new Map,N=[],H={initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0}};function E(e){let t,n=(0,u.c)(5),{enabled:a,mode:o}=(0,s.t)();if(!a){let t;return n[0]===e?t=n[1]:(t=e.renderDefault(e),n[0]=e,n[1]=t),t}return n[2]!==o||n[3]!==e?(t=(0,f.jsx)(R,{...e,mode:o}),n[2]=o,n[3]=e,n[4]=t):t=n[4],t}let M=(0,b.I4)(j.PY1.div).withConfig({displayName:"HighlightDiv",componentId:"sc-gt2o49-0"})(({theme:e})=>{let{radius:t,space:n,color:a}=e.sanity,o=k.OZ[p.t][a.dark?900:50].hex;return(0,b.AH)`mix-blend-mode:${a.dark?"screen":"multiply"};border-radius:${t[3]}px;top:-${n[2]}px;left:-${n[2]}px;bottom:-${n[2]}px;right:-${n[2]}px;pointer-events:none;position:absolute;z-index:1;width:calc(100% + ${2*n[2]}px);height:calc(100% + ${2*n[2]}px);background-color:${o};`}),z=(0,b.I4)(y.Tk).withConfig({displayName:"FieldStack",componentId:"sc-gt2o49-1"})`position:relative;&:empty:not([hidden]){display:none;}`;function R(e){let t,n,o,l,i,d,s,c=(0,u.c)(86),{mode:p}=e,x=(0,r.n)(),{element:C}=(0,I.a)(),b=(0,m.useRef)(null),{comments:y,isCommentsOpen:j,mentionOptions:k,onCommentsOpen:_,operation:D,readOnly:S,setStatus:E,status:R}=(0,h.f)(),{upsellData:L,handleOpenDialog:F}=(0,h.a)(),{selectedPath:O,setSelectedPath:Y}=(0,h.o)(),{authoringPath:B,setAuthoringPath:J}=function(){let e=(0,m.useContext)(g.uP);if(!e)throw Error("useCommentsAuthoringPath: missing context value");return e}(),W;c[0]===C?W=c[1]:(W={boundaryElement:C},c[0]=C,c[1]=W);let{scrollToGroup:Z}=(0,h.d)(W),q;c[2]===e.schemaType?q=c[3]:(q=(0,a.Jt)(e.schemaType),c[2]=e.schemaType,c[3]=q);let G=q,Q;c[4]===e.path?Q=c[5]:(Q=v.dI(e.path),c[4]=e.path,c[5]=Q);let U=Q,X;c[6]===U?X=c[7]:(X=A.get(U)||null,c[6]=U,c[7]=X);let[ee,et]=(0,m.useState)(X),en=B===U,ea;c[8]!==j||c[9]!==e.path||c[10]!==O?.fieldPath||c[11]!==O?.origin?(ea=()=>!!j&&O?.origin!=="form"&&O?.origin!=="url"&&K(O?.fieldPath,e.path),c[8]=j,c[9]=e.path,c[10]=O?.fieldPath,c[11]=O?.origin,c[12]=ea):ea=c[12],O?.fieldPath,O?.origin,c[13]===ea?t=c[14]:(t=ea(),c[13]=ea,c[14]=t);let eo=t;if(O?.threadId,c[15]!==y.data.open||c[16]!==O?.threadId){let e;c[18]===O?.threadId?e=c[19]:(e=e=>e.threadId===O?.threadId,c[18]=O?.threadId,c[19]=e),n=y.data.open.filter(e).some(V),c[15]=y.data.open,c[16]=O?.threadId,c[17]=n}else n=c[17];let el=n,ei;if(c[20]!==y.data.open||c[21]!==e.path){let t;c[23]===e.path?t=c[24]:(t=t=>K(t.fieldPath,e.path)?t.commentsCount:0,c[23]=e.path,c[24]=t),ei=y.data.open.map(t).reduce(T,0),c[20]=y.data.open,c[21]=e.path,c[22]=ei}else ei=c[22];let er=ei||0,ed=er>0,es;c[25]===U?es=c[26]:(es=()=>{et(null),A.delete(U)},c[25]=U,c[26]=es);let ec=es,ep;c[27]!==y.data.open||c[28]!==F||c[29]!==ed||c[30]!==en||c[31]!==p||c[32]!==_||c[33]!==e.path||c[34]!==Z||c[35]!==J||c[36]!==Y||c[37]!==E||c[38]!==R||c[39]!==U||c[40]!==L?(ep=()=>{if(ed){"resolved"===R&&E("open"),J(null),_?.();let t=y.data.open.find(t=>K(t.fieldPath,e.path));t&&(Y({threadId:t.threadId,origin:"form",fieldPath:t.fieldPath}),Z(t.threadId));return}"upsell"===p?L?F("field_action"):_?.():J(en?null:U)},c[27]=y.data.open,c[28]=F,c[29]=ed,c[30]=en,c[31]=p,c[32]=_,c[33]=e.path,c[34]=Z,c[35]=J,c[36]=Y,c[37]=E,c[38]=R,c[39]=U,c[40]=L,c[41]=ep):ep=c[41];let eh=ep,em;c[42]!==_||c[43]!==D||c[44]!==e.path||c[45]!==ec||c[46]!==Z||c[47]!==Y||c[48]!==E||c[49]!==R?(em=t=>{if(t){let n=(0,P.A)(),a={type:"field",fieldPath:v.dI(e.path),message:t,parentCommentId:void 0,status:"open",threadId:n,reactions:N};D.create(a),_?.(),"resolved"===R&&E("open"),ec(),Y({threadId:n,origin:"form",fieldPath:v.dI(e.path)}),Z(n)}},c[42]=_,c[43]=D,c[44]=e.path,c[45]=ec,c[46]=Z,c[47]=Y,c[48]=E,c[49]=R,c[50]=em):em=c[50];let eu=em,ef;c[51]===J?ef=c[52]:(ef=()=>J(null),c[51]=J,c[52]=ef);let eg=ef,ex;c[53]===U?ex=c[54]:(ex=e=>{et(e),A.set(U,e)},c[53]=U,c[54]=ex);let eC=ex,eI;c[55]!==er||c[56]!==x||c[57]!==G||c[58]!==eh||c[59]!==eg||c[60]!==eu||c[61]!==eC||c[62]!==en||c[63]!==k||c[64]!==S||c[65]!==ec||c[66]!==ee?(eI=x&&(0,f.jsx)($,{count:Number(er),currentUser:x,fieldTitle:G,mentionOptions:k,onChange:eC,onClick:eh,onClose:eg,onCommentAdd:eu,onDiscard:ec,open:en,readOnly:S,value:ee}),c[55]=er,c[56]=x,c[57]=G,c[58]=eh,c[59]=eg,c[60]=eu,c[61]=eC,c[62]=en,c[63]=k,c[64]=S,c[65]=ec,c[66]=ee,c[67]=eI):eI=c[67],c[68]!==ed||c[69]!==en||c[70]!==eI?(o={button:eI,hasComments:ed,isAddingComment:en},c[68]=ed,c[69]=en,c[70]=eI,c[71]=o):o=c[71];let eb=o,ey;return c[72]===e.path?ey=c[73]:(ey=(0,h.c)(v.dI(e.path)),c[72]=e.path,c[73]=ey),c[74]!==eb||c[75]!==e?(l=e.renderDefault({...e,__internal_comments:eb}),c[74]=eb,c[75]=e,c[76]=l):l=c[76],c[77]!==el||c[78]!==eo?(i=eo&&!el&&(0,f.jsx)(M,{animate:"animate",exit:"exit",initial:"initial",variants:H}
1),c[77]=el,c[78]=eo,c[79]=i):i=c[79],c[80]===i?d=c[81]:(d=(0,f.jsx)(w.N,{children:i}),c[80]=i,c[81]=d),c[82]!==ey||c[83]!==l||c[84]!==d?(s=(0,f.jsxs)(z,{...ey,ref:b,children:[l,d]}),c[82]=ey,c[83]=l,c[84]=d,c[85]=s):s=c[85],s}function T(e,t){return e+t}function V(e){return(0,c.r)(e.parentComment)}function K(e,t){let n=(0,c.i)(e);return!!n&&v.w1(t,n)}}}]); 2//# sourceMappingURL=6242.b52a1e16a214c09f.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.