@solibo/solibo-ui 2.0.3 → 2.1.0

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 (145) hide show
  1. package/dist/assets/index.css +1 -1
  2. package/dist/assets/index13.css +1 -1
  3. package/dist/assets/index16.css +1 -1
  4. package/dist/assets/index18.css +1 -1
  5. package/dist/assets/index19.css +1 -1
  6. package/dist/assets/index2.css +1 -1
  7. package/dist/assets/index28.css +1 -1
  8. package/dist/assets/index35.css +1 -1
  9. package/dist/assets/index36.css +1 -1
  10. package/dist/assets/index37.css +1 -1
  11. package/dist/assets/index38.css +1 -1
  12. package/dist/assets/index39.css +1 -1
  13. package/dist/assets/index40.css +1 -1
  14. package/dist/assets/index41.css +1 -1
  15. package/dist/assets/index42.css +1 -1
  16. package/dist/assets/index43.css +1 -1
  17. package/dist/assets/index44.css +1 -1
  18. package/dist/assets/index45.css +1 -1
  19. package/dist/assets/index46.css +1 -1
  20. package/dist/assets/index47.css +1 -1
  21. package/dist/assets/index48.css +1 -1
  22. package/dist/assets/index49.css +1 -1
  23. package/dist/assets/index50.css +1 -1
  24. package/dist/assets/index51.css +1 -1
  25. package/dist/assets/index52.css +1 -1
  26. package/dist/assets/index53.css +1 -1
  27. package/dist/assets/index54.css +1 -1
  28. package/dist/assets/index55.css +1 -0
  29. package/dist/assets/index6.css +1 -1
  30. package/dist/components/badge/index.cjs +1 -1
  31. package/dist/components/badge/index.js +38 -38
  32. package/dist/components/checkbox/index.cjs +1 -1
  33. package/dist/components/checkbox/index.js +1 -1
  34. package/dist/components/clipboard/index.cjs +2 -0
  35. package/dist/components/clipboard/index.cjs.map +1 -0
  36. package/dist/components/clipboard/index.js +29 -0
  37. package/dist/components/clipboard/index.js.map +1 -0
  38. package/dist/components/collapsible/index.cjs +1 -1
  39. package/dist/components/collapsible/index.js +1 -1
  40. package/dist/components/controls/index.cjs +1 -1
  41. package/dist/components/controls/index.js +2 -2
  42. package/dist/components/croppable/index.cjs +1 -1
  43. package/dist/components/croppable/index.js +1 -1
  44. package/dist/components/dialog/index.cjs +1 -1
  45. package/dist/components/dialog/index.js +35 -35
  46. package/dist/components/divider/index.cjs +1 -1
  47. package/dist/components/divider/index.js +3 -3
  48. package/dist/components/dropdown/index.cjs +1 -1
  49. package/dist/components/dropdown/index.js +4 -4
  50. package/dist/components/dropzone/index.cjs +1 -1
  51. package/dist/components/dropzone/index.js +1 -1
  52. package/dist/components/editor/index.cjs +1 -1
  53. package/dist/components/editor/index.js +2 -2
  54. package/dist/components/empty-state/index.cjs +1 -1
  55. package/dist/components/empty-state/index.cjs.map +1 -1
  56. package/dist/components/empty-state/index.js +16 -11
  57. package/dist/components/empty-state/index.js.map +1 -1
  58. package/dist/components/fieldset/index.cjs +1 -1
  59. package/dist/components/fieldset/index.js +1 -1
  60. package/dist/components/figure/index.cjs +1 -1
  61. package/dist/components/figure/index.js +1 -1
  62. package/dist/components/file/index.cjs +1 -1
  63. package/dist/components/file/index.js +1 -1
  64. package/dist/components/group/index.cjs +1 -1
  65. package/dist/components/group/index.js +3 -3
  66. package/dist/components/header/index.cjs +1 -1
  67. package/dist/components/header/index.cjs.map +1 -1
  68. package/dist/components/header/index.js +22 -22
  69. package/dist/components/icon/index.cjs +1 -1
  70. package/dist/components/icon/index.cjs.map +1 -1
  71. package/dist/components/icon/index.js +28 -26
  72. package/dist/components/icon/index.js.map +1 -1
  73. package/dist/components/iframe/index.cjs +1 -1
  74. package/dist/components/iframe/index.cjs.map +1 -1
  75. package/dist/components/iframe/index.js +45 -44
  76. package/dist/components/iframe/index.js.map +1 -1
  77. package/dist/components/input/index.cjs +1 -1
  78. package/dist/components/input/index.js +2 -2
  79. package/dist/components/link/index.cjs +1 -1
  80. package/dist/components/link/index.js +1 -1
  81. package/dist/components/list/index.cjs +1 -1
  82. package/dist/components/list/index.cjs.map +1 -1
  83. package/dist/components/list/index.js +72 -44
  84. package/dist/components/list/index.js.map +1 -1
  85. package/dist/components/loading/index.cjs +1 -1
  86. package/dist/components/loading/index.js +1 -1
  87. package/dist/components/menu/index.cjs +1 -1
  88. package/dist/components/menu/index.cjs.map +1 -1
  89. package/dist/components/menu/index.js +23 -22
  90. package/dist/components/menu/index.js.map +1 -1
  91. package/dist/components/message/index.cjs +1 -1
  92. package/dist/components/message/index.cjs.map +1 -1
  93. package/dist/components/message/index.js +33 -33
  94. package/dist/components/message/index.js.map +1 -1
  95. package/dist/components/nav/index.cjs +1 -1
  96. package/dist/components/nav/index.js +36 -36
  97. package/dist/components/popover/index.cjs +1 -1
  98. package/dist/components/popover/index.cjs.map +1 -1
  99. package/dist/components/popover/index.js +81 -69
  100. package/dist/components/popover/index.js.map +1 -1
  101. package/dist/components/search/index.cjs +1 -1
  102. package/dist/components/search/index.js +1 -1
  103. package/dist/components/select/index.cjs +1 -1
  104. package/dist/components/select/index.js +2 -2
  105. package/dist/components/sortable/index.cjs.map +1 -1
  106. package/dist/components/sortable/index.js.map +1 -1
  107. package/dist/components/table/index.cjs.map +1 -1
  108. package/dist/components/table/index.js.map +1 -1
  109. package/dist/components/textarea/index.cjs +1 -1
  110. package/dist/components/textarea/index.js +12 -12
  111. package/dist/components/toolbar/index.cjs +1 -1
  112. package/dist/components/toolbar/index.js +1 -1
  113. package/dist/components/widget/index.cjs +1 -1
  114. package/dist/components/widget/index.cjs.map +1 -1
  115. package/dist/components/widget/index.js +13 -8
  116. package/dist/components/widget/index.js.map +1 -1
  117. package/dist/icons-BTif0nDb.cjs +2 -0
  118. package/dist/icons-BTif0nDb.cjs.map +1 -0
  119. package/dist/{icons-dUP7sKyt.js → icons-CBbpxsJF.js} +32 -5
  120. package/dist/icons-CBbpxsJF.js.map +1 -0
  121. package/dist/{index-Bt7vnwji.cjs → index-5qUTKX7P.cjs} +2 -2
  122. package/dist/{index-Bt7vnwji.cjs.map → index-5qUTKX7P.cjs.map} +1 -1
  123. package/dist/{index-BLb3JiCr.js → index-BuSfz4qx.js} +3 -3
  124. package/dist/{index-BLb3JiCr.js.map → index-BuSfz4qx.js.map} +1 -1
  125. package/dist/{index-DWDp66fp.cjs → index-CeHwRKAg.cjs} +2 -2
  126. package/dist/{index-DWDp66fp.cjs.map → index-CeHwRKAg.cjs.map} +1 -1
  127. package/dist/{index-Ds-Ocs4L.js → index-DBWgRXp9.js} +3 -3
  128. package/dist/{index-Ds-Ocs4L.js.map → index-DBWgRXp9.js.map} +1 -1
  129. package/dist/index.cjs +1 -1
  130. package/dist/index.d.ts +45 -7
  131. package/dist/index.js +97 -95
  132. package/dist/index.js.map +1 -1
  133. package/dist/menu-popover-CdhAgSQb.cjs +2 -0
  134. package/dist/menu-popover-CdhAgSQb.cjs.map +1 -0
  135. package/dist/menu-popover-D-Ax5zzy.js +77 -0
  136. package/dist/menu-popover-D-Ax5zzy.js.map +1 -0
  137. package/dist/tokens.json +1 -1
  138. package/package.json +1 -1
  139. package/dist/icons-Dv_p0bUF.cjs +0 -2
  140. package/dist/icons-Dv_p0bUF.cjs.map +0 -1
  141. package/dist/icons-dUP7sKyt.js.map +0 -1
  142. package/dist/menu-popover-CM3v5s-5.cjs +0 -2
  143. package/dist/menu-popover-CM3v5s-5.cjs.map +0 -1
  144. package/dist/menu-popover-DOkciab5.js +0 -74
  145. package/dist/menu-popover-DOkciab5.js.map +0 -1
@@ -0,0 +1,29 @@
1
+ import { jsxs as i, jsx as n } from "react/jsx-runtime";
2
+ import { Icon as p } from "../icon/index.js";
3
+ import '../../assets/index35.css';const s = "_clipboard_1npqh_1", d = "_label_1npqh_9", a = {
4
+ clipboard: s,
5
+ label: d
6
+ }, y = ({
7
+ label: e,
8
+ onSuccess: c
9
+ }) => {
10
+ const r = async () => {
11
+ if (navigator.clipboard) return navigator.clipboard.writeText(e);
12
+ const o = document.createElement("textarea");
13
+ o.value = e, o.style.position = "fixed", o.style.opacity = "0", document.body.appendChild(o), o.select();
14
+ const l = document.execCommand("copy");
15
+ if (o.remove(), !l) throw new Error("Unable to copy text to clipboard");
16
+ }, t = () => {
17
+ r().then(() => c());
18
+ };
19
+ return /* @__PURE__ */ i("span", { className: a.clipboard, onClick: t, onKeyDown: (o) => {
20
+ (o.key === "Enter" || o.key === " ") && (o.preventDefault(), t());
21
+ }, role: "button", tabIndex: 0, "data-component": "clipboard", children: [
22
+ /* @__PURE__ */ n("span", { className: a.label, children: e }),
23
+ /* @__PURE__ */ n(p, { name: "Copy", size: "small" })
24
+ ] });
25
+ };
26
+ export {
27
+ y as Clipboard
28
+ };
29
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/clipboard/index.tsx"],"sourcesContent":["import { Icon } from '@/components/icon';\n\nimport styles from './styles.module.css';\n\nexport type ClipboardProps = {\n label: string;\n onSuccess: () => void;\n};\n\nexport const Clipboard = ({ label, onSuccess }: ClipboardProps) => {\n const copyText = async () => {\n if (navigator.clipboard) return navigator.clipboard.writeText(label);\n\n const input = document.createElement('textarea');\n input.value = label;\n input.style.position = 'fixed';\n input.style.opacity = '0';\n document.body.appendChild(input);\n input.select();\n const copied = document.execCommand('copy');\n input.remove();\n\n if (!copied) throw new Error('Unable to copy text to clipboard');\n };\n\n const handleClick = () => {\n void copyText().then(() => onSuccess());\n };\n\n return (\n <span\n className={styles.clipboard}\n onClick={handleClick}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n handleClick();\n }\n }}\n role='button'\n tabIndex={0}\n >\n <span className={styles.label}>{label}</span>\n <Icon\n name='Copy'\n size='small'\n />\n </span>\n );\n};\n"],"names":["Clipboard","label","onSuccess","copyText","navigator","clipboard","writeText","input","document","createElement","value","style","position","opacity","body","appendChild","select","copied","execCommand","remove","Error","handleClick","then","jsxs","styles","e","key","preventDefault","jsx","Icon"],"mappings":";;;;;GASaA,IAAYA,CAAC;AAAA,EAAEC,OAAAA;AAAAA,EAAOC,WAAAA;AAA0B,MAAM;AACjE,QAAMC,IAAW,YAAY;AAC3B,QAAIC,UAAUC,UAAW,QAAOD,UAAUC,UAAUC,UAAUL,CAAK;AAEnE,UAAMM,IAAQC,SAASC,cAAc,UAAU;AAC/CF,IAAAA,EAAMG,QAAQT,GACdM,EAAMI,MAAMC,WAAW,SACvBL,EAAMI,MAAME,UAAU,KACtBL,SAASM,KAAKC,YAAYR,CAAK,GAC/BA,EAAMS,OAAAA;AACN,UAAMC,IAAST,SAASU,YAAY,MAAM;AAG1C,QAFAX,EAAMY,OAAAA,GAEF,CAACF,EAAQ,OAAM,IAAIG,MAAM,kCAAkC;AAAA,EACjE,GAEMC,IAAcA,MAAM;AACxB,IAAKlB,EAAAA,EAAWmB,KAAK,MAAMpB,GAAW;AAAA,EACxC;AAEA,SACE,gBAAAqB,EAAC,UACC,WAAWC,EAAOnB,WAClB,SAASgB,GACT,WAAYI,CAAAA,MAAM;AAChB,KAAIA,EAAEC,QAAQ,WAAWD,EAAEC,QAAQ,SACjCD,EAAEE,eAAAA,GACFN,EAAAA;AAAAA,EAEJ,GACA,MAAK,UACL,UAAU,GAAE,kBAAA,aAEZ,UAAA;AAAA,IAAA,gBAAAO,EAAC,QAAA,EAAK,WAAWJ,EAAOvB,OAAQA,UAAAA,GAAM;AAAA,IACtC,gBAAA2B,EAACC,GAAA,EACC,MAAK,QACL,MAAK,QAAA,CAAO;AAAA,EAAA,GAEhB;AAEJ;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index35.css');const n=require("react/jsx-runtime"),l=require("../icon/index.cjs"),a="_collapsible_1nzgt_1",i="_content_1nzgt_12",r="_indicator_1nzgt_16",e={collapsible:a,content:i,indicator:r},d=({children:o,disabled:t,open:s,summary:c})=>n.jsxs("details",{className:e.collapsible,open:t||s||void 0,"data-component":"collapsible",children:[n.jsxs("summary",{children:[n.jsx("span",{className:e.content,"data-content":"collapsible-summary",children:c}),!t&&n.jsx("span",{className:e.indicator,"data-content":"collapsible-indicator",children:n.jsx(l.Icon,{name:"CaretDown",size:"medium"})})]}),o]});exports.Collapsible=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index36.css');const n=require("react/jsx-runtime"),l=require("../icon/index.cjs"),a="_collapsible_1nzgt_1",i="_content_1nzgt_12",r="_indicator_1nzgt_16",e={collapsible:a,content:i,indicator:r},d=({children:o,disabled:t,open:s,summary:c})=>n.jsxs("details",{className:e.collapsible,open:t||s||void 0,"data-component":"collapsible",children:[n.jsxs("summary",{children:[n.jsx("span",{className:e.content,"data-content":"collapsible-summary",children:c}),!t&&n.jsx("span",{className:e.indicator,"data-content":"collapsible-indicator",children:n.jsx(l.Icon,{name:"CaretDown",size:"medium"})})]}),o]});exports.Collapsible=d;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,6 +1,6 @@
1
1
  import { jsxs as c, jsx as n } from "react/jsx-runtime";
2
2
  import { Icon as s } from "../icon/index.js";
