@g4rcez/components 0.0.1

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 (139) hide show
  1. package/.idea/bigweld.iml +12 -0
  2. package/.idea/codeStyles/Project.xml +72 -0
  3. package/.idea/codeStyles/codeStyleConfig.xml +5 -0
  4. package/.idea/inspectionProfiles/Project_Default.xml +30 -0
  5. package/.idea/jsLibraryMappings.xml +6 -0
  6. package/.idea/modules.xml +8 -0
  7. package/.idea/prettier.xml +7 -0
  8. package/.idea/reason.xml +6 -0
  9. package/.idea/vcs.xml +6 -0
  10. package/.prettierrc.json +13 -0
  11. package/README.md +35 -0
  12. package/app/client-table.tsx +35 -0
  13. package/app/favicon.ico +0 -0
  14. package/app/layout.tsx +39 -0
  15. package/app/page.tsx +72 -0
  16. package/dist/components/core/button.d.ts +21 -0
  17. package/dist/components/core/button.d.ts.map +1 -0
  18. package/dist/components/core/polymorph.d.ts +10 -0
  19. package/dist/components/core/polymorph.d.ts.map +1 -0
  20. package/dist/components/display/card.d.ts +4 -0
  21. package/dist/components/display/card.d.ts.map +1 -0
  22. package/dist/components/floating/dropdown.d.ts +11 -0
  23. package/dist/components/floating/dropdown.d.ts.map +1 -0
  24. package/dist/components/floating/tooltip.d.ts +9 -0
  25. package/dist/components/floating/tooltip.d.ts.map +1 -0
  26. package/dist/components/form/autocomplete.d.ts +16 -0
  27. package/dist/components/form/autocomplete.d.ts.map +1 -0
  28. package/dist/components/form/file-upload.d.ts +12 -0
  29. package/dist/components/form/file-upload.d.ts.map +1 -0
  30. package/dist/components/form/form.d.ts +4 -0
  31. package/dist/components/form/form.d.ts.map +1 -0
  32. package/dist/components/form/input-field.d.ts +25 -0
  33. package/dist/components/form/input-field.d.ts.map +1 -0
  34. package/dist/components/form/input.d.ts +9 -0
  35. package/dist/components/form/input.d.ts.map +1 -0
  36. package/dist/components/form/select.d.ts +11 -0
  37. package/dist/components/form/select.d.ts.map +1 -0
  38. package/dist/components/form/switch.d.ts +7 -0
  39. package/dist/components/form/switch.d.ts.map +1 -0
  40. package/dist/components/index.d.ts +15 -0
  41. package/dist/components/index.d.ts.map +1 -0
  42. package/dist/components/table/filter.d.ts +70 -0
  43. package/dist/components/table/filter.d.ts.map +1 -0
  44. package/dist/components/table/group.d.ts +17 -0
  45. package/dist/components/table/group.d.ts.map +1 -0
  46. package/dist/components/table/index.d.ts +28 -0
  47. package/dist/components/table/index.d.ts.map +1 -0
  48. package/dist/components/table/metadata.d.ts +3 -0
  49. package/dist/components/table/metadata.d.ts.map +1 -0
  50. package/dist/components/table/sort.d.ts +28 -0
  51. package/dist/components/table/sort.d.ts.map +1 -0
  52. package/dist/components/table/table-lib.d.ts +99 -0
  53. package/dist/components/table/table-lib.d.ts.map +1 -0
  54. package/dist/components/table/thead.d.ts +7 -0
  55. package/dist/components/table/thead.d.ts.map +1 -0
  56. package/dist/hooks/use-form.d.ts +28 -0
  57. package/dist/hooks/use-form.d.ts.map +1 -0
  58. package/dist/hooks/use-previous.d.ts +2 -0
  59. package/dist/hooks/use-previous.d.ts.map +1 -0
  60. package/dist/hooks/use-reactive.d.ts +2 -0
  61. package/dist/hooks/use-reactive.d.ts.map +1 -0
  62. package/dist/index.css +1670 -0
  63. package/dist/index.d.ts +7 -0
  64. package/dist/index.d.ts.map +1 -0
  65. package/dist/index.mjs +21864 -0
  66. package/dist/index.mjs.map +1 -0
  67. package/dist/index.umd.js +151 -0
  68. package/dist/index.umd.js.map +1 -0
  69. package/dist/lib/dom.d.ts +6 -0
  70. package/dist/lib/dom.d.ts.map +1 -0
  71. package/dist/lib/fns.d.ts +5 -0
  72. package/dist/lib/fns.d.ts.map +1 -0
  73. package/dist/next.svg +1 -0
  74. package/dist/styles/design-tokens.d.ts +26 -0
  75. package/dist/styles/design-tokens.d.ts.map +1 -0
  76. package/dist/tailwind.config.d.ts +32 -0
  77. package/dist/tailwind.config.d.ts.map +1 -0
  78. package/dist/tailwind.config.js +153 -0
  79. package/dist/types.d.ts +9 -0
  80. package/dist/types.d.ts.map +1 -0
  81. package/dist/vercel.svg +1 -0
  82. package/docs/README.md +36 -0
  83. package/docs/next.config.mjs +4 -0
  84. package/docs/package.json +28 -0
  85. package/docs/pnpm-lock.yaml +1030 -0
  86. package/docs/postcss.config.mjs +8 -0
  87. package/docs/public/next.svg +1 -0
  88. package/docs/public/vercel.svg +1 -0
  89. package/docs/src/app/favicon.ico +0 -0
  90. package/docs/src/app/globals.css +33 -0
  91. package/docs/src/app/layout.tsx +22 -0
  92. package/docs/src/app/page.tsx +10 -0
  93. package/docs/tailwind.config.ts +15 -0
  94. package/docs/tsconfig.json +26 -0
  95. package/next-env.d.ts +5 -0
  96. package/next.config.mjs +4 -0
  97. package/package.json +72 -0
  98. package/postcss.config.mjs +8 -0
  99. package/public/next.svg +1 -0
  100. package/public/vercel.svg +1 -0
  101. package/src/components/core/button.tsx +91 -0
  102. package/src/components/core/polymorph.tsx +17 -0
  103. package/src/components/display/card.tsx +8 -0
  104. package/src/components/floating/dropdown.tsx +93 -0
  105. package/src/components/floating/tooltip.tsx +67 -0
  106. package/src/components/form/autocomplete.tsx +222 -0
  107. package/src/components/form/file-upload.tsx +129 -0
  108. package/src/components/form/form.tsx +28 -0
  109. package/src/components/form/input-field.tsx +105 -0
  110. package/src/components/form/input.tsx +73 -0
  111. package/src/components/form/select.tsx +58 -0
  112. package/src/components/form/switch.tsx +40 -0
  113. package/src/components/index.ts +14 -0
  114. package/src/components/table/filter.tsx +186 -0
  115. package/src/components/table/group.tsx +123 -0
  116. package/src/components/table/index.tsx +207 -0
  117. package/src/components/table/metadata.tsx +55 -0
  118. package/src/components/table/sort.tsx +141 -0
  119. package/src/components/table/table-lib.ts +130 -0
  120. package/src/components/table/thead.tsx +108 -0
  121. package/src/hooks/use-form.ts +155 -0
  122. package/src/hooks/use-previous.ts +9 -0
  123. package/src/hooks/use-reactive.ts +10 -0
  124. package/src/index.css +37 -0
  125. package/src/index.ts +6 -0
  126. package/src/lib/dom.ts +27 -0
  127. package/src/lib/fns.ts +23 -0
  128. package/src/styles/dark.json +66 -0
  129. package/src/styles/design-tokens.ts +57 -0
  130. package/src/styles/light.json +49 -0
  131. package/src/types.ts +11 -0
  132. package/styles.config.ts +42 -0
  133. package/tailwind.config.ts +11 -0
  134. package/tsconfig.json +55 -0
  135. package/tsconfig.lib.json +50 -0
  136. package/tsconfig.lib.tsbuildinfo +1 -0
  137. package/tsconfig.tailwind.json +32 -0
  138. package/tsconfig.tsbuildinfo +1 -0
  139. package/vite.config.mts +39 -0
@@ -0,0 +1,151 @@
1
+ (function(be,E){typeof exports=="object"&&typeof module<"u"?E(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],E):(be=typeof globalThis<"u"?globalThis:be||self,E(be.components={},be["react/jsx-runtime"],be.React,be.ReactDOM))})(this,function(be,E,w,Nu){"use strict";function Vu(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const R=Vu(w),$u=Vu(Nu);function En(t){return ju(t)?(t.nodeName||"").toLowerCase():"#document"}function Et(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function un(t){var e;return(e=(ju(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function ju(t){return t instanceof Node||t instanceof Et(t).Node}function Ve(t){return t instanceof Element||t instanceof Et(t).Element}function Je(t){return t instanceof HTMLElement||t instanceof Et(t).HTMLElement}function aa(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Et(t).ShadowRoot}function co(t){const{overflow:e,overflowX:n,overflowY:r,display:o}=It(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(o)}function Ev(t){return["table","td","th"].includes(En(t))}function gi(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function la(t){const e=ca(),n=It(t);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Cv(t){let e=fn(t);for(;Je(e)&&!Cn(e);){if(gi(e))return null;if(la(e))return e;e=fn(e)}return null}function ca(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Cn(t){return["html","body","#document"].includes(En(t))}function It(t){return Et(t).getComputedStyle(t)}function yi(t){return Ve(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function fn(t){if(En(t)==="html")return t;const e=t.assignedSlot||t.parentNode||aa(t)&&t.host||un(t);return aa(e)?e.host:e}function Bu(t){const e=fn(t);return Cn(e)?t.ownerDocument?t.ownerDocument.body:t.body:Je(e)&&co(e)?e:Bu(e)}function An(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const o=Bu(t),i=o===((r=t.ownerDocument)==null?void 0:r.body),s=Et(o);return i?e.concat(s,s.visualViewport||[],co(o)?o:[],s.frameElement&&n?An(s.frameElement):[]):e.concat(o,An(o,[],n))}function Bt(t){let e=t.activeElement;for(;((n=e)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;e=e.shadowRoot.activeElement}return e}function it(t,e){if(!t||!e)return!1;const n=e.getRootNode==null?void 0:e.getRootNode();if(t.contains(e))return!0;if(n&&aa(n)){let r=e;for(;r;){if(t===r)return!0;r=r.parentNode||r.host}}return!1}function zu(){const t=navigator.userAgentData;return t!=null&&t.platform?t.platform:navigator.platform}function Hu(){const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map(e=>{let{brand:n,version:r}=e;return n+"/"+r}).join(" "):navigator.userAgent}function Wu(t){return t.mozInputSource===0&&t.isTrusted?!0:da()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function ua(t){return Av()?!1:!da()&&t.width===0&&t.height===0||da()&&t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"||t.width<1&&t.height<1&&t.pressure===0&&t.detail===0&&t.pointerType==="touch"}function fa(){return/apple/i.test(navigator.vendor)}function da(){const t=/android/i;return t.test(zu())||t.test(Hu())}function Uu(){return zu().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Av(){return Hu().includes("jsdom/")}function uo(t,e){const n=["mouse","pen"];return e||n.push("",void 0),n.includes(t)}function _v(t){return"nativeEvent"in t}function Pv(t){return t.matches("html,body")}function st(t){return(t==null?void 0:t.ownerDocument)||document}function pa(t,e){if(e==null)return!1;if("composedPath"in t)return t.composedPath().includes(e);const n=t;return n.target!=null&&e.contains(n.target)}function _n(t){return"composedPath"in t?t.composedPath()[0]:t.target}const Ov="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function ha(t){return Je(t)&&t.matches(Ov)}function yt(t){t.preventDefault(),t.stopPropagation()}function Gu(t){return t?t.getAttribute("role")==="combobox"&&ha(t):!1}const Zt=Math.min,kt=Math.max,vi=Math.round,xr=Math.floor,Pn=t=>({x:t,y:t}),Iv={left:"right",right:"left",bottom:"top",top:"bottom"},kv={start:"end",end:"start"};function ma(t,e,n){return kt(t,Zt(e,n))}function wr(t,e){return typeof t=="function"?t(e):t}function On(t){return t.split("-")[0]}function Sr(t){return t.split("-")[1]}function Ku(t){return t==="x"?"y":"x"}function ga(t){return t==="y"?"height":"width"}function Zn(t){return["top","bottom"].includes(On(t))?"y":"x"}function ya(t){return Ku(Zn(t))}function Dv(t,e,n){n===void 0&&(n=!1);const r=Sr(t),o=ya(t),i=ga(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=bi(s)),[s,bi(s)]}function Mv(t){const e=bi(t);return[va(t),e,va(e)]}function va(t){return t.replace(/start|end/g,e=>kv[e])}function Rv(t,e,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return n?e?o:r:e?r:o;case"left":case"right":return e?i:s;default:return[]}}function Fv(t,e,n,r){const o=Sr(t);let i=Rv(On(t),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),e&&(i=i.concat(i.map(va)))),i}function bi(t){return t.replace(/left|right|bottom|top/g,e=>Iv[e])}function Lv(t){return{top:0,right:0,bottom:0,left:0,...t}}function Zu(t){return typeof t!="number"?Lv(t):{top:t,right:t,bottom:t,left:t}}function xi(t){const{x:e,y:n,width:r,height:o}=t;return{width:r,height:o,top:n,left:e,right:e+r,bottom:n+o,x:e,y:n}}/*!
2
+ * tabbable 6.2.0
3
+ * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
4
+ */var Nv=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],wi=Nv.join(","),qu=typeof Element>"u",Tr=qu?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Si=!qu&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t==null?void 0:t.ownerDocument},Ti=function t(e,n){var r;n===void 0&&(n=!0);var o=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert"),i=o===""||o==="true",s=i||n&&e&&t(e.parentNode);return s},Vv=function(e){var n,r=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"contenteditable");return r===""||r==="true"},$v=function(e,n,r){if(Ti(e))return[];var o=Array.prototype.slice.apply(e.querySelectorAll(wi));return n&&Tr.call(e,wi)&&o.unshift(e),o=o.filter(r),o},jv=function t(e,n,r){for(var o=[],i=Array.from(e);i.length;){var s=i.shift();if(!Ti(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,c=t(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:s,candidates:c})}else{var u=Tr.call(s,wi);u&&r.filter(s)&&(n||!e.includes(s))&&o.push(s);var f=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),d=!Ti(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(f&&d){var p=t(f===!0?s.children:f.children,!0,r);r.flatten?o.push.apply(o,p):o.push({scopeParent:s,candidates:p})}else i.unshift.apply(i,s.children)}}return o},Yu=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Xu=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Vv(e))&&!Yu(e)?0:e.tabIndex},Bv=function(e,n){var r=Xu(e);return r<0&&n&&!Yu(e)?0:r},zv=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},Ju=function(e){return e.tagName==="INPUT"},Hv=function(e){return Ju(e)&&e.type==="hidden"},Wv=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return n},Uv=function(e,n){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===n)return e[r]},Gv=function(e){if(!e.name)return!0;var n=e.form||Si(e),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(e.name));else try{o=r(e.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var i=Uv(o,e.form);return!i||i===e},Kv=function(e){return Ju(e)&&e.type==="radio"},Zv=function(e){return Kv(e)&&!Gv(e)},qv=function(e){var n,r=e&&Si(e),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==e){var s,a,l;for(i=!!((s=o)!==null&&s!==void 0&&(a=s.ownerDocument)!==null&&a!==void 0&&a.contains(o)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!i&&o;){var c,u,f;r=Si(o),o=(c=r)===null||c===void 0?void 0:c.host,i=!!((u=o)!==null&&u!==void 0&&(f=u.ownerDocument)!==null&&f!==void 0&&f.contains(o))}}return i},Qu=function(e){var n=e.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},Yv=function(e,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var i=Tr.call(e,"details>summary:first-of-type"),s=i?e.parentElement:e;if(Tr.call(s,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var a=e;e;){var l=e.parentElement,c=Si(e);if(l&&!l.shadowRoot&&o(l)===!0)return Qu(e);e.assignedSlot?e=e.assignedSlot:!l&&c!==e.ownerDocument?e=c.host:e=l}e=a}if(qv(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Qu(e);return!1},Xv=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var n=e.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return Tr.call(n,"fieldset[disabled] *")?!0:!o.contains(e)}return!0}n=n.parentElement}return!1},Jv=function(e,n){return!(n.disabled||Ti(n)||Hv(n)||Yv(n,e)||Wv(n)||Xv(n))},ba=function(e,n){return!(Zv(n)||Xu(n)<0||!Jv(e,n))},Qv=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},eb=function t(e){var n=[],r=[];return e.forEach(function(o,i){var s=!!o.scopeParent,a=s?o.scopeParent:o,l=Bv(a,s),c=s?t(o.candidates):a;l===0?s?n.push.apply(n,c):n.push(a):r.push({documentOrder:i,tabIndex:l,item:o,isScope:s,content:c})}),r.sort(zv).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Ei=function(e,n){n=n||{};var r;return n.getShadowRoot?r=jv([e],n.includeContainer,{filter:ba.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Qv}):r=$v(e,n.includeContainer,ba.bind(null,n)),eb(r)},tb=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return Tr.call(e,wi)===!1?!1:ba(n,e)};function ef(t,e,n){let{reference:r,floating:o}=t;const i=Zn(e),s=ya(e),a=ga(s),l=On(e),c=i==="y",u=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,d=r[a]/2-o[a]/2;let p;switch(l){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-o.width,y:f};break;default:p={x:r.x,y:r.y}}switch(Sr(e)){case"start":p[s]-=d*(n&&c?-1:1);break;case"end":p[s]+=d*(n&&c?-1:1);break}return p}const nb=async(t,e,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(e));let c=await s.getElementRects({reference:t,floating:e,strategy:o}),{x:u,y:f}=ef(c,r,l),d=r,p={},h=0;for(let m=0;m<a.length;m++){const{name:y,fn:v}=a[m],{x:b,y:g,data:S,reset:x}=await v({x:u,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:p,rects:c,platform:s,elements:{reference:t,floating:e}});u=b??u,f=g??f,p={...p,[y]:{...p[y],...S}},x&&h<=50&&(h++,typeof x=="object"&&(x.placement&&(d=x.placement),x.rects&&(c=x.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:o}):x.rects),{x:u,y:f}=ef(c,d,l)),m=-1)}return{x:u,y:f,placement:d,strategy:o,middlewareData:p}};async function xa(t,e){var n;e===void 0&&(e={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:d=!1,padding:p=0}=wr(e,t),h=Zu(p),y=a[d?f==="floating"?"reference":"floating":f],v=xi(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(y)))==null||n?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),b=f==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,g=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),S=await(i.isElement==null?void 0:i.isElement(g))?await(i.getScale==null?void 0:i.getScale(g))||{x:1,y:1}:{x:1,y:1},x=xi(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:g,strategy:l}):b);return{top:(v.top-x.top+h.top)/S.y,bottom:(x.bottom-v.bottom+h.bottom)/S.y,left:(v.left-x.left+h.left)/S.x,right:(x.right-v.right+h.right)/S.x}}const rb=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=e,{element:c,padding:u=0}=wr(t,e)||{};if(c==null)return{};const f=Zu(u),d={x:n,y:r},p=ya(o),h=ga(p),m=await s.getDimensions(c),y=p==="y",v=y?"top":"left",b=y?"bottom":"right",g=y?"clientHeight":"clientWidth",S=i.reference[h]+i.reference[p]-d[p]-i.floating[h],x=d[p]-i.reference[p],T=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let P=T?T[g]:0;(!P||!await(s.isElement==null?void 0:s.isElement(T)))&&(P=a.floating[g]||i.floating[h]);const O=S/2-x/2,k=P/2-m[h]/2-1,D=Zt(f[v],k),L=Zt(f[b],k),A=D,j=P-m[h]-L,F=P/2-m[h]/2+O,_=ma(A,F,j),M=!l.arrow&&Sr(o)!=null&&F!==_&&i.reference[h]/2-(F<A?D:L)-m[h]/2<0,N=M?F<A?F-A:F-j:0;return{[p]:d[p]+N,data:{[p]:_,centerOffset:F-_-N,...M&&{alignmentOffset:N}},reset:M}}}),ob=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...y}=wr(t,e);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=On(o),b=Zn(a),g=On(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),x=d||(g||!m?[bi(a)]:Mv(a)),T=h!=="none";!d&&T&&x.push(...Fv(a,m,h,S));const P=[a,...x],O=await xa(e,y),k=[];let D=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&k.push(O[v]),f){const F=Dv(o,s,S);k.push(O[F[0]],O[F[1]])}if(D=[...D,{placement:o,overflows:k}],!k.every(F=>F<=0)){var L,A;const F=(((L=i.flip)==null?void 0:L.index)||0)+1,_=P[F];if(_)return{data:{index:F,overflows:D},reset:{placement:_}};let M=(A=D.filter(N=>N.overflows[0]<=0).sort((N,z)=>N.overflows[1]-z.overflows[1])[0])==null?void 0:A.placement;if(!M)switch(p){case"bestFit":{var j;const N=(j=D.filter(z=>{if(T){const q=Zn(z.placement);return q===b||q==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(q=>q>0).reduce((q,C)=>q+C,0)]).sort((z,q)=>z[1]-q[1])[0])==null?void 0:j[0];N&&(M=N);break}case"initialPlacement":M=a;break}if(o!==M)return{reset:{placement:M}}}return{}}}};async function ib(t,e){const{placement:n,platform:r,elements:o}=t,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=On(n),a=Sr(n),l=Zn(n)==="y",c=["left","top"].includes(s)?-1:1,u=i&&l?-1:1,f=wr(e,t);let{mainAxis:d,crossAxis:p,alignmentAxis:h}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&typeof h=="number"&&(p=a==="end"?h*-1:h),l?{x:p*u,y:d*c}:{x:d*c,y:p*u}}const sb=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=e,l=await ib(e,t);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}}}}},ab=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:o}=e,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:y=>{let{x:v,y:b}=y;return{x:v,y:b}}},...l}=wr(t,e),c={x:n,y:r},u=await xa(e,l),f=Zn(On(o)),d=Ku(f);let p=c[d],h=c[f];if(i){const y=d==="y"?"top":"left",v=d==="y"?"bottom":"right",b=p+u[y],g=p-u[v];p=ma(b,p,g)}if(s){const y=f==="y"?"top":"left",v=f==="y"?"bottom":"right",b=h+u[y],g=h-u[v];h=ma(b,h,g)}const m=a.fn({...e,[d]:p,[f]:h});return{...m,data:{x:m.x-n,y:m.y-r}}}}},lb=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:n,rects:r,platform:o,elements:i}=e,{apply:s=()=>{},...a}=wr(t,e),l=await xa(e,a),c=On(n),u=Sr(n),f=Zn(n)==="y",{width:d,height:p}=r.floating;let h,m;c==="top"||c==="bottom"?(h=c,m=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(m=c,h=u==="end"?"top":"bottom");const y=p-l.top-l.bottom,v=d-l.left-l.right,b=Zt(p-l[h],y),g=Zt(d-l[m],v),S=!e.middlewareData.shift;let x=b,T=g;if(f?T=u||S?Zt(g,v):v:x=u||S?Zt(b,y):y,S&&!u){const O=kt(l.left,0),k=kt(l.right,0),D=kt(l.top,0),L=kt(l.bottom,0);f?T=d-2*(O!==0||k!==0?O+k:kt(l.left,l.right)):x=p-2*(D!==0||L!==0?D+L:kt(l.top,l.bottom))}await s({...e,availableWidth:T,availableHeight:x});const P=await o.getDimensions(i.floating);return d!==P.width||p!==P.height?{reset:{rects:!0}}:{}}}};function tf(t){const e=It(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const o=Je(t),i=o?t.offsetWidth:n,s=o?t.offsetHeight:r,a=vi(n)!==i||vi(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function wa(t){return Ve(t)?t:t.contextElement}function Er(t){const e=wa(t);if(!Je(e))return Pn(1);const n=e.getBoundingClientRect(),{width:r,height:o,$:i}=tf(e);let s=(i?vi(n.width):n.width)/r,a=(i?vi(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const cb=Pn(0);function nf(t){const e=Et(t);return!ca()||!e.visualViewport?cb:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function ub(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Et(t)?!1:e}function qn(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const o=t.getBoundingClientRect(),i=wa(t);let s=Pn(1);e&&(r?Ve(r)&&(s=Er(r)):s=Er(t));const a=ub(i,n,r)?nf(i):Pn(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,f=o.height/s.y;if(i){const d=Et(i),p=r&&Ve(r)?Et(r):r;let h=d,m=h.frameElement;for(;m&&r&&p!==h;){const y=Er(m),v=m.getBoundingClientRect(),b=It(m),g=v.left+(m.clientLeft+parseFloat(b.paddingLeft))*y.x,S=v.top+(m.clientTop+parseFloat(b.paddingTop))*y.y;l*=y.x,c*=y.y,u*=y.x,f*=y.y,l+=g,c+=S,h=Et(m),m=h.frameElement}}return xi({width:u,height:f,x:l,y:c})}function fb(t){let{elements:e,rect:n,offsetParent:r,strategy:o}=t;const i=o==="fixed",s=un(r),a=e?gi(e.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Pn(1);const u=Pn(0),f=Je(r);if((f||!f&&!i)&&((En(r)!=="body"||co(s))&&(l=yi(r)),Je(r))){const d=qn(r);c=Er(r),u.x=d.x+r.clientLeft,u.y=d.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}}function db(t){return Array.from(t.getClientRects())}function rf(t){return qn(un(t)).left+yi(t).scrollLeft}function pb(t){const e=un(t),n=yi(t),r=t.ownerDocument.body,o=kt(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),i=kt(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+rf(t);const a=-n.scrollTop;return It(r).direction==="rtl"&&(s+=kt(e.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}function hb(t,e){const n=Et(t),r=un(t),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const c=ca();(!c||c&&e==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}function mb(t,e){const n=qn(t,!0,e==="fixed"),r=n.top+t.clientTop,o=n.left+t.clientLeft,i=Je(t)?Er(t):Pn(1),s=t.clientWidth*i.x,a=t.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:s,height:a,x:l,y:c}}function of(t,e,n){let r;if(e==="viewport")r=hb(t,n);else if(e==="document")r=pb(un(t));else if(Ve(e))r=mb(e,n);else{const o=nf(t);r={...e,x:e.x-o.x,y:e.y-o.y}}return xi(r)}function sf(t,e){const n=fn(t);return n===e||!Ve(n)||Cn(n)?!1:It(n).position==="fixed"||sf(n,e)}function gb(t,e){const n=e.get(t);if(n)return n;let r=An(t,[],!1).filter(a=>Ve(a)&&En(a)!=="body"),o=null;const i=It(t).position==="fixed";let s=i?fn(t):t;for(;Ve(s)&&!Cn(s);){const a=It(s),l=la(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||co(s)&&!l&&sf(t,s))?r=r.filter(u=>u!==s):o=a,s=fn(s)}return e.set(t,r),r}function yb(t){let{element:e,boundary:n,rootBoundary:r,strategy:o}=t;const s=[...n==="clippingAncestors"?gi(e)?[]:gb(e,this._c):[].concat(n),r],a=s[0],l=s.reduce((c,u)=>{const f=of(e,u,o);return c.top=kt(f.top,c.top),c.right=Zt(f.right,c.right),c.bottom=Zt(f.bottom,c.bottom),c.left=kt(f.left,c.left),c},of(e,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function vb(t){const{width:e,height:n}=tf(t);return{width:e,height:n}}function bb(t,e,n){const r=Je(e),o=un(e),i=n==="fixed",s=qn(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const l=Pn(0);if(r||!r&&!i)if((En(e)!=="body"||co(o))&&(a=yi(e)),r){const f=qn(e,!0,i,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}else o&&(l.x=rf(o));const c=s.left+a.scrollLeft-l.x,u=s.top+a.scrollTop-l.y;return{x:c,y:u,width:s.width,height:s.height}}function Sa(t){return It(t).position==="static"}function af(t,e){return!Je(t)||It(t).position==="fixed"?null:e?e(t):t.offsetParent}function lf(t,e){const n=Et(t);if(gi(t))return n;if(!Je(t)){let o=fn(t);for(;o&&!Cn(o);){if(Ve(o)&&!Sa(o))return o;o=fn(o)}return n}let r=af(t,e);for(;r&&Ev(r)&&Sa(r);)r=af(r,e);return r&&Cn(r)&&Sa(r)&&!la(r)?n:r||Cv(t)||n}const xb=async function(t){const e=this.getOffsetParent||lf,n=this.getDimensions,r=await n(t.floating);return{reference:bb(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function wb(t){return It(t).direction==="rtl"}const Sb={convertOffsetParentRelativeRectToViewportRelativeRect:fb,getDocumentElement:un,getClippingRect:yb,getOffsetParent:lf,getElementRects:xb,getClientRects:db,getDimensions:vb,getScale:Er,isElement:Ve,isRTL:wb};function Tb(t,e){let n=null,r;const o=un(t);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{left:c,top:u,width:f,height:d}=t.getBoundingClientRect();if(a||e(),!f||!d)return;const p=xr(u),h=xr(o.clientWidth-(c+f)),m=xr(o.clientHeight-(u+d)),y=xr(c),b={rootMargin:-p+"px "+-h+"px "+-m+"px "+-y+"px",threshold:kt(0,Zt(1,l))||1};let g=!0;function S(x){const T=x[0].intersectionRatio;if(T!==l){if(!g)return s();T?s(!1,T):r=setTimeout(()=>{s(!1,1e-7)},1e3)}g=!1}try{n=new IntersectionObserver(S,{...b,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,b)}n.observe(t)}return s(!0),i}function Ta(t,e,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,c=wa(t),u=o||i?[...c?An(c):[],...An(e)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const f=c&&a?Tb(c,n):null;let d=-1,p=null;s&&(p=new ResizeObserver(v=>{let[b]=v;b&&b.target===c&&p&&(p.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var g;(g=p)==null||g.observe(e)})),n()}),c&&!l&&p.observe(c),p.observe(e));let h,m=l?qn(t):null;l&&y();function y(){const v=qn(t);m&&(v.x!==m.x||v.y!==m.y||v.width!==m.width||v.height!==m.height)&&n(),m=v,h=requestAnimationFrame(y)}return n(),()=>{var v;u.forEach(b=>{o&&b.removeEventListener("scroll",n),i&&b.removeEventListener("resize",n)}),f==null||f(),(v=p)==null||v.disconnect(),p=null,l&&cancelAnimationFrame(h)}}const Eb=sb,Cb=ab,Ab=ob,_b=lb,cf=rb,Pb=(t,e,n)=>{const r=new Map,o={platform:Sb,...n},i={...o.platform,_c:r};return nb(t,e,{...o,platform:i})};var Ci=typeof document<"u"?w.useLayoutEffect:w.useEffect;function Ai(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,o;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!Ai(t[r],e[r]))return!1;return!0}if(o=Object.keys(t),n=o.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&t.$$typeof)&&!Ai(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function uf(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function ff(t,e){const n=uf(t);return Math.round(e*n)/n}function df(t){const e=R.useRef(t);return Ci(()=>{e.current=t}),e}function Ob(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[u,f]=R.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[d,p]=R.useState(r);Ai(d,r)||p(r);const[h,m]=R.useState(null),[y,v]=R.useState(null),b=R.useCallback(N=>{N!==T.current&&(T.current=N,m(N))},[]),g=R.useCallback(N=>{N!==P.current&&(P.current=N,v(N))},[]),S=i||h,x=s||y,T=R.useRef(null),P=R.useRef(null),O=R.useRef(u),k=l!=null,D=df(l),L=df(o),A=R.useCallback(()=>{if(!T.current||!P.current)return;const N={placement:e,strategy:n,middleware:d};L.current&&(N.platform=L.current),Pb(T.current,P.current,N).then(z=>{const q={...z,isPositioned:!0};j.current&&!Ai(O.current,q)&&(O.current=q,$u.flushSync(()=>{f(q)}))})},[d,e,n,L]);Ci(()=>{c===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,f(N=>({...N,isPositioned:!1})))},[c]);const j=R.useRef(!1);Ci(()=>(j.current=!0,()=>{j.current=!1}),[]),Ci(()=>{if(S&&(T.current=S),x&&(P.current=x),S&&x){if(D.current)return D.current(S,x,A);A()}},[S,x,A,D,k]);const F=R.useMemo(()=>({reference:T,floating:P,setReference:b,setFloating:g}),[b,g]),_=R.useMemo(()=>({reference:S,floating:x}),[S,x]),M=R.useMemo(()=>{const N={position:n,left:0,top:0};if(!_.floating)return N;const z=ff(_.floating,u.x),q=ff(_.floating,u.y);return a?{...N,transform:"translate("+z+"px, "+q+"px)",...uf(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:z,top:q}},[n,a,_.floating,u.x,u.y]);return R.useMemo(()=>({...u,update:A,refs:F,elements:_,floatingStyles:M}),[u,A,F,_,M])}const Ib=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:o}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?cf({element:r.current,padding:o}).fn(n):{}:r?cf({element:r,padding:o}).fn(n):{}}}},Ea=(t,e)=>({...Eb(t),options:[t,e]}),pf=(t,e)=>({...Cb(t),options:[t,e]}),hf=(t,e)=>({...Ab(t),options:[t,e]}),kb=(t,e)=>({..._b(t),options:[t,e]}),mf=(t,e)=>({...Ib(t),options:[t,e]}),gf={...R},Db=gf.useInsertionEffect||(t=>t());function Dt(t){const e=R.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Db(()=>{e.current=t}),R.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e.current==null?void 0:e.current(...r)},[])}const Ca="ArrowUp",fo="ArrowDown",Cr="ArrowLeft",Ar="ArrowRight";function _i(t,e,n){return Math.floor(t/e)!==n}function po(t,e){return e<0||e>=t.current.length}function Aa(t,e){return dt(t,{disabledIndices:e})}function yf(t,e){return dt(t,{decrement:!0,startingIndex:t.current.length,disabledIndices:e})}function dt(t,e){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=e===void 0?{}:e;const s=t.current;let a=n;do a+=r?-i:i;while(a>=0&&a<=s.length-1&&Pi(s,a,o));return a}function Mb(t,e){let{event:n,orientation:r,loop:o,cols:i,disabledIndices:s,minIndex:a,maxIndex:l,prevIndex:c,stopEvent:u=!1}=e,f=c;if(n.key===Ca){if(u&&yt(n),c===-1)f=l;else if(f=dt(t,{startingIndex:f,amount:i,decrement:!0,disabledIndices:s}),o&&(c-i<a||f<0)){const d=c%i,p=l%i,h=l-(p-d);p===d?f=l:f=p>d?h:h-i}po(t,f)&&(f=c)}if(n.key===fo&&(u&&yt(n),c===-1?f=a:(f=dt(t,{startingIndex:c,amount:i,disabledIndices:s}),o&&c+i>l&&(f=dt(t,{startingIndex:c%i-i,amount:i,disabledIndices:s}))),po(t,f)&&(f=c)),r==="both"){const d=xr(c/i);n.key===Ar&&(u&&yt(n),c%i!==i-1?(f=dt(t,{startingIndex:c,disabledIndices:s}),o&&_i(f,i,d)&&(f=dt(t,{startingIndex:c-c%i-1,disabledIndices:s}))):o&&(f=dt(t,{startingIndex:c-c%i-1,disabledIndices:s})),_i(f,i,d)&&(f=c)),n.key===Cr&&(u&&yt(n),c%i!==0?(f=dt(t,{startingIndex:c,decrement:!0,disabledIndices:s}),o&&_i(f,i,d)&&(f=dt(t,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:s}))):o&&(f=dt(t,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:s})),_i(f,i,d)&&(f=c));const p=xr(l/i)===d;po(t,f)&&(o&&p?f=n.key===Cr?l:dt(t,{startingIndex:c-c%i-1,disabledIndices:s}):f=c)}return f}function Rb(t,e,n){const r=[];let o=0;return t.forEach((i,s)=>{let{width:a,height:l}=i;if(a>e&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+s+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let f=0;f<a;f++)for(let d=0;d<l;d++)u.push(o+f+d*e);o%e+a<=e&&u.every(f=>r[f]==null)?(u.forEach(f=>{r[f]=s}),c=!0):o++}}),[...r]}function Fb(t,e,n,r,o){if(t===-1)return-1;const i=n.indexOf(t),s=e[t];switch(o){case"tl":return i;case"tr":return s?i+s.width-1:i;case"bl":return s?i+(s.height-1)*r:i;case"br":return n.lastIndexOf(t)}}function Lb(t,e){return e.flatMap((n,r)=>t.includes(n)?[r]:[])}function Pi(t,e,n){if(n)return n.includes(e);const r=t[e];return r==null||r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"}let vf=0;function dn(t,e){e===void 0&&(e={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=e;r&&cancelAnimationFrame(vf);const i=()=>t==null?void 0:t.focus({preventScroll:n});o?i():vf=requestAnimationFrame(i)}var je=typeof document<"u"?w.useLayoutEffect:w.useEffect;function ho(){return ho=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ho.apply(this,arguments)}let bf=!1,Nb=0;const xf=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Nb++;function Vb(){const[t,e]=R.useState(()=>bf?xf():void 0);return je(()=>{t==null&&e(xf())},[]),R.useEffect(()=>{bf=!0},[]),t}const mo=gf.useId||Vb;let go;process.env.NODE_ENV!=="production"&&(go=new Set);function Oi(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((t=go)!=null&&t.has(o))){var i;(i=go)==null||i.add(o),console.warn(o)}}function $b(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((t=go)!=null&&t.has(o))){var i;(i=go)==null||i.add(o),console.error(o)}}const wf=R.forwardRef(function(e,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i}},width:s=14,height:a=7,tipRadius:l=0,strokeWidth:c=0,staticOffset:u,stroke:f,d,style:{transform:p,...h}={},...m}=e;process.env.NODE_ENV!=="production"&&(n||Oi("The `ref` prop is required for `FloatingArrow`."));const y=mo(),[v,b]=R.useState(!1);if(je(()=>{if(!o)return;It(o).direction==="rtl"&&b(!0)},[o]),!o)return null;const g=c*2,S=g/2,x=s/2*(l/-8+1),T=a/2*l/4,[P,O]=r.split("-"),k=!!d,D=P==="top"||P==="bottom",L=u&&O==="end"?"bottom":"top";let A=u&&O==="end"?"right":"left";u&&v&&(A=O==="end"?"left":"right");const j=(i==null?void 0:i.x)!=null?u||i.x:"",F=(i==null?void 0:i.y)!=null?u||i.y:"",_=d||"M0,0"+(" H"+s)+(" L"+(s-x)+","+(a-T))+(" Q"+s/2+","+a+" "+x+","+(a-T))+" Z",M={top:k?"rotate(180deg)":"",left:k?"rotate(90deg)":"rotate(-90deg)",bottom:k?"":"rotate(180deg)",right:k?"rotate(-90deg)":"rotate(90deg)"}[P];return R.createElement("svg",ho({},m,{"aria-hidden":!0,ref:n,width:k?s:s+g,height:s,viewBox:"0 0 "+s+" "+(a>s?a:s),style:{position:"absolute",pointerEvents:"none",[A]:j,[L]:F,[P]:D||k?"100%":"calc(100% - "+g/2+"px)",transform:""+M+(p??""),...h}}),g>0&&R.createElement("path",{clipPath:"url(#"+y+")",fill:"none",stroke:f,strokeWidth:g+(d?0:1),d:_}),R.createElement("path",{stroke:g&&!d?m.fill:"none",d:_}),R.createElement("clipPath",{id:y},R.createElement("rect",{x:-S,y:S*(k?-1:1),width:s+g,height:s})))});function jb(){const t=new Map;return{emit(e,n){var r;(r=t.get(e))==null||r.forEach(o=>o(n))},on(e,n){t.set(e,[...t.get(e)||[],n])},off(e,n){var r;t.set(e,((r=t.get(e))==null?void 0:r.filter(o=>o!==n))||[])}}}const Bb=R.createContext(null),zb=R.createContext(null),Ii=()=>{var t;return((t=R.useContext(Bb))==null?void 0:t.id)||null},yo=()=>R.useContext(zb);function Yn(t){return"data-floating-ui-"+t}function vt(t){const e=w.useRef(t);return je(()=>{e.current=t}),e}const Sf=Yn("safe-polygon");function _a(t,e,n){return n&&!uo(n)?0:typeof t=="number"?t:t==null?void 0:t[e]}function Hb(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:s}=t,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:f=0,move:d=!0}=e,p=yo(),h=Ii(),m=vt(c),y=vt(l),v=vt(n),b=R.useRef(),g=R.useRef(-1),S=R.useRef(),x=R.useRef(-1),T=R.useRef(!0),P=R.useRef(!1),O=R.useRef(()=>{}),k=R.useCallback(()=>{var _;const M=(_=o.current.openEvent)==null?void 0:_.type;return(M==null?void 0:M.includes("mouse"))&&M!=="mousedown"},[o]);R.useEffect(()=>{if(!a)return;function _(M){let{open:N}=M;N||(clearTimeout(g.current),clearTimeout(x.current),T.current=!0)}return i.on("openchange",_),()=>{i.off("openchange",_)}},[a,i]),R.useEffect(()=>{if(!a||!m.current||!n)return;function _(N){k()&&r(!1,N,"hover")}const M=st(s.floating).documentElement;return M.addEventListener("mouseleave",_),()=>{M.removeEventListener("mouseleave",_)}},[s.floating,n,r,a,m,k]);const D=R.useCallback(function(_,M,N){M===void 0&&(M=!0),N===void 0&&(N="hover");const z=_a(y.current,"close",b.current);z&&!S.current?(clearTimeout(g.current),g.current=window.setTimeout(()=>r(!1,_,N),z)):M&&(clearTimeout(g.current),r(!1,_,N))},[y,r]),L=Dt(()=>{O.current(),S.current=void 0}),A=Dt(()=>{if(P.current){const _=st(s.floating).body;_.style.pointerEvents="",_.removeAttribute(Sf),P.current=!1}});R.useEffect(()=>{if(!a)return;function _(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function M(C){if(clearTimeout(g.current),T.current=!1,u&&!uo(b.current)||f>0&&!_a(y.current,"open"))return;const $=_a(y.current,"open",b.current);$?g.current=window.setTimeout(()=>{v.current||r(!0,C,"hover")},$):r(!0,C,"hover")}function N(C){if(_())return;O.current();const $=st(s.floating);if(clearTimeout(x.current),m.current&&o.current.floatingContext){n||clearTimeout(g.current),S.current=m.current({...o.current.floatingContext,tree:p,x:C.clientX,y:C.clientY,onClose(){A(),L(),D(C,!0,"safe-polygon")}});const re=S.current;$.addEventListener("mousemove",re),O.current=()=>{$.removeEventListener("mousemove",re)};return}(b.current==="touch"?!it(s.floating,C.relatedTarget):!0)&&D(C)}function z(C){_()||o.current.floatingContext&&(m.current==null||m.current({...o.current.floatingContext,tree:p,x:C.clientX,y:C.clientY,onClose(){A(),L(),D(C)}})(C))}if(Ve(s.domReference)){var q;const C=s.domReference;return n&&C.addEventListener("mouseleave",z),(q=s.floating)==null||q.addEventListener("mouseleave",z),d&&C.addEventListener("mousemove",M,{once:!0}),C.addEventListener("mouseenter",M),C.addEventListener("mouseleave",N),()=>{var $;n&&C.removeEventListener("mouseleave",z),($=s.floating)==null||$.removeEventListener("mouseleave",z),d&&C.removeEventListener("mousemove",M),C.removeEventListener("mouseenter",M),C.removeEventListener("mouseleave",N)}}},[s,a,t,u,f,d,D,L,A,r,n,v,p,y,m,o]),je(()=>{var _;if(a&&n&&(_=m.current)!=null&&_.__options.blockPointerEvents&&k()){const N=st(s.floating).body;N.setAttribute(Sf,""),N.style.pointerEvents="none",P.current=!0;const z=s.floating;if(Ve(s.domReference)&&z){var M;const q=s.domReference,C=p==null||(M=p.nodesRef.current.find($=>$.id===h))==null||(M=M.context)==null?void 0:M.elements.floating;return C&&(C.style.pointerEvents=""),q.style.pointerEvents="auto",z.style.pointerEvents="auto",()=>{q.style.pointerEvents="",z.style.pointerEvents=""}}}},[a,n,h,s,p,m,k]),je(()=>{n||(b.current=void 0,L(),A())},[n,L,A]),R.useEffect(()=>()=>{L(),clearTimeout(g.current),clearTimeout(x.current),A()},[a,s.domReference,L,A]);const j=R.useMemo(()=>{function _(M){b.current=M.pointerType}return{onPointerDown:_,onPointerEnter:_,onMouseMove(M){const{nativeEvent:N}=M;function z(){!T.current&&!v.current&&r(!0,N,"hover")}u&&!uo(b.current)||n||f===0||(clearTimeout(x.current),b.current==="touch"?z():x.current=window.setTimeout(z,f))}}},[u,r,n,v,f]),F=R.useMemo(()=>({onMouseEnter(){clearTimeout(g.current)},onMouseLeave(_){D(_.nativeEvent,!1)}}),[D]);return R.useMemo(()=>a?{reference:j,floating:F}:{},[a,j,F])}function Wb(t,e){var n;let r=[],o=(n=t.find(i=>i.id===e))==null?void 0:n.parentId;for(;o;){const i=t.find(s=>s.id===o);o=i==null?void 0:i.parentId,i&&(r=r.concat(i))}return r}function _r(t,e){let n=t.filter(o=>{var i;return o.parentId===e&&((i=o.context)==null?void 0:i.open)}),r=n;for(;r.length;)r=t.filter(o=>{var i;return(i=r)==null?void 0:i.some(s=>{var a;return o.parentId===s.id&&((a=o.context)==null?void 0:a.open)})}),n=n.concat(r);return n}function Ub(t,e){let n,r=-1;function o(i,s){s>r&&(n=i,r=s),_r(t,i).forEach(l=>{o(l.id,s+1)})}return o(e,0),t.find(i=>i.id===n)}let Pr=new WeakMap,ki=new WeakSet,Di={},Pa=0;const Gb=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Tf=t=>t&&(t.host||Tf(t.parentNode)),Kb=(t,e)=>e.map(n=>{if(t.contains(n))return n;const r=Tf(n);return t.contains(r)?r:null}).filter(n=>n!=null);function Zb(t,e,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,s=Kb(e,t),a=new Set,l=new Set(s),c=[];Di[o]||(Di[o]=new WeakMap);const u=Di[o];s.forEach(f),d(e),a.clear();function f(p){!p||a.has(p)||(a.add(p),p.parentNode&&f(p.parentNode))}function d(p){!p||l.has(p)||[].forEach.call(p.children,h=>{if(En(h)!=="script")if(a.has(h))d(h);else{const m=i?h.getAttribute(i):null,y=m!==null&&m!=="false",v=(Pr.get(h)||0)+1,b=(u.get(h)||0)+1;Pr.set(h,v),u.set(h,b),c.push(h),v===1&&y&&ki.add(h),b===1&&h.setAttribute(o,""),!y&&i&&h.setAttribute(i,"true")}})}return Pa++,()=>{c.forEach(p=>{const h=(Pr.get(p)||0)-1,m=(u.get(p)||0)-1;Pr.set(p,h),u.set(p,m),h||(!ki.has(p)&&i&&p.removeAttribute(i),ki.delete(p)),m||p.removeAttribute(o)}),Pa--,Pa||(Pr=new WeakMap,Pr=new WeakMap,ki=new WeakSet,Di={})}}function Ef(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=st(t[0]).body;return Zb(t.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,e,n)}const vo=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Cf(t,e){const n=Ei(t,vo());e==="prev"&&n.reverse();const r=n.indexOf(Bt(st(t)));return n.slice(r+1)[0]}function Af(){return Cf(document.body,"next")}function _f(){return Cf(document.body,"prev")}function bo(t,e){const n=e||t.currentTarget,r=t.relatedTarget;return!r||!it(n,r)}function qb(t){Ei(t,vo()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Yb(t){t.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const Oa={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};let Xb;function Pf(t){t.key==="Tab"&&(t.target,clearTimeout(Xb))}const Mi=R.forwardRef(function(e,n){const[r,o]=R.useState();je(()=>(fa()&&o("button"),document.addEventListener("keydown",Pf),()=>{document.removeEventListener("keydown",Pf)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Yn("focus-guard")]:"",style:Oa};return R.createElement("span",ho({},e,i))}),Of=R.createContext(null),If=Yn("portal");function Jb(t){t===void 0&&(t={});const{id:e,root:n}=t,r=mo(),o=Df(),[i,s]=R.useState(null),a=R.useRef(null);return je(()=>()=>{i==null||i.remove(),queueMicrotask(()=>{a.current=null})},[i]),je(()=>{if(!r||a.current)return;const l=e?document.getElementById(e):null;if(!l)return;const c=document.createElement("div");c.id=r,c.setAttribute(If,""),l.appendChild(c),a.current=c,s(c)},[e,r]),je(()=>{if(!r||a.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!Ve(l)&&(l=l.current),l=l||document.body;let c=null;e&&(c=document.createElement("div"),c.id=e,l.appendChild(c));const u=document.createElement("div");u.id=r,u.setAttribute(If,""),l=c||l,l.appendChild(u),a.current=u,s(u)},[e,n,r,o]),i}function kf(t){const{children:e,id:n,root:r=null,preserveTabOrder:o=!0}=t,i=Jb({id:n,root:r}),[s,a]=R.useState(null),l=R.useRef(null),c=R.useRef(null),u=R.useRef(null),f=R.useRef(null),d=!!s&&!s.modal&&s.open&&o&&!!(r||i);return R.useEffect(()=>{if(!i||!o||s!=null&&s.modal)return;function p(h){i&&bo(h)&&(h.type==="focusin"?Yb:qb)(i)}return i.addEventListener("focusin",p,!0),i.addEventListener("focusout",p,!0),()=>{i.removeEventListener("focusin",p,!0),i.removeEventListener("focusout",p,!0)}},[i,o,s==null?void 0:s.modal]),R.createElement(Of.Provider,{value:R.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:f,portalNode:i,setFocusManagerState:a}),[o,i])},d&&i&&R.createElement(Mi,{"data-type":"outside",ref:l,onFocus:p=>{if(bo(p,i)){var h;(h=u.current)==null||h.focus()}else{const m=_f()||(s==null?void 0:s.refs.domReference.current);m==null||m.focus()}}}),d&&i&&R.createElement("span",{"aria-owns":i.id,style:Oa}),i&&$u.createPortal(e,i),d&&i&&R.createElement(Mi,{"data-type":"outside",ref:c,onFocus:p=>{if(bo(p,i)){var h;(h=f.current)==null||h.focus()}else{const m=Af()||(s==null?void 0:s.refs.domReference.current);m==null||m.focus(),s!=null&&s.closeOnFocusOut&&(s==null||s.onOpenChange(!1,p.nativeEvent))}}}))}const Df=()=>R.useContext(Of),Mf=20;let Xn=[];function Ia(t){Xn=Xn.filter(n=>n.isConnected);let e=t;if(!(!e||En(e)==="body")){if(!tb(e,vo())){const n=Ei(e,vo())[0];n&&(e=n)}Xn.push(e),Xn.length>Mf&&(Xn=Xn.slice(-Mf))}}function Rf(){return Xn.slice().reverse().find(t=>t.isConnected)}const Qb=R.forwardRef(function(e,n){return R.createElement("button",ho({},e,{type:"button",ref:n,tabIndex:-1,style:Oa}))});function Ff(t){const{context:e,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:s=0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:f=!0}=t,{open:d,refs:p,nodeId:h,onOpenChange:m,events:y,dataRef:v,floatingId:b,elements:{domReference:g,floating:S}}=e,x=typeof s=="number"&&s<0,T=Gu(g)&&x,P=Gb()?i:!0,O=vt(o),k=vt(s),D=vt(a),L=yo(),A=Df(),j=R.useRef(null),F=R.useRef(null),_=R.useRef(!1),M=R.useRef(!1),N=R.useRef(-1),z=A!=null,q=S==null?void 0:S.firstElementChild,C=(q==null?void 0:q.id)===b?q:S,$=Dt(function(H){return H===void 0&&(H=C),H?Ei(H,vo()):[]}),Y=Dt(H=>{const I=$(H);return O.current.map(V=>g&&V==="reference"?g:C&&V==="floating"?C:I).filter(Boolean).flat()});R.useEffect(()=>{if(r||!c)return;function H(V){if(V.key==="Tab"){it(C,Bt(st(C)))&&$().length===0&&!T&&yt(V);const W=Y(),K=_n(V);O.current[0]==="reference"&&K===g&&(yt(V),V.shiftKey?dn(W[W.length-1]):dn(W[1])),O.current[1]==="floating"&&K===C&&V.shiftKey&&(yt(V),dn(W[0]))}}const I=st(C);return I.addEventListener("keydown",H),()=>{I.removeEventListener("keydown",H)}},[r,g,C,c,O,T,$,Y]),R.useEffect(()=>{if(r||!S)return;function H(I){const V=_n(I),K=$().indexOf(V);K!==-1&&(N.current=K)}return S.addEventListener("focusin",H),()=>{S.removeEventListener("focusin",H)}},[r,S,$]),R.useEffect(()=>{if(r||!f)return;function H(){M.current=!0,setTimeout(()=>{M.current=!1})}function I(V){const W=V.relatedTarget;queueMicrotask(()=>{const K=!(it(g,W)||it(S,W)||it(W,S)||it(A==null?void 0:A.portalNode,W)||W!=null&&W.hasAttribute(Yn("focus-guard"))||L&&(_r(L.nodesRef.current,h).find(X=>{var le,B;return it((le=X.context)==null?void 0:le.elements.floating,W)||it((B=X.context)==null?void 0:B.elements.domReference,W)})||Wb(L.nodesRef.current,h).find(X=>{var le,B;return((le=X.context)==null?void 0:le.elements.floating)===W||((B=X.context)==null?void 0:B.elements.domReference)===W})));if(l&&K&&Bt(st(C))===st(C).body){Je(C)&&(C==null||C.focus());const X=N.current,le=$(),B=le[X]||le[le.length-1]||C;Je(B)&&B.focus()}(T||!c)&&W&&K&&!M.current&&W!==Rf()&&(_.current=!0,m(!1,V))})}if(S&&Je(g))return g.addEventListener("focusout",I),g.addEventListener("pointerdown",H),S.addEventListener("focusout",I),()=>{g.removeEventListener("focusout",I),g.removeEventListener("pointerdown",H),S.removeEventListener("focusout",I)}},[r,g,S,C,c,h,L,A,m,f,l,$,T]),R.useEffect(()=>{var H;if(r)return;const I=Array.from((A==null||(H=A.portalNode)==null?void 0:H.querySelectorAll("["+Yn("portal")+"]"))||[]);if(S){const V=[S,...I,j.current,F.current,O.current.includes("reference")||T?g:null].filter(K=>K!=null),W=c||T?Ef(V,P,!P):Ef(V);return()=>{W()}}},[r,g,S,c,O,A,T,P]),je(()=>{if(r||!Je(C))return;const H=st(C),I=Bt(H);queueMicrotask(()=>{const V=Y(C),W=k.current,K=(typeof W=="number"?V[W]:W.current)||C,X=it(C,I);!x&&!X&&d&&dn(K,{preventScroll:K===C})})},[r,d,C,x,Y,k]),je(()=>{if(r||!C)return;let H=!1;const I=st(C),V=Bt(I);let K=v.current.openEvent;Ia(V);function X(le){let{open:B,reason:ke,event:We,nested:Xe}=le;B&&(K=We),ke==="escape-key"&&p.domReference.current&&Ia(p.domReference.current),ke==="hover"&&We.type==="mouseleave"&&(_.current=!0),ke==="outside-press"&&(Xe?(_.current=!1,H=!0):_.current=!(Wu(We)||ua(We)))}return y.on("openchange",X),()=>{y.off("openchange",X);const le=Bt(I),B=it(S,le)||L&&_r(L.nodesRef.current,h).some(Xe=>{var se;return it((se=Xe.context)==null?void 0:se.elements.floating,le)});(B||K&&["click","mousedown"].includes(K.type))&&p.domReference.current&&Ia(p.domReference.current);const We=Rf();D.current&&!_.current&&Je(We)&&(!(We!==le&&le!==I.body)||B)&&dn(We,{cancelPrevious:!1,preventScroll:H})}},[r,S,C,D,v,p,y,L,h]),je(()=>{if(!r&&A)return A.setFocusManagerState({modal:c,closeOnFocusOut:f,open:d,onOpenChange:m,refs:p}),()=>{A.setFocusManagerState(null)}},[r,A,c,d,m,p,f]),je(()=>{if(r||!C||typeof MutationObserver!="function"||x)return;const H=()=>{const V=C.getAttribute("tabindex"),W=$(),K=Bt(st(S)),X=W.indexOf(K);X!==-1&&(N.current=X),O.current.includes("floating")||K!==p.domReference.current&&W.length===0?V!=="0"&&C.setAttribute("tabindex","0"):V!=="-1"&&C.setAttribute("tabindex","-1")};H();const I=new MutationObserver(H);return I.observe(C,{childList:!0,subtree:!0,attributes:!0}),()=>{I.disconnect()}},[r,S,C,p,O,$,x]);function re(H){return r||!u||!c?null:R.createElement(Qb,{ref:H==="start"?j:F,onClick:I=>m(!1,I.nativeEvent)},typeof u=="string"?u:"Dismiss")}const ee=!r&&P&&(c?!T:!0)&&(z||c);return R.createElement(R.Fragment,null,ee&&R.createElement(Mi,{"data-type":"inside",ref:A==null?void 0:A.beforeInsideRef,onFocus:H=>{if(c){const V=Y();dn(o[0]==="reference"?V[0]:V[V.length-1])}else if(A!=null&&A.preserveTabOrder&&A.portalNode)if(_.current=!1,bo(H,A.portalNode)){const V=Af()||g;V==null||V.focus()}else{var I;(I=A.beforeOutsideRef.current)==null||I.focus()}}}),!T&&re("start"),n,re("end"),ee&&R.createElement(Mi,{"data-type":"inside",ref:A==null?void 0:A.afterInsideRef,onFocus:H=>{if(c)dn(Y()[0]);else if(A!=null&&A.preserveTabOrder&&A.portalNode)if(f&&(_.current=!0),bo(H,A.portalNode)){const V=_f()||g;V==null||V.focus()}else{var I;(I=A.afterOutsideRef.current)==null||I.focus()}}}))}function Lf(t){return Je(t.target)&&t.target.tagName==="BUTTON"}function Nf(t){return ha(t)}function e0(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=t,{enabled:s=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0}=e,f=R.useRef(),d=R.useRef(!1),p=R.useMemo(()=>({onPointerDown(h){f.current=h.pointerType},onMouseDown(h){const m=f.current;h.button===0&&a!=="click"&&(uo(m,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="mousedown")?r(!1,h.nativeEvent,"click"):(h.preventDefault(),r(!0,h.nativeEvent,"click"))))},onClick(h){const m=f.current;if(a==="mousedown"&&f.current){f.current=void 0;return}uo(m,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="click")?r(!1,h.nativeEvent,"click"):r(!0,h.nativeEvent,"click"))},onKeyDown(h){f.current=void 0,!(h.defaultPrevented||!u||Lf(h))&&(h.key===" "&&!Nf(i)&&(h.preventDefault(),d.current=!0),h.key==="Enter"&&r(!(n&&l),h.nativeEvent,"click"))},onKeyUp(h){h.defaultPrevented||!u||Lf(h)||Nf(i)||h.key===" "&&d.current&&(d.current=!1,r(!(n&&l),h.nativeEvent,"click"))}}),[o,i,a,c,u,r,n,l]);return R.useMemo(()=>s?{reference:p}:{},[s,p])}const t0={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},n0={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Vf=t=>{var e,n;return{escapeKey:typeof t=="boolean"?t:(e=t==null?void 0:t.escapeKey)!=null?e:!1,outsidePress:typeof t=="boolean"?t:(n=t==null?void 0:t.outsidePress)!=null?n:!0}};function ka(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=t,{enabled:s=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:f="pointerdown",ancestorScroll:d=!1,bubbles:p,capture:h}=e,m=yo(),y=Dt(typeof l=="function"?l:()=>!1),v=typeof l=="function"?y:l,b=R.useRef(!1),g=R.useRef(!1),{escapeKey:S,outsidePress:x}=Vf(p),{escapeKey:T,outsidePress:P}=Vf(h),O=Dt(F=>{var _;if(!n||!s||!a||F.key!=="Escape")return;const M=(_=i.current.floatingContext)==null?void 0:_.nodeId,N=m?_r(m.nodesRef.current,M):[];if(!S&&(F.stopPropagation(),N.length>0)){let z=!0;if(N.forEach(q=>{var C;if((C=q.context)!=null&&C.open&&!q.context.dataRef.current.__escapeKeyBubbles){z=!1;return}}),!z)return}r(!1,_v(F)?F.nativeEvent:F,"escape-key")}),k=Dt(F=>{var _;const M=()=>{var N;O(F),(N=_n(F))==null||N.removeEventListener("keydown",M)};(_=_n(F))==null||_.addEventListener("keydown",M)}),D=Dt(F=>{var _;const M=b.current;b.current=!1;const N=g.current;if(g.current=!1,c==="click"&&N||M||typeof v=="function"&&!v(F))return;const z=_n(F),q="["+Yn("inert")+"]",C=st(o.floating).querySelectorAll(q);let $=Ve(z)?z:null;for(;$&&!Cn($);){const H=fn($);if(Cn(H)||!Ve(H))break;$=H}if(C.length&&Ve(z)&&!Pv(z)&&!it(z,o.floating)&&Array.from(C).every(H=>!it($,H)))return;if(Je(z)&&j){const H=z.clientWidth>0&&z.scrollWidth>z.clientWidth,I=z.clientHeight>0&&z.scrollHeight>z.clientHeight;let V=I&&F.offsetX>z.clientWidth;if(I&&It(z).direction==="rtl"&&(V=F.offsetX<=z.offsetWidth-z.clientWidth),V||H&&F.offsetY>z.clientHeight)return}const Y=(_=i.current.floatingContext)==null?void 0:_.nodeId,re=m&&_r(m.nodesRef.current,Y).some(H=>{var I;return pa(F,(I=H.context)==null?void 0:I.elements.floating)});if(pa(F,o.floating)||pa(F,o.domReference)||re)return;const ee=m?_r(m.nodesRef.current,Y):[];if(ee.length>0){let H=!0;if(ee.forEach(I=>{var V;if((V=I.context)!=null&&V.open&&!I.context.dataRef.current.__outsidePressBubbles){H=!1;return}}),!H)return}r(!1,F,"outside-press")}),L=Dt(F=>{var _;const M=()=>{var N;D(F),(N=_n(F))==null||N.removeEventListener(c,M)};(_=_n(F))==null||_.addEventListener(c,M)});R.useEffect(()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=S,i.current.__outsidePressBubbles=x;function F(N){r(!1,N,"ancestor-scroll")}const _=st(o.floating);a&&_.addEventListener("keydown",T?k:O,T),v&&_.addEventListener(c,P?L:D,P);let M=[];return d&&(Ve(o.domReference)&&(M=An(o.domReference)),Ve(o.floating)&&(M=M.concat(An(o.floating))),!Ve(o.reference)&&o.reference&&o.reference.contextElement&&(M=M.concat(An(o.reference.contextElement)))),M=M.filter(N=>{var z;return N!==((z=_.defaultView)==null?void 0:z.visualViewport)}),M.forEach(N=>{N.addEventListener("scroll",F,{passive:!0})}),()=>{a&&_.removeEventListener("keydown",T?k:O,T),v&&_.removeEventListener(c,P?L:D,P),M.forEach(N=>{N.removeEventListener("scroll",F)})}},[i,o,a,v,c,n,r,d,s,S,x,O,T,k,D,P,L]),R.useEffect(()=>{b.current=!1},[v,c]);const A=R.useMemo(()=>({onKeyDown:O,[t0[f]]:F=>{u&&r(!1,F.nativeEvent,"reference-press")}}),[O,r,u,f]),j=R.useMemo(()=>({onKeyDown:O,onMouseDown(){g.current=!0},onMouseUp(){g.current=!0},[n0[c]]:()=>{b.current=!0}}),[O,c]);return R.useMemo(()=>s?{reference:A,floating:j}:{},[s,A,j])}function r0(t){const{open:e=!1,onOpenChange:n,elements:r}=t,o=mo(),i=R.useRef({}),[s]=R.useState(()=>jb()),a=Ii()!=null;if(process.env.NODE_ENV!=="production"){const p=r.reference;p&&!Ve(p)&&$b("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=R.useState(r.reference),u=Dt((p,h,m)=>{i.current.openEvent=p?h:void 0,s.emit("openchange",{open:p,event:h,reason:m,nested:a}),n==null||n(p,h,m)}),f=R.useMemo(()=>({setPositionReference:c}),[]),d=R.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return R.useMemo(()=>({dataRef:i,open:e,onOpenChange:u,elements:d,events:s,floatingId:o,refs:f}),[e,u,d,s,o,f])}function Da(t){t===void 0&&(t={});const{nodeId:e}=t,n=r0({...t,elements:{reference:null,floating:null,...t.elements}}),r=t.rootContext||n,o=r.elements,[i,s]=R.useState(null),[a,l]=R.useState(null),u=(o==null?void 0:o.reference)||i,f=R.useRef(null),d=yo();je(()=>{u&&(f.current=u)},[u]);const p=Ob({...t,elements:{...o,...a&&{reference:a}}}),h=R.useCallback(g=>{const S=Ve(g)?{getBoundingClientRect:()=>g.getBoundingClientRect(),contextElement:g}:g;l(S),p.refs.setReference(S)},[p.refs]),m=R.useCallback(g=>{(Ve(g)||g===null)&&(f.current=g,s(g)),(Ve(p.refs.reference.current)||p.refs.reference.current===null||g!==null&&!Ve(g))&&p.refs.setReference(g)},[p.refs]),y=R.useMemo(()=>({...p.refs,setReference:m,setPositionReference:h,domReference:f}),[p.refs,m,h]),v=R.useMemo(()=>({...p.elements,domReference:u}),[p.elements,u]),b=R.useMemo(()=>({...p,...r,refs:y,elements:v,nodeId:e}),[p,y,v,e,r]);return je(()=>{r.dataRef.current.floatingContext=b;const g=d==null?void 0:d.nodesRef.current.find(S=>S.id===e);g&&(g.context=b)}),R.useMemo(()=>({...p,context:b,refs:y,elements:v}),[p,y,v,b])}function o0(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:s}=t,{enabled:a=!0,visibleOnly:l=!0}=e,c=R.useRef(!1),u=R.useRef(),f=R.useRef(!0);R.useEffect(()=>{if(!a)return;const p=Et(s.domReference);function h(){!n&&Je(s.domReference)&&s.domReference===Bt(st(s.domReference))&&(c.current=!0)}function m(){f.current=!0}return p.addEventListener("blur",h),p.addEventListener("keydown",m,!0),()=>{p.removeEventListener("blur",h),p.removeEventListener("keydown",m,!0)}},[s.domReference,n,a]),R.useEffect(()=>{if(!a)return;function p(h){let{reason:m}=h;(m==="reference-press"||m==="escape-key")&&(c.current=!0)}return o.on("openchange",p),()=>{o.off("openchange",p)}},[o,a]),R.useEffect(()=>()=>{clearTimeout(u.current)},[]);const d=R.useMemo(()=>({onPointerDown(p){ua(p.nativeEvent)||(f.current=!1)},onMouseLeave(){c.current=!1},onFocus(p){if(c.current)return;const h=_n(p.nativeEvent);if(l&&Ve(h))try{if(fa()&&Uu())throw Error();if(!h.matches(":focus-visible"))return}catch{if(!f.current&&!ha(h))return}r(!0,p.nativeEvent,"focus")},onBlur(p){c.current=!1;const h=p.relatedTarget,m=p.nativeEvent,y=Ve(h)&&h.hasAttribute(Yn("focus-guard"))&&h.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var v;const b=Bt(s.domReference?s.domReference.ownerDocument:document);!h&&b===s.domReference||it((v=i.current.floatingContext)==null?void 0:v.refs.floating.current,b)||it(s.domReference,b)||y||r(!1,m,"focus")})}}),[i,s.domReference,r,l]);return R.useMemo(()=>a?{reference:d}:{},[a,d])}const $f="active",jf="selected";function Ma(t,e,n){const r=new Map,o=n==="item";let i=t;if(o&&t){const{[$f]:s,[jf]:a,...l}=t;i=l}return{...n==="floating"&&{tabIndex:-1},...i,...e.map(s=>{const a=s?s[n]:null;return typeof a=="function"?t?a(t):null:a}).concat(t).reduce((s,a)=>(a&&Object.entries(a).forEach(l=>{let[c,u]=l;if(!(o&&[$f,jf].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var f;(f=r.get(c))==null||f.push(u),s[c]=function(){for(var d,p=arguments.length,h=new Array(p),m=0;m<p;m++)h[m]=arguments[m];return(d=r.get(c))==null?void 0:d.map(y=>y(...h)).find(y=>y!==void 0)}}}else s[c]=u}),s),{})}}function Ra(t){t===void 0&&(t=[]);const e=t.map(a=>a==null?void 0:a.reference),n=t.map(a=>a==null?void 0:a.floating),r=t.map(a=>a==null?void 0:a.item),o=R.useCallback(a=>Ma(a,t,"reference"),e),i=R.useCallback(a=>Ma(a,t,"floating"),n),s=R.useCallback(a=>Ma(a,t,"item"),r);return R.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}let Bf=!1;function Ri(t,e,n){switch(t){case"vertical":return e;case"horizontal":return n;default:return e||n}}function zf(t,e){return Ri(e,t===Ca||t===fo,t===Cr||t===Ar)}function Fa(t,e,n){return Ri(e,t===fo,n?t===Cr:t===Ar)||t==="Enter"||t===" "||t===""}function i0(t,e,n){return Ri(e,n?t===Cr:t===Ar,t===fo)}function Hf(t,e,n){return Ri(e,n?t===Ar:t===Cr,t===Ca)}function s0(t,e){const{open:n,onOpenChange:r,elements:o}=t,{listRef:i,activeIndex:s,onNavigate:a=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:u=!1,loop:f=!1,nested:d=!1,rtl:p=!1,virtual:h=!1,focusItemOnOpen:m="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:v=!0,disabledIndices:b=void 0,orientation:g="vertical",cols:S=1,scrollItemIntoView:x=!0,virtualItemRef:T,itemSizes:P,dense:O=!1}=e;process.env.NODE_ENV!=="production"&&(u&&(f||Oi("`useListNavigation` looping must be enabled to allow escaping."),h||Oi("`useListNavigation` must be virtual to allow escaping.")),g==="vertical"&&S>1&&Oi("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const k=Ii(),D=yo(),L=Dt(a),A=R.useRef(m),j=R.useRef(c??-1),F=R.useRef(null),_=R.useRef(!0),M=R.useRef(L),N=R.useRef(!!o.floating),z=R.useRef(!1),q=R.useRef(!1),C=vt(b),$=vt(n),Y=vt(x),re=vt(o.floating),ee=vt(c),[H,I]=R.useState(),[V,W]=R.useState(),K=Dt(function(se,Ae,Se){Se===void 0&&(Se=!1);function Ce(Pe){h?(I(Pe.id),D==null||D.events.emit("virtualfocus",Pe),T&&(T.current=Pe)):dn(Pe,{preventScroll:!0,sync:Uu()&&fa()?Bf||z.current:!1})}const he=se.current[Ae.current];he&&Ce(he),requestAnimationFrame(()=>{const Pe=se.current[Ae.current]||he;if(!Pe)return;he||Ce(Pe);const tt=Y.current;tt&&le&&(Se||!_.current)&&(Pe.scrollIntoView==null||Pe.scrollIntoView(typeof tt=="boolean"?{block:"nearest",inline:"nearest"}:tt))})});je(()=>{document.createElement("div").focus({get preventScroll(){return Bf=!0,!1}})},[]),je(()=>{l&&(n&&o.floating?A.current&&c!=null&&(q.current=!0,j.current=c,L(c)):N.current&&(j.current=-1,M.current(null)))},[l,n,o.floating,c,L]),je(()=>{if(l&&n&&o.floating)if(s==null){if(z.current=!1,ee.current!=null)return;if(N.current&&(j.current=-1,K(i,j)),!N.current&&A.current&&(F.current!=null||A.current===!0&&F.current==null)){let se=0;const Ae=()=>{i.current[0]==null?(se<2&&(se?requestAnimationFrame:queueMicrotask)(Ae),se++):(j.current=F.current==null||Fa(F.current,g,p)||d?Aa(i,C.current):yf(i,C.current),F.current=null,L(j.current))};Ae()}}else po(i,s)||(j.current=s,K(i,j,q.current),q.current=!1)},[l,n,o.floating,s,ee,d,i,g,p,L,K,C]),je(()=>{var se;if(!l||o.floating||!D||h||!N.current)return;const Ae=D.nodesRef.current,Se=(se=Ae.find(Pe=>Pe.id===k))==null||(se=se.context)==null?void 0:se.elements.floating,Ce=Bt(st(o.floating)),he=Ae.some(Pe=>Pe.context&&it(Pe.context.elements.floating,Ce));Se&&!he&&_.current&&Se.focus({preventScroll:!0})},[l,o.floating,D,k,h]),je(()=>{if(!l||!D||!h||k)return;function se(Ae){W(Ae.id),T&&(T.current=Ae)}return D.events.on("virtualfocus",se),()=>{D.events.off("virtualfocus",se)}},[l,D,h,k,T]),je(()=>{M.current=L,N.current=!!o.floating}),je(()=>{n||(F.current=null)},[n]);const X=s!=null,le=R.useMemo(()=>{function se(Se){if(!n)return;const Ce=i.current.indexOf(Se);Ce!==-1&&L(Ce)}return{onFocus(Se){let{currentTarget:Ce}=Se;se(Ce)},onClick:Se=>{let{currentTarget:Ce}=Se;return Ce.focus({preventScroll:!0})},...y&&{onMouseMove(Se){let{currentTarget:Ce}=Se;se(Ce)},onPointerLeave(Se){let{pointerType:Ce}=Se;!_.current||Ce==="touch"||(j.current=-1,K(i,j),L(null),h||dn(re.current,{preventScroll:!0}))}}}},[n,re,K,y,i,L,h]),B=Dt(se=>{if(_.current=!1,z.current=!0,!$.current&&se.currentTarget===re.current)return;if(d&&Hf(se.key,g,p)){yt(se),r(!1,se.nativeEvent,"list-navigation"),Je(o.domReference)&&!h&&o.domReference.focus();return}const Ae=j.current,Se=Aa(i,b),Ce=yf(i,b);if(se.key==="Home"&&(yt(se),j.current=Se,L(j.current)),se.key==="End"&&(yt(se),j.current=Ce,L(j.current)),S>1){const he=P||Array.from({length:i.current.length},()=>({width:1,height:1})),Pe=Rb(he,S,O),tt=Pe.findIndex(Z=>Z!=null&&!Pi(i.current,Z,b)),Tt=Pe.reduce((Z,oe,Fe)=>oe!=null&&!Pi(i.current,oe,b)?Fe:Z,-1);if(j.current=Pe[Mb({current:Pe.map(Z=>Z!=null?i.current[Z]:null)},{event:se,orientation:g,loop:f,cols:S,disabledIndices:Lb([...b||i.current.map((Z,oe)=>Pi(i.current,oe)?oe:void 0),void 0],Pe),minIndex:tt,maxIndex:Tt,prevIndex:Fb(j.current>Ce?Se:j.current,he,Pe,S,se.key===fo?"bl":se.key===Ar?"tr":"tl"),stopEvent:!0})],L(j.current),g==="both")return}if(zf(se.key,g)){if(yt(se),n&&!h&&Bt(se.currentTarget.ownerDocument)===se.currentTarget){j.current=Fa(se.key,g,p)?Se:Ce,L(j.current);return}Fa(se.key,g,p)?f?j.current=Ae>=Ce?u&&Ae!==i.current.length?-1:Se:dt(i,{startingIndex:Ae,disabledIndices:b}):j.current=Math.min(Ce,dt(i,{startingIndex:Ae,disabledIndices:b})):f?j.current=Ae<=Se?u&&Ae!==-1?i.current.length:Ce:dt(i,{startingIndex:Ae,decrement:!0,disabledIndices:b}):j.current=Math.max(Se,dt(i,{startingIndex:Ae,decrement:!0,disabledIndices:b})),po(i,j.current)?L(null):L(j.current)}}),ke=R.useMemo(()=>h&&n&&X&&{"aria-activedescendant":V||H},[h,n,X,V,H]),We=R.useMemo(()=>({"aria-orientation":g==="both"?void 0:g,...!Gu(o.domReference)&&ke,onKeyDown:B,onPointerMove(){_.current=!0}}),[ke,B,o.domReference,g]),Xe=R.useMemo(()=>{const se=C.current,Ae=i.current.find(he=>(he==null?void 0:he.id)===H);function Se(he){m==="auto"&&Wu(he.nativeEvent)&&(A.current=!0)}function Ce(he){A.current=m,m==="auto"&&ua(he.nativeEvent)&&(A.current=!0)}return{...ke,onKeyDown(he){_.current=!1;const Pe=he.key.indexOf("Arrow")===0,tt=i0(he.key,g,p),Tt=Hf(he.key,g,p),Z=zf(he.key,g),oe=(d?tt:Z)||he.key==="Enter"||he.key.trim()==="";if(h&&n){const ln=D==null?void 0:D.nodesRef.current.find(cn=>cn.parentId==null),nt=D&&ln?Ub(D.nodesRef.current,ln.id):null;if(Pe&&nt&&T){const cn=new KeyboardEvent("keydown",{key:he.key,bubbles:!0});if(tt||Tt){var Fe,Ke;const mi=((Fe=nt.context)==null?void 0:Fe.elements.domReference)===he.currentTarget,lo=Tt&&!mi?(Ke=nt.context)==null?void 0:Ke.elements.domReference:tt?Ae:null;lo&&(yt(he),lo.dispatchEvent(cn),W(void 0))}if(Z&&nt.context&&nt.context.open&&nt.parentId&&he.currentTarget!==nt.context.elements.domReference){var ft;yt(he),(ft=nt.context.elements.domReference)==null||ft.dispatchEvent(cn);return}}return B(he)}if(!(!n&&!v&&Pe)){if(oe&&(F.current=d&&Z?null:he.key),d){tt&&(yt(he),n?(j.current=Aa(i,se),L(j.current)):r(!0,he.nativeEvent,"list-navigation"));return}Z&&(c!=null&&(j.current=c),yt(he),!n&&v?r(!0,he.nativeEvent,"list-navigation"):B(he),n&&L(j.current))}},onFocus(){n&&!h&&L(null)},onPointerDown:Ce,onMouseDown:Se,onClick:Se}},[H,ke,B,C,m,i,d,L,r,n,v,g,p,c,D,h,T]);return R.useMemo(()=>l?{reference:Xe,floating:We,item:le}:{},[l,Xe,We,le])}const a0=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function La(t,e){var n;e===void 0&&(e={});const{open:r,floatingId:o}=t,{enabled:i=!0,role:s="dialog"}=e,a=(n=a0.get(s))!=null?n:s,l=mo(),u=Ii()!=null,f=R.useMemo(()=>a==="tooltip"||s==="label"?{["aria-"+(s==="label"?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":r?o:void 0,...a==="listbox"&&{role:"combobox"},...a==="menu"&&{id:l},...a==="menu"&&u&&{role:"menuitem"},...s==="select"&&{"aria-autocomplete":"none"},...s==="combobox"&&{"aria-autocomplete":"list"}},[a,o,u,r,l,s]),d=R.useMemo(()=>{const h={id:o,...a&&{role:a}};return a==="tooltip"||s==="label"?h:{...h,...a==="menu"&&{"aria-labelledby":l}}},[a,o,l,s]),p=R.useCallback(h=>{let{active:m,selected:y}=h;const v={role:"option",...m&&{id:o+"-option"}};switch(s){case"select":return{...v,"aria-selected":m&&y};case"combobox":return{...v,...m&&{"aria-selected":!0}}}return{}},[o,s]);return R.useMemo(()=>i?{reference:f,floating:d,item:p}:{},[i,f,d,p])}const Wf=t=>t.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(e,n)=>(n?"-":"")+e.toLowerCase());function Or(t,e){return typeof t=="function"?t(e):t}function l0(t,e){const[n,r]=R.useState(t);return t&&!n&&r(!0),R.useEffect(()=>{if(!t&&n){const o=setTimeout(()=>r(!1),e);return()=>clearTimeout(o)}},[t,n,e]),n}function c0(t,e){e===void 0&&(e={});const{open:n,elements:{floating:r}}=t,{duration:o=250}=e,s=(typeof o=="number"?o:o.close)||0,[a,l]=R.useState("unmounted"),c=l0(n,s);return!c&&a==="close"&&l("unmounted"),je(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:a}}function u0(t,e){e===void 0&&(e={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:s=250}=e,a=t.placement,l=a.split("-")[0],c=R.useMemo(()=>({side:l,placement:a}),[l,a]),u=typeof s=="number",f=(u?s:s.open)||0,d=(u?s:s.close)||0,[p,h]=R.useState(()=>({...Or(i,c),...Or(n,c)})),{isMounted:m,status:y}=c0(t,{duration:s}),v=vt(n),b=vt(r),g=vt(o),S=vt(i);return je(()=>{const x=Or(v.current,c),T=Or(g.current,c),P=Or(S.current,c),O=Or(b.current,c)||Object.keys(x).reduce((k,D)=>(k[D]="",k),{});if(y==="initial"&&h(k=>({transitionProperty:k.transitionProperty,...P,...x})),y==="open"&&h({transitionProperty:Object.keys(O).map(Wf).join(","),transitionDuration:f+"ms",...P,...O}),y==="close"){const k=T||x;h({transitionProperty:Object.keys(k).map(Wf).join(","),transitionDuration:d+"ms",...P,...k})}},[d,g,v,b,S,f,y,c]),{isMounted:m,styles:p}}class Fi{static getDescendantProperty(e,n,r=[]){let o,i,s,a,l,c;if(n){if(s=n.indexOf("."),s===-1?o=n:(o=n.slice(0,s),i=n.slice(s+1)),a=e[o],a!==null&&typeof a<"u")if(!i&&(typeof a=="string"||typeof a=="number"))r.push(a);else if(Object.prototype.toString.call(a)==="[object Array]")for(l=0,c=a.length;l<c;l++)Fi.getDescendantProperty(a[l],i,r);else i&&Fi.getDescendantProperty(a,i,r)}else r.push(e);return r}}class Ir{constructor(e=[],n=[],r={}){Array.isArray(n)||(r=n,n=[]),this.haystack=e,this.keys=n,this.options=Object.assign({caseSensitive:!1,sort:!1},r)}search(e=""){if(e==="")return this.haystack;const n=[];for(let r=0;r<this.haystack.length;r++){const o=this.haystack[r];if(this.keys.length===0){const i=Ir.isMatch(o,e,this.options.caseSensitive);i&&n.push({item:o,score:i})}else for(let i=0;i<this.keys.length;i++){const s=Fi.getDescendantProperty(o,this.keys[i]);let a=!1;for(let l=0;l<s.length;l++){const c=Ir.isMatch(s[l],e,this.options.caseSensitive);if(c){a=!0,n.push({item:o,score:c});break}}if(a)break}}return this.options.sort&&n.sort((r,o)=>r.score-o.score),n.map(r=>r.item)}static isMatch(e,n,r){e=String(e),n=String(n),r||(e=e.toLocaleLowerCase(),n=n.toLocaleLowerCase());const o=Ir.nearestIndexesFor(e,n);return o?e===n?1:o.length>1?2+(o[o.length-1]-o[0]):2+o[0]:!1}static nearestIndexesFor(e,n){const r=n.split("");let o=[];return Ir.indexesOfFirstLetter(e,n).forEach((s,a)=>{let l=s+1;o[a]=[s];for(let c=1;c<r.length;c++){const u=r[c];if(l=e.indexOf(u,l),l===-1){o[a]=!1;break}o[a].push(l),l++}}),o=o.filter(s=>s!==!1),o.length?o.sort((s,a)=>s.length===1?s[0]-a[0]:(s=s[s.length-1]-s[0],a=a[a.length-1]-a[0],s-a))[0]:!1}static indexesOfFirstLetter(e,n){const r=n[0];return e.split("").map((o,i)=>o!==r?!1:i).filter(o=>o!==!1)}}/**
5
+ * @license lucide-react v0.400.0 - ISC
6
+ *
7
+ * This source code is licensed under the ISC license.
8
+ * See the LICENSE file in the root directory of this source tree.
9
+ */const f0=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Uf=(...t)=>t.filter((e,n,r)=>!!e&&r.indexOf(e)===n).join(" ");/**
10
+ * @license lucide-react v0.400.0 - ISC
11
+ *
12
+ * This source code is licensed under the ISC license.
13
+ * See the LICENSE file in the root directory of this source tree.
14
+ */var d0={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
15
+ * @license lucide-react v0.400.0 - ISC
16
+ *
17
+ * This source code is licensed under the ISC license.
18
+ * See the LICENSE file in the root directory of this source tree.
19
+ */const p0=w.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:s,...a},l)=>w.createElement("svg",{ref:l,...d0,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:Uf("lucide",o),...a},[...s.map(([c,u])=>w.createElement(c,u)),...Array.isArray(i)?i:[i]]));/**
20
+ * @license lucide-react v0.400.0 - ISC
21
+ *
22
+ * This source code is licensed under the ISC license.
23
+ * See the LICENSE file in the root directory of this source tree.
24
+ */const Lt=(t,e)=>{const n=w.forwardRef(({className:r,...o},i)=>w.createElement(p0,{ref:i,iconNode:e,className:Uf(`lucide-${f0(t)}`,r),...o}));return n.displayName=`${t}`,n};/**
25
+ * @license lucide-react v0.400.0 - ISC
26
+ *
27
+ * This source code is licensed under the ISC license.
28
+ * See the LICENSE file in the root directory of this source tree.
29
+ */const Gf=Lt("ArrowUpNarrowWide",[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["path",{d:"M11 12h4",key:"q8tih4"}],["path",{d:"M11 16h7",key:"uosisv"}],["path",{d:"M11 20h10",key:"jvxblo"}]]);/**
30
+ * @license lucide-react v0.400.0 - ISC
31
+ *
32
+ * This source code is licensed under the ISC license.
33
+ * See the LICENSE file in the root directory of this source tree.
34
+ */const Na=Lt("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
35
+ * @license lucide-react v0.400.0 - ISC
36
+ *
37
+ * This source code is licensed under the ISC license.
38
+ * See the LICENSE file in the root directory of this source tree.
39
+ */const h0=Lt("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
40
+ * @license lucide-react v0.400.0 - ISC
41
+ *
42
+ * This source code is licensed under the ISC license.
43
+ * See the LICENSE file in the root directory of this source tree.
44
+ */const m0=Lt("CircleCheckBig",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
45
+ * @license lucide-react v0.400.0 - ISC
46
+ *
47
+ * This source code is licensed under the ISC license.
48
+ * See the LICENSE file in the root directory of this source tree.
49
+ */const g0=Lt("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
50
+ * @license lucide-react v0.400.0 - ISC
51
+ *
52
+ * This source code is licensed under the ISC license.
53
+ * See the LICENSE file in the root directory of this source tree.
54
+ */const y0=Lt("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);/**
55
+ * @license lucide-react v0.400.0 - ISC
56
+ *
57
+ * This source code is licensed under the ISC license.
58
+ * See the LICENSE file in the root directory of this source tree.
59
+ */const v0=Lt("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
60
+ * @license lucide-react v0.400.0 - ISC
61
+ *
62
+ * This source code is licensed under the ISC license.
63
+ * See the LICENSE file in the root directory of this source tree.
64
+ */const b0=Lt("Group",[["path",{d:"M3 7V5c0-1.1.9-2 2-2h2",key:"adw53z"}],["path",{d:"M17 3h2c1.1 0 2 .9 2 2v2",key:"an4l38"}],["path",{d:"M21 17v2c0 1.1-.9 2-2 2h-2",key:"144t0e"}],["path",{d:"M7 21H5c-1.1 0-2-.9-2-2v-2",key:"rtnfgi"}],["rect",{width:"7",height:"5",x:"7",y:"7",rx:"1",key:"1eyiv7"}],["rect",{width:"7",height:"5",x:"10",y:"12",rx:"1",key:"1qlmkx"}]]);/**
65
+ * @license lucide-react v0.400.0 - ISC
66
+ *
67
+ * This source code is licensed under the ISC license.
68
+ * See the LICENSE file in the root directory of this source tree.
69
+ */const Va=Lt("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
70
+ * @license lucide-react v0.400.0 - ISC
71
+ *
72
+ * This source code is licensed under the ISC license.
73
+ * See the LICENSE file in the root directory of this source tree.
74
+ */const Kf=Lt("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
75
+ * @license lucide-react v0.400.0 - ISC
76
+ *
77
+ * This source code is licensed under the ISC license.
78
+ * See the LICENSE file in the root directory of this source tree.
79
+ */const xo=Lt("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
80
+ * @license lucide-react v0.400.0 - ISC
81
+ *
82
+ * This source code is licensed under the ISC license.
83
+ * See the LICENSE file in the root directory of this source tree.
84
+ */const x0=Lt("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);function Zf(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(n=Zf(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function w0(){for(var t,e,n=0,r="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=Zf(t))&&(r&&(r+=" "),r+=e);return r}const $a="-";function S0(t){const e=E0(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;function o(s){const a=s.split($a);return a[0]===""&&a.length!==1&&a.shift(),qf(a,e)||T0(s)}function i(s,a){const l=n[s]||[];return a&&r[s]?[...l,...r[s]]:l}return{getClassGroupId:o,getConflictingClassGroupIds:i}}function qf(t,e){var s;if(t.length===0)return e.classGroupId;const n=t[0],r=e.nextPart.get(n),o=r?qf(t.slice(1),r):void 0;if(o)return o;if(e.validators.length===0)return;const i=t.join($a);return(s=e.validators.find(({validator:a})=>a(i)))==null?void 0:s.classGroupId}const Yf=/^\[(.+)\]$/;function T0(t){if(Yf.test(t)){const e=Yf.exec(t)[1],n=e==null?void 0:e.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}}function E0(t){const{theme:e,prefix:n}=t,r={nextPart:new Map,validators:[]};return A0(Object.entries(t.classGroups),n).forEach(([i,s])=>{ja(s,r,i,e)}),r}function ja(t,e,n,r){t.forEach(o=>{if(typeof o=="string"){const i=o===""?e:Xf(e,o);i.classGroupId=n;return}if(typeof o=="function"){if(C0(o)){ja(o(r),e,n,r);return}e.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,s])=>{ja(s,Xf(e,i),n,r)})})}function Xf(t,e){let n=t;return e.split($a).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function C0(t){return t.isThemeGetter}function A0(t,e){return e?t.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?e+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([s,a])=>[e+s,a])):i);return[n,o]}):t}function _0(t){if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,r=new Map;function o(i,s){n.set(i,s),e++,e>t&&(e=0,r=n,n=new Map)}return{get(i){let s=n.get(i);if(s!==void 0)return s;if((s=r.get(i))!==void 0)return o(i,s),s},set(i,s){n.has(i)?n.set(i,s):o(i,s)}}}const Jf="!";function P0(t){const e=t.separator,n=e.length===1,r=e[0],o=e.length;return function(s){const a=[];let l=0,c=0,u;for(let m=0;m<s.length;m++){let y=s[m];if(l===0){if(y===r&&(n||s.slice(m,m+o)===e)){a.push(s.slice(c,m)),c=m+o;continue}if(y==="/"){u=m;continue}}y==="["?l++:y==="]"&&l--}const f=a.length===0?s:s.substring(c),d=f.startsWith(Jf),p=d?f.substring(1):f,h=u&&u>c?u-c:void 0;return{modifiers:a,hasImportantModifier:d,baseClassName:p,maybePostfixModifierPosition:h}}}function O0(t){if(t.length<=1)return t;const e=[];let n=[];return t.forEach(r=>{r[0]==="["?(e.push(...n.sort(),r),n=[]):n.push(r)}),e.push(...n.sort()),e}function I0(t){return{cache:_0(t.cacheSize),splitModifiers:P0(t),...S0(t)}}const k0=/\s+/;function D0(t,e){const{splitModifiers:n,getClassGroupId:r,getConflictingClassGroupIds:o}=e,i=new Set;return t.trim().split(k0).map(s=>{const{modifiers:a,hasImportantModifier:l,baseClassName:c,maybePostfixModifierPosition:u}=n(s);let f=r(u?c.substring(0,u):c),d=!!u;if(!f){if(!u)return{isTailwindClass:!1,originalClassName:s};if(f=r(c),!f)return{isTailwindClass:!1,originalClassName:s};d=!1}const p=O0(a).join(":");return{isTailwindClass:!0,modifierId:l?p+Jf:p,classGroupId:f,originalClassName:s,hasPostfixModifier:d}}).reverse().filter(s=>{if(!s.isTailwindClass)return!0;const{modifierId:a,classGroupId:l,hasPostfixModifier:c}=s,u=a+l;return i.has(u)?!1:(i.add(u),o(l,c).forEach(f=>i.add(a+f)),!0)}).reverse().map(s=>s.originalClassName).join(" ")}function M0(){let t=0,e,n,r="";for(;t<arguments.length;)(e=arguments[t++])&&(n=Qf(e))&&(r&&(r+=" "),r+=n);return r}function Qf(t){if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=Qf(t[r]))&&(n&&(n+=" "),n+=e);return n}function R0(t,...e){let n,r,o,i=s;function s(l){const c=e.reduce((u,f)=>f(u),t());return n=I0(c),r=n.cache.get,o=n.cache.set,i=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=D0(l,n);return o(l,u),u}return function(){return i(M0.apply(null,arguments))}}function $e(t){const e=n=>n[t]||[];return e.isThemeGetter=!0,e}const ed=/^\[(?:([a-z-]+):)?(.+)\]$/i,F0=/^\d+\/\d+$/,L0=new Set(["px","full","screen"]),N0=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,V0=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,$0=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,j0=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,B0=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function pn(t){return Jn(t)||L0.has(t)||F0.test(t)}function In(t){return kr(t,"length",q0)}function Jn(t){return!!t&&!Number.isNaN(Number(t))}function Li(t){return kr(t,"number",Jn)}function wo(t){return!!t&&Number.isInteger(Number(t))}function z0(t){return t.endsWith("%")&&Jn(t.slice(0,-1))}function ge(t){return ed.test(t)}function kn(t){return N0.test(t)}const H0=new Set(["length","size","percentage"]);function W0(t){return kr(t,H0,td)}function U0(t){return kr(t,"position",td)}const G0=new Set(["image","url"]);function K0(t){return kr(t,G0,X0)}function Z0(t){return kr(t,"",Y0)}function So(){return!0}function kr(t,e,n){const r=ed.exec(t);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):n(r[2]):!1}function q0(t){return V0.test(t)&&!$0.test(t)}function td(){return!1}function Y0(t){return j0.test(t)}function X0(t){return B0.test(t)}function J0(){const t=$e("colors"),e=$e("spacing"),n=$e("blur"),r=$e("brightness"),o=$e("borderColor"),i=$e("borderRadius"),s=$e("borderSpacing"),a=$e("borderWidth"),l=$e("contrast"),c=$e("grayscale"),u=$e("hueRotate"),f=$e("invert"),d=$e("gap"),p=$e("gradientColorStops"),h=$e("gradientColorStopPositions"),m=$e("inset"),y=$e("margin"),v=$e("opacity"),b=$e("padding"),g=$e("saturate"),S=$e("scale"),x=$e("sepia"),T=$e("skew"),P=$e("space"),O=$e("translate"),k=()=>["auto","contain","none"],D=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto",ge,e],A=()=>[ge,e],j=()=>["",pn,In],F=()=>["auto",Jn,ge],_=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],M=()=>["solid","dashed","dotted","double","none"],N=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],z=()=>["start","end","center","between","around","evenly","stretch"],q=()=>["","0",ge],C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>[Jn,Li],Y=()=>[Jn,ge];return{cacheSize:500,separator:":",theme:{colors:[So],spacing:[pn,In],blur:["none","",kn,ge],brightness:$(),borderColor:[t],borderRadius:["none","","full",kn,ge],borderSpacing:A(),borderWidth:j(),contrast:$(),grayscale:q(),hueRotate:Y(),invert:q(),gap:A(),gradientColorStops:[t],gradientColorStopPositions:[z0,In],inset:L(),margin:L(),opacity:$(),padding:A(),saturate:$(),scale:$(),sepia:q(),skew:Y(),space:A(),translate:A()},classGroups:{aspect:[{aspect:["auto","square","video",ge]}],container:["container"],columns:[{columns:[kn]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[..._(),ge]}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",wo,ge]}],basis:[{basis:L()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ge]}],grow:[{grow:q()}],shrink:[{shrink:q()}],order:[{order:["first","last","none",wo,ge]}],"grid-cols":[{"grid-cols":[So]}],"col-start-end":[{col:["auto",{span:["full",wo,ge]},ge]}],"col-start":[{"col-start":F()}],"col-end":[{"col-end":F()}],"grid-rows":[{"grid-rows":[So]}],"row-start-end":[{row:["auto",{span:[wo,ge]},ge]}],"row-start":[{"row-start":F()}],"row-end":[{"row-end":F()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ge]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ge]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal",...z()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...z(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...z(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[P]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[P]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ge,e]}],"min-w":[{"min-w":[ge,e,"min","max","fit"]}],"max-w":[{"max-w":[ge,e,"none","full","min","max","fit","prose",{screen:[kn]},kn]}],h:[{h:[ge,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ge,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ge,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ge,e,"auto","min","max","fit"]}],"font-size":[{text:["base",kn,In]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Li]}],"font-family":[{font:[So]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ge]}],"line-clamp":[{"line-clamp":["none",Jn,Li]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",pn,ge]}],"list-image":[{"list-image":["none",ge]}],"list-style-type":[{list:["none","disc","decimal",ge]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...M(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",pn,In]}],"underline-offset":[{"underline-offset":["auto",pn,ge]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:A()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ge]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ge]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[..._(),U0]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",W0]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},K0]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...M(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:M()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...M()]}],"outline-offset":[{"outline-offset":[pn,ge]}],"outline-w":[{outline:[pn,In]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:j()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[pn,In]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",kn,Z0]}],"shadow-color":[{shadow:[So]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...N(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":N()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",kn,ge]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[f]}],saturate:[{saturate:[g]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[g]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ge]}],duration:[{duration:Y()}],ease:[{ease:["linear","in","out","in-out",ge]}],delay:[{delay:Y()}],animate:[{animate:["none","spin","ping","pulse","bounce",ge]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[wo,ge]}],"translate-x":[{"translate-x":[O]}],"translate-y":[{"translate-y":[O]}],"skew-x":[{"skew-x":[T]}],"skew-y":[{"skew-y":[T]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ge]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ge]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ge]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[pn,In,Li]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const Q0=R0(J0),Ba=(...t)=>e=>{t.forEach(n=>{typeof n=="function"?n(e):n!==null&&(n.current=e)})},ex=t=>t.$$typeof===Symbol.for("react.forward_ref")||t.$$typeof===Symbol.for("react.fragment")?!0:t.$$typeof===Symbol.for("react.element"),zt=(...t)=>Q0(w0(t)),nd=({reportStatus:t,hideLeft:e=!1,className:n,children:r,title:o})=>E.jsxs("div",{className:zt("w-full justify-between",e&&r===null?"hidden":"flex",n),children:[e?null:E.jsxs("span",{className:"flex items-center gap-1 group-hover:text-primary group-focus-within:text-primary transition-colors group-error:text-danger",children:[o,t?E.jsxs("span",{className:"flex aspect-square h-4 w-4 items-center justify-center",children:[E.jsx(m0,{className:"hidden aspect-square h-3 w-3 opacity-0 transition-opacity group-assert:block group-assert:text-success group-assert:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0}),E.jsx(g0,{className:"hidden aspect-square h-3 w-3 opacity-0 transition-opacity group-error:block group-error:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}):null]}),r]}),Ni=({optionalText:t="Optional",left:e,rightLabel:n,container:r,right:o,children:i,error:s,form:a,id:l,name:c,title:u,placeholder:f,hideLeft:d,required:p})=>{const h=l??c;return E.jsxs("fieldset",{"data-error":!!s,form:a,className:zt("group inline-block w-full",r),children:[E.jsxs("label",{form:a,htmlFor:h,className:"inline-flex w-full cursor-text flex-row flex-wrap justify-between gap-1 text-sm transition-colors empty:hidden group-error:text-danger group-hover:border-primary",children:[!d&&!n?E.jsx(nd,{hideLeft:d,reportStatus:!0,title:u,placeholder:f,children:t||n?E.jsxs(w.Fragment,{children:[p?null:E.jsx("span",{className:"text-opacity-70",children:t}),n?E.jsx(w.Fragment,{children:n}):null]}):null}):null,E.jsxs("div",{className:"relative group flex w-full flex-row flex-nowrap items-center gap-x-2 gap-y-1 rounded-md border border-input-border bg-transparent transition-colors group-focus-within:border-primary group-hover:border-primary group-error:border-danger",children:[e?E.jsx("span",{className:"absolute left-0 flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:e}):null,i,o?E.jsx("span",{className:"absolute right-0 flex flex-nowrap gap-2 whitespace-nowrap pr-1",children:o}):null]})]}),E.jsx("p",{className:"mt-1 text-xs group-error:block group-error:text-danger",children:s})]})},rd=t=>{const e=w.useRef();return w.useEffect(()=>{e.current=t},[t]),e.current},od=w.forwardRef(({selected:t,active:e,onClick:n,option:r,...o},i)=>E.jsx("li",{...o,ref:i,role:"option","aria-selected":t,className:"w-full",children:E.jsx("button",{type:"button",onClick:n,"aria-selected":t,className:`p-2 w-full text-left cursor-pointer ${t?"bg-primary text-primary-foreground":""} ${e?"bg-primary-subtle text-primary-foreground":""}`,children:r.label??r.value})})),tx={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},nx={caseSensitive:!1,sort:!1},rx=[],ox=w.forwardRef(({options:t,required:e=!0,...n},r)=>{const[o,i]=w.useState(!1),[s,a]=w.useState(""),[l,c]=w.useState(n.value??n.defaultValue??""),[u,f]=w.useState(null),d=w.useRef(rx),p=rd(u),h=new Ir(t,["value"],nx).search(s),{x:m,y,strategy:v,refs:b,context:g}=Da({open:o,transform:!0,onOpenChange:i,whileElementsMounted:Ta,middleware:[Ea(4),kb({padding:10,apply(A){Object.assign(A.elements.floating.style,{width:`${A.rects.reference.width}px`,maxHeight:`${Math.min(480,A.availableHeight)}px`})}})]});w.useImperativeHandle(r,()=>{var A;return(A=b.domReference)==null?void 0:A.current},[b]);const S=u0(g,tx),{getReferenceProps:x,getFloatingProps:T,getItemProps:P}=Ra([La(g,{role:"listbox"}),ka(g),s0(g,{listRef:d,loop:!0,activeIndex:u,allowEscape:!0,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,selectedIndex:u,virtual:!0,onNavigate:A=>{const j=h.length-1;if(A===null&&p===0)return f(j);if(A===null&&p===j)return f(0);const F=A??p??null;return F===null?void 0:f(F)}})]),O=A=>{c(A.value),i(!1),a("")},k=A=>{var F;const j=A.target.value;return a(j),!o&&j===""||j?i(!0):(F=n.onChange)==null?void 0:F.call(n,A)},D=()=>{i(!0),a("")},L=()=>{a(""),c(""),i(!1)};return E.jsxs("fieldset",{className:"relative w-auto",children:[E.jsx(Ni,{...n,required:e,right:E.jsxs("span",{className:"flex items-center gap-0.5",children:[E.jsx(Na,{size:20}),l?E.jsx("button",{type:"button",onClick:L,className:"link:text-danger transition-colors",children:E.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:E.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:E.jsx("input",{...x({...n,onChange:k,onFocus:D,ref:b.setReference,onClick:A=>A.currentTarget.focus(),onKeyDown(A){if(A.key==="Escape")return A.currentTarget.blur(),i(!1);if(A.key==="Enter"){if(u!==null&&h[u])return A.preventDefault(),O(h[u]);if(h.length===1)return A.preventDefault(),O(h[0])}}}),required:e,value:o?s:l,"aria-autocomplete":"list",autoComplete:"off",className:zt("input text-foreground group h-10 w-full flex-1 rounded-md bg-transparent p-2 placeholder-input-mask outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error",n.right||s?"pe-12":"",n.left?"ps-8":"",n.className)})}),E.jsx(kf,{preserveTabOrder:!0,children:E.jsx(Ff,{closeOnFocusOut:!0,guards:!0,returnFocus:!0,context:g,initialFocus:-1,visuallyHiddenDismiss:!0,children:E.jsx("ul",{...T({ref:b.setFloating,style:{position:v,left:m??0,top:y??0,...S.styles}}),"data-floating":"true",className:"bg-floating-background shadow-floating text-foreground list-none p-0 m-0 rounded-b-lg overflow-auto origin-[top_center] overflow-y-auto z-floating",children:h.map((A,j)=>w.createElement(od,{...P({onClick:()=>O(A),ref:F=>void(d.current[j]=F)}),key:`${A.value}-option`,option:A,selected:u===j,active:l===A.value}))})})})]})});var at=function(){return at=Object.assign||function(e){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},at.apply(this,arguments)};function za(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n}function Ha(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),o,i=[],s;try{for(;(e===void 0||e-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}typeof SuppressedError=="function"&&SuppressedError;var To=function(t){return t.replace(new RegExp(" ","g")," ")},id=function(t,e){var n=t.length,r=e+1;if(n>=r)return t;var o="0".repeat(r-n);return"".concat(o).concat(t)},ix=function(t){return t.replace(/^0+([0-9]+)/,"$1")},sd=function(t,e,n){var r=t.length-2,o=ix(t.substring(0,r)),i=t.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(e)+n+i},ad=function(t){return t===void 0&&(t=""),t.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},ld=function(t){return Number.parseFloat(t.replace(/,/g,".").replace(/(.*)\./,function(e){return"".concat(e.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},sx=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},Wa=function(t){var e=w.useRef(t);return w.useEffect(function(){e.current=t},[t]),e},ax=function(t){return t==="money"||t==="currency"},lx=function(t,e,n){return new Intl.NumberFormat(t,{style:"currency",currency:e,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var i;return at(at({},r),(i={},i[o.type]=o.value,i))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},Ua=function(t,e){var n=id(ad(t),e.fraction.length),r="".concat(e.currency).concat(sd(n,e.group,e.decimal));return To(r)},cx=w.forwardRef(function(t,e){var n=t.locale,r=n===void 0?"pt-BR":n,o=t.currency,i=o===void 0?"BRL":o,s=t.currencyDisplay,a=s===void 0?"symbol":s;t.mask;var l=t.onChange,c=za(t,["locale","currency","currencyDisplay","mask","onChange"]),u=w.useRef(null);w.useImperativeHandle(e,function(){return u.current});var f=w.useMemo(function(){var h=lx(r,i,a);return h.currency=To("".concat(h.currency.trim()," ")),h.literal=To(h.literal.trim()),h},[r,i]),d=function(h){var m=Ua(h.target.value,f),y=ld(m);h.target.value=m,h.target.setAttribute("data-number",y.toString()),l==null||l(h),y!==0&&(u.current.selectionEnd=m.length)},p=c.defaultValue?Ua(c.defaultValue,f):void 0;return w.createElement("input",at({},c,{value:typeof c.value=="string"?Ua(c.value,f):c.value,defaultValue:p,type:"text",ref:u,onChange:d,inputMode:"decimal"}))}),ux=1,fx=function(t){return t==="percentage"||t==="percent"||t==="percentual"},dx=function(t){return new Intl.NumberFormat(t,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(e,n){var r;return at(at({},e),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},Ga=function(t,e){var n=id(ad(t),e.fraction.length),r="".concat(sd(n,e.group,e.decimal)," ").concat(e.percentSign);return To(r)},px=w.forwardRef(function(t,e){var n=t.locale,r=n===void 0?"pt-BR":n;t.mask;var o=t.onChange,i=t.onKeyUp,s=za(t,["locale","mask","onChange","onKeyUp"]),a=w.useRef(null),l=Ha(w.useState(function(){var v,b;return(b=(v=s.value)===null||v===void 0?void 0:v.toString())!==null&&b!==void 0?b:""}),2),c=l[0],u=l[1];w.useImperativeHandle(e,function(){return a.current}),w.useEffect(function(){var v,b=Number.parseFloat("".concat((v=s.value)!==null&&v!==void 0?v:"0")).toFixed(f.fraction.length);u(Ga(b,f))},[s.value]);var f=w.useMemo(function(){var v=dx(r);return v.percentSign=To("".concat(v.percentSign)),v},[r]),d=c.length-f.percentSign.length-ux,p=function(v){var b,g=a.current;g&&(g.setSelectionRange(d,d),v&&((b=s.onFocus)===null||b===void 0||b.call(s,v)))},h=function(v){var b=v.currentTarget;if(b.selectionStart!==null){var g=b.selectionStart,S=b.selectionEnd,x=g!==S,T=d<g;!x&&T&&p()}i==null||i(v)},m=function(v){var b=Ga(v.target.value,f),g=ld(b);u(b),v.target.value=b,v.target.setAttribute("data-number",g.toString()),o==null||o(v)};w.useEffect(function(){return p()},[c]);var y=s.defaultValue?Ga(s.defaultValue,f):void 0;return w.createElement("input",at({},s,{defaultValue:y,inputMode:"decimal",onChange:m,onFocus:p,onKeyUp:h,ref:a,type:"text"}))}),Eo={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},hx=function(t){for(var e,n=t.length,r=[],o=0;o<n;o++){var i=t[o],s=Vi[i];s===void 0?r.push(i.replace(Eo.dots,"\\.").replace(Eo.openParenthesis,"\\(").replace(Eo.closeParenthesis,"\\)")):r.push((e=s.regex)===null||e===void 0?void 0:e.source)}return r.join("").replace(Eo.leadingBars,"\\")},Co=function(t,e,n){var r=typeof t=="function",o=r?"":t;if(r&&(o=t(e)),Array.isArray(o))return Ka(o,n);var i=hx(o);return n?"^".concat(i,"$"):i},mx=function(t){return t.replace(Eo.escape,"\\$&")},Ka=function(t,e){var n=t.map(function(r){return typeof r=="string"?mx(r):r.source}).join("");return new RegExp(e?"^".concat(n,"$"):n).source},Vi={A:{regex:/[a-zA-Z]/,parse:function(t){return t.toLocaleUpperCase()}},H:{regex:/[a-fA-F0-9]/},X:{regex:/[0-9a-zA-Z]/},a:{regex:/[a-zA-Z]/,parse:function(t){return t.toLocaleLowerCase()}},d:{regex:/\d/,escape:!0},x:{regex:/[a-zA-Z]/}},gx=/\d/,cd="(dd) 9dddd-dddd",ud="(dd) dddd-dddd",fd="ddd.ddd.ddd-dd",dd="dd.ddd.ddd/dddd-dd",$i=function(t){return t.replace(/\D/g,"")},yx=["2",/[0-3]/,":",/[0-5]/,/\d/],vx=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],Ct={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:fd,isoDate:"dddd-dd-dd",cnpj:dd,telephone:ud,cellphone:cd,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(t){return t.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(t){return $i(t).length<=11?fd:dd},int:function(t){return t===void 0&&(t=""),gx.test(t.toString().slice(-1))?"d".repeat(Math.max(t.length,0)):"d".repeat(Math.max(t.length-1,0))},cellTelephone:function(t){var e=$i(t);return e.length<11?ud:cd},time:function(t){var e=$i(t),n=e[0];return n==="2"?yx:vx}},At=function(t,e,n){var r;return n===void 0&&(n={}),at({mask:t,inputMode:e,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof t=="function")?void 0:Co(t,"",!0),infinity:n.infinity},n)},pt={cellTelephone:At(Ct.cellTelephone,"tel"),cellphone:At(Ct.cellphone,"tel"),cep:At(Ct.cep,"decimal"),cnpj:At(Ct.cnpj,"decimal"),color:At(Ct.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:At(Ct.cpf,"decimal"),cpfCnpj:At(Ct.cpfCnpj,"decimal",{transform:$i}),creditCard:At(Ct.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:At(Ct.date,"decimal"),int:At(Ct.int,"decimal",{pattern:"[0-9]+"}),isoDate:At(Ct.isoDate,"decimal"),telephone:At(Ct.telephone,"tel"),time:At(Ct.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:At(Ct.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function pd(t,e,n,r){var o,i;r===void 0&&(r=Vi);for(var s=n(t),a="",l=0,c=0;l<e.length&&c<s.length;){var u=e[l],f=u instanceof RegExp?u:r[u],d=s[c];if(f===void 0){a+=u,d===u&&(c+=1),l+=1;continue}var p=f instanceof RegExp?{regex:f}:f;p.regex.test(d)&&(a+=(i=(o=p.parse)===null||o===void 0?void 0:o.call(p,d))!==null&&i!==void 0?i:d),c+=1,l+=1}return a}var hd=function(t){return t},bx=function(t,e,n){if(!t||!n)return!1;var r=new RegExp(Co(t,n,e));return r.test(n)};function xx(t){var e=w.useRef(t);return w.useEffect(function(){e.current=t},[t]),e.current}var wx=w.forwardRef(function(t,e){var n=t.infinity,r=n===void 0?!1:n,o=t.strict,i=o===void 0?!0:o,s=t.transform,a=t.onChange,l=t.pattern,c=t.tokens,u=t.mask,f=t.onChangeText,d=t.as,p=za(t,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),h=w.useRef(null);w.useImperativeHandle(e,function(){return h.current});var m=Wa(a),y=Wa(f),v=Wa(u),b=w.useRef(bx(u,i,p.value||p.defaultValue)),g=d??"input",S=Ha(w.useState(""),2),x=S[0],T=S[1],P=xx(x),O=w.useCallback(function(_,M){var N,z,q=(N=_??M)!==null&&N!==void 0?N:"";if(u===void 0)return q;var C=(z=q==null?void 0:q.toString())!==null&&z!==void 0?z:"";return pd(C,typeof u=="function"?u(C):u,s??hd,c??Vi)},[s,u,c]),k=Ha(w.useState(function(){return O(p.value,p.defaultValue)}),2),D=k[0],L=k[1],A=O(p.defaultValue,p.defaultValue),j=w.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var _=u(D);return Array.isArray(_)?Ka(_,i):Co(u,D,i)}return typeof u=="string"?Co(u,D,i):Ka(u,i)},[l,D,i,u]);w.useEffect(function(){if(p.value!==void 0){var _=O(p.value,p.defaultValue);L(_),h.current!==null&&(h.current.value=_)}},[p.value,u,s,p.defaultValue]);var F=function(_){var M,N,z,q,C,$=_.currentTarget,Y=_.target.value;if(v.current===void 0)return L(Y),(M=y.current)===null||M===void 0||M.call(y,Y),(N=m.current)===null||N===void 0||N.call(m,_),f==null?void 0:f(Y);var re=new RegExp(Co(v.current,Y,i)),ee=(z=$.selectionEnd)!==null&&z!==void 0?z:0,H=function(X,le,B){if(X.type!=="number")return X.setSelectionRange(le,B)};if(r&&b.current&&Y.length>=D.length)return $.value=D,H($,ee-1,ee-1);var I=!1;Y.length<P.length&&(b.current=!1,I=!0),re.test(Y)&&(b.current=!0);var V=ee,W=Y[V-1],K=pd(Y,typeof v.current=="function"?v.current(Y):v.current,s??hd,c??Vi);for($.value=K,L(K);V<K.length&&K.charAt(V-1)!==W;)V+=1;I?H($,ee,ee):H($,V,V),_.target.value=K,T(K),(q=y.current)===null||q===void 0||q.call(y,K),(C=m.current)===null||C===void 0||C.call(m,_)};return w.createElement(g,at({},p,{ref:h,pattern:j,onChange:F,defaultValue:md(p.defaultValue)?A:void 0,value:md(p.value)?O(p.value,p.value):p.value}))}),md=function(t){return typeof t=="string"},gd=w.forwardRef(function(t,e){return ax(t.mask)?w.createElement(cx,at({},t,{mask:void 0,ref:e})):fx(t.mask)?w.createElement(px,at({},t,{mask:void 0,ref:e})):w.createElement(wx,at({},t,{ref:e}))}),_t=function(t){return function(e){return w.createElement(gd,at({},t,e))}};_t(pt.cellTelephone),_t(pt.cellphone),_t(pt.cep),_t(pt.cnpj),_t(pt.color),_t(pt.cpf),_t(pt.cpfCnpj),_t(pt.creditCard),_t(pt.date),_t(pt.int),_t(pt.isoDate),_t(pt.telephone),_t(pt.time),_t(pt.uuid);var Sx=w.forwardRef(function(e,n){var r=w.useMemo(function(){if(e.mask)return typeof e.mask=="string"&&sx(pt,e.mask)?pt[e.mask]:{mask:e.mask}},[e.mask]),o=at(at({},e),r);return w.createElement(gd,at({},o,{ref:n}))});const Za=w.forwardRef(({type:t="text",container:e,next:n,rightLabel:r,optionalText:o,hideLeft:i=!1,right:s,left:a,...l},c)=>{const u=l.id??l.name,f=w.useRef(null);return w.useEffect(()=>{if(f.current===null)return;const d=f.current,p=()=>d.setAttribute("data-initialized","true"),h=m=>{const y=m;if(y.key==="Enter"&&d.enterKeyHint==="next"){const v=d.getAttribute("data-next");if(v){const b=document.getElementById(v);if(b)return b.focus(),void y.preventDefault()}}};return d.addEventListener("keydown",h),d.addEventListener("focus",p),()=>{d.removeEventListener("keydown",h),d.removeEventListener("focus",p)}},[]),E.jsx(Ni,{...l,right:s,left:a,hideLeft:i,rightLabel:r,optionalText:o,container:zt("group inline-block w-full",e),children:E.jsx(Sx,{...l,type:t,"data-next":n,ref:Ba(c,f),id:u,name:u,className:zt("input text-foreground group h-10 w-full flex-1 rounded-md bg-transparent p-2 placeholder-input-mask outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error",s?"pe-4":"",a?"ps-4":"",l.className)})})}),Qn=w.forwardRef(({container:t,required:e=!0,options:n,...r},o)=>{const i=w.useRef(null),s=r.id??r.name;return w.useEffect(()=>{if(i.current===null)return;const a=i.current,l=()=>a.setAttribute("data-initialized","true"),c=()=>a.setAttribute("data-selected","true");return a.addEventListener("focus",l),a.addEventListener("change",c),()=>{a.removeEventListener("focus",l),a.removeEventListener("change",c)}},[]),E.jsx(Ni,{...r,required:e,container:zt("group inline-block w-full",t),right:E.jsx(Na,{size:20}),children:E.jsxs("select",{...r,ref:Ba(o,i),id:s,name:s,required:e,"data-selected":!!r.value||!1,className:zt("input bg-transparent text-foreground select group h-10 w-full flex-1 rounded-md p-2 placeholder-input-placeholder outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error","data-[selected=false]:text-input-placeholder",r.className),children:[E.jsx("option",{value:"",hidden:!0,disabled:!0,children:r.placeholder}),n.map(a=>E.jsx("option",{...a,children:a.label??a.value},`${s}-select-option-${a.value}`))]})})}),Tx=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],Ex=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],Cx=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],Ax=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],yd=(t,e,n)=>{let r=t;return typeof e=="string"||Array.isArray(e)?r=t.toLocaleString(e,n):(e===!0||n!==void 0)&&(r=t.toLocaleString(void 0,n)),r};function vd(t,e){if(!Number.isFinite(t))throw new TypeError(`Expected a finite number, got ${typeof t}: ${t}`);e={bits:!1,binary:!1,space:!0,...e};const n=e.bits?e.binary?Ax:Cx:e.binary?Ex:Tx,r=e.space?" ":"";if(e.signed&&t===0)return` 0${r}${n[0]}`;const o=t<0,i=o?"-":e.signed?"+":"";o&&(t=-t);let s;if(e.minimumFractionDigits!==void 0&&(s={minimumFractionDigits:e.minimumFractionDigits}),e.maximumFractionDigits!==void 0&&(s={maximumFractionDigits:e.maximumFractionDigits,...s}),t<1){const u=yd(t,e.locale,s);return i+u+r+n[0]}const a=Math.min(Math.floor(e.binary?Math.log(t)/Math.log(1024):Math.log10(t)/3),n.length-1);t/=(e.binary?1024:1e3)**a,s||(t=t.toPrecision(3));const l=yd(Number(t),e.locale,s),c=n[a];return i+l+r+c}var bd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _x(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Px(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var o=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return t[r]}})}),n}var qa={exports:{}},ji={exports:{}},Oe={};/** @license React v16.13.1
85
+ * react-is.production.min.js
86
+ *
87
+ * Copyright (c) Facebook, Inc. and its affiliates.
88
+ *
89
+ * This source code is licensed under the MIT license found in the
90
+ * LICENSE file in the root directory of this source tree.
91
+ */var xd;function Ox(){if(xd)return Oe;xd=1;var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,o=t?Symbol.for("react.strict_mode"):60108,i=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,a=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,c=t?Symbol.for("react.concurrent_mode"):60111,u=t?Symbol.for("react.forward_ref"):60112,f=t?Symbol.for("react.suspense"):60113,d=t?Symbol.for("react.suspense_list"):60120,p=t?Symbol.for("react.memo"):60115,h=t?Symbol.for("react.lazy"):60116,m=t?Symbol.for("react.block"):60121,y=t?Symbol.for("react.fundamental"):60117,v=t?Symbol.for("react.responder"):60118,b=t?Symbol.for("react.scope"):60119;function g(x){if(typeof x=="object"&&x!==null){var T=x.$$typeof;switch(T){case e:switch(x=x.type,x){case l:case c:case r:case i:case o:case f:return x;default:switch(x=x&&x.$$typeof,x){case a:case u:case h:case p:case s:return x;default:return T}}case n:return T}}}function S(x){return g(x)===c}return Oe.AsyncMode=l,Oe.ConcurrentMode=c,Oe.ContextConsumer=a,Oe.ContextProvider=s,Oe.Element=e,Oe.ForwardRef=u,Oe.Fragment=r,Oe.Lazy=h,Oe.Memo=p,Oe.Portal=n,Oe.Profiler=i,Oe.StrictMode=o,Oe.Suspense=f,Oe.isAsyncMode=function(x){return S(x)||g(x)===l},Oe.isConcurrentMode=S,Oe.isContextConsumer=function(x){return g(x)===a},Oe.isContextProvider=function(x){return g(x)===s},Oe.isElement=function(x){return typeof x=="object"&&x!==null&&x.$$typeof===e},Oe.isForwardRef=function(x){return g(x)===u},Oe.isFragment=function(x){return g(x)===r},Oe.isLazy=function(x){return g(x)===h},Oe.isMemo=function(x){return g(x)===p},Oe.isPortal=function(x){return g(x)===n},Oe.isProfiler=function(x){return g(x)===i},Oe.isStrictMode=function(x){return g(x)===o},Oe.isSuspense=function(x){return g(x)===f},Oe.isValidElementType=function(x){return typeof x=="string"||typeof x=="function"||x===r||x===c||x===i||x===o||x===f||x===d||typeof x=="object"&&x!==null&&(x.$$typeof===h||x.$$typeof===p||x.$$typeof===s||x.$$typeof===a||x.$$typeof===u||x.$$typeof===y||x.$$typeof===v||x.$$typeof===b||x.$$typeof===m)},Oe.typeOf=g,Oe}var Ie={};/** @license React v16.13.1
92
+ * react-is.development.js
93
+ *
94
+ * Copyright (c) Facebook, Inc. and its affiliates.
95
+ *
96
+ * This source code is licensed under the MIT license found in the
97
+ * LICENSE file in the root directory of this source tree.
98
+ */var wd;function Ix(){return wd||(wd=1,process.env.NODE_ENV!=="production"&&function(){var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,o=t?Symbol.for("react.strict_mode"):60108,i=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,a=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,c=t?Symbol.for("react.concurrent_mode"):60111,u=t?Symbol.for("react.forward_ref"):60112,f=t?Symbol.for("react.suspense"):60113,d=t?Symbol.for("react.suspense_list"):60120,p=t?Symbol.for("react.memo"):60115,h=t?Symbol.for("react.lazy"):60116,m=t?Symbol.for("react.block"):60121,y=t?Symbol.for("react.fundamental"):60117,v=t?Symbol.for("react.responder"):60118,b=t?Symbol.for("react.scope"):60119;function g(B){return typeof B=="string"||typeof B=="function"||B===r||B===c||B===i||B===o||B===f||B===d||typeof B=="object"&&B!==null&&(B.$$typeof===h||B.$$typeof===p||B.$$typeof===s||B.$$typeof===a||B.$$typeof===u||B.$$typeof===y||B.$$typeof===v||B.$$typeof===b||B.$$typeof===m)}function S(B){if(typeof B=="object"&&B!==null){var ke=B.$$typeof;switch(ke){case e:var We=B.type;switch(We){case l:case c:case r:case i:case o:case f:return We;default:var Xe=We&&We.$$typeof;switch(Xe){case a:case u:case h:case p:case s:return Xe;default:return ke}}case n:return ke}}}var x=l,T=c,P=a,O=s,k=e,D=u,L=r,A=h,j=p,F=n,_=i,M=o,N=f,z=!1;function q(B){return z||(z=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),C(B)||S(B)===l}function C(B){return S(B)===c}function $(B){return S(B)===a}function Y(B){return S(B)===s}function re(B){return typeof B=="object"&&B!==null&&B.$$typeof===e}function ee(B){return S(B)===u}function H(B){return S(B)===r}function I(B){return S(B)===h}function V(B){return S(B)===p}function W(B){return S(B)===n}function K(B){return S(B)===i}function X(B){return S(B)===o}function le(B){return S(B)===f}Ie.AsyncMode=x,Ie.ConcurrentMode=T,Ie.ContextConsumer=P,Ie.ContextProvider=O,Ie.Element=k,Ie.ForwardRef=D,Ie.Fragment=L,Ie.Lazy=A,Ie.Memo=j,Ie.Portal=F,Ie.Profiler=_,Ie.StrictMode=M,Ie.Suspense=N,Ie.isAsyncMode=q,Ie.isConcurrentMode=C,Ie.isContextConsumer=$,Ie.isContextProvider=Y,Ie.isElement=re,Ie.isForwardRef=ee,Ie.isFragment=H,Ie.isLazy=I,Ie.isMemo=V,Ie.isPortal=W,Ie.isProfiler=K,Ie.isStrictMode=X,Ie.isSuspense=le,Ie.isValidElementType=g,Ie.typeOf=S}()),Ie}var Sd;function Td(){return Sd||(Sd=1,process.env.NODE_ENV==="production"?ji.exports=Ox():ji.exports=Ix()),ji.exports}/*
99
+ object-assign
100
+ (c) Sindre Sorhus
101
+ @license MIT
102
+ */var Ya,Ed;function kx(){if(Ed)return Ya;Ed=1;var t=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var s={},a=0;a<10;a++)s["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(s).map(function(u){return s[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Ya=o()?Object.assign:function(i,s){for(var a,l=r(i),c,u=1;u<arguments.length;u++){a=Object(arguments[u]);for(var f in a)e.call(a,f)&&(l[f]=a[f]);if(t){c=t(a);for(var d=0;d<c.length;d++)n.call(a,c[d])&&(l[c[d]]=a[c[d]])}}return l},Ya}var Xa,Cd;function Ja(){if(Cd)return Xa;Cd=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Xa=t,Xa}var Qa,Ad;function _d(){return Ad||(Ad=1,Qa=Function.call.bind(Object.prototype.hasOwnProperty)),Qa}var el,Pd;function Dx(){if(Pd)return el;Pd=1;var t=function(){};if(process.env.NODE_ENV!=="production"){var e=Ja(),n={},r=_d();t=function(i){var s="Warning: "+i;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function o(i,s,a,l,c){if(process.env.NODE_ENV!=="production"){for(var u in i)if(r(i,u)){var f;try{if(typeof i[u]!="function"){var d=Error((l||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}f=i[u](s,u,l,a,null,e)}catch(h){f=h}if(f&&!(f instanceof Error)&&t((l||"React class")+": type specification of "+a+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var p=c?c():"";t("Failed "+a+" type: "+f.message+(p??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},el=o,el}var tl,Od;function Mx(){if(Od)return tl;Od=1;var t=Td(),e=kx(),n=Ja(),r=_d(),o=Dx(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function s(){return null}return tl=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function f(C){var $=C&&(c&&C[c]||C[u]);if(typeof $=="function")return $}var d="<<anonymous>>",p={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:b(),arrayOf:g,element:S(),elementType:x(),instanceOf:T,node:D(),objectOf:O,oneOf:P,oneOfType:k,shape:A,exact:j};function h(C,$){return C===$?C!==0||1/C===1/$:C!==C&&$!==$}function m(C,$){this.message=C,this.data=$&&typeof $=="object"?$:{},this.stack=""}m.prototype=Error.prototype;function y(C){if(process.env.NODE_ENV!=="production")var $={},Y=0;function re(H,I,V,W,K,X,le){if(W=W||d,X=X||V,le!==n){if(l){var B=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw B.name="Invariant Violation",B}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ke=W+":"+V;!$[ke]&&Y<3&&(i("You are manually calling a React.PropTypes validation function for the `"+X+"` prop on `"+W+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),$[ke]=!0,Y++)}}return I[V]==null?H?I[V]===null?new m("The "+K+" `"+X+"` is marked as required "+("in `"+W+"`, but its value is `null`.")):new m("The "+K+" `"+X+"` is marked as required in "+("`"+W+"`, but its value is `undefined`.")):null:C(I,V,W,K,X)}var ee=re.bind(null,!1);return ee.isRequired=re.bind(null,!0),ee}function v(C){function $(Y,re,ee,H,I,V){var W=Y[re],K=M(W);if(K!==C){var X=N(W);return new m("Invalid "+H+" `"+I+"` of type "+("`"+X+"` supplied to `"+ee+"`, expected ")+("`"+C+"`."),{expectedType:C})}return null}return y($)}function b(){return y(s)}function g(C){function $(Y,re,ee,H,I){if(typeof C!="function")return new m("Property `"+I+"` of component `"+ee+"` has invalid PropType notation inside arrayOf.");var V=Y[re];if(!Array.isArray(V)){var W=M(V);return new m("Invalid "+H+" `"+I+"` of type "+("`"+W+"` supplied to `"+ee+"`, expected an array."))}for(var K=0;K<V.length;K++){var X=C(V,K,ee,H,I+"["+K+"]",n);if(X instanceof Error)return X}return null}return y($)}function S(){function C($,Y,re,ee,H){var I=$[Y];if(!a(I)){var V=M(I);return new m("Invalid "+ee+" `"+H+"` of type "+("`"+V+"` supplied to `"+re+"`, expected a single ReactElement."))}return null}return y(C)}function x(){function C($,Y,re,ee,H){var I=$[Y];if(!t.isValidElementType(I)){var V=M(I);return new m("Invalid "+ee+" `"+H+"` of type "+("`"+V+"` supplied to `"+re+"`, expected a single ReactElement type."))}return null}return y(C)}function T(C){function $(Y,re,ee,H,I){if(!(Y[re]instanceof C)){var V=C.name||d,W=q(Y[re]);return new m("Invalid "+H+" `"+I+"` of type "+("`"+W+"` supplied to `"+ee+"`, expected ")+("instance of `"+V+"`."))}return null}return y($)}function P(C){if(!Array.isArray(C))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),s;function $(Y,re,ee,H,I){for(var V=Y[re],W=0;W<C.length;W++)if(h(V,C[W]))return null;var K=JSON.stringify(C,function(le,B){var ke=N(B);return ke==="symbol"?String(B):B});return new m("Invalid "+H+" `"+I+"` of value `"+String(V)+"` "+("supplied to `"+ee+"`, expected one of "+K+"."))}return y($)}function O(C){function $(Y,re,ee,H,I){if(typeof C!="function")return new m("Property `"+I+"` of component `"+ee+"` has invalid PropType notation inside objectOf.");var V=Y[re],W=M(V);if(W!=="object")return new m("Invalid "+H+" `"+I+"` of type "+("`"+W+"` supplied to `"+ee+"`, expected an object."));for(var K in V)if(r(V,K)){var X=C(V,K,ee,H,I+"."+K,n);if(X instanceof Error)return X}return null}return y($)}function k(C){if(!Array.isArray(C))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var $=0;$<C.length;$++){var Y=C[$];if(typeof Y!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+z(Y)+" at index "+$+"."),s}function re(ee,H,I,V,W){for(var K=[],X=0;X<C.length;X++){var le=C[X],B=le(ee,H,I,V,W,n);if(B==null)return null;B.data&&r(B.data,"expectedType")&&K.push(B.data.expectedType)}var ke=K.length>0?", expected one of type ["+K.join(", ")+"]":"";return new m("Invalid "+V+" `"+W+"` supplied to "+("`"+I+"`"+ke+"."))}return y(re)}function D(){function C($,Y,re,ee,H){return F($[Y])?null:new m("Invalid "+ee+" `"+H+"` supplied to "+("`"+re+"`, expected a ReactNode."))}return y(C)}function L(C,$,Y,re,ee){return new m((C||"React class")+": "+$+" type `"+Y+"."+re+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ee+"`.")}function A(C){function $(Y,re,ee,H,I){var V=Y[re],W=M(V);if(W!=="object")return new m("Invalid "+H+" `"+I+"` of type `"+W+"` "+("supplied to `"+ee+"`, expected `object`."));for(var K in C){var X=C[K];if(typeof X!="function")return L(ee,H,I,K,N(X));var le=X(V,K,ee,H,I+"."+K,n);if(le)return le}return null}return y($)}function j(C){function $(Y,re,ee,H,I){var V=Y[re],W=M(V);if(W!=="object")return new m("Invalid "+H+" `"+I+"` of type `"+W+"` "+("supplied to `"+ee+"`, expected `object`."));var K=e({},Y[re],C);for(var X in K){var le=C[X];if(r(C,X)&&typeof le!="function")return L(ee,H,I,X,N(le));if(!le)return new m("Invalid "+H+" `"+I+"` key `"+X+"` supplied to `"+ee+"`.\nBad object: "+JSON.stringify(Y[re],null," ")+`
103
+ Valid keys: `+JSON.stringify(Object.keys(C),null," "));var B=le(V,X,ee,H,I+"."+X,n);if(B)return B}return null}return y($)}function F(C){switch(typeof C){case"number":case"string":case"undefined":return!0;case"boolean":return!C;case"object":if(Array.isArray(C))return C.every(F);if(C===null||a(C))return!0;var $=f(C);if($){var Y=$.call(C),re;if($!==C.entries){for(;!(re=Y.next()).done;)if(!F(re.value))return!1}else for(;!(re=Y.next()).done;){var ee=re.value;if(ee&&!F(ee[1]))return!1}}else return!1;return!0;default:return!1}}function _(C,$){return C==="symbol"?!0:$?$["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&$ instanceof Symbol:!1}function M(C){var $=typeof C;return Array.isArray(C)?"array":C instanceof RegExp?"object":_($,C)?"symbol":$}function N(C){if(typeof C>"u"||C===null)return""+C;var $=M(C);if($==="object"){if(C instanceof Date)return"date";if(C instanceof RegExp)return"regexp"}return $}function z(C){var $=N(C);switch($){case"array":case"object":return"an "+$;case"boolean":case"date":case"regexp":return"a "+$;default:return $}}function q(C){return!C.constructor||!C.constructor.name?d:C.constructor.name}return p.checkPropTypes=o,p.resetWarningCache=o.resetWarningCache,p.PropTypes=p,p},tl}var nl,Id;function Rx(){if(Id)return nl;Id=1;var t=Ja();function e(){}function n(){}return n.resetWarningCache=e,nl=function(){function r(s,a,l,c,u,f){if(f!==t){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:e};return i.PropTypes=i,i},nl}if(process.env.NODE_ENV!=="production"){var Fx=Td(),Lx=!0;qa.exports=Mx()(Fx.isElement,Lx)}else qa.exports=Rx()();var Nx=qa.exports;const Le=_x(Nx);function Dr(t,e,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function a(u){try{c(r.next(u))}catch(f){s(f)}}function l(u){try{c(r.throw(u))}catch(f){s(f)}}function c(u){u.done?i(u.value):o(u.value).then(a,l)}c((r=r.apply(t,e||[])).next())})}function Mr(t,e){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,c[0]&&(n=0)),n;)try{if(r=1,o&&(i=c[0]&2?o.return:c[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,c[1])).done)return i;switch(o=0,i&&(c=[c[0]&2,i.value]),c[0]){case 0:case 1:i=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,o=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){n.label=c[1];break}if(c[0]===6&&n.label<i[1]){n.label=i[1],i=c;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(c);break}i[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(u){c=[6,u],o=0}finally{r=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function kd(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),o,i=[],s;try{for(;(e===void 0||e-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}function Dd(t,e,n){if(n||arguments.length===2)for(var r=0,o=e.length,i;r<o;r++)(i||!(r in e))&&(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}typeof SuppressedError=="function"&&SuppressedError;var Vx=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function Ao(t,e){var n=$x(t);if(typeof n.path!="string"){var r=t.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof e=="string"?e:typeof r=="string"&&r.length>0?r:t.name,writable:!1,configurable:!1,enumerable:!0})}return n}function $x(t){var e=t.name,n=e&&e.lastIndexOf(".")!==-1;if(n&&!t.type){var r=e.split(".").pop().toLowerCase(),o=Vx.get(r);o&&Object.defineProperty(t,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return t}var jx=[".DS_Store","Thumbs.db"];function Bx(t){return Dr(this,void 0,void 0,function(){return Mr(this,function(e){return Bi(t)&&zx(t.dataTransfer)?[2,Gx(t.dataTransfer,t.type)]:Hx(t)?[2,Wx(t)]:Array.isArray(t)&&t.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,Ux(t)]:[2,[]]})})}function zx(t){return Bi(t)}function Hx(t){return Bi(t)&&Bi(t.target)}function Bi(t){return typeof t=="object"&&t!==null}function Wx(t){return rl(t.target.files).map(function(e){return Ao(e)})}function Ux(t){return Dr(this,void 0,void 0,function(){var e;return Mr(this,function(n){switch(n.label){case 0:return[4,Promise.all(t.map(function(r){return r.getFile()}))];case 1:return e=n.sent(),[2,e.map(function(r){return Ao(r)})]}})})}function Gx(t,e){return Dr(this,void 0,void 0,function(){var n,r;return Mr(this,function(o){switch(o.label){case 0:return t.items?(n=rl(t.items).filter(function(i){return i.kind==="file"}),e!=="drop"?[2,n]:[4,Promise.all(n.map(Kx))]):[3,2];case 1:return r=o.sent(),[2,Md(Rd(r))];case 2:return[2,Md(rl(t.files).map(function(i){return Ao(i)}))]}})})}function Md(t){return t.filter(function(e){return jx.indexOf(e.name)===-1})}function rl(t){if(t===null)return[];for(var e=[],n=0;n<t.length;n++){var r=t[n];e.push(r)}return e}function Kx(t){if(typeof t.webkitGetAsEntry!="function")return Fd(t);var e=t.webkitGetAsEntry();return e&&e.isDirectory?Ld(e):Fd(t)}function Rd(t){return t.reduce(function(e,n){return Dd(Dd([],kd(e),!1),kd(Array.isArray(n)?Rd(n):[n]),!1)},[])}function Fd(t){var e=t.getAsFile();if(!e)return Promise.reject("".concat(t," is not a File"));var n=Ao(e);return Promise.resolve(n)}function Zx(t){return Dr(this,void 0,void 0,function(){return Mr(this,function(e){return[2,t.isDirectory?Ld(t):qx(t)]})})}function Ld(t){var e=t.createReader();return new Promise(function(n,r){var o=[];function i(){var s=this;e.readEntries(function(a){return Dr(s,void 0,void 0,function(){var l,c,u;return Mr(this,function(f){switch(f.label){case 0:if(a.length)return[3,5];f.label=1;case 1:return f.trys.push([1,3,,4]),[4,Promise.all(o)];case 2:return l=f.sent(),n(l),[3,4];case 3:return c=f.sent(),r(c),[3,4];case 4:return[3,6];case 5:u=Promise.all(a.map(Zx)),o.push(u),i(),f.label=6;case 6:return[2]}})})},function(a){r(a)})}i()})}function qx(t){return Dr(this,void 0,void 0,function(){return Mr(this,function(e){return[2,new Promise(function(n,r){t.file(function(o){var i=Ao(o,t.fullPath);n(i)},function(o){r(o)})})]})})}var Yx=function(t,e){if(t&&e){var n=Array.isArray(e)?e:e.split(","),r=t.name||"",o=(t.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return n.some(function(s){var a=s.trim().toLowerCase();return a.charAt(0)==="."?r.toLowerCase().endsWith(a):a.endsWith("/*")?i===a.replace(/\/.*$/,""):o===a})}return!0};function Nd(t){return Qx(t)||Jx(t)||Bd(t)||Xx()}function Xx(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
104
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jx(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Qx(t){if(Array.isArray(t))return ol(t)}function Vd(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function $d(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Vd(Object(n),!0).forEach(function(r){jd(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Vd(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function jd(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _o(t,e){return nw(t)||tw(t,e)||Bd(t,e)||ew()}function ew(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
105
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Bd(t,e){if(t){if(typeof t=="string")return ol(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ol(t,e)}}function ol(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function tw(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(t);!(o=(s=n.next()).done)&&(r.push(s.value),!(e&&r.length===e));o=!0);}catch(l){i=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function nw(t){if(Array.isArray(t))return t}var rw="file-invalid-type",ow="file-too-large",iw="file-too-small",sw="too-many-files",aw=function(e){e=Array.isArray(e)&&e.length===1?e[0]:e;var n=Array.isArray(e)?"one of ".concat(e.join(", ")):e;return{code:rw,message:"File type must be ".concat(n)}},zd=function(e){return{code:ow,message:"File is larger than ".concat(e," ").concat(e===1?"byte":"bytes")}},Hd=function(e){return{code:iw,message:"File is smaller than ".concat(e," ").concat(e===1?"byte":"bytes")}},lw={code:sw,message:"Too many files"};function Wd(t,e){var n=t.type==="application/x-moz-file"||Yx(t,e);return[n,n?null:aw(e)]}function Ud(t,e,n){if(er(t.size))if(er(e)&&er(n)){if(t.size>n)return[!1,zd(n)];if(t.size<e)return[!1,Hd(e)]}else{if(er(e)&&t.size<e)return[!1,Hd(e)];if(er(n)&&t.size>n)return[!1,zd(n)]}return[!0,null]}function er(t){return t!=null}function cw(t){var e=t.files,n=t.accept,r=t.minSize,o=t.maxSize,i=t.multiple,s=t.maxFiles,a=t.validator;return!i&&e.length>1||i&&s>=1&&e.length>s?!1:e.every(function(l){var c=Wd(l,n),u=_o(c,1),f=u[0],d=Ud(l,r,o),p=_o(d,1),h=p[0],m=a?a(l):null;return f&&h&&!m})}function zi(t){return typeof t.isPropagationStopped=="function"?t.isPropagationStopped():typeof t.cancelBubble<"u"?t.cancelBubble:!1}function Hi(t){return t.dataTransfer?Array.prototype.some.call(t.dataTransfer.types,function(e){return e==="Files"||e==="application/x-moz-file"}):!!t.target&&!!t.target.files}function Gd(t){t.preventDefault()}function uw(t){return t.indexOf("MSIE")!==-1||t.indexOf("Trident/")!==-1}function fw(t){return t.indexOf("Edge/")!==-1}function dw(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return uw(t)||fw(t)}function qt(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(r){for(var o=arguments.length,i=new Array(o>1?o-1:0),s=1;s<o;s++)i[s-1]=arguments[s];return e.some(function(a){return!zi(r)&&a&&a.apply(void 0,[r].concat(i)),zi(r)})}}function pw(){return"showOpenFilePicker"in window}function hw(t){if(er(t)){var e=Object.entries(t).filter(function(n){var r=_o(n,2),o=r[0],i=r[1],s=!0;return Kd(o)||(console.warn('Skipped "'.concat(o,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),s=!1),(!Array.isArray(i)||!i.every(Zd))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),s=!1),s}).reduce(function(n,r){var o=_o(r,2),i=o[0],s=o[1];return $d($d({},n),{},jd({},i,s))},{});return[{description:"Files",accept:e}]}return t}function mw(t){if(er(t))return Object.entries(t).reduce(function(e,n){var r=_o(n,2),o=r[0],i=r[1];return[].concat(Nd(e),[o],Nd(i))},[]).filter(function(e){return Kd(e)||Zd(e)}).join(",")}function gw(t){return t instanceof DOMException&&(t.name==="AbortError"||t.code===t.ABORT_ERR)}function yw(t){return t instanceof DOMException&&(t.name==="SecurityError"||t.code===t.SECURITY_ERR)}function Kd(t){return t==="audio/*"||t==="video/*"||t==="image/*"||t==="text/*"||/\w+\/[-+.\w]+/g.test(t)}function Zd(t){return/^.*\.[\w]+$/.test(t)}var vw=["children"],bw=["open"],xw=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],ww=["refKey","onChange","onClick"];function Sw(t){return Cw(t)||Ew(t)||qd(t)||Tw()}function Tw(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
106
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ew(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Cw(t){if(Array.isArray(t))return sl(t)}function il(t,e){return Pw(t)||_w(t,e)||qd(t,e)||Aw()}function Aw(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
107
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qd(t,e){if(t){if(typeof t=="string")return sl(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sl(t,e)}}function sl(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function _w(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(t);!(o=(s=n.next()).done)&&(r.push(s.value),!(e&&r.length===e));o=!0);}catch(l){i=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function Pw(t){if(Array.isArray(t))return t}function Yd(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function Ue(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Yd(Object(n),!0).forEach(function(r){al(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Yd(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function al(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Wi(t,e){if(t==null)return{};var n=Ow(t,e),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(o=0;o<i.length;o++)r=i[o],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Ow(t,e){if(t==null)return{};var n={},r=Object.keys(t),o,i;for(i=0;i<r.length;i++)o=r[i],!(e.indexOf(o)>=0)&&(n[o]=t[o]);return n}var ll=w.forwardRef(function(t,e){var n=t.children,r=Wi(t,vw),o=Jd(r),i=o.open,s=Wi(o,bw);return w.useImperativeHandle(e,function(){return{open:i}},[i]),w.createElement(w.Fragment,null,n(Ue(Ue({},s),{},{open:i})))});ll.displayName="Dropzone";var Xd={disabled:!1,getFilesFromEvent:Bx,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};ll.defaultProps=Xd,ll.propTypes={children:Le.func,accept:Le.objectOf(Le.arrayOf(Le.string)),multiple:Le.bool,preventDropOnDocument:Le.bool,noClick:Le.bool,noKeyboard:Le.bool,noDrag:Le.bool,noDragEventsBubbling:Le.bool,minSize:Le.number,maxSize:Le.number,maxFiles:Le.number,disabled:Le.bool,getFilesFromEvent:Le.func,onFileDialogCancel:Le.func,onFileDialogOpen:Le.func,useFsAccessApi:Le.bool,autoFocus:Le.bool,onDragEnter:Le.func,onDragLeave:Le.func,onDragOver:Le.func,onDrop:Le.func,onDropAccepted:Le.func,onDropRejected:Le.func,onError:Le.func,validator:Le.func};var cl={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Jd(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=Ue(Ue({},Xd),t),n=e.accept,r=e.disabled,o=e.getFilesFromEvent,i=e.maxSize,s=e.minSize,a=e.multiple,l=e.maxFiles,c=e.onDragEnter,u=e.onDragLeave,f=e.onDragOver,d=e.onDrop,p=e.onDropAccepted,h=e.onDropRejected,m=e.onFileDialogCancel,y=e.onFileDialogOpen,v=e.useFsAccessApi,b=e.autoFocus,g=e.preventDropOnDocument,S=e.noClick,x=e.noKeyboard,T=e.noDrag,P=e.noDragEventsBubbling,O=e.onError,k=e.validator,D=w.useMemo(function(){return mw(n)},[n]),L=w.useMemo(function(){return hw(n)},[n]),A=w.useMemo(function(){return typeof y=="function"?y:Qd},[y]),j=w.useMemo(function(){return typeof m=="function"?m:Qd},[m]),F=w.useRef(null),_=w.useRef(null),M=w.useReducer(Iw,cl),N=il(M,2),z=N[0],q=N[1],C=z.isFocused,$=z.isFileDialogActive,Y=w.useRef(typeof window<"u"&&window.isSecureContext&&v&&pw()),re=function(){!Y.current&&$&&setTimeout(function(){if(_.current){var oe=_.current.files;oe.length||(q({type:"closeDialog"}),j())}},300)};w.useEffect(function(){return window.addEventListener("focus",re,!1),function(){window.removeEventListener("focus",re,!1)}},[_,$,j,Y]);var ee=w.useRef([]),H=function(oe){F.current&&F.current.contains(oe.target)||(oe.preventDefault(),ee.current=[])};w.useEffect(function(){return g&&(document.addEventListener("dragover",Gd,!1),document.addEventListener("drop",H,!1)),function(){g&&(document.removeEventListener("dragover",Gd),document.removeEventListener("drop",H))}},[F,g]),w.useEffect(function(){return!r&&b&&F.current&&F.current.focus(),function(){}},[F,b,r]);var I=w.useCallback(function(Z){O?O(Z):console.error(Z)},[O]),V=w.useCallback(function(Z){Z.preventDefault(),Z.persist(),he(Z),ee.current=[].concat(Sw(ee.current),[Z.target]),Hi(Z)&&Promise.resolve(o(Z)).then(function(oe){if(!(zi(Z)&&!P)){var Fe=oe.length,Ke=Fe>0&&cw({files:oe,accept:D,minSize:s,maxSize:i,multiple:a,maxFiles:l,validator:k}),ft=Fe>0&&!Ke;q({isDragAccept:Ke,isDragReject:ft,isDragActive:!0,type:"setDraggedFiles"}),c&&c(Z)}}).catch(function(oe){return I(oe)})},[o,c,I,P,D,s,i,a,l,k]),W=w.useCallback(function(Z){Z.preventDefault(),Z.persist(),he(Z);var oe=Hi(Z);if(oe&&Z.dataTransfer)try{Z.dataTransfer.dropEffect="copy"}catch{}return oe&&f&&f(Z),!1},[f,P]),K=w.useCallback(function(Z){Z.preventDefault(),Z.persist(),he(Z);var oe=ee.current.filter(function(Ke){return F.current&&F.current.contains(Ke)}),Fe=oe.indexOf(Z.target);Fe!==-1&&oe.splice(Fe,1),ee.current=oe,!(oe.length>0)&&(q({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Hi(Z)&&u&&u(Z))},[F,u,P]),X=w.useCallback(function(Z,oe){var Fe=[],Ke=[];Z.forEach(function(ft){var ln=Wd(ft,D),nt=il(ln,2),cn=nt[0],mi=nt[1],lo=Ud(ft,s,i),sa=il(lo,2),Du=sa[0],Mu=sa[1],Ru=k?k(ft):null;if(cn&&Du&&!Ru)Fe.push(ft);else{var Fu=[mi,Mu];Ru&&(Fu=Fu.concat(Ru)),Ke.push({file:ft,errors:Fu.filter(function(QI){return QI})})}}),(!a&&Fe.length>1||a&&l>=1&&Fe.length>l)&&(Fe.forEach(function(ft){Ke.push({file:ft,errors:[lw]})}),Fe.splice(0)),q({acceptedFiles:Fe,fileRejections:Ke,type:"setFiles"}),d&&d(Fe,Ke,oe),Ke.length>0&&h&&h(Ke,oe),Fe.length>0&&p&&p(Fe,oe)},[q,a,D,s,i,l,d,p,h,k]),le=w.useCallback(function(Z){Z.preventDefault(),Z.persist(),he(Z),ee.current=[],Hi(Z)&&Promise.resolve(o(Z)).then(function(oe){zi(Z)&&!P||X(oe,Z)}).catch(function(oe){return I(oe)}),q({type:"reset"})},[o,X,I,P]),B=w.useCallback(function(){if(Y.current){q({type:"openDialog"}),A();var Z={multiple:a,types:L};window.showOpenFilePicker(Z).then(function(oe){return o(oe)}).then(function(oe){X(oe,null),q({type:"closeDialog"})}).catch(function(oe){gw(oe)?(j(oe),q({type:"closeDialog"})):yw(oe)?(Y.current=!1,_.current?(_.current.value=null,_.current.click()):I(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):I(oe)});return}_.current&&(q({type:"openDialog"}),A(),_.current.value=null,_.current.click())},[q,A,j,v,X,I,L,a]),ke=w.useCallback(function(Z){!F.current||!F.current.isEqualNode(Z.target)||(Z.key===" "||Z.key==="Enter"||Z.keyCode===32||Z.keyCode===13)&&(Z.preventDefault(),B())},[F,B]),We=w.useCallback(function(){q({type:"focus"})},[]),Xe=w.useCallback(function(){q({type:"blur"})},[]),se=w.useCallback(function(){S||(dw()?setTimeout(B,0):B())},[S,B]),Ae=function(oe){return r?null:oe},Se=function(oe){return x?null:Ae(oe)},Ce=function(oe){return T?null:Ae(oe)},he=function(oe){P&&oe.stopPropagation()},Pe=w.useMemo(function(){return function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},oe=Z.refKey,Fe=oe===void 0?"ref":oe,Ke=Z.role,ft=Z.onKeyDown,ln=Z.onFocus,nt=Z.onBlur,cn=Z.onClick,mi=Z.onDragEnter,lo=Z.onDragOver,sa=Z.onDragLeave,Du=Z.onDrop,Mu=Wi(Z,xw);return Ue(Ue(al({onKeyDown:Se(qt(ft,ke)),onFocus:Se(qt(ln,We)),onBlur:Se(qt(nt,Xe)),onClick:Ae(qt(cn,se)),onDragEnter:Ce(qt(mi,V)),onDragOver:Ce(qt(lo,W)),onDragLeave:Ce(qt(sa,K)),onDrop:Ce(qt(Du,le)),role:typeof Ke=="string"&&Ke!==""?Ke:"presentation"},Fe,F),!r&&!x?{tabIndex:0}:{}),Mu)}},[F,ke,We,Xe,se,V,W,K,le,x,T,r]),tt=w.useCallback(function(Z){Z.stopPropagation()},[]),Tt=w.useMemo(function(){return function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},oe=Z.refKey,Fe=oe===void 0?"ref":oe,Ke=Z.onChange,ft=Z.onClick,ln=Wi(Z,ww),nt=al({accept:D,multiple:a,type:"file",style:{display:"none"},onChange:Ae(qt(Ke,le)),onClick:Ae(qt(ft,tt)),tabIndex:-1},Fe,_);return Ue(Ue({},nt),ln)}},[_,n,a,le,r]);return Ue(Ue({},z),{},{isFocused:C&&!r,getRootProps:Pe,getInputProps:Tt,rootRef:F,inputRef:_,open:Ae(B)})}function Iw(t,e){switch(e.type){case"focus":return Ue(Ue({},t),{},{isFocused:!0});case"blur":return Ue(Ue({},t),{},{isFocused:!1});case"openDialog":return Ue(Ue({},cl),{},{isFileDialogActive:!0});case"closeDialog":return Ue(Ue({},t),{},{isFileDialogActive:!1});case"setDraggedFiles":return Ue(Ue({},t),{},{isDragActive:e.isDragActive,isDragAccept:e.isDragAccept,isDragReject:e.isDragReject});case"setFiles":return Ue(Ue({},t),{},{acceptedFiles:e.acceptedFiles,fileRejections:e.fileRejections});case"reset":return Ue({},cl);default:return t}}function Qd(){}function ep(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(n=ep(t[e]))&&(r&&(r+=" "),r+=n);else for(e in t)t[e]&&(r&&(r+=" "),r+=e);return r}function kw(){for(var t,e,n=0,r="";n<arguments.length;)(t=arguments[n++])&&(e=ep(t))&&(r&&(r+=" "),r+=e);return r}const tp=t=>typeof t=="boolean"?"".concat(t):t===0?"0":t,np=kw,Dw=(t,e)=>n=>{var r;if((e==null?void 0:e.variants)==null)return np(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=e,s=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],f=i==null?void 0:i[c];if(u===null)return null;const d=tp(u)||tp(f);return o[c][d]}),a=n&&Object.entries(n).reduce((c,u)=>{let[f,d]=u;return d===void 0||(c[f]=d),c},{}),l=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:f,className:d,...p}=u;return Object.entries(p).every(h=>{let[m,y]=h;return Array.isArray(y)?y.includes({...i,...a}[m]):{...i,...a}[m]===y})?[...c,f,d]:c},[]);return np(t,s,l,n==null?void 0:n.class,n==null?void 0:n.className)},Ui=w.forwardRef(function({as:e,...n},r){const o=e||"span";return E.jsx(o,{...n,ref:r})}),Mw=Dw("inline-flex gap-1.5 text-main-foreground border-2 border-transparent items-center hover:bg-opacity-80 justify-center align-middle cursor-pointer whitespace-nowrap font-medium transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-50 disabled:text-opacity-60 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring",{variants:{size:{default:"h-10 px-4 py-2",big:"h-12 px-6 py-4",small:"h-10 p-2 text-sm",icon:"p-1"},rounded:{rough:"rounded-sm",default:"rounded-md",squared:"rounded-none",circle:"rounded-full aspect-square"},theme:{raw:"",main:"bg-primary text-primary-foreground",loading:"animate-pulse bg-disabled duration-700 opacity-70",disabled:"bg-disabled duration-700 opacity-70"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),Gi=w.forwardRef(function({className:e,icon:n,loading:r,theme:o,type:i="button",size:s,rounded:a,...l},c){const u=r||l.disabled;return E.jsxs(Ui,{...l,ref:c,type:i,"data-theme":o,disabled:u,as:l.as??"button",onClick:u?void 0:l.onClick,className:zt(Mw({size:s,rounded:a,theme:r?"loading":u?"disabled":o}),e),children:[l.children,n]})}),Rw=t=>E.jsx("ul",{className:"border-main-bg text-main-foreground flex w-full flex-row rounded-md border-2",children:t.buttons.map(e=>E.jsx("li",{className:"flex flex-1",children:E.jsx("button",{...e,type:e.type||"button","data-active":t.active===e.name?"true":"false",className:zt("border-main-bg flex flex-1 items-center gap-1.5 rounded-sm border-r-2 px-4 py-2 last:border-r-0 hover:bg-opacity-80","hover:bg-main-bg hover:text-main cursor-pointer justify-center whitespace-nowrap align-middle font-medium","focus-visible:ring-ring shadow-sm focus-visible:outline-none focus-visible:ring-2 disabled:text-opacity-80","data-[active=true]:bg-main-bg text-body data-[active=true]:text-main transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-50")})},`button-group-${e.name}`))}),Fw={isImage:t=>t.type.includes("image")},Lw=t=>{const[e,n]=w.useState({url:"",type:"",size:""});return w.useEffect(()=>{if(Fw.isImage(t.file)){const r=URL.createObjectURL(t.file);return n({url:r,type:"img",size:vd(t.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:t.file.type,size:vd(t.file.size)})},[t.file]),e.type==="img"?E.jsxs("div",{className:"flex flex-row gap-jade-200 items-center justify-between w-full",children:[E.jsxs("header",{className:"flex flex-row gap-jade-200 items-center",children:[E.jsx("img",{src:e.url,className:"size-jade-500 rounded-jade-xsmall",alt:`Miniatura do arquivo ${t.file.name}`}),E.jsxs("div",{className:"flex flex-col",children:[E.jsx("span",{children:t.file.name}),E.jsx("span",{children:e.size})]})]}),E.jsx(Gi,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=t.onDeleteFile)==null||o.call(t,t.file)},children:E.jsx(xo,{})})]}):E.jsxs("div",{className:"flex flex-row gap-jade-200 items-center justify-between w-full",children:[E.jsxs("header",{className:"flex flex-row gap-4 items-center",children:[E.jsx(y0,{size:48}),E.jsxs("div",{className:"flex flex-col text-left justify-start items-start",children:[E.jsx("span",{children:t.file.name}),E.jsx("span",{children:e.size})]})]}),E.jsx(Gi,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=t.onDeleteFile)==null||o.call(t,t.file)},children:E.jsx(xo,{className:"text-danger"})})]})},Nw=t=>E.jsx("ul",{className:"w-full space-y-jade-200",children:t.files.map(e=>E.jsx(Lw,{onDeleteFile:t.onDeleteFile,file:e},e.name))}),Vw=t=>t.isDragActive?E.jsx("p",{children:"Solte os arquivos selecionados"}):t.files.length>0?E.jsx(Nw,{onDeleteFile:t.onDeleteFile,files:t.files}):E.jsx(w.Fragment,{children:t.idle}),$w=E.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center",children:[E.jsx(x0,{size:64}),E.jsxs("p",{children:["You can drag your files or"," ",E.jsx("button",{className:"text-primary underline",type:"button",children:"drag to here"})]})]}),jw=({idle:t=$w,onDeleteFile:e,onDrop:n,...r})=>{var u;const[o,i]=w.useState([]),s=f=>{n==null||n(f),i(f)},{getRootProps:a,getInputProps:l,isDragActive:c}=Jd({onDrop:s});return E.jsxs("div",{...a(),"data-active":(u=r.files)!=null&&u.length?r.files.length>0:!1,className:"flex text-foreground flex-col items-center justify-center border-2 rounded-lg p-6 border-card-border data-[active=true]:bg-card-background data-[active=true]:border-solid data-[active=false]:border-dashed",children:[E.jsx("input",{...l(r),name:r.name,id:r.name}),E.jsx(Vw,{onDeleteFile:e,isDragActive:c,idle:t,files:r.files??o})]})},Bw=["INPUT","SELECT"],rp=t=>{if(!t)return;Array.from(t.elements).forEach(n=>{Bw.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})},zw=t=>{const e=n=>{var r;n.persist(),n.preventDefault(),(r=t.onSubmit)==null||r.call(t,n)};return E.jsx("form",{...t,onSubmit:e})},Hw=({children:t,...e})=>{const n=w.useId(),[r,o]=w.useState(!1),i=e.checked??r,s=a=>{var u;const c=a.target.dataset.checked!=="true";o(c),(u=e==null?void 0:e.onCheck)==null||u.call(e,c)};return E.jsxs("div",{className:"flex items-center",children:[E.jsx("input",{...e,hidden:!0,type:"checkbox",checked:i,onChange:a=>o(a.target.checked)}),E.jsx("button",{type:"button",role:"switch",onClick:s,"aria-checked":i,"data-checked":i,"aria-labelledby":`${n}-label`,className:"relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent data-[checked=false]:bg-input-switch-bg data-[checked=true]:bg-primary transition-colors ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2",children:E.jsx("span",{"aria-hidden":"true","data-checked":i,className:"data-[checked=false]:bg-disabled data-[checked=true]:bg-input-switch pointer-events-none inline-block size-5 aspect-square data-[checked=false]translate-x-0 data-[checked=true]:translate-x-5 transform rounded-full shadow ring-0 transition ease-in-out"})}),E.jsx("span",{className:"ml-3 text-sm",id:`${n}-label`,children:E.jsx("span",{className:"font-medium text-foreground",children:t})})]})},Ww=t=>E.jsx(Ui,{...t,as:"div",className:zt("rounded-lg bg-card-background p-8 border-card-border border shadow",t.className)}),Po=t=>{const[e,n]=w.useState(t.open),r=w.useRef(null),o=w.useMemo(()=>[Ea(10),hf({fallbackAxisSideDirection:"end"}),pf(),mf({padding:5,element:r})],[t.arrow]),{refs:i,floatingStyles:s,context:a}=Da({open:e,transform:!0,whileElementsMounted:Ta,middleware:o,onOpenChange:(h,m)=>{var v;const y=m==null?void 0:m.relatedTarget;y&&y.dataset.floating==="true"&&!h||(n(h),(v=t.onChange)==null||v.call(t,h))}}),l=e0(a),c=ka(a),u=La(a),{getReferenceProps:f,getFloatingProps:d}=Ra([l,c,u]),p=mo();return E.jsxs(w.Fragment,{children:[E.jsx("button",{ref:i.setReference,...f(),children:t.trigger}),e&&E.jsx(Ff,{returnFocus:!0,visuallyHiddenDismiss:!0,restoreFocus:!0,context:a,modal:!1,children:E.jsxs("div",{className:"bg-floating-background isolate z-floating border shadow-2xl p-6 border-floating-border rounded-lg",ref:i.setFloating,style:s,"aria-labelledby":p,...d(),children:[E.jsx(wf,{ref:r,context:a,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),E.jsx("header",{className:"mb-2",children:E.jsx("h3",{className:"leading-snug font-medium text-2xl tracking-tight text-left",children:t.title})}),t.children]})})]})},Uw=({children:t,as:e,title:n,...r})=>{const[o,i]=w.useState(!1),s=w.useRef(null),a=e||"div",{refs:l,floatingStyles:c,context:u}=Da({open:o,onOpenChange:i,whileElementsMounted:Ta,transform:!0,middleware:[Ea(5),hf({fallbackAxisSideDirection:"start"}),pf(),mf({element:s,padding:5})]}),f=Hb(u,{move:!1}),d=o0(u),p=ka(u),h=La(u,{role:"tooltip"}),{getReferenceProps:m,getFloatingProps:y}=Ra([f,d,p,h]);return E.jsxs(w.Fragment,{children:[E.jsx(a,{ref:l.setReference,...m(r),children:n}),E.jsx(kf,{children:o&&E.jsxs(Ui,{ref:l.setFloating,style:c,...y(),className:"bg-tooltip-background text-foreground border border-tooltip-border p-4 rounded-lg",children:[E.jsx(wf,{ref:s,context:u,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),t]})})]})},Ki=w.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),Zi=w.createContext({}),qi=w.createContext(null),ul=typeof document<"u",Yi=ul?w.useLayoutEffect:w.useEffect,op=w.createContext({strict:!1}),fl=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ip="data-"+fl("framerAppearId"),Gw={skipAnimations:!1,useManualTiming:!1};class sp{constructor(){this.order=[],this.scheduled=new Set}add(e){if(!this.scheduled.has(e))return this.scheduled.add(e),this.order.push(e),!0}remove(e){const n=this.order.indexOf(e);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}function Kw(t){let e=new sp,n=new sp,r=0,o=!1,i=!1;const s=new WeakSet,a={schedule:(l,c=!1,u=!1)=>{const f=u&&o,d=f?e:n;return c&&s.add(l),d.add(l)&&f&&o&&(r=e.order.length),l},cancel:l=>{n.remove(l),s.delete(l)},process:l=>{if(o){i=!0;return}if(o=!0,[e,n]=[n,e],n.clear(),r=e.order.length,r)for(let c=0;c<r;c++){const u=e.order[c];s.has(u)&&(a.schedule(u),t()),u(l)}o=!1,i&&(i=!1,a.process(l))}};return a}const Xi=["read","resolveKeyframes","update","preRender","render","postRender"],Zw=40;function ap(t,e){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=Xi.reduce((f,d)=>(f[d]=Kw(()=>n=!0),f),{}),s=f=>{i[f].process(o)},a=()=>{const f=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(f-o.timestamp,Zw),1),o.timestamp=f,o.isProcessing=!0,Xi.forEach(s),o.isProcessing=!1,n&&e&&(r=!1,t(a))},l=()=>{n=!0,r=!0,o.isProcessing||t(a)};return{schedule:Xi.reduce((f,d)=>{const p=i[d];return f[d]=(h,m=!1,y=!1)=>(n||l(),p.schedule(h,m,y)),f},{}),cancel:f=>Xi.forEach(d=>i[d].cancel(f)),state:o,steps:i}}const{schedule:dl,cancel:rk}=ap(queueMicrotask,!1);function Rr(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}const lp=w.createContext({});let cp=!1;function qw(t,e,n,r,o){const{visualElement:i}=w.useContext(Zi),s=w.useContext(op),a=w.useContext(qi),l=w.useContext(Ki).reducedMotion,c=w.useRef();r=r||s.renderer,!c.current&&r&&(c.current=r(t,{visualState:e,parent:i,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,f=w.useContext(lp);u&&!u.projection&&o&&(u.type==="html"||u.type==="svg")&&Xw(c.current,n,o,f),w.useInsertionEffect(()=>{u&&u.update(n,a)});const d=w.useRef(!!(n[ip]&&!window.HandoffComplete));return Yi(()=>{u&&(u.updateFeatures(),dl.render(u.render),d.current&&u.animationState&&u.animationState.animateChanges())}),w.useEffect(()=>{u&&(!d.current&&u.animationState&&u.animationState.animateChanges(),d.current&&(d.current=!1,cp||(cp=!0,queueMicrotask(Yw))))}),u}function Yw(){window.HandoffComplete=!0}function Xw(t,e,n,r){const{layoutId:o,layout:i,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:up(t.parent)),t.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!s||a&&Rr(a),visualElement:t,scheduleRender:()=>t.scheduleRender(),animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function up(t){if(t)return t.options.allowProjection!==!1?t.projection:up(t.parent)}function Jw(t,e,n){return w.useCallback(r=>{r&&t.mount&&t.mount(r),e&&(r?e.mount(r):e.unmount()),n&&(typeof n=="function"?n(r):Rr(n)&&(n.current=r))},[e])}function Oo(t){return typeof t=="string"||Array.isArray(t)}function Ji(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const pl=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],hl=["initial",...pl];function Qi(t){return Ji(t.animate)||hl.some(e=>Oo(t[e]))}function fp(t){return!!(Qi(t)||t.variants)}function Qw(t,e){if(Qi(t)){const{initial:n,animate:r}=t;return{initial:n===!1||Oo(n)?n:void 0,animate:Oo(r)?r:void 0}}return t.inherit!==!1?e:{}}function eS(t){const{initial:e,animate:n}=Qw(t,w.useContext(Zi));return w.useMemo(()=>({initial:e,animate:n}),[dp(e),dp(n)])}function dp(t){return Array.isArray(t)?t.join(" "):t}const pp={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Fr={};for(const t in pp)Fr[t]={isEnabled:e=>pp[t].some(n=>!!e[n])};function tS(t){for(const e in t)Fr[e]={...Fr[e],...t[e]}}const Io=w.createContext({}),nS=Symbol.for("motionComponentSymbol"),lt=t=>t;let Lr=lt,Ht=lt;process.env.NODE_ENV!=="production"&&(Lr=(t,e)=>{!t&&typeof console<"u"&&console.warn(e)},Ht=(t,e)=>{if(!t)throw new Error(e)});function rS({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:r,Component:o}){t&&tS(t);function i(a,l){let c;const u={...w.useContext(Ki),...a,layoutId:oS(a)},{isStatic:f}=u,d=eS(a),p=r(a,f);if(!f&&ul){iS(u,t);const h=sS(u);c=h.MeasureLayout,d.visualElement=qw(o,p,u,e,h.ProjectionNode)}return E.jsxs(Zi.Provider,{value:d,children:[c&&d.visualElement?E.jsx(c,{visualElement:d.visualElement,...u}):null,n(o,a,Jw(p,d.visualElement,l),p,f,d.visualElement)]})}const s=w.forwardRef(i);return s[nS]=o,s}function oS({layoutId:t}){const e=w.useContext(Io).id;return e&&t!==void 0?e+"-"+t:t}function iS(t,e){const n=w.useContext(op).strict;if(process.env.NODE_ENV!=="production"&&e&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?Lr(!1,r):Ht(!1,r)}}function sS(t){const{drag:e,layout:n}=Fr;if(!e&&!n)return{};const r={...e,...n};return{MeasureLayout:e!=null&&e.isEnabled(t)||n!=null&&n.isEnabled(t)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function aS(t){function e(r,o={}){return rS(t(r,o))}if(typeof Proxy>"u")return e;const n=new Map;return new Proxy(e,{get:(r,o)=>(n.has(o)||n.set(o,e(o)),n.get(o))})}const lS=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function ml(t){return typeof t!="string"||t.includes("-")?!1:!!(lS.indexOf(t)>-1||/[A-Z]/u.test(t))}const es={};function cS(t){Object.assign(es,t)}const ko=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],tr=new Set(ko);function hp(t,{layout:e,layoutId:n}){return tr.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!es[t]||t==="opacity")}const ct=t=>!!(t&&t.getVelocity),uS={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},fS=ko.length;function dS(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},r,o){let i="";for(let s=0;s<fS;s++){const a=ko[s];if(t[a]!==void 0){const l=uS[a]||a;i+=`${l}(${t[a]}) `}}return e&&!t.z&&(i+="translateZ(0)"),i=i.trim(),o?i=o(t,r?"":i):n&&r&&(i="none"),i}const mp=t=>e=>typeof e=="string"&&e.startsWith(t),gp=mp("--"),pS=mp("var(--"),gl=t=>pS(t)?hS.test(t.split("/*")[0].trim()):!1,hS=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,mS=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Dn=(t,e,n)=>n>e?e:n<t?t:n,Nr={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Do={...Nr,transform:t=>Dn(0,1,t)},ts={...Nr,default:1},Mo=t=>Math.round(t*1e5)/1e5,yl=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,gS=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,yS=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function Ro(t){return typeof t=="string"}function vS(t){return t==null}const Fo=t=>({test:e=>Ro(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Mn=Fo("deg"),Yt=Fo("%"),ce=Fo("px"),bS=Fo("vh"),xS=Fo("vw"),yp={...Yt,parse:t=>Yt.parse(t)/100,transform:t=>Yt.transform(t*100)},vp={...Nr,transform:Math.round},bp={borderWidth:ce,borderTopWidth:ce,borderRightWidth:ce,borderBottomWidth:ce,borderLeftWidth:ce,borderRadius:ce,radius:ce,borderTopLeftRadius:ce,borderTopRightRadius:ce,borderBottomRightRadius:ce,borderBottomLeftRadius:ce,width:ce,maxWidth:ce,height:ce,maxHeight:ce,size:ce,top:ce,right:ce,bottom:ce,left:ce,padding:ce,paddingTop:ce,paddingRight:ce,paddingBottom:ce,paddingLeft:ce,margin:ce,marginTop:ce,marginRight:ce,marginBottom:ce,marginLeft:ce,rotate:Mn,rotateX:Mn,rotateY:Mn,rotateZ:Mn,scale:ts,scaleX:ts,scaleY:ts,scaleZ:ts,skew:Mn,skewX:Mn,skewY:Mn,distance:ce,translateX:ce,translateY:ce,translateZ:ce,x:ce,y:ce,z:ce,perspective:ce,transformPerspective:ce,opacity:Do,originX:yp,originY:yp,originZ:ce,zIndex:vp,backgroundPositionX:ce,backgroundPositionY:ce,fillOpacity:Do,strokeOpacity:Do,numOctaves:vp};function vl(t,e,n,r){const{style:o,vars:i,transform:s,transformOrigin:a}=t;let l=!1,c=!1,u=!0;for(const f in e){const d=e[f];if(gp(f)){i[f]=d;continue}const p=bp[f],h=mS(d,p);if(tr.has(f)){if(l=!0,s[f]=h,!u)continue;d!==(p.default||0)&&(u=!1)}else f.startsWith("origin")?(c=!0,a[f]=h):o[f]=h}if(e.transform||(l||r?o.transform=dS(t.transform,n,u,r):o.transform&&(o.transform="none")),c){const{originX:f="50%",originY:d="50%",originZ:p=0}=a;o.transformOrigin=`${f} ${d} ${p}`}}const bl=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function xp(t,e,n){for(const r in e)!ct(e[r])&&!hp(r,n)&&(t[r]=e[r])}function wS({transformTemplate:t},e,n){return w.useMemo(()=>{const r=bl();return vl(r,e,{enableHardwareAcceleration:!n},t),Object.assign({},r.vars,r.style)},[e])}function SS(t,e,n){const r=t.style||{},o={};return xp(o,r,t),Object.assign(o,wS(t,e,n)),o}function TS(t,e,n){const r={},o=SS(t,e,n);return t.drag&&t.dragListener!==!1&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(r.tabIndex=0),r.style=o,r}const ES=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function ns(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||ES.has(t)}let wp=t=>!ns(t);function CS(t){t&&(wp=e=>e.startsWith("on")?!ns(e):t(e))}try{CS(require("@emotion/is-prop-valid").default)}catch{}function AS(t,e,n){const r={};for(const o in t)o==="values"&&typeof t.values=="object"||(wp(o)||n===!0&&ns(o)||!e&&!ns(o)||t.draggable&&o.startsWith("onDrag"))&&(r[o]=t[o]);return r}function Sp(t,e,n){return typeof t=="string"?t:ce.transform(e+n*t)}function _S(t,e,n){const r=Sp(e,t.x,t.width),o=Sp(n,t.y,t.height);return`${r} ${o}`}const PS={offset:"stroke-dashoffset",array:"stroke-dasharray"},OS={offset:"strokeDashoffset",array:"strokeDasharray"};function IS(t,e,n=1,r=0,o=!0){t.pathLength=1;const i=o?PS:OS;t[i.offset]=ce.transform(-r);const s=ce.transform(e),a=ce.transform(n);t[i.array]=`${s} ${a}`}function xl(t,{attrX:e,attrY:n,attrScale:r,originX:o,originY:i,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...c},u,f,d){if(vl(t,c,u,d),f){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:p,style:h,dimensions:m}=t;p.transform&&(m&&(h.transform=p.transform),delete p.transform),m&&(o!==void 0||i!==void 0||h.transform)&&(h.transformOrigin=_S(m,o!==void 0?o:.5,i!==void 0?i:.5)),e!==void 0&&(p.x=e),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),s!==void 0&&IS(p,s,a,l,!1)}const Tp=()=>({...bl(),attrs:{}}),wl=t=>typeof t=="string"&&t.toLowerCase()==="svg";function kS(t,e,n,r){const o=w.useMemo(()=>{const i=Tp();return xl(i,e,{enableHardwareAcceleration:!1},wl(r),t.transformTemplate),{...i.attrs,style:{...i.style}}},[e]);if(t.style){const i={};xp(i,t.style,t),o.style={...i,...o.style}}return o}function DS(t=!1){return(n,r,o,{latestValues:i},s)=>{const l=(ml(n)?kS:TS)(r,i,s,n),c=AS(r,typeof n=="string",t),u=n!==w.Fragment?{...c,...l,ref:o}:{},{children:f}=r,d=w.useMemo(()=>ct(f)?f.get():f,[f]);return w.createElement(n,{...u,children:d})}}function Ep(t,{style:e,vars:n},r,o){Object.assign(t.style,e,o&&o.getProjectionStyles(r));for(const i in n)t.style.setProperty(i,n[i])}const Cp=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Ap(t,e,n,r){Ep(t,e,void 0,r);for(const o in e.attrs)t.setAttribute(Cp.has(o)?o:fl(o),e.attrs[o])}function Sl(t,e,n){var r;const{style:o}=t,i={};for(const s in o)(ct(o[s])||e.style&&ct(e.style[s])||hp(s,t)||((r=n==null?void 0:n.getValue(s))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(i[s]=o[s]);return i}function _p(t,e,n){const r=Sl(t,e,n);for(const o in t)if(ct(t[o])||ct(e[o])){const i=ko.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=t[o]}return r}function Pp(t){const e=[{},{}];return t==null||t.values.forEach((n,r)=>{e[0][r]=n.get(),e[1][r]=n.getVelocity()}),e}function Tl(t,e,n,r){if(typeof e=="function"){const[o,i]=Pp(r);e=e(n!==void 0?n:t.custom,o,i)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[o,i]=Pp(r);e=e(n!==void 0?n:t.custom,o,i)}return e}function nr(t){const e=w.useRef(null);return e.current===null&&(e.current=t()),e.current}const El=t=>Array.isArray(t),MS=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),RS=t=>El(t)?t[t.length-1]||0:t;function rs(t){const e=ct(t)?t.get():t;return MS(e)?e.toValue():e}function FS({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},r,o,i){const s={latestValues:LS(r,o,i,t),renderState:e()};return n&&(s.mount=a=>n(r,a,s)),s}const Op=t=>(e,n)=>{const r=w.useContext(Zi),o=w.useContext(qi),i=()=>FS(t,e,r,o);return n?i():nr(i)};function LS(t,e,n,r){const o={},i=r(t,{});for(const d in i)o[d]=rs(i[d]);let{initial:s,animate:a}=t;const l=Qi(t),c=fp(t);e&&c&&!l&&t.inherit!==!1&&(s===void 0&&(s=e.initial),a===void 0&&(a=e.animate));let u=n?n.initial===!1:!1;u=u||s===!1;const f=u?a:s;return f&&typeof f!="boolean"&&!Ji(f)&&(Array.isArray(f)?f:[f]).forEach(p=>{const h=Tl(t,p);if(!h)return;const{transitionEnd:m,transition:y,...v}=h;for(const b in v){let g=v[b];if(Array.isArray(g)){const S=u?g.length-1:0;g=g[S]}g!==null&&(o[b]=g)}for(const b in m)o[b]=m[b]}),o}const{schedule:_e,cancel:Xt,state:ut,steps:Cl}=ap(typeof requestAnimationFrame<"u"?requestAnimationFrame:lt,!0),NS={useVisualState:Op({scrapeMotionValuesFromProps:_p,createRenderState:Tp,onMount:(t,e,{renderState:n,latestValues:r})=>{_e.read(()=>{try{n.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),_e.render(()=>{xl(n,r,{enableHardwareAcceleration:!1},wl(e.tagName),t.transformTemplate),Ap(e,n)})}})},VS={useVisualState:Op({scrapeMotionValuesFromProps:Sl,createRenderState:bl})};function $S(t,{forwardMotionProps:e=!1},n,r){return{...ml(t)?NS:VS,preloadedFeatures:n,useRender:DS(e),createVisualElement:r,Component:t}}function hn(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n)}const Ip=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function os(t,e="page"){return{point:{x:t[`${e}X`],y:t[`${e}Y`]}}}const jS=t=>e=>Ip(e)&&t(e,os(e));function mn(t,e,n,r){return hn(t,e,jS(n),r)}const BS=(t,e)=>n=>e(t(n)),gn=(...t)=>t.reduce(BS);function kp(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}const Dp=kp("dragHorizontal"),Mp=kp("dragVertical");function Rp(t){let e=!1;if(t==="y")e=Mp();else if(t==="x")e=Dp();else{const n=Dp(),r=Mp();n&&r?e=()=>{n(),r()}:(n&&n(),r&&r())}return e}function Fp(){const t=Rp(!0);return t?(t(),!1):!0}class Rn{constructor(e){this.isMounted=!1,this.node=e}update(){}}function Lp(t,e){const n=e?"pointerenter":"pointerleave",r=e?"onHoverStart":"onHoverEnd",o=(i,s)=>{if(i.pointerType==="touch"||Fp())return;const a=t.getProps();t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",e);const l=a[r];l&&_e.postRender(()=>l(i,s))};return mn(t.current,n,o,{passive:!t.getProps()[r]})}class zS extends Rn{mount(){this.unmount=gn(Lp(this.node,!0),Lp(this.node,!1))}unmount(){}}class HS extends Rn{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=gn(hn(this.node.current,"focus",()=>this.onFocus()),hn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Np=(t,e)=>e?t===e?!0:Np(t,e.parentElement):!1;function Al(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,os(n))}class WS extends Rn{constructor(){super(...arguments),this.removeStartListeners=lt,this.removeEndListeners=lt,this.removeAccessibleListeners=lt,this.startPointerPress=(e,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),i=mn(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:u,globalTapTarget:f}=this.node.getProps(),d=!f&&!Np(this.node.current,a.target)?u:c;d&&_e.update(()=>d(a,l))},{passive:!(r.onTap||r.onPointerUp)}),s=mn(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=gn(i,s),this.startPress(e,n)},this.startAccessiblePress=()=>{const e=i=>{if(i.key!=="Enter"||this.isPressing)return;const s=a=>{a.key!=="Enter"||!this.checkPressEnd()||Al("up",(l,c)=>{const{onTap:u}=this.node.getProps();u&&_e.postRender(()=>u(l,c))})};this.removeEndListeners(),this.removeEndListeners=hn(this.node.current,"keyup",s),Al("down",(a,l)=>{this.startPress(a,l)})},n=hn(this.node.current,"keydown",e),r=()=>{this.isPressing&&Al("cancel",(i,s)=>this.cancelPress(i,s))},o=hn(this.node.current,"blur",r);this.removeAccessibleListeners=gn(n,o)}}startPress(e,n){this.isPressing=!0;const{onTapStart:r,whileTap:o}=this.node.getProps();o&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&_e.postRender(()=>r(e,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Fp()}cancelPress(e,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&_e.postRender(()=>r(e,n))}mount(){const e=this.node.getProps(),n=mn(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),r=hn(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=gn(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const _l=new WeakMap,Pl=new WeakMap,US=t=>{const e=_l.get(t.target);e&&e(t)},GS=t=>{t.forEach(US)};function KS({root:t,...e}){const n=t||document;Pl.has(n)||Pl.set(n,{});const r=Pl.get(n),o=JSON.stringify(e);return r[o]||(r[o]=new IntersectionObserver(GS,{root:t,...e})),r[o]}function ZS(t,e,n){const r=KS(e);return _l.set(t,n),r.observe(t),()=>{_l.delete(t),r.unobserve(t)}}const qS={some:0,all:1};class YS extends Rn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=e,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:qS[o]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:f}=this.node.getProps(),d=c?u:f;d&&d(l)};return ZS(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(XS(e,n))&&this.startObserver()}unmount(){}}function XS({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const JS={inView:{Feature:YS},tap:{Feature:WS},focus:{Feature:HS},hover:{Feature:zS}};function Vp(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}function is(t,e,n){const r=t.getProps();return Tl(r,e,n!==void 0?n:r.custom,t)}const yn=t=>t*1e3,vn=t=>t/1e3,QS={type:"spring",stiffness:500,damping:25,restSpeed:10},eT=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),tT={type:"keyframes",duration:.8},nT={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},rT=(t,{keyframes:e})=>e.length>2?tT:tr.has(t)?t.startsWith("scale")?eT(e[1]):QS:nT;function oT({when:t,delay:e,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:s,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}function Ol(t,e){return t[e]||t.default||t}const iT=t=>t!==null;function ss(t,{repeat:e,repeatType:n="loop"},r){const o=t.filter(iT),i=e&&n!=="loop"&&e%2===1?0:o.length-1;return!i||r===void 0?o[i]:r}let as;function sT(){as=void 0}const Fn={now:()=>(as===void 0&&Fn.set(ut.isProcessing||Gw.useManualTiming?ut.timestamp:performance.now()),as),set:t=>{as=t,queueMicrotask(sT)}},$p=t=>/^0[^.\s]+$/u.test(t);function aT(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||$p(t):!0}const jp=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),lT=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function cT(t){const e=lT.exec(t);if(!e)return[,];const[,n,r,o]=e;return[`--${n??r}`,o]}const uT=4;function Bp(t,e,n=1){Ht(n<=uT,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);const[r,o]=cT(t);if(!r)return;const i=window.getComputedStyle(e).getPropertyValue(r);if(i){const s=i.trim();return jp(s)?parseFloat(s):s}return gl(o)?Bp(o,e,n+1):o}const fT=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),zp=t=>t===Nr||t===ce,Hp=(t,e)=>parseFloat(t.split(", ")[e]),Wp=(t,e)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return Hp(o[1],e);{const i=r.match(/^matrix\((.+)\)$/u);return i?Hp(i[1],t):0}},dT=new Set(["x","y","z"]),pT=ko.filter(t=>!dT.has(t));function hT(t){const e=[];return pT.forEach(n=>{const r=t.getValue(n);r!==void 0&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e}const Vr={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:Wp(4,13),y:Wp(5,14)};Vr.translateX=Vr.x,Vr.translateY=Vr.y;const Up=t=>e=>e.test(t),Gp=[Nr,ce,Yt,Mn,xS,bS,{test:t=>t==="auto",parse:t=>t}],Kp=t=>Gp.find(Up(t)),rr=new Set;let Il=!1,kl=!1;function Zp(){if(kl){const t=Array.from(rr).filter(r=>r.needsMeasurement),e=new Set(t.map(r=>r.element)),n=new Map;e.forEach(r=>{const o=hT(r);o.length&&(n.set(r,o),r.render())}),t.forEach(r=>r.measureInitialState()),e.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,s])=>{var a;(a=r.getValue(i))===null||a===void 0||a.set(s)})}),t.forEach(r=>r.measureEndState()),t.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}kl=!1,Il=!1,rr.forEach(t=>t.complete()),rr.clear()}function qp(){rr.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(kl=!0)})}function mT(){qp(),Zp()}class Dl{constructor(e,n,r,o,i,s=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=s}scheduleResolve(){this.isScheduled=!0,this.isAsync?(rr.add(this),Il||(Il=!0,_e.read(qp),_e.resolveKeyframes(Zp))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:r,motionValue:o}=this;for(let i=0;i<e.length;i++)if(e[i]===null)if(i===0){const s=o==null?void 0:o.get(),a=e[e.length-1];if(s!==void 0)e[0]=s;else if(r&&n){const l=r.readValue(n,a);l!=null&&(e[0]=l)}e[0]===void 0&&(e[0]=a),o&&s===void 0&&o.set(e[0])}else e[i]=e[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),rr.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,rr.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Ml=(t,e)=>n=>!!(Ro(n)&&yS.test(n)&&n.startsWith(t)||e&&!vS(n)&&Object.prototype.hasOwnProperty.call(n,e)),Yp=(t,e,n)=>r=>{if(!Ro(r))return r;const[o,i,s,a]=r.match(yl);return{[t]:parseFloat(o),[e]:parseFloat(i),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},gT=t=>Dn(0,255,t),Rl={...Nr,transform:t=>Math.round(gT(t))},or={test:Ml("rgb","red"),parse:Yp("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+Rl.transform(t)+", "+Rl.transform(e)+", "+Rl.transform(n)+", "+Mo(Do.transform(r))+")"};function yT(t){let e="",n="",r="",o="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),r=t.substring(5,7),o=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),r=t.substring(3,4),o=t.substring(4,5),e+=e,n+=n,r+=r,o+=o),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const Fl={test:Ml("#"),parse:yT,transform:or.transform},$r={test:Ml("hsl","hue"),parse:Yp("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+Yt.transform(Mo(e))+", "+Yt.transform(Mo(n))+", "+Mo(Do.transform(r))+")"},ht={test:t=>or.test(t)||Fl.test(t)||$r.test(t),parse:t=>or.test(t)?or.parse(t):$r.test(t)?$r.parse(t):Fl.parse(t),transform:t=>Ro(t)?t:t.hasOwnProperty("red")?or.transform(t):$r.transform(t)};function vT(t){var e,n;return isNaN(t)&&Ro(t)&&(((e=t.match(yl))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(gS))===null||n===void 0?void 0:n.length)||0)>0}const Xp="number",Jp="color",bT="var",xT="var(",Qp="${}",wT=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Lo(t){const e=t.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const a=e.replace(wT,l=>(ht.test(l)?(r.color.push(i),o.push(Jp),n.push(ht.parse(l))):l.startsWith(xT)?(r.var.push(i),o.push(bT),n.push(l)):(r.number.push(i),o.push(Xp),n.push(parseFloat(l))),++i,Qp)).split(Qp);return{values:n,split:a,indexes:r,types:o}}function eh(t){return Lo(t).values}function th(t){const{split:e,types:n}=Lo(t),r=e.length;return o=>{let i="";for(let s=0;s<r;s++)if(i+=e[s],o[s]!==void 0){const a=n[s];a===Xp?i+=Mo(o[s]):a===Jp?i+=ht.transform(o[s]):i+=o[s]}return i}}const ST=t=>typeof t=="number"?0:t;function TT(t){const e=eh(t);return th(t)(e.map(ST))}const Ln={test:vT,parse:eh,createTransformer:th,getAnimatableNone:TT},ET=new Set(["brightness","contrast","saturate","opacity"]);function CT(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[r]=n.match(yl)||[];if(!r)return t;const o=n.replace(r,"");let i=ET.has(e)?1:0;return r!==n&&(i*=100),e+"("+i+o+")"}const AT=/\b([a-z-]*)\(.*?\)/gu,Ll={...Ln,getAnimatableNone:t=>{const e=t.match(AT);return e?e.map(CT).join(" "):t}},_T={...bp,color:ht,backgroundColor:ht,outlineColor:ht,fill:ht,stroke:ht,borderColor:ht,borderTopColor:ht,borderRightColor:ht,borderBottomColor:ht,borderLeftColor:ht,filter:Ll,WebkitFilter:Ll},Nl=t=>_T[t];function nh(t,e){let n=Nl(t);return n!==Ll&&(n=Ln),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const PT=new Set(["auto","none","0"]);function OT(t,e,n){let r=0,o;for(;r<t.length&&!o;){const i=t[r];typeof i=="string"&&!PT.has(i)&&Lo(i).values.length&&(o=t[r]),r++}if(o&&n)for(const i of e)t[i]=nh(n,o)}class rh extends Dl{constructor(e,n,r,o){super(e,n,r,o,o==null?void 0:o.owner,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:r}=this;if(!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let c=e[l];if(typeof c=="string"&&(c=c.trim(),gl(c))){const u=Bp(c,n.current);u!==void 0&&(e[l]=u),l===e.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!fT.has(r)||e.length!==2)return;const[o,i]=e,s=Kp(o),a=Kp(i);if(s!==a)if(zp(s)&&zp(a))for(let l=0;l<e.length;l++){const c=e[l];typeof c=="string"&&(e[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,r=[];for(let o=0;o<e.length;o++)aT(e[o])&&r.push(o);r.length&&OT(e,r,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:r}=this;if(!e.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Vr[r](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&e.getValue(r,o).jump(o,!1)}measureEndState(){var e;const{element:n,name:r,unresolvedKeyframes:o}=this;if(!n.current)return;const i=n.getValue(r);i&&i.jump(this.measuredOrigin,!1);const s=o.length-1,a=o[s];o[s]=Vr[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((e=this.removedTransforms)===null||e===void 0)&&e.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function oh(t){let e;return()=>(e===void 0&&(e=t()),e)}const ih=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Ln.test(t)||t==="0")&&!t.startsWith("url("));function IT(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function kT(t,e,n,r){const o=t[0];if(o===null)return!1;if(e==="display"||e==="visibility")return!0;const i=t[t.length-1],s=ih(o,e),a=ih(i,e);return Lr(s===a,`You are trying to animate ${e} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!s||!a?!1:IT(t)||n==="spring"&&r}class sh{constructor({autoplay:e=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:s="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.options={autoplay:e,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:s,...a},this.updateFinishedPromise()}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&mT(),this._resolved}onKeyframesResolved(e,n){this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:i,delay:s,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!kT(e,r,o,i))if(s)this.options.duration=0;else{l==null||l(ss(e,this.options,n)),a==null||a(),this.resolveFinishedPromise();return}const u=this.initPlayback(e,n);u!==!1&&(this._resolved={keyframes:e,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(e,n){return this.currentFinishedPromise.then(e,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}function ah(t,e){return e?t*(1e3/e):0}const DT=5;function lh(t,e,n){const r=Math.max(e-DT,0);return ah(n-t(r),e-r)}const Vl=.001,MT=.01,ch=10,RT=.05,FT=1;function LT({duration:t=800,bounce:e=.25,velocity:n=0,mass:r=1}){let o,i;Lr(t<=yn(ch),"Spring duration must be 10 seconds or less");let s=1-e;s=Dn(RT,FT,s),t=Dn(MT,ch,vn(t)),s<1?(o=c=>{const u=c*s,f=u*t,d=u-n,p=$l(c,s),h=Math.exp(-f);return Vl-d/p*h},i=c=>{const f=c*s*t,d=f*n+n,p=Math.pow(s,2)*Math.pow(c,2)*t,h=Math.exp(-f),m=$l(Math.pow(c,2),s);return(-o(c)+Vl>0?-1:1)*((d-p)*h)/m}):(o=c=>{const u=Math.exp(-c*t),f=(c-n)*t+1;return-Vl+u*f},i=c=>{const u=Math.exp(-c*t),f=(n-c)*(t*t);return u*f});const a=5/t,l=VT(o,i,a);if(t=yn(t),isNaN(l))return{stiffness:100,damping:10,duration:t};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:s*2*Math.sqrt(r*c),duration:t}}}const NT=12;function VT(t,e,n){let r=n;for(let o=1;o<NT;o++)r=r-t(r)/e(r);return r}function $l(t,e){return t*Math.sqrt(1-e*e)}const $T=["duration","bounce"],jT=["stiffness","damping","mass"];function uh(t,e){return e.some(n=>t[n]!==void 0)}function BT(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!uh(t,jT)&&uh(t,$T)){const n=LT(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}function fh({keyframes:t,restDelta:e,restSpeed:n,...r}){const o=t[0],i=t[t.length-1],s={done:!1,value:o},{stiffness:a,damping:l,mass:c,duration:u,velocity:f,isResolvedFromDuration:d}=BT({...r,velocity:-vn(r.velocity||0)}),p=f||0,h=l/(2*Math.sqrt(a*c)),m=i-o,y=vn(Math.sqrt(a/c)),v=Math.abs(m)<5;n||(n=v?.01:2),e||(e=v?.005:.5);let b;if(h<1){const g=$l(y,h);b=S=>{const x=Math.exp(-h*y*S);return i-x*((p+h*y*m)/g*Math.sin(g*S)+m*Math.cos(g*S))}}else if(h===1)b=g=>i-Math.exp(-y*g)*(m+(p+y*m)*g);else{const g=y*Math.sqrt(h*h-1);b=S=>{const x=Math.exp(-h*y*S),T=Math.min(g*S,300);return i-x*((p+h*y*m)*Math.sinh(T)+g*m*Math.cosh(T))/g}}return{calculatedDuration:d&&u||null,next:g=>{const S=b(g);if(d)s.done=g>=u;else{let x=p;g!==0&&(h<1?x=lh(b,g,S):x=0);const T=Math.abs(x)<=n,P=Math.abs(i-S)<=e;s.done=T&&P}return s.value=s.done?i:S,s}}}function dh({keyframes:t,velocity:e=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:s,min:a,max:l,restDelta:c=.5,restSpeed:u}){const f=t[0],d={done:!1,value:f},p=O=>a!==void 0&&O<a||l!==void 0&&O>l,h=O=>a===void 0?l:l===void 0||Math.abs(a-O)<Math.abs(l-O)?a:l;let m=n*e;const y=f+m,v=s===void 0?y:s(y);v!==y&&(m=v-f);const b=O=>-m*Math.exp(-O/r),g=O=>v+b(O),S=O=>{const k=b(O),D=g(O);d.done=Math.abs(k)<=c,d.value=d.done?v:D};let x,T;const P=O=>{p(d.value)&&(x=O,T=fh({keyframes:[d.value,h(d.value)],velocity:lh(g,O,d.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return P(0),{calculatedDuration:null,next:O=>{let k=!1;return!T&&x===void 0&&(k=!0,S(O),P(O)),x!==void 0&&O>=x?T.next(O-x):(!k&&S(O),d)}}}const ph=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,zT=1e-7,HT=12;function WT(t,e,n,r,o){let i,s,a=0;do s=e+(n-e)/2,i=ph(s,r,o)-t,i>0?n=s:e=s;while(Math.abs(i)>zT&&++a<HT);return s}function No(t,e,n,r){if(t===e&&n===r)return lt;const o=i=>WT(i,0,1,t,n);return i=>i===0||i===1?i:ph(o(i),e,r)}const UT=No(.42,0,1,1),GT=No(0,0,.58,1),hh=No(.42,0,.58,1),KT=t=>Array.isArray(t)&&typeof t[0]!="number",mh=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,gh=t=>e=>1-t(1-e),jl=t=>1-Math.sin(Math.acos(t)),yh=gh(jl),ZT=mh(jl),vh=No(.33,1.53,.69,.99),Bl=gh(vh),qT=mh(Bl),bh={linear:lt,easeIn:UT,easeInOut:hh,easeOut:GT,circIn:jl,circInOut:ZT,circOut:yh,backIn:Bl,backInOut:qT,backOut:vh,anticipate:t=>(t*=2)<1?.5*Bl(t):.5*(2-Math.pow(2,-10*(t-1)))},xh=t=>{if(Array.isArray(t)){Ht(t.length===4,"Cubic bezier arrays must contain four numerical values.");const[e,n,r,o]=t;return No(e,n,r,o)}else if(typeof t=="string")return Ht(bh[t]!==void 0,`Invalid easing type '${t}'`),bh[t];return t},Vo=(t,e,n)=>{const r=e-t;return r===0?1:(n-t)/r},Be=(t,e,n)=>t+(e-t)*n;function zl(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function YT({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,e/=100,n/=100;let o=0,i=0,s=0;if(!e)o=i=s=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;o=zl(l,a,t+1/3),i=zl(l,a,t),s=zl(l,a,t-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:r}}function ls(t,e){return n=>n>0?e:t}const Hl=(t,e,n)=>{const r=t*t,o=n*(e*e-r)+r;return o<0?0:Math.sqrt(o)},XT=[Fl,or,$r],JT=t=>XT.find(e=>e.test(t));function wh(t){const e=JT(t);if(Lr(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`),!e)return!1;let n=e.parse(t);return e===$r&&(n=YT(n)),n}const Sh=(t,e)=>{const n=wh(t),r=wh(e);if(!n||!r)return ls(t,e);const o={...n};return i=>(o.red=Hl(n.red,r.red,i),o.green=Hl(n.green,r.green,i),o.blue=Hl(n.blue,r.blue,i),o.alpha=Be(n.alpha,r.alpha,i),or.transform(o))},Wl=new Set(["none","hidden"]);function QT(t,e){return Wl.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function eE(t,e){return n=>Be(t,e,n)}function Ul(t){return typeof t=="number"?eE:typeof t=="string"?gl(t)?ls:ht.test(t)?Sh:rE:Array.isArray(t)?Th:typeof t=="object"?ht.test(t)?Sh:tE:ls}function Th(t,e){const n=[...t],r=n.length,o=t.map((i,s)=>Ul(i)(i,e[s]));return i=>{for(let s=0;s<r;s++)n[s]=o[s](i);return n}}function tE(t,e){const n={...t,...e},r={};for(const o in n)t[o]!==void 0&&e[o]!==void 0&&(r[o]=Ul(t[o])(t[o],e[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function nE(t,e){var n;const r=[],o={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const s=e.types[i],a=t.indexes[s][o[s]],l=(n=t.values[a])!==null&&n!==void 0?n:0;r[i]=l,o[s]++}return r}const rE=(t,e)=>{const n=Ln.createTransformer(e),r=Lo(t),o=Lo(e);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?Wl.has(t)&&!o.values.length||Wl.has(e)&&!r.values.length?QT(t,e):gn(Th(nE(r,o),o.values),n):(Lr(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),ls(t,e))};function Eh(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?Be(t,e,n):Ul(t)(t,e)}function oE(t,e,n){const r=[],o=n||Eh,i=t.length-1;for(let s=0;s<i;s++){let a=o(t[s],t[s+1]);if(e){const l=Array.isArray(e)?e[s]||lt:e;a=gn(l,a)}r.push(a)}return r}function Ch(t,e,{clamp:n=!0,ease:r,mixer:o}={}){const i=t.length;if(Ht(i===e.length,"Both input and output ranges must be the same length"),i===1)return()=>e[0];if(i===2&&t[0]===t[1])return()=>e[1];t[0]>t[i-1]&&(t=[...t].reverse(),e=[...e].reverse());const s=oE(e,r,o),a=s.length,l=c=>{let u=0;if(a>1)for(;u<t.length-2&&!(c<t[u+1]);u++);const f=Vo(t[u],t[u+1],c);return s[u](f)};return n?c=>l(Dn(t[0],t[i-1],c)):l}function iE(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const o=Vo(0,e,r);t.push(Be(n,1,o))}}function sE(t){const e=[0];return iE(e,t.length-1),e}function aE(t,e){return t.map(n=>n*e)}function lE(t,e){return t.map(()=>e||hh).splice(0,t.length-1)}function cs({duration:t=300,keyframes:e,times:n,ease:r="easeInOut"}){const o=KT(r)?r.map(xh):xh(r),i={done:!1,value:e[0]},s=aE(n&&n.length===e.length?n:sE(e),t),a=Ch(s,e,{ease:Array.isArray(o)?o:lE(e,o)});return{calculatedDuration:t,next:l=>(i.value=a(l),i.done=l>=t,i)}}const Ah=2e4;function cE(t){let e=0;const n=50;let r=t.next(e);for(;!r.done&&e<Ah;)e+=n,r=t.next(e);return e>=Ah?1/0:e}const uE=t=>{const e=({timestamp:n})=>t(n);return{start:()=>_e.update(e,!0),stop:()=>Xt(e),now:()=>ut.isProcessing?ut.timestamp:Fn.now()}},fE={decay:dh,inertia:dh,tween:cs,keyframes:cs,spring:fh},dE=t=>t/100;class Gl extends sh{constructor({KeyframeResolver:e=Dl,...n}){super(n),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:a}=this.options;a&&a()};const{name:r,motionValue:o,keyframes:i}=this.options,s=(a,l)=>this.onKeyframesResolved(a,l);r&&o&&o.owner?this.resolver=o.owner.resolveKeyframes(i,s,r,o):this.resolver=new e(i,s,r,o),this.resolver.scheduleResolve()}initPlayback(e){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:s=0}=this.options,a=fE[n]||cs;let l,c;a!==cs&&typeof e[0]!="number"&&(process.env.NODE_ENV!=="production"&&Ht(e.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${e}`),l=gn(dE,Eh(e[0],e[1])),e=[0,100]);const u=a({...this.options,keyframes:e});i==="mirror"&&(c=a({...this.options,keyframes:[...e].reverse(),velocity:-s})),u.calculatedDuration===null&&(u.calculatedDuration=cE(u));const{calculatedDuration:f}=u,d=f+o,p=d*(r+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:f,resolvedDuration:d,totalDuration:p}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!e?this.pause():this.state=this.pendingPlayState}tick(e,n=!1){const{resolved:r}=this;if(!r){const{keyframes:O}=this.options;return{done:!0,value:O[O.length-1]}}const{finalKeyframe:o,generator:i,mirroredGenerator:s,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:f}=r;if(this.startTime===null)return i.next(0);const{delay:d,repeat:p,repeatType:h,repeatDelay:m,onUpdate:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-u/this.speed,this.startTime)),n?this.currentTime=e:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const v=this.currentTime-d*(this.speed>=0?1:-1),b=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let g=this.currentTime,S=i;if(p){const O=Math.min(this.currentTime,u)/f;let k=Math.floor(O),D=O%1;!D&&O>=1&&(D=1),D===1&&k--,k=Math.min(k,p+1),!!(k%2)&&(h==="reverse"?(D=1-D,m&&(D-=m/f)):h==="mirror"&&(S=s)),g=Dn(0,1,D)*f}const x=b?{done:!1,value:l[0]}:S.next(g);a&&(x.value=a(x.value));let{done:T}=x;!b&&c!==null&&(T=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const P=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&T);return P&&o!==void 0&&(x.value=ss(l,this.options,o)),y&&y(x.value),P&&this.finish(),x}get duration(){const{resolved:e}=this;return e?vn(e.calculatedDuration):0}get time(){return vn(this.currentTime)}set time(e){e=yn(e),this.currentTime=e,this.holdTime!==null||this.speed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=vn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:e=uE,onPlay:n}=this.options;this.driver||(this.driver=e(o=>this.tick(o))),n&&n();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:(!this.startTime||this.state==="finished")&&(this.startTime=r),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(e=this.currentTime)!==null&&e!==void 0?e:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const _h=t=>Array.isArray(t)&&typeof t[0]=="number";function Ph(t){return!!(!t||typeof t=="string"&&t in Kl||_h(t)||Array.isArray(t)&&t.every(Ph))}const $o=([t,e,n,r])=>`cubic-bezier(${t}, ${e}, ${n}, ${r})`,Kl={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:$o([0,.65,.55,1]),circOut:$o([.55,0,1,.45]),backIn:$o([.31,.01,.66,-.59]),backOut:$o([.33,1.53,.69,.99])};function pE(t){return Oh(t)||Kl.easeOut}function Oh(t){if(t)return _h(t)?$o(t):Array.isArray(t)?t.map(pE):Kl[t]}function hE(t,e,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:s="loop",ease:a,times:l}={}){const c={[e]:n};l&&(c.offset=l);const u=Oh(a);return Array.isArray(u)&&(c.easing=u),t.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"})}const mE=oh(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),gE=new Set(["opacity","clipPath","filter","transform"]),us=10,yE=2e4;function vE(t){return t.type==="spring"||t.name==="backgroundColor"||!Ph(t.ease)}function bE(t,e){const n=new Gl({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:t[0]};const o=[];let i=0;for(;!r.done&&i<yE;)r=n.sample(i),o.push(r.value),i+=us;return{times:void 0,keyframes:o,duration:i-us,ease:"linear"}}class Ih extends sh{constructor(e){super(e);const{name:n,motionValue:r,keyframes:o}=this.options;this.resolver=new rh(o,(i,s)=>this.onKeyframesResolved(i,s),n,r),this.resolver.scheduleResolve()}initPlayback(e,n){var r;let{duration:o=300,times:i,ease:s,type:a,motionValue:l,name:c}=this.options;if(!(!((r=l.owner)===null||r===void 0)&&r.current))return!1;if(vE(this.options)){const{onComplete:f,onUpdate:d,motionValue:p,...h}=this.options,m=bE(e,h);e=m.keyframes,e.length===1&&(e[1]=e[0]),o=m.duration,i=m.times,s=m.ease,a="keyframes"}const u=hE(l.owner.current,c,e,{...this.options,duration:o,times:i,ease:s});return u.startTime=Fn.now(),this.pendingTimeline?(u.timeline=this.pendingTimeline,this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:f}=this.options;l.set(ss(e,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:o,times:i,type:a,ease:s,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:n}=e;return vn(n)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:n}=e;return vn(n.currentTime||0)}set time(e){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=yn(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:n}=e;return n.playbackRate}set speed(e){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:n}=e;return n.playState}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{const{resolved:n}=this;if(!n)return lt;const{animation:r}=n;r.timeline=e,r.onfinish=null}return lt}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;const{resolved:e}=this;if(!e)return;const{animation:n,keyframes:r,duration:o,type:i,ease:s,times:a}=e;if(!(n.playState==="idle"||n.playState==="finished")){if(this.time){const{motionValue:l,onUpdate:c,onComplete:u,...f}=this.options,d=new Gl({...f,keyframes:r,duration:o,type:i,ease:s,times:a,isGenerator:!0}),p=yn(this.time);l.setWithVelocity(d.sample(p-us).value,d.sample(p).value,us)}this.cancel()}}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:n,name:r,repeatDelay:o,repeatType:i,damping:s,type:a}=e;return mE()&&r&&gE.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!o&&i!=="mirror"&&s!==0&&a!=="inertia"}}function xE(t,e){let n;const r=()=>{const{currentTime:o}=e,s=(o===null?0:o.value)/100;n!==s&&t(s),n=s};return _e.update(r,!0),()=>Xt(r)}const wE=oh(()=>window.ScrollTimeline!==void 0);class SE{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}then(e,n){return Promise.all(this.animations).then(e).catch(n)}getAll(e){return this.animations[0][e]}setAll(e,n){for(let r=0;r<this.animations.length;r++)this.animations[r][e]=n}attachTimeline(e){const n=this.animations.map(r=>{if(wE()&&r.attachTimeline)r.attachTimeline(e);else return r.pause(),xE(o=>{r.time=r.duration*o},e)});return()=>{n.forEach((r,o)=>{r&&r(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get duration(){let e=0;for(let n=0;n<this.animations.length;n++)e=Math.max(e,this.animations[n].duration);return e}runAll(e){this.animations.forEach(n=>n[e]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const Zl=(t,e,n,r={},o,i)=>s=>{const a=Ol(r,t)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-yn(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:d=>{e.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:i?void 0:o};oT(a)||(u={...u,...rT(t,u)}),u.duration&&(u.duration=yn(u.duration)),u.repeatDelay&&(u.repeatDelay=yn(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let f=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(f=!0)),f&&!i&&e.get()!==void 0){const d=ss(u.keyframes,a);if(d!==void 0)return _e.update(()=>{u.onUpdate(d),u.onComplete()}),new SE([])}return!i&&Ih.supports(u)?new Ih(u):new Gl(u)};function fs(t){return!!(ct(t)&&t.add)}function ql(t,e){t.indexOf(e)===-1&&t.push(e)}function Yl(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}function TE([...t],e,n){const r=e<0?t.length+e:e;if(r>=0&&r<t.length){const o=n<0?t.length+n:n,[i]=t.splice(e,1);t.splice(o,0,i)}return t}class Xl{constructor(){this.subscriptions=[]}add(e){return ql(this.subscriptions,e),()=>Yl(this.subscriptions,e)}notify(e,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](e,n,r);else for(let i=0;i<o;i++){const s=this.subscriptions[i];s&&s(e,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const kh=new Set;function Jl(t,e,n){t||kh.has(e)||(console.warn(e),kh.add(e))}const Dh=30,EE=t=>!isNaN(parseFloat(t)),jo={current:void 0};class CE{constructor(e,n={}){this.version="11.2.13",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const i=Fn.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=Fn.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=EE(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!=="production"&&Jl(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Xl);const r=this.events[e].add(n);return e==="change"?()=>{r(),_e.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return jo.current&&jo.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=Fn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Dh)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Dh);return ah(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function jr(t,e){return new CE(t,e)}function AE(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,jr(n))}function _E(t,e){const n=is(t,e);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const s in i){const a=RS(i[s]);AE(t,s,a)}}function Mh(t){return t.getProps()[ip]}function PE({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,r}function Rh(t,e,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:s=t.getDefaultTransition(),transitionEnd:a,...l}=e;const c=t.getValue("willChange");r&&(s=r);const u=[],f=o&&t.animationState&&t.animationState.getState()[o];for(const d in l){const p=t.getValue(d,(i=t.latestValues[d])!==null&&i!==void 0?i:null),h=l[d];if(h===void 0||f&&PE(f,d))continue;const m={delay:n,elapsed:0,...Ol(s||{},d)};let y=!1;if(window.HandoffAppearAnimations){const b=Mh(t);if(b){const g=window.HandoffAppearAnimations(b,d,p,_e);g!==null&&(m.elapsed=g,y=!0)}}p.start(Zl(d,p,h,t.shouldReduceMotion&&tr.has(d)?{type:!1}:m,t,y));const v=p.animation;v&&(fs(c)&&(c.add(d),v.then(()=>c.remove(d))),u.push(v))}return a&&Promise.all(u).then(()=>{_e.update(()=>{a&&_E(t,a)})}),u}function Ql(t,e,n={}){var r;const o=is(t,e,n.type==="exit"?(r=t.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const s=o?()=>Promise.all(Rh(t,o,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:f,staggerDirection:d}=i;return OE(t,e,u+c,f,d,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[c,u]=l==="beforeChildren"?[s,a]:[a,s];return c().then(()=>u())}else return Promise.all([s(),a(n.delay)])}function OE(t,e,n=0,r=0,o=1,i){const s=[],a=(t.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(t.variantChildren).sort(IE).forEach((c,u)=>{c.notify("AnimationStart",e),s.push(Ql(c,e,{...i,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",e)))}),Promise.all(s)}function IE(t,e){return t.sortNodePosition(e)}function kE(t,e,n={}){t.notify("AnimationStart",e);let r;if(Array.isArray(e)){const o=e.map(i=>Ql(t,i,n));r=Promise.all(o)}else if(typeof e=="string")r=Ql(t,e,n);else{const o=typeof e=="function"?is(t,e,n.custom):e;r=Promise.all(Rh(t,o,n))}return r.then(()=>{_e.postRender(()=>{t.notify("AnimationComplete",e)})})}const DE=[...pl].reverse(),ME=pl.length;function RE(t){return e=>Promise.all(e.map(({animation:n,options:r})=>kE(t,n,r)))}function FE(t){let e=RE(t),n=Fh(),r=!0;const o=l=>(c,u)=>{var f;const d=is(t,u,l==="exit"?(f=t.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(d){const{transition:p,transitionEnd:h,...m}=d;c={...c,...m,...h}}return c};function i(l){e=l(t)}function s(l){const c=t.getProps(),u=t.getVariantContext(!0)||{},f=[],d=new Set;let p={},h=1/0;for(let y=0;y<ME;y++){const v=DE[y],b=n[v],g=c[v]!==void 0?c[v]:u[v],S=Oo(g),x=v===l?b.isActive:null;x===!1&&(h=y);let T=g===u[v]&&g!==c[v]&&S;if(T&&r&&t.manuallyAnimateOnMount&&(T=!1),b.protectedKeys={...p},!b.isActive&&x===null||!g&&!b.prevProp||Ji(g)||typeof g=="boolean")continue;let O=LE(b.prevProp,g)||v===l&&b.isActive&&!T&&S||y>h&&S,k=!1;const D=Array.isArray(g)?g:[g];let L=D.reduce(o(v),{});x===!1&&(L={});const{prevResolvedValues:A={}}=b,j={...A,...L},F=_=>{O=!0,d.has(_)&&(k=!0,d.delete(_)),b.needsAnimating[_]=!0;const M=t.getValue(_);M&&(M.liveStyle=!1)};for(const _ in j){const M=L[_],N=A[_];if(p.hasOwnProperty(_))continue;let z=!1;El(M)&&El(N)?z=!Vp(M,N):z=M!==N,z?M!=null?F(_):d.add(_):M!==void 0&&d.has(_)?F(_):b.protectedKeys[_]=!0}b.prevProp=g,b.prevResolvedValues=L,b.isActive&&(p={...p,...L}),r&&t.blockInitialAnimation&&(O=!1),O&&(!T||k)&&f.push(...D.map(_=>({animation:_,options:{type:v}})))}if(d.size){const y={};d.forEach(v=>{const b=t.getBaseTarget(v),g=t.getValue(v);g&&(g.liveStyle=!0),y[v]=b??null}),f.push({animation:y})}let m=!!f.length;return r&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(m=!1),r=!1,m?e(f):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=t.variantChildren)===null||u===void 0||u.forEach(d=>{var p;return(p=d.animationState)===null||p===void 0?void 0:p.setActive(l,c)}),n[l].isActive=c;const f=s(l);for(const d in n)n[d].protectedKeys={};return f}return{animateChanges:s,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Fh(),r=!0}}}function LE(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Vp(e,t):!1}function ir(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Fh(){return{animate:ir(!0),whileInView:ir(),whileHover:ir(),whileTap:ir(),whileDrag:ir(),whileFocus:ir(),exit:ir()}}class NE extends Rn{constructor(e){super(e),e.animationState||(e.animationState=FE(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Ji(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)===null||e===void 0||e.call(this)}}let VE=0;class $E extends Rn{constructor(){super(...arguments),this.id=VE++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;const o=this.node.animationState.setActive("exit",!e);n&&!e&&o.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const jE={animation:{Feature:NE},exit:{Feature:$E}},Lh=(t,e)=>Math.abs(t-e);function BE(t,e){const n=Lh(t.x,e.x),r=Lh(t.y,e.y);return Math.sqrt(n**2+r**2)}class Nh{constructor(e,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=tc(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,p=BE(f.offset,{x:0,y:0})>=3;if(!d&&!p)return;const{point:h}=f,{timestamp:m}=ut;this.history.push({...h,timestamp:m});const{onStart:y,onMove:v}=this.handlers;d||(y&&y(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,f)},this.handlePointerMove=(f,d)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=ec(d,this.transformPagePoint),_e.update(this.updatePoint,!0)},this.handlePointerUp=(f,d)=>{this.end();const{onEnd:p,onSessionEnd:h,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=tc(f.type==="pointercancel"?this.lastMoveEventInfo:ec(d,this.transformPagePoint),this.history);this.startEvent&&p&&p(f,y),h&&h(f,y)},!Ip(e))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const s=os(e),a=ec(s,this.transformPagePoint),{point:l}=a,{timestamp:c}=ut;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(e,tc(a,this.history)),this.removeListeners=gn(mn(this.contextWindow,"pointermove",this.handlePointerMove),mn(this.contextWindow,"pointerup",this.handlePointerUp),mn(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Xt(this.updatePoint)}}function ec(t,e){return e?{point:e(t.point)}:t}function Vh(t,e){return{x:t.x-e.x,y:t.y-e.y}}function tc({point:t},e){return{point:t,delta:Vh(t,$h(e)),offset:Vh(t,zE(e)),velocity:HE(e,.1)}}function zE(t){return t[0]}function $h(t){return t[t.length-1]}function HE(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,r=null;const o=$h(t);for(;n>=0&&(r=t[n],!(o.timestamp-r.timestamp>yn(e)));)n--;if(!r)return{x:0,y:0};const i=vn(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const s={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function Mt(t){return t.max-t.min}function nc(t,e=0,n=.01){return Math.abs(t-e)<=n}function jh(t,e,n,r=.5){t.origin=r,t.originPoint=Be(e.min,e.max,t.origin),t.scale=Mt(n)/Mt(e),(nc(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=Be(n.min,n.max,t.origin)-t.originPoint,(nc(t.translate)||isNaN(t.translate))&&(t.translate=0)}function Bo(t,e,n,r){jh(t.x,e.x,n.x,r?r.originX:void 0),jh(t.y,e.y,n.y,r?r.originY:void 0)}function Bh(t,e,n){t.min=n.min+e.min,t.max=t.min+Mt(e)}function WE(t,e,n){Bh(t.x,e.x,n.x),Bh(t.y,e.y,n.y)}function zh(t,e,n){t.min=e.min-n.min,t.max=t.min+Mt(e)}function zo(t,e,n){zh(t.x,e.x,n.x),zh(t.y,e.y,n.y)}function UE(t,{min:e,max:n},r){return e!==void 0&&t<e?t=r?Be(e,t,r.min):Math.max(t,e):n!==void 0&&t>n&&(t=r?Be(n,t,r.max):Math.min(t,n)),t}function Hh(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function GE(t,{top:e,left:n,bottom:r,right:o}){return{x:Hh(t.x,n,o),y:Hh(t.y,e,r)}}function Wh(t,e){let n=e.min-t.min,r=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,r]=[r,n]),{min:n,max:r}}function KE(t,e){return{x:Wh(t.x,e.x),y:Wh(t.y,e.y)}}function ZE(t,e){let n=.5;const r=Mt(t),o=Mt(e);return o>r?n=Vo(e.min,e.max-r,t.min):r>o&&(n=Vo(t.min,t.max-o,e.min)),Dn(0,1,n)}function qE(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const rc=.35;function YE(t=rc){return t===!1?t=0:t===!0&&(t=rc),{x:Uh(t,"left","right"),y:Uh(t,"top","bottom")}}function Uh(t,e,n){return{min:Gh(t,e),max:Gh(t,n)}}function Gh(t,e){return typeof t=="number"?t:t[e]||0}const Kh=()=>({translate:0,scale:1,origin:0,originPoint:0}),Br=()=>({x:Kh(),y:Kh()}),Zh=()=>({min:0,max:0}),qe=()=>({x:Zh(),y:Zh()});function Nt(t){return[t("x"),t("y")]}function qh({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}function XE({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function JE(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function oc(t){return t===void 0||t===1}function ic({scale:t,scaleX:e,scaleY:n}){return!oc(t)||!oc(e)||!oc(n)}function sr(t){return ic(t)||Yh(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Yh(t){return Xh(t.x)||Xh(t.y)}function Xh(t){return t&&t!=="0%"}function ds(t,e,n){const r=t-n,o=e*r;return n+o}function Jh(t,e,n,r,o){return o!==void 0&&(t=ds(t,o,r)),ds(t,n,r)+e}function sc(t,e=0,n=1,r,o){t.min=Jh(t.min,e,n,r,o),t.max=Jh(t.max,e,n,r,o)}function Qh(t,{x:e,y:n}){sc(t.x,e.translate,e.scale,e.originPoint),sc(t.y,n.translate,n.scale,n.originPoint)}function QE(t,e,n,r=!1){const o=n.length;if(!o)return;e.x=e.y=1;let i,s;for(let a=0;a<o;a++){i=n[a],s=i.projectionDelta;const l=i.instance;l&&l.style&&l.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&zr(t,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(e.x*=s.x.scale,e.y*=s.y.scale,Qh(t,s)),r&&sr(i.latestValues)&&zr(t,i.latestValues))}e.x=em(e.x),e.y=em(e.y)}function em(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function Nn(t,e){t.min=t.min+e,t.max=t.max+e}function tm(t,e,[n,r,o]){const i=e[o]!==void 0?e[o]:.5,s=Be(t.min,t.max,i);sc(t,e[n],e[r],s,e.scale)}const e1=["x","scaleX","originX"],t1=["y","scaleY","originY"];function zr(t,e){tm(t.x,e,e1),tm(t.y,e,t1)}function nm(t,e){return qh(JE(t.getBoundingClientRect(),e))}function n1(t,e,n){const r=nm(t,n),{scroll:o}=e;return o&&(Nn(r.x,o.offset.x),Nn(r.y,o.offset.y)),r}const rm=({current:t})=>t?t.ownerDocument.defaultView:null,r1=new WeakMap;class o1{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=qe(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(os(u,"page").point)},i=(u,f)=>{const{drag:d,dragPropagation:p,onDragStart:h}=this.getProps();if(d&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Rp(d),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Nt(y=>{let v=this.getAxisMotionValue(y).get()||0;if(Yt.test(v)){const{projection:b}=this.visualElement;if(b&&b.layout){const g=b.layout.layoutBox[y];g&&(v=Mt(g)*(parseFloat(v)/100))}}this.originPoint[y]=v}),h&&_e.postRender(()=>h(u,f));const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},s=(u,f)=>{const{dragPropagation:d,dragDirectionLock:p,onDirectionLock:h,onDrag:m}=this.getProps();if(!d&&!this.openGlobalLock)return;const{offset:y}=f;if(p&&this.currentDirection===null){this.currentDirection=i1(y),this.currentDirection!==null&&h&&h(this.currentDirection);return}this.updateAxis("x",f.point,y),this.updateAxis("y",f.point,y),this.visualElement.render(),m&&m(u,f)},a=(u,f)=>this.stop(u,f),l=()=>Nt(u=>{var f;return this.getAnimationState(u)==="paused"&&((f=this.getAxisMotionValue(u).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Nh(e,{onSessionStart:o,onStart:i,onMove:s,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:rm(this.visualElement)})}stop(e,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:i}=this.getProps();i&&_e.postRender(()=>i(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,r){const{drag:o}=this.getProps();if(!r||!ps(e,o,this.currentDirection))return;const i=this.getAxisMotionValue(e);let s=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(s=UE(s,this.constraints[e],this.elastic[e])),i.set(s)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,i=this.constraints;n&&Rr(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=GE(o.layoutBox,n):this.constraints=!1,this.elastic=YE(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&Nt(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=qE(o.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!Rr(e))return!1;const r=e.current;Ht(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=n1(r,o.root,this.visualElement.getTransformPagePoint());let s=KE(o.layout.layoutBox,i);if(n){const a=n(XE(s));this.hasMutatedConstraints=!!a,a&&(s=qh(a))}return s}startAnimation(e){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Nt(u=>{if(!ps(u,n,this.currentDirection))return;let f=l&&l[u]||{};s&&(f={min:0,max:0});const d=o?200:1e6,p=o?40:1e7,h={type:"inertia",velocity:r?e[u]:0,bounceStiffness:d,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(u,h)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const r=this.getAxisMotionValue(e);return r.start(Zl(e,r,0,n,this.visualElement))}stopAnimation(){Nt(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){Nt(e=>{var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){Nt(n=>{const{drag:r}=this.getProps();if(!ps(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:s,max:a}=o.layout.layoutBox[n];i.set(e[n]-Be(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Rr(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Nt(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const l=a.get();o[s]=ZE({min:l,max:l},this.constraints[s])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Nt(s=>{if(!ps(s,e,null))return;const a=this.getAxisMotionValue(s),{min:l,max:c}=this.constraints[s];a.set(Be(l,c,o[s]))})}addListeners(){if(!this.visualElement.current)return;r1.set(this.visualElement,this);const e=this.visualElement.current,n=mn(e,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Rr(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),_e.read(r);const s=hn(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Nt(u=>{const f=this.getAxisMotionValue(u);f&&(this.originPoint[u]+=l[u].translate,f.set(f.get()+l[u].translate))}),this.visualElement.render())});return()=>{s(),n(),i(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:s=rc,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:s,dragMomentum:a}}}function ps(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function i1(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class s1 extends Rn{constructor(e){super(e),this.removeGroupControls=lt,this.removeListeners=lt,this.controls=new o1(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||lt}unmount(){this.removeGroupControls(),this.removeListeners()}}const om=t=>(e,n)=>{t&&_e.postRender(()=>t(e,n))};class a1 extends Rn{constructor(){super(...arguments),this.removePointerDownListener=lt}onPointerDown(e){this.session=new Nh(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:rm(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:om(e),onStart:om(n),onMove:r,onEnd:(i,s)=>{delete this.session,o&&_e.postRender(()=>o(i,s))}}}mount(){this.removePointerDownListener=mn(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function l1(){const t=w.useContext(qi);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:n,register:r}=t,o=w.useId();return w.useEffect(()=>r(o),[]),!e&&n?[!1,()=>n&&n(o)]:[!0]}const hs={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function im(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Ho={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(ce.test(t))t=parseFloat(t);else return t;const n=im(t,e.target.x),r=im(t,e.target.y);return`${n}% ${r}%`}},c1={correct:(t,{treeScale:e,projectionDelta:n})=>{const r=t,o=Ln.parse(t);if(o.length>5)return r;const i=Ln.createTransformer(t),s=typeof o[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;o[0+s]/=a,o[1+s]/=l;const c=Be(a,l,.5);return typeof o[2+s]=="number"&&(o[2+s]/=c),typeof o[3+s]=="number"&&(o[3+s]/=c),i(o)}};class u1 extends w.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=e;cS(f1),i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),hs.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,s=r.projection;return s&&(s.isPresent=i,o||e.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?s.promote():s.relegate()||_e.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),dl.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=e;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function sm(t){const[e,n]=l1(),r=w.useContext(Io);return E.jsx(u1,{...t,layoutGroup:r,switchLayoutGroup:w.useContext(lp),isPresent:e,safeToRemove:n})}const f1={borderRadius:{...Ho,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ho,borderTopRightRadius:Ho,borderBottomLeftRadius:Ho,borderBottomRightRadius:Ho,boxShadow:c1},am=["TopLeft","TopRight","BottomLeft","BottomRight"],d1=am.length,lm=t=>typeof t=="string"?parseFloat(t):t,cm=t=>typeof t=="number"||ce.test(t);function p1(t,e,n,r,o,i){o?(t.opacity=Be(0,n.opacity!==void 0?n.opacity:1,h1(r)),t.opacityExit=Be(e.opacity!==void 0?e.opacity:1,0,m1(r))):i&&(t.opacity=Be(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;s<d1;s++){const a=`border${am[s]}Radius`;let l=um(e,a),c=um(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||cm(l)===cm(c)?(t[a]=Math.max(Be(lm(l),lm(c),r),0),(Yt.test(c)||Yt.test(l))&&(t[a]+="%")):t[a]=c}(e.rotate||n.rotate)&&(t.rotate=Be(e.rotate||0,n.rotate||0,r))}function um(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const h1=fm(0,.5,yh),m1=fm(.5,.95,lt);function fm(t,e,n){return r=>r<t?0:r>e?1:n(Vo(t,e,r))}function dm(t,e){t.min=e.min,t.max=e.max}function Vt(t,e){dm(t.x,e.x),dm(t.y,e.y)}function pm(t,e,n,r,o){return t-=e,t=ds(t,1/n,r),o!==void 0&&(t=ds(t,1/o,r)),t}function g1(t,e=0,n=1,r=.5,o,i=t,s=t){if(Yt.test(e)&&(e=parseFloat(e),e=Be(s.min,s.max,e/100)-s.min),typeof e!="number")return;let a=Be(i.min,i.max,r);t===i&&(a-=e),t.min=pm(t.min,e,n,a,o),t.max=pm(t.max,e,n,a,o)}function hm(t,e,[n,r,o],i,s){g1(t,e[n],e[r],e[o],e.scale,i,s)}const y1=["x","scaleX","originX"],v1=["y","scaleY","originY"];function mm(t,e,n,r){hm(t.x,e,y1,n?n.x:void 0,r?r.x:void 0),hm(t.y,e,v1,n?n.y:void 0,r?r.y:void 0)}function gm(t){return t.translate===0&&t.scale===1}function ym(t){return gm(t.x)&&gm(t.y)}function b1(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function vm(t,e){return Math.round(t.x.min)===Math.round(e.x.min)&&Math.round(t.x.max)===Math.round(e.x.max)&&Math.round(t.y.min)===Math.round(e.y.min)&&Math.round(t.y.max)===Math.round(e.y.max)}function bm(t){return Mt(t.x)/Mt(t.y)}class x1{constructor(){this.members=[]}add(e){ql(this.members,e),e.scheduleRender()}remove(e){if(Yl(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(o=>e===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(e,n){const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,n&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:o}=e.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:r}=e;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function xm(t,e,n){let r="";const o=t.x.translate/e.x,i=t.y.translate/e.y,s=(n==null?void 0:n.z)||0;if((o||i||s)&&(r=`translate3d(${o}px, ${i}px, ${s}px) `),(e.x!==1||e.y!==1)&&(r+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:f,rotateY:d,skewX:p,skewY:h}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),f&&(r+=`rotateX(${f}deg) `),d&&(r+=`rotateY(${d}deg) `),p&&(r+=`skewX(${p}deg) `),h&&(r+=`skewY(${h}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const w1=(t,e)=>t.depth-e.depth;class S1{constructor(){this.children=[],this.isDirty=!1}add(e){ql(this.children,e),this.isDirty=!0}remove(e){Yl(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(w1),this.isDirty=!1,this.children.forEach(e)}}function T1(t,e){const n=Fn.now(),r=({timestamp:o})=>{const i=o-n;i>=e&&(Xt(r),t(i-e))};return _e.read(r,!0),()=>Xt(r)}function E1(t){window.MotionDebug&&window.MotionDebug.record(t)}function C1(t){return t instanceof SVGElement&&t.tagName!=="svg"}function A1(t,e,n){const r=ct(t)?t:jr(t);return r.start(Zl("",r,e,n)),r.animation}const ac=["","X","Y","Z"],_1={visibility:"hidden"},wm=1e3;let P1=0;const ar={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function lc(t,e,n,r){const{latestValues:o}=e;o[t]&&(n[t]=o[t],e.setStaticValue(t,0),r&&(r[t]=0))}function Sm(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return!1;const{visualElement:e}=t.options;return e?Mh(e)?!0:t.parent&&!t.parent.hasCheckedOptimisedAppear?Sm(t.parent):!1:!1}function Tm({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(s={},a=e==null?void 0:e()){this.id=P1++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,ar.totalNodes=ar.resolvedTargetDeltas=ar.recalculatedProjection=0,this.nodes.forEach(k1),this.nodes.forEach(L1),this.nodes.forEach(N1),this.nodes.forEach(D1),E1(ar)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new S1)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Xl),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const l=this.eventHandlers.get(s);l&&l.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=C1(s),this.instance=s;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),t){let f;const d=()=>this.root.updateBlockedByResize=!1;t(s,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=T1(d,250),hs.hasAnimatedSinceResize&&(hs.hasAnimatedSinceResize=!1,this.nodes.forEach(Cm))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:d,hasRelativeTargetChanged:p,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||z1,{onLayoutAnimationStart:y,onLayoutAnimationComplete:v}=u.getProps(),b=!this.targetLayout||!vm(this.targetLayout,h)||p,g=!d&&p;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||g||d&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,g);const S={...Ol(m,"layout"),onPlay:y,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else d||Cm(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Xt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(V1),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.HandoffCancelAllAnimations&&Sm(this)&&window.HandoffCancelAllAnimations(),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const f=this.path[u];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Em);return}this.isUpdating||this.nodes.forEach(R1),this.isUpdating=!1,this.nodes.forEach(F1),this.nodes.forEach(O1),this.nodes.forEach(I1),this.clearAllSnapshots();const a=Fn.now();ut.delta=Dn(0,1e3/60,a-ut.timestamp),ut.timestamp=a,ut.isProcessing=!0,Cl.update.process(ut),Cl.preRender.process(ut),Cl.render.process(ut),ut.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,dl.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(M1),this.sharedNodes.forEach($1)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,_e.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){_e.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=qe(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:s,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!o)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!ym(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;s&&(a||sr(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return s&&(l=this.removeTransform(l)),H1(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return qe();const a=s.measureViewportBox(),{scroll:l}=this.root;return l&&(Nn(a.x,l.offset.x),Nn(a.y,l.offset.y)),a}removeElementScroll(s){const a=qe();Vt(a,s);for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:f}=c;if(c!==this.root&&u&&f.layoutScroll){if(u.isRoot){Vt(a,s);const{scroll:d}=this.root;d&&(Nn(a.x,-d.offset.x),Nn(a.y,-d.offset.y))}Nn(a.x,u.offset.x),Nn(a.y,u.offset.y)}}return a}applyTransform(s,a=!1){const l=qe();Vt(l,s);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&zr(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),sr(u.latestValues)&&zr(l,u.latestValues)}return sr(this.latestValues)&&zr(l,this.latestValues),l}removeTransform(s){const a=qe();Vt(a,s);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!sr(c.latestValues))continue;ic(c.latestValues)&&c.updateSnapshot();const u=qe(),f=c.measurePageBox();Vt(u,f),mm(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return sr(this.latestValues)&&mm(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==ut.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(s||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:f,layoutId:d}=this.options;if(!(!this.layout||!(f||d))){if(this.resolvedRelativeTargetAt=ut.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=qe(),this.relativeTargetOrigin=qe(),zo(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),Vt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=qe(),this.targetWithTransforms=qe()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),WE(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Vt(this.target,this.layout.layoutBox),Qh(this.target,this.targetDelta)):Vt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=qe(),this.relativeTargetOrigin=qe(),zo(this.relativeTargetOrigin,this.target,p.target),Vt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}ar.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||ic(this.parent.latestValues)||Yh(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var s;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===ut.timestamp&&(c=!1),c)return;const{layout:u,layoutId:f}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||f))return;Vt(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,p=this.treeScale.y;QE(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=qe());const{target:h}=a;if(!h){this.projectionTransform&&(this.projectionDelta=Br(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=Br(),this.projectionDeltaWithTransform=Br());const m=this.projectionTransform;Bo(this.projectionDelta,this.layoutCorrected,h,this.latestValues),this.projectionTransform=xm(this.projectionDelta,this.treeScale),(this.projectionTransform!==m||this.treeScale.x!==d||this.treeScale.y!==p)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h)),ar.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),s){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(s,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},f=Br();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=qe(),p=l?l.source:void 0,h=this.layout?this.layout.source:void 0,m=p!==h,y=this.getStack(),v=!y||y.members.length<=1,b=!!(m&&!v&&this.options.crossfade===!0&&!this.path.some(B1));this.animationProgress=0;let g;this.mixTargetDelta=S=>{const x=S/1e3;Am(f.x,s.x,x),Am(f.y,s.y,x),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(zo(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),j1(this.relativeTarget,this.relativeTargetOrigin,d,x),g&&b1(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=qe()),Vt(g,this.relativeTarget)),m&&(this.animationValues=u,p1(u,c,this.latestValues,x,b,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=x},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Xt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=_e.update(()=>{hs.hasAnimatedSinceResize=!0,this.currentAnimation=A1(0,wm,{...s,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(wm),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=s;if(!(!a||!l||!c)){if(this!==s&&this.layout&&c&&km(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||qe();const f=Mt(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+f;const d=Mt(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+d}Vt(a,l),zr(a,u),Bo(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new x1),this.sharedNodes.get(s).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:a}=this.options;return a?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:a}=this.options;return a?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&lc("z",s,c,this.animationValues);for(let u=0;u<ac.length;u++)lc(`rotate${ac[u]}`,s,c,this.animationValues),lc(`skew${ac[u]}`,s,c,this.animationValues);s.render();for(const u in c)s.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);s.scheduleRender()}getProjectionStyles(s){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return _1;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=rs(s==null?void 0:s.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=rs(s==null?void 0:s.pointerEvents)||""),this.hasProjected&&!sr(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const d=f.animationValues||f.latestValues;this.applyTransformsToTarget(),c.transform=xm(this.projectionDeltaWithTransform,this.treeScale,d),u&&(c.transform=u(d,c.transform));const{x:p,y:h}=this.projectionDelta;c.transformOrigin=`${p.origin*100}% ${h.origin*100}% 0`,f.animationValues?c.opacity=f===this?(l=(a=d.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:c.opacity=f===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const m in es){if(d[m]===void 0)continue;const{correct:y,applyTo:v}=es[m],b=c.transform==="none"?d[m]:y(d[m],f);if(v){const g=v.length;for(let S=0;S<g;S++)c[v[S]]=b}else c[m]=b}return this.options.layoutId&&(c.pointerEvents=f===this?rs(s==null?void 0:s.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var a;return(a=s.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Em),this.root.sharedNodes.clear()}}}function O1(t){t.updateLayout()}function I1(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=t.layout,{animationType:i}=t.options,s=n.source!==t.layout.source;i==="size"?Nt(f=>{const d=s?n.measuredBox[f]:n.layoutBox[f],p=Mt(d);d.min=r[f].min,d.max=d.min+p}):km(i,n.layoutBox,r)&&Nt(f=>{const d=s?n.measuredBox[f]:n.layoutBox[f],p=Mt(r[f]);d.max=d.min+p,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[f].max=t.relativeTarget[f].min+p)});const a=Br();Bo(a,r,n.layoutBox);const l=Br();s?Bo(l,t.applyTransform(o,!0),n.measuredBox):Bo(l,r,n.layoutBox);const c=!ym(a);let u=!1;if(!t.resumeFrom){const f=t.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:d,layout:p}=f;if(d&&p){const h=qe();zo(h,n.layoutBox,d.layoutBox);const m=qe();zo(m,r,p.layoutBox),vm(h,m)||(u=!0),f.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=h,t.relativeParent=f)}}}t.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeTargetChanged:u})}else if(t.isLead()){const{onExitComplete:r}=t.options;r&&r()}t.options.transition=void 0}function k1(t){ar.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function D1(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function M1(t){t.clearSnapshot()}function Em(t){t.clearMeasurements()}function R1(t){t.isLayoutDirty=!1}function F1(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Cm(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function L1(t){t.resolveTargetDelta()}function N1(t){t.calcProjection()}function V1(t){t.resetSkewAndRotation()}function $1(t){t.removeLeadSnapshot()}function Am(t,e,n){t.translate=Be(e.translate,0,n),t.scale=Be(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function _m(t,e,n,r){t.min=Be(e.min,n.min,r),t.max=Be(e.max,n.max,r)}function j1(t,e,n,r){_m(t.x,e.x,n.x,r),_m(t.y,e.y,n.y,r)}function B1(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const z1={duration:.45,ease:[.4,0,.1,1]},Pm=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Om=Pm("applewebkit/")&&!Pm("chrome/")?Math.round:lt;function Im(t){t.min=Om(t.min),t.max=Om(t.max)}function H1(t){Im(t.x),Im(t.y)}function km(t,e,n){return t==="position"||t==="preserve-aspect"&&!nc(bm(e),bm(n),.2)}const W1=Tm({attachResizeListener:(t,e)=>hn(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),cc={current:void 0},Dm=Tm({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!cc.current){const t=new W1({});t.mount(window),t.setOptions({layoutScroll:!0}),cc.current=t}return cc.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),U1={pan:{Feature:a1},drag:{Feature:s1,ProjectionNode:Dm,MeasureLayout:sm}},uc={current:null},Mm={current:!1};function G1(){if(Mm.current=!0,!!ul)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>uc.current=t.matches;t.addListener(e),e()}else uc.current=!1}function K1(t,e,n){const{willChange:r}=e;for(const o in e){const i=e[o],s=n[o];if(ct(i))t.addValue(o,i),fs(r)&&r.add(o),process.env.NODE_ENV==="development"&&Jl(i.version==="11.2.13",`Attempting to mix Framer Motion versions ${i.version} with 11.2.13 may not work as expected.`);else if(ct(s))t.addValue(o,jr(i,{owner:t})),fs(r)&&r.remove(o);else if(s!==i)if(t.hasValue(o)){const a=t.getValue(o);a.liveStyle===!0?a.jump(i):a.hasAnimated||a.set(i)}else{const a=t.getStaticValue(o);t.addValue(o,jr(a!==void 0?a:i,{owner:t}))}}for(const o in n)e[o]===void 0&&t.removeValue(o);return e}const Rm=new WeakMap,Z1=[...Gp,ht,Ln],q1=t=>Z1.find(Up(t)),Fm=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Y1=hl.length;class X1{scrapeMotionValuesFromProps(e,n,r){return{}}constructor({parent:e,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:i,visualState:s},a={}){this.resolveKeyframes=(d,p,h,m)=>new this.KeyframeResolver(d,p,h,m,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Dl,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>_e.render(this.render,!1,!0);const{latestValues:l,renderState:c}=s;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.blockInitialAnimation=!!i,this.isControllingVariants=Qi(n),this.isVariantNode=fp(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const p=f[d];l[d]!==void 0&&ct(p)&&(p.set(l[d],!1),fs(u)&&u.add(d))}}mount(e){this.current=e,Rm.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),Mm.current||G1(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:uc.current,process.env.NODE_ENV!=="production"&&Jl(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Rm.delete(this.current),this.projection&&this.projection.unmount(),Xt(this.notifyUpdate),Xt(this.render),this.valueSubscriptions.forEach(e=>e()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(e,n){const r=tr.has(e),o=n.on("change",s=>{this.latestValues[e]=s,this.props.onUpdate&&_e.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{o(),i(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Fr){const n=Fr[e];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[e]&&o&&r(this.props)&&(this.features[e]=new o(this)),this.features[e]){const i=this.features[e];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):qe()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Fm.length;r++){const o=Fm[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,s=e[i];s&&(this.propEventSubscriptions[o]=this.on(o,s))}this.prevMotionValues=K1(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(e=!1){if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<Y1;r++){const o=hl[r],i=this.props[o];(Oo(i)||i===!1)&&(n[o]=i)}return n}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const r=this.values.get(e);n!==r&&(r&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let r=this.values.get(e);return r===void 0&&n!==void 0&&(r=jr(n===null?void 0:n,{owner:this}),this.addValue(e,r)),r}readValue(e,n){var r;let o=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(r=this.getBaseTargetFromProps(this.props,e))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,e,this.options);return o!=null&&(typeof o=="string"&&(jp(o)||$p(o))?o=parseFloat(o):!q1(o)&&Ln.test(n)&&(o=nh(e,n)),this.setBaseTarget(e,ct(o)?o.get():o)),ct(o)?o.get():o}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:r}=this.props;let o;if(typeof r=="string"||typeof r=="object"){const s=Tl(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);s&&(o=s[e])}if(r&&o!==void 0)return o;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!ct(i)?i:this.initialValues[e]!==void 0&&o===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Xl),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class Lm extends X1{constructor(){super(...arguments),this.KeyframeResolver=rh}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:r}){delete n[e],delete r[e]}}function J1(t){return window.getComputedStyle(t)}class Q1 extends Lm{constructor(){super(...arguments),this.type="html"}readValueFromInstance(e,n){if(tr.has(n)){const r=Nl(n);return r&&r.default||0}else{const r=J1(e),o=(gp(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(e,{transformPagePoint:n}){return nm(e,n)}build(e,n,r,o){vl(e,n,r,o.transformTemplate)}scrapeMotionValuesFromProps(e,n,r){return Sl(e,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;ct(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(e,n,r,o){Ep(e,n,r,o)}}class eC extends Lm{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(tr.has(n)){const r=Nl(n);return r&&r.default||0}return n=Cp.has(n)?n:fl(n),e.getAttribute(n)}measureInstanceViewportBox(){return qe()}scrapeMotionValuesFromProps(e,n,r){return _p(e,n,r)}build(e,n,r,o){xl(e,n,r,this.isSVGTag,o.transformTemplate)}renderInstance(e,n,r,o){Ap(e,n,r,o)}mount(e){this.isSVGTag=wl(e.tagName),super.mount(e)}}const tC=(t,e)=>ml(t)?new eC(e,{enableHardwareAcceleration:!1}):new Q1(e,{allowProjection:t!==w.Fragment,enableHardwareAcceleration:!0}),nC={...jE,...JS,...U1,...{layout:{ProjectionNode:Dm,MeasureLayout:sm}}},fc=aS((t,e)=>$S(t,e,nC,tC));function Nm(){const t=w.useRef(!1);return Yi(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function Vm(){const t=Nm(),[e,n]=w.useState(0),r=w.useCallback(()=>{t.current&&n(e+1)},[e]);return[w.useCallback(()=>_e.postRender(r),[r]),e]}class rC extends R.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function oC({children:t,isPresent:e}){const n=w.useId(),r=w.useRef(null),o=w.useRef({width:0,height:0,top:0,left:0}),{nonce:i}=w.useContext(Ki);return w.useInsertionEffect(()=>{const{width:s,height:a,top:l,left:c}=o.current;if(e||!r.current||!s||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return i&&(u.nonce=i),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
108
+ [data-motion-pop-id="${n}"] {
109
+ position: absolute !important;
110
+ width: ${s}px !important;
111
+ height: ${a}px !important;
112
+ top: ${l}px !important;
113
+ left: ${c}px !important;
114
+ }
115
+ `),()=>{document.head.removeChild(u)}},[e]),E.jsx(rC,{isPresent:e,childRef:r,sizeRef:o,children:R.cloneElement(t,{ref:r})})}const dc=({children:t,initial:e,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:s})=>{const a=nr(iC),l=w.useId(),c=w.useMemo(()=>({id:l,initial:e,isPresent:n,custom:o,onExitComplete:u=>{a.set(u,!0);for(const f of a.values())if(!f)return;r&&r()},register:u=>(a.set(u,!1),()=>a.delete(u))}),i?[Math.random()]:[n]);return w.useMemo(()=>{a.forEach((u,f)=>a.set(f,!1))},[n]),R.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),s==="popLayout"&&(t=E.jsx(oC,{isPresent:n,children:t})),E.jsx(qi.Provider,{value:c,children:t})};function iC(){return new Map}function sC(t){return w.useEffect(()=>()=>t(),[])}const lr=t=>t.key||"";function aC(t,e){t.forEach(n=>{const r=lr(n);e.set(r,n)})}function lC(t){const e=[];return w.Children.forEach(t,n=>{w.isValidElement(n)&&e.push(n)}),e}const $m=({children:t,custom:e,initial:n=!0,onExitComplete:r,exitBeforeEnter:o,presenceAffectsLayout:i=!0,mode:s="sync"})=>{Ht(!o,"Replace exitBeforeEnter with mode='wait'");const a=w.useContext(Io).forceRender||Vm()[0],l=Nm(),c=lC(t);let u=c;const f=w.useRef(new Map).current,d=w.useRef(u),p=w.useRef(new Map).current,h=w.useRef(!0);if(Yi(()=>{h.current=!1,aC(c,p),d.current=u}),sC(()=>{h.current=!0,p.clear(),f.clear()}),h.current)return E.jsx(E.Fragment,{children:u.map(b=>E.jsx(dc,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:i,mode:s,children:b},lr(b)))});u=[...u];const m=d.current.map(lr),y=c.map(lr),v=m.length;for(let b=0;b<v;b++){const g=m[b];y.indexOf(g)===-1&&!f.has(g)&&f.set(g,void 0)}return s==="wait"&&f.size&&(u=[]),f.forEach((b,g)=>{if(y.indexOf(g)!==-1)return;const S=p.get(g);if(!S)return;const x=m.indexOf(g);let T=b;if(!T){const P=()=>{f.delete(g);const O=Array.from(p.keys()).filter(k=>!y.includes(k));if(O.forEach(k=>p.delete(k)),d.current=c.filter(k=>{const D=lr(k);return D===g||O.includes(D)}),!f.size){if(l.current===!1)return;a(),r&&r()}};T=E.jsx(dc,{isPresent:!1,onExitComplete:P,custom:e,presenceAffectsLayout:i,mode:s,children:S},lr(S)),f.set(g,T)}u.splice(x,0,T)}),u=u.map(b=>{const g=b.key;return f.has(g)?b:E.jsx(dc,{isPresent:!0,presenceAffectsLayout:i,mode:s,children:b},lr(b))}),process.env.NODE_ENV!=="production"&&s==="wait"&&u.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),E.jsx(E.Fragment,{children:f.size?u:u.map(b=>w.cloneElement(b))})},cC=w.createContext(null),uC=t=>!t.isLayoutDirty&&t.willUpdate(!1);function jm(){const t=new Set,e=new WeakMap,n=()=>t.forEach(uC);return{add:r=>{t.add(r),e.set(r,r.addEventListener("willUpdate",n))},remove:r=>{t.delete(r);const o=e.get(r);o&&(o(),e.delete(r)),n()},dirty:n}}const Bm=t=>t===!0,fC=t=>Bm(t===!0)||t==="id",dC=({children:t,id:e,inherit:n=!0})=>{const r=w.useContext(Io),o=w.useContext(cC),[i,s]=Vm(),a=w.useRef(null),l=r.id||o;a.current===null&&(fC(n)&&l&&(e=e?l+"-"+e:l),a.current={id:e,group:Bm(n)&&r.group||jm()});const c=w.useMemo(()=>({...a.current,forceRender:i}),[s]);return E.jsx(Io.Provider,{value:c,children:t})},zm=w.createContext(null);function pC(t,e,n,r){if(!r)return t;const o=t.findIndex(u=>u.value===e);if(o===-1)return t;const i=r>0?1:-1,s=t[o+i];if(!s)return t;const a=t[o],l=s.layout,c=Be(l.min,l.max,.5);return i===1&&a.layout.max+n>c||i===-1&&a.layout.min+n<c?TE(t,o,o+i):t}function hC({children:t,as:e="ul",axis:n="y",onReorder:r,values:o,...i},s){const a=nr(()=>fc(e)),l=[],c=w.useRef(!1);Ht(!!o,"Reorder.Group must be provided a values prop");const u={axis:n,registerItem:(f,d)=>{const p=l.findIndex(h=>f===h.value);p!==-1?l[p].layout=d[n]:l.push({value:f,layout:d[n]}),l.sort(yC)},updateOrder:(f,d,p)=>{if(c.current)return;const h=pC(l,f,d,p);l!==h&&(c.current=!0,r(h.map(gC).filter(m=>o.indexOf(m)!==-1)))}};return w.useEffect(()=>{c.current=!1}),E.jsx(a,{...i,ref:s,ignoreStrict:!0,children:E.jsx(zm.Provider,{value:u,children:t})})}const mC=w.forwardRef(hC);function gC(t){return t.value}function yC(t,e){return t.layout.min-e.layout.min}function pc(t){const e=nr(()=>jr(t)),{isStatic:n}=w.useContext(Ki);if(n){const[,r]=w.useState(t);w.useEffect(()=>e.on("change",r),[])}return e}const vC=t=>t&&typeof t=="object"&&t.mix,bC=t=>vC(t)?t.mix:void 0;function xC(...t){const e=!Array.isArray(t[0]),n=e?0:-1,r=t[0+n],o=t[1+n],i=t[2+n],s=t[3+n],a=Ch(o,i,{mixer:bC(i[0]),...s});return e?a(r):a}function Hm(t,e){const n=pc(e()),r=()=>n.set(e());return r(),Yi(()=>{const o=()=>_e.preRender(r,!1,!0),i=t.map(s=>s.on("change",o));return()=>{i.forEach(s=>s()),Xt(r)}}),n}function wC(t){jo.current=[],t();const e=Hm(jo.current,t);return jo.current=void 0,e}function SC(t,e,n,r){if(typeof t=="function")return wC(t);const o=typeof e=="function"?e:xC(e,n,r);return Array.isArray(t)?Wm(t,o):Wm([t],([i])=>o(i))}function Wm(t,e){const n=nr(()=>[]);return Hm(t,()=>{n.length=0;const r=t.length;for(let o=0;o<r;o++)n[o]=t[o].get();return e(n)})}function Um(t,e=0){return ct(t)?t:pc(e)}function TC({children:t,style:e={},value:n,as:r="li",onDrag:o,layout:i=!0,...s},a){const l=nr(()=>fc(r)),c=w.useContext(zm),u={x:Um(e.x),y:Um(e.y)},f=SC([u.x,u.y],([m,y])=>m||y?1:"unset");Ht(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:d,registerItem:p,updateOrder:h}=c;return E.jsx(l,{drag:d,...s,dragSnapToOrigin:!0,style:{...e,x:u.x,y:u.y,zIndex:f},layout:i,onDrag:(m,y)=>{const{velocity:v}=y;v[d]&&h(n,u[d].get(),v[d]),o&&o(m,y)},onLayoutMeasure:m=>p(n,m),ref:a,ignoreStrict:!0,children:t})}const EC=w.forwardRef(TC),ms={Group:mC,Item:EC};class CC{constructor(){this.componentControls=new Set}subscribe(e){return this.componentControls.add(e),()=>this.componentControls.delete(e)}start(e,n){this.componentControls.forEach(r=>{r.start(e.nativeEvent||e,n)})}}const AC=()=>new CC;function _C(){return nr(AC)}var PC=Object.defineProperty,Gm=Object.getOwnPropertySymbols,OC=Object.prototype.hasOwnProperty,IC=Object.prototype.propertyIsEnumerable,Km=(t,e,n)=>e in t?PC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,kC=(t,e)=>{for(var n in e||(e={}))OC.call(e,n)&&Km(t,n,e[n]);if(Gm)for(var n of Gm(e))IC.call(e,n)&&Km(t,n,e[n]);return t},hc=(t,e)=>{const n=t.length;for(let r=0;r<n;r++)if(e(t[r],r,t))return!0;return!1},DC=(t,e,n,r)=>ys(hc,t,e,n,r),Hr=t=>typeof t=="object",Vn=(t,e)=>{if(t===e)return!0;if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();if(!t||!e||!Hr(t)&&!Hr(e))return t===e;if(t.prototype!==e.prototype)return!1;const n=Object.keys(t);return n.length!==Object.keys(e).length?!1:n.every(r=>Vn(t[r],e[r]))},MC=(t,e)=>(Hr(t)||Array.isArray(t))&&e?t[e]:t,RC=t=>(e,n)=>e[t]===n[t]?0:e[t]>n[t]?1:-1,gs=t=>/[0-9.]+/.test(t),Zm=t=>["string","number"].includes(typeof t),qm=t=>t==null||(t==null?void 0:t.length)===0||t==="",Ym={eq:Vn,is:Object.is,"!=":(t,e)=>t!=e,"!==":(t,e)=>t!==e,"<":(t,e)=>t<e,"<=":(t,e)=>t<=e,"==":(t,e)=>t==e,"===":(t,e)=>t===e,">":(t,e)=>t>e,">=":(t,e)=>t>=e,includes:(t,e)=>`${t}`.includes(e),notIncludes:(t,e)=>!`${t}`.includes(e),startsWith:(t,e)=>`${t}`.startsWith(e),endsWith:(t,e)=>`${t}`.endsWith(e),like:(t,e)=>new RegExp(`.*${e}.*`,"gi").test(`${t}`),alphabetical:(t,e)=>t.toString().localeCompare(e.toString()),empty:qm,notEmpty:t=>!qm(t),in:(t,e)=>hc(e,n=>Vn(t,n)),notIn:(t,e)=>Xm(e,n=>!Vn(t,n))},FC=t=>{if(t in Ym)return Ym[t];throw new Error("Linq - Symbol not found")},Wr=(t,e)=>{const n=[],r=t.length;for(let o=0;o<r;o++)e(t[o],o,t)&&n.push(t[o]);return n},ys=(t,e,n,r,o)=>{if(typeof n=="function")return t(e,n);const i=FC(r);return n&&r&&o!==void 0?t(e,s=>i(s[n],o)):t(e,s=>i(s,o))},LC=(t,e,n,r)=>ys(Wr,t,e,n,r),Xm=(t,e)=>{for(let n=0;n<t.length;n++)if(!e(t[n],n,t))return!1;return!0},NC=(t,e,n,r)=>ys(Xm,t,e,n,r),Jm=t=>{if(t===null)return null;const e=kC({},t);return Object.keys(e).forEach(n=>e[n]=Hr(t[n])?Jm(t[n]):t[n]),Array.isArray(t)&&t.length?(e.length=t.length)&&Array.from(e):Array.isArray(t)?Array.from(t):e},Qm=(t,e)=>{if(Hr(e)){for(let n=0;n<t.length;n++){const r=t[n];if(Vn(e,r))return!0}return!1}for(let n=0;n<t.length;n++){const r=t[n];if(Vn(e,r))return!0}return!1},VC=(t,e)=>{const n=new Map(t.map(r=>[r[e],r]));return Object.fromEntries(n.entries())},$C=t=>Wr(t,(e,n,r)=>Hr(e)?n===r.findIndex(o=>Vn(o,e)):n===r.indexOf(e)),jC=(t,e)=>{const n=t.length;for(let r=0;r<n;r++)if(e(t[r],r,t))return t[r]},eg=(t,e)=>{const n=new Map;return t.forEach(r=>{const o=e(r),i=n.get(o)||[];i.push(r),n.set(o,i)}),Object.fromEntries(n.entries())},BC=(t,e)=>eg(t,n=>n[e]),tg=(t,e)=>{const n=[];let r=0;const o=t.length;for(r;r<o;r++){const i=e(t[r],r,t);n.push(i)}return n},zC=(t,e)=>{let n=Number.parseInt(t,10),r=Number.parseInt(e,10);return n>r?[r,n]:[n,r]},HC=(t,e,n=1)=>{const r=[];let o=t.charCodeAt(0);const i=e.charCodeAt(0);for(;o<=i;o+=n)r.push(String.fromCharCode(o));return gs(t)&&gs(e)?r.map(s=>Number.parseInt(s)):r},mc=(t,e,n=1)=>{let r=Math.abs(n);if((t.length>1||e.length>1)&&gs(t)&&gs(e)){const o=[],[i,s]=zC(t,e);for(let a=i;a<=s;a+=r)o.push(a);return o}return HC(t,e,r)},WC=(t,e,n=1)=>{if(e===void 0){const[r,o,i]=t.split("..");return i===void 0?mc(r,o,1):mc(r,i,Number.parseInt(o,10))}return Zm(t)&&Zm(e)?mc(`${t}`,`${e}`,n):Array.from({length:t},(r,o)=>o*Math.abs(e))},gc=(t,e,n)=>{let r=e;const o=n.length;for(let i=0;i<o;i++){const s=n[i];r=t(r,s,i,n)}return r},ng=t=>{const e=Array.from(t.values());let n=null,r=null,o=e.length;for(n=0;n<o/2;n+=1){r=o-1-n;let i=e[n];e[n]=e[r],e[r]=i}return e},UC=(t,e)=>{if(typeof e=="number")return t.slice(e);let n=t.length;for(let r=0;r<n;r++){const o=t[r];if(e(o,r,t))return t.slice(r)}return t.slice(0)},GC=(t,e,n,r)=>ys(UC,t,e,n,r),rg=(t,e)=>{const n=[...t];return e===void 0?n.sort():typeof e=="function"?n.toSorted(e):n.toSorted(RC(e))},KC=t=>(e,n)=>t.reduce((r,o)=>{const i=o.type==="desc"?-1:1,s=o.key,a=e[s]>n[s]?i:e[s]<n[s]?-i:0;return r!==0?r:a},0),ZC=(t,e)=>t.sort(KC(e)),qC=(t,e)=>{if(e===void 0)return[...new Set(t).values()];const n=new Set;return Array.isArray(e)?[...new Set(e)]:Wr(t,r=>{const o=e?n.has(r[e]):n.has(e);return e&&(o||n.add(r[e])),!o})},YC=class Lu{constructor(e=[]){this.array=e}static Range(...e){return WC(...e)}static New(e){return new Lu(e)}Where(e,n,r){return this.array=LC(this.array,e,n,r),this}Some(e,n,r){return DC(this.array,e,n,r)}All(e,n,r){return NC(this.array,e,n,r)}Reverse(){return this.array=ng(this.array),this}Add(e){return this.array=Array.isArray(e)?this.array.concat(e):this.array.concat([e]),this}Prepend(e){return this.array=Array.isArray(e)?e.concat(this.array):[e].concat(this.array),this}Select(e){return e===void 0?this.array:this.array.map(e)}Take(e,n){return n!==void 0?this.array=this.array.slice(e,Math.max(0,n)):this.array=this.array.slice(e),this}Head(){return this.array[0]}Tail(){return this.Skip(1)}Skip(e,n,r){return this.array=GC(this.array,e,n,r),this}Distinct(){return this.array=$C(this.array),this}First(e){return e===void 0?this.array[0]:jC(this.array,e)||null}Last(e){const n=this.array.length;if(e===void 0)return this.array[n-1];for(let r=n;r!==0;r--)if(e(this.array[r],r,this.array))return this.array[r]}Sum(e){return e===void 0?gc((n,r)=>n+r,0,this.array):gc((n,r)=>n+MC(r,e),0,this.array)}Average(e){return this.Sum(e)/this.array.length}GroupBy(e){return BC(this.array,e)}GroupWith(e){return eg(this.array,e)}Except(e){return Wr(this.array,n=>!Qm(e,n))}Intersect(e){return Wr(this.array,n=>Qm(e,n))}OrderBy(e,n){let r;return r=e?rg(this.array,e):this.array.toSorted(),this.array=n==="desc"?ng(r):r,this}Includes(e){return hc(this.array,n=>Vn(n,e))}In(e){const n=e.length;for(let r=0;r<n;r++){const o=e[r];if(this.Includes(o))return!0}return!1}Reduce(e,n){return gc(e,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(e){return new Map(tg(this.array,n=>[e,n]))}Zip(e,n){return tg(this.array,(r,o)=>n(r,e[o]))}Count(e){return e===void 0?this.array.length:Wr(this.array,e).length}Get(e){return this.array[e]}Clone(){return new Lu(Jm(this.array))}ToObject(e){return VC(this.array,e)}Sort(e){return Array.isArray(e)?ZC(this.array,e):rg(this.array,e)}Unique(e){return qC(this.array,e)}},og=YC;const vs=0,$n=1,Ur=2,ig=4;function bs(t,e){return n=>t(e(n))}function XC(t,e){return e(t)}function sg(t,e){return n=>t(e,n)}function ag(t,e){return()=>t(e)}function xs(t,e){return e(t),t}function ze(...t){return t}function JC(t){t()}function lg(t){return()=>t}function QC(...t){return()=>{t.map(JC)}}function yc(t){return t!==void 0}function Wo(){}function De(t,e){return t($n,e)}function ye(t,e){t(vs,e)}function vc(t){t(Ur)}function mt(t){return t(ig)}function ae(t,e){return De(t,sg(e,vs))}function Jt(t,e){const n=t($n,r=>{n(),e(r)});return n}function Te(){const t=[];return(e,n)=>{switch(e){case Ur:t.splice(0,t.length);return;case $n:return t.push(n),()=>{const r=t.indexOf(n);r>-1&&t.splice(r,1)};case vs:t.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${e}`)}}}function J(t){let e=t;const n=Te();return(r,o)=>{switch(r){case $n:o(e);break;case vs:e=o;break;case ig:return e}return n(r,o)}}function eA(t){let e,n;const r=()=>e&&e();return function(o,i){switch(o){case $n:return i?n===i?void 0:(r(),n=i,e=De(t,i),e):(r(),Wo);case Ur:r(),n=null;return;default:throw new Error(`unrecognized action ${o}`)}}}function Rt(t){return xs(Te(),e=>ae(t,e))}function bt(t,e){return xs(J(e),n=>ae(t,n))}function tA(...t){return e=>t.reduceRight(XC,e)}function U(t,...e){const n=tA(...e);return(r,o)=>{switch(r){case $n:return De(t,n(o));case Ur:vc(t);return}}}function cg(t,e){return t===e}function He(t=cg){let e;return n=>r=>{t(e,r)||(e=r,n(r))}}function fe(t){return e=>n=>{t(n)&&e(n)}}function ne(t){return e=>bs(e,t)}function Qt(t){return e=>()=>e(t)}function en(t,e){return n=>r=>n(e=t(e,r))}function Gr(t){return e=>n=>{t>0?t--:e(n)}}function jn(t){let e=null,n;return r=>o=>{e=o,!n&&(n=setTimeout(()=>{n=void 0,r(e)},t))}}function ug(t){let e,n;return r=>o=>{e=o,n&&clearTimeout(n),n=setTimeout(()=>{r(e)},t)}}function ve(...t){const e=new Array(t.length);let n=0,r=null;const o=Math.pow(2,t.length)-1;return t.forEach((i,s)=>{const a=Math.pow(2,s);De(i,l=>{const c=n;n=n|a,e[s]=l,c!==o&&n===o&&r&&(r(),r=null)})}),i=>s=>{const a=()=>i([s].concat(e));n===o?a():r=a}}function fg(...t){return function(e,n){switch(e){case $n:return QC(...t.map(r=>De(r,n)));case Ur:return;default:throw new Error(`unrecognized action ${e}`)}}}function pe(t,e=cg){return U(t,He(e))}function rt(...t){const e=Te(),n=new Array(t.length);let r=0;const o=Math.pow(2,t.length)-1;return t.forEach((i,s)=>{const a=Math.pow(2,s);De(i,l=>{n[s]=l,r=r|a,r===o&&ye(e,n)})}),function(i,s){switch(i){case $n:return r===o&&s(n),De(e,s);case Ur:return vc(e);default:throw new Error(`unrecognized action ${i}`)}}}function Me(t,e=[],{singleton:n}={singleton:!0}){return{id:nA(),constructor:t,dependencies:e,singleton:n}}const nA=()=>Symbol();function rA(t){const e=new Map,n=({id:r,constructor:o,dependencies:i,singleton:s})=>{if(s&&e.has(r))return e.get(r);const a=o(i.map(l=>n(l)));return s&&e.set(r,a),a};return n(t)}function oA(t,e){const n={},r={};let o=0;const i=t.length;for(;o<i;)r[t[o]]=1,o+=1;for(const s in e)r.hasOwnProperty(s)||(n[s]=e[s]);return n}const ws=typeof document<"u"?w.useLayoutEffect:w.useEffect;function dg(t,e,n){const r=Object.keys(e.required||{}),o=Object.keys(e.optional||{}),i=Object.keys(e.methods||{}),s=Object.keys(e.events||{}),a=w.createContext({});function l(v,b){v.propsReady&&ye(v.propsReady,!1);for(const g of r){const S=v[e.required[g]];ye(S,b[g])}for(const g of o)if(g in b){const S=v[e.optional[g]];ye(S,b[g])}v.propsReady&&ye(v.propsReady,!0)}function c(v){return i.reduce((b,g)=>(b[g]=S=>{const x=v[e.methods[g]];ye(x,S)},b),{})}function u(v){return s.reduce((b,g)=>(b[g]=eA(v[e.events[g]]),b),{})}const f=w.forwardRef((v,b)=>{const{children:g,...S}=v,[x]=w.useState(()=>xs(rA(t),P=>l(P,S))),[T]=w.useState(ag(u,x));return ws(()=>{for(const P of s)P in S&&De(T[P],S[P]);return()=>{Object.values(T).map(vc)}},[S,T,x]),ws(()=>{l(x,S)}),w.useImperativeHandle(b,lg(c(x))),w.createElement(a.Provider,{value:x},n?w.createElement(n,oA([...r,...o,...s],S),g):g)}),d=v=>w.useCallback(sg(ye,w.useContext(a)[v]),[v]),p=v=>{const g=w.useContext(a)[v],S=w.useCallback(x=>De(g,x),[g]);return w.useSyncExternalStore(S,()=>mt(g),()=>mt(g))},h=v=>{const g=w.useContext(a)[v],[S,x]=w.useState(ag(mt,g));return ws(()=>De(g,T=>{T!==S&&x(lg(T))}),[g,S]),S},m=w.version.startsWith("18")?p:h;return{Component:f,usePublisher:d,useEmitterValue:m,useEmitter:(v,b)=>{const S=w.useContext(a)[v];ws(()=>De(S,b),[b,S])}}}const iA=typeof document<"u"?w.useLayoutEffect:w.useEffect;var $t=(t=>(t[t.DEBUG=0]="DEBUG",t[t.INFO=1]="INFO",t[t.WARN=2]="WARN",t[t.ERROR=3]="ERROR",t))($t||{});const sA={0:"debug",1:"log",2:"warn",3:"error"},aA=()=>typeof globalThis>"u"?window:globalThis,Bn=Me(()=>{const t=J(3);return{log:J((n,r,o=1)=>{var i;const s=(i=aA().VIRTUOSO_LOG_LEVEL)!=null?i:mt(t);o>=s&&console[sA[o]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:t}},[],{singleton:!0});function bc(t,e=!0){const n=w.useRef(null);let r=o=>{};if(typeof ResizeObserver<"u"){const o=w.useMemo(()=>new ResizeObserver(i=>{requestAnimationFrame(()=>{const s=i[0].target;s.offsetParent!==null&&t(s)})}),[t]);r=i=>{i&&e?(o.observe(i),n.current=i):(n.current&&o.unobserve(n.current),n.current=null)}}return{ref:n,callbackRef:r}}function cr(t,e=!0){return bc(t,e).callbackRef}function lA(t,e,n,r,o,i,s){const a=w.useCallback(l=>{const c=cA(l.children,e,"offsetHeight",o);let u=l.parentElement;for(;!u.dataset.virtuosoScroller;)u=u.parentElement;const f=u.lastElementChild.dataset.viewportType==="window",d=s?s.scrollTop:f?window.pageYOffset||document.documentElement.scrollTop:u.scrollTop,p=s?s.scrollHeight:f?document.documentElement.scrollHeight:u.scrollHeight,h=s?s.offsetHeight:f?window.innerHeight:u.offsetHeight;r({scrollTop:Math.max(d,0),scrollHeight:p,viewportHeight:h}),c!==null&&t(c)},[t,e,o,i,s,r]);return bc(a,n)}function cA(t,e,n,r){const o=t.length;if(o===0)return null;const i=[];for(let s=0;s<o;s++){const a=t.item(s);if(!a||a.dataset.index===void 0)continue;const l=parseInt(a.dataset.index),c=parseFloat(a.dataset.knownSize),u=e(a,n);if(u===0&&r("Zero-sized element, this should not happen",{child:a},$t.ERROR),u===c)continue;const f=i[i.length-1];i.length===0||f.size!==u||f.endIndex!==l-1?i.push({startIndex:l,endIndex:l,size:u}):i[i.length-1].endIndex++}return i}function zn(t,e){return Math.round(t.getBoundingClientRect()[e])}function pg(t,e){return Math.abs(t-e)<1.01}function hg(t,e,n,r=Wo,o){const i=w.useRef(null),s=w.useRef(null),a=w.useRef(null),l=w.useCallback(f=>{const d=f.target,p=d===window||d===document,h=p?window.pageYOffset||document.documentElement.scrollTop:d.scrollTop,m=p?document.documentElement.scrollHeight:d.scrollHeight,y=p?window.innerHeight:d.offsetHeight,v=()=>{t({scrollTop:Math.max(h,0),scrollHeight:m,viewportHeight:y})};f.suppressFlushSync?v():Nu.flushSync(v),s.current!==null&&(h===s.current||h<=0||h===m-y)&&(s.current=null,e(!0),a.current&&(clearTimeout(a.current),a.current=null))},[t,e]);w.useEffect(()=>{const f=o||i.current;return r(o||i.current),l({target:f,suppressFlushSync:!0}),f.addEventListener("scroll",l,{passive:!0}),()=>{r(null),f.removeEventListener("scroll",l)}},[i,l,n,r,o]);function c(f){const d=i.current;if(!d||"offsetHeight"in d&&d.offsetHeight===0)return;const p=f.behavior==="smooth";let h,m,y;d===window?(m=Math.max(zn(document.documentElement,"height"),document.documentElement.scrollHeight),h=window.innerHeight,y=document.documentElement.scrollTop):(m=d.scrollHeight,h=zn(d,"height"),y=d.scrollTop);const v=m-h;if(f.top=Math.ceil(Math.max(Math.min(v,f.top),0)),pg(h,m)||f.top===y){t({scrollTop:y,scrollHeight:m,viewportHeight:h}),p&&e(!0);return}p?(s.current=f.top,a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{a.current=null,s.current=null,e(!0)},1e3)):s.current=null,d.scrollTo(f)}function u(f){i.current.scrollBy(f)}return{scrollerRef:i,scrollByCallback:u,scrollToCallback:c}}const xt=Me(()=>{const t=Te(),e=Te(),n=J(0),r=Te(),o=J(0),i=Te(),s=Te(),a=J(0),l=J(0),c=J(0),u=J(0),f=Te(),d=Te(),p=J(!1);return ae(U(t,ne(({scrollTop:h})=>h)),e),ae(U(t,ne(({scrollHeight:h})=>h)),s),ae(e,o),{scrollContainerState:t,scrollTop:e,viewportHeight:i,headerHeight:a,fixedHeaderHeight:l,fixedFooterHeight:c,footerHeight:u,scrollHeight:s,smoothScrollTargetReached:r,scrollTo:f,scrollBy:d,statefulScrollTop:o,deviation:n,scrollingInProgress:p}},[],{singleton:!0}),Uo={lvl:0};function mg(t,e,n,r=Uo,o=Uo){return{k:t,v:e,lvl:n,l:r,r:o}}function Ne(t){return t===Uo}function Kr(){return Uo}function xc(t,e){if(Ne(t))return Uo;const{k:n,l:r,r:o}=t;if(e===n){if(Ne(r))return o;if(Ne(o))return r;{const[i,s]=gg(r);return Ss(Qe(t,{k:i,v:s,l:yg(r)}))}}else return e<n?Ss(Qe(t,{l:xc(r,e)})):Ss(Qe(t,{r:xc(o,e)}))}function Go(t,e){if(!Ne(t))return e===t.k?t.v:e<t.k?Go(t.l,e):Go(t.r,e)}function Wt(t,e,n="k"){if(Ne(t))return[-1/0,void 0];if(Number(t[n])===e)return[t.k,t.v];if(Number(t[n])<e){const r=Wt(t.r,e,n);return r[0]===-1/0?[t.k,t.v]:r}return Wt(t.l,e,n)}function Ft(t,e,n){return Ne(t)?mg(e,n,1):e===t.k?Qe(t,{k:e,v:n}):e<t.k?vg(Qe(t,{l:Ft(t.l,e,n)})):vg(Qe(t,{r:Ft(t.r,e,n)}))}function wc(t,e,n){if(Ne(t))return[];const{k:r,v:o,l:i,r:s}=t;let a=[];return r>e&&(a=a.concat(wc(i,e,n))),r>=e&&r<=n&&a.push({k:r,v:o}),r<=n&&(a=a.concat(wc(s,e,n))),a}function ur(t){return Ne(t)?[]:[...ur(t.l),{k:t.k,v:t.v},...ur(t.r)]}function gg(t){return Ne(t.r)?[t.k,t.v]:gg(t.r)}function yg(t){return Ne(t.r)?t.l:Ss(Qe(t,{r:yg(t.r)}))}function Qe(t,e){return mg(e.k!==void 0?e.k:t.k,e.v!==void 0?e.v:t.v,e.lvl!==void 0?e.lvl:t.lvl,e.l!==void 0?e.l:t.l,e.r!==void 0?e.r:t.r)}function Sc(t){return Ne(t)||t.lvl>t.r.lvl}function vg(t){return Tc(xg(t))}function Ss(t){const{l:e,r:n,lvl:r}=t;if(n.lvl>=r-1&&e.lvl>=r-1)return t;if(r>n.lvl+1){if(Sc(e))return xg(Qe(t,{lvl:r-1}));if(!Ne(e)&&!Ne(e.r))return Qe(e.r,{l:Qe(e,{r:e.r.l}),r:Qe(t,{l:e.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(Sc(t))return Tc(Qe(t,{lvl:r-1}));if(!Ne(n)&&!Ne(n.l)){const o=n.l,i=Sc(o)?n.lvl-1:n.lvl;return Qe(o,{l:Qe(t,{r:o.l,lvl:r-1}),r:Tc(Qe(n,{l:o.r,lvl:i})),lvl:o.lvl+1})}else throw new Error("Unexpected empty nodes")}}function Ts(t,e,n){if(Ne(t))return[];const r=Wt(t,e)[0];return uA(wc(t,r,n))}function bg(t,e){const n=t.length;if(n===0)return[];let{index:r,value:o}=e(t[0]);const i=[];for(let s=1;s<n;s++){const{index:a,value:l}=e(t[s]);i.push({start:r,end:a-1,value:o}),r=a,o=l}return i.push({start:r,end:1/0,value:o}),i}function uA(t){return bg(t,({k:e,v:n})=>({index:e,value:n}))}function Tc(t){const{r:e,lvl:n}=t;return!Ne(e)&&!Ne(e.r)&&e.lvl===n&&e.r.lvl===n?Qe(e,{l:Qe(t,{r:e.l}),lvl:n+1}):t}function xg(t){const{l:e}=t;return!Ne(e)&&e.lvl===t.lvl?Qe(e,{r:Qe(t,{l:e.r})}):t}function Es(t,e,n,r=0){let o=t.length-1;for(;r<=o;){const i=Math.floor((r+o)/2),s=t[i],a=n(s,e);if(a===0)return i;if(a===-1){if(o-r<2)return i-1;o=i-1}else{if(o===r)return i;r=i+1}}throw new Error(`Failed binary finding record in array - ${t.join(",")}, searched for ${e}`)}function wg(t,e,n){return t[Es(t,e,n)]}function fA(t,e,n,r){const o=Es(t,e,r),i=Es(t,n,r,o);return t.slice(o,i+1)}const Ec=Me(()=>({recalcInProgress:J(!1)}),[],{singleton:!0});function dA(t){const{size:e,startIndex:n,endIndex:r}=t;return o=>o.start===n&&(o.end===r||o.end===1/0)&&o.value===e}function Sg(t,e){let n=0,r=0;for(;n<t;)n+=e[r+1]-e[r]-1,r++;return r-(n===t?0:1)}function pA(t,e){let n=Ne(t)?0:1/0;for(const r of e){const{size:o,startIndex:i,endIndex:s}=r;if(n=Math.min(n,i),Ne(t)){t=Ft(t,0,o);continue}const a=Ts(t,i-1,s+1);if(a.some(dA(r)))continue;let l=!1,c=!1;for(const{start:u,end:f,value:d}of a)l?(s>=u||o===d)&&(t=xc(t,u)):(c=d!==o,l=!0),f>s&&s>=u&&d!==o&&(t=Ft(t,s+1,d));c&&(t=Ft(t,i,o))}return[t,n]}function hA(){return{offsetTree:[],sizeTree:Kr(),groupOffsetTree:Kr(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function Cc({index:t},e){return e===t?0:e<t?-1:1}function mA({offset:t},e){return e===t?0:e<t?-1:1}function gA(t){return{index:t.index,value:t}}function yA(t,e,n,r=0){return r>0&&(e=Math.max(e,wg(t,r,Cc).offset)),bg(fA(t,e,n,mA),gA)}function Ac(t,e,n,r){let o=t,i=0,s=0,a=0,l=0;if(e!==0){l=Es(o,e-1,Cc),a=o[l].offset;const u=Wt(n,e-1);i=u[0],s=u[1],o.length&&o[l].size===Wt(n,e)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of Ts(n,e,1/0)){const f=c-i,d=f*s+a+f*r;o.push({offset:d,size:u,index:c}),i=c,a=d,s=u}return{offsetTree:o,lastIndex:i,lastOffset:a,lastSize:s}}function vA(t,[e,n,r,o]){e.length>0&&r("received item sizes",e,$t.DEBUG);const i=t.sizeTree;let s=i,a=0;if(n.length>0&&Ne(i)&&e.length===2){const d=e[0].size,p=e[1].size;s=n.reduce((h,m)=>Ft(Ft(h,m,d),m+1,p),s)}else[s,a]=pA(s,e);if(s===i)return t;const{offsetTree:l,lastIndex:c,lastSize:u,lastOffset:f}=Ac(t.offsetTree,a,s,o);return{sizeTree:s,offsetTree:l,lastIndex:c,lastOffset:f,lastSize:u,groupOffsetTree:n.reduce((d,p)=>Ft(d,p,Ko(p,l,o)),Kr()),groupIndices:n}}function Ko(t,e,n){if(e.length===0)return 0;const{offset:r,index:o,size:i}=wg(e,t,Cc),s=t-o,a=i*s+(s-1)*n+r;return a>0?a+n:a}function bA(t){return typeof t.groupIndex<"u"}function Tg(t,e,n){if(bA(t))return e.groupIndices[t.groupIndex]+1;{const r=t.index==="LAST"?n:t.index;let o=Eg(r,e);return o=Math.max(0,o,Math.min(n,o)),o}}function Eg(t,e){if(!Cs(e))return t;let n=0;for(;e.groupIndices[n]<=t+n;)n++;return t+n}function Cs(t){return!Ne(t.groupOffsetTree)}function xA(t){return ur(t).map(({k:e,v:n},r,o)=>{const i=o[r+1],s=i?i.k-1:1/0;return{startIndex:e,endIndex:s,size:n}})}const wA={offsetHeight:"height",offsetWidth:"width"},tn=Me(([{log:t},{recalcInProgress:e}])=>{const n=Te(),r=Te(),o=bt(r,0),i=Te(),s=Te(),a=J(0),l=J([]),c=J(void 0),u=J(void 0),f=J((x,T)=>zn(x,wA[T])),d=J(void 0),p=J(0),h=hA(),m=bt(U(n,ve(l,t,p),en(vA,h),He()),h),y=bt(U(l,He(),en((x,T)=>({prev:x.current,current:T}),{prev:[],current:[]}),ne(({prev:x})=>x)),[]);ae(U(l,fe(x=>x.length>0),ve(m,p),ne(([x,T,P])=>{const O=x.reduce((k,D,L)=>Ft(k,D,Ko(D,T.offsetTree,P)||L),Kr());return{...T,groupIndices:x,groupOffsetTree:O}})),m),ae(U(r,ve(m),fe(([x,{lastIndex:T}])=>x<T),ne(([x,{lastIndex:T,lastSize:P}])=>[{startIndex:x,endIndex:T,size:P}])),n),ae(c,u);const v=bt(U(c,ne(x=>x===void 0)),!0);ae(U(u,fe(x=>x!==void 0&&Ne(mt(m).sizeTree)),ne(x=>[{startIndex:0,endIndex:0,size:x}])),n);const b=Rt(U(n,ve(m),en(({sizes:x},[T,P])=>({changed:P!==x,sizes:P}),{changed:!1,sizes:h}),ne(x=>x.changed)));De(U(a,en((x,T)=>({diff:x.prev-T,prev:T}),{diff:0,prev:0}),ne(x=>x.diff)),x=>{const{groupIndices:T}=mt(m);if(x>0)ye(e,!0),ye(i,x+Sg(x,T));else if(x<0){const P=mt(y);P.length>0&&(x-=Sg(-x,P)),ye(s,x)}}),De(U(a,ve(t)),([x,T])=>{x<0&&T("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:a},$t.ERROR)});const g=Rt(i);ae(U(i,ve(m),ne(([x,T])=>{const P=T.groupIndices.length>0,O=[],k=T.lastSize;if(P){const D=Go(T.sizeTree,0);let L=0,A=0;for(;L<x;){const _=T.groupIndices[A],M=T.groupIndices.length===A+1?1/0:T.groupIndices[A+1]-_-1;O.push({startIndex:_,endIndex:_,size:D}),O.push({startIndex:_+1,endIndex:_+1+M-1,size:k}),A++,L+=M+1}const j=ur(T.sizeTree);return L!==x&&j.shift(),j.reduce((_,{k:M,v:N})=>{let z=_.ranges;return _.prevSize!==0&&(z=[..._.ranges,{startIndex:_.prevIndex,endIndex:M+x-1,size:_.prevSize}]),{ranges:z,prevIndex:M+x,prevSize:N}},{ranges:O,prevIndex:x,prevSize:0}).ranges}return ur(T.sizeTree).reduce((D,{k:L,v:A})=>({ranges:[...D.ranges,{startIndex:D.prevIndex,endIndex:L+x-1,size:D.prevSize}],prevIndex:L+x,prevSize:A}),{ranges:[],prevIndex:0,prevSize:k}).ranges})),n);const S=Rt(U(s,ve(m,p),ne(([x,{offsetTree:T},P])=>{const O=-x;return Ko(O,T,P)})));return ae(U(s,ve(m,p),ne(([x,T,P])=>{if(T.groupIndices.length>0){if(Ne(T.sizeTree))return T;let k=Kr();const D=mt(y);let L=0,A=0,j=0;for(;L<-x;){j=D[A];const _=D[A+1]-j-1;A++,L+=_+1}if(k=ur(T.sizeTree).reduce((_,{k:M,v:N})=>Ft(_,Math.max(0,M+x),N),k),L!==-x){const _=Go(T.sizeTree,j);k=Ft(k,0,_);const M=Wt(T.sizeTree,-x+1)[1];k=Ft(k,1,M)}return{...T,sizeTree:k,...Ac(T.offsetTree,0,k,P)}}else{const k=ur(T.sizeTree).reduce((D,{k:L,v:A})=>Ft(D,Math.max(0,L+x),A),Kr());return{...T,sizeTree:k,...Ac(T.offsetTree,0,k,P)}}})),m),{data:d,totalCount:r,sizeRanges:n,groupIndices:l,defaultItemSize:u,fixedItemSize:c,unshiftWith:i,shiftWith:s,shiftWithOffset:S,beforeUnshiftWith:g,firstItemIndex:a,gap:p,sizes:m,listRefresh:b,statefulTotalCount:o,trackItemSizes:v,itemSize:f}},ze(Bn,Ec),{singleton:!0}),SA=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Cg(t){const e=typeof t=="number"?{index:t}:t;return e.align||(e.align="start"),(!e.behavior||!SA)&&(e.behavior="auto"),e.offset||(e.offset=0),e}const Zo=Me(([{sizes:t,totalCount:e,listRefresh:n,gap:r},{scrollingInProgress:o,viewportHeight:i,scrollTo:s,smoothScrollTargetReached:a,headerHeight:l,footerHeight:c,fixedHeaderHeight:u,fixedFooterHeight:f},{log:d}])=>{const p=Te(),h=Te(),m=J(0);let y=null,v=null,b=null;function g(){y&&(y(),y=null),b&&(b(),b=null),v&&(clearTimeout(v),v=null),ye(o,!1)}return ae(U(p,ve(t,i,e,m,l,c,d),ve(r,u,f),ne(([[S,x,T,P,O,k,D,L],A,j,F])=>{const _=Cg(S),{align:M,behavior:N,offset:z}=_,q=P-1,C=Tg(_,x,q);let $=Ko(C,x.offsetTree,A)+k;M==="end"?($+=j+Wt(x.sizeTree,C)[1]-T+F,C===q&&($+=D)):M==="center"?$+=(j+Wt(x.sizeTree,C)[1]-T+F)/2:$-=O,z&&($+=z);const Y=re=>{g(),re?(L("retrying to scroll to",{location:S},$t.DEBUG),ye(p,S)):(ye(h,!0),L("list did not change, scroll successful",{},$t.DEBUG))};if(g(),N==="smooth"){let re=!1;b=De(n,ee=>{re=re||ee}),y=Jt(a,()=>{Y(re)})}else y=Jt(U(n,TA(150)),Y);return v=setTimeout(()=>{g()},1200),ye(o,!0),L("scrolling from index to",{index:C,top:$,behavior:N},$t.DEBUG),{top:$,behavior:N}})),s),{scrollToIndex:p,scrollTargetReached:h,topListHeight:m}},ze(tn,xt,Bn),{singleton:!0});function TA(t){return e=>{const n=setTimeout(()=>{e(!1)},t);return r=>{r&&(e(!0),clearTimeout(n))}}}const qo="up",Yo="down",EA="none",CA={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},AA=0,Xo=Me(([{scrollContainerState:t,scrollTop:e,viewportHeight:n,headerHeight:r,footerHeight:o,scrollBy:i}])=>{const s=J(!1),a=J(!0),l=Te(),c=Te(),u=J(4),f=J(AA),d=bt(U(fg(U(pe(e),Gr(1),Qt(!0)),U(pe(e),Gr(1),Qt(!1),ug(100))),He()),!1),p=bt(U(fg(U(i,Qt(!0)),U(i,Qt(!1),ug(200))),He()),!1);ae(U(rt(pe(e),pe(f)),ne(([b,g])=>b<=g),He()),a),ae(U(a,jn(50)),c);const h=Rt(U(rt(t,pe(n),pe(r),pe(o),pe(u)),en((b,[{scrollTop:g,scrollHeight:S},x,T,P,O])=>{const k=g+x-S>-O,D={viewportHeight:x,scrollTop:g,scrollHeight:S};if(k){let A,j;return g>b.state.scrollTop?(A="SCROLLED_DOWN",j=b.state.scrollTop-g):(A="SIZE_DECREASED",j=b.state.scrollTop-g||b.scrollTopDelta),{atBottom:!0,state:D,atBottomBecause:A,scrollTopDelta:j}}let L;return D.scrollHeight>b.state.scrollHeight?L="SIZE_INCREASED":x<b.state.viewportHeight?L="VIEWPORT_HEIGHT_DECREASING":g<b.state.scrollTop?L="SCROLLING_UPWARDS":L="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:L,state:D}},CA),He((b,g)=>b&&b.atBottom===g.atBottom))),m=bt(U(t,en((b,{scrollTop:g,scrollHeight:S,viewportHeight:x})=>{if(pg(b.scrollHeight,S))return{scrollTop:g,scrollHeight:S,jump:0,changed:!1};{const T=S-(g+x)<1;return b.scrollTop!==g&&T?{scrollHeight:S,scrollTop:g,jump:b.scrollTop-g,changed:!0}:{scrollHeight:S,scrollTop:g,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),fe(b=>b.changed),ne(b=>b.jump)),0);ae(U(h,ne(b=>b.atBottom)),s),ae(U(s,jn(50)),l);const y=J(Yo);ae(U(t,ne(({scrollTop:b})=>b),He(),en((b,g)=>mt(p)?{direction:b.direction,prevScrollTop:g}:{direction:g<b.prevScrollTop?qo:Yo,prevScrollTop:g},{direction:Yo,prevScrollTop:0}),ne(b=>b.direction)),y),ae(U(t,jn(50),Qt(EA)),y);const v=J(0);return ae(U(d,fe(b=>!b),Qt(0)),v),ae(U(e,jn(100),ve(d),fe(([b,g])=>!!g),en(([b,g],[S])=>[g,S],[0,0]),ne(([b,g])=>g-b)),v),{isScrolling:d,isAtTop:a,isAtBottom:s,atBottomState:h,atTopStateChange:c,atBottomStateChange:l,scrollDirection:y,atBottomThreshold:u,atTopThreshold:f,scrollVelocity:v,lastJumpDueToItemResize:m}},ze(xt)),Hn=Me(([{log:t}])=>{const e=J(!1),n=Rt(U(e,fe(r=>r),He()));return De(e,r=>{r&&mt(t)("props updated",{},$t.DEBUG)}),{propsReady:e,didMount:n}},ze(Bn),{singleton:!0});function _c(t,e){t==0?e():requestAnimationFrame(()=>_c(t-1,e))}function Pc(t,e){const n=e-1;return typeof t=="number"?t:t.index==="LAST"?n:t.index}const Jo=Me(([{sizes:t,listRefresh:e,defaultItemSize:n},{scrollTop:r},{scrollToIndex:o,scrollTargetReached:i},{didMount:s}])=>{const a=J(!0),l=J(0),c=J(!0);return ae(U(s,ve(l),fe(([u,f])=>!!f),Qt(!1)),a),ae(U(s,ve(l),fe(([u,f])=>!!f),Qt(!1)),c),De(U(rt(e,s),ve(a,t,n,c),fe(([[,u],f,{sizeTree:d},p,h])=>u&&(!Ne(d)||yc(p))&&!f&&!h),ve(l)),([,u])=>{Jt(i,()=>{ye(c,!0)}),_c(4,()=>{Jt(r,()=>{ye(a,!0)}),ye(o,u)})}),{scrolledToInitialItem:a,initialTopMostItemIndex:l,initialItemFinalLocationReached:c}},ze(tn,xt,Zo,Hn),{singleton:!0});function Ag(t){return t?t==="smooth"?"smooth":"auto":!1}const _A=(t,e)=>typeof t=="function"?Ag(t(e)):e&&Ag(t),PA=Me(([{totalCount:t,listRefresh:e},{isAtBottom:n,atBottomState:r},{scrollToIndex:o},{scrolledToInitialItem:i},{propsReady:s,didMount:a},{log:l},{scrollingInProgress:c}])=>{const u=J(!1),f=Te();let d=null;function p(m){ye(o,{index:"LAST",align:"end",behavior:m})}De(U(rt(U(pe(t),Gr(1)),a),ve(pe(u),n,i,c),ne(([[m,y],v,b,g,S])=>{let x=y&&g,T="auto";return x&&(T=_A(v,b||S),x=x&&!!T),{totalCount:m,shouldFollow:x,followOutputBehavior:T}}),fe(({shouldFollow:m})=>m)),({totalCount:m,followOutputBehavior:y})=>{d&&(d(),d=null),d=Jt(e,()=>{mt(l)("following output to ",{totalCount:m},$t.DEBUG),p(y),d=null})});function h(m){const y=Jt(r,v=>{m&&!v.atBottom&&v.notAtBottomBecause==="SIZE_INCREASED"&&!d&&(mt(l)("scrolling to bottom due to increased size",{},$t.DEBUG),p("auto"))});setTimeout(y,100)}return De(U(rt(pe(u),t,s),fe(([m,,y])=>m&&y),en(({value:m},[,y])=>({refreshed:m===y,value:y}),{refreshed:!1,value:0}),fe(({refreshed:m})=>m),ve(u,t)),([,m])=>{mt(i)&&h(m!==!1)}),De(f,()=>{h(mt(u)!==!1)}),De(rt(pe(u),r),([m,y])=>{m&&!y.atBottom&&y.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&p("auto")}),{followOutput:u,autoscrollToBottom:f}},ze(tn,Xo,Zo,Jo,Hn,Bn,xt));function OA(t){return t.reduce((e,n)=>(e.groupIndices.push(e.totalCount),e.totalCount+=n+1,e),{totalCount:0,groupIndices:[]})}const _g=Me(([{totalCount:t,groupIndices:e,sizes:n},{scrollTop:r,headerHeight:o}])=>{const i=Te(),s=Te(),a=Rt(U(i,ne(OA)));return ae(U(a,ne(l=>l.totalCount)),t),ae(U(a,ne(l=>l.groupIndices)),e),ae(U(rt(r,n,o),fe(([l,c])=>Cs(c)),ne(([l,c,u])=>Wt(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),He(),ne(l=>[l])),s),{groupCounts:i,topItemsIndexes:s}},ze(tn,xt));function Qo(t,e){return!!(t&&t[0]===e[0]&&t[1]===e[1])}function Pg(t,e){return!!(t&&t.startIndex===e.startIndex&&t.endIndex===e.endIndex)}const As="top",_s="bottom",Og="none";function Ig(t,e,n){return typeof t=="number"?n===qo&&e===As||n===Yo&&e===_s?t:0:n===qo?e===As?t.main:t.reverse:e===_s?t.main:t.reverse}function kg(t,e){return typeof t=="number"?t:t[e]||0}const Oc=Me(([{scrollTop:t,viewportHeight:e,deviation:n,headerHeight:r,fixedHeaderHeight:o}])=>{const i=Te(),s=J(0),a=J(0),l=J(0),c=bt(U(rt(pe(t),pe(e),pe(r),pe(i,Qo),pe(l),pe(s),pe(o),pe(n),pe(a)),ne(([u,f,d,[p,h],m,y,v,b,g])=>{const S=u-b,x=y+v,T=Math.max(d-S,0);let P=Og;const O=kg(g,As),k=kg(g,_s);return p-=b,p+=d+v,h+=d+v,h-=b,p>u+x-O&&(P=qo),h<u-T+f+k&&(P=Yo),P!==Og?[Math.max(S-d-Ig(m,As,P)-O,0),S-T-v+f+Ig(m,_s,P)+k]:null}),fe(u=>u!=null),He(Qo)),[0,0]);return{listBoundary:i,overscan:l,topListHeight:s,increaseViewportBy:a,visibleRange:c}},ze(xt),{singleton:!0});function IA(t,e,n){if(Cs(e)){const r=Eg(t,e);return[{index:Wt(e.groupOffsetTree,r)[0],size:0,offset:0},{index:r,size:0,offset:0,data:n&&n[0]}]}return[{index:t,size:0,offset:0,data:n&&n[0]}]}const Ic={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function Dg(t,e,n){if(t.length===0)return[];if(!Cs(e))return t.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const r=t[0].index,o=t[t.length-1].index,i=[],s=Ts(e.groupOffsetTree,r,o);let a,l=0;for(const c of t){(!a||a.end<c.index)&&(a=s.shift(),l=e.groupIndices.indexOf(a.start));let u;c.index===a.start?u={type:"group",index:l}:u={index:c.index-(l+1)+n,groupIndex:l},i.push({...u,size:c.size,offset:c.offset,originalIndex:c.index,data:c.data})}return i}function Ps(t,e,n,r,o,i){const{lastSize:s,lastOffset:a,lastIndex:l}=o;let c=0,u=0;if(t.length>0){c=t[0].offset;const m=t[t.length-1];u=m.offset+m.size}const f=n-l,d=a+f*s+(f-1)*r,p=c,h=d-u;return{items:Dg(t,o,i),topItems:Dg(e,o,i),topListHeight:e.reduce((m,y)=>y.size+m,0),offsetTop:c,offsetBottom:h,top:p,bottom:u,totalCount:n,firstItemIndex:i}}function Mg(t,e,n,r,o,i){let s=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-s>=t)break;s++}const a=t+s,l=Pc(e,a),c=Array.from({length:a}).map((u,f)=>({index:f+l,size:0,offset:0,data:i[f+l]}));return Ps(c,[],a,o,n,r)}const fr=Me(([{sizes:t,totalCount:e,data:n,firstItemIndex:r,gap:o},i,{visibleRange:s,listBoundary:a,topListHeight:l},{scrolledToInitialItem:c,initialTopMostItemIndex:u},{topListHeight:f},d,{didMount:p},{recalcInProgress:h}])=>{const m=J([]),y=J(0),v=Te();ae(i.topItemsIndexes,m);const b=bt(U(rt(p,h,pe(s,Qo),pe(e),pe(t),pe(u),c,pe(m),pe(r),pe(o),n),fe(([T,P,,O,,,,,,,k])=>{const D=k&&k.length!==O;return T&&!P&&!D}),ne(([,,[T,P],O,k,D,L,A,j,F,_])=>{const M=k,{sizeTree:N,offsetTree:z}=M,q=mt(y);if(O===0)return{...Ic,totalCount:O};if(T===0&&P===0)return q===0?{...Ic,totalCount:O}:Mg(q,D,k,j,F,_||[]);if(Ne(N))return q>0?null:Ps(IA(Pc(D,O),M,_),[],O,F,M,j);const C=[];if(A.length>0){const H=A[0],I=A[A.length-1];let V=0;for(const W of Ts(N,H,I)){const K=W.value,X=Math.max(W.start,H),le=Math.min(W.end,I);for(let B=X;B<=le;B++)C.push({index:B,size:K,offset:V,data:_&&_[B]}),V+=K}}if(!L)return Ps([],C,O,F,M,j);const $=A.length>0?A[A.length-1]+1:0,Y=yA(z,T,P,$);if(Y.length===0)return null;const re=O-1,ee=xs([],H=>{for(const I of Y){const V=I.value;let W=V.offset,K=I.start;const X=V.size;if(V.offset<T){K+=Math.floor((T-V.offset+F)/(X+F));const B=K-I.start;W+=B*X+B*F}K<$&&(W+=($-K)*X,K=$);const le=Math.min(I.end,re);for(let B=K;B<=le&&!(W>=P);B++)H.push({index:B,size:X,offset:W,data:_&&_[B]}),W+=X+F}});return Ps(ee,C,O,F,M,j)}),fe(T=>T!==null),He()),Ic);ae(U(n,fe(yc),ne(T=>T==null?void 0:T.length)),e),ae(U(b,ne(T=>T.topListHeight)),f),ae(f,l),ae(U(b,ne(T=>[T.top,T.bottom])),a),ae(U(b,ne(T=>T.items)),v);const g=Rt(U(b,fe(({items:T})=>T.length>0),ve(e,n),fe(([{items:T},P])=>T[T.length-1].originalIndex===P-1),ne(([,T,P])=>[T-1,P]),He(Qo),ne(([T])=>T))),S=Rt(U(b,jn(200),fe(({items:T,topItems:P})=>T.length>0&&T[0].originalIndex===P.length),ne(({items:T})=>T[0].index),He())),x=Rt(U(b,fe(({items:T})=>T.length>0),ne(({items:T})=>{let P=0,O=T.length-1;for(;T[P].type==="group"&&P<O;)P++;for(;T[O].type==="group"&&O>P;)O--;return{startIndex:T[P].index,endIndex:T[O].index}}),He(Pg)));return{listState:b,topItemsIndexes:m,endReached:g,startReached:S,rangeChanged:x,itemsRendered:v,initialItemCount:y,...d}},ze(tn,_g,Oc,Jo,Zo,Xo,Hn,Ec),{singleton:!0}),kA=Me(([{sizes:t,firstItemIndex:e,data:n,gap:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:s},{didMount:a}])=>(ae(U(a,ve(i),fe(([,l])=>l!==0),ve(o,t,e,r,n),ne(([[,l],c,u,f,d,p=[]])=>Mg(l,c,u,f,d,p))),s),{}),ze(tn,Jo,fr,Hn),{singleton:!0}),Rg=Me(([{scrollVelocity:t}])=>{const e=J(!1),n=Te(),r=J(!1);return ae(U(t,ve(r,e,n),fe(([o,i])=>!!i),ne(([o,i,s,a])=>{const{exit:l,enter:c}=i;if(s){if(l(o,a))return!1}else if(c(o,a))return!0;return s}),He()),e),De(U(rt(e,t,n),ve(r)),([[o,i,s],a])=>o&&a&&a.change&&a.change(i,s)),{isSeeking:e,scrollSeekConfiguration:r,scrollVelocity:t,scrollSeekRangeChanged:n}},ze(Xo),{singleton:!0}),DA=Me(([{topItemsIndexes:t}])=>{const e=J(0);return ae(U(e,fe(n=>n>0),ne(n=>Array.from({length:n}).map((r,o)=>o))),t),{topItemCount:e}},ze(fr)),Fg=Me(([{footerHeight:t,headerHeight:e,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:o}])=>{const i=Te(),s=bt(U(rt(t,r,e,n,o),ne(([a,l,c,u,f])=>a+l+c+u+f.offsetBottom+f.bottom)),0);return ae(pe(s),i),{totalListHeight:s,totalListHeightChanged:i}},ze(xt,fr),{singleton:!0});function Lg(t){let e=!1,n;return()=>(e||(e=!0,n=t()),n)}const MA=Lg(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),RA=Me(([{scrollBy:t,scrollTop:e,deviation:n,scrollingInProgress:r},{isScrolling:o,isAtBottom:i,scrollDirection:s,lastJumpDueToItemResize:a},{listState:l},{beforeUnshiftWith:c,shiftWithOffset:u,sizes:f,gap:d},{log:p},{recalcInProgress:h}])=>{const m=Rt(U(l,ve(a),en(([,v,b,g],[{items:S,totalCount:x,bottom:T,offsetBottom:P},O])=>{const k=T+P;let D=0;return b===x&&v.length>0&&S.length>0&&(S[0].originalIndex===0&&v[0].originalIndex===0||(D=k-g,D!==0&&(D+=O))),[D,S,x,k]},[0,[],0,0]),fe(([v])=>v!==0),ve(e,s,r,i,p,h),fe(([,v,b,g,,,S])=>!S&&!g&&v!==0&&b===qo),ne(([[v],,,,,b])=>(b("Upward scrolling compensation",{amount:v},$t.DEBUG),v))));function y(v){v>0?(ye(t,{top:-v,behavior:"auto"}),ye(n,0)):(ye(n,0),ye(t,{top:-v,behavior:"auto"}))}return De(U(m,ve(n,o)),([v,b,g])=>{g&&MA()?ye(n,b-v):y(-v)}),De(U(rt(bt(o,!1),n,h),fe(([v,b,g])=>!v&&!g&&b!==0),ne(([v,b])=>b),jn(1)),y),ae(U(u,ne(v=>({top:-v}))),t),De(U(c,ve(f,d),ne(([v,{lastSize:b,groupIndices:g,sizeTree:S},x])=>{function T(P){return P*(b+x)}if(g.length===0)return T(v);{let P=0;const O=Go(S,0);let k=0,D=0;for(;k<v;){k++,P+=O;let L=g.length===D+1?1/0:g[D+1]-g[D]-1;k+L>v&&(P-=O,L=v-k+1),k+=L,P+=T(L),D++}return P}})),v=>{ye(n,v),requestAnimationFrame(()=>{ye(t,{top:v}),requestAnimationFrame(()=>{ye(n,0),ye(h,!1)})})}),{deviation:n}},ze(xt,Xo,fr,tn,Bn,Ec)),FA=Me(([{didMount:t},{scrollTo:e},{listState:n}])=>{const r=J(0);return De(U(t,ve(r),fe(([,o])=>o!==0),ne(([,o])=>({top:o}))),o=>{Jt(U(n,Gr(1),fe(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{ye(e,o)})})}),{initialScrollTop:r}},ze(Hn,xt,fr),{singleton:!0}),LA=Me(([{viewportHeight:t},{totalListHeight:e}])=>{const n=J(!1),r=bt(U(rt(n,t,e),fe(([o])=>o),ne(([,o,i])=>Math.max(0,o-i)),jn(0),He()),0);return{alignToBottom:n,paddingTopAddition:r}},ze(xt,Fg),{singleton:!0}),kc=Me(([{scrollTo:t,scrollContainerState:e}])=>{const n=Te(),r=Te(),o=Te(),i=J(!1),s=J(void 0);return ae(U(rt(n,r),ne(([{viewportHeight:a,scrollTop:l,scrollHeight:c},{offsetTop:u}])=>({scrollTop:Math.max(0,l-u),scrollHeight:c,viewportHeight:a}))),e),ae(U(t,ve(r),ne(([a,{offsetTop:l}])=>({...a,top:a.top+l}))),o),{useWindowScroll:i,customScrollParent:s,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:o}},ze(xt)),NA=({itemTop:t,itemBottom:e,viewportTop:n,viewportBottom:r,locationParams:{behavior:o,align:i,...s}})=>t<n?{...s,behavior:o,align:i??"start"}:e>r?{...s,behavior:o,align:i??"end"}:null,VA=Me(([{sizes:t,totalCount:e,gap:n},{scrollTop:r,viewportHeight:o,headerHeight:i,fixedHeaderHeight:s,fixedFooterHeight:a,scrollingInProgress:l},{scrollToIndex:c}])=>{const u=Te();return ae(U(u,ve(t,o,e,i,s,a,r),ve(n),ne(([[f,d,p,h,m,y,v,b],g])=>{const{done:S,behavior:x,align:T,calculateViewLocation:P=NA,...O}=f,k=Tg(f,d,h-1),D=Ko(k,d.offsetTree,g)+m+y,L=D+Wt(d.sizeTree,k)[1],A=b+y,j=b+p-v,F=P({itemTop:D,itemBottom:L,viewportTop:A,viewportBottom:j,locationParams:{behavior:x,align:T,...O}});return F?S&&Jt(U(l,fe(_=>_===!1),Gr(mt(l)?1:2)),S):S&&S(),F}),fe(f=>f!==null)),c),{scrollIntoView:u}},ze(tn,xt,Zo,fr,Bn),{singleton:!0}),$A=Me(([{sizes:t,sizeRanges:e},{scrollTop:n},{initialTopMostItemIndex:r},{didMount:o},{useWindowScroll:i,windowScrollContainerState:s,windowViewportRect:a}])=>{const l=Te(),c=J(void 0),u=J(null),f=J(null);return ae(s,u),ae(a,f),De(U(l,ve(t,n,i,u,f)),([d,p,h,m,y,v])=>{const b=xA(p.sizeTree);m&&y!==null&&v!==null&&(h=y.scrollTop-v.offsetTop),d({ranges:b,scrollTop:h})}),ae(U(c,fe(yc),ne(jA)),r),ae(U(o,ve(c),fe(([,d])=>d!==void 0),He(),ne(([,d])=>d.ranges)),e),{getState:l,restoreStateFrom:c}},ze(tn,xt,Jo,Hn,kc));function jA(t){return{offset:t.scrollTop,index:0,align:"start"}}const BA=Me(([t,e,n,r,o,i,s,a,l,c])=>({...t,...e,...n,...r,...o,...i,...s,...a,...l,...c}),ze(Oc,kA,Hn,Rg,Fg,FA,LA,kc,VA,Bn)),zA=Me(([{totalCount:t,sizeRanges:e,fixedItemSize:n,defaultItemSize:r,trackItemSizes:o,itemSize:i,data:s,firstItemIndex:a,groupIndices:l,statefulTotalCount:c,gap:u,sizes:f},{initialTopMostItemIndex:d,scrolledToInitialItem:p,initialItemFinalLocationReached:h},m,y,v,{listState:b,topItemsIndexes:g,...S},{scrollToIndex:x},T,{topItemCount:P},{groupCounts:O},k])=>(ae(S.rangeChanged,k.scrollSeekRangeChanged),ae(U(k.windowViewportRect,ne(D=>D.visibleHeight)),m.viewportHeight),{totalCount:t,data:s,firstItemIndex:a,sizeRanges:e,initialTopMostItemIndex:d,scrolledToInitialItem:p,initialItemFinalLocationReached:h,topItemsIndexes:g,topItemCount:P,groupCounts:O,fixedItemHeight:n,defaultItemHeight:r,gap:u,...v,statefulTotalCount:c,listState:b,scrollToIndex:x,trackItemSizes:o,itemSize:i,groupIndices:l,...S,...k,...m,sizes:f,...y}),ze(tn,Jo,xt,$A,PA,fr,Zo,RA,DA,_g,BA)),Dc="-webkit-sticky",Ng="sticky",Vg=Lg(()=>{if(typeof document>"u")return Ng;const t=document.createElement("div");return t.style.position=Dc,t.style.position===Dc?Dc:Ng});function $g(t,e){const n=w.useRef(null),r=w.useCallback(a=>{if(a===null||!a.offsetParent)return;const l=a.getBoundingClientRect(),c=l.width;let u,f;if(e){const d=e.getBoundingClientRect(),p=l.top-d.top;u=d.height-Math.max(0,p),f=p+e.scrollTop}else u=window.innerHeight-Math.max(0,l.top),f=l.top+window.pageYOffset;n.current={offsetTop:f,visibleHeight:u,visibleWidth:c},t(n.current)},[t,e]),{callbackRef:o,ref:i}=bc(r),s=w.useCallback(()=>{r(i.current)},[r,i]);return w.useEffect(()=>{if(e){e.addEventListener("scroll",s);const a=new ResizeObserver(()=>{requestAnimationFrame(s)});return a.observe(e),()=>{e.removeEventListener("scroll",s),a.unobserve(e)}}else return window.addEventListener("scroll",s),window.addEventListener("resize",s),()=>{window.removeEventListener("scroll",s),window.removeEventListener("resize",s)}},[s,e]),o}const jg=w.createContext(void 0),Bg=w.createContext(void 0);function zg(t){return t}Vg();const HA={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},Os=t=>({width:"100%",height:"100%",position:"absolute",top:0});Vg();function Pt(t,e){if(typeof t!="string")return{context:e}}function WA(t,e){return{item:typeof t=="string"?void 0:e}}function Hg({usePublisher:t,useEmitter:e,useEmitterValue:n}){return w.memo(function({style:i,children:s,...a}){const l=t("scrollContainerState"),c=n("ScrollerComponent"),u=t("smoothScrollTargetReached"),f=n("scrollerRef"),d=n("context"),{scrollerRef:p,scrollByCallback:h,scrollToCallback:m}=hg(l,u,c,f);return e("scrollTo",m),e("scrollBy",h),w.createElement(c,{ref:p,style:{...HA,...i},"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...a,...Pt(c,d)},s)})}function Wg({usePublisher:t,useEmitter:e,useEmitterValue:n}){return w.memo(function({style:i,children:s,...a}){const l=t("windowScrollContainerState"),c=n("ScrollerComponent"),u=t("smoothScrollTargetReached"),f=n("totalListHeight"),d=n("deviation"),p=n("customScrollParent"),h=n("context"),{scrollerRef:m,scrollByCallback:y,scrollToCallback:v}=hg(l,u,c,Wo,p);return iA(()=>(m.current=p||window,()=>{m.current=null}),[m,p]),e("windowScrollTo",v),e("scrollBy",y),w.createElement(c,{style:{position:"relative",...i,...f!==0?{height:f+d}:{}},"data-virtuoso-scroller":!0,...a,...Pt(c,h)},s)})}const Ug={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},UA={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:Gg,ceil:Kg,floor:Is,min:Mc,max:ei}=Math;function GA(t){return{...UA,items:t}}function Zg(t,e,n){return Array.from({length:e-t+1}).map((r,o)=>{const i=n===null?null:n[o+t];return{index:o+t,data:i}})}function KA(t,e){return t&&t.column===e.column&&t.row===e.row}function ks(t,e){return t&&t.width===e.width&&t.height===e.height}const ZA=Me(([{overscan:t,visibleRange:e,listBoundary:n},{scrollTop:r,viewportHeight:o,scrollBy:i,scrollTo:s,smoothScrollTargetReached:a,scrollContainerState:l,footerHeight:c,headerHeight:u},f,d,{propsReady:p,didMount:h},{windowViewportRect:m,useWindowScroll:y,customScrollParent:v,windowScrollContainerState:b,windowScrollTo:g},S])=>{const x=J(0),T=J(0),P=J(Ug),O=J({height:0,width:0}),k=J({height:0,width:0}),D=Te(),L=Te(),A=J(0),j=J(null),F=J({row:0,column:0}),_=Te(),M=Te(),N=J(!1),z=J(0),q=J(!0),C=J(!1);De(U(h,ve(z),fe(([I,V])=>!!V)),()=>{ye(q,!1),ye(T,0)}),De(U(rt(h,q,k,O,z,C),fe(([I,V,W,K,,X])=>I&&!V&&W.height!==0&&K.height!==0&&!X)),([,,,,I])=>{ye(C,!0),_c(1,()=>{ye(D,I)}),Jt(U(r),()=>{ye(n,[0,0]),ye(q,!0)})}),ae(U(M,fe(I=>I!=null&&I.scrollTop>0),Qt(0)),T),De(U(h,ve(M),fe(([,I])=>I!=null)),([,I])=>{I&&(ye(O,I.viewport),ye(k,I==null?void 0:I.item),ye(F,I.gap),I.scrollTop>0&&(ye(N,!0),Jt(U(r,Gr(1)),V=>{ye(N,!1)}),ye(s,{top:I.scrollTop})))}),ae(U(O,ne(({height:I})=>I)),o),ae(U(rt(pe(O,ks),pe(k,ks),pe(F,(I,V)=>I&&I.column===V.column&&I.row===V.row),pe(r)),ne(([I,V,W,K])=>({viewport:I,item:V,gap:W,scrollTop:K}))),_),ae(U(rt(pe(x),e,pe(F,KA),pe(k,ks),pe(O,ks),pe(j),pe(T),pe(N),pe(q),pe(z)),fe(([,,,,,,,I])=>!I),ne(([I,[V,W],K,X,le,B,ke,,We,Xe])=>{const{row:se,column:Ae}=K,{height:Se,width:Ce}=X,{width:he}=le;if(ke===0&&(I===0||he===0))return Ug;if(Ce===0){const nt=Pc(Xe,I),cn=nt===0?Math.max(ke-1,0):nt;return GA(Zg(nt,cn,B))}const Pe=Yg(he,Ce,Ae);let tt,Tt;We?V===0&&W===0&&ke>0?(tt=0,Tt=ke-1):(tt=Pe*Is((V+se)/(Se+se)),Tt=Pe*Kg((W+se)/(Se+se))-1,Tt=Mc(I-1,ei(Tt,Pe-1)),tt=Mc(Tt,ei(0,tt))):(tt=0,Tt=-1);const Z=Zg(tt,Tt,B),{top:oe,bottom:Fe}=qg(le,K,X,Z),Ke=Kg(I/Pe),ln=Ke*Se+(Ke-1)*se-Fe;return{items:Z,offsetTop:oe,offsetBottom:ln,top:oe,bottom:Fe,itemHeight:Se,itemWidth:Ce}})),P),ae(U(j,fe(I=>I!==null),ne(I=>I.length)),x),ae(U(rt(O,k,P,F),fe(([I,V,{items:W}])=>W.length>0&&V.height!==0&&I.height!==0),ne(([I,V,{items:W},K])=>{const{top:X,bottom:le}=qg(I,K,V,W);return[X,le]}),He(Qo)),n);const $=J(!1);ae(U(r,ve($),ne(([I,V])=>V||I!==0)),$);const Y=Rt(U(pe(P),fe(({items:I})=>I.length>0),ve(x,$),fe(([{items:I},V,W])=>W&&I[I.length-1].index===V-1),ne(([,I])=>I-1),He())),re=Rt(U(pe(P),fe(({items:I})=>I.length>0&&I[0].index===0),Qt(0),He())),ee=Rt(U(pe(P),ve(N),fe(([{items:I},V])=>I.length>0&&!V),ne(([{items:I}])=>({startIndex:I[0].index,endIndex:I[I.length-1].index})),He(Pg),jn(0)));ae(ee,d.scrollSeekRangeChanged),ae(U(D,ve(O,k,x,F),ne(([I,V,W,K,X])=>{const le=Cg(I),{align:B,behavior:ke,offset:We}=le;let Xe=le.index;Xe==="LAST"&&(Xe=K-1),Xe=ei(0,Xe,Mc(K-1,Xe));let se=Rc(V,X,W,Xe);return B==="end"?se=Gg(se-V.height+W.height):B==="center"&&(se=Gg(se-V.height/2+W.height/2)),We&&(se+=We),{top:se,behavior:ke}})),s);const H=bt(U(P,ne(I=>I.offsetBottom+I.bottom)),0);return ae(U(m,ne(I=>({width:I.visibleWidth,height:I.visibleHeight}))),O),{data:j,totalCount:x,viewportDimensions:O,itemDimensions:k,scrollTop:r,scrollHeight:L,overscan:t,scrollBy:i,scrollTo:s,scrollToIndex:D,smoothScrollTargetReached:a,windowViewportRect:m,windowScrollTo:g,useWindowScroll:y,customScrollParent:v,windowScrollContainerState:b,deviation:A,scrollContainerState:l,footerHeight:c,headerHeight:u,initialItemCount:T,gap:F,restoreStateFrom:M,...d,initialTopMostItemIndex:z,gridState:P,totalListHeight:H,...f,startReached:re,endReached:Y,rangeChanged:ee,stateChanged:_,propsReady:p,stateRestoreInProgress:N,...S}},ze(Oc,xt,Xo,Rg,Hn,kc,Bn));function qg(t,e,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{top:0,bottom:0};const i=Rc(t,e,n,r[0].index),s=Rc(t,e,n,r[r.length-1].index)+o;return{top:i,bottom:s}}function Rc(t,e,n,r){const o=Yg(t.width,n.width,e.column),i=Is(r/o),s=i*n.height+ei(0,i-1)*e.row;return s>0?s+e.row:s}function Yg(t,e,n){return ei(1,Is((t+n)/(Is(e)+n)))}const qA=Me(([t,e])=>({...t,...e}),ze(ZA,Me(()=>{const t=J(c=>`Item ${c}`),e=J({}),n=J(null),r=J("virtuoso-grid-item"),o=J("virtuoso-grid-list"),i=J(zg),s=J("div"),a=J(Wo),l=(c,u=null)=>bt(U(e,ne(f=>f[c]),He()),u);return{context:n,itemContent:t,components:e,computeItemKey:i,itemClassName:r,listClassName:o,headerFooterTag:s,scrollerRef:a,FooterComponent:l("Footer"),HeaderComponent:l("Header"),ListComponent:l("List","div"),ItemComponent:l("Item","div"),ScrollerComponent:l("Scroller","div"),ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}))),YA=w.memo(function(){const e=Ge("gridState"),n=Ge("listClassName"),r=Ge("itemClassName"),o=Ge("itemContent"),i=Ge("computeItemKey"),s=Ge("isSeeking"),a=Ut("scrollHeight"),l=Ge("ItemComponent"),c=Ge("ListComponent"),u=Ge("ScrollSeekPlaceholder"),f=Ge("context"),d=Ut("itemDimensions"),p=Ut("gap"),h=Ge("log"),m=Ge("stateRestoreInProgress"),y=cr(v=>{const b=v.parentElement.parentElement.scrollHeight;a(b);const g=v.firstChild;if(g){const{width:S,height:x}=g.getBoundingClientRect();d({width:S,height:x})}p({row:Jg("row-gap",getComputedStyle(v).rowGap,h),column:Jg("column-gap",getComputedStyle(v).columnGap,h)})});return m?null:w.createElement(c,{ref:y,className:n,...Pt(c,f),style:{paddingTop:e.offsetTop,paddingBottom:e.offsetBottom},"data-testid":"virtuoso-item-list"},e.items.map(v=>{const b=i(v.index,v.data,f);return s?w.createElement(u,{key:b,...Pt(u,f),index:v.index,height:e.itemHeight,width:e.itemWidth}):w.createElement(l,{...Pt(l,f),className:r,"data-index":v.index,key:b},o(v.index,v.data,f))}))}),XA=w.memo(function(){const e=Ge("HeaderComponent"),n=Ut("headerHeight"),r=Ge("headerFooterTag"),o=cr(s=>n(zn(s,"height"))),i=Ge("context");return e?w.createElement(r,{ref:o},w.createElement(e,Pt(e,i))):null}),JA=w.memo(function(){const e=Ge("FooterComponent"),n=Ut("footerHeight"),r=Ge("headerFooterTag"),o=cr(s=>n(zn(s,"height"))),i=Ge("context");return e?w.createElement(r,{ref:o},w.createElement(e,Pt(e,i))):null}),QA=({children:t})=>{const e=w.useContext(Bg),n=Ut("itemDimensions"),r=Ut("viewportDimensions"),o=cr(i=>{r(i.getBoundingClientRect())});return w.useEffect(()=>{e&&(r({height:e.viewportHeight,width:e.viewportWidth}),n({height:e.itemHeight,width:e.itemWidth}))},[e,r,n]),w.createElement("div",{style:Os(),ref:o},t)},e_=({children:t})=>{const e=w.useContext(Bg),n=Ut("windowViewportRect"),r=Ut("itemDimensions"),o=Ge("customScrollParent"),i=$g(n,o);return w.useEffect(()=>{e&&(r({height:e.itemHeight,width:e.itemWidth}),n({offsetTop:0,visibleHeight:e.viewportHeight,visibleWidth:e.viewportWidth}))},[e,n,r]),w.createElement("div",{ref:i,style:Os()},t)},t_=w.memo(function({...e}){const n=Ge("useWindowScroll"),r=Ge("customScrollParent"),o=r||n?r_:n_,i=r||n?e_:QA;return w.createElement(o,{...e},w.createElement(i,null,w.createElement(XA,null),w.createElement(YA,null),w.createElement(JA,null)))}),{Component:ck,usePublisher:Ut,useEmitterValue:Ge,useEmitter:Xg}=dg(qA,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged"}},t_),n_=Hg({usePublisher:Ut,useEmitterValue:Ge,useEmitter:Xg}),r_=Wg({usePublisher:Ut,useEmitterValue:Ge,useEmitter:Xg});function Jg(t,e,n){return e!=="normal"&&!(e!=null&&e.endsWith("px"))&&n(`${t} was not resolved to pixel value correctly`,e,$t.WARN),e==="normal"?0:parseInt(e??"0",10)}const o_=Me(([t,e])=>({...t,...e}),ze(zA,Me(()=>{const t=J(l=>w.createElement("td",null,"Item $",l)),e=J(null),n=J(null),r=J(null),o=J({}),i=J(zg),s=J(Wo),a=(l,c=null)=>bt(U(o,ne(u=>u[l]),He()),c);return{context:e,itemContent:t,fixedHeaderContent:n,fixedFooterContent:r,components:o,computeItemKey:i,scrollerRef:s,TableComponent:a("Table","table"),TableHeadComponent:a("TableHead","thead"),TableFooterComponent:a("TableFoot","tfoot"),TableBodyComponent:a("TableBody","tbody"),TableRowComponent:a("TableRow","tr"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder"),FillerRow:a("FillerRow")}}))),i_=({height:t})=>w.createElement("tr",null,w.createElement("td",{style:{height:t}})),s_=({height:t})=>w.createElement("tr",null,w.createElement("td",{style:{height:t,padding:0,border:0}})),a_={overflowAnchor:"none"},l_=w.memo(function(){const e=Re("listState"),n=Gt("sizeRanges"),r=Re("useWindowScroll"),o=Re("customScrollParent"),i=Gt("windowScrollContainerState"),s=Gt("scrollContainerState"),a=o||r?i:s,l=Re("itemContent"),c=Re("trackItemSizes"),u=Re("itemSize"),f=Re("log"),{callbackRef:d,ref:p}=lA(n,u,c,a,f,void 0,o),[h,m]=w.useState(0);Fc("deviation",M=>{h!==M&&(p.current.style.marginTop=`${M}px`,m(M))});const y=Re("EmptyPlaceholder"),v=Re("ScrollSeekPlaceholder")||i_,b=Re("FillerRow")||s_,g=Re("TableBodyComponent"),S=Re("TableRowComponent"),x=Re("computeItemKey"),T=Re("isSeeking"),P=Re("paddingTopAddition"),O=Re("firstItemIndex"),k=Re("statefulTotalCount"),D=Re("context");if(k===0&&y)return w.createElement(y,Pt(y,D));const L=e.offsetTop+P+h,A=e.offsetBottom,j=L>0?w.createElement(b,{height:L,key:"padding-top",context:D}):null,F=A>0?w.createElement(b,{height:A,key:"padding-bottom",context:D}):null,_=e.items.map(M=>{const N=M.originalIndex,z=x(N+O,M.data,D);return T?w.createElement(v,{...Pt(v,D),key:z,index:M.index,height:M.size,type:M.type||"item"}):w.createElement(S,{...Pt(S,D),...WA(S,M.data),key:z,"data-index":N,"data-known-size":M.size,"data-item-index":M.index,style:a_},l(M.index,M.data,D))});return w.createElement(g,{ref:d,"data-testid":"virtuoso-item-list",...Pt(g,D)},[j,..._,F])}),c_=({children:t})=>{const e=w.useContext(jg),n=Gt("viewportHeight"),r=Gt("fixedItemHeight"),o=cr(bs(n,i=>zn(i,"height")));return w.useEffect(()=>{e&&(n(e.viewportHeight),r(e.itemHeight))},[e,n,r]),w.createElement("div",{style:Os(),ref:o,"data-viewport-type":"element"},t)},u_=({children:t})=>{const e=w.useContext(jg),n=Gt("windowViewportRect"),r=Gt("fixedItemHeight"),o=Re("customScrollParent"),i=$g(n,o);return w.useEffect(()=>{e&&(r(e.itemHeight),n({offsetTop:0,visibleHeight:e.viewportHeight,visibleWidth:100}))},[e,n,r]),w.createElement("div",{ref:i,style:Os(),"data-viewport-type":"window"},t)},f_=w.memo(function(e){const n=Re("useWindowScroll"),r=Re("customScrollParent"),o=Gt("fixedHeaderHeight"),i=Gt("fixedFooterHeight"),s=Re("fixedHeaderContent"),a=Re("fixedFooterContent"),l=Re("context"),c=cr(bs(o,b=>zn(b,"height"))),u=cr(bs(i,b=>zn(b,"height"))),f=r||n?h_:p_,d=r||n?u_:c_,p=Re("TableComponent"),h=Re("TableHeadComponent"),m=Re("TableFooterComponent"),y=s?w.createElement(h,{key:"TableHead",style:{zIndex:2,position:"sticky",top:0},ref:c,...Pt(h,l)},s()):null,v=a?w.createElement(m,{key:"TableFoot",style:{zIndex:1,position:"sticky",bottom:0},ref:u,...Pt(m,l)},a()):null;return w.createElement(f,{...e},w.createElement(d,null,w.createElement(p,{style:{borderSpacing:0,overflowAnchor:"none"},...Pt(p,l)},[y,w.createElement(l_,{key:"TableBody"}),v])))}),{Component:d_,usePublisher:Gt,useEmitterValue:Re,useEmitter:Fc}=dg(o_,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},f_),p_=Hg({usePublisher:Gt,useEmitterValue:Re,useEmitter:Fc}),h_=Wg({usePublisher:Gt,useEmitterValue:Re,useEmitter:Fc}),m_=d_;var g_=Error,y_=EvalError,v_=RangeError,b_=ReferenceError,Qg=SyntaxError,ti=TypeError,x_=URIError,w_=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var o=42;e[n]=o;for(n in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var i=Object.getOwnPropertySymbols(e);if(i.length!==1||i[0]!==n||!Object.prototype.propertyIsEnumerable.call(e,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(e,n);if(s.value!==o||s.enumerable!==!0)return!1}return!0},ey=typeof Symbol<"u"&&Symbol,S_=w_,T_=function(){return typeof ey!="function"||typeof Symbol!="function"||typeof ey("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:S_()},Lc={__proto__:null,foo:{}},E_=Object,C_=function(){return{__proto__:Lc}.foo===Lc.foo&&!(Lc instanceof E_)},A_="Function.prototype.bind called on incompatible ",__=Object.prototype.toString,P_=Math.max,O_="[object Function]",ty=function(e,n){for(var r=[],o=0;o<e.length;o+=1)r[o]=e[o];for(var i=0;i<n.length;i+=1)r[i+e.length]=n[i];return r},I_=function(e,n){for(var r=[],o=n,i=0;o<e.length;o+=1,i+=1)r[i]=e[o];return r},k_=function(t,e){for(var n="",r=0;r<t.length;r+=1)n+=t[r],r+1<t.length&&(n+=e);return n},D_=function(e){var n=this;if(typeof n!="function"||__.apply(n)!==O_)throw new TypeError(A_+n);for(var r=I_(arguments,1),o,i=function(){if(this instanceof o){var u=n.apply(this,ty(r,arguments));return Object(u)===u?u:this}return n.apply(e,ty(r,arguments))},s=P_(0,n.length-r.length),a=[],l=0;l<s;l++)a[l]="$"+l;if(o=Function("binder","return function ("+k_(a,",")+"){ return binder.apply(this,arguments); }")(i),n.prototype){var c=function(){};c.prototype=n.prototype,o.prototype=new c,c.prototype=null}return o},M_=D_,Nc=Function.prototype.bind||M_,R_=Function.prototype.call,F_=Object.prototype.hasOwnProperty,L_=Nc,N_=L_.call(R_,F_),we,V_=g_,$_=y_,j_=v_,B_=b_,Zr=Qg,qr=ti,z_=x_,ny=Function,Vc=function(t){try{return ny('"use strict"; return ('+t+").constructor;")()}catch{}},dr=Object.getOwnPropertyDescriptor;if(dr)try{dr({},"")}catch{dr=null}var $c=function(){throw new qr},H_=dr?function(){try{return arguments.callee,$c}catch{try{return dr(arguments,"callee").get}catch{return $c}}}():$c,Yr=T_(),W_=C_(),ot=Object.getPrototypeOf||(W_?function(t){return t.__proto__}:null),Xr={},U_=typeof Uint8Array>"u"||!ot?we:ot(Uint8Array),pr={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?we:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?we:ArrayBuffer,"%ArrayIteratorPrototype%":Yr&&ot?ot([][Symbol.iterator]()):we,"%AsyncFromSyncIteratorPrototype%":we,"%AsyncFunction%":Xr,"%AsyncGenerator%":Xr,"%AsyncGeneratorFunction%":Xr,"%AsyncIteratorPrototype%":Xr,"%Atomics%":typeof Atomics>"u"?we:Atomics,"%BigInt%":typeof BigInt>"u"?we:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?we:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?we:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?we:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":V_,"%eval%":eval,"%EvalError%":$_,"%Float32Array%":typeof Float32Array>"u"?we:Float32Array,"%Float64Array%":typeof Float64Array>"u"?we:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?we:FinalizationRegistry,"%Function%":ny,"%GeneratorFunction%":Xr,"%Int8Array%":typeof Int8Array>"u"?we:Int8Array,"%Int16Array%":typeof Int16Array>"u"?we:Int16Array,"%Int32Array%":typeof Int32Array>"u"?we:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Yr&&ot?ot(ot([][Symbol.iterator]())):we,"%JSON%":typeof JSON=="object"?JSON:we,"%Map%":typeof Map>"u"?we:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Yr||!ot?we:ot(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?we:Promise,"%Proxy%":typeof Proxy>"u"?we:Proxy,"%RangeError%":j_,"%ReferenceError%":B_,"%Reflect%":typeof Reflect>"u"?we:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?we:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Yr||!ot?we:ot(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?we:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Yr&&ot?ot(""[Symbol.iterator]()):we,"%Symbol%":Yr?Symbol:we,"%SyntaxError%":Zr,"%ThrowTypeError%":H_,"%TypedArray%":U_,"%TypeError%":qr,"%Uint8Array%":typeof Uint8Array>"u"?we:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?we:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?we:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?we:Uint32Array,"%URIError%":z_,"%WeakMap%":typeof WeakMap>"u"?we:WeakMap,"%WeakRef%":typeof WeakRef>"u"?we:WeakRef,"%WeakSet%":typeof WeakSet>"u"?we:WeakSet};if(ot)try{null.error}catch(t){var G_=ot(ot(t));pr["%Error.prototype%"]=G_}var K_=function t(e){var n;if(e==="%AsyncFunction%")n=Vc("async function () {}");else if(e==="%GeneratorFunction%")n=Vc("function* () {}");else if(e==="%AsyncGeneratorFunction%")n=Vc("async function* () {}");else if(e==="%AsyncGenerator%"){var r=t("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(e==="%AsyncIteratorPrototype%"){var o=t("%AsyncGenerator%");o&&ot&&(n=ot(o.prototype))}return pr[e]=n,n},ry={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ni=Nc,Ds=N_,Z_=ni.call(Function.call,Array.prototype.concat),q_=ni.call(Function.apply,Array.prototype.splice),oy=ni.call(Function.call,String.prototype.replace),Ms=ni.call(Function.call,String.prototype.slice),Y_=ni.call(Function.call,RegExp.prototype.exec),X_=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,J_=/\\(\\)?/g,Q_=function(e){var n=Ms(e,0,1),r=Ms(e,-1);if(n==="%"&&r!=="%")throw new Zr("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Zr("invalid intrinsic syntax, expected opening `%`");var o=[];return oy(e,X_,function(i,s,a,l){o[o.length]=a?oy(l,J_,"$1"):s||i}),o},eP=function(e,n){var r=e,o;if(Ds(ry,r)&&(o=ry[r],r="%"+o[0]+"%"),Ds(pr,r)){var i=pr[r];if(i===Xr&&(i=K_(r)),typeof i>"u"&&!n)throw new qr("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:i}}throw new Zr("intrinsic "+e+" does not exist!")},Jr=function(e,n){if(typeof e!="string"||e.length===0)throw new qr("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new qr('"allowMissing" argument must be a boolean');if(Y_(/^%?[^%]*%?$/,e)===null)throw new Zr("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=Q_(e),o=r.length>0?r[0]:"",i=eP("%"+o+"%",n),s=i.name,a=i.value,l=!1,c=i.alias;c&&(o=c[0],q_(r,Z_([0,1],c)));for(var u=1,f=!0;u<r.length;u+=1){var d=r[u],p=Ms(d,0,1),h=Ms(d,-1);if((p==='"'||p==="'"||p==="`"||h==='"'||h==="'"||h==="`")&&p!==h)throw new Zr("property names with quotes must have matching quotes");if((d==="constructor"||!f)&&(l=!0),o+="."+d,s="%"+o+"%",Ds(pr,s))a=pr[s];else if(a!=null){if(!(d in a)){if(!n)throw new qr("base intrinsic for "+e+" exists, but the property is not available.");return}if(dr&&u+1>=r.length){var m=dr(a,d);f=!!m,f&&"get"in m&&!("originalValue"in m.get)?a=m.get:a=a[d]}else f=Ds(a,d),a=a[d];f&&!l&&(pr[s]=a)}}return a},iy={exports:{}},jc,sy;function Bc(){if(sy)return jc;sy=1;var t=Jr,e=t("%Object.defineProperty%",!0)||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return jc=e,jc}var tP=Jr,Rs=tP("%Object.getOwnPropertyDescriptor%",!0);if(Rs)try{Rs([],"length")}catch{Rs=null}var ay=Rs,ly=Bc(),nP=Qg,Qr=ti,cy=ay,rP=function(e,n,r){if(!e||typeof e!="object"&&typeof e!="function")throw new Qr("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new Qr("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Qr("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Qr("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Qr("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Qr("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,s=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,l=!!cy&&cy(e,n);if(ly)ly(e,n,{configurable:s===null&&l?l.configurable:!s,enumerable:o===null&&l?l.enumerable:!o,value:r,writable:i===null&&l?l.writable:!i});else if(a||!o&&!i&&!s)e[n]=r;else throw new nP("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},zc=Bc(),uy=function(){return!!zc};uy.hasArrayLengthDefineBug=function(){if(!zc)return null;try{return zc([],"length",{value:1}).length!==1}catch{return!0}};var oP=uy,iP=Jr,fy=rP,sP=oP(),dy=ay,py=ti,aP=iP("%Math.floor%"),lP=function(e,n){if(typeof e!="function")throw new py("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||aP(n)!==n)throw new py("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],o=!0,i=!0;if("length"in e&&dy){var s=dy(e,"length");s&&!s.configurable&&(o=!1),s&&!s.writable&&(i=!1)}return(o||i||!r)&&(sP?fy(e,"length",n,!0,!0):fy(e,"length",n)),e};(function(t){var e=Nc,n=Jr,r=lP,o=ti,i=n("%Function.prototype.apply%"),s=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||e.call(s,i),l=Bc(),c=n("%Math.max%");t.exports=function(d){if(typeof d!="function")throw new o("a function is required");var p=a(e,s,arguments);return r(p,1+c(0,d.length-(arguments.length-1)),!0)};var u=function(){return a(e,i,arguments)};l?l(t.exports,"apply",{value:u}):t.exports.apply=u})(iy);var cP=iy.exports,hy=Jr,my=cP,uP=my(hy("String.prototype.indexOf")),fP=function(e,n){var r=hy(e,!!n);return typeof r=="function"&&uP(e,".prototype.")>-1?my(r):r};const dP=Px(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Hc=typeof Map=="function"&&Map.prototype,Wc=Object.getOwnPropertyDescriptor&&Hc?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Fs=Hc&&Wc&&typeof Wc.get=="function"?Wc.get:null,gy=Hc&&Map.prototype.forEach,Uc=typeof Set=="function"&&Set.prototype,Gc=Object.getOwnPropertyDescriptor&&Uc?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Ls=Uc&&Gc&&typeof Gc.get=="function"?Gc.get:null,yy=Uc&&Set.prototype.forEach,pP=typeof WeakMap=="function"&&WeakMap.prototype,ri=pP?WeakMap.prototype.has:null,hP=typeof WeakSet=="function"&&WeakSet.prototype,oi=hP?WeakSet.prototype.has:null,mP=typeof WeakRef=="function"&&WeakRef.prototype,vy=mP?WeakRef.prototype.deref:null,gP=Boolean.prototype.valueOf,yP=Object.prototype.toString,vP=Function.prototype.toString,bP=String.prototype.match,Kc=String.prototype.slice,Wn=String.prototype.replace,xP=String.prototype.toUpperCase,by=String.prototype.toLowerCase,xy=RegExp.prototype.test,wy=Array.prototype.concat,nn=Array.prototype.join,wP=Array.prototype.slice,Sy=Math.floor,Zc=typeof BigInt=="function"?BigInt.prototype.valueOf:null,qc=Object.getOwnPropertySymbols,Yc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,eo=typeof Symbol=="function"&&typeof Symbol.iterator=="object",gt=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===eo||!0)?Symbol.toStringTag:null,Ty=Object.prototype.propertyIsEnumerable,Ey=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function Cy(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||xy.call(/e/,e))return e;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var r=t<0?-Sy(-t):Sy(t);if(r!==t){var o=String(r),i=Kc.call(e,o.length+1);return Wn.call(o,n,"$&_")+"."+Wn.call(Wn.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Wn.call(e,n,"$&_")}var Xc=dP,Ay=Xc.custom,_y=Iy(Ay)?Ay:null,SP=function t(e,n,r,o){var i=n||{};if(Un(i,"quoteStyle")&&i.quoteStyle!=="single"&&i.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Un(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=Un(i,"customInspect")?i.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Un(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Un(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=i.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return Dy(e,i);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var l=String(e);return a?Cy(e,l):l}if(typeof e=="bigint"){var c=String(e)+"n";return a?Cy(e,c):c}var u=typeof i.depth>"u"?5:i.depth;if(typeof r>"u"&&(r=0),r>=u&&u>0&&typeof e=="object")return Jc(e)?"[Array]":"[Object]";var f=jP(i,r);if(typeof o>"u")o=[];else if(ky(o,e)>=0)return"[Circular]";function d(j,F,_){if(F&&(o=wP.call(o),o.push(F)),_){var M={depth:i.depth};return Un(i,"quoteStyle")&&(M.quoteStyle=i.quoteStyle),t(j,M,r+1,o)}return t(j,i,r+1,o)}if(typeof e=="function"&&!Oy(e)){var p=kP(e),h=Ns(e,d);return"[Function"+(p?": "+p:" (anonymous)")+"]"+(h.length>0?" { "+nn.call(h,", ")+" }":"")}if(Iy(e)){var m=eo?Wn.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):Yc.call(e);return typeof e=="object"&&!eo?ii(m):m}if(NP(e)){for(var y="<"+by.call(String(e.nodeName)),v=e.attributes||[],b=0;b<v.length;b++)y+=" "+v[b].name+"="+Py(TP(v[b].value),"double",i);return y+=">",e.childNodes&&e.childNodes.length&&(y+="..."),y+="</"+by.call(String(e.nodeName))+">",y}if(Jc(e)){if(e.length===0)return"[]";var g=Ns(e,d);return f&&!$P(g)?"["+eu(g,f)+"]":"[ "+nn.call(g,", ")+" ]"}if(CP(e)){var S=Ns(e,d);return!("cause"in Error.prototype)&&"cause"in e&&!Ty.call(e,"cause")?"{ ["+String(e)+"] "+nn.call(wy.call("[cause]: "+d(e.cause),S),", ")+" }":S.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+nn.call(S,", ")+" }"}if(typeof e=="object"&&s){if(_y&&typeof e[_y]=="function"&&Xc)return Xc(e,{depth:u-r});if(s!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(DP(e)){var x=[];return gy&&gy.call(e,function(j,F){x.push(d(F,e,!0)+" => "+d(j,e))}),My("Map",Fs.call(e),x,f)}if(FP(e)){var T=[];return yy&&yy.call(e,function(j){T.push(d(j,e))}),My("Set",Ls.call(e),T,f)}if(MP(e))return Qc("WeakMap");if(LP(e))return Qc("WeakSet");if(RP(e))return Qc("WeakRef");if(_P(e))return ii(d(Number(e)));if(OP(e))return ii(d(Zc.call(e)));if(PP(e))return ii(gP.call(e));if(AP(e))return ii(d(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(typeof globalThis<"u"&&e===globalThis||typeof bd<"u"&&e===bd)return"{ [object globalThis] }";if(!EP(e)&&!Oy(e)){var P=Ns(e,d),O=Ey?Ey(e)===Object.prototype:e instanceof Object||e.constructor===Object,k=e instanceof Object?"":"null prototype",D=!O&&gt&&Object(e)===e&&gt in e?Kc.call(Gn(e),8,-1):k?"Object":"",L=O||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",A=L+(D||k?"["+nn.call(wy.call([],D||[],k||[]),": ")+"] ":"");return P.length===0?A+"{}":f?A+"{"+eu(P,f)+"}":A+"{ "+nn.call(P,", ")+" }"}return String(e)};function Py(t,e,n){var r=(n.quoteStyle||e)==="double"?'"':"'";return r+t+r}function TP(t){return Wn.call(String(t),/"/g,"&quot;")}function Jc(t){return Gn(t)==="[object Array]"&&(!gt||!(typeof t=="object"&&gt in t))}function EP(t){return Gn(t)==="[object Date]"&&(!gt||!(typeof t=="object"&&gt in t))}function Oy(t){return Gn(t)==="[object RegExp]"&&(!gt||!(typeof t=="object"&&gt in t))}function CP(t){return Gn(t)==="[object Error]"&&(!gt||!(typeof t=="object"&&gt in t))}function AP(t){return Gn(t)==="[object String]"&&(!gt||!(typeof t=="object"&&gt in t))}function _P(t){return Gn(t)==="[object Number]"&&(!gt||!(typeof t=="object"&&gt in t))}function PP(t){return Gn(t)==="[object Boolean]"&&(!gt||!(typeof t=="object"&&gt in t))}function Iy(t){if(eo)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!Yc)return!1;try{return Yc.call(t),!0}catch{}return!1}function OP(t){if(!t||typeof t!="object"||!Zc)return!1;try{return Zc.call(t),!0}catch{}return!1}var IP=Object.prototype.hasOwnProperty||function(t){return t in this};function Un(t,e){return IP.call(t,e)}function Gn(t){return yP.call(t)}function kP(t){if(t.name)return t.name;var e=bP.call(vP.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function ky(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}function DP(t){if(!Fs||!t||typeof t!="object")return!1;try{Fs.call(t);try{Ls.call(t)}catch{return!0}return t instanceof Map}catch{}return!1}function MP(t){if(!ri||!t||typeof t!="object")return!1;try{ri.call(t,ri);try{oi.call(t,oi)}catch{return!0}return t instanceof WeakMap}catch{}return!1}function RP(t){if(!vy||!t||typeof t!="object")return!1;try{return vy.call(t),!0}catch{}return!1}function FP(t){if(!Ls||!t||typeof t!="object")return!1;try{Ls.call(t);try{Fs.call(t)}catch{return!0}return t instanceof Set}catch{}return!1}function LP(t){if(!oi||!t||typeof t!="object")return!1;try{oi.call(t,oi);try{ri.call(t,ri)}catch{return!0}return t instanceof WeakSet}catch{}return!1}function NP(t){return!t||typeof t!="object"?!1:typeof HTMLElement<"u"&&t instanceof HTMLElement?!0:typeof t.nodeName=="string"&&typeof t.getAttribute=="function"}function Dy(t,e){if(t.length>e.maxStringLength){var n=t.length-e.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return Dy(Kc.call(t,0,e.maxStringLength),e)+r}var o=Wn.call(Wn.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,VP);return Py(o,"single",e)}function VP(t){var e=t.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return n?"\\"+n:"\\x"+(e<16?"0":"")+xP.call(e.toString(16))}function ii(t){return"Object("+t+")"}function Qc(t){return t+" { ? }"}function My(t,e,n,r){var o=r?eu(n,r):nn.call(n,", ");return t+" ("+e+") {"+o+"}"}function $P(t){for(var e=0;e<t.length;e++)if(ky(t[e],`
116
+ `)>=0)return!1;return!0}function jP(t,e){var n;if(t.indent===" ")n=" ";else if(typeof t.indent=="number"&&t.indent>0)n=nn.call(Array(t.indent+1)," ");else return null;return{base:n,prev:nn.call(Array(e+1),n)}}function eu(t,e){if(t.length===0)return"";var n=`
117
+ `+e.prev+e.base;return n+nn.call(t,","+n)+`
118
+ `+e.prev}function Ns(t,e){var n=Jc(t),r=[];if(n){r.length=t.length;for(var o=0;o<t.length;o++)r[o]=Un(t,o)?e(t[o],t):""}var i=typeof qc=="function"?qc(t):[],s;if(eo){s={};for(var a=0;a<i.length;a++)s["$"+i[a]]=i[a]}for(var l in t)Un(t,l)&&(n&&String(Number(l))===l&&l<t.length||eo&&s["$"+l]instanceof Symbol||(xy.call(/[^\w$]/,l)?r.push(e(l,t)+": "+e(t[l],t)):r.push(l+": "+e(t[l],t))));if(typeof qc=="function")for(var c=0;c<i.length;c++)Ty.call(t,i[c])&&r.push("["+e(i[c])+"]: "+e(t[i[c]],t));return r}var Ry=Jr,to=fP,BP=SP,zP=ti,Vs=Ry("%WeakMap%",!0),$s=Ry("%Map%",!0),HP=to("WeakMap.prototype.get",!0),WP=to("WeakMap.prototype.set",!0),UP=to("WeakMap.prototype.has",!0),GP=to("Map.prototype.get",!0),KP=to("Map.prototype.set",!0),ZP=to("Map.prototype.has",!0),tu=function(t,e){for(var n=t,r;(r=n.next)!==null;n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r},qP=function(t,e){var n=tu(t,e);return n&&n.value},YP=function(t,e,n){var r=tu(t,e);r?r.value=n:t.next={key:e,next:t.next,value:n}},XP=function(t,e){return!!tu(t,e)},JP=function(){var e,n,r,o={assert:function(i){if(!o.has(i))throw new zP("Side channel does not contain "+BP(i))},get:function(i){if(Vs&&i&&(typeof i=="object"||typeof i=="function")){if(e)return HP(e,i)}else if($s){if(n)return GP(n,i)}else if(r)return qP(r,i)},has:function(i){if(Vs&&i&&(typeof i=="object"||typeof i=="function")){if(e)return UP(e,i)}else if($s){if(n)return ZP(n,i)}else if(r)return XP(r,i);return!1},set:function(i,s){Vs&&i&&(typeof i=="object"||typeof i=="function")?(e||(e=new Vs),WP(e,i,s)):$s?(n||(n=new $s),KP(n,i,s)):(r||(r={key:{},next:null}),YP(r,i,s))}};return o},QP=String.prototype.replace,eO=/%20/g,nu={RFC1738:"RFC1738",RFC3986:"RFC3986"},Fy={default:nu.RFC3986,formatters:{RFC1738:function(t){return QP.call(t,eO,"+")},RFC3986:function(t){return String(t)}},RFC1738:nu.RFC1738,RFC3986:nu.RFC3986},tO=Fy,ru=Object.prototype.hasOwnProperty,hr=Array.isArray,rn=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),nO=function(e){for(;e.length>1;){var n=e.pop(),r=n.obj[n.prop];if(hr(r)){for(var o=[],i=0;i<r.length;++i)typeof r[i]<"u"&&o.push(r[i]);n.obj[n.prop]=o}}},Ly=function(e,n){for(var r=n&&n.plainObjects?Object.create(null):{},o=0;o<e.length;++o)typeof e[o]<"u"&&(r[o]=e[o]);return r},rO=function t(e,n,r){if(!n)return e;if(typeof n!="object"){if(hr(e))e.push(n);else if(e&&typeof e=="object")(r&&(r.plainObjects||r.allowPrototypes)||!ru.call(Object.prototype,n))&&(e[n]=!0);else return[e,n];return e}if(!e||typeof e!="object")return[e].concat(n);var o=e;return hr(e)&&!hr(n)&&(o=Ly(e,r)),hr(e)&&hr(n)?(n.forEach(function(i,s){if(ru.call(e,s)){var a=e[s];a&&typeof a=="object"&&i&&typeof i=="object"?e[s]=t(a,i,r):e.push(i)}else e[s]=i}),e):Object.keys(n).reduce(function(i,s){var a=n[s];return ru.call(i,s)?i[s]=t(i[s],a,r):i[s]=a,i},o)},oO=function(e,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},e)},iO=function(t,e,n){var r=t.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},sO=function(e,n,r,o,i){if(e.length===0)return e;var s=e;if(typeof e=="symbol"?s=Symbol.prototype.toString.call(e):typeof e!="string"&&(s=String(e)),r==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(u){return"%26%23"+parseInt(u.slice(2),16)+"%3B"});for(var a="",l=0;l<s.length;++l){var c=s.charCodeAt(l);if(c===45||c===46||c===95||c===126||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||i===tO.RFC1738&&(c===40||c===41)){a+=s.charAt(l);continue}if(c<128){a=a+rn[c];continue}if(c<2048){a=a+(rn[192|c>>6]+rn[128|c&63]);continue}if(c<55296||c>=57344){a=a+(rn[224|c>>12]+rn[128|c>>6&63]+rn[128|c&63]);continue}l+=1,c=65536+((c&1023)<<10|s.charCodeAt(l)&1023),a+=rn[240|c>>18]+rn[128|c>>12&63]+rn[128|c>>6&63]+rn[128|c&63]}return a},aO=function(e){for(var n=[{obj:{o:e},prop:"o"}],r=[],o=0;o<n.length;++o)for(var i=n[o],s=i.obj[i.prop],a=Object.keys(s),l=0;l<a.length;++l){var c=a[l],u=s[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:s,prop:c}),r.push(u))}return nO(n),e},lO=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},cO=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},uO=function(e,n){return[].concat(e,n)},fO=function(e,n){if(hr(e)){for(var r=[],o=0;o<e.length;o+=1)r.push(n(e[o]));return r}return n(e)},Ny={arrayToObject:Ly,assign:oO,combine:uO,compact:aO,decode:iO,encode:sO,isBuffer:cO,isRegExp:lO,maybeMap:fO,merge:rO},dO=Ny,Vy=Fy,pO=Date.prototype.toISOString,$y=Vy.default;dO.encode,Vy.formatters[$y];var hO=Ny;hO.decode;var jy=t=>Array.isArray(t),ou=t=>t===void 0,iu=t=>t===null,mO=Function.bind.call(Function.call,Object.prototype.toString),gO=t=>!!t&&mO(t)==="[object Error]"||t instanceof Error,By=(t,e)=>t instanceof e,yO=t=>{const e=typeof t;return e==="undefined"||e===null||e==="number"||e==="string"||e==="boolean"||e==="bigint"},vO=t=>Object.prototype.toString.call(t)==="[object Date]"&&By(t,Date),js={array:jy,date:vO,empty:t=>iu(t)||ou(t)?!0:typeof t=="object"?Object.keys(t).length===0:typeof t=="string"?t==="":Array.isArray(t)?t.length===0:Number.isNaN(t),function:t=>typeof t=="function",instance:By,isError:gO,keyof:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),nan:t=>Number.isNaN(t),nil:t=>iu(t)||ou(t),null:iu,number:t=>typeof t=="number"||!Number.isNaN(t),object:t=>!jy(t)&&typeof t=="object",primitive:yO,string:t=>typeof t=="string",undefined:ou},su=(t,e,n)=>{const[r,...o]=e;if(o.length>0){if(!t[r]){const i=`${+o[0]}`===o[0];t[r]=i?[]:{}}if(typeof t[r]!="object"){const i=`${+o[0]}`===o[0];t[r]=su(i?[]:{},o,n)}else t[r]=su(t[r],o,n)}else t[r]=n;return t},bO=t=>Object.keys(t),xO=t=>t.replace("[",".").replace("]","").split("."),zy=(t,e,n)=>{const r=Array.isArray(e)?e:xO(e),o=structuredClone(t);return su(o,r,n),o},au={},lu={exports:{}},cu={};/**
119
+ * @license React
120
+ * use-sync-external-store-shim.production.min.js
121
+ *
122
+ * Copyright (c) Facebook, Inc. and its affiliates.
123
+ *
124
+ * This source code is licensed under the MIT license found in the
125
+ * LICENSE file in the root directory of this source tree.
126
+ */var Hy;function wO(){if(Hy)return cu;Hy=1;var t=w;function e(f,d){return f===d&&(f!==0||1/f===1/d)||f!==f&&d!==d}var n=typeof Object.is=="function"?Object.is:e,r=t.useState,o=t.useEffect,i=t.useLayoutEffect,s=t.useDebugValue;function a(f,d){var p=d(),h=r({inst:{value:p,getSnapshot:d}}),m=h[0].inst,y=h[1];return i(function(){m.value=p,m.getSnapshot=d,l(m)&&y({inst:m})},[f,p,d]),o(function(){return l(m)&&y({inst:m}),f(function(){l(m)&&y({inst:m})})},[f]),s(p),p}function l(f){var d=f.getSnapshot;f=f.value;try{var p=d();return!n(f,p)}catch{return!0}}function c(f,d){return d()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return cu.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:u,cu}var Wy={};/**
127
+ * @license React
128
+ * use-sync-external-store-shim.development.js
129
+ *
130
+ * Copyright (c) Facebook, Inc. and its affiliates.
131
+ *
132
+ * This source code is licensed under the MIT license found in the
133
+ * LICENSE file in the root directory of this source tree.
134
+ */var Uy;function SO(){return Uy||(Uy=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var t=w,e=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(g){{for(var S=arguments.length,x=new Array(S>1?S-1:0),T=1;T<S;T++)x[T-1]=arguments[T];r("error",g,x)}}function r(g,S,x){{var T=e.ReactDebugCurrentFrame,P=T.getStackAddendum();P!==""&&(S+="%s",x=x.concat([P]));var O=x.map(function(k){return String(k)});O.unshift("Warning: "+S),Function.prototype.apply.call(console[g],console,O)}}function o(g,S){return g===S&&(g!==0||1/g===1/S)||g!==g&&S!==S}var i=typeof Object.is=="function"?Object.is:o,s=t.useState,a=t.useEffect,l=t.useLayoutEffect,c=t.useDebugValue,u=!1,f=!1;function d(g,S,x){u||t.startTransition!==void 0&&(u=!0,n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var T=S();if(!f){var P=S();i(T,P)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}var O=s({inst:{value:T,getSnapshot:S}}),k=O[0].inst,D=O[1];return l(function(){k.value=T,k.getSnapshot=S,p(k)&&D({inst:k})},[g,T,S]),a(function(){p(k)&&D({inst:k});var L=function(){p(k)&&D({inst:k})};return g(L)},[g]),c(T),T}function p(g){var S=g.getSnapshot,x=g.value;try{var T=S();return!i(x,T)}catch{return!0}}function h(g,S,x){return S()}var m=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",y=!m,v=y?h:d,b=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:v;Wy.useSyncExternalStore=b,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Wy}var Gy;function Ky(){return Gy||(Gy=1,process.env.NODE_ENV==="production"?lu.exports=wO():lu.exports=SO()),lu.exports}/**
135
+ * @license React
136
+ * use-sync-external-store-shim/with-selector.production.min.js
137
+ *
138
+ * Copyright (c) Facebook, Inc. and its affiliates.
139
+ *
140
+ * This source code is licensed under the MIT license found in the
141
+ * LICENSE file in the root directory of this source tree.
142
+ */var Zy;function TO(){if(Zy)return au;Zy=1;var t=w,e=Ky();function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=e.useSyncExternalStore,i=t.useRef,s=t.useEffect,a=t.useMemo,l=t.useDebugValue;return au.useSyncExternalStoreWithSelector=function(c,u,f,d,p){var h=i(null);if(h.current===null){var m={hasValue:!1,value:null};h.current=m}else m=h.current;h=a(function(){function v(T){if(!b){if(b=!0,g=T,T=d(T),p!==void 0&&m.hasValue){var P=m.value;if(p(P,T))return S=P}return S=T}if(P=S,r(g,T))return P;var O=d(T);return p!==void 0&&p(P,O)?P:(g=T,S=O)}var b=!1,g,S,x=f===void 0?null:f;return[function(){return v(u())},x===null?void 0:function(){return v(x())}]},[u,f,d,p]);var y=o(c,h[0],h[1]);return s(function(){m.hasValue=!0,m.value=y},[y]),l(y),y},au}var qy={};/**
143
+ * @license React
144
+ * use-sync-external-store-shim/with-selector.development.js
145
+ *
146
+ * Copyright (c) Facebook, Inc. and its affiliates.
147
+ *
148
+ * This source code is licensed under the MIT license found in the
149
+ * LICENSE file in the root directory of this source tree.
150
+ */var Yy;function EO(){return Yy||(Yy=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var t=w,e=Ky();function n(u,f){return u===f&&(u!==0||1/u===1/f)||u!==u&&f!==f}var r=typeof Object.is=="function"?Object.is:n,o=e.useSyncExternalStore,i=t.useRef,s=t.useEffect,a=t.useMemo,l=t.useDebugValue;function c(u,f,d,p,h){var m=i(null),y;m.current===null?(y={hasValue:!1,value:null},m.current=y):y=m.current;var v=a(function(){var x=!1,T,P,O=function(A){if(!x){x=!0,T=A;var j=p(A);if(h!==void 0&&y.hasValue){var F=y.value;if(h(F,j))return P=F,F}return P=j,j}var _=T,M=P;if(r(_,A))return M;var N=p(A);return h!==void 0&&h(M,N)?M:(T=A,P=N,N)},k=d===void 0?null:d,D=function(){return O(f())},L=k===null?void 0:function(){return O(k())};return[D,L]},[f,d,p,h]),b=v[0],g=v[1],S=o(u,b,g);return s(function(){y.hasValue=!0,y.value=S},[S]),l(S),S}qy.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),qy}process.env.NODE_ENV==="production"?TO():EO();const no=t=>{const e=w.useRef(t??{});return w.useEffect(()=>void(e.current=t),[t]),e},CO=t=>{const e=w.useRef();return w.useEffect(()=>{e.current=t},[t]),e.current},AO=t=>Object.entries(t),Xy=t=>t instanceof Promise,Jy=(t,e,n,r)=>e===t?n.reduce((o,i)=>i(o,e,r),t):t.constructor.name===Object.name?n.reduce((o,i)=>i(o,e,r),{...e,...t}):n.reduce((o,i)=>i(o,e,r),t),_O=(t,e,n,r,o,i)=>(...s)=>{const a=performance.now(),l=e(...s),c=(u,f)=>n(d=>Jy(u,d,i,f));return Xy(l)?l.then(u=>{o.current={method:t,props:r(),time:performance.now()-a},c(u,o.current)}):(o.current={method:t,props:r(),time:performance.now()-a},void c(l,o.current))},PO=(t,e,n,r,o,i)=>(...s)=>{o.current={method:t,time:0,props:r()};const a=e(...s),l=c=>n(u=>Jy(c,u,i,o.current));return Xy(a)?a.then(c=>l(c)):l(a)},OO=(t,e,n)=>{const[r,o]=w.useState(()=>t),i=no(r),s=no((n==null?void 0:n.props)??{}),a=no(e),l=no((n==null?void 0:n.postMiddleware)??[]),c=no((n==null?void 0:n.interceptor)??[]),u=w.useRef(t),f=CO(r),d=no(f),p=w.useRef(null);w.useEffect(()=>{if(p.current===null)return;const m=p.current;l.current.forEach(y=>{y(r,f,m)})},[r,l,f]);const[h]=w.useState(()=>{const m=()=>s.current,y=a.current({props:m,state:()=>i.current,initialState:u.current,previousState:()=>d.current});return AO(y).reduce((v,[b,g])=>({...v,[b]:n!=null&&n.debug?_O(b,g,o,m,p,c.current):PO(b,g,o,m,p,c.current)}),{})});return[r,h,s.current]},Bs=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{let e=Math.random()*16|0;return(t=="x"?e:e&3|8).toString(16)}),Qy=(t,e,n)=>t.split(e).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),ev={basic:/[,[\]]+?/,extend:/[,[\].]+?/},tv=(t,e)=>{const n=Qy(e,ev.basic,t)||Qy(e,ev.extend,t);return n===void 0||n===t?void 0:n},IO=()=>typeof window>"u";var kO={};(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=(y,v)=>{try{Object.keys(y).forEach(v)}catch(b){window.console.log(b)}},n=y=>y==null,r=y=>{const v=typeof y;return v==="string"||v==="number"||v==="boolean"||n(y)},o=(y,v)=>{const b=v.getItem(y);try{return JSON.parse(b)}catch{return b??null}},i=y=>Object.keys(y).reduce((v,b)=>({...v,[b]:o(b,y)}),{}),s=y=>y instanceof Date?y:typeof y=="number"?new Date(new Date*1+y*864e5):y,a="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(y=>y.split("=")).reduce((y,v)=>(y[decodeURIComponent(v[0].trim())]=decodeURIComponent(v[1].trim()),y),{}),c=new Set,u=()=>{const y=l();c.forEach(v=>v(y))},f=[{name:"expires",parse:y=>`expires=${s(y.expires??a)}`},{name:"maxAge",parse:y=>y.maxAge?`max-age=${s(y.expires??a)}`:""},{name:"path",parse:y=>`path=${y.path??"/"}`},{name:"sameSite",parse:y=>`samesite=${y.sameSite??"strict"}`},{name:"useSecure",parse:y=>`${y.useSecure??!0?"secure":""}`},{name:"domain",parse:y=>{const v=y.domain??"";return v===""?"":`domain=${y.multiDomain?".":""}${v}`}},{name:"partitioned",parse:y=>y.partitioned?"Partitioned":""}],d={json:l,listener:y=>(c.add(y),()=>c.delete(y)),clearListeners:()=>c.clear(),has:y=>document.cookie.split(";").some(v=>v.trim().startsWith(`${y}=`)),deleteAll:()=>{document.cookie.split(";").forEach(y=>{document.cookie=y.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:y=>{const v=d.json()[y];if(n(v))return null;try{return JSON.parse(decodeURIComponent(v))}catch{return v}},delete:y=>{document.cookie=`${encodeURIComponent(y)}=;expires=${new Date().toUTCString()}`,u()},set:(y,v,b={})=>{const g=r(v)?v:encodeURIComponent(JSON.stringify(v)),S=f.reduce((x,T)=>{const P=T.parse(b);return P===""?x:x.concat(P)},[`${encodeURIComponent(y)}=${g}`]).join(";");document.cookie=S,u()}},p=y=>{const v=new Set,b=g=>{y().removeItem(g);const S=i(y());v.forEach(x=>x(S))};return{delete:b,listener:g=>(v.add(g),()=>v.delete(g)),clearListeners:()=>v.clear(),json:(g=!1)=>g?i(y()):y(),has:g=>{const S=y().getItem(g);return!n(S)},deleteAll:()=>{e(y(),b),v.forEach(g=>g(y()))},get:g=>o(g,y()),set:(g,S)=>{y().setItem(g,JSON.stringify(S)),v.forEach(x=>x(y()))}}},h=p(()=>window.sessionStorage),m=p(()=>window.localStorage);t.Cookie=d,t.LocalStorage=m,t.SessionStorage=h,t.createStorage=p})(kO);const nv=t=>t.headerLabel??t.thead??t.id,rv=t=>t.map(e=>({value:e.id,label:e.thead??e.headerLabel??e.id}));var si=(t=>(t.Boolean="boolean",t.Number="number",t.Select="select",t.Text="text",t))(si||{});const uu=t=>t.type==="number"?t.valueAsNumber:t.value,wt={contains:{value:"contains",label:"Contains",symbol:"includes"},is:{value:"is",label:"Is",symbol:"is"},isNot:{value:"isNot",label:"Is not",symbol:"!=="},notContains:{value:"notContains",label:"Does not contains",symbol:"notIncludes"},lessThan:{value:"lessThan",label:"Less Than",symbol:"<="},greaterThan:{value:"greaterThan",label:"Greater than",symbol:">="},startsWith:{value:"startsWith",label:"Starts with",symbol:"startsWith"},endsWith:{value:"endsWith",label:"Ends with",symbol:"endsWith"}},fu={[si.Text]:[wt.is,wt.isNot,wt.contains,wt.notContains,wt.startsWith,wt.endsWith],[si.Boolean]:[wt.is,wt.isNot],[si.Number]:[wt.is,wt.isNot,wt.greaterThan,wt.lessThan]},zs=(t,e={})=>{var s;const n=t.id,r=t.type??si.Text,o=(s=fu[r])==null?void 0:s[0].value,i=wt[o];return{id:Bs(),operation:i,label:nv(t),name:n,type:r,value:"",...e}},DO=t=>{const e=()=>{const s=t.cols.at(0);t.set(a=>[...a,zs(s)])},n=s=>{const a=s.target.dataset.id||"",l=s.target.value;t.set(c=>c.map(u=>{if(a!==u.id)return u;const f=t.cols.find(d=>l===d.id);return zs(f,{value:""})}))},r=s=>{const a=s.target.dataset.id||"",l=s.target.value;t.set(c=>c.map(u=>u.id===a?{...u,operation:wt[l]}:u))},o=s=>{const a=s.currentTarget.dataset.id||"";console.log({id:a,f:t.filters}),t.set(l=>l.filter(c=>c.id!==a))},i=s=>{const a=s.target.dataset.id||"",l=uu(s.target);t.set(c=>c.map(u=>u.id===a?{...u,value:l}:u))};return E.jsx(w.Fragment,{children:E.jsx(Po,{arrow:!1,title:"Filters",trigger:E.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[E.jsx(Kf,{size:14}),"Filtros ",t.filters.length===0?"":` (${t.filters.length})`]}),children:E.jsxs("ul",{className:"mt-4 space-y-2",children:[t.filters.map(s=>{const a=fu[s.type];return E.jsxs("li",{className:"flex flex-nowrap gap-3",children:[E.jsx(Qn,{title:"Filtro",options:t.options,placeholder:"Seleciona um campo...",value:s.name,"data-id":s.id,onChange:n}),E.jsx(Qn,{title:"Tipo do filtro","data-id":s.id,onChange:r,value:s.operation.value,options:a,placeholder:"Operação..."}),E.jsx(Za,{"data-id":s.id,onChange:i,placeholder:"Buscar por...",title:"Valor do filtro",type:s.type,value:s.value}),E.jsx("div",{className:"flex items-center justify-center mt-5",children:E.jsx("button",{"data-id":s.id,type:"button",onClick:o,children:E.jsx(xo,{className:"text-danger",size:16})})})]},`filter-select-${s.id}`)}),E.jsx("li",{children:E.jsxs("button",{type:"button",onClick:e,className:"text-primary flex items-center gap-1",children:[E.jsx(Va,{size:14})," Adicionar novo filtro"]})})]})})})},MO=({filter:t,set:e})=>{const n=o=>{const i=o.target.value,s=o.target.dataset.id||"";e(a=>a.map(l=>l.id===s?{...l,operation:wt[i]}:l))},r=o=>{const i=o.target.dataset.id||"",s=uu(o.target);e(a=>a.map(l=>l.id===i?{...l,value:s}:l))};return E.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[E.jsx(Qn,{onChange:n,value:t.operation.value,options:fu[t.type],placeholder:"Operation..."}),E.jsx(Za,{type:t.type,"data-id":t.id,onChange:r,placeholder:"Looking for...",value:t.value})]})},RO=({item:t,onPointerDown:e})=>{const n=pc(0);return E.jsxs(ms.Item,{onPointerDown:e,id:t.groupId,className:"flex flex-row items-center gap-2",value:t,style:{y:n},children:[E.jsx("button",{className:"cursor-grab",children:E.jsx(v0,{size:14})}),E.jsx("span",{children:t.groupName})]},t.groupId)},FO=t=>{var a;const e=rv(t.cols),n=_C(),[r,o]=w.useState(((a=t.groups[0])==null?void 0:a.thead)||""),i=l=>{var m;const c=l.target,u=c.value,f=c.options.selectedIndex,d=((m=c.options.item(f))==null?void 0:m.label)||"";o(d);const p=new og(t.rows).GroupBy(u),h=t.cols.find(y=>y.id===u);t.setGroups(bO(p).map((y,v)=>{const b=p[y];return{...h,groupId:Bs(),groupKey:u,index:v,rows:b,groupName:y}}))},s=l=>t.setGroups([]);return E.jsx(w.Fragment,{children:E.jsxs(Po,{arrow:!1,title:"Groups",trigger:E.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[E.jsx(b0,{size:14}),"Groups",t.groups.length>0?` - ${r}(${t.groups.length})`:""]}),children:[E.jsxs("div",{className:"flex flex-nowrap items-center",children:[E.jsx(Qn,{value:r,title:"Tipo de agrupamento",onChange:i,options:e,placeholder:"Agrupar por..."}),E.jsx(Gi,{className:"mt-4",onClick:s,theme:"raw","data-id":r,children:E.jsx(xo,{size:16,className:"text-danger"})})]}),t.groups.length>0?E.jsxs("section",{className:"my-4",children:[E.jsx("header",{children:E.jsx("h2",{className:"text-xl font-medium",children:"Ordenar grupos"})}),E.jsx(dC,{children:E.jsx(ms.Group,{axis:"y",className:"relative space-y-2",dragListener:!1,dragControls:n,drag:!0,layoutScroll:!0,onReorder:t.setGroups,values:t.groups,children:t.groups.map(l=>E.jsx(RO,{item:l,onPointerDown:c=>{n.start(c),t.setGroups([...t.groups])}},l.groupId))})})]}):null]})})},LO=t=>(e,n)=>t.reduce((r,o)=>{const i=o.type==="desc"?-1:1,s=o.value,a=e[s]>n[s]?i:e[s]<n[s]?-i:0;return r!==0?r:a},0),NO=(t,e)=>t.sort(LO(e)),du={asc:{label:"Ascending",value:"asc"},desc:{label:"Descending",value:"desc"}},VO=[du.asc,du.desc],pu=(t,e="asc")=>({id:Bs(),type:e,value:t.id,label:du.asc.label}),$O=t=>{const e=()=>{const i=t.cols[0];i&&t.set(s=>[...s,pu(i)])},n=i=>s=>{const a=s.target.value;t.set(l=>l.map(c=>c.id===i?{...c,value:a}:c))},r=i=>s=>{const a=s.target.value;t.set(l=>l.map(c=>c.id===i?{...c,type:a}:c))},o=i=>{const s=i.currentTarget.dataset.id||"";t.set(a=>a.filter(l=>l.id!==s))};return E.jsx(w.Fragment,{children:E.jsx(Po,{arrow:!1,title:"Order By",trigger:E.jsxs("span",{className:"flex items-center gap-1 proportional-nums text-foreground-description",children:[E.jsx(Gf,{size:14}),"Order by ",t.sorters.length===0?"":` (${t.sorters.length})`]}),children:E.jsxs("ul",{className:"mt-4 space-y-2",children:[t.sorters.map(i=>E.jsxs("li",{className:"flex flex-nowrap gap-3",children:[E.jsx(Qn,{onChange:n(i.id),options:t.options,placeholder:"Selecione um campo...",value:i.value}),E.jsx(Qn,{onChange:r(i.id),value:i.type,options:VO,placeholder:"Operação..."}),E.jsx("button",{className:"mt-4","data-id":i.id,onClick:o,children:E.jsx(xo,{className:"text-danger",size:14})})]},`sorter-select-${i.id}`)),E.jsx("li",{children:E.jsxs("button",{onClick:e,className:"text-primary flex items-center gap-1",children:[E.jsx(Va,{size:14})," Adicionar ordenação"]})})]})})})},jO=t=>{const e=t.sorters.find(i=>i.id===t.col.id),[n,r]=w.useState(e?e.type:"undefined"),o=()=>r(i=>i==="undefined"?"asc":i==="asc"?"desc":"undefined");return w.useEffect(()=>{t.setSorters(i=>{if(n==="undefined")return i.filter(a=>a.value!==t.col.id);const s=i.findIndex(a=>a.value===t.col.id);return s===-1?[...i,pu(t.col,n)]:(i[s]=pu(t.col,n),[...i])})},[n,t.col]),E.jsxs("button",{className:"isolate flex items-center",onClick:o,children:[n==="asc"?E.jsx(Na,{size:14}):null,n==="desc"?E.jsx(h0,{size:14}):null,n==="undefined"?E.jsx(Gf,{size:14}):null]})},BO=t=>E.jsx("header",{className:"min-w-full mb-1",children:E.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[E.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[E.jsx("p",{children:E.jsx(DO,{cols:t.cols,options:t.options,filters:t.filters,set:t.setFilters})}),E.jsx("p",{children:E.jsx($O,{options:t.options,cols:t.cols,sorters:t.sorters,set:t.setSorters})}),E.jsx("p",{children:E.jsx(FO,{rows:t.rows,groups:t.groups,setGroups:t.setGroups,options:t.options,cols:t.cols})})]}),E.jsx("ul",{className:"flex flex-wrap w-full flex-1 flex-grow flex-row items-center md:justify-end gap-4",children:t.filters.map(e=>E.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[E.jsxs("span",{children:[E.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),e.label," ",e.operation.label.toLowerCase(),":"]}),E.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[E.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:e.value||" "}),E.jsx("input",{type:e.type,value:e.value,className:"absolute left-0 top-0 m-0 inline-block w-full bg-transparent p-0 placeholder-primary/70 outline-none [appearance:textfield] after:empty:text-primary/70 [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",onChange:n=>{const r=uu(n.target);t.setFilters(o=>o.map(i=>e.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${e.id}`))})]})}),ov=(t,e)=>{const[n,r]=w.useState(()=>e||t);return w.useEffect(()=>{r(t)},[t]),[n,r]},zO={opacity:1},HO={opacity:.75,backgroundColor:"#a1a1aa"},WO={opacity:0,transition:{duration:.4,type:"spring"}},UO=t=>{var n;const e=t.filters.filter(r=>r.name===t.header.id);return E.jsx(ms.Item,{...t.header.thProps,as:"th",exit:WO,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,value:t.header,whileDrag:HO,animate:zO,className:`hidden px-2 py-4 first:table-cell md:table-cell ${((n=t.header.thProps)==null?void 0:n.className)??""}`,children:E.jsx("span",{className:"flex items-center justify-between",children:E.jsxs("span",{className:"flex items-center gap-1",children:[E.jsxs(Po,{arrow:!0,trigger:E.jsx(Kf,{size:14}),onChange:r=>{r&&t.setFilters(o=>o.concat(zs(t.header,{})))},children:["Filter by: ",nv(t.header),e.length===0===null?null:E.jsxs("ul",{children:[e.map(r=>E.jsx("li",{className:"my-1",children:E.jsx(MO,{filter:r,set:t.setFilters})},`thead-filter-${r.id}`)),E.jsx("li",{children:E.jsxs("button",{onClick:()=>t.setFilters(r=>r.concat(zs(t.header))),className:"text-primary-muted flex items-center",children:[E.jsx(Va,{size:14})," Add"]})})]})]}),E.jsx("span",{className:"pointer-events-auto text-balance text-base",children:t.header.thead}),E.jsx(jO,{col:t.header,setSorters:t.setSorters,sorters:t.sorters})]})})})},GO=t=>{const[e,n]=ov(t.headers),r=()=>t.setCols(e);return E.jsx(ms.Group,{as:"tr",axis:"x",drag:!0,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,values:e,onReorder:n,onPointerUp:r,className:"bg-table-background border-none text-lg",children:E.jsx($m,{children:e.map(o=>E.jsx(UO,{setFilters:t.setFilters,filters:t.filters,setSorters:t.setSorters,sorters:t.sorters,header:o},`header-child-item-${o.id}`))})})},KO=w.forwardRef((t,e)=>E.jsx("tbody",{...t,className:`divide-y divide-table-row ${t.className??""}`,ref:e,children:E.jsx($m,{children:t.children})})),ZO=w.forwardRef((t,e)=>E.jsx("table",{...t,ref:e,className:`table min-w-full divide-y divide-table-border table-auto text-left ${t.className??""}`})),qO=w.forwardRef((t,e)=>E.jsx("thead",{...t,className:"bg-content-bg shadow-xs group:sticky top-0",ref:e})),YO=w.forwardRef((t,e)=>E.jsx("tr",{...t,ref:e,className:`table-row ${t.className??""}`})),XO={TableHead:qO,Table:ZO,TableBody:KO,TableRow:YO},JO=[0,0,0,0,0,0,0,0,0,0],iv=({filters:t,setCols:e,setFilters:n,sorters:r,cols:o,setSorters:i,...s})=>{const a=w.useMemo(()=>{if(s.loading)return JO;const l=new og(s.rows);return t.length>0&&t.forEach(c=>c.value===""||Number.isNaN(c.value)?void 0:l.Where(c.name,c.operation.symbol,c.value)),r.length===0?l.Select():NO(l.Select(),r)},[s.rows,t,r,s.loading]);return E.jsx("div",{className:"group border border-table-border rounded-lg px-1 min-w-full",children:E.jsx(m_,{data:a,totalCount:a.length,useWindowScroll:!0,components:XO,fixedHeaderContent:()=>E.jsx(GO,{sorters:r,setSorters:i,filters:t,setFilters:n,headers:o,setCols:e}),itemContent:(l,c)=>o.map((u,f)=>{const d=`${f},${l}`,p=tv(c,u.id),h=u.Element;return w.createElement("td",{...u.cellProps,"data-matrix":d,key:`accessor-${l}-${f}`,className:"px-2 h-14 border-none first:table-cell hidden md:table-cell"},s.loading?E.jsx("div",{className:"animate-pulse h-2 bg-table-border rounded"}):h?E.jsx(h,{row:c,matrix:d,col:u,rowIndex:l,value:p}):E.jsx(w.Fragment,{children:js.nil(p)?"":p}))})})})},QO=(t,e)=>typeof e=="function"?e(t):e,eI=t=>{const e=w.useMemo(()=>rv(t.cols),[t.cols]),[n,r]=OO({cols:t.cols,filters:t.filters??[],groups:t.groups??[],sorters:t.sorters??[]},o=>{const i=s=>a=>{const l=o.state();return{...l,[s]:QO(l[s],a)}};return{cols:i("cols"),filters:i("filters"),groups:i("groups"),sorters:i("sorters")}},{interceptor:[o=>{var i;return(i=t.set)==null||i.call(t,o),o}]});return E.jsxs("div",{className:"relative min-w-full",children:[E.jsx(BO,{setCols:r.cols,rows:t.rows,cols:n.cols,filters:n.filters,groups:n.groups,options:e,setFilters:r.filters,setGroups:r.groups,setSorters:r.sorters,sorters:n.sorters}),n.groups.length===0?E.jsx(iv,{...t,cols:n.cols,filters:n.filters,groups:n.groups,index:0,optionCols:e,options:e,setCols:r.cols,setFilters:r.filters,setGroups:r.groups,setSorters:r.sorters,sorters:n.sorters}):E.jsx("div",{className:"flex flex-wrap gap-4",children:n.groups.map((o,i)=>E.jsx(fc.div,{className:"min-w-full",children:E.jsx(iv,{...t,cols:n.cols,filters:n.filters,group:o,groups:n.groups,index:i,optionCols:e,options:e,rows:o.rows,setCols:r.cols,setFilters:r.filters,setGroups:r.groups,setSorters:r.sorters,sorters:n.sorters})},`group-${o.groupId}`))})]})};var tI=String.prototype.replace,nI=/%20/g,hu={RFC1738:"RFC1738",RFC3986:"RFC3986"},mu={default:hu.RFC3986,formatters:{RFC1738:function(t){return tI.call(t,nI,"+")},RFC3986:function(t){return String(t)}},RFC1738:hu.RFC1738,RFC3986:hu.RFC3986},rI=mu,gu=Object.prototype.hasOwnProperty,mr=Array.isArray,on=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),oI=function(e){for(;e.length>1;){var n=e.pop(),r=n.obj[n.prop];if(mr(r)){for(var o=[],i=0;i<r.length;++i)typeof r[i]<"u"&&o.push(r[i]);n.obj[n.prop]=o}}},sv=function(e,n){for(var r=n&&n.plainObjects?Object.create(null):{},o=0;o<e.length;++o)typeof e[o]<"u"&&(r[o]=e[o]);return r},iI=function t(e,n,r){if(!n)return e;if(typeof n!="object"){if(mr(e))e.push(n);else if(e&&typeof e=="object")(r&&(r.plainObjects||r.allowPrototypes)||!gu.call(Object.prototype,n))&&(e[n]=!0);else return[e,n];return e}if(!e||typeof e!="object")return[e].concat(n);var o=e;return mr(e)&&!mr(n)&&(o=sv(e,r)),mr(e)&&mr(n)?(n.forEach(function(i,s){if(gu.call(e,s)){var a=e[s];a&&typeof a=="object"&&i&&typeof i=="object"?e[s]=t(a,i,r):e.push(i)}else e[s]=i}),e):Object.keys(n).reduce(function(i,s){var a=n[s];return gu.call(i,s)?i[s]=t(i[s],a,r):i[s]=a,i},o)},sI=function(e,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},e)},aI=function(t,e,n){var r=t.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},yu=1024,lI=function(e,n,r,o,i){if(e.length===0)return e;var s=e;if(typeof e=="symbol"?s=Symbol.prototype.toString.call(e):typeof e!="string"&&(s=String(e)),r==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(p){return"%26%23"+parseInt(p.slice(2),16)+"%3B"});for(var a="",l=0;l<s.length;l+=yu){for(var c=s.length>=yu?s.slice(l,l+yu):s,u=[],f=0;f<c.length;++f){var d=c.charCodeAt(f);if(d===45||d===46||d===95||d===126||d>=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||i===rI.RFC1738&&(d===40||d===41)){u[u.length]=c.charAt(f);continue}if(d<128){u[u.length]=on[d];continue}if(d<2048){u[u.length]=on[192|d>>6]+on[128|d&63];continue}if(d<55296||d>=57344){u[u.length]=on[224|d>>12]+on[128|d>>6&63]+on[128|d&63];continue}f+=1,d=65536+((d&1023)<<10|c.charCodeAt(f)&1023),u[u.length]=on[240|d>>18]+on[128|d>>12&63]+on[128|d>>6&63]+on[128|d&63]}a+=u.join("")}return a},cI=function(e){for(var n=[{obj:{o:e},prop:"o"}],r=[],o=0;o<n.length;++o)for(var i=n[o],s=i.obj[i.prop],a=Object.keys(s),l=0;l<a.length;++l){var c=a[l],u=s[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:s,prop:c}),r.push(u))}return oI(n),e},uI=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},fI=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},dI=function(e,n){return[].concat(e,n)},pI=function(e,n){if(mr(e)){for(var r=[],o=0;o<e.length;o+=1)r.push(n(e[o]));return r}return n(e)},av={arrayToObject:sv,assign:sI,combine:dI,compact:cI,decode:aI,encode:lI,isBuffer:fI,isRegExp:uI,maybeMap:pI,merge:iI},lv=JP,Hs=av,ai=mu,hI=Object.prototype.hasOwnProperty,cv={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,n){return e+"["+n+"]"},repeat:function(e){return e}},sn=Array.isArray,mI=Array.prototype.push,uv=function(t,e){mI.apply(t,sn(e)?e:[e])},gI=Date.prototype.toISOString,fv=ai.default,et={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:Hs.encode,encodeValuesOnly:!1,format:fv,formatter:ai.formatters[fv],indices:!1,serializeDate:function(e){return gI.call(e)},skipNulls:!1,strictNullHandling:!1},yI=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},vu={},vI=function t(e,n,r,o,i,s,a,l,c,u,f,d,p,h,m,y,v,b){for(var g=e,S=b,x=0,T=!1;(S=S.get(vu))!==void 0&&!T;){var P=S.get(e);if(x+=1,typeof P<"u"){if(P===x)throw new RangeError("Cyclic object value");T=!0}typeof S.get(vu)>"u"&&(x=0)}if(typeof u=="function"?g=u(n,g):g instanceof Date?g=p(g):r==="comma"&&sn(g)&&(g=Hs.maybeMap(g,function(C){return C instanceof Date?p(C):C})),g===null){if(s)return c&&!y?c(n,et.encoder,v,"key",h):n;g=""}if(yI(g)||Hs.isBuffer(g)){if(c){var O=y?n:c(n,et.encoder,v,"key",h);return[m(O)+"="+m(c(g,et.encoder,v,"value",h))]}return[m(n)+"="+m(String(g))]}var k=[];if(typeof g>"u")return k;var D;if(r==="comma"&&sn(g))y&&c&&(g=Hs.maybeMap(g,c)),D=[{value:g.length>0?g.join(",")||null:void 0}];else if(sn(u))D=u;else{var L=Object.keys(g);D=f?L.sort(f):L}var A=l?n.replace(/\./g,"%2E"):n,j=o&&sn(g)&&g.length===1?A+"[]":A;if(i&&sn(g)&&g.length===0)return j+"[]";for(var F=0;F<D.length;++F){var _=D[F],M=typeof _=="object"&&typeof _.value<"u"?_.value:g[_];if(!(a&&M===null)){var N=d&&l?_.replace(/\./g,"%2E"):_,z=sn(g)?typeof r=="function"?r(j,N):j:j+(d?"."+N:"["+N+"]");b.set(e,x);var q=lv();q.set(vu,b),uv(k,t(M,z,r,o,i,s,a,l,r==="comma"&&y&&sn(g)?null:c,u,f,d,p,h,m,y,v,q))}}return k},bI=function(e){if(!e)return et;if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.encodeDotInKeys<"u"&&typeof e.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(e.encoder!==null&&typeof e.encoder<"u"&&typeof e.encoder!="function")throw new TypeError("Encoder has to be a function.");var n=e.charset||et.charset;if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=ai.default;if(typeof e.format<"u"){if(!hI.call(ai.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var o=ai.formatters[r],i=et.filter;(typeof e.filter=="function"||sn(e.filter))&&(i=e.filter);var s;if(e.arrayFormat in cv?s=e.arrayFormat:"indices"in e?s=e.indices?"indices":"repeat":s=et.arrayFormat,"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var a=typeof e.allowDots>"u"?e.encodeDotInKeys===!0?!0:et.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:et.addQueryPrefix,allowDots:a,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:et.allowEmptyArrays,arrayFormat:s,charset:n,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:et.charsetSentinel,commaRoundTrip:e.commaRoundTrip,delimiter:typeof e.delimiter>"u"?et.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:et.encode,encodeDotInKeys:typeof e.encodeDotInKeys=="boolean"?e.encodeDotInKeys:et.encodeDotInKeys,encoder:typeof e.encoder=="function"?e.encoder:et.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:et.encodeValuesOnly,filter:i,format:r,formatter:o,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:et.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:et.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:et.strictNullHandling}},xI=function(t,e){var n=t,r=bI(e),o,i;typeof r.filter=="function"?(i=r.filter,n=i("",n)):sn(r.filter)&&(i=r.filter,o=i);var s=[];if(typeof n!="object"||n===null)return"";var a=cv[r.arrayFormat],l=a==="comma"&&r.commaRoundTrip;o||(o=Object.keys(n)),r.sort&&o.sort(r.sort);for(var c=lv(),u=0;u<o.length;++u){var f=o[u];r.skipNulls&&n[f]===null||uv(s,vI(n[f],f,a,l,r.allowEmptyArrays,r.strictNullHandling,r.skipNulls,r.encodeDotInKeys,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,c))}var d=s.join(r.delimiter),p=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?p+="utf8=%26%2310003%3B&":p+="utf8=%E2%9C%93&"),d.length>0?p+d:""},ro=av,bu=Object.prototype.hasOwnProperty,wI=Array.isArray,Ye={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:ro.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},SI=function(t){return t.replace(/&#(\d+);/g,function(e,n){return String.fromCharCode(parseInt(n,10))})},dv=function(t,e){return t&&typeof t=="string"&&e.comma&&t.indexOf(",")>-1?t.split(","):t},TI="utf8=%26%2310003%3B",EI="utf8=%E2%9C%93",CI=function(e,n){var r={__proto__:null},o=n.ignoreQueryPrefix?e.replace(/^\?/,""):e;o=o.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var i=n.parameterLimit===1/0?void 0:n.parameterLimit,s=o.split(n.delimiter,i),a=-1,l,c=n.charset;if(n.charsetSentinel)for(l=0;l<s.length;++l)s[l].indexOf("utf8=")===0&&(s[l]===EI?c="utf-8":s[l]===TI&&(c="iso-8859-1"),a=l,l=s.length);for(l=0;l<s.length;++l)if(l!==a){var u=s[l],f=u.indexOf("]="),d=f===-1?u.indexOf("="):f+1,p,h;d===-1?(p=n.decoder(u,Ye.decoder,c,"key"),h=n.strictNullHandling?null:""):(p=n.decoder(u.slice(0,d),Ye.decoder,c,"key"),h=ro.maybeMap(dv(u.slice(d+1),n),function(y){return n.decoder(y,Ye.decoder,c,"value")})),h&&n.interpretNumericEntities&&c==="iso-8859-1"&&(h=SI(h)),u.indexOf("[]=")>-1&&(h=wI(h)?[h]:h);var m=bu.call(r,p);m&&n.duplicates==="combine"?r[p]=ro.combine(r[p],h):(!m||n.duplicates==="last")&&(r[p]=h)}return r},AI=function(t,e,n,r){for(var o=r?e:dv(e,n),i=t.length-1;i>=0;--i){var s,a=t[i];if(a==="[]"&&n.parseArrays)s=n.allowEmptyArrays&&o===""?[]:[].concat(o);else{s=n.plainObjects?Object.create(null):{};var l=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,c=n.decodeDotInKeys?l.replace(/%2E/g,"."):l,u=parseInt(c,10);!n.parseArrays&&c===""?s={0:o}:!isNaN(u)&&a!==c&&String(u)===c&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(s=[],s[u]=o):c!=="__proto__"&&(s[c]=o)}o=s}return o},_I=function(e,n,r,o){if(e){var i=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,s=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,l=r.depth>0&&s.exec(i),c=l?i.slice(0,l.index):i,u=[];if(c){if(!r.plainObjects&&bu.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var f=0;r.depth>0&&(l=a.exec(i))!==null&&f<r.depth;){if(f+=1,!r.plainObjects&&bu.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}return l&&u.push("["+i.slice(l.index)+"]"),AI(u,n,r,o)}},PI=function(e){if(!e)return Ye;if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.decodeDotInKeys<"u"&&typeof e.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(e.decoder!==null&&typeof e.decoder<"u"&&typeof e.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=typeof e.charset>"u"?Ye.charset:e.charset,r=typeof e.duplicates>"u"?Ye.duplicates:e.duplicates;if(r!=="combine"&&r!=="first"&&r!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var o=typeof e.allowDots>"u"?e.decodeDotInKeys===!0?!0:Ye.allowDots:!!e.allowDots;return{allowDots:o,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:Ye.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:Ye.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:Ye.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:Ye.arrayLimit,charset:n,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:Ye.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:Ye.comma,decodeDotInKeys:typeof e.decodeDotInKeys=="boolean"?e.decodeDotInKeys:Ye.decodeDotInKeys,decoder:typeof e.decoder=="function"?e.decoder:Ye.decoder,delimiter:typeof e.delimiter=="string"||ro.isRegExp(e.delimiter)?e.delimiter:Ye.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:Ye.depth,duplicates:r,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:Ye.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:Ye.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:Ye.plainObjects,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:Ye.strictNullHandling}},OI=function(t,e){var n=PI(e);if(t===""||t===null||typeof t>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof t=="string"?CI(t,n):t,o=n.plainObjects?Object.create(null):{},i=Object.keys(r),s=0;s<i.length;++s){var a=i[s],l=_I(a,r[a],n,typeof t=="string");o=ro.merge(o,l,n)}return n.allowSparse===!0?o:ro.compact(o)},II=xI,kI=OI,DI=mu,MI={formats:DI,parse:kI,stringify:II},Ee;(function(t){t.assertEqual=o=>o;function e(o){}t.assertIs=e;function n(o){throw new Error}t.assertNever=n,t.arrayToEnum=o=>{const i={};for(const s of o)i[s]=s;return i},t.getValidEnumValues=o=>{const i=t.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),s={};for(const a of i)s[a]=o[a];return t.objectValues(s)},t.objectValues=o=>t.objectKeys(o).map(function(i){return o[i]}),t.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const i=[];for(const s in o)Object.prototype.hasOwnProperty.call(o,s)&&i.push(s);return i},t.find=(o,i)=>{for(const s of o)if(i(s))return s},t.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}t.joinValues=r,t.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(Ee||(Ee={}));var pv;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(pv||(pv={}));const te=Ee.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),gr=t=>{switch(typeof t){case"undefined":return te.undefined;case"string":return te.string;case"number":return isNaN(t)?te.nan:te.number;case"boolean":return te.boolean;case"function":return te.function;case"bigint":return te.bigint;case"symbol":return te.symbol;case"object":return Array.isArray(t)?te.array:t===null?te.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?te.promise:typeof Map<"u"&&t instanceof Map?te.map:typeof Set<"u"&&t instanceof Set?te.set:typeof Date<"u"&&t instanceof Date?te.date:te.object;default:return te.unknown}},G=Ee.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"]);class jt extends Error{constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const n=e||function(i){return i.message},r={_errors:[]},o=i=>{for(const s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(o);else if(s.code==="invalid_return_type")o(s.returnTypeError);else if(s.code==="invalid_arguments")o(s.argumentsError);else if(s.path.length===0)r._errors.push(n(s));else{let a=r,l=0;for(;l<s.path.length;){const c=s.path[l];l===s.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(s))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return o(this),r}static assert(e){if(!(e instanceof jt))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ee.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},r=[];for(const o of this.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(e(o))):r.push(e(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}jt.create=t=>new jt(t);const li=(t,e)=>{let n;switch(t.code){case G.invalid_type:t.received===te.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case G.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,Ee.jsonStringifyReplacer)}`;break;case G.unrecognized_keys:n=`Unrecognized key(s) in object: ${Ee.joinValues(t.keys,", ")}`;break;case G.invalid_union:n="Invalid input";break;case G.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Ee.joinValues(t.options)}`;break;case G.invalid_enum_value:n=`Invalid enum value. Expected ${Ee.joinValues(t.options)}, received '${t.received}'`;break;case G.invalid_arguments:n="Invalid function arguments";break;case G.invalid_return_type:n="Invalid function return type";break;case G.invalid_date:n="Invalid date";break;case G.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:Ee.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case G.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case G.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case G.custom:n="Invalid input";break;case G.invalid_intersection_types:n="Intersection results could not be merged";break;case G.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case G.not_finite:n="Number must be finite";break;default:n=e.defaultError,Ee.assertNever(t)}return{message:n}};let RI=li;function xu(){return RI}const wu=t=>{const{data:e,path:n,errorMaps:r,issueData:o}=t,i=[...n,...o.path||[]],s={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let a="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)a=c(s,{data:e,defaultError:a}).message;return{...o,path:i,message:a}};function Q(t,e){const n=xu(),r=wu({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===li?void 0:li].filter(o=>!!o)});t.common.issues.push(r)}class St{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const r=[];for(const o of n){if(o.status==="aborted")return de;o.status==="dirty"&&e.dirty(),r.push(o.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,n){const r=[];for(const o of n){const i=await o.key,s=await o.value;r.push({key:i,value:s})}return St.mergeObjectSync(e,r)}static mergeObjectSync(e,n){const r={};for(const o of n){const{key:i,value:s}=o;if(i.status==="aborted"||s.status==="aborted")return de;i.status==="dirty"&&e.dirty(),s.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||o.alwaysSet)&&(r[i.value]=s.value)}return{status:e.value,value:r}}}const de=Object.freeze({status:"aborted"}),ci=t=>({status:"dirty",value:t}),Ot=t=>({status:"valid",value:t}),hv=t=>t.status==="aborted",mv=t=>t.status==="dirty",Ws=t=>t.status==="valid",Us=t=>typeof Promise<"u"&&t instanceof Promise;function Gs(t,e,n,r){if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(t)}function gv(t,e,n,r,o){if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,n),n}typeof SuppressedError=="function"&&SuppressedError;var ie;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(ie||(ie={}));var ui,fi;class an{constructor(e,n,r,o){this._cachedPath=[],this.parent=e,this.data=n,this._path=r,this._key=o}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 yv=(t,e)=>{if(Ws(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 n=new jt(t.common.issues);return this._error=n,this._error}}};function me(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:r,description:o}=t;if(e&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:o}:{errorMap:(s,a)=>{var l,c;const{message:u}=t;return s.code==="invalid_enum_value"?{message:u??a.defaultError}:typeof a.data>"u"?{message:(l=u??r)!==null&&l!==void 0?l:a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:(c=u??n)!==null&&c!==void 0?c:a.defaultError}},description:o}}class xe{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)}get description(){return this._def.description}_getType(e){return gr(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:gr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new St,ctx:{common:e.parent.common,data:e.data,parsedType:gr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(Us(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const r=this.safeParse(e,n);if(r.success)return r.data;throw r.error}safeParse(e,n){var r;const o={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:gr(e)},i=this._parseSync({data:e,path:o.path,parent:o});return yv(o,i)}async parseAsync(e,n){const r=await this.safeParseAsync(e,n);if(r.success)return r.data;throw r.error}async safeParseAsync(e,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:gr(e)},o=this._parse({data:e,path:r.path,parent:r}),i=await(Us(o)?o:Promise.resolve(o));return yv(r,i)}refine(e,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{const s=e(o),a=()=>i.addIssue({code:G.custom,...r(o)});return typeof Promise<"u"&&s instanceof Promise?s.then(l=>l?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(e,n){return this._refinement((r,o)=>e(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(e){return new Sn({schema:this,typeName:ue.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Tn.create(this,this._def)}nullable(){return br.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Kt.create(this,this._def)}promise(){return hi.create(this,this._def)}or(e){return qs.create([this,e],this._def)}and(e){return Ys.create(this,e,this._def)}transform(e){return new Sn({...me(this._def),schema:this,typeName:ue.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new ta({...me(this._def),innerType:this,defaultValue:n,typeName:ue.ZodDefault})}brand(){return new wv({typeName:ue.ZodBranded,type:this,...me(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new na({...me(this._def),innerType:this,catchValue:n,typeName:ue.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return ra.create(this,e)}readonly(){return oa.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const FI=/^c[^\s-]{8,}$/i,LI=/^[0-9a-z]+$/,NI=/^[0-9A-HJKMNP-TV-Z]{26}$/,VI=/^[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,$I=/^[a-z0-9_-]{21}$/i,jI=/^[-+]?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)?)??$/,BI=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,zI="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Su;const HI=/^(?:(?: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])$/,WI=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,UI=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,vv="((\\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])))",GI=new RegExp(`^${vv}$`);function bv(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 KI(t){return new RegExp(`^${bv(t)}$`)}function ZI(t){let e=`${vv}T${bv(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function qI(t,e){return!!((e==="v4"||!e)&&HI.test(t)||(e==="v6"||!e)&&WI.test(t))}class bn extends xe{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==te.string){const i=this._getOrReturnCtx(e);return Q(i,{code:G.invalid_type,expected:te.string,received:i.parsedType}),de}const r=new St;let o;for(const i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(o=this._getOrReturnCtx(e,o),Q(o,{code:G.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")e.data.length>i.value&&(o=this._getOrReturnCtx(e,o),Q(o,{code:G.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const s=e.data.length>i.value,a=e.data.length<i.value;(s||a)&&(o=this._getOrReturnCtx(e,o),s?Q(o,{code:G.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&Q(o,{code:G.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")BI.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"email",code:G.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Su||(Su=new RegExp(zI,"u")),Su.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"emoji",code:G.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")VI.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"uuid",code:G.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")$I.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"nanoid",code:G.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")FI.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"cuid",code:G.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")LI.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"cuid2",code:G.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")NI.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"ulid",code:G.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{o=this._getOrReturnCtx(e,o),Q(o,{validation:"url",code:G.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"regex",code:G.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(e,o),Q(o,{code:G.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(o=this._getOrReturnCtx(e,o),Q(o,{code:G.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(o=this._getOrReturnCtx(e,o),Q(o,{code:G.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?ZI(i).test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{code:G.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?GI.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{code:G.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?KI(i).test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{code:G.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?jI.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"duration",code:G.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?qI(e.data,i.version)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"ip",code:G.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?UI.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"base64",code:G.invalid_string,message:i.message}),r.dirty()):Ee.assertNever(i);return{status:r.value,value:e.data}}_regex(e,n,r){return this.refinement(o=>e.test(o),{validation:n,code:G.invalid_string,...ie.errToObj(r)})}_addCheck(e){return new bn({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...ie.errToObj(e)})}url(e){return this._addCheck({kind:"url",...ie.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...ie.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...ie.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...ie.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...ie.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...ie.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...ie.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...ie.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...ie.errToObj(e)})}datetime(e){var n,r;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:(n=e==null?void 0:e.offset)!==null&&n!==void 0?n:!1,local:(r=e==null?void 0:e.local)!==null&&r!==void 0?r:!1,...ie.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,...ie.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...ie.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...ie.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...ie.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...ie.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...ie.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...ie.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...ie.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...ie.errToObj(n)})}nonempty(e){return this.min(1,ie.errToObj(e))}trim(){return new bn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new bn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new bn({...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 isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}bn.create=t=>{var e;return new bn({checks:[],typeName:ue.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...me(t)})};function YI(t,e){const n=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,o=n>r?n:r,i=parseInt(t.toFixed(o).replace(".","")),s=parseInt(e.toFixed(o).replace(".",""));return i%s/Math.pow(10,o)}class yr extends xe{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)!==te.number){const i=this._getOrReturnCtx(e);return Q(i,{code:G.invalid_type,expected:te.number,received:i.parsedType}),de}let r;const o=new St;for(const i of this._def.checks)i.kind==="int"?Ee.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),Q(r,{code:G.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),Q(r,{code:G.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),Q(r,{code:G.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?YI(e.data,i.value)!==0&&(r=this._getOrReturnCtx(e,r),Q(r,{code:G.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),Q(r,{code:G.not_finite,message:i.message}),o.dirty()):Ee.assertNever(i);return{status:o.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,ie.toString(n))}gt(e,n){return this.setLimit("min",e,!1,ie.toString(n))}lte(e,n){return this.setLimit("max",e,!0,ie.toString(n))}lt(e,n){return this.setLimit("max",e,!1,ie.toString(n))}setLimit(e,n,r,o){return new yr({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:ie.toString(o)}]})}_addCheck(e){return new yr({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:ie.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ie.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ie.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ie.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ie.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:ie.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:ie.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ie.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ie.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Ee.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(n)&&Number.isFinite(e)}}yr.create=t=>new yr({checks:[],typeName:ue.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...me(t)});class oo extends xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==te.bigint){const i=this._getOrReturnCtx(e);return Q(i,{code:G.invalid_type,expected:te.bigint,received:i.parsedType}),de}let r;const o=new St;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),Q(r,{code:G.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),Q(r,{code:G.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),Q(r,{code:G.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):Ee.assertNever(i);return{status:o.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,ie.toString(n))}gt(e,n){return this.setLimit("min",e,!1,ie.toString(n))}lte(e,n){return this.setLimit("max",e,!0,ie.toString(n))}lt(e,n){return this.setLimit("max",e,!1,ie.toString(n))}setLimit(e,n,r,o){return new oo({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:ie.toString(o)}]})}_addCheck(e){return new oo({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ie.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ie.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ie.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ie.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:ie.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}oo.create=t=>{var e;return new oo({checks:[],typeName:ue.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...me(t)})};class Tu extends xe{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==te.boolean){const r=this._getOrReturnCtx(e);return Q(r,{code:G.invalid_type,expected:te.boolean,received:r.parsedType}),de}return Ot(e.data)}}Tu.create=t=>new Tu({typeName:ue.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...me(t)});class di extends xe{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==te.date){const i=this._getOrReturnCtx(e);return Q(i,{code:G.invalid_type,expected:te.date,received:i.parsedType}),de}if(isNaN(e.data.getTime())){const i=this._getOrReturnCtx(e);return Q(i,{code:G.invalid_date}),de}const r=new St;let o;for(const i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(o=this._getOrReturnCtx(e,o),Q(o,{code:G.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(o=this._getOrReturnCtx(e,o),Q(o,{code:G.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Ee.assertNever(i);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new di({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:ie.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:ie.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}di.create=t=>new di({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:ue.ZodDate,...me(t)});class Eu extends xe{_parse(e){if(this._getType(e)!==te.symbol){const r=this._getOrReturnCtx(e);return Q(r,{code:G.invalid_type,expected:te.symbol,received:r.parsedType}),de}return Ot(e.data)}}Eu.create=t=>new Eu({typeName:ue.ZodSymbol,...me(t)});class Ks extends xe{_parse(e){if(this._getType(e)!==te.undefined){const r=this._getOrReturnCtx(e);return Q(r,{code:G.invalid_type,expected:te.undefined,received:r.parsedType}),de}return Ot(e.data)}}Ks.create=t=>new Ks({typeName:ue.ZodUndefined,...me(t)});class Zs extends xe{_parse(e){if(this._getType(e)!==te.null){const r=this._getOrReturnCtx(e);return Q(r,{code:G.invalid_type,expected:te.null,received:r.parsedType}),de}return Ot(e.data)}}Zs.create=t=>new Zs({typeName:ue.ZodNull,...me(t)});class Cu extends xe{constructor(){super(...arguments),this._any=!0}_parse(e){return Ot(e.data)}}Cu.create=t=>new Cu({typeName:ue.ZodAny,...me(t)});class io extends xe{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ot(e.data)}}io.create=t=>new io({typeName:ue.ZodUnknown,...me(t)});class Kn extends xe{_parse(e){const n=this._getOrReturnCtx(e);return Q(n,{code:G.invalid_type,expected:te.never,received:n.parsedType}),de}}Kn.create=t=>new Kn({typeName:ue.ZodNever,...me(t)});class Au extends xe{_parse(e){if(this._getType(e)!==te.undefined){const r=this._getOrReturnCtx(e);return Q(r,{code:G.invalid_type,expected:te.void,received:r.parsedType}),de}return Ot(e.data)}}Au.create=t=>new Au({typeName:ue.ZodVoid,...me(t)});class Kt extends xe{_parse(e){const{ctx:n,status:r}=this._processInputParams(e),o=this._def;if(n.parsedType!==te.array)return Q(n,{code:G.invalid_type,expected:te.array,received:n.parsedType}),de;if(o.exactLength!==null){const s=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(s||a)&&(Q(n,{code:s?G.too_big:G.too_small,minimum:a?o.exactLength.value:void 0,maximum:s?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(Q(n,{code:G.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(Q(n,{code:G.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((s,a)=>o.type._parseAsync(new an(n,s,n.path,a)))).then(s=>St.mergeArray(r,s));const i=[...n.data].map((s,a)=>o.type._parseSync(new an(n,s,n.path,a)));return St.mergeArray(r,i)}get element(){return this._def.type}min(e,n){return new Kt({...this._def,minLength:{value:e,message:ie.toString(n)}})}max(e,n){return new Kt({...this._def,maxLength:{value:e,message:ie.toString(n)}})}length(e,n){return new Kt({...this._def,exactLength:{value:e,message:ie.toString(n)}})}nonempty(e){return this.min(1,e)}}Kt.create=(t,e)=>new Kt({type:t,minLength:null,maxLength:null,exactLength:null,typeName:ue.ZodArray,...me(e)});function so(t){if(t instanceof Ze){const e={};for(const n in t.shape){const r=t.shape[n];e[n]=Tn.create(so(r))}return new Ze({...t._def,shape:()=>e})}else return t instanceof Kt?new Kt({...t._def,type:so(t.element)}):t instanceof Tn?Tn.create(so(t.unwrap())):t instanceof br?br.create(so(t.unwrap())):t instanceof wn?wn.create(t.items.map(e=>so(e))):t}class Ze extends xe{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(),n=Ee.objectKeys(e);return this._cached={shape:e,keys:n}}_parse(e){if(this._getType(e)!==te.object){const c=this._getOrReturnCtx(e);return Q(c,{code:G.invalid_type,expected:te.object,received:c.parsedType}),de}const{status:r,ctx:o}=this._processInputParams(e),{shape:i,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof Kn&&this._def.unknownKeys==="strip"))for(const c in o.data)s.includes(c)||a.push(c);const l=[];for(const c of s){const u=i[c],f=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new an(o,f,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof Kn){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of a)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")a.length>0&&(Q(o,{code:G.unrecognized_keys,keys:a}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of a){const f=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new an(o,f,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const f=await u.key,d=await u.value;c.push({key:f,value:d,alwaysSet:u.alwaysSet})}return c}).then(c=>St.mergeObjectSync(r,c)):St.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(e){return ie.errToObj,new Ze({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,r)=>{var o,i,s,a;const l=(s=(i=(o=this._def).errorMap)===null||i===void 0?void 0:i.call(o,n,r).message)!==null&&s!==void 0?s:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=ie.errToObj(e).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new Ze({...this._def,unknownKeys:"strip"})}passthrough(){return new Ze({...this._def,unknownKeys:"passthrough"})}extend(e){return new Ze({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Ze({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ue.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new Ze({...this._def,catchall:e})}pick(e){const n={};return Ee.objectKeys(e).forEach(r=>{e[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Ze({...this._def,shape:()=>n})}omit(e){const n={};return Ee.objectKeys(this.shape).forEach(r=>{e[r]||(n[r]=this.shape[r])}),new Ze({...this._def,shape:()=>n})}deepPartial(){return so(this)}partial(e){const n={};return Ee.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];e&&!e[r]?n[r]=o:n[r]=o.optional()}),new Ze({...this._def,shape:()=>n})}required(e){const n={};return Ee.objectKeys(this.shape).forEach(r=>{if(e&&!e[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Tn;)i=i._def.innerType;n[r]=i}}),new Ze({...this._def,shape:()=>n})}keyof(){return xv(Ee.objectKeys(this.shape))}}Ze.create=(t,e)=>new Ze({shape:()=>t,unknownKeys:"strip",catchall:Kn.create(),typeName:ue.ZodObject,...me(e)}),Ze.strictCreate=(t,e)=>new Ze({shape:()=>t,unknownKeys:"strict",catchall:Kn.create(),typeName:ue.ZodObject,...me(e)}),Ze.lazycreate=(t,e)=>new Ze({shape:t,unknownKeys:"strip",catchall:Kn.create(),typeName:ue.ZodObject,...me(e)});class qs extends xe{_parse(e){const{ctx:n}=this._processInputParams(e),r=this._def.options;function o(i){for(const a of i)if(a.result.status==="valid")return a.result;for(const a of i)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const s=i.map(a=>new jt(a.ctx.common.issues));return Q(n,{code:G.invalid_union,unionErrors:s}),de}if(n.common.async)return Promise.all(r.map(async i=>{const s={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:s}),ctx:s}})).then(o);{let i;const s=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:c}),c.common.issues.length&&s.push(c.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const a=s.map(l=>new jt(l));return Q(n,{code:G.invalid_union,unionErrors:a}),de}}get options(){return this._def.options}}qs.create=(t,e)=>new qs({options:t,typeName:ue.ZodUnion,...me(e)});const xn=t=>t instanceof Js?xn(t.schema):t instanceof Sn?xn(t.innerType()):t instanceof Qs?[t.value]:t instanceof vr?t.options:t instanceof ea?Ee.objectValues(t.enum):t instanceof ta?xn(t._def.innerType):t instanceof Ks?[void 0]:t instanceof Zs?[null]:t instanceof Tn?[void 0,...xn(t.unwrap())]:t instanceof br?[null,...xn(t.unwrap())]:t instanceof wv||t instanceof oa?xn(t.unwrap()):t instanceof na?xn(t._def.innerType):[];class _u extends xe{_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==te.object)return Q(n,{code:G.invalid_type,expected:te.object,received:n.parsedType}),de;const r=this.discriminator,o=n.data[r],i=this.optionsMap.get(o);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(Q(n,{code:G.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),de)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,r){const o=new Map;for(const i of n){const s=xn(i.shape[e]);if(!s.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const a of s){if(o.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);o.set(a,i)}}return new _u({typeName:ue.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:o,...me(r)})}}function Pu(t,e){const n=gr(t),r=gr(e);if(t===e)return{valid:!0,data:t};if(n===te.object&&r===te.object){const o=Ee.objectKeys(e),i=Ee.objectKeys(t).filter(a=>o.indexOf(a)!==-1),s={...t,...e};for(const a of i){const l=Pu(t[a],e[a]);if(!l.valid)return{valid:!1};s[a]=l.data}return{valid:!0,data:s}}else if(n===te.array&&r===te.array){if(t.length!==e.length)return{valid:!1};const o=[];for(let i=0;i<t.length;i++){const s=t[i],a=e[i],l=Pu(s,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===te.date&&r===te.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class Ys extends xe{_parse(e){const{status:n,ctx:r}=this._processInputParams(e),o=(i,s)=>{if(hv(i)||hv(s))return de;const a=Pu(i.value,s.value);return a.valid?((mv(i)||mv(s))&&n.dirty(),{status:n.value,value:a.data}):(Q(r,{code:G.invalid_intersection_types}),de)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,s])=>o(i,s)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Ys.create=(t,e,n)=>new Ys({left:t,right:e,typeName:ue.ZodIntersection,...me(n)});class wn extends xe{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==te.array)return Q(r,{code:G.invalid_type,expected:te.array,received:r.parsedType}),de;if(r.data.length<this._def.items.length)return Q(r,{code:G.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),de;!this._def.rest&&r.data.length>this._def.items.length&&(Q(r,{code:G.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((s,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new an(r,s,r.path,a)):null}).filter(s=>!!s);return r.common.async?Promise.all(i).then(s=>St.mergeArray(n,s)):St.mergeArray(n,i)}get items(){return this._def.items}rest(e){return new wn({...this._def,rest:e})}}wn.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new wn({items:t,typeName:ue.ZodTuple,rest:null,...me(e)})};class Xs extends xe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==te.object)return Q(r,{code:G.invalid_type,expected:te.object,received:r.parsedType}),de;const o=[],i=this._def.keyType,s=this._def.valueType;for(const a in r.data)o.push({key:i._parse(new an(r,a,r.path,a)),value:s._parse(new an(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?St.mergeObjectAsync(n,o):St.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(e,n,r){return n instanceof xe?new Xs({keyType:e,valueType:n,typeName:ue.ZodRecord,...me(r)}):new Xs({keyType:bn.create(),valueType:e,typeName:ue.ZodRecord,...me(n)})}}class Ou extends xe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==te.map)return Q(r,{code:G.invalid_type,expected:te.map,received:r.parsedType}),de;const o=this._def.keyType,i=this._def.valueType,s=[...r.data.entries()].map(([a,l],c)=>({key:o._parse(new an(r,a,r.path,[c,"key"])),value:i._parse(new an(r,l,r.path,[c,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of s){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return de;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of s){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return de;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}}}}Ou.create=(t,e,n)=>new Ou({valueType:e,keyType:t,typeName:ue.ZodMap,...me(n)});class ao extends xe{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==te.set)return Q(r,{code:G.invalid_type,expected:te.set,received:r.parsedType}),de;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(Q(r,{code:G.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(Q(r,{code:G.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const i=this._def.valueType;function s(l){const c=new Set;for(const u of l){if(u.status==="aborted")return de;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const a=[...r.data.values()].map((l,c)=>i._parse(new an(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>s(l)):s(a)}min(e,n){return new ao({...this._def,minSize:{value:e,message:ie.toString(n)}})}max(e,n){return new ao({...this._def,maxSize:{value:e,message:ie.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}ao.create=(t,e)=>new ao({valueType:t,minSize:null,maxSize:null,typeName:ue.ZodSet,...me(e)});class pi extends xe{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==te.function)return Q(n,{code:G.invalid_type,expected:te.function,received:n.parsedType}),de;function r(a,l){return wu({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,xu(),li].filter(c=>!!c),issueData:{code:G.invalid_arguments,argumentsError:l}})}function o(a,l){return wu({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,xu(),li].filter(c=>!!c),issueData:{code:G.invalid_return_type,returnTypeError:l}})}const i={errorMap:n.common.contextualErrorMap},s=n.data;if(this._def.returns instanceof hi){const a=this;return Ot(async function(...l){const c=new jt([]),u=await a._def.args.parseAsync(l,i).catch(p=>{throw c.addIssue(r(l,p)),c}),f=await Reflect.apply(s,this,u);return await a._def.returns._def.type.parseAsync(f,i).catch(p=>{throw c.addIssue(o(f,p)),c})})}else{const a=this;return Ot(function(...l){const c=a._def.args.safeParse(l,i);if(!c.success)throw new jt([r(l,c.error)]);const u=Reflect.apply(s,this,c.data),f=a._def.returns.safeParse(u,i);if(!f.success)throw new jt([o(u,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new pi({...this._def,args:wn.create(e).rest(io.create())})}returns(e){return new pi({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,r){return new pi({args:e||wn.create([]).rest(io.create()),returns:n||io.create(),typeName:ue.ZodFunction,...me(r)})}}class Js extends xe{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Js.create=(t,e)=>new Js({getter:t,typeName:ue.ZodLazy,...me(e)});class Qs extends xe{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return Q(n,{received:n.data,code:G.invalid_literal,expected:this._def.value}),de}return{status:"valid",value:e.data}}get value(){return this._def.value}}Qs.create=(t,e)=>new Qs({value:t,typeName:ue.ZodLiteral,...me(e)});function xv(t,e){return new vr({values:t,typeName:ue.ZodEnum,...me(e)})}class vr extends xe{constructor(){super(...arguments),ui.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),r=this._def.values;return Q(n,{expected:Ee.joinValues(r),received:n.parsedType,code:G.invalid_type}),de}if(Gs(this,ui)||gv(this,ui,new Set(this._def.values)),!Gs(this,ui).has(e.data)){const n=this._getOrReturnCtx(e),r=this._def.values;return Q(n,{received:n.data,code:G.invalid_enum_value,options:r}),de}return Ot(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return vr.create(e,{...this._def,...n})}exclude(e,n=this._def){return vr.create(this.options.filter(r=>!e.includes(r)),{...this._def,...n})}}ui=new WeakMap,vr.create=xv;class ea extends xe{constructor(){super(...arguments),fi.set(this,void 0)}_parse(e){const n=Ee.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==te.string&&r.parsedType!==te.number){const o=Ee.objectValues(n);return Q(r,{expected:Ee.joinValues(o),received:r.parsedType,code:G.invalid_type}),de}if(Gs(this,fi)||gv(this,fi,new Set(Ee.getValidEnumValues(this._def.values))),!Gs(this,fi).has(e.data)){const o=Ee.objectValues(n);return Q(r,{received:r.data,code:G.invalid_enum_value,options:o}),de}return Ot(e.data)}get enum(){return this._def.values}}fi=new WeakMap,ea.create=(t,e)=>new ea({values:t,typeName:ue.ZodNativeEnum,...me(e)});class hi extends xe{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==te.promise&&n.common.async===!1)return Q(n,{code:G.invalid_type,expected:te.promise,received:n.parsedType}),de;const r=n.parsedType===te.promise?n.data:Promise.resolve(n.data);return Ot(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}hi.create=(t,e)=>new hi({type:t,typeName:ue.ZodPromise,...me(e)});class Sn extends xe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ue.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:r}=this._processInputParams(e),o=this._def.effect||null,i={addIssue:s=>{Q(r,s),s.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){const s=o.transform(r.data,i);if(r.common.async)return Promise.resolve(s).then(async a=>{if(n.value==="aborted")return de;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?de:l.status==="dirty"||n.value==="dirty"?ci(l.value):l});{if(n.value==="aborted")return de;const a=this._def.schema._parseSync({data:s,path:r.path,parent:r});return a.status==="aborted"?de:a.status==="dirty"||n.value==="dirty"?ci(a.value):a}}if(o.type==="refinement"){const s=a=>{const l=o.refinement(a,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?de:(a.status==="dirty"&&n.dirty(),s(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?de:(a.status==="dirty"&&n.dirty(),s(a.value).then(()=>({status:n.value,value:a.value}))))}if(o.type==="transform")if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Ws(s))return s;const a=o.transform(s.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>Ws(s)?Promise.resolve(o.transform(s.value,i)).then(a=>({status:n.value,value:a})):s);Ee.assertNever(o)}}Sn.create=(t,e,n)=>new Sn({schema:t,typeName:ue.ZodEffects,effect:e,...me(n)}),Sn.createWithPreprocess=(t,e,n)=>new Sn({schema:e,effect:{type:"preprocess",transform:t},typeName:ue.ZodEffects,...me(n)});class Tn extends xe{_parse(e){return this._getType(e)===te.undefined?Ot(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Tn.create=(t,e)=>new Tn({innerType:t,typeName:ue.ZodOptional,...me(e)});class br extends xe{_parse(e){return this._getType(e)===te.null?Ot(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}br.create=(t,e)=>new br({innerType:t,typeName:ue.ZodNullable,...me(e)});class ta extends xe{_parse(e){const{ctx:n}=this._processInputParams(e);let r=n.data;return n.parsedType===te.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}ta.create=(t,e)=>new ta({innerType:t,typeName:ue.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...me(e)});class na extends xe{_parse(e){const{ctx:n}=this._processInputParams(e),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Us(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new jt(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new jt(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}na.create=(t,e)=>new na({innerType:t,typeName:ue.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...me(e)});class Iu extends xe{_parse(e){if(this._getType(e)!==te.nan){const r=this._getOrReturnCtx(e);return Q(r,{code:G.invalid_type,expected:te.nan,received:r.parsedType}),de}return{status:"valid",value:e.data}}}Iu.create=t=>new Iu({typeName:ue.ZodNaN,...me(t)});class wv extends xe{_parse(e){const{ctx:n}=this._processInputParams(e),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class ra extends xe{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?de:i.status==="dirty"?(n.dirty(),ci(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?de:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(e,n){return new ra({in:e,out:n,typeName:ue.ZodPipeline})}}class oa extends xe{_parse(e){const n=this._def.innerType._parse(e),r=o=>(Ws(o)&&(o.value=Object.freeze(o.value)),o);return Us(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}oa.create=(t,e)=>new oa({innerType:t,typeName:ue.ZodReadonly,...me(e)}),Ze.lazycreate;var ue;(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"})(ue||(ue={})),bn.create,yr.create,Iu.create,oo.create,Tu.create,di.create,Eu.create,Ks.create,Zs.create,Cu.create,io.create,Kn.create,Au.create,Kt.create,Ze.create,Ze.strictCreate,qs.create,_u.create,Ys.create,wn.create,Xs.create,Ou.create,ao.create,pi.create,Js.create,Qs.create,vr.create,ea.create,hi.create,Sn.create,Tn.create,br.create,Sn.createWithPreprocess,ra.create;const XI={sort:(t,e)=>t.localeCompare(e),allowDots:!0,charset:"utf-8",parseArrays:!0,plainObjects:!0,charsetSentinel:!0,allowPrototypes:!1,depth:Number.MAX_SAFE_INTEGER,arrayLimit:Number.MAX_SAFE_INTEGER,parameterLimit:Number.MAX_SAFE_INTEGER},Sv=t=>{const e=new FormData(t),n=new URLSearchParams(e);return MI.parse(n.toString(),XI)},Tv=t=>t.replace("[",".").replace("]","").split("."),ku=(t,e)=>Tv(t).reduce((n,r)=>{var i;if(r==="")return n;const o=((i=n.shape)==null?void 0:i[r])||n;return o instanceof Kt?o.element:o},e),ia=t=>t.type==="checkbox"?t.checked:t.type==="number"?t.valueAsNumber:t.value,JI=t=>{const[e,n]=w.useState(null),r=w.useRef({}),o=(l,c)=>{const u=ku(l,t);return{...c,name:l,id:l,error:e==null?void 0:e[l],ref:f=>{f!==null&&(r.current[l]={element:f,schema:u})}}},i=(l,c)=>{const u=ku(l,t);return{...c,name:l,id:l,type:js.instance(u,yr)?"number":(c==null?void 0:c.type)??"text",error:e==null?void 0:e[l],ref:f=>{f!==null&&(r.current[l]={element:f,schema:u})}}};w.useEffect(()=>{const l=Object.values(r.current).map(u=>{const f=u.schema.safeParse(ia(u.element)),d=h=>{const m=u.schema.safeParse(ia(h.target)),y=u.element,v=y.name;if(m.success)return y.setCustomValidity(""),n(b=>{const{[v]:g,...S}=b||{};return S===null||js.empty(S)?null:S});if(y.required){const b=m.error.issues[0].message;y.setCustomValidity(b),n(g=>({...g,[v]:b}))}},p=u.element.tagName==="INPUT"?"blur":"change";return u.element.addEventListener(p,d),{input:u,hasInitialError:u.element.required?!f.success:!1,unsubscribe:()=>u.element.removeEventListener(p,d)}});return l.some(u=>u.hasInitialError)&&n(u=>u===null?{}:u),()=>l.forEach(u=>u.unsubscribe())});const s=w.useCallback(l=>c=>{c.preventDefault();const u=c.currentTarget,f=Object.values(r.current).reduce((p,h)=>{const m=h.element,y=h.schema.safeParse(ia(m));if(y.success)return p;const v=y.error.issues[0].message;return m.setAttribute("data-initialized","true"),{...p,[m.name]:v}},{}),d=js.empty(f)?null:{};n(d),l==null||l({form:u,errors:d||{}})},[]),a=w.useCallback(l=>c=>{c.preventDefault();const u=c.currentTarget;let f=Sv(u);Array.from(u.elements).forEach(d=>{if(d.tagName==="SELECT"){const p=d;f=zy(f,p.name,p.value)}if(d.tagName==="INPUT"){const p=d;f=zy(f,p.name,ia(p))}}),l({form:u,json:f,event:c,reset:()=>rp(u)})},[]);return{input:i,select:o,onSubmit:a,errors:e,onInvalid:s,disabled:e!==null}};be.Autocomplete=ox,be.Button=Gi,be.ButtonGroup=Rw,be.Card=Ww,be.Dropdown=Po,be.FileUpload=jw,be.Form=zw,be.Input=Za,be.InputFeedback=nd,be.InputField=Ni,be.Option=od,be.Polymorph=Ui,be.Select=Qn,be.Switch=Hw,be.Table=eI,be.Tooltip=Uw,be.convertPath=Tv,be.css=zt,be.formReset=rp,be.formToJson=Sv,be.getSchemaShape=ku,be.isReactComponent=ex,be.isSsr=IO,be.mergeRefs=Ba,be.path=tv,be.useForm=JI,be.usePrevious=rd,be.useReactive=ov,be.uuid=Bs,Object.defineProperty(be,Symbol.toStringTag,{value:"Module"})});
151
+ //# sourceMappingURL=index.umd.js.map