@isardsat/editorial-admin 6.0.0-canary-001

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 (32) hide show
  1. package/LICENSE +21 -0
  2. package/build/client/assets/authSlice-KDhecIDl.js +2734 -0
  3. package/build/client/assets/button-O0EDocjF.js +1 -0
  4. package/build/client/assets/chevron-down-BMtosYlL.js +6 -0
  5. package/build/client/assets/chunk-KNED5TY2-CXj9yqcQ.js +51 -0
  6. package/build/client/assets/createLucideIcon-TQsNVzYU.js +21 -0
  7. package/build/client/assets/dashboard-Binq3-uL.js +1 -0
  8. package/build/client/assets/dashboard._collection-DCypgAsP.js +16 -0
  9. package/build/client/assets/dashboard._collection._document-B9dEIw39.js +1 -0
  10. package/build/client/assets/dashboard._collection.new-QbdwRouF.js +1 -0
  11. package/build/client/assets/dashboard._layout-DYXkFYBf.js +66 -0
  12. package/build/client/assets/dashboard.files-DVCxRHOl.js +36 -0
  13. package/build/client/assets/editorialApi-DCnC5eM9.js +1 -0
  14. package/build/client/assets/entry.client-B5Ca3clj.js +34 -0
  15. package/build/client/assets/home-wnsWYgD_.js +11 -0
  16. package/build/client/assets/index-B7e3fQ32.js +9 -0
  17. package/build/client/assets/index-B_FOxFgA.js +1 -0
  18. package/build/client/assets/index-C-iH5ItK.js +45 -0
  19. package/build/client/assets/index-DrhM6FV9.js +22 -0
  20. package/build/client/assets/index-G-cqIhgh.js +9 -0
  21. package/build/client/assets/input-BH49oaMa.js +6 -0
  22. package/build/client/assets/itemForm-CDbHkFXh.css +1 -0
  23. package/build/client/assets/itemForm-dtoqbEoC.js +90 -0
  24. package/build/client/assets/manifest-a0c3ecb0.js +1 -0
  25. package/build/client/assets/root-DHDQPxhg.js +1 -0
  26. package/build/client/assets/root-DS7N36v7.css +1 -0
  27. package/build/client/assets/trash-B3lfbu-5.js +6 -0
  28. package/build/client/assets/tslib.es6-CDuPK5Eb.js +1 -0
  29. package/build/client/assets/utils-DslUJpbf.js +1 -0
  30. package/build/client/favicon.ico +0 -0
  31. package/build/client/index.html +13 -0
  32. package/package.json +101 -0
