@purpur/library 9.0.0 → 9.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 (93) hide show
  1. package/CHANGELOG.json +12 -0
  2. package/CHANGELOG.md +8 -1
  3. package/dist/LICENSE.txt +5 -5
  4. package/dist/checkbox-Dk3bZkZ3.js.map +1 -1
  5. package/dist/checkbox-LYzMiXu7.mjs.map +1 -1
  6. package/dist/chip-group-CJVvfl_J.mjs.map +1 -1
  7. package/dist/chip-group-aj1fdnjC.js.map +1 -1
  8. package/dist/{date-picker-BRkh2YEH.mjs → date-picker-BRnwwZv1.mjs} +364 -354
  9. package/dist/date-picker-BRnwwZv1.mjs.map +1 -0
  10. package/dist/date-picker-DlJGggam.js +2 -0
  11. package/dist/date-picker-DlJGggam.js.map +1 -0
  12. package/dist/date-picker.cjs.js +1 -1
  13. package/dist/date-picker.es.js +1 -1
  14. package/dist/floating-ui.react-dom-0ol4sFzt.mjs +1363 -0
  15. package/dist/floating-ui.react-dom-0ol4sFzt.mjs.map +1 -0
  16. package/dist/floating-ui.react-dom-Cc_YSprQ.js +2 -0
  17. package/dist/floating-ui.react-dom-Cc_YSprQ.js.map +1 -0
  18. package/dist/index-2cFVyGXq.js.map +1 -1
  19. package/dist/index-B8Mazo6u.mjs.map +1 -1
  20. package/dist/index-BG6K_yAm.js.map +1 -1
  21. package/dist/index-BVmlsxuF.js.map +1 -1
  22. package/dist/index-BbtRr5Q6.js.map +1 -1
  23. package/dist/index-BtWPC8xc.js.map +1 -1
  24. package/dist/index-ByaXH_ih.mjs.map +1 -1
  25. package/dist/index-C1AXAWlO.mjs.map +1 -1
  26. package/dist/index-CCNZ9uWB.mjs.map +1 -1
  27. package/dist/index-CEQ35j8b.mjs.map +1 -1
  28. package/dist/index-CKCTy3ZL.mjs.map +1 -1
  29. package/dist/index-CLMd7NJE.mjs.map +1 -1
  30. package/dist/index-Cje7xxa1.js.map +1 -1
  31. package/dist/index-CleLBinl.js.map +1 -1
  32. package/dist/index-CoR7YA3H.js.map +1 -1
  33. package/dist/index-CxBG4Ssm.js.map +1 -1
  34. package/dist/index-DA01QPpC.js.map +1 -1
  35. package/dist/index-DCcK_d4W.mjs.map +1 -1
  36. package/dist/index-DDrLXRUs.mjs.map +1 -1
  37. package/dist/index-DLcqcWxM.mjs.map +1 -1
  38. package/dist/index-DOFLOnao.js.map +1 -1
  39. package/dist/index-DOfn3ixy.mjs.map +1 -1
  40. package/dist/index-DPxjTK4w.mjs.map +1 -1
  41. package/dist/index-DSf4qCR-.mjs.map +1 -1
  42. package/dist/index-DlMXYAr3.js.map +1 -1
  43. package/dist/index-HJvG7FXj.js.map +1 -1
  44. package/dist/index-Hk_HrrHM.js.map +1 -1
  45. package/dist/index-IpWiejWQ.mjs.map +1 -1
  46. package/dist/index-MiRhI3nq.mjs.map +1 -1
  47. package/dist/index-_XxjJPRD.js.map +1 -1
  48. package/dist/index-kcwFA4Dv.js.map +1 -1
  49. package/dist/index-tyLV0iiH.mjs.map +1 -1
  50. package/dist/label-7sJe5-pX.mjs.map +1 -1
  51. package/dist/label-yHK80hhV.js.map +1 -1
  52. package/dist/library.cjs.js +1 -1
  53. package/dist/library.es.js +5 -5
  54. package/dist/{popover-CYyCtoef.js → popover-B1BgSoQx.js} +2 -2
  55. package/dist/{popover-CYyCtoef.js.map → popover-B1BgSoQx.js.map} +1 -1
  56. package/dist/{popover-C6nZb3cQ.mjs → popover-DBMI9Jy1.mjs} +4 -4
  57. package/dist/{popover-C6nZb3cQ.mjs.map → popover-DBMI9Jy1.mjs.map} +1 -1
  58. package/dist/popover.cjs.js +1 -1
  59. package/dist/popover.es.js +1 -1
  60. package/dist/slider-CDOrFmK-.mjs.map +1 -1
  61. package/dist/slider-_R6JmPZl.js.map +1 -1
  62. package/dist/{stepper-DA0c9Utm.js → stepper-B248FwO-.js} +2 -2
  63. package/dist/{stepper-DA0c9Utm.js.map → stepper-B248FwO-.js.map} +1 -1
  64. package/dist/{stepper-D81jmbEf.mjs → stepper-BfIbJwZn.mjs} +2 -2
  65. package/dist/{stepper-D81jmbEf.mjs.map → stepper-BfIbJwZn.mjs.map} +1 -1
  66. package/dist/stepper.cjs.js +1 -1
  67. package/dist/stepper.es.js +1 -1
  68. package/dist/{table-Dd58bK_Q.js → table-BNeo_B1h.js} +2 -2
  69. package/dist/{table-Dd58bK_Q.js.map → table-BNeo_B1h.js.map} +1 -1
  70. package/dist/{table-CIrmGGb2.mjs → table-DvcpczWf.mjs} +2 -2
  71. package/dist/{table-CIrmGGb2.mjs.map → table-DvcpczWf.mjs.map} +1 -1
  72. package/dist/table.cjs.js +1 -1
  73. package/dist/table.es.js +1 -1
  74. package/dist/tabs-CfHd4UQ2.js.map +1 -1
  75. package/dist/tabs-CoXMAwMx.mjs.map +1 -1
  76. package/dist/toggle-C8IwTbX8.js.map +1 -1
  77. package/dist/toggle-Cezg5MUc.mjs.map +1 -1
  78. package/dist/{tooltip-870Nmk-v.js → tooltip-CLQLxoaf.js} +2 -2
  79. package/dist/{tooltip-870Nmk-v.js.map → tooltip-CLQLxoaf.js.map} +1 -1
  80. package/dist/{tooltip-Cqfj0lSz.mjs → tooltip-DXi7ikUT.mjs} +2 -2
  81. package/dist/{tooltip-Cqfj0lSz.mjs.map → tooltip-DXi7ikUT.mjs.map} +1 -1
  82. package/dist/tooltip.cjs.js +1 -1
  83. package/dist/tooltip.es.js +1 -1
  84. package/dist/visually-hidden-BYFkJEp1.mjs.map +1 -1
  85. package/dist/visually-hidden-C2CKovZx.js.map +1 -1
  86. package/package.json +68 -68
  87. package/dist/date-picker-BRkh2YEH.mjs.map +0 -1
  88. package/dist/date-picker-C2Wtf7XQ.js +0 -2
  89. package/dist/date-picker-C2Wtf7XQ.js.map +0 -1
  90. package/dist/floating-ui.react-dom-B_rB55Mr.mjs +0 -1340
  91. package/dist/floating-ui.react-dom-B_rB55Mr.mjs.map +0 -1
  92. package/dist/floating-ui.react-dom-z0lMBJ4R.js +0 -2
  93. package/dist/floating-ui.react-dom-z0lMBJ4R.js.map +0 -1
