PageSourceSearch

https://appv2.comparables.ai/_next/static/chunks/7835.c1b8141243fb3b92.js

js comparables.ai collected 2026-09-28 12:47:23 UTC 15,074 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7835],{5619:(e,l,t)=>{t.d(l,{z:()=>i});var a=t(20063);let r="ulsrm",n=()=>{let e=new URL(window.location.href);e.searchParams.set(r,"1"),requestAnimationFrame(()=>{history.replaceState(null,"",e.toString())})},o=()=>{let e=new URL(window.location.href);e.searchParams.delete(r),requestAnimationFrame(()=>{history.replaceState(null,"",e.toString())})},i=()=>({isOpen:"string"==typeof(0,a.useSearchParams)().get(r),openModal:n,closeModal:o})},7835:(e,l,t)=>{t.r(l),t.d(l,{EditAuditColumnsTable:()=>Y});var a=t(95155),r=t(12115),n=t(80317),o=t(80357),i=t(27855),d=t(80223),s=t(54463),c=t(31512),u=t(96869),m=t(50355),f=t(34782),h=t(98447),x=t(56120),p=t(6388),g=t(33427),b=t(35362),v=t(38688),j=t(48665),y=t(24879),C=t(44358),w=t(5619),k=t(48306),S=t(47652),A=t(37236);let z=(0,r.lazy)(()=>Promise.all([t.e(9106),t.e(438)]).then(t.bind(t,70438)).then(e=>({default:e.AddAiColumnModal}))),M=e=>{let{onAdd:l,disabled:t}=e,{isOpen:n,close:o,open:d}=(0,A.j)(),s=(0,r.useCallback)((e,t)=>{l(e,t),o()},[l,o]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.default,{id:"add_ai_column_btn",onClick:d,size:"small",variant:"contained",color:"primary",disabled:t,startIcon:(0,a.jsx)(S.Q,{width:"14",color:"inherit"}),children:"Add AI Column"}),(0,a.jsx)(C.ErrorBoundary,{onlyToast:!0,children:(0,a.jsx)(r.Suspense,{children:n?(0,a.jsx)(z,{isOpen:!0,onClose:o,onAdd:s}):null})})]})};var _=t(48690),W=t(55205),I=t(82258);let B=(0,r.lazy)(()=>Promise.all([t.e(3471),t.e(2124),t.e(4827),t.e(7488)]).then(t.bind(t,52667)).then(e=>({default:e.PeriodSelectModal}))),R={unlock:"Unlock the full results to add or remove columns.",readonly:"Purchased full report will allow adding or removing columns."},E={columns:[],byGridField:new Map,instances:[]},L=[],H={fontSize:"14px",fontWeight:600,top:0},P=e=>{let{onClose:l,handleSave:t,isLocked:r}=e;return(0,a.jsxs)(v.f,{component:"header",flexWrap:"wrap",gap:"1rem",sx:{borderBottom:"1px solid var(--border-color)",paddingBottom:"1.25rem"},children:[(0,a.jsx)(n.default,{variant:"h5",sx:{pl:"14px",fontSize:"24px",fontWeight:600},children:"Edit Columns"}),(0,a.jsxs)(o.default,{display:"flex",gap:".5rem",children:[(0,a.jsx)(i.default,{onClick:l,children:r?"Close":"Cancel"}),!r&&(0,a.jsx)(i.default,{id:"apply_audit_columns_btn",variant:"contained",color:"primary",onClick:t,children:"Save"})]})]})},q=e=>{let{variant:l,onUnlock:t}=e;return(0,a.jsxs)(v.f,{role:"status",sx:{gap:"1rem",flexWrap:"wrap",alignItems:"center",justifyContent:"space-between",marginTop:"1rem",padding:".75rem 1rem",borderRadius:".5rem",border:"1px solid var(--border-color)",bgcolor:"background.paper"},children:[(0,a.jsxs)(v.f,{sx:{gap:".5rem",alignItems:"center"},children:[(0,a.jsx)(g.default,{fontSize:"small",sx:{color:"text.secondary"}}),(0,a.jsx)(o.default,{component:"p",sx:{fontSize:".875rem",margin:0},children:R[l]})]}),"unlock"===l?(0,a.jsx)(i.default,{color:"success",variant:"contained",size:"small",onClick:t,children:"Unlock results"}):null]})},Q=e=>{let{title:l,search:t}=e;return(0,a.jsxs)(o.default,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:".75rem",flex:"0 0 auto",padding:".75rem 1rem .5rem"},children:[(0,a.jsx)(o.default,{component:"p",sx:{fontSize:"1.25rem",fontWeight:600,margin:0},children:l}),t]})},T=e=>{let{count:l,max:t,isLocked:r,onAdd:n}=e,i=l>=t;return(0,a.jsxs)(v.f,{flexWrap:"wrap",gap:"1rem",sx:{flex:"0 0 auto",padding:".75rem 1rem",borderBottom:"1px solid var(--border-color)"},children:[(0,a.jsxs)(o.default,{children:[(0,a.jsx)(o.default,{component:"p",sx:{fontSize:"1.25rem",fontWeight:600,margin:0},children:"Add AI Column"}),(0,a.jsx)(o.default,{component:"p",sx:{fontSize:".75rem",color:"text.secondary",margin:".125rem 0 0"},children:i?"All ".concat(t," AI columns are in use. Remove one to ask something else."):"Ask a question and AI answers it for every company. ".concat(l," of ").concat(t," used.")})]}),(0,a.jsx)(M,{onAdd:n,disabled:r||i})]})},F=e=>{let{action:l,showPeriod:t=!1}=e;return(0,a.jsx)(d.default,{children:(0,a.jsxs)(s.default,{children:[(0,a.jsx)(c.default,{sx:H,children:"#"}),(0,a.jsx)(c.default,{sx:H,children:"Item"}),(0,a.jsx)(c.default,{sx:H,children:"Category"}),t?(0,a.jsx)(c.default,{sx:H,children:"Period"}):null,(0,a.jsx)(c.default,{sx:{...H,paddingRight:0},align:"right",children:l})]})})},U=e=>{let{label:l,description:t}=e;return(0,a.jsxs)(a.Fragment,{children:[l,t?(0,a.jsx)(j.MUITooltip,{title:t,children:(0,a.jsx)(g.default,{sx:{color:"background.paper",fill:"#8392AD",marginLeft:".5rem",verticalAlign:"-17%","& path":{fill:"#8392AD"}},fontSize:"small"})}):null]})},O=e=>{var l;return null!=(l=e.category)?l:(0,y.T$)(e.field)?(0,y.Xp)(e.field).category:""},V=e=>{var l;return null!=(l=e.headerName)?l:e.field},D=e=>e.replace(/[A-Za-z]+/g,e=>e===e.toUpperCase()?e:e[0].toUpperCase()+e.slice(1).toLowerCase()),N=new Intl.Collator(void 0,{numeric:!0}),X=(e,l)=>e.category!==l.category?e.category?l.category?N.compare(e.category,l.category):-1:1:N.compare(e.label,l.label),G=e=>e.toLowerCase().replace(/[^a-z0-9]+/g," ").trim().split(" ").filter(
1Boolean),Y=e=>{var l,t,n,d,g;let{columns:v,catalog:j=E,ai:y,columnVisibilityModel:S,columnOrder:A,onSave:z,onClose:M,previewLock:R}=e,{columns:H,byGridField:N}=j,Y=null!=R,{openModal:Z}=(0,w.z)(),[$,J]=(0,r.useState)(()=>({...S})),[K,ee]=(0,r.useState)([]),[el,et]=(0,r.useState)(j.instances),[ea,er]=(0,r.useState)(null!=(l=null==y?void 0:y.requests)?l:[]),[en,eo]=(0,r.useState)(null),[ei,ed]=(0,r.useState)(null!=(t=null==y?void 0:y.requests)?t:L);if((null!=(n=null==y?void 0:y.requests)?n:L)!==ei){let e=new Set(ei.map(_.QB)),l=(null!=(d=null==y?void 0:y.requests)?d:[]).filter(l=>!e.has((0,_.QB)(l)));ed(null!=(g=null==y?void 0:y.requests)?g:L),l.length&&er(e=>{var t;let a=new Set(e.map(_.QB)),r=l.filter(e=>!a.has((0,_.QB)(e))),n=Math.max(0,(null!=(t=null==y?void 0:y.max)?t:0)-e.length);return n&&r.length?[...e,...r.slice(0,n)]:e})}let es=(0,r.useCallback)(()=>{M(),Z()},[M,Z]),ec=(0,r.useMemo)(()=>v.filter(e=>!1!==e.hideable),[v]),eu=(0,r.useMemo)(()=>(e=>{let l=new Set;return e.filter(e=>!l.has(e.id)&&(l.add(e.id),!0))})([...ec.map(e=>({kind:"base",id:e.field,field:e.field,label:V(e),category:D(O(e)),description:e.description,catalog:N.get(e.field)})),...H.map(e=>({kind:"catalog",id:"catalog-option:".concat(e.key),label:e.displayName,category:D(e.category),description:e.definition||void 0,column:e}))]).sort(X),[ec,H,N]),[em,ef]=(0,r.useState)(""),eh=(0,r.useMemo)(()=>{let e=G(em);return e.length?eu.filter(l=>((e,l)=>{let t=G("".concat(e.label," ").concat(e.category));return l.every(e=>t.some(l=>l.includes(e)))})(l,e)):eu},[eu,em]),ex=(0,r.useMemo)(()=>new Set(el.map(e=>{let{id:l}=e;return l})),[el]),ep=(0,r.useMemo)(()=>{let e=null==en?void 0:en.column.key;return new Set(el.filter(l=>l.key===e).map(e=>{let{id:l}=e;return l}))},[en,el]),eg=(0,r.useMemo)(()=>(e=>{let{editableColumns:l,stagedInstances:t,stagedAiColumns:a,stagedModel:r,columnVisibilityModel:n,columnOrder:o,addedFields:i}=e,d=new Map(l.map(e=>[e.field,{field:e.field,label:V(e),category:D(O(e)),description:e.description,period:""}]));t.forEach(e=>{let l=(0,I.DR)(e.id);d.set(l,{field:l,label:e.label,category:D(e.category),description:e.definition||void 0,period:e.periodLabel,instanceId:e.id})}),a.forEach(e=>{let l=(0,_.aZ)(e);d.set(l,{field:l,label:e.question,category:k.Pk[e.source],period:"",aiColumn:e})});let s=i.filter(e=>!1===n[e]&&!1!==r[e]),c=t.map(e=>{let{id:l}=e;return(0,I.DR)(l)}).filter(e=>!o.includes(e)),u=a.map(_.aZ).filter(e=>!o.includes(e));return(0,W.q)(o,[...s,...c,...u]).map(e=>d.get(e)).filter(e=>!!e).filter(e=>!!e.instanceId||!!e.aiColumn||!1!==r[e.field])})({editableColumns:ec,stagedInstances:el,stagedAiColumns:ea,stagedModel:$,columnVisibilityModel:S,columnOrder:A,addedFields:K}),[ec,el,ea,$,S,A,K]),eb=(0,r.useCallback)(()=>{z({visibilityModel:$,addedFields:K,instances:el,aiColumns:ea}),M()},[z,M,$,K,el,ea]),ev=(0,r.useCallback)((e,l)=>{er(t=>{let a=(0,_.QB)({question:e,source:l});return t.some(e=>(0,_.QB)(e)===a)?t:[...t,{question:e,source:l}]})},[]),ej=(0,r.useCallback)(e=>{J(l=>({...l,[e]:!0})),ee(l=>l.includes(e)?l:[...l,e])},[]),ey=(0,r.useCallback)((e,l)=>{et(t=>{let a=new Set(t.map(e=>{let{id:l}=e;return l})),r=l.map(l=>(0,I.jW)(e,l)).filter(e=>!a.has(e.id));return r.length?[...t,...r]:t})},[]),eC=(0,r.useCallback)(e=>"base"===e.kind?e.catalog?void eo({column:e.catalog,baseField:e.field}):void ej(e.field):(0,I.M_)(e.column)?void eo({column:e.column}):void ey(e.column,[{}]),[ej,ey]),ew=(0,r.useCallback)(e=>"base"===e.kind?!e.catalog&&!1!==$[e.field]:!(0,I.M_)(e.column)&&ex.has((0,I.jW)(e.column,{}).id),[$,ex]),ek=(0,r.useCallback)(e=>{if(e.aiColumn){let l=(0,_.QB)(e.aiColumn);er(e=>e.filter(e=>(0,_.QB)(e)!==l));return}if(e.instanceId)return void et(l=>l.filter(l=>{let{id:t}=l;return t!==e.instanceId}));J(l=>({...l,[e.field]:!1})),ee(l=>l.filter(l=>l!==e.field))},[]),eS=(0,r.useCallback)(()=>{J(e=>({...e,...Object.fromEntries(ec.map(e=>[e.field,!1]))})),ee([]),et([]),er([])},[ec]),eA=(0,r.useCallback)(e=>{if(!en)return;let{column:l,baseField:t}=en;if(!t)return void ey(l,e);e.some(I.iV)&&ej(t);let a=e.filter(e=>!(0,I.iV)(e));a.length&&ey(l,a)},[en,ey,ej]);return(0,a.jsxs)(u.default,{overflow:"hidden",children:[(0,a.jsx)(P,{handleSave:eb,onClose:M,isLocked:Y}),R?(0,a.jsx)(q,{variant:R,onUnlock:es}):null,(0,a.jsxs)(o.default,{display:"flex",sx:{bgcolor:"var(--modal-surface-color)",gridRowGap:"1rem",overflowX:"hidden","@media(max-width: 1348px)":{overflowY:"auto",flexWrap:"wrap-reverse",flex:"1 1 auto"}},children:[(0,a.jsxs)(u.default,{sx:{minHeight:"70vh",minWidth:"min(100%, 420px)",flex:"1 1 auto",maxWidth:"100%",maxHeight:"100%",overflow:"hidden",bgcolor:"var(--modal-surface-color)","@media(min-width: 1349px)":{maxHeight:"calc(100vh - 64px - 105px)"}},children:[y?(0,a.jsx)(T,{count:ea.length,max:y.max,isLocked:Y,onAdd:ev}):null,(0,a.jsx)(Q,{title:"Add data points",search:(0,a.jsx)(m.A,{id:"search_audit_columns",size:"small",value:em,onChange:e=>ef(e.target.value),placeholder:"Search data points",slotProps:{input:{startAdornment:(0,a.jsx)(f.A,{position:"start",children:(0,a.jsx)(b.default,{fontSize:"small"})})}},sx:{minWidth:"220px","& .MuiInputBase-root":{borderRadius:"20px",fontSize:".875rem"}}})}),(0,a.jsx)(h.default,{component:o.default,sx:{overflowY:"auto",overflowX:{md:"auto",lg:"hidden"},scrollbarWidth:"thin",touchAction:"pan-y",scrollbarColor:"var(--scrollbar-color) transparent",scrollBehavior:"smooth",margin:0,flex:"1 1 auto",minHeight:0},children:(0,a.jsxs)(x.default,{stickyHeader:!0,sx:{minWidth:650,bgcolor:"var(--modal-surface-color)","& th":{backgroundColor:"var(--modal-surface-color)"}},size:"small","aria-label":"a dense table",children:[(0,a.jsx)(F,{action:(0,a.jsx)(o.default,{component:"span",sx:{pr:"1rem"},children:"Add Columns"})}),(0,a.jsxs)(p.default,{sx:{"& td":{fontSize:"0.75rem"}},children:[0===eh.length?(0,a.jsx)(s.default,{children:(0,a.jsx)(c.default,{colSpan:4,align:"center",sx:{padding:"2rem 1rem",color:"text.secondary",border:0},children:'No data points match "'.concat(em,'"')})}):null,eh.map((e,l)=>(0,a.jsxs)(s.default,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[(0,a.jsx)(c.default,{component:"th",scope:"row",children:l+1}),(0,a.jsx)(c.default,{align:"left",children:(0,a.jsx)(U,{label:e.label,description:e.description})}),(0,a.jsx)(c.default,{align:"left",children:e.category}),(0,a.jsx)(c.default,{align:"right",sx:{padding:".125rem 0 .125rem .5rem"},children:(0,a.jsx)(i.default,{id:"add_audit_column_btn",variant:"text",color:"primary",disabled:Y||ew(e),sx:{fontWeight:600},onClick:()=>eC(e),children:"ADD"})})]},e.id))]})]})})]}),(0,a.jsxs)(u.default,{sx:{minWidth:"min(100%, 420px)",flex:"1 1 auto",maxWidth:"100%",maxHeight:"100%",overflow:"hidden",borderLeft:"1px solid var(--border-color)",marginLeft:"-1px",paddingLeft:"1px",zIndex:5,bgcolor:"background.paper","@media(min-width: 1349px)":{maxHeight:"calc(100vh - 64px - 105px)"}},children:[(0,a.jsx)(Q,{title:"Selected Columns"}),(0,a.jsx)(h.default,{component:o.default,sx:{overflowY:"auto",overflowX:{md:"auto",lg:"hidden"},scrollbarWidth:"thin",touchAction:"pan-y",scrollbarColor:"var(--scrollbar-color) transparent",margin:0,flex:"1 1 auto",minHeight:0},children:(0,a.jsxs)(x.default,{stickyHeader:!0,sx:{minWidth:650,bgcolor:"background.paper",padding:0,"& th":{backgroundColor:"background.paper"}},size:"small","aria-label":"a dense table",children:[(0,a.jsx)(F,{showPeriod:!0,action:(0,a.jsx)(i.default,{id:"remove_all_audit_columns_btn",variant:"text",color:"primary",disabled:Y||0===eg.length,sx:{fontWeight:600,margin:"-.407rem 0",lineHeight:1.4},onClick:eS,children:"REMOVE ALL"})}),(0,a.jsx)(p.default,{sx:{"& td":{fontSize:"0.75rem"}},children:eg.map((e,l)=>(0,a.jsxs)(s.default,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[(0,a.jsx)(c.default,{component:"th",scope:"row",children:l+1}),(0,a.jsx)(c.default,{align:"left",children:(0,a.jsx)(U,{label:e.label,description:e.description})}),(0,a.jsx)(c.default,{align:"left",children:e.category}),(0,a.jsx)(c.default,{align:"left",children:e.period||"—"}),(0,a.jsx)(c.default,{align:"right",sx:{padding:".125rem 0 .125rem .5rem"},children:(0,a.jsx)(i.default,{id:"remove_audit_column_btn",variant:"text",color:"primary",disabled:Y,sx:{fontWeight:600},onClick:()=>ek(e),children:"REMOVE"})})]},e.field))})]})})]})]}),en?(0,a.jsx)(C.ErrorBoundary,{onlyToast:!0,children:(0,a.jsx)(r.Suspense,{children:(0,a.jsx)(B,{column:en.column,addedIds:ep,latestOnGrid:!!en.baseField&&!1!==$[en.baseField],onClose:()=>eo(null),onAdd:eA})})}):null]})}},33427:(e,l,t)=>{t.d(l,{default:()=>n});var a=t(50645),r=t(95155);let n=(0,a.A)((0,r.jsx)("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"InfoOutlined")},47652:(e,l,t)=>{t.d(l,{Q:()=>r});var a=t(95155);let r=e=>(0,a.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"17",fill:"none",viewBox:"0 0 17 15",...e,children:[(0,a.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.588 3.946a5.516 5.516 0 0 1-5.81 5.508v.016a5.516 5.516 0 0 1 5.81 5.409h.001a5.516 5.516 0 0 1 5.221-5.41v-.015A5.516 5.516 0 0 1 11.59 3.86h-.002z",clipRule:"evenodd"}),(0,a.jsx)("path",{fill:"currentColor",d:"M4.005.313v9.402h1.71V.313zm-1.71 0v9.402H.585V.313zm6.839 0v5.983h-1.71V.313z"})]})},98447:(e,l,t)=>{t.d(l,{default:()=>f});var a=t(12115),r=t(2821),n=t(37659),o=t(49714),i=t(57179),d=t(13053),s=t(81421);function c(e){return(0,s.Ay)("MuiTableContainer",e)}(0,d.A)("MuiTableContainer",["root"]);var u=t(95155);let m=(0,o.default)("div",{name:"MuiTableContainer",slot:"Root"})({width:"100%",overflowX:"auto"}),f=a.forwardRef(function(e,l){let t=(0,i.b)({props:e,name:"MuiTableContainer"}),{className:a,component:o="div",...d}=t,s={...t,component:o},f=(e=>{let{classes:l}=e;return(0,n.A)({root:["root"]},c,l)})(s);return(0,u.jsx)(m,{ref:l,as:o,className:(0,r.A)(f.root,a),ownerState:s,...d})})}}]);

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.