efficient-shell 8.16.1 → 8.17.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 (189) hide show
  1. package/README.md +20 -1
  2. package/dist/{Browser-QBOH7J6X.js → Browser-GZXTAL7Z.js} +14 -14
  3. package/dist/Calculator-TYZWIYJW.js +29 -0
  4. package/dist/{CurrencyConverter-QTFV2RSB.js → CurrencyConverter-XK6SETYS.js} +6 -6
  5. package/dist/{Documents-7TUZDRPO.js → Documents-GXYD4UD2.js} +7 -7
  6. package/dist/{Files-4KRJX4CJ.js → Files-OYZXQMRA.js} +18 -18
  7. package/dist/{Notepad-GBSYEVOZ.js → Notepad-L4TKPWZ7.js} +10 -10
  8. package/dist/{PomodoroTimer-23O2CBIZ.js → PomodoroTimer-D37Y6TE7.js} +23 -23
  9. package/dist/{Preview-WEWO3FSN.js → Preview-MPDXIVGC.js} +21 -21
  10. package/dist/{Sidebar-NONBFVWE.js → Sidebar-F4LYK5XP.js} +34 -34
  11. package/dist/{Spreadsheet-SDDJ3EBT.js → Spreadsheet-JBPWIBDY.js} +13 -13
  12. package/dist/{Stock-AQ2SJRU6.js → Stock-ZUTJX6S6.js} +3 -3
  13. package/dist/{Weather-UHCDMFZE.js → Weather-4GPPPHK5.js} +18 -18
  14. package/dist/{WorldClock-TB3HCUIH.js → WorldClock-TW36BP7G.js} +6 -6
  15. package/dist/ai/index.js +15 -15
  16. package/dist/apps/index.js +1 -1
  17. package/dist/bin/media-host-check.js +1 -1
  18. package/dist/bin/ui-check.js +1 -1
  19. package/dist/charts/ChordChart.js +1 -1
  20. package/dist/charts/RadarChart.js +1 -1
  21. package/dist/charts/SankeyChart.js +1 -1
  22. package/dist/charts/SunburstChart.js +1 -1
  23. package/dist/charts/TreemapChart.js +1 -1
  24. package/dist/chunk-2LXTJXWC.js +6 -0
  25. package/dist/{chunk-MNWYPP3F.js → chunk-2OTCFJCU.js} +1 -1
  26. package/dist/{chunk-I7GWKMYO.js → chunk-35DHYR37.js} +1 -1
  27. package/dist/chunk-3S52QOEP.js +20 -0
  28. package/dist/{chunk-J77ZVPF5.js → chunk-4EIGXW4U.js} +5 -5
  29. package/dist/{chunk-ELVFPH7Y.js → chunk-4G5M752L.js} +3 -3
  30. package/dist/{chunk-ABJ4LWOW.js → chunk-4TL3MRRE.js} +1 -1
  31. package/dist/{chunk-L42Q6GVA.js → chunk-5BLAPU7W.js} +1 -1
  32. package/dist/{chunk-BOGBLZKS.js → chunk-5SULG7D5.js} +1 -1
  33. package/dist/{chunk-H3XEO4LR.js → chunk-62LFDQGF.js} +6 -6
  34. package/dist/chunk-65HOBHY7.js +3 -0
  35. package/dist/{chunk-7JKFXRAR.js → chunk-6AKXEUZA.js} +5 -5
  36. package/dist/{chunk-UOOHE3FX.js → chunk-6EJ7G234.js} +7 -7
  37. package/dist/{chunk-DYSUTUH3.js → chunk-6TWRV44R.js} +11 -11
  38. package/dist/{chunk-EK3JM3J2.js → chunk-7KZ65FSA.js} +1 -1
  39. package/dist/{chunk-QMQVOUIV.js → chunk-7T3COEQK.js} +1 -1
  40. package/dist/{chunk-JZ7NBWGB.js → chunk-7UBV5MPQ.js} +1 -1
  41. package/dist/{chunk-7HPOALEV.js → chunk-AGPQEI3I.js} +7 -7
  42. package/dist/{chunk-6L7MMUMP.js → chunk-B3LWYJS7.js} +2 -2
  43. package/dist/{chunk-DKY6X24V.js → chunk-BMBQ3IX3.js} +1 -1
  44. package/dist/{chunk-HPW6QAAY.js → chunk-C6LV3HJW.js} +1 -1
  45. package/dist/{chunk-JGZWAEOJ.js → chunk-CD6PGAYP.js} +1 -1
  46. package/dist/{chunk-BF2G42QU.js → chunk-CHNYSP6K.js} +1 -1
  47. package/dist/{chunk-H62JMI7C.js → chunk-DVFMCVI5.js} +2 -2
  48. package/dist/{chunk-UAXP4A2A.js → chunk-E4YSP5RD.js} +2 -2
  49. package/dist/{chunk-7OC3L4VZ.js → chunk-EIUCHQI2.js} +1 -1
  50. package/dist/{chunk-EXU3ZXKB.js → chunk-EKFIRCNP.js} +8 -8
  51. package/dist/{chunk-LKSHI57C.js → chunk-EPGKTANF.js} +6 -6
  52. package/dist/{chunk-EZQXLIG3.js → chunk-FARRGETL.js} +1 -1
  53. package/dist/{chunk-ZSTBFMQE.js → chunk-GATOVTJT.js} +1 -1
  54. package/dist/chunk-GLCKZI3N.js +1 -0
  55. package/dist/chunk-GLUJS42B.js +1 -0
  56. package/dist/{chunk-7OLYHD4V.js → chunk-HEJTHEXN.js} +1 -1
  57. package/dist/{chunk-55IY2ZJY.js → chunk-HEM6NC23.js} +1 -1
  58. package/dist/chunk-HMZLRXLA.js +1 -0
  59. package/dist/{chunk-VX4OBI4U.js → chunk-HPQ56MKK.js} +1 -1
  60. package/dist/{chunk-4CXQX5AX.js → chunk-IH2DJOTW.js} +22 -22
  61. package/dist/{chunk-NRWIULLI.js → chunk-ION2GBY3.js} +13 -13
  62. package/dist/{chunk-LRM5XTDF.js → chunk-JHXYW542.js} +3 -3
  63. package/dist/{chunk-53XMYVJO.js → chunk-JIJOXLDJ.js} +1 -1
  64. package/dist/{chunk-4MHHPESC.js → chunk-KBHC4VLA.js} +1 -1
  65. package/dist/{chunk-2HLS7AGL.js → chunk-KIGGG3LT.js} +1 -1
  66. package/dist/{chunk-YL44UDNT.js → chunk-KLAZTKN2.js} +5 -5
  67. package/dist/{chunk-UONWIAII.js → chunk-KSYNJTVA.js} +20 -20
  68. package/dist/{chunk-5J6Y5TOO.js → chunk-LC52BB6N.js} +1 -1
  69. package/dist/{chunk-CQXV3SJA.js → chunk-LI7D6SMK.js} +1 -1
  70. package/dist/{chunk-2KOXALIK.js → chunk-LJSJFS2M.js} +11 -11
  71. package/dist/{chunk-VR5GVM3A.js → chunk-MV7WC6SL.js} +28 -28
  72. package/dist/{chunk-L6CG37L3.js → chunk-OHHJF547.js} +1 -1
  73. package/dist/{chunk-5K3QLWUX.js → chunk-OS57C5J7.js} +1 -1
  74. package/dist/{chunk-DSBLBBES.js → chunk-OU3ITBK5.js} +6 -6
  75. package/dist/{chunk-G34KXE2L.js → chunk-PEELLEPP.js} +6 -6
  76. package/dist/{chunk-BKWLFZHI.js → chunk-PK4ZY4GZ.js} +3 -3
  77. package/dist/{chunk-XSY22PWH.js → chunk-PRR2GXBV.js} +2 -2
  78. package/dist/{chunk-C4YTKSXY.js → chunk-PRXPLEVZ.js} +1 -1
  79. package/dist/{chunk-U6FORQTI.js → chunk-PSOHSTXL.js} +1 -1
  80. package/dist/{chunk-ZKRWJILC.js → chunk-QIEMOYTG.js} +1 -1
  81. package/dist/chunk-QP2S2K2Y.js +4 -0
  82. package/dist/{chunk-2LTB2DSA.js → chunk-QV2GME3Y.js} +6 -6
  83. package/dist/{chunk-WCAQWHFD.js → chunk-R6N26ITY.js} +5 -5
  84. package/dist/{chunk-MSCILVJB.js → chunk-R6XC7X63.js} +6 -6
  85. package/dist/{chunk-37S3WLBL.js → chunk-RECXXFYW.js} +8 -8
  86. package/dist/chunk-RKWGWBET.js +9 -0
  87. package/dist/chunk-RNBM5JZI.js +4 -0
  88. package/dist/{chunk-JF45HC5H.js → chunk-RQARJHDB.js} +1 -1
  89. package/dist/{chunk-B7IHOBK6.js → chunk-S2ONNZVX.js} +14 -14
  90. package/dist/{chunk-CXDJXNPZ.js → chunk-S3RTAWEU.js} +1 -1
  91. package/dist/chunk-SEFPZXO5.js +8 -0
  92. package/dist/{chunk-FDIJEOGV.js → chunk-SWSN3HZX.js} +2 -2
  93. package/dist/{chunk-Y5W6POQE.js → chunk-T2VNNW6Z.js} +6 -6
  94. package/dist/{chunk-7QLI3HAO.js → chunk-T6L6HQI5.js} +1 -1
  95. package/dist/{chunk-FEAOJLGA.js → chunk-TB3AK6XF.js} +2 -2
  96. package/dist/{chunk-3YNRFMIN.js → chunk-TLJCUUZU.js} +1 -1
  97. package/dist/{chunk-FSP63GKK.js → chunk-UDD7GB4F.js} +2 -2
  98. package/dist/{chunk-OSRLZZDO.js → chunk-WKSVUJZA.js} +3 -3
  99. package/dist/{chunk-C2FBUQJW.js → chunk-X3II54HU.js} +1 -1
  100. package/dist/chunk-Y4NIZQNT.js +8 -0
  101. package/dist/{chunk-2TPUNCT7.js → chunk-YO52QEKT.js} +8 -8
  102. package/dist/chunk-YYUICWSB.js +12 -0
  103. package/dist/{chunk-U5PXB4UW.js → chunk-ZOGEAYWJ.js} +5 -5
  104. package/dist/{client-DLm3Fvbc.d.ts → client-DZeDEyG1.d.ts} +30 -9
  105. package/dist/data/DataTable.js +1 -1
  106. package/dist/data/ListLoadError.js +1 -1
  107. package/dist/forms/AlignmentGrid.js +1 -1
  108. package/dist/forms/BorderInput.js +1 -1
  109. package/dist/forms/BrandAssetEditor.js +1 -1
  110. package/dist/forms/Button.js +1 -1
  111. package/dist/forms/ColorPicker.js +1 -1
  112. package/dist/forms/ComposerAttachments.js +1 -1
  113. package/dist/forms/CornersInput.js +1 -1
  114. package/dist/forms/DatePicker.js +1 -1
  115. package/dist/forms/DateRangePicker.js +1 -1
  116. package/dist/forms/DisplayChips.js +1 -1
  117. package/dist/forms/FilePicker.js +1 -1
  118. package/dist/forms/IconButton.js +1 -1
  119. package/dist/forms/IconPicker.js +1 -1
  120. package/dist/forms/InputNumber.js +1 -1
  121. package/dist/forms/LinkPicker.js +1 -1
  122. package/dist/forms/MediaUploadField.js +1 -1
  123. package/dist/forms/MediaUploadGrid.js +1 -1
  124. package/dist/forms/NumericKeypad.js +1 -1
  125. package/dist/forms/PictureTiles.js +1 -1
  126. package/dist/forms/PositionInput.js +1 -1
  127. package/dist/forms/Segmented.js +1 -1
  128. package/dist/forms/Select.js +1 -1
  129. package/dist/forms/SidesInput.js +1 -1
  130. package/dist/forms/Slider.js +1 -1
  131. package/dist/forms/Snippet.js +1 -1
  132. package/dist/forms/SplitButton.js +1 -1
  133. package/dist/forms/TagInput.js +1 -1
  134. package/dist/forms/TextToolbar.js +1 -1
  135. package/dist/forms/WidthsBar.js +1 -1
  136. package/dist/forms/dropdownPosition.js +1 -1
  137. package/dist/index.d.ts +2 -1
  138. package/dist/index.js +87 -87
  139. package/dist/map/index.js +6 -6
  140. package/dist/shell/AppUpdateBanner.js +1 -1
  141. package/dist/shell/ColoredBadge.js +1 -1
  142. package/dist/shell/ContextMenu.js +1 -1
  143. package/dist/shell/DropdownMenu.js +1 -1
  144. package/dist/shell/EditableGrid.js +1 -1
  145. package/dist/shell/FloatingBar.js +1 -1
  146. package/dist/shell/IconRail.js +1 -1
  147. package/dist/shell/LanguageSelect.js +1 -1
  148. package/dist/shell/MilestoneTimeline.js +1 -1
  149. package/dist/shell/Popover.js +1 -1
  150. package/dist/shell/ProductionTimeline.js +1 -1
  151. package/dist/shell/ResizeHandle.js +1 -1
  152. package/dist/shell/SearchableSelect.js +1 -1
  153. package/dist/shell/SettingReset.js +1 -1
  154. package/dist/shell/SidebarLayout.js +1 -1
  155. package/dist/shell/SortableList.js +1 -1
  156. package/dist/shell/StatusBadge.js +1 -1
  157. package/dist/shell/Tabs.js +1 -1
  158. package/dist/shell/TimelineTrack.js +1 -1
  159. package/dist/shell/Tooltip.js +1 -1
  160. package/dist/shell/TopNav.js +1 -1
  161. package/dist/shell/TransferProgress.js +1 -1
  162. package/dist/shell/Tree.js +1 -1
  163. package/dist/telemetry/index.d.ts +2 -1
  164. package/dist/telemetry/index.js +1 -1
  165. package/dist/templates/AuthScreen.js +1 -1
  166. package/dist/templates/ChatTemplate.js +1 -1
  167. package/dist/templates/CheckoutTemplate.js +1 -1
  168. package/dist/templates/DashboardTemplate.js +1 -1
  169. package/dist/templates/DataTablePage.js +1 -1
  170. package/dist/templates/EmailTemplate.js +1 -1
  171. package/dist/templates/ErrorBoundary.js +1 -1
  172. package/dist/templates/FormLayoutPage.js +1 -1
  173. package/dist/templates/GalleryTemplate.js +1 -1
  174. package/dist/ui/index.js +1 -1
  175. package/dist/version.js +1 -1
  176. package/package.json +1 -1
  177. package/dist/Calculator-KKB7EFVO.js +0 -29
  178. package/dist/chunk-3WV3CMSU.js +0 -1
  179. package/dist/chunk-7NEIYFM2.js +0 -8
  180. package/dist/chunk-DXQCNU5I.js +0 -12
  181. package/dist/chunk-EKHT4PDR.js +0 -4
  182. package/dist/chunk-FND3BDOO.js +0 -4
  183. package/dist/chunk-JHDWTYZ4.js +0 -1
  184. package/dist/chunk-JXOBORLD.js +0 -3
  185. package/dist/chunk-L3VD25XR.js +0 -8
  186. package/dist/chunk-OJ3RN3BG.js +0 -20
  187. package/dist/chunk-T53TXXOC.js +0 -1
  188. package/dist/chunk-Z3WKHMVB.js +0 -6
  189. package/dist/chunk-Z5UVBCEE.js +0 -9