3
- import '../../assets/index35.css';const i = "_collapsible_1nzgt_1", r = "_content_1nzgt_12", m = "_indicator_1nzgt_16", t = {
3
+ import '../../assets/index36.css';const i = "_collapsible_1nzgt_1", r = "_content_1nzgt_12", m = "_indicator_1nzgt_16", t = {
4
4
  collapsible: i,
5
5
  content: r,
6
6
  indicator: m
@@ -1,3 +1,3 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index36.css');const b=require("react/jsx-runtime"),Z=require("../../classix-5H4IWnMA.cjs"),l=require("react"),ee=require("../button/index.cjs"),A=require("../../menu-popover-CM3v5s-5.cjs"),te="_controls_t1re6_13",ne="_inline_t1re6_43",ie="_embedded_t1re6_48",re="_fixed_t1re6_49",oe="_adaptive_t1re6_60",se="_measurement_t1re6_65",h={controls:te,default:"_default_t1re6_28",inline:ne,embedded:ie,fixed:re,adaptive:oe,measurement:se,"non-button-content":"_non-button-content_t1re6_99","overflow-trigger":"_overflow-trigger_t1re6_128"},de={primary:2,secondary:1,tertiary:0,simple:0},ce={default:h.default,embedded:h.embedded,fixed:h.fixed,inline:h.inline},ae=s=>de[s.props.variant??"secondary"];function le({buttons:s,menuAccessibleLabel:i,triggerAccessibleLabel:n}){const x=s.map(o=>({button:o,isDanger:o.props.intent==="danger",value:o}));return b.jsx(A.MenuPopover,{triggerAccessibleLabel:n,"data-component":"overflowmenu",children:({close:o,initialFocus:r})=>b.jsx(A.MenuActionList,{actions:x,initialFocus:r,menuAccessibleLabel:i,onSelect:()=>o(),usesMenuSemantics:!0})})}const p=(s,i)=>{const n=Number.parseFloat(String(s[i]));return Number.isFinite(n)?n:0},ue=s=>{if(!s.trim().endsWith("px"))return;const i=Number.parseFloat(s);return Number.isFinite(i)?i:void 0},me=(s,i)=>{const n=s.parentElement;if(!n)return;const x=n.getBoundingClientRect(),o=getComputedStyle(n),r=x.width||n.clientWidth,S=x.left+p(o,"borderLeftWidth")+p(o,"paddingLeft"),M=x.left+r-p(o,"borderRightWidth")-p(o,"paddingRight"),_=Array.from(n.children).slice(0,Array.from(n.children).indexOf(s)),y=_.reduce((f,u)=>Math.max(f,u.getBoundingClientRect().right),S),c=_.length>0?p(o,"columnGap"):0,a=Math.max(0,M-y-c),R=(i==null?void 0:i.parent)===n?Math.max(0,r-i.parentWidth):0;return{availableWidth:R>0?Math.max(a,((i==null?void 0:i.availableWidth)??0)+R):a,parent:n,parentWidth:r}},fe=({children:s,className:i,maxVisibleButtons:n,overflow:x,overflowAccessibleLabel:o="More actions",variant:r="default",...S})=>{const M=l.Children.toArray(s),_=[],y=[];M.forEach(e=>{l.isValidElement(e)&&e.type===ee.Button?_.push(e):y.push(e)});const c=_.map((e,d)=>({button:e,index:d,rank:ae(e)})).sort((e,d)=>e.rank-d.rank||e.index-d.index).map(({button:e,index:d})=>l.cloneElement(e,{key:e.key??d})),a=r==="embedded"||r==="fixed"&&x==="menu",R=typeof n=="number"&&Number.isFinite(n)?Math.floor(n):0,f=r==="embedded"&&R>0?Math.min(c.length,R):c.length,u=l.useRef(null),N=l.useRef(void 0),z=l.useRef(null),E=l.useRef(null),[F,C]=l.useState(f),k=c.map(e=>String(e.key)).join(`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index37.css');const b=require("react/jsx-runtime"),Z=require("../../classix-5H4IWnMA.cjs"),l=require("react"),ee=require("../button/index.cjs"),A=require("../../menu-popover-CdhAgSQb.cjs"),te="_controls_t1re6_13",ne="_inline_t1re6_43",ie="_embedded_t1re6_48",re="_fixed_t1re6_49",oe="_adaptive_t1re6_60",se="_measurement_t1re6_65",h={controls:te,default:"_default_t1re6_28",inline:ne,embedded:ie,fixed:re,adaptive:oe,measurement:se,"non-button-content":"_non-button-content_t1re6_99","overflow-trigger":"_overflow-trigger_t1re6_128"},de={primary:2,secondary:1,tertiary:0,simple:0},ce={default:h.default,embedded:h.embedded,fixed:h.fixed,inline:h.inline},ae=s=>de[s.props.variant??"secondary"];function le({buttons:s,menuAccessibleLabel:i,triggerAccessibleLabel:n}){const x=s.map(o=>({button:o,isDanger:o.props.intent==="danger",value:o}));return b.jsx(A.MenuPopover,{triggerAccessibleLabel:n,"data-component":"overflowmenu",children:({close:o,initialFocus:r})=>b.jsx(A.MenuActionList,{actions:x,initialFocus:r,menuAccessibleLabel:i,onSelect:()=>o(),usesMenuSemantics:!0})})}const p=(s,i)=>{const n=Number.parseFloat(String(s[i]));return Number.isFinite(n)?n:0},ue=s=>{if(!s.trim().endsWith("px"))return;const i=Number.parseFloat(s);return Number.isFinite(i)?i:void 0},me=(s,i)=>{const n=s.parentElement;if(!n)return;const x=n.getBoundingClientRect(),o=getComputedStyle(n),r=x.width||n.clientWidth,S=x.left+p(o,"borderLeftWidth")+p(o,"paddingLeft"),M=x.left+r-p(o,"borderRightWidth")-p(o,"paddingRight"),_=Array.from(n.children).slice(0,Array.from(n.children).indexOf(s)),y=_.reduce((f,u)=>Math.max(f,u.getBoundingClientRect().right),S),c=_.length>0?p(o,"columnGap"):0,a=Math.max(0,M-y-c),R=(i==null?void 0:i.parent)===n?Math.max(0,r-i.parentWidth):0;return{availableWidth:R>0?Math.max(a,((i==null?void 0:i.availableWidth)??0)+R):a,parent:n,parentWidth:r}},fe=({children:s,className:i,maxVisibleButtons:n,overflow:x,overflowAccessibleLabel:o="More actions",variant:r="default",...S})=>{const M=l.Children.toArray(s),_=[],y=[];M.forEach(e=>{l.isValidElement(e)&&e.type===ee.Button?_.push(e):y.push(e)});const c=_.map((e,d)=>({button:e,index:d,rank:ae(e)})).sort((e,d)=>e.rank-d.rank||e.index-d.index).map(({button:e,index:d})=>l.cloneElement(e,{key:e.key??d})),a=r==="embedded"||r==="fixed"&&x==="menu",R=typeof n=="number"&&Number.isFinite(n)?Math.floor(n):0,f=r==="embedded"&&R>0?Math.min(c.length,R):c.length,u=l.useRef(null),N=l.useRef(void 0),z=l.useRef(null),E=l.useRef(null),[F,C]=l.useState(f),k=c.map(e=>String(e.key)).join(`
2
2
  `),[D,G]=l.useState(k);D!==k&&(G(k),C(f));const g=l.useCallback(()=>{var L,I,T;if(!a){C(f);return}const e=u.current,d=z.current;if(!e||!d)return;const W=Array.from(d.querySelectorAll('[data-component="button"]')),w=W.at(-1);if(!w)return;const v=W.slice(0,c.length).map(t=>t.getBoundingClientRect().width);if(v.length!==c.length)return;const m=getComputedStyle(e),H=p(m,"paddingLeft")+p(m,"paddingRight")+p(m,"borderLeftWidth")+p(m,"borderRightWidth"),J=ue(m.maxWidth),B=r==="embedded"?me(e,N.current):void 0;B&&(N.current=B);const Q=(B==null?void 0:B.availableWidth)??((L=e.parentElement)==null?void 0:L.clientWidth)??0,U=((I=window.visualViewport)==null?void 0:I.width)??document.documentElement.clientWidth,V=Math.min(...[J,Q,U].filter(t=>typeof t=="number"&&Number.isFinite(t)&&t>0));if(!Number.isFinite(V))return;const q=Math.max(0,V-H),P=((T=E.current)==null?void 0:T.getBoundingClientRect().width)??0,X=v.reduce((t,Y)=>t+Y,0);if(f===c.length&&P+X<=q){C(t=>t===f?t:f);return}let K=P+w.getBoundingClientRect().width,j=0;for(let t=0;t<f&&!(K+v[t]>q);t+=1)K+=v[t],j=t+1;C(t=>t===j?t:j)},[a,c.length,r,f]);if(l.useLayoutEffect(()=>{var d,W,w,v;if(g(),!a)return;const e=typeof ResizeObserver>"u"?void 0:new ResizeObserver(g);return u.current&&(e==null||e.observe(u.current)),(d=u.current)!=null&&d.parentElement&&(e==null||e.observe(u.current.parentElement)),r==="embedded"&&((W=u.current)!=null&&W.parentElement)&&Array.from(u.current.parentElement.children).forEach(m=>{m!==u.current&&(e==null||e.observe(m))}),E.current&&(e==null||e.observe(E.current)),window.addEventListener("resize",g),(w=window.visualViewport)==null||w.addEventListener("resize",g),(v=document.fonts)==null||v.ready.then(g),()=>{var m;e==null||e.disconnect(),window.removeEventListener("resize",g),(m=window.visualViewport)==null||m.removeEventListener("resize",g)}},[a,s,g,r]),M.length===0)return null;const $=a?c.slice(0,F):c,O=a?c.slice(F):[];return b.jsxs("div",{"data-component":"controls","data-dynamic-position":r==="fixed"?!0:void 0,"data-adaptive":a?!0:void 0,className:Z.t(h.controls,ce[r],a&&h.adaptive,i),ref:u,...S,children:[a&&b.jsxs("div",{"aria-hidden":"true",className:h.measurement,ref:z,children:[c.map((e,d)=>l.cloneElement(e,{"aria-hidden":!0,id:void 0,key:`measure-${String(e.key??d)}`,onClick:void 0,ref:void 0,tabIndex:-1})),b.jsx(A.MenuPopover,{triggerAccessibleLabel:o,children:null})]}),r!=="embedded"&&y.length>0&&b.jsx("span",{className:h["non-button-content"],ref:E,children:y}),$,O.length>0&&b.jsx("span",{className:h["overflow-trigger"],children:b.jsx(le,{buttons:O,menuAccessibleLabel:o,triggerAccessibleLabel:o})})]})};exports.Controls=fe;
3
3
  //# sourceMappingURL=index.cjs.map
@@ -2,8 +2,8 @@ import { jsxs as G, jsx as v } from "react/jsx-runtime";
2
2
  import { t as ne } from "../../classix-DG18itHa.js";
3
3
  import { Children as ie, isValidElement as re, cloneElement as P, useRef as C, useState as T, useCallback as oe, useLayoutEffect as de } from "react";
4
4
  import { Button as se } from "../button/index.js";
5
- import { a as $, M as ce } from "../../menu-popover-DOkciab5.js";
6
- import '../../assets/index36.css';const ae = "_controls_t1re6_13", le = "_inline_t1re6_43", ue = "_embedded_t1re6_48", me = "_fixed_t1re6_49", fe = "_adaptive_t1re6_60", he = "_measurement_t1re6_65", f = {
5
+ import { a as $, M as ce } from "../../menu-popover-D-Ax5zzy.js";
6
+ import '../../assets/index37.css';const ae = "_controls_t1re6_13", le = "_inline_t1re6_43", ue = "_embedded_t1re6_48", me = "_fixed_t1re6_49", fe = "_adaptive_t1re6_60", he = "_measurement_t1re6_65", f = {
7
7
  controls: ae,
8
8
  default: "_default_t1re6_28",
9
9
  inline: le,
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index37.css');const d=require("react/jsx-runtime"),tt=require("../../classix-5H4IWnMA.cjs"),c=require("react"),mt=require("../button/index.cjs"),pt=require("../figure/index.cjs"),gt=require("../icon/index.cjs"),I=10,A=.1,kt=.92,m=(h,x,R)=>Math.min(R,Math.max(x,h)),It=h=>new Promise((x,R)=>{const f=URL.createObjectURL(h),a=new globalThis.Image;a.onload=()=>{URL.revokeObjectURL(f),x(a)},a.onerror=()=>{URL.revokeObjectURL(f),R(new Error("croppable-image-load-failed"))},a.src=f}),Ot=async({file:h,fill:x,transform:R,viewport:f})=>{const a=await It(h),O=f.width/a.naturalWidth,M=f.height/a.naturalHeight,y=Math.max(O,M),D=a.naturalWidth*y,E=a.naturalHeight*y,Q=x==="width"?Math.max(A,O/y):x==="height"?Math.max(A,M/y):A,j=m(R.zoom,Q,I),w=y*j,b=D*j,B=E*j,p=(f.width-b)/2+R.offset.x,L=(f.height-B)/2+R.offset.y,S=m(-p/w,0,a.naturalWidth),T=m(-L/w,0,a.naturalHeight),v=m(f.width/w,1,Math.max(1,a.naturalWidth-S)),s=m(f.height/w,1,Math.max(1,a.naturalHeight-T)),_=document.createElement("canvas"),u=_.getContext("2d");if(!u)throw new Error("croppable-image-context-missing");_.width=Math.max(1,Math.round(v)),_.height=Math.max(1,Math.round(s)),u.drawImage(a,S,T,v,s,0,0,_.width,_.height);const U=h.type.startsWith("image/")?h.type:"image/jpeg",P=await new Promise(N=>{_.toBlob(N,U,kt)});if(!P)throw new Error("croppable-image-export-failed");return new globalThis.File([P],h.name,{lastModified:Date.now(),type:P.type||U})},St="_croppable_1kqo4_1",Ut="_empty_1kqo4_14",Pt="_media_1kqo4_22",qt="_overlay_1kqo4_33",Yt="_viewport_1kqo4_41",Xt="_draggable_1kqo4_53",At="_dragging_1kqo4_57",Dt="_inner_1kqo4_61",Wt="_standalone_1kqo4_77",z={croppable:St,empty:Ut,media:Pt,overlay:qt,viewport:Yt,draggable:Xt,dragging:At,inner:Dt,standalone:Wt},Ht=192,Z={offset:{x:0,y:0},zoom:1},xt="Select image",Zt=({children:h,fill:x="none",height:R,image:f,label:a,onCroppableChange:O,onFileChange:M,onImageChange:y,onTransformChange:D,transform:E,standalone:Q})=>{const j=c.useRef(null),w=c.useRef(null),b=c.useRef(null),B=c.useRef(null),p=c.useRef(y),L=c.useRef(null),S=c.useRef(null),T=c.useRef(null),v=c.useRef(new Map),s=c.useRef(Z),_=c.useRef(null),[u,U]=c.useState(null),[P,N]=c.useState(null),[et,V]=c.useState(!1),[wt,nt]=c.useState(Z),[F,ot]=c.useState(null),[g,yt]=c.useState({width:0,height:0}),W=(()=>{const t=g.width,n=g.height;if(!t||!n)return{width:0,height:0,minZoom:A};if(!u)return{width:t,height:n,minZoom:A};const o=t/u.width,e=n/u.height,r=Math.max(o,e),i=x==="width"?o/r:x==="height"?e/r:0;return{width:u.width*r,height:u.height*r,minZoom:Math.max(A,i)}})(),q=W.minZoom,H=E??wt,Y=m(H.zoom,q,I),$=P??f??null,rt=!h&&!!f&&!P&&!F,G=!rt,ct=h??($?d.jsx("img",{alt:"",draggable:!1,onLoad:t=>{const n=t.currentTarget;n.naturalWidth&&n.naturalHeight&&U({width:n.naturalWidth,height:n.naturalHeight})},src:$}):null),X=ct==null,J=(t,n)=>{const{maxX:o,maxY:e}=it(n);return{x:m(t.x,-o,o),y:m(t.y,-e,e)}},st=(t,n)=>{const o=_.current;if(!o)return null;const e=o.getBoundingClientRect(),r=t-e.left-e.width/2,i=n-e.top-e.height/2;return{x:r,y:i}},bt=(t,n,o,e)=>{const r=m(n,q,I),i=m(o,q,I);if(r===0)return t;const l=i/r;return{x:(1-l)*e.x+l*t.x,y:(1-l)*e.y+l*t.y}},_t=(t,n,o)=>{const e=s.current.zoom,r=m(t,q,I),i=s.current.offset,l=o?bt(i,e,r,o):n,k=J(l,r);s.current={zoom:r,offset:k},E||nt({zoom:r,offset:k}),D==null||D({zoom:r,offset:k})},K=(t,n,o)=>{S.current={zoom:t,offset:n,anchor:o??null},w.current==null&&(w.current=window.requestAnimationFrame(()=>{w.current=null;const e=S.current;S.current=null;const r=(e==null?void 0:e.zoom)??s.current.zoom,i=(e==null?void 0:e.offset)??s.current.offset,l=(e==null?void 0:e.anchor)??null;_t(r,i,l)}))},zt=t=>{if(X||!G)return;const n=t.ctrlKey?.001:25e-5,o=s.current.zoom*Math.exp(-t.deltaY*n),e=st(t.clientX,t.clientY);K(o,s.current.offset,e)},it=t=>{const n=g.width,o=g.height;if(!n||!o)return{maxX:0,maxY:0};const e=m(t,q,I),r=W.width*e,i=W.height*e,l=Math.max(0,(r-n)/2),k=Math.max(0,(i-o)/2);return{maxX:l,maxY:k}},Rt=t=>{var r;const n=t.target,o=((r=n.files)==null?void 0:r[0])??null;if(L.current&&(URL.revokeObjectURL(L.current),L.current=null),!o){N(null),ot(null),M==null||M(null),n.value="";return}const e=URL.createObjectURL(o);L.current=e,N(e),U(null),ot(o),K(Z.zoom,Z.offset),s.current=Z,M==null||M(o),n.value=""},Mt=t=>{if(!(X||!G||t.pointerType==="mouse"&&t.button!==0)){if(t.currentTarget.setPointerCapture(t.pointerId),t.pointerType==="touch"){const n=v.current;if(n.set(t.pointerId,{x:t.clientX,y:t.clientY}),n.size===2){b.current=null,j.current=null,V(!1);const[o,e]=Array.from(n.values());T.current=Math.hypot(o.x-e.x,o.y-e.y);return}}j.current=t.pointerId,b.current={x:t.clientX,y:t.clientY,originX:s.current.offset.x,originY:s.current.offset.y}}},Et=t=>{if(X||!G)return;if(t.pointerType==="touch"){const r=v.current;if(!r.has(t.pointerId))return;if(r.set(t.pointerId,{x:t.clientX,y:t.clientY}),r.size===2){const[i,l]=Array.from(r.values()),k=i.x-l.x,jt=i.y-l.y,ht=Math.hypot(k,jt),ft={x:(i.x+l.x)/2,y:(i.y+l.y)/2};if(T.current){const Lt=ht/T.current,Tt=s.current.zoom*Lt,vt=st(ft.x,ft.y);K(Tt,s.current.offset,vt)}T.current=ht;return}}if(j.current!==t.pointerId||!b.current||!C)return;const n=t.clientX-b.current.x,o=t.clientY-b.current.y,e=Math.abs(n)+Math.abs(o);!et&&e>2&&V(!0),!(e<=1)&&K(s.current.zoom,{x:b.current.originX+n,y:b.current.originY+o})},at=t=>{t.pointerType==="touch"&&(v.current.delete(t.pointerId),v.current.size<2&&(T.current=null)),j.current===t.pointerId&&(j.current=null,b.current=null,V(!1))};c.useEffect(()=>{if(!E)return;const t=m(E.zoom,q,I);s.current={zoom:t,offset:J(E.offset,t)}},[E,g.width,g.height,u==null?void 0:u.width,u==null?void 0:u.height]),c.useEffect(()=>()=>{L.current&&URL.revokeObjectURL(L.current)},[]),c.useEffect(()=>{const t=_.current;if(!t)return;const n=()=>{const r=t.getBoundingClientRect();yt(i=>i.width===r.width&&i.height===r.height?i:{width:r.width,height:r.height}),O&&O(r)};n();const o=()=>n();if(window.addEventListener("scroll",o,!0),typeof ResizeObserver>"u"){const r=()=>n();return window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r),window.removeEventListener("scroll",o,!0)}}const e=new ResizeObserver(()=>n());return e.observe(t),()=>{e.disconnect(),window.removeEventListener("scroll",o,!0)}},[O]),c.useEffect(()=>{if(E)return;const t=s.current.offset,n=J(t,Y);t.x===n.x&&t.y===n.y||(s.current={zoom:s.current.zoom,offset:n},nt(o=>({...o,offset:n})))},[Y,u,g.width,g.height]),c.useEffect(()=>{$||U(null)},[$]),c.useEffect(()=>{p.current=y},[y]),c.useEffect(()=>{var o;if(!y)return;if(!F||!g.width||!g.height||h){(o=p.current)==null||o.call(p,null);return}let t=!0;const n=window.setTimeout(()=>{Ot({file:F,fill:x,transform:{zoom:Y,offset:H.offset},viewport:g}).then(e=>{var r;t&&((r=p.current)==null||r.call(p,e))}).catch(()=>{var e;t&&((e=p.current)==null||e.call(p,null))})},75);return()=>{t=!1,window.clearTimeout(n)}},[h,Y,H.offset,x,F,g]),c.useEffect(()=>()=>{w.current!=null&&(window.cancelAnimationFrame(w.current),w.current=null)},[]);const ut=it(Y),C=!X&&G&&(ut.maxX>0||ut.maxY>0),lt=()=>{var t;return(t=B.current)==null?void 0:t.click()},dt=t=>{t.preventDefault(),t.stopPropagation(),lt()};return d.jsxs("div",{className:tt.t(z.croppable,Q&&z.standalone),onClick:()=>{X&&lt()},"data-component":"croppable",children:[d.jsx("input",{accept:"image/*",onChange:Rt,ref:B,type:"file"}),d.jsx("div",{className:z.viewport,ref:_,onDragStart:t=>t.preventDefault(),onPointerDown:Mt,onPointerMove:Et,onPointerUp:at,onPointerCancel:at,onWheel:zt,style:{"--croppable-height":`${R??Ht}px`,"--croppable-zoom":Y,"--croppable-x":`${H.offset.x}px`,"--croppable-y":`${H.offset.y}px`,...u?{"--croppable-image-width":`${W.width}px`,"--croppable-image-height":`${W.height}px`}:null},children:X?d.jsxs("div",{className:z.empty,children:[d.jsx(pt.Figure,{children:d.jsx(gt.Icon,{name:"Image",size:"large"})}),d.jsx(mt.Button,{onClick:dt,children:a??xt})]}):d.jsxs("div",{className:tt.t(z.media,C&&z.draggable,C&&et&&z.dragging),children:[d.jsx("div",{className:tt.t(z.inner),children:ct}),rt&&d.jsx("div",{className:z.overlay,children:d.jsxs("div",{className:z.empty,children:[d.jsx(pt.Figure,{children:d.jsx(gt.Icon,{name:"Image",size:"large"})}),d.jsx(mt.Button,{onClick:dt,children:a??xt})]})})]})})]})};exports.Croppable=Zt;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index38.css');const d=require("react/jsx-runtime"),tt=require("../../classix-5H4IWnMA.cjs"),c=require("react"),mt=require("../button/index.cjs"),pt=require("../figure/index.cjs"),gt=require("../icon/index.cjs"),I=10,A=.1,kt=.92,m=(h,x,R)=>Math.min(R,Math.max(x,h)),It=h=>new Promise((x,R)=>{const f=URL.createObjectURL(h),a=new globalThis.Image;a.onload=()=>{URL.revokeObjectURL(f),x(a)},a.onerror=()=>{URL.revokeObjectURL(f),R(new Error("croppable-image-load-failed"))},a.src=f}),Ot=async({file:h,fill:x,transform:R,viewport:f})=>{const a=await It(h),O=f.width/a.naturalWidth,M=f.height/a.naturalHeight,y=Math.max(O,M),D=a.naturalWidth*y,E=a.naturalHeight*y,Q=x==="width"?Math.max(A,O/y):x==="height"?Math.max(A,M/y):A,j=m(R.zoom,Q,I),w=y*j,b=D*j,B=E*j,p=(f.width-b)/2+R.offset.x,L=(f.height-B)/2+R.offset.y,S=m(-p/w,0,a.naturalWidth),T=m(-L/w,0,a.naturalHeight),v=m(f.width/w,1,Math.max(1,a.naturalWidth-S)),s=m(f.height/w,1,Math.max(1,a.naturalHeight-T)),_=document.createElement("canvas"),u=_.getContext("2d");if(!u)throw new Error("croppable-image-context-missing");_.width=Math.max(1,Math.round(v)),_.height=Math.max(1,Math.round(s)),u.drawImage(a,S,T,v,s,0,0,_.width,_.height);const U=h.type.startsWith("image/")?h.type:"image/jpeg",P=await new Promise(N=>{_.toBlob(N,U,kt)});if(!P)throw new Error("croppable-image-export-failed");return new globalThis.File([P],h.name,{lastModified:Date.now(),type:P.type||U})},St="_croppable_1kqo4_1",Ut="_empty_1kqo4_14",Pt="_media_1kqo4_22",qt="_overlay_1kqo4_33",Yt="_viewport_1kqo4_41",Xt="_draggable_1kqo4_53",At="_dragging_1kqo4_57",Dt="_inner_1kqo4_61",Wt="_standalone_1kqo4_77",z={croppable:St,empty:Ut,media:Pt,overlay:qt,viewport:Yt,draggable:Xt,dragging:At,inner:Dt,standalone:Wt},Ht=192,Z={offset:{x:0,y:0},zoom:1},xt="Select image",Zt=({children:h,fill:x="none",height:R,image:f,label:a,onCroppableChange:O,onFileChange:M,onImageChange:y,onTransformChange:D,transform:E,standalone:Q})=>{const j=c.useRef(null),w=c.useRef(null),b=c.useRef(null),B=c.useRef(null),p=c.useRef(y),L=c.useRef(null),S=c.useRef(null),T=c.useRef(null),v=c.useRef(new Map),s=c.useRef(Z),_=c.useRef(null),[u,U]=c.useState(null),[P,N]=c.useState(null),[et,V]=c.useState(!1),[wt,nt]=c.useState(Z),[F,ot]=c.useState(null),[g,yt]=c.useState({width:0,height:0}),W=(()=>{const t=g.width,n=g.height;if(!t||!n)return{width:0,height:0,minZoom:A};if(!u)return{width:t,height:n,minZoom:A};const o=t/u.width,e=n/u.height,r=Math.max(o,e),i=x==="width"?o/r:x==="height"?e/r:0;return{width:u.width*r,height:u.height*r,minZoom:Math.max(A,i)}})(),q=W.minZoom,H=E??wt,Y=m(H.zoom,q,I),$=P??f??null,rt=!h&&!!f&&!P&&!F,G=!rt,ct=h??($?d.jsx("img",{alt:"",draggable:!1,onLoad:t=>{const n=t.currentTarget;n.naturalWidth&&n.naturalHeight&&U({width:n.naturalWidth,height:n.naturalHeight})},src:$}):null),X=ct==null,J=(t,n)=>{const{maxX:o,maxY:e}=it(n);return{x:m(t.x,-o,o),y:m(t.y,-e,e)}},st=(t,n)=>{const o=_.current;if(!o)return null;const e=o.getBoundingClientRect(),r=t-e.left-e.width/2,i=n-e.top-e.height/2;return{x:r,y:i}},bt=(t,n,o,e)=>{const r=m(n,q,I),i=m(o,q,I);if(r===0)return t;const l=i/r;return{x:(1-l)*e.x+l*t.x,y:(1-l)*e.y+l*t.y}},_t=(t,n,o)=>{const e=s.current.zoom,r=m(t,q,I),i=s.current.offset,l=o?bt(i,e,r,o):n,k=J(l,r);s.current={zoom:r,offset:k},E||nt({zoom:r,offset:k}),D==null||D({zoom:r,offset:k})},K=(t,n,o)=>{S.current={zoom:t,offset:n,anchor:o??null},w.current==null&&(w.current=window.requestAnimationFrame(()=>{w.current=null;const e=S.current;S.current=null;const r=(e==null?void 0:e.zoom)??s.current.zoom,i=(e==null?void 0:e.offset)??s.current.offset,l=(e==null?void 0:e.anchor)??null;_t(r,i,l)}))},zt=t=>{if(X||!G)return;const n=t.ctrlKey?.001:25e-5,o=s.current.zoom*Math.exp(-t.deltaY*n),e=st(t.clientX,t.clientY);K(o,s.current.offset,e)},it=t=>{const n=g.width,o=g.height;if(!n||!o)return{maxX:0,maxY:0};const e=m(t,q,I),r=W.width*e,i=W.height*e,l=Math.max(0,(r-n)/2),k=Math.max(0,(i-o)/2);return{maxX:l,maxY:k}},Rt=t=>{var r;const n=t.target,o=((r=n.files)==null?void 0:r[0])??null;if(L.current&&(URL.revokeObjectURL(L.current),L.current=null),!o){N(null),ot(null),M==null||M(null),n.value="";return}const e=URL.createObjectURL(o);L.current=e,N(e),U(null),ot(o),K(Z.zoom,Z.offset),s.current=Z,M==null||M(o),n.value=""},Mt=t=>{if(!(X||!G||t.pointerType==="mouse"&&t.button!==0)){if(t.currentTarget.setPointerCapture(t.pointerId),t.pointerType==="touch"){const n=v.current;if(n.set(t.pointerId,{x:t.clientX,y:t.clientY}),n.size===2){b.current=null,j.current=null,V(!1);const[o,e]=Array.from(n.values());T.current=Math.hypot(o.x-e.x,o.y-e.y);return}}j.current=t.pointerId,b.current={x:t.clientX,y:t.clientY,originX:s.current.offset.x,originY:s.current.offset.y}}},Et=t=>{if(X||!G)return;if(t.pointerType==="touch"){const r=v.current;if(!r.has(t.pointerId))return;if(r.set(t.pointerId,{x:t.clientX,y:t.clientY}),r.size===2){const[i,l]=Array.from(r.values()),k=i.x-l.x,jt=i.y-l.y,ht=Math.hypot(k,jt),ft={x:(i.x+l.x)/2,y:(i.y+l.y)/2};if(T.current){const Lt=ht/T.current,Tt=s.current.zoom*Lt,vt=st(ft.x,ft.y);K(Tt,s.current.offset,vt)}T.current=ht;return}}if(j.current!==t.pointerId||!b.current||!C)return;const n=t.clientX-b.current.x,o=t.clientY-b.current.y,e=Math.abs(n)+Math.abs(o);!et&&e>2&&V(!0),!(e<=1)&&K(s.current.zoom,{x:b.current.originX+n,y:b.current.originY+o})},at=t=>{t.pointerType==="touch"&&(v.current.delete(t.pointerId),v.current.size<2&&(T.current=null)),j.current===t.pointerId&&(j.current=null,b.current=null,V(!1))};c.useEffect(()=>{if(!E)return;const t=m(E.zoom,q,I);s.current={zoom:t,offset:J(E.offset,t)}},[E,g.width,g.height,u==null?void 0:u.width,u==null?void 0:u.height]),c.useEffect(()=>()=>{L.current&&URL.revokeObjectURL(L.current)},[]),c.useEffect(()=>{const t=_.current;if(!t)return;const n=()=>{const r=t.getBoundingClientRect();yt(i=>i.width===r.width&&i.height===r.height?i:{width:r.width,height:r.height}),O&&O(r)};n();const o=()=>n();if(window.addEventListener("scroll",o,!0),typeof ResizeObserver>"u"){const r=()=>n();return window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r),window.removeEventListener("scroll",o,!0)}}const e=new ResizeObserver(()=>n());return e.observe(t),()=>{e.disconnect(),window.removeEventListener("scroll",o,!0)}},[O]),c.useEffect(()=>{if(E)return;const t=s.current.offset,n=J(t,Y);t.x===n.x&&t.y===n.y||(s.current={zoom:s.current.zoom,offset:n},nt(o=>({...o,offset:n})))},[Y,u,g.width,g.height]),c.useEffect(()=>{$||U(null)},[$]),c.useEffect(()=>{p.current=y},[y]),c.useEffect(()=>{var o;if(!y)return;if(!F||!g.width||!g.height||h){(o=p.current)==null||o.call(p,null);return}let t=!0;const n=window.setTimeout(()=>{Ot({file:F,fill:x,transform:{zoom:Y,offset:H.offset},viewport:g}).then(e=>{var r;t&&((r=p.current)==null||r.call(p,e))}).catch(()=>{var e;t&&((e=p.current)==null||e.call(p,null))})},75);return()=>{t=!1,window.clearTimeout(n)}},[h,Y,H.offset,x,F,g]),c.useEffect(()=>()=>{w.current!=null&&(window.cancelAnimationFrame(w.current),w.current=null)},[]);const ut=it(Y),C=!X&&G&&(ut.maxX>0||ut.maxY>0),lt=()=>{var t;return(t=B.current)==null?void 0:t.click()},dt=t=>{t.preventDefault(),t.stopPropagation(),lt()};return d.jsxs("div",{className:tt.t(z.croppable,Q&&z.standalone),onClick:()=>{X&&lt()},"data-component":"croppable",children:[d.jsx("input",{accept:"image/*",onChange:Rt,ref:B,type:"file"}),d.jsx("div",{className:z.viewport,ref:_,onDragStart:t=>t.preventDefault(),onPointerDown:Mt,onPointerMove:Et,onPointerUp:at,onPointerCancel:at,onWheel:zt,style:{"--croppable-height":`${R??Ht}px`,"--croppable-zoom":Y,"--croppable-x":`${H.offset.x}px`,"--croppable-y":`${H.offset.y}px`,...u?{"--croppable-image-width":`${W.width}px`,"--croppable-image-height":`${W.height}px`}:null},children:X?d.jsxs("div",{className:z.empty,children:[d.jsx(pt.Figure,{children:d.jsx(gt.Icon,{name:"Image",size:"large"})}),d.jsx(mt.Button,{onClick:dt,children:a??xt})]}):d.jsxs("div",{className:tt.t(z.media,C&&z.draggable,C&&et&&z.dragging),children:[d.jsx("div",{className:tt.t(z.inner),children:ct}),rt&&d.jsx("div",{className:z.overlay,children:d.jsxs("div",{className:z.empty,children:[d.jsx(pt.Figure,{children:d.jsx(gt.Icon,{name:"Image",size:"large"})}),d.jsx(mt.Button,{onClick:dt,children:a??xt})]})})]})})]})};exports.Croppable=Zt;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -4,7 +4,7 @@ import { useRef as x, useState as S, useEffect as E } from "react";
4
4
  import { Button as wt } from "../button/index.js";