@@ -0,0 +1,45 @@
1
+ import{r as c,x as hr,l as C}from"./chunk-KNED5TY2-CXj9yqcQ.js";import{d as Ne,e as ue,P as W,a as I,g as mr,u as Qt,c as at,b as ye,h as vr,f as gr}from"./index-B_FOxFgA.js";import{u as G,a as yr,b as wr}from"./button-O0EDocjF.js";import{a as J,_ as Jt,b as xr}from"./tslib.es6-CDuPK5Eb.js";import{R as br,r as Er}from"./index-B7e3fQ32.js";var Cr=hr[" useId ".trim().toString()]||(()=>{}),Rr=0;function Te(e){const[t,n]=c.useState(Cr());return Ne(()=>{n(r=>r??String(Rr++))},[e]),e||(t?`radix-${t}`:"")}function Ar(e,t=globalThis==null?void 0:globalThis.document){const n=ue(e);c.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Pr="DismissableLayer",et="dismissableLayer.update",Sr="dismissableLayer.pointerDownOutside",Tr="dismissableLayer.focusOutside",Nt,en=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ct=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:a,...l}=e,u=c.useContext(en),[f,p]=c.useState(null),m=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=c.useState({}),g=G(t,R=>p(R)),d=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=d.indexOf(v),w=f?d.indexOf(f):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,x=w>=y,E=Lr(R=>{const S=R.target,D=[...u.branches].some(T=>T.contains(S));!x||D||(o==null||o(R),s==null||s(R),R.defaultPrevented||a==null||a())},m),A=Nr(R=>{const S=R.target;[...u.branches].some(T=>T.contains(S))||(i==null||i(R),s==null||s(R),R.defaultPrevented||a==null||a())},m);return Ar(R=>{w===u.layers.size-1&&(r==null||r(R),!R.defaultPrevented&&a&&(R.preventDefault(),a()))},m),c.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Nt=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Mt(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=Nt)}},[f,m,n,u]),c.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Mt())},[f,u]),c.useEffect(()=>{const R=()=>h({});return document.addEventListener(et,R),()=>document.removeEventListener(et,R)},[]),C.jsx(W.div,{...l,ref:g,style:{pointerEvents:b?x?"auto":"none":void 0,...e.style},onFocusCapture:I(e.onFocusCapture,A.onFocusCapture),onBlurCapture:I(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:I(e.onPointerDownCapture,E.onPointerDownCapture)})});ct.displayName=Pr;var Or="DismissableLayerBranch",Dr=c.forwardRef((e,t)=>{const n=c.useContext(en),r=c.useRef(null),o=G(t,r);return c.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),C.jsx(W.div,{...e,ref:o})});Dr.displayName=Or;function Lr(e,t=globalThis==null?void 0:globalThis.document){const n=ue(e),r=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let l=function(){tn(Sr,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Nr(e,t=globalThis==null?void 0:globalThis.document){const n=ue(e),r=c.useRef(!1);return c.useEffect(()=>{const o=i=>{i.target&&!r.current&&tn(Tr,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Mt(){const e=new CustomEvent(et);document.dispatchEvent(e)}function tn(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?mr(o,i):o.dispatchEvent(i)}var Ue="focusScope.autoFocusOnMount",ze="focusScope.autoFocusOnUnmount",kt={bubbles:!1,cancelable:!0},Mr="FocusScope",nn=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[a,l]=c.useState(null),u=ue(o),f=ue(i),p=c.useRef(null),m=G(t,d=>l(d)),h=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(r){let d=function(b){if(h.paused||!a)return;const x=b.target;a.contains(x)?p.current=x:Q(p.current,{select:!0})},v=function(b){if(h.paused||!a)return;const x=b.relatedTarget;x!==null&&(a.contains(x)||Q(p.current,{select:!0}))},y=function(b){if(document.activeElement===document.body)for(const E of b)E.removedNodes.length>0&&Q(a)};document.addEventListener("focusin",d),document.addEventListener("focusout",v);const w=new MutationObserver(y);return a&&w.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",d),document.removeEventListener("focusout",v),w.disconnect()}}},[r,a,h.paused]),c.useEffect(()=>{if(a){Ft.add(h);const d=document.activeElement;if(!a.contains(d)){const y=new CustomEvent(Ue,kt);a.addEventListener(Ue,u),a.dispatchEvent(y),y.defaultPrevented||(kr(jr(rn(a)),{select:!0}),document.activeElement===d&&Q(a))}return()=>{a.removeEventListener(Ue,u),setTimeout(()=>{const y=new CustomEvent(ze,kt);a.addEventListener(ze,f),a.dispatchEvent(y),y.defaultPrevented||Q(d??document.body,{select:!0}),a.removeEventListener(ze,f),Ft.remove(h)},0)}}},[a,u,f,h]);const g=c.useCallback(d=>{if(!n&&!r||h.paused)return;const v=d.key==="Tab"&&!d.altKey&&!d.ctrlKey&&!d.metaKey,y=document.activeElement;if(v&&y){const w=d.currentTarget,[b,x]=_r(w);b&&x?!d.shiftKey&&y===x?(d.preventDefault(),n&&Q(b,{select:!0})):d.shiftKey&&y===b&&(d.preventDefault(),n&&Q(x,{select:!0})):y===w&&d.preventDefault()}},[n,r,h.paused]);return C.jsx(W.div,{tabIndex:-1,...s,ref:m,onKeyDown:g})});nn.displayName=Mr;function kr(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Q(r,{select:t}),document.activeElement!==n)return}function _r(e){const t=rn(e),n=_t(t,e),r=_t(t.reverse(),e);return[n,r]}function rn(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function _t(e,t){for(const n of e)if(!Fr(n,{upTo:t}))return n}function Fr(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Ir(e){return e instanceof HTMLInputElement&&"select"in e}function Q(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Ir(e)&&t&&e.select()}}var Ft=Wr();function Wr(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=It(e,t),e.unshift(t)},remove(t){var n;e=It(e,t),(n=e[0])==null||n.resume()}}}function It(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function jr(e){return e.filter(t=>t.tagName!=="A")}var Br="Portal",lt=c.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,i]=c.useState(!1);Ne(()=>i(!0),[]);const s=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return s?br.createPortal(C.jsx(W.div,{...r,ref:t}),s):null});lt.displayName=Br;var Xe=0;function Hr(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Wt()),document.body.insertAdjacentElement("beforeend",e[1]??Wt()),Xe++,()=>{Xe===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Xe--}},[])}function Wt(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Oe="right-scroll-bar-position",De="width-before-scroll-bar",$r="with-scroll-bars-hidden",Vr="--removed-body-scroll-bar-size";function Ge(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Yr(e,t){var n=c.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Ur=typeof window<"u"?c.useLayoutEffect:c.useEffect,jt=new WeakMap;function zr(e,t){var n=Yr(null,function(r){return e.forEach(function(o){return Ge(o,r)})});return Ur(function(){var r=jt.get(n);if(r){var o=new Set(r),i=new Set(e),s=n.current;o.forEach(function(a){i.has(a)||Ge(a,null)}),i.forEach(function(a){o.has(a)||Ge(a,s)})}jt.set(n,e)},[e]),n}function Xr(e){return e}function Gr(e,t){t===void 0&&(t=Xr);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var s=t(i,r);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(i){for(r=!0;n.length;){var s=n;n=[],s.forEach(i)}n={push:function(a){return i(a)},filter:function(){return n}}},assignMedium:function(i){r=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(i),s=n}var l=function(){var f=s;s=[],f.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(f){s.push(f),u()},filter:function(f){return s=s.filter(f),n}}}};return o}function Kr(e){e===void 0&&(e={});var t=Gr(null);return t.options=J({async:!0,ssr:!1},e),t}var on=function(e){var t=e.sideCar,n=Jt(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return c.createElement(r,J({},n))};on.isSideCarExport=!0;function qr(e,t){return e.useMedium(t),on}var sn=Kr(),Ke=function(){},We=c.forwardRef(function(e,t){var n=c.useRef(null),r=c.useState({onScrollCapture:Ke,onWheelCapture:Ke,onTouchMoveCapture:Ke}),o=r[0],i=r[1],s=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,f=e.enabled,p=e.shards,m=e.sideCar,h=e.noIsolation,g=e.inert,d=e.allowPinchZoom,v=e.as,y=v===void 0?"div":v,w=e.gapMode,b=Jt(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=m,E=zr([n,t]),A=J(J({},b),o);return c.createElement(c.Fragment,null,f&&c.createElement(x,{sideCar:sn,removeScrollBar:u,shards:p,noIsolation:h,inert:g,setCallbacks:i,allowPinchZoom:!!d,lockRef:n,gapMode:w}),s?c.cloneElement(c.Children.only(a),J(J({},A),{ref:E})):c.createElement(y,J({},A,{className:l,ref:E}),a))});We.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};We.classNames={fullWidth:De,zeroRight:Oe};var Zr=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Qr(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Zr();return t&&e.setAttribute("nonce",t),e}function Jr(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function eo(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var to=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Qr())&&(Jr(t,n),eo(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},no=function(){var e=to();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},an=function(){var e=no(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},ro={left:0,top:0,right:0,gap:0},qe=function(e){return parseInt(e||"",10)||0},oo=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[qe(n),qe(r),qe(o)]},io=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return ro;var t=oo(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},so=an(),ce="data-scroll-locked",ao=function(e,t,n,r){var o=e.left,i=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),`
2
+ .`.concat($r,` {
3
+ overflow: hidden `).concat(r,`;
4
+ padding-right: `).concat(a,"px ").concat(r,`;
5
+ }
6
+ body[`).concat(ce,`] {
7
+ overflow: hidden `).concat(r,`;
8
+ overscroll-behavior: contain;
9
+ `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
10
+ padding-left: `.concat(o,`px;
11
+ padding-top: `).concat(i,`px;
12
+ padding-right: `).concat(s,`px;
13
+ margin-left:0;
14
+ margin-top:0;
15
+ margin-right: `).concat(a,"px ").concat(r,`;
16
+ `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
17
+ }
18
+
19
+ .`).concat(Oe,` {
20
+ right: `).concat(a,"px ").concat(r,`;
21
+ }
22
+
23
+ .`).concat(De,` {
24
+ margin-right: `).concat(a,"px ").concat(r,`;
25
+ }
26
+
27
+ .`).concat(Oe," .").concat(Oe,` {
28
+ right: 0 `).concat(r,`;
29
+ }
30
+
31
+ .`).concat(De," .").concat(De,` {
32
+ margin-right: 0 `).concat(r,`;
33
+ }
34
+
35
+ body[`).concat(ce,`] {
36
+ `).concat(Vr,": ").concat(a,`px;
37
+ }
38
+ `)},Bt=function(){var e=parseInt(document.body.getAttribute(ce)||"0",10);return isFinite(e)?e:0},co=function(){c.useEffect(function(){return document.body.setAttribute(ce,(Bt()+1).toString()),function(){var e=Bt()-1;e<=0?document.body.removeAttribute(ce):document.body.setAttribute(ce,e.toString())}},[])},lo=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;co();var i=c.useMemo(function(){return io(o)},[o]);return c.createElement(so,{styles:ao(i,!t,o,n?"":"!important")})},tt=!1;if(typeof window<"u")try{var Ce=Object.defineProperty({},"passive",{get:function(){return tt=!0,!0}});window.addEventListener("test",Ce,Ce),window.removeEventListener("test",Ce,Ce)}catch{tt=!1}var ie=tt?{passive:!1}:!1,uo=function(e){return e.tagName==="TEXTAREA"},cn=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!uo(e)&&n[t]==="visible")},fo=function(e){return cn(e,"overflowY")},po=function(e){return cn(e,"overflowX")},Ht=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=ln(e,r);if(o){var i=un(e,r),s=i[1],a=i[2];if(s>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},ho=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},mo=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},ln=function(e,t){return e==="v"?fo(t):po(t)},un=function(e,t){return e==="v"?ho(t):mo(t)},vo=function(e,t){return e==="h"&&t==="rtl"?-1:1},go=function(e,t,n,r,o){var i=vo(e,window.getComputedStyle(t).direction),s=i*r,a=n.target,l=t.contains(a),u=!1,f=s>0,p=0,m=0;do{var h=un(e,a),g=h[0],d=h[1],v=h[2],y=d-v-i*g;(g||y)&&ln(e,a)&&(p+=y,m+=g),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(f&&Math.abs(p)<1||!f&&Math.abs(m)<1)&&(u=!0),u},Re=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},$t=function(e){return[e.deltaX,e.deltaY]},Vt=function(e){return e&&"current"in e?e.current:e},yo=function(e,t){return e[0]===t[0]&&e[1]===t[1]},wo=function(e){return`
39
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
40
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
41
+ `)},xo=0,se=[];function bo(e){var t=c.useRef([]),n=c.useRef([0,0]),r=c.useRef(),o=c.useState(xo++)[0],i=c.useState(an)[0],s=c.useRef(e);c.useEffect(function(){s.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var d=xr([e.lockRef.current],(e.shards||[]).map(Vt),!0).filter(Boolean);return d.forEach(function(v){return v.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),d.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=c.useCallback(function(d,v){if("touches"in d&&d.touches.length===2||d.type==="wheel"&&d.ctrlKey)return!s.current.allowPinchZoom;var y=Re(d),w=n.current,b="deltaX"in d?d.deltaX:w[0]-y[0],x="deltaY"in d?d.deltaY:w[1]-y[1],E,A=d.target,R=Math.abs(b)>Math.abs(x)?"h":"v";if("touches"in d&&R==="h"&&A.type==="range")return!1;var S=Ht(R,A);if(!S)return!0;if(S?E=R:(E=R==="v"?"h":"v",S=Ht(R,A)),!S)return!1;if(!r.current&&"changedTouches"in d&&(b||x)&&(r.current=E),!E)return!0;var D=r.current||E;return go(D,v,d,D==="h"?b:x)},[]),l=c.useCallback(function(d){var v=d;if(!(!se.length||se[se.length-1]!==i)){var y="deltaY"in v?$t(v):Re(v),w=t.current.filter(function(E){return E.name===v.type&&(E.target===v.target||v.target===E.shadowParent)&&yo(E.delta,y)})[0];if(w&&w.should){v.cancelable&&v.preventDefault();return}if(!w){var b=(s.current.shards||[]).map(Vt).filter(Boolean).filter(function(E){return E.contains(v.target)}),x=b.length>0?a(v,b[0]):!s.current.noIsolation;x&&v.cancelable&&v.preventDefault()}}},[]),u=c.useCallback(function(d,v,y,w){var b={name:d,delta:v,target:y,should:w,shadowParent:Eo(y)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(x){return x!==b})},1)},[]),f=c.useCallback(function(d){n.current=Re(d),r.current=void 0},[]),p=c.useCallback(function(d){u(d.type,$t(d),d.target,a(d,e.lockRef.current))},[]),m=c.useCallback(function(d){u(d.type,Re(d),d.target,a(d,e.lockRef.current))},[]);c.useEffect(function(){return se.push(i),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:m}),document.addEventListener("wheel",l,ie),document.addEventListener("touchmove",l,ie),document.addEventListener("touchstart",f,ie),function(){se=se.filter(function(d){return d!==i}),document.removeEventListener("wheel",l,ie),document.removeEventListener("touchmove",l,ie),document.removeEventListener("touchstart",f,ie)}},[]);var h=e.removeScrollBar,g=e.inert;return c.createElement(c.Fragment,null,g?c.createElement(i,{styles:wo(o)}):null,h?c.createElement(lo,{gapMode:e.gapMode}):null)}function Eo(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Co=qr(sn,bo);var fn=c.forwardRef(function(e,t){return c.createElement(We,J({},e,{ref:t,sideCar:Co}))});fn.classNames=We.classNames;var Ro=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ae=new WeakMap,Ae=new WeakMap,Pe={},Ze=0,dn=function(e){return e&&(e.host||dn(e.parentNode))},Ao=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=dn(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Po=function(e,t,n,r){var o=Ao(t,Array.isArray(e)?e:[e]);Pe[n]||(Pe[n]=new WeakMap);var i=Pe[n],s=[],a=new Set,l=new Set(o),u=function(p){!p||a.has(p)||(a.add(p),u(p.parentNode))};o.forEach(u);var f=function(p){!p||l.has(p)||Array.prototype.forEach.call(p.children,function(m){if(a.has(m))f(m);else try{var h=m.getAttribute(r),g=h!==null&&h!=="false",d=(ae.get(m)||0)+1,v=(i.get(m)||0)+1;ae.set(m,d),i.set(m,v),s.push(m),d===1&&g&&Ae.set(m,!0),v===1&&m.setAttribute(n,"true"),g||m.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",m,y)}})};return f(t),a.clear(),Ze++,function(){s.forEach(function(p){var m=ae.get(p)-1,h=i.get(p)-1;ae.set(p,m),i.set(p,h),m||(Ae.has(p)||p.removeAttribute(r),Ae.delete(p)),h||p.removeAttribute(n)}),Ze--,Ze||(ae=new WeakMap,ae=new WeakMap,Ae=new WeakMap,Pe={})}},So=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Ro(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),Po(r,o,n,"aria-hidden")):function(){return null}},ut="Dialog",[pn,ms]=at(ut),[To,Y]=pn(ut),hn=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:s=!0}=e,a=c.useRef(null),l=c.useRef(null),[u=!1,f]=Qt({prop:r,defaultProp:o,onChange:i});return C.jsx(To,{scope:t,triggerRef:a,contentRef:l,contentId:Te(),titleId:Te(),descriptionId:Te(),open:u,onOpenChange:f,onOpenToggle:c.useCallback(()=>f(p=>!p),[f]),modal:s,children:n})};hn.displayName=ut;var mn="DialogTrigger",Oo=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Y(mn,n),i=G(t,o.triggerRef);return C.jsx(W.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":pt(o.open),...r,ref:i,onClick:I(e.onClick,o.onOpenToggle)})});Oo.displayName=mn;var ft="DialogPortal",[Do,vn]=pn(ft,{forceMount:void 0}),gn=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=Y(ft,t);return C.jsx(Do,{scope:t,forceMount:n,children:c.Children.map(r,s=>C.jsx(ye,{present:n||i.open,children:C.jsx(lt,{asChild:!0,container:o,children:s})}))})};gn.displayName=ft;var Me="DialogOverlay",yn=c.forwardRef((e,t)=>{const n=vn(Me,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Y(Me,e.__scopeDialog);return i.modal?C.jsx(ye,{present:r||i.open,children:C.jsx(No,{...o,ref:t})}):null});yn.displayName=Me;var Lo=yr("DialogOverlay.RemoveScroll"),No=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Y(Me,n);return C.jsx(fn,{as:Lo,allowPinchZoom:!0,shards:[o.contentRef],children:C.jsx(W.div,{"data-state":pt(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),re="DialogContent",wn=c.forwardRef((e,t)=>{const n=vn(re,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Y(re,e.__scopeDialog);return C.jsx(ye,{present:r||i.open,children:i.modal?C.jsx(Mo,{...o,ref:t}):C.jsx(ko,{...o,ref:t})})});wn.displayName=re;var Mo=c.forwardRef((e,t)=>{const n=Y(re,e.__scopeDialog),r=c.useRef(null),o=G(t,n.contentRef,r);return c.useEffect(()=>{const i=r.current;if(i)return So(i)},[]),C.jsx(xn,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:I(e.onCloseAutoFocus,i=>{var s;i.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:I(e.onPointerDownOutside,i=>{const s=i.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&i.preventDefault()}),onFocusOutside:I(e.onFocusOutside,i=>i.preventDefault())})}),ko=c.forwardRef((e,t)=>{const n=Y(re,e.__scopeDialog),r=c.useRef(!1),o=c.useRef(!1);return C.jsx(xn,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var s,a;(s=e.onCloseAutoFocus)==null||s.call(e,i),i.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(s))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),xn=c.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...s}=e,a=Y(re,n),l=c.useRef(null),u=G(t,l);return Hr(),C.jsxs(C.Fragment,{children:[C.jsx(nn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:C.jsx(ct,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":pt(a.open),...s,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),C.jsxs(C.Fragment,{children:[C.jsx(_o,{titleId:a.titleId}),C.jsx(Io,{contentRef:l,descriptionId:a.descriptionId})]})]})}),dt="DialogTitle",bn=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Y(dt,n);return C.jsx(W.h2,{id:o.titleId,...r,ref:t})});bn.displayName=dt;var En="DialogDescription",Cn=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Y(En,n);return C.jsx(W.p,{id:o.descriptionId,...r,ref:t})});Cn.displayName=En;var Rn="DialogClose",An=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Y(Rn,n);return C.jsx(W.button,{type:"button",...r,ref:t,onClick:I(e.onClick,()=>o.onOpenChange(!1))})});An.displayName=Rn;function pt(e){return e?"open":"closed"}var Pn="DialogTitleWarning",[vs,Sn]=vr(Pn,{contentName:re,titleName:dt,docsSlug:"dialog"}),_o=({titleId:e})=>{const t=Sn(Pn),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
42
+
43
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
44
+
45
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return c.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Fo="DialogDescriptionWarning",Io=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Sn(Fo).contentName}}.`;return c.useEffect(()=>{var i;const o=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},gs=hn,ys=gn,ws=yn,xs=wn,bs=bn,Es=Cn,Cs=An;const Wo=["top","right","bottom","left"],ee=Math.min,j=Math.max,ke=Math.round,Se=Math.floor,z=e=>({x:e,y:e}),jo={left:"right",right:"left",bottom:"top",top:"bottom"},Bo={start:"end",end:"start"};function nt(e,t,n){return j(e,ee(t,n))}function q(e,t){return typeof e=="function"?e(t):e}function Z(e){return e.split("-")[0]}function pe(e){return e.split("-")[1]}function ht(e){return e==="x"?"y":"x"}function mt(e){return e==="y"?"height":"width"}function te(e){return["top","bottom"].includes(Z(e))?"y":"x"}function vt(e){return ht(te(e))}function Ho(e,t,n){n===void 0&&(n=!1);const r=pe(e),o=vt(e),i=mt(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=_e(s)),[s,_e(s)]}function $o(e){const t=_e(e);return[rt(e),t,rt(t)]}function rt(e){return e.replace(/start|end/g,t=>Bo[t])}function Vo(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}function Yo(e,t,n,r){const o=pe(e);let i=Vo(Z(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(rt)))),i}function _e(e){return e.replace(/left|right|bottom|top/g,t=>jo[t])}function Uo(e){return{top:0,right:0,bottom:0,left:0,...e}}function Tn(e){return typeof e!="number"?Uo(e):{top:e,right:e,bottom:e,left:e}}function Fe(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Yt(e,t,n){let{reference:r,floating:o}=e;const i=te(t),s=vt(t),a=mt(s),l=Z(t),u=i==="y",f=r.x+r.width/2-o.width/2,p=r.y+r.height/2-o.height/2,m=r[a]/2-o[a]/2;let h;switch(l){case"top":h={x:f,y:r.y-o.height};break;case"bottom":h={x:f,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:p};break;case"left":h={x:r.x-o.width,y:p};break;default:h={x:r.x,y:r.y}}switch(pe(t)){case"start":h[s]-=m*(n&&u?-1:1);break;case"end":h[s]+=m*(n&&u?-1:1);break}return h}const zo=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:p}=Yt(u,r,l),m=r,h={},g=0;for(let d=0;d<a.length;d++){const{name:v,fn:y}=a[d],{x:w,y:b,data:x,reset:E}=await y({x:f,y:p,initialPlacement:r,placement:m,strategy:o,middlewareData:h,rects:u,platform:s,elements:{reference:e,floating:t}});f=w??f,p=b??p,h={...h,[v]:{...h[v],...x}},E&&g<=50&&(g++,typeof E=="object"&&(E.placement&&(m=E.placement),E.rects&&(u=E.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:f,y:p}=Yt(u,m,l)),d=-1)}return{x:f,y:p,placement:m,strategy:o,middlewareData:h}};async function ve(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:m=!1,padding:h=0}=q(t,e),g=Tn(h),v=a[m?p==="floating"?"reference":"floating":p],y=Fe(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(v)))==null||n?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:f,strategy:l})),w=p==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),x=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},E=Fe(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:b,strategy:l}):w);return{top:(y.top-E.top+g.top)/x.y,bottom:(E.bottom-y.bottom+g.bottom)/x.y,left:(y.left-E.left+g.left)/x.x,right:(E.right-y.right+g.right)/x.x}}const Xo=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:u,padding:f=0}=q(e,t)||{};if(u==null)return{};const p=Tn(f),m={x:n,y:r},h=vt(o),g=mt(h),d=await s.getDimensions(u),v=h==="y",y=v?"top":"left",w=v?"bottom":"right",b=v?"clientHeight":"clientWidth",x=i.reference[g]+i.reference[h]-m[h]-i.floating[g],E=m[h]-i.reference[h],A=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let R=A?A[b]:0;(!R||!await(s.isElement==null?void 0:s.isElement(A)))&&(R=a.floating[b]||i.floating[g]);const S=x/2-E/2,D=R/2-d[g]/2-1,T=ee(p[y],D),_=ee(p[w],D),F=T,L=R-d[g]-_,O=R/2-d[g]/2+S,H=nt(F,O,L),N=!l.arrow&&pe(o)!=null&&O!==H&&i.reference[g]/2-(O<F?T:_)-d[g]/2<0,M=N?O<F?O-F:O-L:0;return{[h]:m[h]+M,data:{[h]:H,centerOffset:O-H-M,...N&&{alignmentOffset:M}},reset:N}}}),Go=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:d=!0,...v}=q(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=Z(o),w=te(a),b=Z(a)===a,x=await(l.isRTL==null?void 0:l.isRTL(u.floating)),E=m||(b||!d?[_e(a)]:$o(a)),A=g!=="none";!m&&A&&E.push(...Yo(a,d,g,x));const R=[a,...E],S=await ve(t,v),D=[];let T=((r=i.flip)==null?void 0:r.overflows)||[];if(f&&D.push(S[y]),p){const O=Ho(o,s,x);D.push(S[O[0]],S[O[1]])}if(T=[...T,{placement:o,overflows:D}],!D.every(O=>O<=0)){var _,F;const O=(((_=i.flip)==null?void 0:_.index)||0)+1,H=R[O];if(H)return{data:{index:O,overflows:T},reset:{placement:H}};let N=(F=T.filter(M=>M.overflows[0]<=0).sort((M,P)=>M.overflows[1]-P.overflows[1])[0])==null?void 0:F.placement;if(!N)switch(h){case"bestFit":{var L;const M=(L=T.filter(P=>{if(A){const k=te(P.placement);return k===w||k==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(k=>k>0).reduce((k,U)=>k+U,0)]).sort((P,k)=>P[1]-k[1])[0])==null?void 0:L[0];M&&(N=M);break}case"initialPlacement":N=a;break}if(o!==N)return{reset:{placement:N}}}return{}}}};function Ut(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function zt(e){return Wo.some(t=>e[t]>=0)}const Ko=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=q(e,t);switch(r){case"referenceHidden":{const i=await ve(t,{...o,elementContext:"reference"}),s=Ut(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:zt(s)}}}case"escaped":{const i=await ve(t,{...o,altBoundary:!0}),s=Ut(i,n.floating);return{data:{escapedOffsets:s,escaped:zt(s)}}}default:return{}}}}};async function qo(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Z(n),a=pe(n),l=te(n)==="y",u=["left","top"].includes(s)?-1:1,f=i&&l?-1:1,p=q(t,e);let{mainAxis:m,crossAxis:h,alignmentAxis:g}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return a&&typeof g=="number"&&(h=a==="end"?g*-1:g),l?{x:h*f,y:m*u}:{x:m*u,y:h*f}}const Zo=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await qo(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},Qo=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:v=>{let{x:y,y:w}=v;return{x:y,y:w}}},...l}=q(e,t),u={x:n,y:r},f=await ve(t,l),p=te(Z(o)),m=ht(p);let h=u[m],g=u[p];if(i){const v=m==="y"?"top":"left",y=m==="y"?"bottom":"right",w=h+f[v],b=h-f[y];h=nt(w,h,b)}if(s){const v=p==="y"?"top":"left",y=p==="y"?"bottom":"right",w=g+f[v],b=g-f[y];g=nt(w,g,b)}const d=a.fn({...t,[m]:h,[p]:g});return{...d,data:{x:d.x-n,y:d.y-r,enabled:{[m]:i,[p]:s}}}}}},Jo=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=q(e,t),f={x:n,y:r},p=te(o),m=ht(p);let h=f[m],g=f[p];const d=q(a,t),v=typeof d=="number"?{mainAxis:d,crossAxis:0}:{mainAxis:0,crossAxis:0,...d};if(l){const b=m==="y"?"height":"width",x=i.reference[m]-i.floating[b]+v.mainAxis,E=i.reference[m]+i.reference[b]-v.mainAxis;h<x?h=x:h>E&&(h=E)}if(u){var y,w;const b=m==="y"?"width":"height",x=["top","left"].includes(Z(o)),E=i.reference[p]-i.floating[b]+(x&&((y=s.offset)==null?void 0:y[p])||0)+(x?0:v.crossAxis),A=i.reference[p]+i.reference[b]+(x?0:((w=s.offset)==null?void 0:w[p])||0)-(x?v.crossAxis:0);g<E?g=E:g>A&&(g=A)}return{[m]:h,[p]:g}}}},ei=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...u}=q(e,t),f=await ve(t,u),p=Z(o),m=pe(o),h=te(o)==="y",{width:g,height:d}=i.floating;let v,y;p==="top"||p==="bottom"?(v=p,y=m===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(y=p,v=m==="end"?"top":"bottom");const w=d-f.top-f.bottom,b=g-f.left-f.right,x=ee(d-f[v],w),E=ee(g-f[y],b),A=!t.middlewareData.shift;let R=x,S=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(S=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(R=w),A&&!m){const T=j(f.left,0),_=j(f.right,0),F=j(f.top,0),L=j(f.bottom,0);h?S=g-2*(T!==0||_!==0?T+_:j(f.left,f.right)):R=d-2*(F!==0||L!==0?F+L:j(f.top,f.bottom))}await l({...t,availableWidth:S,availableHeight:R});const D=await s.getDimensions(a.floating);return g!==D.width||d!==D.height?{reset:{rects:!0}}:{}}}};function je(){return typeof window<"u"}function he(e){return On(e)?(e.nodeName||"").toLowerCase():"#document"}function B(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function K(e){var t;return(t=(On(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function On(e){return je()?e instanceof Node||e instanceof B(e).Node:!1}function $(e){return je()?e instanceof Element||e instanceof B(e).Element:!1}function X(e){return je()?e instanceof HTMLElement||e instanceof B(e).HTMLElement:!1}function Xt(e){return!je()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof B(e).ShadowRoot}function we(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=V(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function ti(e){return["table","td","th"].includes(he(e))}function Be(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function gt(e){const t=yt(),n=$(e)?V(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function ni(e){let t=ne(e);for(;X(t)&&!fe(t);){if(gt(t))return t;if(Be(t))return null;t=ne(t)}return null}function yt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function fe(e){return["html","body","#document"].includes(he(e))}function V(e){return B(e).getComputedStyle(e)}function He(e){return $(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ne(e){if(he(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Xt(e)&&e.host||K(e);return Xt(t)?t.host:t}function Dn(e){const t=ne(e);return fe(t)?e.ownerDocument?e.ownerDocument.body:e.body:X(t)&&we(t)?t:Dn(t)}function ge(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Dn(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=B(o);if(i){const a=ot(s);return t.concat(s,s.visualViewport||[],we(o)?o:[],a&&n?ge(a):[])}return t.concat(o,ge(o,[],n))}function ot(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ln(e){const t=V(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=X(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=ke(n)!==i||ke(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function wt(e){return $(e)?e:e.contextElement}function le(e){const t=wt(e);if(!X(t))return z(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Ln(t);let s=(i?ke(n.width):n.width)/r,a=(i?ke(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const ri=z(0);function Nn(e){const t=B(e);return!yt()||!t.visualViewport?ri:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function oi(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==B(e)?!1:t}function oe(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=wt(e);let s=z(1);t&&(r?$(r)&&(s=le(r)):s=le(e));const a=oi(i,n,r)?Nn(i):z(0);let l=(o.left+a.x)/s.x,u=(o.top+a.y)/s.y,f=o.width/s.x,p=o.height/s.y;if(i){const m=B(i),h=r&&$(r)?B(r):r;let g=m,d=ot(g);for(;d&&r&&h!==g;){const v=le(d),y=d.getBoundingClientRect(),w=V(d),b=y.left+(d.clientLeft+parseFloat(w.paddingLeft))*v.x,x=y.top+(d.clientTop+parseFloat(w.paddingTop))*v.y;l*=v.x,u*=v.y,f*=v.x,p*=v.y,l+=b,u+=x,g=B(d),d=ot(g)}}return Fe({width:f,height:p,x:l,y:u})}function xt(e,t){const n=He(e).scrollLeft;return t?t.left+n:oe(K(e)).left+n}function Mn(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:xt(e,r)),i=r.top+t.scrollTop;return{x:o,y:i}}function ii(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=K(r),a=t?Be(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},u=z(1);const f=z(0),p=X(r);if((p||!p&&!i)&&((he(r)!=="body"||we(s))&&(l=He(r)),X(r))){const h=oe(r);u=le(r),f.x=h.x+r.clientLeft,f.y=h.y+r.clientTop}const m=s&&!p&&!i?Mn(s,l,!0):z(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+f.x+m.x,y:n.y*u.y-l.scrollTop*u.y+f.y+m.y}}function si(e){return Array.from(e.getClientRects())}function ai(e){const t=K(e),n=He(e),r=e.ownerDocument.body,o=j(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=j(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+xt(e);const a=-n.scrollTop;return V(r).direction==="rtl"&&(s+=j(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}function ci(e,t){const n=B(e),r=K(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const u=yt();(!u||u&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}function li(e,t){const n=oe(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=X(e)?le(e):z(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,u=r*i.y;return{width:s,height:a,x:l,y:u}}function Gt(e,t,n){let r;if(t==="viewport")r=ci(e,n);else if(t==="document")r=ai(K(e));else if($(t))r=li(t,n);else{const o=Nn(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Fe(r)}function kn(e,t){const n=ne(e);return n===t||!$(n)||fe(n)?!1:V(n).position==="fixed"||kn(n,t)}function ui(e,t){const n=t.get(e);if(n)return n;let r=ge(e,[],!1).filter(a=>$(a)&&he(a)!=="body"),o=null;const i=V(e).position==="fixed";let s=i?ne(e):e;for(;$(s)&&!fe(s);){const a=V(s),l=gt(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||we(s)&&!l&&kn(e,s))?r=r.filter(f=>f!==s):o=a,s=ne(s)}return t.set(e,r),r}function fi(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Be(t)?[]:ui(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((u,f)=>{const p=Gt(t,f,o);return u.top=j(p.top,u.top),u.right=ee(p.right,u.right),u.bottom=ee(p.bottom,u.bottom),u.left=j(p.left,u.left),u},Gt(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function di(e){const{width:t,height:n}=Ln(e);return{width:t,height:n}}function pi(e,t,n){const r=X(t),o=K(t),i=n==="fixed",s=oe(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=z(0);if(r||!r&&!i)if((he(t)!=="body"||we(o))&&(a=He(t)),r){const m=oe(t,!0,i,t);l.x=m.x+t.clientLeft,l.y=m.y+t.clientTop}else o&&(l.x=xt(o));const u=o&&!r&&!i?Mn(o,a):z(0),f=s.left+a.scrollLeft-l.x-u.x,p=s.top+a.scrollTop-l.y-u.y;return{x:f,y:p,width:s.width,height:s.height}}function Qe(e){return V(e).position==="static"}function Kt(e,t){if(!X(e)||V(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return K(e)===n&&(n=n.ownerDocument.body),n}function _n(e,t){const n=B(e);if(Be(e))return n;if(!X(e)){let o=ne(e);for(;o&&!fe(o);){if($(o)&&!Qe(o))return o;o=ne(o)}return n}let r=Kt(e,t);for(;r&&ti(r)&&Qe(r);)r=Kt(r,t);return r&&fe(r)&&Qe(r)&&!gt(r)?n:r||ni(e)||n}const hi=async function(e){const t=this.getOffsetParent||_n,n=this.getDimensions,r=await n(e.floating);return{reference:pi(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function mi(e){return V(e).direction==="rtl"}const vi={convertOffsetParentRelativeRectToViewportRelativeRect:ii,getDocumentElement:K,getClippingRect:fi,getOffsetParent:_n,getElementRects:hi,getClientRects:si,getDimensions:di,getScale:le,isElement:$,isRTL:mi};function Fn(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function gi(e,t){let n=null,r;const o=K(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const u=e.getBoundingClientRect(),{left:f,top:p,width:m,height:h}=u;if(a||t(),!m||!h)return;const g=Se(p),d=Se(o.clientWidth-(f+m)),v=Se(o.clientHeight-(p+h)),y=Se(f),b={rootMargin:-g+"px "+-d+"px "+-v+"px "+-y+"px",threshold:j(0,ee(1,l))||1};let x=!0;function E(A){const R=A[0].intersectionRatio;if(R!==l){if(!x)return s();R?s(!1,R):r=setTimeout(()=>{s(!1,1e-7)},1e3)}R===1&&!Fn(u,e.getBoundingClientRect())&&s(),x=!1}try{n=new IntersectionObserver(E,{...b,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,b)}n.observe(e)}return s(!0),i}function yi(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=wt(e),f=o||i?[...u?ge(u):[],...ge(t)]:[];f.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const p=u&&a?gi(u,n):null;let m=-1,h=null;s&&(h=new ResizeObserver(y=>{let[w]=y;w&&w.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var b;(b=h)==null||b.observe(t)})),n()}),u&&!l&&h.observe(u),h.observe(t));let g,d=l?oe(e):null;l&&v();function v(){const y=oe(e);d&&!Fn(d,y)&&n(),d=y,g=requestAnimationFrame(v)}return n(),()=>{var y;f.forEach(w=>{o&&w.removeEventListener("scroll",n),i&&w.removeEventListener("resize",n)}),p==null||p(),(y=h)==null||y.disconnect(),h=null,l&&cancelAnimationFrame(g)}}const wi=Zo,xi=Qo,bi=Go,Ei=ei,Ci=Ko,qt=Xo,Ri=Jo,Ai=(e,t,n)=>{const r=new Map,o={platform:vi,...n},i={...o.platform,_c:r};return zo(e,t,{...o,platform:i})};var Le=typeof document<"u"?c.useLayoutEffect:c.useEffect;function Ie(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ie(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Ie(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function In(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Zt(e,t){const n=In(e);return Math.round(t*n)/n}function Je(e){const t=c.useRef(e);return Le(()=>{t.current=e}),t}function Pi(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[f,p]=c.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=c.useState(r);Ie(m,r)||h(r);const[g,d]=c.useState(null),[v,y]=c.useState(null),w=c.useCallback(P=>{P!==A.current&&(A.current=P,d(P))},[]),b=c.useCallback(P=>{P!==R.current&&(R.current=P,y(P))},[]),x=i||g,E=s||v,A=c.useRef(null),R=c.useRef(null),S=c.useRef(f),D=l!=null,T=Je(l),_=Je(o),F=Je(u),L=c.useCallback(()=>{if(!A.current||!R.current)return;const P={placement:t,strategy:n,middleware:m};_.current&&(P.platform=_.current),Ai(A.current,R.current,P).then(k=>{const U={...k,isPositioned:F.current!==!1};O.current&&!Ie(S.current,U)&&(S.current=U,Er.flushSync(()=>{p(U)}))})},[m,t,n,_,F]);Le(()=>{u===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,p(P=>({...P,isPositioned:!1})))},[u]);const O=c.useRef(!1);Le(()=>(O.current=!0,()=>{O.current=!1}),[]),Le(()=>{if(x&&(A.current=x),E&&(R.current=E),x&&E){if(T.current)return T.current(x,E,L);L()}},[x,E,L,T,D]);const H=c.useMemo(()=>({reference:A,floating:R,setReference:w,setFloating:b}),[w,b]),N=c.useMemo(()=>({reference:x,floating:E}),[x,E]),M=c.useMemo(()=>{const P={position:n,left:0,top:0};if(!N.floating)return P;const k=Zt(N.floating,f.x),U=Zt(N.floating,f.y);return a?{...P,transform:"translate("+k+"px, "+U+"px)",...In(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:k,top:U}},[n,a,N.floating,f.x,f.y]);return c.useMemo(()=>({...f,update:L,refs:H,elements:N,floatingStyles:M}),[f,L,H,N,M])}const Si=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?qt({element:r.current,padding:o}).fn(n):{}:r?qt({element:r,padding:o}).fn(n):{}}}},Ti=(e,t)=>({...wi(e),options:[e,t]}),Oi=(e,t)=>({...xi(e),options:[e,t]}),Di=(e,t)=>({...Ri(e),options:[e,t]}),Li=(e,t)=>({...bi(e),options:[e,t]}),Ni=(e,t)=>({...Ei(e),options:[e,t]}),Mi=(e,t)=>({...Ci(e),options:[e,t]}),ki=(e,t)=>({...Si(e),options:[e,t]});var _i="Arrow",Wn=c.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return C.jsx(W.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:C.jsx("polygon",{points:"0,0 30,0 15,10"})})});Wn.displayName=_i;var Fi=Wn,bt="Popper",[jn,Bn]=at(bt),[Ii,Hn]=jn(bt),$n=e=>{const{__scopePopper:t,children:n}=e,[r,o]=c.useState(null);return C.jsx(Ii,{scope:t,anchor:r,onAnchorChange:o,children:n})};$n.displayName=bt;var Vn="PopperAnchor",Yn=c.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=Hn(Vn,n),s=c.useRef(null),a=G(t,s);return c.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||s.current)}),r?null:C.jsx(W.div,{...o,ref:a})});Yn.displayName=Vn;var Et="PopperContent",[Wi,ji]=jn(Et),Un=c.forwardRef((e,t)=>{var At,Pt,St,Tt,Ot,Dt;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:m=!1,updatePositionStrategy:h="optimized",onPlaced:g,...d}=e,v=Hn(Et,n),[y,w]=c.useState(null),b=G(t,me=>w(me)),[x,E]=c.useState(null),A=gr(x),R=(A==null?void 0:A.width)??0,S=(A==null?void 0:A.height)??0,D=r+(i!=="center"?"-"+i:""),T=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},_=Array.isArray(u)?u:[u],F=_.length>0,L={padding:T,boundary:_.filter(Hi),altBoundary:F},{refs:O,floatingStyles:H,placement:N,isPositioned:M,middlewareData:P}=Pi({strategy:"fixed",placement:D,whileElementsMounted:(...me)=>yi(...me,{animationFrame:h==="always"}),elements:{reference:v.anchor},middleware:[Ti({mainAxis:o+S,alignmentAxis:s}),l&&Oi({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?Di():void 0,...L}),l&&Li({...L}),Ni({...L,apply:({elements:me,rects:Lt,availableWidth:ur,availableHeight:fr})=>{const{width:dr,height:pr}=Lt.reference,Ee=me.floating.style;Ee.setProperty("--radix-popper-available-width",`${ur}px`),Ee.setProperty("--radix-popper-available-height",`${fr}px`),Ee.setProperty("--radix-popper-anchor-width",`${dr}px`),Ee.setProperty("--radix-popper-anchor-height",`${pr}px`)}}),x&&ki({element:x,padding:a}),$i({arrowWidth:R,arrowHeight:S}),m&&Mi({strategy:"referenceHidden",...L})]}),[k,U]=Gn(N),be=ue(g);Ne(()=>{M&&(be==null||be())},[M,be]);const ir=(At=P.arrow)==null?void 0:At.x,sr=(Pt=P.arrow)==null?void 0:Pt.y,ar=((St=P.arrow)==null?void 0:St.centerOffset)!==0,[cr,lr]=c.useState();return Ne(()=>{y&&lr(window.getComputedStyle(y).zIndex)},[y]),C.jsx("div",{ref:O.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:M?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:cr,"--radix-popper-transform-origin":[(Tt=P.transformOrigin)==null?void 0:Tt.x,(Ot=P.transformOrigin)==null?void 0:Ot.y].join(" "),...((Dt=P.hide)==null?void 0:Dt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:C.jsx(Wi,{scope:n,placedSide:k,onArrowChange:E,arrowX:ir,arrowY:sr,shouldHideArrow:ar,children:C.jsx(W.div,{"data-side":k,"data-align":U,...d,ref:b,style:{...d.style,animation:M?void 0:"none"}})})})});Un.displayName=Et;var zn="PopperArrow",Bi={top:"bottom",right:"left",bottom:"top",left:"right"},Xn=c.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=ji(zn,r),s=Bi[i.placedSide];return C.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:C.jsx(Fi,{...o,ref:n,style:{...o.style,display:"block"}})})});Xn.displayName=zn;function Hi(e){return e!==null}var $i=e=>({name:"transformOrigin",options:e,fn(t){var v,y,w;const{placement:n,rects:r,middlewareData:o}=t,s=((v=o.arrow)==null?void 0:v.centerOffset)!==0,a=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[u,f]=Gn(n),p={start:"0%",center:"50%",end:"100%"}[f],m=(((y=o.arrow)==null?void 0:y.x)??0)+a/2,h=(((w=o.arrow)==null?void 0:w.y)??0)+l/2;let g="",d="";return u==="bottom"?(g=s?p:`${m}px`,d=`${-l}px`):u==="top"?(g=s?p:`${m}px`,d=`${r.floating.height+l}px`):u==="right"?(g=`${-l}px`,d=s?p:`${h}px`):u==="left"&&(g=`${r.floating.width+l}px`,d=s?p:`${h}px`),{data:{x:g,y:d}}}});function Gn(e){const[t,n="center"]=e.split("-");return[t,n]}var Vi=$n,Yi=Yn,Ui=Un,zi=Xn,Xi="VisuallyHidden",Kn=c.forwardRef((e,t)=>C.jsx(W.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Kn.displayName=Xi;var Gi=Kn,[$e,Rs]=at("Tooltip",[Bn]),Ve=Bn(),qn="TooltipProvider",Ki=700,it="tooltip.open",[qi,Ct]=$e(qn),Zn=e=>{const{__scopeTooltip:t,delayDuration:n=Ki,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,s=c.useRef(!0),a=c.useRef(!1),l=c.useRef(0);return c.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),C.jsx(qi,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:c.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:c.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:c.useCallback(u=>{a.current=u},[]),disableHoverableContent:o,children:i})};Zn.displayName=qn;var Ye="Tooltip",[Zi,xe]=$e(Ye),Qn=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:s,delayDuration:a}=e,l=Ct(Ye,e.__scopeTooltip),u=Ve(t),[f,p]=c.useState(null),m=Te(),h=c.useRef(0),g=s??l.disableHoverableContent,d=a??l.delayDuration,v=c.useRef(!1),[y=!1,w]=Qt({prop:r,defaultProp:o,onChange:R=>{R?(l.onOpen(),document.dispatchEvent(new CustomEvent(it))):l.onClose(),i==null||i(R)}}),b=c.useMemo(()=>y?v.current?"delayed-open":"instant-open":"closed",[y]),x=c.useCallback(()=>{window.clearTimeout(h.current),h.current=0,v.current=!1,w(!0)},[w]),E=c.useCallback(()=>{window.clearTimeout(h.current),h.current=0,w(!1)},[w]),A=c.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{v.current=!0,w(!0),h.current=0},d)},[d,w]);return c.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),C.jsx(Vi,{...u,children:C.jsx(Zi,{scope:t,contentId:m,open:y,stateAttribute:b,trigger:f,onTriggerChange:p,onTriggerEnter:c.useCallback(()=>{l.isOpenDelayedRef.current?A():x()},[l.isOpenDelayedRef,A,x]),onTriggerLeave:c.useCallback(()=>{g?E():(window.clearTimeout(h.current),h.current=0)},[E,g]),onOpen:x,onClose:E,disableHoverableContent:g,children:n})})};Qn.displayName=Ye;var st="TooltipTrigger",Jn=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=xe(st,n),i=Ct(st,n),s=Ve(n),a=c.useRef(null),l=G(t,a,o.onTriggerChange),u=c.useRef(!1),f=c.useRef(!1),p=c.useCallback(()=>u.current=!1,[]);return c.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),C.jsx(Yi,{asChild:!0,...s,children:C.jsx(W.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:I(e.onPointerMove,m=>{m.pointerType!=="touch"&&!f.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:I(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:I(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:I(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:I(e.onBlur,o.onClose),onClick:I(e.onClick,o.onClose)})})});Jn.displayName=st;var Rt="TooltipPortal",[Qi,Ji]=$e(Rt,{forceMount:void 0}),er=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,i=xe(Rt,t);return C.jsx(Qi,{scope:t,forceMount:n,children:C.jsx(ye,{present:n||i.open,children:C.jsx(lt,{asChild:!0,container:o,children:r})})})};er.displayName=Rt;var de="TooltipContent",tr=c.forwardRef((e,t)=>{const n=Ji(de,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,s=xe(de,e.__scopeTooltip);return C.jsx(ye,{present:r||s.open,children:s.disableHoverableContent?C.jsx(nr,{side:o,...i,ref:t}):C.jsx(es,{side:o,...i,ref:t})})}),es=c.forwardRef((e,t)=>{const n=xe(de,e.__scopeTooltip),r=Ct(de,e.__scopeTooltip),o=c.useRef(null),i=G(t,o),[s,a]=c.useState(null),{trigger:l,onClose:u}=n,f=o.current,{onPointerInTransitChange:p}=r,m=c.useCallback(()=>{a(null),p(!1)},[p]),h=c.useCallback((g,d)=>{const v=g.currentTarget,y={x:g.clientX,y:g.clientY},w=os(y,v.getBoundingClientRect()),b=is(y,w),x=ss(d.getBoundingClientRect()),E=cs([...b,...x]);a(E),p(!0)},[p]);return c.useEffect(()=>()=>m(),[m]),c.useEffect(()=>{if(l&&f){const g=v=>h(v,f),d=v=>h(v,l);return l.addEventListener("pointerleave",g),f.addEventListener("pointerleave",d),()=>{l.removeEventListener("pointerleave",g),f.removeEventListener("pointerleave",d)}}},[l,f,h,m]),c.useEffect(()=>{if(s){const g=d=>{const v=d.target,y={x:d.clientX,y:d.clientY},w=(l==null?void 0:l.contains(v))||(f==null?void 0:f.contains(v)),b=!as(y,s);w?m():b&&(m(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[l,f,s,u,m]),C.jsx(nr,{...e,ref:i})}),[ts,ns]=$e(Ye,{isInside:!1}),rs=wr("TooltipContent"),nr=c.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:s,...a}=e,l=xe(de,n),u=Ve(n),{onClose:f}=l;return c.useEffect(()=>(document.addEventListener(it,f),()=>document.removeEventListener(it,f)),[f]),c.useEffect(()=>{if(l.trigger){const p=m=>{const h=m.target;h!=null&&h.contains(l.trigger)&&f()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[l.trigger,f]),C.jsx(ct,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:p=>p.preventDefault(),onDismiss:f,children:C.jsxs(Ui,{"data-state":l.stateAttribute,...u,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[C.jsx(rs,{children:r}),C.jsx(ts,{scope:n,isInside:!0,children:C.jsx(Gi,{id:l.contentId,role:"tooltip",children:o||r})})]})})});tr.displayName=de;var rr="TooltipArrow",or=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ve(n);return ns(rr,n).isInside?null:C.jsx(zi,{...o,...r,ref:t})});or.displayName=rr;function os(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function is(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function ss(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function as(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const a=t[i].x,l=t[i].y,u=t[s].x,f=t[s].y;l>r!=f>r&&n<(u-a)*(r-l)/(f-l)+a&&(o=!o)}return o}function cs(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),ls(t)}function ls(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const i=t[t.length-1],s=t[t.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],s=n[n.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var As=Zn,Ps=Qn,Ss=Jn,Ts=er,Os=tr,Ds=or;export{Ds as A,xs as C,Es as D,nn as F,ws as O,ys as P,gs as R,bs as T,Kn as V,Cs as a,As as b,Ps as c,Ss as d,Ts as e,Os as f,Bn as g,Vi as h,Yi as i,lt as j,zi as k,So as l,fn as m,Hr as n,ct as o,Ui as p,Te as u};
@@ -0,0 +1,22 @@
1
+ import{l as y,r as X}from"./chunk-KNED5TY2-CXj9yqcQ.js";import{c as E}from"./utils-DslUJpbf.js";function st({className:e,...o}){return y.jsx("div",{"data-slot":"table-container",className:"relative w-full",children:y.jsx("div",{"data-slot":"table",className:E("w-full caption-bottom text-sm",e),...o})})}function ut({className:e,...o}){return y.jsx("div",{"data-slot":"table-header",className:E("[&_tr]:border-b",e),...o})}function at({className:e,...o}){return y.jsx("div",{"data-slot":"table-body",className:E("[&_tr:last-child]:border-0",e),...o})}function gt({className:e,...o}){return y.jsx("div",{"data-slot":"table-row",className:E("hover:bg-muted/50 data-[state=selected]:bg-muted transition-colors",e),...o})}function dt({className:e,...o}){return y.jsx("div",{"data-slot":"table-head",className:E("flex items-center text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap border-b [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...o})}function ct({className:e,...o}){return y.jsx("div",{"data-slot":"table-cell",className:E("p-2 align-middle whitespace-nowrap border-b [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...o})}/**
2
+ * table-core
3
+ *
4
+ * Copyright (c) TanStack
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE.md file in the root directory of this source tree.
8
+ *
9
+ * @license MIT
10
+ */function ft(){return{accessor:(e,o)=>typeof e=="function"?{...o,accessorFn:e}:{...o,accessorKey:e},display:e=>e,group:e=>e}}function V(e,o){return typeof e=="function"?e(o):e}function F(e,o){return t=>{o.setState(n=>({...n,[e]:V(t,n[e])}))}}function L(e){return e instanceof Function}function Ce(e){return Array.isArray(e)&&e.every(o=>typeof o=="number")}function Re(e,o){const t=[],n=r=>{r.forEach(i=>{t.push(i);const l=o(i);l!=null&&l.length&&n(l)})};return n(e),t}function S(e,o,t){let n=[],r;return i=>{let l;t.key&&t.debug&&(l=Date.now());const s=e(i);if(!(s.length!==n.length||s.some((c,C)=>n[C]!==c)))return r;n=s;let g;if(t.key&&t.debug&&(g=Date.now()),r=o(...s),t==null||t.onChange==null||t.onChange(r),t.key&&t.debug&&t!=null&&t.debug()){const c=Math.round((Date.now()-l)*100)/100,C=Math.round((Date.now()-g)*100)/100,d=C/16,a=(f,p)=>{for(f=String(f);f.length<p;)f=" "+f;return f};console.info(`%c⏱ ${a(C,5)} /${a(c,5)} ms`,`
11
+ font-size: .6rem;
12
+ font-weight: bold;
13
+ color: hsl(${Math.max(0,Math.min(120-120*d,120))}deg 100% 31%);`,t==null?void 0:t.key)}return r}}function m(e,o,t,n){return{debug:()=>{var r;return(r=e==null?void 0:e.debugAll)!=null?r:e[o]},key:!1,onChange:n}}function we(e,o,t,n){const r=()=>{var l;return(l=i.getValue())!=null?l:e.options.renderFallbackValue},i={id:`${o.id}_${t.id}`,row:o,column:t,getValue:()=>o.getValue(n),renderValue:r,getContext:S(()=>[e,t,o,i],(l,s,u,g)=>({table:l,column:s,row:u,cell:g,getValue:g.getValue,renderValue:g.renderValue}),m(e.options,"debugCells"))};return e._features.forEach(l=>{l.createCell==null||l.createCell(i,t,o,e)},{}),i}function ve(e,o,t,n){var r,i;const s={...e._getDefaultColumnDef(),...o},u=s.accessorKey;let g=(r=(i=s.id)!=null?i:u?typeof String.prototype.replaceAll=="function"?u.replaceAll(".","_"):u.replace(/\./g,"_"):void 0)!=null?r:typeof s.header=="string"?s.header:void 0,c;if(s.accessorFn?c=s.accessorFn:u&&(u.includes(".")?c=d=>{let a=d;for(const p of u.split(".")){var f;a=(f=a)==null?void 0:f[p]}return a}:c=d=>d[s.accessorKey]),!g)throw new Error;let C={id:`${String(g)}`,accessorFn:c,parent:n,depth:t,columnDef:s,columns:[],getFlatColumns:S(()=>[!0],()=>{var d;return[C,...(d=C.columns)==null?void 0:d.flatMap(a=>a.getFlatColumns())]},m(e.options,"debugColumns")),getLeafColumns:S(()=>[e._getOrderColumnsFn()],d=>{var a;if((a=C.columns)!=null&&a.length){let f=C.columns.flatMap(p=>p.getLeafColumns());return d(f)}return[C]},m(e.options,"debugColumns"))};for(const d of e._features)d.createColumn==null||d.createColumn(C,e);return C}const h="debugHeaders";function re(e,o,t){var n;let i={id:(n=t.id)!=null?n:o.id,column:o,index:t.index,isPlaceholder:!!t.isPlaceholder,placeholderId:t.placeholderId,depth:t.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const l=[],s=u=>{u.subHeaders&&u.subHeaders.length&&u.subHeaders.map(s),l.push(u)};return s(i),l},getContext:()=>({table:e,header:i,column:o})};return e._features.forEach(l=>{l.createHeader==null||l.createHeader(i,e)}),i}const he={createTable:e=>{e.getHeaderGroups=S(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(o,t,n,r)=>{var i,l;const s=(i=n==null?void 0:n.map(C=>t.find(d=>d.id===C)).filter(Boolean))!=null?i:[],u=(l=r==null?void 0:r.map(C=>t.find(d=>d.id===C)).filter(Boolean))!=null?l:[],g=t.filter(C=>!(n!=null&&n.includes(C.id))&&!(r!=null&&r.includes(C.id)));return G(o,[...s,...g,...u],e)},m(e.options,h)),e.getCenterHeaderGroups=S(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(o,t,n,r)=>(t=t.filter(i=>!(n!=null&&n.includes(i.id))&&!(r!=null&&r.includes(i.id))),G(o,t,e,"center")),m(e.options,h)),e.getLeftHeaderGroups=S(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(o,t,n)=>{var r;const i=(r=n==null?void 0:n.map(l=>t.find(s=>s.id===l)).filter(Boolean))!=null?r:[];return G(o,i,e,"left")},m(e.options,h)),e.getRightHeaderGroups=S(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(o,t,n)=>{var r;const i=(r=n==null?void 0:n.map(l=>t.find(s=>s.id===l)).filter(Boolean))!=null?r:[];return G(o,i,e,"right")},m(e.options,h)),e.getFooterGroups=S(()=>[e.getHeaderGroups()],o=>[...o].reverse(),m(e.options,h)),e.getLeftFooterGroups=S(()=>[e.getLeftHeaderGroups()],o=>[...o].reverse(),m(e.options,h)),e.getCenterFooterGroups=S(()=>[e.getCenterHeaderGroups()],o=>[...o].reverse(),m(e.options,h)),e.getRightFooterGroups=S(()=>[e.getRightHeaderGroups()],o=>[...o].reverse(),m(e.options,h)),e.getFlatHeaders=S(()=>[e.getHeaderGroups()],o=>o.map(t=>t.headers).flat(),m(e.options,h)),e.getLeftFlatHeaders=S(()=>[e.getLeftHeaderGroups()],o=>o.map(t=>t.headers).flat(),m(e.options,h)),e.getCenterFlatHeaders=S(()=>[e.getCenterHeaderGroups()],o=>o.map(t=>t.headers).flat(),m(e.options,h)),e.getRightFlatHeaders=S(()=>[e.getRightHeaderGroups()],o=>o.map(t=>t.headers).flat(),m(e.options,h)),e.getCenterLeafHeaders=S(()=>[e.getCenterFlatHeaders()],o=>o.filter(t=>{var n;return!((n=t.subHeaders)!=null&&n.length)}),m(e.options,h)),e.getLeftLeafHeaders=S(()=>[e.getLeftFlatHeaders()],o=>o.filter(t=>{var n;return!((n=t.subHeaders)!=null&&n.length)}),m(e.options,h)),e.getRightLeafHeaders=S(()=>[e.getRightFlatHeaders()],o=>o.filter(t=>{var n;return!((n=t.subHeaders)!=null&&n.length)}),m(e.options,h)),e.getLeafHeaders=S(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(o,t,n)=>{var r,i,l,s,u,g;return[...(r=(i=o[0])==null?void 0:i.headers)!=null?r:[],...(l=(s=t[0])==null?void 0:s.headers)!=null?l:[],...(u=(g=n[0])==null?void 0:g.headers)!=null?u:[]].map(c=>c.getLeafHeaders()).flat()},m(e.options,h))}};function G(e,o,t,n){var r,i;let l=0;const s=function(d,a){a===void 0&&(a=1),l=Math.max(l,a),d.filter(f=>f.getIsVisible()).forEach(f=>{var p;(p=f.columns)!=null&&p.length&&s(f.columns,a+1)},0)};s(e);let u=[];const g=(d,a)=>{const f={depth:a,id:[n,`${a}`].filter(Boolean).join("_"),headers:[]},p=[];d.forEach(w=>{const R=[...p].reverse()[0],_=w.column.depth===f.depth;let v,x=!1;if(_&&w.column.parent?v=w.column.parent:(v=w.column,x=!0),R&&(R==null?void 0:R.column)===v)R.subHeaders.push(w);else{const I=re(t,v,{id:[n,a,v.id,w==null?void 0:w.id].filter(Boolean).join("_"),isPlaceholder:x,placeholderId:x?`${p.filter(O=>O.column===v).length}`:void 0,depth:a,index:p.length});I.subHeaders.push(w),p.push(I)}f.headers.push(w),w.headerGroup=f}),u.push(f),a>0&&g(p,a-1)},c=o.map((d,a)=>re(t,d,{depth:l,index:a}));g(c,l-1),u.reverse();const C=d=>d.filter(f=>f.column.getIsVisible()).map(f=>{let p=0,w=0,R=[0];f.subHeaders&&f.subHeaders.length?(R=[],C(f.subHeaders).forEach(v=>{let{colSpan:x,rowSpan:I}=v;p+=x,R.push(I)})):p=1;const _=Math.min(...R);return w=w+_,f.colSpan=p,f.rowSpan=w,{colSpan:p,rowSpan:w}});return C((r=(i=u[0])==null?void 0:i.headers)!=null?r:[]),u}const _e=(e,o,t,n,r,i,l)=>{let s={id:o,index:n,original:t,depth:r,parentId:l,_valuesCache:{},_uniqueValuesCache:{},getValue:u=>{if(s._valuesCache.hasOwnProperty(u))return s._valuesCache[u];const g=e.getColumn(u);if(g!=null&&g.accessorFn)return s._valuesCache[u]=g.accessorFn(s.original,n),s._valuesCache[u]},getUniqueValues:u=>{if(s._uniqueValuesCache.hasOwnProperty(u))return s._uniqueValuesCache[u];const g=e.getColumn(u);if(g!=null&&g.accessorFn)return g.columnDef.getUniqueValues?(s._uniqueValuesCache[u]=g.columnDef.getUniqueValues(s.original,n),s._uniqueValuesCache[u]):(s._uniqueValuesCache[u]=[s.getValue(u)],s._uniqueValuesCache[u])},renderValue:u=>{var g;return(g=s.getValue(u))!=null?g:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>Re(s.subRows,u=>u.subRows),getParentRow:()=>s.parentId?e.getRow(s.parentId,!0):void 0,getParentRows:()=>{let u=[],g=s;for(;;){const c=g.getParentRow();if(!c)break;u.push(c),g=c}return u.reverse()},getAllCells:S(()=>[e.getAllLeafColumns()],u=>u.map(g=>we(e,s,g,g.id)),m(e.options,"debugRows")),_getAllCellsByColumnId:S(()=>[s.getAllCells()],u=>u.reduce((g,c)=>(g[c.column.id]=c,g),{}),m(e.options,"debugRows"))};for(let u=0;u<e._features.length;u++){const g=e._features[u];g==null||g.createRow==null||g.createRow(s,e)}return s},Fe={createColumn:(e,o)=>{e._getFacetedRowModel=o.options.getFacetedRowModel&&o.options.getFacetedRowModel(o,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():o.getPreFilteredRowModel(),e._getFacetedUniqueValues=o.options.getFacetedUniqueValues&&o.options.getFacetedUniqueValues(o,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=o.options.getFacetedMinMaxValues&&o.options.getFacetedMinMaxValues(o,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},le=(e,o,t)=>{var n,r;const i=t==null||(n=t.toString())==null?void 0:n.toLowerCase();return!!(!((r=e.getValue(o))==null||(r=r.toString())==null||(r=r.toLowerCase())==null)&&r.includes(i))};le.autoRemove=e=>$(e);const se=(e,o,t)=>{var n;return!!(!((n=e.getValue(o))==null||(n=n.toString())==null)&&n.includes(t))};se.autoRemove=e=>$(e);const ue=(e,o,t)=>{var n;return((n=e.getValue(o))==null||(n=n.toString())==null?void 0:n.toLowerCase())===(t==null?void 0:t.toLowerCase())};ue.autoRemove=e=>$(e);const ae=(e,o,t)=>{var n;return(n=e.getValue(o))==null?void 0:n.includes(t)};ae.autoRemove=e=>$(e)||!(e!=null&&e.length);const ge=(e,o,t)=>!t.some(n=>{var r;return!((r=e.getValue(o))!=null&&r.includes(n))});ge.autoRemove=e=>$(e)||!(e!=null&&e.length);const de=(e,o,t)=>t.some(n=>{var r;return(r=e.getValue(o))==null?void 0:r.includes(n)});de.autoRemove=e=>$(e)||!(e!=null&&e.length);const ce=(e,o,t)=>e.getValue(o)===t;ce.autoRemove=e=>$(e);const fe=(e,o,t)=>e.getValue(o)==t;fe.autoRemove=e=>$(e);const Z=(e,o,t)=>{let[n,r]=t;const i=e.getValue(o);return i>=n&&i<=r};Z.resolveFilterValue=e=>{let[o,t]=e,n=typeof o!="number"?parseFloat(o):o,r=typeof t!="number"?parseFloat(t):t,i=o===null||Number.isNaN(n)?-1/0:n,l=t===null||Number.isNaN(r)?1/0:r;if(i>l){const s=i;i=l,l=s}return[i,l]};Z.autoRemove=e=>$(e)||$(e[0])&&$(e[1]);const M={includesString:le,includesStringSensitive:se,equalsString:ue,arrIncludes:ae,arrIncludesAll:ge,arrIncludesSome:de,equals:ce,weakEquals:fe,inNumberRange:Z};function $(e){return e==null||e===""}const $e={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:F("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,o)=>{e.getAutoFilterFn=()=>{const t=o.getCoreRowModel().flatRows[0],n=t==null?void 0:t.getValue(e.id);return typeof n=="string"?M.includesString:typeof n=="number"?M.inNumberRange:typeof n=="boolean"||n!==null&&typeof n=="object"?M.equals:Array.isArray(n)?M.arrIncludes:M.weakEquals},e.getFilterFn=()=>{var t,n;return L(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(t=(n=o.options.filterFns)==null?void 0:n[e.columnDef.filterFn])!=null?t:M[e.columnDef.filterFn]},e.getCanFilter=()=>{var t,n,r;return((t=e.columnDef.enableColumnFilter)!=null?t:!0)&&((n=o.options.enableColumnFilters)!=null?n:!0)&&((r=o.options.enableFilters)!=null?r:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var t;return(t=o.getState().columnFilters)==null||(t=t.find(n=>n.id===e.id))==null?void 0:t.value},e.getFilterIndex=()=>{var t,n;return(t=(n=o.getState().columnFilters)==null?void 0:n.findIndex(r=>r.id===e.id))!=null?t:-1},e.setFilterValue=t=>{o.setColumnFilters(n=>{const r=e.getFilterFn(),i=n==null?void 0:n.find(c=>c.id===e.id),l=V(t,i?i.value:void 0);if(ie(r,l,e)){var s;return(s=n==null?void 0:n.filter(c=>c.id!==e.id))!=null?s:[]}const u={id:e.id,value:l};if(i){var g;return(g=n==null?void 0:n.map(c=>c.id===e.id?u:c))!=null?g:[]}return n!=null&&n.length?[...n,u]:[u]})}},createRow:(e,o)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=o=>{const t=e.getAllLeafColumns(),n=r=>{var i;return(i=V(o,r))==null?void 0:i.filter(l=>{const s=t.find(u=>u.id===l.id);if(s){const u=s.getFilterFn();if(ie(u,l.value,s))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(n)},e.resetColumnFilters=o=>{var t,n;e.setColumnFilters(o?[]:(t=(n=e.initialState)==null?void 0:n.columnFilters)!=null?t:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function ie(e,o,t){return(e&&e.autoRemove?e.autoRemove(o,t):!1)||typeof o>"u"||typeof o=="string"&&!o}const Me=(e,o,t)=>t.reduce((n,r)=>{const i=r.getValue(e);return n+(typeof i=="number"?i:0)},0),xe=(e,o,t)=>{let n;return t.forEach(r=>{const i=r.getValue(e);i!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}),n},Ve=(e,o,t)=>{let n;return t.forEach(r=>{const i=r.getValue(e);i!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}),n},Pe=(e,o,t)=>{let n,r;return t.forEach(i=>{const l=i.getValue(e);l!=null&&(n===void 0?l>=l&&(n=r=l):(n>l&&(n=l),r<l&&(r=l)))}),[n,r]},Ie=(e,o)=>{let t=0,n=0;if(o.forEach(r=>{let i=r.getValue(e);i!=null&&(i=+i)>=i&&(++t,n+=i)}),t)return n/t},ye=(e,o)=>{if(!o.length)return;const t=o.map(i=>i.getValue(e));if(!Ce(t))return;if(t.length===1)return t[0];const n=Math.floor(t.length/2),r=t.sort((i,l)=>i-l);return t.length%2!==0?r[n]:(r[n-1]+r[n])/2},Ee=(e,o)=>Array.from(new Set(o.map(t=>t.getValue(e))).values()),De=(e,o)=>new Set(o.map(t=>t.getValue(e))).size,He=(e,o)=>o.length,T={sum:Me,min:xe,max:Ve,extent:Pe,mean:Ie,median:ye,unique:Ee,uniqueCount:De,count:He},Ge={getDefaultColumnDef:()=>({aggregatedCell:e=>{var o,t;return(o=(t=e.getValue())==null||t.toString==null?void 0:t.toString())!=null?o:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:F("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,o)=>{e.toggleGrouping=()=>{o.setGrouping(t=>t!=null&&t.includes(e.id)?t.filter(n=>n!==e.id):[...t??[],e.id])},e.getCanGroup=()=>{var t,n;return((t=e.columnDef.enableGrouping)!=null?t:!0)&&((n=o.options.enableGrouping)!=null?n:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var t;return(t=o.getState().grouping)==null?void 0:t.includes(e.id)},e.getGroupedIndex=()=>{var t;return(t=o.getState().grouping)==null?void 0:t.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const t=e.getCanGroup();return()=>{t&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const t=o.getCoreRowModel().flatRows[0],n=t==null?void 0:t.getValue(e.id);if(typeof n=="number")return T.sum;if(Object.prototype.toString.call(n)==="[object Date]")return T.extent},e.getAggregationFn=()=>{var t,n;if(!e)throw new Error;return L(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(t=(n=o.options.aggregationFns)==null?void 0:n[e.columnDef.aggregationFn])!=null?t:T[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=o=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(o),e.resetGrouping=o=>{var t,n;e.setGrouping(o?[]:(t=(n=e.initialState)==null?void 0:n.grouping)!=null?t:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,o)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=t=>{if(e._groupingValuesCache.hasOwnProperty(t))return e._groupingValuesCache[t];const n=o.getColumn(t);return n!=null&&n.columnDef.getGroupingValue?(e._groupingValuesCache[t]=n.columnDef.getGroupingValue(e.original),e._groupingValuesCache[t]):e.getValue(t)},e._groupingValuesCache={}},createCell:(e,o,t,n)=>{e.getIsGrouped=()=>o.getIsGrouped()&&o.id===t.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&o.getIsGrouped(),e.getIsAggregated=()=>{var r;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((r=t.subRows)!=null&&r.length)}}};function Ae(e,o,t){if(!(o!=null&&o.length)||!t)return e;const n=e.filter(i=>!o.includes(i.id));return t==="remove"?n:[...o.map(i=>e.find(l=>l.id===i)).filter(Boolean),...n]}const ze={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:F("columnOrder",e)}),createColumn:(e,o)=>{e.getIndex=S(t=>[H(o,t)],t=>t.findIndex(n=>n.id===e.id),m(o.options,"debugColumns")),e.getIsFirstColumn=t=>{var n;return((n=H(o,t)[0])==null?void 0:n.id)===e.id},e.getIsLastColumn=t=>{var n;const r=H(o,t);return((n=r[r.length-1])==null?void 0:n.id)===e.id}},createTable:e=>{e.setColumnOrder=o=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(o),e.resetColumnOrder=o=>{var t;e.setColumnOrder(o?[]:(t=e.initialState.columnOrder)!=null?t:[])},e._getOrderColumnsFn=S(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(o,t,n)=>r=>{let i=[];if(!(o!=null&&o.length))i=r;else{const l=[...o],s=[...r];for(;s.length&&l.length;){const u=l.shift(),g=s.findIndex(c=>c.id===u);g>-1&&i.push(s.splice(g,1)[0])}i=[...i,...s]}return Ae(i,t,n)},m(e.options,"debugTable"))}},B=()=>({left:[],right:[]}),Le={getInitialState:e=>({columnPinning:B(),...e}),getDefaultOptions:e=>({onColumnPinningChange:F("columnPinning",e)}),createColumn:(e,o)=>{e.pin=t=>{const n=e.getLeafColumns().map(r=>r.id).filter(Boolean);o.setColumnPinning(r=>{var i,l;if(t==="right"){var s,u;return{left:((s=r==null?void 0:r.left)!=null?s:[]).filter(C=>!(n!=null&&n.includes(C))),right:[...((u=r==null?void 0:r.right)!=null?u:[]).filter(C=>!(n!=null&&n.includes(C))),...n]}}if(t==="left"){var g,c;return{left:[...((g=r==null?void 0:r.left)!=null?g:[]).filter(C=>!(n!=null&&n.includes(C))),...n],right:((c=r==null?void 0:r.right)!=null?c:[]).filter(C=>!(n!=null&&n.includes(C)))}}return{left:((i=r==null?void 0:r.left)!=null?i:[]).filter(C=>!(n!=null&&n.includes(C))),right:((l=r==null?void 0:r.right)!=null?l:[]).filter(C=>!(n!=null&&n.includes(C)))}})},e.getCanPin=()=>e.getLeafColumns().some(n=>{var r,i,l;return((r=n.columnDef.enablePinning)!=null?r:!0)&&((i=(l=o.options.enableColumnPinning)!=null?l:o.options.enablePinning)!=null?i:!0)}),e.getIsPinned=()=>{const t=e.getLeafColumns().map(s=>s.id),{left:n,right:r}=o.getState().columnPinning,i=t.some(s=>n==null?void 0:n.includes(s)),l=t.some(s=>r==null?void 0:r.includes(s));return i?"left":l?"right":!1},e.getPinnedIndex=()=>{var t,n;const r=e.getIsPinned();return r?(t=(n=o.getState().columnPinning)==null||(n=n[r])==null?void 0:n.indexOf(e.id))!=null?t:-1:0}},createRow:(e,o)=>{e.getCenterVisibleCells=S(()=>[e._getAllVisibleCells(),o.getState().columnPinning.left,o.getState().columnPinning.right],(t,n,r)=>{const i=[...n??[],...r??[]];return t.filter(l=>!i.includes(l.column.id))},m(o.options,"debugRows")),e.getLeftVisibleCells=S(()=>[e._getAllVisibleCells(),o.getState().columnPinning.left],(t,n)=>(n??[]).map(i=>t.find(l=>l.column.id===i)).filter(Boolean).map(i=>({...i,position:"left"})),m(o.options,"debugRows")),e.getRightVisibleCells=S(()=>[e._getAllVisibleCells(),o.getState().columnPinning.right],(t,n)=>(n??[]).map(i=>t.find(l=>l.column.id===i)).filter(Boolean).map(i=>({...i,position:"right"})),m(o.options,"debugRows"))},createTable:e=>{e.setColumnPinning=o=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(o),e.resetColumnPinning=o=>{var t,n;return e.setColumnPinning(o?B():(t=(n=e.initialState)==null?void 0:n.columnPinning)!=null?t:B())},e.getIsSomeColumnsPinned=o=>{var t;const n=e.getState().columnPinning;if(!o){var r,i;return!!((r=n.left)!=null&&r.length||(i=n.right)!=null&&i.length)}return!!((t=n[o])!=null&&t.length)},e.getLeftLeafColumns=S(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(o,t)=>(t??[]).map(n=>o.find(r=>r.id===n)).filter(Boolean),m(e.options,"debugColumns")),e.getRightLeafColumns=S(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(o,t)=>(t??[]).map(n=>o.find(r=>r.id===n)).filter(Boolean),m(e.options,"debugColumns")),e.getCenterLeafColumns=S(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(o,t,n)=>{const r=[...t??[],...n??[]];return o.filter(i=>!r.includes(i.id))},m(e.options,"debugColumns"))}},A={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},q=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),Oe={getDefaultColumnDef:()=>A,getInitialState:e=>({columnSizing:{},columnSizingInfo:q(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:F("columnSizing",e),onColumnSizingInfoChange:F("columnSizingInfo",e)}),createColumn:(e,o)=>{e.getSize=()=>{var t,n,r;const i=o.getState().columnSizing[e.id];return Math.min(Math.max((t=e.columnDef.minSize)!=null?t:A.minSize,(n=i??e.columnDef.size)!=null?n:A.size),(r=e.columnDef.maxSize)!=null?r:A.maxSize)},e.getStart=S(t=>[t,H(o,t),o.getState().columnSizing],(t,n)=>n.slice(0,e.getIndex(t)).reduce((r,i)=>r+i.getSize(),0),m(o.options,"debugColumns")),e.getAfter=S(t=>[t,H(o,t),o.getState().columnSizing],(t,n)=>n.slice(e.getIndex(t)+1).reduce((r,i)=>r+i.getSize(),0),m(o.options,"debugColumns")),e.resetSize=()=>{o.setColumnSizing(t=>{let{[e.id]:n,...r}=t;return r})},e.getCanResize=()=>{var t,n;return((t=e.columnDef.enableResizing)!=null?t:!0)&&((n=o.options.enableColumnResizing)!=null?n:!0)},e.getIsResizing=()=>o.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,o)=>{e.getSize=()=>{let t=0;const n=r=>{if(r.subHeaders.length)r.subHeaders.forEach(n);else{var i;t+=(i=r.column.getSize())!=null?i:0}};return n(e),t},e.getStart=()=>{if(e.index>0){const t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},e.getResizeHandler=t=>{const n=o.getColumn(e.column.id),r=n==null?void 0:n.getCanResize();return i=>{if(!n||!r||(i.persist==null||i.persist(),k(i)&&i.touches&&i.touches.length>1))return;const l=e.getSize(),s=e?e.getLeafHeaders().map(R=>[R.column.id,R.column.getSize()]):[[n.id,n.getSize()]],u=k(i)?Math.round(i.touches[0].clientX):i.clientX,g={},c=(R,_)=>{typeof _=="number"&&(o.setColumnSizingInfo(v=>{var x,I;const O=o.options.columnResizeDirection==="rtl"?-1:1,te=(_-((x=v==null?void 0:v.startOffset)!=null?x:0))*O,ne=Math.max(te/((I=v==null?void 0:v.startSize)!=null?I:0),-.999999);return v.columnSizingStart.forEach(Se=>{let[me,oe]=Se;g[me]=Math.round(Math.max(oe+oe*ne,0)*100)/100}),{...v,deltaOffset:te,deltaPercentage:ne}}),(o.options.columnResizeMode==="onChange"||R==="end")&&o.setColumnSizing(v=>({...v,...g})))},C=R=>c("move",R),d=R=>{c("end",R),o.setColumnSizingInfo(_=>({..._,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},a=t||typeof document<"u"?document:null,f={moveHandler:R=>C(R.clientX),upHandler:R=>{a==null||a.removeEventListener("mousemove",f.moveHandler),a==null||a.removeEventListener("mouseup",f.upHandler),d(R.clientX)}},p={moveHandler:R=>(R.cancelable&&(R.preventDefault(),R.stopPropagation()),C(R.touches[0].clientX),!1),upHandler:R=>{var _;a==null||a.removeEventListener("touchmove",p.moveHandler),a==null||a.removeEventListener("touchend",p.upHandler),R.cancelable&&(R.preventDefault(),R.stopPropagation()),d((_=R.touches[0])==null?void 0:_.clientX)}},w=Te()?{passive:!1}:!1;k(i)?(a==null||a.addEventListener("touchmove",p.moveHandler,w),a==null||a.addEventListener("touchend",p.upHandler,w)):(a==null||a.addEventListener("mousemove",f.moveHandler,w),a==null||a.addEventListener("mouseup",f.upHandler,w)),o.setColumnSizingInfo(R=>({...R,startOffset:u,startSize:l,deltaOffset:0,deltaPercentage:0,columnSizingStart:s,isResizingColumn:n.id}))}}},createTable:e=>{e.setColumnSizing=o=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(o),e.setColumnSizingInfo=o=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(o),e.resetColumnSizing=o=>{var t;e.setColumnSizing(o?{}:(t=e.initialState.columnSizing)!=null?t:{})},e.resetHeaderSizeInfo=o=>{var t;e.setColumnSizingInfo(o?q():(t=e.initialState.columnSizingInfo)!=null?t:q())},e.getTotalSize=()=>{var o,t;return(o=(t=e.getHeaderGroups()[0])==null?void 0:t.headers.reduce((n,r)=>n+r.getSize(),0))!=null?o:0},e.getLeftTotalSize=()=>{var o,t;return(o=(t=e.getLeftHeaderGroups()[0])==null?void 0:t.headers.reduce((n,r)=>n+r.getSize(),0))!=null?o:0},e.getCenterTotalSize=()=>{var o,t;return(o=(t=e.getCenterHeaderGroups()[0])==null?void 0:t.headers.reduce((n,r)=>n+r.getSize(),0))!=null?o:0},e.getRightTotalSize=()=>{var o,t;return(o=(t=e.getRightHeaderGroups()[0])==null?void 0:t.headers.reduce((n,r)=>n+r.getSize(),0))!=null?o:0}}};let z=null;function Te(){if(typeof z=="boolean")return z;let e=!1;try{const o={get passive(){return e=!0,!1}},t=()=>{};window.addEventListener("test",t,o),window.removeEventListener("test",t)}catch{e=!1}return z=e,z}function k(e){return e.type==="touchstart"}const Be={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:F("columnVisibility",e)}),createColumn:(e,o)=>{e.toggleVisibility=t=>{e.getCanHide()&&o.setColumnVisibility(n=>({...n,[e.id]:t??!e.getIsVisible()}))},e.getIsVisible=()=>{var t,n;const r=e.columns;return(t=r.length?r.some(i=>i.getIsVisible()):(n=o.getState().columnVisibility)==null?void 0:n[e.id])!=null?t:!0},e.getCanHide=()=>{var t,n;return((t=e.columnDef.enableHiding)!=null?t:!0)&&((n=o.options.enableHiding)!=null?n:!0)},e.getToggleVisibilityHandler=()=>t=>{e.toggleVisibility==null||e.toggleVisibility(t.target.checked)}},createRow:(e,o)=>{e._getAllVisibleCells=S(()=>[e.getAllCells(),o.getState().columnVisibility],t=>t.filter(n=>n.column.getIsVisible()),m(o.options,"debugRows")),e.getVisibleCells=S(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(t,n,r)=>[...t,...n,...r],m(o.options,"debugRows"))},createTable:e=>{const o=(t,n)=>S(()=>[n(),n().filter(r=>r.getIsVisible()).map(r=>r.id).join("_")],r=>r.filter(i=>i.getIsVisible==null?void 0:i.getIsVisible()),m(e.options,"debugColumns"));e.getVisibleFlatColumns=o("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=o("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=o("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=o("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=o("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=t=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(t),e.resetColumnVisibility=t=>{var n;e.setColumnVisibility(t?{}:(n=e.initialState.columnVisibility)!=null?n:{})},e.toggleAllColumnsVisible=t=>{var n;t=(n=t)!=null?n:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((r,i)=>({...r,[i.id]:t||!(i.getCanHide!=null&&i.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(t=>!(t.getIsVisible!=null&&t.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(t=>t.getIsVisible==null?void 0:t.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>t=>{var n;e.toggleAllColumnsVisible((n=t.target)==null?void 0:n.checked)}}};function H(e,o){return o?o==="center"?e.getCenterVisibleLeafColumns():o==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const qe={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},ke={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:F("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:o=>{var t;const n=(t=e.getCoreRowModel().flatRows[0])==null||(t=t._getAllCellsByColumnId()[o.id])==null?void 0:t.getValue();return typeof n=="string"||typeof n=="number"}}),createColumn:(e,o)=>{e.getCanGlobalFilter=()=>{var t,n,r,i;return((t=e.columnDef.enableGlobalFilter)!=null?t:!0)&&((n=o.options.enableGlobalFilter)!=null?n:!0)&&((r=o.options.enableFilters)!=null?r:!0)&&((i=o.options.getColumnCanGlobalFilter==null?void 0:o.options.getColumnCanGlobalFilter(e))!=null?i:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>M.includesString,e.getGlobalFilterFn=()=>{var o,t;const{globalFilterFn:n}=e.options;return L(n)?n:n==="auto"?e.getGlobalAutoFilterFn():(o=(t=e.options.filterFns)==null?void 0:t[n])!=null?o:M[n]},e.setGlobalFilter=o=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(o)},e.resetGlobalFilter=o=>{e.setGlobalFilter(o?void 0:e.initialState.globalFilter)}}},je={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:F("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let o=!1,t=!1;e._autoResetExpanded=()=>{var n,r;if(!o){e._queue(()=>{o=!0});return}if((n=(r=e.options.autoResetAll)!=null?r:e.options.autoResetExpanded)!=null?n:!e.options.manualExpanding){if(t)return;t=!0,e._queue(()=>{e.resetExpanded(),t=!1})}},e.setExpanded=n=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(n),e.toggleAllRowsExpanded=n=>{n??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=n=>{var r,i;e.setExpanded(n?{}:(r=(i=e.initialState)==null?void 0:i.expanded)!=null?r:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(n=>n.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>n=>{n.persist==null||n.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const n=e.getState().expanded;return n===!0||Object.values(n).some(Boolean)},e.getIsAllRowsExpanded=()=>{const n=e.getState().expanded;return typeof n=="boolean"?n===!0:!(!Object.keys(n).length||e.getRowModel().flatRows.some(r=>!r.getIsExpanded()))},e.getExpandedDepth=()=>{let n=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(i=>{const l=i.split(".");n=Math.max(n,l.length)}),n},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,o)=>{e.toggleExpanded=t=>{o.setExpanded(n=>{var r;const i=n===!0?!0:!!(n!=null&&n[e.id]);let l={};if(n===!0?Object.keys(o.getRowModel().rowsById).forEach(s=>{l[s]=!0}):l=n,t=(r=t)!=null?r:!i,!i&&t)return{...l,[e.id]:!0};if(i&&!t){const{[e.id]:s,...u}=l;return u}return n})},e.getIsExpanded=()=>{var t;const n=o.getState().expanded;return!!((t=o.options.getIsRowExpanded==null?void 0:o.options.getIsRowExpanded(e))!=null?t:n===!0||n!=null&&n[e.id])},e.getCanExpand=()=>{var t,n,r;return(t=o.options.getRowCanExpand==null?void 0:o.options.getRowCanExpand(e))!=null?t:((n=o.options.enableExpanding)!=null?n:!0)&&!!((r=e.subRows)!=null&&r.length)},e.getIsAllParentsExpanded=()=>{let t=!0,n=e;for(;t&&n.parentId;)n=o.getRow(n.parentId,!0),t=n.getIsExpanded();return t},e.getToggleExpandedHandler=()=>{const t=e.getCanExpand();return()=>{t&&e.toggleExpanded()}}}},K=0,J=10,j=()=>({pageIndex:K,pageSize:J}),Ne={getInitialState:e=>({...e,pagination:{...j(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:F("pagination",e)}),createTable:e=>{let o=!1,t=!1;e._autoResetPageIndex=()=>{var n,r;if(!o){e._queue(()=>{o=!0});return}if((n=(r=e.options.autoResetAll)!=null?r:e.options.autoResetPageIndex)!=null?n:!e.options.manualPagination){if(t)return;t=!0,e._queue(()=>{e.resetPageIndex(),t=!1})}},e.setPagination=n=>{const r=i=>V(n,i);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(r)},e.resetPagination=n=>{var r;e.setPagination(n?j():(r=e.initialState.pagination)!=null?r:j())},e.setPageIndex=n=>{e.setPagination(r=>{let i=V(n,r.pageIndex);const l=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return i=Math.max(0,Math.min(i,l)),{...r,pageIndex:i}})},e.resetPageIndex=n=>{var r,i;e.setPageIndex(n?K:(r=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageIndex)!=null?r:K)},e.resetPageSize=n=>{var r,i;e.setPageSize(n?J:(r=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageSize)!=null?r:J)},e.setPageSize=n=>{e.setPagination(r=>{const i=Math.max(1,V(n,r.pageSize)),l=r.pageSize*r.pageIndex,s=Math.floor(l/i);return{...r,pageIndex:s,pageSize:i}})},e.setPageCount=n=>e.setPagination(r=>{var i;let l=V(n,(i=e.options.pageCount)!=null?i:-1);return typeof l=="number"&&(l=Math.max(-1,l)),{...r,pageCount:l}}),e.getPageOptions=S(()=>[e.getPageCount()],n=>{let r=[];return n&&n>0&&(r=[...new Array(n)].fill(null).map((i,l)=>l)),r},m(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:n}=e.getState().pagination,r=e.getPageCount();return r===-1?!0:r===0?!1:n<r-1},e.previousPage=()=>e.setPageIndex(n=>n-1),e.nextPage=()=>e.setPageIndex(n=>n+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var n;return(n=e.options.pageCount)!=null?n:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var n;return(n=e.options.rowCount)!=null?n:e.getPrePaginationRowModel().rows.length}}},N=()=>({top:[],bottom:[]}),Ue={getInitialState:e=>({rowPinning:N(),...e}),getDefaultOptions:e=>({onRowPinningChange:F("rowPinning",e)}),createRow:(e,o)=>{e.pin=(t,n,r)=>{const i=n?e.getLeafRows().map(u=>{let{id:g}=u;return g}):[],l=r?e.getParentRows().map(u=>{let{id:g}=u;return g}):[],s=new Set([...l,e.id,...i]);o.setRowPinning(u=>{var g,c;if(t==="bottom"){var C,d;return{top:((C=u==null?void 0:u.top)!=null?C:[]).filter(p=>!(s!=null&&s.has(p))),bottom:[...((d=u==null?void 0:u.bottom)!=null?d:[]).filter(p=>!(s!=null&&s.has(p))),...Array.from(s)]}}if(t==="top"){var a,f;return{top:[...((a=u==null?void 0:u.top)!=null?a:[]).filter(p=>!(s!=null&&s.has(p))),...Array.from(s)],bottom:((f=u==null?void 0:u.bottom)!=null?f:[]).filter(p=>!(s!=null&&s.has(p)))}}return{top:((g=u==null?void 0:u.top)!=null?g:[]).filter(p=>!(s!=null&&s.has(p))),bottom:((c=u==null?void 0:u.bottom)!=null?c:[]).filter(p=>!(s!=null&&s.has(p)))}})},e.getCanPin=()=>{var t;const{enableRowPinning:n,enablePinning:r}=o.options;return typeof n=="function"?n(e):(t=n??r)!=null?t:!0},e.getIsPinned=()=>{const t=[e.id],{top:n,bottom:r}=o.getState().rowPinning,i=t.some(s=>n==null?void 0:n.includes(s)),l=t.some(s=>r==null?void 0:r.includes(s));return i?"top":l?"bottom":!1},e.getPinnedIndex=()=>{var t,n;const r=e.getIsPinned();if(!r)return-1;const i=(t=r==="top"?o.getTopRows():o.getBottomRows())==null?void 0:t.map(l=>{let{id:s}=l;return s});return(n=i==null?void 0:i.indexOf(e.id))!=null?n:-1}},createTable:e=>{e.setRowPinning=o=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(o),e.resetRowPinning=o=>{var t,n;return e.setRowPinning(o?N():(t=(n=e.initialState)==null?void 0:n.rowPinning)!=null?t:N())},e.getIsSomeRowsPinned=o=>{var t;const n=e.getState().rowPinning;if(!o){var r,i;return!!((r=n.top)!=null&&r.length||(i=n.bottom)!=null&&i.length)}return!!((t=n[o])!=null&&t.length)},e._getPinnedRows=(o,t,n)=>{var r;return((r=e.options.keepPinnedRows)==null||r?(t??[]).map(l=>{const s=e.getRow(l,!0);return s.getIsAllParentsExpanded()?s:null}):(t??[]).map(l=>o.find(s=>s.id===l))).filter(Boolean).map(l=>({...l,position:n}))},e.getTopRows=S(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(o,t)=>e._getPinnedRows(o,t,"top"),m(e.options,"debugRows")),e.getBottomRows=S(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(o,t)=>e._getPinnedRows(o,t,"bottom"),m(e.options,"debugRows")),e.getCenterRows=S(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(o,t,n)=>{const r=new Set([...t??[],...n??[]]);return o.filter(i=>!r.has(i.id))},m(e.options,"debugRows"))}},Xe={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:F("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=o=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(o),e.resetRowSelection=o=>{var t;return e.setRowSelection(o?{}:(t=e.initialState.rowSelection)!=null?t:{})},e.toggleAllRowsSelected=o=>{e.setRowSelection(t=>{o=typeof o<"u"?o:!e.getIsAllRowsSelected();const n={...t},r=e.getPreGroupedRowModel().flatRows;return o?r.forEach(i=>{i.getCanSelect()&&(n[i.id]=!0)}):r.forEach(i=>{delete n[i.id]}),n})},e.toggleAllPageRowsSelected=o=>e.setRowSelection(t=>{const n=typeof o<"u"?o:!e.getIsAllPageRowsSelected(),r={...t};return e.getRowModel().rows.forEach(i=>{Q(r,i.id,n,!0,e)}),r}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=S(()=>[e.getState().rowSelection,e.getCoreRowModel()],(o,t)=>Object.keys(o).length?U(e,t):{rows:[],flatRows:[],rowsById:{}},m(e.options,"debugTable")),e.getFilteredSelectedRowModel=S(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(o,t)=>Object.keys(o).length?U(e,t):{rows:[],flatRows:[],rowsById:{}},m(e.options,"debugTable")),e.getGroupedSelectedRowModel=S(()=>[e.getState().rowSelection,e.getSortedRowModel()],(o,t)=>Object.keys(o).length?U(e,t):{rows:[],flatRows:[],rowsById:{}},m(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const o=e.getFilteredRowModel().flatRows,{rowSelection:t}=e.getState();let n=!!(o.length&&Object.keys(t).length);return n&&o.some(r=>r.getCanSelect()&&!t[r.id])&&(n=!1),n},e.getIsAllPageRowsSelected=()=>{const o=e.getPaginationRowModel().flatRows.filter(r=>r.getCanSelect()),{rowSelection:t}=e.getState();let n=!!o.length;return n&&o.some(r=>!t[r.id])&&(n=!1),n},e.getIsSomeRowsSelected=()=>{var o;const t=Object.keys((o=e.getState().rowSelection)!=null?o:{}).length;return t>0&&t<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const o=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:o.filter(t=>t.getCanSelect()).some(t=>t.getIsSelected()||t.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>o=>{e.toggleAllRowsSelected(o.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>o=>{e.toggleAllPageRowsSelected(o.target.checked)}},createRow:(e,o)=>{e.toggleSelected=(t,n)=>{const r=e.getIsSelected();o.setRowSelection(i=>{var l;if(t=typeof t<"u"?t:!r,e.getCanSelect()&&r===t)return i;const s={...i};return Q(s,e.id,t,(l=n==null?void 0:n.selectChildren)!=null?l:!0,o),s})},e.getIsSelected=()=>{const{rowSelection:t}=o.getState();return b(e,t)},e.getIsSomeSelected=()=>{const{rowSelection:t}=o.getState();return W(e,t)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:t}=o.getState();return W(e,t)==="all"},e.getCanSelect=()=>{var t;return typeof o.options.enableRowSelection=="function"?o.options.enableRowSelection(e):(t=o.options.enableRowSelection)!=null?t:!0},e.getCanSelectSubRows=()=>{var t;return typeof o.options.enableSubRowSelection=="function"?o.options.enableSubRowSelection(e):(t=o.options.enableSubRowSelection)!=null?t:!0},e.getCanMultiSelect=()=>{var t;return typeof o.options.enableMultiRowSelection=="function"?o.options.enableMultiRowSelection(e):(t=o.options.enableMultiRowSelection)!=null?t:!0},e.getToggleSelectedHandler=()=>{const t=e.getCanSelect();return n=>{var r;t&&e.toggleSelected((r=n.target)==null?void 0:r.checked)}}}},Q=(e,o,t,n,r)=>{var i;const l=r.getRow(o,!0);t?(l.getCanMultiSelect()||Object.keys(e).forEach(s=>delete e[s]),l.getCanSelect()&&(e[o]=!0)):delete e[o],n&&(i=l.subRows)!=null&&i.length&&l.getCanSelectSubRows()&&l.subRows.forEach(s=>Q(e,s.id,t,n,r))};function U(e,o){const t=e.getState().rowSelection,n=[],r={},i=function(l,s){return l.map(u=>{var g;const c=b(u,t);if(c&&(n.push(u),r[u.id]=u),(g=u.subRows)!=null&&g.length&&(u={...u,subRows:i(u.subRows)}),c)return u}).filter(Boolean)};return{rows:i(o.rows),flatRows:n,rowsById:r}}function b(e,o){var t;return(t=o[e.id])!=null?t:!1}function W(e,o,t){var n;if(!((n=e.subRows)!=null&&n.length))return!1;let r=!0,i=!1;return e.subRows.forEach(l=>{if(!(i&&!r)&&(l.getCanSelect()&&(b(l,o)?i=!0:r=!1),l.subRows&&l.subRows.length)){const s=W(l,o);s==="all"?i=!0:(s==="some"&&(i=!0),r=!1)}}),r?"all":i?"some":!1}const Y=/([0-9]+)/gm,Ke=(e,o,t)=>pe(P(e.getValue(t)).toLowerCase(),P(o.getValue(t)).toLowerCase()),Je=(e,o,t)=>pe(P(e.getValue(t)),P(o.getValue(t))),Qe=(e,o,t)=>ee(P(e.getValue(t)).toLowerCase(),P(o.getValue(t)).toLowerCase()),We=(e,o,t)=>ee(P(e.getValue(t)),P(o.getValue(t))),Ye=(e,o,t)=>{const n=e.getValue(t),r=o.getValue(t);return n>r?1:n<r?-1:0},Ze=(e,o,t)=>ee(e.getValue(t),o.getValue(t));function ee(e,o){return e===o?0:e>o?1:-1}function P(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function pe(e,o){const t=e.split(Y).filter(Boolean),n=o.split(Y).filter(Boolean);for(;t.length&&n.length;){const r=t.shift(),i=n.shift(),l=parseInt(r,10),s=parseInt(i,10),u=[l,s].sort();if(isNaN(u[0])){if(r>i)return 1;if(i>r)return-1;continue}if(isNaN(u[1]))return isNaN(l)?-1:1;if(l>s)return 1;if(s>l)return-1}return t.length-n.length}const D={alphanumeric:Ke,alphanumericCaseSensitive:Je,text:Qe,textCaseSensitive:We,datetime:Ye,basic:Ze},be={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:F("sorting",e),isMultiSortEvent:o=>o.shiftKey}),createColumn:(e,o)=>{e.getAutoSortingFn=()=>{const t=o.getFilteredRowModel().flatRows.slice(10);let n=!1;for(const r of t){const i=r==null?void 0:r.getValue(e.id);if(Object.prototype.toString.call(i)==="[object Date]")return D.datetime;if(typeof i=="string"&&(n=!0,i.split(Y).length>1))return D.alphanumeric}return n?D.text:D.basic},e.getAutoSortDir=()=>{const t=o.getFilteredRowModel().flatRows[0];return typeof(t==null?void 0:t.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var t,n;if(!e)throw new Error;return L(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(t=(n=o.options.sortingFns)==null?void 0:n[e.columnDef.sortingFn])!=null?t:D[e.columnDef.sortingFn]},e.toggleSorting=(t,n)=>{const r=e.getNextSortingOrder(),i=typeof t<"u"&&t!==null;o.setSorting(l=>{const s=l==null?void 0:l.find(a=>a.id===e.id),u=l==null?void 0:l.findIndex(a=>a.id===e.id);let g=[],c,C=i?t:r==="desc";if(l!=null&&l.length&&e.getCanMultiSort()&&n?s?c="toggle":c="add":l!=null&&l.length&&u!==l.length-1?c="replace":s?c="toggle":c="replace",c==="toggle"&&(i||r||(c="remove")),c==="add"){var d;g=[...l,{id:e.id,desc:C}],g.splice(0,g.length-((d=o.options.maxMultiSortColCount)!=null?d:Number.MAX_SAFE_INTEGER))}else c==="toggle"?g=l.map(a=>a.id===e.id?{...a,desc:C}:a):c==="remove"?g=l.filter(a=>a.id!==e.id):g=[{id:e.id,desc:C}];return g})},e.getFirstSortDir=()=>{var t,n;return((t=(n=e.columnDef.sortDescFirst)!=null?n:o.options.sortDescFirst)!=null?t:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=t=>{var n,r;const i=e.getFirstSortDir(),l=e.getIsSorted();return l?l!==i&&((n=o.options.enableSortingRemoval)==null||n)&&(!(t&&(r=o.options.enableMultiRemove)!=null)||r)?!1:l==="desc"?"asc":"desc":i},e.getCanSort=()=>{var t,n;return((t=e.columnDef.enableSorting)!=null?t:!0)&&((n=o.options.enableSorting)!=null?n:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var t,n;return(t=(n=e.columnDef.enableMultiSort)!=null?n:o.options.enableMultiSort)!=null?t:!!e.accessorFn},e.getIsSorted=()=>{var t;const n=(t=o.getState().sorting)==null?void 0:t.find(r=>r.id===e.id);return n?n.desc?"desc":"asc":!1},e.getSortIndex=()=>{var t,n;return(t=(n=o.getState().sorting)==null?void 0:n.findIndex(r=>r.id===e.id))!=null?t:-1},e.clearSorting=()=>{o.setSorting(t=>t!=null&&t.length?t.filter(n=>n.id!==e.id):[])},e.getToggleSortingHandler=()=>{const t=e.getCanSort();return n=>{t&&(n.persist==null||n.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?o.options.isMultiSortEvent==null?void 0:o.options.isMultiSortEvent(n):!1))}}},createTable:e=>{e.setSorting=o=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(o),e.resetSorting=o=>{var t,n;e.setSorting(o?[]:(t=(n=e.initialState)==null?void 0:n.sorting)!=null?t:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},et=[he,Be,ze,Le,Fe,$e,qe,ke,be,Ge,je,Ne,Ue,Xe,Oe];function tt(e){var o,t;const n=[...et,...(o=e._features)!=null?o:[]];let r={_features:n};const i=r._features.reduce((d,a)=>Object.assign(d,a.getDefaultOptions==null?void 0:a.getDefaultOptions(r)),{}),l=d=>r.options.mergeOptions?r.options.mergeOptions(i,d):{...i,...d};let u={...{},...(t=e.initialState)!=null?t:{}};r._features.forEach(d=>{var a;u=(a=d.getInitialState==null?void 0:d.getInitialState(u))!=null?a:u});const g=[];let c=!1;const C={_features:n,options:{...i,...e},initialState:u,_queue:d=>{g.push(d),c||(c=!0,Promise.resolve().then(()=>{for(;g.length;)g.shift()();c=!1}).catch(a=>setTimeout(()=>{throw a})))},reset:()=>{r.setState(r.initialState)},setOptions:d=>{const a=V(d,r.options);r.options=l(a)},getState:()=>r.options.state,setState:d=>{r.options.onStateChange==null||r.options.onStateChange(d)},_getRowId:(d,a,f)=>{var p;return(p=r.options.getRowId==null?void 0:r.options.getRowId(d,a,f))!=null?p:`${f?[f.id,a].join("."):a}`},getCoreRowModel:()=>(r._getCoreRowModel||(r._getCoreRowModel=r.options.getCoreRowModel(r)),r._getCoreRowModel()),getRowModel:()=>r.getPaginationRowModel(),getRow:(d,a)=>{let f=(a?r.getPrePaginationRowModel():r.getRowModel()).rowsById[d];if(!f&&(f=r.getCoreRowModel().rowsById[d],!f))throw new Error;return f},_getDefaultColumnDef:S(()=>[r.options.defaultColumn],d=>{var a;return d=(a=d)!=null?a:{},{header:f=>{const p=f.header.column.columnDef;return p.accessorKey?p.accessorKey:p.accessorFn?p.id:null},cell:f=>{var p,w;return(p=(w=f.renderValue())==null||w.toString==null?void 0:w.toString())!=null?p:null},...r._features.reduce((f,p)=>Object.assign(f,p.getDefaultColumnDef==null?void 0:p.getDefaultColumnDef()),{}),...d}},m(e,"debugColumns")),_getColumnDefs:()=>r.options.columns,getAllColumns:S(()=>[r._getColumnDefs()],d=>{const a=function(f,p,w){return w===void 0&&(w=0),f.map(R=>{const _=ve(r,R,w,p),v=R;return _.columns=v.columns?a(v.columns,_,w+1):[],_})};return a(d)},m(e,"debugColumns")),getAllFlatColumns:S(()=>[r.getAllColumns()],d=>d.flatMap(a=>a.getFlatColumns()),m(e,"debugColumns")),_getAllFlatColumnsById:S(()=>[r.getAllFlatColumns()],d=>d.reduce((a,f)=>(a[f.id]=f,a),{}),m(e,"debugColumns")),getAllLeafColumns:S(()=>[r.getAllColumns(),r._getOrderColumnsFn()],(d,a)=>{let f=d.flatMap(p=>p.getLeafColumns());return a(f)},m(e,"debugColumns")),getColumn:d=>r._getAllFlatColumnsById()[d]};Object.assign(r,C);for(let d=0;d<r._features.length;d++){const a=r._features[d];a==null||a.createTable==null||a.createTable(r)}return r}function pt(){return e=>S(()=>[e.options.data],o=>{const t={rows:[],flatRows:[],rowsById:{}},n=function(r,i,l){i===void 0&&(i=0);const s=[];for(let g=0;g<r.length;g++){const c=_e(e,e._getRowId(r[g],g,l),r[g],g,i,void 0,l==null?void 0:l.id);if(t.flatRows.push(c),t.rowsById[c.id]=c,s.push(c),e.options.getSubRows){var u;c.originalSubRows=e.options.getSubRows(r[g],g),(u=c.originalSubRows)!=null&&u.length&&(c.subRows=n(c.originalSubRows,i+1,c))}}return s};return t.rows=n(o),t},m(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}/**
14
+ * react-table
15
+ *
16
+ * Copyright (c) TanStack
17
+ *
18
+ * This source code is licensed under the MIT license found in the
19
+ * LICENSE.md file in the root directory of this source tree.
20
+ *
21
+ * @license MIT
22
+ */function St(e,o){return e?nt(e)?X.createElement(e,o):e:null}function nt(e){return ot(e)||typeof e=="function"||rt(e)}function ot(e){return typeof e=="function"&&(()=>{const o=Object.getPrototypeOf(e);return o.prototype&&o.prototype.isReactComponent})()}function rt(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function mt(e){const o={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[t]=X.useState(()=>({current:tt(o)})),[n,r]=X.useState(()=>t.current.initialState);return t.current.setOptions(i=>({...i,...e,state:{...n,...e.state},onStateChange:l=>{r(l),e.onStateChange==null||e.onStateChange(l)}})),t.current}export{st as T,ut as a,gt as b,ft as c,dt as d,at as e,St as f,ct as g,pt as h,mt as u};
@@ -0,0 +1,9 @@
1
+ var Or=Object.defineProperty;var Ar=(t,e,r)=>e in t?Or(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var dt=(t,e,r)=>Ar(t,typeof e!="symbol"?e+"":e,r);import{z as Rr,A as Jt,B as Yt,C as Xt,r as D,D as Nr}from"./chunk-KNED5TY2-CXj9yqcQ.js";function ra(t){return function(){const r={params:Xt(),loaderData:Yt(),actionData:Jt(),matches:Rr()};return D.createElement(t,r)}}function na(t){return function(){const r={params:Xt(),loaderData:Yt(),actionData:Jt(),error:Nr()};return D.createElement(t,r)}}function P(t){return`Minified Redux error #${t}; visit https://redux.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var Zr=typeof Symbol=="function"&&Symbol.observable||"@@observable",Mt=Zr,lt=()=>Math.random().toString(36).substring(7).split("").join("."),Ir={INIT:`@@redux/INIT${lt()}`,REPLACE:`@@redux/REPLACE${lt()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${lt()}`},Je=Ir;function Rt(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function Qt(t,e,r){if(typeof t!="function")throw new Error(P(2));if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(P(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(P(1));return r(Qt)(t,e)}let n=t,s=e,a=new Map,i=a,o=0,c=!1;function u(){i===a&&(i=new Map,a.forEach((C,k)=>{i.set(k,C)}))}function d(){if(c)throw new Error(P(3));return s}function m(C){if(typeof C!="function")throw new Error(P(4));if(c)throw new Error(P(5));let k=!0;u();const S=o++;return i.set(S,C),function(){if(k){if(c)throw new Error(P(6));k=!1,u(),i.delete(S),a=null}}}function h(C){if(!Rt(C))throw new Error(P(7));if(typeof C.type>"u")throw new Error(P(8));if(typeof C.type!="string")throw new Error(P(17));if(c)throw new Error(P(9));try{c=!0,s=n(s,C)}finally{c=!1}return(a=i).forEach(S=>{S()}),C}function g(C){if(typeof C!="function")throw new Error(P(10));n=C,h({type:Je.REPLACE})}function b(){const C=m;return{subscribe(k){if(typeof k!="object"||k===null)throw new Error(P(11));function S(){const v=k;v.next&&v.next(d())}return S(),{unsubscribe:C(S)}},[Mt](){return this}}}return h({type:Je.INIT}),{dispatch:h,subscribe:m,getState:d,replaceReducer:g,[Mt]:b}}function jr(t){Object.keys(t).forEach(e=>{const r=t[e];if(typeof r(void 0,{type:Je.INIT})>"u")throw new Error(P(12));if(typeof r(void 0,{type:Je.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(P(13))})}function Pr(t){const e=Object.keys(t),r={};for(let a=0;a<e.length;a++){const i=e[a];typeof t[i]=="function"&&(r[i]=t[i])}const n=Object.keys(r);let s;try{jr(r)}catch(a){s=a}return function(i={},o){if(s)throw s;let c=!1;const u={};for(let d=0;d<n.length;d++){const m=n[d],h=r[m],g=i[m],b=h(g,o);if(typeof b>"u")throw o&&o.type,new Error(P(14));u[m]=b,c=c||b!==g}return c=c||n.length!==Object.keys(i).length,c?u:i}}function Ye(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,r)=>(...n)=>e(r(...n)))}function Mr(...t){return e=>(r,n)=>{const s=e(r,n);let a=()=>{throw new Error(P(15))};const i={getState:s.getState,dispatch:(c,...u)=>a(c,...u)},o=t.map(c=>c(i));return a=Ye(...o)(s.dispatch),{...s,dispatch:a}}}function Dr(t){return Rt(t)&&"type"in t&&typeof t.type=="string"}var Nt=Symbol.for("immer-nothing"),Se=Symbol.for("immer-draftable"),V=Symbol.for("immer-state");function M(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var ue=Object.getPrototypeOf;function Q(t){return!!t&&!!t[V]}function H(t){var e;return t?er(t)||Array.isArray(t)||!!t[Se]||!!((e=t.constructor)!=null&&e[Se])||Ue(t)||Be(t):!1}var zr=Object.prototype.constructor.toString();function er(t){if(!t||typeof t!="object")return!1;const e=ue(t);if(e===null)return!0;const r=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===zr}function sa(t){return Q(t)||M(15,t),t[V].base_}function Te(t,e){de(t)===0?Reflect.ownKeys(t).forEach(r=>{e(r,t[r],t)}):t.forEach((r,n)=>e(n,r,t))}function de(t){const e=t[V];return e?e.type_:Array.isArray(t)?1:Ue(t)?2:Be(t)?3:0}function Ee(t,e){return de(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function ft(t,e){return de(t)===2?t.get(e):t[e]}function tr(t,e,r){const n=de(t);n===2?t.set(e,r):n===3?t.add(r):t[e]=r}function $r(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}function Ue(t){return t instanceof Map}function Be(t){return t instanceof Set}function oe(t){return t.copy_||t.base_}function vt(t,e){if(Ue(t))return new Map(t);if(Be(t))return new Set(t);if(Array.isArray(t))return Array.prototype.slice.call(t);const r=er(t);if(e===!0||e==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(t);delete n[V];let s=Reflect.ownKeys(n);for(let a=0;a<s.length;a++){const i=s[a],o=n[i];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(n[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:t[i]})}return Object.create(ue(t),n)}else{const n=ue(t);if(n!==null&&r)return{...t};const s=Object.create(n);return Object.assign(s,t)}}function Zt(t,e=!1){return ot(t)||Q(t)||!H(t)||(de(t)>1&&(t.set=t.add=t.clear=t.delete=Vr),Object.freeze(t),e&&Object.entries(t).forEach(([r,n])=>Zt(n,!0))),t}function Vr(){M(2)}function ot(t){return Object.isFrozen(t)}var bt={};function le(t){const e=bt[t];return e||M(0,t),e}function Lr(t,e){bt[t]||(bt[t]=e)}var Oe;function rr(){return Oe}function Fr(t,e){return{drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Dt(t,e){e&&(le("Patches"),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function wt(t){xt(t),t.drafts_.forEach(Ur),t.drafts_=null}function xt(t){t===Oe&&(Oe=t.parent_)}function zt(t){return Oe=Fr(Oe,t)}function Ur(t){const e=t[V];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function $t(t,e){e.unfinalizedDrafts_=e.drafts_.length;const r=e.drafts_[0];return t!==void 0&&t!==r?(r[V].modified_&&(wt(e),M(4)),H(t)&&(t=Xe(e,t),e.parent_||Qe(e,t)),e.patches_&&le("Patches").generateReplacementPatches_(r[V].base_,t,e.patches_,e.inversePatches_)):t=Xe(e,r,[]),wt(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==Nt?t:void 0}function Xe(t,e,r){if(ot(e))return e;const n=e[V];if(!n)return Te(e,(s,a)=>Vt(t,n,e,s,a,r)),e;if(n.scope_!==t)return e;if(!n.modified_)return Qe(t,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;const s=n.copy_;let a=s,i=!1;n.type_===3&&(a=new Set(s),s.clear(),i=!0),Te(a,(o,c)=>Vt(t,n,s,o,c,r,i)),Qe(t,s,!1),r&&t.patches_&&le("Patches").generatePatches_(n,r,t.patches_,t.inversePatches_)}return n.copy_}function Vt(t,e,r,n,s,a,i){if(Q(s)){const o=a&&e&&e.type_!==3&&!Ee(e.assigned_,n)?a.concat(n):void 0,c=Xe(t,s,o);if(tr(r,n,c),Q(c))t.canAutoFreeze_=!1;else return}else i&&r.add(s);if(H(s)&&!ot(s)){if(!t.immer_.autoFreeze_&&t.unfinalizedDrafts_<1)return;Xe(t,s),(!e||!e.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,n)&&Qe(t,s)}}function Qe(t,e,r=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&Zt(e,r)}function Br(t,e){const r=Array.isArray(t),n={type_:r?1:0,scope_:e?e.scope_:rr(),modified_:!1,finalized_:!1,assigned_:{},parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=n,a=It;r&&(s=[n],a=Ae);const{revoke:i,proxy:o}=Proxy.revocable(s,a);return n.draft_=o,n.revoke_=i,o}var It={get(t,e){if(e===V)return t;const r=oe(t);if(!Ee(r,e))return Wr(t,r,e);const n=r[e];return t.finalized_||!H(n)?n:n===ht(t.base_,e)?(pt(t),t.copy_[e]=St(n,t)):n},has(t,e){return e in oe(t)},ownKeys(t){return Reflect.ownKeys(oe(t))},set(t,e,r){const n=nr(oe(t),e);if(n!=null&&n.set)return n.set.call(t.draft_,r),!0;if(!t.modified_){const s=ht(oe(t),e),a=s==null?void 0:s[V];if(a&&a.base_===r)return t.copy_[e]=r,t.assigned_[e]=!1,!0;if($r(r,s)&&(r!==void 0||Ee(t.base_,e)))return!0;pt(t),kt(t)}return t.copy_[e]===r&&(r!==void 0||e in t.copy_)||Number.isNaN(r)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=r,t.assigned_[e]=!0),!0},deleteProperty(t,e){return ht(t.base_,e)!==void 0||e in t.base_?(t.assigned_[e]=!1,pt(t),kt(t)):delete t.assigned_[e],t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){const r=oe(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{writable:!0,configurable:t.type_!==1||e!=="length",enumerable:n.enumerable,value:r[e]}},defineProperty(){M(11)},getPrototypeOf(t){return ue(t.base_)},setPrototypeOf(){M(12)}},Ae={};Te(It,(t,e)=>{Ae[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}});Ae.deleteProperty=function(t,e){return Ae.set.call(this,t,e,void 0)};Ae.set=function(t,e,r){return It.set.call(this,t[0],e,r,t[0])};function ht(t,e){const r=t[V];return(r?oe(r):t)[e]}function Wr(t,e,r){var s;const n=nr(e,r);return n?"value"in n?n.value:(s=n.get)==null?void 0:s.call(t.draft_):void 0}function nr(t,e){if(!(e in t))return;let r=ue(t);for(;r;){const n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=ue(r)}}function kt(t){t.modified_||(t.modified_=!0,t.parent_&&kt(t.parent_))}function pt(t){t.copy_||(t.copy_=vt(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var qr=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,r,n)=>{if(typeof e=="function"&&typeof r!="function"){const a=r;r=e;const i=this;return function(c=a,...u){return i.produce(c,d=>r.call(this,d,...u))}}typeof r!="function"&&M(6),n!==void 0&&typeof n!="function"&&M(7);let s;if(H(e)){const a=zt(this),i=St(e,void 0);let o=!0;try{s=r(i),o=!1}finally{o?wt(a):xt(a)}return Dt(a,n),$t(s,a)}else if(!e||typeof e!="object"){if(s=r(e),s===void 0&&(s=e),s===Nt&&(s=void 0),this.autoFreeze_&&Zt(s,!0),n){const a=[],i=[];le("Patches").generateReplacementPatches_(e,s,a,i),n(a,i)}return s}else M(1,e)},this.produceWithPatches=(e,r)=>{if(typeof e=="function")return(i,...o)=>this.produceWithPatches(i,c=>e(c,...o));let n,s;return[this.produce(e,r,(i,o)=>{n=i,s=o}),n,s]},typeof(t==null?void 0:t.autoFreeze)=="boolean"&&this.setAutoFreeze(t.autoFreeze),typeof(t==null?void 0:t.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(t.useStrictShallowCopy)}createDraft(t){H(t)||M(8),Q(t)&&(t=Hr(t));const e=zt(this),r=St(t,void 0);return r[V].isManual_=!0,xt(e),r}finishDraft(t,e){const r=t&&t[V];(!r||!r.isManual_)&&M(9);const{scope_:n}=r;return Dt(n,e),$t(void 0,n)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}applyPatches(t,e){let r;for(r=e.length-1;r>=0;r--){const s=e[r];if(s.path.length===0&&s.op==="replace"){t=s.value;break}}r>-1&&(e=e.slice(r+1));const n=le("Patches").applyPatches_;return Q(t)?n(t,e):this.produce(t,s=>n(s,e))}};function St(t,e){const r=Ue(t)?le("MapSet").proxyMap_(t,e):Be(t)?le("MapSet").proxySet_(t,e):Br(t,e);return(e?e.scope_:rr()).drafts_.push(r),r}function Hr(t){return Q(t)||M(10,t),sr(t)}function sr(t){if(!H(t)||ot(t))return t;const e=t[V];let r;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,r=vt(t,e.scope_.immer_.useStrictShallowCopy_)}else r=vt(t,!0);return Te(r,(n,s)=>{tr(r,n,sr(s))}),e&&(e.finalized_=!1),r}function aa(){const e="replace",r="add",n="remove";function s(h,g,b,O){switch(h.type_){case 0:case 2:return i(h,g,b,O);case 1:return a(h,g,b,O);case 3:return o(h,g,b,O)}}function a(h,g,b,O){let{base_:C,assigned_:k}=h,S=h.copy_;S.length<C.length&&([C,S]=[S,C],[b,O]=[O,b]);for(let y=0;y<C.length;y++)if(k[y]&&S[y]!==C[y]){const v=g.concat([y]);b.push({op:e,path:v,value:m(S[y])}),O.push({op:e,path:v,value:m(C[y])})}for(let y=C.length;y<S.length;y++){const v=g.concat([y]);b.push({op:r,path:v,value:m(S[y])})}for(let y=S.length-1;C.length<=y;--y){const v=g.concat([y]);O.push({op:n,path:v})}}function i(h,g,b,O){const{base_:C,copy_:k}=h;Te(h.assigned_,(S,y)=>{const v=ft(C,S),I=ft(k,S),R=y?Ee(C,S)?e:r:n;if(v===I&&R===e)return;const N=g.concat(S);b.push(R===n?{op:R,path:N}:{op:R,path:N,value:I}),O.push(R===r?{op:n,path:N}:R===n?{op:r,path:N,value:m(v)}:{op:e,path:N,value:m(v)})})}function o(h,g,b,O){let{base_:C,copy_:k}=h,S=0;C.forEach(y=>{if(!k.has(y)){const v=g.concat([S]);b.push({op:n,path:v,value:y}),O.unshift({op:r,path:v,value:y})}S++}),S=0,k.forEach(y=>{if(!C.has(y)){const v=g.concat([S]);b.push({op:r,path:v,value:y}),O.unshift({op:n,path:v,value:y})}S++})}function c(h,g,b,O){b.push({op:e,path:[],value:g===Nt?void 0:g}),O.push({op:e,path:[],value:h})}function u(h,g){return g.forEach(b=>{const{path:O,op:C}=b;let k=h;for(let I=0;I<O.length-1;I++){const R=de(k);let N=O[I];typeof N!="string"&&typeof N!="number"&&(N=""+N),(R===0||R===1)&&(N==="__proto__"||N==="constructor")&&M(19),typeof k=="function"&&N==="prototype"&&M(19),k=ft(k,N),typeof k!="object"&&M(18,O.join("/"))}const S=de(k),y=d(b.value),v=O[O.length-1];switch(C){case e:switch(S){case 2:return k.set(v,y);case 3:M(16);default:return k[v]=y}case r:switch(S){case 1:return v==="-"?k.push(y):k.splice(v,0,y);case 2:return k.set(v,y);case 3:return k.add(y);default:return k[v]=y}case n:switch(S){case 1:return k.splice(v,1);case 2:return k.delete(v);case 3:return k.delete(b.value);default:return delete k[v]}default:M(17,C)}}),h}function d(h){if(!H(h))return h;if(Array.isArray(h))return h.map(d);if(Ue(h))return new Map(Array.from(h.entries()).map(([b,O])=>[b,d(O)]));if(Be(h))return new Set(Array.from(h).map(d));const g=Object.create(ue(h));for(const b in h)g[b]=d(h[b]);return Ee(h,Se)&&(g[Se]=h[Se]),g}function m(h){return Q(h)?d(h):h}Lr("Patches",{applyPatches_:u,generatePatches_:s,generateReplacementPatches_:c})}var F=new qr,ar=F.produce,ia=F.produceWithPatches.bind(F);F.setAutoFreeze.bind(F);F.setUseStrictShallowCopy.bind(F);var oa=F.applyPatches.bind(F);F.createDraft.bind(F);F.finishDraft.bind(F);function ir(t){return({dispatch:r,getState:n})=>s=>a=>typeof a=="function"?a(r,n,t):s(a)}var Gr=ir(),Kr=ir,Jr=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ye:Ye.apply(null,arguments)},Yr=t=>t&&typeof t.match=="function";function Ce(t,e){function r(...n){if(e){let s=e(...n);if(!s)throw new Error(X(0));return{type:t,payload:s.payload,..."meta"in s&&{meta:s.meta},..."error"in s&&{error:s.error}}}return{type:t,payload:n[0]}}return r.toString=()=>`${t}`,r.type=t,r.match=n=>Dr(n)&&n.type===t,r}var or=class we extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,we.prototype)}static get[Symbol.species](){return we}concat(...e){return super.concat.apply(this,e)}prepend(...e){return e.length===1&&Array.isArray(e[0])?new we(...e[0].concat(this)):new we(...e.concat(this))}};function Lt(t){return H(t)?ar(t,()=>{}):t}function Ft(t,e,r){return t.has(e)?t.get(e):t.set(e,r(e)).get(e)}function Xr(t){return typeof t=="boolean"}var Qr=()=>function(e){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:s=!0,actionCreatorCheck:a=!0}=e??{};let i=new or;return r&&(Xr(r)?i.push(Gr):i.push(Kr(r.extraArgument))),i},cr="RTK_autoBatch",ca=()=>t=>({payload:t,meta:{[cr]:!0}}),Ut=t=>e=>{setTimeout(e,t)},en=(t={type:"raf"})=>e=>(...r)=>{const n=e(...r);let s=!0,a=!1,i=!1;const o=new Set,c=t.type==="tick"?queueMicrotask:t.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Ut(10):t.type==="callback"?t.queueNotification:Ut(t.timeout),u=()=>{i=!1,a&&(a=!1,o.forEach(d=>d()))};return Object.assign({},n,{subscribe(d){const m=()=>s&&d(),h=n.subscribe(m);return o.add(d),()=>{h(),o.delete(d)}},dispatch(d){var m;try{return s=!((m=d==null?void 0:d.meta)!=null&&m[cr]),a=!s,a&&(i||(i=!0,c(u))),n.dispatch(d)}finally{s=!0}}})},tn=t=>function(r){const{autoBatch:n=!0}=r??{};let s=new or(t);return n&&s.push(en(typeof n=="object"?n:void 0)),s};function ua(t){const e=Qr(),{reducer:r=void 0,middleware:n,devTools:s=!0,preloadedState:a=void 0,enhancers:i=void 0}=t||{};let o;if(typeof r=="function")o=r;else if(Rt(r))o=Pr(r);else throw new Error(X(1));let c;typeof n=="function"?c=n(e):c=e();let u=Ye;s&&(u=Jr({trace:!1,...typeof s=="object"&&s}));const d=Mr(...c),m=tn(d);let h=typeof i=="function"?i(m):m();const g=u(...h);return Qt(o,a,g)}function ur(t){const e={},r=[];let n;const s={addCase(a,i){const o=typeof a=="string"?a:a.type;if(!o)throw new Error(X(28));if(o in e)throw new Error(X(29));return e[o]=i,s},addMatcher(a,i){return r.push({matcher:a,reducer:i}),s},addDefaultCase(a){return n=a,s}};return t(s),[e,r,n]}function rn(t){return typeof t=="function"}function nn(t,e){let[r,n,s]=ur(e),a;if(rn(t))a=()=>Lt(t());else{const o=Lt(t);a=()=>o}function i(o=a(),c){let u=[r[c.type],...n.filter(({matcher:d})=>d(c)).map(({reducer:d})=>d)];return u.filter(d=>!!d).length===0&&(u=[s]),u.reduce((d,m)=>{if(m)if(Q(d)){const g=m(d,c);return g===void 0?d:g}else{if(H(d))return ar(d,h=>m(h,c));{const h=m(d,c);if(h===void 0){if(d===null)return d;throw Error("A case reducer on a non-draftable value must not return undefined")}return h}}return d},o)}return i.getInitialState=a,i}var dr=(t,e)=>Yr(t)?t.match(e):t(e);function We(...t){return e=>t.some(r=>dr(r,e))}function Bt(...t){return e=>t.every(r=>dr(r,e))}function ct(t,e){if(!t||!t.meta)return!1;const r=typeof t.meta.requestId=="string",n=e.indexOf(t.meta.requestStatus)>-1;return r&&n}function qe(t){return typeof t[0]=="function"&&"pending"in t[0]&&"fulfilled"in t[0]&&"rejected"in t[0]}function sn(...t){return t.length===0?e=>ct(e,["pending"]):qe(t)?We(...t.map(e=>e.pending)):sn()(t[0])}function Ct(...t){return t.length===0?e=>ct(e,["rejected"]):qe(t)?We(...t.map(e=>e.rejected)):Ct()(t[0])}function an(...t){const e=r=>r&&r.meta&&r.meta.rejectedWithValue;return t.length===0?Bt(Ct(...t),e):qe(t)?Bt(Ct(...t),e):an()(t[0])}function on(...t){return t.length===0?e=>ct(e,["fulfilled"]):qe(t)?We(...t.map(e=>e.fulfilled)):on()(t[0])}function cn(...t){return t.length===0?e=>ct(e,["pending","fulfilled","rejected"]):qe(t)?We(...t.flatMap(e=>[e.pending,e.rejected,e.fulfilled])):cn()(t[0])}var un="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",dn=(t=21)=>{let e="",r=t;for(;r--;)e+=un[Math.random()*64|0];return e},ln=["name","message","stack","code"],mt=class{constructor(t,e){dt(this,"_type");this.payload=t,this.meta=e}},Wt=class{constructor(t,e){dt(this,"_type");this.payload=t,this.meta=e}},fn=t=>{if(typeof t=="object"&&t!==null){const e={};for(const r of ln)typeof t[r]=="string"&&(e[r]=t[r]);return e}return{message:String(t)}},da=(()=>{function t(e,r,n){const s=Ce(e+"/fulfilled",(c,u,d,m)=>({payload:c,meta:{...m||{},arg:d,requestId:u,requestStatus:"fulfilled"}})),a=Ce(e+"/pending",(c,u,d)=>({payload:void 0,meta:{...d||{},arg:u,requestId:c,requestStatus:"pending"}})),i=Ce(e+"/rejected",(c,u,d,m,h)=>({payload:m,error:(n&&n.serializeError||fn)(c||"Rejected"),meta:{...h||{},arg:d,requestId:u,rejectedWithValue:!!m,requestStatus:"rejected",aborted:(c==null?void 0:c.name)==="AbortError",condition:(c==null?void 0:c.name)==="ConditionError"}}));function o(c){return(u,d,m)=>{const h=n!=null&&n.idGenerator?n.idGenerator(c):dn(),g=new AbortController;let b,O;function C(S){O=S,g.abort()}const k=async function(){var v,I;let S;try{let R=(v=n==null?void 0:n.condition)==null?void 0:v.call(n,c,{getState:d,extra:m});if(pn(R)&&(R=await R),R===!1||g.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const N=new Promise((Z,te)=>{b=()=>{te({name:"AbortError",message:O||"Aborted"})},g.signal.addEventListener("abort",b)});u(a(h,c,(I=n==null?void 0:n.getPendingMeta)==null?void 0:I.call(n,{requestId:h,arg:c},{getState:d,extra:m}))),S=await Promise.race([N,Promise.resolve(r(c,{dispatch:u,getState:d,extra:m,requestId:h,signal:g.signal,abort:C,rejectWithValue:(Z,te)=>new mt(Z,te),fulfillWithValue:(Z,te)=>new Wt(Z,te)})).then(Z=>{if(Z instanceof mt)throw Z;return Z instanceof Wt?s(Z.payload,h,c,Z.meta):s(Z,h,c)})])}catch(R){S=R instanceof mt?i(null,h,c,R.payload,R.meta):i(R,h,c)}finally{b&&g.signal.removeEventListener("abort",b)}return n&&!n.dispatchConditionRejection&&i.match(S)&&S.meta.condition||u(S),S}();return Object.assign(k,{abort:C,requestId:h,arg:c,unwrap(){return k.then(hn)}})}}return Object.assign(o,{pending:a,rejected:i,fulfilled:s,settled:We(i,s),typePrefix:e})}return t.withTypes=()=>t,t})();function hn(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function pn(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var mn=Symbol.for("rtk-slice-createasyncthunk");function yn(t,e){return`${t}/${e}`}function _n({creators:t}={}){var r;const e=(r=t==null?void 0:t.asyncThunk)==null?void 0:r[mn];return function(s){const{name:a,reducerPath:i=a}=s;if(!a)throw new Error(X(11));const o=(typeof s.reducers=="function"?s.reducers(vn()):s.reducers)||{},c=Object.keys(o),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},d={addCase(y,v){const I=typeof y=="string"?y:y.type;if(!I)throw new Error(X(12));if(I in u.sliceCaseReducersByType)throw new Error(X(13));return u.sliceCaseReducersByType[I]=v,d},addMatcher(y,v){return u.sliceMatchers.push({matcher:y,reducer:v}),d},exposeAction(y,v){return u.actionCreators[y]=v,d},exposeCaseReducer(y,v){return u.sliceCaseReducersByName[y]=v,d}};c.forEach(y=>{const v=o[y],I={reducerName:y,type:yn(a,y),createNotation:typeof s.reducers=="function"};wn(v)?kn(I,v,d,e):bn(I,v,d)});function m(){const[y={},v=[],I=void 0]=typeof s.extraReducers=="function"?ur(s.extraReducers):[s.extraReducers],R={...y,...u.sliceCaseReducersByType};return nn(s.initialState,N=>{for(let Z in R)N.addCase(Z,R[Z]);for(let Z of u.sliceMatchers)N.addMatcher(Z.matcher,Z.reducer);for(let Z of v)N.addMatcher(Z.matcher,Z.reducer);I&&N.addDefaultCase(I)})}const h=y=>y,g=new Map;let b;function O(y,v){return b||(b=m()),b(y,v)}function C(){return b||(b=m()),b.getInitialState()}function k(y,v=!1){function I(N){let Z=N[y];return typeof Z>"u"&&v&&(Z=C()),Z}function R(N=h){const Z=Ft(g,v,()=>new WeakMap);return Ft(Z,N,()=>{const te={};for(const[Tr,Er]of Object.entries(s.selectors??{}))te[Tr]=gn(Er,N,C,v);return te})}return{reducerPath:y,getSelectors:R,get selectors(){return R(I)},selectSlice:I}}const S={name:a,reducer:O,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:C,...k(i),injectInto(y,{reducerPath:v,...I}={}){const R=v??i;return y.inject({reducerPath:R,reducer:O},I),{...S,...k(R,!0)}}};return S}}function gn(t,e,r,n){function s(a,...i){let o=e(a);return typeof o>"u"&&n&&(o=r()),t(o,...i)}return s.unwrapped=t,s}var la=_n();function vn(){function t(e,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...r}}return t.withTypes=()=>t,{reducer(e){return Object.assign({[e.name](...r){return e(...r)}}[e.name],{_reducerDefinitionType:"reducer"})},preparedReducer(e,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:r}},asyncThunk:t}}function bn({type:t,reducerName:e,createNotation:r},n,s){let a,i;if("reducer"in n){if(r&&!xn(n))throw new Error(X(17));a=n.reducer,i=n.prepare}else a=n;s.addCase(t,a).exposeCaseReducer(e,a).exposeAction(e,i?Ce(t,i):Ce(t))}function wn(t){return t._reducerDefinitionType==="asyncThunk"}function xn(t){return t._reducerDefinitionType==="reducerWithPrepare"}function kn({type:t,reducerName:e},r,n,s){if(!s)throw new Error(X(18));const{payloadCreator:a,fulfilled:i,pending:o,rejected:c,settled:u,options:d}=r,m=s(t,a,d);n.exposeAction(e,m),i&&n.addCase(m.fulfilled,i),o&&n.addCase(m.pending,o),c&&n.addCase(m.rejected,c),u&&n.addMatcher(m.settled,u),n.exposeCaseReducer(e,{fulfilled:i||Ke,pending:o||Ke,rejected:c||Ke,settled:u||Ke})}function Ke(){}function X(t){return`Minified Redux Toolkit error #${t}; visit https://redux-toolkit.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var lr={exports:{}},fr={};/**
2
+ * @license React
3
+ * use-sync-external-store-with-selector.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var He=D;function Sn(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Cn=typeof Object.is=="function"?Object.is:Sn,Tn=He.useSyncExternalStore,En=He.useRef,On=He.useEffect,An=He.useMemo,Rn=He.useDebugValue;fr.useSyncExternalStoreWithSelector=function(t,e,r,n,s){var a=En(null);if(a.current===null){var i={hasValue:!1,value:null};a.current=i}else i=a.current;a=An(function(){function c(g){if(!u){if(u=!0,d=g,g=n(g),s!==void 0&&i.hasValue){var b=i.value;if(s(b,g))return m=b}return m=g}if(b=m,Cn(d,g))return b;var O=n(g);return s!==void 0&&s(b,O)?(d=g,b):(d=g,m=O)}var u=!1,d,m,h=r===void 0?null:r;return[function(){return c(e())},h===null?void 0:function(){return c(h())}]},[e,r,n,s]);var o=Tn(t,a[0],a[1]);return On(function(){i.hasValue=!0,i.value=o},[o]),Rn(o),o};lr.exports=fr;var Nn=lr.exports;function hr(t){t()}function Zn(){let t=null,e=null;return{clear(){t=null,e=null},notify(){hr(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=t;for(;n;)r.push(n),n=n.next;return r},subscribe(r){let n=!0;const s=e={callback:r,next:null,prev:e};return s.prev?s.prev.next=s:t=s,function(){!n||t===null||(n=!1,s.next?s.next.prev=s.prev:e=s.prev,s.prev?s.prev.next=s.next:t=s.next)}}}}var qt={notify(){},get:()=>[]};function In(t,e){let r,n=qt,s=0,a=!1;function i(O){d();const C=n.subscribe(O);let k=!1;return()=>{k||(k=!0,C(),m())}}function o(){n.notify()}function c(){b.onStateChange&&b.onStateChange()}function u(){return a}function d(){s++,r||(r=t.subscribe(c),n=Zn())}function m(){s--,r&&s===0&&(r(),r=void 0,n.clear(),n=qt)}function h(){a||(a=!0,d())}function g(){a&&(a=!1,m())}const b={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:c,isSubscribed:u,trySubscribe:h,tryUnsubscribe:g,getListeners:()=>n};return b}var jn=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Pn=jn(),Mn=()=>typeof navigator<"u"&&navigator.product==="ReactNative",Dn=Mn(),zn=()=>Pn||Dn?D.useLayoutEffect:D.useEffect,$n=zn();function Ht(t,e){return t===e?t!==0||e!==0||1/t===1/e:t!==t&&e!==e}function fa(t,e){if(Ht(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;const r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(let s=0;s<r.length;s++)if(!Object.prototype.hasOwnProperty.call(e,r[s])||!Ht(t[r[s]],e[r[s]]))return!1;return!0}var yt=Symbol.for("react-redux-context"),_t=typeof globalThis<"u"?globalThis:{};function Vn(){if(!D.createContext)return{};const t=_t[yt]??(_t[yt]=new Map);let e=t.get(D.createContext);return e||(e=D.createContext(null),t.set(D.createContext,e)),e}var re=Vn();function Ln(t){const{children:e,context:r,serverState:n,store:s}=t,a=D.useMemo(()=>{const c=In(s);return{store:s,subscription:c,getServerState:n?()=>n:void 0}},[s,n]),i=D.useMemo(()=>s.getState(),[s]);$n(()=>{const{subscription:c}=a;return c.onStateChange=c.notifyNestedSubs,c.trySubscribe(),i!==s.getState()&&c.notifyNestedSubs(),()=>{c.tryUnsubscribe(),c.onStateChange=void 0}},[a,i]);const o=r||re;return D.createElement(o.Provider,{value:a},e)}var ha=Ln;function jt(t=re){return function(){return D.useContext(t)}}var pr=jt();function mr(t=re){const e=t===re?pr:jt(t),r=()=>{const{store:n}=e();return n};return Object.assign(r,{withTypes:()=>r}),r}var Fn=mr();function Un(t=re){const e=t===re?Fn:mr(t),r=()=>e().dispatch;return Object.assign(r,{withTypes:()=>r}),r}var pa=Un(),Bn=(t,e)=>t===e;function Wn(t=re){const e=t===re?pr:jt(t),r=(n,s={})=>{const{equalityFn:a=Bn}=typeof s=="function"?{equalityFn:s}:s,i=e(),{store:o,subscription:c,getServerState:u}=i;D.useRef(!0);const d=D.useCallback({[n.name](h){return n(h)}}[n.name],[n]),m=Nn.useSyncExternalStoreWithSelector(c.addNestedSub,o.getState,u||o.getState,d,a);return D.useDebugValue(m),m};return Object.assign(r,{withTypes:()=>r}),r}var ma=Wn(),ya=hr,A;(function(t){t.assertEqual=s=>s;function e(s){}t.assertIs=e;function r(s){throw new Error}t.assertNever=r,t.arrayToEnum=s=>{const a={};for(const i of s)a[i]=i;return a},t.getValidEnumValues=s=>{const a=t.objectKeys(s).filter(o=>typeof s[s[o]]!="number"),i={};for(const o of a)i[o]=s[o];return t.objectValues(i)},t.objectValues=s=>t.objectKeys(s).map(function(a){return s[a]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const a=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&a.push(i);return a},t.find=(s,a)=>{for(const i of s)if(a(i))return i},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function n(s,a=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(a)}t.joinValues=n,t.jsonStringifyReplacer=(s,a)=>typeof a=="bigint"?a.toString():a})(A||(A={}));var Tt;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(Tt||(Tt={}));const p=A.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Y=t=>{switch(typeof t){case"undefined":return p.undefined;case"string":return p.string;case"number":return isNaN(t)?p.nan:p.number;case"boolean":return p.boolean;case"function":return p.function;case"bigint":return p.bigint;case"symbol":return p.symbol;case"object":return Array.isArray(t)?p.array:t===null?p.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?p.promise:typeof Map<"u"&&t instanceof Map?p.map:typeof Set<"u"&&t instanceof Set?p.set:typeof Date<"u"&&t instanceof Date?p.date:p.object;default:return p.unknown}},l=A.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),qn=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class L extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){const r=e||function(a){return a.message},n={_errors:[]},s=a=>{for(const i of a.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)n._errors.push(r(i));else{let o=n,c=0;for(;c<i.path.length;){const u=i.path[c];c===i.path.length-1?(o[u]=o[u]||{_errors:[]},o[u]._errors.push(r(i))):o[u]=o[u]||{_errors:[]},o=o[u],c++}}};return s(this),n}static assert(e){if(!(e instanceof L))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,A.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){const r={},n=[];for(const s of this.issues)s.path.length>0?(r[s.path[0]]=r[s.path[0]]||[],r[s.path[0]].push(e(s))):n.push(e(s));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}L.create=t=>new L(t);const ge=(t,e)=>{let r;switch(t.code){case l.invalid_type:t.received===p.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case l.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,A.jsonStringifyReplacer)}`;break;case l.unrecognized_keys:r=`Unrecognized key(s) in object: ${A.joinValues(t.keys,", ")}`;break;case l.invalid_union:r="Invalid input";break;case l.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${A.joinValues(t.options)}`;break;case l.invalid_enum_value:r=`Invalid enum value. Expected ${A.joinValues(t.options)}, received '${t.received}'`;break;case l.invalid_arguments:r="Invalid function arguments";break;case l.invalid_return_type:r="Invalid function return type";break;case l.invalid_date:r="Invalid date";break;case l.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:A.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case l.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case l.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case l.custom:r="Invalid input";break;case l.invalid_intersection_types:r="Intersection results could not be merged";break;case l.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case l.not_finite:r="Number must be finite";break;default:r=e.defaultError,A.assertNever(t)}return{message:r}};let yr=ge;function Hn(t){yr=t}function et(){return yr}const tt=t=>{const{data:e,path:r,errorMaps:n,issueData:s}=t,a=[...r,...s.path||[]],i={...s,path:a};if(s.message!==void 0)return{...s,path:a,message:s.message};let o="";const c=n.filter(u=>!!u).slice().reverse();for(const u of c)o=u(i,{data:e,defaultError:o}).message;return{...s,path:a,message:o}},Gn=[];function f(t,e){const r=et(),n=tt({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===ge?void 0:ge].filter(s=>!!s)});t.common.issues.push(n)}class z{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){const n=[];for(const s of r){if(s.status==="aborted")return x;s.status==="dirty"&&e.dirty(),n.push(s.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){const n=[];for(const s of r){const a=await s.key,i=await s.value;n.push({key:a,value:i})}return z.mergeObjectSync(e,n)}static mergeObjectSync(e,r){const n={};for(const s of r){const{key:a,value:i}=s;if(a.status==="aborted"||i.status==="aborted")return x;a.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof i.value<"u"||s.alwaysSet)&&(n[a.value]=i.value)}return{status:e.value,value:n}}}const x=Object.freeze({status:"aborted"}),ye=t=>({status:"dirty",value:t}),$=t=>({status:"valid",value:t}),Et=t=>t.status==="aborted",Ot=t=>t.status==="dirty",fe=t=>t.status==="valid",Re=t=>typeof Promise<"u"&&t instanceof Promise;function rt(t,e,r,n){if(typeof e=="function"?t!==e||!0:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(t)}function _r(t,e,r,n,s){if(typeof e=="function"?t!==e||!0:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,r),r}var _;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(_||(_={}));var xe,ke;class G{constructor(e,r,n,s){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Gt=(t,e)=>{if(fe(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new L(t.common.issues);return this._error=r,this._error}}};function T(t){if(!t)return{};const{errorMap:e,invalid_type_error:r,required_error:n,description:s}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(i,o)=>{var c,u;const{message:d}=t;return i.code==="invalid_enum_value"?{message:d??o.defaultError}:typeof o.data>"u"?{message:(c=d??n)!==null&&c!==void 0?c:o.defaultError}:i.code!=="invalid_type"?{message:o.defaultError}:{message:(u=d??r)!==null&&u!==void 0?u:o.defaultError}},description:s}}class E{get description(){return this._def.description}_getType(e){return Y(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:Y(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new z,ctx:{common:e.parent.common,data:e.data,parsedType:Y(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const r=this._parse(e);if(Re(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){const r=this._parse(e);return Promise.resolve(r)}parse(e,r){const n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){var n;const s={common:{issues:[],async:(n=r==null?void 0:r.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Y(e)},a=this._parseSync({data:e,path:s.path,parent:s});return Gt(s,a)}"~validate"(e){var r,n;const s={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Y(e)};if(!this["~standard"].async)try{const a=this._parseSync({data:e,path:[],parent:s});return fe(a)?{value:a.value}:{issues:s.common.issues}}catch(a){!((n=(r=a==null?void 0:a.message)===null||r===void 0?void 0:r.toLowerCase())===null||n===void 0)&&n.includes("encountered")&&(this["~standard"].async=!0),s.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:s}).then(a=>fe(a)?{value:a.value}:{issues:s.common.issues})}async parseAsync(e,r){const n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){const n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Y(e)},s=this._parse({data:e,path:n.path,parent:n}),a=await(Re(s)?s:Promise.resolve(s));return Gt(n,a)}refine(e,r){const n=s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r;return this._refinement((s,a)=>{const i=e(s),o=()=>a.addIssue({code:l.custom,...n(s)});return typeof Promise<"u"&&i instanceof Promise?i.then(c=>c?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,r){return this._refinement((n,s)=>e(n)?!0:(s.addIssue(typeof r=="function"?r(n,s):r),!1))}_refinement(e){return new W({schema:this,typeName:w.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return q.create(this,this._def)}nullable(){return ie.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return B.create(this)}promise(){return be.create(this,this._def)}or(e){return je.create([this,e],this._def)}and(e){return Pe.create(this,e,this._def)}transform(e){return new W({...T(this._def),schema:this,typeName:w.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const r=typeof e=="function"?e:()=>e;return new Ve({...T(this._def),innerType:this,defaultValue:r,typeName:w.ZodDefault})}brand(){return new Pt({typeName:w.ZodBranded,type:this,...T(this._def)})}catch(e){const r=typeof e=="function"?e:()=>e;return new Le({...T(this._def),innerType:this,catchValue:r,typeName:w.ZodCatch})}describe(e){const r=this.constructor;return new r({...this._def,description:e})}pipe(e){return Ge.create(this,e)}readonly(){return Fe.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Kn=/^c[^\s-]{8,}$/i,Jn=/^[0-9a-z]+$/,Yn=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Xn=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Qn=/^[a-z0-9_-]{21}$/i,es=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,ts=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,rs=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,ns="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let gt;const ss=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,as=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,is=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,os=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,cs=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,us=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,gr="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",ds=new RegExp(`^${gr}$`);function vr(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`),e}function ls(t){return new RegExp(`^${vr(t)}$`)}function br(t){let e=`${gr}T${vr(t)}`;const r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function fs(t,e){return!!((e==="v4"||!e)&&ss.test(t)||(e==="v6"||!e)&&is.test(t))}function hs(t,e){if(!es.test(t))return!1;try{const[r]=t.split("."),n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),s=JSON.parse(atob(n));return!(typeof s!="object"||s===null||!s.typ||!s.alg||e&&s.alg!==e)}catch{return!1}}function ps(t,e){return!!((e==="v4"||!e)&&as.test(t)||(e==="v6"||!e)&&os.test(t))}class U extends E{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==p.string){const a=this._getOrReturnCtx(e);return f(a,{code:l.invalid_type,expected:p.string,received:a.parsedType}),x}const n=new z;let s;for(const a of this._def.checks)if(a.kind==="min")e.data.length<a.value&&(s=this._getOrReturnCtx(e,s),f(s,{code:l.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="max")e.data.length>a.value&&(s=this._getOrReturnCtx(e,s),f(s,{code:l.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="length"){const i=e.data.length>a.value,o=e.data.length<a.value;(i||o)&&(s=this._getOrReturnCtx(e,s),i?f(s,{code:l.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):o&&f(s,{code:l.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),n.dirty())}else if(a.kind==="email")rs.test(e.data)||(s=this._getOrReturnCtx(e,s),f(s,{validation:"email",code:l.invalid_string,message:a.message}),n.dirty());else if(a.kind==="emoji")gt||(gt=new RegExp(ns,"u")),gt.test(e.data)||(s=this._getOrReturnCtx(e,s),f(s,{validation:"emoji",code:l.invalid_string,message:a.message}),n.dirty());else if(a.kind==="uuid")Xn.test(e.data)||(s=this._getOrReturnCtx(e,s),f(s,{validation:"uuid",code:l.invalid_string,message:a.message}),n.dirty());else if(a.kind==="nanoid")Qn.test(e.data)||(s=this._getOrReturnCtx(e,s),f(s,{validation:"nanoid",code:l.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid")Kn.test(e.data)||(s=this._getOrReturnCtx(e,s),f(s,{validation:"cuid",code:l.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid2")Jn.test(e.data)||(s=this._getOrReturnCtx(e,s),f(s,{validation:"cuid2",code:l.invalid_string,message:a.message}),n.dirty());else if(a.kind==="ulid")Yn.test(e.data)||(s=this._getOrReturnCtx(e,s),f(s,{validation:"ulid",code:l.invalid_string,message:a.message}),n.dirty());else if(a.kind==="url")try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),f(s,{validation:"url",code:l.invalid_string,message:a.message}),n.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),f(s,{validation:"regex",code:l.invalid_string,message:a.message}),n.dirty())):a.kind==="trim"?e.data=e.data.trim():a.kind==="includes"?e.data.includes(a.value,a.position)||(s=this._getOrReturnCtx(e,s),f(s,{code:l.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),n.dirty()):a.kind==="toLowerCase"?e.data=e.data.toLowerCase():a.kind==="toUpperCase"?e.data=e.data.toUpperCase():a.kind==="startsWith"?e.data.startsWith(a.value)||(s=this._getOrReturnCtx(e,s),f(s,{code:l.invalid_string,validation:{startsWith:a.value},message:a.message}),n.dirty()):a.kind==="endsWith"?e.data.endsWith(a.value)||(s=this._getOrReturnCtx(e,s),f(s,{code:l.invalid_string,validation:{endsWith:a.value},message:a.message}),n.dirty()):a.kind==="datetime"?br(a).test(e.data)||(s=this._getOrReturnCtx(e,s),f(s,{code:l.invalid_string,validation:"datetime",message:a.message}),n.dirty()):a.kind==="date"?ds.test(e.data)||(s=this._getOrReturnCtx(e,s),f(s,{code:l.invalid_string,validation:"date",message:a.message}),n.dirty()):a.kind==="time"?ls(a).test(e.data)||(s=this._getOrReturnCtx(e,s),f(s,{code:l.invalid_string,validation:"time",message:a.message}),n.dirty()):a.kind==="duration"?ts.test(e.data)||(s=this._getOrReturnCtx(e,s),f(s,{validation:"duration",code:l.invalid_string,message:a.message}),n.dirty()):a.kind==="ip"?fs(e.data,a.version)||(s=this._getOrReturnCtx(e,s),f(s,{validation:"ip",code:l.invalid_string,message:a.message}),n.dirty()):a.kind==="jwt"?hs(e.data,a.alg)||(s=this._getOrReturnCtx(e,s),f(s,{validation:"jwt",code:l.invalid_string,message:a.message}),n.dirty()):a.kind==="cidr"?ps(e.data,a.version)||(s=this._getOrReturnCtx(e,s),f(s,{validation:"cidr",code:l.invalid_string,message:a.message}),n.dirty()):a.kind==="base64"?cs.test(e.data)||(s=this._getOrReturnCtx(e,s),f(s,{validation:"base64",code:l.invalid_string,message:a.message}),n.dirty()):a.kind==="base64url"?us.test(e.data)||(s=this._getOrReturnCtx(e,s),f(s,{validation:"base64url",code:l.invalid_string,message:a.message}),n.dirty()):A.assertNever(a);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(s=>e.test(s),{validation:r,code:l.invalid_string,..._.errToObj(n)})}_addCheck(e){return new U({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",..._.errToObj(e)})}url(e){return this._addCheck({kind:"url",..._.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",..._.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",..._.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",..._.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",..._.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",..._.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",..._.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",..._.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",..._.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",..._.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",..._.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",..._.errToObj(e)})}datetime(e){var r,n;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(r=e==null?void 0:e.offset)!==null&&r!==void 0?r:!1,local:(n=e==null?void 0:e.local)!==null&&n!==void 0?n:!1,..._.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,..._.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",..._.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,..._.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r==null?void 0:r.position,..._.errToObj(r==null?void 0:r.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,..._.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,..._.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,..._.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,..._.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,..._.errToObj(r)})}nonempty(e){return this.min(1,_.errToObj(e))}trim(){return new U({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new U({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new U({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}U.create=t=>{var e;return new U({checks:[],typeName:w.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...T(t)})};function ms(t,e){const r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,s=r>n?r:n,a=parseInt(t.toFixed(s).replace(".","")),i=parseInt(e.toFixed(s).replace(".",""));return a%i/Math.pow(10,s)}class ne extends E{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==p.number){const a=this._getOrReturnCtx(e);return f(a,{code:l.invalid_type,expected:p.number,received:a.parsedType}),x}let n;const s=new z;for(const a of this._def.checks)a.kind==="int"?A.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),f(n,{code:l.invalid_type,expected:"integer",received:"float",message:a.message}),s.dirty()):a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(n=this._getOrReturnCtx(e,n),f(n,{code:l.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),s.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(n=this._getOrReturnCtx(e,n),f(n,{code:l.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),s.dirty()):a.kind==="multipleOf"?ms(e.data,a.value)!==0&&(n=this._getOrReturnCtx(e,n),f(n,{code:l.not_multiple_of,multipleOf:a.value,message:a.message}),s.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),f(n,{code:l.not_finite,message:a.message}),s.dirty()):A.assertNever(a);return{status:s.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,_.toString(r))}gt(e,r){return this.setLimit("min",e,!1,_.toString(r))}lte(e,r){return this.setLimit("max",e,!0,_.toString(r))}lt(e,r){return this.setLimit("max",e,!1,_.toString(r))}setLimit(e,r,n,s){return new ne({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:_.toString(s)}]})}_addCheck(e){return new ne({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:_.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:_.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:_.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:_.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:_.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:_.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:_.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:_.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:_.toString(e)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&A.isInteger(e.value))}get isFinite(){let e=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}}ne.create=t=>new ne({checks:[],typeName:w.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...T(t)});class se extends E{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==p.bigint)return this._getInvalidInput(e);let n;const s=new z;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(n=this._getOrReturnCtx(e,n),f(n,{code:l.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),s.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(n=this._getOrReturnCtx(e,n),f(n,{code:l.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),s.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),f(n,{code:l.not_multiple_of,multipleOf:a.value,message:a.message}),s.dirty()):A.assertNever(a);return{status:s.value,value:e.data}}_getInvalidInput(e){const r=this._getOrReturnCtx(e);return f(r,{code:l.invalid_type,expected:p.bigint,received:r.parsedType}),x}gte(e,r){return this.setLimit("min",e,!0,_.toString(r))}gt(e,r){return this.setLimit("min",e,!1,_.toString(r))}lte(e,r){return this.setLimit("max",e,!0,_.toString(r))}lt(e,r){return this.setLimit("max",e,!1,_.toString(r))}setLimit(e,r,n,s){return new se({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:_.toString(s)}]})}_addCheck(e){return new se({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:_.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:_.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:_.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:_.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:_.toString(r)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}se.create=t=>{var e;return new se({checks:[],typeName:w.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...T(t)})};class Ne extends E{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==p.boolean){const n=this._getOrReturnCtx(e);return f(n,{code:l.invalid_type,expected:p.boolean,received:n.parsedType}),x}return $(e.data)}}Ne.create=t=>new Ne({typeName:w.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...T(t)});class he extends E{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==p.date){const a=this._getOrReturnCtx(e);return f(a,{code:l.invalid_type,expected:p.date,received:a.parsedType}),x}if(isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return f(a,{code:l.invalid_date}),x}const n=new z;let s;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()<a.value&&(s=this._getOrReturnCtx(e,s),f(s,{code:l.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),n.dirty()):a.kind==="max"?e.data.getTime()>a.value&&(s=this._getOrReturnCtx(e,s),f(s,{code:l.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),n.dirty()):A.assertNever(a);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new he({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:_.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:_.toString(r)})}get minDate(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}}he.create=t=>new he({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:w.ZodDate,...T(t)});class nt extends E{_parse(e){if(this._getType(e)!==p.symbol){const n=this._getOrReturnCtx(e);return f(n,{code:l.invalid_type,expected:p.symbol,received:n.parsedType}),x}return $(e.data)}}nt.create=t=>new nt({typeName:w.ZodSymbol,...T(t)});class Ze extends E{_parse(e){if(this._getType(e)!==p.undefined){const n=this._getOrReturnCtx(e);return f(n,{code:l.invalid_type,expected:p.undefined,received:n.parsedType}),x}return $(e.data)}}Ze.create=t=>new Ze({typeName:w.ZodUndefined,...T(t)});class Ie extends E{_parse(e){if(this._getType(e)!==p.null){const n=this._getOrReturnCtx(e);return f(n,{code:l.invalid_type,expected:p.null,received:n.parsedType}),x}return $(e.data)}}Ie.create=t=>new Ie({typeName:w.ZodNull,...T(t)});class ve extends E{constructor(){super(...arguments),this._any=!0}_parse(e){return $(e.data)}}ve.create=t=>new ve({typeName:w.ZodAny,...T(t)});class ce extends E{constructor(){super(...arguments),this._unknown=!0}_parse(e){return $(e.data)}}ce.create=t=>new ce({typeName:w.ZodUnknown,...T(t)});class ee extends E{_parse(e){const r=this._getOrReturnCtx(e);return f(r,{code:l.invalid_type,expected:p.never,received:r.parsedType}),x}}ee.create=t=>new ee({typeName:w.ZodNever,...T(t)});class st extends E{_parse(e){if(this._getType(e)!==p.undefined){const n=this._getOrReturnCtx(e);return f(n,{code:l.invalid_type,expected:p.void,received:n.parsedType}),x}return $(e.data)}}st.create=t=>new st({typeName:w.ZodVoid,...T(t)});class B extends E{_parse(e){const{ctx:r,status:n}=this._processInputParams(e),s=this._def;if(r.parsedType!==p.array)return f(r,{code:l.invalid_type,expected:p.array,received:r.parsedType}),x;if(s.exactLength!==null){const i=r.data.length>s.exactLength.value,o=r.data.length<s.exactLength.value;(i||o)&&(f(r,{code:i?l.too_big:l.too_small,minimum:o?s.exactLength.value:void 0,maximum:i?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),n.dirty())}if(s.minLength!==null&&r.data.length<s.minLength.value&&(f(r,{code:l.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),n.dirty()),s.maxLength!==null&&r.data.length>s.maxLength.value&&(f(r,{code:l.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((i,o)=>s.type._parseAsync(new G(r,i,r.path,o)))).then(i=>z.mergeArray(n,i));const a=[...r.data].map((i,o)=>s.type._parseSync(new G(r,i,r.path,o)));return z.mergeArray(n,a)}get element(){return this._def.type}min(e,r){return new B({...this._def,minLength:{value:e,message:_.toString(r)}})}max(e,r){return new B({...this._def,maxLength:{value:e,message:_.toString(r)}})}length(e,r){return new B({...this._def,exactLength:{value:e,message:_.toString(r)}})}nonempty(e){return this.min(1,e)}}B.create=(t,e)=>new B({type:t,minLength:null,maxLength:null,exactLength:null,typeName:w.ZodArray,...T(e)});function me(t){if(t instanceof j){const e={};for(const r in t.shape){const n=t.shape[r];e[r]=q.create(me(n))}return new j({...t._def,shape:()=>e})}else return t instanceof B?new B({...t._def,type:me(t.element)}):t instanceof q?q.create(me(t.unwrap())):t instanceof ie?ie.create(me(t.unwrap())):t instanceof K?K.create(t.items.map(e=>me(e))):t}class j extends E{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),r=A.objectKeys(e);return this._cached={shape:e,keys:r}}_parse(e){if(this._getType(e)!==p.object){const u=this._getOrReturnCtx(e);return f(u,{code:l.invalid_type,expected:p.object,received:u.parsedType}),x}const{status:n,ctx:s}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof ee&&this._def.unknownKeys==="strip"))for(const u in s.data)i.includes(u)||o.push(u);const c=[];for(const u of i){const d=a[u],m=s.data[u];c.push({key:{status:"valid",value:u},value:d._parse(new G(s,m,s.path,u)),alwaysSet:u in s.data})}if(this._def.catchall instanceof ee){const u=this._def.unknownKeys;if(u==="passthrough")for(const d of o)c.push({key:{status:"valid",value:d},value:{status:"valid",value:s.data[d]}});else if(u==="strict")o.length>0&&(f(s,{code:l.unrecognized_keys,keys:o}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const d of o){const m=s.data[d];c.push({key:{status:"valid",value:d},value:u._parse(new G(s,m,s.path,d)),alwaysSet:d in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const u=[];for(const d of c){const m=await d.key,h=await d.value;u.push({key:m,value:h,alwaysSet:d.alwaysSet})}return u}).then(u=>z.mergeObjectSync(n,u)):z.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(e){return _.errToObj,new j({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{var s,a,i,o;const c=(i=(a=(s=this._def).errorMap)===null||a===void 0?void 0:a.call(s,r,n).message)!==null&&i!==void 0?i:n.defaultError;return r.code==="unrecognized_keys"?{message:(o=_.errToObj(e).message)!==null&&o!==void 0?o:c}:{message:c}}}:{}})}strip(){return new j({...this._def,unknownKeys:"strip"})}passthrough(){return new j({...this._def,unknownKeys:"passthrough"})}extend(e){return new j({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new j({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:w.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new j({...this._def,catchall:e})}pick(e){const r={};return A.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new j({...this._def,shape:()=>r})}omit(e){const r={};return A.objectKeys(this.shape).forEach(n=>{e[n]||(r[n]=this.shape[n])}),new j({...this._def,shape:()=>r})}deepPartial(){return me(this)}partial(e){const r={};return A.objectKeys(this.shape).forEach(n=>{const s=this.shape[n];e&&!e[n]?r[n]=s:r[n]=s.optional()}),new j({...this._def,shape:()=>r})}required(e){const r={};return A.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])r[n]=this.shape[n];else{let a=this.shape[n];for(;a instanceof q;)a=a._def.innerType;r[n]=a}}),new j({...this._def,shape:()=>r})}keyof(){return wr(A.objectKeys(this.shape))}}j.create=(t,e)=>new j({shape:()=>t,unknownKeys:"strip",catchall:ee.create(),typeName:w.ZodObject,...T(e)});j.strictCreate=(t,e)=>new j({shape:()=>t,unknownKeys:"strict",catchall:ee.create(),typeName:w.ZodObject,...T(e)});j.lazycreate=(t,e)=>new j({shape:t,unknownKeys:"strip",catchall:ee.create(),typeName:w.ZodObject,...T(e)});class je extends E{_parse(e){const{ctx:r}=this._processInputParams(e),n=this._def.options;function s(a){for(const o of a)if(o.result.status==="valid")return o.result;for(const o of a)if(o.result.status==="dirty")return r.common.issues.push(...o.ctx.common.issues),o.result;const i=a.map(o=>new L(o.ctx.common.issues));return f(r,{code:l.invalid_union,unionErrors:i}),x}if(r.common.async)return Promise.all(n.map(async a=>{const i={...r,common:{...r.common,issues:[]},parent:null};return{result:await a._parseAsync({data:r.data,path:r.path,parent:i}),ctx:i}})).then(s);{let a;const i=[];for(const c of n){const u={...r,common:{...r.common,issues:[]},parent:null},d=c._parseSync({data:r.data,path:r.path,parent:u});if(d.status==="valid")return d;d.status==="dirty"&&!a&&(a={result:d,ctx:u}),u.common.issues.length&&i.push(u.common.issues)}if(a)return r.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(c=>new L(c));return f(r,{code:l.invalid_union,unionErrors:o}),x}}get options(){return this._def.options}}je.create=(t,e)=>new je({options:t,typeName:w.ZodUnion,...T(e)});const J=t=>t instanceof De?J(t.schema):t instanceof W?J(t.innerType()):t instanceof ze?[t.value]:t instanceof ae?t.options:t instanceof $e?A.objectValues(t.enum):t instanceof Ve?J(t._def.innerType):t instanceof Ze?[void 0]:t instanceof Ie?[null]:t instanceof q?[void 0,...J(t.unwrap())]:t instanceof ie?[null,...J(t.unwrap())]:t instanceof Pt||t instanceof Fe?J(t.unwrap()):t instanceof Le?J(t._def.innerType):[];class ut extends E{_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==p.object)return f(r,{code:l.invalid_type,expected:p.object,received:r.parsedType}),x;const n=this.discriminator,s=r.data[n],a=this.optionsMap.get(s);return a?r.common.async?a._parseAsync({data:r.data,path:r.path,parent:r}):a._parseSync({data:r.data,path:r.path,parent:r}):(f(r,{code:l.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),x)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){const s=new Map;for(const a of r){const i=J(a.shape[e]);if(!i.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const o of i){if(s.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);s.set(o,a)}}return new ut({typeName:w.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:s,...T(n)})}}function At(t,e){const r=Y(t),n=Y(e);if(t===e)return{valid:!0,data:t};if(r===p.object&&n===p.object){const s=A.objectKeys(e),a=A.objectKeys(t).filter(o=>s.indexOf(o)!==-1),i={...t,...e};for(const o of a){const c=At(t[o],e[o]);if(!c.valid)return{valid:!1};i[o]=c.data}return{valid:!0,data:i}}else if(r===p.array&&n===p.array){if(t.length!==e.length)return{valid:!1};const s=[];for(let a=0;a<t.length;a++){const i=t[a],o=e[a],c=At(i,o);if(!c.valid)return{valid:!1};s.push(c.data)}return{valid:!0,data:s}}else return r===p.date&&n===p.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class Pe extends E{_parse(e){const{status:r,ctx:n}=this._processInputParams(e),s=(a,i)=>{if(Et(a)||Et(i))return x;const o=At(a.value,i.value);return o.valid?((Ot(a)||Ot(i))&&r.dirty(),{status:r.value,value:o.data}):(f(n,{code:l.invalid_intersection_types}),x)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([a,i])=>s(a,i)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}Pe.create=(t,e,r)=>new Pe({left:t,right:e,typeName:w.ZodIntersection,...T(r)});class K extends E{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==p.array)return f(n,{code:l.invalid_type,expected:p.array,received:n.parsedType}),x;if(n.data.length<this._def.items.length)return f(n,{code:l.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),x;!this._def.rest&&n.data.length>this._def.items.length&&(f(n,{code:l.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const a=[...n.data].map((i,o)=>{const c=this._def.items[o]||this._def.rest;return c?c._parse(new G(n,i,n.path,o)):null}).filter(i=>!!i);return n.common.async?Promise.all(a).then(i=>z.mergeArray(r,i)):z.mergeArray(r,a)}get items(){return this._def.items}rest(e){return new K({...this._def,rest:e})}}K.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new K({items:t,typeName:w.ZodTuple,rest:null,...T(e)})};class Me extends E{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==p.object)return f(n,{code:l.invalid_type,expected:p.object,received:n.parsedType}),x;const s=[],a=this._def.keyType,i=this._def.valueType;for(const o in n.data)s.push({key:a._parse(new G(n,o,n.path,o)),value:i._parse(new G(n,n.data[o],n.path,o)),alwaysSet:o in n.data});return n.common.async?z.mergeObjectAsync(r,s):z.mergeObjectSync(r,s)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof E?new Me({keyType:e,valueType:r,typeName:w.ZodRecord,...T(n)}):new Me({keyType:U.create(),valueType:e,typeName:w.ZodRecord,...T(r)})}}class at extends E{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==p.map)return f(n,{code:l.invalid_type,expected:p.map,received:n.parsedType}),x;const s=this._def.keyType,a=this._def.valueType,i=[...n.data.entries()].map(([o,c],u)=>({key:s._parse(new G(n,o,n.path,[u,"key"])),value:a._parse(new G(n,c,n.path,[u,"value"]))}));if(n.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const c of i){const u=await c.key,d=await c.value;if(u.status==="aborted"||d.status==="aborted")return x;(u.status==="dirty"||d.status==="dirty")&&r.dirty(),o.set(u.value,d.value)}return{status:r.value,value:o}})}else{const o=new Map;for(const c of i){const u=c.key,d=c.value;if(u.status==="aborted"||d.status==="aborted")return x;(u.status==="dirty"||d.status==="dirty")&&r.dirty(),o.set(u.value,d.value)}return{status:r.value,value:o}}}}at.create=(t,e,r)=>new at({valueType:e,keyType:t,typeName:w.ZodMap,...T(r)});class pe extends E{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==p.set)return f(n,{code:l.invalid_type,expected:p.set,received:n.parsedType}),x;const s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(f(n,{code:l.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),r.dirty()),s.maxSize!==null&&n.data.size>s.maxSize.value&&(f(n,{code:l.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());const a=this._def.valueType;function i(c){const u=new Set;for(const d of c){if(d.status==="aborted")return x;d.status==="dirty"&&r.dirty(),u.add(d.value)}return{status:r.value,value:u}}const o=[...n.data.values()].map((c,u)=>a._parse(new G(n,c,n.path,u)));return n.common.async?Promise.all(o).then(c=>i(c)):i(o)}min(e,r){return new pe({...this._def,minSize:{value:e,message:_.toString(r)}})}max(e,r){return new pe({...this._def,maxSize:{value:e,message:_.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}}pe.create=(t,e)=>new pe({valueType:t,minSize:null,maxSize:null,typeName:w.ZodSet,...T(e)});class _e extends E{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==p.function)return f(r,{code:l.invalid_type,expected:p.function,received:r.parsedType}),x;function n(o,c){return tt({data:o,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,et(),ge].filter(u=>!!u),issueData:{code:l.invalid_arguments,argumentsError:c}})}function s(o,c){return tt({data:o,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,et(),ge].filter(u=>!!u),issueData:{code:l.invalid_return_type,returnTypeError:c}})}const a={errorMap:r.common.contextualErrorMap},i=r.data;if(this._def.returns instanceof be){const o=this;return $(async function(...c){const u=new L([]),d=await o._def.args.parseAsync(c,a).catch(g=>{throw u.addIssue(n(c,g)),u}),m=await Reflect.apply(i,this,d);return await o._def.returns._def.type.parseAsync(m,a).catch(g=>{throw u.addIssue(s(m,g)),u})})}else{const o=this;return $(function(...c){const u=o._def.args.safeParse(c,a);if(!u.success)throw new L([n(c,u.error)]);const d=Reflect.apply(i,this,u.data),m=o._def.returns.safeParse(d,a);if(!m.success)throw new L([s(d,m.error)]);return m.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new _e({...this._def,args:K.create(e).rest(ce.create())})}returns(e){return new _e({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new _e({args:e||K.create([]).rest(ce.create()),returns:r||ce.create(),typeName:w.ZodFunction,...T(n)})}}class De extends E{get schema(){return this._def.getter()}_parse(e){const{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}De.create=(t,e)=>new De({getter:t,typeName:w.ZodLazy,...T(e)});class ze extends E{_parse(e){if(e.data!==this._def.value){const r=this._getOrReturnCtx(e);return f(r,{received:r.data,code:l.invalid_literal,expected:this._def.value}),x}return{status:"valid",value:e.data}}get value(){return this._def.value}}ze.create=(t,e)=>new ze({value:t,typeName:w.ZodLiteral,...T(e)});function wr(t,e){return new ae({values:t,typeName:w.ZodEnum,...T(e)})}class ae extends E{constructor(){super(...arguments),xe.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const r=this._getOrReturnCtx(e),n=this._def.values;return f(r,{expected:A.joinValues(n),received:r.parsedType,code:l.invalid_type}),x}if(rt(this,xe)||_r(this,xe,new Set(this._def.values)),!rt(this,xe).has(e.data)){const r=this._getOrReturnCtx(e),n=this._def.values;return f(r,{received:r.data,code:l.invalid_enum_value,options:n}),x}return $(e.data)}get options(){return this._def.values}get enum(){const e={};for(const r of this._def.values)e[r]=r;return e}get Values(){const e={};for(const r of this._def.values)e[r]=r;return e}get Enum(){const e={};for(const r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return ae.create(e,{...this._def,...r})}exclude(e,r=this._def){return ae.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}}xe=new WeakMap;ae.create=wr;class $e extends E{constructor(){super(...arguments),ke.set(this,void 0)}_parse(e){const r=A.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==p.string&&n.parsedType!==p.number){const s=A.objectValues(r);return f(n,{expected:A.joinValues(s),received:n.parsedType,code:l.invalid_type}),x}if(rt(this,ke)||_r(this,ke,new Set(A.getValidEnumValues(this._def.values))),!rt(this,ke).has(e.data)){const s=A.objectValues(r);return f(n,{received:n.data,code:l.invalid_enum_value,options:s}),x}return $(e.data)}get enum(){return this._def.values}}ke=new WeakMap;$e.create=(t,e)=>new $e({values:t,typeName:w.ZodNativeEnum,...T(e)});class be extends E{unwrap(){return this._def.type}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==p.promise&&r.common.async===!1)return f(r,{code:l.invalid_type,expected:p.promise,received:r.parsedType}),x;const n=r.parsedType===p.promise?r.data:Promise.resolve(r.data);return $(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}}be.create=(t,e)=>new be({type:t,typeName:w.ZodPromise,...T(e)});class W extends E{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===w.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:r,ctx:n}=this._processInputParams(e),s=this._def.effect||null,a={addIssue:i=>{f(n,i),i.fatal?r.abort():r.dirty()},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),s.type==="preprocess"){const i=s.transform(n.data,a);if(n.common.async)return Promise.resolve(i).then(async o=>{if(r.value==="aborted")return x;const c=await this._def.schema._parseAsync({data:o,path:n.path,parent:n});return c.status==="aborted"?x:c.status==="dirty"||r.value==="dirty"?ye(c.value):c});{if(r.value==="aborted")return x;const o=this._def.schema._parseSync({data:i,path:n.path,parent:n});return o.status==="aborted"?x:o.status==="dirty"||r.value==="dirty"?ye(o.value):o}}if(s.type==="refinement"){const i=o=>{const c=s.refinement(o,a);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?x:(o.status==="dirty"&&r.dirty(),i(o.value),{status:r.value,value:o.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>o.status==="aborted"?x:(o.status==="dirty"&&r.dirty(),i(o.value).then(()=>({status:r.value,value:o.value}))))}if(s.type==="transform")if(n.common.async===!1){const i=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!fe(i))return i;const o=s.transform(i.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:o}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(i=>fe(i)?Promise.resolve(s.transform(i.value,a)).then(o=>({status:r.value,value:o})):i);A.assertNever(s)}}W.create=(t,e,r)=>new W({schema:t,typeName:w.ZodEffects,effect:e,...T(r)});W.createWithPreprocess=(t,e,r)=>new W({schema:e,effect:{type:"preprocess",transform:t},typeName:w.ZodEffects,...T(r)});class q extends E{_parse(e){return this._getType(e)===p.undefined?$(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}q.create=(t,e)=>new q({innerType:t,typeName:w.ZodOptional,...T(e)});class ie extends E{_parse(e){return this._getType(e)===p.null?$(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ie.create=(t,e)=>new ie({innerType:t,typeName:w.ZodNullable,...T(e)});class Ve extends E{_parse(e){const{ctx:r}=this._processInputParams(e);let n=r.data;return r.parsedType===p.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}Ve.create=(t,e)=>new Ve({innerType:t,typeName:w.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...T(e)});class Le extends E{_parse(e){const{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Re(s)?s.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new L(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new L(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}Le.create=(t,e)=>new Le({innerType:t,typeName:w.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...T(e)});class it extends E{_parse(e){if(this._getType(e)!==p.nan){const n=this._getOrReturnCtx(e);return f(n,{code:l.invalid_type,expected:p.nan,received:n.parsedType}),x}return{status:"valid",value:e.data}}}it.create=t=>new it({typeName:w.ZodNaN,...T(t)});const ys=Symbol("zod_brand");class Pt extends E{_parse(e){const{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class Ge extends E{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?x:a.status==="dirty"?(r.dirty(),ye(a.value)):this._def.out._parseAsync({data:a.value,path:n.path,parent:n})})();{const s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?x:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(e,r){return new Ge({in:e,out:r,typeName:w.ZodPipeline})}}class Fe extends E{_parse(e){const r=this._def.innerType._parse(e),n=s=>(fe(s)&&(s.value=Object.freeze(s.value)),s);return Re(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}}Fe.create=(t,e)=>new Fe({innerType:t,typeName:w.ZodReadonly,...T(e)});function xr(t,e={},r){return t?ve.create().superRefine((n,s)=>{var a,i;if(!t(n)){const o=typeof e=="function"?e(n):typeof e=="string"?{message:e}:e,c=(i=(a=o.fatal)!==null&&a!==void 0?a:r)!==null&&i!==void 0?i:!0,u=typeof o=="string"?{message:o}:o;s.addIssue({code:"custom",...u,fatal:c})}}):ve.create()}const _s={object:j.lazycreate};var w;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(w||(w={}));const gs=(t,e={message:`Input not instance of ${t.name}`})=>xr(r=>r instanceof t,e),kr=U.create,Sr=ne.create,vs=it.create,bs=se.create,Cr=Ne.create,ws=he.create,xs=nt.create,ks=Ze.create,Ss=Ie.create,Cs=ve.create,Ts=ce.create,Es=ee.create,Os=st.create,As=B.create,Rs=j.create,Ns=j.strictCreate,Zs=je.create,Is=ut.create,js=Pe.create,Ps=K.create,Ms=Me.create,Ds=at.create,zs=pe.create,$s=_e.create,Vs=De.create,Ls=ze.create,Fs=ae.create,Us=$e.create,Bs=be.create,Kt=W.create,Ws=q.create,qs=ie.create,Hs=W.createWithPreprocess,Gs=Ge.create,Ks=()=>kr().optional(),Js=()=>Sr().optional(),Ys=()=>Cr().optional(),Xs={string:t=>U.create({...t,coerce:!0}),number:t=>ne.create({...t,coerce:!0}),boolean:t=>Ne.create({...t,coerce:!0}),bigint:t=>se.create({...t,coerce:!0}),date:t=>he.create({...t,coerce:!0})},Qs=x;var _a=Object.freeze({__proto__:null,defaultErrorMap:ge,setErrorMap:Hn,getErrorMap:et,makeIssue:tt,EMPTY_PATH:Gn,addIssueToContext:f,ParseStatus:z,INVALID:x,DIRTY:ye,OK:$,isAborted:Et,isDirty:Ot,isValid:fe,isAsync:Re,get util(){return A},get objectUtil(){return Tt},ZodParsedType:p,getParsedType:Y,ZodType:E,datetimeRegex:br,ZodString:U,ZodNumber:ne,ZodBigInt:se,ZodBoolean:Ne,ZodDate:he,ZodSymbol:nt,ZodUndefined:Ze,ZodNull:Ie,ZodAny:ve,ZodUnknown:ce,ZodNever:ee,ZodVoid:st,ZodArray:B,ZodObject:j,ZodUnion:je,ZodDiscriminatedUnion:ut,ZodIntersection:Pe,ZodTuple:K,ZodRecord:Me,ZodMap:at,ZodSet:pe,ZodFunction:_e,ZodLazy:De,ZodLiteral:ze,ZodEnum:ae,ZodNativeEnum:$e,ZodPromise:be,ZodEffects:W,ZodTransformer:W,ZodOptional:q,ZodNullable:ie,ZodDefault:Ve,ZodCatch:Le,ZodNaN:it,BRAND:ys,ZodBranded:Pt,ZodPipeline:Ge,ZodReadonly:Fe,custom:xr,Schema:E,ZodSchema:E,late:_s,get ZodFirstPartyTypeKind(){return w},coerce:Xs,any:Cs,array:As,bigint:bs,boolean:Cr,date:ws,discriminatedUnion:Is,effect:Kt,enum:Fs,function:$s,instanceof:gs,intersection:js,lazy:Vs,literal:Ls,map:Ds,nan:vs,nativeEnum:Us,never:Es,null:Ss,nullable:qs,number:Sr,object:Rs,oboolean:Ys,onumber:Js,optional:Ws,ostring:Ks,pipeline:Gs,preprocess:Hs,promise:Bs,record:Ms,set:zs,strictObject:Ns,string:kr,symbol:xs,transformer:Kt,tuple:Ps,undefined:ks,union:Zs,unknown:Ts,void:Os,NEVER:Qs,ZodIssueCode:l,quotelessJson:qn,ZodError:L});export{Dr as A,cn as B,Q as C,sa as D,ya as E,fa as F,ha as P,cr as S,na as a,ma as b,ua as c,Fn as d,da as e,la as f,X as g,aa as h,Rt as i,Ce as j,We as k,an as l,on as m,dn as n,oa as o,ca as p,Pr as q,ar as r,Bt as s,Ct as t,pa as u,sn as v,ra as w,H as x,ia as y,_a as z};