1"use strict";(self.webpackChunkBigOnionFrontEnd=self.webpackChunkBigOnionFrontEnd||[]).push([[1603],{65788(e,n,t){var l=t(47371),i=t(65250),s=t(38513),a=t(44414);const r=e=>{let n=e.children,t=e.options,r=e.noScroll;const d=(0,s.Q)().isMobile;return(0,a.jsxs)(a.Fragment,{children:[t&&!d&&(0,a.jsx)(l.A,{style:{alignItems:"start",justifyContent:"center",marginTop:0,paddingTop:0},children:t}),(0,a.jsx)(i.A,{className:r?"noScroll":void 0,id:"viewerDialogContent",style:{paddingTop:0,height:"100%"},children:n})]})};t.d(n,["A",0,r])},11603(e,n,t){t.r(n),t.d(n,{default:()=>D});var l=t(5544),i=t(28409),s=t(9950),a=t(48616),r=t(93210),d=t(70334),o=t(45016),c=t(95306),u=t(22382),p=t(65788),h=t(82503),v=t(94837),f=t(44414);const g=()=>{const e=(0,s.useState)(Number(localStorage.getItem("nlpDiffSquashed")||0)),n=(0,l.A)(e,2),t=n[0],i=n[1];return(0,f.jsxs)(h.A,{id:"squashed-simple",label:"View option",onChange:e=>{const n=e.target.value;i(n),localStorage.setItem("nlpDiffSquashed",n)},select:!0,style:{textAlign:"left",width:"180px"},value:t,children:[(0,f.jsx)(v.A,{value:"0",children:"Complete page"}),(0,f.jsx)(v.A,{value:"1",children:"Changes only"})]})},m=e=>{let n=e.currentCapture,t=e.entityKey,l=e.nlpData;return t&&null!==l&&void 0!==l&&l[t]?(0,f.jsx)(c.A,{data:j(l,t),shouldExpandNodeInitially:(e,n,l)=>l<(t.match(/medical/)?2:4)}):(null===n||void 0===n?void 0:n.hasNlp)&&!l&&(0,f.jsx)(o.A,{})},x=e=>{var n;let t=e.currentCapture,l=e.entityKey,s=e.nlpData,a=e.nlpDataPrevious,r=e.previousCapture,d=e.nlpDiffSquashed;return null!==s&&void 0!==s&&s[l]&&l&&null!==a&&void 0!==a&&a[l]?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)("div",{className:"nlp-diff-legend",children:[(0,f.jsx)("p",{className:"nlp-diff-legend-item",children:"Legend:"}),(0,f.jsx)("div",{className:"nlp-diff-legend-item nlp-diff-legend-more",children:"More"}),(0,f.jsx)("div",{className:"nlp-diff-legend-item nlp-diff-legend-less",children:"Less"})]}),(0,f.jsx)(i.A,{left:j(a,l,!0),right:j(s,l,!0),show:!d})]}):((null===t||void 0===t?void 0:t.hasNlp)&&!s||(null===r||void 0===r||null===(n=r.result)||void 0===n?void 0:n.hasNlp)&&!a)&&(0,f.jsx)(o.A,{})},j=(e,n,t)=>{const l=e[n];return n.match(/medical/)?y(l,t):n.match(/syntax/)?S(l,t):A(l,t)},y=(e,n)=>n?JSON.parse(JSON.stringify(e),(e,n)=>"Attributes"===e||"Traits"===e?void 0:n):e,A=(e,n)=>{const t={},i=[];return Object.keys(e).forEach(n=>Object.keys(e[n]).forEach(s=>Object.entries(e[n][s]).forEach(e=>{let a=(0,l.A)(e,2),r=a[0],d=a[1];if(d.mentions&&(i.push({phrase:r,salience:d.salience}),"OTHER"!==n)){var o,c,u;const e=Object.keys(d.mentions).length;(null!==(c=(o=null!==(u=t[n])&&void 0!==u?u:t[n]={})[s])&&void 0!==c?c:o[s]={})[r]=e+(e>1?" mentions":" mention")}}))),{"RANKED KEY PHRASES":i.sort((e,n)=>n.salience-e.salience).slice(0,25).map(e=>n?{phrase:e.phrase}:e.phrase),"EXTRACTED TERMS":t}},S=e=>({"PARTS OF SPEECH":e}),D=e=>{let n=e.actionId,t=e.captureId;const i=(0,a.i$)({actionId:n||"",captureId:t||""}).data,o=(0,a.IF)({actionId:n||"",captureId:t||""}).data,c=(0,a.Jk)({actionId:n||"",captureId:t||""}).data,h=(0,s.useState)(Number(localStorage.getItem("nlpDiffSquashed")||0)),v=(0,l.A)(h,2),j=v[0];v[1];(0,s.useEffect)(()=>{(0,d.u)("opened nlpviewer")},[]);const y=(0,s.useMemo)(()=>{var e;return{entityKey:o&&(null===(e=Object.keys(o))||void 0===e?void 0:e[0]),nlpDataPrevious:null,isNlpable:r.Dp.isTelescopePlus||r.x0.publicApi}},[o]),A=y.entityKey,S=y.nlpDataPrevious,D=y.isNlpable;return(0,f.jsx)(p.A,{options:r.x0.diffing&&D?(0,f.jsx)(g,{}):void 0,children:(0,f.jsx)("div",{style:{marginTop:"32px"},children:(0,f.jsx)(u.A,{children:D&&(r.x0.diffing?(0,f.jsx)(x,{currentCapture:i,entityKey:A,nlpData:o,nlpDataPrevious:S,nlpDiffSquashed:j,previousCapture:null===c||void 0===c?void 0:c[0]}):(0,f.jsx)(m,{currentCapture:i,entityKey:A,nlpData:o}))})})})}}}]);
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.