@isardsat/editorial-admin 6.19.5 → 6.20.0

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.
Files changed (59) hide show
  1. package/build/client/assets/FilePicker-DGseBDOZ.js +1 -0
  2. package/build/client/assets/{Loading-MKgXMPvl.js → Loading-C1QGFwZC.js} +1 -1
  3. package/build/client/assets/{URLInput-CPrLDhlu.js → URLInput-ATIRZflA.js} +1 -1
  4. package/build/client/assets/{authSlice-BI_rlf3v.js → authSlice-DWtXmmFR.js} +1 -1
  5. package/build/client/assets/{badge-gLcN3Bjg.js → badge-DTudhbGs.js} +1 -1
  6. package/build/client/assets/button-BEFuP7Ru.js +1 -0
  7. package/build/client/assets/chevron-down-qxzqwz13.js +1 -0
  8. package/build/client/assets/clear-button-DDlOMSPc.js +1 -0
  9. package/build/client/assets/{dashboard-Dpm8zjXn.js → dashboard-Z-q3vTcz.js} +1 -1
  10. package/build/client/assets/dashboard._collection-BJjjgsuR.js +1 -0
  11. package/build/client/assets/dashboard._collection._document-DsM6Ccoi.js +1 -0
  12. package/build/client/assets/dashboard._collection.new-CSCI2lHu.js +1 -0
  13. package/build/client/assets/dashboard._layout-BcvvHYJk.js +1 -0
  14. package/build/client/assets/dashboard.files-wgFLZCcb.js +1 -0
  15. package/build/client/assets/date-picker-BdkIUMlY.js +1 -0
  16. package/build/client/assets/datetime-picker-D5KjBZgW.js +1 -0
  17. package/build/client/assets/files-BTW5qTjQ.js +1 -0
  18. package/build/client/assets/home-DkI84frB.js +1 -0
  19. package/build/client/assets/index-6Qui8hKi.js +1 -0
  20. package/build/client/assets/index-BWbeFPrX.js +1 -0
  21. package/build/client/assets/{index-CtLWaleL.js → index-CbaefyjV.js} +1 -1
  22. package/build/client/assets/{index-pxU98Is7.js → index-Cgk-ojIv.js} +1 -1
  23. package/build/client/assets/index-DVXSV0SY.js +1 -0
  24. package/build/client/assets/index-F1mp4zFe.js +45 -0
  25. package/build/client/assets/{input-Bk91TMQj.js → input-C3iFdiD8.js} +1 -1
  26. package/build/client/assets/itemForm-DLH0QBUu.js +8 -0
  27. package/build/client/assets/manifest-31b20659.js +1 -0
  28. package/build/client/assets/{markdownEditor-DQlvnWfs.js → markdownEditor-DmTXZRsO.js} +2 -2
  29. package/build/client/assets/{root-CLpfMQQt.js → root-BYBo3WgS.js} +1 -1
  30. package/build/client/assets/root-CKQ4Xhj3.css +1 -0
  31. package/build/client/assets/{schemas-MhAKMGOb.js → schemas-D-U8dKAF.js} +1 -1
  32. package/build/client/assets/{utils-CCKKso3e.js → utils-B48p8Qal.js} +1 -1
  33. package/build/client/assets/x-D6gZWaAR.js +1 -0
  34. package/build/client/assets/zod-3z1GyiF_.js +1 -0
  35. package/build/client/index.html +2 -2
  36. package/package.json +2 -2
  37. package/build/client/assets/FilePicker-C1CJTrRE.js +0 -1
  38. package/build/client/assets/alert-dialog-CN-uuUVp.js +0 -7
  39. package/build/client/assets/clear-button-D05R9Y5Y.js +0 -1
  40. package/build/client/assets/dashboard._collection-WrdG5htb.js +0 -1
  41. package/build/client/assets/dashboard._collection._document-B1GJt2sO.js +0 -1
  42. package/build/client/assets/dashboard._collection.new-Diuwwt8Y.js +0 -1
  43. package/build/client/assets/dashboard._layout-B1StatCH.js +0 -1
  44. package/build/client/assets/dashboard.files-BK6IOREO.js +0 -1
  45. package/build/client/assets/date-picker-Dgbvfw_1.js +0 -1
  46. package/build/client/assets/datetime-picker-De7vM6e7.js +0 -1
  47. package/build/client/assets/files-Cdeyho5X.js +0 -1
  48. package/build/client/assets/home-DChaVk_H.js +0 -1
  49. package/build/client/assets/index-B0u0hYGX.js +0 -1
  50. package/build/client/assets/index-B2dzkZu5.js +0 -1
  51. package/build/client/assets/index-B3bJjaCJ.js +0 -1
  52. package/build/client/assets/index-BhARCKRr.js +0 -1
  53. package/build/client/assets/index-CHzEoQKp.js +0 -1
  54. package/build/client/assets/index-cCny74f5.js +0 -45
  55. package/build/client/assets/itemForm-CQAq1Sag.js +0 -2
  56. package/build/client/assets/manifest-fd6f5f23.js +0 -1
  57. package/build/client/assets/root-D5WeoLDH.css +0 -1
  58. package/build/client/assets/x-BVtfHpQX.js +0 -1
  59. package/build/client/assets/zod-BFfp0fV9.js +0 -1
