lingee-ui 0.0.24 → 0.0.26

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 (51) hide show
  1. package/README.md +3 -2
  2. package/dist/button/index.d.mts +1 -1
  3. package/dist/button/index.d.ts +1 -1
  4. package/dist/chunk-CATPKTPR.mjs +1 -0
  5. package/dist/{chunk-UERX2ELG.js → chunk-ENYYJ7ES.js} +1 -1
  6. package/dist/{chunk-BSZVT2WO.js → chunk-IVBJOGYS.js} +1 -1
  7. package/dist/chunk-TDJG7ZB6.js +1 -0
  8. package/dist/{chunk-PSF4FKBF.js → chunk-VKZD4ESR.js} +1 -1
  9. package/dist/{chunk-XLUVO6OV.mjs → chunk-VLFNSJ2J.mjs} +1 -1
  10. package/dist/{chunk-TZBVVMLM.mjs → chunk-XVM4RPVQ.mjs} +1 -1
  11. package/dist/{chunk-IJJQRKPH.mjs → chunk-Y463GZ2F.mjs} +1 -1
  12. package/dist/{index-7pb5YOcq.d.mts → index-BVXwKHfX.d.mts} +1 -1
  13. package/dist/{index-7pb5YOcq.d.ts → index-BVXwKHfX.d.ts} +1 -1
  14. package/dist/index.css +1 -1
  15. package/dist/index.d.mts +266 -11
  16. package/dist/index.d.ts +266 -11
  17. package/dist/index.js +2 -2
  18. package/dist/index.mjs +2 -2
  19. package/dist/input/index.js +1 -1
  20. package/dist/input/index.mjs +1 -1
  21. package/dist/tabs/index.css +1 -1
  22. package/dist/tabs/index.d.mts +1 -1
  23. package/dist/tabs/index.d.ts +1 -1
  24. package/dist/tabs/index.js +1 -1
  25. package/dist/tabs/index.mjs +1 -1
  26. package/dist/toast/index.js +1 -1
  27. package/dist/toast/index.mjs +1 -1
  28. package/dist/tokens.css +1 -1
  29. package/dist/tree/index.css +1 -1
  30. package/dist/tree/index.js +1 -1
  31. package/dist/tree/index.mjs +1 -1
  32. package/package.json +1 -1
  33. package/skill/AGENTS-SNIPPET.md +38 -10
  34. package/skill/SKILL.md +14 -11
  35. package/skill/VERSION.json +5 -5
  36. package/skill/references/components/cascader.md +97 -0
  37. package/skill/references/components/color-picker.md +11 -4
  38. package/skill/references/components/date-picker.md +1 -1
  39. package/skill/references/components/dialog.md +1 -1
  40. package/skill/references/components/drawer.md +1 -1
  41. package/skill/references/components/scroll-area.md +2 -2
  42. package/skill/references/components/slider.md +1 -1
  43. package/skill/references/components/table.md +2 -1
  44. package/skill/references/components/timeline.md +75 -0
  45. package/skill/references/components/tree-select.md +86 -0
  46. package/skill/references/components/upload.md +2 -1
  47. package/skill/references/icons.md +5 -3
  48. package/skill/references/setup.md +11 -3
  49. package/skill/references/tokens.md +36 -9
  50. package/dist/chunk-BNUZ57QH.mjs +0 -1
  51. package/dist/chunk-JYFAP23O.js +0 -1
package/README.md CHANGED
@@ -4,7 +4,7 @@ Kingdee Lingee Design 体系的 React UI 组件库,轻量、可定制、支持
4
4
 
5
5
  ## 特性
6
6
 
7
- - 🎨 **CSS 变量 Token 体系** — 三层设计(Primitives → Semantic Light/Dark → Component),支持亮/暗主题切换
7
+ - 🎨 **CSS 变量 Token 体系** — 三层设计(Primitives → Semantic Light/Dark/Warm → Component),支持亮色 / 暗色 / 暖棕主题切换
8
8
  - 📦 **按需加载** — 多入口构建,Tree-shaking 友好
9
9
  - 🔧 **TypeScript** — 完整类型定义
10
10
  - 🌍 **国际化** — 内置中英文语言包
@@ -78,10 +78,11 @@ config/
78
78
  ├── primitives-other.less ← 非颜色基础值:spacing/radius/typography
79
79
  ├── tokens-color-light.less ← 语义层亮色:--lg-g-{类别}-{名称}
80
80
  ├── tokens-color-dark.less ← 语义层暗色:[data-theme="dark"] 覆盖
81
+ ├── tokens-color-warm.less ← 语义层暖棕:[data-theme="warm"] 覆盖
81
82
  └── tokens.less ← 总入口(import 以上文件)
