@synnaxlabs/pluto 0.32.0 → 0.32.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/dist/{Animated-NyYe8Svx.js → Animated-m1d-q2MY.js} +1 -1
  2. package/dist/{Animated-C_WGrQwR.cjs → Animated-vgeFXXXh.cjs} +1 -1
  3. package/dist/{Item-CcXMlZIY.js → Item-AKMko1DZ.js} +3 -3
  4. package/dist/{Item-DGKnKb6c.cjs → Item-CzgByHQ2.cjs} +1 -1
  5. package/dist/{Keyboard-i5fqTDMP.js → Keyboard-DWCElMA3.js} +1 -1
  6. package/dist/{Keyboard-87LPq07J.cjs → Keyboard-Dy7Q9I4w.cjs} +1 -1
  7. package/dist/Link-BLs4o2WZ.js +11 -0
  8. package/dist/Link-DAjbmQEI.cjs +1 -0
  9. package/dist/{List-B3WCj8GQ.cjs → List-C8Cd_qEK.cjs} +1 -1
  10. package/dist/{List-BjRQA8wb.js → List-CVxaH1Gv.js} +1 -1
  11. package/dist/{Text-XcCNQVZj.cjs → Text-DwK7WZwz.cjs} +1 -1
  12. package/dist/{Text-MNWCdS6X.js → Text-ZWBNDAJX.js} +2 -2
  13. package/dist/{Toggle-C1k6Tnpo.js → Toggle-BQtgHKds.js} +3120 -3116
  14. package/dist/{Toggle-CIXrEiVA.cjs → Toggle-Cu_t9VPe.cjs} +23 -23
  15. package/dist/button.cjs +1 -1
  16. package/dist/button.js +1 -1
  17. package/dist/color.cjs +1 -1
  18. package/dist/color.js +1 -1
  19. package/dist/dropdown.cjs +1 -1
  20. package/dist/dropdown.js +1 -1
  21. package/dist/{external-DfIxCAg2.js → external-0qSQW-rW.js} +1 -1
  22. package/dist/{external-CDChKvhl.cjs → external-1AgJfGUo.cjs} +1 -1
  23. package/dist/{external-BUjAebk2.cjs → external-2HiPz4gN.cjs} +1 -1
  24. package/dist/{external-DmJZ_zIB.js → external-B22Cd5L_.js} +2 -2
  25. package/dist/{external-C2Ri5xWS.cjs → external-BAqZitjw.cjs} +1 -1
  26. package/dist/{external-FeE2ijEU.js → external-BGO9o6o7.js} +5 -5
  27. package/dist/{external-BryXmBqR.js → external-BIcOl3QR.js} +1 -1
  28. package/dist/{external-kSaQF2Vi.js → external-BSbQ1fB2.js} +2 -2
  29. package/dist/{external-CSyZPKK4.cjs → external-BVWCSwPk.cjs} +1 -1
  30. package/dist/{external-DAQPXD3z.cjs → external-Bcj4ayXg.cjs} +1 -1
  31. package/dist/{external-CDGv7k3p.js → external-BiVAfJDo.js} +9 -9
  32. package/dist/{external-CIvyZ-Hc.js → external-BswSNc0P.js} +2 -2
  33. package/dist/{external-CmbBTupJ.js → external-BxSZ_pLZ.js} +1 -1
  34. package/dist/{external-DLa89w3J.cjs → external-CCY3TmGe.cjs} +1 -1
  35. package/dist/{external-cIvhYaqB.cjs → external-COZBfuIe.cjs} +1 -1
  36. package/dist/{external-i13duWIn.cjs → external-CR7eRU7I.cjs} +1 -1
  37. package/dist/{external-CN-OhewX.cjs → external-CV8q9dy8.cjs} +1 -1
  38. package/dist/{external-CbjdO9a0.js → external-CWLnWzN8.js} +32 -32
  39. package/dist/{external-BI9DOL9G.js → external-Co3i1qex.js} +24 -24
  40. package/dist/{external-DE4i3A2z.cjs → external-Cqh9AY74.cjs} +1 -1
  41. package/dist/{external-CNrnZ1L5.js → external-CyqJB_UP.js} +13 -13
  42. package/dist/{external-DjE3je-g.cjs → external-DNl6ut74.cjs} +1 -1
  43. package/dist/header.cjs +1 -1
  44. package/dist/header.js +1 -1
  45. package/dist/index.cjs +1 -1
  46. package/dist/index.js +187 -187
  47. package/dist/input.cjs +1 -1
  48. package/dist/input.js +1 -1
  49. package/dist/list.cjs +1 -1
  50. package/dist/list.js +1 -1
  51. package/dist/menu.cjs +1 -1
  52. package/dist/menu.js +1 -1
  53. package/dist/src/button/Link.d.ts +2 -1
  54. package/dist/src/button/Link.d.ts.map +1 -1
  55. package/dist/tabs.cjs +1 -1
  56. package/dist/tabs.js +1 -1
  57. package/dist/text.cjs +1 -1
  58. package/dist/text.js +2 -2
  59. package/dist/theming.cjs +1 -1
  60. package/dist/theming.js +2 -2
  61. package/dist/tree.cjs +1 -1
  62. package/dist/tree.js +1 -1
  63. package/dist/triggers.cjs +1 -1
  64. package/dist/triggers.js +1 -1
  65. package/package.json +5 -5
  66. package/dist/Link-B83uKMKM.cjs +0 -1
  67. package/dist/Link-DlC5z0Wm.js +0 -10
package/dist/button.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./external-C2Ri5xWS.cjs");exports.Button=e.external;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./external-BAqZitjw.cjs");exports.Button=e.external;
package/dist/button.js CHANGED
@@ -1,4 +1,4 @@
1
- import { e } from "./external-CIvyZ-Hc.js";
1
+ import { e } from "./external-BswSNc0P.js";
2
2
  export {
3
3
  e as Button
4
4
  };
package/dist/color.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./external-DjE3je-g.cjs");exports.Color=e.external;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./external-DNl6ut74.cjs");exports.Color=e.external;
package/dist/color.js CHANGED
@@ -1,4 +1,4 @@
1
- import { e } from "./external-CDGv7k3p.js";
1
+ import { e } from "./external-BiVAfJDo.js";
2
2
  export {
3
3
  e as Color
4
4
  };
package/dist/dropdown.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Toggle-CIXrEiVA.cjs");exports.Dropdown=e.Dropdown;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Toggle-Cu_t9VPe.cjs");exports.Dropdown=e.Dropdown;
package/dist/dropdown.js CHANGED
@@ -1,4 +1,4 @@
1
- import { D as p } from "./Toggle-C1k6Tnpo.js";
1
+ import { D as p } from "./Toggle-BQtgHKds.js";
2
2
  export {
3
3
  p as Dropdown
4
4
  };
@@ -1,5 +1,5 @@
1
1
  import { S as e, a as t, b as a, t as r } from "./aggregator-f5OfPmNc.js";
2
- import { P as s, S as o, t as S, u, a as i, b as n, c as m } from "./Toggle-C1k6Tnpo.js";
2
+ import { P as s, S as o, t as S, u, a as i, b as n, c as m } from "./Toggle-BQtgHKds.js";
3
3
  const p = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4
4
  __proto__: null,
5
5
  Provider: s,
@@ -1 +1 @@
1
- "use strict";const S=require("./aggregator-q0CY7-QS.cjs"),e=require("./Toggle-CIXrEiVA.cjs"),A=require("./Keyboard-87LPq07J.cjs"),o=require("./jsx-runtime-Cek9Ww4S.cjs"),L=require("react"),R=require("./Pack-C_SrDA3a.cjs"),M=require("./Animated-C_WGrQwR.cjs"),y=require("./css-LxkguM_s.cjs"),P=require("./List-B3WCj8GQ.cjs"),z=[],B=({data:t,emptyContent:n,value:s,onChange:l,allowMultiple:u,allowNone:d,hideColumnHeader:i=!1,columns:E=z,visible:x,itemHeight:m=e.Column.itemHeight,listItem:p=e.componentRenderProp(e.Column.Item),replaceOnSingle:r,omit:b,autoSelectOnNone:C,trigger:f,extraDialogContent:h,variant:a="connected",...k})=>{let j=o.jsxRuntimeExports.jsxs(e.Hover,{disabled:!x,children:[h,o.jsxRuntimeExports.jsx(e.Column.Header,{hide:i||p!=null,columns:E,children:o.jsxRuntimeExports.jsx(e.Core.Virtual,{itemHeight:m,children:p})})]});return a!=="connected"&&(j=o.jsxRuntimeExports.jsx(R.Pack,{direction:"y",borderShade:4,className:y.CSS.B("select-dialog-content"),children:j})),o.jsxRuntimeExports.jsx(P.List,{data:t,emptyContent:n,omit:b,children:o.jsxRuntimeExports.jsx(e.Selector,{value:s,onChange:l,allowMultiple:u,allowNone:d,replaceOnSingle:r,autoSelectOnNone:C,children:o.jsxRuntimeExports.jsxs(e.Dialog,{visible:x,className:y.CSS.B("select"),keepMounted:!1,variant:a,...k,children:[f,j]})})})},g=({children:t=N,value:n,onChange:s,entryRenderKey:l="key",allowNone:u=!1,allowMultiple:d=!1,data:i,replaceOnSingle:E,className:x,...m})=>{const{onSelect:p}=e.useSelect({allowMultiple:d,allowNone:u,replaceOnSingle:E,data:i,value:n,onChange:s});return o.jsxRuntimeExports.jsx(R.Pack,{borderShade:4,className:y.CSS(y.CSS.B("select-button"),x),...m,children:i.map(r=>t({key:r.key,onClick:()=>p(r.key),selected:r.key===n,entry:r,title:r[l]}))})},N=({entry:t,onClick:n,selected:s,title:l})=>o.jsxRuntimeExports.jsx(e.Button,{onClick:n,variant:s?"filled":"outlined",children:l},t.key),D=({selected:t,renderKey:n,toggle:s,visible:l,children:u,...d})=>o.jsxRuntimeExports.jsx(e.Button,{className:y.CSS.B("select-dropdown-button"),onClick:s,variant:"outlined",endIcon:o.jsxRuntimeExports.jsx(M.Animated,{enabledLoc:"bottom",disabledLoc:"left",enabled:l}),...d,children:u??(t==null?void 0:t[n])}),T=e.componentRenderProp(D),_=({data:t,value:n,columns:s=[],children:l=T,entryRenderKey:u="key",allowNone:d=!1,onChange:i,disabled:E,hideColumnHeader:x=!0,variant:m,dropdownVariant:p,...r})=>{const{close:b,visible:C,toggle:f}=e.use$2(),[h,a]=L.useState((t==null?void 0:t.find(c=>c.key===n))??null);L.useEffect(()=>{a((t==null?void 0:t.find(c=>c.key===n))??null)},[t,n]);const k=L.useCallback((c,v)=>{if(!(Array.isArray(c)||c===null)){if(b(),c==null)return a(null),i(n);a(v.entries[0]),i(c)}},[i,n,b,a]),j={selected:h,renderKey:u,toggle:f,visible:C};return m!=null&&(j.variant=m),o.jsxRuntimeExports.jsx(B,{close:b,data:t,visible:C,value:n,onChange:k,allowMultiple:!1,allowNone:d,columns:s,hideColumnHeader:x,variant:p,trigger:o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:l(j)}),...r})},w=[{key:"h2",label:"XL"},{key:"h3",label:"L"},{key:"h4",label:"M"},{key:"p",label:"S"},{key:"small",label:"XS"}],K=({key:t,entry:n,onClick:s,selected:l})=>o.jsxRuntimeExports.jsx(e.Button,{variant:l?"filled":"outlined",onClick:s,children:n.label},t),q=({children:t=K,...n})=>o.jsxRuntimeExports.jsx(g,{...n,data:w,children:t}),O=Object.freeze(Object.defineProperty({__proto__:null,ComponentSizeLevels:S.ComponentSizeLevels,CoreDateTime:e.CoreDateTime,DateTime:e.DateTime,Editable:e.Editable,Keyboard:A.Keyboard,LEVELS:S.LEVELS,LevelComponentSizes:S.LevelComponentSizes,Link:e.Link,MaybeEditable:e.MaybeEditable,SelectLevel:q,Symbols:e.Symbols,Text:e.Text,WithIcon:e.WithIcon,asyncEdit:e.asyncEdit,dimensions:S.dimensions,edit:e.edit,evalColor:e.evalColor,formatChildren:e.formatChildren,levelZ:S.levelZ,specZ:S.specZ},Symbol.toStringTag,{value:"Module"}));exports.BaseButton=D;exports.Button=g;exports.Core=B;exports.DropdownButton=_;exports.SelectLevel=q;exports.defaultButton=T;exports.external=O;
1
+ "use strict";const S=require("./aggregator-q0CY7-QS.cjs"),e=require("./Toggle-Cu_t9VPe.cjs"),A=require("./Keyboard-Dy7Q9I4w.cjs"),o=require("./jsx-runtime-Cek9Ww4S.cjs"),L=require("react"),R=require("./Pack-C_SrDA3a.cjs"),M=require("./Animated-vgeFXXXh.cjs"),y=require("./css-LxkguM_s.cjs"),P=require("./List-C8Cd_qEK.cjs"),z=[],B=({data:t,emptyContent:n,value:s,onChange:l,allowMultiple:u,allowNone:d,hideColumnHeader:i=!1,columns:E=z,visible:x,itemHeight:m=e.Column.itemHeight,listItem:p=e.componentRenderProp(e.Column.Item),replaceOnSingle:r,omit:b,autoSelectOnNone:C,trigger:f,extraDialogContent:h,variant:a="connected",...k})=>{let j=o.jsxRuntimeExports.jsxs(e.Hover,{disabled:!x,children:[h,o.jsxRuntimeExports.jsx(e.Column.Header,{hide:i||p!=null,columns:E,children:o.jsxRuntimeExports.jsx(e.Core.Virtual,{itemHeight:m,children:p})})]});return a!=="connected"&&(j=o.jsxRuntimeExports.jsx(R.Pack,{direction:"y",borderShade:4,className:y.CSS.B("select-dialog-content"),children:j})),o.jsxRuntimeExports.jsx(P.List,{data:t,emptyContent:n,omit:b,children:o.jsxRuntimeExports.jsx(e.Selector,{value:s,onChange:l,allowMultiple:u,allowNone:d,replaceOnSingle:r,autoSelectOnNone:C,children:o.jsxRuntimeExports.jsxs(e.Dialog,{visible:x,className:y.CSS.B("select"),keepMounted:!1,variant:a,...k,children:[f,j]})})})},g=({children:t=N,value:n,onChange:s,entryRenderKey:l="key",allowNone:u=!1,allowMultiple:d=!1,data:i,replaceOnSingle:E,className:x,...m})=>{const{onSelect:p}=e.useSelect({allowMultiple:d,allowNone:u,replaceOnSingle:E,data:i,value:n,onChange:s});return o.jsxRuntimeExports.jsx(R.Pack,{borderShade:4,className:y.CSS(y.CSS.B("select-button"),x),...m,children:i.map(r=>t({key:r.key,onClick:()=>p(r.key),selected:r.key===n,entry:r,title:r[l]}))})},N=({entry:t,onClick:n,selected:s,title:l})=>o.jsxRuntimeExports.jsx(e.Button,{onClick:n,variant:s?"filled":"outlined",children:l},t.key),D=({selected:t,renderKey:n,toggle:s,visible:l,children:u,...d})=>o.jsxRuntimeExports.jsx(e.Button,{className:y.CSS.B("select-dropdown-button"),onClick:s,variant:"outlined",endIcon:o.jsxRuntimeExports.jsx(M.Animated,{enabledLoc:"bottom",disabledLoc:"left",enabled:l}),...d,children:u??(t==null?void 0:t[n])}),T=e.componentRenderProp(D),_=({data:t,value:n,columns:s=[],children:l=T,entryRenderKey:u="key",allowNone:d=!1,onChange:i,disabled:E,hideColumnHeader:x=!0,variant:m,dropdownVariant:p,...r})=>{const{close:b,visible:C,toggle:f}=e.use$2(),[h,a]=L.useState((t==null?void 0:t.find(c=>c.key===n))??null);L.useEffect(()=>{a((t==null?void 0:t.find(c=>c.key===n))??null)},[t,n]);const k=L.useCallback((c,v)=>{if(!(Array.isArray(c)||c===null)){if(b(),c==null)return a(null),i(n);a(v.entries[0]),i(c)}},[i,n,b,a]),j={selected:h,renderKey:u,toggle:f,visible:C};return m!=null&&(j.variant=m),o.jsxRuntimeExports.jsx(B,{close:b,data:t,visible:C,value:n,onChange:k,allowMultiple:!1,allowNone:d,columns:s,hideColumnHeader:x,variant:p,trigger:o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:l(j)}),...r})},w=[{key:"h2",label:"XL"},{key:"h3",label:"L"},{key:"h4",label:"M"},{key:"p",label:"S"},{key:"small",label:"XS"}],K=({key:t,entry:n,onClick:s,selected:l})=>o.jsxRuntimeExports.jsx(e.Button,{variant:l?"filled":"outlined",onClick:s,children:n.label},t),q=({children:t=K,...n})=>o.jsxRuntimeExports.jsx(g,{...n,data:w,children:t}),O=Object.freeze(Object.defineProperty({__proto__:null,ComponentSizeLevels:S.ComponentSizeLevels,CoreDateTime:e.CoreDateTime,DateTime:e.DateTime,Editable:e.Editable,Keyboard:A.Keyboard,LEVELS:S.LEVELS,LevelComponentSizes:S.LevelComponentSizes,Link:e.Link,MaybeEditable:e.MaybeEditable,SelectLevel:q,Symbols:e.Symbols,Text:e.Text,WithIcon:e.WithIcon,asyncEdit:e.asyncEdit,dimensions:S.dimensions,edit:e.edit,evalColor:e.evalColor,formatChildren:e.formatChildren,levelZ:S.levelZ,specZ:S.specZ},Symbol.toStringTag,{value:"Module"}));exports.BaseButton=D;exports.Button=g;exports.Core=B;exports.DropdownButton=_;exports.SelectLevel=q;exports.defaultButton=T;exports.external=O;
@@ -1 +1 @@
1
- "use strict";const r=require("./aggregator-q0CY7-QS.cjs"),e=require("./Toggle-CIXrEiVA.cjs"),t=Object.freeze(Object.defineProperty({__proto__:null,Provider:e.Provider,SYNNAX_DARK:r.SYNNAX_DARK,SYNNAX_LIGHT:r.SYNNAX_LIGHT,SYNNAX_THEMES:r.SYNNAX_THEMES,Switch:e.Switch,get Theming(){return t},themeZ:r.themeZ,toCSSVars:e.toCSSVars,use:e.use,useContext:e.useContext,useProvider:e.useProvider,useTypography:e.useTypography},Symbol.toStringTag,{value:"Module"}));exports.external=t;
1
+ "use strict";const r=require("./aggregator-q0CY7-QS.cjs"),e=require("./Toggle-Cu_t9VPe.cjs"),t=Object.freeze(Object.defineProperty({__proto__:null,Provider:e.Provider,SYNNAX_DARK:r.SYNNAX_DARK,SYNNAX_LIGHT:r.SYNNAX_LIGHT,SYNNAX_THEMES:r.SYNNAX_THEMES,Switch:e.Switch,get Theming(){return t},themeZ:r.themeZ,toCSSVars:e.toCSSVars,use:e.use,useContext:e.useContext,useProvider:e.useProvider,useTypography:e.useTypography},Symbol.toStringTag,{value:"Module"}));exports.external=t;
@@ -1,5 +1,5 @@
1
- import { C as e, d as t, e as o, f as a } from "./Toggle-C1k6Tnpo.js";
2
- import { C as n, D as s, I as r, a as u, b as C, M as m, c as T, u as i } from "./Item-CcXMlZIY.js";
1
+ import { C as e, d as t, e as o, f as a } from "./Toggle-BQtgHKds.js";
2
+ import { C as n, D as s, I as r, a as u, b as C, M as m, c as T, u as i } from "./Item-AKMko1DZ.js";
3
3
  const x = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4