@@ -0,0 +1,2 @@
1
+ "use strict";const O=require("react/jsx-runtime"),Z=require("react"),y=require("./floating-ui.react-dom-Cc_YSprQ.js"),Lt=require("react-dom"),Ye=require("./calendar-pMM0fKEu.js"),ze=require("./date-field-CPiTZqa0.js"),Me=require("./drawer-nBpCtIdI.js"),_t=require("./icon-DNHpBTHs-faYHqTXU.js"),jt=require("./bind-DeUYJ6m9.js");function ht(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const c=ht(Z),Vt=ht(Lt);var Bt=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],Se=Bt.join(","),Et=typeof Element>"u",ge=Et?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ce=!Et&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},Ie=function(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),s=o===""||o==="true",i=s||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Ie(t.parentNode));return i},Ht=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},Rt=function(t,n,r){if(Ie(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Se));return n&&ge.call(t,Se)&&o.unshift(t),o=o.filter(r),o},Ae=function(t,n,r){for(var o=[],s=Array.from(t);s.length;){var i=s.shift();if(!Ie(i,!1))if(i.tagName==="SLOT"){var u=i.assignedElements(),d=u.length?u:i.children,a=Ae(d,!0,r);r.flatten?o.push.apply(o,a):o.push({scopeParent:i,candidates:a})}else{var v=ge.call(i,Se);v&&r.filter(i)&&(n||!t.includes(i))&&o.push(i);var R=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),A=!Ie(R,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(R&&A){var f=Ae(R===!0?i.children:R.children,!0,r);r.flatten?o.push.apply(o,f):o.push({scopeParent:i,candidates:f})}else s.unshift.apply(s,i.children)}}return o},yt=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},wt=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||Ht(t))&&!yt(t)?0:t.tabIndex},$t=function(t,n){var r=wt(t);return r<0&&n&&!yt(t)?0:r},qt=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},xt=function(t){return t.tagName==="INPUT"},Kt=function(t){return xt(t)&&t.type==="hidden"},Wt=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},Ut=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},Gt=function(t){if(!t.name)return!0;var n=t.form||Ce(t),r=function(u){return n.querySelectorAll('input[type="radio"][name="'+u+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(i){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",i.message),!1}var s=Ut(o,t.form);return!s||s===t},Yt=function(t){return xt(t)&&t.type==="radio"},zt=function(t){return Yt(t)&&!Gt(t)},Zt=function(t){var n,r=t&&Ce(t),o=(n=r)===null||n===void 0?void 0:n.host,s=!1;if(r&&r!==t){var i,u,d;for(s=!!((i=o)!==null&&i!==void 0&&(u=i.ownerDocument)!==null&&u!==void 0&&u.contains(o)||t!=null&&(d=t.ownerDocument)!==null&&d!==void 0&&d.contains(t));!s&&o;){var a,v,R;r=Ce(o),o=(a=r)===null||a===void 0?void 0:a.host,s=!!((v=o)!==null&&v!==void 0&&(R=v.ownerDocument)!==null&&R!==void 0&&R.contains(o))}}return s},Ze=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},Xt=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var s=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!s}if(getComputedStyle(t).visibility==="hidden")return!0;var i=ge.call(t,"details>summary:first-of-type"),u=i?t.parentElement:t;if(ge.call(u,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof o=="function"){for(var d=t;t;){var a=t.parentElement,v=Ce(t);if(a&&!a.shadowRoot&&o(a)===!0)return Ze(t);t.assignedSlot?t=t.assignedSlot:!a&&v!==t.ownerDocument?t=v.host:t=a}t=d}if(Zt(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Ze(t);return!1},Jt=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.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 ge.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},Ve=function(t,n){return!(n.disabled||Kt(n)||Xt(n,t)||Wt(n)||Jt(n))},Be=function(t,n){return!(zt(n)||wt(n)<0||!Ve(t,n))},Qt=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Tt=function(t){var n=[],r=[];return t.forEach(function(o,s){var i=!!o.scopeParent,u=i?o.scopeParent:o,d=$t(u,i),a=i?Tt(o.candidates):u;d===0?i?n.push.apply(n,a):n.push(u):r.push({documentOrder:s,tabIndex:d,item:o,isScope:i,content:a})}),r.sort(qt).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(n)},ke=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Ae([t],n.includeContainer,{filter:Be.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Qt}):r=Rt(t,n.includeContainer,Be.bind(null,n)),Tt(r)},en=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Ae([t],n.includeContainer,{filter:Ve.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=Rt(t,n.includeContainer,Ve.bind(null,n)),r},St=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return ge.call(t,Se)===!1?!1:Be(n,t)};function tn(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Ct(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function nn(){return/apple/i.test(navigator.vendor)}function He(){const e=/android/i;return e.test(tn())||e.test(Ct())}function rn(){return Ct().includes("jsdom/")}const Xe="data-floating-ui-focusable",on="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function ve(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function W(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&y.isShadowRoot(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function ue(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Pe(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function sn(e){return e.matches("html,body")}function X(e){return e?.ownerDocument||document}function It(e){return y.isHTMLElement(e)&&e.matches(on)}function Je(e){return e?e.getAttribute("role")==="combobox"&&It(e):!1}function Qe(e){return e?e.hasAttribute(Xe)?e:e.querySelector("["+Xe+"]")||e:null}function be(e,t,n){return n===void 0&&(n=!0),e.filter(o=>{var s;return o.parentId===t&&(!n||((s=o.context)==null?void 0:s.open))}).flatMap(o=>[o,...be(e,o.id,n)])}function et(e,t){var n;let r=[],o=(n=e.find(s=>s.id===t))==null?void 0:n.parentId;for(;o;){const s=e.find(i=>i.id===o);o=s?.parentId,s&&(r=r.concat(s))}return r}function Fe(e){e.preventDefault(),e.stopPropagation()}function an(e){return"nativeEvent"in e}function un(e){return e.mozInputSource===0&&e.isTrusted?!0:He()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function cn(e){return rn()?!1:!He()&&e.width===0&&e.height===0||He()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function tt(e,t){return["mouse","pen"].includes(e)}var ln=typeof document<"u",fn=function(){},Y=ln?Z.useLayoutEffect:fn;const dn={...c};function Le(e){const t=c.useRef(e);return Y(()=>{t.current=e}),t}const vn=dn.useInsertionEffect,bn=vn||(e=>e());function Q(e){const t=c.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return bn(()=>{t.current=e}),c.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const Re=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function At(e,t){const n=ke(e,Re()),r=n.length;if(r===0)return;const o=ve(X(e)),s=n.indexOf(o),i=s===-1?t===1?0:r-1:s+t;return n[i]}function Dt(e){return At(X(e).body,1)||e}function kt(e){return At(X(e).body,-1)||e}function he(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!W(n,r)}function mn(e){ke(e,Re()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function nt(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const gn="data-floating-ui-focusable",rt="active",ot="selected",pn={...c};let st=!1,hn=0;const it=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+hn++;function En(){const[e,t]=c.useState(()=>st?it():void 0);return Y(()=>{e==null&&t(it())},[]),c.useEffect(()=>{st=!0},[]),e}const Rn=pn.useId,Ot=Rn||En;let $e;process.env.NODE_ENV!=="production"&&($e=new Set);function yn(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=$e)!=null&&e.has(o))){var s;(s=$e)==null||s.add(o),console.error(o)}}function wn(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const xn=c.createContext(null),Tn=c.createContext(null),Sn=()=>{var e;return((e=c.useContext(xn))==null?void 0:e.id)||null},Ke=()=>c.useContext(Tn);function Ee(e){return"data-floating-ui-"+e}function Cn(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}let at=0;function de(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(at);const s=()=>e?.focus({preventScroll:n});o?s():at=requestAnimationFrame(s)}function In(e){return e?.ownerDocument||document}const me={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function ut(e){return e==="inert"?me.inert:e==="aria-hidden"?me["aria-hidden"]:me.none}let xe=new WeakSet,Te={},_e=0;const An=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype;function Nt(e){return e?y.isShadowRoot(e)?e.host:Nt(e.parentNode):null}const Dn=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Nt(n);return e.contains(r)?r:null}).filter(n=>n!=null);function kn(e,t,n,r){const o="data-floating-ui-inert",s=r?"inert":n?"aria-hidden":null,i=Dn(t,e),u=new Set,d=new Set(i),a=[];Te[o]||(Te[o]=new WeakMap);const v=Te[o];i.forEach(R),A(t),u.clear();function R(f){!f||u.has(f)||(u.add(f),f.parentNode&&R(f.parentNode))}function A(f){!f||d.has(f)||[].forEach.call(f.children,h=>{if(y.getNodeName(h)!=="script")if(u.has(h))A(h);else{const l=s?h.getAttribute(s):null,x=l!==null&&l!=="false",S=ut(s),g=(S.get(h)||0)+1,p=(v.get(h)||0)+1;S.set(h,g),v.set(h,p),a.push(h),g===1&&x&&xe.add(h),p===1&&h.setAttribute(o,""),!x&&s&&h.setAttribute(s,s==="inert"?"":"true")}})}return _e++,()=>{a.forEach(f=>{const h=ut(s),x=(h.get(f)||0)-1,S=(v.get(f)||0)-1;h.set(f,x),v.set(f,S),x||(!xe.has(f)&&s&&f.removeAttribute(s),xe.delete(f)),S||f.removeAttribute(o)}),_e--,_e||(me.inert=new WeakMap,me["aria-hidden"]=new WeakMap,me.none=new WeakMap,xe=new WeakSet,Te={})}}function ct(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=In(e[0]).body;return kn(e.concat(Array.from(r.querySelectorAll('[aria-live],[role="status"],output'))),r,t,n)}const We={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},De=c.forwardRef(function(t,n){const[r,o]=c.useState();Y(()=>{nn()&&o("button")},[]);const s={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Ee("focus-guard")]:"",style:We};return O.jsx("span",{...t,...s})}),On={clipPath:"inset(50%)",position:"fixed",top:0,left:0},Mt=c.createContext(null),lt=Ee("portal");function Nn(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Ot(),o=Pt(),[s,i]=c.useState(null),u=c.useRef(null);return Y(()=>()=>{s?.remove(),queueMicrotask(()=>{u.current=null})},[s]),Y(()=>{if(!r||u.current)return;const d=t?document.getElementById(t):null;if(!d)return;const a=document.createElement("div");a.id=r,a.setAttribute(lt,""),d.appendChild(a),u.current=a,i(a)},[t,r]),Y(()=>{if(n===null||!r||u.current)return;let d=n||o?.portalNode;d&&!y.isNode(d)&&(d=d.current),d=d||document.body;let a=null;t&&(a=document.createElement("div"),a.id=t,d.appendChild(a));const v=document.createElement("div");v.id=r,v.setAttribute(lt,""),d=a||d,d.appendChild(v),u.current=v,i(v)},[t,n,r,o]),s}function Mn(e){const{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,s=Nn({id:n,root:r}),[i,u]=c.useState(null),d=c.useRef(null),a=c.useRef(null),v=c.useRef(null),R=c.useRef(null),A=i?.modal,f=i?.open,h=!!i&&!i.modal&&i.open&&o&&!!(r||s);return c.useEffect(()=>{if(!s||!o||A)return;function l(x){s&&he(x)&&(x.type==="focusin"?nt:mn)(s)}return s.addEventListener("focusin",l,!0),s.addEventListener("focusout",l,!0),()=>{s.removeEventListener("focusin",l,!0),s.removeEventListener("focusout",l,!0)}},[s,o,A]),c.useEffect(()=>{s&&(f||nt(s))},[f,s]),O.jsxs(Mt.Provider,{value:c.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:d,afterOutsideRef:a,beforeInsideRef:v,afterInsideRef:R,portalNode:s,setFocusManagerState:u}),[o,s]),children:[h&&s&&O.jsx(De,{"data-type":"outside",ref:d,onFocus:l=>{if(he(l,s)){var x;(x=v.current)==null||x.focus()}else{const S=i?i.domReference:null,g=kt(S);g?.focus()}}}),h&&s&&O.jsx("span",{"aria-owns":s.id,style:On}),s&&Vt.createPortal(t,s),h&&s&&O.jsx(De,{"data-type":"outside",ref:a,onFocus:l=>{if(he(l,s)){var x;(x=R.current)==null||x.focus()}else{const S=i?i.domReference:null,g=Dt(S);g?.focus(),i?.closeOnFocusOut&&i?.onOpenChange(!1,l.nativeEvent,"focus-out")}}})]})}const Pt=()=>c.useContext(Mt);function ft(e){return c.useMemo(()=>t=>{e.forEach(n=>{n&&(n.current=t)})},e)}const dt=20;let ce=[];function Ue(){ce=ce.filter(e=>{var t;return(t=e.deref())==null?void 0:t.isConnected})}function Pn(e){Ue(),e&&y.getNodeName(e)!=="body"&&(ce.push(new WeakRef(e)),ce.length>dt&&(ce=ce.slice(-dt)))}function vt(){Ue();const e=ce[ce.length-1];return e?.deref()}function Fn(e){const t=Re();return St(e,t)?e:ke(e,t)[0]||e}function bt(e,t){var n;if(!t.current.includes("floating")&&!((n=e.getAttribute("role"))!=null&&n.includes("dialog")))return;const r=Re(),s=en(e,r).filter(u=>{const d=u.getAttribute("data-tabindex")||"";return St(u,r)||u.hasAttribute("data-tabindex")&&!d.startsWith("-")}),i=e.getAttribute("tabindex");t.current.includes("floating")||s.length===0?i!=="0"&&e.setAttribute("tabindex","0"):(i!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}const Ln=c.forwardRef(function(t,n){return O.jsx("button",{...t,type:"button",ref:n,tabIndex:-1,style:We})});function _n(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:s=!0,initialFocus:i=0,returnFocus:u=!0,restoreFocus:d=!1,modal:a=!0,visuallyHiddenDismiss:v=!1,closeOnFocusOut:R=!0,outsideElementsInert:A=!1,getInsideElements:f=()=>[]}=e,{open:h,onOpenChange:l,events:x,dataRef:S,elements:{domReference:g,floating:p}}=t,_=Q(()=>{var w;return(w=S.current.floatingContext)==null?void 0:w.nodeId}),$=Q(f),q=typeof i=="number"&&i<0,P=Je(g)&&q,H=An(),re=H?s:!0,ee=!re||H&&A,C=Le(o),pe=Le(i),oe=Le(u),m=Ke(),b=Pt(),B=c.useRef(null),j=c.useRef(null),E=c.useRef(!1),F=c.useRef(!1),V=c.useRef(-1),z=c.useRef(-1),fe=b!=null,I=Qe(p),J=Q(function(w){return w===void 0&&(w=I),w?ke(w,Re()):[]}),M=Q(w=>{const D=J(w);return C.current.map(T=>g&&T==="reference"?g:I&&T==="floating"?I:D).filter(Boolean).flat()});c.useEffect(()=>{if(r||!a)return;function w(T){if(T.key==="Tab"){W(I,ve(X(I)))&&J().length===0&&!P&&Fe(T);const N=M(),L=ue(T);C.current[0]==="reference"&&L===g&&(Fe(T),T.shiftKey?de(N[N.length-1]):de(N[1])),C.current[1]==="floating"&&L===I&&T.shiftKey&&(Fe(T),de(N[0]))}}const D=X(I);return D.addEventListener("keydown",w),()=>{D.removeEventListener("keydown",w)}},[r,g,I,a,C,P,J,M]),c.useEffect(()=>{if(r||!p)return;function w(D){const T=ue(D),L=J().indexOf(T);L!==-1&&(V.current=L)}return p.addEventListener("focusin",w),()=>{p.removeEventListener("focusin",w)}},[r,p,J]),c.useEffect(()=>{if(r||!R)return;function w(){F.current=!0,setTimeout(()=>{F.current=!1})}function D(L){const k=L.relatedTarget,te=L.currentTarget,G=ue(L);queueMicrotask(()=>{const K=_(),le=!(W(g,k)||W(p,k)||W(k,p)||W(b?.portalNode,k)||k!=null&&k.hasAttribute(Ee("focus-guard"))||m&&(be(m.nodesRef.current,K).find(ie=>{var ne,ae;return W((ne=ie.context)==null?void 0:ne.elements.floating,k)||W((ae=ie.context)==null?void 0:ae.elements.domReference,k)})||et(m.nodesRef.current,K).find(ie=>{var ne,ae,Ge;return[(ne=ie.context)==null?void 0:ne.elements.floating,Qe((ae=ie.context)==null?void 0:ae.elements.floating)].includes(k)||((Ge=ie.context)==null?void 0:Ge.elements.domReference)===k})));if(te===g&&I&&bt(I,C),d&&te!==g&&!(G!=null&&G.isConnected)&&ve(X(I))===X(I).body){y.isHTMLElement(I)&&I.focus();const ie=V.current,ne=J(),ae=ne[ie]||ne[ne.length-1]||I;y.isHTMLElement(ae)&&ae.focus()}if(S.current.insideReactTree){S.current.insideReactTree=!1;return}(P||!a)&&k&&le&&!F.current&&k!==vt()&&(E.current=!0,l(!1,L,"focus-out"))})}const T=!!(!m&&b);function N(){Cn(z),S.current.insideReactTree=!0,z.current=window.setTimeout(()=>{S.current.insideReactTree=!1})}if(p&&y.isHTMLElement(g))return g.addEventListener("focusout",D),g.addEventListener("pointerdown",w),p.addEventListener("focusout",D),T&&p.addEventListener("focusout",N,!0),()=>{g.removeEventListener("focusout",D),g.removeEventListener("pointerdown",w),p.removeEventListener("focusout",D),T&&p.removeEventListener("focusout",N,!0)}},[r,g,p,I,a,m,b,l,R,d,J,P,_,C,S]);const U=c.useRef(null),se=c.useRef(null),Oe=ft([U,b?.beforeInsideRef]),Ne=ft([se,b?.afterInsideRef]);c.useEffect(()=>{var w,D;if(r||!p)return;const T=Array.from((b==null||(w=b.portalNode)==null?void 0:w.querySelectorAll("["+Ee("portal")+"]"))||[]),L=(D=(m?et(m.nodesRef.current,_()):[]).find(G=>{var K;return Je(((K=G.context)==null?void 0:K.elements.domReference)||null)}))==null||(D=D.context)==null?void 0:D.elements.domReference,k=[p,L,...T,...$(),B.current,j.current,U.current,se.current,b?.beforeOutsideRef.current,b?.afterOutsideRef.current,C.current.includes("reference")||P?g:null].filter(G=>G!=null),te=a||P?ct(k,!ee,ee):ct(k);return()=>{te()}},[r,g,p,a,C,b,P,re,ee,m,_,$]),Y(()=>{if(r||!y.isHTMLElement(I))return;const w=X(I),D=ve(w);queueMicrotask(()=>{const T=M(I),N=pe.current,L=(typeof N=="number"?T[N]:N.current)||I,k=W(I,D);!q&&!k&&h&&de(L,{preventScroll:L===I})})},[r,h,I,q,M,pe]),Y(()=>{if(r||!I)return;const w=X(I),D=ve(w);Pn(D);function T(k){let{reason:te,event:G,nested:K}=k;if(["hover","safe-polygon"].includes(te)&&G.type==="mouseleave"&&(E.current=!0),te==="outside-press")if(K)E.current=!1;else if(un(G)||cn(G))E.current=!1;else{let le=!1;document.createElement("div").focus({get preventScroll(){return le=!0,!1}}),le?E.current=!1:E.current=!0}}x.on("openchange",T);const N=w.createElement("span");N.setAttribute("tabindex","-1"),N.setAttribute("aria-hidden","true"),Object.assign(N.style,We),fe&&g&&g.insertAdjacentElement("afterend",N);function L(){if(typeof oe.current=="boolean"){const k=g||vt();return k&&k.isConnected?k:N}return oe.current.current||N}return()=>{x.off("openchange",T);const k=ve(w),te=W(p,k)||m&&be(m.nodesRef.current,_(),!1).some(K=>{var le;return W((le=K.context)==null?void 0:le.elements.floating,k)}),G=L();queueMicrotask(()=>{const K=Fn(G);oe.current&&!E.current&&y.isHTMLElement(K)&&(!(K!==k&&k!==w.body)||te)&&K.focus({preventScroll:!0}),N.remove()})}},[r,p,I,oe,S,x,m,fe,g,_]),c.useEffect(()=>(queueMicrotask(()=>{E.current=!1}),()=>{queueMicrotask(Ue)}),[r]),Y(()=>{if(!r&&b)return b.setFocusManagerState({modal:a,closeOnFocusOut:R,open:h,onOpenChange:l,domReference:g}),()=>{b.setFocusManagerState(null)}},[r,b,a,h,l,R,g]),Y(()=>{r||I&&bt(I,C)},[r,I,C]);function ye(w){return r||!v||!a?null:O.jsx(Ln,{ref:w==="start"?B:j,onClick:D=>l(!1,D.nativeEvent),children:typeof v=="string"?v:"Dismiss"})}const we=!r&&re&&(a?!P:!0)&&(fe||a);return O.jsxs(O.Fragment,{children:[we&&O.jsx(De,{"data-type":"inside",ref:Oe,onFocus:w=>{if(a){const T=M();de(o[0]==="reference"?T[0]:T[T.length-1])}else if(b!=null&&b.preserveTabOrder&&b.portalNode)if(E.current=!1,he(w,b.portalNode)){const T=Dt(g);T?.focus()}else{var D;(D=b.beforeOutsideRef.current)==null||D.focus()}}}),!P&&ye("start"),n,ye("end"),we&&O.jsx(De,{"data-type":"inside",ref:Ne,onFocus:w=>{if(a)de(M()[0]);else if(b!=null&&b.preserveTabOrder&&b.portalNode)if(R&&(E.current=!0),he(w,b.portalNode)){const T=kt(g);T?.focus()}else{var D;(D=b.afterOutsideRef.current)==null||D.focus()}}})]})}function mt(e){return y.isHTMLElement(e.target)&&e.target.tagName==="BUTTON"}function jn(e){return y.isHTMLElement(e.target)&&e.target.tagName==="A"}function gt(e){return It(e)}function Vn(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:s}}=e,{enabled:i=!0,event:u="click",toggle:d=!0,ignoreMouse:a=!1,keyboardHandlers:v=!0,stickIfOpen:R=!0}=t,A=c.useRef(),f=c.useRef(!1),h=c.useMemo(()=>({onPointerDown(l){A.current=l.pointerType},onMouseDown(l){const x=A.current;l.button===0&&u!=="click"&&(tt(x)&&a||(n&&d&&(!(o.current.openEvent&&R)||o.current.openEvent.type==="mousedown")?r(!1,l.nativeEvent,"click"):(l.preventDefault(),r(!0,l.nativeEvent,"click"))))},onClick(l){const x=A.current;if(u==="mousedown"&&A.current){A.current=void 0;return}tt(x)&&a||(n&&d&&(!(o.current.openEvent&&R)||o.current.openEvent.type==="click")?r(!1,l.nativeEvent,"click"):r(!0,l.nativeEvent,"click"))},onKeyDown(l){A.current=void 0,!(l.defaultPrevented||!v||mt(l))&&(l.key===" "&&!gt(s)&&(l.preventDefault(),f.current=!0),!jn(l)&&l.key==="Enter"&&r(!(n&&d),l.nativeEvent,"click"))},onKeyUp(l){l.defaultPrevented||!v||mt(l)||gt(s)||l.key===" "&&f.current&&(f.current=!1,r(!(n&&d),l.nativeEvent,"click"))}}),[o,s,u,a,v,r,n,R,d]);return c.useMemo(()=>i?{reference:h}:{},[i,h])}const Bn={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Hn={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},pt=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e?.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e?.outsidePress)!=null?n:!0}};function $n(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:s}=e,{enabled:i=!0,escapeKey:u=!0,outsidePress:d=!0,outsidePressEvent:a="pointerdown",referencePress:v=!1,referencePressEvent:R="pointerdown",ancestorScroll:A=!1,bubbles:f,capture:h}=t,l=Ke(),x=Q(typeof d=="function"?d:()=>!1),S=typeof d=="function"?x:d,g=c.useRef(!1),{escapeKey:p,outsidePress:_}=pt(f),{escapeKey:$,outsidePress:q}=pt(h),P=c.useRef(!1),H=Q(m=>{var b;if(!n||!i||!u||m.key!=="Escape"||P.current)return;const B=(b=s.current.floatingContext)==null?void 0:b.nodeId,j=l?be(l.nodesRef.current,B):[];if(!p&&(m.stopPropagation(),j.length>0)){let E=!0;if(j.forEach(F=>{var V;if((V=F.context)!=null&&V.open&&!F.context.dataRef.current.__escapeKeyBubbles){E=!1;return}}),!E)return}r(!1,an(m)?m.nativeEvent:m,"escape-key")}),re=Q(m=>{var b;const B=()=>{var j;H(m),(j=ue(m))==null||j.removeEventListener("keydown",B)};(b=ue(m))==null||b.addEventListener("keydown",B)}),ee=Q(m=>{var b;const B=s.current.insideReactTree;s.current.insideReactTree=!1;const j=g.current;if(g.current=!1,a==="click"&&j||B||typeof S=="function"&&!S(m))return;const E=ue(m),F="["+Ee("inert")+"]",V=X(o.floating).querySelectorAll(F);let z=y.isElement(E)?E:null;for(;z&&!y.isLastTraversableNode(z);){const M=y.getParentNode(z);if(y.isLastTraversableNode(M)||!y.isElement(M))break;z=M}if(V.length&&y.isElement(E)&&!sn(E)&&!W(E,o.floating)&&Array.from(V).every(M=>!W(z,M)))return;if(y.isHTMLElement(E)&&oe){const M=y.isLastTraversableNode(E),U=y.getComputedStyle(E),se=/auto|scroll/,Oe=M||se.test(U.overflowX),Ne=M||se.test(U.overflowY),ye=Oe&&E.clientWidth>0&&E.scrollWidth>E.clientWidth,we=Ne&&E.clientHeight>0&&E.scrollHeight>E.clientHeight,w=U.direction==="rtl",D=we&&(w?m.offsetX<=E.offsetWidth-E.clientWidth:m.offsetX>E.clientWidth),T=ye&&m.offsetY>E.clientHeight;if(D||T)return}const fe=(b=s.current.floatingContext)==null?void 0:b.nodeId,I=l&&be(l.nodesRef.current,fe).some(M=>{var U;return Pe(m,(U=M.context)==null?void 0:U.elements.floating)});if(Pe(m,o.floating)||Pe(m,o.domReference)||I)return;const J=l?be(l.nodesRef.current,fe):[];if(J.length>0){let M=!0;if(J.forEach(U=>{var se;if((se=U.context)!=null&&se.open&&!U.context.dataRef.current.__outsidePressBubbles){M=!1;return}}),!M)return}r(!1,m,"outside-press")}),C=Q(m=>{var b;const B=()=>{var j;ee(m),(j=ue(m))==null||j.removeEventListener(a,B)};(b=ue(m))==null||b.addEventListener(a,B)});c.useEffect(()=>{if(!n||!i)return;s.current.__escapeKeyBubbles=p,s.current.__outsidePressBubbles=_;let m=-1;function b(V){r(!1,V,"ancestor-scroll")}function B(){window.clearTimeout(m),P.current=!0}function j(){m=window.setTimeout(()=>{P.current=!1},y.isWebKit()?5:0)}const E=X(o.floating);u&&(E.addEventListener("keydown",$?re:H,$),E.addEventListener("compositionstart",B),E.addEventListener("compositionend",j)),S&&E.addEventListener(a,q?C:ee,q);let F=[];return A&&(y.isElement(o.domReference)&&(F=y.getOverflowAncestors(o.domReference)),y.isElement(o.floating)&&(F=F.concat(y.getOverflowAncestors(o.floating))),!y.isElement(o.reference)&&o.reference&&o.reference.contextElement&&(F=F.concat(y.getOverflowAncestors(o.reference.contextElement)))),F=F.filter(V=>{var z;return V!==((z=E.defaultView)==null?void 0:z.visualViewport)}),F.forEach(V=>{V.addEventListener("scroll",b,{passive:!0})}),()=>{u&&(E.removeEventListener("keydown",$?re:H,$),E.removeEventListener("compositionstart",B),E.removeEventListener("compositionend",j)),S&&E.removeEventListener(a,q?C:ee,q),F.forEach(V=>{V.removeEventListener("scroll",b)}),window.clearTimeout(m)}},[s,o,u,S,a,n,r,A,i,p,_,H,$,re,ee,q,C]),c.useEffect(()=>{s.current.insideReactTree=!1},[s,S,a]);const pe=c.useMemo(()=>({onKeyDown:H,...v&&{[Bn[R]]:m=>{r(!1,m.nativeEvent,"reference-press")},...R!=="click"&&{onClick(m){r(!1,m.nativeEvent,"reference-press")}}}}),[H,r,v,R]),oe=c.useMemo(()=>{function m(b){b.button===0&&(g.current=!0)}return{onKeyDown:H,onMouseDown:m,onMouseUp:m,[Hn[a]]:()=>{s.current.insideReactTree=!0}}},[H,a,s]);return c.useMemo(()=>i?{reference:pe,floating:oe}:{},[i,pe,oe])}function qn(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Ot(),s=c.useRef({}),[i]=c.useState(()=>wn()),u=Sn()!=null;if(process.env.NODE_ENV!=="production"){const f=r.reference;f&&!y.isElement(f)&&yn("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[d,a]=c.useState(r.reference),v=Q((f,h,l)=>{s.current.openEvent=f?h:void 0,i.emit("openchange",{open:f,event:h,reason:l,nested:u}),n?.(f,h,l)}),R=c.useMemo(()=>({setPositionReference:a}),[]),A=c.useMemo(()=>({reference:d||r.reference||null,floating:r.floating||null,domReference:r.reference}),[d,r.reference,r.floating]);return c.useMemo(()=>({dataRef:s,open:t,onOpenChange:v,elements:A,events:i,floatingId:o,refs:R}),[t,v,A,i,o,R])}function Kn(e){e===void 0&&(e={});const{nodeId:t}=e,n=qn({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[s,i]=c.useState(null),[u,d]=c.useState(null),v=o?.domReference||s,R=c.useRef(null),A=Ke();Y(()=>{v&&(R.current=v)},[v]);const f=y.useFloating({...e,elements:{...o,...u&&{reference:u}}}),h=c.useCallback(p=>{const _=y.isElement(p)?{getBoundingClientRect:()=>p.getBoundingClientRect(),getClientRects:()=>p.getClientRects(),contextElement:p}:p;d(_),f.refs.setReference(_)},[f.refs]),l=c.useCallback(p=>{(y.isElement(p)||p===null)&&(R.current=p,i(p)),(y.isElement(f.refs.reference.current)||f.refs.reference.current===null||p!==null&&!y.isElement(p))&&f.refs.setReference(p)},[f.refs]),x=c.useMemo(()=>({...f.refs,setReference:l,setPositionReference:h,domReference:R}),[f.refs,l,h]),S=c.useMemo(()=>({...f.elements,domReference:v}),[f.elements,v]),g=c.useMemo(()=>({...f,...r,refs:x,elements:S,nodeId:t}),[f,x,S,t,r]);return Y(()=>{r.dataRef.current.floatingContext=g;const p=A?.nodesRef.current.find(_=>_.id===t);p&&(p.context=g)}),c.useMemo(()=>({...f,context:g,refs:x,elements:S}),[f,x,S,g])}function je(e,t,n){const r=new Map,o=n==="item";let s=e;if(o&&e){const{[rt]:i,[ot]:u,...d}=e;s=d}return{...n==="floating"&&{tabIndex:-1,[gn]:""},...s,...t.map(i=>{const u=i?i[n]:null;return typeof u=="function"?e?u(e):null:u}).concat(e).reduce((i,u)=>(u&&Object.entries(u).forEach(d=>{let[a,v]=d;if(!(o&&[rt,ot].includes(a)))if(a.indexOf("on")===0){if(r.has(a)||r.set(a,[]),typeof v=="function"){var R;(R=r.get(a))==null||R.push(v),i[a]=function(){for(var A,f=arguments.length,h=new Array(f),l=0;l<f;l++)h[l]=arguments[l];return(A=r.get(a))==null?void 0:A.map(x=>x(...h)).find(x=>x!==void 0)}}}else i[a]=v}),i),{})}}function Wn(e){e===void 0&&(e=[]);const t=e.map(u=>u?.reference),n=e.map(u=>u?.floating),r=e.map(u=>u?.item),o=c.useCallback(u=>je(u,e,"reference"),t),s=c.useCallback(u=>je(u,e,"floating"),n),i=c.useCallback(u=>je(u,e,"item"),r);return c.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:i}),[o,s,i])}const Un={name:"calendar",svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M8 1.6a.9.9 0 0 1 .9.9V7a.9.9 0 0 1-1.8 0V5.9H4a.1.1 0 0 0-.1.1v3.105A.91.91 0 0 1 4 9.1h16.1V6a.1.1 0 0 0-.1-.1h-3.1V7a.9.9 0 1 1-1.8 0V5.9h-3.6a.9.9 0 1 1 0-1.8h3.6V2.5a.9.9 0 1 1 1.8 0v1.6H20c1.05 0 1.9.85 1.9 1.9v14a1.9 1.9 0 0 1-1.9 1.9H4A1.9 1.9 0 0 1 2.1 20V6c0-1.05.85-1.9 1.9-1.9h3.1V2.5a.9.9 0 0 1 .9-.9Zm12.1 9.3H4a.917.917 0 0 1-.1-.005V20a.1.1 0 0 0 .1.1h16a.1.1 0 0 0 .1-.1v-9.1ZM5.6 13.5a.9.9 0 0 1 .9-.9h1a.9.9 0 1 1 0 1.8h-1a.9.9 0 0 1-.9-.9Zm5 0a.9.9 0 0 1 .9-.9h1a.9.9 0 1 1 0 1.8h-1a.9.9 0 0 1-.9-.9Zm5 0a.9.9 0 0 1 .9-.9h1a.9.9 0 1 1 0 1.8h-1a.9.9 0 0 1-.9-.9Zm-10 4a.9.9 0 0 1 .9-.9h1a.9.9 0 1 1 0 1.8h-1a.9.9 0 0 1-.9-.9Zm5 0a.9.9 0 0 1 .9-.9h1a.9.9 0 1 1 0 1.8h-1a.9.9 0 0 1-.9-.9Zm5 0a.9.9 0 0 1 .9-.9h1a.9.9 0 1 1 0 1.8h-1a.9.9 0 0 1-.9-.9Z" clip-rule="evenodd"/></svg>',keywords:["calendar"],category:"other"},qe=e=>O.jsx(_t.b,{...e,svg:Un});qe.displayName="IconCalendar";const Gn={"date-picker-calendar-container":"_date-picker-calendar-container_17f84_1"},Yn=jt.c.bind(Gn),Ft=Z.forwardRef(({calendarProps:e,drawerContentProps:t,value:n,onChange:r,overlayZIndex:o,...s},i)=>{const[u,d]=Z.useState(!1),[a,v]=Z.useState(!1),[R,A]=Z.useState(!1),f=Z.useRef(null),{context:h,refs:l,floatingStyles:x}=Kn({open:u,onOpenChange:C=>{s.readOnly||d(C)},placement:"bottom-start",middleware:[y.offset({mainAxis:10,crossAxis:-32}),y.flip()],whileElementsMounted:y.autoUpdate}),S=Vn(h),g=$n(h),{getFloatingProps:p,getReferenceProps:_}=Wn([S,g]),[$,q]=Z.useState(n);Z.useEffect(()=>{q(n)},[n]);const P=C=>{C?(q(C),r?.(C),(u||a)&&(d(!1),v(!1))):(q(void 0),r?.(void 0))},H=Z.useId();return Z.useLayoutEffect(()=>{const C=()=>{A(window.innerWidth<600)};return C(),window.addEventListener("resize",C),()=>{window.removeEventListener("resize",C)}},[]),R?O.jsxs(Me.Drawer,{open:a,onOpenChange:v,children:[O.jsx(Me.Drawer.Trigger,{children:O.jsx(ze.DateField,{...s,startAdornment:O.jsx(qe,{size:"sm"}),id:H,value:$,onChange:C=>P(C),"data-testid":s["data-testid"]})}),O.jsx(Me.Drawer.Content,{"data-testid":s["data-testid"]&&`${s["data-testid"]}-calendar`,fitToContent:!0,...t,zIndex:o,children:O.jsx(Ye.Calendar,{showOutsideDays:!0,...e,mode:"single",selected:$,onSelect:C=>P(C)})})]}):O.jsxs("div",{ref:i,children:[O.jsx(ze.DateField,{..._(s),ref:l.setReference,startAdornment:O.jsx(qe,{size:"sm"}),id:H,value:$,onChange:C=>P(C),"data-testid":s["data-testid"]}),u&&!s.readOnly&&O.jsx(Mn,{children:O.jsx(_n,{context:h,initialFocus:f,children:O.jsx("div",{"data-testid":s["data-testid"]&&`${s["data-testid"]}-calendar`,className:Yn("date-picker-calendar-container"),ref:l.setFloating,style:{...x,zIndex:o},...p(),children:O.jsx(Ye.Calendar,{showOutsideDays:!0,...e,mode:"single",selected:$,onSelect:C=>P(C),firstElementRef:f})})})})]})});Ft.displayName="DatePicker";exports.DatePicker=Ft;
2
+ //# sourceMappingURL=date-picker-DlJGggam.js.map