82
83
  ```
83
84
 
84
- 暗色模式:添加 `[data-theme="dark"]` 到 html 即可自动切换。
85
+ 主题切换:给 html 设 `data-theme="dark"`(暗色)或 `data-theme="warm"`(暖棕)即可自动切换,不设为亮色。
85
86
 
86
87
  完整 Token 列表参见 `config/tokens-color-light.less`。
87
88
 
@@ -1,3 +1,3 @@
1
1
  import 'class-variance-authority/types';
2
2
  import 'react';
3
- export { a as Button, B as ButtonProps, b as ButtonShape, d as ButtonVariant, e as buttonVariants } from '../index-7pb5YOcq.mjs';
3
+ export { a as Button, B as ButtonProps, b as ButtonShape, d as ButtonVariant, e as buttonVariants } from '../index-BVXwKHfX.mjs';
@@ -1,3 +1,3 @@
1
1
  import 'class-variance-authority/types';
2
2
  import 'react';
3
- export { a as Button, B as ButtonProps, b as ButtonShape, d as ButtonVariant, e as buttonVariants } from '../index-7pb5YOcq.js';
3
+ export { a as Button, B as ButtonProps, b as ButtonShape, d as ButtonVariant, e as buttonVariants } from '../index-BVXwKHfX.js';
@@ -0,0 +1 @@
1
+ import {b}from'./chunk-Z4J7SMTI.mjs';import {c}from'./chunk-YURAXA54.mjs';import {a}from'./chunk-DN2VKVCV.mjs';import Qe,{createContext,useContext,useMemo,useRef,useEffect}from'react';import {Toaster,toast}from'sonner';import {XCircleFill,ExclamationCircleFill1,CheckCircleFill,ExclamationCircleFill,XLg}from'lingee-icon';import {jsx,jsxs}from'react/jsx-runtime';var Te={locale:"zh-CN",Button:{},Breadcrumb:{more:"\u66F4\u591A",back:"\u8FD4\u56DE",label:"\u9762\u5305\u5C51\u5BFC\u822A",scrollLeft:"\u5411\u5DE6\u6EDA\u52A8",scrollRight:"\u5411\u53F3\u6EDA\u52A8"},Select:{loading:"\u52A0\u8F7D\u4E2D",loadError:"\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5",loadFailed:"\u52A0\u8F7D\u5931\u8D25",notFound:"\u641C\u7D22\u65E0\u7ED3\u679C",clear:"\u6E05\u7A7A"},Dropdown:{clear:"\u6E05\u9664",loading:"\u52A0\u8F7D\u4E2D",loadError:"\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5",empty:"\u6682\u65E0\u6570\u636E"},Tabs:{scrollLeft:"\u5411\u5DE6\u6EDA\u52A8",scrollRight:"\u5411\u53F3\u6EDA\u52A8"},Carousel:{carousel:"\u8F6E\u64AD",prev:"\u4E0A\u4E00\u5F20",next:"\u4E0B\u4E00\u5F20",goToPage:"\u8DF3\u8F6C\u5230\u7B2C {page} \u5F20"},Form:{required:"{label}\u4E0D\u80FD\u4E3A\u7A7A",requiredNoLabel:"\u6B64\u9879\u4E0D\u80FD\u4E3A\u7A7A"},Tag:{close:"\u5173\u95ED"},Upload:{retry:"\u91CD\u65B0\u4E0A\u4F20",remove:"\u79FB\u9664\u6587\u4EF6",removeShort:"\u79FB\u9664",dragText:"\u62D6\u62FD\u6587\u4EF6\u5230\u6B64\u5904\uFF0C\u6216",clickUpload:"\u70B9\u51FB\u4E0A\u4F20",upload:"\u4E0A\u4F20"},Cascader:{empty:"\u6682\u65E0\u6570\u636E"},TreeSelect:{empty:"\u6682\u65E0\u6570\u636E"},ColorPicker:{placeholder:"\u8BF7\u9009\u62E9\u989C\u8272",hexInput:"\u5341\u516D\u8FDB\u5236\u8272\u503C",alphaInput:"\u900F\u660E\u5EA6"},DatePicker:{placeholder:"\u5E74/\u6708/\u65E5",today:"\u4ECA\u5929",prevYear:"\u4E0A\u4E00\u5E74",nextYear:"\u4E0B\u4E00\u5E74",prevMonth:"\u4E0A\u4E00\u6708",nextMonth:"\u4E0B\u4E00\u6708",prevDecade:"\u4E0A\u4E00\u7EC4\u5E74\u4EFD",nextDecade:"\u4E0B\u4E00\u7EC4\u5E74\u4EFD",months:["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"],yearFormat:"{year}\u5E74",monthFormat:"{month}\u6708"},RangePicker:{startPlaceholder:"\u5E74/\u6708/\u65E5",endPlaceholder:"\u5E74/\u6708/\u65E5"},TimePicker:{now:"\u73B0\u5728",confirm:"\u786E\u5B9A",placeholder:"\u65F6:\u5206",placeholderFull:"\u65F6:\u5206:\u79D2"},Table:{loading:"\u52A0\u8F7D\u4E2D",empty:"\u6682\u65E0\u6570\u636E",loadError:"\u52A0\u8F7D\u5931\u8D25"},Tree:{empty:"\u6682\u65E0\u6570\u636E"},Pagination:{total:"\u5171 {total} \u6761",prevPage:"\u4E0A\u4E00\u9875",nextPage:"\u4E0B\u4E00\u9875",itemsPerPage:"{size}\u6761/\u9875",jumpTo:"\u8DF3\u81F3",page:"\u9875"},Dialog:{close:"\u5173\u95ED"},Drawer:{close:"\u5173\u95ED"},Input:{clear:"\u6E05\u7A7A",expand:"\u5C55\u5F00\u8F93\u5165\u6846"},Alert:{close:"\u5173\u95ED"},Toast:{close:"\u5173\u95ED\u6D88\u606F"},Spin:{loading:"\u52A0\u8F7D\u4E2D"},Empty:{retry:"\u91CD\u8BD5"},InfiniteScroll:{loading:"\u52A0\u8F7D\u4E2D",noMore:"\u6CA1\u6709\u66F4\u591A\u4E86",loadFailed:"\u52A0\u8F7D\u5931\u8D25"},Sidebar:{expand:"\u5C55\u5F00",collapse:"\u6536\u8D77",loading:"\u52A0\u8F7D\u4E2D",empty:"\u6682\u65E0\u6570\u636E",loadError:"\u52A0\u8F7D\u5931\u8D25"},PersonPicker:{title:"\u9009\u62E9\u4EBA\u5458",ok:"\u786E\u5B9A",cancel:"\u53D6\u6D88",searchPlaceholder:"\u641C\u7D22\u59D3\u540D\u3001\u5DE5\u53F7",tabRecentContacts:"\u6700\u8FD1\u8054\u7CFB\u4EBA",tabRecentGroups:"\u6700\u8FD1\u7FA4\u7EC4",tabOrganization:"\u9009\u62E9\u7EC4\u7EC7",tabPerson:"\u9009\u62E9\u4EBA\u5458",selectAll:"\u5168\u9009",selectedTitle:"\u5DF2\u9009",groupPerson:"\u4EBA\u5458",groupGroup:"\u7FA4\u7EC4",groupOrg:"\u7EC4\u7EC7",remove:"\u79FB\u9664",drillDown:"\u67E5\u770B\u4E0B\u7EA7",jumpTo:"\u8DF3\u8F6C\u5230",empty:"\u6682\u65E0\u6570\u636E",searchEmpty:"\u641C\u7D22\u65E0\u7ED3\u679C",loadFailed:"\u52A0\u8F7D\u5931\u8D25",loadFailedDetail:"\u670D\u52A1\u54CD\u5E94\u5F02\u5E38\u6216\u7F51\u7EDC\u4E0D\u53EF\u7528",retry:"\u91CD\u8BD5"}},C=Te;var F=new Map,z=0;function K(){return z+=1,{id:z}}function U(e,o,t){F.set(e.id,{site:o,depth:t});}function Y(e){F.delete(e.id);}function he(){let e;for(let o of F.values())(!e||o.depth>=e.depth)&&(e=o);return e?.site}function R(){return he()==="lingee"}var q={dialog:{}},P=createContext(q),M=new Map,j=0;function J(){return j+=1,{id:j}}function V(e,o,t){M.set(e.id,{config:o,depth:t});}function W(e){M.delete(e.id);}function xe(){let e;for(let o of M.values())(!e||o.depth>=e.depth)&&(e=o);return e?.config??q}function be(){return useContext(P)}var Ce={locale:"en-US",Button:{},Breadcrumb:{more:"More",back:"Back",label:"Breadcrumb",scrollLeft:"Scroll left",scrollRight:"Scroll right"},Select:{loading:"Loading",loadError:"Failed to load, please retry",loadFailed:"Failed to load",notFound:"No results found",clear:"Clear"},Dropdown:{clear:"Clear",loading:"Loading",loadError:"Failed to load, please retry",empty:"No data"},Tabs:{scrollLeft:"Scroll left",scrollRight:"Scroll right"},Carousel:{carousel:"Carousel",prev:"Previous slide",next:"Next slide",goToPage:"Go to slide {page}"},Form:{required:"{label} is required",requiredNoLabel:"This field is required"},Tag:{close:"Close"},Upload:{retry:"Retry upload",remove:"Remove file",removeShort:"Remove",dragText:"Drag files here, or ",clickUpload:"click to upload",upload:"Upload"},Cascader:{empty:"No data"},TreeSelect:{empty:"No data"},ColorPicker:{placeholder:"Select a color",hexInput:"Hex color value",alphaInput:"Opacity"},DatePicker:{placeholder:"YYYY/MM/DD",today:"Today",prevYear:"Previous year",nextYear:"Next year",prevMonth:"Previous month",nextMonth:"Next month",prevDecade:"Previous decade",nextDecade:"Next decade",months:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],yearFormat:"{year}",monthFormat:"{month}"},RangePicker:{startPlaceholder:"Start date",endPlaceholder:"End date"},TimePicker:{now:"Now",confirm:"OK",placeholder:"HH:mm",placeholderFull:"HH:mm:ss"},Table:{loading:"Loading",empty:"No data",loadError:"Failed to load"},Tree:{empty:"No data"},Pagination:{total:"{total} items",prevPage:"Previous page",nextPage:"Next page",itemsPerPage:"{size} / page",jumpTo:"Go to",page:""},Dialog:{close:"Close"},Drawer:{close:"Close"},Input:{clear:"Clear",expand:"Expand input"},Alert:{close:"Close"},Toast:{close:"Close message"},Spin:{loading:"Loading"},Empty:{retry:"Retry"},InfiniteScroll:{loading:"Loading",noMore:"No more items",loadFailed:"Failed to load"},Sidebar:{expand:"Expand",collapse:"Collapse",loading:"Loading",empty:"No data",loadError:"Failed to load"},PersonPicker:{title:"Select people",ok:"OK",cancel:"Cancel",searchPlaceholder:"Search by name or employee ID",tabRecentContacts:"Recent contacts",tabRecentGroups:"Recent groups",tabOrganization:"Organization",tabPerson:"People",selectAll:"Select all",selectedTitle:"Selected",groupPerson:"People",groupGroup:"Groups",groupOrg:"Departments",remove:"Remove",drillDown:"View children",jumpTo:"Jump to ",empty:"No data",searchEmpty:"No results",loadFailed:"Failed to load",loadFailedDetail:"The service is unavailable or the network is unreachable",retry:"Retry"}},Pe=Ce;var ve={locale:"zh-TW",Button:{},Breadcrumb:{more:"\u66F4\u591A",back:"\u8FD4\u56DE",label:"\u9EB5\u5305\u5C51\u5C0E\u822A",scrollLeft:"\u5411\u5DE6\u6EFE\u52D5",scrollRight:"\u5411\u53F3\u6EFE\u52D5"},Select:{loading:"\u8F09\u5165\u4E2D",loadError:"\u8F09\u5165\u5931\u6557\uFF0C\u8ACB\u91CD\u8A66",loadFailed:"\u8F09\u5165\u5931\u6557",notFound:"\u641C\u5C0B\u7121\u7D50\u679C",clear:"\u6E05\u7A7A"},Dropdown:{clear:"\u6E05\u9664",loading:"\u8F09\u5165\u4E2D",loadError:"\u8F09\u5165\u5931\u6557\uFF0C\u8ACB\u91CD\u8A66",empty:"\u66AB\u7121\u8CC7\u6599"},Tabs:{scrollLeft:"\u5411\u5DE6\u6EFE\u52D5",scrollRight:"\u5411\u53F3\u6EFE\u52D5"},Carousel:{carousel:"\u8F2A\u64AD",prev:"\u4E0A\u4E00\u5F35",next:"\u4E0B\u4E00\u5F35",goToPage:"\u8DF3\u8F49\u5230\u7B2C {page} \u5F35"},Form:{required:"{label}\u4E0D\u80FD\u70BA\u7A7A",requiredNoLabel:"\u6B64\u9805\u4E0D\u80FD\u70BA\u7A7A"},Tag:{close:"\u95DC\u9589"},Upload:{retry:"\u91CD\u65B0\u4E0A\u50B3",remove:"\u79FB\u9664\u6A94\u6848",removeShort:"\u79FB\u9664",dragText:"\u62D6\u62FD\u6A94\u6848\u5230\u6B64\u8655\uFF0C\u6216",clickUpload:"\u9EDE\u9078\u4E0A\u50B3",upload:"\u4E0A\u50B3"},Cascader:{empty:"\u66AB\u7121\u8CC7\u6599"},TreeSelect:{empty:"\u66AB\u7121\u8CC7\u6599"},ColorPicker:{placeholder:"\u8ACB\u9078\u64C7\u984F\u8272",hexInput:"\u5341\u516D\u9032\u4F4D\u8272\u503C",alphaInput:"\u900F\u660E\u5EA6"},DatePicker:{placeholder:"\u5E74/\u6708/\u65E5",today:"\u4ECA\u5929",prevYear:"\u4E0A\u4E00\u5E74",nextYear:"\u4E0B\u4E00\u5E74",prevMonth:"\u4E0A\u4E00\u6708",nextMonth:"\u4E0B\u4E00\u6708",prevDecade:"\u4E0A\u4E00\u7D44\u5E74\u4EFD",nextDecade:"\u4E0B\u4E00\u7D44\u5E74\u4EFD",months:["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"],yearFormat:"{year}\u5E74",monthFormat:"{month}\u6708"},RangePicker:{startPlaceholder:"\u5E74/\u6708/\u65E5",endPlaceholder:"\u5E74/\u6708/\u65E5"},TimePicker:{now:"\u73FE\u5728",confirm:"\u78BA\u5B9A",placeholder:"\u6642:\u5206",placeholderFull:"\u6642:\u5206:\u79D2"},Table:{loading:"\u8F09\u5165\u4E2D",empty:"\u66AB\u7121\u8CC7\u6599",loadError:"\u8F09\u5165\u5931\u6557"},Tree:{empty:"\u66AB\u7121\u8CC7\u6599"},Pagination:{total:"\u5171 {total} \u689D",prevPage:"\u4E0A\u4E00\u9801",nextPage:"\u4E0B\u4E00\u9801",itemsPerPage:"{size}\u689D/\u9801",jumpTo:"\u8DF3\u81F3",page:"\u9801"},Dialog:{close:"\u95DC\u9589"},Drawer:{close:"\u95DC\u9589"},Input:{clear:"\u6E05\u7A7A",expand:"\u5C55\u958B\u8F38\u5165\u6846"},Alert:{close:"\u95DC\u9589"},Toast:{close:"\u95DC\u9589\u8A0A\u606F"},Spin:{loading:"\u8F09\u5165\u4E2D"},Empty:{retry:"\u91CD\u8A66"},InfiniteScroll:{loading:"\u8F09\u5165\u4E2D",noMore:"\u6C92\u6709\u66F4\u591A\u4E86",loadFailed:"\u8F09\u5165\u5931\u6557"},Sidebar:{expand:"\u5C55\u958B",collapse:"\u6536\u8D77",loading:"\u8F09\u5165\u4E2D",empty:"\u66AB\u7121\u8CC7\u6599",loadError:"\u8F09\u5165\u5931\u6557"},PersonPicker:{title:"\u9078\u64C7\u4EBA\u54E1",ok:"\u78BA\u5B9A",cancel:"\u53D6\u6D88",searchPlaceholder:"\u641C\u5C0B\u59D3\u540D\u3001\u5DE5\u865F",tabRecentContacts:"\u6700\u8FD1\u806F\u7D61\u4EBA",tabRecentGroups:"\u6700\u8FD1\u7FA4\u7D44",tabOrganization:"\u9078\u64C7\u7D44\u7E54",tabPerson:"\u9078\u64C7\u4EBA\u54E1",selectAll:"\u5168\u9078",selectedTitle:"\u5DF2\u9078",groupPerson:"\u4EBA\u54E1",groupGroup:"\u7FA4\u7D44",groupOrg:"\u7D44\u7E54",remove:"\u79FB\u9664",drillDown:"\u6AA2\u8996\u4E0B\u7D1A",jumpTo:"\u8DF3\u8F49\u5230",empty:"\u66AB\u7121\u8CC7\u6599",searchEmpty:"\u641C\u5C0B\u7121\u7D50\u679C",loadFailed:"\u8F09\u5165\u5931\u6557",loadFailedDetail:"\u670D\u52D9\u97FF\u61C9\u7570\u5E38\u6216\u7DB2\u8DEF\u4E0D\u53EF\u7528",retry:"\u91CD\u8A66"}},we=ve;var Se={locale:"ms-MY",Button:{},Breadcrumb:{more:"Lagi",back:"Kembali",label:"Serbuk roti",scrollLeft:"Tatal ke kiri",scrollRight:"Tatal ke kanan"},Select:{loading:"Memuatkan",loadError:"Gagal dimuatkan, sila cuba lagi",loadFailed:"Gagal dimuatkan",notFound:"Tiada hasil ditemui",clear:"Kosongkan"},Dropdown:{clear:"Kosongkan",loading:"Memuatkan",loadError:"Gagal dimuatkan, sila cuba lagi",empty:"Tiada data"},Tabs:{scrollLeft:"Tatal ke kiri",scrollRight:"Tatal ke kanan"},Carousel:{carousel:"Karusel",prev:"Slaid sebelumnya",next:"Slaid seterusnya",goToPage:"Pergi ke slaid {page}"},Form:{required:"{label} wajib diisi",requiredNoLabel:"Medan ini wajib diisi"},Tag:{close:"Tutup"},Upload:{retry:"Muat naik semula",remove:"Alih keluar fail",removeShort:"Alih keluar",dragText:"Seret fail ke sini, atau ",clickUpload:"klik untuk muat naik",upload:"Muat naik"},Cascader:{empty:"Tiada data"},TreeSelect:{empty:"Tiada data"},ColorPicker:{placeholder:"Pilih warna",hexInput:"Nilai warna heksadesimal",alphaInput:"Kelegapan"},DatePicker:{placeholder:"TTTT/BB/HH",today:"Hari ini",prevYear:"Tahun sebelumnya",nextYear:"Tahun seterusnya",prevMonth:"Bulan sebelumnya",nextMonth:"Bulan seterusnya",prevDecade:"Dekad sebelumnya",nextDecade:"Dekad seterusnya",months:["Jan","Feb","Mac","Apr","Mei","Jun","Jul","Ogo","Sep","Okt","Nov","Dis"],yearFormat:"{year}",monthFormat:"{month}"},RangePicker:{startPlaceholder:"Tarikh mula",endPlaceholder:"Tarikh tamat"},TimePicker:{now:"Sekarang",confirm:"OK",placeholder:"HH:mm",placeholderFull:"HH:mm:ss"},Table:{loading:"Memuatkan",empty:"Tiada data",loadError:"Gagal dimuatkan"},Tree:{empty:"Tiada data"},Pagination:{total:"{total} item",prevPage:"Halaman sebelumnya",nextPage:"Halaman seterusnya",itemsPerPage:"{size} / halaman",jumpTo:"Pergi ke",page:""},Dialog:{close:"Tutup"},Drawer:{close:"Tutup"},Input:{clear:"Kosongkan",expand:"Kembangkan input"},Alert:{close:"Tutup"},Toast:{close:"Tutup mesej"},Spin:{loading:"Memuatkan"},Empty:{retry:"Cuba lagi"},InfiniteScroll:{loading:"Memuatkan",noMore:"Tiada lagi item",loadFailed:"Gagal dimuatkan"},Sidebar:{expand:"Kembangkan",collapse:"Runtuhkan",loading:"Memuatkan",empty:"Tiada data",loadError:"Gagal dimuatkan"},PersonPicker:{title:"Pilih orang",ok:"OK",cancel:"Batal",searchPlaceholder:"Cari mengikut nama atau ID pekerja",tabRecentContacts:"Kenalan terkini",tabRecentGroups:"Kumpulan terkini",tabOrganization:"Organisasi",tabPerson:"Orang",selectAll:"Pilih semua",selectedTitle:"Dipilih",groupPerson:"Orang",groupGroup:"Kumpulan",groupOrg:"Jabatan",remove:"Alih keluar",drillDown:"Lihat subperingkat",jumpTo:"Lompat ke ",empty:"Tiada data",searchEmpty:"Tiada hasil",loadFailed:"Gagal dimuatkan",loadFailedDetail:"Perkhidmatan tidak tersedia atau rangkaian tidak dapat dicapai",retry:"Cuba lagi"}},De=Se;var Le={locale:"id-ID",Button:{},Breadcrumb:{more:"Lainnya",back:"Kembali",label:"Breadcrumb",scrollLeft:"Gulir ke kiri",scrollRight:"Gulir ke kanan"},Select:{loading:"Memuat",loadError:"Gagal memuat, silakan coba lagi",loadFailed:"Gagal memuat",notFound:"Tidak ada hasil",clear:"Hapus"},Dropdown:{clear:"Hapus",loading:"Memuat",loadError:"Gagal memuat, silakan coba lagi",empty:"Tidak ada data"},Tabs:{scrollLeft:"Gulir ke kiri",scrollRight:"Gulir ke kanan"},Carousel:{carousel:"Korsel",prev:"Slide sebelumnya",next:"Slide berikutnya",goToPage:"Buka slide {page}"},Form:{required:"{label} wajib diisi",requiredNoLabel:"Kolom ini wajib diisi"},Tag:{close:"Tutup"},Upload:{retry:"Unggah ulang",remove:"Hapus file",removeShort:"Hapus",dragText:"Seret file ke sini, atau ",clickUpload:"klik untuk mengunggah",upload:"Unggah"},Cascader:{empty:"Tidak ada data"},TreeSelect:{empty:"Tidak ada data"},ColorPicker:{placeholder:"Pilih warna",hexInput:"Nilai warna heksadesimal",alphaInput:"Opasitas"},DatePicker:{placeholder:"TTTT/BB/HH",today:"Hari ini",prevYear:"Tahun sebelumnya",nextYear:"Tahun berikutnya",prevMonth:"Bulan sebelumnya",nextMonth:"Bulan berikutnya",prevDecade:"Dekade sebelumnya",nextDecade:"Dekade berikutnya",months:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Agu","Sep","Okt","Nov","Des"],yearFormat:"{year}",monthFormat:"{month}"},RangePicker:{startPlaceholder:"Tanggal mulai",endPlaceholder:"Tanggal akhir"},TimePicker:{now:"Sekarang",confirm:"OK",placeholder:"HH:mm",placeholderFull:"HH:mm:ss"},Table:{loading:"Memuat",empty:"Tidak ada data",loadError:"Gagal memuat"},Tree:{empty:"Tidak ada data"},Pagination:{total:"{total} item",prevPage:"Halaman sebelumnya",nextPage:"Halaman berikutnya",itemsPerPage:"{size} / halaman",jumpTo:"Ke halaman",page:""},Dialog:{close:"Tutup"},Drawer:{close:"Tutup"},Input:{clear:"Hapus",expand:"Perluas input"},Alert:{close:"Tutup"},Toast:{close:"Tutup pesan"},Spin:{loading:"Memuat"},Empty:{retry:"Coba lagi"},InfiniteScroll:{loading:"Memuat",noMore:"Tidak ada item lagi",loadFailed:"Gagal memuat"},Sidebar:{expand:"Perluas",collapse:"Ciutkan",loading:"Memuat",empty:"Tidak ada data",loadError:"Gagal memuat"},PersonPicker:{title:"Pilih orang",ok:"OK",cancel:"Batal",searchPlaceholder:"Cari berdasarkan nama atau ID karyawan",tabRecentContacts:"Kontak terbaru",tabRecentGroups:"Grup terbaru",tabOrganization:"Organisasi",tabPerson:"Orang",selectAll:"Pilih semua",selectedTitle:"Dipilih",groupPerson:"Orang",groupGroup:"Grup",groupOrg:"Departemen",remove:"Hapus",drillDown:"Lihat subtingkat",jumpTo:"Lompat ke ",empty:"Tidak ada data",searchEmpty:"Tidak ada hasil",loadFailed:"Gagal memuat",loadFailedDetail:"Layanan tidak tersedia atau jaringan tidak dapat dijangkau",retry:"Coba lagi"}},He=Le;var Ee={locale:"th-TH",Button:{},Breadcrumb:{more:"\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E40\u0E15\u0E34\u0E21",back:"\u0E22\u0E49\u0E2D\u0E19\u0E01\u0E25\u0E31\u0E1A",label:"\u0E40\u0E2A\u0E49\u0E19\u0E17\u0E32\u0E07\u0E19\u0E33\u0E17\u0E32\u0E07",scrollLeft:"\u0E40\u0E25\u0E37\u0E48\u0E2D\u0E19\u0E44\u0E1B\u0E17\u0E32\u0E07\u0E0B\u0E49\u0E32\u0E22",scrollRight:"\u0E40\u0E25\u0E37\u0E48\u0E2D\u0E19\u0E44\u0E1B\u0E17\u0E32\u0E07\u0E02\u0E27\u0E32"},Select:{loading:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E42\u0E2B\u0E25\u0E14",loadError:"\u0E42\u0E2B\u0E25\u0E14\u0E44\u0E21\u0E48\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08 \u0E42\u0E1B\u0E23\u0E14\u0E25\u0E2D\u0E07\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07",loadFailed:"\u0E42\u0E2B\u0E25\u0E14\u0E44\u0E21\u0E48\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08",notFound:"\u0E44\u0E21\u0E48\u0E1E\u0E1A\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C",clear:"\u0E25\u0E49\u0E32\u0E07"},Dropdown:{clear:"\u0E25\u0E49\u0E32\u0E07",loading:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E42\u0E2B\u0E25\u0E14",loadError:"\u0E42\u0E2B\u0E25\u0E14\u0E44\u0E21\u0E48\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08 \u0E42\u0E1B\u0E23\u0E14\u0E25\u0E2D\u0E07\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07",empty:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25"},Tabs:{scrollLeft:"\u0E40\u0E25\u0E37\u0E48\u0E2D\u0E19\u0E44\u0E1B\u0E17\u0E32\u0E07\u0E0B\u0E49\u0E32\u0E22",scrollRight:"\u0E40\u0E25\u0E37\u0E48\u0E2D\u0E19\u0E44\u0E1B\u0E17\u0E32\u0E07\u0E02\u0E27\u0E32"},Carousel:{carousel:"\u0E20\u0E32\u0E1E\u0E2A\u0E44\u0E25\u0E14\u0E4C",prev:"\u0E2A\u0E44\u0E25\u0E14\u0E4C\u0E01\u0E48\u0E2D\u0E19\u0E2B\u0E19\u0E49\u0E32",next:"\u0E2A\u0E44\u0E25\u0E14\u0E4C\u0E16\u0E31\u0E14\u0E44\u0E1B",goToPage:"\u0E44\u0E1B\u0E17\u0E35\u0E48\u0E2A\u0E44\u0E25\u0E14\u0E4C {page}"},Form:{required:"\u0E42\u0E1B\u0E23\u0E14\u0E01\u0E23\u0E2D\u0E01{label}",requiredNoLabel:"\u0E08\u0E33\u0E40\u0E1B\u0E47\u0E19\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E23\u0E2D\u0E01\u0E0A\u0E48\u0E2D\u0E07\u0E19\u0E35\u0E49"},Tag:{close:"\u0E1B\u0E34\u0E14"},Upload:{retry:"\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07",remove:"\u0E25\u0E1A\u0E44\u0E1F\u0E25\u0E4C",removeShort:"\u0E25\u0E1A",dragText:"\u0E25\u0E32\u0E01\u0E44\u0E1F\u0E25\u0E4C\u0E21\u0E32\u0E17\u0E35\u0E48\u0E19\u0E35\u0E48 \u0E2B\u0E23\u0E37\u0E2D",clickUpload:"\u0E04\u0E25\u0E34\u0E01\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14",upload:"\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14"},Cascader:{empty:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25"},TreeSelect:{empty:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25"},ColorPicker:{placeholder:"\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E2A\u0E35",hexInput:"\u0E04\u0E48\u0E32\u0E2A\u0E35\u0E10\u0E32\u0E19\u0E2A\u0E34\u0E1A\u0E2B\u0E01",alphaInput:"\u0E04\u0E27\u0E32\u0E21\u0E17\u0E36\u0E1A\u0E41\u0E2A\u0E07"},DatePicker:{placeholder:"\u0E1B\u0E1B\u0E1B\u0E1B/\u0E14\u0E14/\u0E27\u0E27",today:"\u0E27\u0E31\u0E19\u0E19\u0E35\u0E49",prevYear:"\u0E1B\u0E35\u0E01\u0E48\u0E2D\u0E19\u0E2B\u0E19\u0E49\u0E32",nextYear:"\u0E1B\u0E35\u0E16\u0E31\u0E14\u0E44\u0E1B",prevMonth:"\u0E40\u0E14\u0E37\u0E2D\u0E19\u0E01\u0E48\u0E2D\u0E19\u0E2B\u0E19\u0E49\u0E32",nextMonth:"\u0E40\u0E14\u0E37\u0E2D\u0E19\u0E16\u0E31\u0E14\u0E44\u0E1B",prevDecade:"\u0E17\u0E28\u0E27\u0E23\u0E23\u0E29\u0E01\u0E48\u0E2D\u0E19\u0E2B\u0E19\u0E49\u0E32",nextDecade:"\u0E17\u0E28\u0E27\u0E23\u0E23\u0E29\u0E16\u0E31\u0E14\u0E44\u0E1B",months:["\u0E21.\u0E04.","\u0E01.\u0E1E.","\u0E21\u0E35.\u0E04.","\u0E40\u0E21.\u0E22.","\u0E1E.\u0E04.","\u0E21\u0E34.\u0E22.","\u0E01.\u0E04.","\u0E2A.\u0E04.","\u0E01.\u0E22.","\u0E15.\u0E04.","\u0E1E.\u0E22.","\u0E18.\u0E04."],yearFormat:"{year}",monthFormat:"{month}"},RangePicker:{startPlaceholder:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19",endPlaceholder:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E2A\u0E34\u0E49\u0E19\u0E2A\u0E38\u0E14"},TimePicker:{now:"\u0E15\u0E2D\u0E19\u0E19\u0E35\u0E49",confirm:"\u0E15\u0E01\u0E25\u0E07",placeholder:"HH:mm",placeholderFull:"HH:mm:ss"},Table:{loading:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E42\u0E2B\u0E25\u0E14",empty:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25",loadError:"\u0E42\u0E2B\u0E25\u0E14\u0E44\u0E21\u0E48\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08"},Tree:{empty:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25"},Pagination:{total:"\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14 {total} \u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",prevPage:"\u0E2B\u0E19\u0E49\u0E32\u0E01\u0E48\u0E2D\u0E19\u0E2B\u0E19\u0E49\u0E32",nextPage:"\u0E2B\u0E19\u0E49\u0E32\u0E16\u0E31\u0E14\u0E44\u0E1B",itemsPerPage:"{size} / \u0E2B\u0E19\u0E49\u0E32",jumpTo:"\u0E44\u0E1B\u0E17\u0E35\u0E48\u0E2B\u0E19\u0E49\u0E32",page:""},Dialog:{close:"\u0E1B\u0E34\u0E14"},Drawer:{close:"\u0E1B\u0E34\u0E14"},Input:{clear:"\u0E25\u0E49\u0E32\u0E07",expand:"\u0E02\u0E22\u0E32\u0E22\u0E0A\u0E48\u0E2D\u0E07\u0E1B\u0E49\u0E2D\u0E19\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25"},Alert:{close:"\u0E1B\u0E34\u0E14"},Toast:{close:"\u0E1B\u0E34\u0E14\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21"},Spin:{loading:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E42\u0E2B\u0E25\u0E14"},Empty:{retry:"\u0E25\u0E2D\u0E07\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07"},InfiniteScroll:{loading:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E42\u0E2B\u0E25\u0E14",noMore:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E40\u0E15\u0E34\u0E21",loadFailed:"\u0E42\u0E2B\u0E25\u0E14\u0E44\u0E21\u0E48\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08"},Sidebar:{expand:"\u0E02\u0E22\u0E32\u0E22",collapse:"\u0E22\u0E38\u0E1A",loading:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E42\u0E2B\u0E25\u0E14",empty:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25",loadError:"\u0E42\u0E2B\u0E25\u0E14\u0E44\u0E21\u0E48\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08"},PersonPicker:{title:"\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E1A\u0E38\u0E04\u0E04\u0E25",ok:"\u0E15\u0E01\u0E25\u0E07",cancel:"\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01",searchPlaceholder:"\u0E04\u0E49\u0E19\u0E2B\u0E32\u0E14\u0E49\u0E27\u0E22\u0E0A\u0E37\u0E48\u0E2D\u0E2B\u0E23\u0E37\u0E2D\u0E23\u0E2B\u0E31\u0E2A\u0E1E\u0E19\u0E31\u0E01\u0E07\u0E32\u0E19",tabRecentContacts:"\u0E1C\u0E39\u0E49\u0E15\u0E34\u0E14\u0E15\u0E48\u0E2D\u0E25\u0E48\u0E32\u0E2A\u0E38\u0E14",tabRecentGroups:"\u0E01\u0E25\u0E38\u0E48\u0E21\u0E25\u0E48\u0E32\u0E2A\u0E38\u0E14",tabOrganization:"\u0E2D\u0E07\u0E04\u0E4C\u0E01\u0E23",tabPerson:"\u0E1A\u0E38\u0E04\u0E04\u0E25",selectAll:"\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14",selectedTitle:"\u0E17\u0E35\u0E48\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E41\u0E25\u0E49\u0E27",groupPerson:"\u0E1A\u0E38\u0E04\u0E04\u0E25",groupGroup:"\u0E01\u0E25\u0E38\u0E48\u0E21",groupOrg:"\u0E41\u0E1C\u0E19\u0E01",remove:"\u0E25\u0E1A",drillDown:"\u0E14\u0E39\u0E23\u0E30\u0E14\u0E31\u0E1A\u0E22\u0E48\u0E2D\u0E22",jumpTo:"\u0E44\u0E1B\u0E17\u0E35\u0E48",empty:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25",searchEmpty:"\u0E44\u0E21\u0E48\u0E1E\u0E1A\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C",loadFailed:"\u0E42\u0E2B\u0E25\u0E14\u0E44\u0E21\u0E48\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08",loadFailedDetail:"\u0E1A\u0E23\u0E34\u0E01\u0E32\u0E23\u0E44\u0E21\u0E48\u0E1E\u0E23\u0E49\u0E2D\u0E21\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19\u0E2B\u0E23\u0E37\u0E2D\u0E44\u0E21\u0E48\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E15\u0E48\u0E2D\u0E40\u0E04\u0E23\u0E37\u0E2D\u0E02\u0E48\u0E32\u0E22\u0E44\u0E14\u0E49",retry:"\u0E25\u0E2D\u0E07\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07"}},Fe=Ee;var Q=createContext(C),ee=createContext(void 0),Z=createContext(-1);function Ie({locale:e=C,site:o,dialog:t,children:n}){let i=useContext(Z)+1,l=useContext(P),a=t?.zIndex,r=l.dialog.zIndex,u=useMemo(()=>({dialog:{zIndex:a??r}}),[a,r]),s=useRef();s.current||(s.current=K());let d=s.current,p=useRef();p.current||(p.current=J());let f=p.current;U(d,o,i),V(f,u,i),useEffect(()=>()=>{Y(d),W(f);},[f,d]);let y=jsx(Z.Provider,{value:i,children:jsx(P.Provider,{value:u,children:jsx(ee.Provider,{value:o,children:jsxs(Q.Provider,{value:e,children:[n,i===0&&jsx($,{})]})})})});return i===0?jsx(c,{children:y}):y}Ie.displayName="LingeeProvider";function _e(){return useContext(Q)}function oe(e){return _e()[e]}function xo(){return useContext(ee)}var Ke={info:jsx(ExclamationCircleFill,{size:20}),success:jsx(CheckCircleFill,{size:20}),warning:jsx(ExclamationCircleFill1,{size:20}),error:jsx(XCircleFill,{size:20})};function te({type:e,content:o,icon:t,closable:n,className:i,onClose:l,actionLabel:a$1,onAction:r}){let u=oe("Toast"),s=()=>{if(t===null)return null;let d=t!==void 0?t:Ke[e];return jsx("span",{className:"lg-toast__icon",children:d})};return jsxs("div",{className:a("lg-toast",`lg-toast--${e}`,i),children:[s(),jsx("span",{className:"lg-toast__content",children:o}),a$1&&r&&jsx(b,{className:"lg-toast__action",variant:"link",size:"sm",onClick:r,children:a$1}),n&&jsx("button",{className:"lg-toast__close",onClick:l,"aria-label":u.close,type:"button",children:jsx(XLg,{size:16})})]})}var ne="lingee-web-bridge",re="1.0.0",Ye="host",je="iframe",qe="lingee-web-bridge:host-toast-show",Je="lingee-web-bridge:host-toast-dismiss",Ve="lingee-web-bridge:host-toast-probe",We="lingee-web-bridge:host-toast-ready";function ie(){if(typeof crypto<"u"&&typeof crypto.randomUUID=="function")return crypto.randomUUID();let e=Date.now();return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,o=>{let t=(e+Math.random()*16)%16|0;return e=Math.floor(e/16),(o==="x"?t:t&3|8).toString(16)})}function Xe(e,o){return {_protocol:ne,_version:re,_source:e,_nonce:ie(),_traceId:"",payload:o}}function Ze(e,o){if(typeof e!="object"||e===null)return false;let t=e;return t._protocol===ne&&t._version===re&&t._source===o&&typeof t._nonce=="string"&&"payload"in t}function T(){return typeof window<"u"&&window.parent!==window}var x=false,g=new Map,ae=false;function $e(e){if(!Ze(e,Ye))return false;let o=e.payload;return !!o&&typeof o=="object"&&o.type===We}function _(e){window.parent.postMessage(Xe(je,e),"*");}function w(){ae||!T()||(ae=true,window.addEventListener("message",e=>{e.source===window.parent&&$e(e.data)&&(x=true);}),window.addEventListener("pagehide",()=>{!x||g.size===0||S();}),_({type:Ve}));}function O(){return w(),x}function le(e){if(w(),!x||!e.content)return null;let o=ie();_({type:qe,toastId:o,content:e.content.slice(0,500),level:e.level,duration:e.duration,key:e.key});let t=e.duration??3e3,n=t>0?window.setTimeout(()=>g.delete(o),t+500):void 0;return g.set(o,n),o}function S(e){if(w(),!!x){if(e){let o=g.get(e);o!==void 0&&window.clearTimeout(o),g.delete(e);}else g.forEach(o=>{o!==void 0&&window.clearTimeout(o);}),g.clear();_({type:Je,toastId:e});}}w();function D(){if(!(typeof window>"u"))return window.lingeeBridge}function se(e){if(typeof e=="string")return e;if(typeof e=="number")return String(e)}function L(e){if(!(typeof e!="string"||!e))try{let o=new URL(e);return o.protocol==="http:"||o.protocol==="https:"?o.href:void 0}catch{return}}function de(e,o={}){if(!(T()?O():R()&&typeof D()?.showToast=="function"))return false;if(e.action!==void 0){if(T()||typeof D()?.showActionToast!="function")return false;let{label:n,onClick:i,href:l,command:a}=e.action;if(typeof n!="string"||!n||!i&&!L(l)&&!a)return false}return !(se(e.content)===void 0||e.icon!==void 0||e.className!==void 0||e.closable||o.getContainer!==void 0||o.top!==void 0||o.maxCount!==void 0)}function ce(e,o,t,n={}){let i=se(o.content);if(i===void 0)return null;let l={level:e,content:i,duration:t,key:o.key};if(T()){let c=le(l);return c?(n.onAccepted?.(),{dismiss:()=>S(c)}):null}let a=D(),r=o.action,u;if(r){let c=a?.showActionToast;if(!c)return null;let A=L(r.href),fe={label:r.label,...A?{href:A}:{},...r.command?{command:r.command}:{}};u=()=>c({...l,action:fe},r.onClick?()=>n.onAction?.():void 0);}else if(a?.showToast){let c=a.showToast;u=()=>c(l);}if(!u)return null;let s=null,d=null,p=false,f=false,y=()=>{p||f||d||(d=n.onFallback?.()??null);},ge=u;return Promise.resolve().then(()=>ge()).then(c=>{if(!c?.ok||!c.toastId){y();return}if(f=true,s=c.toastId,p){a?.dismissToast?.(s);return}n.onAccepted?.();}).catch(c=>{console.error("[lingee-ui] showToast failed:",c),y();}),{dismiss:()=>{if(!p){if(p=true,d){d(),d=null;return}s&&a?.dismissToast?.(s);}}}}function ue(){if(T())return O()?(S(),true):false;let e=D();return !R()||typeof e?.dismissToast!="function"?false:(e.dismissToast().catch(o=>{console.error("[lingee-ui] dismissToast failed:",o);}),true)}var h={};function $(){let e=h.top??16;return jsx(Toaster,{position:"top-center",offset:e,gap:8,expand:true,closeButton:false,toastOptions:{unstyled:true,className:"lg-toast-wrapper"},style:{"--width":"560px"}})}function oo(e){let o=e[0];return typeof o=="object"&&o!==null&&!Qe.isValidElement(o)?o:{content:o,duration:e[1],onClose:e[2]}}function pe(e,o,t,n=()=>o.onClose?.()){let i=t===0?1/0:t,l=false,a=()=>{l||(l=true,n());},r=o.action,u=L(r?.href),s=r?.onClick??(u?()=>window.open(u,"_blank","noopener,noreferrer"):void 0),d=toast.custom(p=>jsx(te,{type:e,content:o.content,icon:o.icon,closable:o.closable,className:o.className,onClose:()=>toast.dismiss(p),actionLabel:s?r?.label:void 0,onAction:s?()=>{toast.dismiss(p),s();}:void 0}),{...o.key!==void 0&&{id:o.key},duration:i,onAutoClose:a,onDismiss:a});return ()=>{toast.dismiss(d),a();}}var E=new Set;function to(e,o){let t=o.duration!==void 0?o.duration<0?h.duration??3e3:o.duration:h.duration??3e3;if(de(o,h)){let n=false,i,l=()=>{},a=()=>{n||(n=true,i!==void 0&&clearTimeout(i),E.delete(l),o.onClose?.());},r=ce(e,o,t,{onAccepted:()=>{t>0&&!n&&(i=setTimeout(a,t));},onFallback:()=>pe(e,{...o,onClose:void 0},t,a),onAction:()=>{a(),o.action?.onClick?.();}});if(r)return l=()=>{n||(r.dismiss(),a());},E.add(l),l}return pe(e,o,t)}function H(e){return (...o)=>{let t=oo(o);return to(e,t)}}var Jo={info:H("info"),success:H("success"),warning:H("warning"),error:H("error"),destroy:()=>{Array.from(E).forEach(e=>e()),E.clear(),ue(),toast.dismiss();},config:e=>{h={...h,...e};}};export{R as a,$ as b,Jo as c,C as d,xe as e,be as f,Pe as g,we as h,De as i,He as j,Fe as k,Ie as l,_e as m,oe as n,xo as o};
@@ -1 +1 @@
1
- 'use strict';var chunkJYFAP23O_js=require('./chunk-JYFAP23O.js'),chunkDCDWEVW4_js=require('./chunk-DCDWEVW4.js'),J=require('react'),lingeeIcon=require('lingee-icon'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var J__default=/*#__PURE__*/_interopDefault(J);var Y=J__default.default.forwardRef(({className:p,style:o,size:a="md",shape:T="default",prefix:d,suffix:g,allowClear:C=false,error:L=false,disabled:r=false,collapsed:t=false,autoFocusOnExpand:s=true,value:c,defaultValue:H,onChange:_,onFocus:f,onBlur:v,onPressEnter:b,onKeyDown:h,onClick:m,...S},N)=>{let x=chunkJYFAP23O_js.n("Input"),[D,y]=J.useState(false),[F,w]=J.useState(H?.toString()??""),e=J.useRef(null),P=Z(N,e),u=c!==void 0,k=u?c?.toString()??"":F,V=J.useCallback(n=>{u||w(n.target.value),_?.(n);},[u,_]),j=J.useCallback(()=>{if(r)return;u||w("");let n=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value")?.set;if(e.current&&n){n.call(e.current,"");let G=new Event("input",{bubbles:true});e.current.dispatchEvent(G);}e.current?.focus();},[r,u]),B=J.useCallback(n=>{y(true),f?.(n);},[f]),K=J.useCallback(n=>{y(false),v?.(n);},[v]),O=J.useCallback(n=>{n.key==="Enter"&&b?.(n),h?.(n);},[b,h]),W=C&&k.length>0&&!r&&!t,X=!!g&&!(t&&d),I=J.useRef(t);J.useEffect(()=>{let n=I.current;I.current=t,n!==t&&(t?e.current===document.activeElement&&e.current?.blur():!r&&s&&e.current?.focus());},[t,r,s]);let $=J.useCallback(n=>{t||e.current?.focus(),m?.(n);},[t,m]),q=chunkDCDWEVW4_js.a("lg-input",`lg-input--${a}`,T==="round"&&"lg-input--round",D&&!t&&"lg-input--focused",L&&"lg-input--error",r&&"lg-input--disabled",t&&"lg-input--collapsed",p),A=t?{...o,width:void 0,minWidth:void 0,maxWidth:void 0}:o;return jsxRuntime.jsxs("div",{className:q,style:A,onClick:$,role:t?"button":void 0,tabIndex:t&&!r?0:void 0,"aria-expanded":t?false:void 0,"aria-label":t?x.expand:void 0,children:[d&&jsxRuntime.jsx("span",{className:"lg-input__prefix",children:d}),jsxRuntime.jsx("input",{ref:P,className:"lg-input__inner",disabled:r,value:k,onChange:V,onFocus:B,onBlur:K,onKeyDown:O,tabIndex:t?-1:void 0,"aria-hidden":t||void 0,...S}),W&&jsxRuntime.jsx("span",{className:"lg-input__clear",onMouseDown:n=>n.preventDefault(),onClick:j,role:"button","aria-label":x.clear,children:jsxRuntime.jsx(lingeeIcon.XCircleFill,{})}),X&&jsxRuntime.jsx("span",{className:"lg-input__suffix",children:g})]})});Y.displayName="Input";function Z(...p){return J.useCallback(o=>{p.forEach(a=>{a&&(typeof a=="function"?a(o):a.current=o);});},p)}exports.a=Y;
1
+ 'use strict';var chunkTDJG7ZB6_js=require('./chunk-TDJG7ZB6.js'),chunkDCDWEVW4_js=require('./chunk-DCDWEVW4.js'),J=require('react'),lingeeIcon=require('lingee-icon'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var J__default=/*#__PURE__*/_interopDefault(J);var Y=J__default.default.forwardRef(({className:p,style:o,size:a="md",shape:T="default",prefix:d,suffix:g,allowClear:C=false,error:L=false,disabled:r=false,collapsed:t=false,autoFocusOnExpand:s=true,value:c,defaultValue:H,onChange:_,onFocus:f,onBlur:v,onPressEnter:b,onKeyDown:h,onClick:m,...S},N)=>{let x=chunkTDJG7ZB6_js.n("Input"),[D,y]=J.useState(false),[F,w]=J.useState(H?.toString()??""),e=J.useRef(null),P=Z(N,e),u=c!==void 0,k=u?c?.toString()??"":F,V=J.useCallback(n=>{u||w(n.target.value),_?.(n);},[u,_]),j=J.useCallback(()=>{if(r)return;u||w("");let n=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value")?.set;if(e.current&&n){n.call(e.current,"");let G=new Event("input",{bubbles:true});e.current.dispatchEvent(G);}e.current?.focus();},[r,u]),B=J.useCallback(n=>{y(true),f?.(n);},[f]),K=J.useCallback(n=>{y(false),v?.(n);},[v]),O=J.useCallback(n=>{n.key==="Enter"&&b?.(n),h?.(n);},[b,h]),W=C&&k.length>0&&!r&&!t,X=!!g&&!(t&&d),I=J.useRef(t);J.useEffect(()=>{let n=I.current;I.current=t,n!==t&&(t?e.current===document.activeElement&&e.current?.blur():!r&&s&&e.current?.focus());},[t,r,s]);let $=J.useCallback(n=>{t||e.current?.focus(),m?.(n);},[t,m]),q=chunkDCDWEVW4_js.a("lg-input",`lg-input--${a}`,T==="round"&&"lg-input--round",D&&!t&&"lg-input--focused",L&&"lg-input--error",r&&"lg-input--disabled",t&&"lg-input--collapsed",p),A=t?{...o,width:void 0,minWidth:void 0,maxWidth:void 0}:o;return jsxRuntime.jsxs("div",{className:q,style:A,onClick:$,role:t?"button":void 0,tabIndex:t&&!r?0:void 0,"aria-expanded":t?false:void 0,"aria-label":t?x.expand:void 0,children:[d&&jsxRuntime.jsx("span",{className:"lg-input__prefix",children:d}),jsxRuntime.jsx("input",{ref:P,className:"lg-input__inner",disabled:r,value:k,onChange:V,onFocus:B,onBlur:K,onKeyDown:O,tabIndex:t?-1:void 0,"aria-hidden":t||void 0,...S}),W&&jsxRuntime.jsx("span",{className:"lg-input__clear",onMouseDown:n=>n.preventDefault(),onClick:j,role:"button","aria-label":x.clear,children:jsxRuntime.jsx(lingeeIcon.XCircleFill,{})}),X&&jsxRuntime.jsx("span",{className:"lg-input__suffix",children:g})]})});Y.displayName="Input";function Z(...p){return J.useCallback(o=>{p.forEach(a=>{a&&(typeof a=="function"?a(o):a.current=o);});},p)}exports.a=Y;
@@ -1 +1 @@
1
- 'use strict';var chunkJYFAP23O_js=require('./chunk-JYFAP23O.js'),chunkQEKT37W5_js=require('./chunk-QEKT37W5.js'),chunkDCDWEVW4_js=require('./chunk-DCDWEVW4.js'),Bl=require('react'),classVarianceAuthority=require('class-variance-authority'),b=require('@radix-ui/react-tabs'),lingeeIcon=require('lingee-icon'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var Bl__default=/*#__PURE__*/_interopDefault(Bl);var b__namespace=/*#__PURE__*/_interopNamespace(b);var C={arrows:true,step:200,fade:true,scrollIntoView:true},Sl=classVarianceAuthority.cva("lg-tabs",{variants:{variant:{segmented:"lg-tabs--segmented",rounded:"lg-tabs--rounded",solid:"lg-tabs--solid",outline:"lg-tabs--outline",underline:"lg-tabs--underline"},size:{sm:"lg-tabs--sm",md:"lg-tabs--md"}},defaultVariants:{variant:"segmented",size:"md"}}),ol=typeof window<"u"?Bl.useLayoutEffect:Bl.useEffect;function Ll({items:o,activeKey:d,defaultActiveKey:tl,onChange:N,variant:n="segmented",size:sl="md",overflow:bl,scrollOptions:k,wrap:nl=false,scrollable:cl=false,glassy:il=false,transparent:dl=false,animated:B=true,destroyInactivePanel:M=false,className:ul,dir:vl,...fl},pl){let V=chunkJYFAP23O_js.n("Tabs"),O=bl??(cl?"scroll":nl?"wrap":"none"),X=O==="wrap"&&(n==="segmented"||n==="rounded")?"none":O,a=X==="scroll",A=X==="wrap",P=k?.arrows??C.arrows,T=k?.step??C.step,H=k?.fade??C.fade,$=k?.scrollIntoView??C.scrollIntoView,u=d!==void 0,ml=o.find(l=>!l.disabled)?.key,W=u?void 0:tl??ml,[hl,wl]=Bl.useState(W),t=u?d:hl,y=Bl.useRef(o.findIndex(l=>l.key===t)),[j,x]=Bl.useState("right"),Fl=Bl.useCallback(l=>{let g=o.findIndex(F=>F.key===l),r=y.current;g>r?x("right"):g<r&&x("left"),y.current=g,u||wl(l),N?.(l);},[u,N,o]);Bl.useEffect(()=>{if(u&&d){let l=o.findIndex(r=>r.key===d),g=y.current;l!==g&&(l>g?x("right"):x("left"),y.current=l);}},[u,d,o]);let q=o.some(l=>l.children!=null),s=Bl.useRef(null),E=Bl.useRef(new Map),[_l,R]=Bl.useState({opacity:0}),h=Bl.useRef(false),U=Bl.useRef(0),kl=Bl.useCallback(l=>g=>{g?E.current.set(l,g):E.current.delete(l);},[]),w=Bl.useCallback(l=>{let g=s.current,r=t?E.current.get(t):void 0;if(!g||!r){R(al=>al.opacity===0?al:{opacity:0});return}let F=g.getBoundingClientRect(),f=(n==="underline"?r.querySelector(".lg-tabs__tab-label")??r:r).getBoundingClientRect(),rl=f.left-F.left+g.scrollLeft;if(!A){R({width:f.width,transform:`translateX(${rl}px)`,opacity:1,transition:l?"transform var(--_tabs-slider-duration) var(--lg-transition-timing), width var(--_tabs-slider-duration) var(--lg-transition-timing)":"none"});return}let S=n==="underline",Cl=S?r.getBoundingClientRect():f,L=S?Cl.bottom-F.top:f.top-F.top,Dl=l&&Math.abs(L-U.current)>1;U.current=L,R({width:f.width,...S?null:{height:f.height},top:0,bottom:"auto",transform:`translate(${rl}px, ${L}px)`,opacity:1,transition:Dl?"opacity var(--_tabs-slider-duration) var(--lg-transition-timing)":l?"transform var(--_tabs-slider-duration) var(--lg-transition-timing), width var(--_tabs-slider-duration) var(--lg-transition-timing)":"none"});},[t,n,A]),Y=Bl.useRef(w);Y.current=w;let G=Bl.useRef(0);ol(()=>{let l=h.current;w(l),l&&(G.current=Date.now()),h.current=true;},[w,t]);let J=o.map(l=>`${l.key}:${l.disabled?1:0}`).join("|");ol(()=>{let l=h.current;h.current=false,w(false),h.current=l;},[J]),Bl.useEffect(()=>{if(!s.current)return;let l=new ResizeObserver(()=>{Date.now()-G.current<350||Y.current(false);});return l.observe(s.current),()=>l.disconnect()},[]);let[yl,Q]=Bl.useState(false),[Z,xl]=Bl.useState(false),[K,El]=Bl.useState(false),v=Bl.useCallback(()=>{let l=s.current;!l||!a||(Q(l.scrollWidth>l.clientWidth+1),xl(l.scrollLeft>1),El(l.scrollLeft+l.clientWidth<l.scrollWidth-1));},[a]);Bl.useEffect(()=>{if(!a){Q(false);return}let l=s.current;if(l)return v(),l.addEventListener("scroll",v),()=>l.removeEventListener("scroll",v)},[a,v,J]),Bl.useEffect(()=>{let l=s.current;if(!a||!l)return;let g=new ResizeObserver(()=>v());return g.observe(l),()=>g.disconnect()},[a,v]),Bl.useEffect(()=>{if(!a||!$||!t)return;let l=E.current.get(t);typeof l?.scrollIntoView=="function"&&l.scrollIntoView({behavior:"smooth",inline:"nearest",block:"nearest"});},[a,$,t]);let ll=Bl.useCallback((l,g)=>{let r=s.current;r&&(r.scrollBy({left:l==="left"?-T:T,behavior:"smooth"}),g&&g.detail>0&&g.currentTarget.blur());},[T]),z=a&&yl&&P!==false,gl=jsxRuntime.jsxs(b__namespace.List,{className:chunkDCDWEVW4_js.a("lg-tabs__list",a&&"lg-tabs__list--scrollable"),ref:s,children:[jsxRuntime.jsx("span",{className:chunkDCDWEVW4_js.a(`lg-tabs__slider lg-tabs__slider--${n}`,il&&"lg-tabs__slider--glassy"),style:_l,"aria-hidden":true}),o.map(l=>jsxRuntime.jsxs(b__namespace.Trigger,{value:l.key,disabled:l.disabled,ref:kl(l.key),"aria-label":l.ariaLabel,className:chunkDCDWEVW4_js.a("lg-tabs__tab",l.disabled&&"lg-tabs__tab--disabled"),children:[l.icon&&jsxRuntime.jsx("span",{className:"lg-tabs__tab-icon",children:l.icon}),jsxRuntime.jsx("span",{className:"lg-tabs__tab-label",children:l.label}),l.suffix!=null&&jsxRuntime.jsx("span",{className:"lg-tabs__tab-suffix",children:l.suffix})]},l.key))]});return jsxRuntime.jsxs(b__namespace.Root,{ref:pl,className:chunkDCDWEVW4_js.a(Sl({variant:n,size:sl}),A&&"lg-tabs--wrap",a&&"lg-tabs--scrollable",dl&&"lg-tabs--transparent",q&&"lg-tabs--has-content",ul),value:d,defaultValue:W,onValueChange:Fl,dir:vl,...fl,children:[a?jsxRuntime.jsxs("div",{className:chunkDCDWEVW4_js.a("lg-tabs__scroll-wrapper",P==="hover"&&"lg-tabs__scroll-wrapper--hover-controls",!z&&"lg-tabs__scroll-wrapper--no-arrows"),children:[z&&jsxRuntime.jsx(chunkQEKT37W5_js.b,{shape:"circle",size:"sm",variant:"text",icon:jsxRuntime.jsx(lingeeIcon.ChevronLeft,{}),tooltip:V.scrollLeft,disabled:!Z,onClick:l=>ll("left",l),className:"lg-tabs__scroll-arrow lg-tabs__scroll-arrow--left"}),H&&Z&&jsxRuntime.jsx("span",{className:"lg-tabs__fade lg-tabs__fade--left","aria-hidden":true}),gl,H&&K&&jsxRuntime.jsx("span",{className:"lg-tabs__fade lg-tabs__fade--right","aria-hidden":true}),z&&jsxRuntime.jsx(chunkQEKT37W5_js.b,{shape:"circle",size:"sm",variant:"text",icon:jsxRuntime.jsx(lingeeIcon.ChevronRight,{}),tooltip:V.scrollRight,disabled:!K,onClick:l=>ll("right",l),className:"lg-tabs__scroll-arrow lg-tabs__scroll-arrow--right"})]}):gl,q&&jsxRuntime.jsx("div",{className:"lg-tabs__content-wrapper",children:o.map(l=>{if(l.children==null)return null;let g=l.key===t;return M&&!g?null:jsxRuntime.jsx(b__namespace.Content,{value:l.key,forceMount:M?void 0:true,className:chunkDCDWEVW4_js.a("lg-tabs__panel",B&&"lg-tabs__panel--animated",g&&"lg-tabs__panel--active",!g&&"lg-tabs__panel--inactive",B&&j==="right"&&"lg-tabs__panel--slide-right",B&&j==="left"&&"lg-tabs__panel--slide-left"),children:l.children},l.key)})})]})}var Gl=Bl__default.default.forwardRef(Ll);exports.a=Sl;exports.b=Gl;
1
+ 'use strict';var chunkTDJG7ZB6_js=require('./chunk-TDJG7ZB6.js'),chunkQEKT37W5_js=require('./chunk-QEKT37W5.js'),chunkDCDWEVW4_js=require('./chunk-DCDWEVW4.js'),Bl=require('react'),classVarianceAuthority=require('class-variance-authority'),b=require('@radix-ui/react-tabs'),lingeeIcon=require('lingee-icon'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var Bl__default=/*#__PURE__*/_interopDefault(Bl);var b__namespace=/*#__PURE__*/_interopNamespace(b);var C={arrows:true,step:200,fade:true,scrollIntoView:true},Sl=classVarianceAuthority.cva("lg-tabs",{variants:{variant:{segmented:"lg-tabs--segmented",rounded:"lg-tabs--rounded",solid:"lg-tabs--solid",outline:"lg-tabs--outline",underline:"lg-tabs--underline"},size:{sm:"lg-tabs--sm",md:"lg-tabs--md"}},defaultVariants:{variant:"segmented",size:"md"}}),ol=typeof window<"u"?Bl.useLayoutEffect:Bl.useEffect;function Ll({items:o,activeKey:d,defaultActiveKey:tl,onChange:N,variant:n="segmented",size:cl="md",overflow:bl,scrollOptions:_,wrap:nl=false,scrollable:sl=false,glassy:il=false,transparent:dl=false,animated:B=true,destroyInactivePanel:M=false,className:ul,dir:vl,...fl},pl){let V=chunkTDJG7ZB6_js.n("Tabs"),O=bl??(sl?"scroll":nl?"wrap":"none"),X=O==="wrap"&&(n==="segmented"||n==="rounded")?"none":O,a=X==="scroll",A=X==="wrap",P=_?.arrows??C.arrows,T=_?.step??C.step,H=_?.fade??C.fade,$=_?.scrollIntoView??C.scrollIntoView,u=d!==void 0,ml=o.find(l=>!l.disabled)?.key,W=u?void 0:tl??ml,[hl,wl]=Bl.useState(W),t=u?d:hl,F=Bl.useRef(o.findIndex(l=>l.key===t)),[j,x]=Bl.useState("right"),kl=Bl.useCallback(l=>{let g=o.findIndex(k=>k.key===l),r=F.current;g>r?x("right"):g<r&&x("left"),F.current=g,u||wl(l),N?.(l);},[u,N,o]);Bl.useEffect(()=>{if(u&&d){let l=o.findIndex(r=>r.key===d),g=F.current;l!==g&&(l>g?x("right"):x("left"),F.current=l);}},[u,d,o]);let q=o.some(l=>l.children!=null),c=Bl.useRef(null),E=Bl.useRef(new Map),[yl,R]=Bl.useState({opacity:0}),h=Bl.useRef(false),U=Bl.useRef(0),_l=Bl.useCallback(l=>g=>{g?E.current.set(l,g):E.current.delete(l);},[]),w=Bl.useCallback(l=>{let g=c.current,r=t?E.current.get(t):void 0;if(!g||!r){R(al=>al.opacity===0?al:{opacity:0});return}let k=g.getBoundingClientRect(),f=(n==="underline"?r.querySelector(".lg-tabs__tab-label")??r:r).getBoundingClientRect(),rl=f.left-k.left+g.scrollLeft;if(!A){R({width:f.width,transform:`translateX(${rl}px)`,opacity:1,transition:l?"transform var(--_tabs-slider-duration) var(--lg-transition-timing), width var(--_tabs-slider-duration) var(--lg-transition-timing)":"none"});return}let S=n==="underline",Cl=S?r.getBoundingClientRect():f,L=S?Cl.bottom-k.top:f.top-k.top,Dl=l&&Math.abs(L-U.current)>1;U.current=L,R({width:f.width,...S?null:{height:f.height},top:0,bottom:"auto",transform:`translate(${rl}px, ${L}px)`,opacity:1,transition:Dl?"opacity var(--_tabs-slider-duration) var(--lg-transition-timing)":l?"transform var(--_tabs-slider-duration) var(--lg-transition-timing), width var(--_tabs-slider-duration) var(--lg-transition-timing)":"none"});},[t,n,A]),Y=Bl.useRef(w);Y.current=w;let G=Bl.useRef(0);ol(()=>{let l=h.current;w(l),l&&(G.current=Date.now()),h.current=true;},[w,t]);let J=o.map(l=>`${l.key}:${l.disabled?1:0}`).join("|");ol(()=>{let l=h.current;h.current=false,w(false),h.current=l;},[J]),Bl.useEffect(()=>{if(!c.current)return;let l=new ResizeObserver(()=>{Date.now()-G.current<350||Y.current(false);});return l.observe(c.current),()=>l.disconnect()},[]);let[Fl,Q]=Bl.useState(false),[Z,xl]=Bl.useState(false),[K,El]=Bl.useState(false),v=Bl.useCallback(()=>{let l=c.current;!l||!a||(Q(l.scrollWidth>l.clientWidth+1),xl(l.scrollLeft>1),El(l.scrollLeft+l.clientWidth<l.scrollWidth-1));},[a]);Bl.useEffect(()=>{if(!a){Q(false);return}let l=c.current;if(l)return v(),l.addEventListener("scroll",v),()=>l.removeEventListener("scroll",v)},[a,v,J]),Bl.useEffect(()=>{let l=c.current;if(!a||!l)return;let g=new ResizeObserver(()=>v());return g.observe(l),()=>g.disconnect()},[a,v]),Bl.useEffect(()=>{if(!a||!$||!t)return;let l=E.current.get(t);typeof l?.scrollIntoView=="function"&&l.scrollIntoView({behavior:"smooth",inline:"nearest",block:"nearest"});},[a,$,t]);let ll=Bl.useCallback((l,g)=>{let r=c.current;r&&(r.scrollBy({left:l==="left"?-T:T,behavior:"smooth"}),g&&g.detail>0&&g.currentTarget.blur());},[T]),z=a&&Fl&&P!==false,gl=jsxRuntime.jsxs(b__namespace.List,{className:chunkDCDWEVW4_js.a("lg-tabs__list",a&&"lg-tabs__list--scrollable"),ref:c,children:[jsxRuntime.jsx("span",{className:chunkDCDWEVW4_js.a(`lg-tabs__slider lg-tabs__slider--${n}`,il&&"lg-tabs__slider--glassy"),style:yl,"aria-hidden":true}),o.map(l=>jsxRuntime.jsxs(b__namespace.Trigger,{value:l.key,disabled:l.disabled,ref:_l(l.key),"aria-label":l.ariaLabel,className:chunkDCDWEVW4_js.a("lg-tabs__tab",l.disabled&&"lg-tabs__tab--disabled"),children:[l.icon&&jsxRuntime.jsx("span",{className:"lg-tabs__tab-icon",children:l.icon}),jsxRuntime.jsx("span",{className:"lg-tabs__tab-label",children:l.label}),l.suffix!=null&&jsxRuntime.jsx("span",{className:"lg-tabs__tab-suffix",children:l.suffix})]},l.key))]});return jsxRuntime.jsxs(b__namespace.Root,{ref:pl,className:chunkDCDWEVW4_js.a(Sl({variant:n,size:cl}),A&&"lg-tabs--wrap",a&&"lg-tabs--scrollable",dl&&"lg-tabs--transparent",q&&"lg-tabs--has-content",ul),value:d,defaultValue:W,onValueChange:kl,dir:vl,...fl,children:[a?jsxRuntime.jsxs("div",{className:chunkDCDWEVW4_js.a("lg-tabs__scroll-wrapper",P==="hover"&&"lg-tabs__scroll-wrapper--hover-controls",!z&&"lg-tabs__scroll-wrapper--no-arrows"),children:[z&&jsxRuntime.jsx(chunkQEKT37W5_js.b,{shape:"circle",size:"sm",variant:"text",icon:jsxRuntime.jsx(lingeeIcon.ChevronLeft,{}),tooltip:V.scrollLeft,disabled:!Z,onClick:l=>ll("left",l),className:"lg-tabs__scroll-arrow lg-tabs__scroll-arrow--left"}),H&&Z&&jsxRuntime.jsx("span",{className:"lg-tabs__fade lg-tabs__fade--left","aria-hidden":true}),gl,H&&K&&jsxRuntime.jsx("span",{className:"lg-tabs__fade lg-tabs__fade--right","aria-hidden":true}),z&&jsxRuntime.jsx(chunkQEKT37W5_js.b,{shape:"circle",size:"sm",variant:"text",icon:jsxRuntime.jsx(lingeeIcon.ChevronRight,{}),tooltip:V.scrollRight,disabled:!K,onClick:l=>ll("right",l),className:"lg-tabs__scroll-arrow lg-tabs__scroll-arrow--right"})]}):gl,q&&jsxRuntime.jsx("div",{className:"lg-tabs__content-wrapper",children:o.map(l=>{if(l.children==null)return null;let g=l.key===t;return M&&!g?null:jsxRuntime.jsx(b__namespace.Content,{value:l.key,forceMount:M?void 0:true,className:chunkDCDWEVW4_js.a("lg-tabs__panel",B&&"lg-tabs__panel--animated",g&&"lg-tabs__panel--active",!g&&"lg-tabs__panel--inactive",B&&j==="right"&&"lg-tabs__panel--slide-right",B&&j==="left"&&"lg-tabs__panel--slide-left"),children:l.children},l.key)})})]})}var Gl=Bl__default.default.forwardRef(Ll);exports.a=Sl;exports.b=Gl;
@@ -0,0 +1 @@
1
+ 'use strict';var chunkQEKT37W5_js=require('./chunk-QEKT37W5.js'),chunkMFBMJTYZ_js=require('./chunk-MFBMJTYZ.js'),chunkDCDWEVW4_js=require('./chunk-DCDWEVW4.js'),Qe=require('react'),sonner=require('sonner'),lingeeIcon=require('lingee-icon'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var Qe__default=/*#__PURE__*/_interopDefault(Qe);var Te={locale:"zh-CN",Button:{},Breadcrumb:{more:"\u66F4\u591A",back:"\u8FD4\u56DE",label:"\u9762\u5305\u5C51\u5BFC\u822A",scrollLeft:"\u5411\u5DE6\u6EDA\u52A8",scrollRight:"\u5411\u53F3\u6EDA\u52A8"},Select:{loading:"\u52A0\u8F7D\u4E2D",loadError:"\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5",loadFailed:"\u52A0\u8F7D\u5931\u8D25",notFound:"\u641C\u7D22\u65E0\u7ED3\u679C",clear:"\u6E05\u7A7A"},Dropdown:{clear:"\u6E05\u9664",loading:"\u52A0\u8F7D\u4E2D",loadError:"\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5",empty:"\u6682\u65E0\u6570\u636E"},Tabs:{scrollLeft:"\u5411\u5DE6\u6EDA\u52A8",scrollRight:"\u5411\u53F3\u6EDA\u52A8"},Carousel:{carousel:"\u8F6E\u64AD",prev:"\u4E0A\u4E00\u5F20",next:"\u4E0B\u4E00\u5F20",goToPage:"\u8DF3\u8F6C\u5230\u7B2C {page} \u5F20"},Form:{required:"{label}\u4E0D\u80FD\u4E3A\u7A7A",requiredNoLabel:"\u6B64\u9879\u4E0D\u80FD\u4E3A\u7A7A"},Tag:{close:"\u5173\u95ED"},Upload:{retry:"\u91CD\u65B0\u4E0A\u4F20",remove:"\u79FB\u9664\u6587\u4EF6",removeShort:"\u79FB\u9664",dragText:"\u62D6\u62FD\u6587\u4EF6\u5230\u6B64\u5904\uFF0C\u6216",clickUpload:"\u70B9\u51FB\u4E0A\u4F20",upload:"\u4E0A\u4F20"},Cascader:{empty:"\u6682\u65E0\u6570\u636E"},TreeSelect:{empty:"\u6682\u65E0\u6570\u636E"},ColorPicker:{placeholder:"\u8BF7\u9009\u62E9\u989C\u8272",hexInput:"\u5341\u516D\u8FDB\u5236\u8272\u503C",alphaInput:"\u900F\u660E\u5EA6"},DatePicker:{placeholder:"\u5E74/\u6708/\u65E5",today:"\u4ECA\u5929",prevYear:"\u4E0A\u4E00\u5E74",nextYear:"\u4E0B\u4E00\u5E74",prevMonth:"\u4E0A\u4E00\u6708",nextMonth:"\u4E0B\u4E00\u6708",prevDecade:"\u4E0A\u4E00\u7EC4\u5E74\u4EFD",nextDecade:"\u4E0B\u4E00\u7EC4\u5E74\u4EFD",months:["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"],yearFormat:"{year}\u5E74",monthFormat:"{month}\u6708"},RangePicker:{startPlaceholder:"\u5E74/\u6708/\u65E5",endPlaceholder:"\u5E74/\u6708/\u65E5"},TimePicker:{now:"\u73B0\u5728",confirm:"\u786E\u5B9A",placeholder:"\u65F6:\u5206",placeholderFull:"\u65F6:\u5206:\u79D2"},Table:{loading:"\u52A0\u8F7D\u4E2D",empty:"\u6682\u65E0\u6570\u636E",loadError:"\u52A0\u8F7D\u5931\u8D25"},Tree:{empty:"\u6682\u65E0\u6570\u636E"},Pagination:{total:"\u5171 {total} \u6761",prevPage:"\u4E0A\u4E00\u9875",nextPage:"\u4E0B\u4E00\u9875",itemsPerPage:"{size}\u6761/\u9875",jumpTo:"\u8DF3\u81F3",page:"\u9875"},Dialog:{close:"\u5173\u95ED"},Drawer:{close:"\u5173\u95ED"},Input:{clear:"\u6E05\u7A7A",expand:"\u5C55\u5F00\u8F93\u5165\u6846"},Alert:{close:"\u5173\u95ED"},Toast:{close:"\u5173\u95ED\u6D88\u606F"},Spin:{loading:"\u52A0\u8F7D\u4E2D"},Empty:{retry:"\u91CD\u8BD5"},InfiniteScroll:{loading:"\u52A0\u8F7D\u4E2D",noMore:"\u6CA1\u6709\u66F4\u591A\u4E86",loadFailed:"\u52A0\u8F7D\u5931\u8D25"},Sidebar:{expand:"\u5C55\u5F00",collapse:"\u6536\u8D77",loading:"\u52A0\u8F7D\u4E2D",empty:"\u6682\u65E0\u6570\u636E",loadError:"\u52A0\u8F7D\u5931\u8D25"},PersonPicker:{title:"\u9009\u62E9\u4EBA\u5458",ok:"\u786E\u5B9A",cancel:"\u53D6\u6D88",searchPlaceholder:"\u641C\u7D22\u59D3\u540D\u3001\u5DE5\u53F7",tabRecentContacts:"\u6700\u8FD1\u8054\u7CFB\u4EBA",tabRecentGroups:"\u6700\u8FD1\u7FA4\u7EC4",tabOrganization:"\u9009\u62E9\u7EC4\u7EC7",tabPerson:"\u9009\u62E9\u4EBA\u5458",selectAll:"\u5168\u9009",selectedTitle:"\u5DF2\u9009",groupPerson:"\u4EBA\u5458",groupGroup:"\u7FA4\u7EC4",groupOrg:"\u7EC4\u7EC7",remove:"\u79FB\u9664",drillDown:"\u67E5\u770B\u4E0B\u7EA7",jumpTo:"\u8DF3\u8F6C\u5230",empty:"\u6682\u65E0\u6570\u636E",searchEmpty:"\u641C\u7D22\u65E0\u7ED3\u679C",loadFailed:"\u52A0\u8F7D\u5931\u8D25",loadFailedDetail:"\u670D\u52A1\u54CD\u5E94\u5F02\u5E38\u6216\u7F51\u7EDC\u4E0D\u53EF\u7528",retry:"\u91CD\u8BD5"}},C=Te;var F=new Map,z=0;function K(){return z+=1,{id:z}}function U(e,o,t){F.set(e.id,{site:o,depth:t});}function Y(e){F.delete(e.id);}function he(){let e;for(let o of F.values())(!e||o.depth>=e.depth)&&(e=o);return e?.site}function R(){return he()==="lingee"}var q={dialog:{}},P=Qe.createContext(q),M=new Map,j=0;function J(){return j+=1,{id:j}}function V(e,o,t){M.set(e.id,{config:o,depth:t});}function W(e){M.delete(e.id);}function xe(){let e;for(let o of M.values())(!e||o.depth>=e.depth)&&(e=o);return e?.config??q}function be(){return Qe.useContext(P)}var Ce={locale:"en-US",Button:{},Breadcrumb:{more:"More",back:"Back",label:"Breadcrumb",scrollLeft:"Scroll left",scrollRight:"Scroll right"},Select:{loading:"Loading",loadError:"Failed to load, please retry",loadFailed:"Failed to load",notFound:"No results found",clear:"Clear"},Dropdown:{clear:"Clear",loading:"Loading",loadError:"Failed to load, please retry",empty:"No data"},Tabs:{scrollLeft:"Scroll left",scrollRight:"Scroll right"},Carousel:{carousel:"Carousel",prev:"Previous slide",next:"Next slide",goToPage:"Go to slide {page}"},Form:{required:"{label} is required",requiredNoLabel:"This field is required"},Tag:{close:"Close"},Upload:{retry:"Retry upload",remove:"Remove file",removeShort:"Remove",dragText:"Drag files here, or ",clickUpload:"click to upload",upload:"Upload"},Cascader:{empty:"No data"},TreeSelect:{empty:"No data"},ColorPicker:{placeholder:"Select a color",hexInput:"Hex color value",alphaInput:"Opacity"},DatePicker:{placeholder:"YYYY/MM/DD",today:"Today",prevYear:"Previous year",nextYear:"Next year",prevMonth:"Previous month",nextMonth:"Next month",prevDecade:"Previous decade",nextDecade:"Next decade",months:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],yearFormat:"{year}",monthFormat:"{month}"},RangePicker:{startPlaceholder:"Start date",endPlaceholder:"End date"},TimePicker:{now:"Now",confirm:"OK",placeholder:"HH:mm",placeholderFull:"HH:mm:ss"},Table:{loading:"Loading",empty:"No data",loadError:"Failed to load"},Tree:{empty:"No data"},Pagination:{total:"{total} items",prevPage:"Previous page",nextPage:"Next page",itemsPerPage:"{size} / page",jumpTo:"Go to",page:""},Dialog:{close:"Close"},Drawer:{close:"Close"},Input:{clear:"Clear",expand:"Expand input"},Alert:{close:"Close"},Toast:{close:"Close message"},Spin:{loading:"Loading"},Empty:{retry:"Retry"},InfiniteScroll:{loading:"Loading",noMore:"No more items",loadFailed:"Failed to load"},Sidebar:{expand:"Expand",collapse:"Collapse",loading:"Loading",empty:"No data",loadError:"Failed to load"},PersonPicker:{title:"Select people",ok:"OK",cancel:"Cancel",searchPlaceholder:"Search by name or employee ID",tabRecentContacts:"Recent contacts",tabRecentGroups:"Recent groups",tabOrganization:"Organization",tabPerson:"People",selectAll:"Select all",selectedTitle:"Selected",groupPerson:"People",groupGroup:"Groups",groupOrg:"Departments",remove:"Remove",drillDown:"View children",jumpTo:"Jump to ",empty:"No data",searchEmpty:"No results",loadFailed:"Failed to load",loadFailedDetail:"The service is unavailable or the network is unreachable",retry:"Retry"}},Pe=Ce;var ve={locale:"zh-TW",Button:{},Breadcrumb:{more:"\u66F4\u591A",back:"\u8FD4\u56DE",label:"\u9EB5\u5305\u5C51\u5C0E\u822A",scrollLeft:"\u5411\u5DE6\u6EFE\u52D5",scrollRight:"\u5411\u53F3\u6EFE\u52D5"},Select:{loading:"\u8F09\u5165\u4E2D",loadError:"\u8F09\u5165\u5931\u6557\uFF0C\u8ACB\u91CD\u8A66",loadFailed:"\u8F09\u5165\u5931\u6557",notFound:"\u641C\u5C0B\u7121\u7D50\u679C",clear:"\u6E05\u7A7A"},Dropdown:{clear:"\u6E05\u9664",loading:"\u8F09\u5165\u4E2D",loadError:"\u8F09\u5165\u5931\u6557\uFF0C\u8ACB\u91CD\u8A66",empty:"\u66AB\u7121\u8CC7\u6599"},Tabs:{scrollLeft:"\u5411\u5DE6\u6EFE\u52D5",scrollRight:"\u5411\u53F3\u6EFE\u52D5"},Carousel:{carousel:"\u8F2A\u64AD",prev:"\u4E0A\u4E00\u5F35",next:"\u4E0B\u4E00\u5F35",goToPage:"\u8DF3\u8F49\u5230\u7B2C {page} \u5F35"},Form:{required:"{label}\u4E0D\u80FD\u70BA\u7A7A",requiredNoLabel:"\u6B64\u9805\u4E0D\u80FD\u70BA\u7A7A"},Tag:{close:"\u95DC\u9589"},Upload:{retry:"\u91CD\u65B0\u4E0A\u50B3",remove:"\u79FB\u9664\u6A94\u6848",removeShort:"\u79FB\u9664",dragText:"\u62D6\u62FD\u6A94\u6848\u5230\u6B64\u8655\uFF0C\u6216",clickUpload:"\u9EDE\u9078\u4E0A\u50B3",upload:"\u4E0A\u50B3"},Cascader:{empty:"\u66AB\u7121\u8CC7\u6599"},TreeSelect:{empty:"\u66AB\u7121\u8CC7\u6599"},ColorPicker:{placeholder:"\u8ACB\u9078\u64C7\u984F\u8272",hexInput:"\u5341\u516D\u9032\u4F4D\u8272\u503C",alphaInput:"\u900F\u660E\u5EA6"},DatePicker:{placeholder:"\u5E74/\u6708/\u65E5",today:"\u4ECA\u5929",prevYear:"\u4E0A\u4E00\u5E74",nextYear:"\u4E0B\u4E00\u5E74",prevMonth:"\u4E0A\u4E00\u6708",nextMonth:"\u4E0B\u4E00\u6708",prevDecade:"\u4E0A\u4E00\u7D44\u5E74\u4EFD",nextDecade:"\u4E0B\u4E00\u7D44\u5E74\u4EFD",months:["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"],yearFormat:"{year}\u5E74",monthFormat:"{month}\u6708"},RangePicker:{startPlaceholder:"\u5E74/\u6708/\u65E5",endPlaceholder:"\u5E74/\u6708/\u65E5"},TimePicker:{now:"\u73FE\u5728",confirm:"\u78BA\u5B9A",placeholder:"\u6642:\u5206",placeholderFull:"\u6642:\u5206:\u79D2"},Table:{loading:"\u8F09\u5165\u4E2D",empty:"\u66AB\u7121\u8CC7\u6599",loadError:"\u8F09\u5165\u5931\u6557"},Tree:{empty:"\u66AB\u7121\u8CC7\u6599"},Pagination:{total:"\u5171 {total} \u689D",prevPage:"\u4E0A\u4E00\u9801",nextPage:"\u4E0B\u4E00\u9801",itemsPerPage:"{size}\u689D/\u9801",jumpTo:"\u8DF3\u81F3",page:"\u9801"},Dialog:{close:"\u95DC\u9589"},Drawer:{close:"\u95DC\u9589"},Input:{clear:"\u6E05\u7A7A",expand:"\u5C55\u958B\u8F38\u5165\u6846"},Alert:{close:"\u95DC\u9589"},Toast:{close:"\u95DC\u9589\u8A0A\u606F"},Spin:{loading:"\u8F09\u5165\u4E2D"},Empty:{retry:"\u91CD\u8A66"},InfiniteScroll:{loading:"\u8F09\u5165\u4E2D",noMore:"\u6C92\u6709\u66F4\u591A\u4E86",loadFailed:"\u8F09\u5165\u5931\u6557"},Sidebar:{expand:"\u5C55\u958B",collapse:"\u6536\u8D77",loading:"\u8F09\u5165\u4E2D",empty:"\u66AB\u7121\u8CC7\u6599",loadError:"\u8F09\u5165\u5931\u6557"},PersonPicker:{title:"\u9078\u64C7\u4EBA\u54E1",ok:"\u78BA\u5B9A",cancel:"\u53D6\u6D88",searchPlaceholder:"\u641C\u5C0B\u59D3\u540D\u3001\u5DE5\u865F",tabRecentContacts:"\u6700\u8FD1\u806F\u7D61\u4EBA",tabRecentGroups:"\u6700\u8FD1\u7FA4\u7D44",tabOrganization:"\u9078\u64C7\u7D44\u7E54",tabPerson:"\u9078\u64C7\u4EBA\u54E1",selectAll:"\u5168\u9078",selectedTitle:"\u5DF2\u9078",groupPerson:"\u4EBA\u54E1",groupGroup:"\u7FA4\u7D44",groupOrg:"\u7D44\u7E54",remove:"\u79FB\u9664",drillDown:"\u6AA2\u8996\u4E0B\u7D1A",jumpTo:"\u8DF3\u8F49\u5230",empty:"\u66AB\u7121\u8CC7\u6599",searchEmpty:"\u641C\u5C0B\u7121\u7D50\u679C",loadFailed:"\u8F09\u5165\u5931\u6557",loadFailedDetail:"\u670D\u52D9\u97FF\u61C9\u7570\u5E38\u6216\u7DB2\u8DEF\u4E0D\u53EF\u7528",retry:"\u91CD\u8A66"}},we=ve;var Se={locale:"ms-MY",Button:{},Breadcrumb:{more:"Lagi",back:"Kembali",label:"Serbuk roti",scrollLeft:"Tatal ke kiri",scrollRight:"Tatal ke kanan"},Select:{loading:"Memuatkan",loadError:"Gagal dimuatkan, sila cuba lagi",loadFailed:"Gagal dimuatkan",notFound:"Tiada hasil ditemui",clear:"Kosongkan"},Dropdown:{clear:"Kosongkan",loading:"Memuatkan",loadError:"Gagal dimuatkan, sila cuba lagi",empty:"Tiada data"},Tabs:{scrollLeft:"Tatal ke kiri",scrollRight:"Tatal ke kanan"},Carousel:{carousel:"Karusel",prev:"Slaid sebelumnya",next:"Slaid seterusnya",goToPage:"Pergi ke slaid {page}"},Form:{required:"{label} wajib diisi",requiredNoLabel:"Medan ini wajib diisi"},Tag:{close:"Tutup"},Upload:{retry:"Muat naik semula",remove:"Alih keluar fail",removeShort:"Alih keluar",dragText:"Seret fail ke sini, atau ",clickUpload:"klik untuk muat naik",upload:"Muat naik"},Cascader:{empty:"Tiada data"},TreeSelect:{empty:"Tiada data"},ColorPicker:{placeholder:"Pilih warna",hexInput:"Nilai warna heksadesimal",alphaInput:"Kelegapan"},DatePicker:{placeholder:"TTTT/BB/HH",today:"Hari ini",prevYear:"Tahun sebelumnya",nextYear:"Tahun seterusnya",prevMonth:"Bulan sebelumnya",nextMonth:"Bulan seterusnya",prevDecade:"Dekad sebelumnya",nextDecade:"Dekad seterusnya",months:["Jan","Feb","Mac","Apr","Mei","Jun","Jul","Ogo","Sep","Okt","Nov","Dis"],yearFormat:"{year}",monthFormat:"{month}"},RangePicker:{startPlaceholder:"Tarikh mula",endPlaceholder:"Tarikh tamat"},TimePicker:{now:"Sekarang",confirm:"OK",placeholder:"HH:mm",placeholderFull:"HH:mm:ss"},Table:{loading:"Memuatkan",empty:"Tiada data",loadError:"Gagal dimuatkan"},Tree:{empty:"Tiada data"},Pagination:{total:"{total} item",prevPage:"Halaman sebelumnya",nextPage:"Halaman seterusnya",itemsPerPage:"{size} / halaman",jumpTo:"Pergi ke",page:""},Dialog:{close:"Tutup"},Drawer:{close:"Tutup"},Input:{clear:"Kosongkan",expand:"Kembangkan input"},Alert:{close:"Tutup"},Toast:{close:"Tutup mesej"},Spin:{loading:"Memuatkan"},Empty:{retry:"Cuba lagi"},InfiniteScroll:{loading:"Memuatkan",noMore:"Tiada lagi item",loadFailed:"Gagal dimuatkan"},Sidebar:{expand:"Kembangkan",collapse:"Runtuhkan",loading:"Memuatkan",empty:"Tiada data",loadError:"Gagal dimuatkan"},PersonPicker:{title:"Pilih orang",ok:"OK",cancel:"Batal",searchPlaceholder:"Cari mengikut nama atau ID pekerja",tabRecentContacts:"Kenalan terkini",tabRecentGroups:"Kumpulan terkini",tabOrganization:"Organisasi",tabPerson:"Orang",selectAll:"Pilih semua",selectedTitle:"Dipilih",groupPerson:"Orang",groupGroup:"Kumpulan",groupOrg:"Jabatan",remove:"Alih keluar",drillDown:"Lihat subperingkat",jumpTo:"Lompat ke ",empty:"Tiada data",searchEmpty:"Tiada hasil",loadFailed:"Gagal dimuatkan",loadFailedDetail:"Perkhidmatan tidak tersedia atau rangkaian tidak dapat dicapai",retry:"Cuba lagi"}},De=Se;var Le={locale:"id-ID",Button:{},Breadcrumb:{more:"Lainnya",back:"Kembali",label:"Breadcrumb",scrollLeft:"Gulir ke kiri",scrollRight:"Gulir ke kanan"},Select:{loading:"Memuat",loadError:"Gagal memuat, silakan coba lagi",loadFailed:"Gagal memuat",notFound:"Tidak ada hasil",clear:"Hapus"},Dropdown:{clear:"Hapus",loading:"Memuat",loadError:"Gagal memuat, silakan coba lagi",empty:"Tidak ada data"},Tabs:{scrollLeft:"Gulir ke kiri",scrollRight:"Gulir ke kanan"},Carousel:{carousel:"Korsel",prev:"Slide sebelumnya",next:"Slide berikutnya",goToPage:"Buka slide {page}"},Form:{required:"{label} wajib diisi",requiredNoLabel:"Kolom ini wajib diisi"},Tag:{close:"Tutup"},Upload:{retry:"Unggah ulang",remove:"Hapus file",removeShort:"Hapus",dragText:"Seret file ke sini, atau ",clickUpload:"klik untuk mengunggah",upload:"Unggah"},Cascader:{empty:"Tidak ada data"},TreeSelect:{empty:"Tidak ada data"},ColorPicker:{placeholder:"Pilih warna",hexInput:"Nilai warna heksadesimal",alphaInput:"Opasitas"},DatePicker:{placeholder:"TTTT/BB/HH",today:"Hari ini",prevYear:"Tahun sebelumnya",nextYear:"Tahun berikutnya",prevMonth:"Bulan sebelumnya",nextMonth:"Bulan berikutnya",prevDecade:"Dekade sebelumnya",nextDecade:"Dekade berikutnya",months:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Agu","Sep","Okt","Nov","Des"],yearFormat:"{year}",monthFormat:"{month}"},RangePicker:{startPlaceholder:"Tanggal mulai",endPlaceholder:"Tanggal akhir"},TimePicker:{now:"Sekarang",confirm:"OK",placeholder:"HH:mm",placeholderFull:"HH:mm:ss"},Table:{loading:"Memuat",empty:"Tidak ada data",loadError:"Gagal memuat"},Tree:{empty:"Tidak ada data"},Pagination:{total:"{total} item",prevPage:"Halaman sebelumnya",nextPage:"Halaman berikutnya",itemsPerPage:"{size} / halaman",jumpTo:"Ke halaman",page:""},Dialog:{close:"Tutup"},Drawer:{close:"Tutup"},Input:{clear:"Hapus",expand:"Perluas input"},Alert:{close:"Tutup"},Toast:{close:"Tutup pesan"},Spin:{loading:"Memuat"},Empty:{retry:"Coba lagi"},InfiniteScroll:{loading:"Memuat",noMore:"Tidak ada item lagi",loadFailed:"Gagal memuat"},Sidebar:{expand:"Perluas",collapse:"Ciutkan",loading:"Memuat",empty:"Tidak ada data",loadError:"Gagal memuat"},PersonPicker:{title:"Pilih orang",ok:"OK",cancel:"Batal",searchPlaceholder:"Cari berdasarkan nama atau ID karyawan",tabRecentContacts:"Kontak terbaru",tabRecentGroups:"Grup terbaru",tabOrganization:"Organisasi",tabPerson:"Orang",selectAll:"Pilih semua",selectedTitle:"Dipilih",groupPerson:"Orang",groupGroup:"Grup",groupOrg:"Departemen",remove:"Hapus",drillDown:"Lihat subtingkat",jumpTo:"Lompat ke ",empty:"Tidak ada data",searchEmpty:"Tidak ada hasil",loadFailed:"Gagal memuat",loadFailedDetail:"Layanan tidak tersedia atau jaringan tidak dapat dijangkau",retry:"Coba lagi"}},He=Le;var Ee={locale:"th-TH",Button:{},Breadcrumb:{more:"\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E40\u0E15\u0E34\u0E21",back:"\u0E22\u0E49\u0E2D\u0E19\u0E01\u0E25\u0E31\u0E1A",label:"\u0E40\u0E2A\u0E49\u0E19\u0E17\u0E32\u0E07\u0E19\u0E33\u0E17\u0E32\u0E07",scrollLeft:"\u0E40\u0E25\u0E37\u0E48\u0E2D\u0E19\u0E44\u0E1B\u0E17\u0E32\u0E07\u0E0B\u0E49\u0E32\u0E22",scrollRight:"\u0E40\u0E25\u0E37\u0E48\u0E2D\u0E19\u0E44\u0E1B\u0E17\u0E32\u0E07\u0E02\u0E27\u0E32"},Select:{loading:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E42\u0E2B\u0E25\u0E14",loadError:"\u0E42\u0E2B\u0E25\u0E14\u0E44\u0E21\u0E48\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08 \u0E42\u0E1B\u0E23\u0E14\u0E25\u0E2D\u0E07\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07",loadFailed:"\u0E42\u0E2B\u0E25\u0E14\u0E44\u0E21\u0E48\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08",notFound:"\u0E44\u0E21\u0E48\u0E1E\u0E1A\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C",clear:"\u0E25\u0E49\u0E32\u0E07"},Dropdown:{clear:"\u0E25\u0E49\u0E32\u0E07",loading:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E42\u0E2B\u0E25\u0E14",loadError:"\u0E42\u0E2B\u0E25\u0E14\u0E44\u0E21\u0E48\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08 \u0E42\u0E1B\u0E23\u0E14\u0E25\u0E2D\u0E07\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07",empty:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25"},Tabs:{scrollLeft:"\u0E40\u0E25\u0E37\u0E48\u0E2D\u0E19\u0E44\u0E1B\u0E17\u0E32\u0E07\u0E0B\u0E49\u0E32\u0E22",scrollRight:"\u0E40\u0E25\u0E37\u0E48\u0E2D\u0E19\u0E44\u0E1B\u0E17\u0E32\u0E07\u0E02\u0E27\u0E32"},Carousel:{carousel:"\u0E20\u0E32\u0E1E\u0E2A\u0E44\u0E25\u0E14\u0E4C",prev:"\u0E2A\u0E44\u0E25\u0E14\u0E4C\u0E01\u0E48\u0E2D\u0E19\u0E2B\u0E19\u0E49\u0E32",next:"\u0E2A\u0E44\u0E25\u0E14\u0E4C\u0E16\u0E31\u0E14\u0E44\u0E1B",goToPage:"\u0E44\u0E1B\u0E17\u0E35\u0E48\u0E2A\u0E44\u0E25\u0E14\u0E4C {page}"},Form:{required:"\u0E42\u0E1B\u0E23\u0E14\u0E01\u0E23\u0E2D\u0E01{label}",requiredNoLabel:"\u0E08\u0E33\u0E40\u0E1B\u0E47\u0E19\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E23\u0E2D\u0E01\u0E0A\u0E48\u0E2D\u0E07\u0E19\u0E35\u0E49"},Tag:{close:"\u0E1B\u0E34\u0E14"},Upload:{retry:"\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07",remove:"\u0E25\u0E1A\u0E44\u0E1F\u0E25\u0E4C",removeShort:"\u0E25\u0E1A",dragText:"\u0E25\u0E32\u0E01\u0E44\u0E1F\u0E25\u0E4C\u0E21\u0E32\u0E17\u0E35\u0E48\u0E19\u0E35\u0E48 \u0E2B\u0E23\u0E37\u0E2D",clickUpload:"\u0E04\u0E25\u0E34\u0E01\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14",upload:"\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14"},Cascader:{empty:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25"},TreeSelect:{empty:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25"},ColorPicker:{placeholder:"\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E2A\u0E35",hexInput:"\u0E04\u0E48\u0E32\u0E2A\u0E35\u0E10\u0E32\u0E19\u0E2A\u0E34\u0E1A\u0E2B\u0E01",alphaInput:"\u0E04\u0E27\u0E32\u0E21\u0E17\u0E36\u0E1A\u0E41\u0E2A\u0E07"},DatePicker:{placeholder:"\u0E1B\u0E1B\u0E1B\u0E1B/\u0E14\u0E14/\u0E27\u0E27",today:"\u0E27\u0E31\u0E19\u0E19\u0E35\u0E49",prevYear:"\u0E1B\u0E35\u0E01\u0E48\u0E2D\u0E19\u0E2B\u0E19\u0E49\u0E32",nextYear:"\u0E1B\u0E35\u0E16\u0E31\u0E14\u0E44\u0E1B",prevMonth:"\u0E40\u0E14\u0E37\u0E2D\u0E19\u0E01\u0E48\u0E2D\u0E19\u0E2B\u0E19\u0E49\u0E32",nextMonth:"\u0E40\u0E14\u0E37\u0E2D\u0E19\u0E16\u0E31\u0E14\u0E44\u0E1B",prevDecade:"\u0E17\u0E28\u0E27\u0E23\u0E23\u0E29\u0E01\u0E48\u0E2D\u0E19\u0E2B\u0E19\u0E49\u0E32",nextDecade:"\u0E17\u0E28\u0E27\u0E23\u0E23\u0E29\u0E16\u0E31\u0E14\u0E44\u0E1B",months:["\u0E21.\u0E04.","\u0E01.\u0E1E.","\u0E21\u0E35.\u0E04.","\u0E40\u0E21.\u0E22.","\u0E1E.\u0E04.","\u0E21\u0E34.\u0E22.","\u0E01.\u0E04.","\u0E2A.\u0E04.","\u0E01.\u0E22.","\u0E15.\u0E04.","\u0E1E.\u0E22.","\u0E18.\u0E04."],yearFormat:"{year}",monthFormat:"{month}"},RangePicker:{startPlaceholder:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19",endPlaceholder:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E2A\u0E34\u0E49\u0E19\u0E2A\u0E38\u0E14"},TimePicker:{now:"\u0E15\u0E2D\u0E19\u0E19\u0E35\u0E49",confirm:"\u0E15\u0E01\u0E25\u0E07",placeholder:"HH:mm",placeholderFull:"HH:mm:ss"},Table:{loading:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E42\u0E2B\u0E25\u0E14",empty:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25",loadError:"\u0E42\u0E2B\u0E25\u0E14\u0E44\u0E21\u0E48\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08"},Tree:{empty:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25"},Pagination:{total:"\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14 {total} \u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",prevPage:"\u0E2B\u0E19\u0E49\u0E32\u0E01\u0E48\u0E2D\u0E19\u0E2B\u0E19\u0E49\u0E32",nextPage:"\u0E2B\u0E19\u0E49\u0E32\u0E16\u0E31\u0E14\u0E44\u0E1B",itemsPerPage:"{size} / \u0E2B\u0E19\u0E49\u0E32",jumpTo:"\u0E44\u0E1B\u0E17\u0E35\u0E48\u0E2B\u0E19\u0E49\u0E32",page:""},Dialog:{close:"\u0E1B\u0E34\u0E14"},Drawer:{close:"\u0E1B\u0E34\u0E14"},Input:{clear:"\u0E25\u0E49\u0E32\u0E07",expand:"\u0E02\u0E22\u0E32\u0E22\u0E0A\u0E48\u0E2D\u0E07\u0E1B\u0E49\u0E2D\u0E19\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25"},Alert:{close:"\u0E1B\u0E34\u0E14"},Toast:{close:"\u0E1B\u0E34\u0E14\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21"},Spin:{loading:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E42\u0E2B\u0E25\u0E14"},Empty:{retry:"\u0E25\u0E2D\u0E07\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07"},InfiniteScroll:{loading:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E42\u0E2B\u0E25\u0E14",noMore:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E40\u0E15\u0E34\u0E21",loadFailed:"\u0E42\u0E2B\u0E25\u0E14\u0E44\u0E21\u0E48\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08"},Sidebar:{expand:"\u0E02\u0E22\u0E32\u0E22",collapse:"\u0E22\u0E38\u0E1A",loading:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E42\u0E2B\u0E25\u0E14",empty:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25",loadError:"\u0E42\u0E2B\u0E25\u0E14\u0E44\u0E21\u0E48\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08"},PersonPicker:{title:"\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E1A\u0E38\u0E04\u0E04\u0E25",ok:"\u0E15\u0E01\u0E25\u0E07",cancel:"\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01",searchPlaceholder:"\u0E04\u0E49\u0E19\u0E2B\u0E32\u0E14\u0E49\u0E27\u0E22\u0E0A\u0E37\u0E48\u0E2D\u0E2B\u0E23\u0E37\u0E2D\u0E23\u0E2B\u0E31\u0E2A\u0E1E\u0E19\u0E31\u0E01\u0E07\u0E32\u0E19",tabRecentContacts:"\u0E1C\u0E39\u0E49\u0E15\u0E34\u0E14\u0E15\u0E48\u0E2D\u0E25\u0E48\u0E32\u0E2A\u0E38\u0E14",tabRecentGroups:"\u0E01\u0E25\u0E38\u0E48\u0E21\u0E25\u0E48\u0E32\u0E2A\u0E38\u0E14",tabOrganization:"\u0E2D\u0E07\u0E04\u0E4C\u0E01\u0E23",tabPerson:"\u0E1A\u0E38\u0E04\u0E04\u0E25",selectAll:"\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14",selectedTitle:"\u0E17\u0E35\u0E48\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E41\u0E25\u0E49\u0E27",groupPerson:"\u0E1A\u0E38\u0E04\u0E04\u0E25",groupGroup:"\u0E01\u0E25\u0E38\u0E48\u0E21",groupOrg:"\u0E41\u0E1C\u0E19\u0E01",remove:"\u0E25\u0E1A",drillDown:"\u0E14\u0E39\u0E23\u0E30\u0E14\u0E31\u0E1A\u0E22\u0E48\u0E2D\u0E22",jumpTo:"\u0E44\u0E1B\u0E17\u0E35\u0E48",empty:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25",searchEmpty:"\u0E44\u0E21\u0E48\u0E1E\u0E1A\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C",loadFailed:"\u0E42\u0E2B\u0E25\u0E14\u0E44\u0E21\u0E48\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08",loadFailedDetail:"\u0E1A\u0E23\u0E34\u0E01\u0E32\u0E23\u0E44\u0E21\u0E48\u0E1E\u0E23\u0E49\u0E2D\u0E21\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19\u0E2B\u0E23\u0E37\u0E2D\u0E44\u0E21\u0E48\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E15\u0E48\u0E2D\u0E40\u0E04\u0E23\u0E37\u0E2D\u0E02\u0E48\u0E32\u0E22\u0E44\u0E14\u0E49",retry:"\u0E25\u0E2D\u0E07\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07"}},Fe=Ee;var Q=Qe.createContext(C),ee=Qe.createContext(void 0),Z=Qe.createContext(-1);function Ie({locale:e=C,site:o,dialog:t,children:n}){let i=Qe.useContext(Z)+1,l=Qe.useContext(P),a=t?.zIndex,r=l.dialog.zIndex,u=Qe.useMemo(()=>({dialog:{zIndex:a??r}}),[a,r]),s=Qe.useRef();s.current||(s.current=K());let d=s.current,p=Qe.useRef();p.current||(p.current=J());let f=p.current;U(d,o,i),V(f,u,i),Qe.useEffect(()=>()=>{Y(d),W(f);},[f,d]);let y=jsxRuntime.jsx(Z.Provider,{value:i,children:jsxRuntime.jsx(P.Provider,{value:u,children:jsxRuntime.jsx(ee.Provider,{value:o,children:jsxRuntime.jsxs(Q.Provider,{value:e,children:[n,i===0&&jsxRuntime.jsx($,{})]})})})});return i===0?jsxRuntime.jsx(chunkMFBMJTYZ_js.c,{children:y}):y}Ie.displayName="LingeeProvider";function _e(){return Qe.useContext(Q)}function oe(e){return _e()[e]}function xo(){return Qe.useContext(ee)}var Ke={info:jsxRuntime.jsx(lingeeIcon.ExclamationCircleFill,{size:20}),success:jsxRuntime.jsx(lingeeIcon.CheckCircleFill,{size:20}),warning:jsxRuntime.jsx(lingeeIcon.ExclamationCircleFill1,{size:20}),error:jsxRuntime.jsx(lingeeIcon.XCircleFill,{size:20})};function te({type:e,content:o,icon:t,closable:n,className:i,onClose:l,actionLabel:a,onAction:r}){let u=oe("Toast"),s=()=>{if(t===null)return null;let d=t!==void 0?t:Ke[e];return jsxRuntime.jsx("span",{className:"lg-toast__icon",children:d})};return jsxRuntime.jsxs("div",{className:chunkDCDWEVW4_js.a("lg-toast",`lg-toast--${e}`,i),children:[s(),jsxRuntime.jsx("span",{className:"lg-toast__content",children:o}),a&&r&&jsxRuntime.jsx(chunkQEKT37W5_js.b,{className:"lg-toast__action",variant:"link",size:"sm",onClick:r,children:a}),n&&jsxRuntime.jsx("button",{className:"lg-toast__close",onClick:l,"aria-label":u.close,type:"button",children:jsxRuntime.jsx(lingeeIcon.XLg,{size:16})})]})}var ne="lingee-web-bridge",re="1.0.0",Ye="host",je="iframe",qe="lingee-web-bridge:host-toast-show",Je="lingee-web-bridge:host-toast-dismiss",Ve="lingee-web-bridge:host-toast-probe",We="lingee-web-bridge:host-toast-ready";function ie(){if(typeof crypto<"u"&&typeof crypto.randomUUID=="function")return crypto.randomUUID();let e=Date.now();return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,o=>{let t=(e+Math.random()*16)%16|0;return e=Math.floor(e/16),(o==="x"?t:t&3|8).toString(16)})}function Xe(e,o){return {_protocol:ne,_version:re,_source:e,_nonce:ie(),_traceId:"",payload:o}}function Ze(e,o){if(typeof e!="object"||e===null)return false;let t=e;return t._protocol===ne&&t._version===re&&t._source===o&&typeof t._nonce=="string"&&"payload"in t}function T(){return typeof window<"u"&&window.parent!==window}var x=false,g=new Map,ae=false;function $e(e){if(!Ze(e,Ye))return false;let o=e.payload;return !!o&&typeof o=="object"&&o.type===We}function _(e){window.parent.postMessage(Xe(je,e),"*");}function w(){ae||!T()||(ae=true,window.addEventListener("message",e=>{e.source===window.parent&&$e(e.data)&&(x=true);}),window.addEventListener("pagehide",()=>{!x||g.size===0||S();}),_({type:Ve}));}function O(){return w(),x}function le(e){if(w(),!x||!e.content)return null;let o=ie();_({type:qe,toastId:o,content:e.content.slice(0,500),level:e.level,duration:e.duration,key:e.key});let t=e.duration??3e3,n=t>0?window.setTimeout(()=>g.delete(o),t+500):void 0;return g.set(o,n),o}function S(e){if(w(),!!x){if(e){let o=g.get(e);o!==void 0&&window.clearTimeout(o),g.delete(e);}else g.forEach(o=>{o!==void 0&&window.clearTimeout(o);}),g.clear();_({type:Je,toastId:e});}}w();function D(){if(!(typeof window>"u"))return window.lingeeBridge}function se(e){if(typeof e=="string")return e;if(typeof e=="number")return String(e)}function L(e){if(!(typeof e!="string"||!e))try{let o=new URL(e);return o.protocol==="http:"||o.protocol==="https:"?o.href:void 0}catch{return}}function de(e,o={}){if(!(T()?O():R()&&typeof D()?.showToast=="function"))return false;if(e.action!==void 0){if(T()||typeof D()?.showActionToast!="function")return false;let{label:n,onClick:i,href:l,command:a}=e.action;if(typeof n!="string"||!n||!i&&!L(l)&&!a)return false}return !(se(e.content)===void 0||e.icon!==void 0||e.className!==void 0||e.closable||o.getContainer!==void 0||o.top!==void 0||o.maxCount!==void 0)}function ce(e,o,t,n={}){let i=se(o.content);if(i===void 0)return null;let l={level:e,content:i,duration:t,key:o.key};if(T()){let c=le(l);return c?(n.onAccepted?.(),{dismiss:()=>S(c)}):null}let a=D(),r=o.action,u;if(r){let c=a?.showActionToast;if(!c)return null;let A=L(r.href),fe={label:r.label,...A?{href:A}:{},...r.command?{command:r.command}:{}};u=()=>c({...l,action:fe},r.onClick?()=>n.onAction?.():void 0);}else if(a?.showToast){let c=a.showToast;u=()=>c(l);}if(!u)return null;let s=null,d=null,p=false,f=false,y=()=>{p||f||d||(d=n.onFallback?.()??null);},ge=u;return Promise.resolve().then(()=>ge()).then(c=>{if(!c?.ok||!c.toastId){y();return}if(f=true,s=c.toastId,p){a?.dismissToast?.(s);return}n.onAccepted?.();}).catch(c=>{console.error("[lingee-ui] showToast failed:",c),y();}),{dismiss:()=>{if(!p){if(p=true,d){d(),d=null;return}s&&a?.dismissToast?.(s);}}}}function ue(){if(T())return O()?(S(),true):false;let e=D();return !R()||typeof e?.dismissToast!="function"?false:(e.dismissToast().catch(o=>{console.error("[lingee-ui] dismissToast failed:",o);}),true)}var h={};function $(){let e=h.top??16;return jsxRuntime.jsx(sonner.Toaster,{position:"top-center",offset:e,gap:8,expand:true,closeButton:false,toastOptions:{unstyled:true,className:"lg-toast-wrapper"},style:{"--width":"560px"}})}function oo(e){let o=e[0];return typeof o=="object"&&o!==null&&!Qe__default.default.isValidElement(o)?o:{content:o,duration:e[1],onClose:e[2]}}function pe(e,o,t,n=()=>o.onClose?.()){let i=t===0?1/0:t,l=false,a=()=>{l||(l=true,n());},r=o.action,u=L(r?.href),s=r?.onClick??(u?()=>window.open(u,"_blank","noopener,noreferrer"):void 0),d=sonner.toast.custom(p=>jsxRuntime.jsx(te,{type:e,content:o.content,icon:o.icon,closable:o.closable,className:o.className,onClose:()=>sonner.toast.dismiss(p),actionLabel:s?r?.label:void 0,onAction:s?()=>{sonner.toast.dismiss(p),s();}:void 0}),{...o.key!==void 0&&{id:o.key},duration:i,onAutoClose:a,onDismiss:a});return ()=>{sonner.toast.dismiss(d),a();}}var E=new Set;function to(e,o){let t=o.duration!==void 0?o.duration<0?h.duration??3e3:o.duration:h.duration??3e3;if(de(o,h)){let n=false,i,l=()=>{},a=()=>{n||(n=true,i!==void 0&&clearTimeout(i),E.delete(l),o.onClose?.());},r=ce(e,o,t,{onAccepted:()=>{t>0&&!n&&(i=setTimeout(a,t));},onFallback:()=>pe(e,{...o,onClose:void 0},t,a),onAction:()=>{a(),o.action?.onClick?.();}});if(r)return l=()=>{n||(r.dismiss(),a());},E.add(l),l}return pe(e,o,t)}function H(e){return (...o)=>{let t=oo(o);return to(e,t)}}var Jo={info:H("info"),success:H("success"),warning:H("warning"),error:H("error"),destroy:()=>{Array.from(E).forEach(e=>e()),E.clear(),ue(),sonner.toast.dismiss();},config:e=>{h={...h,...e};}};exports.a=R;exports.b=$;exports.c=Jo;exports.d=C;exports.e=xe;exports.f=be;exports.g=Pe;exports.h=we;exports.i=De;exports.j=He;exports.k=Fe;exports.l=Ie;exports.m=_e;exports.n=oe;exports.o=xo;
@@ -1,2 +1,2 @@
1
- 'use strict';var chunkJYFAP23O_js=require('./chunk-JYFAP23O.js'),chunkQEKT37W5_js=require('./chunk-QEKT37W5.js'),chunkDCDWEVW4_js=require('./chunk-DCDWEVW4.js'),$e=require('react'),pt=require('@rc-component/tree'),lingeeIcon=require('lingee-icon'),jsxRuntime=require('react/jsx-runtime'),classVarianceAuthority=require('class-variance-authority');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var $e__default=/*#__PURE__*/_interopDefault($e);var pt__default=/*#__PURE__*/_interopDefault(pt);var F=$e__default.default.forwardRef(({className:e,size:t="md",spinning:l=true,children:a,tip:g,...s},u)=>{let p=chunkJYFAP23O_js.n("Spin"),m=a!=null,n=jsxRuntime.jsx("div",{className:"lg-spin__indicator"});return m?jsxRuntime.jsxs("div",{ref:u,className:chunkDCDWEVW4_js.a("lg-spin","lg-spin--nested",e),...s,children:[jsxRuntime.jsx("div",{className:chunkDCDWEVW4_js.a("lg-spin__content",l&&"lg-spin__content--loading"),children:a}),l&&jsxRuntime.jsxs("div",{className:"lg-spin__overlay",role:"status","aria-label":g||p.loading,children:[jsxRuntime.jsx("div",{className:chunkDCDWEVW4_js.a("lg-spin",`lg-spin--${t}`),children:n}),g&&jsxRuntime.jsx("span",{className:"lg-spin__tip",children:g})]})]}):jsxRuntime.jsx("div",{ref:u,className:chunkDCDWEVW4_js.a("lg-spin",`lg-spin--${t}`,!l&&"lg-spin--paused",e),role:"status","aria-label":g||p.loading,...s,children:n})});F.displayName="Spin";var de="lg-empty-gradient",ce=`url(#${de})`,se=0,O=null;function je(){if(se++>0||typeof document>"u")return;let e=document.createElementNS("http://www.w3.org/2000/svg","svg");e.setAttribute("width","0"),e.setAttribute("height","0"),e.setAttribute("aria-hidden","true"),e.style.position="absolute",e.style.overflow="hidden",e.innerHTML=`<defs><linearGradient id="${de}" x1="12" y1="2" x2="12" y2="22" gradientUnits="userSpaceOnUse"><stop style="stop-color: var(--__lg-empty-gradient-from)"/><stop offset="1" style="stop-color: var(--__lg-empty-gradient-to)"/></linearGradient></defs>`,document.body.appendChild(e),O=e;}function Ze(){--se>0||O&&(O.remove(),O=null);}var U={lg:56,md:24,sm:16};function Fe(e){return typeof e=="function"||typeof e=="object"&&e!==null&&"render"in e&&typeof e.render=="function"}var D=$e__default.default.forwardRef(({size:e="md",icon:t,description:l,children:a,className:g,style:s,...u},p)=>{$e.useEffect(()=>(je(),Ze),[]);let m=U[e],n;return t?Fe(t)?n=jsxRuntime.jsx(t,{size:m,fill:ce}):n=t:n=jsxRuntime.jsx(lingeeIcon.DocumentLibrary,{size:m,fill:ce}),jsxRuntime.jsxs("div",{ref:p,className:chunkDCDWEVW4_js.a("lg-empty",`lg-empty--${e}`,g),style:s,...u,children:[jsxRuntime.jsx("span",{className:"lg-empty__icon",children:n}),jsxRuntime.jsx("span",{className:"lg-empty__text",children:l}),a&&jsxRuntime.jsx("div",{className:"lg-empty__extra",children:a})]})});D.displayName="Empty";function Je(e,t){switch(e){case "loading":return jsxRuntime.jsx(lingeeIcon.LoaderCircle,{size:t,spin:true});case "error":return jsxRuntime.jsx(lingeeIcon.ExclamationCircle,{size:t});default:return jsxRuntime.jsx(lingeeIcon.Inbox,{size:t})}}var Y=$e__default.default.forwardRef(({status:e,description:t,icon:l,size:a="sm",variant:g="block",spacing:s="normal",align:u="center",onRetry:p,className:m,style:n,...v},h)=>{let N=chunkJYFAP23O_js.n("Empty"),w=l===null?null:l??Je(e,U[a]),b=e==="error"&&typeof p=="function",d=chunkDCDWEVW4_js.a("lg-empty-card",`lg-empty-card--${a}`,`lg-empty-card--${g}`,`lg-empty-card--${e}`,`lg-empty-card--spacing-${s}`,u==="start"&&"lg-empty-card--align-start",b&&"lg-empty-card--retryable",m),k=b?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[t,jsxRuntime.jsx("span",{className:"lg-empty-card__retry",children:N.retry})]}):t,i=jsxRuntime.jsx(D,{size:a,icon:w??jsxRuntime.jsx(jsxRuntime.Fragment,{}),description:k,className:"lg-empty-card__body"});return b?jsxRuntime.jsx("button",{ref:h,type:"button",className:d,style:n,onClick:p,...v,children:i}):jsxRuntime.jsx("div",{ref:h,className:d,style:n,role:e==="empty"?void 0:"status","aria-live":e==="empty"?void 0:"polite",...v,children:i})});Y.displayName="Empty.Card";var fe=Object.assign(D,{Card:Y});var et={diamond:[{w:76.7412,h:29.5746,x:-11.303,y:-8.104,rotate:3.61,blur:4,path:"M15.1953 8L68.7412 13.2684L55.6642 21.5746H8L15.1953 8Z"},{w:49.895,h:21.0268,x:18.294,y:-7.912,rotate:-15.73,blur:3,path:"M10.489 6L43.895 9.50337L35.7366 15.0268H6L10.489 6Z"}],metal:[{w:76.7412,h:28.579,x:-15.3845,y:-7.1025,rotate:3.61,blur:4,path:"M15.1953 8L68.7412 12.882L55.6642 20.579H8L15.1953 8Z"},{w:43.4758,h:20.4645,x:14.807,y:-5.685,rotate:-20.81,blur:3,path:"M9.72859 6L37.4758 9.28514L30.6993 14.4645H6L9.72859 6Z"}]},ue=["primary","secondary"],me=({shape:e})=>jsxRuntime.jsx(jsxRuntime.Fragment,{children:et[e].map((t,l)=>jsxRuntime.jsx("svg",{className:`lg-tag__glow lg-tag__glow--${ue[l]}`,width:t.w,height:t.h,viewBox:`0 0 ${t.w} ${t.h}`,xmlns:"http://www.w3.org/2000/svg","aria-hidden":true,style:{left:t.x,top:t.y,transform:`rotate(${t.rotate}deg)`,filter:`blur(${t.blur}px)`},children:jsxRuntime.jsx("path",{d:t.path})},ue[l]))});var ot=["primary","info","success","warning","danger","amber","yellow","cyan","purple"],gt={purple:"diamond",yellow:"metal",cyan:"metal"},nt=["text","filled","line"],it=["primary","info","success","warning","danger","amber","cyan","purple"],ct=classVarianceAuthority.cva("lg-tag",{variants:{variant:{text:"lg-tag--text",tint:"",filled:"lg-tag--filled",line:"lg-tag--line",gradient:"lg-tag--gradient",glow:"lg-tag--glow"},size:{sm:"lg-tag--sm",md:"lg-tag--md",lg:"lg-tag--lg"}},defaultVariants:{variant:"tint",size:"md"}}),X=$e__default.default.forwardRef(({className:e,color:t="info",variant:l="tint",size:a="md",shape:g="pill",icon:s,background:u,closable:p=false,onClose:m,children:n,style:v,...h},N)=>{let w=chunkJYFAP23O_js.n("Tag"),b=ot.includes(t),d=b&&nt.includes(l)&&!it.includes(t)?"tint":l,k=b?`lg-tag--${t}`:"",i={...v};b||(d==="filled"?i["--_tag-bg"]=t:(i["--_tag-color"]=t,i["--_tag-bg"]=`color-mix(in srgb, ${t} 8%, transparent)`),d==="gradient"?(i["--_tag-gradient-from"]=`color-mix(in srgb, ${t} 12%, transparent)`,i["--_tag-gradient-to"]=`color-mix(in srgb, ${t} 3%, transparent)`):d==="glow"&&(i["--_tag-gradient-from"]=`color-mix(in srgb, ${t} 12%, transparent)`,i["--_tag-gradient-to"]=`color-mix(in srgb, ${t} 28%, transparent)`)),u&&(i.background=u);let I=d==="gradient"||d==="glow"?"":`lg-tag--${g}`,A=d==="glow"?gt[t]:void 0,M=H=>{H.stopPropagation(),m?.(H);};return jsxRuntime.jsxs("span",{ref:N,className:chunkDCDWEVW4_js.a(ct({variant:d,size:a}),I,k,p&&"lg-tag--closable",e),style:i,...h,children:[A&&jsxRuntime.jsx(me,{shape:A}),s&&jsxRuntime.jsx("span",{className:"lg-tag__icon",children:s}),jsxRuntime.jsx("span",{className:"lg-tag__content",children:n}),p&&jsxRuntime.jsx("span",{className:"lg-tag__close",onClick:M,role:"button",tabIndex:0,"aria-label":w.close,children:jsxRuntime.jsx(lingeeIcon.XLg,{})})]})});X.displayName="Tag";var ut={sm:30,md:34,lg:38},q=()=>({height:0,opacity:0}),ye=e=>{let t=Array.from(e.children);return t.length===0?0:t.reduce((l,a)=>{let g=parseFloat(getComputedStyle(a).marginTop)||0;return l+a.getBoundingClientRect().height+g},0)},be=e=>({height:ye(e),opacity:1}),mt={motionName:"lg-tree-motion",motionDeadline:300,onAppearStart:q,onAppearActive:be,onEnterStart:q,onEnterActive:be,onLeaveStart:e=>({height:ye(e),opacity:1}),onLeaveActive:q},bt="---",vt=e=>e!=null&&(e.tag!=null||e.action!=null||e.extra!=null),_t=e=>e!=null&&typeof e!="boolean",J=e=>{e.stopPropagation();},yt=e=>{e.preventDefault(),e.stopPropagation();},xt=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End","Enter"," "]),ht=e=>{xt.has(e.key)&&e.stopPropagation();},ve={onClick:J,onDoubleClick:J,onContextMenu:J,onKeyDown:ht,onDragStart:yt},wt=$e__default.default.forwardRef((e,t)=>{let{treeData:l,fieldNames:a,size:g="md",expandedKeys:s,defaultExpandedKeys:u,defaultExpandAll:p,autoExpandParent:m,expandAction:n="click",onExpand:v,selectable:h=true,multiple:N=false,selectedKeys:w,defaultSelectedKeys:b,onSelect:d,checkable:k=false,checkStrictly:i=false,checkedKeys:I,defaultCheckedKeys:A,onCheck:M,showIcon:H=false,icon:C,switcherIcon:S,indentGuide:xe="line",titleRender:V,loadData:he,loadedKeys:Q,draggable:T=false,allowDrop:j,onDrop:ee,height:we,itemHeight:ke,virtual:Te,disabled:G=false,loading:te=false,empty:Ee,onRightClick:Ne,animated:Ce=true,className:Se,style:Re}=e,Le=chunkJYFAP23O_js.n("Tree"),De=$e.useMemo(()=>{if(C)return typeof C!="function"?C:r=>C(r.data,{expanded:!!r.expanded,isLeaf:!!r.isLeaf})},[C]),ze=$e.useMemo(()=>S!==void 0?typeof S!="function"?S:r=>S({expanded:!!r.expanded,isLeaf:!!r.isLeaf}):r=>r.isLeaf?null:jsxRuntime.jsx(lingeeIcon.ChevronDown,{className:"lg-tree__switcher-icon",size:16,"aria-hidden":true}),[S]),Pe=$e.useMemo(()=>{if(T)return {icon:false,nodeDraggable:typeof T=="function"?r=>T(r):void 0}},[T]),Ie=$e.useCallback((r,o)=>{v?.(r,{node:o.node,expanded:o.expanded});},[v]),Ae=$e.useCallback((r,o)=>{d?.(r,{node:o.node,selected:o.selected,selectedNodes:o.selectedNodes});},[d]),Me=$e.useCallback((r,o)=>{M?.(r,{node:o.node,checked:o.checked,checkedNodes:o.checkedNodes,halfCheckedKeys:o.halfCheckedKeys});},[M]),He=$e.useCallback(r=>{ee?.({dragNode:r.dragNode,node:r.node,dropPosition:r.dropPosition,dropToGap:r.dropToGap});},[ee]),re=$e.useMemo(()=>{if(j)return r=>j({dragNode:r.dragNode,dropNode:r.dropNode,dropPosition:r.dropPosition})},[j]),Ge=$e.useCallback(r=>{let o;if(V)o=V(r);else {let $=r[a?.title||"title"];o=$===void 0?bt:$;}let{treeItem:le}=r;if(!vt(le))return o;let{tag:K,action:x,extra:Z}=le,ae=G||!!r.disabled,oe=typeof Z=="function"?Z({node:r,disabled:ae}):Z,ge=T?true:void 0;return jsxRuntime.jsxs("span",{className:"lg-tree__node-content",children:[jsxRuntime.jsx("span",{className:chunkDCDWEVW4_js.a("lg-tree__node-label",K&&"lg-tree__node-label--with-tag"),children:o}),K&&jsxRuntime.jsx("span",{className:"lg-tree__node-tag",children:jsxRuntime.jsx(X,{color:K.color??"primary",size:"sm",shape:"pill",children:K.content})}),_t(oe)&&jsxRuntime.jsx("span",{className:"lg-tree__node-extra",draggable:ge,...ve,children:oe}),x&&jsxRuntime.jsx("span",{className:"lg-tree__node-action",draggable:ge,...ve,children:jsxRuntime.jsx(chunkQEKT37W5_js.b,{variant:"text",size:"sm",shape:"circle",icon:x.icon,"aria-label":x.ariaLabel,tooltip:x.tooltip??x.ariaLabel,disabled:ae||!!x.disabled,onClick:$=>x.onClick?.(r,$)})})]})},[G,T,a?.title,V]),Ke=!l||l.length===0,E={};return s!==void 0&&(E.expandedKeys=s),w!==void 0&&(E.selectedKeys=w),I!==void 0&&(E.checkedKeys=I),Q!==void 0&&(E.loadedKeys=Q),re!==void 0&&(E.allowDrop=re),jsxRuntime.jsxs("div",{ref:t,className:chunkDCDWEVW4_js.a("lg-tree",`lg-tree--${g}`,`lg-tree--guide-${xe}`,k&&"lg-tree--checkable",G&&"lg-tree--disabled",te&&"lg-tree--loading",Se),style:Re,children:[te&&jsxRuntime.jsx("div",{className:"lg-tree__loading-mask",children:jsxRuntime.jsx(F,{size:"md"})}),Ke?jsxRuntime.jsx("div",{className:"lg-tree__empty",children:Ee??jsxRuntime.jsx(fe,{size:"sm",description:Le.empty})}):jsxRuntime.jsx(pt__default.default,{prefixCls:"lg-tree",treeData:l,fieldNames:a,defaultExpandedKeys:u,defaultExpandAll:p,autoExpandParent:m,expandAction:n,onExpand:Ie,selectable:h,multiple:N,defaultSelectedKeys:b,onSelect:Ae,checkable:k,checkStrictly:i,defaultCheckedKeys:A,onCheck:Me,showIcon:H,icon:De,switcherIcon:ze,titleRender:Ge,loadData:he,draggable:Pe,onDrop:He,height:we,itemHeight:ke??ut[g],virtual:Te,disabled:G,onRightClick:Ne,motion:Ce?mt:void 0,...E})]})});wt.displayName="Tree";
1
+ 'use strict';var chunkTDJG7ZB6_js=require('./chunk-TDJG7ZB6.js'),chunkQEKT37W5_js=require('./chunk-QEKT37W5.js'),chunkDCDWEVW4_js=require('./chunk-DCDWEVW4.js'),$e=require('react'),pt=require('@rc-component/tree'),lingeeIcon=require('lingee-icon'),jsxRuntime=require('react/jsx-runtime'),classVarianceAuthority=require('class-variance-authority');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var $e__default=/*#__PURE__*/_interopDefault($e);var pt__default=/*#__PURE__*/_interopDefault(pt);var F=$e__default.default.forwardRef(({className:e,size:t="md",spinning:l=true,children:a,tip:g,...s},u)=>{let p=chunkTDJG7ZB6_js.n("Spin"),m=a!=null,n=jsxRuntime.jsx("div",{className:"lg-spin__indicator"});return m?jsxRuntime.jsxs("div",{ref:u,className:chunkDCDWEVW4_js.a("lg-spin","lg-spin--nested",e),...s,children:[jsxRuntime.jsx("div",{className:chunkDCDWEVW4_js.a("lg-spin__content",l&&"lg-spin__content--loading"),children:a}),l&&jsxRuntime.jsxs("div",{className:"lg-spin__overlay",role:"status","aria-label":g||p.loading,children:[jsxRuntime.jsx("div",{className:chunkDCDWEVW4_js.a("lg-spin",`lg-spin--${t}`),children:n}),g&&jsxRuntime.jsx("span",{className:"lg-spin__tip",children:g})]})]}):jsxRuntime.jsx("div",{ref:u,className:chunkDCDWEVW4_js.a("lg-spin",`lg-spin--${t}`,!l&&"lg-spin--paused",e),role:"status","aria-label":g||p.loading,...s,children:n})});F.displayName="Spin";var de="lg-empty-gradient",ce=`url(#${de})`,se=0,O=null;function je(){if(se++>0||typeof document>"u")return;let e=document.createElementNS("http://www.w3.org/2000/svg","svg");e.setAttribute("width","0"),e.setAttribute("height","0"),e.setAttribute("aria-hidden","true"),e.style.position="absolute",e.style.overflow="hidden",e.innerHTML=`<defs><linearGradient id="${de}" x1="12" y1="2" x2="12" y2="22" gradientUnits="userSpaceOnUse"><stop style="stop-color: var(--__lg-empty-gradient-from)"/><stop offset="1" style="stop-color: var(--__lg-empty-gradient-to)"/></linearGradient></defs>`,document.body.appendChild(e),O=e;}function Ze(){--se>0||O&&(O.remove(),O=null);}var U={lg:56,md:24,sm:16};function Fe(e){return typeof e=="function"||typeof e=="object"&&e!==null&&"render"in e&&typeof e.render=="function"}var D=$e__default.default.forwardRef(({size:e="md",icon:t,description:l,children:a,className:g,style:s,...u},p)=>{$e.useEffect(()=>(je(),Ze),[]);let m=U[e],n;return t?Fe(t)?n=jsxRuntime.jsx(t,{size:m,fill:ce}):n=t:n=jsxRuntime.jsx(lingeeIcon.DocumentLibrary,{size:m,fill:ce}),jsxRuntime.jsxs("div",{ref:p,className:chunkDCDWEVW4_js.a("lg-empty",`lg-empty--${e}`,g),style:s,...u,children:[jsxRuntime.jsx("span",{className:"lg-empty__icon",children:n}),jsxRuntime.jsx("span",{className:"lg-empty__text",children:l}),a&&jsxRuntime.jsx("div",{className:"lg-empty__extra",children:a})]})});D.displayName="Empty";function Je(e,t){switch(e){case "loading":return jsxRuntime.jsx(lingeeIcon.LoaderCircle,{size:t,spin:true});case "error":return jsxRuntime.jsx(lingeeIcon.ExclamationCircle,{size:t});default:return jsxRuntime.jsx(lingeeIcon.Inbox,{size:t})}}var Y=$e__default.default.forwardRef(({status:e,description:t,icon:l,size:a="sm",variant:g="block",spacing:s="normal",align:u="center",onRetry:p,className:m,style:n,...v},h)=>{let N=chunkTDJG7ZB6_js.n("Empty"),w=l===null?null:l??Je(e,U[a]),b=e==="error"&&typeof p=="function",d=chunkDCDWEVW4_js.a("lg-empty-card",`lg-empty-card--${a}`,`lg-empty-card--${g}`,`lg-empty-card--${e}`,`lg-empty-card--spacing-${s}`,u==="start"&&"lg-empty-card--align-start",b&&"lg-empty-card--retryable",m),k=b?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[t,jsxRuntime.jsx("span",{className:"lg-empty-card__retry",children:N.retry})]}):t,i=jsxRuntime.jsx(D,{size:a,icon:w??jsxRuntime.jsx(jsxRuntime.Fragment,{}),description:k,className:"lg-empty-card__body"});return b?jsxRuntime.jsx("button",{ref:h,type:"button",className:d,style:n,onClick:p,...v,children:i}):jsxRuntime.jsx("div",{ref:h,className:d,style:n,role:e==="empty"?void 0:"status","aria-live":e==="empty"?void 0:"polite",...v,children:i})});Y.displayName="Empty.Card";var fe=Object.assign(D,{Card:Y});var et={diamond:[{w:76.7412,h:29.5746,x:-11.303,y:-8.104,rotate:3.61,blur:4,path:"M15.1953 8L68.7412 13.2684L55.6642 21.5746H8L15.1953 8Z"},{w:49.895,h:21.0268,x:18.294,y:-7.912,rotate:-15.73,blur:3,path:"M10.489 6L43.895 9.50337L35.7366 15.0268H6L10.489 6Z"}],metal:[{w:76.7412,h:28.579,x:-15.3845,y:-7.1025,rotate:3.61,blur:4,path:"M15.1953 8L68.7412 12.882L55.6642 20.579H8L15.1953 8Z"},{w:43.4758,h:20.4645,x:14.807,y:-5.685,rotate:-20.81,blur:3,path:"M9.72859 6L37.4758 9.28514L30.6993 14.4645H6L9.72859 6Z"}]},ue=["primary","secondary"],me=({shape:e})=>jsxRuntime.jsx(jsxRuntime.Fragment,{children:et[e].map((t,l)=>jsxRuntime.jsx("svg",{className:`lg-tag__glow lg-tag__glow--${ue[l]}`,width:t.w,height:t.h,viewBox:`0 0 ${t.w} ${t.h}`,xmlns:"http://www.w3.org/2000/svg","aria-hidden":true,style:{left:t.x,top:t.y,transform:`rotate(${t.rotate}deg)`,filter:`blur(${t.blur}px)`},children:jsxRuntime.jsx("path",{d:t.path})},ue[l]))});var ot=["primary","info","success","warning","danger","amber","yellow","cyan","purple"],gt={purple:"diamond",yellow:"metal",cyan:"metal"},nt=["text","filled","line"],it=["primary","info","success","warning","danger","amber","cyan","purple"],ct=classVarianceAuthority.cva("lg-tag",{variants:{variant:{text:"lg-tag--text",tint:"",filled:"lg-tag--filled",line:"lg-tag--line",gradient:"lg-tag--gradient",glow:"lg-tag--glow"},size:{sm:"lg-tag--sm",md:"lg-tag--md",lg:"lg-tag--lg"}},defaultVariants:{variant:"tint",size:"md"}}),X=$e__default.default.forwardRef(({className:e,color:t="info",variant:l="tint",size:a="md",shape:g="pill",icon:s,background:u,closable:p=false,onClose:m,children:n,style:v,...h},N)=>{let w=chunkTDJG7ZB6_js.n("Tag"),b=ot.includes(t),d=b&&nt.includes(l)&&!it.includes(t)?"tint":l,k=b?`lg-tag--${t}`:"",i={...v};b||(d==="filled"?i["--_tag-bg"]=t:(i["--_tag-color"]=t,i["--_tag-bg"]=`color-mix(in srgb, ${t} 8%, transparent)`),d==="gradient"?(i["--_tag-gradient-from"]=`color-mix(in srgb, ${t} 12%, transparent)`,i["--_tag-gradient-to"]=`color-mix(in srgb, ${t} 3%, transparent)`):d==="glow"&&(i["--_tag-gradient-from"]=`color-mix(in srgb, ${t} 12%, transparent)`,i["--_tag-gradient-to"]=`color-mix(in srgb, ${t} 28%, transparent)`)),u&&(i.background=u);let I=d==="gradient"||d==="glow"?"":`lg-tag--${g}`,A=d==="glow"?gt[t]:void 0,M=H=>{H.stopPropagation(),m?.(H);};return jsxRuntime.jsxs("span",{ref:N,className:chunkDCDWEVW4_js.a(ct({variant:d,size:a}),I,k,p&&"lg-tag--closable",e),style:i,...h,children:[A&&jsxRuntime.jsx(me,{shape:A}),s&&jsxRuntime.jsx("span",{className:"lg-tag__icon",children:s}),jsxRuntime.jsx("span",{className:"lg-tag__content",children:n}),p&&jsxRuntime.jsx("span",{className:"lg-tag__close",onClick:M,role:"button",tabIndex:0,"aria-label":w.close,children:jsxRuntime.jsx(lingeeIcon.XLg,{})})]})});X.displayName="Tag";var ut={sm:30,md:34,lg:38},q=()=>({height:0,opacity:0}),ye=e=>{let t=Array.from(e.children);return t.length===0?0:t.reduce((l,a)=>{let g=parseFloat(getComputedStyle(a).marginTop)||0;return l+a.getBoundingClientRect().height+g},0)},be=e=>({height:ye(e),opacity:1}),mt={motionName:"lg-tree-motion",motionDeadline:300,onAppearStart:q,onAppearActive:be,onEnterStart:q,onEnterActive:be,onLeaveStart:e=>({height:ye(e),opacity:1}),onLeaveActive:q},bt="---",vt=e=>e!=null&&(e.tag!=null||e.action!=null||e.extra!=null),_t=e=>e!=null&&typeof e!="boolean",J=e=>{e.stopPropagation();},yt=e=>{e.preventDefault(),e.stopPropagation();},xt=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End","Enter"," "]),ht=e=>{xt.has(e.key)&&e.stopPropagation();},ve={onClick:J,onDoubleClick:J,onContextMenu:J,onKeyDown:ht,onDragStart:yt},wt=$e__default.default.forwardRef((e,t)=>{let{treeData:l,fieldNames:a,size:g="md",expandedKeys:s,defaultExpandedKeys:u,defaultExpandAll:p,autoExpandParent:m,expandAction:n="click",onExpand:v,selectable:h=true,multiple:N=false,selectedKeys:w,defaultSelectedKeys:b,onSelect:d,checkable:k=false,checkStrictly:i=false,checkedKeys:I,defaultCheckedKeys:A,onCheck:M,showIcon:H=false,icon:C,switcherIcon:S,indentGuide:xe="line",titleRender:V,loadData:he,loadedKeys:Q,draggable:T=false,allowDrop:j,onDrop:ee,height:we,itemHeight:ke,virtual:Te,disabled:G=false,loading:te=false,empty:Ee,onRightClick:Ne,animated:Ce=true,className:Se,style:Re}=e,Le=chunkTDJG7ZB6_js.n("Tree"),De=$e.useMemo(()=>{if(C)return typeof C!="function"?C:r=>C(r.data,{expanded:!!r.expanded,isLeaf:!!r.isLeaf})},[C]),ze=$e.useMemo(()=>S!==void 0?typeof S!="function"?S:r=>S({expanded:!!r.expanded,isLeaf:!!r.isLeaf}):r=>r.isLeaf?null:jsxRuntime.jsx(lingeeIcon.ChevronDown,{className:"lg-tree__switcher-icon",size:16,"aria-hidden":true}),[S]),Pe=$e.useMemo(()=>{if(T)return {icon:false,nodeDraggable:typeof T=="function"?r=>T(r):void 0}},[T]),Ie=$e.useCallback((r,o)=>{v?.(r,{node:o.node,expanded:o.expanded});},[v]),Ae=$e.useCallback((r,o)=>{d?.(r,{node:o.node,selected:o.selected,selectedNodes:o.selectedNodes});},[d]),Me=$e.useCallback((r,o)=>{M?.(r,{node:o.node,checked:o.checked,checkedNodes:o.checkedNodes,halfCheckedKeys:o.halfCheckedKeys});},[M]),He=$e.useCallback(r=>{ee?.({dragNode:r.dragNode,node:r.node,dropPosition:r.dropPosition,dropToGap:r.dropToGap});},[ee]),re=$e.useMemo(()=>{if(j)return r=>j({dragNode:r.dragNode,dropNode:r.dropNode,dropPosition:r.dropPosition})},[j]),Ge=$e.useCallback(r=>{let o;if(V)o=V(r);else {let $=r[a?.title||"title"];o=$===void 0?bt:$;}let{treeItem:le}=r;if(!vt(le))return o;let{tag:K,action:x,extra:Z}=le,ae=G||!!r.disabled,oe=typeof Z=="function"?Z({node:r,disabled:ae}):Z,ge=T?true:void 0;return jsxRuntime.jsxs("span",{className:"lg-tree__node-content",children:[jsxRuntime.jsx("span",{className:chunkDCDWEVW4_js.a("lg-tree__node-label",K&&"lg-tree__node-label--with-tag"),children:o}),K&&jsxRuntime.jsx("span",{className:"lg-tree__node-tag",children:jsxRuntime.jsx(X,{color:K.color??"primary",size:"sm",shape:"pill",children:K.content})}),_t(oe)&&jsxRuntime.jsx("span",{className:"lg-tree__node-extra",draggable:ge,...ve,children:oe}),x&&jsxRuntime.jsx("span",{className:"lg-tree__node-action",draggable:ge,...ve,children:jsxRuntime.jsx(chunkQEKT37W5_js.b,{variant:"text",size:"sm",shape:"circle",icon:x.icon,"aria-label":x.ariaLabel,tooltip:x.tooltip??x.ariaLabel,disabled:ae||!!x.disabled,onClick:$=>x.onClick?.(r,$)})})]})},[G,T,a?.title,V]),Ke=!l||l.length===0,E={};return s!==void 0&&(E.expandedKeys=s),w!==void 0&&(E.selectedKeys=w),I!==void 0&&(E.checkedKeys=I),Q!==void 0&&(E.loadedKeys=Q),re!==void 0&&(E.allowDrop=re),jsxRuntime.jsxs("div",{ref:t,className:chunkDCDWEVW4_js.a("lg-tree",`lg-tree--${g}`,`lg-tree--guide-${xe}`,k&&"lg-tree--checkable",G&&"lg-tree--disabled",te&&"lg-tree--loading",Se),style:Re,children:[te&&jsxRuntime.jsx("div",{className:"lg-tree__loading-mask",children:jsxRuntime.jsx(F,{size:"md"})}),Ke?jsxRuntime.jsx("div",{className:"lg-tree__empty",children:Ee??jsxRuntime.jsx(fe,{size:"sm",description:Le.empty})}):jsxRuntime.jsx(pt__default.default,{prefixCls:"lg-tree",treeData:l,fieldNames:a,defaultExpandedKeys:u,defaultExpandAll:p,autoExpandParent:m,expandAction:n,onExpand:Ie,selectable:h,multiple:N,defaultSelectedKeys:b,onSelect:Ae,checkable:k,checkStrictly:i,defaultCheckedKeys:A,onCheck:Me,showIcon:H,icon:De,switcherIcon:ze,titleRender:Ge,loadData:he,draggable:Pe,onDrop:He,height:we,itemHeight:ke??ut[g],virtual:Te,disabled:G,onRightClick:Ne,motion:Ce?mt:void 0,...E})]})});wt.displayName="Tree";
2
2
  exports.a=Y;exports.b=fe;exports.c=X;exports.d=F;exports.e=wt;