5
5
  import { Figure as xt } from "../figure/index.js";
6
6
  import { Icon as yt } from "../icon/index.js";
7
- import '../../assets/index37.css';const O = 10, Z = 0.1, Pt = 0.92, d = (u, p, _) => Math.min(_, Math.max(p, u)), Yt = (u) => new Promise((p, _) => {
7
+ import '../../assets/index38.css';const O = 10, Z = 0.1, Pt = 0.92, d = (u, p, _) => Math.min(_, Math.max(p, u)), Yt = (u) => new Promise((p, _) => {
8
8
  const h = URL.createObjectURL(u), s = new globalThis.Image();
9
9
  s.onload = () => {
10
10
  URL.revokeObjectURL(h), p(s);
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index38.css');const e=require("react/jsx-runtime"),P=require("../../classix-5H4IWnMA.cjs"),a=require("react"),j=require("../button/index.cjs"),T=require("../icon/index.cjs"),X="_dialog_10cs4_3",E="_close_10cs4_24",F="_fullscreen_10cs4_35",M="_structured_10cs4_56",S="_header_10cs4_62",Y="_content_10cs4_73",w="_controls_10cs4_81",c={dialog:X,close:E,fullscreen:F,structured:M,header:S,content:Y,controls:w},B=l=>a.Children.toArray(l).some(r=>a.isValidElement(r)?r.type===j.Button&&r.props.intent==="danger"?!0:B(r.props.children):!1),A=({children:l,className:r,controls:n,fullscreen:f=!1,header:_,onCancel:i,onClick:u,onClose:d,open:o=!1,setOpen:s,...b})=>{const g=a.useRef(null),m=B(n),h=f||_!=null||n!=null;a.useEffect(()=>{const t=g.current;t&&(o&&!t.open?t.showModal():!o&&t.open&&t.close())},[o]);const q=t=>{i==null||i(t),!(t.defaultPrevented||!s)&&(t.preventDefault(),s(!1))},y=t=>{if(u==null||u(t),m||t.defaultPrevented||t.target!==t.currentTarget||!s)return;const{bottom:R,left:D,right:k,top:p}=t.currentTarget.getBoundingClientRect();(t.clientX<D||t.clientX>k||t.clientY<p||t.clientY>R)&&s(!1)},N=t=>{d==null||d(t),o&&(s==null||s(!1))},x=s&&!m?e.jsx(j.Button,{"aria-label":"Close dialog",className:c.close,onClick:()=>s(!1),variant:"simple",children:e.jsx(T.Icon,{name:"X"})}):null;return e.jsx("dialog",{className:P.t(c.dialog,h&&c.structured,f&&c.fullscreen,r),onCancel:q,onClick:y,onClose:N,ref:g,...b,"data-component":"dialog",children:h?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:c.header,children:[_,x]}),e.jsx("div",{className:c.content,children:l}),n!=null&&e.jsx("div",{className:c.controls,children:n})]}):e.jsxs(e.Fragment,{children:[x,l]})})};exports.Dialog=A;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index39.css');const e=require("react/jsx-runtime"),k=require("../../classix-5H4IWnMA.cjs"),a=require("react"),j=require("../button/index.cjs"),p=require("../icon/index.cjs"),P="_dialog_9zw0o_3",T="_close_9zw0o_34",X="_fullscreen_9zw0o_45",E="_structured_9zw0o_66",F="_header_9zw0o_72",M="_content_9zw0o_83",S="_controls_9zw0o_94",s={dialog:P,close:T,fullscreen:X,structured:E,header:F,content:M,controls:S},w=c=>a.Children.toArray(c).some(o=>a.isValidElement(o)?o.type===j.Button&&o.props.intent==="danger"?!0:w(o.props.children):!1),Y=({children:c,className:o,controls:l,fullscreen:f=!1,header:_,onCancel:i,onClick:u,onClose:d,open:n=!1,setOpen:r,...z})=>{const g=a.useRef(null),m=w(l),h=f||_!=null||l!=null;a.useEffect(()=>{const t=g.current;t&&(n&&!t.open?t.showModal():!n&&t.open&&t.close())},[n]);const B=t=>{i==null||i(t),!(t.defaultPrevented||!r)&&(t.preventDefault(),r(!1))},b=t=>{if(u==null||u(t),m||t.defaultPrevented||t.target!==t.currentTarget||!r)return;const{bottom:y,left:N,right:R,top:D}=t.currentTarget.getBoundingClientRect();(t.clientX<N||t.clientX>R||t.clientY<D||t.clientY>y)&&r(!1)},q=t=>{d==null||d(t),n&&(r==null||r(!1))},x=r&&!m?e.jsx(j.Button,{"aria-label":"Close dialog",className:s.close,onClick:()=>r(!1),variant:"simple",children:e.jsx(p.Icon,{name:"X"})}):null;return e.jsx("dialog",{className:k.t(s.dialog,h&&s.structured,f&&s.fullscreen,o),onCancel:B,onClick:b,onClose:q,ref:g,...z,"data-component":"dialog",children:h?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:s.header,children:[_,x]}),e.jsx("div",{className:s.content,children:c}),l!=null&&e.jsx("div",{className:s.controls,children:l})]}):e.jsxs(e.Fragment,{children:[x,c]})})};exports.Dialog=Y;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,20 +1,20 @@
1
- import { jsx as e, jsxs as u, Fragment as B } from "react/jsx-runtime";
2
- import { t as T } from "../../classix-DG18itHa.js";
3
- import N, { useRef as Y, useEffect as w } from "react";
4
- import { Button as R } from "../button/index.js";
5
- import { Icon as A } from "../icon/index.js";
6
- import '../../assets/index38.css';const F = "_dialog_10cs4_3", I = "_close_10cs4_24", M = "_fullscreen_10cs4_35", V = "_structured_10cs4_56", q = "_header_10cs4_62", z = "_content_10cs4_73", G = "_controls_10cs4_81", c = {
7
- dialog: F,
8
- close: I,
9
- fullscreen: M,
10
- structured: V,
11
- header: q,
12
- content: z,
1
+ import { jsx as e, jsxs as u, Fragment as z } from "react/jsx-runtime";
2
+ import { t as E } from "../../classix-DG18itHa.js";
3
+ import p, { useRef as P, useEffect as T } from "react";
4
+ import { Button as B } from "../button/index.js";
5
+ import { Icon as Y } from "../icon/index.js";
6
+ import '../../assets/index39.css';const A = "_dialog_9zw0o_3", F = "_close_9zw0o_34", I = "_fullscreen_9zw0o_45", M = "_structured_9zw0o_66", V = "_header_9zw0o_72", q = "_content_9zw0o_83", G = "_controls_9zw0o_94", o = {
7
+ dialog: A,
8
+ close: F,
9
+ fullscreen: I,
10
+ structured: M,
11
+ header: V,
12
+ content: q,
13
13
  controls: G
14
- }, k = (s) => N.Children.toArray(s).some((l) => N.isValidElement(l) ? l.type === R && l.props.intent === "danger" ? !0 : k(l.props.children) : !1), U = ({
15
- children: s,
14
+ }, N = (c) => p.Children.toArray(c).some((l) => p.isValidElement(l) ? l.type === B && l.props.intent === "danger" ? !0 : N(l.props.children) : !1), U = ({
15
+ children: c,
16
16
  className: l,
17
- controls: o,
17
+ controls: s,
18
18
  fullscreen: f = !1,
19
19
  header: m,
20
20
  onCancel: n,
@@ -22,37 +22,37 @@ import '../../assets/index38.css';const F = "_dialog_10cs4_3", I = "_close_10cs4
22
22
  onClose: d,
23
23
  open: a = !1,
24
24
  setOpen: r,
25
- ...x
25
+ ...R
26
26
  }) => {
27
- const _ = Y(null), g = k(o), h = f || m != null || o != null;
28
- w(() => {
27
+ const _ = P(null), g = N(s), h = f || m != null || s != null;
28
+ T(() => {
29
29
  const t = _.current;
30
30
  t && (a && !t.open ? t.showModal() : !a && t.open && t.close());
31
31
  }, [a]);
32
- const y = (t) => {
32
+ const k = (t) => {
33
33
  n == null || n(t), !(t.defaultPrevented || !r) && (t.preventDefault(), r(!1));
34
- }, D = (t) => {
34
+ }, x = (t) => {
35
35
  if (i == null || i(t), g || t.defaultPrevented || t.target !== t.currentTarget || !r) return;
36
36
  const {
37
- bottom: b,
38
- left: j,
39
- right: E,
40
- top: P
37
+ bottom: D,
38
+ left: X,
39
+ right: b,
40
+ top: j
41
41
  } = t.currentTarget.getBoundingClientRect();
42
- (t.clientX < j || t.clientX > E || t.clientY < P || t.clientY > b) && r(!1);
43
- }, X = (t) => {
42
+ (t.clientX < X || t.clientX > b || t.clientY < j || t.clientY > D) && r(!1);
43
+ }, y = (t) => {
44
44
  d == null || d(t), a && (r == null || r(!1));
45
- }, p = r && !g ? /* @__PURE__ */ e(R, { "aria-label": "Close dialog", className: c.close, onClick: () => r(!1), variant: "simple", children: /* @__PURE__ */ e(A, { name: "X" }) }) : null;
46
- return /* @__PURE__ */ e("dialog", { className: T(c.dialog, h && c.structured, f && c.fullscreen, l), onCancel: y, onClick: D, onClose: X, ref: _, ...x, "data-component": "dialog", children: h ? /* @__PURE__ */ u(B, { children: [
47
- /* @__PURE__ */ u("div", { className: c.header, children: [
45
+ }, w = r && !g ? /* @__PURE__ */ e(B, { "aria-label": "Close dialog", className: o.close, onClick: () => r(!1), variant: "simple", children: /* @__PURE__ */ e(Y, { name: "X" }) }) : null;
46
+ return /* @__PURE__ */ e("dialog", { className: E(o.dialog, h && o.structured, f && o.fullscreen, l), onCancel: k, onClick: x, onClose: y, ref: _, ...R, "data-component": "dialog", children: h ? /* @__PURE__ */ u(z, { children: [
47
+ /* @__PURE__ */ u("div", { className: o.header, children: [
48
48
  m,
49
- p
49
+ w
50
50
  ] }),
51
- /* @__PURE__ */ e("div", { className: c.content, children: s }),
52
- o != null && /* @__PURE__ */ e("div", { className: c.controls, children: o })
53
- ] }) : /* @__PURE__ */ u(B, { children: [
54
- p,
55
- s
51
+ /* @__PURE__ */ e("div", { className: o.content, children: c }),
52
+ s != null && /* @__PURE__ */ e("div", { className: o.controls, children: s })
53
+ ] }) : /* @__PURE__ */ u(z, { children: [
54
+ w,
55
+ c
56
56
  ] }) });
57
57
  };
58
58
  export {
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index39.css');const r=require("react/jsx-runtime"),t=require("../../classix-5H4IWnMA.cjs"),d="_divider_1fgyv_1",s={divider:d},o=({className:e,...i})=>r.jsx("hr",{className:t.t(s.divider,e),...i,"data-component":"divider"});exports.Divider=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index40.css');const r=require("react/jsx-runtime"),t=require("../../classix-5H4IWnMA.cjs"),d="_divider_1oie5_1",s={divider:d},o=({className:e,...i})=>r.jsx("hr",{className:t.t(s.divider,e),...i,"data-component":"divider"});exports.Divider=o;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,12 +1,12 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
2
  import { t as e } from "../../classix-DG18itHa.js";
3
- import '../../assets/index39.css';const o = "_divider_1fgyv_1", t = {
3
+ import '../../assets/index40.css';const o = "_divider_1oie5_1", t = {
4
4
  divider: o
5
- }, m = ({
5
+ }, v = ({
6
6
  className: i,
7
7
  ...d
8
8
  }) => /* @__PURE__ */ r("hr", { className: e(t.divider, i), ...d, "data-component": "divider" });
9
9
  export {
10
- m as Divider
10
+ v as Divider
11
11
  };
12
12
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index40.css');const l=require("react/jsx-runtime"),j=require("../../classix-5H4IWnMA.cjs"),a=require("react"),F=require("../button/index.cjs"),de=require("../../icons-Dv_p0bUF.cjs"),X=require("../../index-DWDp66fp.cjs"),pe=require("../list/index.cjs"),V=require("../../index-Bt7vnwji.cjs");function L(t){return typeof t=="string"||typeof t=="number"?String(t):Array.isArray(t)?t.map(L).join(" "):a.isValidElement(t)?L(t.props.children):""}function fe(t){return a.isValidElement(t)&&t.type==="option"}function me(t){return a.isValidElement(t)&&t.type==="optgroup"}function he(t){return a.isValidElement(t)&&t.type===a.Fragment}function _e(t){return a.isValidElement(t)&&t.type===V.Select}function M(t,i,s=!1){const r=[];return a.Children.forEach(t,n=>{if(he(n))r.push(...M(n.props.children,i,s));else if(fe(n)){const c=L(n.props.children).trim(),f=n.props.value!=null?String(n.props.value):c;r.push({disabled:s||!!n.props.disabled,groupLabel:i,hidden:!!n.props.hidden,isPlaceholder:!!(n.props.hidden&&f===""),label:n.props.children,selected:!!n.props.selected,text:c,value:f})}else me(n)&&r.push(...M(n.props.children,n.props.label,s||!!n.props.disabled))}),r}function ge(t){const i=t.trim();if(!i)return null;const r=[.../[*?]/.test(i)?i:`*${i}*`].map(n=>n==="*"?".*":n==="?"?".":n.replace(/[|\\{}()[\]^$+.,]/g,"\\$&")).join("");return new RegExp(`^${r}$`,"i")}function xe(t,i){const s=ge(i),r=t.filter(n=>!n.hidden&&!n.isPlaceholder);return s?r.filter(n=>s.test([n.groupLabel,n.text,n.value].filter(Boolean).join(" "))):r}function be(t,i){return t.find(s=>s.value===i)??t.find(s=>s.isPlaceholder)??t[0]}function je(t,i,s){var r,n;return i!=null?String(i):s!=null?String(s):((r=t.find(c=>c.selected))==null?void 0:r.value)??((n=t[0])==null?void 0:n.value)??""}function ve(t){if(_e(t)){const{children:i,placeholder:s,...r}=t.props;return{children:l.jsxs(l.Fragment,{children:[s&&l.jsx("option",{hidden:!0,value:"",children:s}),i]}),props:r}}return{children:t.props.children,props:t.props}}const ye="_combobox_ej99h_3",we="_dropdown_ej99h_27",Se="_empty_ej99h_32",Ne="_group_ej99h_33",Ce="_placeholder_ej99h_34",Ee="_filter_ej99h_42",Ve="_native_ej99h_52",Le="_option_ej99h_62",Re="_options_ej99h_83",$e="_panel_ej99h_107",Be="_selected_ej99h_132",Ie="_text_ej99h_136",qe="_trigger_ej99h_144",De="_minimal_ej99h_181",Pe="_inline_ej99h_240",ke="_label_ej99h_272",o={combobox:ye,"combobox-input":"_combobox-input_ej99h_12",dropdown:we,empty:Se,group:Ne,placeholder:Ce,filter:Ee,native:Ve,option:Le,options:Re,panel:$e,selected:Be,text:Ie,trigger:qe,minimal:De,inline:Pe,label:ke,"inline-field":"_inline-field_ej99h_278"};function Y(t,i){return{"--icon-svg":de.iconSVG(t,i)}}const Fe=({children:t,className:i,combobox:s=!1,createOption:r,emptyLabel:n="No matches found",label:c,renderOption:f,searchPlaceholder:R="Filter",selectedItems:Z,variant:g="default",...ee})=>{const $=ve(t),{defaultValue:te,onChange:B,value:I,...ne}=$.props,v=V.sanitizeSelectProps(ne),{className:se,...re}=v,W=a.useRef(null),G=a.useRef(null),y=a.useId(),Q=a.useRef(null),m=a.useRef(null),x=M($.children),b=I!=null,q=je(x,I,te),[D,P]=a.useState(()=>q),[u,p]=a.useState(!1),[w,S]=a.useState(""),N=b?String(I):D,z={default:V.resolveColor("--colors-semantic-content-secondary"),white:V.resolveColor("--color-white","white")},O=g==="minimal"?z.white:z.default,C=be(x,N),le=Y("CaretDown",O),oe=Y("MagnifyingGlass",O),T=xe(x,w),h=w.trim(),E=!!(s&&r&&h&&r.isValid(h)),ie=c&&g==="inline"?X.formatInlineLabel(c):c,A=e=>e?(f==null?void 0:f({groupLabel:e.groupLabel,isSelected:e.value===N,label:e.label,text:e.text,value:e.value}))??e.label:"Select an option";a.useEffect(()=>{!b&&!x.some(e=>e.value===D)&&P(q)},[q,D,b,x]),a.useEffect(()=>{var e;if(!u){S("");return}(e=m.current)==null||e.focus()},[u]),a.useEffect(()=>{if(!u)return;const e=d=>{var _;(_=G.current)!=null&&_.contains(d.target)||p(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[u]);const ae=e=>{b||P(e.target.value),B==null||B(e)},k=()=>{var e;p(!1),s||(e=W.current)==null||e.focus()},K=()=>{var e;S(""),p(!0),(e=m.current)==null||e.focus()},H=()=>{!r||!E||(r.onCreate(h),K())},ce=e=>{var U;b||P(e);const d=Q.current;if(!d){k();return}const _=(U=Object.getOwnPropertyDescriptor(HTMLSelectElement.prototype,"value"))==null?void 0:U.set;_==null||_.call(d,e),d.dispatchEvent(new Event("change",{bubbles:!0})),s?K():k()},ue=e=>{e.key==="Escape"&&k(),e.key==="Enter"&&e.target===m.current&&E&&(e.preventDefault(),H())},J=l.jsxs("div",{className:j.t(o.dropdown,g==="inline"&&o.inline,g==="minimal"&&o.minimal,i),onKeyDown:ue,ref:G,...ee,children:[l.jsx("select",{...re,"aria-hidden":"true",className:j.t(o.native,se),onChange:ae,ref:Q,tabIndex:-1,value:N,children:$.children}),s?l.jsxs("div",{className:o.combobox,onClick:()=>{var e;return(e=m.current)==null?void 0:e.focus()},children:[Z,l.jsx("input",{"aria-autocomplete":"list","aria-expanded":u,"aria-label":v["aria-label"]??c??R,className:o["combobox-input"],disabled:v.disabled,onChange:e=>{S(e.target.value),p(!0)},onClick:()=>p(!0),onFocus:()=>p(!0),placeholder:R||void 0,ref:m,role:"combobox",type:"text",value:w})]}):l.jsx(F.Button,{"aria-expanded":u,"aria-haspopup":"dialog","aria-labelledby":c?`${y} ${y}-value`:void 0,className:j.t(o.trigger,(C==null?void 0:C.isPlaceholder)&&o.placeholder),"data-open":u?"true":void 0,disabled:v.disabled,onClick:()=>p(e=>!e),ref:W,style:le,variant:"simple",children:l.jsx("span",{className:o.text,id:`${y}-value`,children:A(C)})}),u&&l.jsxs("div",{className:o.panel,children:[!s&&l.jsx(X.Input,{"aria-label":"Filter",className:o.filter,icon:"MagnifyingGlass",onChange:e=>S(e.target.value),placeholder:R,ref:m,style:oe,type:"search",value:w}),l.jsxs(pe.List,{"aria-label":"Dropdown",className:o.options,children:[T.map(e=>{const d=e.value===N;return l.jsx("li",{"data-component":"dropdown",children:l.jsxs(F.Button,{"aria-label":d?`${e.text}, selected`:e.text,className:j.t(o.option,d&&o.selected),disabled:e.disabled,onClick:()=>ce(e.value),variant:"tertiary",children:[l.jsx("span",{className:o.text,children:A(e)}),e.groupLabel&&l.jsx("small",{className:o.group,children:e.groupLabel})]})},`${e.groupLabel??"root"}-${e.value}`)}),E&&r&&l.jsx("li",{children:l.jsx(F.Button,{"aria-label":L(r.render(h))||h,className:o.option,onClick:H,variant:"tertiary",children:l.jsx("span",{className:o.text,children:r.render(h)})})}),T.length===0&&!E&&l.jsx("li",{className:o.empty,children:n})]})]})]});return c?l.jsxs("div",{className:j.t(o.label,g==="inline"&&o["inline-field"]),"data-component":"dropdown",children:[l.jsx("span",{id:y,children:ie}),J]}):J};exports.Dropdown=Fe;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index41.css');const l=require("react/jsx-runtime"),j=require("../../classix-5H4IWnMA.cjs"),a=require("react"),F=require("../button/index.cjs"),de=require("../../icons-BTif0nDb.cjs"),X=require("../../index-CeHwRKAg.cjs"),pe=require("../list/index.cjs"),V=require("../../index-5qUTKX7P.cjs");function L(t){return typeof t=="string"||typeof t=="number"?String(t):Array.isArray(t)?t.map(L).join(" "):a.isValidElement(t)?L(t.props.children):""}function fe(t){return a.isValidElement(t)&&t.type==="option"}function me(t){return a.isValidElement(t)&&t.type==="optgroup"}function he(t){return a.isValidElement(t)&&t.type===a.Fragment}function _e(t){return a.isValidElement(t)&&t.type===V.Select}function M(t,i,s=!1){const r=[];return a.Children.forEach(t,n=>{if(he(n))r.push(...M(n.props.children,i,s));else if(fe(n)){const c=L(n.props.children).trim(),f=n.props.value!=null?String(n.props.value):c;r.push({disabled:s||!!n.props.disabled,groupLabel:i,hidden:!!n.props.hidden,isPlaceholder:!!(n.props.hidden&&f===""),label:n.props.children,selected:!!n.props.selected,text:c,value:f})}else me(n)&&r.push(...M(n.props.children,n.props.label,s||!!n.props.disabled))}),r}function ge(t){const i=t.trim();if(!i)return null;const r=[.../[*?]/.test(i)?i:`*${i}*`].map(n=>n==="*"?".*":n==="?"?".":n.replace(/[|\\{}()[\]^$+.,]/g,"\\$&")).join("");return new RegExp(`^${r}$`,"i")}function xe(t,i){const s=ge(i),r=t.filter(n=>!n.hidden&&!n.isPlaceholder);return s?r.filter(n=>s.test([n.groupLabel,n.text,n.value].filter(Boolean).join(" "))):r}function be(t,i){return t.find(s=>s.value===i)??t.find(s=>s.isPlaceholder)??t[0]}function je(t,i,s){var r,n;return i!=null?String(i):s!=null?String(s):((r=t.find(c=>c.selected))==null?void 0:r.value)??((n=t[0])==null?void 0:n.value)??""}function ve(t){if(_e(t)){const{children:i,placeholder:s,...r}=t.props;return{children:l.jsxs(l.Fragment,{children:[s&&l.jsx("option",{hidden:!0,value:"",children:s}),i]}),props:r}}return{children:t.props.children,props:t.props}}const ye="_combobox_ej99h_3",we="_dropdown_ej99h_27",Se="_empty_ej99h_32",Ne="_group_ej99h_33",Ce="_placeholder_ej99h_34",Ee="_filter_ej99h_42",Ve="_native_ej99h_52",Le="_option_ej99h_62",Re="_options_ej99h_83",$e="_panel_ej99h_107",Be="_selected_ej99h_132",Ie="_text_ej99h_136",qe="_trigger_ej99h_144",De="_minimal_ej99h_181",Pe="_inline_ej99h_240",ke="_label_ej99h_272",o={combobox:ye,"combobox-input":"_combobox-input_ej99h_12",dropdown:we,empty:Se,group:Ne,placeholder:Ce,filter:Ee,native:Ve,option:Le,options:Re,panel:$e,selected:Be,text:Ie,trigger:qe,minimal:De,inline:Pe,label:ke,"inline-field":"_inline-field_ej99h_278"};function Y(t,i){return{"--icon-svg":de.iconSVG(t,i)}}const Fe=({children:t,className:i,combobox:s=!1,createOption:r,emptyLabel:n="No matches found",label:c,renderOption:f,searchPlaceholder:R="Filter",selectedItems:Z,variant:g="default",...ee})=>{const $=ve(t),{defaultValue:te,onChange:B,value:I,...ne}=$.props,v=V.sanitizeSelectProps(ne),{className:se,...re}=v,W=a.useRef(null),G=a.useRef(null),y=a.useId(),Q=a.useRef(null),m=a.useRef(null),x=M($.children),b=I!=null,q=je(x,I,te),[D,P]=a.useState(()=>q),[u,p]=a.useState(!1),[w,S]=a.useState(""),N=b?String(I):D,z={default:V.resolveColor("--colors-semantic-content-secondary"),white:V.resolveColor("--color-white","white")},O=g==="minimal"?z.white:z.default,C=be(x,N),le=Y("CaretDown",O),oe=Y("MagnifyingGlass",O),T=xe(x,w),h=w.trim(),E=!!(s&&r&&h&&r.isValid(h)),ie=c&&g==="inline"?X.formatInlineLabel(c):c,A=e=>e?(f==null?void 0:f({groupLabel:e.groupLabel,isSelected:e.value===N,label:e.label,text:e.text,value:e.value}))??e.label:"Select an option";a.useEffect(()=>{!b&&!x.some(e=>e.value===D)&&P(q)},[q,D,b,x]),a.useEffect(()=>{var e;if(!u){S("");return}(e=m.current)==null||e.focus()},[u]),a.useEffect(()=>{if(!u)return;const e=d=>{var _;(_=G.current)!=null&&_.contains(d.target)||p(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[u]);const ae=e=>{b||P(e.target.value),B==null||B(e)},k=()=>{var e;p(!1),s||(e=W.current)==null||e.focus()},K=()=>{var e;S(""),p(!0),(e=m.current)==null||e.focus()},H=()=>{!r||!E||(r.onCreate(h),K())},ce=e=>{var U;b||P(e);const d=Q.current;if(!d){k();return}const _=(U=Object.getOwnPropertyDescriptor(HTMLSelectElement.prototype,"value"))==null?void 0:U.set;_==null||_.call(d,e),d.dispatchEvent(new Event("change",{bubbles:!0})),s?K():k()},ue=e=>{e.key==="Escape"&&k(),e.key==="Enter"&&e.target===m.current&&E&&(e.preventDefault(),H())},J=l.jsxs("div",{className:j.t(o.dropdown,g==="inline"&&o.inline,g==="minimal"&&o.minimal,i),onKeyDown:ue,ref:G,...ee,children:[l.jsx("select",{...re,"aria-hidden":"true",className:j.t(o.native,se),onChange:ae,ref:Q,tabIndex:-1,value:N,children:$.children}),s?l.jsxs("div",{className:o.combobox,onClick:()=>{var e;return(e=m.current)==null?void 0:e.focus()},children:[Z,l.jsx("input",{"aria-autocomplete":"list","aria-expanded":u,"aria-label":v["aria-label"]??c??R,className:o["combobox-input"],disabled:v.disabled,onChange:e=>{S(e.target.value),p(!0)},onClick:()=>p(!0),onFocus:()=>p(!0),placeholder:R||void 0,ref:m,role:"combobox",type:"text",value:w})]}):l.jsx(F.Button,{"aria-expanded":u,"aria-haspopup":"dialog","aria-labelledby":c?`${y} ${y}-value`:void 0,className:j.t(o.trigger,(C==null?void 0:C.isPlaceholder)&&o.placeholder),"data-open":u?"true":void 0,disabled:v.disabled,onClick:()=>p(e=>!e),ref:W,style:le,variant:"simple",children:l.jsx("span",{className:o.text,id:`${y}-value`,children:A(C)})}),u&&l.jsxs("div",{className:o.panel,children:[!s&&l.jsx(X.Input,{"aria-label":"Filter",className:o.filter,icon:"MagnifyingGlass",onChange:e=>S(e.target.value),placeholder:R,ref:m,style:oe,type:"search",value:w}),l.jsxs(pe.List,{"aria-label":"Dropdown",className:o.options,children:[T.map(e=>{const d=e.value===N;return l.jsx("li",{"data-component":"dropdown",children:l.jsxs(F.Button,{"aria-label":d?`${e.text}, selected`:e.text,className:j.t(o.option,d&&o.selected),disabled:e.disabled,onClick:()=>ce(e.value),variant:"tertiary",children:[l.jsx("span",{className:o.text,children:A(e)}),e.groupLabel&&l.jsx("small",{className:o.group,children:e.groupLabel})]})},`${e.groupLabel??"root"}-${e.value}`)}),E&&r&&l.jsx("li",{children:l.jsx(F.Button,{"aria-label":L(r.render(h))||h,className:o.option,onClick:H,variant:"tertiary",children:l.jsx("span",{className:o.text,children:r.render(h)})})}),T.length===0&&!E&&l.jsx("li",{className:o.empty,children:n})]})]})]});return c?l.jsxs("div",{className:j.t(o.label,g==="inline"&&o["inline-field"]),"data-component":"dropdown",children:[l.jsx("span",{id:y,children:ie}),J]}):J};exports.Dropdown=Fe;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -2,11 +2,11 @@ import { jsxs as p, Fragment as me, jsx as i } from "react/jsx-runtime";
2
2
  import { t as y } from "../../classix-DG18itHa.js";
3
3
  import he, { Children as _e, isValidElement as x, useRef as I, useId as ge, useState as W, useEffect as G } from "react";
4
4
  import { Button as Q } from "../button/index.js";
5
- import { i as be } from "../../icons-dUP7sKyt.js";
6
- import { f as ve, I as ye } from "../../index-Ds-Ocs4L.js";
5
+ import { i as be } from "../../icons-CBbpxsJF.js";
6
+ import { f as ve, I as ye } from "../../index-DBWgRXp9.js";
7
7
  import { List as xe } from "../list/index.js";
8
- import { S as we, s as je, r as ee } from "../../index-BLb3JiCr.js";
9
- import '../../assets/index40.css';function L(t) {
8
+ import { S as we, s as je, r as ee } from "../../index-BuSfz4qx.js";
9
+ import '../../assets/index41.css';function L(t) {
10
10
  return typeof t == "string" || typeof t == "number" ? String(t) : Array.isArray(t) ? t.map(L).join(" ") : x(t) ? L(t.props.children) : "";
11
11
  }
12
12
  function Ne(t) {
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index41.css');const i=require("react/jsx-runtime"),b=require("../../classix-5H4IWnMA.cjs"),F=require("react"),q=require("../button/index.cjs"),I=require("../icon/index.cjs"),R="_dropzone_1rpsf_1",S="_dragging_1rpsf_19",T="_minimal_1rpsf_23",g={dropzone:R,dragging:S,minimal:T},k=({accepts:D,label:m="Select files",maxFileSize:_,multiple:u=!1,onChange:n,onValidation:a,variant:p="default",...y})=>{const f=F.useRef(null),[x,o]=F.useState(!1),c=e=>{e.preventDefault(),e.stopPropagation()},v=e=>{const t=f.current;if(!t)return;const s=new DataTransfer;for(const r of e)s.items.add(r);t.files=s.files,n==null||n({target:t,currentTarget:t})},z=e=>{const{validFiles:t,emptyFiles:s,oversizedFiles:r}=e.reduce((d,l)=>(l.size===0?d.emptyFiles.push(l):_&&l.size>_?d.oversizedFiles.push(l):d.validFiles.push(l),d),{validFiles:[],emptyFiles:[],oversizedFiles:[]});return(s.length>0||r.length>0)&&(a==null||a(s,r)),t},j=e=>{c(e),o(!1);const t=Array.from(e.dataTransfer.files??[]),s=z(t);if(s.length===0)return;const r=u?s:s.slice(0,1);v(r)},h=e=>{const t=Array.from(e.target.files??[]),s=z(t);if(s.length===t.length){n==null||n(e);return}const r=u?s:s.slice(0,1);v(r)};return i.jsx("div",{className:b.t(g.dropzone,g[p],x&&g.dragging),onDragEnter:e=>{c(e),o(!0)},onDragOver:e=>{c(e),o(!0)},onDragLeave:e=>{c(e),o(!1)},onDrop:j,...y,"data-component":"dropzone",children:i.jsxs("label",{children:[i.jsx("input",{accept:D,"aria-label":m,hidden:!0,multiple:u,onChange:h,ref:f,type:"file"}),i.jsx(I.Icon,{name:"UploadSimple",size:p==="minimal"?"medium":"large"}),i.jsx("br",{}),p!=="minimal"&&i.jsx(q.Button,{onClick:()=>{var e;return(e=f.current)==null?void 0:e.click()},type:"button",children:m})]})})};exports.Dropzone=k;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index42.css');const i=require("react/jsx-runtime"),b=require("../../classix-5H4IWnMA.cjs"),F=require("react"),q=require("../button/index.cjs"),I=require("../icon/index.cjs"),R="_dropzone_1rpsf_1",S="_dragging_1rpsf_19",T="_minimal_1rpsf_23",g={dropzone:R,dragging:S,minimal:T},k=({accepts:D,label:m="Select files",maxFileSize:_,multiple:u=!1,onChange:n,onValidation:a,variant:p="default",...y})=>{const f=F.useRef(null),[x,o]=F.useState(!1),c=e=>{e.preventDefault(),e.stopPropagation()},v=e=>{const t=f.current;if(!t)return;const s=new DataTransfer;for(const r of e)s.items.add(r);t.files=s.files,n==null||n({target:t,currentTarget:t})},z=e=>{const{validFiles:t,emptyFiles:s,oversizedFiles:r}=e.reduce((d,l)=>(l.size===0?d.emptyFiles.push(l):_&&l.size>_?d.oversizedFiles.push(l):d.validFiles.push(l),d),{validFiles:[],emptyFiles:[],oversizedFiles:[]});return(s.length>0||r.length>0)&&(a==null||a(s,r)),t},j=e=>{c(e),o(!1);const t=Array.from(e.dataTransfer.files??[]),s=z(t);if(s.length===0)return;const r=u?s:s.slice(0,1);v(r)},h=e=>{const t=Array.from(e.target.files??[]),s=z(t);if(s.length===t.length){n==null||n(e);return}const r=u?s:s.slice(0,1);v(r)};return i.jsx("div",{className:b.t(g.dropzone,g[p],x&&g.dragging),onDragEnter:e=>{c(e),o(!0)},onDragOver:e=>{c(e),o(!0)},onDragLeave:e=>{c(e),o(!1)},onDrop:j,...y,"data-component":"dropzone",children:i.jsxs("label",{children:[i.jsx("input",{accept:D,"aria-label":m,hidden:!0,multiple:u,onChange:h,ref:f,type:"file"}),i.jsx(I.Icon,{name:"UploadSimple",size:p==="minimal"?"medium":"large"}),i.jsx("br",{}),p!=="minimal"&&i.jsx(q.Button,{onClick:()=>{var e;return(e=f.current)==null?void 0:e.click()},type:"button",children:m})]})})};exports.Dropzone=k;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -3,7 +3,7 @@ import { t as T } from "../../classix-DG18itHa.js";
3
3
  import { useRef as j, useState as k } from "react";
4
4
  import { Button as x } from "../button/index.js";
5
5
  import { Icon as A } from "../icon/index.js";
6
- import '../../assets/index41.css';const R = "_dropzone_1rpsf_1", S = "_dragging_1rpsf_19", w = "_minimal_1rpsf_23", u = {
6
+ import '../../assets/index42.css';const R = "_dropzone_1rpsf_1", S = "_dragging_1rpsf_19", w = "_minimal_1rpsf_23", u = {
7
7
  dropzone: R,
8
8
  dragging: S,
9
9
  minimal: w
@@ -1,4 +1,4 @@
1
- "use strict";require('../../assets/index42.css');var nm=Object.defineProperty;var rm=(n,e,t)=>e in n?nm(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var M=(n,e,t)=>rm(n,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const K=require("react/jsx-runtime"),q=require("react"),Wd=require("react-dom"),hi=require("../../classix-5H4IWnMA.cjs"),im=require("../file/index.cjs"),yt=require("../button/index.cjs"),Lt=require("../icon/index.cjs"),oc=require("../../index-DWDp66fp.cjs"),sm=require("../toolbar/index.cjs");function Hu(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const i of e)r.append("v",i);return t.search=r.toString(),new Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function P(n,...e){throw Hu(n,...e)}function Ga(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const i of e)r.append("v",i);t.search=r.toString(),console.warn(`Minified Lexical warning #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function om(){return typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0}const It=om();function um(){return It&&"documentMode"in document?document.documentMode:null}const am=um();function lm(n){return It&&n.test(navigator.platform)}function Hi(n){return It&&n.test(navigator.userAgent)}const Vn=lm(/Mac|iPod|iPhone|iPad/),rn=Hi(/^(?!.*Seamonkey)(?=.*Firefox).*/i);function cm(){return!(!It||!("InputEvent"in window)||am)&&"getTargetRanges"in new window.InputEvent("input")}const Ir=cm();function fm(){return It&&!window.MSStream&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints>1)}const Ct=fm(),Hd=Hi(/Android/),Vi=Hi(/Version\/[\d.]+.*Safari/)&&!Hd,Ja=Hi(/^(?=.*Chrome).*/i),Xs=It&&Hd&&Ja,Gi=Hi(/AppleWebKit\/[\d.]+/)&&Vn&&!Ja;function dm(){return 2047}const hm=dm(),Ci=Vi||Ct||Gi?" ":"​",$n=`
1
+ "use strict";require('../../assets/index43.css');var nm=Object.defineProperty;var rm=(n,e,t)=>e in n?nm(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var M=(n,e,t)=>rm(n,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const K=require("react/jsx-runtime"),q=require("react"),Wd=require("react-dom"),hi=require("../../classix-5H4IWnMA.cjs"),im=require("../file/index.cjs"),yt=require("../button/index.cjs"),Lt=require("../icon/index.cjs"),oc=require("../../index-CeHwRKAg.cjs"),sm=require("../toolbar/index.cjs");function Hu(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const i of e)r.append("v",i);return t.search=r.toString(),new Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function P(n,...e){throw Hu(n,...e)}function Ga(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const i of e)r.append("v",i);t.search=r.toString(),console.warn(`Minified Lexical warning #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function om(){return typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0}const It=om();function um(){return It&&"documentMode"in document?document.documentMode:null}const am=um();function lm(n){return It&&n.test(navigator.platform)}function Hi(n){return It&&n.test(navigator.userAgent)}const Vn=lm(/Mac|iPod|iPhone|iPad/),rn=Hi(/^(?!.*Seamonkey)(?=.*Firefox).*/i);function cm(){return!(!It||!("InputEvent"in window)||am)&&"getTargetRanges"in new window.InputEvent("input")}const Ir=cm();function fm(){return It&&!window.MSStream&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints>1)}const Ct=fm(),Hd=Hi(/Android/),Vi=Hi(/Version\/[\d.]+.*Safari/)&&!Hd,Ja=Hi(/^(?=.*Chrome).*/i),Xs=It&&Hd&&Ja,Gi=Hi(/AppleWebKit\/[\d.]+/)&&Vn&&!Ja;function dm(){return 2047}const hm=dm(),Ci=Vi||Ct||Gi?" ":"​",$n=`
2
2
 
3
3
  `,Xa=rn?" ":Ci,Ke={bold:1,capitalize:1024,code:16,highlight:128,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},Vd={directionless:1,unmergeable:2},Pr={center:2,end:6,justify:4,left:1,right:3,start:5};function Gd(n){const e={};for(const t of Object.keys(n))e[n[t]]=t;return e}const Jd=Gd(Pr),Ya={normal:0,segmented:2,token:1},Xd=Gd(Ya),Qa="$",gm=Symbol.for("@lexical/ctrlOrOtherKey"),du="$config";function hu(){return Pe()._blockCursorElement}function gu(n){return n!==null&&n.nodeType===1&&n.hasAttribute("data-lexical-slot")}const pm=Gi||Ct||Vi;function uc(){const n=Ie().createElement("img");n.setAttribute("data-lexical-decorator-boundary","true"),n.alt="";for(const[e,t]of[["position","absolute"],["width","0px"],["height","0px"],["border","0px"],["margin","0px"],["padding","0px"]])n.style.setProperty(e,t,"important");return n}function Ys(n){return n!==null&&n.nodeType===1&&n.hasAttribute("data-lexical-decorator-boundary")}class Sr{constructor(e,t,r){M(this,"element");M(this,"before");M(this,"after");this.element=e,this.before=t||null,this.after=r||null}withBefore(e){return new Sr(this.element,e,this.after)}withAfter(e){return new Sr(this.element,this.before,e)}withElement(e){return this.element===e?this:new Sr(e,this.before,this.after)}insertChild(e){const t=this.getInsertionAnchor();return t!==null&&t.parentElement!==this.element&&P(357),this.element.insertBefore(e,t),this}removeChild(e){return e.parentElement!==this.element&&P(358),this.element.removeChild(e),this}replaceChild(e,t){return t.parentElement!==this.element&&P(359),this.element.replaceChild(e,t),this}getFirstChild(){const e=this.getFirstChildAnchor(),t=e?e.nextSibling:this.element.firstChild;return t===this.getInsertionAnchor()?null:t}getFirstChildAnchor(){return this.after}resolveLeafPosition(e,t,r){if(this.element===e)return t===e&&r===0?"before":"after";const i=ac(e,this.element);if(i===null)return"after";const s=Array.prototype.indexOf.call(e.childNodes,i);if(s<0)return"after";if(t===e)return r<=s?"before":"after";const o=ac(e,t);if(o===null)return"after";const u=Array.prototype.indexOf.call(e.childNodes,o);return u>=0&&u<=s?"before":"after"}getInsertionAnchor(){return this.before}}function ac(n,e){let t=e;for(;t!==null&&t.parentNode!==n;)t=t.parentNode;return t}let Yd=class Ps extends Sr{withBefore(e){return new Ps(this.element,e,this.after)}withAfter(e){return new Ps(this.element,this.before,e)}withElement(e){return this.element===e?this:new Ps(e,this.before,this.after)}getInsertionAnchor(){return super.getInsertionAnchor()||this.getManagedLineBreak()||this.getDecoratorBoundaryAnchor("trailing")}getFirstChildAnchor(){let e=super.getFirstChildAnchor(),t=e?e.nextSibling:this.element.firstChild;for(;gu(t);)e=t,t=t.nextSibling;Ys(t)&&(e=t,t=t.nextSibling);const r=e?e.nextSibling:this.element.firstChild;return r!==null&&r===hu()?r:e}getDecoratorBoundaryAnchor(e){let t;if(e==="leading"){const r=super.getFirstChildAnchor();for(t=r?r.nextSibling:this.element.firstChild;gu(t);)t=t.nextSibling}else t=this.before?this.before.previousSibling:this.element.lastChild,t!==null&&t===hu()&&(t=t.previousSibling);return Ys(t)?t:null}setDecoratorBoundaryAnchor(e,t){const r=this.getDecoratorBoundaryAnchor(e);if(t!==(r!==null))if(r!==null)this.element.removeChild(r);else if(e==="leading"){const i=this.getFirstChildAnchor();this.element.insertBefore(uc(),i?i.nextSibling:this.element.firstChild)}else this.element.insertBefore(uc(),this.before)}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(e){const t=this.element,r=this.after===null?t.firstChild:this.after.nextSibling,i=e==="empty"&&gu(r)?null:e;if(t.__lexicalLastChildKind!==i)if(t.__lexicalLastChildKind=i,i===null)this.removeManagedLineBreak();else{const s=i==="decorator"&&pm;this.insertManagedLineBreak(s)}}removeManagedLineBreak(){const e=this.getManagedLineBreak();if(e){const t=this.element,r=e.nodeName==="IMG"?e.nextSibling:null;r&&t.removeChild(r),t.removeChild(e),t.__lexicalLineBreak=void 0}}insertManagedLineBreak(e){const t=this.getManagedLineBreak();if(t){if(e===(t.nodeName==="IMG"))return;this.removeManagedLineBreak()}const r=this.element,i=this.before||this.getDecoratorBoundaryAnchor("trailing"),s=Ie().createElement("br");if(s.setAttribute("data-lexical-managed-linebreak","true"),r.insertBefore(s,i),e){const o=Ie().createElement("img");o.setAttribute("data-lexical-managed-linebreak","true"),o.style.setProperty("display","inline","important"),o.style.setProperty("border","0px","important"),o.style.setProperty("margin","0px","important"),o.alt="",r.insertBefore(o,s),r.__lexicalLineBreak=o}else r.__lexicalLineBreak=s}getFirstChildOffset(){const e=this.getFirstChild(),t=this.getInsertionAnchor();let r=0;for(let i=this.element.firstChild;i!==null&&i!==e&&i!==t;i=i.nextSibling)r++;return r}resolveChildIndex(e,t,r,i){if(r===this.element){const a=this.getFirstChildOffset(),l=hu(),c=this.element.childNodes,h=Math.min(i,c.length);let f=0;for(let d=a;d<h;d++)c[d]!==l&&f++;return[e,Math.min(f,e.getChildrenSize())]}const s=lc(t,r);s.push(i);const o=lc(t,this.element);let u=e.getIndexWithinParent();for(let a=0;a<o.length;a++){const l=s[a],c=o[a];if(l===void 0||l<c)break;if(l>c){u+=1;break}}return[e.getParentOrThrow(),u]}};function lc(n,e){const t=[];let r=e;for(;r!==n&&r!==null;r=r.parentNode){let i=0;for(let s=r.previousSibling;s!==null;s=s.previousSibling)i++;t.push(i)}return r!==n&&P(225),t.reverse()}function mm(){let n;try{n="0.52.0+prod.esm"}catch{}return n??'"<unknown>+source"'}const Qd=mm();let si=class{constructor(){M(this,"_front",new Set);M(this,"_back",new Set);M(this,"_cache")}get size(){return this._front.size+this._back.size}addBack(e){return delete this._cache,this._front.has(e)||this._back.add(e),this}addFront(e){return delete this._cache,this._back.has(e)||this._front.add(e),this}delete(e){return delete this._cache,this._front.delete(e)||this._back.delete(e)}toArray(){const e=Array.from(this._front).reverse();for(const t of this._back)e.push(t);return e}toReadonlyArray(){return this._cache=this._cache||this.toArray(),this._cache}[Symbol.iterator](){return this.toReadonlyArray()[Symbol.iterator]()}};const Pn=null;function Zd(n,e=1e3){return n instanceof Vu?n.clone():n.size<e?new Map(n):new Vu().init(new Map(n),void 0,n.size)}let Vu=class e0{constructor(){M(this,"_mutable",!1);M(this,"_old");M(this,"_nursery");M(this,"_size",0)}clone(){return this._mutable=!1,new e0().init(this._old,this._nursery,this._size)}init(e,t,r){return this._old=e,this._nursery=t,this._size=r,this}get size(){return this._size}has(e){return this.get(e)!==void 0}getWithTombstone(e){const t=this._nursery&&this._nursery.get(e);return t!==void 0?t:this._old&&this._old.get(e)}get(e){const t=this.getWithTombstone(e);return t===Pn?void 0:t}shouldCompact(){return this._nursery!==void 0&&2*this._nursery.size>this._size}getNursery(){return this._mutable&&this._nursery||(this.compact(),this._nursery=new Map(this._nursery),this._mutable=!0),this._nursery}compact(e=!1){if(this._nursery&&this._nursery.size>0&&(e||this.shouldCompact())){const t=new Map(this._old);for(const[r,i]of this._nursery)i!==Pn?t.set(r,i):t.delete(r);this._old=t,this._nursery=void 0}return this._mutable=!1,this}set(e,t){const r=this.getWithTombstone(e);if(r===t)return this;const i=this.getNursery();return r!==Pn&&r!==void 0||(this._size++,r===Pn&&i.delete(e)),i.set(e,t),this}delete(e){const t=this.has(e);return t&&(this.getNursery().set(e,Pn),this._size--),t}getOrInsert(e,t){const r=this.get(e);return r!==void 0?r:(this.set(e,t),t)}getOrInsertComputed(e,t){const r=this.get(e);if(r!==void 0)return r;const i=t(e);return this.set(e,i),i}clear(){this._mutable=!1,this._old=void 0,this._nursery=void 0,this._size=0}*keys(){for(const e of this.entries())yield e[0]}*values(){for(const e of this.entries())yield e[1]}*entries(){const e=this._nursery,t=this._old;if(e){if(t)for(const r of t){const i=r[0],s=e.get(i);s!==Pn&&(s!==void 0&&(r[1]=s),yield r)}for(const r of e)r[1]===Pn||t&&t.has(r[0])||(yield r)}else t&&(yield*t)}forEach(e,t){t!==void 0&&(e=e.bind(t));for(const[r,i]of this.entries())e(i,r,this)}get[Symbol.toStringTag](){return"GenMap"}[Symbol.iterator](){return this.entries()}},gi=!1;function bm(n,e,...t){const r=gi;let i;try{gi=n,i=e()}finally{gi=r}var s;return(s=i)===null||typeof s!="object"&&typeof s!="function"||typeof s.then!="function"||P(421),i}function ym(){return gi}function t0(n){const e=n.exportJSON(gi),t=n.constructor;return e.type!==t.getType()&&P(130,t.name),T(n)&&!Array.isArray(e.children)&&P(59,t.name),e}function Qs(n,e,t,r,i,s){if(T(n)){let o=n.getFirstChild();for(;o!==null;){const u=o.__key;o.__parent===e&&((T(o)||Kn(o)&&o.__slots!==null)&&Qs(o,u,t,r,i,s),t.has(u)||s.delete(u),i.push(u)),o=o.getNextSibling()}}for(const o of Kn(n)&&n.__slots!==null?n.__slots.values():[]){const u=r.get(o);u!==void 0&&er(u)&&u.__slotHost===e&&((T(u)||Kn(u)&&u.__slots!==null)&&Qs(u,o,t,r,i,s),t.has(o)||s.delete(o),i.push(o))}}let Gu=!1,Za=0;function _m(n){Za=n.timeStamp}function pu(n,e,t){const r=n.nodeName==="BR",i=e.__lexicalLineBreak;return i&&(n===i||r&&n.previousSibling===i)||r&&hr(n,t)!==void 0}function xm(n,e,t){const r=nt(dt(t)),i=r&&ct(r,t._rootElement);let s=null,o=null;i!==null&&i.anchorNode===n&&(s=i.anchorOffset,o=i.focusOffset);const u=n.nodeValue;u!==null&&xl(e,u,s,o,!1)}function vm(n,e,t){if(F(n)){const r=n.anchor.getNode();if(r.is(t)&&n.format!==r.getFormat())return!1}return Tt(e)&&t.isAttached()}function Sm(n,e,t){for(let r=n;r&&!$h(r);r=nn(r)){const i=hr(r,e);if(i!==void 0){const s=he(i,t);if(s)return ie(s)||!ce(r)?void 0:[r,s]}}}function n0(n,e,t){Gu=!0;const r=performance.now()-Za>100;try{gt(n,()=>{const i=z()||function(h){return h.read("latest",()=>{const f=z();return f!==null?f.clone():null})}(n),s=new Map,o=n._editorState,u=n._blockCursorElement;let a=!1,l="";for(let h=0;h<e.length;h++){const f=e[h],d=f.type,g=f.target,b=Sm(g,n,o);if(!b)continue;const[m,p]=b;if(d==="characterData")r&&B(p)&&Tt(g)&&vm(i,g,p)&&xm(g,p,n);else if(d==="childList"){a=!0;const y=f.addedNodes;for(let S=0;S<y.length;S++){const C=y[S],A=Th(C),O=C.parentNode;if(!(O==null||C===u||A!==null||pu(C,O,n)||Ys(C)||n._slotsUsed&&ce(C)&&C.hasAttribute("data-lexical-slot")||$h(C))){if(rn){const D=(ce(C)?C.innerText:null)||C.nodeValue;D&&(l+=D)}O.removeChild(C)}}const _=f.removedNodes,x=_.length;if(x>0){let S=0;for(let C=0;C<x;C++){const A=_[C];pu(A,g,n)||u===A?(g.appendChild(A),S++):Ys(A)&&S++}x!==S&&s.set(m,p)}}}if(s.size>0)for(const[h,f]of s)f.reconcileObservedMutation(h,n);const c=t.takeRecords();if(c.length>0){for(let h=0;h<c.length;h++){const f=c[h],d=f.addedNodes,g=f.target;for(let b=0;b<d.length;b++){const m=d[b],p=m.parentNode;p==null||m.nodeName!=="BR"||pu(m,g,n)||p.removeChild(m)}}t.takeRecords()}i!==null&&(a&&Me(i),rn&&Dh(n)&&i.insertRawText(l))})}finally{Gu=!1}}function r0(n){const e=n._observer;e!==null&&n0(n,e.takeRecords(),e)}function i0(n){(function(e){Za===0&&dt(e).addEventListener("textInput",_m,!0)})(n),n._observer=new MutationObserver((e,t)=>{n0(n,e,t)})}function s0(n,e,t){const{isEqual:r}=n;return e===t||r!==void 0&&r(e,t)}function el(n,e){return s0(n,e,n.defaultValue)}function Cn(n){return typeof n=="object"&&n!==null}function An(n,e){const t=$o(n,e).getter;return Cn(t)&&t.getterTable!==void 0||P(405,e),tl(t.getterTable)}function ur(n,e){const t=$o(n,e).setter;return Cn(t)&&t.setterTable!==void 0||P(406,e),tl(t.setterTable)}function Zs(n,e,t){let{meta:r}=$o(n,e);for(let i=0;;){if(r.kind==="aliased")return tl(r.aliases);r.kind==="nullable"||r.kind==="optional"?r=r.inner.meta:r.kind==="array"?r=r.item.meta:P(407,e,String(t))}}function ar(n,e){const t=$o(n,e),{setter:r}=t;Cn(r)&&r.setterTable!==void 0||P(408,e);const i=String(t.defaultValue);return vn(r.setterTable,i)||P(409,e,i),r.setterTable[i]}function tl(n){return Object.assign(Object.create(null),n)}function $o(n,e){const t=n.get(e);return t===void 0&&P(410,e),t}function lr(n,e,t,r,i){i!==void 0&&wm.add(i);const s=t===void 0,o=s?n(void 0):t;return s&&u0(o),Object.assign(n,{accepts:i,defaultValue:o,isEqual:r,meta:e})}const wm=new WeakSet,o0=new WeakSet;function Cm(n){return n!==null&&typeof n=="object"&&o0.add(n),n}function u0(n){if(n!==null&&typeof n=="object"&&!Object.isFrozen(n)&&!o0.has(n)){Object.freeze(n);for(const e of Object.values(n))u0(e)}}function a0(n){const{isEqual:e}=n;return e===void 0?void 0:(t,r)=>t==null||r==null?t===r:e(t,r)}function l0(n,e){return t=>e(t)||nl(n,t)}function nl(n,e){const{accepts:t}=n;return t!==void 0?t.call(n,e):function(r,i){const{accepts:s}=r;if(s!==void 0)return nl(r,i)?{parsed:r(i)}:void 0;const o=r(i);return el(r,o)&&i!==r.defaultValue?void 0:{parsed:o}}(n,e)!==void 0}function vn(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function mn(n=""){return lr(e=>typeof e=="string"?e:n,{kind:"string"},void 0,void 0,e=>typeof e=="string")}const Tm=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function Tn(n=0,e={}){const{integer:t,clamp:r}=e,i=t&&e.min!==void 0?Math.ceil(e.min):e.min,s=t&&e.max!==void 0?Math.floor(e.max):e.max,o=l=>typeof l=="string"&&Tm.test(l)?Number(l):l,u=l=>typeof l=="number"&&Number.isFinite(l)&&(!t||Number.isInteger(l)),a=l=>u(l)&&(i===void 0||l>=i)&&(s===void 0||l<=s);return lr(l=>{const c=o(l);return r&&u(c)?i!==void 0&&c<i?i:s!==void 0&&c>s?s:c:a(c)?c:n},{clamp:r,integer:t,kind:"number",max:s,min:i},void 0,void 0,l=>r?u(o(l)):a(o(l)))}function c0(n=!1){return lr(e=>typeof e=="boolean"?e:n,{kind:"boolean"},void 0,void 0,e=>typeof e=="boolean")}function Lr(n,...e){const t=Cm(e.length!==0?e[0]:n[0]),r=new Set(n);return lr(i=>i!==void 0&&r.has(i)?i:t,{kind:"enum",values:n},t,void 0,i=>r.has(i)&&(i!==void 0||t===void 0))}function mu(n,e={}){const{defaultAsNull:t}=e;return lr(r=>{if(r==null)return null;const i=n(r);return t&&el(n,i)?null:i},{defaultAsNull:t,inner:n,kind:"nullable"},void 0,a0(n),l0(n,r=>r==null))}function Em(n,e={}){const{omitDefault:t}=e;return lr(r=>{if(r===void 0)return;const i=n(r);return t&&el(n,i)?void 0:i},{inner:n,kind:"optional",omitDefault:t},void 0,a0(n),l0(n,r=>r===void 0))}function cr(){return n=>function(e){return{meta:{fields:e,kind:"node"}}}(n)}function Ju(n,e){const t=r=>typeof r=="string"&&vn(e,r);return lr(r=>t(r)?e[r]:n(r),{aliases:e,inner:n,kind:"aliased"},n.defaultValue,n.isEqual,r=>t(r)||nl(n,r))}function Ze(n,e){return f0(0,n,{getter:{field:e.field,getterTable:e.getterTable,method:e.getter,when:e.when},setter:{field:e.field,method:e.setter,setterTable:e.setterTable}})}function Sn(n,e){return f0(0,n,e)}function f0(n,e,t){return Object.assign(r=>e(r),{accepts:e.accepts,defaultValue:e.defaultValue,getter:t.getter,isEqual:e.isEqual,meta:e.meta,setter:t.setter})}const cc="latest";class Nm{constructor(e,t){M(this,"key");M(this,"parse");M(this,"unparse");M(this,"isEqual");M(this,"defaultValue");M(this,"resetOnCopyNode");M(this,"schema");this.key=e;const r="meta"in(i=t.parse)&&typeof i.meta=="object"&&i.meta!==null&&"kind"in i.meta&&typeof i.meta.kind=="string"&&"defaultValue"in i?t.parse:void 0;var i;this.schema=r,this.parse=t.parse.bind(t),this.unparse=(t.unparse||Mm).bind(t),this.isEqual=t.isEqual?t.isEqual.bind(t):r!==void 0&&r.isEqual!==void 0?(s,o)=>s0(r,s,o):Object.is,this.defaultValue=r!==void 0?r.defaultValue:this.parse(void 0),this.resetOnCopyNode=t.resetOnCopyNode||!1}}function km(n,e){return new Nm(n,e)}function Am(n,e,t=cc){const r=(t===cc?n.getLatest():n).__state;return r?r.getValue(e):e.defaultValue}function Om(n,e,t){let r;if(Be(),typeof t=="function"){const s=n.getLatest(),o=Am(s,e);if(r=t(o),e.isEqual(o,r))return s}else r=t;const i=n.getWritable();return d0(i).updateFromKnown(e,r),i}function Dm(n){const e=new Map,t=new Set;for(const{ownNodeConfig:r}of Zn(typeof n=="function"?n:n.replace))if(r&&r.stateConfigs)for(const i of r.stateConfigs){let s;"stateConfig"in i?(s=i.stateConfig,i.flat&&t.add(s.key)):s=i,e.set(s.key,s)}return{flatKeys:t,sharedConfigMap:e}}const fc=new Set(["__proto__","constructor","prototype"]);class rl{constructor(e,t,r=void 0,i=new Map,s=void 0){M(this,"node");M(this,"knownState");M(this,"unknownState");M(this,"sharedNodeState");M(this,"size");this.node=e,this.sharedNodeState=t,this.unknownState=r,this.knownState=i;const{sharedConfigMap:o}=this.sharedNodeState,u=s!==void 0?s:function(a,l,c){let h=c.size;if(l)for(const f in l){const d=a.get(f);d&&c.has(d)||h++}return h}(o,r,i);this.size=u}getValue(e){const t=this.knownState.get(e);if(t!==void 0)return t;this.sharedNodeState.sharedConfigMap.set(e.key,e);let r=e.defaultValue;if(this.unknownState&&e.key in this.unknownState){const i=this.unknownState[e.key];i!==void 0&&(r=e.parse(i)),this.updateFromKnown(e,r)}return r}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){const e={...this.unknownState},t={};for(const[r,i]of this.knownState)r.isEqual(i,r.defaultValue)?delete e[r.key]:e[r.key]=r.unparse(i);for(const r of this.sharedNodeState.flatKeys)r in e&&(t[r]=e[r],delete e[r]);return dc(e)&&(t[Qa]=e),t}getWritable(e){if(this.node===e)return this;const{sharedNodeState:t,unknownState:r}=this,i=new Map(this.knownState);return new rl(e,t,function(s,o,u){let a;if(u)for(const[l,c]of Object.entries(u)){if(fc.has(l))continue;const h=s.get(l);h?o.has(h)||o.set(h,h.parse(c)):(a=a||{},a[l]=c)}return a}(t.sharedConfigMap,i,r),i,this.size)}resetOnCopyNode(){for(const e of this.knownState.keys())e.resetOnCopyNode&&this.knownState.set(e,e.defaultValue);return this}updateFromKnown(e,t){const r=e.key;this.sharedNodeState.sharedConfigMap.set(r,e);const{knownState:i,unknownState:s}=this;i.has(e)||s&&r in s||(s&&(delete s[r],this.unknownState=dc(s)),this.size++),i.set(e,t)}updateFromUnknown(e,t){if(fc.has(e))return;const r=this.sharedNodeState.sharedConfigMap.get(e);r?this.updateFromKnown(r,r.parse(t)):(this.unknownState=this.unknownState||{},e in this.unknownState||this.size++,this.unknownState[e]=t)}updateFromJSON(e){const{knownState:t}=this;for(const r of t.keys())t.set(r,r.defaultValue);if(this.size=t.size,this.unknownState=void 0,e)for(const[r,i]of Object.entries(e))this.updateFromUnknown(r,i)}}function d0(n){const e=n.getWritable(),t=e.__state?e.__state.getWritable(e):new rl(e,function(r){return r.__state?r.__state.sharedNodeState:Sh(Pe(),r.getType()).sharedNodeState}(e));return e.__state=t,t}function h0(n,e){const t=n.getWritable(),r=e[Qa];return(t.__state||r)&&d0(n).updateFromJSON(r),t}function dc(n){if(n)for(const e in n)return n}function Mm(n){return n}function hc(n,e,t){for(const[r,i]of e.knownState){if(n.has(r.key))continue;n.add(r.key);const s=t?t.getValue(r):r.defaultValue;if(s!==i&&!r.isEqual(s,i))return!0}return!1}function gc(n,e,t){const{unknownState:r}=e,i=t?t.unknownState:void 0;if(r){for(const[s,o]of Object.entries(r))if(!n.has(s)&&(n.add(s),o!==(i?i[s]:void 0)))return!0}return!1}function pc(n,e){const t=n.__state;return t&&t.node===n?t.getWritable(e):t}function mc(n,e){const t=n.__mode,r=n.__format,i=n.__style,s=e.__mode,o=e.__format,u=e.__style,a=n.__state,l=e.__state;return(t===null||t===s)&&(r===null||r===o)&&(i===null||i===u)&&(n.__state===null||a===l||function(c,h){if(c===h)return!0;const f=new Set;return!(c&&hc(f,c,h)||h&&hc(f,h,c)||c&&gc(f,c,h)||h&&gc(f,h,c))}(a,l))}function bc(n,e){const t=n.mergeWithSibling(e),r=de()._normalizedNodes;return r.add(n.__key),r.add(e.__key),t}function yc(n){let e,t,r=n;if(r.__text!==""||!r.isSimpleText()||r.isUnmergeable()){for(;(e=r.getPreviousSibling())!==null&&B(e)&&e.isSimpleText()&&!e.isUnmergeable();){if(e.__text!==""){if(mc(e,r)){r=bc(e,r);break}break}e.remove()}for(;(t=r.getNextSibling())!==null&&B(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==""){if(mc(r,t)){r=bc(r,t);break}break}t.remove()}}else r.remove()}function Rr(n){return _c(n.anchor),_c(n.focus),n}function _c(n){for(;n.type==="element";){const e=n.getNode(),t=n.offset;let r,i;if(t===e.getChildrenSize()?(r=e.getChildAtIndex(t-1),i=!0):(r=e.getChildAtIndex(t),i=!1),B(r)){n.set(r.__key,i?r.getTextContentSize():0,"text",!0);break}if(!T(r))break;n.set(r.__key,i?r.getChildrenSize():0,"element",!0)}}const eo=Symbol.for("@lexical/CachedTextSize");function xc(n,e){return Xu.read(()=>{let t=0,r=n;for(let i=0;i<e&&r!==null;i++){const s=At.get(r);if(s===void 0&&P(345,r),T(s)){const o=Se.get(r);if(o!==void 0&&T(o)&&o.__parent!==s.__parent)t+=s.getTextContentSize();else{const u=Gn.get(r),a=u&&u.__lexicalTextContent;typeof a!="string"&&P(346,s.getType()),t+=a.length}i<e-1&&!s.isInline()&&(t+=2)}else{const o=s[eo];o===void 0&&P(347,s.getType(),r),t+=o}r=s.__next}return t},{editor:le})}function g0(n){T(n)||n[eo]===void 0&&(n[eo]=B(n)?n.__text.length:n.getTextContentSize())}const Im=4;let Ti,le,Ei,se="",Oe=null,Ge=null,We=null;function Ft(){return{firstTextKey:We,format:Oe,style:Ge}}function xt(n){n.firstTextKey!==null&&(Oe=n.format,Ge=n.style,We=n.firstTextKey)}function bu(n){if(We!==null)return;const e=n.__lexicalFirstTextKey;if(e===void 0&&P(348),e===null)return;const t=Se.get(e);B(t)&&(Oe=t.getFormat(),Ge=t.getStyle(),We=e)}let Uo,pi,mi,At,Xu,Se,Gn,Yu,Ni,Jn,Xt=!1,Ls=!1;function bn(n,e){const t=At.get(n),r=Se.has(n);if(e!==null){const i=na(n);i.parentNode===e&&e.removeChild(i)}if(!r){if(le._keyToDOMMap.delete(n),T(t)){const i=wo(t,At);Qu(i,0,i.length-1,null)}if(t!==void 0){for(const i of _t(t).values()){const s=ea(i);bn(i,null),s!==null&&s.remove()}vl(Ni,Ei,Uo,t,"destroyed")}}}function Qu(n,e,t,r){for(let i=e;i<=t;++i){const s=n[i];s!==void 0&&bn(s,r)}}function Ln(n,e){n.setProperty("text-align",e)}const Pm="40px";function p0(n,e){const t=Ti.theme.indent;if(typeof t=="string"){const r=n.classList.contains(t);e>0&&!r?n.classList.add(t):e<1&&r&&n.classList.remove(t)}n.style.setProperty("padding-inline-start",e===0?"":`calc(${e} * var(--lexical-indent-base-value, ${Pm}))`),Mi(n,"class"),Mi(n,"style")}function m0(n,e){const t=n.style;e===0?Ln(t,""):e===1?Ln(t,"left"):e===2?Ln(t,"center"):e===3?Ln(t,"right"):e===4?Ln(t,"justify"):e===5?Ln(t,"start"):e===6&&Ln(t,"end"),Mi(n,"style")}function Zu(n,e){const t=function(r){const i=r.__dir;if(i!==null)return i;if(Ee(r))return null;const s=r.getParent();return s===null||pe(s)&&s.__dir===null?"auto":null}(e);t!==null?n.dir=t:n.removeAttribute("dir")}function b0(n){const e=Ie().createElement("div");return e.setAttribute("data-lexical-slot",n),e.style.display="none",e}function y0(n,e,t){e||n.contentEditable==="false"?Nb(t,le):t.removeAttribute("contenteditable")}function vc(n,e,t){const r=se,i=Ft();se="";let s="";const o=ie(n);for(const[u,a]of t){const l=b0(u);y0(e,o,l),e.appendChild(l),se="";const c=Ft();yn(a,ft(n,l,le)),xt(c),_0(n,u,e,l),s+=se}return xt(i),se=r,s}function _t(n){return Kn(n)&&n.__slots!==null?n.__slots:Kh}function _0(n,e,t,r){const i=Jn.$getSlotTargetElement(n,e,t,le);i!==null&&(r.parentElement!==i&&i.appendChild(r),r.style.display="")}function ea(n){const e=Gn.get(n);return e!==void 0?e.parentElement:null}function Sc(n,e,t){const r=_t(n),i=_t(e);for(const[c,h]of r)if(!i.has(c)){const f=ea(h);bn(h,null),f!==null&&f.remove()}const s=se,o=Ft();let u="",a=null;const l=ie(e);for(const[c,h]of i){const f=r.get(c);let d=f!==void 0?ea(f):null;se="";const g=Ft();if(d===null){d=b0(c);let b=null;for(const m of t.children)if(!m.hasAttribute("data-lexical-slot")){b=m;break}t.insertBefore(d,b),yn(h,ft(e,d,le))}else f===h?Qt(h,d):(f!==void 0&&bn(f,d),yn(h,ft(e,d,le)));if(xt(g),y0(t,l,d),_0(e,c,t,d),u+=se,d.parentElement===t){const b=a===null?t.firstChild:a.nextSibling;b!==d&&t.insertBefore(d,b),a=d}}return xt(o),se=s,u}function yn(n,e){const t=Se.get(n);if(t===void 0&&P(60),e!==null){const i=At.get(n);if(i!==void 0){const s=Gn.get(n);if(s!==void 0){const o=er(i)?i.__slotHost:null,u=er(t)?t.__slotHost:null,a=i.__parent!==t.__parent||o!==u,l=u!==null&&s.parentElement!==e.element;if(a||l)return e.insertChild(s),Qt(n,e.element)}}}const r=Jn.$createDOM(t,le);if(function(i,s,o){const u=o._keyToDOMMap;Eh(s,o,i),u.set(i,s)}(n,r,le),B(t)?r.setAttribute("data-lexical-text","true"):ie(t)&&(r.setAttribute("data-lexical-decorator","true"),Eb(r,{captureSelection:!0})),T(t)){const i=t.__indent,s=t.__size;Zu(r,t),i!==0&&p0(r,i);const o=_t(t),u=o.size>0?vc(t,r,o):"";if(s===0)r.__lexicalTextContent=u,r.__lexicalFirstTextKey=null,se+=u,o.size>0&&(r.__lexicalSlotTextLength=u.length);else{const l=se,c=s-1;if(ta(wo(t,Se),t,0,c,ft(t,r,le)),u!==""){const h=r.__lexicalTextContent||"";r.__lexicalTextContent=u+h,se=l+u+h}o.size>0&&(r.__lexicalSlotTextLength=u.length)}const a=t.__format;a!==0&&m0(r,a),t.isInline()||(v0(0,t,r),x0(t,r))}else{const i=t.getTextContent();if(ie(t)){const s=t.decorate(le,Ti);s!==null&&S0(n,s),r.contentEditable="false";const o=_t(t);o.size>0&&vc(t,r,o)}se+=i}return e!==null&&e.insertChild(r),Jn.$decorateDOM(t,null,r,le),g0(t),vl(Ni,Ei,Uo,t,"created"),r}function ta(n,e,t,r,i){const s=se,o=Ft();se="",Oe=null,Ge=null,We=null;let u=t;for(;u<=r;++u){const l=Ft();yn(n[u],i);const c=Se.get(n[u]);c!==null&&B(c)?Oe===null&&(Oe=c.getFormat(),Ge=c.getStyle(),We=c.__key):T(c)&&u<r&&!c.isInline()&&(se+=$n),xt(l)}const a=le._keyToDOMMap.get(e.__key);a===void 0&&P(349,e.__key),a.__lexicalTextContent=se,a.__lexicalFirstTextKey=We,se=s+se,xt(o)}function wc(n,e){if(!n)return!1;const t=e.get(n);return ie(t)&&!t.isInline()}function x0(n,e){const t=ft(n,e,le);t.setDecoratorBoundaryAnchor("leading",wc(n.__first,Se)),t.setDecoratorBoundaryAnchor("trailing",wc(n.__last,Se))}function v0(n,e,t){const r=ft(e,t,le),i=function(s,o){if(s){const u=s.__last;if(u){const a=o.get(u);if(a)return et(a)?"line-break":ie(a)&&a.isInline()?"decorator":null}return"empty"}return null}(e,Se);r.setManagedLineBreak(i)}function Cc(n,e,t){const r=e.__lexicalFirstTextKey;if(r!=null){const i=n.__key;let s=r;for(;s!==null;){const o=Se.get(s);if(o===void 0){s=null;break}if(o.__parent===i)break;s=o.__parent}if(s!==null&&!t.has(s)){const o=Se.get(r);if(B(o))return Oe=o.getFormat(),void(Ge=o.getStyle())}}e.__lexicalFirstTextKey=We}function Qt(n,e){const t=At.get(n);let r=Se.get(n);t!==void 0&&r!==void 0||P(61);const i=Xt||mi.has(n)||pi.has(n),s=Ar(le,n);if(t===r&&!i){let o;if(T(t)){const u=s.__lexicalTextContent;typeof u!="string"&&P(355,t.getType()),o=u,bu(s)}else o=t.getTextContent();return se+=o,s}if(t!==r&&i&&vl(Ni,Ei,Uo,r,"updated"),Jn.$updateDOM(r,t,s,le)){const o=yn(n,null);return e===null&&P(62),e.replaceChild(o,s),bn(n,null),o}if(T(t)){T(r)||P(334,n);const o=r.__indent;(Xt||o!==t.__indent)&&p0(s,o);const u=r.__format;(Xt||u!==t.__format)&&m0(s,u);const a=i&&(_t(r).size>0||_t(t).size>0)?Sc(t,r,s):"";if(i){const l=se;if(function(c,h,f){var d;Oe=null,Ge=null,We=null,function(g,b,m){const p=se,y=g.__size,_=b.__size;se="";const x=m.element,S=le._keyToDOMMap.get(b.__key);S===void 0&&P(351,b.__key);const C=_-y;if(!Xt&&Math.abs(C)<=1&&y>=Im&&g.__first===b.__first&&(C!==0||!le._cloneNotNeeded.has(g.__key))){const A=S.__lexicalTextContent,O=Yu.get(g.__key);if(!Xt&&typeof A=="string"&&O!==void 0){const D=function(k,v){const E=v.size;if(E===0||E>=k.__size)return null;let N=k.__last,R=null,w=0;for(;N!==null&&w<E;){if(!v.has(N))return null;R=N;const L=Se.get(N);if(L===void 0)return null;N=L.__prev,w++}return w!==E||N!==null&&v.has(N)?null:R}(b,O);if(D!==null){const k=O.size;if(C===0){const v=xc(D,k);let E=D,N=0;for(;E!==null&&N<k;){const U=Se.get(E);if(U===void 0)break;const H=Ft();Qt(E,x),B(U)&&Oe===null&&(Oe=U.getFormat(),Ge=U.getStyle(),We=U.__key),xt(H),E=U.__next,N++}let R="";for(E=D,N=0;E!==null&&N<k;){const U=Se.get(E);if(U===void 0)break;let H;if(T(U)){const V=le._keyToDOMMap.get(E),te=V&&V.__lexicalTextContent;typeof te!="string"&&P(352,U.getType()),H=te}else H=U.getTextContent();R+=H,N<k-1&&T(U)&&!U.isInline()&&(R+=$n),E=U.__next,N++}const w=S.__lexicalSlotTextLength||0,L=w>0?A.slice(w):A,I=L.slice(0,L.length-v)+R;return S.__lexicalTextContent=I,se=p+I,void Cc(b,S,O)}if(function(v,E,N,R,w,L,I,U){if(U!==1&&U!==-1||I!==(U===1?2:1))return!1;const H=I-U;let V=v.__last;for(let Q=0;Q<H-1;Q++){if(V===null)return!1;const be=At.get(V);if(be===void 0)return!1;V=be.__prev}if(V===null)return!1;const te=Se.get(L),ge=At.get(V);if(te===void 0||ge===void 0||te.__prev!==ge.__prev)return!1;const j=[];let $=L;for(let Q=0;Q<I;Q++){if($===null)return!1;j.push($);const be=Se.get($);$=be?be.__next:null}const G=[];$=V;for(let Q=0;Q<H;Q++){if($===null)return!1;G.push($);const be=At.get($);$=be?be.__next:null}const X=new Set(G),Z=new Set(j),Ce=[];let Ae=0,ve=0;for(;Ae<H&&ve<I;)if(j[ve]===G[Ae])Ce.push({key:j[ve],kind:"reconcile"}),Ae++,ve++;else if(Z.has(G[Ae])){if(X.has(j[ve]))return!1;Ce.push({key:j[ve],kind:"create",nextIndex:ve}),ve++}else Ce.push({key:G[Ae],kind:"destroy"}),Ae++;for(;Ae<H;)Ce.push({key:G[Ae++],kind:"destroy"});for(;ve<I;)Ce.push({key:j[ve],kind:"create",nextIndex:ve}),ve++;const ii=xc(V,H);for(const Q of Ce){const be=Ft();if(Q.kind==="reconcile")Qt(Q.key,N.element);else if(Q.kind==="destroy")bn(Q.key,N.element);else{let Le=null;for(let Fe=Q.nextIndex+1;Fe<I;Fe++){const it=le._keyToDOMMap.get(j[Fe]);if(it!==void 0){Le=it;break}}yn(Q.key,N.withBefore(Le??N.before))}if(Q.kind!=="destroy"){const Le=Se.get(Q.key);Le&&B(Le)&&Oe===null&&(Oe=Le.getFormat(),Ge=Le.getStyle(),We=Le.__key)}xt(be)}let dn="";for(let Q=0;Q<I;Q++){const be=Se.get(j[Q]);if(be===void 0)return!1;let Le;if(T(be)){const Fe=le._keyToDOMMap.get(j[Q]),it=Fe&&Fe.__lexicalTextContent;typeof it!="string"&&P(350,be.getType()),Le=it}else Le=be.getTextContent();dn+=Le,Q<I-1&&T(be)&&!be.isInline()&&(dn+=$n)}const hn=R.__lexicalSlotTextLength||0,W=hn>0?w.slice(hn):w;return R.__lexicalTextContent=W.slice(0,W.length-ii)+dn,!0}(g,0,m,S,A,D,k,C)){const v=S.__lexicalTextContent;return typeof v!="string"&&P(353),se=p+v,void Cc(b,S,O)}}}if(C===0){let D=g.__first,k=0;for(;D!==null;){const v=Se.get(D);if(v===void 0)break;const E=Xt||mi.has(D)||pi.has(D),N=Ft();if(E)Qt(D,x);else{let R,w;if(T(v)){w=Gn.get(D);const L=w&&w.__lexicalTextContent;typeof L!="string"&&P(354,v.getType()),R=L}else R=v.getTextContent();se+=R,w!==void 0&&bu(w)}B(v)?Oe===null&&(Oe=v.getFormat(),Ge=v.getStyle(),We=v.__key):T(v)&&k<_-1&&!v.isInline()&&(se+=$n),xt(N),D=v.__next,k++}return S.__lexicalTextContent=se,S.__lexicalFirstTextKey=We,void(se=p+se)}}if(y===1&&_===1){const A=g.__first,O=b.__first;if(A===O)Qt(A,x);else{const k=na(A),v=yn(O,null);try{k.parentNode===x?x.replaceChild(v,k):m.insertChild(v)}catch(E){if(typeof E=="object"&&E!=null){const N=`${E.toString()} Parent: ${x.tagName}, new child: {tag: ${v.tagName} key: ${O}}, old child: {tag: ${k.tagName}, key: ${A}}.`;throw new Error(N)}throw E}bn(A,null)}const D=Se.get(O);B(D)&&Oe===null&&(Oe=D.getFormat(),Ge=D.getStyle(),We=D.__key)}else{const A=wo(g,At),O=wo(b,Se);if(A.length!==y&&P(227),O.length!==_&&P(228),y===0)_!==0&&ta(O,b,0,_-1,m);else if(_===0){if(y!==0){const D=m.after==null&&m.before==null&&_t(b).size===0&&m.element.__lexicalLineBreak==null;Qu(A,0,y-1,D?null:x),D&&(x.textContent="")}}else(function(D,k,v,E,N,R){const w=E-1,L=N-1;let I,U,H=R.getFirstChild(),V=0,te=0;for(;V<=w&&te<=L;){const $=k[V],G=v[te],X=Ft();if($===G)H=yu(Qt(G,R.element)),V++,te++;else{if(U===void 0&&(U=Tc(v,te)),I===void 0)I=Tc(k,V);else if(!I.has($)){V++,xt(X);continue}if(!U.has($)){H=yu(na($)),bn($,R.element),V++,I.delete($),xt(X);continue}if(I.has(G)){const Ce=Ar(le,G);Ce!==H&&R.withBefore(H??R.before).insertChild(Ce),H=yu(Qt(G,R.element)),V++,te++}else yn(G,R.withBefore(H??R.before)),te++}const Z=Se.get(G);Z!==null&&B(Z)?Oe===null&&(Oe=Z.getFormat(),Ge=Z.getStyle(),We=Z.__key):T(Z)&&te<=L&&!Z.isInline()&&(se+=$n),xt(X)}const ge=V>w,j=te>L;if(ge&&!j){const $=v[L+1],G=$===void 0?null:le.getElementByKey($);ta(v,D,te,L,R.withBefore(G??R.before))}else j&&!ge&&Qu(k,V,w,R.element)})(b,A,O,y,_,m)}S.__lexicalTextContent=se,S.__lexicalFirstTextKey=We,se=p+se}(c,h,ft(h,f,le)),pe(h)||(d=h,Oe==null||Oe===d.__textFormat||Ls||d.setTextFormat(Oe),function(g){Ge==null||Ge===g.__textStyle||Ls||g.setTextStyle(Ge)}(h))}(t,r,s),r.isInline()||(Ee(r)||v0(0,r,s),x0(r,s)),a!==""){const c=s.__lexicalTextContent||"";s.__lexicalTextContent=a+c,se=l+a+c,s.__lexicalSlotTextLength=a.length}else(_t(r).size>0||_t(t).size>0)&&(s.__lexicalSlotTextLength=0)}else{const l=s.__lexicalTextContent;typeof l!="string"&&P(356,t.getType()),se+=l,bu(s)}if((Xt||r.__dir!==t.__dir||r.__parent!==t.__parent)&&(Zu(s,r),Ee(r)&&!Xt))for(const l of r.getChildren())T(l)&&Zu(Ar(le,l.getKey()),l)}else{const o=r.getTextContent();if(ie(r)){const u=r.decorate(le,Ti);u!==null&&S0(n,u),i&&(_t(r).size>0||_t(t).size>0)&&Sc(t,r,s)}se+=o}if(!Ls&&Ee(r)){const o=r.getLatest();if(o.__cachedText!==se){const u=o.getWritable();u.__cachedText=se,r=u}}return Jn.$decorateDOM(r,t,s,le),g0(r),s}function S0(n,e){let t=le._pendingDecorators;const r=le._decorators;if(t===null){if(r[n]===e)return;t=Nh(le)}t[n]=e}function yu(n){let e=n.nextSibling;return e!==null&&e===le._blockCursorElement&&(e=e.nextSibling),e}function Tc(n,e){const t=new Set;for(let r=e;r<n.length;r++)t.add(n[r]);return t}function Lm(n,e,t,r,i,s){se="",Oe=null,Ge=null,We=null,Xt=r===2,le=t,Ti=t._config,Jn=t._config.dom||po,Ei=t._nodes,Uo=le._listeners.mutation,pi=i,mi=s,At=n._nodeMap,Xu=n,Se=e._nodeMap,Ls=e._readOnly,Gn=Zd(t._keyToDOMMap),Yu=function(){const u=new Map,a=l=>{for(const c of l){const h=Se.get(c);if(h===void 0)continue;const f=h.__parent;if(f===null)continue;let d=u.get(f);d===void 0&&(d=new Set,u.set(f,d)),d.add(c)}};return a(pi.keys()),a(mi),u}();const o=new Map;return Ni=o,Qt("root",null),le=void 0,Ei=void 0,pi=void 0,mi=void 0,At=void 0,Xu=void 0,Se=void 0,Ti=void 0,Gn=void 0,Yu=void 0,Ni=void 0,Jn=po,o}function na(n){const e=Gn.get(n);return e===void 0&&P(75,n),e}function J(n){return{type:n}}const zo=J("SELECTION_CHANGE_COMMAND"),Rm=J("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),w0=J("CLICK_COMMAND"),C0=J("BEFORE_INPUT_COMMAND"),T0=J("INPUT_COMMAND"),E0=J("COMPOSITION_START_COMMAND"),N0=J("COMPOSITION_END_COMMAND"),zn=J("DELETE_CHARACTER_COMMAND"),wr=J("INSERT_LINE_BREAK_COMMAND"),ki=J("INSERT_PARAGRAPH_COMMAND"),Cr=J("CONTROLLED_TEXT_INSERTION_COMMAND"),Ji=J("PASTE_COMMAND"),Rs=J("REMOVE_TEXT_COMMAND"),Ai=J("DELETE_WORD_COMMAND"),Tr=J("DELETE_LINE_COMMAND"),Ot=J("FORMAT_TEXT_COMMAND"),Fm=J("SET_TEXT_FORMAT_COMMAND"),to=J("UNDO_COMMAND"),Oi=J("REDO_COMMAND"),k0=J("KEYDOWN_COMMAND"),A0=J("KEY_ARROW_RIGHT_COMMAND"),ra=J("MOVE_TO_END"),O0=J("KEY_ARROW_LEFT_COMMAND"),ia=J("MOVE_TO_START"),D0=J("KEY_ARROW_UP_COMMAND"),M0=J("KEY_ARROW_DOWN_COMMAND"),il=J("KEY_ENTER_COMMAND"),I0=J("KEY_SPACE_COMMAND"),sl=J("KEY_BACKSPACE_COMMAND"),P0=J("KEY_ESCAPE_COMMAND"),L0=J("KEY_DELETE_COMMAND"),R0=J("KEY_TAB_COMMAND"),Bm=J("INSERT_TAB_COMMAND"),jm=J("INDENT_CONTENT_COMMAND"),Ec=J("OUTDENT_CONTENT_COMMAND"),F0=J("DROP_COMMAND"),$m=J("FORMAT_ELEMENT_COMMAND"),B0=J("DRAGSTART_COMMAND"),j0=J("DRAGOVER_COMMAND"),Um=J("DRAGEND_COMMAND"),qo=J("COPY_COMMAND"),ol=J("CUT_COMMAND"),$0=J("SELECT_ALL_COMMAND"),zm=J("CLEAR_EDITOR_COMMAND"),qm=J("CLEAR_HISTORY_COMMAND"),ds=J("CAN_REDO_COMMAND"),hs=J("CAN_UNDO_COMMAND"),Km=J("FOCUS_COMMAND"),Wm=J("BLUR_COMMAND"),Hm=J("KEY_MODIFIER_COMMAND");function U0(n,e){return{...e,[gm]:n}}const Rn=U0("metaKey",{ctrlKey:!Vn,metaKey:Vn}),Nc=U0("altKey",{altKey:Vn,ctrlKey:!Vn}),kc=[["altKey",1],["ctrlKey",2],["metaKey",4],["shiftKey",8]];function _u(n,e,t){const r=n.get(e);r?r.push(t):n.set(e,[t])}class Vm{constructor(){M(this,"byKey",new Map);M(this,"byCode",new Map)}add(e){const{key:t,modifiers:r={}}=e;t.length>0||P(399);const i=t.toLowerCase();for(const s of function(o){let u=[0];for(const[a,l]of kc){const c=o[a]||!1;c==="any"?u=u.concat(u.map(h=>h|l)):c&&(u=u.map(h=>h|l))}return u}(r))_u(this.byKey,`${s}:${i}`,e),t.length===1&&(/[0-9]/.test(t)?_u(this.byCode,`${s}:Digit${t}`,e):/[a-z]/.test(i)&&_u(this.byCode,`${s}:Key${i.toUpperCase()}`,e));return this}matches(e){const t=e.key;if(!t)return[];const r=function(o){let u=0;for(const[a,l]of kc)o[a]&&(u|=l);return u}(e),i=this.byKey.get(`${r}:${t.toLowerCase()}`),s=i?i.slice():[];if(this.byCode.size>0&&!(t.length===1&&t.charCodeAt(0)<=127)){const o=this.byCode.get(`${r}:${e.code}`);o&&s.push(...o)}return s}match(e){return this.matches(e)[0]}}function Gm(n){const e=new Vm;for(const t of n)e.add(t);return e}function Jm(n){const e=new Map;return{dispose(){for(const t of e.values())t.dispose();e.clear()},register(t,r){let i=e.get(t);i===void 0&&(i={dispose:n(t,r),holders:new Set},e.set(t,i));const s=()=>{const o=e.get(t);o&&o.holders.delete(s)&&o.holders.size===0&&(e.delete(t),o.dispose())};return i.holders.add(s),s}}}function Xm(n,e,t,r){return n.addEventListener(e,t,r),n.removeEventListener.bind(n,e,t,r)}const Ht=Object.freeze({});let xu;const vu=new WeakMap,Fs=new WeakMap,Ym=Jm(n=>(n.addEventListener("selectionchange",Rc),()=>n.removeEventListener("selectionchange",Rc)));function z0(n,e,t,r,i,s){const o=n.anchor,u=n.focus,a=o.getNode(),l=de();let c;if(s!==void 0)c=s;else{const b=nt(dt(l));c=b!==null?ct(b,l._rootElement):null}const h=c!==null?c.anchorNode:null,f=o.key,d=l.getElementByKey(f),g=t.length;return f!==u.key||!B(a)||(!i&&(!Ir||l._inputState.lastBeforeInputInsertTextTimeStamp<r+50)||a.isDirty()&&g<2||kh(t))&&o.offset!==u.offset&&!a.isComposing()||St(a)||a.isDirty()&&g>1||(i||!Ir)&&d!==null&&!a.isComposing()&&h!==wn(a,d,l)||c!==null&&e!==null&&(!e.collapsed||e.startContainer!==c.anchorNode||e.startOffset!==c.anchorOffset)||!a.isComposing()&&(a.getFormat()!==n.format||a.getStyle()!==n.style)||function(b,m){if(m.isSegmented())return!0;if(!b.isCollapsed())return!1;const p=b.anchor.offset,y=m.getParentOrThrow(),_=mo(m);return p===0?!m.canInsertTextBefore()||!y.canInsertTextBefore()&&!m.isComposing()||_||function(x){const S=x.getPreviousSibling();return(B(S)||T(S)&&S.isInline())&&!S.canInsertTextAfter()}(m):p===m.getTextContentSize()&&(!m.canInsertTextAfter()||!y.canInsertTextAfter()&&!m.isComposing()||_)}(n,a)}function Ac(n,e){return Tt(n)&&n.nodeValue!==null&&e!==0&&e!==n.nodeValue.length}function Oc(n,e,t){const{anchorNode:r,anchorOffset:i,focusNode:s,focusOffset:o}=ct(n,e._rootElement),u=e._inputState;if(u.isSelectionChangeFromDOMUpdate){u.isSelectionChangeFromDOMUpdate=!1;const a=u.selectionChangeFromDOMUpdatePoints;if(u.selectionChangeFromDOMUpdatePoints=null,Ac(r,i)&&Ac(s,o)&&!u.postDeleteSelectionToRestore&&(a===null||a.anchorNode===r&&a.anchorOffset===i&&a.focusNode===s&&a.focusOffset===o))return}gt(e,()=>{if(!t)return void Me(null);if(!es(e,r,s))return;let a=z();if(u.postDeleteSelectionToRestore&&F(a)&&a.isCollapsed()){const l=a.anchor,c=u.postDeleteSelectionToRestore.anchor;(l.key===c.key&&l.offset===c.offset+1||l.offset===1&&c.getNode().is(l.getNode().getPreviousSibling()))&&(a=u.postDeleteSelectionToRestore.clone(),Me(a))}if(u.postDeleteSelectionToRestore=null,F(a)){const l=a.anchor,c=l.getNode();if(a.isCollapsed()){n.type==="Range"&&r===s&&(a.dirty=!0);const h=dt(e).event,f=h?h.timeStamp:performance.now(),{format:d,style:g,offset:b,key:m,timeStamp:p}=u.collapsedSelectionFormat,y=we(),_=e.isComposing()===!1&&y.getTextContent()==="";if(f<p+200&&l.offset===b&&l.key===m)Bs(a,d,g);else if(l.type==="text")B(c)||P(141),q0(a,c);else if(l.type==="element"&&!_){T(c)||P(259);const x=l.getNode();x.isEmpty()?function(S,C){Bs(S,C.getTextFormat(),C.getTextStyle())}(a,x):Bs(a,a.format,"")}}else{const h=l.key,f=a.focus.key,d=a.getNodes(),g=d.length,b=a.isBackward(),m=b?o:i,p=b?i:o,y=b?f:h,_=b?h:f;let x=hm,S=!1;for(let C=0;C<g;C++){const A=d[C],O=A.getTextContentSize();if(B(A)&&O!==0&&!(C===0&&A.__key===y&&m===O||C===g-1&&A.__key===_&&p===0)&&(S=!0,x&=A.getFormat(),x===0))break}a.format=S?x:0}}(function(l,c,h=!1){(h||mh(l,c))&&l.dispatchCommand(zo)})(e,a,a!==null&&(a.dirty||!F(a)))})}function Bs(n,e,t){n.format===e&&n.style===t||(n.format=e,n.style=t,n.dirty=!0)}function q0(n,e){Bs(n,e.getFormat(),e.getStyle())}function Qm(n,e){gt(e,()=>{const t=z(),r=nt(dt(e)),i=Yr();if(r){if(F(t)){const s=t.anchor,o=s.getNode();s.type==="element"&&s.offset===0&&t.isCollapsed()&&!Ee(o)&&we().getChildrenSize()===1&&o.getTopLevelElementOrThrow().isEmpty()&&i!==null&&t.is(i)&&(r.removeAllRanges(),t.dirty=!0)}else if(n.pointerType==="touch"||n.pointerType==="pen"){const s=ct(r,e._rootElement).anchorNode;(ce(s)||Tt(s))&&Me(uo(i,r,e,n))}}if(rn&&r!==null&&r.rangeCount===0){const s=e._rootElement;if(s!==null&&n.target===s){const o=n.clientY;let u=s.childNodes.length;for(let l=0;l<s.childNodes.length;l++){const c=s.childNodes[l];if(ce(c)){const h=c.getBoundingClientRect();if(o<=(h.top+h.bottom)/2){u=l;break}}}r.setBaseAndExtent(s,u,s,u);const a=uo(i,r,e,n);a!==null?Me(a):r.removeAllRanges()}}Y(e,w0,n)})}function Zm(n,e){const t=Rh(n),r=n.pointerType;Zr(t)&&r!=="touch"&&r!=="pen"&&n.button===0&&gt(e,()=>{vo(t,e)||(e._inputState.isSelectionChangeFromMouseDown=!0)})}function K0(n){if(!n.getTargetRanges)return null;const e=n.getTargetRanges();return e.length===0?null:e[0]}function Dc(n){const{lastKeyCode:e}=de()._inputState;if(n==null||n.length<=1||e==null)return;const t=e.length===1?e:e==="Enter"?`
4
4
  `:e==="Tab"?" ":null;if(!t)return;const r=z();if(!F(r)||!r.isCollapsed())return;const i=r.anchor.getNode();if(!B(i))return;const{offset:s}=r.anchor;if(i.getTextContentSize()===s){const o=i.getNextSibling();if(t===`
@@ -1,4 +1,4 @@
1
- import '../../assets/index42.css';var dm = Object.defineProperty;
1
+ import '../../assets/index43.css';var dm = Object.defineProperty;
2
2
  var hm = (n, e, t) => e in n ? dm(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
3
  var M = (n, e, t) => hm(n, typeof e != "symbol" ? e + "" : e, t);
4
4
  import { jsxs as St, Fragment as Wn, jsx as H } from "react/jsx-runtime";
@@ -8,7 +8,7 @@ import { t as _i } from "../../classix-DG18itHa.js";
8
8
  import { File as ym } from "../file/index.js";
9
9
  import { Button as xt } from "../button/index.js";
10
10
  import { Icon as $t } from "../icon/index.js";
11
- import { I as pc } from "../../index-Ds-Ocs4L.js";
11
+ import { I as pc } from "../../index-DBWgRXp9.js";
12
12
  import { Toolbar as _m } from "../toolbar/index.js";
13
13
  function ta(n, ...e) {
14
14
  const t = new URL("https://lexical.dev/docs/error"), r = new URLSearchParams();
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index43.css');const e=require("react/jsx-runtime"),n="_header_u5gx3_14",t={"empty-state":"_empty-state_u5gx3_3",header:n},c=({button:s,content:a,header:r})=>e.jsxs("div",{className:t["empty-state"],"data-component":"emptystate",children:[e.jsx("p",{className:t.header,children:r}),e.jsx("p",{children:a}),s]});exports.EmptyState=c;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index44.css');const e=require("react/jsx-runtime"),c=require("../icon/index.cjs"),m="_header_v8jer_14",s={"empty-state":"_empty-state_v8jer_3",header:m},i=({button:a,content:r,header:n,icon:t})=>e.jsxs("div",{className:s["empty-state"],"data-component":"emptystate",children:[e.jsxs("p",{className:s.header,children:[t&&e.jsx(c.Icon,{gap:"right",name:t,size:"medium"}),n]}),e.jsx("p",{children:r}),a]});exports.EmptyState=i;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/empty-state/index.tsx"],"sourcesContent":["import styles from './styles.module.css';\n\nexport type EmptyStateProps = {\n button?: React.ReactNode;\n content: string;\n header: string;\n};\n\nexport const EmptyState = ({ button, content, header }: EmptyStateProps) => {\n return (\n <div className={styles['empty-state']}>\n <p className={styles.header}>{header}</p>\n <p>{content}</p>\n {button}\n </div>\n );\n};\n"],"names":["EmptyState","button","content","header","styles","jsx"],"mappings":"4LAQaA,EAAaA,CAAC,CAAEC,OAAAA,EAAQC,QAAAA,EAASC,OAAAA,CAAwB,WAEjE,MAAA,CAAI,UAAWC,EAAO,aAAa,EAAE,iBAAA,aACpC,SAAA,CAAAC,EAAAA,IAAC,IAAA,CAAE,UAAWD,EAAOD,OAASA,SAAAA,EAAO,EACrCE,EAAAA,IAAC,KAAGH,SAAAA,CAAAA,CAAQ,EACXD,CAAAA,EACH"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/empty-state/index.tsx"],"sourcesContent":["import { Icon, IconName } from '@/components/icon';\n\nimport styles from './styles.module.css';\n\nexport type EmptyStateProps = {\n button?: React.ReactNode;\n content: string;\n header: string;\n icon?: IconName;\n};\n\nexport const EmptyState = ({ button, content, header, icon }: EmptyStateProps) => {\n return (\n <div className={styles['empty-state']}>\n <p className={styles.header}>\n {icon && (\n <Icon\n gap={'right'}\n name={icon}\n size='medium'\n />\n )}\n {header}\n </p>\n <p>{content}</p>\n {button}\n </div>\n );\n};\n"],"names":["EmptyState","button","content","header","icon","styles","jsxs","Icon","jsx"],"mappings":"2NAWaA,EAAaA,CAAC,CAAEC,OAAAA,EAAQC,QAAAA,EAASC,OAAAA,EAAQC,KAAAA,CAAsB,WAEvE,MAAA,CAAI,UAAWC,EAAO,aAAa,EAAE,iBAAA,aACpC,SAAA,CAAAC,EAAAA,KAAC,IAAA,CAAE,UAAWD,EAAOF,OAClBC,SAAAA,CAAAA,SACEG,EAAAA,KAAA,CACC,IAAK,QACL,KAAMH,EACN,KAAK,SAAQ,EAGhBD,CAAAA,EACH,EACAK,EAAAA,IAAC,KAAGN,SAAAA,CAAAA,CAAQ,EACXD,CAAAA,EACH"}
@@ -1,17 +1,22 @@
1
- import { jsxs as m, jsx as e } from "react/jsx-runtime";
2
- import '../../assets/index43.css';const p = "_header_u5gx3_14", t = {
3
- "empty-state": "_empty-state_u5gx3_3",
4
- header: p
5
- }, d = ({
1
+ import { jsxs as t, jsx as a } from "react/jsx-runtime";
2
+ import { Icon as d } from "../icon/index.js";
3
+ import '../../assets/index44.css';const n = "_header_v8jer_14", r = {
4
+ "empty-state": "_empty-state_v8jer_3",
5
+ header: n
6
+ }, h = ({
6
7
  button: s,
7
- content: a,
8
- header: r
9
- }) => /* @__PURE__ */ m("div", { className: t["empty-state"], "data-component": "emptystate", children: [
10
- /* @__PURE__ */ e("p", { className: t.header, children: r }),
11
- /* @__PURE__ */ e("p", { children: a }),
8
+ content: m,
9
+ header: p,
10
+ icon: e
11
+ }) => /* @__PURE__ */ t("div", { className: r["empty-state"], "data-component": "emptystate", children: [
12
+ /* @__PURE__ */ t("p", { className: r.header, children: [
13
+ e && /* @__PURE__ */ a(d, { gap: "right", name: e, size: "medium" }),
14
+ p
15
+ ] }),
16
+ /* @__PURE__ */ a("p", { children: m }),
12
17
  s
13
18
  ] });
14
19
  export {
15
- d as EmptyState
20
+ h as EmptyState
16
21
  };
17
22
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/empty-state/index.tsx"],"sourcesContent":["import styles from './styles.module.css';\n\nexport type EmptyStateProps = {\n button?: React.ReactNode;\n content: string;\n header: string;\n};\n\nexport const EmptyState = ({ button, content, header }: EmptyStateProps) => {\n return (\n <div className={styles['empty-state']}>\n <p className={styles.header}>{header}</p>\n <p>{content}</p>\n {button}\n </div>\n );\n};\n"],"names":["EmptyState","button","content","header","styles","jsx"],"mappings":";;;;GAQaA,IAAaA,CAAC;AAAA,EAAEC,QAAAA;AAAAA,EAAQC,SAAAA;AAAAA,EAASC,QAAAA;AAAwB,wBAEjE,OAAA,EAAI,WAAWC,EAAO,aAAa,GAAE,kBAAA,cACpC,UAAA;AAAA,EAAA,gBAAAC,EAAC,KAAA,EAAE,WAAWD,EAAOD,QAASA,UAAAA,GAAO;AAAA,EACrC,gBAAAE,EAAC,OAAGH,UAAAA,EAAAA,CAAQ;AAAA,EACXD;AAAAA,GACH;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/empty-state/index.tsx"],"sourcesContent":["import { Icon, IconName } from '@/components/icon';\n\nimport styles from './styles.module.css';\n\nexport type EmptyStateProps = {\n button?: React.ReactNode;\n content: string;\n header: string;\n icon?: IconName;\n};\n\nexport const EmptyState = ({ button, content, header, icon }: EmptyStateProps) => {\n return (\n <div className={styles['empty-state']}>\n <p className={styles.header}>\n {icon && (\n <Icon\n gap={'right'}\n name={icon}\n size='medium'\n />\n )}\n {header}\n </p>\n <p>{content}</p>\n {button}\n </div>\n );\n};\n"],"names":["EmptyState","button","content","header","icon","styles","jsxs","Icon","jsx"],"mappings":";;;;;GAWaA,IAAaA,CAAC;AAAA,EAAEC,QAAAA;AAAAA,EAAQC,SAAAA;AAAAA,EAASC,QAAAA;AAAAA,EAAQC,MAAAA;AAAsB,wBAEvE,OAAA,EAAI,WAAWC,EAAO,aAAa,GAAE,kBAAA,cACpC,UAAA;AAAA,EAAA,gBAAAC,EAAC,KAAA,EAAE,WAAWD,EAAOF,QAClBC,UAAAA;AAAAA,IAAAA,uBACEG,GAAA,EACC,KAAK,SACL,MAAMH,GACN,MAAK,UAAQ;AAAA,IAGhBD;AAAAA,EAAAA,GACH;AAAA,EACA,gBAAAK,EAAC,OAAGN,UAAAA,EAAAA,CAAQ;AAAA,EACXD;AAAAA,GACH;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index44.css');const s=require("react/jsx-runtime"),i=require("../../classix-5H4IWnMA.cjs"),l="_fieldset_f5vpp_1",d={fieldset:l},o=({className:e,...t})=>s.jsx("fieldset",{className:i.t(d.fieldset,e),...t,"data-component":"fieldset"});exports.Fieldset=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index45.css');const s=require("react/jsx-runtime"),i=require("../../classix-5H4IWnMA.cjs"),l="_fieldset_f5vpp_1",d={fieldset:l},o=({className:e,...t})=>s.jsx("fieldset",{className:i.t(d.fieldset,e),...t,"data-component":"fieldset"});exports.Fieldset=o;
2
2
  //# sourceMappingURL=index.cjs.map