@povio/ui 3.4.0-rc.32 → 3.4.0-rc.34

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 (119) hide show
  1. package/dist/{BottomSheet-Bf5YauUF.js → BottomSheet-CVIgVXNP.js} +2 -2
  2. package/dist/{Breadcrumbs-D8ngBc93.js → Breadcrumbs-BypydWR6.js} +2 -2
  3. package/dist/{Calendar-D2IPtih0.js → Calendar-CJscjq0V.js} +4 -4
  4. package/dist/{DatePicker-C5inJMib.js → DatePicker-DIad7xyY.js} +4 -4
  5. package/dist/{DatePickerInput-CtkeReVQ.js → DatePickerInput-g8VFnlw8.js} +1 -1
  6. package/dist/{DateRangePicker-BcYoPnDA.js → DateRangePicker-0vELBNcS.js} +3 -3
  7. package/dist/{DateTimePicker-CocJ2QGc.js → DateTimePicker-ChVdA0tD.js} +4 -4
  8. package/dist/{Dialog-CYPAuk4r.js → Dialog-B5J6LRRw.js} +2 -71
  9. package/dist/{Form-U_gaYtIz.d.ts → Form-C91OtvWn.d.ts} +1 -1
  10. package/dist/{InputItem-msRZqamc.js → InputItem-DRjyA0oH.js} +5 -5
  11. package/dist/{Inputs-D0nApWoP.d.ts → Inputs-CalpKD9s.d.ts} +1 -1
  12. package/dist/{Inputs-COn_OHA2.js → Inputs-Cmt2mxFU.js} +1 -1
  13. package/dist/{ListBox-CJbpH_Kh.js → ListBox-CIgWt1tg.js} +1 -1
  14. package/dist/{Menu-CXlFN-mb.js → Menu-BxbxSqMx.js} +2 -2
  15. package/dist/{MenuDesktop-CuQBZODp.js → MenuDesktop-Dv25P83N.js} +1 -1
  16. package/dist/{Modal-BbiLj4ai.js → Modal-CEJ2QkF0.js} +1 -1
  17. package/dist/{Modal-Cerq7LEf.js → Modal-r0ucQNPK.js} +2 -2
  18. package/dist/{Select-CO2ppqqL.js → Select-B7vfRfll.js} +1 -1
  19. package/dist/{TextEditor-CDv7Tf57.js → TextEditor-DScsU-U2.js} +3 -3
  20. package/dist/{TimePicker-BmTVdF1E.js → TimePicker-DC_MYdqe.js} +2 -2
  21. package/dist/components/action-modal.js +1 -1
  22. package/dist/components/autocomplete.js +1 -1
  23. package/dist/components/bottom-sheet.js +2 -2
  24. package/dist/components/breadcrumb/react-aria.js +1 -11
  25. package/dist/components/breadcrumbs/react-aria.js +1 -11
  26. package/dist/components/breadcrumbs.js +1 -1
  27. package/dist/components/cell/react-aria.js +1 -11
  28. package/dist/components/collection/react-aria.js +1 -11
  29. package/dist/components/color-swatch-picker/react-aria.js +1 -11
  30. package/dist/components/color-swatch-picker-item/react-aria.js +1 -11
  31. package/dist/components/column/react-aria.js +1 -11
  32. package/dist/components/column-resizer/react-aria.js +1 -11
  33. package/dist/components/combo-box/react-aria.js +1 -11
  34. package/dist/components/date-picker.js +1 -1
  35. package/dist/components/date-range-picker.js +1 -1
  36. package/dist/components/date-time-picker.js +1 -1
  37. package/dist/components/drawer.js +2 -2
  38. package/dist/components/grid-list/react-aria.js +1 -11
  39. package/dist/components/grid-list-header/react-aria.js +1 -11
  40. package/dist/components/grid-list-item/react-aria.js +1 -11
  41. package/dist/components/grid-list-load-more-item/react-aria.js +1 -11
  42. package/dist/components/grid-list-section/react-aria.js +1 -11
  43. package/dist/components/header/react-aria.js +1 -11
  44. package/dist/components/list-box/react-aria.js +1 -11
  45. package/dist/components/list-box-item/react-aria.js +1 -11
  46. package/dist/components/list-box-load-more-item/react-aria.js +1 -11
  47. package/dist/components/list-box-section/react-aria.js +1 -11
  48. package/dist/components/menu/react-aria.js +1 -11
  49. package/dist/components/menu-item/react-aria.js +1 -11
  50. package/dist/components/menu-section/react-aria.js +1 -11
  51. package/dist/components/menu.js +2 -2
  52. package/dist/components/modal.js +1 -1
  53. package/dist/components/query-autocomplete.d.ts +1 -1
  54. package/dist/components/query-autocomplete.js +3 -3
  55. package/dist/components/query-select.js +1 -1
  56. package/dist/components/resizable-table-container/react-aria.js +1 -11
  57. package/dist/components/responsive-popover.js +1 -1
  58. package/dist/components/row/react-aria.js +1 -11
  59. package/dist/components/section/react-aria.js +1 -11
  60. package/dist/components/select/react-aria.js +1 -11
  61. package/dist/components/select.js +1 -1
  62. package/dist/components/separator/react-aria.js +1 -11
  63. package/dist/components/split-button.js +1 -1
  64. package/dist/components/submenu-trigger/react-aria.js +1 -11
  65. package/dist/components/tab/react-aria.js +1 -11
  66. package/dist/components/tab-list/react-aria.js +1 -11
  67. package/dist/components/tab-panels/react-aria.js +1 -11
  68. package/dist/components/table/react-aria.js +1 -11
  69. package/dist/components/table-body/react-aria.js +1 -11
  70. package/dist/components/table-header/react-aria.js +1 -11
  71. package/dist/components/table-load-more-item/react-aria.js +1 -11
  72. package/dist/components/tabs/react-aria.js +1 -11
  73. package/dist/components/tag/react-aria.js +1 -11
  74. package/dist/components/tag-group/react-aria.js +1 -11
  75. package/dist/components/tag-list/react-aria.js +1 -11
  76. package/dist/components/time-picker.js +1 -1
  77. package/dist/components/tree/react-aria.js +1 -11
  78. package/dist/components/tree-item/react-aria.js +1 -11
  79. package/dist/components/tree-item-content/react-aria.js +1 -11
  80. package/dist/components/tree-load-more-item/react-aria.js +1 -11
  81. package/dist/{datePickerValue.utils-u6REHox2.js → datePickerValue.utils-n2HQDle8.js} +1 -1
  82. package/dist/{dynamicInputs-ByTvSdJe.d.ts → dynamicInputs-BasxVhHP.d.ts} +2 -2
  83. package/dist/index.d.ts +2 -2
  84. package/dist/index.js +10 -10
  85. package/dist/{logger-BPhG2izn.js → logger-DpUn65wp.js} +23 -1
  86. package/dist/{query-autocomplete-CHtcx_ND.d.ts → query-autocomplete-E-PMmf1d.d.ts} +1 -1
  87. package/dist/{queryAutocomplete.types-DaTDttX5.d.ts → queryAutocomplete.types-BOH9QnRq.d.ts} +1 -0
  88. package/dist/rhf/date-picker.js +1 -1
  89. package/dist/rhf/date-range-picker.js +1 -1
  90. package/dist/rhf/date-time-picker.js +1 -1
  91. package/dist/rhf/inputs.d.ts +1 -1
  92. package/dist/rhf/query-autocomplete.d.ts +1 -1
  93. package/dist/rhf/select.js +1 -1
  94. package/dist/rhf/text-editor.js +1 -1
  95. package/dist/rhf/time-picker.js +1 -1
  96. package/dist/rhf.d.ts +2 -2
  97. package/dist/rhf.js +10 -10
  98. package/dist/{staticDateTimeSegments-qJUUAL8d.js → staticDateTimeSegments-B5Uuat4L.js} +2 -2
  99. package/dist/{staticSelect.utils-CRyAMXOL.js → staticSelect.utils-BqH-4vxg.js} +3 -3
  100. package/dist/tanstack/date-picker.js +1 -1
  101. package/dist/tanstack/date-range-picker.js +1 -1
  102. package/dist/tanstack/date-time-picker.js +1 -1
  103. package/dist/tanstack/form.d.ts +1 -1
  104. package/dist/tanstack/form.js +1 -1
  105. package/dist/tanstack/inputs.d.ts +2 -2
  106. package/dist/tanstack/inputs.js +1 -1
  107. package/dist/tanstack/select.js +1 -1
  108. package/dist/tanstack/table.js +1 -1
  109. package/dist/tanstack/text-editor.js +1 -1
  110. package/dist/tanstack/time-picker.js +1 -1
  111. package/dist/tanstack.d.ts +3 -3
  112. package/dist/tanstack.js +17 -17
  113. package/dist/text-editor.js +1 -1
  114. package/dist/{useFilter-Cz_G94ya.js → useFilter-BsjdRENO.js} +1 -1
  115. package/dist/{useFormAutosave-Cj75UzUP.js → useFormAutosave-C_SlCky9.js} +1 -1
  116. package/dist/{useTableColumnConfig-CXjUy_VP.js → useTableColumnConfig-BTsMxT8X.js} +2 -2
  117. package/dist/utils/logger.js +1 -1
  118. package/package.json +1 -1
  119. package/dist/rolldown-runtime-DUp30N8C.js +0 -28