@@ -1 +1 @@
1
- import {n}from'./chunk-BNUZ57QH.mjs';import {b as b$1}from'./chunk-Z4J7SMTI.mjs';import {a}from'./chunk-DN2VKVCV.mjs';import Bl,{useState,useRef,useCallback,useEffect,useLayoutEffect}from'react';import {cva}from'class-variance-authority';import*as b from'@radix-ui/react-tabs';import {ChevronLeft,ChevronRight}from'lingee-icon';import {jsxs,jsx}from'react/jsx-runtime';var C={arrows:true,step:200,fade:true,scrollIntoView:true},Sl=cva("lg-tabs",{variants:{variant:{segmented:"lg-tabs--segmented",rounded:"lg-tabs--rounded",solid:"lg-tabs--solid",outline:"lg-tabs--outline",underline:"lg-tabs--underline"},size:{sm:"lg-tabs--sm",md:"lg-tabs--md"}},defaultVariants:{variant:"segmented",size:"md"}}),ol=typeof window<"u"?useLayoutEffect:useEffect;function Ll({items:o,activeKey:d,defaultActiveKey:tl,onChange:N,variant:n$1="segmented",size:sl="md",overflow:bl,scrollOptions:k,wrap:nl=false,scrollable:cl=false,glassy:il=false,transparent:dl=false,animated:B=true,destroyInactivePanel:M=false,className:ul,dir:vl,...fl},pl){let V=n("Tabs"),O=bl??(cl?"scroll":nl?"wrap":"none"),X=O==="wrap"&&(n$1==="segmented"||n$1==="rounded")?"none":O,a$1=X==="scroll",A=X==="wrap",P=k?.arrows??C.arrows,T=k?.step??C.step,H=k?.fade??C.fade,$=k?.scrollIntoView??C.scrollIntoView,u=d!==void 0,ml=o.find(l=>!l.disabled)?.key,W=u?void 0:tl??ml,[hl,wl]=useState(W),t=u?d:hl,y=useRef(o.findIndex(l=>l.key===t)),[j,x]=useState("right"),Fl=useCallback(l=>{let g=o.findIndex(F=>F.key===l),r=y.current;g>r?x("right"):g<r&&x("left"),y.current=g,u||wl(l),N?.(l);},[u,N,o]);useEffect(()=>{if(u&&d){let l=o.findIndex(r=>r.key===d),g=y.current;l!==g&&(l>g?x("right"):x("left"),y.current=l);}},[u,d,o]);let q=o.some(l=>l.children!=null),s=useRef(null),E=useRef(new Map),[_l,R]=useState({opacity:0}),h=useRef(false),U=useRef(0),kl=useCallback(l=>g=>{g?E.current.set(l,g):E.current.delete(l);},[]),w=useCallback(l=>{let g=s.current,r=t?E.current.get(t):void 0;if(!g||!r){R(al=>al.opacity===0?al:{opacity:0});return}let F=g.getBoundingClientRect(),f=(n$1==="underline"?r.querySelector(".lg-tabs__tab-label")??r:r).getBoundingClientRect(),rl=f.left-F.left+g.scrollLeft;if(!A){R({width:f.width,transform:`translateX(${rl}px)`,opacity:1,transition:l?"transform var(--_tabs-slider-duration) var(--lg-transition-timing), width var(--_tabs-slider-duration) var(--lg-transition-timing)":"none"});return}let S=n$1==="underline",Cl=S?r.getBoundingClientRect():f,L=S?Cl.bottom-F.top:f.top-F.top,Dl=l&&Math.abs(L-U.current)>1;U.current=L,R({width:f.width,...S?null:{height:f.height},top:0,bottom:"auto",transform:`translate(${rl}px, ${L}px)`,opacity:1,transition:Dl?"opacity var(--_tabs-slider-duration) var(--lg-transition-timing)":l?"transform var(--_tabs-slider-duration) var(--lg-transition-timing), width var(--_tabs-slider-duration) var(--lg-transition-timing)":"none"});},[t,n$1,A]),Y=useRef(w);Y.current=w;let G=useRef(0);ol(()=>{let l=h.current;w(l),l&&(G.current=Date.now()),h.current=true;},[w,t]);let J=o.map(l=>`${l.key}:${l.disabled?1:0}`).join("|");ol(()=>{let l=h.current;h.current=false,w(false),h.current=l;},[J]),useEffect(()=>{if(!s.current)return;let l=new ResizeObserver(()=>{Date.now()-G.current<350||Y.current(false);});return l.observe(s.current),()=>l.disconnect()},[]);let[yl,Q]=useState(false),[Z,xl]=useState(false),[K,El]=useState(false),v=useCallback(()=>{let l=s.current;!l||!a$1||(Q(l.scrollWidth>l.clientWidth+1),xl(l.scrollLeft>1),El(l.scrollLeft+l.clientWidth<l.scrollWidth-1));},[a$1]);useEffect(()=>{if(!a$1){Q(false);return}let l=s.current;if(l)return v(),l.addEventListener("scroll",v),()=>l.removeEventListener("scroll",v)},[a$1,v,J]),useEffect(()=>{let l=s.current;if(!a$1||!l)return;let g=new ResizeObserver(()=>v());return g.observe(l),()=>g.disconnect()},[a$1,v]),useEffect(()=>{if(!a$1||!$||!t)return;let l=E.current.get(t);typeof l?.scrollIntoView=="function"&&l.scrollIntoView({behavior:"smooth",inline:"nearest",block:"nearest"});},[a$1,$,t]);let ll=useCallback((l,g)=>{let r=s.current;r&&(r.scrollBy({left:l==="left"?-T:T,behavior:"smooth"}),g&&g.detail>0&&g.currentTarget.blur());},[T]),z=a$1&&yl&&P!==false,gl=jsxs(b.List,{className:a("lg-tabs__list",a$1&&"lg-tabs__list--scrollable"),ref:s,children:[jsx("span",{className:a(`lg-tabs__slider lg-tabs__slider--${n$1}`,il&&"lg-tabs__slider--glassy"),style:_l,"aria-hidden":true}),o.map(l=>jsxs(b.Trigger,{value:l.key,disabled:l.disabled,ref:kl(l.key),"aria-label":l.ariaLabel,className:a("lg-tabs__tab",l.disabled&&"lg-tabs__tab--disabled"),children:[l.icon&&jsx("span",{className:"lg-tabs__tab-icon",children:l.icon}),jsx("span",{className:"lg-tabs__tab-label",children:l.label}),l.suffix!=null&&jsx("span",{className:"lg-tabs__tab-suffix",children:l.suffix})]},l.key))]});return jsxs(b.Root,{ref:pl,className:a(Sl({variant:n$1,size:sl}),A&&"lg-tabs--wrap",a$1&&"lg-tabs--scrollable",dl&&"lg-tabs--transparent",q&&"lg-tabs--has-content",ul),value:d,defaultValue:W,onValueChange:Fl,dir:vl,...fl,children:[a$1?jsxs("div",{className:a("lg-tabs__scroll-wrapper",P==="hover"&&"lg-tabs__scroll-wrapper--hover-controls",!z&&"lg-tabs__scroll-wrapper--no-arrows"),children:[z&&jsx(b$1,{shape:"circle",size:"sm",variant:"text",icon:jsx(ChevronLeft,{}),tooltip:V.scrollLeft,disabled:!Z,onClick:l=>ll("left",l),className:"lg-tabs__scroll-arrow lg-tabs__scroll-arrow--left"}),H&&Z&&jsx("span",{className:"lg-tabs__fade lg-tabs__fade--left","aria-hidden":true}),gl,H&&K&&jsx("span",{className:"lg-tabs__fade lg-tabs__fade--right","aria-hidden":true}),z&&jsx(b$1,{shape:"circle",size:"sm",variant:"text",icon:jsx(ChevronRight,{}),tooltip:V.scrollRight,disabled:!K,onClick:l=>ll("right",l),className:"lg-tabs__scroll-arrow lg-tabs__scroll-arrow--right"})]}):gl,q&&jsx("div",{className:"lg-tabs__content-wrapper",children:o.map(l=>{if(l.children==null)return null;let g=l.key===t;return M&&!g?null:jsx(b.Content,{value:l.key,forceMount:M?void 0:true,className:a("lg-tabs__panel",B&&"lg-tabs__panel--animated",g&&"lg-tabs__panel--active",!g&&"lg-tabs__panel--inactive",B&&j==="right"&&"lg-tabs__panel--slide-right",B&&j==="left"&&"lg-tabs__panel--slide-left"),children:l.children},l.key)})})]})}var Gl=Bl.forwardRef(Ll);export{Sl as a,Gl as b};
1
+ import {n}from'./chunk-CATPKTPR.mjs';import {b as b$1}from'./chunk-Z4J7SMTI.mjs';import {a}from'./chunk-DN2VKVCV.mjs';import Bl,{useState,useRef,useCallback,useEffect,useLayoutEffect}from'react';import {cva}from'class-variance-authority';import*as b from'@radix-ui/react-tabs';import {ChevronLeft,ChevronRight}from'lingee-icon';import {jsxs,jsx}from'react/jsx-runtime';var C={arrows:true,step:200,fade:true,scrollIntoView:true},Sl=cva("lg-tabs",{variants:{variant:{segmented:"lg-tabs--segmented",rounded:"lg-tabs--rounded",solid:"lg-tabs--solid",outline:"lg-tabs--outline",underline:"lg-tabs--underline"},size:{sm:"lg-tabs--sm",md:"lg-tabs--md"}},defaultVariants:{variant:"segmented",size:"md"}}),ol=typeof window<"u"?useLayoutEffect:useEffect;function Ll({items:o,activeKey:d,defaultActiveKey:tl,onChange:N,variant:n$1="segmented",size:cl="md",overflow:bl,scrollOptions:_,wrap:nl=false,scrollable:sl=false,glassy:il=false,transparent:dl=false,animated:B=true,destroyInactivePanel:M=false,className:ul,dir:vl,...fl},pl){let V=n("Tabs"),O=bl??(sl?"scroll":nl?"wrap":"none"),X=O==="wrap"&&(n$1==="segmented"||n$1==="rounded")?"none":O,a$1=X==="scroll",A=X==="wrap",P=_?.arrows??C.arrows,T=_?.step??C.step,H=_?.fade??C.fade,$=_?.scrollIntoView??C.scrollIntoView,u=d!==void 0,ml=o.find(l=>!l.disabled)?.key,W=u?void 0:tl??ml,[hl,wl]=useState(W),t=u?d:hl,F=useRef(o.findIndex(l=>l.key===t)),[j,x]=useState("right"),kl=useCallback(l=>{let g=o.findIndex(k=>k.key===l),r=F.current;g>r?x("right"):g<r&&x("left"),F.current=g,u||wl(l),N?.(l);},[u,N,o]);useEffect(()=>{if(u&&d){let l=o.findIndex(r=>r.key===d),g=F.current;l!==g&&(l>g?x("right"):x("left"),F.current=l);}},[u,d,o]);let q=o.some(l=>l.children!=null),c=useRef(null),E=useRef(new Map),[yl,R]=useState({opacity:0}),h=useRef(false),U=useRef(0),_l=useCallback(l=>g=>{g?E.current.set(l,g):E.current.delete(l);},[]),w=useCallback(l=>{let g=c.current,r=t?E.current.get(t):void 0;if(!g||!r){R(al=>al.opacity===0?al:{opacity:0});return}let k=g.getBoundingClientRect(),f=(n$1==="underline"?r.querySelector(".lg-tabs__tab-label")??r:r).getBoundingClientRect(),rl=f.left-k.left+g.scrollLeft;if(!A){R({width:f.width,transform:`translateX(${rl}px)`,opacity:1,transition:l?"transform var(--_tabs-slider-duration) var(--lg-transition-timing), width var(--_tabs-slider-duration) var(--lg-transition-timing)":"none"});return}let S=n$1==="underline",Cl=S?r.getBoundingClientRect():f,L=S?Cl.bottom-k.top:f.top-k.top,Dl=l&&Math.abs(L-U.current)>1;U.current=L,R({width:f.width,...S?null:{height:f.height},top:0,bottom:"auto",transform:`translate(${rl}px, ${L}px)`,opacity:1,transition:Dl?"opacity var(--_tabs-slider-duration) var(--lg-transition-timing)":l?"transform var(--_tabs-slider-duration) var(--lg-transition-timing), width var(--_tabs-slider-duration) var(--lg-transition-timing)":"none"});},[t,n$1,A]),Y=useRef(w);Y.current=w;let G=useRef(0);ol(()=>{let l=h.current;w(l),l&&(G.current=Date.now()),h.current=true;},[w,t]);let J=o.map(l=>`${l.key}:${l.disabled?1:0}`).join("|");ol(()=>{let l=h.current;h.current=false,w(false),h.current=l;},[J]),useEffect(()=>{if(!c.current)return;let l=new ResizeObserver(()=>{Date.now()-G.current<350||Y.current(false);});return l.observe(c.current),()=>l.disconnect()},[]);let[Fl,Q]=useState(false),[Z,xl]=useState(false),[K,El]=useState(false),v=useCallback(()=>{let l=c.current;!l||!a$1||(Q(l.scrollWidth>l.clientWidth+1),xl(l.scrollLeft>1),El(l.scrollLeft+l.clientWidth<l.scrollWidth-1));},[a$1]);useEffect(()=>{if(!a$1){Q(false);return}let l=c.current;if(l)return v(),l.addEventListener("scroll",v),()=>l.removeEventListener("scroll",v)},[a$1,v,J]),useEffect(()=>{let l=c.current;if(!a$1||!l)return;let g=new ResizeObserver(()=>v());return g.observe(l),()=>g.disconnect()},[a$1,v]),useEffect(()=>{if(!a$1||!$||!t)return;let l=E.current.get(t);typeof l?.scrollIntoView=="function"&&l.scrollIntoView({behavior:"smooth",inline:"nearest",block:"nearest"});},[a$1,$,t]);let ll=useCallback((l,g)=>{let r=c.current;r&&(r.scrollBy({left:l==="left"?-T:T,behavior:"smooth"}),g&&g.detail>0&&g.currentTarget.blur());},[T]),z=a$1&&Fl&&P!==false,gl=jsxs(b.List,{className:a("lg-tabs__list",a$1&&"lg-tabs__list--scrollable"),ref:c,children:[jsx("span",{className:a(`lg-tabs__slider lg-tabs__slider--${n$1}`,il&&"lg-tabs__slider--glassy"),style:yl,"aria-hidden":true}),o.map(l=>jsxs(b.Trigger,{value:l.key,disabled:l.disabled,ref:_l(l.key),"aria-label":l.ariaLabel,className:a("lg-tabs__tab",l.disabled&&"lg-tabs__tab--disabled"),children:[l.icon&&jsx("span",{className:"lg-tabs__tab-icon",children:l.icon}),jsx("span",{className:"lg-tabs__tab-label",children:l.label}),l.suffix!=null&&jsx("span",{className:"lg-tabs__tab-suffix",children:l.suffix})]},l.key))]});return jsxs(b.Root,{ref:pl,className:a(Sl({variant:n$1,size:cl}),A&&"lg-tabs--wrap",a$1&&"lg-tabs--scrollable",dl&&"lg-tabs--transparent",q&&"lg-tabs--has-content",ul),value:d,defaultValue:W,onValueChange:kl,dir:vl,...fl,children:[a$1?jsxs("div",{className:a("lg-tabs__scroll-wrapper",P==="hover"&&"lg-tabs__scroll-wrapper--hover-controls",!z&&"lg-tabs__scroll-wrapper--no-arrows"),children:[z&&jsx(b$1,{shape:"circle",size:"sm",variant:"text",icon:jsx(ChevronLeft,{}),tooltip:V.scrollLeft,disabled:!Z,onClick:l=>ll("left",l),className:"lg-tabs__scroll-arrow lg-tabs__scroll-arrow--left"}),H&&Z&&jsx("span",{className:"lg-tabs__fade lg-tabs__fade--left","aria-hidden":true}),gl,H&&K&&jsx("span",{className:"lg-tabs__fade lg-tabs__fade--right","aria-hidden":true}),z&&jsx(b$1,{shape:"circle",size:"sm",variant:"text",icon:jsx(ChevronRight,{}),tooltip:V.scrollRight,disabled:!K,onClick:l=>ll("right",l),className:"lg-tabs__scroll-arrow lg-tabs__scroll-arrow--right"})]}):gl,q&&jsx("div",{className:"lg-tabs__content-wrapper",children:o.map(l=>{if(l.children==null)return null;let g=l.key===t;return M&&!g?null:jsx(b.Content,{value:l.key,forceMount:M?void 0:true,className:a("lg-tabs__panel",B&&"lg-tabs__panel--animated",g&&"lg-tabs__panel--active",!g&&"lg-tabs__panel--inactive",B&&j==="right"&&"lg-tabs__panel--slide-right",B&&j==="left"&&"lg-tabs__panel--slide-left"),children:l.children},l.key)})})]})}var Gl=Bl.forwardRef(Ll);export{Sl as a,Gl as b};
@@ -1,2 +1,2 @@
1
- import {n}from'./chunk-BNUZ57QH.mjs';import {b}from'./chunk-Z4J7SMTI.mjs';import {a}from'./chunk-DN2VKVCV.mjs';import $e,{useEffect,useMemo,useCallback}from'react';import pt from'@rc-component/tree';import {DocumentLibrary,XLg,ChevronDown,Inbox,ExclamationCircle,LoaderCircle}from'lingee-icon';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {cva}from'class-variance-authority';var F=$e.forwardRef(({className:e,size:t="md",spinning:l=true,children:a$1,tip:g,...s},u)=>{let p=n("Spin"),m=a$1!=null,n$1=jsx("div",{className:"lg-spin__indicator"});return m?jsxs("div",{ref:u,className:a("lg-spin","lg-spin--nested",e),...s,children:[jsx("div",{className:a("lg-spin__content",l&&"lg-spin__content--loading"),children:a$1}),l&&jsxs("div",{className:"lg-spin__overlay",role:"status","aria-label":g||p.loading,children:[jsx("div",{className:a("lg-spin",`lg-spin--${t}`),children:n$1}),g&&jsx("span",{className:"lg-spin__tip",children:g})]})]}):jsx("div",{ref:u,className:a("lg-spin",`lg-spin--${t}`,!l&&"lg-spin--paused",e),role:"status","aria-label":g||p.loading,...s,children:n$1})});F.displayName="Spin";var de="lg-empty-gradient",ce=`url(#${de})`,se=0,O=null;function je(){if(se++>0||typeof document>"u")return;let e=document.createElementNS("http://www.w3.org/2000/svg","svg");e.setAttribute("width","0"),e.setAttribute("height","0"),e.setAttribute("aria-hidden","true"),e.style.position="absolute",e.style.overflow="hidden",e.innerHTML=`<defs><linearGradient id="${de}" x1="12" y1="2" x2="12" y2="22" gradientUnits="userSpaceOnUse"><stop style="stop-color: var(--__lg-empty-gradient-from)"/><stop offset="1" style="stop-color: var(--__lg-empty-gradient-to)"/></linearGradient></defs>`,document.body.appendChild(e),O=e;}function Ze(){--se>0||O&&(O.remove(),O=null);}var U={lg:56,md:24,sm:16};function Fe(e){return typeof e=="function"||typeof e=="object"&&e!==null&&"render"in e&&typeof e.render=="function"}var D=$e.forwardRef(({size:e="md",icon:t,description:l,children:a$1,className:g,style:s,...u},p)=>{useEffect(()=>(je(),Ze),[]);let m=U[e],n;return t?Fe(t)?n=jsx(t,{size:m,fill:ce}):n=t:n=jsx(DocumentLibrary,{size:m,fill:ce}),jsxs("div",{ref:p,className:a("lg-empty",`lg-empty--${e}`,g),style:s,...u,children:[jsx("span",{className:"lg-empty__icon",children:n}),jsx("span",{className:"lg-empty__text",children:l}),a$1&&jsx("div",{className:"lg-empty__extra",children:a$1})]})});D.displayName="Empty";function Je(e,t){switch(e){case "loading":return jsx(LoaderCircle,{size:t,spin:true});case "error":return jsx(ExclamationCircle,{size:t});default:return jsx(Inbox,{size:t})}}var Y=$e.forwardRef(({status:e,description:t,icon:l,size:a$1="sm",variant:g="block",spacing:s="normal",align:u="center",onRetry:p,className:m,style:n$1,...v},h)=>{let N=n("Empty"),w=l===null?null:l??Je(e,U[a$1]),b=e==="error"&&typeof p=="function",d=a("lg-empty-card",`lg-empty-card--${a$1}`,`lg-empty-card--${g}`,`lg-empty-card--${e}`,`lg-empty-card--spacing-${s}`,u==="start"&&"lg-empty-card--align-start",b&&"lg-empty-card--retryable",m),k=b?jsxs(Fragment,{children:[t,jsx("span",{className:"lg-empty-card__retry",children:N.retry})]}):t,i=jsx(D,{size:a$1,icon:w??jsx(Fragment,{}),description:k,className:"lg-empty-card__body"});return b?jsx("button",{ref:h,type:"button",className:d,style:n$1,onClick:p,...v,children:i}):jsx("div",{ref:h,className:d,style:n$1,role:e==="empty"?void 0:"status","aria-live":e==="empty"?void 0:"polite",...v,children:i})});Y.displayName="Empty.Card";var fe=Object.assign(D,{Card:Y});var et={diamond:[{w:76.7412,h:29.5746,x:-11.303,y:-8.104,rotate:3.61,blur:4,path:"M15.1953 8L68.7412 13.2684L55.6642 21.5746H8L15.1953 8Z"},{w:49.895,h:21.0268,x:18.294,y:-7.912,rotate:-15.73,blur:3,path:"M10.489 6L43.895 9.50337L35.7366 15.0268H6L10.489 6Z"}],metal:[{w:76.7412,h:28.579,x:-15.3845,y:-7.1025,rotate:3.61,blur:4,path:"M15.1953 8L68.7412 12.882L55.6642 20.579H8L15.1953 8Z"},{w:43.4758,h:20.4645,x:14.807,y:-5.685,rotate:-20.81,blur:3,path:"M9.72859 6L37.4758 9.28514L30.6993 14.4645H6L9.72859 6Z"}]},ue=["primary","secondary"],me=({shape:e})=>jsx(Fragment,{children:et[e].map((t,l)=>jsx("svg",{className:`lg-tag__glow lg-tag__glow--${ue[l]}`,width:t.w,height:t.h,viewBox:`0 0 ${t.w} ${t.h}`,xmlns:"http://www.w3.org/2000/svg","aria-hidden":true,style:{left:t.x,top:t.y,transform:`rotate(${t.rotate}deg)`,filter:`blur(${t.blur}px)`},children:jsx("path",{d:t.path})},ue[l]))});var ot=["primary","info","success","warning","danger","amber","yellow","cyan","purple"],gt={purple:"diamond",yellow:"metal",cyan:"metal"},nt=["text","filled","line"],it=["primary","info","success","warning","danger","amber","cyan","purple"],ct=cva("lg-tag",{variants:{variant:{text:"lg-tag--text",tint:"",filled:"lg-tag--filled",line:"lg-tag--line",gradient:"lg-tag--gradient",glow:"lg-tag--glow"},size:{sm:"lg-tag--sm",md:"lg-tag--md",lg:"lg-tag--lg"}},defaultVariants:{variant:"tint",size:"md"}}),X=$e.forwardRef(({className:e,color:t="info",variant:l="tint",size:a$1="md",shape:g="pill",icon:s,background:u,closable:p=false,onClose:m,children:n$1,style:v,...h},N)=>{let w=n("Tag"),b=ot.includes(t),d=b&&nt.includes(l)&&!it.includes(t)?"tint":l,k=b?`lg-tag--${t}`:"",i={...v};b||(d==="filled"?i["--_tag-bg"]=t:(i["--_tag-color"]=t,i["--_tag-bg"]=`color-mix(in srgb, ${t} 8%, transparent)`),d==="gradient"?(i["--_tag-gradient-from"]=`color-mix(in srgb, ${t} 12%, transparent)`,i["--_tag-gradient-to"]=`color-mix(in srgb, ${t} 3%, transparent)`):d==="glow"&&(i["--_tag-gradient-from"]=`color-mix(in srgb, ${t} 12%, transparent)`,i["--_tag-gradient-to"]=`color-mix(in srgb, ${t} 28%, transparent)`)),u&&(i.background=u);let I=d==="gradient"||d==="glow"?"":`lg-tag--${g}`,A=d==="glow"?gt[t]:void 0,M=H=>{H.stopPropagation(),m?.(H);};return jsxs("span",{ref:N,className:a(ct({variant:d,size:a$1}),I,k,p&&"lg-tag--closable",e),style:i,...h,children:[A&&jsx(me,{shape:A}),s&&jsx("span",{className:"lg-tag__icon",children:s}),jsx("span",{className:"lg-tag__content",children:n$1}),p&&jsx("span",{className:"lg-tag__close",onClick:M,role:"button",tabIndex:0,"aria-label":w.close,children:jsx(XLg,{})})]})});X.displayName="Tag";var ut={sm:30,md:34,lg:38},q=()=>({height:0,opacity:0}),ye=e=>{let t=Array.from(e.children);return t.length===0?0:t.reduce((l,a)=>{let g=parseFloat(getComputedStyle(a).marginTop)||0;return l+a.getBoundingClientRect().height+g},0)},be=e=>({height:ye(e),opacity:1}),mt={motionName:"lg-tree-motion",motionDeadline:300,onAppearStart:q,onAppearActive:be,onEnterStart:q,onEnterActive:be,onLeaveStart:e=>({height:ye(e),opacity:1}),onLeaveActive:q},bt="---",vt=e=>e!=null&&(e.tag!=null||e.action!=null||e.extra!=null),_t=e=>e!=null&&typeof e!="boolean",J=e=>{e.stopPropagation();},yt=e=>{e.preventDefault(),e.stopPropagation();},xt=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End","Enter"," "]),ht=e=>{xt.has(e.key)&&e.stopPropagation();},ve={onClick:J,onDoubleClick:J,onContextMenu:J,onKeyDown:ht,onDragStart:yt},wt=$e.forwardRef((e,t)=>{let{treeData:l,fieldNames:a$1,size:g="md",expandedKeys:s,defaultExpandedKeys:u,defaultExpandAll:p,autoExpandParent:m,expandAction:n$1="click",onExpand:v,selectable:h=true,multiple:N=false,selectedKeys:w,defaultSelectedKeys:b$1,onSelect:d,checkable:k=false,checkStrictly:i=false,checkedKeys:I,defaultCheckedKeys:A,onCheck:M,showIcon:H=false,icon:C,switcherIcon:S,indentGuide:xe="line",titleRender:V,loadData:he,loadedKeys:Q,draggable:T=false,allowDrop:j,onDrop:ee,height:we,itemHeight:ke,virtual:Te,disabled:G=false,loading:te=false,empty:Ee,onRightClick:Ne,animated:Ce=true,className:Se,style:Re}=e,Le=n("Tree"),De=useMemo(()=>{if(C)return typeof C!="function"?C:r=>C(r.data,{expanded:!!r.expanded,isLeaf:!!r.isLeaf})},[C]),ze=useMemo(()=>S!==void 0?typeof S!="function"?S:r=>S({expanded:!!r.expanded,isLeaf:!!r.isLeaf}):r=>r.isLeaf?null:jsx(ChevronDown,{className:"lg-tree__switcher-icon",size:16,"aria-hidden":true}),[S]),Pe=useMemo(()=>{if(T)return {icon:false,nodeDraggable:typeof T=="function"?r=>T(r):void 0}},[T]),Ie=useCallback((r,o)=>{v?.(r,{node:o.node,expanded:o.expanded});},[v]),Ae=useCallback((r,o)=>{d?.(r,{node:o.node,selected:o.selected,selectedNodes:o.selectedNodes});},[d]),Me=useCallback((r,o)=>{M?.(r,{node:o.node,checked:o.checked,checkedNodes:o.checkedNodes,halfCheckedKeys:o.halfCheckedKeys});},[M]),He=useCallback(r=>{ee?.({dragNode:r.dragNode,node:r.node,dropPosition:r.dropPosition,dropToGap:r.dropToGap});},[ee]),re=useMemo(()=>{if(j)return r=>j({dragNode:r.dragNode,dropNode:r.dropNode,dropPosition:r.dropPosition})},[j]),Ge=useCallback(r=>{let o;if(V)o=V(r);else {let $=r[a$1?.title||"title"];o=$===void 0?bt:$;}let{treeItem:le}=r;if(!vt(le))return o;let{tag:K,action:x,extra:Z}=le,ae=G||!!r.disabled,oe=typeof Z=="function"?Z({node:r,disabled:ae}):Z,ge=T?true:void 0;return jsxs("span",{className:"lg-tree__node-content",children:[jsx("span",{className:a("lg-tree__node-label",K&&"lg-tree__node-label--with-tag"),children:o}),K&&jsx("span",{className:"lg-tree__node-tag",children:jsx(X,{color:K.color??"primary",size:"sm",shape:"pill",children:K.content})}),_t(oe)&&jsx("span",{className:"lg-tree__node-extra",draggable:ge,...ve,children:oe}),x&&jsx("span",{className:"lg-tree__node-action",draggable:ge,...ve,children:jsx(b,{variant:"text",size:"sm",shape:"circle",icon:x.icon,"aria-label":x.ariaLabel,tooltip:x.tooltip??x.ariaLabel,disabled:ae||!!x.disabled,onClick:$=>x.onClick?.(r,$)})})]})},[G,T,a$1?.title,V]),Ke=!l||l.length===0,E={};return s!==void 0&&(E.expandedKeys=s),w!==void 0&&(E.selectedKeys=w),I!==void 0&&(E.checkedKeys=I),Q!==void 0&&(E.loadedKeys=Q),re!==void 0&&(E.allowDrop=re),jsxs("div",{ref:t,className:a("lg-tree",`lg-tree--${g}`,`lg-tree--guide-${xe}`,k&&"lg-tree--checkable",G&&"lg-tree--disabled",te&&"lg-tree--loading",Se),style:Re,children:[te&&jsx("div",{className:"lg-tree__loading-mask",children:jsx(F,{size:"md"})}),Ke?jsx("div",{className:"lg-tree__empty",children:Ee??jsx(fe,{size:"sm",description:Le.empty})}):jsx(pt,{prefixCls:"lg-tree",treeData:l,fieldNames:a$1,defaultExpandedKeys:u,defaultExpandAll:p,autoExpandParent:m,expandAction:n$1,onExpand:Ie,selectable:h,multiple:N,defaultSelectedKeys:b$1,onSelect:Ae,checkable:k,checkStrictly:i,defaultCheckedKeys:A,onCheck:Me,showIcon:H,icon:De,switcherIcon:ze,titleRender:Ge,loadData:he,draggable:Pe,onDrop:He,height:we,itemHeight:ke??ut[g],virtual:Te,disabled:G,onRightClick:Ne,motion:Ce?mt:void 0,...E})]})});wt.displayName="Tree";
1
+ import {n}from'./chunk-CATPKTPR.mjs';import {b}from'./chunk-Z4J7SMTI.mjs';import {a}from'./chunk-DN2VKVCV.mjs';import $e,{useEffect,useMemo,useCallback}from'react';import pt from'@rc-component/tree';import {DocumentLibrary,XLg,ChevronDown,Inbox,ExclamationCircle,LoaderCircle}from'lingee-icon';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {cva}from'class-variance-authority';var F=$e.forwardRef(({className:e,size:t="md",spinning:l=true,children:a$1,tip:g,...s},u)=>{let p=n("Spin"),m=a$1!=null,n$1=jsx("div",{className:"lg-spin__indicator"});return m?jsxs("div",{ref:u,className:a("lg-spin","lg-spin--nested",e),...s,children:[jsx("div",{className:a("lg-spin__content",l&&"lg-spin__content--loading"),children:a$1}),l&&jsxs("div",{className:"lg-spin__overlay",role:"status","aria-label":g||p.loading,children:[jsx("div",{className:a("lg-spin",`lg-spin--${t}`),children:n$1}),g&&jsx("span",{className:"lg-spin__tip",children:g})]})]}):jsx("div",{ref:u,className:a("lg-spin",`lg-spin--${t}`,!l&&"lg-spin--paused",e),role:"status","aria-label":g||p.loading,...s,children:n$1})});F.displayName="Spin";var de="lg-empty-gradient",ce=`url(#${de})`,se=0,O=null;function je(){if(se++>0||typeof document>"u")return;let e=document.createElementNS("http://www.w3.org/2000/svg","svg");e.setAttribute("width","0"),e.setAttribute("height","0"),e.setAttribute("aria-hidden","true"),e.style.position="absolute",e.style.overflow="hidden",e.innerHTML=`<defs><linearGradient id="${de}" x1="12" y1="2" x2="12" y2="22" gradientUnits="userSpaceOnUse"><stop style="stop-color: var(--__lg-empty-gradient-from)"/><stop offset="1" style="stop-color: var(--__lg-empty-gradient-to)"/></linearGradient></defs>`,document.body.appendChild(e),O=e;}function Ze(){--se>0||O&&(O.remove(),O=null);}var U={lg:56,md:24,sm:16};function Fe(e){return typeof e=="function"||typeof e=="object"&&e!==null&&"render"in e&&typeof e.render=="function"}var D=$e.forwardRef(({size:e="md",icon:t,description:l,children:a$1,className:g,style:s,...u},p)=>{useEffect(()=>(je(),Ze),[]);let m=U[e],n;return t?Fe(t)?n=jsx(t,{size:m,fill:ce}):n=t:n=jsx(DocumentLibrary,{size:m,fill:ce}),jsxs("div",{ref:p,className:a("lg-empty",`lg-empty--${e}`,g),style:s,...u,children:[jsx("span",{className:"lg-empty__icon",children:n}),jsx("span",{className:"lg-empty__text",children:l}),a$1&&jsx("div",{className:"lg-empty__extra",children:a$1})]})});D.displayName="Empty";function Je(e,t){switch(e){case "loading":return jsx(LoaderCircle,{size:t,spin:true});case "error":return jsx(ExclamationCircle,{size:t});default:return jsx(Inbox,{size:t})}}var Y=$e.forwardRef(({status:e,description:t,icon:l,size:a$1="sm",variant:g="block",spacing:s="normal",align:u="center",onRetry:p,className:m,style:n$1,...v},h)=>{let N=n("Empty"),w=l===null?null:l??Je(e,U[a$1]),b=e==="error"&&typeof p=="function",d=a("lg-empty-card",`lg-empty-card--${a$1}`,`lg-empty-card--${g}`,`lg-empty-card--${e}`,`lg-empty-card--spacing-${s}`,u==="start"&&"lg-empty-card--align-start",b&&"lg-empty-card--retryable",m),k=b?jsxs(Fragment,{children:[t,jsx("span",{className:"lg-empty-card__retry",children:N.retry})]}):t,i=jsx(D,{size:a$1,icon:w??jsx(Fragment,{}),description:k,className:"lg-empty-card__body"});return b?jsx("button",{ref:h,type:"button",className:d,style:n$1,onClick:p,...v,children:i}):jsx("div",{ref:h,className:d,style:n$1,role:e==="empty"?void 0:"status","aria-live":e==="empty"?void 0:"polite",...v,children:i})});Y.displayName="Empty.Card";var fe=Object.assign(D,{Card:Y});var et={diamond:[{w:76.7412,h:29.5746,x:-11.303,y:-8.104,rotate:3.61,blur:4,path:"M15.1953 8L68.7412 13.2684L55.6642 21.5746H8L15.1953 8Z"},{w:49.895,h:21.0268,x:18.294,y:-7.912,rotate:-15.73,blur:3,path:"M10.489 6L43.895 9.50337L35.7366 15.0268H6L10.489 6Z"}],metal:[{w:76.7412,h:28.579,x:-15.3845,y:-7.1025,rotate:3.61,blur:4,path:"M15.1953 8L68.7412 12.882L55.6642 20.579H8L15.1953 8Z"},{w:43.4758,h:20.4645,x:14.807,y:-5.685,rotate:-20.81,blur:3,path:"M9.72859 6L37.4758 9.28514L30.6993 14.4645H6L9.72859 6Z"}]},ue=["primary","secondary"],me=({shape:e})=>jsx(Fragment,{children:et[e].map((t,l)=>jsx("svg",{className:`lg-tag__glow lg-tag__glow--${ue[l]}`,width:t.w,height:t.h,viewBox:`0 0 ${t.w} ${t.h}`,xmlns:"http://www.w3.org/2000/svg","aria-hidden":true,style:{left:t.x,top:t.y,transform:`rotate(${t.rotate}deg)`,filter:`blur(${t.blur}px)`},children:jsx("path",{d:t.path})},ue[l]))});var ot=["primary","info","success","warning","danger","amber","yellow","cyan","purple"],gt={purple:"diamond",yellow:"metal",cyan:"metal"},nt=["text","filled","line"],it=["primary","info","success","warning","danger","amber","cyan","purple"],ct=cva("lg-tag",{variants:{variant:{text:"lg-tag--text",tint:"",filled:"lg-tag--filled",line:"lg-tag--line",gradient:"lg-tag--gradient",glow:"lg-tag--glow"},size:{sm:"lg-tag--sm",md:"lg-tag--md",lg:"lg-tag--lg"}},defaultVariants:{variant:"tint",size:"md"}}),X=$e.forwardRef(({className:e,color:t="info",variant:l="tint",size:a$1="md",shape:g="pill",icon:s,background:u,closable:p=false,onClose:m,children:n$1,style:v,...h},N)=>{let w=n("Tag"),b=ot.includes(t),d=b&&nt.includes(l)&&!it.includes(t)?"tint":l,k=b?`lg-tag--${t}`:"",i={...v};b||(d==="filled"?i["--_tag-bg"]=t:(i["--_tag-color"]=t,i["--_tag-bg"]=`color-mix(in srgb, ${t} 8%, transparent)`),d==="gradient"?(i["--_tag-gradient-from"]=`color-mix(in srgb, ${t} 12%, transparent)`,i["--_tag-gradient-to"]=`color-mix(in srgb, ${t} 3%, transparent)`):d==="glow"&&(i["--_tag-gradient-from"]=`color-mix(in srgb, ${t} 12%, transparent)`,i["--_tag-gradient-to"]=`color-mix(in srgb, ${t} 28%, transparent)`)),u&&(i.background=u);let I=d==="gradient"||d==="glow"?"":`lg-tag--${g}`,A=d==="glow"?gt[t]:void 0,M=H=>{H.stopPropagation(),m?.(H);};return jsxs("span",{ref:N,className:a(ct({variant:d,size:a$1}),I,k,p&&"lg-tag--closable",e),style:i,...h,children:[A&&jsx(me,{shape:A}),s&&jsx("span",{className:"lg-tag__icon",children:s}),jsx("span",{className:"lg-tag__content",children:n$1}),p&&jsx("span",{className:"lg-tag__close",onClick:M,role:"button",tabIndex:0,"aria-label":w.close,children:jsx(XLg,{})})]})});X.displayName="Tag";var ut={sm:30,md:34,lg:38},q=()=>({height:0,opacity:0}),ye=e=>{let t=Array.from(e.children);return t.length===0?0:t.reduce((l,a)=>{let g=parseFloat(getComputedStyle(a).marginTop)||0;return l+a.getBoundingClientRect().height+g},0)},be=e=>({height:ye(e),opacity:1}),mt={motionName:"lg-tree-motion",motionDeadline:300,onAppearStart:q,onAppearActive:be,onEnterStart:q,onEnterActive:be,onLeaveStart:e=>({height:ye(e),opacity:1}),onLeaveActive:q},bt="---",vt=e=>e!=null&&(e.tag!=null||e.action!=null||e.extra!=null),_t=e=>e!=null&&typeof e!="boolean",J=e=>{e.stopPropagation();},yt=e=>{e.preventDefault(),e.stopPropagation();},xt=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End","Enter"," "]),ht=e=>{xt.has(e.key)&&e.stopPropagation();},ve={onClick:J,onDoubleClick:J,onContextMenu:J,onKeyDown:ht,onDragStart:yt},wt=$e.forwardRef((e,t)=>{let{treeData:l,fieldNames:a$1,size:g="md",expandedKeys:s,defaultExpandedKeys:u,defaultExpandAll:p,autoExpandParent:m,expandAction:n$1="click",onExpand:v,selectable:h=true,multiple:N=false,selectedKeys:w,defaultSelectedKeys:b$1,onSelect:d,checkable:k=false,checkStrictly:i=false,checkedKeys:I,defaultCheckedKeys:A,onCheck:M,showIcon:H=false,icon:C,switcherIcon:S,indentGuide:xe="line",titleRender:V,loadData:he,loadedKeys:Q,draggable:T=false,allowDrop:j,onDrop:ee,height:we,itemHeight:ke,virtual:Te,disabled:G=false,loading:te=false,empty:Ee,onRightClick:Ne,animated:Ce=true,className:Se,style:Re}=e,Le=n("Tree"),De=useMemo(()=>{if(C)return typeof C!="function"?C:r=>C(r.data,{expanded:!!r.expanded,isLeaf:!!r.isLeaf})},[C]),ze=useMemo(()=>S!==void 0?typeof S!="function"?S:r=>S({expanded:!!r.expanded,isLeaf:!!r.isLeaf}):r=>r.isLeaf?null:jsx(ChevronDown,{className:"lg-tree__switcher-icon",size:16,"aria-hidden":true}),[S]),Pe=useMemo(()=>{if(T)return {icon:false,nodeDraggable:typeof T=="function"?r=>T(r):void 0}},[T]),Ie=useCallback((r,o)=>{v?.(r,{node:o.node,expanded:o.expanded});},[v]),Ae=useCallback((r,o)=>{d?.(r,{node:o.node,selected:o.selected,selectedNodes:o.selectedNodes});},[d]),Me=useCallback((r,o)=>{M?.(r,{node:o.node,checked:o.checked,checkedNodes:o.checkedNodes,halfCheckedKeys:o.halfCheckedKeys});},[M]),He=useCallback(r=>{ee?.({dragNode:r.dragNode,node:r.node,dropPosition:r.dropPosition,dropToGap:r.dropToGap});},[ee]),re=useMemo(()=>{if(j)return r=>j({dragNode:r.dragNode,dropNode:r.dropNode,dropPosition:r.dropPosition})},[j]),Ge=useCallback(r=>{let o;if(V)o=V(r);else {let $=r[a$1?.title||"title"];o=$===void 0?bt:$;}let{treeItem:le}=r;if(!vt(le))return o;let{tag:K,action:x,extra:Z}=le,ae=G||!!r.disabled,oe=typeof Z=="function"?Z({node:r,disabled:ae}):Z,ge=T?true:void 0;return jsxs("span",{className:"lg-tree__node-content",children:[jsx("span",{className:a("lg-tree__node-label",K&&"lg-tree__node-label--with-tag"),children:o}),K&&jsx("span",{className:"lg-tree__node-tag",children:jsx(X,{color:K.color??"primary",size:"sm",shape:"pill",children:K.content})}),_t(oe)&&jsx("span",{className:"lg-tree__node-extra",draggable:ge,...ve,children:oe}),x&&jsx("span",{className:"lg-tree__node-action",draggable:ge,...ve,children:jsx(b,{variant:"text",size:"sm",shape:"circle",icon:x.icon,"aria-label":x.ariaLabel,tooltip:x.tooltip??x.ariaLabel,disabled:ae||!!x.disabled,onClick:$=>x.onClick?.(r,$)})})]})},[G,T,a$1?.title,V]),Ke=!l||l.length===0,E={};return s!==void 0&&(E.expandedKeys=s),w!==void 0&&(E.selectedKeys=w),I!==void 0&&(E.checkedKeys=I),Q!==void 0&&(E.loadedKeys=Q),re!==void 0&&(E.allowDrop=re),jsxs("div",{ref:t,className:a("lg-tree",`lg-tree--${g}`,`lg-tree--guide-${xe}`,k&&"lg-tree--checkable",G&&"lg-tree--disabled",te&&"lg-tree--loading",Se),style:Re,children:[te&&jsx("div",{className:"lg-tree__loading-mask",children:jsx(F,{size:"md"})}),Ke?jsx("div",{className:"lg-tree__empty",children:Ee??jsx(fe,{size:"sm",description:Le.empty})}):jsx(pt,{prefixCls:"lg-tree",treeData:l,fieldNames:a$1,defaultExpandedKeys:u,defaultExpandAll:p,autoExpandParent:m,expandAction:n$1,onExpand:Ie,selectable:h,multiple:N,defaultSelectedKeys:b$1,onSelect:Ae,checkable:k,checkStrictly:i,defaultCheckedKeys:A,onCheck:Me,showIcon:H,icon:De,switcherIcon:ze,titleRender:Ge,loadData:he,draggable:Pe,onDrop:He,height:we,itemHeight:ke??ut[g],virtual:Te,disabled:G,onRightClick:Ne,motion:Ce?mt:void 0,...E})]})});wt.displayName="Tree";
2
2
  export{Y as a,fe as b,X as c,F as d,wt as e};
