"use strict";(self.webpackChunkvt_ui_main=self.webpackChunkvt_ui_main||[]).push([[40946],{94156:(t,e,r)=>{r.d(e,{$j:()=>h,EJ:()=>u,Fg:()=>a,GM:()=>g,VD:()=>p,eR:()=>v,t6:()=>c,x9:()=>d});var i=r(22894),n=r(96987),s=r(45241),l=r(95688),o=r(44052);function a(t,e){let r=[];return t&&(r=n.w9.getKeyValueArrayFromObject(t)),r&&e&&(r=r.map((t=>Object.assign(t,{link:l.Z8.getSearchUrl({entity:"url",category:t.value})})))),r}function u(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(t).map((e=>{var r,i;return{label:e,labelLink:null!==(r=o.NU.currentUser)&&void 0!==r&&r.vtiAccess?l.Z8.getSearchUrl({entity:"url",header:e}):void 0,value:t[e],link:null!==(i=o.NU.currentUser)&&void 0!==i&&i.vtiAccess?l.Z8.getSearchUrl({entity:"url",header_value:t[e]}):void 0}}))}function h(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t)return Object.keys(t).map((e=>{var r,i;return{label:e,labelLink:null!==(r=o.NU.currentUser)&&void 0!==r&&r.vtiAccess?l.Z8.getSearchUrl({entity:"url",cookie:e}):void 0,value:t[e],link:null!==(i=o.NU.currentUser)&&void 0!==i&&i.vtiAccess?l.Z8.getSearchUrl({entity:"url",cookie_value:t[e]}):void 0}}))}function c(t){return null==t?void 0:t.map((t=>({text:t,link:l.Z8.getSearchUrl({entity:"url",outgoing_link:t})})))}function d(t){const e=[{label:"First Submission",data:n.w9.getReportsDateFormat(t.first_submission_date)},{label:"Last Submission",data:n.w9.getReportsDateFormat(t.last_submission_date)},{label:"Last Analysis",data:n.w9.getReportsDateFormat(t.last_analysis_date)}];return s.KK.formatKeyVal([],e)}function p(t){if(t)return Object.keys(t).map((e=>({label:e,value:t[e],link:l.Z8.getSearchUrl({entity:"url",targeted_brand:t[e]})})))}function v(t){if(!t)return[];const e=[];var r,i;t.dhash&&e.push({label:"dhash",link:null!==(r=o.NU.currentUser)&&void 0!==r&&r.vtiAccess?l.Z8.getSearchUrl({entity:"url",main_icon_dhash:t.dhash}):void 0,value:t.dhash});t.raw_md5&&e.push({label:"raw md5",link:null!==(i=o.NU.currentUser)&&void 0!==i&&i.vtiAccess?l.Z8.getSearchUrl({entity:"url",main_icon_md5:t.raw_md5}):void 0,value:t.raw_md5});return e}function g(t){return i.h4.urls.get(t,void 0,void 0,{attributes:["url"]}).then((()=>!0)).catch((t=>{if(404===t.status)return!1;throw t}))}},40946:(t,e,r)=>{r.d(e,{z:()=>j});var i=r(63317),n=r(92815),s=r(33917),l=r(22894),o=r(60233),a=r(47123),u=r(70051),h=r(37150),c=r(96987),d=r(44052),p=r(42246),v=r(94156);function g(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function _(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class f extends((0,p.tV)((function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l.h4.urls.listRelationship(t,"related_threat_actors",function(t){for(var e=1;e(0,n.h)(t)))){constructor(){super(...arguments),this.title="Related Threat Actors",this.description="Threat actors attributed to collections where this URL belongs to",this.relationshipType="related_threat_actors"}}function m(t,e,r,i,n,s,l){try{var o=t[s](l),a=o.value}catch(t){return void r(t)}o.done?e(a):Promise.resolve(a).then(i,n)}function y(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function b(t){for(var e=1;e{var e,r,i,s;let l=t.data;const o=(0,n.h)(l),a={id:o.id,url:o.url,networkLocation:o.network_location&&o.network_location.id,networkLocationType:o.network_location&&o.network_location.type,responseCode:null===(e=o.last_http_response_code)||void 0===e?void 0:e.toString(),contentType:o.last_http_response_headers&&o.last_http_response_headers["content-type"],lastAnalysis:o.last_analysis_date},u={categoriesKeyValueArray:(0,v.Fg)(o.categories,!(null===(r=d.NU.currentUser)||void 0===r||!r.vtiAccess)),lastHttpResponseContentLength:c.w9.humanizeFileSize(o.last_http_response_content_length),httpHeaders:o.last_http_response_headers?(0,v.EJ)(o.last_http_response_headers):void 0,htmlInfo:o?h.w.processInfo(o,!(null===(i=d.NU.currentUser)||void 0===i||!i.vtiAccess),"url"):void 0,cookies:(0,v.$j)(o.last_http_response_cookies),history:(0,v.x9)(o),targetedBrand:(0,v.VD)(o.targeted_brand),lastFinalUrl:o.last_final_url,lastServingIpAddress:null===(s=o.last_serving_ip_address)||void 0===s?void 0:s.id,lastHttpResponseCode:o.last_http_response_code,url:o.url,lastHttpResponseContentSha256:o.last_http_response_content_sha256,redirectionChain:o.redirection_chain,favicon:(0,v.eR)(o.favicon)};return b(b({},o),{},{headerProperties:a,uiDetails:u,uiTelemetry:void 0,outgoingLinks:(0,v.t6)(o.outgoing_links)})};class j extends s.F{get lastDownloadedFile(){return this._lastDownloadedFile}constructor(t){var e;if(super((function(){const e=arguments.length>0&&void 0!==arguments[0]&&arguments[0]?(0,o.pv)({}):{};return l.h4.urls.get(t,["network_location","last_serving_ip_address"],e)}),O),this.urlId=t,this.rawAnalysisMap=new Map,this.relatedRelationships=[new f(this.urlId)],null===(e=d.NU.currentUser)||void 0===e||!e.vtiAccess)return;const r=this.getDownloadedFiles();r.load().then((()=>{if(r.data.length&&r.data[0]._found){const t=r.data[0].id;this.lastDownloadedFilePoller=new i.A(t,(t=>{const e=t.data.attributes;this._lastDownloadedFile=b(b({},e),{},{totalEngines:c.w9.getTotalEngines(e.last_analysis_stats),totalEnginesDetections:c.w9.getTotalEnginesDetections(e.last_analysis_stats),lastAnalysisDate:c.w9.getReportsDateFormat(e.last_analysis_date)}),this.notify()})),this.lastDownloadedFilePoller.startPolling()}}))}stopPolling(){var t;null===(t=this.lastDownloadedFilePoller)||void 0===t||t.stopPolling()}getDownloadedFiles(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,p.hN)((()=>l.h4.urls.listRelationship(this.urlId,"downloaded_files",b({},t))),(t=>c.w9.fileFormatter((0,n.h)(t))))}getRedirectingUrls(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,p.NG)((()=>l.h4.urls.listRelationship(this.urlId,"redirecting_urls",b({},t))),(t=>c.w9.urlFormatter((0,n.h)(t))))}getContactedDomains(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,p.hN)((()=>l.h4.urls.listRelationship(this.urlId,"contacted_domains",b({},t))),(t=>c.w9.unitaryDomainListFormatter((0,n.h)(t))))}getContactedIps(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,p.hN)((()=>l.h4.urls.listRelationship(this.urlId,"contacted_ips",b({},t))),(t=>c.w9.unitaryIpListFormatter((0,n.h)(t))))}getContentStrings(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,p.hN)((()=>l.h4.urls.getContentStrings(this.urlId,b({},t))),(t=>t))}getContentPreview(t){return l.h4.urls.getContentPreview(this.urlId,t)}getCommunicatingFiles(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,p.hN)((()=>l.h4.urls.listRelationship(this.urlId,"communicating_files",b({},t))),(t=>c.w9.fileFormatter((0,n.h)(t))))}getReferrerFiles(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,p.hN)((()=>l.h4.urls.listRelationship(this.urlId,"referrer_files",b({},t))),(t=>c.w9.fileFormatter((0,n.h)(t))))}getRedirectsTo(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,p.NG)((()=>l.h4.urls.listRelationship(this.urlId,"redirects_to",b({},t))),(t=>c.w9.urlFormatter((0,n.h)(t))))}getReferrerUrls(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,p.NG)((()=>l.h4.urls.listRelationship(this.urlId,"referrer_urls",b({},t))),(t=>c.w9.urlFormatter((0,n.h)(t))))}getUrlsRelatedByTrackerId(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,p.NG)((()=>l.h4.urls.listRelationship(this.urlId,"urls_related_by_tracker_id",b({},t))),(t=>c.w9.urlFormatter((0,n.h)(t))))}getEmbeddedJsFiles(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,p.hN)((()=>l.h4.urls.listRelationship(this.urlId,"embedded_js_files",b({},t))),(t=>c.w9.fileFormatter((0,n.h)(t))))}getAnalyses(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,p.hN)((()=>l.h4.urls.listRelationship(this.urlId,"analyses",b({},t))),(t=>{const e=(0,n.h)(t);return this.rawAnalysisMap.set(e.id,e),c.w9.processAnalysis(e)}))}getSubmissions(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return(0,p.hN)((()=>l.h4.urls.listRelationship(this.urlId,"submissions",b({},t))),(t=>(0,n.h)(t)),e)}getComments(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,p.hN)((e=>l.h4.urls.listRelationship(this.urlId,"comments",b({relationships:["item","author"]},t),e?(0,o.pv)({}):{})),(t=>c.w9.commentFormatter((0,n.h)(t))))}getGraphs(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,p.hN)((()=>l.h4.urls.listRelationship(this.urlId,"graphs",b({relationships:["owner","viewers","editors"],attributes:["private","graph_data"]},t))),(t=>t))}getVotes(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,p.hN)((e=>l.h4.urls.listRelationship(this.urlId,"votes",b({relationships:["item","voter"]},t),e?(0,o.pv)({}):{})),(t=>c.w9.voteFormatter((0,n.h)(t))))}getCollections(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,p.Fp)((()=>l.h4.urls.listRelationship(this.urlId,"collections",b({relationships:u.GV},t))))}getReferences(){var t,e=this;return(t=function*(){const t=new a.lY(e.urlId);return yield t.relationshipsCreated,t.relationships.related_references},function(){var e=this,r=arguments;return new Promise((function(i,n){var s=t.apply(e,r);function l(t){m(s,i,n,l,o,"next",t)}function o(t){m(s,i,n,l,o,"throw",t)}l(void 0)}))})()}getUserVotes(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,p.hN)((e=>l.h4.urls.listRelationship(this.urlId,"user_votes",b({},t),e?(0,o.pv)({}):{})),(t=>(0,n.h)(t)))}}}}]); //# sourceMappingURL=40946.52e58c8b2a8b55ad5067.js.map