PageSourceSearch

https://www.elevolt.co.ke/_next/static/chunks/pages/hr/[tenant]/e-signatures/templates/new-a2317ca856190906.js

js elevolt.co.ke collected 2026-10-04 21:47:18 UTC 25,385 bytes, 1 lines download raw bytes

1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="c94097b5-de07-4e25-a719-6e48dbe7f833",e._sentryDebugIdIdentifier="sentry-dbid-c94097b5-de07-4e25-a719-6e48dbe7f833")}()}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4514,1490],{82249:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/hr/[tenant]/e-signatures/templates/new",function(){return s(11844)}])},11844:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return q}});var a=s(52322),l=s(16049),n=s(77590),i=s(3508),r=s(84475),d=s(5632),c=s(13980),o=s.n(c),m=s(2784),u=s(47023),x=s(88510),h=s(59417),p=s(99603),f=s(65232),g=s(95254),j=s(62372),b=s(22319),v=s(67780),y=()=>{let{name:e,description:t,category:s,errors:l,setBasicInfo:n,clearError:r}=(0,i.D)(),{data:d=[],isLoading:c}=(0,b.tk)(),o=(0,m.useCallback)(e=>{n({name:e.target.value}),l.name&&r("name")},[n,l.name,r]),u=(0,m.useCallback)(e=>{n({description:e.target.value})},[n]),x=(0,m.useCallback)(e=>{n({category:(null==e?void 0:e.value)||""})},[n]),h=(0,m.useCallback)(e=>{n({category:e})},[n]),p=d.map(e=>({value:e.slug||e.id||e,label:e.name||e})),y=s?p.find(e=>e.value===s)||{value:s,label:s}:null;return(0,a.jsxs)("div",{className:"w-full mx-auto",children:[(0,a.jsxs)("div",{className:"mb-6",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:"Template Information"}),(0,a.jsx)("p",{className:"mt-1 text-sm text-gray-500",children:"Enter the basic details for your signature template."})]}),(0,a.jsx)(f.ZP,{children:(0,a.jsx)(f.eW,{children:(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{className:"block text-sm font-medium text-gray-700 mb-1",htmlFor:"template-name",children:["Template Name ",(0,a.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,a.jsx)(g.o,{id:"template-name",name:"name",onChange:o,placeholder:"e.g., Employment Contract, NDA Agreement",value:e}),!!l.name&&(0,a.jsx)("p",{className:"text-red-500 text-sm mt-1",children:l.name}),(0,a.jsx)("p",{className:"text-gray-500 text-xs mt-1",children:"Choose a descriptive name that helps you identify this template."})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",htmlFor:"template-description",children:"Description"}),(0,a.jsx)(j.K,{id:"template-description",name:"description",onChange:u,placeholder:"Brief description of when this template should be used...",rows:3,value:t}),(0,a.jsx)("p",{className:"text-gray-500 text-xs mt-1",children:"Optional. Add notes about when to use this template."})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",htmlFor:"template-category",children:"Category"}),(0,a.jsx)(v.Z,{className:"c-react-select",classNamePrefix:"crs",formatCreateLabel:e=>'Create "'.concat(e,'"'),inputId:"template-category",isClearable:!0,isLoading:c,name:"category",onChange:x,onCreateOption:h,options:p,placeholder:"Select or create a category...",value:y}),(0,a.jsx)("p",{className:"text-gray-500 text-xs mt-1",children:"Categorize your template for easier organization. Type to create a new category."})]})]})})})]})},N=s(1973),w=s(7325),C=s(6239),k=()=>{let{templateId:e,signatureFields:t,pdfInfo:s}=(0,i.D)(),{data:l,isLoading:n}=(0,b.J5)({templateId:e,enabled:!!e&&!(null==s?void 0:s.pdf_url)}),r=s||l;return n?(0,a.jsx)("div",{className:"h-[600px] flex items-center justify-center",children:(0,a.jsx)(N.Z,{design:"wrapped",isLoading:!0,message:"Loading document..."})}):(null==r?void 0:r.pdf_url)?(0,a.jsxs)("div",{className:"h-full",children:[(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsxs)("h2",{className:"text-xl font-semibold text-gray-900",children:["Add Signature Fields",(0,a.jsx)(w.Z,{body:(0,a.jsxs)("ul",{className:"text-sm space-y-1.5 py-1 text-white pl-3 list-disc list-outside",children:[(0,a.jsx)("li",{children:"Click a field type in the right panel to add it"}),(0,a.jsx)("li",{children:"Drag fields to reposition them on the document"}),(0,a.jsx)("li",{children:"Click a field to configure its properties"}),(0,a.jsx)("li",{children:'Assign each field to a signer role (e.g., "employee", "manager")'})]}),id:"signature-fields-tips",maxWidth:"320px"})]}),(0,a.jsx)("p",{className:"mt-1 text-sm text-gray-500",children:"Drag fields from the right panel onto the document. Position them where signers need to sign, initial, or fill in information."})]}),(0,a.jsx)("div",{className:"border border-gray-200 rounded-lg overflow-hidden bg-gray-50",children:(0,a.jsx)(C.Z,{pageInfo:r,templateId:e})})]}):(0,a.jsx)("div",{className:"h-[600px] flex items-center justify-center",children:(0,a.jsx)(N.Z,{description:"Please go back and upload a PDF document first.",design:"wrapped",message:"No document found"})})},D=s(82781),F=s(62202);let P=e=>{let{onComplete:t}=e,{name:s,description:l,category:n,templateId:r,signatureFields:d,signerRoles:c,pdfInfo:o,errors:x,validateStep:g,setLoading:j}=(0,i.D)(),[v,y]=(0,m.useState)(!1),w=(0,b.r3)(),C=(0,b.mB)(),k=d.some(e=>"signature"===e.field_type),P=d.length>0&&k,T=(0,m.useCallback)(async()=>
1{if(!g(3)){F.default.error("Please add at least one signature field");return}y(!0),j({isSaving:!0});try{await w.mutateAsync({templateId:r,fields:d.map(D.Mt)}),await C.mutateAsync({templateId:r,data:{status:"active"}}),F.default.success("Template activated successfully"),t()}catch(t){var e,s;F.default.error((null===(s=t.response)||void 0===s?void 0:null===(e=s.data)||void 0===e?void 0:e.message)||"Failed to activate template")}finally{y(!1),j({isSaving:!1})}},[r,d,g,j,w,C,t]),S=(0,m.useCallback)(async()=>{j({isSaving:!0});try{await w.mutateAsync({templateId:r,fields:d.map(D.Mt)}),F.default.success("Draft saved successfully"),t()}catch(t){var e,s;F.default.error((null===(s=t.response)||void 0===s?void 0:null===(e=s.data)||void 0===e?void 0:e.message)||"Failed to save draft")}finally{j({isSaving:!1})}},[r,d,j,w,t]),_=c.reduce((e,t)=>(e[t]=d.filter(e=>e.signer_role===t),e),{});return(0,a.jsxs)("div",{className:"w-full mx-auto",children:[(0,a.jsxs)("div",{className:"mb-6",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:"Review Your Template"}),(0,a.jsx)("p",{className:"mt-1 text-sm text-gray-500",children:"Review your template configuration before activating it."})]}),(0,a.jsx)("div",{className:"mb-6 p-4 rounded-lg border ".concat(P?"bg-green-50 border-green-200":"bg-amber-50 border-amber-200"),children:(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)(p.G,{className:P?"text-green-500":"text-amber-500",icon:P?h.f8k:h.eHv}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h4",{className:"font-medium ".concat(P?"text-green-900":"text-amber-900"),children:P?"Template is Ready":"Action Required"}),(0,a.jsx)("p",{className:"text-sm ".concat(P?"text-green-700":"text-amber-700"),children:P?"Your template is configured correctly and ready to use.":x.fields||"At least one signature field is required to enable this template."})]})]})}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-6",children:[(0,a.jsxs)(f.ZP,{children:[(0,a.jsx)(f.Ol,{children:(0,a.jsx)("h3",{className:"font-medium",children:"Template Details"})}),(0,a.jsx)(f.eW,{children:(0,a.jsxs)("dl",{className:"space-y-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("dt",{className:"text-sm text-gray-500",children:"Name"}),(0,a.jsx)("dd",{className:"font-medium",children:s})]}),!!l&&(0,a.jsxs)("div",{children:[(0,a.jsx)("dt",{className:"text-sm text-gray-500",children:"Description"}),(0,a.jsx)("dd",{className:"text-gray-700",children:l})]}),!!n&&(0,a.jsxs)("div",{children:[(0,a.jsx)("dt",{className:"text-sm text-gray-500",children:"Category"}),(0,a.jsx)("dd",{className:"text-gray-700 capitalize",children:n})]})]})})]}),(0,a.jsxs)(f.ZP,{children:[(0,a.jsx)(f.Ol,{children:(0,a.jsx)("h3",{className:"font-medium",children:"Document"})}),(0,a.jsx)(f.eW,{children:(0,a.jsxs)("dl",{className:"space-y-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("dt",{className:"text-sm text-gray-500",children:"Pages"}),(0,a.jsx)("dd",{className:"font-medium",children:(null==o?void 0:o.page_count)||"Unknown"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("dt",{className:"text-sm text-gray-500",children:"Signature Fields"}),(0,a.jsx)("dd",{className:"font-medium",children:d.length})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("dt",{className:"text-sm text-gray-500",children:"Signer Roles"}),(0,a.jsx)("dd",{className:"font-medium",children:c.length})]})]})})]})]}),(0,a.jsxs)(f.ZP,{className:"mb-6",children:[(0,a.jsx)(f.Ol,{children:(0,a.jsx)("h3",{className:"font-medium",children:"Signature Fields by Role"})}),(0,a.jsx)(f.eW,{children:0===d.length?(0,a.jsx)(N.Z,{description:"Go back to add signature fields to your template.",design:"wrapped",message:"No fields added"}):(0,a.jsx)("div",{className:"space-y-4",children:c.map(e=>{let t=_[e]||[],s=(0,D.h6)(c,e);return(0,a.jsxs)("div",{className:"border rounded-lg p-4",style:{borderLeftWidth:"4px",borderLeftColor:s},children:[(0,a.jsx)("h4",{className:"font-medium capitalize mb-2",children:e}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:t.map(e=>{let t=(0,D.Ql)(e.field_type);return(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 px-2 py-1 bg-gray-100 text-gray-700 text-sm rounded",children:[(0,a.jsx)(p.G,{className:"text-xs",icon:(null==t?void 0:t.icon)||h.r6l,style:{color:null==t?void 0:t.color}}),e.field_label,!!e.required&&(0,a.jsx)("span",{className:"text-red-500",children:"*"})]},e.id)})})]},e)})})})]}),(0,a.jsxs)("div",{className:"flex items-center justify-end gap-3",children:[(0,a.jsx)(u.Z,{design:"secondary",disabled:v,onClick:S,children:"Save as Draft"}),(0,a.jsx)(u.Z,{beforeIcon:v?(0,a.jsx)(p.G,{className:"mr-2 animate-spin",icon:h.LM3}):(0,a.jsx)(p.G,{className:"mr-2",icon:h.LEp}),design:"primary",disabled:!P||v,onClick:T,children:v?"Enabling...":"Enable Template"})]})]})};P.propTypes={onComplete:o().func.isRequired};var T=s(74618),S=s(28516),_=()=>{let{name:e,description:t,category:s,templateId:l,pdfFile:n,pdfInfo:r,errors:d,setPdfFile:c,setPdfInfo:o,setTemplateId:x,setLoa
1ding:g,clearError:j}=(0,i.D)(),[v,y]=(0,m.useState)(!1),[N,w]=(0,m.useState)(0),C=(0,b.MN)({onSuccess:e=>{let t=e.data;x(t.stid||t.id),F.default.success("PDF uploaded successfully")},onError:e=>{var t,s;F.default.error((null===(s=e.response)||void 0===s?void 0:null===(t=s.data)||void 0===t?void 0:t.message)||"Failed to upload PDF"),y(!1)}}),{data:k,isLoading:D}=(0,b.J5)({templateId:l,enabled:!!l&&!r});(0,m.useEffect)(()=>{k&&!r&&(o(k),y(!1))},[k,r,o]);let P=(0,m.useCallback)(async a=>{if(!a||0===a.length)return;let l=Array.isArray(a)?a[0]:a;if("application/pdf"!==l.type){F.default.error("Please upload a PDF file");return}if(l.size>10485760){F.default.error("File size must be less than 10MB");return}c(l),j("pdfFile"),y(!0),w(0);let n=new FormData;n.append("name",e),n.append("description",t||""),n.append("category",s||""),n.append("pdf_file",l),n.append("status","draft");let i=setInterval(()=>{w(e=>Math.min(e+10,90))},200);try{await C.mutateAsync(n),w(100)}finally{clearInterval(i)}},[e,t,s,c,j,C]),_=(0,m.useCallback)(()=>{c(null),o(null),x(null),w(0)},[c,o,x]);return l||n?v||D?(0,a.jsx)("div",{className:"w-full mx-auto",children:(0,a.jsx)(f.ZP,{children:(0,a.jsx)(f.eW,{children:(0,a.jsxs)("div",{className:"py-8 text-center",children:[(0,a.jsx)(p.G,{className:"text-blue-500 text-4xl mb-4 animate-spin",icon:h.LM3}),(0,a.jsx)("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:D?"Processing PDF...":"Uploading PDF..."}),(0,a.jsx)("div",{className:"w-64 mx-auto bg-gray-200 rounded-full h-2 mb-2",children:(0,a.jsx)("div",{className:"bg-blue-500 h-2 rounded-full transition-all duration-300",style:{width:"".concat(N,"%")}})}),(0,a.jsx)("p",{className:"text-sm text-gray-500",children:D?"Analyzing document pages...":"".concat(N,"% complete")})]})})})}):(0,a.jsxs)("div",{className:"w-full mx-auto",children:[(0,a.jsx)(f.ZP,{children:(0,a.jsxs)(f.eW,{children:[(0,a.jsxs)("div",{className:"w-full mb-4",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:"Document Uploaded"}),(0,a.jsx)("p",{className:"mt-1 text-sm text-gray-500",children:"Your PDF has been uploaded. Continue to add signature fields."})]}),(0,a.jsxs)("div",{className:"w-full flex items-start gap-4",children:[(0,a.jsx)("div",{className:"flex-shrink-0",children:(0,a.jsx)("div",{className:"w-16 h-20 bg-red-50 border border-red-200 rounded flex items-center justify-center",children:(0,a.jsx)("span",{className:"text-red-600 font-bold text-sm",children:"PDF"})})}),(0,a.jsxs)("div",{className:"flex flex-1 min-w-0",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,a.jsx)(p.G,{className:"text-green-500",icon:h.f8k}),(0,a.jsx)("span",{className:"text-green-700 font-medium",children:"Upload Complete"})]}),(0,a.jsx)("h3",{className:"text-lg font-medium text-gray-900 truncate",children:(null==n?void 0:n.name)||(null==r?void 0:r.original_filename)||"Document.pdf"}),(0,a.jsxs)("div",{className:"flex text-sm text-gray-500",children:[!!(null==r?void 0:r.page_count)&&(0,a.jsxs)("p",{children:[(0,a.jsx)("strong",{children:r.page_count})," page",1!==r.page_count?"s":""]}),!!(null==n?void 0:n.size)&&(0,a.jsxs)("p",{children:[(n.size/1024/1024).toFixed(2)," MB"]})]})]}),(0,a.jsx)("div",{className:"ml-auto",children:(0,a.jsx)(u.Z,{design:"secondary",onClick:_,size:"sm",children:"Replace Document"})})]})]}),!!(null==r?void 0:r.pdf_url)&&(0,a.jsxs)("div",{className:"mt-6 border-t pt-6",children:[(0,a.jsx)("h4",{className:"text-sm font-medium text-gray-700 mb-3",children:"Document Preview"}),(0,a.jsx)("div",{className:"bg-gray-100 rounded-lg overflow-hidden",children:(0,a.jsx)("iframe",{className:"w-full h-[650px]",src:(0,T.Ld)(r.pdf_url),title:"PDF Preview"})})]})]})}),(0,a.jsx)("div",{className:"mt-4 p-4 bg-white border border-blue-200 rounded-lg",children:(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)(p.G,{className:"text-blue-500 mt-0.5",icon:h.Y9i}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h4",{className:"font-medium text-blue-900",children:"Next: Add Signature Fields"}),(0,a.jsx)("p",{className:"text-sm text-blue-700 mt-1",children:"In the next step, you'll drag and drop signature fields onto y
1our document to define where signers need to sign, initial, or fill in information."})]})]})})]}):(0,a.jsxs)("div",{className:"w-full mx-auto",children:[(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:"Upload Your Document"}),(0,a.jsx)("p",{className:"mt-1 text-sm text-gray-500",children:"Upload a PDF file that will serve as your template. You'll be able to add signature fields in the next step."})]}),(0,a.jsx)(f.ZP,{children:(0,a.jsx)(f.eW,{children:(0,a.jsxs)("div",{className:"",children:[(0,a.jsx)(S.Z,{accept:"application/pdf",label:"Upload PDF Document",name:"pdf_file",uploadFileHandler:P}),!!d.pdfFile&&(0,a.jsx)("p",{className:"text-red-500 text-sm mt-2 text-center",children:d.pdfFile}),(0,a.jsx)("div",{className:"mt-6",children:(0,a.jsxs)("ul",{className:"list-disc list-inside text-sm text-gray-500",children:[(0,a.jsx)("li",{children:"Supported format: PDF"}),(0,a.jsx)("li",{children:"Maximum file size: 10MB"}),(0,a.jsx)("li",{children:"Maximum pages: 50"})]})})]})})})]})};let E=e=>{let{onComplete:t,onCancel:s}=e,{currentStep:l,steps:n,isFirstStep:r,isLastStep:d,nextStep:c,prevStep:o,validateStep:f,isDirty:g}=(0,i.D)(),j=(0,m.useCallback)(()=>{f(l)&&c()},[l,f,c]),b=(0,m.useCallback)(()=>{o()},[o]);return(0,a.jsxs)("div",{className:"flex flex-col h-full pb-6 gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-2xl font-bold",children:"Create New Template"}),(0,a.jsx)("p",{className:"text-gray-500 mt-1",children:"Upload a PDF once, mark where each signer signs, then reuse it for every request"})]}),(0,a.jsx)("div",{className:"",children:(0,a.jsx)(x.Z,{currentStep:l,steps:n})}),(0,a.jsx)("div",{className:"flex-1",children:(()=>{switch(l){case 0:return(0,a.jsx)(y,{});case 1:return(0,a.jsx)(_,{});case 2:return(0,a.jsx)(k,{});case 3:return(0,a.jsx)(P,{onComplete:t});default:return null}})()}),(0,a.jsxs)("div",{className:"flex items-center justify-between pt-6 mt-6 border-t border-gray-200",children:[(0,a.jsxs)("div",{children:[!r&&(0,a.jsx)(u.Z,{beforeIcon:(0,a.jsx)(p.G,{className:"mr-2",icon:h.acZ}),design:"secondary",onClick:b,children:"Back"}),!!r&&(0,a.jsx)(u.Z,{design:"secondary",onClick:s,children:"Cancel"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[!!g&&(0,a.jsx)("span",{className:"text-sm text-gray-500",children:"Unsaved changes"}),!d&&(0,a.jsx)(u.Z,{afterIcon:(0,a.jsx)(p.G,{className:"ml-2",icon:h.eFW}),design:"primary",onClick:j,children:"Continue"})]})]})]})};E.propTypes={onComplete:o().func.isRequired,onCancel:o().func.isRequired};let Z=e=>{let{template:t,onComplete:s,onCancel:l}=e;return(0,a.jsx)(i.Gq,{initialTemplate:t,children:(0,a.jsx)(E,{onCancel:l,onComplete:s})})};Z.propTypes={template:o().shape({id:o().oneOfType([o().string,o().number]),stid:o().string,name:o().string,description:o().string,category:o().string,status:o().string,signature_fields:o().array}),onComplete:o().func.isRequired,onCancel:o().func.isRequired};var R=s(79337);let L=e=>{let{user:t,tenantName:s}=e,r=(0,d.useRouter)(),c=(0,m.useCallback)(()=>{r.push("/hr/".concat(s,"/e-signatures/templates"))},[r,s]),o=(0,m.useCallback)(()=>{r.push("/hr/".concat(s,"/e-signatures/templates"))},[r,s]),u=[{href:"/hr/".concat(s,"/e-signatures"),name:"E-Signatures",nodeType:"Link"},{href:"/hr/".concat(s,"/e-signatures/templates"),name:"Templates",nodeType:"Link"},{href:"/hr/".concat(s,"/e-signatures/templates/new"),name:"New Template",nodeType:"Link"}];return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(R.Z,{title:"".concat((0,n.kC)((0,n.parseUnderScore)(s))," - New Signature Template")}),(0,a.jsxs)("main",{"aria-label":"Create New Signature Template",className:"container flex flex-col mx-auto px-4 md:px-8 lg:px-12 pb-6",role:"main",children:[(0,a.jsx)("div",{children:(0,a.jsx)(l.Z,{home:"/hr/".concat(s,"/"),links:u})}),(0,a.jsx)(i.Gq,{children:(0,a.jsx)(Z,{onCancel:o,onComplete:c})})]})]})};L.getInitialProps=async e=>{let t=e.query.tenant;return!t&&e.res?{notFound:!0}:{tenantName:t}},L.propTypes={user:o().object,tenantName:o().string};var q=(0,r.withAuthSync)(L)},88510:function(e,t,s){"use strict";var a=s(52322),l=s(12524),n=s.n(l),i=s(13980),r=s.n(i);s(2784);let d=(e,t,s)=>s.has(e)?"completed":e===t?"active":"inactive",c=e=>e instanceof Set?e:new Set(e),o=(e,t)=>(e+1)/t*100,m=e=>{let{steps:t,currentStep:s,completedSteps:l=new Set,compact:i=!1,showStepNumbers:r=!0,showProgressText:m=!1,ariaLabel:u="Form progress",className:x}=e,h=c(l),p=o(s,t.length);return i?(0,a.jsxs)("div",{className:n()("flex items-center gap-2",x),children:[(0,a.jsx)("div",{className:"flex-1 bg-gray-200 rounded-full h-2 overflow-hidden",children:(0,a.jsx)("div",{"aria-label":"".concat(s+1," of ").concat(t.length," steps completed"),"aria-valuemax":t.length,"aria-valuemin":1,"aria-valuenow":s+1,className:"h-full bg-blue-500 rounded-full transition-all duration-300",role:"progressbar",style:{width:"".concat(p,"%")}})}),!!m&&(0,a.jsxs)("span",{className:"text-sm text-gray-600 font-medium whitespace-nowrap",children:[s+1,"/",t.length]})]}):(0,a.jsxs)("nav",{"aria-label":u,className:n()("w-full",x),role:"navigation",children:[(0,a.jsx)("div",{className:"grid gap-4",style:{gridTemplateColumns:"repeat(".concat(t.length,", 1fr)")},children:t.map((e,t)=>{let l=d(t,s,h),i="active"===l,c="completed"===l;return(0,a.jsxs)("div",{"aria-current":t===s?"step":void 0,className:"flex flex-col",children:[(0,a.jsx)("div",{className:n()("w-full rounded-sm transition-all duration-300",{"h-2 bg-blue-300":i,"h-2 bg-blue-600":c,"h-2 bg-gray-200":!i&&!c})}),(0,a.jsx)("div",{className:"mt-1",children:(0,a.jsxs)("span",{className:n()("text-sm font-medium text-left flex flex-col",{"text-gray-500":i,"text-blue-700":c,"text-gray-400":!i&&!c}),children:[!!r&&(0,a.jsxs)("span",{className:"hidden sm:inline text-sm",children:["Step ",t+1]}),e.label]})})]},e.id)})}),!!m&&(0,a.jsxs)("div",{className:"mt-4 text-left text-xs text-gray-500 font-medium",children:["Step ",s+1," of ",t.length]})]})};m.propTypes={steps:r().arrayOf(r().shape({id:r().string.isRequired,label:r().str
1ing.isRequired})).isRequired,currentStep:r().number.isRequired,completedSteps:r().oneOfType([r().instanceOf(Set),r().arrayOf(r().number)]),compact:r().bool,showStepNumbers:r().bool,showProgressText:r().bool,className:r().string,ariaLabel:r().string},t.Z=m},7325:function(e,t,s){"use strict";s.d(t,{Z:function(){return f}});var a=s(52322),l=s(2369),n=s(92942),i=s(12524),r=s.n(i),d=s(13980),c=s.n(d),o=s(2784),m=s(28316);let u=function(e,t,s){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:8,l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:8,n={width:window.innerWidth,height:window.innerHeight},i=s=>{switch(s){case"top":return{top:e.top-t.height-a,left:e.left+e.width/2-t.width/2};case"bottom":return{top:e.bottom+a,left:e.left+e.width/2-t.width/2};case"left":return{top:e.top+e.height/2-t.height/2,left:e.left-t.width-a};case"right":return{top:e.top+e.height/2-t.height/2,left:e.right+a};default:return{top:0,left:0}}},r=(e,s)=>{let a=e.left+t.width,i=e.top+t.height;switch(s){case"top":return e.top>=l;case"bottom":return i<=n.height-l;case"left":return e.left>=l;case"right":return a<=n.width-l;default:return!0}},d={top:["top","bottom","right","left"],bottom:["bottom","top","right","left"],left:["left","right","top","bottom"],right:["right","left","top","bottom"]}[s]||["top"],c=s,o=i(s);for(let e of d){let t=i(e);if(r(t,e)){c=e,o=t;break}}return o.left=Math.max(l,Math.min(o.left,n.width-t.width-l)),o.top=Math.max(l,Math.min(o.top,n.height-t.height-l)),{...o,actualPlacement:c}},x=function(){let{placement:e="top",clickable:t=!0,showDelay:s=150,hideDelay:a=100}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[l,n]=(0,o.useState)(!1),[i,r]=(0,o.useState)({top:0,left:0,actualPlacement:e}),d=(0,o.useRef)(null),c=(0,o.useRef)(null),m=(0,o.useRef)(null),x=(0,o.useRef)(null),h=(0,o.useCallback)(()=>{m.current&&(clearTimeout(m.current),m.current=null),x.current&&(clearTimeout(x.current),x.current=null)},[]),p=(0,o.useCallback)(()=>{d.current&&c.current&&r(u(d.current.getBoundingClientRect(),c.current.getBoundingClientRect(),e))},[e]),f=(0,o.useCallback)(()=>{h(),m.current=setTimeout(()=>{n(!0)},s)},[h,s]),g=(0,o.useCallback)(()=>{h(),x.current=setTimeout(()=>{n(!1)},a)},[h,a]),j=(0,o.useCallback)(()=>{h(),n(!1)},[h]),b=(0,o.useCallback)(()=>{h(),n(e=>!e)},[h]),v=(0,o.useCallback)(()=>{f()},[f]),y=(0,o.useCallback)(()=>{g()},[g]),N=(0,o.useCallback)(()=>{t&&h()},[t,h]),w=(0,o.useCallback)(()=>{t&&g()},[t,g]),C=(0,o.useCallback)(()=>{f()},[f]),k=(0,o.useCallback)(()=>{g()},[g]),D=(0,o.useCallback)(e=>{e.preventDefault(),b()},[b]);return(0,o.useEffect)(()=>{let e=e=>{"Escape"===e.key&&l&&j()};return l&&document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[l,j]),(0,o.useEffect)(()=>{if(!l)return;let e=requestAnimationFrame(()=>{p()}),t=()=>{p()};return window.addEventListener("scroll",t,!0),window.addEventListener("resize",t),()=>{cancelAnimationFrame(e),window.removeEventListener("scroll",t,!0),window.removeEventListener("resize",t)}},[l,p]),(0,o.useEffect)(()=>()=>{h()},[h]),{isVisible:l,position:i,anchorRef:d,tooltipRef:c,show:f,hide:g,hideImmediate:j,toggle:b,anchorProps:{ref:d,onMouseEnter:v,onMouseLeave:y,onFocus:C,onBlur:k,onClick:D},tooltipProps:{ref:c,onMouseEnter:N,onMouseLeave:w}}};s(18159);let h=()=>{let[e,t]=(0,o.useState)(!1);return(0,o.useEffect)(()=>t(!0),[]),e},p=e=>{let{body:t,maxWidth:s="300px",type:i="info",clickable:d=!0,id:c,className:o="",placement:u="top",icon:p=l.FDd}=e,f=h(),{isVisible:g,position:j,anchorProps:b,tooltipProps:v}=x({placement:u,clickable:d}),y=r()("eux-tooltip",{"eux-tooltip--visible":g,"eux-tooltip--clickable":d,["eux-tooltip--".concat(j.actualPlacement)]:!0}),N=r()("eux-tooltip-content",{"bg-blue-dark text-white":"info"===i}),w=(0,a.jsx)("div",{"aria-hidden":!g,className:y,id:"".concat(c,"-tooltip"),role:"tooltip",style:{top:j.top,left:j.left},...v,children:(0,a.jsxs)("div",{className:N,style:{maxWidth:s},children:[(0,a.jsx)("div",{className:"eux-tooltip-arrow"}),t]})});return(0,a.jsxs)("span",{className:o,children:[(0,a.jsx)("button",{"aria-describedby":g?"".concat(c,"-tooltip"):void 0,className:"appearance-none",id:"".concat(c,"-anchor"),type:"button",...b,children:(0,a.jsx)(n.FontAwesomeIcon,{icon:p,size:"sm"})}),!!f&&(0,m.createPortal)(w,document.body)]})};p.propTypes={body:c().any.isRequired,maxWidth:c().string,type:c().string,clickable:c().bool,id:c().string.isRequired,className:c().string,placement:c().oneOf(["top","bottom","left","right"]),icon:c().any};var f=p},18159:function(){}},function(e){e.O(0,[4976,2362,5351,9603,9436,9400,8154,4933,8516,2642,9788,7214,2888,9774,179],function(){return e(e.s=82249)}),_N_E=e.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.