@@ -1 +1 @@
1
- import {n}from'./chunk-BNUZ57QH.mjs';import {a}from'./chunk-DN2VKVCV.mjs';import J,{useState,useRef,useCallback,useEffect}from'react';import {XCircleFill}from'lingee-icon';import {jsxs,jsx}from'react/jsx-runtime';var Y=J.forwardRef(({className:p,style:o,size:a$1="md",shape:T="default",prefix:d,suffix:g,allowClear:C=false,error:L=false,disabled:r=false,collapsed:t=false,autoFocusOnExpand:s=true,value:c,defaultValue:H,onChange:_,onFocus:f,onBlur:v,onPressEnter:b,onKeyDown:h,onClick:m,...S},N)=>{let x=n("Input"),[D,y]=useState(false),[F,w]=useState(H?.toString()??""),e=useRef(null),P=Z(N,e),u=c!==void 0,k=u?c?.toString()??"":F,V=useCallback(n=>{u||w(n.target.value),_?.(n);},[u,_]),j=useCallback(()=>{if(r)return;u||w("");let n=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value")?.set;if(e.current&&n){n.call(e.current,"");let G=new Event("input",{bubbles:true});e.current.dispatchEvent(G);}e.current?.focus();},[r,u]),B=useCallback(n=>{y(true),f?.(n);},[f]),K=useCallback(n=>{y(false),v?.(n);},[v]),O=useCallback(n=>{n.key==="Enter"&&b?.(n),h?.(n);},[b,h]),W=C&&k.length>0&&!r&&!t,X=!!g&&!(t&&d),I=useRef(t);useEffect(()=>{let n=I.current;I.current=t,n!==t&&(t?e.current===document.activeElement&&e.current?.blur():!r&&s&&e.current?.focus());},[t,r,s]);let $=useCallback(n=>{t||e.current?.focus(),m?.(n);},[t,m]),q=a("lg-input",`lg-input--${a$1}`,T==="round"&&"lg-input--round",D&&!t&&"lg-input--focused",L&&"lg-input--error",r&&"lg-input--disabled",t&&"lg-input--collapsed",p),A=t?{...o,width:void 0,minWidth:void 0,maxWidth:void 0}:o;return jsxs("div",{className:q,style:A,onClick:$,role:t?"button":void 0,tabIndex:t&&!r?0:void 0,"aria-expanded":t?false:void 0,"aria-label":t?x.expand:void 0,children:[d&&jsx("span",{className:"lg-input__prefix",children:d}),jsx("input",{ref:P,className:"lg-input__inner",disabled:r,value:k,onChange:V,onFocus:B,onBlur:K,onKeyDown:O,tabIndex:t?-1:void 0,"aria-hidden":t||void 0,...S}),W&&jsx("span",{className:"lg-input__clear",onMouseDown:n=>n.preventDefault(),onClick:j,role:"button","aria-label":x.clear,children:jsx(XCircleFill,{})}),X&&jsx("span",{className:"lg-input__suffix",children:g})]})});Y.displayName="Input";function Z(...p){return useCallback(o=>{p.forEach(a=>{a&&(typeof a=="function"?a(o):a.current=o);});},p)}export{Y as a};
1
+ import {n}from'./chunk-CATPKTPR.mjs';import {a}from'./chunk-DN2VKVCV.mjs';import J,{useState,useRef,useCallback,useEffect}from'react';import {XCircleFill}from'lingee-icon';import {jsxs,jsx}from'react/jsx-runtime';var Y=J.forwardRef(({className:p,style:o,size:a$1="md",shape:T="default",prefix:d,suffix:g,allowClear:C=false,error:L=false,disabled:r=false,collapsed:t=false,autoFocusOnExpand:s=true,value:c,defaultValue:H,onChange:_,onFocus:f,onBlur:v,onPressEnter:b,onKeyDown:h,onClick:m,...S},N)=>{let x=n("Input"),[D,y]=useState(false),[F,w]=useState(H?.toString()??""),e=useRef(null),P=Z(N,e),u=c!==void 0,k=u?c?.toString()??"":F,V=useCallback(n=>{u||w(n.target.value),_?.(n);},[u,_]),j=useCallback(()=>{if(r)return;u||w("");let n=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value")?.set;if(e.current&&n){n.call(e.current,"");let G=new Event("input",{bubbles:true});e.current.dispatchEvent(G);}e.current?.focus();},[r,u]),B=useCallback(n=>{y(true),f?.(n);},[f]),K=useCallback(n=>{y(false),v?.(n);},[v]),O=useCallback(n=>{n.key==="Enter"&&b?.(n),h?.(n);},[b,h]),W=C&&k.length>0&&!r&&!t,X=!!g&&!(t&&d),I=useRef(t);useEffect(()=>{let n=I.current;I.current=t,n!==t&&(t?e.current===document.activeElement&&e.current?.blur():!r&&s&&e.current?.focus());},[t,r,s]);let $=useCallback(n=>{t||e.current?.focus(),m?.(n);},[t,m]),q=a("lg-input",`lg-input--${a$1}`,T==="round"&&"lg-input--round",D&&!t&&"lg-input--focused",L&&"lg-input--error",r&&"lg-input--disabled",t&&"lg-input--collapsed",p),A=t?{...o,width:void 0,minWidth:void 0,maxWidth:void 0}:o;return jsxs("div",{className:q,style:A,onClick:$,role:t?"button":void 0,tabIndex:t&&!r?0:void 0,"aria-expanded":t?false:void 0,"aria-label":t?x.expand:void 0,children:[d&&jsx("span",{className:"lg-input__prefix",children:d}),jsx("input",{ref:P,className:"lg-input__inner",disabled:r,value:k,onChange:V,onFocus:B,onBlur:K,onKeyDown:O,tabIndex:t?-1:void 0,"aria-hidden":t||void 0,...S}),W&&jsx("span",{className:"lg-input__clear",onMouseDown:n=>n.preventDefault(),onClick:j,role:"button","aria-label":x.clear,children:jsx(XCircleFill,{})}),X&&jsx("span",{className:"lg-input__suffix",children:g})]})});Y.displayName="Input";function Z(...p){return useCallback(o=>{p.forEach(a=>{a&&(typeof a=="function"?a(o):a.current=o);});},p)}export{Y as a};
@@ -47,7 +47,7 @@ interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "typ
47
47
 
48
48
  declare const buttonVariants: (props?: ({
49
49
  variant?: "text" | "default" | "filled" | "link" | "primary" | "link-plain" | null | undefined;
50
- size?: "sm" | "md" | "std" | "lg" | null | undefined;
50
+ size?: "sm" | "md" | "lg" | "std" | null | undefined;
51
51
  shape?: "round" | "default" | "circle" | null | undefined;
52
52
  } & class_variance_authority_types.ClassProp) | undefined) => string;
53
53
  /**
@@ -47,7 +47,7 @@ interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "typ
47
47
 
48
48
  declare const buttonVariants: (props?: ({
49
49
  variant?: "text" | "default" | "filled" | "link" | "primary" | "link-plain" | null | undefined;
50
- size?: "sm" | "md" | "std" | "lg" | null | undefined;
50
+ size?: "sm" | "md" | "lg" | "std" | null | undefined;
51
51
  shape?: "round" | "default" | "circle" | null | undefined;
52
52
  } & class_variance_authority_types.ClassProp) | undefined) => string;
53
53
  /**