PageSourceSearch

https://legalspace.ai/_next/static/chunks/22934.27abadec342dabb7.js

js legalspace.ai collected 2026-10-05 12:11:49 UTC 13,993 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[22934],{10611:(e,i,r)=>{r.d(i,{Kj:()=>d,dT:()=>a});var t=r(95155);r(12115);var s=r(76984),l=r.n(s);let n=()=>(0,t.jsx)("span",{className:l().requiredMark,children:"*"}),d=e=>(0,t.jsxs)(t.Fragment,{children:[e,(0,t.jsx)(n,{})]}),a=e=>{let{label:i}=e;return(0,t.jsxs)("h4",{className:"font-20px ".concat(l().requiredFileUploadTitle),children:[i," ",(0,t.jsx)("span",{className:l().requiredFileUploadMark,children:"*"})]})}},22934:(e,i,r)=>{r.r(i),r.d(i,{default:()=>Z});var t=r(95155),s=r(12115),l=r(48116),n=r(52641),d=r(51221),a=r(55606),o=r(47448),c=r(86973),u=r(18369),p=r(60234),h=r(66618),m=r(41983),x=r(25635),j=r(35217),f=r(24935),v=r(25919),g=r(9102),A=r(63168),b=r(20699),y=r(15239),N=r(59734),C=r(42147),S=r(1213),w=r(22544),I=r(35068),F=r(13611),T=r(27146),_=r(3808),k=r(75444),U=r(37924),E=r(25251),q=r(60047),W=r(46697),R=r(82999),P=r(31085),z=r(38876),B=r(61826),D=r(74903),G=r(42169),V=r(863),O=r(43202),M=r(76984),Y=r.n(M),K=r(37950),H=r.n(K),L=r(10611);let $=(0,l.Ay)("input")({clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:1,overflow:"hidden",position:"absolute",bottom:0,left:0,whiteSpace:"nowrap",width:1}),J=["Urgent","High","Medium","Low"],Q=I.Ik().shape({subject:I.Yj().trim().required("Subject is required"),source:I.Yj().required("Source is required"),noticeType:I.Yj().required("Notice Type is required"),criticality:I.Yj().default(""),sender:I.Yj().trim().required("Sender is required"),recipient:I.Yj().trim().required("Recipient is required"),recipientAddress:I.Yj().trim().required("Recipient Address is required"),description:I.Yj().trim().required("Description is required")}),X={subject:"",source:"",noticeType:"",criticality:"",sender:"",recipient:"",recipientAddress:"",description:""},Z=e=>{let{open:i,onClose:r,onSuccess:l,noticeId:I,shouldResetDetailOnClose:M=!0}=e,K=!!I,Z=(0,T.jL)(),ee=(0,s.useRef)(null),ei=(0,s.useRef)(null),er=(0,T.GV)(_.tY),{can:et}=(0,k.S)(),es=(0,T.GV)(U.S5),el=(0,T.GV)(U.N8),en=(0,T.GV)(U.sj),ed=(0,T.GV)(U.eu),ea=(0,T.GV)(U.Jr),eo=(0,T.GV)(U.Uf),ec=K?eo:ea,eu=!!(null==er?void 0:er.is_admin_user),ep=et("ASSIGN_NOTICE"),eh=et("APPROVE_NOTICE"),em=eu||ep,ex=eu||eh,ej=K&&(null==en?void 0:en.id)===I?en:null,ef=(0,S.d4)(P.ti),ev=ef.some(e=>e.isUploading),[eg,eA]=(0,s.useState)([]),[eb,ey]=(0,s.useState)(!1),[eN,eC]=(0,s.useState)(!1),[eS,ew]=(0,s.useState)([]),eI=(0,s.useCallback)(e=>{if(!e.length)return;let i=(0,V.Vo)(e.map(e=>({id:e.id,original_filename:e.name,file_size:e.size})));Z((0,P.I1)(i))},[Z]),{handleSubmit:eF,reset:eT,control:e_,watch:ek,formState:{errors:eU}}=(0,w.mN)({mode:"onChange",resolver:(0,F.t)(Q),defaultValues:X});(0,s.useEffect)(()=>{i&&(es.length||Z((0,U.c1)()),el.length||Z((0,U.JR)()))},[i,Z,es.length,el.length]),(0,s.useEffect)(()=>{i&&I&&(null==en?void 0:en.id)!==I&&Z((0,U.iJ)(I))},[i,I,null==en?void 0:en.id,Z]),(0,s.useEffect)(()=>{!i&&M&&Z((0,U.rr)())},[i,M,Z]),(0,s.useEffect)(()=>{var e;if(!i){ei.current=null;return}let r=K?null!=(e=null==ej?void 0:ej.id)?e:"loading":"create";if(ei.current!==r){if(ei.current=r,Z((0,P.Pk)()),ey(!1),ew([]),K&&ej){eT((e=>({subject:e.title,source:e.sourceId,noticeType:e.noticeTypeId,criticality:e.priority,sender:e.sender,recipient:e.recipient,recipientAddress:e.recipientAddress,description:e.description}))(ej)),eA(ej.assignedUsers),eI(ej.documents);return}K||(eT(X),eA([]))}},[i,K,ej,eT,Z,eI]);let eE=ek("source"),eq=el.find(e=>e.id===eE),eW=(null==eq?void 0:eq.direction)==="inbound",eR=(null==eq?void 0:eq.direction)==="outbound",eP=ef.filter(e=>e.hasUploaded&&e.uploadedFileId);(0,s.useEffect)(()=>{eP.length>0&&ey(!1)},[eP.length]);let{maxFileSizeBytes:ez,maxFiles:eB,allowedExtensions:eD,loading:eG}=(0,W.R)(R._7.NOTICE_DOCUMENT),{handleFiles:eV}=(0,q.h)({maxFiles:eB,maxFileSizeBytes:ez,allowedExtensions:eD,extraFormData:{module:R._7.NOTICE_DOCUMENT,is_chat_document:"true"}}),eO=e=>{Z((0,P.i1)({fileId:e}))},eM=e=>{eO(e.randomId)},eY=e=>{eO(e.randomId),ew(i=>i.filter(i=>i!==e.randomId))},eK=(0,V.Kb)(ef,eS),eH=()=>{ec||(Z((0,P.Pk)()),r())},eL=ef.some(e=>e.hasUploaded&&e.uploadedFileId),e$=async e=>{if(!I)return;if(!eL)return void ey(!0);if(ev)return void(0,z.P)("error","Please wait for file uploads to complete");let i=ef.filter(e=>
1e.hasUploaded&&e.uploadedFileId&&!e.isFilePreFetched).map(e=>e.uploadedFileId);try{await Z((0,U.Sw)({id:I,form:{subject:e.subject,source:e.source,noticeType:e.noticeType,criticality:e.criticality?e.criticality:void 0,sender:e.sender,recipient:e.recipient,recipientAddress:e.recipientAddress,description:e.description,assigneeIds:(()=>{var e;return em?eg.map(e=>e.id):null!=(e=null==ej?void 0:ej.assignedUsers.map(e=>e.id))?e:[]})(),newAttachmentIds:i}})).unwrap(),(0,z.P)("success","Notice updated successfully"),null==l||l(),eH()}catch(i){let e="string"==typeof i?i:(0,E.yN)(i)||"Failed to update notice";(0,z.P)("error",e)}},eJ=async(e,i)=>{if(!eP.length)return void ey(!0);if(ev)return void(0,z.P)("error","Please wait for file uploads to complete");let r=i.submitAfterCreate&&(eR||eW);try{let i=await Z((0,U.Fc)((e=>{let i=eP.map(e=>e.uploadedFileId);return{subject:e.subject,source:e.source,noticeType:e.noticeType,criticality:e.criticality?e.criticality:void 0,sender:e.sender,recipient:e.recipient,recipientAddress:e.recipientAddress,description:e.description,assigneeIds:em?eg.map(e=>e.id):[],attachmentIds:i}})(e))).unwrap();r&&await Z((0,U.lS)(i.id)).unwrap(),(0,z.P)("success",r?ex?"Notice submitted successfully":"Notice submitted for approval":"Notice saved as draft"),null==l||l(),eH()}catch(i){let e="string"==typeof i?i:(0,E.yN)(i)||"Failed to create notice";(0,z.P)("error",e)}},eQ=function(e,i,r){var s;let l=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return(0,t.jsxs)(n.A,{fullWidth:!0,error:!!eU[e],children:[(0,t.jsx)(d.A,{id:"".concat(e,"-label"),sx:(0,O.Og)(!!eU[e]),children:l?(0,L.Kj)(i):i}),(0,t.jsx)(w.xI,{name:e,control:e_,render:s=>{let{field:l}=s;return(0,t.jsx)(a.A,{...l,labelId:"".concat(e,"-label"),id:"".concat(e,"-select"),label:i,input:(0,t.jsx)(o.A,{}),IconComponent:()=>(0,t.jsx)(y.default,{src:"/images/dd-arw.svg",alt:"dropdown",style:{width:18,height:18,marginRight:"20px"},width:15,height:15,unoptimized:!0}),sx:(0,O.SS)(),children:r.map(e=>{let i="object"==typeof e&&null!==e,r=i?e.id:e,s=i?e.name:e;return(0,t.jsx)(c.A,{value:r,children:s},r)})})}}),eU[e]&&(0,t.jsx)(u.A,{error:!0,children:null==(s=eU[e])?void 0:s.message})]})};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(p.A,{open:i,onClose:eH,className:Y().modalOverlay,children:(0,t.jsxs)(h.A,{className:Y().modalPaper,component:"form",onSubmit:eF(e=>{if(K)return void e$(e);eJ(e,{submitAfterCreate:eR||eW})}),noValidate:!0,children:[(0,t.jsxs)("div",{className:Y().modalHeader,children:[(0,t.jsx)(m.A,{onClick:eH,size:"small",className:Y().modalBackBtn,"aria-label":"Close create notice",children:(0,t.jsx)(C.A,{fontSize:"small"})}),(0,t.jsx)(x.A,{component:"h2",variant:"h6",sx:{fontWeight:800},children:K?"Edit Notice":"Create Notice"})]}),(0,t.jsx)("div",{className:Y().modalBody,children:K&&ed&&!ej?(0,t.jsx)("div",{className:Y().modalLoadingWrap,children:(0,t.jsx)(j.A,{sx:{color:"#3b42f2"}})}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.A,{fullWidth:!0,error:!!eU.subject,children:(0,t.jsx)(w.xI,{name:"subject",control:e_,render:e=>{var i;let{field:r}=e;return(0,t.jsx)(f.A,{...r,label:(0,L.Kj)("Subject"),placeholder:"Subject",fullWidth:!0,error:!!eU.subject,helperText:null==(i=eU.subject)?void 0:i.message,sx:(0,O.d$)(!!eU.subject)})}})}),eQ("source","Source",el,!0),(0,t.jsxs)("div",{className:Y().formGrid,children:[eQ("noticeType","Notice Type",es,!0),eQ("criticality","Criticality",J)]}),(0,t.jsxs)("div",{className:Y().formGrid,children:[(0,t.jsx)(n.A,{fullWidth:!0,error:!!eU.sender,children:(0,t.jsx)(w.xI,{name:"sender",control:e_,render:e=>{var i;let{field:r}=e;return(0,t.jsx)(f.A,{...r,label:(0,L.Kj)("Sender"),placeholder:"Sender",fullWidth:!0,error:!!eU.sender,helperText:null==(i=eU.sender)?void 0:i.message,sx:(0,O.d$)(!!eU.sender)})}})}),(0,t.jsx)(n.A,{fullWidth:!0,error:!!eU.recipient,children:(0,t.jsx)(w.xI,{name:"recipient",control:e_,render:e=>{var i;let{field:r}=e;return(0,t.jsx)(f.A,{...r,label:(0,L.Kj)("Recipient"),placeholder:"Recipient",fullWidth:!0,error:!!eU.recipient,helperText:null==(i=eU.recipient)?void 0:i.message,sx:(0,O.d$)(!!eU.recipient)})}})})]}),(0,t.jsx)(n.A,{fullWidth:!0,error:!!eU.recipientAddress,children:(0,t.jsx)(w.xI,{name:"recipientAddress",control:e_,render:e=>{var i;let{field:r}=e;return(0,t.jsx)(f.A,{...r,label:(0,L.Kj)("Recipient Address"),placeholder:"Recipient Address",fullWidth:!0,multiline:!0,minRows:3,error:!!eU.recipientAddress,helperText:null==(i=eU.recipientAddress)?void 0:i.message,sx:(0,O.d$)(!!eU.recipientAddress)})}})}),(0,t.jsx)(n.A,{fullWidth:!0,error:!!eU.description,children:(0,t.jsx)(w.xI,{name:"description",control:e_,render:e=>{var i;let{field:r}=e;return(0,t.jsx)(f.A,{...r,label:(0,L.Kj)("Description"),placeholder:"Description",fullWidth:!0,multiline:!0,minRows:4,error:!!eU.description,helperText:null==(i=eU.description)?void 0:i.message,sx:(0,O.d$)(!!eU.description)})}})}),em?(0,t.jsxs)("div",{className:Y().assignUsersContainer,children:[(0,t.jsx)(x.A,{variant:"body2",sx:{fontWeight:700,color:"#475569",mb:.5},children:"Assign User"}),(0,t.jsxs)("div",{className:Y().assigneesHorizontalList,children:[(0,t.jsx)("div",{className:Y().addAssigneeBtn,onClick:()=>eC(!0),children:(0,t.jsx)(N.A,{fontSize:"small"})}),eg.map(e=>(0,t.jsxs)("div",{className:Y().assigneeBadge,children:[(0,t.jsxs)(v.A,{src:e.picture||void 0,sx:{width:36,height:36,bgcolor:"brown",fontSize:13,fontWeight:700},children:[e.first_name?e.first_name[0]:"",e.last_name?e.last_name[0]:""]}),(0,t.jsx)("div",{className:Y().removeBadge,onClick:()=>eA(eg.filter(i=>i.id!==e.id)),children:(0,t.jsx)(D.pv,{})})]},e.id))]})]}):null,(0,t.jsxs)("div",{className:Y().assignUsersContainer,children:[(0,t.jsx)(x.A,{variant:"body2",sx:{fontWeight:700,color:"#475569",mb:.5},children:"Attachments"}),(0,t.jsx)("div",{className:H().createCaseSection,style:{maxWidth:"none",padding:0,margin:0,backgroundColor:"transparent",boxShadow:"none"},children:(0,t.jsx)("div",{className:H().createInner,style:{padding:0,margin:0,backgroundColor:"transparent"},children:(0,t.jsx)("div",{className:H().createFormWrp,style:{padding:0,margin:0,backgroundColor:"transparent"},children:(0,t.jsx)("div",{className:H().createForm,style:{minHeight:"unset",height:"auto",padding:0,margin:0,backgroundColor:"transparent"},children:(0,t.jsx)(g.Ay,{container:!0,children:(0,t.jsx)(g.Ay,{item:!0,xs:12,children:(0,t.jsxs)(n.A,{fullWidth:!0,children:[(0,t.jsxs)("div",{className:Y().noticeFileUploadGroup,style:{marginBottom:eK.length>
10?"20px":0},children:[(0,t.jsx)("div",{className:"".concat(H().fileUpload," ").concat(Y().noticeFileUpload),children:(0,t.jsxs)(A.A,{component:"label",role:void 0,variant:"contained",tabIndex:-1,onDrop:e=>{e.preventDefault(),e.dataTransfer.files&&eV(e.dataTransfer.files)},onDragOver:e=>{e.preventDefault()},children:[(0,t.jsxs)("div",{className:H().fileUploadLeft,children:[(0,t.jsx)(y.default,{src:"/images/document-upload.svg",alt:"",width:33,height:33,unoptimized:!0}),(0,t.jsxs)("div",{className:H().fileUploadCont,children:[(0,t.jsx)(L.dT,{label:"Choose a file or drag & drop it here"}),(0,t.jsx)("span",{children:eG?(0,t.jsx)(b.A,{variant:"text",width:160,height:16,sx:{display:"inline-block"}}):(0,t.jsxs)(t.Fragment,{children:["Supported formats:"," ",eD.map(e=>e.replace(".","").toUpperCase()).join(", "),", up to"," ",(0,E.v7)(ez)]})})]})]}),(0,t.jsx)("p",{style:{textDecoration:"underline",color:"blue"},className:"font-p-16px",children:"Browse File"}),!ev&&(0,t.jsx)($,{ref:ee,type:"file",onChange:e=>{e.target.files&&eV(e.target.files),e.target.value=""},accept:eD.join(","),multiple:!0})]})}),eb&&(0,t.jsx)(u.A,{error:!0,className:Y().fileUploadErrorText,children:"At least one attachment is required"})]}),eK.map((e,i)=>{let r=i===eK.length-1;return(0,t.jsx)(h.A,{sx:{"& > div":{marginBottom:r?"0px !important":"16px !important"}},children:(0,t.jsx)(G.A,{file:e,keyIndex:i,handleRemove:eY,handleCancel:eM,hideRemoveButton:K})},e.randomId||i)})]})})})})})})})]})]})}),(0,t.jsxs)("div",{className:Y().modalFooterSplit,children:[K?(0,t.jsx)("span",{}):(0,t.jsx)(A.A,{type:"button",onClick:()=>{eF(e=>{eJ(e,{submitAfterCreate:!1})})()},disabled:ec||!eR&&!eW,sx:O.Nq,className:Y().moveToDraftBtn,children:"Move to Draft"}),(0,t.jsxs)("div",{className:Y().modalFooterRight,children:[(0,t.jsx)(A.A,{type:"button",onClick:eH,disabled:ec,sx:O.Ek,children:"Cancel"}),(0,t.jsx)(A.A,{type:"submit",disabled:ec||ev||K&&ed&&!ej,sx:O.Mk,children:ec?"Saving...":K?"Save Changes":"Submit for Approval"})]})]})]})}),em&&eN?(0,t.jsx)(B.default,{open:eN,onClose:()=>eC(!1),selectedUsers:eg,onAssign:e=>eA(e),isNested:!0}):null]})}},42147:(e,i,r)=>{var t=r(22455);i.A=void 0;var s=t(r(33084)),l=r(95155);i.A=(0,s.default)((0,l.jsx)("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z"}),"ArrowBack")},42169:(e,i,r)=>{r.d(i,{A:()=>t.A});var t=r(78823)},46697:(e,i,r)=>{r.d(i,{R:()=>a});var t=r(12115),s=r(51304);let l=parseInt("104857600",10),n=parseInt("5",10),d=parseInt("1",10),a=e=>{let[i,r]=(0,t.useState)({maxFileSizeBytes:l,maxFiles:n,minFiles:d,allowedExtensions:[".pdf"],loading:!0});return(0,t.useEffect)(()=>{let i=!0;return(0,s.Pg)().then(t=>{if(!i)return;let s=(null==t?void 0:t.response)||t;if(Array.isArray(s)){let i=s.find(i=>i.slug===e);if(i)return void r({maxFileSizeBytes:i.max_size_bytes,maxFiles:i.max_docs_allowed,minFiles:i.min_docs_allowed,allowedExtensions:i.allowed_extensions||[],loading:!1})}r(e=>({...e,loading:!1}))}).catch(t=>{i&&(console.error("Failed to fetch upload options for ".concat(e,":"),t),r(e=>({...e,loading:!1})))}),()=>{i=!1}},[e]),i}},59734:(e,i,r)=>{var t=r(22455);i.A=void 0;var s=t(r(33084)),l=r(95155);i.A=(0,s.default)((0,l.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add")}}]);

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.