4
  __proto__: null,
5
5
  CONTEXT_SELECTED: e,
@@ -1 +1 @@
1
- "use strict";const e=require("./Toggle-CIXrEiVA.cjs"),o=require("./Link-B83uKMKM.cjs"),n=Object.freeze(Object.defineProperty({__proto__:null,Button:e.Button,Icon:e.Icon,Link:o.Link,Toggle:e.Toggle,ToggleIcon:e.ToggleIcon},Symbol.toStringTag,{value:"Module"}));exports.external=n;
1
+ "use strict";const e=require("./Toggle-Cu_t9VPe.cjs"),o=require("./Link-DAjbmQEI.cjs"),n=Object.freeze(Object.defineProperty({__proto__:null,Button:e.Button,Icon:e.Icon,Link:o.Link,Toggle:e.Toggle,ToggleIcon:e.ToggleIcon},Symbol.toStringTag,{value:"Module"}));exports.external=n;
@@ -1,10 +1,10 @@
1
- import { n as d, i as x, o as p, A as M, p as b, K as S, M as y, q as R, r as T, s as K, v as C, w as _, x as v, y as L, z as j, E as O, F as h, G as k, H as w, J as A, L as H, N as Z, O as P, Q as U, R as Y, U as N } from "./Toggle-C1k6Tnpo.js";
1
+ import { n as d, i as x, o as p, A as M, p as b, K as S, M as y, q as R, r as T, s as K, v as C, w as _, x as v, y as L, z as j, E as O, F as h, G as k, H as w, J as A, L as H, N as Z, O as P, Q as Y, R as N, V as U } from "./Toggle-BQtgHKds.js";
2
2
  import { j as q } from "./jsx-runtime-B6kdoens.js";
3
3
  import { useState as z, useEffect as F, useRef as g, useCallback as f } from "react";
4
4
  import "./aggregator-f5OfPmNc.js";
5
5
  import { q as i, T as l } from "./css-B8RwzK24.js";
6
6
  import "./Pack-BrxYNh7B.js";
7
- import { T as I, t as G } from "./Text-MNWCdS6X.js";
7
+ import { T as I, t as G } from "./Text-ZWBNDAJX.js";
8
8
  const J = (e) => {
9
9
  const { listen: a } = d(), [c, n] = z([]);
10
10
  return F(
@@ -66,9 +66,9 @@ const J = (e) => {
66
66
  use: p,
67
67
  useContext: d,
68
68
  useDrag: Q,
69
- useFlattenedMemoConfig: U,
70
- useHeld: Y,
71
- useHeldRef: N
69
+ useFlattenedMemoConfig: Y,
70
+ useHeld: N,
71
+ useHeldRef: U
72
72
  }, Symbol.toStringTag, { value: "Module" }));
