1import{j as i}from"./query-zKe4mOlO.js";import{B as ve,Y as Et,C as me,a as xe,b as he,c as ye,n as K,I as de,h as Tt,N as It}from"./index-b3SWkXql.js";import{R as $,r as Ae}from"./vendor-BV72JwGM.js";import{T as Me}from"./textarea-eQE_CzYA.js";import{S as Pt,a as Rt,b as Mt,c as Ot,d as Lt}from"./select-ziSDwp_c.js";import{S as _e,a as Ut}from"./separator-BzmaUWd5.js";import{D as Bt,f as $t,a as qt}from"./dialog-CdE15XCJ.js";import{P as Wt}from"./printer-B8AMhorV.js";import{D as Ht}from"./download-zZeKFQ4R.js";import{f as Le}from"./format-CH0aeClC.js";import{E as zt}from"./eye-BYPaI2AD.js";import{F as Gt}from"./file-text-pFI7E5Qu.js";import{T as Kt,P as Qt}from"./trash-2-BY2em3V9.js";import"./index-BdQq_4o_.js";import"./index-BcFqJv69.js";import"./index-BSNYq_IR.js";import"./check-iA5WZ6OB.js";import"./en-US-CyrGnweX.js";import"./index-DHSHSWAQ.js";var Ne=e=>e.type==="checkbox",le=e=>e instanceof Date,O=e=>e==null;const ht=e=>typeof e=="object";var E=e=>!O(e)&&!Array.isArray(e)&&ht(e)&&!le(e),Yt=e=>E(e)&&e.target?Ne(e.target)?e.target.checked:e.target.value:e,Jt=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Xt=(e,s)=>e.has(Jt(s)),Zt=e=>{const s=e.constructor&&e.constructor.prototype;return E(s)&&s.hasOwnProperty("isPrototypeOf")},Be=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function P(e){let s;const r=Array.isArray(e),n=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)s=new Date(e);else if(!(Be&&(e instanceof Blob||n))&&(r||E(e)))if(s=r?[]:{},!r&&!Zt(e))s=e;else for(const c in e)e.hasOwnProperty(c)&&(s[c]=P(e[c]));else return e;return s}var Ce=e=>/^\w*$/.test(e),I=e=>e===void 0,$e=e=>Array.isArray(e)?e.filter(Boolean):[],qe=e=>$e(e.replace(/["|']|\]/g,"").split(/\.|\[/)),h=(e,s,r)=>{if(!s||!E(e))return r;const n=(Ce(s)?[s]:qe(s)).reduce((c,o)=>O(c)?c:c[o],e);return I(n)||n===e?I(e[s])?r:e[s]:n},ee=e=>typeof e=="boolean",_=(e,s,r)=>{let n=-1;const c=Ce(s)?[s]:qe(s),o=c.length,m=o-1;for(;++n<o;){const x=c[n];let S=r;if(n!==m){const z=e[x];S=E(z)||Array.isArray(z)?z:isNaN(+c[n+1])?{}:[]}if(x==="__proto__"||x==="constructor"||x==="prototype")return;e[x]=S,e=e[x]}};const st={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Q={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},se={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},es=$.createContext(null);es.displayName="HookFormContext";var ts=(e,s,r,n=!0)=>{const c={defaultValues:s._defaultValues};for(const o in e)Object.defineProperty(c,o,{get:()=>{const m=o;return s._proxyFormState[m]!==Q.all&&(s._proxyFormState[m]=!n||Q.all),e[m]}});return c};const ss=typeof window<"u"?$.useLayoutEffect:$.useEffect;var te=e=>typeof e=="string",rs=(e,s,r,n,c)=>te(e)?(n&&s.watch.add(e),h(r,e,c)):Array.isArray(e)?e.map(o=>(n&&s.watch.add(o),h(r,o))):(n&&(s.watchAll=!0),r),Ue=e=>O(e)||!ht(e);function ae(e,s,r=new WeakSet){if(Ue(e)||Ue(s))return e===s;if(le(e)&&le(s))return e.getTime()===s.getTime();const n=Object.keys(e),c=Object.keys(s);if(n.length!==c.length)return!1;if(r.has(e)||r.has(s))return!0;r.add(e),r.add(s);for(const o of n){const m=e[o];if(!c.includes(o))return!1;if(o!=="ref"){const x=s[o];if(le(m)&&le(x)||E(m)&&E(x)||Array.isArray(m)&&Array.isArray(x)?!ae(m,x,r):m!==x)return!1}}return!0}var is=(e,s,r,n,c)=>s?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:c||!0}}:{},be=e=>Array.isArray(e)?e:[e],rt=()=>{let e=[];return{get observers(){return e},next:c=>{for(const o of e)o.next&&o.next(c)},subscribe:c=>(e.push(c),{unsubscribe:()=>{e=e.filter(o=>o!==c)}}),unsubscribe:()=>{e=[]}}},B=e=>E(e)&&!Object.keys(e).length,We=e=>e.type==="file",Y=e=>typeof e=="function",De=e=>{if(!Be)return!1;const s=e?e.ownerDocument:0;return e instanceof(s&&s.defaultView?s.defaultView.HTMLElement:HTMLElement)},yt=e=>e.type==="select-multiple",He=e=>e.type==="radio",as=e=>He(e)||Ne(e),Oe=e=>De(e)&&e.isConnected;function ns(e,s){const r=s.slice(0,-1).length;let n=0;for(;n<r;)e=I(e)?n++:e[s[n++]];return e}function ls(e){for(const s in e)if(e.hasOwnProperty(s)&&!I(e[s]))return!1;return!0}function T(e,s){const r=Array.isArray(s)?s:Ce(s)?[s]:qe(s),n=r.length===1?e:ns(e,r),c=r.length-1,o=r[c];return n&&delete n[o],c!==0&&(E(n)&&B(n)||Array.isArray(n)&&ls(n))&&T(e,r.slice(0,-1)),e}var gt=e=>{for(const s in e)if(Y(e[s]))return!0;return!1};function Se(e,s={}){const r=Array.isArray(e);if(E(e)||r)for(const n in e)Array.isArray(e[n])||E(e[n])&&!gt(e[n])?(s[n]=Array.isArray(e[n])?[]:{}
vendor: 6,105 bytes, line 1
1,Se(e[n],s[n])):O(e[n])||(s[n]=!0);return s}function pt(e,s,r){const n=Array.isArray(e);if(E(e)||n)for(const c in e)Array.isArray(e[c])||E(e[c])&&!gt(e[c])?I(s)||Ue(r[c])?r[c]=Array.isArray(e[c])?Se(e[c],[]):{...Se(e[c])}:pt(e[c],O(s)?{}:s[c],r[c]):r[c]=!ae(e[c],s[c]);return r}var ge=(e,s)=>pt(e,s,Se(s));const it={value:!1,isValid:!1},at={value:!0,isValid:!0};var vt=e=>{if(Array.isArray(e)){if(e.length>1){const s=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:s,isValid:!!s.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!I(e[0].attributes.value)?I(e[0].value)||e[0].value===""?at:{value:e[0].value,isValid:!0}:at:it}return it},bt=(e,{valueAsNumber:s,valueAsDate:r,setValueAs:n})=>I(e)?e:s?e===""?NaN:e&&+e:r&&te(e)?new Date(e):n?n(e):e;const nt={isValid:!1,value:null};var jt=e=>Array.isArray(e)?e.reduce((s,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:s,nt):nt;function lt(e){const s=e.ref;return We(s)?s.files:He(s)?jt(e.refs).value:yt(s)?[...s.selectedOptions].map(({value:r})=>r):Ne(s)?vt(e.refs).value:bt(I(s.value)?e.ref.value:s.value,e)}var os=(e,s,r,n)=>{const c={};for(const o of e){const m=h(s,o);m&&_(c,o,m._f)}return{criteriaMode:r,names:[...e],fields:c,shouldUseNativeValidation:n}},ke=e=>e instanceof RegExp,pe=e=>I(e)?e:ke(e)?e.source:E(e)?ke(e.value)?e.value.source:e.value:e,ot=e=>({isOnSubmit:!e||e===Q.onSubmit,isOnBlur:e===Q.onBlur,isOnChange:e===Q.onChange,isOnAll:e===Q.all,isOnTouch:e===Q.onTouched});const ct="AsyncFunction";var cs=e=>!!e&&!!e.validate&&!!(Y(e.validate)&&e.validate.constructor.name===ct||E(e.validate)&&Object.values(e.validate).find(s=>s.constructor.name===ct)),ds=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),dt=(e,s,r)=>!r&&(s.watchAll||s.watch.has(e)||[...s.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const je=(e,s,r,n)=>{for(const c of r||Object.keys(e)){const o=h(e,c);if(o){const{_f:m,...x}=o;if(m){if(m.refs&&m.refs[0]&&s(m.refs[0],c)&&!n)return!0;if(m.ref&&s(m.ref,m.name)&&!n)return!0;if(je(x,s))break}else if(E(x)&&je(x,s))break}}};function ut(e,s,r){const n=h(e,r);if(n||Ce(r))return{error:n,name:r};const c=r.split(".");for(;c.length;){const o=c.join("."),m=h(s,o),x=h(e,o);if(m&&!Array.isArray(m)&&r!==o)return{name:r};if(x&&x.type)return{name:o,error:x};if(x&&x.root&&x.root.type)return{name:`${o}.root`,error:x.root};c.pop()}return{name:r}}var us=(e,s,r,n)=>{r(e);const{name:c,...o}=e;return B(o)||Object.keys(o).length>=Object.keys(s).length||Object.keys(o).find(m=>s[m]===(!n||Q.all))},fs=(e,s,r)=>!e||!s||e===s||be(e).some(n=>n&&(r?n===s:n.startsWith(s)||s.startsWith(n))),ms=(e,s,r,n,c)=>c.isOnAll?!1:!r&&c.isOnTouch?!(s||e):(r?n.isOnBlur:c.isOnBlur)?!e:(r?n.isOnChange:c.isOnChange)?e:!0,xs=(e,s)=>!$e(h(e,s)).length&&T(e,s),hs=(e,s,r)=>{const n=be(h(e,r));return _(n,"root",s[r]),_(e,r,n),e},Ve=e=>te(e);function ft(e,s,r="validate"){if(Ve(e)||Array.isArray(e)&&e.every(Ve)||ee(e)&&!e)return{type:r,message:Ve(e)?e:"",ref:s}}var ue=e=>E(e)&&!ke(e)?e:{value:e,message:""},mt=async(e,s,r,n,c,o)=>{const{ref:m,refs:x,required:S,maxLength:z,minLength:F,min:D,max:p,pattern:re,validate:J,name:V,valueAsNumber:q,mount:oe}=e._f,v=h(r,V);if(!oe||s.has(V))return{};const G=x?x[0]:m,W=b=>{c&&G.reportValidity&&(G.setCustomValidity(ee(b)?"":b||""),G.reportValidity())},y={},k=He(m),j=Ne(m),R=k||j,L=(q||We(m))&&I(m.value)&&I(v)||De(m)&&m.value===""||v===""||Array.isArray(v)&&!v.length,ne=is.bind(null,V,n,y),X=(b,w,C,M=se.maxLength,U=se.minLength)=>{const Z=b?w:C;y[V]={type:b?M:U,message:Z,ref:m,...ne(b?M:U,Z)}};if(o?!Array.isArray(v)||!v.length:S&&(!R&&(L||O(v))||ee(v)&&!v||j&&!vt(x).isValid||k&&!jt(x).isValid)){const{value:b,message:w}=Ve(S)?{value:!!S,message:S}:ue(S);if(b&&(y[V]={type:se.required,message:w,ref:G,...ne(se.required,w)},!n))return W(w),y}if(!L&&(!O(D)||!O(p))){let b,w;const C=ue(p),M=ue(D);if(!O(v)&&!isNaN(v)){const U=m.valueAsNumber||v&&+v;O(C.value)||(b=U>C.value),O(M.value)||(w=U<M.value)}else{const U=m.valueAsDate||new Date(v),Z=we=>new Date(new Date().toDateString()+" "+we),fe=m.type=="time",ce=m.type=="week";te(C.value)&&v&&(b=fe?Z(v)>Z(C.value):ce?v>C.value:U>new Date(C.value)),te(M.value)&&v&&(w=fe?Z(v)<Z(M.value):ce?v<M.value:U<new Date(M.value))}if((b||w)&&(X(!!b,C.message,M.message,se.max,se.min),!n))return W(y[V].message),y}if((z||F)&&!L&&(te(v)||o&&Array.isArray(v))){const b=ue(z),w=ue(F),C=!O(b.value)&&v.length>+b.value,M=!O(w.value)&&v.length<+w.value;if((C||M)&&(X(C,b.message,w.message),!n))return W(y[V].message),y}if(re&&!L&&te(v)){const{value:b,message:w}=ue(re);if(ke(b)&&!v.match(b)&&(y[V]={type:se.pattern,message:w,ref:m,...ne(se.pattern,w)},!n))return W(w),y}if(J){if(Y(J)){const b=await J(v,r),w=ft(b,G);if(w&&(y[V]={...w,...ne(se.validate,w.message)},!n))return W(w.message),y}else if(E(J)){let b={};for(const w in J){if(!B(b)&&!n)break;const C=ft(await J[w](v,r),G,w);C&&(b={...C,...ne(w,C.message)},W(C.message),n&&(y[V]=b))}if(!B(b)&&(y[V]={ref:G,...b},!n))return y}}return W(!0),y};const ys={mode:Q.onSubmit,reValidateMode:Q.onChange,shouldFocusError:!0};function gs(e={}){let s={...ys,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:Y(s.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:s.errors||{},disabled:s.disabled||!1},n={},c=E(s.defaultValues)||E(s.values)?P(s.defaultValues||s.values)||{}:{},o=s.shouldUnregister?{}:P(c),m={action:!1,mount:!1,watch:!1},x={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},S,z=0;const F={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let D={...F};const p={array:rt(),state:rt()},re=s.criteriaMode===Q.all,J=t=>a=>{clearTimeout(z),z=setTimeout(t,a)},V=async t=>{if(!s.disabled&&(F.isValid||D.isValid||t)){const a=s.resolver?B((await j()).errors):await L(n,!0);a!==r.isValid&&p.state.next({isValid:a})}},q=(t,a)=>{!s.disabled&&(F.isValidating||F.validatingFields||D.isValidating||D.validatingFields)&&((t||Array.from(x.mount)).forEac
1h(l=>{l&&(a?_(r.validatingFields,l,a):T(r.validatingFields,l))}),p.state.next({validatingFields:r.validatingFields,isValidating:!B(r.validatingFields)}))},oe=(t,a=[],l,f,u=!0,d=!0)=>{if(f&&l&&!s.disabled){if(m.action=!0,d&&Array.isArray(h(n,t))){const g=l(h(n,t),f.argA,f.argB);u&&_(n,t,g)}if(d&&Array.isArray(h(r.errors,t))){const g=l(h(r.errors,t),f.argA,f.argB);u&&_(r.errors,t,g),xs(r.errors,t)}if((F.touchedFields||D.touchedFields)&&d&&Array.isArray(h(r.touchedFields,t))){const g=l(h(r.touchedFields,t),f.argA,f.argB);u&&_(r.touchedFields,t,g)}(F.dirtyFields||D.dirtyFields)&&(r.dirtyFields=ge(c,o)),p.state.next({name:t,isDirty:X(t,a),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else _(o,t,a)},v=(t,a)=>{_(r.errors,t,a),p.state.next({errors:r.errors})},G=t=>{r.errors=t,p.state.next({errors:r.errors,isValid:!1})},W=(t,a,l,f)=>{const u=h(n,t);if(u){const d=h(o,t,I(l)?h(c,t):l);I(d)||f&&f.defaultChecked||a?_(o,t,a?d:lt(u._f)):C(t,d),m.mount&&V()}},y=(t,a,l,f,u)=>{let d=!1,g=!1;const N={name:t};if(!s.disabled){if(!l||f){(F.isDirty||D.isDirty)&&(g=r.isDirty,r.isDirty=N.isDirty=X(),d=g!==N.isDirty);const A=ae(h(c,t),a);g=!!h(r.dirtyFields,t),A?T(r.dirtyFields,t):_(r.dirtyFields,t,!0),N.dirtyFields=r.dirtyFields,d=d||(F.dirtyFields||D.dirtyFields)&&g!==!A}if(l){const A=h(r.touchedFields,t);A||(_(r.touchedFields,t,l),N.touchedFields=r.touchedFields,d=d||(F.touchedFields||D.touchedFields)&&A!==l)}d&&u&&p.state.next(N)}return d?N:{}},k=(t,a,l,f)=>{const u=h(r.errors,t),d=(F.isValid||D.isValid)&&ee(a)&&r.isValid!==a;if(s.delayError&&l?(S=J(()=>v(t,l)),S(s.delayError)):(clearTimeout(z),S=null,l?_(r.errors,t,l):T(r.errors,t)),(l?!ae(u,l):u)||!B(f)||d){const g={...f,...d&&ee(a)?{isValid:a}:{},errors:r.errors,name:t};r={...r,...g},p.state.next(g)}},j=async t=>{q(t,!0);const a=await s.resolver(o,s.context,os(t||x.mount,n,s.criteriaMode,s.shouldUseNativeValidation));return q(t),a},R=async t=>{const{errors:a}=await j(t);if(t)for(const l of t){const f=h(a,l);f?_(r.errors,l,f):T(r.errors,l)}else r.errors=a;return a},L=async(t,a,l={valid:!0})=>{for(const f in t){const u=t[f];if(u){const{_f:d,...g}=u;if(d){const N=x.array.has(d.name),A=u._f&&cs(u._f);A&&F.validatingFields&&q([f],!0);const H=await mt(u,x.disabled,o,re,s.shouldUseNativeValidation&&!a,N);if(A&&F.validatingFields&&q([f]),H[d.name]&&(l.valid=!1,a))break;!a&&(h(H,d.name)?N?hs(r.errors,H,d.name):_(r.errors,d.name,H[d.name]):T(r.errors,d.name))}!B(g)&&await L(g,a,l)}}return l.valid},ne=()=>{for(const t of x.unMount){const a=h(n,t);a&&(a._f.refs?a._f.refs.every(l=>!Oe(l)):!Oe(a._f.ref))&&Ee(t)}x.unMount=new Set},X=(t,a)=>!s.disabled&&(t&&a&&_(o,t,a),!ae(we(),c)),b=(t,a,l)=>rs(t,x,{...m.mount?o:I(a)?c:te(t)?{[t]:a}:a},l,a),w=t=>$e(h(m.mount?o:c,t,s.shouldUnregister?h(c,t,[]):[])),C=(t,a,l={})=>{const f=h(n,t);let u=a;if(f){const d=f._f;d&&(!d.disabled&&_(o,t,bt(a,d)),u=De(d.ref)&&O(a)?"":a,yt(d.ref)?[...d.ref.options].forEach(g=>g.selected=u.includes(g.value)):d.refs?Ne(d.ref)?d.refs.forEach(g=>{(!g.defaultChecked||!g.disabled)&&(Array.isArray(u)?g.checked=!!u.find(N=>N===g.value):g.checked=u===g.value||!!u)}):d.refs.forEach(g=>g.checked=g.value===u):We(d.ref)?d.ref.value="":(d.ref.value=u,d.ref.type||p.state.next({name:t,values:P(o)})))}(l.shouldDirty||l.shouldTouch)&&y(t,u,l.shouldTouch,l.shouldDirty,!0),l.shouldValidate&&ce(t)},M=(t,a,l)=>{for(const f in a){if(!a.hasOwnProperty(f))return;const u=a[f],d=t+"."+f,g=h(n,d);(x.array.has(t)||E(u)||g&&!g._f)&&!le(u)?M(d,u,l):C(d,u,l)}},U=(t,a,l={})=>{const f=h(n,t),u=x.array.has(t),d=P(a);_(o,t,d),u?(p.array.next({name:t,values:P(o)}),(F.isDirty||F.dirtyFields||D.isDirty||D.dirtyFields)&&l.shouldDirty&&p.state.next({name:t,dirtyFields:ge(c,o),isDirty:X(t,d)})):f&&!f._f&&!O(d)?M(t,d,l):C(t,d,l),dt(t,x)&&p.state.next({...r,name:t}),p.state.next({name:m.mount?t:void 0,values:P(o)})},Z=async t=>{m.mount=!0;const a=t.target;let l=a.name,f=!0;const u=h(n,l),d=A=>{f=Number.isNaN(A)||le(A)&&isNaN(A.getTime())||ae(A,h(o,l,A))},g=ot(s.mode),N=ot(s.reValidateMode);if(u){let A,H;const Fe=a.type?lt(u._f):Yt(t),ie=t.type===st.BLUR||t.type===st.FOCUS_OUT,St=!ds(u._f)&&!s.resolver&&!h(r.errors,l)&&!u._f.deps||ms(ie,h(r.touchedFields,l),r.isSubmitted,N,g),Pe=dt(l,x,ie);_(o,l,Fe),ie?(u._f.onBlur&&u._f.onBlur(t),S&&S(0)):u._f.onChange&&u._f.onChange(t);const Re=y(l,Fe,ie),kt=!B(Re)||Pe;if(!ie&&p.state.next({name:l,type:t.type,values:P(o)}),St)return(F.isValid||D.isValid)&&(s.mode==="onBlur"?ie&&V():ie||V()),kt&&p.state.next({name:l,...Pe?{}:Re});if(!ie&&Pe&&p.state.next({...r}),s.resolver){const{errors:et}=await j([l]);if(d(Fe),f){const Ct=ut(r.errors,n,l),tt=ut(et,n,Ct.name||l);
vendor: 4,400 bytes, line 1
1A=tt.error,l=tt.name,H=B(et)}}else q([l],!0),A=(await mt(u,x.disabled,o,re,s.shouldUseNativeValidation))[l],q([l]),d(Fe),f&&(A?H=!1:(F.isValid||D.isValid)&&(H=await L(n,!0)));f&&(u._f.deps&&ce(u._f.deps),k(l,H,A,Re))}},fe=(t,a)=>{if(h(r.errors,a)&&t.focus)return t.focus(),1},ce=async(t,a={})=>{let l,f;const u=be(t);if(s.resolver){const d=await R(I(t)?t:u);l=B(d),f=t?!u.some(g=>h(d,g)):l}else t?(f=(await Promise.all(u.map(async d=>{const g=h(n,d);return await L(g&&g._f?{[d]:g}:g)}))).every(Boolean),!(!f&&!r.isValid)&&V()):f=l=await L(n);return p.state.next({...!te(t)||(F.isValid||D.isValid)&&l!==r.isValid?{}:{name:t},...s.resolver||!t?{isValid:l}:{},errors:r.errors}),a.shouldFocus&&!f&&je(n,fe,t?u:x.mount),f},we=t=>{const a={...m.mount?o:c};return I(t)?a:te(t)?h(a,t):t.map(l=>h(a,l))},ze=(t,a)=>({invalid:!!h((a||r).errors,t),isDirty:!!h((a||r).dirtyFields,t),error:h((a||r).errors,t),isValidating:!!h(r.validatingFields,t),isTouched:!!h((a||r).touchedFields,t)}),Nt=t=>{t&&be(t).forEach(a=>T(r.errors,a)),p.state.next({errors:t?r.errors:{}})},Ge=(t,a,l)=>{const f=(h(n,t,{_f:{}})._f||{}).ref,u=h(r.errors,t)||{},{ref:d,message:g,type:N,...A}=u;_(r.errors,t,{...A,...a,ref:f}),p.state.next({name:t,errors:r.errors,isValid:!1}),l&&l.shouldFocus&&f&&f.focus&&f.focus()},wt=(t,a)=>Y(t)?p.state.subscribe({next:l=>"values"in l&&t(b(void 0,a),l)}):b(t,a,!0),Ke=t=>p.state.subscribe({next:a=>{fs(t.name,a.name,t.exact)&&us(a,t.formState||F,Dt,t.reRenderRoot)&&t.callback({values:{...o},...r,...a,defaultValues:c})}}).unsubscribe,Ft=t=>(m.mount=!0,D={...D,...t.formState},Ke({...t,formState:D})),Ee=(t,a={})=>{for(const l of t?be(t):x.mount)x.mount.delete(l),x.array.delete(l),a.keepValue||(T(n,l),T(o,l)),!a.keepError&&T(r.errors,l),!a.keepDirty&&T(r.dirtyFields,l),!a.keepTouched&&T(r.touchedFields,l),!a.keepIsValidating&&T(r.validatingFields,l),!s.shouldUnregister&&!a.keepDefaultValue&&T(c,l);p.state.next({values:P(o)}),p.state.next({...r,...a.keepDirty?{isDirty:X()}:{}}),!a.keepIsValid&&V()},Qe=({disabled:t,name:a})=>{(ee(t)&&m.mount||t||x.disabled.has(a))&&(t?x.disabled.add(a):x.disabled.delete(a))},Te=(t,a={})=>{let l=h(n,t);const f=ee(a.disabled)||ee(s.disabled);return _(n,t,{...l||{},_f:{...l&&l._f?l._f:{ref:{name:t}},name:t,mount:!0,...a}}),x.mount.add(t),l?Qe({disabled:ee(a.disabled)?a.disabled:s.disabled,name:t}):W(t,!0,a.value),{...f?{disabled:a.disabled||s.disabled}:{},...s.progressive?{required:!!a.required,min:pe(a.min),max:pe(a.max),minLength:pe(a.minLength),maxLength:pe(a.maxLength),pattern:pe(a.pattern)}:{},name:t,onChange:Z,onBlur:Z,ref:u=>{if(u){Te(t,a),l=h(n,t);const d=I(u.value)&&u.querySelectorAll&&u.querySelectorAll("input,select,textarea")[0]||u,g=as(d),N=l._f.refs||[];if(g?N.find(A=>A===d):d===l._f.ref)return;_(n,t,{_f:{...l._f,...g?{refs:[...N.filter(Oe),d,...Array.isArray(h(c,t))?[{}]:[]],ref:{type:d.type,name:t}}:{ref:d}}}),W(t,!1,void 0,d)}else l=h(n,t,{}),l._f&&(l._f.mount=!1),(s.shouldUnregister||a.shouldUnregister)&&!(Xt(x.array,t)&&m.action)&&x.unMount.add(t)}}},Ie=()=>s.shouldFocusError&&je(n,fe,x.mount),At=t=>{ee(t)&&(p.state.next({disabled:t}),je(n,(a,l)=>{const f=h(n,l);f&&(a.disabled=f._f.disabled||t,Array.isArray(f._f.refs)&&f._f.refs.forEach(u=>{u.disabled=f._f.disabled||t}))},0,!1))},Ye=(t,a)=>async l=>{let f;l&&(l.preventDefault&&l.preventDefault(),l.persist&&l.persist());let u=P(o);if(p.state.next({isSubmitting:!0}),s.resolver){const{errors:d,values:g}=await j();r.errors=d,u=P(g)}else await L(n);if(x.disabled.size)for(const d of x.disabled)T(u,d);if(T(r.errors,"root"),B(r.errors)){p.state.next({errors:{}});try{await t(u,l)}catch(d){f=d}}else a&&await a({...r.errors},l),Ie(),setTimeout(Ie);if(p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:B(r.errors)&&!f,submitCount:r.submitCount+1,errors:r.errors}),f)throw f},Vt=(t,a={})=>{h(n,t)&&(I(a.defaultValue)?U(t,P(h(c,t))):(U(t,a.defaultValue),_(c,t,P(a.defaultValue))),a.keepTouched||T(r.touchedFields,t),a.keepDirty||(T(r.dirtyFields,t),r.isDirty=a.defaultValue?X(t,P(h(c,t))):X()),a.keepError||(T(r.errors,t),F.isValid&&V()),p.state.next({...r}))},Je=(t,a={})=>{const l=t?P(t):c,f=P(l),u=B(t),d=u?c:f;if(a.keepDefaultValues||(c=l),!a.keepValues){if(a.keepDirtyValues){const g=new Set([...x.mount,...Object.keys(ge(c,o))]);for(const N of Array.from(g))h(r.dirtyFields,N)?_(d,N,h(o,N)):U(N,h(d,N))}else{if(Be&&I(t))for(const g of x.mount){const N=h(n,g);
1if(N&&N._f){const A=Array.isArray(N._f.refs)?N._f.refs[0]:N._f.ref;if(De(A)){const H=A.closest("form");if(H){H.reset();break}}}}if(a.keepFieldsRef)for(const g of x.mount)U(g,h(d,g));else n={}}o=s.shouldUnregister?a.keepDefaultValues?P(c):{}:P(d),p.array.next({values:{...d}}),p.state.next({values:{...d}})}x={mount:a.keepDirtyValues?x.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},m.mount=!F.isValid||!!a.keepIsValid||!!a.keepDirtyValues,m.watch=!!s.shouldUnregister,p.state.next({submitCount:a.keepSubmitCount?r.submitCount:0,isDirty:u?!1:a.keepDirty?r.isDirty:!!(a.keepDefaultValues&&!ae(t,c)),isSubmitted:a.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:u?{}:a.keepDirtyValues?a.keepDefaultValues&&o?ge(c,o):r.dirtyFields:a.keepDefaultValues&&t?ge(c,t):a.keepDirty?r.dirtyFields:{},touchedFields:a.keepTouched?r.touchedFields:{},errors:a.keepErrors?r.errors:{},isSubmitSuccessful:a.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},Xe=(t,a)=>Je(Y(t)?t(o):t,a),_t=(t,a={})=>{const l=h(n,t),f=l&&l._f;if(f){const u=f.refs?f.refs[0]:f.ref;u.focus&&(u.focus(),a.shouldSelect&&Y(u.select)&&u.select())}},Dt=t=>{r={...r,...t}},Ze={control:{register:Te,unregister:Ee,getFieldState:ze,handleSubmit:Ye,setError:Ge,_subscribe:Ke,_runSchema:j,_focusError:Ie,_getWatch:b,_getDirty:X,_setValid:V,_setFieldArray:oe,_setDisabledField:Qe,_setErrors:G,_getFieldArray:w,_reset:Je,_resetDefaultValues:()=>Y(s.defaultValues)&&s.defaultValues().then(t=>{Xe(t,s.resetOptions),p.state.next({isLoading:!1})}),_removeUnmounted:ne,_disableForm:At,_subjects:p,_proxyFormState:F,get _fields(){return n},get _formValues(){return o},get _state(){return m},set _state(t){m=t},get _defaultValues(){return c},get _names(){return x},set _names(t){x=t},get _formState(){return r},get _options(){return s},set _options(t){s={...s,...t}}},subscribe:Ft,trigger:ce,register:Te,handleSubmit:Ye,watch:wt,setValue:U,getValues:we,reset:Xe,resetField:Vt,clearErrors:Nt,unregister:Ee,setError:Ge,setFocus:_t,getFieldState:ze};return{...Ze,formControl:Ze}}function ps(e={}){const s=$.useRef(void 0),r=$.useRef(void 0),[n,c]=$.useState({isDirty:!1,isValidating:!1,isLoading:Y(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:Y(e.defaultValues)?void 0:e.defaultValues});if(!s.current)if(e.formControl)s.current={...e.formControl,formState:n},e.defaultValues&&!Y(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:m,...x}=gs(e);s.current={...x,formState:n}}const o=s.current.control;return o._options=e,ss(()=>{const m=o._subscribe({formState:o._proxyFormState,callback:()=>c({...o._formState}),reRenderRoot:!0});return c(x=>({...x,isReady:!0})),o._formState.isReady=!0,m},[o]),$.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),$.useEffect(()=>{e.mode&&(o._options.mode=e.mode),e.reValidateMode&&(o._options.reValidateMode=e.reValidateMode)},[o,e.mode,e.reValidateMode]),$.useEffect(()=>{e.errors&&(o._setErrors(e.errors),o._focusError())},[o,e.errors]),$.useEffect(()=>{e.shouldUnregister&&o._subjects.state.next({values:o._getWatch()})},[o,e.shouldUnregister]),$.useEffect(()=>{if(o._proxyFormState.isDirty){const m=o._getDirty();m!==n.isDirty&&o._subjects.state.next({isDirty:m})}},[o,n.isDirty]),$.useEffect(()=>{e.values&&!ae(e.values,r.current)?(o._reset(e.values,{keepFieldsRef:!0,...o._options.resetOptions}),r.current=e.values,c(m=>({...m}))):o._resetDefaultValues()},[o,e.values]),$.useEffect(()=>{o._state.mount||(o._setValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),s.current.formState=ts(n,o),s.current}const vs=({data:e,variant:s="standard",onPrint:r,onDownload:n})=>{const c=()=>{r?r():window.print()};return i.jsxs("div",{className:"bg-background min-h-screen",children:[i.jsx("div",{className:"print:hidden sticky top-0 z-10 bg-background/80 backdrop-blur-sm border-b border-border p-4",children:i.jsxs("div",{className:"max-w-4xl mx-auto flex justify-end gap-3",children:[i.jsxs(ve,{variant:"outline",size:"sm",onClick:c,children:[i.jsx(Wt,{className:"h-4 w-4 mr-2"}),"Print"]}),n&&i.jsxs(ve,{size:"sm",onClick:n,children:[i.jsx(Ht,{className:"h-4 w-4 mr-2"}),"Download PDF"]})]})}),i.jsx("div",{className:"max-w-4xl mx-auto p-8 print:p-0",children:i.jsxs("div",{className:` 2 bg-card border border-border rounded-lg overflow-hidden print:border-0 print:shadow-none 3 ${s==="premium"?"shadow-xl":"shadow-md"} 4 `,children:[i.jsx("div",{className:` 5 p-8 6 ${s==="premium"?"bg-gradient-to-br from-primary to-accent text-primary-foreground":s==="minimal"?"bg-card":"bg-muted"} 7 `,children:i.jsxs("div",{className:"flex justify-between items-start",children:[i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsx("div",{className:` 8 p-3 rounded-lg
9 ${s==="premium"?"bg-primary-foreground/10":"bg-accent/10"} 10 `,children:i.jsx(Et,{className:` 11 h-10 w-10 12 ${s==="premium"?"text-primary-foreground":"text-accent"} 13 `})}),i.jsxs("div",{children:[i.jsx("h1",{className:` 14 text-2xl font-bold tracking-tight font-orbitron 15 ${s==="premium"?"text-primary-foreground":"text-foreground"} 16 `,children:"SmartCogwheel.AI"}),i.jsx("p",{className:` 17 text-sm 18 ${s==="premium"?"text-primary-foreground/70":"text-muted-foreground"} 19 `,children:"AI Automation Solutions"})]})]}),i.jsxs("div",{className:"text-right",children:[i.jsx("h2",{className:` 20 text-3xl font-light tracking-wide 21 ${s==="premium"?"text-primary-foreground":"text-foreground"} 22 `,children:"INVOICE"}),i.jsxs("p",{className:` 23 text-sm font-mono mt-1 24 ${s==="premium"?"text-primary-foreground/70":"text-muted-foreground"} 25 `,children:["#",e.invoiceNumber]})]})]})}),i.jsxs("div",{className:"p-8",children:[i.jsxs("div",{className:"grid grid-cols-2 gap-8 mb-8",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"text-xs font-semibold uppercase tracking-widest text-muted-foreground mb-3",children:"Bill To"}),i.jsxs("div",{className:"space-y-1",children:[i.jsx("p",{className:"font-semibold text-foreground",children:e.clientName}),e.clientCompany&&i.jsx("p",{className:"text-muted-foreground",children:e.clientCompany}),i.jsx("p",{className:"text-muted-foreground",children:e.clientEmail}),i.jsx("p",{className:"text-muted-foreground whitespace-pre-line",children:e.clientAddress})]})]}),i.jsx("div",{className:"text-right",children:i.jsx("div",{className:"inline-block text-left",children:i.jsxs("div",{className:"grid grid-cols-2 gap-x-6 gap-y-2 text-sm",children:[i.jsx("span",{className:"text-muted-foreground",children:"Issue Date:"}),i.jsx("span",{className:"font-medium text-foreground",children:Le(e.issueDate,"MMM dd, yyyy")}),i.jsx("span",{className:"text-muted-foreground",children:"Due Date:"}),i.jsx("span",{className:"font-medium text-foreground",children:Le(e.dueDate,"MMM dd, yyyy")})]})})})]}),i.jsx(_e,{className:"mb-6"}),i.jsx("div",{className:"mb-8",children:i.jsxs("table",{className:"w-full",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-border",children:[i.jsx("th",{className:"text-left py-3 text-xs font-semibold uppercase tracking-widest text-muted-foreground",children:"Description"}),i.jsx("th",{className:"text-center py-3 text-xs font-semibold uppercase tracking-widest text-muted-foreground w-20",children:"Qty"}),i.jsx("th",{className:"text-right py-3 text-xs font-semibold uppercase tracking-widest text-muted-foreground w-28",children:"Unit Price"}),i.jsx("th",{className:"text-right py-3 text-xs font-semibold uppercase tracking-widest text-muted-foreground w-28",children:"Total"})]})}),i.jsx("tbody",{children:e.items.map((o,m)=>i.jsxs("tr",{className:"border-b border-border/50",children:[i.jsx("td",{className:"py-4 text-foreground",children:o.description}),i.jsx("td",{className:"py-4 text-center text-muted-foreground",children:o.quantity}),i.jsxs("td",{className:"py-4 text-right text-muted-foreground",children:["$",o.unitPrice.toFixed(2)]}),i.jsxs("td",{className:"py-4 text-right font-medium text-foreground",children:["$",o.total.toFixed(2)]})]},m))})]})}),i.jsx("div",{className:"flex justify-end",children:i.jsx("div",{className:"w-64",children:i.jsxs("div",{className:"space-y-2",children:[i.jsxs("div",{className:"flex justify-between text-sm",children:[i.jsx("span",{className:"text-muted-foreground",children:"Subtotal"}),i.jsxs("span",{className:"text-foreground",children:["$",e.subtotal.toFixed(2)]})]}),i.jsxs("div",{className:"flex justify-between text-sm",children:[i.jsxs("span",{className:"text-muted-foreground",children:["Tax (",e.taxRate,"%)"]}),i.jsxs("span",{className:"text-foreground",children:["$",e.taxAmount.toFixed(2)]})]}),i.jsx(_e,{}),i.jsxs("div",{className:"flex justify-between pt-2",children:[i.jsx("span",{className:"text-lg font-semibold text-foreground",children:"Total"}),i.jsxs("span",{className:"text-lg font-bold text-accent",children:["$",e.total.toFixed(2)]})]})]})})}),(e.notes||e.paymentTerms)&&i.jsx("div",{className:"mt-12 pt-6 border-t border-border",children:i.jsxs("div",{className:"grid grid-cols-2 gap-8",children:[e.notes&&i.jsxs("div",{children:[i.jsx("h4",{className:"text-xs font-semibold uppercase tracking-widest text-muted-foreground mb-2",children:"Notes"}),i.jsx("p",{className:"text-sm text-muted-foreground",children:e.notes})]}),e.paymentTerms&&i.jsxs("div",{children:[i.jsx("h4",{className:"text-xs font-semibold uppercase tracking-widest text-muted-foreground mb-2",children:"Payment Terms"}),i.jsx("p",{className:"text-sm text-muted-foreground",children:e.paymentTerms})]})]})})]}),i.jsxs("div",{className:` 26 px-8 py-6 text-center text-sm 27 ${s==="premium"?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground"} 28 `,children:[i.jsx("p",{className:"font-orbitron tracking-wider",children:"SmartCogwheel.AI"}),i.jsx("p",{className:"mt-1 opacity-70",children:"[email protected] ⢠smartcogwheel.ai"})]})]})})]})},xt=[{name:"Smart Chatbot Setup",price:600},{name:"Inventory Predictor",price:800},{name:"AI Readiness Assessment",price:500},{name:"Custom AI Integration",price:1500},{name:"Monthly Support Package",price:300},{name:"Data Migration Service",price:750},{name:"Training Session (per hour)",price:150},{name:"Compliance Assessment",price:1200}],bs=()=>{const[e,s]=Ae.useState([{description:"Smart Chatbot Setup",quantity:1,unitPrice:600,total:600}]),[r,n]=Ae.useState("standard"),[c,o]=Ae.useState(0),[m,x]=Ae.useState(!1),{register:S,watch:z,getValues:F}=ps({defaultValues:{clientName:"",clientEmail:"",clientAddress:"",clientCompany:"",notes:"Thank y
28ou for your business!",paymentTerms:"Payment due within 30 days of invoice date."}}),D=()=>{s([...e,{description:"",quantity:1,unitPrice:0,total:0}])},p=y=>{e.length>1&&s(e.filter((k,j)=>j!==y))},re=(y,k,j)=>{const R=[...e];if(k==="description")R[y].description=j;else{const L=typeof j=="string"?parseFloat(j)||0:j;k==="quantity"?R[y].quantity=L:k==="unitPrice"&&(R[y].unitPrice=L),R[y].total=R[y].quantity*R[y].unitPrice}s(R)},J=(y,k)=>{const j=xt.find(R=>R.name===k);if(j){const R=[...e];R[y]={description:j.name,quantity:1,unitPrice:j.price,total:j.price},s(R)}},V=e.reduce((y,k)=>y+k.total,0),q=V*(c/100),oe=V+q,v=()=>{const y=Le(new Date,"yyyyMMdd"),k=Math.floor(Math.random()*1e3).toString().padStart(3,"0");return`SCW-${y}-${k}`},G=()=>{const y=F();return{invoiceNumber:v(),issueDate:new Date,dueDate:Ut(new Date,30),clientName:y.clientName||"Client Name",clientEmail:y.clientEmail||"[email protected]",clientAddress:y.clientAddress||"Client Address",clientCompany:y.clientCompany,items:e,subtotal:V,taxRate:c,taxAmount:q,total:oe,notes:y.notes,paymentTerms:y.paymentTerms}},W=()=>{Tt.info("PDF download functionality requires additional setup. Use print for now.")};return i.jsx("div",{className:"min-h-screen bg-background p-6",children:i.jsxs("div",{className:"max-w-6xl mx-auto",children:[i.jsxs("div",{className:"flex items-center justify-between mb-8",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-3xl font-bold text-foreground font-orbitron",children:"Invoice Generator"}),i.jsx("p",{className:"text-muted-foreground mt-1",children:"Create professional invoices with SmartCogwheel.AI branding"})]}),i.jsxs(Bt,{open:m,onOpenChange:x,children:[i.jsx($t,{asChild:!0,children:i.jsxs(ve,{size:"lg",children:[i.jsx(zt,{className:"h-4 w-4 mr-2"}),"Preview Invoice"]})}),i.jsx(qt,{className:"max-w-5xl max-h-[90vh] overflow-y-auto p-0",children:i.jsx(vs,{data:G(),variant:r,onDownload:W})})]})]}),i.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[i.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[i.jsxs(me,{children:[i.jsx(xe,{children:i.jsxs(he,{className:"flex items-center gap-2",children:[i.jsx(Gt,{className:"h-5 w-5 text-accent"}),"Client Information"]})}),i.jsxs(ye,{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(K,{htmlFor:"clientName",children:"Client Name"}),i.jsx(de,{id:"clientName",placeholder:"John Doe",...S("clientName")})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(K,{htmlFor:"clientEmail",children:"Email"}),i.jsx(de,{id:"clientEmail",type:"email",placeholder:"[email protected]",...S("clientEmail")})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(K,{htmlFor:"clientCompany",children:"Company (Optional)"}),i.jsx(de,{id:"clientCompany",placeholder:"Company Inc.",...S("clientCompany")})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(K,{htmlFor:"clientAddress",children:"Address"}),i.jsx(Me,{id:"clientAddress",placeholder:`123 Main St 29City, State 12345`,rows:2,...S("clientAddress")})]})]})]}),i.jsxs(me,{children:[i.jsx(xe,{children:i.jsx(he,{children:"Services & Items"})}),i.jsx(ye,{children:i.jsxs("div",{className:"space-y-4",children:[e.map((y,k)=>i.jsxs("div",{className:"grid grid-cols-12 gap-3 items-end",children:[i.jsxs("div",{className:"col-span-5 space-y-2",children:[i.jsx(K,{children:"Service / Description"}),i.jsxs(Pt,{onValueChange:j=>J(k,j),children:[i.jsx(Rt,{children:i.jsx(Mt,{placeholder:y.description||"Select service..."})}),i.jsx(Ot,{children:xt.map(j=>i.jsxs(Lt,{value:j.name,children:[j.name," - $",j.price]},j.name))})]})]}),i.jsxs("div",{className:"col-span-2 space-y-2",children:[i.jsx(K,{children:"Qty"}),i.jsx(de,{type:"number",min:"1",value:y.quantity,onChange:j=>re(k,"quantity",j.target.value)})]}),i.jsxs("div",{className:"col-span-2 space-y-2",children:[i.jsx(K,{children:"Unit Price"}),i.jsx(de,{type:"number",min:"0",step:"0.01",value:y.unitPrice,onChange:j=>re(k,"unitPrice",j.target.value)})]}),i.jsxs("div",{className:"col-span-2 space-y-2",children:[i.jsx(K,{children:"Total"}),i.jsxs("div",{className:"h-10 px-3 py-2 bg-muted rounded-md text-foreground font-medium flex items-center",children:["$",y.total.toFixed(2)]})]}),i.jsx("div",{className:"col-span-1",children:i.jsx(ve,{variant:"ghost",size:"icon",onClick:()=>p(k),disabled:e.length===1,className:"text-destructive hover:text-destructive",children:i.jsx(Kt,{className:"h-4 w-4"})})})]},k)),i.jsxs(ve,{variant:"outline",onClick:D,className:"w-full mt-4",children:[i.jsx(Qt,{className:"h-4 w-4 mr-2"}),"Add Item"]})]})})]}),i.jsxs(me,{children:[i.jsx(xe,{children:i.jsx(he,{children:"Notes & Payment Terms"})}),i.jsxs(ye,{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(K,{htmlFor:"notes",children:"Notes"}),i.jsx(Me,{id:"notes",rows:3,...S("notes")})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(K,{htmlFor:"paymentTerms",children:"Payment Terms"}),i.jsx(Me,{id:"paymentTerms",rows:3,...S("paymentTerms")})]})]})]})]}),i.jsxs("div",{className:"space-y-6",children:[i.jsxs(me,{children:[i.jsx(xe,{children:i.jsx(he,{children:"Template Style"})}),i.jsx(ye,{className:"space-y-3",children:["standard","minimal","premium"].map(y=>i.jsxs("button",{onClick:()=>n(y),className:` 30 w-full p-3 rounded-lg border text-left transition-all 31 ${r===y?"border-accent bg-accent/10 text-foreground":"border-border hover:border-accent/50 text-muted-foreground"} 32 `,children:[i.jsx("span",{className:"font-medium capitalize",children:y}),i.jsxs("p",{className:"text-xs mt-1 opacity-70",children:[y==="standard"&&"Clean professional layout",y==="minimal"&&"Simple and elegant",y==="premium"&&"Bold branded header"]})]},y))})]}),i.jsxs(me,{className:"bg-muted/50",children:[i.jsx(xe,{children:i.jsx(he,{children:"Invoice Summary"})}),i.jsxs(ye,{className:"space-y-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(K,{htmlFor:"taxRate",children:"Tax Rate (%)"}),i.jsx(de,{id:"taxRate",type:"number",min:"0",max:"100",step:"0.1",value:c,onChange:y=>o(parseFloat(y.target.value)||0)})]}),i.jsx(_e,{}),i.jsxs("div",{className:"space-y-2 text-sm",children:[i.jsxs("div",{className:"flex justify-between",children:[i.jsx("span",{className:"text-muted-foreground",children:"Subtotal"}),i.jsxs("span",{className:"font-medium text-foreground",children:["$",V.toFixed(2)]})]}),i.jsxs("div",{className:"flex justify-between",children:[i.jsxs("span",{className:"text-muted-foreground",children:["Tax (",c,"%)"]}),i.jsxs("span",{className:"font-medium text-foreground",children:["$",q.toFixed(2)]})]}),i.jsx(_e,{}),i.jsxs("div",{className:"flex justify-between text-lg",children:[i.jsx("span",{className:"font-semibold text-foreground",children:"Total"}),i.jsxs("span",{className:"font-bold text-accent",children:["$",oe.toFixed(2)]})]})]})]})]})]})]})]})})},Bs=()=>i.jsxs("div",{className:"min-h-screen bg-background",children:[i.jsx(It,{}),i.jsx("main",{className:"pt-20",children:i.jsx(bs,{})})]});
32export{Bs as default};
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.