@@ -1,12 +1,12 @@
1
- import{SearchableSelect as e}from"./chunk-DXQCNU5I.js";import{Select_default as a}from"./chunk-OJ3RN3BG.js";import{Input_default as l}from"./chunk-UNEJ2ABD.js";import{labelClasses as t}from"./chunk-EQKUFYX6.js";import{isSafeLinkHref as r}from"./chunk-PJPK2ADX.js";import{INPUT_SIZES as n}from"./chunk-JFSYWEHD.js";import{Button_default as i}from"./chunk-FSP63GKK.js";import{Icon as o}from"./chunk-VJPJNCB4.js";import{registerModalEscapeInterceptor as s}from"./chunk-TWVUQUUD.js";import{useShellStrings as u}from"./chunk-OVNRVFWS.js";import{useId as d,useRef as c,useState as p,useEffect as m}from"react";import{jsx as f,jsxs as v,Fragment as g}from"react/jsx-runtime";function h(e){return"select"===e.type?e.options:"groups"===e.type?e.groups.flatMap(e=>e.options):[]}var b="address",x={kindOf:()=>b,targetOf:e=>e,readFilter:()=>null,withFilter:e=>e},y=e=>r(e.trim());function k(r){const{value:n,kinds:o,rules:k=x,filtersFor:w,label:N,readOnly:C,placeholder:F,className:O=""}=r,j=void 0!==r.onApply,$=u().link,D=k.isSafe??y,E=d(),P=c(null),z=c(null),[J,U]=p({url:n}),A=j?J.url:n,[K,S]=p(!1),[W,R]=p(null),[V,B]=p(null),Q=c(()=>{});Q.current=j?r.onCancel:()=>{},m(()=>{if(j)return s(e=>{const a=P.current;return!!("Escape"===e.key&&a&&e.target instanceof Node&&a.contains(e.target))&&(Q.current(),!0)},()=>P.current)},[j]),m(()=>{if(!j)return;const e=z.current;e?(e.focus(),e.select()):P.current?.querySelector("button, input")?.focus()},[]);const T=o??[{value:b,label:$.address,target:{type:"text"}}],X=W&&W.against===A?W.kind:k.kindOf(A),G=T.filter(e=>!e.hideWhenEmpty||h(e.target).length>0||e.value===X),H=G.find(e=>"text"===e.target.type),L=G.find(e=>e.value===X)??H??G[0];if(!L)return null;const M="text"!==L.target.type,Y=M?k.targetOf(A):A,q=h(L.target),I=q.find(e=>e.value===Y),Z=e=>({value:e,label:$.unavailable(e)}),_="select"===L.target.type&&Y&&w?w(Y):null,ee=_?k.readFilter(A):null,ae=ee?_?.find(e=>e.param===ee.param):void 0,le=V&&V.against===A?V.text:A,te=!M&&""!==le.trim()&&!D(le),re=te&&(!j||K),ne=(e,a)=>{j?U({url:e,name:a}):void 0===a?r.onChange(e):r.onChange(e,a)},ie=(e,a)=>{R(a=>a?{...a,against:e}:a),ne(e,a)},oe=e=>{if(!e)return ie("");const a=q.find(a=>a.value===e);ie(e,a?.label)},se=M?A:le.trim(),ue=()=>{if(!j||!se)return;if(!M&&te)return void S(!0);const e=M&&J.url===se?J.name:void 0,a=r.onApply;void 0===e?a(se):a(se,e)},de=(e,a)=>a&&!e.some(e=>e.value===a)?[Z(a),...e]:[...e],ce=(l,t,r,n,i)=>{const o=[];for(const e of r){const a=o[o.length-1],l={value:e.value,label:e.label};e.group?a&&"options"in a&&a.label===e.group?a.options.push(l):o.push({label:e.group,options:[l]}):o.push(l)}if(i){const a=r.some(e=>""===e.value);/* @__PURE__ */
1
+ import{SearchableSelect as e}from"./chunk-YYUICWSB.js";import{Select_default as a}from"./chunk-3S52QOEP.js";import{Input_default as l}from"./chunk-UNEJ2ABD.js";import{labelClasses as t}from"./chunk-EQKUFYX6.js";import{isSafeLinkHref as r}from"./chunk-PJPK2ADX.js";import{INPUT_SIZES as n}from"./chunk-JFSYWEHD.js";import{Button_default as i}from"./chunk-UDD7GB4F.js";import{Icon as o}from"./chunk-VJPJNCB4.js";import{registerModalEscapeInterceptor as s}from"./chunk-TWVUQUUD.js";import{useShellStrings as u}from"./chunk-OVNRVFWS.js";import{useId as d,useRef as c,useState as p,useEffect as m}from"react";import{jsx as f,jsxs as v,Fragment as g}from"react/jsx-runtime";function h(e){return"select"===e.type?e.options:"groups"===e.type?e.groups.flatMap(e=>e.options):[]}var b="address",x={kindOf:()=>b,targetOf:e=>e,readFilter:()=>null,withFilter:e=>e},y=e=>r(e.trim());function k(r){const{value:n,kinds:o,rules:k=x,filtersFor:w,label:N,readOnly:C,placeholder:F,className:O=""}=r,j=void 0!==r.onApply,D=u().link,E=k.isSafe??y,$=d(),P=c(null),U=c(null),[z,S]=p({url:n}),W=j?z.url:n,[A,J]=p(!1),[B,V]=p(null),[Y,K]=p(null),Q=c(()=>{});Q.current=j?r.onCancel:()=>{},m(()=>{if(j)return s(e=>{const a=P.current;return!!("Escape"===e.key&&a&&e.target instanceof Node&&a.contains(e.target))&&(Q.current(),!0)},()=>P.current)},[j]),m(()=>{if(!j)return;const e=U.current;e?(e.focus(),e.select()):P.current?.querySelector("button, input")?.focus()},[]);const R=o??[{value:b,label:D.address,target:{type:"text"}}],T=B&&B.against===W?B.kind:k.kindOf(W),H=R.filter(e=>!e.hideWhenEmpty||h(e.target).length>0||e.value===T),L=H.find(e=>"text"===e.target.type),M=H.find(e=>e.value===T)??L??H[0];if(!M)return null;const X="text"!==M.target.type,q=X?k.targetOf(W):W,G=h(M.target),I=G.find(e=>e.value===q),Z=e=>({value:e,label:D.unavailable(e)}),_="select"===M.target.type&&q&&w?w(q):null,ee=_?k.readFilter(W):null,ae=ee?_?.find(e=>e.param===ee.param):void 0,le=Y&&Y.against===W?Y.text:W,te=!X&&""!==le.trim()&&!E(le),re=te&&(!j||A),ne=(e,a)=>{j?S({url:e,name:a}):void 0===a?r.onChange(e):r.onChange(e,a)},ie=(e,a)=>{V(a=>a?{...a,against:e}:a),ne(e,a)},oe=e=>{if(!e)return ie("");const a=G.find(a=>a.value===e);ie(e,a?.label)},se=X?W:le.trim(),ue=()=>{if(!j||!se)return;if(!X&&te)return void J(!0);const e=X&&z.url===se?z.name:void 0,a=r.onApply;void 0===e?a(se):a(se,e)},de=(e,a)=>a&&!e.some(e=>e.value===a)?[Z(a),...e]:[...e],ce=(l,t,r,n,i)=>{const o=[];for(const e of r){const a=o[o.length-1],l={value:e.value,label:e.label};e.group?a&&"options"in a&&a.label===e.group?a.options.push(l):o.push({label:e.group,options:[l]}):o.push(l)}if(i){const a=r.some(e=>""===e.value);/* @__PURE__ */
2
2
  return f(e,{"aria-label":l,value:t,options:o,disabled:C,clearable:a,placeholder:r.find(e=>""===e.value)?.label,onChange:n})}/* @__PURE__ */
3
- return f(a,{size:"sm","aria-label":l,value:t,options:o,readOnly:C,onChange:n})};let pe;if("text"===L.target.type)pe=/* @__PURE__ */f(l,{ref:z,id:`${E}-address`,size:"sm",type:"text",invalid:re,"aria-label":$.address,"aria-describedby":re?`${E}-why`:void 0,placeholder:F??$.addressPlaceholder,spellCheck:!1,autoComplete:"off",value:le,readOnly:C,onChange:e=>(e=>{S(!1);const a=e.trim();a?D(e)?(B({text:e,against:a}),ie(a)):B({text:e,against:A}):(B({text:e,against:""}),ie(""))})(e.target.value)});else{const e="groups"===L.target.type?L.target.groups.flatMap(e=>e.options.map(a=>({value:a.value,label:a.label,group:e.label}))):L.target.options.map(e=>({value:e.value,label:e.label})),a=[{value:"",label:L.target.placeholder},...de(e,Y)];pe=ce(L.label,Y,a,oe,e.length>10)}const me=/* @__PURE__ */v(g,{children:[o&&ce($.linkType,L.value,G.map(e=>({value:e.value,label:e.label})),e=>{B(null),S(!1);const a=G.find(a=>a.value===e);if(!a||"text"===a.target.type)return void R({kind:e,against:A});const l=h(a.target)[0];R({kind:e,against:l?l.value:""}),l?ne(l.value,l.label):ne("")},!1),pe,_&&ce($.filter,ee?.param??"",[{value:"",label:$.noFilter},...ee&&!ae?[Z(ee.param)]:[],..._.map(e=>({value:e.param,label:e.label}))],e=>{if(!e)return ie(Y,I?.label);const a=_?.find(a=>a.param===e),l=a?.values[0];l&&ie(k.withFilter(Y,{param:e,value:l.value}),l.label)},!1),_&&ee&&ce($.value,ee.value,de((ae?.values??[]).map(e=>({value:e.value,label:e.label})),ee.value),e=>{if(!ee)return;const a=ae?.values.find(a=>a.value===e);ie(k.withFilter(Y,{param:ee.param,value:e}),a?.label)},(ae?.values.length??0)>10),re&&/* @__PURE__ */f("p",{id:`${E}-why`,role:"alert",className:"text-2xs leading-4 text-red-600",children:$.unsafe}),L.hint&&/* @__PURE__ */f("p",{className:"text-2xs leading-4 text-gray-400",children:L.hint}),_&&/* @__PURE__ */f("p",{className:"text-2xs leading-4 text-gray-400",children:$.filterHint})]});if(!j)/* @__PURE__ */
3
+ return f(a,{size:"sm","aria-label":l,value:t,options:o,readOnly:C,onChange:n})};let pe;if("text"===M.target.type)pe=/* @__PURE__ */f(l,{ref:U,id:`${$}-address`,size:"sm",type:"text",invalid:re,"aria-label":D.address,"aria-describedby":re?`${$}-why`:void 0,placeholder:F??D.addressPlaceholder,spellCheck:!1,autoComplete:"off",value:le,readOnly:C,onChange:e=>(e=>{J(!1);const a=e.trim();a?E(e)?(K({text:e,against:a}),ie(a)):K({text:e,against:W}):(K({text:e,against:""}),ie(""))})(e.target.value)});else{const e="groups"===M.target.type?M.target.groups.flatMap(e=>e.options.map(a=>({value:a.value,label:a.label,group:e.label}))):M.target.options.map(e=>({value:e.value,label:e.label})),a=[{value:"",label:M.target.placeholder},...de(e,q)];pe=ce(M.label,q,a,oe,e.length>10)}const me=/* @__PURE__ */v(g,{children:[o&&ce(D.linkType,M.value,H.map(e=>({value:e.value,label:e.label})),e=>{K(null),J(!1);const a=H.find(a=>a.value===e);if(!a||"text"===a.target.type)return void V({kind:e,against:W});const l=h(a.target)[0];V({kind:e,against:l?l.value:""}),l?ne(l.value,l.label):ne("")},!1),pe,_&&ce(D.filter,ee?.param??"",[{value:"",label:D.noFilter},...ee&&!ae?[Z(ee.param)]:[],..._.map(e=>({value:e.param,label:e.label}))],e=>{if(!e)return ie(q,I?.label);const a=_?.find(a=>a.param===e),l=a?.values[0];l&&ie(k.withFilter(q,{param:e,value:l.value}),l.label)},!1),_&&ee&&ce(D.value,ee.value,de((ae?.values??[]).map(e=>({value:e.value,label:e.label})),ee.value),e=>{if(!ee)return;const a=ae?.values.find(a=>a.value===e);ie(k.withFilter(q,{param:ee.param,value:e}),a?.label)},(ae?.values.length??0)>10),re&&/* @__PURE__ */f("p",{id:`${$}-why`,role:"alert",className:"text-2xs leading-4 text-red-600",children:D.unsafe}),M.hint&&/* @__PURE__ */f("p",{className:"text-2xs leading-4 text-gray-400",children:M.hint}),_&&/* @__PURE__ */f("p",{className:"text-2xs leading-4 text-gray-400",children:D.filterHint})]});if(!j)/* @__PURE__ */
4
4
  return f("div",{ref:P,className:`flex min-w-0 flex-auto flex-col gap-2 ${O}`.trim(),role:N?"group":void 0,"aria-label":N,children:me});const fe=r.onRemove;/* @__PURE__ */
5
- return v("div",{ref:P,role:"dialog","aria-label":N??$.title,className:`flex min-w-0 flex-col gap-2 rounded-xl border border-gray-200 bg-white p-3 shadow-lg ${O}`.trim(),onKeyDown:e=>{"Enter"!==e.key||e.defaultPrevented||e.target instanceof Element&&e.target.closest("button")||(e.preventDefault(),ue())},children:[M?/* @__PURE__ */f("span",{className:t({inline:!0}),children:$.title}):/* @__PURE__ */f("label",{htmlFor:`${E}-address`,className:t({inline:!0}),children:$.title}),me,
6
- /* @__PURE__ */v("div",{className:"flex items-center justify-between gap-2",children:[fe?/* @__PURE__ */f(i,{variant:"ghost-danger",size:"sm","data-window-action":"remove",onClick:fe,children:$.remove}):null,
5
+ return v("div",{ref:P,role:"dialog","aria-label":N??D.title,className:`flex min-w-0 flex-col gap-2 rounded-xl border border-gray-200 bg-white p-3 shadow-lg ${O}`.trim(),onKeyDown:e=>{"Enter"!==e.key||e.defaultPrevented||e.target instanceof Element&&e.target.closest("button")||(e.preventDefault(),ue())},children:[X?/* @__PURE__ */f("span",{className:t({inline:!0}),children:D.title}):/* @__PURE__ */f("label",{htmlFor:`${$}-address`,className:t({inline:!0}),children:D.title}),me,
6
+ /* @__PURE__ */v("div",{className:"flex items-center justify-between gap-2",children:[fe?/* @__PURE__ */f(i,{variant:"ghost-danger",size:"sm","data-window-action":"remove",onClick:fe,children:D.remove}):null,
7
7
  /* @__PURE__ */v("span",{className:"ml-auto flex gap-1",children:[
8
- /* @__PURE__ */f(i,{variant:"secondary",size:"sm","data-window-action":"cancel",onClick:()=>Q.current(),children:$.cancel}),
9
- /* @__PURE__ */f(i,{variant:"primary",size:"sm","data-window-action":"apply",onClick:ue,disabled:C||""===se,children:$.apply})]})]})]})}function w({label:e,text:a,onTextChange:t,link:r,onLinkChange:i,kinds:s,rules:m,filtersFor:g,textPlaceholder:h,readOnly:b,className:x=""}){const y=u().link,[w,N]=p(!1),C=c(null),F=d(),O=()=>{N(!1),C.current?.focus()};/* @__PURE__ */
8
+ /* @__PURE__ */f(i,{variant:"secondary",size:"sm","data-window-action":"cancel",onClick:()=>Q.current(),children:D.cancel}),
9
+ /* @__PURE__ */f(i,{variant:"primary",size:"sm","data-window-action":"apply",onClick:ue,disabled:C||""===se,children:D.apply})]})]})]})}function w({label:e,text:a,onTextChange:t,link:r,onLinkChange:i,kinds:s,rules:m,filtersFor:g,textPlaceholder:h,readOnly:b,className:x=""}){const y=u().link,[w,N]=p(!1),C=c(null),F=d(),O=()=>{N(!1),C.current?.focus()};/* @__PURE__ */
10
10
  return v("div",{className:`flex min-w-0 flex-auto flex-col ${x}`.trim(),children:[
11
11
  /* @__PURE__ */f(l,{size:"sm",type:"text",className:"rounded-b-none","aria-label":y.text(e),placeholder:h,value:a,readOnly:b,onChange:e=>t(e.target.value)}),
12
12
  /* @__PURE__ */v("button",{ref:C,type:"button","aria-label":y.linkOf(e,r),"aria-expanded":w,"aria-controls":w?F:void 0,disabled:b,onClick:()=>N(e=>!e),className:`flex w-full min-w-0 items-center gap-2 rounded-b-(--radius-control) border border-t-0 border-gray-300 bg-gray-50 ${n.sm} text-left hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring)] disabled:cursor-not-allowed disabled:opacity-60`,children:[
@@ -1,4 +1,4 @@
1
- import{Card as e}from"./chunk-RD5UPROC.js";import{Select_default as l}from"./chunk-OJ3RN3BG.js";import{Input_default as a}from"./chunk-UNEJ2ABD.js";import{FormField as r}from"./chunk-MVQBVPWP.js";import{Checkbox_default as i}from"./chunk-CGZBDI6C.js";import{Banner as c}from"./chunk-UWNL4FO2.js";import{Button_default as d}from"./chunk-FSP63GKK.js";import{useState as s}from"react";import{jsx as n,jsxs as t}from"react/jsx-runtime";var h=[{name:"Mechanical keyboard",qty:1,price:129},{name:"USB-C cable (2m)",qty:2,price:12},{name:"Laptop stand",qty:1,price:48}];function m(){const[m,o]=s(!0),[p,u]=s("us"),y=h.reduce((e,l)=>e+l.qty*l.price,0),g=y+9;/* @__PURE__ */
1
+ import{Card as e}from"./chunk-RD5UPROC.js";import{Select_default as l}from"./chunk-3S52QOEP.js";import{Input_default as a}from"./chunk-UNEJ2ABD.js";import{FormField as r}from"./chunk-MVQBVPWP.js";import{Checkbox_default as i}from"./chunk-CGZBDI6C.js";import{Banner as c}from"./chunk-UWNL4FO2.js";import{Button_default as d}from"./chunk-UDD7GB4F.js";import{useState as s}from"react";import{jsx as n,jsxs as t}from"react/jsx-runtime";var h=[{name:"Mechanical keyboard",qty:1,price:129},{name:"USB-C cable (2m)",qty:2,price:12},{name:"Laptop stand",qty:1,price:48}];function m(){const[m,o]=s(!0),[p,u]=s("us"),y=h.reduce((e,l)=>e+l.qty*l.price,0),g=y+9;/* @__PURE__ */
2
2
  return n("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */t("div",{className:"mx-auto max-w-5xl space-y-5",children:[
3
3
  /* @__PURE__ */n("h1",{className:"text-xl font-semibold text-gray-900",children:"Checkout"}),
4
4
  /* @__PURE__ */t("div",{className:"grid grid-cols-1 gap-5 lg:grid-cols-3",children:[
@@ -1,2 +1,2 @@
1
- import{PopupMenu as e,MenuSemanticsContext as t}from"./chunk-7IF3RZF3.js";import{leavesContextMenuAlone as n}from"./chunk-GZCAFWWB.js";import{placeAtPoint as r,popupBounds as o}from"./chunk-T53TXXOC.js";import{useBrowserLayoutEffect as l}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as i}from"./chunk-TWVUQUUD.js";import{useRef as c,useState as u,useEffect as s,useCallback as a}from"react";import{jsx as d}from"react/jsx-runtime";function m(e){return e?[...e.querySelectorAll("button:not([disabled])")].filter(e=>!e.closest("[data-popup-submenu-panel]")):[]}function f({at:n,onClose:f,children:p,owner:v,"aria-label":h,minWidth:w=180,className:y="",autoFocus:g=!0}){const E=c(null),[k,x]=u(null),b=c(f);b.current=f,l(()=>{const e=E.current?.closest("[data-popup-menu-tree]");if(!e)return;const t={width:e.offsetWidth,height:e.offsetHeight},l=r({point:n,menu:t,bounds:o(v??null)});x(e=>e&&e.left===l.left&&e.top===l.top&&e.maxHeight===l.maxHeight?e:{left:l.left,top:l.top,maxHeight:l.maxHeight,scroll:t.height>l.maxHeight})},[n.x,n.y,v]);const H=c(null),D=c(!1);s(()=>(H.current=document.activeElement,()=>{const e=document.activeElement;e&&e!==document.body&&!E.current?.contains(e)||H.current?.focus?.({preventScroll:!0})}),[]),s(()=>{k&&!D.current&&g&&(D.current=!0,m(E.current)[0]?.focus({preventScroll:!0}))},[k,g]),s(()=>{if(g)return;const e=e=>{if(E.current?.contains(document.activeElement))return;const t=m(E.current),n="ArrowDown"===e.key||"Home"===e.key?t[0]:"ArrowUp"===e.key||"End"===e.key?t[t.length-1]:void 0;n&&(e.preventDefault(),n.focus({preventScroll:!0}))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[g]),s(()=>i(e=>"Escape"===e.key&&(b.current(),!0),()=>E.current),[]),s(()=>{const e=()=>b.current();return window.addEventListener("resize",e),window.addEventListener("blur",e),window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("resize",e),window.removeEventListener("blur",e),window.removeEventListener("scroll",e,!0)}},[]);const L=a(e=>{if(e.target.closest("[data-popup-submenu-panel]"))return;if("Tab"===e.key)return e.preventDefault(),void b.current();const t=m(E.current);if(0===t.length)return;const n=t.indexOf(document.activeElement),r="ArrowDown"===e.key?(n+1)%t.length:"ArrowUp"===e.key?n<=0?t.length-1:n-1:"Home"===e.key?0:"End"===e.key?t.length-1:-1;r<0||(e.preventDefault(),t[r].focus())},[]),C=k?{left:k.left,top:k.top,maxHeight:k.maxHeight,...k.scroll?{overflowY:"auto"}:{}}:{left:n.x,top:n.y,visibility:"hidden"};/* @__PURE__ */
2
- return d(e,{portal:!0,minWidth:w,style:C,onClose:f,className:y,children:/* @__PURE__ */d(t.Provider,{value:!0,children:/* @__PURE__ */d("div",{ref:E,role:"menu","aria-label":h,"data-context-menu":"",onKeyDown:L,children:p})})})}function p(){const[e,t]=u(null),r=a(()=>t(null),[]),o=a((e,r)=>{const o="nativeEvent"in e?e.nativeEvent:e;if(n(o))return!1;e.preventDefault();const l=e.target instanceof Element?e.target:null;let{clientX:i,clientY:c}=e;if(0===i&&0===c&&l){const e=l.getBoundingClientRect();i=e.left,c=e.bottom}return t({x:i,y:c,data:r,owner:l}),!0},[]),l=a(e=>{o(e,void 0)},[o]);return{open:o,onContextMenu:l,close:r,state:e,props:{at:{x:e?.x??0,y:e?.y??0},owner:e?.owner??null,onClose:r}}}export{f as ContextMenu,p as useContextMenu};
1
+ import{PopupMenu as e,MenuSemanticsContext as t}from"./chunk-7IF3RZF3.js";import{leavesContextMenuAlone as n}from"./chunk-GZCAFWWB.js";import{placeAtPoint as r,popupBounds as o}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as l}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as i}from"./chunk-TWVUQUUD.js";import{useRef as c,useState as u,useEffect as s,useCallback as a}from"react";import{jsx as d}from"react/jsx-runtime";function m(e){return e?[...e.querySelectorAll("button:not([disabled])")].filter(e=>!e.closest("[data-popup-submenu-panel]")):[]}function f({at:n,onClose:f,children:p,owner:v,"aria-label":h,minWidth:w=180,className:y="",autoFocus:g=!0}){const E=c(null),[k,x]=u(null),b=c(f);b.current=f,l(()=>{const e=E.current?.closest("[data-popup-menu-tree]");if(!e)return;const t={width:e.offsetWidth,height:e.offsetHeight},l=r({point:n,menu:t,bounds:o(v??null)});x(e=>e&&e.left===l.left&&e.top===l.top&&e.maxHeight===l.maxHeight?e:{left:l.left,top:l.top,maxHeight:l.maxHeight,scroll:t.height>l.maxHeight})},[n.x,n.y,v]);const H=c(null),D=c(!1);s(()=>(H.current=document.activeElement,()=>{const e=document.activeElement;e&&e!==document.body&&!E.current?.contains(e)||H.current?.focus?.({preventScroll:!0})}),[]),s(()=>{k&&!D.current&&g&&(D.current=!0,m(E.current)[0]?.focus({preventScroll:!0}))},[k,g]),s(()=>{if(g)return;const e=e=>{if(E.current?.contains(document.activeElement))return;const t=m(E.current),n="ArrowDown"===e.key||"Home"===e.key?t[0]:"ArrowUp"===e.key||"End"===e.key?t[t.length-1]:void 0;n&&(e.preventDefault(),n.focus({preventScroll:!0}))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[g]),s(()=>i(e=>"Escape"===e.key&&(b.current(),!0),()=>E.current),[]),s(()=>{const e=()=>b.current();return window.addEventListener("resize",e),window.addEventListener("blur",e),window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("resize",e),window.removeEventListener("blur",e),window.removeEventListener("scroll",e,!0)}},[]);const L=a(e=>{if(e.target.closest("[data-popup-submenu-panel]"))return;if("Tab"===e.key)return e.preventDefault(),void b.current();const t=m(E.current);if(0===t.length)return;const n=t.indexOf(document.activeElement),r="ArrowDown"===e.key?(n+1)%t.length:"ArrowUp"===e.key?n<=0?t.length-1:n-1:"Home"===e.key?0:"End"===e.key?t.length-1:-1;r<0||(e.preventDefault(),t[r].focus())},[]),j=k?{left:k.left,top:k.top,maxHeight:k.maxHeight,...k.scroll?{overflowY:"auto"}:{}}:{left:n.x,top:n.y,visibility:"hidden"};/* @__PURE__ */
2
+ return d(e,{portal:!0,minWidth:w,style:j,onClose:f,className:y,children:/* @__PURE__ */d(t.Provider,{value:!0,children:/* @__PURE__ */d("div",{ref:E,role:"menu","aria-label":h,"data-context-menu":"",onKeyDown:L,children:p})})})}function p(){const[e,t]=u(null),r=a(()=>t(null),[]),o=a((e,r)=>{const o="nativeEvent"in e?e.nativeEvent:e;if(n(o))return!1;e.preventDefault();const l=e.target instanceof Element?e.target:null;let{clientX:i,clientY:c}=e;if(0===i&&0===c&&l){const e=l.getBoundingClientRect();i=e.left,c=e.bottom}return t({x:i,y:c,data:r,owner:l}),!0},[]),l=a(e=>{o(e,void 0)},[o]);return{open:o,onContextMenu:l,close:r,state:e,props:{at:{x:e?.x??0,y:e?.y??0},owner:e?.owner??null,onClose:r}}}export{f as ContextMenu,p as useContextMenu};
@@ -1,2 +1,2 @@
1
- import{Tooltip as e}from"./chunk-Z3WKHMVB.js";import{jsx as a,jsxs as l}from"react/jsx-runtime";function r({options:r,value:i,onChange:o,onClear:s,columns:t,captions:n=!1,label:c,className:d="","aria-labelledby":u}){/* @__PURE__ */
1
+ import{Tooltip as e}from"./chunk-2LXTJXWC.js";import{jsx as a,jsxs as l}from"react/jsx-runtime";function r({options:r,value:i,onChange:o,onClear:s,columns:t,captions:n=!1,label:c,className:d="","aria-labelledby":u}){/* @__PURE__ */
2
2
  return a("div",{role:"group","aria-label":u?void 0:c,"aria-labelledby":u,style:t?{gridTemplateColumns:`repeat(${t}, minmax(0, 1fr))`}:void 0,className:`grid gap-(--space-8) ${t?"":"grid-cols-[repeat(auto-fill,minmax(58px,1fr))]"} ${d}`.replace(/\s+/g," ").trim(),children:r.map(r=>{const t=r.value===i,c=/* @__PURE__ */l("button",{type:"button","aria-pressed":t,"aria-label":n?void 0:r.label,disabled:r.disabled||void 0,onClick:()=>{t?s?.():o(r.value)},className:`flex w-full min-w-0 flex-col items-center justify-center gap-(--space-4) rounded-(--radius-control) border transition-colors rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-strong)] disabled:cursor-not-allowed disabled:opacity-50 ${n?"px-(--space-4) py-(--space-8)":"p-(--space-4)"} ${t?"border-blue-600 bg-white text-blue-600 ring-2 ring-blue-400/40":"border-gray-200 bg-white text-gray-500 hover:bg-gray-50 hover:text-gray-700"}`,children:[r.picture,n&&/* @__PURE__ */a("span",{className:"max-w-full truncate text-2xs leading-4",children:r.label})]});return n?/* @__PURE__ */a("div",{className:"flex min-w-0",children:c},r.value):/* @__PURE__ */a(e,{content:r.label,describe:!1,className:"relative flex min-w-0",children:c},r.value)})})}export{r as PictureTiles};
@@ -1,2 +1,2 @@
1
- import{buttonClasses as e}from"./chunk-K7U4RWXJ.js";import{isAriaDisabled as a,swallowPress as r,describedByWith as i,OffWithReason as s}from"./chunk-ABJ4LWOW.js";import{SpinnerRing as l}from"./chunk-Q5MD3VY6.js";import{forwardRef as d,useId as n}from"react";import{jsxs as t,jsx as c}from"react/jsx-runtime";var o=d(function({variant:d="primary",size:o="md",loading:m=!1,leftIcon:p,rightIcon:b,block:f=!1,disabled:u,type:h="button",children:k,className:x="",disabledReason:y,onClick:N,pressed:v,"aria-disabled":g,"aria-describedby":j,...W},w){const z=n(),C=u||m,I=null!=y&&""!==y,J=C&&I,R=!C&&a(g),A=R&&I,B=J||A?z:void 0,D=/* @__PURE__ */t("button",{ref:w,type:h,disabled:C,"aria-busy":m||void 0,"aria-disabled":!!R||g,"aria-describedby":i(j,B),onClick:R?r:N,className:e({variant:d,size:o,block:f,pressed:v??(!0===W["aria-pressed"]||"true"===W["aria-pressed"]),className:x}),...W,children:[m?/* @__PURE__ */c(l,{className:"h-3.5 w-3.5",ink:""}):p,k,!m&&b]});return A?/* @__PURE__ */c(s,{reason:y,id:z,block:f,children:D}):J?/* @__PURE__ */t("span",{className:f?"flex w-full flex-col gap-1":"inline-flex flex-col items-start gap-1",children:[D,
2
- /* @__PURE__ */c("span",{id:B,className:"text-xs text-red-600",children:y})]}):D});export{o as Button_default};
1
+ import{buttonClasses as e}from"./chunk-K7U4RWXJ.js";import{isAriaDisabled as a,swallowPress as r,describedByWith as i,OffWithReason as s}from"./chunk-4TL3MRRE.js";import{SpinnerRing as l}from"./chunk-Q5MD3VY6.js";import{forwardRef as d,useId as n}from"react";import{jsxs as t,jsx as c}from"react/jsx-runtime";var o=d(function({variant:d="primary",size:o="md",loading:m=!1,leftIcon:p,rightIcon:b,block:f=!1,disabled:u,type:h="button",children:k,className:x="",disabledReason:y,onClick:N,pressed:v,"aria-disabled":g,"aria-describedby":j,...R},w){const z=n(),C=u||m,I=null!=y&&""!==y,M=C&&I,D=!C&&a(g),E=D&&I,J=M||E?z:void 0,K=/* @__PURE__ */t("button",{ref:w,type:h,disabled:C,"aria-busy":m||void 0,"aria-disabled":!!D||g,"aria-describedby":i(j,J),onClick:D?r:N,className:e({variant:d,size:o,block:f,pressed:v??(!0===R["aria-pressed"]||"true"===R["aria-pressed"]),className:x}),...R,children:[m?/* @__PURE__ */c(l,{className:"h-3.5 w-3.5",ink:""}):p,k,!m&&b]});return E?/* @__PURE__ */c(s,{reason:y,id:z,block:f,children:K}):M?/* @__PURE__ */t("span",{className:f?"flex w-full flex-col gap-1":"inline-flex flex-col items-start gap-1",children:[K,
2
+ /* @__PURE__ */c("span",{id:J,className:"text-xs text-red-600",children:y})]}):K});export{o as Button_default};
@@ -1,4 +1,4 @@
1
- import{InputNumber_default as e}from"./chunk-FDIJEOGV.js";import{IconButton_default as r}from"./chunk-JHDWTYZ4.js";import{Icon as a}from"./chunk-VJPJNCB4.js";import{Tooltip as i}from"./chunk-Z3WKHMVB.js";import{useShellStrings as n}from"./chunk-OVNRVFWS.js";import{useState as l,useRef as o}from"react";import{jsxs as t,jsx as s}from"react/jsx-runtime";var d={tl:"",tr:"rotate-90",br:"rotate-180",bl:"-rotate-90"},c=["tl","tr","bl","br"];function u({label:u,value:m,corners:f,onChange:p,radius:h=null,onRadiusChange:v,radiusLabel:b,radiusMin:k=0,radiusMax:g,radiusStep:x=1,radiusPlaceholder:w,disabled:y=!1,disabledReason:j,id:N,className:A=""}){const C=n(),D=function(e){const r=c.map(r=>e.find(e=>e.value===r));for(const a of e){if(c.includes(a.value))continue;const e=r.findIndex(e=>void 0===e);-1===e?r.push(a):r[e]=a}return r.filter(e=>void 0!==e)}(f),[K,M]=l(0),R=o(null);/* @__PURE__ */
2
- return t("div",{id:N,role:"group","aria-label":u,className:`flex min-w-0 flex-wrap items-center gap-2 ${A}`.trim(),children:[v&&
1
+ import{InputNumber_default as e}from"./chunk-SWSN3HZX.js";import{IconButton_default as r}from"./chunk-HMZLRXLA.js";import{Icon as a}from"./chunk-VJPJNCB4.js";import{Tooltip as i}from"./chunk-2LXTJXWC.js";import{useShellStrings as n}from"./chunk-OVNRVFWS.js";import{useState as l,useRef as o}from"react";import{jsxs as t,jsx as s}from"react/jsx-runtime";var d={tl:"",tr:"rotate-90",br:"rotate-180",bl:"-rotate-90"},c=["tl","tr","bl","br"];function u({label:u,value:m,corners:f,onChange:p,radius:h=null,onRadiusChange:v,radiusLabel:b,radiusMin:k=0,radiusMax:g,radiusStep:x=1,radiusPlaceholder:w,disabled:y=!1,disabledReason:N,id:j,className:A=""}){const C=n(),R=function(e){const r=c.map(r=>e.find(e=>e.value===r));for(const a of e){if(c.includes(a.value))continue;const e=r.findIndex(e=>void 0===e);-1===e?r.push(a):r[e]=a}return r.filter(e=>void 0!==e)}(f),[L,M]=l(0),S=o(null);/* @__PURE__ */
2
+ return t("div",{id:j,role:"group","aria-label":u,className:`flex min-w-0 flex-wrap items-center gap-2 ${A}`.trim(),children:[v&&
3
3
  /* @__PURE__ */s("div",{className:"w-30 shrink-0",children:/* @__PURE__ */s(e,{value:h,onChange:v,min:k,max:g,step:x,precision:0,placeholder:w,prefix:/* @__PURE__ */s("span",{"data-radius-mark":"","aria-hidden":"true",children:C.corners.radiusMark}),suffix:C.corners.unit,steppers:"compact",disabled:y,"aria-label":b??C.corners.radius})}),
4
- /* @__PURE__ */s("div",{ref:R,"data-corners-grid":"",className:"grid shrink-0 grid-cols-2 gap-1",onKeyDown:e=>{if(e.altKey||e.ctrlKey||e.metaKey)return;const r=Array.from(R.current?.querySelectorAll("button[data-corner]")??[]),a=r.indexOf(document.activeElement);if(-1===a)return;const i=a%2,n=Math.floor(a/2),l="ArrowRight"===e.key?2*n+1:"ArrowLeft"===e.key?2*n:"ArrowDown"===e.key?2+i:"ArrowUp"===e.key?i:null;null!==l&&(e.preventDefault(),l<r.length&&r[l].focus())},children:D.map((e,n)=>{const l=m.includes(e.value),o=y||!0===e.disabled,t=o&&(!0===e.disabled&&e.title||(y?j:void 0))||void 0,c=/* @__PURE__ */s(r,{"aria-pressed":l,"aria-label":e.label,"aria-disabled":o||void 0,disabledReason:t,"data-corner":e.value,size:"sm",tabIndex:n===K?0:-1,onFocus:()=>M(n),onClick:()=>{o||p(l?m.filter(r=>r!==e.value):[...m,e.value])},children:/* @__PURE__ */s(a,{name:"corner",strokeWidth:2,className:["h-4 w-4",d[e.value]??""].filter(Boolean).join(" ")})},e.value);return t?c:/* @__PURE__ */s(i,{content:e.title??e.label,children:c},e.value)})})]})}export{u as CornersInput};
4
+ /* @__PURE__ */s("div",{ref:S,"data-corners-grid":"",className:"grid shrink-0 grid-cols-2 gap-1",onKeyDown:e=>{if(e.altKey||e.ctrlKey||e.metaKey)return;const r=Array.from(S.current?.querySelectorAll("button[data-corner]")??[]),a=r.indexOf(document.activeElement);if(-1===a)return;const i=a%2,n=Math.floor(a/2),l="ArrowRight"===e.key?2*n+1:"ArrowLeft"===e.key?2*n:"ArrowDown"===e.key?2+i:"ArrowUp"===e.key?i:null;null!==l&&(e.preventDefault(),l<r.length&&r[l].focus())},children:R.map((e,n)=>{const l=m.includes(e.value),o=y||!0===e.disabled,t=o&&(!0===e.disabled&&e.title||(y?N:void 0))||void 0,c=/* @__PURE__ */s(r,{"aria-pressed":l,"aria-label":e.label,"aria-disabled":o||void 0,disabledReason:t,"data-corner":e.value,size:"sm",tabIndex:n===L?0:-1,onFocus:()=>M(n),onClick:()=>{o||p(l?m.filter(r=>r!==e.value):[...m,e.value])},children:/* @__PURE__ */s(a,{name:"corner",strokeWidth:2,className:["h-4 w-4",d[e.value]??""].filter(Boolean).join(" ")})},e.value);return t?c:/* @__PURE__ */s(i,{content:e.title??e.label,children:c},e.value)})})]})}export{u as CornersInput};
@@ -1,4 +1,4 @@
1
- import{TH_ONE_LINE as r}from"./chunk-QMQVOUIV.js";import{jsxs as e,jsx as c}from"react/jsx-runtime";function n({caption:n,head:t,rows:i}){/* @__PURE__ */
1
+ import{TH_ONE_LINE as r}from"./chunk-7T3COEQK.js";import{jsxs as e,jsx as c}from"react/jsx-runtime";function n({caption:n,head:t,rows:i}){/* @__PURE__ */
2
2
  return e("table",{className:"sr-only",children:[
3
3
  /* @__PURE__ */c("caption",{children:n}),
4
4
  /* @__PURE__ */c("thead",{children:/* @__PURE__ */c("tr",{children:t.map(e=>/* @__PURE__ */c("th",{className:r,scope:"col",children:e},e))})}),
@@ -0,0 +1,8 @@
1
+ import{AccessibleTable as t}from"./chunk-X3II54HU.js";import{arcPath as e}from"./chunk-VFC6QUEN.js";import{useHighlight as o}from"./chunk-CNYAHYE6.js";import{ChartTooltip as n}from"./chunk-P5BOTIJU.js";import{CHART_INK as r,resolveSeriesColor as a}from"./chunk-TZFACUMR.js";import{useShellStrings as l,useShellLocale as s}from"./chunk-OVNRVFWS.js";import{formatPlain as i}from"./chunk-C3QOHMR6.js";import{useState as c}from"react";import{jsx as d,jsxs as m}from"react/jsx-runtime";function h(t,e,o,n){const r=(t,o)=>{const n=e[t]?.[o];return"number"==typeof n&&Number.isFinite(n)?n:0},a=t.map((e,o)=>t.reduce((t,e,n)=>t+r(o,n)+r(n,o),0)),l=Math.max(2,o),s=t.length>l,i=s?t.map((t,e)=>e).sort((t,e)=>a[e]-a[t]).slice(0,l-1).sort((t,e)=>t-e):t.map((t,e)=>e),c=new Map(i.map((t,e)=>[t,e])),d=s?i.length:-1,m=s?[...i.map(e=>t[e]),n]:[...t],h=m.map(()=>m.map(()=>0));let u=0;t.forEach((e,o)=>t.forEach((t,e)=>{const n=c.get(o)??d,a=c.get(e)??d;n!==d||a!==d?h[n][a]+=r(o,e):u+=r(o,e)}));const f=m.map((t,e)=>m.reduce((t,o,n)=>t+h[e][n]+h[n][e],0));return d>=0&&(f[d]+=u),{labels:m,matrix:h,totals:f,otherIndex:d,foldedCount:s?t.length-i.length:0}}function u({labels:u,matrix:f,size:p=340,maxNodes:x=8,padAngle:g=.04,arcWidth:b=12,formatValue:v,className:k,emptyLabel:M}){const $=l().charts,w=s(),N=v??(t=>i(t,w)),y=M??$.noFlows,[j,F]=c(null),{highlighted:E}=o(),I=h(u,f,x,$.other),{labels:C,matrix:O,otherIndex:z,foldedCount:A}=I,U=(t,e)=>O[t]?.[e]??0,V=t=>t===z?r.muted:a(t),H=I.totals,L=C.map((t,e)=>e).sort((t,e)=>H[e]-H[t]),P=L.reduce((t,e)=>t+H[e],0);if(P<=0)/* @__PURE__ */return d("p",{className:`text-sm text-gray-500 ${k??""}`,children:y});const Q=p/2,R=p/2,T=p/2-44,W=T-b,B=g*L.length,S=/* @__PURE__ */new Map;let Y=-Math.PI/2;L.forEach((t,e)=>{const o=H[t]/P*(2*Math.PI-B);S.set(t,{start:Y,end:Y+o,slot:e}),Y+=o+g});const J=/* @__PURE__ */new Map,X=[];for(const t of L)for(const e of L){const o=U(t,e);if(o<=0)continue;const n=S.get(t),r=o/Math.max(1,H[t])*(n.end-n.start),a=J.get(t)??0;J.set(t,a+r),X.push({from:t,to:e,value:o,a:n.start+a+r/2,b:S.get(e).start+(S.get(e).end-S.get(e).start)/2})}const Z=(t,e)=>[Q+e*Math.cos(t),R+e*Math.sin(t)],q="arc"===j?.kind?j.index:void 0,D="ribbon"===j?.kind?X[j.index]:void 0;/* @__PURE__ */
2
+ return m("div",{className:`relative ${k??""}`,children:[
3
+ /* @__PURE__ */m("svg",{width:"100%",height:p,viewBox:`0 0 ${p} ${p}`,role:"img","aria-label":$.chord(L.length),onMouseLeave:()=>F(null),children:[X.map((t,e)=>{const[o,n]=Z(t.a,W),[r,a]=Z(t.b,W),l=V(t.from),s=((t,e)=>j?"ribbon"===j.kind?j.index===e:j.index===t.from||j.index===t.to:null!==E?C[t.from]===E||C[t.to]===E:null)(t,e);/* @__PURE__ */
4
+ return d("path",{d:`M${o},${n} Q${Q},${R} ${r},${a}`,fill:"none",stroke:l,strokeWidth:Math.max(1,t.value/P*p*.9),strokeOpacity:null===s||s?.34:.07,strokeLinecap:"round",onMouseEnter:()=>F({kind:"ribbon",index:e})},`${C[t.from]}→${C[t.to]}`)}),L.map(t=>{const o=S.get(t),n=(o.start+o.end)/2,[a,l]=Z(n,T+16),s=(t=>j?"arc"===j.kind?j.index===t:X[j.index].from===t||X[j.index].to===t:null!==E?C[t]===E:null)(t);/* @__PURE__ */
5
+ return m("g",{onMouseEnter:()=>F({kind:"arc",index:t}),children:[
6
+ /* @__PURE__ */d("path",{d:e(Q,R,W,T,o.start,o.end),fill:V(t),fillOpacity:null===s||s?1:.45}),
7
+ /* @__PURE__ */d("text",{x:a,y:l+4,fontSize:11,fill:r.label,textAnchor:Math.cos(n)>.15?"start":Math.cos(n)<-.15?"end":"middle",children:C[t]})]},t)})]}),A>0&&/* @__PURE__ */d("p",{className:"mt-1 text-xs text-gray-500",children:$.chordFolded(A)}),void 0!==q&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(n,{title:C[q],rows:[{key:"total",label:$.totalFlow,color:V(q),value:N(H[q])}]})}),D&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(n,{title:`${C[D.from]} → ${C[D.to]}`,rows:[{key:"value",label:$.flow,color:V(D.from),value:N(D.value)}]})}),
8
+ /* @__PURE__ */d(t,{caption:$.chord(L.length),head:[$.tableFrom,$.tableTo,$.value],rows:X.map(t=>[C[t.from],C[t.to],N(t.value)])})]})}export{u as ChordChart,h as foldChord};
@@ -1,19 +1,19 @@
1
- import{escapeHtml as e}from"./chunk-BR22X7E5.js";import{TH_ONE_LINE as t}from"./chunk-QMQVOUIV.js";import{useBrowserLayoutEffect as n}from"./chunk-D65T4H6J.js";import{useShellStrings as r}from"./chunk-OVNRVFWS.js";import{useRef as o,useState as l,useEffect as c,useCallback as a,useMemo as s}from"react";import{createPortal as i}from"react-dom";import{jsxs as u,jsx as h,Fragment as d}from"react/jsx-runtime";function w(e,t){const n=e[e.length-1];return n&&!n.some(e=>e.trim())?e:[...e,Array(t).fill("")]}function g({text:t,...n}){const r=s(()=>({__html:e(t)}),[t]);/* @__PURE__ */
2
- return h("div",{...n,dangerouslySetInnerHTML:r})}function m({columns:e,data:m,onChange:p,onColumnsChange:f,fixedRows:y=!1,minRows:b=15,maxHeight:v="260px",cellStyles:x,onFocusChange:M,onSelectionChange:D}){const k=o(null),C=r().grid,[E,S]=l(null);c(()=>{M?.(E)},[E,M]);const[$,L]=l({}),N=o(null),[z,A]=l({}),O=o(null),[R,T]=l(null),[K,F]=l(null),[P,I]=l(null),[X,j]=l(null),[H,Y]=l(null),V=o(null);n(()=>{const e=V.current;if(!e||e.row!==H?.row||e.col!==H?.col)return;V.current=null;const t=k.current?.querySelector(`[data-row="${e.row}"][data-col="${e.col}"]`);if(!t)return;t.focus();const n=document.createRange();n.selectNodeContents(t),n.collapse(!1);const r=window.getSelection();r?.removeAllRanges(),r?.addRange(n)},[H]);const[W,q]=l(null),[B,Q]=l(null);c(()=>{D?.(W&&B?{anchor:W,end:B}:null)},[W,B,D]);const U=o(!1),[_,J]=l(null),G=o(!1),Z=o({a:null,e:null});Z.current={a:W,e:B};const ee=W&&B&&(W.row!==B.row||W.col!==B.col),te=[...m];if(!y)for(;te.length<b;)te.push(Array(e.length).fill(""));const ne=a((t,n,r)=>{const o=te.map(e=>[...e]);for(;o.length<=t;)o.push(Array(e.length).fill(""));for(;o[t].length<e.length;)o[t].push("");o[t][n]=r,p(o)},[te,e.length,p]),re=a((e,t,n)=>{if(0!==e.button)return;const r=document.activeElement;if(r?.dataset?.row&&r?.dataset?.col){const e=parseInt(r.dataset.row),t=parseInt(r.dataset.col),n=r.textContent||"";if(n!==(te[e]?.[t]||"")){const r=te.map(e=>[...e]);r[e]&&(r[e][t]=n,p(r))}}U.current=!0,e.shiftKey&&W||q({row:t,col:n}),Q({row:t,col:n})},[te,p,W]),oe=a((e,t)=>{U.current&&Q({row:e,col:t})},[]);c(()=>{const e=()=>{U.current=!1};return window.addEventListener("mouseup",e),()=>window.removeEventListener("mouseup",e)},[]),c(()=>{const e=e=>{if(!e.ctrlKey&&!e.metaKey||"c"!==e.key)return;if(!W||!B)return;const t=window.getSelection();if(t&&t.toString().length>0&&!ee)return;const n=Math.min(W.row,B.row),r=Math.max(W.row,B.row),o=Math.min(W.col,B.col),l=Math.max(W.col,B.col),c=[];for(let e=n;e<=r;e++){const t=[];for(let n=o;n<=l;n++)t.push(te[e]?.[n]||"");c.push(t.join("\t"))}const a=c.join("\n");a&&(e.preventDefault(),navigator.clipboard.writeText(a))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[W,B,te,ee]),c(()=>{const t=t=>{if(!E)return;const n=document.activeElement;if(n?.isContentEditable)return;if(!k.current?.contains(n))return;const r=t.clipboardData?.getData("text/plain");if(!r)return;t.preventDefault();const o=r.split("\n").filter(e=>e).map(e=>e.split("\t")),l=te.map(e=>[...e]);for(let t=0;t<o.length;t++){const n=E.row+t;for(;l.length<=n;)l.push(Array(e.length).fill(""));for(;l[n].length<e.length;)l[n].push("");for(let r=0;r<o[t].length;r++){const c=E.col+r;if(c>=e.length)break;e[c].readOnly||(l[n][c]=o[t][r].trim())}}p(y?l:w(l,e.length)),q({row:E.row,col:E.col}),Q({row:Math.min(E.row+o.length-1,l.length-1),col:Math.min(E.col+(o[0]?.length||1)-1,e.length-1)})};return window.addEventListener("paste",t),()=>window.removeEventListener("paste",t)},[E,te,e,p,y]);const le=a((t,n,r)=>{const o=t.clipboardData.getData("text/plain");if(!o)return;const l=o.split("\n").map(e=>e.split("\t"));if(l.length<=1&&l[0]?.length<=1)return;t.preventDefault();const c=te.map(e=>[...e]);for(let t=0;t<l.length;t++){const o=n+t;for(;c.length<=o;)c.push(Array(e.length).fill(""));for(;c[o].length<e.length;)c[o].push("");for(let n=0;n<l[t].length;n++){const a=r+n;if(a>=e.length)break;e[a].readOnly||(c[o][a]=l[t][n].trim())}}p(y?c:w(c,e.length))},[te,e,p,y]),ce=a((t,n,r)=>{let o=n,l=r;if("Tab"===t.key)t.preventDefault(),l=t.shiftKey?r-1:r+1,l>=e.length&&(l=0,o=n+1),l<0&&(l=e.length-1,o=n-1);else if("Enter"===t.key)t.preventDefault(),o=t.shiftKey?n-1:n+1;else if("ArrowDown"===t.key)t.preventDefault(),o=n+1;else if("ArrowUp"===t.key)t.preventDefault(),o=n-1;else if("ArrowLeft"===t.key)t.preventDefault(),l=r-1;else{if("ArrowRight"!==t.key){if("Delete"===t.key||"Backspace"===t.key){const o=t.target;if(o.isContentEditable)return void(o.textContent&&window.getSelection()?.toString()===o.textContent&&(t.preventDefault(),ne(n,r,"")));if(t.preventDefault(),W&&B){const t=Math.min(W.row,B.row),n=Math.max(W.row,B.row),r=Math.min(W.col,B.col),o=Math.max(W.col,B.col),l=te.map(e=>[...e]);for(let c=t;c<=n;c++)for(let t=r;t<=o;t++)l[c]&&!e[t]?.readOnly&&(l[c][t]="");p(l)}else ne(n,r,"");return}return}t.preventDefault(),l=r+1}for(;l>=0&&l<e.length&&e[l].readOnly;)l+="Tab"===t.key&&t.shiftKey?-1:1;if(o>=0&&o<te.length&&l>=0&&l<e.length){const e=k.current?.querySelector(`[data-row="${o}"][data-col="${l}"]`);e&&(e.focus({preventScroll:!0}),e.scrollIntoView({block:"nearest",inline:"nearest"}),S({row:o,col:l}),Y(null),q({row:o,col:l}),Q({row:o,col:l}))}},[e,te,te.length,ne,W,B,p]),ae=a(t=>{if(!y&&t>=te.length-2){const t=te.map(e=>[...e]);for(let n=0;n<5;n++)t.push(Array(e.length).fill(""));p(t)}},[y,te,e.length,p]),[se,ie]=l(null);c(()=>{if(!se)return;const e=()=>ie(null);return window.addEventListener("pointerdown",e),()=>window.removeEventListener("pointerdown",e)},[se]);const ue=a(t=>{const n=te.map(e=>[...e]);n.splice(t,0,Array(e.length).fill("")),p(n)},[te,e.length,p]),he=a(e=>{if(te.length<=1)return;const t=te.filter((t,n)=>n!==e);p(t)},[te,p]),de=a(e=>{const t=te.map(t=>{const n=[...t];return n.splice(e,0,""),n});p(t)},[te,p]),we=a(t=>{if(e.length<=1)return;const n=te.map(e=>{const n=[...e];return n.splice(t,1),n});p(n)},[te,e.length,p]),ge=a((e,t)=>{e.preventDefault(),y||ie({x:e.clientX,y:e.clientY,items:[{label:C.insertRowAbove,onClick:()=>{ue(t),ie(null)}},{label:C.insertRowBelow,onClick:()=>{ue(t+1),ie(null)}},{label:C.deleteRow(t+1),onClick:()=>{he(t),ie(null)}}]})},[y,ue,he,C]),me=a((t,n)=>{t.preventDefault(),y||ie({x:t.clientX,y:t.clientY,items:[{label:C.insertColumnLeft,onClick:()=>{de(n),ie(null)}},{label:C.insertColumnRight,onClick:()=>{de(n+1),ie(null)}},{label:C.deleteColumn(String(e[n]?.title||n+1)),onClick:()=>{we(n),ie(null)}}]})},[y,e,de,we,C]),pe=t=>$[t]??e[t]?.width??150;c(()=>{const t=e=>{if(!N.current)return;const t=e.clientX-N.current.startX,n=Math.max(40,N.current.startW+t);L(e=>({...e,[N.current.col]:n}))},n=()=>{if(N.current&&f){const t=e.map((e,t)=>({...e,width:$[t]??e.width}));t[N.current.col]={...t[N.current.col],width:$[N.current.col]??e[N.current.col].width},f(t)}N.current=null,document.body.style.cursor=""};return window.addEventListener("mousemove",t),window.addEventListener("mouseup",n),()=>{window.removeEventListener("mousemove",t),window.removeEventListener("mouseup",n)}},[e,$,f]);const fe=e=>z[e]??28;c(()=>{const e=e=>{if(!O.current)return;const t=e.clientY-O.current.startY,n=Math.max(20,O.current.startH+t);A(e=>({...e,[O.current.row]:n}))},t=()=>{O.current=null,document.body.style.cursor=""};return window.addEventListener("mousemove",e),window.addEventListener("mouseup",t),()=>{window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",t)}},[]);const ye=a(t=>{const n=document.createElement("canvas").getContext("2d");if(!n)return;n.font="12px ui-monospace, SFMono-Regular, Menlo, monospace";let r=0;for(const e of te){const o=String(e[t]??"").replace(/<[^>]*>/g,""),l=n.measureText(o).width;l>r&&(r=l)}const o=n.measureText(e[t]?.title??"").width;o>r&&(r=o);const l=Math.max(40,Math.ceil(r+24));if(L(e=>({...e,[t]:l})),f){const n=e.map((e,n)=>({...e,width:n===t?l:$[n]??e.width}));f(n)}},[te,e,$,f]),be=a(e=>{A(t=>{const n={...t};return delete n[e],n})},[]),ve=a(t=>{const{a:n,e:r}=Z.current;if(!n||!r)return;const o=Math.min(n.row,r.row),l=Math.max(n.row,r.row),c=Math.min(n.col,r.col),a=Math.max(n.col,r.col);let s=o,i=l,u=c,h=a;t.row>l?i=t.row:t.row<o&&(s=t.row),t.col>a?h=t.col:t.col<c&&(u=t.col);const d=l-o+1,w=a-c+1,g=te.map(e=>[...e]);for(;g.length<=i;)g.push(Array(e.length).fill(""));for(const e of g)for(;e.length<=h;)e.push("");function m(e){const t=e.map(e=>parseFloat(e));if(t.length<2||t.some(e=>Number.isNaN(e)))return null;const n=t[1]-t[0];for(let e=2;e<t.length;e++)if(Math.abs(t[e]-t[e-1]-n)>1e-9)return null;return{step:n}}for(let e=s;e<=i;e++)for(let t=u;t<=h;t++){if(e>=o&&e<=l&&t>=c&&t<=a)continue;let n;if(1===w&&u===c&&h===a){const r=m(Array.from({length:d},(e,n)=>g[o+n]?.[t]??""));if(r){const c=parseFloat(g[l]?.[t]??"0"),a=parseFloat(g[o]?.[t]??"0"),s=e>l?e-l:-(o-e);n=String((e>l?c:a)+r.step*s)}else{const r=((e-o)%d+d)%d;n=g[o+r]?.[t]??""}}else if(1===d&&s===o&&i===l){const r=m(Array.from({length:w},(t,n)=>g[e]?.[c+n]??""));if(r){const o=parseFloat(g[e]?.[a]??"0"),l=parseFloat(g[e]?.[c]??"0"),s=t>a?t-a:-(c-t);n=String((t>a?o:l)+r.step*s)}else{const r=((t-c)%w+w)%w;n=g[e]?.[c+r]??""}}else{const r=((e-o)%d+d)%d,l=((t-c)%w+w)%w;n=g[o+r]?.[c+l]??""}g[e][t]=n}p(g),q({row:s,col:u}),Q({row:i,col:h})},[te,e.length,p]);c(()=>{const e=e=>{if(!G.current)return;const t=document.elementFromPoint(e.clientX,e.clientY),n=t?.closest?.("[data-row][data-col]");if(!n)return;const r=parseInt(n.dataset.row),o=parseInt(n.dataset.col);J({row:r,col:o})},t=()=>{G.current&&_&&ve(_),G.current=!1,J(null),document.body.style.cursor=""};return window.addEventListener("mousemove",e),window.addEventListener("mouseup",t),()=>{window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",t)}},[_,ve]);const xe=e=>{e.preventDefault(),e.stopPropagation(),G.current=!0,document.body.style.cursor="crosshair"},Me=o(null),[De,ke]=l(0),[Ce,Ee]=l(800);c(()=>{const e=Me.current;if(!e)return;const t=()=>Ee(e.clientHeight||800);t();const n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[]);const Se=te.length>100,$e=Se?Math.max(0,Math.floor(De/28)-20):0,Le=Se?Math.min(te.length,Math.ceil((De+Ce)/28)+20):te.length,Ne=s(()=>te.slice($e,Le),[te,$e,Le]),ze=28*$e,Ae=28*(te.length-Le),Oe="px-2 h-8 text-left text-xs font-medium text-gray-500 uppercase bg-gray-100 border-b border-r border-gray-200 select-none";/* @__PURE__ */
1
+ import{escapeHtml as e}from"./chunk-BR22X7E5.js";import{TH_ONE_LINE as t}from"./chunk-7T3COEQK.js";import{useBrowserLayoutEffect as n}from"./chunk-D65T4H6J.js";import{useShellStrings as r}from"./chunk-OVNRVFWS.js";import{useRef as o,useState as l,useEffect as c,useCallback as a,useMemo as s}from"react";import{createPortal as i}from"react-dom";import{jsxs as u,jsx as h,Fragment as d}from"react/jsx-runtime";function w(e,t){const n=e[e.length-1];return n&&!n.some(e=>e.trim())?e:[...e,Array(t).fill("")]}function g({text:t,...n}){const r=s(()=>({__html:e(t)}),[t]);/* @__PURE__ */
2
+ return h("div",{...n,dangerouslySetInnerHTML:r})}function m({columns:e,data:m,onChange:p,onColumnsChange:f,fixedRows:y=!1,minRows:b=15,maxHeight:v="260px",cellStyles:x,onFocusChange:M,onSelectionChange:D}){const k=o(null),C=r().grid,[E,S]=l(null);c(()=>{M?.(E)},[E,M]);const[$,L]=l({}),N=o(null),[z,A]=l({}),O=o(null),[T,R]=l(null),[K,F]=l(null),[P,I]=l(null),[X,j]=l(null),[H,Y]=l(null),W=o(null);n(()=>{const e=W.current;if(!e||e.row!==H?.row||e.col!==H?.col)return;W.current=null;const t=k.current?.querySelector(`[data-row="${e.row}"][data-col="${e.col}"]`);if(!t)return;t.focus();const n=document.createRange();n.selectNodeContents(t),n.collapse(!1);const r=window.getSelection();r?.removeAllRanges(),r?.addRange(n)},[H]);const[q,B]=l(null),[V,_]=l(null);c(()=>{D?.(q&&V?{anchor:q,end:V}:null)},[q,V,D]);const J=o(!1),[Q,U]=l(null),G=o(!1),Z=o({a:null,e:null});Z.current={a:q,e:V};const ee=q&&V&&(q.row!==V.row||q.col!==V.col),te=[...m];if(!y)for(;te.length<b;)te.push(Array(e.length).fill(""));const ne=a((t,n,r)=>{const o=te.map(e=>[...e]);for(;o.length<=t;)o.push(Array(e.length).fill(""));for(;o[t].length<e.length;)o[t].push("");o[t][n]=r,p(o)},[te,e.length,p]),re=a((e,t,n)=>{if(0!==e.button)return;const r=document.activeElement;if(r?.dataset?.row&&r?.dataset?.col){const e=parseInt(r.dataset.row),t=parseInt(r.dataset.col),n=r.textContent||"";if(n!==(te[e]?.[t]||"")){const r=te.map(e=>[...e]);r[e]&&(r[e][t]=n,p(r))}}J.current=!0,e.shiftKey&&q||B({row:t,col:n}),_({row:t,col:n})},[te,p,q]),oe=a((e,t)=>{J.current&&_({row:e,col:t})},[]);c(()=>{const e=()=>{J.current=!1};return window.addEventListener("mouseup",e),()=>window.removeEventListener("mouseup",e)},[]),c(()=>{const e=e=>{if(!e.ctrlKey&&!e.metaKey||"c"!==e.key)return;if(!q||!V)return;const t=window.getSelection();if(t&&t.toString().length>0&&!ee)return;const n=Math.min(q.row,V.row),r=Math.max(q.row,V.row),o=Math.min(q.col,V.col),l=Math.max(q.col,V.col),c=[];for(let e=n;e<=r;e++){const t=[];for(let n=o;n<=l;n++)t.push(te[e]?.[n]||"");c.push(t.join("\t"))}const a=c.join("\n");a&&(e.preventDefault(),navigator.clipboard.writeText(a))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[q,V,te,ee]),c(()=>{const t=t=>{if(!E)return;const n=document.activeElement;if(n?.isContentEditable)return;if(!k.current?.contains(n))return;const r=t.clipboardData?.getData("text/plain");if(!r)return;t.preventDefault();const o=r.split("\n").filter(e=>e).map(e=>e.split("\t")),l=te.map(e=>[...e]);for(let t=0;t<o.length;t++){const n=E.row+t;for(;l.length<=n;)l.push(Array(e.length).fill(""));for(;l[n].length<e.length;)l[n].push("");for(let r=0;r<o[t].length;r++){const c=E.col+r;if(c>=e.length)break;e[c].readOnly||(l[n][c]=o[t][r].trim())}}p(y?l:w(l,e.length)),B({row:E.row,col:E.col}),_({row:Math.min(E.row+o.length-1,l.length-1),col:Math.min(E.col+(o[0]?.length||1)-1,e.length-1)})};return window.addEventListener("paste",t),()=>window.removeEventListener("paste",t)},[E,te,e,p,y]);const le=a((t,n,r)=>{const o=t.clipboardData.getData("text/plain");if(!o)return;const l=o.split("\n").map(e=>e.split("\t"));if(l.length<=1&&l[0]?.length<=1)return;t.preventDefault();const c=te.map(e=>[...e]);for(let t=0;t<l.length;t++){const o=n+t;for(;c.length<=o;)c.push(Array(e.length).fill(""));for(;c[o].length<e.length;)c[o].push("");for(let n=0;n<l[t].length;n++){const a=r+n;if(a>=e.length)break;e[a].readOnly||(c[o][a]=l[t][n].trim())}}p(y?c:w(c,e.length))},[te,e,p,y]),ce=a((t,n,r)=>{let o=n,l=r;if("Tab"===t.key)t.preventDefault(),l=t.shiftKey?r-1:r+1,l>=e.length&&(l=0,o=n+1),l<0&&(l=e.length-1,o=n-1);else if("Enter"===t.key)t.preventDefault(),o=t.shiftKey?n-1:n+1;else if("ArrowDown"===t.key)t.preventDefault(),o=n+1;else if("ArrowUp"===t.key)t.preventDefault(),o=n-1;else if("ArrowLeft"===t.key)t.preventDefault(),l=r-1;else{if("ArrowRight"!==t.key){if("Delete"===t.key||"Backspace"===t.key){const o=t.target;if(o.isContentEditable)return void(o.textContent&&window.getSelection()?.toString()===o.textContent&&(t.preventDefault(),ne(n,r,"")));if(t.preventDefault(),q&&V){const t=Math.min(q.row,V.row),n=Math.max(q.row,V.row),r=Math.min(q.col,V.col),o=Math.max(q.col,V.col),l=te.map(e=>[...e]);for(let c=t;c<=n;c++)for(let t=r;t<=o;t++)l[c]&&!e[t]?.readOnly&&(l[c][t]="");p(l)}else ne(n,r,"");return}return}t.preventDefault(),l=r+1}for(;l>=0&&l<e.length&&e[l].readOnly;)l+="Tab"===t.key&&t.shiftKey?-1:1;if(o>=0&&o<te.length&&l>=0&&l<e.length){const e=k.current?.querySelector(`[data-row="${o}"][data-col="${l}"]`);e&&(e.focus({preventScroll:!0}),e.scrollIntoView({block:"nearest",inline:"nearest"}),S({row:o,col:l}),Y(null),B({row:o,col:l}),_({row:o,col:l}))}},[e,te,te.length,ne,q,V,p]),ae=a(t=>{if(!y&&t>=te.length-2){const t=te.map(e=>[...e]);for(let n=0;n<5;n++)t.push(Array(e.length).fill(""));p(t)}},[y,te,e.length,p]),[se,ie]=l(null);c(()=>{if(!se)return;const e=()=>ie(null);return window.addEventListener("pointerdown",e),()=>window.removeEventListener("pointerdown",e)},[se]);const ue=a(t=>{const n=te.map(e=>[...e]);n.splice(t,0,Array(e.length).fill("")),p(n)},[te,e.length,p]),he=a(e=>{if(te.length<=1)return;const t=te.filter((t,n)=>n!==e);p(t)},[te,p]),de=a(e=>{const t=te.map(t=>{const n=[...t];return n.splice(e,0,""),n});p(t)},[te,p]),we=a(t=>{if(e.length<=1)return;const n=te.map(e=>{const n=[...e];return n.splice(t,1),n});p(n)},[te,e.length,p]),ge=a((e,t)=>{e.preventDefault(),y||ie({x:e.clientX,y:e.clientY,items:[{label:C.insertRowAbove,onClick:()=>{ue(t),ie(null)}},{label:C.insertRowBelow,onClick:()=>{ue(t+1),ie(null)}},{label:C.deleteRow(t+1),onClick:()=>{he(t),ie(null)}}]})},[y,ue,he,C]),me=a((t,n)=>{t.preventDefault(),y||ie({x:t.clientX,y:t.clientY,items:[{label:C.insertColumnLeft,onClick:()=>{de(n),ie(null)}},{label:C.insertColumnRight,onClick:()=>{de(n+1),ie(null)}},{label:C.deleteColumn(String(e[n]?.title||n+1)),onClick:()=>{we(n),ie(null)}}]})},[y,e,de,we,C]),pe=t=>$[t]??e[t]?.width??150;c(()=>{const t=e=>{if(!N.current)return;const t=e.clientX-N.current.startX,n=Math.max(40,N.current.startW+t);L(e=>({...e,[N.current.col]:n}))},n=()=>{if(N.current&&f){const t=e.map((e,t)=>({...e,width:$[t]??e.width}));t[N.current.col]={...t[N.current.col],width:$[N.current.col]??e[N.current.col].width},f(t)}N.current=null,document.body.style.cursor=""};return window.addEventListener("mousemove",t),window.addEventListener("mouseup",n),()=>{window.removeEventListener("mousemove",t),window.removeEventListener("mouseup",n)}},[e,$,f]);const fe=e=>z[e]??28;c(()=>{const e=e=>{if(!O.current)return;const t=e.clientY-O.current.startY,n=Math.max(20,O.current.startH+t);A(e=>({...e,[O.current.row]:n}))},t=()=>{O.current=null,document.body.style.cursor=""};return window.addEventListener("mousemove",e),window.addEventListener("mouseup",t),()=>{window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",t)}},[]);const ye=a(t=>{const n=document.createElement("canvas").getContext("2d");if(!n)return;n.font="12px ui-monospace, SFMono-Regular, Menlo, monospace";let r=0;for(const e of te){const o=String(e[t]??"").replace(/<[^>]*>/g,""),l=n.measureText(o).width;l>r&&(r=l)}const o=n.measureText(e[t]?.title??"").width;o>r&&(r=o);const l=Math.max(40,Math.ceil(r+24));if(L(e=>({...e,[t]:l})),f){const n=e.map((e,n)=>({...e,width:n===t?l:$[n]??e.width}));f(n)}},[te,e,$,f]),be=a(e=>{A(t=>{const n={...t};return delete n[e],n})},[]),ve=a(t=>{const{a:n,e:r}=Z.current;if(!n||!r)return;const o=Math.min(n.row,r.row),l=Math.max(n.row,r.row),c=Math.min(n.col,r.col),a=Math.max(n.col,r.col);let s=o,i=l,u=c,h=a;t.row>l?i=t.row:t.row<o&&(s=t.row),t.col>a?h=t.col:t.col<c&&(u=t.col);const d=l-o+1,w=a-c+1,g=te.map(e=>[...e]);for(;g.length<=i;)g.push(Array(e.length).fill(""));for(const e of g)for(;e.length<=h;)e.push("");function m(e){const t=e.map(e=>parseFloat(e));if(t.length<2||t.some(e=>Number.isNaN(e)))return null;const n=t[1]-t[0];for(let e=2;e<t.length;e++)if(Math.abs(t[e]-t[e-1]-n)>1e-9)return null;return{step:n}}for(let e=s;e<=i;e++)for(let t=u;t<=h;t++){if(e>=o&&e<=l&&t>=c&&t<=a)continue;let n;if(1===w&&u===c&&h===a){const r=m(Array.from({length:d},(e,n)=>g[o+n]?.[t]??""));if(r){const c=parseFloat(g[l]?.[t]??"0"),a=parseFloat(g[o]?.[t]??"0"),s=e>l?e-l:-(o-e);n=String((e>l?c:a)+r.step*s)}else{const r=((e-o)%d+d)%d;n=g[o+r]?.[t]??""}}else if(1===d&&s===o&&i===l){const r=m(Array.from({length:w},(t,n)=>g[e]?.[c+n]??""));if(r){const o=parseFloat(g[e]?.[a]??"0"),l=parseFloat(g[e]?.[c]??"0"),s=t>a?t-a:-(c-t);n=String((t>a?o:l)+r.step*s)}else{const r=((t-c)%w+w)%w;n=g[e]?.[c+r]??""}}else{const r=((e-o)%d+d)%d,l=((t-c)%w+w)%w;n=g[o+r]?.[c+l]??""}g[e][t]=n}p(g),B({row:s,col:u}),_({row:i,col:h})},[te,e.length,p]);c(()=>{const e=e=>{if(!G.current)return;const t=document.elementFromPoint(e.clientX,e.clientY),n=t?.closest?.("[data-row][data-col]");if(!n)return;const r=parseInt(n.dataset.row),o=parseInt(n.dataset.col);U({row:r,col:o})},t=()=>{G.current&&Q&&ve(Q),G.current=!1,U(null),document.body.style.cursor=""};return window.addEventListener("mousemove",e),window.addEventListener("mouseup",t),()=>{window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",t)}},[Q,ve]);const xe=e=>{e.preventDefault(),e.stopPropagation(),G.current=!0,document.body.style.cursor="crosshair"},Me=o(null),[De,ke]=l(0),[Ce,Ee]=l(800);c(()=>{const e=Me.current;if(!e)return;const t=()=>Ee(e.clientHeight||800);t();const n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[]);const Se=te.length>100,$e=Se?Math.max(0,Math.floor(De/28)-20):0,Le=Se?Math.min(te.length,Math.ceil((De+Ce)/28)+20):te.length,Ne=s(()=>te.slice($e,Le),[te,$e,Le]),ze=28*$e,Ae=28*(te.length-Le),Oe="px-2 h-8 text-left text-xs font-medium text-gray-500 uppercase bg-gray-100 border-b border-r border-gray-200 select-none";/* @__PURE__ */
3
3
  return u("div",{ref:Me,className:"border border-gray-300 rounded overflow-scroll grid-scroll",style:{maxHeight:v,height:v},onScroll:e=>ke(e.target.scrollTop),children:[
4
4
  /* @__PURE__ */u("table",{ref:k,className:"border-collapse select-none",style:{tableLayout:"fixed",minWidth:36+e.reduce((t,n)=>t+pe(e.indexOf(n)),0)},children:[
5
5
  /* @__PURE__ */u("colgroup",{children:[
6
6
  /* @__PURE__ */h("col",{style:{width:36}}),e.map((e,t)=>/* @__PURE__ */h("col",{style:{width:pe(t)}},e.key))]}),
7
7
  /* @__PURE__ */h("thead",{className:"sticky top-0 z-10",children:/* @__PURE__ */u("tr",{children:[
8
- /* @__PURE__ */h("th",{className:`${t} ${Oe} text-center w-9 cursor-pointer hover:bg-gray-200`,onClick:()=>{q({row:0,col:0}),Q({row:te.length-1,col:e.length-1})},title:C.selectAll,children:"#"}),e.map((n,r)=>{const o=W&&B&&Math.min(W.col,B.col)<=r&&r<=Math.max(W.col,B.col)&&0===Math.min(W.row,B.row)&&Math.max(W.row,B.row)===te.length-1;/* @__PURE__ */
9
- return u("th",{className:`${t} ${Oe} cursor-pointer hover:bg-gray-200 relative${o?" !bg-blue-200":""}${X===r?" !bg-blue-100":""}`,style:{width:pe(r)},draggable:!0,onDragStart:()=>(e=>I(e))(r),onDragOver:e=>((e,t)=>{e.preventDefault(),j(t)})(e,r),onDrop:()=>(t=>{if(null===P||P===t)return I(null),void j(null);const n=te.map(e=>{const n=[...e],[r]=n.splice(P,1);return n.splice(t,0,r),n});if(p(n),f){const n=[...e],[r]=n.splice(P,1);n.splice(t,0,r),f(n)}I(null),j(null)})(r),onDragEnd:()=>{I(null),j(null)},onClick:e=>{e.shiftKey&&W||q({row:0,col:r}),Q({row:te.length-1,col:r})},onContextMenu:e=>me(e,r),children:[n.title,
8
+ /* @__PURE__ */h("th",{className:`${t} ${Oe} text-center w-9 cursor-pointer hover:bg-gray-200`,onClick:()=>{B({row:0,col:0}),_({row:te.length-1,col:e.length-1})},title:C.selectAll,children:"#"}),e.map((n,r)=>{const o=q&&V&&Math.min(q.col,V.col)<=r&&r<=Math.max(q.col,V.col)&&0===Math.min(q.row,V.row)&&Math.max(q.row,V.row)===te.length-1;/* @__PURE__ */
9
+ return u("th",{className:`${t} ${Oe} cursor-pointer hover:bg-gray-200 relative${o?" !bg-blue-200":""}${X===r?" !bg-blue-100":""}`,style:{width:pe(r)},draggable:!0,onDragStart:()=>(e=>I(e))(r),onDragOver:e=>((e,t)=>{e.preventDefault(),j(t)})(e,r),onDrop:()=>(t=>{if(null===P||P===t)return I(null),void j(null);const n=te.map(e=>{const n=[...e],[r]=n.splice(P,1);return n.splice(t,0,r),n});if(p(n),f){const n=[...e],[r]=n.splice(P,1);n.splice(t,0,r),f(n)}I(null),j(null)})(r),onDragEnd:()=>{I(null),j(null)},onClick:e=>{e.shiftKey&&q||B({row:0,col:r}),_({row:te.length-1,col:r})},onContextMenu:e=>me(e,r),children:[n.title,
10
10
  /* @__PURE__ */h("div",{className:"absolute -right-1 top-0 bottom-0 w-2 cursor-col-resize z-20",onMouseDown:e=>((e,t)=>{e.preventDefault(),e.stopPropagation(),N.current={col:t,startX:e.clientX,startW:pe(t)},document.body.style.cursor="col-resize"})(e,r),onDoubleClick:e=>{e.stopPropagation(),ye(r)},title:C.resize})]},n.key)})]})}),
11
- /* @__PURE__ */u("tbody",{children:[ze>0&&/* @__PURE__ */h("tr",{style:{height:ze}}),Ne.map((t,n)=>{const r=$e+n,o=W&&B&&Math.min(W.row,B.row)<=r&&r<=Math.max(W.row,B.row)&&0===Math.min(W.col,B.col)&&Math.max(W.col,B.col)===e.length-1;/* @__PURE__ */
11
+ /* @__PURE__ */u("tbody",{children:[ze>0&&/* @__PURE__ */h("tr",{style:{height:ze}}),Ne.map((t,n)=>{const r=$e+n,o=q&&V&&Math.min(q.row,V.row)<=r&&r<=Math.max(q.row,V.row)&&0===Math.min(q.col,V.col)&&Math.max(q.col,V.col)===e.length-1;/* @__PURE__ */
12
12
  return u("tr",{style:{height:fe(r)},children:[
13
- /* @__PURE__ */u("td",{className:`relative px-1 py-1 text-center text-2xs text-gray-400 border-b border-r border-gray-200 bg-gray-50 select-none cursor-pointer hover:bg-gray-200${o?" !bg-blue-200 !text-gray-700":""}${K===r?" !bg-blue-100":""}`,draggable:!0,onDragStart:()=>(e=>T(e))(r),onDragOver:e=>((e,t)=>{e.preventDefault(),F(t)})(e,r),onDrop:()=>(e=>{if(null===R||R===e)return T(null),void F(null);const t=te.map(e=>[...e]),[n]=t.splice(R,1);t.splice(e,0,n),p(t),T(null),F(null)})(r),onDragEnd:()=>{T(null),F(null)},onClick:t=>{t.shiftKey&&W||q({row:r,col:0}),Q({row:r,col:e.length-1})},onContextMenu:e=>ge(e,r),children:[r+1,
14
- /* @__PURE__ */h("div",{className:"absolute -bottom-1 left-0 right-0 h-2 cursor-row-resize z-20",onMouseDown:e=>((e,t)=>{e.preventDefault(),e.stopPropagation(),O.current={row:t,startY:e.clientY,startH:fe(t)},document.body.style.cursor="row-resize"})(e,r),onDoubleClick:e=>{e.stopPropagation(),be(r)},title:C.resize})]}),e.map((e,n)=>{const o=W&&B&&function(e,t,n,r){const o=Math.min(e.row,t.row),l=Math.max(e.row,t.row),c=Math.min(e.col,t.col),a=Math.max(e.col,t.col);return n>=o&&n<=l&&r>=c&&r<=a}(W,B,r,n),l=H?.row===r&&H?.col===n&&!e.readOnly,c=E?.row===r&&E?.col===n,a=x?.[`${r}:${n}`],s=W&&B?Math.max(W.row,B.row):-1,i=W&&B?Math.max(W.col,B.col):-1,d=W&&B&&r===s&&n===i,w=G.current&&_&&W&&B&&(()=>{const e=Math.min(W.row,B.row),t=Math.max(W.row,B.row),o=Math.min(W.col,B.col),l=Math.max(W.col,B.col);let c=e,a=t,s=o,i=l;return _.row>t?a=_.row:_.row<e&&(c=_.row),_.col>l?i=_.col:_.col<o&&(s=_.col),r>=c&&r<=a&&n>=s&&n<=i&&!(r>=e&&r<=t&&n>=o&&n<=l)})(),m="sm"===a?.fontSize?"text-2xs":"lg"===a?.fontSize?"text-sm":"xl"===a?.fontSize?"text-base":"text-xs",p=`${a?.bold?" font-bold":""}${a?.italic?" italic":""}${a?.underline?" underline":""}`;/* @__PURE__ */
13
+ /* @__PURE__ */u("td",{className:`relative px-1 py-1 text-center text-2xs text-gray-400 border-b border-r border-gray-200 bg-gray-50 select-none cursor-pointer hover:bg-gray-200${o?" !bg-blue-200 !text-gray-700":""}${K===r?" !bg-blue-100":""}`,draggable:!0,onDragStart:()=>(e=>R(e))(r),onDragOver:e=>((e,t)=>{e.preventDefault(),F(t)})(e,r),onDrop:()=>(e=>{if(null===T||T===e)return R(null),void F(null);const t=te.map(e=>[...e]),[n]=t.splice(T,1);t.splice(e,0,n),p(t),R(null),F(null)})(r),onDragEnd:()=>{R(null),F(null)},onClick:t=>{t.shiftKey&&q||B({row:r,col:0}),_({row:r,col:e.length-1})},onContextMenu:e=>ge(e,r),children:[r+1,
14
+ /* @__PURE__ */h("div",{className:"absolute -bottom-1 left-0 right-0 h-2 cursor-row-resize z-20",onMouseDown:e=>((e,t)=>{e.preventDefault(),e.stopPropagation(),O.current={row:t,startY:e.clientY,startH:fe(t)},document.body.style.cursor="row-resize"})(e,r),onDoubleClick:e=>{e.stopPropagation(),be(r)},title:C.resize})]}),e.map((e,n)=>{const o=q&&V&&function(e,t,n,r){const o=Math.min(e.row,t.row),l=Math.max(e.row,t.row),c=Math.min(e.col,t.col),a=Math.max(e.col,t.col);return n>=o&&n<=l&&r>=c&&r<=a}(q,V,r,n),l=H?.row===r&&H?.col===n&&!e.readOnly,c=E?.row===r&&E?.col===n,a=x?.[`${r}:${n}`],s=q&&V?Math.max(q.row,V.row):-1,i=q&&V?Math.max(q.col,V.col):-1,d=q&&V&&r===s&&n===i,w=G.current&&Q&&q&&V&&(()=>{const e=Math.min(q.row,V.row),t=Math.max(q.row,V.row),o=Math.min(q.col,V.col),l=Math.max(q.col,V.col);let c=e,a=t,s=o,i=l;return Q.row>t?a=Q.row:Q.row<e&&(c=Q.row),Q.col>l?i=Q.col:Q.col<o&&(s=Q.col),r>=c&&r<=a&&n>=s&&n<=i&&!(r>=e&&r<=t&&n>=o&&n<=l)})(),m="sm"===a?.fontSize?"text-2xs":"lg"===a?.fontSize?"text-sm":"xl"===a?.fontSize?"text-base":"text-xs",p=`${a?.bold?" font-bold":""}${a?.italic?" italic":""}${a?.underline?" underline":""}`;/* @__PURE__ */
15
15
  return u("td",{className:`relative px-0 py-0 border-b border-r border-gray-200 text-sm${e.readOnly?" bg-gray-50 text-gray-500 cursor-default":" cursor-cell"}${o?" !bg-blue-100":""}${c&&!o?" ring-2 ring-inset ring-blue-400":""}${w?" !bg-blue-50 ring-1 ring-inset ring-blue-300":""}`,onMouseDown:e=>{if(e.target===e.currentTarget){re(e,r,n);const t=e.currentTarget.querySelector("[data-row][data-col]");t?.focus()}},onMouseEnter:()=>oe(r,n),onClick:e=>{if(e.target===e.currentTarget){const t=e.currentTarget.querySelector("[data-row][data-col]");t?.focus()}},onDoubleClick:t=>{t.target!==t.currentTarget||e.readOnly||Y({row:r,col:n})},children:[
16
- /* @__PURE__ */h(g,{contentEditable:l,suppressContentEditableWarning:!0,tabIndex:0,"data-row":r,"data-col":n,className:`w-full h-full px-2 py-1 rosh-focus-ring whitespace-nowrap overflow-hidden ${"right"===e.align?"text-right":"center"===e.align?"text-center":""} ${e.readOnly?"cursor-default":"cursor-cell"} font-mono ${m}${p}`,onMouseDown:e=>re(e,r,n),onMouseEnter:()=>oe(r,n),onDoubleClick:()=>{e.readOnly||Y({row:r,col:n})},onFocus:()=>{S({row:r,col:n}),U.current||(q({row:r,col:n}),Q({row:r,col:n}))},onBlur:e=>{const o=e.currentTarget.textContent||"";o!==(t[n]||"")&&ne(r,n,o),Y(null)},onInput:()=>ae(r),onPaste:e=>le(e,r,n),onKeyDown:t=>{if(!(l||e.readOnly||1!==t.key.length||t.ctrlKey||t.metaKey||t.altKey))return t.preventDefault(),ne(r,n,t.key),V.current={row:r,col:n},void Y({row:r,col:n});ce(t,r,n)},text:t[n]||""}),d&&/* @__PURE__ */h("div",{onMouseDown:xe,title:C.fill,className:"absolute -bottom-[3px] -right-[3px] w-[7px] h-[7px] bg-blue-500 border border-white cursor-crosshair z-30 hover:bg-blue-600"})]},n)})]},r)}),Ae>0&&/* @__PURE__ */h("tr",{style:{height:Ae}})]})]}),se&&i(
16
+ /* @__PURE__ */h(g,{contentEditable:l,suppressContentEditableWarning:!0,tabIndex:0,"data-row":r,"data-col":n,className:`w-full h-full px-2 py-1 rosh-focus-ring whitespace-nowrap overflow-hidden ${"right"===e.align?"text-right":"center"===e.align?"text-center":""} ${e.readOnly?"cursor-default":"cursor-cell"} font-mono ${m}${p}`,onMouseDown:e=>re(e,r,n),onMouseEnter:()=>oe(r,n),onDoubleClick:()=>{e.readOnly||Y({row:r,col:n})},onFocus:()=>{S({row:r,col:n}),J.current||(B({row:r,col:n}),_({row:r,col:n}))},onBlur:e=>{const o=e.currentTarget.textContent||"";o!==(t[n]||"")&&ne(r,n,o),Y(null)},onInput:()=>ae(r),onPaste:e=>le(e,r,n),onKeyDown:t=>{if(!(l||e.readOnly||1!==t.key.length||t.ctrlKey||t.metaKey||t.altKey))return t.preventDefault(),ne(r,n,t.key),W.current={row:r,col:n},void Y({row:r,col:n});ce(t,r,n)},text:t[n]||""}),d&&/* @__PURE__ */h("div",{onMouseDown:xe,title:C.fill,className:"absolute -bottom-[3px] -right-[3px] w-[7px] h-[7px] bg-blue-500 border border-white cursor-crosshair z-30 hover:bg-blue-600"})]},n)})]},r)}),Ae>0&&/* @__PURE__ */h("tr",{style:{height:Ae}})]})]}),se&&i(
17
17
  /* @__PURE__ */u(d,{children:[
18
18
  /* @__PURE__ */h("div",{className:"fixed inset-0 z-(--z-popup)",onPointerDown:()=>ie(null)}),
19
19
  /* @__PURE__ */h("div",{className:"fixed z-(--z-popup) bg-white rounded-lg shadow-lg border border-gray-200 py-1 min-w-[160px]",style:{left:se.x,top:se.y},children:se.items.map((e,t)=>/* @__PURE__ */h("button",{onPointerDown:t=>{t.stopPropagation(),e.onClick()},className:"w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm text-gray-700 hover:bg-gray-100",children:e.label},t))})]}),document.body)]})}export{m as EditableGrid,w as withSpareRow};
@@ -0,0 +1,12 @@
1
+ import{nextEnabledIndex as e}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as t,filterOptionItems as n,optionMatches as r,groupedRows as l,OptionCheck as o,OptionSublabel as a}from"./chunk-TUT6SGH2.js";import{INPUT_BASE_ON as i,INPUT_BASE as s}from"./chunk-JFSYWEHD.js";import{Button_default as u}from"./chunk-UDD7GB4F.js";import{LoadingSpinner as c}from"./chunk-Q5MD3VY6.js";import{Tooltip as d}from"./chunk-2LXTJXWC.js";import{onOverlayOpen as h}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as p}from"./chunk-62LW225J.js";import{useDropdownPosition as m,MENU_MAX_HEIGHT as f}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as g}from"./chunk-D65T4H6J.js";import{GLASS_DIVIDER as b,glassStyle as v}from"./chunk-DTJRIWFR.js";import{registerModalEscapeInterceptor as y}from"./chunk-TWVUQUUD.js";import{useShellStrings as w}from"./chunk-OVNRVFWS.js";import{useState as x,useId as k,useRef as $,useMemo as j,useEffect as D}from"react";import{createPortal as N}from"react-dom";import{jsxs as C,jsx as S}from"react/jsx-runtime";function W(e,t){const n=e.length;if(0===n||t(e.join(", ")))return{shown:n,cut:!1};if(1===n)return{shown:1,cut:!0};let r=0;for(let l=1;l<n&&t(`${e.slice(0,l).join(", ")} +${n-l}`);l+=1)r=l;return{shown:r,cut:!1}}function F({onClear:e,ariaLabel:t}){/* @__PURE__ */
2
+ return S("button",{type:"button","aria-label":t,onMouseDown:t=>{t.preventDefault(),t.stopPropagation(),e()},className:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-red-500 opacity-0 group-hover:opacity-100 transition-opacity text-base leading-none",children:"×"})}function R(R){const{options:T,placeholder:L,emptyOptionLabel:E,className:M="",disabled:z,id:O,filter:U=!1,allowFreeText:J=!1,freeTextOption:A,onSearchChange:B,loading:H=!1,error:I,onRetry:G,rightAdornment:V,renderOption:X,clearable:P=!0,"aria-label":Q,"aria-labelledby":Y,"aria-describedby":K}=R,q=!0===R.multiple,Z=R.multiple?R.value:R.value?[R.value]:[],_=R.multiple?"":R.value,ee=e=>{R.multiple?R.onChange(e):R.onChange(e[0]??"")},te=Z.length>0,ne=U&&te&&!z,re=q||U,le=null!=A,oe=J||le,[ae,ie]=x(!1),[se,ue]=x(-1),ce=k(),de=O??`${ce}-input`,he=`${ce}-listbox`,pe=e=>`${ce}-opt-${e}`,[me,fe]=x(""),ge=w(),be=E??ge.select.none,ve=e=>{fe(e),ue(-1),B?.(e)},ye=$(null),we=$(null),xe=$(null),ke=$(null),$e=$(ae);$e.current=ae;const je=$(!1),De=e=>{$e.current&&($e.current=!1,e&&J&&!le&&Pe&&(q?Z.includes(Pe)||ee([...Z,Pe]):Pe!==_&&ee([Pe])),ie(!1),ve(""))},Ne=(e,t)=>{if(!e.disabled){if(q)return ee(Z.includes(e.value)?Z.filter(t=>t!==e.value):[...Z,e.value]),void(e===Qe?ve(""):ue(t));ee([e.value]),De(!1)}},[Ce,Se]=x(null);g(()=>{if(!V||ae)return void Se(null);const e=ke.current?.offsetWidth??0;Se(e?e+(Ee?32:8)+6:null)});const We=m(we,ae,re?{popupRef:xe}:{matchTriggerWidth:!0}),Fe=j(()=>t(T),[T]),Re=Z.join("\0"),Te=j(()=>{const e=[],t=/* @__PURE__ */new Set;for(const n of Fe)Z.includes(n.value)&&!t.has(n.value)&&(t.add(n.value),e.push(n.label));if(oe)for(const n of Z)t.has(n)||e.push(n);return e},[Fe,Re,oe]),Le=Te.join(", "),Ee=P&&te&&!z,[Me,ze]=x(null),Oe=$(null),Ue=$(""),Je=$(()=>{});Je.current=()=>{const e=we.current,t=Oe.current;if(!q||!e||!t)return;const n=getComputedStyle(e),r=e.clientWidth-(parseFloat(n.paddingLeft)||0)-(parseFloat(n.paddingRight)||0),l=[n.fontStyle,n.fontWeight,n.fontSize,n.fontFamily,n.letterSpacing].join("|"),o=`${r}|${l}|${Te.join("\0")}`;if(o===Ue.current)return;Ue.current=o;let a=null;r>0&&Te.length>0&&(t.style.fontStyle=n.fontStyle,t.style.fontWeight=n.fontWeight,t.style.fontSize=n.fontSize,t.style.fontFamily=n.fontFamily,t.style.letterSpacing=n.letterSpacing,a=W(Te,e=>(t.textContent=e,t.getBoundingClientRect().width<=r)),t.textContent=""),ze(e=>e?.shown===a?.shown&&e?.cut===a?.cut?e:a)},g(()=>{Je.current()}),D(()=>{const e=we.current;if(!q||!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(()=>Je.current());return t.observe(e),()=>t.disconnect()},[q]);const Ae=Te.length,Be=!q||!Me||Me.shown>=Ae?Le:0===Me.shown?ge.select.selectedCount(Ae):`${Te.slice(0,Me.shown).join(", ")} +${Ae-Me.shown}`,He=q&&null!==Me&&(Me.shown<Ae||Me.cut),Ie=ae&&te&&re;D(()=>{if(!ae)return;const e=e=>{const t=e.target;ye.current?.contains(t)||xe.current?.contains(t)||De(!0)};document.addEventListener("mousedown",e);const t=h(()=>De(!0));return()=>{document.removeEventListener("mousedown",e),t()}},[ae,J,me,Re,R.onChange]),D(()=>{if(ae)return y(e=>!("Escape"!==e.key||!$e.current)&&(De(!1),we.current?.blur(),!0),()=>xe.current)},[ae]);const Ge=j(()=>{const e=/* @__PURE__ */new Set;return n(T,t=>!e.has(t.value)&&(e.add(t.value),!0))},[T]),Ve=j(()=>{if(B)return Ge;const e=me.trim().toLowerCase();return e?n(Ge,t=>r(t,e)):Ge},[Ge,me,B]),Xe=j(()=>t(Ve),[Ve]),Pe=me.trim(),Qe=j(()=>le&&Pe?Fe.some(e=>e.label===Pe)||Z.includes(Pe)?null:{value:Pe,label:Pe}:null,[le,Pe,Fe,Re]),Ye=j(()=>Qe?[...Xe,Qe]:Xe,[Xe,Qe]);/* @__PURE__ */
3
+ return C("div",{ref:ye,className:"relative group",onBlur:e=>{const t=e.relatedTarget;t&&(ye.current?.contains(t)||xe.current?.contains(t))||je.current||document.activeElement!==we.current&&De(!0)},children:[(Ke=/* @__PURE__ */S("input",{id:de,ref:we,type:"text",autoComplete:"off",role:"combobox","aria-expanded":ae,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-controls":ae?he:void 0,"aria-activedescendant":ae&&se>=0&&se<Ye.length?pe(se):void 0,"aria-label":Y?void 0:Q,"aria-labelledby":Y,"aria-describedby":K,value:ae?me:Be,onChange:e=>{ve(e.target.value),ie(!0)},onFocus:()=>{z||(ve(""),ie(!0))},onKeyDown:t=>{if("ArrowDown"===t.key||"ArrowUp"===t.key){if(z)return;if(t.preventDefault(),!ae)return void ie(!0);if(0===Ye.length)return;const n="ArrowDown"===t.key?1:-1;return void ue(t=>e(Ye,t,n))}"Enter"===t.key?(t.preventDefault(),ae&&se>=0&&se<Ye.length?Ne(Ye[se],se):1!==Xe.length||Xe[0].disabled?J&&!le&&Pe&&(q?(Z.includes(Pe)||ee([...Z,Pe]),ve("")):(ee([Pe]),De(!1),we.current?.blur())):Ne(Xe[0],0)):"Escape"===t.key?(De(!1),we.current?.blur()):"Tab"===t.key&&De(!0)},placeholder:Ie?Be:L||be,className:`${ne?i:s} ${M} ${Ee?"pr-8":""} ${z?"bg-gray-50 text-gray-400 cursor-not-allowed":""} truncate${Ie?" rosh-field-shows-choice":""}`,style:Ce?{paddingRight:Ce}:void 0,disabled:z}),q?/* @__PURE__ */S(d,{content:!ae&&He?Le:null,className:"block",children:Ke}):Ke),q&&
4
+ /* @__PURE__ */S("div",{"aria-hidden":"true",className:"pointer-events-none invisible absolute left-0 top-0 h-0 w-0 overflow-hidden",children:/* @__PURE__ */S("span",{ref:Oe,className:"whitespace-pre"})}),Ee&&/* @__PURE__ */S(F,{ariaLabel:ge.select.clear,onClear:()=>{ee([]),De(!1)}}),V&&!ae&&/* @__PURE__ */S("div",{ref:ke,className:`absolute top-1/2 -translate-y-1/2 ${Ee?"right-8":"right-2"} flex items-center gap-1 flex-nowrap justify-end pointer-events-none`,children:V}),ae&&N(
5
+ /* @__PURE__ */C("div",{ref:xe,onMouseDownCapture:()=>{je.current=!0,setTimeout(()=>{je.current=!1},0)},className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:p.popup,left:We?.left,right:We?.right,top:We?.top,bottom:We?.bottom,minWidth:We?.minWidth,width:We?.width,...re&&{maxWidth:We?.maxWidth},visibility:We?void 0:"hidden",...v()},children:[q&&te&&P&&!z&&
6
+ /* @__PURE__ */S("button",{type:"button",tabIndex:-1,onMouseDown:e=>{e.preventDefault(),ee([])},className:`block w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm text-gray-600 hover:bg-gray-50 border-b ${b}`,children:ge.select.clearAll}),H?
7
+ /* @__PURE__ */S(c,{size:"sm",padding:"py-2",label:ge.search.searching}):I?/* @__PURE__ */C("div",{role:"alert",className:"flex items-center gap-2 px-3 py-2 text-sm text-red-600",children:[
8
+ /* @__PURE__ */S("span",{className:"min-w-0 flex-1",children:I}),G&&/* @__PURE__ */S(u,{variant:"link",size:"sm",onMouseDown:e=>e.preventDefault(),onClick:G,className:"shrink-0",children:ge.list.retry})]}):null,
9
+ /* @__PURE__ */C("div",{id:he,role:Ye.length?"listbox":void 0,"aria-labelledby":Ye.length?Y??(Q?void 0:de):void 0,"aria-label":Ye.length&&!Y?Q:void 0,"aria-multiselectable":!(!Ye.length||!q)||void 0,className:"overflow-y-auto",style:{maxHeight:We?.maxHeight??f},children:[0===Ye.length?H||I?null:/* @__PURE__ */S("p",{className:"px-3 py-3 text-sm text-gray-400 text-center",children:ge.select.noMatches}):0===Xe.length?null:l(Ve,(e,t)=>{const n=Z.includes(e.value);/* @__PURE__ */
10
+ return C("button",{id:pe(t),type:"button",role:"option","aria-selected":n,"aria-disabled":e.disabled||void 0,tabIndex:-1,onMouseDown:n=>{(e.disabled||q)&&n.preventDefault(),Ne(e,t)},className:"w-full overflow-hidden text-left px-3 min-h-(--row-height-menu) py-2 text-sm flex items-center justify-between gap-2 whitespace-nowrap "+(e.disabled?"cursor-not-allowed text-gray-400":`hover:bg-gray-50 ${n?"text-blue-600 font-medium":"text-gray-700"} ${t===se?"bg-gray-100":n?"bg-blue-50/50":""}`),children:[q&&/* @__PURE__ */S(o,{selected:n}),
11
+ /* @__PURE__ */S("span",{className:`min-w-0 ${re?"flex-auto":"flex-1"} truncate`,children:X?X(e,{selected:n,active:t===se}):e.label}),e.sublabel&&/* @__PURE__ */S(a,{grows:re,children:e.sublabel})]},e.value)},ce),Qe&&A&&
12
+ /* @__PURE__ */S("button",{id:pe(Xe.length),type:"button",role:"option","aria-selected":!1,tabIndex:-1,onMouseDown:e=>{q&&e.preventDefault(),Ne(Qe,Xe.length)},className:`w-full overflow-hidden text-left px-3 min-h-(--row-height-menu) py-2 text-sm flex items-center gap-2 whitespace-nowrap text-gray-700 hover:bg-gray-50 ${Xe.length?`border-t ${b}`:""} ${se===Xe.length?"bg-gray-100":""}`,children:/* @__PURE__ */S("span",{className:"min-w-0 flex-1 truncate",children:A(Qe.value)})},`${ce}-typed`)]})]}),document.body)]});var Ke}export{R as SearchableSelect,W as fitChoice};
@@ -1,9 +1,9 @@
1
- import{AccessibleTable as e}from"./chunk-C2FBUQJW.js";import{bumpPath as t}from"./chunk-VFC6QUEN.js";import{useHighlight as n}from"./chunk-CNYAHYE6.js";import{ChartTooltip as o}from"./chunk-P5BOTIJU.js";import{usePlotWidth as l}from"./chunk-MAFUXCPZ.js";import{resolveSeriesColor as r,CHART_INK as a}from"./chunk-TZFACUMR.js";import{useShellStrings as i,useShellLocale as s}from"./chunk-OVNRVFWS.js";import{formatPlain as h}from"./chunk-C3QOHMR6.js";import{useRef as c,useState as m}from"react";import{jsx as d,jsxs as u}from"react/jsx-runtime";function f({nodes:f,links:k,height:p=320,width:x,nodeWidth:g=14,nodePadding:y=12,formatValue:v,className:M,emptyLabel:w}){const b=i().charts,j=s(),N=v??(e=>h(e,j)),$=w??b.noFlows,F=c(null),C=l(F),E=x??C,[O,U]=m(null),{highlighted:A}=n();if(0===f.length||0===k.length)/* @__PURE__ */
2
- return d("div",{className:M,ref:F,children:/* @__PURE__ */d("p",{className:"py-8 text-center text-sm text-gray-500",children:$})});const V=[...new Set(f.map(e=>e.depth))].sort((e,t)=>e-t),W=e=>V.length<=1?0:V.indexOf(e)/(V.length-1)*(E-g-140)+70,z=new Map(f.map(e=>{const t=k.filter(t=>t.from===e.key).reduce((e,t)=>e+t.value,0),n=k.filter(t=>t.to===e.key).reduce((e,t)=>e+t.value,0);return[e.key,Math.max(t,n,e.value??0)]})),B=/* @__PURE__ */new Map;for(const e of f)B.set(e.depth,[...B.get(e.depth)??[],e]);const P=Math.max(...[...B.values()].map(e=>e.reduce((e,t)=>e+(z.get(t.key)??0),0))),Q=p-20,R=P>0?(Q-y*(Math.max(...[...B.values()].map(e=>e.length))-1))/P:0,S=/* @__PURE__ */new Map;for(const[e,t]of B){const n=t.map(e=>Math.max(2,(z.get(e.key)??0)*R)),o=n.reduce((e,t)=>e+t,0)+y*(t.length-1),l=n.reduce((e,t)=>e+Math.max(0,t-2),0),r=o>Q&&l>0?Math.max(0,1-(o-Q)/l):1;let a=10;t.forEach((t,o)=>{const l=2+Math.max(0,n[o]-2)*r;S.set(t.key,{x:W(e),y:a,h:l,index:o}),a+=l+y})}const T=/* @__PURE__ */new Map,H=/* @__PURE__ */new Map,J=/* @__PURE__ */new Map,L=(e,t)=>e.from===t||e.to===t,Y="link"===O?.kind?k[O.index]:void 0,Z="node"===O?.kind?f.find(e=>e.key===O.key):void 0;/* @__PURE__ */
1
+ import{AccessibleTable as e}from"./chunk-X3II54HU.js";import{bumpPath as t}from"./chunk-VFC6QUEN.js";import{useHighlight as n}from"./chunk-CNYAHYE6.js";import{ChartTooltip as o}from"./chunk-P5BOTIJU.js";import{usePlotWidth as l}from"./chunk-MAFUXCPZ.js";import{resolveSeriesColor as r,CHART_INK as a}from"./chunk-TZFACUMR.js";import{useShellStrings as i,useShellLocale as s}from"./chunk-OVNRVFWS.js";import{formatPlain as h}from"./chunk-C3QOHMR6.js";import{useRef as c,useState as m}from"react";import{jsx as d,jsxs as u}from"react/jsx-runtime";function f({nodes:f,links:k,height:p=320,width:x,nodeWidth:g=14,nodePadding:y=12,formatValue:v,className:M,emptyLabel:w}){const b=i().charts,j=s(),N=v??(e=>h(e,j)),$=w??b.noFlows,F=c(null),C=l(F),E=x??C,[O,U]=m(null),{highlighted:A}=n();if(0===f.length||0===k.length)/* @__PURE__ */
2
+ return d("div",{className:M,ref:F,children:/* @__PURE__ */d("p",{className:"py-8 text-center text-sm text-gray-500",children:$})});const V=[...new Set(f.map(e=>e.depth))].sort((e,t)=>e-t),z=e=>V.length<=1?0:V.indexOf(e)/(V.length-1)*(E-g-140)+70,H=new Map(f.map(e=>{const t=k.filter(t=>t.from===e.key).reduce((e,t)=>e+t.value,0),n=k.filter(t=>t.to===e.key).reduce((e,t)=>e+t.value,0);return[e.key,Math.max(t,n,e.value??0)]})),I=/* @__PURE__ */new Map;for(const e of f)I.set(e.depth,[...I.get(e.depth)??[],e]);const P=Math.max(...[...I.values()].map(e=>e.reduce((e,t)=>e+(H.get(t.key)??0),0))),R=p-20,S=P>0?(R-y*(Math.max(...[...I.values()].map(e=>e.length))-1))/P:0,T=/* @__PURE__ */new Map;for(const[e,t]of I){const n=t.map(e=>Math.max(2,(H.get(e.key)??0)*S)),o=n.reduce((e,t)=>e+t,0)+y*(t.length-1),l=n.reduce((e,t)=>e+Math.max(0,t-2),0),r=o>R&&l>0?Math.max(0,1-(o-R)/l):1;let a=10;t.forEach((t,o)=>{const l=2+Math.max(0,n[o]-2)*r;T.set(t.key,{x:z(e),y:a,h:l,index:o}),a+=l+y})}const W=/* @__PURE__ */new Map,B=/* @__PURE__ */new Map,L=/* @__PURE__ */new Map,Q=(e,t)=>e.from===t||e.to===t,X="link"===O?.kind?k[O.index]:void 0,Y="node"===O?.kind?f.find(e=>e.key===O.key):void 0;/* @__PURE__ */
3
3
  return u("div",{className:`relative ${M??""}`,ref:F,children:[
4
- /* @__PURE__ */u("svg",{width:"100%",height:p,viewBox:`0 0 ${E} ${p}`,role:"img","aria-label":b.sankey(f.length,k.length),onMouseLeave:()=>U(null),children:[k.map((e,n)=>{const o=S.get(e.from),l=S.get(e.to);if(!o||!l)return null;const a=Math.max(1,e.value*R),i=o.y+(T.get(e.from)??0)+a/2,s=l.y+(H.get(e.to)??0)+a/2;T.set(e.from,(T.get(e.from)??0)+a),H.set(e.to,(H.get(e.to)??0)+a);const h=o.x+g,c=l.x,m=r(o.index,e.color),u=`${e.from}→${e.to}`,f=J.get(u)??0;J.set(u,f+1);const k=((e,t)=>O?"link"===O.kind?O.index===t:L(e,O.key):null!==A?L(e,A):null)(e,n);/* @__PURE__ */
5
- return d("path",{d:t([[h,i],[c,s]]),fill:"none",stroke:m,strokeWidth:a,strokeOpacity:null===k||k?.42:.12,onMouseEnter:()=>U({kind:"link",index:n})},f?`${u}#${f}`:u)}),f.map(e=>{const t=S.get(e.key);if(!t)return null;const n=t.x>E/2,o=(l=e.key,O?"node"===O.kind?O.key===l:L(k[O.index],l):null!==A?A===l:null);var l;/* @__PURE__ */
4
+ /* @__PURE__ */u("svg",{width:"100%",height:p,viewBox:`0 0 ${E} ${p}`,role:"img","aria-label":b.sankey(f.length,k.length),onMouseLeave:()=>U(null),children:[k.map((e,n)=>{const o=T.get(e.from),l=T.get(e.to);if(!o||!l)return null;const a=Math.max(1,e.value*S),i=o.y+(W.get(e.from)??0)+a/2,s=l.y+(B.get(e.to)??0)+a/2;W.set(e.from,(W.get(e.from)??0)+a),B.set(e.to,(B.get(e.to)??0)+a);const h=o.x+g,c=l.x,m=r(o.index,e.color),u=`${e.from}→${e.to}`,f=L.get(u)??0;L.set(u,f+1);const k=((e,t)=>O?"link"===O.kind?O.index===t:Q(e,O.key):null!==A?Q(e,A):null)(e,n);/* @__PURE__ */
5
+ return d("path",{d:t([[h,i],[c,s]]),fill:"none",stroke:m,strokeWidth:a,strokeOpacity:null===k||k?.42:.12,onMouseEnter:()=>U({kind:"link",index:n})},f?`${u}#${f}`:u)}),f.map(e=>{const t=T.get(e.key);if(!t)return null;const n=t.x>E/2,o=(l=e.key,O?"node"===O.kind?O.key===l:Q(k[O.index],l):null!==A?A===l:null);var l;/* @__PURE__ */
6
6
  return u("g",{opacity:null===o||o?1:.45,onMouseEnter:()=>U({kind:"node",key:e.key}),children:[
7
7
  /* @__PURE__ */d("rect",{x:t.x,y:t.y,width:g,height:t.h,rx:2,fill:r(t.index,e.color,e.tone)}),
8
- /* @__PURE__ */d("text",{x:n?t.x-8:t.x+g+8,y:t.y+t.h/2+4,textAnchor:n?"end":"start",fontSize:11,fill:a.label,children:e.label})]},e.key)})]}),Y&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(o,{title:`${Y.from} → ${Y.to}`,rows:[{key:"value",label:b.flow,color:r(S.get(Y.from)?.index??0,Y.color),value:N(Y.value)}]})}),Z&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(o,{title:Z.label,rows:[{key:"value",label:b.throughput,color:r(S.get(Z.key)?.index??0,Z.color,Z.tone),value:N(z.get(Z.key)??0)}]})}),
8
+ /* @__PURE__ */d("text",{x:n?t.x-8:t.x+g+8,y:t.y+t.h/2+4,textAnchor:n?"end":"start",fontSize:11,fill:a.label,children:e.label})]},e.key)})]}),X&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(o,{title:`${X.from} → ${X.to}`,rows:[{key:"value",label:b.flow,color:r(T.get(X.from)?.index??0,X.color),value:N(X.value)}]})}),Y&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(o,{title:Y.label,rows:[{key:"value",label:b.throughput,color:r(T.get(Y.key)?.index??0,Y.color,Y.tone),value:N(H.get(Y.key)??0)}]})}),
9
9
  /* @__PURE__ */d(e,{caption:b.sankey(f.length,k.length),head:[b.tableFrom,b.tableTo,b.value],rows:k.map(e=>[e.from,e.to,N(e.value)])})]})}export{f as SankeyChart};
@@ -1,3 +1,5 @@
1
+ import { MetricType } from 'web-vitals';
2
+
1
3
  /**
2
4
  * `startClientTelemetry` — web vitals and client errors from a portal page to
3
5
  * the backend's intake (docs/adr/0057 section 4).
@@ -19,24 +21,27 @@
19
21
  * Not `sendBeacon`: it cannot carry an `Authorization` header, and the intake
20
22
  * is authenticated (ADR 0057 rejects a cookie-only telemetry session). A
21
23
  * failed send is dropped, never retried.
24
+ *
25
+ * `anonymous: true` is the public storefront's mode (ADR 0057 section 4, s2):
26
+ * vitals only, to the storefront intake, with no token, no cookie and no
27
+ * error listener or boundary sink. Nothing is kept in the browser. A page
28
+ * load that is sampled out starts nothing at all.
22
29
  */
23
30
 
24
- interface ClientTelemetryConfig {
31
+ interface ClientTelemetryOptions {
25
32
  /** The web app's code at the intake: `admin-portal`, `customer-portal`,
26
- * `supplier-portal`, `dealer-portal` or `pos`. */
33
+ * `supplier-portal`, `dealer-portal`, `pos`, or `storefront` (anonymous). */
27
34
  app: string;
28
35
  /** This build's version, as the host's own package names it. */
29
36
  release: string;
30
- /** The bearer token for the intake, read at send time. Nothing is sent
31
- * while it answers null (signed out). */
32
- getAccessToken: () => string | null | undefined;
33
37
  /** The current route TEMPLATE (`/sales-orders/:id`) or the active window's
34
38
  * key — never `location.href`. A raw path is cleaned, but a template is
35
39
  * what groups well. */
36
40
  routeKey: () => string | null | undefined;
37
41
  /** The host's switch. `false` starts nothing. Default `true`. */
38
42
  enabled?: boolean;
39
- /** Same-origin intake path. Default `/api/client-telemetry/web-batches/`. */
43
+ /** The intake. Default `/api/client-telemetry/web-batches/`, or
44
+ * `/api/storefront-analytics/web-vitals/` when `anonymous`. */
40
45
  endpoint?: string;
41
46
  /** Share of page loads whose vitals are collected, 0 to 1. Default 1.
42
47
  * Errors are never sampled. */
@@ -47,7 +52,22 @@ interface ClientTelemetryConfig {
47
52
  fetch?: typeof fetch;
48
53
  /** For tests; defaults to `Math.random`. */
49
54
  random?: () => number;
55
+ /** For tests; defaults to subscribing to every `web-vitals` metric. */
56
+ observeVitals?: (report: (metric: MetricType) => void) => void;
57
+ }
58
+ /** A signed-in portal page: vitals and errors, under the bearer token. */
59
+ interface SignedInClientTelemetryConfig extends ClientTelemetryOptions {
60
+ anonymous?: false;
61
+ /** The bearer token for the intake, read at send time. Nothing is sent
62
+ * while it answers null (signed out). */
63
+ getAccessToken: () => string | null | undefined;
64
+ }
65
+ /** A public page (the storefront): vitals only, no token and no cookie. */
66
+ interface AnonymousClientTelemetryConfig extends ClientTelemetryOptions {
67
+ anonymous: true;
68
+ getAccessToken?: never;
50
69
  }
70
+ type ClientTelemetryConfig = SignedInClientTelemetryConfig | AnonymousClientTelemetryConfig;
51
71
  interface ClientTelemetry {
52
72
  /** Send what is queued now. */
53
73
  flush(): void;
@@ -57,9 +77,10 @@ interface ClientTelemetry {
57
77
  stop(): void;
58
78
  }
59
79
  /**
60
- * Start collecting for this page. Call once, after sign-in is known; a second
61
- * call replaces the first. Returns a handle to flush, report or stop.
80
+ * Start collecting for this page. Call once, after sign-in is known (or, for
81
+ * `anonymous`, once the page may be measured); a second call replaces the
82
+ * first. Returns a handle to flush, report or stop.
62
83
  */
63
84
  declare function startClientTelemetry(config: ClientTelemetryConfig): ClientTelemetry;
64
85
 
65
- export { type ClientTelemetry as C, type ClientTelemetryConfig as a, startClientTelemetry as s };
86
+ export { type AnonymousClientTelemetryConfig as A, type ClientTelemetry as C, type SignedInClientTelemetryConfig as S, type ClientTelemetryConfig as a, startClientTelemetry as s };
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{DataTable as default}from"../chunk-B7IHOBK6.js";import"../chunk-CGZBDI6C.js";import"../chunk-XKCEVZZB.js";import"../chunk-QMQVOUIV.js";import"../chunk-Q5MD3VY6.js";import"../chunk-MRJKZWWV.js";import"../chunk-Z3WKHMVB.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-T53TXXOC.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-OVNRVFWS.js";import"../chunk-C3QOHMR6.js";
2
+ export{DataTable as default}from"../chunk-S2ONNZVX.js";import"../chunk-CGZBDI6C.js";import"../chunk-XKCEVZZB.js";import"../chunk-7T3COEQK.js";import"../chunk-Q5MD3VY6.js";import"../chunk-MRJKZWWV.js";import"../chunk-2LXTJXWC.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-OVNRVFWS.js";import"../chunk-C3QOHMR6.js";
@@ -1 +1 @@
1
- export{ListLoadError as default}from"../chunk-JZ7NBWGB.js";import"../chunk-FSP63GKK.js";import"../chunk-K7U4RWXJ.js";import"../chunk-ABJ4LWOW.js";import"../chunk-VJPJNCB4.js";import"../chunk-J75ZT2JQ.js";import"../chunk-Q5MD3VY6.js";import"../chunk-MRJKZWWV.js";import"../chunk-Z3WKHMVB.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-T53TXXOC.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-OVNRVFWS.js";import"../chunk-C3QOHMR6.js";
1
+ export{ListLoadError as default}from"../chunk-7UBV5MPQ.js";import"../chunk-UDD7GB4F.js";import"../chunk-K7U4RWXJ.js";import"../chunk-4TL3MRRE.js";import"../chunk-VJPJNCB4.js";import"../chunk-J75ZT2JQ.js";import"../chunk-Q5MD3VY6.js";import"../chunk-MRJKZWWV.js";import"../chunk-2LXTJXWC.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-OVNRVFWS.js";import"../chunk-C3QOHMR6.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{AlignmentGrid as default}from"../chunk-HPW6QAAY.js";import"../chunk-ABJ4LWOW.js";import"../chunk-Z3WKHMVB.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-T53TXXOC.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";
2
+ export{AlignmentGrid as default}from"../chunk-C6LV3HJW.js";import"../chunk-4TL3MRRE.js";import"../chunk-2LXTJXWC.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{BORDER_LINE_STYLES,borderSides,borderStartEach,BorderInput as default}from"../chunk-H62JMI7C.js";import"../chunk-BF2G42QU.js";import"../chunk-4G5VLI7E.js";import"../chunk-NRWIULLI.js";import"../chunk-H245LLX4.js";import"../chunk-FND3BDOO.js";import"../chunk-FDIJEOGV.js";import"../chunk-E4Z5OXBI.js";import"../chunk-JHDWTYZ4.js";import"../chunk-JFSYWEHD.js";import"../chunk-CDAJKLGL.js";import"../chunk-K7U4RWXJ.js";import"../chunk-ABJ4LWOW.js";import"../chunk-VJPJNCB4.js";import"../chunk-J75ZT2JQ.js";import"../chunk-Z3WKHMVB.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-T53TXXOC.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-OVNRVFWS.js";import"../chunk-C3QOHMR6.js";
2
+ export{BORDER_LINE_STYLES,borderSides,borderStartEach,BorderInput as default}from"../chunk-DVFMCVI5.js";import"../chunk-CHNYSP6K.js";import"../chunk-4G5VLI7E.js";import"../chunk-ION2GBY3.js";import"../chunk-H245LLX4.js";import"../chunk-RNBM5JZI.js";import"../chunk-SWSN3HZX.js";import"../chunk-E4Z5OXBI.js";import"../chunk-HMZLRXLA.js";import"../chunk-JFSYWEHD.js";import"../chunk-CDAJKLGL.js";import"../chunk-K7U4RWXJ.js";import"../chunk-4TL3MRRE.js";import"../chunk-VJPJNCB4.js";import"../chunk-J75ZT2JQ.js";import"../chunk-2LXTJXWC.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-OVNRVFWS.js";import"../chunk-C3QOHMR6.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{BrandAssetEditor as default}from"../chunk-LKSHI57C.js";import"../chunk-Z5UVBCEE.js";import"../chunk-PMJMPYLQ.js";import"../chunk-MVQBVPWP.js";import"../chunk-CQXV3SJA.js";import"../chunk-EZQXLIG3.js";import"../chunk-BF2G42QU.js";import"../chunk-4G5VLI7E.js";import"../chunk-MI67DI3H.js";import"../chunk-VAACOJ2H.js";import"../chunk-25RR3GQW.js";import"../chunk-BOGBLZKS.js";import"../chunk-QMQVOUIV.js";import"../chunk-FSP63GKK.js";import"../chunk-K7U4RWXJ.js";import"../chunk-ABJ4LWOW.js";import"../chunk-VJPJNCB4.js";import"../chunk-J75ZT2JQ.js";import"../chunk-Q5MD3VY6.js";import"../chunk-MRJKZWWV.js";import"../chunk-Z3WKHMVB.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-T53TXXOC.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-OVNRVFWS.js";import"../chunk-C3QOHMR6.js";
2
+ export{BrandAssetEditor as default}from"../chunk-EPGKTANF.js";import"../chunk-RKWGWBET.js";import"../chunk-PMJMPYLQ.js";import"../chunk-MVQBVPWP.js";import"../chunk-LI7D6SMK.js";import"../chunk-FARRGETL.js";import"../chunk-CHNYSP6K.js";import"../chunk-4G5VLI7E.js";import"../chunk-MI67DI3H.js";import"../chunk-VAACOJ2H.js";import"../chunk-25RR3GQW.js";import"../chunk-5SULG7D5.js";import"../chunk-7T3COEQK.js";import"../chunk-UDD7GB4F.js";import"../chunk-K7U4RWXJ.js";import"../chunk-4TL3MRRE.js";import"../chunk-VJPJNCB4.js";import"../chunk-J75ZT2JQ.js";import"../chunk-Q5MD3VY6.js";import"../chunk-MRJKZWWV.js";import"../chunk-2LXTJXWC.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-OVNRVFWS.js";import"../chunk-C3QOHMR6.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{Button_default as default}from"../chunk-FSP63GKK.js";import"../chunk-K7U4RWXJ.js";import"../chunk-ABJ4LWOW.js";import"../chunk-Q5MD3VY6.js";import"../chunk-MRJKZWWV.js";import"../chunk-Z3WKHMVB.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-T53TXXOC.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";
2
+ export{Button_default as default}from"../chunk-UDD7GB4F.js";import"../chunk-K7U4RWXJ.js";import"../chunk-4TL3MRRE.js";import"../chunk-Q5MD3VY6.js";import"../chunk-MRJKZWWV.js";import"../chunk-2LXTJXWC.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{ColorPickerPanel,ColorSwatch,HexInput,NO_COLOR_FILL,clampOpacity,colorFill,colorSwatchClasses,ColorPicker as default,stepHue,stepOpacity,stepSquare}from"../chunk-NRWIULLI.js";import"../chunk-H245LLX4.js";import"../chunk-FND3BDOO.js";import"../chunk-FDIJEOGV.js";import"../chunk-E4Z5OXBI.js";import"../chunk-JHDWTYZ4.js";import"../chunk-JFSYWEHD.js";import"../chunk-CDAJKLGL.js";import"../chunk-K7U4RWXJ.js";import"../chunk-ABJ4LWOW.js";import"../chunk-VJPJNCB4.js";import"../chunk-J75ZT2JQ.js";import"../chunk-Z3WKHMVB.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-T53TXXOC.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-OVNRVFWS.js";import"../chunk-C3QOHMR6.js";
2
+ export{ColorPickerPanel,ColorSwatch,HexInput,NO_COLOR_FILL,clampOpacity,colorFill,colorSwatchClasses,ColorPicker as default,stepHue,stepOpacity,stepSquare}from"../chunk-ION2GBY3.js";import"../chunk-H245LLX4.js";import"../chunk-RNBM5JZI.js";import"../chunk-SWSN3HZX.js";import"../chunk-E4Z5OXBI.js";import"../chunk-HMZLRXLA.js";import"../chunk-JFSYWEHD.js";import"../chunk-CDAJKLGL.js";import"../chunk-K7U4RWXJ.js";import"../chunk-4TL3MRRE.js";import"../chunk-VJPJNCB4.js";import"../chunk-J75ZT2JQ.js";import"../chunk-2LXTJXWC.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-OVNRVFWS.js";import"../chunk-C3QOHMR6.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{AttachButton,AttachmentDropZone,AttachmentList,PaperclipGlyph,ComposerAttachments as default}from"../chunk-J77ZVPF5.js";import"../chunk-CQXV3SJA.js";import"../chunk-EZQXLIG3.js";import"../chunk-VAACOJ2H.js";import"../chunk-JHDWTYZ4.js";import"../chunk-BOGBLZKS.js";import"../chunk-QMQVOUIV.js";import"../chunk-FSP63GKK.js";import"../chunk-K7U4RWXJ.js";import"../chunk-ABJ4LWOW.js";import"../chunk-VJPJNCB4.js";import"../chunk-J75ZT2JQ.js";import"../chunk-Q5MD3VY6.js";import"../chunk-MRJKZWWV.js";import"../chunk-Z3WKHMVB.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-T53TXXOC.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-OVNRVFWS.js";import"../chunk-C3QOHMR6.js";
2
+ export{AttachButton,AttachmentDropZone,AttachmentList,PaperclipGlyph,ComposerAttachments as default}from"../chunk-4EIGXW4U.js";import"../chunk-LI7D6SMK.js";import"../chunk-FARRGETL.js";import"../chunk-VAACOJ2H.js";import"../chunk-HMZLRXLA.js";import"../chunk-5SULG7D5.js";import"../chunk-7T3COEQK.js";import"../chunk-UDD7GB4F.js";import"../chunk-K7U4RWXJ.js";import"../chunk-4TL3MRRE.js";import"../chunk-VJPJNCB4.js";import"../chunk-J75ZT2JQ.js";import"../chunk-Q5MD3VY6.js";import"../chunk-MRJKZWWV.js";import"../chunk-2LXTJXWC.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-OVNRVFWS.js";import"../chunk-C3QOHMR6.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{CornersInput as default}from"../chunk-OSRLZZDO.js";import"../chunk-FDIJEOGV.js";import"../chunk-E4Z5OXBI.js";import"../chunk-JHDWTYZ4.js";import"../chunk-JFSYWEHD.js";import"../chunk-K7U4RWXJ.js";import"../chunk-ABJ4LWOW.js";import"../chunk-VJPJNCB4.js";import"../chunk-J75ZT2JQ.js";import"../chunk-Z3WKHMVB.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-T53TXXOC.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-OVNRVFWS.js";import"../chunk-C3QOHMR6.js";
2
+ export{CornersInput as default}from"../chunk-WKSVUJZA.js";import"../chunk-SWSN3HZX.js";import"../chunk-E4Z5OXBI.js";import"../chunk-HMZLRXLA.js";import"../chunk-JFSYWEHD.js";import"../chunk-K7U4RWXJ.js";import"../chunk-4TL3MRRE.js";import"../chunk-VJPJNCB4.js";import"../chunk-J75ZT2JQ.js";import"../chunk-2LXTJXWC.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-OVNRVFWS.js";import"../chunk-C3QOHMR6.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{DatePicker_default as default}from"../chunk-EXU3ZXKB.js";import"../chunk-UONWIAII.js";import"../chunk-SNDYD76W.js";import"../chunk-5OTS2G3M.js";import"../chunk-36BRD5J3.js";import"../chunk-JFSYWEHD.js";import"../chunk-K7U4RWXJ.js";import"../chunk-VJPJNCB4.js";import"../chunk-J75ZT2JQ.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-T53TXXOC.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-OVNRVFWS.js";import"../chunk-C3QOHMR6.js";
2
+ export{DatePicker_default as default}from"../chunk-EKFIRCNP.js";import"../chunk-KSYNJTVA.js";import"../chunk-SNDYD76W.js";import"../chunk-5OTS2G3M.js";import"../chunk-36BRD5J3.js";import"../chunk-JFSYWEHD.js";import"../chunk-K7U4RWXJ.js";import"../chunk-VJPJNCB4.js";import"../chunk-J75ZT2JQ.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-OVNRVFWS.js";import"../chunk-C3QOHMR6.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{DateRangePicker as default,presetRange,toISODate}from"../chunk-UONWIAII.js";import"../chunk-SNDYD76W.js";import"../chunk-5OTS2G3M.js";import"../chunk-36BRD5J3.js";import"../chunk-JFSYWEHD.js";import"../chunk-K7U4RWXJ.js";import"../chunk-VJPJNCB4.js";import"../chunk-J75ZT2JQ.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-T53TXXOC.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-OVNRVFWS.js";import"../chunk-C3QOHMR6.js";
2
+ export{DateRangePicker as default,presetRange,toISODate}from"../chunk-KSYNJTVA.js";import"../chunk-SNDYD76W.js";import"../chunk-5OTS2G3M.js";import"../chunk-36BRD5J3.js";import"../chunk-JFSYWEHD.js";import"../chunk-K7U4RWXJ.js";import"../chunk-VJPJNCB4.js";import"../chunk-J75ZT2JQ.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-OVNRVFWS.js";import"../chunk-C3QOHMR6.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{DisplayChips as default}from"../chunk-ZSTBFMQE.js";import"../chunk-QMQVOUIV.js";import"../chunk-ABJ4LWOW.js";import"../chunk-VJPJNCB4.js";import"../chunk-J75ZT2JQ.js";import"../chunk-Z3WKHMVB.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-T53TXXOC.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-OVNRVFWS.js";import"../chunk-C3QOHMR6.js";
2
+ export{DisplayChips as default}from"../chunk-GATOVTJT.js";import"../chunk-7T3COEQK.js";import"../chunk-4TL3MRRE.js";import"../chunk-VJPJNCB4.js";import"../chunk-J75ZT2JQ.js";import"../chunk-2LXTJXWC.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-OVNRVFWS.js";import"../chunk-C3QOHMR6.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{FilePicker_default as default}from"../chunk-UOOHE3FX.js";import"../chunk-MVQBVPWP.js";import"../chunk-CQXV3SJA.js";import"../chunk-EZQXLIG3.js";import"../chunk-VAACOJ2H.js";import"../chunk-BOGBLZKS.js";import"../chunk-QMQVOUIV.js";import"../chunk-VJPJNCB4.js";import"../chunk-J75ZT2JQ.js";import"../chunk-Q5MD3VY6.js";import"../chunk-MRJKZWWV.js";import"../chunk-Z3WKHMVB.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-T53TXXOC.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-OVNRVFWS.js";import"../chunk-C3QOHMR6.js";
2
+ export{FilePicker_default as default}from"../chunk-6EJ7G234.js";import"../chunk-MVQBVPWP.js";import"../chunk-LI7D6SMK.js";import"../chunk-FARRGETL.js";import"../chunk-VAACOJ2H.js";import"../chunk-5SULG7D5.js";import"../chunk-7T3COEQK.js";import"../chunk-VJPJNCB4.js";import"../chunk-J75ZT2JQ.js";import"../chunk-Q5MD3VY6.js";import"../chunk-MRJKZWWV.js";import"../chunk-2LXTJXWC.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-OVNRVFWS.js";import"../chunk-C3QOHMR6.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{IconButton_default as default}from"../chunk-JHDWTYZ4.js";import"../chunk-K7U4RWXJ.js";import"../chunk-ABJ4LWOW.js";import"../chunk-Z3WKHMVB.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-T53TXXOC.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";
2
+ export{IconButton_default as default}from"../chunk-HMZLRXLA.js";import"../chunk-K7U4RWXJ.js";import"../chunk-4TL3MRRE.js";import"../chunk-2LXTJXWC.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{IconPicker as default}from"../chunk-BKWLFZHI.js";import"../chunk-FND3BDOO.js";import"../chunk-JHDWTYZ4.js";import"../chunk-CDAJKLGL.js";import"../chunk-K7U4RWXJ.js";import"../chunk-ABJ4LWOW.js";import"../chunk-VJPJNCB4.js";import"../chunk-J75ZT2JQ.js";import"../chunk-Z3WKHMVB.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-T53TXXOC.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-OVNRVFWS.js";import"../chunk-C3QOHMR6.js";
2
+ export{IconPicker as default}from"../chunk-PK4ZY4GZ.js";import"../chunk-RNBM5JZI.js";import"../chunk-HMZLRXLA.js";import"../chunk-CDAJKLGL.js";import"../chunk-K7U4RWXJ.js";import"../chunk-4TL3MRRE.js";import"../chunk-VJPJNCB4.js";import"../chunk-J75ZT2JQ.js";import"../chunk-2LXTJXWC.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-OVNRVFWS.js";import"../chunk-C3QOHMR6.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{InputNumber_default as default}from"../chunk-FDIJEOGV.js";import"../chunk-E4Z5OXBI.js";import"../chunk-JHDWTYZ4.js";import"../chunk-JFSYWEHD.js";import"../chunk-K7U4RWXJ.js";import"../chunk-ABJ4LWOW.js";import"../chunk-VJPJNCB4.js";import"../chunk-J75ZT2JQ.js";import"../chunk-Z3WKHMVB.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-T53TXXOC.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-OVNRVFWS.js";import"../chunk-C3QOHMR6.js";
2
+ export{InputNumber_default as default}from"../chunk-SWSN3HZX.js";import"../chunk-E4Z5OXBI.js";import"../chunk-HMZLRXLA.js";import"../chunk-JFSYWEHD.js";import"../chunk-K7U4RWXJ.js";import"../chunk-4TL3MRRE.js";import"../chunk-VJPJNCB4.js";import"../chunk-J75ZT2JQ.js";import"../chunk-2LXTJXWC.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-OVNRVFWS.js";import"../chunk-C3QOHMR6.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{TextLinkField,LinkPicker as default}from"../chunk-Y5W6POQE.js";import"../chunk-DXQCNU5I.js";import"../chunk-OJ3RN3BG.js";import"../chunk-EO5RLFRX.js";import"../chunk-TUT6SGH2.js";import"../chunk-UNEJ2ABD.js";import"../chunk-EQKUFYX6.js";import"../chunk-E4Z5OXBI.js";import"../chunk-UJUTS6LJ.js";import"../chunk-PJPK2ADX.js";import"../chunk-JFSYWEHD.js";import"../chunk-UGTRSRIW.js";import"../chunk-QR4RM7PO.js";import"../chunk-FSP63GKK.js";import"../chunk-K7U4RWXJ.js";import"../chunk-ABJ4LWOW.js";import"../chunk-VJPJNCB4.js";import"../chunk-J75ZT2JQ.js";import"../chunk-Q5MD3VY6.js";import"../chunk-MRJKZWWV.js";import"../chunk-Z3WKHMVB.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-T53TXXOC.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-OVNRVFWS.js";import"../chunk-C3QOHMR6.js";
2
+ export{TextLinkField,LinkPicker as default}from"../chunk-T2VNNW6Z.js";import"../chunk-YYUICWSB.js";import"../chunk-3S52QOEP.js";import"../chunk-EO5RLFRX.js";import"../chunk-TUT6SGH2.js";import"../chunk-UNEJ2ABD.js";import"../chunk-EQKUFYX6.js";import"../chunk-E4Z5OXBI.js";import"../chunk-UJUTS6LJ.js";import"../chunk-PJPK2ADX.js";import"../chunk-JFSYWEHD.js";import"../chunk-UGTRSRIW.js";import"../chunk-QR4RM7PO.js";import"../chunk-UDD7GB4F.js";import"../chunk-K7U4RWXJ.js";import"../chunk-4TL3MRRE.js";import"../chunk-VJPJNCB4.js";import"../chunk-J75ZT2JQ.js";import"../chunk-Q5MD3VY6.js";import"../chunk-MRJKZWWV.js";import"../chunk-2LXTJXWC.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-OVNRVFWS.js";import"../chunk-C3QOHMR6.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{MediaUploadField as default}from"../chunk-Z5UVBCEE.js";import"../chunk-PMJMPYLQ.js";import"../chunk-MVQBVPWP.js";export{mediaFileName}from"../chunk-CQXV3SJA.js";import"../chunk-EZQXLIG3.js";import"../chunk-BF2G42QU.js";import"../chunk-4G5VLI7E.js";import"../chunk-VAACOJ2H.js";import"../chunk-25RR3GQW.js";import"../chunk-BOGBLZKS.js";import"../chunk-QMQVOUIV.js";import"../chunk-VJPJNCB4.js";import"../chunk-J75ZT2JQ.js";import"../chunk-Q5MD3VY6.js";import"../chunk-MRJKZWWV.js";import"../chunk-Z3WKHMVB.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-T53TXXOC.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-OVNRVFWS.js";import"../chunk-C3QOHMR6.js";
2
+ export{MediaUploadField as default}from"../chunk-RKWGWBET.js";import"../chunk-PMJMPYLQ.js";import"../chunk-MVQBVPWP.js";export{mediaFileName}from"../chunk-LI7D6SMK.js";import"../chunk-FARRGETL.js";import"../chunk-CHNYSP6K.js";import"../chunk-4G5VLI7E.js";import"../chunk-VAACOJ2H.js";import"../chunk-25RR3GQW.js";import"../chunk-5SULG7D5.js";import"../chunk-7T3COEQK.js";import"../chunk-VJPJNCB4.js";import"../chunk-J75ZT2JQ.js";import"../chunk-Q5MD3VY6.js";import"../chunk-MRJKZWWV.js";import"../chunk-2LXTJXWC.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-OVNRVFWS.js";import"../chunk-C3QOHMR6.js";