73
73
  export {
74
74
  se as e,
@@ -1,4 +1,4 @@
1
- import { ak as T, i as D, al as N, am as O, an as I, ao as w, ap as z, aq as A, ar as B, as as C, at as _ } from "./Toggle-C1k6Tnpo.js";
1
+ import { ak as T, i as D, al as N, am as O, an as I, ao as w, ap as z, aq as A, ar as B, as as C, at as _ } from "./Toggle-BQtgHKds.js";
2
2
  import { j as t } from "./jsx-runtime-B6kdoens.js";
3
3
  import { m as S, y as k } from "./aggregator-f5OfPmNc.js";
4
4
  import { useState as q } from "react";
@@ -1,10 +1,10 @@
1
- import { a1 as le, au as Ae, ak as Oe, ab as ke, av as Le, a5 as Re, l as Ce, aa as je, aw as $e, ax as ve, a6 as Ne, ay as Fe, az as Te, aA as Pe, aB as De, aC as Ke, ac as We, aD as ze, aE as He, a0 as Ve, aF as Be, aG as Ge, aH as Ue } from "./Toggle-C1k6Tnpo.js";
1
+ import { a1 as le, au as Ae, ak as Oe, ab as ke, av as Le, a5 as Re, l as Ce, aa as je, aw as $e, ax as ve, a6 as Ne, ay as Fe, az as Te, aA as Pe, aB as De, aC as Ke, ac as We, aD as ze, aE as He, a0 as Ve, aF as Be, aG as Ge, aH as Ue } from "./Toggle-BQtgHKds.js";
2
2
  import { j as Ye } from "./jsx-runtime-B6kdoens.js";
3
3
  import { useCallback as Qe } from "react";
4
4
  import { w as Xe, j as Je } from "./aggregator-f5OfPmNc.js";
5
5
  import "./css-B8RwzK24.js";
6
6
  import "./Pack-BrxYNh7B.js";
7
- import { L as Ze } from "./List-BjRQA8wb.js";
7
+ import { L as Ze } from "./List-CVxaH1Gv.js";
8
8
  const K = Symbol(), he = Symbol(), Q = Symbol();
9
9
  let qe = (t, e) => new Proxy(t, e);
10
10
  const W = Object.getPrototypeOf, te = /* @__PURE__ */ new WeakMap(), X = (t) => t && (te.has(t) ? te.get(t) : W(t) === Object.prototype || W(t) === Array.prototype), se = (t) => typeof t == "object" && t !== null, re = /* @__PURE__ */ new WeakMap(), ue = (t) => t[Q] || t, fe = (t, e, s) => {
@@ -1 +1 @@
1
- "use strict";const e=require("./Toggle-CIXrEiVA.cjs"),M=require("./jsx-runtime-Cek9Ww4S.cjs"),u=require("react");require("./aggregator-q0CY7-QS.cjs");const o=require("./css-LxkguM_s.cjs");require("./Pack-C_SrDA3a.cjs");const f=require("./Text-XcCNQVZj.cjs"),S=t=>{const{listen:i}=e.useContext$1(),[a,l]=u.useState([]);return u.useEffect(()=>i(({next:[r]})=>l(r??[])),[i,l]),M.jsxRuntimeExports.jsx(e.Text,{...t,children:a.join(" ")})},m=({onDrag:t,triggers:i=[["MouseLeft"],["MouseRight"]],bound:a,loose:l=!1})=>{const r=u.useRef(null),g=u.useRef(o.q.ZERO),d=u.useCallback(s=>{const n=o.q.construct(s);if(r.current===null)return;const{triggers:c}=r.current;t({box:o.To.construct(g.current,n),cursor:n,triggers:c,stage:"during"})},[t]),E=u.useCallback(s=>{const{stage:n,cursor:c}=s;n==="start"?(t({box:o.To.construct(c),...s}),window.addEventListener("mousemove",d),r.current=s,g.current=c):n==="end"&&r.current!=null&&(t({box:o.To.construct(g.current,c),...s}),window.removeEventListener("mousemove",d),r.current=null,g.current=o.q.ZERO)},[t]);e.use$1({triggers:i,callback:E,region:a,loose:l})},x=Object.freeze(Object.defineProperty({__proto__:null,ALPHANUMERIC_KEYS:e.ALPHANUMERIC_KEYS,ALPHANUMERIC_KEYS_SET:e.ALPHANUMERIC_KEYS_SET,KEYS:e.KEYS,MOUSE_KEYS:e.MOUSE_KEYS,Provider:e.Provider$1,Status:S,Text:f.Text,compareModeConfigs:e.compareModeConfigs,determineMode:e.determineMode,diff:e.diff,eventKey:e.eventKey,filter:e.filter,flattenConfig:e.flattenConfig,keyZ:e.keyZ,keyboardKey:e.keyboardKey,match:e.match,matchCallback:e.matchCallback,mouseKey:e.mouseKey,mouseKeyZ:e.mouseKeyZ,purge:e.purge,purgeMouse:e.purgeMouse,toSymbols:f.toSymbols,triggerZ:e.triggerZ,use:e.use$1,useContext:e.useContext$1,useDrag:m,useFlattenedMemoConfig:e.useFlattenedMemoConfig,useHeld:e.useHeld,useHeldRef:e.useHeldRef},Symbol.toStringTag,{value:"Module"}));exports.external=x;exports.useDrag=m;
1
+ "use strict";const e=require("./Toggle-Cu_t9VPe.cjs"),M=require("./jsx-runtime-Cek9Ww4S.cjs"),u=require("react");require("./aggregator-q0CY7-QS.cjs");const o=require("./css-LxkguM_s.cjs");require("./Pack-C_SrDA3a.cjs");const f=require("./Text-DwK7WZwz.cjs"),S=t=>{const{listen:i}=e.useContext$1(),[a,l]=u.useState([]);return u.useEffect(()=>i(({next:[r]})=>l(r??[])),[i,l]),M.jsxRuntimeExports.jsx(e.Text,{...t,children:a.join(" ")})},m=({onDrag:t,triggers:i=[["MouseLeft"],["MouseRight"]],bound:a,loose:l=!1})=>{const r=u.useRef(null),g=u.useRef(o.q.ZERO),d=u.useCallback(s=>{const n=o.q.construct(s);if(r.current===null)return;const{triggers:c}=r.current;t({box:o.To.construct(g.current,n),cursor:n,triggers:c,stage:"during"})},[t]),E=u.useCallback(s=>{const{stage:n,cursor:c}=s;n==="start"?(t({box:o.To.construct(c),...s}),window.addEventListener("mousemove",d),r.current=s,g.current=c):n==="end"&&r.current!=null&&(t({box:o.To.construct(g.current,c),...s}),window.removeEventListener("mousemove",d),r.current=null,g.current=o.q.ZERO)},[t]);e.use$1({triggers:i,callback:E,region:a,loose:l})},x=Object.freeze(Object.defineProperty({__proto__:null,ALPHANUMERIC_KEYS:e.ALPHANUMERIC_KEYS,ALPHANUMERIC_KEYS_SET:e.ALPHANUMERIC_KEYS_SET,KEYS:e.KEYS,MOUSE_KEYS:e.MOUSE_KEYS,Provider:e.Provider$1,Status:S,Text:f.Text,compareModeConfigs:e.compareModeConfigs,determineMode:e.determineMode,diff:e.diff,eventKey:e.eventKey,filter:e.filter,flattenConfig:e.flattenConfig,keyZ:e.keyZ,keyboardKey:e.keyboardKey,match:e.match,matchCallback:e.matchCallback,mouseKey:e.mouseKey,mouseKeyZ:e.mouseKeyZ,purge:e.purge,purgeMouse:e.purgeMouse,toSymbols:f.toSymbols,triggerZ:e.triggerZ,use:e.use$1,useContext:e.useContext$1,useDrag:m,useFlattenedMemoConfig:e.useFlattenedMemoConfig,useHeld:e.useHeld,useHeldRef:e.useHeldRef},Symbol.toStringTag,{value:"Module"}));exports.external=x;exports.useDrag=m;
@@ -1 +1 @@
1
- "use strict";const t=require("./Toggle-CIXrEiVA.cjs"),s=require("./jsx-runtime-Cek9Ww4S.cjs"),j=require("./aggregator-q0CY7-QS.cjs"),h=require("react"),l=require("./css-LxkguM_s.cjs"),E=require("./Pack-C_SrDA3a.cjs"),C=({value:r,onChange:n,onBlur:e,onlyChangeOnBlur:a,...d})=>{const[m,c]=h.useState(null),x=(i,p=!1)=>{let u=i.toString();c(u);let o=new j.m(i,"UTC");u.length<23&&(u+=".000"),o=o.add(BigInt(j.m.now().date().getTimezoneOffset()-o.date().getTimezoneOffset())*j.y.MINUTE.valueOf());let T=!1;try{T=o.fString("ISO","local").slice(0,-1)===u}catch(y){console.error(y)}T&&!a&&(n(Number(o.valueOf())),c(null)),p&&(T&&n(Number(o.valueOf())),c(null))},g=i=>{x(i.target.value,!0),c(null),e==null||e(i)},S=i=>{a&&i.key==="Enter"&&i.currentTarget.blur()},f=new j.m(r,"UTC").fString("ISO","local").slice(0,-1);return s.jsxRuntimeExports.jsx(t.Text$1,{type:"datetime-local",onBlur:g,required:!1,onKeyDown:S,value:m??f,onChange:x,...d})},R=({className:r,variant:n="error",...e})=>s.jsxRuntimeExports.jsx(t.Text,{className:l.CSS(l.CSS.B("input-help-text"),l.CSS.BM("input-help-text",n),r),level:"small",...e}),D=({className:r,required:n=!1,children:e,...a})=>s.jsxRuntimeExports.jsxs("label",{className:l.CSS(l.CSS.B("input-label"),r),...a,children:[e," ",n&&s.jsxRuntimeExports.jsx("span",{className:l.CSS.B("required-indicator"),children:"*"})]}),v=(r,n="x")=>r??(l.g.construct(n)==="y"?"stretch":"center"),b=({label:r,showLabel:n=!0,helpText:e,direction:a="y",className:d,children:m,required:c,align:x,size:g="small",padHelpText:S=!1,helpTextVariant:f,showHelpText:i=!0,...p})=>{let u;return i===!1&&n===!1?s.jsxRuntimeExports.jsx(s.jsxRuntimeExports.Fragment,{children:m}):(a==="x"?u=s.jsxRuntimeExports.jsxs(E.Space,{direction:"y",size:"small",children:[m,(S||e!=null&&e.length>0)&&s.jsxRuntimeExports.jsx(R,{variant:f,children:e})]}):u=s.jsxRuntimeExports.jsxs(E.Space,{direction:"y",size:1/3,children:[m,(S||e!=null&&e.length>0)&&s.jsxRuntimeExports.jsx(R,{variant:f,children:e})]}),s.jsxRuntimeExports.jsxs(E.Space,{className:l.CSS(l.CSS.B("input-item"),d),direction:a,size:g,align:v(x,a),...p,children:[n&&s.jsxRuntimeExports.jsx(D,{required:c,children:r}),u]}))},N=Object.freeze(Object.defineProperty({__proto__:null,Date:t.Date,DateTime:C,DragButton:t.DragButton,HelpText:R,Item:b,Label:D,Numeric:t.Numeric,Switch:t.Switch$1,Text:t.Text$1,TextArea:t.TextArea,Time:t.Time,combineDateAndTimeValue:t.combineDateAndTimeValue,useDate:t.useDate,useTime:t.useTime},Symbol.toStringTag,{value:"Module"}));exports.Item=b;exports.external=N;
1
+ "use strict";const t=require("./Toggle-Cu_t9VPe.cjs"),s=require("./jsx-runtime-Cek9Ww4S.cjs"),j=require("./aggregator-q0CY7-QS.cjs"),h=require("react"),l=require("./css-LxkguM_s.cjs"),E=require("./Pack-C_SrDA3a.cjs"),C=({value:r,onChange:n,onBlur:e,onlyChangeOnBlur:a,...d})=>{const[m,c]=h.useState(null),x=(i,p=!1)=>{let u=i.toString();c(u);let o=new j.m(i,"UTC");u.length<23&&(u+=".000"),o=o.add(BigInt(j.m.now().date().getTimezoneOffset()-o.date().getTimezoneOffset())*j.y.MINUTE.valueOf());let T=!1;try{T=o.fString("ISO","local").slice(0,-1)===u}catch(y){console.error(y)}T&&!a&&(n(Number(o.valueOf())),c(null)),p&&(T&&n(Number(o.valueOf())),c(null))},g=i=>{x(i.target.value,!0),c(null),e==null||e(i)},S=i=>{a&&i.key==="Enter"&&i.currentTarget.blur()},f=new j.m(r,"UTC").fString("ISO","local").slice(0,-1);return s.jsxRuntimeExports.jsx(t.Text$1,{type:"datetime-local",onBlur:g,required:!1,onKeyDown:S,value:m??f,onChange:x,...d})},R=({className:r,variant:n="error",...e})=>s.jsxRuntimeExports.jsx(t.Text,{className:l.CSS(l.CSS.B("input-help-text"),l.CSS.BM("input-help-text",n),r),level:"small",...e}),D=({className:r,required:n=!1,children:e,...a})=>s.jsxRuntimeExports.jsxs("label",{className:l.CSS(l.CSS.B("input-label"),r),...a,children:[e," ",n&&s.jsxRuntimeExports.jsx("span",{className:l.CSS.B("required-indicator"),children:"*"})]}),v=(r,n="x")=>r??(l.g.construct(n)==="y"?"stretch":"center"),b=({label:r,showLabel:n=!0,helpText:e,direction:a="y",className:d,children:m,required:c,align:x,size:g="small",padHelpText:S=!1,helpTextVariant:f,showHelpText:i=!0,...p})=>{let u;return i===!1&&n===!1?s.jsxRuntimeExports.jsx(s.jsxRuntimeExports.Fragment,{children:m}):(a==="x"?u=s.jsxRuntimeExports.jsxs(E.Space,{direction:"y",size:"small",children:[m,(S||e!=null&&e.length>0)&&s.jsxRuntimeExports.jsx(R,{variant:f,children:e})]}):u=s.jsxRuntimeExports.jsxs(E.Space,{direction:"y",size:1/3,children:[m,(S||e!=null&&e.length>0)&&s.jsxRuntimeExports.jsx(R,{variant:f,children:e})]}),s.jsxRuntimeExports.jsxs(E.Space,{className:l.CSS(l.CSS.B("input-item"),d),direction:a,size:g,align:v(x,a),...p,children:[n&&s.jsxRuntimeExports.jsx(D,{required:c,children:r}),u]}))},N=Object.freeze(Object.defineProperty({__proto__:null,Date:t.Date,DateTime:C,DragButton:t.DragButton,HelpText:R,Item:b,Label:D,Numeric:t.Numeric,Switch:t.Switch$1,Text:t.Text$1,TextArea:t.TextArea,Time:t.Time,combineDateAndTimeValue:t.combineDateAndTimeValue,useDate:t.useDate,useTime:t.useTime},Symbol.toStringTag,{value:"Module"}));exports.Item=b;exports.external=N;
@@ -1,6 +1,6 @@
1
1
  import { C as r, a as l, Z as g, c as f, b as v, f as E, t as T } from "./css-B8RwzK24.js";
2
2
  import { j as c } from "./jsx-runtime-B6kdoens.js";
3
- import { V as A, W as C, u as H, X as M, Y as m, _ as N, B as O, i as R, $ as Z } from "./Toggle-C1k6Tnpo.js";
3
+ import { W as Z, X as A, u as C, Y as H, Z as m, _ as M, B as N, i as O, $ as R } from "./Toggle-BQtgHKds.js";
4
4
  import { useCallback as z } from "react";
5
5
  import "./aggregator-f5OfPmNc.js";
6
6
  import "./Pack-BrxYNh7B.js";
@@ -9,7 +9,7 @@ const k = ({ value: t, onChange: o, ...p }) => {
9
9
  e.hex === "transparent" && o(g), o(new l(e.hex, e.rgb.a));
10
10
  };
11
11
  return /* @__PURE__ */ c.jsx(
12
- A,
12
+ Z,
13
13
  {
14
14
  className: r.B("color-picker"),
15
15
  color: new l(t).hex,
@@ -28,13 +28,13 @@ const k = ({ value: t, onChange: o, ...p }) => {
28
28
  draggable: S = !0,
29
29
  ...y
30
30
  }) => {
31
- const { visible: b, open: w, close: j } = C({ onVisibleChange: e, initialVisible: h }), D = H().colors.gray.l0, s = new l(t), B = M(), d = z(
31
+ const { visible: b, open: w, close: j } = A({ onVisibleChange: e, initialVisible: h }), D = C().colors.gray.l0, s = new l(t), B = H(), d = z(
32
32
  ({ items: i }) => {
33
33
  const [a] = m(u, i);
34
34
  return a != null && a.key !== s.hex;
35
35
  },
36
36
  [s.hex]
37
- ), { startDrag: _, ...P } = N({
37
+ ), { startDrag: _, ...P } = M({
38
38
  type: "Color.Swatch",
39
39
  onDrop: ({ items: i }) => {
40
40
  const a = m(u, i);
@@ -42,7 +42,7 @@ const k = ({ value: t, onChange: o, ...p }) => {
42
42
  },
43
43
  canDrop: d
44
44
  }), x = /* @__PURE__ */ c.jsx(
45
- O,
45
+ N,
46
46
  {
47
47
  className: r(
48
48
  r.B("color-swatch"),
@@ -57,13 +57,13 @@ const k = ({ value: t, onChange: o, ...p }) => {
57
57
  variant: "text",
58
58
  onClick: w,
59
59
  size: n,
60
- tooltip: o != null ? /* @__PURE__ */ c.jsx(R, { level: "small", children: "Click to change color" }) : void 0,
60
+ tooltip: o != null ? /* @__PURE__ */ c.jsx(O, { level: "small", children: "Click to change color" }) : void 0,
61
61
  ...P,
62
62
  ...y
63
63
  }
64
64
  );
65
65
  return o == null ? x : /* @__PURE__ */ c.jsxs(
66
- Z,
66
+ R,
67
67
  {
68
68
  close: j,
69
69
  visible: b,
@@ -77,7 +77,7 @@ const k = ({ value: t, onChange: o, ...p }) => {
77
77
  ]
78
78
  }
79
79
  );
80
- }, X = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
80
+ }, q = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
81
81
  __proto__: null,
82
82
  Color: l,
83
83
  Picker: k,
@@ -90,5 +90,5 @@ const k = ({ value: t, onChange: o, ...p }) => {
90
90
  }, Symbol.toStringTag, { value: "Module" }));
91
91
  export {
92
92
  L as S,
93
- X as e
93
+ q as e
94
94
  };
@@ -1,5 +1,5 @@
1
- import { B as o, I as e, T as t, g as r } from "./Toggle-C1k6Tnpo.js";
2
- import { L as a } from "./Link-DlC5z0Wm.js";
1
+ import { B as o, I as e, T as t, g as r } from "./Toggle-BQtgHKds.js";
2
+ import { L as a } from "./Link-BLs4o2WZ.js";
3
3
  const g = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4
4
  __proto__: null,
5
5
  Button: o,
@@ -2,7 +2,7 @@ import { j as n } from "./jsx-runtime-B6kdoens.js";
2
2
  import { A as u, g as d } from "./aggregator-f5OfPmNc.js";
3
3
  import { createContext as v, useContext as j, isValidElement as f, Fragment as h } from "react";
4
4
  import { S as m } from "./Pack-BrxYNh7B.js";
5
- import { I as B, m as C, B as S, ah as b } from "./Toggle-C1k6Tnpo.js";
5
+ import { I as B, m as C, B as S, ah as b } from "./Toggle-BQtgHKds.js";
6
6
  import { C as a } from "./css-B8RwzK24.js";
7
7
  const x = v({
8
8
  divided: !1,
@@ -1 +1 @@
1
- "use strict";const l=require("./jsx-runtime-Cek9Ww4S.cjs"),u=require("./Toggle-CIXrEiVA.cjs"),S=require("react"),_=require("./Pack-C_SrDA3a.cjs"),r=require("./css-LxkguM_s.cjs"),z=require("./aggregator-q0CY7-QS.cjs");require("./Item-DGKnKb6c.cjs");const j=require("zod"),N=(n,s)=>S.cloneElement(n,{className:r.CSS(n.props.className,r.CSS.B("sub"),r.CSS.M(s))}),k=({topRight:n,topLeft:s,bottomLeft:e,bottomRight:o,children:t,className:c,...i})=>l.jsxRuntimeExports.jsxs("div",{className:r.CSS(c,r.CSS.B("icon")),...i,children:[n&&N(n,"topRight"),s&&N(s,"topLeft"),e&&N(e,"bottomLeft"),o&&N(o,"bottomRight"),t]}),X=n=>l.jsxRuntimeExports.jsx(k,{topRight:l.jsxRuntimeExports.jsx(u.Zt.Add,{}),...n}),$=n=>l.jsxRuntimeExports.jsx(k,{topRight:l.jsxRuntimeExports.jsx(u.Zt.Import,{}),...n}),y=(n,s)=>{if(n!=null){if(typeof n=="string"){const e=z._.get(u.Zt,n);return l.jsxRuntimeExports.jsx(e,{...s})}return S.cloneElement(n,s)}},G=Object.freeze(Object.defineProperty({__proto__:null,Create:X,Icon:k,Import:$,resolve:y},Symbol.toStringTag,{value:"Module"})),I=(n="",s=[])=>{var e;if(s.length!==0)return s.find(o=>o.tabKey===n)!=null?n:(e=s[s.length-1])==null?void 0:e.tabKey},Z=(n,s,e)=>{if(s=s.trim(),s.length===0)return e;const o=e.find(t=>t.tabKey===n);return o==null||o.name===s?e:e.map(t=>t.tabKey===n?{...t,name:s}:t)},M=({tabs:n,content:s,selected:e,onSelect:o})=>{var x;const[t,c]=z.usePurePassthrough({initial:e??((x=n[0])==null?void 0:x.tabKey)??"",value:e,onChange:o}),i=u.useSyncedRef(e??t),a=S.useCallback(p=>{c(p),i.current==null&&(o==null||o(p))},[t,o]);return{tabs:n,selected:t,content:s,onSelect:a}},P=S.createContext({tabs:[]}),O=P.Provider,q=()=>S.useContext(P),w=({id:n,content:s,children:e,onSelect:o,selected:t,selectedAltColor:c,closable:i,tabs:a,onClose:x,onDragStart:p,onDragEnd:b,onCreate:C,onRename:g,emptyContent:v,className:B,onDragOver:f,onDrop:R,contextMenu:m,size:E="medium",direction:T="y",...h})=>l.jsxRuntimeExports.jsx(_.Space,{id:n,empty:!0,className:r.CSS(r.CSS.B("tabs"),B),onDragOver:f,onDrop:R,direction:T,...h,children:l.jsxRuntimeExports.jsxs(O,{value:{tabs:a,emptyContent:v,selected:t,closable:i,content:e??s,onSelect:o,onClose:x,onDragStart:p,onDragEnd:b,onRename:g,onCreate:C,onDrop:R},children:[l.jsxRuntimeExports.jsx(A,{size:E,direction:r.g.swap(T),altColor:c,contextMenu:m}),l.jsxRuntimeExports.jsx(L,{})]})}),L=()=>{const{tabs:n,selected:s,content:e,emptyContent:o,onSelect:t}=q();let c=null;const i=n.find(a=>a.tabKey===s);return s==null||i==null?o??null:(e!=null?typeof e=="function"?c=e(i):c=e:i.content!=null&&(c=i.content),l.jsxRuntimeExports.jsx("div",{className:r.CSS.B("tabs-content"),onClick:()=>t==null?void 0:t(s),children:c}))},d="tabs-selector",A=({className:n,altColor:s=!1,size:e="medium",direction:o="x",contextMenu:t,...c})=>{const{tabs:i,selected:a,onSelect:x,onClose:p,closable:b,onDragEnd:C,onDragStart:g,onDrop:v,onRename:B,onCreate:f}=q(),R=u.useContextMenu(),m=l.jsxRuntimeExports.jsxs(_.Space,{className:r.CSS(r.CSS.B(d),r.CSS.size(e),n),align:"center",justify:"spaceBetween",onDrop:v,empty:!0,direction:o,...c,children:[l.jsxRuntimeExports.jsx(_.Space,{direction:o,className:r.CSS.BE(d,"tabs"),empty:!0,children:i.map(E=>l.jsxRuntimeExports.jsx(F,{selected:a,altColor:s,onSelect:x,onClose:p,onDragStart:g,onDragEnd:C,onRename:B,closable:E.closable??b,size:e,...E},E.tabKey))}),f!=null&&l.jsxRuntimeExports.jsx(_.Space,{className:r.CSS.BE(d,"actions"),children:l.jsxRuntimeExports.jsx(u.Icon,{size:e,sharp:!0,onClick:f,children:l.jsxRuntimeExports.jsx(u.Zt.Add,{})})})]});return t!=null?l.jsxRuntimeExports.jsx(u.ContextMenu,{style:{height:"fit-content"},...R,menu:t,children:m}):m},F=({selected:n,altColor:s=!1,onSelect:e,onClose:o,tabKey:t,name:c,onDragStart:i,onDragEnd:a,onRename:x,closable:p=!0,icon:b,size:C,editable:g=!0})=>{const v=S.useCallback(h=>i==null?void 0:i(h,{tabKey:t,name:c}),[i,t,c]),B=S.useCallback(h=>a==null?void 0:a(h,{tabKey:t,name:c}),[a,t,c]),f=S.useCallback(h=>{h.stopPropagation(),o==null||o(t)},[o,t]),R=S.useCallback(()=>e==null?void 0:e(t),[e,t]),m=n===t,E=b!=null,T=z.ComponentSizeLevels[C];return l.jsxRuntimeExports.jsxs(_.Pack,{size:C,id:t,className:r.CSS(r.CSS.BE(d,"btn"),u.CONTEXT_TARGET,x==null&&r.CSS.BEM(d,"btn","uneditable"),m&&u.CONTEXT_SELECTED,r.CSS.selected(m),r.CSS.altColor(s),p&&o!=null&&r.CSS.BEM(d,"btn","closable"),E&&r.CSS.BEM(d,"btn","has-icon")),draggable:!0,direction:"x",justify:"center",align:"center",onClick:R,onDragStart:v,onDragEnd:B,bordered:!1,rounded:!1,children:[y(b,{className:r.CSS.BE(d,"icon"),style:{color:r.CSS.shadeVar(7),height:r.CSS.levelSizeVar(T),width:r.CSS.levelSizeVar(T)}}),l.jsxRuntimeExports.jsx(H,{name:c,tabKey:t,onRename:x,editable:g,level:z.ComponentSizeLevels[C]}),p&&o!=null&&l.jsxRuntimeExports.jsx(u.Icon,{onClick:f,children:l.jsxRuntimeExports.jsx(u.Zt.Close,{"aria-label":"pluto-tabs__close"})})]})},H=({onRename:n,name:s,tabKey:e,editable:o=!0,...t})=>n==null||!o?l.jsxRuntimeExports.jsx(u.Text,{noWrap:!0,...t,children:s}):l.jsxRuntimeExports.jsx(u.Editable,{id:r.CSS.B(`tab-${e}`),onChange:c=>n(e,c),value:s,noWrap:!0,...t}),V=j.z.object({tabKey:j.z.string(),name:j.z.string(),closable:j.z.boolean().optional(),icon:j.z.unknown().optional(),editable:j.z.boolean().optional(),visible:j.z.boolean().optional()}),W=V.extend({content:j.z.unknown().optional()}),J=Object.freeze(Object.defineProperty({__proto__:null,Content:L,Context:P,Provider:O,Selector:A,Tabs:w,rename:Z,resetSelection:I,specZ:V,tabZ:W,useContext:q,useStatic:M},Symbol.toStringTag,{value:"Module"}));exports.Icon=G;exports.Tabs=w;exports.external=J;exports.rename=Z;exports.resetSelection=I;exports.resolve=y;exports.tabZ=W;exports.useStatic=M;
1
+ "use strict";const l=require("./jsx-runtime-Cek9Ww4S.cjs"),u=require("./Toggle-Cu_t9VPe.cjs"),S=require("react"),_=require("./Pack-C_SrDA3a.cjs"),r=require("./css-LxkguM_s.cjs"),z=require("./aggregator-q0CY7-QS.cjs");require("./Item-CzgByHQ2.cjs");const j=require("zod"),N=(n,s)=>S.cloneElement(n,{className:r.CSS(n.props.className,r.CSS.B("sub"),r.CSS.M(s))}),k=({topRight:n,topLeft:s,bottomLeft:e,bottomRight:o,children:t,className:c,...i})=>l.jsxRuntimeExports.jsxs("div",{className:r.CSS(c,r.CSS.B("icon")),...i,children:[n&&N(n,"topRight"),s&&N(s,"topLeft"),e&&N(e,"bottomLeft"),o&&N(o,"bottomRight"),t]}),W=n=>l.jsxRuntimeExports.jsx(k,{topRight:l.jsxRuntimeExports.jsx(u.Ut.Add,{}),...n}),X=n=>l.jsxRuntimeExports.jsx(k,{topRight:l.jsxRuntimeExports.jsx(u.Ut.Import,{}),...n}),y=(n,s)=>{if(n!=null){if(typeof n=="string"){const e=z._.get(u.Ut,n);return l.jsxRuntimeExports.jsx(e,{...s})}return S.cloneElement(n,s)}},$=Object.freeze(Object.defineProperty({__proto__:null,Create:W,Icon:k,Import:X,resolve:y},Symbol.toStringTag,{value:"Module"})),I=(n="",s=[])=>{var e;if(s.length!==0)return s.find(o=>o.tabKey===n)!=null?n:(e=s[s.length-1])==null?void 0:e.tabKey},M=(n,s,e)=>{if(s=s.trim(),s.length===0)return e;const o=e.find(t=>t.tabKey===n);return o==null||o.name===s?e:e.map(t=>t.tabKey===n?{...t,name:s}:t)},O=({tabs:n,content:s,selected:e,onSelect:o})=>{var x;const[t,c]=z.usePurePassthrough({initial:e??((x=n[0])==null?void 0:x.tabKey)??"",value:e,onChange:o}),i=u.useSyncedRef(e??t),a=S.useCallback(p=>{c(p),i.current==null&&(o==null||o(p))},[t,o]);return{tabs:n,selected:t,content:s,onSelect:a}},P=S.createContext({tabs:[]}),w=P.Provider,q=()=>S.useContext(P),U=({id:n,content:s,children:e,onSelect:o,selected:t,selectedAltColor:c,closable:i,tabs:a,onClose:x,onDragStart:p,onDragEnd:b,onCreate:C,onRename:g,emptyContent:v,className:B,onDragOver:f,onDrop:R,contextMenu:m,size:E="medium",direction:T="y",...h})=>l.jsxRuntimeExports.jsx(_.Space,{id:n,empty:!0,className:r.CSS(r.CSS.B("tabs"),B),onDragOver:f,onDrop:R,direction:T,...h,children:l.jsxRuntimeExports.jsxs(w,{value:{tabs:a,emptyContent:v,selected:t,closable:i,content:e??s,onSelect:o,onClose:x,onDragStart:p,onDragEnd:b,onRename:g,onCreate:C,onDrop:R},children:[l.jsxRuntimeExports.jsx(A,{size:E,direction:r.g.swap(T),altColor:c,contextMenu:m}),l.jsxRuntimeExports.jsx(L,{})]})}),L=()=>{const{tabs:n,selected:s,content:e,emptyContent:o,onSelect:t}=q();let c=null;const i=n.find(a=>a.tabKey===s);return s==null||i==null?o??null:(e!=null?typeof e=="function"?c=e(i):c=e:i.content!=null&&(c=i.content),l.jsxRuntimeExports.jsx("div",{className:r.CSS.B("tabs-content"),onClick:()=>t==null?void 0:t(s),children:c}))},d="tabs-selector",A=({className:n,altColor:s=!1,size:e="medium",direction:o="x",contextMenu:t,...c})=>{const{tabs:i,selected:a,onSelect:x,onClose:p,closable:b,onDragEnd:C,onDragStart:g,onDrop:v,onRename:B,onCreate:f}=q(),R=u.useContextMenu(),m=l.jsxRuntimeExports.jsxs(_.Space,{className:r.CSS(r.CSS.B(d),r.CSS.size(e),n),align:"center",justify:"spaceBetween",onDrop:v,empty:!0,direction:o,...c,children:[l.jsxRuntimeExports.jsx(_.Space,{direction:o,className:r.CSS.BE(d,"tabs"),empty:!0,children:i.map(E=>l.jsxRuntimeExports.jsx(G,{selected:a,altColor:s,onSelect:x,onClose:p,onDragStart:g,onDragEnd:C,onRename:B,closable:E.closable??b,size:e,...E},E.tabKey))}),f!=null&&l.jsxRuntimeExports.jsx(_.Space,{className:r.CSS.BE(d,"actions"),children:l.jsxRuntimeExports.jsx(u.Icon,{size:e,sharp:!0,onClick:f,children:l.jsxRuntimeExports.jsx(u.Ut.Add,{})})})]});return t!=null?l.jsxRuntimeExports.jsx(u.ContextMenu,{style:{height:"fit-content"},...R,menu:t,children:m}):m},G=({selected:n,altColor:s=!1,onSelect:e,onClose:o,tabKey:t,name:c,onDragStart:i,onDragEnd:a,onRename:x,closable:p=!0,icon:b,size:C,editable:g=!0})=>{const v=S.useCallback(h=>i==null?void 0:i(h,{tabKey:t,name:c}),[i,t,c]),B=S.useCallback(h=>a==null?void 0:a(h,{tabKey:t,name:c}),[a,t,c]),f=S.useCallback(h=>{h.stopPropagation(),o==null||o(t)},[o,t]),R=S.useCallback(()=>e==null?void 0:e(t),[e,t]),m=n===t,E=b!=null,T=z.ComponentSizeLevels[C];return l.jsxRuntimeExports.jsxs(_.Pack,{size:C,id:t,className:r.CSS(r.CSS.BE(d,"btn"),u.CONTEXT_TARGET,x==null&&r.CSS.BEM(d,"btn","uneditable"),m&&u.CONTEXT_SELECTED,r.CSS.selected(m),r.CSS.altColor(s),p&&o!=null&&r.CSS.BEM(d,"btn","closable"),E&&r.CSS.BEM(d,"btn","has-icon")),draggable:!0,direction:"x",justify:"center",align:"center",onClick:R,onDragStart:v,onDragEnd:B,bordered:!1,rounded:!1,children:[y(b,{className:r.CSS.BE(d,"icon"),style:{color:r.CSS.shadeVar(7),height:r.CSS.levelSizeVar(T),width:r.CSS.levelSizeVar(T)}}),l.jsxRuntimeExports.jsx(F,{name:c,tabKey:t,onRename:x,editable:g,level:z.ComponentSizeLevels[C]}),p&&o!=null&&l.jsxRuntimeExports.jsx(u.Icon,{onClick:f,children:l.jsxRuntimeExports.jsx(u.Ut.Close,{"aria-label":"pluto-tabs__close"})})]})},F=({onRename:n,name:s,tabKey:e,editable:o=!0,...t})=>n==null||!o?l.jsxRuntimeExports.jsx(u.Text,{noWrap:!0,...t,children:s}):l.jsxRuntimeExports.jsx(u.Editable,{id:r.CSS.B(`tab-${e}`),onChange:c=>n(e,c),value:s,noWrap:!0,...t}),V=j.z.object({tabKey:j.z.string(),name:j.z.string(),closable:j.z.boolean().optional(),icon:j.z.unknown().optional(),editable:j.z.boolean().optional(),visible:j.z.boolean().optional()}),Z=V.extend({content:j.z.unknown().optional()}),H=Object.freeze(Object.defineProperty({__proto__:null,Content:L,Context:P,Provider:w,Selector:A,Tabs:U,rename:M,resetSelection:I,specZ:V,tabZ:Z,useContext:q,useStatic:O},Symbol.toStringTag,{value:"Module"}));exports.Icon=$;exports.Tabs=U;exports.external=H;exports.rename=M;exports.resetSelection=I;exports.resolve=y;exports.tabZ=Z;exports.useStatic=O;
@@ -1 +1 @@
1
- "use strict";const m=require("./Toggle-CIXrEiVA.cjs"),ke=require("./jsx-runtime-Cek9Ww4S.cjs"),ve=require("react"),he=require("./aggregator-q0CY7-QS.cjs");require("./css-LxkguM_s.cjs");require("./Pack-C_SrDA3a.cjs");const $e=require("./List-B3WCj8GQ.cjs"),W=Symbol(),ue=Symbol(),X=Symbol();let je=(t,e)=>new Proxy(t,e);const z=Object.getPrototypeOf,se=new WeakMap,J=t=>t&&(se.has(t)?se.get(t):z(t)===Object.prototype||z(t)===Array.prototype),re=t=>typeof t=="object"&&t!==null,ne=new WeakMap,fe=t=>t[X]||t,de=(t,e,s)=>{if(!J(t))return t;const r=fe(t),n=(c=>Object.isFrozen(c)||Object.values(Object.getOwnPropertyDescriptors(c)).some(o=>!o.writable))(r);let i=s&&s.get(r);return i&&i[1].f===n||(i=((c,o)=>{const a={f:o};let h=!1;const l=(d,g)=>{if(!h){let p=a.a.get(c);p||(p=new Set,a.a.set(c,p)),g&&p.has(W)||p.add(d)}},u={get:(d,g)=>g===X?c:(l(g),de(d[g],a.a,a.c)),has:(d,g)=>g===ue?(h=!0,a.a.delete(c),!0):(l(g),g in d),getOwnPropertyDescriptor:(d,g)=>(l(g,!0),Object.getOwnPropertyDescriptor(d,g)),ownKeys:d=>(l(W),Reflect.ownKeys(d))};return o&&(u.set=u.deleteProperty=()=>!1),[u,a]})(r,n),i[1].p=je(n?(c=>{let o=ne.get(c);if(!o){if(Array.isArray(c))o=Array.from(c);else{const a=Object.getOwnPropertyDescriptors(c);Object.values(a).forEach(h=>{h.configurable=!0}),o=Object.create(z(c),a)}ne.set(c,o)}return o})(r):r,i[0]),s&&s.set(r,i)),i[1].a=e,i[1].c=s,i[1].p},Te=(t,e)=>{const s=Reflect.ownKeys(t),r=Reflect.ownKeys(e);return s.length!==r.length||s.some((n,i)=>n!==r[i])},ge=(t,e,s,r)=>{if(Object.is(t,e))return!1;if(!re(t)||!re(e))return!0;const n=s.get(fe(t));if(!n)return!0;if(r){const c=r.get(t);if(c&&c.n===e)return c.g;r.set(t,{n:e,g:!1})}let i=null;for(const c of n){const o=c===W?Te(t,e):ge(t[c],e[c],s,r);if(o!==!0&&o!==!1||(i=o),i)break}return i===null&&(i=!0),r&&r.set(t,{n:e,g:i}),i},Fe=t=>!!J(t)&&ue in t,Z=t=>J(t)&&t[X]||null,H=t=>typeof t=="object"&&t!==null,pe=(t,e)=>{if(!H(t))return t;const s=Z(t);return s!==null?(Fe(t),s):(e.has(t)||(e.add(t),Object.entries(t).forEach(([r,n])=>{const i=pe(n,e);Object.is(i,n)||(t[r]=i)})),t)},F=(t,e,s)=>{if(!H(t)||!H(e))return;const r=s.get(Z(e)||e);r&&r.forEach(n=>{F(t[n],e[n],s)})},Ne=(t,e)=>{var s;let r=0;const n=(s=e==null?void 0:e.size)!=null?s:1,i=[],c=new WeakMap,o=new WeakMap;return a=>{const h=Z(a)||a,l=c.get(h);if(l)return F(a,l.o,l.a),l.r;for(let M=0;M<n;M+=1){const y=i[(r+M)%n];if(!y)break;if(!ge(y.o,a,y.a,new WeakMap))return c.set(h,y),F(a,y.o,y.a),y.r}const u=new WeakMap,d=de(a,u,o),g=pe(t(d),new Set);F(a,a,u);const p={o:a,r:g,a:u};return r=(r-1+n)%n,i[r]=p,c.set(h,p),g}},me=(t,e)=>he.w.RUNTIME==="browser"?Ne(t,e):t;function I(t){return Array.isArray?Array.isArray(t):xe(t)==="[object Array]"}const De=1/0;function Pe(t){if(typeof t=="string")return t;let e=t+"";return e=="0"&&1/t==-De?"-0":e}function Ke(t){return t==null?"":Pe(t)}function _(t){return typeof t=="string"}function Me(t){return typeof t=="number"}function We(t){return t===!0||t===!1||ze(t)&&xe(t)=="[object Boolean]"}function ye(t){return typeof t=="object"}function ze(t){return ye(t)&&t!==null}function x(t){return t!=null}function K(t){return!t.trim().length}function xe(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const He="Incorrect 'index' type",Ue=t=>`Invalid value for key ${t}`,Ve=t=>`Pattern length exceeds max of ${t}.`,Be=t=>`Missing ${t} property in key`,Ge=t=>`Property 'weight' in key '${t}' must be a positive integer`,ie=Object.prototype.hasOwnProperty;class Ye{constructor(e){this._keys=[],this._keyMap={};let s=0;e.forEach(r=>{let n=Se(r);this._keys.push(n),this._keyMap[n.id]=n,s+=n.weight}),this._keys.forEach(r=>{r.weight/=s})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function Se(t){let e=null,s=null,r=null,n=1,i=null;if(_(t)||I(t))r=t,e=ce(t),s=U(t);else{if(!ie.call(t,"name"))throw new Error(Be("name"));const c=t.name;if(r=c,ie.call(t,"weight")&&(n=t.weight,n<=0))throw new Error(Ge(c));e=ce(c),s=U(c),i=t.getFn}return{path:e,id:s,weight:n,src:r,getFn:i}}function ce(t){return I(t)?t:t.split(".")}function U(t){return I(t)?t.join("."):t}function Qe(t,e){let s=[],r=!1;const n=(i,c,o)=>{if(x(i))if(!c[o])s.push(i);else{let a=c[o];const h=i[a];if(!x(h))return;if(o===c.length-1&&(_(h)||Me(h)||We(h)))s.push(Ke(h));else if(I(h)){r=!0;for(let l=0,u=h.length;l<u;l+=1)n(h[l],c,o+1)}else c.length&&n(h,c,o+1)}};return n(t,_(e)?e.split("."):e,0),r?s:s[0]}const Xe={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},Je={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(t,e)=>t.score===e.score?t.idx<e.idx?-1:1:t.score<e.score?-1:1},Ze={location:0,threshold:.6,distance:100},qe={useExtendedSearch:!1,getFn:Qe,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var f={...Je,...Xe,...Ze,...qe};const et=/[^ ]+/g;function tt(t=1,e=3){const s=new Map,r=Math.pow(10,e);return{get(n){const i=n.match(et).length;if(s.has(i))return s.get(i);const c=1/Math.pow(i,.5*t),o=parseFloat(Math.round(c*r)/r);return s.set(i,o),o},clear(){s.clear()}}}class q{constructor({getFn:e=f.getFn,fieldNormWeight:s=f.fieldNormWeight}={}){this.norm=tt(s,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((s,r)=>{this._keysMap[s.id]=r})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,_(this.docs[0])?this.docs.forEach((e,s)=>{this._addString(e,s)}):this.docs.forEach((e,s)=>{this._addObject(e,s)}),this.norm.clear())}add(e){const s=this.size();_(e)?this._addString(e,s):this._addObject(e,s)}removeAt(e){this.records.splice(e,1);for(let s=e,r=this.size();s<r;s+=1)this.records[s].i-=1}getValueForItemAtKeyId(e,s){return e[this._keysMap[s]]}size(){return this.records.length}_addString(e,s){if(!x(e)||K(e))return;let r={v:e,i:s,n:this.norm.get(e)};this.records.push(r)}_addObject(e,s){let r={i:s,$:{}};this.keys.forEach((n,i)=>{let c=n.getFn?n.getFn(e):this.getFn(e,n.path);if(x(c)){if(I(c)){let o=[];const a=[{nestedArrIndex:-1,value:c}];for(;a.length;){const{nestedArrIndex:h,value:l}=a.pop();if(x(l))if(_(l)&&!K(l)){let u={v:l,i:h,n:this.norm.get(l)};o.push(u)}else I(l)&&l.forEach((u,d)=>{a.push({nestedArrIndex:d,value:u})})}r.$[i]=o}else if(_(c)&&!K(c)){let o={v:c,n:this.norm.get(c)};r.$[i]=o}}}),this.records.push(r)}toJSON(){return{keys:this.keys,records:this.records}}}function Ee(t,e,{getFn:s=f.getFn,fieldNormWeight:r=f.fieldNormWeight}={}){const n=new q({getFn:s,fieldNormWeight:r});return n.setKeys(t.map(Se)),n.setSources(e),n.create(),n}function st(t,{getFn:e=f.getFn,fieldNormWeight:s=f.fieldNormWeight}={}){const{keys:r,records:n}=t,i=new q({getFn:e,fieldNormWeight:s});return i.setKeys(r),i.setIndexRecords(n),i}function T(t,{errors:e=0,currentLocation:s=0,expectedLocation:r=0,distance:n=f.distance,ignoreLocation:i=f.ignoreLocation}={}){const c=e/t.length;if(i)return c;const o=Math.abs(r-s);return n?c+o/n:o?1:c}function rt(t=[],e=f.minMatchCharLength){let s=[],r=-1,n=-1,i=0;for(let c=t.length;i<c;i+=1){let o=t[i];o&&r===-1?r=i:!o&&r!==-1&&(n=i-1,n-r+1>=e&&s.push([r,n]),r=-1)}return t[i-1]&&i-r>=e&&s.push([r,i-1]),s}const L=32;function nt(t,e,s,{location:r=f.location,distance:n=f.distance,threshold:i=f.threshold,findAllMatches:c=f.findAllMatches,minMatchCharLength:o=f.minMatchCharLength,includeMatches:a=f.includeMatches,ignoreLocation:h=f.ignoreLocation}={}){if(e.length>L)throw new Error(Ve(L));const l=e.length,u=t.length,d=Math.max(0,Math.min(r,u));let g=i,p=d;const M=o>1||a,y=M?Array(u):[];let b;for(;(b=t.indexOf(e,p))>-1;){let S=T(e,{currentLocation:b,expectedLocation:d,distance:n,ignoreLocation:h});if(g=Math.min(S,g),p=b+l,M){let w=0;for(;w<l;)y[b+w]=1,w+=1}}p=-1;let R=[],C=1,$=l+u;const Re=1<<l-1;for(let S=0;S<l;S+=1){let w=0,A=$;for(;w<A;)T(e,{errors:S,currentLocation:d+A,expectedLocation:d,distance:n,ignoreLocation:h})<=g?w=A:$=A,A=Math.floor(($-w)/2+w);$=A;let ee=Math.max(1,d-A+1),P=c?u:Math.min(d+A,u)+l,k=Array(P+2);k[P+1]=(1<<S)-1;for(let E=P;E>=ee;E-=1){let j=E-1,te=s[t.charAt(j)];if(M&&(y[j]=+!!te),k[E]=(k[E+1]<<1|1)&te,S&&(k[E]|=(R[E+1]|R[E])<<1|1|R[E+1]),k[E]&Re&&(C=T(e,{errors:S,currentLocation:j,expectedLocation:d,distance:n,ignoreLocation:h}),C<=g)){if(g=C,p=j,p<=d)break;ee=Math.max(1,2*d-p)}}if(T(e,{errors:S+1,currentLocation:d,expectedLocation:d,distance:n,ignoreLocation:h})>g)break;R=k}const D={isMatch:p>=0,score:Math.max(.001,C)};if(M){const S=rt(y,o);S.length?a&&(D.indices=S):D.isMatch=!1}return D}function it(t){let e={};for(let s=0,r=t.length;s<r;s+=1){const n=t.charAt(s);e[n]=(e[n]||0)|1<<r-s-1}return e}class _e{constructor(e,{location:s=f.location,threshold:r=f.threshold,distance:n=f.distance,includeMatches:i=f.includeMatches,findAllMatches:c=f.findAllMatches,minMatchCharLength:o=f.minMatchCharLength,isCaseSensitive:a=f.isCaseSensitive,ignoreLocation:h=f.ignoreLocation}={}){if(this.options={location:s,threshold:r,distance:n,includeMatches:i,findAllMatches:c,minMatchCharLength:o,isCaseSensitive:a,ignoreLocation:h},this.pattern=a?e:e.toLowerCase(),this.chunks=[],!this.pattern.length)return;const l=(d,g)=>{this.chunks.push({pattern:d,alphabet:it(d),startIndex:g})},u=this.pattern.length;if(u>L){let d=0;const g=u%L,p=u-g;for(;d<p;)l(this.pattern.substr(d,L),d),d+=L;if(g){const M=u-L;l(this.pattern.substr(M),M)}}else l(this.pattern,0)}searchIn(e){const{isCaseSensitive:s,includeMatches:r}=this.options;if(s||(e=e.toLowerCase()),this.pattern===e){let p={isMatch:!0,score:0};return r&&(p.indices=[[0,e.length-1]]),p}const{location:n,distance:i,threshold:c,findAllMatches:o,minMatchCharLength:a,ignoreLocation:h}=this.options;let l=[],u=0,d=!1;this.chunks.forEach(({pattern:p,alphabet:M,startIndex:y})=>{const{isMatch:b,score:R,indices:C}=nt(e,p,M,{location:n+y,distance:i,threshold:c,findAllMatches:o,minMatchCharLength:a,includeMatches:r,ignoreLocation:h});b&&(d=!0),u+=R,b&&C&&(l=[...l,...C])});let g={isMatch:d,score:d?u/this.chunks.length:1};return d&&r&&(g.indices=l),g}}class O{constructor(e){this.pattern=e}static isMultiMatch(e){return oe(e,this.multiRegex)}static isSingleMatch(e){return oe(e,this.singleRegex)}search(){}}function oe(t,e){const s=t.match(e);return s?s[1]:null}class ct extends O{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const s=e===this.pattern;return{isMatch:s,score:s?0:1,indices:[0,this.pattern.length-1]}}}class ot extends O{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const r=e.indexOf(this.pattern)===-1;return{isMatch:r,score:r?0:1,indices:[0,e.length-1]}}}class at extends O{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const s=e.startsWith(this.pattern);return{isMatch:s,score:s?0:1,indices:[0,this.pattern.length-1]}}}class lt extends O{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const s=!e.startsWith(this.pattern);return{isMatch:s,score:s?0:1,indices:[0,e.length-1]}}}class ht extends O{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const s=e.endsWith(this.pattern);return{isMatch:s,score:s?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}class ut extends O{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const s=!e.endsWith(this.pattern);return{isMatch:s,score:s?0:1,indices:[0,e.length-1]}}}class be extends O{constructor(e,{location:s=f.location,threshold:r=f.threshold,distance:n=f.distance,includeMatches:i=f.includeMatches,findAllMatches:c=f.findAllMatches,minMatchCharLength:o=f.minMatchCharLength,isCaseSensitive:a=f.isCaseSensitive,ignoreLocation:h=f.ignoreLocation}={}){super(e),this._bitapSearch=new _e(e,{location:s,threshold:r,distance:n,includeMatches:i,findAllMatches:c,minMatchCharLength:o,isCaseSensitive:a,ignoreLocation:h})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class Ie extends O{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let s=0,r;const n=[],i=this.pattern.length;for(;(r=e.indexOf(this.pattern,s))>-1;)s=r+i,n.push([r,s-1]);const c=!!n.length;return{isMatch:c,score:c?0:1,indices:n}}}const V=[ct,Ie,at,lt,ut,ht,ot,be],ae=V.length,ft=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,dt="|";function gt(t,e={}){return t.split(dt).map(s=>{let r=s.trim().split(ft).filter(i=>i&&!!i.trim()),n=[];for(let i=0,c=r.length;i<c;i+=1){const o=r[i];let a=!1,h=-1;for(;!a&&++h<ae;){const l=V[h];let u=l.isMultiMatch(o);u&&(n.push(new l(u,e)),a=!0)}if(!a)for(h=-1;++h<ae;){const l=V[h];let u=l.isSingleMatch(o);if(u){n.push(new l(u,e));break}}}return n})}const pt=new Set([be.type,Ie.type]);class mt{constructor(e,{isCaseSensitive:s=f.isCaseSensitive,includeMatches:r=f.includeMatches,minMatchCharLength:n=f.minMatchCharLength,ignoreLocation:i=f.ignoreLocation,findAllMatches:c=f.findAllMatches,location:o=f.location,threshold:a=f.threshold,distance:h=f.distance}={}){this.query=null,this.options={isCaseSensitive:s,includeMatches:r,minMatchCharLength:n,findAllMatches:c,ignoreLocation:i,location:o,threshold:a,distance:h},this.pattern=s?e:e.toLowerCase(),this.query=gt(this.pattern,this.options)}static condition(e,s){return s.useExtendedSearch}searchIn(e){const s=this.query;if(!s)return{isMatch:!1,score:1};const{includeMatches:r,isCaseSensitive:n}=this.options;e=n?e:e.toLowerCase();let i=0,c=[],o=0;for(let a=0,h=s.length;a<h;a+=1){const l=s[a];c.length=0,i=0;for(let u=0,d=l.length;u<d;u+=1){const g=l[u],{isMatch:p,indices:M,score:y}=g.search(e);if(p){if(i+=1,o+=y,r){const b=g.constructor.type;pt.has(b)?c=[...c,...M]:c.push(M)}}else{o=0,i=0,c.length=0;break}}if(i){let u={isMatch:!0,score:o/i};return r&&(u.indices=c),u}}return{isMatch:!1,score:1}}}const B=[];function Mt(...t){B.push(...t)}function G(t,e){for(let s=0,r=B.length;s<r;s+=1){let n=B[s];if(n.condition(t,e))return new n(t,e)}return new _e(t,e)}const N={AND:"$and",OR:"$or"},Y={PATH:"$path",PATTERN:"$val"},Q=t=>!!(t[N.AND]||t[N.OR]),yt=t=>!!t[Y.PATH],xt=t=>!I(t)&&ye(t)&&!Q(t),le=t=>({[N.AND]:Object.keys(t).map(e=>({[e]:t[e]}))});function we(t,e,{auto:s=!0}={}){const r=n=>{let i=Object.keys(n);const c=yt(n);if(!c&&i.length>1&&!Q(n))return r(le(n));if(xt(n)){const a=c?n[Y.PATH]:i[0],h=c?n[Y.PATTERN]:n[a];if(!_(h))throw new Error(Ue(a));const l={keyId:U(a),pattern:h};return s&&(l.searcher=G(h,e)),l}let o={children:[],operator:i[0]};return i.forEach(a=>{const h=n[a];I(h)&&h.forEach(l=>{o.children.push(r(l))})}),o};return Q(t)||(t=le(t)),r(t)}function St(t,{ignoreFieldNorm:e=f.ignoreFieldNorm}){t.forEach(s=>{let r=1;s.matches.forEach(({key:n,norm:i,score:c})=>{const o=n?n.weight:null;r*=Math.pow(c===0&&o?Number.EPSILON:c,(o||1)*(e?1:i))}),s.score=r})}function Et(t,e){const s=t.matches;e.matches=[],x(s)&&s.forEach(r=>{if(!x(r.indices)||!r.indices.length)return;const{indices:n,value:i}=r;let c={indices:n,value:i};r.key&&(c.key=r.key.src),r.idx>-1&&(c.refIndex=r.idx),e.matches.push(c)})}function _t(t,e){e.score=t.score}function bt(t,e,{includeMatches:s=f.includeMatches,includeScore:r=f.includeScore}={}){const n=[];return s&&n.push(Et),r&&n.push(_t),t.map(i=>{const{idx:c}=i,o={item:e[c],refIndex:c};return n.length&&n.forEach(a=>{a(i,o)}),o})}class v{constructor(e,s={},r){this.options={...f,...s},this.options.useExtendedSearch,this._keyStore=new Ye(this.options.keys),this.setCollection(e,r)}setCollection(e,s){if(this._docs=e,s&&!(s instanceof q))throw new Error(He);this._myIndex=s||Ee(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){x(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const s=[];for(let r=0,n=this._docs.length;r<n;r+=1){const i=this._docs[r];e(i,r)&&(this.removeAt(r),r-=1,n-=1,s.push(i))}return s}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:s=-1}={}){const{includeMatches:r,includeScore:n,shouldSort:i,sortFn:c,ignoreFieldNorm:o}=this.options;let a=_(e)?_(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return St(a,{ignoreFieldNorm:o}),i&&a.sort(c),Me(s)&&s>-1&&(a=a.slice(0,s)),bt(a,this._docs,{includeMatches:r,includeScore:n})}_searchStringList(e){const s=G(e,this.options),{records:r}=this._myIndex,n=[];return r.forEach(({v:i,i:c,n:o})=>{if(!x(i))return;const{isMatch:a,score:h,indices:l}=s.searchIn(i);a&&n.push({item:i,idx:c,matches:[{score:h,value:i,norm:o,indices:l}]})}),n}_searchLogical(e){const s=we(e,this.options),r=(o,a,h)=>{if(!o.children){const{keyId:u,searcher:d}=o,g=this._findMatches({key:this._keyStore.get(u),value:this._myIndex.getValueForItemAtKeyId(a,u),searcher:d});return g&&g.length?[{idx:h,item:a,matches:g}]:[]}const l=[];for(let u=0,d=o.children.length;u<d;u+=1){const g=o.children[u],p=r(g,a,h);if(p.length)l.push(...p);else if(o.operator===N.AND)return[]}return l},n=this._myIndex.records,i={},c=[];return n.forEach(({$:o,i:a})=>{if(x(o)){let h=r(s,o,a);h.length&&(i[a]||(i[a]={idx:a,item:o,matches:[]},c.push(i[a])),h.forEach(({matches:l})=>{i[a].matches.push(...l)}))}}),c}_searchObjectList(e){const s=G(e,this.options),{keys:r,records:n}=this._myIndex,i=[];return n.forEach(({$:c,i:o})=>{if(!x(c))return;let a=[];r.forEach((h,l)=>{a.push(...this._findMatches({key:h,value:c[l],searcher:s}))}),a.length&&i.push({idx:o,item:c,matches:a})}),i}_findMatches({key:e,value:s,searcher:r}){if(!x(s))return[];let n=[];if(I(s))s.forEach(({v:i,i:c,n:o})=>{if(!x(i))return;const{isMatch:a,score:h,indices:l}=r.searchIn(i);a&&n.push({score:h,key:e,value:i,idx:c,norm:o,indices:l})});else{const{v:i,n:c}=s,{isMatch:o,score:a,indices:h}=r.searchIn(i);o&&n.push({score:a,key:e,value:i,norm:c,indices:h})}return n}}v.version="7.0.0";v.createIndex=Ee;v.parseIndex=st;v.config=f;v.parseQuery=we;Mt(mt);const It={threshold:.3},Ae=t=>e=>{const s=new v(e,{keys:Object.keys(e[0]),...It,...t});return{type:"fuse",page:(r,n)=>e.slice(r*n,(r+1)*n),search:r=>s.search(r).map(({item:n})=>n),retrieve:r=>e.filter(n=>r.includes(n.key))}},wt=Ae(),Oe=({term:t,searcher:e=wt})=>me(({data:s})=>typeof e=="function"?t.length===0||(s==null?void 0:s.length)===0?{data:s,transformed:!1}:{data:e(s).search(t),transformed:!0}:{data:e.search(t),transformed:!0}),Ce=({debounce:t=250,value:e,onChange:s,transformBefore:r})=>{const[n,i]=he.usePurePassthrough({onChange:s,value:e,initial:""}),{setTransform:c,deleteTransform:o}=m.useDataUtilContext(),a=m.useDebouncedCallback(c,t,[]),h=ve.useCallback(l=>{i(l),l.length===0?o("filter"):(r!=null&&(l=r(l)),a("filter",Oe({term:l})))},[i,r]);return{value:n,onChange:h}},Le=({children:t=s=>ke.jsxRuntimeExports.jsx(m.Text$1,{placeholder:"Filter",...s}),...e})=>t(Ce(e)),At=Object.freeze(Object.defineProperty({__proto__:null,Column:m.Column,ColumnContext:m.ColumnContext,Core:m.Core,DataProvider:m.DataProvider,Filter:Le,Hover:m.Hover,ItemFrame:m.ItemFrame,List:$e.List,Search:m.Search,Selector:m.Selector,selectValueIsZero:m.selectValueIsZero,useDataContext:m.useDataContext,useDataUtilContext:m.useDataUtilContext,useFilter:Ce,useGetTransformedData:m.useGetTransformedData,useHoverContext:m.useHoverContext,useSearch:m.useSearch,useSelect:m.useSelect,useSelection:m.useSelection,useSelectionContext:m.useSelectionContext,useSelectionUtils:m.useSelectionUtils,useSetSourceData:m.useSetSourceData,useSourceData:m.useSourceData,useTransformedData:m.useTransformedData},Symbol.toStringTag,{value:"Module"}));exports.Filter=Le;exports.createFilterTransform=Oe;exports.external=At;exports.fuseFilter=Ae;exports.proxyMemo=me;
1
+ "use strict";const m=require("./Toggle-Cu_t9VPe.cjs"),ke=require("./jsx-runtime-Cek9Ww4S.cjs"),ve=require("react"),he=require("./aggregator-q0CY7-QS.cjs");require("./css-LxkguM_s.cjs");require("./Pack-C_SrDA3a.cjs");const $e=require("./List-C8Cd_qEK.cjs"),W=Symbol(),ue=Symbol(),X=Symbol();let je=(t,e)=>new Proxy(t,e);const z=Object.getPrototypeOf,se=new WeakMap,J=t=>t&&(se.has(t)?se.get(t):z(t)===Object.prototype||z(t)===Array.prototype),re=t=>typeof t=="object"&&t!==null,ne=new WeakMap,fe=t=>t[X]||t,de=(t,e,s)=>{if(!J(t))return t;const r=fe(t),n=(c=>Object.isFrozen(c)||Object.values(Object.getOwnPropertyDescriptors(c)).some(o=>!o.writable))(r);let i=s&&s.get(r);return i&&i[1].f===n||(i=((c,o)=>{const a={f:o};let h=!1;const l=(d,g)=>{if(!h){let p=a.a.get(c);p||(p=new Set,a.a.set(c,p)),g&&p.has(W)||p.add(d)}},u={get:(d,g)=>g===X?c:(l(g),de(d[g],a.a,a.c)),has:(d,g)=>g===ue?(h=!0,a.a.delete(c),!0):(l(g),g in d),getOwnPropertyDescriptor:(d,g)=>(l(g,!0),Object.getOwnPropertyDescriptor(d,g)),ownKeys:d=>(l(W),Reflect.ownKeys(d))};return o&&(u.set=u.deleteProperty=()=>!1),[u,a]})(r,n),i[1].p=je(n?(c=>{let o=ne.get(c);if(!o){if(Array.isArray(c))o=Array.from(c);else{const a=Object.getOwnPropertyDescriptors(c);Object.values(a).forEach(h=>{h.configurable=!0}),o=Object.create(z(c),a)}ne.set(c,o)}return o})(r):r,i[0]),s&&s.set(r,i)),i[1].a=e,i[1].c=s,i[1].p},Te=(t,e)=>{const s=Reflect.ownKeys(t),r=Reflect.ownKeys(e);return s.length!==r.length||s.some((n,i)=>n!==r[i])},ge=(t,e,s,r)=>{if(Object.is(t,e))return!1;if(!re(t)||!re(e))return!0;const n=s.get(fe(t));if(!n)return!0;if(r){const c=r.get(t);if(c&&c.n===e)return c.g;r.set(t,{n:e,g:!1})}let i=null;for(const c of n){const o=c===W?Te(t,e):ge(t[c],e[c],s,r);if(o!==!0&&o!==!1||(i=o),i)break}return i===null&&(i=!0),r&&r.set(t,{n:e,g:i}),i},Fe=t=>!!J(t)&&ue in t,Z=t=>J(t)&&t[X]||null,H=t=>typeof t=="object"&&t!==null,pe=(t,e)=>{if(!H(t))return t;const s=Z(t);return s!==null?(Fe(t),s):(e.has(t)||(e.add(t),Object.entries(t).forEach(([r,n])=>{const i=pe(n,e);Object.is(i,n)||(t[r]=i)})),t)},F=(t,e,s)=>{if(!H(t)||!H(e))return;const r=s.get(Z(e)||e);r&&r.forEach(n=>{F(t[n],e[n],s)})},Ne=(t,e)=>{var s;let r=0;const n=(s=e==null?void 0:e.size)!=null?s:1,i=[],c=new WeakMap,o=new WeakMap;return a=>{const h=Z(a)||a,l=c.get(h);if(l)return F(a,l.o,l.a),l.r;for(let M=0;M<n;M+=1){const y=i[(r+M)%n];if(!y)break;if(!ge(y.o,a,y.a,new WeakMap))return c.set(h,y),F(a,y.o,y.a),y.r}const u=new WeakMap,d=de(a,u,o),g=pe(t(d),new Set);F(a,a,u);const p={o:a,r:g,a:u};return r=(r-1+n)%n,i[r]=p,c.set(h,p),g}},me=(t,e)=>he.w.RUNTIME==="browser"?Ne(t,e):t;function I(t){return Array.isArray?Array.isArray(t):xe(t)==="[object Array]"}const De=1/0;function Pe(t){if(typeof t=="string")return t;let e=t+"";return e=="0"&&1/t==-De?"-0":e}function Ke(t){return t==null?"":Pe(t)}function _(t){return typeof t=="string"}function Me(t){return typeof t=="number"}function We(t){return t===!0||t===!1||ze(t)&&xe(t)=="[object Boolean]"}function ye(t){return typeof t=="object"}function ze(t){return ye(t)&&t!==null}function x(t){return t!=null}function K(t){return!t.trim().length}function xe(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const He="Incorrect 'index' type",Ue=t=>`Invalid value for key ${t}`,Ve=t=>`Pattern length exceeds max of ${t}.`,Be=t=>`Missing ${t} property in key`,Ge=t=>`Property 'weight' in key '${t}' must be a positive integer`,ie=Object.prototype.hasOwnProperty;class Ye{constructor(e){this._keys=[],this._keyMap={};let s=0;e.forEach(r=>{let n=Se(r);this._keys.push(n),this._keyMap[n.id]=n,s+=n.weight}),this._keys.forEach(r=>{r.weight/=s})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function Se(t){let e=null,s=null,r=null,n=1,i=null;if(_(t)||I(t))r=t,e=ce(t),s=U(t);else{if(!ie.call(t,"name"))throw new Error(Be("name"));const c=t.name;if(r=c,ie.call(t,"weight")&&(n=t.weight,n<=0))throw new Error(Ge(c));e=ce(c),s=U(c),i=t.getFn}return{path:e,id:s,weight:n,src:r,getFn:i}}function ce(t){return I(t)?t:t.split(".")}function U(t){return I(t)?t.join("."):t}function Qe(t,e){let s=[],r=!1;const n=(i,c,o)=>{if(x(i))if(!c[o])s.push(i);else{let a=c[o];const h=i[a];if(!x(h))return;if(o===c.length-1&&(_(h)||Me(h)||We(h)))s.push(Ke(h));else if(I(h)){r=!0;for(let l=0,u=h.length;l<u;l+=1)n(h[l],c,o+1)}else c.length&&n(h,c,o+1)}};return n(t,_(e)?e.split("."):e,0),r?s:s[0]}const Xe={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},Je={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(t,e)=>t.score===e.score?t.idx<e.idx?-1:1:t.score<e.score?-1:1},Ze={location:0,threshold:.6,distance:100},qe={useExtendedSearch:!1,getFn:Qe,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var f={...Je,...Xe,...Ze,...qe};const et=/[^ ]+/g;function tt(t=1,e=3){const s=new Map,r=Math.pow(10,e);return{get(n){const i=n.match(et).length;if(s.has(i))return s.get(i);const c=1/Math.pow(i,.5*t),o=parseFloat(Math.round(c*r)/r);return s.set(i,o),o},clear(){s.clear()}}}class q{constructor({getFn:e=f.getFn,fieldNormWeight:s=f.fieldNormWeight}={}){this.norm=tt(s,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((s,r)=>{this._keysMap[s.id]=r})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,_(this.docs[0])?this.docs.forEach((e,s)=>{this._addString(e,s)}):this.docs.forEach((e,s)=>{this._addObject(e,s)}),this.norm.clear())}add(e){const s=this.size();_(e)?this._addString(e,s):this._addObject(e,s)}removeAt(e){this.records.splice(e,1);for(let s=e,r=this.size();s<r;s+=1)this.records[s].i-=1}getValueForItemAtKeyId(e,s){return e[this._keysMap[s]]}size(){return this.records.length}_addString(e,s){if(!x(e)||K(e))return;let r={v:e,i:s,n:this.norm.get(e)};this.records.push(r)}_addObject(e,s){let r={i:s,$:{}};this.keys.forEach((n,i)=>{let c=n.getFn?n.getFn(e):this.getFn(e,n.path);if(x(c)){if(I(c)){let o=[];const a=[{nestedArrIndex:-1,value:c}];for(;a.length;){const{nestedArrIndex:h,value:l}=a.pop();if(x(l))if(_(l)&&!K(l)){let u={v:l,i:h,n:this.norm.get(l)};o.push(u)}else I(l)&&l.forEach((u,d)=>{a.push({nestedArrIndex:d,value:u})})}r.$[i]=o}else if(_(c)&&!K(c)){let o={v:c,n:this.norm.get(c)};r.$[i]=o}}}),this.records.push(r)}toJSON(){return{keys:this.keys,records:this.records}}}function Ee(t,e,{getFn:s=f.getFn,fieldNormWeight:r=f.fieldNormWeight}={}){const n=new q({getFn:s,fieldNormWeight:r});return n.setKeys(t.map(Se)),n.setSources(e),n.create(),n}function st(t,{getFn:e=f.getFn,fieldNormWeight:s=f.fieldNormWeight}={}){const{keys:r,records:n}=t,i=new q({getFn:e,fieldNormWeight:s});return i.setKeys(r),i.setIndexRecords(n),i}function T(t,{errors:e=0,currentLocation:s=0,expectedLocation:r=0,distance:n=f.distance,ignoreLocation:i=f.ignoreLocation}={}){const c=e/t.length;if(i)return c;const o=Math.abs(r-s);return n?c+o/n:o?1:c}function rt(t=[],e=f.minMatchCharLength){let s=[],r=-1,n=-1,i=0;for(let c=t.length;i<c;i+=1){let o=t[i];o&&r===-1?r=i:!o&&r!==-1&&(n=i-1,n-r+1>=e&&s.push([r,n]),r=-1)}return t[i-1]&&i-r>=e&&s.push([r,i-1]),s}const L=32;function nt(t,e,s,{location:r=f.location,distance:n=f.distance,threshold:i=f.threshold,findAllMatches:c=f.findAllMatches,minMatchCharLength:o=f.minMatchCharLength,includeMatches:a=f.includeMatches,ignoreLocation:h=f.ignoreLocation}={}){if(e.length>L)throw new Error(Ve(L));const l=e.length,u=t.length,d=Math.max(0,Math.min(r,u));let g=i,p=d;const M=o>1||a,y=M?Array(u):[];let b;for(;(b=t.indexOf(e,p))>-1;){let S=T(e,{currentLocation:b,expectedLocation:d,distance:n,ignoreLocation:h});if(g=Math.min(S,g),p=b+l,M){let w=0;for(;w<l;)y[b+w]=1,w+=1}}p=-1;let R=[],C=1,$=l+u;const Re=1<<l-1;for(let S=0;S<l;S+=1){let w=0,A=$;for(;w<A;)T(e,{errors:S,currentLocation:d+A,expectedLocation:d,distance:n,ignoreLocation:h})<=g?w=A:$=A,A=Math.floor(($-w)/2+w);$=A;let ee=Math.max(1,d-A+1),P=c?u:Math.min(d+A,u)+l,k=Array(P+2);k[P+1]=(1<<S)-1;for(let E=P;E>=ee;E-=1){let j=E-1,te=s[t.charAt(j)];if(M&&(y[j]=+!!te),k[E]=(k[E+1]<<1|1)&te,S&&(k[E]|=(R[E+1]|R[E])<<1|1|R[E+1]),k[E]&Re&&(C=T(e,{errors:S,currentLocation:j,expectedLocation:d,distance:n,ignoreLocation:h}),C<=g)){if(g=C,p=j,p<=d)break;ee=Math.max(1,2*d-p)}}if(T(e,{errors:S+1,currentLocation:d,expectedLocation:d,distance:n,ignoreLocation:h})>g)break;R=k}const D={isMatch:p>=0,score:Math.max(.001,C)};if(M){const S=rt(y,o);S.length?a&&(D.indices=S):D.isMatch=!1}return D}function it(t){let e={};for(let s=0,r=t.length;s<r;s+=1){const n=t.charAt(s);e[n]=(e[n]||0)|1<<r-s-1}return e}class _e{constructor(e,{location:s=f.location,threshold:r=f.threshold,distance:n=f.distance,includeMatches:i=f.includeMatches,findAllMatches:c=f.findAllMatches,minMatchCharLength:o=f.minMatchCharLength,isCaseSensitive:a=f.isCaseSensitive,ignoreLocation:h=f.ignoreLocation}={}){if(this.options={location:s,threshold:r,distance:n,includeMatches:i,findAllMatches:c,minMatchCharLength:o,isCaseSensitive:a,ignoreLocation:h},this.pattern=a?e:e.toLowerCase(),this.chunks=[],!this.pattern.length)return;const l=(d,g)=>{this.chunks.push({pattern:d,alphabet:it(d),startIndex:g})},u=this.pattern.length;if(u>L){let d=0;const g=u%L,p=u-g;for(;d<p;)l(this.pattern.substr(d,L),d),d+=L;if(g){const M=u-L;l(this.pattern.substr(M),M)}}else l(this.pattern,0)}searchIn(e){const{isCaseSensitive:s,includeMatches:r}=this.options;if(s||(e=e.toLowerCase()),this.pattern===e){let p={isMatch:!0,score:0};return r&&(p.indices=[[0,e.length-1]]),p}const{location:n,distance:i,threshold:c,findAllMatches:o,minMatchCharLength:a,ignoreLocation:h}=this.options;let l=[],u=0,d=!1;this.chunks.forEach(({pattern:p,alphabet:M,startIndex:y})=>{const{isMatch:b,score:R,indices:C}=nt(e,p,M,{location:n+y,distance:i,threshold:c,findAllMatches:o,minMatchCharLength:a,includeMatches:r,ignoreLocation:h});b&&(d=!0),u+=R,b&&C&&(l=[...l,...C])});let g={isMatch:d,score:d?u/this.chunks.length:1};return d&&r&&(g.indices=l),g}}class O{constructor(e){this.pattern=e}static isMultiMatch(e){return oe(e,this.multiRegex)}static isSingleMatch(e){return oe(e,this.singleRegex)}search(){}}function oe(t,e){const s=t.match(e);return s?s[1]:null}class ct extends O{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const s=e===this.pattern;return{isMatch:s,score:s?0:1,indices:[0,this.pattern.length-1]}}}class ot extends O{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const r=e.indexOf(this.pattern)===-1;return{isMatch:r,score:r?0:1,indices:[0,e.length-1]}}}class at extends O{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const s=e.startsWith(this.pattern);return{isMatch:s,score:s?0:1,indices:[0,this.pattern.length-1]}}}class lt extends O{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const s=!e.startsWith(this.pattern);return{isMatch:s,score:s?0:1,indices:[0,e.length-1]}}}class ht extends O{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const s=e.endsWith(this.pattern);return{isMatch:s,score:s?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}class ut extends O{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const s=!e.endsWith(this.pattern);return{isMatch:s,score:s?0:1,indices:[0,e.length-1]}}}class be extends O{constructor(e,{location:s=f.location,threshold:r=f.threshold,distance:n=f.distance,includeMatches:i=f.includeMatches,findAllMatches:c=f.findAllMatches,minMatchCharLength:o=f.minMatchCharLength,isCaseSensitive:a=f.isCaseSensitive,ignoreLocation:h=f.ignoreLocation}={}){super(e),this._bitapSearch=new _e(e,{location:s,threshold:r,distance:n,includeMatches:i,findAllMatches:c,minMatchCharLength:o,isCaseSensitive:a,ignoreLocation:h})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class Ie extends O{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let s=0,r;const n=[],i=this.pattern.length;for(;(r=e.indexOf(this.pattern,s))>-1;)s=r+i,n.push([r,s-1]);const c=!!n.length;return{isMatch:c,score:c?0:1,indices:n}}}const V=[ct,Ie,at,lt,ut,ht,ot,be],ae=V.length,ft=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,dt="|";function gt(t,e={}){return t.split(dt).map(s=>{let r=s.trim().split(ft).filter(i=>i&&!!i.trim()),n=[];for(let i=0,c=r.length;i<c;i+=1){const o=r[i];let a=!1,h=-1;for(;!a&&++h<ae;){const l=V[h];let u=l.isMultiMatch(o);u&&(n.push(new l(u,e)),a=!0)}if(!a)for(h=-1;++h<ae;){const l=V[h];let u=l.isSingleMatch(o);if(u){n.push(new l(u,e));break}}}return n})}const pt=new Set([be.type,Ie.type]);class mt{constructor(e,{isCaseSensitive:s=f.isCaseSensitive,includeMatches:r=f.includeMatches,minMatchCharLength:n=f.minMatchCharLength,ignoreLocation:i=f.ignoreLocation,findAllMatches:c=f.findAllMatches,location:o=f.location,threshold:a=f.threshold,distance:h=f.distance}={}){this.query=null,this.options={isCaseSensitive:s,includeMatches:r,minMatchCharLength:n,findAllMatches:c,ignoreLocation:i,location:o,threshold:a,distance:h},this.pattern=s?e:e.toLowerCase(),this.query=gt(this.pattern,this.options)}static condition(e,s){return s.useExtendedSearch}searchIn(e){const s=this.query;if(!s)return{isMatch:!1,score:1};const{includeMatches:r,isCaseSensitive:n}=this.options;e=n?e:e.toLowerCase();let i=0,c=[],o=0;for(let a=0,h=s.length;a<h;a+=1){const l=s[a];c.length=0,i=0;for(let u=0,d=l.length;u<d;u+=1){const g=l[u],{isMatch:p,indices:M,score:y}=g.search(e);if(p){if(i+=1,o+=y,r){const b=g.constructor.type;pt.has(b)?c=[...c,...M]:c.push(M)}}else{o=0,i=0,c.length=0;break}}if(i){let u={isMatch:!0,score:o/i};return r&&(u.indices=c),u}}return{isMatch:!1,score:1}}}const B=[];function Mt(...t){B.push(...t)}function G(t,e){for(let s=0,r=B.length;s<r;s+=1){let n=B[s];if(n.condition(t,e))return new n(t,e)}return new _e(t,e)}const N={AND:"$and",OR:"$or"},Y={PATH:"$path",PATTERN:"$val"},Q=t=>!!(t[N.AND]||t[N.OR]),yt=t=>!!t[Y.PATH],xt=t=>!I(t)&&ye(t)&&!Q(t),le=t=>({[N.AND]:Object.keys(t).map(e=>({[e]:t[e]}))});function we(t,e,{auto:s=!0}={}){const r=n=>{let i=Object.keys(n);const c=yt(n);if(!c&&i.length>1&&!Q(n))return r(le(n));if(xt(n)){const a=c?n[Y.PATH]:i[0],h=c?n[Y.PATTERN]:n[a];if(!_(h))throw new Error(Ue(a));const l={keyId:U(a),pattern:h};return s&&(l.searcher=G(h,e)),l}let o={children:[],operator:i[0]};return i.forEach(a=>{const h=n[a];I(h)&&h.forEach(l=>{o.children.push(r(l))})}),o};return Q(t)||(t=le(t)),r(t)}function St(t,{ignoreFieldNorm:e=f.ignoreFieldNorm}){t.forEach(s=>{let r=1;s.matches.forEach(({key:n,norm:i,score:c})=>{const o=n?n.weight:null;r*=Math.pow(c===0&&o?Number.EPSILON:c,(o||1)*(e?1:i))}),s.score=r})}function Et(t,e){const s=t.matches;e.matches=[],x(s)&&s.forEach(r=>{if(!x(r.indices)||!r.indices.length)return;const{indices:n,value:i}=r;let c={indices:n,value:i};r.key&&(c.key=r.key.src),r.idx>-1&&(c.refIndex=r.idx),e.matches.push(c)})}function _t(t,e){e.score=t.score}function bt(t,e,{includeMatches:s=f.includeMatches,includeScore:r=f.includeScore}={}){const n=[];return s&&n.push(Et),r&&n.push(_t),t.map(i=>{const{idx:c}=i,o={item:e[c],refIndex:c};return n.length&&n.forEach(a=>{a(i,o)}),o})}class v{constructor(e,s={},r){this.options={...f,...s},this.options.useExtendedSearch,this._keyStore=new Ye(this.options.keys),this.setCollection(e,r)}setCollection(e,s){if(this._docs=e,s&&!(s instanceof q))throw new Error(He);this._myIndex=s||Ee(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){x(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const s=[];for(let r=0,n=this._docs.length;r<n;r+=1){const i=this._docs[r];e(i,r)&&(this.removeAt(r),r-=1,n-=1,s.push(i))}return s}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:s=-1}={}){const{includeMatches:r,includeScore:n,shouldSort:i,sortFn:c,ignoreFieldNorm:o}=this.options;let a=_(e)?_(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return St(a,{ignoreFieldNorm:o}),i&&a.sort(c),Me(s)&&s>-1&&(a=a.slice(0,s)),bt(a,this._docs,{includeMatches:r,includeScore:n})}_searchStringList(e){const s=G(e,this.options),{records:r}=this._myIndex,n=[];return r.forEach(({v:i,i:c,n:o})=>{if(!x(i))return;const{isMatch:a,score:h,indices:l}=s.searchIn(i);a&&n.push({item:i,idx:c,matches:[{score:h,value:i,norm:o,indices:l}]})}),n}_searchLogical(e){const s=we(e,this.options),r=(o,a,h)=>{if(!o.children){const{keyId:u,searcher:d}=o,g=this._findMatches({key:this._keyStore.get(u),value:this._myIndex.getValueForItemAtKeyId(a,u),searcher:d});return g&&g.length?[{idx:h,item:a,matches:g}]:[]}const l=[];for(let u=0,d=o.children.length;u<d;u+=1){const g=o.children[u],p=r(g,a,h);if(p.length)l.push(...p);else if(o.operator===N.AND)return[]}return l},n=this._myIndex.records,i={},c=[];return n.forEach(({$:o,i:a})=>{if(x(o)){let h=r(s,o,a);h.length&&(i[a]||(i[a]={idx:a,item:o,matches:[]},c.push(i[a])),h.forEach(({matches:l})=>{i[a].matches.push(...l)}))}}),c}_searchObjectList(e){const s=G(e,this.options),{keys:r,records:n}=this._myIndex,i=[];return n.forEach(({$:c,i:o})=>{if(!x(c))return;let a=[];r.forEach((h,l)=>{a.push(...this._findMatches({key:h,value:c[l],searcher:s}))}),a.length&&i.push({idx:o,item:c,matches:a})}),i}_findMatches({key:e,value:s,searcher:r}){if(!x(s))return[];let n=[];if(I(s))s.forEach(({v:i,i:c,n:o})=>{if(!x(i))return;const{isMatch:a,score:h,indices:l}=r.searchIn(i);a&&n.push({score:h,key:e,value:i,idx:c,norm:o,indices:l})});else{const{v:i,n:c}=s,{isMatch:o,score:a,indices:h}=r.searchIn(i);o&&n.push({score:a,key:e,value:i,norm:c,indices:h})}return n}}v.version="7.0.0";v.createIndex=Ee;v.parseIndex=st;v.config=f;v.parseQuery=we;Mt(mt);const It={threshold:.3},Ae=t=>e=>{const s=new v(e,{keys:Object.keys(e[0]),...It,...t});return{type:"fuse",page:(r,n)=>e.slice(r*n,(r+1)*n),search:r=>s.search(r).map(({item:n})=>n),retrieve:r=>e.filter(n=>r.includes(n.key))}},wt=Ae(),Oe=({term:t,searcher:e=wt})=>me(({data:s})=>typeof e=="function"?t.length===0||(s==null?void 0:s.length)===0?{data:s,transformed:!1}:{data:e(s).search(t),transformed:!0}:{data:e.search(t),transformed:!0}),Ce=({debounce:t=250,value:e,onChange:s,transformBefore:r})=>{const[n,i]=he.usePurePassthrough({onChange:s,value:e,initial:""}),{setTransform:c,deleteTransform:o}=m.useDataUtilContext(),a=m.useDebouncedCallback(c,t,[]),h=ve.useCallback(l=>{i(l),l.length===0?o("filter"):(r!=null&&(l=r(l)),a("filter",Oe({term:l})))},[i,r]);return{value:n,onChange:h}},Le=({children:t=s=>ke.jsxRuntimeExports.jsx(m.Text$1,{placeholder:"Filter",...s}),...e})=>t(Ce(e)),At=Object.freeze(Object.defineProperty({__proto__:null,Column:m.Column,ColumnContext:m.ColumnContext,Core:m.Core,DataProvider:m.DataProvider,Filter:Le,Hover:m.Hover,ItemFrame:m.ItemFrame,List:$e.List,Search:m.Search,Selector:m.Selector,selectValueIsZero:m.selectValueIsZero,useDataContext:m.useDataContext,useDataUtilContext:m.useDataUtilContext,useFilter:Ce,useGetTransformedData:m.useGetTransformedData,useHoverContext:m.useHoverContext,useSearch:m.useSearch,useSelect:m.useSelect,useSelection:m.useSelection,useSelectionContext:m.useSelectionContext,useSelectionUtils:m.useSelectionUtils,useSetSourceData:m.useSetSourceData,useSourceData:m.useSourceData,useTransformedData:m.useTransformedData},Symbol.toStringTag,{value:"Module"}));exports.Filter=Le;exports.createFilterTransform=Oe;exports.external=At;exports.fuseFilter=Ae;exports.proxyMemo=me;
@@ -1 +1 @@
1
- "use strict";const k=require("./aggregator-q0CY7-QS.cjs"),R=require("./jsx-runtime-Cek9Ww4S.cjs"),d=require("./Toggle-CIXrEiVA.cjs"),x=require("react"),re=require("./Link-B83uKMKM.cjs"),se=require("./Animated-C_WGrQwR.cjs"),h=require("./css-LxkguM_s.cjs");require("./Pack-C_SrDA3a.cjs");const le=require("./List-B3WCj8GQ.cjs"),Y=(e,t)=>t.includes(e.key),H=(e,t)=>{t&&e.sort((n,s)=>k.F.stringsWithNumbers(n.name,s.name));let r=!1;for(let n=0;n<e.length;n++){const s=e[n];s.forcePosition!=null&&n!==s.forcePosition&&(r=!0,e.splice(n,1),e.splice(s.forcePosition,0,s))}return r?H(e,!1):e},K=({nodes:e,expanded:t,depth:r=0,sort:n=!0})=>{r===0&&n&&(e=e.sort((l,i)=>l.name.localeCompare(i.name)));const s=[];return e.forEach((l,i)=>{const o=Y(l,t);s.push({...l,depth:r,expanded:o,index:i}),o&&l.children!=null&&(l.children=H(l.children,n),s.push(...K({nodes:l.children,expanded:t,depth:r+1,sort:n})))}),s},ae=({tree:e,destination:t,keys:r})=>(r=k.A(r),r.forEach(n=>{const s=j({tree:e,key:n});s!=null&&(z({tree:e,keys:n}),V({tree:e,destination:t,additions:s}))}),e),z=({tree:e,keys:t})=>{t=k.A(t);const r=e.map(n=>n.key);return t.forEach(n=>{var l;const s=r.indexOf(n);if(s!==-1)e.splice(s,1);else{const i=q({tree:e,key:n});i!=null&&(i.children=(l=i.children)==null?void 0:l.filter(o=>o.key!==n))}}),e},V=({tree:e,destination:t,additions:r})=>{r=k.A(r);const n=j({tree:e,key:t});if(n==null)throw new Error(`Could not find node with key ${t}`);n.children==null&&(n.children=[]);const s=r.map(l=>l.key);return n.children=[...r,...n.children.filter(l=>!s.includes(l.key))],e},ie=({tree:e,key:t,updater:r,throwOnMissing:n=!0})=>{var i,o;const s=j({tree:e,key:t});if(s==null){if(n)throw new Error(`Could not find node with key ${t}`);return e}const l=q({tree:e,key:t});if(l!=null){const a=(i=l.children)==null?void 0:i.findIndex(S=>S.key===t);a!=null&&a!==-1&&((o=l.children)==null||o.splice(a,1,r(s)))}else e.splice(e.findIndex(a=>a.key===t),1,r(s));return e},oe=({tree:e,parent:t,updater:r,throwOnMissing:n=!0})=>{const s=j({tree:e,key:t});if(s==null){if(n)throw new Error(`Could not find node with key ${t}`);return e}return s.children=r(s.children??[]),e},j=({tree:e,key:t,depth:r=0})=>{for(let n=0;n<e.length;n++){const s=e[n];if(s.key===t){const l=s;return l.depth=r,l.position=n,l}if(s.children!=null){const l=j({tree:s.children,key:t,depth:r+1});if(l!=null)return l}}return null},ce=({tree:e,keys:t})=>{const r=[];for(const n of t){const s=j({tree:e,key:n});s!=null&&r.push(s)}return r},q=({tree:e,key:t})=>{for(const r of e)if(r.children!=null){if(r.children.some(s=>s.key===t))return r;const n=q({tree:r.children,key:t});if(n!=null)return n}return null},Z=e=>e.map(t=>({...t,children:Z(t.children??[])})),J=(...e)=>{const t=[];return e.forEach(r=>{t.push(r),r.children!=null&&t.push(...J(...r.children))}),t},M="tree-item",de=[["Shift"]],ue=e=>{const{onExpand:t,nodes:r,initialExpanded:n=[],sort:s=!0,selected:l,onSelectedChange:i}=e??{},[o,a,S]=d.useCombinedStateAndRef(n),[c,N]=k.usePassthrough({initial:[],value:l,onChange:i}),T=x.useMemo(()=>K({nodes:r,expanded:o,sort:s}),[r,o,s]),v=d.useSyncedRef(T),w=d.useHeldRef({triggers:de}),P=x.useCallback((f,{clicked:u})=>{N(f);const C=v.current.find(b=>b.key===u);if((C==null?void 0:C.hasChildren)===!1||u==null||w.current.held)return;const E=S.current,I=E.some(b=>b===u)?"contract":"expand";let y=E;I==="contract"?y=E.filter(b=>b!==u):y=[...E,u],a(y),t==null||t({current:y,action:I,clicked:u})},[t,v,a,N]),p=x.useCallback(f=>{a(u=>k.n([...u,f])),t==null||t({current:o,action:"expand",clicked:f})},[a]),L=x.useCallback(f=>{a(u=>u.filter(C=>C!==f)),t==null||t({current:o,action:"contract",clicked:f})},[a]),_=x.useCallback(()=>a([]),[a]);return{onSelect:P,selected:c,expanded:o,contract:L,expand:p,nodes:T,clearExpanded:_}},G=x.memo(({entry:e,selected:t,onSelect:r,onDrop:n,onRename:s,onSuccessfulDrop:l,onDoubleClick:i,loading:o=!1,useMargin:a=!0,translate:S})=>{const{key:c,hasChildren:N=!1,allowRename:T=!1,children:v,icon:w,name:P,depth:p,expanded:L,href:_,haulItems:f=[]}=e,{getSelected:u}=d.useSelectionUtils(),{getSourceData:C}=d.useDataUtilContext(),E=N||v!=null&&v.length>0,I=[];E&&I.push(R.jsxRuntimeExports.jsx(se.Animated,{enabled:L,enabledLoc:"bottom",disabledLoc:"right"})),w!=null&&I.push(w);const y=[];o&&y.push(R.jsxRuntimeExports.jsx(d.Zt.Loading,{className:h.CSS.B("loading-indicator")}));const[b,O]=x.useState(!1),{startDrag:U,...Q}=d.useDragAndDrop({type:"Tree.Item",key:c,canDrop:x.useCallback(({items:m,source:$})=>{const g=m.map(A=>A.key);return O(!1),$.type==="Tree.Item"&&!g.includes(c)},[]),onDrop:x.useCallback(m=>(n==null?void 0:n(c,m))??[],[c,n]),onDragOver:x.useCallback(()=>O(!0),[])}),D=()=>{const m=u(),$=C().filter(g=>m.includes(g.key));if(m.includes(c)){const g=$.map(({key:A,haulItems:B,depth:W})=>[{type:M,key:A,data:{depth:W}},...(B==null?void 0:B.map(X=>({...X,data:{...X.data,depth:W}})))??[]]).flat();return U(g,A=>l==null?void 0:l(c,A))}U([{type:M,key:c,data:{depth:p}},...f.map(g=>({...g,data:{...g.data,depth:p}}))],g=>l==null?void 0:l(c,g))},ee=a?"marginLeft":"paddingLeft";let F=p*2+1;E&&a&&(F-=1);const te={id:c,variant:"text",draggable:f.length>0,className:h.CSS(h.CSS.BE("list","item"),d.CONTEXT_TARGET,b&&h.CSS.M("dragging-over"),t&&d.CONTEXT_SELECTED,h.CSS.selected(t),E&&h.CSS.M("has-children"),h.CSS.BM("depth",p.toString())),onDragLeave:()=>O(!1),onDragStart:D,onClick:()=>r==null?void 0:r(c),style:{border:"none",position:S!=null?"absolute":"relative",transform:`translateY(${S}px)`,[ee]:`${F}rem`,"--pluto-tree-indicator-offset":`${p*1.5+(p===0?0:.5)}rem`},startIcon:I,iconSpacing:"small",noWrap:!0,endIcon:y,onDoubleClick:m=>i==null?void 0:i(c,m),href:_,...Q},ne=_!=null?re.Link:d.Button;return R.jsxRuntimeExports.jsx(ne,{className:h.CSS.BE("list","item"),...te,children:R.jsxRuntimeExports.jsx(d.MaybeEditable,{id:`text-${c}`,level:"p",allowDoubleClick:!1,value:P,disabled:!T,onChange:m=>s==null?void 0:s(c,m)})})});G.displayName="Tree.Item";const fe=d.componentRenderProp(G),he=({nodes:e,selected:t=[],onSelect:r,onDrop:n,onRename:s,onSuccessfulDrop:l,onDoubleClick:i,className:o,children:a=fe,itemHeight:S=27,useMargin:c=!1,showRules:N=!1,virtual:T=!0,clearExpanded:v,expand:w,contract:P,emptyContent:p,loading:L,..._})=>{const f=T?d.Core.Virtual:d.Core;return R.jsxRuntimeExports.jsx(le.List,{data:e,emptyContent:p,children:R.jsxRuntimeExports.jsx(d.Selector,{value:t,onChange:r,allowMultiple:!0,replaceOnSingle:!0,children:R.jsxRuntimeExports.jsx(f,{itemHeight:S,className:h.CSS(o,h.CSS.B("tree"),N&&h.CSS.M("rules")),..._,children:({key:u,...C})=>a({...C,key:u,loading:L===u,useMargin:c,onDrop:n,onRename:s,onSuccessfulDrop:l,onDoubleClick:i})})})})},pe=(e,t)=>d.edit(`text-${e}`,t),me=e=>d.asyncEdit(`text-${e}`),ge=Object.freeze(Object.defineProperty({__proto__:null,DefaultItem:G,HAUL_TYPE:M,Tree:he,asyncRename:me,deepCopy:Z,findNode:j,findNodeParent:q,findNodes:ce,flatten:K,getDescendants:J,moveNode:ae,removeNode:z,setNode:V,shouldExpand:Y,sortAndSplice:H,startRenaming:pe,updateNode:ie,updateNodeChildren:oe,use:ue},Symbol.toStringTag,{value:"Module"}));exports.external=ge;
1
+ "use strict";const k=require("./aggregator-q0CY7-QS.cjs"),R=require("./jsx-runtime-Cek9Ww4S.cjs"),d=require("./Toggle-Cu_t9VPe.cjs"),x=require("react"),re=require("./Link-DAjbmQEI.cjs"),se=require("./Animated-vgeFXXXh.cjs"),h=require("./css-LxkguM_s.cjs");require("./Pack-C_SrDA3a.cjs");const le=require("./List-C8Cd_qEK.cjs"),Y=(e,t)=>t.includes(e.key),H=(e,t)=>{t&&e.sort((n,s)=>k.F.stringsWithNumbers(n.name,s.name));let r=!1;for(let n=0;n<e.length;n++){const s=e[n];s.forcePosition!=null&&n!==s.forcePosition&&(r=!0,e.splice(n,1),e.splice(s.forcePosition,0,s))}return r?H(e,!1):e},K=({nodes:e,expanded:t,depth:r=0,sort:n=!0})=>{r===0&&n&&(e=e.sort((l,i)=>l.name.localeCompare(i.name)));const s=[];return e.forEach((l,i)=>{const o=Y(l,t);s.push({...l,depth:r,expanded:o,index:i}),o&&l.children!=null&&(l.children=H(l.children,n),s.push(...K({nodes:l.children,expanded:t,depth:r+1,sort:n})))}),s},ae=({tree:e,destination:t,keys:r})=>(r=k.A(r),r.forEach(n=>{const s=j({tree:e,key:n});s!=null&&(z({tree:e,keys:n}),V({tree:e,destination:t,additions:s}))}),e),z=({tree:e,keys:t})=>{t=k.A(t);const r=e.map(n=>n.key);return t.forEach(n=>{var l;const s=r.indexOf(n);if(s!==-1)e.splice(s,1);else{const i=q({tree:e,key:n});i!=null&&(i.children=(l=i.children)==null?void 0:l.filter(o=>o.key!==n))}}),e},V=({tree:e,destination:t,additions:r})=>{r=k.A(r);const n=j({tree:e,key:t});if(n==null)throw new Error(`Could not find node with key ${t}`);n.children==null&&(n.children=[]);const s=r.map(l=>l.key);return n.children=[...r,...n.children.filter(l=>!s.includes(l.key))],e},ie=({tree:e,key:t,updater:r,throwOnMissing:n=!0})=>{var i,o;const s=j({tree:e,key:t});if(s==null){if(n)throw new Error(`Could not find node with key ${t}`);return e}const l=q({tree:e,key:t});if(l!=null){const a=(i=l.children)==null?void 0:i.findIndex(S=>S.key===t);a!=null&&a!==-1&&((o=l.children)==null||o.splice(a,1,r(s)))}else e.splice(e.findIndex(a=>a.key===t),1,r(s));return e},oe=({tree:e,parent:t,updater:r,throwOnMissing:n=!0})=>{const s=j({tree:e,key:t});if(s==null){if(n)throw new Error(`Could not find node with key ${t}`);return e}return s.children=r(s.children??[]),e},j=({tree:e,key:t,depth:r=0})=>{for(let n=0;n<e.length;n++){const s=e[n];if(s.key===t){const l=s;return l.depth=r,l.position=n,l}if(s.children!=null){const l=j({tree:s.children,key:t,depth:r+1});if(l!=null)return l}}return null},ce=({tree:e,keys:t})=>{const r=[];for(const n of t){const s=j({tree:e,key:n});s!=null&&r.push(s)}return r},q=({tree:e,key:t})=>{for(const r of e)if(r.children!=null){if(r.children.some(s=>s.key===t))return r;const n=q({tree:r.children,key:t});if(n!=null)return n}return null},J=e=>e.map(t=>({...t,children:J(t.children??[])})),Q=(...e)=>{const t=[];return e.forEach(r=>{t.push(r),r.children!=null&&t.push(...Q(...r.children))}),t},M="tree-item",de=[["Shift"]],ue=e=>{const{onExpand:t,nodes:r,initialExpanded:n=[],sort:s=!0,selected:l,onSelectedChange:i}=e??{},[o,a,S]=d.useCombinedStateAndRef(n),[c,N]=k.usePassthrough({initial:[],value:l,onChange:i}),T=x.useMemo(()=>K({nodes:r,expanded:o,sort:s}),[r,o,s]),v=d.useSyncedRef(T),w=d.useHeldRef({triggers:de}),P=x.useCallback((f,{clicked:u})=>{N(f);const C=v.current.find(b=>b.key===u);if((C==null?void 0:C.hasChildren)===!1||u==null||w.current.held)return;const E=S.current,I=E.some(b=>b===u)?"contract":"expand";let y=E;I==="contract"?y=E.filter(b=>b!==u):y=[...E,u],a(y),t==null||t({current:y,action:I,clicked:u})},[t,v,a,N]),p=x.useCallback(f=>{a(u=>k.n([...u,f])),t==null||t({current:o,action:"expand",clicked:f})},[a]),L=x.useCallback(f=>{a(u=>u.filter(C=>C!==f)),t==null||t({current:o,action:"contract",clicked:f})},[a]),_=x.useCallback(()=>a([]),[a]);return{onSelect:P,selected:c,expanded:o,contract:L,expand:p,nodes:T,clearExpanded:_}},U=x.memo(({entry:e,selected:t,onSelect:r,onDrop:n,onRename:s,onSuccessfulDrop:l,onDoubleClick:i,loading:o=!1,useMargin:a=!0,translate:S})=>{const{key:c,hasChildren:N=!1,allowRename:T=!1,children:v,icon:w,name:P,depth:p,expanded:L,href:_,haulItems:f=[]}=e,{getSelected:u}=d.useSelectionUtils(),{getSourceData:C}=d.useDataUtilContext(),E=N||v!=null&&v.length>0,I=[];E&&I.push(R.jsxRuntimeExports.jsx(se.Animated,{enabled:L,enabledLoc:"bottom",disabledLoc:"right"})),w!=null&&I.push(w);const y=[];o&&y.push(R.jsxRuntimeExports.jsx(d.Ut.Loading,{className:h.CSS.B("loading-indicator")}));const[b,O]=x.useState(!1),{startDrag:G,...Z}=d.useDragAndDrop({type:"Tree.Item",key:c,canDrop:x.useCallback(({items:m,source:$})=>{const g=m.map(A=>A.key);return O(!1),$.type==="Tree.Item"&&!g.includes(c)},[]),onDrop:x.useCallback(m=>(n==null?void 0:n(c,m))??[],[c,n]),onDragOver:x.useCallback(()=>O(!0),[])}),D=()=>{const m=u(),$=C().filter(g=>m.includes(g.key));if(m.includes(c)){const g=$.map(({key:A,haulItems:B,depth:W})=>[{type:M,key:A,data:{depth:W}},...(B==null?void 0:B.map(X=>({...X,data:{...X.data,depth:W}})))??[]]).flat();return G(g,A=>l==null?void 0:l(c,A))}G([{type:M,key:c,data:{depth:p}},...f.map(g=>({...g,data:{...g.data,depth:p}}))],g=>l==null?void 0:l(c,g))},ee=a?"marginLeft":"paddingLeft";let F=p*2+1;E&&a&&(F-=1);const te={id:c,variant:"text",draggable:f.length>0,className:h.CSS(h.CSS.BE("list","item"),d.CONTEXT_TARGET,b&&h.CSS.M("dragging-over"),t&&d.CONTEXT_SELECTED,h.CSS.selected(t),E&&h.CSS.M("has-children"),h.CSS.BM("depth",p.toString())),onDragLeave:()=>O(!1),onDragStart:D,onClick:()=>r==null?void 0:r(c),style:{border:"none",position:S!=null?"absolute":"relative",transform:`translateY(${S}px)`,[ee]:`${F}rem`,"--pluto-tree-indicator-offset":`${p*1.5+(p===0?0:.5)}rem`},startIcon:I,iconSpacing:"small",noWrap:!0,endIcon:y,onDoubleClick:m=>i==null?void 0:i(c,m),href:_,...Z},ne=_!=null?re.Link:d.Button;return R.jsxRuntimeExports.jsx(ne,{className:h.CSS.BE("list","item"),...te,children:R.jsxRuntimeExports.jsx(d.MaybeEditable,{id:`text-${c}`,level:"p",allowDoubleClick:!1,value:P,disabled:!T,onChange:m=>s==null?void 0:s(c,m)})})});U.displayName="Tree.Item";const fe=d.componentRenderProp(U),he=({nodes:e,selected:t=[],onSelect:r,onDrop:n,onRename:s,onSuccessfulDrop:l,onDoubleClick:i,className:o,children:a=fe,itemHeight:S=27,useMargin:c=!1,showRules:N=!1,virtual:T=!0,clearExpanded:v,expand:w,contract:P,emptyContent:p,loading:L,..._})=>{const f=T?d.Core.Virtual:d.Core;return R.jsxRuntimeExports.jsx(le.List,{data:e,emptyContent:p,children:R.jsxRuntimeExports.jsx(d.Selector,{value:t,onChange:r,allowMultiple:!0,replaceOnSingle:!0,children:R.jsxRuntimeExports.jsx(f,{itemHeight:S,className:h.CSS(o,h.CSS.B("tree"),N&&h.CSS.M("rules")),..._,children:({key:u,...C})=>a({...C,key:u,loading:L===u,useMargin:c,onDrop:n,onRename:s,onSuccessfulDrop:l,onDoubleClick:i})})})})},pe=(e,t)=>d.edit(`text-${e}`,t),me=e=>d.asyncEdit(`text-${e}`),ge=Object.freeze(Object.defineProperty({__proto__:null,DefaultItem:U,HAUL_TYPE:M,Tree:he,asyncRename:me,deepCopy:J,findNode:j,findNodeParent:q,findNodes:ce,flatten:K,getDescendants:Q,moveNode:ae,removeNode:z,setNode:V,shouldExpand:Y,sortAndSplice:H,startRenaming:pe,updateNode:ie,updateNodeChildren:oe,use:ue},Symbol.toStringTag,{value:"Module"}));exports.external=ge;
@@ -1 +1 @@
1
- "use strict";const i=require("./jsx-runtime-Cek9Ww4S.cjs"),d=require("./aggregator-q0CY7-QS.cjs"),c=require("react"),S=require("./Pack-C_SrDA3a.cjs"),a=require("./Toggle-CIXrEiVA.cjs"),o=require("./css-LxkguM_s.cjs"),p=c.createContext({divided:!1,level:"h1"}),l=()=>c.useContext(p),j=({children:s,className:r,level:e="h1",divided:n=!1,...t})=>i.jsxRuntimeExports.jsx(p.Provider,{value:{level:e,divided:n},children:i.jsxRuntimeExports.jsx(S.Space,{el:"header",direction:"x",justify:"spaceBetween",className:o.CSS(o.CSS.B("header"),o.CSS.bordered("bottom"),n&&o.CSS.BM("header","divided"),r),...t,children:s})}),m=({children:s=[]})=>{const{level:r,divided:e}=l();return i.jsxRuntimeExports.jsx(S.Space,{direction:"x",size:"small",align:"center",className:o.CSS.BE("header","actions"),children:d.A(s).map((n,t)=>i.jsxRuntimeExports.jsx(h,{index:t,level:r,divided:e,children:n},t))})},h=({index:s,level:r,children:e,divided:n})=>{let t=e;if(!c.isValidElement(e)){const{onClick:x,...C}=e;t=i.jsxRuntimeExports.jsx(a.Icon,{onClick:u=>{u.stopPropagation(),u.preventDefault(),x==null||x(u)},size:d.LevelComponentSizes[r],...C},s)}return i.jsxRuntimeExports.jsxs(c.Fragment,{children:[n&&i.jsxRuntimeExports.jsx(a.Divider,{}),t]},s)},v=({children:s="",className:r,onClick:e,...n})=>{const{level:t}=l();return i.jsxRuntimeExports.jsx(a.Button,{variant:"text",size:d.LevelComponentSizes[t],onClick:e,className:o.CSS(o.CSS.B("header-button-title"),r),sharp:!0,...n,children:s})},E=({className:s,level:r,...e})=>{const{level:n,divided:t}=l();return i.jsxRuntimeExports.jsx(a.WithIcon,{className:o.CSS(o.CSS.BE("header","text"),s),level:r??n,divided:t,size:1.5,...e})},R=Object.freeze(Object.defineProperty({__proto__:null,Actions:m,ButtonTitle:v,Header:j,Title:E,useContext:l},Symbol.toStringTag,{value:"Module"}));exports.Actions=m;exports.ButtonTitle=v;exports.Header=j;exports.external=R;
1
+ "use strict";const i=require("./jsx-runtime-Cek9Ww4S.cjs"),d=require("./aggregator-q0CY7-QS.cjs"),c=require("react"),S=require("./Pack-C_SrDA3a.cjs"),a=require("./Toggle-Cu_t9VPe.cjs"),o=require("./css-LxkguM_s.cjs"),p=c.createContext({divided:!1,level:"h1"}),l=()=>c.useContext(p),j=({children:s,className:r,level:e="h1",divided:n=!1,...t})=>i.jsxRuntimeExports.jsx(p.Provider,{value:{level:e,divided:n},children:i.jsxRuntimeExports.jsx(S.Space,{el:"header",direction:"x",justify:"spaceBetween",className:o.CSS(o.CSS.B("header"),o.CSS.bordered("bottom"),n&&o.CSS.BM("header","divided"),r),...t,children:s})}),m=({children:s=[]})=>{const{level:r,divided:e}=l();return i.jsxRuntimeExports.jsx(S.Space,{direction:"x",size:"small",align:"center",className:o.CSS.BE("header","actions"),children:d.A(s).map((n,t)=>i.jsxRuntimeExports.jsx(h,{index:t,level:r,divided:e,children:n},t))})},h=({index:s,level:r,children:e,divided:n})=>{let t=e;if(!c.isValidElement(e)){const{onClick:x,...C}=e;t=i.jsxRuntimeExports.jsx(a.Icon,{onClick:u=>{u.stopPropagation(),u.preventDefault(),x==null||x(u)},size:d.LevelComponentSizes[r],...C},s)}return i.jsxRuntimeExports.jsxs(c.Fragment,{children:[n&&i.jsxRuntimeExports.jsx(a.Divider,{}),t]},s)},v=({children:s="",className:r,onClick:e,...n})=>{const{level:t}=l();return i.jsxRuntimeExports.jsx(a.Button,{variant:"text",size:d.LevelComponentSizes[t],onClick:e,className:o.CSS(o.CSS.B("header-button-title"),r),sharp:!0,...n,children:s})},E=({className:s,level:r,...e})=>{const{level:n,divided:t}=l();return i.jsxRuntimeExports.jsx(a.WithIcon,{className:o.CSS(o.CSS.BE("header","text"),s),level:r??n,divided:t,size:1.5,...e})},R=Object.freeze(Object.defineProperty({__proto__:null,Actions:m,ButtonTitle:v,Header:j,Title:E,useContext:l},Symbol.toStringTag,{value:"Module"}));exports.Actions=m;exports.ButtonTitle=v;exports.Header=j;exports.external=R;