@@ -0,0 +1 @@
1
+ import{c as o}from"./createLucideIcon-BvSqmaUO.js";const c=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],t=o("x",c);export{t as X};
@@ -0,0 +1 @@
1
+ import{a as q,p as M,R as x}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{u as Ft,S as tr}from"./index-CbaefyjV.js";import{c as rr,d as sr,a as Le,u as ir,b as ot,h as nr,P as or}from"./index-6Qui8hKi.js";import{b as fe}from"./utils-B48p8Qal.js";import{C as ar}from"./check-DF0ucE8d.js";import{p as ur,c as lr,$ as cr}from"./schemas-CPJfa6mm.js";function dr(e){const r=q.useRef({value:e,previous:e});return q.useMemo(()=>(r.current.value!==e&&(r.current.previous=r.current.value,r.current.value=e),r.current.previous),[e])}var ke="Checkbox",[fr]=rr(ke),[yr,Te]=fr(ke);function mr(e){const{__scopeCheckbox:r,checked:t,children:s,defaultChecked:o,disabled:n,form:u,name:c,onCheckedChange:_,required:p,value:I="on",internal_do_not_use_render:h}=e,[V,v]=ir({prop:t,defaultProp:o??!1,onChange:_,caller:ke}),[N,A]=q.useState(null),[O,C]=q.useState(null),b=q.useRef(!1),j=N?!!u||!!N.closest("form"):!0,F={checked:V,disabled:n,setChecked:v,control:N,setControl:A,name:c,form:u,value:I,hasConsumerStoppedPropagationRef:b,required:p,defaultChecked:ae(o)?!1:o,isFormControl:j,bubbleInput:O,setBubbleInput:C};return M.jsx(yr,{scope:r,...F,children:hr(h)?h(F):s})}var pt="CheckboxTrigger",kt=q.forwardRef(({__scopeCheckbox:e,onKeyDown:r,onClick:t,...s},o)=>{const{control:n,value:u,disabled:c,checked:_,required:p,setControl:I,setChecked:h,hasConsumerStoppedPropagationRef:V,isFormControl:v,bubbleInput:N}=Te(pt,e),A=Ft(o,I),O=q.useRef(_);return q.useEffect(()=>{const C=n?.form;if(C){const b=()=>h(O.current);return C.addEventListener("reset",b),()=>C.removeEventListener("reset",b)}},[n,h]),M.jsx(Le.button,{type:"button",role:"checkbox","aria-checked":ae(_)?"mixed":_,"aria-required":p,"data-state":St(_),"data-disabled":c?"":void 0,disabled:c,value:u,...s,ref:A,onKeyDown:ot(r,C=>{C.key==="Enter"&&C.preventDefault()}),onClick:ot(t,C=>{h(b=>ae(b)?!0:!b),N&&v&&(V.current=C.isPropagationStopped(),V.current||C.stopPropagation())})})});kt.displayName=pt;var Ct=q.forwardRef((e,r)=>{const{__scopeCheckbox:t,name:s,checked:o,defaultChecked:n,required:u,disabled:c,value:_,onCheckedChange:p,form:I,...h}=e;return M.jsx(mr,{__scopeCheckbox:t,checked:o,defaultChecked:n,disabled:c,required:u,onCheckedChange:p,name:s,form:I,value:_,internal_do_not_use_render:({isFormControl:V})=>M.jsxs(M.Fragment,{children:[M.jsx(kt,{...h,ref:r,__scopeCheckbox:t}),V&&M.jsx(Dt,{__scopeCheckbox:t})]})})});Ct.displayName=ke;var wt="CheckboxIndicator",Et=q.forwardRef((e,r)=>{const{__scopeCheckbox:t,forceMount:s,...o}=e,n=Te(wt,t);return M.jsx(sr,{present:s||ae(n.checked)||n.checked===!0,children:M.jsx(Le.span,{"data-state":St(n.checked),"data-disabled":n.disabled?"":void 0,...o,ref:r,style:{pointerEvents:"none",...e.style}})})});Et.displayName=wt;var At="CheckboxBubbleInput",Dt=q.forwardRef(({__scopeCheckbox:e,...r},t)=>{const{control:s,hasConsumerStoppedPropagationRef:o,checked:n,defaultChecked:u,required:c,disabled:_,name:p,value:I,form:h,bubbleInput:V,setBubbleInput:v}=Te(At,e),N=Ft(t,v),A=dr(n),O=nr(s);q.useEffect(()=>{const b=V;if(!b)return;const j=window.HTMLInputElement.prototype,k=Object.getOwnPropertyDescriptor(j,"checked").set,$=!o.current;if(A!==n&&k){const Q=new Event("click",{bubbles:$});b.indeterminate=ae(n),k.call(b,ae(n)?!1:n),b.dispatchEvent(Q)}},[V,A,n,o]);const C=q.useRef(ae(n)?!1:n);return M.jsx(Le.input,{type:"checkbox","aria-hidden":!0,defaultChecked:u??C.current,required:c,disabled:_,name:p,value:I,form:h,...r,tabIndex:-1,ref:N,style:{...r.style,...O,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Dt.displayName=At;function hr(e){return typeof e=="function"}function ae(e){return e==="indeterminate"}function St(e){return ae(e)?"indeterminate":e?"checked":"unchecked"}function Zr({className:e,...r}){return M.jsx(Ct,{"data-slot":"checkbox",className:fe("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),...r,children:M.jsx(Et,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:M.jsx(ar,{className:"size-3.5"})})})}var gr="Label",Rt=q.forwardRef((e,r)=>M.jsx(or.label,{...e,ref:r,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));Rt.displayName=gr;var br=Rt,_e=e=>e.type==="checkbox",le=e=>e instanceof Date,G=e=>e==null;const It=e=>typeof e=="object";var U=e=>!G(e)&&!Array.isArray(e)&&It(e)&&!le(e),Nt=e=>U(e)&&e.target?_e(e.target)?e.target.checked:e.target.value:e,vr=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Ot=(e,r)=>e.has(vr(r)),_r=e=>{const r=e.constructor&&e.constructor.prototype;return U(r)&&r.hasOwnProperty("isPrototypeOf")},Ue=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function L(e){if(e instanceof Date)return new Date(e);const r=typeof FileList<"u"&&e instanceof FileList;if(Ue&&(e instanceof Blob||r))return e;const t=Array.isArray(e);if(!t&&!(U(e)&&_r(e)))return e;const s=t?[]:Object.create(Object.getPrototypeOf(e));for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(s[o]=L(e[o]));return s}var Ce=e=>/^\w*$/.test(e),P=e=>e===void 0,je=e=>Array.isArray(e)?e.filter(Boolean):[],Be=e=>je(e.replace(/["|']|\]/g,"").split(/\.|\[/)),y=(e,r,t)=>{if(!r||!U(e))return t;const s=(Ce(r)?[r]:Be(r)).reduce((o,n)=>G(o)?o:o[n],e);return P(s)||s===e?P(e[r])?t:e[r]:s},Z=e=>typeof e=="boolean",K=e=>typeof e=="function",R=(e,r,t)=>{let s=-1;const o=Ce(r)?[r]:Be(r),n=o.length,u=n-1;for(;++s<n;){const c=o[s];let _=t;if(s!==u){const p=e[c];_=U(p)||Array.isArray(p)?p:isNaN(+o[s+1])?{}:[]}if(c==="__proto__"||c==="constructor"||c==="prototype")return;e[c]=_,e=e[c]}};const Ve={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},te={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},ne={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},qe=x.createContext(null);qe.displayName="HookFormControlContext";const $e=()=>x.useContext(qe);var Pt=(e,r,t,s=!0)=>{const o={defaultValues:r._defaultValues};for(const n in e)Object.defineProperty(o,n,{get:()=>{const u=n;return r._proxyFormState[u]!==te.all&&(r._proxyFormState[u]=!s||te.all),t&&(t[u]=!0),e[u]}});return o};const He=typeof window<"u"?x.useLayoutEffect:x.useEffect;function Mt(e){const r=$e(),{control:t=r,disabled:s,name:o,exact:n}=e||{},[u,c]=x.useState(t._formState),_=x.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return He(()=>t._subscribe({name:o,formState:_.current,exact:n,callback:p=>{!s&&c({...t._formState,...p})}}),[o,s,n]),x.useEffect(()=>{_.current.isValid&&t._setValid(!0)},[t]),x.useMemo(()=>Pt(u,t,_.current,!1),[u,t])}var Y=e=>typeof e=="string",Ne=(e,r,t,s,o)=>Y(e)?(s&&r.watch.add(e),y(t,e,o)):Array.isArray(e)?e.map(n=>(s&&r.watch.add(n),y(t,n))):(s&&(r.watchAll=!0),t),Oe=e=>G(e)||!It(e);function re(e,r,t=new WeakSet){if(Oe(e)||Oe(r))return Object.is(e,r);if(le(e)&&le(r))return Object.is(e.getTime(),r.getTime());const s=Object.keys(e),o=Object.keys(r);if(s.length!==o.length)return!1;if(t.has(e)||t.has(r))return!0;t.add(e),t.add(r);for(const n of s){const u=e[n];if(!o.includes(n))return!1;if(n!=="ref"){const c=r[n];if(le(u)&&le(c)||U(u)&&U(c)||Array.isArray(u)&&Array.isArray(c)?!re(u,c,t):!Object.is(u,c))return!1}}return!0}function xr(e){const r=$e(),{control:t=r,name:s,defaultValue:o,disabled:n,exact:u,compute:c}=e||{},_=x.useRef(o),p=x.useRef(c),I=x.useRef(void 0),h=x.useRef(t),V=x.useRef(s);p.current=c;const[v,N]=x.useState(()=>{const F=t._getWatch(s,_.current);return p.current?p.current(F):F}),A=x.useCallback(F=>{const k=Ne(s,t._names,F||t._formValues,!1,_.current);return p.current?p.current(k):k},[t._formValues,t._names,s]),O=x.useCallback(F=>{if(!n){const k=Ne(s,t._names,F||t._formValues,!1,_.current);if(p.current){const $=p.current(k);re($,I.current)||(N($),I.current=$)}else N(k)}},[t._formValues,t._names,n,s]);He(()=>((h.current!==t||!re(V.current,s))&&(h.current=t,V.current=s,O()),t._subscribe({name:s,formState:{values:!0},exact:u,callback:F=>{O(F.values)}})),[t,u,s,O]),x.useEffect(()=>t._removeUnmounted());const C=h.current!==t,b=V.current,j=x.useMemo(()=>{if(n)return null;const F=!C&&!re(b,s);return C||F?A():null},[n,C,s,b,A]);return j!==null?j:v}function Vr(e){const r=$e(),{name:t,disabled:s,control:o=r,shouldUnregister:n,defaultValue:u,exact:c=!0}=e,_=Ot(o._names.array,t),p=x.useMemo(()=>y(o._formValues,t,y(o._defaultValues,t,u)),[o,t,u]),I=xr({control:o,name:t,defaultValue:p,exact:c}),h=Mt({control:o,name:t,exact:c}),V=x.useRef(e),v=x.useRef(void 0),N=x.useRef(o.register(t,{...e.rules,value:I,...Z(e.disabled)?{disabled:e.disabled}:{}}));V.current=e;const A=x.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!y(h.errors,t)},isDirty:{enumerable:!0,get:()=>!!y(h.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!y(h.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!y(h.validatingFields,t)},error:{enumerable:!0,get:()=>y(h.errors,t)}}),[h,t]),O=x.useCallback(F=>N.current.onChange({target:{value:Nt(F),name:t},type:Ve.CHANGE}),[t]),C=x.useCallback(()=>N.current.onBlur({target:{value:y(o._formValues,t),name:t},type:Ve.BLUR}),[t,o._formValues]),b=x.useCallback(F=>{const k=y(o._fields,t);k&&k._f&&F&&(k._f.ref={focus:()=>K(F.focus)&&F.focus(),select:()=>K(F.select)&&F.select(),setCustomValidity:$=>K(F.setCustomValidity)&&F.setCustomValidity($),reportValidity:()=>K(F.reportValidity)&&F.reportValidity()})},[o._fields,t]),j=x.useMemo(()=>({name:t,value:I,...Z(s)||h.disabled?{disabled:h.disabled||s}:{},onChange:O,onBlur:C,ref:b}),[t,s,h.disabled,O,C,b,I]);return x.useEffect(()=>{const F=o._options.shouldUnregister||n,k=v.current;k&&k!==t&&!_&&o.unregister(k),o.register(t,{...V.current.rules,...Z(V.current.disabled)?{disabled:V.current.disabled}:{}});const $=(Q,ie)=>{const se=y(o._fields,Q);se&&se._f&&(se._f.mount=ie)};if($(t,!0),F){const Q=L(y(o._options.defaultValues,t,V.current.defaultValue));R(o._defaultValues,t,Q),P(y(o._formValues,t))&&R(o._formValues,t,Q)}return!_&&o.register(t),v.current=t,()=>{(_?F&&!o._state.action:F)?o.unregister(t):$(t,!1)}},[t,o,_,n]),x.useEffect(()=>{o._setDisabledField({disabled:s,name:t})},[s,t,o]),x.useMemo(()=>({field:j,formState:h,fieldState:A}),[j,h,A])}const Fr=e=>e.render(Vr(e)),We=x.createContext(null);We.displayName="HookFormContext";const pr=()=>x.useContext(We),kr=e=>{const{children:r,watch:t,getValues:s,getFieldState:o,setError:n,clearErrors:u,setValue:c,trigger:_,formState:p,resetField:I,reset:h,handleSubmit:V,unregister:v,control:N,register:A,setFocus:O,subscribe:C}=e;return x.createElement(We.Provider,{value:x.useMemo(()=>({watch:t,getValues:s,getFieldState:o,setError:n,clearErrors:u,setValue:c,trigger:_,formState:p,resetField:I,reset:h,handleSubmit:V,unregister:v,control:N,register:A,setFocus:O,subscribe:C}),[u,N,p,o,s,V,A,h,I,n,O,c,C,_,v,t])},x.createElement(qe.Provider,{value:N},r))};var ze=(e,r,t,s,o)=>r?{...t[e],types:{...t[e]&&t[e].types?t[e].types:{},[s]:o||!0}}:{},be=e=>Array.isArray(e)?e:[e],at=()=>{let e=[];return{get observers(){return e},next:o=>{for(const n of e)n.next&&n.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(n=>n!==o)}}),unsubscribe:()=>{e=[]}}};function Lt(e,r){const t={};for(const s in e)if(e.hasOwnProperty(s)){const o=e[s],n=r[s];if(o&&U(o)&&n){const u=Lt(o,n);U(u)&&(t[s]=u)}else e[s]&&(t[s]=n)}return t}var z=e=>U(e)&&!Object.keys(e).length,Ke=e=>e.type==="file",Fe=e=>{if(!Ue)return!1;const r=e?e.ownerDocument:0;return e instanceof(r&&r.defaultView?r.defaultView.HTMLElement:HTMLElement)},Tt=e=>e.type==="select-multiple",Ge=e=>e.type==="radio",Cr=e=>Ge(e)||_e(e),Ie=e=>Fe(e)&&e.isConnected;function wr(e,r){const t=r.slice(0,-1).length;let s=0;for(;s<t;)e=P(e)?s++:e[r[s++]];return e}function Er(e){for(const r in e)if(e.hasOwnProperty(r)&&!P(e[r]))return!1;return!0}function T(e,r){const t=Array.isArray(r)?r:Ce(r)?[r]:Be(r),s=t.length===1?e:wr(e,t),o=t.length-1,n=t[o];return s&&delete s[n],o!==0&&(U(s)&&z(s)||Array.isArray(s)&&Er(s))&&T(e,t.slice(0,-1)),e}var Ar=e=>{for(const r in e)if(K(e[r]))return!0;return!1};function Ut(e){return Array.isArray(e)||U(e)&&!Ar(e)}function Pe(e,r={}){for(const t in e){const s=e[t];Ut(s)?(r[t]=Array.isArray(s)?[]:{},Pe(s,r[t])):P(s)||(r[t]=!0)}return r}function de(e,r,t){t||(t=Pe(r));for(const s in e){const o=e[s];if(Ut(o))P(r)||Oe(t[s])?t[s]=Pe(o,Array.isArray(o)?[]:{}):de(o,G(r)?{}:r[s],t[s]);else{const n=r[s];t[s]=!re(o,n)}}return t}const ut={value:!1,isValid:!1},lt={value:!0,isValid:!0};var jt=e=>{if(Array.isArray(e)){if(e.length>1){const r=e.filter(t=>t&&t.checked&&!t.disabled).map(t=>t.value);return{value:r,isValid:!!r.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!P(e[0].attributes.value)?P(e[0].value)||e[0].value===""?lt:{value:e[0].value,isValid:!0}:lt:ut}return ut},Bt=(e,{valueAsNumber:r,valueAsDate:t,setValueAs:s})=>P(e)?e:r?e===""?NaN:e&&+e:t&&Y(e)?new Date(e):s?s(e):e;const ct={isValid:!1,value:null};var qt=e=>Array.isArray(e)?e.reduce((r,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:r,ct):ct;function dt(e){const r=e.ref;return Ke(r)?r.files:Ge(r)?qt(e.refs).value:Tt(r)?[...r.selectedOptions].map(({value:t})=>t):_e(r)?jt(e.refs).value:Bt(P(r.value)?e.ref.value:r.value,e)}var Dr=(e,r,t,s)=>{const o={};for(const n of e){const u=y(r,n);u&&R(o,n,u._f)}return{criteriaMode:t,names:[...e],fields:o,shouldUseNativeValidation:s}},pe=e=>e instanceof RegExp,ge=e=>P(e)?e:pe(e)?e.source:U(e)?pe(e.value)?e.value.source:e.value:e,ft=e=>({isOnSubmit:!e||e===te.onSubmit,isOnBlur:e===te.onBlur,isOnChange:e===te.onChange,isOnAll:e===te.all,isOnTouch:e===te.onTouched});const yt="AsyncFunction";var Sr=e=>!!e&&!!e.validate&&!!(K(e.validate)&&e.validate.constructor.name===yt||U(e.validate)&&Object.values(e.validate).find(r=>r.constructor.name===yt)),Rr=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),mt=(e,r,t)=>!t&&(r.watchAll||r.watch.has(e)||[...r.watch].some(s=>e.startsWith(s)&&/^\.\w+/.test(e.slice(s.length))));const ve=(e,r,t,s)=>{for(const o of t||Object.keys(e)){const n=y(e,o);if(n){const{_f:u,...c}=n;if(u){if(u.refs&&u.refs[0]&&r(u.refs[0],o)&&!s)return!0;if(u.ref&&r(u.ref,u.name)&&!s)return!0;if(ve(c,r))break}else if(U(c)&&ve(c,r))break}}};function ht(e,r,t){const s=y(e,t);if(s||Ce(t))return{error:s,name:t};const o=t.split(".");for(;o.length;){const n=o.join("."),u=y(r,n),c=y(e,n);if(u&&!Array.isArray(u)&&t!==n)return{name:t};if(c&&c.type)return{name:n,error:c};if(c&&c.root&&c.root.type)return{name:`${n}.root`,error:c.root};o.pop()}return{name:t}}var Ir=(e,r,t,s)=>{t(e);const{name:o,...n}=e;return z(n)||Object.keys(n).length>=Object.keys(r).length||Object.keys(n).find(u=>r[u]===(!s||te.all))},Nr=(e,r,t)=>!e||!r||e===r||be(e).some(s=>s&&(t?s===r:s.startsWith(r)||r.startsWith(s))),Or=(e,r,t,s,o)=>o.isOnAll?!1:!t&&o.isOnTouch?!(r||e):(t?s.isOnBlur:o.isOnBlur)?!e:(t?s.isOnChange:o.isOnChange)?e:!0,Pr=(e,r)=>!je(y(e,r)).length&&T(e,r),Mr=(e,r,t)=>{const s=be(y(e,t));return R(s,"root",r[t]),R(e,t,s),e};function gt(e,r,t="validate"){if(Y(e)||Array.isArray(e)&&e.every(Y)||Z(e)&&!e)return{type:t,message:Y(e)?e:"",ref:r}}var ce=e=>U(e)&&!pe(e)?e:{value:e,message:""},bt=async(e,r,t,s,o,n)=>{const{ref:u,refs:c,required:_,maxLength:p,minLength:I,min:h,max:V,pattern:v,validate:N,name:A,valueAsNumber:O,mount:C}=e._f,b=y(t,A);if(!C||r.has(A))return{};const j=c?c[0]:u,F=w=>{o&&j.reportValidity&&(j.setCustomValidity(Z(w)?"":w||""),j.reportValidity())},k={},$=Ge(u),Q=_e(u),ie=$||Q,se=(O||Ke(u))&&P(u.value)&&P(b)||Fe(u)&&u.value===""||b===""||Array.isArray(b)&&!b.length,J=ze.bind(null,A,s,k),xe=(w,E,B,H=ne.maxLength,ee=ne.minLength)=>{const X=w?E:B;k[A]={type:w?H:ee,message:X,ref:u,...J(w?H:ee,X)}};if(n?!Array.isArray(b)||!b.length:_&&(!ie&&(se||G(b))||Z(b)&&!b||Q&&!jt(c).isValid||$&&!qt(c).isValid)){const{value:w,message:E}=Y(_)?{value:!!_,message:_}:ce(_);if(w&&(k[A]={type:ne.required,message:E,ref:j,...J(ne.required,E)},!s))return F(E),k}if(!se&&(!G(h)||!G(V))){let w,E;const B=ce(V),H=ce(h);if(!G(b)&&!isNaN(b)){const ee=u.valueAsNumber||b&&+b;G(B.value)||(w=ee>B.value),G(H.value)||(E=ee<H.value)}else{const ee=u.valueAsDate||new Date(b),X=he=>new Date(new Date().toDateString()+" "+he),ye=u.type=="time",me=u.type=="week";Y(B.value)&&b&&(w=ye?X(b)>X(B.value):me?b>B.value:ee>new Date(B.value)),Y(H.value)&&b&&(E=ye?X(b)<X(H.value):me?b<H.value:ee<new Date(H.value))}if((w||E)&&(xe(!!w,B.message,H.message,ne.max,ne.min),!s))return F(k[A].message),k}if((p||I)&&!se&&(Y(b)||n&&Array.isArray(b))){const w=ce(p),E=ce(I),B=!G(w.value)&&b.length>+w.value,H=!G(E.value)&&b.length<+E.value;if((B||H)&&(xe(B,w.message,E.message),!s))return F(k[A].message),k}if(v&&!se&&Y(b)){const{value:w,message:E}=ce(v);if(pe(w)&&!b.match(w)&&(k[A]={type:ne.pattern,message:E,ref:u,...J(ne.pattern,E)},!s))return F(E),k}if(N){if(K(N)){const w=await N(b,t),E=gt(w,j);if(E&&(k[A]={...E,...J(ne.validate,E.message)},!s))return F(E.message),k}else if(U(N)){let w={};for(const E in N){if(!z(w)&&!s)break;const B=gt(await N[E](b,t),j,E);B&&(w={...B,...J(E,B.message)},F(B.message),s&&(k[A]=w))}if(!z(w)&&(k[A]={ref:j,...w},!s))return k}}return F(!0),k};const Lr={mode:te.onSubmit,reValidateMode:te.onChange,shouldFocusError:!0};function Tr(e={}){let r={...Lr,...e},t={submitCount:0,isDirty:!1,isReady:!1,isLoading:K(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1},s={},o=U(r.defaultValues)||U(r.values)?L(r.defaultValues||r.values)||{}:{},n=r.shouldUnregister?{}:L(o),u={action:!1,mount:!1,watch:!1,keepIsValid:!1},c={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},_,p=0;const I={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},h={...I};let V={...h};const v={array:at(),state:at()},N=r.criteriaMode===te.all,A=i=>a=>{clearTimeout(p),p=setTimeout(i,a)},O=async i=>{if(!u.keepIsValid&&!r.disabled&&(h.isValid||V.isValid||i)){let a;r.resolver?(a=z((await ie()).errors),C()):a=await J(s,!0),a!==t.isValid&&v.state.next({isValid:a})}},C=(i,a)=>{!r.disabled&&(h.isValidating||h.validatingFields||V.isValidating||V.validatingFields)&&((i||Array.from(c.mount)).forEach(l=>{l&&(a?R(t.validatingFields,l,a):T(t.validatingFields,l))}),v.state.next({validatingFields:t.validatingFields,isValidating:!z(t.validatingFields)}))},b=(i,a=[],l,m,f=!0,d=!0)=>{if(m&&l&&!r.disabled){if(u.action=!0,d&&Array.isArray(y(s,i))){const g=l(y(s,i),m.argA,m.argB);f&&R(s,i,g)}if(d&&Array.isArray(y(t.errors,i))){const g=l(y(t.errors,i),m.argA,m.argB);f&&R(t.errors,i,g),Pr(t.errors,i)}if((h.touchedFields||V.touchedFields)&&d&&Array.isArray(y(t.touchedFields,i))){const g=l(y(t.touchedFields,i),m.argA,m.argB);f&&R(t.touchedFields,i,g)}(h.dirtyFields||V.dirtyFields)&&(t.dirtyFields=de(o,n)),v.state.next({name:i,isDirty:w(i,a),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else R(n,i,a)},j=(i,a)=>{R(t.errors,i,a),v.state.next({errors:t.errors})},F=i=>{t.errors=i,v.state.next({errors:t.errors,isValid:!1})},k=(i,a,l,m)=>{const f=y(s,i);if(f){const d=y(n,i,P(l)?y(o,i):l);P(d)||m&&m.defaultChecked||a?R(n,i,a?d:dt(f._f)):H(i,d),u.mount&&!u.action&&O()}},$=(i,a,l,m,f)=>{let d=!1,g=!1;const D={name:i};if(!r.disabled){if(!l||m){(h.isDirty||V.isDirty)&&(g=t.isDirty,t.isDirty=D.isDirty=w(),d=g!==D.isDirty);const S=re(y(o,i),a);g=!!y(t.dirtyFields,i),S?T(t.dirtyFields,i):R(t.dirtyFields,i,!0),D.dirtyFields=t.dirtyFields,d=d||(h.dirtyFields||V.dirtyFields)&&g!==!S}if(l){const S=y(t.touchedFields,i);S||(R(t.touchedFields,i,l),D.touchedFields=t.touchedFields,d=d||(h.touchedFields||V.touchedFields)&&S!==l)}d&&f&&v.state.next(D)}return d?D:{}},Q=(i,a,l,m)=>{const f=y(t.errors,i),d=(h.isValid||V.isValid)&&Z(a)&&t.isValid!==a;if(r.delayError&&l?(_=A(()=>j(i,l)),_(r.delayError)):(clearTimeout(p),_=null,l?R(t.errors,i,l):T(t.errors,i)),(l?!re(f,l):f)||!z(m)||d){const g={...m,...d&&Z(a)?{isValid:a}:{},errors:t.errors,name:i};t={...t,...g},v.state.next(g)}},ie=async i=>(C(i,!0),await r.resolver(n,r.context,Dr(i||c.mount,s,r.criteriaMode,r.shouldUseNativeValidation))),se=async i=>{const{errors:a}=await ie(i);if(C(i),i)for(const l of i){const m=y(a,l);m?R(t.errors,l,m):T(t.errors,l)}else t.errors=a;return a},J=async(i,a,l={valid:!0})=>{for(const m in i){const f=i[m];if(f){const{_f:d,...g}=f;if(d){const D=c.array.has(d.name),S=f._f&&Sr(f._f);S&&h.validatingFields&&C([d.name],!0);const W=await bt(f,c.disabled,n,N,r.shouldUseNativeValidation&&!a,D);if(S&&h.validatingFields&&C([d.name]),W[d.name]&&(l.valid=!1,a||e.shouldUseNativeValidation))break;!a&&(y(W,d.name)?D?Mr(t.errors,W,d.name):R(t.errors,d.name,W[d.name]):T(t.errors,d.name))}!z(g)&&await J(g,a,l)}}return l.valid},xe=()=>{for(const i of c.unMount){const a=y(s,i);a&&(a._f.refs?a._f.refs.every(l=>!Ie(l)):!Ie(a._f.ref))&&Ee(i)}c.unMount=new Set},w=(i,a)=>!r.disabled&&(i&&a&&R(n,i,a),!re(Xe(),o)),E=(i,a,l)=>Ne(i,c,{...u.mount?n:P(a)?o:Y(i)?{[i]:a}:a},l,a),B=i=>je(y(u.mount?n:o,i,r.shouldUnregister?y(o,i,[]):[])),H=(i,a,l={})=>{const m=y(s,i);let f=a;if(m){const d=m._f;d&&(!d.disabled&&R(n,i,Bt(a,d)),f=Fe(d.ref)&&G(a)?"":a,Tt(d.ref)?[...d.ref.options].forEach(g=>g.selected=f.includes(g.value)):d.refs?_e(d.ref)?d.refs.forEach(g=>{(!g.defaultChecked||!g.disabled)&&(Array.isArray(f)?g.checked=!!f.find(D=>D===g.value):g.checked=f===g.value||!!f)}):d.refs.forEach(g=>g.checked=g.value===f):Ke(d.ref)?d.ref.value="":(d.ref.value=f,d.ref.type||v.state.next({name:i,values:L(n)})))}(l.shouldDirty||l.shouldTouch)&&$(i,f,l.shouldTouch,l.shouldDirty,!0),l.shouldValidate&&he(i)},ee=(i,a,l)=>{for(const m in a){if(!a.hasOwnProperty(m))return;const f=a[m],d=i+"."+m,g=y(s,d);(c.array.has(i)||U(f)||g&&!g._f)&&!le(f)?ee(d,f,l):H(d,f,l)}},X=(i,a,l={})=>{const m=y(s,i),f=c.array.has(i),d=L(a);R(n,i,d),f?(v.array.next({name:i,values:L(n)}),(h.isDirty||h.dirtyFields||V.isDirty||V.dirtyFields)&&l.shouldDirty&&v.state.next({name:i,dirtyFields:de(o,n),isDirty:w(i,d)})):m&&!m._f&&!G(d)?ee(i,d,l):H(i,d,l),mt(i,c)?v.state.next({...t,name:i,values:L(n)}):v.state.next({name:u.mount?i:void 0,values:L(n)})},ye=async i=>{u.mount=!0;const a=i.target;let l=a.name,m=!0;const f=y(s,l),d=S=>{m=Number.isNaN(S)||le(S)&&isNaN(S.getTime())||re(S,y(n,l,S))},g=ft(r.mode),D=ft(r.reValidateMode);if(f){let S,W;const ue=a.type?dt(f._f):Nt(i),oe=i.type===Ve.BLUR||i.type===Ve.FOCUS_OUT,Jt=!Rr(f._f)&&!r.resolver&&!y(t.errors,l)&&!f._f.deps||Or(oe,y(t.touchedFields,l),t.isSubmitted,D,g),Se=mt(l,c,oe);R(n,l,ue),oe?(!a||!a.readOnly)&&(f._f.onBlur&&f._f.onBlur(i),_&&_(0)):f._f.onChange&&f._f.onChange(i);const Re=$(l,ue,oe),Qt=!z(Re)||Se;if(!oe&&v.state.next({name:l,type:i.type,values:L(n)}),Jt)return(h.isValid||V.isValid)&&(r.mode==="onBlur"?oe&&O():oe||O()),Qt&&v.state.next({name:l,...Se?{}:Re});if(!oe&&Se&&v.state.next({...t}),r.resolver){const{errors:it}=await ie([l]);if(C([l]),d(ue),m){const er=ht(t.errors,s,l),nt=ht(it,s,er.name||l);S=nt.error,l=nt.name,W=z(it)}}else C([l],!0),S=(await bt(f,c.disabled,n,N,r.shouldUseNativeValidation))[l],C([l]),d(ue),m&&(S?W=!1:(h.isValid||V.isValid)&&(W=await J(s,!0)));m&&(f._f.deps&&(!Array.isArray(f._f.deps)||f._f.deps.length>0)&&he(f._f.deps),Q(l,W,S,Re))}},me=(i,a)=>{if(y(t.errors,a)&&i.focus)return i.focus(),1},he=async(i,a={})=>{let l,m;const f=be(i);if(r.resolver){const d=await se(P(i)?i:f);l=z(d),m=i?!f.some(g=>y(d,g)):l}else i?(m=(await Promise.all(f.map(async d=>{const g=y(s,d);return await J(g&&g._f?{[d]:g}:g)}))).every(Boolean),!(!m&&!t.isValid)&&O()):m=l=await J(s);return v.state.next({...!Y(i)||(h.isValid||V.isValid)&&l!==t.isValid?{}:{name:i},...r.resolver||!i?{isValid:l}:{},errors:t.errors}),a.shouldFocus&&!m&&ve(s,me,i?f:c.mount),m},Xe=(i,a)=>{let l={...u.mount?n:o};return a&&(l=Lt(a.dirtyFields?t.dirtyFields:t.touchedFields,l)),P(i)?l:Y(i)?y(l,i):i.map(m=>y(l,m))},Ze=(i,a)=>({invalid:!!y((a||t).errors,i),isDirty:!!y((a||t).dirtyFields,i),error:y((a||t).errors,i),isValidating:!!y(t.validatingFields,i),isTouched:!!y((a||t).touchedFields,i)}),Wt=i=>{i&&be(i).forEach(a=>T(t.errors,a)),v.state.next({errors:i?t.errors:{}})},Ye=(i,a,l)=>{const m=(y(s,i,{_f:{}})._f||{}).ref,f=y(t.errors,i)||{},{ref:d,message:g,type:D,...S}=f;R(t.errors,i,{...S,...a,ref:m}),v.state.next({name:i,errors:t.errors,isValid:!1}),l&&l.shouldFocus&&m&&m.focus&&m.focus()},zt=(i,a)=>K(i)?v.state.subscribe({next:l=>"values"in l&&i(E(void 0,a),l)}):E(i,a,!0),Je=i=>v.state.subscribe({next:a=>{Nr(i.name,a.name,i.exact)&&Ir(a,i.formState||h,Yt,i.reRenderRoot)&&i.callback({values:{...n},...t,...a,defaultValues:o})}}).unsubscribe,Kt=i=>(u.mount=!0,V={...V,...i.formState},Je({...i,formState:{...I,...i.formState}})),Ee=(i,a={})=>{for(const l of i?be(i):c.mount)c.mount.delete(l),c.array.delete(l),a.keepValue||(T(s,l),T(n,l)),!a.keepError&&T(t.errors,l),!a.keepDirty&&T(t.dirtyFields,l),!a.keepTouched&&T(t.touchedFields,l),!a.keepIsValidating&&T(t.validatingFields,l),!r.shouldUnregister&&!a.keepDefaultValue&&T(o,l);v.state.next({values:L(n)}),v.state.next({...t,...a.keepDirty?{isDirty:w()}:{}}),!a.keepIsValid&&O()},Qe=({disabled:i,name:a})=>{if(Z(i)&&u.mount||i||c.disabled.has(a)){const f=c.disabled.has(a)!==!!i;i?c.disabled.add(a):c.disabled.delete(a),f&&u.mount&&!u.action&&O()}},Ae=(i,a={})=>{let l=y(s,i);const m=Z(a.disabled)||Z(r.disabled);return R(s,i,{...l||{},_f:{...l&&l._f?l._f:{ref:{name:i}},name:i,mount:!0,...a}}),c.mount.add(i),l?Qe({disabled:Z(a.disabled)?a.disabled:r.disabled,name:i}):k(i,!0,a.value),{...m?{disabled:a.disabled||r.disabled}:{},...r.progressive?{required:!!a.required,min:ge(a.min),max:ge(a.max),minLength:ge(a.minLength),maxLength:ge(a.maxLength),pattern:ge(a.pattern)}:{},name:i,onChange:ye,onBlur:ye,ref:f=>{if(f){Ae(i,a),l=y(s,i);const d=P(f.value)&&f.querySelectorAll&&f.querySelectorAll("input,select,textarea")[0]||f,g=Cr(d),D=l._f.refs||[];if(g?D.find(S=>S===d):d===l._f.ref)return;R(s,i,{_f:{...l._f,...g?{refs:[...D.filter(Ie),d,...Array.isArray(y(o,i))?[{}]:[]],ref:{type:d.type,name:i}}:{ref:d}}}),k(i,!1,void 0,d)}else l=y(s,i,{}),l._f&&(l._f.mount=!1),(r.shouldUnregister||a.shouldUnregister)&&!(Ot(c.array,i)&&u.action)&&c.unMount.add(i)}}},De=()=>r.shouldFocusError&&ve(s,me,c.mount),Gt=i=>{Z(i)&&(v.state.next({disabled:i}),ve(s,(a,l)=>{const m=y(s,l);m&&(a.disabled=m._f.disabled||i,Array.isArray(m._f.refs)&&m._f.refs.forEach(f=>{f.disabled=m._f.disabled||i}))},0,!1))},et=(i,a)=>async l=>{let m;l&&(l.preventDefault&&l.preventDefault(),l.persist&&l.persist());let f=L(n);if(v.state.next({isSubmitting:!0}),r.resolver){const{errors:d,values:g}=await ie();C(),t.errors=d,f=L(g)}else await J(s);if(c.disabled.size)for(const d of c.disabled)T(f,d);if(T(t.errors,"root"),z(t.errors)){v.state.next({errors:{}});try{await i(f,l)}catch(d){m=d}}else a&&await a({...t.errors},l),De(),setTimeout(De);if(v.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:z(t.errors)&&!m,submitCount:t.submitCount+1,errors:t.errors}),m)throw m},Xt=(i,a={})=>{y(s,i)&&(P(a.defaultValue)?X(i,L(y(o,i))):(X(i,a.defaultValue),R(o,i,L(a.defaultValue))),a.keepTouched||T(t.touchedFields,i),a.keepDirty||(T(t.dirtyFields,i),t.isDirty=a.defaultValue?w(i,L(y(o,i))):w()),a.keepError||(T(t.errors,i),h.isValid&&O()),v.state.next({...t}))},tt=(i,a={})=>{const l=i?L(i):o,m=L(l),f=z(i),d=f?o:m;if(a.keepDefaultValues||(o=l),!a.keepValues){if(a.keepDirtyValues){const g=new Set([...c.mount,...Object.keys(de(o,n))]);for(const D of Array.from(g)){const S=y(t.dirtyFields,D),W=y(n,D),ue=y(d,D);S&&!P(W)?R(d,D,W):!S&&!P(ue)&&X(D,ue)}}else{if(Ue&&P(i))for(const g of c.mount){const D=y(s,g);if(D&&D._f){const S=Array.isArray(D._f.refs)?D._f.refs[0]:D._f.ref;if(Fe(S)){const W=S.closest("form");if(W){W.reset();break}}}}if(a.keepFieldsRef)for(const g of c.mount)X(g,y(d,g));else s={}}n=r.shouldUnregister?a.keepDefaultValues?L(o):{}:L(d),v.array.next({values:{...d}}),v.state.next({values:{...d}})}c={mount:a.keepDirtyValues?c.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},u.mount=!h.isValid||!!a.keepIsValid||!!a.keepDirtyValues||!r.shouldUnregister&&!z(d),u.watch=!!r.shouldUnregister,u.keepIsValid=!!a.keepIsValid,u.action=!1,a.keepErrors||(t.errors={}),v.state.next({submitCount:a.keepSubmitCount?t.submitCount:0,isDirty:f?!1:a.keepDirty?t.isDirty:!!(a.keepDefaultValues&&!re(i,o)),isSubmitted:a.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:f?{}:a.keepDirtyValues?a.keepDefaultValues&&n?de(o,n):t.dirtyFields:a.keepDefaultValues&&i?de(o,i):a.keepDirty?t.dirtyFields:{},touchedFields:a.keepTouched?t.touchedFields:{},errors:a.keepErrors?t.errors:{},isSubmitSuccessful:a.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},rt=(i,a)=>tt(K(i)?i(n):i,{...r.resetOptions,...a}),Zt=(i,a={})=>{const l=y(s,i),m=l&&l._f;if(m){const f=m.refs?m.refs[0]:m.ref;f.focus&&setTimeout(()=>{f.focus(),a.shouldSelect&&K(f.select)&&f.select()})}},Yt=i=>{t={...t,...i}},st={control:{register:Ae,unregister:Ee,getFieldState:Ze,handleSubmit:et,setError:Ye,_subscribe:Je,_runSchema:ie,_updateIsValidating:C,_focusError:De,_getWatch:E,_getDirty:w,_setValid:O,_setFieldArray:b,_setDisabledField:Qe,_setErrors:F,_getFieldArray:B,_reset:tt,_resetDefaultValues:()=>K(r.defaultValues)&&r.defaultValues().then(i=>{rt(i,r.resetOptions),v.state.next({isLoading:!1})}),_removeUnmounted:xe,_disableForm:Gt,_subjects:v,_proxyFormState:h,get _fields(){return s},get _formValues(){return n},get _state(){return u},set _state(i){u=i},get _defaultValues(){return o},get _names(){return c},set _names(i){c=i},get _formState(){return t},get _options(){return r},set _options(i){r={...r,...i}}},subscribe:Kt,trigger:he,register:Ae,handleSubmit:et,watch:zt,setValue:X,getValues:Xe,reset:rt,resetField:Xt,clearErrors:Wt,unregister:Ee,setError:Ye,setFocus:Zt,getFieldState:Ze};return{...st,formControl:st}}function Yr(e={}){const r=x.useRef(void 0),t=x.useRef(void 0),[s,o]=x.useState({isDirty:!1,isValidating:!1,isLoading:K(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:K(e.defaultValues)?void 0:e.defaultValues});if(!r.current)if(e.formControl)r.current={...e.formControl,formState:s},e.defaultValues&&!K(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:u,...c}=Tr(e);r.current={...c,formState:s}}const n=r.current.control;return n._options=e,He(()=>{const u=n._subscribe({formState:n._proxyFormState,callback:()=>o({...n._formState}),reRenderRoot:!0});return o(c=>({...c,isReady:!0})),n._formState.isReady=!0,u},[n]),x.useEffect(()=>n._disableForm(e.disabled),[n,e.disabled]),x.useEffect(()=>{e.mode&&(n._options.mode=e.mode),e.reValidateMode&&(n._options.reValidateMode=e.reValidateMode)},[n,e.mode,e.reValidateMode]),x.useEffect(()=>{e.errors&&(n._setErrors(e.errors),n._focusError())},[n,e.errors]),x.useEffect(()=>{e.shouldUnregister&&n._subjects.state.next({values:n._getWatch()})},[n,e.shouldUnregister]),x.useEffect(()=>{if(n._proxyFormState.isDirty){const u=n._getDirty();u!==s.isDirty&&n._subjects.state.next({isDirty:u})}},[n,s.isDirty]),x.useEffect(()=>{var u;e.values&&!re(e.values,t.current)?(n._reset(e.values,{keepFieldsRef:!0,...n._options.resetOptions}),!((u=n._options.resetOptions)===null||u===void 0)&&u.keepIsValid||n._setValid(),t.current=e.values,o(c=>({...c}))):n._resetDefaultValues()},[n,e.values]),x.useEffect(()=>{n._state.mount||(n._setValid(),n._state.mount=!0),n._state.watch&&(n._state.watch=!1,n._subjects.state.next({...n._formState})),n._removeUnmounted()}),r.current.formState=x.useMemo(()=>Pt(s,n),[n,s]),r.current}function Ur({className:e,...r}){return M.jsx(br,{"data-slot":"label",className:fe("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),...r})}const Jr=kr,$t=q.createContext({}),Qr=({...e})=>M.jsx($t.Provider,{value:{name:e.name},children:M.jsx(Fr,{...e})}),we=()=>{const e=q.useContext($t),r=q.useContext(Ht),{getFieldState:t}=pr(),s=Mt({name:e.name}),o=t(e.name,s);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:n}=r;return{id:n,name:e.name,formItemId:`${n}`,formDescriptionId:`${n}-form-item-description`,formMessageId:`${n}-form-item-message`,...o}},Ht=q.createContext({});function es({className:e,id:r,...t}){const s=r??q.useId();return M.jsx(Ht.Provider,{value:{id:s},children:M.jsx("div",{"data-slot":"form-item",className:fe("grid gap-2",e),...t})})}function ts({className:e,...r}){const{error:t,formItemId:s}=we();return M.jsx(Ur,{"data-slot":"form-label","data-error":!!t,className:fe("data-[error=true]:text-destructive",e),htmlFor:s,...r})}function rs({...e}){const{error:r,formItemId:t,formDescriptionId:s,formMessageId:o}=we();return M.jsx(tr,{"data-slot":"form-control",id:t,"aria-describedby":r?`${s} ${o}`:`${s}`,"aria-invalid":!!r,...e})}function ss({className:e,...r}){const{formDescriptionId:t}=we();return M.jsx("p",{"data-slot":"form-description",id:t,className:fe("text-muted-foreground text-sm",e),...r})}function is({className:e,...r}){const{error:t,formMessageId:s}=we(),o=t?String(t?.message??""):r.children;return o?M.jsx("p",{"data-slot":"form-message",id:s,className:fe("text-destructive text-sm",e),...r,children:o}):null}const vt=(e,r,t)=>{if(e&&"reportValidity"in e){const s=y(t,r);e.setCustomValidity(s&&s.message||""),e.reportValidity()}},Me=(e,r)=>{for(const t in r.fields){const s=r.fields[t];s&&s.ref&&"reportValidity"in s.ref?vt(s.ref,t,e):s&&s.refs&&s.refs.forEach(o=>vt(o,t,e))}},_t=(e,r)=>{r.shouldUseNativeValidation&&Me(e,r);const t={};for(const s in e){const o=y(r.fields,s),n=Object.assign(e[s]||{},{ref:o&&o.ref});if(jr(r.names||Object.keys(e),s)){const u=Object.assign({},y(t,s));R(u,"root",n),R(t,s,u)}else R(t,s,n)}return t},jr=(e,r)=>{const t=xt(r);return e.some(s=>xt(s).match(`^${t}\\.\\d+`))};function xt(e){return e.replace(/\]|\[/g,"")}function Vt(e,r){try{var t=e()}catch(s){return r(s)}return t&&t.then?t.then(void 0,r):t}function Br(e,r){for(var t={};e.length;){var s=e[0],o=s.code,n=s.message,u=s.path.join(".");if(!t[u])if("unionErrors"in s){var c=s.unionErrors[0].errors[0];t[u]={message:c.message,type:c.code}}else t[u]={message:n,type:o};if("unionErrors"in s&&s.unionErrors.forEach(function(I){return I.errors.forEach(function(h){return e.push(h)})}),r){var _=t[u].types,p=_&&_[s.code];t[u]=ze(u,r,t,o,p?[].concat(p,s.message):s.message)}e.shift()}return t}function qr(e,r){for(var t={};e.length;){var s=e[0],o=s.code,n=s.message,u=s.path.join(".");if(!t[u])if(s.code==="invalid_union"&&s.errors.length>0){var c=s.errors[0][0];t[u]={message:c.message,type:c.code}}else t[u]={message:n,type:o};if(s.code==="invalid_union"&&s.errors.forEach(function(I){return I.forEach(function(h){return e.push(h)})}),r){var _=t[u].types,p=_&&_[s.code];t[u]=ze(u,r,t,o,p?[].concat(p,s.message):s.message)}e.shift()}return t}function ns(e,r,t){if(t===void 0&&(t={}),(function(s){return"_def"in s&&typeof s._def=="object"&&"typeName"in s._def})(e))return function(s,o,n){try{return Promise.resolve(Vt(function(){return Promise.resolve(e[t.mode==="sync"?"parse":"parseAsync"](s,r)).then(function(u){return n.shouldUseNativeValidation&&Me({},n),{errors:{},values:t.raw?Object.assign({},s):u}})},function(u){if((function(c){return Array.isArray(c?.issues)})(u))return{values:{},errors:_t(Br(u.errors,!n.shouldUseNativeValidation&&n.criteriaMode==="all"),n)};throw u}))}catch(u){return Promise.reject(u)}};if((function(s){return"_zod"in s&&typeof s._zod=="object"})(e))return function(s,o,n){try{return Promise.resolve(Vt(function(){return Promise.resolve((t.mode==="sync"?ur:lr)(e,s,r)).then(function(u){return n.shouldUseNativeValidation&&Me({},n),{errors:{},values:t.raw?Object.assign({},s):u}})},function(u){if((function(c){return c instanceof cr})(u))return{values:{},errors:_t(qr(u.issues,!n.shouldUseNativeValidation&&n.criteriaMode==="all"),n)};throw u}))}catch(u){return Promise.reject(u)}};throw new Error("Invalid input: not a Zod schema")}export{Zr as C,Jr as F,ns as a,Qr as b,es as c,ts as d,rs as e,is as f,dr as g,ss as h,Fr as i,Yr as u};
@@ -1,5 +1,5 @@
1
- <!DOCTYPE html><html lang="en" class="min-h-screen"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>Editorial Admin</title><meta name="robots" content="noindex"/><link rel="icon" type="image/ico" href="/admin/favicon.ico"/><link rel="modulepreload" href="/assets/manifest-fd6f5f23.js"/><link rel="modulepreload" href="/assets/entry.client-C94uvdU2.js"/><link rel="modulepreload" href="/assets/chunk-EPOLDU6W-CiSVlmCe.js"/><link rel="modulepreload" href="/assets/index-DLIEpuwL.js"/><link rel="modulepreload" href="/assets/root-CLpfMQQt.js"/><link rel="modulepreload" href="/assets/index-CZSVchcX.js"/><link rel="modulepreload" href="/assets/loader-circle-BDUbeTTe.js"/><link rel="modulepreload" href="/assets/createLucideIcon-BvSqmaUO.js"/><link rel="modulepreload" href="/assets/circle-check-C6CxUIig.js"/><link rel="modulepreload" href="/assets/utils-CCKKso3e.js"/><link rel="modulepreload" href="/assets/authSlice-BI_rlf3v.js"/><link rel="modulepreload" href="/assets/Loading-MKgXMPvl.js"/><link rel="stylesheet" href="/assets/root-D5WeoLDH.css"/></head><body class="h-full min-h-screen bg-background font-sans antialiased"><div class="flex gap-1 items-center justify-center min-h-screen"><svg xmlns="http://www.w3.org/2000/svg" width="28px" height="28px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-loader-circle animate-spin"><path d="M21 12a9 9 0 1 1-6.219-8.56"></path></svg><p class="text-gray-600">Loading Editorial...</p></div><section aria-label="Notifications alt+T" tabindex="-1" aria-live="polite" aria-relevant="additions text" aria-atomic="false"></section><script>window.__reactRouterContext = {"basename":"/","future":{"unstable_optimizeDeps":false,"unstable_subResourceIntegrity":false,"unstable_trailingSlashAwareDataRequests":false,"v8_middleware":false,"v8_splitRouteModules":false,"v8_viteEnvironmentApi":false},"routeDiscovery":{"mode":"initial"},"ssr":false,"isSpaMode":true};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());</script><script type="module" async="">import "/assets/manifest-fd6f5f23.js";
2
- import * as route0 from "/assets/root-CLpfMQQt.js";
1
+ <!DOCTYPE html><html lang="en" class="min-h-screen"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>Editorial Admin</title><meta name="robots" content="noindex"/><link rel="icon" type="image/ico" href="/admin/favicon.ico"/><link rel="modulepreload" href="/assets/manifest-31b20659.js"/><link rel="modulepreload" href="/assets/entry.client-C94uvdU2.js"/><link rel="modulepreload" href="/assets/chunk-EPOLDU6W-CiSVlmCe.js"/><link rel="modulepreload" href="/assets/index-DLIEpuwL.js"/><link rel="modulepreload" href="/assets/root-BYBo3WgS.js"/><link rel="modulepreload" href="/assets/index-CZSVchcX.js"/><link rel="modulepreload" href="/assets/loader-circle-BDUbeTTe.js"/><link rel="modulepreload" href="/assets/createLucideIcon-BvSqmaUO.js"/><link rel="modulepreload" href="/assets/circle-check-C6CxUIig.js"/><link rel="modulepreload" href="/assets/utils-B48p8Qal.js"/><link rel="modulepreload" href="/assets/authSlice-DWtXmmFR.js"/><link rel="modulepreload" href="/assets/Loading-C1QGFwZC.js"/><link rel="stylesheet" href="/assets/root-CKQ4Xhj3.css"/></head><body class="h-full min-h-screen bg-background font-sans antialiased"><div class="flex gap-1 items-center justify-center min-h-screen"><svg xmlns="http://www.w3.org/2000/svg" width="28px" height="28px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-loader-circle animate-spin"><path d="M21 12a9 9 0 1 1-6.219-8.56"></path></svg><p class="text-gray-600">Loading Editorial...</p></div><section aria-label="Notifications alt+T" tabindex="-1" aria-live="polite" aria-relevant="additions text" aria-atomic="false"></section><script>window.__reactRouterContext = {"basename":"/","future":{"unstable_optimizeDeps":false,"unstable_subResourceIntegrity":false,"unstable_trailingSlashAwareDataRequests":false,"v8_middleware":false,"v8_splitRouteModules":false,"v8_viteEnvironmentApi":false},"routeDiscovery":{"mode":"initial"},"ssr":false,"isSpaMode":true};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());</script><script type="module" async="">import "/assets/manifest-31b20659.js";
2
+ import * as route0 from "/assets/root-BYBo3WgS.js";
3
3
 
4
4
  window.__reactRouterRouteModules = {"root":route0};
5
5
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@isardsat/editorial-admin",
3
- "version": "6.19.5",
3
+ "version": "6.20.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -78,7 +78,7 @@
78
78
  "tailwindcss-animate": "^1.0.7",
79
79
  "vaul": "^1.1.2",
80
80
  "zod": "^4.1.11",
81
- "@isardsat/editorial-common": "^6.19.5"
81
+ "@isardsat/editorial-common": "^6.20.0"
82
82
  },
83
83
  "devDependencies": {
84
84
  "@react-router/dev": "^7.7.0",
@@ -1 +0,0 @@
1
- import{a as m,p as e,x as F}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{D as z,b as C}from"./utils-CCKKso3e.js";import{a as M,F as B}from"./files-Cdeyho5X.js";import{B as l}from"./index-BhARCKRr.js";import{I as u}from"./input-Bk91TMQj.js";import{E}from"./external-link-ERgO2SVI.js";import{c as I}from"./createLucideIcon-BvSqmaUO.js";import{X as w}from"./x-BVtfHpQX.js";import{U}from"./upload-DhJ5wU_H.js";import"./index-CZSVchcX.js";import"./index-DLIEpuwL.js";import"./badge-gLcN3Bjg.js";import"./index-CtLWaleL.js";import"./trash-UKLAaALv.js";import"./check-DF0ucE8d.js";const L=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],S=I("pencil",L);function T({id:h,value:t,name:p,register:x,onChange:f}){const{isLoading:n}=z(),[N,c]=m.useState(!1),[i,o]=m.useState(null),d=s=>s?/\.(jpg|jpeg|png|gif|webp|svg)$/i.test(s):!1,b=s=>{if(s===0)return"0 Bytes";const a=1024,r=["Bytes","KB","MB","GB"],j=Math.floor(Math.log(s)/Math.log(a));return Math.round(s/Math.pow(a,j)*100)/100+" "+r[j]},y=s=>{const a=new Image;a.onload=()=>{fetch(s).then(r=>r.blob()).then(r=>{o({width:a.width,height:a.height,size:r.size,format:r.type.split("/")[1]?.toUpperCase()||s.split(".").pop()?.toUpperCase(),name:s})}).catch(r=>{console.error("Error fetching image for size:",r),o({width:a.width,height:a.height,format:s.split(".").pop()?.toUpperCase(),name:s})})},a.onerror=r=>{console.error("Error loading image for metadata:",r),o({name:s,format:s.split(".").pop()?.toUpperCase()})},a.src=s},g=s=>s?!s.startsWith("http")&&!s.startsWith("/")?`/${s}`:s:"";m.useEffect(()=>{t&&d(t)?y(g(t)):o(null)},[t]);const k=()=>{f(""),o(null)},v=s=>{c(!1),f(s)};return e.jsxs(e.Fragment,{children:[t?e.jsxs("div",{className:"space-y-3",children:[e.jsx("div",{className:"border rounded-lg p-4 bg-background",children:e.jsxs("div",{className:"flex gap-4",children:[e.jsx("div",{className:"shrink-0",children:d(t)?e.jsx("div",{className:"w-32 h-24 rounded border overflow-hidden bg-muted flex items-center justify-center",children:e.jsx("img",{src:g(t),alt:"Preview",className:"max-w-full max-h-full object-contain"})}):e.jsx("div",{className:"w-32 h-24 rounded border bg-muted flex items-center justify-center",children:e.jsx(M,{className:"w-12 h-12 text-muted-foreground"})})}),e.jsx("div",{className:"flex-1 min-w-0 space-y-2",children:e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"font-medium text-sm truncate",children:i?.name||t.split("/").pop()}),d(t)&&i&&e.jsxs("div",{className:"flex flex-wrap gap-x-4 gap-y-1 mt-2 text-xs text-muted-foreground",children:[i.size&&e.jsx("span",{children:b(i.size)}),i.width&&i.height&&e.jsxs("span",{children:[i.width,"x",i.height]}),i.format&&e.jsx("span",{children:i.format})]})]}),e.jsxs("div",{children:[e.jsx(l,{type:"button",variant:"ghost",size:"icon",title:"Open File",className:"h-8 w-8 shrink-0 cursor-pointer",asChild:!0,children:e.jsx(F,{to:`/${t}`,target:"_blank",children:e.jsx(E,{className:"h-4 w-4"})})}),e.jsx(l,{type:"button",variant:"ghost",size:"icon",title:"Change File",className:"h-8 w-8 shrink-0 cursor-pointer",onClick:()=>c(!0),disabled:n,children:e.jsx(S,{className:"h-4 w-4"})}),e.jsx(l,{type:"button",variant:"ghost",size:"icon",title:"Remove File",className:"h-8 w-8 shrink-0 cursor-pointer",onClick:k,disabled:n,children:e.jsx(w,{className:"h-4 w-4"})})]})]})})]})}),e.jsx(u,{id:h,...x(p),type:"hidden",value:t})]}):e.jsx("div",{className:"flex items-center gap-2",children:e.jsxs("div",{className:"relative flex items-center flex-1",children:[e.jsx(l,{type:"button",variant:"outline",className:C("w-full h-24 border-2 border-dashed",n&&"opacity-50"),onClick:()=>c(!0),disabled:n,children:e.jsxs("div",{className:"flex flex-col items-center gap-2",children:[e.jsx(U,{className:"h-8 w-8 text-muted-foreground"}),e.jsx("span",{className:"text-sm text-muted-foreground",children:n?"Loading...":"Click to select file"})]})}),e.jsx(u,{id:h,...x(p),type:"hidden",value:""})]})}),N&&e.jsx("div",{className:"fixed inset-0 bg-black/40 flex items-center justify-center z-50",children:e.jsxs("div",{className:"bg-white dark:bg-gray-950 p-4 rounded-lg shadow-lg max-w-2xl w-full max-h-[80vh] overflow-y-auto",children:[e.jsxs("div",{className:"flex justify-between items-center mb-4",children:[e.jsx("h2",{className:"text-xl font-bold",children:"Select File"}),e.jsx(l,{onClick:()=>c(!1),children:e.jsx(w,{})})]}),e.jsx(B,{onChange:v})]})})]})}export{T as default};
@@ -1,7 +0,0 @@
1
- import{a as s,p as a}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{c as w,a as O,f as $,g as f}from"./index-BhARCKRr.js";import{u as A}from"./index-CtLWaleL.js";import{g as m,R as M,W as I,C as z,T as F,D as L,a as D,i as G,P as W,O as k}from"./index-cCny74f5.js";import{b as n}from"./utils-CCKKso3e.js";var v="AlertDialog",[H]=w(v,[m]),i=m(),x=e=>{const{__scopeAlertDialog:t,...o}=e,r=i(t);return a.jsx(M,{...r,...o,modal:!0})};x.displayName=v;var V="AlertDialogTrigger",N=s.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...r}=e,l=i(o);return a.jsx(G,{...l,...r,ref:t})});N.displayName=V;var Y="AlertDialogPortal",y=e=>{const{__scopeAlertDialog:t,...o}=e,r=i(t);return a.jsx(W,{...r,...o})};y.displayName=Y;var q="AlertDialogOverlay",j=s.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...r}=e,l=i(o);return a.jsx(k,{...l,...r,ref:t})});j.displayName=q;var c="AlertDialogContent",[B,J]=H(c),K=$("AlertDialogContent"),_=s.forwardRef((e,t)=>{const{__scopeAlertDialog:o,children:r,...l}=e,p=i(o),g=s.useRef(null),S=A(t,g),u=s.useRef(null);return a.jsx(I,{contentName:c,titleName:h,docsSlug:"alert-dialog",children:a.jsx(B,{scope:o,cancelRef:u,children:a.jsxs(z,{role:"alertdialog",...p,...l,ref:S,onOpenAutoFocus:O(l.onOpenAutoFocus,d=>{d.preventDefault(),u.current?.focus({preventScroll:!0})}),onPointerDownOutside:d=>d.preventDefault(),onInteractOutside:d=>d.preventDefault(),children:[a.jsx(K,{children:r}),a.jsx(U,{contentRef:g})]})})})});_.displayName=c;var h="AlertDialogTitle",b=s.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...r}=e,l=i(o);return a.jsx(F,{...l,...r,ref:t})});b.displayName=h;var C="AlertDialogDescription",R=s.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...r}=e,l=i(o);return a.jsx(L,{...l,...r,ref:t})});R.displayName=C;var Q="AlertDialogAction",E=s.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...r}=e,l=i(o);return a.jsx(D,{...l,...r,ref:t})});E.displayName=Q;var P="AlertDialogCancel",T=s.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...r}=e,{cancelRef:l}=J(P,o),p=i(o),g=A(t,l);return a.jsx(D,{...p,...r,ref:g})});T.displayName=P;var U=({contentRef:e})=>{const t=`\`${c}\` requires a description for the component to be accessible for screen reader users.
2
-
3
- You can add a description to the \`${c}\` by passing a \`${C}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
4
-
5
- Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${c}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
6
-
7
- For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return s.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},X=x,Z=N,ee=y,te=j,ae=_,oe=E,re=T,le=b,se=R;function fe({...e}){return a.jsx(X,{"data-slot":"alert-dialog",...e})}function Ae({...e}){return a.jsx(Z,{"data-slot":"alert-dialog-trigger",...e})}function ie({...e}){return a.jsx(ee,{"data-slot":"alert-dialog-portal",...e})}function ne({className:e,...t}){return a.jsx(te,{"data-slot":"alert-dialog-overlay",className:n("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function me({className:e,...t}){return a.jsxs(ie,{children:[a.jsx(ne,{}),a.jsx(ae,{"data-slot":"alert-dialog-content",className:n("bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...t})]})}function De({className:e,...t}){return a.jsx("div",{"data-slot":"alert-dialog-header",className:n("flex flex-col gap-2 text-center sm:text-left",e),...t})}function ve({className:e,...t}){return a.jsx("div",{"data-slot":"alert-dialog-footer",className:n("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function xe({className:e,...t}){return a.jsx(le,{"data-slot":"alert-dialog-title",className:n("text-lg font-semibold",e),...t})}function Ne({className:e,...t}){return a.jsx(se,{"data-slot":"alert-dialog-description",className:n("text-muted-foreground text-sm",e),...t})}function ye({className:e,...t}){return a.jsx(oe,{className:n(f(),e),...t})}function je({className:e,...t}){return a.jsx(re,{className:n(f({variant:"outline"}),e),...t})}export{fe as A,Ae as a,me as b,De as c,xe as d,Ne as e,ve as f,je as g,ye as h};
@@ -1 +0,0 @@
1
- import{R as f,a as _,p as z}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{g as Qe,B as sn}from"./index-BhARCKRr.js";import{b as W}from"./utils-CCKKso3e.js";import{c as cn}from"./createLucideIcon-BvSqmaUO.js";import{C as un}from"./chevron-right-BFlMu-RJ.js";import{C as dn,X as ln}from"./x-BVtfHpQX.js";import{R as fn,T as hn,P as mn,C as yn}from"./index-B0u0hYGX.js";const gn=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],pn=cn("chevron-left",gn),wn={},me={};function ye(e,t){try{const r=(wn[e]||=new Intl.DateTimeFormat("en-GB",{timeZone:e,hour:"numeric",timeZoneName:"longOffset"}).format)(t).split("GMT")[1]||"";return r in me?me[r]:Xe(r,r.split(":"))}catch{if(e in me)return me[e];const n=e?.match(bn);return n?Xe(e,n.slice(1)):NaN}}const bn=/([+-]\d\d):?(\d\d)?/;function Xe(e,t){const n=+t[0],r=+(t[1]||0);return me[e]=n>0?n*60+r:n*60-r}class K extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(ye(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)),it(this),He(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new K(...n,t):new K(Date.now(),t)}withTimeZone(t){return new K(+this,t)}getTimezoneOffset(){return-ye(this.timeZone,this)}setTime(t){return Date.prototype.setTime.apply(this,arguments),He(this),+this}[Symbol.for("constructDateFrom")](t){return new K(+new Date(t),this.timeZone)}}const Ve=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!Ve.test(e))return;const t=e.replace(Ve,"$1UTC");K.prototype[t]&&(e.startsWith("get")?K.prototype[e]=function(){return this.internal[t]()}:(K.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),kn(this),+this},K.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),He(this),+this}))});function He(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function kn(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()),it(e)}function it(e){const t=ye(e.timeZone,e),n=new Date(+e);n.setUTCHours(n.getUTCHours()-1);const r=-new Date(+e).getTimezoneOffset(),o=-new Date(+n).getTimezoneOffset(),a=r-o,i=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();a&&i&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+a);const s=r-t;s&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+s);const c=ye(e.timeZone,e),l=-new Date(+e).getTimezoneOffset()-c,u=c!==t,h=l-s;if(u&&h){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+h);const g=ye(e.timeZone,e),p=c-g;p&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+p),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+p))}}class j extends K{static tz(t,...n){return n.length?new j(...n,t):new j(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} (${Mn(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 j(+this,t)}[Symbol.for("constructDateFrom")](t){return new j(+new Date(t),this.timeZone)}}function Mn(e,t){return new Intl.DateTimeFormat("en-GB",{timeZone:e,timeZoneName:"long"}).format(t).slice(12)}var m;(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"})(m||(m={}));var F;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(F||(F={}));var Q;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(Q||(Q={}));var R;(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"})(R||(R={}));const ct=6048e5,Dn=864e5,Ke=Symbol.for("constructDateFrom");function B(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Ke in e?e[Ke](t):e instanceof Date?new e.constructor(t):new Date(t)}function T(e,t){return B(t||e,e)}function ut(e,t,n){const r=T(e,n?.in);return isNaN(t)?B(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function dt(e,t,n){const r=T(e,n?.in);if(isNaN(t))return B(e,NaN);if(!t)return r;const o=r.getDate(),a=B(e,r.getTime());a.setMonth(r.getMonth()+t+1,0);const i=a.getDate();return o>=i?a:(r.setFullYear(a.getFullYear(),a.getMonth(),o),r)}let vn={};function we(){return vn}function de(e,t){const n=we(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=T(e,t?.in),a=o.getDay(),i=(a<r?7:0)+a-r;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function ge(e,t){return de(e,{...t,weekStartsOn:1})}function lt(e,t){const n=T(e,t?.in),r=n.getFullYear(),o=B(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const a=ge(o),i=B(n,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const s=ge(i);return n.getTime()>=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function Ue(e){const t=T(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 le(e,...t){const n=B.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function pe(e,t){const n=T(e,t?.in);return n.setHours(0,0,0,0),n}function ft(e,t,n){const[r,o]=le(n?.in,e,t),a=pe(r),i=pe(o),s=+a-Ue(a),c=+i-Ue(i);return Math.round((s-c)/Dn)}function On(e,t){const n=lt(e,t),r=B(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),ge(r)}function Wn(e,t,n){return ut(e,t*7,n)}function Cn(e,t,n){return dt(e,t*12,n)}function xn(e,t){let n,r=t?.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=B.bind(null,o));const a=T(o,r);(!n||n<a||isNaN(+a))&&(n=a)}),B(r,n||NaN)}function Sn(e,t){let n,r=t?.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=B.bind(null,o));const a=T(o,r);(!n||n>a||isNaN(+a))&&(n=a)}),B(r,n||NaN)}function Nn(e,t,n){const[r,o]=le(n?.in,e,t);return+pe(r)==+pe(o)}function ht(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function _n(e){return!(!ht(e)&&typeof e!="number"||isNaN(+T(e)))}function Tn(e,t,n){const[r,o]=le(n?.in,e,t),a=r.getFullYear()-o.getFullYear(),i=r.getMonth()-o.getMonth();return a*12+i}function Yn(e,t){const n=T(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function En(e,t){const[n,r]=le(e,t.start,t.end);return{start:n,end:r}}function Pn(e,t){const{start:n,end:r}=En(t?.in,e);let o=+n>+r;const a=o?+n:+r,i=o?r:n;i.setHours(0,0,0,0),i.setDate(1);let s=1;const c=[];for(;+i<=a;)c.push(B(n,i)),i.setMonth(i.getMonth()+s);return o?c.reverse():c}function Fn(e,t){const n=T(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function Bn(e,t){const n=T(e,t?.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function mt(e,t){const n=T(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function yt(e,t){const n=we(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=T(e,t?.in),a=o.getDay(),i=(a<r?-7:0)+6-(a-r);return o.setDate(o.getDate()+i),o.setHours(23,59,59,999),o}function In(e,t){return yt(e,{...t,weekStartsOn:1})}const Hn={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"}},jn=(e,t,n)=>{let r;const o=Hn[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 Pe(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const qn={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},An={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},zn={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Rn={date:Pe({formats:qn,defaultWidth:"full"}),time:Pe({formats:An,defaultWidth:"full"}),dateTime:Pe({formats:zn,defaultWidth:"full"})},$n={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Gn=(e,t,n,r)=>$n[e];function fe(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,s=n?.width?String(n.width):i;o=e.formattingValues[s]||e.formattingValues[i]}else{const i=e.defaultWidth,s=n?.width?String(n.width):e.defaultWidth;o=e.values[s]||e.values[i]}const a=e.argumentCallback?e.argumentCallback(t):t;return o[a]}}const Zn={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Ln={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Qn={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"]},Xn={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"]},Vn={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"}},Kn={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"}},Un=(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"},Jn={ordinalNumber:Un,era:fe({values:Zn,defaultWidth:"wide"}),quarter:fe({values:Ln,defaultWidth:"wide",argumentCallback:e=>e-1}),month:fe({values:Qn,defaultWidth:"wide"}),day:fe({values:Xn,defaultWidth:"wide"}),dayPeriod:fe({values:Vn,defaultWidth:"wide",formattingValues:Kn,defaultFormattingWidth:"wide"})};function he(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;const i=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?tr(s,u=>u.test(i)):er(s,u=>u.test(i));let d;d=e.valueCallback?e.valueCallback(c):c,d=n.valueCallback?n.valueCallback(d):d;const l=t.slice(i.length);return{value:d,rest:l}}}function er(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function tr(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function nr(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],a=t.match(e.parsePattern);if(!a)return null;let i=e.valueCallback?e.valueCallback(a[0]):a[0];i=n.valueCallback?n.valueCallback(i):i;const s=t.slice(o.length);return{value:i,rest:s}}}const rr=/^(\d+)(th|st|nd|rd)?/i,or=/\d+/i,ar={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},sr={any:[/^b/i,/^(a|c)/i]},ir={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},cr={any:[/1/i,/2/i,/3/i,/4/i]},ur={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},dr={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]},lr={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},fr={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]},hr={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},mr={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}},yr={ordinalNumber:nr({matchPattern:rr,parsePattern:or,valueCallback:e=>parseInt(e,10)}),era:he({matchPatterns:ar,defaultMatchWidth:"wide",parsePatterns:sr,defaultParseWidth:"any"}),quarter:he({matchPatterns:ir,defaultMatchWidth:"wide",parsePatterns:cr,defaultParseWidth:"any",valueCallback:e=>e+1}),month:he({matchPatterns:ur,defaultMatchWidth:"wide",parsePatterns:dr,defaultParseWidth:"any"}),day:he({matchPatterns:lr,defaultMatchWidth:"wide",parsePatterns:fr,defaultParseWidth:"any"}),dayPeriod:he({matchPatterns:hr,defaultMatchWidth:"any",parsePatterns:mr,defaultParseWidth:"any"})},je={code:"en-US",formatDistance:jn,formatLong:Rn,formatRelative:Gn,localize:Jn,match:yr,options:{weekStartsOn:0,firstWeekContainsDate:1}};function gr(e,t){const n=T(e,t?.in);return ft(n,mt(n))+1}function gt(e,t){const n=T(e,t?.in),r=+ge(n)-+On(n);return Math.round(r/ct)+1}function pt(e,t){const n=T(e,t?.in),r=n.getFullYear(),o=we(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,i=B(t?.in||e,0);i.setFullYear(r+1,0,a),i.setHours(0,0,0,0);const s=de(i,t),c=B(t?.in||e,0);c.setFullYear(r,0,a),c.setHours(0,0,0,0);const d=de(c,t);return+n>=+s?r+1:+n>=+d?r:r-1}function pr(e,t){const n=we(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=pt(e,t),a=B(t?.in||e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),de(a,t)}function wt(e,t){const n=T(e,t?.in),r=+de(n,t)-+pr(n,t);return Math.round(r/ct)+1}function N(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const oe={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return N(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):N(n+1,2)},d(e,t){return N(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 N(e.getHours()%12||12,t.length)},H(e,t){return N(e.getHours(),t.length)},m(e,t){return N(e.getMinutes(),t.length)},s(e,t){return N(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return N(o,t.length)}},ue={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Je={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 oe.y(e,t)},Y:function(e,t,n,r){const o=pt(e,r),a=o>0?o:1-o;if(t==="YY"){const i=a%100;return N(i,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):N(a,t.length)},R:function(e,t){const n=lt(e);return N(n,t.length)},u:function(e,t){const n=e.getFullYear();return N(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 N(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 N(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 oe.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 N(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=wt(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):N(o,t.length)},I:function(e,t,n){const r=gt(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):N(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):oe.d(e,t)},D:function(e,t,n){const r=gr(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):N(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(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return N(a,2);case"eo":return n.ordinalNumber(a,{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(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return N(a,t.length);case"co":return n.ordinalNumber(a,{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 N(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=ue.noon:r===0?o=ue.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=ue.evening:r>=12?o=ue.afternoon:r>=4?o=ue.morning:o=ue.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 oe.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):oe.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):N(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):N(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):oe.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):oe.s(e,t)},S:function(e,t){return oe.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return tt(r);case"XXXX":case"XX":return ae(r);default:return ae(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return tt(r);case"xxxx":case"xx":return ae(r);default:return ae(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+et(r,":");default:return"GMT"+ae(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+et(r,":");default:return"GMT"+ae(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return N(r,t.length)},T:function(e,t,n){return N(+e,t.length)}};function et(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),a=r%60;return a===0?n+String(o):n+String(o)+t+N(a,2)}function tt(e,t){return e%60===0?(e>0?"-":"+")+N(Math.abs(e)/60,2):ae(e,t)}function ae(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=N(Math.trunc(r/60),2),a=N(r%60,2);return n+o+t+a}const nt=(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"})}},bt=(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"})}},wr=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return nt(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",nt(r,t)).replace("{{time}}",bt(o,t))},br={p:bt,P:wr},kr=/^D+$/,Mr=/^Y+$/,Dr=["D","DD","YY","YYYY"];function vr(e){return kr.test(e)}function Or(e){return Mr.test(e)}function Wr(e,t,n){const r=Cr(e,t,n);if(console.warn(r),Dr.includes(e))throw new RangeError(r)}function Cr(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 xr=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Sr=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Nr=/^'([^]*?)'?$/,_r=/''/g,Tr=/[a-zA-Z]/;function Yr(e,t,n){const r=we(),o=n?.locale??r.locale??je,a=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,s=T(e,n?.in);if(!_n(s))throw new RangeError("Invalid time value");let c=t.match(Sr).map(l=>{const u=l[0];if(u==="p"||u==="P"){const h=br[u];return h(l,o.formatLong)}return l}).join("").match(xr).map(l=>{if(l==="''")return{isToken:!1,value:"'"};const u=l[0];if(u==="'")return{isToken:!1,value:Er(l)};if(Je[u])return{isToken:!0,value:l};if(u.match(Tr))throw new RangeError("Format string contains an unescaped latin alphabet character `"+u+"`");return{isToken:!1,value:l}});o.localize.preprocessor&&(c=o.localize.preprocessor(s,c));const d={firstWeekContainsDate:a,weekStartsOn:i,locale:o};return c.map(l=>{if(!l.isToken)return l.value;const u=l.value;(!n?.useAdditionalWeekYearTokens&&Or(u)||!n?.useAdditionalDayOfYearTokens&&vr(u))&&Wr(u,t,String(e));const h=Je[u[0]];return h(s,u,o.localize,d)}).join("")}function Er(e){const t=e.match(Nr);return t?t[1].replace(_r,"'"):e}function Pr(e,t){const n=T(e,t?.in),r=n.getFullYear(),o=n.getMonth(),a=B(n,0);return a.setFullYear(r,o+1,0),a.setHours(0,0,0,0),a.getDate()}function Fr(e,t){return T(e,t?.in).getMonth()}function Br(e,t){return T(e,t?.in).getFullYear()}function Ir(e,t){return+T(e)>+T(t)}function Hr(e,t){return+T(e)<+T(t)}function jr(e,t,n){const[r,o]=le(n?.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function qr(e,t,n){const[r,o]=le(n?.in,e,t);return r.getFullYear()===o.getFullYear()}function Ar(e,t,n){const r=T(e,n?.in),o=r.getFullYear(),a=r.getDate(),i=B(e,0);i.setFullYear(o,t,15),i.setHours(0,0,0,0);const s=Pr(i);return r.setMonth(t,Math.min(a,s)),r}function zr(e,t,n){const r=T(e,n?.in);return isNaN(+r)?B(e,NaN):(r.setFullYear(t),r)}const rt=5,Rr=4;function $r(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,-r+1),a=t.addDays(o,rt*7-1);return t.getMonth(e)===t.getMonth(a)?rt:Rr}function kt(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 Gr(e,t){const n=kt(e,t),r=$r(e,t);return t.addDays(n,r*7-1)}class ne{constructor(t,n){this.Date=Date,this.today=()=>this.overrides?.today?this.overrides.today():this.options.timeZone?j.tz(this.options.timeZone):new this.Date,this.newDate=(r,o,a)=>this.overrides?.newDate?this.overrides.newDate(r,o,a):this.options.timeZone?new j(r,o,a,this.options.timeZone):new Date(r,o,a),this.addDays=(r,o)=>this.overrides?.addDays?this.overrides.addDays(r,o):ut(r,o),this.addMonths=(r,o)=>this.overrides?.addMonths?this.overrides.addMonths(r,o):dt(r,o),this.addWeeks=(r,o)=>this.overrides?.addWeeks?this.overrides.addWeeks(r,o):Wn(r,o),this.addYears=(r,o)=>this.overrides?.addYears?this.overrides.addYears(r,o):Cn(r,o),this.differenceInCalendarDays=(r,o)=>this.overrides?.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,o):ft(r,o),this.differenceInCalendarMonths=(r,o)=>this.overrides?.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,o):Tn(r,o),this.eachMonthOfInterval=r=>this.overrides?.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):Pn(r),this.endOfBroadcastWeek=r=>this.overrides?.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):Gr(r,this),this.endOfISOWeek=r=>this.overrides?.endOfISOWeek?this.overrides.endOfISOWeek(r):In(r),this.endOfMonth=r=>this.overrides?.endOfMonth?this.overrides.endOfMonth(r):Yn(r),this.endOfWeek=(r,o)=>this.overrides?.endOfWeek?this.overrides.endOfWeek(r,o):yt(r,this.options),this.endOfYear=r=>this.overrides?.endOfYear?this.overrides.endOfYear(r):Bn(r),this.format=(r,o,a)=>{const i=this.overrides?.format?this.overrides.format(r,o,this.options):Yr(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):gt(r),this.getMonth=(r,o)=>this.overrides?.getMonth?this.overrides.getMonth(r,this.options):Fr(r,this.options),this.getYear=(r,o)=>this.overrides?.getYear?this.overrides.getYear(r,this.options):Br(r,this.options),this.getWeek=(r,o)=>this.overrides?.getWeek?this.overrides.getWeek(r,this.options):wt(r,this.options),this.isAfter=(r,o)=>this.overrides?.isAfter?this.overrides.isAfter(r,o):Ir(r,o),this.isBefore=(r,o)=>this.overrides?.isBefore?this.overrides.isBefore(r,o):Hr(r,o),this.isDate=r=>this.overrides?.isDate?this.overrides.isDate(r):ht(r),this.isSameDay=(r,o)=>this.overrides?.isSameDay?this.overrides.isSameDay(r,o):Nn(r,o),this.isSameMonth=(r,o)=>this.overrides?.isSameMonth?this.overrides.isSameMonth(r,o):jr(r,o),this.isSameYear=(r,o)=>this.overrides?.isSameYear?this.overrides.isSameYear(r,o):qr(r,o),this.max=r=>this.overrides?.max?this.overrides.max(r):xn(r),this.min=r=>this.overrides?.min?this.overrides.min(r):Sn(r),this.setMonth=(r,o)=>this.overrides?.setMonth?this.overrides.setMonth(r,o):Ar(r,o),this.setYear=(r,o)=>this.overrides?.setYear?this.overrides.setYear(r,o):zr(r,o),this.startOfBroadcastWeek=(r,o)=>this.overrides?.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):kt(r,this),this.startOfDay=r=>this.overrides?.startOfDay?this.overrides.startOfDay(r):pe(r),this.startOfISOWeek=r=>this.overrides?.startOfISOWeek?this.overrides.startOfISOWeek(r):ge(r),this.startOfMonth=r=>this.overrides?.startOfMonth?this.overrides.startOfMonth(r):Fn(r),this.startOfWeek=(r,o)=>this.overrides?.startOfWeek?this.overrides.startOfWeek(r,this.options):de(r,this.options),this.startOfYear=r=>this.overrides?.startOfYear?this.overrides.startOfYear(r):mt(r),this.options={locale:je,...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())}}const U=new ne;class Mt{constructor(t,n,r=U){this.date=t,this.displayMonth=n,this.outside=!!(n&&!r.isSameMonth(t,n)),this.dateLib=r}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class Zr{constructor(t,n){this.date=t,this.weeks=n}}class Lr{constructor(t,n){this.days=n,this.weekNumber=t}}function ee(e,t,n=!1,r=U){let{from:o,to:a}=e;const{differenceInCalendarDays:i,isSameDay:s}=r;return o&&a?(i(a,o)<0&&([o,a]=[a,o]),i(t,o)>=(n?1:0)&&i(a,t)>=(n?1:0)):!n&&a?s(a,t):!n&&o?s(o,t):!1}function Dt(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function qe(e){return!!(e&&typeof e=="object"&&"from"in e)}function vt(e){return!!(e&&typeof e=="object"&&"after"in e)}function Ot(e){return!!(e&&typeof e=="object"&&"before"in e)}function Wt(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function Ct(e,t){return Array.isArray(e)&&e.every(t.isDate)}function te(e,t,n=U){const r=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:a,isAfter:i}=n;return r.some(s=>{if(typeof s=="boolean")return s;if(n.isDate(s))return o(e,s);if(Ct(s,n))return s.includes(e);if(qe(s))return ee(s,e,!1,n);if(Wt(s))return Array.isArray(s.dayOfWeek)?s.dayOfWeek.includes(e.getDay()):s.dayOfWeek===e.getDay();if(Dt(s)){const c=a(s.before,e),d=a(s.after,e),l=c>0,u=d<0;return i(s.before,s.after)?u&&l:l||u}return vt(s)?a(e,s.after)>0:Ot(s)?a(s.before,e)>0:typeof s=="function"?s(e):!1})}function Qr(e,t,n,r,o){const{disabled:a,hidden:i,modifiers:s,showOutsideDays:c,broadcastCalendar:d,today:l}=t,{isSameDay:u,isSameMonth:h,startOfMonth:g,isBefore:p,endOfMonth:O,isAfter:M}=o,v=n&&g(n),Y=r&&O(r),k={[F.focused]:[],[F.outside]:[],[F.disabled]:[],[F.hidden]:[],[F.today]:[]},P={};for(const y of e){const{date:b,displayMonth:w}=y,C=!!(w&&!h(b,w)),I=!!(v&&p(b,v)),q=!!(Y&&M(b,Y)),A=!!(a&&te(b,a,o)),$=!!(i&&te(b,i,o))||I||q||!d&&!c&&C||d&&c===!1&&C,se=u(b,l??o.today());C&&k.outside.push(y),A&&k.disabled.push(y),$&&k.hidden.push(y),se&&k.today.push(y),s&&Object.keys(s).forEach(ie=>{const ce=s?.[ie];ce&&te(b,ce,o)&&(P[ie]?P[ie].push(y):P[ie]=[y])})}return y=>{const b={[F.focused]:!1,[F.disabled]:!1,[F.hidden]:!1,[F.outside]:!1,[F.today]:!1},w={};for(const C in k){const I=k[C];b[C]=I.some(q=>q===y)}for(const C in P)w[C]=P[C].some(I=>I===y);return{...b,...w}}}function Xr(e,t,n={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[a])=>(n[a]?o.push(n[a]):t[F[a]]?o.push(t[F[a]]):t[Q[a]]&&o.push(t[Q[a]]),o),[t[m.Day]])}function Vr(e){return f.createElement("button",{...e})}function Kr(e){return f.createElement("span",{...e})}function Ur(e){const{size:t=24,orientation:n="left",className:r}=e;return f.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&f.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&f.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&f.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&f.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function Jr(e){const{day:t,modifiers:n,...r}=e;return f.createElement("td",{...r})}function eo(e){const{day:t,modifiers:n,...r}=e,o=f.useRef(null);return f.useEffect(()=>{n.focused&&o.current?.focus()},[n.focused]),f.createElement("button",{ref:o,...r})}function to(e){const{options:t,className:n,components:r,classNames:o,...a}=e,i=[o[m.Dropdown],n].join(" "),s=t?.find(({value:c})=>c===a.value);return f.createElement("span",{"data-disabled":a.disabled,className:o[m.DropdownRoot]},f.createElement(r.Select,{className:i,...a},t?.map(({value:c,label:d,disabled:l})=>f.createElement(r.Option,{key:c,value:c,disabled:l},d))),f.createElement("span",{className:o[m.CaptionLabel],"aria-hidden":!0},s?.label,f.createElement(r.Chevron,{orientation:"down",size:18,className:o[m.Chevron]})))}function no(e){return f.createElement("div",{...e})}function ro(e){return f.createElement("div",{...e})}function oo(e){const{calendarMonth:t,displayIndex:n,...r}=e;return f.createElement("div",{...r},e.children)}function ao(e){const{calendarMonth:t,displayIndex:n,...r}=e;return f.createElement("div",{...r})}function so(e){return f.createElement("table",{...e})}function io(e){return f.createElement("div",{...e})}const xt=_.createContext(void 0);function be(){const e=_.useContext(xt);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function co(e){const{components:t}=be();return f.createElement(t.Dropdown,{...e})}function uo(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...a}=e,{components:i,classNames:s,labels:{labelPrevious:c,labelNext:d}}=be(),l=_.useCallback(h=>{o&&n?.(h)},[o,n]),u=_.useCallback(h=>{r&&t?.(h)},[r,t]);return f.createElement("nav",{...a},f.createElement(i.PreviousMonthButton,{type:"button",className:s[m.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":c(r),onClick:u},f.createElement(i.Chevron,{disabled:r?void 0:!0,className:s[m.Chevron],orientation:"left"})),f.createElement(i.NextMonthButton,{type:"button",className:s[m.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":o?void 0:!0,"aria-label":d(o),onClick:l},f.createElement(i.Chevron,{disabled:o?void 0:!0,orientation:"right",className:s[m.Chevron]})))}function lo(e){const{components:t}=be();return f.createElement(t.Button,{...e})}function fo(e){return f.createElement("option",{...e})}function ho(e){const{components:t}=be();return f.createElement(t.Button,{...e})}function mo(e){const{rootRef:t,...n}=e;return f.createElement("div",{...n,ref:t})}function yo(e){return f.createElement("select",{...e})}function go(e){const{week:t,...n}=e;return f.createElement("tr",{...n})}function po(e){return f.createElement("th",{...e})}function wo(e){return f.createElement("thead",{"aria-hidden":!0},f.createElement("tr",{...e}))}function bo(e){const{week:t,...n}=e;return f.createElement("th",{...n})}function ko(e){return f.createElement("th",{...e})}function Mo(e){return f.createElement("tbody",{...e})}function Do(e){const{components:t}=be();return f.createElement(t.Dropdown,{...e})}const vo=Object.freeze(Object.defineProperty({__proto__:null,Button:Vr,CaptionLabel:Kr,Chevron:Ur,Day:Jr,DayButton:eo,Dropdown:to,DropdownNav:no,Footer:ro,Month:oo,MonthCaption:ao,MonthGrid:so,Months:io,MonthsDropdown:co,Nav:uo,NextMonthButton:lo,Option:fo,PreviousMonthButton:ho,Root:mo,Select:yo,Week:go,WeekNumber:bo,WeekNumberHeader:ko,Weekday:po,Weekdays:wo,Weeks:Mo,YearsDropdown:Do},Symbol.toStringTag,{value:"Module"}));function Oo(e){return{...vo,...e}}function Wo(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 Ae(){const e={};for(const t in m)e[m[t]]=`rdp-${m[t]}`;for(const t in F)e[F[t]]=`rdp-${F[t]}`;for(const t in Q)e[Q[t]]=`rdp-${Q[t]}`;for(const t in R)e[R[t]]=`rdp-${R[t]}`;return e}function St(e,t,n){return(n??new ne(t)).format(e,"LLLL y")}const Co=St;function xo(e,t,n){return(n??new ne(t)).format(e,"d")}function So(e,t=U){return t.format(e,"LLLL")}function No(e,t=U){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function _o(){return""}function To(e,t,n){return(n??new ne(t)).format(e,"cccccc")}function Nt(e,t=U){return t.format(e,"yyyy")}const Yo=Nt,Eo=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:St,formatDay:xo,formatMonthCaption:Co,formatMonthDropdown:So,formatWeekNumber:No,formatWeekNumberHeader:_o,formatWeekdayName:To,formatYearCaption:Yo,formatYearDropdown:Nt},Symbol.toStringTag,{value:"Module"}));function Po(e){return e?.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e?.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...Eo,...e}}function Fo(e,t,n,r,o){const{startOfMonth:a,startOfYear:i,endOfYear:s,eachMonthOfInterval:c,getMonth:d}=o;return c({start:i(e),end:s(e)}).map(h=>{const g=r.formatMonthDropdown(h,o),p=d(h),O=t&&h<a(t)||n&&h>a(n)||!1;return{value:p,label:g,disabled:O}})}function Bo(e,t={},n={}){let r={...t?.[m.Day]};return Object.entries(e).filter(([,o])=>o===!0).forEach(([o])=>{r={...r,...n?.[o]}}),r}function Io(e,t,n){const r=e.today(),o=t?e.startOfISOWeek(r):e.startOfWeek(r),a=[];for(let i=0;i<7;i++){const s=e.addDays(o,i);a.push(s)}return a}function Ho(e,t,n,r){if(!e||!t)return;const{startOfYear:o,endOfYear:a,addYears:i,getYear:s,isBefore:c,isSameYear:d}=r,l=o(e),u=a(t),h=[];let g=l;for(;c(g,u)||d(g,u);)h.push(g),g=i(g,1);return h.map(p=>{const O=n.formatYearDropdown(p,r);return{value:s(p),label:O,disabled:!1}})}function _t(e,t,n){return(n??new ne(t)).format(e,"LLLL y")}const jo=_t;function qo(e,t,n,r){let o=(r??new ne(n)).format(e,"PPPP");return t?.today&&(o=`Today, ${o}`),o}function Tt(e,t,n,r){let o=(r??new ne(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const Ao=Tt;function zo(){return""}function Ro(e){return"Choose the Month"}function $o(e){return"Go to the Next Month"}function Go(e){return"Go to the Previous Month"}function Zo(e,t,n){return(n??new ne(t)).format(e,"cccc")}function Lo(e,t){return`Week ${e}`}function Qo(e){return"Week Number"}function Xo(e){return"Choose the Year"}const Vo=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:jo,labelDay:Ao,labelDayButton:Tt,labelGrid:_t,labelGridcell:qo,labelMonthDropdown:Ro,labelNav:zo,labelNext:$o,labelPrevious:Go,labelWeekNumber:Lo,labelWeekNumberHeader:Qo,labelWeekday:Zo,labelYearDropdown:Xo},Symbol.toStringTag,{value:"Module"})),ke=e=>e instanceof HTMLElement?e:null,Fe=e=>[...e.querySelectorAll("[data-animated-month]")??[]],Ko=e=>ke(e.querySelector("[data-animated-month]")),Be=e=>ke(e.querySelector("[data-animated-caption]")),Ie=e=>ke(e.querySelector("[data-animated-weeks]")),Uo=e=>ke(e.querySelector("[data-animated-nav]")),Jo=e=>ke(e.querySelector("[data-animated-weekdays]"));function ea(e,t,{classNames:n,months:r,focused:o,dateLib:a}){const i=_.useRef(null),s=_.useRef(r),c=_.useRef(!1);_.useLayoutEffect(()=>{const d=s.current;if(s.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||d.length===0||r.length!==d.length)return;const l=a.isSameMonth(r[0].date,d[0].date),u=a.isAfter(r[0].date,d[0].date),h=u?n[R.caption_after_enter]:n[R.caption_before_enter],g=u?n[R.weeks_after_enter]:n[R.weeks_before_enter],p=i.current,O=e.current.cloneNode(!0);if(O instanceof HTMLElement?(Fe(O).forEach(k=>{if(!(k instanceof HTMLElement))return;const P=Ko(k);P&&k.contains(P)&&k.removeChild(P);const y=Be(k);y&&y.classList.remove(h);const b=Ie(k);b&&b.classList.remove(g)}),i.current=O):i.current=null,c.current||l||o)return;const M=p instanceof HTMLElement?Fe(p):[],v=Fe(e.current);if(v&&v.every(Y=>Y instanceof HTMLElement)&&M&&M.every(Y=>Y instanceof HTMLElement)){c.current=!0,e.current.style.isolation="isolate";const Y=Uo(e.current);Y&&(Y.style.zIndex="1"),v.forEach((k,P)=>{const y=M[P];if(!y)return;k.style.position="relative",k.style.overflow="hidden";const b=Be(k);b&&b.classList.add(h);const w=Ie(k);w&&w.classList.add(g);const C=()=>{c.current=!1,e.current&&(e.current.style.isolation=""),Y&&(Y.style.zIndex=""),b&&b.classList.remove(h),w&&w.classList.remove(g),k.style.position="",k.style.overflow="",k.contains(y)&&k.removeChild(y)};y.style.pointerEvents="none",y.style.position="absolute",y.style.overflow="hidden",y.setAttribute("aria-hidden","true");const I=Jo(y);I&&(I.style.opacity="0");const q=Be(y);q&&(q.classList.add(u?n[R.caption_before_exit]:n[R.caption_after_exit]),q.addEventListener("animationend",C));const A=Ie(y);A&&A.classList.add(u?n[R.weeks_before_exit]:n[R.weeks_after_exit]),k.insertBefore(y,k.firstChild)})}})}function ta(e,t,n,r){const o=e[0],a=e[e.length-1],{ISOWeek:i,fixedWeeks:s,broadcastCalendar:c}=n??{},{addDays:d,differenceInCalendarDays:l,differenceInCalendarMonths:u,endOfBroadcastWeek:h,endOfISOWeek:g,endOfMonth:p,endOfWeek:O,isAfter:M,startOfBroadcastWeek:v,startOfISOWeek:Y,startOfWeek:k}=r,P=c?v(o,r):i?Y(o):k(o),y=c?h(a):i?g(p(a)):O(p(a)),b=l(y,P),w=u(a,o)+1,C=[];for(let A=0;A<=b;A++){const $=d(P,A);if(t&&M($,t))break;C.push($)}const q=(c?35:42)*w;if(s&&C.length<q){const A=q-C.length;for(let $=0;$<A;$++){const se=d(C[C.length-1],1);C.push(se)}}return C}function na(e){const t=[];return e.reduce((n,r)=>{const o=r.weeks.reduce((a,i)=>[...a,...i.days],t);return[...n,...o]},t)}function ra(e,t,n,r){const{numberOfMonths:o=1}=n,a=[];for(let i=0;i<o;i++){const s=r.addMonths(e,i);if(t&&s>t)break;a.push(s)}return a}function ot(e,t,n,r){const{month:o,defaultMonth:a,today:i=r.today(),numberOfMonths:s=1}=e;let c=o||a||i;const{differenceInCalendarMonths:d,addMonths:l,startOfMonth:u}=r;if(n&&d(n,c)<s-1){const h=-1*(s-1);c=l(n,h)}return t&&d(c,t)<0&&(c=t),u(c)}function oa(e,t,n,r){const{addDays:o,endOfBroadcastWeek:a,endOfISOWeek:i,endOfMonth:s,endOfWeek:c,getISOWeek:d,getWeek:l,startOfBroadcastWeek:u,startOfISOWeek:h,startOfWeek:g}=r,p=e.reduce((O,M)=>{const v=n.broadcastCalendar?u(M,r):n.ISOWeek?h(M):g(M),Y=n.broadcastCalendar?a(M):n.ISOWeek?i(s(M)):c(s(M)),k=t.filter(w=>w>=v&&w<=Y),P=n.broadcastCalendar?35:42;if(n.fixedWeeks&&k.length<P){const w=t.filter(C=>{const I=P-k.length;return C>Y&&C<=o(Y,I)});k.push(...w)}const y=k.reduce((w,C)=>{const I=n.ISOWeek?d(C):l(C),q=w.find($=>$.weekNumber===I),A=new Mt(C,M,r);return q?q.days.push(A):w.push(new Lr(I,[A])),w},[]),b=new Zr(M,y);return O.push(b),O},[]);return n.reverseMonths?p.reverse():p}function aa(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:a,startOfMonth:i,endOfMonth:s,addYears:c,endOfYear:d,newDate:l,today:u}=t,{fromYear:h,toYear:g,fromMonth:p,toMonth:O}=e;!n&&p&&(n=p),!n&&h&&(n=t.newDate(h,0,1)),!r&&O&&(r=O),!r&&g&&(r=l(g,11,31));const M=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=i(n):h?n=l(h,0,1):!n&&M&&(n=o(c(e.today??u(),-100))),r?r=s(r):g?r=l(g,11,31):!r&&M&&(r=d(e.today??u())),[n&&a(n),r&&a(r)]}function sa(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a=1}=n,{startOfMonth:i,addMonths:s,differenceInCalendarMonths:c}=r,d=o?a:1,l=i(e);if(!t)return s(l,d);if(!(c(t,e)<a))return s(l,d)}function ia(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a}=n,{startOfMonth:i,addMonths:s,differenceInCalendarMonths:c}=r,d=o?a??1:1,l=i(e);if(!t)return s(l,-d);if(!(c(l,t)<=0))return s(l,-d)}function ca(e){const t=[];return e.reduce((n,r)=>[...n,...r.weeks],t)}function We(e,t){const[n,r]=_.useState(e);return[t===void 0?n:t,r]}function ua(e,t){const[n,r]=aa(e,t),{startOfMonth:o,endOfMonth:a}=t,i=ot(e,n,r,t),[s,c]=We(i,e.month?i:void 0);_.useEffect(()=>{const b=ot(e,n,r,t);c(b)},[e.timeZone]);const d=ra(s,r,e,t),l=ta(d,e.endMonth?a(e.endMonth):void 0,e,t),u=oa(d,l,e,t),h=ca(u),g=na(u),p=ia(s,n,e,t),O=sa(s,r,e,t),{disableNavigation:M,onMonthChange:v}=e,Y=b=>h.some(w=>w.days.some(C=>C.isEqualTo(b))),k=b=>{if(M)return;let w=o(b);n&&w<o(n)&&(w=o(n)),r&&w>o(r)&&(w=o(r)),c(w),v?.(w)};return{months:u,weeks:h,days:g,navStart:n,navEnd:r,previousMonth:p,nextMonth:O,goToMonth:k,goToDay:b=>{Y(b)||k(b.date)}}}var V;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(V||(V={}));function at(e){return!e[F.disabled]&&!e[F.hidden]&&!e[F.outside]}function da(e,t,n,r){let o,a=-1;for(const i of e){const s=t(i);at(s)&&(s[F.focused]&&a<V.FocusedModifier?(o=i,a=V.FocusedModifier):r?.isEqualTo(i)&&a<V.LastFocused?(o=i,a=V.LastFocused):n(i.date)&&a<V.Selected?(o=i,a=V.Selected):s[F.today]&&a<V.Today&&(o=i,a=V.Today))}return o||(o=e.find(i=>at(t(i)))),o}function la(e,t,n,r,o,a,i){const{ISOWeek:s,broadcastCalendar:c}=a,{addDays:d,addMonths:l,addWeeks:u,addYears:h,endOfBroadcastWeek:g,endOfISOWeek:p,endOfWeek:O,max:M,min:v,startOfBroadcastWeek:Y,startOfISOWeek:k,startOfWeek:P}=i;let b={day:d,week:u,month:l,year:h,startOfWeek:w=>c?Y(w,i):s?k(w):P(w),endOfWeek:w=>c?g(w):s?p(w):O(w)}[e](n,t==="after"?1:-1);return t==="before"&&r?b=M([r,b]):t==="after"&&o&&(b=v([o,b])),b}function Yt(e,t,n,r,o,a,i,s=0){if(s>365)return;const c=la(e,t,n.date,r,o,a,i),d=!!(a.disabled&&te(c,a.disabled,i)),l=!!(a.hidden&&te(c,a.hidden,i)),u=c,h=new Mt(c,u,i);return!d&&!l?h:Yt(e,t,h,r,o,a,i,s+1)}function fa(e,t,n,r,o){const{autoFocus:a}=e,[i,s]=_.useState(),c=da(t.days,n,r||(()=>!1),i),[d,l]=_.useState(a?c:void 0);return{isFocusTarget:O=>!!c?.isEqualTo(O),setFocused:l,focused:d,blur:()=>{s(d),l(void 0)},moveFocus:(O,M)=>{if(!d)return;const v=Yt(O,M,d,t.navStart,t.navEnd,e,o);v&&(t.goToDay(v),l(v))}}}function ha(e,t){const{selected:n,required:r,onSelect:o}=e,[a,i]=We(n,o?n:void 0),s=o?n:a,{isSameDay:c}=t,d=g=>s?.some(p=>c(p,g))??!1,{min:l,max:u}=e;return{selected:s,select:(g,p,O)=>{let M=[...s??[]];if(d(g)){if(s?.length===l||r&&s?.length===1)return;M=s?.filter(v=>!c(v,g))}else s?.length===u?M=[g]:M=[...M,g];return o||i(M),o?.(M,g,p,O),M},isSelected:d}}function ma(e,t,n=0,r=0,o=!1,a=U){const{from:i,to:s}=t||{},{isSameDay:c,isAfter:d,isBefore:l}=a;let u;if(!i&&!s)u={from:e,to:n>0?void 0:e};else if(i&&!s)c(i,e)?o?u={from:i,to:void 0}:u=void 0:l(e,i)?u={from:e,to:i}:u={from:i,to:e};else if(i&&s)if(c(i,e)&&c(s,e))o?u={from:i,to:s}:u=void 0;else if(c(i,e))u={from:i,to:n>0?void 0:e};else if(c(s,e))u={from:e,to:n>0?void 0:e};else if(l(e,i))u={from:e,to:s};else if(d(e,i))u={from:i,to:e};else if(d(e,s))u={from:i,to:e};else throw new Error("Invalid range");if(u?.from&&u?.to){const h=a.differenceInCalendarDays(u.to,u.from);r>0&&h>r?u={from:e,to:void 0}:n>1&&h<n&&(u={from:e,to:void 0})}return u}function ya(e,t,n=U){const r=Array.isArray(t)?t:[t];let o=e.from;const a=n.differenceInCalendarDays(e.to,e.from),i=Math.min(a,6);for(let s=0;s<=i;s++){if(r.includes(o.getDay()))return!0;o=n.addDays(o,1)}return!1}function st(e,t,n=U){return ee(e,t.from,!1,n)||ee(e,t.to,!1,n)||ee(t,e.from,!1,n)||ee(t,e.to,!1,n)}function ga(e,t,n=U){const r=Array.isArray(t)?t:[t];if(r.filter(s=>typeof s!="function").some(s=>typeof s=="boolean"?s:n.isDate(s)?ee(e,s,!1,n):Ct(s,n)?s.some(c=>ee(e,c,!1,n)):qe(s)?s.from&&s.to?st(e,{from:s.from,to:s.to},n):!1:Wt(s)?ya(e,s.dayOfWeek,n):Dt(s)?n.isAfter(s.before,s.after)?st(e,{from:n.addDays(s.after,1),to:n.addDays(s.before,-1)},n):te(e.from,s,n)||te(e.to,s,n):vt(s)||Ot(s)?te(e.from,s,n)||te(e.to,s,n):!1))return!0;const i=r.filter(s=>typeof s=="function");if(i.length){let s=e.from;const c=n.differenceInCalendarDays(e.to,e.from);for(let d=0;d<=c;d++){if(i.some(l=>l(s)))return!0;s=n.addDays(s,1)}}return!1}function pa(e,t){const{disabled:n,excludeDisabled:r,selected:o,required:a,onSelect:i}=e,[s,c]=We(o,i?o:void 0),d=i?o:s;return{selected:d,select:(h,g,p)=>{const{min:O,max:M}=e,v=h?ma(h,d,O,M,a,t):void 0;return r&&n&&v?.from&&v.to&&ga({from:v.from,to:v.to},n,t)&&(v.from=h,v.to=void 0),i||c(v),i?.(v,h,g,p),v},isSelected:h=>d&&ee(d,h,!1,t)}}function wa(e,t){const{selected:n,required:r,onSelect:o}=e,[a,i]=We(n,o?n:void 0),s=o?n:a,{isSameDay:c}=t;return{selected:s,select:(u,h,g)=>{let p=u;return!r&&s&&s&&c(u,s)&&(p=void 0),o||i(p),o?.(p,u,h,g),p},isSelected:u=>s?c(s,u):!1}}function ba(e,t){const n=wa(e,t),r=ha(e,t),o=pa(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function ka(e){let t=e;t.timeZone&&(t={...e},t.today&&(t.today=new j(t.today,t.timeZone)),t.month&&(t.month=new j(t.month,t.timeZone)),t.defaultMonth&&(t.defaultMonth=new j(t.defaultMonth,t.timeZone)),t.startMonth&&(t.startMonth=new j(t.startMonth,t.timeZone)),t.endMonth&&(t.endMonth=new j(t.endMonth,t.timeZone)),t.mode==="single"&&t.selected?t.selected=new j(t.selected,t.timeZone):t.mode==="multiple"&&t.selected?t.selected=t.selected?.map(D=>new j(D,t.timeZone)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?new j(t.selected.from,t.timeZone):void 0,to:t.selected.to?new j(t.selected.to,t.timeZone):void 0}));const{components:n,formatters:r,labels:o,dateLib:a,locale:i,classNames:s}=_.useMemo(()=>{const D={...je,...t.locale};return{dateLib:new ne({locale:D,weekStartsOn:t.broadcastCalendar?1:t.weekStartsOn,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},t.dateLib),components:Oo(t.components),formatters:Po(t.formatters),labels:{...Vo,...t.labels},locale:D,classNames:{...Ae(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.components,t.formatters,t.labels,t.classNames]),{captionLayout:c,mode:d,navLayout:l,numberOfMonths:u=1,onDayBlur:h,onDayClick:g,onDayFocus:p,onDayKeyDown:O,onDayMouseEnter:M,onDayMouseLeave:v,onNextClick:Y,onPrevClick:k,showWeekNumber:P,styles:y}=t,{formatCaption:b,formatDay:w,formatMonthDropdown:C,formatWeekNumber:I,formatWeekNumberHeader:q,formatWeekdayName:A,formatYearDropdown:$}=r,se=ua(t,a),{days:ie,months:ce,navStart:Me,navEnd:Ce,previousMonth:G,nextMonth:Z,goToMonth:J}=se,xe=Qr(ie,t,Me,Ce,a),{isSelected:Se,select:Ne,selected:De}=ba(t,a)??{},{blur:ze,focused:Re,isFocusTarget:Et,moveFocus:$e,setFocused:ve}=fa(t,se,xe,Se??(()=>!1),a),{labelDayButton:Pt,labelGridcell:Ft,labelGrid:Bt,labelMonthDropdown:It,labelNav:Ge,labelPrevious:Ht,labelNext:jt,labelWeekday:qt,labelWeekNumber:At,labelWeekNumberHeader:zt,labelYearDropdown:Rt}=o,$t=_.useMemo(()=>Io(a,t.ISOWeek),[a,t.ISOWeek]),Ze=d!==void 0||g!==void 0,_e=_.useCallback(()=>{G&&(J(G),k?.(G))},[G,J,k]),Te=_.useCallback(()=>{Z&&(J(Z),Y?.(Z))},[J,Z,Y]),Gt=_.useCallback((D,E)=>x=>{x.preventDefault(),x.stopPropagation(),ve(D),Ne?.(D.date,E,x),g?.(D.date,E,x)},[Ne,g,ve]),Zt=_.useCallback((D,E)=>x=>{ve(D),p?.(D.date,E,x)},[p,ve]),Lt=_.useCallback((D,E)=>x=>{ze(),h?.(D.date,E,x)},[ze,h]),Qt=_.useCallback((D,E)=>x=>{const re={ArrowLeft:[x.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[x.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[x.shiftKey?"year":"week","after"],ArrowUp:[x.shiftKey?"year":"week","before"],PageUp:[x.shiftKey?"year":"month","before"],PageDown:[x.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(re[x.key]){x.preventDefault(),x.stopPropagation();const[L,Oe]=re[x.key];$e(L,Oe)}O?.(D.date,E,x)},[$e,O,t.dir]),Xt=_.useCallback((D,E)=>x=>{M?.(D.date,E,x)},[M]),Vt=_.useCallback((D,E)=>x=>{v?.(D.date,E,x)},[v]),Kt=_.useCallback(D=>E=>{const x=Number(E.target.value),re=a.setMonth(a.startOfMonth(D),x);J(re)},[a,J]),Ut=_.useCallback(D=>E=>{const x=Number(E.target.value),re=a.setYear(a.startOfMonth(D),x);J(re)},[a,J]),{className:Jt,style:en}=_.useMemo(()=>({className:[s[m.Root],t.className].filter(Boolean).join(" "),style:{...y?.[m.Root],...t.style}}),[s,t.className,t.style,y]),tn=Wo(t),Le=_.useRef(null);ea(Le,!!t.animate,{classNames:s,months:ce,focused:Re,dateLib:a});const nn={dayPickerProps:t,selected:De,select:Ne,isSelected:Se,months:ce,nextMonth:Z,previousMonth:G,goToMonth:J,getModifiers:xe,components:n,classNames:s,styles:y,labels:o,formatters:r};return f.createElement(xt.Provider,{value:nn},f.createElement(n.Root,{rootRef:t.animate?Le:void 0,className:Jt,style:en,dir:t.dir,id:t.id,lang:t.lang,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],...tn},f.createElement(n.Months,{className:s[m.Months],style:y?.[m.Months]},!t.hideNavigation&&!l&&f.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:s[m.Nav],style:y?.[m.Nav],"aria-label":Ge(),onPreviousClick:_e,onNextClick:Te,previousMonth:G,nextMonth:Z}),ce.map((D,E)=>{const x=Fo(D.date,Me,Ce,r,a),re=Ho(Me,Ce,r,a);return f.createElement(n.Month,{"data-animated-month":t.animate?"true":void 0,className:s[m.Month],style:y?.[m.Month],key:E,displayIndex:E,calendarMonth:D},l==="around"&&!t.hideNavigation&&E===0&&f.createElement(n.PreviousMonthButton,{type:"button",className:s[m.PreviousMonthButton],tabIndex:G?void 0:-1,"aria-disabled":G?void 0:!0,"aria-label":Ht(G),onClick:_e,"data-animated-button":t.animate?"true":void 0},f.createElement(n.Chevron,{disabled:G?void 0:!0,className:s[m.Chevron],orientation:t.dir==="rtl"?"right":"left"})),f.createElement(n.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:s[m.MonthCaption],style:y?.[m.MonthCaption],calendarMonth:D,displayIndex:E},c?.startsWith("dropdown")?f.createElement(n.DropdownNav,{className:s[m.Dropdowns],style:y?.[m.Dropdowns]},c==="dropdown"||c==="dropdown-months"?f.createElement(n.MonthsDropdown,{className:s[m.MonthsDropdown],"aria-label":It(),classNames:s,components:n,disabled:!!t.disableNavigation,onChange:Kt(D.date),options:x,style:y?.[m.Dropdown],value:a.getMonth(D.date)}):f.createElement("span",null,C(D.date,a)),c==="dropdown"||c==="dropdown-years"?f.createElement(n.YearsDropdown,{className:s[m.YearsDropdown],"aria-label":Rt(a.options),classNames:s,components:n,disabled:!!t.disableNavigation,onChange:Ut(D.date),options:re,style:y?.[m.Dropdown],value:a.getYear(D.date)}):f.createElement("span",null,$(D.date,a)),f.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"}},b(D.date,a.options,a))):f.createElement(n.CaptionLabel,{className:s[m.CaptionLabel],role:"status","aria-live":"polite"},b(D.date,a.options,a))),l==="around"&&!t.hideNavigation&&E===u-1&&f.createElement(n.NextMonthButton,{type:"button",className:s[m.NextMonthButton],tabIndex:Z?void 0:-1,"aria-disabled":Z?void 0:!0,"aria-label":jt(Z),onClick:Te,"data-animated-button":t.animate?"true":void 0},f.createElement(n.Chevron,{disabled:Z?void 0:!0,className:s[m.Chevron],orientation:t.dir==="rtl"?"left":"right"})),E===u-1&&l==="after"&&!t.hideNavigation&&f.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:s[m.Nav],style:y?.[m.Nav],"aria-label":Ge(),onPreviousClick:_e,onNextClick:Te,previousMonth:G,nextMonth:Z}),f.createElement(n.MonthGrid,{role:"grid","aria-multiselectable":d==="multiple"||d==="range","aria-label":Bt(D.date,a.options,a)||void 0,className:s[m.MonthGrid],style:y?.[m.MonthGrid]},!t.hideWeekdays&&f.createElement(n.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:s[m.Weekdays],style:y?.[m.Weekdays]},P&&f.createElement(n.WeekNumberHeader,{"aria-label":zt(a.options),className:s[m.WeekNumberHeader],style:y?.[m.WeekNumberHeader],scope:"col"},q()),$t.map((L,Oe)=>f.createElement(n.Weekday,{"aria-label":qt(L,a.options,a),className:s[m.Weekday],key:Oe,style:y?.[m.Weekday],scope:"col"},A(L,a.options,a)))),f.createElement(n.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:s[m.Weeks],style:y?.[m.Weeks]},D.weeks.map((L,Oe)=>f.createElement(n.Week,{className:s[m.Week],key:L.weekNumber,style:y?.[m.Week],week:L},P&&f.createElement(n.WeekNumber,{week:L,style:y?.[m.WeekNumber],"aria-label":At(L.weekNumber,{locale:i}),className:s[m.WeekNumber],scope:"row",role:"rowheader"},I(L.weekNumber,a)),L.days.map(H=>{const{date:X}=H,S=xe(H);if(S[F.focused]=!S.hidden&&!!Re?.isEqualTo(H),S[Q.selected]=Se?.(X)||S.selected,qe(De)){const{from:Ye,to:Ee}=De;S[Q.range_start]=!!(Ye&&Ee&&a.isSameDay(X,Ye)),S[Q.range_end]=!!(Ye&&Ee&&a.isSameDay(X,Ee)),S[Q.range_middle]=ee(De,X,!0,a)}const rn=Bo(S,y,t.modifiersStyles),on=Xr(S,s,t.modifiersClassNames),an=!Ze&&!S.hidden?Ft(X,S,a.options,a):void 0;return f.createElement(n.Day,{key:`${a.format(X,"yyyy-MM-dd")}_${a.format(H.displayMonth,"yyyy-MM")}`,day:H,modifiers:S,className:on.join(" "),style:rn,role:"gridcell","aria-selected":S.selected||void 0,"aria-label":an,"data-day":a.format(X,"yyyy-MM-dd"),"data-month":H.outside?a.format(X,"yyyy-MM"):void 0,"data-selected":S.selected||void 0,"data-disabled":S.disabled||void 0,"data-hidden":S.hidden||void 0,"data-outside":H.outside||void 0,"data-focused":S.focused||void 0,"data-today":S.today||void 0},!S.hidden&&Ze?f.createElement(n.DayButton,{className:s[m.DayButton],style:y?.[m.DayButton],type:"button",day:H,modifiers:S,disabled:S.disabled||void 0,tabIndex:Et(H)?0:-1,"aria-label":Pt(X,S,a.options,a),onClick:Gt(H,S),onBlur:Lt(H,S),onFocus:Zt(H,S),onKeyDown:Qt(H,S),onMouseEnter:Xt(H,S),onMouseLeave:Vt(H,S)},w(X,a.options,a)):!S.hidden&&w(H.date,a.options,a))}))))))})),t.footer&&f.createElement(n.Footer,{className:s[m.Footer],style:y?.[m.Footer],role:"status","aria-live":"polite"},t.footer)))}function Na({className:e,classNames:t,showOutsideDays:n=!0,captionLayout:r="label",buttonVariant:o="ghost",formatters:a,components:i,...s}){const c=Ae();return z.jsx(ka,{showOutsideDays:n,className:W("bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[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:d=>d.toLocaleString("default",{month:"short"}),...a},classNames:{root:W("w-fit",c.root),months:W("flex gap-4 flex-col md:flex-row relative",c.months),month:W("flex flex-col w-full gap-4",c.month),nav:W("flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between",c.nav),button_previous:W(Qe({variant:o}),"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",c.button_previous),button_next:W(Qe({variant:o}),"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",c.button_next),month_caption:W("flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)",c.month_caption),dropdowns:W("w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5",c.dropdowns),dropdown_root:W("relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md",c.dropdown_root),dropdown:W("absolute bg-popover inset-0 opacity-0",c.dropdown),caption_label:W("select-none font-medium",r==="label"?"text-sm":"rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5",c.caption_label),table:"w-full border-collapse",weekdays:W("flex",c.weekdays),weekday:W("text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none",c.weekday),week:W("flex w-full mt-2",c.week),week_number_header:W("select-none w-(--cell-size)",c.week_number_header),week_number:W("text-[0.8rem] select-none text-muted-foreground",c.week_number),day:W("relative w-full h-full p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none",c.day),range_start:W("rounded-l-md bg-accent",c.range_start),range_middle:W("rounded-none",c.range_middle),range_end:W("rounded-r-md bg-accent",c.range_end),today:W("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",c.today),outside:W("text-muted-foreground aria-selected:text-muted-foreground",c.outside),disabled:W("text-muted-foreground opacity-50",c.disabled),hidden:W("invisible",c.hidden),...t},components:{Root:({className:d,rootRef:l,...u})=>z.jsx("div",{"data-slot":"calendar",ref:l,className:W(d),...u}),Chevron:({className:d,orientation:l,...u})=>l==="left"?z.jsx(pn,{className:W("size-4",d),...u}):l==="right"?z.jsx(un,{className:W("size-4",d),...u}):z.jsx(dn,{className:W("size-4",d),...u}),DayButton:Ma,WeekNumber:({children:d,...l})=>z.jsx("td",{...l,children:z.jsx("div",{className:"flex size-(--cell-size) items-center justify-center text-center",children:d})}),...i},...s})}function Ma({className:e,day:t,modifiers:n,...r}){const o=Ae(),a=_.useRef(null);return _.useEffect(()=>{n.focused&&a.current?.focus()},[n.focused]),z.jsx(sn,{ref:a,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:W("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 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70",o.day,e),...r})}function _a({...e}){return z.jsx(fn,{"data-slot":"popover",...e})}function Ta({...e}){return z.jsx(hn,{"data-slot":"popover-trigger",...e})}function Ya({className:e,align:t="center",sideOffset:n=4,...r}){return z.jsx(mn,{children:z.jsx(yn,{"data-slot":"popover-content",align:t,sideOffset:n,className:W("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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...r})})}const Ea=({onClear:e,visible:t=!0})=>t?z.jsx("button",{type:"button",onClick:n=>{n.stopPropagation(),e()},className:"absolute right-1 top-1/2 -translate-y-1/2 p-1 rounded",title:"Clear",children:z.jsx(ln,{className:"w-4 h-4 text-gray-500 hover:text-black"})}):null;export{Ea as C,_a as P,Ta as a,Ya as b,Na as c,Yr as f};
@@ -1 +0,0 @@
1
- import{p as e,a as h,x as f,R as H,w as E}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{B as O}from"./index-BhARCKRr.js";import{m as M,v as A,h as P,w as U,x as N,b}from"./utils-CCKKso3e.js";import{I as q}from"./input-Bk91TMQj.js";import{c as G,u as Q,T as J,a as K,b as k,d as W,f as C,e as X,g as Y,i as Z,j as ee,h as te}from"./index-pxU98Is7.js";import{A as se,a as ae,b as le,c as re,d as ne,e as ie,f as oe,g as ce,h as de}from"./alert-dialog-CN-uuUVp.js";import{c as d}from"./createLucideIcon-BvSqmaUO.js";import{C as j}from"./calendar-Frbsxn98.js";import{T as me,F as he}from"./trash-UKLAaALv.js";import{E as S}from"./external-link-ERgO2SVI.js";import{C as F}from"./circle-check-C6CxUIig.js";import{a as pe,A as xe}from"./arrow-up-C0I0e1Jt.js";import"./index-CtLWaleL.js";import"./index-DLIEpuwL.js";import"./index-cCny74f5.js";const ue=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],ge=d("arrow-up-down",ue);const fe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],T=d("circle",fe);const je=[["path",{d:"M15 12h6",key:"upa0zy"}],["path",{d:"M15 6h6",key:"1jlkvy"}],["path",{d:"m3 13 3.553-7.724a.5.5 0 0 1 .894 0L11 13",key:"blevx4"}],["path",{d:"M3 18h18",key:"1h113x"}],["path",{d:"M4 11h6",key:"olkgv1"}]],v=d("letter-text",je);const we=[["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]],ye=d("list-checks",we);const Ne=[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]],be=d("list",Ne);const ke=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Ce=d("plus",ke),ve={boolean:F,date:j,datetime:j,markdown:v,select:be,multiselect:ye,string:v,url:S},u=G(),R=(r,a,n)=>{const i=r.getValue(n),o=a.getValue(n);return!i&&!o?0:i?o?new Date(i).getTime()-new Date(o).getTime():-1:1},D=[u.accessor("id",{header(){return e.jsxs("span",{className:"flex items-center max-w-48",children:[e.jsx(T,{className:"text-gray-500 h-4"})," ID"]})},cell(r){const a=r.getValue();return e.jsx("span",{title:a,className:"block overflow-hidden text-ellipsis w-48 max-w-48 whitespace-nowrap",children:a})}})],De=[u.accessor("updatedAt",{header(){return e.jsxs("div",{className:"flex items-center max-w-48",children:[e.jsx(j,{className:"text-gray-500 h-4"})," Last updated"]})},sortingFn:R,cell(r){return M(new Date(r.getValue()))}})];function Me({itemType:r}){const{data:a}=A(r),{data:n}=P(),[i,o]=h.useState([]),[_,$]=h.useState([{id:"updatedAt",desc:!0}]),[w]=U(),y=h.useMemo(()=>u.display({id:"actions",header:()=>e.jsx("span",{className:"flex justify-end ml-auto"}),cell(l){return e.jsx("div",{className:"flex gap-2 justify-end",onClick:s=>{s.preventDefault(),s.stopPropagation()},children:e.jsxs(se,{children:[e.jsx(ae,{asChild:!0,children:e.jsxs("button",{className:"hover:text-red-500 p-1 hover:bg-muted rounded-sm",title:"Delete entry",children:[e.jsx(me,{size:16}),e.jsx("span",{className:"sr-only",children:"Delete entry"})]})}),e.jsxs(le,{children:[e.jsxs(re,{children:[e.jsxs(ne,{children:["Delete ",e.jsx("i",{children:l.row.original.id}),"?"]}),e.jsx(ie,{children:"This action cannot be undone. This will permanently delete this object."})]}),e.jsxs(oe,{children:[e.jsx(ce,{className:"cursor-pointer",children:"Cancel"}),e.jsx(de,{className:"bg-red-600 hover:bg-red-700 cursor-pointer",onClick:()=>w({type:r,id:l.row.original.id}),children:"Delete"})]})]})]})})},enableSorting:!1}),[r,w]),g=h.useMemo(()=>{if(!a)return D;const l=Object.entries(a.fields);return[...D,...l.filter(([,s])=>s.showInSummary).map(([s,c])=>u.accessor(m=>m[s],{id:s,sortingFn:c.type==="date"||c.type==="datetime"?R:"alphanumeric",header(){const m=c.isUploadedFile?he:ve[c.type]??H.Fragment;return e.jsxs("div",{className:"flex items-center ",children:[e.jsx(m,{className:"text-gray-500 h-4 flex-shrink-0"}),c.displayName]})},cell(m){const t=m.getValue();switch(c.type){case"boolean":const I=t?F:T;return e.jsx("span",{className:"flex justify-center items-center h-full text-nowrap",children:e.jsx(I,{className:N("mx-auto",t?"text-green-600":"text-gray-300"),size:14})});case"url":return t?e.jsx(f,{to:t,className:"flex items-center w-48 hover:text-blue-500 overflow-hidden text-ellipsis whitespace-nowrap",title:t,children:t}):"--";case"datetime":return t?e.jsx("span",{className:" text-nowrap",title:t,children:new Date(t).toLocaleString(void 0,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:void 0})}):"--";case"date":return t?e.jsx("span",{className:"text-nowrap",title:t,children:M(new Date(t))}):"--";case"select":return t?e.jsx("span",{title:t,className:"inline-flex items-center px-2 py-0.5 font-medium max-w-48 overflow-hidden text-ellipsis whitespace-nowrap",children:t}):"--";case"multiselect":if(!t||Array.isArray(t)&&t.length===0)return"--";const x=Array.isArray(t)?t:[t],L=x.join(", ");return e.jsxs("span",{title:L,className:"flex items-center gap-1 w-48 overflow-hidden",children:[x.slice(0,3).map((V,B)=>e.jsx("span",{className:"inline-flex items-center px-0.5 py-0.5 font-medium whitespace-nowrap",children:V},B)),x.length>3&&e.jsxs("span",{className:"text-xs text-gray-500 whitespace-nowrap",children:["+",x.length-3]})]});case"markdown":case"string":return c.isUploadedFile?e.jsxs("span",{title:t,className:"flex items-center w-48 overflow-hidden text-ellipsis whitespace-nowrap",children:[e.jsx(S,{className:"h-4 shrink-0"})," ",t]}):e.jsx("span",{title:t,className:"block w-48 overflow-hidden text-ellipsis whitespace-nowrap",children:t});default:return Array.isArray(t)?t.join(", "):t}}})),...De,y]},[y,a]),z=h.useMemo(()=>n?.[r]?Object.values(n[r]):[],[r,n]),p=Q({data:z,columns:g,getCoreRowModel:te(),onColumnFiltersChange:o,getFilteredRowModel:ee(),onSortingChange:$,getSortedRowModel:Z(),state:{sorting:_,columnFilters:i}});return!a||!n?null:e.jsxs("div",{className:"rounded-sm border overflow-auto",children:[a.filterBy&&Object.entries(a.fields).find(([l])=>l===a.filterBy)&&e.jsx("div",{className:"flex items-center py-2 pl-2 ",children:e.jsx(q,{placeholder:`Filter ${a.filterBy}...`,value:p.getColumn(a.filterBy)?.getFilterValue()??"",onChange:l=>p.getColumn(a.filterBy||"")?.setFilterValue(l.target.value),className:"max-w-sm rounded-sm"})}),e.jsxs(J,{children:[e.jsx(K,{className:"sticky top-0 z-50",children:p.getHeaderGroups().map(l=>e.jsx(k,{className:"grid",style:{gridTemplateColumns:`repeat(${g.length}, minmax(200px, 1fr))`},children:l.headers.map(s=>e.jsx(W,{className:N("bg-background transition-colors",s.column.getCanSort()&&"hover:bg-gray-100 cursor-default"),onClick:()=>{console.log("sorting",s.column.getIsSorted()),s.column.toggleSorting(s.column.getIsSorted()==="asc")},children:e.jsxs("div",{className:"flex items-center w-full overflow-hidden",children:[e.jsx("span",{className:"block overflow-hidden text-ellipsis whitespace-nowrap",title:s.column.columnDef.header?.toString?.()??"",children:s.isPlaceholder?null:C(s.column.columnDef.header,s.getContext())}),s.column.getCanSort()&&(s.column.getIsSorted()==="asc"?e.jsx(pe,{className:"ml-2 h-4 w-4 text-foreground"}):s.column.getIsSorted()==="desc"?e.jsx(xe,{className:"ml-2 h-4 w-4 text-foreground"}):e.jsx(ge,{className:"ml-2 h-4 w-4 text-gray-400"}))]})},s.id))},l.id))}),e.jsx(X,{children:p.getRowModel().rows.map(l=>e.jsx(f,{to:`/admin/dashboard/${r}/${l.original.id}`,children:e.jsx(k,{className:b("grid",l.original.isDraft&&"bg-orange-50 hover:bg-orange-100"),style:{gridTemplateColumns:`repeat(${g.length}, minmax(200px, 1fr))`},children:l.getVisibleCells().map(s=>e.jsx(Y,{className:b("h-10"),children:C(s.column.columnDef.cell,s.getContext())},s.id))})},l.id))})]})]})}const Pe=E(function({params:a}){const{collectionId:n}=a,{data:i,isFetching:o}=A(n);return o||!i?null:e.jsx("div",{className:"overflow-hidden flex flex-1 p-4 gap-4",children:e.jsx("div",{className:"flex flex-col overflow-hidden flex-1 gap-8",children:e.jsxs("div",{className:"flex flex-col h-full gap-4 last:mb-20",children:[e.jsxs("div",{className:"flex items-center",children:[e.jsx("h2",{className:"scroll-mt-[4.5rem] text-xl font-semibold leading-none capitalize",id:i.displayName,children:i.displayName}),e.jsx(O,{asChild:!0,variant:"default",size:"sm",className:"ml-auto",children:e.jsxs(f,{to:`/admin/dashboard/${n}/new`,children:[e.jsx(Ce,{}),"Create"]})})]}),e.jsx(Me,{itemType:n},n)]})})})});export{Pe as default};
@@ -1 +0,0 @@
1
- import{w as F,a as c,p as d}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{I as x}from"./itemForm-CQAq1Sag.js";import{v as y,y as I,p as j}from"./utils-CCKKso3e.js";import"./badge-gLcN3Bjg.js";import"./index-CtLWaleL.js";import"./index-BhARCKRr.js";import"./index-DLIEpuwL.js";import"./zod-BFfp0fV9.js";import"./index-CHzEoQKp.js";import"./check-DF0ucE8d.js";import"./createLucideIcon-BvSqmaUO.js";import"./schemas-CPJfa6mm.js";import"./input-Bk91TMQj.js";import"./index-cCny74f5.js";import"./index-B2dzkZu5.js";import"./x-BVtfHpQX.js";import"./alert-dialog-CN-uuUVp.js";import"./schemas-MhAKMGOb.js";import"./index-CZSVchcX.js";import"./loader-circle-BDUbeTTe.js";const H=F(function({params:p}){const{collectionId:t,documentId:e}=p,[l,o]=c.useState(void 0),{data:s,isFetching:u}=y(t),{data:f,isFetching:h}=I({itemType:t,id:e}),{data:i}=j(),g=c.useMemo(()=>{if(!i)return[];const r=i.singles[t];if(r?.changedFields)return o(r.status),r.changedFields;const a=i.collections[t];if(!a)return[];const m=a.modified.find(n=>n.id===e);return m?(o("modified"),m.changedFields):(a.added.find(n=>n.id===e)&&o("added"),[])},[i,t,e]);return!s||(u||h)?null:d.jsx("div",{className:"overflow-auto scrollbar-stable",children:d.jsx("div",{className:"p-4 gap-4",children:d.jsx(x,{itemType:t,fields:s.fields,data:f??void 0,isSingleton:s.singleton,changedFields:g,itemStatus:l},`${t}-${e}`)})})});export{H as default};
@@ -1 +0,0 @@
1
- import{w as m,p as t}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{I as e}from"./itemForm-CQAq1Sag.js";import{v as p}from"./utils-CCKKso3e.js";import"./badge-gLcN3Bjg.js";import"./index-CtLWaleL.js";import"./index-BhARCKRr.js";import"./index-DLIEpuwL.js";import"./zod-BFfp0fV9.js";import"./index-CHzEoQKp.js";import"./check-DF0ucE8d.js";import"./createLucideIcon-BvSqmaUO.js";import"./schemas-CPJfa6mm.js";import"./input-Bk91TMQj.js";import"./index-cCny74f5.js";import"./index-B2dzkZu5.js";import"./x-BVtfHpQX.js";import"./alert-dialog-CN-uuUVp.js";import"./schemas-MhAKMGOb.js";import"./index-CZSVchcX.js";import"./loader-circle-BDUbeTTe.js";const b=m(function({params:r}){const{collectionId:i}=r,{data:o}=p(i);return o?t.jsx("div",{className:"overflow-auto",children:t.jsx("div",{className:" p-4 gap-4",children:t.jsx(e,{itemType:i,fields:o.fields,isNew:!0,isSingleton:o.singleton})})}):null});export{b as default};
@@ -1 +0,0 @@
1
- import{p as e,a as r,x as k,y as J,v as be,z as me,R as ge,w as je,O as ve}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{u as we,c as A,d as ye}from"./authSlice-BI_rlf3v.js";import{b as l,d as D,h as Ne,j as Ce,k as Se,l as ke,u as _e}from"./utils-CCKKso3e.js";import{t as y}from"./index-CZSVchcX.js";import{R as ee,C as te,a as ae,T as se,D as ne,P as ie,O as oe,u as Pe}from"./index-cCny74f5.js";import{X as re,C as H}from"./x-BVtfHpQX.js";import{B as O,u as Me,c as Oe,P as I,a as ze,b as Ee,d as Re}from"./index-BhARCKRr.js";import{c as _}from"./createLucideIcon-BvSqmaUO.js";import{S as T,c as Ae,u as De}from"./index-CtLWaleL.js";import{P as Ie}from"./index-CHzEoQKp.js";import{P as Te,R as Le,T as $e,a as Be,C as Ge,A as He}from"./index-B3bJjaCJ.js";import{L as E}from"./loader-circle-BDUbeTTe.js";import{A as Fe,a as Ve}from"./arrow-up-C0I0e1Jt.js";import{U as Ke}from"./upload-DhJ5wU_H.js";import{E as Ue}from"./external-link-ERgO2SVI.js";import{L as qe}from"./Loading-MKgXMPvl.js";import{C as We}from"./chevron-right-BFlMu-RJ.js";import"./index-DLIEpuwL.js";import"./index-B2dzkZu5.js";const Qe=[["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["path",{d:"M10 21V8a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-5a1 1 0 0 0-1-1H3",key:"1fpvtg"}]],Xe=_("blocks",Qe);const Ze=[["path",{d:"M20 7h-3a2 2 0 0 1-2-2V2",key:"x099mo"}],["path",{d:"M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z",key:"18t6ie"}],["path",{d:"M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8",key:"1nja0z"}]],Ye=_("files",Ze);const Je=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],et=_("grid-3x3",Je);const tt=[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]],at=_("heart",tt);const st=[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]],nt=_("log-out",st);const it=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],ot=_("panel-left",it);const rt=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],lt=_("square",rt);function dt({...t}){return e.jsx(ee,{"data-slot":"dialog",...t})}function ct({...t}){return e.jsx(ie,{"data-slot":"dialog-portal",...t})}function ut({className:t,...a}){return e.jsx(oe,{"data-slot":"dialog-overlay",className:l("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...a})}function ht({className:t,children:a,...n}){return e.jsxs(ct,{"data-slot":"dialog-portal",children:[e.jsx(ut,{}),e.jsxs(te,{"data-slot":"dialog-content",className:l("bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",t),...n,children:[a,e.jsxs(ae,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[e.jsx(re,{}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function pt({className:t,...a}){return e.jsx("div",{"data-slot":"dialog-header",className:l("flex flex-col gap-2 text-center sm:text-left",t),...a})}function ft({className:t,...a}){return e.jsx("div",{"data-slot":"dialog-footer",className:l("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...a})}function xt({className:t,...a}){return e.jsx(se,{"data-slot":"dialog-title",className:l("text-lg leading-none font-semibold",t),...a})}function bt({className:t,...a}){return e.jsx(ne,{"data-slot":"dialog-description",className:l("text-muted-foreground text-sm",t),...a})}const mt="#181717",gt=r.forwardRef(function({title:a="GitHub",color:n="currentColor",size:s=24,...i},o){return n==="default"&&(n=mt),e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:s,height:s,fill:n,viewBox:"0 0 24 24",ref:o,...i,children:[e.jsx("title",{children:a}),e.jsx("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})]})}),jt="#85EA2D",F=r.forwardRef(function({title:a="Swagger",color:n="currentColor",size:s=24,...i},o){return n==="default"&&(n=jt),e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:s,height:s,fill:n,viewBox:"0 0 24 24",ref:o,...i,children:[e.jsx("title",{children:a}),e.jsx("path",{d:"M12 0C5.383 0 0 5.383 0 12s5.383 12 12 12c6.616 0 12-5.383 12-12S18.616 0 12 0zm0 1.144c5.995 0 10.856 4.86 10.856 10.856 0 5.995-4.86 10.856-10.856 10.856-5.996 0-10.856-4.86-10.856-10.856C1.144 6.004 6.004 1.144 12 1.144zM8.37 5.868a6.707 6.707 0 0 0-.423.005c-.983.056-1.573.517-1.735 1.472-.115.665-.096 1.348-.143 2.017-.013.35-.05.697-.115 1.038-.134.609-.397.798-1.016.83a2.65 2.65 0 0 0-.244.042v1.463c1.126.055 1.278.452 1.37 1.629.033.429-.013.858.015 1.287.018.406.073.808.156 1.2.259 1.075 1.307 1.435 2.575 1.218v-1.283c-.203 0-.383.005-.558 0-.43-.013-.591-.12-.632-.535-.056-.535-.042-1.08-.075-1.62-.064-1.001-.175-1.988-1.153-2.625.503-.37.868-.812.983-1.398.083-.41.134-.821.166-1.237.028-.415-.023-.84.014-1.25.06-.665.102-.937.9-.91.12 0 .235-.017.369-.027v-1.31c-.16 0-.31-.004-.454-.006zm7.593.009a4.247 4.247 0 0 0-.813.06v1.274c.245 0 .434 0 .623.005.328.004.577.13.61.494.032.332.031.669.064 1.006.065.669.101 1.347.217 2.007.102.544.475.95.941 1.283-.817.549-1.057 1.333-1.098 2.215-.023.604-.037 1.213-.069 1.822-.028.554-.222.734-.78.748-.157.004-.31.018-.484.028v1.305c.327 0 .627.019.927 0 .932-.055 1.495-.507 1.68-1.412.078-.498.124-1 .138-1.504.032-.461.028-.927.074-1.384.069-.715.397-1.01 1.112-1.057a.972.972 0 0 0 .199-.046v-1.463c-.12-.014-.204-.027-.291-.032-.536-.023-.804-.203-.937-.71a5.146 5.146 0 0 1-.152-.993c-.037-.618-.033-1.241-.074-1.86-.08-1.192-.794-1.753-1.887-1.786zm-6.89 5.28a.844.844 0 0 0-.083 1.684h.055a.83.83 0 0 0 .877-.78v-.046a.845.845 0 0 0-.83-.858zm2.911 0a.808.808 0 0 0-.834.78c0 .027 0 .05.004.078 0 .503.342.826.859.826.507 0 .826-.332.826-.853-.005-.503-.342-.836-.855-.831zm2.963 0a.861.861 0 0 0-.876.835c0 .47.378.849.849.849h.009c.425.074.853-.337.881-.83.023-.457-.392-.854-.863-.854z"})]})});function vt({isOpen:t,setOpen:a}){return e.jsx(dt,{open:t,onOpenChange:n=>a(n),children:e.jsxs(ht,{children:[e.jsxs(pt,{children:[e.jsx(xt,{children:"Editorial"}),e.jsx(bt,{children:"A simple CMS for static websites"})]}),e.jsxs("div",{className:"flex gap-1",children:[e.jsx(O,{asChild:!0,variant:"ghost",children:e.jsxs(k,{to:"https://lobelia-earth.github.io/editorial/",children:[e.jsx(F,{size:14}),"Documentation"]})}),e.jsx(O,{asChild:!0,variant:"ghost",children:e.jsxs(k,{to:"/doc/ui",children:[e.jsx(F,{size:14}),"Swagger API UI"]})}),e.jsx(O,{asChild:!0,variant:"ghost",children:e.jsxs(k,{to:"https://github.com/Lobelia-Earth/editorial",children:[e.jsx(gt,{size:14}),"GitHub repository"]})})]}),e.jsx(ft,{children:e.jsxs("p",{className:"flex items-center gap-1",children:["Created with",e.jsx(at,{size:14,className:"stroke-red-500 fill-red-500"})," by"," ",e.jsx(k,{to:"https://lobelia.earth",className:"underline hover:text-blue-500",children:"Lobelia.earth"})]})})]})})}var wt="Separator",V="horizontal",yt=["horizontal","vertical"],le=r.forwardRef((t,a)=>{const{decorative:n,orientation:s=V,...i}=t,o=Nt(s)?s:V,c=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return e.jsx(Ie.div,{"data-orientation":o,...c,...i,ref:a})});le.displayName=wt;function Nt(t){return yt.includes(t)}var Ct=le;function de({className:t,orientation:a="horizontal",decorative:n=!0,...s}){return e.jsx(Ct,{"data-slot":"separator-root",decorative:n,orientation:a,className:l("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",t),...s})}function St({...t}){return e.jsx(ee,{"data-slot":"sheet",...t})}function kt({...t}){return e.jsx(ie,{"data-slot":"sheet-portal",...t})}function _t({className:t,...a}){return e.jsx(oe,{"data-slot":"sheet-overlay",className:l("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...a})}function Pt({className:t,children:a,side:n="right",...s}){return e.jsxs(kt,{children:[e.jsx(_t,{}),e.jsxs(te,{"data-slot":"sheet-content",className:l("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",n==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",n==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",n==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",n==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",t),...s,children:[a,e.jsxs(ae,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[e.jsx(re,{className:"size-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function Mt({className:t,...a}){return e.jsx("div",{"data-slot":"sheet-header",className:l("flex flex-col gap-1.5 p-4",t),...a})}function Ot({className:t,...a}){return e.jsx(se,{"data-slot":"sheet-title",className:l("text-foreground font-semibold",t),...a})}function zt({className:t,...a}){return e.jsx(ne,{"data-slot":"sheet-description",className:l("text-muted-foreground text-sm",t),...a})}function ce({delayDuration:t=0,...a}){return e.jsx(Te,{"data-slot":"tooltip-provider",delayDuration:t,...a})}function Et({...t}){return e.jsx(ce,{children:e.jsx(Le,{"data-slot":"tooltip",...t})})}function Rt({...t}){return e.jsx($e,{"data-slot":"tooltip-trigger",...t})}function At({className:t,sideOffset:a=0,children:n,...s}){return e.jsx(Be,{children:e.jsxs(Ge,{"data-slot":"tooltip-content",sideOffset:a,className:l("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",t),...s,children:[n,e.jsx(He,{className:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const R=768;function Dt(){const[t,a]=r.useState(void 0);return r.useEffect(()=>{const n=window.matchMedia(`(max-width: ${R-1}px)`),s=()=>{a(window.innerWidth<R)};return n.addEventListener("change",s),a(window.innerWidth<R),()=>n.removeEventListener("change",s)},[]),!!t}const It="sidebar_state",Tt=3600*24*7,Lt="16rem",$t="18rem",Bt="3rem",Gt="b",ue=r.createContext(null);function L(){const t=r.useContext(ue);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function Ht({defaultOpen:t=!0,open:a,onOpenChange:n,className:s,style:i,children:o,...d}){const c=Dt(),[x,h]=r.useState(!1),[g,C]=r.useState(t),m=a??g,f=r.useCallback(p=>{const u=typeof p=="function"?p(m):p;n?n(u):C(u),document.cookie=`${It}=${u}; path=/; max-age=${Tt}`},[n,m]),v=r.useCallback(()=>c?h(p=>!p):f(p=>!p),[c,f,h]);r.useEffect(()=>{const p=u=>{u.key===Gt&&(u.metaKey||u.ctrlKey)&&(u.preventDefault(),v())};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[v]);const N=m?"expanded":"collapsed",w=r.useMemo(()=>({state:N,open:m,setOpen:f,isMobile:c,openMobile:x,setOpenMobile:h,toggleSidebar:v}),[N,m,f,c,x,h,v]);return e.jsx(ue.Provider,{value:w,children:e.jsx(ce,{delayDuration:0,children:e.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":Lt,"--sidebar-width-icon":Bt,...i},className:l("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",s),...d,children:o})})})}function Ft({side:t="left",variant:a="sidebar",collapsible:n="offcanvas",className:s,children:i,...o}){const{isMobile:d,state:c,openMobile:x,setOpenMobile:h}=L();return n==="none"?e.jsx("div",{"data-slot":"sidebar",className:l("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",s),...o,children:i}):d?e.jsx(St,{open:x,onOpenChange:h,...o,children:e.jsxs(Pt,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:{"--sidebar-width":$t},side:t,children:[e.jsxs(Mt,{className:"sr-only",children:[e.jsx(Ot,{children:"Sidebar"}),e.jsx(zt,{children:"Displays the mobile sidebar."})]}),e.jsx("div",{className:"flex h-full w-full flex-col",children:i})]})}):e.jsxs("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":c,"data-collapsible":c==="collapsed"?n:"","data-variant":a,"data-side":t,"data-slot":"sidebar",children:[e.jsx("div",{"data-slot":"sidebar-gap",className:l("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",a==="floating"||a==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),e.jsx("div",{"data-slot":"sidebar-container",className:l("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",t==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",a==="floating"||a==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",s),...o,children:e.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:i})})]})}function Vt({className:t,onClick:a,...n}){const{toggleSidebar:s}=L();return e.jsxs(O,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:l("size-7",t),onClick:i=>{a?.(i),s()},...n,children:[e.jsx(ot,{}),e.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function Kt({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:l("flex flex-col gap-2 p-2",t),...a})}function Ut({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:l("flex flex-col gap-2 p-2",t),...a})}function qt({className:t,...a}){return e.jsx(de,{"data-slot":"sidebar-separator","data-sidebar":"separator",className:l("bg-sidebar-border mx-2 w-auto",t),...a})}function Wt({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:l("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",t),...a})}function K({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:l("relative flex w-full min-w-0 flex-col p-2",t),...a})}function U({className:t,asChild:a=!1,...n}){const s=a?T:"div";return e.jsx(s,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:l("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",t),...n})}function q({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:l("w-full text-sm",t),...a})}function W({className:t,...a}){return e.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:l("flex w-full min-w-0 flex-col gap-1",t),...a})}function S({className:t,...a}){return e.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:l("group/menu-item relative",t),...a})}const Qt=Ae("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function j({asChild:t=!1,isActive:a=!1,variant:n="default",size:s="default",tooltip:i,className:o,...d}){const c=t?T:"button",{isMobile:x,state:h}=L(),g=e.jsx(c,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":s,"data-active":a,className:l(Qt({variant:n,size:s}),o),...d});return i?(typeof i=="string"&&(i={children:i}),e.jsxs(Et,{children:[e.jsx(Rt,{asChild:!0,children:g}),e.jsx(At,{side:"right",align:"center",hidden:h!=="collapsed"||x,...i})]})):g}function Xt({className:t,...a}){return e.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:l("border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",t),...a})}function Zt({asChild:t=!1,size:a="md",isActive:n=!1,className:s,...i}){const o=t?T:"a";return e.jsx(o,{"data-slot":"sidebar-menu-sub-button","data-sidebar":"menu-sub-button","data-size":a,"data-active":n,className:l("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",a==="sm"&&"text-xs",a==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",s),...i})}function Q({singleton:t}){const{data:a}=D(),{data:n}=Ne();if(!a)return null;const s=r.useMemo(()=>Object.entries(a).filter(([,i])=>t?i.singleton:!i.singleton).toSorted(([i],[o])=>i.localeCompare(o)),[a,t]);return e.jsx(e.Fragment,{children:s.map(([i,o])=>e.jsx(Xt,{children:e.jsx(J,{to:t?`/admin/dashboard/${i}/default`:`/admin/dashboard/${i}`,className:({isActive:d,isPending:c})=>c?"pending":d?"active":"",children:({isActive:d})=>e.jsx(Zt,{isActive:d,asChild:!0,children:e.jsxs("div",{children:[e.jsx("span",{className:"inline-block overflow-hidden whitespace-nowrap text-ellipsis text-nowrap",children:o.displayName}),!t&&n?.[i]&&e.jsx("span",{className:"text-xs text-gray-500 ml-auto pr-1 min-w-[25px] text-right",children:Object.keys(n[i]).length})]})})})},o.displayName))})}var z="Collapsible",[Yt]=Oe(z),[Jt,$]=Yt(z),he=r.forwardRef((t,a)=>{const{__scopeCollapsible:n,open:s,defaultOpen:i,disabled:o,onOpenChange:d,...c}=t,[x,h]=Me({prop:s,defaultProp:i??!1,onChange:d,caller:z});return e.jsx(Jt,{scope:n,disabled:o,contentId:Pe(),open:x,onOpenToggle:r.useCallback(()=>h(g=>!g),[h]),children:e.jsx(I.div,{"data-state":G(x),"data-disabled":o?"":void 0,...c,ref:a})})});he.displayName=z;var pe="CollapsibleTrigger",fe=r.forwardRef((t,a)=>{const{__scopeCollapsible:n,...s}=t,i=$(pe,n);return e.jsx(I.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":G(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...s,ref:a,onClick:ze(t.onClick,i.onOpenToggle)})});fe.displayName=pe;var B="CollapsibleContent",xe=r.forwardRef((t,a)=>{const{forceMount:n,...s}=t,i=$(B,t.__scopeCollapsible);return e.jsx(Ee,{present:n||i.open,children:({present:o})=>e.jsx(ea,{...s,ref:a,present:o})})});xe.displayName=B;var ea=r.forwardRef((t,a)=>{const{__scopeCollapsible:n,present:s,children:i,...o}=t,d=$(B,n),[c,x]=r.useState(s),h=r.useRef(null),g=De(a,h),C=r.useRef(0),m=C.current,f=r.useRef(0),v=f.current,N=d.open||c,w=r.useRef(N),p=r.useRef(void 0);return r.useEffect(()=>{const u=requestAnimationFrame(()=>w.current=!1);return()=>cancelAnimationFrame(u)},[]),Re(()=>{const u=h.current;if(u){p.current=p.current||{transitionDuration:u.style.transitionDuration,animationName:u.style.animationName},u.style.transitionDuration="0s",u.style.animationName="none";const M=u.getBoundingClientRect();C.current=M.height,f.current=M.width,w.current||(u.style.transitionDuration=p.current.transitionDuration,u.style.animationName=p.current.animationName),x(s)}},[d.open,s]),e.jsx(I.div,{"data-state":G(d.open),"data-disabled":d.disabled?"":void 0,id:d.contentId,hidden:!N,...o,ref:g,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...t.style},children:N&&i})});function G(t){return t?"open":"closed"}var ta=he;function X({...t}){return e.jsx(ta,{"data-slot":"collapsible",...t})}function Z({...t}){return e.jsx(fe,{"data-slot":"collapsible-trigger",...t})}function Y({...t}){return e.jsx(xe,{"data-slot":"collapsible-content",...t})}function aa(){const t=we(),[a,n]=r.useState(!1),[s]=Ce(),[i]=Se(),[o]=ke(),[d,c]=r.useState(!1),[x,h]=r.useState(!1),[g,C]=r.useState(!1),{data:m}=_e(),{data:f}=D(),v=r.useMemo(()=>f&&!!Object.values(f).find(b=>!b.singleton),[f]),N=r.useMemo(()=>f&&!!Object.values(f).find(b=>b.singleton),[f]),w=A(b=>b.auth.user),p=async b=>{c(!0);try{await s({author:b}).unwrap()?y.success("Content published successfully."):y.error("Publishing failed.")}catch(P){y.error("Publishing failed."),console.error(P)}finally{c(!1)}},u=async()=>{h(!0);try{await i().unwrap()?y.success("Content pulled successfully."):y.error("Pulling content failed.")}catch(b){y.error("Pulling content failed."),console.error(b)}finally{h(!1)}},M=async b=>{C(!0);try{await o(b).unwrap()?y.success("Content pushed successfully."):y.error("Pushing content failed.")}catch(P){y.error("Pushing content failed."),console.error(P)}finally{C(!1)}};return e.jsxs(Ft,{className:"z-50",children:[e.jsx(vt,{isOpen:a,setOpen:n}),e.jsx(Kt,{className:"h-14 justify-center",children:e.jsx(K,{children:e.jsx(k,{to:"/admin/dashboard",className:"text-3xl font-semibold tracking-tight transition-colors",children:m?.name})})}),e.jsx(Wt,{children:e.jsxs(K,{children:[e.jsx(U,{children:"Content"}),e.jsx(q,{children:e.jsxs(W,{children:[e.jsx(X,{className:"group/collapsible",disabled:!v,children:e.jsxs(S,{children:[e.jsx(Z,{asChild:!0,children:e.jsxs(j,{className:"group",children:[e.jsx(et,{}),e.jsx("span",{children:"Collections"}),e.jsx(H,{className:"transition-transform ml-auto -mr-[2px] group-data-[state=open]:rotate-180"})]})}),e.jsx(Y,{children:e.jsx(Q,{})})]})}),e.jsx(X,{className:"group/collapsible",disabled:!N,children:e.jsxs(S,{children:[e.jsx(Z,{asChild:!0,children:e.jsxs(j,{className:"group",children:[e.jsx(lt,{}),e.jsx("span",{children:"Singles"}),e.jsx(H,{className:"transition-transform ml-auto -mr-[2px] group-data-[state=open]:rotate-180"})]})}),e.jsx(Y,{children:e.jsx(Q,{singleton:!0})})]})}),e.jsx(S,{children:e.jsx(j,{asChild:!0,children:e.jsxs(k,{to:"/admin/dashboard/files",children:[e.jsx(Ye,{}),e.jsx("span",{children:"Files"})]})})}),e.jsx(S,{children:e.jsxs(j,{disabled:!0,children:[e.jsx(Xe,{}),e.jsx("span",{children:"Components"})]})})]})})]})}),e.jsxs(Ut,{children:[e.jsx(U,{children:"Actions"}),e.jsx(q,{children:e.jsxs(W,{children:[w?.role==="developer"&&e.jsxs(e.Fragment,{children:[e.jsx(S,{children:e.jsxs(j,{className:"cursor-pointer",onClick:()=>u(),children:[x?e.jsx(E,{className:"animate-spin"}):e.jsx(Fe,{}),e.jsx("span",{children:"Pull from repo"})]})}),e.jsx(S,{children:e.jsxs(j,{className:"cursor-pointer",onClick:()=>M({author:w.email}),children:[g?e.jsx(E,{className:"animate-spin"}):e.jsx(Ve,{}),e.jsx("span",{children:"Push to repo"})]})})]}),w&&e.jsx(S,{children:e.jsxs(j,{className:"cursor-pointer",onClick:()=>{p(w.email)},children:[d?e.jsx(E,{className:"animate-spin"}):e.jsx(Ke,{}),e.jsx("span",{children:"Publish"})]})})]})}),e.jsx(qt,{}),e.jsx(j,{asChild:!0,children:e.jsxs(k,{to:m?.previewUrl,children:["Preview",e.jsx(Ue,{className:"ml-auto"})]})}),e.jsx(j,{className:"cursor-pointer",onClick:()=>n(!0),children:"About"}),e.jsxs(j,{className:"cursor-pointer",onClick:()=>t(ye()),children:[e.jsx(nt,{}),"Log out"]}),e.jsxs("div",{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:"text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0 group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",children:["Editorial v","6.19.5"]})]})]})}function sa({children:t}){const a=be(),n=A(i=>i.auth.user),s=A(i=>i.auth.isLoading);return r.useEffect(()=>{!s&&!n&&a("/admin")},[s,a,n]),s||!n?e.jsx(qe,{}):t}function na(){const{pathname:t}=me(),{data:a}=D(),n=t.split("/").filter(s=>!["admin","dashboard"].includes(s)&&s!=="");return a?e.jsx(e.Fragment,{children:n.map((s,i,o)=>e.jsxs(ge.Fragment,{children:[o.length>1&&i>=1&&e.jsx(We,{size:12,className:"text-gray-500 pt-[1px]"}),e.jsxs("p",{className:"text-sm leading-none tracking-tight capitalize text-gray-500 last:text-foreground",children:[i<o.length-1&&a[s]&&a[s].singleton&&(a[s]?a[s].displayName:s),i<o.length-1&&a[s]&&!a[s].singleton&&e.jsx(J,{to:`/admin/dashboard/${s}`,className:({isActive:d,isPending:c})=>c?"pending":d?"active":"",children:a[s]?a[s].displayName:s}),i===o.length-1&&(a[s]?a[s].displayName:s)]},s)]},i))}):null}const Ca=je(function(){return e.jsx(sa,{children:e.jsxs(Ht,{className:"flex h-full",children:[e.jsx(aa,{}),e.jsxs("main",{className:"flex flex-col flex-1 h-full w-0",children:[e.jsx("header",{className:"flex sticky bg-sidebar dark:bg-sidebar z-40 top-0 h-14 shrink-0 items-center gap-2 border-b",children:e.jsxs("div",{className:"flex items-center gap-2 px-3",children:[e.jsx(Vt,{}),e.jsx(de,{orientation:"vertical",className:"h-4"}),e.jsx(na,{})]})}),e.jsx(ve,{})]})]})})});export{Ca as default};
@@ -1 +0,0 @@
1
- import{w as r,p as o}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{F as i}from"./files-Cdeyho5X.js";import"./utils-CCKKso3e.js";import"./index-CZSVchcX.js";import"./index-DLIEpuwL.js";import"./badge-gLcN3Bjg.js";import"./index-CtLWaleL.js";import"./upload-DhJ5wU_H.js";import"./createLucideIcon-BvSqmaUO.js";import"./trash-UKLAaALv.js";import"./x-BVtfHpQX.js";import"./check-DF0ucE8d.js";const h=r(function(){return o.jsx("div",{className:"overflow-auto flex flex-1 p-4 gap-4",children:o.jsx("div",{className:"flex flex-col flex-1 gap-8",children:o.jsx(i,{})})})});export{h as default};
@@ -1 +0,0 @@
1
- import{p as r}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{B as l}from"./index-BhARCKRr.js";import{P as n,a as p,f as c,C as f,b as u,c as x}from"./clear-button-D05R9Y5Y.js";import{b as d}from"./utils-CCKKso3e.js";import{C as j}from"./calendar-Frbsxn98.js";import"./index-CtLWaleL.js";import"./index-DLIEpuwL.js";import"./createLucideIcon-BvSqmaUO.js";import"./chevron-right-BFlMu-RJ.js";import"./x-BVtfHpQX.js";import"./index-B0u0hYGX.js";import"./index-cCny74f5.js";import"./index-B2dzkZu5.js";import"./index-CHzEoQKp.js";function S({id:e,date:t,onDateChange:o,placeholder:s="Pick a date",disabled:i=!1,className:a,allowClear:m=!1}){return r.jsxs(n,{children:[r.jsx(p,{asChild:!0,children:r.jsx(l,{variant:"outline",className:d("w-full justify-start text-left font-normal relative",!t&&"text-muted-foreground",a),disabled:i,children:r.jsxs(r.Fragment,{children:[r.jsx(j,{className:"mr-2 h-4 w-4"}),t?c(t,"PPP"):r.jsx("span",{children:s}),r.jsx(f,{onClear:()=>{o?.(void 0)},visible:m&&!!t})]})})}),r.jsx(u,{className:"w-auto p-0",children:r.jsx(x,{id:e,mode:"single",selected:t,onSelect:o,initialFocus:!0})})]})}export{S as default};
@@ -1 +0,0 @@
1
- import{a,p as s}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{B as C}from"./index-BhARCKRr.js";import{f as c,P as N,a as H,C as S,b as g,c as k}from"./clear-button-D05R9Y5Y.js";import{I as B}from"./input-Bk91TMQj.js";import{b as E}from"./utils-CCKKso3e.js";import{C as w}from"./calendar-Frbsxn98.js";import"./index-CtLWaleL.js";import"./index-DLIEpuwL.js";import"./createLucideIcon-BvSqmaUO.js";import"./chevron-right-BFlMu-RJ.js";import"./x-BVtfHpQX.js";import"./index-B0u0hYGX.js";import"./index-cCny74f5.js";import"./index-B2dzkZu5.js";import"./index-CHzEoQKp.js";function Q({id:d,date:t,onDateTimeChange:r,placeholder:x="Pick a date and time",disabled:u=!1,className:j,allowClear:v=!1}){const[e,i]=a.useState(t),[m,p]=a.useState(t?c(t,"HH:mm"):"12:00");a.useEffect(()=>{i(t),t&&p(c(t,"HH:mm"))},[t]);const h=a.useCallback(o=>{const l=o.target.value;if(p(l),!e)return;const[n,b]=l.split(":").map(Number),f=new Date(e);f.setHours(n,b,0,0),r?.(f)},[e,r]),P=a.useCallback(o=>{if(!o){i(void 0),r?.(void 0);return}const[l,n]=m.split(":").map(Number);o.setHours(l,n,0,0),i(o),r?.(o)},[m,r]);return s.jsxs("div",{className:"flex gap-2",children:[s.jsxs(N,{children:[s.jsx(H,{asChild:!0,children:s.jsx(C,{variant:"outline",className:E("flex-1 justify-start text-left font-normal relative",!e&&"text-muted-foreground",j),disabled:u,children:s.jsxs(s.Fragment,{children:[s.jsx(w,{className:"mr-2 h-4 w-4"}),e?c(e,"PPP"):s.jsx("span",{children:x}),s.jsx(S,{onClear:()=>{i(void 0),r?.(void 0)},visible:v&&!!t})]})})}),s.jsx(g,{className:"w-auto p-0",children:s.jsx(k,{id:d,mode:"single",selected:e,onSelect:P,initialFocus:!0})})]}),s.jsx(B,{type:"time",value:m,onChange:h,disabled:u||!e,className:"w-32"})]})}export{Q as default};
@@ -1 +0,0 @@
1
- import{a as f,p as e,x as q}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{D as Z,E as G,F as B,G as K,u as Q,x as S,b as W,H as O}from"./utils-CCKKso3e.js";import{t as n}from"./index-CZSVchcX.js";import{B as X}from"./badge-gLcN3Bjg.js";import{U as T}from"./upload-DhJ5wU_H.js";import{c as v}from"./createLucideIcon-BvSqmaUO.js";import{F as J,T as Y}from"./trash-UKLAaALv.js";import{C as A,X as U}from"./x-BVtfHpQX.js";import{C as H}from"./check-DF0ucE8d.js";const ee=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],te=v("copy",ee);const se=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],ae=v("file-text",se);const re=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]],le=v("file",re);const oe=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],ie=v("folder-open",oe);const ne=[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],R=v("folder-plus",ne);const ce=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],_=v("folder",ce),de=["txt","md","html","pdf"],pe=["svg","webp","png","jpeg","jpg"],me=[{Icon:J,test:t=>pe.some(l=>t.name.endsWith(l))},{Icon:ae,test:t=>de.some(l=>t.name.endsWith(l))}],ue={Icon:le};function I(t){return!(!t.trim()||t==="."||t===".."||t.includes("/")||t.includes("\\"))}function fe({visible:t,onConfirm:l,onCancel:h,disabled:d}){const[c,m]=f.useState("");return f.useEffect(()=>{t&&m("")},[t]),t?e.jsxs("div",{className:"flex items-center gap-2 h-10 p-2 border-b",onClick:i=>i.stopPropagation(),children:[e.jsx("div",{className:"w-4"}),e.jsxs("div",{className:"flex flex-grow w-24 items-center gap-2 ml-2",children:[e.jsx(_,{size:16,className:"text-yellow-500"}),e.jsx("input",{autoFocus:!0,value:c,onChange:i=>m(i.target.value),onKeyDown:i=>{i.key==="Enter"&&l(c),i.key==="Escape"&&h()},placeholder:"New folder name",className:"h-8 flex-1 rounded-md border px-2 text-sm",disabled:d})]}),e.jsx("div",{className:"flex w-24 justify-end gap-2",children:e.jsx("span",{className:"text-sm text-gray-500",children:"--"})}),e.jsxs("div",{className:"flex items-center gap-1 ml-4",children:[e.jsx("button",{className:"p-1 hover:bg-muted rounded-sm disabled:opacity-50",title:"Create",onClick:()=>l(c),disabled:d||!c.trim(),children:e.jsx(H,{size:16})}),e.jsx("button",{className:"p-1 hover:bg-muted rounded-sm",title:"Cancel",onClick:h,disabled:d,children:e.jsx(U,{size:16})})]})]}):null}const V=({node:t,level:l=0,onDelete:h,onChange:d,disableActions:c,onUpload:m,createTarget:i,onStartCreateInDirectory:N,onConfirmCreateInDirectory:y,onCancelCreate:p,deleteTarget:b,onStartDelete:g,onCancelDelete:C,onConfirmDelete:D,isDeleting:w})=>{const[x,z]=f.useState(!1),[k,F]=f.useState(""),{data:P}=Q(),L=me.find(s=>s.test(t))??ue,o=t.type==="directory",M=o||d?"div":q,a=i?.kind==="directory"&&o&&i.path===t.relativePath,r=b===t.relativePath;f.useEffect(()=>{a&&F("")},[a]);const u=()=>{o&&z(!x)},$=s=>{const j=s.target.files;j&&m&&m(t.relativePath,j)},E=()=>{y(t.relativePath,k)};return e.jsxs("div",{className:"select-none",children:[e.jsxs(M,{to:`/${t.relativePath}`,target:"_blank",className:S("flex items-center gap-2 h-10 p-2 group hover:bg-muted/50 cursor-pointer",r&&"bg-red-50 hover:bg-red-50"),style:{paddingLeft:`calc(0.5rem + ${l*20}px)`},onClick:o?u:d?()=>d(t.isLarge?`${P?.largeFilesUrl}/${t.relativePath}`:t.relativePath):void 0,children:[o?e.jsx(A,{size:16,className:W("transition-transform",{"rotate-180":x})}):e.jsx("div",{className:"w-4"}),e.jsxs("div",{className:"flex flex-grow w-24 items-center gap-2 ml-2",children:[o?x?e.jsx(ie,{size:16,className:"text-yellow-500"}):e.jsx(_,{size:16,className:"text-yellow-500"}):e.jsx(L.Icon,{size:16,className:" text-gray-500"}),e.jsxs("span",{className:"flex gap-2 items-center text-sm whitespace-nowrap text-ellipsis overflow-hidden w-full",children:[!o&&t.isLarge&&e.jsx(X,{variant:"outline",children:"Large"}),t.name]})]}),e.jsx("div",{className:"flex w-24 justify-end gap-2",children:e.jsx("span",{className:"text-sm text-gray-500",children:o?"--":O(t.size)})}),!c&&e.jsxs("div",{className:"flex items-center gap-1 ml-4 group-hover:visible invisible z-50",children:[o&&e.jsxs(e.Fragment,{children:[e.jsx("input",{type:"file",multiple:!0,onChange:$,className:"hidden",id:`dir-upload-${t.relativePath}-${l}`}),e.jsxs("label",{htmlFor:`dir-upload-${t.relativePath}-${l}`,className:"hover:text-blue-500 p-1 hover:bg-muted rounded-sm cursor-pointer",onClick:s=>s.stopPropagation(),children:[e.jsx(T,{size:16}),e.jsx("span",{className:"sr-only",children:"Upload files to this folder"})]}),e.jsxs("button",{className:"hover:text-blue-500 p-1 hover:bg-muted rounded-sm cursor-pointer",onClick:s=>{s.preventDefault(),s.stopPropagation(),z(!0),N(t.relativePath)},title:"Create Folder",children:[e.jsx(R,{size:16}),e.jsx("span",{className:"sr-only",children:"Create folder in this directory"})]})]}),e.jsxs("button",{className:S("hover:text-yellow-500 p-1 hover:bg-muted rounded-sm cursor-pointer",o&&"hidden"),onClick:async s=>{s.preventDefault(),s.stopPropagation();try{await navigator.clipboard.writeText(t.path),n.success("File URL copied to clipboard",{duration:2e3})}catch(j){console.error("Copy failed:",j),n.error("Failed to copy to clipboard",{duration:2e3})}},title:"Copy file URL",children:[e.jsx(te,{size:16}),e.jsx("span",{className:"sr-only",children:"Copy file URL"})]}),r?e.jsxs("div",{className:"flex items-center gap-1",onClick:s=>s.stopPropagation(),children:[e.jsxs("button",{className:"p-1 hover:bg-muted rounded-sm disabled:opacity-50 text-red-600 cursor-pointer",title:"Confirm delete",onClick:s=>{s.preventDefault(),s.stopPropagation(),D(t.relativePath)},disabled:w,children:[e.jsx(H,{size:16}),e.jsx("span",{className:"sr-only",children:"Confirm delete"})]}),e.jsxs("button",{className:"p-1 hover:bg-muted rounded-sm disabled:opacity-50 cursor-pointer",title:"Cancel",onClick:s=>{s.preventDefault(),s.stopPropagation(),C()},disabled:w,children:[e.jsx(U,{size:16}),e.jsx("span",{className:"sr-only",children:"Cancel delete"})]})]}):e.jsxs("button",{className:"hover:text-red-500 p-1 hover:bg-muted rounded-sm cursor-pointer",onClick:s=>{s.preventDefault(),s.stopPropagation(),g(t.relativePath)},title:`Delete this ${o?"folder":"file"}`,children:[e.jsx(Y,{size:16}),e.jsxs("span",{className:"sr-only",children:["Delete this ",o?"folder":"file"]})]})]})]}),o&&x&&e.jsxs("div",{children:[!c&&a&&e.jsxs("div",{className:"flex items-center gap-2 h-10 p-2",style:{paddingLeft:`calc(0.5rem + ${(l+1)*20}px)`},onClick:s=>s.stopPropagation(),children:[e.jsx("div",{className:"w-4"}),e.jsx(_,{size:16,className:"text-yellow-500"}),e.jsx("input",{autoFocus:!0,value:k,onChange:s=>F(s.target.value),onKeyDown:s=>{s.key==="Enter"&&E(),s.key==="Escape"&&p()},placeholder:"New folder name",className:"h-8 flex-1 rounded-md border px-2 text-sm"}),e.jsx("button",{className:"p-1 hover:bg-muted rounded-sm disabled:opacity-50",title:"Create",onClick:E,disabled:!k.trim(),children:e.jsx(H,{size:16})}),e.jsx("button",{className:"p-1 hover:bg-muted rounded-sm",title:"Cancel",onClick:p,children:e.jsx(U,{size:16})})]}),t.children?.map((s,j)=>e.jsx(V,{node:s,level:l+1,onDelete:h,onChange:d,disableActions:c,onUpload:m,createTarget:i,onStartCreateInDirectory:N,onConfirmCreateInDirectory:y,onCancelCreate:p,deleteTarget:b,onStartDelete:g,onCancelDelete:C,onConfirmDelete:D,isDeleting:w},`${s.name}-${j}`))]})]})};function we({disableActions:t,onChange:l}){const{data:h}=Z(),[d,c]=G(),[m]=B(),[i,N]=K(),[y,p]=f.useState(null),[b,g]=f.useState(null),C=async({files:a,path:r})=>{try{await m({files:a,path:r}).unwrap(),n.success("Files uploaded",{duration:2e3})}catch(u){console.error("Upload failed:",u),n.error("Upload failed",{duration:2e3})}},D=async a=>{const r=a.target.files;r&&await C({files:r})},w=async(a,r)=>{await C({files:r,path:a})},x=()=>p(null),z=async a=>{const r=a.trim();if(!I(r)){n.error("Invalid folder name",{duration:2e3});return}try{await i({name:r,path:""}).unwrap(),n.success("Folder created",{duration:2e3}),p(null)}catch(u){console.error("Create folder failed:",u),n.error("Create folder failed",{duration:2e3})}},k=async(a,r)=>{const u=r.trim();if(!I(u)){n.error("Invalid folder name",{duration:2e3});return}try{await i({name:u,path:a}).unwrap(),n.success("Folder created",{duration:2e3}),p(null)}catch($){console.error("Create folder failed:",$),n.error("Create folder failed",{duration:2e3})}},F=async a=>{try{await d(a).unwrap(),n.success("Moved to deleted",{duration:2e3})}catch(r){console.error("Delete failed:",r),n.error("Delete failed",{duration:2e3})}},P=a=>{g(a)},L=()=>{g(null)},o=async a=>{await F(a),g(null)},M=f.useMemo(()=>h?.toSorted((a,r)=>a.type==="directory"&&r.type!=="directory"?-1:a.type!=="directory"&&r.type==="directory"?1:a.name.localeCompare(r.name)).map(a=>e.jsx(V,{node:a,onDelete:F,onChange:l,disableActions:t,onUpload:w,createTarget:y,onStartCreateInDirectory:r=>p({kind:"directory",path:r}),onConfirmCreateInDirectory:k,onCancelCreate:x,deleteTarget:b,onStartDelete:P,onCancelDelete:L,onConfirmDelete:o,isDeleting:c.isLoading},a.name)),[h,t,l,y,b,c.isLoading]);return e.jsxs("div",{className:"overflow-auto h-full max-w-[800px] rounded-xl border",children:[e.jsxs("div",{className:"sticky top-0 bg-white flex items-center gap-2 py-1 px-2 border-b group",children:[e.jsx("div",{className:"w-4"}),e.jsx("div",{className:"flex flex-grow items-center gap-2 ml-2",children:e.jsx("span",{className:"text-sm font-semibold",children:"Name"})}),e.jsx("div",{className:"flex w-24 items-center gap-2 ml-2",children:e.jsx("span",{className:"text-sm font-semibold",children:"Size"})}),!t&&e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("input",{type:"file",multiple:!0,onChange:D,className:"hidden",id:"file-upload"}),e.jsxs("label",{htmlFor:"file-upload",className:"hover:text-blue-500 p-1 hover:bg-muted rounded-sm cursor-pointer",title:"Upload File",children:[e.jsx(T,{size:16}),e.jsx("span",{className:"sr-only",children:"Upload files"})]}),e.jsxs("button",{onClick:()=>p({kind:"root"}),className:"hover:text-blue-500 p-1 hover:bg-muted rounded-sm cursor-pointer",title:"Create Folder",disabled:N.isLoading,children:[e.jsx(R,{size:16}),e.jsx("span",{className:"sr-only",children:"Create folder"})]})]})]}),!t&&e.jsx(fe,{visible:y?.kind==="root",disabled:N.isLoading,onConfirm:z,onCancel:x}),M]})}export{we as F,le as a};
@@ -1 +0,0 @@
1
- import{a as u,p as e,w as j,v as g}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{S as b,L as N}from"./Loading-MKgXMPvl.js";import{B as w}from"./index-BhARCKRr.js";import{u as F,a as L,F as v,b as t,c as n,d,e as i,f as m,C as y}from"./zod-BFfp0fV9.js";import{I as x}from"./input-Bk91TMQj.js";import{u as C,c,l as S}from"./authSlice-BI_rlf3v.js";import{o as E,s as p,b as k}from"./schemas-CPJfa6mm.js";import"./utils-CCKKso3e.js";import"./loader-circle-BDUbeTTe.js";import"./createLucideIcon-BvSqmaUO.js";import"./index-CtLWaleL.js";import"./index-DLIEpuwL.js";import"./index-CHzEoQKp.js";import"./check-DF0ucE8d.js";const P=E({email:p().nonempty("Please enter your email").email(),password:p().nonempty("Please enter your password"),remember:k()});function A(){"use no memo";const o=C(),r=c(s=>s.auth.isLoading),a=F({resolver:L(P),disabled:r,defaultValues:{email:"",password:"",remember:!1}}),l=u.useCallback(({email:s,password:h,remember:f})=>{o(S({email:s,password:h,remember:f}))},[o]);return e.jsx("div",{className:"flex flex-col",children:e.jsx(v,{...a,children:e.jsxs("form",{onSubmit:a.handleSubmit(l),className:"space-y-4",children:[e.jsx(t,{control:a.control,name:"email",rules:{required:!0},render:({field:s})=>e.jsxs(n,{children:[e.jsx(d,{className:"flex gap-1 items-baseline",children:"Email"}),e.jsx(i,{children:e.jsx(x,{placeholder:"callasmaria@example.com",...s,autoComplete:"email"})}),e.jsx(m,{})]})}),e.jsx(t,{name:"password",control:a.control,rules:{required:!0},render:({field:s})=>e.jsxs(n,{children:[e.jsx(d,{className:"flex gap-1 items-baseline",children:"Password"}),e.jsx(i,{children:e.jsx(x,{type:"password",...s,autoComplete:"current-password"})}),e.jsx(m,{})]})}),e.jsx(t,{name:"remember",control:a.control,render:({field:s})=>e.jsxs(n,{children:[e.jsx(i,{children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(y,{id:"remember",checked:s.value,onCheckedChange:s.onChange}),e.jsx("label",{htmlFor:"remember",className:"text-sm leading-none",children:"Remember me"})]})}),e.jsx(m,{})]})}),e.jsx(w,{type:"submit",disabled:!a.formState.isValid||r,className:"w-full",children:r?e.jsx(b,{className:"absolute"}):"Login"})]})})})}const Q=j(function(){const r=g(),a=c(s=>s.auth.user),l=c(s=>s.auth.isLoading);return u.useEffect(()=>{a&&r("/admin/dashboard")},[r,a]),l||a?e.jsx(N,{message:"Logging in..."}):e.jsx("div",{className:"flex w-full h-full",children:e.jsxs("div",{className:"self-center space-y-8 w-72 mx-auto",children:[e.jsxs("div",{className:"flex flex-col space-y-2 text-center",children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-tight leading-none",children:"Editorial Admin"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Enter your details below to login"})]}),e.jsx(A,{})]})})});export{Q as default};
@@ -1 +0,0 @@
1
- import{a as c,p}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{u as G,c as H,P as A,a as P,b as O,e as K}from"./index-BhARCKRr.js";import{u as _}from"./index-CtLWaleL.js";import{u as $,b as U,h as V,e as W,d as Z,F as q,f as z}from"./index-cCny74f5.js";import{c as E,R as B,A as w,a as J,C as Q}from"./index-B2dzkZu5.js";var x="Popover",[b]=H(x,[E]),g=E(),[X,u]=b(x),j=e=>{const{__scopePopover:n,children:t,open:s,defaultOpen:o,onOpenChange:r,modal:a=!1}=e,i=g(n),f=c.useRef(null),[v,h]=c.useState(!1),[C,l]=G({prop:s,defaultProp:o??!1,onChange:r,caller:x});return p.jsx(B,{...i,children:p.jsx(X,{scope:n,contentId:$(),triggerRef:f,open:C,onOpenChange:l,onOpenToggle:c.useCallback(()=>l(m=>!m),[l]),hasCustomAnchor:v,onCustomAnchorAdd:c.useCallback(()=>h(!0),[]),onCustomAnchorRemove:c.useCallback(()=>h(!1),[]),modal:a,children:t})})};j.displayName=x;var F="PopoverAnchor",N=c.forwardRef((e,n)=>{const{__scopePopover:t,...s}=e,o=u(F,t),r=g(t),{onCustomAnchorAdd:a,onCustomAnchorRemove:i}=o;return c.useEffect(()=>(a(),()=>i()),[a,i]),p.jsx(w,{...r,...s,ref:n})});N.displayName=F;var S="PopoverTrigger",y=c.forwardRef((e,n)=>{const{__scopePopover:t,...s}=e,o=u(S,t),r=g(t),a=_(n,o.triggerRef),i=p.jsx(A.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":L(o.open),...s,ref:a,onClick:P(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:p.jsx(w,{asChild:!0,...r,children:i})});y.displayName=S;var R="PopoverPortal",[Y,ee]=b(R,{forceMount:void 0}),D=e=>{const{__scopePopover:n,forceMount:t,children:s,container:o}=e,r=u(R,n);return p.jsx(Y,{scope:n,forceMount:t,children:p.jsx(O,{present:t||r.open,children:p.jsx(U,{asChild:!0,container:o,children:s})})})};D.displayName=R;var d="PopoverContent",M=c.forwardRef((e,n)=>{const t=ee(d,e.__scopePopover),{forceMount:s=t.forceMount,...o}=e,r=u(d,e.__scopePopover);return p.jsx(O,{present:s||r.open,children:r.modal?p.jsx(re,{...o,ref:n}):p.jsx(te,{...o,ref:n})})});M.displayName=d;var oe=K("PopoverContent.RemoveScroll"),re=c.forwardRef((e,n)=>{const t=u(d,e.__scopePopover),s=c.useRef(null),o=_(n,s),r=c.useRef(!1);return c.useEffect(()=>{const a=s.current;if(a)return V(a)},[]),p.jsx(W,{as:oe,allowPinchZoom:!0,children:p.jsx(T,{...e,ref:o,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:P(e.onCloseAutoFocus,a=>{a.preventDefault(),r.current||t.triggerRef.current?.focus()}),onPointerDownOutside:P(e.onPointerDownOutside,a=>{const i=a.detail.originalEvent,f=i.button===0&&i.ctrlKey===!0,v=i.button===2||f;r.current=v},{checkForDefaultPrevented:!1}),onFocusOutside:P(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),te=c.forwardRef((e,n)=>{const t=u(d,e.__scopePopover),s=c.useRef(!1),o=c.useRef(!1);return p.jsx(T,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:r=>{e.onCloseAutoFocus?.(r),r.defaultPrevented||(s.current||t.triggerRef.current?.focus(),r.preventDefault()),s.current=!1,o.current=!1},onInteractOutside:r=>{e.onInteractOutside?.(r),r.defaultPrevented||(s.current=!0,r.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=r.target;t.triggerRef.current?.contains(a)&&r.preventDefault(),r.detail.originalEvent.type==="focusin"&&o.current&&r.preventDefault()}})}),T=c.forwardRef((e,n)=>{const{__scopePopover:t,trapFocus:s,onOpenAutoFocus:o,onCloseAutoFocus:r,disableOutsidePointerEvents:a,onEscapeKeyDown:i,onPointerDownOutside:f,onFocusOutside:v,onInteractOutside:h,...C}=e,l=u(d,t),m=g(t);return Z(),p.jsx(q,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:o,onUnmountAutoFocus:r,children:p.jsx(z,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:h,onEscapeKeyDown:i,onPointerDownOutside:f,onFocusOutside:v,onDismiss:()=>l.onOpenChange(!1),children:p.jsx(Q,{"data-state":L(l.open),role:"dialog",id:l.contentId,...m,...C,ref:n,style:{...C.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)"}})})})}),k="PopoverClose",ne=c.forwardRef((e,n)=>{const{__scopePopover:t,...s}=e,o=u(k,t);return p.jsx(A.button,{type:"button",...s,ref:n,onClick:P(e.onClick,()=>o.onOpenChange(!1))})});ne.displayName=k;var se="PopoverArrow",I=c.forwardRef((e,n)=>{const{__scopePopover:t,...s}=e,o=g(t);return p.jsx(J,{...o,...s,ref:n})});I.displayName=se;function L(e){return e?"open":"closed"}var le=j,de=N,fe=y,ve=D,Pe=M,ge=I;export{de as A,Pe as C,ve as P,le as R,fe as T,ge as a};