1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="dd49a50e-b19c-d673-f318-d78e7ca65f4b")}catch(e){}}(); 2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,465277,e=>{"use strict";var t=e.i(843476),r=e.i(271645);e.s(["ContactForm",0,function({services:e}){let[a,n]=(0,r.useState)("idle"),[l,s]=(0,r.useState)(""),[i]=(0,r.useState)(()=>Date.now());async function o(e){e.preventDefault(),n("submitting"),s("");let t=new FormData(e.currentTarget),r={name:t.get("name"),email:t.get("email"),phone:t.get("phone"),postcode:t.get("postcode"),service:t.get("service"),message:t.get("message"),_hp:t.get("_hp"),_t:Date.now()-i};try{let e=await fetch("/api/contact",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!e.ok){let t=await e.json();throw Error(t.error||"Failed to submit")}n("success"),window.dispatchEvent(new CustomEvent("built:lead",{detail:{form:"contact"}}))}catch(e){n("error"),s(e instanceof Error?e.message:"Something went wrong")}}return"success"===a?(0,t.jsxs)("div",{className:"rounded-[var(--radius-lg)] bg-[var(--color-accent-green)]/10 p-8 text-center",children:[(0,t.jsx)("h3",{className:"font-[family-name:var(--font-heading)] text-[length:var(--text-h3)] font-[number:var(--weight-subheading)] text-[var(--color-accent-green)]",children:"Message Sent"}),(0,t.jsx)("p",{className:"mt-2 text-[length:var(--text-body)] text-[var(--color-text-secondary)]",children:"Thank you for your enquiry. We'll be in touch within 24 hours."})]}):(0,t.jsxs)("form",{onSubmit:o,className:"space-y-5",children:[(0,t.jsxs)("div",{"aria-hidden":"true",className:"absolute -left-[9999px] h-0 overflow-hidden opacity-0",children:[(0,t.jsx)("label",{htmlFor:"_hp",children:"Leave this empty"}),(0,t.jsx)("input",{type:"text",id:"_hp",name:"_hp",tabIndex:-1,autoComplete:"off"})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-5 sm:grid-cols-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"name",className:"mb-1.5 block text-[length:var(--text-small)] font-[number:var(--weight-subheading)] text-[var(--color-text-primary)]",children:"Name"}),(0,t.jsx)("input",{type:"text",id:"name",name:"name",required:!0,placeholder:"Your full name",className:"w-full rounded-[var(--radius-md)] border border-[var(--color-input-border)] bg-[var(--color-input-bg)] px-4 py-3 text-[length:var(--text-body)] text-[var(--color-text-primary)] outline-none transition-[border-color,box-shadow] duration-[var(--transition-fast)] placeholder:text-[var(--color-text-muted)] focus:border-[var(--color-primary)] focus:ring-2 focus:ring-[var(--color-primary)]/20"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"email",className:"mb-1.5 block text-[length:var(--text-small)] font-[number:var(--weight-subheading)] text-[var(--color-text-primary)]",children:"Email"}),(0,t.jsx)("input",{type:"email",id:"email",name:"email",required:!0,placeholder:"[email protected]",className:"w-full rounded-[var(--radius-md)] border border-[var(--color-input-border)] bg-[var(--color-input-bg)] px-4 py-3 text-[length:var(--text-body)] text-[var(--color-text-primary)] outline-none transition-[border-color,box-shadow] duration-[var(--transition-fast)] placeholder:text-[var(--color-text-muted)] focus:border-[var(--color-primary)] focus:ring-2 focus:ring-[var(--color-primary)]/20"})]})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-5 sm:grid-cols-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"phone",className:"mb-1.5 block text-[length:var(--text-small)] font-[number:var(--weight-subheading)] text-[var(--color-text-primary)]",children:"Phone"}),(0,t.jsx)("input",{type:"tel",id:"phone",name:"phone",placeholder:"07xxx xxxxxx",className:"w-full rounded-[var(--radius-md)] border border-[var(--color-input-border)] bg-[var(--color-input-bg)] px-4 py-3 text-[length:var(--text-body)] text-[var(--color-text-primary)] outline-none transition-[border-color,box-shadow] duration-[var(--transition-fast)] placeholder:text-[var(--color-text-muted)] focus:border-[var(--color-primary)] focus:ring-2 focus:ring-[var(--color-primary)]/20"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"postcode",className:"mb-1.5 block text-[length:var(--text-small)] font-[number:var(--weight-subheading)] text-[var(--color-text-primary)]",children:"Postcode"}),(0,t.jsx)("input",{type:"text",id:"postcode",name:"postcode",placeholder:"e.g. PO11 0LE",className:"w-full rounded-[var(--radius-md)] border border-[var(--color-input-border)] bg-[var(--color-input-bg)] px-4 py-3 text-[length:var(--text-body)] text-[var(--color-text-primary)] outline-none transition-[border-color,box-shadow] duration-[var(--transition-fast)] placeholder:text-[var(--color-text-muted)] focus:border-[var(--color-primary)] focus:ring-2 focus:ring-[var(--color-primary)]/20"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"service",className:"mb-1.5 block text-[length:var(--text-small)] font-[number:var(--weight-subheading)] text-[var(--color-text-primary)]",children:"Service Required"}),(0,t.jsxs)("select",{id:"service",name:"service",className:"w-full appearance-none rounded-[var(--radius-md)] border border-[var(--color-input-border)] bg-[var(--color-input-bg)] px-4 py-3 text-[length:var(--text-body)] text-[var(--color-text-primary)] outline-none transition-[border-color,box-shadow] duration-[var(--transition-fast)] focu
2s:border-[var(--color-primary)] focus:ring-2 focus:ring-[var(--color-primary)]/20",defaultValue:"",children:[(0,t.jsx)("option",{value:"",disabled:!0,children:"Select a service..."}),e.map(e=>(0,t.jsx)("option",{value:e.slug,children:e.name},e.slug)),(0,t.jsx)("option",{value:"other",children:"Other / Not Sure"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"message",className:"mb-1.5 block text-[length:var(--text-small)] font-[number:var(--weight-subheading)] text-[var(--color-text-primary)]",children:"Message"}),(0,t.jsx)("textarea",{id:"message",name:"message",rows:5,placeholder:"Tell us about your project...",className:"w-full resize-y rounded-[var(--radius-md)] border border-[var(--color-input-border)] bg-[var(--color-input-bg)] px-4 py-3 text-[length:var(--text-body)] text-[var(--color-text-primary)] outline-none transition-[border-color,box-shadow] duration-[var(--transition-fast)] placeholder:text-[var(--color-text-muted)] focus:border-[var(--color-primary)] focus:ring-2 focus:ring-[var(--color-primary)]/20"})]}),"error"===a&&(0,t.jsx)("p",{className:"text-[length:var(--text-small)] text-red-600",children:l}),(0,t.jsx)("button",{type:"submit",disabled:"submitting"===a,className:"w-full rounded-[var(--radius-md)] bg-[var(--color-primary)] px-6 py-3.5 font-[family-name:var(--font-body)] text-[length:var(--text-body)] font-[number:var(--weight-subheading)] tracking-[var(--tracking-wide)] text-[var(--color-button-text-primary,white)] transition-[background-color] duration-[var(--transition-fast)] hover:bg-[var(--color-primary-light)] disabled:opacity-60 sm:w-auto",children:"submitting"===a?"Sending...":"Send Message"})]})}])},62796,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(595468),n=e.i(178583),l=e.i(735501),s=e.i(531278),i=e.i(82735),o=e.i(37727),c=e.i(920755),p=e.i(349396);let h="w-full rounded-[var(--radius-md)] border border-[var(--color-input-border)] bg-[var(--color-input-bg)] px-4 py-3 text-[length:var(--text-body)] text-[var(--color-text-primary)] outline-none transition-[border-color,box-shadow] duration-[var(--transition-fast)] placeholder:text-[var(--color-text-muted)] focus:border-[var(--color-primary)] focus:ring-2 focus:ring-[var(--color-primary)]/20",u="mb-1.5 block text-[length:var(--text-small)] font-[number:var(--weight-subheading)] text-[var(--color-text-primary)]";function d({field:e,error:r}){let a=`f-${e.key}`,n={id:a,name:e.key,required:e.required,"aria-invalid":!!r||void 0};return"checkbox"===e.type?(0,t.jsxs)("label",{className:"flex items-start gap-3 text-[length:var(--text-body)] text-[var(--color-text-primary)]",children:[(0,t.jsx)("input",{type:"checkbox",...n,className:"mt-1 h-4 w-4 shrink-0 rounded border-[var(--color-input-border)] text-[var(--color-primary)] focus:ring-[var(--color-primary)]/20"}),(0,t.jsxs)("span",{children:[e.label,e.required&&" *",e.helpText&&(0,t.jsx)("span",{className:"block text-[length:var(--text-small)] text-[var(--color-text-muted)]",children:e.helpText})]})]}):(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{htmlFor:a,className:u,children:[e.label,e.required&&" *"]}),"textarea"===e.type?(0,t.jsx)("textarea",{...n,rows:5,placeholder:e.placeholder,className:`${h} resize-y`}):"select"===e.type?(0,t.jsxs)("select",{...n,defaultValue:"",className:`${h} appearance-none`,children:[(0,t.jsx)("option",{value:"",disabled:!0,children:e.placeholder||"Select..."}),(e.options??[]).map(e=>(0,t.jsx)("option",{value:e.value,children:e.label},e.value))]}):"radio"===e.type?(0,t.jsx)("div",{className:"space-y-2 pt-1",children:(e.options??[]).map((r,a)=>(0,t.jsxs)("label",{className:"flex items-center gap-2 text-[length:var(--text-body)] text-[var(--color-text-primary)]",children:[(0,t.jsx)("input",{type:"radio",name:e.key,value:r.value,required:e.required&&0===a,className:"h-4 w-4 border-[var(--color-input-border)] text-[var(--color-primary)] focus:ring-[var(--color-primary)]/20"}),r.label]},r.value))}):"multi_select"===e.type?(0,t.jsx)("div",{className:"space-y-2 pt-1",children:(e.options??[]).map(r=>(0,t.jsxs)("label",{className:"flex items-center gap-2 text-[length:var(--text-body)] text-[var(--color-text-primary)]",children:[(0,t.jsx)("input",{type:"checkbox",name:e.key,value:r.value,className:"h-4 w-4 roun
2ded border-[var(--color-input-border)] text-[var(--color-primary)] focus:ring-[var(--color-primary)]/20"}),r.label]},r.value))}):(0,t.jsx)("input",{...n,type:"email"===e.type?"email":"phone"===e.type?"tel":"date"===e.type?"date":"text",placeholder:e.placeholder,className:h}),e.helpText&&(0,t.jsx)("p",{className:"mt-1 text-[length:var(--text-small)] text-[var(--color-text-muted)]",children:e.helpText}),r&&(0,t.jsx)("p",{className:"mt-1 text-[length:var(--text-small)] text-red-600",children:r})]})}function m({field:e,formId:r,files:h,setFiles:d,error:g}){let x=(0,p.effectiveMaxFiles)(e.maxFiles),b=(0,p.acceptedMimes)(e.accept),f=h.filter(e=>"error"!==e.status),k=f.length>=x;async function v(t,a,n){try{let l=await fetch("/api/forms/upload-url",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({form_id:r,field_key:e.key,file_name:t.name,mime_type:a,size:t.size})});if(!l.ok){let e=await l.json().catch(()=>({}));throw Error(e.error||"Upload failed")}let{file_id:s,path:i,token:o}=await l.json(),h=t.type===a?t:new File([t],t.name,{type:a}),u=(0,c.createClient)(),{error:m}=await u.storage.from(p.FORM_UPLOADS_BUCKET).uploadToSignedUrl(i,o,h);if(m)throw Error(m.message);d(e=>e.map(e=>e.localId===n?{...e,fileId:s,status:"done"}:e))}catch(e){d(t=>t.map(t=>t.localId===n?{...t,status:"error",error:e instanceof Error?e.message:"Upload failed"}:t))}}return(0,t.jsxs)("div",{children:[(0,t.jsxs)("span",{className:u,children:[e.label,e.required&&" *"]}),!k&&(0,t.jsxs)("label",{className:"flex cursor-pointer items-center justify-center gap-2 rounded-[var(--radius-md)] border border-dashed border-[var(--color-input-border)] bg-[var(--color-input-bg)] px-4 py-4 text-[length:var(--text-small)] text-[var(--color-text-secondary)] transition-colors hover:border-[var(--color-primary)] hover:text-[var(--color-text-primary)]",children:[(0,t.jsx)(i.Paperclip,{className:"h-4 w-4"}),(0,t.jsxs)("span",{children:["Choose ",x>1?"files":"a file","pdf"===e.accept?" (PDF)":"images"===e.accept?" (photos)":" (photos or PDF)"]}),(0,t.jsx)("input",{type:"file",accept:(0,p.acceptAttr)(e.accept),multiple:x>1,onChange:function(e){let t=Array.from(e.target.files??[]);e.target.value="";let r=x-f.length;for(let e of t.slice(0,Math.max(0,r))){let t=e.type&&b.includes(e.type)?e.type:(0,p.mimeFromName)(e.name),r=`${e.name}-${e.size}-${e.lastModified}`;if(!h.some(e=>e.localId===r)){if(!b.includes(t)){d(a=>[...a,{localId:r,name:e.name,size:e.size,mime:t,status:"error",error:"File type not allowed"}]);continue}if(e.size>p.MAX_FILE_BYTES){d(a=>[...a,{localId:r,name:e.name,size:e.size,mime:t,status:"error",error:`Max ${(0,p.formatBytes)(p.MAX_FILE_BYTES)}`}]);continue}d(a=>[...a,{localId:r,name:e.name,size:e.size,mime:t,status:"uploading"}]),v(e,t,r)}}},className:"sr-only"})]}),e.helpText&&(0,t.jsx)("p",{className:"mt-1 text-[length:var(--text-small)] text-[var(--color-text-muted)]",children:e.helpText}),h.length>0&&(0,t.jsx)("ul",{className:"mt-2 space-y-1.5",children:h.map(e=>(0,t.jsxs)("li",{className:"flex items-center gap-2 rounded-[var(--radius-md)] border border-[var(--color-input-border)] bg-[var(--color-input-bg)] px-3 py-2 text-[length:var(--text-small)]",children:["uploading"===e.status?(0,t.jsx)(s.Loader2,{className:"h-4 w-4 shrink-0 animate-spin text-[var(--color-text-muted)]"}):"error"===e.status?(0,t.jsx)(o.X,{className:"h-4 w-4 shrink-0 text-red-500"}):(0,p.isImageMime)(e.mime)?(0,t.jsx)(l.ImageIcon,{className:"h-4 w-4 shrink-0 text-[var(--color-text-muted)]"}):(0,t.jsx)(n.FileText,{className:"h-4 w-4 shrink-0 text-[var(--color-text-muted)]"}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-[var(--color-text-primary)]",children:e.name}),(0,t.jsx)("span",{className:"shrink-0 text-[var(--color-text-muted)]",children:"error"===e.status?e.error:"uploading"===e.status?"Uploadingâ¦":(0,p.formatBytes)(e.size)}),"done"===e.status&&(0,t.jsx)(a.CheckCircle2,{className:"h-4 w-4 shrink-0 text-[var(--color-accent-green)]"}),(0,t.jsx)("button",{type:"button",onClick:()=>{var t;return t=e.localId,void d(e=>e.filter(e=>e.localId!==t))},className:"shrink-0 rounded p-0.5 text-[var(--color-text-muted)] hover:text-red-500","aria-label":`Remove ${e.name}`,children:(0,t.jsx)(o.X,{className:"h-3.5 w-3.5"})})]}
2,e.localId))}),g&&(0,t.jsx)("p",{className:"mt-1 text-[length:var(--text-small)] text-red-600",children:g})]})}e.s(["DynamicForm",0,function({form:e}){let[a,n]=(0,r.useState)("idle"),[l,s]=(0,r.useState)(""),[i,o]=(0,r.useState)({}),[c]=(0,r.useState)(()=>Date.now()),[p,h]=(0,r.useState)({}),u=Array.isArray(e.field_schema)?e.field_schema:[],g=(0,r.useMemo)(()=>Object.values(p).some(e=>e.some(e=>"uploading"===e.status)),[p]);async function x(t){t.preventDefault(),s(""),o({});let r=new FormData(t.currentTarget),a={};for(let e of u)"file"===e.type&&e.required&&0===(p[e.key]??[]).filter(e=>"done"===e.status).length&&(a[e.key]=`${e.label} is required`);if(Object.keys(a).length>0)return void o(a);n("submitting");let l={};for(let e of u)"file"!==e.type&&("checkbox"===e.type?l[e.key]="on"===r.get(e.key):"multi_select"===e.type?l[e.key]=r.getAll(e.key).map(e=>String(e)):l[e.key]=r.get(e.key)??"");let i=[];for(let e of Object.values(p))for(let t of e)"done"===t.status&&t.fileId&&i.push(t.fileId);try{let t=await fetch("/api/forms/submit",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({form_id:e.id,form_data:l,file_ids:i,_hp:r.get("_hp"),_t:Date.now()-c})});if(!t.ok){let e=await t.json().catch(()=>({}));throw e.fieldErrors&&o(e.fieldErrors),Error(e.error||"Failed to submit")}n("success"),window.dispatchEvent(new CustomEvent("built:lead",{detail:{form:e.slug||"form",formId:e.id}}))}catch(e){n("error"),s(e instanceof Error?e.message:"Something went wrong")}}return"success"===a?(0,t.jsxs)("div",{className:"rounded-[var(--radius-lg)] bg-[var(--color-accent-green)]/10 p-8 text-center",children:[(0,t.jsx)("h3",{className:"font-[family-name:var(--font-heading)] text-[length:var(--text-h3)] font-[number:var(--weight-subheading)] text-[var(--color-accent-green)]",children:"Message Sent"}),(0,t.jsx)("p",{className:"mt-2 text-[length:var(--text-body)] text-[var(--color-text-secondary)]",children:e.success_message||"Thank you for your enquiry. We'll be in touch shortly."})]}):(0,t.jsxs)("form",{onSubmit:x,className:"space-y-5",children:[(0,t.jsxs)("div",{"aria-hidden":"true",className:"absolute -left-[9999px] h-0 overflow-hidden opacity-0",children:[(0,t.jsx)("label",{htmlFor:"_hp",children:"Leave this empty"}),(0,t.jsx)("input",{type:"text",id:"_hp",name:"_hp",tabIndex:-1,autoComplete:"off"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-5 sm:grid-cols-2",children:u.map(r=>(0,t.jsx)("div",{className:"half"===r.width?"sm:col-span-1":"sm:col-span-2",children:"file"===r.type?(0,t.jsx)(m,{field:r,formId:e.id,files:p[r.key]??[],setFiles:e=>{var t;return t=r.key,void h(r=>({...r,[t]:e(r[t]??[])}))},error:i[r.key]}):(0,t.jsx)(d,{field:r,error:i[r.key]})},r.key))}),"error"===a&&l&&(0,t.jsx)("p",{className:"text-[length:var(--text-small)] text-red-600",children:l}),(0,t.jsx)("button",{type:"submit",disabled:"submitting"===a||g,className:"w-full rounded-[var(--radius-md)] bg-[var(--color-primary)] px-6 py-3.5 font-[family-name:var(--font-body)] text-[length:var(--text-body)] font-[number:var(--weight-subheading)] tracking-[var(--tracking-wide)] text-[var(--color-button-text-primary,white)] transition-[background-color] duration-[var(--transition-fast)] hover:bg-[var(--color-primary-light)] disabled:opacity-60 sm:w-auto",children:"submitting"===a?"Sending...":g?"Uploading filesâ¦":e.submit_button_text||"Submit"})]})}])},922606,e=>{"use strict";var t=e.i(843476),r=e.i(647163),a=e.i(71352);e.s(["AspectBox",0,function({aspect:e,fallback:n,className:l,as:s,children:i,...o}){let c=(0,a.aspectRatioStyle)(e);return(0,t.jsx)(s??"div",{...o,className:(0,r.cn)(l,!c&&n),style:c,children:i})}])},676525,e=>{"use strict";var t=e.i(843476),r=e.i(522016),a=e.i(647163);let n={primary:"px-[var(--btn-px,1.5rem)] py-[var(--btn-py,0.75rem)] text-[length:var(--btn-font,var(--text-small))] leading-[1.25rem] font-semibold tracking-[var(--tracking-wide)] bg-[var(--color-primary)] text-[var(--color-button-text-primary,white)] transition-colors duration-[150ms] ease-[ease] hover:bg-[var(--color-primary-light)]","primary-dark":"px-[var(--btn-px,1.5rem)] py-[var(--btn-py,0.75rem)] text-[length:var(--btn-font,var(--text-small))] leading-[1.25rem] font-semibold tracking-[var(--tracking-wide)] bg-[var(--color-primary-dark)] text-[var(--color-button-text-primary,white)] transition-colors duration-[150ms] ease-[ease] hover:bg-[var(--color-primary)]",inverted:"px-[var(--btn-px,1.5rem)] py-[var(--btn-py,0.75rem)] text-[length:var(--btn-font,var(--text-body))] font-[family-name:var
2(--font-body)] font-[number:var(--weight-subheading)] tracking-[var(--tracking-wide)] bg-[var(--color-background)] text-[var(--color-primary-ink)] transition-[background-color] duration-[150ms] ease-[ease] hover:bg-[var(--color-background)]/90","outline-light":"px-[var(--btn-px,1.5rem)] py-[var(--btn-py,0.75rem)] text-[length:var(--btn-font,var(--text-small))] leading-[1.25rem] font-semibold tracking-[var(--tracking-wide)] border border-white bg-transparent text-white transition-colors duration-[150ms] ease-[ease] hover:bg-[var(--color-background)] hover:text-[var(--color-primary-ink)]","outline-fill":"px-[var(--btn-px,1.5rem)] py-[var(--btn-py,0.75rem)] text-[length:var(--btn-font,var(--text-small))] leading-[1.25rem] font-semibold tracking-[var(--tracking-wide)] border border-[var(--color-border)] bg-transparent text-[var(--color-text-primary)] transition-colors duration-[150ms] ease-[ease] hover:bg-[var(--color-primary)] hover:text-[var(--color-button-text-primary,white)] hover:border-[var(--color-primary)]",pill:"px-[var(--btn-px,1.25rem)] py-[var(--btn-py,0.625rem)] text-[length:var(--btn-font,var(--text-small))] font-[number:var(--weight-subheading)] border border-[var(--color-border)] bg-[var(--color-background)] text-[var(--color-text-primary)] transition-colors duration-150 hover:border-[var(--color-primary)] hover:text-[var(--color-primary-ink)]","outline-usp":"px-[var(--btn-px,1.5rem)] py-[var(--btn-py,0.75rem)] text-[length:var(--btn-font,var(--text-small))] leading-[1.25rem] font-semibold tracking-[var(--tracking-wide)] border-2 border-white bg-[var(--color-background)] text-[var(--color-primary-ink)] transition-colors hover:bg-transparent hover:text-white","pill-fill":"px-[var(--btn-px,1.25rem)] py-[var(--btn-py,0.625rem)] text-[length:var(--btn-font,var(--text-small))] font-[number:var(--weight-subheading)] border border-[var(--color-border)] text-[var(--color-text-primary)] transition-colors duration-150 hover:border-[var(--color-primary)] hover:bg-[var(--color-primary)] hover:text-[var(--color-button-text-primary,white)]","prominent-primary":"px-[var(--btn-px,1.5rem)] py-[var(--btn-py,0.75rem)] text-[length:var(--btn-font,var(--text-body))] font-[family-name:var(--font-body)] font-[number:var(--weight-subheading)] tracking-[var(--tracking-wide)] bg-[var(--color-primary)] text-[var(--color-button-text-primary,white)] transition-[background-color,opacity] duration-150 ease-[ease] hover:opacity-90","wide-primary":"px-[var(--btn-px,1.75rem)] py-[var(--btn-py,0.75rem)] text-[length:var(--btn-font,var(--text-small))] leading-[1.25rem] font-semibold tracking-[var(--tracking-wide)] bg-[var(--color-primary)] text-[var(--color-button-text-primary,white)] transition-colors hover:bg-[var(--color-primary-dark)]","wide-primary-dark":"px-[var(--btn-px,1.75rem)] py-[var(--btn-py,0.75rem)] text-[length:var(--btn-font,var(--text-small))] leading-[1.25rem] font-semibold tracking-[var(--tracking-wide)] bg-[var(--color-primary-dark)] text-[var(--color-button-text-primary,white)] transition-colors hover:bg-[var(--color-primary)]","wide-outline":"px-[var(--btn-px,1.75rem)] py-[var(--btn-py,0.75rem)] text-[length:var(--btn-font,var(--text-small))] leading-[1.25rem] font-semibold tracking-[var(--tracking-wide)] border border-white/60 bg-transparent text-white transition-colors hover:bg-[var(--color-background)] hover:text-[var(--color-text-primary)]","wide-outline-onprimary":"px-[var(--btn-px,1.75rem)] py-[var(--btn-py,0.75rem)] text-[length:var(--btn-font,var(--text-small))] leading-[1.25rem] font-semibold tracking-[var(--tracking-wide)] border border-white/40 text-white transition-colors hover:bg-[var(--color-background)] hover:text-[var(--color-text-primary)]","wide-outline-fill":"px-[var(--btn-px,1.75rem)] py-[var(--btn-py,0.75rem)] text-[length:var(--btn-font,var(--text-small))] leading-[1.25rem] font-semibold tracking-[var(--tracking-wide)] border border-[var(--color-border)] bg-transparent text-[var(--color-text-primary)] transition-colors hover:bg-[var(--color-primary)] hover:text-[var(--color-button-text-primary,white)] hover:border-[var(--color-primary)]","carousel-primary":"px-[var(--btn-px,1.5rem)] py-[var(--btn-py,0.625rem)] text-[length:var(--btn-font,var(--text-small))] leading-[1.25rem] font-semibold tracking-[var(--tracking-wide)] bg-[var(--color-primary)] text-[var(--color-button-text-primary,white)] transition-colors hover:bg-[var(--color-primary-dark)]","carousel-outline":"px-[var(--btn-px,1.5rem)] py-[var(--btn-py,0.625rem)] text-[length:var(--btn-font,var(--text-small))] leading-[1.25rem] font-semibold tracking-[var(--tracking-wide)] border border-white/40 text-white transition-colors hover:bg-[var(--color-background)] hover:text-[var(--color-text-primary)]","view
2all-compact":"px-[var(--btn-px,1.5rem)] py-[var(--btn-py,0.625rem)] text-[length:var(--btn-font,var(--text-small))] leading-[1.25rem] font-semibold tracking-[var(--tracking-wide)] border border-[var(--color-border)] text-[var(--color-text-primary)] transition-colors hover:border-[var(--color-primary)] hover:text-[var(--color-primary-ink)]","card-primary":"px-[var(--btn-px,1.5rem)] py-[var(--btn-py,0.75rem)] text-[length:var(--btn-font,var(--text-small))] leading-[1.25rem] font-semibold tracking-[var(--tracking-wide)] bg-[var(--color-primary)] text-[var(--color-button-text-primary,white)] transition-colors hover:bg-[var(--color-primary-dark)]","card-featured":"px-[var(--btn-px,1.5rem)] py-[var(--btn-py,0.75rem)] text-[length:var(--btn-font,var(--text-small))] leading-[1.25rem] font-semibold tracking-[var(--tracking-wide)] bg-[var(--color-background)] text-[var(--color-primary-ink)] transition-colors hover:bg-[var(--color-surface)]"};e.s(["Button",0,function({variant:e="primary",href:l,onClick:s,type:i="button",fullWidth:o=!1,icon:c,className:p,external:h,ariaLabel:u,children:d}){let m=(0,a.cn)(o?"flex w-full items-center justify-center gap-2":"inline-flex items-center gap-2","rounded-[var(--radius-md)]",n[e],p),g=(0,t.jsxs)(t.Fragment,{children:[d,c]}),x=!!l&&/^(tel:|mailto:|sms:)/i.test(l),b=h??(!!l&&/^(https?:)?\/\//i.test(l));return l?x?(0,t.jsx)("a",{href:l,"aria-label":u,className:m,children:g}):b?(0,t.jsx)("a",{href:l,target:"_blank",rel:"noopener noreferrer","aria-label":u,className:m,children:g}):(0,t.jsx)(r.default,{prefetch:!1,href:l,"aria-label":u,className:m,children:g}):(0,t.jsx)("button",{type:i,onClick:s,"aria-label":u,className:m,children:g})}])},357025,e=>{"use strict";var t=e.i(843476),r=e.i(62796),a=e.i(625991),n=e.i(884421);e.s(["HeroFormCard",0,function({form:e,background:l,heading:s,intro:i,className:o=""}){if(!e)return null;let c=(0,a.isValidColor)(l);return(0,t.jsxs)("div",{className:`rounded-[var(--radius-lg)] p-6 sm:p-8 ${c?"":"bg-[var(--color-background)]"} ${o}`,style:c?{background:l}:void 0,children:[s&&(0,t.jsx)("h3",{className:"font-[family-name:var(--font-heading)] text-[length:var(--text-h3)] font-[number:var(--weight-heading)] leading-[var(--leading-tight)] text-[var(--color-text-primary)]",children:s}),i&&(0,t.jsx)("div",{className:`${s?"mt-3":""} text-[length:var(--text-body)] leading-[var(--leading-relaxed)] text-[var(--color-text-secondary)]`,dangerouslySetInnerHTML:{__html:(0,n.sanitizeHtml)(i)}}),(0,t.jsx)("div",{className:s||i?"mt-6":"",children:(0,t.jsx)(r.DynamicForm,{form:e})})]})}])},652263,e=>{"use strict";var t=e.i(843476),r=e.i(271645);function a(e,t=25){return e>0&&t>0?Math.round(e/t*100)/100:30}e.s(["LogoMarquee",0,function({children:e,speed:n=25,gapClass:l="gap-8 md:gap-12",pauseOnHover:s=!0}){let i=(0,r.useRef)(null),[o,c]=(0,r.useState)(0);return(0,r.useEffect)(()=>{let e=i.current;if(!e)return;let t=()=>{c(e.scrollWidth/2)};t();let r=new ResizeObserver(t);return r.observe(e),()=>r.disconnect()},[e]),(0,t.jsxs)("div",{className:"logo-marquee relative overflow-hidden",style:{"--marquee-speed":`${a(o,n)}s`,"--marquee-width":`${o}px`},children:[(0,t.jsx)("div",{className:"pointer-events-none absolute inset-y-0 left-0 z-10 w-12 bg-gradient-to-r from-[var(--marquee-bg,var(--color-surface))] to-transparent"}),(0,t.jsx)("div",{className:"pointer-events-none absolute inset-y-0 right-0 z-10 w-12 bg-gradient-to-l from-[var(--marquee-bg,var(--color-surface))] to-transparent"}),(0,t.jsxs)("div",{ref:i,className:`logo-marquee-track flex items-center ${l} ${s?"logo-marquee-hoverable":""}`,children:[(0,t.jsx)("div",{className:`flex shrink-0 items-center ${l}`,children:e}),(0,t.jsx)("div",{className:`flex shrink-0 items-center ${l}`,"aria-hidden":"true",children:e})]})]})},"MARQUEE_PIXELS_PER_SECOND",0,25,"MARQUEE_UNMEASURED_DURATION",0,30,"marqueeDuration",0,a])},211290,e=>{"use strict";var t=e.i(843476),r=e.i(647163);e.s(["SectionLabel",0,function({text:e,variant:a="light"}){return(0,t.jsxs)("p",{className:(0,r.cn)("mb-4 font-[family-name:var(--font-body)] text-[length:var(--text-xs)] font-[number:var(--weight-subheading)] uppercase tracking-[var(--tracking-wider)]","light"===a?"text-[var(--color-section-label,var(--color-primary-ink))]":"text-[var(--color-section-label,white)]"),children:[(0,t.jsx)("span",{"aria-hidden":!0,
2className:"mr-2 inline-block h-[2px] w-6 bg-current align-middle"}),e]})}])},518853,577427,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(657688),n=e.i(431343);let l=/^[\w-]{6,20}$/,s=/^\d{6,15}$/,i=/^[a-zA-Z0-9]{4,20}$/,o=/\.(mp4|webm)$/i;function c(e){return l.test(e)?{provider:"youtube",id:e,embedUrl:`https://www.youtube-nocookie.com/embed/${e}?rel=0&modestbranding=1`}:null}function p(e,t){if(!s.test(e))return null;let r=t&&i.test(t)?`?h=${t}`:"";return{provider:"vimeo",id:e,embedUrl:`https://player.vimeo.com/video/${e}${r}`}}function h(e){let t;if(!e||"string"!=typeof e)return null;let r=e.trim();if(!r)return null;try{t=new URL(r)}catch{return null}if("https:"!==t.protocol)return null;let a=t.hostname.replace(/^www\./,"").toLowerCase(),n=t.pathname.split("/").filter(Boolean);if("youtube.com"===a||"youtube-nocookie.com"===a||"m.youtube.com"===a){let e=t.searchParams.get("v");return e?c(e):n.length>=2&&["embed","shorts","v","live"].includes(n[0])?c(n[1]):null}return"youtu.be"===a?n[0]?c(n[0]):null:"vimeo.com"===a?n[0]?p(n[0],n[1]):null:"player.vimeo.com"===a?"video"===n[0]&&n[1]?p(n[1],t.searchParams.get("h")??void 0):null:o.test(t.pathname)&&(a.endsWith(".supabase.co")||"cdn.builtfortrades.co.uk"===a)?{provider:"mp4",embedUrl:r}:null}function u(e){return"9:16"===e}function d(e){switch(e){case"9:16":return"9 / 16";case"1:1":return"1 / 1";default:return"16 / 9"}}e.s(["aspectRatioValue",0,d,"isPortrait",0,u,"parseVideoUrl",0,h],577427),e.s(["VideoEmbed",0,function({url:e,poster:l,aspect:s,title:i}){let[o,c]=(0,r.useState)(!1),p=h(e);if(!p)return null;let m=u(s),g=m?"relative mx-auto w-full max-w-[340px] overflow-hidden rounded-[var(--radius-lg)] bg-[var(--color-surface)]":"relative w-full overflow-hidden rounded-[var(--radius-lg)] bg-[var(--color-surface)]";if("mp4"===p.provider)return(0,t.jsx)("div",{className:g,style:{aspectRatio:d(s)},children:(0,t.jsx)("video",{controls:!0,playsInline:!0,preload:"metadata",poster:l,className:"absolute inset-0 h-full w-full rounded-[var(--radius-lg)] object-contain",children:(0,t.jsx)("source",{src:p.embedUrl})})});let x=p.embedUrl.includes("?")?"&":"?",b=`${p.embedUrl}${x}autoplay=1`;return(0,t.jsx)("div",{className:g,style:{aspectRatio:d(s)},children:o?(0,t.jsx)("iframe",{src:b,title:i||"Video",className:"absolute inset-0 h-full w-full",style:{border:"none"},allow:"autoplay; fullscreen; picture-in-picture; encrypted-media",allowFullScreen:!0,loading:"lazy",referrerPolicy:"strict-origin-when-cross-origin"}):(0,t.jsxs)("button",{type:"button",onClick:()=>c(!0),"aria-label":i?`Play video: ${i}`:"Play video",className:"group absolute inset-0 h-full w-full cursor-pointer",children:[l&&(0,t.jsx)(a.default,{src:l,alt:i||"",fill:!0,className:"object-cover",sizes:m?"340px":"(max-width: 1024px) 100vw, 50vw"}),(0,t.jsx)("span",{className:"absolute inset-0 flex items-center justify-center bg-black/20 transition-colors duration-200 group-hover:bg-black/30",children:(0,t.jsx)("span",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-white/90 shadow-[var(--shadow-lg)] transition-transform duration-200 group-hover:scale-110",children:(0,t.jsx)(n.Play,{className:"ml-1 h-7 w-7 fill-[var(--color-primary-ink)] text-[var(--color-primary-ink)]"})})})]})})}],518853)},831387,e=>{"use strict";function t(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var r=t(),a={exec:()=>null};function n(e,t=""){let r="string"==typeof e?e:e.source,a={replace:(e,t)=>{let n="string"==typeof t?t:t.source;return n=n.replace(s.caret,"$1"),r=r.replace(e,n),a},getRegex:()=>new RegExp(r,t)};return a}var l=(()=>{try{return!!RegExp("(?<=1)(?<!1)")}catch{return!1}})(),s={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine
vendor: 4,199 bytes, line 2
2:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}>`)},i=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,o=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,c=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,p=n(c).replace(/bull/g,o).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),h=n(c).replace(/bull/g,o).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),u=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,d=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,m=n(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",d).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),g=n(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,o).getRegex(),x="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",b=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,f=n("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",b).replace("tag",x).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),k=n(u).replace("hr",i).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",x).getRegex(),v={blockquote:n(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",k).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:m,fences:/^ {0,3}(`{3,}
vendor: 7,258 bytes, lines 2-3
2(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:i,html:f,lheading:p,list:g,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:k,table:a,text:/^[^\n]+/},y=n("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",i).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",x).getRegex(),w={...v,lheading:h,table:y,paragraph:n(u).replace("hr",i).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",y).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",x).getRegex()},S={...v,html:n("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",b).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:a,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:n(u).replace("hr",i).replace("heading",` *#{1,6} *[^ 3]`).replace("lheading",p).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},$=/^( {2,}|\\)\n(?!\s*$)/,j=/[\p{P}\p{S}]/u,R=/[\s\p{P}\p{S}]/u,T=/[^\s\p{P}\p{S}]/u,N=n(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,R).getRegex(),_=/(?!~)[\p{P}\p{S}]/u,z=/(?![*_])[\p{P}\p{S}]/u,A=n(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",l?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),P=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,E=n(P,"u").replace(/punct/g,j).getRegex(),I=n(P,"u").replace(/punct/g,_).getRegex(),C="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",q=n(C,"gu").replace(/notPunctSpace/g,T).replace(/punctSpace/g,R).replace(/punct/g,j).getRegex(),L=n(C,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,_).getRegex(),B=n("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,T).replace(/punctSpace/g,R).replace(/punct/g,j).getRegex(),D=n(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,z).getRegex(),M=n("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|[*_])/u).replace(/punctSpace/g,/(?![*_])[\s\p{P}\p{S}]/u).replace(/punct/g,z).getRegex(),F=n(/\\(punct)/,"gu").replace(/punct/g,j).getRegex(),O=n(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),U=n(b).replace("(?:-->|$)","-->").getRegex(),Z=n("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",U).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Q=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,H=n(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Q).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),X=n(/^!?\[(label)\]\[(ref)\]/).replace("label",Q).replace("ref",d).getRegex(),G=n(/^!?\[(ref)\](?:\[\])?/).replace("ref",d).getRegex(),W=n("reflink|nolink(?!\\()","g").replace("reflink",X).replace("nolink",G).getRegex(),V=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,J={_backpedal:a,anyPunctuation:F,autolink:O,blockSkip:A,br:$,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:a,delLDelim:a,delRDelim:a,emStrongLDelim:E,emStrongRDelimAst:q,emStrongRDelimUnd:B,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:H,nolink:G,punctuation:N,reflink:X,reflinkSearch:W,tag:Z,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:a},K={...J,link:n(/^!?\[(label)\]\((.*?)\)/).replace("label",Q).getRegex(),reflink:n(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Q).getRegex()},Y={...J,emStrongRDelimAst:L,emStrongLDelim:I,delLDelim:D,delRDelim:M,url:n(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",V).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:n(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",V).getRegex()},ee={...Y,br:n($).replace("{2,}","*").getRegex(),text:n(Y.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},et={normal:v,gfm:w,pedantic:S},er={normal:J,gfm:Y,breaks:ee,pedantic:K},ea={"&":"&","<":"<",">":">",'"':""","'":"'"},en=e=>ea[e];function el(e,t){if(t){if(s.escapeTest.test(e))return e.replace(s.escapeReplace,en)}else if(s.escapeTestNoEncode.test(e))return e.replace(s.escapeReplaceNoEncode,en);return e}function es(e){try{e=encodeURI(e).replace(s.percentDecode,"%")}catch{return null}return e}function ei(e,t){let r=e.replace(s.findPipe,(e,t,r)=>{let a=!1,n=t;for(;--n>=0&&"\\"===r[n];)a=!a;return a?"|":" |"}).split(s.splitPipe),a=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;a<r.length;a++)r[a]=r[a].trim().replace(s.slashPipe,"|");return r}function eo(e,t,r){let a=e.length;if(0===a)return"";let n=0;for(;n<a;){let l=e.charAt(a-n-1);if(l!==t||r)if(l!==t&&r)n++;else break;else n++}
3return e.slice(0,a-n)}function ec(e,t,r,a,n){let l=t.href,s=t.title||null,i=e[1].replace(n.other.outputLinkReplace,"$1");a.state.inLink=!0;let o={type:"!"===e[0].charAt(0)?"image":"link",raw:r,href:l,title:s,text:i,tokens:a.inlineTokens(i)};return a.state.inLink=!1,o}var ep=class{options;rules;lexer;constructor(e){this.options=e||r}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:eo(e,` 4`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],r=function(e,t,r){let a=e.match(r.other.indentCodeCompensation);if(null===a)return t;let n=a[1];return t.split(` 5`).map(e=>{let t=e.match(r.other.beginningSpace);if(null===t)return e;let[a]=t;return a.length>=n.length?e.slice(n.length):e}).join(` 6`)}(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=eo(e,"#");(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:eo(t[0],` 7`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=eo(t[0],` 8`).split(` 9`),r="",a="",n=[];for(;e.length>0;){let t=!1,l=[],s;for(s=0;s<e.length;s++)if(this.rules.other.blockquoteStart.test(e[s]))l.push(e[s]),t=!0;else if(t)break;else l.push(e[s]);e=e.slice(s);let i=l.join(` 10`),o=i.replace(this.rules.other.blockquoteSetextReplace,` 11 $1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r} 12${i}`:i,a=a?`${a} 13${o}`:o;let c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(o,n,!0),this.lexer.state.top=c,0===e.length)break;let p=n.at(-1);if(p?.type==="code")break;if(p?.type==="blockquote"){let t=p.raw+` 14`+e.join(` 15`),l=this.blockquote(t);n[n.length-1]=l,r=r.substring(0,r.length-p.raw.length)+l.raw,a=a.substring(0,a.length-p.text.length)+l.text;break}if(p?.type==="list"){let t=p.raw+` 16`+e.join(` 17`),l=this.list(t);n[n.length-1]=l,r=r.substring(0,r.length-p.raw.length)+l.raw,a=a.substring(0,a.length-p.raw.length)+l.raw,e=t.substring(n.at(-1).raw.length).split(` 18`);continue}}return{type:"blockquote",raw:r,tokens:n,text:a}}}list(e){let t=this.rules.block.list.exec(e);if(t){let r=t[1].trim(),a=r.length>1,n={type:"list",raw:"",ordered:a,start:a?+r.slice(0,-1):"",loose:!1,items:[]};r=a?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=a?r:"[*+-]");let l=this.rules.other.listItemRegex(r),s=!1;for(;e;){let r=!1,a="",i="";if(!(t=l.exec(e))||this.rules.block.hr.test(e))break;a=t[0],e=e.substring(a.length);let o=function(e,t=0){let r=t,a="";for(let t of e)if(" "===t){let e=4-r%4;a+=" ".repeat(e),r+=e}else a+=t,r++;return a}(t[2].split(` 19`,1)[0],t[1].length),c=e.split(` 20`,1)[0],p=!o.trim(),h=0;if(this.options.pedantic?(h=2,i=o.trimStart()):p?h=t[1].length+1:(h=(h=o.search(this.rules.other.nonSpaceChar))>4?1:h,i=o.slice(h),h+=t[1].length),p&&this.rules.other.blankLine.test(c)&&(a+=c+` 21`,e=e.substring(c.length+1),r=!0),!r){let t=this.rules.other.nextBulletRegex(h),r=this.rules.other.hrRegex(h),n=this.rules.other.fencesBeginRegex(h),l=this.rules.other.headingBeginRegex(h),s=this.rules.other.htmlBeginRegex(h),u=this.rules.other.blockquoteBeginRegex(h);for(;e;){let d=e.split(` 22`,1)[0],m;if(c=d,m=this.options.pedantic?c=c.replace(this.rules.other.listReplaceNesting," "):c.replace(this.rules.other.tabCharGlobal," "),n.test(c)||l.test(c)||s.test(c)||u.test(c)||t.test(c)||r.test(c))break;if(m.search(this.rules.other.nonSpaceChar)>=h||!c.trim())i+=` 23`+m.slice(h);else{if(p||o.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||n.test(o)||l.test(o)||r.test(o))break;i+=` 24`+c}p=!c.trim(),a+=d+` 25`,e=e.substring(d.length+1),o=m.slice(h)}}n.loose||(s?n.loose=!0:this.rules.other.doubleBlankLine.test(a)&&(s=!0)),n.items.push({type:"list_item",raw:a,task:!!this.options.gfm&&this.rules.other.listIsTask.test(i),loose:!1,text:i,tokens:[]}),n.raw+=a}let i=n.items.at(-1);if(!i)return;for(let e of(i.raw=i.raw.trimEnd(),i.text=i.text.trimEnd(),n.raw=n.raw.trimEnd(),n.items)){if(this.lexer.state.top=!1,e.tokens=this.lexer.blockTokens(e.text,[]),e.task){if(e.text=e.text.replace(this.rules.other.listReplaceTask,""),e.tokens[0]?.type==="text"||e.tokens[0]?.type==="paragraph"){e.tokens[0].raw=e.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),e.tokens[0].text=e.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let e=this.lexer.inlineQueue.length-1;e>=0;e--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)){this.lexer.inlineQueue[e].src=this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask,"");break}}let t=this.rules.other.listTaskCheckbox.exec(e.raw);if(t){let r={type:"checkbox",raw:t[0]+" ",checked:"[ ]"!==t[0]};e.checked=r.checked,n.loose?e.tokens[0]&&["paragraph","text"].includes(e.tokens[0].type)&&"tokens"in e.tokens[0]&&e.tokens[0].tokens?(e.tokens[0].raw=r.raw+e.tokens[0].raw,e.tokens[0].text=r.raw+e.tokens[0].text,e.tokens[0].tokens.unshift(r)):e.tokens.unshift({type:"paragraph",raw:r.raw,text:r.raw,tokens:[r]}):e.tokens.unshift(r)}}if(!n.loose){let t=e.tokens.filter(e=>
25"space"===e.type);n.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}}if(n.loose)for(let e of n.items)for(let t of(e.loose=!0,e.tokens))"text"===t.type&&(t.type="paragraph");return n}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:r,title:a}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let r=ei(t[1]),a=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),n=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(` 26`):[],l={type:"table",raw:t[0],header:[],align:[],rows:[]};if(r.length===a.length){for(let e of a)this.rules.other.tableAlignRight.test(e)?l.align.push("right"):this.rules.other.tableAlignCenter.test(e)?l.align.push("center"):this.rules.other.tableAlignLeft.test(e)?l.align.push("left"):l.align.push(null);for(let e=0;e<r.length;e++)l.header.push({text:r[e],tokens:this.lexer.inline(r[e]),header:!0,align:l.align[e]});for(let e of n)l.rows.push(ei(e,l.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:l.align[t]})));return l}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===` 27`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=eo(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{let e=function(e){if(-1===e.indexOf(")"))return -1;let t=0;for(let r=0;r<e.length;r++)if("\\"===e[r])r++;else if("("===e[r])t++;else if(")"===e[r]&&--t<0)return r;return t>0?-2:-1}(t[2]);if(-2===e)return;if(e>-1){let r=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,r).trim(),t[3]=""}}let r=t[2],a="";if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(r);e&&(r=e[1],a=e[3])}else a=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(r=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?r.slice(1):r.slice(1,-1)),ec(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let e=t[(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!e){let e=r[0].charAt(0);return{type:"text",raw:e,text:e}}return ec(r,e,r[0],this.lexer,this.rules)}}emStrong(e,t,r=""){let a=this.rules.inline.emStrongLDelim.exec(e);if(!(!a||a[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(a[1]||a[2])||!r||this.rules.inline.punctuation.exec(r))){let r=[...a[0]].length-1,n,l,s=r,i=0,o="*"===a[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(o.lastIndex=0,t=t.slice(-1*e.length+r);null!=(a=o.exec(t));){if(!(n=a[1]||a[2]||a[3]||a[4]||a[5]||a[6]))continue;if(l=[...n].length,a[3]||a[4]){s+=l;continue}
27if((a[5]||a[6])&&r%3&&!((r+l)%3)){i+=l;continue}if((s-=l)>0)continue;l=Math.min(l,l+s+i);let t=[...a[0]][0].length,o=e.slice(0,r+a.index+t+l);if(Math.min(r,l)%2){let e=o.slice(1,-1);return{type:"em",raw:o,text:e,tokens:this.lexer.inlineTokens(e)}}let c=o.slice(2,-2);return{type:"strong",raw:o,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(e),a=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return r&&a&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,r=""){let a=this.rules.inline.delLDelim.exec(e);if(a&&(!a[1]||!r||this.rules.inline.punctuation.exec(r))){let r=[...a[0]].length-1,n,l,s=r,i=this.rules.inline.delRDelim;for(i.lastIndex=0,t=t.slice(-1*e.length+r);null!=(a=i.exec(t));){if(!(n=a[1]||a[2]||a[3]||a[4]||a[5]||a[6])||(l=[...n].length)!==r)continue;if(a[3]||a[4]){s+=l;continue}if((s-=l)>0)continue;l=Math.min(l,l+s);let t=[...a[0]][0].length,i=e.slice(0,r+a.index+t+l),o=i.slice(r,-r);return{type:"del",raw:i,text:o,tokens:this.lexer.inlineTokens(o)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,r;return r="@"===t[2]?"mailto:"+(e=t[1]):e=t[1],{type:"link",raw:t[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,r;if("@"===t[2])r="mailto:"+(e=t[0]);else{let a;do a=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(a!==t[0])e=t[0],r="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:e}}}},eh=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||r,this.options.tokenizer=this.options.tokenizer||new ep,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:s,block:et.normal,inline:er.normal};this.options.pedantic?(t.block=et.pedantic,t.inline=er.pedantic):this.options.gfm&&(t.block=et.gfm,this.options.breaks?t.inline=er.breaks:t.inline=er.gfm),this.tokenizer.rules=t}static get rules(){return{block:et,inline:er}}static lex(t,r){return new e(r).lex(t)}static lexInline(t,r){return new e(r).inlineTokens(t)}lex(e){e=e.replace(s.carriageReturn,` 28`),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],r=!1){for(this.options.pedantic&&(e=e.replace(s.tabCharGlobal," ").replace(s.spaceLine,""));e;){let a;if(this.options.extensions?.block?.some(r=>!!(a=r.call({lexer:this},e,t))&&(e=e.substring(a.raw.length),t.push(a),!0)))continue;if(a=this.tokenizer.space(e)){e=e.substring(a.raw.length);let r=t.at(-1);1===a.raw.length&&void 0!==r?r.raw+=` 29`:t.push(a);continue}if(a=this.tokenizer.code(e)){e=e.substring(a.raw.length);let r=t.at(-1);r?.type==="paragraph"||r?.type==="text"?(r.raw+=(r.raw.endsWith(` 30`)?"":` 31`)+a.raw,r.text+=` 32`+a.text,this.inlineQueue.at(-1).src=r.text):t.push(a);continue}if((a=this.tokenizer.fences(e))||(a=this.tokenizer.heading(e))||(a=this.tokenizer.hr(e))||(a=this.tokenizer.blockquote(e))||(a=this.tokenizer.list(e))||(a=this.tokenizer.html(e))){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.def(e)){e=e.substring(a.raw.length);let r=t.at(-1);r?.type==="paragraph"||r?.type==="text"?(r.raw+=(r.raw.endsWith(` 33`)?"":` 34`)+a.raw,r.text+=` 35`+a.raw,this.inlineQueue.at(-1).src=r.text):this.tokens.links[a.tag]||(this.tokens.links[a.tag]={href:a.href,title:a.title},t.push(a));continue}if((a=this.tokenizer.table(e))||(a=this.tokenizer.lheading(e))){e=e.substring(a.raw.length),t.push(a);continue}let n=e;if(this.options.extensions?.startBlock){let t=1/0,r=e.slice(1),a;
35this.options.extensions.startBlock.forEach(e=>{"number"==typeof(a=e.call({lexer:this},r))&&a>=0&&(t=Math.min(t,a))}),t<1/0&&t>=0&&(n=e.substring(0,t+1))}if(this.state.top&&(a=this.tokenizer.paragraph(n))){let l=t.at(-1);r&&l?.type==="paragraph"?(l.raw+=(l.raw.endsWith(` 36`)?"":` 37`)+a.raw,l.text+=` 38`+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):t.push(a),r=n.length!==e.length,e=e.substring(a.raw.length);continue}if(a=this.tokenizer.text(e)){e=e.substring(a.raw.length);let r=t.at(-1);r?.type==="text"?(r.raw+=(r.raw.endsWith(` 39`)?"":` 40`)+a.raw,r.text+=` 41`+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):t.push(a);continue}if(e){let t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let r,a=e,n=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(n=this.tokenizer.rules.inline.reflinkSearch.exec(a));)e.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(n=this.tokenizer.rules.inline.anyPunctuation.exec(a));)a=a.slice(0,n.index)+"++"+a.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(n=this.tokenizer.rules.inline.blockSkip.exec(a));)r=n[2]?n[2].length:0,a=a.slice(0,n.index+r)+"["+"a".repeat(n[0].length-r-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);a=this.options.hooks?.emStrongMask?.call({lexer:this},a)??a;let l=!1,s="";for(;e;){let r;if(l||(s=""),l=!1,this.options.extensions?.inline?.some(a=>!!(r=a.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0)))continue;if((r=this.tokenizer.escape(e))||(r=this.tokenizer.tag(e))||(r=this.tokenizer.link(e))){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);let a=t.at(-1);"text"===r.type&&a?.type==="text"?(a.raw+=r.raw,a.text+=r.text):t.push(r);continue}if((r=this.tokenizer.emStrong(e,a,s))||(r=this.tokenizer.codespan(e))||(r=this.tokenizer.br(e))||(r=this.tokenizer.del(e,a,s))||(r=this.tokenizer.autolink(e))||!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let n=e;if(this.options.extensions?.startInline){let t=1/0,r=e.slice(1),a;this.options.extensions.startInline.forEach(e=>{"number"==typeof(a=e.call({lexer:this},r))&&a>=0&&(t=Math.min(t,a))}),t<1/0&&t>=0&&(n=e.substring(0,t+1))}if(r=this.tokenizer.inlineText(n)){e=e.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(s=r.raw.slice(-1)),l=!0;let a=t.at(-1);a?.type==="text"?(a.raw+=r.raw,a.text+=r.text):t.push(r);continue}if(e){let t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw Error(t)}}return t}},eu=class{options;parser;constructor(e){this.options=e||r}space(e){return""}code({text:e,lang:t,escaped:r}){let a=(t||"").match(s.notSpaceStart)?.[0],n=e.replace(s.endingNewline,"")+` 42`;return a?'<pre><code class="language-'+el(a)+'">'+(r?n:el(n,!0))+`</code></pre> 43`:"<pre><code>"+(r?n:el(n,!0))+`</code></pre> 44`}blockquote({tokens:e}){return`<blockquote> 45${this.parser.parse(e)}</blockquote> 46`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}> 47`}hr(e){return`<hr> 48`}list(e){let t=e.ordered,r=e.start,a="";for(let t=0;t<e.items.length;t++){let r=e.items[t];a+=this.listitem(r)}let n=t?"ol":"ul";return"<"+n+(t&&1!==r?' start="'+r+'"':"")+`> 49`+a+"</"+n+`> 50`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li> 51`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p> 52`}table(e){let t="",r="";for(let t=0;t<e.header.length;t++)r+=this.tablecell(e.header[t]);t+=this.tablerow({text:r});let a="";for(let t=0;t<e.rows.length;t++){let n=e.rows[t];r="";for(let e=0;e<n.length;e++)r+=this.tablecell(n[e]);a+=this.tablerow({text:r})}return a&&(a=`<tbody>${a}</tbody>`),`<table> 53<thead> 54`+t+`</thead> 55`+a+`</table> 56`}tablerow({text:e}){return`<tr> 57${e}</tr> 58`}tablecell(e){let t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+`</${r}> 59`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${el(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:r}){let a=this.parser.parseInline(r),n=es(e);if(null===n)return a;let l='<a href="'+(e=n)+'"';return t&&(l+=' title="'+el(t)+'"'),l+=">"+a+"</a>"}image({href:e,title:t,text:r,tokens:a}){a&&(r=this.parser.parseInline(a,this.parser.textRenderer));let n=es(e);if(null===n)return el(r);e=n;let l=`<img src="${e}" alt="${el(r)}"`;return t&&(l+=` title="${el(t)}"`),l+=">"}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:el(e.text)}},ed=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},em=class e{options;renderer;textRenderer;constructor(e){this.options=e||r,this.options.renderer=this.options.renderer||new eu,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ed}static parse(t,r){return new e(r).parse(t)}static parseInline(t,r){return new e(r).parseInline(t)}parse(e){let t="";for(let r=0;r<e.length;r++){let a=e[r];if(this.options.extensions?.renderers?.[a.type]){let e=this.options.extensions.renderers[a.type].call({parser:this},a);if(!1!==e||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(a.type)){t+=e||"";continue}}switch(a.type){case"space":t+=this.renderer.space(a);break;case"hr":t+=this.renderer.hr(a);break;case"heading":t+=this.renderer.heading(a);break;case"code":t+=this.renderer.code(a);break;case"table":t+=this.renderer.table(a);break;case"blockquote":t+=this.renderer.blockquote(a);break;case"list":t+=this.renderer.list(a);break;case"checkbox":t+=this.renderer.checkbox(a);break;case"html":t+=this.renderer.html(a);break;case"def":t+=this.renderer.def(a);break;case"paragraph":t+=this.renderer.paragraph(a);break;case"text":t+=this.renderer.text(a);break;default:{let e='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw Error(e)}}}return t}parseInline(e,t=this.renderer){let r="";for(let a=0;a<e.length;a++){let n=e[a];if(this.options.extensions?.renderers?.[n.type]){let e=this.options.extensions.renderers[n.type].call({parser:this},n);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(n.t
59ype)){r+=e||"";continue}}switch(n.type){case"escape":case"text":r+=t.text(n);break;case"html":r+=t.html(n);break;case"link":r+=t.link(n);break;case"image":r+=t.image(n);break;case"checkbox":r+=t.checkbox(n);break;case"strong":r+=t.strong(n);break;case"em":r+=t.em(n);break;case"codespan":r+=t.codespan(n);break;case"br":r+=t.br(n);break;case"del":r+=t.del(n);break;default:{let e='Token with "'+n.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw Error(e)}}}return r}},eg=class{options;block;constructor(e){this.options=e||r}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?eh.lex:eh.lexInline}provideParser(){return this.block?em.parse:em.parseInline}},ex=new class{defaults=t();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=em;Renderer=eu;TextRenderer=ed;Lexer=eh;Tokenizer=ep;Hooks=eg;constructor(...e){this.use(...e)}walkTokens(e,t){let r=[];for(let a of e)switch(r=r.concat(t.call(this,a)),a.type){case"table":for(let e of a.header)r=r.concat(this.walkTokens(e.tokens,t));for(let e of a.rows)for(let a of e)r=r.concat(this.walkTokens(a.tokens,t));break;case"list":r=r.concat(this.walkTokens(a.items,t));break;default:{let e=a;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(a=>{let n=e[a].flat(1/0);r=r.concat(this.walkTokens(n,t))}):e.tokens&&(r=r.concat(this.walkTokens(e.tokens,t)))}}return r}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let r={...e};if(r.async=this.defaults.async||r.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error("extension name required");if("renderer"in e){let r=t.renderers[e.name];r?t.renderers[e.name]=function(...t){let a=e.renderer.apply(this,t);return!1===a&&(a=r.apply(this,t)),a}:t.renderers[e.name]=e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw Error("extension level must be 'block' or 'inline'");let r=t[e.level];r?r.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),r.extensions=t),e.renderer){let t=this.defaults.renderer||new eu(this.defaults);for(let r in e.renderer){if(!(r in t))throw Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;let a=e.renderer[r],n=t[r];t[r]=(...e)=>{let r=a.apply(t,e);return!1===r&&(r=n.apply(t,e)),r||""}}r.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new ep(this.defaults);for(let r in e.tokenizer){if(!(r in t))throw Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;let a=e.tokenizer[r],n=t[r];t[r]=(...e)=>{let r=a.apply(t,e);return!1===r&&(r=n.apply(t,e)),r}}r.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new eg;for(let r in e.hooks){if(!(r in t))throw Error(`hook '${r}' does not exist`);if(["options","block"].includes(r))continue;let a=e.hooks[r],n=t[r];eg.passThroughHooks.has(r)?t[r]=e=>{if(this.defaults.async&&eg.passThroughHooksRespectAsync.has(r))return(async()=>{let r=await a.call(t,e);return n.call(t,r)})();let l=a.call(t,e);return n.call(t,l)}:t[r]=(...e)=>{if(this.defaults.async)return(async()=>{let r=await a.apply(t,e);return!1===r&&(r=await n.apply(t,e)),r})();let r=a.apply(t,e);return!1===r&&(r=n.apply(t,e)),r}}r.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,a=e.walkTokens;r.walkTokens=function(e){let r=[];return r.push(a.call(this,e)),t&&(r=r.concat(t.call(this,e))),r}}this.defaults={...this.defaults,...r}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return eh.lex(e,t??this.defaults)}parser(e,t){return em.parse(e,t??this.defaults)}parseMarkdown(e){return(t,r)=>{let a={...r},n={...this.defaults,...a},l=this.onError(!!n.silent,!!n.async);if(!0===this.defaults.async&&!1===a.async)return l(Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||null===t)return l(Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return l(Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(n.hooks&&(n.hooks.options=n,n.hooks.block=e),n.async)return(async()=>{let r=n.hooks?await n.hooks.preprocess(t):t,a=await (n.hooks?await n.hooks.provideLexer():e?eh.lex:eh.lexInline)(r,n),l=n.hooks?await n.hooks.processAllTokens(a):a;n.walkTokens&&await Promise.all(this.walkTokens(l,n.walkTokens));let s=await (n.hooks?await n.hooks.provideParser():e?em.parse:em.parseInline)(l,n);return n.hooks?await n.hooks.postprocess(s):s})().catch(l);try{n.hooks&&(t=n.hooks.preprocess(t));let r=(n.hooks?n.hooks.provideLexer():e?eh.lex:eh.lexInline)(t,n);n.hooks&&(r=n.hooks.processAllTokens(r)),n.walkTokens&&this.walkTokens(r,n.walkTokens);let a=(n.hooks?n.hooks.provideParser():e?em.parse:em.parseInline)(r,n);return n.hooks&&(a=n.hooks.postprocess(a)),a}catch(e){return l(e)}}}onError(e,t){return r=>{if(r.message+=` 60Please report this to https://github.com/markedjs/marked.`,e){let e="<p>An error occurred:</p><pre>"+el(r.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(r);throw r}}};function eb(e,t){return ex.parse(e,t)}eb.options=eb.setOptions=function(e){return ex.setOptions(e),eb.defaults=ex.defaults,r
60=eb.defaults,eb},eb.getDefaults=t,eb.defaults=r,eb.use=function(...e){return ex.use(...e),eb.defaults=ex.defaults,r=eb.defaults,eb},eb.walkTokens=function(e,t){return ex.walkTokens(e,t)},eb.parseInline=ex.parseInline,eb.Parser=em,eb.parser=em.parse,eb.Renderer=eu,eb.TextRenderer=ed,eb.Lexer=eh,eb.lexer=eh.lex,eb.Tokenizer=ep,eb.Hooks=eg,eb.parse=eb,eb.options,eb.setOptions,eb.use,eb.walkTokens,eb.parseInline,em.parse,eh.lex;var ef=e.i(884421);eb.setOptions({gfm:!0,breaks:!0}),e.s(["renderContent",0,function(e){if(!e?.trim())return{html:"",format:"plaintext"};let t=e?.trim()?/<(?:p|h[1-6]|ul|ol|blockquote|div|table)\b/i.test(e)?"html":/^#{1,6}\s|^\*\s|^-\s|^\d+\.\s|\*\*.+\*\*|__.+__|\[.+\]\(.+\)|^>\s/m.test(e)?"markdown":"plaintext":"plaintext";switch(t){case"html":return{html:(0,ef.sanitizeHtml)(e),format:t};case"markdown":{let r=eb.parse(e);return{html:(0,ef.sanitizeHtml)(r),format:t}}case"plaintext":{let r=e.split("\n").filter(Boolean).map(e=>`<p>${e}</p>`).join("");return{html:(0,ef.sanitizeHtml)(r),format:t}}}}],831387)}]); 61 62//# debugId=dd49a50e-b19c-d673-f318-d78e7ca65f4b
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.