@@ -1,11 +1 @@
1
- import e,{cloneElement as t,createContext as n,forwardRef as r,isValidElement as i,useCallback as a,useContext as o,useMemo as s,useRef as c}from"react";import{filterDOMProps as l,inertValue as u,mergeRefs as d,useLayoutEffect as f,useLoadMoreSentinel as p,useObjectRef as m}from"@react-aria/utils";import{FocusableContext as h}from"@react-aria/interactions";import"react-dom";import{mergeProps as g,useFocusRing as _,useHover as v,useTableCell as y}from"react-aria";import"react-stately";var b=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),x=(e=>typeof require<`u`?require:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof require<`u`?require:e)[t]}):e)(function(e){if(typeof require<`u`)return require.apply(this,arguments);throw Error('Calling `require` for "'+e+"\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.")});function S(e){let{className:t,style:n,children:r,defaultClassName:i,defaultChildren:a,defaultStyle:o,values:c,render:l}=e;return s(()=>{let e,s,u;return e=typeof t==`function`?t({...c,defaultClassName:i}):t,s=typeof n==`function`?n({...c,defaultStyle:o||{}}):n,u=typeof r==`function`?r({...c,defaultChildren:a}):r??a,{className:e??i,style:s||o?{...o,...s}:void 0,children:u??a,"data-rac":``,render:l?e=>l(e,c):void 0}},[t,n,r,i,a,o,c,l])}function C(t,n,r){let{render:i,...a}=n,o=c(null),l=s(()=>d(r,o),[r,o]);f(()=>{},[t,i]);let u={...a,ref:l};return i?i(u,void 0):e.createElement(t,u)}const w={},T=new Proxy({},{get(e,t){if(typeof t!=`string`)return;let n=w[t];return n||(n=r(C.bind(null,t)),w[t]=n),n}});String(Math.round(Math.random()*1e10)),typeof window<`u`&&window.document&&window.document.createElement,e.useId;var E=class{get childNodes(){throw Error(`childNodes is not supported`)}clone(){let e=new this.constructor(this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e[`aria-label`]=this[`aria-label`],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}filter(e,t,n){let r=this.clone();return t.addDescendants(r,e),r}constructor(e){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue=``,this[`aria-label`]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=e}},D=class extends E{filter(e,t,n){let[r,i]=M(e,t,this.firstChildKey,n),a=this.clone();return a.firstChildKey=r,a.lastChildKey=i,a}},O=class extends E{};O.type=`header`;var k=class extends E{};k.type=`loader`;var A=class extends D{filter(e,t,n){if(n(this.textValue,this)){let n=this.clone();return t.addDescendants(n,e),n}return null}};A.type=`item`;var j=class extends D{filter(e,t,n){let r=super.filter(e,t,n);if(r&&r.lastChildKey!==null){let t=e.getItem(r.lastChildKey);if(t&&t.type!==`header`)return r}return null}};j.type=`section`;function M(e,t,n,r){if(n==null)return[null,null];let i=null,a=null,o=e.getItem(n);for(;o!=null;){let n=o.filter(e,t,r);n!=null&&(n.nextKey=null,a&&(n.prevKey=a.key,a.nextKey=n.key),i??=n,t.addNode(n),a=n),o=o.nextKey?e.getItem(o.nextKey):null}if(a&&a.type===`separator`){let e=a.prevKey;t.removeNode(a.key),e?(a=t.getItem(e),a.nextKey=null):a=null}return[i?.key??null,a?.key??null]}function N(e){let{children:n,items:r,idScope:i,addIdAndValue:a,dependencies:o=[]}=e,c=s(()=>new WeakMap,o);return s(()=>{if(r&&typeof n==`function`){let e=[];for(let o of r){let r=c.get(o);if(!r){r=n(o);let e=r.props.id??o.key??o.id;if(e==null)throw Error(`Could not determine key for item`);i!=null&&(e=i+`:`+e),r=t(r,a?{key:e,id:e,value:o}:{key:e}),c.set(o,r)}e.push(r)}return e}if(typeof n!=`function`)return n},[n,r,c,i,a])}
2
- /**
3
- * @license React
4
- * use-sync-external-store-shim.production.js
5
- *
6
- * Copyright (c) Meta Platforms, Inc. and affiliates.
7
- *
8
- * This source code is licensed under the MIT license found in the
9
- * LICENSE file in the root directory of this source tree.
10
- */
11
- var P=b((e=>{var t=x(`react`);function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore}));b(((e,t)=>{t.exports=P()}))();const F=n(!1);typeof e.useSyncExternalStore==`function`&&e.useSyncExternalStore;const I=n(null);function L(e){var t;return t=class extends E{},t.type=e,t}function R(t,n,r,i,s,c){typeof t==`string`&&(t=L(t));let l=a(e=>{e?.setProps(n,r,t,i,c)},[n,r,i,c,t]),u=o(I);if(u){let a=u.ownerDocument.nodesByProps.get(n);return a||(a=u.ownerDocument.createElement(t.type),a.setProps(n,r,t,i,c),u.appendChild(a),u.ownerDocument.updateCollection(),u.ownerDocument.nodesByProps.set(n,a)),s?e.createElement(I.Provider,{value:a},s):null}return e.createElement(t.type,{ref:l},s)}function z(t,n){let i=({node:e})=>n(e.props,e.props.ref,e),a=r((r,a)=>{let s=o(h);if(!o(F)){if(n.length>=3)throw Error(n.name+` cannot be rendered outside a collection.`);return n(r,a)}return R(t,r,a,`children`in r?r.children:null,null,t=>e.createElement(h.Provider,{value:s},e.createElement(i,{node:t})))});return a.displayName=n.name,a}const B={CollectionRoot({collection:e,renderDropIndicator:t}){return V(e,null,t)},CollectionBranch({collection:e,parent:t,renderDropIndicator:n}){return V(e,t,n)}};function V(t,n,r){return N({items:n?t.getChildren(n.key):t,dependencies:[r],children(n){let i=n.render(n);return!r||n.type!==`item`?i:e.createElement(e.Fragment,null,r({type:`item`,key:n.key,dropPosition:`before`}),i,H(t,n,r))}})}function H(e,n,r){let a=n.key,o=e.getKeyAfter(a),s=o==null?null:e.getItem(o);for(;s!=null&&s.type!==`item`;)o=e.getKeyAfter(s.key),s=o==null?null:e.getItem(o);let c=n.nextKey==null?null:e.getItem(n.nextKey);for(;c!=null&&c.type!==`item`;)c=c.nextKey==null?null:e.getItem(c.nextKey);let l=[];if(c==null){let a=n;for(;a?.type===`item`&&(!s||a.parentKey!==s.parentKey&&s.level<a.level);){let n=r({type:`item`,key:a.key,dropPosition:`after`});i(n)&&l.push(t(n,{key:`${a.key}-after`})),a=a.parentKey==null?null:e.getItem(a.parentKey)}}return l}const U=n(B),W=n({}),G=n(null);var K=class extends E{};K.type=`tableheader`;var q=class extends E{};q.type=`column`;var J=class extends D{};J.type=`tablebody`;var Y=class extends E{filter(e,t,n){let r=e.getChildren(this.key);for(let i of r)if(n(i.textValue,i)){let n=this.clone();return t.addDescendants(n,e),n}return null}};Y.type=`item`;let X=r(function(t,n){let{isVirtualized:r}=o(U);return r?e.createElement(T.div,{...t,ref:n}):e.createElement(T.tr,{...t,ref:n})});var Z=class extends E{};Z.type=`cell`;let Q=r(function(t,n){let{isVirtualized:r}=o(U);return r?e.createElement(T.div,{...t,ref:n}):e.createElement(T.td,{...t,ref:n})});const $=z(Z,(t,n,r)=>{let i=m(n),a=o(G),{dragState:s}=o(W),{isVirtualized:c}=o(U);r.column=a.collection.columns[r.index];let{gridCellProps:u,isPressed:d}=y({node:r,shouldSelectOnPressUp:!!s,isVirtualized:c},a,i),{isFocused:f,isFocusVisible:p,focusProps:h}=_(),{hoverProps:b,isHovered:x}=v({}),C=r.parentKey!=null&&a.selectionManager.isSelected(r.parentKey),w=r.colIndex||r.index,T=S({...t,id:void 0,defaultClassName:`react-aria-Cell`,values:{isFocused:f,isFocusVisible:p,isPressed:d,isHovered:x,isSelected:C,id:r.key,columnIndex:w}}),E=l(t,{global:!0});return delete E.id,e.createElement(Q,{...g(E,T,u,h,b),ref:i,"data-focused":f||void 0,"data-focus-visible":p||void 0,"data-pressed":d||void 0,"data-selected":C||void 0,"data-column-index":w},e.createElement(U.Provider,{value:B},T.children))});z(k,function(t,n,r){let i=o(G),{isVirtualized:a}=o(U),{isLoading:d,onLoadMore:f,scrollOffset:m,...h}=t,_=i.collection.columns.length,v=c(null),y=s(()=>({onLoadMore:f,collection:i?.collection,sentinelRef:v,scrollOffset:m}),[f,m,i?.collection]);p(y,v);let b=S({...h,id:void 0,children:r.rendered,defaultClassName:`react-aria-TableLoadingIndicator`,values:void 0}),x={},C={},w={};return a?(C[`aria-colspan`]=_,w={display:`contents`}):C.colSpan=_,e.createElement(e.Fragment,null,e.createElement(X,{style:{height:0},inert:u(!0)},e.createElement(Q,{style:{padding:0,border:0}},e.createElement(`div`,{"data-testid":`loadMoreSentinel`,ref:v,style:{position:`relative`,height:1,width:1}}))),d&&b.children&&e.createElement(X,{...g(l(t,{global:!0}),x),...b,role:`row`,ref:n},e.createElement(Q,{role:`rowheader`,...C,style:w},b.children)))});export{$ as Cell};
1
+ import e,{cloneElement as t,createContext as n,forwardRef as r,isValidElement as i,useCallback as a,useContext as o,useMemo as s,useRef as c}from"react";import{filterDOMProps as l,inertValue as u,mergeRefs as d,useLayoutEffect as f,useLoadMoreSentinel as p,useObjectRef as m}from"@react-aria/utils";import{FocusableContext as h}from"@react-aria/interactions";import"react-dom";import{mergeProps as g,useFocusRing as _,useHover as v,useTableCell as y}from"react-aria";import"react-stately";function b(e){let{className:t,style:n,children:r,defaultClassName:i,defaultChildren:a,defaultStyle:o,values:c,render:l}=e;return s(()=>{let e,s,u;return e=typeof t==`function`?t({...c,defaultClassName:i}):t,s=typeof n==`function`?n({...c,defaultStyle:o||{}}):n,u=typeof r==`function`?r({...c,defaultChildren:a}):r??a,{className:e??i,style:s||o?{...o,...s}:void 0,children:u??a,"data-rac":``,render:l?e=>l(e,c):void 0}},[t,n,r,i,a,o,c,l])}function x(t,n,r){let{render:i,...a}=n,o=c(null),l=s(()=>d(r,o),[r,o]);f(()=>{},[t,i]);let u={...a,ref:l};return i?i(u,void 0):e.createElement(t,u)}const S={},C=new Proxy({},{get(e,t){if(typeof t!=`string`)return;let n=S[t];return n||(n=r(x.bind(null,t)),S[t]=n),n}});String(Math.round(Math.random()*1e10)),typeof window<`u`&&window.document&&window.document.createElement,e.useId;var w=class{get childNodes(){throw Error(`childNodes is not supported`)}clone(){let e=new this.constructor(this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e[`aria-label`]=this[`aria-label`],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}filter(e,t,n){let r=this.clone();return t.addDescendants(r,e),r}constructor(e){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue=``,this[`aria-label`]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=e}},T=class extends w{filter(e,t,n){let[r,i]=A(e,t,this.firstChildKey,n),a=this.clone();return a.firstChildKey=r,a.lastChildKey=i,a}},E=class extends w{};E.type=`header`;var D=class extends w{};D.type=`loader`;var O=class extends T{filter(e,t,n){if(n(this.textValue,this)){let n=this.clone();return t.addDescendants(n,e),n}return null}};O.type=`item`;var k=class extends T{filter(e,t,n){let r=super.filter(e,t,n);if(r&&r.lastChildKey!==null){let t=e.getItem(r.lastChildKey);if(t&&t.type!==`header`)return r}return null}};k.type=`section`;function A(e,t,n,r){if(n==null)return[null,null];let i=null,a=null,o=e.getItem(n);for(;o!=null;){let n=o.filter(e,t,r);n!=null&&(n.nextKey=null,a&&(n.prevKey=a.key,a.nextKey=n.key),i??=n,t.addNode(n),a=n),o=o.nextKey?e.getItem(o.nextKey):null}if(a&&a.type===`separator`){let e=a.prevKey;t.removeNode(a.key),e?(a=t.getItem(e),a.nextKey=null):a=null}return[i?.key??null,a?.key??null]}function j(e){let{children:n,items:r,idScope:i,addIdAndValue:a,dependencies:o=[]}=e,c=s(()=>new WeakMap,o);return s(()=>{if(r&&typeof n==`function`){let e=[];for(let o of r){let r=c.get(o);if(!r){r=n(o);let e=r.props.id??o.key??o.id;if(e==null)throw Error(`Could not determine key for item`);i!=null&&(e=i+`:`+e),r=t(r,a?{key:e,id:e,value:o}:{key:e}),c.set(o,r)}e.push(r)}return e}if(typeof n!=`function`)return n},[n,r,c,i,a])}const M=n(!1);typeof e.useSyncExternalStore==`function`&&e.useSyncExternalStore;const N=n(null);function P(e){var t;return t=class extends w{},t.type=e,t}function F(t,n,r,i,s,c){typeof t==`string`&&(t=P(t));let l=a(e=>{e?.setProps(n,r,t,i,c)},[n,r,i,c,t]),u=o(N);if(u){let a=u.ownerDocument.nodesByProps.get(n);return a||(a=u.ownerDocument.createElement(t.type),a.setProps(n,r,t,i,c),u.appendChild(a),u.ownerDocument.updateCollection(),u.ownerDocument.nodesByProps.set(n,a)),s?e.createElement(N.Provider,{value:a},s):null}return e.createElement(t.type,{ref:l},s)}function I(t,n){let i=({node:e})=>n(e.props,e.props.ref,e),a=r((r,a)=>{let s=o(h);if(!o(M)){if(n.length>=3)throw Error(n.name+` cannot be rendered outside a collection.`);return n(r,a)}return F(t,r,a,`children`in r?r.children:null,null,t=>e.createElement(h.Provider,{value:s},e.createElement(i,{node:t})))});return a.displayName=n.name,a}const L={CollectionRoot({collection:e,renderDropIndicator:t}){return R(e,null,t)},CollectionBranch({collection:e,parent:t,renderDropIndicator:n}){return R(e,t,n)}};function R(t,n,r){return j({items:n?t.getChildren(n.key):t,dependencies:[r],children(n){let i=n.render(n);return!r||n.type!==`item`?i:e.createElement(e.Fragment,null,r({type:`item`,key:n.key,dropPosition:`before`}),i,z(t,n,r))}})}function z(e,n,r){let a=n.key,o=e.getKeyAfter(a),s=o==null?null:e.getItem(o);for(;s!=null&&s.type!==`item`;)o=e.getKeyAfter(s.key),s=o==null?null:e.getItem(o);let c=n.nextKey==null?null:e.getItem(n.nextKey);for(;c!=null&&c.type!==`item`;)c=c.nextKey==null?null:e.getItem(c.nextKey);let l=[];if(c==null){let a=n;for(;a?.type===`item`&&(!s||a.parentKey!==s.parentKey&&s.level<a.level);){let n=r({type:`item`,key:a.key,dropPosition:`after`});i(n)&&l.push(t(n,{key:`${a.key}-after`})),a=a.parentKey==null?null:e.getItem(a.parentKey)}}return l}const B=n(L),V=n({}),H=n(null);var U=class extends w{};U.type=`tableheader`;var W=class extends w{};W.type=`column`;var G=class extends T{};G.type=`tablebody`;var K=class extends w{filter(e,t,n){let r=e.getChildren(this.key);for(let i of r)if(n(i.textValue,i)){let n=this.clone();return t.addDescendants(n,e),n}return null}};K.type=`item`;let q=r(function(t,n){let{isVirtualized:r}=o(B);return r?e.createElement(C.div,{...t,ref:n}):e.createElement(C.tr,{...t,ref:n})});var J=class extends w{};J.type=`cell`;let Y=r(function(t,n){let{isVirtualized:r}=o(B);return r?e.createElement(C.div,{...t,ref:n}):e.createElement(C.td,{...t,ref:n})});const X=I(J,(t,n,r)=>{let i=m(n),a=o(H),{dragState:s}=o(V),{isVirtualized:c}=o(B);r.column=a.collection.columns[r.index];let{gridCellProps:u,isPressed:d}=y({node:r,shouldSelectOnPressUp:!!s,isVirtualized:c},a,i),{isFocused:f,isFocusVisible:p,focusProps:h}=_(),{hoverProps:x,isHovered:S}=v({}),C=r.parentKey!=null&&a.selectionManager.isSelected(r.parentKey),w=r.colIndex||r.index,T=b({...t,id:void 0,defaultClassName:`react-aria-Cell`,values:{isFocused:f,isFocusVisible:p,isPressed:d,isHovered:S,isSelected:C,id:r.key,columnIndex:w}}),E=l(t,{global:!0});return delete E.id,e.createElement(Y,{...g(E,T,u,h,x),ref:i,"data-focused":f||void 0,"data-focus-visible":p||void 0,"data-pressed":d||void 0,"data-selected":C||void 0,"data-column-index":w},e.createElement(B.Provider,{value:L},T.children))});I(D,function(t,n,r){let i=o(H),{isVirtualized:a}=o(B),{isLoading:d,onLoadMore:f,scrollOffset:m,...h}=t,_=i.collection.columns.length,v=c(null),y=s(()=>({onLoadMore:f,collection:i?.collection,sentinelRef:v,scrollOffset:m}),[f,m,i?.collection]);p(y,v);let x=b({...h,id:void 0,children:r.rendered,defaultClassName:`react-aria-TableLoadingIndicator`,values:void 0}),S={},C={},w={};return a?(C[`aria-colspan`]=_,w={display:`contents`}):C.colSpan=_,e.createElement(e.Fragment,null,e.createElement(q,{style:{height:0},inert:u(!0)},e.createElement(Y,{style:{padding:0,border:0}},e.createElement(`div`,{"data-testid":`loadMoreSentinel`,ref:v,style:{position:`relative`,height:1,width:1}}))),d&&x.children&&e.createElement(q,{...g(l(t,{global:!0}),S),...x,role:`row`,ref:n},e.createElement(Y,{role:`rowheader`,...C,style:w},x.children)))});export{X as Cell};
@@ -1,11 +1 @@
1
- import e,{cloneElement as t,createContext as n,useContext as r,useMemo as i}from"react";import"@react-aria/interactions";import{createPortal as a}from"react-dom";var o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e=>typeof require<`u`?require:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof require<`u`?require:e)[t]}):e)(function(e){if(typeof require<`u`)return require.apply(this,arguments);throw Error('Calling `require` for "'+e+"\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.")});String(Math.round(Math.random()*1e10));const c=e.createContext(!1);typeof window<`u`&&window.document&&window.document.createElement,e.useId;function l(){return!1}function u(){return!0}function d(e){return()=>{}}function f(){return typeof e.useSyncExternalStore==`function`?e.useSyncExternalStore(d,l,u):r(c)}function p(e){let{children:n,items:r,idScope:a,addIdAndValue:o,dependencies:s=[]}=e,c=i(()=>new WeakMap,s);return i(()=>{if(r&&typeof n==`function`){let e=[];for(let i of r){let r=c.get(i);if(!r){r=n(i);let e=r.props.id??i.key??i.id;if(e==null)throw Error(`Could not determine key for item`);a!=null&&(e=a+`:`+e),r=t(r,o?{key:e,id:e,value:i}:{key:e}),c.set(i,r)}e.push(r)}return e}if(typeof n!=`function`)return n},[n,r,c,a,o])}
2
- /**
3
- * @license React
4
- * use-sync-external-store-shim.production.js
5
- *
6
- * Copyright (c) Meta Platforms, Inc. and affiliates.
7
- *
8
- * This source code is licensed under the MIT license found in the
9
- * LICENSE file in the root directory of this source tree.
10
- */
11
- var m=o((e=>{var t=s(`react`);function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,c=t.useDebugValue;function l(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),s=r[0].inst,l=r[1];return o(function(){s.value=n,s.getSnapshot=t,u(s)&&l({inst:s})},[e,n,t]),a(function(){return u(s)&&l({inst:s}),e(function(){u(s)&&l({inst:s})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore}));o(((e,t)=>{t.exports=m()}))();const h=n(!1),g=n(null);typeof e.useSyncExternalStore==`function`&&e.useSyncExternalStore;const _=n(null);function v(e){return p({...e,addIdAndValue:!0})}const y=n(null);function b(t){let n=r(y),a=(n?.dependencies||[]).concat(t.dependencies),o=t.idScope??n?.idScope,s=v({...t,idScope:o,dependencies:a});return r(g)&&(s=e.createElement(x,null,s)),n=i(()=>({dependencies:a,idScope:o}),[o,...a]),e.createElement(y.Provider,{value:n},s)}function x({children:t}){let n=r(g),o=i(()=>e.createElement(g.Provider,{value:null},e.createElement(h.Provider,{value:!0},t)),[t]);return f()?e.createElement(_.Provider,{value:n},o):a(o,n)}export{b as Collection};
1
+ import e,{cloneElement as t,createContext as n,useContext as r,useMemo as i}from"react";import"@react-aria/interactions";import{createPortal as a}from"react-dom";String(Math.round(Math.random()*1e10));const o=e.createContext(!1);typeof window<`u`&&window.document&&window.document.createElement,e.useId;function s(){return!1}function c(){return!0}function l(e){return()=>{}}function u(){return typeof e.useSyncExternalStore==`function`?e.useSyncExternalStore(l,s,c):r(o)}function d(e){let{children:n,items:r,idScope:a,addIdAndValue:o,dependencies:s=[]}=e,c=i(()=>new WeakMap,s);return i(()=>{if(r&&typeof n==`function`){let e=[];for(let i of r){let r=c.get(i);if(!r){r=n(i);let e=r.props.id??i.key??i.id;if(e==null)throw Error(`Could not determine key for item`);a!=null&&(e=a+`:`+e),r=t(r,o?{key:e,id:e,value:i}:{key:e}),c.set(i,r)}e.push(r)}return e}if(typeof n!=`function`)return n},[n,r,c,a,o])}const f=n(!1),p=n(null);typeof e.useSyncExternalStore==`function`&&e.useSyncExternalStore;const m=n(null);function h(e){return d({...e,addIdAndValue:!0})}const g=n(null);function _(t){let n=r(g),a=(n?.dependencies||[]).concat(t.dependencies),o=t.idScope??n?.idScope,s=h({...t,idScope:o,dependencies:a});return r(p)&&(s=e.createElement(v,null,s)),n=i(()=>({dependencies:a,idScope:o}),[o,...a]),e.createElement(g.Provider,{value:n},s)}function v({children:t}){let n=r(p),o=i(()=>e.createElement(p.Provider,{value:null},e.createElement(f.Provider,{value:!0},t)),[t]);return u()?e.createElement(m.Provider,{value:n},o):a(o,n)}export{_ as Collection};
@@ -1,11 +1 @@
1
- import e,{cloneElement as t,createContext as n,forwardRef as r,isValidElement as i,useCallback as a,useContext as o,useEffect as s,useMemo as c,useRef as l,useState as u}from"react";import{filterDOMProps as d,inertValue as f,mergeProps as p,mergeRefs as m,useLayoutEffect as h,useLoadMoreSentinel as g,useObjectRef as _}from"@react-aria/utils";import{FocusableContext as v}from"@react-aria/interactions";import{createPortal as y}from"react-dom";import{FocusScope as ee,ListKeyboardDelegate as te,mergeProps as b,useCollator as ne,useFocusRing as re,useListBox as ie,useListBoxSection as x,useLocale as ae,useLocalizedStringFormatter as S}from"react-aria";import{UNSTABLE_useFilteredListState as oe,useColorPickerState as se,useListState as C}from"react-stately";var w=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),T=(e=>typeof require<`u`?require:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof require<`u`?require:e)[t]}):e)(function(e){if(typeof require<`u`)return require.apply(this,arguments);throw Error('Calling `require` for "'+e+"\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.")});n(null),n(null),n(null),n(null),n(null),n({});const ce=n(null);n(null);const E=Symbol(`default`);function le({values:t,children:n}){for(let[r,i]of t)n=e.createElement(r.Provider,{value:i},n);return n}function D(e){let{className:t,style:n,children:r,defaultClassName:i,defaultChildren:a,defaultStyle:o,values:s,render:l}=e;return c(()=>{let e,c,u;return e=typeof t==`function`?t({...s,defaultClassName:i}):t,c=typeof n==`function`?n({...s,defaultStyle:o||{}}):n,u=typeof r==`function`?r({...s,defaultChildren:a}):r??a,{className:e??i,style:c||o?{...o,...c}:void 0,children:u??a,"data-rac":``,render:l?e=>l(e,s):void 0}},[t,n,r,i,a,o,s,l])}function ue(e,t){let n=o(e);if(t===null)return null;if(n&&typeof n==`object`&&`slots`in n&&n.slots){let e=t||E;if(!n.slots[e]){let e=new Intl.ListFormat().format(Object.keys(n.slots).map(e=>`"${e}"`)),r=t?`Invalid slot "${t}".`:`A slot prop is required.`;throw Error(`${r} Valid slot names are ${e}.`)}return n.slots[e]}return n}function O(e,t,n){let{ref:r,...i}=ue(n,e.slot)||{},a=_(c(()=>m(t,r),[t,r])),o=p(i,e);return`style`in i&&i.style&&`style`in e&&e.style&&(o.style=typeof i.style==`function`||typeof e.style==`function`?t=>{let n=typeof i.style==`function`?i.style(t):i.style,r={...t.defaultStyle,...n},a=typeof e.style==`function`?e.style({...t,defaultStyle:r}):e.style;return{...r,...a}}:{...i.style,...e.style}),[o,a]}function k(e=!0){let[t,n]=u(e),r=l(!1),i=a(e=>{r.current=!0,n(!!e)},[]);return h(()=>{r.current||n(!1)},[]),[i,t]}function A(t,n,r){let{render:i,...a}=n,o=l(null),s=c(()=>m(r,o),[r,o]);h(()=>{},[t,i]);let u={...a,ref:s};return i?i(u,void 0):e.createElement(t,u)}const j={},M=new Proxy({},{get(e,t){if(typeof t!=`string`)return;let n=j[t];return n||(n=r(A.bind(null,t)),j[t]=n),n}});String(Math.round(Math.random()*1e10));const N=e.createContext(!1);typeof window<`u`&&window.document&&window.document.createElement,e.useId;function P(){return!1}function F(){return!0}function I(e){return()=>{}}function L(){return typeof e.useSyncExternalStore==`function`?e.useSyncExternalStore(I,P,F):o(N)}var R=class{get childNodes(){throw Error(`childNodes is not supported`)}clone(){let e=new this.constructor(this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e[`aria-label`]=this[`aria-label`],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}filter(e,t,n){let r=this.clone();return t.addDescendants(r,e),r}constructor(e){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue=``,this[`aria-label`]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=e}},z=class extends R{filter(e,t,n){let[r,i]=pe(e,t,this.firstChildKey,n),a=this.clone();return a.firstChildKey=r,a.lastChildKey=i,a}},B=class extends R{};B.type=`header`;var V=class extends R{};V.type=`loader`;var H=class extends z{filter(e,t,n){if(n(this.textValue,this)){let n=this.clone();return t.addDescendants(n,e),n}return null}};H.type=`item`;var de=class extends z{filter(e,t,n){let r=super.filter(e,t,n);if(r&&r.lastChildKey!==null){let t=e.getItem(r.lastChildKey);if(t&&t.type!==`header`)return r}return null}};de.type=`section`;var fe=class{get size(){return this.itemCount}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=this.firstKey==null?void 0:this.keyMap.get(this.firstKey);for(;e;)yield e,e=e.nextKey==null?void 0:this.keyMap.get(e.nextKey)}getChildren(e){let t=this.keyMap;return{*[Symbol.iterator](){let n=t.get(e),r=n?.firstChildKey==null?null:t.get(n.firstChildKey);for(;r;)yield r,r=r.nextKey==null?void 0:t.get(r.nextKey)}}}getKeyBefore(e){let t=this.keyMap.get(e);if(!t)return null;if(t.prevKey!=null){for(t=this.keyMap.get(t.prevKey);t&&t.type!==`item`&&t.lastChildKey!=null;)t=this.keyMap.get(t.lastChildKey);return t?.key??null}return t.parentKey}getKeyAfter(e){let t=this.keyMap.get(e);if(!t)return null;if(t.type!==`item`&&t.firstChildKey!=null)return t.firstChildKey;for(;t;){if(t.nextKey!=null)return t.nextKey;if(t.parentKey!=null)t=this.keyMap.get(t.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey==null?null:this.keyMap.get(this.lastKey);for(;e?.lastChildKey!=null;)e=this.keyMap.get(e.lastChildKey);return e?.key??null}getItem(e){return this.keyMap.get(e)??null}at(){throw Error(`Not implemented`)}clone(){let e=this.constructor,t=new e;return t.keyMap=new Map(this.keyMap),t.firstKey=this.firstKey,t.lastKey=this.lastKey,t.itemCount=this.itemCount,t}addNode(e){if(this.frozen)throw Error(`Cannot add a node to a frozen collection`);e.type===`item`&&this.keyMap.get(e.key)==null&&this.itemCount++,this.keyMap.set(e.key,e)}addDescendants(e,t){this.addNode(e);let n=t.getChildren(e.key);for(let e of n)this.addDescendants(e,t)}removeNode(e){if(this.frozen)throw Error(`Cannot remove a node to a frozen collection`);let t=this.keyMap.get(e);t!=null&&t.type===`item`&&this.itemCount--,this.keyMap.delete(e)}commit(e,t,n=!1){if(this.frozen)throw Error(`Cannot commit a frozen collection`);this.firstKey=e,this.lastKey=t,this.frozen=!n}filter(e){let t=new this.constructor,[n,r]=pe(this,t,this.firstKey,e);return t?.commit(n,r),t}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1,this.itemCount=0}};function pe(e,t,n,r){if(n==null)return[null,null];let i=null,a=null,o=e.getItem(n);for(;o!=null;){let n=o.filter(e,t,r);n!=null&&(n.nextKey=null,a&&(n.prevKey=a.key,a.nextKey=n.key),i??=n,t.addNode(n),a=n),o=o.nextKey?e.getItem(o.nextKey):null}if(a&&a.type===`separator`){let e=a.prevKey;t.removeNode(a.key),e?(a=t.getItem(e),a.nextKey=null):a=null}return[i?.key??null,a?.key??null]}var me=class{*[Symbol.iterator](){let e=this.firstChild;for(;e;)yield e,e=e.nextSibling}get firstChild(){return this._firstChild}set firstChild(e){this._firstChild=e,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(e){this._lastChild=e,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(e){this._previousSibling=e,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(e){this._nextSibling=e,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e,this.ownerDocument.markDirty(this)}get isConnected(){return this.parentNode?.isConnected||!1}invalidateChildIndices(e){(this._minInvalidChildIndex==null||!this._minInvalidChildIndex.isConnected||e.index<this._minInvalidChildIndex.index)&&(this._minInvalidChildIndex=e,this.ownerDocument.markDirty(this))}updateChildIndices(){let e=this._minInvalidChildIndex;for(;e;)e.index=e.previousSibling?e.previousSibling.index+1:0,e=e.nextSibling;this._minInvalidChildIndex=null}appendChild(e){e.parentNode&&e.parentNode.removeChild(e),this.firstChild??=e,this.lastChild?(this.lastChild.nextSibling=e,e.index=this.lastChild.index+1,e.previousSibling=this.lastChild):(e.previousSibling=null,e.index=0),e.parentNode=this,e.nextSibling=null,this.lastChild=e,this.ownerDocument.markDirty(this),this.isConnected&&this.ownerDocument.queueUpdate()}insertBefore(e,t){if(t==null)return this.appendChild(e);e.parentNode&&e.parentNode.removeChild(e),e.nextSibling=t,e.previousSibling=t.previousSibling,e.index=t.index-1,this.firstChild===t?this.firstChild=e:t.previousSibling&&(t.previousSibling.nextSibling=e),t.previousSibling=e,e.parentNode=t.parentNode,this.invalidateChildIndices(e),this.isConnected&&this.ownerDocument.queueUpdate()}removeChild(e){e.parentNode===this&&(this._minInvalidChildIndex===e&&(this._minInvalidChildIndex=null),e.nextSibling&&(this.invalidateChildIndices(e.nextSibling),e.nextSibling.previousSibling=e.previousSibling),e.previousSibling&&(e.previousSibling.nextSibling=e.nextSibling),this.firstChild===e&&(this.firstChild=e.nextSibling),this.lastChild===e&&(this.lastChild=e.previousSibling),e.parentNode=null,e.nextSibling=null,e.previousSibling=null,e.index=0,this.ownerDocument.markDirty(e),this.isConnected&&this.ownerDocument.queueUpdate())}addEventListener(){}removeEventListener(){}get previousVisibleSibling(){let e=this.previousSibling;for(;e&&e.isHidden;)e=e.previousSibling;return e}get nextVisibleSibling(){let e=this.nextSibling;for(;e&&e.isHidden;)e=e.nextSibling;return e}get firstVisibleChild(){let e=this.firstChild;for(;e&&e.isHidden;)e=e.nextSibling;return e}get lastVisibleChild(){let e=this.lastChild;for(;e&&e.isHidden;)e=e.previousSibling;return e}constructor(e){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this._minInvalidChildIndex=null,this.ownerDocument=e}},U=class e extends me{get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof e?this.parentNode.level+ +(this.node?.type===`item`):0}getMutableNode(){return this.node==null?null:(this.isMutated||=(this.node=this.node.clone(),!0),this.ownerDocument.markDirty(this),this.node)}updateNode(){let t=this.nextVisibleSibling,n=this.getMutableNode();if(n!=null&&(n.index=this.index,n.level=this.level,n.parentKey=this.parentNode instanceof e?this.parentNode.node?.key??null:null,n.prevKey=this.previousVisibleSibling?.node?.key??null,n.nextKey=t?.node?.key??null,n.hasChildNodes=!!this.firstChild,n.firstChildKey=this.firstVisibleChild?.node?.key??null,n.lastChildKey=this.lastVisibleChild?.node?.key??null,(n.colSpan!=null||n.colIndex!=null)&&t)){let e=(n.colIndex??n.index)+(n.colSpan??1);if(t.node!=null&&e!==t.node.colIndex){let n=t.getMutableNode();n.colIndex=e}}}setProps(e,t,n,r,i){let a,{value:o,textValue:s,id:c,...l}=e;if(this.node==null?(a=new n(c??`react-aria-${++this.ownerDocument.nodeId}`),this.node=a):a=this.getMutableNode(),l.ref=t,a.props=l,a.rendered=r,a.render=i,a.value=o,e[`aria-label`]&&(a[`aria-label`]=e[`aria-label`]),a.textValue=s||(typeof l.children==`string`?l.children:``)||e[`aria-label`]||``,c!=null&&c!==a.key)throw Error(`Cannot change the id of an item`);l.colSpan!=null&&(a.colSpan=l.colSpan),this.isConnected&&this.ownerDocument.queueUpdate()}get style(){let e=this;return{get display(){return e.isHidden?`none`:``},set display(t){let n=t===`none`;if(e.isHidden!==n){(e.parentNode?.firstVisibleChild===e||e.parentNode?.lastVisibleChild===e)&&e.ownerDocument.markDirty(e.parentNode);let t=e.previousVisibleSibling,r=e.nextVisibleSibling;t&&e.ownerDocument.markDirty(t),r&&e.ownerDocument.markDirty(r),e.isHidden=n,e.ownerDocument.markDirty(e)}}}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}constructor(e,t){super(t),this.nodeType=8,this.isMutated=!0,this._index=0,this.isHidden=!1,this.node=null}},he=class extends me{get isConnected(){return!0}createElement(e){return new U(e,this)}getMutableCollection(){return this.nextCollection||=this.collection.clone(),this.nextCollection}markDirty(e){this.dirtyNodes.add(e)}addNode(e){if(e.isHidden||e.node==null)return;let t=this.getMutableCollection();if(!t.getItem(e.node.key))for(let t of e)this.addNode(t);t.addNode(e.node)}removeNode(e){for(let t of e)this.removeNode(t);e.node&&this.getMutableCollection().removeNode(e.node.key)}getCollection(){return this.inSubscription?this.collection.clone():(this.queuedRender=!1,this.updateCollection(),this.collection)}updateCollection(){for(let e of this.dirtyNodes)e instanceof U&&(!e.isConnected||e.isHidden)?this.removeNode(e):e.updateChildIndices();for(let e of this.dirtyNodes)e instanceof U?(e.isConnected&&!e.isHidden&&(e.updateNode(),this.addNode(e)),e.node&&this.dirtyNodes.delete(e),e.isMutated=!1):this.dirtyNodes.delete(e);this.nextCollection&&(this.nextCollection.commit(this.firstVisibleChild?.node?.key??null,this.lastVisibleChild?.node?.key??null,this.isSSR),this.isSSR||(this.collection=this.nextCollection,this.nextCollection=null))}queueUpdate(){if(!(this.dirtyNodes.size===0||this.queuedRender)){this.queuedRender=!0,this.inSubscription=!0;for(let e of this.subscriptions)e();this.inSubscription=!1}}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}constructor(e){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.nextCollection=null,this.subscriptions=new Set,this.queuedRender=!1,this.inSubscription=!1,this.collection=e,this.nextCollection=e}};function ge(e){let{children:n,items:r,idScope:i,addIdAndValue:a,dependencies:o=[]}=e,s=c(()=>new WeakMap,o);return c(()=>{if(r&&typeof n==`function`){let e=[];for(let o of r){let r=s.get(o);if(!r){r=n(o);let e=r.props.id??o.key??o.id;if(e==null)throw Error(`Could not determine key for item`);i!=null&&(e=i+`:`+e),r=t(r,a?{key:e,id:e,value:o}:{key:e}),s.set(o,r)}e.push(r)}return e}if(typeof n!=`function`)return n},[n,r,s,i,a])}if(typeof HTMLTemplateElement<`u`){let e=Object.getOwnPropertyDescriptor(Node.prototype,`firstChild`).get;Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:e.call(this)}})}const W=n(!1);function _e(t){if(o(W))return e.createElement(e.Fragment,null,t.children);let n=e.createElement(W.Provider,{value:!0},t.children);return e.createElement(`template`,{"data-react-aria-hidden":!0},n)}
2
- /**
3
- * @license React
4
- * use-sync-external-store-shim.production.js
5
- *
6
- * Copyright (c) Meta Platforms, Inc. and affiliates.
7
- *
8
- * This source code is licensed under the MIT license found in the
9
- * LICENSE file in the root directory of this source tree.
10
- */
11
- var ve=w((e=>{var t=T(`react`);function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),ye=w(((e,t)=>{t.exports=ve()}))();const G=n(!1),K=n(null);function be(t){if(o(K))return t.content;let{collection:n,document:r}=we(t.createCollection);return e.createElement(e.Fragment,null,e.createElement(_e,null,e.createElement(K.Provider,{value:r},t.content)),e.createElement(xe,{render:t.children,collection:n}))}function xe({collection:e,render:t}){return t(e)}function Se(e,t,n){let r=L(),i=l(r);i.current=r;let o=a(()=>i.current?n():t(),[t,n]);return(0,ye.useSyncExternalStore)(e,o)}const Ce=typeof e.useSyncExternalStore==`function`?e.useSyncExternalStore:Se;function we(e){let[t]=u(()=>new he(e?.()||new fe)),n=a(e=>t.subscribe(e),[t]),r=a(()=>{let e=t.getCollection();return t.isSSR&&t.resetAfterSSR(),e},[t]),i=a(()=>(t.isSSR=!0,t.getCollection()),[t]);return{collection:Ce(n,r,i),document:t}}const q=n(null);function Te(e){var t;return t=class extends R{},t.type=e,t}function Ee(t,n,r,i,s,c){typeof t==`string`&&(t=Te(t));let l=a(e=>{e?.setProps(n,r,t,i,c)},[n,r,i,c,t]),u=o(q);if(u){let a=u.ownerDocument.nodesByProps.get(n);return a||(a=u.ownerDocument.createElement(t.type),a.setProps(n,r,t,i,c),u.appendChild(a),u.ownerDocument.updateCollection(),u.ownerDocument.nodesByProps.set(n,a)),s?e.createElement(q.Provider,{value:a},s):null}return e.createElement(t.type,{ref:l},s)}function De(t,n){let i=({node:e})=>n(e.props,e.props.ref,e),a=r((r,a)=>{let s=o(v);if(!o(G)){if(n.length>=3)throw Error(n.name+` cannot be rendered outside a collection.`);return n(r,a)}return Ee(t,r,a,`children`in r?r.children:null,null,t=>e.createElement(v.Provider,{value:s},e.createElement(i,{node:t})))});return a.displayName=n.name,a}function Oe(e){return ge({...e,addIdAndValue:!0})}const J=n(null);function ke(t){let n=o(J),r=(n?.dependencies||[]).concat(t.dependencies),i=t.idScope??n?.idScope,a=Oe({...t,idScope:i,dependencies:r});return o(K)&&(a=e.createElement(Ae,null,a)),n=c(()=>({dependencies:r,idScope:i}),[i,...r]),e.createElement(J.Provider,{value:n},a)}function Ae({children:t}){let n=o(K),r=c(()=>e.createElement(K.Provider,{value:null},e.createElement(G.Provider,{value:!0},t)),[t]);return L()?e.createElement(q.Provider,{value:n},r):y(r,n)}const je=n(null),Me={CollectionRoot({collection:e,renderDropIndicator:t}){return Y(e,null,t)},CollectionBranch({collection:e,parent:t,renderDropIndicator:n}){return Y(e,t,n)}};function Y(t,n,r){return ge({items:n?t.getChildren(n.key):t,dependencies:[r],children(n){let i=n.render(n);return!r||n.type!==`item`?i:e.createElement(e.Fragment,null,r({type:`item`,key:n.key,dropPosition:`before`}),i,Ne(t,n,r))}})}function Ne(e,n,r){let a=n.key,o=e.getKeyAfter(a),s=o==null?null:e.getItem(o);for(;s!=null&&s.type!==`item`;)o=e.getKeyAfter(s.key),s=o==null?null:e.getItem(o);let c=n.nextKey==null?null:e.getItem(n.nextKey);for(;c!=null&&c.type!==`item`;)c=c.nextKey==null?null:e.getItem(c.nextKey);let l=[];if(c==null){let a=n;for(;a?.type===`item`&&(!s||a.parentKey!==s.parentKey&&s.level<a.level);){let n=r({type:`item`,key:a.key,dropPosition:`after`});i(n)&&l.push(t(n,{key:`${a.key}-after`})),a=a.parentKey==null?null:e.getItem(a.parentKey)}}return l}const X=n(Me);var Pe={};Pe={colorSwatchPicker:`تغييرات الألوان`,dropzoneLabel:`DropZone`,selectPlaceholder:`حدد عنصرًا`,tableResizer:`أداة تغيير الحجم`};var Fe={};Fe={colorSwatchPicker:`Цветови мостри`,dropzoneLabel:`DropZone`,selectPlaceholder:`Изберете предмет`,tableResizer:`Преоразмерител`};var Ie={};Ie={colorSwatchPicker:`Vzorky barev`,dropzoneLabel:`Místo pro přetažení`,selectPlaceholder:`Vyberte položku`,tableResizer:`Změna velikosti`};var Le={};Le={colorSwatchPicker:`Farveprøver`,dropzoneLabel:`DropZone`,selectPlaceholder:`Vælg et element`,tableResizer:`Størrelsesændring`};var Re={};Re={colorSwatchPicker:`Farbfelder`,dropzoneLabel:`Ablegebereich`,selectPlaceholder:`Element wählen`,tableResizer:`Größenanpassung`};var ze={};ze={colorSwatchPicker:`Χρωματικά δείγματα`,dropzoneLabel:`DropZone`,selectPlaceholder:`Επιλέξτε ένα αντικείμενο`,tableResizer:`Αλλαγή μεγέθους`};var Be={};Be={selectPlaceholder:`Select an item`,tableResizer:`Resizer`,dropzoneLabel:`DropZone`,colorSwatchPicker:`Color swatches`};var Ve={};Ve={colorSwatchPicker:`Muestras de colores`,dropzoneLabel:`DropZone`,selectPlaceholder:`Seleccionar un artículo`,tableResizer:`Cambiador de tamaño`};var He={};He={colorSwatchPicker:`Värvinäidised`,dropzoneLabel:`DropZone`,selectPlaceholder:`Valige üksus`,tableResizer:`Suuruse muutja`};var Ue={};Ue={colorSwatchPicker:`Värimallit`,dropzoneLabel:`DropZone`,selectPlaceholder:`Valitse kohde`,tableResizer:`Koon muuttaja`};var Z={};Z={colorSwatchPicker:`Échantillons de couleurs`,dropzoneLabel:`DropZone`,selectPlaceholder:`Sélectionner un élément`,tableResizer:`Redimensionneur`};var We={};We={colorSwatchPicker:`דוגמיות צבע`,dropzoneLabel:`DropZone`,selectPlaceholder:`בחר פריט`,tableResizer:`שינוי גודל`};var Ge={};Ge={colorSwatchPicker:`Uzorci boja`,dropzoneLabel:`Zona spuštanja`,selectPlaceholder:`Odaberite stavku`,tableResizer:`Promjena veličine`};var Ke={};Ke={colorSwatchPicker:`Színtárak`,dropzoneLabel:`DropZone`,selectPlaceholder:`Válasszon ki egy elemet`,tableResizer:`Átméretező`};var qe={};qe={colorSwatchPicker:`Campioni di colore`,dropzoneLabel:`Zona di rilascio`,selectPlaceholder:`Seleziona un elemento`,tableResizer:`Ridimensionamento`};var Je={};Je={colorSwatchPicker:`カラースウォッチ`,dropzoneLabel:`ドロップゾーン`,selectPlaceholder:`項目を選択`,tableResizer:`サイズ変更ツール`};var Ye={};Ye={colorSwatchPicker:`색상 견본`,dropzoneLabel:`드롭 영역`,selectPlaceholder:`항목 선택`,tableResizer:`크기 조정기`};var Xe={};Xe={colorSwatchPicker:`Spalvų pavyzdžiai`,dropzoneLabel:`„DropZone“`,selectPlaceholder:`Pasirinkite elementą`,tableResizer:`Dydžio keitiklis`};var Ze={};Ze={colorSwatchPicker:`Krāsu paraugi`,dropzoneLabel:`DropZone`,selectPlaceholder:`Izvēlēties vienumu`,tableResizer:`Izmēra mainītājs`};var Qe={};Qe={colorSwatchPicker:`Fargekart`,dropzoneLabel:`Droppsone`,selectPlaceholder:`Velg et element`,tableResizer:`Størrelsesendrer`};var $e={};$e={colorSwatchPicker:`kleurstalen`,dropzoneLabel:`DropZone`,selectPlaceholder:`Selecteer een item`,tableResizer:`Resizer`};var et={};et={colorSwatchPicker:`Próbki kolorów`,dropzoneLabel:`Strefa upuszczania`,selectPlaceholder:`Wybierz element`,tableResizer:`Zmiana rozmiaru`};var tt={};tt={colorSwatchPicker:`Amostras de cores`,dropzoneLabel:`DropZone`,selectPlaceholder:`Selecione um item`,tableResizer:`Redimensionador`};var nt={};nt={colorSwatchPicker:`Amostras de cores`,dropzoneLabel:`DropZone`,selectPlaceholder:`Selecione um item`,tableResizer:`Redimensionador`};var rt={};rt={colorSwatchPicker:`Specimene de culoare`,dropzoneLabel:`Zonă de plasare`,selectPlaceholder:`Selectați un element`,tableResizer:`Instrument de redimensionare`};var it={};it={colorSwatchPicker:`Цветовые образцы`,dropzoneLabel:`DropZone`,selectPlaceholder:`Выберите элемент`,tableResizer:`Средство изменения размера`};var at={};at={colorSwatchPicker:`Vzorkovníky farieb`,dropzoneLabel:`DropZone`,selectPlaceholder:`Vyberte položku`,tableResizer:`Nástroj na zmenu veľkosti`};var ot={};ot={colorSwatchPicker:`Barvne palete`,dropzoneLabel:`DropZone`,selectPlaceholder:`Izberite element`,tableResizer:`Spreminjanje velikosti`};var st={};st={colorSwatchPicker:`Uzorci boje`,dropzoneLabel:`DropZone`,selectPlaceholder:`Izaberite stavku`,tableResizer:`Promena veličine`};var ct={};ct={colorSwatchPicker:`Färgrutor`,dropzoneLabel:`DropZone`,selectPlaceholder:`Välj en artikel`,tableResizer:`Storleksändrare`};var lt={};lt={colorSwatchPicker:`Renk örnekleri`,dropzoneLabel:`Bırakma Bölgesi`,selectPlaceholder:`Bir öğe seçin`,tableResizer:`Yeniden boyutlandırıcı`};var ut={};ut={colorSwatchPicker:`Зразки кольорів`,dropzoneLabel:`DropZone`,selectPlaceholder:`Виберіть елемент`,tableResizer:`Засіб змінення розміру`};var dt={};dt={colorSwatchPicker:`颜色色板`,dropzoneLabel:`放置区域`,selectPlaceholder:`选择一个项目`,tableResizer:`尺寸调整器`};var ft={};ft={colorSwatchPicker:`色票`,dropzoneLabel:`放置區`,selectPlaceholder:`選取項目`,tableResizer:`大小調整器`};var pt={};pt={"ar-AE":Pe,"bg-BG":Fe,"cs-CZ":Ie,"da-DK":Le,"de-DE":Re,"el-GR":ze,"en-US":Be,"es-ES":Ve,"et-EE":He,"fi-FI":Ue,"fr-FR":Z,"he-IL":We,"hr-HR":Ge,"hu-HU":Ke,"it-IT":qe,"ja-JP":Je,"ko-KR":Ye,"lt-LT":Xe,"lv-LV":Ze,"nb-NO":Qe,"nl-NL":$e,"pl-PL":et,"pt-BR":tt,"pt-PT":nt,"ro-RO":rt,"ru-RU":it,"sk-SK":at,"sl-SI":ot,"sr-SP":st,"sv-SE":ct,"tr-TR":lt,"uk-UA":ut,"zh-CN":dt,"zh-TW":ft};const Q=n({}),mt=n(null),ht=r(function(t,n){let{render:r}=o(mt);return e.createElement(e.Fragment,null,r(t,n))});function gt(t,n){let r=t?.renderDropIndicator,i=t?.isVirtualDragging?.call(t),o=a(t=>{if(i||n?.isDropTarget(t))return r?r(t):e.createElement(ht,{target:t})},[n?.target,i,r]);return t?.useDropIndicator?o:void 0}function _t(e,t,n){let r=e.focusedKey,i=null;if(t!=null&&t.isVirtualDragging?.call(t)&&n?.target?.type===`item`&&(i=n.target.key,n.target.dropPosition===`after`)){let e=n.collection.getKeyAfter(i),t=null;if(e!=null){let r=n.collection.getItem(i)?.level??0;for(;e;){let i=n.collection.getItem(e);if(!i)break;if(i.type!==`item`){e=n.collection.getKeyAfter(e);continue}if((i.level??0)<=r)break;t=e,e=n.collection.getKeyAfter(e)}}i=e??t??i}return c(()=>new Set([r,i].filter(e=>e!=null)),[r,i])}const vt=n({}),yt=n(null);function bt(t){let n=l({});return e.createElement(yt.Provider,{value:n},t.children)}const xt=n({});var St=class extends R{filter(e,t){let n=t.getItem(this.prevKey);if(n&&n.type!==`separator`){let n=this.clone();return t.addDescendants(n,e),n}return null}};St.type=`separator`;const Ct=n(null),$=n(null),wt=r(function(t,n){[t,n]=O(t,n,Ct);let r=o($);return r?e.createElement(Et,{state:r,props:t,listBoxRef:n}):e.createElement(be,{content:e.createElement(ke,t)},r=>e.createElement(Tt,{props:t,listBoxRef:n,collection:r}))});function Tt({props:t,listBoxRef:n,collection:r}){t={...t,collection:r,children:null,items:null};let{layoutDelegate:i}=o(X),a=C({...t,layoutDelegate:i});return e.createElement(Et,{state:a,props:t,listBoxRef:n})}function Et({state:t,props:n,listBoxRef:r}){[n,r]=O(n,r,ce);let{dragAndDropHooks:i,layout:a=`stack`,orientation:u=`vertical`,filter:f}=n,p=oe(t,f),{collection:m,selectionManager:h}=p,g=!!i?.useDraggableCollectionState,_=!!i?.useDroppableCollectionState,{direction:v}=ae(),{disabledBehavior:y,disabledKeys:x}=h,S=ne({usage:`search`,sensitivity:`base`}),{isVirtualized:se,layoutDelegate:C,dropTargetDelegate:w,CollectionRoot:T}=o(X),E=c(()=>n.keyboardDelegate||new te({collection:m,collator:S,ref:r,disabledKeys:x,disabledBehavior:y,layout:a,orientation:u,direction:v,layoutDelegate:C}),[m,S,r,y,x,u,v,n.keyboardDelegate,a,C]),{listBoxProps:ue}=ie({...n,shouldSelectOnPressUp:g||n.shouldSelectOnPressUp,keyboardDelegate:E,isVirtualized:se},p,r);l(g),l(_),s(()=>{},[g,_]);let k,A,j,N=!1,P=null,F=l(null);if(g&&i){k=i.useDraggableCollectionState({collection:m,selectionManager:h,preview:i.renderDragPreview?F:void 0}),i.useDraggableCollection({},k,r);let t=i.DragPreview;P=i.renderDragPreview?e.createElement(t,{ref:F},i.renderDragPreview):null}if(_&&i){A=i.useDroppableCollectionState({collection:m,selectionManager:h});let e=i.dropTargetDelegate||w||new i.ListDropTargetDelegate(m,r,{orientation:u,layout:a,direction:v});j=i.useDroppableCollection({keyboardDelegate:E,dropTargetDelegate:e},A,r),N=A.isDropTarget({type:`root`})}let{focusProps:I,isFocused:L,isFocusVisible:R}=re(),z=p.collection.size===0,B={isDropTarget:N,isEmpty:z,isFocused:L,isFocusVisible:R,layout:n.layout||`stack`,state:p},V=D({...n,children:void 0,defaultClassName:`react-aria-ListBox`,values:B}),H=null;z&&n.renderEmptyState&&(H=e.createElement(`div`,{role:`option`,style:{display:`contents`}},n.renderEmptyState(B)));let de=d(n,{global:!0});return e.createElement(ee,null,e.createElement(M.div,{...b(de,V,ue,I,j?.collectionProps),ref:r,slot:n.slot||void 0,onScroll:n.onScroll,"data-drop-target":N||void 0,"data-empty":z||void 0,"data-focused":L||void 0,"data-focus-visible":R||void 0,"data-layout":n.layout||`stack`,"data-orientation":n.orientation||`vertical`},e.createElement(le,{values:[[Ct,n],[$,p],[Q,{dragAndDropHooks:i,dragState:k,dropState:A}],[xt,{elementType:`div`}],[mt,{render:Ot}],[je,{name:`ListBoxSection`,render:Dt}]]},e.createElement(bt,null,e.createElement(T,{collection:m,scrollRef:r,persistedKeys:_t(h,i,A),renderDropIndicator:gt(i,A)}))),H,P))}function Dt(t,n,r,i=`react-aria-ListBoxSection`){let a=o($),{dragAndDropHooks:s,dropState:c}=o(Q),{CollectionBranch:l}=o(X),[u,f]=k(),{headingProps:p,groupProps:m}=x({heading:f,"aria-label":t[`aria-label`]??void 0}),h=D({...t,id:void 0,children:void 0,defaultClassName:i,values:void 0}),g=d(t,{global:!0});return delete g.id,e.createElement(M.section,{...b(g,h,m),ref:n},e.createElement(vt.Provider,{value:{...p,ref:u}},e.createElement(l,{collection:a.collection,parent:r,renderDropIndicator:gt(s,c)})))}function Ot(t,n){n=_(n);let{dragAndDropHooks:r,dropState:i}=o(Q),{dropIndicatorProps:a,isHidden:s,isDropTarget:c}=r.useDropIndicator(t,i,n);return s?null:e.createElement(At,{...t,dropIndicatorProps:a,isDropTarget:c,ref:n})}function kt(t,n){let{dropIndicatorProps:r,isDropTarget:i,...a}=t,o=D({...a,defaultClassName:`react-aria-DropIndicator`,values:{isDropTarget:i}});return e.createElement(M.div,{...r,...o,role:`option`,ref:n,"data-drop-target":i||void 0})}const At=r(kt);De(V,function(t,n,r){let i=o($),{isLoading:a,onLoadMore:s,scrollOffset:u,...p}=t,m=l(null),h=c(()=>({onLoadMore:s,collection:i?.collection,sentinelRef:m,scrollOffset:u}),[s,u,i?.collection]);g(h,m);let _=D({...p,id:void 0,children:r.rendered,defaultClassName:`react-aria-ListBoxLoadingIndicator`,values:void 0});return e.createElement(e.Fragment,null,e.createElement(`div`,{style:{position:`relative`,width:0,height:0},inert:f(!0)},e.createElement(`div`,{"data-testid":`loadMoreSentinel`,ref:m,style:{position:`absolute`,height:1,width:1}})),a&&_.children&&e.createElement(M.div,{...b(d(t,{global:!0}),{tabIndex:-1}),..._,role:`option`,ref:n},_.children))});function jt(e){return e&&e.__esModule?e.default:e}const Mt=n(null),Nt=n(null),Pt=r(function(t,n){[t,n]=O(t,n,Mt);let r=se(t),i=c(()=>new Map,[]),a=S(jt(pt),`react-aria-components`);return e.createElement(wt,{...d(t,{labelable:!0}),ref:n,className:t.className||`react-aria-ColorSwatchPicker`,style:t.style,"aria-label":t[`aria-label`]||(t[`aria-labelledby`]?void 0:a.format(`colorSwatchPicker`)),layout:t.layout||`grid`,selectionMode:`single`,selectedKeys:[r.color.toString(`hexa`)],onSelectionChange:e=>{e!==`all`&&r.setColor(i.get([...e][0]))},disallowEmptySelection:!0},e.createElement(Nt.Provider,{value:i},t.children))});export{Pt as ColorSwatchPicker};
1
+ import e,{cloneElement as t,createContext as n,forwardRef as r,isValidElement as i,useCallback as a,useContext as o,useEffect as s,useMemo as c,useRef as l,useState as u,useSyncExternalStore as d}from"react";import{filterDOMProps as f,inertValue as p,mergeProps as m,mergeRefs as h,useLayoutEffect as g,useLoadMoreSentinel as _,useObjectRef as v}from"@react-aria/utils";import{FocusableContext as y}from"@react-aria/interactions";import{createPortal as b}from"react-dom";import{FocusScope as ee,ListKeyboardDelegate as te,mergeProps as x,useCollator as ne,useFocusRing as re,useListBox as ie,useListBoxSection as S,useLocale as ae,useLocalizedStringFormatter as oe}from"react-aria";import{UNSTABLE_useFilteredListState as se,useColorPickerState as C,useListState as ce}from"react-stately";n(null),n(null),n(null),n(null),n(null),n({});const le=n(null);n(null);const ue=Symbol(`default`);function de({values:t,children:n}){for(let[r,i]of t)n=e.createElement(r.Provider,{value:i},n);return n}function w(e){let{className:t,style:n,children:r,defaultClassName:i,defaultChildren:a,defaultStyle:o,values:s,render:l}=e;return c(()=>{let e,c,u;return e=typeof t==`function`?t({...s,defaultClassName:i}):t,c=typeof n==`function`?n({...s,defaultStyle:o||{}}):n,u=typeof r==`function`?r({...s,defaultChildren:a}):r??a,{className:e??i,style:c||o?{...o,...c}:void 0,children:u??a,"data-rac":``,render:l?e=>l(e,s):void 0}},[t,n,r,i,a,o,s,l])}function T(e,t){let n=o(e);if(t===null)return null;if(n&&typeof n==`object`&&`slots`in n&&n.slots){let e=t||ue;if(!n.slots[e]){let e=new Intl.ListFormat().format(Object.keys(n.slots).map(e=>`"${e}"`)),r=t?`Invalid slot "${t}".`:`A slot prop is required.`;throw Error(`${r} Valid slot names are ${e}.`)}return n.slots[e]}return n}function E(e,t,n){let{ref:r,...i}=T(n,e.slot)||{},a=v(c(()=>h(t,r),[t,r])),o=m(i,e);return`style`in i&&i.style&&`style`in e&&e.style&&(o.style=typeof i.style==`function`||typeof e.style==`function`?t=>{let n=typeof i.style==`function`?i.style(t):i.style,r={...t.defaultStyle,...n},a=typeof e.style==`function`?e.style({...t,defaultStyle:r}):e.style;return{...r,...a}}:{...i.style,...e.style}),[o,a]}function D(e=!0){let[t,n]=u(e),r=l(!1),i=a(e=>{r.current=!0,n(!!e)},[]);return g(()=>{r.current||n(!1)},[]),[i,t]}function O(t,n,r){let{render:i,...a}=n,o=l(null),s=c(()=>h(r,o),[r,o]);g(()=>{},[t,i]);let u={...a,ref:s};return i?i(u,void 0):e.createElement(t,u)}const k={},A=new Proxy({},{get(e,t){if(typeof t!=`string`)return;let n=k[t];return n||(n=r(O.bind(null,t)),k[t]=n),n}});String(Math.round(Math.random()*1e10));const j=e.createContext(!1);typeof window<`u`&&window.document&&window.document.createElement,e.useId;function M(){return!1}function N(){return!0}function P(e){return()=>{}}function F(){return typeof e.useSyncExternalStore==`function`?e.useSyncExternalStore(P,M,N):o(j)}var I=class{get childNodes(){throw Error(`childNodes is not supported`)}clone(){let e=new this.constructor(this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e[`aria-label`]=this[`aria-label`],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}filter(e,t,n){let r=this.clone();return t.addDescendants(r,e),r}constructor(e){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue=``,this[`aria-label`]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=e}},L=class extends I{filter(e,t,n){let[r,i]=pe(e,t,this.firstChildKey,n),a=this.clone();return a.firstChildKey=r,a.lastChildKey=i,a}},R=class extends I{};R.type=`header`;var z=class extends I{};z.type=`loader`;var B=class extends L{filter(e,t,n){if(n(this.textValue,this)){let n=this.clone();return t.addDescendants(n,e),n}return null}};B.type=`item`;var V=class extends L{filter(e,t,n){let r=super.filter(e,t,n);if(r&&r.lastChildKey!==null){let t=e.getItem(r.lastChildKey);if(t&&t.type!==`header`)return r}return null}};V.type=`section`;var fe=class{get size(){return this.itemCount}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=this.firstKey==null?void 0:this.keyMap.get(this.firstKey);for(;e;)yield e,e=e.nextKey==null?void 0:this.keyMap.get(e.nextKey)}getChildren(e){let t=this.keyMap;return{*[Symbol.iterator](){let n=t.get(e),r=n?.firstChildKey==null?null:t.get(n.firstChildKey);for(;r;)yield r,r=r.nextKey==null?void 0:t.get(r.nextKey)}}}getKeyBefore(e){let t=this.keyMap.get(e);if(!t)return null;if(t.prevKey!=null){for(t=this.keyMap.get(t.prevKey);t&&t.type!==`item`&&t.lastChildKey!=null;)t=this.keyMap.get(t.lastChildKey);return t?.key??null}return t.parentKey}getKeyAfter(e){let t=this.keyMap.get(e);if(!t)return null;if(t.type!==`item`&&t.firstChildKey!=null)return t.firstChildKey;for(;t;){if(t.nextKey!=null)return t.nextKey;if(t.parentKey!=null)t=this.keyMap.get(t.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey==null?null:this.keyMap.get(this.lastKey);for(;e?.lastChildKey!=null;)e=this.keyMap.get(e.lastChildKey);return e?.key??null}getItem(e){return this.keyMap.get(e)??null}at(){throw Error(`Not implemented`)}clone(){let e=this.constructor,t=new e;return t.keyMap=new Map(this.keyMap),t.firstKey=this.firstKey,t.lastKey=this.lastKey,t.itemCount=this.itemCount,t}addNode(e){if(this.frozen)throw Error(`Cannot add a node to a frozen collection`);e.type===`item`&&this.keyMap.get(e.key)==null&&this.itemCount++,this.keyMap.set(e.key,e)}addDescendants(e,t){this.addNode(e);let n=t.getChildren(e.key);for(let e of n)this.addDescendants(e,t)}removeNode(e){if(this.frozen)throw Error(`Cannot remove a node to a frozen collection`);let t=this.keyMap.get(e);t!=null&&t.type===`item`&&this.itemCount--,this.keyMap.delete(e)}commit(e,t,n=!1){if(this.frozen)throw Error(`Cannot commit a frozen collection`);this.firstKey=e,this.lastKey=t,this.frozen=!n}filter(e){let t=new this.constructor,[n,r]=pe(this,t,this.firstKey,e);return t?.commit(n,r),t}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1,this.itemCount=0}};function pe(e,t,n,r){if(n==null)return[null,null];let i=null,a=null,o=e.getItem(n);for(;o!=null;){let n=o.filter(e,t,r);n!=null&&(n.nextKey=null,a&&(n.prevKey=a.key,a.nextKey=n.key),i??=n,t.addNode(n),a=n),o=o.nextKey?e.getItem(o.nextKey):null}if(a&&a.type===`separator`){let e=a.prevKey;t.removeNode(a.key),e?(a=t.getItem(e),a.nextKey=null):a=null}return[i?.key??null,a?.key??null]}var me=class{*[Symbol.iterator](){let e=this.firstChild;for(;e;)yield e,e=e.nextSibling}get firstChild(){return this._firstChild}set firstChild(e){this._firstChild=e,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(e){this._lastChild=e,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(e){this._previousSibling=e,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(e){this._nextSibling=e,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e,this.ownerDocument.markDirty(this)}get isConnected(){return this.parentNode?.isConnected||!1}invalidateChildIndices(e){(this._minInvalidChildIndex==null||!this._minInvalidChildIndex.isConnected||e.index<this._minInvalidChildIndex.index)&&(this._minInvalidChildIndex=e,this.ownerDocument.markDirty(this))}updateChildIndices(){let e=this._minInvalidChildIndex;for(;e;)e.index=e.previousSibling?e.previousSibling.index+1:0,e=e.nextSibling;this._minInvalidChildIndex=null}appendChild(e){e.parentNode&&e.parentNode.removeChild(e),this.firstChild??=e,this.lastChild?(this.lastChild.nextSibling=e,e.index=this.lastChild.index+1,e.previousSibling=this.lastChild):(e.previousSibling=null,e.index=0),e.parentNode=this,e.nextSibling=null,this.lastChild=e,this.ownerDocument.markDirty(this),this.isConnected&&this.ownerDocument.queueUpdate()}insertBefore(e,t){if(t==null)return this.appendChild(e);e.parentNode&&e.parentNode.removeChild(e),e.nextSibling=t,e.previousSibling=t.previousSibling,e.index=t.index-1,this.firstChild===t?this.firstChild=e:t.previousSibling&&(t.previousSibling.nextSibling=e),t.previousSibling=e,e.parentNode=t.parentNode,this.invalidateChildIndices(e),this.isConnected&&this.ownerDocument.queueUpdate()}removeChild(e){e.parentNode===this&&(this._minInvalidChildIndex===e&&(this._minInvalidChildIndex=null),e.nextSibling&&(this.invalidateChildIndices(e.nextSibling),e.nextSibling.previousSibling=e.previousSibling),e.previousSibling&&(e.previousSibling.nextSibling=e.nextSibling),this.firstChild===e&&(this.firstChild=e.nextSibling),this.lastChild===e&&(this.lastChild=e.previousSibling),e.parentNode=null,e.nextSibling=null,e.previousSibling=null,e.index=0,this.ownerDocument.markDirty(e),this.isConnected&&this.ownerDocument.queueUpdate())}addEventListener(){}removeEventListener(){}get previousVisibleSibling(){let e=this.previousSibling;for(;e&&e.isHidden;)e=e.previousSibling;return e}get nextVisibleSibling(){let e=this.nextSibling;for(;e&&e.isHidden;)e=e.nextSibling;return e}get firstVisibleChild(){let e=this.firstChild;for(;e&&e.isHidden;)e=e.nextSibling;return e}get lastVisibleChild(){let e=this.lastChild;for(;e&&e.isHidden;)e=e.previousSibling;return e}constructor(e){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this._minInvalidChildIndex=null,this.ownerDocument=e}},H=class e extends me{get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof e?this.parentNode.level+ +(this.node?.type===`item`):0}getMutableNode(){return this.node==null?null:(this.isMutated||=(this.node=this.node.clone(),!0),this.ownerDocument.markDirty(this),this.node)}updateNode(){let t=this.nextVisibleSibling,n=this.getMutableNode();if(n!=null&&(n.index=this.index,n.level=this.level,n.parentKey=this.parentNode instanceof e?this.parentNode.node?.key??null:null,n.prevKey=this.previousVisibleSibling?.node?.key??null,n.nextKey=t?.node?.key??null,n.hasChildNodes=!!this.firstChild,n.firstChildKey=this.firstVisibleChild?.node?.key??null,n.lastChildKey=this.lastVisibleChild?.node?.key??null,(n.colSpan!=null||n.colIndex!=null)&&t)){let e=(n.colIndex??n.index)+(n.colSpan??1);if(t.node!=null&&e!==t.node.colIndex){let n=t.getMutableNode();n.colIndex=e}}}setProps(e,t,n,r,i){let a,{value:o,textValue:s,id:c,...l}=e;if(this.node==null?(a=new n(c??`react-aria-${++this.ownerDocument.nodeId}`),this.node=a):a=this.getMutableNode(),l.ref=t,a.props=l,a.rendered=r,a.render=i,a.value=o,e[`aria-label`]&&(a[`aria-label`]=e[`aria-label`]),a.textValue=s||(typeof l.children==`string`?l.children:``)||e[`aria-label`]||``,c!=null&&c!==a.key)throw Error(`Cannot change the id of an item`);l.colSpan!=null&&(a.colSpan=l.colSpan),this.isConnected&&this.ownerDocument.queueUpdate()}get style(){let e=this;return{get display(){return e.isHidden?`none`:``},set display(t){let n=t===`none`;if(e.isHidden!==n){(e.parentNode?.firstVisibleChild===e||e.parentNode?.lastVisibleChild===e)&&e.ownerDocument.markDirty(e.parentNode);let t=e.previousVisibleSibling,r=e.nextVisibleSibling;t&&e.ownerDocument.markDirty(t),r&&e.ownerDocument.markDirty(r),e.isHidden=n,e.ownerDocument.markDirty(e)}}}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}constructor(e,t){super(t),this.nodeType=8,this.isMutated=!0,this._index=0,this.isHidden=!1,this.node=null}},he=class extends me{get isConnected(){return!0}createElement(e){return new H(e,this)}getMutableCollection(){return this.nextCollection||=this.collection.clone(),this.nextCollection}markDirty(e){this.dirtyNodes.add(e)}addNode(e){if(e.isHidden||e.node==null)return;let t=this.getMutableCollection();if(!t.getItem(e.node.key))for(let t of e)this.addNode(t);t.addNode(e.node)}removeNode(e){for(let t of e)this.removeNode(t);e.node&&this.getMutableCollection().removeNode(e.node.key)}getCollection(){return this.inSubscription?this.collection.clone():(this.queuedRender=!1,this.updateCollection(),this.collection)}updateCollection(){for(let e of this.dirtyNodes)e instanceof H&&(!e.isConnected||e.isHidden)?this.removeNode(e):e.updateChildIndices();for(let e of this.dirtyNodes)e instanceof H?(e.isConnected&&!e.isHidden&&(e.updateNode(),this.addNode(e)),e.node&&this.dirtyNodes.delete(e),e.isMutated=!1):this.dirtyNodes.delete(e);this.nextCollection&&(this.nextCollection.commit(this.firstVisibleChild?.node?.key??null,this.lastVisibleChild?.node?.key??null,this.isSSR),this.isSSR||(this.collection=this.nextCollection,this.nextCollection=null))}queueUpdate(){if(!(this.dirtyNodes.size===0||this.queuedRender)){this.queuedRender=!0,this.inSubscription=!0;for(let e of this.subscriptions)e();this.inSubscription=!1}}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}constructor(e){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.nextCollection=null,this.subscriptions=new Set,this.queuedRender=!1,this.inSubscription=!1,this.collection=e,this.nextCollection=e}};function U(e){let{children:n,items:r,idScope:i,addIdAndValue:a,dependencies:o=[]}=e,s=c(()=>new WeakMap,o);return c(()=>{if(r&&typeof n==`function`){let e=[];for(let o of r){let r=s.get(o);if(!r){r=n(o);let e=r.props.id??o.key??o.id;if(e==null)throw Error(`Could not determine key for item`);i!=null&&(e=i+`:`+e),r=t(r,a?{key:e,id:e,value:o}:{key:e}),s.set(o,r)}e.push(r)}return e}if(typeof n!=`function`)return n},[n,r,s,i,a])}if(typeof HTMLTemplateElement<`u`){let e=Object.getOwnPropertyDescriptor(Node.prototype,`firstChild`).get;Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:e.call(this)}})}const W=n(!1);function ge(t){if(o(W))return e.createElement(e.Fragment,null,t.children);let n=e.createElement(W.Provider,{value:!0},t.children);return e.createElement(`template`,{"data-react-aria-hidden":!0},n)}const G=n(!1),K=n(null);function _e(t){if(o(K))return t.content;let{collection:n,document:r}=xe(t.createCollection);return e.createElement(e.Fragment,null,e.createElement(ge,null,e.createElement(K.Provider,{value:r},t.content)),e.createElement(ve,{render:t.children,collection:n}))}function ve({collection:e,render:t}){return t(e)}function ye(e,t,n){let r=F(),i=l(r);i.current=r;let o=a(()=>i.current?n():t(),[t,n]);return d(e,o)}const be=typeof e.useSyncExternalStore==`function`?e.useSyncExternalStore:ye;function xe(e){let[t]=u(()=>new he(e?.()||new fe)),n=a(e=>t.subscribe(e),[t]),r=a(()=>{let e=t.getCollection();return t.isSSR&&t.resetAfterSSR(),e},[t]),i=a(()=>(t.isSSR=!0,t.getCollection()),[t]);return{collection:be(n,r,i),document:t}}const q=n(null);function Se(e){var t;return t=class extends I{},t.type=e,t}function Ce(t,n,r,i,s,c){typeof t==`string`&&(t=Se(t));let l=a(e=>{e?.setProps(n,r,t,i,c)},[n,r,i,c,t]),u=o(q);if(u){let a=u.ownerDocument.nodesByProps.get(n);return a||(a=u.ownerDocument.createElement(t.type),a.setProps(n,r,t,i,c),u.appendChild(a),u.ownerDocument.updateCollection(),u.ownerDocument.nodesByProps.set(n,a)),s?e.createElement(q.Provider,{value:a},s):null}return e.createElement(t.type,{ref:l},s)}function we(t,n){let i=({node:e})=>n(e.props,e.props.ref,e),a=r((r,a)=>{let s=o(y);if(!o(G)){if(n.length>=3)throw Error(n.name+` cannot be rendered outside a collection.`);return n(r,a)}return Ce(t,r,a,`children`in r?r.children:null,null,t=>e.createElement(y.Provider,{value:s},e.createElement(i,{node:t})))});return a.displayName=n.name,a}function Te(e){return U({...e,addIdAndValue:!0})}const J=n(null);function Ee(t){let n=o(J),r=(n?.dependencies||[]).concat(t.dependencies),i=t.idScope??n?.idScope,a=Te({...t,idScope:i,dependencies:r});return o(K)&&(a=e.createElement(De,null,a)),n=c(()=>({dependencies:r,idScope:i}),[i,...r]),e.createElement(J.Provider,{value:n},a)}function De({children:t}){let n=o(K),r=c(()=>e.createElement(K.Provider,{value:null},e.createElement(G.Provider,{value:!0},t)),[t]);return F()?e.createElement(q.Provider,{value:n},r):b(r,n)}const Oe=n(null),ke={CollectionRoot({collection:e,renderDropIndicator:t}){return Y(e,null,t)},CollectionBranch({collection:e,parent:t,renderDropIndicator:n}){return Y(e,t,n)}};function Y(t,n,r){return U({items:n?t.getChildren(n.key):t,dependencies:[r],children(n){let i=n.render(n);return!r||n.type!==`item`?i:e.createElement(e.Fragment,null,r({type:`item`,key:n.key,dropPosition:`before`}),i,Ae(t,n,r))}})}function Ae(e,n,r){let a=n.key,o=e.getKeyAfter(a),s=o==null?null:e.getItem(o);for(;s!=null&&s.type!==`item`;)o=e.getKeyAfter(s.key),s=o==null?null:e.getItem(o);let c=n.nextKey==null?null:e.getItem(n.nextKey);for(;c!=null&&c.type!==`item`;)c=c.nextKey==null?null:e.getItem(c.nextKey);let l=[];if(c==null){let a=n;for(;a?.type===`item`&&(!s||a.parentKey!==s.parentKey&&s.level<a.level);){let n=r({type:`item`,key:a.key,dropPosition:`after`});i(n)&&l.push(t(n,{key:`${a.key}-after`})),a=a.parentKey==null?null:e.getItem(a.parentKey)}}return l}const X=n(ke);var je={};je={colorSwatchPicker:`تغييرات الألوان`,dropzoneLabel:`DropZone`,selectPlaceholder:`حدد عنصرًا`,tableResizer:`أداة تغيير الحجم`};var Me={};Me={colorSwatchPicker:`Цветови мостри`,dropzoneLabel:`DropZone`,selectPlaceholder:`Изберете предмет`,tableResizer:`Преоразмерител`};var Ne={};Ne={colorSwatchPicker:`Vzorky barev`,dropzoneLabel:`Místo pro přetažení`,selectPlaceholder:`Vyberte položku`,tableResizer:`Změna velikosti`};var Pe={};Pe={colorSwatchPicker:`Farveprøver`,dropzoneLabel:`DropZone`,selectPlaceholder:`Vælg et element`,tableResizer:`Størrelsesændring`};var Fe={};Fe={colorSwatchPicker:`Farbfelder`,dropzoneLabel:`Ablegebereich`,selectPlaceholder:`Element wählen`,tableResizer:`Größenanpassung`};var Ie={};Ie={colorSwatchPicker:`Χρωματικά δείγματα`,dropzoneLabel:`DropZone`,selectPlaceholder:`Επιλέξτε ένα αντικείμενο`,tableResizer:`Αλλαγή μεγέθους`};var Le={};Le={selectPlaceholder:`Select an item`,tableResizer:`Resizer`,dropzoneLabel:`DropZone`,colorSwatchPicker:`Color swatches`};var Re={};Re={colorSwatchPicker:`Muestras de colores`,dropzoneLabel:`DropZone`,selectPlaceholder:`Seleccionar un artículo`,tableResizer:`Cambiador de tamaño`};var ze={};ze={colorSwatchPicker:`Värvinäidised`,dropzoneLabel:`DropZone`,selectPlaceholder:`Valige üksus`,tableResizer:`Suuruse muutja`};var Be={};Be={colorSwatchPicker:`Värimallit`,dropzoneLabel:`DropZone`,selectPlaceholder:`Valitse kohde`,tableResizer:`Koon muuttaja`};var Ve={};Ve={colorSwatchPicker:`Échantillons de couleurs`,dropzoneLabel:`DropZone`,selectPlaceholder:`Sélectionner un élément`,tableResizer:`Redimensionneur`};var He={};He={colorSwatchPicker:`דוגמיות צבע`,dropzoneLabel:`DropZone`,selectPlaceholder:`בחר פריט`,tableResizer:`שינוי גודל`};var Z={};Z={colorSwatchPicker:`Uzorci boja`,dropzoneLabel:`Zona spuštanja`,selectPlaceholder:`Odaberite stavku`,tableResizer:`Promjena veličine`};var Ue={};Ue={colorSwatchPicker:`Színtárak`,dropzoneLabel:`DropZone`,selectPlaceholder:`Válasszon ki egy elemet`,tableResizer:`Átméretező`};var We={};We={colorSwatchPicker:`Campioni di colore`,dropzoneLabel:`Zona di rilascio`,selectPlaceholder:`Seleziona un elemento`,tableResizer:`Ridimensionamento`};var Ge={};Ge={colorSwatchPicker:`カラースウォッチ`,dropzoneLabel:`ドロップゾーン`,selectPlaceholder:`項目を選択`,tableResizer:`サイズ変更ツール`};var Ke={};Ke={colorSwatchPicker:`색상 견본`,dropzoneLabel:`드롭 영역`,selectPlaceholder:`항목 선택`,tableResizer:`크기 조정기`};var qe={};qe={colorSwatchPicker:`Spalvų pavyzdžiai`,dropzoneLabel:`„DropZone“`,selectPlaceholder:`Pasirinkite elementą`,tableResizer:`Dydžio keitiklis`};var Je={};Je={colorSwatchPicker:`Krāsu paraugi`,dropzoneLabel:`DropZone`,selectPlaceholder:`Izvēlēties vienumu`,tableResizer:`Izmēra mainītājs`};var Ye={};Ye={colorSwatchPicker:`Fargekart`,dropzoneLabel:`Droppsone`,selectPlaceholder:`Velg et element`,tableResizer:`Størrelsesendrer`};var Xe={};Xe={colorSwatchPicker:`kleurstalen`,dropzoneLabel:`DropZone`,selectPlaceholder:`Selecteer een item`,tableResizer:`Resizer`};var Ze={};Ze={colorSwatchPicker:`Próbki kolorów`,dropzoneLabel:`Strefa upuszczania`,selectPlaceholder:`Wybierz element`,tableResizer:`Zmiana rozmiaru`};var Qe={};Qe={colorSwatchPicker:`Amostras de cores`,dropzoneLabel:`DropZone`,selectPlaceholder:`Selecione um item`,tableResizer:`Redimensionador`};var $e={};$e={colorSwatchPicker:`Amostras de cores`,dropzoneLabel:`DropZone`,selectPlaceholder:`Selecione um item`,tableResizer:`Redimensionador`};var et={};et={colorSwatchPicker:`Specimene de culoare`,dropzoneLabel:`Zonă de plasare`,selectPlaceholder:`Selectați un element`,tableResizer:`Instrument de redimensionare`};var tt={};tt={colorSwatchPicker:`Цветовые образцы`,dropzoneLabel:`DropZone`,selectPlaceholder:`Выберите элемент`,tableResizer:`Средство изменения размера`};var nt={};nt={colorSwatchPicker:`Vzorkovníky farieb`,dropzoneLabel:`DropZone`,selectPlaceholder:`Vyberte položku`,tableResizer:`Nástroj na zmenu veľkosti`};var rt={};rt={colorSwatchPicker:`Barvne palete`,dropzoneLabel:`DropZone`,selectPlaceholder:`Izberite element`,tableResizer:`Spreminjanje velikosti`};var it={};it={colorSwatchPicker:`Uzorci boje`,dropzoneLabel:`DropZone`,selectPlaceholder:`Izaberite stavku`,tableResizer:`Promena veličine`};var at={};at={colorSwatchPicker:`Färgrutor`,dropzoneLabel:`DropZone`,selectPlaceholder:`Välj en artikel`,tableResizer:`Storleksändrare`};var ot={};ot={colorSwatchPicker:`Renk örnekleri`,dropzoneLabel:`Bırakma Bölgesi`,selectPlaceholder:`Bir öğe seçin`,tableResizer:`Yeniden boyutlandırıcı`};var st={};st={colorSwatchPicker:`Зразки кольорів`,dropzoneLabel:`DropZone`,selectPlaceholder:`Виберіть елемент`,tableResizer:`Засіб змінення розміру`};var ct={};ct={colorSwatchPicker:`颜色色板`,dropzoneLabel:`放置区域`,selectPlaceholder:`选择一个项目`,tableResizer:`尺寸调整器`};var lt={};lt={colorSwatchPicker:`色票`,dropzoneLabel:`放置區`,selectPlaceholder:`選取項目`,tableResizer:`大小調整器`};var ut={};ut={"ar-AE":je,"bg-BG":Me,"cs-CZ":Ne,"da-DK":Pe,"de-DE":Fe,"el-GR":Ie,"en-US":Le,"es-ES":Re,"et-EE":ze,"fi-FI":Be,"fr-FR":Ve,"he-IL":He,"hr-HR":Z,"hu-HU":Ue,"it-IT":We,"ja-JP":Ge,"ko-KR":Ke,"lt-LT":qe,"lv-LV":Je,"nb-NO":Ye,"nl-NL":Xe,"pl-PL":Ze,"pt-BR":Qe,"pt-PT":$e,"ro-RO":et,"ru-RU":tt,"sk-SK":nt,"sl-SI":rt,"sr-SP":it,"sv-SE":at,"tr-TR":ot,"uk-UA":st,"zh-CN":ct,"zh-TW":lt};const Q=n({}),dt=n(null),ft=r(function(t,n){let{render:r}=o(dt);return e.createElement(e.Fragment,null,r(t,n))});function pt(t,n){let r=t?.renderDropIndicator,i=t?.isVirtualDragging?.call(t),o=a(t=>{if(i||n?.isDropTarget(t))return r?r(t):e.createElement(ft,{target:t})},[n?.target,i,r]);return t?.useDropIndicator?o:void 0}function mt(e,t,n){let r=e.focusedKey,i=null;if(t!=null&&t.isVirtualDragging?.call(t)&&n?.target?.type===`item`&&(i=n.target.key,n.target.dropPosition===`after`)){let e=n.collection.getKeyAfter(i),t=null;if(e!=null){let r=n.collection.getItem(i)?.level??0;for(;e;){let i=n.collection.getItem(e);if(!i)break;if(i.type!==`item`){e=n.collection.getKeyAfter(e);continue}if((i.level??0)<=r)break;t=e,e=n.collection.getKeyAfter(e)}}i=e??t??i}return c(()=>new Set([r,i].filter(e=>e!=null)),[r,i])}const ht=n({}),gt=n(null);function _t(t){let n=l({});return e.createElement(gt.Provider,{value:n},t.children)}const vt=n({});var yt=class extends I{filter(e,t){let n=t.getItem(this.prevKey);if(n&&n.type!==`separator`){let n=this.clone();return t.addDescendants(n,e),n}return null}};yt.type=`separator`;const bt=n(null),$=n(null),xt=r(function(t,n){[t,n]=E(t,n,bt);let r=o($);return r?e.createElement(Ct,{state:r,props:t,listBoxRef:n}):e.createElement(_e,{content:e.createElement(Ee,t)},r=>e.createElement(St,{props:t,listBoxRef:n,collection:r}))});function St({props:t,listBoxRef:n,collection:r}){t={...t,collection:r,children:null,items:null};let{layoutDelegate:i}=o(X),a=ce({...t,layoutDelegate:i});return e.createElement(Ct,{state:a,props:t,listBoxRef:n})}function Ct({state:t,props:n,listBoxRef:r}){[n,r]=E(n,r,le);let{dragAndDropHooks:i,layout:a=`stack`,orientation:u=`vertical`,filter:d}=n,p=se(t,d),{collection:m,selectionManager:h}=p,g=!!i?.useDraggableCollectionState,_=!!i?.useDroppableCollectionState,{direction:v}=ae(),{disabledBehavior:y,disabledKeys:b}=h,S=ne({usage:`search`,sensitivity:`base`}),{isVirtualized:oe,layoutDelegate:C,dropTargetDelegate:ce,CollectionRoot:ue}=o(X),T=c(()=>n.keyboardDelegate||new te({collection:m,collator:S,ref:r,disabledKeys:b,disabledBehavior:y,layout:a,orientation:u,direction:v,layoutDelegate:C}),[m,S,r,y,b,u,v,n.keyboardDelegate,a,C]),{listBoxProps:D}=ie({...n,shouldSelectOnPressUp:g||n.shouldSelectOnPressUp,keyboardDelegate:T,isVirtualized:oe},p,r);l(g),l(_),s(()=>{},[g,_]);let O,k,j,M=!1,N=null,P=l(null);if(g&&i){O=i.useDraggableCollectionState({collection:m,selectionManager:h,preview:i.renderDragPreview?P:void 0}),i.useDraggableCollection({},O,r);let t=i.DragPreview;N=i.renderDragPreview?e.createElement(t,{ref:P},i.renderDragPreview):null}if(_&&i){k=i.useDroppableCollectionState({collection:m,selectionManager:h});let e=i.dropTargetDelegate||ce||new i.ListDropTargetDelegate(m,r,{orientation:u,layout:a,direction:v});j=i.useDroppableCollection({keyboardDelegate:T,dropTargetDelegate:e},k,r),M=k.isDropTarget({type:`root`})}let{focusProps:F,isFocused:I,isFocusVisible:L}=re(),R=p.collection.size===0,z={isDropTarget:M,isEmpty:R,isFocused:I,isFocusVisible:L,layout:n.layout||`stack`,state:p},B=w({...n,children:void 0,defaultClassName:`react-aria-ListBox`,values:z}),V=null;R&&n.renderEmptyState&&(V=e.createElement(`div`,{role:`option`,style:{display:`contents`}},n.renderEmptyState(z)));let fe=f(n,{global:!0});return e.createElement(ee,null,e.createElement(A.div,{...x(fe,B,D,F,j?.collectionProps),ref:r,slot:n.slot||void 0,onScroll:n.onScroll,"data-drop-target":M||void 0,"data-empty":R||void 0,"data-focused":I||void 0,"data-focus-visible":L||void 0,"data-layout":n.layout||`stack`,"data-orientation":n.orientation||`vertical`},e.createElement(de,{values:[[bt,n],[$,p],[Q,{dragAndDropHooks:i,dragState:O,dropState:k}],[vt,{elementType:`div`}],[dt,{render:Tt}],[Oe,{name:`ListBoxSection`,render:wt}]]},e.createElement(_t,null,e.createElement(ue,{collection:m,scrollRef:r,persistedKeys:mt(h,i,k),renderDropIndicator:pt(i,k)}))),V,N))}function wt(t,n,r,i=`react-aria-ListBoxSection`){let a=o($),{dragAndDropHooks:s,dropState:c}=o(Q),{CollectionBranch:l}=o(X),[u,d]=D(),{headingProps:p,groupProps:m}=S({heading:d,"aria-label":t[`aria-label`]??void 0}),h=w({...t,id:void 0,children:void 0,defaultClassName:i,values:void 0}),g=f(t,{global:!0});return delete g.id,e.createElement(A.section,{...x(g,h,m),ref:n},e.createElement(ht.Provider,{value:{...p,ref:u}},e.createElement(l,{collection:a.collection,parent:r,renderDropIndicator:pt(s,c)})))}function Tt(t,n){n=v(n);let{dragAndDropHooks:r,dropState:i}=o(Q),{dropIndicatorProps:a,isHidden:s,isDropTarget:c}=r.useDropIndicator(t,i,n);return s?null:e.createElement(Dt,{...t,dropIndicatorProps:a,isDropTarget:c,ref:n})}function Et(t,n){let{dropIndicatorProps:r,isDropTarget:i,...a}=t,o=w({...a,defaultClassName:`react-aria-DropIndicator`,values:{isDropTarget:i}});return e.createElement(A.div,{...r,...o,role:`option`,ref:n,"data-drop-target":i||void 0})}const Dt=r(Et);we(z,function(t,n,r){let i=o($),{isLoading:a,onLoadMore:s,scrollOffset:u,...d}=t,m=l(null),h=c(()=>({onLoadMore:s,collection:i?.collection,sentinelRef:m,scrollOffset:u}),[s,u,i?.collection]);_(h,m);let g=w({...d,id:void 0,children:r.rendered,defaultClassName:`react-aria-ListBoxLoadingIndicator`,values:void 0});return e.createElement(e.Fragment,null,e.createElement(`div`,{style:{position:`relative`,width:0,height:0},inert:p(!0)},e.createElement(`div`,{"data-testid":`loadMoreSentinel`,ref:m,style:{position:`absolute`,height:1,width:1}})),a&&g.children&&e.createElement(A.div,{...x(f(t,{global:!0}),{tabIndex:-1}),...g,role:`option`,ref:n},g.children))});function Ot(e){return e&&e.__esModule?e.default:e}const kt=n(null),At=n(null),jt=r(function(t,n){[t,n]=E(t,n,kt);let r=C(t),i=c(()=>new Map,[]),a=oe(Ot(ut),`react-aria-components`);return e.createElement(xt,{...f(t,{labelable:!0}),ref:n,className:t.className||`react-aria-ColorSwatchPicker`,style:t.style,"aria-label":t[`aria-label`]||(t[`aria-labelledby`]?void 0:a.format(`colorSwatchPicker`)),layout:t.layout||`grid`,selectionMode:`single`,selectedKeys:[r.color.toString(`hexa`)],onSelectionChange:e=>{e!==`all`&&r.setColor(i.get([...e][0]))},disallowEmptySelection:!0},e.createElement(At.Provider,{value:i},t.children))});export{jt as ColorSwatchPicker};
@@ -1,11 +1 @@
1
- import e,{createContext as t,forwardRef as n,useCallback as r,useContext as i,useEffect as a,useMemo as o,useRef as s}from"react";import{filterDOMProps as c,inertValue as l,mergeRefs as u,useLayoutEffect as d,useLoadMoreSentinel as f,useObjectRef as p}from"@react-aria/utils";import{FocusableContext as m}from"@react-aria/interactions";import"react-dom";import{mergeProps as h,useFocus as g,useHover as _,useLocale as v,useOption as y}from"react-aria";import{parseColor as b}from"react-stately";var x=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),S=(e=>typeof require<`u`?require:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof require<`u`?require:e)[t]}):e)(function(e){if(typeof require<`u`)return require.apply(this,arguments);throw Error('Calling `require` for "'+e+"\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.")});const C=Symbol(`default`);function w({values:t,children:n}){for(let[r,i]of t)n=e.createElement(r.Provider,{value:i},n);return n}function T(e){let{className:t,style:n,children:r,defaultClassName:i,defaultChildren:a,defaultStyle:s,values:c,render:l}=e;return o(()=>{let e,o,u;return e=typeof t==`function`?t({...c,defaultClassName:i}):t,o=typeof n==`function`?n({...c,defaultStyle:s||{}}):n,u=typeof r==`function`?r({...c,defaultChildren:a}):r??a,{className:e??i,style:o||s?{...s,...o}:void 0,children:u??a,"data-rac":``,render:l?e=>l(e,c):void 0}},[t,n,r,i,a,s,c,l])}function E(e,t){return n=>t(typeof e==`function`?e(n):e,n)}function D(t,n,r){let{render:i,...a}=n,c=s(null),l=o(()=>u(r,c),[r,c]);d(()=>{},[t,i]);let f={...a,ref:l};return i?i(f,void 0):e.createElement(t,f)}const O={},k=new Proxy({},{get(e,t){if(typeof t!=`string`)return;let r=O[t];return r||(r=n(D.bind(null,t)),O[t]=r),r}});String(Math.round(Math.random()*1e10)),typeof window<`u`&&window.document&&window.document.createElement,e.useId;var A=class{get childNodes(){throw Error(`childNodes is not supported`)}clone(){let e=new this.constructor(this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e[`aria-label`]=this[`aria-label`],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}filter(e,t,n){let r=this.clone();return t.addDescendants(r,e),r}constructor(e){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue=``,this[`aria-label`]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=e}},j=class extends A{filter(e,t,n){let[r,i]=I(e,t,this.firstChildKey,n),a=this.clone();return a.firstChildKey=r,a.lastChildKey=i,a}},M=class extends A{};M.type=`header`;var N=class extends A{};N.type=`loader`;var P=class extends j{filter(e,t,n){if(n(this.textValue,this)){let n=this.clone();return t.addDescendants(n,e),n}return null}};P.type=`item`;var F=class extends j{filter(e,t,n){let r=super.filter(e,t,n);if(r&&r.lastChildKey!==null){let t=e.getItem(r.lastChildKey);if(t&&t.type!==`header`)return r}return null}};F.type=`section`;function I(e,t,n,r){if(n==null)return[null,null];let i=null,a=null,o=e.getItem(n);for(;o!=null;){let n=o.filter(e,t,r);n!=null&&(n.nextKey=null,a&&(n.prevKey=a.key,a.nextKey=n.key),i??=n,t.addNode(n),a=n),o=o.nextKey?e.getItem(o.nextKey):null}if(a&&a.type===`separator`){let e=a.prevKey;t.removeNode(a.key),e?(a=t.getItem(e),a.nextKey=null):a=null}return[i?.key??null,a?.key??null]}
2
- /**
3
- * @license React
4
- * use-sync-external-store-shim.production.js
5
- *
6
- * Copyright (c) Meta Platforms, Inc. and affiliates.
7
- *
8
- * This source code is licensed under the MIT license found in the
9
- * LICENSE file in the root directory of this source tree.
10
- */
11
- var L=x((e=>{var t=S(`react`);function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore}));x(((e,t)=>{t.exports=L()}))();const R=t(!1);typeof e.useSyncExternalStore==`function`&&e.useSyncExternalStore;const z=t(null);function B(e){var t;return t=class extends A{},t.type=e,t}function V(t,n,a,o,s,c){typeof t==`string`&&(t=B(t));let l=r(e=>{e?.setProps(n,a,t,o,c)},[n,a,o,c,t]),u=i(z);if(u){let r=u.ownerDocument.nodesByProps.get(n);return r||(r=u.ownerDocument.createElement(t.type),r.setProps(n,a,t,o,c),u.appendChild(r),u.ownerDocument.updateCollection(),u.ownerDocument.nodesByProps.set(n,r)),s?e.createElement(z.Provider,{value:r},s):null}return e.createElement(t.type,{ref:l},s)}function H(t,r){let a=({node:e})=>r(e.props,e.props.ref,e),o=n((n,o)=>{let s=i(m);if(!i(R)){if(r.length>=3)throw Error(r.name+` cannot be rendered outside a collection.`);return r(n,o)}return V(t,n,o,`children`in n?n.children:null,null,t=>e.createElement(m.Provider,{value:s},e.createElement(a,{node:t})))});return o.displayName=r.name,o}const U=t({}),W=t(null),G=t({}),K=t({isSelected:!1}),q=t(null),J=H(P,function(t,n,r){let o=p(n),s=i(q),{dragAndDropHooks:l,dragState:u,dropState:d}=i(G),{optionProps:f,labelProps:m,descriptionProps:v,...b}=y({key:r.key,"aria-label":t?.[`aria-label`]},s,o),{hoverProps:x,isHovered:S}=_({isDisabled:!b.allowsSelection&&!b.hasAction,onHoverStart:r.props.onHoverStart,onHoverChange:r.props.onHoverChange,onHoverEnd:r.props.onHoverEnd}),{focusProps:E}=g(t),D=null;u&&l&&(D=l.useDraggableItem({key:r.key,hasAction:b.hasAction},u));let O=null;d&&l&&(O=l.useDroppableItem({target:{type:`item`,key:r.key,dropPosition:`on`}},d,o));let A=u&&u.isDragging(r.key),j=T({...t,id:void 0,children:t.children,defaultClassName:`react-aria-ListBoxItem`,values:{...b,isHovered:S,selectionMode:s.selectionManager.selectionMode,selectionBehavior:s.selectionManager.selectionBehavior,allowsDragging:!!u,isDragging:A,isDropTarget:O?.isDropTarget}});a(()=>{r.textValue},[r.textValue]);let M=t.href?k.a:k.div,N=c(t,{global:!0});return delete N.id,delete N.onClick,t.href&&f.tabIndex==null&&(f.tabIndex=-1),e.createElement(M,{...h(N,j,f,x,E,D?.dragProps,O?.dropProps),ref:o,"data-allows-dragging":!!u||void 0,"data-selected":b.isSelected||void 0,"data-disabled":b.isDisabled||void 0,"data-hovered":S||void 0,"data-focused":b.isFocused||void 0,"data-focus-visible":b.isFocusVisible||void 0,"data-pressed":b.isPressed||void 0,"data-dragging":A||void 0,"data-drop-target":O?.isDropTarget||void 0,"data-selection-mode":s.selectionManager.selectionMode===`none`?void 0:s.selectionManager.selectionMode},e.createElement(w,{values:[[U,{slots:{[C]:m,label:m,description:v}}],[K,{isSelected:b.isSelected}]]},j.children))});H(N,function(t,n,r){let a=i(q),{isLoading:u,onLoadMore:d,scrollOffset:p,...m}=t,g=s(null),_=o(()=>({onLoadMore:d,collection:a?.collection,sentinelRef:g,scrollOffset:p}),[d,p,a?.collection]);f(_,g);let v=T({...m,id:void 0,children:r.rendered,defaultClassName:`react-aria-ListBoxLoadingIndicator`,values:void 0});return e.createElement(e.Fragment,null,e.createElement(`div`,{style:{position:`relative`,width:0,height:0},inert:l(!0)},e.createElement(`div`,{"data-testid":`loadMoreSentinel`,ref:g,style:{position:`absolute`,height:1,width:1}})),u&&v.children&&e.createElement(k.div,{...h(c(t,{global:!0}),{tabIndex:-1}),...v,role:`option`,ref:n},v.children))});const Y=t(null),X=n(function(t,n){let r=t.color||`#0000`,s=o(()=>typeof r==`string`?b(r):r,[r]),{locale:c}=v(),l=i(Y);a(()=>{let e=s.toString(`hexa`);return l.set(e,s),()=>{l.delete(e)}},[s,l]);let u=e=>typeof e==`function`?t=>e({...t,color:s}):e;return e.createElement(J,{...t,render:t.render,ref:n,id:s.toString(`hexa`),textValue:s.getColorName(c),className:u(t.className||`react-aria-ColorSwatchPickerItem`),style:u(t.style)},E(u(t.children),t=>e.createElement(W.Provider,{value:{color:s}},t)))});export{X as ColorSwatchPickerItem};
1
+ import e,{createContext as t,forwardRef as n,useCallback as r,useContext as i,useEffect as a,useMemo as o,useRef as s}from"react";import{filterDOMProps as c,inertValue as l,mergeRefs as u,useLayoutEffect as d,useLoadMoreSentinel as f,useObjectRef as p}from"@react-aria/utils";import{FocusableContext as m}from"@react-aria/interactions";import"react-dom";import{mergeProps as h,useFocus as g,useHover as _,useLocale as v,useOption as y}from"react-aria";import{parseColor as b}from"react-stately";const x=Symbol(`default`);function S({values:t,children:n}){for(let[r,i]of t)n=e.createElement(r.Provider,{value:i},n);return n}function C(e){let{className:t,style:n,children:r,defaultClassName:i,defaultChildren:a,defaultStyle:s,values:c,render:l}=e;return o(()=>{let e,o,u;return e=typeof t==`function`?t({...c,defaultClassName:i}):t,o=typeof n==`function`?n({...c,defaultStyle:s||{}}):n,u=typeof r==`function`?r({...c,defaultChildren:a}):r??a,{className:e??i,style:o||s?{...s,...o}:void 0,children:u??a,"data-rac":``,render:l?e=>l(e,c):void 0}},[t,n,r,i,a,s,c,l])}function w(e,t){return n=>t(typeof e==`function`?e(n):e,n)}function T(t,n,r){let{render:i,...a}=n,c=s(null),l=o(()=>u(r,c),[r,c]);d(()=>{},[t,i]);let f={...a,ref:l};return i?i(f,void 0):e.createElement(t,f)}const E={},D=new Proxy({},{get(e,t){if(typeof t!=`string`)return;let r=E[t];return r||(r=n(T.bind(null,t)),E[t]=r),r}});String(Math.round(Math.random()*1e10)),typeof window<`u`&&window.document&&window.document.createElement,e.useId;var O=class{get childNodes(){throw Error(`childNodes is not supported`)}clone(){let e=new this.constructor(this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e[`aria-label`]=this[`aria-label`],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}filter(e,t,n){let r=this.clone();return t.addDescendants(r,e),r}constructor(e){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue=``,this[`aria-label`]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=e}},k=class extends O{filter(e,t,n){let[r,i]=P(e,t,this.firstChildKey,n),a=this.clone();return a.firstChildKey=r,a.lastChildKey=i,a}},A=class extends O{};A.type=`header`;var j=class extends O{};j.type=`loader`;var M=class extends k{filter(e,t,n){if(n(this.textValue,this)){let n=this.clone();return t.addDescendants(n,e),n}return null}};M.type=`item`;var N=class extends k{filter(e,t,n){let r=super.filter(e,t,n);if(r&&r.lastChildKey!==null){let t=e.getItem(r.lastChildKey);if(t&&t.type!==`header`)return r}return null}};N.type=`section`;function P(e,t,n,r){if(n==null)return[null,null];let i=null,a=null,o=e.getItem(n);for(;o!=null;){let n=o.filter(e,t,r);n!=null&&(n.nextKey=null,a&&(n.prevKey=a.key,a.nextKey=n.key),i??=n,t.addNode(n),a=n),o=o.nextKey?e.getItem(o.nextKey):null}if(a&&a.type===`separator`){let e=a.prevKey;t.removeNode(a.key),e?(a=t.getItem(e),a.nextKey=null):a=null}return[i?.key??null,a?.key??null]}const F=t(!1);typeof e.useSyncExternalStore==`function`&&e.useSyncExternalStore;const I=t(null);function L(e){var t;return t=class extends O{},t.type=e,t}function R(t,n,a,o,s,c){typeof t==`string`&&(t=L(t));let l=r(e=>{e?.setProps(n,a,t,o,c)},[n,a,o,c,t]),u=i(I);if(u){let r=u.ownerDocument.nodesByProps.get(n);return r||(r=u.ownerDocument.createElement(t.type),r.setProps(n,a,t,o,c),u.appendChild(r),u.ownerDocument.updateCollection(),u.ownerDocument.nodesByProps.set(n,r)),s?e.createElement(I.Provider,{value:r},s):null}return e.createElement(t.type,{ref:l},s)}function z(t,r){let a=({node:e})=>r(e.props,e.props.ref,e),o=n((n,o)=>{let s=i(m);if(!i(F)){if(r.length>=3)throw Error(r.name+` cannot be rendered outside a collection.`);return r(n,o)}return R(t,n,o,`children`in n?n.children:null,null,t=>e.createElement(m.Provider,{value:s},e.createElement(a,{node:t})))});return o.displayName=r.name,o}const B=t({}),V=t(null),H=t({}),U=t({isSelected:!1}),W=t(null),G=z(M,function(t,n,r){let o=p(n),s=i(W),{dragAndDropHooks:l,dragState:u,dropState:d}=i(H),{optionProps:f,labelProps:m,descriptionProps:v,...b}=y({key:r.key,"aria-label":t?.[`aria-label`]},s,o),{hoverProps:w,isHovered:T}=_({isDisabled:!b.allowsSelection&&!b.hasAction,onHoverStart:r.props.onHoverStart,onHoverChange:r.props.onHoverChange,onHoverEnd:r.props.onHoverEnd}),{focusProps:E}=g(t),O=null;u&&l&&(O=l.useDraggableItem({key:r.key,hasAction:b.hasAction},u));let k=null;d&&l&&(k=l.useDroppableItem({target:{type:`item`,key:r.key,dropPosition:`on`}},d,o));let A=u&&u.isDragging(r.key),j=C({...t,id:void 0,children:t.children,defaultClassName:`react-aria-ListBoxItem`,values:{...b,isHovered:T,selectionMode:s.selectionManager.selectionMode,selectionBehavior:s.selectionManager.selectionBehavior,allowsDragging:!!u,isDragging:A,isDropTarget:k?.isDropTarget}});a(()=>{r.textValue},[r.textValue]);let M=t.href?D.a:D.div,N=c(t,{global:!0});return delete N.id,delete N.onClick,t.href&&f.tabIndex==null&&(f.tabIndex=-1),e.createElement(M,{...h(N,j,f,w,E,O?.dragProps,k?.dropProps),ref:o,"data-allows-dragging":!!u||void 0,"data-selected":b.isSelected||void 0,"data-disabled":b.isDisabled||void 0,"data-hovered":T||void 0,"data-focused":b.isFocused||void 0,"data-focus-visible":b.isFocusVisible||void 0,"data-pressed":b.isPressed||void 0,"data-dragging":A||void 0,"data-drop-target":k?.isDropTarget||void 0,"data-selection-mode":s.selectionManager.selectionMode===`none`?void 0:s.selectionManager.selectionMode},e.createElement(S,{values:[[B,{slots:{[x]:m,label:m,description:v}}],[U,{isSelected:b.isSelected}]]},j.children))});z(j,function(t,n,r){let a=i(W),{isLoading:u,onLoadMore:d,scrollOffset:p,...m}=t,g=s(null),_=o(()=>({onLoadMore:d,collection:a?.collection,sentinelRef:g,scrollOffset:p}),[d,p,a?.collection]);f(_,g);let v=C({...m,id:void 0,children:r.rendered,defaultClassName:`react-aria-ListBoxLoadingIndicator`,values:void 0});return e.createElement(e.Fragment,null,e.createElement(`div`,{style:{position:`relative`,width:0,height:0},inert:l(!0)},e.createElement(`div`,{"data-testid":`loadMoreSentinel`,ref:g,style:{position:`absolute`,height:1,width:1}})),u&&v.children&&e.createElement(D.div,{...h(c(t,{global:!0}),{tabIndex:-1}),...v,role:`option`,ref:n},v.children))});const K=t(null),q=n(function(t,n){let r=t.color||`#0000`,s=o(()=>typeof r==`string`?b(r):r,[r]),{locale:c}=v(),l=i(K);a(()=>{let e=s.toString(`hexa`);return l.set(e,s),()=>{l.delete(e)}},[s,l]);let u=e=>typeof e==`function`?t=>e({...t,color:s}):e;return e.createElement(G,{...t,render:t.render,ref:n,id:s.toString(`hexa`),textValue:s.getColorName(c),className:u(t.className||`react-aria-ColorSwatchPickerItem`),style:u(t.style)},w(u(t.children),t=>e.createElement(V.Provider,{value:{color:s}},t)))});export{q as ColorSwatchPickerItem};
@@ -1,11 +1 @@
1
- import e,{cloneElement as t,createContext as n,forwardRef as r,isValidElement as i,useCallback as a,useContext as o,useMemo as s,useRef as c}from"react";import{filterDOMProps as l,inertValue as u,mergeRefs as d,useLayoutEffect as f,useLoadMoreSentinel as p,useObjectRef as m}from"@react-aria/utils";import{FocusableContext as h}from"@react-aria/interactions";import"react-dom";import{mergeProps as g,useFocusRing as _,useHover as v,useTableColumnHeader as y}from"react-aria";import"react-stately";var b=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),x=(e=>typeof require<`u`?require:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof require<`u`?require:e)[t]}):e)(function(e){if(typeof require<`u`)return require.apply(this,arguments);throw Error('Calling `require` for "'+e+"\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.")});function S({values:t,children:n}){for(let[r,i]of t)n=e.createElement(r.Provider,{value:i},n);return n}function C(e){let{className:t,style:n,children:r,defaultClassName:i,defaultChildren:a,defaultStyle:o,values:c,render:l}=e;return s(()=>{let e,s,u;return e=typeof t==`function`?t({...c,defaultClassName:i}):t,s=typeof n==`function`?n({...c,defaultStyle:o||{}}):n,u=typeof r==`function`?r({...c,defaultChildren:a}):r??a,{className:e??i,style:s||o?{...o,...s}:void 0,children:u??a,"data-rac":``,render:l?e=>l(e,c):void 0}},[t,n,r,i,a,o,c,l])}function w(t,n,r){let{render:i,...a}=n,o=c(null),l=s(()=>d(r,o),[r,o]);f(()=>{},[t,i]);let u={...a,ref:l};return i?i(u,void 0):e.createElement(t,u)}const T={},E=new Proxy({},{get(e,t){if(typeof t!=`string`)return;let n=T[t];return n||(n=r(w.bind(null,t)),T[t]=n),n}});String(Math.round(Math.random()*1e10)),typeof window<`u`&&window.document&&window.document.createElement,e.useId;var D=class{get childNodes(){throw Error(`childNodes is not supported`)}clone(){let e=new this.constructor(this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e[`aria-label`]=this[`aria-label`],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}filter(e,t,n){let r=this.clone();return t.addDescendants(r,e),r}constructor(e){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue=``,this[`aria-label`]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=e}},O=class extends D{filter(e,t,n){let[r,i]=N(e,t,this.firstChildKey,n),a=this.clone();return a.firstChildKey=r,a.lastChildKey=i,a}},k=class extends D{};k.type=`header`;var A=class extends D{};A.type=`loader`;var j=class extends O{filter(e,t,n){if(n(this.textValue,this)){let n=this.clone();return t.addDescendants(n,e),n}return null}};j.type=`item`;var M=class extends O{filter(e,t,n){let r=super.filter(e,t,n);if(r&&r.lastChildKey!==null){let t=e.getItem(r.lastChildKey);if(t&&t.type!==`header`)return r}return null}};M.type=`section`;function N(e,t,n,r){if(n==null)return[null,null];let i=null,a=null,o=e.getItem(n);for(;o!=null;){let n=o.filter(e,t,r);n!=null&&(n.nextKey=null,a&&(n.prevKey=a.key,a.nextKey=n.key),i??=n,t.addNode(n),a=n),o=o.nextKey?e.getItem(o.nextKey):null}if(a&&a.type===`separator`){let e=a.prevKey;t.removeNode(a.key),e?(a=t.getItem(e),a.nextKey=null):a=null}return[i?.key??null,a?.key??null]}function P(e){let{children:n,items:r,idScope:i,addIdAndValue:a,dependencies:o=[]}=e,c=s(()=>new WeakMap,o);return s(()=>{if(r&&typeof n==`function`){let e=[];for(let o of r){let r=c.get(o);if(!r){r=n(o);let e=r.props.id??o.key??o.id;if(e==null)throw Error(`Could not determine key for item`);i!=null&&(e=i+`:`+e),r=t(r,a?{key:e,id:e,value:o}:{key:e}),c.set(o,r)}e.push(r)}return e}if(typeof n!=`function`)return n},[n,r,c,i,a])}
2
- /**
3
- * @license React
4
- * use-sync-external-store-shim.production.js
5
- *
6
- * Copyright (c) Meta Platforms, Inc. and affiliates.
7
- *
8
- * This source code is licensed under the MIT license found in the
9
- * LICENSE file in the root directory of this source tree.
10
- */
11
- var F=b((e=>{var t=x(`react`);function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore}));b(((e,t)=>{t.exports=F()}))();const I=n(!1);typeof e.useSyncExternalStore==`function`&&e.useSyncExternalStore;const L=n(null);function ee(e){var t;return t=class extends D{},t.type=e,t}function te(t,n,r,i,s,c){typeof t==`string`&&(t=ee(t));let l=a(e=>{e?.setProps(n,r,t,i,c)},[n,r,i,c,t]),u=o(L);if(u){let a=u.ownerDocument.nodesByProps.get(n);return a||(a=u.ownerDocument.createElement(t.type),a.setProps(n,r,t,i,c),u.appendChild(a),u.ownerDocument.updateCollection(),u.ownerDocument.nodesByProps.set(n,a)),s?e.createElement(L.Provider,{value:a},s):null}return e.createElement(t.type,{ref:l},s)}function R(t,n){let i=({node:e})=>n(e.props,e.props.ref,e),a=r((r,a)=>{let s=o(h);if(!o(I)){if(n.length>=3)throw Error(n.name+` cannot be rendered outside a collection.`);return n(r,a)}return te(t,r,a,`children`in r?r.children:null,null,t=>e.createElement(h.Provider,{value:s},e.createElement(i,{node:t})))});return a.displayName=n.name,a}const z={CollectionRoot({collection:e,renderDropIndicator:t}){return B(e,null,t)},CollectionBranch({collection:e,parent:t,renderDropIndicator:n}){return B(e,t,n)}};function B(t,n,r){return P({items:n?t.getChildren(n.key):t,dependencies:[r],children(n){let i=n.render(n);return!r||n.type!==`item`?i:e.createElement(e.Fragment,null,r({type:`item`,key:n.key,dropPosition:`before`}),i,V(t,n,r))}})}function V(e,n,r){let a=n.key,o=e.getKeyAfter(a),s=o==null?null:e.getItem(o);for(;s!=null&&s.type!==`item`;)o=e.getKeyAfter(s.key),s=o==null?null:e.getItem(o);let c=n.nextKey==null?null:e.getItem(n.nextKey);for(;c!=null&&c.type!==`item`;)c=c.nextKey==null?null:e.getItem(c.nextKey);let l=[];if(c==null){let a=n;for(;a?.type===`item`&&(!s||a.parentKey!==s.parentKey&&s.level<a.level);){let n=r({type:`item`,key:a.key,dropPosition:`after`});i(n)&&l.push(t(n,{key:`${a.key}-after`})),a=a.parentKey==null?null:e.getItem(a.parentKey)}}return l}const H=n(z),U=n(null),W=n(null);var G=class extends D{};G.type=`tableheader`;var K=class extends D{};K.type=`column`;let q=r(function(t,n){let{isVirtualized:r}=o(H);return r?e.createElement(E.div,{...t,ref:n}):e.createElement(E.th,{...t,ref:n})});const J=R(K,(t,n,r)=>{let i=m(n),a=o(U),{isVirtualized:s}=o(H),{columnHeaderProps:c,isPressed:u}=y({node:r,isVirtualized:s},a,i),{isFocused:d,isFocusVisible:f,focusProps:p}=_(),h=o(W),b=!1;h&&(b=h.resizingColumn===r.key);let{hoverProps:x,isHovered:w}=v({isDisabled:!t.allowsSorting}),T=C({...t,id:void 0,children:r.rendered,defaultClassName:`react-aria-Column`,values:{isHovered:w,isPressed:u,isFocused:d,isFocusVisible:f,allowsSorting:r.props.allowsSorting,sortDirection:a.sortDescriptor?.column===r.key?a.sortDescriptor.direction:void 0,isResizing:b,startResize:()=>{if(h)h.startResize(r.key),a.setKeyboardNavigationDisabled(!0);else throw Error(`Wrap your <Table> in a <ResizableTableContainer> to enable column resizing`)},sort:e=>{a.sort(r.key,e)}}}),E=T.style;h&&(E={...E,width:h.getColumnWidth(r.key)});let D=l(t,{global:!0});return delete D.id,e.createElement(q,{...g(D,c,p,x),...T,style:E,ref:i,"data-hovered":w||void 0,"data-pressed":u||void 0,"data-focused":d||void 0,"data-focus-visible":f||void 0,"data-resizing":b||void 0,"data-allows-sorting":r.props.allowsSorting||void 0,"data-sort-direction":a.sortDescriptor?.column===r.key?a.sortDescriptor.direction:void 0},e.createElement(S,{values:[[Y,{column:r,triggerRef:i}],[H,z]]},T.children))}),Y=n(null);var X=class extends O{};X.type=`tablebody`;var Z=class extends D{filter(e,t,n){let r=e.getChildren(this.key);for(let i of r)if(n(i.textValue,i)){let n=this.clone();return t.addDescendants(n,e),n}return null}};Z.type=`item`;let Q=r(function(t,n){let{isVirtualized:r}=o(H);return r?e.createElement(E.div,{...t,ref:n}):e.createElement(E.tr,{...t,ref:n})});var ne=class extends D{};ne.type=`cell`;let $=r(function(t,n){let{isVirtualized:r}=o(H);return r?e.createElement(E.div,{...t,ref:n}):e.createElement(E.td,{...t,ref:n})});R(A,function(t,n,r){let i=o(U),{isVirtualized:a}=o(H),{isLoading:d,onLoadMore:f,scrollOffset:m,...h}=t,_=i.collection.columns.length,v=c(null),y=s(()=>({onLoadMore:f,collection:i?.collection,sentinelRef:v,scrollOffset:m}),[f,m,i?.collection]);p(y,v);let b=C({...h,id:void 0,children:r.rendered,defaultClassName:`react-aria-TableLoadingIndicator`,values:void 0}),x={},S={},w={};return a?(S[`aria-colspan`]=_,w={display:`contents`}):S.colSpan=_,e.createElement(e.Fragment,null,e.createElement(Q,{style:{height:0},inert:u(!0)},e.createElement($,{style:{padding:0,border:0}},e.createElement(`div`,{"data-testid":`loadMoreSentinel`,ref:v,style:{position:`relative`,height:1,width:1}}))),d&&b.children&&e.createElement(Q,{...g(l(t,{global:!0}),x),...b,role:`row`,ref:n},e.createElement($,{role:`rowheader`,...S,style:w},b.children)))});export{J as Column};
1
+ import e,{cloneElement as t,createContext as n,forwardRef as r,isValidElement as i,useCallback as a,useContext as o,useMemo as s,useRef as c}from"react";import{filterDOMProps as l,inertValue as u,mergeRefs as d,useLayoutEffect as f,useLoadMoreSentinel as p,useObjectRef as m}from"@react-aria/utils";import{FocusableContext as h}from"@react-aria/interactions";import"react-dom";import{mergeProps as g,useFocusRing as _,useHover as v,useTableColumnHeader as y}from"react-aria";import"react-stately";function b({values:t,children:n}){for(let[r,i]of t)n=e.createElement(r.Provider,{value:i},n);return n}function x(e){let{className:t,style:n,children:r,defaultClassName:i,defaultChildren:a,defaultStyle:o,values:c,render:l}=e;return s(()=>{let e,s,u;return e=typeof t==`function`?t({...c,defaultClassName:i}):t,s=typeof n==`function`?n({...c,defaultStyle:o||{}}):n,u=typeof r==`function`?r({...c,defaultChildren:a}):r??a,{className:e??i,style:s||o?{...o,...s}:void 0,children:u??a,"data-rac":``,render:l?e=>l(e,c):void 0}},[t,n,r,i,a,o,c,l])}function S(t,n,r){let{render:i,...a}=n,o=c(null),l=s(()=>d(r,o),[r,o]);f(()=>{},[t,i]);let u={...a,ref:l};return i?i(u,void 0):e.createElement(t,u)}const C={},w=new Proxy({},{get(e,t){if(typeof t!=`string`)return;let n=C[t];return n||(n=r(S.bind(null,t)),C[t]=n),n}});String(Math.round(Math.random()*1e10)),typeof window<`u`&&window.document&&window.document.createElement,e.useId;var T=class{get childNodes(){throw Error(`childNodes is not supported`)}clone(){let e=new this.constructor(this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e[`aria-label`]=this[`aria-label`],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}filter(e,t,n){let r=this.clone();return t.addDescendants(r,e),r}constructor(e){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue=``,this[`aria-label`]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=e}},E=class extends T{filter(e,t,n){let[r,i]=j(e,t,this.firstChildKey,n),a=this.clone();return a.firstChildKey=r,a.lastChildKey=i,a}},D=class extends T{};D.type=`header`;var O=class extends T{};O.type=`loader`;var k=class extends E{filter(e,t,n){if(n(this.textValue,this)){let n=this.clone();return t.addDescendants(n,e),n}return null}};k.type=`item`;var A=class extends E{filter(e,t,n){let r=super.filter(e,t,n);if(r&&r.lastChildKey!==null){let t=e.getItem(r.lastChildKey);if(t&&t.type!==`header`)return r}return null}};A.type=`section`;function j(e,t,n,r){if(n==null)return[null,null];let i=null,a=null,o=e.getItem(n);for(;o!=null;){let n=o.filter(e,t,r);n!=null&&(n.nextKey=null,a&&(n.prevKey=a.key,a.nextKey=n.key),i??=n,t.addNode(n),a=n),o=o.nextKey?e.getItem(o.nextKey):null}if(a&&a.type===`separator`){let e=a.prevKey;t.removeNode(a.key),e?(a=t.getItem(e),a.nextKey=null):a=null}return[i?.key??null,a?.key??null]}function M(e){let{children:n,items:r,idScope:i,addIdAndValue:a,dependencies:o=[]}=e,c=s(()=>new WeakMap,o);return s(()=>{if(r&&typeof n==`function`){let e=[];for(let o of r){let r=c.get(o);if(!r){r=n(o);let e=r.props.id??o.key??o.id;if(e==null)throw Error(`Could not determine key for item`);i!=null&&(e=i+`:`+e),r=t(r,a?{key:e,id:e,value:o}:{key:e}),c.set(o,r)}e.push(r)}return e}if(typeof n!=`function`)return n},[n,r,c,i,a])}const N=n(!1);typeof e.useSyncExternalStore==`function`&&e.useSyncExternalStore;const P=n(null);function F(e){var t;return t=class extends T{},t.type=e,t}function I(t,n,r,i,s,c){typeof t==`string`&&(t=F(t));let l=a(e=>{e?.setProps(n,r,t,i,c)},[n,r,i,c,t]),u=o(P);if(u){let a=u.ownerDocument.nodesByProps.get(n);return a||(a=u.ownerDocument.createElement(t.type),a.setProps(n,r,t,i,c),u.appendChild(a),u.ownerDocument.updateCollection(),u.ownerDocument.nodesByProps.set(n,a)),s?e.createElement(P.Provider,{value:a},s):null}return e.createElement(t.type,{ref:l},s)}function L(t,n){let i=({node:e})=>n(e.props,e.props.ref,e),a=r((r,a)=>{let s=o(h);if(!o(N)){if(n.length>=3)throw Error(n.name+` cannot be rendered outside a collection.`);return n(r,a)}return I(t,r,a,`children`in r?r.children:null,null,t=>e.createElement(h.Provider,{value:s},e.createElement(i,{node:t})))});return a.displayName=n.name,a}const R={CollectionRoot({collection:e,renderDropIndicator:t}){return z(e,null,t)},CollectionBranch({collection:e,parent:t,renderDropIndicator:n}){return z(e,t,n)}};function z(t,n,r){return M({items:n?t.getChildren(n.key):t,dependencies:[r],children(n){let i=n.render(n);return!r||n.type!==`item`?i:e.createElement(e.Fragment,null,r({type:`item`,key:n.key,dropPosition:`before`}),i,B(t,n,r))}})}function B(e,n,r){let a=n.key,o=e.getKeyAfter(a),s=o==null?null:e.getItem(o);for(;s!=null&&s.type!==`item`;)o=e.getKeyAfter(s.key),s=o==null?null:e.getItem(o);let c=n.nextKey==null?null:e.getItem(n.nextKey);for(;c!=null&&c.type!==`item`;)c=c.nextKey==null?null:e.getItem(c.nextKey);let l=[];if(c==null){let a=n;for(;a?.type===`item`&&(!s||a.parentKey!==s.parentKey&&s.level<a.level);){let n=r({type:`item`,key:a.key,dropPosition:`after`});i(n)&&l.push(t(n,{key:`${a.key}-after`})),a=a.parentKey==null?null:e.getItem(a.parentKey)}}return l}const V=n(R),H=n(null),U=n(null);var W=class extends T{};W.type=`tableheader`;var G=class extends T{};G.type=`column`;let K=r(function(t,n){let{isVirtualized:r}=o(V);return r?e.createElement(w.div,{...t,ref:n}):e.createElement(w.th,{...t,ref:n})});const q=L(G,(t,n,r)=>{let i=m(n),a=o(H),{isVirtualized:s}=o(V),{columnHeaderProps:c,isPressed:u}=y({node:r,isVirtualized:s},a,i),{isFocused:d,isFocusVisible:f,focusProps:p}=_(),h=o(U),S=!1;h&&(S=h.resizingColumn===r.key);let{hoverProps:C,isHovered:w}=v({isDisabled:!t.allowsSorting}),T=x({...t,id:void 0,children:r.rendered,defaultClassName:`react-aria-Column`,values:{isHovered:w,isPressed:u,isFocused:d,isFocusVisible:f,allowsSorting:r.props.allowsSorting,sortDirection:a.sortDescriptor?.column===r.key?a.sortDescriptor.direction:void 0,isResizing:S,startResize:()=>{if(h)h.startResize(r.key),a.setKeyboardNavigationDisabled(!0);else throw Error(`Wrap your <Table> in a <ResizableTableContainer> to enable column resizing`)},sort:e=>{a.sort(r.key,e)}}}),E=T.style;h&&(E={...E,width:h.getColumnWidth(r.key)});let D=l(t,{global:!0});return delete D.id,e.createElement(K,{...g(D,c,p,C),...T,style:E,ref:i,"data-hovered":w||void 0,"data-pressed":u||void 0,"data-focused":d||void 0,"data-focus-visible":f||void 0,"data-resizing":S||void 0,"data-allows-sorting":r.props.allowsSorting||void 0,"data-sort-direction":a.sortDescriptor?.column===r.key?a.sortDescriptor.direction:void 0},e.createElement(b,{values:[[J,{column:r,triggerRef:i}],[V,R]]},T.children))}),J=n(null);var Y=class extends E{};Y.type=`tablebody`;var X=class extends T{filter(e,t,n){let r=e.getChildren(this.key);for(let i of r)if(n(i.textValue,i)){let n=this.clone();return t.addDescendants(n,e),n}return null}};X.type=`item`;let Z=r(function(t,n){let{isVirtualized:r}=o(V);return r?e.createElement(w.div,{...t,ref:n}):e.createElement(w.tr,{...t,ref:n})});var Q=class extends T{};Q.type=`cell`;let $=r(function(t,n){let{isVirtualized:r}=o(V);return r?e.createElement(w.div,{...t,ref:n}):e.createElement(w.td,{...t,ref:n})});L(O,function(t,n,r){let i=o(H),{isVirtualized:a}=o(V),{isLoading:d,onLoadMore:f,scrollOffset:m,...h}=t,_=i.collection.columns.length,v=c(null),y=s(()=>({onLoadMore:f,collection:i?.collection,sentinelRef:v,scrollOffset:m}),[f,m,i?.collection]);p(y,v);let b=x({...h,id:void 0,children:r.rendered,defaultClassName:`react-aria-TableLoadingIndicator`,values:void 0}),S={},C={},w={};return a?(C[`aria-colspan`]=_,w={display:`contents`}):C.colSpan=_,e.createElement(e.Fragment,null,e.createElement(Z,{style:{height:0},inert:u(!0)},e.createElement($,{style:{padding:0,border:0}},e.createElement(`div`,{"data-testid":`loadMoreSentinel`,ref:v,style:{position:`relative`,height:1,width:1}}))),d&&b.children&&e.createElement(Z,{...g(l(t,{global:!0}),S),...b,role:`row`,ref:n},e.createElement($,{role:`rowheader`,...C,style:w},b.children)))});export{q as Column};
@@ -1,11 +1 @@
1
- import e,{cloneElement as t,createContext as n,forwardRef as r,isValidElement as i,useCallback as a,useContext as o,useEffect as s,useMemo as c,useRef as l,useState as u}from"react";import{filterDOMProps as d,inertValue as f,mergeRefs as p,useLayoutEffect as m,useLoadMoreSentinel as h,useObjectRef as g}from"@react-aria/utils";import{FocusableContext as _}from"@react-aria/interactions";import v from"react-dom";import{mergeProps as y,useFocusRing as b,useHover as ee,useLocale as x,useLocalizedStringFormatter as S,useTableColumnResize as te}from"react-aria";import"react-stately";var C=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),w=(e=>typeof require<`u`?require:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof require<`u`?require:e)[t]}):e)(function(e){if(typeof require<`u`)return require.apply(this,arguments);throw Error('Calling `require` for "'+e+"\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.")});function T(e){let{className:t,style:n,children:r,defaultClassName:i,defaultChildren:a,defaultStyle:o,values:s,render:l}=e;return c(()=>{let e,c,u;return e=typeof t==`function`?t({...s,defaultClassName:i}):t,c=typeof n==`function`?n({...s,defaultStyle:o||{}}):n,u=typeof r==`function`?r({...s,defaultChildren:a}):r??a,{className:e??i,style:c||o?{...o,...c}:void 0,children:u??a,"data-rac":``,render:l?e=>l(e,s):void 0}},[t,n,r,i,a,o,s,l])}function E(t,n,r){let{render:i,...a}=n,o=l(null),s=c(()=>p(r,o),[r,o]);m(()=>{},[t,i]);let u={...a,ref:s};return i?i(u,void 0):e.createElement(t,u)}const D={},O=new Proxy({},{get(e,t){if(typeof t!=`string`)return;let n=D[t];return n||(n=r(E.bind(null,t)),D[t]=n),n}});String(Math.round(Math.random()*1e10)),typeof window<`u`&&window.document&&window.document.createElement,e.useId;var k=class{get childNodes(){throw Error(`childNodes is not supported`)}clone(){let e=new this.constructor(this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e[`aria-label`]=this[`aria-label`],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}filter(e,t,n){let r=this.clone();return t.addDescendants(r,e),r}constructor(e){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue=``,this[`aria-label`]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=e}},A=class extends k{filter(e,t,n){let[r,i]=F(e,t,this.firstChildKey,n),a=this.clone();return a.firstChildKey=r,a.lastChildKey=i,a}},j=class extends k{};j.type=`header`;var M=class extends k{};M.type=`loader`;var N=class extends A{filter(e,t,n){if(n(this.textValue,this)){let n=this.clone();return t.addDescendants(n,e),n}return null}};N.type=`item`;var P=class extends A{filter(e,t,n){let r=super.filter(e,t,n);if(r&&r.lastChildKey!==null){let t=e.getItem(r.lastChildKey);if(t&&t.type!==`header`)return r}return null}};P.type=`section`;function F(e,t,n,r){if(n==null)return[null,null];let i=null,a=null,o=e.getItem(n);for(;o!=null;){let n=o.filter(e,t,r);n!=null&&(n.nextKey=null,a&&(n.prevKey=a.key,a.nextKey=n.key),i??=n,t.addNode(n),a=n),o=o.nextKey?e.getItem(o.nextKey):null}if(a&&a.type===`separator`){let e=a.prevKey;t.removeNode(a.key),e?(a=t.getItem(e),a.nextKey=null):a=null}return[i?.key??null,a?.key??null]}function I(e){let{children:n,items:r,idScope:i,addIdAndValue:a,dependencies:o=[]}=e,s=c(()=>new WeakMap,o);return c(()=>{if(r&&typeof n==`function`){let e=[];for(let o of r){let r=s.get(o);if(!r){r=n(o);let e=r.props.id??o.key??o.id;if(e==null)throw Error(`Could not determine key for item`);i!=null&&(e=i+`:`+e),r=t(r,a?{key:e,id:e,value:o}:{key:e}),s.set(o,r)}e.push(r)}return e}if(typeof n!=`function`)return n},[n,r,s,i,a])}
2
- /**
3
- * @license React
4
- * use-sync-external-store-shim.production.js
5
- *
6
- * Copyright (c) Meta Platforms, Inc. and affiliates.
7
- *
8
- * This source code is licensed under the MIT license found in the
9
- * LICENSE file in the root directory of this source tree.
10
- */
11
- var L=C((e=>{var t=w(`react`);function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore}));C(((e,t)=>{t.exports=L()}))();const R=n(!1);typeof e.useSyncExternalStore==`function`&&e.useSyncExternalStore;const z=n(null);function B(e){var t;return t=class extends k{},t.type=e,t}function V(t,n,r,i,s,c){typeof t==`string`&&(t=B(t));let l=a(e=>{e?.setProps(n,r,t,i,c)},[n,r,i,c,t]),u=o(z);if(u){let a=u.ownerDocument.nodesByProps.get(n);return a||(a=u.ownerDocument.createElement(t.type),a.setProps(n,r,t,i,c),u.appendChild(a),u.ownerDocument.updateCollection(),u.ownerDocument.nodesByProps.set(n,a)),s?e.createElement(z.Provider,{value:a},s):null}return e.createElement(t.type,{ref:l},s)}function H(t,n){let i=({node:e})=>n(e.props,e.props.ref,e),a=r((r,a)=>{let s=o(_);if(!o(R)){if(n.length>=3)throw Error(n.name+` cannot be rendered outside a collection.`);return n(r,a)}return V(t,r,a,`children`in r?r.children:null,null,t=>e.createElement(_.Provider,{value:s},e.createElement(i,{node:t})))});return a.displayName=n.name,a}const U={CollectionRoot({collection:e,renderDropIndicator:t}){return W(e,null,t)},CollectionBranch({collection:e,parent:t,renderDropIndicator:n}){return W(e,t,n)}};function W(t,n,r){return I({items:n?t.getChildren(n.key):t,dependencies:[r],children(n){let i=n.render(n);return!r||n.type!==`item`?i:e.createElement(e.Fragment,null,r({type:`item`,key:n.key,dropPosition:`before`}),i,ne(t,n,r))}})}function ne(e,n,r){let a=n.key,o=e.getKeyAfter(a),s=o==null?null:e.getItem(o);for(;s!=null&&s.type!==`item`;)o=e.getKeyAfter(s.key),s=o==null?null:e.getItem(o);let c=n.nextKey==null?null:e.getItem(n.nextKey);for(;c!=null&&c.type!==`item`;)c=c.nextKey==null?null:e.getItem(c.nextKey);let l=[];if(c==null){let a=n;for(;a?.type===`item`&&(!s||a.parentKey!==s.parentKey&&s.level<a.level);){let n=r({type:`item`,key:a.key,dropPosition:`after`});i(n)&&l.push(t(n,{key:`${a.key}-after`})),a=a.parentKey==null?null:e.getItem(a.parentKey)}}return l}const G=n(U);var K={};K={colorSwatchPicker:`تغييرات الألوان`,dropzoneLabel:`DropZone`,selectPlaceholder:`حدد عنصرًا`,tableResizer:`أداة تغيير الحجم`};var q={};q={colorSwatchPicker:`Цветови мостри`,dropzoneLabel:`DropZone`,selectPlaceholder:`Изберете предмет`,tableResizer:`Преоразмерител`};var J={};J={colorSwatchPicker:`Vzorky barev`,dropzoneLabel:`Místo pro přetažení`,selectPlaceholder:`Vyberte položku`,tableResizer:`Změna velikosti`};var Y={};Y={colorSwatchPicker:`Farveprøver`,dropzoneLabel:`DropZone`,selectPlaceholder:`Vælg et element`,tableResizer:`Størrelsesændring`};var X={};X={colorSwatchPicker:`Farbfelder`,dropzoneLabel:`Ablegebereich`,selectPlaceholder:`Element wählen`,tableResizer:`Größenanpassung`};var Z={};Z={colorSwatchPicker:`Χρωματικά δείγματα`,dropzoneLabel:`DropZone`,selectPlaceholder:`Επιλέξτε ένα αντικείμενο`,tableResizer:`Αλλαγή μεγέθους`};var Q={};Q={selectPlaceholder:`Select an item`,tableResizer:`Resizer`,dropzoneLabel:`DropZone`,colorSwatchPicker:`Color swatches`};var $={};$={colorSwatchPicker:`Muestras de colores`,dropzoneLabel:`DropZone`,selectPlaceholder:`Seleccionar un artículo`,tableResizer:`Cambiador de tamaño`};var re={};re={colorSwatchPicker:`Värvinäidised`,dropzoneLabel:`DropZone`,selectPlaceholder:`Valige üksus`,tableResizer:`Suuruse muutja`};var ie={};ie={colorSwatchPicker:`Värimallit`,dropzoneLabel:`DropZone`,selectPlaceholder:`Valitse kohde`,tableResizer:`Koon muuttaja`};var ae={};ae={colorSwatchPicker:`Échantillons de couleurs`,dropzoneLabel:`DropZone`,selectPlaceholder:`Sélectionner un élément`,tableResizer:`Redimensionneur`};var oe={};oe={colorSwatchPicker:`דוגמיות צבע`,dropzoneLabel:`DropZone`,selectPlaceholder:`בחר פריט`,tableResizer:`שינוי גודל`};var se={};se={colorSwatchPicker:`Uzorci boja`,dropzoneLabel:`Zona spuštanja`,selectPlaceholder:`Odaberite stavku`,tableResizer:`Promjena veličine`};var ce={};ce={colorSwatchPicker:`Színtárak`,dropzoneLabel:`DropZone`,selectPlaceholder:`Válasszon ki egy elemet`,tableResizer:`Átméretező`};var le={};le={colorSwatchPicker:`Campioni di colore`,dropzoneLabel:`Zona di rilascio`,selectPlaceholder:`Seleziona un elemento`,tableResizer:`Ridimensionamento`};var ue={};ue={colorSwatchPicker:`カラースウォッチ`,dropzoneLabel:`ドロップゾーン`,selectPlaceholder:`項目を選択`,tableResizer:`サイズ変更ツール`};var de={};de={colorSwatchPicker:`색상 견본`,dropzoneLabel:`드롭 영역`,selectPlaceholder:`항목 선택`,tableResizer:`크기 조정기`};var fe={};fe={colorSwatchPicker:`Spalvų pavyzdžiai`,dropzoneLabel:`„DropZone“`,selectPlaceholder:`Pasirinkite elementą`,tableResizer:`Dydžio keitiklis`};var pe={};pe={colorSwatchPicker:`Krāsu paraugi`,dropzoneLabel:`DropZone`,selectPlaceholder:`Izvēlēties vienumu`,tableResizer:`Izmēra mainītājs`};var me={};me={colorSwatchPicker:`Fargekart`,dropzoneLabel:`Droppsone`,selectPlaceholder:`Velg et element`,tableResizer:`Størrelsesendrer`};var he={};he={colorSwatchPicker:`kleurstalen`,dropzoneLabel:`DropZone`,selectPlaceholder:`Selecteer een item`,tableResizer:`Resizer`};var ge={};ge={colorSwatchPicker:`Próbki kolorów`,dropzoneLabel:`Strefa upuszczania`,selectPlaceholder:`Wybierz element`,tableResizer:`Zmiana rozmiaru`};var _e={};_e={colorSwatchPicker:`Amostras de cores`,dropzoneLabel:`DropZone`,selectPlaceholder:`Selecione um item`,tableResizer:`Redimensionador`};var ve={};ve={colorSwatchPicker:`Amostras de cores`,dropzoneLabel:`DropZone`,selectPlaceholder:`Selecione um item`,tableResizer:`Redimensionador`};var ye={};ye={colorSwatchPicker:`Specimene de culoare`,dropzoneLabel:`Zonă de plasare`,selectPlaceholder:`Selectați un element`,tableResizer:`Instrument de redimensionare`};var be={};be={colorSwatchPicker:`Цветовые образцы`,dropzoneLabel:`DropZone`,selectPlaceholder:`Выберите элемент`,tableResizer:`Средство изменения размера`};var xe={};xe={colorSwatchPicker:`Vzorkovníky farieb`,dropzoneLabel:`DropZone`,selectPlaceholder:`Vyberte položku`,tableResizer:`Nástroj na zmenu veľkosti`};var Se={};Se={colorSwatchPicker:`Barvne palete`,dropzoneLabel:`DropZone`,selectPlaceholder:`Izberite element`,tableResizer:`Spreminjanje velikosti`};var Ce={};Ce={colorSwatchPicker:`Uzorci boje`,dropzoneLabel:`DropZone`,selectPlaceholder:`Izaberite stavku`,tableResizer:`Promena veličine`};var we={};we={colorSwatchPicker:`Färgrutor`,dropzoneLabel:`DropZone`,selectPlaceholder:`Välj en artikel`,tableResizer:`Storleksändrare`};var Te={};Te={colorSwatchPicker:`Renk örnekleri`,dropzoneLabel:`Bırakma Bölgesi`,selectPlaceholder:`Bir öğe seçin`,tableResizer:`Yeniden boyutlandırıcı`};var Ee={};Ee={colorSwatchPicker:`Зразки кольорів`,dropzoneLabel:`DropZone`,selectPlaceholder:`Виберіть елемент`,tableResizer:`Засіб змінення розміру`};var De={};De={colorSwatchPicker:`颜色色板`,dropzoneLabel:`放置区域`,selectPlaceholder:`选择一个项目`,tableResizer:`尺寸调整器`};var Oe={};Oe={colorSwatchPicker:`色票`,dropzoneLabel:`放置區`,selectPlaceholder:`選取項目`,tableResizer:`大小調整器`};var ke={};ke={"ar-AE":K,"bg-BG":q,"cs-CZ":J,"da-DK":Y,"de-DE":X,"el-GR":Z,"en-US":Q,"es-ES":$,"et-EE":re,"fi-FI":ie,"fr-FR":ae,"he-IL":oe,"hr-HR":se,"hu-HU":ce,"it-IT":le,"ja-JP":ue,"ko-KR":de,"lt-LT":fe,"lv-LV":pe,"nb-NO":me,"nl-NL":he,"pl-PL":ge,"pt-BR":_e,"pt-PT":ve,"ro-RO":ye,"ru-RU":be,"sk-SK":xe,"sl-SI":Se,"sr-SP":Ce,"sv-SE":we,"tr-TR":Te,"uk-UA":Ee,"zh-CN":De,"zh-TW":Oe};function Ae(e){return e&&e.__esModule?e.default:e}const je=n(null),Me=n(null),Ne=n(null);var Pe=class extends k{};Pe.type=`tableheader`;var Fe=class extends k{};Fe.type=`column`;const Ie=n(null),Le=r(function(t,n){let r=o(Ne);if(!r)throw Error(`Wrap your <Table> in a <ResizableTableContainer> to enable column resizing`);let i=S(Ae(ke),`react-aria-components`),{onResizeStart:a,onResize:c,onResizeEnd:f}=o(je),{column:p,triggerRef:m}=o(Ie),h=l(null),{resizerProps:_,inputProps:C,isResizing:w}=te({column:p,"aria-label":t[`aria-label`]||i.format(`tableResizer`),onResizeStart:a,onResize:c,onResizeEnd:f,triggerRef:m},r,h),{focusProps:E,isFocused:D,isFocusVisible:k}=b(),{hoverProps:A,isHovered:j}=ee(t),M=r.getColumnMinWidth(p.key)>=r.getColumnWidth(p.key),N=r.getColumnMaxWidth(p.key)<=r.getColumnWidth(p.key),{direction:P}=x(),F=`both`;F=M?P===`rtl`?`right`:`left`:N?P===`rtl`?`left`:`right`:`both`;let I=g(n),[L,R]=u(``);s(()=>{if(!I.current)return;let e=window.getComputedStyle(I.current);R(e.cursor)},[I,F]);let z=T({...t,defaultClassName:`react-aria-ColumnResizer`,values:{isFocused:D,isFocusVisible:k,isResizing:w,isHovered:j,resizableDirection:F}}),[B,V]=u(!1),H=e=>{e.pointerType===`mouse`&&V(!0)};!w&&B&&V(!1);let U=d(t,{global:!0});return e.createElement(O.div,{ref:I,role:`presentation`,...y(U,z,_,{onPointerDown:H},A),"data-hovered":j||void 0,"data-focused":D||void 0,"data-focus-visible":k||void 0,"data-resizing":w||void 0,"data-resizable-direction":F},z.children,e.createElement(`input`,{ref:h,...y(C,E)}),w&&B&&v.createPortal(e.createElement(`div`,{style:{position:`fixed`,top:0,left:0,bottom:0,right:0,cursor:L}}),document.body))});var Re=class extends A{};Re.type=`tablebody`;var ze=class extends k{filter(e,t,n){let r=e.getChildren(this.key);for(let i of r)if(n(i.textValue,i)){let n=this.clone();return t.addDescendants(n,e),n}return null}};ze.type=`item`;let Be=r(function(t,n){let{isVirtualized:r}=o(G);return r?e.createElement(O.div,{...t,ref:n}):e.createElement(O.tr,{...t,ref:n})});var Ve=class extends k{};Ve.type=`cell`;let He=r(function(t,n){let{isVirtualized:r}=o(G);return r?e.createElement(O.div,{...t,ref:n}):e.createElement(O.td,{...t,ref:n})});H(M,function(t,n,r){let i=o(Me),{isVirtualized:a}=o(G),{isLoading:s,onLoadMore:u,scrollOffset:p,...m}=t,g=i.collection.columns.length,_=l(null),v=c(()=>({onLoadMore:u,collection:i?.collection,sentinelRef:_,scrollOffset:p}),[u,p,i?.collection]);h(v,_);let b=T({...m,id:void 0,children:r.rendered,defaultClassName:`react-aria-TableLoadingIndicator`,values:void 0}),ee={},x={},S={};return a?(x[`aria-colspan`]=g,S={display:`contents`}):x.colSpan=g,e.createElement(e.Fragment,null,e.createElement(Be,{style:{height:0},inert:f(!0)},e.createElement(He,{style:{padding:0,border:0}},e.createElement(`div`,{"data-testid":`loadMoreSentinel`,ref:_,style:{position:`relative`,height:1,width:1}}))),s&&b.children&&e.createElement(Be,{...y(d(t,{global:!0}),ee),...b,role:`row`,ref:n},e.createElement(He,{role:`rowheader`,...x,style:S},b.children)))});export{Le as ColumnResizer};
1
+ import e,{cloneElement as t,createContext as n,forwardRef as r,isValidElement as i,useCallback as a,useContext as o,useEffect as s,useMemo as c,useRef as l,useState as u}from"react";import{filterDOMProps as d,inertValue as f,mergeRefs as p,useLayoutEffect as m,useLoadMoreSentinel as h,useObjectRef as g}from"@react-aria/utils";import{FocusableContext as _}from"@react-aria/interactions";import v from"react-dom";import{mergeProps as y,useFocusRing as b,useHover as x,useLocale as S,useLocalizedStringFormatter as C,useTableColumnResize as ee}from"react-aria";import"react-stately";function w(e){let{className:t,style:n,children:r,defaultClassName:i,defaultChildren:a,defaultStyle:o,values:s,render:l}=e;return c(()=>{let e,c,u;return e=typeof t==`function`?t({...s,defaultClassName:i}):t,c=typeof n==`function`?n({...s,defaultStyle:o||{}}):n,u=typeof r==`function`?r({...s,defaultChildren:a}):r??a,{className:e??i,style:c||o?{...o,...c}:void 0,children:u??a,"data-rac":``,render:l?e=>l(e,s):void 0}},[t,n,r,i,a,o,s,l])}function T(t,n,r){let{render:i,...a}=n,o=l(null),s=c(()=>p(r,o),[r,o]);m(()=>{},[t,i]);let u={...a,ref:s};return i?i(u,void 0):e.createElement(t,u)}const E={},D=new Proxy({},{get(e,t){if(typeof t!=`string`)return;let n=E[t];return n||(n=r(T.bind(null,t)),E[t]=n),n}});String(Math.round(Math.random()*1e10)),typeof window<`u`&&window.document&&window.document.createElement,e.useId;var O=class{get childNodes(){throw Error(`childNodes is not supported`)}clone(){let e=new this.constructor(this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e[`aria-label`]=this[`aria-label`],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}filter(e,t,n){let r=this.clone();return t.addDescendants(r,e),r}constructor(e){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue=``,this[`aria-label`]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=e}},k=class extends O{filter(e,t,n){let[r,i]=te(e,t,this.firstChildKey,n),a=this.clone();return a.firstChildKey=r,a.lastChildKey=i,a}},A=class extends O{};A.type=`header`;var j=class extends O{};j.type=`loader`;var M=class extends k{filter(e,t,n){if(n(this.textValue,this)){let n=this.clone();return t.addDescendants(n,e),n}return null}};M.type=`item`;var N=class extends k{filter(e,t,n){let r=super.filter(e,t,n);if(r&&r.lastChildKey!==null){let t=e.getItem(r.lastChildKey);if(t&&t.type!==`header`)return r}return null}};N.type=`section`;function te(e,t,n,r){if(n==null)return[null,null];let i=null,a=null,o=e.getItem(n);for(;o!=null;){let n=o.filter(e,t,r);n!=null&&(n.nextKey=null,a&&(n.prevKey=a.key,a.nextKey=n.key),i??=n,t.addNode(n),a=n),o=o.nextKey?e.getItem(o.nextKey):null}if(a&&a.type===`separator`){let e=a.prevKey;t.removeNode(a.key),e?(a=t.getItem(e),a.nextKey=null):a=null}return[i?.key??null,a?.key??null]}function P(e){let{children:n,items:r,idScope:i,addIdAndValue:a,dependencies:o=[]}=e,s=c(()=>new WeakMap,o);return c(()=>{if(r&&typeof n==`function`){let e=[];for(let o of r){let r=s.get(o);if(!r){r=n(o);let e=r.props.id??o.key??o.id;if(e==null)throw Error(`Could not determine key for item`);i!=null&&(e=i+`:`+e),r=t(r,a?{key:e,id:e,value:o}:{key:e}),s.set(o,r)}e.push(r)}return e}if(typeof n!=`function`)return n},[n,r,s,i,a])}const F=n(!1);typeof e.useSyncExternalStore==`function`&&e.useSyncExternalStore;const I=n(null);function L(e){var t;return t=class extends O{},t.type=e,t}function R(t,n,r,i,s,c){typeof t==`string`&&(t=L(t));let l=a(e=>{e?.setProps(n,r,t,i,c)},[n,r,i,c,t]),u=o(I);if(u){let a=u.ownerDocument.nodesByProps.get(n);return a||(a=u.ownerDocument.createElement(t.type),a.setProps(n,r,t,i,c),u.appendChild(a),u.ownerDocument.updateCollection(),u.ownerDocument.nodesByProps.set(n,a)),s?e.createElement(I.Provider,{value:a},s):null}return e.createElement(t.type,{ref:l},s)}function z(t,n){let i=({node:e})=>n(e.props,e.props.ref,e),a=r((r,a)=>{let s=o(_);if(!o(F)){if(n.length>=3)throw Error(n.name+` cannot be rendered outside a collection.`);return n(r,a)}return R(t,r,a,`children`in r?r.children:null,null,t=>e.createElement(_.Provider,{value:s},e.createElement(i,{node:t})))});return a.displayName=n.name,a}const B={CollectionRoot({collection:e,renderDropIndicator:t}){return V(e,null,t)},CollectionBranch({collection:e,parent:t,renderDropIndicator:n}){return V(e,t,n)}};function V(t,n,r){return P({items:n?t.getChildren(n.key):t,dependencies:[r],children(n){let i=n.render(n);return!r||n.type!==`item`?i:e.createElement(e.Fragment,null,r({type:`item`,key:n.key,dropPosition:`before`}),i,H(t,n,r))}})}function H(e,n,r){let a=n.key,o=e.getKeyAfter(a),s=o==null?null:e.getItem(o);for(;s!=null&&s.type!==`item`;)o=e.getKeyAfter(s.key),s=o==null?null:e.getItem(o);let c=n.nextKey==null?null:e.getItem(n.nextKey);for(;c!=null&&c.type!==`item`;)c=c.nextKey==null?null:e.getItem(c.nextKey);let l=[];if(c==null){let a=n;for(;a?.type===`item`&&(!s||a.parentKey!==s.parentKey&&s.level<a.level);){let n=r({type:`item`,key:a.key,dropPosition:`after`});i(n)&&l.push(t(n,{key:`${a.key}-after`})),a=a.parentKey==null?null:e.getItem(a.parentKey)}}return l}const U=n(B);var W={};W={colorSwatchPicker:`تغييرات الألوان`,dropzoneLabel:`DropZone`,selectPlaceholder:`حدد عنصرًا`,tableResizer:`أداة تغيير الحجم`};var G={};G={colorSwatchPicker:`Цветови мостри`,dropzoneLabel:`DropZone`,selectPlaceholder:`Изберете предмет`,tableResizer:`Преоразмерител`};var K={};K={colorSwatchPicker:`Vzorky barev`,dropzoneLabel:`Místo pro přetažení`,selectPlaceholder:`Vyberte položku`,tableResizer:`Změna velikosti`};var q={};q={colorSwatchPicker:`Farveprøver`,dropzoneLabel:`DropZone`,selectPlaceholder:`Vælg et element`,tableResizer:`Størrelsesændring`};var J={};J={colorSwatchPicker:`Farbfelder`,dropzoneLabel:`Ablegebereich`,selectPlaceholder:`Element wählen`,tableResizer:`Größenanpassung`};var Y={};Y={colorSwatchPicker:`Χρωματικά δείγματα`,dropzoneLabel:`DropZone`,selectPlaceholder:`Επιλέξτε ένα αντικείμενο`,tableResizer:`Αλλαγή μεγέθους`};var X={};X={selectPlaceholder:`Select an item`,tableResizer:`Resizer`,dropzoneLabel:`DropZone`,colorSwatchPicker:`Color swatches`};var Z={};Z={colorSwatchPicker:`Muestras de colores`,dropzoneLabel:`DropZone`,selectPlaceholder:`Seleccionar un artículo`,tableResizer:`Cambiador de tamaño`};var Q={};Q={colorSwatchPicker:`Värvinäidised`,dropzoneLabel:`DropZone`,selectPlaceholder:`Valige üksus`,tableResizer:`Suuruse muutja`};var $={};$={colorSwatchPicker:`Värimallit`,dropzoneLabel:`DropZone`,selectPlaceholder:`Valitse kohde`,tableResizer:`Koon muuttaja`};var ne={};ne={colorSwatchPicker:`Échantillons de couleurs`,dropzoneLabel:`DropZone`,selectPlaceholder:`Sélectionner un élément`,tableResizer:`Redimensionneur`};var re={};re={colorSwatchPicker:`דוגמיות צבע`,dropzoneLabel:`DropZone`,selectPlaceholder:`בחר פריט`,tableResizer:`שינוי גודל`};var ie={};ie={colorSwatchPicker:`Uzorci boja`,dropzoneLabel:`Zona spuštanja`,selectPlaceholder:`Odaberite stavku`,tableResizer:`Promjena veličine`};var ae={};ae={colorSwatchPicker:`Színtárak`,dropzoneLabel:`DropZone`,selectPlaceholder:`Válasszon ki egy elemet`,tableResizer:`Átméretező`};var oe={};oe={colorSwatchPicker:`Campioni di colore`,dropzoneLabel:`Zona di rilascio`,selectPlaceholder:`Seleziona un elemento`,tableResizer:`Ridimensionamento`};var se={};se={colorSwatchPicker:`カラースウォッチ`,dropzoneLabel:`ドロップゾーン`,selectPlaceholder:`項目を選択`,tableResizer:`サイズ変更ツール`};var ce={};ce={colorSwatchPicker:`색상 견본`,dropzoneLabel:`드롭 영역`,selectPlaceholder:`항목 선택`,tableResizer:`크기 조정기`};var le={};le={colorSwatchPicker:`Spalvų pavyzdžiai`,dropzoneLabel:`„DropZone“`,selectPlaceholder:`Pasirinkite elementą`,tableResizer:`Dydžio keitiklis`};var ue={};ue={colorSwatchPicker:`Krāsu paraugi`,dropzoneLabel:`DropZone`,selectPlaceholder:`Izvēlēties vienumu`,tableResizer:`Izmēra mainītājs`};var de={};de={colorSwatchPicker:`Fargekart`,dropzoneLabel:`Droppsone`,selectPlaceholder:`Velg et element`,tableResizer:`Størrelsesendrer`};var fe={};fe={colorSwatchPicker:`kleurstalen`,dropzoneLabel:`DropZone`,selectPlaceholder:`Selecteer een item`,tableResizer:`Resizer`};var pe={};pe={colorSwatchPicker:`Próbki kolorów`,dropzoneLabel:`Strefa upuszczania`,selectPlaceholder:`Wybierz element`,tableResizer:`Zmiana rozmiaru`};var me={};me={colorSwatchPicker:`Amostras de cores`,dropzoneLabel:`DropZone`,selectPlaceholder:`Selecione um item`,tableResizer:`Redimensionador`};var he={};he={colorSwatchPicker:`Amostras de cores`,dropzoneLabel:`DropZone`,selectPlaceholder:`Selecione um item`,tableResizer:`Redimensionador`};var ge={};ge={colorSwatchPicker:`Specimene de culoare`,dropzoneLabel:`Zonă de plasare`,selectPlaceholder:`Selectați un element`,tableResizer:`Instrument de redimensionare`};var _e={};_e={colorSwatchPicker:`Цветовые образцы`,dropzoneLabel:`DropZone`,selectPlaceholder:`Выберите элемент`,tableResizer:`Средство изменения размера`};var ve={};ve={colorSwatchPicker:`Vzorkovníky farieb`,dropzoneLabel:`DropZone`,selectPlaceholder:`Vyberte položku`,tableResizer:`Nástroj na zmenu veľkosti`};var ye={};ye={colorSwatchPicker:`Barvne palete`,dropzoneLabel:`DropZone`,selectPlaceholder:`Izberite element`,tableResizer:`Spreminjanje velikosti`};var be={};be={colorSwatchPicker:`Uzorci boje`,dropzoneLabel:`DropZone`,selectPlaceholder:`Izaberite stavku`,tableResizer:`Promena veličine`};var xe={};xe={colorSwatchPicker:`Färgrutor`,dropzoneLabel:`DropZone`,selectPlaceholder:`Välj en artikel`,tableResizer:`Storleksändrare`};var Se={};Se={colorSwatchPicker:`Renk örnekleri`,dropzoneLabel:`Bırakma Bölgesi`,selectPlaceholder:`Bir öğe seçin`,tableResizer:`Yeniden boyutlandırıcı`};var Ce={};Ce={colorSwatchPicker:`Зразки кольорів`,dropzoneLabel:`DropZone`,selectPlaceholder:`Виберіть елемент`,tableResizer:`Засіб змінення розміру`};var we={};we={colorSwatchPicker:`颜色色板`,dropzoneLabel:`放置区域`,selectPlaceholder:`选择一个项目`,tableResizer:`尺寸调整器`};var Te={};Te={colorSwatchPicker:`色票`,dropzoneLabel:`放置區`,selectPlaceholder:`選取項目`,tableResizer:`大小調整器`};var Ee={};Ee={"ar-AE":W,"bg-BG":G,"cs-CZ":K,"da-DK":q,"de-DE":J,"el-GR":Y,"en-US":X,"es-ES":Z,"et-EE":Q,"fi-FI":$,"fr-FR":ne,"he-IL":re,"hr-HR":ie,"hu-HU":ae,"it-IT":oe,"ja-JP":se,"ko-KR":ce,"lt-LT":le,"lv-LV":ue,"nb-NO":de,"nl-NL":fe,"pl-PL":pe,"pt-BR":me,"pt-PT":he,"ro-RO":ge,"ru-RU":_e,"sk-SK":ve,"sl-SI":ye,"sr-SP":be,"sv-SE":xe,"tr-TR":Se,"uk-UA":Ce,"zh-CN":we,"zh-TW":Te};function De(e){return e&&e.__esModule?e.default:e}const Oe=n(null),ke=n(null),Ae=n(null);var je=class extends O{};je.type=`tableheader`;var Me=class extends O{};Me.type=`column`;const Ne=n(null),Pe=r(function(t,n){let r=o(Ae);if(!r)throw Error(`Wrap your <Table> in a <ResizableTableContainer> to enable column resizing`);let i=C(De(Ee),`react-aria-components`),{onResizeStart:a,onResize:c,onResizeEnd:f}=o(Oe),{column:p,triggerRef:m}=o(Ne),h=l(null),{resizerProps:_,inputProps:T,isResizing:E}=ee({column:p,"aria-label":t[`aria-label`]||i.format(`tableResizer`),onResizeStart:a,onResize:c,onResizeEnd:f,triggerRef:m},r,h),{focusProps:O,isFocused:k,isFocusVisible:A}=b(),{hoverProps:j,isHovered:M}=x(t),N=r.getColumnMinWidth(p.key)>=r.getColumnWidth(p.key),te=r.getColumnMaxWidth(p.key)<=r.getColumnWidth(p.key),{direction:P}=S(),F=`both`;F=N?P===`rtl`?`right`:`left`:te?P===`rtl`?`left`:`right`:`both`;let I=g(n),[L,R]=u(``);s(()=>{if(!I.current)return;let e=window.getComputedStyle(I.current);R(e.cursor)},[I,F]);let z=w({...t,defaultClassName:`react-aria-ColumnResizer`,values:{isFocused:k,isFocusVisible:A,isResizing:E,isHovered:M,resizableDirection:F}}),[B,V]=u(!1),H=e=>{e.pointerType===`mouse`&&V(!0)};!E&&B&&V(!1);let U=d(t,{global:!0});return e.createElement(D.div,{ref:I,role:`presentation`,...y(U,z,_,{onPointerDown:H},j),"data-hovered":M||void 0,"data-focused":k||void 0,"data-focus-visible":A||void 0,"data-resizing":E||void 0,"data-resizable-direction":F},z.children,e.createElement(`input`,{ref:h,...y(T,O)}),E&&B&&v.createPortal(e.createElement(`div`,{style:{position:`fixed`,top:0,left:0,bottom:0,right:0,cursor:L}}),document.body))});var Fe=class extends k{};Fe.type=`tablebody`;var Ie=class extends O{filter(e,t,n){let r=e.getChildren(this.key);for(let i of r)if(n(i.textValue,i)){let n=this.clone();return t.addDescendants(n,e),n}return null}};Ie.type=`item`;let Le=r(function(t,n){let{isVirtualized:r}=o(U);return r?e.createElement(D.div,{...t,ref:n}):e.createElement(D.tr,{...t,ref:n})});var Re=class extends O{};Re.type=`cell`;let ze=r(function(t,n){let{isVirtualized:r}=o(U);return r?e.createElement(D.div,{...t,ref:n}):e.createElement(D.td,{...t,ref:n})});z(j,function(t,n,r){let i=o(ke),{isVirtualized:a}=o(U),{isLoading:s,onLoadMore:u,scrollOffset:p,...m}=t,g=i.collection.columns.length,_=l(null),v=c(()=>({onLoadMore:u,collection:i?.collection,sentinelRef:_,scrollOffset:p}),[u,p,i?.collection]);h(v,_);let b=w({...m,id:void 0,children:r.rendered,defaultClassName:`react-aria-TableLoadingIndicator`,values:void 0}),x={},S={},C={};return a?(S[`aria-colspan`]=g,C={display:`contents`}):S.colSpan=g,e.createElement(e.Fragment,null,e.createElement(Le,{style:{height:0},inert:f(!0)},e.createElement(ze,{style:{padding:0,border:0}},e.createElement(`div`,{"data-testid":`loadMoreSentinel`,ref:_,style:{position:`relative`,height:1,width:1}}))),s&&b.children&&e.createElement(Le,{...y(d(t,{global:!0}),x),...b,role:`row`,ref:n},e.createElement(ze,{role:`rowheader`,...S,style:C},b.children)))});export{Pe as ColumnResizer};
@@ -1,11 +1 @@
1
- import e,{createContext as t,forwardRef as n,useCallback as r,useContext as i,useMemo as a,useRef as o,useState as s}from"react";import{filterDOMProps as c,inertValue as l,mergeProps as u,mergeRefs as d,useLayoutEffect as f,useLoadMoreSentinel as p,useObjectRef as m,useResizeObserver as h}from"@react-aria/utils";import{FocusableContext as g}from"@react-aria/interactions";import"react-dom";import{mergeProps as _,useComboBox as v,useFilter as ee}from"react-aria";import{useComboBoxState as te}from"react-stately";var y=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),b=(e=>typeof require<`u`?require:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof require<`u`?require:e)[t]}):e)(function(e){if(typeof require<`u`)return require.apply(this,arguments);throw Error('Calling `require` for "'+e+"\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.")});const x=Symbol(`default`);function S({values:t,children:n}){for(let[r,i]of t)n=e.createElement(r.Provider,{value:i},n);return n}function C(e){let{className:t,style:n,children:r,defaultClassName:i,defaultChildren:o,defaultStyle:s,values:c,render:l}=e;return a(()=>{let e,a,u;return e=typeof t==`function`?t({...c,defaultClassName:i}):t,a=typeof n==`function`?n({...c,defaultStyle:s||{}}):n,u=typeof r==`function`?r({...c,defaultChildren:o}):r??o,{className:e??i,style:a||s?{...s,...a}:void 0,children:u??o,"data-rac":``,render:l?e=>l(e,c):void 0}},[t,n,r,i,o,s,c,l])}function w(e,t){let n=i(e);if(t===null)return null;if(n&&typeof n==`object`&&`slots`in n&&n.slots){let e=t||x;if(!n.slots[e]){let e=new Intl.ListFormat().format(Object.keys(n.slots).map(e=>`"${e}"`)),r=t?`Invalid slot "${t}".`:`A slot prop is required.`;throw Error(`${r} Valid slot names are ${e}.`)}return n.slots[e]}return n}function T(e,t,n){let{ref:r,...i}=w(n,e.slot)||{},o=m(a(()=>d(t,r),[t,r])),s=u(i,e);return`style`in i&&i.style&&`style`in e&&e.style&&(s.style=typeof i.style==`function`||typeof e.style==`function`?t=>{let n=typeof i.style==`function`?i.style(t):i.style,r={...t.defaultStyle,...n},a=typeof e.style==`function`?e.style({...t,defaultStyle:r}):e.style;return{...r,...a}}:{...i.style,...e.style}),[s,o]}function ne(e=!0){let[t,n]=s(e),i=o(!1),a=r(e=>{i.current=!0,n(!!e)},[]);return f(()=>{i.current||n(!1)},[]),[a,t]}function re(e){let t=/^(data-.*)$/,n={};for(let r in e)t.test(r)||(n[r]=e[r]);return n}function E(t,n,r){let{render:i,...s}=n,c=o(null),l=a(()=>d(r,c),[r,c]);f(()=>{},[t,i]);let u={...s,ref:l};return i?i(u,void 0):e.createElement(t,u)}const D={},O=new Proxy({},{get(e,t){if(typeof t!=`string`)return;let r=D[t];return r||(r=n(E.bind(null,t)),D[t]=r),r}});String(Math.round(Math.random()*1e10));const k=e.createContext(!1);typeof window<`u`&&window.document&&window.document.createElement,e.useId;function A(){return!1}function j(){return!0}function M(e){return()=>{}}function N(){return typeof e.useSyncExternalStore==`function`?e.useSyncExternalStore(M,A,j):i(k)}var P=class{get childNodes(){throw Error(`childNodes is not supported`)}clone(){let e=new this.constructor(this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e[`aria-label`]=this[`aria-label`],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}filter(e,t,n){let r=this.clone();return t.addDescendants(r,e),r}constructor(e){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue=``,this[`aria-label`]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=e}},F=class extends P{filter(e,t,n){let[r,i]=V(e,t,this.firstChildKey,n),a=this.clone();return a.firstChildKey=r,a.lastChildKey=i,a}},I=class extends P{};I.type=`header`;var L=class extends P{};L.type=`loader`;var R=class extends F{filter(e,t,n){if(n(this.textValue,this)){let n=this.clone();return t.addDescendants(n,e),n}return null}};R.type=`item`;var z=class extends F{filter(e,t,n){let r=super.filter(e,t,n);if(r&&r.lastChildKey!==null){let t=e.getItem(r.lastChildKey);if(t&&t.type!==`header`)return r}return null}};z.type=`section`;var B=class{get size(){return this.itemCount}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=this.firstKey==null?void 0:this.keyMap.get(this.firstKey);for(;e;)yield e,e=e.nextKey==null?void 0:this.keyMap.get(e.nextKey)}getChildren(e){let t=this.keyMap;return{*[Symbol.iterator](){let n=t.get(e),r=n?.firstChildKey==null?null:t.get(n.firstChildKey);for(;r;)yield r,r=r.nextKey==null?void 0:t.get(r.nextKey)}}}getKeyBefore(e){let t=this.keyMap.get(e);if(!t)return null;if(t.prevKey!=null){for(t=this.keyMap.get(t.prevKey);t&&t.type!==`item`&&t.lastChildKey!=null;)t=this.keyMap.get(t.lastChildKey);return t?.key??null}return t.parentKey}getKeyAfter(e){let t=this.keyMap.get(e);if(!t)return null;if(t.type!==`item`&&t.firstChildKey!=null)return t.firstChildKey;for(;t;){if(t.nextKey!=null)return t.nextKey;if(t.parentKey!=null)t=this.keyMap.get(t.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey==null?null:this.keyMap.get(this.lastKey);for(;e?.lastChildKey!=null;)e=this.keyMap.get(e.lastChildKey);return e?.key??null}getItem(e){return this.keyMap.get(e)??null}at(){throw Error(`Not implemented`)}clone(){let e=this.constructor,t=new e;return t.keyMap=new Map(this.keyMap),t.firstKey=this.firstKey,t.lastKey=this.lastKey,t.itemCount=this.itemCount,t}addNode(e){if(this.frozen)throw Error(`Cannot add a node to a frozen collection`);e.type===`item`&&this.keyMap.get(e.key)==null&&this.itemCount++,this.keyMap.set(e.key,e)}addDescendants(e,t){this.addNode(e);let n=t.getChildren(e.key);for(let e of n)this.addDescendants(e,t)}removeNode(e){if(this.frozen)throw Error(`Cannot remove a node to a frozen collection`);let t=this.keyMap.get(e);t!=null&&t.type===`item`&&this.itemCount--,this.keyMap.delete(e)}commit(e,t,n=!1){if(this.frozen)throw Error(`Cannot commit a frozen collection`);this.firstKey=e,this.lastKey=t,this.frozen=!n}filter(e){let t=new this.constructor,[n,r]=V(this,t,this.firstKey,e);return t?.commit(n,r),t}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1,this.itemCount=0}};function V(e,t,n,r){if(n==null)return[null,null];let i=null,a=null,o=e.getItem(n);for(;o!=null;){let n=o.filter(e,t,r);n!=null&&(n.nextKey=null,a&&(n.prevKey=a.key,a.nextKey=n.key),i??=n,t.addNode(n),a=n),o=o.nextKey?e.getItem(o.nextKey):null}if(a&&a.type===`separator`){let e=a.prevKey;t.removeNode(a.key),e?(a=t.getItem(e),a.nextKey=null):a=null}return[i?.key??null,a?.key??null]}var H=class{*[Symbol.iterator](){let e=this.firstChild;for(;e;)yield e,e=e.nextSibling}get firstChild(){return this._firstChild}set firstChild(e){this._firstChild=e,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(e){this._lastChild=e,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(e){this._previousSibling=e,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(e){this._nextSibling=e,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e,this.ownerDocument.markDirty(this)}get isConnected(){return this.parentNode?.isConnected||!1}invalidateChildIndices(e){(this._minInvalidChildIndex==null||!this._minInvalidChildIndex.isConnected||e.index<this._minInvalidChildIndex.index)&&(this._minInvalidChildIndex=e,this.ownerDocument.markDirty(this))}updateChildIndices(){let e=this._minInvalidChildIndex;for(;e;)e.index=e.previousSibling?e.previousSibling.index+1:0,e=e.nextSibling;this._minInvalidChildIndex=null}appendChild(e){e.parentNode&&e.parentNode.removeChild(e),this.firstChild??=e,this.lastChild?(this.lastChild.nextSibling=e,e.index=this.lastChild.index+1,e.previousSibling=this.lastChild):(e.previousSibling=null,e.index=0),e.parentNode=this,e.nextSibling=null,this.lastChild=e,this.ownerDocument.markDirty(this),this.isConnected&&this.ownerDocument.queueUpdate()}insertBefore(e,t){if(t==null)return this.appendChild(e);e.parentNode&&e.parentNode.removeChild(e),e.nextSibling=t,e.previousSibling=t.previousSibling,e.index=t.index-1,this.firstChild===t?this.firstChild=e:t.previousSibling&&(t.previousSibling.nextSibling=e),t.previousSibling=e,e.parentNode=t.parentNode,this.invalidateChildIndices(e),this.isConnected&&this.ownerDocument.queueUpdate()}removeChild(e){e.parentNode===this&&(this._minInvalidChildIndex===e&&(this._minInvalidChildIndex=null),e.nextSibling&&(this.invalidateChildIndices(e.nextSibling),e.nextSibling.previousSibling=e.previousSibling),e.previousSibling&&(e.previousSibling.nextSibling=e.nextSibling),this.firstChild===e&&(this.firstChild=e.nextSibling),this.lastChild===e&&(this.lastChild=e.previousSibling),e.parentNode=null,e.nextSibling=null,e.previousSibling=null,e.index=0,this.ownerDocument.markDirty(e),this.isConnected&&this.ownerDocument.queueUpdate())}addEventListener(){}removeEventListener(){}get previousVisibleSibling(){let e=this.previousSibling;for(;e&&e.isHidden;)e=e.previousSibling;return e}get nextVisibleSibling(){let e=this.nextSibling;for(;e&&e.isHidden;)e=e.nextSibling;return e}get firstVisibleChild(){let e=this.firstChild;for(;e&&e.isHidden;)e=e.nextSibling;return e}get lastVisibleChild(){let e=this.lastChild;for(;e&&e.isHidden;)e=e.previousSibling;return e}constructor(e){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this._minInvalidChildIndex=null,this.ownerDocument=e}},U=class e extends H{get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof e?this.parentNode.level+ +(this.node?.type===`item`):0}getMutableNode(){return this.node==null?null:(this.isMutated||=(this.node=this.node.clone(),!0),this.ownerDocument.markDirty(this),this.node)}updateNode(){let t=this.nextVisibleSibling,n=this.getMutableNode();if(n!=null&&(n.index=this.index,n.level=this.level,n.parentKey=this.parentNode instanceof e?this.parentNode.node?.key??null:null,n.prevKey=this.previousVisibleSibling?.node?.key??null,n.nextKey=t?.node?.key??null,n.hasChildNodes=!!this.firstChild,n.firstChildKey=this.firstVisibleChild?.node?.key??null,n.lastChildKey=this.lastVisibleChild?.node?.key??null,(n.colSpan!=null||n.colIndex!=null)&&t)){let e=(n.colIndex??n.index)+(n.colSpan??1);if(t.node!=null&&e!==t.node.colIndex){let n=t.getMutableNode();n.colIndex=e}}}setProps(e,t,n,r,i){let a,{value:o,textValue:s,id:c,...l}=e;if(this.node==null?(a=new n(c??`react-aria-${++this.ownerDocument.nodeId}`),this.node=a):a=this.getMutableNode(),l.ref=t,a.props=l,a.rendered=r,a.render=i,a.value=o,e[`aria-label`]&&(a[`aria-label`]=e[`aria-label`]),a.textValue=s||(typeof l.children==`string`?l.children:``)||e[`aria-label`]||``,c!=null&&c!==a.key)throw Error(`Cannot change the id of an item`);l.colSpan!=null&&(a.colSpan=l.colSpan),this.isConnected&&this.ownerDocument.queueUpdate()}get style(){let e=this;return{get display(){return e.isHidden?`none`:``},set display(t){let n=t===`none`;if(e.isHidden!==n){(e.parentNode?.firstVisibleChild===e||e.parentNode?.lastVisibleChild===e)&&e.ownerDocument.markDirty(e.parentNode);let t=e.previousVisibleSibling,r=e.nextVisibleSibling;t&&e.ownerDocument.markDirty(t),r&&e.ownerDocument.markDirty(r),e.isHidden=n,e.ownerDocument.markDirty(e)}}}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}constructor(e,t){super(t),this.nodeType=8,this.isMutated=!0,this._index=0,this.isHidden=!1,this.node=null}},ie=class extends H{get isConnected(){return!0}createElement(e){return new U(e,this)}getMutableCollection(){return this.nextCollection||=this.collection.clone(),this.nextCollection}markDirty(e){this.dirtyNodes.add(e)}addNode(e){if(e.isHidden||e.node==null)return;let t=this.getMutableCollection();if(!t.getItem(e.node.key))for(let t of e)this.addNode(t);t.addNode(e.node)}removeNode(e){for(let t of e)this.removeNode(t);e.node&&this.getMutableCollection().removeNode(e.node.key)}getCollection(){return this.inSubscription?this.collection.clone():(this.queuedRender=!1,this.updateCollection(),this.collection)}updateCollection(){for(let e of this.dirtyNodes)e instanceof U&&(!e.isConnected||e.isHidden)?this.removeNode(e):e.updateChildIndices();for(let e of this.dirtyNodes)e instanceof U?(e.isConnected&&!e.isHidden&&(e.updateNode(),this.addNode(e)),e.node&&this.dirtyNodes.delete(e),e.isMutated=!1):this.dirtyNodes.delete(e);this.nextCollection&&(this.nextCollection.commit(this.firstVisibleChild?.node?.key??null,this.lastVisibleChild?.node?.key??null,this.isSSR),this.isSSR||(this.collection=this.nextCollection,this.nextCollection=null))}queueUpdate(){if(!(this.dirtyNodes.size===0||this.queuedRender)){this.queuedRender=!0,this.inSubscription=!0;for(let e of this.subscriptions)e();this.inSubscription=!1}}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}constructor(e){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.nextCollection=null,this.subscriptions=new Set,this.queuedRender=!1,this.inSubscription=!1,this.collection=e,this.nextCollection=e}};if(typeof HTMLTemplateElement<`u`){let e=Object.getOwnPropertyDescriptor(Node.prototype,`firstChild`).get;Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:e.call(this)}})}const W=t(!1);function ae(t){if(i(W))return e.createElement(e.Fragment,null,t.children);let n=e.createElement(W.Provider,{value:!0},t.children);return e.createElement(`template`,{"data-react-aria-hidden":!0},n)}
2
- /**
3
- * @license React
4
- * use-sync-external-store-shim.production.js
5
- *
6
- * Copyright (c) Meta Platforms, Inc. and affiliates.
7
- *
8
- * This source code is licensed under the MIT license found in the
9
- * LICENSE file in the root directory of this source tree.
10
- */
11
- var oe=y((e=>{var t=b(`react`);function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),se=y(((e,t)=>{t.exports=oe()}))();const ce=t(!1),G=t(null);function le(t){if(i(G))return t.content;let{collection:n,document:r}=pe(t.createCollection);return e.createElement(e.Fragment,null,e.createElement(ae,null,e.createElement(G.Provider,{value:r},t.content)),e.createElement(ue,{render:t.children,collection:n}))}function ue({collection:e,render:t}){return t(e)}function de(e,t,n){let i=N(),a=o(i);a.current=i;let s=r(()=>a.current?n():t(),[t,n]);return(0,se.useSyncExternalStore)(e,s)}const fe=typeof e.useSyncExternalStore==`function`?e.useSyncExternalStore:de;function pe(e){let[t]=s(()=>new ie(e?.()||new B)),n=r(e=>t.subscribe(e),[t]),i=r(()=>{let e=t.getCollection();return t.isSSR&&t.resetAfterSSR(),e},[t]),a=r(()=>(t.isSSR=!0,t.getCollection()),[t]);return{collection:fe(n,i,a),document:t}}const K=t(null);function me(e){var t;return t=class extends P{},t.type=e,t}function he(t,n,a,o,s,c){typeof t==`string`&&(t=me(t));let l=r(e=>{e?.setProps(n,a,t,o,c)},[n,a,o,c,t]),u=i(K);if(u){let r=u.ownerDocument.nodesByProps.get(n);return r||(r=u.ownerDocument.createElement(t.type),r.setProps(n,a,t,o,c),u.appendChild(r),u.ownerDocument.updateCollection(),u.ownerDocument.nodesByProps.set(n,r)),s?e.createElement(K.Provider,{value:r},s):null}return e.createElement(t.type,{ref:l},s)}function ge(t,r){let a=({node:e})=>r(e.props,e.props.ref,e),o=n((n,o)=>{let s=i(g);if(!i(ce)){if(r.length>=3)throw Error(r.name+` cannot be rendered outside a collection.`);return r(n,o)}return he(t,n,o,`children`in n?n.children:null,null,t=>e.createElement(g.Provider,{value:s},e.createElement(a,{node:t})))});return o.displayName=r.name,o}const q=t({}),J=t({}),Y=t({}),_e=t(null),ve=t(null),X=t({}),Z=t({}),Q=t(null),$=t(null);ge(L,function(t,n,r){let s=i($),{isLoading:u,onLoadMore:d,scrollOffset:f,...m}=t,h=o(null),g=a(()=>({onLoadMore:d,collection:s?.collection,sentinelRef:h,scrollOffset:f}),[d,f,s?.collection]);p(g,h);let v=C({...m,id:void 0,children:r.rendered,defaultClassName:`react-aria-ListBoxLoadingIndicator`,values:void 0});return e.createElement(e.Fragment,null,e.createElement(`div`,{style:{position:`relative`,width:0,height:0},inert:l(!0)},e.createElement(`div`,{"data-testid":`loadMoreSentinel`,ref:h,style:{position:`absolute`,height:1,width:1}})),u&&v.children&&e.createElement(O.div,{..._(c(t,{global:!0}),{tabIndex:-1}),...v,role:`option`,ref:n},v.children))});const ye=t(null),be=t(null),xe=t(null),Se=t(null),Ce=n(function(t,n){[t,n]=T(t,n,xe);let{children:r,isDisabled:i=!1,isInvalid:o=!1,isRequired:s=!1}=t,c=a(()=>e.createElement(Q.Provider,{value:{items:t.items??t.defaultItems}},typeof r==`function`?r({isOpen:!1,isDisabled:i,isInvalid:o,isRequired:s,defaultChildren:null}):r),[r,i,o,s,t.items,t.defaultItems]);return e.createElement(le,{content:c},r=>e.createElement(Te,{props:t,collection:r,comboBoxRef:n}))}),we=[q,J,Z,X,Y];function Te({props:t,collection:n,comboBoxRef:i}){let{name:l,formValue:u=`key`,allowsCustomValue:d}=t;d&&(u=`text`);let{validationBehavior:f}=w(ve)||{},p=t.validationBehavior??f??`native`,{contains:m}=ee({sensitivity:`base`}),g=te({...t,defaultFilter:t.defaultFilter||m,items:t.items,children:void 0,collection:n,validationBehavior:p}),_=o(null),y=o(null),b=o(null),x=o(null),[T,E]=ne(!t[`aria-label`]&&!t[`aria-labelledby`]),{buttonProps:D,inputProps:k,listBoxProps:A,labelProps:j,descriptionProps:M,errorMessageProps:N,...P}=v({...re(t),label:E,inputRef:y,buttonRef:_,listBoxRef:b,popoverRef:x,name:u===`text`?l:void 0,validationBehavior:p},g),[F,I]=s(null),L=r(()=>{if(y.current){let e=_.current?.getBoundingClientRect(),t=y.current.getBoundingClientRect(),n=e?Math.min(e.left,t.left):t.left,r=e?Math.max(e.right,t.right):t.right;I(r-n+`px`)}},[_,y,I]);h({ref:y,onResize:L});let R=a(()=>({isOpen:g.isOpen,isDisabled:t.isDisabled||!1,isInvalid:P.isInvalid||!1,isRequired:t.isRequired||!1}),[g.isOpen,t.isDisabled,P.isInvalid,t.isRequired]),z=C({...t,values:R,defaultClassName:`react-aria-ComboBox`}),B=c(t,{global:!0});return delete B.id,e.createElement(S,{values:[[Se,g],[q,{...j,ref:T}],[J,{...D,ref:_,isPressed:g.isOpen}],[Z,{...k,ref:y}],[be,g],[ye,{ref:x,triggerRef:y,scrollRef:b,placement:`bottom start`,isNonModal:!0,trigger:`ComboBox`,style:{"--trigger-width":F},clearContexts:we}],[Q,{...A,ref:b}],[$,g],[Y,{slots:{description:M,errorMessage:N}}],[X,{isInvalid:P.isInvalid,isDisabled:t.isDisabled||!1}],[_e,P]]},e.createElement(O.div,{...B,...z,ref:i,slot:t.slot||void 0,"data-focused":g.isFocused||void 0,"data-open":g.isOpen||void 0,"data-disabled":t.isDisabled||void 0,"data-invalid":P.isInvalid||void 0,"data-required":t.isRequired||void 0}),l&&u===`key`&&e.createElement(`input`,{type:`hidden`,name:l,form:t.form,value:g.selectedKey??``}))}export{Ce as ComboBox};
1
+ import e,{createContext as t,forwardRef as n,useCallback as r,useContext as i,useMemo as a,useRef as o,useState as s,useSyncExternalStore as c}from"react";import{filterDOMProps as l,inertValue as u,mergeProps as d,mergeRefs as f,useLayoutEffect as p,useLoadMoreSentinel as m,useObjectRef as h,useResizeObserver as g}from"@react-aria/utils";import{FocusableContext as _}from"@react-aria/interactions";import"react-dom";import{mergeProps as v,useComboBox as ee,useFilter as te}from"react-aria";import{useComboBoxState as ne}from"react-stately";const y=Symbol(`default`);function re({values:t,children:n}){for(let[r,i]of t)n=e.createElement(r.Provider,{value:i},n);return n}function b(e){let{className:t,style:n,children:r,defaultClassName:i,defaultChildren:o,defaultStyle:s,values:c,render:l}=e;return a(()=>{let e,a,u;return e=typeof t==`function`?t({...c,defaultClassName:i}):t,a=typeof n==`function`?n({...c,defaultStyle:s||{}}):n,u=typeof r==`function`?r({...c,defaultChildren:o}):r??o,{className:e??i,style:a||s?{...s,...a}:void 0,children:u??o,"data-rac":``,render:l?e=>l(e,c):void 0}},[t,n,r,i,o,s,c,l])}function x(e,t){let n=i(e);if(t===null)return null;if(n&&typeof n==`object`&&`slots`in n&&n.slots){let e=t||y;if(!n.slots[e]){let e=new Intl.ListFormat().format(Object.keys(n.slots).map(e=>`"${e}"`)),r=t?`Invalid slot "${t}".`:`A slot prop is required.`;throw Error(`${r} Valid slot names are ${e}.`)}return n.slots[e]}return n}function S(e,t,n){let{ref:r,...i}=x(n,e.slot)||{},o=h(a(()=>f(t,r),[t,r])),s=d(i,e);return`style`in i&&i.style&&`style`in e&&e.style&&(s.style=typeof i.style==`function`||typeof e.style==`function`?t=>{let n=typeof i.style==`function`?i.style(t):i.style,r={...t.defaultStyle,...n},a=typeof e.style==`function`?e.style({...t,defaultStyle:r}):e.style;return{...r,...a}}:{...i.style,...e.style}),[s,o]}function C(e=!0){let[t,n]=s(e),i=o(!1),a=r(e=>{i.current=!0,n(!!e)},[]);return p(()=>{i.current||n(!1)},[]),[a,t]}function ie(e){let t=/^(data-.*)$/,n={};for(let r in e)t.test(r)||(n[r]=e[r]);return n}function w(t,n,r){let{render:i,...s}=n,c=o(null),l=a(()=>f(r,c),[r,c]);p(()=>{},[t,i]);let u={...s,ref:l};return i?i(u,void 0):e.createElement(t,u)}const T={},E=new Proxy({},{get(e,t){if(typeof t!=`string`)return;let r=T[t];return r||(r=n(w.bind(null,t)),T[t]=r),r}});String(Math.round(Math.random()*1e10));const D=e.createContext(!1);typeof window<`u`&&window.document&&window.document.createElement,e.useId;function O(){return!1}function k(){return!0}function A(e){return()=>{}}function j(){return typeof e.useSyncExternalStore==`function`?e.useSyncExternalStore(A,O,k):i(D)}var M=class{get childNodes(){throw Error(`childNodes is not supported`)}clone(){let e=new this.constructor(this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e[`aria-label`]=this[`aria-label`],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}filter(e,t,n){let r=this.clone();return t.addDescendants(r,e),r}constructor(e){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue=``,this[`aria-label`]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=e}},N=class extends M{filter(e,t,n){let[r,i]=z(e,t,this.firstChildKey,n),a=this.clone();return a.firstChildKey=r,a.lastChildKey=i,a}},P=class extends M{};P.type=`header`;var F=class extends M{};F.type=`loader`;var I=class extends N{filter(e,t,n){if(n(this.textValue,this)){let n=this.clone();return t.addDescendants(n,e),n}return null}};I.type=`item`;var L=class extends N{filter(e,t,n){let r=super.filter(e,t,n);if(r&&r.lastChildKey!==null){let t=e.getItem(r.lastChildKey);if(t&&t.type!==`header`)return r}return null}};L.type=`section`;var R=class{get size(){return this.itemCount}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=this.firstKey==null?void 0:this.keyMap.get(this.firstKey);for(;e;)yield e,e=e.nextKey==null?void 0:this.keyMap.get(e.nextKey)}getChildren(e){let t=this.keyMap;return{*[Symbol.iterator](){let n=t.get(e),r=n?.firstChildKey==null?null:t.get(n.firstChildKey);for(;r;)yield r,r=r.nextKey==null?void 0:t.get(r.nextKey)}}}getKeyBefore(e){let t=this.keyMap.get(e);if(!t)return null;if(t.prevKey!=null){for(t=this.keyMap.get(t.prevKey);t&&t.type!==`item`&&t.lastChildKey!=null;)t=this.keyMap.get(t.lastChildKey);return t?.key??null}return t.parentKey}getKeyAfter(e){let t=this.keyMap.get(e);if(!t)return null;if(t.type!==`item`&&t.firstChildKey!=null)return t.firstChildKey;for(;t;){if(t.nextKey!=null)return t.nextKey;if(t.parentKey!=null)t=this.keyMap.get(t.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey==null?null:this.keyMap.get(this.lastKey);for(;e?.lastChildKey!=null;)e=this.keyMap.get(e.lastChildKey);return e?.key??null}getItem(e){return this.keyMap.get(e)??null}at(){throw Error(`Not implemented`)}clone(){let e=this.constructor,t=new e;return t.keyMap=new Map(this.keyMap),t.firstKey=this.firstKey,t.lastKey=this.lastKey,t.itemCount=this.itemCount,t}addNode(e){if(this.frozen)throw Error(`Cannot add a node to a frozen collection`);e.type===`item`&&this.keyMap.get(e.key)==null&&this.itemCount++,this.keyMap.set(e.key,e)}addDescendants(e,t){this.addNode(e);let n=t.getChildren(e.key);for(let e of n)this.addDescendants(e,t)}removeNode(e){if(this.frozen)throw Error(`Cannot remove a node to a frozen collection`);let t=this.keyMap.get(e);t!=null&&t.type===`item`&&this.itemCount--,this.keyMap.delete(e)}commit(e,t,n=!1){if(this.frozen)throw Error(`Cannot commit a frozen collection`);this.firstKey=e,this.lastKey=t,this.frozen=!n}filter(e){let t=new this.constructor,[n,r]=z(this,t,this.firstKey,e);return t?.commit(n,r),t}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1,this.itemCount=0}};function z(e,t,n,r){if(n==null)return[null,null];let i=null,a=null,o=e.getItem(n);for(;o!=null;){let n=o.filter(e,t,r);n!=null&&(n.nextKey=null,a&&(n.prevKey=a.key,a.nextKey=n.key),i??=n,t.addNode(n),a=n),o=o.nextKey?e.getItem(o.nextKey):null}if(a&&a.type===`separator`){let e=a.prevKey;t.removeNode(a.key),e?(a=t.getItem(e),a.nextKey=null):a=null}return[i?.key??null,a?.key??null]}var B=class{*[Symbol.iterator](){let e=this.firstChild;for(;e;)yield e,e=e.nextSibling}get firstChild(){return this._firstChild}set firstChild(e){this._firstChild=e,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(e){this._lastChild=e,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(e){this._previousSibling=e,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(e){this._nextSibling=e,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e,this.ownerDocument.markDirty(this)}get isConnected(){return this.parentNode?.isConnected||!1}invalidateChildIndices(e){(this._minInvalidChildIndex==null||!this._minInvalidChildIndex.isConnected||e.index<this._minInvalidChildIndex.index)&&(this._minInvalidChildIndex=e,this.ownerDocument.markDirty(this))}updateChildIndices(){let e=this._minInvalidChildIndex;for(;e;)e.index=e.previousSibling?e.previousSibling.index+1:0,e=e.nextSibling;this._minInvalidChildIndex=null}appendChild(e){e.parentNode&&e.parentNode.removeChild(e),this.firstChild??=e,this.lastChild?(this.lastChild.nextSibling=e,e.index=this.lastChild.index+1,e.previousSibling=this.lastChild):(e.previousSibling=null,e.index=0),e.parentNode=this,e.nextSibling=null,this.lastChild=e,this.ownerDocument.markDirty(this),this.isConnected&&this.ownerDocument.queueUpdate()}insertBefore(e,t){if(t==null)return this.appendChild(e);e.parentNode&&e.parentNode.removeChild(e),e.nextSibling=t,e.previousSibling=t.previousSibling,e.index=t.index-1,this.firstChild===t?this.firstChild=e:t.previousSibling&&(t.previousSibling.nextSibling=e),t.previousSibling=e,e.parentNode=t.parentNode,this.invalidateChildIndices(e),this.isConnected&&this.ownerDocument.queueUpdate()}removeChild(e){e.parentNode===this&&(this._minInvalidChildIndex===e&&(this._minInvalidChildIndex=null),e.nextSibling&&(this.invalidateChildIndices(e.nextSibling),e.nextSibling.previousSibling=e.previousSibling),e.previousSibling&&(e.previousSibling.nextSibling=e.nextSibling),this.firstChild===e&&(this.firstChild=e.nextSibling),this.lastChild===e&&(this.lastChild=e.previousSibling),e.parentNode=null,e.nextSibling=null,e.previousSibling=null,e.index=0,this.ownerDocument.markDirty(e),this.isConnected&&this.ownerDocument.queueUpdate())}addEventListener(){}removeEventListener(){}get previousVisibleSibling(){let e=this.previousSibling;for(;e&&e.isHidden;)e=e.previousSibling;return e}get nextVisibleSibling(){let e=this.nextSibling;for(;e&&e.isHidden;)e=e.nextSibling;return e}get firstVisibleChild(){let e=this.firstChild;for(;e&&e.isHidden;)e=e.nextSibling;return e}get lastVisibleChild(){let e=this.lastChild;for(;e&&e.isHidden;)e=e.previousSibling;return e}constructor(e){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this._minInvalidChildIndex=null,this.ownerDocument=e}},V=class e extends B{get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof e?this.parentNode.level+ +(this.node?.type===`item`):0}getMutableNode(){return this.node==null?null:(this.isMutated||=(this.node=this.node.clone(),!0),this.ownerDocument.markDirty(this),this.node)}updateNode(){let t=this.nextVisibleSibling,n=this.getMutableNode();if(n!=null&&(n.index=this.index,n.level=this.level,n.parentKey=this.parentNode instanceof e?this.parentNode.node?.key??null:null,n.prevKey=this.previousVisibleSibling?.node?.key??null,n.nextKey=t?.node?.key??null,n.hasChildNodes=!!this.firstChild,n.firstChildKey=this.firstVisibleChild?.node?.key??null,n.lastChildKey=this.lastVisibleChild?.node?.key??null,(n.colSpan!=null||n.colIndex!=null)&&t)){let e=(n.colIndex??n.index)+(n.colSpan??1);if(t.node!=null&&e!==t.node.colIndex){let n=t.getMutableNode();n.colIndex=e}}}setProps(e,t,n,r,i){let a,{value:o,textValue:s,id:c,...l}=e;if(this.node==null?(a=new n(c??`react-aria-${++this.ownerDocument.nodeId}`),this.node=a):a=this.getMutableNode(),l.ref=t,a.props=l,a.rendered=r,a.render=i,a.value=o,e[`aria-label`]&&(a[`aria-label`]=e[`aria-label`]),a.textValue=s||(typeof l.children==`string`?l.children:``)||e[`aria-label`]||``,c!=null&&c!==a.key)throw Error(`Cannot change the id of an item`);l.colSpan!=null&&(a.colSpan=l.colSpan),this.isConnected&&this.ownerDocument.queueUpdate()}get style(){let e=this;return{get display(){return e.isHidden?`none`:``},set display(t){let n=t===`none`;if(e.isHidden!==n){(e.parentNode?.firstVisibleChild===e||e.parentNode?.lastVisibleChild===e)&&e.ownerDocument.markDirty(e.parentNode);let t=e.previousVisibleSibling,r=e.nextVisibleSibling;t&&e.ownerDocument.markDirty(t),r&&e.ownerDocument.markDirty(r),e.isHidden=n,e.ownerDocument.markDirty(e)}}}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}constructor(e,t){super(t),this.nodeType=8,this.isMutated=!0,this._index=0,this.isHidden=!1,this.node=null}},ae=class extends B{get isConnected(){return!0}createElement(e){return new V(e,this)}getMutableCollection(){return this.nextCollection||=this.collection.clone(),this.nextCollection}markDirty(e){this.dirtyNodes.add(e)}addNode(e){if(e.isHidden||e.node==null)return;let t=this.getMutableCollection();if(!t.getItem(e.node.key))for(let t of e)this.addNode(t);t.addNode(e.node)}removeNode(e){for(let t of e)this.removeNode(t);e.node&&this.getMutableCollection().removeNode(e.node.key)}getCollection(){return this.inSubscription?this.collection.clone():(this.queuedRender=!1,this.updateCollection(),this.collection)}updateCollection(){for(let e of this.dirtyNodes)e instanceof V&&(!e.isConnected||e.isHidden)?this.removeNode(e):e.updateChildIndices();for(let e of this.dirtyNodes)e instanceof V?(e.isConnected&&!e.isHidden&&(e.updateNode(),this.addNode(e)),e.node&&this.dirtyNodes.delete(e),e.isMutated=!1):this.dirtyNodes.delete(e);this.nextCollection&&(this.nextCollection.commit(this.firstVisibleChild?.node?.key??null,this.lastVisibleChild?.node?.key??null,this.isSSR),this.isSSR||(this.collection=this.nextCollection,this.nextCollection=null))}queueUpdate(){if(!(this.dirtyNodes.size===0||this.queuedRender)){this.queuedRender=!0,this.inSubscription=!0;for(let e of this.subscriptions)e();this.inSubscription=!1}}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}constructor(e){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.nextCollection=null,this.subscriptions=new Set,this.queuedRender=!1,this.inSubscription=!1,this.collection=e,this.nextCollection=e}};if(typeof HTMLTemplateElement<`u`){let e=Object.getOwnPropertyDescriptor(Node.prototype,`firstChild`).get;Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:e.call(this)}})}const H=t(!1);function oe(t){if(i(H))return e.createElement(e.Fragment,null,t.children);let n=e.createElement(H.Provider,{value:!0},t.children);return e.createElement(`template`,{"data-react-aria-hidden":!0},n)}const se=t(!1),U=t(null);function W(t){if(i(U))return t.content;let{collection:n,document:r}=ue(t.createCollection);return e.createElement(e.Fragment,null,e.createElement(oe,null,e.createElement(U.Provider,{value:r},t.content)),e.createElement(G,{render:t.children,collection:n}))}function G({collection:e,render:t}){return t(e)}function ce(e,t,n){let i=j(),a=o(i);a.current=i;let s=r(()=>a.current?n():t(),[t,n]);return c(e,s)}const le=typeof e.useSyncExternalStore==`function`?e.useSyncExternalStore:ce;function ue(e){let[t]=s(()=>new ae(e?.()||new R)),n=r(e=>t.subscribe(e),[t]),i=r(()=>{let e=t.getCollection();return t.isSSR&&t.resetAfterSSR(),e},[t]),a=r(()=>(t.isSSR=!0,t.getCollection()),[t]);return{collection:le(n,i,a),document:t}}const K=t(null);function de(e){var t;return t=class extends M{},t.type=e,t}function fe(t,n,a,o,s,c){typeof t==`string`&&(t=de(t));let l=r(e=>{e?.setProps(n,a,t,o,c)},[n,a,o,c,t]),u=i(K);if(u){let r=u.ownerDocument.nodesByProps.get(n);return r||(r=u.ownerDocument.createElement(t.type),r.setProps(n,a,t,o,c),u.appendChild(r),u.ownerDocument.updateCollection(),u.ownerDocument.nodesByProps.set(n,r)),s?e.createElement(K.Provider,{value:r},s):null}return e.createElement(t.type,{ref:l},s)}function pe(t,r){let a=({node:e})=>r(e.props,e.props.ref,e),o=n((n,o)=>{let s=i(_);if(!i(se)){if(r.length>=3)throw Error(r.name+` cannot be rendered outside a collection.`);return r(n,o)}return fe(t,n,o,`children`in n?n.children:null,null,t=>e.createElement(_.Provider,{value:s},e.createElement(a,{node:t})))});return o.displayName=r.name,o}const q=t({}),J=t({}),Y=t({}),me=t(null),he=t(null),X=t({}),Z=t({}),Q=t(null),$=t(null);pe(F,function(t,n,r){let s=i($),{isLoading:c,onLoadMore:d,scrollOffset:f,...p}=t,h=o(null),g=a(()=>({onLoadMore:d,collection:s?.collection,sentinelRef:h,scrollOffset:f}),[d,f,s?.collection]);m(g,h);let _=b({...p,id:void 0,children:r.rendered,defaultClassName:`react-aria-ListBoxLoadingIndicator`,values:void 0});return e.createElement(e.Fragment,null,e.createElement(`div`,{style:{position:`relative`,width:0,height:0},inert:u(!0)},e.createElement(`div`,{"data-testid":`loadMoreSentinel`,ref:h,style:{position:`absolute`,height:1,width:1}})),c&&_.children&&e.createElement(E.div,{...v(l(t,{global:!0}),{tabIndex:-1}),..._,role:`option`,ref:n},_.children))});const ge=t(null),_e=t(null),ve=t(null),ye=t(null),be=n(function(t,n){[t,n]=S(t,n,ve);let{children:r,isDisabled:i=!1,isInvalid:o=!1,isRequired:s=!1}=t,c=a(()=>e.createElement(Q.Provider,{value:{items:t.items??t.defaultItems}},typeof r==`function`?r({isOpen:!1,isDisabled:i,isInvalid:o,isRequired:s,defaultChildren:null}):r),[r,i,o,s,t.items,t.defaultItems]);return e.createElement(W,{content:c},r=>e.createElement(Se,{props:t,collection:r,comboBoxRef:n}))}),xe=[q,J,Z,X,Y];function Se({props:t,collection:n,comboBoxRef:i}){let{name:c,formValue:u=`key`,allowsCustomValue:d}=t;d&&(u=`text`);let{validationBehavior:f}=x(he)||{},p=t.validationBehavior??f??`native`,{contains:m}=te({sensitivity:`base`}),h=ne({...t,defaultFilter:t.defaultFilter||m,items:t.items,children:void 0,collection:n,validationBehavior:p}),_=o(null),v=o(null),y=o(null),S=o(null),[w,T]=C(!t[`aria-label`]&&!t[`aria-labelledby`]),{buttonProps:D,inputProps:O,listBoxProps:k,labelProps:A,descriptionProps:j,errorMessageProps:M,...N}=ee({...ie(t),label:T,inputRef:v,buttonRef:_,listBoxRef:y,popoverRef:S,name:u===`text`?c:void 0,validationBehavior:p},h),[P,F]=s(null),I=r(()=>{if(v.current){let e=_.current?.getBoundingClientRect(),t=v.current.getBoundingClientRect(),n=e?Math.min(e.left,t.left):t.left,r=e?Math.max(e.right,t.right):t.right;F(r-n+`px`)}},[_,v,F]);g({ref:v,onResize:I});let L=a(()=>({isOpen:h.isOpen,isDisabled:t.isDisabled||!1,isInvalid:N.isInvalid||!1,isRequired:t.isRequired||!1}),[h.isOpen,t.isDisabled,N.isInvalid,t.isRequired]),R=b({...t,values:L,defaultClassName:`react-aria-ComboBox`}),z=l(t,{global:!0});return delete z.id,e.createElement(re,{values:[[ye,h],[q,{...A,ref:w}],[J,{...D,ref:_,isPressed:h.isOpen}],[Z,{...O,ref:v}],[_e,h],[ge,{ref:S,triggerRef:v,scrollRef:y,placement:`bottom start`,isNonModal:!0,trigger:`ComboBox`,style:{"--trigger-width":P},clearContexts:xe}],[Q,{...k,ref:y}],[$,h],[Y,{slots:{description:j,errorMessage:M}}],[X,{isInvalid:N.isInvalid,isDisabled:t.isDisabled||!1}],[me,N]]},e.createElement(E.div,{...z,...R,ref:i,slot:t.slot||void 0,"data-focused":h.isFocused||void 0,"data-open":h.isOpen||void 0,"data-disabled":t.isDisabled||void 0,"data-invalid":N.isInvalid||void 0,"data-required":t.isRequired||void 0}),c&&u===`key`&&e.createElement(`input`,{type:`hidden`,name:c,form:t.form,value:h.selectedKey??``}))}export{be as ComboBox};
@@ -1,2 +1,2 @@
1
- import { t as DatePicker } from "../DatePicker-C5inJMib.js";
1
+ import { t as DatePicker } from "../DatePicker-DIad7xyY.js";
2
2
  export { DatePicker };
@@ -1,2 +1,2 @@
1
- import { t as DateRangePicker } from "../DateRangePicker-BcYoPnDA.js";
1
+ import { t as DateRangePicker } from "../DateRangePicker-0vELBNcS.js";
2
2
  export { DateRangePicker };
@@ -1,2 +1,2 @@
1
- import { t as DateTimePicker } from "../DateTimePicker-CocJ2QGc.js";
1
+ import { t as DateTimePicker } from "../DateTimePicker-ChVdA0tD.js";
2
2
  export { DateTimePicker };
@@ -1,6 +1,6 @@
1
1
  import { t as clsx } from "../clsx-CnD0nOiA.js";
2
- import { n as $de32f1b87079253c$export$3ddf2d174ce01153, t as $de32f1b87079253c$export$2e1e1122cf0cba88 } from "../Dialog-CYPAuk4r.js";
3
- import { n as $f3f84453ead64de5$export$8948f78d83984c69, t as $f3f84453ead64de5$export$2b77a92f1a5ad772 } from "../Modal-BbiLj4ai.js";
2
+ import { n as $de32f1b87079253c$export$3ddf2d174ce01153, t as $de32f1b87079253c$export$2e1e1122cf0cba88 } from "../Dialog-B5J6LRRw.js";
3
+ import { n as $f3f84453ead64de5$export$8948f78d83984c69, t as $f3f84453ead64de5$export$2b77a92f1a5ad772 } from "../Modal-CEJ2QkF0.js";
4
4
  import { r as modalOverlay } from "../modal.cva-CbziPHSN.js";
5
5
  import { c } from "react/compiler-runtime";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";