brauz-questionnaire-ui 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
- (function(T,j){typeof exports=="object"&&typeof module<"u"?module.exports=j(require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["react/jsx-runtime","react","react-dom"],j):(T=typeof globalThis<"u"?globalThis:T||self,T["brauz-questionnaire-ui"]=j(T["react/jsx-runtime"],T.React,T.reactDOM))})(this,(function(T,j,Pu){"use strict";function Nu(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const b=Nu(j),ms=Nu(Pu),qv={with_section_title:!0,with_label:!0,form_config:{},renderFooter:null},Iu=j.createContext();function Kv({children:e,config:t={}}){return T.jsx(Iu.Provider,{value:{...qv,...t},children:e})}function ia(){return j.useContext(Iu)}var Co=e=>e.type==="checkbox",Or=e=>e instanceof Date,$t=e=>e==null;const Fu=e=>typeof e=="object";var yt=e=>!$t(e)&&!Array.isArray(e)&&Fu(e)&&!Or(e),Ru=e=>yt(e)&&e.target?Co(e.target)?e.target.checked:e.target.value:e,Xv=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Wu=(e,t)=>e.has(Xv(t)),Jv=e=>{const t=e.constructor&&e.constructor.prototype;return yt(t)&&t.hasOwnProperty("isPrototypeOf")},aa=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function vt(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(aa&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!n&&!(yt(e)&&Jv(e)))return e;const r=n?[]:Object.create(Object.getPrototypeOf(e));for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=vt(e[o]));return r}var gs=e=>/^\w*$/.test(e),st=e=>e===void 0,ca=e=>Array.isArray(e)?e.filter(Boolean):[],la=e=>ca(e.replace(/["|']|\]/g,"").split(/\.|\[/)),ae=(e,t,n)=>{if(!t||!yt(e))return n;const r=(gs(t)?[t]:la(t)).reduce((o,s)=>$t(o)?o:o[s],e);return st(r)||r===e?st(e[t])?n:e[t]:r},Bt=e=>typeof e=="boolean",It=e=>typeof e=="function",Ve=(e,t,n)=>{let r=-1;const o=gs(t)?[t]:la(t),s=o.length,i=s-1;for(;++r<s;){const a=o[r];let c=n;if(r!==i){const u=e[a];c=yt(u)||Array.isArray(u)?u:isNaN(+o[r+1])?{}:[]}if(a==="__proto__"||a==="constructor"||a==="prototype")return;e[a]=c,e=e[a]}};const ys={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},cn={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Ln={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},ua=j.createContext(null);ua.displayName="HookFormControlContext";const fa=()=>j.useContext(ua);var zu=(e,t,n,r=!0)=>{const o={defaultValues:t._defaultValues};for(const s in e)Object.defineProperty(o,s,{get:()=>{const i=s;return t._proxyFormState[i]!==cn.all&&(t._proxyFormState[i]=!r||cn.all),n&&(n[i]=!0),e[i]}});return o};const da=typeof window<"u"?j.useLayoutEffect:j.useEffect;function Lu(e){const t=fa(),{control:n=t,disabled:r,name:o,exact:s}=e||{},[i,a]=j.useState(n._formState),c=j.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return da(()=>n._subscribe({name:o,formState:c.current,exact:s,callback:u=>{!r&&a({...n._formState,...u})}}),[o,r,s]),j.useEffect(()=>{c.current.isValid&&n._setValid(!0)},[n]),j.useMemo(()=>zu(i,n,c.current,!1),[i,n])}var Ht=e=>typeof e=="string",ha=(e,t,n,r,o)=>Ht(e)?(r&&t.watch.add(e),ae(n,e,o)):Array.isArray(e)?e.map(s=>(r&&t.watch.add(s),ae(n,s))):(r&&(t.watchAll=!0),n),pa=e=>$t(e)||!Fu(e);function ln(e,t,n=new WeakSet){if(pa(e)||pa(t))return Object.is(e,t);if(Or(e)&&Or(t))return Object.is(e.getTime(),t.getTime());const r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const s of r){const i=e[s];if(!o.includes(s))return!1;if(s!=="ref"){const a=t[s];if(Or(i)&&Or(a)||yt(i)&&yt(a)||Array.isArray(i)&&Array.isArray(a)?!ln(i,a,n):!Object.is(i,a))return!1}}return!0}function Qv(e){const t=fa(),{control:n=t,name:r,defaultValue:o,disabled:s,exact:i,compute:a}=e||{},c=j.useRef(o),u=j.useRef(a),l=j.useRef(void 0),f=j.useRef(n),d=j.useRef(r);u.current=a;const[h,m]=j.useState(()=>{const w=n._getWatch(r,c.current);return u.current?u.current(w):w}),p=j.useCallback(w=>{const _=ha(r,n._names,w||n._formValues,!1,c.current);return u.current?u.current(_):_},[n._formValues,n._names,r]),y=j.useCallback(w=>{if(!s){const _=ha(r,n._names,w||n._formValues,!1,c.current);if(u.current){const S=u.current(_);ln(S,l.current)||(m(S),l.current=S)}else m(_)}},[n._formValues,n._names,s,r]);da(()=>((f.current!==n||!ln(d.current,r))&&(f.current=n,d.current=r,y()),n._subscribe({name:r,formState:{values:!0},exact:i,callback:w=>{y(w.values)}})),[n,i,r,y]),j.useEffect(()=>n._removeUnmounted());const g=f.current!==n,C=d.current,O=j.useMemo(()=>{if(s)return null;const w=!g&&!ln(C,r);return g||w?p():null},[s,g,r,C,p]);return O!==null?O:h}function eb(e){const t=fa(),{name:n,disabled:r,control:o=t,shouldUnregister:s,defaultValue:i,exact:a=!0}=e,c=Wu(o._names.array,n),u=j.useMemo(()=>ae(o._formValues,n,ae(o._defaultValues,n,i)),[o,n,i]),l=Qv({control:o,name:n,defaultValue:u,exact:a}),f=Lu({control:o,name:n,exact:a}),d=j.useRef(e),h=j.useRef(void 0),m=j.useRef(o.register(n,{...e.rules,value:l,...Bt(e.disabled)?{disabled:e.disabled}:{}}));d.current=e;const p=j.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!ae(f.errors,n)},isDirty:{enumerable:!0,get:()=>!!ae(f.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!ae(f.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!ae(f.validatingFields,n)},error:{enumerable:!0,get:()=>ae(f.errors,n)}}),[f,n]),y=j.useCallback(w=>m.current.onChange({target:{value:Ru(w),name:n},type:ys.CHANGE}),[n]),g=j.useCallback(()=>m.current.onBlur({target:{value:ae(o._formValues,n),name:n},type:ys.BLUR}),[n,o._formValues]),C=j.useCallback(w=>{const _=ae(o._fields,n);_&&_._f&&w&&(_._f.ref={focus:()=>It(w.focus)&&w.focus(),select:()=>It(w.select)&&w.select(),setCustomValidity:S=>It(w.setCustomValidity)&&w.setCustomValidity(S),reportValidity:()=>It(w.reportValidity)&&w.reportValidity()})},[o._fields,n]),O=j.useMemo(()=>({name:n,value:l,...Bt(r)||f.disabled?{disabled:f.disabled||r}:{},onChange:y,onBlur:g,ref:C}),[n,r,f.disabled,y,g,C,l]);return j.useEffect(()=>{const w=o._options.shouldUnregister||s,_=h.current;_&&_!==n&&!c&&o.unregister(_),o.register(n,{...d.current.rules,...Bt(d.current.disabled)?{disabled:d.current.disabled}:{}});const S=(I,v)=>{const x=ae(o._fields,I);x&&x._f&&(x._f.mount=v)};if(S(n,!0),w){const I=vt(ae(o._options.defaultValues,n,d.current.defaultValue));Ve(o._defaultValues,n,I),st(ae(o._formValues,n))&&Ve(o._formValues,n,I)}return!c&&o.register(n),h.current=n,()=>{(c?w&&!o._state.action:w)?o.unregister(n):S(n,!1)}},[n,o,c,s]),j.useEffect(()=>{o._setDisabledField({disabled:r,name:n})},[r,n,o]),j.useMemo(()=>({field:O,formState:f,fieldState:p}),[O,f,p])}const tb=e=>e.render(eb(e)),ma=j.createContext(null);ma.displayName="HookFormContext";const nb=()=>j.useContext(ma),rb=e=>{const{children:t,watch:n,getValues:r,getFieldState:o,setError:s,clearErrors:i,setValue:a,trigger:c,formState:u,resetField:l,reset:f,handleSubmit:d,unregister:h,control:m,register:p,setFocus:y,subscribe:g}=e;return j.createElement(ma.Provider,{value:j.useMemo(()=>({watch:n,getValues:r,getFieldState:o,setError:s,clearErrors:i,setValue:a,trigger:c,formState:u,resetField:l,reset:f,handleSubmit:d,unregister:h,control:m,register:p,setFocus:y,subscribe:g}),[i,m,u,o,r,d,p,f,l,s,y,a,g,c,h,n])},j.createElement(ua.Provider,{value:m},t))};var ga=(e,t,n,r,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:o||!0}}:{},To=e=>Array.isArray(e)?e:[e],$u=()=>{let e=[];return{get observers(){return e},next:o=>{for(const s of e)s.next&&s.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(s=>s!==o)}}),unsubscribe:()=>{e=[]}}};function Uu(e,t){const n={};for(const r in e)if(e.hasOwnProperty(r)){const o=e[r],s=t[r];if(o&&yt(o)&&s){const i=Uu(o,s);yt(i)&&(n[r]=i)}else e[r]&&(n[r]=s)}return n}var Ft=e=>yt(e)&&!Object.keys(e).length,ya=e=>e.type==="file",vs=e=>{if(!aa)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Yu=e=>e.type==="select-multiple",va=e=>e.type==="radio",ob=e=>va(e)||Co(e),ba=e=>vs(e)&&e.isConnected;function sb(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=st(e)?r++:e[t[r++]];return e}function ib(e){for(const t in e)if(e.hasOwnProperty(t)&&!st(e[t]))return!1;return!0}function bt(e,t){const n=Array.isArray(t)?t:gs(t)?[t]:la(t),r=n.length===1?e:sb(e,n),o=n.length-1,s=n[o];return r&&delete r[s],o!==0&&(yt(r)&&Ft(r)||Array.isArray(r)&&ib(r))&&bt(e,n.slice(0,-1)),e}var ab=e=>{for(const t in e)if(It(e[t]))return!0;return!1};function ju(e){return Array.isArray(e)||yt(e)&&!ab(e)}function wa(e,t={}){for(const n in e){const r=e[n];ju(r)?(t[n]=Array.isArray(r)?[]:{},wa(r,t[n])):st(r)||(t[n]=!0)}return t}function Hr(e,t,n){n||(n=wa(t));for(const r in e){const o=e[r];if(ju(o))st(t)||pa(n[r])?n[r]=wa(o,Array.isArray(o)?[]:{}):Hr(o,$t(t)?{}:t[r],n[r]);else{const s=t[r];n[r]=!ln(o,s)}}return n}const Vu={value:!1,isValid:!1},Bu={value:!0,isValid:!0};var Hu=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!st(e[0].attributes.value)?st(e[0].value)||e[0].value===""?Bu:{value:e[0].value,isValid:!0}:Bu:Vu}return Vu},Zu=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>st(e)?e:t?e===""?NaN:e&&+e:n&&Ht(e)?new Date(e):r?r(e):e;const Gu={isValid:!1,value:null};var qu=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,Gu):Gu;function Ku(e){const t=e.ref;return ya(t)?t.files:va(t)?qu(e.refs).value:Yu(t)?[...t.selectedOptions].map(({value:n})=>n):Co(t)?Hu(e.refs).value:Zu(st(t.value)?e.ref.value:t.value,e)}var cb=(e,t,n,r)=>{const o={};for(const s of e){const i=ae(t,s);i&&Ve(o,s,i._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:r}},bs=e=>e instanceof RegExp,Do=e=>st(e)?e:bs(e)?e.source:yt(e)?bs(e.value)?e.value.source:e.value:e,Xu=e=>({isOnSubmit:!e||e===cn.onSubmit,isOnBlur:e===cn.onBlur,isOnChange:e===cn.onChange,isOnAll:e===cn.all,isOnTouch:e===cn.onTouched});const Ju="AsyncFunction";var lb=e=>!!e&&!!e.validate&&!!(It(e.validate)&&e.validate.constructor.name===Ju||yt(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===Ju)),ub=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Qu=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Ao=(e,t,n,r)=>{for(const o of n||Object.keys(e)){const s=ae(e,o);if(s){const{_f:i,...a}=s;if(i){if(i.refs&&i.refs[0]&&t(i.refs[0],o)&&!r)return!0;if(i.ref&&t(i.ref,i.name)&&!r)return!0;if(Ao(a,t))break}else if(yt(a)&&Ao(a,t))break}}};function ef(e,t,n){const r=ae(e,n);if(r||gs(n))return{error:r,name:n};const o=n.split(".");for(;o.length;){const s=o.join("."),i=ae(t,s),a=ae(e,s);if(i&&!Array.isArray(i)&&n!==s)return{name:n};if(a&&a.type)return{name:s,error:a};if(a&&a.root&&a.root.type)return{name:`${s}.root`,error:a.root};o.pop()}return{name:n}}var fb=(e,t,n,r)=>{n(e);const{name:o,...s}=e;return Ft(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(i=>t[i]===(!r||cn.all))},db=(e,t,n)=>!e||!t||e===t||To(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r))),hb=(e,t,n,r,o)=>o.isOnAll?!1:!n&&o.isOnTouch?!(t||e):(n?r.isOnBlur:o.isOnBlur)?!e:(n?r.isOnChange:o.isOnChange)?e:!0,pb=(e,t)=>!ca(ae(e,t)).length&&bt(e,t),mb=(e,t,n)=>{const r=To(ae(e,n));return Ve(r,"root",t[n]),Ve(e,n,r),e};function tf(e,t,n="validate"){if(Ht(e)||Array.isArray(e)&&e.every(Ht)||Bt(e)&&!e)return{type:n,message:Ht(e)?e:"",ref:t}}var Zr=e=>yt(e)&&!bs(e)?e:{value:e,message:""},nf=async(e,t,n,r,o,s)=>{const{ref:i,refs:a,required:c,maxLength:u,minLength:l,min:f,max:d,pattern:h,validate:m,name:p,valueAsNumber:y,mount:g}=e._f,C=ae(n,p);if(!g||t.has(p))return{};const O=a?a[0]:i,w=M=>{o&&O.reportValidity&&(O.setCustomValidity(Bt(M)?"":M||""),O.reportValidity())},_={},S=va(i),I=Co(i),v=S||I,x=(y||ya(i))&&st(i.value)&&st(C)||vs(i)&&i.value===""||C===""||Array.isArray(C)&&!C.length,P=ga.bind(null,p,r,_),A=(M,F,N,W=Ln.maxLength,E=Ln.minLength)=>{const k=M?F:N;_[p]={type:M?W:E,message:k,ref:i,...P(M?W:E,k)}};if(s?!Array.isArray(C)||!C.length:c&&(!v&&(x||$t(C))||Bt(C)&&!C||I&&!Hu(a).isValid||S&&!qu(a).isValid)){const{value:M,message:F}=Ht(c)?{value:!!c,message:c}:Zr(c);if(M&&(_[p]={type:Ln.required,message:F,ref:O,...P(Ln.required,F)},!r))return w(F),_}if(!x&&(!$t(f)||!$t(d))){let M,F;const N=Zr(d),W=Zr(f);if(!$t(C)&&!isNaN(C)){const E=i.valueAsNumber||C&&+C;$t(N.value)||(M=E>N.value),$t(W.value)||(F=E<W.value)}else{const E=i.valueAsDate||new Date(C),k=D=>new Date(new Date().toDateString()+" "+D),U=i.type=="time",$=i.type=="week";Ht(N.value)&&C&&(M=U?k(C)>k(N.value):$?C>N.value:E>new Date(N.value)),Ht(W.value)&&C&&(F=U?k(C)<k(W.value):$?C<W.value:E<new Date(W.value))}if((M||F)&&(A(!!M,N.message,W.message,Ln.max,Ln.min),!r))return w(_[p].message),_}if((u||l)&&!x&&(Ht(C)||s&&Array.isArray(C))){const M=Zr(u),F=Zr(l),N=!$t(M.value)&&C.length>+M.value,W=!$t(F.value)&&C.length<+F.value;if((N||W)&&(A(N,M.message,F.message),!r))return w(_[p].message),_}if(h&&!x&&Ht(C)){const{value:M,message:F}=Zr(h);if(bs(M)&&!C.match(M)&&(_[p]={type:Ln.pattern,message:F,ref:i,...P(Ln.pattern,F)},!r))return w(F),_}if(m){if(It(m)){const M=await m(C,n),F=tf(M,O);if(F&&(_[p]={...F,...P(Ln.validate,F.message)},!r))return w(F.message),_}else if(yt(m)){let M={};for(const F in m){if(!Ft(M)&&!r)break;const N=tf(await m[F](C,n),O,F);N&&(M={...N,...P(F,N.message)},w(N.message),r&&(_[p]=M))}if(!Ft(M)&&(_[p]={ref:O,...M},!r))return _}}return w(!0),_};const gb={mode:cn.onSubmit,reValidateMode:cn.onChange,shouldFocusError:!0};function yb(e={}){let t={...gb,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:It(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},o=yt(t.defaultValues)||yt(t.values)?vt(t.defaultValues||t.values)||{}:{},s=t.shouldUnregister?{}:vt(o),i={action:!1,mount:!1,watch:!1,keepIsValid:!1},a={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c,u=0;const l={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={...l};let d={...f};const h={array:$u(),state:$u()},m=t.criteriaMode===cn.all,p=R=>Y=>{clearTimeout(u),u=setTimeout(R,Y)},y=async R=>{if(!i.keepIsValid&&!t.disabled&&(f.isValid||d.isValid||R)){let Y;t.resolver?(Y=Ft((await v()).errors),g()):Y=await P(r,!0),Y!==n.isValid&&h.state.next({isValid:Y})}},g=(R,Y)=>{!t.disabled&&(f.isValidating||f.validatingFields||d.isValidating||d.validatingFields)&&((R||Array.from(a.mount)).forEach(H=>{H&&(Y?Ve(n.validatingFields,H,Y):bt(n.validatingFields,H))}),h.state.next({validatingFields:n.validatingFields,isValidating:!Ft(n.validatingFields)}))},C=(R,Y=[],H,ee,te=!0,ne=!0)=>{if(ee&&H&&!t.disabled){if(i.action=!0,ne&&Array.isArray(ae(r,R))){const ue=H(ae(r,R),ee.argA,ee.argB);te&&Ve(r,R,ue)}if(ne&&Array.isArray(ae(n.errors,R))){const ue=H(ae(n.errors,R),ee.argA,ee.argB);te&&Ve(n.errors,R,ue),pb(n.errors,R)}if((f.touchedFields||d.touchedFields)&&ne&&Array.isArray(ae(n.touchedFields,R))){const ue=H(ae(n.touchedFields,R),ee.argA,ee.argB);te&&Ve(n.touchedFields,R,ue)}(f.dirtyFields||d.dirtyFields)&&(n.dirtyFields=Hr(o,s)),h.state.next({name:R,isDirty:M(R,Y),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Ve(s,R,Y)},O=(R,Y)=>{Ve(n.errors,R,Y),h.state.next({errors:n.errors})},w=R=>{n.errors=R,h.state.next({errors:n.errors,isValid:!1})},_=(R,Y,H,ee)=>{const te=ae(r,R);if(te){const ne=ae(s,R,st(H)?ae(o,R):H);st(ne)||ee&&ee.defaultChecked||Y?Ve(s,R,Y?ne:Ku(te._f)):W(R,ne),i.mount&&!i.action&&y()}},S=(R,Y,H,ee,te)=>{let ne=!1,ue=!1;const be={name:R};if(!t.disabled){if(!H||ee){(f.isDirty||d.isDirty)&&(ue=n.isDirty,n.isDirty=be.isDirty=M(),ne=ue!==be.isDirty);const Oe=ln(ae(o,R),Y);ue=!!ae(n.dirtyFields,R),Oe?bt(n.dirtyFields,R):Ve(n.dirtyFields,R,!0),be.dirtyFields=n.dirtyFields,ne=ne||(f.dirtyFields||d.dirtyFields)&&ue!==!Oe}if(H){const Oe=ae(n.touchedFields,R);Oe||(Ve(n.touchedFields,R,H),be.touchedFields=n.touchedFields,ne=ne||(f.touchedFields||d.touchedFields)&&Oe!==H)}ne&&te&&h.state.next(be)}return ne?be:{}},I=(R,Y,H,ee)=>{const te=ae(n.errors,R),ne=(f.isValid||d.isValid)&&Bt(Y)&&n.isValid!==Y;if(t.delayError&&H?(c=p(()=>O(R,H)),c(t.delayError)):(clearTimeout(u),c=null,H?Ve(n.errors,R,H):bt(n.errors,R)),(H?!ln(te,H):te)||!Ft(ee)||ne){const ue={...ee,...ne&&Bt(Y)?{isValid:Y}:{},errors:n.errors,name:R};n={...n,...ue},h.state.next(ue)}},v=async R=>(g(R,!0),await t.resolver(s,t.context,cb(R||a.mount,r,t.criteriaMode,t.shouldUseNativeValidation))),x=async R=>{const{errors:Y}=await v(R);if(g(R),R)for(const H of R){const ee=ae(Y,H);ee?Ve(n.errors,H,ee):bt(n.errors,H)}else n.errors=Y;return Y},P=async(R,Y,H={valid:!0})=>{for(const ee in R){const te=R[ee];if(te){const{_f:ne,...ue}=te;if(ne){const be=a.array.has(ne.name),Oe=te._f&&lb(te._f);Oe&&f.validatingFields&&g([ne.name],!0);const ze=await nf(te,a.disabled,s,m,t.shouldUseNativeValidation&&!Y,be);if(Oe&&f.validatingFields&&g([ne.name]),ze[ne.name]&&(H.valid=!1,Y||e.shouldUseNativeValidation))break;!Y&&(ae(ze,ne.name)?be?mb(n.errors,ze,ne.name):Ve(n.errors,ne.name,ze[ne.name]):bt(n.errors,ne.name))}!Ft(ue)&&await P(ue,Y,H)}}return H.valid},A=()=>{for(const R of a.unMount){const Y=ae(r,R);Y&&(Y._f.refs?Y._f.refs.every(H=>!ba(H)):!ba(Y._f.ref))&&oe(R)}a.unMount=new Set},M=(R,Y)=>!t.disabled&&(R&&Y&&Ve(s,R,Y),!ln(V(),o)),F=(R,Y,H)=>ha(R,a,{...i.mount?s:st(Y)?o:Ht(R)?{[R]:Y}:Y},H,Y),N=R=>ca(ae(i.mount?s:o,R,t.shouldUnregister?ae(o,R,[]):[])),W=(R,Y,H={})=>{const ee=ae(r,R);let te=Y;if(ee){const ne=ee._f;ne&&(!ne.disabled&&Ve(s,R,Zu(Y,ne)),te=vs(ne.ref)&&$t(Y)?"":Y,Yu(ne.ref)?[...ne.ref.options].forEach(ue=>ue.selected=te.includes(ue.value)):ne.refs?Co(ne.ref)?ne.refs.forEach(ue=>{(!ue.defaultChecked||!ue.disabled)&&(Array.isArray(te)?ue.checked=!!te.find(be=>be===ue.value):ue.checked=te===ue.value||!!te)}):ne.refs.forEach(ue=>ue.checked=ue.value===te):ya(ne.ref)?ne.ref.value="":(ne.ref.value=te,ne.ref.type||h.state.next({name:R,values:vt(s)})))}(H.shouldDirty||H.shouldTouch)&&S(R,te,H.shouldTouch,H.shouldDirty,!0),H.shouldValidate&&D(R)},E=(R,Y,H)=>{for(const ee in Y){if(!Y.hasOwnProperty(ee))return;const te=Y[ee],ne=R+"."+ee,ue=ae(r,ne);(a.array.has(R)||yt(te)||ue&&!ue._f)&&!Or(te)?E(ne,te,H):W(ne,te,H)}},k=(R,Y,H={})=>{const ee=ae(r,R),te=a.array.has(R),ne=vt(Y);Ve(s,R,ne),te?(h.array.next({name:R,values:vt(s)}),(f.isDirty||f.dirtyFields||d.isDirty||d.dirtyFields)&&H.shouldDirty&&h.state.next({name:R,dirtyFields:Hr(o,s),isDirty:M(R,ne)})):ee&&!ee._f&&!$t(ne)?E(R,ne,H):W(R,ne,H),Qu(R,a)?h.state.next({...n,name:R,values:vt(s)}):h.state.next({name:i.mount?R:void 0,values:vt(s)})},U=async R=>{i.mount=!0;const Y=R.target;let H=Y.name,ee=!0;const te=ae(r,H),ne=Oe=>{ee=Number.isNaN(Oe)||Or(Oe)&&isNaN(Oe.getTime())||ln(Oe,ae(s,H,Oe))},ue=Xu(t.mode),be=Xu(t.reValidateMode);if(te){let Oe,ze;const ot=Y.type?Ku(te._f):Ru(R),Qe=R.type===ys.BLUR||R.type===ys.FOCUS_OUT,xt=!ub(te._f)&&!t.resolver&&!ae(n.errors,H)&&!te._f.deps||hb(Qe,ae(n.touchedFields,H),n.isSubmitted,be,ue),gt=Qu(H,a,Qe);Ve(s,H,ot),Qe?(!Y||!Y.readOnly)&&(te._f.onBlur&&te._f.onBlur(R),c&&c(0)):te._f.onChange&&te._f.onChange(R);const dt=S(H,ot,Qe),jt=!Ft(dt)||gt;if(!Qe&&h.state.next({name:H,type:R.type,values:vt(s)}),xt)return(f.isValid||d.isValid)&&(t.mode==="onBlur"?Qe&&y():Qe||y()),jt&&h.state.next({name:H,...gt?{}:dt});if(!Qe&&gt&&h.state.next({...n}),t.resolver){const{errors:Sn}=await v([H]);if(g([H]),ne(ot),ee){const kn=ef(n.errors,r,H),_e=ef(Sn,r,kn.name||H);Oe=_e.error,H=_e.name,ze=Ft(Sn)}}else g([H],!0),Oe=(await nf(te,a.disabled,s,m,t.shouldUseNativeValidation))[H],g([H]),ne(ot),ee&&(Oe?ze=!1:(f.isValid||d.isValid)&&(ze=await P(r,!0)));ee&&(te._f.deps&&(!Array.isArray(te._f.deps)||te._f.deps.length>0)&&D(te._f.deps),I(H,ze,Oe,dt))}},$=(R,Y)=>{if(ae(n.errors,Y)&&R.focus)return R.focus(),1},D=async(R,Y={})=>{let H,ee;const te=To(R);if(t.resolver){const ne=await x(st(R)?R:te);H=Ft(ne),ee=R?!te.some(ue=>ae(ne,ue)):H}else R?(ee=(await Promise.all(te.map(async ne=>{const ue=ae(r,ne);return await P(ue&&ue._f?{[ne]:ue}:ue)}))).every(Boolean),!(!ee&&!n.isValid)&&y()):ee=H=await P(r);return h.state.next({...!Ht(R)||(f.isValid||d.isValid)&&H!==n.isValid?{}:{name:R},...t.resolver||!R?{isValid:H}:{},errors:n.errors}),Y.shouldFocus&&!ee&&Ao(r,$,R?te:a.mount),ee},V=(R,Y)=>{let H={...i.mount?s:o};return Y&&(H=Uu(Y.dirtyFields?n.dirtyFields:n.touchedFields,H)),st(R)?H:Ht(R)?ae(H,R):R.map(ee=>ae(H,ee))},Z=(R,Y)=>({invalid:!!ae((Y||n).errors,R),isDirty:!!ae((Y||n).dirtyFields,R),error:ae((Y||n).errors,R),isValidating:!!ae(n.validatingFields,R),isTouched:!!ae((Y||n).touchedFields,R)}),G=R=>{R&&To(R).forEach(Y=>bt(n.errors,Y)),h.state.next({errors:R?n.errors:{}})},B=(R,Y,H)=>{const ee=(ae(r,R,{_f:{}})._f||{}).ref,te=ae(n.errors,R)||{},{ref:ne,message:ue,type:be,...Oe}=te;Ve(n.errors,R,{...Oe,...Y,ref:ee}),h.state.next({name:R,errors:n.errors,isValid:!1}),H&&H.shouldFocus&&ee&&ee.focus&&ee.focus()},z=(R,Y)=>It(R)?h.state.subscribe({next:H=>"values"in H&&R(F(void 0,Y),H)}):F(R,Y,!0),X=R=>h.state.subscribe({next:Y=>{db(R.name,Y.name,R.exact)&&fb(Y,R.formState||f,We,R.reRenderRoot)&&R.callback({values:{...s},...n,...Y,defaultValues:o})}}).unsubscribe,q=R=>(i.mount=!0,d={...d,...R.formState},X({...R,formState:{...l,...R.formState}})),oe=(R,Y={})=>{for(const H of R?To(R):a.mount)a.mount.delete(H),a.array.delete(H),Y.keepValue||(bt(r,H),bt(s,H)),!Y.keepError&&bt(n.errors,H),!Y.keepDirty&&bt(n.dirtyFields,H),!Y.keepTouched&&bt(n.touchedFields,H),!Y.keepIsValidating&&bt(n.validatingFields,H),!t.shouldUnregister&&!Y.keepDefaultValue&&bt(o,H);h.state.next({values:vt(s)}),h.state.next({...n,...Y.keepDirty?{isDirty:M()}:{}}),!Y.keepIsValid&&y()},Q=({disabled:R,name:Y})=>{if(Bt(R)&&i.mount||R||a.disabled.has(Y)){const te=a.disabled.has(Y)!==!!R;R?a.disabled.add(Y):a.disabled.delete(Y),te&&i.mount&&!i.action&&y()}},re=(R,Y={})=>{let H=ae(r,R);const ee=Bt(Y.disabled)||Bt(t.disabled);return Ve(r,R,{...H||{},_f:{...H&&H._f?H._f:{ref:{name:R}},name:R,mount:!0,...Y}}),a.mount.add(R),H?Q({disabled:Bt(Y.disabled)?Y.disabled:t.disabled,name:R}):_(R,!0,Y.value),{...ee?{disabled:Y.disabled||t.disabled}:{},...t.progressive?{required:!!Y.required,min:Do(Y.min),max:Do(Y.max),minLength:Do(Y.minLength),maxLength:Do(Y.maxLength),pattern:Do(Y.pattern)}:{},name:R,onChange:U,onBlur:U,ref:te=>{if(te){re(R,Y),H=ae(r,R);const ne=st(te.value)&&te.querySelectorAll&&te.querySelectorAll("input,select,textarea")[0]||te,ue=ob(ne),be=H._f.refs||[];if(ue?be.find(Oe=>Oe===ne):ne===H._f.ref)return;Ve(r,R,{_f:{...H._f,...ue?{refs:[...be.filter(ba),ne,...Array.isArray(ae(o,R))?[{}]:[]],ref:{type:ne.type,name:R}}:{ref:ne}}}),_(R,!1,void 0,ne)}else H=ae(r,R,{}),H._f&&(H._f.mount=!1),(t.shouldUnregister||Y.shouldUnregister)&&!(Wu(a.array,R)&&i.action)&&a.unMount.add(R)}}},le=()=>t.shouldFocusError&&Ao(r,$,a.mount),K=R=>{Bt(R)&&(h.state.next({disabled:R}),Ao(r,(Y,H)=>{const ee=ae(r,H);ee&&(Y.disabled=ee._f.disabled||R,Array.isArray(ee._f.refs)&&ee._f.refs.forEach(te=>{te.disabled=ee._f.disabled||R}))},0,!1))},Se=(R,Y)=>async H=>{let ee;H&&(H.preventDefault&&H.preventDefault(),H.persist&&H.persist());let te=vt(s);if(h.state.next({isSubmitting:!0}),t.resolver){const{errors:ne,values:ue}=await v();g(),n.errors=ne,te=vt(ue)}else await P(r);if(a.disabled.size)for(const ne of a.disabled)bt(te,ne);if(bt(n.errors,"root"),Ft(n.errors)){h.state.next({errors:{}});try{await R(te,H)}catch(ne){ee=ne}}else Y&&await Y({...n.errors},H),le(),setTimeout(le);if(h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Ft(n.errors)&&!ee,submitCount:n.submitCount+1,errors:n.errors}),ee)throw ee},Ie=(R,Y={})=>{ae(r,R)&&(st(Y.defaultValue)?k(R,vt(ae(o,R))):(k(R,Y.defaultValue),Ve(o,R,vt(Y.defaultValue))),Y.keepTouched||bt(n.touchedFields,R),Y.keepDirty||(bt(n.dirtyFields,R),n.isDirty=Y.defaultValue?M(R,vt(ae(o,R))):M()),Y.keepError||(bt(n.errors,R),f.isValid&&y()),h.state.next({...n}))},ke=(R,Y={})=>{const H=R?vt(R):o,ee=vt(H),te=Ft(R),ne=te?o:ee;if(Y.keepDefaultValues||(o=H),!Y.keepValues){if(Y.keepDirtyValues){const ue=new Set([...a.mount,...Object.keys(Hr(o,s))]);for(const be of Array.from(ue)){const Oe=ae(n.dirtyFields,be),ze=ae(s,be),ot=ae(ne,be);Oe&&!st(ze)?Ve(ne,be,ze):!Oe&&!st(ot)&&k(be,ot)}}else{if(aa&&st(R))for(const ue of a.mount){const be=ae(r,ue);if(be&&be._f){const Oe=Array.isArray(be._f.refs)?be._f.refs[0]:be._f.ref;if(vs(Oe)){const ze=Oe.closest("form");if(ze){ze.reset();break}}}}if(Y.keepFieldsRef)for(const ue of a.mount)k(ue,ae(ne,ue));else r={}}s=t.shouldUnregister?Y.keepDefaultValues?vt(o):{}:vt(ne),h.array.next({values:{...ne}}),h.state.next({values:{...ne}})}a={mount:Y.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!f.isValid||!!Y.keepIsValid||!!Y.keepDirtyValues||!t.shouldUnregister&&!Ft(ne),i.watch=!!t.shouldUnregister,i.keepIsValid=!!Y.keepIsValid,i.action=!1,Y.keepErrors||(n.errors={}),h.state.next({submitCount:Y.keepSubmitCount?n.submitCount:0,isDirty:te?!1:Y.keepDirty?n.isDirty:!!(Y.keepDefaultValues&&!ln(R,o)),isSubmitted:Y.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:te?{}:Y.keepDirtyValues?Y.keepDefaultValues&&s?Hr(o,s):n.dirtyFields:Y.keepDefaultValues&&R?Hr(o,R):Y.keepDirty?n.dirtyFields:{},touchedFields:Y.keepTouched?n.touchedFields:{},errors:Y.keepErrors?n.errors:{},isSubmitSuccessful:Y.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},Ge=(R,Y)=>ke(It(R)?R(s):R,{...t.resetOptions,...Y}),Re=(R,Y={})=>{const H=ae(r,R),ee=H&&H._f;if(ee){const te=ee.refs?ee.refs[0]:ee.ref;te.focus&&setTimeout(()=>{te.focus(),Y.shouldSelect&&It(te.select)&&te.select()})}},We=R=>{n={...n,...R}},rt={control:{register:re,unregister:oe,getFieldState:Z,handleSubmit:Se,setError:B,_subscribe:X,_runSchema:v,_updateIsValidating:g,_focusError:le,_getWatch:F,_getDirty:M,_setValid:y,_setFieldArray:C,_setDisabledField:Q,_setErrors:w,_getFieldArray:N,_reset:ke,_resetDefaultValues:()=>It(t.defaultValues)&&t.defaultValues().then(R=>{Ge(R,t.resetOptions),h.state.next({isLoading:!1})}),_removeUnmounted:A,_disableForm:K,_subjects:h,_proxyFormState:f,get _fields(){return r},get _formValues(){return s},get _state(){return i},set _state(R){i=R},get _defaultValues(){return o},get _names(){return a},set _names(R){a=R},get _formState(){return n},get _options(){return t},set _options(R){t={...t,...R}}},subscribe:q,trigger:D,register:re,handleSubmit:Se,watch:z,setValue:k,getValues:V,reset:Ge,resetField:Ie,clearErrors:G,unregister:oe,setError:B,setFocus:Re,getFieldState:Z};return{...rt,formControl:rt}}function vb(e={}){const t=j.useRef(void 0),n=j.useRef(void 0),[r,o]=j.useState({isDirty:!1,isValidating:!1,isLoading:It(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:It(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:r},e.defaultValues&&!It(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:i,...a}=yb(e);t.current={...a,formState:r}}const s=t.current.control;return s._options=e,da(()=>{const i=s._subscribe({formState:s._proxyFormState,callback:()=>o({...s._formState}),reRenderRoot:!0});return o(a=>({...a,isReady:!0})),s._formState.isReady=!0,i},[s]),j.useEffect(()=>s._disableForm(e.disabled),[s,e.disabled]),j.useEffect(()=>{e.mode&&(s._options.mode=e.mode),e.reValidateMode&&(s._options.reValidateMode=e.reValidateMode)},[s,e.mode,e.reValidateMode]),j.useEffect(()=>{e.errors&&(s._setErrors(e.errors),s._focusError())},[s,e.errors]),j.useEffect(()=>{e.shouldUnregister&&s._subjects.state.next({values:s._getWatch()})},[s,e.shouldUnregister]),j.useEffect(()=>{if(s._proxyFormState.isDirty){const i=s._getDirty();i!==r.isDirty&&s._subjects.state.next({isDirty:i})}},[s,r.isDirty]),j.useEffect(()=>{var i;e.values&&!ln(e.values,n.current)?(s._reset(e.values,{keepFieldsRef:!0,...s._options.resetOptions}),!((i=s._options.resetOptions)===null||i===void 0)&&i.keepIsValid||s._setValid(),n.current=e.values,o(a=>({...a}))):s._resetDefaultValues()},[s,e.values]),j.useEffect(()=>{s._state.mount||(s._setValid(),s._state.mount=!0),s._state.watch&&(s._state.watch=!1,s._subjects.state.next({...s._formState})),s._removeUnmounted()}),t.current.formState=j.useMemo(()=>zu(r,s),[s,r]),t.current}function J(e,t,n){function r(a,c){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:c,constr:i,traits:new Set},enumerable:!1}),a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,c);const u=i.prototype,l=Object.keys(u);for(let f=0;f<l.length;f++){const d=l[f];d in a||(a[d]=u[d].bind(a))}}const o=n?.Parent??Object;class s extends o{}Object.defineProperty(s,"name",{value:e});function i(a){var c;const u=n?.Parent?new s:this;r(u,a),(c=u._zod).deferred??(c.deferred=[]);for(const l of u._zod.deferred)l();return u}return Object.defineProperty(i,"init",{value:r}),Object.defineProperty(i,Symbol.hasInstance,{value:a=>n?.Parent&&a instanceof n.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(i,"name",{value:e}),i}class Gr extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class rf extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const of={};function Er(e){return of}function sf(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function _a(e,t){return typeof t=="bigint"?t.toString():t}function Sa(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function ka(e){return e==null}function xa(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const af=Symbol("evaluating");function Be(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==af)return r===void 0&&(r=af,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function Cr(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function or(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function cf(e){return JSON.stringify(e)}function bb(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const lf="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function ws(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const wb=Sa(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Mo(e){if(ws(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(ws(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function uf(e){return Mo(e)?{...e}:Array.isArray(e)?[...e]:e}const _b=new Set(["string","number","symbol"]);function qr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function sr(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function we(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function Sb(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function kb(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const s=or(e._zod.def,{get shape(){const i={};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(i[a]=n.shape[a])}return Cr(this,"shape",i),i},checks:[]});return sr(e,s)}function xb(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const s=or(e._zod.def,{get shape(){const i={...e._zod.def.shape};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete i[a]}return Cr(this,"shape",i),i},checks:[]});return sr(e,s)}function Ob(e,t){if(!Mo(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const s=e._zod.def.shape;for(const i in t)if(Object.getOwnPropertyDescriptor(s,i)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=or(e._zod.def,{get shape(){const s={...e._zod.def.shape,...t};return Cr(this,"shape",s),s}});return sr(e,o)}function Eb(e,t){if(!Mo(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=or(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return Cr(this,"shape",r),r}});return sr(e,n)}function Cb(e,t){const n=or(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return Cr(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return sr(e,n)}function Tb(e,t,n){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const i=or(t._zod.def,{get shape(){const a=t._zod.def.shape,c={...a};if(n)for(const u in n){if(!(u in a))throw new Error(`Unrecognized key: "${u}"`);n[u]&&(c[u]=e?new e({type:"optional",innerType:a[u]}):a[u])}else for(const u in a)c[u]=e?new e({type:"optional",innerType:a[u]}):a[u];return Cr(this,"shape",c),c},checks:[]});return sr(t,i)}function Db(e,t,n){const r=or(t._zod.def,{get shape(){const o=t._zod.def.shape,s={...o};if(n)for(const i in n){if(!(i in s))throw new Error(`Unrecognized key: "${i}"`);n[i]&&(s[i]=new e({type:"nonoptional",innerType:o[i]}))}else for(const i in o)s[i]=new e({type:"nonoptional",innerType:o[i]});return Cr(this,"shape",s),s}});return sr(t,r)}function Kr(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function ff(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function _s(e){return typeof e=="string"?e:e?.message}function Tr(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const o=_s(e.inst?._zod.def?.error?.(e))??_s(t?.error?.(e))??_s(n.customError?.(e))??_s(n.localeError?.(e))??"Invalid input";r.message=o}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function Oa(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Po(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const df=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,_a,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Ea=J("$ZodError",df),Ss=J("$ZodError",df,{Parent:Error});function Ab(e,t=n=>n.message){const n={},r=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}function Mb(e,t=n=>n.message){const n={_errors:[]},r=o=>{for(const s of o.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(i=>r({issues:i}));else if(s.code==="invalid_key")r({issues:s.issues});else if(s.code==="invalid_element")r({issues:s.issues});else if(s.path.length===0)n._errors.push(t(s));else{let i=n,a=0;for(;a<s.path.length;){const c=s.path[a];a===s.path.length-1?(i[c]=i[c]||{_errors:[]},i[c]._errors.push(t(s))):i[c]=i[c]||{_errors:[]},i=i[c],a++}}};return r(e),n}const ks=e=>(t,n,r,o)=>{const s=r?Object.assign(r,{async:!1}):{async:!1},i=t._zod.run({value:n,issues:[]},s);if(i instanceof Promise)throw new Gr;if(i.issues.length){const a=new(o?.Err??e)(i.issues.map(c=>Tr(c,s,Er())));throw lf(a,o?.callee),a}return i.value},Pb=ks(Ss),xs=e=>async(t,n,r,o)=>{const s=r?Object.assign(r,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},s);if(i instanceof Promise&&(i=await i),i.issues.length){const a=new(o?.Err??e)(i.issues.map(c=>Tr(c,s,Er())));throw lf(a,o?.callee),a}return i.value},Nb=xs(Ss),Os=e=>(t,n,r)=>{const o=r?{...r,async:!1}:{async:!1},s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise)throw new Gr;return s.issues.length?{success:!1,error:new(e??Ea)(s.issues.map(i=>Tr(i,o,Er())))}:{success:!0,data:s.value}},Ib=Os(Ss),Es=e=>async(t,n,r)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let s=t._zod.run({value:n,issues:[]},o);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(i=>Tr(i,o,Er())))}:{success:!0,data:s.value}},Fb=Es(Ss),Rb=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return ks(e)(t,n,o)},Wb=e=>(t,n,r)=>ks(e)(t,n,r),zb=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return xs(e)(t,n,o)},Lb=e=>async(t,n,r)=>xs(e)(t,n,r),$b=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Os(e)(t,n,o)},Ub=e=>(t,n,r)=>Os(e)(t,n,r),Yb=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Es(e)(t,n,o)},jb=e=>async(t,n,r)=>Es(e)(t,n,r),Vb=/^[cC][^\s-]{8,}$/,Bb=/^[0-9a-z]+$/,Hb=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Zb=/^[0-9a-vA-V]{20}$/,Gb=/^[A-Za-z0-9]{27}$/,qb=/^[a-zA-Z0-9_-]{21}$/,Kb=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Xb=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,hf=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Jb=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Qb="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function ew(){return new RegExp(Qb,"u")}const tw=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,nw=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,rw=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,ow=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,sw=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,pf=/^[A-Za-z0-9_-]*$/,iw=/^\+[1-9]\d{6,14}$/,mf="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",aw=new RegExp(`^${mf}$`);function gf(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function cw(e){return new RegExp(`^${gf(e)}$`)}function lw(e){const t=gf({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${mf}T(?:${r})$`)}const uw=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},fw=/^[^A-Z]*$/,dw=/^[^a-z]*$/,en=J("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),yf={number:"number",bigint:"bigint",object:"date"},hw=J("$ZodCheckLessThan",(e,t)=>{en.init(e,t);const n=yf[typeof t.value];e._zod.onattach.push(r=>{const o=r._zod.bag,s=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<s&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),pw=J("$ZodCheckGreaterThan",(e,t)=>{en.init(e,t);const n=yf[typeof t.value];e._zod.onattach.push(r=>{const o=r._zod.bag,s=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),mw=J("$ZodCheckMaxLength",(e,t)=>{var n;en.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!ka(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const o=r.value;if(o.length<=t.maximum)return;const i=Oa(o);r.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),gw=J("$ZodCheckMinLength",(e,t)=>{var n;en.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!ka(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const o=r.value;if(o.length>=t.minimum)return;const i=Oa(o);r.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),yw=J("$ZodCheckLengthEquals",(e,t)=>{var n;en.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!ka(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=r=>{const o=r.value,s=o.length;if(s===t.length)return;const i=Oa(o),a=s>t.length;r.issues.push({origin:i,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),Cs=J("$ZodCheckStringFormat",(e,t)=>{var n,r;en.init(e,t),e._zod.onattach.push(o=>{const s=o._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),vw=J("$ZodCheckRegex",(e,t)=>{Cs.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),bw=J("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=fw),Cs.init(e,t)}),ww=J("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=dw),Cs.init(e,t)}),_w=J("$ZodCheckIncludes",(e,t)=>{en.init(e,t);const n=qr(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(o=>{const s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(r)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),Sw=J("$ZodCheckStartsWith",(e,t)=>{en.init(e,t);const n=new RegExp(`^${qr(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),kw=J("$ZodCheckEndsWith",(e,t)=>{en.init(e,t);const n=new RegExp(`.*${qr(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),xw=J("$ZodCheckOverwrite",(e,t)=>{en.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class Ow{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
1
+ (function(T,j){typeof exports=="object"&&typeof module<"u"?module.exports=j(require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["react/jsx-runtime","react","react-dom"],j):(T=typeof globalThis<"u"?globalThis:T||self,T["brauz-questionnaire-ui"]=j(T["react/jsx-runtime"],T.React,T.reactDOM))})(this,(function(T,j,Pu){"use strict";function Nu(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const b=Nu(j),ms=Nu(Pu),qv={with_section_title:!0,with_label:!0,form_config:{},renderFooter:null},Iu=j.createContext();function Kv({children:e,config:t={}}){return T.jsx(Iu.Provider,{value:{...qv,...t},children:e})}function ia(){return j.useContext(Iu)}var Co=e=>e.type==="checkbox",Or=e=>e instanceof Date,$t=e=>e==null;const Fu=e=>typeof e=="object";var yt=e=>!$t(e)&&!Array.isArray(e)&&Fu(e)&&!Or(e),Ru=e=>yt(e)&&e.target?Co(e.target)?e.target.checked:e.target.value:e,Xv=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Wu=(e,t)=>e.has(Xv(t)),Jv=e=>{const t=e.constructor&&e.constructor.prototype;return yt(t)&&t.hasOwnProperty("isPrototypeOf")},aa=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function vt(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(aa&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!n&&!(yt(e)&&Jv(e)))return e;const r=n?[]:Object.create(Object.getPrototypeOf(e));for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=vt(e[o]));return r}var gs=e=>/^\w*$/.test(e),st=e=>e===void 0,ca=e=>Array.isArray(e)?e.filter(Boolean):[],la=e=>ca(e.replace(/["|']|\]/g,"").split(/\.|\[/)),ae=(e,t,n)=>{if(!t||!yt(e))return n;const r=(gs(t)?[t]:la(t)).reduce((o,s)=>$t(o)?o:o[s],e);return st(r)||r===e?st(e[t])?n:e[t]:r},Bt=e=>typeof e=="boolean",It=e=>typeof e=="function",Ve=(e,t,n)=>{let r=-1;const o=gs(t)?[t]:la(t),s=o.length,i=s-1;for(;++r<s;){const a=o[r];let c=n;if(r!==i){const u=e[a];c=yt(u)||Array.isArray(u)?u:isNaN(+o[r+1])?{}:[]}if(a==="__proto__"||a==="constructor"||a==="prototype")return;e[a]=c,e=e[a]}};const ys={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},cn={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Ln={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},ua=j.createContext(null);ua.displayName="HookFormControlContext";const fa=()=>j.useContext(ua);var zu=(e,t,n,r=!0)=>{const o={defaultValues:t._defaultValues};for(const s in e)Object.defineProperty(o,s,{get:()=>{const i=s;return t._proxyFormState[i]!==cn.all&&(t._proxyFormState[i]=!r||cn.all),n&&(n[i]=!0),e[i]}});return o};const da=typeof window<"u"?j.useLayoutEffect:j.useEffect;function Lu(e){const t=fa(),{control:n=t,disabled:r,name:o,exact:s}=e||{},[i,a]=j.useState(n._formState),c=j.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return da(()=>n._subscribe({name:o,formState:c.current,exact:s,callback:u=>{!r&&a({...n._formState,...u})}}),[o,r,s]),j.useEffect(()=>{c.current.isValid&&n._setValid(!0)},[n]),j.useMemo(()=>zu(i,n,c.current,!1),[i,n])}var Ht=e=>typeof e=="string",ha=(e,t,n,r,o)=>Ht(e)?(r&&t.watch.add(e),ae(n,e,o)):Array.isArray(e)?e.map(s=>(r&&t.watch.add(s),ae(n,s))):(r&&(t.watchAll=!0),n),pa=e=>$t(e)||!Fu(e);function ln(e,t,n=new WeakSet){if(pa(e)||pa(t))return Object.is(e,t);if(Or(e)&&Or(t))return Object.is(e.getTime(),t.getTime());const r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const s of r){const i=e[s];if(!o.includes(s))return!1;if(s!=="ref"){const a=t[s];if(Or(i)&&Or(a)||yt(i)&&yt(a)||Array.isArray(i)&&Array.isArray(a)?!ln(i,a,n):!Object.is(i,a))return!1}}return!0}function Qv(e){const t=fa(),{control:n=t,name:r,defaultValue:o,disabled:s,exact:i,compute:a}=e||{},c=j.useRef(o),u=j.useRef(a),l=j.useRef(void 0),f=j.useRef(n),d=j.useRef(r);u.current=a;const[h,m]=j.useState(()=>{const w=n._getWatch(r,c.current);return u.current?u.current(w):w}),p=j.useCallback(w=>{const _=ha(r,n._names,w||n._formValues,!1,c.current);return u.current?u.current(_):_},[n._formValues,n._names,r]),y=j.useCallback(w=>{if(!s){const _=ha(r,n._names,w||n._formValues,!1,c.current);if(u.current){const S=u.current(_);ln(S,l.current)||(m(S),l.current=S)}else m(_)}},[n._formValues,n._names,s,r]);da(()=>((f.current!==n||!ln(d.current,r))&&(f.current=n,d.current=r,y()),n._subscribe({name:r,formState:{values:!0},exact:i,callback:w=>{y(w.values)}})),[n,i,r,y]),j.useEffect(()=>n._removeUnmounted());const g=f.current!==n,C=d.current,O=j.useMemo(()=>{if(s)return null;const w=!g&&!ln(C,r);return g||w?p():null},[s,g,r,C,p]);return O!==null?O:h}function eb(e){const t=fa(),{name:n,disabled:r,control:o=t,shouldUnregister:s,defaultValue:i,exact:a=!0}=e,c=Wu(o._names.array,n),u=j.useMemo(()=>ae(o._formValues,n,ae(o._defaultValues,n,i)),[o,n,i]),l=Qv({control:o,name:n,defaultValue:u,exact:a}),f=Lu({control:o,name:n,exact:a}),d=j.useRef(e),h=j.useRef(void 0),m=j.useRef(o.register(n,{...e.rules,value:l,...Bt(e.disabled)?{disabled:e.disabled}:{}}));d.current=e;const p=j.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!ae(f.errors,n)},isDirty:{enumerable:!0,get:()=>!!ae(f.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!ae(f.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!ae(f.validatingFields,n)},error:{enumerable:!0,get:()=>ae(f.errors,n)}}),[f,n]),y=j.useCallback(w=>m.current.onChange({target:{value:Ru(w),name:n},type:ys.CHANGE}),[n]),g=j.useCallback(()=>m.current.onBlur({target:{value:ae(o._formValues,n),name:n},type:ys.BLUR}),[n,o._formValues]),C=j.useCallback(w=>{const _=ae(o._fields,n);_&&_._f&&w&&(_._f.ref={focus:()=>It(w.focus)&&w.focus(),select:()=>It(w.select)&&w.select(),setCustomValidity:S=>It(w.setCustomValidity)&&w.setCustomValidity(S),reportValidity:()=>It(w.reportValidity)&&w.reportValidity()})},[o._fields,n]),O=j.useMemo(()=>({name:n,value:l,...Bt(r)||f.disabled?{disabled:f.disabled||r}:{},onChange:y,onBlur:g,ref:C}),[n,r,f.disabled,y,g,C,l]);return j.useEffect(()=>{const w=o._options.shouldUnregister||s,_=h.current;_&&_!==n&&!c&&o.unregister(_),o.register(n,{...d.current.rules,...Bt(d.current.disabled)?{disabled:d.current.disabled}:{}});const S=(I,v)=>{const x=ae(o._fields,I);x&&x._f&&(x._f.mount=v)};if(S(n,!0),w){const I=vt(ae(o._options.defaultValues,n,d.current.defaultValue));Ve(o._defaultValues,n,I),st(ae(o._formValues,n))&&Ve(o._formValues,n,I)}return!c&&o.register(n),h.current=n,()=>{(c?w&&!o._state.action:w)?o.unregister(n):S(n,!1)}},[n,o,c,s]),j.useEffect(()=>{o._setDisabledField({disabled:r,name:n})},[r,n,o]),j.useMemo(()=>({field:O,formState:f,fieldState:p}),[O,f,p])}const tb=e=>e.render(eb(e)),ma=j.createContext(null);ma.displayName="HookFormContext";const nb=()=>j.useContext(ma),rb=e=>{const{children:t,watch:n,getValues:r,getFieldState:o,setError:s,clearErrors:i,setValue:a,trigger:c,formState:u,resetField:l,reset:f,handleSubmit:d,unregister:h,control:m,register:p,setFocus:y,subscribe:g}=e;return j.createElement(ma.Provider,{value:j.useMemo(()=>({watch:n,getValues:r,getFieldState:o,setError:s,clearErrors:i,setValue:a,trigger:c,formState:u,resetField:l,reset:f,handleSubmit:d,unregister:h,control:m,register:p,setFocus:y,subscribe:g}),[i,m,u,o,r,d,p,f,l,s,y,a,g,c,h,n])},j.createElement(ua.Provider,{value:m},t))};var ga=(e,t,n,r,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:o||!0}}:{},To=e=>Array.isArray(e)?e:[e],$u=()=>{let e=[];return{get observers(){return e},next:o=>{for(const s of e)s.next&&s.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(s=>s!==o)}}),unsubscribe:()=>{e=[]}}};function Uu(e,t){const n={};for(const r in e)if(e.hasOwnProperty(r)){const o=e[r],s=t[r];if(o&&yt(o)&&s){const i=Uu(o,s);yt(i)&&(n[r]=i)}else e[r]&&(n[r]=s)}return n}var Ft=e=>yt(e)&&!Object.keys(e).length,ya=e=>e.type==="file",vs=e=>{if(!aa)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Yu=e=>e.type==="select-multiple",va=e=>e.type==="radio",ob=e=>va(e)||Co(e),ba=e=>vs(e)&&e.isConnected;function sb(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=st(e)?r++:e[t[r++]];return e}function ib(e){for(const t in e)if(e.hasOwnProperty(t)&&!st(e[t]))return!1;return!0}function bt(e,t){const n=Array.isArray(t)?t:gs(t)?[t]:la(t),r=n.length===1?e:sb(e,n),o=n.length-1,s=n[o];return r&&delete r[s],o!==0&&(yt(r)&&Ft(r)||Array.isArray(r)&&ib(r))&&bt(e,n.slice(0,-1)),e}var ab=e=>{for(const t in e)if(It(e[t]))return!0;return!1};function ju(e){return Array.isArray(e)||yt(e)&&!ab(e)}function wa(e,t={}){for(const n in e){const r=e[n];ju(r)?(t[n]=Array.isArray(r)?[]:{},wa(r,t[n])):st(r)||(t[n]=!0)}return t}function Hr(e,t,n){n||(n=wa(t));for(const r in e){const o=e[r];if(ju(o))st(t)||pa(n[r])?n[r]=wa(o,Array.isArray(o)?[]:{}):Hr(o,$t(t)?{}:t[r],n[r]);else{const s=t[r];n[r]=!ln(o,s)}}return n}const Vu={value:!1,isValid:!1},Bu={value:!0,isValid:!0};var Hu=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!st(e[0].attributes.value)?st(e[0].value)||e[0].value===""?Bu:{value:e[0].value,isValid:!0}:Bu:Vu}return Vu},Zu=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>st(e)?e:t?e===""?NaN:e&&+e:n&&Ht(e)?new Date(e):r?r(e):e;const Gu={isValid:!1,value:null};var qu=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,Gu):Gu;function Ku(e){const t=e.ref;return ya(t)?t.files:va(t)?qu(e.refs).value:Yu(t)?[...t.selectedOptions].map(({value:n})=>n):Co(t)?Hu(e.refs).value:Zu(st(t.value)?e.ref.value:t.value,e)}var cb=(e,t,n,r)=>{const o={};for(const s of e){const i=ae(t,s);i&&Ve(o,s,i._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:r}},bs=e=>e instanceof RegExp,Do=e=>st(e)?e:bs(e)?e.source:yt(e)?bs(e.value)?e.value.source:e.value:e,Xu=e=>({isOnSubmit:!e||e===cn.onSubmit,isOnBlur:e===cn.onBlur,isOnChange:e===cn.onChange,isOnAll:e===cn.all,isOnTouch:e===cn.onTouched});const Ju="AsyncFunction";var lb=e=>!!e&&!!e.validate&&!!(It(e.validate)&&e.validate.constructor.name===Ju||yt(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===Ju)),ub=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Qu=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Mo=(e,t,n,r)=>{for(const o of n||Object.keys(e)){const s=ae(e,o);if(s){const{_f:i,...a}=s;if(i){if(i.refs&&i.refs[0]&&t(i.refs[0],o)&&!r)return!0;if(i.ref&&t(i.ref,i.name)&&!r)return!0;if(Mo(a,t))break}else if(yt(a)&&Mo(a,t))break}}};function ef(e,t,n){const r=ae(e,n);if(r||gs(n))return{error:r,name:n};const o=n.split(".");for(;o.length;){const s=o.join("."),i=ae(t,s),a=ae(e,s);if(i&&!Array.isArray(i)&&n!==s)return{name:n};if(a&&a.type)return{name:s,error:a};if(a&&a.root&&a.root.type)return{name:`${s}.root`,error:a.root};o.pop()}return{name:n}}var fb=(e,t,n,r)=>{n(e);const{name:o,...s}=e;return Ft(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(i=>t[i]===(!r||cn.all))},db=(e,t,n)=>!e||!t||e===t||To(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r))),hb=(e,t,n,r,o)=>o.isOnAll?!1:!n&&o.isOnTouch?!(t||e):(n?r.isOnBlur:o.isOnBlur)?!e:(n?r.isOnChange:o.isOnChange)?e:!0,pb=(e,t)=>!ca(ae(e,t)).length&&bt(e,t),mb=(e,t,n)=>{const r=To(ae(e,n));return Ve(r,"root",t[n]),Ve(e,n,r),e};function tf(e,t,n="validate"){if(Ht(e)||Array.isArray(e)&&e.every(Ht)||Bt(e)&&!e)return{type:n,message:Ht(e)?e:"",ref:t}}var Zr=e=>yt(e)&&!bs(e)?e:{value:e,message:""},nf=async(e,t,n,r,o,s)=>{const{ref:i,refs:a,required:c,maxLength:u,minLength:l,min:f,max:d,pattern:h,validate:m,name:p,valueAsNumber:y,mount:g}=e._f,C=ae(n,p);if(!g||t.has(p))return{};const O=a?a[0]:i,w=A=>{o&&O.reportValidity&&(O.setCustomValidity(Bt(A)?"":A||""),O.reportValidity())},_={},S=va(i),I=Co(i),v=S||I,x=(y||ya(i))&&st(i.value)&&st(C)||vs(i)&&i.value===""||C===""||Array.isArray(C)&&!C.length,P=ga.bind(null,p,r,_),M=(A,F,N,W=Ln.maxLength,E=Ln.minLength)=>{const k=A?F:N;_[p]={type:A?W:E,message:k,ref:i,...P(A?W:E,k)}};if(s?!Array.isArray(C)||!C.length:c&&(!v&&(x||$t(C))||Bt(C)&&!C||I&&!Hu(a).isValid||S&&!qu(a).isValid)){const{value:A,message:F}=Ht(c)?{value:!!c,message:c}:Zr(c);if(A&&(_[p]={type:Ln.required,message:F,ref:O,...P(Ln.required,F)},!r))return w(F),_}if(!x&&(!$t(f)||!$t(d))){let A,F;const N=Zr(d),W=Zr(f);if(!$t(C)&&!isNaN(C)){const E=i.valueAsNumber||C&&+C;$t(N.value)||(A=E>N.value),$t(W.value)||(F=E<W.value)}else{const E=i.valueAsDate||new Date(C),k=D=>new Date(new Date().toDateString()+" "+D),U=i.type=="time",$=i.type=="week";Ht(N.value)&&C&&(A=U?k(C)>k(N.value):$?C>N.value:E>new Date(N.value)),Ht(W.value)&&C&&(F=U?k(C)<k(W.value):$?C<W.value:E<new Date(W.value))}if((A||F)&&(M(!!A,N.message,W.message,Ln.max,Ln.min),!r))return w(_[p].message),_}if((u||l)&&!x&&(Ht(C)||s&&Array.isArray(C))){const A=Zr(u),F=Zr(l),N=!$t(A.value)&&C.length>+A.value,W=!$t(F.value)&&C.length<+F.value;if((N||W)&&(M(N,A.message,F.message),!r))return w(_[p].message),_}if(h&&!x&&Ht(C)){const{value:A,message:F}=Zr(h);if(bs(A)&&!C.match(A)&&(_[p]={type:Ln.pattern,message:F,ref:i,...P(Ln.pattern,F)},!r))return w(F),_}if(m){if(It(m)){const A=await m(C,n),F=tf(A,O);if(F&&(_[p]={...F,...P(Ln.validate,F.message)},!r))return w(F.message),_}else if(yt(m)){let A={};for(const F in m){if(!Ft(A)&&!r)break;const N=tf(await m[F](C,n),O,F);N&&(A={...N,...P(F,N.message)},w(N.message),r&&(_[p]=A))}if(!Ft(A)&&(_[p]={ref:O,...A},!r))return _}}return w(!0),_};const gb={mode:cn.onSubmit,reValidateMode:cn.onChange,shouldFocusError:!0};function yb(e={}){let t={...gb,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:It(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},o=yt(t.defaultValues)||yt(t.values)?vt(t.defaultValues||t.values)||{}:{},s=t.shouldUnregister?{}:vt(o),i={action:!1,mount:!1,watch:!1,keepIsValid:!1},a={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c,u=0;const l={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={...l};let d={...f};const h={array:$u(),state:$u()},m=t.criteriaMode===cn.all,p=R=>Y=>{clearTimeout(u),u=setTimeout(R,Y)},y=async R=>{if(!i.keepIsValid&&!t.disabled&&(f.isValid||d.isValid||R)){let Y;t.resolver?(Y=Ft((await v()).errors),g()):Y=await P(r,!0),Y!==n.isValid&&h.state.next({isValid:Y})}},g=(R,Y)=>{!t.disabled&&(f.isValidating||f.validatingFields||d.isValidating||d.validatingFields)&&((R||Array.from(a.mount)).forEach(H=>{H&&(Y?Ve(n.validatingFields,H,Y):bt(n.validatingFields,H))}),h.state.next({validatingFields:n.validatingFields,isValidating:!Ft(n.validatingFields)}))},C=(R,Y=[],H,ee,te=!0,ne=!0)=>{if(ee&&H&&!t.disabled){if(i.action=!0,ne&&Array.isArray(ae(r,R))){const ue=H(ae(r,R),ee.argA,ee.argB);te&&Ve(r,R,ue)}if(ne&&Array.isArray(ae(n.errors,R))){const ue=H(ae(n.errors,R),ee.argA,ee.argB);te&&Ve(n.errors,R,ue),pb(n.errors,R)}if((f.touchedFields||d.touchedFields)&&ne&&Array.isArray(ae(n.touchedFields,R))){const ue=H(ae(n.touchedFields,R),ee.argA,ee.argB);te&&Ve(n.touchedFields,R,ue)}(f.dirtyFields||d.dirtyFields)&&(n.dirtyFields=Hr(o,s)),h.state.next({name:R,isDirty:A(R,Y),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Ve(s,R,Y)},O=(R,Y)=>{Ve(n.errors,R,Y),h.state.next({errors:n.errors})},w=R=>{n.errors=R,h.state.next({errors:n.errors,isValid:!1})},_=(R,Y,H,ee)=>{const te=ae(r,R);if(te){const ne=ae(s,R,st(H)?ae(o,R):H);st(ne)||ee&&ee.defaultChecked||Y?Ve(s,R,Y?ne:Ku(te._f)):W(R,ne),i.mount&&!i.action&&y()}},S=(R,Y,H,ee,te)=>{let ne=!1,ue=!1;const be={name:R};if(!t.disabled){if(!H||ee){(f.isDirty||d.isDirty)&&(ue=n.isDirty,n.isDirty=be.isDirty=A(),ne=ue!==be.isDirty);const Oe=ln(ae(o,R),Y);ue=!!ae(n.dirtyFields,R),Oe?bt(n.dirtyFields,R):Ve(n.dirtyFields,R,!0),be.dirtyFields=n.dirtyFields,ne=ne||(f.dirtyFields||d.dirtyFields)&&ue!==!Oe}if(H){const Oe=ae(n.touchedFields,R);Oe||(Ve(n.touchedFields,R,H),be.touchedFields=n.touchedFields,ne=ne||(f.touchedFields||d.touchedFields)&&Oe!==H)}ne&&te&&h.state.next(be)}return ne?be:{}},I=(R,Y,H,ee)=>{const te=ae(n.errors,R),ne=(f.isValid||d.isValid)&&Bt(Y)&&n.isValid!==Y;if(t.delayError&&H?(c=p(()=>O(R,H)),c(t.delayError)):(clearTimeout(u),c=null,H?Ve(n.errors,R,H):bt(n.errors,R)),(H?!ln(te,H):te)||!Ft(ee)||ne){const ue={...ee,...ne&&Bt(Y)?{isValid:Y}:{},errors:n.errors,name:R};n={...n,...ue},h.state.next(ue)}},v=async R=>(g(R,!0),await t.resolver(s,t.context,cb(R||a.mount,r,t.criteriaMode,t.shouldUseNativeValidation))),x=async R=>{const{errors:Y}=await v(R);if(g(R),R)for(const H of R){const ee=ae(Y,H);ee?Ve(n.errors,H,ee):bt(n.errors,H)}else n.errors=Y;return Y},P=async(R,Y,H={valid:!0})=>{for(const ee in R){const te=R[ee];if(te){const{_f:ne,...ue}=te;if(ne){const be=a.array.has(ne.name),Oe=te._f&&lb(te._f);Oe&&f.validatingFields&&g([ne.name],!0);const ze=await nf(te,a.disabled,s,m,t.shouldUseNativeValidation&&!Y,be);if(Oe&&f.validatingFields&&g([ne.name]),ze[ne.name]&&(H.valid=!1,Y||e.shouldUseNativeValidation))break;!Y&&(ae(ze,ne.name)?be?mb(n.errors,ze,ne.name):Ve(n.errors,ne.name,ze[ne.name]):bt(n.errors,ne.name))}!Ft(ue)&&await P(ue,Y,H)}}return H.valid},M=()=>{for(const R of a.unMount){const Y=ae(r,R);Y&&(Y._f.refs?Y._f.refs.every(H=>!ba(H)):!ba(Y._f.ref))&&oe(R)}a.unMount=new Set},A=(R,Y)=>!t.disabled&&(R&&Y&&Ve(s,R,Y),!ln(V(),o)),F=(R,Y,H)=>ha(R,a,{...i.mount?s:st(Y)?o:Ht(R)?{[R]:Y}:Y},H,Y),N=R=>ca(ae(i.mount?s:o,R,t.shouldUnregister?ae(o,R,[]):[])),W=(R,Y,H={})=>{const ee=ae(r,R);let te=Y;if(ee){const ne=ee._f;ne&&(!ne.disabled&&Ve(s,R,Zu(Y,ne)),te=vs(ne.ref)&&$t(Y)?"":Y,Yu(ne.ref)?[...ne.ref.options].forEach(ue=>ue.selected=te.includes(ue.value)):ne.refs?Co(ne.ref)?ne.refs.forEach(ue=>{(!ue.defaultChecked||!ue.disabled)&&(Array.isArray(te)?ue.checked=!!te.find(be=>be===ue.value):ue.checked=te===ue.value||!!te)}):ne.refs.forEach(ue=>ue.checked=ue.value===te):ya(ne.ref)?ne.ref.value="":(ne.ref.value=te,ne.ref.type||h.state.next({name:R,values:vt(s)})))}(H.shouldDirty||H.shouldTouch)&&S(R,te,H.shouldTouch,H.shouldDirty,!0),H.shouldValidate&&D(R)},E=(R,Y,H)=>{for(const ee in Y){if(!Y.hasOwnProperty(ee))return;const te=Y[ee],ne=R+"."+ee,ue=ae(r,ne);(a.array.has(R)||yt(te)||ue&&!ue._f)&&!Or(te)?E(ne,te,H):W(ne,te,H)}},k=(R,Y,H={})=>{const ee=ae(r,R),te=a.array.has(R),ne=vt(Y);Ve(s,R,ne),te?(h.array.next({name:R,values:vt(s)}),(f.isDirty||f.dirtyFields||d.isDirty||d.dirtyFields)&&H.shouldDirty&&h.state.next({name:R,dirtyFields:Hr(o,s),isDirty:A(R,ne)})):ee&&!ee._f&&!$t(ne)?E(R,ne,H):W(R,ne,H),Qu(R,a)?h.state.next({...n,name:R,values:vt(s)}):h.state.next({name:i.mount?R:void 0,values:vt(s)})},U=async R=>{i.mount=!0;const Y=R.target;let H=Y.name,ee=!0;const te=ae(r,H),ne=Oe=>{ee=Number.isNaN(Oe)||Or(Oe)&&isNaN(Oe.getTime())||ln(Oe,ae(s,H,Oe))},ue=Xu(t.mode),be=Xu(t.reValidateMode);if(te){let Oe,ze;const ot=Y.type?Ku(te._f):Ru(R),Qe=R.type===ys.BLUR||R.type===ys.FOCUS_OUT,xt=!ub(te._f)&&!t.resolver&&!ae(n.errors,H)&&!te._f.deps||hb(Qe,ae(n.touchedFields,H),n.isSubmitted,be,ue),gt=Qu(H,a,Qe);Ve(s,H,ot),Qe?(!Y||!Y.readOnly)&&(te._f.onBlur&&te._f.onBlur(R),c&&c(0)):te._f.onChange&&te._f.onChange(R);const dt=S(H,ot,Qe),jt=!Ft(dt)||gt;if(!Qe&&h.state.next({name:H,type:R.type,values:vt(s)}),xt)return(f.isValid||d.isValid)&&(t.mode==="onBlur"?Qe&&y():Qe||y()),jt&&h.state.next({name:H,...gt?{}:dt});if(!Qe&&gt&&h.state.next({...n}),t.resolver){const{errors:Sn}=await v([H]);if(g([H]),ne(ot),ee){const kn=ef(n.errors,r,H),_e=ef(Sn,r,kn.name||H);Oe=_e.error,H=_e.name,ze=Ft(Sn)}}else g([H],!0),Oe=(await nf(te,a.disabled,s,m,t.shouldUseNativeValidation))[H],g([H]),ne(ot),ee&&(Oe?ze=!1:(f.isValid||d.isValid)&&(ze=await P(r,!0)));ee&&(te._f.deps&&(!Array.isArray(te._f.deps)||te._f.deps.length>0)&&D(te._f.deps),I(H,ze,Oe,dt))}},$=(R,Y)=>{if(ae(n.errors,Y)&&R.focus)return R.focus(),1},D=async(R,Y={})=>{let H,ee;const te=To(R);if(t.resolver){const ne=await x(st(R)?R:te);H=Ft(ne),ee=R?!te.some(ue=>ae(ne,ue)):H}else R?(ee=(await Promise.all(te.map(async ne=>{const ue=ae(r,ne);return await P(ue&&ue._f?{[ne]:ue}:ue)}))).every(Boolean),!(!ee&&!n.isValid)&&y()):ee=H=await P(r);return h.state.next({...!Ht(R)||(f.isValid||d.isValid)&&H!==n.isValid?{}:{name:R},...t.resolver||!R?{isValid:H}:{},errors:n.errors}),Y.shouldFocus&&!ee&&Mo(r,$,R?te:a.mount),ee},V=(R,Y)=>{let H={...i.mount?s:o};return Y&&(H=Uu(Y.dirtyFields?n.dirtyFields:n.touchedFields,H)),st(R)?H:Ht(R)?ae(H,R):R.map(ee=>ae(H,ee))},Z=(R,Y)=>({invalid:!!ae((Y||n).errors,R),isDirty:!!ae((Y||n).dirtyFields,R),error:ae((Y||n).errors,R),isValidating:!!ae(n.validatingFields,R),isTouched:!!ae((Y||n).touchedFields,R)}),G=R=>{R&&To(R).forEach(Y=>bt(n.errors,Y)),h.state.next({errors:R?n.errors:{}})},B=(R,Y,H)=>{const ee=(ae(r,R,{_f:{}})._f||{}).ref,te=ae(n.errors,R)||{},{ref:ne,message:ue,type:be,...Oe}=te;Ve(n.errors,R,{...Oe,...Y,ref:ee}),h.state.next({name:R,errors:n.errors,isValid:!1}),H&&H.shouldFocus&&ee&&ee.focus&&ee.focus()},z=(R,Y)=>It(R)?h.state.subscribe({next:H=>"values"in H&&R(F(void 0,Y),H)}):F(R,Y,!0),X=R=>h.state.subscribe({next:Y=>{db(R.name,Y.name,R.exact)&&fb(Y,R.formState||f,We,R.reRenderRoot)&&R.callback({values:{...s},...n,...Y,defaultValues:o})}}).unsubscribe,q=R=>(i.mount=!0,d={...d,...R.formState},X({...R,formState:{...l,...R.formState}})),oe=(R,Y={})=>{for(const H of R?To(R):a.mount)a.mount.delete(H),a.array.delete(H),Y.keepValue||(bt(r,H),bt(s,H)),!Y.keepError&&bt(n.errors,H),!Y.keepDirty&&bt(n.dirtyFields,H),!Y.keepTouched&&bt(n.touchedFields,H),!Y.keepIsValidating&&bt(n.validatingFields,H),!t.shouldUnregister&&!Y.keepDefaultValue&&bt(o,H);h.state.next({values:vt(s)}),h.state.next({...n,...Y.keepDirty?{isDirty:A()}:{}}),!Y.keepIsValid&&y()},Q=({disabled:R,name:Y})=>{if(Bt(R)&&i.mount||R||a.disabled.has(Y)){const te=a.disabled.has(Y)!==!!R;R?a.disabled.add(Y):a.disabled.delete(Y),te&&i.mount&&!i.action&&y()}},re=(R,Y={})=>{let H=ae(r,R);const ee=Bt(Y.disabled)||Bt(t.disabled);return Ve(r,R,{...H||{},_f:{...H&&H._f?H._f:{ref:{name:R}},name:R,mount:!0,...Y}}),a.mount.add(R),H?Q({disabled:Bt(Y.disabled)?Y.disabled:t.disabled,name:R}):_(R,!0,Y.value),{...ee?{disabled:Y.disabled||t.disabled}:{},...t.progressive?{required:!!Y.required,min:Do(Y.min),max:Do(Y.max),minLength:Do(Y.minLength),maxLength:Do(Y.maxLength),pattern:Do(Y.pattern)}:{},name:R,onChange:U,onBlur:U,ref:te=>{if(te){re(R,Y),H=ae(r,R);const ne=st(te.value)&&te.querySelectorAll&&te.querySelectorAll("input,select,textarea")[0]||te,ue=ob(ne),be=H._f.refs||[];if(ue?be.find(Oe=>Oe===ne):ne===H._f.ref)return;Ve(r,R,{_f:{...H._f,...ue?{refs:[...be.filter(ba),ne,...Array.isArray(ae(o,R))?[{}]:[]],ref:{type:ne.type,name:R}}:{ref:ne}}}),_(R,!1,void 0,ne)}else H=ae(r,R,{}),H._f&&(H._f.mount=!1),(t.shouldUnregister||Y.shouldUnregister)&&!(Wu(a.array,R)&&i.action)&&a.unMount.add(R)}}},le=()=>t.shouldFocusError&&Mo(r,$,a.mount),K=R=>{Bt(R)&&(h.state.next({disabled:R}),Mo(r,(Y,H)=>{const ee=ae(r,H);ee&&(Y.disabled=ee._f.disabled||R,Array.isArray(ee._f.refs)&&ee._f.refs.forEach(te=>{te.disabled=ee._f.disabled||R}))},0,!1))},Se=(R,Y)=>async H=>{let ee;H&&(H.preventDefault&&H.preventDefault(),H.persist&&H.persist());let te=vt(s);if(h.state.next({isSubmitting:!0}),t.resolver){const{errors:ne,values:ue}=await v();g(),n.errors=ne,te=vt(ue)}else await P(r);if(a.disabled.size)for(const ne of a.disabled)bt(te,ne);if(bt(n.errors,"root"),Ft(n.errors)){h.state.next({errors:{}});try{await R(te,H)}catch(ne){ee=ne}}else Y&&await Y({...n.errors},H),le(),setTimeout(le);if(h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Ft(n.errors)&&!ee,submitCount:n.submitCount+1,errors:n.errors}),ee)throw ee},Ie=(R,Y={})=>{ae(r,R)&&(st(Y.defaultValue)?k(R,vt(ae(o,R))):(k(R,Y.defaultValue),Ve(o,R,vt(Y.defaultValue))),Y.keepTouched||bt(n.touchedFields,R),Y.keepDirty||(bt(n.dirtyFields,R),n.isDirty=Y.defaultValue?A(R,vt(ae(o,R))):A()),Y.keepError||(bt(n.errors,R),f.isValid&&y()),h.state.next({...n}))},ke=(R,Y={})=>{const H=R?vt(R):o,ee=vt(H),te=Ft(R),ne=te?o:ee;if(Y.keepDefaultValues||(o=H),!Y.keepValues){if(Y.keepDirtyValues){const ue=new Set([...a.mount,...Object.keys(Hr(o,s))]);for(const be of Array.from(ue)){const Oe=ae(n.dirtyFields,be),ze=ae(s,be),ot=ae(ne,be);Oe&&!st(ze)?Ve(ne,be,ze):!Oe&&!st(ot)&&k(be,ot)}}else{if(aa&&st(R))for(const ue of a.mount){const be=ae(r,ue);if(be&&be._f){const Oe=Array.isArray(be._f.refs)?be._f.refs[0]:be._f.ref;if(vs(Oe)){const ze=Oe.closest("form");if(ze){ze.reset();break}}}}if(Y.keepFieldsRef)for(const ue of a.mount)k(ue,ae(ne,ue));else r={}}s=t.shouldUnregister?Y.keepDefaultValues?vt(o):{}:vt(ne),h.array.next({values:{...ne}}),h.state.next({values:{...ne}})}a={mount:Y.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!f.isValid||!!Y.keepIsValid||!!Y.keepDirtyValues||!t.shouldUnregister&&!Ft(ne),i.watch=!!t.shouldUnregister,i.keepIsValid=!!Y.keepIsValid,i.action=!1,Y.keepErrors||(n.errors={}),h.state.next({submitCount:Y.keepSubmitCount?n.submitCount:0,isDirty:te?!1:Y.keepDirty?n.isDirty:!!(Y.keepDefaultValues&&!ln(R,o)),isSubmitted:Y.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:te?{}:Y.keepDirtyValues?Y.keepDefaultValues&&s?Hr(o,s):n.dirtyFields:Y.keepDefaultValues&&R?Hr(o,R):Y.keepDirty?n.dirtyFields:{},touchedFields:Y.keepTouched?n.touchedFields:{},errors:Y.keepErrors?n.errors:{},isSubmitSuccessful:Y.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},Ge=(R,Y)=>ke(It(R)?R(s):R,{...t.resetOptions,...Y}),Re=(R,Y={})=>{const H=ae(r,R),ee=H&&H._f;if(ee){const te=ee.refs?ee.refs[0]:ee.ref;te.focus&&setTimeout(()=>{te.focus(),Y.shouldSelect&&It(te.select)&&te.select()})}},We=R=>{n={...n,...R}},rt={control:{register:re,unregister:oe,getFieldState:Z,handleSubmit:Se,setError:B,_subscribe:X,_runSchema:v,_updateIsValidating:g,_focusError:le,_getWatch:F,_getDirty:A,_setValid:y,_setFieldArray:C,_setDisabledField:Q,_setErrors:w,_getFieldArray:N,_reset:ke,_resetDefaultValues:()=>It(t.defaultValues)&&t.defaultValues().then(R=>{Ge(R,t.resetOptions),h.state.next({isLoading:!1})}),_removeUnmounted:M,_disableForm:K,_subjects:h,_proxyFormState:f,get _fields(){return r},get _formValues(){return s},get _state(){return i},set _state(R){i=R},get _defaultValues(){return o},get _names(){return a},set _names(R){a=R},get _formState(){return n},get _options(){return t},set _options(R){t={...t,...R}}},subscribe:q,trigger:D,register:re,handleSubmit:Se,watch:z,setValue:k,getValues:V,reset:Ge,resetField:Ie,clearErrors:G,unregister:oe,setError:B,setFocus:Re,getFieldState:Z};return{...rt,formControl:rt}}function vb(e={}){const t=j.useRef(void 0),n=j.useRef(void 0),[r,o]=j.useState({isDirty:!1,isValidating:!1,isLoading:It(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:It(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:r},e.defaultValues&&!It(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:i,...a}=yb(e);t.current={...a,formState:r}}const s=t.current.control;return s._options=e,da(()=>{const i=s._subscribe({formState:s._proxyFormState,callback:()=>o({...s._formState}),reRenderRoot:!0});return o(a=>({...a,isReady:!0})),s._formState.isReady=!0,i},[s]),j.useEffect(()=>s._disableForm(e.disabled),[s,e.disabled]),j.useEffect(()=>{e.mode&&(s._options.mode=e.mode),e.reValidateMode&&(s._options.reValidateMode=e.reValidateMode)},[s,e.mode,e.reValidateMode]),j.useEffect(()=>{e.errors&&(s._setErrors(e.errors),s._focusError())},[s,e.errors]),j.useEffect(()=>{e.shouldUnregister&&s._subjects.state.next({values:s._getWatch()})},[s,e.shouldUnregister]),j.useEffect(()=>{if(s._proxyFormState.isDirty){const i=s._getDirty();i!==r.isDirty&&s._subjects.state.next({isDirty:i})}},[s,r.isDirty]),j.useEffect(()=>{var i;e.values&&!ln(e.values,n.current)?(s._reset(e.values,{keepFieldsRef:!0,...s._options.resetOptions}),!((i=s._options.resetOptions)===null||i===void 0)&&i.keepIsValid||s._setValid(),n.current=e.values,o(a=>({...a}))):s._resetDefaultValues()},[s,e.values]),j.useEffect(()=>{s._state.mount||(s._setValid(),s._state.mount=!0),s._state.watch&&(s._state.watch=!1,s._subjects.state.next({...s._formState})),s._removeUnmounted()}),t.current.formState=j.useMemo(()=>zu(r,s),[s,r]),t.current}function J(e,t,n){function r(a,c){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:c,constr:i,traits:new Set},enumerable:!1}),a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,c);const u=i.prototype,l=Object.keys(u);for(let f=0;f<l.length;f++){const d=l[f];d in a||(a[d]=u[d].bind(a))}}const o=n?.Parent??Object;class s extends o{}Object.defineProperty(s,"name",{value:e});function i(a){var c;const u=n?.Parent?new s:this;r(u,a),(c=u._zod).deferred??(c.deferred=[]);for(const l of u._zod.deferred)l();return u}return Object.defineProperty(i,"init",{value:r}),Object.defineProperty(i,Symbol.hasInstance,{value:a=>n?.Parent&&a instanceof n.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(i,"name",{value:e}),i}class Gr extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class rf extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const of={};function Er(e){return of}function sf(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function _a(e,t){return typeof t=="bigint"?t.toString():t}function Sa(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function ka(e){return e==null}function xa(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const af=Symbol("evaluating");function Be(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==af)return r===void 0&&(r=af,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function Cr(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function or(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function cf(e){return JSON.stringify(e)}function bb(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const lf="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function ws(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const wb=Sa(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Ao(e){if(ws(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(ws(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function uf(e){return Ao(e)?{...e}:Array.isArray(e)?[...e]:e}const _b=new Set(["string","number","symbol"]);function qr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function sr(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function we(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function Sb(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function kb(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const s=or(e._zod.def,{get shape(){const i={};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(i[a]=n.shape[a])}return Cr(this,"shape",i),i},checks:[]});return sr(e,s)}function xb(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const s=or(e._zod.def,{get shape(){const i={...e._zod.def.shape};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete i[a]}return Cr(this,"shape",i),i},checks:[]});return sr(e,s)}function Ob(e,t){if(!Ao(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const s=e._zod.def.shape;for(const i in t)if(Object.getOwnPropertyDescriptor(s,i)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=or(e._zod.def,{get shape(){const s={...e._zod.def.shape,...t};return Cr(this,"shape",s),s}});return sr(e,o)}function Eb(e,t){if(!Ao(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=or(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return Cr(this,"shape",r),r}});return sr(e,n)}function Cb(e,t){const n=or(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return Cr(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return sr(e,n)}function Tb(e,t,n){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const i=or(t._zod.def,{get shape(){const a=t._zod.def.shape,c={...a};if(n)for(const u in n){if(!(u in a))throw new Error(`Unrecognized key: "${u}"`);n[u]&&(c[u]=e?new e({type:"optional",innerType:a[u]}):a[u])}else for(const u in a)c[u]=e?new e({type:"optional",innerType:a[u]}):a[u];return Cr(this,"shape",c),c},checks:[]});return sr(t,i)}function Db(e,t,n){const r=or(t._zod.def,{get shape(){const o=t._zod.def.shape,s={...o};if(n)for(const i in n){if(!(i in s))throw new Error(`Unrecognized key: "${i}"`);n[i]&&(s[i]=new e({type:"nonoptional",innerType:o[i]}))}else for(const i in o)s[i]=new e({type:"nonoptional",innerType:o[i]});return Cr(this,"shape",s),s}});return sr(t,r)}function Kr(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function ff(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function _s(e){return typeof e=="string"?e:e?.message}function Tr(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const o=_s(e.inst?._zod.def?.error?.(e))??_s(t?.error?.(e))??_s(n.customError?.(e))??_s(n.localeError?.(e))??"Invalid input";r.message=o}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function Oa(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Po(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const df=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,_a,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Ea=J("$ZodError",df),Ss=J("$ZodError",df,{Parent:Error});function Mb(e,t=n=>n.message){const n={},r=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}function Ab(e,t=n=>n.message){const n={_errors:[]},r=o=>{for(const s of o.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(i=>r({issues:i}));else if(s.code==="invalid_key")r({issues:s.issues});else if(s.code==="invalid_element")r({issues:s.issues});else if(s.path.length===0)n._errors.push(t(s));else{let i=n,a=0;for(;a<s.path.length;){const c=s.path[a];a===s.path.length-1?(i[c]=i[c]||{_errors:[]},i[c]._errors.push(t(s))):i[c]=i[c]||{_errors:[]},i=i[c],a++}}};return r(e),n}const ks=e=>(t,n,r,o)=>{const s=r?Object.assign(r,{async:!1}):{async:!1},i=t._zod.run({value:n,issues:[]},s);if(i instanceof Promise)throw new Gr;if(i.issues.length){const a=new(o?.Err??e)(i.issues.map(c=>Tr(c,s,Er())));throw lf(a,o?.callee),a}return i.value},Pb=ks(Ss),xs=e=>async(t,n,r,o)=>{const s=r?Object.assign(r,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},s);if(i instanceof Promise&&(i=await i),i.issues.length){const a=new(o?.Err??e)(i.issues.map(c=>Tr(c,s,Er())));throw lf(a,o?.callee),a}return i.value},Nb=xs(Ss),Os=e=>(t,n,r)=>{const o=r?{...r,async:!1}:{async:!1},s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise)throw new Gr;return s.issues.length?{success:!1,error:new(e??Ea)(s.issues.map(i=>Tr(i,o,Er())))}:{success:!0,data:s.value}},Ib=Os(Ss),Es=e=>async(t,n,r)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let s=t._zod.run({value:n,issues:[]},o);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(i=>Tr(i,o,Er())))}:{success:!0,data:s.value}},Fb=Es(Ss),Rb=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return ks(e)(t,n,o)},Wb=e=>(t,n,r)=>ks(e)(t,n,r),zb=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return xs(e)(t,n,o)},Lb=e=>async(t,n,r)=>xs(e)(t,n,r),$b=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Os(e)(t,n,o)},Ub=e=>(t,n,r)=>Os(e)(t,n,r),Yb=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Es(e)(t,n,o)},jb=e=>async(t,n,r)=>Es(e)(t,n,r),Vb=/^[cC][^\s-]{8,}$/,Bb=/^[0-9a-z]+$/,Hb=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Zb=/^[0-9a-vA-V]{20}$/,Gb=/^[A-Za-z0-9]{27}$/,qb=/^[a-zA-Z0-9_-]{21}$/,Kb=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Xb=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,hf=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Jb=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Qb="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function ew(){return new RegExp(Qb,"u")}const tw=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,nw=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,rw=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,ow=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,sw=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,pf=/^[A-Za-z0-9_-]*$/,iw=/^\+[1-9]\d{6,14}$/,mf="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",aw=new RegExp(`^${mf}$`);function gf(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function cw(e){return new RegExp(`^${gf(e)}$`)}function lw(e){const t=gf({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${mf}T(?:${r})$`)}const uw=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},fw=/^[^A-Z]*$/,dw=/^[^a-z]*$/,en=J("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),yf={number:"number",bigint:"bigint",object:"date"},hw=J("$ZodCheckLessThan",(e,t)=>{en.init(e,t);const n=yf[typeof t.value];e._zod.onattach.push(r=>{const o=r._zod.bag,s=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<s&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),pw=J("$ZodCheckGreaterThan",(e,t)=>{en.init(e,t);const n=yf[typeof t.value];e._zod.onattach.push(r=>{const o=r._zod.bag,s=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),mw=J("$ZodCheckMaxLength",(e,t)=>{var n;en.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!ka(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const o=r.value;if(o.length<=t.maximum)return;const i=Oa(o);r.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),gw=J("$ZodCheckMinLength",(e,t)=>{var n;en.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!ka(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const o=r.value;if(o.length>=t.minimum)return;const i=Oa(o);r.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),yw=J("$ZodCheckLengthEquals",(e,t)=>{var n;en.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!ka(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=r=>{const o=r.value,s=o.length;if(s===t.length)return;const i=Oa(o),a=s>t.length;r.issues.push({origin:i,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),Cs=J("$ZodCheckStringFormat",(e,t)=>{var n,r;en.init(e,t),e._zod.onattach.push(o=>{const s=o._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),vw=J("$ZodCheckRegex",(e,t)=>{Cs.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),bw=J("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=fw),Cs.init(e,t)}),ww=J("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=dw),Cs.init(e,t)}),_w=J("$ZodCheckIncludes",(e,t)=>{en.init(e,t);const n=qr(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(o=>{const s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(r)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),Sw=J("$ZodCheckStartsWith",(e,t)=>{en.init(e,t);const n=new RegExp(`^${qr(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),kw=J("$ZodCheckEndsWith",(e,t)=>{en.init(e,t);const n=new RegExp(`.*${qr(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),xw=J("$ZodCheckOverwrite",(e,t)=>{en.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class Ow{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
2
2
  `).filter(i=>i),o=Math.min(...r.map(i=>i.length-i.trimStart().length)),s=r.map(i=>i.slice(o)).map(i=>" ".repeat(this.indent*2)+i);for(const i of s)this.content.push(i)}compile(){const t=Function,n=this?.args,o=[...(this?.content??[""]).map(s=>` ${s}`)];return new t(...n,o.join(`
3
- `))}}const Ew={major:4,minor:3,patch:6},ht=J("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Ew;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const o of r)for(const s of o._zod.onattach)s(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const o=(i,a,c)=>{let u=Kr(i),l;for(const f of a){if(f._zod.def.when){if(!f._zod.def.when(i))continue}else if(u)continue;const d=i.issues.length,h=f._zod.check(i);if(h instanceof Promise&&c?.async===!1)throw new Gr;if(l||h instanceof Promise)l=(l??Promise.resolve()).then(async()=>{await h,i.issues.length!==d&&(u||(u=Kr(i,d)))});else{if(i.issues.length===d)continue;u||(u=Kr(i,d))}}return l?l.then(()=>i):i},s=(i,a,c)=>{if(Kr(i))return i.aborted=!0,i;const u=o(a,r,c);if(u instanceof Promise){if(c.async===!1)throw new Gr;return u.then(l=>e._zod.parse(l,c))}return e._zod.parse(u,c)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction==="backward"){const u=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return u instanceof Promise?u.then(l=>s(l,i,a)):s(u,i,a)}const c=e._zod.parse(i,a);if(c instanceof Promise){if(a.async===!1)throw new Gr;return c.then(u=>o(u,r,a))}return o(c,r,a)}}Be(e,"~standard",()=>({validate:o=>{try{const s=Ib(e,o);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return Fb(e,o).then(i=>i.success?{value:i.data}:{issues:i.error?.issues})}},vendor:"zod",version:1}))}),Ca=J("$ZodString",(e,t)=>{ht.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??uw(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),it=J("$ZodStringFormat",(e,t)=>{Cs.init(e,t),Ca.init(e,t)}),Cw=J("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Xb),it.init(e,t)}),Tw=J("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=hf(r))}else t.pattern??(t.pattern=hf());it.init(e,t)}),Dw=J("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Jb),it.init(e,t)}),Aw=J("$ZodURL",(e,t)=>{it.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),o=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=o.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),Mw=J("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=ew()),it.init(e,t)}),Pw=J("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=qb),it.init(e,t)}),Nw=J("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Vb),it.init(e,t)}),Iw=J("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Bb),it.init(e,t)}),Fw=J("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Hb),it.init(e,t)}),Rw=J("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Zb),it.init(e,t)}),Ww=J("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Gb),it.init(e,t)}),zw=J("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=lw(t)),it.init(e,t)}),Lw=J("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=aw),it.init(e,t)}),$w=J("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=cw(t)),it.init(e,t)}),Uw=J("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Kb),it.init(e,t)}),Yw=J("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=tw),it.init(e,t),e._zod.bag.format="ipv4"}),jw=J("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=nw),it.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),Vw=J("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=rw),it.init(e,t)}),Bw=J("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=ow),it.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[o,s]=r;if(!s)throw new Error;const i=Number(s);if(`${i}`!==s)throw new Error;if(i<0||i>128)throw new Error;new URL(`http://[${o}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function vf(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Hw=J("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=sw),it.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{vf(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function Zw(e){if(!pf.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return vf(n)}const Gw=J("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=pf),it.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{Zw(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),qw=J("$ZodE164",(e,t)=>{t.pattern??(t.pattern=iw),it.init(e,t)});function Kw(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const Xw=J("$ZodJWT",(e,t)=>{it.init(e,t),e._zod.check=n=>{Kw(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),Jw=J("$ZodAny",(e,t)=>{ht.init(e,t),e._zod.parse=n=>n}),Qw=J("$ZodUnknown",(e,t)=>{ht.init(e,t),e._zod.parse=n=>n}),e_=J("$ZodNever",(e,t)=>{ht.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),t_=J("$ZodDate",(e,t)=>{ht.init(e,t),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}const o=n.value,s=o instanceof Date;return s&&!Number.isNaN(o.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:o,...s?{received:"Invalid Date"}:{},inst:e}),n}});function bf(e,t,n){e.issues.length&&t.issues.push(...ff(n,e.issues)),t.value[n]=e.value}const n_=J("$ZodArray",(e,t)=>{ht.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=Array(o.length);const s=[];for(let i=0;i<o.length;i++){const a=o[i],c=t.element._zod.run({value:a,issues:[]},r);c instanceof Promise?s.push(c.then(u=>bf(u,n,i))):bf(c,n,i)}return s.length?Promise.all(s).then(()=>n):n}});function Ts(e,t,n,r,o){if(e.issues.length){if(o&&!(n in r))return;t.issues.push(...ff(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function wf(e){const t=Object.keys(e.shape);for(const r of t)if(!e.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const n=Sb(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function _f(e,t,n,r,o,s){const i=[],a=o.keySet,c=o.catchall._zod,u=c.def.type,l=c.optout==="optional";for(const f in t){if(a.has(f))continue;if(u==="never"){i.push(f);continue}const d=c.run({value:t[f],issues:[]},r);d instanceof Promise?e.push(d.then(h=>Ts(h,n,f,t,l))):Ts(d,n,f,t,l)}return i.length&&n.issues.push({code:"unrecognized_keys",keys:i,input:t,inst:s}),e.length?Promise.all(e).then(()=>n):n}const r_=J("$ZodObject",(e,t)=>{if(ht.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const a=t.shape;Object.defineProperty(t,"shape",{get:()=>{const c={...a};return Object.defineProperty(t,"shape",{value:c}),c}})}const r=Sa(()=>wf(t));Be(e._zod,"propValues",()=>{const a=t.shape,c={};for(const u in a){const l=a[u]._zod;if(l.values){c[u]??(c[u]=new Set);for(const f of l.values)c[u].add(f)}}return c});const o=ws,s=t.catchall;let i;e._zod.parse=(a,c)=>{i??(i=r.value);const u=a.value;if(!o(u))return a.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),a;a.value={};const l=[],f=i.shape;for(const d of i.keys){const h=f[d],m=h._zod.optout==="optional",p=h._zod.run({value:u[d],issues:[]},c);p instanceof Promise?l.push(p.then(y=>Ts(y,a,d,u,m))):Ts(p,a,d,u,m)}return s?_f(l,u,a,c,r.value,e):l.length?Promise.all(l).then(()=>a):a}}),o_=J("$ZodObjectJIT",(e,t)=>{r_.init(e,t);const n=e._zod.parse,r=Sa(()=>wf(t)),o=d=>{const h=new Ow(["shape","payload","ctx"]),m=r.value,p=O=>{const w=cf(O);return`shape[${w}]._zod.run({ value: input[${w}], issues: [] }, ctx)`};h.write("const input = payload.value;");const y=Object.create(null);let g=0;for(const O of m.keys)y[O]=`key_${g++}`;h.write("const newResult = {};");for(const O of m.keys){const w=y[O],_=cf(O),I=d[O]?._zod?.optout==="optional";h.write(`const ${w} = ${p(O)};`),I?h.write(`
3
+ `))}}const Ew={major:4,minor:3,patch:6},ht=J("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Ew;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const o of r)for(const s of o._zod.onattach)s(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const o=(i,a,c)=>{let u=Kr(i),l;for(const f of a){if(f._zod.def.when){if(!f._zod.def.when(i))continue}else if(u)continue;const d=i.issues.length,h=f._zod.check(i);if(h instanceof Promise&&c?.async===!1)throw new Gr;if(l||h instanceof Promise)l=(l??Promise.resolve()).then(async()=>{await h,i.issues.length!==d&&(u||(u=Kr(i,d)))});else{if(i.issues.length===d)continue;u||(u=Kr(i,d))}}return l?l.then(()=>i):i},s=(i,a,c)=>{if(Kr(i))return i.aborted=!0,i;const u=o(a,r,c);if(u instanceof Promise){if(c.async===!1)throw new Gr;return u.then(l=>e._zod.parse(l,c))}return e._zod.parse(u,c)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction==="backward"){const u=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return u instanceof Promise?u.then(l=>s(l,i,a)):s(u,i,a)}const c=e._zod.parse(i,a);if(c instanceof Promise){if(a.async===!1)throw new Gr;return c.then(u=>o(u,r,a))}return o(c,r,a)}}Be(e,"~standard",()=>({validate:o=>{try{const s=Ib(e,o);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return Fb(e,o).then(i=>i.success?{value:i.data}:{issues:i.error?.issues})}},vendor:"zod",version:1}))}),Ca=J("$ZodString",(e,t)=>{ht.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??uw(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),it=J("$ZodStringFormat",(e,t)=>{Cs.init(e,t),Ca.init(e,t)}),Cw=J("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Xb),it.init(e,t)}),Tw=J("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=hf(r))}else t.pattern??(t.pattern=hf());it.init(e,t)}),Dw=J("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Jb),it.init(e,t)}),Mw=J("$ZodURL",(e,t)=>{it.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),o=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=o.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),Aw=J("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=ew()),it.init(e,t)}),Pw=J("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=qb),it.init(e,t)}),Nw=J("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Vb),it.init(e,t)}),Iw=J("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Bb),it.init(e,t)}),Fw=J("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Hb),it.init(e,t)}),Rw=J("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Zb),it.init(e,t)}),Ww=J("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Gb),it.init(e,t)}),zw=J("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=lw(t)),it.init(e,t)}),Lw=J("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=aw),it.init(e,t)}),$w=J("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=cw(t)),it.init(e,t)}),Uw=J("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Kb),it.init(e,t)}),Yw=J("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=tw),it.init(e,t),e._zod.bag.format="ipv4"}),jw=J("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=nw),it.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),Vw=J("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=rw),it.init(e,t)}),Bw=J("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=ow),it.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[o,s]=r;if(!s)throw new Error;const i=Number(s);if(`${i}`!==s)throw new Error;if(i<0||i>128)throw new Error;new URL(`http://[${o}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function vf(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Hw=J("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=sw),it.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{vf(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function Zw(e){if(!pf.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return vf(n)}const Gw=J("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=pf),it.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{Zw(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),qw=J("$ZodE164",(e,t)=>{t.pattern??(t.pattern=iw),it.init(e,t)});function Kw(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const Xw=J("$ZodJWT",(e,t)=>{it.init(e,t),e._zod.check=n=>{Kw(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),Jw=J("$ZodAny",(e,t)=>{ht.init(e,t),e._zod.parse=n=>n}),Qw=J("$ZodUnknown",(e,t)=>{ht.init(e,t),e._zod.parse=n=>n}),e_=J("$ZodNever",(e,t)=>{ht.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),t_=J("$ZodDate",(e,t)=>{ht.init(e,t),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}const o=n.value,s=o instanceof Date;return s&&!Number.isNaN(o.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:o,...s?{received:"Invalid Date"}:{},inst:e}),n}});function bf(e,t,n){e.issues.length&&t.issues.push(...ff(n,e.issues)),t.value[n]=e.value}const n_=J("$ZodArray",(e,t)=>{ht.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=Array(o.length);const s=[];for(let i=0;i<o.length;i++){const a=o[i],c=t.element._zod.run({value:a,issues:[]},r);c instanceof Promise?s.push(c.then(u=>bf(u,n,i))):bf(c,n,i)}return s.length?Promise.all(s).then(()=>n):n}});function Ts(e,t,n,r,o){if(e.issues.length){if(o&&!(n in r))return;t.issues.push(...ff(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function wf(e){const t=Object.keys(e.shape);for(const r of t)if(!e.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const n=Sb(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function _f(e,t,n,r,o,s){const i=[],a=o.keySet,c=o.catchall._zod,u=c.def.type,l=c.optout==="optional";for(const f in t){if(a.has(f))continue;if(u==="never"){i.push(f);continue}const d=c.run({value:t[f],issues:[]},r);d instanceof Promise?e.push(d.then(h=>Ts(h,n,f,t,l))):Ts(d,n,f,t,l)}return i.length&&n.issues.push({code:"unrecognized_keys",keys:i,input:t,inst:s}),e.length?Promise.all(e).then(()=>n):n}const r_=J("$ZodObject",(e,t)=>{if(ht.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const a=t.shape;Object.defineProperty(t,"shape",{get:()=>{const c={...a};return Object.defineProperty(t,"shape",{value:c}),c}})}const r=Sa(()=>wf(t));Be(e._zod,"propValues",()=>{const a=t.shape,c={};for(const u in a){const l=a[u]._zod;if(l.values){c[u]??(c[u]=new Set);for(const f of l.values)c[u].add(f)}}return c});const o=ws,s=t.catchall;let i;e._zod.parse=(a,c)=>{i??(i=r.value);const u=a.value;if(!o(u))return a.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),a;a.value={};const l=[],f=i.shape;for(const d of i.keys){const h=f[d],m=h._zod.optout==="optional",p=h._zod.run({value:u[d],issues:[]},c);p instanceof Promise?l.push(p.then(y=>Ts(y,a,d,u,m))):Ts(p,a,d,u,m)}return s?_f(l,u,a,c,r.value,e):l.length?Promise.all(l).then(()=>a):a}}),o_=J("$ZodObjectJIT",(e,t)=>{r_.init(e,t);const n=e._zod.parse,r=Sa(()=>wf(t)),o=d=>{const h=new Ow(["shape","payload","ctx"]),m=r.value,p=O=>{const w=cf(O);return`shape[${w}]._zod.run({ value: input[${w}], issues: [] }, ctx)`};h.write("const input = payload.value;");const y=Object.create(null);let g=0;for(const O of m.keys)y[O]=`key_${g++}`;h.write("const newResult = {};");for(const O of m.keys){const w=y[O],_=cf(O),I=d[O]?._zod?.optout==="optional";h.write(`const ${w} = ${p(O)};`),I?h.write(`
4
4
  if (${w}.issues.length) {
5
5
  if (${_} in input) {
6
6
  payload.issues = payload.issues.concat(${w}.issues.map(iss => ({
@@ -34,14 +34,14 @@
34
34
  newResult[${_}] = ${w}.value;
35
35
  }
36
36
 
37
- `)}h.write("payload.value = newResult;"),h.write("return payload;");const C=h.compile();return(O,w)=>C(d,O,w)};let s;const i=ws,a=!of.jitless,u=a&&wb.value,l=t.catchall;let f;e._zod.parse=(d,h)=>{f??(f=r.value);const m=d.value;return i(m)?a&&u&&h?.async===!1&&h.jitless!==!0?(s||(s=o(t.shape)),d=s(d,h),l?_f([],m,d,h,f,e):d):n(d,h):(d.issues.push({expected:"object",code:"invalid_type",input:m,inst:e}),d)}});function Sf(e,t,n,r){for(const s of e)if(s.issues.length===0)return t.value=s.value,t;const o=e.filter(s=>!Kr(s));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(s=>s.issues.map(i=>Tr(i,r,Er())))}),t)}const s_=J("$ZodUnion",(e,t)=>{ht.init(e,t),Be(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),Be(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),Be(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),Be(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(s=>s._zod.pattern);return new RegExp(`^(${o.map(s=>xa(s.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(o,s)=>{if(n)return r(o,s);let i=!1;const a=[];for(const c of t.options){const u=c._zod.run({value:o.value,issues:[]},s);if(u instanceof Promise)a.push(u),i=!0;else{if(u.issues.length===0)return u;a.push(u)}}return i?Promise.all(a).then(c=>Sf(c,o,e,s)):Sf(a,o,e,s)}}),i_=J("$ZodIntersection",(e,t)=>{ht.init(e,t),e._zod.parse=(n,r)=>{const o=n.value,s=t.left._zod.run({value:o,issues:[]},r),i=t.right._zod.run({value:o,issues:[]},r);return s instanceof Promise||i instanceof Promise?Promise.all([s,i]).then(([c,u])=>kf(n,c,u)):kf(n,s,i)}});function Ta(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Mo(e)&&Mo(t)){const n=Object.keys(t),r=Object.keys(e).filter(s=>n.indexOf(s)!==-1),o={...e,...t};for(const s of r){const i=Ta(e[s],t[s]);if(!i.valid)return{valid:!1,mergeErrorPath:[s,...i.mergeErrorPath]};o[s]=i.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const o=e[r],s=t[r],i=Ta(o,s);if(!i.valid)return{valid:!1,mergeErrorPath:[r,...i.mergeErrorPath]};n.push(i.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function kf(e,t,n){const r=new Map;let o;for(const a of t.issues)if(a.code==="unrecognized_keys"){o??(o=a);for(const c of a.keys)r.has(c)||r.set(c,{}),r.get(c).l=!0}else e.issues.push(a);for(const a of n.issues)if(a.code==="unrecognized_keys")for(const c of a.keys)r.has(c)||r.set(c,{}),r.get(c).r=!0;else e.issues.push(a);const s=[...r].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(s.length&&o&&e.issues.push({...o,keys:s}),Kr(e))return e;const i=Ta(t.value,n.value);if(!i.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);return e.value=i.data,e}const a_=J("$ZodEnum",(e,t)=>{ht.init(e,t);const n=sf(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(o=>_b.has(typeof o)).map(o=>typeof o=="string"?qr(o):o.toString()).join("|")})$`),e._zod.parse=(o,s)=>{const i=o.value;return r.has(i)||o.issues.push({code:"invalid_value",values:n,input:i,inst:e}),o}}),c_=J("$ZodLiteral",(e,t)=>{if(ht.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?qr(r):r?qr(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,o)=>{const s=r.value;return n.has(s)||r.issues.push({code:"invalid_value",values:t.values,input:s,inst:e}),r}}),l_=J("$ZodTransform",(e,t)=>{ht.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new rf(e.constructor.name);const o=t.transform(n.value,n);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(i=>(n.value=i,n));if(o instanceof Promise)throw new Gr;return n.value=o,n}});function xf(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const Of=J("$ZodOptional",(e,t)=>{ht.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Be(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Be(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${xa(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(s=>xf(s,n.value)):xf(o,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),u_=J("$ZodExactOptional",(e,t)=>{Of.init(e,t),Be(e._zod,"values",()=>t.innerType._zod.values),Be(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),f_=J("$ZodNullable",(e,t)=>{ht.init(e,t),Be(e._zod,"optin",()=>t.innerType._zod.optin),Be(e._zod,"optout",()=>t.innerType._zod.optout),Be(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${xa(n.source)}|null)$`):void 0}),Be(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),d_=J("$ZodDefault",(e,t)=>{ht.init(e,t),e._zod.optin="optional",Be(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(s=>Ef(s,t)):Ef(o,t)}});function Ef(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const h_=J("$ZodPrefault",(e,t)=>{ht.init(e,t),e._zod.optin="optional",Be(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),p_=J("$ZodNonOptional",(e,t)=>{ht.init(e,t),Be(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(s=>Cf(s,e)):Cf(o,e)}});function Cf(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const m_=J("$ZodCatch",(e,t)=>{ht.init(e,t),Be(e._zod,"optin",()=>t.innerType._zod.optin),Be(e._zod,"optout",()=>t.innerType._zod.optout),Be(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(s=>(n.value=s.value,s.issues.length&&(n.value=t.catchValue({...n,error:{issues:s.issues.map(i=>Tr(i,r,Er()))},input:n.value}),n.issues=[]),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(s=>Tr(s,r,Er()))},input:n.value}),n.issues=[]),n)}}),g_=J("$ZodPipe",(e,t)=>{ht.init(e,t),Be(e._zod,"values",()=>t.in._zod.values),Be(e._zod,"optin",()=>t.in._zod.optin),Be(e._zod,"optout",()=>t.out._zod.optout),Be(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const s=t.out._zod.run(n,r);return s instanceof Promise?s.then(i=>Ds(i,t.in,r)):Ds(s,t.in,r)}const o=t.in._zod.run(n,r);return o instanceof Promise?o.then(s=>Ds(s,t.out,r)):Ds(o,t.out,r)}});function Ds(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const y_=J("$ZodReadonly",(e,t)=>{ht.init(e,t),Be(e._zod,"propValues",()=>t.innerType._zod.propValues),Be(e._zod,"values",()=>t.innerType._zod.values),Be(e._zod,"optin",()=>t.innerType?._zod?.optin),Be(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(Tf):Tf(o)}});function Tf(e){return e.value=Object.freeze(e.value),e}const v_=J("$ZodCustom",(e,t)=>{en.init(e,t),ht.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,o=t.fn(r);if(o instanceof Promise)return o.then(s=>Df(s,n,r,e));Df(o,n,r,e)}});function Df(e,t,n,r){if(!e){const o={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),t.issues.push(Po(o))}}var Af;class b_{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const o={...r,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function w_(){return new b_}(Af=globalThis).__zod_globalRegistry??(Af.__zod_globalRegistry=w_());const No=globalThis.__zod_globalRegistry;function __(e,t){return new e({type:"string",...we(t)})}function S_(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...we(t)})}function Mf(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...we(t)})}function k_(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...we(t)})}function x_(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...we(t)})}function O_(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...we(t)})}function E_(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...we(t)})}function C_(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...we(t)})}function T_(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...we(t)})}function D_(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...we(t)})}function A_(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...we(t)})}function M_(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...we(t)})}function P_(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...we(t)})}function N_(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...we(t)})}function I_(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...we(t)})}function F_(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...we(t)})}function R_(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...we(t)})}function W_(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...we(t)})}function z_(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...we(t)})}function L_(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...we(t)})}function $_(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...we(t)})}function U_(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...we(t)})}function Y_(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...we(t)})}function j_(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...we(t)})}function V_(e,t){return new e({type:"string",format:"date",check:"string_format",...we(t)})}function B_(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...we(t)})}function H_(e,t){return new e({type:"string",format:"duration",check:"string_format",...we(t)})}function Z_(e){return new e({type:"any"})}function G_(e){return new e({type:"unknown"})}function q_(e,t){return new e({type:"never",...we(t)})}function K_(e,t){return new e({type:"date",...we(t)})}function X_(e,t){return new hw({check:"less_than",...we(t),value:e,inclusive:!0})}function J_(e,t){return new pw({check:"greater_than",...we(t),value:e,inclusive:!0})}function Pf(e,t){return new mw({check:"max_length",...we(t),maximum:e})}function As(e,t){return new gw({check:"min_length",...we(t),minimum:e})}function Nf(e,t){return new yw({check:"length_equals",...we(t),length:e})}function Q_(e,t){return new vw({check:"string_format",format:"regex",...we(t),pattern:e})}function e0(e){return new bw({check:"string_format",format:"lowercase",...we(e)})}function t0(e){return new ww({check:"string_format",format:"uppercase",...we(e)})}function n0(e,t){return new _w({check:"string_format",format:"includes",...we(t),includes:e})}function r0(e,t){return new Sw({check:"string_format",format:"starts_with",...we(t),prefix:e})}function o0(e,t){return new kw({check:"string_format",format:"ends_with",...we(t),suffix:e})}function Xr(e){return new xw({check:"overwrite",tx:e})}function s0(e){return Xr(t=>t.normalize(e))}function i0(){return Xr(e=>e.trim())}function a0(){return Xr(e=>e.toLowerCase())}function c0(){return Xr(e=>e.toUpperCase())}function l0(){return Xr(e=>bb(e))}function u0(e,t,n){return new e({type:"array",element:t,...we(n)})}function f0(e,t,n){return new e({type:"custom",check:"custom",fn:t,...we(n)})}function d0(e){const t=h0(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(Po(r,n.value,t._zod.def));else{const o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),n.issues.push(Po(o))}},e(n.value,n)));return t}function h0(e,t){const n=new en({check:"custom",...we(t)});return n._zod.check=e,n}function If(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??No,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Ot(e,t,n={path:[],schemaPath:[]}){var r;const o=e._zod.def,s=t.seen.get(e);if(s)return s.count++,n.schemaPath.includes(e)&&(s.cycle=n.path),s.schema;const i={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,i);const a=e._zod.toJSONSchema?.();if(a)i.schema=a;else{const l={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,i.schema,l);else{const d=i.schema,h=t.processors[o.type];if(!h)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);h(e,t,d,l)}const f=e._zod.parent;f&&(i.ref||(i.ref=f),Ot(f,t,l),t.seen.get(f).isParent=!0)}const c=t.metadataRegistry.get(e);return c&&Object.assign(i.schema,c),t.io==="input"&&Rt(e)&&(delete i.schema.examples,delete i.schema.default),t.io==="input"&&i.schema._prefault&&((r=i.schema).default??(r.default=i.schema._prefault)),delete i.schema._prefault,t.seen.get(e).schema}function Ff(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const i of e.seen.entries()){const a=e.metadataRegistry.get(i[0])?.id;if(a){const c=r.get(a);if(c&&c!==i[0])throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(a,i[0])}}const o=i=>{const a=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const f=e.external.registry.get(i[0])?.id,d=e.external.uri??(m=>m);if(f)return{ref:d(f)};const h=i[1].defId??i[1].schema.id??`schema${e.counter++}`;return i[1].defId=h,{defId:h,ref:`${d("__shared")}#/${a}/${h}`}}if(i[1]===n)return{ref:"#"};const u=`#/${a}/`,l=i[1].schema.id??`__schema${e.counter++}`;return{defId:l,ref:u+l}},s=i=>{if(i[1].schema.$ref)return;const a=i[1],{ref:c,defId:u}=o(i);a.def={...a.schema},u&&(a.defId=u);const l=a.schema;for(const f in l)delete l[f];l.$ref=c};if(e.cycles==="throw")for(const i of e.seen.entries()){const a=i[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
37
+ `)}h.write("payload.value = newResult;"),h.write("return payload;");const C=h.compile();return(O,w)=>C(d,O,w)};let s;const i=ws,a=!of.jitless,u=a&&wb.value,l=t.catchall;let f;e._zod.parse=(d,h)=>{f??(f=r.value);const m=d.value;return i(m)?a&&u&&h?.async===!1&&h.jitless!==!0?(s||(s=o(t.shape)),d=s(d,h),l?_f([],m,d,h,f,e):d):n(d,h):(d.issues.push({expected:"object",code:"invalid_type",input:m,inst:e}),d)}});function Sf(e,t,n,r){for(const s of e)if(s.issues.length===0)return t.value=s.value,t;const o=e.filter(s=>!Kr(s));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(s=>s.issues.map(i=>Tr(i,r,Er())))}),t)}const s_=J("$ZodUnion",(e,t)=>{ht.init(e,t),Be(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),Be(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),Be(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),Be(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(s=>s._zod.pattern);return new RegExp(`^(${o.map(s=>xa(s.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(o,s)=>{if(n)return r(o,s);let i=!1;const a=[];for(const c of t.options){const u=c._zod.run({value:o.value,issues:[]},s);if(u instanceof Promise)a.push(u),i=!0;else{if(u.issues.length===0)return u;a.push(u)}}return i?Promise.all(a).then(c=>Sf(c,o,e,s)):Sf(a,o,e,s)}}),i_=J("$ZodIntersection",(e,t)=>{ht.init(e,t),e._zod.parse=(n,r)=>{const o=n.value,s=t.left._zod.run({value:o,issues:[]},r),i=t.right._zod.run({value:o,issues:[]},r);return s instanceof Promise||i instanceof Promise?Promise.all([s,i]).then(([c,u])=>kf(n,c,u)):kf(n,s,i)}});function Ta(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Ao(e)&&Ao(t)){const n=Object.keys(t),r=Object.keys(e).filter(s=>n.indexOf(s)!==-1),o={...e,...t};for(const s of r){const i=Ta(e[s],t[s]);if(!i.valid)return{valid:!1,mergeErrorPath:[s,...i.mergeErrorPath]};o[s]=i.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const o=e[r],s=t[r],i=Ta(o,s);if(!i.valid)return{valid:!1,mergeErrorPath:[r,...i.mergeErrorPath]};n.push(i.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function kf(e,t,n){const r=new Map;let o;for(const a of t.issues)if(a.code==="unrecognized_keys"){o??(o=a);for(const c of a.keys)r.has(c)||r.set(c,{}),r.get(c).l=!0}else e.issues.push(a);for(const a of n.issues)if(a.code==="unrecognized_keys")for(const c of a.keys)r.has(c)||r.set(c,{}),r.get(c).r=!0;else e.issues.push(a);const s=[...r].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(s.length&&o&&e.issues.push({...o,keys:s}),Kr(e))return e;const i=Ta(t.value,n.value);if(!i.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);return e.value=i.data,e}const a_=J("$ZodEnum",(e,t)=>{ht.init(e,t);const n=sf(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(o=>_b.has(typeof o)).map(o=>typeof o=="string"?qr(o):o.toString()).join("|")})$`),e._zod.parse=(o,s)=>{const i=o.value;return r.has(i)||o.issues.push({code:"invalid_value",values:n,input:i,inst:e}),o}}),c_=J("$ZodLiteral",(e,t)=>{if(ht.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?qr(r):r?qr(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,o)=>{const s=r.value;return n.has(s)||r.issues.push({code:"invalid_value",values:t.values,input:s,inst:e}),r}}),l_=J("$ZodTransform",(e,t)=>{ht.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new rf(e.constructor.name);const o=t.transform(n.value,n);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(i=>(n.value=i,n));if(o instanceof Promise)throw new Gr;return n.value=o,n}});function xf(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const Of=J("$ZodOptional",(e,t)=>{ht.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Be(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Be(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${xa(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(s=>xf(s,n.value)):xf(o,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),u_=J("$ZodExactOptional",(e,t)=>{Of.init(e,t),Be(e._zod,"values",()=>t.innerType._zod.values),Be(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),f_=J("$ZodNullable",(e,t)=>{ht.init(e,t),Be(e._zod,"optin",()=>t.innerType._zod.optin),Be(e._zod,"optout",()=>t.innerType._zod.optout),Be(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${xa(n.source)}|null)$`):void 0}),Be(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),d_=J("$ZodDefault",(e,t)=>{ht.init(e,t),e._zod.optin="optional",Be(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(s=>Ef(s,t)):Ef(o,t)}});function Ef(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const h_=J("$ZodPrefault",(e,t)=>{ht.init(e,t),e._zod.optin="optional",Be(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),p_=J("$ZodNonOptional",(e,t)=>{ht.init(e,t),Be(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(s=>Cf(s,e)):Cf(o,e)}});function Cf(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const m_=J("$ZodCatch",(e,t)=>{ht.init(e,t),Be(e._zod,"optin",()=>t.innerType._zod.optin),Be(e._zod,"optout",()=>t.innerType._zod.optout),Be(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(s=>(n.value=s.value,s.issues.length&&(n.value=t.catchValue({...n,error:{issues:s.issues.map(i=>Tr(i,r,Er()))},input:n.value}),n.issues=[]),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(s=>Tr(s,r,Er()))},input:n.value}),n.issues=[]),n)}}),g_=J("$ZodPipe",(e,t)=>{ht.init(e,t),Be(e._zod,"values",()=>t.in._zod.values),Be(e._zod,"optin",()=>t.in._zod.optin),Be(e._zod,"optout",()=>t.out._zod.optout),Be(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const s=t.out._zod.run(n,r);return s instanceof Promise?s.then(i=>Ds(i,t.in,r)):Ds(s,t.in,r)}const o=t.in._zod.run(n,r);return o instanceof Promise?o.then(s=>Ds(s,t.out,r)):Ds(o,t.out,r)}});function Ds(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const y_=J("$ZodReadonly",(e,t)=>{ht.init(e,t),Be(e._zod,"propValues",()=>t.innerType._zod.propValues),Be(e._zod,"values",()=>t.innerType._zod.values),Be(e._zod,"optin",()=>t.innerType?._zod?.optin),Be(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(Tf):Tf(o)}});function Tf(e){return e.value=Object.freeze(e.value),e}const v_=J("$ZodCustom",(e,t)=>{en.init(e,t),ht.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,o=t.fn(r);if(o instanceof Promise)return o.then(s=>Df(s,n,r,e));Df(o,n,r,e)}});function Df(e,t,n,r){if(!e){const o={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),t.issues.push(Po(o))}}var Mf;class b_{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const o={...r,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function w_(){return new b_}(Mf=globalThis).__zod_globalRegistry??(Mf.__zod_globalRegistry=w_());const No=globalThis.__zod_globalRegistry;function __(e,t){return new e({type:"string",...we(t)})}function S_(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...we(t)})}function Af(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...we(t)})}function k_(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...we(t)})}function x_(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...we(t)})}function O_(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...we(t)})}function E_(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...we(t)})}function C_(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...we(t)})}function T_(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...we(t)})}function D_(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...we(t)})}function M_(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...we(t)})}function A_(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...we(t)})}function P_(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...we(t)})}function N_(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...we(t)})}function I_(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...we(t)})}function F_(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...we(t)})}function R_(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...we(t)})}function W_(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...we(t)})}function z_(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...we(t)})}function L_(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...we(t)})}function $_(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...we(t)})}function U_(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...we(t)})}function Y_(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...we(t)})}function j_(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...we(t)})}function V_(e,t){return new e({type:"string",format:"date",check:"string_format",...we(t)})}function B_(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...we(t)})}function H_(e,t){return new e({type:"string",format:"duration",check:"string_format",...we(t)})}function Z_(e){return new e({type:"any"})}function G_(e){return new e({type:"unknown"})}function q_(e,t){return new e({type:"never",...we(t)})}function K_(e,t){return new e({type:"date",...we(t)})}function X_(e,t){return new hw({check:"less_than",...we(t),value:e,inclusive:!0})}function J_(e,t){return new pw({check:"greater_than",...we(t),value:e,inclusive:!0})}function Pf(e,t){return new mw({check:"max_length",...we(t),maximum:e})}function Ms(e,t){return new gw({check:"min_length",...we(t),minimum:e})}function Nf(e,t){return new yw({check:"length_equals",...we(t),length:e})}function Q_(e,t){return new vw({check:"string_format",format:"regex",...we(t),pattern:e})}function e0(e){return new bw({check:"string_format",format:"lowercase",...we(e)})}function t0(e){return new ww({check:"string_format",format:"uppercase",...we(e)})}function n0(e,t){return new _w({check:"string_format",format:"includes",...we(t),includes:e})}function r0(e,t){return new Sw({check:"string_format",format:"starts_with",...we(t),prefix:e})}function o0(e,t){return new kw({check:"string_format",format:"ends_with",...we(t),suffix:e})}function Xr(e){return new xw({check:"overwrite",tx:e})}function s0(e){return Xr(t=>t.normalize(e))}function i0(){return Xr(e=>e.trim())}function a0(){return Xr(e=>e.toLowerCase())}function c0(){return Xr(e=>e.toUpperCase())}function l0(){return Xr(e=>bb(e))}function u0(e,t,n){return new e({type:"array",element:t,...we(n)})}function f0(e,t,n){return new e({type:"custom",check:"custom",fn:t,...we(n)})}function d0(e){const t=h0(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(Po(r,n.value,t._zod.def));else{const o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),n.issues.push(Po(o))}},e(n.value,n)));return t}function h0(e,t){const n=new en({check:"custom",...we(t)});return n._zod.check=e,n}function If(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??No,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Ot(e,t,n={path:[],schemaPath:[]}){var r;const o=e._zod.def,s=t.seen.get(e);if(s)return s.count++,n.schemaPath.includes(e)&&(s.cycle=n.path),s.schema;const i={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,i);const a=e._zod.toJSONSchema?.();if(a)i.schema=a;else{const l={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,i.schema,l);else{const d=i.schema,h=t.processors[o.type];if(!h)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);h(e,t,d,l)}const f=e._zod.parent;f&&(i.ref||(i.ref=f),Ot(f,t,l),t.seen.get(f).isParent=!0)}const c=t.metadataRegistry.get(e);return c&&Object.assign(i.schema,c),t.io==="input"&&Rt(e)&&(delete i.schema.examples,delete i.schema.default),t.io==="input"&&i.schema._prefault&&((r=i.schema).default??(r.default=i.schema._prefault)),delete i.schema._prefault,t.seen.get(e).schema}function Ff(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const i of e.seen.entries()){const a=e.metadataRegistry.get(i[0])?.id;if(a){const c=r.get(a);if(c&&c!==i[0])throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(a,i[0])}}const o=i=>{const a=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const f=e.external.registry.get(i[0])?.id,d=e.external.uri??(m=>m);if(f)return{ref:d(f)};const h=i[1].defId??i[1].schema.id??`schema${e.counter++}`;return i[1].defId=h,{defId:h,ref:`${d("__shared")}#/${a}/${h}`}}if(i[1]===n)return{ref:"#"};const u=`#/${a}/`,l=i[1].schema.id??`__schema${e.counter++}`;return{defId:l,ref:u+l}},s=i=>{if(i[1].schema.$ref)return;const a=i[1],{ref:c,defId:u}=o(i);a.def={...a.schema},u&&(a.defId=u);const l=a.schema;for(const f in l)delete l[f];l.$ref=c};if(e.cycles==="throw")for(const i of e.seen.entries()){const a=i[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
38
38
 
39
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const i of e.seen.entries()){const a=i[1];if(t===i[0]){s(i);continue}if(e.external){const u=e.external.registry.get(i[0])?.id;if(t!==i[0]&&u){s(i);continue}}if(e.metadataRegistry.get(i[0])?.id){s(i);continue}if(a.cycle){s(i);continue}if(a.count>1&&e.reused==="ref"){s(i);continue}}}function Rf(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=i=>{const a=e.seen.get(i);if(a.ref===null)return;const c=a.def??a.schema,u={...c},l=a.ref;if(a.ref=null,l){r(l);const d=e.seen.get(l),h=d.schema;if(h.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(h)):Object.assign(c,h),Object.assign(c,u),i._zod.parent===l)for(const p in c)p==="$ref"||p==="allOf"||p in u||delete c[p];if(h.$ref&&d.def)for(const p in c)p==="$ref"||p==="allOf"||p in d.def&&JSON.stringify(c[p])===JSON.stringify(d.def[p])&&delete c[p]}const f=i._zod.parent;if(f&&f!==l){r(f);const d=e.seen.get(f);if(d?.schema.$ref&&(c.$ref=d.schema.$ref,d.def))for(const h in c)h==="$ref"||h==="allOf"||h in d.def&&JSON.stringify(c[h])===JSON.stringify(d.def[h])&&delete c[h]}e.override({zodSchema:i,jsonSchema:c,path:a.path??[]})};for(const i of[...e.seen.entries()].reverse())r(i[0]);const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const i=e.external.registry.get(t)?.id;if(!i)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(i)}Object.assign(o,n.def??n.schema);const s=e.external?.defs??{};for(const i of e.seen.entries()){const a=i[1];a.def&&a.defId&&(s[a.defId]=a.def)}e.external||Object.keys(s).length>0&&(e.target==="draft-2020-12"?o.$defs=s:o.definitions=s);try{const i=JSON.parse(JSON.stringify(o));return Object.defineProperty(i,"~standard",{value:{...t["~standard"],jsonSchema:{input:Ms(t,"input",e.processors),output:Ms(t,"output",e.processors)}},enumerable:!1,writable:!1}),i}catch{throw new Error("Error converting schema to JSON.")}}function Rt(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return Rt(r.element,n);if(r.type==="set")return Rt(r.valueType,n);if(r.type==="lazy")return Rt(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return Rt(r.innerType,n);if(r.type==="intersection")return Rt(r.left,n)||Rt(r.right,n);if(r.type==="record"||r.type==="map")return Rt(r.keyType,n)||Rt(r.valueType,n);if(r.type==="pipe")return Rt(r.in,n)||Rt(r.out,n);if(r.type==="object"){for(const o in r.shape)if(Rt(r.shape[o],n))return!0;return!1}if(r.type==="union"){for(const o of r.options)if(Rt(o,n))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if(Rt(o,n))return!0;return!!(r.rest&&Rt(r.rest,n))}return!1}const p0=(e,t={})=>n=>{const r=If({...n,processors:t});return Ot(e,r),Ff(r,e),Rf(r,e)},Ms=(e,t,n={})=>r=>{const{libraryOptions:o,target:s}=r??{},i=If({...o??{},target:s,io:t,processors:n});return Ot(e,i),Ff(i,e),Rf(i,e)},m0={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},g0=(e,t,n,r)=>{const o=n;o.type="string";const{minimum:s,maximum:i,format:a,patterns:c,contentEncoding:u}=e._zod.bag;if(typeof s=="number"&&(o.minLength=s),typeof i=="number"&&(o.maxLength=i),a&&(o.format=m0[a]??a,o.format===""&&delete o.format,a==="time"&&delete o.format),u&&(o.contentEncoding=u),c&&c.size>0){const l=[...c];l.length===1?o.pattern=l[0].source:l.length>1&&(o.allOf=[...l.map(f=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:f.source}))])}},y0=(e,t,n,r)=>{n.not={}},v0=(e,t,n,r)=>{},b0=(e,t,n,r)=>{},w0=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},_0=(e,t,n,r)=>{const o=e._zod.def,s=sf(o.entries);s.every(i=>typeof i=="number")&&(n.type="number"),s.every(i=>typeof i=="string")&&(n.type="string"),n.enum=s},S0=(e,t,n,r)=>{const o=e._zod.def,s=[];for(const i of o.values)if(i===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof i=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");s.push(Number(i))}else s.push(i);if(s.length!==0)if(s.length===1){const i=s[0];n.type=i===null?"null":typeof i,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[i]:n.const=i}else s.every(i=>typeof i=="number")&&(n.type="number"),s.every(i=>typeof i=="string")&&(n.type="string"),s.every(i=>typeof i=="boolean")&&(n.type="boolean"),s.every(i=>i===null)&&(n.type="null"),n.enum=s},k0=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},x0=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},O0=(e,t,n,r)=>{const o=n,s=e._zod.def,{minimum:i,maximum:a}=e._zod.bag;typeof i=="number"&&(o.minItems=i),typeof a=="number"&&(o.maxItems=a),o.type="array",o.items=Ot(s.element,t,{...r,path:[...r.path,"items"]})},E0=(e,t,n,r)=>{const o=n,s=e._zod.def;o.type="object",o.properties={};const i=s.shape;for(const u in i)o.properties[u]=Ot(i[u],t,{...r,path:[...r.path,"properties",u]});const a=new Set(Object.keys(i)),c=new Set([...a].filter(u=>{const l=s.shape[u]._zod;return t.io==="input"?l.optin===void 0:l.optout===void 0}));c.size>0&&(o.required=Array.from(c)),s.catchall?._zod.def.type==="never"?o.additionalProperties=!1:s.catchall?s.catchall&&(o.additionalProperties=Ot(s.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},C0=(e,t,n,r)=>{const o=e._zod.def,s=o.inclusive===!1,i=o.options.map((a,c)=>Ot(a,t,{...r,path:[...r.path,s?"oneOf":"anyOf",c]}));s?n.oneOf=i:n.anyOf=i},T0=(e,t,n,r)=>{const o=e._zod.def,s=Ot(o.left,t,{...r,path:[...r.path,"allOf",0]}),i=Ot(o.right,t,{...r,path:[...r.path,"allOf",1]}),a=u=>"allOf"in u&&Object.keys(u).length===1,c=[...a(s)?s.allOf:[s],...a(i)?i.allOf:[i]];n.allOf=c},D0=(e,t,n,r)=>{const o=e._zod.def,s=Ot(o.innerType,t,r),i=t.seen.get(e);t.target==="openapi-3.0"?(i.ref=o.innerType,n.nullable=!0):n.anyOf=[s,{type:"null"}]},A0=(e,t,n,r)=>{const o=e._zod.def;Ot(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType},M0=(e,t,n,r)=>{const o=e._zod.def;Ot(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},P0=(e,t,n,r)=>{const o=e._zod.def;Ot(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},N0=(e,t,n,r)=>{const o=e._zod.def;Ot(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType;let i;try{i=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=i},I0=(e,t,n,r)=>{const o=e._zod.def,s=t.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;Ot(s,t,r);const i=t.seen.get(e);i.ref=s},F0=(e,t,n,r)=>{const o=e._zod.def;Ot(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType,n.readOnly=!0},Wf=(e,t,n,r)=>{const o=e._zod.def;Ot(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType},R0=J("ZodISODateTime",(e,t)=>{zw.init(e,t),ut.init(e,t)});function W0(e){return j_(R0,e)}const z0=J("ZodISODate",(e,t)=>{Lw.init(e,t),ut.init(e,t)});function L0(e){return V_(z0,e)}const $0=J("ZodISOTime",(e,t)=>{$w.init(e,t),ut.init(e,t)});function U0(e){return B_($0,e)}const Y0=J("ZodISODuration",(e,t)=>{Uw.init(e,t),ut.init(e,t)});function j0(e){return H_(Y0,e)}const tn=J("ZodError",(e,t)=>{Ea.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Mb(e,n)},flatten:{value:n=>Ab(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,_a,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,_a,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),V0=ks(tn),B0=xs(tn),H0=Os(tn),Z0=Es(tn),G0=Rb(tn),q0=Wb(tn),K0=zb(tn),X0=Lb(tn),J0=$b(tn),Q0=Ub(tn),e1=Yb(tn),t1=jb(tn),pt=J("ZodType",(e,t)=>(ht.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Ms(e,"input"),output:Ms(e,"output")}}),e.toJSONSchema=p0(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(or(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),e.with=e.check,e.clone=(n,r)=>sr(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>V0(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>H0(e,n,r),e.parseAsync=async(n,r)=>B0(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>Z0(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>G0(e,n,r),e.decode=(n,r)=>q0(e,n,r),e.encodeAsync=async(n,r)=>K0(e,n,r),e.decodeAsync=async(n,r)=>X0(e,n,r),e.safeEncode=(n,r)=>J0(e,n,r),e.safeDecode=(n,r)=>Q0(e,n,r),e.safeEncodeAsync=async(n,r)=>e1(e,n,r),e.safeDecodeAsync=async(n,r)=>t1(e,n,r),e.refine=(n,r)=>e.check(J1(n,r)),e.superRefine=n=>e.check(Q1(n)),e.overwrite=n=>e.check(Xr(n)),e.optional=()=>Bf(e),e.exactOptional=()=>L1(e),e.nullable=()=>Hf(e),e.nullish=()=>Bf(Hf(e)),e.nonoptional=n=>B1(e,n),e.array=()=>Yf(e),e.or=n=>A1([e,n]),e.and=n=>P1(e,n),e.transform=n=>Gf(e,W1(n)),e.default=n=>Y1(e,n),e.prefault=n=>V1(e,n),e.catch=n=>Z1(e,n),e.pipe=n=>Gf(e,n),e.readonly=()=>K1(e),e.describe=n=>{const r=e.clone();return No.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return No.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return No.get(e);const r=e.clone();return No.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),zf=J("_ZodString",(e,t)=>{Ca.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,o,s)=>g0(e,r,o);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(Q_(...r)),e.includes=(...r)=>e.check(n0(...r)),e.startsWith=(...r)=>e.check(r0(...r)),e.endsWith=(...r)=>e.check(o0(...r)),e.min=(...r)=>e.check(As(...r)),e.max=(...r)=>e.check(Pf(...r)),e.length=(...r)=>e.check(Nf(...r)),e.nonempty=(...r)=>e.check(As(1,...r)),e.lowercase=r=>e.check(e0(r)),e.uppercase=r=>e.check(t0(r)),e.trim=()=>e.check(i0()),e.normalize=(...r)=>e.check(s0(...r)),e.toLowerCase=()=>e.check(a0()),e.toUpperCase=()=>e.check(c0()),e.slugify=()=>e.check(l0())}),n1=J("ZodString",(e,t)=>{Ca.init(e,t),zf.init(e,t),e.email=n=>e.check(S_(r1,n)),e.url=n=>e.check(C_(o1,n)),e.jwt=n=>e.check(Y_(b1,n)),e.emoji=n=>e.check(T_(s1,n)),e.guid=n=>e.check(Mf($f,n)),e.uuid=n=>e.check(k_(Ps,n)),e.uuidv4=n=>e.check(x_(Ps,n)),e.uuidv6=n=>e.check(O_(Ps,n)),e.uuidv7=n=>e.check(E_(Ps,n)),e.nanoid=n=>e.check(D_(i1,n)),e.guid=n=>e.check(Mf($f,n)),e.cuid=n=>e.check(A_(a1,n)),e.cuid2=n=>e.check(M_(c1,n)),e.ulid=n=>e.check(P_(l1,n)),e.base64=n=>e.check(L_(g1,n)),e.base64url=n=>e.check($_(y1,n)),e.xid=n=>e.check(N_(u1,n)),e.ksuid=n=>e.check(I_(f1,n)),e.ipv4=n=>e.check(F_(d1,n)),e.ipv6=n=>e.check(R_(h1,n)),e.cidrv4=n=>e.check(W_(p1,n)),e.cidrv6=n=>e.check(z_(m1,n)),e.e164=n=>e.check(U_(v1,n)),e.datetime=n=>e.check(W0(n)),e.date=n=>e.check(L0(n)),e.time=n=>e.check(U0(n)),e.duration=n=>e.check(j0(n))});function Lf(e){return __(n1,e)}const ut=J("ZodStringFormat",(e,t)=>{it.init(e,t),zf.init(e,t)}),r1=J("ZodEmail",(e,t)=>{Dw.init(e,t),ut.init(e,t)}),$f=J("ZodGUID",(e,t)=>{Cw.init(e,t),ut.init(e,t)}),Ps=J("ZodUUID",(e,t)=>{Tw.init(e,t),ut.init(e,t)}),o1=J("ZodURL",(e,t)=>{Aw.init(e,t),ut.init(e,t)}),s1=J("ZodEmoji",(e,t)=>{Mw.init(e,t),ut.init(e,t)}),i1=J("ZodNanoID",(e,t)=>{Pw.init(e,t),ut.init(e,t)}),a1=J("ZodCUID",(e,t)=>{Nw.init(e,t),ut.init(e,t)}),c1=J("ZodCUID2",(e,t)=>{Iw.init(e,t),ut.init(e,t)}),l1=J("ZodULID",(e,t)=>{Fw.init(e,t),ut.init(e,t)}),u1=J("ZodXID",(e,t)=>{Rw.init(e,t),ut.init(e,t)}),f1=J("ZodKSUID",(e,t)=>{Ww.init(e,t),ut.init(e,t)}),d1=J("ZodIPv4",(e,t)=>{Yw.init(e,t),ut.init(e,t)}),h1=J("ZodIPv6",(e,t)=>{jw.init(e,t),ut.init(e,t)}),p1=J("ZodCIDRv4",(e,t)=>{Vw.init(e,t),ut.init(e,t)}),m1=J("ZodCIDRv6",(e,t)=>{Bw.init(e,t),ut.init(e,t)}),g1=J("ZodBase64",(e,t)=>{Hw.init(e,t),ut.init(e,t)}),y1=J("ZodBase64URL",(e,t)=>{Gw.init(e,t),ut.init(e,t)}),v1=J("ZodE164",(e,t)=>{qw.init(e,t),ut.init(e,t)}),b1=J("ZodJWT",(e,t)=>{Xw.init(e,t),ut.init(e,t)}),w1=J("ZodAny",(e,t)=>{Jw.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>v0()});function _1(){return Z_(w1)}const S1=J("ZodUnknown",(e,t)=>{Qw.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>b0()});function Uf(){return G_(S1)}const k1=J("ZodNever",(e,t)=>{e_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>y0(e,n,r)});function x1(e){return q_(k1,e)}const O1=J("ZodDate",(e,t)=>{t_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,o,s)=>w0(e,r),e.min=(r,o)=>e.check(J_(r,o)),e.max=(r,o)=>e.check(X_(r,o));const n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function E1(e){return K_(O1,e)}const C1=J("ZodArray",(e,t)=>{n_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>O0(e,n,r,o),e.element=t.element,e.min=(n,r)=>e.check(As(n,r)),e.nonempty=n=>e.check(As(1,n)),e.max=(n,r)=>e.check(Pf(n,r)),e.length=(n,r)=>e.check(Nf(n,r)),e.unwrap=()=>e.element});function Yf(e,t){return u0(C1,e,t)}const T1=J("ZodObject",(e,t)=>{o_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>E0(e,n,r,o),Be(e,"shape",()=>t.shape),e.keyof=()=>N1(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Uf()}),e.loose=()=>e.clone({...e._zod.def,catchall:Uf()}),e.strict=()=>e.clone({...e._zod.def,catchall:x1()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>Ob(e,n),e.safeExtend=n=>Eb(e,n),e.merge=n=>Cb(e,n),e.pick=n=>kb(e,n),e.omit=n=>xb(e,n),e.partial=(...n)=>Tb(Vf,e,n[0]),e.required=(...n)=>Db(Zf,e,n[0])});function jf(e,t){const n={type:"object",shape:e??{},...we(t)};return new T1(n)}const D1=J("ZodUnion",(e,t)=>{s_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>C0(e,n,r,o),e.options=t.options});function A1(e,t){return new D1({type:"union",options:e,...we(t)})}const M1=J("ZodIntersection",(e,t)=>{i_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>T0(e,n,r,o)});function P1(e,t){return new M1({type:"intersection",left:e,right:t})}const Da=J("ZodEnum",(e,t)=>{a_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,o,s)=>_0(e,r,o),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,o)=>{const s={};for(const i of r)if(n.has(i))s[i]=t.entries[i];else throw new Error(`Key ${i} not found in enum`);return new Da({...t,checks:[],...we(o),entries:s})},e.exclude=(r,o)=>{const s={...t.entries};for(const i of r)if(n.has(i))delete s[i];else throw new Error(`Key ${i} not found in enum`);return new Da({...t,checks:[],...we(o),entries:s})}});function N1(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Da({type:"enum",entries:n,...we(t)})}const I1=J("ZodLiteral",(e,t)=>{c_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>S0(e,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function F1(e,t){return new I1({type:"literal",values:Array.isArray(e)?e:[e],...we(t)})}const R1=J("ZodTransform",(e,t)=>{l_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>x0(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new rf(e.constructor.name);n.addIssue=s=>{if(typeof s=="string")n.issues.push(Po(s,n.value,t));else{const i=s;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=n.value),i.inst??(i.inst=e),n.issues.push(Po(i))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(s=>(n.value=s,n)):(n.value=o,n)}});function W1(e){return new R1({type:"transform",transform:e})}const Vf=J("ZodOptional",(e,t)=>{Of.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Wf(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Bf(e){return new Vf({type:"optional",innerType:e})}const z1=J("ZodExactOptional",(e,t)=>{u_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Wf(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function L1(e){return new z1({type:"optional",innerType:e})}const $1=J("ZodNullable",(e,t)=>{f_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>D0(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Hf(e){return new $1({type:"nullable",innerType:e})}const U1=J("ZodDefault",(e,t)=>{d_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>M0(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Y1(e,t){return new U1({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():uf(t)}})}const j1=J("ZodPrefault",(e,t)=>{h_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>P0(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function V1(e,t){return new j1({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():uf(t)}})}const Zf=J("ZodNonOptional",(e,t)=>{p_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>A0(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function B1(e,t){return new Zf({type:"nonoptional",innerType:e,...we(t)})}const H1=J("ZodCatch",(e,t)=>{m_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>N0(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Z1(e,t){return new H1({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const G1=J("ZodPipe",(e,t)=>{g_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>I0(e,n,r,o),e.in=t.in,e.out=t.out});function Gf(e,t){return new G1({type:"pipe",in:e,out:t})}const q1=J("ZodReadonly",(e,t)=>{y_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>F0(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function K1(e){return new q1({type:"readonly",innerType:e})}const X1=J("ZodCustom",(e,t)=>{v_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>k0(e,n)});function J1(e,t={}){return f0(X1,e,t)}function Q1(e){return d0(e)}var qf;function ce(){return qf.apply(null,arguments)}function eS(e){qf=e}function un(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function Dr(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function $e(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Aa(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if($e(e,t))return!1;return!0}function Ut(e){return e===void 0}function $n(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function Io(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function Kf(e,t){var n=[],r,o=e.length;for(r=0;r<o;++r)n.push(t(e[r],r));return n}function ir(e,t){for(var n in t)$e(t,n)&&(e[n]=t[n]);return $e(t,"toString")&&(e.toString=t.toString),$e(t,"valueOf")&&(e.valueOf=t.valueOf),e}function xn(e,t,n,r){return kd(e,t,n,r,!0).utc()}function tS(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function Ce(e){return e._pf==null&&(e._pf=tS()),e._pf}var Ma;Array.prototype.some?Ma=Array.prototype.some:Ma=function(e){var t=Object(this),n=t.length>>>0,r;for(r=0;r<n;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};function Pa(e){var t=null,n=!1,r=e._d&&!isNaN(e._d.getTime());if(r&&(t=Ce(e),n=Ma.call(t.parsedDateParts,function(o){return o!=null}),r=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n),e._strict&&(r=r&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=r;else return r;return e._isValid}function Ns(e){var t=xn(NaN);return e!=null?ir(Ce(t),e):Ce(t).userInvalidated=!0,t}var Xf=ce.momentProperties=[],Na=!1;function Ia(e,t){var n,r,o,s=Xf.length;if(Ut(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),Ut(t._i)||(e._i=t._i),Ut(t._f)||(e._f=t._f),Ut(t._l)||(e._l=t._l),Ut(t._strict)||(e._strict=t._strict),Ut(t._tzm)||(e._tzm=t._tzm),Ut(t._isUTC)||(e._isUTC=t._isUTC),Ut(t._offset)||(e._offset=t._offset),Ut(t._pf)||(e._pf=Ce(t)),Ut(t._locale)||(e._locale=t._locale),s>0)for(n=0;n<s;n++)r=Xf[n],o=t[r],Ut(o)||(e[r]=o);return e}function Fo(e){Ia(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),Na===!1&&(Na=!0,ce.updateOffset(this),Na=!1)}function fn(e){return e instanceof Fo||e!=null&&e._isAMomentObject!=null}function Jf(e){ce.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function nn(e,t){var n=!0;return ir(function(){if(ce.deprecationHandler!=null&&ce.deprecationHandler(null,e),n){var r=[],o,s,i,a=arguments.length;for(s=0;s<a;s++){if(o="",typeof arguments[s]=="object"){o+=`
39
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const i of e.seen.entries()){const a=i[1];if(t===i[0]){s(i);continue}if(e.external){const u=e.external.registry.get(i[0])?.id;if(t!==i[0]&&u){s(i);continue}}if(e.metadataRegistry.get(i[0])?.id){s(i);continue}if(a.cycle){s(i);continue}if(a.count>1&&e.reused==="ref"){s(i);continue}}}function Rf(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=i=>{const a=e.seen.get(i);if(a.ref===null)return;const c=a.def??a.schema,u={...c},l=a.ref;if(a.ref=null,l){r(l);const d=e.seen.get(l),h=d.schema;if(h.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(h)):Object.assign(c,h),Object.assign(c,u),i._zod.parent===l)for(const p in c)p==="$ref"||p==="allOf"||p in u||delete c[p];if(h.$ref&&d.def)for(const p in c)p==="$ref"||p==="allOf"||p in d.def&&JSON.stringify(c[p])===JSON.stringify(d.def[p])&&delete c[p]}const f=i._zod.parent;if(f&&f!==l){r(f);const d=e.seen.get(f);if(d?.schema.$ref&&(c.$ref=d.schema.$ref,d.def))for(const h in c)h==="$ref"||h==="allOf"||h in d.def&&JSON.stringify(c[h])===JSON.stringify(d.def[h])&&delete c[h]}e.override({zodSchema:i,jsonSchema:c,path:a.path??[]})};for(const i of[...e.seen.entries()].reverse())r(i[0]);const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const i=e.external.registry.get(t)?.id;if(!i)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(i)}Object.assign(o,n.def??n.schema);const s=e.external?.defs??{};for(const i of e.seen.entries()){const a=i[1];a.def&&a.defId&&(s[a.defId]=a.def)}e.external||Object.keys(s).length>0&&(e.target==="draft-2020-12"?o.$defs=s:o.definitions=s);try{const i=JSON.parse(JSON.stringify(o));return Object.defineProperty(i,"~standard",{value:{...t["~standard"],jsonSchema:{input:As(t,"input",e.processors),output:As(t,"output",e.processors)}},enumerable:!1,writable:!1}),i}catch{throw new Error("Error converting schema to JSON.")}}function Rt(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return Rt(r.element,n);if(r.type==="set")return Rt(r.valueType,n);if(r.type==="lazy")return Rt(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return Rt(r.innerType,n);if(r.type==="intersection")return Rt(r.left,n)||Rt(r.right,n);if(r.type==="record"||r.type==="map")return Rt(r.keyType,n)||Rt(r.valueType,n);if(r.type==="pipe")return Rt(r.in,n)||Rt(r.out,n);if(r.type==="object"){for(const o in r.shape)if(Rt(r.shape[o],n))return!0;return!1}if(r.type==="union"){for(const o of r.options)if(Rt(o,n))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if(Rt(o,n))return!0;return!!(r.rest&&Rt(r.rest,n))}return!1}const p0=(e,t={})=>n=>{const r=If({...n,processors:t});return Ot(e,r),Ff(r,e),Rf(r,e)},As=(e,t,n={})=>r=>{const{libraryOptions:o,target:s}=r??{},i=If({...o??{},target:s,io:t,processors:n});return Ot(e,i),Ff(i,e),Rf(i,e)},m0={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},g0=(e,t,n,r)=>{const o=n;o.type="string";const{minimum:s,maximum:i,format:a,patterns:c,contentEncoding:u}=e._zod.bag;if(typeof s=="number"&&(o.minLength=s),typeof i=="number"&&(o.maxLength=i),a&&(o.format=m0[a]??a,o.format===""&&delete o.format,a==="time"&&delete o.format),u&&(o.contentEncoding=u),c&&c.size>0){const l=[...c];l.length===1?o.pattern=l[0].source:l.length>1&&(o.allOf=[...l.map(f=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:f.source}))])}},y0=(e,t,n,r)=>{n.not={}},v0=(e,t,n,r)=>{},b0=(e,t,n,r)=>{},w0=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},_0=(e,t,n,r)=>{const o=e._zod.def,s=sf(o.entries);s.every(i=>typeof i=="number")&&(n.type="number"),s.every(i=>typeof i=="string")&&(n.type="string"),n.enum=s},S0=(e,t,n,r)=>{const o=e._zod.def,s=[];for(const i of o.values)if(i===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof i=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");s.push(Number(i))}else s.push(i);if(s.length!==0)if(s.length===1){const i=s[0];n.type=i===null?"null":typeof i,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[i]:n.const=i}else s.every(i=>typeof i=="number")&&(n.type="number"),s.every(i=>typeof i=="string")&&(n.type="string"),s.every(i=>typeof i=="boolean")&&(n.type="boolean"),s.every(i=>i===null)&&(n.type="null"),n.enum=s},k0=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},x0=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},O0=(e,t,n,r)=>{const o=n,s=e._zod.def,{minimum:i,maximum:a}=e._zod.bag;typeof i=="number"&&(o.minItems=i),typeof a=="number"&&(o.maxItems=a),o.type="array",o.items=Ot(s.element,t,{...r,path:[...r.path,"items"]})},E0=(e,t,n,r)=>{const o=n,s=e._zod.def;o.type="object",o.properties={};const i=s.shape;for(const u in i)o.properties[u]=Ot(i[u],t,{...r,path:[...r.path,"properties",u]});const a=new Set(Object.keys(i)),c=new Set([...a].filter(u=>{const l=s.shape[u]._zod;return t.io==="input"?l.optin===void 0:l.optout===void 0}));c.size>0&&(o.required=Array.from(c)),s.catchall?._zod.def.type==="never"?o.additionalProperties=!1:s.catchall?s.catchall&&(o.additionalProperties=Ot(s.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},C0=(e,t,n,r)=>{const o=e._zod.def,s=o.inclusive===!1,i=o.options.map((a,c)=>Ot(a,t,{...r,path:[...r.path,s?"oneOf":"anyOf",c]}));s?n.oneOf=i:n.anyOf=i},T0=(e,t,n,r)=>{const o=e._zod.def,s=Ot(o.left,t,{...r,path:[...r.path,"allOf",0]}),i=Ot(o.right,t,{...r,path:[...r.path,"allOf",1]}),a=u=>"allOf"in u&&Object.keys(u).length===1,c=[...a(s)?s.allOf:[s],...a(i)?i.allOf:[i]];n.allOf=c},D0=(e,t,n,r)=>{const o=e._zod.def,s=Ot(o.innerType,t,r),i=t.seen.get(e);t.target==="openapi-3.0"?(i.ref=o.innerType,n.nullable=!0):n.anyOf=[s,{type:"null"}]},M0=(e,t,n,r)=>{const o=e._zod.def;Ot(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType},A0=(e,t,n,r)=>{const o=e._zod.def;Ot(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},P0=(e,t,n,r)=>{const o=e._zod.def;Ot(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},N0=(e,t,n,r)=>{const o=e._zod.def;Ot(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType;let i;try{i=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=i},I0=(e,t,n,r)=>{const o=e._zod.def,s=t.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;Ot(s,t,r);const i=t.seen.get(e);i.ref=s},F0=(e,t,n,r)=>{const o=e._zod.def;Ot(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType,n.readOnly=!0},Wf=(e,t,n,r)=>{const o=e._zod.def;Ot(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType},R0=J("ZodISODateTime",(e,t)=>{zw.init(e,t),ut.init(e,t)});function W0(e){return j_(R0,e)}const z0=J("ZodISODate",(e,t)=>{Lw.init(e,t),ut.init(e,t)});function L0(e){return V_(z0,e)}const $0=J("ZodISOTime",(e,t)=>{$w.init(e,t),ut.init(e,t)});function U0(e){return B_($0,e)}const Y0=J("ZodISODuration",(e,t)=>{Uw.init(e,t),ut.init(e,t)});function j0(e){return H_(Y0,e)}const tn=J("ZodError",(e,t)=>{Ea.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Ab(e,n)},flatten:{value:n=>Mb(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,_a,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,_a,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),V0=ks(tn),B0=xs(tn),H0=Os(tn),Z0=Es(tn),G0=Rb(tn),q0=Wb(tn),K0=zb(tn),X0=Lb(tn),J0=$b(tn),Q0=Ub(tn),e1=Yb(tn),t1=jb(tn),pt=J("ZodType",(e,t)=>(ht.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:As(e,"input"),output:As(e,"output")}}),e.toJSONSchema=p0(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(or(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),e.with=e.check,e.clone=(n,r)=>sr(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>V0(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>H0(e,n,r),e.parseAsync=async(n,r)=>B0(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>Z0(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>G0(e,n,r),e.decode=(n,r)=>q0(e,n,r),e.encodeAsync=async(n,r)=>K0(e,n,r),e.decodeAsync=async(n,r)=>X0(e,n,r),e.safeEncode=(n,r)=>J0(e,n,r),e.safeDecode=(n,r)=>Q0(e,n,r),e.safeEncodeAsync=async(n,r)=>e1(e,n,r),e.safeDecodeAsync=async(n,r)=>t1(e,n,r),e.refine=(n,r)=>e.check(J1(n,r)),e.superRefine=n=>e.check(Q1(n)),e.overwrite=n=>e.check(Xr(n)),e.optional=()=>Bf(e),e.exactOptional=()=>L1(e),e.nullable=()=>Hf(e),e.nullish=()=>Bf(Hf(e)),e.nonoptional=n=>B1(e,n),e.array=()=>Yf(e),e.or=n=>M1([e,n]),e.and=n=>P1(e,n),e.transform=n=>Gf(e,W1(n)),e.default=n=>Y1(e,n),e.prefault=n=>V1(e,n),e.catch=n=>Z1(e,n),e.pipe=n=>Gf(e,n),e.readonly=()=>K1(e),e.describe=n=>{const r=e.clone();return No.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return No.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return No.get(e);const r=e.clone();return No.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),zf=J("_ZodString",(e,t)=>{Ca.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,o,s)=>g0(e,r,o);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(Q_(...r)),e.includes=(...r)=>e.check(n0(...r)),e.startsWith=(...r)=>e.check(r0(...r)),e.endsWith=(...r)=>e.check(o0(...r)),e.min=(...r)=>e.check(Ms(...r)),e.max=(...r)=>e.check(Pf(...r)),e.length=(...r)=>e.check(Nf(...r)),e.nonempty=(...r)=>e.check(Ms(1,...r)),e.lowercase=r=>e.check(e0(r)),e.uppercase=r=>e.check(t0(r)),e.trim=()=>e.check(i0()),e.normalize=(...r)=>e.check(s0(...r)),e.toLowerCase=()=>e.check(a0()),e.toUpperCase=()=>e.check(c0()),e.slugify=()=>e.check(l0())}),n1=J("ZodString",(e,t)=>{Ca.init(e,t),zf.init(e,t),e.email=n=>e.check(S_(r1,n)),e.url=n=>e.check(C_(o1,n)),e.jwt=n=>e.check(Y_(b1,n)),e.emoji=n=>e.check(T_(s1,n)),e.guid=n=>e.check(Af($f,n)),e.uuid=n=>e.check(k_(Ps,n)),e.uuidv4=n=>e.check(x_(Ps,n)),e.uuidv6=n=>e.check(O_(Ps,n)),e.uuidv7=n=>e.check(E_(Ps,n)),e.nanoid=n=>e.check(D_(i1,n)),e.guid=n=>e.check(Af($f,n)),e.cuid=n=>e.check(M_(a1,n)),e.cuid2=n=>e.check(A_(c1,n)),e.ulid=n=>e.check(P_(l1,n)),e.base64=n=>e.check(L_(g1,n)),e.base64url=n=>e.check($_(y1,n)),e.xid=n=>e.check(N_(u1,n)),e.ksuid=n=>e.check(I_(f1,n)),e.ipv4=n=>e.check(F_(d1,n)),e.ipv6=n=>e.check(R_(h1,n)),e.cidrv4=n=>e.check(W_(p1,n)),e.cidrv6=n=>e.check(z_(m1,n)),e.e164=n=>e.check(U_(v1,n)),e.datetime=n=>e.check(W0(n)),e.date=n=>e.check(L0(n)),e.time=n=>e.check(U0(n)),e.duration=n=>e.check(j0(n))});function Lf(e){return __(n1,e)}const ut=J("ZodStringFormat",(e,t)=>{it.init(e,t),zf.init(e,t)}),r1=J("ZodEmail",(e,t)=>{Dw.init(e,t),ut.init(e,t)}),$f=J("ZodGUID",(e,t)=>{Cw.init(e,t),ut.init(e,t)}),Ps=J("ZodUUID",(e,t)=>{Tw.init(e,t),ut.init(e,t)}),o1=J("ZodURL",(e,t)=>{Mw.init(e,t),ut.init(e,t)}),s1=J("ZodEmoji",(e,t)=>{Aw.init(e,t),ut.init(e,t)}),i1=J("ZodNanoID",(e,t)=>{Pw.init(e,t),ut.init(e,t)}),a1=J("ZodCUID",(e,t)=>{Nw.init(e,t),ut.init(e,t)}),c1=J("ZodCUID2",(e,t)=>{Iw.init(e,t),ut.init(e,t)}),l1=J("ZodULID",(e,t)=>{Fw.init(e,t),ut.init(e,t)}),u1=J("ZodXID",(e,t)=>{Rw.init(e,t),ut.init(e,t)}),f1=J("ZodKSUID",(e,t)=>{Ww.init(e,t),ut.init(e,t)}),d1=J("ZodIPv4",(e,t)=>{Yw.init(e,t),ut.init(e,t)}),h1=J("ZodIPv6",(e,t)=>{jw.init(e,t),ut.init(e,t)}),p1=J("ZodCIDRv4",(e,t)=>{Vw.init(e,t),ut.init(e,t)}),m1=J("ZodCIDRv6",(e,t)=>{Bw.init(e,t),ut.init(e,t)}),g1=J("ZodBase64",(e,t)=>{Hw.init(e,t),ut.init(e,t)}),y1=J("ZodBase64URL",(e,t)=>{Gw.init(e,t),ut.init(e,t)}),v1=J("ZodE164",(e,t)=>{qw.init(e,t),ut.init(e,t)}),b1=J("ZodJWT",(e,t)=>{Xw.init(e,t),ut.init(e,t)}),w1=J("ZodAny",(e,t)=>{Jw.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>v0()});function _1(){return Z_(w1)}const S1=J("ZodUnknown",(e,t)=>{Qw.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>b0()});function Uf(){return G_(S1)}const k1=J("ZodNever",(e,t)=>{e_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>y0(e,n,r)});function x1(e){return q_(k1,e)}const O1=J("ZodDate",(e,t)=>{t_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,o,s)=>w0(e,r),e.min=(r,o)=>e.check(J_(r,o)),e.max=(r,o)=>e.check(X_(r,o));const n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function E1(e){return K_(O1,e)}const C1=J("ZodArray",(e,t)=>{n_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>O0(e,n,r,o),e.element=t.element,e.min=(n,r)=>e.check(Ms(n,r)),e.nonempty=n=>e.check(Ms(1,n)),e.max=(n,r)=>e.check(Pf(n,r)),e.length=(n,r)=>e.check(Nf(n,r)),e.unwrap=()=>e.element});function Yf(e,t){return u0(C1,e,t)}const T1=J("ZodObject",(e,t)=>{o_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>E0(e,n,r,o),Be(e,"shape",()=>t.shape),e.keyof=()=>N1(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Uf()}),e.loose=()=>e.clone({...e._zod.def,catchall:Uf()}),e.strict=()=>e.clone({...e._zod.def,catchall:x1()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>Ob(e,n),e.safeExtend=n=>Eb(e,n),e.merge=n=>Cb(e,n),e.pick=n=>kb(e,n),e.omit=n=>xb(e,n),e.partial=(...n)=>Tb(Vf,e,n[0]),e.required=(...n)=>Db(Zf,e,n[0])});function jf(e,t){const n={type:"object",shape:e??{},...we(t)};return new T1(n)}const D1=J("ZodUnion",(e,t)=>{s_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>C0(e,n,r,o),e.options=t.options});function M1(e,t){return new D1({type:"union",options:e,...we(t)})}const A1=J("ZodIntersection",(e,t)=>{i_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>T0(e,n,r,o)});function P1(e,t){return new A1({type:"intersection",left:e,right:t})}const Da=J("ZodEnum",(e,t)=>{a_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,o,s)=>_0(e,r,o),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,o)=>{const s={};for(const i of r)if(n.has(i))s[i]=t.entries[i];else throw new Error(`Key ${i} not found in enum`);return new Da({...t,checks:[],...we(o),entries:s})},e.exclude=(r,o)=>{const s={...t.entries};for(const i of r)if(n.has(i))delete s[i];else throw new Error(`Key ${i} not found in enum`);return new Da({...t,checks:[],...we(o),entries:s})}});function N1(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Da({type:"enum",entries:n,...we(t)})}const I1=J("ZodLiteral",(e,t)=>{c_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>S0(e,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function F1(e,t){return new I1({type:"literal",values:Array.isArray(e)?e:[e],...we(t)})}const R1=J("ZodTransform",(e,t)=>{l_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>x0(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new rf(e.constructor.name);n.addIssue=s=>{if(typeof s=="string")n.issues.push(Po(s,n.value,t));else{const i=s;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=n.value),i.inst??(i.inst=e),n.issues.push(Po(i))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(s=>(n.value=s,n)):(n.value=o,n)}});function W1(e){return new R1({type:"transform",transform:e})}const Vf=J("ZodOptional",(e,t)=>{Of.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Wf(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Bf(e){return new Vf({type:"optional",innerType:e})}const z1=J("ZodExactOptional",(e,t)=>{u_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Wf(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function L1(e){return new z1({type:"optional",innerType:e})}const $1=J("ZodNullable",(e,t)=>{f_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>D0(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Hf(e){return new $1({type:"nullable",innerType:e})}const U1=J("ZodDefault",(e,t)=>{d_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>A0(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Y1(e,t){return new U1({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():uf(t)}})}const j1=J("ZodPrefault",(e,t)=>{h_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>P0(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function V1(e,t){return new j1({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():uf(t)}})}const Zf=J("ZodNonOptional",(e,t)=>{p_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>M0(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function B1(e,t){return new Zf({type:"nonoptional",innerType:e,...we(t)})}const H1=J("ZodCatch",(e,t)=>{m_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>N0(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Z1(e,t){return new H1({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const G1=J("ZodPipe",(e,t)=>{g_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>I0(e,n,r,o),e.in=t.in,e.out=t.out});function Gf(e,t){return new G1({type:"pipe",in:e,out:t})}const q1=J("ZodReadonly",(e,t)=>{y_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>F0(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function K1(e){return new q1({type:"readonly",innerType:e})}const X1=J("ZodCustom",(e,t)=>{v_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>k0(e,n)});function J1(e,t={}){return f0(X1,e,t)}function Q1(e){return d0(e)}var qf;function ce(){return qf.apply(null,arguments)}function eS(e){qf=e}function un(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function Dr(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function $e(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ma(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if($e(e,t))return!1;return!0}function Ut(e){return e===void 0}function $n(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function Io(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function Kf(e,t){var n=[],r,o=e.length;for(r=0;r<o;++r)n.push(t(e[r],r));return n}function ir(e,t){for(var n in t)$e(t,n)&&(e[n]=t[n]);return $e(t,"toString")&&(e.toString=t.toString),$e(t,"valueOf")&&(e.valueOf=t.valueOf),e}function xn(e,t,n,r){return kd(e,t,n,r,!0).utc()}function tS(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function Ce(e){return e._pf==null&&(e._pf=tS()),e._pf}var Aa;Array.prototype.some?Aa=Array.prototype.some:Aa=function(e){var t=Object(this),n=t.length>>>0,r;for(r=0;r<n;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};function Pa(e){var t=null,n=!1,r=e._d&&!isNaN(e._d.getTime());if(r&&(t=Ce(e),n=Aa.call(t.parsedDateParts,function(o){return o!=null}),r=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n),e._strict&&(r=r&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=r;else return r;return e._isValid}function Ns(e){var t=xn(NaN);return e!=null?ir(Ce(t),e):Ce(t).userInvalidated=!0,t}var Xf=ce.momentProperties=[],Na=!1;function Ia(e,t){var n,r,o,s=Xf.length;if(Ut(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),Ut(t._i)||(e._i=t._i),Ut(t._f)||(e._f=t._f),Ut(t._l)||(e._l=t._l),Ut(t._strict)||(e._strict=t._strict),Ut(t._tzm)||(e._tzm=t._tzm),Ut(t._isUTC)||(e._isUTC=t._isUTC),Ut(t._offset)||(e._offset=t._offset),Ut(t._pf)||(e._pf=Ce(t)),Ut(t._locale)||(e._locale=t._locale),s>0)for(n=0;n<s;n++)r=Xf[n],o=t[r],Ut(o)||(e[r]=o);return e}function Fo(e){Ia(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),Na===!1&&(Na=!0,ce.updateOffset(this),Na=!1)}function fn(e){return e instanceof Fo||e!=null&&e._isAMomentObject!=null}function Jf(e){ce.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function nn(e,t){var n=!0;return ir(function(){if(ce.deprecationHandler!=null&&ce.deprecationHandler(null,e),n){var r=[],o,s,i,a=arguments.length;for(s=0;s<a;s++){if(o="",typeof arguments[s]=="object"){o+=`
40
40
  [`+s+"] ";for(i in arguments[0])$e(arguments[0],i)&&(o+=i+": "+arguments[0][i]+", ");o=o.slice(0,-2)}else o=arguments[s];r.push(o)}Jf(e+`
41
41
  Arguments: `+Array.prototype.slice.call(r).join("")+`
42
- `+new Error().stack),n=!1}return t.apply(this,arguments)},t)}var Qf={};function ed(e,t){ce.deprecationHandler!=null&&ce.deprecationHandler(e,t),Qf[e]||(Jf(t),Qf[e]=!0)}ce.suppressDeprecationWarnings=!1,ce.deprecationHandler=null;function On(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function nS(e){var t,n;for(n in e)$e(e,n)&&(t=e[n],On(t)?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function Fa(e,t){var n=ir({},e),r;for(r in t)$e(t,r)&&(Dr(e[r])&&Dr(t[r])?(n[r]={},ir(n[r],e[r]),ir(n[r],t[r])):t[r]!=null?n[r]=t[r]:delete n[r]);for(r in e)$e(e,r)&&!$e(t,r)&&Dr(e[r])&&(n[r]=ir({},n[r]));return n}function Ra(e){e!=null&&this.set(e)}var Wa;Object.keys?Wa=Object.keys:Wa=function(e){var t,n=[];for(t in e)$e(e,t)&&n.push(t);return n};var rS={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function oS(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return On(r)?r.call(t,n):r}function En(e,t,n){var r=""+Math.abs(e),o=t-r.length,s=e>=0;return(s?n?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+r}var za=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Is=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,La={},Jr={};function ge(e,t,n,r){var o=r;typeof r=="string"&&(o=function(){return this[r]()}),e&&(Jr[e]=o),t&&(Jr[t[0]]=function(){return En(o.apply(this,arguments),t[1],t[2])}),n&&(Jr[n]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function sS(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function iS(e){var t=e.match(za),n,r;for(n=0,r=t.length;n<r;n++)Jr[t[n]]?t[n]=Jr[t[n]]:t[n]=sS(t[n]);return function(o){var s="",i;for(i=0;i<r;i++)s+=On(t[i])?t[i].call(o,e):t[i];return s}}function Fs(e,t){return e.isValid()?(t=td(t,e.localeData()),La[t]=La[t]||iS(t),La[t](e)):e.localeData().invalidDate()}function td(e,t){var n=5;function r(o){return t.longDateFormat(o)||o}for(Is.lastIndex=0;n>=0&&Is.test(e);)e=e.replace(Is,r),Is.lastIndex=0,n-=1;return e}var aS={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function cS(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(za).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var lS="Invalid date";function uS(){return this._invalidDate}var fS="%d",dS=/\d{1,2}/;function hS(e){return this._ordinal.replace("%d",e)}var pS={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function mS(e,t,n,r){var o=this._relativeTime[n];return On(o)?o(e,t,n,r):o.replace(/%d/i,e)}function gS(e,t){var n=this._relativeTime[e>0?"future":"past"];return On(n)?n(t):n.replace(/%s/i,t)}var nd={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function rn(e){return typeof e=="string"?nd[e]||nd[e.toLowerCase()]:void 0}function $a(e){var t={},n,r;for(r in e)$e(e,r)&&(n=rn(r),n&&(t[n]=e[r]));return t}var yS={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function vS(e){var t=[],n;for(n in e)$e(e,n)&&t.push({unit:n,priority:yS[n]});return t.sort(function(r,o){return r.priority-o.priority}),t}var rd=/\d/,Zt=/\d\d/,od=/\d{3}/,Ua=/\d{4}/,Rs=/[+-]?\d{6}/,et=/\d\d?/,sd=/\d\d\d\d?/,id=/\d\d\d\d\d\d?/,Ws=/\d{1,3}/,Ya=/\d{1,4}/,zs=/[+-]?\d{1,6}/,Qr=/\d+/,Ls=/[+-]?\d+/,bS=/Z|[+-]\d\d:?\d\d/gi,$s=/Z|[+-]\d\d(?::?\d\d)?/gi,wS=/[+-]?\d+(\.\d{1,3})?/,Ro=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,eo=/^[1-9]\d?/,ja=/^([1-9]\d|\d)/,Us;Us={};function fe(e,t,n){Us[e]=On(t)?t:function(r,o){return r&&n?n:t}}function _S(e,t){return $e(Us,e)?Us[e](t._strict,t._locale):new RegExp(SS(e))}function SS(e){return Un(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,n,r,o,s){return n||r||o||s}))}function Un(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function on(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Fe(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=on(t)),n}var Va={};function qe(e,t){var n,r=t,o;for(typeof e=="string"&&(e=[e]),$n(t)&&(r=function(s,i){i[t]=Fe(s)}),o=e.length,n=0;n<o;n++)Va[e[n]]=r}function Wo(e,t){qe(e,function(n,r,o,s){o._w=o._w||{},t(n,o._w,o,s)})}function kS(e,t,n){t!=null&&$e(Va,e)&&Va[e](t,n._a,n,e)}function Ys(e){return e%4===0&&e%100!==0||e%400===0}var Tt=0,Yn=1,Cn=2,St=3,dn=4,jn=5,Ar=6,xS=7,OS=8;ge("Y",0,0,function(){var e=this.year();return e<=9999?En(e,4):"+"+e}),ge(0,["YY",2],0,function(){return this.year()%100}),ge(0,["YYYY",4],0,"year"),ge(0,["YYYYY",5],0,"year"),ge(0,["YYYYYY",6,!0],0,"year"),fe("Y",Ls),fe("YY",et,Zt),fe("YYYY",Ya,Ua),fe("YYYYY",zs,Rs),fe("YYYYYY",zs,Rs),qe(["YYYYY","YYYYYY"],Tt),qe("YYYY",function(e,t){t[Tt]=e.length===2?ce.parseTwoDigitYear(e):Fe(e)}),qe("YY",function(e,t){t[Tt]=ce.parseTwoDigitYear(e)}),qe("Y",function(e,t){t[Tt]=parseInt(e,10)});function zo(e){return Ys(e)?366:365}ce.parseTwoDigitYear=function(e){return Fe(e)+(Fe(e)>68?1900:2e3)};var ad=to("FullYear",!0);function ES(){return Ys(this.year())}function to(e,t){return function(n){return n!=null?(cd(this,e,n),ce.updateOffset(this,t),this):Lo(this,e)}}function Lo(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function cd(e,t,n){var r,o,s,i,a;if(!(!e.isValid()||isNaN(n))){switch(r=e._d,o=e._isUTC,t){case"Milliseconds":return void(o?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(o?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(o?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(o?r.setUTCHours(n):r.setHours(n));case"Date":return void(o?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}s=n,i=e.month(),a=e.date(),a=a===29&&i===1&&!Ys(s)?28:a,o?r.setUTCFullYear(s,i,a):r.setFullYear(s,i,a)}}function CS(e){return e=rn(e),On(this[e])?this[e]():this}function TS(e,t){if(typeof e=="object"){e=$a(e);var n=vS(e),r,o=n.length;for(r=0;r<o;r++)this[n[r].unit](e[n[r].unit])}else if(e=rn(e),On(this[e]))return this[e](t);return this}function DS(e,t){return(e%t+t)%t}var mt;Array.prototype.indexOf?mt=Array.prototype.indexOf:mt=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function Ba(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=DS(t,12);return e+=(t-n)/12,n===1?Ys(e)?29:28:31-n%7%2}ge("M",["MM",2],"Mo",function(){return this.month()+1}),ge("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),ge("MMMM",0,0,function(e){return this.localeData().months(this,e)}),fe("M",et,eo),fe("MM",et,Zt),fe("MMM",function(e,t){return t.monthsShortRegex(e)}),fe("MMMM",function(e,t){return t.monthsRegex(e)}),qe(["M","MM"],function(e,t){t[Yn]=Fe(e)-1}),qe(["MMM","MMMM"],function(e,t,n,r){var o=n._locale.monthsParse(e,r,n._strict);o!=null?t[Yn]=o:Ce(n).invalidMonth=e});var AS="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ld="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),ud=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,MS=Ro,PS=Ro;function NS(e,t){return e?un(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||ud).test(t)?"format":"standalone"][e.month()]:un(this._months)?this._months:this._months.standalone}function IS(e,t){return e?un(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[ud.test(t)?"format":"standalone"][e.month()]:un(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function FS(e,t,n){var r,o,s,i=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)s=xn([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(s,"").toLocaleLowerCase();return n?t==="MMM"?(o=mt.call(this._shortMonthsParse,i),o!==-1?o:null):(o=mt.call(this._longMonthsParse,i),o!==-1?o:null):t==="MMM"?(o=mt.call(this._shortMonthsParse,i),o!==-1?o:(o=mt.call(this._longMonthsParse,i),o!==-1?o:null)):(o=mt.call(this._longMonthsParse,i),o!==-1?o:(o=mt.call(this._shortMonthsParse,i),o!==-1?o:null))}function RS(e,t,n){var r,o,s;if(this._monthsParseExact)return FS.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(o=xn([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),!n&&!this._monthsParse[r]&&(s="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[r]=new RegExp(s.replace(".",""),"i")),n&&t==="MMMM"&&this._longMonthsParse[r].test(e))return r;if(n&&t==="MMM"&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}}function fd(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=Fe(t);else if(t=e.localeData().monthsParse(t),!$n(t))return e}var n=t,r=e.date();return r=r<29?r:Math.min(r,Ba(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,r):e._d.setMonth(n,r),e}function dd(e){return e!=null?(fd(this,e),ce.updateOffset(this,!0),this):Lo(this,"Month")}function WS(){return Ba(this.year(),this.month())}function zS(e){return this._monthsParseExact?($e(this,"_monthsRegex")||hd.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):($e(this,"_monthsShortRegex")||(this._monthsShortRegex=MS),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function LS(e){return this._monthsParseExact?($e(this,"_monthsRegex")||hd.call(this),e?this._monthsStrictRegex:this._monthsRegex):($e(this,"_monthsRegex")||(this._monthsRegex=PS),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function hd(){function e(c,u){return u.length-c.length}var t=[],n=[],r=[],o,s,i,a;for(o=0;o<12;o++)s=xn([2e3,o]),i=Un(this.monthsShort(s,"")),a=Un(this.months(s,"")),t.push(i),n.push(a),r.push(a),r.push(i);t.sort(e),n.sort(e),r.sort(e),this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function $S(e,t,n,r,o,s,i){var a;return e<100&&e>=0?(a=new Date(e+400,t,n,r,o,s,i),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,n,r,o,s,i),a}function $o(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function js(e,t,n){var r=7+t-n,o=(7+$o(e,0,r).getUTCDay()-t)%7;return-o+r-1}function pd(e,t,n,r,o){var s=(7+n-r)%7,i=js(e,r,o),a=1+7*(t-1)+s+i,c,u;return a<=0?(c=e-1,u=zo(c)+a):a>zo(e)?(c=e+1,u=a-zo(e)):(c=e,u=a),{year:c,dayOfYear:u}}function Uo(e,t,n){var r=js(e.year(),t,n),o=Math.floor((e.dayOfYear()-r-1)/7)+1,s,i;return o<1?(i=e.year()-1,s=o+Vn(i,t,n)):o>Vn(e.year(),t,n)?(s=o-Vn(e.year(),t,n),i=e.year()+1):(i=e.year(),s=o),{week:s,year:i}}function Vn(e,t,n){var r=js(e,t,n),o=js(e+1,t,n);return(zo(e)-r+o)/7}ge("w",["ww",2],"wo","week"),ge("W",["WW",2],"Wo","isoWeek"),fe("w",et,eo),fe("ww",et,Zt),fe("W",et,eo),fe("WW",et,Zt),Wo(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=Fe(e)});function US(e){return Uo(e,this._week.dow,this._week.doy).week}var YS={dow:0,doy:6};function jS(){return this._week.dow}function VS(){return this._week.doy}function BS(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function HS(e){var t=Uo(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}ge("d",0,"do","day"),ge("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),ge("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),ge("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),ge("e",0,0,"weekday"),ge("E",0,0,"isoWeekday"),fe("d",et),fe("e",et),fe("E",et),fe("dd",function(e,t){return t.weekdaysMinRegex(e)}),fe("ddd",function(e,t){return t.weekdaysShortRegex(e)}),fe("dddd",function(e,t){return t.weekdaysRegex(e)}),Wo(["dd","ddd","dddd"],function(e,t,n,r){var o=n._locale.weekdaysParse(e,r,n._strict);o!=null?t.d=o:Ce(n).invalidWeekday=e}),Wo(["d","e","E"],function(e,t,n,r){t[r]=Fe(e)});function ZS(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function GS(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Ha(e,t){return e.slice(t,7).concat(e.slice(0,t))}var qS="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),md="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),KS="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),XS=Ro,JS=Ro,QS=Ro;function ek(e,t){var n=un(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?Ha(n,this._week.dow):e?n[e.day()]:n}function tk(e){return e===!0?Ha(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function nk(e){return e===!0?Ha(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function rk(e,t,n){var r,o,s,i=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)s=xn([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(s,"").toLocaleLowerCase();return n?t==="dddd"?(o=mt.call(this._weekdaysParse,i),o!==-1?o:null):t==="ddd"?(o=mt.call(this._shortWeekdaysParse,i),o!==-1?o:null):(o=mt.call(this._minWeekdaysParse,i),o!==-1?o:null):t==="dddd"?(o=mt.call(this._weekdaysParse,i),o!==-1||(o=mt.call(this._shortWeekdaysParse,i),o!==-1)?o:(o=mt.call(this._minWeekdaysParse,i),o!==-1?o:null)):t==="ddd"?(o=mt.call(this._shortWeekdaysParse,i),o!==-1||(o=mt.call(this._weekdaysParse,i),o!==-1)?o:(o=mt.call(this._minWeekdaysParse,i),o!==-1?o:null)):(o=mt.call(this._minWeekdaysParse,i),o!==-1||(o=mt.call(this._weekdaysParse,i),o!==-1)?o:(o=mt.call(this._shortWeekdaysParse,i),o!==-1?o:null))}function ok(e,t,n){var r,o,s;if(this._weekdaysParseExact)return rk.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(o=xn([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(s="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[r]=new RegExp(s.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function sk(e){if(!this.isValid())return e!=null?this:NaN;var t=Lo(this,"Day");return e!=null?(e=ZS(e,this.localeData()),this.add(e-t,"d")):t}function ik(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function ak(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=GS(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function ck(e){return this._weekdaysParseExact?($e(this,"_weekdaysRegex")||Za.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):($e(this,"_weekdaysRegex")||(this._weekdaysRegex=XS),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function lk(e){return this._weekdaysParseExact?($e(this,"_weekdaysRegex")||Za.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):($e(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=JS),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function uk(e){return this._weekdaysParseExact?($e(this,"_weekdaysRegex")||Za.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):($e(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=QS),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Za(){function e(l,f){return f.length-l.length}var t=[],n=[],r=[],o=[],s,i,a,c,u;for(s=0;s<7;s++)i=xn([2e3,1]).day(s),a=Un(this.weekdaysMin(i,"")),c=Un(this.weekdaysShort(i,"")),u=Un(this.weekdays(i,"")),t.push(a),n.push(c),r.push(u),o.push(a),o.push(c),o.push(u);t.sort(e),n.sort(e),r.sort(e),o.sort(e),this._weekdaysRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Ga(){return this.hours()%12||12}function fk(){return this.hours()||24}ge("H",["HH",2],0,"hour"),ge("h",["hh",2],0,Ga),ge("k",["kk",2],0,fk),ge("hmm",0,0,function(){return""+Ga.apply(this)+En(this.minutes(),2)}),ge("hmmss",0,0,function(){return""+Ga.apply(this)+En(this.minutes(),2)+En(this.seconds(),2)}),ge("Hmm",0,0,function(){return""+this.hours()+En(this.minutes(),2)}),ge("Hmmss",0,0,function(){return""+this.hours()+En(this.minutes(),2)+En(this.seconds(),2)});function gd(e,t){ge(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}gd("a",!0),gd("A",!1);function yd(e,t){return t._meridiemParse}fe("a",yd),fe("A",yd),fe("H",et,ja),fe("h",et,eo),fe("k",et,eo),fe("HH",et,Zt),fe("hh",et,Zt),fe("kk",et,Zt),fe("hmm",sd),fe("hmmss",id),fe("Hmm",sd),fe("Hmmss",id),qe(["H","HH"],St),qe(["k","kk"],function(e,t,n){var r=Fe(e);t[St]=r===24?0:r}),qe(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),qe(["h","hh"],function(e,t,n){t[St]=Fe(e),Ce(n).bigHour=!0}),qe("hmm",function(e,t,n){var r=e.length-2;t[St]=Fe(e.substr(0,r)),t[dn]=Fe(e.substr(r)),Ce(n).bigHour=!0}),qe("hmmss",function(e,t,n){var r=e.length-4,o=e.length-2;t[St]=Fe(e.substr(0,r)),t[dn]=Fe(e.substr(r,2)),t[jn]=Fe(e.substr(o)),Ce(n).bigHour=!0}),qe("Hmm",function(e,t,n){var r=e.length-2;t[St]=Fe(e.substr(0,r)),t[dn]=Fe(e.substr(r))}),qe("Hmmss",function(e,t,n){var r=e.length-4,o=e.length-2;t[St]=Fe(e.substr(0,r)),t[dn]=Fe(e.substr(r,2)),t[jn]=Fe(e.substr(o))});function dk(e){return(e+"").toLowerCase().charAt(0)==="p"}var hk=/[ap]\.?m?\.?/i,pk=to("Hours",!0);function mk(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var vd={calendar:rS,longDateFormat:aS,invalidDate:lS,ordinal:fS,dayOfMonthOrdinalParse:dS,relativeTime:pS,months:AS,monthsShort:ld,week:YS,weekdays:qS,weekdaysMin:KS,weekdaysShort:md,meridiemParse:hk},at={},Yo={},jo;function gk(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function bd(e){return e&&e.toLowerCase().replace("_","-")}function yk(e){for(var t=0,n,r,o,s;t<e.length;){for(s=bd(e[t]).split("-"),n=s.length,r=bd(e[t+1]),r=r?r.split("-"):null;n>0;){if(o=Vs(s.slice(0,n).join("-")),o)return o;if(r&&r.length>=n&&gk(s,r)>=n-1)break;n--}t++}return jo}function vk(e){return!!(e&&e.match("^[^/\\\\]*$"))}function Vs(e){var t=null,n;if(at[e]===void 0&&typeof module<"u"&&module&&module.exports&&vk(e))try{t=jo._abbr,n=require,n("./locale/"+e),ar(t)}catch{at[e]=null}return at[e]}function ar(e,t){var n;return e&&(Ut(t)?n=Bn(e):n=qa(e,t),n?jo=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),jo._abbr}function qa(e,t){if(t!==null){var n,r=vd;if(t.abbr=e,at[e]!=null)ed("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=at[e]._config;else if(t.parentLocale!=null)if(at[t.parentLocale]!=null)r=at[t.parentLocale]._config;else if(n=Vs(t.parentLocale),n!=null)r=n._config;else return Yo[t.parentLocale]||(Yo[t.parentLocale]=[]),Yo[t.parentLocale].push({name:e,config:t}),null;return at[e]=new Ra(Fa(r,t)),Yo[e]&&Yo[e].forEach(function(o){qa(o.name,o.config)}),ar(e),at[e]}else return delete at[e],null}function bk(e,t){if(t!=null){var n,r,o=vd;at[e]!=null&&at[e].parentLocale!=null?at[e].set(Fa(at[e]._config,t)):(r=Vs(e),r!=null&&(o=r._config),t=Fa(o,t),r==null&&(t.abbr=e),n=new Ra(t),n.parentLocale=at[e],at[e]=n),ar(e)}else at[e]!=null&&(at[e].parentLocale!=null?(at[e]=at[e].parentLocale,e===ar()&&ar(e)):at[e]!=null&&delete at[e]);return at[e]}function Bn(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return jo;if(!un(e)){if(t=Vs(e),t)return t;e=[e]}return yk(e)}function wk(){return Wa(at)}function Ka(e){var t,n=e._a;return n&&Ce(e).overflow===-2&&(t=n[Yn]<0||n[Yn]>11?Yn:n[Cn]<1||n[Cn]>Ba(n[Tt],n[Yn])?Cn:n[St]<0||n[St]>24||n[St]===24&&(n[dn]!==0||n[jn]!==0||n[Ar]!==0)?St:n[dn]<0||n[dn]>59?dn:n[jn]<0||n[jn]>59?jn:n[Ar]<0||n[Ar]>999?Ar:-1,Ce(e)._overflowDayOfYear&&(t<Tt||t>Cn)&&(t=Cn),Ce(e)._overflowWeeks&&t===-1&&(t=xS),Ce(e)._overflowWeekday&&t===-1&&(t=OS),Ce(e).overflow=t),e}var _k=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Sk=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,kk=/Z|[+-]\d\d(?::?\d\d)?/,Bs=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Xa=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],xk=/^\/?Date\((-?\d+)/i,Ok=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Ek={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function wd(e){var t,n,r=e._i,o=_k.exec(r)||Sk.exec(r),s,i,a,c,u=Bs.length,l=Xa.length;if(o){for(Ce(e).iso=!0,t=0,n=u;t<n;t++)if(Bs[t][1].exec(o[1])){i=Bs[t][0],s=Bs[t][2]!==!1;break}if(i==null){e._isValid=!1;return}if(o[3]){for(t=0,n=l;t<n;t++)if(Xa[t][1].exec(o[3])){a=(o[2]||" ")+Xa[t][0];break}if(a==null){e._isValid=!1;return}}if(!s&&a!=null){e._isValid=!1;return}if(o[4])if(kk.exec(o[4]))c="Z";else{e._isValid=!1;return}e._f=i+(a||"")+(c||""),Qa(e)}else e._isValid=!1}function Ck(e,t,n,r,o,s){var i=[Tk(e),ld.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(o,10)];return s&&i.push(parseInt(s,10)),i}function Tk(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Dk(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Ak(e,t,n){if(e){var r=md.indexOf(e),o=new Date(t[0],t[1],t[2]).getDay();if(r!==o)return Ce(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}function Mk(e,t,n){if(e)return Ek[e];if(t)return 0;var r=parseInt(n,10),o=r%100,s=(r-o)/100;return s*60+o}function _d(e){var t=Ok.exec(Dk(e._i)),n;if(t){if(n=Ck(t[4],t[3],t[2],t[5],t[6],t[7]),!Ak(t[1],n,e))return;e._a=n,e._tzm=Mk(t[8],t[9],t[10]),e._d=$o.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),Ce(e).rfc2822=!0}else e._isValid=!1}function Pk(e){var t=xk.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(wd(e),e._isValid===!1)delete e._isValid;else return;if(_d(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:ce.createFromInputFallback(e)}ce.createFromInputFallback=nn("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function no(e,t,n){return e??t??n}function Nk(e){var t=new Date(ce.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Ja(e){var t,n,r=[],o,s,i;if(!e._d){for(o=Nk(e),e._w&&e._a[Cn]==null&&e._a[Yn]==null&&Ik(e),e._dayOfYear!=null&&(i=no(e._a[Tt],o[Tt]),(e._dayOfYear>zo(i)||e._dayOfYear===0)&&(Ce(e)._overflowDayOfYear=!0),n=$o(i,0,e._dayOfYear),e._a[Yn]=n.getUTCMonth(),e._a[Cn]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=o[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[St]===24&&e._a[dn]===0&&e._a[jn]===0&&e._a[Ar]===0&&(e._nextDay=!0,e._a[St]=0),e._d=(e._useUTC?$o:$S).apply(null,r),s=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[St]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==s&&(Ce(e).weekdayMismatch=!0)}}function Ik(e){var t,n,r,o,s,i,a,c,u;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(s=1,i=4,n=no(t.GG,e._a[Tt],Uo(tt(),1,4).year),r=no(t.W,1),o=no(t.E,1),(o<1||o>7)&&(c=!0)):(s=e._locale._week.dow,i=e._locale._week.doy,u=Uo(tt(),s,i),n=no(t.gg,e._a[Tt],u.year),r=no(t.w,u.week),t.d!=null?(o=t.d,(o<0||o>6)&&(c=!0)):t.e!=null?(o=t.e+s,(t.e<0||t.e>6)&&(c=!0)):o=s),r<1||r>Vn(n,s,i)?Ce(e)._overflowWeeks=!0:c!=null?Ce(e)._overflowWeekday=!0:(a=pd(n,r,o,s,i),e._a[Tt]=a.year,e._dayOfYear=a.dayOfYear)}ce.ISO_8601=function(){},ce.RFC_2822=function(){};function Qa(e){if(e._f===ce.ISO_8601){wd(e);return}if(e._f===ce.RFC_2822){_d(e);return}e._a=[],Ce(e).empty=!0;var t=""+e._i,n,r,o,s,i,a=t.length,c=0,u,l;for(o=td(e._f,e._locale).match(za)||[],l=o.length,n=0;n<l;n++)s=o[n],r=(t.match(_S(s,e))||[])[0],r&&(i=t.substr(0,t.indexOf(r)),i.length>0&&Ce(e).unusedInput.push(i),t=t.slice(t.indexOf(r)+r.length),c+=r.length),Jr[s]?(r?Ce(e).empty=!1:Ce(e).unusedTokens.push(s),kS(s,r,e)):e._strict&&!r&&Ce(e).unusedTokens.push(s);Ce(e).charsLeftOver=a-c,t.length>0&&Ce(e).unusedInput.push(t),e._a[St]<=12&&Ce(e).bigHour===!0&&e._a[St]>0&&(Ce(e).bigHour=void 0),Ce(e).parsedDateParts=e._a.slice(0),Ce(e).meridiem=e._meridiem,e._a[St]=Fk(e._locale,e._a[St],e._meridiem),u=Ce(e).era,u!==null&&(e._a[Tt]=e._locale.erasConvertYear(u,e._a[Tt])),Ja(e),Ka(e)}function Fk(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function Rk(e){var t,n,r,o,s,i,a=!1,c=e._f.length;if(c===0){Ce(e).invalidFormat=!0,e._d=new Date(NaN);return}for(o=0;o<c;o++)s=0,i=!1,t=Ia({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[o],Qa(t),Pa(t)&&(i=!0),s+=Ce(t).charsLeftOver,s+=Ce(t).unusedTokens.length*10,Ce(t).score=s,a?s<r&&(r=s,n=t):(r==null||s<r||i)&&(r=s,n=t,i&&(a=!0));ir(e,n||t)}function Wk(e){if(!e._d){var t=$a(e._i),n=t.day===void 0?t.date:t.day;e._a=Kf([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],function(r){return r&&parseInt(r,10)}),Ja(e)}}function zk(e){var t=new Fo(Ka(Sd(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Sd(e){var t=e._i,n=e._f;return e._locale=e._locale||Bn(e._l),t===null||n===void 0&&t===""?Ns({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),fn(t)?new Fo(Ka(t)):(Io(t)?e._d=t:un(n)?Rk(e):n?Qa(e):Lk(e),Pa(e)||(e._d=null),e))}function Lk(e){var t=e._i;Ut(t)?e._d=new Date(ce.now()):Io(t)?e._d=new Date(t.valueOf()):typeof t=="string"?Pk(e):un(t)?(e._a=Kf(t.slice(0),function(n){return parseInt(n,10)}),Ja(e)):Dr(t)?Wk(e):$n(t)?e._d=new Date(t):ce.createFromInputFallback(e)}function kd(e,t,n,r,o){var s={};return(t===!0||t===!1)&&(r=t,t=void 0),(n===!0||n===!1)&&(r=n,n=void 0),(Dr(e)&&Aa(e)||un(e)&&e.length===0)&&(e=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=o,s._l=n,s._i=e,s._f=t,s._strict=r,zk(s)}function tt(e,t,n,r){return kd(e,t,n,r,!1)}var $k=nn("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=tt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:Ns()}),Uk=nn("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=tt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:Ns()});function xd(e,t){var n,r;if(t.length===1&&un(t[0])&&(t=t[0]),!t.length)return tt();for(n=t[0],r=1;r<t.length;++r)(!t[r].isValid()||t[r][e](n))&&(n=t[r]);return n}function Yk(){var e=[].slice.call(arguments,0);return xd("isBefore",e)}function jk(){var e=[].slice.call(arguments,0);return xd("isAfter",e)}var Vk=function(){return Date.now?Date.now():+new Date},Vo=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Bk(e){var t,n=!1,r,o=Vo.length;for(t in e)if($e(e,t)&&!(mt.call(Vo,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(r=0;r<o;++r)if(e[Vo[r]]){if(n)return!1;parseFloat(e[Vo[r]])!==Fe(e[Vo[r]])&&(n=!0)}return!0}function Hk(){return this._isValid}function Zk(){return hn(NaN)}function Hs(e){var t=$a(e),n=t.year||0,r=t.quarter||0,o=t.month||0,s=t.week||t.isoWeek||0,i=t.day||0,a=t.hour||0,c=t.minute||0,u=t.second||0,l=t.millisecond||0;this._isValid=Bk(t),this._milliseconds=+l+u*1e3+c*6e4+a*1e3*60*60,this._days=+i+s*7,this._months=+o+r*3+n*12,this._data={},this._locale=Bn(),this._bubble()}function Zs(e){return e instanceof Hs}function ec(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function Gk(e,t,n){var r=Math.min(e.length,t.length),o=Math.abs(e.length-t.length),s=0,i;for(i=0;i<r;i++)Fe(e[i])!==Fe(t[i])&&s++;return s+o}function Od(e,t){ge(e,0,0,function(){var n=this.utcOffset(),r="+";return n<0&&(n=-n,r="-"),r+En(~~(n/60),2)+t+En(~~n%60,2)})}Od("Z",":"),Od("ZZ",""),fe("Z",$s),fe("ZZ",$s),qe(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=tc($s,e)});var qk=/([\+\-]|\d\d)/gi;function tc(e,t){var n=(t||"").match(e),r,o,s;return n===null?null:(r=n[n.length-1]||[],o=(r+"").match(qk)||["-",0,0],s=+(o[1]*60)+Fe(o[2]),s===0?0:o[0]==="+"?s:-s)}function nc(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(fn(e)||Io(e)?e.valueOf():tt(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),ce.updateOffset(n,!1),n):tt(e).local()}function rc(e){return-Math.round(e._d.getTimezoneOffset())}ce.updateOffset=function(){};function Kk(e,t,n){var r=this._offset||0,o;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=tc($s,e),e===null)return this}else Math.abs(e)<16&&!n&&(e=e*60);return!this._isUTC&&t&&(o=rc(this)),this._offset=e,this._isUTC=!0,o!=null&&this.add(o,"m"),r!==e&&(!t||this._changeInProgress?Dd(this,hn(e-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,ce.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?r:rc(this)}function Xk(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function Jk(e){return this.utcOffset(0,e)}function Qk(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(rc(this),"m")),this}function ex(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=tc(bS,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function tx(e){return this.isValid()?(e=e?tt(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function nx(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function rx(){if(!Ut(this._isDSTShifted))return this._isDSTShifted;var e={},t;return Ia(e,this),e=Sd(e),e._a?(t=e._isUTC?xn(e._a):tt(e._a),this._isDSTShifted=this.isValid()&&Gk(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function ox(){return this.isValid()?!this._isUTC:!1}function sx(){return this.isValid()?this._isUTC:!1}function Ed(){return this.isValid()?this._isUTC&&this._offset===0:!1}var ix=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,ax=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function hn(e,t){var n=e,r=null,o,s,i;return Zs(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:$n(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=ix.exec(e))?(o=r[1]==="-"?-1:1,n={y:0,d:Fe(r[Cn])*o,h:Fe(r[St])*o,m:Fe(r[dn])*o,s:Fe(r[jn])*o,ms:Fe(ec(r[Ar]*1e3))*o}):(r=ax.exec(e))?(o=r[1]==="-"?-1:1,n={y:Mr(r[2],o),M:Mr(r[3],o),w:Mr(r[4],o),d:Mr(r[5],o),h:Mr(r[6],o),m:Mr(r[7],o),s:Mr(r[8],o)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(i=cx(tt(n.from),tt(n.to)),n={},n.ms=i.milliseconds,n.M=i.months),s=new Hs(n),Zs(e)&&$e(e,"_locale")&&(s._locale=e._locale),Zs(e)&&$e(e,"_isValid")&&(s._isValid=e._isValid),s}hn.fn=Hs.prototype,hn.invalid=Zk;function Mr(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Cd(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function cx(e,t){var n;return e.isValid()&&t.isValid()?(t=nc(t,e),e.isBefore(t)?n=Cd(e,t):(n=Cd(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Td(e,t){return function(n,r){var o,s;return r!==null&&!isNaN(+r)&&(ed(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=n,n=r,r=s),o=hn(n,r),Dd(this,o,e),this}}function Dd(e,t,n,r){var o=t._milliseconds,s=ec(t._days),i=ec(t._months);e.isValid()&&(r=r??!0,i&&fd(e,Lo(e,"Month")+i*n),s&&cd(e,"Date",Lo(e,"Date")+s*n),o&&e._d.setTime(e._d.valueOf()+o*n),r&&ce.updateOffset(e,s||i))}var lx=Td(1,"add"),ux=Td(-1,"subtract");function Ad(e){return typeof e=="string"||e instanceof String}function fx(e){return fn(e)||Io(e)||Ad(e)||$n(e)||hx(e)||dx(e)||e===null||e===void 0}function dx(e){var t=Dr(e)&&!Aa(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],o,s,i=r.length;for(o=0;o<i;o+=1)s=r[o],n=n||$e(e,s);return t&&n}function hx(e){var t=un(e),n=!1;return t&&(n=e.filter(function(r){return!$n(r)&&Ad(e)}).length===0),t&&n}function px(e){var t=Dr(e)&&!Aa(e),n=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],o,s;for(o=0;o<r.length;o+=1)s=r[o],n=n||$e(e,s);return t&&n}function mx(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function gx(e,t){arguments.length===1&&(arguments[0]?fx(arguments[0])?(e=arguments[0],t=void 0):px(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||tt(),r=nc(n,this).startOf("day"),o=ce.calendarFormat(this,r)||"sameElse",s=t&&(On(t[o])?t[o].call(this,n):t[o]);return this.format(s||this.localeData().calendar(o,this,tt(n)))}function yx(){return new Fo(this)}function vx(e,t){var n=fn(e)?e:tt(e);return this.isValid()&&n.isValid()?(t=rn(t)||"millisecond",t==="millisecond"?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf()):!1}function bx(e,t){var n=fn(e)?e:tt(e);return this.isValid()&&n.isValid()?(t=rn(t)||"millisecond",t==="millisecond"?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf()):!1}function wx(e,t,n,r){var o=fn(e)?e:tt(e),s=fn(t)?t:tt(t);return this.isValid()&&o.isValid()&&s.isValid()?(r=r||"()",(r[0]==="("?this.isAfter(o,n):!this.isBefore(o,n))&&(r[1]===")"?this.isBefore(s,n):!this.isAfter(s,n))):!1}function _x(e,t){var n=fn(e)?e:tt(e),r;return this.isValid()&&n.isValid()?(t=rn(t)||"millisecond",t==="millisecond"?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(t).valueOf()<=r&&r<=this.clone().endOf(t).valueOf())):!1}function Sx(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function kx(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function xx(e,t,n){var r,o,s;if(!this.isValid())return NaN;if(r=nc(e,this),!r.isValid())return NaN;switch(o=(r.utcOffset()-this.utcOffset())*6e4,t=rn(t),t){case"year":s=Gs(this,r)/12;break;case"month":s=Gs(this,r);break;case"quarter":s=Gs(this,r)/3;break;case"second":s=(this-r)/1e3;break;case"minute":s=(this-r)/6e4;break;case"hour":s=(this-r)/36e5;break;case"day":s=(this-r-o)/864e5;break;case"week":s=(this-r-o)/6048e5;break;default:s=this-r}return n?s:on(s)}function Gs(e,t){if(e.date()<t.date())return-Gs(t,e);var n=(t.year()-e.year())*12+(t.month()-e.month()),r=e.clone().add(n,"months"),o,s;return t-r<0?(o=e.clone().add(n-1,"months"),s=(t-r)/(r-o)):(o=e.clone().add(n+1,"months"),s=(t-r)/(o-r)),-(n+s)||0}ce.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",ce.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function Ox(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Ex(e){if(!this.isValid())return null;var t=e!==!0,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?Fs(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):On(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Fs(n,"Z")):Fs(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Cx(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,o,s;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",o="-MM-DD[T]HH:mm:ss.SSS",s=t+'[")]',this.format(n+r+o+s)}function Tx(e){e||(e=this.isUtc()?ce.defaultFormatUtc:ce.defaultFormat);var t=Fs(this,e);return this.localeData().postformat(t)}function Dx(e,t){return this.isValid()&&(fn(e)&&e.isValid()||tt(e).isValid())?hn({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Ax(e){return this.from(tt(),e)}function Mx(e,t){return this.isValid()&&(fn(e)&&e.isValid()||tt(e).isValid())?hn({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Px(e){return this.to(tt(),e)}function Md(e){var t;return e===void 0?this._locale._abbr:(t=Bn(e),t!=null&&(this._locale=t),this)}var Pd=nn("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function Nd(){return this._locale}var qs=1e3,ro=60*qs,Ks=60*ro,Id=(365*400+97)*24*Ks;function oo(e,t){return(e%t+t)%t}function Fd(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-Id:new Date(e,t,n).valueOf()}function Rd(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-Id:Date.UTC(e,t,n)}function Nx(e){var t,n;if(e=rn(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?Rd:Fd,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=oo(t+(this._isUTC?0:this.utcOffset()*ro),Ks);break;case"minute":t=this._d.valueOf(),t-=oo(t,ro);break;case"second":t=this._d.valueOf(),t-=oo(t,qs);break}return this._d.setTime(t),ce.updateOffset(this,!0),this}function Ix(e){var t,n;if(e=rn(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?Rd:Fd,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=Ks-oo(t+(this._isUTC?0:this.utcOffset()*ro),Ks)-1;break;case"minute":t=this._d.valueOf(),t+=ro-oo(t,ro)-1;break;case"second":t=this._d.valueOf(),t+=qs-oo(t,qs)-1;break}return this._d.setTime(t),ce.updateOffset(this,!0),this}function Fx(){return this._d.valueOf()-(this._offset||0)*6e4}function Rx(){return Math.floor(this.valueOf()/1e3)}function Wx(){return new Date(this.valueOf())}function zx(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Lx(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function $x(){return this.isValid()?this.toISOString():null}function Ux(){return Pa(this)}function Yx(){return ir({},Ce(this))}function jx(){return Ce(this).overflow}function Vx(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}ge("N",0,0,"eraAbbr"),ge("NN",0,0,"eraAbbr"),ge("NNN",0,0,"eraAbbr"),ge("NNNN",0,0,"eraName"),ge("NNNNN",0,0,"eraNarrow"),ge("y",["y",1],"yo","eraYear"),ge("y",["yy",2],0,"eraYear"),ge("y",["yyy",3],0,"eraYear"),ge("y",["yyyy",4],0,"eraYear"),fe("N",oc),fe("NN",oc),fe("NNN",oc),fe("NNNN",tO),fe("NNNNN",nO),qe(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var o=n._locale.erasParse(e,r,n._strict);o?Ce(n).era=o:Ce(n).invalidEra=e}),fe("y",Qr),fe("yy",Qr),fe("yyy",Qr),fe("yyyy",Qr),fe("yo",rO),qe(["y","yy","yyy","yyyy"],Tt),qe(["yo"],function(e,t,n,r){var o;n._locale._eraYearOrdinalRegex&&(o=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Tt]=n._locale.eraYearOrdinalParse(e,o):t[Tt]=parseInt(e,10)});function Bx(e,t){var n,r,o,s=this._eras||Bn("en")._eras;for(n=0,r=s.length;n<r;++n)switch(typeof s[n].since==="string"&&(o=ce(s[n].since).startOf("day"),s[n].since=o.valueOf()),typeof s[n].until){case"undefined":s[n].until=1/0;break;case"string":o=ce(s[n].until).startOf("day").valueOf(),s[n].until=o.valueOf();break}return s}function Hx(e,t,n){var r,o,s=this.eras(),i,a,c;for(e=e.toUpperCase(),r=0,o=s.length;r<o;++r)if(i=s[r].name.toUpperCase(),a=s[r].abbr.toUpperCase(),c=s[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(a===e)return s[r];break;case"NNNN":if(i===e)return s[r];break;case"NNNNN":if(c===e)return s[r];break}else if([i,a,c].indexOf(e)>=0)return s[r]}function Zx(e,t){var n=e.since<=e.until?1:-1;return t===void 0?ce(e.since).year():ce(e.since).year()+(t-e.offset)*n}function Gx(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].name;return""}function qx(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].narrow;return""}function Kx(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].abbr;return""}function Xx(){var e,t,n,r,o=this.localeData().eras();for(e=0,t=o.length;e<t;++e)if(n=o[e].since<=o[e].until?1:-1,r=this.clone().startOf("day").valueOf(),o[e].since<=r&&r<=o[e].until||o[e].until<=r&&r<=o[e].since)return(this.year()-ce(o[e].since).year())*n+o[e].offset;return this.year()}function Jx(e){return $e(this,"_erasNameRegex")||sc.call(this),e?this._erasNameRegex:this._erasRegex}function Qx(e){return $e(this,"_erasAbbrRegex")||sc.call(this),e?this._erasAbbrRegex:this._erasRegex}function eO(e){return $e(this,"_erasNarrowRegex")||sc.call(this),e?this._erasNarrowRegex:this._erasRegex}function oc(e,t){return t.erasAbbrRegex(e)}function tO(e,t){return t.erasNameRegex(e)}function nO(e,t){return t.erasNarrowRegex(e)}function rO(e,t){return t._eraYearOrdinalRegex||Qr}function sc(){var e=[],t=[],n=[],r=[],o,s,i,a,c,u=this.eras();for(o=0,s=u.length;o<s;++o)i=Un(u[o].name),a=Un(u[o].abbr),c=Un(u[o].narrow),t.push(i),e.push(a),n.push(c),r.push(i),r.push(a),r.push(c);this._erasRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}ge(0,["gg",2],0,function(){return this.weekYear()%100}),ge(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Xs(e,t){ge(0,[e,e.length],0,t)}Xs("gggg","weekYear"),Xs("ggggg","weekYear"),Xs("GGGG","isoWeekYear"),Xs("GGGGG","isoWeekYear"),fe("G",Ls),fe("g",Ls),fe("GG",et,Zt),fe("gg",et,Zt),fe("GGGG",Ya,Ua),fe("gggg",Ya,Ua),fe("GGGGG",zs,Rs),fe("ggggg",zs,Rs),Wo(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=Fe(e)}),Wo(["gg","GG"],function(e,t,n,r){t[r]=ce.parseTwoDigitYear(e)});function oO(e){return Wd.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function sO(e){return Wd.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function iO(){return Vn(this.year(),1,4)}function aO(){return Vn(this.isoWeekYear(),1,4)}function cO(){var e=this.localeData()._week;return Vn(this.year(),e.dow,e.doy)}function lO(){var e=this.localeData()._week;return Vn(this.weekYear(),e.dow,e.doy)}function Wd(e,t,n,r,o){var s;return e==null?Uo(this,r,o).year:(s=Vn(e,r,o),t>s&&(t=s),uO.call(this,e,t,n,r,o))}function uO(e,t,n,r,o){var s=pd(e,t,n,r,o),i=$o(s.year,0,s.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}ge("Q",0,"Qo","quarter"),fe("Q",rd),qe("Q",function(e,t){t[Yn]=(Fe(e)-1)*3});function fO(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}ge("D",["DD",2],"Do","date"),fe("D",et,eo),fe("DD",et,Zt),fe("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),qe(["D","DD"],Cn),qe("Do",function(e,t){t[Cn]=Fe(e.match(et)[0])});var zd=to("Date",!0);ge("DDD",["DDDD",3],"DDDo","dayOfYear"),fe("DDD",Ws),fe("DDDD",od),qe(["DDD","DDDD"],function(e,t,n){n._dayOfYear=Fe(e)});function dO(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}ge("m",["mm",2],0,"minute"),fe("m",et,ja),fe("mm",et,Zt),qe(["m","mm"],dn);var hO=to("Minutes",!1);ge("s",["ss",2],0,"second"),fe("s",et,ja),fe("ss",et,Zt),qe(["s","ss"],jn);var pO=to("Seconds",!1);ge("S",0,0,function(){return~~(this.millisecond()/100)}),ge(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),ge(0,["SSS",3],0,"millisecond"),ge(0,["SSSS",4],0,function(){return this.millisecond()*10}),ge(0,["SSSSS",5],0,function(){return this.millisecond()*100}),ge(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),ge(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),ge(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),ge(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),fe("S",Ws,rd),fe("SS",Ws,Zt),fe("SSS",Ws,od);var cr,Ld;for(cr="SSSS";cr.length<=9;cr+="S")fe(cr,Qr);function mO(e,t){t[Ar]=Fe(("0."+e)*1e3)}for(cr="S";cr.length<=9;cr+="S")qe(cr,mO);Ld=to("Milliseconds",!1),ge("z",0,0,"zoneAbbr"),ge("zz",0,0,"zoneName");function gO(){return this._isUTC?"UTC":""}function yO(){return this._isUTC?"Coordinated Universal Time":""}var se=Fo.prototype;se.add=lx,se.calendar=gx,se.clone=yx,se.diff=xx,se.endOf=Ix,se.format=Tx,se.from=Dx,se.fromNow=Ax,se.to=Mx,se.toNow=Px,se.get=CS,se.invalidAt=jx,se.isAfter=vx,se.isBefore=bx,se.isBetween=wx,se.isSame=_x,se.isSameOrAfter=Sx,se.isSameOrBefore=kx,se.isValid=Ux,se.lang=Pd,se.locale=Md,se.localeData=Nd,se.max=Uk,se.min=$k,se.parsingFlags=Yx,se.set=TS,se.startOf=Nx,se.subtract=ux,se.toArray=zx,se.toObject=Lx,se.toDate=Wx,se.toISOString=Ex,se.inspect=Cx,typeof Symbol<"u"&&Symbol.for!=null&&(se[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),se.toJSON=$x,se.toString=Ox,se.unix=Rx,se.valueOf=Fx,se.creationData=Vx,se.eraName=Gx,se.eraNarrow=qx,se.eraAbbr=Kx,se.eraYear=Xx,se.year=ad,se.isLeapYear=ES,se.weekYear=oO,se.isoWeekYear=sO,se.quarter=se.quarters=fO,se.month=dd,se.daysInMonth=WS,se.week=se.weeks=BS,se.isoWeek=se.isoWeeks=HS,se.weeksInYear=cO,se.weeksInWeekYear=lO,se.isoWeeksInYear=iO,se.isoWeeksInISOWeekYear=aO,se.date=zd,se.day=se.days=sk,se.weekday=ik,se.isoWeekday=ak,se.dayOfYear=dO,se.hour=se.hours=pk,se.minute=se.minutes=hO,se.second=se.seconds=pO,se.millisecond=se.milliseconds=Ld,se.utcOffset=Kk,se.utc=Jk,se.local=Qk,se.parseZone=ex,se.hasAlignedHourOffset=tx,se.isDST=nx,se.isLocal=ox,se.isUtcOffset=sx,se.isUtc=Ed,se.isUTC=Ed,se.zoneAbbr=gO,se.zoneName=yO,se.dates=nn("dates accessor is deprecated. Use date instead.",zd),se.months=nn("months accessor is deprecated. Use month instead",dd),se.years=nn("years accessor is deprecated. Use year instead",ad),se.zone=nn("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Xk),se.isDSTShifted=nn("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",rx);function vO(e){return tt(e*1e3)}function bO(){return tt.apply(null,arguments).parseZone()}function $d(e){return e}var Ue=Ra.prototype;Ue.calendar=oS,Ue.longDateFormat=cS,Ue.invalidDate=uS,Ue.ordinal=hS,Ue.preparse=$d,Ue.postformat=$d,Ue.relativeTime=mS,Ue.pastFuture=gS,Ue.set=nS,Ue.eras=Bx,Ue.erasParse=Hx,Ue.erasConvertYear=Zx,Ue.erasAbbrRegex=Qx,Ue.erasNameRegex=Jx,Ue.erasNarrowRegex=eO,Ue.months=NS,Ue.monthsShort=IS,Ue.monthsParse=RS,Ue.monthsRegex=LS,Ue.monthsShortRegex=zS,Ue.week=US,Ue.firstDayOfYear=VS,Ue.firstDayOfWeek=jS,Ue.weekdays=ek,Ue.weekdaysMin=nk,Ue.weekdaysShort=tk,Ue.weekdaysParse=ok,Ue.weekdaysRegex=ck,Ue.weekdaysShortRegex=lk,Ue.weekdaysMinRegex=uk,Ue.isPM=dk,Ue.meridiem=mk;function Js(e,t,n,r){var o=Bn(),s=xn().set(r,t);return o[n](s,e)}function Ud(e,t,n){if($n(e)&&(t=e,e=void 0),e=e||"",t!=null)return Js(e,t,n,"month");var r,o=[];for(r=0;r<12;r++)o[r]=Js(e,r,n,"month");return o}function ic(e,t,n,r){typeof e=="boolean"?($n(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,$n(t)&&(n=t,t=void 0),t=t||"");var o=Bn(),s=e?o._week.dow:0,i,a=[];if(n!=null)return Js(t,(n+s)%7,r,"day");for(i=0;i<7;i++)a[i]=Js(t,(i+s)%7,r,"day");return a}function wO(e,t){return Ud(e,t,"months")}function _O(e,t){return Ud(e,t,"monthsShort")}function SO(e,t,n){return ic(e,t,n,"weekdays")}function kO(e,t,n){return ic(e,t,n,"weekdaysShort")}function xO(e,t,n){return ic(e,t,n,"weekdaysMin")}ar("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=Fe(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}}),ce.lang=nn("moment.lang is deprecated. Use moment.locale instead.",ar),ce.langData=nn("moment.langData is deprecated. Use moment.localeData instead.",Bn);var Hn=Math.abs;function OO(){var e=this._data;return this._milliseconds=Hn(this._milliseconds),this._days=Hn(this._days),this._months=Hn(this._months),e.milliseconds=Hn(e.milliseconds),e.seconds=Hn(e.seconds),e.minutes=Hn(e.minutes),e.hours=Hn(e.hours),e.months=Hn(e.months),e.years=Hn(e.years),this}function Yd(e,t,n,r){var o=hn(t,n);return e._milliseconds+=r*o._milliseconds,e._days+=r*o._days,e._months+=r*o._months,e._bubble()}function EO(e,t){return Yd(this,e,t,1)}function CO(e,t){return Yd(this,e,t,-1)}function jd(e){return e<0?Math.floor(e):Math.ceil(e)}function TO(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,o,s,i,a,c;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=jd(ac(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,o=on(e/1e3),r.seconds=o%60,s=on(o/60),r.minutes=s%60,i=on(s/60),r.hours=i%24,t+=on(i/24),c=on(Vd(t)),n+=c,t-=jd(ac(c)),a=on(n/12),n%=12,r.days=t,r.months=n,r.years=a,this}function Vd(e){return e*4800/146097}function ac(e){return e*146097/4800}function DO(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=rn(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+Vd(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(ac(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function Zn(e){return function(){return this.as(e)}}var Bd=Zn("ms"),AO=Zn("s"),MO=Zn("m"),PO=Zn("h"),NO=Zn("d"),IO=Zn("w"),FO=Zn("M"),RO=Zn("Q"),WO=Zn("y"),zO=Bd;function LO(){return hn(this)}function $O(e){return e=rn(e),this.isValid()?this[e+"s"]():NaN}function Pr(e){return function(){return this.isValid()?this._data[e]:NaN}}var UO=Pr("milliseconds"),YO=Pr("seconds"),jO=Pr("minutes"),VO=Pr("hours"),BO=Pr("days"),HO=Pr("months"),ZO=Pr("years");function GO(){return on(this.days()/7)}var Gn=Math.round,so={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function qO(e,t,n,r,o){return o.relativeTime(t||1,!!n,e,r)}function KO(e,t,n,r){var o=hn(e).abs(),s=Gn(o.as("s")),i=Gn(o.as("m")),a=Gn(o.as("h")),c=Gn(o.as("d")),u=Gn(o.as("M")),l=Gn(o.as("w")),f=Gn(o.as("y")),d=s<=n.ss&&["s",s]||s<n.s&&["ss",s]||i<=1&&["m"]||i<n.m&&["mm",i]||a<=1&&["h"]||a<n.h&&["hh",a]||c<=1&&["d"]||c<n.d&&["dd",c];return n.w!=null&&(d=d||l<=1&&["w"]||l<n.w&&["ww",l]),d=d||u<=1&&["M"]||u<n.M&&["MM",u]||f<=1&&["y"]||["yy",f],d[2]=t,d[3]=+e>0,d[4]=r,qO.apply(null,d)}function XO(e){return e===void 0?Gn:typeof e=="function"?(Gn=e,!0):!1}function JO(e,t){return so[e]===void 0?!1:t===void 0?so[e]:(so[e]=t,e==="s"&&(so.ss=t-1),!0)}function QO(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=so,o,s;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},so,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),o=this.localeData(),s=KO(this,!n,r,o),n&&(s=o.pastFuture(+this,s)),o.postformat(s)}var cc=Math.abs;function io(e){return(e>0)-(e<0)||+e}function Qs(){if(!this.isValid())return this.localeData().invalidDate();var e=cc(this._milliseconds)/1e3,t=cc(this._days),n=cc(this._months),r,o,s,i,a=this.asSeconds(),c,u,l,f;return a?(r=on(e/60),o=on(r/60),e%=60,r%=60,s=on(n/12),n%=12,i=e?e.toFixed(3).replace(/\.?0+$/,""):"",c=a<0?"-":"",u=io(this._months)!==io(a)?"-":"",l=io(this._days)!==io(a)?"-":"",f=io(this._milliseconds)!==io(a)?"-":"",c+"P"+(s?u+s+"Y":"")+(n?u+n+"M":"")+(t?l+t+"D":"")+(o||r||e?"T":"")+(o?f+o+"H":"")+(r?f+r+"M":"")+(e?f+i+"S":"")):"P0D"}var Le=Hs.prototype;Le.isValid=Hk,Le.abs=OO,Le.add=EO,Le.subtract=CO,Le.as=DO,Le.asMilliseconds=Bd,Le.asSeconds=AO,Le.asMinutes=MO,Le.asHours=PO,Le.asDays=NO,Le.asWeeks=IO,Le.asMonths=FO,Le.asQuarters=RO,Le.asYears=WO,Le.valueOf=zO,Le._bubble=TO,Le.clone=LO,Le.get=$O,Le.milliseconds=UO,Le.seconds=YO,Le.minutes=jO,Le.hours=VO,Le.days=BO,Le.weeks=GO,Le.months=HO,Le.years=ZO,Le.humanize=QO,Le.toISOString=Qs,Le.toString=Qs,Le.toJSON=Qs,Le.locale=Md,Le.localeData=Nd,Le.toIsoString=nn("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Qs),Le.lang=Pd,ge("X",0,0,"unix"),ge("x",0,0,"valueOf"),fe("x",Ls),fe("X",wS),qe("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)}),qe("x",function(e,t,n){n._d=new Date(Fe(e))});ce.version="2.30.1",eS(tt),ce.fn=se,ce.min=Yk,ce.max=jk,ce.now=Vk,ce.utc=xn,ce.unix=vO,ce.months=wO,ce.isDate=Io,ce.locale=ar,ce.invalid=Ns,ce.duration=hn,ce.isMoment=fn,ce.weekdays=SO,ce.parseZone=bO,ce.localeData=Bn,ce.isDuration=Zs,ce.monthsShort=_O,ce.weekdaysMin=xO,ce.defineLocale=qa,ce.updateLocale=bk,ce.locales=wk,ce.weekdaysShort=kO,ce.normalizeUnits=rn,ce.relativeTimeRounding=XO,ce.relativeTimeThreshold=JO,ce.calendarFormat=mx,ce.prototype=se,ce.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const Hd=(e,t,n)=>{if(e&&"reportValidity"in e){const r=ae(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},lc=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?Hd(r.ref,n,e):r&&r.refs&&r.refs.forEach(o=>Hd(o,n,e))}},Zd=(e,t)=>{t.shouldUseNativeValidation&&lc(e,t);const n={};for(const r in e){const o=ae(t.fields,r),s=Object.assign(e[r]||{},{ref:o&&o.ref});if(eE(t.names||Object.keys(e),r)){const i=Object.assign({},ae(n,r));Ve(i,"root",s),Ve(n,r,i)}else Ve(n,r,s)}return n},eE=(e,t)=>{const n=Gd(t);return e.some(r=>Gd(r).match(`^${n}\\.\\d+`))};function Gd(e){return e.replace(/\]|\[/g,"")}function qd(e,t){try{var n=e()}catch(r){return t(r)}return n&&n.then?n.then(void 0,t):n}function tE(e,t){for(var n={};e.length;){var r=e[0],o=r.code,s=r.message,i=r.path.join(".");if(!n[i])if("unionErrors"in r){var a=r.unionErrors[0].errors[0];n[i]={message:a.message,type:a.code}}else n[i]={message:s,type:o};if("unionErrors"in r&&r.unionErrors.forEach(function(l){return l.errors.forEach(function(f){return e.push(f)})}),t){var c=n[i].types,u=c&&c[r.code];n[i]=ga(i,t,n,o,u?[].concat(u,r.message):r.message)}e.shift()}return n}function nE(e,t){for(var n={};e.length;){var r=e[0],o=r.code,s=r.message,i=r.path.join(".");if(!n[i])if(r.code==="invalid_union"&&r.errors.length>0){var a=r.errors[0][0];n[i]={message:a.message,type:a.code}}else n[i]={message:s,type:o};if(r.code==="invalid_union"&&r.errors.forEach(function(l){return l.forEach(function(f){return e.push(f)})}),t){var c=n[i].types,u=c&&c[r.code];n[i]=ga(i,t,n,o,u?[].concat(u,r.message):r.message)}e.shift()}return n}function rE(e,t,n){if(n===void 0&&(n={}),(function(r){return"_def"in r&&typeof r._def=="object"&&"typeName"in r._def})(e))return function(r,o,s){try{return Promise.resolve(qd(function(){return Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(i){return s.shouldUseNativeValidation&&lc({},s),{errors:{},values:n.raw?Object.assign({},r):i}})},function(i){if((function(a){return Array.isArray(a?.issues)})(i))return{values:{},errors:Zd(tE(i.errors,!s.shouldUseNativeValidation&&s.criteriaMode==="all"),s)};throw i}))}catch(i){return Promise.reject(i)}};if((function(r){return"_zod"in r&&typeof r._zod=="object"})(e))return function(r,o,s){try{return Promise.resolve(qd(function(){return Promise.resolve((n.mode==="sync"?Pb:Nb)(e,r,t)).then(function(i){return s.shouldUseNativeValidation&&lc({},s),{errors:{},values:n.raw?Object.assign({},r):i}})},function(i){if((function(a){return a instanceof Ea})(i))return{values:{},errors:Zd(nE(i.issues,!s.shouldUseNativeValidation&&s.criteriaMode==="all"),s)};throw i}))}catch(i){return Promise.reject(i)}};throw new Error("Invalid input: not a Zod schema")}const{entries:Kd,setPrototypeOf:Xd,isFrozen:oE,getPrototypeOf:sE,getOwnPropertyDescriptor:iE}=Object;let{freeze:Wt,seal:sn,create:uc}=Object,{apply:fc,construct:dc}=typeof Reflect<"u"&&Reflect;Wt||(Wt=function(t){return t}),sn||(sn=function(t){return t}),fc||(fc=function(t,n){for(var r=arguments.length,o=new Array(r>2?r-2:0),s=2;s<r;s++)o[s-2]=arguments[s];return t.apply(n,o)}),dc||(dc=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return new t(...r)});const ei=Lt(Array.prototype.forEach),aE=Lt(Array.prototype.lastIndexOf),Jd=Lt(Array.prototype.pop),Bo=Lt(Array.prototype.push),cE=Lt(Array.prototype.splice),ti=Lt(String.prototype.toLowerCase),hc=Lt(String.prototype.toString),pc=Lt(String.prototype.match),Ho=Lt(String.prototype.replace),lE=Lt(String.prototype.indexOf),uE=Lt(String.prototype.trim),pn=Lt(Object.prototype.hasOwnProperty),zt=Lt(RegExp.prototype.test),Zo=fE(TypeError);function Lt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return fc(e,t,r)}}function fE(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return dc(e,n)}}function Pe(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ti;Xd&&Xd(e,null);let r=t.length;for(;r--;){let o=t[r];if(typeof o=="string"){const s=n(o);s!==o&&(oE(t)||(t[r]=s),o=s)}e[o]=!0}return e}function dE(e){for(let t=0;t<e.length;t++)pn(e,t)||(e[t]=null);return e}function Tn(e){const t=uc(null);for(const[n,r]of Kd(e))pn(e,n)&&(Array.isArray(r)?t[n]=dE(r):r&&typeof r=="object"&&r.constructor===Object?t[n]=Tn(r):t[n]=r);return t}function Go(e,t){for(;e!==null;){const r=iE(e,t);if(r){if(r.get)return Lt(r.get);if(typeof r.value=="function")return Lt(r.value)}e=sE(e)}function n(){return null}return n}const Qd=Wt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),mc=Wt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),gc=Wt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),hE=Wt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),yc=Wt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),pE=Wt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),eh=Wt(["#text"]),th=Wt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),vc=Wt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),nh=Wt(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ni=Wt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),mE=sn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),gE=sn(/<%[\w\W]*|[\w\W]*%>/gm),yE=sn(/\$\{[\w\W]*/gm),vE=sn(/^data-[\-\w.\u00B7-\uFFFF]+$/),bE=sn(/^aria-[\-\w]+$/),rh=sn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),wE=sn(/^(?:\w+script|data):/i),_E=sn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),oh=sn(/^html$/i),SE=sn(/^[a-z][.\w]*(-[.\w]+)+$/i);var sh=Object.freeze({__proto__:null,ARIA_ATTR:bE,ATTR_WHITESPACE:_E,CUSTOM_ELEMENT:SE,DATA_ATTR:vE,DOCTYPE_NAME:oh,ERB_EXPR:gE,IS_ALLOWED_URI:rh,IS_SCRIPT_OR_DATA:wE,MUSTACHE_EXPR:mE,TMPLIT_EXPR:yE});const qo={element:1,text:3,progressingInstruction:7,comment:8,document:9},kE=function(){return typeof window>"u"?null:window},xE=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const o="data-tt-policy-suffix";n&&n.hasAttribute(o)&&(r=n.getAttribute(o));const s="dompurify"+(r?"#"+r:"");try{return t.createPolicy(s,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},ih=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function ah(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:kE();const t=ye=>ah(ye);if(t.version="3.3.1",t.removed=[],!e||!e.document||e.document.nodeType!==qo.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e;const r=n,o=r.currentScript,{DocumentFragment:s,HTMLTemplateElement:i,Node:a,Element:c,NodeFilter:u,NamedNodeMap:l=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:f,DOMParser:d,trustedTypes:h}=e,m=c.prototype,p=Go(m,"cloneNode"),y=Go(m,"remove"),g=Go(m,"nextSibling"),C=Go(m,"childNodes"),O=Go(m,"parentNode");if(typeof i=="function"){const ye=n.createElement("template");ye.content&&ye.content.ownerDocument&&(n=ye.content.ownerDocument)}let w,_="";const{implementation:S,createNodeIterator:I,createDocumentFragment:v,getElementsByTagName:x}=n,{importNode:P}=r;let A=ih();t.isSupported=typeof Kd=="function"&&typeof O=="function"&&S&&S.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:M,ERB_EXPR:F,TMPLIT_EXPR:N,DATA_ATTR:W,ARIA_ATTR:E,IS_SCRIPT_OR_DATA:k,ATTR_WHITESPACE:U,CUSTOM_ELEMENT:$}=sh;let{IS_ALLOWED_URI:D}=sh,V=null;const Z=Pe({},[...Qd,...mc,...gc,...yc,...eh]);let G=null;const B=Pe({},[...th,...vc,...nh,...ni]);let z=Object.seal(uc(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),X=null,q=null;const oe=Object.seal(uc(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Q=!0,re=!0,le=!1,K=!0,Se=!1,Ie=!0,ke=!1,Ge=!1,Re=!1,We=!1,nt=!1,rt=!1,R=!0,Y=!1;const H="user-content-";let ee=!0,te=!1,ne={},ue=null;const be=Pe({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Oe=null;const ze=Pe({},["audio","video","img","source","image","track"]);let ot=null;const Qe=Pe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),xt="http://www.w3.org/1998/Math/MathML",gt="http://www.w3.org/2000/svg",dt="http://www.w3.org/1999/xhtml";let jt=dt,Sn=!1,kn=null;const _e=Pe({},[xt,gt,dt],hc);let De=Pe({},["mi","mo","mn","ms","mtext"]),ve=Pe({},["annotation-xml"]);const Ee=Pe({},["title","style","font","a","script"]);let Xe=null;const xe=["application/xhtml+xml","text/html"],tr="text/html";let ct=null,Pt=null;const Qt=n.createElement("form"),Oo=function(L){return L instanceof RegExp||L instanceof Function},Du=function(){let L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Pt&&Pt===L)){if((!L||typeof L!="object")&&(L={}),L=Tn(L),Xe=xe.indexOf(L.PARSER_MEDIA_TYPE)===-1?tr:L.PARSER_MEDIA_TYPE,ct=Xe==="application/xhtml+xml"?hc:ti,V=pn(L,"ALLOWED_TAGS")?Pe({},L.ALLOWED_TAGS,ct):Z,G=pn(L,"ALLOWED_ATTR")?Pe({},L.ALLOWED_ATTR,ct):B,kn=pn(L,"ALLOWED_NAMESPACES")?Pe({},L.ALLOWED_NAMESPACES,hc):_e,ot=pn(L,"ADD_URI_SAFE_ATTR")?Pe(Tn(Qe),L.ADD_URI_SAFE_ATTR,ct):Qe,Oe=pn(L,"ADD_DATA_URI_TAGS")?Pe(Tn(ze),L.ADD_DATA_URI_TAGS,ct):ze,ue=pn(L,"FORBID_CONTENTS")?Pe({},L.FORBID_CONTENTS,ct):be,X=pn(L,"FORBID_TAGS")?Pe({},L.FORBID_TAGS,ct):Tn({}),q=pn(L,"FORBID_ATTR")?Pe({},L.FORBID_ATTR,ct):Tn({}),ne=pn(L,"USE_PROFILES")?L.USE_PROFILES:!1,Q=L.ALLOW_ARIA_ATTR!==!1,re=L.ALLOW_DATA_ATTR!==!1,le=L.ALLOW_UNKNOWN_PROTOCOLS||!1,K=L.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Se=L.SAFE_FOR_TEMPLATES||!1,Ie=L.SAFE_FOR_XML!==!1,ke=L.WHOLE_DOCUMENT||!1,We=L.RETURN_DOM||!1,nt=L.RETURN_DOM_FRAGMENT||!1,rt=L.RETURN_TRUSTED_TYPE||!1,Re=L.FORCE_BODY||!1,R=L.SANITIZE_DOM!==!1,Y=L.SANITIZE_NAMED_PROPS||!1,ee=L.KEEP_CONTENT!==!1,te=L.IN_PLACE||!1,D=L.ALLOWED_URI_REGEXP||rh,jt=L.NAMESPACE||dt,De=L.MATHML_TEXT_INTEGRATION_POINTS||De,ve=L.HTML_INTEGRATION_POINTS||ve,z=L.CUSTOM_ELEMENT_HANDLING||{},L.CUSTOM_ELEMENT_HANDLING&&Oo(L.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(z.tagNameCheck=L.CUSTOM_ELEMENT_HANDLING.tagNameCheck),L.CUSTOM_ELEMENT_HANDLING&&Oo(L.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(z.attributeNameCheck=L.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),L.CUSTOM_ELEMENT_HANDLING&&typeof L.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(z.allowCustomizedBuiltInElements=L.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Se&&(re=!1),nt&&(We=!0),ne&&(V=Pe({},eh),G=[],ne.html===!0&&(Pe(V,Qd),Pe(G,th)),ne.svg===!0&&(Pe(V,mc),Pe(G,vc),Pe(G,ni)),ne.svgFilters===!0&&(Pe(V,gc),Pe(G,vc),Pe(G,ni)),ne.mathMl===!0&&(Pe(V,yc),Pe(G,nh),Pe(G,ni))),L.ADD_TAGS&&(typeof L.ADD_TAGS=="function"?oe.tagCheck=L.ADD_TAGS:(V===Z&&(V=Tn(V)),Pe(V,L.ADD_TAGS,ct))),L.ADD_ATTR&&(typeof L.ADD_ATTR=="function"?oe.attributeCheck=L.ADD_ATTR:(G===B&&(G=Tn(G)),Pe(G,L.ADD_ATTR,ct))),L.ADD_URI_SAFE_ATTR&&Pe(ot,L.ADD_URI_SAFE_ATTR,ct),L.FORBID_CONTENTS&&(ue===be&&(ue=Tn(ue)),Pe(ue,L.FORBID_CONTENTS,ct)),L.ADD_FORBID_CONTENTS&&(ue===be&&(ue=Tn(ue)),Pe(ue,L.ADD_FORBID_CONTENTS,ct)),ee&&(V["#text"]=!0),ke&&Pe(V,["html","head","body"]),V.table&&(Pe(V,["tbody"]),delete X.tbody),L.TRUSTED_TYPES_POLICY){if(typeof L.TRUSTED_TYPES_POLICY.createHTML!="function")throw Zo('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof L.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Zo('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=L.TRUSTED_TYPES_POLICY,_=w.createHTML("")}else w===void 0&&(w=xE(h,o)),w!==null&&typeof _=="string"&&(_=w.createHTML(""));Wt&&Wt(L),Pt=L}},zv=Pe({},[...mc,...gc,...hE]),Lv=Pe({},[...yc,...pE]),aR=function(L){let ie=O(L);(!ie||!ie.tagName)&&(ie={namespaceURI:jt,tagName:"template"});const pe=ti(L.tagName),lt=ti(ie.tagName);return kn[L.namespaceURI]?L.namespaceURI===gt?ie.namespaceURI===dt?pe==="svg":ie.namespaceURI===xt?pe==="svg"&&(lt==="annotation-xml"||De[lt]):!!zv[pe]:L.namespaceURI===xt?ie.namespaceURI===dt?pe==="math":ie.namespaceURI===gt?pe==="math"&&ve[lt]:!!Lv[pe]:L.namespaceURI===dt?ie.namespaceURI===gt&&!ve[lt]||ie.namespaceURI===xt&&!De[lt]?!1:!Lv[pe]&&(Ee[pe]||!zv[pe]):!!(Xe==="application/xhtml+xml"&&kn[L.namespaceURI]):!1},zn=function(L){Bo(t.removed,{element:L});try{O(L).removeChild(L)}catch{y(L)}},Br=function(L,ie){try{Bo(t.removed,{attribute:ie.getAttributeNode(L),from:ie})}catch{Bo(t.removed,{attribute:null,from:ie})}if(ie.removeAttribute(L),L==="is")if(We||nt)try{zn(ie)}catch{}else try{ie.setAttribute(L,"")}catch{}},$v=function(L){let ie=null,pe=null;if(Re)L="<remove></remove>"+L;else{const _t=pc(L,/^[\r\n\t ]+/);pe=_t&&_t[0]}Xe==="application/xhtml+xml"&&jt===dt&&(L='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+L+"</body></html>");const lt=w?w.createHTML(L):L;if(jt===dt)try{ie=new d().parseFromString(lt,Xe)}catch{}if(!ie||!ie.documentElement){ie=S.createDocument(jt,"template",null);try{ie.documentElement.innerHTML=Sn?_:lt}catch{}}const Nt=ie.body||ie.documentElement;return L&&pe&&Nt.insertBefore(n.createTextNode(pe),Nt.childNodes[0]||null),jt===dt?x.call(ie,ke?"html":"body")[0]:ke?ie.documentElement:Nt},Uv=function(L){return I.call(L.ownerDocument||L,L,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Au=function(L){return L instanceof f&&(typeof L.nodeName!="string"||typeof L.textContent!="string"||typeof L.removeChild!="function"||!(L.attributes instanceof l)||typeof L.removeAttribute!="function"||typeof L.setAttribute!="function"||typeof L.namespaceURI!="string"||typeof L.insertBefore!="function"||typeof L.hasChildNodes!="function")},Yv=function(L){return typeof a=="function"&&L instanceof a};function nr(ye,L,ie){ei(ye,pe=>{pe.call(t,L,ie,Pt)})}const jv=function(L){let ie=null;if(nr(A.beforeSanitizeElements,L,null),Au(L))return zn(L),!0;const pe=ct(L.nodeName);if(nr(A.uponSanitizeElement,L,{tagName:pe,allowedTags:V}),Ie&&L.hasChildNodes()&&!Yv(L.firstElementChild)&&zt(/<[/\w!]/g,L.innerHTML)&&zt(/<[/\w!]/g,L.textContent)||L.nodeType===qo.progressingInstruction||Ie&&L.nodeType===qo.comment&&zt(/<[/\w]/g,L.data))return zn(L),!0;if(!(oe.tagCheck instanceof Function&&oe.tagCheck(pe))&&(!V[pe]||X[pe])){if(!X[pe]&&Bv(pe)&&(z.tagNameCheck instanceof RegExp&&zt(z.tagNameCheck,pe)||z.tagNameCheck instanceof Function&&z.tagNameCheck(pe)))return!1;if(ee&&!ue[pe]){const lt=O(L)||L.parentNode,Nt=C(L)||L.childNodes;if(Nt&&lt){const _t=Nt.length;for(let Vt=_t-1;Vt>=0;--Vt){const rr=p(Nt[Vt],!0);rr.__removalCount=(L.__removalCount||0)+1,lt.insertBefore(rr,g(L))}}}return zn(L),!0}return L instanceof c&&!aR(L)||(pe==="noscript"||pe==="noembed"||pe==="noframes")&&zt(/<\/no(script|embed|frames)/i,L.innerHTML)?(zn(L),!0):(Se&&L.nodeType===qo.text&&(ie=L.textContent,ei([M,F,N],lt=>{ie=Ho(ie,lt," ")}),L.textContent!==ie&&(Bo(t.removed,{element:L.cloneNode()}),L.textContent=ie)),nr(A.afterSanitizeElements,L,null),!1)},Vv=function(L,ie,pe){if(R&&(ie==="id"||ie==="name")&&(pe in n||pe in Qt))return!1;if(!(re&&!q[ie]&&zt(W,ie))){if(!(Q&&zt(E,ie))){if(!(oe.attributeCheck instanceof Function&&oe.attributeCheck(ie,L))){if(!G[ie]||q[ie]){if(!(Bv(L)&&(z.tagNameCheck instanceof RegExp&&zt(z.tagNameCheck,L)||z.tagNameCheck instanceof Function&&z.tagNameCheck(L))&&(z.attributeNameCheck instanceof RegExp&&zt(z.attributeNameCheck,ie)||z.attributeNameCheck instanceof Function&&z.attributeNameCheck(ie,L))||ie==="is"&&z.allowCustomizedBuiltInElements&&(z.tagNameCheck instanceof RegExp&&zt(z.tagNameCheck,pe)||z.tagNameCheck instanceof Function&&z.tagNameCheck(pe))))return!1}else if(!ot[ie]){if(!zt(D,Ho(pe,U,""))){if(!((ie==="src"||ie==="xlink:href"||ie==="href")&&L!=="script"&&lE(pe,"data:")===0&&Oe[L])){if(!(le&&!zt(k,Ho(pe,U,"")))){if(pe)return!1}}}}}}}return!0},Bv=function(L){return L!=="annotation-xml"&&pc(L,$)},Hv=function(L){nr(A.beforeSanitizeAttributes,L,null);const{attributes:ie}=L;if(!ie||Au(L))return;const pe={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:G,forceKeepAttr:void 0};let lt=ie.length;for(;lt--;){const Nt=ie[lt],{name:_t,namespaceURI:Vt,value:rr}=Nt,Eo=ct(_t),Mu=rr;let Ct=_t==="value"?Mu:uE(Mu);if(pe.attrName=Eo,pe.attrValue=Ct,pe.keepAttr=!0,pe.forceKeepAttr=void 0,nr(A.uponSanitizeAttribute,L,pe),Ct=pe.attrValue,Y&&(Eo==="id"||Eo==="name")&&(Br(_t,L),Ct=H+Ct),Ie&&zt(/((--!?|])>)|<\/(style|title|textarea)/i,Ct)){Br(_t,L);continue}if(Eo==="attributename"&&pc(Ct,"href")){Br(_t,L);continue}if(pe.forceKeepAttr)continue;if(!pe.keepAttr){Br(_t,L);continue}if(!K&&zt(/\/>/i,Ct)){Br(_t,L);continue}Se&&ei([M,F,N],Gv=>{Ct=Ho(Ct,Gv," ")});const Zv=ct(L.nodeName);if(!Vv(Zv,Eo,Ct)){Br(_t,L);continue}if(w&&typeof h=="object"&&typeof h.getAttributeType=="function"&&!Vt)switch(h.getAttributeType(Zv,Eo)){case"TrustedHTML":{Ct=w.createHTML(Ct);break}case"TrustedScriptURL":{Ct=w.createScriptURL(Ct);break}}if(Ct!==Mu)try{Vt?L.setAttributeNS(Vt,_t,Ct):L.setAttribute(_t,Ct),Au(L)?zn(L):Jd(t.removed)}catch{Br(_t,L)}}nr(A.afterSanitizeAttributes,L,null)},cR=function ye(L){let ie=null;const pe=Uv(L);for(nr(A.beforeSanitizeShadowDOM,L,null);ie=pe.nextNode();)nr(A.uponSanitizeShadowNode,ie,null),jv(ie),Hv(ie),ie.content instanceof s&&ye(ie.content);nr(A.afterSanitizeShadowDOM,L,null)};return t.sanitize=function(ye){let L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ie=null,pe=null,lt=null,Nt=null;if(Sn=!ye,Sn&&(ye="<!-->"),typeof ye!="string"&&!Yv(ye))if(typeof ye.toString=="function"){if(ye=ye.toString(),typeof ye!="string")throw Zo("dirty is not a string, aborting")}else throw Zo("toString is not a function");if(!t.isSupported)return ye;if(Ge||Du(L),t.removed=[],typeof ye=="string"&&(te=!1),te){if(ye.nodeName){const rr=ct(ye.nodeName);if(!V[rr]||X[rr])throw Zo("root node is forbidden and cannot be sanitized in-place")}}else if(ye instanceof a)ie=$v("<!---->"),pe=ie.ownerDocument.importNode(ye,!0),pe.nodeType===qo.element&&pe.nodeName==="BODY"||pe.nodeName==="HTML"?ie=pe:ie.appendChild(pe);else{if(!We&&!Se&&!ke&&ye.indexOf("<")===-1)return w&&rt?w.createHTML(ye):ye;if(ie=$v(ye),!ie)return We?null:rt?_:""}ie&&Re&&zn(ie.firstChild);const _t=Uv(te?ye:ie);for(;lt=_t.nextNode();)jv(lt),Hv(lt),lt.content instanceof s&&cR(lt.content);if(te)return ye;if(We){if(nt)for(Nt=v.call(ie.ownerDocument);ie.firstChild;)Nt.appendChild(ie.firstChild);else Nt=ie;return(G.shadowroot||G.shadowrootmode)&&(Nt=P.call(r,Nt,!0)),Nt}let Vt=ke?ie.outerHTML:ie.innerHTML;return ke&&V["!doctype"]&&ie.ownerDocument&&ie.ownerDocument.doctype&&ie.ownerDocument.doctype.name&&zt(oh,ie.ownerDocument.doctype.name)&&(Vt="<!DOCTYPE "+ie.ownerDocument.doctype.name+`>
43
- `+Vt),Se&&ei([M,F,N],rr=>{Vt=Ho(Vt,rr," ")}),w&&rt?w.createHTML(Vt):Vt},t.setConfig=function(){let ye=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Du(ye),Ge=!0},t.clearConfig=function(){Pt=null,Ge=!1},t.isValidAttribute=function(ye,L,ie){Pt||Du({});const pe=ct(ye),lt=ct(L);return Vv(pe,lt,ie)},t.addHook=function(ye,L){typeof L=="function"&&Bo(A[ye],L)},t.removeHook=function(ye,L){if(L!==void 0){const ie=aE(A[ye],L);return ie===-1?void 0:cE(A[ye],ie,1)[0]}return Jd(A[ye])},t.removeHooks=function(ye){A[ye]=[]},t.removeAllHooks=function(){A=ih()},t}var OE=ah();function ch(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Nr(...e){return t=>{let n=!1;const r=e.map(o=>{const s=ch(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():ch(e[o],null)}}}}function He(...e){return b.useCallback(Nr(...e),e)}var EE=Symbol.for("react.lazy"),ri=b[" use ".trim().toString()];function CE(e){return typeof e=="object"&&e!==null&&"then"in e}function lh(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===EE&&"_payload"in e&&CE(e._payload)}function uh(e){const t=TE(e),n=b.forwardRef((r,o)=>{let{children:s,...i}=r;lh(s)&&typeof ri=="function"&&(s=ri(s._payload));const a=b.Children.toArray(s),c=a.find(AE);if(c){const u=c.props.children,l=a.map(f=>f===c?b.Children.count(u)>1?b.Children.only(null):b.isValidElement(u)?u.props.children:null:f);return T.jsx(t,{...i,ref:o,children:b.isValidElement(u)?b.cloneElement(u,void 0,l):null})}return T.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var fh=uh("Slot");function TE(e){const t=b.forwardRef((n,r)=>{let{children:o,...s}=n;if(lh(o)&&typeof ri=="function"&&(o=ri(o._payload)),b.isValidElement(o)){const i=PE(o),a=ME(s,o.props);return o.type!==b.Fragment&&(a.ref=r?Nr(r,i):i),b.cloneElement(o,a)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var DE=Symbol("radix.slottable");function AE(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===DE}function ME(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const c=s(...a);return o(...a),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function PE(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function dh(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=dh(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function oi(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=dh(e))&&(r&&(r+=" "),r+=t);return r}const NE=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},IE=(e,t)=>({classGroupId:e,validator:t}),hh=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),si="-",ph=[],FE="arbitrary..",RE=e=>{const t=zE(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return WE(i);const a=i.split(si),c=a[0]===""&&a.length>1?1:0;return mh(a,c,t)},getConflictingClassGroupIds:(i,a)=>{if(a){const c=r[i],u=n[i];return c?u?NE(u,c):c:u||ph}return n[i]||ph}}},mh=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],s=n.nextPart.get(o);if(s){const u=mh(e,t+1,s);if(u)return u}const i=n.validators;if(i===null)return;const a=t===0?e.join(si):e.slice(t).join(si),c=i.length;for(let u=0;u<c;u++){const l=i[u];if(l.validator(a))return l.classGroupId}},WE=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?FE+r:void 0})(),zE=e=>{const{theme:t,classGroups:n}=e;return LE(n,t)},LE=(e,t)=>{const n=hh();for(const r in e){const o=e[r];bc(o,n,r,t)}return n},bc=(e,t,n,r)=>{const o=e.length;for(let s=0;s<o;s++){const i=e[s];$E(i,t,n,r)}},$E=(e,t,n,r)=>{if(typeof e=="string"){UE(e,t,n);return}if(typeof e=="function"){YE(e,t,n,r);return}jE(e,t,n,r)},UE=(e,t,n)=>{const r=e===""?t:gh(t,e);r.classGroupId=n},YE=(e,t,n,r)=>{if(VE(e)){bc(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(IE(n,e))},jE=(e,t,n,r)=>{const o=Object.entries(e),s=o.length;for(let i=0;i<s;i++){const[a,c]=o[i];bc(c,gh(t,a),n,r)}},gh=(e,t)=>{let n=e;const r=t.split(si),o=r.length;for(let s=0;s<o;s++){const i=r[s];let a=n.nextPart.get(i);a||(a=hh(),n.nextPart.set(i,a)),n=a}return n},VE=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,BE=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(s,i)=>{n[s]=i,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(s){let i=n[s];if(i!==void 0)return i;if((i=r[s])!==void 0)return o(s,i),i},set(s,i){s in n?n[s]=i:o(s,i)}}},wc="!",yh=":",HE=[],vh=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),ZE=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let i=0,a=0,c=0,u;const l=o.length;for(let p=0;p<l;p++){const y=o[p];if(i===0&&a===0){if(y===yh){s.push(o.slice(c,p)),c=p+1;continue}if(y==="/"){u=p;continue}}y==="["?i++:y==="]"?i--:y==="("?a++:y===")"&&a--}const f=s.length===0?o:o.slice(c);let d=f,h=!1;f.endsWith(wc)?(d=f.slice(0,-1),h=!0):f.startsWith(wc)&&(d=f.slice(1),h=!0);const m=u&&u>c?u-c:void 0;return vh(s,h,d,m)};if(t){const o=t+yh,s=r;r=i=>i.startsWith(o)?s(i.slice(o.length)):vh(HE,!1,i,void 0,!0)}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},GE=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let s=0;s<n.length;s++){const i=n[s],a=i[0]==="[",c=t.has(i);a||c?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(i)):o.push(i)}return o.length>0&&(o.sort(),r.push(...o)),r}},qE=e=>({cache:BE(e.cacheSize),parseClassName:ZE(e),sortModifiers:GE(e),...RE(e)}),KE=/\s+/,XE=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s}=t,i=[],a=e.trim().split(KE);let c="";for(let u=a.length-1;u>=0;u-=1){const l=a[u],{isExternal:f,modifiers:d,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:p}=n(l);if(f){c=l+(c.length>0?" "+c:c);continue}let y=!!p,g=r(y?m.substring(0,p):m);if(!g){if(!y){c=l+(c.length>0?" "+c:c);continue}if(g=r(m),!g){c=l+(c.length>0?" "+c:c);continue}y=!1}const C=d.length===0?"":d.length===1?d[0]:s(d).join(":"),O=h?C+wc:C,w=O+g;if(i.indexOf(w)>-1)continue;i.push(w);const _=o(g,y);for(let S=0;S<_.length;++S){const I=_[S];i.push(O+I)}c=l+(c.length>0?" "+c:c)}return c},JE=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=bh(n))&&(o&&(o+=" "),o+=r);return o},bh=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=bh(e[r]))&&(n&&(n+=" "),n+=t);return n},QE=(e,...t)=>{let n,r,o,s;const i=c=>{const u=t.reduce((l,f)=>f(l),e());return n=qE(u),r=n.cache.get,o=n.cache.set,s=a,a(c)},a=c=>{const u=r(c);if(u)return u;const l=XE(c,n);return o(c,l),l};return s=i,(...c)=>s(JE(...c))},eC=[],kt=e=>{const t=n=>n[e]||eC;return t.isThemeGetter=!0,t},wh=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,_h=/^\((?:(\w[\w-]*):)?(.+)\)$/i,tC=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,nC=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,rC=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,oC=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,sC=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,iC=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,lr=e=>tC.test(e),Me=e=>!!e&&!Number.isNaN(Number(e)),ur=e=>!!e&&Number.isInteger(Number(e)),_c=e=>e.endsWith("%")&&Me(e.slice(0,-1)),qn=e=>nC.test(e),Sh=()=>!0,aC=e=>rC.test(e)&&!oC.test(e),Sc=()=>!1,cC=e=>sC.test(e),lC=e=>iC.test(e),uC=e=>!de(e)&&!he(e),fC=e=>fr(e,Th,Sc),de=e=>wh.test(e),Ir=e=>fr(e,Dh,aC),kh=e=>fr(e,bC,Me),dC=e=>fr(e,Mh,Sh),hC=e=>fr(e,Ah,Sc),xh=e=>fr(e,Eh,Sc),pC=e=>fr(e,Ch,lC),ii=e=>fr(e,Ph,cC),he=e=>_h.test(e),Ko=e=>Fr(e,Dh),mC=e=>Fr(e,Ah),Oh=e=>Fr(e,Eh),gC=e=>Fr(e,Th),yC=e=>Fr(e,Ch),ai=e=>Fr(e,Ph,!0),vC=e=>Fr(e,Mh,!0),fr=(e,t,n)=>{const r=wh.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Fr=(e,t,n=!1)=>{const r=_h.exec(e);return r?r[1]?t(r[1]):n:!1},Eh=e=>e==="position"||e==="percentage",Ch=e=>e==="image"||e==="url",Th=e=>e==="length"||e==="size"||e==="bg-size",Dh=e=>e==="length",bC=e=>e==="number",Ah=e=>e==="family-name",Mh=e=>e==="number"||e==="weight",Ph=e=>e==="shadow",kc=QE(()=>{const e=kt("color"),t=kt("font"),n=kt("text"),r=kt("font-weight"),o=kt("tracking"),s=kt("leading"),i=kt("breakpoint"),a=kt("container"),c=kt("spacing"),u=kt("radius"),l=kt("shadow"),f=kt("inset-shadow"),d=kt("text-shadow"),h=kt("drop-shadow"),m=kt("blur"),p=kt("perspective"),y=kt("aspect"),g=kt("ease"),C=kt("animate"),O=()=>["auto","avoid","all","avoid-page","page","left","right","column"],w=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],_=()=>[...w(),he,de],S=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto","contain","none"],v=()=>[he,de,c],x=()=>[lr,"full","auto",...v()],P=()=>[ur,"none","subgrid",he,de],A=()=>["auto",{span:["full",ur,he,de]},ur,he,de],M=()=>[ur,"auto",he,de],F=()=>["auto","min","max","fr",he,de],N=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],W=()=>["start","end","center","stretch","center-safe","end-safe"],E=()=>["auto",...v()],k=()=>[lr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...v()],U=()=>[lr,"screen","full","dvw","lvw","svw","min","max","fit",...v()],$=()=>[lr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...v()],D=()=>[e,he,de],V=()=>[...w(),Oh,xh,{position:[he,de]}],Z=()=>["no-repeat",{repeat:["","x","y","space","round"]}],G=()=>["auto","cover","contain",gC,fC,{size:[he,de]}],B=()=>[_c,Ko,Ir],z=()=>["","none","full",u,he,de],X=()=>["",Me,Ko,Ir],q=()=>["solid","dashed","dotted","double"],oe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Q=()=>[Me,_c,Oh,xh],re=()=>["","none",m,he,de],le=()=>["none",Me,he,de],K=()=>["none",Me,he,de],Se=()=>[Me,he,de],Ie=()=>[lr,"full",...v()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[qn],breakpoint:[qn],color:[Sh],container:[qn],"drop-shadow":[qn],ease:["in","out","in-out"],font:[uC],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[qn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[qn],shadow:[qn],spacing:["px",Me],text:[qn],"text-shadow":[qn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",lr,de,he,y]}],container:["container"],columns:[{columns:[Me,de,he,a]}],"break-after":[{"break-after":O()}],"break-before":[{"break-before":O()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:_()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:x()}],"inset-x":[{"inset-x":x()}],"inset-y":[{"inset-y":x()}],start:[{"inset-s":x(),start:x()}],end:[{"inset-e":x(),end:x()}],"inset-bs":[{"inset-bs":x()}],"inset-be":[{"inset-be":x()}],top:[{top:x()}],right:[{right:x()}],bottom:[{bottom:x()}],left:[{left:x()}],visibility:["visible","invisible","collapse"],z:[{z:[ur,"auto",he,de]}],basis:[{basis:[lr,"full","auto",a,...v()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Me,lr,"auto","initial","none",de]}],grow:[{grow:["",Me,he,de]}],shrink:[{shrink:["",Me,he,de]}],order:[{order:[ur,"first","last","none",he,de]}],"grid-cols":[{"grid-cols":P()}],"col-start-end":[{col:A()}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":P()}],"row-start-end":[{row:A()}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":F()}],"auto-rows":[{"auto-rows":F()}],gap:[{gap:v()}],"gap-x":[{"gap-x":v()}],"gap-y":[{"gap-y":v()}],"justify-content":[{justify:[...N(),"normal"]}],"justify-items":[{"justify-items":[...W(),"normal"]}],"justify-self":[{"justify-self":["auto",...W()]}],"align-content":[{content:["normal",...N()]}],"align-items":[{items:[...W(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...W(),{baseline:["","last"]}]}],"place-content":[{"place-content":N()}],"place-items":[{"place-items":[...W(),"baseline"]}],"place-self":[{"place-self":["auto",...W()]}],p:[{p:v()}],px:[{px:v()}],py:[{py:v()}],ps:[{ps:v()}],pe:[{pe:v()}],pbs:[{pbs:v()}],pbe:[{pbe:v()}],pt:[{pt:v()}],pr:[{pr:v()}],pb:[{pb:v()}],pl:[{pl:v()}],m:[{m:E()}],mx:[{mx:E()}],my:[{my:E()}],ms:[{ms:E()}],me:[{me:E()}],mbs:[{mbs:E()}],mbe:[{mbe:E()}],mt:[{mt:E()}],mr:[{mr:E()}],mb:[{mb:E()}],ml:[{ml:E()}],"space-x":[{"space-x":v()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":v()}],"space-y-reverse":["space-y-reverse"],size:[{size:k()}],"inline-size":[{inline:["auto",...U()]}],"min-inline-size":[{"min-inline":["auto",...U()]}],"max-inline-size":[{"max-inline":["none",...U()]}],"block-size":[{block:["auto",...$()]}],"min-block-size":[{"min-block":["auto",...$()]}],"max-block-size":[{"max-block":["none",...$()]}],w:[{w:[a,"screen",...k()]}],"min-w":[{"min-w":[a,"screen","none",...k()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[i]},...k()]}],h:[{h:["screen","lh",...k()]}],"min-h":[{"min-h":["screen","lh","none",...k()]}],"max-h":[{"max-h":["screen","lh",...k()]}],"font-size":[{text:["base",n,Ko,Ir]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,vC,dC]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",_c,de]}],"font-family":[{font:[mC,hC,t]}],"font-features":[{"font-features":[de]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,he,de]}],"line-clamp":[{"line-clamp":[Me,"none",he,kh]}],leading:[{leading:[s,...v()]}],"list-image":[{"list-image":["none",he,de]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",he,de]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:D()}],"text-color":[{text:D()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...q(),"wavy"]}],"text-decoration-thickness":[{decoration:[Me,"from-font","auto",he,Ir]}],"text-decoration-color":[{decoration:D()}],"underline-offset":[{"underline-offset":[Me,"auto",he,de]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:v()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",he,de]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",he,de]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:V()}],"bg-repeat":[{bg:Z()}],"bg-size":[{bg:G()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ur,he,de],radial:["",he,de],conic:[ur,he,de]},yC,pC]}],"bg-color":[{bg:D()}],"gradient-from-pos":[{from:B()}],"gradient-via-pos":[{via:B()}],"gradient-to-pos":[{to:B()}],"gradient-from":[{from:D()}],"gradient-via":[{via:D()}],"gradient-to":[{to:D()}],rounded:[{rounded:z()}],"rounded-s":[{"rounded-s":z()}],"rounded-e":[{"rounded-e":z()}],"rounded-t":[{"rounded-t":z()}],"rounded-r":[{"rounded-r":z()}],"rounded-b":[{"rounded-b":z()}],"rounded-l":[{"rounded-l":z()}],"rounded-ss":[{"rounded-ss":z()}],"rounded-se":[{"rounded-se":z()}],"rounded-ee":[{"rounded-ee":z()}],"rounded-es":[{"rounded-es":z()}],"rounded-tl":[{"rounded-tl":z()}],"rounded-tr":[{"rounded-tr":z()}],"rounded-br":[{"rounded-br":z()}],"rounded-bl":[{"rounded-bl":z()}],"border-w":[{border:X()}],"border-w-x":[{"border-x":X()}],"border-w-y":[{"border-y":X()}],"border-w-s":[{"border-s":X()}],"border-w-e":[{"border-e":X()}],"border-w-bs":[{"border-bs":X()}],"border-w-be":[{"border-be":X()}],"border-w-t":[{"border-t":X()}],"border-w-r":[{"border-r":X()}],"border-w-b":[{"border-b":X()}],"border-w-l":[{"border-l":X()}],"divide-x":[{"divide-x":X()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":X()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...q(),"hidden","none"]}],"divide-style":[{divide:[...q(),"hidden","none"]}],"border-color":[{border:D()}],"border-color-x":[{"border-x":D()}],"border-color-y":[{"border-y":D()}],"border-color-s":[{"border-s":D()}],"border-color-e":[{"border-e":D()}],"border-color-bs":[{"border-bs":D()}],"border-color-be":[{"border-be":D()}],"border-color-t":[{"border-t":D()}],"border-color-r":[{"border-r":D()}],"border-color-b":[{"border-b":D()}],"border-color-l":[{"border-l":D()}],"divide-color":[{divide:D()}],"outline-style":[{outline:[...q(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Me,he,de]}],"outline-w":[{outline:["",Me,Ko,Ir]}],"outline-color":[{outline:D()}],shadow:[{shadow:["","none",l,ai,ii]}],"shadow-color":[{shadow:D()}],"inset-shadow":[{"inset-shadow":["none",f,ai,ii]}],"inset-shadow-color":[{"inset-shadow":D()}],"ring-w":[{ring:X()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:D()}],"ring-offset-w":[{"ring-offset":[Me,Ir]}],"ring-offset-color":[{"ring-offset":D()}],"inset-ring-w":[{"inset-ring":X()}],"inset-ring-color":[{"inset-ring":D()}],"text-shadow":[{"text-shadow":["none",d,ai,ii]}],"text-shadow-color":[{"text-shadow":D()}],opacity:[{opacity:[Me,he,de]}],"mix-blend":[{"mix-blend":[...oe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":oe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Me]}],"mask-image-linear-from-pos":[{"mask-linear-from":Q()}],"mask-image-linear-to-pos":[{"mask-linear-to":Q()}],"mask-image-linear-from-color":[{"mask-linear-from":D()}],"mask-image-linear-to-color":[{"mask-linear-to":D()}],"mask-image-t-from-pos":[{"mask-t-from":Q()}],"mask-image-t-to-pos":[{"mask-t-to":Q()}],"mask-image-t-from-color":[{"mask-t-from":D()}],"mask-image-t-to-color":[{"mask-t-to":D()}],"mask-image-r-from-pos":[{"mask-r-from":Q()}],"mask-image-r-to-pos":[{"mask-r-to":Q()}],"mask-image-r-from-color":[{"mask-r-from":D()}],"mask-image-r-to-color":[{"mask-r-to":D()}],"mask-image-b-from-pos":[{"mask-b-from":Q()}],"mask-image-b-to-pos":[{"mask-b-to":Q()}],"mask-image-b-from-color":[{"mask-b-from":D()}],"mask-image-b-to-color":[{"mask-b-to":D()}],"mask-image-l-from-pos":[{"mask-l-from":Q()}],"mask-image-l-to-pos":[{"mask-l-to":Q()}],"mask-image-l-from-color":[{"mask-l-from":D()}],"mask-image-l-to-color":[{"mask-l-to":D()}],"mask-image-x-from-pos":[{"mask-x-from":Q()}],"mask-image-x-to-pos":[{"mask-x-to":Q()}],"mask-image-x-from-color":[{"mask-x-from":D()}],"mask-image-x-to-color":[{"mask-x-to":D()}],"mask-image-y-from-pos":[{"mask-y-from":Q()}],"mask-image-y-to-pos":[{"mask-y-to":Q()}],"mask-image-y-from-color":[{"mask-y-from":D()}],"mask-image-y-to-color":[{"mask-y-to":D()}],"mask-image-radial":[{"mask-radial":[he,de]}],"mask-image-radial-from-pos":[{"mask-radial-from":Q()}],"mask-image-radial-to-pos":[{"mask-radial-to":Q()}],"mask-image-radial-from-color":[{"mask-radial-from":D()}],"mask-image-radial-to-color":[{"mask-radial-to":D()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":w()}],"mask-image-conic-pos":[{"mask-conic":[Me]}],"mask-image-conic-from-pos":[{"mask-conic-from":Q()}],"mask-image-conic-to-pos":[{"mask-conic-to":Q()}],"mask-image-conic-from-color":[{"mask-conic-from":D()}],"mask-image-conic-to-color":[{"mask-conic-to":D()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:V()}],"mask-repeat":[{mask:Z()}],"mask-size":[{mask:G()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",he,de]}],filter:[{filter:["","none",he,de]}],blur:[{blur:re()}],brightness:[{brightness:[Me,he,de]}],contrast:[{contrast:[Me,he,de]}],"drop-shadow":[{"drop-shadow":["","none",h,ai,ii]}],"drop-shadow-color":[{"drop-shadow":D()}],grayscale:[{grayscale:["",Me,he,de]}],"hue-rotate":[{"hue-rotate":[Me,he,de]}],invert:[{invert:["",Me,he,de]}],saturate:[{saturate:[Me,he,de]}],sepia:[{sepia:["",Me,he,de]}],"backdrop-filter":[{"backdrop-filter":["","none",he,de]}],"backdrop-blur":[{"backdrop-blur":re()}],"backdrop-brightness":[{"backdrop-brightness":[Me,he,de]}],"backdrop-contrast":[{"backdrop-contrast":[Me,he,de]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Me,he,de]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Me,he,de]}],"backdrop-invert":[{"backdrop-invert":["",Me,he,de]}],"backdrop-opacity":[{"backdrop-opacity":[Me,he,de]}],"backdrop-saturate":[{"backdrop-saturate":[Me,he,de]}],"backdrop-sepia":[{"backdrop-sepia":["",Me,he,de]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":v()}],"border-spacing-x":[{"border-spacing-x":v()}],"border-spacing-y":[{"border-spacing-y":v()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",he,de]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Me,"initial",he,de]}],ease:[{ease:["linear","initial",g,he,de]}],delay:[{delay:[Me,he,de]}],animate:[{animate:["none",C,he,de]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[p,he,de]}],"perspective-origin":[{"perspective-origin":_()}],rotate:[{rotate:le()}],"rotate-x":[{"rotate-x":le()}],"rotate-y":[{"rotate-y":le()}],"rotate-z":[{"rotate-z":le()}],scale:[{scale:K()}],"scale-x":[{"scale-x":K()}],"scale-y":[{"scale-y":K()}],"scale-z":[{"scale-z":K()}],"scale-3d":["scale-3d"],skew:[{skew:Se()}],"skew-x":[{"skew-x":Se()}],"skew-y":[{"skew-y":Se()}],transform:[{transform:[he,de,"","none","gpu","cpu"]}],"transform-origin":[{origin:_()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ie()}],"translate-x":[{"translate-x":Ie()}],"translate-y":[{"translate-y":Ie()}],"translate-z":[{"translate-z":Ie()}],"translate-none":["translate-none"],accent:[{accent:D()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:D()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",he,de]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":v()}],"scroll-mx":[{"scroll-mx":v()}],"scroll-my":[{"scroll-my":v()}],"scroll-ms":[{"scroll-ms":v()}],"scroll-me":[{"scroll-me":v()}],"scroll-mbs":[{"scroll-mbs":v()}],"scroll-mbe":[{"scroll-mbe":v()}],"scroll-mt":[{"scroll-mt":v()}],"scroll-mr":[{"scroll-mr":v()}],"scroll-mb":[{"scroll-mb":v()}],"scroll-ml":[{"scroll-ml":v()}],"scroll-p":[{"scroll-p":v()}],"scroll-px":[{"scroll-px":v()}],"scroll-py":[{"scroll-py":v()}],"scroll-ps":[{"scroll-ps":v()}],"scroll-pe":[{"scroll-pe":v()}],"scroll-pbs":[{"scroll-pbs":v()}],"scroll-pbe":[{"scroll-pbe":v()}],"scroll-pt":[{"scroll-pt":v()}],"scroll-pr":[{"scroll-pr":v()}],"scroll-pb":[{"scroll-pb":v()}],"scroll-pl":[{"scroll-pl":v()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",he,de]}],fill:[{fill:["none",...D()]}],"stroke-w":[{stroke:[Me,Ko,Ir,kh]}],stroke:[{stroke:["none",...D()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function Dt(...e){return kc(oi(e))}var wC=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],_C=wC.reduce((e,t)=>{const n=uh(`Primitive.${t}`),r=b.forwardRef((o,s)=>{const{asChild:i,...a}=o,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),T.jsx(c,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),SC="Label",Nh=b.forwardRef((e,t)=>T.jsx(_C.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Nh.displayName=SC;var kC=Nh;function xC({className:e,...t}){return T.jsx(kC,{"data-slot":"label",className:Dt("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}const OC=rb,Ih=b.createContext({}),EC=({...e})=>T.jsx(Ih.Provider,{value:{name:e.name},children:T.jsx(tb,{...e})}),ci=()=>{const e=b.useContext(Ih),t=b.useContext(Fh),{getFieldState:n}=nb(),r=Lu({name:e.name}),o=n(e.name,r);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:s}=t;return{id:s,name:e.name,formItemId:`${s}-form-item`,formDescriptionId:`${s}-form-item-description`,formMessageId:`${s}-form-item-message`,...o}},Fh=b.createContext({});function xc({className:e,...t}){const n=b.useId();return T.jsx(Fh.Provider,{value:{id:n},children:T.jsx("div",{"data-slot":"form-item",className:Dt("grid gap-2",e),...t})})}function Oc({className:e,...t}){const{error:n,formItemId:r}=ci();return T.jsx(xC,{"data-slot":"form-label","data-error":!!n,className:Dt("data-[error=true]:text-destructive",e),htmlFor:r,...t})}function li({...e}){const{error:t,formItemId:n,formDescriptionId:r,formMessageId:o}=ci();return T.jsx(fh,{"data-slot":"form-control",id:n,"aria-describedby":t?`${r} ${o}`:`${r}`,"aria-invalid":!!t,...e})}function CC({className:e,...t}){const{formDescriptionId:n}=ci();return T.jsx("p",{"data-slot":"form-description",id:n,className:Dt("text-muted-foreground text-sm",e),...t})}function TC({className:e,...t}){const{error:n,formMessageId:r}=ci(),o=n?String(n?.message??""):t.children;return o?T.jsx("p",{"data-slot":"form-message",id:r,className:Dt("text-destructive text-sm",e),...t,children:o}):null}function DC({className:e,type:t,...n}){return T.jsx("input",{type:t,"data-slot":"input",className:Dt("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...n})}function Rh(...e){return kc(oi(e))}const AC=(e={})=>{const{field:t={},form:n={},question:r={},disabled:o=!1}=e;return T.jsx(DC,{...t,type:r.validation?.type==="email"?"email":r?.id?.includes("phone")?"tel":"text",placeholder:r.placeholder||"Your answer here...",className:Rh("bq-input",n.formState.errors[r.reference_id]?"border-destructive focus-visible:ring-destructive":""),disabled:o})};function MC({className:e,...t}){return T.jsx("textarea",{"data-slot":"textarea",className:Dt("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...t})}const PC=(e={})=>{const{field:t={},form:n={},question:r={},disabled:o=!1}=e;return T.jsx(MC,{...t,rows:4,placeholder:r.placeholder||"Your detailed answer...",className:Rh("bq-textarea",n.formState.errors[r.reference_id]?"border-destructive focus-visible:ring-destructive":""),disabled:o})};function Te(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function NC(e,t){const n=b.createContext(t),r=s=>{const{children:i,...a}=s,c=b.useMemo(()=>a,Object.values(a));return T.jsx(n.Provider,{value:c,children:i})};r.displayName=e+"Provider";function o(s){const i=b.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function Kn(e,t=[]){let n=[];function r(s,i){const a=b.createContext(i),c=n.length;n=[...n,i];const u=f=>{const{scope:d,children:h,...m}=f,p=d?.[e]?.[c]||a,y=b.useMemo(()=>m,Object.values(m));return T.jsx(p.Provider,{value:y,children:h})};u.displayName=s+"Provider";function l(f,d){const h=d?.[e]?.[c]||a,m=b.useContext(h);if(m)return m;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,l]}const o=()=>{const s=n.map(i=>b.createContext(i));return function(a){const c=a?.[e]||s;return b.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return o.scopeName=e,[r,IC(o,...t)]}function IC(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((a,{useScope:c,scopeName:u})=>{const f=c(s)[`__scope${u}`];return{...a,...f}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function FC(e){const t=RC(e),n=b.forwardRef((r,o)=>{const{children:s,...i}=r,a=b.Children.toArray(s),c=a.find(zC);if(c){const u=c.props.children,l=a.map(f=>f===c?b.Children.count(u)>1?b.Children.only(null):b.isValidElement(u)?u.props.children:null:f);return T.jsx(t,{...i,ref:o,children:b.isValidElement(u)?b.cloneElement(u,void 0,l):null})}return T.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function RC(e){const t=b.forwardRef((n,r)=>{const{children:o,...s}=n;if(b.isValidElement(o)){const i=$C(o),a=LC(s,o.props);return o.type!==b.Fragment&&(a.ref=r?Nr(r,i):i),b.cloneElement(o,a)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var WC=Symbol("radix.slottable");function zC(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===WC}function LC(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const c=s(...a);return o(...a),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function $C(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var UC=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ne=UC.reduce((e,t)=>{const n=FC(`Primitive.${t}`),r=b.forwardRef((o,s)=>{const{asChild:i,...a}=o,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),T.jsx(c,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function YC(e,t){e&&ms.flushSync(()=>e.dispatchEvent(t))}function Wh(e){const t=jC(e),n=b.forwardRef((r,o)=>{const{children:s,...i}=r,a=b.Children.toArray(s),c=a.find(BC);if(c){const u=c.props.children,l=a.map(f=>f===c?b.Children.count(u)>1?b.Children.only(null):b.isValidElement(u)?u.props.children:null:f);return T.jsx(t,{...i,ref:o,children:b.isValidElement(u)?b.cloneElement(u,void 0,l):null})}return T.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function jC(e){const t=b.forwardRef((n,r)=>{const{children:o,...s}=n;if(b.isValidElement(o)){const i=ZC(o),a=HC(s,o.props);return o.type!==b.Fragment&&(a.ref=r?Nr(r,i):i),b.cloneElement(o,a)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var VC=Symbol("radix.slottable");function BC(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===VC}function HC(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const c=s(...a);return o(...a),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function ZC(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function zh(e){const t=e+"CollectionProvider",[n,r]=Kn(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=p=>{const{scope:y,children:g}=p,C=j.useRef(null),O=j.useRef(new Map).current;return T.jsx(o,{scope:y,itemMap:O,collectionRef:C,children:g})};i.displayName=t;const a=e+"CollectionSlot",c=Wh(a),u=j.forwardRef((p,y)=>{const{scope:g,children:C}=p,O=s(a,g),w=He(y,O.collectionRef);return T.jsx(c,{ref:w,children:C})});u.displayName=a;const l=e+"CollectionItemSlot",f="data-radix-collection-item",d=Wh(l),h=j.forwardRef((p,y)=>{const{scope:g,children:C,...O}=p,w=j.useRef(null),_=He(y,w),S=s(l,g);return j.useEffect(()=>(S.itemMap.set(w,{ref:w,...O}),()=>{S.itemMap.delete(w)})),T.jsx(d,{[f]:"",ref:_,children:C})});h.displayName=l;function m(p){const y=s(e+"CollectionConsumer",p);return j.useCallback(()=>{const C=y.collectionRef.current;if(!C)return[];const O=Array.from(C.querySelectorAll(`[${f}]`));return Array.from(y.itemMap.values()).sort((S,I)=>O.indexOf(S.ref.current)-O.indexOf(I.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:i,Slot:u,ItemSlot:h},m,r]}var At=globalThis?.document?b.useLayoutEffect:()=>{},GC=b[" useId ".trim().toString()]||(()=>{}),qC=0;function dr(e){const[t,n]=b.useState(GC());return At(()=>{n(r=>r??String(qC++))},[e]),e||(t?`radix-${t}`:"")}function hr(e){const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...n)=>t.current?.(...n),[])}var KC=b[" useInsertionEffect ".trim().toString()]||At;function Rr({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,i]=XC({defaultProp:t,onChange:n}),a=e!==void 0,c=a?e:o;{const l=b.useRef(e!==void 0);b.useEffect(()=>{const f=l.current;f!==a&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),l.current=a},[a,r])}const u=b.useCallback(l=>{if(a){const f=JC(l)?l(e):l;f!==e&&i.current?.(f)}else s(l)},[a,e,s,i]);return[c,u]}function XC({defaultProp:e,onChange:t}){const[n,r]=b.useState(e),o=b.useRef(n),s=b.useRef(t);return KC(()=>{s.current=t},[t]),b.useEffect(()=>{o.current!==n&&(s.current?.(n),o.current=n)},[n,o]),[n,r,s]}function JC(e){return typeof e=="function"}var QC=b.createContext(void 0);function Ec(e){const t=b.useContext(QC);return e||t||"ltr"}var Cc="rovingFocusGroup.onEntryFocus",eT={bubbles:!1,cancelable:!0},Xo="RovingFocusGroup",[Tc,Lh,tT]=zh(Xo),[nT,$h]=Kn(Xo,[tT]),[rT,oT]=nT(Xo),Uh=b.forwardRef((e,t)=>T.jsx(Tc.Provider,{scope:e.__scopeRovingFocusGroup,children:T.jsx(Tc.Slot,{scope:e.__scopeRovingFocusGroup,children:T.jsx(sT,{...e,ref:t})})}));Uh.displayName=Xo;var sT=b.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:l=!1,...f}=e,d=b.useRef(null),h=He(t,d),m=Ec(s),[p,y]=Rr({prop:i,defaultProp:a??null,onChange:c,caller:Xo}),[g,C]=b.useState(!1),O=hr(u),w=Lh(n),_=b.useRef(!1),[S,I]=b.useState(0);return b.useEffect(()=>{const v=d.current;if(v)return v.addEventListener(Cc,O),()=>v.removeEventListener(Cc,O)},[O]),T.jsx(rT,{scope:n,orientation:r,dir:m,loop:o,currentTabStopId:p,onItemFocus:b.useCallback(v=>y(v),[y]),onItemShiftTab:b.useCallback(()=>C(!0),[]),onFocusableItemAdd:b.useCallback(()=>I(v=>v+1),[]),onFocusableItemRemove:b.useCallback(()=>I(v=>v-1),[]),children:T.jsx(Ne.div,{tabIndex:g||S===0?-1:0,"data-orientation":r,...f,ref:h,style:{outline:"none",...e.style},onMouseDown:Te(e.onMouseDown,()=>{_.current=!0}),onFocus:Te(e.onFocus,v=>{const x=!_.current;if(v.target===v.currentTarget&&x&&!g){const P=new CustomEvent(Cc,eT);if(v.currentTarget.dispatchEvent(P),!P.defaultPrevented){const A=w().filter(E=>E.focusable),M=A.find(E=>E.active),F=A.find(E=>E.id===p),W=[M,F,...A].filter(Boolean).map(E=>E.ref.current);Vh(W,l)}}_.current=!1}),onBlur:Te(e.onBlur,()=>C(!1))})})}),Yh="RovingFocusGroupItem",jh=b.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:i,...a}=e,c=dr(),u=s||c,l=oT(Yh,n),f=l.currentTabStopId===u,d=Lh(n),{onFocusableItemAdd:h,onFocusableItemRemove:m,currentTabStopId:p}=l;return b.useEffect(()=>{if(r)return h(),()=>m()},[r,h,m]),T.jsx(Tc.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:T.jsx(Ne.span,{tabIndex:f?0:-1,"data-orientation":l.orientation,...a,ref:t,onMouseDown:Te(e.onMouseDown,y=>{r?l.onItemFocus(u):y.preventDefault()}),onFocus:Te(e.onFocus,()=>l.onItemFocus(u)),onKeyDown:Te(e.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){l.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const g=cT(y,l.orientation,l.dir);if(g!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let O=d().filter(w=>w.focusable).map(w=>w.ref.current);if(g==="last")O.reverse();else if(g==="prev"||g==="next"){g==="prev"&&O.reverse();const w=O.indexOf(y.currentTarget);O=l.loop?lT(O,w+1):O.slice(w+1)}setTimeout(()=>Vh(O))}}),children:typeof i=="function"?i({isCurrentTabStop:f,hasTabStop:p!=null}):i})})});jh.displayName=Yh;var iT={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function aT(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function cT(e,t,n){const r=aT(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return iT[r]}function Vh(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function lT(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var uT=Uh,fT=jh;function Dc(e){const[t,n]=b.useState(void 0);return At(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const c=s.borderBoxSize,u=Array.isArray(c)?c[0]:c;i=u.inlineSize,a=u.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function Ac(e){const t=b.useRef({value:e,previous:e});return b.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function dT(e,t){return b.useReducer((n,r)=>t[n][r]??n,e)}var pr=e=>{const{present:t,children:n}=e,r=hT(t),o=typeof n=="function"?n({present:r.isPresent}):b.Children.only(n),s=He(r.ref,pT(o));return typeof n=="function"||r.isPresent?b.cloneElement(o,{ref:s}):null};pr.displayName="Presence";function hT(e){const[t,n]=b.useState(),r=b.useRef(null),o=b.useRef(e),s=b.useRef("none"),i=e?"mounted":"unmounted",[a,c]=dT(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const u=ui(r.current);s.current=a==="mounted"?u:"none"},[a]),At(()=>{const u=r.current,l=o.current;if(l!==e){const d=s.current,h=ui(u);e?c("MOUNT"):h==="none"||u?.display==="none"?c("UNMOUNT"):c(l&&d!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),At(()=>{if(t){let u;const l=t.ownerDocument.defaultView??window,f=h=>{const p=ui(r.current).includes(CSS.escape(h.animationName));if(h.target===t&&p&&(c("ANIMATION_END"),!o.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",u=l.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},d=h=>{h.target===t&&(s.current=ui(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{l.clearTimeout(u),t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:b.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function ui(e){return e?.animationName||"none"}function pT(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Mc="Radio",[mT,Bh]=Kn(Mc),[gT,yT]=mT(Mc),Hh=b.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:s,disabled:i,value:a="on",onCheck:c,form:u,...l}=e,[f,d]=b.useState(null),h=He(t,y=>d(y)),m=b.useRef(!1),p=f?u||!!f.closest("form"):!0;return T.jsxs(gT,{scope:n,checked:o,disabled:i,children:[T.jsx(Ne.button,{type:"button",role:"radio","aria-checked":o,"data-state":Kh(o),"data-disabled":i?"":void 0,disabled:i,value:a,...l,ref:h,onClick:Te(e.onClick,y=>{o||c?.(),p&&(m.current=y.isPropagationStopped(),m.current||y.stopPropagation())})}),p&&T.jsx(qh,{control:f,bubbles:!m.current,name:r,value:a,checked:o,required:s,disabled:i,form:u,style:{transform:"translateX(-100%)"}})]})});Hh.displayName=Mc;var Zh="RadioIndicator",Gh=b.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,s=yT(Zh,n);return T.jsx(pr,{present:r||s.checked,children:T.jsx(Ne.span,{"data-state":Kh(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t})})});Gh.displayName=Zh;var vT="RadioBubbleInput",qh=b.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},s)=>{const i=b.useRef(null),a=He(i,s),c=Ac(n),u=Dc(t);return b.useEffect(()=>{const l=i.current;if(!l)return;const f=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(f,"checked").set;if(c!==n&&h){const m=new Event("click",{bubbles:r});h.call(l,n),l.dispatchEvent(m)}},[c,n,r]),T.jsx(Ne.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:a,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});qh.displayName=vT;function Kh(e){return e?"checked":"unchecked"}var bT=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],fi="RadioGroup",[wT]=Kn(fi,[$h,Bh]),Xh=$h(),Jh=Bh(),[_T,ST]=wT(fi),Qh=b.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:s,required:i=!1,disabled:a=!1,orientation:c,dir:u,loop:l=!0,onValueChange:f,...d}=e,h=Xh(n),m=Ec(u),[p,y]=Rr({prop:s,defaultProp:o??null,onChange:f,caller:fi});return T.jsx(_T,{scope:n,name:r,required:i,disabled:a,value:p,onValueChange:y,children:T.jsx(uT,{asChild:!0,...h,orientation:c,dir:m,loop:l,children:T.jsx(Ne.div,{role:"radiogroup","aria-required":i,"aria-orientation":c,"data-disabled":a?"":void 0,dir:m,...d,ref:t})})})});Qh.displayName=fi;var ep="RadioGroupItem",tp=b.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,s=ST(ep,n),i=s.disabled||r,a=Xh(n),c=Jh(n),u=b.useRef(null),l=He(t,u),f=s.value===o.value,d=b.useRef(!1);return b.useEffect(()=>{const h=p=>{bT.includes(p.key)&&(d.current=!0)},m=()=>d.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",m),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",m)}},[]),T.jsx(fT,{asChild:!0,...a,focusable:!i,active:f,children:T.jsx(Hh,{disabled:i,required:s.required,checked:f,...c,...o,name:s.name,ref:l,onCheck:()=>s.onValueChange(o.value),onKeyDown:Te(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:Te(o.onFocus,()=>{d.current&&u.current?.click()})})})});tp.displayName=ep;var kT="RadioGroupIndicator",np=b.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=Jh(n);return T.jsx(Gh,{...o,...r,ref:t})});np.displayName=kT;var xT=Qh,OT=tp,ET=np;const rp=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const CT=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const TT=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const op=e=>{const t=TT(e);return t.charAt(0).toUpperCase()+t.slice(1)};var DT={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const AT=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const MT=j.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...a},c)=>j.createElement("svg",{ref:c,...DT,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:rp("lucide",o),...!s&&!AT(a)&&{"aria-hidden":"true"},...a},[...i.map(([u,l])=>j.createElement(u,l)),...Array.isArray(s)?s:[s]]));const mr=(e,t)=>{const n=j.forwardRef(({className:r,...o},s)=>j.createElement(MT,{ref:s,iconNode:t,className:rp(`lucide-${CT(op(e))}`,`lucide-${e}`,r),...o}));return n.displayName=op(e),n};const PT=mr("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);const sp=mr("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const Pc=mr("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const NT=mr("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const IT=mr("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const FT=mr("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const RT=mr("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);const WT=mr("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function zT({className:e,...t}){return T.jsx(xT,{"data-slot":"radio-group",className:Dt("grid gap-3",e),...t})}function LT({className:e,...t}){return T.jsx(OT,{"data-slot":"radio-group-item",className:Dt("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:T.jsx(ET,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:T.jsx(RT,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})}const $T=(e={})=>{const{field:t={},form:n={},question:r={},disabled:o=!1}=e;return T.jsx(zT,{onValueChange:t.onChange,value:t.value,className:`bq-radio-group space-y-1 ${n.formState.errors[r.reference_id]?"rounded-md border border-destructive p-3":""}`,children:r.options.map(s=>{const i=`${r.reference_id}-${s.value}`;return T.jsxs(xc,{className:"flex items-center space-x-2 hover:bg-muted/50 rounded-md transition-colors",children:[T.jsx(li,{children:T.jsx(LT,{className:"bq-radio-item w-4 h-4 border focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",value:s.value,id:i,disabled:o})}),T.jsx(Oc,{htmlFor:i,className:"font-normal cursor-pointer",children:s.label})]},s.value)})})};var di="Checkbox",[UT]=Kn(di),[YT,Nc]=UT(di);function jT(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:s,form:i,name:a,onCheckedChange:c,required:u,value:l="on",internal_do_not_use_render:f}=e,[d,h]=Rr({prop:n,defaultProp:o??!1,onChange:c,caller:di}),[m,p]=b.useState(null),[y,g]=b.useState(null),C=b.useRef(!1),O=m?!!i||!!m.closest("form"):!0,w={checked:d,disabled:s,setChecked:h,control:m,setControl:p,name:a,form:i,value:l,hasConsumerStoppedPropagationRef:C,required:u,defaultChecked:gr(o)?!1:o,isFormControl:O,bubbleInput:y,setBubbleInput:g};return T.jsx(YT,{scope:t,...w,children:VT(f)?f(w):r})}var ip="CheckboxTrigger",ap=b.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:s,value:i,disabled:a,checked:c,required:u,setControl:l,setChecked:f,hasConsumerStoppedPropagationRef:d,isFormControl:h,bubbleInput:m}=Nc(ip,e),p=He(o,l),y=b.useRef(c);return b.useEffect(()=>{const g=s?.form;if(g){const C=()=>f(y.current);return g.addEventListener("reset",C),()=>g.removeEventListener("reset",C)}},[s,f]),T.jsx(Ne.button,{type:"button",role:"checkbox","aria-checked":gr(c)?"mixed":c,"aria-required":u,"data-state":hp(c),"data-disabled":a?"":void 0,disabled:a,value:i,...r,ref:p,onKeyDown:Te(t,g=>{g.key==="Enter"&&g.preventDefault()}),onClick:Te(n,g=>{f(C=>gr(C)?!0:!C),m&&h&&(d.current=g.isPropagationStopped(),d.current||g.stopPropagation())})})});ap.displayName=ip;var cp=b.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:s,required:i,disabled:a,value:c,onCheckedChange:u,form:l,...f}=e;return T.jsx(jT,{__scopeCheckbox:n,checked:o,defaultChecked:s,disabled:a,required:i,onCheckedChange:u,name:r,form:l,value:c,internal_do_not_use_render:({isFormControl:d})=>T.jsxs(T.Fragment,{children:[T.jsx(ap,{...f,ref:t,__scopeCheckbox:n}),d&&T.jsx(dp,{__scopeCheckbox:n})]})})});cp.displayName=di;var lp="CheckboxIndicator",up=b.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,s=Nc(lp,n);return T.jsx(pr,{present:r||gr(s.checked)||s.checked===!0,children:T.jsx(Ne.span,{"data-state":hp(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});up.displayName=lp;var fp="CheckboxBubbleInput",dp=b.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:s,defaultChecked:i,required:a,disabled:c,name:u,value:l,form:f,bubbleInput:d,setBubbleInput:h}=Nc(fp,e),m=He(n,h),p=Ac(s),y=Dc(r);b.useEffect(()=>{const C=d;if(!C)return;const O=window.HTMLInputElement.prototype,_=Object.getOwnPropertyDescriptor(O,"checked").set,S=!o.current;if(p!==s&&_){const I=new Event("click",{bubbles:S});C.indeterminate=gr(s),_.call(C,gr(s)?!1:s),C.dispatchEvent(I)}},[d,p,s,o]);const g=b.useRef(gr(s)?!1:s);return T.jsx(Ne.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??g.current,required:a,disabled:c,name:u,value:l,form:f,...t,tabIndex:-1,ref:m,style:{...t.style,...y,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});dp.displayName=fp;function VT(e){return typeof e=="function"}function gr(e){return e==="indeterminate"}function hp(e){return gr(e)?"indeterminate":e?"checked":"unchecked"}function BT({className:e,...t}){return T.jsx(cp,{"data-slot":"checkbox",className:Dt("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:T.jsx(up,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:T.jsx(sp,{className:"size-3.5"})})})}const HT=(e={})=>{const{field:t={},question:n={},disabled:r=!1}=e,{options:o=[]}=n;return o.map((s,i)=>T.jsxs(xc,{className:"flex items-center space-x-1 hover:bg-muted/50 rounded-md transition-colors",children:[T.jsx(li,{children:T.jsx(BT,{className:"bq-checkbox w-4 h-4 border border-input focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",checked:t.value?.includes(s.value),onCheckedChange:a=>a?t.onChange([...t.value||[],s.value]):t.onChange((t.value||[]).filter(c=>c!==s.value)),id:`${n.reference_id}-${s.value}`,disabled:r})}),T.jsx(Oc,{htmlFor:`${n.reference_id}-${s.value}`,className:"flex-1 font-normal cursor-pointer text-sm leading-relaxed",children:s.label})]},i))};function pp(e,[t,n]){return Math.min(n,Math.max(t,e))}function ZT(e,t=globalThis?.document){const n=hr(e);b.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var GT="DismissableLayer",Ic="dismissableLayer.update",qT="dismissableLayer.pointerDownOutside",KT="dismissableLayer.focusOutside",mp,gp=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),hi=b.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...c}=e,u=b.useContext(gp),[l,f]=b.useState(null),d=l?.ownerDocument??globalThis?.document,[,h]=b.useState({}),m=He(t,I=>f(I)),p=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=p.indexOf(y),C=l?p.indexOf(l):-1,O=u.layersWithOutsidePointerEventsDisabled.size>0,w=C>=g,_=QT(I=>{const v=I.target,x=[...u.branches].some(P=>P.contains(v));!w||x||(o?.(I),i?.(I),I.defaultPrevented||a?.())},d),S=eD(I=>{const v=I.target;[...u.branches].some(P=>P.contains(v))||(s?.(I),i?.(I),I.defaultPrevented||a?.())},d);return ZT(I=>{C===u.layers.size-1&&(r?.(I),!I.defaultPrevented&&a&&(I.preventDefault(),a()))},d),b.useEffect(()=>{if(l)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(mp=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(l)),u.layers.add(l),yp(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=mp)}},[l,d,n,u]),b.useEffect(()=>()=>{l&&(u.layers.delete(l),u.layersWithOutsidePointerEventsDisabled.delete(l),yp())},[l,u]),b.useEffect(()=>{const I=()=>h({});return document.addEventListener(Ic,I),()=>document.removeEventListener(Ic,I)},[]),T.jsx(Ne.div,{...c,ref:m,style:{pointerEvents:O?w?"auto":"none":void 0,...e.style},onFocusCapture:Te(e.onFocusCapture,S.onFocusCapture),onBlurCapture:Te(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:Te(e.onPointerDownCapture,_.onPointerDownCapture)})});hi.displayName=GT;var XT="DismissableLayerBranch",JT=b.forwardRef((e,t)=>{const n=b.useContext(gp),r=b.useRef(null),o=He(t,r);return b.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),T.jsx(Ne.div,{...e,ref:o})});JT.displayName=XT;function QT(e,t=globalThis?.document){const n=hr(e),r=b.useRef(!1),o=b.useRef(()=>{});return b.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let c=function(){vp(qT,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function eD(e,t=globalThis?.document){const n=hr(e),r=b.useRef(!1);return b.useEffect(()=>{const o=s=>{s.target&&!r.current&&vp(KT,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function yp(){const e=new CustomEvent(Ic);document.dispatchEvent(e)}function vp(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?YC(o,s):o.dispatchEvent(s)}var Fc=0;function Rc(){b.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??bp()),document.body.insertAdjacentElement("beforeend",e[1]??bp()),Fc++,()=>{Fc===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Fc--}},[])}function bp(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Wc="focusScope.autoFocusOnMount",zc="focusScope.autoFocusOnUnmount",wp={bubbles:!1,cancelable:!0},tD="FocusScope",pi=b.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,c]=b.useState(null),u=hr(o),l=hr(s),f=b.useRef(null),d=He(t,p=>c(p)),h=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(r){let p=function(O){if(h.paused||!a)return;const w=O.target;a.contains(w)?f.current=w:yr(f.current,{select:!0})},y=function(O){if(h.paused||!a)return;const w=O.relatedTarget;w!==null&&(a.contains(w)||yr(f.current,{select:!0}))},g=function(O){if(document.activeElement===document.body)for(const _ of O)_.removedNodes.length>0&&yr(a)};document.addEventListener("focusin",p),document.addEventListener("focusout",y);const C=new MutationObserver(g);return a&&C.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",y),C.disconnect()}}},[r,a,h.paused]),b.useEffect(()=>{if(a){kp.add(h);const p=document.activeElement;if(!a.contains(p)){const g=new CustomEvent(Wc,wp);a.addEventListener(Wc,u),a.dispatchEvent(g),g.defaultPrevented||(nD(aD(_p(a)),{select:!0}),document.activeElement===p&&yr(a))}return()=>{a.removeEventListener(Wc,u),setTimeout(()=>{const g=new CustomEvent(zc,wp);a.addEventListener(zc,l),a.dispatchEvent(g),g.defaultPrevented||yr(p??document.body,{select:!0}),a.removeEventListener(zc,l),kp.remove(h)},0)}}},[a,u,l,h]);const m=b.useCallback(p=>{if(!n&&!r||h.paused)return;const y=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,g=document.activeElement;if(y&&g){const C=p.currentTarget,[O,w]=rD(C);O&&w?!p.shiftKey&&g===w?(p.preventDefault(),n&&yr(O,{select:!0})):p.shiftKey&&g===O&&(p.preventDefault(),n&&yr(w,{select:!0})):g===C&&p.preventDefault()}},[n,r,h.paused]);return T.jsx(Ne.div,{tabIndex:-1,...i,ref:d,onKeyDown:m})});pi.displayName=tD;function nD(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(yr(r,{select:t}),document.activeElement!==n)return}function rD(e){const t=_p(e),n=Sp(t,e),r=Sp(t.reverse(),e);return[n,r]}function _p(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Sp(e,t){for(const n of e)if(!oD(n,{upTo:t}))return n}function oD(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function sD(e){return e instanceof HTMLInputElement&&"select"in e}function yr(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&sD(e)&&t&&e.select()}}var kp=iD();function iD(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=xp(e,t),e.unshift(t)},remove(t){e=xp(e,t),e[0]?.resume()}}}function xp(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function aD(e){return e.filter(t=>t.tagName!=="A")}const cD=["top","right","bottom","left"],vr=Math.min,Gt=Math.max,mi=Math.round,gi=Math.floor,Dn=e=>({x:e,y:e}),lD={left:"right",right:"left",bottom:"top",top:"bottom"},uD={start:"end",end:"start"};function Lc(e,t,n){return Gt(e,vr(t,n))}function Xn(e,t){return typeof e=="function"?e(t):e}function Jn(e){return e.split("-")[0]}function ao(e){return e.split("-")[1]}function $c(e){return e==="x"?"y":"x"}function Uc(e){return e==="y"?"height":"width"}const fD=new Set(["top","bottom"]);function An(e){return fD.has(Jn(e))?"y":"x"}function Yc(e){return $c(An(e))}function dD(e,t,n){n===void 0&&(n=!1);const r=ao(e),o=Yc(e),s=Uc(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=yi(i)),[i,yi(i)]}function hD(e){const t=yi(e);return[jc(e),t,jc(t)]}function jc(e){return e.replace(/start|end/g,t=>uD[t])}const Op=["left","right"],Ep=["right","left"],pD=["top","bottom"],mD=["bottom","top"];function gD(e,t,n){switch(e){case"top":case"bottom":return n?t?Ep:Op:t?Op:Ep;case"left":case"right":return t?pD:mD;default:return[]}}function yD(e,t,n,r){const o=ao(e);let s=gD(Jn(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(jc)))),s}function yi(e){return e.replace(/left|right|bottom|top/g,t=>lD[t])}function vD(e){return{top:0,right:0,bottom:0,left:0,...e}}function Cp(e){return typeof e!="number"?vD(e):{top:e,right:e,bottom:e,left:e}}function vi(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Tp(e,t,n){let{reference:r,floating:o}=e;const s=An(t),i=Yc(t),a=Uc(i),c=Jn(t),u=s==="y",l=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,d=r[a]/2-o[a]/2;let h;switch(c){case"top":h={x:l,y:r.y-o.height};break;case"bottom":h={x:l,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:f};break;case"left":h={x:r.x-o.width,y:f};break;default:h={x:r.x,y:r.y}}switch(ao(t)){case"start":h[i]-=d*(n&&u?-1:1);break;case"end":h[i]+=d*(n&&u?-1:1);break}return h}async function bD(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:l="viewport",elementContext:f="floating",altBoundary:d=!1,padding:h=0}=Xn(t,e),m=Cp(h),y=a[d?f==="floating"?"reference":"floating":f],g=vi(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(y)))==null||n?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:l,strategy:c})),C=f==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,O=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),w=await(s.isElement==null?void 0:s.isElement(O))?await(s.getScale==null?void 0:s.getScale(O))||{x:1,y:1}:{x:1,y:1},_=vi(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:C,offsetParent:O,strategy:c}):C);return{top:(g.top-_.top+m.top)/w.y,bottom:(_.bottom-g.bottom+m.bottom)/w.y,left:(g.left-_.left+m.left)/w.x,right:(_.right-g.right+m.right)/w.x}}const wD=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:l,y:f}=Tp(u,r,c),d=r,h={},m=0;for(let y=0;y<a.length;y++){var p;const{name:g,fn:C}=a[y],{x:O,y:w,data:_,reset:S}=await C({x:l,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:h,rects:u,platform:{...i,detectOverflow:(p=i.detectOverflow)!=null?p:bD},elements:{reference:e,floating:t}});l=O??l,f=w??f,h={...h,[g]:{...h[g],..._}},S&&m<=50&&(m++,typeof S=="object"&&(S.placement&&(d=S.placement),S.rects&&(u=S.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:l,y:f}=Tp(u,d,c)),y=-1)}return{x:l,y:f,placement:d,strategy:o,middlewareData:h}},_D=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:c}=t,{element:u,padding:l=0}=Xn(e,t)||{};if(u==null)return{};const f=Cp(l),d={x:n,y:r},h=Yc(o),m=Uc(h),p=await i.getDimensions(u),y=h==="y",g=y?"top":"left",C=y?"bottom":"right",O=y?"clientHeight":"clientWidth",w=s.reference[m]+s.reference[h]-d[h]-s.floating[m],_=d[h]-s.reference[h],S=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let I=S?S[O]:0;(!I||!await(i.isElement==null?void 0:i.isElement(S)))&&(I=a.floating[O]||s.floating[m]);const v=w/2-_/2,x=I/2-p[m]/2-1,P=vr(f[g],x),A=vr(f[C],x),M=P,F=I-p[m]-A,N=I/2-p[m]/2+v,W=Lc(M,N,F),E=!c.arrow&&ao(o)!=null&&N!==W&&s.reference[m]/2-(N<M?P:A)-p[m]/2<0,k=E?N<M?N-M:N-F:0;return{[h]:d[h]+k,data:{[h]:W,centerOffset:N-W-k,...E&&{alignmentOffset:k}},reset:E}}}),SD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:c,elements:u}=t,{mainAxis:l=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:p=!0,...y}=Xn(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const g=Jn(o),C=An(a),O=Jn(a)===a,w=await(c.isRTL==null?void 0:c.isRTL(u.floating)),_=d||(O||!p?[yi(a)]:hD(a)),S=m!=="none";!d&&S&&_.push(...yD(a,p,m,w));const I=[a,..._],v=await c.detectOverflow(t,y),x=[];let P=((r=s.flip)==null?void 0:r.overflows)||[];if(l&&x.push(v[g]),f){const N=dD(o,i,w);x.push(v[N[0]],v[N[1]])}if(P=[...P,{placement:o,overflows:x}],!x.every(N=>N<=0)){var A,M;const N=(((A=s.flip)==null?void 0:A.index)||0)+1,W=I[N];if(W&&(!(f==="alignment"?C!==An(W):!1)||P.every(U=>An(U.placement)===C?U.overflows[0]>0:!0)))return{data:{index:N,overflows:P},reset:{placement:W}};let E=(M=P.filter(k=>k.overflows[0]<=0).sort((k,U)=>k.overflows[1]-U.overflows[1])[0])==null?void 0:M.placement;if(!E)switch(h){case"bestFit":{var F;const k=(F=P.filter(U=>{if(S){const $=An(U.placement);return $===C||$==="y"}return!0}).map(U=>[U.placement,U.overflows.filter($=>$>0).reduce(($,D)=>$+D,0)]).sort((U,$)=>U[1]-$[1])[0])==null?void 0:F[0];k&&(E=k);break}case"initialPlacement":E=a;break}if(o!==E)return{reset:{placement:E}}}return{}}}};function Dp(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ap(e){return cD.some(t=>e[t]>=0)}const kD=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...s}=Xn(e,t);switch(o){case"referenceHidden":{const i=await r.detectOverflow(t,{...s,elementContext:"reference"}),a=Dp(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Ap(a)}}}case"escaped":{const i=await r.detectOverflow(t,{...s,altBoundary:!0}),a=Dp(i,n.floating);return{data:{escapedOffsets:a,escaped:Ap(a)}}}default:return{}}}}},Mp=new Set(["left","top"]);async function xD(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Jn(n),a=ao(n),c=An(n)==="y",u=Mp.has(i)?-1:1,l=s&&c?-1:1,f=Xn(t,e);let{mainAxis:d,crossAxis:h,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof m=="number"&&(h=a==="end"?m*-1:m),c?{x:h*l,y:d*u}:{x:d*u,y:h*l}}const OD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,c=await xD(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:i}}}}},ED=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:s}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:c={fn:g=>{let{x:C,y:O}=g;return{x:C,y:O}}},...u}=Xn(e,t),l={x:n,y:r},f=await s.detectOverflow(t,u),d=An(Jn(o)),h=$c(d);let m=l[h],p=l[d];if(i){const g=h==="y"?"top":"left",C=h==="y"?"bottom":"right",O=m+f[g],w=m-f[C];m=Lc(O,m,w)}if(a){const g=d==="y"?"top":"left",C=d==="y"?"bottom":"right",O=p+f[g],w=p-f[C];p=Lc(O,p,w)}const y=c.fn({...t,[h]:m,[d]:p});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[h]:i,[d]:a}}}}}},CD=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:c=!0,crossAxis:u=!0}=Xn(e,t),l={x:n,y:r},f=An(o),d=$c(f);let h=l[d],m=l[f];const p=Xn(a,t),y=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(c){const O=d==="y"?"height":"width",w=s.reference[d]-s.floating[O]+y.mainAxis,_=s.reference[d]+s.reference[O]-y.mainAxis;h<w?h=w:h>_&&(h=_)}if(u){var g,C;const O=d==="y"?"width":"height",w=Mp.has(Jn(o)),_=s.reference[f]-s.floating[O]+(w&&((g=i.offset)==null?void 0:g[f])||0)+(w?0:y.crossAxis),S=s.reference[f]+s.reference[O]+(w?0:((C=i.offset)==null?void 0:C[f])||0)-(w?y.crossAxis:0);m<_?m=_:m>S&&(m=S)}return{[d]:h,[f]:m}}}},TD=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:i,elements:a}=t,{apply:c=()=>{},...u}=Xn(e,t),l=await i.detectOverflow(t,u),f=Jn(o),d=ao(o),h=An(o)==="y",{width:m,height:p}=s.floating;let y,g;f==="top"||f==="bottom"?(y=f,g=d===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(g=f,y=d==="end"?"top":"bottom");const C=p-l.top-l.bottom,O=m-l.left-l.right,w=vr(p-l[y],C),_=vr(m-l[g],O),S=!t.middlewareData.shift;let I=w,v=_;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(v=O),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(I=C),S&&!d){const P=Gt(l.left,0),A=Gt(l.right,0),M=Gt(l.top,0),F=Gt(l.bottom,0);h?v=m-2*(P!==0||A!==0?P+A:Gt(l.left,l.right)):I=p-2*(M!==0||F!==0?M+F:Gt(l.top,l.bottom))}await c({...t,availableWidth:v,availableHeight:I});const x=await i.getDimensions(a.floating);return m!==x.width||p!==x.height?{reset:{rects:!0}}:{}}}};function bi(){return typeof window<"u"}function co(e){return Pp(e)?(e.nodeName||"").toLowerCase():"#document"}function qt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Mn(e){var t;return(t=(Pp(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Pp(e){return bi()?e instanceof Node||e instanceof qt(e).Node:!1}function mn(e){return bi()?e instanceof Element||e instanceof qt(e).Element:!1}function Pn(e){return bi()?e instanceof HTMLElement||e instanceof qt(e).HTMLElement:!1}function Np(e){return!bi()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof qt(e).ShadowRoot}const DD=new Set(["inline","contents"]);function Jo(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=gn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!DD.has(o)}const AD=new Set(["table","td","th"]);function MD(e){return AD.has(co(e))}const PD=[":popover-open",":modal"];function wi(e){return PD.some(t=>{try{return e.matches(t)}catch{return!1}})}const ND=["transform","translate","scale","rotate","perspective"],ID=["transform","translate","scale","rotate","perspective","filter"],FD=["paint","layout","strict","content"];function Vc(e){const t=Bc(),n=mn(e)?gn(e):e;return ND.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||ID.some(r=>(n.willChange||"").includes(r))||FD.some(r=>(n.contain||"").includes(r))}function RD(e){let t=br(e);for(;Pn(t)&&!lo(t);){if(Vc(t))return t;if(wi(t))return null;t=br(t)}return null}function Bc(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const WD=new Set(["html","body","#document"]);function lo(e){return WD.has(co(e))}function gn(e){return qt(e).getComputedStyle(e)}function _i(e){return mn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function br(e){if(co(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Np(e)&&e.host||Mn(e);return Np(t)?t.host:t}function Ip(e){const t=br(e);return lo(t)?e.ownerDocument?e.ownerDocument.body:e.body:Pn(t)&&Jo(t)?t:Ip(t)}function Qo(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Ip(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=qt(o);if(s){const a=Hc(i);return t.concat(i,i.visualViewport||[],Jo(o)?o:[],a&&n?Qo(a):[])}return t.concat(o,Qo(o,[],n))}function Hc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Fp(e){const t=gn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Pn(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=mi(n)!==s||mi(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function Zc(e){return mn(e)?e:e.contextElement}function uo(e){const t=Zc(e);if(!Pn(t))return Dn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Fp(t);let i=(s?mi(n.width):n.width)/r,a=(s?mi(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const zD=Dn(0);function Rp(e){const t=qt(e);return!Bc()||!t.visualViewport?zD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function LD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==qt(e)?!1:t}function Wr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Zc(e);let i=Dn(1);t&&(r?mn(r)&&(i=uo(r)):i=uo(e));const a=LD(s,n,r)?Rp(s):Dn(0);let c=(o.left+a.x)/i.x,u=(o.top+a.y)/i.y,l=o.width/i.x,f=o.height/i.y;if(s){const d=qt(s),h=r&&mn(r)?qt(r):r;let m=d,p=Hc(m);for(;p&&r&&h!==m;){const y=uo(p),g=p.getBoundingClientRect(),C=gn(p),O=g.left+(p.clientLeft+parseFloat(C.paddingLeft))*y.x,w=g.top+(p.clientTop+parseFloat(C.paddingTop))*y.y;c*=y.x,u*=y.y,l*=y.x,f*=y.y,c+=O,u+=w,m=qt(p),p=Hc(m)}}return vi({width:l,height:f,x:c,y:u})}function Si(e,t){const n=_i(e).scrollLeft;return t?t.left+n:Wr(Mn(e)).left+n}function Wp(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Si(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function $D(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Mn(r),a=t?wi(t.floating):!1;if(r===i||a&&s)return n;let c={scrollLeft:0,scrollTop:0},u=Dn(1);const l=Dn(0),f=Pn(r);if((f||!f&&!s)&&((co(r)!=="body"||Jo(i))&&(c=_i(r)),Pn(r))){const h=Wr(r);u=uo(r),l.x=h.x+r.clientLeft,l.y=h.y+r.clientTop}const d=i&&!f&&!s?Wp(i,c):Dn(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+l.x+d.x,y:n.y*u.y-c.scrollTop*u.y+l.y+d.y}}function UD(e){return Array.from(e.getClientRects())}function YD(e){const t=Mn(e),n=_i(e),r=e.ownerDocument.body,o=Gt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Gt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Si(e);const a=-n.scrollTop;return gn(r).direction==="rtl"&&(i+=Gt(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}const zp=25;function jD(e,t){const n=qt(e),r=Mn(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,c=0;if(o){s=o.width,i=o.height;const l=Bc();(!l||l&&t==="fixed")&&(a=o.offsetLeft,c=o.offsetTop)}const u=Si(r);if(u<=0){const l=r.ownerDocument,f=l.body,d=getComputedStyle(f),h=l.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,m=Math.abs(r.clientWidth-f.clientWidth-h);m<=zp&&(s-=m)}else u<=zp&&(s+=u);return{width:s,height:i,x:a,y:c}}const VD=new Set(["absolute","fixed"]);function BD(e,t){const n=Wr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=Pn(e)?uo(e):Dn(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,c=o*s.x,u=r*s.y;return{width:i,height:a,x:c,y:u}}function Lp(e,t,n){let r;if(t==="viewport")r=jD(e,n);else if(t==="document")r=YD(Mn(e));else if(mn(t))r=BD(t,n);else{const o=Rp(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return vi(r)}function $p(e,t){const n=br(e);return n===t||!mn(n)||lo(n)?!1:gn(n).position==="fixed"||$p(n,t)}function HD(e,t){const n=t.get(e);if(n)return n;let r=Qo(e,[],!1).filter(a=>mn(a)&&co(a)!=="body"),o=null;const s=gn(e).position==="fixed";let i=s?br(e):e;for(;mn(i)&&!lo(i);){const a=gn(i),c=Vc(i);!c&&a.position==="fixed"&&(o=null),(s?!c&&!o:!c&&a.position==="static"&&!!o&&VD.has(o.position)||Jo(i)&&!c&&$p(e,i))?r=r.filter(l=>l!==i):o=a,i=br(i)}return t.set(e,r),r}function ZD(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?wi(t)?[]:HD(t,this._c):[].concat(n),r],a=i[0],c=i.reduce((u,l)=>{const f=Lp(t,l,o);return u.top=Gt(f.top,u.top),u.right=vr(f.right,u.right),u.bottom=vr(f.bottom,u.bottom),u.left=Gt(f.left,u.left),u},Lp(t,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function GD(e){const{width:t,height:n}=Fp(e);return{width:t,height:n}}function qD(e,t,n){const r=Pn(t),o=Mn(t),s=n==="fixed",i=Wr(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const c=Dn(0);function u(){c.x=Si(o)}if(r||!r&&!s)if((co(t)!=="body"||Jo(o))&&(a=_i(t)),r){const h=Wr(t,!0,s,t);c.x=h.x+t.clientLeft,c.y=h.y+t.clientTop}else o&&u();s&&!r&&o&&u();const l=o&&!r&&!s?Wp(o,a):Dn(0),f=i.left+a.scrollLeft-c.x-l.x,d=i.top+a.scrollTop-c.y-l.y;return{x:f,y:d,width:i.width,height:i.height}}function Gc(e){return gn(e).position==="static"}function Up(e,t){if(!Pn(e)||gn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Mn(e)===n&&(n=n.ownerDocument.body),n}function Yp(e,t){const n=qt(e);if(wi(e))return n;if(!Pn(e)){let o=br(e);for(;o&&!lo(o);){if(mn(o)&&!Gc(o))return o;o=br(o)}return n}let r=Up(e,t);for(;r&&MD(r)&&Gc(r);)r=Up(r,t);return r&&lo(r)&&Gc(r)&&!Vc(r)?n:r||RD(e)||n}const KD=async function(e){const t=this.getOffsetParent||Yp,n=this.getDimensions,r=await n(e.floating);return{reference:qD(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function XD(e){return gn(e).direction==="rtl"}const JD={convertOffsetParentRelativeRectToViewportRelativeRect:$D,getDocumentElement:Mn,getClippingRect:ZD,getOffsetParent:Yp,getElementRects:KD,getClientRects:UD,getDimensions:GD,getScale:uo,isElement:mn,isRTL:XD};function jp(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function QD(e,t){let n=null,r;const o=Mn(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const u=e.getBoundingClientRect(),{left:l,top:f,width:d,height:h}=u;if(a||t(),!d||!h)return;const m=gi(f),p=gi(o.clientWidth-(l+d)),y=gi(o.clientHeight-(f+h)),g=gi(l),O={rootMargin:-m+"px "+-p+"px "+-y+"px "+-g+"px",threshold:Gt(0,vr(1,c))||1};let w=!0;function _(S){const I=S[0].intersectionRatio;if(I!==c){if(!w)return i();I?i(!1,I):r=setTimeout(()=>{i(!1,1e-7)},1e3)}I===1&&!jp(u,e.getBoundingClientRect())&&i(),w=!1}try{n=new IntersectionObserver(_,{...O,root:o.ownerDocument})}catch{n=new IntersectionObserver(_,O)}n.observe(e)}return i(!0),s}function eA(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=Zc(e),l=o||s?[...u?Qo(u):[],...Qo(t)]:[];l.forEach(g=>{o&&g.addEventListener("scroll",n,{passive:!0}),s&&g.addEventListener("resize",n)});const f=u&&a?QD(u,n):null;let d=-1,h=null;i&&(h=new ResizeObserver(g=>{let[C]=g;C&&C.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var O;(O=h)==null||O.observe(t)})),n()}),u&&!c&&h.observe(u),h.observe(t));let m,p=c?Wr(e):null;c&&y();function y(){const g=Wr(e);p&&!jp(p,g)&&n(),p=g,m=requestAnimationFrame(y)}return n(),()=>{var g;l.forEach(C=>{o&&C.removeEventListener("scroll",n),s&&C.removeEventListener("resize",n)}),f?.(),(g=h)==null||g.disconnect(),h=null,c&&cancelAnimationFrame(m)}}const tA=OD,nA=ED,rA=SD,oA=TD,sA=kD,Vp=_D,iA=CD,aA=(e,t,n)=>{const r=new Map,o={platform:JD,...n},s={...o.platform,_c:r};return wD(e,t,{...o,platform:s})};var cA=typeof document<"u",lA=function(){},ki=cA?j.useLayoutEffect:lA;function xi(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!xi(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!xi(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Bp(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Hp(e,t){const n=Bp(e);return Math.round(t*n)/n}function qc(e){const t=b.useRef(e);return ki(()=>{t.current=e}),t}function uA(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:c,open:u}=e,[l,f]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,h]=b.useState(r);xi(d,r)||h(r);const[m,p]=b.useState(null),[y,g]=b.useState(null),C=b.useCallback(U=>{U!==S.current&&(S.current=U,p(U))},[]),O=b.useCallback(U=>{U!==I.current&&(I.current=U,g(U))},[]),w=s||m,_=i||y,S=b.useRef(null),I=b.useRef(null),v=b.useRef(l),x=c!=null,P=qc(c),A=qc(o),M=qc(u),F=b.useCallback(()=>{if(!S.current||!I.current)return;const U={placement:t,strategy:n,middleware:d};A.current&&(U.platform=A.current),aA(S.current,I.current,U).then($=>{const D={...$,isPositioned:M.current!==!1};N.current&&!xi(v.current,D)&&(v.current=D,ms.flushSync(()=>{f(D)}))})},[d,t,n,A,M]);ki(()=>{u===!1&&v.current.isPositioned&&(v.current.isPositioned=!1,f(U=>({...U,isPositioned:!1})))},[u]);const N=b.useRef(!1);ki(()=>(N.current=!0,()=>{N.current=!1}),[]),ki(()=>{if(w&&(S.current=w),_&&(I.current=_),w&&_){if(P.current)return P.current(w,_,F);F()}},[w,_,F,P,x]);const W=b.useMemo(()=>({reference:S,floating:I,setReference:C,setFloating:O}),[C,O]),E=b.useMemo(()=>({reference:w,floating:_}),[w,_]),k=b.useMemo(()=>{const U={position:n,left:0,top:0};if(!E.floating)return U;const $=Hp(E.floating,l.x),D=Hp(E.floating,l.y);return a?{...U,transform:"translate("+$+"px, "+D+"px)",...Bp(E.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:$,top:D}},[n,a,E.floating,l.x,l.y]);return b.useMemo(()=>({...l,update:F,refs:W,elements:E,floatingStyles:k}),[l,F,W,E,k])}const fA=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Vp({element:r.current,padding:o}).fn(n):{}:r?Vp({element:r,padding:o}).fn(n):{}}}},dA=(e,t)=>({...tA(e),options:[e,t]}),hA=(e,t)=>({...nA(e),options:[e,t]}),pA=(e,t)=>({...iA(e),options:[e,t]}),mA=(e,t)=>({...rA(e),options:[e,t]}),gA=(e,t)=>({...oA(e),options:[e,t]}),yA=(e,t)=>({...sA(e),options:[e,t]}),vA=(e,t)=>({...fA(e),options:[e,t]});var bA="Arrow",Zp=b.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return T.jsx(Ne.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:T.jsx("polygon",{points:"0,0 30,0 15,10"})})});Zp.displayName=bA;var wA=Zp,Kc="Popper",[Gp,Oi]=Kn(Kc),[_A,qp]=Gp(Kc),Kp=e=>{const{__scopePopper:t,children:n}=e,[r,o]=b.useState(null);return T.jsx(_A,{scope:t,anchor:r,onAnchorChange:o,children:n})};Kp.displayName=Kc;var Xp="PopperAnchor",Jp=b.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=qp(Xp,n),i=b.useRef(null),a=He(t,i),c=b.useRef(null);return b.useEffect(()=>{const u=c.current;c.current=r?.current||i.current,u!==c.current&&s.onAnchorChange(c.current)}),r?null:T.jsx(Ne.div,{...o,ref:a})});Jp.displayName=Xp;var Xc="PopperContent",[SA,kA]=Gp(Xc),Qp=b.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:l=0,sticky:f="partial",hideWhenDetached:d=!1,updatePositionStrategy:h="optimized",onPlaced:m,...p}=e,y=qp(Xc,n),[g,C]=b.useState(null),O=He(t,q=>C(q)),[w,_]=b.useState(null),S=Dc(w),I=S?.width??0,v=S?.height??0,x=r+(s!=="center"?"-"+s:""),P=typeof l=="number"?l:{top:0,right:0,bottom:0,left:0,...l},A=Array.isArray(u)?u:[u],M=A.length>0,F={padding:P,boundary:A.filter(OA),altBoundary:M},{refs:N,floatingStyles:W,placement:E,isPositioned:k,middlewareData:U}=uA({strategy:"fixed",placement:x,whileElementsMounted:(...q)=>eA(...q,{animationFrame:h==="always"}),elements:{reference:y.anchor},middleware:[dA({mainAxis:o+v,alignmentAxis:i}),c&&hA({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?pA():void 0,...F}),c&&mA({...F}),gA({...F,apply:({elements:q,rects:oe,availableWidth:Q,availableHeight:re})=>{const{width:le,height:K}=oe.reference,Se=q.floating.style;Se.setProperty("--radix-popper-available-width",`${Q}px`),Se.setProperty("--radix-popper-available-height",`${re}px`),Se.setProperty("--radix-popper-anchor-width",`${le}px`),Se.setProperty("--radix-popper-anchor-height",`${K}px`)}}),w&&vA({element:w,padding:a}),EA({arrowWidth:I,arrowHeight:v}),d&&yA({strategy:"referenceHidden",...F})]}),[$,D]=nm(E),V=hr(m);At(()=>{k&&V?.()},[k,V]);const Z=U.arrow?.x,G=U.arrow?.y,B=U.arrow?.centerOffset!==0,[z,X]=b.useState();return At(()=>{g&&X(window.getComputedStyle(g).zIndex)},[g]),T.jsx("div",{ref:N.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:k?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:z,"--radix-popper-transform-origin":[U.transformOrigin?.x,U.transformOrigin?.y].join(" "),...U.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:T.jsx(SA,{scope:n,placedSide:$,onArrowChange:_,arrowX:Z,arrowY:G,shouldHideArrow:B,children:T.jsx(Ne.div,{"data-side":$,"data-align":D,...p,ref:O,style:{...p.style,animation:k?void 0:"none"}})})})});Qp.displayName=Xc;var em="PopperArrow",xA={top:"bottom",right:"left",bottom:"top",left:"right"},tm=b.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=kA(em,r),i=xA[s.placedSide];return T.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:T.jsx(wA,{...o,ref:n,style:{...o.style,display:"block"}})})});tm.displayName=em;function OA(e){return e!==null}var EA=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=o.arrow?.centerOffset!==0,a=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[u,l]=nm(n),f={start:"0%",center:"50%",end:"100%"}[l],d=(o.arrow?.x??0)+a/2,h=(o.arrow?.y??0)+c/2;let m="",p="";return u==="bottom"?(m=i?f:`${d}px`,p=`${-c}px`):u==="top"?(m=i?f:`${d}px`,p=`${r.floating.height+c}px`):u==="right"?(m=`${-c}px`,p=i?f:`${h}px`):u==="left"&&(m=`${r.floating.width+c}px`,p=i?f:`${h}px`),{data:{x:m,y:p}}}});function nm(e){const[t,n="center"]=e.split("-");return[t,n]}var rm=Kp,Jc=Jp,om=Qp,sm=tm,CA="Portal",Ei=b.forwardRef((e,t)=>{const{container:n,...r}=e,[o,s]=b.useState(!1);At(()=>s(!0),[]);const i=n||o&&globalThis?.document?.body;return i?Pu.createPortal(T.jsx(Ne.div,{...r,ref:t}),i):null});Ei.displayName=CA;function TA(e){const t=DA(e),n=b.forwardRef((r,o)=>{const{children:s,...i}=r,a=b.Children.toArray(s),c=a.find(MA);if(c){const u=c.props.children,l=a.map(f=>f===c?b.Children.count(u)>1?b.Children.only(null):b.isValidElement(u)?u.props.children:null:f);return T.jsx(t,{...i,ref:o,children:b.isValidElement(u)?b.cloneElement(u,void 0,l):null})}return T.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function DA(e){const t=b.forwardRef((n,r)=>{const{children:o,...s}=n;if(b.isValidElement(o)){const i=NA(o),a=PA(s,o.props);return o.type!==b.Fragment&&(a.ref=r?Nr(r,i):i),b.cloneElement(o,a)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var AA=Symbol("radix.slottable");function MA(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===AA}function PA(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const c=s(...a);return o(...a),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function NA(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var im=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),IA="VisuallyHidden",FA=b.forwardRef((e,t)=>T.jsx(Ne.span,{...e,ref:t,style:{...im,...e.style}}));FA.displayName=IA;var RA=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},fo=new WeakMap,Ci=new WeakMap,Ti={},Qc=0,am=function(e){return e&&(e.host||am(e.parentNode))},WA=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=am(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},zA=function(e,t,n,r){var o=WA(t,Array.isArray(e)?e:[e]);Ti[n]||(Ti[n]=new WeakMap);var s=Ti[n],i=[],a=new Set,c=new Set(o),u=function(f){!f||a.has(f)||(a.add(f),u(f.parentNode))};o.forEach(u);var l=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(d){if(a.has(d))l(d);else try{var h=d.getAttribute(r),m=h!==null&&h!=="false",p=(fo.get(d)||0)+1,y=(s.get(d)||0)+1;fo.set(d,p),s.set(d,y),i.push(d),p===1&&m&&Ci.set(d,!0),y===1&&d.setAttribute(n,"true"),m||d.setAttribute(r,"true")}catch(g){console.error("aria-hidden: cannot operate on ",d,g)}})};return l(t),a.clear(),Qc++,function(){i.forEach(function(f){var d=fo.get(f)-1,h=s.get(f)-1;fo.set(f,d),s.set(f,h),d||(Ci.has(f)||f.removeAttribute(r),Ci.delete(f)),h||f.removeAttribute(n)}),Qc--,Qc||(fo=new WeakMap,fo=new WeakMap,Ci=new WeakMap,Ti={})}},el=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=RA(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),zA(r,o,n,"aria-hidden")):function(){return null}},Nn=function(){return Nn=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Nn.apply(this,arguments)};function cm(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function LA(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Di="right-scroll-bar-position",Ai="width-before-scroll-bar",$A="with-scroll-bars-hidden",UA="--removed-body-scroll-bar-size";function tl(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function YA(e,t){var n=j.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var jA=typeof window<"u"?b.useLayoutEffect:b.useEffect,lm=new WeakMap;function VA(e,t){var n=YA(null,function(r){return e.forEach(function(o){return tl(o,r)})});return jA(function(){var r=lm.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||tl(a,null)}),s.forEach(function(a){o.has(a)||tl(a,i)})}lm.set(n,e)},[e]),n}function BA(e){return e}function HA(e,t){t===void 0&&(t=BA);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var i=t(s,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var c=function(){var l=i;i=[],l.forEach(s)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(l){i.push(l),u()},filter:function(l){return i=i.filter(l),n}}}};return o}function ZA(e){e===void 0&&(e={});var t=HA(null);return t.options=Nn({async:!0,ssr:!1},e),t}var um=function(e){var t=e.sideCar,n=cm(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return b.createElement(r,Nn({},n))};um.isSideCarExport=!0;function GA(e,t){return e.useMedium(t),um}var fm=ZA(),nl=function(){},Mi=b.forwardRef(function(e,t){var n=b.useRef(null),r=b.useState({onScrollCapture:nl,onWheelCapture:nl,onTouchMoveCapture:nl}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,c=e.className,u=e.removeScrollBar,l=e.enabled,f=e.shards,d=e.sideCar,h=e.noRelative,m=e.noIsolation,p=e.inert,y=e.allowPinchZoom,g=e.as,C=g===void 0?"div":g,O=e.gapMode,w=cm(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=d,S=VA([n,t]),I=Nn(Nn({},w),o);return b.createElement(b.Fragment,null,l&&b.createElement(_,{sideCar:fm,removeScrollBar:u,shards:f,noRelative:h,noIsolation:m,inert:p,setCallbacks:s,allowPinchZoom:!!y,lockRef:n,gapMode:O}),i?b.cloneElement(b.Children.only(a),Nn(Nn({},I),{ref:S})):b.createElement(C,Nn({},I,{className:c,ref:S}),a))});Mi.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Mi.classNames={fullWidth:Ai,zeroRight:Di};var qA=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function KA(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=qA();return t&&e.setAttribute("nonce",t),e}function XA(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function JA(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var QA=function(){var e=0,t=null;return{add:function(n){e==0&&(t=KA())&&(XA(t,n),JA(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},eM=function(){var e=QA();return function(t,n){b.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},dm=function(){var e=eM(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},tM={left:0,top:0,right:0,gap:0},rl=function(e){return parseInt(e||"",10)||0},nM=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[rl(n),rl(r),rl(o)]},rM=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return tM;var t=nM(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},oM=dm(),ho="data-scroll-locked",sM=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
44
- .`.concat($A,` {
42
+ `+new Error().stack),n=!1}return t.apply(this,arguments)},t)}var Qf={};function ed(e,t){ce.deprecationHandler!=null&&ce.deprecationHandler(e,t),Qf[e]||(Jf(t),Qf[e]=!0)}ce.suppressDeprecationWarnings=!1,ce.deprecationHandler=null;function On(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function nS(e){var t,n;for(n in e)$e(e,n)&&(t=e[n],On(t)?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function Fa(e,t){var n=ir({},e),r;for(r in t)$e(t,r)&&(Dr(e[r])&&Dr(t[r])?(n[r]={},ir(n[r],e[r]),ir(n[r],t[r])):t[r]!=null?n[r]=t[r]:delete n[r]);for(r in e)$e(e,r)&&!$e(t,r)&&Dr(e[r])&&(n[r]=ir({},n[r]));return n}function Ra(e){e!=null&&this.set(e)}var Wa;Object.keys?Wa=Object.keys:Wa=function(e){var t,n=[];for(t in e)$e(e,t)&&n.push(t);return n};var rS={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function oS(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return On(r)?r.call(t,n):r}function En(e,t,n){var r=""+Math.abs(e),o=t-r.length,s=e>=0;return(s?n?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+r}var za=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Is=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,La={},Jr={};function ge(e,t,n,r){var o=r;typeof r=="string"&&(o=function(){return this[r]()}),e&&(Jr[e]=o),t&&(Jr[t[0]]=function(){return En(o.apply(this,arguments),t[1],t[2])}),n&&(Jr[n]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function sS(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function iS(e){var t=e.match(za),n,r;for(n=0,r=t.length;n<r;n++)Jr[t[n]]?t[n]=Jr[t[n]]:t[n]=sS(t[n]);return function(o){var s="",i;for(i=0;i<r;i++)s+=On(t[i])?t[i].call(o,e):t[i];return s}}function Fs(e,t){return e.isValid()?(t=td(t,e.localeData()),La[t]=La[t]||iS(t),La[t](e)):e.localeData().invalidDate()}function td(e,t){var n=5;function r(o){return t.longDateFormat(o)||o}for(Is.lastIndex=0;n>=0&&Is.test(e);)e=e.replace(Is,r),Is.lastIndex=0,n-=1;return e}var aS={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function cS(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(za).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var lS="Invalid date";function uS(){return this._invalidDate}var fS="%d",dS=/\d{1,2}/;function hS(e){return this._ordinal.replace("%d",e)}var pS={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function mS(e,t,n,r){var o=this._relativeTime[n];return On(o)?o(e,t,n,r):o.replace(/%d/i,e)}function gS(e,t){var n=this._relativeTime[e>0?"future":"past"];return On(n)?n(t):n.replace(/%s/i,t)}var nd={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function rn(e){return typeof e=="string"?nd[e]||nd[e.toLowerCase()]:void 0}function $a(e){var t={},n,r;for(r in e)$e(e,r)&&(n=rn(r),n&&(t[n]=e[r]));return t}var yS={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function vS(e){var t=[],n;for(n in e)$e(e,n)&&t.push({unit:n,priority:yS[n]});return t.sort(function(r,o){return r.priority-o.priority}),t}var rd=/\d/,Zt=/\d\d/,od=/\d{3}/,Ua=/\d{4}/,Rs=/[+-]?\d{6}/,et=/\d\d?/,sd=/\d\d\d\d?/,id=/\d\d\d\d\d\d?/,Ws=/\d{1,3}/,Ya=/\d{1,4}/,zs=/[+-]?\d{1,6}/,Qr=/\d+/,Ls=/[+-]?\d+/,bS=/Z|[+-]\d\d:?\d\d/gi,$s=/Z|[+-]\d\d(?::?\d\d)?/gi,wS=/[+-]?\d+(\.\d{1,3})?/,Ro=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,eo=/^[1-9]\d?/,ja=/^([1-9]\d|\d)/,Us;Us={};function fe(e,t,n){Us[e]=On(t)?t:function(r,o){return r&&n?n:t}}function _S(e,t){return $e(Us,e)?Us[e](t._strict,t._locale):new RegExp(SS(e))}function SS(e){return Un(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,n,r,o,s){return n||r||o||s}))}function Un(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function on(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Fe(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=on(t)),n}var Va={};function qe(e,t){var n,r=t,o;for(typeof e=="string"&&(e=[e]),$n(t)&&(r=function(s,i){i[t]=Fe(s)}),o=e.length,n=0;n<o;n++)Va[e[n]]=r}function Wo(e,t){qe(e,function(n,r,o,s){o._w=o._w||{},t(n,o._w,o,s)})}function kS(e,t,n){t!=null&&$e(Va,e)&&Va[e](t,n._a,n,e)}function Ys(e){return e%4===0&&e%100!==0||e%400===0}var Tt=0,Yn=1,Cn=2,St=3,dn=4,jn=5,Mr=6,xS=7,OS=8;ge("Y",0,0,function(){var e=this.year();return e<=9999?En(e,4):"+"+e}),ge(0,["YY",2],0,function(){return this.year()%100}),ge(0,["YYYY",4],0,"year"),ge(0,["YYYYY",5],0,"year"),ge(0,["YYYYYY",6,!0],0,"year"),fe("Y",Ls),fe("YY",et,Zt),fe("YYYY",Ya,Ua),fe("YYYYY",zs,Rs),fe("YYYYYY",zs,Rs),qe(["YYYYY","YYYYYY"],Tt),qe("YYYY",function(e,t){t[Tt]=e.length===2?ce.parseTwoDigitYear(e):Fe(e)}),qe("YY",function(e,t){t[Tt]=ce.parseTwoDigitYear(e)}),qe("Y",function(e,t){t[Tt]=parseInt(e,10)});function zo(e){return Ys(e)?366:365}ce.parseTwoDigitYear=function(e){return Fe(e)+(Fe(e)>68?1900:2e3)};var ad=to("FullYear",!0);function ES(){return Ys(this.year())}function to(e,t){return function(n){return n!=null?(cd(this,e,n),ce.updateOffset(this,t),this):Lo(this,e)}}function Lo(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function cd(e,t,n){var r,o,s,i,a;if(!(!e.isValid()||isNaN(n))){switch(r=e._d,o=e._isUTC,t){case"Milliseconds":return void(o?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(o?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(o?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(o?r.setUTCHours(n):r.setHours(n));case"Date":return void(o?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}s=n,i=e.month(),a=e.date(),a=a===29&&i===1&&!Ys(s)?28:a,o?r.setUTCFullYear(s,i,a):r.setFullYear(s,i,a)}}function CS(e){return e=rn(e),On(this[e])?this[e]():this}function TS(e,t){if(typeof e=="object"){e=$a(e);var n=vS(e),r,o=n.length;for(r=0;r<o;r++)this[n[r].unit](e[n[r].unit])}else if(e=rn(e),On(this[e]))return this[e](t);return this}function DS(e,t){return(e%t+t)%t}var mt;Array.prototype.indexOf?mt=Array.prototype.indexOf:mt=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function Ba(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=DS(t,12);return e+=(t-n)/12,n===1?Ys(e)?29:28:31-n%7%2}ge("M",["MM",2],"Mo",function(){return this.month()+1}),ge("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),ge("MMMM",0,0,function(e){return this.localeData().months(this,e)}),fe("M",et,eo),fe("MM",et,Zt),fe("MMM",function(e,t){return t.monthsShortRegex(e)}),fe("MMMM",function(e,t){return t.monthsRegex(e)}),qe(["M","MM"],function(e,t){t[Yn]=Fe(e)-1}),qe(["MMM","MMMM"],function(e,t,n,r){var o=n._locale.monthsParse(e,r,n._strict);o!=null?t[Yn]=o:Ce(n).invalidMonth=e});var MS="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ld="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),ud=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,AS=Ro,PS=Ro;function NS(e,t){return e?un(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||ud).test(t)?"format":"standalone"][e.month()]:un(this._months)?this._months:this._months.standalone}function IS(e,t){return e?un(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[ud.test(t)?"format":"standalone"][e.month()]:un(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function FS(e,t,n){var r,o,s,i=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)s=xn([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(s,"").toLocaleLowerCase();return n?t==="MMM"?(o=mt.call(this._shortMonthsParse,i),o!==-1?o:null):(o=mt.call(this._longMonthsParse,i),o!==-1?o:null):t==="MMM"?(o=mt.call(this._shortMonthsParse,i),o!==-1?o:(o=mt.call(this._longMonthsParse,i),o!==-1?o:null)):(o=mt.call(this._longMonthsParse,i),o!==-1?o:(o=mt.call(this._shortMonthsParse,i),o!==-1?o:null))}function RS(e,t,n){var r,o,s;if(this._monthsParseExact)return FS.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(o=xn([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),!n&&!this._monthsParse[r]&&(s="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[r]=new RegExp(s.replace(".",""),"i")),n&&t==="MMMM"&&this._longMonthsParse[r].test(e))return r;if(n&&t==="MMM"&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}}function fd(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=Fe(t);else if(t=e.localeData().monthsParse(t),!$n(t))return e}var n=t,r=e.date();return r=r<29?r:Math.min(r,Ba(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,r):e._d.setMonth(n,r),e}function dd(e){return e!=null?(fd(this,e),ce.updateOffset(this,!0),this):Lo(this,"Month")}function WS(){return Ba(this.year(),this.month())}function zS(e){return this._monthsParseExact?($e(this,"_monthsRegex")||hd.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):($e(this,"_monthsShortRegex")||(this._monthsShortRegex=AS),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function LS(e){return this._monthsParseExact?($e(this,"_monthsRegex")||hd.call(this),e?this._monthsStrictRegex:this._monthsRegex):($e(this,"_monthsRegex")||(this._monthsRegex=PS),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function hd(){function e(c,u){return u.length-c.length}var t=[],n=[],r=[],o,s,i,a;for(o=0;o<12;o++)s=xn([2e3,o]),i=Un(this.monthsShort(s,"")),a=Un(this.months(s,"")),t.push(i),n.push(a),r.push(a),r.push(i);t.sort(e),n.sort(e),r.sort(e),this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function $S(e,t,n,r,o,s,i){var a;return e<100&&e>=0?(a=new Date(e+400,t,n,r,o,s,i),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,n,r,o,s,i),a}function $o(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function js(e,t,n){var r=7+t-n,o=(7+$o(e,0,r).getUTCDay()-t)%7;return-o+r-1}function pd(e,t,n,r,o){var s=(7+n-r)%7,i=js(e,r,o),a=1+7*(t-1)+s+i,c,u;return a<=0?(c=e-1,u=zo(c)+a):a>zo(e)?(c=e+1,u=a-zo(e)):(c=e,u=a),{year:c,dayOfYear:u}}function Uo(e,t,n){var r=js(e.year(),t,n),o=Math.floor((e.dayOfYear()-r-1)/7)+1,s,i;return o<1?(i=e.year()-1,s=o+Vn(i,t,n)):o>Vn(e.year(),t,n)?(s=o-Vn(e.year(),t,n),i=e.year()+1):(i=e.year(),s=o),{week:s,year:i}}function Vn(e,t,n){var r=js(e,t,n),o=js(e+1,t,n);return(zo(e)-r+o)/7}ge("w",["ww",2],"wo","week"),ge("W",["WW",2],"Wo","isoWeek"),fe("w",et,eo),fe("ww",et,Zt),fe("W",et,eo),fe("WW",et,Zt),Wo(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=Fe(e)});function US(e){return Uo(e,this._week.dow,this._week.doy).week}var YS={dow:0,doy:6};function jS(){return this._week.dow}function VS(){return this._week.doy}function BS(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function HS(e){var t=Uo(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}ge("d",0,"do","day"),ge("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),ge("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),ge("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),ge("e",0,0,"weekday"),ge("E",0,0,"isoWeekday"),fe("d",et),fe("e",et),fe("E",et),fe("dd",function(e,t){return t.weekdaysMinRegex(e)}),fe("ddd",function(e,t){return t.weekdaysShortRegex(e)}),fe("dddd",function(e,t){return t.weekdaysRegex(e)}),Wo(["dd","ddd","dddd"],function(e,t,n,r){var o=n._locale.weekdaysParse(e,r,n._strict);o!=null?t.d=o:Ce(n).invalidWeekday=e}),Wo(["d","e","E"],function(e,t,n,r){t[r]=Fe(e)});function ZS(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function GS(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Ha(e,t){return e.slice(t,7).concat(e.slice(0,t))}var qS="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),md="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),KS="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),XS=Ro,JS=Ro,QS=Ro;function ek(e,t){var n=un(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?Ha(n,this._week.dow):e?n[e.day()]:n}function tk(e){return e===!0?Ha(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function nk(e){return e===!0?Ha(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function rk(e,t,n){var r,o,s,i=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)s=xn([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(s,"").toLocaleLowerCase();return n?t==="dddd"?(o=mt.call(this._weekdaysParse,i),o!==-1?o:null):t==="ddd"?(o=mt.call(this._shortWeekdaysParse,i),o!==-1?o:null):(o=mt.call(this._minWeekdaysParse,i),o!==-1?o:null):t==="dddd"?(o=mt.call(this._weekdaysParse,i),o!==-1||(o=mt.call(this._shortWeekdaysParse,i),o!==-1)?o:(o=mt.call(this._minWeekdaysParse,i),o!==-1?o:null)):t==="ddd"?(o=mt.call(this._shortWeekdaysParse,i),o!==-1||(o=mt.call(this._weekdaysParse,i),o!==-1)?o:(o=mt.call(this._minWeekdaysParse,i),o!==-1?o:null)):(o=mt.call(this._minWeekdaysParse,i),o!==-1||(o=mt.call(this._weekdaysParse,i),o!==-1)?o:(o=mt.call(this._shortWeekdaysParse,i),o!==-1?o:null))}function ok(e,t,n){var r,o,s;if(this._weekdaysParseExact)return rk.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(o=xn([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(s="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[r]=new RegExp(s.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function sk(e){if(!this.isValid())return e!=null?this:NaN;var t=Lo(this,"Day");return e!=null?(e=ZS(e,this.localeData()),this.add(e-t,"d")):t}function ik(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function ak(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=GS(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function ck(e){return this._weekdaysParseExact?($e(this,"_weekdaysRegex")||Za.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):($e(this,"_weekdaysRegex")||(this._weekdaysRegex=XS),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function lk(e){return this._weekdaysParseExact?($e(this,"_weekdaysRegex")||Za.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):($e(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=JS),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function uk(e){return this._weekdaysParseExact?($e(this,"_weekdaysRegex")||Za.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):($e(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=QS),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Za(){function e(l,f){return f.length-l.length}var t=[],n=[],r=[],o=[],s,i,a,c,u;for(s=0;s<7;s++)i=xn([2e3,1]).day(s),a=Un(this.weekdaysMin(i,"")),c=Un(this.weekdaysShort(i,"")),u=Un(this.weekdays(i,"")),t.push(a),n.push(c),r.push(u),o.push(a),o.push(c),o.push(u);t.sort(e),n.sort(e),r.sort(e),o.sort(e),this._weekdaysRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Ga(){return this.hours()%12||12}function fk(){return this.hours()||24}ge("H",["HH",2],0,"hour"),ge("h",["hh",2],0,Ga),ge("k",["kk",2],0,fk),ge("hmm",0,0,function(){return""+Ga.apply(this)+En(this.minutes(),2)}),ge("hmmss",0,0,function(){return""+Ga.apply(this)+En(this.minutes(),2)+En(this.seconds(),2)}),ge("Hmm",0,0,function(){return""+this.hours()+En(this.minutes(),2)}),ge("Hmmss",0,0,function(){return""+this.hours()+En(this.minutes(),2)+En(this.seconds(),2)});function gd(e,t){ge(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}gd("a",!0),gd("A",!1);function yd(e,t){return t._meridiemParse}fe("a",yd),fe("A",yd),fe("H",et,ja),fe("h",et,eo),fe("k",et,eo),fe("HH",et,Zt),fe("hh",et,Zt),fe("kk",et,Zt),fe("hmm",sd),fe("hmmss",id),fe("Hmm",sd),fe("Hmmss",id),qe(["H","HH"],St),qe(["k","kk"],function(e,t,n){var r=Fe(e);t[St]=r===24?0:r}),qe(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),qe(["h","hh"],function(e,t,n){t[St]=Fe(e),Ce(n).bigHour=!0}),qe("hmm",function(e,t,n){var r=e.length-2;t[St]=Fe(e.substr(0,r)),t[dn]=Fe(e.substr(r)),Ce(n).bigHour=!0}),qe("hmmss",function(e,t,n){var r=e.length-4,o=e.length-2;t[St]=Fe(e.substr(0,r)),t[dn]=Fe(e.substr(r,2)),t[jn]=Fe(e.substr(o)),Ce(n).bigHour=!0}),qe("Hmm",function(e,t,n){var r=e.length-2;t[St]=Fe(e.substr(0,r)),t[dn]=Fe(e.substr(r))}),qe("Hmmss",function(e,t,n){var r=e.length-4,o=e.length-2;t[St]=Fe(e.substr(0,r)),t[dn]=Fe(e.substr(r,2)),t[jn]=Fe(e.substr(o))});function dk(e){return(e+"").toLowerCase().charAt(0)==="p"}var hk=/[ap]\.?m?\.?/i,pk=to("Hours",!0);function mk(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var vd={calendar:rS,longDateFormat:aS,invalidDate:lS,ordinal:fS,dayOfMonthOrdinalParse:dS,relativeTime:pS,months:MS,monthsShort:ld,week:YS,weekdays:qS,weekdaysMin:KS,weekdaysShort:md,meridiemParse:hk},at={},Yo={},jo;function gk(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function bd(e){return e&&e.toLowerCase().replace("_","-")}function yk(e){for(var t=0,n,r,o,s;t<e.length;){for(s=bd(e[t]).split("-"),n=s.length,r=bd(e[t+1]),r=r?r.split("-"):null;n>0;){if(o=Vs(s.slice(0,n).join("-")),o)return o;if(r&&r.length>=n&&gk(s,r)>=n-1)break;n--}t++}return jo}function vk(e){return!!(e&&e.match("^[^/\\\\]*$"))}function Vs(e){var t=null,n;if(at[e]===void 0&&typeof module<"u"&&module&&module.exports&&vk(e))try{t=jo._abbr,n=require,n("./locale/"+e),ar(t)}catch{at[e]=null}return at[e]}function ar(e,t){var n;return e&&(Ut(t)?n=Bn(e):n=qa(e,t),n?jo=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),jo._abbr}function qa(e,t){if(t!==null){var n,r=vd;if(t.abbr=e,at[e]!=null)ed("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=at[e]._config;else if(t.parentLocale!=null)if(at[t.parentLocale]!=null)r=at[t.parentLocale]._config;else if(n=Vs(t.parentLocale),n!=null)r=n._config;else return Yo[t.parentLocale]||(Yo[t.parentLocale]=[]),Yo[t.parentLocale].push({name:e,config:t}),null;return at[e]=new Ra(Fa(r,t)),Yo[e]&&Yo[e].forEach(function(o){qa(o.name,o.config)}),ar(e),at[e]}else return delete at[e],null}function bk(e,t){if(t!=null){var n,r,o=vd;at[e]!=null&&at[e].parentLocale!=null?at[e].set(Fa(at[e]._config,t)):(r=Vs(e),r!=null&&(o=r._config),t=Fa(o,t),r==null&&(t.abbr=e),n=new Ra(t),n.parentLocale=at[e],at[e]=n),ar(e)}else at[e]!=null&&(at[e].parentLocale!=null?(at[e]=at[e].parentLocale,e===ar()&&ar(e)):at[e]!=null&&delete at[e]);return at[e]}function Bn(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return jo;if(!un(e)){if(t=Vs(e),t)return t;e=[e]}return yk(e)}function wk(){return Wa(at)}function Ka(e){var t,n=e._a;return n&&Ce(e).overflow===-2&&(t=n[Yn]<0||n[Yn]>11?Yn:n[Cn]<1||n[Cn]>Ba(n[Tt],n[Yn])?Cn:n[St]<0||n[St]>24||n[St]===24&&(n[dn]!==0||n[jn]!==0||n[Mr]!==0)?St:n[dn]<0||n[dn]>59?dn:n[jn]<0||n[jn]>59?jn:n[Mr]<0||n[Mr]>999?Mr:-1,Ce(e)._overflowDayOfYear&&(t<Tt||t>Cn)&&(t=Cn),Ce(e)._overflowWeeks&&t===-1&&(t=xS),Ce(e)._overflowWeekday&&t===-1&&(t=OS),Ce(e).overflow=t),e}var _k=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Sk=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,kk=/Z|[+-]\d\d(?::?\d\d)?/,Bs=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Xa=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],xk=/^\/?Date\((-?\d+)/i,Ok=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Ek={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function wd(e){var t,n,r=e._i,o=_k.exec(r)||Sk.exec(r),s,i,a,c,u=Bs.length,l=Xa.length;if(o){for(Ce(e).iso=!0,t=0,n=u;t<n;t++)if(Bs[t][1].exec(o[1])){i=Bs[t][0],s=Bs[t][2]!==!1;break}if(i==null){e._isValid=!1;return}if(o[3]){for(t=0,n=l;t<n;t++)if(Xa[t][1].exec(o[3])){a=(o[2]||" ")+Xa[t][0];break}if(a==null){e._isValid=!1;return}}if(!s&&a!=null){e._isValid=!1;return}if(o[4])if(kk.exec(o[4]))c="Z";else{e._isValid=!1;return}e._f=i+(a||"")+(c||""),Qa(e)}else e._isValid=!1}function Ck(e,t,n,r,o,s){var i=[Tk(e),ld.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(o,10)];return s&&i.push(parseInt(s,10)),i}function Tk(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Dk(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Mk(e,t,n){if(e){var r=md.indexOf(e),o=new Date(t[0],t[1],t[2]).getDay();if(r!==o)return Ce(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}function Ak(e,t,n){if(e)return Ek[e];if(t)return 0;var r=parseInt(n,10),o=r%100,s=(r-o)/100;return s*60+o}function _d(e){var t=Ok.exec(Dk(e._i)),n;if(t){if(n=Ck(t[4],t[3],t[2],t[5],t[6],t[7]),!Mk(t[1],n,e))return;e._a=n,e._tzm=Ak(t[8],t[9],t[10]),e._d=$o.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),Ce(e).rfc2822=!0}else e._isValid=!1}function Pk(e){var t=xk.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(wd(e),e._isValid===!1)delete e._isValid;else return;if(_d(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:ce.createFromInputFallback(e)}ce.createFromInputFallback=nn("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function no(e,t,n){return e??t??n}function Nk(e){var t=new Date(ce.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Ja(e){var t,n,r=[],o,s,i;if(!e._d){for(o=Nk(e),e._w&&e._a[Cn]==null&&e._a[Yn]==null&&Ik(e),e._dayOfYear!=null&&(i=no(e._a[Tt],o[Tt]),(e._dayOfYear>zo(i)||e._dayOfYear===0)&&(Ce(e)._overflowDayOfYear=!0),n=$o(i,0,e._dayOfYear),e._a[Yn]=n.getUTCMonth(),e._a[Cn]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=o[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[St]===24&&e._a[dn]===0&&e._a[jn]===0&&e._a[Mr]===0&&(e._nextDay=!0,e._a[St]=0),e._d=(e._useUTC?$o:$S).apply(null,r),s=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[St]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==s&&(Ce(e).weekdayMismatch=!0)}}function Ik(e){var t,n,r,o,s,i,a,c,u;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(s=1,i=4,n=no(t.GG,e._a[Tt],Uo(tt(),1,4).year),r=no(t.W,1),o=no(t.E,1),(o<1||o>7)&&(c=!0)):(s=e._locale._week.dow,i=e._locale._week.doy,u=Uo(tt(),s,i),n=no(t.gg,e._a[Tt],u.year),r=no(t.w,u.week),t.d!=null?(o=t.d,(o<0||o>6)&&(c=!0)):t.e!=null?(o=t.e+s,(t.e<0||t.e>6)&&(c=!0)):o=s),r<1||r>Vn(n,s,i)?Ce(e)._overflowWeeks=!0:c!=null?Ce(e)._overflowWeekday=!0:(a=pd(n,r,o,s,i),e._a[Tt]=a.year,e._dayOfYear=a.dayOfYear)}ce.ISO_8601=function(){},ce.RFC_2822=function(){};function Qa(e){if(e._f===ce.ISO_8601){wd(e);return}if(e._f===ce.RFC_2822){_d(e);return}e._a=[],Ce(e).empty=!0;var t=""+e._i,n,r,o,s,i,a=t.length,c=0,u,l;for(o=td(e._f,e._locale).match(za)||[],l=o.length,n=0;n<l;n++)s=o[n],r=(t.match(_S(s,e))||[])[0],r&&(i=t.substr(0,t.indexOf(r)),i.length>0&&Ce(e).unusedInput.push(i),t=t.slice(t.indexOf(r)+r.length),c+=r.length),Jr[s]?(r?Ce(e).empty=!1:Ce(e).unusedTokens.push(s),kS(s,r,e)):e._strict&&!r&&Ce(e).unusedTokens.push(s);Ce(e).charsLeftOver=a-c,t.length>0&&Ce(e).unusedInput.push(t),e._a[St]<=12&&Ce(e).bigHour===!0&&e._a[St]>0&&(Ce(e).bigHour=void 0),Ce(e).parsedDateParts=e._a.slice(0),Ce(e).meridiem=e._meridiem,e._a[St]=Fk(e._locale,e._a[St],e._meridiem),u=Ce(e).era,u!==null&&(e._a[Tt]=e._locale.erasConvertYear(u,e._a[Tt])),Ja(e),Ka(e)}function Fk(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function Rk(e){var t,n,r,o,s,i,a=!1,c=e._f.length;if(c===0){Ce(e).invalidFormat=!0,e._d=new Date(NaN);return}for(o=0;o<c;o++)s=0,i=!1,t=Ia({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[o],Qa(t),Pa(t)&&(i=!0),s+=Ce(t).charsLeftOver,s+=Ce(t).unusedTokens.length*10,Ce(t).score=s,a?s<r&&(r=s,n=t):(r==null||s<r||i)&&(r=s,n=t,i&&(a=!0));ir(e,n||t)}function Wk(e){if(!e._d){var t=$a(e._i),n=t.day===void 0?t.date:t.day;e._a=Kf([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],function(r){return r&&parseInt(r,10)}),Ja(e)}}function zk(e){var t=new Fo(Ka(Sd(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Sd(e){var t=e._i,n=e._f;return e._locale=e._locale||Bn(e._l),t===null||n===void 0&&t===""?Ns({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),fn(t)?new Fo(Ka(t)):(Io(t)?e._d=t:un(n)?Rk(e):n?Qa(e):Lk(e),Pa(e)||(e._d=null),e))}function Lk(e){var t=e._i;Ut(t)?e._d=new Date(ce.now()):Io(t)?e._d=new Date(t.valueOf()):typeof t=="string"?Pk(e):un(t)?(e._a=Kf(t.slice(0),function(n){return parseInt(n,10)}),Ja(e)):Dr(t)?Wk(e):$n(t)?e._d=new Date(t):ce.createFromInputFallback(e)}function kd(e,t,n,r,o){var s={};return(t===!0||t===!1)&&(r=t,t=void 0),(n===!0||n===!1)&&(r=n,n=void 0),(Dr(e)&&Ma(e)||un(e)&&e.length===0)&&(e=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=o,s._l=n,s._i=e,s._f=t,s._strict=r,zk(s)}function tt(e,t,n,r){return kd(e,t,n,r,!1)}var $k=nn("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=tt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:Ns()}),Uk=nn("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=tt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:Ns()});function xd(e,t){var n,r;if(t.length===1&&un(t[0])&&(t=t[0]),!t.length)return tt();for(n=t[0],r=1;r<t.length;++r)(!t[r].isValid()||t[r][e](n))&&(n=t[r]);return n}function Yk(){var e=[].slice.call(arguments,0);return xd("isBefore",e)}function jk(){var e=[].slice.call(arguments,0);return xd("isAfter",e)}var Vk=function(){return Date.now?Date.now():+new Date},Vo=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Bk(e){var t,n=!1,r,o=Vo.length;for(t in e)if($e(e,t)&&!(mt.call(Vo,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(r=0;r<o;++r)if(e[Vo[r]]){if(n)return!1;parseFloat(e[Vo[r]])!==Fe(e[Vo[r]])&&(n=!0)}return!0}function Hk(){return this._isValid}function Zk(){return hn(NaN)}function Hs(e){var t=$a(e),n=t.year||0,r=t.quarter||0,o=t.month||0,s=t.week||t.isoWeek||0,i=t.day||0,a=t.hour||0,c=t.minute||0,u=t.second||0,l=t.millisecond||0;this._isValid=Bk(t),this._milliseconds=+l+u*1e3+c*6e4+a*1e3*60*60,this._days=+i+s*7,this._months=+o+r*3+n*12,this._data={},this._locale=Bn(),this._bubble()}function Zs(e){return e instanceof Hs}function ec(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function Gk(e,t,n){var r=Math.min(e.length,t.length),o=Math.abs(e.length-t.length),s=0,i;for(i=0;i<r;i++)Fe(e[i])!==Fe(t[i])&&s++;return s+o}function Od(e,t){ge(e,0,0,function(){var n=this.utcOffset(),r="+";return n<0&&(n=-n,r="-"),r+En(~~(n/60),2)+t+En(~~n%60,2)})}Od("Z",":"),Od("ZZ",""),fe("Z",$s),fe("ZZ",$s),qe(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=tc($s,e)});var qk=/([\+\-]|\d\d)/gi;function tc(e,t){var n=(t||"").match(e),r,o,s;return n===null?null:(r=n[n.length-1]||[],o=(r+"").match(qk)||["-",0,0],s=+(o[1]*60)+Fe(o[2]),s===0?0:o[0]==="+"?s:-s)}function nc(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(fn(e)||Io(e)?e.valueOf():tt(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),ce.updateOffset(n,!1),n):tt(e).local()}function rc(e){return-Math.round(e._d.getTimezoneOffset())}ce.updateOffset=function(){};function Kk(e,t,n){var r=this._offset||0,o;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=tc($s,e),e===null)return this}else Math.abs(e)<16&&!n&&(e=e*60);return!this._isUTC&&t&&(o=rc(this)),this._offset=e,this._isUTC=!0,o!=null&&this.add(o,"m"),r!==e&&(!t||this._changeInProgress?Dd(this,hn(e-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,ce.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?r:rc(this)}function Xk(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function Jk(e){return this.utcOffset(0,e)}function Qk(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(rc(this),"m")),this}function ex(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=tc(bS,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function tx(e){return this.isValid()?(e=e?tt(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function nx(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function rx(){if(!Ut(this._isDSTShifted))return this._isDSTShifted;var e={},t;return Ia(e,this),e=Sd(e),e._a?(t=e._isUTC?xn(e._a):tt(e._a),this._isDSTShifted=this.isValid()&&Gk(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function ox(){return this.isValid()?!this._isUTC:!1}function sx(){return this.isValid()?this._isUTC:!1}function Ed(){return this.isValid()?this._isUTC&&this._offset===0:!1}var ix=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,ax=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function hn(e,t){var n=e,r=null,o,s,i;return Zs(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:$n(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=ix.exec(e))?(o=r[1]==="-"?-1:1,n={y:0,d:Fe(r[Cn])*o,h:Fe(r[St])*o,m:Fe(r[dn])*o,s:Fe(r[jn])*o,ms:Fe(ec(r[Mr]*1e3))*o}):(r=ax.exec(e))?(o=r[1]==="-"?-1:1,n={y:Ar(r[2],o),M:Ar(r[3],o),w:Ar(r[4],o),d:Ar(r[5],o),h:Ar(r[6],o),m:Ar(r[7],o),s:Ar(r[8],o)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(i=cx(tt(n.from),tt(n.to)),n={},n.ms=i.milliseconds,n.M=i.months),s=new Hs(n),Zs(e)&&$e(e,"_locale")&&(s._locale=e._locale),Zs(e)&&$e(e,"_isValid")&&(s._isValid=e._isValid),s}hn.fn=Hs.prototype,hn.invalid=Zk;function Ar(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Cd(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function cx(e,t){var n;return e.isValid()&&t.isValid()?(t=nc(t,e),e.isBefore(t)?n=Cd(e,t):(n=Cd(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Td(e,t){return function(n,r){var o,s;return r!==null&&!isNaN(+r)&&(ed(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=n,n=r,r=s),o=hn(n,r),Dd(this,o,e),this}}function Dd(e,t,n,r){var o=t._milliseconds,s=ec(t._days),i=ec(t._months);e.isValid()&&(r=r??!0,i&&fd(e,Lo(e,"Month")+i*n),s&&cd(e,"Date",Lo(e,"Date")+s*n),o&&e._d.setTime(e._d.valueOf()+o*n),r&&ce.updateOffset(e,s||i))}var lx=Td(1,"add"),ux=Td(-1,"subtract");function Md(e){return typeof e=="string"||e instanceof String}function fx(e){return fn(e)||Io(e)||Md(e)||$n(e)||hx(e)||dx(e)||e===null||e===void 0}function dx(e){var t=Dr(e)&&!Ma(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],o,s,i=r.length;for(o=0;o<i;o+=1)s=r[o],n=n||$e(e,s);return t&&n}function hx(e){var t=un(e),n=!1;return t&&(n=e.filter(function(r){return!$n(r)&&Md(e)}).length===0),t&&n}function px(e){var t=Dr(e)&&!Ma(e),n=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],o,s;for(o=0;o<r.length;o+=1)s=r[o],n=n||$e(e,s);return t&&n}function mx(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function gx(e,t){arguments.length===1&&(arguments[0]?fx(arguments[0])?(e=arguments[0],t=void 0):px(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||tt(),r=nc(n,this).startOf("day"),o=ce.calendarFormat(this,r)||"sameElse",s=t&&(On(t[o])?t[o].call(this,n):t[o]);return this.format(s||this.localeData().calendar(o,this,tt(n)))}function yx(){return new Fo(this)}function vx(e,t){var n=fn(e)?e:tt(e);return this.isValid()&&n.isValid()?(t=rn(t)||"millisecond",t==="millisecond"?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf()):!1}function bx(e,t){var n=fn(e)?e:tt(e);return this.isValid()&&n.isValid()?(t=rn(t)||"millisecond",t==="millisecond"?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf()):!1}function wx(e,t,n,r){var o=fn(e)?e:tt(e),s=fn(t)?t:tt(t);return this.isValid()&&o.isValid()&&s.isValid()?(r=r||"()",(r[0]==="("?this.isAfter(o,n):!this.isBefore(o,n))&&(r[1]===")"?this.isBefore(s,n):!this.isAfter(s,n))):!1}function _x(e,t){var n=fn(e)?e:tt(e),r;return this.isValid()&&n.isValid()?(t=rn(t)||"millisecond",t==="millisecond"?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(t).valueOf()<=r&&r<=this.clone().endOf(t).valueOf())):!1}function Sx(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function kx(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function xx(e,t,n){var r,o,s;if(!this.isValid())return NaN;if(r=nc(e,this),!r.isValid())return NaN;switch(o=(r.utcOffset()-this.utcOffset())*6e4,t=rn(t),t){case"year":s=Gs(this,r)/12;break;case"month":s=Gs(this,r);break;case"quarter":s=Gs(this,r)/3;break;case"second":s=(this-r)/1e3;break;case"minute":s=(this-r)/6e4;break;case"hour":s=(this-r)/36e5;break;case"day":s=(this-r-o)/864e5;break;case"week":s=(this-r-o)/6048e5;break;default:s=this-r}return n?s:on(s)}function Gs(e,t){if(e.date()<t.date())return-Gs(t,e);var n=(t.year()-e.year())*12+(t.month()-e.month()),r=e.clone().add(n,"months"),o,s;return t-r<0?(o=e.clone().add(n-1,"months"),s=(t-r)/(r-o)):(o=e.clone().add(n+1,"months"),s=(t-r)/(o-r)),-(n+s)||0}ce.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",ce.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function Ox(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Ex(e){if(!this.isValid())return null;var t=e!==!0,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?Fs(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):On(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Fs(n,"Z")):Fs(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Cx(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,o,s;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",o="-MM-DD[T]HH:mm:ss.SSS",s=t+'[")]',this.format(n+r+o+s)}function Tx(e){e||(e=this.isUtc()?ce.defaultFormatUtc:ce.defaultFormat);var t=Fs(this,e);return this.localeData().postformat(t)}function Dx(e,t){return this.isValid()&&(fn(e)&&e.isValid()||tt(e).isValid())?hn({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Mx(e){return this.from(tt(),e)}function Ax(e,t){return this.isValid()&&(fn(e)&&e.isValid()||tt(e).isValid())?hn({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Px(e){return this.to(tt(),e)}function Ad(e){var t;return e===void 0?this._locale._abbr:(t=Bn(e),t!=null&&(this._locale=t),this)}var Pd=nn("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function Nd(){return this._locale}var qs=1e3,ro=60*qs,Ks=60*ro,Id=(365*400+97)*24*Ks;function oo(e,t){return(e%t+t)%t}function Fd(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-Id:new Date(e,t,n).valueOf()}function Rd(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-Id:Date.UTC(e,t,n)}function Nx(e){var t,n;if(e=rn(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?Rd:Fd,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=oo(t+(this._isUTC?0:this.utcOffset()*ro),Ks);break;case"minute":t=this._d.valueOf(),t-=oo(t,ro);break;case"second":t=this._d.valueOf(),t-=oo(t,qs);break}return this._d.setTime(t),ce.updateOffset(this,!0),this}function Ix(e){var t,n;if(e=rn(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?Rd:Fd,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=Ks-oo(t+(this._isUTC?0:this.utcOffset()*ro),Ks)-1;break;case"minute":t=this._d.valueOf(),t+=ro-oo(t,ro)-1;break;case"second":t=this._d.valueOf(),t+=qs-oo(t,qs)-1;break}return this._d.setTime(t),ce.updateOffset(this,!0),this}function Fx(){return this._d.valueOf()-(this._offset||0)*6e4}function Rx(){return Math.floor(this.valueOf()/1e3)}function Wx(){return new Date(this.valueOf())}function zx(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Lx(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function $x(){return this.isValid()?this.toISOString():null}function Ux(){return Pa(this)}function Yx(){return ir({},Ce(this))}function jx(){return Ce(this).overflow}function Vx(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}ge("N",0,0,"eraAbbr"),ge("NN",0,0,"eraAbbr"),ge("NNN",0,0,"eraAbbr"),ge("NNNN",0,0,"eraName"),ge("NNNNN",0,0,"eraNarrow"),ge("y",["y",1],"yo","eraYear"),ge("y",["yy",2],0,"eraYear"),ge("y",["yyy",3],0,"eraYear"),ge("y",["yyyy",4],0,"eraYear"),fe("N",oc),fe("NN",oc),fe("NNN",oc),fe("NNNN",tO),fe("NNNNN",nO),qe(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var o=n._locale.erasParse(e,r,n._strict);o?Ce(n).era=o:Ce(n).invalidEra=e}),fe("y",Qr),fe("yy",Qr),fe("yyy",Qr),fe("yyyy",Qr),fe("yo",rO),qe(["y","yy","yyy","yyyy"],Tt),qe(["yo"],function(e,t,n,r){var o;n._locale._eraYearOrdinalRegex&&(o=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Tt]=n._locale.eraYearOrdinalParse(e,o):t[Tt]=parseInt(e,10)});function Bx(e,t){var n,r,o,s=this._eras||Bn("en")._eras;for(n=0,r=s.length;n<r;++n)switch(typeof s[n].since==="string"&&(o=ce(s[n].since).startOf("day"),s[n].since=o.valueOf()),typeof s[n].until){case"undefined":s[n].until=1/0;break;case"string":o=ce(s[n].until).startOf("day").valueOf(),s[n].until=o.valueOf();break}return s}function Hx(e,t,n){var r,o,s=this.eras(),i,a,c;for(e=e.toUpperCase(),r=0,o=s.length;r<o;++r)if(i=s[r].name.toUpperCase(),a=s[r].abbr.toUpperCase(),c=s[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(a===e)return s[r];break;case"NNNN":if(i===e)return s[r];break;case"NNNNN":if(c===e)return s[r];break}else if([i,a,c].indexOf(e)>=0)return s[r]}function Zx(e,t){var n=e.since<=e.until?1:-1;return t===void 0?ce(e.since).year():ce(e.since).year()+(t-e.offset)*n}function Gx(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].name;return""}function qx(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].narrow;return""}function Kx(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].abbr;return""}function Xx(){var e,t,n,r,o=this.localeData().eras();for(e=0,t=o.length;e<t;++e)if(n=o[e].since<=o[e].until?1:-1,r=this.clone().startOf("day").valueOf(),o[e].since<=r&&r<=o[e].until||o[e].until<=r&&r<=o[e].since)return(this.year()-ce(o[e].since).year())*n+o[e].offset;return this.year()}function Jx(e){return $e(this,"_erasNameRegex")||sc.call(this),e?this._erasNameRegex:this._erasRegex}function Qx(e){return $e(this,"_erasAbbrRegex")||sc.call(this),e?this._erasAbbrRegex:this._erasRegex}function eO(e){return $e(this,"_erasNarrowRegex")||sc.call(this),e?this._erasNarrowRegex:this._erasRegex}function oc(e,t){return t.erasAbbrRegex(e)}function tO(e,t){return t.erasNameRegex(e)}function nO(e,t){return t.erasNarrowRegex(e)}function rO(e,t){return t._eraYearOrdinalRegex||Qr}function sc(){var e=[],t=[],n=[],r=[],o,s,i,a,c,u=this.eras();for(o=0,s=u.length;o<s;++o)i=Un(u[o].name),a=Un(u[o].abbr),c=Un(u[o].narrow),t.push(i),e.push(a),n.push(c),r.push(i),r.push(a),r.push(c);this._erasRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}ge(0,["gg",2],0,function(){return this.weekYear()%100}),ge(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Xs(e,t){ge(0,[e,e.length],0,t)}Xs("gggg","weekYear"),Xs("ggggg","weekYear"),Xs("GGGG","isoWeekYear"),Xs("GGGGG","isoWeekYear"),fe("G",Ls),fe("g",Ls),fe("GG",et,Zt),fe("gg",et,Zt),fe("GGGG",Ya,Ua),fe("gggg",Ya,Ua),fe("GGGGG",zs,Rs),fe("ggggg",zs,Rs),Wo(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=Fe(e)}),Wo(["gg","GG"],function(e,t,n,r){t[r]=ce.parseTwoDigitYear(e)});function oO(e){return Wd.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function sO(e){return Wd.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function iO(){return Vn(this.year(),1,4)}function aO(){return Vn(this.isoWeekYear(),1,4)}function cO(){var e=this.localeData()._week;return Vn(this.year(),e.dow,e.doy)}function lO(){var e=this.localeData()._week;return Vn(this.weekYear(),e.dow,e.doy)}function Wd(e,t,n,r,o){var s;return e==null?Uo(this,r,o).year:(s=Vn(e,r,o),t>s&&(t=s),uO.call(this,e,t,n,r,o))}function uO(e,t,n,r,o){var s=pd(e,t,n,r,o),i=$o(s.year,0,s.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}ge("Q",0,"Qo","quarter"),fe("Q",rd),qe("Q",function(e,t){t[Yn]=(Fe(e)-1)*3});function fO(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}ge("D",["DD",2],"Do","date"),fe("D",et,eo),fe("DD",et,Zt),fe("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),qe(["D","DD"],Cn),qe("Do",function(e,t){t[Cn]=Fe(e.match(et)[0])});var zd=to("Date",!0);ge("DDD",["DDDD",3],"DDDo","dayOfYear"),fe("DDD",Ws),fe("DDDD",od),qe(["DDD","DDDD"],function(e,t,n){n._dayOfYear=Fe(e)});function dO(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}ge("m",["mm",2],0,"minute"),fe("m",et,ja),fe("mm",et,Zt),qe(["m","mm"],dn);var hO=to("Minutes",!1);ge("s",["ss",2],0,"second"),fe("s",et,ja),fe("ss",et,Zt),qe(["s","ss"],jn);var pO=to("Seconds",!1);ge("S",0,0,function(){return~~(this.millisecond()/100)}),ge(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),ge(0,["SSS",3],0,"millisecond"),ge(0,["SSSS",4],0,function(){return this.millisecond()*10}),ge(0,["SSSSS",5],0,function(){return this.millisecond()*100}),ge(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),ge(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),ge(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),ge(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),fe("S",Ws,rd),fe("SS",Ws,Zt),fe("SSS",Ws,od);var cr,Ld;for(cr="SSSS";cr.length<=9;cr+="S")fe(cr,Qr);function mO(e,t){t[Mr]=Fe(("0."+e)*1e3)}for(cr="S";cr.length<=9;cr+="S")qe(cr,mO);Ld=to("Milliseconds",!1),ge("z",0,0,"zoneAbbr"),ge("zz",0,0,"zoneName");function gO(){return this._isUTC?"UTC":""}function yO(){return this._isUTC?"Coordinated Universal Time":""}var se=Fo.prototype;se.add=lx,se.calendar=gx,se.clone=yx,se.diff=xx,se.endOf=Ix,se.format=Tx,se.from=Dx,se.fromNow=Mx,se.to=Ax,se.toNow=Px,se.get=CS,se.invalidAt=jx,se.isAfter=vx,se.isBefore=bx,se.isBetween=wx,se.isSame=_x,se.isSameOrAfter=Sx,se.isSameOrBefore=kx,se.isValid=Ux,se.lang=Pd,se.locale=Ad,se.localeData=Nd,se.max=Uk,se.min=$k,se.parsingFlags=Yx,se.set=TS,se.startOf=Nx,se.subtract=ux,se.toArray=zx,se.toObject=Lx,se.toDate=Wx,se.toISOString=Ex,se.inspect=Cx,typeof Symbol<"u"&&Symbol.for!=null&&(se[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),se.toJSON=$x,se.toString=Ox,se.unix=Rx,se.valueOf=Fx,se.creationData=Vx,se.eraName=Gx,se.eraNarrow=qx,se.eraAbbr=Kx,se.eraYear=Xx,se.year=ad,se.isLeapYear=ES,se.weekYear=oO,se.isoWeekYear=sO,se.quarter=se.quarters=fO,se.month=dd,se.daysInMonth=WS,se.week=se.weeks=BS,se.isoWeek=se.isoWeeks=HS,se.weeksInYear=cO,se.weeksInWeekYear=lO,se.isoWeeksInYear=iO,se.isoWeeksInISOWeekYear=aO,se.date=zd,se.day=se.days=sk,se.weekday=ik,se.isoWeekday=ak,se.dayOfYear=dO,se.hour=se.hours=pk,se.minute=se.minutes=hO,se.second=se.seconds=pO,se.millisecond=se.milliseconds=Ld,se.utcOffset=Kk,se.utc=Jk,se.local=Qk,se.parseZone=ex,se.hasAlignedHourOffset=tx,se.isDST=nx,se.isLocal=ox,se.isUtcOffset=sx,se.isUtc=Ed,se.isUTC=Ed,se.zoneAbbr=gO,se.zoneName=yO,se.dates=nn("dates accessor is deprecated. Use date instead.",zd),se.months=nn("months accessor is deprecated. Use month instead",dd),se.years=nn("years accessor is deprecated. Use year instead",ad),se.zone=nn("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Xk),se.isDSTShifted=nn("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",rx);function vO(e){return tt(e*1e3)}function bO(){return tt.apply(null,arguments).parseZone()}function $d(e){return e}var Ue=Ra.prototype;Ue.calendar=oS,Ue.longDateFormat=cS,Ue.invalidDate=uS,Ue.ordinal=hS,Ue.preparse=$d,Ue.postformat=$d,Ue.relativeTime=mS,Ue.pastFuture=gS,Ue.set=nS,Ue.eras=Bx,Ue.erasParse=Hx,Ue.erasConvertYear=Zx,Ue.erasAbbrRegex=Qx,Ue.erasNameRegex=Jx,Ue.erasNarrowRegex=eO,Ue.months=NS,Ue.monthsShort=IS,Ue.monthsParse=RS,Ue.monthsRegex=LS,Ue.monthsShortRegex=zS,Ue.week=US,Ue.firstDayOfYear=VS,Ue.firstDayOfWeek=jS,Ue.weekdays=ek,Ue.weekdaysMin=nk,Ue.weekdaysShort=tk,Ue.weekdaysParse=ok,Ue.weekdaysRegex=ck,Ue.weekdaysShortRegex=lk,Ue.weekdaysMinRegex=uk,Ue.isPM=dk,Ue.meridiem=mk;function Js(e,t,n,r){var o=Bn(),s=xn().set(r,t);return o[n](s,e)}function Ud(e,t,n){if($n(e)&&(t=e,e=void 0),e=e||"",t!=null)return Js(e,t,n,"month");var r,o=[];for(r=0;r<12;r++)o[r]=Js(e,r,n,"month");return o}function ic(e,t,n,r){typeof e=="boolean"?($n(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,$n(t)&&(n=t,t=void 0),t=t||"");var o=Bn(),s=e?o._week.dow:0,i,a=[];if(n!=null)return Js(t,(n+s)%7,r,"day");for(i=0;i<7;i++)a[i]=Js(t,(i+s)%7,r,"day");return a}function wO(e,t){return Ud(e,t,"months")}function _O(e,t){return Ud(e,t,"monthsShort")}function SO(e,t,n){return ic(e,t,n,"weekdays")}function kO(e,t,n){return ic(e,t,n,"weekdaysShort")}function xO(e,t,n){return ic(e,t,n,"weekdaysMin")}ar("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=Fe(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}}),ce.lang=nn("moment.lang is deprecated. Use moment.locale instead.",ar),ce.langData=nn("moment.langData is deprecated. Use moment.localeData instead.",Bn);var Hn=Math.abs;function OO(){var e=this._data;return this._milliseconds=Hn(this._milliseconds),this._days=Hn(this._days),this._months=Hn(this._months),e.milliseconds=Hn(e.milliseconds),e.seconds=Hn(e.seconds),e.minutes=Hn(e.minutes),e.hours=Hn(e.hours),e.months=Hn(e.months),e.years=Hn(e.years),this}function Yd(e,t,n,r){var o=hn(t,n);return e._milliseconds+=r*o._milliseconds,e._days+=r*o._days,e._months+=r*o._months,e._bubble()}function EO(e,t){return Yd(this,e,t,1)}function CO(e,t){return Yd(this,e,t,-1)}function jd(e){return e<0?Math.floor(e):Math.ceil(e)}function TO(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,o,s,i,a,c;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=jd(ac(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,o=on(e/1e3),r.seconds=o%60,s=on(o/60),r.minutes=s%60,i=on(s/60),r.hours=i%24,t+=on(i/24),c=on(Vd(t)),n+=c,t-=jd(ac(c)),a=on(n/12),n%=12,r.days=t,r.months=n,r.years=a,this}function Vd(e){return e*4800/146097}function ac(e){return e*146097/4800}function DO(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=rn(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+Vd(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(ac(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function Zn(e){return function(){return this.as(e)}}var Bd=Zn("ms"),MO=Zn("s"),AO=Zn("m"),PO=Zn("h"),NO=Zn("d"),IO=Zn("w"),FO=Zn("M"),RO=Zn("Q"),WO=Zn("y"),zO=Bd;function LO(){return hn(this)}function $O(e){return e=rn(e),this.isValid()?this[e+"s"]():NaN}function Pr(e){return function(){return this.isValid()?this._data[e]:NaN}}var UO=Pr("milliseconds"),YO=Pr("seconds"),jO=Pr("minutes"),VO=Pr("hours"),BO=Pr("days"),HO=Pr("months"),ZO=Pr("years");function GO(){return on(this.days()/7)}var Gn=Math.round,so={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function qO(e,t,n,r,o){return o.relativeTime(t||1,!!n,e,r)}function KO(e,t,n,r){var o=hn(e).abs(),s=Gn(o.as("s")),i=Gn(o.as("m")),a=Gn(o.as("h")),c=Gn(o.as("d")),u=Gn(o.as("M")),l=Gn(o.as("w")),f=Gn(o.as("y")),d=s<=n.ss&&["s",s]||s<n.s&&["ss",s]||i<=1&&["m"]||i<n.m&&["mm",i]||a<=1&&["h"]||a<n.h&&["hh",a]||c<=1&&["d"]||c<n.d&&["dd",c];return n.w!=null&&(d=d||l<=1&&["w"]||l<n.w&&["ww",l]),d=d||u<=1&&["M"]||u<n.M&&["MM",u]||f<=1&&["y"]||["yy",f],d[2]=t,d[3]=+e>0,d[4]=r,qO.apply(null,d)}function XO(e){return e===void 0?Gn:typeof e=="function"?(Gn=e,!0):!1}function JO(e,t){return so[e]===void 0?!1:t===void 0?so[e]:(so[e]=t,e==="s"&&(so.ss=t-1),!0)}function QO(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=so,o,s;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},so,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),o=this.localeData(),s=KO(this,!n,r,o),n&&(s=o.pastFuture(+this,s)),o.postformat(s)}var cc=Math.abs;function io(e){return(e>0)-(e<0)||+e}function Qs(){if(!this.isValid())return this.localeData().invalidDate();var e=cc(this._milliseconds)/1e3,t=cc(this._days),n=cc(this._months),r,o,s,i,a=this.asSeconds(),c,u,l,f;return a?(r=on(e/60),o=on(r/60),e%=60,r%=60,s=on(n/12),n%=12,i=e?e.toFixed(3).replace(/\.?0+$/,""):"",c=a<0?"-":"",u=io(this._months)!==io(a)?"-":"",l=io(this._days)!==io(a)?"-":"",f=io(this._milliseconds)!==io(a)?"-":"",c+"P"+(s?u+s+"Y":"")+(n?u+n+"M":"")+(t?l+t+"D":"")+(o||r||e?"T":"")+(o?f+o+"H":"")+(r?f+r+"M":"")+(e?f+i+"S":"")):"P0D"}var Le=Hs.prototype;Le.isValid=Hk,Le.abs=OO,Le.add=EO,Le.subtract=CO,Le.as=DO,Le.asMilliseconds=Bd,Le.asSeconds=MO,Le.asMinutes=AO,Le.asHours=PO,Le.asDays=NO,Le.asWeeks=IO,Le.asMonths=FO,Le.asQuarters=RO,Le.asYears=WO,Le.valueOf=zO,Le._bubble=TO,Le.clone=LO,Le.get=$O,Le.milliseconds=UO,Le.seconds=YO,Le.minutes=jO,Le.hours=VO,Le.days=BO,Le.weeks=GO,Le.months=HO,Le.years=ZO,Le.humanize=QO,Le.toISOString=Qs,Le.toString=Qs,Le.toJSON=Qs,Le.locale=Ad,Le.localeData=Nd,Le.toIsoString=nn("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Qs),Le.lang=Pd,ge("X",0,0,"unix"),ge("x",0,0,"valueOf"),fe("x",Ls),fe("X",wS),qe("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)}),qe("x",function(e,t,n){n._d=new Date(Fe(e))});ce.version="2.30.1",eS(tt),ce.fn=se,ce.min=Yk,ce.max=jk,ce.now=Vk,ce.utc=xn,ce.unix=vO,ce.months=wO,ce.isDate=Io,ce.locale=ar,ce.invalid=Ns,ce.duration=hn,ce.isMoment=fn,ce.weekdays=SO,ce.parseZone=bO,ce.localeData=Bn,ce.isDuration=Zs,ce.monthsShort=_O,ce.weekdaysMin=xO,ce.defineLocale=qa,ce.updateLocale=bk,ce.locales=wk,ce.weekdaysShort=kO,ce.normalizeUnits=rn,ce.relativeTimeRounding=XO,ce.relativeTimeThreshold=JO,ce.calendarFormat=mx,ce.prototype=se,ce.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const Hd=(e,t,n)=>{if(e&&"reportValidity"in e){const r=ae(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},lc=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?Hd(r.ref,n,e):r&&r.refs&&r.refs.forEach(o=>Hd(o,n,e))}},Zd=(e,t)=>{t.shouldUseNativeValidation&&lc(e,t);const n={};for(const r in e){const o=ae(t.fields,r),s=Object.assign(e[r]||{},{ref:o&&o.ref});if(eE(t.names||Object.keys(e),r)){const i=Object.assign({},ae(n,r));Ve(i,"root",s),Ve(n,r,i)}else Ve(n,r,s)}return n},eE=(e,t)=>{const n=Gd(t);return e.some(r=>Gd(r).match(`^${n}\\.\\d+`))};function Gd(e){return e.replace(/\]|\[/g,"")}function qd(e,t){try{var n=e()}catch(r){return t(r)}return n&&n.then?n.then(void 0,t):n}function tE(e,t){for(var n={};e.length;){var r=e[0],o=r.code,s=r.message,i=r.path.join(".");if(!n[i])if("unionErrors"in r){var a=r.unionErrors[0].errors[0];n[i]={message:a.message,type:a.code}}else n[i]={message:s,type:o};if("unionErrors"in r&&r.unionErrors.forEach(function(l){return l.errors.forEach(function(f){return e.push(f)})}),t){var c=n[i].types,u=c&&c[r.code];n[i]=ga(i,t,n,o,u?[].concat(u,r.message):r.message)}e.shift()}return n}function nE(e,t){for(var n={};e.length;){var r=e[0],o=r.code,s=r.message,i=r.path.join(".");if(!n[i])if(r.code==="invalid_union"&&r.errors.length>0){var a=r.errors[0][0];n[i]={message:a.message,type:a.code}}else n[i]={message:s,type:o};if(r.code==="invalid_union"&&r.errors.forEach(function(l){return l.forEach(function(f){return e.push(f)})}),t){var c=n[i].types,u=c&&c[r.code];n[i]=ga(i,t,n,o,u?[].concat(u,r.message):r.message)}e.shift()}return n}function rE(e,t,n){if(n===void 0&&(n={}),(function(r){return"_def"in r&&typeof r._def=="object"&&"typeName"in r._def})(e))return function(r,o,s){try{return Promise.resolve(qd(function(){return Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(i){return s.shouldUseNativeValidation&&lc({},s),{errors:{},values:n.raw?Object.assign({},r):i}})},function(i){if((function(a){return Array.isArray(a?.issues)})(i))return{values:{},errors:Zd(tE(i.errors,!s.shouldUseNativeValidation&&s.criteriaMode==="all"),s)};throw i}))}catch(i){return Promise.reject(i)}};if((function(r){return"_zod"in r&&typeof r._zod=="object"})(e))return function(r,o,s){try{return Promise.resolve(qd(function(){return Promise.resolve((n.mode==="sync"?Pb:Nb)(e,r,t)).then(function(i){return s.shouldUseNativeValidation&&lc({},s),{errors:{},values:n.raw?Object.assign({},r):i}})},function(i){if((function(a){return a instanceof Ea})(i))return{values:{},errors:Zd(nE(i.issues,!s.shouldUseNativeValidation&&s.criteriaMode==="all"),s)};throw i}))}catch(i){return Promise.reject(i)}};throw new Error("Invalid input: not a Zod schema")}const{entries:Kd,setPrototypeOf:Xd,isFrozen:oE,getPrototypeOf:sE,getOwnPropertyDescriptor:iE}=Object;let{freeze:Wt,seal:sn,create:uc}=Object,{apply:fc,construct:dc}=typeof Reflect<"u"&&Reflect;Wt||(Wt=function(t){return t}),sn||(sn=function(t){return t}),fc||(fc=function(t,n){for(var r=arguments.length,o=new Array(r>2?r-2:0),s=2;s<r;s++)o[s-2]=arguments[s];return t.apply(n,o)}),dc||(dc=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return new t(...r)});const ei=Lt(Array.prototype.forEach),aE=Lt(Array.prototype.lastIndexOf),Jd=Lt(Array.prototype.pop),Bo=Lt(Array.prototype.push),cE=Lt(Array.prototype.splice),ti=Lt(String.prototype.toLowerCase),hc=Lt(String.prototype.toString),pc=Lt(String.prototype.match),Ho=Lt(String.prototype.replace),lE=Lt(String.prototype.indexOf),uE=Lt(String.prototype.trim),pn=Lt(Object.prototype.hasOwnProperty),zt=Lt(RegExp.prototype.test),Zo=fE(TypeError);function Lt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return fc(e,t,r)}}function fE(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return dc(e,n)}}function Pe(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ti;Xd&&Xd(e,null);let r=t.length;for(;r--;){let o=t[r];if(typeof o=="string"){const s=n(o);s!==o&&(oE(t)||(t[r]=s),o=s)}e[o]=!0}return e}function dE(e){for(let t=0;t<e.length;t++)pn(e,t)||(e[t]=null);return e}function Tn(e){const t=uc(null);for(const[n,r]of Kd(e))pn(e,n)&&(Array.isArray(r)?t[n]=dE(r):r&&typeof r=="object"&&r.constructor===Object?t[n]=Tn(r):t[n]=r);return t}function Go(e,t){for(;e!==null;){const r=iE(e,t);if(r){if(r.get)return Lt(r.get);if(typeof r.value=="function")return Lt(r.value)}e=sE(e)}function n(){return null}return n}const Qd=Wt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),mc=Wt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),gc=Wt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),hE=Wt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),yc=Wt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),pE=Wt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),eh=Wt(["#text"]),th=Wt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),vc=Wt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),nh=Wt(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ni=Wt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),mE=sn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),gE=sn(/<%[\w\W]*|[\w\W]*%>/gm),yE=sn(/\$\{[\w\W]*/gm),vE=sn(/^data-[\-\w.\u00B7-\uFFFF]+$/),bE=sn(/^aria-[\-\w]+$/),rh=sn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),wE=sn(/^(?:\w+script|data):/i),_E=sn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),oh=sn(/^html$/i),SE=sn(/^[a-z][.\w]*(-[.\w]+)+$/i);var sh=Object.freeze({__proto__:null,ARIA_ATTR:bE,ATTR_WHITESPACE:_E,CUSTOM_ELEMENT:SE,DATA_ATTR:vE,DOCTYPE_NAME:oh,ERB_EXPR:gE,IS_ALLOWED_URI:rh,IS_SCRIPT_OR_DATA:wE,MUSTACHE_EXPR:mE,TMPLIT_EXPR:yE});const qo={element:1,text:3,progressingInstruction:7,comment:8,document:9},kE=function(){return typeof window>"u"?null:window},xE=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const o="data-tt-policy-suffix";n&&n.hasAttribute(o)&&(r=n.getAttribute(o));const s="dompurify"+(r?"#"+r:"");try{return t.createPolicy(s,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},ih=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function ah(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:kE();const t=ye=>ah(ye);if(t.version="3.3.1",t.removed=[],!e||!e.document||e.document.nodeType!==qo.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e;const r=n,o=r.currentScript,{DocumentFragment:s,HTMLTemplateElement:i,Node:a,Element:c,NodeFilter:u,NamedNodeMap:l=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:f,DOMParser:d,trustedTypes:h}=e,m=c.prototype,p=Go(m,"cloneNode"),y=Go(m,"remove"),g=Go(m,"nextSibling"),C=Go(m,"childNodes"),O=Go(m,"parentNode");if(typeof i=="function"){const ye=n.createElement("template");ye.content&&ye.content.ownerDocument&&(n=ye.content.ownerDocument)}let w,_="";const{implementation:S,createNodeIterator:I,createDocumentFragment:v,getElementsByTagName:x}=n,{importNode:P}=r;let M=ih();t.isSupported=typeof Kd=="function"&&typeof O=="function"&&S&&S.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:A,ERB_EXPR:F,TMPLIT_EXPR:N,DATA_ATTR:W,ARIA_ATTR:E,IS_SCRIPT_OR_DATA:k,ATTR_WHITESPACE:U,CUSTOM_ELEMENT:$}=sh;let{IS_ALLOWED_URI:D}=sh,V=null;const Z=Pe({},[...Qd,...mc,...gc,...yc,...eh]);let G=null;const B=Pe({},[...th,...vc,...nh,...ni]);let z=Object.seal(uc(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),X=null,q=null;const oe=Object.seal(uc(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Q=!0,re=!0,le=!1,K=!0,Se=!1,Ie=!0,ke=!1,Ge=!1,Re=!1,We=!1,nt=!1,rt=!1,R=!0,Y=!1;const H="user-content-";let ee=!0,te=!1,ne={},ue=null;const be=Pe({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Oe=null;const ze=Pe({},["audio","video","img","source","image","track"]);let ot=null;const Qe=Pe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),xt="http://www.w3.org/1998/Math/MathML",gt="http://www.w3.org/2000/svg",dt="http://www.w3.org/1999/xhtml";let jt=dt,Sn=!1,kn=null;const _e=Pe({},[xt,gt,dt],hc);let De=Pe({},["mi","mo","mn","ms","mtext"]),ve=Pe({},["annotation-xml"]);const Ee=Pe({},["title","style","font","a","script"]);let Xe=null;const xe=["application/xhtml+xml","text/html"],tr="text/html";let ct=null,Pt=null;const Qt=n.createElement("form"),Oo=function(L){return L instanceof RegExp||L instanceof Function},Du=function(){let L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Pt&&Pt===L)){if((!L||typeof L!="object")&&(L={}),L=Tn(L),Xe=xe.indexOf(L.PARSER_MEDIA_TYPE)===-1?tr:L.PARSER_MEDIA_TYPE,ct=Xe==="application/xhtml+xml"?hc:ti,V=pn(L,"ALLOWED_TAGS")?Pe({},L.ALLOWED_TAGS,ct):Z,G=pn(L,"ALLOWED_ATTR")?Pe({},L.ALLOWED_ATTR,ct):B,kn=pn(L,"ALLOWED_NAMESPACES")?Pe({},L.ALLOWED_NAMESPACES,hc):_e,ot=pn(L,"ADD_URI_SAFE_ATTR")?Pe(Tn(Qe),L.ADD_URI_SAFE_ATTR,ct):Qe,Oe=pn(L,"ADD_DATA_URI_TAGS")?Pe(Tn(ze),L.ADD_DATA_URI_TAGS,ct):ze,ue=pn(L,"FORBID_CONTENTS")?Pe({},L.FORBID_CONTENTS,ct):be,X=pn(L,"FORBID_TAGS")?Pe({},L.FORBID_TAGS,ct):Tn({}),q=pn(L,"FORBID_ATTR")?Pe({},L.FORBID_ATTR,ct):Tn({}),ne=pn(L,"USE_PROFILES")?L.USE_PROFILES:!1,Q=L.ALLOW_ARIA_ATTR!==!1,re=L.ALLOW_DATA_ATTR!==!1,le=L.ALLOW_UNKNOWN_PROTOCOLS||!1,K=L.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Se=L.SAFE_FOR_TEMPLATES||!1,Ie=L.SAFE_FOR_XML!==!1,ke=L.WHOLE_DOCUMENT||!1,We=L.RETURN_DOM||!1,nt=L.RETURN_DOM_FRAGMENT||!1,rt=L.RETURN_TRUSTED_TYPE||!1,Re=L.FORCE_BODY||!1,R=L.SANITIZE_DOM!==!1,Y=L.SANITIZE_NAMED_PROPS||!1,ee=L.KEEP_CONTENT!==!1,te=L.IN_PLACE||!1,D=L.ALLOWED_URI_REGEXP||rh,jt=L.NAMESPACE||dt,De=L.MATHML_TEXT_INTEGRATION_POINTS||De,ve=L.HTML_INTEGRATION_POINTS||ve,z=L.CUSTOM_ELEMENT_HANDLING||{},L.CUSTOM_ELEMENT_HANDLING&&Oo(L.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(z.tagNameCheck=L.CUSTOM_ELEMENT_HANDLING.tagNameCheck),L.CUSTOM_ELEMENT_HANDLING&&Oo(L.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(z.attributeNameCheck=L.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),L.CUSTOM_ELEMENT_HANDLING&&typeof L.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(z.allowCustomizedBuiltInElements=L.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Se&&(re=!1),nt&&(We=!0),ne&&(V=Pe({},eh),G=[],ne.html===!0&&(Pe(V,Qd),Pe(G,th)),ne.svg===!0&&(Pe(V,mc),Pe(G,vc),Pe(G,ni)),ne.svgFilters===!0&&(Pe(V,gc),Pe(G,vc),Pe(G,ni)),ne.mathMl===!0&&(Pe(V,yc),Pe(G,nh),Pe(G,ni))),L.ADD_TAGS&&(typeof L.ADD_TAGS=="function"?oe.tagCheck=L.ADD_TAGS:(V===Z&&(V=Tn(V)),Pe(V,L.ADD_TAGS,ct))),L.ADD_ATTR&&(typeof L.ADD_ATTR=="function"?oe.attributeCheck=L.ADD_ATTR:(G===B&&(G=Tn(G)),Pe(G,L.ADD_ATTR,ct))),L.ADD_URI_SAFE_ATTR&&Pe(ot,L.ADD_URI_SAFE_ATTR,ct),L.FORBID_CONTENTS&&(ue===be&&(ue=Tn(ue)),Pe(ue,L.FORBID_CONTENTS,ct)),L.ADD_FORBID_CONTENTS&&(ue===be&&(ue=Tn(ue)),Pe(ue,L.ADD_FORBID_CONTENTS,ct)),ee&&(V["#text"]=!0),ke&&Pe(V,["html","head","body"]),V.table&&(Pe(V,["tbody"]),delete X.tbody),L.TRUSTED_TYPES_POLICY){if(typeof L.TRUSTED_TYPES_POLICY.createHTML!="function")throw Zo('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof L.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Zo('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=L.TRUSTED_TYPES_POLICY,_=w.createHTML("")}else w===void 0&&(w=xE(h,o)),w!==null&&typeof _=="string"&&(_=w.createHTML(""));Wt&&Wt(L),Pt=L}},zv=Pe({},[...mc,...gc,...hE]),Lv=Pe({},[...yc,...pE]),aR=function(L){let ie=O(L);(!ie||!ie.tagName)&&(ie={namespaceURI:jt,tagName:"template"});const pe=ti(L.tagName),lt=ti(ie.tagName);return kn[L.namespaceURI]?L.namespaceURI===gt?ie.namespaceURI===dt?pe==="svg":ie.namespaceURI===xt?pe==="svg"&&(lt==="annotation-xml"||De[lt]):!!zv[pe]:L.namespaceURI===xt?ie.namespaceURI===dt?pe==="math":ie.namespaceURI===gt?pe==="math"&&ve[lt]:!!Lv[pe]:L.namespaceURI===dt?ie.namespaceURI===gt&&!ve[lt]||ie.namespaceURI===xt&&!De[lt]?!1:!Lv[pe]&&(Ee[pe]||!zv[pe]):!!(Xe==="application/xhtml+xml"&&kn[L.namespaceURI]):!1},zn=function(L){Bo(t.removed,{element:L});try{O(L).removeChild(L)}catch{y(L)}},Br=function(L,ie){try{Bo(t.removed,{attribute:ie.getAttributeNode(L),from:ie})}catch{Bo(t.removed,{attribute:null,from:ie})}if(ie.removeAttribute(L),L==="is")if(We||nt)try{zn(ie)}catch{}else try{ie.setAttribute(L,"")}catch{}},$v=function(L){let ie=null,pe=null;if(Re)L="<remove></remove>"+L;else{const _t=pc(L,/^[\r\n\t ]+/);pe=_t&&_t[0]}Xe==="application/xhtml+xml"&&jt===dt&&(L='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+L+"</body></html>");const lt=w?w.createHTML(L):L;if(jt===dt)try{ie=new d().parseFromString(lt,Xe)}catch{}if(!ie||!ie.documentElement){ie=S.createDocument(jt,"template",null);try{ie.documentElement.innerHTML=Sn?_:lt}catch{}}const Nt=ie.body||ie.documentElement;return L&&pe&&Nt.insertBefore(n.createTextNode(pe),Nt.childNodes[0]||null),jt===dt?x.call(ie,ke?"html":"body")[0]:ke?ie.documentElement:Nt},Uv=function(L){return I.call(L.ownerDocument||L,L,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Mu=function(L){return L instanceof f&&(typeof L.nodeName!="string"||typeof L.textContent!="string"||typeof L.removeChild!="function"||!(L.attributes instanceof l)||typeof L.removeAttribute!="function"||typeof L.setAttribute!="function"||typeof L.namespaceURI!="string"||typeof L.insertBefore!="function"||typeof L.hasChildNodes!="function")},Yv=function(L){return typeof a=="function"&&L instanceof a};function nr(ye,L,ie){ei(ye,pe=>{pe.call(t,L,ie,Pt)})}const jv=function(L){let ie=null;if(nr(M.beforeSanitizeElements,L,null),Mu(L))return zn(L),!0;const pe=ct(L.nodeName);if(nr(M.uponSanitizeElement,L,{tagName:pe,allowedTags:V}),Ie&&L.hasChildNodes()&&!Yv(L.firstElementChild)&&zt(/<[/\w!]/g,L.innerHTML)&&zt(/<[/\w!]/g,L.textContent)||L.nodeType===qo.progressingInstruction||Ie&&L.nodeType===qo.comment&&zt(/<[/\w]/g,L.data))return zn(L),!0;if(!(oe.tagCheck instanceof Function&&oe.tagCheck(pe))&&(!V[pe]||X[pe])){if(!X[pe]&&Bv(pe)&&(z.tagNameCheck instanceof RegExp&&zt(z.tagNameCheck,pe)||z.tagNameCheck instanceof Function&&z.tagNameCheck(pe)))return!1;if(ee&&!ue[pe]){const lt=O(L)||L.parentNode,Nt=C(L)||L.childNodes;if(Nt&&lt){const _t=Nt.length;for(let Vt=_t-1;Vt>=0;--Vt){const rr=p(Nt[Vt],!0);rr.__removalCount=(L.__removalCount||0)+1,lt.insertBefore(rr,g(L))}}}return zn(L),!0}return L instanceof c&&!aR(L)||(pe==="noscript"||pe==="noembed"||pe==="noframes")&&zt(/<\/no(script|embed|frames)/i,L.innerHTML)?(zn(L),!0):(Se&&L.nodeType===qo.text&&(ie=L.textContent,ei([A,F,N],lt=>{ie=Ho(ie,lt," ")}),L.textContent!==ie&&(Bo(t.removed,{element:L.cloneNode()}),L.textContent=ie)),nr(M.afterSanitizeElements,L,null),!1)},Vv=function(L,ie,pe){if(R&&(ie==="id"||ie==="name")&&(pe in n||pe in Qt))return!1;if(!(re&&!q[ie]&&zt(W,ie))){if(!(Q&&zt(E,ie))){if(!(oe.attributeCheck instanceof Function&&oe.attributeCheck(ie,L))){if(!G[ie]||q[ie]){if(!(Bv(L)&&(z.tagNameCheck instanceof RegExp&&zt(z.tagNameCheck,L)||z.tagNameCheck instanceof Function&&z.tagNameCheck(L))&&(z.attributeNameCheck instanceof RegExp&&zt(z.attributeNameCheck,ie)||z.attributeNameCheck instanceof Function&&z.attributeNameCheck(ie,L))||ie==="is"&&z.allowCustomizedBuiltInElements&&(z.tagNameCheck instanceof RegExp&&zt(z.tagNameCheck,pe)||z.tagNameCheck instanceof Function&&z.tagNameCheck(pe))))return!1}else if(!ot[ie]){if(!zt(D,Ho(pe,U,""))){if(!((ie==="src"||ie==="xlink:href"||ie==="href")&&L!=="script"&&lE(pe,"data:")===0&&Oe[L])){if(!(le&&!zt(k,Ho(pe,U,"")))){if(pe)return!1}}}}}}}return!0},Bv=function(L){return L!=="annotation-xml"&&pc(L,$)},Hv=function(L){nr(M.beforeSanitizeAttributes,L,null);const{attributes:ie}=L;if(!ie||Mu(L))return;const pe={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:G,forceKeepAttr:void 0};let lt=ie.length;for(;lt--;){const Nt=ie[lt],{name:_t,namespaceURI:Vt,value:rr}=Nt,Eo=ct(_t),Au=rr;let Ct=_t==="value"?Au:uE(Au);if(pe.attrName=Eo,pe.attrValue=Ct,pe.keepAttr=!0,pe.forceKeepAttr=void 0,nr(M.uponSanitizeAttribute,L,pe),Ct=pe.attrValue,Y&&(Eo==="id"||Eo==="name")&&(Br(_t,L),Ct=H+Ct),Ie&&zt(/((--!?|])>)|<\/(style|title|textarea)/i,Ct)){Br(_t,L);continue}if(Eo==="attributename"&&pc(Ct,"href")){Br(_t,L);continue}if(pe.forceKeepAttr)continue;if(!pe.keepAttr){Br(_t,L);continue}if(!K&&zt(/\/>/i,Ct)){Br(_t,L);continue}Se&&ei([A,F,N],Gv=>{Ct=Ho(Ct,Gv," ")});const Zv=ct(L.nodeName);if(!Vv(Zv,Eo,Ct)){Br(_t,L);continue}if(w&&typeof h=="object"&&typeof h.getAttributeType=="function"&&!Vt)switch(h.getAttributeType(Zv,Eo)){case"TrustedHTML":{Ct=w.createHTML(Ct);break}case"TrustedScriptURL":{Ct=w.createScriptURL(Ct);break}}if(Ct!==Au)try{Vt?L.setAttributeNS(Vt,_t,Ct):L.setAttribute(_t,Ct),Mu(L)?zn(L):Jd(t.removed)}catch{Br(_t,L)}}nr(M.afterSanitizeAttributes,L,null)},cR=function ye(L){let ie=null;const pe=Uv(L);for(nr(M.beforeSanitizeShadowDOM,L,null);ie=pe.nextNode();)nr(M.uponSanitizeShadowNode,ie,null),jv(ie),Hv(ie),ie.content instanceof s&&ye(ie.content);nr(M.afterSanitizeShadowDOM,L,null)};return t.sanitize=function(ye){let L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ie=null,pe=null,lt=null,Nt=null;if(Sn=!ye,Sn&&(ye="<!-->"),typeof ye!="string"&&!Yv(ye))if(typeof ye.toString=="function"){if(ye=ye.toString(),typeof ye!="string")throw Zo("dirty is not a string, aborting")}else throw Zo("toString is not a function");if(!t.isSupported)return ye;if(Ge||Du(L),t.removed=[],typeof ye=="string"&&(te=!1),te){if(ye.nodeName){const rr=ct(ye.nodeName);if(!V[rr]||X[rr])throw Zo("root node is forbidden and cannot be sanitized in-place")}}else if(ye instanceof a)ie=$v("<!---->"),pe=ie.ownerDocument.importNode(ye,!0),pe.nodeType===qo.element&&pe.nodeName==="BODY"||pe.nodeName==="HTML"?ie=pe:ie.appendChild(pe);else{if(!We&&!Se&&!ke&&ye.indexOf("<")===-1)return w&&rt?w.createHTML(ye):ye;if(ie=$v(ye),!ie)return We?null:rt?_:""}ie&&Re&&zn(ie.firstChild);const _t=Uv(te?ye:ie);for(;lt=_t.nextNode();)jv(lt),Hv(lt),lt.content instanceof s&&cR(lt.content);if(te)return ye;if(We){if(nt)for(Nt=v.call(ie.ownerDocument);ie.firstChild;)Nt.appendChild(ie.firstChild);else Nt=ie;return(G.shadowroot||G.shadowrootmode)&&(Nt=P.call(r,Nt,!0)),Nt}let Vt=ke?ie.outerHTML:ie.innerHTML;return ke&&V["!doctype"]&&ie.ownerDocument&&ie.ownerDocument.doctype&&ie.ownerDocument.doctype.name&&zt(oh,ie.ownerDocument.doctype.name)&&(Vt="<!DOCTYPE "+ie.ownerDocument.doctype.name+`>
43
+ `+Vt),Se&&ei([A,F,N],rr=>{Vt=Ho(Vt,rr," ")}),w&&rt?w.createHTML(Vt):Vt},t.setConfig=function(){let ye=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Du(ye),Ge=!0},t.clearConfig=function(){Pt=null,Ge=!1},t.isValidAttribute=function(ye,L,ie){Pt||Du({});const pe=ct(ye),lt=ct(L);return Vv(pe,lt,ie)},t.addHook=function(ye,L){typeof L=="function"&&Bo(M[ye],L)},t.removeHook=function(ye,L){if(L!==void 0){const ie=aE(M[ye],L);return ie===-1?void 0:cE(M[ye],ie,1)[0]}return Jd(M[ye])},t.removeHooks=function(ye){M[ye]=[]},t.removeAllHooks=function(){M=ih()},t}var OE=ah();function ch(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Nr(...e){return t=>{let n=!1;const r=e.map(o=>{const s=ch(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():ch(e[o],null)}}}}function He(...e){return b.useCallback(Nr(...e),e)}var EE=Symbol.for("react.lazy"),ri=b[" use ".trim().toString()];function CE(e){return typeof e=="object"&&e!==null&&"then"in e}function lh(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===EE&&"_payload"in e&&CE(e._payload)}function uh(e){const t=TE(e),n=b.forwardRef((r,o)=>{let{children:s,...i}=r;lh(s)&&typeof ri=="function"&&(s=ri(s._payload));const a=b.Children.toArray(s),c=a.find(ME);if(c){const u=c.props.children,l=a.map(f=>f===c?b.Children.count(u)>1?b.Children.only(null):b.isValidElement(u)?u.props.children:null:f);return T.jsx(t,{...i,ref:o,children:b.isValidElement(u)?b.cloneElement(u,void 0,l):null})}return T.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var fh=uh("Slot");function TE(e){const t=b.forwardRef((n,r)=>{let{children:o,...s}=n;if(lh(o)&&typeof ri=="function"&&(o=ri(o._payload)),b.isValidElement(o)){const i=PE(o),a=AE(s,o.props);return o.type!==b.Fragment&&(a.ref=r?Nr(r,i):i),b.cloneElement(o,a)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var DE=Symbol("radix.slottable");function ME(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===DE}function AE(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const c=s(...a);return o(...a),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function PE(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function dh(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=dh(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function oi(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=dh(e))&&(r&&(r+=" "),r+=t);return r}const NE=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},IE=(e,t)=>({classGroupId:e,validator:t}),hh=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),si="-",ph=[],FE="arbitrary..",RE=e=>{const t=zE(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return WE(i);const a=i.split(si),c=a[0]===""&&a.length>1?1:0;return mh(a,c,t)},getConflictingClassGroupIds:(i,a)=>{if(a){const c=r[i],u=n[i];return c?u?NE(u,c):c:u||ph}return n[i]||ph}}},mh=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],s=n.nextPart.get(o);if(s){const u=mh(e,t+1,s);if(u)return u}const i=n.validators;if(i===null)return;const a=t===0?e.join(si):e.slice(t).join(si),c=i.length;for(let u=0;u<c;u++){const l=i[u];if(l.validator(a))return l.classGroupId}},WE=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?FE+r:void 0})(),zE=e=>{const{theme:t,classGroups:n}=e;return LE(n,t)},LE=(e,t)=>{const n=hh();for(const r in e){const o=e[r];bc(o,n,r,t)}return n},bc=(e,t,n,r)=>{const o=e.length;for(let s=0;s<o;s++){const i=e[s];$E(i,t,n,r)}},$E=(e,t,n,r)=>{if(typeof e=="string"){UE(e,t,n);return}if(typeof e=="function"){YE(e,t,n,r);return}jE(e,t,n,r)},UE=(e,t,n)=>{const r=e===""?t:gh(t,e);r.classGroupId=n},YE=(e,t,n,r)=>{if(VE(e)){bc(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(IE(n,e))},jE=(e,t,n,r)=>{const o=Object.entries(e),s=o.length;for(let i=0;i<s;i++){const[a,c]=o[i];bc(c,gh(t,a),n,r)}},gh=(e,t)=>{let n=e;const r=t.split(si),o=r.length;for(let s=0;s<o;s++){const i=r[s];let a=n.nextPart.get(i);a||(a=hh(),n.nextPart.set(i,a)),n=a}return n},VE=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,BE=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(s,i)=>{n[s]=i,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(s){let i=n[s];if(i!==void 0)return i;if((i=r[s])!==void 0)return o(s,i),i},set(s,i){s in n?n[s]=i:o(s,i)}}},wc="!",yh=":",HE=[],vh=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),ZE=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let i=0,a=0,c=0,u;const l=o.length;for(let p=0;p<l;p++){const y=o[p];if(i===0&&a===0){if(y===yh){s.push(o.slice(c,p)),c=p+1;continue}if(y==="/"){u=p;continue}}y==="["?i++:y==="]"?i--:y==="("?a++:y===")"&&a--}const f=s.length===0?o:o.slice(c);let d=f,h=!1;f.endsWith(wc)?(d=f.slice(0,-1),h=!0):f.startsWith(wc)&&(d=f.slice(1),h=!0);const m=u&&u>c?u-c:void 0;return vh(s,h,d,m)};if(t){const o=t+yh,s=r;r=i=>i.startsWith(o)?s(i.slice(o.length)):vh(HE,!1,i,void 0,!0)}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},GE=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let s=0;s<n.length;s++){const i=n[s],a=i[0]==="[",c=t.has(i);a||c?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(i)):o.push(i)}return o.length>0&&(o.sort(),r.push(...o)),r}},qE=e=>({cache:BE(e.cacheSize),parseClassName:ZE(e),sortModifiers:GE(e),...RE(e)}),KE=/\s+/,XE=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s}=t,i=[],a=e.trim().split(KE);let c="";for(let u=a.length-1;u>=0;u-=1){const l=a[u],{isExternal:f,modifiers:d,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:p}=n(l);if(f){c=l+(c.length>0?" "+c:c);continue}let y=!!p,g=r(y?m.substring(0,p):m);if(!g){if(!y){c=l+(c.length>0?" "+c:c);continue}if(g=r(m),!g){c=l+(c.length>0?" "+c:c);continue}y=!1}const C=d.length===0?"":d.length===1?d[0]:s(d).join(":"),O=h?C+wc:C,w=O+g;if(i.indexOf(w)>-1)continue;i.push(w);const _=o(g,y);for(let S=0;S<_.length;++S){const I=_[S];i.push(O+I)}c=l+(c.length>0?" "+c:c)}return c},JE=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=bh(n))&&(o&&(o+=" "),o+=r);return o},bh=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=bh(e[r]))&&(n&&(n+=" "),n+=t);return n},QE=(e,...t)=>{let n,r,o,s;const i=c=>{const u=t.reduce((l,f)=>f(l),e());return n=qE(u),r=n.cache.get,o=n.cache.set,s=a,a(c)},a=c=>{const u=r(c);if(u)return u;const l=XE(c,n);return o(c,l),l};return s=i,(...c)=>s(JE(...c))},eC=[],kt=e=>{const t=n=>n[e]||eC;return t.isThemeGetter=!0,t},wh=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,_h=/^\((?:(\w[\w-]*):)?(.+)\)$/i,tC=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,nC=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,rC=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,oC=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,sC=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,iC=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,lr=e=>tC.test(e),Ae=e=>!!e&&!Number.isNaN(Number(e)),ur=e=>!!e&&Number.isInteger(Number(e)),_c=e=>e.endsWith("%")&&Ae(e.slice(0,-1)),qn=e=>nC.test(e),Sh=()=>!0,aC=e=>rC.test(e)&&!oC.test(e),Sc=()=>!1,cC=e=>sC.test(e),lC=e=>iC.test(e),uC=e=>!de(e)&&!he(e),fC=e=>fr(e,Th,Sc),de=e=>wh.test(e),Ir=e=>fr(e,Dh,aC),kh=e=>fr(e,bC,Ae),dC=e=>fr(e,Ah,Sh),hC=e=>fr(e,Mh,Sc),xh=e=>fr(e,Eh,Sc),pC=e=>fr(e,Ch,lC),ii=e=>fr(e,Ph,cC),he=e=>_h.test(e),Ko=e=>Fr(e,Dh),mC=e=>Fr(e,Mh),Oh=e=>Fr(e,Eh),gC=e=>Fr(e,Th),yC=e=>Fr(e,Ch),ai=e=>Fr(e,Ph,!0),vC=e=>Fr(e,Ah,!0),fr=(e,t,n)=>{const r=wh.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Fr=(e,t,n=!1)=>{const r=_h.exec(e);return r?r[1]?t(r[1]):n:!1},Eh=e=>e==="position"||e==="percentage",Ch=e=>e==="image"||e==="url",Th=e=>e==="length"||e==="size"||e==="bg-size",Dh=e=>e==="length",bC=e=>e==="number",Mh=e=>e==="family-name",Ah=e=>e==="number"||e==="weight",Ph=e=>e==="shadow",kc=QE(()=>{const e=kt("color"),t=kt("font"),n=kt("text"),r=kt("font-weight"),o=kt("tracking"),s=kt("leading"),i=kt("breakpoint"),a=kt("container"),c=kt("spacing"),u=kt("radius"),l=kt("shadow"),f=kt("inset-shadow"),d=kt("text-shadow"),h=kt("drop-shadow"),m=kt("blur"),p=kt("perspective"),y=kt("aspect"),g=kt("ease"),C=kt("animate"),O=()=>["auto","avoid","all","avoid-page","page","left","right","column"],w=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],_=()=>[...w(),he,de],S=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto","contain","none"],v=()=>[he,de,c],x=()=>[lr,"full","auto",...v()],P=()=>[ur,"none","subgrid",he,de],M=()=>["auto",{span:["full",ur,he,de]},ur,he,de],A=()=>[ur,"auto",he,de],F=()=>["auto","min","max","fr",he,de],N=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],W=()=>["start","end","center","stretch","center-safe","end-safe"],E=()=>["auto",...v()],k=()=>[lr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...v()],U=()=>[lr,"screen","full","dvw","lvw","svw","min","max","fit",...v()],$=()=>[lr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...v()],D=()=>[e,he,de],V=()=>[...w(),Oh,xh,{position:[he,de]}],Z=()=>["no-repeat",{repeat:["","x","y","space","round"]}],G=()=>["auto","cover","contain",gC,fC,{size:[he,de]}],B=()=>[_c,Ko,Ir],z=()=>["","none","full",u,he,de],X=()=>["",Ae,Ko,Ir],q=()=>["solid","dashed","dotted","double"],oe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Q=()=>[Ae,_c,Oh,xh],re=()=>["","none",m,he,de],le=()=>["none",Ae,he,de],K=()=>["none",Ae,he,de],Se=()=>[Ae,he,de],Ie=()=>[lr,"full",...v()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[qn],breakpoint:[qn],color:[Sh],container:[qn],"drop-shadow":[qn],ease:["in","out","in-out"],font:[uC],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[qn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[qn],shadow:[qn],spacing:["px",Ae],text:[qn],"text-shadow":[qn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",lr,de,he,y]}],container:["container"],columns:[{columns:[Ae,de,he,a]}],"break-after":[{"break-after":O()}],"break-before":[{"break-before":O()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:_()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:x()}],"inset-x":[{"inset-x":x()}],"inset-y":[{"inset-y":x()}],start:[{"inset-s":x(),start:x()}],end:[{"inset-e":x(),end:x()}],"inset-bs":[{"inset-bs":x()}],"inset-be":[{"inset-be":x()}],top:[{top:x()}],right:[{right:x()}],bottom:[{bottom:x()}],left:[{left:x()}],visibility:["visible","invisible","collapse"],z:[{z:[ur,"auto",he,de]}],basis:[{basis:[lr,"full","auto",a,...v()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ae,lr,"auto","initial","none",de]}],grow:[{grow:["",Ae,he,de]}],shrink:[{shrink:["",Ae,he,de]}],order:[{order:[ur,"first","last","none",he,de]}],"grid-cols":[{"grid-cols":P()}],"col-start-end":[{col:M()}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":P()}],"row-start-end":[{row:M()}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":F()}],"auto-rows":[{"auto-rows":F()}],gap:[{gap:v()}],"gap-x":[{"gap-x":v()}],"gap-y":[{"gap-y":v()}],"justify-content":[{justify:[...N(),"normal"]}],"justify-items":[{"justify-items":[...W(),"normal"]}],"justify-self":[{"justify-self":["auto",...W()]}],"align-content":[{content:["normal",...N()]}],"align-items":[{items:[...W(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...W(),{baseline:["","last"]}]}],"place-content":[{"place-content":N()}],"place-items":[{"place-items":[...W(),"baseline"]}],"place-self":[{"place-self":["auto",...W()]}],p:[{p:v()}],px:[{px:v()}],py:[{py:v()}],ps:[{ps:v()}],pe:[{pe:v()}],pbs:[{pbs:v()}],pbe:[{pbe:v()}],pt:[{pt:v()}],pr:[{pr:v()}],pb:[{pb:v()}],pl:[{pl:v()}],m:[{m:E()}],mx:[{mx:E()}],my:[{my:E()}],ms:[{ms:E()}],me:[{me:E()}],mbs:[{mbs:E()}],mbe:[{mbe:E()}],mt:[{mt:E()}],mr:[{mr:E()}],mb:[{mb:E()}],ml:[{ml:E()}],"space-x":[{"space-x":v()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":v()}],"space-y-reverse":["space-y-reverse"],size:[{size:k()}],"inline-size":[{inline:["auto",...U()]}],"min-inline-size":[{"min-inline":["auto",...U()]}],"max-inline-size":[{"max-inline":["none",...U()]}],"block-size":[{block:["auto",...$()]}],"min-block-size":[{"min-block":["auto",...$()]}],"max-block-size":[{"max-block":["none",...$()]}],w:[{w:[a,"screen",...k()]}],"min-w":[{"min-w":[a,"screen","none",...k()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[i]},...k()]}],h:[{h:["screen","lh",...k()]}],"min-h":[{"min-h":["screen","lh","none",...k()]}],"max-h":[{"max-h":["screen","lh",...k()]}],"font-size":[{text:["base",n,Ko,Ir]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,vC,dC]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",_c,de]}],"font-family":[{font:[mC,hC,t]}],"font-features":[{"font-features":[de]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,he,de]}],"line-clamp":[{"line-clamp":[Ae,"none",he,kh]}],leading:[{leading:[s,...v()]}],"list-image":[{"list-image":["none",he,de]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",he,de]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:D()}],"text-color":[{text:D()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...q(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ae,"from-font","auto",he,Ir]}],"text-decoration-color":[{decoration:D()}],"underline-offset":[{"underline-offset":[Ae,"auto",he,de]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:v()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",he,de]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",he,de]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:V()}],"bg-repeat":[{bg:Z()}],"bg-size":[{bg:G()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ur,he,de],radial:["",he,de],conic:[ur,he,de]},yC,pC]}],"bg-color":[{bg:D()}],"gradient-from-pos":[{from:B()}],"gradient-via-pos":[{via:B()}],"gradient-to-pos":[{to:B()}],"gradient-from":[{from:D()}],"gradient-via":[{via:D()}],"gradient-to":[{to:D()}],rounded:[{rounded:z()}],"rounded-s":[{"rounded-s":z()}],"rounded-e":[{"rounded-e":z()}],"rounded-t":[{"rounded-t":z()}],"rounded-r":[{"rounded-r":z()}],"rounded-b":[{"rounded-b":z()}],"rounded-l":[{"rounded-l":z()}],"rounded-ss":[{"rounded-ss":z()}],"rounded-se":[{"rounded-se":z()}],"rounded-ee":[{"rounded-ee":z()}],"rounded-es":[{"rounded-es":z()}],"rounded-tl":[{"rounded-tl":z()}],"rounded-tr":[{"rounded-tr":z()}],"rounded-br":[{"rounded-br":z()}],"rounded-bl":[{"rounded-bl":z()}],"border-w":[{border:X()}],"border-w-x":[{"border-x":X()}],"border-w-y":[{"border-y":X()}],"border-w-s":[{"border-s":X()}],"border-w-e":[{"border-e":X()}],"border-w-bs":[{"border-bs":X()}],"border-w-be":[{"border-be":X()}],"border-w-t":[{"border-t":X()}],"border-w-r":[{"border-r":X()}],"border-w-b":[{"border-b":X()}],"border-w-l":[{"border-l":X()}],"divide-x":[{"divide-x":X()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":X()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...q(),"hidden","none"]}],"divide-style":[{divide:[...q(),"hidden","none"]}],"border-color":[{border:D()}],"border-color-x":[{"border-x":D()}],"border-color-y":[{"border-y":D()}],"border-color-s":[{"border-s":D()}],"border-color-e":[{"border-e":D()}],"border-color-bs":[{"border-bs":D()}],"border-color-be":[{"border-be":D()}],"border-color-t":[{"border-t":D()}],"border-color-r":[{"border-r":D()}],"border-color-b":[{"border-b":D()}],"border-color-l":[{"border-l":D()}],"divide-color":[{divide:D()}],"outline-style":[{outline:[...q(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ae,he,de]}],"outline-w":[{outline:["",Ae,Ko,Ir]}],"outline-color":[{outline:D()}],shadow:[{shadow:["","none",l,ai,ii]}],"shadow-color":[{shadow:D()}],"inset-shadow":[{"inset-shadow":["none",f,ai,ii]}],"inset-shadow-color":[{"inset-shadow":D()}],"ring-w":[{ring:X()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:D()}],"ring-offset-w":[{"ring-offset":[Ae,Ir]}],"ring-offset-color":[{"ring-offset":D()}],"inset-ring-w":[{"inset-ring":X()}],"inset-ring-color":[{"inset-ring":D()}],"text-shadow":[{"text-shadow":["none",d,ai,ii]}],"text-shadow-color":[{"text-shadow":D()}],opacity:[{opacity:[Ae,he,de]}],"mix-blend":[{"mix-blend":[...oe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":oe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ae]}],"mask-image-linear-from-pos":[{"mask-linear-from":Q()}],"mask-image-linear-to-pos":[{"mask-linear-to":Q()}],"mask-image-linear-from-color":[{"mask-linear-from":D()}],"mask-image-linear-to-color":[{"mask-linear-to":D()}],"mask-image-t-from-pos":[{"mask-t-from":Q()}],"mask-image-t-to-pos":[{"mask-t-to":Q()}],"mask-image-t-from-color":[{"mask-t-from":D()}],"mask-image-t-to-color":[{"mask-t-to":D()}],"mask-image-r-from-pos":[{"mask-r-from":Q()}],"mask-image-r-to-pos":[{"mask-r-to":Q()}],"mask-image-r-from-color":[{"mask-r-from":D()}],"mask-image-r-to-color":[{"mask-r-to":D()}],"mask-image-b-from-pos":[{"mask-b-from":Q()}],"mask-image-b-to-pos":[{"mask-b-to":Q()}],"mask-image-b-from-color":[{"mask-b-from":D()}],"mask-image-b-to-color":[{"mask-b-to":D()}],"mask-image-l-from-pos":[{"mask-l-from":Q()}],"mask-image-l-to-pos":[{"mask-l-to":Q()}],"mask-image-l-from-color":[{"mask-l-from":D()}],"mask-image-l-to-color":[{"mask-l-to":D()}],"mask-image-x-from-pos":[{"mask-x-from":Q()}],"mask-image-x-to-pos":[{"mask-x-to":Q()}],"mask-image-x-from-color":[{"mask-x-from":D()}],"mask-image-x-to-color":[{"mask-x-to":D()}],"mask-image-y-from-pos":[{"mask-y-from":Q()}],"mask-image-y-to-pos":[{"mask-y-to":Q()}],"mask-image-y-from-color":[{"mask-y-from":D()}],"mask-image-y-to-color":[{"mask-y-to":D()}],"mask-image-radial":[{"mask-radial":[he,de]}],"mask-image-radial-from-pos":[{"mask-radial-from":Q()}],"mask-image-radial-to-pos":[{"mask-radial-to":Q()}],"mask-image-radial-from-color":[{"mask-radial-from":D()}],"mask-image-radial-to-color":[{"mask-radial-to":D()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":w()}],"mask-image-conic-pos":[{"mask-conic":[Ae]}],"mask-image-conic-from-pos":[{"mask-conic-from":Q()}],"mask-image-conic-to-pos":[{"mask-conic-to":Q()}],"mask-image-conic-from-color":[{"mask-conic-from":D()}],"mask-image-conic-to-color":[{"mask-conic-to":D()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:V()}],"mask-repeat":[{mask:Z()}],"mask-size":[{mask:G()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",he,de]}],filter:[{filter:["","none",he,de]}],blur:[{blur:re()}],brightness:[{brightness:[Ae,he,de]}],contrast:[{contrast:[Ae,he,de]}],"drop-shadow":[{"drop-shadow":["","none",h,ai,ii]}],"drop-shadow-color":[{"drop-shadow":D()}],grayscale:[{grayscale:["",Ae,he,de]}],"hue-rotate":[{"hue-rotate":[Ae,he,de]}],invert:[{invert:["",Ae,he,de]}],saturate:[{saturate:[Ae,he,de]}],sepia:[{sepia:["",Ae,he,de]}],"backdrop-filter":[{"backdrop-filter":["","none",he,de]}],"backdrop-blur":[{"backdrop-blur":re()}],"backdrop-brightness":[{"backdrop-brightness":[Ae,he,de]}],"backdrop-contrast":[{"backdrop-contrast":[Ae,he,de]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ae,he,de]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ae,he,de]}],"backdrop-invert":[{"backdrop-invert":["",Ae,he,de]}],"backdrop-opacity":[{"backdrop-opacity":[Ae,he,de]}],"backdrop-saturate":[{"backdrop-saturate":[Ae,he,de]}],"backdrop-sepia":[{"backdrop-sepia":["",Ae,he,de]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":v()}],"border-spacing-x":[{"border-spacing-x":v()}],"border-spacing-y":[{"border-spacing-y":v()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",he,de]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ae,"initial",he,de]}],ease:[{ease:["linear","initial",g,he,de]}],delay:[{delay:[Ae,he,de]}],animate:[{animate:["none",C,he,de]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[p,he,de]}],"perspective-origin":[{"perspective-origin":_()}],rotate:[{rotate:le()}],"rotate-x":[{"rotate-x":le()}],"rotate-y":[{"rotate-y":le()}],"rotate-z":[{"rotate-z":le()}],scale:[{scale:K()}],"scale-x":[{"scale-x":K()}],"scale-y":[{"scale-y":K()}],"scale-z":[{"scale-z":K()}],"scale-3d":["scale-3d"],skew:[{skew:Se()}],"skew-x":[{"skew-x":Se()}],"skew-y":[{"skew-y":Se()}],transform:[{transform:[he,de,"","none","gpu","cpu"]}],"transform-origin":[{origin:_()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ie()}],"translate-x":[{"translate-x":Ie()}],"translate-y":[{"translate-y":Ie()}],"translate-z":[{"translate-z":Ie()}],"translate-none":["translate-none"],accent:[{accent:D()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:D()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",he,de]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":v()}],"scroll-mx":[{"scroll-mx":v()}],"scroll-my":[{"scroll-my":v()}],"scroll-ms":[{"scroll-ms":v()}],"scroll-me":[{"scroll-me":v()}],"scroll-mbs":[{"scroll-mbs":v()}],"scroll-mbe":[{"scroll-mbe":v()}],"scroll-mt":[{"scroll-mt":v()}],"scroll-mr":[{"scroll-mr":v()}],"scroll-mb":[{"scroll-mb":v()}],"scroll-ml":[{"scroll-ml":v()}],"scroll-p":[{"scroll-p":v()}],"scroll-px":[{"scroll-px":v()}],"scroll-py":[{"scroll-py":v()}],"scroll-ps":[{"scroll-ps":v()}],"scroll-pe":[{"scroll-pe":v()}],"scroll-pbs":[{"scroll-pbs":v()}],"scroll-pbe":[{"scroll-pbe":v()}],"scroll-pt":[{"scroll-pt":v()}],"scroll-pr":[{"scroll-pr":v()}],"scroll-pb":[{"scroll-pb":v()}],"scroll-pl":[{"scroll-pl":v()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",he,de]}],fill:[{fill:["none",...D()]}],"stroke-w":[{stroke:[Ae,Ko,Ir,kh]}],stroke:[{stroke:["none",...D()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function Dt(...e){return kc(oi(e))}var wC=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],_C=wC.reduce((e,t)=>{const n=uh(`Primitive.${t}`),r=b.forwardRef((o,s)=>{const{asChild:i,...a}=o,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),T.jsx(c,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),SC="Label",Nh=b.forwardRef((e,t)=>T.jsx(_C.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Nh.displayName=SC;var kC=Nh;function xC({className:e,...t}){return T.jsx(kC,{"data-slot":"label",className:Dt("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}const OC=rb,Ih=b.createContext({}),EC=({...e})=>T.jsx(Ih.Provider,{value:{name:e.name},children:T.jsx(tb,{...e})}),ci=()=>{const e=b.useContext(Ih),t=b.useContext(Fh),{getFieldState:n}=nb(),r=Lu({name:e.name}),o=n(e.name,r);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:s}=t;return{id:s,name:e.name,formItemId:`${s}-form-item`,formDescriptionId:`${s}-form-item-description`,formMessageId:`${s}-form-item-message`,...o}},Fh=b.createContext({});function xc({className:e,...t}){const n=b.useId();return T.jsx(Fh.Provider,{value:{id:n},children:T.jsx("div",{"data-slot":"form-item",className:Dt("grid gap-2",e),...t})})}function Oc({className:e,...t}){const{error:n,formItemId:r}=ci();return T.jsx(xC,{"data-slot":"form-label","data-error":!!n,className:Dt("data-[error=true]:text-destructive",e),htmlFor:r,...t})}function li({...e}){const{error:t,formItemId:n,formDescriptionId:r,formMessageId:o}=ci();return T.jsx(fh,{"data-slot":"form-control",id:n,"aria-describedby":t?`${r} ${o}`:`${r}`,"aria-invalid":!!t,...e})}function CC({className:e,...t}){const{formDescriptionId:n}=ci();return T.jsx("p",{"data-slot":"form-description",id:n,className:Dt("text-muted-foreground text-sm",e),...t})}function TC({className:e,...t}){const{error:n,formMessageId:r}=ci(),o=n?String(n?.message??""):t.children;return o?T.jsx("p",{"data-slot":"form-message",id:r,className:Dt("text-destructive text-sm",e),...t,children:o}):null}function DC({className:e,type:t,...n}){return T.jsx("input",{type:t,"data-slot":"input",className:Dt("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...n})}function Rh(...e){return kc(oi(e))}const MC=(e={})=>{const{field:t={},form:n={},question:r={},disabled:o=!1}=e;return T.jsx(DC,{...t,type:r.validation?.type==="email"?"email":r?.id?.includes("phone")?"tel":"text",placeholder:r.placeholder||"Your answer here...",className:Rh("bq-input",n.formState.errors[r.reference_id]?"border-destructive focus-visible:ring-destructive":""),disabled:o})};function AC({className:e,...t}){return T.jsx("textarea",{"data-slot":"textarea",className:Dt("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...t})}const PC=(e={})=>{const{field:t={},form:n={},question:r={},disabled:o=!1}=e;return T.jsx(AC,{...t,rows:4,placeholder:r.placeholder||"Your detailed answer...",className:Rh("bq-textarea",n.formState.errors[r.reference_id]?"border-destructive focus-visible:ring-destructive":""),disabled:o})};function Te(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function NC(e,t){const n=b.createContext(t),r=s=>{const{children:i,...a}=s,c=b.useMemo(()=>a,Object.values(a));return T.jsx(n.Provider,{value:c,children:i})};r.displayName=e+"Provider";function o(s){const i=b.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function Kn(e,t=[]){let n=[];function r(s,i){const a=b.createContext(i),c=n.length;n=[...n,i];const u=f=>{const{scope:d,children:h,...m}=f,p=d?.[e]?.[c]||a,y=b.useMemo(()=>m,Object.values(m));return T.jsx(p.Provider,{value:y,children:h})};u.displayName=s+"Provider";function l(f,d){const h=d?.[e]?.[c]||a,m=b.useContext(h);if(m)return m;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,l]}const o=()=>{const s=n.map(i=>b.createContext(i));return function(a){const c=a?.[e]||s;return b.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return o.scopeName=e,[r,IC(o,...t)]}function IC(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((a,{useScope:c,scopeName:u})=>{const f=c(s)[`__scope${u}`];return{...a,...f}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function FC(e){const t=RC(e),n=b.forwardRef((r,o)=>{const{children:s,...i}=r,a=b.Children.toArray(s),c=a.find(zC);if(c){const u=c.props.children,l=a.map(f=>f===c?b.Children.count(u)>1?b.Children.only(null):b.isValidElement(u)?u.props.children:null:f);return T.jsx(t,{...i,ref:o,children:b.isValidElement(u)?b.cloneElement(u,void 0,l):null})}return T.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function RC(e){const t=b.forwardRef((n,r)=>{const{children:o,...s}=n;if(b.isValidElement(o)){const i=$C(o),a=LC(s,o.props);return o.type!==b.Fragment&&(a.ref=r?Nr(r,i):i),b.cloneElement(o,a)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var WC=Symbol("radix.slottable");function zC(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===WC}function LC(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const c=s(...a);return o(...a),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function $C(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var UC=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ne=UC.reduce((e,t)=>{const n=FC(`Primitive.${t}`),r=b.forwardRef((o,s)=>{const{asChild:i,...a}=o,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),T.jsx(c,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function YC(e,t){e&&ms.flushSync(()=>e.dispatchEvent(t))}function Wh(e){const t=jC(e),n=b.forwardRef((r,o)=>{const{children:s,...i}=r,a=b.Children.toArray(s),c=a.find(BC);if(c){const u=c.props.children,l=a.map(f=>f===c?b.Children.count(u)>1?b.Children.only(null):b.isValidElement(u)?u.props.children:null:f);return T.jsx(t,{...i,ref:o,children:b.isValidElement(u)?b.cloneElement(u,void 0,l):null})}return T.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function jC(e){const t=b.forwardRef((n,r)=>{const{children:o,...s}=n;if(b.isValidElement(o)){const i=ZC(o),a=HC(s,o.props);return o.type!==b.Fragment&&(a.ref=r?Nr(r,i):i),b.cloneElement(o,a)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var VC=Symbol("radix.slottable");function BC(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===VC}function HC(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const c=s(...a);return o(...a),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function ZC(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function zh(e){const t=e+"CollectionProvider",[n,r]=Kn(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=p=>{const{scope:y,children:g}=p,C=j.useRef(null),O=j.useRef(new Map).current;return T.jsx(o,{scope:y,itemMap:O,collectionRef:C,children:g})};i.displayName=t;const a=e+"CollectionSlot",c=Wh(a),u=j.forwardRef((p,y)=>{const{scope:g,children:C}=p,O=s(a,g),w=He(y,O.collectionRef);return T.jsx(c,{ref:w,children:C})});u.displayName=a;const l=e+"CollectionItemSlot",f="data-radix-collection-item",d=Wh(l),h=j.forwardRef((p,y)=>{const{scope:g,children:C,...O}=p,w=j.useRef(null),_=He(y,w),S=s(l,g);return j.useEffect(()=>(S.itemMap.set(w,{ref:w,...O}),()=>{S.itemMap.delete(w)})),T.jsx(d,{[f]:"",ref:_,children:C})});h.displayName=l;function m(p){const y=s(e+"CollectionConsumer",p);return j.useCallback(()=>{const C=y.collectionRef.current;if(!C)return[];const O=Array.from(C.querySelectorAll(`[${f}]`));return Array.from(y.itemMap.values()).sort((S,I)=>O.indexOf(S.ref.current)-O.indexOf(I.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:i,Slot:u,ItemSlot:h},m,r]}var Mt=globalThis?.document?b.useLayoutEffect:()=>{},GC=b[" useId ".trim().toString()]||(()=>{}),qC=0;function dr(e){const[t,n]=b.useState(GC());return Mt(()=>{n(r=>r??String(qC++))},[e]),e||(t?`radix-${t}`:"")}function hr(e){const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...n)=>t.current?.(...n),[])}var KC=b[" useInsertionEffect ".trim().toString()]||Mt;function Rr({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,i]=XC({defaultProp:t,onChange:n}),a=e!==void 0,c=a?e:o;{const l=b.useRef(e!==void 0);b.useEffect(()=>{const f=l.current;f!==a&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),l.current=a},[a,r])}const u=b.useCallback(l=>{if(a){const f=JC(l)?l(e):l;f!==e&&i.current?.(f)}else s(l)},[a,e,s,i]);return[c,u]}function XC({defaultProp:e,onChange:t}){const[n,r]=b.useState(e),o=b.useRef(n),s=b.useRef(t);return KC(()=>{s.current=t},[t]),b.useEffect(()=>{o.current!==n&&(s.current?.(n),o.current=n)},[n,o]),[n,r,s]}function JC(e){return typeof e=="function"}var QC=b.createContext(void 0);function Ec(e){const t=b.useContext(QC);return e||t||"ltr"}var Cc="rovingFocusGroup.onEntryFocus",eT={bubbles:!1,cancelable:!0},Xo="RovingFocusGroup",[Tc,Lh,tT]=zh(Xo),[nT,$h]=Kn(Xo,[tT]),[rT,oT]=nT(Xo),Uh=b.forwardRef((e,t)=>T.jsx(Tc.Provider,{scope:e.__scopeRovingFocusGroup,children:T.jsx(Tc.Slot,{scope:e.__scopeRovingFocusGroup,children:T.jsx(sT,{...e,ref:t})})}));Uh.displayName=Xo;var sT=b.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:l=!1,...f}=e,d=b.useRef(null),h=He(t,d),m=Ec(s),[p,y]=Rr({prop:i,defaultProp:a??null,onChange:c,caller:Xo}),[g,C]=b.useState(!1),O=hr(u),w=Lh(n),_=b.useRef(!1),[S,I]=b.useState(0);return b.useEffect(()=>{const v=d.current;if(v)return v.addEventListener(Cc,O),()=>v.removeEventListener(Cc,O)},[O]),T.jsx(rT,{scope:n,orientation:r,dir:m,loop:o,currentTabStopId:p,onItemFocus:b.useCallback(v=>y(v),[y]),onItemShiftTab:b.useCallback(()=>C(!0),[]),onFocusableItemAdd:b.useCallback(()=>I(v=>v+1),[]),onFocusableItemRemove:b.useCallback(()=>I(v=>v-1),[]),children:T.jsx(Ne.div,{tabIndex:g||S===0?-1:0,"data-orientation":r,...f,ref:h,style:{outline:"none",...e.style},onMouseDown:Te(e.onMouseDown,()=>{_.current=!0}),onFocus:Te(e.onFocus,v=>{const x=!_.current;if(v.target===v.currentTarget&&x&&!g){const P=new CustomEvent(Cc,eT);if(v.currentTarget.dispatchEvent(P),!P.defaultPrevented){const M=w().filter(E=>E.focusable),A=M.find(E=>E.active),F=M.find(E=>E.id===p),W=[A,F,...M].filter(Boolean).map(E=>E.ref.current);Vh(W,l)}}_.current=!1}),onBlur:Te(e.onBlur,()=>C(!1))})})}),Yh="RovingFocusGroupItem",jh=b.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:i,...a}=e,c=dr(),u=s||c,l=oT(Yh,n),f=l.currentTabStopId===u,d=Lh(n),{onFocusableItemAdd:h,onFocusableItemRemove:m,currentTabStopId:p}=l;return b.useEffect(()=>{if(r)return h(),()=>m()},[r,h,m]),T.jsx(Tc.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:T.jsx(Ne.span,{tabIndex:f?0:-1,"data-orientation":l.orientation,...a,ref:t,onMouseDown:Te(e.onMouseDown,y=>{r?l.onItemFocus(u):y.preventDefault()}),onFocus:Te(e.onFocus,()=>l.onItemFocus(u)),onKeyDown:Te(e.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){l.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const g=cT(y,l.orientation,l.dir);if(g!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let O=d().filter(w=>w.focusable).map(w=>w.ref.current);if(g==="last")O.reverse();else if(g==="prev"||g==="next"){g==="prev"&&O.reverse();const w=O.indexOf(y.currentTarget);O=l.loop?lT(O,w+1):O.slice(w+1)}setTimeout(()=>Vh(O))}}),children:typeof i=="function"?i({isCurrentTabStop:f,hasTabStop:p!=null}):i})})});jh.displayName=Yh;var iT={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function aT(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function cT(e,t,n){const r=aT(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return iT[r]}function Vh(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function lT(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var uT=Uh,fT=jh;function Dc(e){const[t,n]=b.useState(void 0);return Mt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const c=s.borderBoxSize,u=Array.isArray(c)?c[0]:c;i=u.inlineSize,a=u.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function Mc(e){const t=b.useRef({value:e,previous:e});return b.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function dT(e,t){return b.useReducer((n,r)=>t[n][r]??n,e)}var pr=e=>{const{present:t,children:n}=e,r=hT(t),o=typeof n=="function"?n({present:r.isPresent}):b.Children.only(n),s=He(r.ref,pT(o));return typeof n=="function"||r.isPresent?b.cloneElement(o,{ref:s}):null};pr.displayName="Presence";function hT(e){const[t,n]=b.useState(),r=b.useRef(null),o=b.useRef(e),s=b.useRef("none"),i=e?"mounted":"unmounted",[a,c]=dT(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const u=ui(r.current);s.current=a==="mounted"?u:"none"},[a]),Mt(()=>{const u=r.current,l=o.current;if(l!==e){const d=s.current,h=ui(u);e?c("MOUNT"):h==="none"||u?.display==="none"?c("UNMOUNT"):c(l&&d!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Mt(()=>{if(t){let u;const l=t.ownerDocument.defaultView??window,f=h=>{const p=ui(r.current).includes(CSS.escape(h.animationName));if(h.target===t&&p&&(c("ANIMATION_END"),!o.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",u=l.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},d=h=>{h.target===t&&(s.current=ui(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{l.clearTimeout(u),t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:b.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function ui(e){return e?.animationName||"none"}function pT(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ac="Radio",[mT,Bh]=Kn(Ac),[gT,yT]=mT(Ac),Hh=b.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:s,disabled:i,value:a="on",onCheck:c,form:u,...l}=e,[f,d]=b.useState(null),h=He(t,y=>d(y)),m=b.useRef(!1),p=f?u||!!f.closest("form"):!0;return T.jsxs(gT,{scope:n,checked:o,disabled:i,children:[T.jsx(Ne.button,{type:"button",role:"radio","aria-checked":o,"data-state":Kh(o),"data-disabled":i?"":void 0,disabled:i,value:a,...l,ref:h,onClick:Te(e.onClick,y=>{o||c?.(),p&&(m.current=y.isPropagationStopped(),m.current||y.stopPropagation())})}),p&&T.jsx(qh,{control:f,bubbles:!m.current,name:r,value:a,checked:o,required:s,disabled:i,form:u,style:{transform:"translateX(-100%)"}})]})});Hh.displayName=Ac;var Zh="RadioIndicator",Gh=b.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,s=yT(Zh,n);return T.jsx(pr,{present:r||s.checked,children:T.jsx(Ne.span,{"data-state":Kh(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t})})});Gh.displayName=Zh;var vT="RadioBubbleInput",qh=b.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},s)=>{const i=b.useRef(null),a=He(i,s),c=Mc(n),u=Dc(t);return b.useEffect(()=>{const l=i.current;if(!l)return;const f=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(f,"checked").set;if(c!==n&&h){const m=new Event("click",{bubbles:r});h.call(l,n),l.dispatchEvent(m)}},[c,n,r]),T.jsx(Ne.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:a,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});qh.displayName=vT;function Kh(e){return e?"checked":"unchecked"}var bT=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],fi="RadioGroup",[wT]=Kn(fi,[$h,Bh]),Xh=$h(),Jh=Bh(),[_T,ST]=wT(fi),Qh=b.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:s,required:i=!1,disabled:a=!1,orientation:c,dir:u,loop:l=!0,onValueChange:f,...d}=e,h=Xh(n),m=Ec(u),[p,y]=Rr({prop:s,defaultProp:o??null,onChange:f,caller:fi});return T.jsx(_T,{scope:n,name:r,required:i,disabled:a,value:p,onValueChange:y,children:T.jsx(uT,{asChild:!0,...h,orientation:c,dir:m,loop:l,children:T.jsx(Ne.div,{role:"radiogroup","aria-required":i,"aria-orientation":c,"data-disabled":a?"":void 0,dir:m,...d,ref:t})})})});Qh.displayName=fi;var ep="RadioGroupItem",tp=b.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,s=ST(ep,n),i=s.disabled||r,a=Xh(n),c=Jh(n),u=b.useRef(null),l=He(t,u),f=s.value===o.value,d=b.useRef(!1);return b.useEffect(()=>{const h=p=>{bT.includes(p.key)&&(d.current=!0)},m=()=>d.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",m),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",m)}},[]),T.jsx(fT,{asChild:!0,...a,focusable:!i,active:f,children:T.jsx(Hh,{disabled:i,required:s.required,checked:f,...c,...o,name:s.name,ref:l,onCheck:()=>s.onValueChange(o.value),onKeyDown:Te(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:Te(o.onFocus,()=>{d.current&&u.current?.click()})})})});tp.displayName=ep;var kT="RadioGroupIndicator",np=b.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=Jh(n);return T.jsx(Gh,{...o,...r,ref:t})});np.displayName=kT;var xT=Qh,OT=tp,ET=np;const rp=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const CT=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const TT=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const op=e=>{const t=TT(e);return t.charAt(0).toUpperCase()+t.slice(1)};var DT={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const MT=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const AT=j.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...a},c)=>j.createElement("svg",{ref:c,...DT,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:rp("lucide",o),...!s&&!MT(a)&&{"aria-hidden":"true"},...a},[...i.map(([u,l])=>j.createElement(u,l)),...Array.isArray(s)?s:[s]]));const mr=(e,t)=>{const n=j.forwardRef(({className:r,...o},s)=>j.createElement(AT,{ref:s,iconNode:t,className:rp(`lucide-${CT(op(e))}`,`lucide-${e}`,r),...o}));return n.displayName=op(e),n};const PT=mr("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);const sp=mr("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const Pc=mr("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const NT=mr("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const IT=mr("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const FT=mr("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const RT=mr("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);const WT=mr("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function zT({className:e,...t}){return T.jsx(xT,{"data-slot":"radio-group",className:Dt("grid gap-3",e),...t})}function LT({className:e,...t}){return T.jsx(OT,{"data-slot":"radio-group-item",className:Dt("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:T.jsx(ET,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:T.jsx(RT,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})}const $T=(e={})=>{const{field:t={},form:n={},question:r={},disabled:o=!1}=e;return T.jsx(zT,{onValueChange:t.onChange,value:t.value,className:`bq-radio-group space-y-1 ${n.formState.errors[r.reference_id]?"rounded-md border border-destructive p-3":""}`,children:r.options.map(s=>{const i=`${r.reference_id}-${s.value}`;return T.jsxs(xc,{className:"flex items-center space-x-2 hover:bg-muted/50 rounded-md transition-colors",children:[T.jsx(li,{children:T.jsx(LT,{className:"bq-radio-item w-4 h-4 border focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",value:s.value,id:i,disabled:o})}),T.jsx(Oc,{htmlFor:i,className:"font-normal cursor-pointer",children:s.label})]},s.value)})})};var di="Checkbox",[UT]=Kn(di),[YT,Nc]=UT(di);function jT(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:s,form:i,name:a,onCheckedChange:c,required:u,value:l="on",internal_do_not_use_render:f}=e,[d,h]=Rr({prop:n,defaultProp:o??!1,onChange:c,caller:di}),[m,p]=b.useState(null),[y,g]=b.useState(null),C=b.useRef(!1),O=m?!!i||!!m.closest("form"):!0,w={checked:d,disabled:s,setChecked:h,control:m,setControl:p,name:a,form:i,value:l,hasConsumerStoppedPropagationRef:C,required:u,defaultChecked:gr(o)?!1:o,isFormControl:O,bubbleInput:y,setBubbleInput:g};return T.jsx(YT,{scope:t,...w,children:VT(f)?f(w):r})}var ip="CheckboxTrigger",ap=b.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:s,value:i,disabled:a,checked:c,required:u,setControl:l,setChecked:f,hasConsumerStoppedPropagationRef:d,isFormControl:h,bubbleInput:m}=Nc(ip,e),p=He(o,l),y=b.useRef(c);return b.useEffect(()=>{const g=s?.form;if(g){const C=()=>f(y.current);return g.addEventListener("reset",C),()=>g.removeEventListener("reset",C)}},[s,f]),T.jsx(Ne.button,{type:"button",role:"checkbox","aria-checked":gr(c)?"mixed":c,"aria-required":u,"data-state":hp(c),"data-disabled":a?"":void 0,disabled:a,value:i,...r,ref:p,onKeyDown:Te(t,g=>{g.key==="Enter"&&g.preventDefault()}),onClick:Te(n,g=>{f(C=>gr(C)?!0:!C),m&&h&&(d.current=g.isPropagationStopped(),d.current||g.stopPropagation())})})});ap.displayName=ip;var cp=b.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:s,required:i,disabled:a,value:c,onCheckedChange:u,form:l,...f}=e;return T.jsx(jT,{__scopeCheckbox:n,checked:o,defaultChecked:s,disabled:a,required:i,onCheckedChange:u,name:r,form:l,value:c,internal_do_not_use_render:({isFormControl:d})=>T.jsxs(T.Fragment,{children:[T.jsx(ap,{...f,ref:t,__scopeCheckbox:n}),d&&T.jsx(dp,{__scopeCheckbox:n})]})})});cp.displayName=di;var lp="CheckboxIndicator",up=b.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,s=Nc(lp,n);return T.jsx(pr,{present:r||gr(s.checked)||s.checked===!0,children:T.jsx(Ne.span,{"data-state":hp(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});up.displayName=lp;var fp="CheckboxBubbleInput",dp=b.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:s,defaultChecked:i,required:a,disabled:c,name:u,value:l,form:f,bubbleInput:d,setBubbleInput:h}=Nc(fp,e),m=He(n,h),p=Mc(s),y=Dc(r);b.useEffect(()=>{const C=d;if(!C)return;const O=window.HTMLInputElement.prototype,_=Object.getOwnPropertyDescriptor(O,"checked").set,S=!o.current;if(p!==s&&_){const I=new Event("click",{bubbles:S});C.indeterminate=gr(s),_.call(C,gr(s)?!1:s),C.dispatchEvent(I)}},[d,p,s,o]);const g=b.useRef(gr(s)?!1:s);return T.jsx(Ne.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??g.current,required:a,disabled:c,name:u,value:l,form:f,...t,tabIndex:-1,ref:m,style:{...t.style,...y,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});dp.displayName=fp;function VT(e){return typeof e=="function"}function gr(e){return e==="indeterminate"}function hp(e){return gr(e)?"indeterminate":e?"checked":"unchecked"}function BT({className:e,...t}){return T.jsx(cp,{"data-slot":"checkbox",className:Dt("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:T.jsx(up,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:T.jsx(sp,{className:"size-3.5"})})})}const HT=(e={})=>{const{field:t={},question:n={},disabled:r=!1}=e,{options:o=[]}=n;return o.map((s,i)=>T.jsxs(xc,{className:"flex items-center space-x-1 hover:bg-muted/50 rounded-md transition-colors",children:[T.jsx(li,{children:T.jsx(BT,{className:"bq-checkbox w-4 h-4 border border-input focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",checked:t.value?.includes(s.value),onCheckedChange:a=>a?t.onChange([...t.value||[],s.value]):t.onChange((t.value||[]).filter(c=>c!==s.value)),id:`${n.reference_id}-${s.value}`,disabled:r})}),T.jsx(Oc,{htmlFor:`${n.reference_id}-${s.value}`,className:"flex-1 font-normal cursor-pointer text-sm leading-relaxed",children:s.label})]},i))};function pp(e,[t,n]){return Math.min(n,Math.max(t,e))}function ZT(e,t=globalThis?.document){const n=hr(e);b.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var GT="DismissableLayer",Ic="dismissableLayer.update",qT="dismissableLayer.pointerDownOutside",KT="dismissableLayer.focusOutside",mp,gp=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),hi=b.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...c}=e,u=b.useContext(gp),[l,f]=b.useState(null),d=l?.ownerDocument??globalThis?.document,[,h]=b.useState({}),m=He(t,I=>f(I)),p=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=p.indexOf(y),C=l?p.indexOf(l):-1,O=u.layersWithOutsidePointerEventsDisabled.size>0,w=C>=g,_=QT(I=>{const v=I.target,x=[...u.branches].some(P=>P.contains(v));!w||x||(o?.(I),i?.(I),I.defaultPrevented||a?.())},d),S=eD(I=>{const v=I.target;[...u.branches].some(P=>P.contains(v))||(s?.(I),i?.(I),I.defaultPrevented||a?.())},d);return ZT(I=>{C===u.layers.size-1&&(r?.(I),!I.defaultPrevented&&a&&(I.preventDefault(),a()))},d),b.useEffect(()=>{if(l)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(mp=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(l)),u.layers.add(l),yp(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=mp)}},[l,d,n,u]),b.useEffect(()=>()=>{l&&(u.layers.delete(l),u.layersWithOutsidePointerEventsDisabled.delete(l),yp())},[l,u]),b.useEffect(()=>{const I=()=>h({});return document.addEventListener(Ic,I),()=>document.removeEventListener(Ic,I)},[]),T.jsx(Ne.div,{...c,ref:m,style:{pointerEvents:O?w?"auto":"none":void 0,...e.style},onFocusCapture:Te(e.onFocusCapture,S.onFocusCapture),onBlurCapture:Te(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:Te(e.onPointerDownCapture,_.onPointerDownCapture)})});hi.displayName=GT;var XT="DismissableLayerBranch",JT=b.forwardRef((e,t)=>{const n=b.useContext(gp),r=b.useRef(null),o=He(t,r);return b.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),T.jsx(Ne.div,{...e,ref:o})});JT.displayName=XT;function QT(e,t=globalThis?.document){const n=hr(e),r=b.useRef(!1),o=b.useRef(()=>{});return b.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let c=function(){vp(qT,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function eD(e,t=globalThis?.document){const n=hr(e),r=b.useRef(!1);return b.useEffect(()=>{const o=s=>{s.target&&!r.current&&vp(KT,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function yp(){const e=new CustomEvent(Ic);document.dispatchEvent(e)}function vp(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?YC(o,s):o.dispatchEvent(s)}var Fc=0;function Rc(){b.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??bp()),document.body.insertAdjacentElement("beforeend",e[1]??bp()),Fc++,()=>{Fc===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Fc--}},[])}function bp(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Wc="focusScope.autoFocusOnMount",zc="focusScope.autoFocusOnUnmount",wp={bubbles:!1,cancelable:!0},tD="FocusScope",pi=b.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,c]=b.useState(null),u=hr(o),l=hr(s),f=b.useRef(null),d=He(t,p=>c(p)),h=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(r){let p=function(O){if(h.paused||!a)return;const w=O.target;a.contains(w)?f.current=w:yr(f.current,{select:!0})},y=function(O){if(h.paused||!a)return;const w=O.relatedTarget;w!==null&&(a.contains(w)||yr(f.current,{select:!0}))},g=function(O){if(document.activeElement===document.body)for(const _ of O)_.removedNodes.length>0&&yr(a)};document.addEventListener("focusin",p),document.addEventListener("focusout",y);const C=new MutationObserver(g);return a&&C.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",y),C.disconnect()}}},[r,a,h.paused]),b.useEffect(()=>{if(a){kp.add(h);const p=document.activeElement;if(!a.contains(p)){const g=new CustomEvent(Wc,wp);a.addEventListener(Wc,u),a.dispatchEvent(g),g.defaultPrevented||(nD(aD(_p(a)),{select:!0}),document.activeElement===p&&yr(a))}return()=>{a.removeEventListener(Wc,u),setTimeout(()=>{const g=new CustomEvent(zc,wp);a.addEventListener(zc,l),a.dispatchEvent(g),g.defaultPrevented||yr(p??document.body,{select:!0}),a.removeEventListener(zc,l),kp.remove(h)},0)}}},[a,u,l,h]);const m=b.useCallback(p=>{if(!n&&!r||h.paused)return;const y=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,g=document.activeElement;if(y&&g){const C=p.currentTarget,[O,w]=rD(C);O&&w?!p.shiftKey&&g===w?(p.preventDefault(),n&&yr(O,{select:!0})):p.shiftKey&&g===O&&(p.preventDefault(),n&&yr(w,{select:!0})):g===C&&p.preventDefault()}},[n,r,h.paused]);return T.jsx(Ne.div,{tabIndex:-1,...i,ref:d,onKeyDown:m})});pi.displayName=tD;function nD(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(yr(r,{select:t}),document.activeElement!==n)return}function rD(e){const t=_p(e),n=Sp(t,e),r=Sp(t.reverse(),e);return[n,r]}function _p(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Sp(e,t){for(const n of e)if(!oD(n,{upTo:t}))return n}function oD(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function sD(e){return e instanceof HTMLInputElement&&"select"in e}function yr(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&sD(e)&&t&&e.select()}}var kp=iD();function iD(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=xp(e,t),e.unshift(t)},remove(t){e=xp(e,t),e[0]?.resume()}}}function xp(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function aD(e){return e.filter(t=>t.tagName!=="A")}const cD=["top","right","bottom","left"],vr=Math.min,Gt=Math.max,mi=Math.round,gi=Math.floor,Dn=e=>({x:e,y:e}),lD={left:"right",right:"left",bottom:"top",top:"bottom"},uD={start:"end",end:"start"};function Lc(e,t,n){return Gt(e,vr(t,n))}function Xn(e,t){return typeof e=="function"?e(t):e}function Jn(e){return e.split("-")[0]}function ao(e){return e.split("-")[1]}function $c(e){return e==="x"?"y":"x"}function Uc(e){return e==="y"?"height":"width"}const fD=new Set(["top","bottom"]);function Mn(e){return fD.has(Jn(e))?"y":"x"}function Yc(e){return $c(Mn(e))}function dD(e,t,n){n===void 0&&(n=!1);const r=ao(e),o=Yc(e),s=Uc(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=yi(i)),[i,yi(i)]}function hD(e){const t=yi(e);return[jc(e),t,jc(t)]}function jc(e){return e.replace(/start|end/g,t=>uD[t])}const Op=["left","right"],Ep=["right","left"],pD=["top","bottom"],mD=["bottom","top"];function gD(e,t,n){switch(e){case"top":case"bottom":return n?t?Ep:Op:t?Op:Ep;case"left":case"right":return t?pD:mD;default:return[]}}function yD(e,t,n,r){const o=ao(e);let s=gD(Jn(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(jc)))),s}function yi(e){return e.replace(/left|right|bottom|top/g,t=>lD[t])}function vD(e){return{top:0,right:0,bottom:0,left:0,...e}}function Cp(e){return typeof e!="number"?vD(e):{top:e,right:e,bottom:e,left:e}}function vi(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Tp(e,t,n){let{reference:r,floating:o}=e;const s=Mn(t),i=Yc(t),a=Uc(i),c=Jn(t),u=s==="y",l=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,d=r[a]/2-o[a]/2;let h;switch(c){case"top":h={x:l,y:r.y-o.height};break;case"bottom":h={x:l,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:f};break;case"left":h={x:r.x-o.width,y:f};break;default:h={x:r.x,y:r.y}}switch(ao(t)){case"start":h[i]-=d*(n&&u?-1:1);break;case"end":h[i]+=d*(n&&u?-1:1);break}return h}async function bD(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:l="viewport",elementContext:f="floating",altBoundary:d=!1,padding:h=0}=Xn(t,e),m=Cp(h),y=a[d?f==="floating"?"reference":"floating":f],g=vi(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(y)))==null||n?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:l,strategy:c})),C=f==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,O=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),w=await(s.isElement==null?void 0:s.isElement(O))?await(s.getScale==null?void 0:s.getScale(O))||{x:1,y:1}:{x:1,y:1},_=vi(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:C,offsetParent:O,strategy:c}):C);return{top:(g.top-_.top+m.top)/w.y,bottom:(_.bottom-g.bottom+m.bottom)/w.y,left:(g.left-_.left+m.left)/w.x,right:(_.right-g.right+m.right)/w.x}}const wD=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:l,y:f}=Tp(u,r,c),d=r,h={},m=0;for(let y=0;y<a.length;y++){var p;const{name:g,fn:C}=a[y],{x:O,y:w,data:_,reset:S}=await C({x:l,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:h,rects:u,platform:{...i,detectOverflow:(p=i.detectOverflow)!=null?p:bD},elements:{reference:e,floating:t}});l=O??l,f=w??f,h={...h,[g]:{...h[g],..._}},S&&m<=50&&(m++,typeof S=="object"&&(S.placement&&(d=S.placement),S.rects&&(u=S.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:l,y:f}=Tp(u,d,c)),y=-1)}return{x:l,y:f,placement:d,strategy:o,middlewareData:h}},_D=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:c}=t,{element:u,padding:l=0}=Xn(e,t)||{};if(u==null)return{};const f=Cp(l),d={x:n,y:r},h=Yc(o),m=Uc(h),p=await i.getDimensions(u),y=h==="y",g=y?"top":"left",C=y?"bottom":"right",O=y?"clientHeight":"clientWidth",w=s.reference[m]+s.reference[h]-d[h]-s.floating[m],_=d[h]-s.reference[h],S=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let I=S?S[O]:0;(!I||!await(i.isElement==null?void 0:i.isElement(S)))&&(I=a.floating[O]||s.floating[m]);const v=w/2-_/2,x=I/2-p[m]/2-1,P=vr(f[g],x),M=vr(f[C],x),A=P,F=I-p[m]-M,N=I/2-p[m]/2+v,W=Lc(A,N,F),E=!c.arrow&&ao(o)!=null&&N!==W&&s.reference[m]/2-(N<A?P:M)-p[m]/2<0,k=E?N<A?N-A:N-F:0;return{[h]:d[h]+k,data:{[h]:W,centerOffset:N-W-k,...E&&{alignmentOffset:k}},reset:E}}}),SD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:c,elements:u}=t,{mainAxis:l=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:p=!0,...y}=Xn(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const g=Jn(o),C=Mn(a),O=Jn(a)===a,w=await(c.isRTL==null?void 0:c.isRTL(u.floating)),_=d||(O||!p?[yi(a)]:hD(a)),S=m!=="none";!d&&S&&_.push(...yD(a,p,m,w));const I=[a,..._],v=await c.detectOverflow(t,y),x=[];let P=((r=s.flip)==null?void 0:r.overflows)||[];if(l&&x.push(v[g]),f){const N=dD(o,i,w);x.push(v[N[0]],v[N[1]])}if(P=[...P,{placement:o,overflows:x}],!x.every(N=>N<=0)){var M,A;const N=(((M=s.flip)==null?void 0:M.index)||0)+1,W=I[N];if(W&&(!(f==="alignment"?C!==Mn(W):!1)||P.every(U=>Mn(U.placement)===C?U.overflows[0]>0:!0)))return{data:{index:N,overflows:P},reset:{placement:W}};let E=(A=P.filter(k=>k.overflows[0]<=0).sort((k,U)=>k.overflows[1]-U.overflows[1])[0])==null?void 0:A.placement;if(!E)switch(h){case"bestFit":{var F;const k=(F=P.filter(U=>{if(S){const $=Mn(U.placement);return $===C||$==="y"}return!0}).map(U=>[U.placement,U.overflows.filter($=>$>0).reduce(($,D)=>$+D,0)]).sort((U,$)=>U[1]-$[1])[0])==null?void 0:F[0];k&&(E=k);break}case"initialPlacement":E=a;break}if(o!==E)return{reset:{placement:E}}}return{}}}};function Dp(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Mp(e){return cD.some(t=>e[t]>=0)}const kD=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...s}=Xn(e,t);switch(o){case"referenceHidden":{const i=await r.detectOverflow(t,{...s,elementContext:"reference"}),a=Dp(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Mp(a)}}}case"escaped":{const i=await r.detectOverflow(t,{...s,altBoundary:!0}),a=Dp(i,n.floating);return{data:{escapedOffsets:a,escaped:Mp(a)}}}default:return{}}}}},Ap=new Set(["left","top"]);async function xD(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Jn(n),a=ao(n),c=Mn(n)==="y",u=Ap.has(i)?-1:1,l=s&&c?-1:1,f=Xn(t,e);let{mainAxis:d,crossAxis:h,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof m=="number"&&(h=a==="end"?m*-1:m),c?{x:h*l,y:d*u}:{x:d*u,y:h*l}}const OD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,c=await xD(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:i}}}}},ED=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:s}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:c={fn:g=>{let{x:C,y:O}=g;return{x:C,y:O}}},...u}=Xn(e,t),l={x:n,y:r},f=await s.detectOverflow(t,u),d=Mn(Jn(o)),h=$c(d);let m=l[h],p=l[d];if(i){const g=h==="y"?"top":"left",C=h==="y"?"bottom":"right",O=m+f[g],w=m-f[C];m=Lc(O,m,w)}if(a){const g=d==="y"?"top":"left",C=d==="y"?"bottom":"right",O=p+f[g],w=p-f[C];p=Lc(O,p,w)}const y=c.fn({...t,[h]:m,[d]:p});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[h]:i,[d]:a}}}}}},CD=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:c=!0,crossAxis:u=!0}=Xn(e,t),l={x:n,y:r},f=Mn(o),d=$c(f);let h=l[d],m=l[f];const p=Xn(a,t),y=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(c){const O=d==="y"?"height":"width",w=s.reference[d]-s.floating[O]+y.mainAxis,_=s.reference[d]+s.reference[O]-y.mainAxis;h<w?h=w:h>_&&(h=_)}if(u){var g,C;const O=d==="y"?"width":"height",w=Ap.has(Jn(o)),_=s.reference[f]-s.floating[O]+(w&&((g=i.offset)==null?void 0:g[f])||0)+(w?0:y.crossAxis),S=s.reference[f]+s.reference[O]+(w?0:((C=i.offset)==null?void 0:C[f])||0)-(w?y.crossAxis:0);m<_?m=_:m>S&&(m=S)}return{[d]:h,[f]:m}}}},TD=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:i,elements:a}=t,{apply:c=()=>{},...u}=Xn(e,t),l=await i.detectOverflow(t,u),f=Jn(o),d=ao(o),h=Mn(o)==="y",{width:m,height:p}=s.floating;let y,g;f==="top"||f==="bottom"?(y=f,g=d===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(g=f,y=d==="end"?"top":"bottom");const C=p-l.top-l.bottom,O=m-l.left-l.right,w=vr(p-l[y],C),_=vr(m-l[g],O),S=!t.middlewareData.shift;let I=w,v=_;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(v=O),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(I=C),S&&!d){const P=Gt(l.left,0),M=Gt(l.right,0),A=Gt(l.top,0),F=Gt(l.bottom,0);h?v=m-2*(P!==0||M!==0?P+M:Gt(l.left,l.right)):I=p-2*(A!==0||F!==0?A+F:Gt(l.top,l.bottom))}await c({...t,availableWidth:v,availableHeight:I});const x=await i.getDimensions(a.floating);return m!==x.width||p!==x.height?{reset:{rects:!0}}:{}}}};function bi(){return typeof window<"u"}function co(e){return Pp(e)?(e.nodeName||"").toLowerCase():"#document"}function qt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function An(e){var t;return(t=(Pp(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Pp(e){return bi()?e instanceof Node||e instanceof qt(e).Node:!1}function mn(e){return bi()?e instanceof Element||e instanceof qt(e).Element:!1}function Pn(e){return bi()?e instanceof HTMLElement||e instanceof qt(e).HTMLElement:!1}function Np(e){return!bi()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof qt(e).ShadowRoot}const DD=new Set(["inline","contents"]);function Jo(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=gn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!DD.has(o)}const MD=new Set(["table","td","th"]);function AD(e){return MD.has(co(e))}const PD=[":popover-open",":modal"];function wi(e){return PD.some(t=>{try{return e.matches(t)}catch{return!1}})}const ND=["transform","translate","scale","rotate","perspective"],ID=["transform","translate","scale","rotate","perspective","filter"],FD=["paint","layout","strict","content"];function Vc(e){const t=Bc(),n=mn(e)?gn(e):e;return ND.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||ID.some(r=>(n.willChange||"").includes(r))||FD.some(r=>(n.contain||"").includes(r))}function RD(e){let t=br(e);for(;Pn(t)&&!lo(t);){if(Vc(t))return t;if(wi(t))return null;t=br(t)}return null}function Bc(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const WD=new Set(["html","body","#document"]);function lo(e){return WD.has(co(e))}function gn(e){return qt(e).getComputedStyle(e)}function _i(e){return mn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function br(e){if(co(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Np(e)&&e.host||An(e);return Np(t)?t.host:t}function Ip(e){const t=br(e);return lo(t)?e.ownerDocument?e.ownerDocument.body:e.body:Pn(t)&&Jo(t)?t:Ip(t)}function Qo(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Ip(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=qt(o);if(s){const a=Hc(i);return t.concat(i,i.visualViewport||[],Jo(o)?o:[],a&&n?Qo(a):[])}return t.concat(o,Qo(o,[],n))}function Hc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Fp(e){const t=gn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Pn(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=mi(n)!==s||mi(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function Zc(e){return mn(e)?e:e.contextElement}function uo(e){const t=Zc(e);if(!Pn(t))return Dn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Fp(t);let i=(s?mi(n.width):n.width)/r,a=(s?mi(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const zD=Dn(0);function Rp(e){const t=qt(e);return!Bc()||!t.visualViewport?zD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function LD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==qt(e)?!1:t}function Wr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Zc(e);let i=Dn(1);t&&(r?mn(r)&&(i=uo(r)):i=uo(e));const a=LD(s,n,r)?Rp(s):Dn(0);let c=(o.left+a.x)/i.x,u=(o.top+a.y)/i.y,l=o.width/i.x,f=o.height/i.y;if(s){const d=qt(s),h=r&&mn(r)?qt(r):r;let m=d,p=Hc(m);for(;p&&r&&h!==m;){const y=uo(p),g=p.getBoundingClientRect(),C=gn(p),O=g.left+(p.clientLeft+parseFloat(C.paddingLeft))*y.x,w=g.top+(p.clientTop+parseFloat(C.paddingTop))*y.y;c*=y.x,u*=y.y,l*=y.x,f*=y.y,c+=O,u+=w,m=qt(p),p=Hc(m)}}return vi({width:l,height:f,x:c,y:u})}function Si(e,t){const n=_i(e).scrollLeft;return t?t.left+n:Wr(An(e)).left+n}function Wp(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Si(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function $D(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=An(r),a=t?wi(t.floating):!1;if(r===i||a&&s)return n;let c={scrollLeft:0,scrollTop:0},u=Dn(1);const l=Dn(0),f=Pn(r);if((f||!f&&!s)&&((co(r)!=="body"||Jo(i))&&(c=_i(r)),Pn(r))){const h=Wr(r);u=uo(r),l.x=h.x+r.clientLeft,l.y=h.y+r.clientTop}const d=i&&!f&&!s?Wp(i,c):Dn(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+l.x+d.x,y:n.y*u.y-c.scrollTop*u.y+l.y+d.y}}function UD(e){return Array.from(e.getClientRects())}function YD(e){const t=An(e),n=_i(e),r=e.ownerDocument.body,o=Gt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Gt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Si(e);const a=-n.scrollTop;return gn(r).direction==="rtl"&&(i+=Gt(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}const zp=25;function jD(e,t){const n=qt(e),r=An(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,c=0;if(o){s=o.width,i=o.height;const l=Bc();(!l||l&&t==="fixed")&&(a=o.offsetLeft,c=o.offsetTop)}const u=Si(r);if(u<=0){const l=r.ownerDocument,f=l.body,d=getComputedStyle(f),h=l.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,m=Math.abs(r.clientWidth-f.clientWidth-h);m<=zp&&(s-=m)}else u<=zp&&(s+=u);return{width:s,height:i,x:a,y:c}}const VD=new Set(["absolute","fixed"]);function BD(e,t){const n=Wr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=Pn(e)?uo(e):Dn(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,c=o*s.x,u=r*s.y;return{width:i,height:a,x:c,y:u}}function Lp(e,t,n){let r;if(t==="viewport")r=jD(e,n);else if(t==="document")r=YD(An(e));else if(mn(t))r=BD(t,n);else{const o=Rp(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return vi(r)}function $p(e,t){const n=br(e);return n===t||!mn(n)||lo(n)?!1:gn(n).position==="fixed"||$p(n,t)}function HD(e,t){const n=t.get(e);if(n)return n;let r=Qo(e,[],!1).filter(a=>mn(a)&&co(a)!=="body"),o=null;const s=gn(e).position==="fixed";let i=s?br(e):e;for(;mn(i)&&!lo(i);){const a=gn(i),c=Vc(i);!c&&a.position==="fixed"&&(o=null),(s?!c&&!o:!c&&a.position==="static"&&!!o&&VD.has(o.position)||Jo(i)&&!c&&$p(e,i))?r=r.filter(l=>l!==i):o=a,i=br(i)}return t.set(e,r),r}function ZD(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?wi(t)?[]:HD(t,this._c):[].concat(n),r],a=i[0],c=i.reduce((u,l)=>{const f=Lp(t,l,o);return u.top=Gt(f.top,u.top),u.right=vr(f.right,u.right),u.bottom=vr(f.bottom,u.bottom),u.left=Gt(f.left,u.left),u},Lp(t,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function GD(e){const{width:t,height:n}=Fp(e);return{width:t,height:n}}function qD(e,t,n){const r=Pn(t),o=An(t),s=n==="fixed",i=Wr(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const c=Dn(0);function u(){c.x=Si(o)}if(r||!r&&!s)if((co(t)!=="body"||Jo(o))&&(a=_i(t)),r){const h=Wr(t,!0,s,t);c.x=h.x+t.clientLeft,c.y=h.y+t.clientTop}else o&&u();s&&!r&&o&&u();const l=o&&!r&&!s?Wp(o,a):Dn(0),f=i.left+a.scrollLeft-c.x-l.x,d=i.top+a.scrollTop-c.y-l.y;return{x:f,y:d,width:i.width,height:i.height}}function Gc(e){return gn(e).position==="static"}function Up(e,t){if(!Pn(e)||gn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return An(e)===n&&(n=n.ownerDocument.body),n}function Yp(e,t){const n=qt(e);if(wi(e))return n;if(!Pn(e)){let o=br(e);for(;o&&!lo(o);){if(mn(o)&&!Gc(o))return o;o=br(o)}return n}let r=Up(e,t);for(;r&&AD(r)&&Gc(r);)r=Up(r,t);return r&&lo(r)&&Gc(r)&&!Vc(r)?n:r||RD(e)||n}const KD=async function(e){const t=this.getOffsetParent||Yp,n=this.getDimensions,r=await n(e.floating);return{reference:qD(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function XD(e){return gn(e).direction==="rtl"}const JD={convertOffsetParentRelativeRectToViewportRelativeRect:$D,getDocumentElement:An,getClippingRect:ZD,getOffsetParent:Yp,getElementRects:KD,getClientRects:UD,getDimensions:GD,getScale:uo,isElement:mn,isRTL:XD};function jp(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function QD(e,t){let n=null,r;const o=An(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const u=e.getBoundingClientRect(),{left:l,top:f,width:d,height:h}=u;if(a||t(),!d||!h)return;const m=gi(f),p=gi(o.clientWidth-(l+d)),y=gi(o.clientHeight-(f+h)),g=gi(l),O={rootMargin:-m+"px "+-p+"px "+-y+"px "+-g+"px",threshold:Gt(0,vr(1,c))||1};let w=!0;function _(S){const I=S[0].intersectionRatio;if(I!==c){if(!w)return i();I?i(!1,I):r=setTimeout(()=>{i(!1,1e-7)},1e3)}I===1&&!jp(u,e.getBoundingClientRect())&&i(),w=!1}try{n=new IntersectionObserver(_,{...O,root:o.ownerDocument})}catch{n=new IntersectionObserver(_,O)}n.observe(e)}return i(!0),s}function eM(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=Zc(e),l=o||s?[...u?Qo(u):[],...Qo(t)]:[];l.forEach(g=>{o&&g.addEventListener("scroll",n,{passive:!0}),s&&g.addEventListener("resize",n)});const f=u&&a?QD(u,n):null;let d=-1,h=null;i&&(h=new ResizeObserver(g=>{let[C]=g;C&&C.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var O;(O=h)==null||O.observe(t)})),n()}),u&&!c&&h.observe(u),h.observe(t));let m,p=c?Wr(e):null;c&&y();function y(){const g=Wr(e);p&&!jp(p,g)&&n(),p=g,m=requestAnimationFrame(y)}return n(),()=>{var g;l.forEach(C=>{o&&C.removeEventListener("scroll",n),s&&C.removeEventListener("resize",n)}),f?.(),(g=h)==null||g.disconnect(),h=null,c&&cancelAnimationFrame(m)}}const tM=OD,nM=ED,rM=SD,oM=TD,sM=kD,Vp=_D,iM=CD,aM=(e,t,n)=>{const r=new Map,o={platform:JD,...n},s={...o.platform,_c:r};return wD(e,t,{...o,platform:s})};var cM=typeof document<"u",lM=function(){},ki=cM?j.useLayoutEffect:lM;function xi(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!xi(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!xi(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Bp(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Hp(e,t){const n=Bp(e);return Math.round(t*n)/n}function qc(e){const t=b.useRef(e);return ki(()=>{t.current=e}),t}function uM(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:c,open:u}=e,[l,f]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,h]=b.useState(r);xi(d,r)||h(r);const[m,p]=b.useState(null),[y,g]=b.useState(null),C=b.useCallback(U=>{U!==S.current&&(S.current=U,p(U))},[]),O=b.useCallback(U=>{U!==I.current&&(I.current=U,g(U))},[]),w=s||m,_=i||y,S=b.useRef(null),I=b.useRef(null),v=b.useRef(l),x=c!=null,P=qc(c),M=qc(o),A=qc(u),F=b.useCallback(()=>{if(!S.current||!I.current)return;const U={placement:t,strategy:n,middleware:d};M.current&&(U.platform=M.current),aM(S.current,I.current,U).then($=>{const D={...$,isPositioned:A.current!==!1};N.current&&!xi(v.current,D)&&(v.current=D,ms.flushSync(()=>{f(D)}))})},[d,t,n,M,A]);ki(()=>{u===!1&&v.current.isPositioned&&(v.current.isPositioned=!1,f(U=>({...U,isPositioned:!1})))},[u]);const N=b.useRef(!1);ki(()=>(N.current=!0,()=>{N.current=!1}),[]),ki(()=>{if(w&&(S.current=w),_&&(I.current=_),w&&_){if(P.current)return P.current(w,_,F);F()}},[w,_,F,P,x]);const W=b.useMemo(()=>({reference:S,floating:I,setReference:C,setFloating:O}),[C,O]),E=b.useMemo(()=>({reference:w,floating:_}),[w,_]),k=b.useMemo(()=>{const U={position:n,left:0,top:0};if(!E.floating)return U;const $=Hp(E.floating,l.x),D=Hp(E.floating,l.y);return a?{...U,transform:"translate("+$+"px, "+D+"px)",...Bp(E.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:$,top:D}},[n,a,E.floating,l.x,l.y]);return b.useMemo(()=>({...l,update:F,refs:W,elements:E,floatingStyles:k}),[l,F,W,E,k])}const fM=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Vp({element:r.current,padding:o}).fn(n):{}:r?Vp({element:r,padding:o}).fn(n):{}}}},dM=(e,t)=>({...tM(e),options:[e,t]}),hM=(e,t)=>({...nM(e),options:[e,t]}),pM=(e,t)=>({...iM(e),options:[e,t]}),mM=(e,t)=>({...rM(e),options:[e,t]}),gM=(e,t)=>({...oM(e),options:[e,t]}),yM=(e,t)=>({...sM(e),options:[e,t]}),vM=(e,t)=>({...fM(e),options:[e,t]});var bM="Arrow",Zp=b.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return T.jsx(Ne.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:T.jsx("polygon",{points:"0,0 30,0 15,10"})})});Zp.displayName=bM;var wM=Zp,Kc="Popper",[Gp,Oi]=Kn(Kc),[_M,qp]=Gp(Kc),Kp=e=>{const{__scopePopper:t,children:n}=e,[r,o]=b.useState(null);return T.jsx(_M,{scope:t,anchor:r,onAnchorChange:o,children:n})};Kp.displayName=Kc;var Xp="PopperAnchor",Jp=b.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=qp(Xp,n),i=b.useRef(null),a=He(t,i),c=b.useRef(null);return b.useEffect(()=>{const u=c.current;c.current=r?.current||i.current,u!==c.current&&s.onAnchorChange(c.current)}),r?null:T.jsx(Ne.div,{...o,ref:a})});Jp.displayName=Xp;var Xc="PopperContent",[SM,kM]=Gp(Xc),Qp=b.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:l=0,sticky:f="partial",hideWhenDetached:d=!1,updatePositionStrategy:h="optimized",onPlaced:m,...p}=e,y=qp(Xc,n),[g,C]=b.useState(null),O=He(t,q=>C(q)),[w,_]=b.useState(null),S=Dc(w),I=S?.width??0,v=S?.height??0,x=r+(s!=="center"?"-"+s:""),P=typeof l=="number"?l:{top:0,right:0,bottom:0,left:0,...l},M=Array.isArray(u)?u:[u],A=M.length>0,F={padding:P,boundary:M.filter(OM),altBoundary:A},{refs:N,floatingStyles:W,placement:E,isPositioned:k,middlewareData:U}=uM({strategy:"fixed",placement:x,whileElementsMounted:(...q)=>eM(...q,{animationFrame:h==="always"}),elements:{reference:y.anchor},middleware:[dM({mainAxis:o+v,alignmentAxis:i}),c&&hM({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?pM():void 0,...F}),c&&mM({...F}),gM({...F,apply:({elements:q,rects:oe,availableWidth:Q,availableHeight:re})=>{const{width:le,height:K}=oe.reference,Se=q.floating.style;Se.setProperty("--radix-popper-available-width",`${Q}px`),Se.setProperty("--radix-popper-available-height",`${re}px`),Se.setProperty("--radix-popper-anchor-width",`${le}px`),Se.setProperty("--radix-popper-anchor-height",`${K}px`)}}),w&&vM({element:w,padding:a}),EM({arrowWidth:I,arrowHeight:v}),d&&yM({strategy:"referenceHidden",...F})]}),[$,D]=nm(E),V=hr(m);Mt(()=>{k&&V?.()},[k,V]);const Z=U.arrow?.x,G=U.arrow?.y,B=U.arrow?.centerOffset!==0,[z,X]=b.useState();return Mt(()=>{g&&X(window.getComputedStyle(g).zIndex)},[g]),T.jsx("div",{ref:N.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:k?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:z,"--radix-popper-transform-origin":[U.transformOrigin?.x,U.transformOrigin?.y].join(" "),...U.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:T.jsx(SM,{scope:n,placedSide:$,onArrowChange:_,arrowX:Z,arrowY:G,shouldHideArrow:B,children:T.jsx(Ne.div,{"data-side":$,"data-align":D,...p,ref:O,style:{...p.style,animation:k?void 0:"none"}})})})});Qp.displayName=Xc;var em="PopperArrow",xM={top:"bottom",right:"left",bottom:"top",left:"right"},tm=b.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=kM(em,r),i=xM[s.placedSide];return T.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:T.jsx(wM,{...o,ref:n,style:{...o.style,display:"block"}})})});tm.displayName=em;function OM(e){return e!==null}var EM=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=o.arrow?.centerOffset!==0,a=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[u,l]=nm(n),f={start:"0%",center:"50%",end:"100%"}[l],d=(o.arrow?.x??0)+a/2,h=(o.arrow?.y??0)+c/2;let m="",p="";return u==="bottom"?(m=i?f:`${d}px`,p=`${-c}px`):u==="top"?(m=i?f:`${d}px`,p=`${r.floating.height+c}px`):u==="right"?(m=`${-c}px`,p=i?f:`${h}px`):u==="left"&&(m=`${r.floating.width+c}px`,p=i?f:`${h}px`),{data:{x:m,y:p}}}});function nm(e){const[t,n="center"]=e.split("-");return[t,n]}var rm=Kp,Jc=Jp,om=Qp,sm=tm,CM="Portal",Ei=b.forwardRef((e,t)=>{const{container:n,...r}=e,[o,s]=b.useState(!1);Mt(()=>s(!0),[]);const i=n||o&&globalThis?.document?.body;return i?Pu.createPortal(T.jsx(Ne.div,{...r,ref:t}),i):null});Ei.displayName=CM;function TM(e){const t=DM(e),n=b.forwardRef((r,o)=>{const{children:s,...i}=r,a=b.Children.toArray(s),c=a.find(AM);if(c){const u=c.props.children,l=a.map(f=>f===c?b.Children.count(u)>1?b.Children.only(null):b.isValidElement(u)?u.props.children:null:f);return T.jsx(t,{...i,ref:o,children:b.isValidElement(u)?b.cloneElement(u,void 0,l):null})}return T.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function DM(e){const t=b.forwardRef((n,r)=>{const{children:o,...s}=n;if(b.isValidElement(o)){const i=NM(o),a=PM(s,o.props);return o.type!==b.Fragment&&(a.ref=r?Nr(r,i):i),b.cloneElement(o,a)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var MM=Symbol("radix.slottable");function AM(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===MM}function PM(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const c=s(...a);return o(...a),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function NM(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var im=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),IM="VisuallyHidden",FM=b.forwardRef((e,t)=>T.jsx(Ne.span,{...e,ref:t,style:{...im,...e.style}}));FM.displayName=IM;var RM=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},fo=new WeakMap,Ci=new WeakMap,Ti={},Qc=0,am=function(e){return e&&(e.host||am(e.parentNode))},WM=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=am(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},zM=function(e,t,n,r){var o=WM(t,Array.isArray(e)?e:[e]);Ti[n]||(Ti[n]=new WeakMap);var s=Ti[n],i=[],a=new Set,c=new Set(o),u=function(f){!f||a.has(f)||(a.add(f),u(f.parentNode))};o.forEach(u);var l=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(d){if(a.has(d))l(d);else try{var h=d.getAttribute(r),m=h!==null&&h!=="false",p=(fo.get(d)||0)+1,y=(s.get(d)||0)+1;fo.set(d,p),s.set(d,y),i.push(d),p===1&&m&&Ci.set(d,!0),y===1&&d.setAttribute(n,"true"),m||d.setAttribute(r,"true")}catch(g){console.error("aria-hidden: cannot operate on ",d,g)}})};return l(t),a.clear(),Qc++,function(){i.forEach(function(f){var d=fo.get(f)-1,h=s.get(f)-1;fo.set(f,d),s.set(f,h),d||(Ci.has(f)||f.removeAttribute(r),Ci.delete(f)),h||f.removeAttribute(n)}),Qc--,Qc||(fo=new WeakMap,fo=new WeakMap,Ci=new WeakMap,Ti={})}},el=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=RM(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),zM(r,o,n,"aria-hidden")):function(){return null}},Nn=function(){return Nn=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Nn.apply(this,arguments)};function cm(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function LM(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Di="right-scroll-bar-position",Mi="width-before-scroll-bar",$M="with-scroll-bars-hidden",UM="--removed-body-scroll-bar-size";function tl(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function YM(e,t){var n=j.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var jM=typeof window<"u"?b.useLayoutEffect:b.useEffect,lm=new WeakMap;function VM(e,t){var n=YM(null,function(r){return e.forEach(function(o){return tl(o,r)})});return jM(function(){var r=lm.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||tl(a,null)}),s.forEach(function(a){o.has(a)||tl(a,i)})}lm.set(n,e)},[e]),n}function BM(e){return e}function HM(e,t){t===void 0&&(t=BM);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var i=t(s,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var c=function(){var l=i;i=[],l.forEach(s)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(l){i.push(l),u()},filter:function(l){return i=i.filter(l),n}}}};return o}function ZM(e){e===void 0&&(e={});var t=HM(null);return t.options=Nn({async:!0,ssr:!1},e),t}var um=function(e){var t=e.sideCar,n=cm(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return b.createElement(r,Nn({},n))};um.isSideCarExport=!0;function GM(e,t){return e.useMedium(t),um}var fm=ZM(),nl=function(){},Ai=b.forwardRef(function(e,t){var n=b.useRef(null),r=b.useState({onScrollCapture:nl,onWheelCapture:nl,onTouchMoveCapture:nl}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,c=e.className,u=e.removeScrollBar,l=e.enabled,f=e.shards,d=e.sideCar,h=e.noRelative,m=e.noIsolation,p=e.inert,y=e.allowPinchZoom,g=e.as,C=g===void 0?"div":g,O=e.gapMode,w=cm(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=d,S=VM([n,t]),I=Nn(Nn({},w),o);return b.createElement(b.Fragment,null,l&&b.createElement(_,{sideCar:fm,removeScrollBar:u,shards:f,noRelative:h,noIsolation:m,inert:p,setCallbacks:s,allowPinchZoom:!!y,lockRef:n,gapMode:O}),i?b.cloneElement(b.Children.only(a),Nn(Nn({},I),{ref:S})):b.createElement(C,Nn({},I,{className:c,ref:S}),a))});Ai.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Ai.classNames={fullWidth:Mi,zeroRight:Di};var qM=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function KM(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=qM();return t&&e.setAttribute("nonce",t),e}function XM(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function JM(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var QM=function(){var e=0,t=null;return{add:function(n){e==0&&(t=KM())&&(XM(t,n),JM(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},eA=function(){var e=QM();return function(t,n){b.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},dm=function(){var e=eA(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},tA={left:0,top:0,right:0,gap:0},rl=function(e){return parseInt(e||"",10)||0},nA=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[rl(n),rl(r),rl(o)]},rA=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return tA;var t=nA(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},oA=dm(),ho="data-scroll-locked",sA=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
44
+ .`.concat($M,` {
45
45
  overflow: hidden `).concat(r,`;
46
46
  padding-right: `).concat(a,"px ").concat(r,`;
47
47
  }
@@ -62,7 +62,7 @@ Arguments: `+Array.prototype.slice.call(r).join("")+`
62
62
  right: `).concat(a,"px ").concat(r,`;
63
63
  }
64
64
 
65
- .`).concat(Ai,` {
65
+ .`).concat(Mi,` {
66
66
  margin-right: `).concat(a,"px ").concat(r,`;
67
67
  }
68
68
 
@@ -70,17 +70,17 @@ Arguments: `+Array.prototype.slice.call(r).join("")+`
70
70
  right: 0 `).concat(r,`;
71
71
  }
72
72
 
73
- .`).concat(Ai," .").concat(Ai,` {
73
+ .`).concat(Mi," .").concat(Mi,` {
74
74
  margin-right: 0 `).concat(r,`;
75
75
  }
76
76
 
77
77
  body[`).concat(ho,`] {
78
- `).concat(UA,": ").concat(a,`px;
78
+ `).concat(UM,": ").concat(a,`px;
79
79
  }
80
- `)},hm=function(){var e=parseInt(document.body.getAttribute(ho)||"0",10);return isFinite(e)?e:0},iM=function(){b.useEffect(function(){return document.body.setAttribute(ho,(hm()+1).toString()),function(){var e=hm()-1;e<=0?document.body.removeAttribute(ho):document.body.setAttribute(ho,e.toString())}},[])},aM=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;iM();var s=b.useMemo(function(){return rM(o)},[o]);return b.createElement(oM,{styles:sM(s,!t,o,n?"":"!important")})},ol=!1;if(typeof window<"u")try{var Pi=Object.defineProperty({},"passive",{get:function(){return ol=!0,!0}});window.addEventListener("test",Pi,Pi),window.removeEventListener("test",Pi,Pi)}catch{ol=!1}var po=ol?{passive:!1}:!1,cM=function(e){return e.tagName==="TEXTAREA"},pm=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!cM(e)&&n[t]==="visible")},lM=function(e){return pm(e,"overflowY")},uM=function(e){return pm(e,"overflowX")},mm=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=gm(e,r);if(o){var s=ym(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},fM=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},dM=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},gm=function(e,t){return e==="v"?lM(t):uM(t)},ym=function(e,t){return e==="v"?fM(t):dM(t)},hM=function(e,t){return e==="h"&&t==="rtl"?-1:1},pM=function(e,t,n,r,o){var s=hM(e,window.getComputedStyle(t).direction),i=s*r,a=n.target,c=t.contains(a),u=!1,l=i>0,f=0,d=0;do{if(!a)break;var h=ym(e,a),m=h[0],p=h[1],y=h[2],g=p-y-s*m;(m||g)&&gm(e,a)&&(f+=g,d+=m);var C=a.parentNode;a=C&&C.nodeType===Node.DOCUMENT_FRAGMENT_NODE?C.host:C}while(!c&&a!==document.body||c&&(t.contains(a)||t===a));return(l&&Math.abs(f)<1||!l&&Math.abs(d)<1)&&(u=!0),u},Ni=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},vm=function(e){return[e.deltaX,e.deltaY]},bm=function(e){return e&&"current"in e?e.current:e},mM=function(e,t){return e[0]===t[0]&&e[1]===t[1]},gM=function(e){return`
80
+ `)},hm=function(){var e=parseInt(document.body.getAttribute(ho)||"0",10);return isFinite(e)?e:0},iA=function(){b.useEffect(function(){return document.body.setAttribute(ho,(hm()+1).toString()),function(){var e=hm()-1;e<=0?document.body.removeAttribute(ho):document.body.setAttribute(ho,e.toString())}},[])},aA=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;iA();var s=b.useMemo(function(){return rA(o)},[o]);return b.createElement(oA,{styles:sA(s,!t,o,n?"":"!important")})},ol=!1;if(typeof window<"u")try{var Pi=Object.defineProperty({},"passive",{get:function(){return ol=!0,!0}});window.addEventListener("test",Pi,Pi),window.removeEventListener("test",Pi,Pi)}catch{ol=!1}var po=ol?{passive:!1}:!1,cA=function(e){return e.tagName==="TEXTAREA"},pm=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!cA(e)&&n[t]==="visible")},lA=function(e){return pm(e,"overflowY")},uA=function(e){return pm(e,"overflowX")},mm=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=gm(e,r);if(o){var s=ym(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},fA=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},dA=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},gm=function(e,t){return e==="v"?lA(t):uA(t)},ym=function(e,t){return e==="v"?fA(t):dA(t)},hA=function(e,t){return e==="h"&&t==="rtl"?-1:1},pA=function(e,t,n,r,o){var s=hA(e,window.getComputedStyle(t).direction),i=s*r,a=n.target,c=t.contains(a),u=!1,l=i>0,f=0,d=0;do{if(!a)break;var h=ym(e,a),m=h[0],p=h[1],y=h[2],g=p-y-s*m;(m||g)&&gm(e,a)&&(f+=g,d+=m);var C=a.parentNode;a=C&&C.nodeType===Node.DOCUMENT_FRAGMENT_NODE?C.host:C}while(!c&&a!==document.body||c&&(t.contains(a)||t===a));return(l&&Math.abs(f)<1||!l&&Math.abs(d)<1)&&(u=!0),u},Ni=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},vm=function(e){return[e.deltaX,e.deltaY]},bm=function(e){return e&&"current"in e?e.current:e},mA=function(e,t){return e[0]===t[0]&&e[1]===t[1]},gA=function(e){return`
81
81
  .block-interactivity-`.concat(e,` {pointer-events: none;}
82
82
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
83
- `)},yM=0,mo=[];function vM(e){var t=b.useRef([]),n=b.useRef([0,0]),r=b.useRef(),o=b.useState(yM++)[0],s=b.useState(dm)[0],i=b.useRef(e);b.useEffect(function(){i.current=e},[e]),b.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var p=LA([e.lockRef.current],(e.shards||[]).map(bm),!0).filter(Boolean);return p.forEach(function(y){return y.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),p.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=b.useCallback(function(p,y){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!i.current.allowPinchZoom;var g=Ni(p),C=n.current,O="deltaX"in p?p.deltaX:C[0]-g[0],w="deltaY"in p?p.deltaY:C[1]-g[1],_,S=p.target,I=Math.abs(O)>Math.abs(w)?"h":"v";if("touches"in p&&I==="h"&&S.type==="range")return!1;var v=window.getSelection(),x=v&&v.anchorNode,P=x?x===S||x.contains(S):!1;if(P)return!1;var A=mm(I,S);if(!A)return!0;if(A?_=I:(_=I==="v"?"h":"v",A=mm(I,S)),!A)return!1;if(!r.current&&"changedTouches"in p&&(O||w)&&(r.current=_),!_)return!0;var M=r.current||_;return pM(M,y,p,M==="h"?O:w)},[]),c=b.useCallback(function(p){var y=p;if(!(!mo.length||mo[mo.length-1]!==s)){var g="deltaY"in y?vm(y):Ni(y),C=t.current.filter(function(_){return _.name===y.type&&(_.target===y.target||y.target===_.shadowParent)&&mM(_.delta,g)})[0];if(C&&C.should){y.cancelable&&y.preventDefault();return}if(!C){var O=(i.current.shards||[]).map(bm).filter(Boolean).filter(function(_){return _.contains(y.target)}),w=O.length>0?a(y,O[0]):!i.current.noIsolation;w&&y.cancelable&&y.preventDefault()}}},[]),u=b.useCallback(function(p,y,g,C){var O={name:p,delta:y,target:g,should:C,shadowParent:bM(g)};t.current.push(O),setTimeout(function(){t.current=t.current.filter(function(w){return w!==O})},1)},[]),l=b.useCallback(function(p){n.current=Ni(p),r.current=void 0},[]),f=b.useCallback(function(p){u(p.type,vm(p),p.target,a(p,e.lockRef.current))},[]),d=b.useCallback(function(p){u(p.type,Ni(p),p.target,a(p,e.lockRef.current))},[]);b.useEffect(function(){return mo.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:d}),document.addEventListener("wheel",c,po),document.addEventListener("touchmove",c,po),document.addEventListener("touchstart",l,po),function(){mo=mo.filter(function(p){return p!==s}),document.removeEventListener("wheel",c,po),document.removeEventListener("touchmove",c,po),document.removeEventListener("touchstart",l,po)}},[]);var h=e.removeScrollBar,m=e.inert;return b.createElement(b.Fragment,null,m?b.createElement(s,{styles:gM(o)}):null,h?b.createElement(aM,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function bM(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const wM=GA(fm,vM);var Ii=b.forwardRef(function(e,t){return b.createElement(Mi,Nn({},e,{ref:t,sideCar:wM}))});Ii.classNames=Mi.classNames;var _M=[" ","Enter","ArrowUp","ArrowDown"],SM=[" ","Enter"],zr="Select",[Fi,Ri,kM]=zh(zr),[go]=Kn(zr,[kM,Oi]),Wi=Oi(),[xM,wr]=go(zr),[OM,EM]=go(zr),wm=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:i,defaultValue:a,onValueChange:c,dir:u,name:l,autoComplete:f,disabled:d,required:h,form:m}=e,p=Wi(t),[y,g]=b.useState(null),[C,O]=b.useState(null),[w,_]=b.useState(!1),S=Ec(u),[I,v]=Rr({prop:r,defaultProp:o??!1,onChange:s,caller:zr}),[x,P]=Rr({prop:i,defaultProp:a,onChange:c,caller:zr}),A=b.useRef(null),M=y?m||!!y.closest("form"):!0,[F,N]=b.useState(new Set),W=Array.from(F).map(E=>E.props.value).join(";");return T.jsx(rm,{...p,children:T.jsxs(xM,{required:h,scope:t,trigger:y,onTriggerChange:g,valueNode:C,onValueNodeChange:O,valueNodeHasChildren:w,onValueNodeHasChildrenChange:_,contentId:dr(),value:x,onValueChange:P,open:I,onOpenChange:v,dir:S,triggerPointerDownPosRef:A,disabled:d,children:[T.jsx(Fi.Provider,{scope:t,children:T.jsx(OM,{scope:e.__scopeSelect,onNativeOptionAdd:b.useCallback(E=>{N(k=>new Set(k).add(E))},[]),onNativeOptionRemove:b.useCallback(E=>{N(k=>{const U=new Set(k);return U.delete(E),U})},[]),children:n})}),M?T.jsxs(Ym,{"aria-hidden":!0,required:h,tabIndex:-1,name:l,autoComplete:f,value:x,onChange:E=>P(E.target.value),disabled:d,form:m,children:[x===void 0?T.jsx("option",{value:""}):null,Array.from(F)]},W):null]})})};wm.displayName=zr;var _m="SelectTrigger",Sm=b.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=Wi(n),i=wr(_m,n),a=i.disabled||r,c=He(t,i.onTriggerChange),u=Ri(n),l=b.useRef("touch"),[f,d,h]=Vm(p=>{const y=u().filter(O=>!O.disabled),g=y.find(O=>O.value===i.value),C=Bm(y,p,g);C!==void 0&&i.onValueChange(C.value)}),m=p=>{a||(i.onOpenChange(!0),h()),p&&(i.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return T.jsx(Jc,{asChild:!0,...s,children:T.jsx(Ne.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":jm(i.value)?"":void 0,...o,ref:c,onClick:Te(o.onClick,p=>{p.currentTarget.focus(),l.current!=="mouse"&&m(p)}),onPointerDown:Te(o.onPointerDown,p=>{l.current=p.pointerType;const y=p.target;y.hasPointerCapture(p.pointerId)&&y.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(m(p),p.preventDefault())}),onKeyDown:Te(o.onKeyDown,p=>{const y=f.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&d(p.key),!(y&&p.key===" ")&&_M.includes(p.key)&&(m(),p.preventDefault())})})})});Sm.displayName=_m;var km="SelectValue",xm=b.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:i="",...a}=e,c=wr(km,n),{onValueNodeHasChildrenChange:u}=c,l=s!==void 0,f=He(t,c.onValueNodeChange);return At(()=>{u(l)},[u,l]),T.jsx(Ne.span,{...a,ref:f,style:{pointerEvents:"none"},children:jm(c.value)?T.jsx(T.Fragment,{children:i}):s})});xm.displayName=km;var CM="SelectIcon",Om=b.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return T.jsx(Ne.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});Om.displayName=CM;var TM="SelectPortal",Em=e=>T.jsx(Ei,{asChild:!0,...e});Em.displayName=TM;var Lr="SelectContent",Cm=b.forwardRef((e,t)=>{const n=wr(Lr,e.__scopeSelect),[r,o]=b.useState();if(At(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?ms.createPortal(T.jsx(Tm,{scope:e.__scopeSelect,children:T.jsx(Fi.Slot,{scope:e.__scopeSelect,children:T.jsx("div",{children:e.children})})}),s):null}return T.jsx(Dm,{...e,ref:t})});Cm.displayName=Lr;var yn=10,[Tm,_r]=go(Lr),DM="SelectContentImpl",AM=TA("SelectContent.RemoveScroll"),Dm=b.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:i,side:a,sideOffset:c,align:u,alignOffset:l,arrowPadding:f,collisionBoundary:d,collisionPadding:h,sticky:m,hideWhenDetached:p,avoidCollisions:y,...g}=e,C=wr(Lr,n),[O,w]=b.useState(null),[_,S]=b.useState(null),I=He(t,q=>w(q)),[v,x]=b.useState(null),[P,A]=b.useState(null),M=Ri(n),[F,N]=b.useState(!1),W=b.useRef(!1);b.useEffect(()=>{if(O)return el(O)},[O]),Rc();const E=b.useCallback(q=>{const[oe,...Q]=M().map(K=>K.ref.current),[re]=Q.slice(-1),le=document.activeElement;for(const K of q)if(K===le||(K?.scrollIntoView({block:"nearest"}),K===oe&&_&&(_.scrollTop=0),K===re&&_&&(_.scrollTop=_.scrollHeight),K?.focus(),document.activeElement!==le))return},[M,_]),k=b.useCallback(()=>E([v,O]),[E,v,O]);b.useEffect(()=>{F&&k()},[F,k]);const{onOpenChange:U,triggerPointerDownPosRef:$}=C;b.useEffect(()=>{if(O){let q={x:0,y:0};const oe=re=>{q={x:Math.abs(Math.round(re.pageX)-($.current?.x??0)),y:Math.abs(Math.round(re.pageY)-($.current?.y??0))}},Q=re=>{q.x<=10&&q.y<=10?re.preventDefault():O.contains(re.target)||U(!1),document.removeEventListener("pointermove",oe),$.current=null};return $.current!==null&&(document.addEventListener("pointermove",oe),document.addEventListener("pointerup",Q,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",oe),document.removeEventListener("pointerup",Q,{capture:!0})}}},[O,U,$]),b.useEffect(()=>{const q=()=>U(!1);return window.addEventListener("blur",q),window.addEventListener("resize",q),()=>{window.removeEventListener("blur",q),window.removeEventListener("resize",q)}},[U]);const[D,V]=Vm(q=>{const oe=M().filter(le=>!le.disabled),Q=oe.find(le=>le.ref.current===document.activeElement),re=Bm(oe,q,Q);re&&setTimeout(()=>re.ref.current.focus())}),Z=b.useCallback((q,oe,Q)=>{const re=!W.current&&!Q;(C.value!==void 0&&C.value===oe||re)&&(x(q),re&&(W.current=!0))},[C.value]),G=b.useCallback(()=>O?.focus(),[O]),B=b.useCallback((q,oe,Q)=>{const re=!W.current&&!Q;(C.value!==void 0&&C.value===oe||re)&&A(q)},[C.value]),z=r==="popper"?sl:Am,X=z===sl?{side:a,sideOffset:c,align:u,alignOffset:l,arrowPadding:f,collisionBoundary:d,collisionPadding:h,sticky:m,hideWhenDetached:p,avoidCollisions:y}:{};return T.jsx(Tm,{scope:n,content:O,viewport:_,onViewportChange:S,itemRefCallback:Z,selectedItem:v,onItemLeave:G,itemTextRefCallback:B,focusSelectedItem:k,selectedItemText:P,position:r,isPositioned:F,searchRef:D,children:T.jsx(Ii,{as:AM,allowPinchZoom:!0,children:T.jsx(pi,{asChild:!0,trapped:C.open,onMountAutoFocus:q=>{q.preventDefault()},onUnmountAutoFocus:Te(o,q=>{C.trigger?.focus({preventScroll:!0}),q.preventDefault()}),children:T.jsx(hi,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:q=>q.preventDefault(),onDismiss:()=>C.onOpenChange(!1),children:T.jsx(z,{role:"listbox",id:C.contentId,"data-state":C.open?"open":"closed",dir:C.dir,onContextMenu:q=>q.preventDefault(),...g,...X,onPlaced:()=>N(!0),ref:I,style:{display:"flex",flexDirection:"column",outline:"none",...g.style},onKeyDown:Te(g.onKeyDown,q=>{const oe=q.ctrlKey||q.altKey||q.metaKey;if(q.key==="Tab"&&q.preventDefault(),!oe&&q.key.length===1&&V(q.key),["ArrowUp","ArrowDown","Home","End"].includes(q.key)){let re=M().filter(le=>!le.disabled).map(le=>le.ref.current);if(["ArrowUp","End"].includes(q.key)&&(re=re.slice().reverse()),["ArrowUp","ArrowDown"].includes(q.key)){const le=q.target,K=re.indexOf(le);re=re.slice(K+1)}setTimeout(()=>E(re)),q.preventDefault()}})})})})})})});Dm.displayName=DM;var MM="SelectItemAlignedPosition",Am=b.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=wr(Lr,n),i=_r(Lr,n),[a,c]=b.useState(null),[u,l]=b.useState(null),f=He(t,I=>l(I)),d=Ri(n),h=b.useRef(!1),m=b.useRef(!0),{viewport:p,selectedItem:y,selectedItemText:g,focusSelectedItem:C}=i,O=b.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&u&&p&&y&&g){const I=s.trigger.getBoundingClientRect(),v=u.getBoundingClientRect(),x=s.valueNode.getBoundingClientRect(),P=g.getBoundingClientRect();if(s.dir!=="rtl"){const le=P.left-v.left,K=x.left-le,Se=I.left-K,Ie=I.width+Se,ke=Math.max(Ie,v.width),Ge=window.innerWidth-yn,Re=pp(K,[yn,Math.max(yn,Ge-ke)]);a.style.minWidth=Ie+"px",a.style.left=Re+"px"}else{const le=v.right-P.right,K=window.innerWidth-x.right-le,Se=window.innerWidth-I.right-K,Ie=I.width+Se,ke=Math.max(Ie,v.width),Ge=window.innerWidth-yn,Re=pp(K,[yn,Math.max(yn,Ge-ke)]);a.style.minWidth=Ie+"px",a.style.right=Re+"px"}const A=d(),M=window.innerHeight-yn*2,F=p.scrollHeight,N=window.getComputedStyle(u),W=parseInt(N.borderTopWidth,10),E=parseInt(N.paddingTop,10),k=parseInt(N.borderBottomWidth,10),U=parseInt(N.paddingBottom,10),$=W+E+F+U+k,D=Math.min(y.offsetHeight*5,$),V=window.getComputedStyle(p),Z=parseInt(V.paddingTop,10),G=parseInt(V.paddingBottom,10),B=I.top+I.height/2-yn,z=M-B,X=y.offsetHeight/2,q=y.offsetTop+X,oe=W+E+q,Q=$-oe;if(oe<=B){const le=A.length>0&&y===A[A.length-1].ref.current;a.style.bottom="0px";const K=u.clientHeight-p.offsetTop-p.offsetHeight,Se=Math.max(z,X+(le?G:0)+K+k),Ie=oe+Se;a.style.height=Ie+"px"}else{const le=A.length>0&&y===A[0].ref.current;a.style.top="0px";const Se=Math.max(B,W+p.offsetTop+(le?Z:0)+X)+Q;a.style.height=Se+"px",p.scrollTop=oe-B+p.offsetTop}a.style.margin=`${yn}px 0`,a.style.minHeight=D+"px",a.style.maxHeight=M+"px",r?.(),requestAnimationFrame(()=>h.current=!0)}},[d,s.trigger,s.valueNode,a,u,p,y,g,s.dir,r]);At(()=>O(),[O]);const[w,_]=b.useState();At(()=>{u&&_(window.getComputedStyle(u).zIndex)},[u]);const S=b.useCallback(I=>{I&&m.current===!0&&(O(),C?.(),m.current=!1)},[O,C]);return T.jsx(NM,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:h,onScrollButtonChange:S,children:T.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w},children:T.jsx(Ne.div,{...o,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Am.displayName=MM;var PM="SelectPopperPosition",sl=b.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=yn,...s}=e,i=Wi(n);return T.jsx(om,{...i,...s,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});sl.displayName=PM;var[NM,il]=go(Lr,{}),al="SelectViewport",Mm=b.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=_r(al,n),i=il(al,n),a=He(t,s.onViewportChange),c=b.useRef(0);return T.jsxs(T.Fragment,{children:[T.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),T.jsx(Fi.Slot,{scope:n,children:T.jsx(Ne.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:Te(o.onScroll,u=>{const l=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:d}=i;if(d?.current&&f){const h=Math.abs(c.current-l.scrollTop);if(h>0){const m=window.innerHeight-yn*2,p=parseFloat(f.style.minHeight),y=parseFloat(f.style.height),g=Math.max(p,y);if(g<m){const C=g+h,O=Math.min(m,C),w=C-O;f.style.height=O+"px",f.style.bottom==="0px"&&(l.scrollTop=w>0?w:0,f.style.justifyContent="flex-end")}}}c.current=l.scrollTop})})})]})});Mm.displayName=al;var Pm="SelectGroup",[IM,FM]=go(Pm),RM=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=dr();return T.jsx(IM,{scope:n,id:o,children:T.jsx(Ne.div,{role:"group","aria-labelledby":o,...r,ref:t})})});RM.displayName=Pm;var Nm="SelectLabel",WM=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=FM(Nm,n);return T.jsx(Ne.div,{id:o.id,...r,ref:t})});WM.displayName=Nm;var zi="SelectItem",[zM,Im]=go(zi),Fm=b.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...i}=e,a=wr(zi,n),c=_r(zi,n),u=a.value===r,[l,f]=b.useState(s??""),[d,h]=b.useState(!1),m=He(t,C=>c.itemRefCallback?.(C,r,o)),p=dr(),y=b.useRef("touch"),g=()=>{o||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return T.jsx(zM,{scope:n,value:r,disabled:o,textId:p,isSelected:u,onItemTextChange:b.useCallback(C=>{f(O=>O||(C?.textContent??"").trim())},[]),children:T.jsx(Fi.ItemSlot,{scope:n,value:r,disabled:o,textValue:l,children:T.jsx(Ne.div,{role:"option","aria-labelledby":p,"data-highlighted":d?"":void 0,"aria-selected":u&&d,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:m,onFocus:Te(i.onFocus,()=>h(!0)),onBlur:Te(i.onBlur,()=>h(!1)),onClick:Te(i.onClick,()=>{y.current!=="mouse"&&g()}),onPointerUp:Te(i.onPointerUp,()=>{y.current==="mouse"&&g()}),onPointerDown:Te(i.onPointerDown,C=>{y.current=C.pointerType}),onPointerMove:Te(i.onPointerMove,C=>{y.current=C.pointerType,o?c.onItemLeave?.():y.current==="mouse"&&C.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Te(i.onPointerLeave,C=>{C.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:Te(i.onKeyDown,C=>{c.searchRef?.current!==""&&C.key===" "||(SM.includes(C.key)&&g(),C.key===" "&&C.preventDefault())})})})})});Fm.displayName=zi;var es="SelectItemText",Rm=b.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,i=wr(es,n),a=_r(es,n),c=Im(es,n),u=EM(es,n),[l,f]=b.useState(null),d=He(t,g=>f(g),c.onItemTextChange,g=>a.itemTextRefCallback?.(g,c.value,c.disabled)),h=l?.textContent,m=b.useMemo(()=>T.jsx("option",{value:c.value,disabled:c.disabled,children:h},c.value),[c.disabled,c.value,h]),{onNativeOptionAdd:p,onNativeOptionRemove:y}=u;return At(()=>(p(m),()=>y(m)),[p,y,m]),T.jsxs(T.Fragment,{children:[T.jsx(Ne.span,{id:c.textId,...s,ref:d}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?ms.createPortal(s.children,i.valueNode):null]})});Rm.displayName=es;var Wm="SelectItemIndicator",zm=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Im(Wm,n).isSelected?T.jsx(Ne.span,{"aria-hidden":!0,...r,ref:t}):null});zm.displayName=Wm;var cl="SelectScrollUpButton",Lm=b.forwardRef((e,t)=>{const n=_r(cl,e.__scopeSelect),r=il(cl,e.__scopeSelect),[o,s]=b.useState(!1),i=He(t,r.onScrollButtonChange);return At(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=c.scrollTop>0;s(u)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?T.jsx(Um,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop-c.offsetHeight)}}):null});Lm.displayName=cl;var ll="SelectScrollDownButton",$m=b.forwardRef((e,t)=>{const n=_r(ll,e.__scopeSelect),r=il(ll,e.__scopeSelect),[o,s]=b.useState(!1),i=He(t,r.onScrollButtonChange);return At(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=c.scrollHeight-c.clientHeight,l=Math.ceil(c.scrollTop)<u;s(l)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?T.jsx(Um,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop+c.offsetHeight)}}):null});$m.displayName=ll;var Um=b.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=_r("SelectScrollButton",n),i=b.useRef(null),a=Ri(n),c=b.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return b.useEffect(()=>()=>c(),[c]),At(()=>{a().find(l=>l.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[a]),T.jsx(Ne.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:Te(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:Te(o.onPointerMove,()=>{s.onItemLeave?.(),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:Te(o.onPointerLeave,()=>{c()})})}),LM="SelectSeparator",$M=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return T.jsx(Ne.div,{"aria-hidden":!0,...r,ref:t})});$M.displayName=LM;var ul="SelectArrow",UM=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Wi(n),s=wr(ul,n),i=_r(ul,n);return s.open&&i.position==="popper"?T.jsx(sm,{...o,...r,ref:t}):null});UM.displayName=ul;var YM="SelectBubbleInput",Ym=b.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=b.useRef(null),s=He(r,o),i=Ac(t);return b.useEffect(()=>{const a=o.current;if(!a)return;const c=window.HTMLSelectElement.prototype,l=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==t&&l){const f=new Event("change",{bubbles:!0});l.call(a,t),a.dispatchEvent(f)}},[i,t]),T.jsx(Ne.select,{...n,style:{...im,...n.style},ref:s,defaultValue:t})});Ym.displayName=YM;function jm(e){return e===""||e===void 0}function Vm(e){const t=hr(e),n=b.useRef(""),r=b.useRef(0),o=b.useCallback(i=>{const a=n.current+i;t(a),(function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))})(a)},[t]),s=b.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return b.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function Bm(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=jM(e,Math.max(s,0));o.length===1&&(i=i.filter(u=>u!==n));const c=i.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function jM(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var VM=wm,BM=Sm,HM=xm,ZM=Om,GM=Em,qM=Cm,KM=Mm,XM=Fm,JM=Rm,QM=zm,eP=Lm,tP=$m;function nP({...e}){return T.jsx(VM,{"data-slot":"select",...e})}function rP({...e}){return T.jsx(HM,{"data-slot":"select-value",...e})}function oP({className:e,size:t="default",children:n,...r}){return T.jsxs(BM,{"data-slot":"select-trigger","data-size":t,className:Dt("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[n,T.jsx(ZM,{asChild:!0,children:T.jsx(Pc,{className:"size-4 opacity-50"})})]})}function sP({className:e,children:t,position:n="popper",...r}){return T.jsx(GM,{children:T.jsxs(qM,{"data-slot":"select-content",className:Dt("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[T.jsx(aP,{}),T.jsx(KM,{className:Dt("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),T.jsx(cP,{})]})})}function iP({className:e,children:t,...n}){return T.jsxs(XM,{"data-slot":"select-item",className:Dt("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...n,children:[T.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:T.jsx(QM,{children:T.jsx(sp,{className:"size-4"})})}),T.jsx(JM,{children:t})]})}function aP({className:e,...t}){return T.jsx(eP,{"data-slot":"select-scroll-up-button",className:Dt("flex cursor-default items-center justify-center py-1",e),...t,children:T.jsx(FT,{className:"size-4"})})}function cP({className:e,...t}){return T.jsx(tP,{"data-slot":"select-scroll-down-button",className:Dt("flex cursor-default items-center justify-center py-1",e),...t,children:T.jsx(Pc,{className:"size-4"})})}const lP=(e={})=>{const{field:t={},form:n={},question:r={},disabled:o=!1}=e,{options:s=[]}=r;return T.jsxs(nP,{onValueChange:t.onChange,value:t.value,disabled:o,className:"bq-select",children:[T.jsx(li,{className:"w-full",children:T.jsx(oP,{children:T.jsx(rP,{placeholder:r.placeholder||"Please select"})})}),T.jsx(sP,{children:s.map((i,a)=>T.jsx(iP,{value:i.value,children:i.label},a))})]})},Hm=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Zm=oi,uP=(e,t)=>n=>{var r;if(t?.variants==null)return Zm(e,n?.class,n?.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(u=>{const l=n?.[u],f=s?.[u];if(l===null)return null;const d=Hm(l)||Hm(f);return o[u][d]}),a=n&&Object.entries(n).reduce((u,l)=>{let[f,d]=l;return d===void 0||(u[f]=d),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,l)=>{let{class:f,className:d,...h}=l;return Object.entries(h).every(m=>{let[p,y]=m;return Array.isArray(y)?y.includes({...s,...a}[p]):{...s,...a}[p]===y})?[...u,f,d]:u},[]);return Zm(e,i,c,n?.class,n?.className)};function fP(e,t){return t.forEach((function(n){n&&typeof n!="string"&&!Array.isArray(n)&&Object.keys(n).forEach((function(r){if(r!=="default"&&!(r in e)){var o=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(e,r,o.get?o:{enumerable:!0,get:function(){return n[r]}})}}))})),Object.freeze(e)}function Gm(e,t){return new Promise((function(n,r){let o;return dP(e).then((function(s){try{return o=s,n(new Blob([t.slice(0,2),o,t.slice(2)],{type:"image/jpeg"}))}catch(i){return r(i)}}),r)}))}const dP=e=>new Promise(((t,n)=>{const r=new FileReader;r.addEventListener("load",(({target:{result:o}})=>{const s=new DataView(o);let i=0;if(s.getUint16(i)!==65496)return n("not a valid JPEG");for(i+=2;;){const a=s.getUint16(i);if(a===65498)break;const c=s.getUint16(i+2);if(a===65505&&s.getUint32(i+4)===1165519206){const u=i+10;let l;switch(s.getUint16(u)){case 18761:l=!0;break;case 19789:l=!1;break;default:return n("TIFF header contains invalid endian")}if(s.getUint16(u+2,l)!==42)return n("TIFF header contains invalid version");const f=s.getUint32(u+4,l),d=u+f+2+12*s.getUint16(u+f,l);for(let h=u+f+2;h<d;h+=12)if(s.getUint16(h,l)==274){if(s.getUint16(h+2,l)!==3)return n("Orientation data type is invalid");if(s.getUint32(h+4,l)!==1)return n("Orientation data count is invalid");s.setUint16(h+8,1,l);break}return t(o.slice(i,i+2+c))}i+=2+c}return t(new Blob)})),r.readAsArrayBuffer(e)}));var Li={},hP={get exports(){return Li},set exports(e){Li=e}};(function(e){var t,n,r={};hP.exports=r,r.parse=function(o,s){for(var i=r.bin.readUshort,a=r.bin.readUint,c=0,u={},l=new Uint8Array(o),f=l.length-4;a(l,f)!=101010256;)f--;c=f,c+=4;var d=i(l,c+=4);i(l,c+=2);var h=a(l,c+=2),m=a(l,c+=4);c+=4,c=m;for(var p=0;p<d;p++){a(l,c),c+=4,c+=4,c+=4,a(l,c+=4),h=a(l,c+=4);var y=a(l,c+=4),g=i(l,c+=4),C=i(l,c+2),O=i(l,c+4);c+=6;var w=a(l,c+=8);c+=4,c+=g+C+O,r._readLocal(l,w,u,h,y,s)}return u},r._readLocal=function(o,s,i,a,c,u){var l=r.bin.readUshort,f=r.bin.readUint;f(o,s),l(o,s+=4),l(o,s+=2);var d=l(o,s+=2);f(o,s+=2),f(o,s+=4),s+=4;var h=l(o,s+=8),m=l(o,s+=2);s+=2;var p=r.bin.readUTF8(o,s,h);if(s+=h,s+=m,u)i[p]={size:c,csize:a};else{var y=new Uint8Array(o.buffer,s);if(d==0)i[p]=new Uint8Array(y.buffer.slice(s,s+a));else{if(d!=8)throw"unknown compression method: "+d;var g=new Uint8Array(c);r.inflateRaw(y,g),i[p]=g}}},r.inflateRaw=function(o,s){return r.F.inflate(o,s)},r.inflate=function(o,s){return o[0],o[1],r.inflateRaw(new Uint8Array(o.buffer,o.byteOffset+2,o.length-6),s)},r.deflate=function(o,s){s==null&&(s={level:6});var i=0,a=new Uint8Array(50+Math.floor(1.1*o.length));a[i]=120,a[i+1]=156,i+=2,i=r.F.deflateRaw(o,a,i,s.level);var c=r.adler(o,0,o.length);return a[i+0]=c>>>24&255,a[i+1]=c>>>16&255,a[i+2]=c>>>8&255,a[i+3]=c>>>0&255,new Uint8Array(a.buffer,0,i+4)},r.deflateRaw=function(o,s){s==null&&(s={level:6});var i=new Uint8Array(50+Math.floor(1.1*o.length)),a=r.F.deflateRaw(o,i,a,s.level);return new Uint8Array(i.buffer,0,a)},r.encode=function(o,s){s==null&&(s=!1);var i=0,a=r.bin.writeUint,c=r.bin.writeUshort,u={};for(var l in o){var f=!r._noNeed(l)&&!s,d=o[l],h=r.crc.crc(d,0,d.length);u[l]={cpr:f,usize:d.length,crc:h,file:f?r.deflateRaw(d):d}}for(var l in u)i+=u[l].file.length+30+46+2*r.bin.sizeUTF8(l);i+=22;var m=new Uint8Array(i),p=0,y=[];for(var l in u){var g=u[l];y.push(p),p=r._writeHeader(m,p,l,g,0)}var C=0,O=p;for(var l in u)g=u[l],y.push(p),p=r._writeHeader(m,p,l,g,1,y[C++]);var w=p-O;return a(m,p,101010256),p+=4,c(m,p+=4,C),c(m,p+=2,C),a(m,p+=2,w),a(m,p+=4,O),p+=4,p+=2,m.buffer},r._noNeed=function(o){var s=o.split(".").pop().toLowerCase();return"png,jpg,jpeg,zip".indexOf(s)!=-1},r._writeHeader=function(o,s,i,a,c,u){var l=r.bin.writeUint,f=r.bin.writeUshort,d=a.file;return l(o,s,c==0?67324752:33639248),s+=4,c==1&&(s+=2),f(o,s,20),f(o,s+=2,0),f(o,s+=2,a.cpr?8:0),l(o,s+=2,0),l(o,s+=4,a.crc),l(o,s+=4,d.length),l(o,s+=4,a.usize),f(o,s+=4,r.bin.sizeUTF8(i)),f(o,s+=2,0),s+=2,c==1&&(s+=2,s+=2,l(o,s+=6,u),s+=4),s+=r.bin.writeUTF8(o,s,i),c==0&&(o.set(d,s),s+=d.length),s},r.crc={table:(function(){for(var o=new Uint32Array(256),s=0;s<256;s++){for(var i=s,a=0;a<8;a++)1&i?i=3988292384^i>>>1:i>>>=1;o[s]=i}return o})(),update:function(o,s,i,a){for(var c=0;c<a;c++)o=r.crc.table[255&(o^s[i+c])]^o>>>8;return o},crc:function(o,s,i){return 4294967295^r.crc.update(4294967295,o,s,i)}},r.adler=function(o,s,i){for(var a=1,c=0,u=s,l=s+i;u<l;){for(var f=Math.min(u+5552,l);u<f;)c+=a+=o[u++];a%=65521,c%=65521}return c<<16|a},r.bin={readUshort:function(o,s){return o[s]|o[s+1]<<8},writeUshort:function(o,s,i){o[s]=255&i,o[s+1]=i>>8&255},readUint:function(o,s){return 16777216*o[s+3]+(o[s+2]<<16|o[s+1]<<8|o[s])},writeUint:function(o,s,i){o[s]=255&i,o[s+1]=i>>8&255,o[s+2]=i>>16&255,o[s+3]=i>>24&255},readASCII:function(o,s,i){for(var a="",c=0;c<i;c++)a+=String.fromCharCode(o[s+c]);return a},writeASCII:function(o,s,i){for(var a=0;a<i.length;a++)o[s+a]=i.charCodeAt(a)},pad:function(o){return o.length<2?"0"+o:o},readUTF8:function(o,s,i){for(var a,c="",u=0;u<i;u++)c+="%"+r.bin.pad(o[s+u].toString(16));try{a=decodeURIComponent(c)}catch{return r.bin.readASCII(o,s,i)}return a},writeUTF8:function(o,s,i){for(var a=i.length,c=0,u=0;u<a;u++){var l=i.charCodeAt(u);if((4294967168&l)==0)o[s+c]=l,c++;else if((4294965248&l)==0)o[s+c]=192|l>>6,o[s+c+1]=128|l>>0&63,c+=2;else if((4294901760&l)==0)o[s+c]=224|l>>12,o[s+c+1]=128|l>>6&63,o[s+c+2]=128|l>>0&63,c+=3;else{if((4292870144&l)!=0)throw"e";o[s+c]=240|l>>18,o[s+c+1]=128|l>>12&63,o[s+c+2]=128|l>>6&63,o[s+c+3]=128|l>>0&63,c+=4}}return c},sizeUTF8:function(o){for(var s=o.length,i=0,a=0;a<s;a++){var c=o.charCodeAt(a);if((4294967168&c)==0)i++;else if((4294965248&c)==0)i+=2;else if((4294901760&c)==0)i+=3;else{if((4292870144&c)!=0)throw"e";i+=4}}return i}},r.F={},r.F.deflateRaw=function(o,s,i,a){var c=[[0,0,0,0,0],[4,4,8,4,0],[4,5,16,8,0],[4,6,16,16,0],[4,10,16,32,0],[8,16,32,32,0],[8,16,128,128,0],[8,32,128,256,0],[32,128,258,1024,1],[32,258,258,4096,1]][a],u=r.F.U,l=r.F._goodIndex;r.F._hash;var f=r.F._putsE,d=0,h=i<<3,m=0,p=o.length;if(a==0){for(;d<p;)f(s,h,d+(A=Math.min(65535,p-d))==p?1:0),h=r.F._copyExact(o,d,A,s,h+8),d+=A;return h>>>3}var y=u.lits,g=u.strt,C=u.prev,O=0,w=0,_=0,S=0,I=0,v=0;for(p>2&&(g[v=r.F._hash(o,0)]=0),d=0;d<p;d++){if(I=v,d+1<p-2){v=r.F._hash(o,d+1);var x=d+1&32767;C[x]=g[v],g[v]=x}if(m<=d){(O>14e3||w>26697)&&p-d>100&&(m<d&&(y[O]=d-m,O+=2,m=d),h=r.F._writeBlock(d==p-1||m==p?1:0,y,O,S,o,_,d-_,s,h),O=w=S=0,_=d);var P=0;d<p-2&&(P=r.F._bestMatch(o,d,C,I,Math.min(c[2],p-d),c[3]));var A=P>>>16,M=65535&P;if(P!=0){M=65535&P;var F=l(A=P>>>16,u.of0);u.lhst[257+F]++;var N=l(M,u.df0);u.dhst[N]++,S+=u.exb[F]+u.dxb[N],y[O]=A<<23|d-m,y[O+1]=M<<16|F<<8|N,O+=2,m=d+A}else u.lhst[o[d]]++;w++}}for(_==d&&o.length!=0||(m<d&&(y[O]=d-m,O+=2,m=d),h=r.F._writeBlock(1,y,O,S,o,_,d-_,s,h),O=0,w=0,O=w=S=0,_=d);(7&h)!=0;)h++;return h>>>3},r.F._bestMatch=function(o,s,i,a,c,u){var l=32767&s,f=i[l],d=l-f+32768&32767;if(f==l||a!=r.F._hash(o,s-d))return 0;for(var h=0,m=0,p=Math.min(32767,s);d<=p&&--u!=0&&f!=l;){if(h==0||o[s+h]==o[s+h-d]){var y=r.F._howLong(o,s,d);if(y>h){if(m=d,(h=y)>=c)break;d+2<y&&(y=d+2);for(var g=0,C=0;C<y-2;C++){var O=s-d+C+32768&32767,w=O-i[O]+32768&32767;w>g&&(g=w,f=O)}}}d+=(l=f)-(f=i[l])+32768&32767}return h<<16|m},r.F._howLong=function(o,s,i){if(o[s]!=o[s-i]||o[s+1]!=o[s+1-i]||o[s+2]!=o[s+2-i])return 0;var a=s,c=Math.min(o.length,s+258);for(s+=3;s<c&&o[s]==o[s-i];)s++;return s-a},r.F._hash=function(o,s){return(o[s]<<8|o[s+1])+(o[s+2]<<4)&65535},r.saved=0,r.F._writeBlock=function(o,s,i,a,c,u,l,f,d){var h,m,p,y,g,C,O,w,_,S=r.F.U,I=r.F._putsF,v=r.F._putsE;S.lhst[256]++,m=(h=r.F.getTrees())[0],p=h[1],y=h[2],g=h[3],C=h[4],O=h[5],w=h[6],_=h[7];var x=32+((d+3&7)==0?0:8-(d+3&7))+(l<<3),P=a+r.F.contSize(S.fltree,S.lhst)+r.F.contSize(S.fdtree,S.dhst),A=a+r.F.contSize(S.ltree,S.lhst)+r.F.contSize(S.dtree,S.dhst);A+=14+3*O+r.F.contSize(S.itree,S.ihst)+(2*S.ihst[16]+3*S.ihst[17]+7*S.ihst[18]);for(var M=0;M<286;M++)S.lhst[M]=0;for(M=0;M<30;M++)S.dhst[M]=0;for(M=0;M<19;M++)S.ihst[M]=0;var F=x<P&&x<A?0:P<A?1:2;if(I(f,d,o),I(f,d+1,F),d+=3,F==0){for(;(7&d)!=0;)d++;d=r.F._copyExact(c,u,l,f,d)}else{var N,W;if(F==1&&(N=S.fltree,W=S.fdtree),F==2){r.F.makeCodes(S.ltree,m),r.F.revCodes(S.ltree,m),r.F.makeCodes(S.dtree,p),r.F.revCodes(S.dtree,p),r.F.makeCodes(S.itree,y),r.F.revCodes(S.itree,y),N=S.ltree,W=S.dtree,v(f,d,g-257),v(f,d+=5,C-1),v(f,d+=5,O-4),d+=4;for(var E=0;E<O;E++)v(f,d+3*E,S.itree[1+(S.ordr[E]<<1)]);d+=3*O,d=r.F._codeTiny(w,S.itree,f,d),d=r.F._codeTiny(_,S.itree,f,d)}for(var k=u,U=0;U<i;U+=2){for(var $=s[U],D=$>>>23,V=k+(8388607&$);k<V;)d=r.F._writeLit(c[k++],N,f,d);if(D!=0){var Z=s[U+1],G=Z>>16,B=Z>>8&255,z=255&Z;v(f,d=r.F._writeLit(257+B,N,f,d),D-S.of0[B]),d+=S.exb[B],I(f,d=r.F._writeLit(z,W,f,d),G-S.df0[z]),d+=S.dxb[z],k+=D}}d=r.F._writeLit(256,N,f,d)}return d},r.F._copyExact=function(o,s,i,a,c){var u=c>>>3;return a[u]=i,a[u+1]=i>>>8,a[u+2]=255-a[u],a[u+3]=255-a[u+1],u+=4,a.set(new Uint8Array(o.buffer,s,i),u),c+(i+4<<3)},r.F.getTrees=function(){for(var o=r.F.U,s=r.F._hufTree(o.lhst,o.ltree,15),i=r.F._hufTree(o.dhst,o.dtree,15),a=[],c=r.F._lenCodes(o.ltree,a),u=[],l=r.F._lenCodes(o.dtree,u),f=0;f<a.length;f+=2)o.ihst[a[f]]++;for(f=0;f<u.length;f+=2)o.ihst[u[f]]++;for(var d=r.F._hufTree(o.ihst,o.itree,7),h=19;h>4&&o.itree[1+(o.ordr[h-1]<<1)]==0;)h--;return[s,i,d,c,l,h,a,u]},r.F.getSecond=function(o){for(var s=[],i=0;i<o.length;i+=2)s.push(o[i+1]);return s},r.F.nonZero=function(o){for(var s="",i=0;i<o.length;i+=2)o[i+1]!=0&&(s+=(i>>1)+",");return s},r.F.contSize=function(o,s){for(var i=0,a=0;a<s.length;a++)i+=s[a]*o[1+(a<<1)];return i},r.F._codeTiny=function(o,s,i,a){for(var c=0;c<o.length;c+=2){var u=o[c],l=o[c+1];a=r.F._writeLit(u,s,i,a);var f=u==16?2:u==17?3:7;u>15&&(r.F._putsE(i,a,l,f),a+=f)}return a},r.F._lenCodes=function(o,s){for(var i=o.length;i!=2&&o[i-1]==0;)i-=2;for(var a=0;a<i;a+=2){var c=o[a+1],u=a+3<i?o[a+3]:-1,l=a+5<i?o[a+5]:-1,f=a==0?-1:o[a-1];if(c==0&&u==c&&l==c){for(var d=a+5;d+2<i&&o[d+2]==c;)d+=2;(h=Math.min(d+1-a>>>1,138))<11?s.push(17,h-3):s.push(18,h-11),a+=2*h-2}else if(c==f&&u==c&&l==c){for(d=a+5;d+2<i&&o[d+2]==c;)d+=2;var h=Math.min(d+1-a>>>1,6);s.push(16,h-3),a+=2*h-2}else s.push(c,0)}return i>>>1},r.F._hufTree=function(o,s,i){var a=[],c=o.length,u=s.length,l=0;for(l=0;l<u;l+=2)s[l]=0,s[l+1]=0;for(l=0;l<c;l++)o[l]!=0&&a.push({lit:l,f:o[l]});var f=a.length,d=a.slice(0);if(f==0)return 0;if(f==1){var h=a[0].lit;return d=h==0?1:0,s[1+(h<<1)]=1,s[1+(d<<1)]=1,1}a.sort((function(w,_){return w.f-_.f}));var m=a[0],p=a[1],y=0,g=1,C=2;for(a[0]={lit:-1,f:m.f+p.f,l:m,r:p,d:0};g!=f-1;)m=y!=g&&(C==f||a[y].f<a[C].f)?a[y++]:a[C++],p=y!=g&&(C==f||a[y].f<a[C].f)?a[y++]:a[C++],a[g++]={lit:-1,f:m.f+p.f,l:m,r:p};var O=r.F.setDepth(a[g-1],0);for(O>i&&(r.F.restrictDepth(d,i,O),O=i),l=0;l<f;l++)s[1+(d[l].lit<<1)]=d[l].d;return O},r.F.setDepth=function(o,s){return o.lit!=-1?(o.d=s,s):Math.max(r.F.setDepth(o.l,s+1),r.F.setDepth(o.r,s+1))},r.F.restrictDepth=function(o,s,i){var a=0,c=1<<i-s,u=0;for(o.sort((function(f,d){return d.d==f.d?f.f-d.f:d.d-f.d})),a=0;a<o.length&&o[a].d>s;a++){var l=o[a].d;o[a].d=s,u+=c-(1<<i-l)}for(u>>>=i-s;u>0;)(l=o[a].d)<s?(o[a].d++,u-=1<<s-l-1):a++;for(;a>=0;a--)o[a].d==s&&u<0&&(o[a].d--,u++);u!=0&&console.log("debt left")},r.F._goodIndex=function(o,s){var i=0;return s[16|i]<=o&&(i|=16),s[8|i]<=o&&(i|=8),s[4|i]<=o&&(i|=4),s[2|i]<=o&&(i|=2),s[1|i]<=o&&(i|=1),i},r.F._writeLit=function(o,s,i,a){return r.F._putsF(i,a,s[o<<1]),a+s[1+(o<<1)]},r.F.inflate=function(o,s){var i=Uint8Array;if(o[0]==3&&o[1]==0)return s||new i(0);var a=r.F,c=a._bitsF,u=a._bitsE,l=a._decodeTiny,f=a.makeCodes,d=a.codes2map,h=a._get17,m=a.U,p=s==null;p&&(s=new i(o.length>>>2<<3));for(var y,g,C=0,O=0,w=0,_=0,S=0,I=0,v=0,x=0,P=0;C==0;)if(C=c(o,P,1),O=c(o,P+1,2),P+=3,O!=0){if(p&&(s=r.F._check(s,x+(1<<17))),O==1&&(y=m.flmap,g=m.fdmap,I=511,v=31),O==2){w=u(o,P,5)+257,_=u(o,P+5,5)+1,S=u(o,P+10,4)+4,P+=14;for(var A=0;A<38;A+=2)m.itree[A]=0,m.itree[A+1]=0;var M=1;for(A=0;A<S;A++){var F=u(o,P+3*A,3);m.itree[1+(m.ordr[A]<<1)]=F,F>M&&(M=F)}P+=3*S,f(m.itree,M),d(m.itree,M,m.imap),y=m.lmap,g=m.dmap,P=l(m.imap,(1<<M)-1,w+_,o,P,m.ttree);var N=a._copyOut(m.ttree,0,w,m.ltree);I=(1<<N)-1;var W=a._copyOut(m.ttree,w,_,m.dtree);v=(1<<W)-1,f(m.ltree,N),d(m.ltree,N,y),f(m.dtree,W),d(m.dtree,W,g)}for(;;){var E=y[h(o,P)&I];P+=15&E;var k=E>>>4;if(!(k>>>8))s[x++]=k;else{if(k==256)break;var U=x+k-254;if(k>264){var $=m.ldef[k-257];U=x+($>>>3)+u(o,P,7&$),P+=7&$}var D=g[h(o,P)&v];P+=15&D;var V=D>>>4,Z=m.ddef[V],G=(Z>>>4)+c(o,P,15&Z);for(P+=15&Z,p&&(s=r.F._check(s,x+(1<<17)));x<U;)s[x]=s[x++-G],s[x]=s[x++-G],s[x]=s[x++-G],s[x]=s[x++-G];x=U}}}else{(7&P)!=0&&(P+=8-(7&P));var B=4+(P>>>3),z=o[B-4]|o[B-3]<<8;p&&(s=r.F._check(s,x+z)),s.set(new i(o.buffer,o.byteOffset+B,z),x),P=B+z<<3,x+=z}return s.length==x?s:s.slice(0,x)},r.F._check=function(o,s){var i=o.length;if(s<=i)return o;var a=new Uint8Array(Math.max(i<<1,s));return a.set(o,0),a},r.F._decodeTiny=function(o,s,i,a,c,u){for(var l=r.F._bitsE,f=r.F._get17,d=0;d<i;){var h=o[f(a,c)&s];c+=15&h;var m=h>>>4;if(m<=15)u[d]=m,d++;else{var p=0,y=0;m==16?(y=3+l(a,c,2),c+=2,p=u[d-1]):m==17?(y=3+l(a,c,3),c+=3):m==18&&(y=11+l(a,c,7),c+=7);for(var g=d+y;d<g;)u[d]=p,d++}}return c},r.F._copyOut=function(o,s,i,a){for(var c=0,u=0,l=a.length>>>1;u<i;){var f=o[u+s];a[u<<1]=0,a[1+(u<<1)]=f,f>c&&(c=f),u++}for(;u<l;)a[u<<1]=0,a[1+(u<<1)]=0,u++;return c},r.F.makeCodes=function(o,s){for(var i,a,c,u,l=r.F.U,f=o.length,d=l.bl_count,h=0;h<=s;h++)d[h]=0;for(h=1;h<f;h+=2)d[o[h]]++;var m=l.next_code;for(i=0,d[0]=0,a=1;a<=s;a++)i=i+d[a-1]<<1,m[a]=i;for(c=0;c<f;c+=2)(u=o[c+1])!=0&&(o[c]=m[u],m[u]++)},r.F.codes2map=function(o,s,i){for(var a=o.length,c=r.F.U.rev15,u=0;u<a;u+=2)if(o[u+1]!=0)for(var l=u>>1,f=o[u+1],d=l<<4|f,h=s-f,m=o[u]<<h,p=m+(1<<h);m!=p;)i[c[m]>>>15-s]=d,m++},r.F.revCodes=function(o,s){for(var i=r.F.U.rev15,a=15-s,c=0;c<o.length;c+=2){var u=o[c]<<s-o[c+1];o[c]=i[u]>>>a}},r.F._putsE=function(o,s,i){i<<=7&s;var a=s>>>3;o[a]|=i,o[a+1]|=i>>>8},r.F._putsF=function(o,s,i){i<<=7&s;var a=s>>>3;o[a]|=i,o[a+1]|=i>>>8,o[a+2]|=i>>>16},r.F._bitsE=function(o,s,i){return(o[s>>>3]|o[1+(s>>>3)]<<8)>>>(7&s)&(1<<i)-1},r.F._bitsF=function(o,s,i){return(o[s>>>3]|o[1+(s>>>3)]<<8|o[2+(s>>>3)]<<16)>>>(7&s)&(1<<i)-1},r.F._get17=function(o,s){return(o[s>>>3]|o[1+(s>>>3)]<<8|o[2+(s>>>3)]<<16)>>>(7&s)},r.F._get25=function(o,s){return(o[s>>>3]|o[1+(s>>>3)]<<8|o[2+(s>>>3)]<<16|o[3+(s>>>3)]<<24)>>>(7&s)},r.F.U=(t=Uint16Array,n=Uint32Array,{next_code:new t(16),bl_count:new t(16),ordr:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],of0:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],exb:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],ldef:new t(32),df0:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],dxb:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],ddef:new n(32),flmap:new t(512),fltree:[],fdmap:new t(32),fdtree:[],lmap:new t(32768),ltree:[],ttree:[],dmap:new t(32768),dtree:[],imap:new t(512),itree:[],rev15:new t(32768),lhst:new n(286),dhst:new n(30),ihst:new n(19),lits:new n(15e3),strt:new t(65536),prev:new t(32768)}),(function(){for(var o=r.F.U,s=0;s<32768;s++){var i=s;i=(4278255360&(i=(4042322160&(i=(3435973836&(i=(2863311530&i)>>>1|(1431655765&i)<<1))>>>2|(858993459&i)<<2))>>>4|(252645135&i)<<4))>>>8|(16711935&i)<<8,o.rev15[s]=(i>>>16|i<<16)>>>17}function a(c,u,l){for(;u--!=0;)c.push(0,l)}for(s=0;s<32;s++)o.ldef[s]=o.of0[s]<<3|o.exb[s],o.ddef[s]=o.df0[s]<<4|o.dxb[s];a(o.fltree,144,8),a(o.fltree,112,9),a(o.fltree,24,7),a(o.fltree,8,8),r.F.makeCodes(o.fltree,9),r.F.codes2map(o.fltree,9,o.flmap),r.F.revCodes(o.fltree,9),a(o.fdtree,32,5),r.F.makeCodes(o.fdtree,5),r.F.codes2map(o.fdtree,5,o.fdmap),r.F.revCodes(o.fdtree,5),a(o.itree,19,0),a(o.ltree,286,0),a(o.dtree,30,0),a(o.ttree,320,0)})()})();var pP=fP({__proto__:null,default:Li},[Li]);const vn=(function(){var e={nextZero(l,f){for(;l[f]!=0;)f++;return f},readUshort:(l,f)=>l[f]<<8|l[f+1],writeUshort(l,f,d){l[f]=d>>8&255,l[f+1]=255&d},readUint:(l,f)=>16777216*l[f]+(l[f+1]<<16|l[f+2]<<8|l[f+3]),writeUint(l,f,d){l[f]=d>>24&255,l[f+1]=d>>16&255,l[f+2]=d>>8&255,l[f+3]=255&d},readASCII(l,f,d){let h="";for(let m=0;m<d;m++)h+=String.fromCharCode(l[f+m]);return h},writeASCII(l,f,d){for(let h=0;h<d.length;h++)l[f+h]=d.charCodeAt(h)},readBytes(l,f,d){const h=[];for(let m=0;m<d;m++)h.push(l[f+m]);return h},pad:l=>l.length<2?`0${l}`:l,readUTF8(l,f,d){let h,m="";for(let p=0;p<d;p++)m+=`%${e.pad(l[f+p].toString(16))}`;try{h=decodeURIComponent(m)}catch{return e.readASCII(l,f,d)}return h}};function t(l,f,d,h){const m=f*d,p=s(h),y=Math.ceil(f*p/8),g=new Uint8Array(4*m),C=new Uint32Array(g.buffer),{ctype:O}=h,{depth:w}=h,_=e.readUshort;if(O==6){const $=m<<2;if(w==8)for(var S=0;S<$;S+=4)g[S]=l[S],g[S+1]=l[S+1],g[S+2]=l[S+2],g[S+3]=l[S+3];if(w==16)for(S=0;S<$;S++)g[S]=l[S<<1]}else if(O==2){const $=h.tabs.tRNS;if($==null){if(w==8)for(S=0;S<m;S++){var I=3*S;C[S]=255<<24|l[I+2]<<16|l[I+1]<<8|l[I]}if(w==16)for(S=0;S<m;S++)I=6*S,C[S]=255<<24|l[I+4]<<16|l[I+2]<<8|l[I]}else{var v=$[0];const D=$[1],V=$[2];if(w==8)for(S=0;S<m;S++){var x=S<<2;I=3*S,C[S]=255<<24|l[I+2]<<16|l[I+1]<<8|l[I],l[I]==v&&l[I+1]==D&&l[I+2]==V&&(g[x+3]=0)}if(w==16)for(S=0;S<m;S++)x=S<<2,I=6*S,C[S]=255<<24|l[I+4]<<16|l[I+2]<<8|l[I],_(l,I)==v&&_(l,I+2)==D&&_(l,I+4)==V&&(g[x+3]=0)}}else if(O==3){const $=h.tabs.PLTE,D=h.tabs.tRNS,V=D?D.length:0;if(w==1)for(var P=0;P<d;P++){var A=P*y,M=P*f;for(S=0;S<f;S++){x=M+S<<2;var F=3*(N=l[A+(S>>3)]>>7-((7&S)<<0)&1);g[x]=$[F],g[x+1]=$[F+1],g[x+2]=$[F+2],g[x+3]=N<V?D[N]:255}}if(w==2)for(P=0;P<d;P++)for(A=P*y,M=P*f,S=0;S<f;S++)x=M+S<<2,F=3*(N=l[A+(S>>2)]>>6-((3&S)<<1)&3),g[x]=$[F],g[x+1]=$[F+1],g[x+2]=$[F+2],g[x+3]=N<V?D[N]:255;if(w==4)for(P=0;P<d;P++)for(A=P*y,M=P*f,S=0;S<f;S++)x=M+S<<2,F=3*(N=l[A+(S>>1)]>>4-((1&S)<<2)&15),g[x]=$[F],g[x+1]=$[F+1],g[x+2]=$[F+2],g[x+3]=N<V?D[N]:255;if(w==8)for(S=0;S<m;S++){var N;x=S<<2,F=3*(N=l[S]),g[x]=$[F],g[x+1]=$[F+1],g[x+2]=$[F+2],g[x+3]=N<V?D[N]:255}}else if(O==4){if(w==8)for(S=0;S<m;S++){x=S<<2;var W=l[E=S<<1];g[x]=W,g[x+1]=W,g[x+2]=W,g[x+3]=l[E+1]}if(w==16)for(S=0;S<m;S++){var E;x=S<<2,W=l[E=S<<2],g[x]=W,g[x+1]=W,g[x+2]=W,g[x+3]=l[E+2]}}else if(O==0)for(v=h.tabs.tRNS?h.tabs.tRNS:-1,P=0;P<d;P++){const $=P*y,D=P*f;if(w==1)for(var k=0;k<f;k++){var U=(W=255*(l[$+(k>>>3)]>>>7-(7&k)&1))==255*v?0:255;C[D+k]=U<<24|W<<16|W<<8|W}else if(w==2)for(k=0;k<f;k++)U=(W=85*(l[$+(k>>>2)]>>>6-((3&k)<<1)&3))==85*v?0:255,C[D+k]=U<<24|W<<16|W<<8|W;else if(w==4)for(k=0;k<f;k++)U=(W=17*(l[$+(k>>>1)]>>>4-((1&k)<<2)&15))==17*v?0:255,C[D+k]=U<<24|W<<16|W<<8|W;else if(w==8)for(k=0;k<f;k++)U=(W=l[$+k])==v?0:255,C[D+k]=U<<24|W<<16|W<<8|W;else if(w==16)for(k=0;k<f;k++)W=l[$+(k<<1)],U=_(l,$+(k<<1))==v?0:255,C[D+k]=U<<24|W<<16|W<<8|W}return g}function n(l,f,d,h){const m=s(l),p=Math.ceil(d*m/8),y=new Uint8Array((p+1+l.interlace)*h);return f=l.tabs.CgBI?o(f,y):r(f,y),l.interlace==0?f=i(f,l,0,d,h):l.interlace==1&&(f=(function(C,O){const w=O.width,_=O.height,S=s(O),I=S>>3,v=Math.ceil(w*S/8),x=new Uint8Array(_*v);let P=0;const A=[0,0,4,0,2,0,1],M=[0,4,0,2,0,1,0],F=[8,8,8,4,4,2,2],N=[8,8,4,4,2,2,1];let W=0;for(;W<7;){const k=F[W],U=N[W];let $=0,D=0,V=A[W];for(;V<_;)V+=k,D++;let Z=M[W];for(;Z<w;)Z+=U,$++;const G=Math.ceil($*S/8);i(C,O,P,$,D);let B=0,z=A[W];for(;z<_;){let X=M[W],q=P+B*G<<3;for(;X<w;){var E;if(S==1&&(E=(E=C[q>>3])>>7-(7&q)&1,x[z*v+(X>>3)]|=E<<7-((7&X)<<0)),S==2&&(E=(E=C[q>>3])>>6-(7&q)&3,x[z*v+(X>>2)]|=E<<6-((3&X)<<1)),S==4&&(E=(E=C[q>>3])>>4-(7&q)&15,x[z*v+(X>>1)]|=E<<4-((1&X)<<2)),S>=8){const oe=z*v+X*I;for(let Q=0;Q<I;Q++)x[oe+Q]=C[(q>>3)+Q]}q+=S,X+=U}B++,z+=k}$*D!=0&&(P+=D*(1+G)),W+=1}return x})(f,l)),f}function r(l,f){return o(new Uint8Array(l.buffer,2,l.length-6),f)}var o=(function(){const l={H:{}};return l.H.N=function(f,d){const h=Uint8Array;let m,p,y=0,g=0,C=0,O=0,w=0,_=0,S=0,I=0,v=0;if(f[0]==3&&f[1]==0)return d||new h(0);const x=l.H,P=x.b,A=x.e,M=x.R,F=x.n,N=x.A,W=x.Z,E=x.m,k=d==null;for(k&&(d=new h(f.length>>>2<<5));y==0;)if(y=P(f,v,1),g=P(f,v+1,2),v+=3,g!=0){if(k&&(d=l.H.W(d,I+(1<<17))),g==1&&(m=E.J,p=E.h,_=511,S=31),g==2){C=A(f,v,5)+257,O=A(f,v+5,5)+1,w=A(f,v+10,4)+4,v+=14;let $=1;for(var U=0;U<38;U+=2)E.Q[U]=0,E.Q[U+1]=0;for(U=0;U<w;U++){const Z=A(f,v+3*U,3);E.Q[1+(E.X[U]<<1)]=Z,Z>$&&($=Z)}v+=3*w,F(E.Q,$),N(E.Q,$,E.u),m=E.w,p=E.d,v=M(E.u,(1<<$)-1,C+O,f,v,E.v);const D=x.V(E.v,0,C,E.C);_=(1<<D)-1;const V=x.V(E.v,C,O,E.D);S=(1<<V)-1,F(E.C,D),N(E.C,D,m),F(E.D,V),N(E.D,V,p)}for(;;){const $=m[W(f,v)&_];v+=15&$;const D=$>>>4;if(!(D>>>8))d[I++]=D;else{if(D==256)break;{let V=I+D-254;if(D>264){const X=E.q[D-257];V=I+(X>>>3)+A(f,v,7&X),v+=7&X}const Z=p[W(f,v)&S];v+=15&Z;const G=Z>>>4,B=E.c[G],z=(B>>>4)+P(f,v,15&B);for(v+=15&B;I<V;)d[I]=d[I++-z],d[I]=d[I++-z],d[I]=d[I++-z],d[I]=d[I++-z];I=V}}}}else{(7&v)!=0&&(v+=8-(7&v));const $=4+(v>>>3),D=f[$-4]|f[$-3]<<8;k&&(d=l.H.W(d,I+D)),d.set(new h(f.buffer,f.byteOffset+$,D),I),v=$+D<<3,I+=D}return d.length==I?d:d.slice(0,I)},l.H.W=function(f,d){const h=f.length;if(d<=h)return f;const m=new Uint8Array(h<<1);return m.set(f,0),m},l.H.R=function(f,d,h,m,p,y){const g=l.H.e,C=l.H.Z;let O=0;for(;O<h;){const w=f[C(m,p)&d];p+=15&w;const _=w>>>4;if(_<=15)y[O]=_,O++;else{let S=0,I=0;_==16?(I=3+g(m,p,2),p+=2,S=y[O-1]):_==17?(I=3+g(m,p,3),p+=3):_==18&&(I=11+g(m,p,7),p+=7);const v=O+I;for(;O<v;)y[O]=S,O++}}return p},l.H.V=function(f,d,h,m){let p=0,y=0;const g=m.length>>>1;for(;y<h;){const C=f[y+d];m[y<<1]=0,m[1+(y<<1)]=C,C>p&&(p=C),y++}for(;y<g;)m[y<<1]=0,m[1+(y<<1)]=0,y++;return p},l.H.n=function(f,d){const h=l.H.m,m=f.length;let p,y,g,C;const O=h.j;for(var w=0;w<=d;w++)O[w]=0;for(w=1;w<m;w+=2)O[f[w]]++;const _=h.K;for(p=0,O[0]=0,y=1;y<=d;y++)p=p+O[y-1]<<1,_[y]=p;for(g=0;g<m;g+=2)C=f[g+1],C!=0&&(f[g]=_[C],_[C]++)},l.H.A=function(f,d,h){const m=f.length,p=l.H.m.r;for(let y=0;y<m;y+=2)if(f[y+1]!=0){const g=y>>1,C=f[y+1],O=g<<4|C,w=d-C;let _=f[y]<<w;const S=_+(1<<w);for(;_!=S;)h[p[_]>>>15-d]=O,_++}},l.H.l=function(f,d){const h=l.H.m.r,m=15-d;for(let p=0;p<f.length;p+=2){const y=f[p]<<d-f[p+1];f[p]=h[y]>>>m}},l.H.M=function(f,d,h){h<<=7&d;const m=d>>>3;f[m]|=h,f[m+1]|=h>>>8},l.H.I=function(f,d,h){h<<=7&d;const m=d>>>3;f[m]|=h,f[m+1]|=h>>>8,f[m+2]|=h>>>16},l.H.e=function(f,d,h){return(f[d>>>3]|f[1+(d>>>3)]<<8)>>>(7&d)&(1<<h)-1},l.H.b=function(f,d,h){return(f[d>>>3]|f[1+(d>>>3)]<<8|f[2+(d>>>3)]<<16)>>>(7&d)&(1<<h)-1},l.H.Z=function(f,d){return(f[d>>>3]|f[1+(d>>>3)]<<8|f[2+(d>>>3)]<<16)>>>(7&d)},l.H.i=function(f,d){return(f[d>>>3]|f[1+(d>>>3)]<<8|f[2+(d>>>3)]<<16|f[3+(d>>>3)]<<24)>>>(7&d)},l.H.m=(function(){const f=Uint16Array,d=Uint32Array;return{K:new f(16),j:new f(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new f(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new d(32),J:new f(512),_:[],h:new f(32),$:[],w:new f(32768),C:[],v:[],d:new f(32768),D:[],u:new f(512),Q:[],r:new f(32768),s:new d(286),Y:new d(30),a:new d(19),t:new d(15e3),k:new f(65536),g:new f(32768)}})(),(function(){const f=l.H.m;for(var d=0;d<32768;d++){let m=d;m=(2863311530&m)>>>1|(1431655765&m)<<1,m=(3435973836&m)>>>2|(858993459&m)<<2,m=(4042322160&m)>>>4|(252645135&m)<<4,m=(4278255360&m)>>>8|(16711935&m)<<8,f.r[d]=(m>>>16|m<<16)>>>17}function h(m,p,y){for(;p--!=0;)m.push(0,y)}for(d=0;d<32;d++)f.q[d]=f.S[d]<<3|f.T[d],f.c[d]=f.p[d]<<4|f.z[d];h(f._,144,8),h(f._,112,9),h(f._,24,7),h(f._,8,8),l.H.n(f._,9),l.H.A(f._,9,f.J),l.H.l(f._,9),h(f.$,32,5),l.H.n(f.$,5),l.H.A(f.$,5,f.h),l.H.l(f.$,5),h(f.Q,19,0),h(f.C,286,0),h(f.D,30,0),h(f.v,320,0)})(),l.H.N})();function s(l){return[1,null,3,1,2,null,4][l.ctype]*l.depth}function i(l,f,d,h,m){let p=s(f);const y=Math.ceil(h*p/8);let g,C;p=Math.ceil(p/8);let O=l[d],w=0;if(O>1&&(l[d]=[0,0,1][O-2]),O==3)for(w=p;w<y;w++)l[w+1]=l[w+1]+(l[w+1-p]>>>1)&255;for(let _=0;_<m;_++)if(g=d+_*y,C=g+_+1,O=l[C-1],w=0,O==0)for(;w<y;w++)l[g+w]=l[C+w];else if(O==1){for(;w<p;w++)l[g+w]=l[C+w];for(;w<y;w++)l[g+w]=l[C+w]+l[g+w-p]}else if(O==2)for(;w<y;w++)l[g+w]=l[C+w]+l[g+w-y];else if(O==3){for(;w<p;w++)l[g+w]=l[C+w]+(l[g+w-y]>>>1);for(;w<y;w++)l[g+w]=l[C+w]+(l[g+w-y]+l[g+w-p]>>>1)}else{for(;w<p;w++)l[g+w]=l[C+w]+a(0,l[g+w-y],0);for(;w<y;w++)l[g+w]=l[C+w]+a(l[g+w-p],l[g+w-y],l[g+w-p-y])}return l}function a(l,f,d){const h=l+f-d,m=h-l,p=h-f,y=h-d;return m*m<=p*p&&m*m<=y*y?l:p*p<=y*y?f:d}function c(l,f,d){d.width=e.readUint(l,f),f+=4,d.height=e.readUint(l,f),f+=4,d.depth=l[f],f++,d.ctype=l[f],f++,d.compress=l[f],f++,d.filter=l[f],f++,d.interlace=l[f],f++}function u(l,f,d,h,m,p,y,g,C){const O=Math.min(f,m),w=Math.min(d,p);let _=0,S=0;for(let W=0;W<w;W++)for(let E=0;E<O;E++)if(y>=0&&g>=0?(_=W*f+E<<2,S=(g+W)*m+y+E<<2):(_=(-g+W)*f-y+E<<2,S=W*m+E<<2),C==0)h[S]=l[_],h[S+1]=l[_+1],h[S+2]=l[_+2],h[S+3]=l[_+3];else if(C==1){var I=l[_+3]*.00392156862745098,v=l[_]*I,x=l[_+1]*I,P=l[_+2]*I,A=h[S+3]*(1/255),M=h[S]*A,F=h[S+1]*A,N=h[S+2]*A;const k=1-I,U=I+A*k,$=U==0?0:1/U;h[S+3]=255*U,h[S+0]=(v+M*k)*$,h[S+1]=(x+F*k)*$,h[S+2]=(P+N*k)*$}else if(C==2)I=l[_+3],v=l[_],x=l[_+1],P=l[_+2],A=h[S+3],M=h[S],F=h[S+1],N=h[S+2],I==A&&v==M&&x==F&&P==N?(h[S]=0,h[S+1]=0,h[S+2]=0,h[S+3]=0):(h[S]=v,h[S+1]=x,h[S+2]=P,h[S+3]=I);else if(C==3){if(I=l[_+3],v=l[_],x=l[_+1],P=l[_+2],A=h[S+3],M=h[S],F=h[S+1],N=h[S+2],I==A&&v==M&&x==F&&P==N)continue;if(I<220&&A>20)return!1}return!0}return{decode:function(f){const d=new Uint8Array(f);let h=8;const m=e,p=m.readUshort,y=m.readUint,g={tabs:{},frames:[]},C=new Uint8Array(d.length);let O,w=0,_=0;const S=[137,80,78,71,13,10,26,10];for(var I=0;I<8;I++)if(d[I]!=S[I])throw"The input is not a PNG file!";for(;h<d.length;){const W=m.readUint(d,h);h+=4;const E=m.readASCII(d,h,4);if(h+=4,E=="IHDR")c(d,h,g);else if(E=="iCCP"){for(var v=h;d[v]!=0;)v++;m.readASCII(d,h,v-h),d[v+1];const k=d.slice(v+2,h+W);let U=null;try{U=r(k)}catch{U=o(k)}g.tabs[E]=U}else if(E=="CgBI")g.tabs[E]=d.slice(h,h+4);else if(E=="IDAT"){for(I=0;I<W;I++)C[w+I]=d[h+I];w+=W}else if(E=="acTL")g.tabs[E]={num_frames:y(d,h),num_plays:y(d,h+4)},O=new Uint8Array(d.length);else if(E=="fcTL"){_!=0&&((N=g.frames[g.frames.length-1]).data=n(g,O.slice(0,_),N.rect.width,N.rect.height),_=0);const k={x:y(d,h+12),y:y(d,h+16),width:y(d,h+4),height:y(d,h+8)};let U=p(d,h+22);U=p(d,h+20)/(U==0?100:U);const $={rect:k,delay:Math.round(1e3*U),dispose:d[h+24],blend:d[h+25]};g.frames.push($)}else if(E=="fdAT"){for(I=0;I<W-4;I++)O[_+I]=d[h+I+4];_+=W-4}else if(E=="pHYs")g.tabs[E]=[m.readUint(d,h),m.readUint(d,h+4),d[h+8]];else if(E=="cHRM")for(g.tabs[E]=[],I=0;I<8;I++)g.tabs[E].push(m.readUint(d,h+4*I));else if(E=="tEXt"||E=="zTXt"){g.tabs[E]==null&&(g.tabs[E]={});var x=m.nextZero(d,h),P=m.readASCII(d,h,x-h),A=h+W-x-1;if(E=="tEXt")F=m.readASCII(d,x+1,A);else{var M=r(d.slice(x+2,x+2+A));F=m.readUTF8(M,0,M.length)}g.tabs[E][P]=F}else if(E=="iTXt"){g.tabs[E]==null&&(g.tabs[E]={}),x=0,v=h,x=m.nextZero(d,v),P=m.readASCII(d,v,x-v);const k=d[v=x+1];var F;d[v+1],v+=2,x=m.nextZero(d,v),m.readASCII(d,v,x-v),v=x+1,x=m.nextZero(d,v),m.readUTF8(d,v,x-v),A=W-((v=x+1)-h),k==0?F=m.readUTF8(d,v,A):(M=r(d.slice(v,v+A)),F=m.readUTF8(M,0,M.length)),g.tabs[E][P]=F}else if(E=="PLTE")g.tabs[E]=m.readBytes(d,h,W);else if(E=="hIST"){const k=g.tabs.PLTE.length/3;for(g.tabs[E]=[],I=0;I<k;I++)g.tabs[E].push(p(d,h+2*I))}else if(E=="tRNS")g.ctype==3?g.tabs[E]=m.readBytes(d,h,W):g.ctype==0?g.tabs[E]=p(d,h):g.ctype==2&&(g.tabs[E]=[p(d,h),p(d,h+2),p(d,h+4)]);else if(E=="gAMA")g.tabs[E]=m.readUint(d,h)/1e5;else if(E=="sRGB")g.tabs[E]=d[h];else if(E=="bKGD")g.ctype==0||g.ctype==4?g.tabs[E]=[p(d,h)]:g.ctype==2||g.ctype==6?g.tabs[E]=[p(d,h),p(d,h+2),p(d,h+4)]:g.ctype==3&&(g.tabs[E]=d[h]);else if(E=="IEND")break;h+=W,m.readUint(d,h),h+=4}var N;return _!=0&&((N=g.frames[g.frames.length-1]).data=n(g,O.slice(0,_),N.rect.width,N.rect.height)),g.data=n(g,C,g.width,g.height),delete g.compress,delete g.interlace,delete g.filter,g},toRGBA8:function(f){const d=f.width,h=f.height;if(f.tabs.acTL==null)return[t(f.data,d,h,f).buffer];const m=[];f.frames[0].data==null&&(f.frames[0].data=f.data);const p=d*h*4,y=new Uint8Array(p),g=new Uint8Array(p),C=new Uint8Array(p);for(let w=0;w<f.frames.length;w++){const _=f.frames[w],S=_.rect.x,I=_.rect.y,v=_.rect.width,x=_.rect.height,P=t(_.data,v,x,f);if(w!=0)for(var O=0;O<p;O++)C[O]=y[O];if(_.blend==0?u(P,v,x,y,d,h,S,I,0):_.blend==1&&u(P,v,x,y,d,h,S,I,1),m.push(y.buffer.slice(0)),_.dispose!=0){if(_.dispose==1)u(g,v,x,y,d,h,S,I,0);else if(_.dispose==2)for(O=0;O<p;O++)y[O]=C[O]}}return m},_paeth:a,_copyTile:u,_bin:e}})();(function(){const{_copyTile:e}=vn,{_bin:t}=vn,n=vn._paeth;var r={table:(function(){const v=new Uint32Array(256);for(let x=0;x<256;x++){let P=x;for(let A=0;A<8;A++)1&P?P=3988292384^P>>>1:P>>>=1;v[x]=P}return v})(),update(v,x,P,A){for(let M=0;M<A;M++)v=r.table[255&(v^x[P+M])]^v>>>8;return v},crc:(v,x,P)=>4294967295^r.update(4294967295,v,x,P)};function o(v,x,P,A){x[P]+=v[0]*A>>4,x[P+1]+=v[1]*A>>4,x[P+2]+=v[2]*A>>4,x[P+3]+=v[3]*A>>4}function s(v){return Math.max(0,Math.min(255,v))}function i(v,x){const P=v[0]-x[0],A=v[1]-x[1],M=v[2]-x[2],F=v[3]-x[3];return P*P+A*A+M*M+F*F}function a(v,x,P,A,M,F,N){N==null&&(N=1);const W=A.length,E=[];for(var k=0;k<W;k++){const z=A[k];E.push([z>>>0&255,z>>>8&255,z>>>16&255,z>>>24&255])}for(k=0;k<W;k++){let z=4294967295;for(var U=0,$=0;$<W;$++){var D=i(E[k],E[$]);$!=k&&D<z&&(z=D,U=$)}}const V=new Uint32Array(M.buffer),Z=new Int16Array(x*P*4),G=[0,8,2,10,12,4,14,6,3,11,1,9,15,7,13,5];for(k=0;k<G.length;k++)G[k]=255*((G[k]+.5)/16-.5);for(let z=0;z<P;z++)for(let X=0;X<x;X++){var B;k=4*(z*x+X),N!=2?B=[s(v[k]+Z[k]),s(v[k+1]+Z[k+1]),s(v[k+2]+Z[k+2]),s(v[k+3]+Z[k+3])]:(D=G[4*(3&z)+(3&X)],B=[s(v[k]+D),s(v[k+1]+D),s(v[k+2]+D),s(v[k+3]+D)]),U=0;let q=16777215;for($=0;$<W;$++){const re=i(B,E[$]);re<q&&(q=re,U=$)}const oe=E[U],Q=[B[0]-oe[0],B[1]-oe[1],B[2]-oe[2],B[3]-oe[3]];N==1&&(X!=x-1&&o(Q,Z,k+4,7),z!=P-1&&(X!=0&&o(Q,Z,k+4*x-4,3),o(Q,Z,k+4*x,5),X!=x-1&&o(Q,Z,k+4*x+4,1))),F[k>>2]=U,V[k>>2]=A[U]}}function c(v,x,P,A,M){M==null&&(M={});const{crc:F}=r,N=t.writeUint,W=t.writeUshort,E=t.writeASCII;let k=8;const U=v.frames.length>1;let $,D=!1,V=33+(U?20:0);if(M.sRGB!=null&&(V+=13),M.pHYs!=null&&(V+=21),M.iCCP!=null&&($=pako.deflate(M.iCCP),V+=21+$.length+4),v.ctype==3){for(var Z=v.plte.length,G=0;G<Z;G++)v.plte[G]>>>24!=255&&(D=!0);V+=8+3*Z+4+(D?8+1*Z+4:0)}for(var B=0;B<v.frames.length;B++)U&&(V+=38),V+=(oe=v.frames[B]).cimg.length+12,B!=0&&(V+=4);V+=12;const z=new Uint8Array(V),X=[137,80,78,71,13,10,26,10];for(G=0;G<8;G++)z[G]=X[G];if(N(z,k,13),k+=4,E(z,k,"IHDR"),k+=4,N(z,k,x),k+=4,N(z,k,P),k+=4,z[k]=v.depth,k++,z[k]=v.ctype,k++,z[k]=0,k++,z[k]=0,k++,z[k]=0,k++,N(z,k,F(z,k-17,17)),k+=4,M.sRGB!=null&&(N(z,k,1),k+=4,E(z,k,"sRGB"),k+=4,z[k]=M.sRGB,k++,N(z,k,F(z,k-5,5)),k+=4),M.iCCP!=null){const Q=13+$.length;N(z,k,Q),k+=4,E(z,k,"iCCP"),k+=4,E(z,k,"ICC profile"),k+=11,k+=2,z.set($,k),k+=$.length,N(z,k,F(z,k-(Q+4),Q+4)),k+=4}if(M.pHYs!=null&&(N(z,k,9),k+=4,E(z,k,"pHYs"),k+=4,N(z,k,M.pHYs[0]),k+=4,N(z,k,M.pHYs[1]),k+=4,z[k]=M.pHYs[2],k++,N(z,k,F(z,k-13,13)),k+=4),U&&(N(z,k,8),k+=4,E(z,k,"acTL"),k+=4,N(z,k,v.frames.length),k+=4,N(z,k,M.loop!=null?M.loop:0),k+=4,N(z,k,F(z,k-12,12)),k+=4),v.ctype==3){for(N(z,k,3*(Z=v.plte.length)),k+=4,E(z,k,"PLTE"),k+=4,G=0;G<Z;G++){const Q=3*G,re=v.plte[G],le=255&re,K=re>>>8&255,Se=re>>>16&255;z[k+Q+0]=le,z[k+Q+1]=K,z[k+Q+2]=Se}if(k+=3*Z,N(z,k,F(z,k-3*Z-4,3*Z+4)),k+=4,D){for(N(z,k,Z),k+=4,E(z,k,"tRNS"),k+=4,G=0;G<Z;G++)z[k+G]=v.plte[G]>>>24&255;k+=Z,N(z,k,F(z,k-Z-4,Z+4)),k+=4}}let q=0;for(B=0;B<v.frames.length;B++){var oe=v.frames[B];U&&(N(z,k,26),k+=4,E(z,k,"fcTL"),k+=4,N(z,k,q++),k+=4,N(z,k,oe.rect.width),k+=4,N(z,k,oe.rect.height),k+=4,N(z,k,oe.rect.x),k+=4,N(z,k,oe.rect.y),k+=4,W(z,k,A[B]),k+=2,W(z,k,1e3),k+=2,z[k]=oe.dispose,k++,z[k]=oe.blend,k++,N(z,k,F(z,k-30,30)),k+=4);const Q=oe.cimg;N(z,k,(Z=Q.length)+(B==0?0:4)),k+=4;const re=k;E(z,k,B==0?"IDAT":"fdAT"),k+=4,B!=0&&(N(z,k,q++),k+=4),z.set(Q,k),k+=Z,N(z,k,F(z,re,k-re)),k+=4}return N(z,k,0),k+=4,E(z,k,"IEND"),k+=4,N(z,k,F(z,k-4,4)),k+=4,z.buffer}function u(v,x,P){for(let A=0;A<v.frames.length;A++){const M=v.frames[A];M.rect.width;const F=M.rect.height,N=new Uint8Array(F*M.bpl+F);M.cimg=h(M.img,F,M.bpp,M.bpl,N,x,P)}}function l(v,x,P,A,M){const F=M[0],N=M[1],W=M[2],E=M[3],k=M[4],U=M[5];let $=6,D=8,V=255;for(var Z=0;Z<v.length;Z++){const Ge=new Uint8Array(v[Z]);for(var G=Ge.length,B=0;B<G;B+=4)V&=Ge[B+3]}const z=V!=255,X=(function(Re,We,nt,rt,R,Y){const H=[];for(var ee=0;ee<Re.length;ee++){const ze=new Uint8Array(Re[ee]),ot=new Uint32Array(ze.buffer);var te;let Qe=0,xt=0,gt=We,dt=nt,jt=rt?1:0;if(ee!=0){const Sn=Y||rt||ee==1||H[ee-2].dispose!=0?1:2;let kn=0,_e=1e9;for(let De=0;De<Sn;De++){var ne=new Uint8Array(Re[ee-1-De]);const ve=new Uint32Array(Re[ee-1-De]);let Ee=We,Xe=nt,xe=-1,tr=-1;for(let Pt=0;Pt<nt;Pt++)for(let Qt=0;Qt<We;Qt++)ot[be=Pt*We+Qt]!=ve[be]&&(Qt<Ee&&(Ee=Qt),Qt>xe&&(xe=Qt),Pt<Xe&&(Xe=Pt),Pt>tr&&(tr=Pt));xe==-1&&(Ee=Xe=xe=tr=0),R&&((1&Ee)==1&&Ee--,(1&Xe)==1&&Xe--);const ct=(xe-Ee+1)*(tr-Xe+1);ct<_e&&(_e=ct,kn=De,Qe=Ee,xt=Xe,gt=xe-Ee+1,dt=tr-Xe+1)}ne=new Uint8Array(Re[ee-1-kn]),kn==1&&(H[ee-1].dispose=2),te=new Uint8Array(gt*dt*4),e(ne,We,nt,te,gt,dt,-Qe,-xt,0),jt=e(ze,We,nt,te,gt,dt,-Qe,-xt,3)?1:0,jt==1?d(ze,We,nt,te,{x:Qe,y:xt,width:gt,height:dt}):e(ze,We,nt,te,gt,dt,-Qe,-xt,0)}else te=ze.slice(0);H.push({rect:{x:Qe,y:xt,width:gt,height:dt},img:te,blend:jt,dispose:0})}if(rt)for(ee=0;ee<H.length;ee++){if((Oe=H[ee]).blend==1)continue;const ze=Oe.rect,ot=H[ee-1].rect,Qe=Math.min(ze.x,ot.x),xt=Math.min(ze.y,ot.y),gt={x:Qe,y:xt,width:Math.max(ze.x+ze.width,ot.x+ot.width)-Qe,height:Math.max(ze.y+ze.height,ot.y+ot.height)-xt};H[ee-1].dispose=1,ee-1!=0&&f(Re,We,nt,H,ee-1,gt,R),f(Re,We,nt,H,ee,gt,R)}let ue=0;if(Re.length!=1)for(var be=0;be<H.length;be++){var Oe;ue+=(Oe=H[be]).rect.width*Oe.rect.height}return H})(v,x,P,F,N,W),q={},oe=[],Q=[];if(A!=0){const Ge=[];for(B=0;B<X.length;B++)Ge.push(X[B].img.buffer);const Re=(function(R){let Y=0;for(var H=0;H<R.length;H++)Y+=R[H].byteLength;const ee=new Uint8Array(Y);let te=0;for(H=0;H<R.length;H++){const ne=new Uint8Array(R[H]),ue=ne.length;for(let be=0;be<ue;be+=4){let Oe=ne[be],ze=ne[be+1],ot=ne[be+2];const Qe=ne[be+3];Qe==0&&(Oe=ze=ot=0),ee[te+be]=Oe,ee[te+be+1]=ze,ee[te+be+2]=ot,ee[te+be+3]=Qe}te+=ue}return ee.buffer})(Ge),We=p(Re,A);for(B=0;B<We.plte.length;B++)oe.push(We.plte[B].est.rgba);let nt=0;for(B=0;B<X.length;B++){const rt=(le=X[B]).img.length;var re=new Uint8Array(We.inds.buffer,nt>>2,rt>>2);Q.push(re);const R=new Uint8Array(We.abuf,nt,rt);U&&a(le.img,le.rect.width,le.rect.height,oe,R,re),le.img.set(R),nt+=rt}}else for(Z=0;Z<X.length;Z++){var le=X[Z];const Ge=new Uint32Array(le.img.buffer);var K=le.rect.width;for(G=Ge.length,re=new Uint8Array(G),Q.push(re),B=0;B<G;B++){const Re=Ge[B];if(B!=0&&Re==Ge[B-1])re[B]=re[B-1];else if(B>K&&Re==Ge[B-K])re[B]=re[B-K];else{let We=q[Re];if(We==null&&(q[Re]=We=oe.length,oe.push(Re),oe.length>=300))break;re[B]=We}}}const Se=oe.length;for(Se<=256&&k==0&&(D=Se<=2?1:Se<=4?2:Se<=16?4:8,D=Math.max(D,E)),Z=0;Z<X.length;Z++){(le=X[Z]).rect.x,le.rect.y,K=le.rect.width;const Ge=le.rect.height;let Re=le.img;new Uint32Array(Re.buffer);let We=4*K,nt=4;if(Se<=256&&k==0){We=Math.ceil(D*K/8);var Ie=new Uint8Array(We*Ge);const rt=Q[Z];for(let R=0;R<Ge;R++){B=R*We;const Y=R*K;if(D==8)for(var ke=0;ke<K;ke++)Ie[B+ke]=rt[Y+ke];else if(D==4)for(ke=0;ke<K;ke++)Ie[B+(ke>>1)]|=rt[Y+ke]<<4-4*(1&ke);else if(D==2)for(ke=0;ke<K;ke++)Ie[B+(ke>>2)]|=rt[Y+ke]<<6-2*(3&ke);else if(D==1)for(ke=0;ke<K;ke++)Ie[B+(ke>>3)]|=rt[Y+ke]<<7-1*(7&ke)}Re=Ie,$=3,nt=1}else if(z==0&&X.length==1){Ie=new Uint8Array(K*Ge*3);const rt=K*Ge;for(B=0;B<rt;B++){const R=3*B,Y=4*B;Ie[R]=Re[Y],Ie[R+1]=Re[Y+1],Ie[R+2]=Re[Y+2]}Re=Ie,$=2,nt=3,We=3*K}le.img=Re,le.bpl=We,le.bpp=nt}return{ctype:$,depth:D,plte:oe,frames:X}}function f(v,x,P,A,M,F,N){const W=Uint8Array,E=Uint32Array,k=new W(v[M-1]),U=new E(v[M-1]),$=M+1<v.length?new W(v[M+1]):null,D=new W(v[M]),V=new E(D.buffer);let Z=x,G=P,B=-1,z=-1;for(let q=0;q<F.height;q++)for(let oe=0;oe<F.width;oe++){const Q=F.x+oe,re=F.y+q,le=re*x+Q,K=V[le];K==0||A[M-1].dispose==0&&U[le]==K&&($==null||$[4*le+3]!=0)||(Q<Z&&(Z=Q),Q>B&&(B=Q),re<G&&(G=re),re>z&&(z=re))}B==-1&&(Z=G=B=z=0),N&&((1&Z)==1&&Z--,(1&G)==1&&G--),F={x:Z,y:G,width:B-Z+1,height:z-G+1};const X=A[M];X.rect=F,X.blend=1,X.img=new Uint8Array(F.width*F.height*4),A[M-1].dispose==0?(e(k,x,P,X.img,F.width,F.height,-F.x,-F.y,0),d(D,x,P,X.img,F)):e(D,x,P,X.img,F.width,F.height,-F.x,-F.y,0)}function d(v,x,P,A,M){e(v,x,P,A,M.width,M.height,-M.x,-M.y,2)}function h(v,x,P,A,M,F,N){const W=[];let E,k=[0,1,2,3,4];F!=-1?k=[F]:(x*A>5e5||P==1)&&(k=[0]),N&&(E={level:0});const U=pP;for(var $=0;$<k.length;$++){for(let Z=0;Z<x;Z++)m(M,v,Z,A,P,k[$]);W.push(U.deflate(M,E))}let D,V=1e9;for($=0;$<W.length;$++)W[$].length<V&&(D=$,V=W[$].length);return W[D]}function m(v,x,P,A,M,F){const N=P*A;let W=N+P;if(v[W]=F,W++,F==0)if(A<500)for(var E=0;E<A;E++)v[W+E]=x[N+E];else v.set(new Uint8Array(x.buffer,N,A),W);else if(F==1){for(E=0;E<M;E++)v[W+E]=x[N+E];for(E=M;E<A;E++)v[W+E]=x[N+E]-x[N+E-M]+256&255}else if(P==0){for(E=0;E<M;E++)v[W+E]=x[N+E];if(F==2)for(E=M;E<A;E++)v[W+E]=x[N+E];if(F==3)for(E=M;E<A;E++)v[W+E]=x[N+E]-(x[N+E-M]>>1)+256&255;if(F==4)for(E=M;E<A;E++)v[W+E]=x[N+E]-n(x[N+E-M],0,0)+256&255}else{if(F==2)for(E=0;E<A;E++)v[W+E]=x[N+E]+256-x[N+E-A]&255;if(F==3){for(E=0;E<M;E++)v[W+E]=x[N+E]+256-(x[N+E-A]>>1)&255;for(E=M;E<A;E++)v[W+E]=x[N+E]+256-(x[N+E-A]+x[N+E-M]>>1)&255}if(F==4){for(E=0;E<M;E++)v[W+E]=x[N+E]+256-n(0,x[N+E-A],0)&255;for(E=M;E<A;E++)v[W+E]=x[N+E]+256-n(x[N+E-M],x[N+E-A],x[N+E-M-A])&255}}}function p(v,x){const P=new Uint8Array(v),A=P.slice(0),M=new Uint32Array(A.buffer),F=y(A,x),N=F[0],W=F[1],E=P.length,k=new Uint8Array(E>>2);let U;if(P.length<2e7)for(var $=0;$<E;$+=4)U=g(N,D=P[$]*(1/255),V=P[$+1]*(1/255),Z=P[$+2]*(1/255),G=P[$+3]*(1/255)),k[$>>2]=U.ind,M[$>>2]=U.est.rgba;else for($=0;$<E;$+=4){var D=P[$]*.00392156862745098,V=P[$+1]*(1/255),Z=P[$+2]*(1/255),G=P[$+3]*(1/255);for(U=N;U.left;)U=C(U.est,D,V,Z,G)<=0?U.left:U.right;k[$>>2]=U.ind,M[$>>2]=U.est.rgba}return{abuf:A.buffer,inds:k,plte:W}}function y(v,x,P){P==null&&(P=1e-4);const A=new Uint32Array(v.buffer),M={i0:0,i1:v.length,bst:null,est:null,tdst:0,left:null,right:null};M.bst=_(v,M.i0,M.i1),M.est=S(M.bst);const F=[M];for(;F.length<x;){let W=0,E=0;for(var N=0;N<F.length;N++)F[N].est.L>W&&(W=F[N].est.L,E=N);if(W<P)break;const k=F[E],U=O(v,A,k.i0,k.i1,k.est.e,k.est.eMq255);if(k.i0>=U||k.i1<=U){k.est.L=0;continue}const $={i0:k.i0,i1:U,bst:null,est:null,tdst:0,left:null,right:null};$.bst=_(v,$.i0,$.i1),$.est=S($.bst);const D={i0:U,i1:k.i1,bst:null,est:null,tdst:0,left:null,right:null};for(D.bst={R:[],m:[],N:k.bst.N-$.bst.N},N=0;N<16;N++)D.bst.R[N]=k.bst.R[N]-$.bst.R[N];for(N=0;N<4;N++)D.bst.m[N]=k.bst.m[N]-$.bst.m[N];D.est=S(D.bst),k.left=$,k.right=D,F[E]=$,F.push(D)}for(F.sort(((W,E)=>E.bst.N-W.bst.N)),N=0;N<F.length;N++)F[N].ind=N;return[M,F]}function g(v,x,P,A,M){if(v.left==null)return v.tdst=(function($,D,V,Z,G){const B=D-$[0],z=V-$[1],X=Z-$[2],q=G-$[3];return B*B+z*z+X*X+q*q})(v.est.q,x,P,A,M),v;const F=C(v.est,x,P,A,M);let N=v.left,W=v.right;F>0&&(N=v.right,W=v.left);const E=g(N,x,P,A,M);if(E.tdst<=F*F)return E;const k=g(W,x,P,A,M);return k.tdst<E.tdst?k:E}function C(v,x,P,A,M){const{e:F}=v;return F[0]*x+F[1]*P+F[2]*A+F[3]*M-v.eMq}function O(v,x,P,A,M,F){for(A-=4;P<A;){for(;w(v,P,M)<=F;)P+=4;for(;w(v,A,M)>F;)A-=4;if(P>=A)break;const N=x[P>>2];x[P>>2]=x[A>>2],x[A>>2]=N,P+=4,A-=4}for(;w(v,P,M)>F;)P-=4;return P+4}function w(v,x,P){return v[x]*P[0]+v[x+1]*P[1]+v[x+2]*P[2]+v[x+3]*P[3]}function _(v,x,P){const A=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],M=[0,0,0,0],F=P-x>>2;for(let N=x;N<P;N+=4){const W=v[N]*.00392156862745098,E=v[N+1]*(1/255),k=v[N+2]*(1/255),U=v[N+3]*(1/255);M[0]+=W,M[1]+=E,M[2]+=k,M[3]+=U,A[0]+=W*W,A[1]+=W*E,A[2]+=W*k,A[3]+=W*U,A[5]+=E*E,A[6]+=E*k,A[7]+=E*U,A[10]+=k*k,A[11]+=k*U,A[15]+=U*U}return A[4]=A[1],A[8]=A[2],A[9]=A[6],A[12]=A[3],A[13]=A[7],A[14]=A[11],{R:A,m:M,N:F}}function S(v){const{R:x}=v,{m:P}=v,{N:A}=v,M=P[0],F=P[1],N=P[2],W=P[3],E=A==0?0:1/A,k=[x[0]-M*M*E,x[1]-M*F*E,x[2]-M*N*E,x[3]-M*W*E,x[4]-F*M*E,x[5]-F*F*E,x[6]-F*N*E,x[7]-F*W*E,x[8]-N*M*E,x[9]-N*F*E,x[10]-N*N*E,x[11]-N*W*E,x[12]-W*M*E,x[13]-W*F*E,x[14]-W*N*E,x[15]-W*W*E],U=k,$=I;let D=[Math.random(),Math.random(),Math.random(),Math.random()],V=0,Z=0;if(A!=0)for(let B=0;B<16&&(D=$.multVec(U,D),Z=Math.sqrt($.dot(D,D)),D=$.sml(1/Z,D),!(B!=0&&Math.abs(Z-V)<1e-9));B++)V=Z;const G=[M*E,F*E,N*E,W*E];return{Cov:k,q:G,e:D,L:V,eMq255:$.dot($.sml(255,G),D),eMq:$.dot(D,G),rgba:(Math.round(255*G[3])<<24|Math.round(255*G[2])<<16|Math.round(255*G[1])<<8|Math.round(255*G[0])<<0)>>>0}}var I={multVec:(v,x)=>[v[0]*x[0]+v[1]*x[1]+v[2]*x[2]+v[3]*x[3],v[4]*x[0]+v[5]*x[1]+v[6]*x[2]+v[7]*x[3],v[8]*x[0]+v[9]*x[1]+v[10]*x[2]+v[11]*x[3],v[12]*x[0]+v[13]*x[1]+v[14]*x[2]+v[15]*x[3]],dot:(v,x)=>v[0]*x[0]+v[1]*x[1]+v[2]*x[2]+v[3]*x[3],sml:(v,x)=>[v*x[0],v*x[1],v*x[2],v*x[3]]};vn.encode=function(x,P,A,M,F,N,W){M==null&&(M=0),W==null&&(W=!1);const E=l(x,P,A,M,[!1,!1,!1,0,W,!1]);return u(E,-1),c(E,P,A,F,N)},vn.encodeLL=function(x,P,A,M,F,N,W,E){const k={ctype:0+(M==1?0:2)+(F==0?0:4),depth:N,frames:[]},U=(M+F)*N,$=U*P;for(let D=0;D<x.length;D++)k.frames.push({rect:{x:0,y:0,width:P,height:A},img:new Uint8Array(x[D]),blend:0,dispose:1,bpp:Math.ceil(U/8),bpl:Math.ceil($/8)});return u(k,0,!0),c(k,P,A,W,E)},vn.encode.compress=l,vn.encode.dither=a,vn.quantize=p,vn.quantize.getKDtree=y,vn.quantize.getNearest=g})();const qm={toArrayBuffer(e,t){const n=e.width,r=e.height,o=n<<2,s=e.getContext("2d").getImageData(0,0,n,r),i=new Uint32Array(s.data.buffer),a=(32*n+31)/32<<2,c=a*r,u=122+c,l=new ArrayBuffer(u),f=new DataView(l),d=1<<20;let h,m,p,y,g=d,C=0,O=0,w=0;function _(v){f.setUint16(O,v,!0),O+=2}function S(v){f.setUint32(O,v,!0),O+=4}function I(v){O+=v}_(19778),S(u),I(4),S(122),S(108),S(n),S(-r>>>0),_(1),_(32),S(3),S(c),S(2835),S(2835),I(8),S(16711680),S(65280),S(255),S(4278190080),S(1466527264),(function v(){for(;C<r&&g>0;){for(y=122+C*a,h=0;h<o;)g--,m=i[w++],p=m>>>24,f.setUint32(y+h,m<<8|p),h+=4;C++}w<i.length?(g=d,setTimeout(v,qm._dly)):t(l)})()},toBlob(e,t){this.toArrayBuffer(e,(n=>{t(new Blob([n],{type:"image/bmp"}))}))},_dly:9};var Yt={CHROME:"CHROME",FIREFOX:"FIREFOX",DESKTOP_SAFARI:"DESKTOP_SAFARI",IE:"IE",IOS:"IOS",ETC:"ETC"},mP={[Yt.CHROME]:16384,[Yt.FIREFOX]:11180,[Yt.DESKTOP_SAFARI]:16384,[Yt.IE]:8192,[Yt.IOS]:4096,[Yt.ETC]:8192};const fl=typeof window<"u",Km=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,$i=fl&&window.cordova&&window.cordova.require&&window.cordova.require("cordova/modulemapper"),gP=(fl||Km)&&($i&&$i.getOriginalSymbol(window,"File")||typeof File<"u"&&File),Xm=(fl||Km)&&($i&&$i.getOriginalSymbol(window,"FileReader")||typeof FileReader<"u"&&FileReader);function dl(e,t,n=Date.now()){return new Promise((r=>{const o=e.split(","),s=o[0].match(/:(.*?);/)[1],i=globalThis.atob(o[1]);let a=i.length;const c=new Uint8Array(a);for(;a--;)c[a]=i.charCodeAt(a);const u=new Blob([c],{type:s});u.name=t,u.lastModified=n,r(u)}))}function Jm(e){return new Promise(((t,n)=>{const r=new Xm;r.onload=()=>t(r.result),r.onerror=o=>n(o),r.readAsDataURL(e)}))}function Qm(e){return new Promise(((t,n)=>{const r=new Image;r.onload=()=>t(r),r.onerror=o=>n(o),r.src=e}))}function $r(){if($r.cachedResult!==void 0)return $r.cachedResult;let e=Yt.ETC;const{userAgent:t}=navigator;return/Chrom(e|ium)/i.test(t)?e=Yt.CHROME:/iP(ad|od|hone)/i.test(t)&&/WebKit/i.test(t)?e=Yt.IOS:/Safari/i.test(t)?e=Yt.DESKTOP_SAFARI:/Firefox/i.test(t)?e=Yt.FIREFOX:(/MSIE/i.test(t)||document.documentMode)&&(e=Yt.IE),$r.cachedResult=e,$r.cachedResult}function eg(e,t){const n=$r(),r=mP[n];let o=e,s=t,i=o*s;const a=o>s?s/o:o/s;for(;i>r*r;){const c=(r+o)/2,u=(r+s)/2;c<u?(s=u,o=u*a):(s=c*a,o=c),i=o*s}return{width:o,height:s}}function Ui(e,t){let n,r;try{if(n=new OffscreenCanvas(e,t),r=n.getContext("2d"),r===null)throw new Error("getContext of OffscreenCanvas returns null")}catch{n=document.createElement("canvas"),r=n.getContext("2d")}return n.width=e,n.height=t,[n,r]}function tg(e,t){const{width:n,height:r}=eg(e.width,e.height),[o,s]=Ui(n,r);return t&&/jpe?g/.test(t)&&(s.fillStyle="white",s.fillRect(0,0,o.width,o.height)),s.drawImage(e,0,0,o.width,o.height),o}function Yi(){return Yi.cachedResult!==void 0||(Yi.cachedResult=["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&typeof document<"u"&&"ontouchend"in document),Yi.cachedResult}function ji(e,t={}){return new Promise((function(n,r){let o,s;var i=function(){try{return s=tg(o,t.fileType||e.type),n([o,s])}catch(c){return r(c)}},a=function(c){try{var u=function(l){try{throw l}catch(f){return r(f)}};try{let l;return Jm(e).then((function(f){try{return l=f,Qm(l).then((function(d){try{return o=d,(function(){try{return i()}catch(h){return r(h)}})()}catch(h){return u(h)}}),u)}catch(d){return u(d)}}),u)}catch(l){u(l)}}catch(l){return r(l)}};try{if(Yi()||[Yt.DESKTOP_SAFARI,Yt.MOBILE_SAFARI].includes($r()))throw new Error("Skip createImageBitmap on IOS and Safari");return createImageBitmap(e).then((function(c){try{return o=c,i()}catch{return a()}}),a)}catch{a()}}))}function Vi(e,t,n,r,o=1){return new Promise((function(s,i){let a;if(t==="image/png"){let u,l,f;return u=e.getContext("2d"),{data:l}=u.getImageData(0,0,e.width,e.height),f=vn.encode([l.buffer],e.width,e.height,4096*o),a=new Blob([f],{type:t}),a.name=n,a.lastModified=r,c.call(this)}{let u=function(){return c.call(this)};if(t==="image/bmp")return new Promise((l=>qm.toBlob(e,l))).then((function(l){try{return a=l,a.name=n,a.lastModified=r,u.call(this)}catch(f){return i(f)}}).bind(this),i);{let l=function(){return u.call(this)};if(typeof OffscreenCanvas=="function"&&e instanceof OffscreenCanvas)return e.convertToBlob({type:t,quality:o}).then((function(f){try{return a=f,a.name=n,a.lastModified=r,l.call(this)}catch(d){return i(d)}}).bind(this),i);{let f;return f=e.toDataURL(t,o),dl(f,n,r).then((function(d){try{return a=d,l.call(this)}catch(h){return i(h)}}).bind(this),i)}}}function c(){return s(a)}}))}function In(e){e.width=0,e.height=0}function yo(){return new Promise((function(e,t){let n,r,o,s;return yo.cachedResult!==void 0?e(yo.cachedResult):dl("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==","test.jpg",Date.now()).then((function(i){try{return n=i,ji(n).then((function(a){try{return r=a[1],Vi(r,n.type,n.name,n.lastModified).then((function(c){try{return o=c,In(r),ji(o).then((function(u){try{return s=u[0],yo.cachedResult=s.width===1&&s.height===2,e(yo.cachedResult)}catch(l){return t(l)}}),t)}catch(u){return t(u)}}),t)}catch(c){return t(c)}}),t)}catch(a){return t(a)}}),t)}))}function ng(e){return new Promise(((t,n)=>{const r=new Xm;r.onload=o=>{const s=new DataView(o.target.result);if(s.getUint16(0,!1)!=65496)return t(-2);const i=s.byteLength;let a=2;for(;a<i;){if(s.getUint16(a+2,!1)<=8)return t(-1);const c=s.getUint16(a,!1);if(a+=2,c==65505){if(s.getUint32(a+=2,!1)!=1165519206)return t(-1);const u=s.getUint16(a+=6,!1)==18761;a+=s.getUint32(a+4,u);const l=s.getUint16(a,u);a+=2;for(let f=0;f<l;f++)if(s.getUint16(a+12*f,u)==274)return t(s.getUint16(a+12*f+8,u))}else{if((65280&c)!=65280)break;a+=s.getUint16(a,!1)}}return t(-1)},r.onerror=o=>n(o),r.readAsArrayBuffer(e)}))}function rg(e,t){const{width:n}=e,{height:r}=e,{maxWidthOrHeight:o}=t;let s,i=e;return isFinite(o)&&(n>o||r>o)&&([i,s]=Ui(n,r),n>r?(i.width=o,i.height=r/n*o):(i.width=n/r*o,i.height=o),s.drawImage(e,0,0,i.width,i.height),In(e)),i}function og(e,t){const{width:n}=e,{height:r}=e,[o,s]=Ui(n,r);switch(t>4&&t<9?(o.width=r,o.height=n):(o.width=n,o.height=r),t){case 2:s.transform(-1,0,0,1,n,0);break;case 3:s.transform(-1,0,0,-1,n,r);break;case 4:s.transform(1,0,0,-1,0,r);break;case 5:s.transform(0,1,1,0,0,0);break;case 6:s.transform(0,1,-1,0,r,0);break;case 7:s.transform(0,-1,-1,0,r,n);break;case 8:s.transform(0,-1,1,0,0,n)}return s.drawImage(e,0,0,n,r),In(e),o}function sg(e,t,n=0){return new Promise((function(r,o){let s,i,a,c,u,l,f,d,h,m,p,y,g,C,O,w,_,S,I,v;function x(A=5){if(t.signal&&t.signal.aborted)throw t.signal.reason;s+=A,t.onProgress(Math.min(s,100))}function P(A){if(t.signal&&t.signal.aborted)throw t.signal.reason;s=Math.min(Math.max(A,s),100),t.onProgress(s)}return s=n,i=t.maxIteration||10,a=1024*t.maxSizeMB*1024,x(),ji(e,t).then((function(A){try{return[,c]=A,x(),u=rg(c,t),x(),new Promise((function(M,F){var N;if(!(N=t.exifOrientation))return ng(e).then((function(E){try{return N=E,W.call(this)}catch(k){return F(k)}}).bind(this),F);function W(){return M(N)}return W.call(this)})).then((function(M){try{return l=M,x(),yo().then((function(F){try{return f=F?u:og(u,l),x(),d=t.initialQuality||1,h=t.fileType||e.type,Vi(f,h,e.name,e.lastModified,d).then((function(N){try{{let E=function(){if(i--&&(O>a||O>g)){let U,$;return U=v?.95*I.width:I.width,$=v?.95*I.height:I.height,[_,S]=Ui(U,$),S.drawImage(I,0,0,U,$),d*=h==="image/png"?.85:.95,Vi(_,h,e.name,e.lastModified,d).then((function(D){try{return w=D,In(I),I=_,O=w.size,P(Math.min(99,Math.floor((C-O)/(C-a)*100))),E}catch(V){return o(V)}}),o)}return[1]},k=function(){return In(I),In(_),In(u),In(f),In(c),P(100),r(w)};if(m=N,x(),p=m.size>a,y=m.size>e.size,!p&&!y)return P(100),r(m);var W;return g=e.size,C=m.size,O=C,I=f,v=!t.alwaysKeepResolution&&p,(W=(function(U){for(;U;){if(U.then)return void U.then(W,o);try{if(U.pop){if(U.length)return U.pop()?k.call(this):U;U=E}else U=U.call(this)}catch($){return o($)}}}).bind(this))(E)}}catch(E){return o(E)}}).bind(this),o)}catch(N){return o(N)}}).bind(this),o)}catch(F){return o(F)}}).bind(this),o)}catch(M){return o(M)}}).bind(this),o)}))}const yP=`
83
+ `)},yA=0,mo=[];function vA(e){var t=b.useRef([]),n=b.useRef([0,0]),r=b.useRef(),o=b.useState(yA++)[0],s=b.useState(dm)[0],i=b.useRef(e);b.useEffect(function(){i.current=e},[e]),b.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var p=LM([e.lockRef.current],(e.shards||[]).map(bm),!0).filter(Boolean);return p.forEach(function(y){return y.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),p.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=b.useCallback(function(p,y){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!i.current.allowPinchZoom;var g=Ni(p),C=n.current,O="deltaX"in p?p.deltaX:C[0]-g[0],w="deltaY"in p?p.deltaY:C[1]-g[1],_,S=p.target,I=Math.abs(O)>Math.abs(w)?"h":"v";if("touches"in p&&I==="h"&&S.type==="range")return!1;var v=window.getSelection(),x=v&&v.anchorNode,P=x?x===S||x.contains(S):!1;if(P)return!1;var M=mm(I,S);if(!M)return!0;if(M?_=I:(_=I==="v"?"h":"v",M=mm(I,S)),!M)return!1;if(!r.current&&"changedTouches"in p&&(O||w)&&(r.current=_),!_)return!0;var A=r.current||_;return pA(A,y,p,A==="h"?O:w)},[]),c=b.useCallback(function(p){var y=p;if(!(!mo.length||mo[mo.length-1]!==s)){var g="deltaY"in y?vm(y):Ni(y),C=t.current.filter(function(_){return _.name===y.type&&(_.target===y.target||y.target===_.shadowParent)&&mA(_.delta,g)})[0];if(C&&C.should){y.cancelable&&y.preventDefault();return}if(!C){var O=(i.current.shards||[]).map(bm).filter(Boolean).filter(function(_){return _.contains(y.target)}),w=O.length>0?a(y,O[0]):!i.current.noIsolation;w&&y.cancelable&&y.preventDefault()}}},[]),u=b.useCallback(function(p,y,g,C){var O={name:p,delta:y,target:g,should:C,shadowParent:bA(g)};t.current.push(O),setTimeout(function(){t.current=t.current.filter(function(w){return w!==O})},1)},[]),l=b.useCallback(function(p){n.current=Ni(p),r.current=void 0},[]),f=b.useCallback(function(p){u(p.type,vm(p),p.target,a(p,e.lockRef.current))},[]),d=b.useCallback(function(p){u(p.type,Ni(p),p.target,a(p,e.lockRef.current))},[]);b.useEffect(function(){return mo.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:d}),document.addEventListener("wheel",c,po),document.addEventListener("touchmove",c,po),document.addEventListener("touchstart",l,po),function(){mo=mo.filter(function(p){return p!==s}),document.removeEventListener("wheel",c,po),document.removeEventListener("touchmove",c,po),document.removeEventListener("touchstart",l,po)}},[]);var h=e.removeScrollBar,m=e.inert;return b.createElement(b.Fragment,null,m?b.createElement(s,{styles:gA(o)}):null,h?b.createElement(aA,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function bA(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const wA=GM(fm,vA);var Ii=b.forwardRef(function(e,t){return b.createElement(Ai,Nn({},e,{ref:t,sideCar:wA}))});Ii.classNames=Ai.classNames;var _A=[" ","Enter","ArrowUp","ArrowDown"],SA=[" ","Enter"],zr="Select",[Fi,Ri,kA]=zh(zr),[go]=Kn(zr,[kA,Oi]),Wi=Oi(),[xA,wr]=go(zr),[OA,EA]=go(zr),wm=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:i,defaultValue:a,onValueChange:c,dir:u,name:l,autoComplete:f,disabled:d,required:h,form:m}=e,p=Wi(t),[y,g]=b.useState(null),[C,O]=b.useState(null),[w,_]=b.useState(!1),S=Ec(u),[I,v]=Rr({prop:r,defaultProp:o??!1,onChange:s,caller:zr}),[x,P]=Rr({prop:i,defaultProp:a,onChange:c,caller:zr}),M=b.useRef(null),A=y?m||!!y.closest("form"):!0,[F,N]=b.useState(new Set),W=Array.from(F).map(E=>E.props.value).join(";");return T.jsx(rm,{...p,children:T.jsxs(xA,{required:h,scope:t,trigger:y,onTriggerChange:g,valueNode:C,onValueNodeChange:O,valueNodeHasChildren:w,onValueNodeHasChildrenChange:_,contentId:dr(),value:x,onValueChange:P,open:I,onOpenChange:v,dir:S,triggerPointerDownPosRef:M,disabled:d,children:[T.jsx(Fi.Provider,{scope:t,children:T.jsx(OA,{scope:e.__scopeSelect,onNativeOptionAdd:b.useCallback(E=>{N(k=>new Set(k).add(E))},[]),onNativeOptionRemove:b.useCallback(E=>{N(k=>{const U=new Set(k);return U.delete(E),U})},[]),children:n})}),A?T.jsxs(Ym,{"aria-hidden":!0,required:h,tabIndex:-1,name:l,autoComplete:f,value:x,onChange:E=>P(E.target.value),disabled:d,form:m,children:[x===void 0?T.jsx("option",{value:""}):null,Array.from(F)]},W):null]})})};wm.displayName=zr;var _m="SelectTrigger",Sm=b.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=Wi(n),i=wr(_m,n),a=i.disabled||r,c=He(t,i.onTriggerChange),u=Ri(n),l=b.useRef("touch"),[f,d,h]=Vm(p=>{const y=u().filter(O=>!O.disabled),g=y.find(O=>O.value===i.value),C=Bm(y,p,g);C!==void 0&&i.onValueChange(C.value)}),m=p=>{a||(i.onOpenChange(!0),h()),p&&(i.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return T.jsx(Jc,{asChild:!0,...s,children:T.jsx(Ne.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":jm(i.value)?"":void 0,...o,ref:c,onClick:Te(o.onClick,p=>{p.currentTarget.focus(),l.current!=="mouse"&&m(p)}),onPointerDown:Te(o.onPointerDown,p=>{l.current=p.pointerType;const y=p.target;y.hasPointerCapture(p.pointerId)&&y.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(m(p),p.preventDefault())}),onKeyDown:Te(o.onKeyDown,p=>{const y=f.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&d(p.key),!(y&&p.key===" ")&&_A.includes(p.key)&&(m(),p.preventDefault())})})})});Sm.displayName=_m;var km="SelectValue",xm=b.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:i="",...a}=e,c=wr(km,n),{onValueNodeHasChildrenChange:u}=c,l=s!==void 0,f=He(t,c.onValueNodeChange);return Mt(()=>{u(l)},[u,l]),T.jsx(Ne.span,{...a,ref:f,style:{pointerEvents:"none"},children:jm(c.value)?T.jsx(T.Fragment,{children:i}):s})});xm.displayName=km;var CA="SelectIcon",Om=b.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return T.jsx(Ne.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});Om.displayName=CA;var TA="SelectPortal",Em=e=>T.jsx(Ei,{asChild:!0,...e});Em.displayName=TA;var Lr="SelectContent",Cm=b.forwardRef((e,t)=>{const n=wr(Lr,e.__scopeSelect),[r,o]=b.useState();if(Mt(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?ms.createPortal(T.jsx(Tm,{scope:e.__scopeSelect,children:T.jsx(Fi.Slot,{scope:e.__scopeSelect,children:T.jsx("div",{children:e.children})})}),s):null}return T.jsx(Dm,{...e,ref:t})});Cm.displayName=Lr;var yn=10,[Tm,_r]=go(Lr),DA="SelectContentImpl",MA=TM("SelectContent.RemoveScroll"),Dm=b.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:i,side:a,sideOffset:c,align:u,alignOffset:l,arrowPadding:f,collisionBoundary:d,collisionPadding:h,sticky:m,hideWhenDetached:p,avoidCollisions:y,...g}=e,C=wr(Lr,n),[O,w]=b.useState(null),[_,S]=b.useState(null),I=He(t,q=>w(q)),[v,x]=b.useState(null),[P,M]=b.useState(null),A=Ri(n),[F,N]=b.useState(!1),W=b.useRef(!1);b.useEffect(()=>{if(O)return el(O)},[O]),Rc();const E=b.useCallback(q=>{const[oe,...Q]=A().map(K=>K.ref.current),[re]=Q.slice(-1),le=document.activeElement;for(const K of q)if(K===le||(K?.scrollIntoView({block:"nearest"}),K===oe&&_&&(_.scrollTop=0),K===re&&_&&(_.scrollTop=_.scrollHeight),K?.focus(),document.activeElement!==le))return},[A,_]),k=b.useCallback(()=>E([v,O]),[E,v,O]);b.useEffect(()=>{F&&k()},[F,k]);const{onOpenChange:U,triggerPointerDownPosRef:$}=C;b.useEffect(()=>{if(O){let q={x:0,y:0};const oe=re=>{q={x:Math.abs(Math.round(re.pageX)-($.current?.x??0)),y:Math.abs(Math.round(re.pageY)-($.current?.y??0))}},Q=re=>{q.x<=10&&q.y<=10?re.preventDefault():O.contains(re.target)||U(!1),document.removeEventListener("pointermove",oe),$.current=null};return $.current!==null&&(document.addEventListener("pointermove",oe),document.addEventListener("pointerup",Q,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",oe),document.removeEventListener("pointerup",Q,{capture:!0})}}},[O,U,$]),b.useEffect(()=>{const q=()=>U(!1);return window.addEventListener("blur",q),window.addEventListener("resize",q),()=>{window.removeEventListener("blur",q),window.removeEventListener("resize",q)}},[U]);const[D,V]=Vm(q=>{const oe=A().filter(le=>!le.disabled),Q=oe.find(le=>le.ref.current===document.activeElement),re=Bm(oe,q,Q);re&&setTimeout(()=>re.ref.current.focus())}),Z=b.useCallback((q,oe,Q)=>{const re=!W.current&&!Q;(C.value!==void 0&&C.value===oe||re)&&(x(q),re&&(W.current=!0))},[C.value]),G=b.useCallback(()=>O?.focus(),[O]),B=b.useCallback((q,oe,Q)=>{const re=!W.current&&!Q;(C.value!==void 0&&C.value===oe||re)&&M(q)},[C.value]),z=r==="popper"?sl:Mm,X=z===sl?{side:a,sideOffset:c,align:u,alignOffset:l,arrowPadding:f,collisionBoundary:d,collisionPadding:h,sticky:m,hideWhenDetached:p,avoidCollisions:y}:{};return T.jsx(Tm,{scope:n,content:O,viewport:_,onViewportChange:S,itemRefCallback:Z,selectedItem:v,onItemLeave:G,itemTextRefCallback:B,focusSelectedItem:k,selectedItemText:P,position:r,isPositioned:F,searchRef:D,children:T.jsx(Ii,{as:MA,allowPinchZoom:!0,children:T.jsx(pi,{asChild:!0,trapped:C.open,onMountAutoFocus:q=>{q.preventDefault()},onUnmountAutoFocus:Te(o,q=>{C.trigger?.focus({preventScroll:!0}),q.preventDefault()}),children:T.jsx(hi,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:q=>q.preventDefault(),onDismiss:()=>C.onOpenChange(!1),children:T.jsx(z,{role:"listbox",id:C.contentId,"data-state":C.open?"open":"closed",dir:C.dir,onContextMenu:q=>q.preventDefault(),...g,...X,onPlaced:()=>N(!0),ref:I,style:{display:"flex",flexDirection:"column",outline:"none",...g.style},onKeyDown:Te(g.onKeyDown,q=>{const oe=q.ctrlKey||q.altKey||q.metaKey;if(q.key==="Tab"&&q.preventDefault(),!oe&&q.key.length===1&&V(q.key),["ArrowUp","ArrowDown","Home","End"].includes(q.key)){let re=A().filter(le=>!le.disabled).map(le=>le.ref.current);if(["ArrowUp","End"].includes(q.key)&&(re=re.slice().reverse()),["ArrowUp","ArrowDown"].includes(q.key)){const le=q.target,K=re.indexOf(le);re=re.slice(K+1)}setTimeout(()=>E(re)),q.preventDefault()}})})})})})})});Dm.displayName=DA;var AA="SelectItemAlignedPosition",Mm=b.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=wr(Lr,n),i=_r(Lr,n),[a,c]=b.useState(null),[u,l]=b.useState(null),f=He(t,I=>l(I)),d=Ri(n),h=b.useRef(!1),m=b.useRef(!0),{viewport:p,selectedItem:y,selectedItemText:g,focusSelectedItem:C}=i,O=b.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&u&&p&&y&&g){const I=s.trigger.getBoundingClientRect(),v=u.getBoundingClientRect(),x=s.valueNode.getBoundingClientRect(),P=g.getBoundingClientRect();if(s.dir!=="rtl"){const le=P.left-v.left,K=x.left-le,Se=I.left-K,Ie=I.width+Se,ke=Math.max(Ie,v.width),Ge=window.innerWidth-yn,Re=pp(K,[yn,Math.max(yn,Ge-ke)]);a.style.minWidth=Ie+"px",a.style.left=Re+"px"}else{const le=v.right-P.right,K=window.innerWidth-x.right-le,Se=window.innerWidth-I.right-K,Ie=I.width+Se,ke=Math.max(Ie,v.width),Ge=window.innerWidth-yn,Re=pp(K,[yn,Math.max(yn,Ge-ke)]);a.style.minWidth=Ie+"px",a.style.right=Re+"px"}const M=d(),A=window.innerHeight-yn*2,F=p.scrollHeight,N=window.getComputedStyle(u),W=parseInt(N.borderTopWidth,10),E=parseInt(N.paddingTop,10),k=parseInt(N.borderBottomWidth,10),U=parseInt(N.paddingBottom,10),$=W+E+F+U+k,D=Math.min(y.offsetHeight*5,$),V=window.getComputedStyle(p),Z=parseInt(V.paddingTop,10),G=parseInt(V.paddingBottom,10),B=I.top+I.height/2-yn,z=A-B,X=y.offsetHeight/2,q=y.offsetTop+X,oe=W+E+q,Q=$-oe;if(oe<=B){const le=M.length>0&&y===M[M.length-1].ref.current;a.style.bottom="0px";const K=u.clientHeight-p.offsetTop-p.offsetHeight,Se=Math.max(z,X+(le?G:0)+K+k),Ie=oe+Se;a.style.height=Ie+"px"}else{const le=M.length>0&&y===M[0].ref.current;a.style.top="0px";const Se=Math.max(B,W+p.offsetTop+(le?Z:0)+X)+Q;a.style.height=Se+"px",p.scrollTop=oe-B+p.offsetTop}a.style.margin=`${yn}px 0`,a.style.minHeight=D+"px",a.style.maxHeight=A+"px",r?.(),requestAnimationFrame(()=>h.current=!0)}},[d,s.trigger,s.valueNode,a,u,p,y,g,s.dir,r]);Mt(()=>O(),[O]);const[w,_]=b.useState();Mt(()=>{u&&_(window.getComputedStyle(u).zIndex)},[u]);const S=b.useCallback(I=>{I&&m.current===!0&&(O(),C?.(),m.current=!1)},[O,C]);return T.jsx(NA,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:h,onScrollButtonChange:S,children:T.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w},children:T.jsx(Ne.div,{...o,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Mm.displayName=AA;var PA="SelectPopperPosition",sl=b.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=yn,...s}=e,i=Wi(n);return T.jsx(om,{...i,...s,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});sl.displayName=PA;var[NA,il]=go(Lr,{}),al="SelectViewport",Am=b.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=_r(al,n),i=il(al,n),a=He(t,s.onViewportChange),c=b.useRef(0);return T.jsxs(T.Fragment,{children:[T.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),T.jsx(Fi.Slot,{scope:n,children:T.jsx(Ne.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:Te(o.onScroll,u=>{const l=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:d}=i;if(d?.current&&f){const h=Math.abs(c.current-l.scrollTop);if(h>0){const m=window.innerHeight-yn*2,p=parseFloat(f.style.minHeight),y=parseFloat(f.style.height),g=Math.max(p,y);if(g<m){const C=g+h,O=Math.min(m,C),w=C-O;f.style.height=O+"px",f.style.bottom==="0px"&&(l.scrollTop=w>0?w:0,f.style.justifyContent="flex-end")}}}c.current=l.scrollTop})})})]})});Am.displayName=al;var Pm="SelectGroup",[IA,FA]=go(Pm),RA=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=dr();return T.jsx(IA,{scope:n,id:o,children:T.jsx(Ne.div,{role:"group","aria-labelledby":o,...r,ref:t})})});RA.displayName=Pm;var Nm="SelectLabel",WA=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=FA(Nm,n);return T.jsx(Ne.div,{id:o.id,...r,ref:t})});WA.displayName=Nm;var zi="SelectItem",[zA,Im]=go(zi),Fm=b.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...i}=e,a=wr(zi,n),c=_r(zi,n),u=a.value===r,[l,f]=b.useState(s??""),[d,h]=b.useState(!1),m=He(t,C=>c.itemRefCallback?.(C,r,o)),p=dr(),y=b.useRef("touch"),g=()=>{o||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return T.jsx(zA,{scope:n,value:r,disabled:o,textId:p,isSelected:u,onItemTextChange:b.useCallback(C=>{f(O=>O||(C?.textContent??"").trim())},[]),children:T.jsx(Fi.ItemSlot,{scope:n,value:r,disabled:o,textValue:l,children:T.jsx(Ne.div,{role:"option","aria-labelledby":p,"data-highlighted":d?"":void 0,"aria-selected":u&&d,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:m,onFocus:Te(i.onFocus,()=>h(!0)),onBlur:Te(i.onBlur,()=>h(!1)),onClick:Te(i.onClick,()=>{y.current!=="mouse"&&g()}),onPointerUp:Te(i.onPointerUp,()=>{y.current==="mouse"&&g()}),onPointerDown:Te(i.onPointerDown,C=>{y.current=C.pointerType}),onPointerMove:Te(i.onPointerMove,C=>{y.current=C.pointerType,o?c.onItemLeave?.():y.current==="mouse"&&C.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Te(i.onPointerLeave,C=>{C.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:Te(i.onKeyDown,C=>{c.searchRef?.current!==""&&C.key===" "||(SA.includes(C.key)&&g(),C.key===" "&&C.preventDefault())})})})})});Fm.displayName=zi;var es="SelectItemText",Rm=b.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,i=wr(es,n),a=_r(es,n),c=Im(es,n),u=EA(es,n),[l,f]=b.useState(null),d=He(t,g=>f(g),c.onItemTextChange,g=>a.itemTextRefCallback?.(g,c.value,c.disabled)),h=l?.textContent,m=b.useMemo(()=>T.jsx("option",{value:c.value,disabled:c.disabled,children:h},c.value),[c.disabled,c.value,h]),{onNativeOptionAdd:p,onNativeOptionRemove:y}=u;return Mt(()=>(p(m),()=>y(m)),[p,y,m]),T.jsxs(T.Fragment,{children:[T.jsx(Ne.span,{id:c.textId,...s,ref:d}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?ms.createPortal(s.children,i.valueNode):null]})});Rm.displayName=es;var Wm="SelectItemIndicator",zm=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Im(Wm,n).isSelected?T.jsx(Ne.span,{"aria-hidden":!0,...r,ref:t}):null});zm.displayName=Wm;var cl="SelectScrollUpButton",Lm=b.forwardRef((e,t)=>{const n=_r(cl,e.__scopeSelect),r=il(cl,e.__scopeSelect),[o,s]=b.useState(!1),i=He(t,r.onScrollButtonChange);return Mt(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=c.scrollTop>0;s(u)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?T.jsx(Um,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop-c.offsetHeight)}}):null});Lm.displayName=cl;var ll="SelectScrollDownButton",$m=b.forwardRef((e,t)=>{const n=_r(ll,e.__scopeSelect),r=il(ll,e.__scopeSelect),[o,s]=b.useState(!1),i=He(t,r.onScrollButtonChange);return Mt(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=c.scrollHeight-c.clientHeight,l=Math.ceil(c.scrollTop)<u;s(l)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?T.jsx(Um,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop+c.offsetHeight)}}):null});$m.displayName=ll;var Um=b.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=_r("SelectScrollButton",n),i=b.useRef(null),a=Ri(n),c=b.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return b.useEffect(()=>()=>c(),[c]),Mt(()=>{a().find(l=>l.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[a]),T.jsx(Ne.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:Te(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:Te(o.onPointerMove,()=>{s.onItemLeave?.(),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:Te(o.onPointerLeave,()=>{c()})})}),LA="SelectSeparator",$A=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return T.jsx(Ne.div,{"aria-hidden":!0,...r,ref:t})});$A.displayName=LA;var ul="SelectArrow",UA=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Wi(n),s=wr(ul,n),i=_r(ul,n);return s.open&&i.position==="popper"?T.jsx(sm,{...o,...r,ref:t}):null});UA.displayName=ul;var YA="SelectBubbleInput",Ym=b.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=b.useRef(null),s=He(r,o),i=Mc(t);return b.useEffect(()=>{const a=o.current;if(!a)return;const c=window.HTMLSelectElement.prototype,l=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==t&&l){const f=new Event("change",{bubbles:!0});l.call(a,t),a.dispatchEvent(f)}},[i,t]),T.jsx(Ne.select,{...n,style:{...im,...n.style},ref:s,defaultValue:t})});Ym.displayName=YA;function jm(e){return e===""||e===void 0}function Vm(e){const t=hr(e),n=b.useRef(""),r=b.useRef(0),o=b.useCallback(i=>{const a=n.current+i;t(a),(function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))})(a)},[t]),s=b.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return b.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function Bm(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=jA(e,Math.max(s,0));o.length===1&&(i=i.filter(u=>u!==n));const c=i.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function jA(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var VA=wm,BA=Sm,HA=xm,ZA=Om,GA=Em,qA=Cm,KA=Am,XA=Fm,JA=Rm,QA=zm,eP=Lm,tP=$m;function nP({...e}){return T.jsx(VA,{"data-slot":"select",...e})}function rP({...e}){return T.jsx(HA,{"data-slot":"select-value",...e})}function oP({className:e,size:t="default",children:n,...r}){return T.jsxs(BA,{"data-slot":"select-trigger","data-size":t,className:Dt("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[n,T.jsx(ZA,{asChild:!0,children:T.jsx(Pc,{className:"size-4 opacity-50"})})]})}function sP({className:e,children:t,position:n="popper",...r}){return T.jsx(GA,{children:T.jsxs(qA,{"data-slot":"select-content",className:Dt("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[T.jsx(aP,{}),T.jsx(KA,{className:Dt("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),T.jsx(cP,{})]})})}function iP({className:e,children:t,...n}){return T.jsxs(XA,{"data-slot":"select-item",className:Dt("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...n,children:[T.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:T.jsx(QA,{children:T.jsx(sp,{className:"size-4"})})}),T.jsx(JA,{children:t})]})}function aP({className:e,...t}){return T.jsx(eP,{"data-slot":"select-scroll-up-button",className:Dt("flex cursor-default items-center justify-center py-1",e),...t,children:T.jsx(FT,{className:"size-4"})})}function cP({className:e,...t}){return T.jsx(tP,{"data-slot":"select-scroll-down-button",className:Dt("flex cursor-default items-center justify-center py-1",e),...t,children:T.jsx(Pc,{className:"size-4"})})}const lP=(e={})=>{const{field:t={},form:n={},question:r={},disabled:o=!1}=e,{options:s=[]}=r;return T.jsxs(nP,{onValueChange:t.onChange,value:t.value,disabled:o,className:"bq-select",children:[T.jsx(li,{className:"w-full",children:T.jsx(oP,{children:T.jsx(rP,{placeholder:r.placeholder||"Please select"})})}),T.jsx(sP,{children:s.map((i,a)=>T.jsx(iP,{value:i.value,children:i.label},a))})]})},Hm=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Zm=oi,uP=(e,t)=>n=>{var r;if(t?.variants==null)return Zm(e,n?.class,n?.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(u=>{const l=n?.[u],f=s?.[u];if(l===null)return null;const d=Hm(l)||Hm(f);return o[u][d]}),a=n&&Object.entries(n).reduce((u,l)=>{let[f,d]=l;return d===void 0||(u[f]=d),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,l)=>{let{class:f,className:d,...h}=l;return Object.entries(h).every(m=>{let[p,y]=m;return Array.isArray(y)?y.includes({...s,...a}[p]):{...s,...a}[p]===y})?[...u,f,d]:u},[]);return Zm(e,i,c,n?.class,n?.className)};function fP(e,t){return t.forEach((function(n){n&&typeof n!="string"&&!Array.isArray(n)&&Object.keys(n).forEach((function(r){if(r!=="default"&&!(r in e)){var o=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(e,r,o.get?o:{enumerable:!0,get:function(){return n[r]}})}}))})),Object.freeze(e)}function Gm(e,t){return new Promise((function(n,r){let o;return dP(e).then((function(s){try{return o=s,n(new Blob([t.slice(0,2),o,t.slice(2)],{type:"image/jpeg"}))}catch(i){return r(i)}}),r)}))}const dP=e=>new Promise(((t,n)=>{const r=new FileReader;r.addEventListener("load",(({target:{result:o}})=>{const s=new DataView(o);let i=0;if(s.getUint16(i)!==65496)return n("not a valid JPEG");for(i+=2;;){const a=s.getUint16(i);if(a===65498)break;const c=s.getUint16(i+2);if(a===65505&&s.getUint32(i+4)===1165519206){const u=i+10;let l;switch(s.getUint16(u)){case 18761:l=!0;break;case 19789:l=!1;break;default:return n("TIFF header contains invalid endian")}if(s.getUint16(u+2,l)!==42)return n("TIFF header contains invalid version");const f=s.getUint32(u+4,l),d=u+f+2+12*s.getUint16(u+f,l);for(let h=u+f+2;h<d;h+=12)if(s.getUint16(h,l)==274){if(s.getUint16(h+2,l)!==3)return n("Orientation data type is invalid");if(s.getUint32(h+4,l)!==1)return n("Orientation data count is invalid");s.setUint16(h+8,1,l);break}return t(o.slice(i,i+2+c))}i+=2+c}return t(new Blob)})),r.readAsArrayBuffer(e)}));var Li={},hP={get exports(){return Li},set exports(e){Li=e}};(function(e){var t,n,r={};hP.exports=r,r.parse=function(o,s){for(var i=r.bin.readUshort,a=r.bin.readUint,c=0,u={},l=new Uint8Array(o),f=l.length-4;a(l,f)!=101010256;)f--;c=f,c+=4;var d=i(l,c+=4);i(l,c+=2);var h=a(l,c+=2),m=a(l,c+=4);c+=4,c=m;for(var p=0;p<d;p++){a(l,c),c+=4,c+=4,c+=4,a(l,c+=4),h=a(l,c+=4);var y=a(l,c+=4),g=i(l,c+=4),C=i(l,c+2),O=i(l,c+4);c+=6;var w=a(l,c+=8);c+=4,c+=g+C+O,r._readLocal(l,w,u,h,y,s)}return u},r._readLocal=function(o,s,i,a,c,u){var l=r.bin.readUshort,f=r.bin.readUint;f(o,s),l(o,s+=4),l(o,s+=2);var d=l(o,s+=2);f(o,s+=2),f(o,s+=4),s+=4;var h=l(o,s+=8),m=l(o,s+=2);s+=2;var p=r.bin.readUTF8(o,s,h);if(s+=h,s+=m,u)i[p]={size:c,csize:a};else{var y=new Uint8Array(o.buffer,s);if(d==0)i[p]=new Uint8Array(y.buffer.slice(s,s+a));else{if(d!=8)throw"unknown compression method: "+d;var g=new Uint8Array(c);r.inflateRaw(y,g),i[p]=g}}},r.inflateRaw=function(o,s){return r.F.inflate(o,s)},r.inflate=function(o,s){return o[0],o[1],r.inflateRaw(new Uint8Array(o.buffer,o.byteOffset+2,o.length-6),s)},r.deflate=function(o,s){s==null&&(s={level:6});var i=0,a=new Uint8Array(50+Math.floor(1.1*o.length));a[i]=120,a[i+1]=156,i+=2,i=r.F.deflateRaw(o,a,i,s.level);var c=r.adler(o,0,o.length);return a[i+0]=c>>>24&255,a[i+1]=c>>>16&255,a[i+2]=c>>>8&255,a[i+3]=c>>>0&255,new Uint8Array(a.buffer,0,i+4)},r.deflateRaw=function(o,s){s==null&&(s={level:6});var i=new Uint8Array(50+Math.floor(1.1*o.length)),a=r.F.deflateRaw(o,i,a,s.level);return new Uint8Array(i.buffer,0,a)},r.encode=function(o,s){s==null&&(s=!1);var i=0,a=r.bin.writeUint,c=r.bin.writeUshort,u={};for(var l in o){var f=!r._noNeed(l)&&!s,d=o[l],h=r.crc.crc(d,0,d.length);u[l]={cpr:f,usize:d.length,crc:h,file:f?r.deflateRaw(d):d}}for(var l in u)i+=u[l].file.length+30+46+2*r.bin.sizeUTF8(l);i+=22;var m=new Uint8Array(i),p=0,y=[];for(var l in u){var g=u[l];y.push(p),p=r._writeHeader(m,p,l,g,0)}var C=0,O=p;for(var l in u)g=u[l],y.push(p),p=r._writeHeader(m,p,l,g,1,y[C++]);var w=p-O;return a(m,p,101010256),p+=4,c(m,p+=4,C),c(m,p+=2,C),a(m,p+=2,w),a(m,p+=4,O),p+=4,p+=2,m.buffer},r._noNeed=function(o){var s=o.split(".").pop().toLowerCase();return"png,jpg,jpeg,zip".indexOf(s)!=-1},r._writeHeader=function(o,s,i,a,c,u){var l=r.bin.writeUint,f=r.bin.writeUshort,d=a.file;return l(o,s,c==0?67324752:33639248),s+=4,c==1&&(s+=2),f(o,s,20),f(o,s+=2,0),f(o,s+=2,a.cpr?8:0),l(o,s+=2,0),l(o,s+=4,a.crc),l(o,s+=4,d.length),l(o,s+=4,a.usize),f(o,s+=4,r.bin.sizeUTF8(i)),f(o,s+=2,0),s+=2,c==1&&(s+=2,s+=2,l(o,s+=6,u),s+=4),s+=r.bin.writeUTF8(o,s,i),c==0&&(o.set(d,s),s+=d.length),s},r.crc={table:(function(){for(var o=new Uint32Array(256),s=0;s<256;s++){for(var i=s,a=0;a<8;a++)1&i?i=3988292384^i>>>1:i>>>=1;o[s]=i}return o})(),update:function(o,s,i,a){for(var c=0;c<a;c++)o=r.crc.table[255&(o^s[i+c])]^o>>>8;return o},crc:function(o,s,i){return 4294967295^r.crc.update(4294967295,o,s,i)}},r.adler=function(o,s,i){for(var a=1,c=0,u=s,l=s+i;u<l;){for(var f=Math.min(u+5552,l);u<f;)c+=a+=o[u++];a%=65521,c%=65521}return c<<16|a},r.bin={readUshort:function(o,s){return o[s]|o[s+1]<<8},writeUshort:function(o,s,i){o[s]=255&i,o[s+1]=i>>8&255},readUint:function(o,s){return 16777216*o[s+3]+(o[s+2]<<16|o[s+1]<<8|o[s])},writeUint:function(o,s,i){o[s]=255&i,o[s+1]=i>>8&255,o[s+2]=i>>16&255,o[s+3]=i>>24&255},readASCII:function(o,s,i){for(var a="",c=0;c<i;c++)a+=String.fromCharCode(o[s+c]);return a},writeASCII:function(o,s,i){for(var a=0;a<i.length;a++)o[s+a]=i.charCodeAt(a)},pad:function(o){return o.length<2?"0"+o:o},readUTF8:function(o,s,i){for(var a,c="",u=0;u<i;u++)c+="%"+r.bin.pad(o[s+u].toString(16));try{a=decodeURIComponent(c)}catch{return r.bin.readASCII(o,s,i)}return a},writeUTF8:function(o,s,i){for(var a=i.length,c=0,u=0;u<a;u++){var l=i.charCodeAt(u);if((4294967168&l)==0)o[s+c]=l,c++;else if((4294965248&l)==0)o[s+c]=192|l>>6,o[s+c+1]=128|l>>0&63,c+=2;else if((4294901760&l)==0)o[s+c]=224|l>>12,o[s+c+1]=128|l>>6&63,o[s+c+2]=128|l>>0&63,c+=3;else{if((4292870144&l)!=0)throw"e";o[s+c]=240|l>>18,o[s+c+1]=128|l>>12&63,o[s+c+2]=128|l>>6&63,o[s+c+3]=128|l>>0&63,c+=4}}return c},sizeUTF8:function(o){for(var s=o.length,i=0,a=0;a<s;a++){var c=o.charCodeAt(a);if((4294967168&c)==0)i++;else if((4294965248&c)==0)i+=2;else if((4294901760&c)==0)i+=3;else{if((4292870144&c)!=0)throw"e";i+=4}}return i}},r.F={},r.F.deflateRaw=function(o,s,i,a){var c=[[0,0,0,0,0],[4,4,8,4,0],[4,5,16,8,0],[4,6,16,16,0],[4,10,16,32,0],[8,16,32,32,0],[8,16,128,128,0],[8,32,128,256,0],[32,128,258,1024,1],[32,258,258,4096,1]][a],u=r.F.U,l=r.F._goodIndex;r.F._hash;var f=r.F._putsE,d=0,h=i<<3,m=0,p=o.length;if(a==0){for(;d<p;)f(s,h,d+(M=Math.min(65535,p-d))==p?1:0),h=r.F._copyExact(o,d,M,s,h+8),d+=M;return h>>>3}var y=u.lits,g=u.strt,C=u.prev,O=0,w=0,_=0,S=0,I=0,v=0;for(p>2&&(g[v=r.F._hash(o,0)]=0),d=0;d<p;d++){if(I=v,d+1<p-2){v=r.F._hash(o,d+1);var x=d+1&32767;C[x]=g[v],g[v]=x}if(m<=d){(O>14e3||w>26697)&&p-d>100&&(m<d&&(y[O]=d-m,O+=2,m=d),h=r.F._writeBlock(d==p-1||m==p?1:0,y,O,S,o,_,d-_,s,h),O=w=S=0,_=d);var P=0;d<p-2&&(P=r.F._bestMatch(o,d,C,I,Math.min(c[2],p-d),c[3]));var M=P>>>16,A=65535&P;if(P!=0){A=65535&P;var F=l(M=P>>>16,u.of0);u.lhst[257+F]++;var N=l(A,u.df0);u.dhst[N]++,S+=u.exb[F]+u.dxb[N],y[O]=M<<23|d-m,y[O+1]=A<<16|F<<8|N,O+=2,m=d+M}else u.lhst[o[d]]++;w++}}for(_==d&&o.length!=0||(m<d&&(y[O]=d-m,O+=2,m=d),h=r.F._writeBlock(1,y,O,S,o,_,d-_,s,h),O=0,w=0,O=w=S=0,_=d);(7&h)!=0;)h++;return h>>>3},r.F._bestMatch=function(o,s,i,a,c,u){var l=32767&s,f=i[l],d=l-f+32768&32767;if(f==l||a!=r.F._hash(o,s-d))return 0;for(var h=0,m=0,p=Math.min(32767,s);d<=p&&--u!=0&&f!=l;){if(h==0||o[s+h]==o[s+h-d]){var y=r.F._howLong(o,s,d);if(y>h){if(m=d,(h=y)>=c)break;d+2<y&&(y=d+2);for(var g=0,C=0;C<y-2;C++){var O=s-d+C+32768&32767,w=O-i[O]+32768&32767;w>g&&(g=w,f=O)}}}d+=(l=f)-(f=i[l])+32768&32767}return h<<16|m},r.F._howLong=function(o,s,i){if(o[s]!=o[s-i]||o[s+1]!=o[s+1-i]||o[s+2]!=o[s+2-i])return 0;var a=s,c=Math.min(o.length,s+258);for(s+=3;s<c&&o[s]==o[s-i];)s++;return s-a},r.F._hash=function(o,s){return(o[s]<<8|o[s+1])+(o[s+2]<<4)&65535},r.saved=0,r.F._writeBlock=function(o,s,i,a,c,u,l,f,d){var h,m,p,y,g,C,O,w,_,S=r.F.U,I=r.F._putsF,v=r.F._putsE;S.lhst[256]++,m=(h=r.F.getTrees())[0],p=h[1],y=h[2],g=h[3],C=h[4],O=h[5],w=h[6],_=h[7];var x=32+((d+3&7)==0?0:8-(d+3&7))+(l<<3),P=a+r.F.contSize(S.fltree,S.lhst)+r.F.contSize(S.fdtree,S.dhst),M=a+r.F.contSize(S.ltree,S.lhst)+r.F.contSize(S.dtree,S.dhst);M+=14+3*O+r.F.contSize(S.itree,S.ihst)+(2*S.ihst[16]+3*S.ihst[17]+7*S.ihst[18]);for(var A=0;A<286;A++)S.lhst[A]=0;for(A=0;A<30;A++)S.dhst[A]=0;for(A=0;A<19;A++)S.ihst[A]=0;var F=x<P&&x<M?0:P<M?1:2;if(I(f,d,o),I(f,d+1,F),d+=3,F==0){for(;(7&d)!=0;)d++;d=r.F._copyExact(c,u,l,f,d)}else{var N,W;if(F==1&&(N=S.fltree,W=S.fdtree),F==2){r.F.makeCodes(S.ltree,m),r.F.revCodes(S.ltree,m),r.F.makeCodes(S.dtree,p),r.F.revCodes(S.dtree,p),r.F.makeCodes(S.itree,y),r.F.revCodes(S.itree,y),N=S.ltree,W=S.dtree,v(f,d,g-257),v(f,d+=5,C-1),v(f,d+=5,O-4),d+=4;for(var E=0;E<O;E++)v(f,d+3*E,S.itree[1+(S.ordr[E]<<1)]);d+=3*O,d=r.F._codeTiny(w,S.itree,f,d),d=r.F._codeTiny(_,S.itree,f,d)}for(var k=u,U=0;U<i;U+=2){for(var $=s[U],D=$>>>23,V=k+(8388607&$);k<V;)d=r.F._writeLit(c[k++],N,f,d);if(D!=0){var Z=s[U+1],G=Z>>16,B=Z>>8&255,z=255&Z;v(f,d=r.F._writeLit(257+B,N,f,d),D-S.of0[B]),d+=S.exb[B],I(f,d=r.F._writeLit(z,W,f,d),G-S.df0[z]),d+=S.dxb[z],k+=D}}d=r.F._writeLit(256,N,f,d)}return d},r.F._copyExact=function(o,s,i,a,c){var u=c>>>3;return a[u]=i,a[u+1]=i>>>8,a[u+2]=255-a[u],a[u+3]=255-a[u+1],u+=4,a.set(new Uint8Array(o.buffer,s,i),u),c+(i+4<<3)},r.F.getTrees=function(){for(var o=r.F.U,s=r.F._hufTree(o.lhst,o.ltree,15),i=r.F._hufTree(o.dhst,o.dtree,15),a=[],c=r.F._lenCodes(o.ltree,a),u=[],l=r.F._lenCodes(o.dtree,u),f=0;f<a.length;f+=2)o.ihst[a[f]]++;for(f=0;f<u.length;f+=2)o.ihst[u[f]]++;for(var d=r.F._hufTree(o.ihst,o.itree,7),h=19;h>4&&o.itree[1+(o.ordr[h-1]<<1)]==0;)h--;return[s,i,d,c,l,h,a,u]},r.F.getSecond=function(o){for(var s=[],i=0;i<o.length;i+=2)s.push(o[i+1]);return s},r.F.nonZero=function(o){for(var s="",i=0;i<o.length;i+=2)o[i+1]!=0&&(s+=(i>>1)+",");return s},r.F.contSize=function(o,s){for(var i=0,a=0;a<s.length;a++)i+=s[a]*o[1+(a<<1)];return i},r.F._codeTiny=function(o,s,i,a){for(var c=0;c<o.length;c+=2){var u=o[c],l=o[c+1];a=r.F._writeLit(u,s,i,a);var f=u==16?2:u==17?3:7;u>15&&(r.F._putsE(i,a,l,f),a+=f)}return a},r.F._lenCodes=function(o,s){for(var i=o.length;i!=2&&o[i-1]==0;)i-=2;for(var a=0;a<i;a+=2){var c=o[a+1],u=a+3<i?o[a+3]:-1,l=a+5<i?o[a+5]:-1,f=a==0?-1:o[a-1];if(c==0&&u==c&&l==c){for(var d=a+5;d+2<i&&o[d+2]==c;)d+=2;(h=Math.min(d+1-a>>>1,138))<11?s.push(17,h-3):s.push(18,h-11),a+=2*h-2}else if(c==f&&u==c&&l==c){for(d=a+5;d+2<i&&o[d+2]==c;)d+=2;var h=Math.min(d+1-a>>>1,6);s.push(16,h-3),a+=2*h-2}else s.push(c,0)}return i>>>1},r.F._hufTree=function(o,s,i){var a=[],c=o.length,u=s.length,l=0;for(l=0;l<u;l+=2)s[l]=0,s[l+1]=0;for(l=0;l<c;l++)o[l]!=0&&a.push({lit:l,f:o[l]});var f=a.length,d=a.slice(0);if(f==0)return 0;if(f==1){var h=a[0].lit;return d=h==0?1:0,s[1+(h<<1)]=1,s[1+(d<<1)]=1,1}a.sort((function(w,_){return w.f-_.f}));var m=a[0],p=a[1],y=0,g=1,C=2;for(a[0]={lit:-1,f:m.f+p.f,l:m,r:p,d:0};g!=f-1;)m=y!=g&&(C==f||a[y].f<a[C].f)?a[y++]:a[C++],p=y!=g&&(C==f||a[y].f<a[C].f)?a[y++]:a[C++],a[g++]={lit:-1,f:m.f+p.f,l:m,r:p};var O=r.F.setDepth(a[g-1],0);for(O>i&&(r.F.restrictDepth(d,i,O),O=i),l=0;l<f;l++)s[1+(d[l].lit<<1)]=d[l].d;return O},r.F.setDepth=function(o,s){return o.lit!=-1?(o.d=s,s):Math.max(r.F.setDepth(o.l,s+1),r.F.setDepth(o.r,s+1))},r.F.restrictDepth=function(o,s,i){var a=0,c=1<<i-s,u=0;for(o.sort((function(f,d){return d.d==f.d?f.f-d.f:d.d-f.d})),a=0;a<o.length&&o[a].d>s;a++){var l=o[a].d;o[a].d=s,u+=c-(1<<i-l)}for(u>>>=i-s;u>0;)(l=o[a].d)<s?(o[a].d++,u-=1<<s-l-1):a++;for(;a>=0;a--)o[a].d==s&&u<0&&(o[a].d--,u++);u!=0&&console.log("debt left")},r.F._goodIndex=function(o,s){var i=0;return s[16|i]<=o&&(i|=16),s[8|i]<=o&&(i|=8),s[4|i]<=o&&(i|=4),s[2|i]<=o&&(i|=2),s[1|i]<=o&&(i|=1),i},r.F._writeLit=function(o,s,i,a){return r.F._putsF(i,a,s[o<<1]),a+s[1+(o<<1)]},r.F.inflate=function(o,s){var i=Uint8Array;if(o[0]==3&&o[1]==0)return s||new i(0);var a=r.F,c=a._bitsF,u=a._bitsE,l=a._decodeTiny,f=a.makeCodes,d=a.codes2map,h=a._get17,m=a.U,p=s==null;p&&(s=new i(o.length>>>2<<3));for(var y,g,C=0,O=0,w=0,_=0,S=0,I=0,v=0,x=0,P=0;C==0;)if(C=c(o,P,1),O=c(o,P+1,2),P+=3,O!=0){if(p&&(s=r.F._check(s,x+(1<<17))),O==1&&(y=m.flmap,g=m.fdmap,I=511,v=31),O==2){w=u(o,P,5)+257,_=u(o,P+5,5)+1,S=u(o,P+10,4)+4,P+=14;for(var M=0;M<38;M+=2)m.itree[M]=0,m.itree[M+1]=0;var A=1;for(M=0;M<S;M++){var F=u(o,P+3*M,3);m.itree[1+(m.ordr[M]<<1)]=F,F>A&&(A=F)}P+=3*S,f(m.itree,A),d(m.itree,A,m.imap),y=m.lmap,g=m.dmap,P=l(m.imap,(1<<A)-1,w+_,o,P,m.ttree);var N=a._copyOut(m.ttree,0,w,m.ltree);I=(1<<N)-1;var W=a._copyOut(m.ttree,w,_,m.dtree);v=(1<<W)-1,f(m.ltree,N),d(m.ltree,N,y),f(m.dtree,W),d(m.dtree,W,g)}for(;;){var E=y[h(o,P)&I];P+=15&E;var k=E>>>4;if(!(k>>>8))s[x++]=k;else{if(k==256)break;var U=x+k-254;if(k>264){var $=m.ldef[k-257];U=x+($>>>3)+u(o,P,7&$),P+=7&$}var D=g[h(o,P)&v];P+=15&D;var V=D>>>4,Z=m.ddef[V],G=(Z>>>4)+c(o,P,15&Z);for(P+=15&Z,p&&(s=r.F._check(s,x+(1<<17)));x<U;)s[x]=s[x++-G],s[x]=s[x++-G],s[x]=s[x++-G],s[x]=s[x++-G];x=U}}}else{(7&P)!=0&&(P+=8-(7&P));var B=4+(P>>>3),z=o[B-4]|o[B-3]<<8;p&&(s=r.F._check(s,x+z)),s.set(new i(o.buffer,o.byteOffset+B,z),x),P=B+z<<3,x+=z}return s.length==x?s:s.slice(0,x)},r.F._check=function(o,s){var i=o.length;if(s<=i)return o;var a=new Uint8Array(Math.max(i<<1,s));return a.set(o,0),a},r.F._decodeTiny=function(o,s,i,a,c,u){for(var l=r.F._bitsE,f=r.F._get17,d=0;d<i;){var h=o[f(a,c)&s];c+=15&h;var m=h>>>4;if(m<=15)u[d]=m,d++;else{var p=0,y=0;m==16?(y=3+l(a,c,2),c+=2,p=u[d-1]):m==17?(y=3+l(a,c,3),c+=3):m==18&&(y=11+l(a,c,7),c+=7);for(var g=d+y;d<g;)u[d]=p,d++}}return c},r.F._copyOut=function(o,s,i,a){for(var c=0,u=0,l=a.length>>>1;u<i;){var f=o[u+s];a[u<<1]=0,a[1+(u<<1)]=f,f>c&&(c=f),u++}for(;u<l;)a[u<<1]=0,a[1+(u<<1)]=0,u++;return c},r.F.makeCodes=function(o,s){for(var i,a,c,u,l=r.F.U,f=o.length,d=l.bl_count,h=0;h<=s;h++)d[h]=0;for(h=1;h<f;h+=2)d[o[h]]++;var m=l.next_code;for(i=0,d[0]=0,a=1;a<=s;a++)i=i+d[a-1]<<1,m[a]=i;for(c=0;c<f;c+=2)(u=o[c+1])!=0&&(o[c]=m[u],m[u]++)},r.F.codes2map=function(o,s,i){for(var a=o.length,c=r.F.U.rev15,u=0;u<a;u+=2)if(o[u+1]!=0)for(var l=u>>1,f=o[u+1],d=l<<4|f,h=s-f,m=o[u]<<h,p=m+(1<<h);m!=p;)i[c[m]>>>15-s]=d,m++},r.F.revCodes=function(o,s){for(var i=r.F.U.rev15,a=15-s,c=0;c<o.length;c+=2){var u=o[c]<<s-o[c+1];o[c]=i[u]>>>a}},r.F._putsE=function(o,s,i){i<<=7&s;var a=s>>>3;o[a]|=i,o[a+1]|=i>>>8},r.F._putsF=function(o,s,i){i<<=7&s;var a=s>>>3;o[a]|=i,o[a+1]|=i>>>8,o[a+2]|=i>>>16},r.F._bitsE=function(o,s,i){return(o[s>>>3]|o[1+(s>>>3)]<<8)>>>(7&s)&(1<<i)-1},r.F._bitsF=function(o,s,i){return(o[s>>>3]|o[1+(s>>>3)]<<8|o[2+(s>>>3)]<<16)>>>(7&s)&(1<<i)-1},r.F._get17=function(o,s){return(o[s>>>3]|o[1+(s>>>3)]<<8|o[2+(s>>>3)]<<16)>>>(7&s)},r.F._get25=function(o,s){return(o[s>>>3]|o[1+(s>>>3)]<<8|o[2+(s>>>3)]<<16|o[3+(s>>>3)]<<24)>>>(7&s)},r.F.U=(t=Uint16Array,n=Uint32Array,{next_code:new t(16),bl_count:new t(16),ordr:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],of0:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],exb:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],ldef:new t(32),df0:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],dxb:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],ddef:new n(32),flmap:new t(512),fltree:[],fdmap:new t(32),fdtree:[],lmap:new t(32768),ltree:[],ttree:[],dmap:new t(32768),dtree:[],imap:new t(512),itree:[],rev15:new t(32768),lhst:new n(286),dhst:new n(30),ihst:new n(19),lits:new n(15e3),strt:new t(65536),prev:new t(32768)}),(function(){for(var o=r.F.U,s=0;s<32768;s++){var i=s;i=(4278255360&(i=(4042322160&(i=(3435973836&(i=(2863311530&i)>>>1|(1431655765&i)<<1))>>>2|(858993459&i)<<2))>>>4|(252645135&i)<<4))>>>8|(16711935&i)<<8,o.rev15[s]=(i>>>16|i<<16)>>>17}function a(c,u,l){for(;u--!=0;)c.push(0,l)}for(s=0;s<32;s++)o.ldef[s]=o.of0[s]<<3|o.exb[s],o.ddef[s]=o.df0[s]<<4|o.dxb[s];a(o.fltree,144,8),a(o.fltree,112,9),a(o.fltree,24,7),a(o.fltree,8,8),r.F.makeCodes(o.fltree,9),r.F.codes2map(o.fltree,9,o.flmap),r.F.revCodes(o.fltree,9),a(o.fdtree,32,5),r.F.makeCodes(o.fdtree,5),r.F.codes2map(o.fdtree,5,o.fdmap),r.F.revCodes(o.fdtree,5),a(o.itree,19,0),a(o.ltree,286,0),a(o.dtree,30,0),a(o.ttree,320,0)})()})();var pP=fP({__proto__:null,default:Li},[Li]);const vn=(function(){var e={nextZero(l,f){for(;l[f]!=0;)f++;return f},readUshort:(l,f)=>l[f]<<8|l[f+1],writeUshort(l,f,d){l[f]=d>>8&255,l[f+1]=255&d},readUint:(l,f)=>16777216*l[f]+(l[f+1]<<16|l[f+2]<<8|l[f+3]),writeUint(l,f,d){l[f]=d>>24&255,l[f+1]=d>>16&255,l[f+2]=d>>8&255,l[f+3]=255&d},readASCII(l,f,d){let h="";for(let m=0;m<d;m++)h+=String.fromCharCode(l[f+m]);return h},writeASCII(l,f,d){for(let h=0;h<d.length;h++)l[f+h]=d.charCodeAt(h)},readBytes(l,f,d){const h=[];for(let m=0;m<d;m++)h.push(l[f+m]);return h},pad:l=>l.length<2?`0${l}`:l,readUTF8(l,f,d){let h,m="";for(let p=0;p<d;p++)m+=`%${e.pad(l[f+p].toString(16))}`;try{h=decodeURIComponent(m)}catch{return e.readASCII(l,f,d)}return h}};function t(l,f,d,h){const m=f*d,p=s(h),y=Math.ceil(f*p/8),g=new Uint8Array(4*m),C=new Uint32Array(g.buffer),{ctype:O}=h,{depth:w}=h,_=e.readUshort;if(O==6){const $=m<<2;if(w==8)for(var S=0;S<$;S+=4)g[S]=l[S],g[S+1]=l[S+1],g[S+2]=l[S+2],g[S+3]=l[S+3];if(w==16)for(S=0;S<$;S++)g[S]=l[S<<1]}else if(O==2){const $=h.tabs.tRNS;if($==null){if(w==8)for(S=0;S<m;S++){var I=3*S;C[S]=255<<24|l[I+2]<<16|l[I+1]<<8|l[I]}if(w==16)for(S=0;S<m;S++)I=6*S,C[S]=255<<24|l[I+4]<<16|l[I+2]<<8|l[I]}else{var v=$[0];const D=$[1],V=$[2];if(w==8)for(S=0;S<m;S++){var x=S<<2;I=3*S,C[S]=255<<24|l[I+2]<<16|l[I+1]<<8|l[I],l[I]==v&&l[I+1]==D&&l[I+2]==V&&(g[x+3]=0)}if(w==16)for(S=0;S<m;S++)x=S<<2,I=6*S,C[S]=255<<24|l[I+4]<<16|l[I+2]<<8|l[I],_(l,I)==v&&_(l,I+2)==D&&_(l,I+4)==V&&(g[x+3]=0)}}else if(O==3){const $=h.tabs.PLTE,D=h.tabs.tRNS,V=D?D.length:0;if(w==1)for(var P=0;P<d;P++){var M=P*y,A=P*f;for(S=0;S<f;S++){x=A+S<<2;var F=3*(N=l[M+(S>>3)]>>7-((7&S)<<0)&1);g[x]=$[F],g[x+1]=$[F+1],g[x+2]=$[F+2],g[x+3]=N<V?D[N]:255}}if(w==2)for(P=0;P<d;P++)for(M=P*y,A=P*f,S=0;S<f;S++)x=A+S<<2,F=3*(N=l[M+(S>>2)]>>6-((3&S)<<1)&3),g[x]=$[F],g[x+1]=$[F+1],g[x+2]=$[F+2],g[x+3]=N<V?D[N]:255;if(w==4)for(P=0;P<d;P++)for(M=P*y,A=P*f,S=0;S<f;S++)x=A+S<<2,F=3*(N=l[M+(S>>1)]>>4-((1&S)<<2)&15),g[x]=$[F],g[x+1]=$[F+1],g[x+2]=$[F+2],g[x+3]=N<V?D[N]:255;if(w==8)for(S=0;S<m;S++){var N;x=S<<2,F=3*(N=l[S]),g[x]=$[F],g[x+1]=$[F+1],g[x+2]=$[F+2],g[x+3]=N<V?D[N]:255}}else if(O==4){if(w==8)for(S=0;S<m;S++){x=S<<2;var W=l[E=S<<1];g[x]=W,g[x+1]=W,g[x+2]=W,g[x+3]=l[E+1]}if(w==16)for(S=0;S<m;S++){var E;x=S<<2,W=l[E=S<<2],g[x]=W,g[x+1]=W,g[x+2]=W,g[x+3]=l[E+2]}}else if(O==0)for(v=h.tabs.tRNS?h.tabs.tRNS:-1,P=0;P<d;P++){const $=P*y,D=P*f;if(w==1)for(var k=0;k<f;k++){var U=(W=255*(l[$+(k>>>3)]>>>7-(7&k)&1))==255*v?0:255;C[D+k]=U<<24|W<<16|W<<8|W}else if(w==2)for(k=0;k<f;k++)U=(W=85*(l[$+(k>>>2)]>>>6-((3&k)<<1)&3))==85*v?0:255,C[D+k]=U<<24|W<<16|W<<8|W;else if(w==4)for(k=0;k<f;k++)U=(W=17*(l[$+(k>>>1)]>>>4-((1&k)<<2)&15))==17*v?0:255,C[D+k]=U<<24|W<<16|W<<8|W;else if(w==8)for(k=0;k<f;k++)U=(W=l[$+k])==v?0:255,C[D+k]=U<<24|W<<16|W<<8|W;else if(w==16)for(k=0;k<f;k++)W=l[$+(k<<1)],U=_(l,$+(k<<1))==v?0:255,C[D+k]=U<<24|W<<16|W<<8|W}return g}function n(l,f,d,h){const m=s(l),p=Math.ceil(d*m/8),y=new Uint8Array((p+1+l.interlace)*h);return f=l.tabs.CgBI?o(f,y):r(f,y),l.interlace==0?f=i(f,l,0,d,h):l.interlace==1&&(f=(function(C,O){const w=O.width,_=O.height,S=s(O),I=S>>3,v=Math.ceil(w*S/8),x=new Uint8Array(_*v);let P=0;const M=[0,0,4,0,2,0,1],A=[0,4,0,2,0,1,0],F=[8,8,8,4,4,2,2],N=[8,8,4,4,2,2,1];let W=0;for(;W<7;){const k=F[W],U=N[W];let $=0,D=0,V=M[W];for(;V<_;)V+=k,D++;let Z=A[W];for(;Z<w;)Z+=U,$++;const G=Math.ceil($*S/8);i(C,O,P,$,D);let B=0,z=M[W];for(;z<_;){let X=A[W],q=P+B*G<<3;for(;X<w;){var E;if(S==1&&(E=(E=C[q>>3])>>7-(7&q)&1,x[z*v+(X>>3)]|=E<<7-((7&X)<<0)),S==2&&(E=(E=C[q>>3])>>6-(7&q)&3,x[z*v+(X>>2)]|=E<<6-((3&X)<<1)),S==4&&(E=(E=C[q>>3])>>4-(7&q)&15,x[z*v+(X>>1)]|=E<<4-((1&X)<<2)),S>=8){const oe=z*v+X*I;for(let Q=0;Q<I;Q++)x[oe+Q]=C[(q>>3)+Q]}q+=S,X+=U}B++,z+=k}$*D!=0&&(P+=D*(1+G)),W+=1}return x})(f,l)),f}function r(l,f){return o(new Uint8Array(l.buffer,2,l.length-6),f)}var o=(function(){const l={H:{}};return l.H.N=function(f,d){const h=Uint8Array;let m,p,y=0,g=0,C=0,O=0,w=0,_=0,S=0,I=0,v=0;if(f[0]==3&&f[1]==0)return d||new h(0);const x=l.H,P=x.b,M=x.e,A=x.R,F=x.n,N=x.A,W=x.Z,E=x.m,k=d==null;for(k&&(d=new h(f.length>>>2<<5));y==0;)if(y=P(f,v,1),g=P(f,v+1,2),v+=3,g!=0){if(k&&(d=l.H.W(d,I+(1<<17))),g==1&&(m=E.J,p=E.h,_=511,S=31),g==2){C=M(f,v,5)+257,O=M(f,v+5,5)+1,w=M(f,v+10,4)+4,v+=14;let $=1;for(var U=0;U<38;U+=2)E.Q[U]=0,E.Q[U+1]=0;for(U=0;U<w;U++){const Z=M(f,v+3*U,3);E.Q[1+(E.X[U]<<1)]=Z,Z>$&&($=Z)}v+=3*w,F(E.Q,$),N(E.Q,$,E.u),m=E.w,p=E.d,v=A(E.u,(1<<$)-1,C+O,f,v,E.v);const D=x.V(E.v,0,C,E.C);_=(1<<D)-1;const V=x.V(E.v,C,O,E.D);S=(1<<V)-1,F(E.C,D),N(E.C,D,m),F(E.D,V),N(E.D,V,p)}for(;;){const $=m[W(f,v)&_];v+=15&$;const D=$>>>4;if(!(D>>>8))d[I++]=D;else{if(D==256)break;{let V=I+D-254;if(D>264){const X=E.q[D-257];V=I+(X>>>3)+M(f,v,7&X),v+=7&X}const Z=p[W(f,v)&S];v+=15&Z;const G=Z>>>4,B=E.c[G],z=(B>>>4)+P(f,v,15&B);for(v+=15&B;I<V;)d[I]=d[I++-z],d[I]=d[I++-z],d[I]=d[I++-z],d[I]=d[I++-z];I=V}}}}else{(7&v)!=0&&(v+=8-(7&v));const $=4+(v>>>3),D=f[$-4]|f[$-3]<<8;k&&(d=l.H.W(d,I+D)),d.set(new h(f.buffer,f.byteOffset+$,D),I),v=$+D<<3,I+=D}return d.length==I?d:d.slice(0,I)},l.H.W=function(f,d){const h=f.length;if(d<=h)return f;const m=new Uint8Array(h<<1);return m.set(f,0),m},l.H.R=function(f,d,h,m,p,y){const g=l.H.e,C=l.H.Z;let O=0;for(;O<h;){const w=f[C(m,p)&d];p+=15&w;const _=w>>>4;if(_<=15)y[O]=_,O++;else{let S=0,I=0;_==16?(I=3+g(m,p,2),p+=2,S=y[O-1]):_==17?(I=3+g(m,p,3),p+=3):_==18&&(I=11+g(m,p,7),p+=7);const v=O+I;for(;O<v;)y[O]=S,O++}}return p},l.H.V=function(f,d,h,m){let p=0,y=0;const g=m.length>>>1;for(;y<h;){const C=f[y+d];m[y<<1]=0,m[1+(y<<1)]=C,C>p&&(p=C),y++}for(;y<g;)m[y<<1]=0,m[1+(y<<1)]=0,y++;return p},l.H.n=function(f,d){const h=l.H.m,m=f.length;let p,y,g,C;const O=h.j;for(var w=0;w<=d;w++)O[w]=0;for(w=1;w<m;w+=2)O[f[w]]++;const _=h.K;for(p=0,O[0]=0,y=1;y<=d;y++)p=p+O[y-1]<<1,_[y]=p;for(g=0;g<m;g+=2)C=f[g+1],C!=0&&(f[g]=_[C],_[C]++)},l.H.A=function(f,d,h){const m=f.length,p=l.H.m.r;for(let y=0;y<m;y+=2)if(f[y+1]!=0){const g=y>>1,C=f[y+1],O=g<<4|C,w=d-C;let _=f[y]<<w;const S=_+(1<<w);for(;_!=S;)h[p[_]>>>15-d]=O,_++}},l.H.l=function(f,d){const h=l.H.m.r,m=15-d;for(let p=0;p<f.length;p+=2){const y=f[p]<<d-f[p+1];f[p]=h[y]>>>m}},l.H.M=function(f,d,h){h<<=7&d;const m=d>>>3;f[m]|=h,f[m+1]|=h>>>8},l.H.I=function(f,d,h){h<<=7&d;const m=d>>>3;f[m]|=h,f[m+1]|=h>>>8,f[m+2]|=h>>>16},l.H.e=function(f,d,h){return(f[d>>>3]|f[1+(d>>>3)]<<8)>>>(7&d)&(1<<h)-1},l.H.b=function(f,d,h){return(f[d>>>3]|f[1+(d>>>3)]<<8|f[2+(d>>>3)]<<16)>>>(7&d)&(1<<h)-1},l.H.Z=function(f,d){return(f[d>>>3]|f[1+(d>>>3)]<<8|f[2+(d>>>3)]<<16)>>>(7&d)},l.H.i=function(f,d){return(f[d>>>3]|f[1+(d>>>3)]<<8|f[2+(d>>>3)]<<16|f[3+(d>>>3)]<<24)>>>(7&d)},l.H.m=(function(){const f=Uint16Array,d=Uint32Array;return{K:new f(16),j:new f(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new f(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new d(32),J:new f(512),_:[],h:new f(32),$:[],w:new f(32768),C:[],v:[],d:new f(32768),D:[],u:new f(512),Q:[],r:new f(32768),s:new d(286),Y:new d(30),a:new d(19),t:new d(15e3),k:new f(65536),g:new f(32768)}})(),(function(){const f=l.H.m;for(var d=0;d<32768;d++){let m=d;m=(2863311530&m)>>>1|(1431655765&m)<<1,m=(3435973836&m)>>>2|(858993459&m)<<2,m=(4042322160&m)>>>4|(252645135&m)<<4,m=(4278255360&m)>>>8|(16711935&m)<<8,f.r[d]=(m>>>16|m<<16)>>>17}function h(m,p,y){for(;p--!=0;)m.push(0,y)}for(d=0;d<32;d++)f.q[d]=f.S[d]<<3|f.T[d],f.c[d]=f.p[d]<<4|f.z[d];h(f._,144,8),h(f._,112,9),h(f._,24,7),h(f._,8,8),l.H.n(f._,9),l.H.A(f._,9,f.J),l.H.l(f._,9),h(f.$,32,5),l.H.n(f.$,5),l.H.A(f.$,5,f.h),l.H.l(f.$,5),h(f.Q,19,0),h(f.C,286,0),h(f.D,30,0),h(f.v,320,0)})(),l.H.N})();function s(l){return[1,null,3,1,2,null,4][l.ctype]*l.depth}function i(l,f,d,h,m){let p=s(f);const y=Math.ceil(h*p/8);let g,C;p=Math.ceil(p/8);let O=l[d],w=0;if(O>1&&(l[d]=[0,0,1][O-2]),O==3)for(w=p;w<y;w++)l[w+1]=l[w+1]+(l[w+1-p]>>>1)&255;for(let _=0;_<m;_++)if(g=d+_*y,C=g+_+1,O=l[C-1],w=0,O==0)for(;w<y;w++)l[g+w]=l[C+w];else if(O==1){for(;w<p;w++)l[g+w]=l[C+w];for(;w<y;w++)l[g+w]=l[C+w]+l[g+w-p]}else if(O==2)for(;w<y;w++)l[g+w]=l[C+w]+l[g+w-y];else if(O==3){for(;w<p;w++)l[g+w]=l[C+w]+(l[g+w-y]>>>1);for(;w<y;w++)l[g+w]=l[C+w]+(l[g+w-y]+l[g+w-p]>>>1)}else{for(;w<p;w++)l[g+w]=l[C+w]+a(0,l[g+w-y],0);for(;w<y;w++)l[g+w]=l[C+w]+a(l[g+w-p],l[g+w-y],l[g+w-p-y])}return l}function a(l,f,d){const h=l+f-d,m=h-l,p=h-f,y=h-d;return m*m<=p*p&&m*m<=y*y?l:p*p<=y*y?f:d}function c(l,f,d){d.width=e.readUint(l,f),f+=4,d.height=e.readUint(l,f),f+=4,d.depth=l[f],f++,d.ctype=l[f],f++,d.compress=l[f],f++,d.filter=l[f],f++,d.interlace=l[f],f++}function u(l,f,d,h,m,p,y,g,C){const O=Math.min(f,m),w=Math.min(d,p);let _=0,S=0;for(let W=0;W<w;W++)for(let E=0;E<O;E++)if(y>=0&&g>=0?(_=W*f+E<<2,S=(g+W)*m+y+E<<2):(_=(-g+W)*f-y+E<<2,S=W*m+E<<2),C==0)h[S]=l[_],h[S+1]=l[_+1],h[S+2]=l[_+2],h[S+3]=l[_+3];else if(C==1){var I=l[_+3]*.00392156862745098,v=l[_]*I,x=l[_+1]*I,P=l[_+2]*I,M=h[S+3]*(1/255),A=h[S]*M,F=h[S+1]*M,N=h[S+2]*M;const k=1-I,U=I+M*k,$=U==0?0:1/U;h[S+3]=255*U,h[S+0]=(v+A*k)*$,h[S+1]=(x+F*k)*$,h[S+2]=(P+N*k)*$}else if(C==2)I=l[_+3],v=l[_],x=l[_+1],P=l[_+2],M=h[S+3],A=h[S],F=h[S+1],N=h[S+2],I==M&&v==A&&x==F&&P==N?(h[S]=0,h[S+1]=0,h[S+2]=0,h[S+3]=0):(h[S]=v,h[S+1]=x,h[S+2]=P,h[S+3]=I);else if(C==3){if(I=l[_+3],v=l[_],x=l[_+1],P=l[_+2],M=h[S+3],A=h[S],F=h[S+1],N=h[S+2],I==M&&v==A&&x==F&&P==N)continue;if(I<220&&M>20)return!1}return!0}return{decode:function(f){const d=new Uint8Array(f);let h=8;const m=e,p=m.readUshort,y=m.readUint,g={tabs:{},frames:[]},C=new Uint8Array(d.length);let O,w=0,_=0;const S=[137,80,78,71,13,10,26,10];for(var I=0;I<8;I++)if(d[I]!=S[I])throw"The input is not a PNG file!";for(;h<d.length;){const W=m.readUint(d,h);h+=4;const E=m.readASCII(d,h,4);if(h+=4,E=="IHDR")c(d,h,g);else if(E=="iCCP"){for(var v=h;d[v]!=0;)v++;m.readASCII(d,h,v-h),d[v+1];const k=d.slice(v+2,h+W);let U=null;try{U=r(k)}catch{U=o(k)}g.tabs[E]=U}else if(E=="CgBI")g.tabs[E]=d.slice(h,h+4);else if(E=="IDAT"){for(I=0;I<W;I++)C[w+I]=d[h+I];w+=W}else if(E=="acTL")g.tabs[E]={num_frames:y(d,h),num_plays:y(d,h+4)},O=new Uint8Array(d.length);else if(E=="fcTL"){_!=0&&((N=g.frames[g.frames.length-1]).data=n(g,O.slice(0,_),N.rect.width,N.rect.height),_=0);const k={x:y(d,h+12),y:y(d,h+16),width:y(d,h+4),height:y(d,h+8)};let U=p(d,h+22);U=p(d,h+20)/(U==0?100:U);const $={rect:k,delay:Math.round(1e3*U),dispose:d[h+24],blend:d[h+25]};g.frames.push($)}else if(E=="fdAT"){for(I=0;I<W-4;I++)O[_+I]=d[h+I+4];_+=W-4}else if(E=="pHYs")g.tabs[E]=[m.readUint(d,h),m.readUint(d,h+4),d[h+8]];else if(E=="cHRM")for(g.tabs[E]=[],I=0;I<8;I++)g.tabs[E].push(m.readUint(d,h+4*I));else if(E=="tEXt"||E=="zTXt"){g.tabs[E]==null&&(g.tabs[E]={});var x=m.nextZero(d,h),P=m.readASCII(d,h,x-h),M=h+W-x-1;if(E=="tEXt")F=m.readASCII(d,x+1,M);else{var A=r(d.slice(x+2,x+2+M));F=m.readUTF8(A,0,A.length)}g.tabs[E][P]=F}else if(E=="iTXt"){g.tabs[E]==null&&(g.tabs[E]={}),x=0,v=h,x=m.nextZero(d,v),P=m.readASCII(d,v,x-v);const k=d[v=x+1];var F;d[v+1],v+=2,x=m.nextZero(d,v),m.readASCII(d,v,x-v),v=x+1,x=m.nextZero(d,v),m.readUTF8(d,v,x-v),M=W-((v=x+1)-h),k==0?F=m.readUTF8(d,v,M):(A=r(d.slice(v,v+M)),F=m.readUTF8(A,0,A.length)),g.tabs[E][P]=F}else if(E=="PLTE")g.tabs[E]=m.readBytes(d,h,W);else if(E=="hIST"){const k=g.tabs.PLTE.length/3;for(g.tabs[E]=[],I=0;I<k;I++)g.tabs[E].push(p(d,h+2*I))}else if(E=="tRNS")g.ctype==3?g.tabs[E]=m.readBytes(d,h,W):g.ctype==0?g.tabs[E]=p(d,h):g.ctype==2&&(g.tabs[E]=[p(d,h),p(d,h+2),p(d,h+4)]);else if(E=="gAMA")g.tabs[E]=m.readUint(d,h)/1e5;else if(E=="sRGB")g.tabs[E]=d[h];else if(E=="bKGD")g.ctype==0||g.ctype==4?g.tabs[E]=[p(d,h)]:g.ctype==2||g.ctype==6?g.tabs[E]=[p(d,h),p(d,h+2),p(d,h+4)]:g.ctype==3&&(g.tabs[E]=d[h]);else if(E=="IEND")break;h+=W,m.readUint(d,h),h+=4}var N;return _!=0&&((N=g.frames[g.frames.length-1]).data=n(g,O.slice(0,_),N.rect.width,N.rect.height)),g.data=n(g,C,g.width,g.height),delete g.compress,delete g.interlace,delete g.filter,g},toRGBA8:function(f){const d=f.width,h=f.height;if(f.tabs.acTL==null)return[t(f.data,d,h,f).buffer];const m=[];f.frames[0].data==null&&(f.frames[0].data=f.data);const p=d*h*4,y=new Uint8Array(p),g=new Uint8Array(p),C=new Uint8Array(p);for(let w=0;w<f.frames.length;w++){const _=f.frames[w],S=_.rect.x,I=_.rect.y,v=_.rect.width,x=_.rect.height,P=t(_.data,v,x,f);if(w!=0)for(var O=0;O<p;O++)C[O]=y[O];if(_.blend==0?u(P,v,x,y,d,h,S,I,0):_.blend==1&&u(P,v,x,y,d,h,S,I,1),m.push(y.buffer.slice(0)),_.dispose!=0){if(_.dispose==1)u(g,v,x,y,d,h,S,I,0);else if(_.dispose==2)for(O=0;O<p;O++)y[O]=C[O]}}return m},_paeth:a,_copyTile:u,_bin:e}})();(function(){const{_copyTile:e}=vn,{_bin:t}=vn,n=vn._paeth;var r={table:(function(){const v=new Uint32Array(256);for(let x=0;x<256;x++){let P=x;for(let M=0;M<8;M++)1&P?P=3988292384^P>>>1:P>>>=1;v[x]=P}return v})(),update(v,x,P,M){for(let A=0;A<M;A++)v=r.table[255&(v^x[P+A])]^v>>>8;return v},crc:(v,x,P)=>4294967295^r.update(4294967295,v,x,P)};function o(v,x,P,M){x[P]+=v[0]*M>>4,x[P+1]+=v[1]*M>>4,x[P+2]+=v[2]*M>>4,x[P+3]+=v[3]*M>>4}function s(v){return Math.max(0,Math.min(255,v))}function i(v,x){const P=v[0]-x[0],M=v[1]-x[1],A=v[2]-x[2],F=v[3]-x[3];return P*P+M*M+A*A+F*F}function a(v,x,P,M,A,F,N){N==null&&(N=1);const W=M.length,E=[];for(var k=0;k<W;k++){const z=M[k];E.push([z>>>0&255,z>>>8&255,z>>>16&255,z>>>24&255])}for(k=0;k<W;k++){let z=4294967295;for(var U=0,$=0;$<W;$++){var D=i(E[k],E[$]);$!=k&&D<z&&(z=D,U=$)}}const V=new Uint32Array(A.buffer),Z=new Int16Array(x*P*4),G=[0,8,2,10,12,4,14,6,3,11,1,9,15,7,13,5];for(k=0;k<G.length;k++)G[k]=255*((G[k]+.5)/16-.5);for(let z=0;z<P;z++)for(let X=0;X<x;X++){var B;k=4*(z*x+X),N!=2?B=[s(v[k]+Z[k]),s(v[k+1]+Z[k+1]),s(v[k+2]+Z[k+2]),s(v[k+3]+Z[k+3])]:(D=G[4*(3&z)+(3&X)],B=[s(v[k]+D),s(v[k+1]+D),s(v[k+2]+D),s(v[k+3]+D)]),U=0;let q=16777215;for($=0;$<W;$++){const re=i(B,E[$]);re<q&&(q=re,U=$)}const oe=E[U],Q=[B[0]-oe[0],B[1]-oe[1],B[2]-oe[2],B[3]-oe[3]];N==1&&(X!=x-1&&o(Q,Z,k+4,7),z!=P-1&&(X!=0&&o(Q,Z,k+4*x-4,3),o(Q,Z,k+4*x,5),X!=x-1&&o(Q,Z,k+4*x+4,1))),F[k>>2]=U,V[k>>2]=M[U]}}function c(v,x,P,M,A){A==null&&(A={});const{crc:F}=r,N=t.writeUint,W=t.writeUshort,E=t.writeASCII;let k=8;const U=v.frames.length>1;let $,D=!1,V=33+(U?20:0);if(A.sRGB!=null&&(V+=13),A.pHYs!=null&&(V+=21),A.iCCP!=null&&($=pako.deflate(A.iCCP),V+=21+$.length+4),v.ctype==3){for(var Z=v.plte.length,G=0;G<Z;G++)v.plte[G]>>>24!=255&&(D=!0);V+=8+3*Z+4+(D?8+1*Z+4:0)}for(var B=0;B<v.frames.length;B++)U&&(V+=38),V+=(oe=v.frames[B]).cimg.length+12,B!=0&&(V+=4);V+=12;const z=new Uint8Array(V),X=[137,80,78,71,13,10,26,10];for(G=0;G<8;G++)z[G]=X[G];if(N(z,k,13),k+=4,E(z,k,"IHDR"),k+=4,N(z,k,x),k+=4,N(z,k,P),k+=4,z[k]=v.depth,k++,z[k]=v.ctype,k++,z[k]=0,k++,z[k]=0,k++,z[k]=0,k++,N(z,k,F(z,k-17,17)),k+=4,A.sRGB!=null&&(N(z,k,1),k+=4,E(z,k,"sRGB"),k+=4,z[k]=A.sRGB,k++,N(z,k,F(z,k-5,5)),k+=4),A.iCCP!=null){const Q=13+$.length;N(z,k,Q),k+=4,E(z,k,"iCCP"),k+=4,E(z,k,"ICC profile"),k+=11,k+=2,z.set($,k),k+=$.length,N(z,k,F(z,k-(Q+4),Q+4)),k+=4}if(A.pHYs!=null&&(N(z,k,9),k+=4,E(z,k,"pHYs"),k+=4,N(z,k,A.pHYs[0]),k+=4,N(z,k,A.pHYs[1]),k+=4,z[k]=A.pHYs[2],k++,N(z,k,F(z,k-13,13)),k+=4),U&&(N(z,k,8),k+=4,E(z,k,"acTL"),k+=4,N(z,k,v.frames.length),k+=4,N(z,k,A.loop!=null?A.loop:0),k+=4,N(z,k,F(z,k-12,12)),k+=4),v.ctype==3){for(N(z,k,3*(Z=v.plte.length)),k+=4,E(z,k,"PLTE"),k+=4,G=0;G<Z;G++){const Q=3*G,re=v.plte[G],le=255&re,K=re>>>8&255,Se=re>>>16&255;z[k+Q+0]=le,z[k+Q+1]=K,z[k+Q+2]=Se}if(k+=3*Z,N(z,k,F(z,k-3*Z-4,3*Z+4)),k+=4,D){for(N(z,k,Z),k+=4,E(z,k,"tRNS"),k+=4,G=0;G<Z;G++)z[k+G]=v.plte[G]>>>24&255;k+=Z,N(z,k,F(z,k-Z-4,Z+4)),k+=4}}let q=0;for(B=0;B<v.frames.length;B++){var oe=v.frames[B];U&&(N(z,k,26),k+=4,E(z,k,"fcTL"),k+=4,N(z,k,q++),k+=4,N(z,k,oe.rect.width),k+=4,N(z,k,oe.rect.height),k+=4,N(z,k,oe.rect.x),k+=4,N(z,k,oe.rect.y),k+=4,W(z,k,M[B]),k+=2,W(z,k,1e3),k+=2,z[k]=oe.dispose,k++,z[k]=oe.blend,k++,N(z,k,F(z,k-30,30)),k+=4);const Q=oe.cimg;N(z,k,(Z=Q.length)+(B==0?0:4)),k+=4;const re=k;E(z,k,B==0?"IDAT":"fdAT"),k+=4,B!=0&&(N(z,k,q++),k+=4),z.set(Q,k),k+=Z,N(z,k,F(z,re,k-re)),k+=4}return N(z,k,0),k+=4,E(z,k,"IEND"),k+=4,N(z,k,F(z,k-4,4)),k+=4,z.buffer}function u(v,x,P){for(let M=0;M<v.frames.length;M++){const A=v.frames[M];A.rect.width;const F=A.rect.height,N=new Uint8Array(F*A.bpl+F);A.cimg=h(A.img,F,A.bpp,A.bpl,N,x,P)}}function l(v,x,P,M,A){const F=A[0],N=A[1],W=A[2],E=A[3],k=A[4],U=A[5];let $=6,D=8,V=255;for(var Z=0;Z<v.length;Z++){const Ge=new Uint8Array(v[Z]);for(var G=Ge.length,B=0;B<G;B+=4)V&=Ge[B+3]}const z=V!=255,X=(function(Re,We,nt,rt,R,Y){const H=[];for(var ee=0;ee<Re.length;ee++){const ze=new Uint8Array(Re[ee]),ot=new Uint32Array(ze.buffer);var te;let Qe=0,xt=0,gt=We,dt=nt,jt=rt?1:0;if(ee!=0){const Sn=Y||rt||ee==1||H[ee-2].dispose!=0?1:2;let kn=0,_e=1e9;for(let De=0;De<Sn;De++){var ne=new Uint8Array(Re[ee-1-De]);const ve=new Uint32Array(Re[ee-1-De]);let Ee=We,Xe=nt,xe=-1,tr=-1;for(let Pt=0;Pt<nt;Pt++)for(let Qt=0;Qt<We;Qt++)ot[be=Pt*We+Qt]!=ve[be]&&(Qt<Ee&&(Ee=Qt),Qt>xe&&(xe=Qt),Pt<Xe&&(Xe=Pt),Pt>tr&&(tr=Pt));xe==-1&&(Ee=Xe=xe=tr=0),R&&((1&Ee)==1&&Ee--,(1&Xe)==1&&Xe--);const ct=(xe-Ee+1)*(tr-Xe+1);ct<_e&&(_e=ct,kn=De,Qe=Ee,xt=Xe,gt=xe-Ee+1,dt=tr-Xe+1)}ne=new Uint8Array(Re[ee-1-kn]),kn==1&&(H[ee-1].dispose=2),te=new Uint8Array(gt*dt*4),e(ne,We,nt,te,gt,dt,-Qe,-xt,0),jt=e(ze,We,nt,te,gt,dt,-Qe,-xt,3)?1:0,jt==1?d(ze,We,nt,te,{x:Qe,y:xt,width:gt,height:dt}):e(ze,We,nt,te,gt,dt,-Qe,-xt,0)}else te=ze.slice(0);H.push({rect:{x:Qe,y:xt,width:gt,height:dt},img:te,blend:jt,dispose:0})}if(rt)for(ee=0;ee<H.length;ee++){if((Oe=H[ee]).blend==1)continue;const ze=Oe.rect,ot=H[ee-1].rect,Qe=Math.min(ze.x,ot.x),xt=Math.min(ze.y,ot.y),gt={x:Qe,y:xt,width:Math.max(ze.x+ze.width,ot.x+ot.width)-Qe,height:Math.max(ze.y+ze.height,ot.y+ot.height)-xt};H[ee-1].dispose=1,ee-1!=0&&f(Re,We,nt,H,ee-1,gt,R),f(Re,We,nt,H,ee,gt,R)}let ue=0;if(Re.length!=1)for(var be=0;be<H.length;be++){var Oe;ue+=(Oe=H[be]).rect.width*Oe.rect.height}return H})(v,x,P,F,N,W),q={},oe=[],Q=[];if(M!=0){const Ge=[];for(B=0;B<X.length;B++)Ge.push(X[B].img.buffer);const Re=(function(R){let Y=0;for(var H=0;H<R.length;H++)Y+=R[H].byteLength;const ee=new Uint8Array(Y);let te=0;for(H=0;H<R.length;H++){const ne=new Uint8Array(R[H]),ue=ne.length;for(let be=0;be<ue;be+=4){let Oe=ne[be],ze=ne[be+1],ot=ne[be+2];const Qe=ne[be+3];Qe==0&&(Oe=ze=ot=0),ee[te+be]=Oe,ee[te+be+1]=ze,ee[te+be+2]=ot,ee[te+be+3]=Qe}te+=ue}return ee.buffer})(Ge),We=p(Re,M);for(B=0;B<We.plte.length;B++)oe.push(We.plte[B].est.rgba);let nt=0;for(B=0;B<X.length;B++){const rt=(le=X[B]).img.length;var re=new Uint8Array(We.inds.buffer,nt>>2,rt>>2);Q.push(re);const R=new Uint8Array(We.abuf,nt,rt);U&&a(le.img,le.rect.width,le.rect.height,oe,R,re),le.img.set(R),nt+=rt}}else for(Z=0;Z<X.length;Z++){var le=X[Z];const Ge=new Uint32Array(le.img.buffer);var K=le.rect.width;for(G=Ge.length,re=new Uint8Array(G),Q.push(re),B=0;B<G;B++){const Re=Ge[B];if(B!=0&&Re==Ge[B-1])re[B]=re[B-1];else if(B>K&&Re==Ge[B-K])re[B]=re[B-K];else{let We=q[Re];if(We==null&&(q[Re]=We=oe.length,oe.push(Re),oe.length>=300))break;re[B]=We}}}const Se=oe.length;for(Se<=256&&k==0&&(D=Se<=2?1:Se<=4?2:Se<=16?4:8,D=Math.max(D,E)),Z=0;Z<X.length;Z++){(le=X[Z]).rect.x,le.rect.y,K=le.rect.width;const Ge=le.rect.height;let Re=le.img;new Uint32Array(Re.buffer);let We=4*K,nt=4;if(Se<=256&&k==0){We=Math.ceil(D*K/8);var Ie=new Uint8Array(We*Ge);const rt=Q[Z];for(let R=0;R<Ge;R++){B=R*We;const Y=R*K;if(D==8)for(var ke=0;ke<K;ke++)Ie[B+ke]=rt[Y+ke];else if(D==4)for(ke=0;ke<K;ke++)Ie[B+(ke>>1)]|=rt[Y+ke]<<4-4*(1&ke);else if(D==2)for(ke=0;ke<K;ke++)Ie[B+(ke>>2)]|=rt[Y+ke]<<6-2*(3&ke);else if(D==1)for(ke=0;ke<K;ke++)Ie[B+(ke>>3)]|=rt[Y+ke]<<7-1*(7&ke)}Re=Ie,$=3,nt=1}else if(z==0&&X.length==1){Ie=new Uint8Array(K*Ge*3);const rt=K*Ge;for(B=0;B<rt;B++){const R=3*B,Y=4*B;Ie[R]=Re[Y],Ie[R+1]=Re[Y+1],Ie[R+2]=Re[Y+2]}Re=Ie,$=2,nt=3,We=3*K}le.img=Re,le.bpl=We,le.bpp=nt}return{ctype:$,depth:D,plte:oe,frames:X}}function f(v,x,P,M,A,F,N){const W=Uint8Array,E=Uint32Array,k=new W(v[A-1]),U=new E(v[A-1]),$=A+1<v.length?new W(v[A+1]):null,D=new W(v[A]),V=new E(D.buffer);let Z=x,G=P,B=-1,z=-1;for(let q=0;q<F.height;q++)for(let oe=0;oe<F.width;oe++){const Q=F.x+oe,re=F.y+q,le=re*x+Q,K=V[le];K==0||M[A-1].dispose==0&&U[le]==K&&($==null||$[4*le+3]!=0)||(Q<Z&&(Z=Q),Q>B&&(B=Q),re<G&&(G=re),re>z&&(z=re))}B==-1&&(Z=G=B=z=0),N&&((1&Z)==1&&Z--,(1&G)==1&&G--),F={x:Z,y:G,width:B-Z+1,height:z-G+1};const X=M[A];X.rect=F,X.blend=1,X.img=new Uint8Array(F.width*F.height*4),M[A-1].dispose==0?(e(k,x,P,X.img,F.width,F.height,-F.x,-F.y,0),d(D,x,P,X.img,F)):e(D,x,P,X.img,F.width,F.height,-F.x,-F.y,0)}function d(v,x,P,M,A){e(v,x,P,M,A.width,A.height,-A.x,-A.y,2)}function h(v,x,P,M,A,F,N){const W=[];let E,k=[0,1,2,3,4];F!=-1?k=[F]:(x*M>5e5||P==1)&&(k=[0]),N&&(E={level:0});const U=pP;for(var $=0;$<k.length;$++){for(let Z=0;Z<x;Z++)m(A,v,Z,M,P,k[$]);W.push(U.deflate(A,E))}let D,V=1e9;for($=0;$<W.length;$++)W[$].length<V&&(D=$,V=W[$].length);return W[D]}function m(v,x,P,M,A,F){const N=P*M;let W=N+P;if(v[W]=F,W++,F==0)if(M<500)for(var E=0;E<M;E++)v[W+E]=x[N+E];else v.set(new Uint8Array(x.buffer,N,M),W);else if(F==1){for(E=0;E<A;E++)v[W+E]=x[N+E];for(E=A;E<M;E++)v[W+E]=x[N+E]-x[N+E-A]+256&255}else if(P==0){for(E=0;E<A;E++)v[W+E]=x[N+E];if(F==2)for(E=A;E<M;E++)v[W+E]=x[N+E];if(F==3)for(E=A;E<M;E++)v[W+E]=x[N+E]-(x[N+E-A]>>1)+256&255;if(F==4)for(E=A;E<M;E++)v[W+E]=x[N+E]-n(x[N+E-A],0,0)+256&255}else{if(F==2)for(E=0;E<M;E++)v[W+E]=x[N+E]+256-x[N+E-M]&255;if(F==3){for(E=0;E<A;E++)v[W+E]=x[N+E]+256-(x[N+E-M]>>1)&255;for(E=A;E<M;E++)v[W+E]=x[N+E]+256-(x[N+E-M]+x[N+E-A]>>1)&255}if(F==4){for(E=0;E<A;E++)v[W+E]=x[N+E]+256-n(0,x[N+E-M],0)&255;for(E=A;E<M;E++)v[W+E]=x[N+E]+256-n(x[N+E-A],x[N+E-M],x[N+E-A-M])&255}}}function p(v,x){const P=new Uint8Array(v),M=P.slice(0),A=new Uint32Array(M.buffer),F=y(M,x),N=F[0],W=F[1],E=P.length,k=new Uint8Array(E>>2);let U;if(P.length<2e7)for(var $=0;$<E;$+=4)U=g(N,D=P[$]*(1/255),V=P[$+1]*(1/255),Z=P[$+2]*(1/255),G=P[$+3]*(1/255)),k[$>>2]=U.ind,A[$>>2]=U.est.rgba;else for($=0;$<E;$+=4){var D=P[$]*.00392156862745098,V=P[$+1]*(1/255),Z=P[$+2]*(1/255),G=P[$+3]*(1/255);for(U=N;U.left;)U=C(U.est,D,V,Z,G)<=0?U.left:U.right;k[$>>2]=U.ind,A[$>>2]=U.est.rgba}return{abuf:M.buffer,inds:k,plte:W}}function y(v,x,P){P==null&&(P=1e-4);const M=new Uint32Array(v.buffer),A={i0:0,i1:v.length,bst:null,est:null,tdst:0,left:null,right:null};A.bst=_(v,A.i0,A.i1),A.est=S(A.bst);const F=[A];for(;F.length<x;){let W=0,E=0;for(var N=0;N<F.length;N++)F[N].est.L>W&&(W=F[N].est.L,E=N);if(W<P)break;const k=F[E],U=O(v,M,k.i0,k.i1,k.est.e,k.est.eMq255);if(k.i0>=U||k.i1<=U){k.est.L=0;continue}const $={i0:k.i0,i1:U,bst:null,est:null,tdst:0,left:null,right:null};$.bst=_(v,$.i0,$.i1),$.est=S($.bst);const D={i0:U,i1:k.i1,bst:null,est:null,tdst:0,left:null,right:null};for(D.bst={R:[],m:[],N:k.bst.N-$.bst.N},N=0;N<16;N++)D.bst.R[N]=k.bst.R[N]-$.bst.R[N];for(N=0;N<4;N++)D.bst.m[N]=k.bst.m[N]-$.bst.m[N];D.est=S(D.bst),k.left=$,k.right=D,F[E]=$,F.push(D)}for(F.sort(((W,E)=>E.bst.N-W.bst.N)),N=0;N<F.length;N++)F[N].ind=N;return[A,F]}function g(v,x,P,M,A){if(v.left==null)return v.tdst=(function($,D,V,Z,G){const B=D-$[0],z=V-$[1],X=Z-$[2],q=G-$[3];return B*B+z*z+X*X+q*q})(v.est.q,x,P,M,A),v;const F=C(v.est,x,P,M,A);let N=v.left,W=v.right;F>0&&(N=v.right,W=v.left);const E=g(N,x,P,M,A);if(E.tdst<=F*F)return E;const k=g(W,x,P,M,A);return k.tdst<E.tdst?k:E}function C(v,x,P,M,A){const{e:F}=v;return F[0]*x+F[1]*P+F[2]*M+F[3]*A-v.eMq}function O(v,x,P,M,A,F){for(M-=4;P<M;){for(;w(v,P,A)<=F;)P+=4;for(;w(v,M,A)>F;)M-=4;if(P>=M)break;const N=x[P>>2];x[P>>2]=x[M>>2],x[M>>2]=N,P+=4,M-=4}for(;w(v,P,A)>F;)P-=4;return P+4}function w(v,x,P){return v[x]*P[0]+v[x+1]*P[1]+v[x+2]*P[2]+v[x+3]*P[3]}function _(v,x,P){const M=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],A=[0,0,0,0],F=P-x>>2;for(let N=x;N<P;N+=4){const W=v[N]*.00392156862745098,E=v[N+1]*(1/255),k=v[N+2]*(1/255),U=v[N+3]*(1/255);A[0]+=W,A[1]+=E,A[2]+=k,A[3]+=U,M[0]+=W*W,M[1]+=W*E,M[2]+=W*k,M[3]+=W*U,M[5]+=E*E,M[6]+=E*k,M[7]+=E*U,M[10]+=k*k,M[11]+=k*U,M[15]+=U*U}return M[4]=M[1],M[8]=M[2],M[9]=M[6],M[12]=M[3],M[13]=M[7],M[14]=M[11],{R:M,m:A,N:F}}function S(v){const{R:x}=v,{m:P}=v,{N:M}=v,A=P[0],F=P[1],N=P[2],W=P[3],E=M==0?0:1/M,k=[x[0]-A*A*E,x[1]-A*F*E,x[2]-A*N*E,x[3]-A*W*E,x[4]-F*A*E,x[5]-F*F*E,x[6]-F*N*E,x[7]-F*W*E,x[8]-N*A*E,x[9]-N*F*E,x[10]-N*N*E,x[11]-N*W*E,x[12]-W*A*E,x[13]-W*F*E,x[14]-W*N*E,x[15]-W*W*E],U=k,$=I;let D=[Math.random(),Math.random(),Math.random(),Math.random()],V=0,Z=0;if(M!=0)for(let B=0;B<16&&(D=$.multVec(U,D),Z=Math.sqrt($.dot(D,D)),D=$.sml(1/Z,D),!(B!=0&&Math.abs(Z-V)<1e-9));B++)V=Z;const G=[A*E,F*E,N*E,W*E];return{Cov:k,q:G,e:D,L:V,eMq255:$.dot($.sml(255,G),D),eMq:$.dot(D,G),rgba:(Math.round(255*G[3])<<24|Math.round(255*G[2])<<16|Math.round(255*G[1])<<8|Math.round(255*G[0])<<0)>>>0}}var I={multVec:(v,x)=>[v[0]*x[0]+v[1]*x[1]+v[2]*x[2]+v[3]*x[3],v[4]*x[0]+v[5]*x[1]+v[6]*x[2]+v[7]*x[3],v[8]*x[0]+v[9]*x[1]+v[10]*x[2]+v[11]*x[3],v[12]*x[0]+v[13]*x[1]+v[14]*x[2]+v[15]*x[3]],dot:(v,x)=>v[0]*x[0]+v[1]*x[1]+v[2]*x[2]+v[3]*x[3],sml:(v,x)=>[v*x[0],v*x[1],v*x[2],v*x[3]]};vn.encode=function(x,P,M,A,F,N,W){A==null&&(A=0),W==null&&(W=!1);const E=l(x,P,M,A,[!1,!1,!1,0,W,!1]);return u(E,-1),c(E,P,M,F,N)},vn.encodeLL=function(x,P,M,A,F,N,W,E){const k={ctype:0+(A==1?0:2)+(F==0?0:4),depth:N,frames:[]},U=(A+F)*N,$=U*P;for(let D=0;D<x.length;D++)k.frames.push({rect:{x:0,y:0,width:P,height:M},img:new Uint8Array(x[D]),blend:0,dispose:1,bpp:Math.ceil(U/8),bpl:Math.ceil($/8)});return u(k,0,!0),c(k,P,M,W,E)},vn.encode.compress=l,vn.encode.dither=a,vn.quantize=p,vn.quantize.getKDtree=y,vn.quantize.getNearest=g})();const qm={toArrayBuffer(e,t){const n=e.width,r=e.height,o=n<<2,s=e.getContext("2d").getImageData(0,0,n,r),i=new Uint32Array(s.data.buffer),a=(32*n+31)/32<<2,c=a*r,u=122+c,l=new ArrayBuffer(u),f=new DataView(l),d=1<<20;let h,m,p,y,g=d,C=0,O=0,w=0;function _(v){f.setUint16(O,v,!0),O+=2}function S(v){f.setUint32(O,v,!0),O+=4}function I(v){O+=v}_(19778),S(u),I(4),S(122),S(108),S(n),S(-r>>>0),_(1),_(32),S(3),S(c),S(2835),S(2835),I(8),S(16711680),S(65280),S(255),S(4278190080),S(1466527264),(function v(){for(;C<r&&g>0;){for(y=122+C*a,h=0;h<o;)g--,m=i[w++],p=m>>>24,f.setUint32(y+h,m<<8|p),h+=4;C++}w<i.length?(g=d,setTimeout(v,qm._dly)):t(l)})()},toBlob(e,t){this.toArrayBuffer(e,(n=>{t(new Blob([n],{type:"image/bmp"}))}))},_dly:9};var Yt={CHROME:"CHROME",FIREFOX:"FIREFOX",DESKTOP_SAFARI:"DESKTOP_SAFARI",IE:"IE",IOS:"IOS",ETC:"ETC"},mP={[Yt.CHROME]:16384,[Yt.FIREFOX]:11180,[Yt.DESKTOP_SAFARI]:16384,[Yt.IE]:8192,[Yt.IOS]:4096,[Yt.ETC]:8192};const fl=typeof window<"u",Km=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,$i=fl&&window.cordova&&window.cordova.require&&window.cordova.require("cordova/modulemapper"),gP=(fl||Km)&&($i&&$i.getOriginalSymbol(window,"File")||typeof File<"u"&&File),Xm=(fl||Km)&&($i&&$i.getOriginalSymbol(window,"FileReader")||typeof FileReader<"u"&&FileReader);function dl(e,t,n=Date.now()){return new Promise((r=>{const o=e.split(","),s=o[0].match(/:(.*?);/)[1],i=globalThis.atob(o[1]);let a=i.length;const c=new Uint8Array(a);for(;a--;)c[a]=i.charCodeAt(a);const u=new Blob([c],{type:s});u.name=t,u.lastModified=n,r(u)}))}function Jm(e){return new Promise(((t,n)=>{const r=new Xm;r.onload=()=>t(r.result),r.onerror=o=>n(o),r.readAsDataURL(e)}))}function Qm(e){return new Promise(((t,n)=>{const r=new Image;r.onload=()=>t(r),r.onerror=o=>n(o),r.src=e}))}function $r(){if($r.cachedResult!==void 0)return $r.cachedResult;let e=Yt.ETC;const{userAgent:t}=navigator;return/Chrom(e|ium)/i.test(t)?e=Yt.CHROME:/iP(ad|od|hone)/i.test(t)&&/WebKit/i.test(t)?e=Yt.IOS:/Safari/i.test(t)?e=Yt.DESKTOP_SAFARI:/Firefox/i.test(t)?e=Yt.FIREFOX:(/MSIE/i.test(t)||document.documentMode)&&(e=Yt.IE),$r.cachedResult=e,$r.cachedResult}function eg(e,t){const n=$r(),r=mP[n];let o=e,s=t,i=o*s;const a=o>s?s/o:o/s;for(;i>r*r;){const c=(r+o)/2,u=(r+s)/2;c<u?(s=u,o=u*a):(s=c*a,o=c),i=o*s}return{width:o,height:s}}function Ui(e,t){let n,r;try{if(n=new OffscreenCanvas(e,t),r=n.getContext("2d"),r===null)throw new Error("getContext of OffscreenCanvas returns null")}catch{n=document.createElement("canvas"),r=n.getContext("2d")}return n.width=e,n.height=t,[n,r]}function tg(e,t){const{width:n,height:r}=eg(e.width,e.height),[o,s]=Ui(n,r);return t&&/jpe?g/.test(t)&&(s.fillStyle="white",s.fillRect(0,0,o.width,o.height)),s.drawImage(e,0,0,o.width,o.height),o}function Yi(){return Yi.cachedResult!==void 0||(Yi.cachedResult=["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&typeof document<"u"&&"ontouchend"in document),Yi.cachedResult}function ji(e,t={}){return new Promise((function(n,r){let o,s;var i=function(){try{return s=tg(o,t.fileType||e.type),n([o,s])}catch(c){return r(c)}},a=function(c){try{var u=function(l){try{throw l}catch(f){return r(f)}};try{let l;return Jm(e).then((function(f){try{return l=f,Qm(l).then((function(d){try{return o=d,(function(){try{return i()}catch(h){return r(h)}})()}catch(h){return u(h)}}),u)}catch(d){return u(d)}}),u)}catch(l){u(l)}}catch(l){return r(l)}};try{if(Yi()||[Yt.DESKTOP_SAFARI,Yt.MOBILE_SAFARI].includes($r()))throw new Error("Skip createImageBitmap on IOS and Safari");return createImageBitmap(e).then((function(c){try{return o=c,i()}catch{return a()}}),a)}catch{a()}}))}function Vi(e,t,n,r,o=1){return new Promise((function(s,i){let a;if(t==="image/png"){let u,l,f;return u=e.getContext("2d"),{data:l}=u.getImageData(0,0,e.width,e.height),f=vn.encode([l.buffer],e.width,e.height,4096*o),a=new Blob([f],{type:t}),a.name=n,a.lastModified=r,c.call(this)}{let u=function(){return c.call(this)};if(t==="image/bmp")return new Promise((l=>qm.toBlob(e,l))).then((function(l){try{return a=l,a.name=n,a.lastModified=r,u.call(this)}catch(f){return i(f)}}).bind(this),i);{let l=function(){return u.call(this)};if(typeof OffscreenCanvas=="function"&&e instanceof OffscreenCanvas)return e.convertToBlob({type:t,quality:o}).then((function(f){try{return a=f,a.name=n,a.lastModified=r,l.call(this)}catch(d){return i(d)}}).bind(this),i);{let f;return f=e.toDataURL(t,o),dl(f,n,r).then((function(d){try{return a=d,l.call(this)}catch(h){return i(h)}}).bind(this),i)}}}function c(){return s(a)}}))}function In(e){e.width=0,e.height=0}function yo(){return new Promise((function(e,t){let n,r,o,s;return yo.cachedResult!==void 0?e(yo.cachedResult):dl("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==","test.jpg",Date.now()).then((function(i){try{return n=i,ji(n).then((function(a){try{return r=a[1],Vi(r,n.type,n.name,n.lastModified).then((function(c){try{return o=c,In(r),ji(o).then((function(u){try{return s=u[0],yo.cachedResult=s.width===1&&s.height===2,e(yo.cachedResult)}catch(l){return t(l)}}),t)}catch(u){return t(u)}}),t)}catch(c){return t(c)}}),t)}catch(a){return t(a)}}),t)}))}function ng(e){return new Promise(((t,n)=>{const r=new Xm;r.onload=o=>{const s=new DataView(o.target.result);if(s.getUint16(0,!1)!=65496)return t(-2);const i=s.byteLength;let a=2;for(;a<i;){if(s.getUint16(a+2,!1)<=8)return t(-1);const c=s.getUint16(a,!1);if(a+=2,c==65505){if(s.getUint32(a+=2,!1)!=1165519206)return t(-1);const u=s.getUint16(a+=6,!1)==18761;a+=s.getUint32(a+4,u);const l=s.getUint16(a,u);a+=2;for(let f=0;f<l;f++)if(s.getUint16(a+12*f,u)==274)return t(s.getUint16(a+12*f+8,u))}else{if((65280&c)!=65280)break;a+=s.getUint16(a,!1)}}return t(-1)},r.onerror=o=>n(o),r.readAsArrayBuffer(e)}))}function rg(e,t){const{width:n}=e,{height:r}=e,{maxWidthOrHeight:o}=t;let s,i=e;return isFinite(o)&&(n>o||r>o)&&([i,s]=Ui(n,r),n>r?(i.width=o,i.height=r/n*o):(i.width=n/r*o,i.height=o),s.drawImage(e,0,0,i.width,i.height),In(e)),i}function og(e,t){const{width:n}=e,{height:r}=e,[o,s]=Ui(n,r);switch(t>4&&t<9?(o.width=r,o.height=n):(o.width=n,o.height=r),t){case 2:s.transform(-1,0,0,1,n,0);break;case 3:s.transform(-1,0,0,-1,n,r);break;case 4:s.transform(1,0,0,-1,0,r);break;case 5:s.transform(0,1,1,0,0,0);break;case 6:s.transform(0,1,-1,0,r,0);break;case 7:s.transform(0,-1,-1,0,r,n);break;case 8:s.transform(0,-1,1,0,0,n)}return s.drawImage(e,0,0,n,r),In(e),o}function sg(e,t,n=0){return new Promise((function(r,o){let s,i,a,c,u,l,f,d,h,m,p,y,g,C,O,w,_,S,I,v;function x(M=5){if(t.signal&&t.signal.aborted)throw t.signal.reason;s+=M,t.onProgress(Math.min(s,100))}function P(M){if(t.signal&&t.signal.aborted)throw t.signal.reason;s=Math.min(Math.max(M,s),100),t.onProgress(s)}return s=n,i=t.maxIteration||10,a=1024*t.maxSizeMB*1024,x(),ji(e,t).then((function(M){try{return[,c]=M,x(),u=rg(c,t),x(),new Promise((function(A,F){var N;if(!(N=t.exifOrientation))return ng(e).then((function(E){try{return N=E,W.call(this)}catch(k){return F(k)}}).bind(this),F);function W(){return A(N)}return W.call(this)})).then((function(A){try{return l=A,x(),yo().then((function(F){try{return f=F?u:og(u,l),x(),d=t.initialQuality||1,h=t.fileType||e.type,Vi(f,h,e.name,e.lastModified,d).then((function(N){try{{let E=function(){if(i--&&(O>a||O>g)){let U,$;return U=v?.95*I.width:I.width,$=v?.95*I.height:I.height,[_,S]=Ui(U,$),S.drawImage(I,0,0,U,$),d*=h==="image/png"?.85:.95,Vi(_,h,e.name,e.lastModified,d).then((function(D){try{return w=D,In(I),I=_,O=w.size,P(Math.min(99,Math.floor((C-O)/(C-a)*100))),E}catch(V){return o(V)}}),o)}return[1]},k=function(){return In(I),In(_),In(u),In(f),In(c),P(100),r(w)};if(m=N,x(),p=m.size>a,y=m.size>e.size,!p&&!y)return P(100),r(m);var W;return g=e.size,C=m.size,O=C,I=f,v=!t.alwaysKeepResolution&&p,(W=(function(U){for(;U;){if(U.then)return void U.then(W,o);try{if(U.pop){if(U.length)return U.pop()?k.call(this):U;U=E}else U=U.call(this)}catch($){return o($)}}}).bind(this))(E)}}catch(E){return o(E)}}).bind(this),o)}catch(N){return o(N)}}).bind(this),o)}catch(F){return o(F)}}).bind(this),o)}catch(A){return o(A)}}).bind(this),o)}))}const yP=`
84
84
  let scriptImported = false
85
85
  self.addEventListener('message', async (e) => {
86
86
  const { file, id, imageCompressionLibUrl, options } = e.data
@@ -99,9 +99,9 @@ self.addEventListener('message', async (e) => {
99
99
  self.postMessage({ error: e.message + '\\n' + e.stack, id })
100
100
  }
101
101
  })
102
- `;let hl;function vP(e,t){return new Promise(((n,r)=>{hl||(hl=(function(i){const a=[];return a.push(i),URL.createObjectURL(new Blob(a))})(yP));const o=new Worker(hl);o.addEventListener("message",(function(i){if(t.signal&&t.signal.aborted)o.terminate();else if(i.data.progress===void 0){if(i.data.error)return r(new Error(i.data.error)),void o.terminate();n(i.data.file),o.terminate()}else t.onProgress(i.data.progress)})),o.addEventListener("error",r),t.signal&&t.signal.addEventListener("abort",(()=>{r(t.signal.reason),o.terminate()})),o.postMessage({file:e,imageCompressionLibUrl:t.libURL,options:{...t,onProgress:void 0,signal:void 0}})}))}function Et(e,t){return new Promise((function(n,r){let o,s,i,a,c,u;if(o={...t},i=0,{onProgress:a}=o,o.maxSizeMB=o.maxSizeMB||Number.POSITIVE_INFINITY,c=typeof o.useWebWorker!="boolean"||o.useWebWorker,delete o.useWebWorker,o.onProgress=h=>{i=h,typeof a=="function"&&a(i)},!(e instanceof Blob||e instanceof gP))return r(new Error("The file given is not an instance of Blob or File"));if(!/^image/.test(e.type))return r(new Error("The file given is not an image"));if(u=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,!c||typeof Worker!="function"||u)return sg(e,o).then((function(h){try{return s=h,d.call(this)}catch(m){return r(m)}}).bind(this),r);var l=(function(){try{return d.call(this)}catch(h){return r(h)}}).bind(this),f=function(h){try{return sg(e,o).then((function(m){try{return s=m,l()}catch(p){return r(p)}}),r)}catch(m){return r(m)}};try{return o.libURL=o.libURL||"https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js",vP(e,o).then((function(h){try{return s=h,l()}catch{return f()}}),f)}catch{f()}function d(){try{s.name=e.name,s.lastModified=e.lastModified}catch{}try{o.preserveExif&&e.type==="image/jpeg"&&(!o.fileType||o.fileType&&o.fileType===e.type)&&(s=Gm(e,s))}catch{}return n(s)}}))}Et.getDataUrlFromFile=Jm,Et.getFilefromDataUrl=dl,Et.loadImage=Qm,Et.drawImageInCanvas=tg,Et.drawFileInCanvas=ji,Et.canvasToFile=Vi,Et.getExifOrientation=ng,Et.handleMaxWidthOrHeight=rg,Et.followExifOrientation=og,Et.cleanupCanvasMemory=In,Et.isAutoOrientationInBrowser=yo,Et.approximateBelowMaximumCanvasSizeOfBrowser=eg,Et.copyExifWithoutOrientation=Gm,Et.getBrowserName=$r,Et.version="2.0.2";function Ae(...e){return kc(oi(e))}async function bP(e,t=.2,n=1920){try{const r=atob(e.split(",")[1]),o=e.split(",")[0].split(":")[1].split(";")[0],s=new ArrayBuffer(r.length),i=new Uint8Array(s);for(let l=0;l<r.length;l++)i[l]=r.charCodeAt(l);const a=new Blob([s],{type:o}),c=await Et(a,{maxSizeMB:t,maxWidthOrHeight:n,useWebWorker:!0});return await Et.getDataUrlFromFile(c)}catch(r){return console.error("Error compressing image:",r),e}}function wP({questionnaire:e={}}){const{sections:t=[]}=e,n=[],r=t.map(o=>{const{items:s=[]}=o,i=s.map(a=>{const{reference_id:c=""}=a;return{...a,id:c,name:c}});return n.push(...i),{...o,items:i}});return{questionnaire:e,sections:r,questions:n}}const pl=uP("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),vo=b.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},s)=>{const i=r?fh:"button";return T.jsx(i,{className:Ae(pl({variant:t,size:n,className:e})),ref:s,...o})});vo.displayName="Button";function _P(e,t,n="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:n}).format(t).split(/\s/g).slice(2).join(" ")}const SP={},ts={};function Ur(e,t){try{const r=(SP[e]||=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format)(t).split("GMT")[1];return r in ts?ts[r]:ig(r,r.split(":"))}catch{if(e in ts)return ts[e];const n=e?.match(kP);return n?ig(e,n.slice(1)):NaN}}const kP=/([+-]\d\d):?(\d\d)?/;function ig(e,t){const n=+(t[0]||0),r=+(t[1]||0),o=+(t[2]||0)/60;return ts[e]=n*60+r>0?n*60+r+o:n*60-r-o}class Fn extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(Ur(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),cg(this),ml(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new Fn(...n,t):new Fn(Date.now(),t)}withTimeZone(t){return new Fn(+this,t)}getTimezoneOffset(){const t=-Ur(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),ml(this),+this}[Symbol.for("constructDateFrom")](t){return new Fn(+new Date(t),this.timeZone)}}const ag=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!ag.test(e))return;const t=e.replace(ag,"$1UTC");Fn.prototype[t]&&(e.startsWith("get")?Fn.prototype[e]=function(){return this.internal[t]()}:(Fn.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),xP(this),+this},Fn.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),ml(this),+this}))});function ml(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-Ur(e.timeZone,e)*60))}function xP(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),cg(e)}function cg(e){const t=Ur(e.timeZone,e),n=t>0?Math.floor(t):Math.ceil(t),r=new Date(+e);r.setUTCHours(r.getUTCHours()-1);const o=-new Date(+e).getTimezoneOffset(),s=-new Date(+r).getTimezoneOffset(),i=o-s,a=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();i&&a&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+i);const c=o-n;c&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+c);const u=new Date(+e);u.setUTCSeconds(0);const l=o>0?u.getSeconds():(u.getSeconds()-60)%60,f=Math.round(-(Ur(e.timeZone,e)*60))%60;(f||l)&&(e.internal.setUTCSeconds(e.internal.getUTCSeconds()+f),Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+f+l));const d=Ur(e.timeZone,e),h=d>0?Math.floor(d):Math.ceil(d),p=-new Date(+e).getTimezoneOffset()-h,y=h!==n,g=p-c;if(y&&g){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+g);const C=Ur(e.timeZone,e),O=C>0?Math.floor(C):Math.ceil(C),w=h-O;w&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+w),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+w))}}class Mt extends Fn{static tz(t,...n){return n.length?new Mt(...n,t):new Mt(Date.now(),t)}toISOString(){const[t,n,r]=this.tzComponents(),o=`${t}${n}:${r}`;return this.internal.toISOString().slice(0,-1)+o}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,n,r,o]=this.internal.toUTCString().split(" ");return`${t?.slice(0,-1)} ${r} ${n} ${o}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[n,r,o]=this.tzComponents();return`${t} GMT${n}${r}${o} (${_P(this.timeZone,this)})`}toLocaleString(t,n){return Date.prototype.toLocaleString.call(this,t,{...n,timeZone:n?.timeZone||this.timeZone})}toLocaleDateString(t,n){return Date.prototype.toLocaleDateString.call(this,t,{...n,timeZone:n?.timeZone||this.timeZone})}toLocaleTimeString(t,n){return Date.prototype.toLocaleTimeString.call(this,t,{...n,timeZone:n?.timeZone||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),n=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),o=String(Math.abs(t)%60).padStart(2,"0");return[n,r,o]}withTimeZone(t){return new Mt(+this,t)}[Symbol.for("constructDateFrom")](t){return new Mt(+new Date(t),this.timeZone)}}const lg=6048e5,OP=864e5,ug=Symbol.for("constructDateFrom");function wt(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&ug in e?e[ug](t):e instanceof Date?new e.constructor(t):new Date(t)}function Ke(e,t){return wt(t||e,e)}function fg(e,t,n){const r=Ke(e,n?.in);return isNaN(t)?wt(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function dg(e,t,n){const r=Ke(e,n?.in);if(isNaN(t))return wt(e,NaN);if(!t)return r;const o=r.getDate(),s=wt(e,r.getTime());s.setMonth(r.getMonth()+t+1,0);const i=s.getDate();return o>=i?s:(r.setFullYear(s.getFullYear(),s.getMonth(),o),r)}let EP={};function ns(){return EP}function bo(e,t){const n=ns(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Ke(e,t?.in),s=o.getDay(),i=(s<r?7:0)+s-r;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function rs(e,t){return bo(e,{...t,weekStartsOn:1})}function hg(e,t){const n=Ke(e,t?.in),r=n.getFullYear(),o=wt(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const s=rs(o),i=wt(n,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const a=rs(i);return n.getTime()>=s.getTime()?r+1:n.getTime()>=a.getTime()?r:r-1}function pg(e){const t=Ke(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function wo(e,...t){const n=wt.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function os(e,t){const n=Ke(e,t?.in);return n.setHours(0,0,0,0),n}function gl(e,t,n){const[r,o]=wo(n?.in,e,t),s=os(r),i=os(o),a=+s-pg(s),c=+i-pg(i);return Math.round((a-c)/OP)}function CP(e,t){const n=hg(e,t),r=wt(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),rs(r)}function TP(e,t,n){return fg(e,t*7,n)}function DP(e,t,n){return dg(e,t*12,n)}function AP(e,t){let n,r=t?.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=wt.bind(null,o));const s=Ke(o,r);(!n||n<s||isNaN(+s))&&(n=s)}),wt(r,n||NaN)}function MP(e,t){let n,r=t?.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=wt.bind(null,o));const s=Ke(o,r);(!n||n>s||isNaN(+s))&&(n=s)}),wt(r,n||NaN)}function PP(e,t,n){const[r,o]=wo(n?.in,e,t);return+os(r)==+os(o)}function mg(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function NP(e){return!(!mg(e)&&typeof e!="number"||isNaN(+Ke(e)))}function gg(e,t,n){const[r,o]=wo(n?.in,e,t),s=r.getFullYear()-o.getFullYear(),i=r.getMonth()-o.getMonth();return s*12+i}function IP(e,t){const n=Ke(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function yg(e,t){const[n,r]=wo(e,t.start,t.end);return{start:n,end:r}}function FP(e,t){const{start:n,end:r}=yg(t?.in,e);let o=+n>+r;const s=o?+n:+r,i=o?r:n;i.setHours(0,0,0,0),i.setDate(1);let a=1;const c=[];for(;+i<=s;)c.push(wt(n,i)),i.setMonth(i.getMonth()+a);return o?c.reverse():c}function RP(e,t){const n=Ke(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function WP(e,t){const n=Ke(e,t?.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function vg(e,t){const n=Ke(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function zP(e,t){const{start:n,end:r}=yg(t?.in,e);let o=+n>+r;const s=o?+n:+r,i=o?r:n;i.setHours(0,0,0,0),i.setMonth(0,1);let a=1;const c=[];for(;+i<=s;)c.push(wt(n,i)),i.setFullYear(i.getFullYear()+a);return o?c.reverse():c}function bg(e,t){const n=ns(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Ke(e,t?.in),s=o.getDay(),i=(s<r?-7:0)+6-(s-r);return o.setDate(o.getDate()+i),o.setHours(23,59,59,999),o}function LP(e,t){return bg(e,{...t,weekStartsOn:1})}const $P={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},UP=(e,t,n)=>{let r;const o=$P[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function yl(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const YP={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},jP={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},VP={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},BP={date:yl({formats:YP,defaultWidth:"full"}),time:yl({formats:jP,defaultWidth:"full"}),dateTime:yl({formats:VP,defaultWidth:"full"})},HP={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},ZP=(e,t,n,r)=>HP[e];function ss(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,a=n?.width?String(n.width):i;o=e.formattingValues[a]||e.formattingValues[i]}else{const i=e.defaultWidth,a=n?.width?String(n.width):e.defaultWidth;o=e.values[a]||e.values[i]}const s=e.argumentCallback?e.argumentCallback(t):t;return o[s]}}const GP={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},qP={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},KP={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},XP={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},JP={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},QP={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},eN={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:ss({values:GP,defaultWidth:"wide"}),quarter:ss({values:qP,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ss({values:KP,defaultWidth:"wide"}),day:ss({values:XP,defaultWidth:"wide"}),dayPeriod:ss({values:JP,defaultWidth:"wide",formattingValues:QP,defaultFormattingWidth:"wide"})};function is(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(o);if(!s)return null;const i=s[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(a)?nN(a,f=>f.test(i)):tN(a,f=>f.test(i));let u;u=e.valueCallback?e.valueCallback(c):c,u=n.valueCallback?n.valueCallback(u):u;const l=t.slice(i.length);return{value:u,rest:l}}}function tN(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function nN(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function rN(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],s=t.match(e.parsePattern);if(!s)return null;let i=e.valueCallback?e.valueCallback(s[0]):s[0];i=n.valueCallback?n.valueCallback(i):i;const a=t.slice(o.length);return{value:i,rest:a}}}const oN=/^(\d+)(th|st|nd|rd)?/i,sN=/\d+/i,iN={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},aN={any:[/^b/i,/^(a|c)/i]},cN={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},lN={any:[/1/i,/2/i,/3/i,/4/i]},uN={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},fN={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},dN={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},hN={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},pN={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},mN={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},gN={ordinalNumber:rN({matchPattern:oN,parsePattern:sN,valueCallback:e=>parseInt(e,10)}),era:is({matchPatterns:iN,defaultMatchWidth:"wide",parsePatterns:aN,defaultParseWidth:"any"}),quarter:is({matchPatterns:cN,defaultMatchWidth:"wide",parsePatterns:lN,defaultParseWidth:"any",valueCallback:e=>e+1}),month:is({matchPatterns:uN,defaultMatchWidth:"wide",parsePatterns:fN,defaultParseWidth:"any"}),day:is({matchPatterns:dN,defaultMatchWidth:"wide",parsePatterns:hN,defaultParseWidth:"any"}),dayPeriod:is({matchPatterns:pN,defaultMatchWidth:"any",parsePatterns:mN,defaultParseWidth:"any"})},_o={code:"en-US",formatDistance:UP,formatLong:BP,formatRelative:ZP,localize:eN,match:gN,options:{weekStartsOn:0,firstWeekContainsDate:1}};function yN(e,t){const n=Ke(e,t?.in);return gl(n,vg(n))+1}function vl(e,t){const n=Ke(e,t?.in),r=+rs(n)-+CP(n);return Math.round(r/lg)+1}function wg(e,t){const n=Ke(e,t?.in),r=n.getFullYear(),o=ns(),s=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,i=wt(t?.in||e,0);i.setFullYear(r+1,0,s),i.setHours(0,0,0,0);const a=bo(i,t),c=wt(t?.in||e,0);c.setFullYear(r,0,s),c.setHours(0,0,0,0);const u=bo(c,t);return+n>=+a?r+1:+n>=+u?r:r-1}function vN(e,t){const n=ns(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=wg(e,t),s=wt(t?.in||e,0);return s.setFullYear(o,0,r),s.setHours(0,0,0,0),bo(s,t)}function bl(e,t){const n=Ke(e,t?.in),r=+bo(n,t)-+vN(n,t);return Math.round(r/lg)+1}function Ze(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Sr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Ze(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Ze(n+1,2)},d(e,t){return Ze(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Ze(e.getHours()%12||12,t.length)},H(e,t){return Ze(e.getHours(),t.length)},m(e,t){return Ze(e.getMinutes(),t.length)},s(e,t){return Ze(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return Ze(o,t.length)}},So={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},_g={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return Sr.y(e,t)},Y:function(e,t,n,r){const o=wg(e,r),s=o>0?o:1-o;if(t==="YY"){const i=s%100;return Ze(i,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):Ze(s,t.length)},R:function(e,t){const n=hg(e);return Ze(n,t.length)},u:function(e,t){const n=e.getFullYear();return Ze(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Ze(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Ze(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Sr.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Ze(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=bl(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):Ze(o,t.length)},I:function(e,t,n){const r=vl(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Ze(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Sr.d(e,t)},D:function(e,t,n){const r=yN(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Ze(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return Ze(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return Ze(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return Ze(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=So.noon:r===0?o=So.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=So.evening:r>=12?o=So.afternoon:r>=4?o=So.morning:o=So.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Sr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Sr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Ze(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Ze(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Sr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Sr.s(e,t)},S:function(e,t){return Sr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return kg(r);case"XXXX":case"XX":return Yr(r);default:return Yr(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return kg(r);case"xxxx":case"xx":return Yr(r);default:return Yr(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Sg(r,":");default:return"GMT"+Yr(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Sg(r,":");default:return"GMT"+Yr(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Ze(r,t.length)},T:function(e,t,n){return Ze(+e,t.length)}};function Sg(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),s=r%60;return s===0?n+String(o):n+String(o)+t+Ze(s,2)}function kg(e,t){return e%60===0?(e>0?"-":"+")+Ze(Math.abs(e)/60,2):Yr(e,t)}function Yr(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Ze(Math.trunc(r/60),2),s=Ze(r%60,2);return n+o+t+s}const xg=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},Og=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},bN={p:Og,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return xg(e,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",xg(r,t)).replace("{{time}}",Og(o,t))}},wN=/^D+$/,_N=/^Y+$/,SN=["D","DD","YY","YYYY"];function kN(e){return wN.test(e)}function xN(e){return _N.test(e)}function ON(e,t,n){const r=EN(e,t,n);if(console.warn(r),SN.includes(e))throw new RangeError(r)}function EN(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const CN=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,TN=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,DN=/^'([^]*?)'?$/,AN=/''/g,MN=/[a-zA-Z]/;function as(e,t,n){const r=ns(),o=n?.locale??r.locale??_o,s=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,i=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=Ke(e,n?.in);if(!NP(a))throw new RangeError("Invalid time value");let c=t.match(TN).map(l=>{const f=l[0];if(f==="p"||f==="P"){const d=bN[f];return d(l,o.formatLong)}return l}).join("").match(CN).map(l=>{if(l==="''")return{isToken:!1,value:"'"};const f=l[0];if(f==="'")return{isToken:!1,value:PN(l)};if(_g[f])return{isToken:!0,value:l};if(f.match(MN))throw new RangeError("Format string contains an unescaped latin alphabet character `"+f+"`");return{isToken:!1,value:l}});o.localize.preprocessor&&(c=o.localize.preprocessor(a,c));const u={firstWeekContainsDate:s,weekStartsOn:i,locale:o};return c.map(l=>{if(!l.isToken)return l.value;const f=l.value;(!n?.useAdditionalWeekYearTokens&&xN(f)||!n?.useAdditionalDayOfYearTokens&&kN(f))&&ON(f,t,String(e));const d=_g[f[0]];return d(a,f,o.localize,u)}).join("")}function PN(e){const t=e.match(DN);return t?t[1].replace(AN,"'"):e}function NN(e,t){const n=Ke(e,t?.in),r=n.getFullYear(),o=n.getMonth(),s=wt(n,0);return s.setFullYear(r,o+1,0),s.setHours(0,0,0,0),s.getDate()}function IN(e,t){return Ke(e,t?.in).getMonth()}function FN(e,t){return Ke(e,t?.in).getFullYear()}function RN(e,t){return+Ke(e)>+Ke(t)}function WN(e,t){return+Ke(e)<+Ke(t)}function zN(e,t,n){const[r,o]=wo(n?.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function LN(e,t,n){const[r,o]=wo(n?.in,e,t);return r.getFullYear()===o.getFullYear()}function $N(e,t,n){const r=Ke(e,n?.in),o=r.getFullYear(),s=r.getDate(),i=wt(e,0);i.setFullYear(o,t,15),i.setHours(0,0,0,0);const a=NN(i);return r.setMonth(t,Math.min(s,a)),r}function UN(e,t,n){const r=Ke(e,n?.in);return isNaN(+r)?wt(e,NaN):(r.setFullYear(t),r)}const Eg=5,YN=4;function jN(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,-r+1),s=t.addDays(o,Eg*7-1);return t.getMonth(e)===t.getMonth(s)?Eg:YN}function Cg(e,t){const n=t.startOfMonth(e),r=n.getDay();return r===1?n:r===0?t.addDays(n,-6):t.addDays(n,-1*(r-1))}function VN(e,t){const n=Cg(e,t),r=jN(e,t);return t.addDays(n,r*7-1)}const Tg={..._o,labels:{labelDayButton:(e,t,n,r)=>{let o;r&&typeof r.format=="function"?o=r.format.bind(r):o=(i,a)=>as(i,a,{locale:_o,...n});let s=o(e,"PPPP");return t.today&&(s=`Today, ${s}`),t.selected&&(s=`${s}, selected`),s},labelMonthDropdown:"Choose the Month",labelNext:"Go to the Next Month",labelPrevious:"Go to the Previous Month",labelWeekNumber:e=>`Week ${e}`,labelYearDropdown:"Choose the Year",labelGrid:(e,t,n)=>{let r;return n&&typeof n.format=="function"?r=n.format.bind(n):r=(o,s)=>as(o,s,{locale:_o,...t}),r(e,"LLLL yyyy")},labelGridcell:(e,t,n,r)=>{let o;r&&typeof r.format=="function"?o=r.format.bind(r):o=(i,a)=>as(i,a,{locale:_o,...n});let s=o(e,"PPPP");return t?.today&&(s=`Today, ${s}`),s},labelNav:"Navigation bar",labelWeekNumberHeader:"Week Number",labelWeekday:(e,t,n)=>{let r;return n&&typeof n.format=="function"?r=n.format.bind(n):r=(o,s)=>as(o,s,{locale:_o,...t}),r(e,"cccc")}}};class Kt{constructor(t,n){this.Date=Date,this.today=()=>this.overrides?.today?this.overrides.today():this.options.timeZone?Mt.tz(this.options.timeZone):new this.Date,this.newDate=(r,o,s)=>this.overrides?.newDate?this.overrides.newDate(r,o,s):this.options.timeZone?new Mt(r,o,s,this.options.timeZone):new Date(r,o,s),this.addDays=(r,o)=>this.overrides?.addDays?this.overrides.addDays(r,o):fg(r,o),this.addMonths=(r,o)=>this.overrides?.addMonths?this.overrides.addMonths(r,o):dg(r,o),this.addWeeks=(r,o)=>this.overrides?.addWeeks?this.overrides.addWeeks(r,o):TP(r,o),this.addYears=(r,o)=>this.overrides?.addYears?this.overrides.addYears(r,o):DP(r,o),this.differenceInCalendarDays=(r,o)=>this.overrides?.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,o):gl(r,o),this.differenceInCalendarMonths=(r,o)=>this.overrides?.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,o):gg(r,o),this.eachMonthOfInterval=r=>this.overrides?.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):FP(r),this.eachYearOfInterval=r=>{const o=this.overrides?.eachYearOfInterval?this.overrides.eachYearOfInterval(r):zP(r),s=new Set(o.map(a=>this.getYear(a)));if(s.size===o.length)return o;const i=[];return s.forEach(a=>{i.push(new Date(a,0,1))}),i},this.endOfBroadcastWeek=r=>this.overrides?.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):VN(r,this),this.endOfISOWeek=r=>this.overrides?.endOfISOWeek?this.overrides.endOfISOWeek(r):LP(r),this.endOfMonth=r=>this.overrides?.endOfMonth?this.overrides.endOfMonth(r):IP(r),this.endOfWeek=(r,o)=>this.overrides?.endOfWeek?this.overrides.endOfWeek(r,o):bg(r,this.options),this.endOfYear=r=>this.overrides?.endOfYear?this.overrides.endOfYear(r):WP(r),this.format=(r,o,s)=>{const i=this.overrides?.format?this.overrides.format(r,o,this.options):as(r,o,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(i):i},this.getISOWeek=r=>this.overrides?.getISOWeek?this.overrides.getISOWeek(r):vl(r),this.getMonth=(r,o)=>this.overrides?.getMonth?this.overrides.getMonth(r,this.options):IN(r,this.options),this.getYear=(r,o)=>this.overrides?.getYear?this.overrides.getYear(r,this.options):FN(r,this.options),this.getWeek=(r,o)=>this.overrides?.getWeek?this.overrides.getWeek(r,this.options):bl(r,this.options),this.isAfter=(r,o)=>this.overrides?.isAfter?this.overrides.isAfter(r,o):RN(r,o),this.isBefore=(r,o)=>this.overrides?.isBefore?this.overrides.isBefore(r,o):WN(r,o),this.isDate=r=>this.overrides?.isDate?this.overrides.isDate(r):mg(r),this.isSameDay=(r,o)=>this.overrides?.isSameDay?this.overrides.isSameDay(r,o):PP(r,o),this.isSameMonth=(r,o)=>this.overrides?.isSameMonth?this.overrides.isSameMonth(r,o):zN(r,o),this.isSameYear=(r,o)=>this.overrides?.isSameYear?this.overrides.isSameYear(r,o):LN(r,o),this.max=r=>this.overrides?.max?this.overrides.max(r):AP(r),this.min=r=>this.overrides?.min?this.overrides.min(r):MP(r),this.setMonth=(r,o)=>this.overrides?.setMonth?this.overrides.setMonth(r,o):$N(r,o),this.setYear=(r,o)=>this.overrides?.setYear?this.overrides.setYear(r,o):UN(r,o),this.startOfBroadcastWeek=(r,o)=>this.overrides?.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):Cg(r,this),this.startOfDay=r=>this.overrides?.startOfDay?this.overrides.startOfDay(r):os(r),this.startOfISOWeek=r=>this.overrides?.startOfISOWeek?this.overrides.startOfISOWeek(r):rs(r),this.startOfMonth=r=>this.overrides?.startOfMonth?this.overrides.startOfMonth(r):RP(r),this.startOfWeek=(r,o)=>this.overrides?.startOfWeek?this.overrides.startOfWeek(r,this.options):bo(r,this.options),this.startOfYear=r=>this.overrides?.startOfYear?this.overrides.startOfYear(r):vg(r),this.options={locale:Tg,...t},this.overrides=n}getDigitMap(){const{numerals:t="latn"}=this.options,n=new Intl.NumberFormat("en-US",{numberingSystem:t}),r={};for(let o=0;o<10;o++)r[o.toString()]=n.format(o);return r}replaceDigits(t){const n=this.getDigitMap();return t.replace(/\d/g,r=>n[r]||r)}formatNumber(t){return this.replaceDigits(t.toString())}getMonthYearOrder(){const t=this.options.locale?.code;return t&&Kt.yearFirstLocales.has(t)?"year-first":"month-first"}formatMonthYear(t){const{locale:n,timeZone:r,numerals:o}=this.options,s=n?.code;if(s&&Kt.yearFirstLocales.has(s))try{return new Intl.DateTimeFormat(s,{month:"long",year:"numeric",timeZone:r,numberingSystem:o}).format(t)}catch{}const i=this.getMonthYearOrder()==="year-first"?"y LLLL":"LLLL y";return this.format(t,i)}}Kt.yearFirstLocales=new Set(["eu","hu","ja","ja-Hira","ja-JP","ko","ko-KR","lt","lt-LT","lv","lv-LV","mn","mn-MN","zh","zh-CN","zh-HK","zh-TW"]);const Rn=new Kt;class Dg{constructor(t,n,r=Rn){this.date=t,this.displayMonth=n,this.outside=!!(n&&!r.isSameMonth(t,n)),this.dateLib=r,this.isoDate=r.format(t,"yyyy-MM-dd"),this.displayMonthId=r.format(n,"yyyy-MM"),this.dateMonthId=r.format(t,"yyyy-MM")}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class BN{constructor(t,n){this.date=t,this.weeks=n}}class HN{constructor(t,n){this.days=n,this.weekNumber=t}}function ZN(e){return j.createElement("button",{...e})}function GN(e){return j.createElement("span",{...e})}function qN(e){const{size:t=24,orientation:n="left",className:r}=e;return j.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&j.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&j.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&j.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&j.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function KN(e){const{day:t,modifiers:n,...r}=e;return j.createElement("td",{...r})}function XN(e){const{day:t,modifiers:n,...r}=e,o=j.useRef(null);return j.useEffect(()=>{n.focused&&o.current?.focus()},[n.focused]),j.createElement("button",{ref:o,...r})}var me;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(me||(me={}));var ft;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(ft||(ft={}));var bn;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(bn||(bn={}));var Xt;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})(Xt||(Xt={}));function JN(e){const{options:t,className:n,components:r,classNames:o,...s}=e,i=[o[me.Dropdown],n].join(" "),a=t?.find(({value:c})=>c===s.value);return j.createElement("span",{"data-disabled":s.disabled,className:o[me.DropdownRoot]},j.createElement(r.Select,{className:i,...s},t?.map(({value:c,label:u,disabled:l})=>j.createElement(r.Option,{key:c,value:c,disabled:l},u))),j.createElement("span",{className:o[me.CaptionLabel],"aria-hidden":!0},a?.label,j.createElement(r.Chevron,{orientation:"down",size:18,className:o[me.Chevron]})))}function QN(e){return j.createElement("div",{...e})}function e2(e){return j.createElement("div",{...e})}function t2(e){const{calendarMonth:t,displayIndex:n,...r}=e;return j.createElement("div",{...r},e.children)}function n2(e){const{calendarMonth:t,displayIndex:n,...r}=e;return j.createElement("div",{...r})}function r2(e){return j.createElement("table",{...e})}function o2(e){return j.createElement("div",{...e})}const Ag=j.createContext(void 0);function cs(){const e=j.useContext(Ag);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function s2(e){const{components:t}=cs();return j.createElement(t.Dropdown,{...e})}function i2(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...s}=e,{components:i,classNames:a,labels:{labelPrevious:c,labelNext:u}}=cs(),l=j.useCallback(d=>{o&&n?.(d)},[o,n]),f=j.useCallback(d=>{r&&t?.(d)},[r,t]);return j.createElement("nav",{...s},j.createElement(i.PreviousMonthButton,{type:"button",className:a[me.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":c(r),onClick:f},j.createElement(i.Chevron,{disabled:r?void 0:!0,className:a[me.Chevron],orientation:"left"})),j.createElement(i.NextMonthButton,{type:"button",className:a[me.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":o?void 0:!0,"aria-label":u(o),onClick:l},j.createElement(i.Chevron,{disabled:o?void 0:!0,orientation:"right",className:a[me.Chevron]})))}function a2(e){const{components:t}=cs();return j.createElement(t.Button,{...e})}function c2(e){return j.createElement("option",{...e})}function l2(e){const{components:t}=cs();return j.createElement(t.Button,{...e})}function u2(e){const{rootRef:t,...n}=e;return j.createElement("div",{...n,ref:t})}function f2(e){return j.createElement("select",{...e})}function d2(e){const{week:t,...n}=e;return j.createElement("tr",{...n})}function h2(e){return j.createElement("th",{...e})}function p2(e){return j.createElement("thead",{"aria-hidden":!0},j.createElement("tr",{...e}))}function m2(e){const{week:t,...n}=e;return j.createElement("th",{...n})}function g2(e){return j.createElement("th",{...e})}function y2(e){return j.createElement("tbody",{...e})}function v2(e){const{components:t}=cs();return j.createElement(t.Dropdown,{...e})}const b2=Object.freeze(Object.defineProperty({__proto__:null,Button:ZN,CaptionLabel:GN,Chevron:qN,Day:KN,DayButton:XN,Dropdown:JN,DropdownNav:QN,Footer:e2,Month:t2,MonthCaption:n2,MonthGrid:r2,Months:o2,MonthsDropdown:s2,Nav:i2,NextMonthButton:a2,Option:c2,PreviousMonthButton:l2,Root:u2,Select:f2,Week:d2,WeekNumber:m2,WeekNumberHeader:g2,Weekday:h2,Weekdays:p2,Weeks:y2,YearsDropdown:v2},Symbol.toStringTag,{value:"Module"}));function Qn(e,t,n=!1,r=Rn){let{from:o,to:s}=e;const{differenceInCalendarDays:i,isSameDay:a}=r;return o&&s?(i(s,o)<0&&([o,s]=[s,o]),i(t,o)>=(n?1:0)&&i(s,t)>=(n?1:0)):!n&&s?a(s,t):!n&&o?a(o,t):!1}function wl(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function Bi(e){return!!(e&&typeof e=="object"&&"from"in e)}function _l(e){return!!(e&&typeof e=="object"&&"after"in e)}function Sl(e){return!!(e&&typeof e=="object"&&"before"in e)}function Mg(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function Pg(e,t){return Array.isArray(e)&&e.every(t.isDate)}function er(e,t,n=Rn){const r=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:s,isAfter:i}=n;return r.some(a=>{if(typeof a=="boolean")return a;if(n.isDate(a))return o(e,a);if(Pg(a,n))return a.some(c=>o(e,c));if(Bi(a))return Qn(a,e,!1,n);if(Mg(a))return Array.isArray(a.dayOfWeek)?a.dayOfWeek.includes(e.getDay()):a.dayOfWeek===e.getDay();if(wl(a)){const c=s(a.before,e),u=s(a.after,e),l=c>0,f=u<0;return i(a.before,a.after)?f&&l:l||f}return _l(a)?s(e,a.after)>0:Sl(a)?s(a.before,e)>0:typeof a=="function"?a(e):!1})}function w2(e,t,n,r,o){const{disabled:s,hidden:i,modifiers:a,showOutsideDays:c,broadcastCalendar:u,today:l=o.today()}=t,{isSameDay:f,isSameMonth:d,startOfMonth:h,isBefore:m,endOfMonth:p,isAfter:y}=o,g=n&&h(n),C=r&&p(r),O={[ft.focused]:[],[ft.outside]:[],[ft.disabled]:[],[ft.hidden]:[],[ft.today]:[]},w={};for(const _ of e){const{date:S,displayMonth:I}=_,v=!!(I&&!d(S,I)),x=!!(g&&m(S,g)),P=!!(C&&y(S,C)),A=!!(s&&er(S,s,o)),M=!!(i&&er(S,i,o))||x||P||!u&&!c&&v||u&&c===!1&&v,F=f(S,l);v&&O.outside.push(_),A&&O.disabled.push(_),M&&O.hidden.push(_),F&&O.today.push(_),a&&Object.keys(a).forEach(N=>{const W=a?.[N];W&&er(S,W,o)&&(w[N]?w[N].push(_):w[N]=[_])})}return _=>{const S={[ft.focused]:!1,[ft.disabled]:!1,[ft.hidden]:!1,[ft.outside]:!1,[ft.today]:!1},I={};for(const v in O){const x=O[v];S[v]=x.some(P=>P===_)}for(const v in w)I[v]=w[v].some(x=>x===_);return{...S,...I}}}function _2(e,t,n={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[s])=>(n[s]?o.push(n[s]):t[ft[s]]?o.push(t[ft[s]]):t[bn[s]]&&o.push(t[bn[s]]),o),[t[me.Day]])}function S2(e){return{...b2,...e}}function k2(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([n,r])=>{n.startsWith("data-")&&(t[n]=r)}),t}function kl(){const e={};for(const t in me)e[me[t]]=`rdp-${me[t]}`;for(const t in ft)e[ft[t]]=`rdp-${ft[t]}`;for(const t in bn)e[bn[t]]=`rdp-${bn[t]}`;for(const t in Xt)e[Xt[t]]=`rdp-${Xt[t]}`;return e}function Ng(e,t,n){return(n??new Kt(t)).formatMonthYear(e)}const x2=Ng;function O2(e,t,n){return(n??new Kt(t)).format(e,"d")}function E2(e,t=Rn){return t.format(e,"LLLL")}function C2(e,t,n){return(n??new Kt(t)).format(e,"cccccc")}function T2(e,t=Rn){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function D2(){return""}function Ig(e,t=Rn){return t.format(e,"yyyy")}const A2=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:Ng,formatDay:O2,formatMonthCaption:x2,formatMonthDropdown:E2,formatWeekNumber:T2,formatWeekNumberHeader:D2,formatWeekdayName:C2,formatYearCaption:Ig,formatYearDropdown:Ig},Symbol.toStringTag,{value:"Module"}));function M2(e){return e?.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e?.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...A2,...e}}function xl(e,t,n,r){let o=(r??new Kt(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const P2=xl;function Ol(e,t,n){return(n??new Kt(t)).formatMonthYear(e)}const N2=Ol;function Fg(e,t,n,r){let o=(r??new Kt(n)).format(e,"PPPP");return t?.today&&(o=`Today, ${o}`),o}function Rg(e){return"Choose the Month"}function Wg(){return""}const I2="Go to the Next Month";function zg(e,t){return I2}function Lg(e){return"Go to the Previous Month"}function $g(e,t,n){return(n??new Kt(t)).format(e,"cccc")}function Ug(e,t){return`Week ${e}`}function Yg(e){return"Week Number"}function jg(e){return"Choose the Year"}const F2=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:N2,labelDay:P2,labelDayButton:xl,labelGrid:Ol,labelGridcell:Fg,labelMonthDropdown:Rg,labelNav:Wg,labelNext:zg,labelPrevious:Lg,labelWeekNumber:Ug,labelWeekNumberHeader:Yg,labelWeekday:$g,labelYearDropdown:jg},Symbol.toStringTag,{value:"Module"})),wn=(e,t,n)=>t||(n?typeof n=="function"?n:(...r)=>n:e);function R2(e,t){const n=t.locale?.labels??{};return{...F2,...e??{},labelDayButton:wn(xl,e?.labelDayButton,n.labelDayButton),labelMonthDropdown:wn(Rg,e?.labelMonthDropdown,n.labelMonthDropdown),labelNext:wn(zg,e?.labelNext,n.labelNext),labelPrevious:wn(Lg,e?.labelPrevious,n.labelPrevious),labelWeekNumber:wn(Ug,e?.labelWeekNumber,n.labelWeekNumber),labelYearDropdown:wn(jg,e?.labelYearDropdown,n.labelYearDropdown),labelGrid:wn(Ol,e?.labelGrid,n.labelGrid),labelGridcell:wn(Fg,e?.labelGridcell,n.labelGridcell),labelNav:wn(Wg,e?.labelNav,n.labelNav),labelWeekNumberHeader:wn(Yg,e?.labelWeekNumberHeader,n.labelWeekNumberHeader),labelWeekday:wn($g,e?.labelWeekday,n.labelWeekday)}}function W2(e,t,n,r,o){const{startOfMonth:s,startOfYear:i,endOfYear:a,eachMonthOfInterval:c,getMonth:u}=o;return c({start:i(e),end:a(e)}).map(d=>{const h=r.formatMonthDropdown(d,o),m=u(d),p=t&&d<s(t)||n&&d>s(n)||!1;return{value:m,label:h,disabled:p}})}function z2(e,t={},n={}){let r={...t?.[me.Day]};return Object.entries(e).filter(([,o])=>o===!0).forEach(([o])=>{r={...r,...n?.[o]}}),r}function L2(e,t,n,r){const o=r??e.today(),s=n?e.startOfBroadcastWeek(o,e):t?e.startOfISOWeek(o):e.startOfWeek(o),i=[];for(let a=0;a<7;a++){const c=e.addDays(s,a);i.push(c)}return i}function $2(e,t,n,r,o=!1){if(!e||!t)return;const{startOfYear:s,endOfYear:i,eachYearOfInterval:a,getYear:c}=r,u=s(e),l=i(t),f=a({start:u,end:l});return o&&f.reverse(),f.map(d=>{const h=n.formatYearDropdown(d,r);return{value:c(d),label:h,disabled:!1}})}function U2(e,t={}){const{weekStartsOn:n,locale:r}=t,o=n??r?.options?.weekStartsOn??0,s=a=>{const c=typeof a=="number"||typeof a=="string"?new Date(a):a;return new Mt(c.getFullYear(),c.getMonth(),c.getDate(),12,0,0,e)},i=a=>{const c=s(a);return new Date(c.getFullYear(),c.getMonth(),c.getDate(),0,0,0,0)};return{today:()=>s(Mt.tz(e)),newDate:(a,c,u)=>new Mt(a,c,u,12,0,0,e),startOfDay:a=>s(a),startOfWeek:(a,c)=>{const u=s(a),l=c?.weekStartsOn??o,f=(u.getDay()-l+7)%7;return u.setDate(u.getDate()-f),u},startOfISOWeek:a=>{const c=s(a),u=(c.getDay()-1+7)%7;return c.setDate(c.getDate()-u),c},startOfMonth:a=>{const c=s(a);return c.setDate(1),c},startOfYear:a=>{const c=s(a);return c.setMonth(0,1),c},endOfWeek:(a,c)=>{const u=s(a),d=(((c?.weekStartsOn??o)+6)%7-u.getDay()+7)%7;return u.setDate(u.getDate()+d),u},endOfISOWeek:a=>{const c=s(a),u=(7-c.getDay())%7;return c.setDate(c.getDate()+u),c},endOfMonth:a=>{const c=s(a);return c.setMonth(c.getMonth()+1,0),c},endOfYear:a=>{const c=s(a);return c.setMonth(11,31),c},eachMonthOfInterval:a=>{const c=s(a.start),u=s(a.end),l=[],f=new Mt(c.getFullYear(),c.getMonth(),1,12,0,0,e),d=u.getFullYear()*12+u.getMonth();for(;f.getFullYear()*12+f.getMonth()<=d;)l.push(new Mt(f,e)),f.setMonth(f.getMonth()+1,1);return l},addDays:(a,c)=>{const u=s(a);return u.setDate(u.getDate()+c),u},addWeeks:(a,c)=>{const u=s(a);return u.setDate(u.getDate()+c*7),u},addMonths:(a,c)=>{const u=s(a);return u.setMonth(u.getMonth()+c),u},addYears:(a,c)=>{const u=s(a);return u.setFullYear(u.getFullYear()+c),u},eachYearOfInterval:a=>{const c=s(a.start),u=s(a.end),l=[],f=new Mt(c.getFullYear(),0,1,12,0,0,e);for(;f.getFullYear()<=u.getFullYear();)l.push(new Mt(f,e)),f.setFullYear(f.getFullYear()+1,0,1);return l},getWeek:(a,c)=>{const u=i(a);return bl(u,{weekStartsOn:c?.weekStartsOn??o,firstWeekContainsDate:c?.firstWeekContainsDate??r?.options?.firstWeekContainsDate??1})},getISOWeek:a=>{const c=i(a);return vl(c)},differenceInCalendarDays:(a,c)=>{const u=i(a),l=i(c);return gl(u,l)},differenceInCalendarMonths:(a,c)=>{const u=i(a),l=i(c);return gg(u,l)}}}const ls=e=>e instanceof HTMLElement?e:null,El=e=>[...e.querySelectorAll("[data-animated-month]")??[]],Y2=e=>ls(e.querySelector("[data-animated-month]")),Cl=e=>ls(e.querySelector("[data-animated-caption]")),Tl=e=>ls(e.querySelector("[data-animated-weeks]")),j2=e=>ls(e.querySelector("[data-animated-nav]")),V2=e=>ls(e.querySelector("[data-animated-weekdays]"));function B2(e,t,{classNames:n,months:r,focused:o,dateLib:s}){const i=j.useRef(null),a=j.useRef(r),c=j.useRef(!1);j.useLayoutEffect(()=>{const u=a.current;if(a.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||u.length===0||r.length!==u.length)return;const l=s.isSameMonth(r[0].date,u[0].date),f=s.isAfter(r[0].date,u[0].date),d=f?n[Xt.caption_after_enter]:n[Xt.caption_before_enter],h=f?n[Xt.weeks_after_enter]:n[Xt.weeks_before_enter],m=i.current,p=e.current.cloneNode(!0);if(p instanceof HTMLElement?(El(p).forEach(O=>{if(!(O instanceof HTMLElement))return;const w=Y2(O);w&&O.contains(w)&&O.removeChild(w);const _=Cl(O);_&&_.classList.remove(d);const S=Tl(O);S&&S.classList.remove(h)}),i.current=p):i.current=null,c.current||l||o)return;const y=m instanceof HTMLElement?El(m):[],g=El(e.current);if(g?.every(C=>C instanceof HTMLElement)&&y&&y.every(C=>C instanceof HTMLElement)){c.current=!0,e.current.style.isolation="isolate";const C=j2(e.current);C&&(C.style.zIndex="1"),g.forEach((O,w)=>{const _=y[w];if(!_)return;O.style.position="relative",O.style.overflow="hidden";const S=Cl(O);S&&S.classList.add(d);const I=Tl(O);I&&I.classList.add(h);const v=()=>{c.current=!1,e.current&&(e.current.style.isolation=""),C&&(C.style.zIndex=""),S&&S.classList.remove(d),I&&I.classList.remove(h),O.style.position="",O.style.overflow="",O.contains(_)&&O.removeChild(_)};_.style.pointerEvents="none",_.style.position="absolute",_.style.overflow="hidden",_.setAttribute("aria-hidden","true");const x=V2(_);x&&(x.style.opacity="0");const P=Cl(_);P&&(P.classList.add(f?n[Xt.caption_before_exit]:n[Xt.caption_after_exit]),P.addEventListener("animationend",v));const A=Tl(_);A&&A.classList.add(f?n[Xt.weeks_before_exit]:n[Xt.weeks_after_exit]),O.insertBefore(_,O.firstChild)})}})}function H2(e,t,n,r){const o=e[0],s=e[e.length-1],{ISOWeek:i,fixedWeeks:a,broadcastCalendar:c}=n??{},{addDays:u,differenceInCalendarDays:l,differenceInCalendarMonths:f,endOfBroadcastWeek:d,endOfISOWeek:h,endOfMonth:m,endOfWeek:p,isAfter:y,startOfBroadcastWeek:g,startOfISOWeek:C,startOfWeek:O}=r,w=c?g(o,r):i?C(o):O(o),_=c?d(s):i?h(m(s)):p(m(s)),S=t&&(c?d(t):i?h(t):p(t)),I=S&&y(_,S)?S:_,v=l(I,w),x=f(s,o)+1,P=[];for(let F=0;F<=v;F++){const N=u(w,F);P.push(N)}const M=(c?35:42)*x;if(a&&P.length<M){const F=M-P.length;for(let N=0;N<F;N++){const W=u(P[P.length-1],1);P.push(W)}}return P}function Z2(e){const t=[];return e.reduce((n,r)=>{const o=r.weeks.reduce((s,i)=>s.concat(i.days.slice()),t.slice());return n.concat(o.slice())},t.slice())}function G2(e,t,n,r){const{numberOfMonths:o=1}=n,s=[];for(let i=0;i<o;i++){const a=r.addMonths(e,i);if(t&&a>t)break;s.push(a)}return s}function Vg(e,t,n,r){const{month:o,defaultMonth:s,today:i=r.today(),numberOfMonths:a=1}=e;let c=o||s||i;const{differenceInCalendarMonths:u,addMonths:l,startOfMonth:f}=r;if(n&&u(n,c)<a-1){const d=-1*(a-1);c=l(n,d)}return t&&u(c,t)<0&&(c=t),f(c)}function q2(e,t,n,r){const{addDays:o,endOfBroadcastWeek:s,endOfISOWeek:i,endOfMonth:a,endOfWeek:c,getISOWeek:u,getWeek:l,startOfBroadcastWeek:f,startOfISOWeek:d,startOfWeek:h}=r,m=e.reduce((p,y)=>{const g=n.broadcastCalendar?f(y,r):n.ISOWeek?d(y):h(y),C=n.broadcastCalendar?s(y):n.ISOWeek?i(a(y)):c(a(y)),O=t.filter(I=>I>=g&&I<=C),w=n.broadcastCalendar?35:42;if(n.fixedWeeks&&O.length<w){const I=t.filter(v=>{const x=w-O.length;return v>C&&v<=o(C,x)});O.push(...I)}const _=O.reduce((I,v)=>{const x=n.ISOWeek?u(v):l(v),P=I.find(M=>M.weekNumber===x),A=new Dg(v,y,r);return P?P.days.push(A):I.push(new HN(x,[A])),I},[]),S=new BN(y,_);return p.push(S),p},[]);return n.reverseMonths?m.reverse():m}function K2(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:s,startOfMonth:i,endOfMonth:a,addYears:c,endOfYear:u,newDate:l,today:f}=t,{fromYear:d,toYear:h,fromMonth:m,toMonth:p}=e;!n&&m&&(n=m),!n&&d&&(n=t.newDate(d,0,1)),!r&&p&&(r=p),!r&&h&&(r=l(h,11,31));const y=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=i(n):d?n=l(d,0,1):!n&&y&&(n=o(c(e.today??f(),-100))),r?r=a(r):h?r=l(h,11,31):!r&&y&&(r=u(e.today??f())),[n&&s(n),r&&s(r)]}function X2(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:s=1}=n,{startOfMonth:i,addMonths:a,differenceInCalendarMonths:c}=r,u=o?s:1,l=i(e);if(!t)return a(l,u);if(!(c(t,e)<s))return a(l,u)}function J2(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:s}=n,{startOfMonth:i,addMonths:a,differenceInCalendarMonths:c}=r,u=o?s??1:1,l=i(e);if(!t)return a(l,-u);if(!(c(l,t)<=0))return a(l,-u)}function Q2(e){const t=[];return e.reduce((n,r)=>n.concat(r.weeks.slice()),t.slice())}function Hi(e,t){const[n,r]=j.useState(e);return[t===void 0?n:t,r]}function eI(e,t){const[n,r]=K2(e,t),{startOfMonth:o,endOfMonth:s}=t,i=Vg(e,n,r,t),[a,c]=Hi(i,e.month?i:void 0);j.useEffect(()=>{const w=Vg(e,n,r,t);c(w)},[e.timeZone]);const{months:u,weeks:l,days:f,previousMonth:d,nextMonth:h}=j.useMemo(()=>{const w=G2(a,r,{numberOfMonths:e.numberOfMonths},t),_=H2(w,e.endMonth?s(e.endMonth):void 0,{ISOWeek:e.ISOWeek,fixedWeeks:e.fixedWeeks,broadcastCalendar:e.broadcastCalendar},t),S=q2(w,_,{broadcastCalendar:e.broadcastCalendar,fixedWeeks:e.fixedWeeks,ISOWeek:e.ISOWeek,reverseMonths:e.reverseMonths},t),I=Q2(S),v=Z2(S),x=J2(a,n,e,t),P=X2(a,r,e,t);return{months:S,weeks:I,days:v,previousMonth:x,nextMonth:P}},[t,a.getTime(),r?.getTime(),n?.getTime(),e.disableNavigation,e.broadcastCalendar,e.endMonth?.getTime(),e.fixedWeeks,e.ISOWeek,e.numberOfMonths,e.pagedNavigation,e.reverseMonths]),{disableNavigation:m,onMonthChange:p}=e,y=w=>l.some(_=>_.days.some(S=>S.isEqualTo(w))),g=w=>{if(m)return;let _=o(w);n&&_<o(n)&&(_=o(n)),r&&_>o(r)&&(_=o(r)),c(_),p?.(_)};return{months:u,weeks:l,days:f,navStart:n,navEnd:r,previousMonth:d,nextMonth:h,goToMonth:g,goToDay:w=>{y(w)||g(w.date)}}}var Wn;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(Wn||(Wn={}));function Bg(e){return!e[ft.disabled]&&!e[ft.hidden]&&!e[ft.outside]}function tI(e,t,n,r){let o,s=-1;for(const i of e){const a=t(i);Bg(a)&&(a[ft.focused]&&s<Wn.FocusedModifier?(o=i,s=Wn.FocusedModifier):r?.isEqualTo(i)&&s<Wn.LastFocused?(o=i,s=Wn.LastFocused):n(i.date)&&s<Wn.Selected?(o=i,s=Wn.Selected):a[ft.today]&&s<Wn.Today&&(o=i,s=Wn.Today))}return o||(o=e.find(i=>Bg(t(i)))),o}function nI(e,t,n,r,o,s,i){const{ISOWeek:a,broadcastCalendar:c}=s,{addDays:u,addMonths:l,addWeeks:f,addYears:d,endOfBroadcastWeek:h,endOfISOWeek:m,endOfWeek:p,max:y,min:g,startOfBroadcastWeek:C,startOfISOWeek:O,startOfWeek:w}=i;let S={day:u,week:f,month:l,year:d,startOfWeek:I=>c?C(I,i):a?O(I):w(I),endOfWeek:I=>c?h(I):a?m(I):p(I)}[e](n,t==="after"?1:-1);return t==="before"&&r?S=y([r,S]):t==="after"&&o&&(S=g([o,S])),S}function Hg(e,t,n,r,o,s,i,a=0){if(a>365)return;const c=nI(e,t,n.date,r,o,s,i),u=!!(s.disabled&&er(c,s.disabled,i)),l=!!(s.hidden&&er(c,s.hidden,i)),f=c,d=new Dg(c,f,i);return!u&&!l?d:Hg(e,t,d,r,o,s,i,a+1)}function rI(e,t,n,r,o){const{autoFocus:s}=e,[i,a]=j.useState(),c=tI(t.days,n,r||(()=>!1),i),[u,l]=j.useState(s?c:void 0);return{isFocusTarget:p=>!!c?.isEqualTo(p),setFocused:l,focused:u,blur:()=>{a(u),l(void 0)},moveFocus:(p,y)=>{if(!u)return;const g=Hg(p,y,u,t.navStart,t.navEnd,e,o);g&&(e.disableNavigation&&!t.days.some(O=>O.isEqualTo(g))||(t.goToDay(g),l(g)))}}}function oI(e,t){const{selected:n,required:r,onSelect:o}=e,[s,i]=Hi(n,o?n:void 0),a=o?n:s,{isSameDay:c}=t,u=h=>a?.some(m=>c(m,h))??!1,{min:l,max:f}=e;return{selected:a,select:(h,m,p)=>{let y=[...a??[]];if(u(h)){if(a?.length===l||r&&a?.length===1)return;y=a?.filter(g=>!c(g,h))}else a?.length===f?y=[h]:y=[...y,h];return o||i(y),o?.(y,h,m,p),y},isSelected:u}}function sI(e,t,n=0,r=0,o=!1,s=Rn){const{from:i,to:a}=t||{},{isSameDay:c,isAfter:u,isBefore:l}=s;let f;if(!i&&!a)f={from:e,to:n>0?void 0:e};else if(i&&!a)c(i,e)?n===0?f={from:i,to:e}:o?f={from:i,to:void 0}:f=void 0:l(e,i)?f={from:e,to:i}:f={from:i,to:e};else if(i&&a)if(c(i,e)&&c(a,e))o?f={from:i,to:a}:f=void 0;else if(c(i,e))f={from:i,to:n>0?void 0:e};else if(c(a,e))f={from:e,to:n>0?void 0:e};else if(l(e,i))f={from:e,to:a};else if(u(e,i))f={from:i,to:e};else if(u(e,a))f={from:i,to:e};else throw new Error("Invalid range");if(f?.from&&f?.to){const d=s.differenceInCalendarDays(f.to,f.from);r>0&&d>r?f={from:e,to:void 0}:n>1&&d<n&&(f={from:e,to:void 0})}return f}function iI(e,t,n=Rn){const r=Array.isArray(t)?t:[t];let o=e.from;const s=n.differenceInCalendarDays(e.to,e.from),i=Math.min(s,6);for(let a=0;a<=i;a++){if(r.includes(o.getDay()))return!0;o=n.addDays(o,1)}return!1}function Zg(e,t,n=Rn){return Qn(e,t.from,!1,n)||Qn(e,t.to,!1,n)||Qn(t,e.from,!1,n)||Qn(t,e.to,!1,n)}function aI(e,t,n=Rn){const r=Array.isArray(t)?t:[t];if(r.filter(a=>typeof a!="function").some(a=>typeof a=="boolean"?a:n.isDate(a)?Qn(e,a,!1,n):Pg(a,n)?a.some(c=>Qn(e,c,!1,n)):Bi(a)?a.from&&a.to?Zg(e,{from:a.from,to:a.to},n):!1:Mg(a)?iI(e,a.dayOfWeek,n):wl(a)?n.isAfter(a.before,a.after)?Zg(e,{from:n.addDays(a.after,1),to:n.addDays(a.before,-1)},n):er(e.from,a,n)||er(e.to,a,n):_l(a)||Sl(a)?er(e.from,a,n)||er(e.to,a,n):!1))return!0;const i=r.filter(a=>typeof a=="function");if(i.length){let a=e.from;const c=n.differenceInCalendarDays(e.to,e.from);for(let u=0;u<=c;u++){if(i.some(l=>l(a)))return!0;a=n.addDays(a,1)}}return!1}function cI(e,t){const{disabled:n,excludeDisabled:r,selected:o,required:s,onSelect:i}=e,[a,c]=Hi(o,i?o:void 0),u=i?o:a;return{selected:u,select:(d,h,m)=>{const{min:p,max:y}=e,g=d?sI(d,u,p,y,s,t):void 0;return r&&n&&g?.from&&g.to&&aI({from:g.from,to:g.to},n,t)&&(g.from=d,g.to=void 0),i||c(g),i?.(g,d,h,m),g},isSelected:d=>u&&Qn(u,d,!1,t)}}function lI(e,t){const{selected:n,required:r,onSelect:o}=e,[s,i]=Hi(n,o?n:void 0),a=o?n:s,{isSameDay:c}=t;return{selected:a,select:(f,d,h)=>{let m=f;return!r&&a&&a&&c(f,a)&&(m=void 0),o||i(m),o?.(m,f,d,h),m},isSelected:f=>a?c(a,f):!1}}function uI(e,t){const n=lI(e,t),r=oI(e,t),o=cI(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function an(e,t){return e instanceof Mt&&e.timeZone===t?e:new Mt(e,t)}function ko(e,t,n){return an(e,t)}function Gg(e,t,n){return typeof e=="boolean"||typeof e=="function"?e:e instanceof Date?ko(e,t):Array.isArray(e)?e.map(r=>r instanceof Date?ko(r,t):r):Bi(e)?{...e,from:e.from?an(e.from,t):e.from,to:e.to?an(e.to,t):e.to}:wl(e)?{before:ko(e.before,t),after:ko(e.after,t)}:_l(e)?{after:ko(e.after,t)}:Sl(e)?{before:ko(e.before,t)}:e}function Dl(e,t,n){return e&&(Array.isArray(e)?e.map(r=>Gg(r,t)):Gg(e,t))}function fI(e){let t=e;const n=t.timeZone;if(n&&(t={...e,timeZone:n},t.today&&(t.today=an(t.today,n)),t.month&&(t.month=an(t.month,n)),t.defaultMonth&&(t.defaultMonth=an(t.defaultMonth,n)),t.startMonth&&(t.startMonth=an(t.startMonth,n)),t.endMonth&&(t.endMonth=an(t.endMonth,n)),t.mode==="single"&&t.selected?t.selected=an(t.selected,n):t.mode==="multiple"&&t.selected?t.selected=t.selected?.map(_e=>an(_e,n)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?an(t.selected.from,n):t.selected.from,to:t.selected.to?an(t.selected.to,n):t.selected.to}),t.disabled!==void 0&&(t.disabled=Dl(t.disabled,n)),t.hidden!==void 0&&(t.hidden=Dl(t.hidden,n)),t.modifiers)){const _e={};Object.keys(t.modifiers).forEach(De=>{_e[De]=Dl(t.modifiers?.[De],n)}),t.modifiers=_e}const{components:r,formatters:o,labels:s,dateLib:i,locale:a,classNames:c}=j.useMemo(()=>{const _e={...Tg,...t.locale},De=t.broadcastCalendar?1:t.weekStartsOn,ve=t.noonSafe&&t.timeZone?U2(t.timeZone,{weekStartsOn:De,locale:_e}):void 0,Ee=t.dateLib&&ve?{...ve,...t.dateLib}:t.dateLib??ve,Xe=new Kt({locale:_e,weekStartsOn:De,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},Ee);return{dateLib:Xe,components:S2(t.components),formatters:M2(t.formatters),labels:R2(t.labels,Xe.options),locale:_e,classNames:{...kl(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.noonSafe,t.components,t.formatters,t.labels,t.classNames]);t.today||(t={...t,today:i.today()});const{captionLayout:u,mode:l,navLayout:f,numberOfMonths:d=1,onDayBlur:h,onDayClick:m,onDayFocus:p,onDayKeyDown:y,onDayMouseEnter:g,onDayMouseLeave:C,onNextClick:O,onPrevClick:w,showWeekNumber:_,styles:S}=t,{formatCaption:I,formatDay:v,formatMonthDropdown:x,formatWeekNumber:P,formatWeekNumberHeader:A,formatWeekdayName:M,formatYearDropdown:F}=o,N=eI(t,i),{days:W,months:E,navStart:k,navEnd:U,previousMonth:$,nextMonth:D,goToMonth:V}=N,Z=w2(W,t,k,U,i),{isSelected:G,select:B,selected:z}=uI(t,i)??{},{blur:X,focused:q,isFocusTarget:oe,moveFocus:Q,setFocused:re}=rI(t,N,Z,G??(()=>!1),i),{labelDayButton:le,labelGridcell:K,labelGrid:Se,labelMonthDropdown:Ie,labelNav:ke,labelPrevious:Ge,labelNext:Re,labelWeekday:We,labelWeekNumber:nt,labelWeekNumberHeader:rt,labelYearDropdown:R}=s,Y=j.useMemo(()=>L2(i,t.ISOWeek,t.broadcastCalendar,t.today),[i,t.ISOWeek,t.broadcastCalendar,t.today]),H=l!==void 0||m!==void 0,ee=j.useCallback(()=>{$&&(V($),w?.($))},[$,V,w]),te=j.useCallback(()=>{D&&(V(D),O?.(D))},[V,D,O]),ne=j.useCallback((_e,De)=>ve=>{ve.preventDefault(),ve.stopPropagation(),re(_e),!De.disabled&&(B?.(_e.date,De,ve),m?.(_e.date,De,ve))},[B,m,re]),ue=j.useCallback((_e,De)=>ve=>{re(_e),p?.(_e.date,De,ve)},[p,re]),be=j.useCallback((_e,De)=>ve=>{X(),h?.(_e.date,De,ve)},[X,h]),Oe=j.useCallback((_e,De)=>ve=>{const Ee={ArrowLeft:[ve.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[ve.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[ve.shiftKey?"year":"week","after"],ArrowUp:[ve.shiftKey?"year":"week","before"],PageUp:[ve.shiftKey?"year":"month","before"],PageDown:[ve.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(Ee[ve.key]){ve.preventDefault(),ve.stopPropagation();const[Xe,xe]=Ee[ve.key];Q(Xe,xe)}y?.(_e.date,De,ve)},[Q,y,t.dir]),ze=j.useCallback((_e,De)=>ve=>{g?.(_e.date,De,ve)},[g]),ot=j.useCallback((_e,De)=>ve=>{C?.(_e.date,De,ve)},[C]),Qe=j.useCallback(_e=>De=>{const ve=Number(De.target.value),Ee=i.setMonth(i.startOfMonth(_e),ve);V(Ee)},[i,V]),xt=j.useCallback(_e=>De=>{const ve=Number(De.target.value),Ee=i.setYear(i.startOfMonth(_e),ve);V(Ee)},[i,V]),{className:gt,style:dt}=j.useMemo(()=>({className:[c[me.Root],t.className].filter(Boolean).join(" "),style:{...S?.[me.Root],...t.style}}),[c,t.className,t.style,S]),jt=k2(t),Sn=j.useRef(null);B2(Sn,!!t.animate,{classNames:c,months:E,focused:q,dateLib:i});const kn={dayPickerProps:t,selected:z,select:B,isSelected:G,months:E,nextMonth:D,previousMonth:$,goToMonth:V,getModifiers:Z,components:r,classNames:c,styles:S,labels:s,formatters:o};return j.createElement(Ag.Provider,{value:kn},j.createElement(r.Root,{rootRef:t.animate?Sn:void 0,className:gt,style:dt,dir:t.dir,id:t.id,lang:t.lang,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],"aria-labelledby":t["aria-labelledby"],...jt},j.createElement(r.Months,{className:c[me.Months],style:S?.[me.Months]},!t.hideNavigation&&!f&&j.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:c[me.Nav],style:S?.[me.Nav],"aria-label":ke(),onPreviousClick:ee,onNextClick:te,previousMonth:$,nextMonth:D}),E.map((_e,De)=>j.createElement(r.Month,{"data-animated-month":t.animate?"true":void 0,className:c[me.Month],style:S?.[me.Month],key:De,displayIndex:De,calendarMonth:_e},f==="around"&&!t.hideNavigation&&De===0&&j.createElement(r.PreviousMonthButton,{type:"button",className:c[me.PreviousMonthButton],tabIndex:$?void 0:-1,"aria-disabled":$?void 0:!0,"aria-label":Ge($),onClick:ee,"data-animated-button":t.animate?"true":void 0},j.createElement(r.Chevron,{disabled:$?void 0:!0,className:c[me.Chevron],orientation:t.dir==="rtl"?"right":"left"})),j.createElement(r.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:c[me.MonthCaption],style:S?.[me.MonthCaption],calendarMonth:_e,displayIndex:De},u?.startsWith("dropdown")?j.createElement(r.DropdownNav,{className:c[me.Dropdowns],style:S?.[me.Dropdowns]},(()=>{const ve=u==="dropdown"||u==="dropdown-months"?j.createElement(r.MonthsDropdown,{key:"month",className:c[me.MonthsDropdown],"aria-label":Ie(),classNames:c,components:r,disabled:!!t.disableNavigation,onChange:Qe(_e.date),options:W2(_e.date,k,U,o,i),style:S?.[me.Dropdown],value:i.getMonth(_e.date)}):j.createElement("span",{key:"month"},x(_e.date,i)),Ee=u==="dropdown"||u==="dropdown-years"?j.createElement(r.YearsDropdown,{key:"year",className:c[me.YearsDropdown],"aria-label":R(i.options),classNames:c,components:r,disabled:!!t.disableNavigation,onChange:xt(_e.date),options:$2(k,U,o,i,!!t.reverseYears),style:S?.[me.Dropdown],value:i.getYear(_e.date)}):j.createElement("span",{key:"year"},F(_e.date,i));return i.getMonthYearOrder()==="year-first"?[Ee,ve]:[ve,Ee]})(),j.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},I(_e.date,i.options,i))):j.createElement(r.CaptionLabel,{className:c[me.CaptionLabel],role:"status","aria-live":"polite"},I(_e.date,i.options,i))),f==="around"&&!t.hideNavigation&&De===d-1&&j.createElement(r.NextMonthButton,{type:"button",className:c[me.NextMonthButton],tabIndex:D?void 0:-1,"aria-disabled":D?void 0:!0,"aria-label":Re(D),onClick:te,"data-animated-button":t.animate?"true":void 0},j.createElement(r.Chevron,{disabled:D?void 0:!0,className:c[me.Chevron],orientation:t.dir==="rtl"?"left":"right"})),De===d-1&&f==="after"&&!t.hideNavigation&&j.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:c[me.Nav],style:S?.[me.Nav],"aria-label":ke(),onPreviousClick:ee,onNextClick:te,previousMonth:$,nextMonth:D}),j.createElement(r.MonthGrid,{role:"grid","aria-multiselectable":l==="multiple"||l==="range","aria-label":Se(_e.date,i.options,i)||void 0,className:c[me.MonthGrid],style:S?.[me.MonthGrid]},!t.hideWeekdays&&j.createElement(r.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:c[me.Weekdays],style:S?.[me.Weekdays]},_&&j.createElement(r.WeekNumberHeader,{"aria-label":rt(i.options),className:c[me.WeekNumberHeader],style:S?.[me.WeekNumberHeader],scope:"col"},A()),Y.map(ve=>j.createElement(r.Weekday,{"aria-label":We(ve,i.options,i),className:c[me.Weekday],key:String(ve),style:S?.[me.Weekday],scope:"col"},M(ve,i.options,i)))),j.createElement(r.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:c[me.Weeks],style:S?.[me.Weeks]},_e.weeks.map(ve=>j.createElement(r.Week,{className:c[me.Week],key:ve.weekNumber,style:S?.[me.Week],week:ve},_&&j.createElement(r.WeekNumber,{week:ve,style:S?.[me.WeekNumber],"aria-label":nt(ve.weekNumber,{locale:a}),className:c[me.WeekNumber],scope:"row",role:"rowheader"},P(ve.weekNumber,i)),ve.days.map(Ee=>{const{date:Xe}=Ee,xe=Z(Ee);if(xe[ft.focused]=!xe.hidden&&!!q?.isEqualTo(Ee),xe[bn.selected]=G?.(Xe)||xe.selected,Bi(z)){const{from:Qt,to:Oo}=z;xe[bn.range_start]=!!(Qt&&Oo&&i.isSameDay(Xe,Qt)),xe[bn.range_end]=!!(Qt&&Oo&&i.isSameDay(Xe,Oo)),xe[bn.range_middle]=Qn(z,Xe,!0,i)}const tr=z2(xe,S,t.modifiersStyles),ct=_2(xe,c,t.modifiersClassNames),Pt=!H&&!xe.hidden?K(Xe,xe,i.options,i):void 0;return j.createElement(r.Day,{key:`${Ee.isoDate}_${Ee.displayMonthId}`,day:Ee,modifiers:xe,className:ct.join(" "),style:tr,role:"gridcell","aria-selected":xe.selected||void 0,"aria-label":Pt,"data-day":Ee.isoDate,"data-month":Ee.outside?Ee.dateMonthId:void 0,"data-selected":xe.selected||void 0,"data-disabled":xe.disabled||void 0,"data-hidden":xe.hidden||void 0,"data-outside":Ee.outside||void 0,"data-focused":xe.focused||void 0,"data-today":xe.today||void 0},!xe.hidden&&H?j.createElement(r.DayButton,{className:c[me.DayButton],style:S?.[me.DayButton],type:"button",day:Ee,modifiers:xe,disabled:!xe.focused&&xe.disabled||void 0,"aria-disabled":xe.focused&&xe.disabled||void 0,tabIndex:oe(Ee)?0:-1,"aria-label":le(Xe,xe,i.options,i),onClick:ne(Ee,xe),onBlur:be(Ee,xe),onFocus:ue(Ee,xe),onKeyDown:Oe(Ee,xe),onMouseEnter:ze(Ee,xe),onMouseLeave:ot(Ee,xe)},v(Xe,i.options,i)):!xe.hidden&&v(Ee.date,i.options,i))})))))))),t.footer&&j.createElement(r.Footer,{className:c[me.Footer],style:S?.[me.Footer],role:"status","aria-live":"polite"},t.footer)))}function dI({className:e,classNames:t,showOutsideDays:n=!0,captionLayout:r="label",buttonVariant:o="ghost",formatters:s,components:i,...a}){const c=kl();return T.jsx(fI,{showOutsideDays:n,className:Ae("bg-background group/calendar p-3 [--cell-size:2rem] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,e),captionLayout:r,formatters:{formatMonthDropdown:u=>u.toLocaleString("default",{month:"short"}),...s},classNames:{root:Ae("w-fit",c.root),months:Ae("relative flex flex-col gap-4 md:flex-row",c.months),month:Ae("flex w-full flex-col gap-4",c.month),nav:Ae("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",c.nav),button_previous:Ae(pl({variant:o}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",c.button_previous),button_next:Ae(pl({variant:o}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",c.button_next),month_caption:Ae("flex h-[--cell-size] w-full items-center justify-center px-[--cell-size]",c.month_caption),dropdowns:Ae("flex h-[--cell-size] w-full items-center justify-center gap-1.5 text-sm font-medium",c.dropdowns),dropdown_root:Ae("has-focus:border-ring border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] relative rounded-md border",c.dropdown_root),dropdown:Ae("bg-popover absolute inset-0 opacity-0",c.dropdown),caption_label:Ae("select-none font-medium",r==="label"?"text-sm":"[&>svg]:text-muted-foreground flex h-8 items-center gap-1 rounded-md pl-2 pr-1 text-sm [&>svg]:size-3.5",c.caption_label),table:"w-full border-collapse",weekdays:Ae("flex",c.weekdays),weekday:Ae("text-muted-foreground flex-1 select-none rounded-md text-[0.8rem] font-normal",c.weekday),week:Ae("mt-2 flex w-full",c.week),week_number_header:Ae("w-[--cell-size] select-none",c.week_number_header),week_number:Ae("text-muted-foreground select-none text-[0.8rem]",c.week_number),day:Ae("group/day relative aspect-square h-full w-full select-none p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md",c.day),range_start:Ae("bg-accent rounded-l-md",c.range_start),range_middle:Ae("rounded-none",c.range_middle),range_end:Ae("bg-accent rounded-r-md",c.range_end),today:Ae("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",c.today),outside:Ae("text-muted-foreground aria-selected:text-muted-foreground",c.outside),disabled:Ae("text-muted-foreground opacity-50",c.disabled),hidden:Ae("invisible",c.hidden),...t},components:{Root:({className:u,rootRef:l,...f})=>T.jsx("div",{"data-slot":"calendar",ref:l,className:Ae(u),...f}),Chevron:({className:u,orientation:l,...f})=>l==="left"?T.jsx(NT,{className:Ae("size-4",u),...f}):l==="right"?T.jsx(IT,{className:Ae("size-4",u),...f}):T.jsx(Pc,{className:Ae("size-4",u),...f}),DayButton:hI,WeekNumber:({children:u,...l})=>T.jsx("td",{...l,children:T.jsx("div",{className:"flex size-[--cell-size] items-center justify-center text-center",children:u})}),...i},...a})}function hI({className:e,day:t,modifiers:n,...r}){const o=kl(),s=b.useRef(null);return b.useEffect(()=>{n.focused&&s.current?.focus()},[n.focused]),T.jsx(vo,{ref:s,variant:"ghost",size:"icon","data-day":t.date.toLocaleDateString(),"data-selected-single":n.selected&&!n.range_start&&!n.range_end&&!n.range_middle,"data-range-start":n.range_start,"data-range-end":n.range_end,"data-range-middle":n.range_middle,className:Ae("data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 flex aspect-square h-auto w-full min-w-[--cell-size] flex-col gap-1 font-normal leading-none data-[range-end=true]:rounded-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] [&>span]:text-xs [&>span]:opacity-70",o.day,e),...r})}function pI(e){const t=mI(e),n=b.forwardRef((r,o)=>{const{children:s,...i}=r,a=b.Children.toArray(s),c=a.find(yI);if(c){const u=c.props.children,l=a.map(f=>f===c?b.Children.count(u)>1?b.Children.only(null):b.isValidElement(u)?u.props.children:null:f);return T.jsx(t,{...i,ref:o,children:b.isValidElement(u)?b.cloneElement(u,void 0,l):null})}return T.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function mI(e){const t=b.forwardRef((n,r)=>{const{children:o,...s}=n;if(b.isValidElement(o)){const i=bI(o),a=vI(s,o.props);return o.type!==b.Fragment&&(a.ref=r?Nr(r,i):i),b.cloneElement(o,a)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var gI=Symbol("radix.slottable");function yI(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===gI}function vI(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const c=s(...a);return o(...a),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function bI(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Zi="Popover",[qg]=Kn(Zi,[Oi]),us=Oi(),[wI,kr]=qg(Zi),Kg=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!1}=e,a=us(t),c=b.useRef(null),[u,l]=b.useState(!1),[f,d]=Rr({prop:r,defaultProp:o??!1,onChange:s,caller:Zi});return T.jsx(rm,{...a,children:T.jsx(wI,{scope:t,contentId:dr(),triggerRef:c,open:f,onOpenChange:d,onOpenToggle:b.useCallback(()=>d(h=>!h),[d]),hasCustomAnchor:u,onCustomAnchorAdd:b.useCallback(()=>l(!0),[]),onCustomAnchorRemove:b.useCallback(()=>l(!1),[]),modal:i,children:n})})};Kg.displayName=Zi;var Xg="PopoverAnchor",_I=b.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=kr(Xg,n),s=us(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:a}=o;return b.useEffect(()=>(i(),()=>a()),[i,a]),T.jsx(Jc,{...s,...r,ref:t})});_I.displayName=Xg;var Jg="PopoverTrigger",Qg=b.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=kr(Jg,n),s=us(n),i=He(t,o.triggerRef),a=T.jsx(Ne.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":oy(o.open),...r,ref:i,onClick:Te(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?a:T.jsx(Jc,{asChild:!0,...s,children:a})});Qg.displayName=Jg;var Al="PopoverPortal",[SI,kI]=qg(Al,{forceMount:void 0}),ey=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,s=kr(Al,t);return T.jsx(SI,{scope:t,forceMount:n,children:T.jsx(pr,{present:n||s.open,children:T.jsx(Ei,{asChild:!0,container:o,children:r})})})};ey.displayName=Al;var xo="PopoverContent",ty=b.forwardRef((e,t)=>{const n=kI(xo,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,s=kr(xo,e.__scopePopover);return T.jsx(pr,{present:r||s.open,children:s.modal?T.jsx(OI,{...o,ref:t}):T.jsx(EI,{...o,ref:t})})});ty.displayName=xo;var xI=pI("PopoverContent.RemoveScroll"),OI=b.forwardRef((e,t)=>{const n=kr(xo,e.__scopePopover),r=b.useRef(null),o=He(t,r),s=b.useRef(!1);return b.useEffect(()=>{const i=r.current;if(i)return el(i)},[]),T.jsx(Ii,{as:xI,allowPinchZoom:!0,children:T.jsx(ny,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Te(e.onCloseAutoFocus,i=>{i.preventDefault(),s.current||n.triggerRef.current?.focus()}),onPointerDownOutside:Te(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0,u=a.button===2||c;s.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:Te(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),EI=b.forwardRef((e,t)=>{const n=kr(xo,e.__scopePopover),r=b.useRef(!1),o=b.useRef(!1);return T.jsx(ny,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||n.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;n.triggerRef.current?.contains(i)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),ny=b.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:l,...f}=e,d=kr(xo,n),h=us(n);return Rc(),T.jsx(pi,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:T.jsx(hi,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:l,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>d.onOpenChange(!1),children:T.jsx(om,{"data-state":oy(d.open),role:"dialog",id:d.contentId,...h,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),ry="PopoverClose",CI=b.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=kr(ry,n);return T.jsx(Ne.button,{type:"button",...r,ref:t,onClick:Te(e.onClick,()=>o.onOpenChange(!1))})});CI.displayName=ry;var TI="PopoverArrow",DI=b.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=us(n);return T.jsx(sm,{...o,...r,ref:t})});DI.displayName=TI;function oy(e){return e?"open":"closed"}var AI=Kg,MI=Qg,PI=ey,sy=ty;const NI=AI,II=MI,iy=b.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},o)=>T.jsx(PI,{children:T.jsx(sy,{ref:o,align:t,sideOffset:n,className:Ae("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]",e),...r})}));iy.displayName=sy.displayName;const FI=(e={})=>{const{field:t={},form:n={},question:r={},disabled:o=!1}=e,s=t.value||void 0,i=t.onChange,[a,c]=j.useState(!1),u=l=>{l&&(i(l),c(!1))};return T.jsxs(NI,{open:a,onOpenChange:c,children:[T.jsx(II,{asChild:!0,children:T.jsx("div",{className:"block",children:T.jsxs(vo,{...t,type:"button",variant:"outline",className:Ae("bq-date-picker-button w-full justify-start text-left font-normal focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",!t.value&&"text-muted-foreground",n.formState.errors[r.reference_id]&&"border-destructive"),disabled:o,children:[T.jsx(PT,{className:"mr-2 h-4 w-4"}),t.value?ce(t.value).format("DD/MM/YYYY"):T.jsx("span",{children:r.placeholder||"Pick a date"})]})})}),T.jsx(iy,{className:"bq-date-picker-popover w-auto overflow-hidden p-0",align:"center",children:T.jsx(dI,{className:"w-56",mode:"single",selected:s,defaultMonth:s,captionLayout:"dropdown",onSelect:l=>{u(l),c(!1)}})})]})};function RI(e){const t=WI(e),n=b.forwardRef((r,o)=>{const{children:s,...i}=r,a=b.Children.toArray(s),c=a.find(LI);if(c){const u=c.props.children,l=a.map(f=>f===c?b.Children.count(u)>1?b.Children.only(null):b.isValidElement(u)?u.props.children:null:f);return T.jsx(t,{...i,ref:o,children:b.isValidElement(u)?b.cloneElement(u,void 0,l):null})}return T.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function WI(e){const t=b.forwardRef((n,r)=>{const{children:o,...s}=n;if(b.isValidElement(o)){const i=UI(o),a=$I(s,o.props);return o.type!==b.Fragment&&(a.ref=r?Nr(r,i):i),b.cloneElement(o,a)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var zI=Symbol("radix.slottable");function LI(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===zI}function $I(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const c=s(...a);return o(...a),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function UI(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Gi="Dialog",[ay]=Kn(Gi),[YI,_n]=ay(Gi),cy=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!0}=e,a=b.useRef(null),c=b.useRef(null),[u,l]=Rr({prop:r,defaultProp:o??!1,onChange:s,caller:Gi});return T.jsx(YI,{scope:t,triggerRef:a,contentRef:c,contentId:dr(),titleId:dr(),descriptionId:dr(),open:u,onOpenChange:l,onOpenToggle:b.useCallback(()=>l(f=>!f),[l]),modal:i,children:n})};cy.displayName=Gi;var ly="DialogTrigger",uy=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=_n(ly,n),s=He(t,o.triggerRef);return T.jsx(Ne.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Nl(o.open),...r,ref:s,onClick:Te(e.onClick,o.onOpenToggle)})});uy.displayName=ly;var Ml="DialogPortal",[jI,fy]=ay(Ml,{forceMount:void 0}),dy=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=_n(Ml,t);return T.jsx(jI,{scope:t,forceMount:n,children:b.Children.map(r,i=>T.jsx(pr,{present:n||s.open,children:T.jsx(Ei,{asChild:!0,container:o,children:i})}))})};dy.displayName=Ml;var qi="DialogOverlay",hy=b.forwardRef((e,t)=>{const n=fy(qi,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=_n(qi,e.__scopeDialog);return s.modal?T.jsx(pr,{present:r||s.open,children:T.jsx(BI,{...o,ref:t})}):null});hy.displayName=qi;var VI=RI("DialogOverlay.RemoveScroll"),BI=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=_n(qi,n);return T.jsx(Ii,{as:VI,allowPinchZoom:!0,shards:[o.contentRef],children:T.jsx(Ne.div,{"data-state":Nl(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),jr="DialogContent",py=b.forwardRef((e,t)=>{const n=fy(jr,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=_n(jr,e.__scopeDialog);return T.jsx(pr,{present:r||s.open,children:s.modal?T.jsx(HI,{...o,ref:t}):T.jsx(ZI,{...o,ref:t})})});py.displayName=jr;var HI=b.forwardRef((e,t)=>{const n=_n(jr,e.__scopeDialog),r=b.useRef(null),o=He(t,n.contentRef,r);return b.useEffect(()=>{const s=r.current;if(s)return el(s)},[]),T.jsx(my,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Te(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Te(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,a=i.button===0&&i.ctrlKey===!0;(i.button===2||a)&&s.preventDefault()}),onFocusOutside:Te(e.onFocusOutside,s=>s.preventDefault())})}),ZI=b.forwardRef((e,t)=>{const n=_n(jr,e.__scopeDialog),r=b.useRef(!1),o=b.useRef(!1);return T.jsx(my,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||n.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;n.triggerRef.current?.contains(i)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),my=b.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...i}=e,a=_n(jr,n),c=b.useRef(null),u=He(t,c);return Rc(),T.jsxs(T.Fragment,{children:[T.jsx(pi,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:T.jsx(hi,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Nl(a.open),...i,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),T.jsxs(T.Fragment,{children:[T.jsx(GI,{titleId:a.titleId}),T.jsx(KI,{contentRef:c,descriptionId:a.descriptionId})]})]})}),Pl="DialogTitle",gy=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=_n(Pl,n);return T.jsx(Ne.h2,{id:o.titleId,...r,ref:t})});gy.displayName=Pl;var yy="DialogDescription",vy=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=_n(yy,n);return T.jsx(Ne.p,{id:o.descriptionId,...r,ref:t})});vy.displayName=yy;var by="DialogClose",wy=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=_n(by,n);return T.jsx(Ne.button,{type:"button",...r,ref:t,onClick:Te(e.onClick,()=>o.onOpenChange(!1))})});wy.displayName=by;function Nl(e){return e?"open":"closed"}var _y="DialogTitleWarning",[SR,Sy]=NC(_y,{contentName:jr,titleName:Pl,docsSlug:"dialog"}),GI=({titleId:e})=>{const t=Sy(_y),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
102
+ `;let hl;function vP(e,t){return new Promise(((n,r)=>{hl||(hl=(function(i){const a=[];return a.push(i),URL.createObjectURL(new Blob(a))})(yP));const o=new Worker(hl);o.addEventListener("message",(function(i){if(t.signal&&t.signal.aborted)o.terminate();else if(i.data.progress===void 0){if(i.data.error)return r(new Error(i.data.error)),void o.terminate();n(i.data.file),o.terminate()}else t.onProgress(i.data.progress)})),o.addEventListener("error",r),t.signal&&t.signal.addEventListener("abort",(()=>{r(t.signal.reason),o.terminate()})),o.postMessage({file:e,imageCompressionLibUrl:t.libURL,options:{...t,onProgress:void 0,signal:void 0}})}))}function Et(e,t){return new Promise((function(n,r){let o,s,i,a,c,u;if(o={...t},i=0,{onProgress:a}=o,o.maxSizeMB=o.maxSizeMB||Number.POSITIVE_INFINITY,c=typeof o.useWebWorker!="boolean"||o.useWebWorker,delete o.useWebWorker,o.onProgress=h=>{i=h,typeof a=="function"&&a(i)},!(e instanceof Blob||e instanceof gP))return r(new Error("The file given is not an instance of Blob or File"));if(!/^image/.test(e.type))return r(new Error("The file given is not an image"));if(u=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,!c||typeof Worker!="function"||u)return sg(e,o).then((function(h){try{return s=h,d.call(this)}catch(m){return r(m)}}).bind(this),r);var l=(function(){try{return d.call(this)}catch(h){return r(h)}}).bind(this),f=function(h){try{return sg(e,o).then((function(m){try{return s=m,l()}catch(p){return r(p)}}),r)}catch(m){return r(m)}};try{return o.libURL=o.libURL||"https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js",vP(e,o).then((function(h){try{return s=h,l()}catch{return f()}}),f)}catch{f()}function d(){try{s.name=e.name,s.lastModified=e.lastModified}catch{}try{o.preserveExif&&e.type==="image/jpeg"&&(!o.fileType||o.fileType&&o.fileType===e.type)&&(s=Gm(e,s))}catch{}return n(s)}}))}Et.getDataUrlFromFile=Jm,Et.getFilefromDataUrl=dl,Et.loadImage=Qm,Et.drawImageInCanvas=tg,Et.drawFileInCanvas=ji,Et.canvasToFile=Vi,Et.getExifOrientation=ng,Et.handleMaxWidthOrHeight=rg,Et.followExifOrientation=og,Et.cleanupCanvasMemory=In,Et.isAutoOrientationInBrowser=yo,Et.approximateBelowMaximumCanvasSizeOfBrowser=eg,Et.copyExifWithoutOrientation=Gm,Et.getBrowserName=$r,Et.version="2.0.2";function Me(...e){return kc(oi(e))}async function bP(e,t=.2,n=1920){try{const r=atob(e.split(",")[1]),o=e.split(",")[0].split(":")[1].split(";")[0],s=new ArrayBuffer(r.length),i=new Uint8Array(s);for(let l=0;l<r.length;l++)i[l]=r.charCodeAt(l);const a=new Blob([s],{type:o}),c=await Et(a,{maxSizeMB:t,maxWidthOrHeight:n,useWebWorker:!0});return await Et.getDataUrlFromFile(c)}catch(r){return console.error("Error compressing image:",r),e}}function wP({questionnaire:e={}}){const{sections:t=[]}=e,n=[],r=t.map(o=>{const{items:s=[]}=o,i=s.map(a=>{const{reference_id:c=""}=a;return{...a,id:c,name:c}});return n.push(...i),{...o,items:i}});return{questionnaire:e,sections:r,questions:n}}const pl=uP("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),vo=b.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},s)=>{const i=r?fh:"button";return T.jsx(i,{className:Me(pl({variant:t,size:n,className:e})),ref:s,...o})});vo.displayName="Button";function _P(e,t,n="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:n}).format(t).split(/\s/g).slice(2).join(" ")}const SP={},ts={};function Ur(e,t){try{const r=(SP[e]||=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format)(t).split("GMT")[1];return r in ts?ts[r]:ig(r,r.split(":"))}catch{if(e in ts)return ts[e];const n=e?.match(kP);return n?ig(e,n.slice(1)):NaN}}const kP=/([+-]\d\d):?(\d\d)?/;function ig(e,t){const n=+(t[0]||0),r=+(t[1]||0),o=+(t[2]||0)/60;return ts[e]=n*60+r>0?n*60+r+o:n*60-r-o}class Fn extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(Ur(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),cg(this),ml(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new Fn(...n,t):new Fn(Date.now(),t)}withTimeZone(t){return new Fn(+this,t)}getTimezoneOffset(){const t=-Ur(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),ml(this),+this}[Symbol.for("constructDateFrom")](t){return new Fn(+new Date(t),this.timeZone)}}const ag=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!ag.test(e))return;const t=e.replace(ag,"$1UTC");Fn.prototype[t]&&(e.startsWith("get")?Fn.prototype[e]=function(){return this.internal[t]()}:(Fn.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),xP(this),+this},Fn.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),ml(this),+this}))});function ml(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-Ur(e.timeZone,e)*60))}function xP(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),cg(e)}function cg(e){const t=Ur(e.timeZone,e),n=t>0?Math.floor(t):Math.ceil(t),r=new Date(+e);r.setUTCHours(r.getUTCHours()-1);const o=-new Date(+e).getTimezoneOffset(),s=-new Date(+r).getTimezoneOffset(),i=o-s,a=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();i&&a&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+i);const c=o-n;c&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+c);const u=new Date(+e);u.setUTCSeconds(0);const l=o>0?u.getSeconds():(u.getSeconds()-60)%60,f=Math.round(-(Ur(e.timeZone,e)*60))%60;(f||l)&&(e.internal.setUTCSeconds(e.internal.getUTCSeconds()+f),Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+f+l));const d=Ur(e.timeZone,e),h=d>0?Math.floor(d):Math.ceil(d),p=-new Date(+e).getTimezoneOffset()-h,y=h!==n,g=p-c;if(y&&g){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+g);const C=Ur(e.timeZone,e),O=C>0?Math.floor(C):Math.ceil(C),w=h-O;w&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+w),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+w))}}class At extends Fn{static tz(t,...n){return n.length?new At(...n,t):new At(Date.now(),t)}toISOString(){const[t,n,r]=this.tzComponents(),o=`${t}${n}:${r}`;return this.internal.toISOString().slice(0,-1)+o}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,n,r,o]=this.internal.toUTCString().split(" ");return`${t?.slice(0,-1)} ${r} ${n} ${o}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[n,r,o]=this.tzComponents();return`${t} GMT${n}${r}${o} (${_P(this.timeZone,this)})`}toLocaleString(t,n){return Date.prototype.toLocaleString.call(this,t,{...n,timeZone:n?.timeZone||this.timeZone})}toLocaleDateString(t,n){return Date.prototype.toLocaleDateString.call(this,t,{...n,timeZone:n?.timeZone||this.timeZone})}toLocaleTimeString(t,n){return Date.prototype.toLocaleTimeString.call(this,t,{...n,timeZone:n?.timeZone||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),n=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),o=String(Math.abs(t)%60).padStart(2,"0");return[n,r,o]}withTimeZone(t){return new At(+this,t)}[Symbol.for("constructDateFrom")](t){return new At(+new Date(t),this.timeZone)}}const lg=6048e5,OP=864e5,ug=Symbol.for("constructDateFrom");function wt(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&ug in e?e[ug](t):e instanceof Date?new e.constructor(t):new Date(t)}function Ke(e,t){return wt(t||e,e)}function fg(e,t,n){const r=Ke(e,n?.in);return isNaN(t)?wt(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function dg(e,t,n){const r=Ke(e,n?.in);if(isNaN(t))return wt(e,NaN);if(!t)return r;const o=r.getDate(),s=wt(e,r.getTime());s.setMonth(r.getMonth()+t+1,0);const i=s.getDate();return o>=i?s:(r.setFullYear(s.getFullYear(),s.getMonth(),o),r)}let EP={};function ns(){return EP}function bo(e,t){const n=ns(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Ke(e,t?.in),s=o.getDay(),i=(s<r?7:0)+s-r;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function rs(e,t){return bo(e,{...t,weekStartsOn:1})}function hg(e,t){const n=Ke(e,t?.in),r=n.getFullYear(),o=wt(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const s=rs(o),i=wt(n,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const a=rs(i);return n.getTime()>=s.getTime()?r+1:n.getTime()>=a.getTime()?r:r-1}function pg(e){const t=Ke(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function wo(e,...t){const n=wt.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function os(e,t){const n=Ke(e,t?.in);return n.setHours(0,0,0,0),n}function gl(e,t,n){const[r,o]=wo(n?.in,e,t),s=os(r),i=os(o),a=+s-pg(s),c=+i-pg(i);return Math.round((a-c)/OP)}function CP(e,t){const n=hg(e,t),r=wt(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),rs(r)}function TP(e,t,n){return fg(e,t*7,n)}function DP(e,t,n){return dg(e,t*12,n)}function MP(e,t){let n,r=t?.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=wt.bind(null,o));const s=Ke(o,r);(!n||n<s||isNaN(+s))&&(n=s)}),wt(r,n||NaN)}function AP(e,t){let n,r=t?.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=wt.bind(null,o));const s=Ke(o,r);(!n||n>s||isNaN(+s))&&(n=s)}),wt(r,n||NaN)}function PP(e,t,n){const[r,o]=wo(n?.in,e,t);return+os(r)==+os(o)}function mg(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function NP(e){return!(!mg(e)&&typeof e!="number"||isNaN(+Ke(e)))}function gg(e,t,n){const[r,o]=wo(n?.in,e,t),s=r.getFullYear()-o.getFullYear(),i=r.getMonth()-o.getMonth();return s*12+i}function IP(e,t){const n=Ke(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function yg(e,t){const[n,r]=wo(e,t.start,t.end);return{start:n,end:r}}function FP(e,t){const{start:n,end:r}=yg(t?.in,e);let o=+n>+r;const s=o?+n:+r,i=o?r:n;i.setHours(0,0,0,0),i.setDate(1);let a=1;const c=[];for(;+i<=s;)c.push(wt(n,i)),i.setMonth(i.getMonth()+a);return o?c.reverse():c}function RP(e,t){const n=Ke(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function WP(e,t){const n=Ke(e,t?.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function vg(e,t){const n=Ke(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function zP(e,t){const{start:n,end:r}=yg(t?.in,e);let o=+n>+r;const s=o?+n:+r,i=o?r:n;i.setHours(0,0,0,0),i.setMonth(0,1);let a=1;const c=[];for(;+i<=s;)c.push(wt(n,i)),i.setFullYear(i.getFullYear()+a);return o?c.reverse():c}function bg(e,t){const n=ns(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Ke(e,t?.in),s=o.getDay(),i=(s<r?-7:0)+6-(s-r);return o.setDate(o.getDate()+i),o.setHours(23,59,59,999),o}function LP(e,t){return bg(e,{...t,weekStartsOn:1})}const $P={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},UP=(e,t,n)=>{let r;const o=$P[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function yl(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const YP={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},jP={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},VP={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},BP={date:yl({formats:YP,defaultWidth:"full"}),time:yl({formats:jP,defaultWidth:"full"}),dateTime:yl({formats:VP,defaultWidth:"full"})},HP={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},ZP=(e,t,n,r)=>HP[e];function ss(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,a=n?.width?String(n.width):i;o=e.formattingValues[a]||e.formattingValues[i]}else{const i=e.defaultWidth,a=n?.width?String(n.width):e.defaultWidth;o=e.values[a]||e.values[i]}const s=e.argumentCallback?e.argumentCallback(t):t;return o[s]}}const GP={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},qP={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},KP={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},XP={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},JP={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},QP={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},eN={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:ss({values:GP,defaultWidth:"wide"}),quarter:ss({values:qP,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ss({values:KP,defaultWidth:"wide"}),day:ss({values:XP,defaultWidth:"wide"}),dayPeriod:ss({values:JP,defaultWidth:"wide",formattingValues:QP,defaultFormattingWidth:"wide"})};function is(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(o);if(!s)return null;const i=s[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(a)?nN(a,f=>f.test(i)):tN(a,f=>f.test(i));let u;u=e.valueCallback?e.valueCallback(c):c,u=n.valueCallback?n.valueCallback(u):u;const l=t.slice(i.length);return{value:u,rest:l}}}function tN(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function nN(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function rN(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],s=t.match(e.parsePattern);if(!s)return null;let i=e.valueCallback?e.valueCallback(s[0]):s[0];i=n.valueCallback?n.valueCallback(i):i;const a=t.slice(o.length);return{value:i,rest:a}}}const oN=/^(\d+)(th|st|nd|rd)?/i,sN=/\d+/i,iN={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},aN={any:[/^b/i,/^(a|c)/i]},cN={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},lN={any:[/1/i,/2/i,/3/i,/4/i]},uN={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},fN={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},dN={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},hN={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},pN={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},mN={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},gN={ordinalNumber:rN({matchPattern:oN,parsePattern:sN,valueCallback:e=>parseInt(e,10)}),era:is({matchPatterns:iN,defaultMatchWidth:"wide",parsePatterns:aN,defaultParseWidth:"any"}),quarter:is({matchPatterns:cN,defaultMatchWidth:"wide",parsePatterns:lN,defaultParseWidth:"any",valueCallback:e=>e+1}),month:is({matchPatterns:uN,defaultMatchWidth:"wide",parsePatterns:fN,defaultParseWidth:"any"}),day:is({matchPatterns:dN,defaultMatchWidth:"wide",parsePatterns:hN,defaultParseWidth:"any"}),dayPeriod:is({matchPatterns:pN,defaultMatchWidth:"any",parsePatterns:mN,defaultParseWidth:"any"})},_o={code:"en-US",formatDistance:UP,formatLong:BP,formatRelative:ZP,localize:eN,match:gN,options:{weekStartsOn:0,firstWeekContainsDate:1}};function yN(e,t){const n=Ke(e,t?.in);return gl(n,vg(n))+1}function vl(e,t){const n=Ke(e,t?.in),r=+rs(n)-+CP(n);return Math.round(r/lg)+1}function wg(e,t){const n=Ke(e,t?.in),r=n.getFullYear(),o=ns(),s=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,i=wt(t?.in||e,0);i.setFullYear(r+1,0,s),i.setHours(0,0,0,0);const a=bo(i,t),c=wt(t?.in||e,0);c.setFullYear(r,0,s),c.setHours(0,0,0,0);const u=bo(c,t);return+n>=+a?r+1:+n>=+u?r:r-1}function vN(e,t){const n=ns(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=wg(e,t),s=wt(t?.in||e,0);return s.setFullYear(o,0,r),s.setHours(0,0,0,0),bo(s,t)}function bl(e,t){const n=Ke(e,t?.in),r=+bo(n,t)-+vN(n,t);return Math.round(r/lg)+1}function Ze(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Sr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Ze(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Ze(n+1,2)},d(e,t){return Ze(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Ze(e.getHours()%12||12,t.length)},H(e,t){return Ze(e.getHours(),t.length)},m(e,t){return Ze(e.getMinutes(),t.length)},s(e,t){return Ze(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return Ze(o,t.length)}},So={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},_g={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return Sr.y(e,t)},Y:function(e,t,n,r){const o=wg(e,r),s=o>0?o:1-o;if(t==="YY"){const i=s%100;return Ze(i,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):Ze(s,t.length)},R:function(e,t){const n=hg(e);return Ze(n,t.length)},u:function(e,t){const n=e.getFullYear();return Ze(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Ze(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Ze(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Sr.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Ze(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=bl(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):Ze(o,t.length)},I:function(e,t,n){const r=vl(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Ze(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Sr.d(e,t)},D:function(e,t,n){const r=yN(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Ze(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return Ze(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return Ze(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return Ze(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=So.noon:r===0?o=So.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=So.evening:r>=12?o=So.afternoon:r>=4?o=So.morning:o=So.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Sr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Sr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Ze(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Ze(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Sr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Sr.s(e,t)},S:function(e,t){return Sr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return kg(r);case"XXXX":case"XX":return Yr(r);default:return Yr(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return kg(r);case"xxxx":case"xx":return Yr(r);default:return Yr(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Sg(r,":");default:return"GMT"+Yr(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Sg(r,":");default:return"GMT"+Yr(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Ze(r,t.length)},T:function(e,t,n){return Ze(+e,t.length)}};function Sg(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),s=r%60;return s===0?n+String(o):n+String(o)+t+Ze(s,2)}function kg(e,t){return e%60===0?(e>0?"-":"+")+Ze(Math.abs(e)/60,2):Yr(e,t)}function Yr(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Ze(Math.trunc(r/60),2),s=Ze(r%60,2);return n+o+t+s}const xg=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},Og=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},bN={p:Og,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return xg(e,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",xg(r,t)).replace("{{time}}",Og(o,t))}},wN=/^D+$/,_N=/^Y+$/,SN=["D","DD","YY","YYYY"];function kN(e){return wN.test(e)}function xN(e){return _N.test(e)}function ON(e,t,n){const r=EN(e,t,n);if(console.warn(r),SN.includes(e))throw new RangeError(r)}function EN(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const CN=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,TN=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,DN=/^'([^]*?)'?$/,MN=/''/g,AN=/[a-zA-Z]/;function as(e,t,n){const r=ns(),o=n?.locale??r.locale??_o,s=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,i=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=Ke(e,n?.in);if(!NP(a))throw new RangeError("Invalid time value");let c=t.match(TN).map(l=>{const f=l[0];if(f==="p"||f==="P"){const d=bN[f];return d(l,o.formatLong)}return l}).join("").match(CN).map(l=>{if(l==="''")return{isToken:!1,value:"'"};const f=l[0];if(f==="'")return{isToken:!1,value:PN(l)};if(_g[f])return{isToken:!0,value:l};if(f.match(AN))throw new RangeError("Format string contains an unescaped latin alphabet character `"+f+"`");return{isToken:!1,value:l}});o.localize.preprocessor&&(c=o.localize.preprocessor(a,c));const u={firstWeekContainsDate:s,weekStartsOn:i,locale:o};return c.map(l=>{if(!l.isToken)return l.value;const f=l.value;(!n?.useAdditionalWeekYearTokens&&xN(f)||!n?.useAdditionalDayOfYearTokens&&kN(f))&&ON(f,t,String(e));const d=_g[f[0]];return d(a,f,o.localize,u)}).join("")}function PN(e){const t=e.match(DN);return t?t[1].replace(MN,"'"):e}function NN(e,t){const n=Ke(e,t?.in),r=n.getFullYear(),o=n.getMonth(),s=wt(n,0);return s.setFullYear(r,o+1,0),s.setHours(0,0,0,0),s.getDate()}function IN(e,t){return Ke(e,t?.in).getMonth()}function FN(e,t){return Ke(e,t?.in).getFullYear()}function RN(e,t){return+Ke(e)>+Ke(t)}function WN(e,t){return+Ke(e)<+Ke(t)}function zN(e,t,n){const[r,o]=wo(n?.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function LN(e,t,n){const[r,o]=wo(n?.in,e,t);return r.getFullYear()===o.getFullYear()}function $N(e,t,n){const r=Ke(e,n?.in),o=r.getFullYear(),s=r.getDate(),i=wt(e,0);i.setFullYear(o,t,15),i.setHours(0,0,0,0);const a=NN(i);return r.setMonth(t,Math.min(s,a)),r}function UN(e,t,n){const r=Ke(e,n?.in);return isNaN(+r)?wt(e,NaN):(r.setFullYear(t),r)}const Eg=5,YN=4;function jN(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,-r+1),s=t.addDays(o,Eg*7-1);return t.getMonth(e)===t.getMonth(s)?Eg:YN}function Cg(e,t){const n=t.startOfMonth(e),r=n.getDay();return r===1?n:r===0?t.addDays(n,-6):t.addDays(n,-1*(r-1))}function VN(e,t){const n=Cg(e,t),r=jN(e,t);return t.addDays(n,r*7-1)}const Tg={..._o,labels:{labelDayButton:(e,t,n,r)=>{let o;r&&typeof r.format=="function"?o=r.format.bind(r):o=(i,a)=>as(i,a,{locale:_o,...n});let s=o(e,"PPPP");return t.today&&(s=`Today, ${s}`),t.selected&&(s=`${s}, selected`),s},labelMonthDropdown:"Choose the Month",labelNext:"Go to the Next Month",labelPrevious:"Go to the Previous Month",labelWeekNumber:e=>`Week ${e}`,labelYearDropdown:"Choose the Year",labelGrid:(e,t,n)=>{let r;return n&&typeof n.format=="function"?r=n.format.bind(n):r=(o,s)=>as(o,s,{locale:_o,...t}),r(e,"LLLL yyyy")},labelGridcell:(e,t,n,r)=>{let o;r&&typeof r.format=="function"?o=r.format.bind(r):o=(i,a)=>as(i,a,{locale:_o,...n});let s=o(e,"PPPP");return t?.today&&(s=`Today, ${s}`),s},labelNav:"Navigation bar",labelWeekNumberHeader:"Week Number",labelWeekday:(e,t,n)=>{let r;return n&&typeof n.format=="function"?r=n.format.bind(n):r=(o,s)=>as(o,s,{locale:_o,...t}),r(e,"cccc")}}};class Kt{constructor(t,n){this.Date=Date,this.today=()=>this.overrides?.today?this.overrides.today():this.options.timeZone?At.tz(this.options.timeZone):new this.Date,this.newDate=(r,o,s)=>this.overrides?.newDate?this.overrides.newDate(r,o,s):this.options.timeZone?new At(r,o,s,this.options.timeZone):new Date(r,o,s),this.addDays=(r,o)=>this.overrides?.addDays?this.overrides.addDays(r,o):fg(r,o),this.addMonths=(r,o)=>this.overrides?.addMonths?this.overrides.addMonths(r,o):dg(r,o),this.addWeeks=(r,o)=>this.overrides?.addWeeks?this.overrides.addWeeks(r,o):TP(r,o),this.addYears=(r,o)=>this.overrides?.addYears?this.overrides.addYears(r,o):DP(r,o),this.differenceInCalendarDays=(r,o)=>this.overrides?.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,o):gl(r,o),this.differenceInCalendarMonths=(r,o)=>this.overrides?.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,o):gg(r,o),this.eachMonthOfInterval=r=>this.overrides?.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):FP(r),this.eachYearOfInterval=r=>{const o=this.overrides?.eachYearOfInterval?this.overrides.eachYearOfInterval(r):zP(r),s=new Set(o.map(a=>this.getYear(a)));if(s.size===o.length)return o;const i=[];return s.forEach(a=>{i.push(new Date(a,0,1))}),i},this.endOfBroadcastWeek=r=>this.overrides?.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):VN(r,this),this.endOfISOWeek=r=>this.overrides?.endOfISOWeek?this.overrides.endOfISOWeek(r):LP(r),this.endOfMonth=r=>this.overrides?.endOfMonth?this.overrides.endOfMonth(r):IP(r),this.endOfWeek=(r,o)=>this.overrides?.endOfWeek?this.overrides.endOfWeek(r,o):bg(r,this.options),this.endOfYear=r=>this.overrides?.endOfYear?this.overrides.endOfYear(r):WP(r),this.format=(r,o,s)=>{const i=this.overrides?.format?this.overrides.format(r,o,this.options):as(r,o,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(i):i},this.getISOWeek=r=>this.overrides?.getISOWeek?this.overrides.getISOWeek(r):vl(r),this.getMonth=(r,o)=>this.overrides?.getMonth?this.overrides.getMonth(r,this.options):IN(r,this.options),this.getYear=(r,o)=>this.overrides?.getYear?this.overrides.getYear(r,this.options):FN(r,this.options),this.getWeek=(r,o)=>this.overrides?.getWeek?this.overrides.getWeek(r,this.options):bl(r,this.options),this.isAfter=(r,o)=>this.overrides?.isAfter?this.overrides.isAfter(r,o):RN(r,o),this.isBefore=(r,o)=>this.overrides?.isBefore?this.overrides.isBefore(r,o):WN(r,o),this.isDate=r=>this.overrides?.isDate?this.overrides.isDate(r):mg(r),this.isSameDay=(r,o)=>this.overrides?.isSameDay?this.overrides.isSameDay(r,o):PP(r,o),this.isSameMonth=(r,o)=>this.overrides?.isSameMonth?this.overrides.isSameMonth(r,o):zN(r,o),this.isSameYear=(r,o)=>this.overrides?.isSameYear?this.overrides.isSameYear(r,o):LN(r,o),this.max=r=>this.overrides?.max?this.overrides.max(r):MP(r),this.min=r=>this.overrides?.min?this.overrides.min(r):AP(r),this.setMonth=(r,o)=>this.overrides?.setMonth?this.overrides.setMonth(r,o):$N(r,o),this.setYear=(r,o)=>this.overrides?.setYear?this.overrides.setYear(r,o):UN(r,o),this.startOfBroadcastWeek=(r,o)=>this.overrides?.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):Cg(r,this),this.startOfDay=r=>this.overrides?.startOfDay?this.overrides.startOfDay(r):os(r),this.startOfISOWeek=r=>this.overrides?.startOfISOWeek?this.overrides.startOfISOWeek(r):rs(r),this.startOfMonth=r=>this.overrides?.startOfMonth?this.overrides.startOfMonth(r):RP(r),this.startOfWeek=(r,o)=>this.overrides?.startOfWeek?this.overrides.startOfWeek(r,this.options):bo(r,this.options),this.startOfYear=r=>this.overrides?.startOfYear?this.overrides.startOfYear(r):vg(r),this.options={locale:Tg,...t},this.overrides=n}getDigitMap(){const{numerals:t="latn"}=this.options,n=new Intl.NumberFormat("en-US",{numberingSystem:t}),r={};for(let o=0;o<10;o++)r[o.toString()]=n.format(o);return r}replaceDigits(t){const n=this.getDigitMap();return t.replace(/\d/g,r=>n[r]||r)}formatNumber(t){return this.replaceDigits(t.toString())}getMonthYearOrder(){const t=this.options.locale?.code;return t&&Kt.yearFirstLocales.has(t)?"year-first":"month-first"}formatMonthYear(t){const{locale:n,timeZone:r,numerals:o}=this.options,s=n?.code;if(s&&Kt.yearFirstLocales.has(s))try{return new Intl.DateTimeFormat(s,{month:"long",year:"numeric",timeZone:r,numberingSystem:o}).format(t)}catch{}const i=this.getMonthYearOrder()==="year-first"?"y LLLL":"LLLL y";return this.format(t,i)}}Kt.yearFirstLocales=new Set(["eu","hu","ja","ja-Hira","ja-JP","ko","ko-KR","lt","lt-LT","lv","lv-LV","mn","mn-MN","zh","zh-CN","zh-HK","zh-TW"]);const Rn=new Kt;class Dg{constructor(t,n,r=Rn){this.date=t,this.displayMonth=n,this.outside=!!(n&&!r.isSameMonth(t,n)),this.dateLib=r,this.isoDate=r.format(t,"yyyy-MM-dd"),this.displayMonthId=r.format(n,"yyyy-MM"),this.dateMonthId=r.format(t,"yyyy-MM")}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class BN{constructor(t,n){this.date=t,this.weeks=n}}class HN{constructor(t,n){this.days=n,this.weekNumber=t}}function ZN(e){return j.createElement("button",{...e})}function GN(e){return j.createElement("span",{...e})}function qN(e){const{size:t=24,orientation:n="left",className:r}=e;return j.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&j.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&j.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&j.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&j.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function KN(e){const{day:t,modifiers:n,...r}=e;return j.createElement("td",{...r})}function XN(e){const{day:t,modifiers:n,...r}=e,o=j.useRef(null);return j.useEffect(()=>{n.focused&&o.current?.focus()},[n.focused]),j.createElement("button",{ref:o,...r})}var me;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(me||(me={}));var ft;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(ft||(ft={}));var bn;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(bn||(bn={}));var Xt;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})(Xt||(Xt={}));function JN(e){const{options:t,className:n,components:r,classNames:o,...s}=e,i=[o[me.Dropdown],n].join(" "),a=t?.find(({value:c})=>c===s.value);return j.createElement("span",{"data-disabled":s.disabled,className:o[me.DropdownRoot]},j.createElement(r.Select,{className:i,...s},t?.map(({value:c,label:u,disabled:l})=>j.createElement(r.Option,{key:c,value:c,disabled:l},u))),j.createElement("span",{className:o[me.CaptionLabel],"aria-hidden":!0},a?.label,j.createElement(r.Chevron,{orientation:"down",size:18,className:o[me.Chevron]})))}function QN(e){return j.createElement("div",{...e})}function e2(e){return j.createElement("div",{...e})}function t2(e){const{calendarMonth:t,displayIndex:n,...r}=e;return j.createElement("div",{...r},e.children)}function n2(e){const{calendarMonth:t,displayIndex:n,...r}=e;return j.createElement("div",{...r})}function r2(e){return j.createElement("table",{...e})}function o2(e){return j.createElement("div",{...e})}const Mg=j.createContext(void 0);function cs(){const e=j.useContext(Mg);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function s2(e){const{components:t}=cs();return j.createElement(t.Dropdown,{...e})}function i2(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...s}=e,{components:i,classNames:a,labels:{labelPrevious:c,labelNext:u}}=cs(),l=j.useCallback(d=>{o&&n?.(d)},[o,n]),f=j.useCallback(d=>{r&&t?.(d)},[r,t]);return j.createElement("nav",{...s},j.createElement(i.PreviousMonthButton,{type:"button",className:a[me.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":c(r),onClick:f},j.createElement(i.Chevron,{disabled:r?void 0:!0,className:a[me.Chevron],orientation:"left"})),j.createElement(i.NextMonthButton,{type:"button",className:a[me.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":o?void 0:!0,"aria-label":u(o),onClick:l},j.createElement(i.Chevron,{disabled:o?void 0:!0,orientation:"right",className:a[me.Chevron]})))}function a2(e){const{components:t}=cs();return j.createElement(t.Button,{...e})}function c2(e){return j.createElement("option",{...e})}function l2(e){const{components:t}=cs();return j.createElement(t.Button,{...e})}function u2(e){const{rootRef:t,...n}=e;return j.createElement("div",{...n,ref:t})}function f2(e){return j.createElement("select",{...e})}function d2(e){const{week:t,...n}=e;return j.createElement("tr",{...n})}function h2(e){return j.createElement("th",{...e})}function p2(e){return j.createElement("thead",{"aria-hidden":!0},j.createElement("tr",{...e}))}function m2(e){const{week:t,...n}=e;return j.createElement("th",{...n})}function g2(e){return j.createElement("th",{...e})}function y2(e){return j.createElement("tbody",{...e})}function v2(e){const{components:t}=cs();return j.createElement(t.Dropdown,{...e})}const b2=Object.freeze(Object.defineProperty({__proto__:null,Button:ZN,CaptionLabel:GN,Chevron:qN,Day:KN,DayButton:XN,Dropdown:JN,DropdownNav:QN,Footer:e2,Month:t2,MonthCaption:n2,MonthGrid:r2,Months:o2,MonthsDropdown:s2,Nav:i2,NextMonthButton:a2,Option:c2,PreviousMonthButton:l2,Root:u2,Select:f2,Week:d2,WeekNumber:m2,WeekNumberHeader:g2,Weekday:h2,Weekdays:p2,Weeks:y2,YearsDropdown:v2},Symbol.toStringTag,{value:"Module"}));function Qn(e,t,n=!1,r=Rn){let{from:o,to:s}=e;const{differenceInCalendarDays:i,isSameDay:a}=r;return o&&s?(i(s,o)<0&&([o,s]=[s,o]),i(t,o)>=(n?1:0)&&i(s,t)>=(n?1:0)):!n&&s?a(s,t):!n&&o?a(o,t):!1}function wl(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function Bi(e){return!!(e&&typeof e=="object"&&"from"in e)}function _l(e){return!!(e&&typeof e=="object"&&"after"in e)}function Sl(e){return!!(e&&typeof e=="object"&&"before"in e)}function Ag(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function Pg(e,t){return Array.isArray(e)&&e.every(t.isDate)}function er(e,t,n=Rn){const r=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:s,isAfter:i}=n;return r.some(a=>{if(typeof a=="boolean")return a;if(n.isDate(a))return o(e,a);if(Pg(a,n))return a.some(c=>o(e,c));if(Bi(a))return Qn(a,e,!1,n);if(Ag(a))return Array.isArray(a.dayOfWeek)?a.dayOfWeek.includes(e.getDay()):a.dayOfWeek===e.getDay();if(wl(a)){const c=s(a.before,e),u=s(a.after,e),l=c>0,f=u<0;return i(a.before,a.after)?f&&l:l||f}return _l(a)?s(e,a.after)>0:Sl(a)?s(a.before,e)>0:typeof a=="function"?a(e):!1})}function w2(e,t,n,r,o){const{disabled:s,hidden:i,modifiers:a,showOutsideDays:c,broadcastCalendar:u,today:l=o.today()}=t,{isSameDay:f,isSameMonth:d,startOfMonth:h,isBefore:m,endOfMonth:p,isAfter:y}=o,g=n&&h(n),C=r&&p(r),O={[ft.focused]:[],[ft.outside]:[],[ft.disabled]:[],[ft.hidden]:[],[ft.today]:[]},w={};for(const _ of e){const{date:S,displayMonth:I}=_,v=!!(I&&!d(S,I)),x=!!(g&&m(S,g)),P=!!(C&&y(S,C)),M=!!(s&&er(S,s,o)),A=!!(i&&er(S,i,o))||x||P||!u&&!c&&v||u&&c===!1&&v,F=f(S,l);v&&O.outside.push(_),M&&O.disabled.push(_),A&&O.hidden.push(_),F&&O.today.push(_),a&&Object.keys(a).forEach(N=>{const W=a?.[N];W&&er(S,W,o)&&(w[N]?w[N].push(_):w[N]=[_])})}return _=>{const S={[ft.focused]:!1,[ft.disabled]:!1,[ft.hidden]:!1,[ft.outside]:!1,[ft.today]:!1},I={};for(const v in O){const x=O[v];S[v]=x.some(P=>P===_)}for(const v in w)I[v]=w[v].some(x=>x===_);return{...S,...I}}}function _2(e,t,n={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[s])=>(n[s]?o.push(n[s]):t[ft[s]]?o.push(t[ft[s]]):t[bn[s]]&&o.push(t[bn[s]]),o),[t[me.Day]])}function S2(e){return{...b2,...e}}function k2(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([n,r])=>{n.startsWith("data-")&&(t[n]=r)}),t}function kl(){const e={};for(const t in me)e[me[t]]=`rdp-${me[t]}`;for(const t in ft)e[ft[t]]=`rdp-${ft[t]}`;for(const t in bn)e[bn[t]]=`rdp-${bn[t]}`;for(const t in Xt)e[Xt[t]]=`rdp-${Xt[t]}`;return e}function Ng(e,t,n){return(n??new Kt(t)).formatMonthYear(e)}const x2=Ng;function O2(e,t,n){return(n??new Kt(t)).format(e,"d")}function E2(e,t=Rn){return t.format(e,"LLLL")}function C2(e,t,n){return(n??new Kt(t)).format(e,"cccccc")}function T2(e,t=Rn){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function D2(){return""}function Ig(e,t=Rn){return t.format(e,"yyyy")}const M2=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:Ng,formatDay:O2,formatMonthCaption:x2,formatMonthDropdown:E2,formatWeekNumber:T2,formatWeekNumberHeader:D2,formatWeekdayName:C2,formatYearCaption:Ig,formatYearDropdown:Ig},Symbol.toStringTag,{value:"Module"}));function A2(e){return e?.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e?.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...M2,...e}}function xl(e,t,n,r){let o=(r??new Kt(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const P2=xl;function Ol(e,t,n){return(n??new Kt(t)).formatMonthYear(e)}const N2=Ol;function Fg(e,t,n,r){let o=(r??new Kt(n)).format(e,"PPPP");return t?.today&&(o=`Today, ${o}`),o}function Rg(e){return"Choose the Month"}function Wg(){return""}const I2="Go to the Next Month";function zg(e,t){return I2}function Lg(e){return"Go to the Previous Month"}function $g(e,t,n){return(n??new Kt(t)).format(e,"cccc")}function Ug(e,t){return`Week ${e}`}function Yg(e){return"Week Number"}function jg(e){return"Choose the Year"}const F2=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:N2,labelDay:P2,labelDayButton:xl,labelGrid:Ol,labelGridcell:Fg,labelMonthDropdown:Rg,labelNav:Wg,labelNext:zg,labelPrevious:Lg,labelWeekNumber:Ug,labelWeekNumberHeader:Yg,labelWeekday:$g,labelYearDropdown:jg},Symbol.toStringTag,{value:"Module"})),wn=(e,t,n)=>t||(n?typeof n=="function"?n:(...r)=>n:e);function R2(e,t){const n=t.locale?.labels??{};return{...F2,...e??{},labelDayButton:wn(xl,e?.labelDayButton,n.labelDayButton),labelMonthDropdown:wn(Rg,e?.labelMonthDropdown,n.labelMonthDropdown),labelNext:wn(zg,e?.labelNext,n.labelNext),labelPrevious:wn(Lg,e?.labelPrevious,n.labelPrevious),labelWeekNumber:wn(Ug,e?.labelWeekNumber,n.labelWeekNumber),labelYearDropdown:wn(jg,e?.labelYearDropdown,n.labelYearDropdown),labelGrid:wn(Ol,e?.labelGrid,n.labelGrid),labelGridcell:wn(Fg,e?.labelGridcell,n.labelGridcell),labelNav:wn(Wg,e?.labelNav,n.labelNav),labelWeekNumberHeader:wn(Yg,e?.labelWeekNumberHeader,n.labelWeekNumberHeader),labelWeekday:wn($g,e?.labelWeekday,n.labelWeekday)}}function W2(e,t,n,r,o){const{startOfMonth:s,startOfYear:i,endOfYear:a,eachMonthOfInterval:c,getMonth:u}=o;return c({start:i(e),end:a(e)}).map(d=>{const h=r.formatMonthDropdown(d,o),m=u(d),p=t&&d<s(t)||n&&d>s(n)||!1;return{value:m,label:h,disabled:p}})}function z2(e,t={},n={}){let r={...t?.[me.Day]};return Object.entries(e).filter(([,o])=>o===!0).forEach(([o])=>{r={...r,...n?.[o]}}),r}function L2(e,t,n,r){const o=r??e.today(),s=n?e.startOfBroadcastWeek(o,e):t?e.startOfISOWeek(o):e.startOfWeek(o),i=[];for(let a=0;a<7;a++){const c=e.addDays(s,a);i.push(c)}return i}function $2(e,t,n,r,o=!1){if(!e||!t)return;const{startOfYear:s,endOfYear:i,eachYearOfInterval:a,getYear:c}=r,u=s(e),l=i(t),f=a({start:u,end:l});return o&&f.reverse(),f.map(d=>{const h=n.formatYearDropdown(d,r);return{value:c(d),label:h,disabled:!1}})}function U2(e,t={}){const{weekStartsOn:n,locale:r}=t,o=n??r?.options?.weekStartsOn??0,s=a=>{const c=typeof a=="number"||typeof a=="string"?new Date(a):a;return new At(c.getFullYear(),c.getMonth(),c.getDate(),12,0,0,e)},i=a=>{const c=s(a);return new Date(c.getFullYear(),c.getMonth(),c.getDate(),0,0,0,0)};return{today:()=>s(At.tz(e)),newDate:(a,c,u)=>new At(a,c,u,12,0,0,e),startOfDay:a=>s(a),startOfWeek:(a,c)=>{const u=s(a),l=c?.weekStartsOn??o,f=(u.getDay()-l+7)%7;return u.setDate(u.getDate()-f),u},startOfISOWeek:a=>{const c=s(a),u=(c.getDay()-1+7)%7;return c.setDate(c.getDate()-u),c},startOfMonth:a=>{const c=s(a);return c.setDate(1),c},startOfYear:a=>{const c=s(a);return c.setMonth(0,1),c},endOfWeek:(a,c)=>{const u=s(a),d=(((c?.weekStartsOn??o)+6)%7-u.getDay()+7)%7;return u.setDate(u.getDate()+d),u},endOfISOWeek:a=>{const c=s(a),u=(7-c.getDay())%7;return c.setDate(c.getDate()+u),c},endOfMonth:a=>{const c=s(a);return c.setMonth(c.getMonth()+1,0),c},endOfYear:a=>{const c=s(a);return c.setMonth(11,31),c},eachMonthOfInterval:a=>{const c=s(a.start),u=s(a.end),l=[],f=new At(c.getFullYear(),c.getMonth(),1,12,0,0,e),d=u.getFullYear()*12+u.getMonth();for(;f.getFullYear()*12+f.getMonth()<=d;)l.push(new At(f,e)),f.setMonth(f.getMonth()+1,1);return l},addDays:(a,c)=>{const u=s(a);return u.setDate(u.getDate()+c),u},addWeeks:(a,c)=>{const u=s(a);return u.setDate(u.getDate()+c*7),u},addMonths:(a,c)=>{const u=s(a);return u.setMonth(u.getMonth()+c),u},addYears:(a,c)=>{const u=s(a);return u.setFullYear(u.getFullYear()+c),u},eachYearOfInterval:a=>{const c=s(a.start),u=s(a.end),l=[],f=new At(c.getFullYear(),0,1,12,0,0,e);for(;f.getFullYear()<=u.getFullYear();)l.push(new At(f,e)),f.setFullYear(f.getFullYear()+1,0,1);return l},getWeek:(a,c)=>{const u=i(a);return bl(u,{weekStartsOn:c?.weekStartsOn??o,firstWeekContainsDate:c?.firstWeekContainsDate??r?.options?.firstWeekContainsDate??1})},getISOWeek:a=>{const c=i(a);return vl(c)},differenceInCalendarDays:(a,c)=>{const u=i(a),l=i(c);return gl(u,l)},differenceInCalendarMonths:(a,c)=>{const u=i(a),l=i(c);return gg(u,l)}}}const ls=e=>e instanceof HTMLElement?e:null,El=e=>[...e.querySelectorAll("[data-animated-month]")??[]],Y2=e=>ls(e.querySelector("[data-animated-month]")),Cl=e=>ls(e.querySelector("[data-animated-caption]")),Tl=e=>ls(e.querySelector("[data-animated-weeks]")),j2=e=>ls(e.querySelector("[data-animated-nav]")),V2=e=>ls(e.querySelector("[data-animated-weekdays]"));function B2(e,t,{classNames:n,months:r,focused:o,dateLib:s}){const i=j.useRef(null),a=j.useRef(r),c=j.useRef(!1);j.useLayoutEffect(()=>{const u=a.current;if(a.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||u.length===0||r.length!==u.length)return;const l=s.isSameMonth(r[0].date,u[0].date),f=s.isAfter(r[0].date,u[0].date),d=f?n[Xt.caption_after_enter]:n[Xt.caption_before_enter],h=f?n[Xt.weeks_after_enter]:n[Xt.weeks_before_enter],m=i.current,p=e.current.cloneNode(!0);if(p instanceof HTMLElement?(El(p).forEach(O=>{if(!(O instanceof HTMLElement))return;const w=Y2(O);w&&O.contains(w)&&O.removeChild(w);const _=Cl(O);_&&_.classList.remove(d);const S=Tl(O);S&&S.classList.remove(h)}),i.current=p):i.current=null,c.current||l||o)return;const y=m instanceof HTMLElement?El(m):[],g=El(e.current);if(g?.every(C=>C instanceof HTMLElement)&&y&&y.every(C=>C instanceof HTMLElement)){c.current=!0,e.current.style.isolation="isolate";const C=j2(e.current);C&&(C.style.zIndex="1"),g.forEach((O,w)=>{const _=y[w];if(!_)return;O.style.position="relative",O.style.overflow="hidden";const S=Cl(O);S&&S.classList.add(d);const I=Tl(O);I&&I.classList.add(h);const v=()=>{c.current=!1,e.current&&(e.current.style.isolation=""),C&&(C.style.zIndex=""),S&&S.classList.remove(d),I&&I.classList.remove(h),O.style.position="",O.style.overflow="",O.contains(_)&&O.removeChild(_)};_.style.pointerEvents="none",_.style.position="absolute",_.style.overflow="hidden",_.setAttribute("aria-hidden","true");const x=V2(_);x&&(x.style.opacity="0");const P=Cl(_);P&&(P.classList.add(f?n[Xt.caption_before_exit]:n[Xt.caption_after_exit]),P.addEventListener("animationend",v));const M=Tl(_);M&&M.classList.add(f?n[Xt.weeks_before_exit]:n[Xt.weeks_after_exit]),O.insertBefore(_,O.firstChild)})}})}function H2(e,t,n,r){const o=e[0],s=e[e.length-1],{ISOWeek:i,fixedWeeks:a,broadcastCalendar:c}=n??{},{addDays:u,differenceInCalendarDays:l,differenceInCalendarMonths:f,endOfBroadcastWeek:d,endOfISOWeek:h,endOfMonth:m,endOfWeek:p,isAfter:y,startOfBroadcastWeek:g,startOfISOWeek:C,startOfWeek:O}=r,w=c?g(o,r):i?C(o):O(o),_=c?d(s):i?h(m(s)):p(m(s)),S=t&&(c?d(t):i?h(t):p(t)),I=S&&y(_,S)?S:_,v=l(I,w),x=f(s,o)+1,P=[];for(let F=0;F<=v;F++){const N=u(w,F);P.push(N)}const A=(c?35:42)*x;if(a&&P.length<A){const F=A-P.length;for(let N=0;N<F;N++){const W=u(P[P.length-1],1);P.push(W)}}return P}function Z2(e){const t=[];return e.reduce((n,r)=>{const o=r.weeks.reduce((s,i)=>s.concat(i.days.slice()),t.slice());return n.concat(o.slice())},t.slice())}function G2(e,t,n,r){const{numberOfMonths:o=1}=n,s=[];for(let i=0;i<o;i++){const a=r.addMonths(e,i);if(t&&a>t)break;s.push(a)}return s}function Vg(e,t,n,r){const{month:o,defaultMonth:s,today:i=r.today(),numberOfMonths:a=1}=e;let c=o||s||i;const{differenceInCalendarMonths:u,addMonths:l,startOfMonth:f}=r;if(n&&u(n,c)<a-1){const d=-1*(a-1);c=l(n,d)}return t&&u(c,t)<0&&(c=t),f(c)}function q2(e,t,n,r){const{addDays:o,endOfBroadcastWeek:s,endOfISOWeek:i,endOfMonth:a,endOfWeek:c,getISOWeek:u,getWeek:l,startOfBroadcastWeek:f,startOfISOWeek:d,startOfWeek:h}=r,m=e.reduce((p,y)=>{const g=n.broadcastCalendar?f(y,r):n.ISOWeek?d(y):h(y),C=n.broadcastCalendar?s(y):n.ISOWeek?i(a(y)):c(a(y)),O=t.filter(I=>I>=g&&I<=C),w=n.broadcastCalendar?35:42;if(n.fixedWeeks&&O.length<w){const I=t.filter(v=>{const x=w-O.length;return v>C&&v<=o(C,x)});O.push(...I)}const _=O.reduce((I,v)=>{const x=n.ISOWeek?u(v):l(v),P=I.find(A=>A.weekNumber===x),M=new Dg(v,y,r);return P?P.days.push(M):I.push(new HN(x,[M])),I},[]),S=new BN(y,_);return p.push(S),p},[]);return n.reverseMonths?m.reverse():m}function K2(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:s,startOfMonth:i,endOfMonth:a,addYears:c,endOfYear:u,newDate:l,today:f}=t,{fromYear:d,toYear:h,fromMonth:m,toMonth:p}=e;!n&&m&&(n=m),!n&&d&&(n=t.newDate(d,0,1)),!r&&p&&(r=p),!r&&h&&(r=l(h,11,31));const y=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=i(n):d?n=l(d,0,1):!n&&y&&(n=o(c(e.today??f(),-100))),r?r=a(r):h?r=l(h,11,31):!r&&y&&(r=u(e.today??f())),[n&&s(n),r&&s(r)]}function X2(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:s=1}=n,{startOfMonth:i,addMonths:a,differenceInCalendarMonths:c}=r,u=o?s:1,l=i(e);if(!t)return a(l,u);if(!(c(t,e)<s))return a(l,u)}function J2(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:s}=n,{startOfMonth:i,addMonths:a,differenceInCalendarMonths:c}=r,u=o?s??1:1,l=i(e);if(!t)return a(l,-u);if(!(c(l,t)<=0))return a(l,-u)}function Q2(e){const t=[];return e.reduce((n,r)=>n.concat(r.weeks.slice()),t.slice())}function Hi(e,t){const[n,r]=j.useState(e);return[t===void 0?n:t,r]}function eI(e,t){const[n,r]=K2(e,t),{startOfMonth:o,endOfMonth:s}=t,i=Vg(e,n,r,t),[a,c]=Hi(i,e.month?i:void 0);j.useEffect(()=>{const w=Vg(e,n,r,t);c(w)},[e.timeZone]);const{months:u,weeks:l,days:f,previousMonth:d,nextMonth:h}=j.useMemo(()=>{const w=G2(a,r,{numberOfMonths:e.numberOfMonths},t),_=H2(w,e.endMonth?s(e.endMonth):void 0,{ISOWeek:e.ISOWeek,fixedWeeks:e.fixedWeeks,broadcastCalendar:e.broadcastCalendar},t),S=q2(w,_,{broadcastCalendar:e.broadcastCalendar,fixedWeeks:e.fixedWeeks,ISOWeek:e.ISOWeek,reverseMonths:e.reverseMonths},t),I=Q2(S),v=Z2(S),x=J2(a,n,e,t),P=X2(a,r,e,t);return{months:S,weeks:I,days:v,previousMonth:x,nextMonth:P}},[t,a.getTime(),r?.getTime(),n?.getTime(),e.disableNavigation,e.broadcastCalendar,e.endMonth?.getTime(),e.fixedWeeks,e.ISOWeek,e.numberOfMonths,e.pagedNavigation,e.reverseMonths]),{disableNavigation:m,onMonthChange:p}=e,y=w=>l.some(_=>_.days.some(S=>S.isEqualTo(w))),g=w=>{if(m)return;let _=o(w);n&&_<o(n)&&(_=o(n)),r&&_>o(r)&&(_=o(r)),c(_),p?.(_)};return{months:u,weeks:l,days:f,navStart:n,navEnd:r,previousMonth:d,nextMonth:h,goToMonth:g,goToDay:w=>{y(w)||g(w.date)}}}var Wn;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(Wn||(Wn={}));function Bg(e){return!e[ft.disabled]&&!e[ft.hidden]&&!e[ft.outside]}function tI(e,t,n,r){let o,s=-1;for(const i of e){const a=t(i);Bg(a)&&(a[ft.focused]&&s<Wn.FocusedModifier?(o=i,s=Wn.FocusedModifier):r?.isEqualTo(i)&&s<Wn.LastFocused?(o=i,s=Wn.LastFocused):n(i.date)&&s<Wn.Selected?(o=i,s=Wn.Selected):a[ft.today]&&s<Wn.Today&&(o=i,s=Wn.Today))}return o||(o=e.find(i=>Bg(t(i)))),o}function nI(e,t,n,r,o,s,i){const{ISOWeek:a,broadcastCalendar:c}=s,{addDays:u,addMonths:l,addWeeks:f,addYears:d,endOfBroadcastWeek:h,endOfISOWeek:m,endOfWeek:p,max:y,min:g,startOfBroadcastWeek:C,startOfISOWeek:O,startOfWeek:w}=i;let S={day:u,week:f,month:l,year:d,startOfWeek:I=>c?C(I,i):a?O(I):w(I),endOfWeek:I=>c?h(I):a?m(I):p(I)}[e](n,t==="after"?1:-1);return t==="before"&&r?S=y([r,S]):t==="after"&&o&&(S=g([o,S])),S}function Hg(e,t,n,r,o,s,i,a=0){if(a>365)return;const c=nI(e,t,n.date,r,o,s,i),u=!!(s.disabled&&er(c,s.disabled,i)),l=!!(s.hidden&&er(c,s.hidden,i)),f=c,d=new Dg(c,f,i);return!u&&!l?d:Hg(e,t,d,r,o,s,i,a+1)}function rI(e,t,n,r,o){const{autoFocus:s}=e,[i,a]=j.useState(),c=tI(t.days,n,r||(()=>!1),i),[u,l]=j.useState(s?c:void 0);return{isFocusTarget:p=>!!c?.isEqualTo(p),setFocused:l,focused:u,blur:()=>{a(u),l(void 0)},moveFocus:(p,y)=>{if(!u)return;const g=Hg(p,y,u,t.navStart,t.navEnd,e,o);g&&(e.disableNavigation&&!t.days.some(O=>O.isEqualTo(g))||(t.goToDay(g),l(g)))}}}function oI(e,t){const{selected:n,required:r,onSelect:o}=e,[s,i]=Hi(n,o?n:void 0),a=o?n:s,{isSameDay:c}=t,u=h=>a?.some(m=>c(m,h))??!1,{min:l,max:f}=e;return{selected:a,select:(h,m,p)=>{let y=[...a??[]];if(u(h)){if(a?.length===l||r&&a?.length===1)return;y=a?.filter(g=>!c(g,h))}else a?.length===f?y=[h]:y=[...y,h];return o||i(y),o?.(y,h,m,p),y},isSelected:u}}function sI(e,t,n=0,r=0,o=!1,s=Rn){const{from:i,to:a}=t||{},{isSameDay:c,isAfter:u,isBefore:l}=s;let f;if(!i&&!a)f={from:e,to:n>0?void 0:e};else if(i&&!a)c(i,e)?n===0?f={from:i,to:e}:o?f={from:i,to:void 0}:f=void 0:l(e,i)?f={from:e,to:i}:f={from:i,to:e};else if(i&&a)if(c(i,e)&&c(a,e))o?f={from:i,to:a}:f=void 0;else if(c(i,e))f={from:i,to:n>0?void 0:e};else if(c(a,e))f={from:e,to:n>0?void 0:e};else if(l(e,i))f={from:e,to:a};else if(u(e,i))f={from:i,to:e};else if(u(e,a))f={from:i,to:e};else throw new Error("Invalid range");if(f?.from&&f?.to){const d=s.differenceInCalendarDays(f.to,f.from);r>0&&d>r?f={from:e,to:void 0}:n>1&&d<n&&(f={from:e,to:void 0})}return f}function iI(e,t,n=Rn){const r=Array.isArray(t)?t:[t];let o=e.from;const s=n.differenceInCalendarDays(e.to,e.from),i=Math.min(s,6);for(let a=0;a<=i;a++){if(r.includes(o.getDay()))return!0;o=n.addDays(o,1)}return!1}function Zg(e,t,n=Rn){return Qn(e,t.from,!1,n)||Qn(e,t.to,!1,n)||Qn(t,e.from,!1,n)||Qn(t,e.to,!1,n)}function aI(e,t,n=Rn){const r=Array.isArray(t)?t:[t];if(r.filter(a=>typeof a!="function").some(a=>typeof a=="boolean"?a:n.isDate(a)?Qn(e,a,!1,n):Pg(a,n)?a.some(c=>Qn(e,c,!1,n)):Bi(a)?a.from&&a.to?Zg(e,{from:a.from,to:a.to},n):!1:Ag(a)?iI(e,a.dayOfWeek,n):wl(a)?n.isAfter(a.before,a.after)?Zg(e,{from:n.addDays(a.after,1),to:n.addDays(a.before,-1)},n):er(e.from,a,n)||er(e.to,a,n):_l(a)||Sl(a)?er(e.from,a,n)||er(e.to,a,n):!1))return!0;const i=r.filter(a=>typeof a=="function");if(i.length){let a=e.from;const c=n.differenceInCalendarDays(e.to,e.from);for(let u=0;u<=c;u++){if(i.some(l=>l(a)))return!0;a=n.addDays(a,1)}}return!1}function cI(e,t){const{disabled:n,excludeDisabled:r,selected:o,required:s,onSelect:i}=e,[a,c]=Hi(o,i?o:void 0),u=i?o:a;return{selected:u,select:(d,h,m)=>{const{min:p,max:y}=e,g=d?sI(d,u,p,y,s,t):void 0;return r&&n&&g?.from&&g.to&&aI({from:g.from,to:g.to},n,t)&&(g.from=d,g.to=void 0),i||c(g),i?.(g,d,h,m),g},isSelected:d=>u&&Qn(u,d,!1,t)}}function lI(e,t){const{selected:n,required:r,onSelect:o}=e,[s,i]=Hi(n,o?n:void 0),a=o?n:s,{isSameDay:c}=t;return{selected:a,select:(f,d,h)=>{let m=f;return!r&&a&&a&&c(f,a)&&(m=void 0),o||i(m),o?.(m,f,d,h),m},isSelected:f=>a?c(a,f):!1}}function uI(e,t){const n=lI(e,t),r=oI(e,t),o=cI(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function an(e,t){return e instanceof At&&e.timeZone===t?e:new At(e,t)}function ko(e,t,n){return an(e,t)}function Gg(e,t,n){return typeof e=="boolean"||typeof e=="function"?e:e instanceof Date?ko(e,t):Array.isArray(e)?e.map(r=>r instanceof Date?ko(r,t):r):Bi(e)?{...e,from:e.from?an(e.from,t):e.from,to:e.to?an(e.to,t):e.to}:wl(e)?{before:ko(e.before,t),after:ko(e.after,t)}:_l(e)?{after:ko(e.after,t)}:Sl(e)?{before:ko(e.before,t)}:e}function Dl(e,t,n){return e&&(Array.isArray(e)?e.map(r=>Gg(r,t)):Gg(e,t))}function fI(e){let t=e;const n=t.timeZone;if(n&&(t={...e,timeZone:n},t.today&&(t.today=an(t.today,n)),t.month&&(t.month=an(t.month,n)),t.defaultMonth&&(t.defaultMonth=an(t.defaultMonth,n)),t.startMonth&&(t.startMonth=an(t.startMonth,n)),t.endMonth&&(t.endMonth=an(t.endMonth,n)),t.mode==="single"&&t.selected?t.selected=an(t.selected,n):t.mode==="multiple"&&t.selected?t.selected=t.selected?.map(_e=>an(_e,n)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?an(t.selected.from,n):t.selected.from,to:t.selected.to?an(t.selected.to,n):t.selected.to}),t.disabled!==void 0&&(t.disabled=Dl(t.disabled,n)),t.hidden!==void 0&&(t.hidden=Dl(t.hidden,n)),t.modifiers)){const _e={};Object.keys(t.modifiers).forEach(De=>{_e[De]=Dl(t.modifiers?.[De],n)}),t.modifiers=_e}const{components:r,formatters:o,labels:s,dateLib:i,locale:a,classNames:c}=j.useMemo(()=>{const _e={...Tg,...t.locale},De=t.broadcastCalendar?1:t.weekStartsOn,ve=t.noonSafe&&t.timeZone?U2(t.timeZone,{weekStartsOn:De,locale:_e}):void 0,Ee=t.dateLib&&ve?{...ve,...t.dateLib}:t.dateLib??ve,Xe=new Kt({locale:_e,weekStartsOn:De,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},Ee);return{dateLib:Xe,components:S2(t.components),formatters:A2(t.formatters),labels:R2(t.labels,Xe.options),locale:_e,classNames:{...kl(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.noonSafe,t.components,t.formatters,t.labels,t.classNames]);t.today||(t={...t,today:i.today()});const{captionLayout:u,mode:l,navLayout:f,numberOfMonths:d=1,onDayBlur:h,onDayClick:m,onDayFocus:p,onDayKeyDown:y,onDayMouseEnter:g,onDayMouseLeave:C,onNextClick:O,onPrevClick:w,showWeekNumber:_,styles:S}=t,{formatCaption:I,formatDay:v,formatMonthDropdown:x,formatWeekNumber:P,formatWeekNumberHeader:M,formatWeekdayName:A,formatYearDropdown:F}=o,N=eI(t,i),{days:W,months:E,navStart:k,navEnd:U,previousMonth:$,nextMonth:D,goToMonth:V}=N,Z=w2(W,t,k,U,i),{isSelected:G,select:B,selected:z}=uI(t,i)??{},{blur:X,focused:q,isFocusTarget:oe,moveFocus:Q,setFocused:re}=rI(t,N,Z,G??(()=>!1),i),{labelDayButton:le,labelGridcell:K,labelGrid:Se,labelMonthDropdown:Ie,labelNav:ke,labelPrevious:Ge,labelNext:Re,labelWeekday:We,labelWeekNumber:nt,labelWeekNumberHeader:rt,labelYearDropdown:R}=s,Y=j.useMemo(()=>L2(i,t.ISOWeek,t.broadcastCalendar,t.today),[i,t.ISOWeek,t.broadcastCalendar,t.today]),H=l!==void 0||m!==void 0,ee=j.useCallback(()=>{$&&(V($),w?.($))},[$,V,w]),te=j.useCallback(()=>{D&&(V(D),O?.(D))},[V,D,O]),ne=j.useCallback((_e,De)=>ve=>{ve.preventDefault(),ve.stopPropagation(),re(_e),!De.disabled&&(B?.(_e.date,De,ve),m?.(_e.date,De,ve))},[B,m,re]),ue=j.useCallback((_e,De)=>ve=>{re(_e),p?.(_e.date,De,ve)},[p,re]),be=j.useCallback((_e,De)=>ve=>{X(),h?.(_e.date,De,ve)},[X,h]),Oe=j.useCallback((_e,De)=>ve=>{const Ee={ArrowLeft:[ve.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[ve.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[ve.shiftKey?"year":"week","after"],ArrowUp:[ve.shiftKey?"year":"week","before"],PageUp:[ve.shiftKey?"year":"month","before"],PageDown:[ve.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(Ee[ve.key]){ve.preventDefault(),ve.stopPropagation();const[Xe,xe]=Ee[ve.key];Q(Xe,xe)}y?.(_e.date,De,ve)},[Q,y,t.dir]),ze=j.useCallback((_e,De)=>ve=>{g?.(_e.date,De,ve)},[g]),ot=j.useCallback((_e,De)=>ve=>{C?.(_e.date,De,ve)},[C]),Qe=j.useCallback(_e=>De=>{const ve=Number(De.target.value),Ee=i.setMonth(i.startOfMonth(_e),ve);V(Ee)},[i,V]),xt=j.useCallback(_e=>De=>{const ve=Number(De.target.value),Ee=i.setYear(i.startOfMonth(_e),ve);V(Ee)},[i,V]),{className:gt,style:dt}=j.useMemo(()=>({className:[c[me.Root],t.className].filter(Boolean).join(" "),style:{...S?.[me.Root],...t.style}}),[c,t.className,t.style,S]),jt=k2(t),Sn=j.useRef(null);B2(Sn,!!t.animate,{classNames:c,months:E,focused:q,dateLib:i});const kn={dayPickerProps:t,selected:z,select:B,isSelected:G,months:E,nextMonth:D,previousMonth:$,goToMonth:V,getModifiers:Z,components:r,classNames:c,styles:S,labels:s,formatters:o};return j.createElement(Mg.Provider,{value:kn},j.createElement(r.Root,{rootRef:t.animate?Sn:void 0,className:gt,style:dt,dir:t.dir,id:t.id,lang:t.lang,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],"aria-labelledby":t["aria-labelledby"],...jt},j.createElement(r.Months,{className:c[me.Months],style:S?.[me.Months]},!t.hideNavigation&&!f&&j.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:c[me.Nav],style:S?.[me.Nav],"aria-label":ke(),onPreviousClick:ee,onNextClick:te,previousMonth:$,nextMonth:D}),E.map((_e,De)=>j.createElement(r.Month,{"data-animated-month":t.animate?"true":void 0,className:c[me.Month],style:S?.[me.Month],key:De,displayIndex:De,calendarMonth:_e},f==="around"&&!t.hideNavigation&&De===0&&j.createElement(r.PreviousMonthButton,{type:"button",className:c[me.PreviousMonthButton],tabIndex:$?void 0:-1,"aria-disabled":$?void 0:!0,"aria-label":Ge($),onClick:ee,"data-animated-button":t.animate?"true":void 0},j.createElement(r.Chevron,{disabled:$?void 0:!0,className:c[me.Chevron],orientation:t.dir==="rtl"?"right":"left"})),j.createElement(r.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:c[me.MonthCaption],style:S?.[me.MonthCaption],calendarMonth:_e,displayIndex:De},u?.startsWith("dropdown")?j.createElement(r.DropdownNav,{className:c[me.Dropdowns],style:S?.[me.Dropdowns]},(()=>{const ve=u==="dropdown"||u==="dropdown-months"?j.createElement(r.MonthsDropdown,{key:"month",className:c[me.MonthsDropdown],"aria-label":Ie(),classNames:c,components:r,disabled:!!t.disableNavigation,onChange:Qe(_e.date),options:W2(_e.date,k,U,o,i),style:S?.[me.Dropdown],value:i.getMonth(_e.date)}):j.createElement("span",{key:"month"},x(_e.date,i)),Ee=u==="dropdown"||u==="dropdown-years"?j.createElement(r.YearsDropdown,{key:"year",className:c[me.YearsDropdown],"aria-label":R(i.options),classNames:c,components:r,disabled:!!t.disableNavigation,onChange:xt(_e.date),options:$2(k,U,o,i,!!t.reverseYears),style:S?.[me.Dropdown],value:i.getYear(_e.date)}):j.createElement("span",{key:"year"},F(_e.date,i));return i.getMonthYearOrder()==="year-first"?[Ee,ve]:[ve,Ee]})(),j.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},I(_e.date,i.options,i))):j.createElement(r.CaptionLabel,{className:c[me.CaptionLabel],role:"status","aria-live":"polite"},I(_e.date,i.options,i))),f==="around"&&!t.hideNavigation&&De===d-1&&j.createElement(r.NextMonthButton,{type:"button",className:c[me.NextMonthButton],tabIndex:D?void 0:-1,"aria-disabled":D?void 0:!0,"aria-label":Re(D),onClick:te,"data-animated-button":t.animate?"true":void 0},j.createElement(r.Chevron,{disabled:D?void 0:!0,className:c[me.Chevron],orientation:t.dir==="rtl"?"left":"right"})),De===d-1&&f==="after"&&!t.hideNavigation&&j.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:c[me.Nav],style:S?.[me.Nav],"aria-label":ke(),onPreviousClick:ee,onNextClick:te,previousMonth:$,nextMonth:D}),j.createElement(r.MonthGrid,{role:"grid","aria-multiselectable":l==="multiple"||l==="range","aria-label":Se(_e.date,i.options,i)||void 0,className:c[me.MonthGrid],style:S?.[me.MonthGrid]},!t.hideWeekdays&&j.createElement(r.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:c[me.Weekdays],style:S?.[me.Weekdays]},_&&j.createElement(r.WeekNumberHeader,{"aria-label":rt(i.options),className:c[me.WeekNumberHeader],style:S?.[me.WeekNumberHeader],scope:"col"},M()),Y.map(ve=>j.createElement(r.Weekday,{"aria-label":We(ve,i.options,i),className:c[me.Weekday],key:String(ve),style:S?.[me.Weekday],scope:"col"},A(ve,i.options,i)))),j.createElement(r.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:c[me.Weeks],style:S?.[me.Weeks]},_e.weeks.map(ve=>j.createElement(r.Week,{className:c[me.Week],key:ve.weekNumber,style:S?.[me.Week],week:ve},_&&j.createElement(r.WeekNumber,{week:ve,style:S?.[me.WeekNumber],"aria-label":nt(ve.weekNumber,{locale:a}),className:c[me.WeekNumber],scope:"row",role:"rowheader"},P(ve.weekNumber,i)),ve.days.map(Ee=>{const{date:Xe}=Ee,xe=Z(Ee);if(xe[ft.focused]=!xe.hidden&&!!q?.isEqualTo(Ee),xe[bn.selected]=G?.(Xe)||xe.selected,Bi(z)){const{from:Qt,to:Oo}=z;xe[bn.range_start]=!!(Qt&&Oo&&i.isSameDay(Xe,Qt)),xe[bn.range_end]=!!(Qt&&Oo&&i.isSameDay(Xe,Oo)),xe[bn.range_middle]=Qn(z,Xe,!0,i)}const tr=z2(xe,S,t.modifiersStyles),ct=_2(xe,c,t.modifiersClassNames),Pt=!H&&!xe.hidden?K(Xe,xe,i.options,i):void 0;return j.createElement(r.Day,{key:`${Ee.isoDate}_${Ee.displayMonthId}`,day:Ee,modifiers:xe,className:ct.join(" "),style:tr,role:"gridcell","aria-selected":xe.selected||void 0,"aria-label":Pt,"data-day":Ee.isoDate,"data-month":Ee.outside?Ee.dateMonthId:void 0,"data-selected":xe.selected||void 0,"data-disabled":xe.disabled||void 0,"data-hidden":xe.hidden||void 0,"data-outside":Ee.outside||void 0,"data-focused":xe.focused||void 0,"data-today":xe.today||void 0},!xe.hidden&&H?j.createElement(r.DayButton,{className:c[me.DayButton],style:S?.[me.DayButton],type:"button",day:Ee,modifiers:xe,disabled:!xe.focused&&xe.disabled||void 0,"aria-disabled":xe.focused&&xe.disabled||void 0,tabIndex:oe(Ee)?0:-1,"aria-label":le(Xe,xe,i.options,i),onClick:ne(Ee,xe),onBlur:be(Ee,xe),onFocus:ue(Ee,xe),onKeyDown:Oe(Ee,xe),onMouseEnter:ze(Ee,xe),onMouseLeave:ot(Ee,xe)},v(Xe,i.options,i)):!xe.hidden&&v(Ee.date,i.options,i))})))))))),t.footer&&j.createElement(r.Footer,{className:c[me.Footer],style:S?.[me.Footer],role:"status","aria-live":"polite"},t.footer)))}function dI({className:e,classNames:t,showOutsideDays:n=!0,captionLayout:r="label",buttonVariant:o="ghost",formatters:s,components:i,...a}){const c=kl();return T.jsx(fI,{showOutsideDays:n,className:Me("bg-background group/calendar p-3 [--cell-size:2rem] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,e),captionLayout:r,formatters:{formatMonthDropdown:u=>u.toLocaleString("default",{month:"short"}),...s},classNames:{root:Me("w-fit",c.root),months:Me("relative flex flex-col gap-4 md:flex-row",c.months),month:Me("flex w-full flex-col gap-4",c.month),nav:Me("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",c.nav),button_previous:Me(pl({variant:o}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",c.button_previous),button_next:Me(pl({variant:o}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",c.button_next),month_caption:Me("flex h-[--cell-size] w-full items-center justify-center px-[--cell-size]",c.month_caption),dropdowns:Me("flex h-[--cell-size] w-full items-center justify-center gap-1.5 text-sm font-medium",c.dropdowns),dropdown_root:Me("has-focus:border-ring border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] relative rounded-md border",c.dropdown_root),dropdown:Me("bg-popover absolute inset-0 opacity-0",c.dropdown),caption_label:Me("select-none font-medium",r==="label"?"text-sm":"[&>svg]:text-muted-foreground flex h-8 items-center gap-1 rounded-md pl-2 pr-1 text-sm [&>svg]:size-3.5",c.caption_label),table:"w-full border-collapse",weekdays:Me("flex",c.weekdays),weekday:Me("text-muted-foreground flex-1 select-none rounded-md text-[0.8rem] font-normal",c.weekday),week:Me("mt-2 flex w-full",c.week),week_number_header:Me("w-[--cell-size] select-none",c.week_number_header),week_number:Me("text-muted-foreground select-none text-[0.8rem]",c.week_number),day:Me("group/day relative aspect-square h-full w-full select-none p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md",c.day),range_start:Me("bg-accent rounded-l-md",c.range_start),range_middle:Me("rounded-none",c.range_middle),range_end:Me("bg-accent rounded-r-md",c.range_end),today:Me("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",c.today),outside:Me("text-muted-foreground aria-selected:text-muted-foreground",c.outside),disabled:Me("text-muted-foreground opacity-50",c.disabled),hidden:Me("invisible",c.hidden),...t},components:{Root:({className:u,rootRef:l,...f})=>T.jsx("div",{"data-slot":"calendar",ref:l,className:Me(u),...f}),Chevron:({className:u,orientation:l,...f})=>l==="left"?T.jsx(NT,{className:Me("size-4",u),...f}):l==="right"?T.jsx(IT,{className:Me("size-4",u),...f}):T.jsx(Pc,{className:Me("size-4",u),...f}),DayButton:hI,WeekNumber:({children:u,...l})=>T.jsx("td",{...l,children:T.jsx("div",{className:"flex size-[--cell-size] items-center justify-center text-center",children:u})}),...i},...a})}function hI({className:e,day:t,modifiers:n,...r}){const o=kl(),s=b.useRef(null);return b.useEffect(()=>{n.focused&&s.current?.focus()},[n.focused]),T.jsx(vo,{ref:s,variant:"ghost",size:"icon","data-day":t.date.toLocaleDateString(),"data-selected-single":n.selected&&!n.range_start&&!n.range_end&&!n.range_middle,"data-range-start":n.range_start,"data-range-end":n.range_end,"data-range-middle":n.range_middle,className:Me("data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 flex aspect-square h-auto w-full min-w-[--cell-size] flex-col gap-1 font-normal leading-none data-[range-end=true]:rounded-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] [&>span]:text-xs [&>span]:opacity-70",o.day,e),...r})}function pI(e){const t=mI(e),n=b.forwardRef((r,o)=>{const{children:s,...i}=r,a=b.Children.toArray(s),c=a.find(yI);if(c){const u=c.props.children,l=a.map(f=>f===c?b.Children.count(u)>1?b.Children.only(null):b.isValidElement(u)?u.props.children:null:f);return T.jsx(t,{...i,ref:o,children:b.isValidElement(u)?b.cloneElement(u,void 0,l):null})}return T.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function mI(e){const t=b.forwardRef((n,r)=>{const{children:o,...s}=n;if(b.isValidElement(o)){const i=bI(o),a=vI(s,o.props);return o.type!==b.Fragment&&(a.ref=r?Nr(r,i):i),b.cloneElement(o,a)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var gI=Symbol("radix.slottable");function yI(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===gI}function vI(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const c=s(...a);return o(...a),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function bI(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Zi="Popover",[qg]=Kn(Zi,[Oi]),us=Oi(),[wI,kr]=qg(Zi),Kg=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!1}=e,a=us(t),c=b.useRef(null),[u,l]=b.useState(!1),[f,d]=Rr({prop:r,defaultProp:o??!1,onChange:s,caller:Zi});return T.jsx(rm,{...a,children:T.jsx(wI,{scope:t,contentId:dr(),triggerRef:c,open:f,onOpenChange:d,onOpenToggle:b.useCallback(()=>d(h=>!h),[d]),hasCustomAnchor:u,onCustomAnchorAdd:b.useCallback(()=>l(!0),[]),onCustomAnchorRemove:b.useCallback(()=>l(!1),[]),modal:i,children:n})})};Kg.displayName=Zi;var Xg="PopoverAnchor",_I=b.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=kr(Xg,n),s=us(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:a}=o;return b.useEffect(()=>(i(),()=>a()),[i,a]),T.jsx(Jc,{...s,...r,ref:t})});_I.displayName=Xg;var Jg="PopoverTrigger",Qg=b.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=kr(Jg,n),s=us(n),i=He(t,o.triggerRef),a=T.jsx(Ne.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":oy(o.open),...r,ref:i,onClick:Te(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?a:T.jsx(Jc,{asChild:!0,...s,children:a})});Qg.displayName=Jg;var Ml="PopoverPortal",[SI,kI]=qg(Ml,{forceMount:void 0}),ey=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,s=kr(Ml,t);return T.jsx(SI,{scope:t,forceMount:n,children:T.jsx(pr,{present:n||s.open,children:T.jsx(Ei,{asChild:!0,container:o,children:r})})})};ey.displayName=Ml;var xo="PopoverContent",ty=b.forwardRef((e,t)=>{const n=kI(xo,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,s=kr(xo,e.__scopePopover);return T.jsx(pr,{present:r||s.open,children:s.modal?T.jsx(OI,{...o,ref:t}):T.jsx(EI,{...o,ref:t})})});ty.displayName=xo;var xI=pI("PopoverContent.RemoveScroll"),OI=b.forwardRef((e,t)=>{const n=kr(xo,e.__scopePopover),r=b.useRef(null),o=He(t,r),s=b.useRef(!1);return b.useEffect(()=>{const i=r.current;if(i)return el(i)},[]),T.jsx(Ii,{as:xI,allowPinchZoom:!0,children:T.jsx(ny,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Te(e.onCloseAutoFocus,i=>{i.preventDefault(),s.current||n.triggerRef.current?.focus()}),onPointerDownOutside:Te(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0,u=a.button===2||c;s.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:Te(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),EI=b.forwardRef((e,t)=>{const n=kr(xo,e.__scopePopover),r=b.useRef(!1),o=b.useRef(!1);return T.jsx(ny,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||n.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;n.triggerRef.current?.contains(i)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),ny=b.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:l,...f}=e,d=kr(xo,n),h=us(n);return Rc(),T.jsx(pi,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:T.jsx(hi,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:l,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>d.onOpenChange(!1),children:T.jsx(om,{"data-state":oy(d.open),role:"dialog",id:d.contentId,...h,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),ry="PopoverClose",CI=b.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=kr(ry,n);return T.jsx(Ne.button,{type:"button",...r,ref:t,onClick:Te(e.onClick,()=>o.onOpenChange(!1))})});CI.displayName=ry;var TI="PopoverArrow",DI=b.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=us(n);return T.jsx(sm,{...o,...r,ref:t})});DI.displayName=TI;function oy(e){return e?"open":"closed"}var MI=Kg,AI=Qg,PI=ey,sy=ty;const NI=MI,II=AI,iy=b.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},o)=>T.jsx(PI,{children:T.jsx(sy,{ref:o,align:t,sideOffset:n,className:Me("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]",e),...r})}));iy.displayName=sy.displayName;const FI=(e={})=>{const{field:t={},form:n={},question:r={},disabled:o=!1}=e,s=t.value||void 0,i=t.onChange,[a,c]=j.useState(!1),u=l=>{l&&(i(l),c(!1))};return T.jsxs(NI,{open:a,onOpenChange:c,children:[T.jsx(II,{asChild:!0,children:T.jsx("div",{className:"block",children:T.jsxs(vo,{...t,type:"button",variant:"outline",className:Me("bq-date-picker-button w-full justify-start text-left font-normal focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",!t.value&&"text-muted-foreground",n.formState.errors[r.reference_id]&&"border-destructive"),disabled:o,children:[T.jsx(PT,{className:"mr-2 h-4 w-4"}),t.value?ce(t.value).format("DD/MM/YYYY"):T.jsx("span",{children:r.placeholder||"Pick a date"})]})})}),T.jsx(iy,{className:"bq-date-picker-popover w-auto overflow-hidden p-0",align:"center",children:T.jsx(dI,{className:"w-56",mode:"single",selected:s,defaultMonth:s,captionLayout:"dropdown",onSelect:l=>{u(l),c(!1)}})})]})};function RI(e){const t=WI(e),n=b.forwardRef((r,o)=>{const{children:s,...i}=r,a=b.Children.toArray(s),c=a.find(LI);if(c){const u=c.props.children,l=a.map(f=>f===c?b.Children.count(u)>1?b.Children.only(null):b.isValidElement(u)?u.props.children:null:f);return T.jsx(t,{...i,ref:o,children:b.isValidElement(u)?b.cloneElement(u,void 0,l):null})}return T.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function WI(e){const t=b.forwardRef((n,r)=>{const{children:o,...s}=n;if(b.isValidElement(o)){const i=UI(o),a=$I(s,o.props);return o.type!==b.Fragment&&(a.ref=r?Nr(r,i):i),b.cloneElement(o,a)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var zI=Symbol("radix.slottable");function LI(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===zI}function $I(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const c=s(...a);return o(...a),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function UI(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Gi="Dialog",[ay]=Kn(Gi),[YI,_n]=ay(Gi),cy=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!0}=e,a=b.useRef(null),c=b.useRef(null),[u,l]=Rr({prop:r,defaultProp:o??!1,onChange:s,caller:Gi});return T.jsx(YI,{scope:t,triggerRef:a,contentRef:c,contentId:dr(),titleId:dr(),descriptionId:dr(),open:u,onOpenChange:l,onOpenToggle:b.useCallback(()=>l(f=>!f),[l]),modal:i,children:n})};cy.displayName=Gi;var ly="DialogTrigger",uy=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=_n(ly,n),s=He(t,o.triggerRef);return T.jsx(Ne.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Nl(o.open),...r,ref:s,onClick:Te(e.onClick,o.onOpenToggle)})});uy.displayName=ly;var Al="DialogPortal",[jI,fy]=ay(Al,{forceMount:void 0}),dy=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=_n(Al,t);return T.jsx(jI,{scope:t,forceMount:n,children:b.Children.map(r,i=>T.jsx(pr,{present:n||s.open,children:T.jsx(Ei,{asChild:!0,container:o,children:i})}))})};dy.displayName=Al;var qi="DialogOverlay",hy=b.forwardRef((e,t)=>{const n=fy(qi,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=_n(qi,e.__scopeDialog);return s.modal?T.jsx(pr,{present:r||s.open,children:T.jsx(BI,{...o,ref:t})}):null});hy.displayName=qi;var VI=RI("DialogOverlay.RemoveScroll"),BI=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=_n(qi,n);return T.jsx(Ii,{as:VI,allowPinchZoom:!0,shards:[o.contentRef],children:T.jsx(Ne.div,{"data-state":Nl(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),jr="DialogContent",py=b.forwardRef((e,t)=>{const n=fy(jr,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=_n(jr,e.__scopeDialog);return T.jsx(pr,{present:r||s.open,children:s.modal?T.jsx(HI,{...o,ref:t}):T.jsx(ZI,{...o,ref:t})})});py.displayName=jr;var HI=b.forwardRef((e,t)=>{const n=_n(jr,e.__scopeDialog),r=b.useRef(null),o=He(t,n.contentRef,r);return b.useEffect(()=>{const s=r.current;if(s)return el(s)},[]),T.jsx(my,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Te(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Te(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,a=i.button===0&&i.ctrlKey===!0;(i.button===2||a)&&s.preventDefault()}),onFocusOutside:Te(e.onFocusOutside,s=>s.preventDefault())})}),ZI=b.forwardRef((e,t)=>{const n=_n(jr,e.__scopeDialog),r=b.useRef(!1),o=b.useRef(!1);return T.jsx(my,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||n.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;n.triggerRef.current?.contains(i)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),my=b.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...i}=e,a=_n(jr,n),c=b.useRef(null),u=He(t,c);return Rc(),T.jsxs(T.Fragment,{children:[T.jsx(pi,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:T.jsx(hi,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Nl(a.open),...i,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),T.jsxs(T.Fragment,{children:[T.jsx(GI,{titleId:a.titleId}),T.jsx(KI,{contentRef:c,descriptionId:a.descriptionId})]})]})}),Pl="DialogTitle",gy=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=_n(Pl,n);return T.jsx(Ne.h2,{id:o.titleId,...r,ref:t})});gy.displayName=Pl;var yy="DialogDescription",vy=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=_n(yy,n);return T.jsx(Ne.p,{id:o.descriptionId,...r,ref:t})});vy.displayName=yy;var by="DialogClose",wy=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=_n(by,n);return T.jsx(Ne.button,{type:"button",...r,ref:t,onClick:Te(e.onClick,()=>o.onOpenChange(!1))})});wy.displayName=by;function Nl(e){return e?"open":"closed"}var _y="DialogTitleWarning",[SR,Sy]=NC(_y,{contentName:jr,titleName:Pl,docsSlug:"dialog"}),GI=({titleId:e})=>{const t=Sy(_y),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
103
103
 
104
104
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
105
105
 
106
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return b.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},qI="DialogDescriptionWarning",KI=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Sy(qI).contentName}}.`;return b.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},XI=cy,JI=uy,QI=dy,ky=hy,xy=py,Oy=gy,Ey=vy,eF=wy;const tF=XI,nF=JI,rF=QI,Cy=b.forwardRef(({className:e,...t},n)=>T.jsx(ky,{ref:n,className:Ae("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Cy.displayName=ky.displayName;const Ty=b.forwardRef(({className:e,children:t,...n},r)=>T.jsxs(rF,{children:[T.jsx(Cy,{}),T.jsxs(xy,{ref:r,className:Ae("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,T.jsxs(eF,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[T.jsx(WT,{className:"h-4 w-4"}),T.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Ty.displayName=xy.displayName;const Dy=({className:e,...t})=>T.jsx("div",{className:Ae("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Dy.displayName="DialogHeader";const Ay=({className:e,...t})=>T.jsx("div",{className:Ae("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ay.displayName="DialogFooter";const My=b.forwardRef(({className:e,...t},n)=>T.jsx(Oy,{ref:n,className:Ae("text-lg font-semibold leading-none tracking-tight",e),...t}));My.displayName=Oy.displayName;const oF=b.forwardRef(({className:e,...t},n)=>T.jsx(Ey,{ref:n,className:Ae("text-sm text-muted-foreground",e),...t}));oF.displayName=Ey.displayName;function Il(){return Il=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Il.apply(null,arguments)}function sF(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function iF(e,t){if(e==null)return{};var n,r,o=sF(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Fl(e){"@babel/helpers - typeof";return Fl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fl(e)}function aF(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}function cF(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Rl(e,t){return Rl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Rl(e,t)}function lF(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Rl(e,t)}function Ki(e){return Ki=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ki(e)}function Py(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Py=function(){return!!e})()}function uF(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fF(e,t){if(t&&(Fl(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return uF(e)}function dF(e){var t=Py();return function(){var n,r=Ki(e);if(t){var o=Ki(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return fF(this,n)}}var Xi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Wl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ji={exports:{}},Qi={exports:{}},Ye={};var Ny;function hF(){if(Ny)return Ye;Ny=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,l=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function O(_){if(typeof _=="object"&&_!==null){var S=_.$$typeof;switch(S){case t:switch(_=_.type,_){case c:case u:case r:case s:case o:case f:return _;default:switch(_=_&&_.$$typeof,_){case a:case l:case m:case h:case i:return _;default:return S}}case n:return S}}}function w(_){return O(_)===u}return Ye.AsyncMode=c,Ye.ConcurrentMode=u,Ye.ContextConsumer=a,Ye.ContextProvider=i,Ye.Element=t,Ye.ForwardRef=l,Ye.Fragment=r,Ye.Lazy=m,Ye.Memo=h,Ye.Portal=n,Ye.Profiler=s,Ye.StrictMode=o,Ye.Suspense=f,Ye.isAsyncMode=function(_){return w(_)||O(_)===c},Ye.isConcurrentMode=w,Ye.isContextConsumer=function(_){return O(_)===a},Ye.isContextProvider=function(_){return O(_)===i},Ye.isElement=function(_){return typeof _=="object"&&_!==null&&_.$$typeof===t},Ye.isForwardRef=function(_){return O(_)===l},Ye.isFragment=function(_){return O(_)===r},Ye.isLazy=function(_){return O(_)===m},Ye.isMemo=function(_){return O(_)===h},Ye.isPortal=function(_){return O(_)===n},Ye.isProfiler=function(_){return O(_)===s},Ye.isStrictMode=function(_){return O(_)===o},Ye.isSuspense=function(_){return O(_)===f},Ye.isValidElementType=function(_){return typeof _=="string"||typeof _=="function"||_===r||_===u||_===s||_===o||_===f||_===d||typeof _=="object"&&_!==null&&(_.$$typeof===m||_.$$typeof===h||_.$$typeof===i||_.$$typeof===a||_.$$typeof===l||_.$$typeof===y||_.$$typeof===g||_.$$typeof===C||_.$$typeof===p)},Ye.typeOf=O,Ye}var je={};var Iy;function pF(){return Iy||(Iy=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,l=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function O(K){return typeof K=="string"||typeof K=="function"||K===r||K===u||K===s||K===o||K===f||K===d||typeof K=="object"&&K!==null&&(K.$$typeof===m||K.$$typeof===h||K.$$typeof===i||K.$$typeof===a||K.$$typeof===l||K.$$typeof===y||K.$$typeof===g||K.$$typeof===C||K.$$typeof===p)}function w(K){if(typeof K=="object"&&K!==null){var Se=K.$$typeof;switch(Se){case t:var Ie=K.type;switch(Ie){case c:case u:case r:case s:case o:case f:return Ie;default:var ke=Ie&&Ie.$$typeof;switch(ke){case a:case l:case m:case h:case i:return ke;default:return Se}}case n:return Se}}}var _=c,S=u,I=a,v=i,x=t,P=l,A=r,M=m,F=h,N=n,W=s,E=o,k=f,U=!1;function $(K){return U||(U=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),D(K)||w(K)===c}function D(K){return w(K)===u}function V(K){return w(K)===a}function Z(K){return w(K)===i}function G(K){return typeof K=="object"&&K!==null&&K.$$typeof===t}function B(K){return w(K)===l}function z(K){return w(K)===r}function X(K){return w(K)===m}function q(K){return w(K)===h}function oe(K){return w(K)===n}function Q(K){return w(K)===s}function re(K){return w(K)===o}function le(K){return w(K)===f}je.AsyncMode=_,je.ConcurrentMode=S,je.ContextConsumer=I,je.ContextProvider=v,je.Element=x,je.ForwardRef=P,je.Fragment=A,je.Lazy=M,je.Memo=F,je.Portal=N,je.Profiler=W,je.StrictMode=E,je.Suspense=k,je.isAsyncMode=$,je.isConcurrentMode=D,je.isContextConsumer=V,je.isContextProvider=Z,je.isElement=G,je.isForwardRef=B,je.isFragment=z,je.isLazy=X,je.isMemo=q,je.isPortal=oe,je.isProfiler=Q,je.isStrictMode=re,je.isSuspense=le,je.isValidElementType=O,je.typeOf=w})()),je}var Fy;function Ry(){return Fy||(Fy=1,process.env.NODE_ENV==="production"?Qi.exports=hF():Qi.exports=pF()),Qi.exports}var zl,Wy;function mF(){if(Wy)return zl;Wy=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var i={},a=0;a<10;a++)i["_"+String.fromCharCode(a)]=a;var c=Object.getOwnPropertyNames(i).map(function(l){return i[l]});if(c.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(l){u[l]=l}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return zl=o()?Object.assign:function(s,i){for(var a,c=r(s),u,l=1;l<arguments.length;l++){a=Object(arguments[l]);for(var f in a)t.call(a,f)&&(c[f]=a[f]);if(e){u=e(a);for(var d=0;d<u.length;d++)n.call(a,u[d])&&(c[u[d]]=a[u[d]])}}return c},zl}var Ll,zy;function $l(){if(zy)return Ll;zy=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ll=e,Ll}var Ul,Ly;function $y(){return Ly||(Ly=1,Ul=Function.call.bind(Object.prototype.hasOwnProperty)),Ul}var Yl,Uy;function gF(){if(Uy)return Yl;Uy=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=$l(),n={},r=$y();e=function(s){var i="Warning: "+s;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function o(s,i,a,c,u){if(process.env.NODE_ENV!=="production"){for(var l in s)if(r(s,l)){var f;try{if(typeof s[l]!="function"){var d=Error((c||"React class")+": "+a+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}f=s[l](i,l,c,a,null,t)}catch(m){f=m}if(f&&!(f instanceof Error)&&e((c||"React class")+": type specification of "+a+" `"+l+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var h=u?u():"";e("Failed "+a+" type: "+f.message+(h??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Yl=o,Yl}var jl,Yy;function yF(){if(Yy)return jl;Yy=1;var e=Ry(),t=mF(),n=$l(),r=$y(),o=gF(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(a){var c="Warning: "+a;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function i(){return null}return jl=function(a,c){var u=typeof Symbol=="function"&&Symbol.iterator,l="@@iterator";function f(D){var V=D&&(u&&D[u]||D[l]);if(typeof V=="function")return V}var d="<<anonymous>>",h={array:g("array"),bigint:g("bigint"),bool:g("boolean"),func:g("function"),number:g("number"),object:g("object"),string:g("string"),symbol:g("symbol"),any:C(),arrayOf:O,element:w(),elementType:_(),instanceOf:S,node:P(),objectOf:v,oneOf:I,oneOfType:x,shape:M,exact:F};function m(D,V){return D===V?D!==0||1/D===1/V:D!==D&&V!==V}function p(D,V){this.message=D,this.data=V&&typeof V=="object"?V:{},this.stack=""}p.prototype=Error.prototype;function y(D){if(process.env.NODE_ENV!=="production")var V={},Z=0;function G(z,X,q,oe,Q,re,le){if(oe=oe||d,re=re||q,le!==n){if(c){var K=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw K.name="Invariant Violation",K}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Se=oe+":"+q;!V[Se]&&Z<3&&(s("You are manually calling a React.PropTypes validation function for the `"+re+"` prop on `"+oe+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),V[Se]=!0,Z++)}}return X[q]==null?z?X[q]===null?new p("The "+Q+" `"+re+"` is marked as required "+("in `"+oe+"`, but its value is `null`.")):new p("The "+Q+" `"+re+"` is marked as required in "+("`"+oe+"`, but its value is `undefined`.")):null:D(X,q,oe,Q,re)}var B=G.bind(null,!1);return B.isRequired=G.bind(null,!0),B}function g(D){function V(Z,G,B,z,X,q){var oe=Z[G],Q=E(oe);if(Q!==D){var re=k(oe);return new p("Invalid "+z+" `"+X+"` of type "+("`"+re+"` supplied to `"+B+"`, expected ")+("`"+D+"`."),{expectedType:D})}return null}return y(V)}function C(){return y(i)}function O(D){function V(Z,G,B,z,X){if(typeof D!="function")return new p("Property `"+X+"` of component `"+B+"` has invalid PropType notation inside arrayOf.");var q=Z[G];if(!Array.isArray(q)){var oe=E(q);return new p("Invalid "+z+" `"+X+"` of type "+("`"+oe+"` supplied to `"+B+"`, expected an array."))}for(var Q=0;Q<q.length;Q++){var re=D(q,Q,B,z,X+"["+Q+"]",n);if(re instanceof Error)return re}return null}return y(V)}function w(){function D(V,Z,G,B,z){var X=V[Z];if(!a(X)){var q=E(X);return new p("Invalid "+B+" `"+z+"` of type "+("`"+q+"` supplied to `"+G+"`, expected a single ReactElement."))}return null}return y(D)}function _(){function D(V,Z,G,B,z){var X=V[Z];if(!e.isValidElementType(X)){var q=E(X);return new p("Invalid "+B+" `"+z+"` of type "+("`"+q+"` supplied to `"+G+"`, expected a single ReactElement type."))}return null}return y(D)}function S(D){function V(Z,G,B,z,X){if(!(Z[G]instanceof D)){var q=D.name||d,oe=$(Z[G]);return new p("Invalid "+z+" `"+X+"` of type "+("`"+oe+"` supplied to `"+B+"`, expected ")+("instance of `"+q+"`."))}return null}return y(V)}function I(D){if(!Array.isArray(D))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),i;function V(Z,G,B,z,X){for(var q=Z[G],oe=0;oe<D.length;oe++)if(m(q,D[oe]))return null;var Q=JSON.stringify(D,function(le,K){var Se=k(K);return Se==="symbol"?String(K):K});return new p("Invalid "+z+" `"+X+"` of value `"+String(q)+"` "+("supplied to `"+B+"`, expected one of "+Q+"."))}return y(V)}function v(D){function V(Z,G,B,z,X){if(typeof D!="function")return new p("Property `"+X+"` of component `"+B+"` has invalid PropType notation inside objectOf.");var q=Z[G],oe=E(q);if(oe!=="object")return new p("Invalid "+z+" `"+X+"` of type "+("`"+oe+"` supplied to `"+B+"`, expected an object."));for(var Q in q)if(r(q,Q)){var re=D(q,Q,B,z,X+"."+Q,n);if(re instanceof Error)return re}return null}return y(V)}function x(D){if(!Array.isArray(D))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var V=0;V<D.length;V++){var Z=D[V];if(typeof Z!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+U(Z)+" at index "+V+"."),i}function G(B,z,X,q,oe){for(var Q=[],re=0;re<D.length;re++){var le=D[re],K=le(B,z,X,q,oe,n);if(K==null)return null;K.data&&r(K.data,"expectedType")&&Q.push(K.data.expectedType)}var Se=Q.length>0?", expected one of type ["+Q.join(", ")+"]":"";return new p("Invalid "+q+" `"+oe+"` supplied to "+("`"+X+"`"+Se+"."))}return y(G)}function P(){function D(V,Z,G,B,z){return N(V[Z])?null:new p("Invalid "+B+" `"+z+"` supplied to "+("`"+G+"`, expected a ReactNode."))}return y(D)}function A(D,V,Z,G,B){return new p((D||"React class")+": "+V+" type `"+Z+"."+G+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+B+"`.")}function M(D){function V(Z,G,B,z,X){var q=Z[G],oe=E(q);if(oe!=="object")return new p("Invalid "+z+" `"+X+"` of type `"+oe+"` "+("supplied to `"+B+"`, expected `object`."));for(var Q in D){var re=D[Q];if(typeof re!="function")return A(B,z,X,Q,k(re));var le=re(q,Q,B,z,X+"."+Q,n);if(le)return le}return null}return y(V)}function F(D){function V(Z,G,B,z,X){var q=Z[G],oe=E(q);if(oe!=="object")return new p("Invalid "+z+" `"+X+"` of type `"+oe+"` "+("supplied to `"+B+"`, expected `object`."));var Q=t({},Z[G],D);for(var re in Q){var le=D[re];if(r(D,re)&&typeof le!="function")return A(B,z,X,re,k(le));if(!le)return new p("Invalid "+z+" `"+X+"` key `"+re+"` supplied to `"+B+"`.\nBad object: "+JSON.stringify(Z[G],null," ")+`
107
- Valid keys: `+JSON.stringify(Object.keys(D),null," "));var K=le(q,re,B,z,X+"."+re,n);if(K)return K}return null}return y(V)}function N(D){switch(typeof D){case"number":case"string":case"undefined":return!0;case"boolean":return!D;case"object":if(Array.isArray(D))return D.every(N);if(D===null||a(D))return!0;var V=f(D);if(V){var Z=V.call(D),G;if(V!==D.entries){for(;!(G=Z.next()).done;)if(!N(G.value))return!1}else for(;!(G=Z.next()).done;){var B=G.value;if(B&&!N(B[1]))return!1}}else return!1;return!0;default:return!1}}function W(D,V){return D==="symbol"?!0:V?V["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&V instanceof Symbol:!1}function E(D){var V=typeof D;return Array.isArray(D)?"array":D instanceof RegExp?"object":W(V,D)?"symbol":V}function k(D){if(typeof D>"u"||D===null)return""+D;var V=E(D);if(V==="object"){if(D instanceof Date)return"date";if(D instanceof RegExp)return"regexp"}return V}function U(D){var V=k(D);switch(V){case"array":case"object":return"an "+V;case"boolean":case"date":case"regexp":return"a "+V;default:return V}}function $(D){return!D.constructor||!D.constructor.name?d:D.constructor.name}return h.checkPropTypes=o,h.resetWarningCache=o.resetWarningCache,h.PropTypes=h,h},jl}var Vl,jy;function vF(){if(jy)return Vl;jy=1;var e=$l();function t(){}function n(){}return n.resetWarningCache=t,Vl=function(){function r(i,a,c,u,l,f){if(f!==e){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}r.isRequired=r;function o(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},Vl}var Vy;function bF(){if(Vy)return Ji.exports;if(Vy=1,process.env.NODE_ENV!=="production"){var e=Ry(),t=!0;Ji.exports=yF()(e.isElement,t)}else Ji.exports=vF()();return Ji.exports}var wF=bF();const Jt=Wl(wF);function Vr(e,t,n){this.x=e,this.y=t,this.time=n||new Date().getTime()}Vr.prototype.velocityFrom=function(e){return this.time!==e.time?this.distanceTo(e)/(this.time-e.time):1},Vr.prototype.distanceTo=function(e){return Math.sqrt(Math.pow(this.x-e.x,2)+Math.pow(this.y-e.y,2))},Vr.prototype.equals=function(e){return this.x===e.x&&this.y===e.y&&this.time===e.time};function Bl(e,t,n,r){this.startPoint=e,this.control1=t,this.control2=n,this.endPoint=r}Bl.prototype.length=function(){for(var e=10,t=0,n=void 0,r=void 0,o=0;o<=e;o+=1){var s=o/e,i=this._point(s,this.startPoint.x,this.control1.x,this.control2.x,this.endPoint.x),a=this._point(s,this.startPoint.y,this.control1.y,this.control2.y,this.endPoint.y);if(o>0){var c=i-n,u=a-r;t+=Math.sqrt(c*c+u*u)}n=i,r=a}return t},Bl.prototype._point=function(e,t,n,r,o){return t*(1-e)*(1-e)*(1-e)+3*n*(1-e)*(1-e)*e+3*r*(1-e)*e*e+o*e*e*e};function _F(e,t,n){var r,o,s,i=null,a=0;n||(n={});var c=function(){a=n.leading===!1?0:Date.now(),i=null,s=e.apply(r,o),i||(r=o=null)};return function(){var u=Date.now();!a&&n.leading===!1&&(a=u);var l=t-(u-a);return r=this,o=arguments,l<=0||l>t?(i&&(clearTimeout(i),i=null),a=u,s=e.apply(r,o),i||(r=o=null)):!i&&n.trailing!==!1&&(i=setTimeout(c,l)),s}}function Je(e,t){var n=this,r=t||{};this.velocityFilterWeight=r.velocityFilterWeight||.7,this.minWidth=r.minWidth||.5,this.maxWidth=r.maxWidth||2.5,this.throttle="throttle"in r?r.throttle:16,this.minDistance="minDistance"in r?r.minDistance:5,this.throttle?this._strokeMoveUpdate=_F(Je.prototype._strokeUpdate,this.throttle):this._strokeMoveUpdate=Je.prototype._strokeUpdate,this.dotSize=r.dotSize||function(){return(this.minWidth+this.maxWidth)/2},this.penColor=r.penColor||"black",this.backgroundColor=r.backgroundColor||"rgba(0,0,0,0)",this.onBegin=r.onBegin,this.onEnd=r.onEnd,this._canvas=e,this._ctx=e.getContext("2d"),this.clear(),this._handleMouseDown=function(o){o.which===1&&(n._mouseButtonDown=!0,n._strokeBegin(o))},this._handleMouseMove=function(o){n._mouseButtonDown&&n._strokeMoveUpdate(o)},this._handleMouseUp=function(o){o.which===1&&n._mouseButtonDown&&(n._mouseButtonDown=!1,n._strokeEnd(o))},this._handleTouchStart=function(o){if(o.targetTouches.length===1){var s=o.changedTouches[0];n._strokeBegin(s)}},this._handleTouchMove=function(o){o.preventDefault();var s=o.targetTouches[0];n._strokeMoveUpdate(s)},this._handleTouchEnd=function(o){var s=o.target===n._canvas;s&&(o.preventDefault(),n._strokeEnd(o))},this.on()}Je.prototype.clear=function(){var e=this._ctx,t=this._canvas;e.fillStyle=this.backgroundColor,e.clearRect(0,0,t.width,t.height),e.fillRect(0,0,t.width,t.height),this._data=[],this._reset(),this._isEmpty=!0},Je.prototype.fromDataURL=function(e){var t=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=new Image,o=n.ratio||window.devicePixelRatio||1,s=n.width||this._canvas.width/o,i=n.height||this._canvas.height/o;this._reset(),r.src=e,r.onload=function(){t._ctx.drawImage(r,0,0,s,i)},this._isEmpty=!1},Je.prototype.toDataURL=function(e){var t;switch(e){case"image/svg+xml":return this._toSVG();default:for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return(t=this._canvas).toDataURL.apply(t,[e].concat(r))}},Je.prototype.on=function(){this._handleMouseEvents(),this._handleTouchEvents()},Je.prototype.off=function(){this._canvas.removeEventListener("mousedown",this._handleMouseDown),this._canvas.removeEventListener("mousemove",this._handleMouseMove),document.removeEventListener("mouseup",this._handleMouseUp),this._canvas.removeEventListener("touchstart",this._handleTouchStart),this._canvas.removeEventListener("touchmove",this._handleTouchMove),this._canvas.removeEventListener("touchend",this._handleTouchEnd)},Je.prototype.isEmpty=function(){return this._isEmpty},Je.prototype._strokeBegin=function(e){this._data.push([]),this._reset(),this._strokeUpdate(e),typeof this.onBegin=="function"&&this.onBegin(e)},Je.prototype._strokeUpdate=function(e){var t=e.clientX,n=e.clientY,r=this._createPoint(t,n),o=this._data[this._data.length-1],s=o&&o[o.length-1],i=s&&r.distanceTo(s)<this.minDistance;if(!(s&&i)){var a=this._addPoint(r),c=a.curve,u=a.widths;c&&u&&this._drawCurve(c,u.start,u.end),this._data[this._data.length-1].push({x:r.x,y:r.y,time:r.time,color:this.penColor})}},Je.prototype._strokeEnd=function(e){var t=this.points.length>2,n=this.points[0];if(!t&&n&&this._drawDot(n),n){var r=this._data[this._data.length-1],o=r[r.length-1];n.equals(o)||r.push({x:n.x,y:n.y,time:n.time,color:this.penColor})}typeof this.onEnd=="function"&&this.onEnd(e)},Je.prototype._handleMouseEvents=function(){this._mouseButtonDown=!1,this._canvas.addEventListener("mousedown",this._handleMouseDown),this._canvas.addEventListener("mousemove",this._handleMouseMove),document.addEventListener("mouseup",this._handleMouseUp)},Je.prototype._handleTouchEvents=function(){this._canvas.style.msTouchAction="none",this._canvas.style.touchAction="none",this._canvas.addEventListener("touchstart",this._handleTouchStart),this._canvas.addEventListener("touchmove",this._handleTouchMove),this._canvas.addEventListener("touchend",this._handleTouchEnd)},Je.prototype._reset=function(){this.points=[],this._lastVelocity=0,this._lastWidth=(this.minWidth+this.maxWidth)/2,this._ctx.fillStyle=this.penColor},Je.prototype._createPoint=function(e,t,n){var r=this._canvas.getBoundingClientRect();return new Vr(e-r.left,t-r.top,n||new Date().getTime())},Je.prototype._addPoint=function(e){var t=this.points,n=void 0;if(t.push(e),t.length>2){t.length===3&&t.unshift(t[0]),n=this._calculateCurveControlPoints(t[0],t[1],t[2]);var r=n.c2;n=this._calculateCurveControlPoints(t[1],t[2],t[3]);var o=n.c1,s=new Bl(t[1],r,o,t[2]),i=this._calculateCurveWidths(s);return t.shift(),{curve:s,widths:i}}return{}},Je.prototype._calculateCurveControlPoints=function(e,t,n){var r=e.x-t.x,o=e.y-t.y,s=t.x-n.x,i=t.y-n.y,a={x:(e.x+t.x)/2,y:(e.y+t.y)/2},c={x:(t.x+n.x)/2,y:(t.y+n.y)/2},u=Math.sqrt(r*r+o*o),l=Math.sqrt(s*s+i*i),f=a.x-c.x,d=a.y-c.y,h=l/(u+l),m={x:c.x+f*h,y:c.y+d*h},p=t.x-m.x,y=t.y-m.y;return{c1:new Vr(a.x+p,a.y+y),c2:new Vr(c.x+p,c.y+y)}},Je.prototype._calculateCurveWidths=function(e){var t=e.startPoint,n=e.endPoint,r={start:null,end:null},o=this.velocityFilterWeight*n.velocityFrom(t)+(1-this.velocityFilterWeight)*this._lastVelocity,s=this._strokeWidth(o);return r.start=this._lastWidth,r.end=s,this._lastVelocity=o,this._lastWidth=s,r},Je.prototype._strokeWidth=function(e){return Math.max(this.maxWidth/(e+1),this.minWidth)},Je.prototype._drawPoint=function(e,t,n){var r=this._ctx;r.moveTo(e,t),r.arc(e,t,n,0,2*Math.PI,!1),this._isEmpty=!1},Je.prototype._drawCurve=function(e,t,n){var r=this._ctx,o=n-t,s=Math.floor(e.length());r.beginPath();for(var i=0;i<s;i+=1){var a=i/s,c=a*a,u=c*a,l=1-a,f=l*l,d=f*l,h=d*e.startPoint.x;h+=3*f*a*e.control1.x,h+=3*l*c*e.control2.x,h+=u*e.endPoint.x;var m=d*e.startPoint.y;m+=3*f*a*e.control1.y,m+=3*l*c*e.control2.y,m+=u*e.endPoint.y;var p=t+u*o;this._drawPoint(h,m,p)}r.closePath(),r.fill()},Je.prototype._drawDot=function(e){var t=this._ctx,n=typeof this.dotSize=="function"?this.dotSize():this.dotSize;t.beginPath(),this._drawPoint(e.x,e.y,n),t.closePath(),t.fill()},Je.prototype._fromData=function(e,t,n){for(var r=0;r<e.length;r+=1){var o=e[r];if(o.length>1)for(var s=0;s<o.length;s+=1){var i=o[s],a=new Vr(i.x,i.y,i.time),c=i.color;if(s===0)this.penColor=c,this._reset(),this._addPoint(a);else if(s!==o.length-1){var u=this._addPoint(a),l=u.curve,f=u.widths;l&&f&&t(l,f,c)}}else{this._reset();var d=o[0];n(d)}}},Je.prototype._toSVG=function(){var e=this,t=this._data,n=this._canvas,r=Math.max(window.devicePixelRatio||1,1),o=0,s=0,i=n.width/r,a=n.height/r,c=document.createElementNS("http://www.w3.org/2000/svg","svg");c.setAttributeNS(null,"width",n.width),c.setAttributeNS(null,"height",n.height),this._fromData(t,function(g,C,O){var w=document.createElement("path");if(!isNaN(g.control1.x)&&!isNaN(g.control1.y)&&!isNaN(g.control2.x)&&!isNaN(g.control2.y)){var _="M "+g.startPoint.x.toFixed(3)+","+g.startPoint.y.toFixed(3)+" "+("C "+g.control1.x.toFixed(3)+","+g.control1.y.toFixed(3)+" ")+(g.control2.x.toFixed(3)+","+g.control2.y.toFixed(3)+" ")+(g.endPoint.x.toFixed(3)+","+g.endPoint.y.toFixed(3));w.setAttribute("d",_),w.setAttribute("stroke-width",(C.end*2.25).toFixed(3)),w.setAttribute("stroke",O),w.setAttribute("fill","none"),w.setAttribute("stroke-linecap","round"),c.appendChild(w)}},function(g){var C=document.createElement("circle"),O=typeof e.dotSize=="function"?e.dotSize():e.dotSize;C.setAttribute("r",O),C.setAttribute("cx",g.x),C.setAttribute("cy",g.y),C.setAttribute("fill",g.color),c.appendChild(C)});var u="data:image/svg+xml;base64,",l='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"'+(' viewBox="'+o+" "+s+" "+i+" "+a+'"')+(' width="'+i+'"')+(' height="'+a+'"')+">",f=c.innerHTML;if(f===void 0){var d=document.createElement("dummy"),h=c.childNodes;d.innerHTML="";for(var m=0;m<h.length;m+=1)d.appendChild(h[m].cloneNode(!0));f=d.innerHTML}var p="</svg>",y=l+f+p;return u+btoa(y)},Je.prototype.fromData=function(e){var t=this;this.clear(),this._fromData(e,function(n,r){return t._drawCurve(n,r.start,r.end)},function(n){return t._drawDot(n)}),this._data=e},Je.prototype.toData=function(){return this._data};var ea={exports:{}},SF=ea.exports,By;function kF(){return By||(By=1,(function(e,t){(function(n,r){e.exports=r()})(SF,function(){return(function(n){function r(s){if(o[s])return o[s].exports;var i=o[s]={exports:{},id:s,loaded:!1};return n[s].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}var o={};return r.m=n,r.c=o,r.p="",r(0)})([function(n,r){function o(u){var l=u.getContext("2d"),f=u.width,d=u.height,h=l.getImageData(0,0,f,d).data,m=a(!0,f,d,h),p=a(!1,f,d,h),y=c(!0,f,d,h),g=c(!1,f,d,h),C=g-y+1,O=p-m+1,w=l.getImageData(y,m,C,O);return u.width=C,u.height=O,l.clearRect(0,0,C,O),l.putImageData(w,0,0),u}function s(u,l,f,d){return{red:d[4*(f*l+u)],green:d[4*(f*l+u)+1],blue:d[4*(f*l+u)+2],alpha:d[4*(f*l+u)+3]}}function i(u,l,f,d){return s(u,l,f,d).alpha}function a(u,l,f,d){for(var h=u?1:-1,m=u?0:f-1,p=m;u?p<f:p>-1;p+=h)for(var y=0;y<l;y++)if(i(y,p,l,d))return p;return null}function c(u,l,f,d){for(var h=u?1:-1,m=u?0:l-1,p=m;u?p<l:p>-1;p+=h)for(var y=0;y<f;y++)if(i(p,y,l,d))return p;return null}Object.defineProperty(r,"__esModule",{value:!0}),r.default=o}])})})(ea)),ea.exports}var xF=kF();const OF=Wl(xF);var EF=["canvasProps","clearOnResize"],ta=(function(e){lF(n,e);var t=dF(n);function n(){var r;cF(this,n);for(var o=arguments.length,s=new Array(o),i=0;i<o;i++)s[i]=arguments[i];return r=t.call.apply(t,[this].concat(s)),r.staticThis=r.constructor,r._sigPad=null,r._canvas=null,r.setRef=function(a){r._canvas=a,r._canvas===null&&(r._sigPad=null)},r._excludeOurProps=function(){var a=r.props;a.canvasProps,a.clearOnResize;var c=iF(a,EF);return c},r.componentDidMount=function(){var a=r.getCanvas();r._sigPad=new Je(a,r._excludeOurProps()),r._resizeCanvas(),r.on()},r.componentWillUnmount=function(){r.off()},r.componentDidUpdate=function(){Object.assign(r._sigPad,r._excludeOurProps())},r.getCanvas=function(){if(r._canvas===null)throw r.staticThis.refNullError;return r._canvas},r.getTrimmedCanvas=function(){var a=r.getCanvas(),c=document.createElement("canvas");return c.width=a.width,c.height=a.height,c.getContext("2d").drawImage(a,0,0),OF(c)},r.getSignaturePad=function(){if(r._sigPad===null)throw r.staticThis.refNullError;return r._sigPad},r._checkClearOnResize=function(){r.props.clearOnResize&&r._resizeCanvas()},r._resizeCanvas=function(){var a,c,u=(a=r.props.canvasProps)!==null&&a!==void 0?a:{},l=u.width,f=u.height;if(!(typeof l<"u"&&typeof f<"u")){var d=r.getCanvas(),h=Math.max((c=window.devicePixelRatio)!==null&&c!==void 0?c:1,1);typeof l>"u"&&(d.width=d.offsetWidth*h),typeof f>"u"&&(d.height=d.offsetHeight*h),d.getContext("2d").scale(h,h),r.clear()}},r.render=function(){var a=r.props.canvasProps;return j.createElement("canvas",Il({ref:r.setRef},a))},r.on=function(){return window.addEventListener("resize",r._checkClearOnResize),r.getSignaturePad().on()},r.off=function(){return window.removeEventListener("resize",r._checkClearOnResize),r.getSignaturePad().off()},r.clear=function(){return r.getSignaturePad().clear()},r.isEmpty=function(){return r.getSignaturePad().isEmpty()},r.fromDataURL=function(a,c){return r.getSignaturePad().fromDataURL(a,c)},r.toDataURL=function(a,c){return r.getSignaturePad().toDataURL(a,c)},r.fromData=function(a){return r.getSignaturePad().fromData(a)},r.toData=function(){return r.getSignaturePad().toData()},r}return aF(n)})(j.Component);ta.propTypes={velocityFilterWeight:Jt.number,minWidth:Jt.number,maxWidth:Jt.number,minDistance:Jt.number,dotSize:Jt.oneOfType([Jt.number,Jt.func]),penColor:Jt.string,throttle:Jt.number,onEnd:Jt.func,onBegin:Jt.func,canvasProps:Jt.object,clearOnResize:Jt.bool},ta.defaultProps={clearOnResize:!0},ta.refNullError=new Error("react-signature-canvas is currently mounting or unmounting: React refs are null during this phase.");const CF=(e={})=>{const{field:t={},form:n={},question:r={},disabled:o=!1}=e,s=j.useRef({}),[i,a]=j.useState(!1);return T.jsxs("div",{children:[T.jsxs(tF,{open:i,onOpenChange:a,children:[T.jsx(nF,{asChild:!0,children:T.jsx(vo,{...t,type:"button",variant:"outline",disabled:o,className:Ae("bq-signature-button w-full border focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",!t.value&&"text-muted-foreground",n.formState.errors[r.reference_id]&&"border-destructive"),children:"Click here to sign"})}),T.jsxs(Ty,{className:"bq-signature-dialog sm:max-w-md",children:[T.jsx(Dy,{children:T.jsx(My,{children:"Sign here"})}),T.jsx("div",{className:"bq-signature-pad border",children:T.jsx(ta,{ref:s,penColor:"black",canvasProps:{width:400,height:200,className:"sigCanvas"}})}),T.jsxs(Ay,{children:[T.jsx(vo,{type:"button",variant:"secondary",onClick:()=>{s.current.clear()},children:"Clear"}),T.jsx(vo,{type:"button",onClick:async()=>{if(s.current.toData().length>0){const c=s.current.getTrimmedCanvas().toDataURL("image/png"),u=await bP(c);t.onChange(u)}else t.onChange("");a(!1)},children:"Save"})]})]})]}),t.value&&T.jsx("img",{className:"border rounded p-2 mt-2",src:t.value})]})},na="DATE_PICKER",ra="INPUT",oa="TEXTAREA",Hy="RADIO",Hl="CHECKBOX",Zy="SELECT",fs="SIGNATURE",TF="CONTENT",DF=(e={})=>{const{field:t={},form:n={},question:r={},index:o=0,disabled:s=!1}=e;if(r.type===TF){const l=OE.sanitize(r.content);return T.jsx("div",{dangerouslySetInnerHTML:{__html:l}})}const{with_label:i}=ia(),a={field:t,form:n,question:r,disabled:s};let c=null;switch(r.type){case ra:c=T.jsx(AC,{...a});break;case oa:c=T.jsx(PC,{...a});break;case Hy:c=T.jsx($T,{...a});break;case Hl:c=T.jsx(HT,{...a});break;case Zy:c=T.jsx(lP,{...a});break;case na:c=T.jsx(FI,{...a});break;case fs:c=T.jsx(CF,{...a});break;default:c=null}const u=`question-${r.reference_id}`;return T.jsxs(xc,{id:u,children:[i&&T.jsx(Oc,{className:"leading-normal",children:T.jsxs("div",{children:[T.jsxs("div",{className:"block",children:[r.label,r.is_required&&T.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),r.sub_label&&T.jsx("div",{className:"mb-1 text-muted-foreground",children:r.sub_label})]})}),r.description&&T.jsx(CC,{children:r.description}),T.jsx(li,{children:c}),T.jsx(TC,{className:"bq-form-message"})]})};function AF({section:e,form:t}){const{with_section_title:n}=ia();return T.jsxs("div",{className:"bq-section space-y-6",children:[n&&T.jsx("h2",{className:"bq-section-title text-xl font-semibold",children:e.title}),e.items?.map(r=>{const o=r.reference_id;return T.jsx(EC,{control:t.control,name:o,render:({field:s})=>{const i={field:s,form:t,question:r};return T.jsx(DF,{...i})}},o)})]})}var Zl,Gy;function qy(){if(Gy)return Zl;Gy=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,o=typeof r=="function"&&r.prototype||e;return n===o}return Zl=t,Zl}var Gl,Ky;function MF(){if(Ky)return Gl;Ky=1;function e(t,n){return function(r){return t(n(r))}}return Gl=e,Gl}var ql,Xy;function PF(){if(Xy)return ql;Xy=1;var e=MF(),t=e(Object.keys,Object);return ql=t,ql}var Kl,Jy;function NF(){if(Jy)return Kl;Jy=1;var e=qy(),t=PF(),n=Object.prototype,r=n.hasOwnProperty;function o(s){if(!e(s))return t(s);var i=[];for(var a in Object(s))r.call(s,a)&&a!="constructor"&&i.push(a);return i}return Kl=o,Kl}var Xl,Qy;function ev(){if(Qy)return Xl;Qy=1;var e=typeof Xi=="object"&&Xi&&Xi.Object===Object&&Xi;return Xl=e,Xl}var Jl,tv;function xr(){if(tv)return Jl;tv=1;var e=ev(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return Jl=n,Jl}var Ql,nv;function rv(){if(nv)return Ql;nv=1;var e=xr(),t=e.Symbol;return Ql=t,Ql}var eu,ov;function IF(){if(ov)return eu;ov=1;var e=rv(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,o=e?e.toStringTag:void 0;function s(i){var a=n.call(i,o),c=i[o];try{i[o]=void 0;var u=!0}catch{}var l=r.call(i);return u&&(a?i[o]=c:delete i[o]),l}return eu=s,eu}var tu,sv;function FF(){if(sv)return tu;sv=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return tu=n,tu}var nu,iv;function sa(){if(iv)return nu;iv=1;var e=rv(),t=IF(),n=FF(),r="[object Null]",o="[object Undefined]",s=e?e.toStringTag:void 0;function i(a){return a==null?a===void 0?o:r:s&&s in Object(a)?t(a):n(a)}return nu=i,nu}var ru,av;function cv(){if(av)return ru;av=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return ru=e,ru}var ou,lv;function uv(){if(lv)return ou;lv=1;var e=sa(),t=cv(),n="[object AsyncFunction]",r="[object Function]",o="[object GeneratorFunction]",s="[object Proxy]";function i(a){if(!t(a))return!1;var c=e(a);return c==r||c==o||c==n||c==s}return ou=i,ou}var su,fv;function RF(){if(fv)return su;fv=1;var e=xr(),t=e["__core-js_shared__"];return su=t,su}var iu,dv;function WF(){if(dv)return iu;dv=1;var e=RF(),t=(function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function n(r){return!!t&&t in r}return iu=n,iu}var au,hv;function pv(){if(hv)return au;hv=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return au=n,au}var cu,mv;function zF(){if(mv)return cu;mv=1;var e=uv(),t=WF(),n=cv(),r=pv(),o=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,i=Function.prototype,a=Object.prototype,c=i.toString,u=a.hasOwnProperty,l=RegExp("^"+c.call(u).replace(o,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function f(d){if(!n(d)||t(d))return!1;var h=e(d)?l:s;return h.test(r(d))}return cu=f,cu}var lu,gv;function LF(){if(gv)return lu;gv=1;function e(t,n){return t?.[n]}return lu=e,lu}var uu,yv;function ds(){if(yv)return uu;yv=1;var e=zF(),t=LF();function n(r,o){var s=t(r,o);return e(s)?s:void 0}return uu=n,uu}var fu,vv;function $F(){if(vv)return fu;vv=1;var e=ds(),t=xr(),n=e(t,"DataView");return fu=n,fu}var du,bv;function UF(){if(bv)return du;bv=1;var e=ds(),t=xr(),n=e(t,"Map");return du=n,du}var hu,wv;function YF(){if(wv)return hu;wv=1;var e=ds(),t=xr(),n=e(t,"Promise");return hu=n,hu}var pu,_v;function jF(){if(_v)return pu;_v=1;var e=ds(),t=xr(),n=e(t,"Set");return pu=n,pu}var mu,Sv;function VF(){if(Sv)return mu;Sv=1;var e=ds(),t=xr(),n=e(t,"WeakMap");return mu=n,mu}var gu,kv;function BF(){if(kv)return gu;kv=1;var e=$F(),t=UF(),n=YF(),r=jF(),o=VF(),s=sa(),i=pv(),a="[object Map]",c="[object Object]",u="[object Promise]",l="[object Set]",f="[object WeakMap]",d="[object DataView]",h=i(e),m=i(t),p=i(n),y=i(r),g=i(o),C=s;return(e&&C(new e(new ArrayBuffer(1)))!=d||t&&C(new t)!=a||n&&C(n.resolve())!=u||r&&C(new r)!=l||o&&C(new o)!=f)&&(C=function(O){var w=s(O),_=w==c?O.constructor:void 0,S=_?i(_):"";if(S)switch(S){case h:return d;case m:return a;case p:return u;case y:return l;case g:return f}return w}),gu=C,gu}var yu,xv;function vu(){if(xv)return yu;xv=1;function e(t){return t!=null&&typeof t=="object"}return yu=e,yu}var bu,Ov;function HF(){if(Ov)return bu;Ov=1;var e=sa(),t=vu(),n="[object Arguments]";function r(o){return t(o)&&e(o)==n}return bu=r,bu}var wu,Ev;function ZF(){if(Ev)return wu;Ev=1;var e=HF(),t=vu(),n=Object.prototype,r=n.hasOwnProperty,o=n.propertyIsEnumerable,s=e((function(){return arguments})())?e:function(i){return t(i)&&r.call(i,"callee")&&!o.call(i,"callee")};return wu=s,wu}var _u,Cv;function GF(){if(Cv)return _u;Cv=1;var e=Array.isArray;return _u=e,_u}var Su,Tv;function Dv(){if(Tv)return Su;Tv=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return Su=t,Su}var ku,Av;function qF(){if(Av)return ku;Av=1;var e=uv(),t=Dv();function n(r){return r!=null&&t(r.length)&&!e(r)}return ku=n,ku}var hs={exports:{}},xu,Mv;function KF(){if(Mv)return xu;Mv=1;function e(){return!1}return xu=e,xu}hs.exports;var Pv;function XF(){return Pv||(Pv=1,(function(e,t){var n=xr(),r=KF(),o=t&&!t.nodeType&&t,s=o&&!0&&e&&!e.nodeType&&e,i=s&&s.exports===o,a=i?n.Buffer:void 0,c=a?a.isBuffer:void 0,u=c||r;e.exports=u})(hs,hs.exports)),hs.exports}var Ou,Nv;function JF(){if(Nv)return Ou;Nv=1;var e=sa(),t=Dv(),n=vu(),r="[object Arguments]",o="[object Array]",s="[object Boolean]",i="[object Date]",a="[object Error]",c="[object Function]",u="[object Map]",l="[object Number]",f="[object Object]",d="[object RegExp]",h="[object Set]",m="[object String]",p="[object WeakMap]",y="[object ArrayBuffer]",g="[object DataView]",C="[object Float32Array]",O="[object Float64Array]",w="[object Int8Array]",_="[object Int16Array]",S="[object Int32Array]",I="[object Uint8Array]",v="[object Uint8ClampedArray]",x="[object Uint16Array]",P="[object Uint32Array]",A={};A[C]=A[O]=A[w]=A[_]=A[S]=A[I]=A[v]=A[x]=A[P]=!0,A[r]=A[o]=A[y]=A[s]=A[g]=A[i]=A[a]=A[c]=A[u]=A[l]=A[f]=A[d]=A[h]=A[m]=A[p]=!1;function M(F){return n(F)&&t(F.length)&&!!A[e(F)]}return Ou=M,Ou}var Eu,Iv;function QF(){if(Iv)return Eu;Iv=1;function e(t){return function(n){return t(n)}}return Eu=e,Eu}var ps={exports:{}};ps.exports;var Fv;function eR(){return Fv||(Fv=1,(function(e,t){var n=ev(),r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,s=o&&o.exports===r,i=s&&n.process,a=(function(){try{var c=o&&o.require&&o.require("util").types;return c||i&&i.binding&&i.binding("util")}catch{}})();e.exports=a})(ps,ps.exports)),ps.exports}var Cu,Rv;function tR(){if(Rv)return Cu;Rv=1;var e=JF(),t=QF(),n=eR(),r=n&&n.isTypedArray,o=r?t(r):e;return Cu=o,Cu}var Tu,Wv;function nR(){if(Wv)return Tu;Wv=1;var e=NF(),t=BF(),n=ZF(),r=GF(),o=qF(),s=XF(),i=qy(),a=tR(),c="[object Map]",u="[object Set]",l=Object.prototype,f=l.hasOwnProperty;function d(h){if(h==null)return!0;if(o(h)&&(r(h)||typeof h=="string"||typeof h.splice=="function"||s(h)||a(h)||n(h)))return!h.length;var m=t(h);if(m==c||m==u)return!h.size;if(i(h))return!e(h).length;for(var p in h)if(f.call(h,p))return!1;return!0}return Tu=d,Tu}var rR=nR();const oR=Wl(rR),sR=({questions:e=[],prefilled_answers:t=new Map}={})=>{const n={},r={};return e.forEach((o={})=>{let s;const i=t.get(o.id);switch(o.type){case ra:case oa:case fs:case Hy:case Zy:if(s=Lf(),r[o.id]="",i&&i.is_previously_submitted_answer&&!o.allow_prefill)break;i&&i.value&&i.value.length>0&&(r[o.id]=i.value[0]||"");break;case na:if(s=E1({invalid_type_error:"Invalid date format."}),r[o.id]=void 0,i&&i.is_previously_submitted_answer&&!o.allow_prefill)break;if(i&&i.value&&i.value.length>0&&o.date_format&&ce(i.value[0],o.date_format).isValid()){const a=ce(i.value[0],o.date_format);r[o.id]=a.toDate()}break;case Hl:if(s=Yf(Lf()),r[o.id]=[],i&&i.is_previously_submitted_answer&&!o.allow_prefill)break;i&&i.value&&i.value.length>0&&(r[o.id]=i.value||[]);break;default:s=_1(),r[o.id]=""}o.is_required&&([ra,oa,fs].includes(o.type)?s=s.min(1,{message:o.type===fs?"Please sign here":`${o.label} is required`}):o.type===na?s=s.refine(a=>a!=null,{message:`${o.label} is required`}):o.type===Hl&&(s=s.min(1,{message:"Please make at least one selection"}))),oR(o.validation)||(o.validation.type==="email"&&(s=s.email({message:"Invalid email address."})),o.validation.min_length&&(s=s.min(o.validation.min_length,{message:`${o.label} must be at least ${o.validation.min_length} characters`})),o.validation.max_length&&(s=s.max(o.validation.max_length,{message:`${o.label} cannot exceed ${o.validation.max_length} characters`}))),!o.is_required&&[ra,oa,fs].includes(o.type)&&(s=s.or(F1(""))),n[o.id]=s}),{schema:jf(n),default_values:r}},iR=({data:e,onSubmit:t,renderFooter:n})=>{const{sections:r=[],questions:o=[]}=wP({questionnaire:e}),{form_config:s}=ia(),{schema:i,default_values:a}=j.useMemo(()=>!o||o.length===0?{schema:jf({}),default_values:{}}:sR({questions:o}),[o]),c=vb({resolver:rE(i),defaultValues:a,...s}),u=l=>{if(c.trigger(),t){const f=o.map(d=>{let h=c.getValues()[d.id];return d.type===na&&h instanceof Date&&(h=ce(h).format(d.date_format||"DD-MM-YYYY")),{reference_id:d.id,value:Array.isArray(h)?h:[h],section_gid:d.section_gid,item_gid:d.g_id}});t(f)}};return T.jsx(OC,{...c,children:T.jsxs("form",{className:"bq-form-container space-y-4",onSubmit:c.handleSubmit(u),children:[r?.map(l=>T.jsx(AF,{section:l,form:c},l.g_id)),n&&n({form:c})]})})};return({data:e,onSubmit:t,config:n,renderFooter:r})=>T.jsx(Kv,{config:n,children:T.jsx(iR,{data:e,onSubmit:t,renderFooter:r})})}));
106
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return b.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},qI="DialogDescriptionWarning",KI=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Sy(qI).contentName}}.`;return b.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},XI=cy,JI=uy,QI=dy,ky=hy,xy=py,Oy=gy,Ey=vy,eF=wy;const tF=XI,nF=JI,rF=QI,Cy=b.forwardRef(({className:e,...t},n)=>T.jsx(ky,{ref:n,className:Me("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Cy.displayName=ky.displayName;const Ty=b.forwardRef(({className:e,children:t,...n},r)=>T.jsxs(rF,{children:[T.jsx(Cy,{}),T.jsxs(xy,{ref:r,className:Me("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,T.jsxs(eF,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[T.jsx(WT,{className:"h-4 w-4"}),T.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Ty.displayName=xy.displayName;const Dy=({className:e,...t})=>T.jsx("div",{className:Me("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Dy.displayName="DialogHeader";const My=({className:e,...t})=>T.jsx("div",{className:Me("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});My.displayName="DialogFooter";const Ay=b.forwardRef(({className:e,...t},n)=>T.jsx(Oy,{ref:n,className:Me("text-lg font-semibold leading-none tracking-tight",e),...t}));Ay.displayName=Oy.displayName;const oF=b.forwardRef(({className:e,...t},n)=>T.jsx(Ey,{ref:n,className:Me("text-sm text-muted-foreground",e),...t}));oF.displayName=Ey.displayName;function Il(){return Il=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Il.apply(null,arguments)}function sF(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function iF(e,t){if(e==null)return{};var n,r,o=sF(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Fl(e){"@babel/helpers - typeof";return Fl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fl(e)}function aF(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}function cF(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Rl(e,t){return Rl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Rl(e,t)}function lF(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Rl(e,t)}function Ki(e){return Ki=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ki(e)}function Py(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Py=function(){return!!e})()}function uF(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fF(e,t){if(t&&(Fl(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return uF(e)}function dF(e){var t=Py();return function(){var n,r=Ki(e);if(t){var o=Ki(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return fF(this,n)}}var Xi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Wl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ji={exports:{}},Qi={exports:{}},Ye={};var Ny;function hF(){if(Ny)return Ye;Ny=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,l=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function O(_){if(typeof _=="object"&&_!==null){var S=_.$$typeof;switch(S){case t:switch(_=_.type,_){case c:case u:case r:case s:case o:case f:return _;default:switch(_=_&&_.$$typeof,_){case a:case l:case m:case h:case i:return _;default:return S}}case n:return S}}}function w(_){return O(_)===u}return Ye.AsyncMode=c,Ye.ConcurrentMode=u,Ye.ContextConsumer=a,Ye.ContextProvider=i,Ye.Element=t,Ye.ForwardRef=l,Ye.Fragment=r,Ye.Lazy=m,Ye.Memo=h,Ye.Portal=n,Ye.Profiler=s,Ye.StrictMode=o,Ye.Suspense=f,Ye.isAsyncMode=function(_){return w(_)||O(_)===c},Ye.isConcurrentMode=w,Ye.isContextConsumer=function(_){return O(_)===a},Ye.isContextProvider=function(_){return O(_)===i},Ye.isElement=function(_){return typeof _=="object"&&_!==null&&_.$$typeof===t},Ye.isForwardRef=function(_){return O(_)===l},Ye.isFragment=function(_){return O(_)===r},Ye.isLazy=function(_){return O(_)===m},Ye.isMemo=function(_){return O(_)===h},Ye.isPortal=function(_){return O(_)===n},Ye.isProfiler=function(_){return O(_)===s},Ye.isStrictMode=function(_){return O(_)===o},Ye.isSuspense=function(_){return O(_)===f},Ye.isValidElementType=function(_){return typeof _=="string"||typeof _=="function"||_===r||_===u||_===s||_===o||_===f||_===d||typeof _=="object"&&_!==null&&(_.$$typeof===m||_.$$typeof===h||_.$$typeof===i||_.$$typeof===a||_.$$typeof===l||_.$$typeof===y||_.$$typeof===g||_.$$typeof===C||_.$$typeof===p)},Ye.typeOf=O,Ye}var je={};var Iy;function pF(){return Iy||(Iy=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,l=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function O(K){return typeof K=="string"||typeof K=="function"||K===r||K===u||K===s||K===o||K===f||K===d||typeof K=="object"&&K!==null&&(K.$$typeof===m||K.$$typeof===h||K.$$typeof===i||K.$$typeof===a||K.$$typeof===l||K.$$typeof===y||K.$$typeof===g||K.$$typeof===C||K.$$typeof===p)}function w(K){if(typeof K=="object"&&K!==null){var Se=K.$$typeof;switch(Se){case t:var Ie=K.type;switch(Ie){case c:case u:case r:case s:case o:case f:return Ie;default:var ke=Ie&&Ie.$$typeof;switch(ke){case a:case l:case m:case h:case i:return ke;default:return Se}}case n:return Se}}}var _=c,S=u,I=a,v=i,x=t,P=l,M=r,A=m,F=h,N=n,W=s,E=o,k=f,U=!1;function $(K){return U||(U=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),D(K)||w(K)===c}function D(K){return w(K)===u}function V(K){return w(K)===a}function Z(K){return w(K)===i}function G(K){return typeof K=="object"&&K!==null&&K.$$typeof===t}function B(K){return w(K)===l}function z(K){return w(K)===r}function X(K){return w(K)===m}function q(K){return w(K)===h}function oe(K){return w(K)===n}function Q(K){return w(K)===s}function re(K){return w(K)===o}function le(K){return w(K)===f}je.AsyncMode=_,je.ConcurrentMode=S,je.ContextConsumer=I,je.ContextProvider=v,je.Element=x,je.ForwardRef=P,je.Fragment=M,je.Lazy=A,je.Memo=F,je.Portal=N,je.Profiler=W,je.StrictMode=E,je.Suspense=k,je.isAsyncMode=$,je.isConcurrentMode=D,je.isContextConsumer=V,je.isContextProvider=Z,je.isElement=G,je.isForwardRef=B,je.isFragment=z,je.isLazy=X,je.isMemo=q,je.isPortal=oe,je.isProfiler=Q,je.isStrictMode=re,je.isSuspense=le,je.isValidElementType=O,je.typeOf=w})()),je}var Fy;function Ry(){return Fy||(Fy=1,process.env.NODE_ENV==="production"?Qi.exports=hF():Qi.exports=pF()),Qi.exports}var zl,Wy;function mF(){if(Wy)return zl;Wy=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var i={},a=0;a<10;a++)i["_"+String.fromCharCode(a)]=a;var c=Object.getOwnPropertyNames(i).map(function(l){return i[l]});if(c.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(l){u[l]=l}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return zl=o()?Object.assign:function(s,i){for(var a,c=r(s),u,l=1;l<arguments.length;l++){a=Object(arguments[l]);for(var f in a)t.call(a,f)&&(c[f]=a[f]);if(e){u=e(a);for(var d=0;d<u.length;d++)n.call(a,u[d])&&(c[u[d]]=a[u[d]])}}return c},zl}var Ll,zy;function $l(){if(zy)return Ll;zy=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ll=e,Ll}var Ul,Ly;function $y(){return Ly||(Ly=1,Ul=Function.call.bind(Object.prototype.hasOwnProperty)),Ul}var Yl,Uy;function gF(){if(Uy)return Yl;Uy=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=$l(),n={},r=$y();e=function(s){var i="Warning: "+s;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function o(s,i,a,c,u){if(process.env.NODE_ENV!=="production"){for(var l in s)if(r(s,l)){var f;try{if(typeof s[l]!="function"){var d=Error((c||"React class")+": "+a+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}f=s[l](i,l,c,a,null,t)}catch(m){f=m}if(f&&!(f instanceof Error)&&e((c||"React class")+": type specification of "+a+" `"+l+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var h=u?u():"";e("Failed "+a+" type: "+f.message+(h??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Yl=o,Yl}var jl,Yy;function yF(){if(Yy)return jl;Yy=1;var e=Ry(),t=mF(),n=$l(),r=$y(),o=gF(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(a){var c="Warning: "+a;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function i(){return null}return jl=function(a,c){var u=typeof Symbol=="function"&&Symbol.iterator,l="@@iterator";function f(D){var V=D&&(u&&D[u]||D[l]);if(typeof V=="function")return V}var d="<<anonymous>>",h={array:g("array"),bigint:g("bigint"),bool:g("boolean"),func:g("function"),number:g("number"),object:g("object"),string:g("string"),symbol:g("symbol"),any:C(),arrayOf:O,element:w(),elementType:_(),instanceOf:S,node:P(),objectOf:v,oneOf:I,oneOfType:x,shape:A,exact:F};function m(D,V){return D===V?D!==0||1/D===1/V:D!==D&&V!==V}function p(D,V){this.message=D,this.data=V&&typeof V=="object"?V:{},this.stack=""}p.prototype=Error.prototype;function y(D){if(process.env.NODE_ENV!=="production")var V={},Z=0;function G(z,X,q,oe,Q,re,le){if(oe=oe||d,re=re||q,le!==n){if(c){var K=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw K.name="Invariant Violation",K}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Se=oe+":"+q;!V[Se]&&Z<3&&(s("You are manually calling a React.PropTypes validation function for the `"+re+"` prop on `"+oe+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),V[Se]=!0,Z++)}}return X[q]==null?z?X[q]===null?new p("The "+Q+" `"+re+"` is marked as required "+("in `"+oe+"`, but its value is `null`.")):new p("The "+Q+" `"+re+"` is marked as required in "+("`"+oe+"`, but its value is `undefined`.")):null:D(X,q,oe,Q,re)}var B=G.bind(null,!1);return B.isRequired=G.bind(null,!0),B}function g(D){function V(Z,G,B,z,X,q){var oe=Z[G],Q=E(oe);if(Q!==D){var re=k(oe);return new p("Invalid "+z+" `"+X+"` of type "+("`"+re+"` supplied to `"+B+"`, expected ")+("`"+D+"`."),{expectedType:D})}return null}return y(V)}function C(){return y(i)}function O(D){function V(Z,G,B,z,X){if(typeof D!="function")return new p("Property `"+X+"` of component `"+B+"` has invalid PropType notation inside arrayOf.");var q=Z[G];if(!Array.isArray(q)){var oe=E(q);return new p("Invalid "+z+" `"+X+"` of type "+("`"+oe+"` supplied to `"+B+"`, expected an array."))}for(var Q=0;Q<q.length;Q++){var re=D(q,Q,B,z,X+"["+Q+"]",n);if(re instanceof Error)return re}return null}return y(V)}function w(){function D(V,Z,G,B,z){var X=V[Z];if(!a(X)){var q=E(X);return new p("Invalid "+B+" `"+z+"` of type "+("`"+q+"` supplied to `"+G+"`, expected a single ReactElement."))}return null}return y(D)}function _(){function D(V,Z,G,B,z){var X=V[Z];if(!e.isValidElementType(X)){var q=E(X);return new p("Invalid "+B+" `"+z+"` of type "+("`"+q+"` supplied to `"+G+"`, expected a single ReactElement type."))}return null}return y(D)}function S(D){function V(Z,G,B,z,X){if(!(Z[G]instanceof D)){var q=D.name||d,oe=$(Z[G]);return new p("Invalid "+z+" `"+X+"` of type "+("`"+oe+"` supplied to `"+B+"`, expected ")+("instance of `"+q+"`."))}return null}return y(V)}function I(D){if(!Array.isArray(D))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),i;function V(Z,G,B,z,X){for(var q=Z[G],oe=0;oe<D.length;oe++)if(m(q,D[oe]))return null;var Q=JSON.stringify(D,function(le,K){var Se=k(K);return Se==="symbol"?String(K):K});return new p("Invalid "+z+" `"+X+"` of value `"+String(q)+"` "+("supplied to `"+B+"`, expected one of "+Q+"."))}return y(V)}function v(D){function V(Z,G,B,z,X){if(typeof D!="function")return new p("Property `"+X+"` of component `"+B+"` has invalid PropType notation inside objectOf.");var q=Z[G],oe=E(q);if(oe!=="object")return new p("Invalid "+z+" `"+X+"` of type "+("`"+oe+"` supplied to `"+B+"`, expected an object."));for(var Q in q)if(r(q,Q)){var re=D(q,Q,B,z,X+"."+Q,n);if(re instanceof Error)return re}return null}return y(V)}function x(D){if(!Array.isArray(D))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var V=0;V<D.length;V++){var Z=D[V];if(typeof Z!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+U(Z)+" at index "+V+"."),i}function G(B,z,X,q,oe){for(var Q=[],re=0;re<D.length;re++){var le=D[re],K=le(B,z,X,q,oe,n);if(K==null)return null;K.data&&r(K.data,"expectedType")&&Q.push(K.data.expectedType)}var Se=Q.length>0?", expected one of type ["+Q.join(", ")+"]":"";return new p("Invalid "+q+" `"+oe+"` supplied to "+("`"+X+"`"+Se+"."))}return y(G)}function P(){function D(V,Z,G,B,z){return N(V[Z])?null:new p("Invalid "+B+" `"+z+"` supplied to "+("`"+G+"`, expected a ReactNode."))}return y(D)}function M(D,V,Z,G,B){return new p((D||"React class")+": "+V+" type `"+Z+"."+G+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+B+"`.")}function A(D){function V(Z,G,B,z,X){var q=Z[G],oe=E(q);if(oe!=="object")return new p("Invalid "+z+" `"+X+"` of type `"+oe+"` "+("supplied to `"+B+"`, expected `object`."));for(var Q in D){var re=D[Q];if(typeof re!="function")return M(B,z,X,Q,k(re));var le=re(q,Q,B,z,X+"."+Q,n);if(le)return le}return null}return y(V)}function F(D){function V(Z,G,B,z,X){var q=Z[G],oe=E(q);if(oe!=="object")return new p("Invalid "+z+" `"+X+"` of type `"+oe+"` "+("supplied to `"+B+"`, expected `object`."));var Q=t({},Z[G],D);for(var re in Q){var le=D[re];if(r(D,re)&&typeof le!="function")return M(B,z,X,re,k(le));if(!le)return new p("Invalid "+z+" `"+X+"` key `"+re+"` supplied to `"+B+"`.\nBad object: "+JSON.stringify(Z[G],null," ")+`
107
+ Valid keys: `+JSON.stringify(Object.keys(D),null," "));var K=le(q,re,B,z,X+"."+re,n);if(K)return K}return null}return y(V)}function N(D){switch(typeof D){case"number":case"string":case"undefined":return!0;case"boolean":return!D;case"object":if(Array.isArray(D))return D.every(N);if(D===null||a(D))return!0;var V=f(D);if(V){var Z=V.call(D),G;if(V!==D.entries){for(;!(G=Z.next()).done;)if(!N(G.value))return!1}else for(;!(G=Z.next()).done;){var B=G.value;if(B&&!N(B[1]))return!1}}else return!1;return!0;default:return!1}}function W(D,V){return D==="symbol"?!0:V?V["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&V instanceof Symbol:!1}function E(D){var V=typeof D;return Array.isArray(D)?"array":D instanceof RegExp?"object":W(V,D)?"symbol":V}function k(D){if(typeof D>"u"||D===null)return""+D;var V=E(D);if(V==="object"){if(D instanceof Date)return"date";if(D instanceof RegExp)return"regexp"}return V}function U(D){var V=k(D);switch(V){case"array":case"object":return"an "+V;case"boolean":case"date":case"regexp":return"a "+V;default:return V}}function $(D){return!D.constructor||!D.constructor.name?d:D.constructor.name}return h.checkPropTypes=o,h.resetWarningCache=o.resetWarningCache,h.PropTypes=h,h},jl}var Vl,jy;function vF(){if(jy)return Vl;jy=1;var e=$l();function t(){}function n(){}return n.resetWarningCache=t,Vl=function(){function r(i,a,c,u,l,f){if(f!==e){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}r.isRequired=r;function o(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},Vl}var Vy;function bF(){if(Vy)return Ji.exports;if(Vy=1,process.env.NODE_ENV!=="production"){var e=Ry(),t=!0;Ji.exports=yF()(e.isElement,t)}else Ji.exports=vF()();return Ji.exports}var wF=bF();const Jt=Wl(wF);function Vr(e,t,n){this.x=e,this.y=t,this.time=n||new Date().getTime()}Vr.prototype.velocityFrom=function(e){return this.time!==e.time?this.distanceTo(e)/(this.time-e.time):1},Vr.prototype.distanceTo=function(e){return Math.sqrt(Math.pow(this.x-e.x,2)+Math.pow(this.y-e.y,2))},Vr.prototype.equals=function(e){return this.x===e.x&&this.y===e.y&&this.time===e.time};function Bl(e,t,n,r){this.startPoint=e,this.control1=t,this.control2=n,this.endPoint=r}Bl.prototype.length=function(){for(var e=10,t=0,n=void 0,r=void 0,o=0;o<=e;o+=1){var s=o/e,i=this._point(s,this.startPoint.x,this.control1.x,this.control2.x,this.endPoint.x),a=this._point(s,this.startPoint.y,this.control1.y,this.control2.y,this.endPoint.y);if(o>0){var c=i-n,u=a-r;t+=Math.sqrt(c*c+u*u)}n=i,r=a}return t},Bl.prototype._point=function(e,t,n,r,o){return t*(1-e)*(1-e)*(1-e)+3*n*(1-e)*(1-e)*e+3*r*(1-e)*e*e+o*e*e*e};function _F(e,t,n){var r,o,s,i=null,a=0;n||(n={});var c=function(){a=n.leading===!1?0:Date.now(),i=null,s=e.apply(r,o),i||(r=o=null)};return function(){var u=Date.now();!a&&n.leading===!1&&(a=u);var l=t-(u-a);return r=this,o=arguments,l<=0||l>t?(i&&(clearTimeout(i),i=null),a=u,s=e.apply(r,o),i||(r=o=null)):!i&&n.trailing!==!1&&(i=setTimeout(c,l)),s}}function Je(e,t){var n=this,r=t||{};this.velocityFilterWeight=r.velocityFilterWeight||.7,this.minWidth=r.minWidth||.5,this.maxWidth=r.maxWidth||2.5,this.throttle="throttle"in r?r.throttle:16,this.minDistance="minDistance"in r?r.minDistance:5,this.throttle?this._strokeMoveUpdate=_F(Je.prototype._strokeUpdate,this.throttle):this._strokeMoveUpdate=Je.prototype._strokeUpdate,this.dotSize=r.dotSize||function(){return(this.minWidth+this.maxWidth)/2},this.penColor=r.penColor||"black",this.backgroundColor=r.backgroundColor||"rgba(0,0,0,0)",this.onBegin=r.onBegin,this.onEnd=r.onEnd,this._canvas=e,this._ctx=e.getContext("2d"),this.clear(),this._handleMouseDown=function(o){o.which===1&&(n._mouseButtonDown=!0,n._strokeBegin(o))},this._handleMouseMove=function(o){n._mouseButtonDown&&n._strokeMoveUpdate(o)},this._handleMouseUp=function(o){o.which===1&&n._mouseButtonDown&&(n._mouseButtonDown=!1,n._strokeEnd(o))},this._handleTouchStart=function(o){if(o.targetTouches.length===1){var s=o.changedTouches[0];n._strokeBegin(s)}},this._handleTouchMove=function(o){o.preventDefault();var s=o.targetTouches[0];n._strokeMoveUpdate(s)},this._handleTouchEnd=function(o){var s=o.target===n._canvas;s&&(o.preventDefault(),n._strokeEnd(o))},this.on()}Je.prototype.clear=function(){var e=this._ctx,t=this._canvas;e.fillStyle=this.backgroundColor,e.clearRect(0,0,t.width,t.height),e.fillRect(0,0,t.width,t.height),this._data=[],this._reset(),this._isEmpty=!0},Je.prototype.fromDataURL=function(e){var t=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=new Image,o=n.ratio||window.devicePixelRatio||1,s=n.width||this._canvas.width/o,i=n.height||this._canvas.height/o;this._reset(),r.src=e,r.onload=function(){t._ctx.drawImage(r,0,0,s,i)},this._isEmpty=!1},Je.prototype.toDataURL=function(e){var t;switch(e){case"image/svg+xml":return this._toSVG();default:for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return(t=this._canvas).toDataURL.apply(t,[e].concat(r))}},Je.prototype.on=function(){this._handleMouseEvents(),this._handleTouchEvents()},Je.prototype.off=function(){this._canvas.removeEventListener("mousedown",this._handleMouseDown),this._canvas.removeEventListener("mousemove",this._handleMouseMove),document.removeEventListener("mouseup",this._handleMouseUp),this._canvas.removeEventListener("touchstart",this._handleTouchStart),this._canvas.removeEventListener("touchmove",this._handleTouchMove),this._canvas.removeEventListener("touchend",this._handleTouchEnd)},Je.prototype.isEmpty=function(){return this._isEmpty},Je.prototype._strokeBegin=function(e){this._data.push([]),this._reset(),this._strokeUpdate(e),typeof this.onBegin=="function"&&this.onBegin(e)},Je.prototype._strokeUpdate=function(e){var t=e.clientX,n=e.clientY,r=this._createPoint(t,n),o=this._data[this._data.length-1],s=o&&o[o.length-1],i=s&&r.distanceTo(s)<this.minDistance;if(!(s&&i)){var a=this._addPoint(r),c=a.curve,u=a.widths;c&&u&&this._drawCurve(c,u.start,u.end),this._data[this._data.length-1].push({x:r.x,y:r.y,time:r.time,color:this.penColor})}},Je.prototype._strokeEnd=function(e){var t=this.points.length>2,n=this.points[0];if(!t&&n&&this._drawDot(n),n){var r=this._data[this._data.length-1],o=r[r.length-1];n.equals(o)||r.push({x:n.x,y:n.y,time:n.time,color:this.penColor})}typeof this.onEnd=="function"&&this.onEnd(e)},Je.prototype._handleMouseEvents=function(){this._mouseButtonDown=!1,this._canvas.addEventListener("mousedown",this._handleMouseDown),this._canvas.addEventListener("mousemove",this._handleMouseMove),document.addEventListener("mouseup",this._handleMouseUp)},Je.prototype._handleTouchEvents=function(){this._canvas.style.msTouchAction="none",this._canvas.style.touchAction="none",this._canvas.addEventListener("touchstart",this._handleTouchStart),this._canvas.addEventListener("touchmove",this._handleTouchMove),this._canvas.addEventListener("touchend",this._handleTouchEnd)},Je.prototype._reset=function(){this.points=[],this._lastVelocity=0,this._lastWidth=(this.minWidth+this.maxWidth)/2,this._ctx.fillStyle=this.penColor},Je.prototype._createPoint=function(e,t,n){var r=this._canvas.getBoundingClientRect();return new Vr(e-r.left,t-r.top,n||new Date().getTime())},Je.prototype._addPoint=function(e){var t=this.points,n=void 0;if(t.push(e),t.length>2){t.length===3&&t.unshift(t[0]),n=this._calculateCurveControlPoints(t[0],t[1],t[2]);var r=n.c2;n=this._calculateCurveControlPoints(t[1],t[2],t[3]);var o=n.c1,s=new Bl(t[1],r,o,t[2]),i=this._calculateCurveWidths(s);return t.shift(),{curve:s,widths:i}}return{}},Je.prototype._calculateCurveControlPoints=function(e,t,n){var r=e.x-t.x,o=e.y-t.y,s=t.x-n.x,i=t.y-n.y,a={x:(e.x+t.x)/2,y:(e.y+t.y)/2},c={x:(t.x+n.x)/2,y:(t.y+n.y)/2},u=Math.sqrt(r*r+o*o),l=Math.sqrt(s*s+i*i),f=a.x-c.x,d=a.y-c.y,h=l/(u+l),m={x:c.x+f*h,y:c.y+d*h},p=t.x-m.x,y=t.y-m.y;return{c1:new Vr(a.x+p,a.y+y),c2:new Vr(c.x+p,c.y+y)}},Je.prototype._calculateCurveWidths=function(e){var t=e.startPoint,n=e.endPoint,r={start:null,end:null},o=this.velocityFilterWeight*n.velocityFrom(t)+(1-this.velocityFilterWeight)*this._lastVelocity,s=this._strokeWidth(o);return r.start=this._lastWidth,r.end=s,this._lastVelocity=o,this._lastWidth=s,r},Je.prototype._strokeWidth=function(e){return Math.max(this.maxWidth/(e+1),this.minWidth)},Je.prototype._drawPoint=function(e,t,n){var r=this._ctx;r.moveTo(e,t),r.arc(e,t,n,0,2*Math.PI,!1),this._isEmpty=!1},Je.prototype._drawCurve=function(e,t,n){var r=this._ctx,o=n-t,s=Math.floor(e.length());r.beginPath();for(var i=0;i<s;i+=1){var a=i/s,c=a*a,u=c*a,l=1-a,f=l*l,d=f*l,h=d*e.startPoint.x;h+=3*f*a*e.control1.x,h+=3*l*c*e.control2.x,h+=u*e.endPoint.x;var m=d*e.startPoint.y;m+=3*f*a*e.control1.y,m+=3*l*c*e.control2.y,m+=u*e.endPoint.y;var p=t+u*o;this._drawPoint(h,m,p)}r.closePath(),r.fill()},Je.prototype._drawDot=function(e){var t=this._ctx,n=typeof this.dotSize=="function"?this.dotSize():this.dotSize;t.beginPath(),this._drawPoint(e.x,e.y,n),t.closePath(),t.fill()},Je.prototype._fromData=function(e,t,n){for(var r=0;r<e.length;r+=1){var o=e[r];if(o.length>1)for(var s=0;s<o.length;s+=1){var i=o[s],a=new Vr(i.x,i.y,i.time),c=i.color;if(s===0)this.penColor=c,this._reset(),this._addPoint(a);else if(s!==o.length-1){var u=this._addPoint(a),l=u.curve,f=u.widths;l&&f&&t(l,f,c)}}else{this._reset();var d=o[0];n(d)}}},Je.prototype._toSVG=function(){var e=this,t=this._data,n=this._canvas,r=Math.max(window.devicePixelRatio||1,1),o=0,s=0,i=n.width/r,a=n.height/r,c=document.createElementNS("http://www.w3.org/2000/svg","svg");c.setAttributeNS(null,"width",n.width),c.setAttributeNS(null,"height",n.height),this._fromData(t,function(g,C,O){var w=document.createElement("path");if(!isNaN(g.control1.x)&&!isNaN(g.control1.y)&&!isNaN(g.control2.x)&&!isNaN(g.control2.y)){var _="M "+g.startPoint.x.toFixed(3)+","+g.startPoint.y.toFixed(3)+" "+("C "+g.control1.x.toFixed(3)+","+g.control1.y.toFixed(3)+" ")+(g.control2.x.toFixed(3)+","+g.control2.y.toFixed(3)+" ")+(g.endPoint.x.toFixed(3)+","+g.endPoint.y.toFixed(3));w.setAttribute("d",_),w.setAttribute("stroke-width",(C.end*2.25).toFixed(3)),w.setAttribute("stroke",O),w.setAttribute("fill","none"),w.setAttribute("stroke-linecap","round"),c.appendChild(w)}},function(g){var C=document.createElement("circle"),O=typeof e.dotSize=="function"?e.dotSize():e.dotSize;C.setAttribute("r",O),C.setAttribute("cx",g.x),C.setAttribute("cy",g.y),C.setAttribute("fill",g.color),c.appendChild(C)});var u="data:image/svg+xml;base64,",l='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"'+(' viewBox="'+o+" "+s+" "+i+" "+a+'"')+(' width="'+i+'"')+(' height="'+a+'"')+">",f=c.innerHTML;if(f===void 0){var d=document.createElement("dummy"),h=c.childNodes;d.innerHTML="";for(var m=0;m<h.length;m+=1)d.appendChild(h[m].cloneNode(!0));f=d.innerHTML}var p="</svg>",y=l+f+p;return u+btoa(y)},Je.prototype.fromData=function(e){var t=this;this.clear(),this._fromData(e,function(n,r){return t._drawCurve(n,r.start,r.end)},function(n){return t._drawDot(n)}),this._data=e},Je.prototype.toData=function(){return this._data};var ea={exports:{}},SF=ea.exports,By;function kF(){return By||(By=1,(function(e,t){(function(n,r){e.exports=r()})(SF,function(){return(function(n){function r(s){if(o[s])return o[s].exports;var i=o[s]={exports:{},id:s,loaded:!1};return n[s].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}var o={};return r.m=n,r.c=o,r.p="",r(0)})([function(n,r){function o(u){var l=u.getContext("2d"),f=u.width,d=u.height,h=l.getImageData(0,0,f,d).data,m=a(!0,f,d,h),p=a(!1,f,d,h),y=c(!0,f,d,h),g=c(!1,f,d,h),C=g-y+1,O=p-m+1,w=l.getImageData(y,m,C,O);return u.width=C,u.height=O,l.clearRect(0,0,C,O),l.putImageData(w,0,0),u}function s(u,l,f,d){return{red:d[4*(f*l+u)],green:d[4*(f*l+u)+1],blue:d[4*(f*l+u)+2],alpha:d[4*(f*l+u)+3]}}function i(u,l,f,d){return s(u,l,f,d).alpha}function a(u,l,f,d){for(var h=u?1:-1,m=u?0:f-1,p=m;u?p<f:p>-1;p+=h)for(var y=0;y<l;y++)if(i(y,p,l,d))return p;return null}function c(u,l,f,d){for(var h=u?1:-1,m=u?0:l-1,p=m;u?p<l:p>-1;p+=h)for(var y=0;y<f;y++)if(i(p,y,l,d))return p;return null}Object.defineProperty(r,"__esModule",{value:!0}),r.default=o}])})})(ea)),ea.exports}var xF=kF();const OF=Wl(xF);var EF=["canvasProps","clearOnResize"],ta=(function(e){lF(n,e);var t=dF(n);function n(){var r;cF(this,n);for(var o=arguments.length,s=new Array(o),i=0;i<o;i++)s[i]=arguments[i];return r=t.call.apply(t,[this].concat(s)),r.staticThis=r.constructor,r._sigPad=null,r._canvas=null,r.setRef=function(a){r._canvas=a,r._canvas===null&&(r._sigPad=null)},r._excludeOurProps=function(){var a=r.props;a.canvasProps,a.clearOnResize;var c=iF(a,EF);return c},r.componentDidMount=function(){var a=r.getCanvas();r._sigPad=new Je(a,r._excludeOurProps()),r._resizeCanvas(),r.on()},r.componentWillUnmount=function(){r.off()},r.componentDidUpdate=function(){Object.assign(r._sigPad,r._excludeOurProps())},r.getCanvas=function(){if(r._canvas===null)throw r.staticThis.refNullError;return r._canvas},r.getTrimmedCanvas=function(){var a=r.getCanvas(),c=document.createElement("canvas");return c.width=a.width,c.height=a.height,c.getContext("2d").drawImage(a,0,0),OF(c)},r.getSignaturePad=function(){if(r._sigPad===null)throw r.staticThis.refNullError;return r._sigPad},r._checkClearOnResize=function(){r.props.clearOnResize&&r._resizeCanvas()},r._resizeCanvas=function(){var a,c,u=(a=r.props.canvasProps)!==null&&a!==void 0?a:{},l=u.width,f=u.height;if(!(typeof l<"u"&&typeof f<"u")){var d=r.getCanvas(),h=Math.max((c=window.devicePixelRatio)!==null&&c!==void 0?c:1,1);typeof l>"u"&&(d.width=d.offsetWidth*h),typeof f>"u"&&(d.height=d.offsetHeight*h),d.getContext("2d").scale(h,h),r.clear()}},r.render=function(){var a=r.props.canvasProps;return j.createElement("canvas",Il({ref:r.setRef},a))},r.on=function(){return window.addEventListener("resize",r._checkClearOnResize),r.getSignaturePad().on()},r.off=function(){return window.removeEventListener("resize",r._checkClearOnResize),r.getSignaturePad().off()},r.clear=function(){return r.getSignaturePad().clear()},r.isEmpty=function(){return r.getSignaturePad().isEmpty()},r.fromDataURL=function(a,c){return r.getSignaturePad().fromDataURL(a,c)},r.toDataURL=function(a,c){return r.getSignaturePad().toDataURL(a,c)},r.fromData=function(a){return r.getSignaturePad().fromData(a)},r.toData=function(){return r.getSignaturePad().toData()},r}return aF(n)})(j.Component);ta.propTypes={velocityFilterWeight:Jt.number,minWidth:Jt.number,maxWidth:Jt.number,minDistance:Jt.number,dotSize:Jt.oneOfType([Jt.number,Jt.func]),penColor:Jt.string,throttle:Jt.number,onEnd:Jt.func,onBegin:Jt.func,canvasProps:Jt.object,clearOnResize:Jt.bool},ta.defaultProps={clearOnResize:!0},ta.refNullError=new Error("react-signature-canvas is currently mounting or unmounting: React refs are null during this phase.");const CF=(e={})=>{const{field:t={},form:n={},question:r={},disabled:o=!1}=e,s=j.useRef({}),[i,a]=j.useState(!1);return T.jsxs("div",{children:[T.jsxs(tF,{open:i,onOpenChange:a,children:[T.jsx(nF,{asChild:!0,children:T.jsx(vo,{...t,type:"button",variant:"outline",disabled:o,className:Me("bq-signature-button w-full border focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",!t.value&&"text-muted-foreground",n.formState.errors[r.reference_id]&&"border-destructive"),children:"Click here to sign"})}),T.jsxs(Ty,{className:"bq-signature-dialog sm:max-w-md",children:[T.jsx(Dy,{children:T.jsx(Ay,{children:"Sign here"})}),T.jsx("div",{className:"bq-signature-pad border",children:T.jsx(ta,{ref:s,penColor:"black",canvasProps:{width:400,height:200,className:"sigCanvas"}})}),T.jsxs(My,{children:[T.jsx(vo,{type:"button",variant:"secondary",onClick:()=>{s.current.clear()},children:"Clear"}),T.jsx(vo,{type:"button",onClick:async()=>{if(s.current.toData().length>0){const c=s.current.getTrimmedCanvas().toDataURL("image/png"),u=await bP(c);t.onChange(u)}else t.onChange("");a(!1)},children:"Save"})]})]})]}),t.value&&T.jsx("img",{className:"border rounded p-2 mt-2",src:t.value})]})},na="DATE_PICKER",ra="INPUT",oa="TEXTAREA",Hy="RADIO",Hl="CHECKBOX",Zy="SELECT",fs="SIGNATURE",TF="CONTENT",DF=(e={})=>{const{field:t={},form:n={},question:r={},index:o=0,disabled:s=!1}=e;if(r.type===TF){const l=OE.sanitize(r.content);return T.jsx("div",{dangerouslySetInnerHTML:{__html:l}})}const{with_label:i}=ia(),a={field:t,form:n,question:r,disabled:s};let c=null;switch(r.type){case ra:c=T.jsx(MC,{...a});break;case oa:c=T.jsx(PC,{...a});break;case Hy:c=T.jsx($T,{...a});break;case Hl:c=T.jsx(HT,{...a});break;case Zy:c=T.jsx(lP,{...a});break;case na:c=T.jsx(FI,{...a});break;case fs:c=T.jsx(CF,{...a});break;default:c=null}const u=`question-${r.reference_id}`;return T.jsxs(xc,{id:u,children:[i&&T.jsx(Oc,{className:"leading-normal",children:T.jsxs("div",{children:[T.jsxs("div",{className:"block",children:[r.label,r.is_required&&T.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),r.sub_label&&T.jsx("div",{className:"mb-1 text-muted-foreground",children:r.sub_label})]})}),r.description&&T.jsx(CC,{children:r.description}),T.jsx(li,{children:c}),T.jsx(TC,{className:"bq-form-message"})]})};function MF({section:e,form:t}){const{with_section_title:n}=ia();return T.jsxs("div",{className:"bq-section space-y-6",children:[n&&T.jsx("h2",{className:"bq-section-title text-xl font-semibold",children:e.title}),e.items?.map(r=>{const o=r.reference_id;return T.jsx(EC,{control:t.control,name:o,render:({field:s})=>{const i={field:s,form:t,question:r};return T.jsx(DF,{...i})}},o)})]})}var Zl,Gy;function qy(){if(Gy)return Zl;Gy=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,o=typeof r=="function"&&r.prototype||e;return n===o}return Zl=t,Zl}var Gl,Ky;function AF(){if(Ky)return Gl;Ky=1;function e(t,n){return function(r){return t(n(r))}}return Gl=e,Gl}var ql,Xy;function PF(){if(Xy)return ql;Xy=1;var e=AF(),t=e(Object.keys,Object);return ql=t,ql}var Kl,Jy;function NF(){if(Jy)return Kl;Jy=1;var e=qy(),t=PF(),n=Object.prototype,r=n.hasOwnProperty;function o(s){if(!e(s))return t(s);var i=[];for(var a in Object(s))r.call(s,a)&&a!="constructor"&&i.push(a);return i}return Kl=o,Kl}var Xl,Qy;function ev(){if(Qy)return Xl;Qy=1;var e=typeof Xi=="object"&&Xi&&Xi.Object===Object&&Xi;return Xl=e,Xl}var Jl,tv;function xr(){if(tv)return Jl;tv=1;var e=ev(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return Jl=n,Jl}var Ql,nv;function rv(){if(nv)return Ql;nv=1;var e=xr(),t=e.Symbol;return Ql=t,Ql}var eu,ov;function IF(){if(ov)return eu;ov=1;var e=rv(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,o=e?e.toStringTag:void 0;function s(i){var a=n.call(i,o),c=i[o];try{i[o]=void 0;var u=!0}catch{}var l=r.call(i);return u&&(a?i[o]=c:delete i[o]),l}return eu=s,eu}var tu,sv;function FF(){if(sv)return tu;sv=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return tu=n,tu}var nu,iv;function sa(){if(iv)return nu;iv=1;var e=rv(),t=IF(),n=FF(),r="[object Null]",o="[object Undefined]",s=e?e.toStringTag:void 0;function i(a){return a==null?a===void 0?o:r:s&&s in Object(a)?t(a):n(a)}return nu=i,nu}var ru,av;function cv(){if(av)return ru;av=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return ru=e,ru}var ou,lv;function uv(){if(lv)return ou;lv=1;var e=sa(),t=cv(),n="[object AsyncFunction]",r="[object Function]",o="[object GeneratorFunction]",s="[object Proxy]";function i(a){if(!t(a))return!1;var c=e(a);return c==r||c==o||c==n||c==s}return ou=i,ou}var su,fv;function RF(){if(fv)return su;fv=1;var e=xr(),t=e["__core-js_shared__"];return su=t,su}var iu,dv;function WF(){if(dv)return iu;dv=1;var e=RF(),t=(function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function n(r){return!!t&&t in r}return iu=n,iu}var au,hv;function pv(){if(hv)return au;hv=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return au=n,au}var cu,mv;function zF(){if(mv)return cu;mv=1;var e=uv(),t=WF(),n=cv(),r=pv(),o=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,i=Function.prototype,a=Object.prototype,c=i.toString,u=a.hasOwnProperty,l=RegExp("^"+c.call(u).replace(o,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function f(d){if(!n(d)||t(d))return!1;var h=e(d)?l:s;return h.test(r(d))}return cu=f,cu}var lu,gv;function LF(){if(gv)return lu;gv=1;function e(t,n){return t?.[n]}return lu=e,lu}var uu,yv;function ds(){if(yv)return uu;yv=1;var e=zF(),t=LF();function n(r,o){var s=t(r,o);return e(s)?s:void 0}return uu=n,uu}var fu,vv;function $F(){if(vv)return fu;vv=1;var e=ds(),t=xr(),n=e(t,"DataView");return fu=n,fu}var du,bv;function UF(){if(bv)return du;bv=1;var e=ds(),t=xr(),n=e(t,"Map");return du=n,du}var hu,wv;function YF(){if(wv)return hu;wv=1;var e=ds(),t=xr(),n=e(t,"Promise");return hu=n,hu}var pu,_v;function jF(){if(_v)return pu;_v=1;var e=ds(),t=xr(),n=e(t,"Set");return pu=n,pu}var mu,Sv;function VF(){if(Sv)return mu;Sv=1;var e=ds(),t=xr(),n=e(t,"WeakMap");return mu=n,mu}var gu,kv;function BF(){if(kv)return gu;kv=1;var e=$F(),t=UF(),n=YF(),r=jF(),o=VF(),s=sa(),i=pv(),a="[object Map]",c="[object Object]",u="[object Promise]",l="[object Set]",f="[object WeakMap]",d="[object DataView]",h=i(e),m=i(t),p=i(n),y=i(r),g=i(o),C=s;return(e&&C(new e(new ArrayBuffer(1)))!=d||t&&C(new t)!=a||n&&C(n.resolve())!=u||r&&C(new r)!=l||o&&C(new o)!=f)&&(C=function(O){var w=s(O),_=w==c?O.constructor:void 0,S=_?i(_):"";if(S)switch(S){case h:return d;case m:return a;case p:return u;case y:return l;case g:return f}return w}),gu=C,gu}var yu,xv;function vu(){if(xv)return yu;xv=1;function e(t){return t!=null&&typeof t=="object"}return yu=e,yu}var bu,Ov;function HF(){if(Ov)return bu;Ov=1;var e=sa(),t=vu(),n="[object Arguments]";function r(o){return t(o)&&e(o)==n}return bu=r,bu}var wu,Ev;function ZF(){if(Ev)return wu;Ev=1;var e=HF(),t=vu(),n=Object.prototype,r=n.hasOwnProperty,o=n.propertyIsEnumerable,s=e((function(){return arguments})())?e:function(i){return t(i)&&r.call(i,"callee")&&!o.call(i,"callee")};return wu=s,wu}var _u,Cv;function GF(){if(Cv)return _u;Cv=1;var e=Array.isArray;return _u=e,_u}var Su,Tv;function Dv(){if(Tv)return Su;Tv=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return Su=t,Su}var ku,Mv;function qF(){if(Mv)return ku;Mv=1;var e=uv(),t=Dv();function n(r){return r!=null&&t(r.length)&&!e(r)}return ku=n,ku}var hs={exports:{}},xu,Av;function KF(){if(Av)return xu;Av=1;function e(){return!1}return xu=e,xu}hs.exports;var Pv;function XF(){return Pv||(Pv=1,(function(e,t){var n=xr(),r=KF(),o=t&&!t.nodeType&&t,s=o&&!0&&e&&!e.nodeType&&e,i=s&&s.exports===o,a=i?n.Buffer:void 0,c=a?a.isBuffer:void 0,u=c||r;e.exports=u})(hs,hs.exports)),hs.exports}var Ou,Nv;function JF(){if(Nv)return Ou;Nv=1;var e=sa(),t=Dv(),n=vu(),r="[object Arguments]",o="[object Array]",s="[object Boolean]",i="[object Date]",a="[object Error]",c="[object Function]",u="[object Map]",l="[object Number]",f="[object Object]",d="[object RegExp]",h="[object Set]",m="[object String]",p="[object WeakMap]",y="[object ArrayBuffer]",g="[object DataView]",C="[object Float32Array]",O="[object Float64Array]",w="[object Int8Array]",_="[object Int16Array]",S="[object Int32Array]",I="[object Uint8Array]",v="[object Uint8ClampedArray]",x="[object Uint16Array]",P="[object Uint32Array]",M={};M[C]=M[O]=M[w]=M[_]=M[S]=M[I]=M[v]=M[x]=M[P]=!0,M[r]=M[o]=M[y]=M[s]=M[g]=M[i]=M[a]=M[c]=M[u]=M[l]=M[f]=M[d]=M[h]=M[m]=M[p]=!1;function A(F){return n(F)&&t(F.length)&&!!M[e(F)]}return Ou=A,Ou}var Eu,Iv;function QF(){if(Iv)return Eu;Iv=1;function e(t){return function(n){return t(n)}}return Eu=e,Eu}var ps={exports:{}};ps.exports;var Fv;function eR(){return Fv||(Fv=1,(function(e,t){var n=ev(),r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,s=o&&o.exports===r,i=s&&n.process,a=(function(){try{var c=o&&o.require&&o.require("util").types;return c||i&&i.binding&&i.binding("util")}catch{}})();e.exports=a})(ps,ps.exports)),ps.exports}var Cu,Rv;function tR(){if(Rv)return Cu;Rv=1;var e=JF(),t=QF(),n=eR(),r=n&&n.isTypedArray,o=r?t(r):e;return Cu=o,Cu}var Tu,Wv;function nR(){if(Wv)return Tu;Wv=1;var e=NF(),t=BF(),n=ZF(),r=GF(),o=qF(),s=XF(),i=qy(),a=tR(),c="[object Map]",u="[object Set]",l=Object.prototype,f=l.hasOwnProperty;function d(h){if(h==null)return!0;if(o(h)&&(r(h)||typeof h=="string"||typeof h.splice=="function"||s(h)||a(h)||n(h)))return!h.length;var m=t(h);if(m==c||m==u)return!h.size;if(i(h))return!e(h).length;for(var p in h)if(f.call(h,p))return!1;return!0}return Tu=d,Tu}var rR=nR();const oR=Wl(rR),sR=({questions:e=[],prefilled_answers:t=new Map}={})=>{const n={},r={};return e.forEach((o={})=>{let s;const i=t.get(o.id);switch(o.type){case ra:case oa:case fs:case Hy:case Zy:if(s=Lf(),r[o.id]="",i&&i.is_previously_submitted_answer&&!o.allow_prefill)break;i&&i.value&&i.value.length>0&&(r[o.id]=i.value[0]||"");break;case na:if(s=E1({invalid_type_error:"Invalid date format."}),r[o.id]=void 0,i&&i.is_previously_submitted_answer&&!o.allow_prefill)break;if(i&&i.value&&i.value.length>0&&o.date_format&&ce(i.value[0],o.date_format).isValid()){const a=ce(i.value[0],o.date_format);r[o.id]=a.toDate()}break;case Hl:if(s=Yf(Lf()),r[o.id]=[],i&&i.is_previously_submitted_answer&&!o.allow_prefill)break;i&&i.value&&i.value.length>0&&(r[o.id]=i.value||[]);break;default:s=_1(),r[o.id]=""}o.is_required&&([ra,oa,fs].includes(o.type)?s=s.min(1,{message:o.type===fs?"Please sign here":`${o.label} is required`}):o.type===na?s=s.refine(a=>a!=null,{message:`${o.label} is required`}):o.type===Hl&&(s=s.min(1,{message:"Please make at least one selection"}))),oR(o.validation)||(o.validation.type==="email"&&(s=s.email({message:"Invalid email address."})),o.validation.min_length&&(s=s.min(o.validation.min_length,{message:`${o.label} must be at least ${o.validation.min_length} characters`})),o.validation.max_length&&(s=s.max(o.validation.max_length,{message:`${o.label} cannot exceed ${o.validation.max_length} characters`}))),!o.is_required&&[ra,oa,fs].includes(o.type)&&(s=s.or(F1(""))),n[o.id]=s}),{schema:jf(n),default_values:r}},iR=({data:e,onSubmit:t,renderFooter:n})=>{const{sections:r=[],questions:o=[]}=wP({questionnaire:e}),{form_config:s}=ia(),{schema:i,default_values:a}=j.useMemo(()=>!o||o.length===0?{schema:jf({}),default_values:{}}:sR({questions:o}),[o]),c=vb({resolver:rE(i),defaultValues:a,mode:"onChange",reValidateMode:"onChange",...s}),u=l=>{if(c.trigger(),t){const f=o.map(d=>{let h=c.getValues()[d.id];return d.type===na&&h instanceof Date&&(h=ce(h).format(d.date_format||"DD-MM-YYYY")),{reference_id:d.id,value:Array.isArray(h)?h:[h],section_gid:d.section_gid,item_gid:d.g_id}});t(f)}};return T.jsx(OC,{...c,children:T.jsxs("form",{className:"bq-form-container space-y-4",onSubmit:c.handleSubmit(u),children:[r?.map(l=>T.jsx(MF,{section:l,form:c},l.g_id)),n&&n({form:c})]})})};return({data:e,onSubmit:t,config:n,renderFooter:r})=>T.jsx(Kv,{config:n,children:T.jsx(iR,{data:e,onSubmit:t,renderFooter:r})})}));