monobill-mintui 0.6.737 → 0.6.739

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 (177) hide show
  1. package/bin/component-dependencies.json +2 -1
  2. package/dist/components/alert/browser.js +4 -4
  3. package/dist/components/alert/index.cjs +1 -1
  4. package/dist/components/alert/index.js +4 -4
  5. package/dist/components/back-button/browser.js +1 -1
  6. package/dist/components/back-button/index.cjs +1 -1
  7. package/dist/components/back-button/index.js +1 -1
  8. package/dist/components/bottom-navigation/browser.js +2 -2
  9. package/dist/components/bottom-navigation/index.cjs +1 -1
  10. package/dist/components/bottom-navigation/index.js +2 -2
  11. package/dist/components/button/browser.js +1 -1
  12. package/dist/components/button/index.cjs +1 -1
  13. package/dist/components/button/index.js +1 -1
  14. package/dist/components/checkbox/browser.js +1 -1
  15. package/dist/components/checkbox/index.cjs +1 -1
  16. package/dist/components/checkbox/index.js +1 -1
  17. package/dist/components/chip/browser.js +1 -1
  18. package/dist/components/chip/index.cjs +1 -1
  19. package/dist/components/chip/index.js +1 -1
  20. package/dist/components/chunks/ScrollFade-58GqgRLY.js +1 -0
  21. package/dist/components/chunks/ScrollFade-kpfpO4Zb.js +160 -0
  22. package/dist/components/chunks/{back-button-C_aLMNZE.js → back-button-CQ3ZKGa1.js} +1 -1
  23. package/dist/components/chunks/{back-button-CMZR-p_D.js → back-button-DpPfWpAh.js} +2 -2
  24. package/dist/components/chunks/{button-THsh4Svz.js → button-CIuVIyLf.js} +2 -2
  25. package/dist/components/chunks/{button-CELyLLtj.js → button-CgymemwA.js} +1 -1
  26. package/dist/components/chunks/{caret-down-DUfiCBEs.js → caret-down-CikQdiAu.js} +1 -1
  27. package/dist/components/chunks/caret-down-DZinO2Vg.js +1 -0
  28. package/dist/components/chunks/caret-right-CMZIcNYV.js +1 -0
  29. package/dist/components/chunks/{caret-right-CppgjbLX.js → caret-right-ZvpF7jIK.js} +1 -1
  30. package/dist/components/chunks/{checkbox-d5UlscqI.js → checkbox-98ctQydC.js} +1 -1
  31. package/dist/components/chunks/{checkbox-CZViKLNo.js → checkbox-B8VzPrhn.js} +2 -2
  32. package/dist/components/chunks/{chip-G6SRCgLq.js → chip-Cqm_NPF5.js} +3 -3
  33. package/dist/components/chunks/{chip-DJ_kZURn.js → chip-dVw8BZP7.js} +1 -1
  34. package/dist/components/chunks/{close-ChHICicN.js → close-DtRLefjU.js} +1 -1
  35. package/dist/components/chunks/close-DuS1TdUB.js +1 -0
  36. package/dist/components/chunks/{confirm-action-BSHfjDfA.js → confirm-action-8Yx0K5j1.js} +1 -1
  37. package/dist/components/chunks/{confirm-action-CRZMTjpd.js → confirm-action-C0XX_TyJ.js} +2 -2
  38. package/dist/components/chunks/{date-picker-CTtYAkmM.js → date-picker-BJ_82oRR.js} +1 -1
  39. package/dist/components/chunks/{date-picker-CUf5eJR3.js → date-picker-BuJJ8gvT.js} +5 -5
  40. package/dist/components/chunks/icon-Cmx9FTmb.js +1 -0
  41. package/dist/components/chunks/{icon-1cs-hcBy.js → icon-CuRTWM4k.js} +67 -57
  42. package/dist/components/chunks/icon-pgeP1zxb.js +51 -0
  43. package/dist/components/chunks/icon-rdeLRs-R.js +1 -0
  44. package/dist/components/chunks/{input-Bu4xPosP.js → input-BpcFd35m.js} +3 -3
  45. package/dist/components/chunks/{input-Zqw53jts.js → input-DJaqPjMg.js} +1 -1
  46. package/dist/components/chunks/{modal-CL5EStu0.js → modal-BJtuPK1b.js} +1 -1
  47. package/dist/components/chunks/{modal-ss_OTDJJ.js → modal-BzRle8yT.js} +2 -2
  48. package/dist/components/chunks/{popover-DD7uyRXy.js → popover-BcN2LEbO.js} +15 -3
  49. package/dist/components/chunks/popover-N3cKN8iW.js +1 -0
  50. package/dist/components/chunks/search-DA6dk5kF.js +1 -0
  51. package/dist/components/chunks/{search-DKHcIR2F.js → search-Dw9cb1wC.js} +1 -1
  52. package/dist/components/chunks/{select-CX9oOwl5.js → select-Ctps8gPL.js} +1 -1
  53. package/dist/components/chunks/{select-DOMW7Plx.js → select-DPERiupq.js} +3 -3
  54. package/dist/components/chunks/sortable-Bj0VTUqS.js +1 -0
  55. package/dist/components/chunks/{sortable-CQtdBuGw.js → sortable-DWfdFpgA.js} +59 -22
  56. package/dist/components/chunks/{table-HnSpIfny.js → table-C4xUMQw6.js} +1 -1
  57. package/dist/components/chunks/{table-IU2Vmjwk.js → table-k97RfsAA.js} +1 -1
  58. package/dist/components/chunks/{time-picker-C7pJvGSM.js → time-picker-Bl8KsaJj.js} +3 -3
  59. package/dist/components/chunks/{time-picker-BaoT0NtA.js → time-picker-D74vZTpL.js} +1 -1
  60. package/dist/components/chunks/{warning-gkij2FhS.js → warning-B1-z7ww9.js} +1 -1
  61. package/dist/components/chunks/{warning-Cf8ePVsQ.js → warning-CfJwI6nV.js} +1 -1
  62. package/dist/components/confirm-action/browser.js +1 -1
  63. package/dist/components/confirm-action/index.cjs +1 -1
  64. package/dist/components/confirm-action/index.js +1 -1
  65. package/dist/components/date-picker/browser.js +1 -1
  66. package/dist/components/date-picker/index.cjs +1 -1
  67. package/dist/components/date-picker/index.js +1 -1
  68. package/dist/components/datetime-picker/browser.js +3 -3
  69. package/dist/components/datetime-picker/index.cjs +1 -1
  70. package/dist/components/datetime-picker/index.js +3 -3
  71. package/dist/components/dropzone/browser.js +4 -4
  72. package/dist/components/dropzone/index.cjs +1 -1
  73. package/dist/components/dropzone/index.js +4 -4
  74. package/dist/components/editor/Editor.d.ts +29 -2
  75. package/dist/components/editor/Editor.d.ts.map +1 -1
  76. package/dist/components/editor/browser.js +583 -232
  77. package/dist/components/editor/index.cjs +14 -8
  78. package/dist/components/editor/index.d.ts +2 -0
  79. package/dist/components/editor/index.d.ts.map +1 -1
  80. package/dist/components/editor/index.js +583 -232
  81. package/dist/components/form/Form.d.ts +5 -1
  82. package/dist/components/form/Form.d.ts.map +1 -1
  83. package/dist/components/form/browser.js +52 -40
  84. package/dist/components/form/index.cjs +1 -1
  85. package/dist/components/form/index.js +52 -40
  86. package/dist/components/icon/browser.js +1 -1
  87. package/dist/components/icon/icons/index.d.ts +1 -0
  88. package/dist/components/icon/icons/index.d.ts.map +1 -1
  89. package/dist/components/icon/icons/play.d.ts +3 -0
  90. package/dist/components/icon/icons/play.d.ts.map +1 -0
  91. package/dist/components/icon/index.cjs +1 -1
  92. package/dist/components/icon/index.js +1 -1
  93. package/dist/components/input/browser.js +1 -1
  94. package/dist/components/input/index.cjs +1 -1
  95. package/dist/components/input/index.js +1 -1
  96. package/dist/components/link/browser.js +1 -1
  97. package/dist/components/link/index.cjs +1 -1
  98. package/dist/components/link/index.js +1 -1
  99. package/dist/components/modal/browser.js +1 -1
  100. package/dist/components/modal/index.cjs +1 -1
  101. package/dist/components/modal/index.js +1 -1
  102. package/dist/components/navigation/browser.js +4 -4
  103. package/dist/components/navigation/index.cjs +1 -1
  104. package/dist/components/navigation/index.js +4 -4
  105. package/dist/components/off-canvas/browser.js +2 -2
  106. package/dist/components/off-canvas/index.cjs +1 -1
  107. package/dist/components/off-canvas/index.js +2 -2
  108. package/dist/components/page/browser.js +4 -4
  109. package/dist/components/page/index.cjs +1 -1
  110. package/dist/components/page/index.js +4 -4
  111. package/dist/components/popover/Popover.d.ts +4 -0
  112. package/dist/components/popover/Popover.d.ts.map +1 -1
  113. package/dist/components/popover/browser.js +1 -1
  114. package/dist/components/popover/index.cjs +1 -1
  115. package/dist/components/popover/index.js +1 -1
  116. package/dist/components/resource-table/browser.js +11 -11
  117. package/dist/components/resource-table/index.cjs +1 -1
  118. package/dist/components/resource-table/index.js +11 -11
  119. package/dist/components/scroll-fade/ScrollFade.d.ts.map +1 -1
  120. package/dist/components/scroll-fade/browser.js +1 -1
  121. package/dist/components/scroll-fade/index.cjs +1 -1
  122. package/dist/components/scroll-fade/index.js +1 -1
  123. package/dist/components/search/browser.js +7 -7
  124. package/dist/components/search/index.cjs +1 -1
  125. package/dist/components/search/index.js +7 -7
  126. package/dist/components/select/browser.js +1 -1
  127. package/dist/components/select/index.cjs +1 -1
  128. package/dist/components/select/index.js +1 -1
  129. package/dist/components/side-navigation/browser.js +6 -6
  130. package/dist/components/side-navigation/index.cjs +1 -1
  131. package/dist/components/side-navigation/index.js +6 -6
  132. package/dist/components/sortable/Sortable.d.ts +8 -0
  133. package/dist/components/sortable/Sortable.d.ts.map +1 -1
  134. package/dist/components/sortable/browser.js +1 -1
  135. package/dist/components/sortable/index.cjs +1 -1
  136. package/dist/components/sortable/index.js +1 -1
  137. package/dist/components/switch/browser.js +2 -2
  138. package/dist/components/switch/index.cjs +1 -1
  139. package/dist/components/switch/index.js +2 -2
  140. package/dist/components/table/browser.js +1 -1
  141. package/dist/components/table/index.cjs +1 -1
  142. package/dist/components/table/index.js +1 -1
  143. package/dist/components/tabs/browser.js +1 -1
  144. package/dist/components/tabs/index.cjs +1 -1
  145. package/dist/components/tabs/index.js +1 -1
  146. package/dist/components/tags/Tags.d.ts.map +1 -1
  147. package/dist/components/tags/browser.js +8 -17
  148. package/dist/components/tags/index.cjs +1 -1
  149. package/dist/components/tags/index.js +8 -17
  150. package/dist/components/time-picker/browser.js +1 -1
  151. package/dist/components/time-picker/index.cjs +1 -1
  152. package/dist/components/time-picker/index.js +1 -1
  153. package/dist/components/tree/browser.js +5 -5
  154. package/dist/components/tree/index.cjs +1 -1
  155. package/dist/components/tree/index.js +5 -5
  156. package/dist/editor.css +1 -1
  157. package/dist/icons/play.svg +3 -0
  158. package/dist/index.cjs +19 -13
  159. package/dist/index.css +3 -3
  160. package/dist/index.js +1080 -595
  161. package/dist/navigation-search.json +8 -1
  162. package/dist/scroll-fade.css +1 -1
  163. package/dist/tags.css +1 -1
  164. package/package.json +1 -1
  165. package/dist/components/chunks/ScrollFade-DOnPtfC2.js +0 -85
  166. package/dist/components/chunks/ScrollFade-FBvsnQ1i.js +0 -1
  167. package/dist/components/chunks/caret-down-BiAVkpX7.js +0 -1
  168. package/dist/components/chunks/caret-right-8n-rhz51.js +0 -1
  169. package/dist/components/chunks/close-CuYimzX0.js +0 -1
  170. package/dist/components/chunks/icon-Bv1J3LwC.js +0 -51
  171. package/dist/components/chunks/icon-C-6HOPtI.js +0 -1
  172. package/dist/components/chunks/icon-aNwWb0hA.js +0 -1
  173. package/dist/components/chunks/popover-2Cnva3AN.js +0 -1
  174. package/dist/components/chunks/search-BXku4V9r.js +0 -1
  175. package/dist/components/chunks/sortable-Brecvk9d.js +0 -1
  176. /package/dist/components/chunks/{link-B_fNmwOk.js → link-B4Hdsb2b.js} +0 -0
  177. /package/dist/components/chunks/{link-BxTQfAW9.js → link-rv2WDJw2.js} +0 -0
package/dist/index.js CHANGED
@@ -927,258 +927,268 @@ var Ke = {
927
927
  };
928
928
  s(Ke);
929
929
  //#endregion
930
- //#region src/components/icon/icons/print.js
930
+ //#region src/components/icon/icons/play.js
931
931
  var qe = {
932
+ name: "play",
933
+ viewBox: "0 0 24 24",
934
+ path: "M8 5.5v13l10-6.5L8 5.5z",
935
+ strokeLinecap: "round",
936
+ strokeLinejoin: "round"
937
+ };
938
+ s(qe);
939
+ //#endregion
940
+ //#region src/components/icon/icons/print.js
941
+ var Je = {
932
942
  name: "print",
933
943
  viewBox: "0 0 24 24",
934
944
  path: "M17 17h2a2 2 0 002-2v-4a2 2 0 00-2-2H5a2 2 0 00-2 2v4a2 2 0 002 2h2m2 4h6a2 2 0 002-2v-4a2 2 0 00-2-2H9a2 2 0 00-2 2v4a2 2 0 002 2zm8-12V5a2 2 0 00-2-2H9a2 2 0 00-2 2v4h10z",
935
945
  strokeLinecap: "round",
936
946
  strokeLinejoin: "round"
937
947
  };
938
- s(qe);
948
+ s(Je);
939
949
  //#endregion
940
950
  //#region src/components/icon/icons/qr-code.js
941
- var Je = {
951
+ var Ye = {
942
952
  name: "qr-code",
943
953
  viewBox: "0 0 24 24",
944
954
  path: "M4 3H9C10.1 3 11 3.9 11 5V10C11 11.1 10.1 12 9 12H4C2.9 12 2 11.1 2 10V5C2 3.9 2.9 3 4 3ZM4.75 4.5C4.34 4.5 4 4.84 4 5.25V9.75C4 10.16 4.34 10.5 4.75 10.5H8.25C8.66 10.5 9 10.16 9 9.75V5.25C9 4.84 8.66 4.5 8.25 4.5H4.75ZM15 3H20C21.1 3 22 3.9 22 5V10C22 11.1 21.1 12 20 12H15C13.9 12 13 11.1 13 10V5C13 3.9 13.9 3 15 3ZM15.75 4.5C15.34 4.5 15 4.84 15 5.25V9.75C15 10.16 15.34 10.5 15.75 10.5H19.25C19.66 10.5 20 10.16 20 9.75V5.25C20 4.84 19.66 4.5 19.25 4.5H15.75ZM4 13H9C10.1 13 11 13.9 11 15V20C11 21.1 10.1 22 9 22H4C2.9 22 2 21.1 2 20V15C2 13.9 2.9 13 4 13ZM4.75 14.5C4.34 14.5 4 14.84 4 15.25V19.75C4 20.16 4.34 20.5 4.75 20.5H8.25C8.66 20.5 9 20.16 9 19.75V15.25C9 14.84 8.66 14.5 8.25 14.5H4.75ZM13 13H16V16H19V19H16V22H13V19H16V16H13V13Z",
945
955
  strokeLinecap: "round",
946
956
  strokeLinejoin: "round"
947
957
  };
948
- s(Je);
958
+ s(Ye);
949
959
  //#endregion
950
960
  //#region src/components/icon/icons/refresh.js
951
- var Ye = {
961
+ var Xe = {
952
962
  name: "refresh",
953
963
  viewBox: "0 0 24 24",
954
964
  path: "M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15",
955
965
  strokeLinecap: "round",
956
966
  strokeLinejoin: "round"
957
967
  };
958
- s(Ye);
968
+ s(Xe);
959
969
  //#endregion
960
970
  //#region src/components/icon/icons/remove.js
961
- var Xe = {
971
+ var Ze = {
962
972
  name: "remove",
963
973
  viewBox: "0 0 24 24",
964
974
  path: "M20 12H4",
965
975
  strokeLinecap: "round",
966
976
  strokeLinejoin: "round"
967
977
  };
968
- s(Xe);
978
+ s(Ze);
969
979
  //#endregion
970
980
  //#region src/components/icon/icons/save.js
971
- var Ze = {
981
+ var Qe = {
972
982
  name: "save",
973
983
  viewBox: "0 0 24 24",
974
984
  path: "M8 7H5a2 2 0 00-2 2v9a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-3m-1 4l-3 3m0 0l-3-3m3 3V4",
975
985
  strokeLinecap: "round",
976
986
  strokeLinejoin: "round"
977
987
  };
978
- s(Ze);
988
+ s(Qe);
979
989
  //#endregion
980
990
  //#region src/components/icon/icons/save-alt.js
981
- var Qe = {
991
+ var $e = {
982
992
  name: "save-alt",
983
993
  viewBox: "0 0 24 24",
984
994
  path: "M5 3h12l4 4v14H3V3h2zm2 0v6h10V3M7 21v-8h10v8",
985
995
  strokeLinecap: "round",
986
996
  strokeLinejoin: "round"
987
997
  };
988
- s(Qe);
998
+ s($e);
989
999
  //#endregion
990
1000
  //#region src/components/icon/icons/search.js
991
- var $e = {
1001
+ var et = {
992
1002
  name: "search",
993
1003
  viewBox: "0 0 24 24",
994
1004
  path: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z",
995
1005
  strokeLinecap: "round",
996
1006
  strokeLinejoin: "round"
997
1007
  };
998
- s($e);
1008
+ s(et);
999
1009
  //#endregion
1000
1010
  //#region src/components/icon/icons/settings.js
1001
- var et = {
1011
+ var tt = {
1002
1012
  name: "settings",
1003
1013
  viewBox: "0 0 24 24",
1004
1014
  path: "M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M15 12a3 3 0 11-6 0 3 3 0 016 0z",
1005
1015
  strokeLinecap: "round",
1006
1016
  strokeLinejoin: "round"
1007
1017
  };
1008
- s(et);
1018
+ s(tt);
1009
1019
  //#endregion
1010
1020
  //#region src/components/icon/icons/share.js
1011
- var tt = {
1021
+ var nt = {
1012
1022
  name: "share",
1013
1023
  viewBox: "0 0 24 24",
1014
1024
  path: "M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.368 2.684 3 3 0 00-5.368-2.684z",
1015
1025
  strokeLinecap: "round",
1016
1026
  strokeLinejoin: "round"
1017
1027
  };
1018
- s(tt);
1028
+ s(nt);
1019
1029
  //#endregion
1020
1030
  //#region src/components/icon/icons/sort.js
1021
- var nt = {
1031
+ var rt = {
1022
1032
  name: "sort",
1023
1033
  viewBox: "0 0 24 24",
1024
1034
  path: "M3 6h18M7 12h10m-7 6h4",
1025
1035
  strokeLinecap: "round",
1026
1036
  strokeLinejoin: "round"
1027
1037
  };
1028
- s(nt);
1038
+ s(rt);
1029
1039
  //#endregion
1030
1040
  //#region src/components/icon/icons/sort-arrows.js
1031
- var rt = {
1041
+ var it = {
1032
1042
  name: "sort-arrows",
1033
1043
  viewBox: "0 0 24 24",
1034
1044
  path: "M1 5l5-4m0 0l5 4m-5-4v22 M13 19l5 4m0 0l5-4m-5 4V1",
1035
1045
  strokeLinecap: "round",
1036
1046
  strokeLinejoin: "round"
1037
1047
  };
1038
- s(rt);
1048
+ s(it);
1039
1049
  //#endregion
1040
1050
  //#region src/components/icon/icons/star.js
1041
- var it = {
1051
+ var at = {
1042
1052
  name: "star",
1043
1053
  viewBox: "0 0 24 24",
1044
1054
  path: "M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z",
1045
1055
  strokeLinecap: "round",
1046
1056
  strokeLinejoin: "round"
1047
1057
  };
1048
- s(it);
1058
+ s(at);
1049
1059
  //#endregion
1050
1060
  //#region src/components/icon/icons/success.js
1051
- var at = {
1061
+ var ot = {
1052
1062
  name: "success",
1053
1063
  viewBox: "0 0 24 24",
1054
1064
  path: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",
1055
1065
  strokeLinecap: "round",
1056
1066
  strokeLinejoin: "round"
1057
1067
  };
1058
- s(at);
1068
+ s(ot);
1059
1069
  //#endregion
1060
1070
  //#region src/components/icon/icons/sun.js
1061
- var ot = {
1071
+ var st = {
1062
1072
  name: "sun",
1063
1073
  viewBox: "0 0 24 24",
1064
1074
  path: "M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z",
1065
1075
  strokeLinecap: "round",
1066
1076
  strokeLinejoin: "round"
1067
1077
  };
1068
- s(ot);
1078
+ s(st);
1069
1079
  //#endregion
1070
1080
  //#region src/components/icon/icons/table.js
1071
- var st = {
1081
+ var ct = {
1072
1082
  name: "table",
1073
1083
  viewBox: "0 0 24 24",
1074
1084
  path: "M3 10h18M3 14h18m-9-4v8m-7 0h14a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z",
1075
1085
  strokeLinecap: "round",
1076
1086
  strokeLinejoin: "round"
1077
1087
  };
1078
- s(st);
1088
+ s(ct);
1079
1089
  //#endregion
1080
1090
  //#region src/components/icon/icons/tablet.js
1081
- var ct = {
1091
+ var lt = {
1082
1092
  name: "tablet",
1083
1093
  viewBox: "0 0 24 24",
1084
1094
  path: "M6 3h12a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Zm5 15h2",
1085
1095
  strokeLinecap: "round",
1086
1096
  strokeLinejoin: "round"
1087
1097
  };
1088
- s(ct);
1098
+ s(lt);
1089
1099
  //#endregion
1090
1100
  //#region src/components/icon/icons/tag.js
1091
- var lt = {
1101
+ var ut = {
1092
1102
  name: "tag",
1093
1103
  viewBox: "0 0 24 24",
1094
1104
  path: "M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z",
1095
1105
  strokeLinecap: "round",
1096
1106
  strokeLinejoin: "round"
1097
1107
  };
1098
- s(lt);
1108
+ s(ut);
1099
1109
  //#endregion
1100
1110
  //#region src/components/icon/icons/trash.js
1101
- var ut = {
1111
+ var dt = {
1102
1112
  name: "trash",
1103
1113
  viewBox: "0 0 24 24",
1104
1114
  path: "M3 6h18m-2 0v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6m3 0V4a2 2 0 012-2h4a2 2 0 012 2v2",
1105
1115
  strokeLinecap: "round",
1106
1116
  strokeLinejoin: "round"
1107
1117
  };
1108
- s(ut);
1118
+ s(dt);
1109
1119
  //#endregion
1110
1120
  //#region src/components/icon/icons/unlock.js
1111
- var dt = {
1121
+ var ft = {
1112
1122
  name: "unlock",
1113
1123
  viewBox: "0 0 24 24",
1114
1124
  path: "M8 11V7a4 4 0 118 0m-4 8v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2z",
1115
1125
  strokeLinecap: "round",
1116
1126
  strokeLinejoin: "round"
1117
1127
  };
1118
- s(dt);
1128
+ s(ft);
1119
1129
  //#endregion
1120
1130
  //#region src/components/icon/icons/upload.js
1121
- var ft = {
1131
+ var pt = {
1122
1132
  name: "upload",
1123
1133
  viewBox: "0 0 24 24",
1124
1134
  path: "M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12",
1125
1135
  strokeLinecap: "round",
1126
1136
  strokeLinejoin: "round"
1127
1137
  };
1128
- s(ft);
1138
+ s(pt);
1129
1139
  //#endregion
1130
1140
  //#region src/components/icon/icons/user.js
1131
- var pt = {
1141
+ var mt = {
1132
1142
  name: "user",
1133
1143
  viewBox: "0 0 24 24",
1134
1144
  path: "M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z",
1135
1145
  strokeLinecap: "round",
1136
1146
  strokeLinejoin: "round"
1137
1147
  };
1138
- s(pt);
1148
+ s(mt);
1139
1149
  //#endregion
1140
1150
  //#region src/components/icon/icons/user-add.js
1141
- var mt = {
1151
+ var ht = {
1142
1152
  name: "user-add",
1143
1153
  viewBox: "0 0 24 24",
1144
1154
  path: "M18 9v3m0 0v3m0-3h3m-3 0h-3m-2-5a4 4 0 11-8 0 4 4 0 018 0zM3 20a6 6 0 0112 0v1H3v-1z",
1145
1155
  strokeLinecap: "round",
1146
1156
  strokeLinejoin: "round"
1147
1157
  };
1148
- s(mt);
1158
+ s(ht);
1149
1159
  //#endregion
1150
1160
  //#region src/components/icon/icons/users.js
1151
- var ht = {
1161
+ var gt = {
1152
1162
  name: "users",
1153
1163
  viewBox: "0 0 24 24",
1154
1164
  path: "M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z",
1155
1165
  strokeLinecap: "round",
1156
1166
  strokeLinejoin: "round"
1157
1167
  };
1158
- s(ht);
1168
+ s(gt);
1159
1169
  //#endregion
1160
1170
  //#region src/components/icon/icons/video.js
1161
- var gt = {
1171
+ var _t = {
1162
1172
  name: "video",
1163
1173
  viewBox: "0 0 24 24",
1164
1174
  path: "M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z",
1165
1175
  strokeLinecap: "round",
1166
1176
  strokeLinejoin: "round"
1167
1177
  };
1168
- s(gt);
1178
+ s(_t);
1169
1179
  //#endregion
1170
1180
  //#region src/components/icon/icons/warning.js
1171
- var _t = {
1181
+ var vt = {
1172
1182
  name: "warning",
1173
1183
  viewBox: "0 0 24 24",
1174
1184
  path: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z",
1175
1185
  strokeLinecap: "round",
1176
1186
  strokeLinejoin: "round"
1177
1187
  };
1178
- s(_t);
1188
+ s(vt);
1179
1189
  //#endregion
1180
1190
  //#region src/components/icon/icons/shopping-cart.js
1181
- var vt = {
1191
+ var yt = {
1182
1192
  name: "shopping-cart",
1183
1193
  viewBox: "0 0 24 24",
1184
1194
  path: "M3 4h2l2.2 11h10.9l2-7H6m3.2 7-.9 3h10.2M9 21h.01M17 21h.01",
@@ -1186,10 +1196,10 @@ var vt = {
1186
1196
  strokeLinejoin: "round",
1187
1197
  strokeWidth: "1.8"
1188
1198
  };
1189
- s(vt);
1199
+ s(yt);
1190
1200
  //#endregion
1191
1201
  //#region src/components/icon/icons/package.js
1192
- var yt = {
1202
+ var bt = {
1193
1203
  name: "package",
1194
1204
  viewBox: "0 0 24 24",
1195
1205
  path: "M3 7l9-4 9 4-9 4-9-4zm0 0v10l9 4 9-4V7M12 11v10M7.5 5l9 4",
@@ -1197,10 +1207,10 @@ var yt = {
1197
1207
  strokeLinejoin: "round",
1198
1208
  strokeWidth: "1.8"
1199
1209
  };
1200
- s(yt);
1210
+ s(bt);
1201
1211
  //#endregion
1202
1212
  //#region src/components/icon/icons/storefront.js
1203
- var bt = {
1213
+ var xt = {
1204
1214
  name: "storefront",
1205
1215
  viewBox: "0 0 24 24",
1206
1216
  path: "M3 10l2-6h14l2 6M4 10v10h16V10M3 10a3 3 0 006 0 3 3 0 006 0 3 3 0 006 0M10 15v5m4-5v5",
@@ -1208,10 +1218,10 @@ var bt = {
1208
1218
  strokeLinejoin: "round",
1209
1219
  strokeWidth: "1.8"
1210
1220
  };
1211
- s(bt);
1221
+ s(xt);
1212
1222
  //#endregion
1213
1223
  //#region src/components/icon/icons/receipt.js
1214
- var xt = {
1224
+ var St = {
1215
1225
  name: "receipt",
1216
1226
  viewBox: "0 0 24 24",
1217
1227
  path: "M6 3l2 1.5L10 3l2 1.5L14 3l2 1.5L18 3v18l-2-1.5-2 1.5-2-1.5-2 1.5-2-1.5L6 21V3zm3 6h6m-6 4h6m-6 4h3",
@@ -1219,10 +1229,10 @@ var xt = {
1219
1229
  strokeLinejoin: "round",
1220
1230
  strokeWidth: "1.8"
1221
1231
  };
1222
- s(xt);
1232
+ s(St);
1223
1233
  //#endregion
1224
1234
  //#region src/components/icon/icons/coupon.js
1225
- var St = {
1235
+ var Ct = {
1226
1236
  name: "coupon",
1227
1237
  viewBox: "0 0 24 24",
1228
1238
  path: "M4 5h16v4a3 3 0 000 6v4H4v-4a3 3 0 000-6V5zm8 1v2m0 2v2m0 2v2",
@@ -1230,10 +1240,10 @@ var St = {
1230
1240
  strokeLinejoin: "round",
1231
1241
  strokeWidth: "1.8"
1232
1242
  };
1233
- s(St);
1243
+ s(Ct);
1234
1244
  //#endregion
1235
1245
  //#region src/components/icon/icons/heart.js
1236
- var Ct = {
1246
+ var wt = {
1237
1247
  name: "heart",
1238
1248
  viewBox: "0 0 24 24",
1239
1249
  path: "M20.8 8.8c0 5.2-8.8 11-8.8 11s-8.8-5.8-8.8-11a4.8 4.8 0 018.8-2.6 4.8 4.8 0 018.8 2.6z",
@@ -1241,10 +1251,10 @@ var Ct = {
1241
1251
  strokeLinejoin: "round",
1242
1252
  strokeWidth: "1.8"
1243
1253
  };
1244
- s(Ct);
1254
+ s(wt);
1245
1255
  //#endregion
1246
1256
  //#region src/components/icon/icons/return.js
1247
- var wt = {
1257
+ var Tt = {
1248
1258
  name: "return",
1249
1259
  viewBox: "0 0 24 24",
1250
1260
  path: "M9 14l-5-5 5-5M4 9h10a6 6 0 010 12h-3",
@@ -1252,7 +1262,7 @@ var wt = {
1252
1262
  strokeLinejoin: "round",
1253
1263
  strokeWidth: "1.8"
1254
1264
  };
1255
- s(wt), s({
1265
+ s(Tt), s({
1256
1266
  name: "undo",
1257
1267
  viewBox: "0 0 24 24",
1258
1268
  path: "M9 14 4 9l5-5M4 9h10a6 6 0 0 1 0 12h-2",
@@ -1267,7 +1277,7 @@ s(wt), s({
1267
1277
  });
1268
1278
  //#endregion
1269
1279
  //#region src/components/icon/icons/shirt.js
1270
- var Tt = {
1280
+ var Et = {
1271
1281
  name: "shirt",
1272
1282
  viewBox: "0 0 24 24",
1273
1283
  path: "M8 4l4 2 4-2 5 3-2 4-3-1v10H8V10l-3 1-2-4 5-3z M8 4c0 2 1.8 3.5 4 3.5S16 6 16 4",
@@ -1275,10 +1285,10 @@ var Tt = {
1275
1285
  strokeLinejoin: "round",
1276
1286
  strokeWidth: "1.8"
1277
1287
  };
1278
- s(Tt);
1288
+ s(Et);
1279
1289
  //#endregion
1280
1290
  //#region src/components/icon/icons/jacket.js
1281
- var Et = {
1291
+ var Dt = {
1282
1292
  name: "jacket",
1283
1293
  viewBox: "0 0 24 24",
1284
1294
  path: "M8 4l4 2 4-2 4 3-2 14h-5V11l-1 2-1-2v10H6L4 7l4-3z M8 4c0 2 1.8 3.5 4 3.5S16 6 16 4 M12 8v3",
@@ -1286,10 +1296,10 @@ var Et = {
1286
1296
  strokeLinejoin: "round",
1287
1297
  strokeWidth: "1.8"
1288
1298
  };
1289
- s(Et);
1299
+ s(Dt);
1290
1300
  //#endregion
1291
1301
  //#region src/components/icon/icons/dress.js
1292
- var Dt = {
1302
+ var Ot = {
1293
1303
  name: "dress",
1294
1304
  viewBox: "0 0 24 24",
1295
1305
  path: "M9 4a3 3 0 006 0l2 2-2 4 5 10H4l5-10-2-4 2-2z M9 10h6",
@@ -1297,10 +1307,10 @@ var Dt = {
1297
1307
  strokeLinejoin: "round",
1298
1308
  strokeWidth: "1.8"
1299
1309
  };
1300
- s(Dt);
1310
+ s(Ot);
1301
1311
  //#endregion
1302
1312
  //#region src/components/icon/icons/shoe.js
1303
- var Ot = {
1313
+ var kt = {
1304
1314
  name: "shoe",
1305
1315
  viewBox: "0 0 24 24",
1306
1316
  path: "M3 15l4-1 4-7 3 2-1 3 4 2 4 1v4H3v-4z M11 10l2 1 M9 12l2 1 M7 14l2 1",
@@ -1308,7 +1318,7 @@ var Ot = {
1308
1318
  strokeLinejoin: "round",
1309
1319
  strokeWidth: "1.8"
1310
1320
  };
1311
- s(Ot), s({
1321
+ s(kt), s({
1312
1322
  name: "grip-dots",
1313
1323
  viewBox: "0 0 24 24",
1314
1324
  path: "M12 12",
@@ -1316,7 +1326,7 @@ s(Ot), s({
1316
1326
  });
1317
1327
  //#endregion
1318
1328
  //#region src/components/icon/icons/wallet.js
1319
- var kt = {
1329
+ var At = {
1320
1330
  name: "wallet",
1321
1331
  viewBox: "0 0 24 24",
1322
1332
  path: "M4 6.5A2.5 2.5 0 016.5 4H20v16H6a3 3 0 01-3-3V6.5A2.5 2.5 0 016 9h14m-4 4h.01",
@@ -1324,10 +1334,10 @@ var kt = {
1324
1334
  strokeLinejoin: "round",
1325
1335
  strokeWidth: "1.8"
1326
1336
  };
1327
- s(kt);
1337
+ s(At);
1328
1338
  //#endregion
1329
1339
  //#region src/components/icon/icons/gift.js
1330
- var At = {
1340
+ var jt = {
1331
1341
  name: "gift",
1332
1342
  viewBox: "0 0 24 24",
1333
1343
  path: "M3 9h18v12H3V9zm-1-3h20v3H2V6zm10 0v15m0-15C11 4.6 9.8 3 8 3a1.5 1.5 0 000 3m4 0c1-1.4 2.2-3 4-3a1.5 1.5 0 010 3",
@@ -1335,10 +1345,10 @@ var At = {
1335
1345
  strokeLinejoin: "round",
1336
1346
  strokeWidth: "1.8"
1337
1347
  };
1338
- s(At);
1348
+ s(jt);
1339
1349
  //#endregion
1340
1350
  //#region src/components/icon/icons/support.js
1341
- var jt = {
1351
+ var Mt = {
1342
1352
  name: "support",
1343
1353
  viewBox: "0 0 24 24",
1344
1354
  path: "M4 13v-2a8 8 0 0116 0v2m-16 0h3v6H6a2 2 0 01-2-2v-2a2 2 0 012-2zm16 0h-3v6h1a2 2 0 002-2v-2a2 2 0 00-2-2zm-3 8h-4",
@@ -1346,10 +1356,10 @@ var jt = {
1346
1356
  strokeLinejoin: "round",
1347
1357
  strokeWidth: "1.8"
1348
1358
  };
1349
- s(jt);
1359
+ s(Mt);
1350
1360
  //#endregion
1351
1361
  //#region src/components/icon/icons/shopping-bag.js
1352
- var Mt = {
1362
+ var Nt = {
1353
1363
  name: "shopping-bag",
1354
1364
  viewBox: "0 0 24 24",
1355
1365
  path: "M5 8h14l1 13H4L5 8zm4 0V6a3 3 0 016 0v2",
@@ -1357,10 +1367,10 @@ var Mt = {
1357
1367
  strokeLinejoin: "round",
1358
1368
  strokeWidth: "1.8"
1359
1369
  };
1360
- s(Mt);
1370
+ s(Nt);
1361
1371
  //#endregion
1362
1372
  //#region src/components/icon/icons/warehouse.js
1363
- var Nt = {
1373
+ var Pt = {
1364
1374
  name: "warehouse",
1365
1375
  viewBox: "0 0 24 24",
1366
1376
  path: "M3 10l9-6 9 6v10H3V10zm4 10v-7h10v7m-7-7v7m4-7v7",
@@ -1368,10 +1378,10 @@ var Nt = {
1368
1378
  strokeLinejoin: "round",
1369
1379
  strokeWidth: "1.8"
1370
1380
  };
1371
- s(Nt);
1381
+ s(Pt);
1372
1382
  //#endregion
1373
1383
  //#region src/components/icon/icons/delivery-location.js
1374
- var Pt = {
1384
+ var Ft = {
1375
1385
  name: "delivery-location",
1376
1386
  viewBox: "0 0 24 24",
1377
1387
  path: "M12 21s7-6.2 7-12a7 7 0 10-14 0c0 5.8 7 12 7 12zm0-9a3 3 0 110-6 3 3 0 010 6zm-9 9h18",
@@ -1379,10 +1389,10 @@ var Pt = {
1379
1389
  strokeLinejoin: "round",
1380
1390
  strokeWidth: "1.8"
1381
1391
  };
1382
- s(Pt);
1392
+ s(Ft);
1383
1393
  //#endregion
1384
1394
  //#region src/components/icon/icons/order-tracking.js
1385
- var Ft = {
1395
+ var It = {
1386
1396
  name: "order-tracking",
1387
1397
  viewBox: "0 0 24 24",
1388
1398
  path: "M14.7 2.2H2.9a1.5 1.5 0 00-1.5 1.5v11.4a1.5 1.5 0 001.5 1.5h.2m6.1 0h5.5m0-14.4v14.4M14.7 6.1H18c.8 0 1.5.4 2 1.1l2.4 3.4c.5.7.7 1.4.7 2.2v2.3a1.5 1.5 0 01-1.5 1.5h-.4m-5.8 0h-.7M15.2 7.9h2.6l2.8 4.1h-5.4zM3 19.6a3.1 3.1 0 106.2 0 3.1 3.1 0 00-6.2 0zm12 0a3.1 3.1 0 106.2 0 3.1 3.1 0 00-6.2 0z",
@@ -1391,10 +1401,10 @@ var Ft = {
1391
1401
  strokeLinejoin: "round",
1392
1402
  strokeWidth: "1.8"
1393
1403
  };
1394
- s(Ft);
1404
+ s(It);
1395
1405
  //#endregion
1396
1406
  //#region src/components/icon/icons/cash.js
1397
- var It = {
1407
+ var Lt = {
1398
1408
  name: "cash",
1399
1409
  viewBox: "0 0 24 24",
1400
1410
  path: "M3 6h18v12H3V6zm4 3h.01M17 9h.01M7 15h.01M17 15h.01M12 15a3 3 0 100-6 3 3 0 000 6z",
@@ -1402,10 +1412,10 @@ var It = {
1402
1412
  strokeLinejoin: "round",
1403
1413
  strokeWidth: "1.8"
1404
1414
  };
1405
- s(It);
1415
+ s(Lt);
1406
1416
  //#endregion
1407
1417
  //#region src/components/icon/icons/installments.js
1408
- var Lt = {
1418
+ var Rt = {
1409
1419
  name: "installments",
1410
1420
  viewBox: "0 0 24 24",
1411
1421
  path: "M4 4h16v16H4V4zm0 4h16m-12 4h2m4 0h2m-8 4h2m4 0h2",
@@ -1413,10 +1423,10 @@ var Lt = {
1413
1423
  strokeLinejoin: "round",
1414
1424
  strokeWidth: "1.8"
1415
1425
  };
1416
- s(Lt);
1426
+ s(Rt);
1417
1427
  //#endregion
1418
1428
  //#region src/components/icon/icons/invoice.js
1419
- var Rt = {
1429
+ var zt = {
1420
1430
  name: "invoice",
1421
1431
  viewBox: "0 0 24 24",
1422
1432
  path: "M6 3h12v18l-3-2-3 2-3-2-3 2V3zm3 5h6m-6 4h6m-6 4h3",
@@ -1424,10 +1434,10 @@ var Rt = {
1424
1434
  strokeLinejoin: "round",
1425
1435
  strokeWidth: "1.8"
1426
1436
  };
1427
- s(Rt);
1437
+ s(zt);
1428
1438
  //#endregion
1429
1439
  //#region src/components/icon/icons/price-label.js
1430
- var zt = {
1440
+ var Bt = {
1431
1441
  name: "price-label",
1432
1442
  viewBox: "0 0 24 24",
1433
1443
  path: "M3 5h10l8 8-8 8-10-10V5zm5 5h.01",
@@ -1435,10 +1445,10 @@ var zt = {
1435
1445
  strokeLinejoin: "round",
1436
1446
  strokeWidth: "1.8"
1437
1447
  };
1438
- s(zt);
1448
+ s(Bt);
1439
1449
  //#endregion
1440
1450
  //#region src/components/icon/icons/sale-burst.js
1441
- var Bt = {
1451
+ var Vt = {
1442
1452
  name: "sale-burst",
1443
1453
  viewBox: "0 0 24 24",
1444
1454
  path: "M12 1.5l1.63 2.31 2.39-1.51.62 2.76 2.78-.48-.48 2.78 2.76.62-1.51 2.39L22.5 12l-2.31 1.63 1.51 2.39-2.76.62.48 2.78-2.78-.48-.62 2.76-2.39-1.51L12 22.5l-1.63-2.31-2.39 1.51-.62-2.76-2.78.48.48-2.78-2.76-.62 1.51-2.39L1.5 12l2.31-1.63L2.3 7.98l2.76-.62-.48-2.78 2.78.48.62-2.76 2.39 1.51L12 1.5zm-3 6.2a1.7 1.7 0 100 3.4 1.7 1.7 0 000-3.4zm6 5.2a1.7 1.7 0 100 3.4 1.7 1.7 0 000-3.4M8 16l8-8",
@@ -1446,10 +1456,10 @@ var Bt = {
1446
1456
  strokeLinejoin: "miter",
1447
1457
  strokeWidth: "1.8"
1448
1458
  };
1449
- s(Bt);
1459
+ s(Vt);
1450
1460
  //#endregion
1451
1461
  //#region src/components/icon/icons/percent-discount.js
1452
- var Vt = {
1462
+ var Ht = {
1453
1463
  name: "percent-discount",
1454
1464
  viewBox: "0 0 24 24",
1455
1465
  path: "M19 5L5 19M7 8a2 2 0 110-4 2 2 0 010 4zm10 12a2 2 0 110-4 2 2 0 010 4z",
@@ -1457,10 +1467,10 @@ var Vt = {
1457
1467
  strokeLinejoin: "round",
1458
1468
  strokeWidth: "1.8"
1459
1469
  };
1460
- s(Vt);
1470
+ s(Ht);
1461
1471
  //#endregion
1462
1472
  //#region src/components/icon/icons/product-review.js
1463
- var Ht = {
1473
+ var Ut = {
1464
1474
  name: "product-review",
1465
1475
  viewBox: "0 0 24 24",
1466
1476
  path: "M12 3l2.7 5.5 6.1.9-4.4 4.3 1 6.1-5.4-2.9-5.4 2.9 1-6.1-4.4-4.3 6.1-.9L12 3z",
@@ -1468,17 +1478,17 @@ var Ht = {
1468
1478
  strokeLinejoin: "round",
1469
1479
  strokeWidth: "1.8"
1470
1480
  };
1471
- s(Ht);
1472
- var Ut = {
1481
+ s(Ut);
1482
+ var Wt = {
1473
1483
  name: "products",
1474
1484
  viewBox: "0 0 24 24",
1475
1485
  path: "M8 7h3l7 7-9 9-7-7v-5a4 4 0 014-4z",
1476
1486
  customSvg: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <defs>\n <mask id=\"products-front-tag-mask\" maskUnits=\"userSpaceOnUse\" x=\"0\" y=\"0\" width=\"24\" height=\"24\">\n <rect width=\"24\" height=\"24\" fill=\"white\" />\n <path d=\"M8 7h3l7 7-9 9-7-7v-5a4 4 0 014-4z\" fill=\"black\" stroke=\"none\" />\n </mask>\n </defs>\n <path d=\"M12 2h3l7 7-9 9-8-8V6a4 4 0 014-4z\" mask=\"url(#products-front-tag-mask)\" />\n <path d=\"M8 7h3l7 7-9 9-7-7v-5a4 4 0 014-4z\" />\n <circle cx=\"7.5\" cy=\"11.5\" r=\"0.7\" />\n</svg>"
1477
1487
  };
1478
- s(Ut);
1488
+ s(Wt);
1479
1489
  //#endregion
1480
1490
  //#region src/components/icon/icons/loyalty-points.js
1481
- var Wt = {
1491
+ var Gt = {
1482
1492
  name: "loyalty-points",
1483
1493
  viewBox: "0 0 24 24",
1484
1494
  path: "M12 3l2.4 4.8 5.3.8-3.8 3.7.9 5.2-4.8-2.5-4.8 2.5.9-5.2-3.8-3.7 5.3-.8L12 3zm-3 13v5l3-1.7 3 1.7v-5",
@@ -1486,10 +1496,10 @@ var Wt = {
1486
1496
  strokeLinejoin: "round",
1487
1497
  strokeWidth: "1.8"
1488
1498
  };
1489
- s(Wt);
1499
+ s(Gt);
1490
1500
  //#endregion
1491
1501
  //#region src/components/icon/icons/membership.js
1492
- var Gt = {
1502
+ var Kt = {
1493
1503
  name: "membership",
1494
1504
  viewBox: "0 0 24 24",
1495
1505
  path: "M5 3.5h14a2 2 0 012 2v13a2 2 0 01-2 2H5a2 2 0 01-2-2v-13a2 2 0 012-2zm-2 4h12m2-4v6l1.5-1.2L20 9.5v-6M8.5 11.5a1.3 1.3 0 100 2.6 1.3 1.3 0 000-2.6zm-2.3 5.1c.5-.9 1.3-1.3 2.3-1.3s1.8.4 2.3 1.3M13.5 12.5h4.5m-4.5 3h4.5",
@@ -1497,10 +1507,10 @@ var Gt = {
1497
1507
  strokeLinejoin: "round",
1498
1508
  strokeWidth: "1.8"
1499
1509
  };
1500
- s(Gt);
1510
+ s(Kt);
1501
1511
  //#endregion
1502
1512
  //#region src/components/icon/icons/inventory.js
1503
- var Kt = {
1513
+ var qt = {
1504
1514
  name: "inventory",
1505
1515
  viewBox: "0 0 24 24",
1506
1516
  path: "M8 4h8a2 2 0 012 2v1h2v14H4V7h2V6a2 2 0 012-2zm1 0V3h6v1M8 11h8m-8 4h8",
@@ -1508,10 +1518,10 @@ var Kt = {
1508
1518
  strokeLinejoin: "round",
1509
1519
  strokeWidth: "1.8"
1510
1520
  };
1511
- s(Kt);
1521
+ s(qt);
1512
1522
  //#endregion
1513
1523
  //#region src/components/icon/icons/out-of-stock.js
1514
- var qt = {
1524
+ var Jt = {
1515
1525
  name: "out-of-stock",
1516
1526
  viewBox: "0 0 24 24",
1517
1527
  path: "M4 5h16v14H4V5zm3 3l10 8m0-8L7 16m-3 5h16",
@@ -1519,10 +1529,10 @@ var qt = {
1519
1529
  strokeLinejoin: "round",
1520
1530
  strokeWidth: "1.8"
1521
1531
  };
1522
- s(qt);
1532
+ s(Jt);
1523
1533
  //#endregion
1524
1534
  //#region src/components/icon/icons/pickup.js
1525
- var Jt = {
1535
+ var Yt = {
1526
1536
  name: "pickup",
1527
1537
  viewBox: "0 0 24 24",
1528
1538
  path: "M5.5 2.8a1.6 1.6 0 100 3.2 1.6 1.6 0 000-3.2zm-.8 5.1-1 5.8 2.2 1.7 2.5 5.1m-4.7-6.8L2.5 20m2.2-12.1 3.8 2.8 3.2.1m-.2-5.1l4.5-2 4.5 2-4.5 2-4.5-2zm0 0v5l4.5 2 4.5-2v-5m-4.5 1v6.5",
@@ -1530,10 +1540,10 @@ var Jt = {
1530
1540
  strokeLinejoin: "round",
1531
1541
  strokeWidth: "1.8"
1532
1542
  };
1533
- s(Jt);
1543
+ s(Yt);
1534
1544
  //#endregion
1535
1545
  //#region src/components/icon/icons/secure-checkout.js
1536
- var Yt = {
1546
+ var Xt = {
1537
1547
  name: "secure-checkout",
1538
1548
  viewBox: "0 0 24 24",
1539
1549
  path: "M12 3l7 3v5c0 5-3 8-7 10-4-2-7-5-7-10V6l7-3zm-3 9l2 2 4-4",
@@ -1541,10 +1551,10 @@ var Yt = {
1541
1551
  strokeLinejoin: "round",
1542
1552
  strokeWidth: "1.8"
1543
1553
  };
1544
- s(Yt);
1554
+ s(Xt);
1545
1555
  //#endregion
1546
1556
  //#region src/components/icon/icons/refund.js
1547
- var Xt = {
1557
+ var Zt = {
1548
1558
  name: "refund",
1549
1559
  viewBox: "0 0 24 24",
1550
1560
  path: "M14 3.5a8.5 8.5 0 110 17 8.5 8.5 0 010-17zm0 2.5v12m2.7-9.3c-.5-1-1.5-1.5-2.7-1.5-1.5 0-2.5.8-2.5 1.9 0 2.5 5 1.2 5 3.8 0 1.2-1 2-2.5 2-1.2 0-2.2-.5-2.8-1.5M6.5 7H2.5m0 0l2-2M2.5 7l2 2",
@@ -1552,10 +1562,10 @@ var Xt = {
1552
1562
  strokeLinejoin: "round",
1553
1563
  strokeWidth: "1.5"
1554
1564
  };
1555
- s(Xt);
1565
+ s(Zt);
1556
1566
  //#endregion
1557
1567
  //#region src/components/icon/icons/variants.js
1558
- var Zt = {
1568
+ var Qt = {
1559
1569
  name: "variants",
1560
1570
  viewBox: "0 0 24 24",
1561
1571
  path: "M6 15.5V12m12 3.5V12M6 12h12m-6 0V8.5M3 18.5a3 3 0 106 0 3 3 0 00-6 0zm12 0a3 3 0 106 0 3 3 0 00-6 0zm-6-13a3 3 0 106 0 3 3 0 00-6 0z",
@@ -1563,7 +1573,7 @@ var Zt = {
1563
1573
  strokeLinejoin: "round",
1564
1574
  strokeWidth: "2"
1565
1575
  };
1566
- s(Zt);
1576
+ s(Qt);
1567
1577
  //#endregion
1568
1578
  //#region src/components/icon/icons/toolbar-icons.ts
1569
1579
  var z = (e, t) => ({
@@ -1571,7 +1581,7 @@ var z = (e, t) => ({
1571
1581
  viewBox: "0 0 24 24",
1572
1582
  path: "",
1573
1583
  customSvg: t
1574
- }), Qt = z("minus", "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\"><path d=\"M5 12h14\"/></svg>"), $t = z("font-size", "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M3 19 8 5l5 14M5 14h6M15 8h6M18 8v11M15.5 19h5\"/></svg>"), en = z("text-color", "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.9\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M4 20h16M7 16l5-12 5 12M9.2 11h5.6\"/></svg>"), tn = z("highlight", "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.9\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"m14.8 4.2 5 5L10 19H5v-5zM12.2 6.8l5 5M4 21h16\"/><path d=\"m3 18 3 3\"/></svg>"), nn = z("font-family", "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><text x=\"1.8\" y=\"17.2\" font-family=\"Arial,sans-serif\" font-size=\"13\" font-weight=\"600\">Aa</text></svg>"), rn = z("comment-plus", "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.9\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M20 11.5a7.5 7.5 0 0 1-7.5 7.5H6l-3 2v-6.5A7.5 7.5 0 0 1 10.5 7H12\"/><path d=\"M17 2v8M13 6h8\"/></svg>"), an = z("align-center", "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\"><path d=\"M4 5h16M7 9h10M4 13h16M7 17h10M4 21h16\"/></svg>"), on = z("align-right", "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\"><path d=\"M4 5h16M10 9h10M4 13h16M10 17h10M4 21h16\"/></svg>"), sn = z("align-justify", "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\"><path d=\"M4 5h16M4 9h16M4 13h16M4 17h16M4 21h16\"/></svg>"), cn = z("checklist", "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.9\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"m3 6 1.5 1.5L7 5M10 6h11M3 13l1.5 1.5L7 12M10 13h11M3 20l1.5 1.5L7 19M10 20h11\"/></svg>"), ln = z("palette", "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12 3a9 9 0 1 0 0 18h1.2a2 2 0 0 0 1.4-3.4 1.8 1.8 0 0 1 1.3-3.1H18a3 3 0 0 0 3-3c0-4.7-4-8.5-9-8.5Z\"/><circle cx=\"7.5\" cy=\"11\" r=\".8\" fill=\"currentColor\"/><circle cx=\"10\" cy=\"7.5\" r=\".8\" fill=\"currentColor\"/><circle cx=\"14\" cy=\"7.8\" r=\".8\" fill=\"currentColor\"/><circle cx=\"17\" cy=\"10.5\" r=\".8\" fill=\"currentColor\"/></svg>");
1584
+ }), $t = z("minus", "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\"><path d=\"M5 12h14\"/></svg>"), en = z("font-size", "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M3 19 8 5l5 14M5 14h6M15 8h6M18 8v11M15.5 19h5\"/></svg>"), tn = z("text-color", "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.9\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M4 20h16M7 16l5-12 5 12M9.2 11h5.6\"/></svg>"), nn = z("highlight", "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.9\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"m14.8 4.2 5 5L10 19H5v-5zM12.2 6.8l5 5M4 21h16\"/><path d=\"m3 18 3 3\"/></svg>"), rn = z("font-family", "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><text x=\"1.8\" y=\"17.2\" font-family=\"Arial,sans-serif\" font-size=\"13\" font-weight=\"600\">Aa</text></svg>"), an = z("comment-plus", "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.9\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M20 11.5a7.5 7.5 0 0 1-7.5 7.5H6l-3 2v-6.5A7.5 7.5 0 0 1 10.5 7H12\"/><path d=\"M17 2v8M13 6h8\"/></svg>"), on = z("align-center", "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\"><path d=\"M4 5h16M7 9h10M4 13h16M7 17h10M4 21h16\"/></svg>"), sn = z("align-right", "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\"><path d=\"M4 5h16M10 9h10M4 13h16M10 17h10M4 21h16\"/></svg>"), cn = z("align-justify", "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\"><path d=\"M4 5h16M4 9h16M4 13h16M4 17h16M4 21h16\"/></svg>"), ln = z("checklist", "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.9\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"m3 6 1.5 1.5L7 5M10 6h11M3 13l1.5 1.5L7 12M10 13h11M3 20l1.5 1.5L7 19M10 20h11\"/></svg>"), un = z("palette", "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12 3a9 9 0 1 0 0 18h1.2a2 2 0 0 0 1.4-3.4 1.8 1.8 0 0 1 1.3-3.1H18a3 3 0 0 0 3-3c0-4.7-4-8.5-9-8.5Z\"/><circle cx=\"7.5\" cy=\"11\" r=\".8\" fill=\"currentColor\"/><circle cx=\"10\" cy=\"7.5\" r=\".8\" fill=\"currentColor\"/><circle cx=\"14\" cy=\"7.8\" r=\".8\" fill=\"currentColor\"/><circle cx=\"17\" cy=\"10.5\" r=\".8\" fill=\"currentColor\"/></svg>");
1575
1585
  s({
1576
1586
  name: "ruler",
1577
1587
  viewBox: "0 0 24 24",
@@ -1717,57 +1727,57 @@ s({
1717
1727
  });
1718
1728
  //#endregion
1719
1729
  //#region src/components/icon/icons/bold.js
1720
- var un = {
1730
+ var dn = {
1721
1731
  name: "bold",
1722
1732
  viewBox: "0 0 24 24",
1723
1733
  path: "M7 4h6a4 4 0 010 8H7zm0 8h7a4 4 0 010 8H7z",
1724
1734
  strokeLinecap: "round",
1725
1735
  strokeLinejoin: "round"
1726
1736
  };
1727
- s(un);
1737
+ s(dn);
1728
1738
  //#endregion
1729
1739
  //#region src/components/icon/icons/italic.js
1730
- var dn = {
1740
+ var fn = {
1731
1741
  name: "italic",
1732
1742
  viewBox: "0 0 24 24",
1733
1743
  path: "M8 5h12M14 5l-4 14M4 19h12",
1734
1744
  strokeLinecap: "round",
1735
1745
  strokeLinejoin: "round"
1736
1746
  };
1737
- s(dn);
1747
+ s(fn);
1738
1748
  //#endregion
1739
1749
  //#region src/components/icon/icons/underline.js
1740
- var fn = {
1750
+ var pn = {
1741
1751
  name: "underline",
1742
1752
  viewBox: "0 0 24 24",
1743
1753
  path: "M6 4v6a6 6 0 0012 0V4M4 21h16",
1744
1754
  strokeLinecap: "round",
1745
1755
  strokeLinejoin: "round"
1746
1756
  };
1747
- s(fn);
1757
+ s(pn);
1748
1758
  //#endregion
1749
1759
  //#region src/components/icon/icons/numbered-list.js
1750
- var pn = {
1760
+ var mn = {
1751
1761
  name: "numbered-list",
1752
1762
  viewBox: "0 0 24 24",
1753
1763
  path: "M10 6h11M10 12h11M10 18h11M4 5h2v3M4 11h2l-2 2h2M4 17h2v2H4",
1754
1764
  strokeLinecap: "round",
1755
1765
  strokeLinejoin: "round"
1756
1766
  };
1757
- s(pn);
1767
+ s(mn);
1758
1768
  //#endregion
1759
1769
  //#region src/components/icon/icons/quote.js
1760
- var mn = {
1770
+ var hn = {
1761
1771
  name: "quote",
1762
1772
  viewBox: "0 0 24 24",
1763
1773
  path: "M10 11H5a2 2 0 00-2 2v5h7v-5a2 2 0 00-2-2zm11 0h-5a2 2 0 00-2 2v5h7v-5a2 2 0 00-2-2zM7 11V8a3 3 0 013-3m8 6V8a3 3 0 013-3",
1764
1774
  strokeLinecap: "round",
1765
1775
  strokeLinejoin: "round"
1766
1776
  };
1767
- s(mn), s(u), s(d), s(f), s(p), s(m), s(h), s(g), s(_), s(v), s(y), s(b), s(x), s(S), s(C), s(w), s(T), s(E), s(D), s(ee), s(O), s(k), s(A), s(j), s(M), s(te), s(N), s(P), s(ne), s(F), s(I), s(re), s(ie), s(ae), s(L), s(R), s(oe), s(se), s(ce), s(le), s(ue), s(de), s(fe), s(pe), s(me), s(he), s(ge), s(_e), s(ve), s(ye), s(be), s(xe), s(Se), s(Ce), s(we), s(Te), s(Ee), s(De), s(Oe), s(ke), s(Ae), s(je), s(Me), s(Ne), s(Pe), s(Fe), s(Ie), s(Le), s(Re), s(ze), s(Be), s(Ve), s(He), s(Ue), s(We), s(Ge), s(Ke), s(qe), s(Je), s(Ye), s(Xe), s(Ze), s(Qe), s($e), s(et), s(tt), s(nt), s(rt), s(it), s(at), s(ot), s(st), s(ct), s(lt), s(ut), s(dt), s(ft), s(pt), s(mt), s(ht), s(gt), s(_t), s(vt), s(yt), s(bt), s(xt), s(St), s(Ct), s(wt), s(Tt), s(Et), s(Dt), s(Ot), s(kt), s(At), s(jt), s(Mt), s(Nt), s(Pt), s(Ft), s(It), s(Lt), s(Rt), s(zt), s(Bt), s(Vt), s(Ht), s(Ut), s(Wt), s(Gt), s(Kt), s(qt), s(Jt), s(Yt), s(Xt), s(Zt), s(Qt), s($t), s(en), s(tn), s(nn), s(rn), s(an), s(on), s(sn), s(cn), s(ln), s(un), s(dn), s(fn), s(pn), s(mn);
1777
+ s(hn), s(u), s(d), s(f), s(p), s(m), s(h), s(g), s(_), s(v), s(y), s(b), s(x), s(S), s(C), s(w), s(T), s(E), s(D), s(ee), s(O), s(k), s(A), s(j), s(M), s(te), s(N), s(P), s(ne), s(F), s(I), s(re), s(ie), s(ae), s(L), s(R), s(oe), s(se), s(ce), s(le), s(ue), s(de), s(fe), s(pe), s(me), s(he), s(ge), s(_e), s(ve), s(ye), s(be), s(xe), s(Se), s(Ce), s(we), s(Te), s(Ee), s(De), s(Oe), s(ke), s(Ae), s(je), s(Me), s(Ne), s(Pe), s(Fe), s(Ie), s(Le), s(Re), s(ze), s(Be), s(Ve), s(He), s(Ue), s(We), s(Ge), s(Ke), s(qe), s(Je), s(Ye), s(Xe), s(Ze), s(Qe), s($e), s(et), s(tt), s(nt), s(rt), s(it), s(at), s(ot), s(st), s(ct), s(lt), s(ut), s(dt), s(ft), s(pt), s(mt), s(ht), s(gt), s(_t), s(vt), s(yt), s(bt), s(xt), s(St), s(Ct), s(wt), s(Tt), s(Et), s(Dt), s(Ot), s(kt), s(At), s(jt), s(Mt), s(Nt), s(Pt), s(Ft), s(It), s(Lt), s(Rt), s(zt), s(Bt), s(Vt), s(Ht), s(Ut), s(Wt), s(Gt), s(Kt), s(qt), s(Jt), s(Yt), s(Xt), s(Zt), s(Qt), s($t), s(en), s(tn), s(nn), s(rn), s(an), s(on), s(sn), s(cn), s(ln), s(un), s(dn), s(fn), s(pn), s(mn), s(hn);
1768
1778
  //#endregion
1769
1779
  //#region src/components/spinner/Spinner.js
1770
- var hn = class extends HTMLElement {
1780
+ var gn = class extends HTMLElement {
1771
1781
  static get observedAttributes() {
1772
1782
  return [
1773
1783
  "size",
@@ -1870,10 +1880,10 @@ var hn = class extends HTMLElement {
1870
1880
  `.trim();
1871
1881
  }
1872
1882
  };
1873
- typeof customElements < "u" && !customElements.get("mint-spinner") && a("mint-spinner", hn);
1883
+ typeof customElements < "u" && !customElements.get("mint-spinner") && a("mint-spinner", gn);
1874
1884
  //#endregion
1875
1885
  //#region src/components/button/Button.ts
1876
- var gn = class extends HTMLElement {
1886
+ var _n = class extends HTMLElement {
1877
1887
  static get observedAttributes() {
1878
1888
  return [
1879
1889
  "variant",
@@ -2262,10 +2272,10 @@ var gn = class extends HTMLElement {
2262
2272
  });
2263
2273
  }
2264
2274
  };
2265
- customElements.get("mint-button") || a("mint-button", gn);
2275
+ customElements.get("mint-button") || a("mint-button", _n);
2266
2276
  //#endregion
2267
2277
  //#region src/components/switch/Switch.js
2268
- var _n = class extends HTMLElement {
2278
+ var vn = class extends HTMLElement {
2269
2279
  static get observedAttributes() {
2270
2280
  return [
2271
2281
  "checked",
@@ -2446,10 +2456,10 @@ var _n = class extends HTMLElement {
2446
2456
  n && (n.id = `${e}-info`, t.push(n.id)), r && (r.id = `${e}-error`, t.push(r.id)), t.length ? this._button.setAttribute("aria-describedby", Array.from(new Set(t)).join(" ")) : this._button.removeAttribute("aria-describedby");
2447
2457
  }
2448
2458
  };
2449
- customElements.get("mint-switch") || a("mint-switch", _n);
2459
+ customElements.get("mint-switch") || a("mint-switch", vn);
2450
2460
  //#endregion
2451
2461
  //#region src/components/text/Text.js
2452
- var vn = class extends HTMLElement {
2462
+ var yn = class extends HTMLElement {
2453
2463
  static get observedAttributes() {
2454
2464
  return [
2455
2465
  "variant",
@@ -2511,10 +2521,10 @@ var vn = class extends HTMLElement {
2511
2521
  }
2512
2522
  render() {}
2513
2523
  };
2514
- typeof customElements < "u" && !customElements.get("mint-text") && a("mint-text", vn);
2524
+ typeof customElements < "u" && !customElements.get("mint-text") && a("mint-text", yn);
2515
2525
  //#endregion
2516
2526
  //#region src/components/stack/Stack.js
2517
- var yn = class extends HTMLElement {
2527
+ var bn = class extends HTMLElement {
2518
2528
  static get observedAttributes() {
2519
2529
  return [
2520
2530
  "direction",
@@ -2562,10 +2572,10 @@ var yn = class extends HTMLElement {
2562
2572
  }[t] : "flex-start"), this.style.setProperty("--mint-stack-text-align", n || "initial");
2563
2573
  }
2564
2574
  };
2565
- typeof customElements < "u" && !customElements.get("mint-stack") && a("mint-stack", yn);
2575
+ typeof customElements < "u" && !customElements.get("mint-stack") && a("mint-stack", bn);
2566
2576
  //#endregion
2567
2577
  //#region src/components/card/Card.js
2568
- var bn = class extends HTMLElement {
2578
+ var xn = class extends HTMLElement {
2569
2579
  static get observedAttributes() {
2570
2580
  return ["heading", "flush"];
2571
2581
  }
@@ -2595,10 +2605,10 @@ var bn = class extends HTMLElement {
2595
2605
  e ? (this._headingElement || (this._headingElement = document.createElement("mint-text"), this._headingElement.setAttribute("size", "sub-heading"), this._headingElement.setAttribute("role", "heading"), this._headingElement.setAttribute("aria-level", "2"), this.insertBefore(this._headingElement, this.firstChild)), this._headingElement.textContent = e) : this._headingElement?.parentNode && (this._headingElement.remove(), this._headingElement = null);
2596
2606
  }
2597
2607
  };
2598
- typeof customElements < "u" && !customElements.get("mint-card") && a("mint-card", bn);
2608
+ typeof customElements < "u" && !customElements.get("mint-card") && a("mint-card", xn);
2599
2609
  //#endregion
2600
2610
  //#region src/components/link/Link.js
2601
- var xn = class extends HTMLElement {
2611
+ var Sn = class extends HTMLElement {
2602
2612
  static get observedAttributes() {
2603
2613
  return ["href", "target"];
2604
2614
  }
@@ -2631,7 +2641,7 @@ var xn = class extends HTMLElement {
2631
2641
  this._link.className = n.filter(Boolean).join(" ");
2632
2642
  }
2633
2643
  };
2634
- typeof customElements < "u" && !customElements.get("mint-link") && a("mint-link", xn), s({
2644
+ typeof customElements < "u" && !customElements.get("mint-link") && a("mint-link", Sn), s({
2635
2645
  name: "arrow-left",
2636
2646
  viewBox: "0 0 24 24",
2637
2647
  path: "M19 12H5m7-7l-7 7 7 7",
@@ -2640,7 +2650,7 @@ typeof customElements < "u" && !customElements.get("mint-link") && a("mint-link"
2640
2650
  });
2641
2651
  //#endregion
2642
2652
  //#region src/components/button/Button.js
2643
- var Sn = class extends HTMLElement {
2653
+ var Cn = class extends HTMLElement {
2644
2654
  static get observedAttributes() {
2645
2655
  return [
2646
2656
  "variant",
@@ -2816,10 +2826,10 @@ var Sn = class extends HTMLElement {
2816
2826
  });
2817
2827
  }
2818
2828
  };
2819
- typeof customElements < "u" && !customElements.get("mint-button") && a("mint-button", Sn);
2829
+ typeof customElements < "u" && !customElements.get("mint-button") && a("mint-button", Cn);
2820
2830
  //#endregion
2821
2831
  //#region src/components/back-button/BackButton.js
2822
- var Cn = class extends HTMLElement {
2832
+ var wn = class extends HTMLElement {
2823
2833
  static get observedAttributes() {
2824
2834
  return ["href", "fallback-href"];
2825
2835
  }
@@ -2863,11 +2873,83 @@ var Cn = class extends HTMLElement {
2863
2873
  this._button || (this._button = document.createElement("mint-button"), this._button.setAttribute("variant", "solid"), this._button.setAttribute("tone", "neutral"), this._button.setAttribute("icon", "arrow-left"), this._button.setAttribute("aria-label", this.getAttribute("aria-label") || "Go back"), this._button.addEventListener("click", (e) => this.handleClick(e)), this.appendChild(this._button));
2864
2874
  }
2865
2875
  };
2866
- typeof customElements < "u" && !customElements.get("mint-back-button") && a("mint-back-button", Cn);
2876
+ typeof customElements < "u" && !customElements.get("mint-back-button") && a("mint-back-button", wn);
2867
2877
  //#endregion
2868
2878
  //#region src/components/scroll-fade/ScrollFade.ts
2869
2879
  function B(e, t = "vertical", n = "1.5rem", r = "mask") {
2870
- let i = null, a = null, o = 0, s = () => {
2880
+ let i = null, a = null, o = 0, s = 0, c = null, l = null, u = null, d = 0, f = 0, p = 0, m = (t) => t === "top" ? e.scrollTop > 1 : t === "bottom" ? e.scrollTop + e.clientHeight < e.scrollHeight - 1 : t === "left" ? e.scrollLeft > 1 : e.scrollLeft + e.clientWidth < e.scrollWidth - 1, h = (t, n) => {
2881
+ let r = Number.parseFloat(t);
2882
+ if (!Number.isFinite(r) || r <= 0) return Math.min(24, n / 2);
2883
+ let i = t.trim().replace(String(r), "").toLowerCase(), a = Number.parseFloat(getComputedStyle(document.documentElement).fontSize) || 16, o = Number.parseFloat(getComputedStyle(e).fontSize) || a, s = i === "rem" ? r * a : i === "em" ? r * o : i === "vw" ? r * window.innerWidth / 100 : i === "vh" ? r * window.innerHeight / 100 : i === "%" ? r * n / 100 : r;
2884
+ return Math.max(1, Math.min(s, n / 2));
2885
+ }, g = (t, r) => {
2886
+ let i = e.getBoundingClientRect();
2887
+ if (!i.width || !i.height) return null;
2888
+ let a = getComputedStyle(e).getPropertyValue("--mint-scroll-fade-size").trim() || n, o = h(a, i.height), s = h(a, i.width), c = [];
2889
+ return r >= i.top && r <= i.top + o && m("top") && c.push({
2890
+ edge: "top",
2891
+ distance: r - i.top
2892
+ }), r <= i.bottom && r >= i.bottom - o && m("bottom") && c.push({
2893
+ edge: "bottom",
2894
+ distance: i.bottom - r
2895
+ }), t >= i.left && t <= i.left + s && m("left") && c.push({
2896
+ edge: "left",
2897
+ distance: t - i.left
2898
+ }), t <= i.right && t >= i.right - s && m("right") && c.push({
2899
+ edge: "right",
2900
+ distance: i.right - t
2901
+ }), c.sort((e, t) => e.distance - t.distance), c[0]?.edge ?? null;
2902
+ }, _ = (t) => {
2903
+ if (!c) return;
2904
+ let r = e.getBoundingClientRect(), i = Math.min(10, Math.max(4, h(n, Math.min(r.width, r.height)) / 2)), a = t === "left" ? r.left + i : t === "right" ? r.right - i : r.left + r.width / 2, o = t === "top" ? r.top + i : t === "bottom" ? r.bottom - i : r.top + r.height / 2;
2905
+ c.style.left = `${a}px`, c.style.top = `${o}px`;
2906
+ }, v = () => {
2907
+ s && cancelAnimationFrame(s), s = 0, u = null, delete e.dataset.mintScrollFadeHover, c && (c.hidden = !0);
2908
+ }, y = (t) => {
2909
+ if (s = 0, !l) {
2910
+ v();
2911
+ return;
2912
+ }
2913
+ let n = g(l.x, l.y);
2914
+ if (n !== u) {
2915
+ b(n);
2916
+ return;
2917
+ }
2918
+ if (!n) return;
2919
+ _(n);
2920
+ let r = Math.max(0, t - d), i = Math.min(50, Math.max(0, t - f));
2921
+ f = t;
2922
+ let a = Math.min(500, 32 + r * .14) * i / 1e3 + p, o = n === "top" || n === "bottom" ? e.scrollTop : e.scrollLeft;
2923
+ n === "top" ? e.scrollTop -= a : n === "bottom" ? e.scrollTop += a : n === "left" ? e.scrollLeft -= a : e.scrollLeft += a;
2924
+ let c = n === "top" || n === "bottom" ? e.scrollTop : e.scrollLeft;
2925
+ if (p = (n === "top" || n === "left" ? o - a : o + a) - c, o === c && !m(n)) {
2926
+ v();
2927
+ return;
2928
+ }
2929
+ C(), s = requestAnimationFrame(y);
2930
+ };
2931
+ function b(t) {
2932
+ if (s && cancelAnimationFrame(s), s = 0, u = t, p = 0, !t) {
2933
+ delete e.dataset.mintScrollFadeHover, c && (c.hidden = !0);
2934
+ return;
2935
+ }
2936
+ e.dataset.mintScrollFadeHover = t, c || (c = document.createElement("span"), c.className = "mint-scroll-fade-hover-caret", c.setAttribute("aria-hidden", "true"), document.body.append(c)), c.dataset.edge = t, c.textContent = "", c.hidden = !1, d = performance.now(), f = d, _(t), s = requestAnimationFrame(y);
2937
+ }
2938
+ let x = (t) => {
2939
+ if (t.pointerType && t.pointerType !== "mouse") return;
2940
+ if (t.target instanceof Node && !e.contains(t.target)) {
2941
+ l = null, v();
2942
+ return;
2943
+ }
2944
+ l = {
2945
+ x: t.clientX,
2946
+ y: t.clientY
2947
+ };
2948
+ let n = g(t.clientX, t.clientY);
2949
+ n === u ? n && _(n) : b(n);
2950
+ }, S = () => {
2951
+ l = null, v();
2952
+ }, C = () => {
2871
2953
  cancelAnimationFrame(o), o = requestAnimationFrame(() => {
2872
2954
  let i = t === "vertical" || t === "both", a = t === "horizontal" || t === "both", o = i && e.scrollTop > 1, s = i && e.scrollTop + e.clientHeight < e.scrollHeight - 1, c = a && e.scrollLeft > 1, l = a && e.scrollLeft + e.clientWidth < e.scrollWidth - 1, u = getComputedStyle(e), d = Number.parseFloat(u.borderTopWidth) || 0, f = Number.parseFloat(u.borderRightWidth) || 0, p = Number.parseFloat(u.borderBottomWidth) || 0, m = Number.parseFloat(u.borderLeftWidth) || 0;
2873
2955
  e.dataset.mintScrollFadeTop = String(o), e.dataset.mintScrollFadeBottom = String(s), e.dataset.mintScrollFadeLeft = String(c), e.dataset.mintScrollFadeRight = String(l), e.style.setProperty("--mint-scroll-fade-size", n), e.style.setProperty("--mint-scroll-fade-top-size", o ? n : "0px"), e.style.setProperty("--mint-scroll-fade-bottom-size", s ? n : "0px"), e.style.setProperty("--mint-scroll-fade-left-size", c ? n : "0px"), e.style.setProperty("--mint-scroll-fade-right-size", l ? n : "0px");
@@ -2887,22 +2969,25 @@ function B(e, t = "vertical", n = "1.5rem", r = "mask") {
2887
2969
  }
2888
2970
  });
2889
2971
  };
2890
- return e.addEventListener("scroll", s, { passive: !0 }), typeof ResizeObserver < "u" && (i = new ResizeObserver(s), i.observe(e), e.firstElementChild && i.observe(e.firstElementChild)), typeof MutationObserver < "u" && (a = new MutationObserver(s), a.observe(e, {
2972
+ return e.addEventListener("scroll", C, { passive: !0 }), document.addEventListener("pointermove", x, {
2973
+ passive: !0,
2974
+ capture: !0
2975
+ }), document.addEventListener("pointerleave", S), window.addEventListener("blur", S), typeof ResizeObserver < "u" && (i = new ResizeObserver(C), i.observe(e), e.firstElementChild && i.observe(e.firstElementChild)), typeof MutationObserver < "u" && (a = new MutationObserver(C), a.observe(e, {
2891
2976
  childList: !0,
2892
2977
  subtree: !0,
2893
2978
  characterData: !0
2894
- })), s(), () => {
2895
- e.removeEventListener("scroll", s), i?.disconnect(), a?.disconnect(), cancelAnimationFrame(o);
2979
+ })), C(), () => {
2980
+ e.removeEventListener("scroll", C), document.removeEventListener("pointermove", x, !0), document.removeEventListener("pointerleave", S), window.removeEventListener("blur", S), i?.disconnect(), a?.disconnect(), cancelAnimationFrame(o);
2896
2981
  for (let t of [
2897
2982
  "mintScrollFadeTop",
2898
2983
  "mintScrollFadeBottom",
2899
2984
  "mintScrollFadeLeft",
2900
2985
  "mintScrollFadeRight"
2901
2986
  ]) delete e.dataset[t];
2902
- delete e.dataset.mintScrollFadeMode, e.style.maskImage = "", e.style.webkitMaskImage = "", e.style.maskClip = "", e.style.webkitMaskClip = "", e.style.removeProperty("--mint-scroll-fade-size"), e.style.removeProperty("--mint-scroll-fade-top-size"), e.style.removeProperty("--mint-scroll-fade-bottom-size"), e.style.removeProperty("--mint-scroll-fade-left-size"), e.style.removeProperty("--mint-scroll-fade-right-size"), e.style.removeProperty("mask-composite"), e.style.removeProperty("-webkit-mask-composite");
2987
+ delete e.dataset.mintScrollFadeMode, delete e.dataset.mintScrollFadeHover, l = null, v(), c?.remove(), c = null, e.style.maskImage = "", e.style.webkitMaskImage = "", e.style.maskClip = "", e.style.webkitMaskClip = "", e.style.removeProperty("--mint-scroll-fade-size"), e.style.removeProperty("--mint-scroll-fade-top-size"), e.style.removeProperty("--mint-scroll-fade-bottom-size"), e.style.removeProperty("--mint-scroll-fade-left-size"), e.style.removeProperty("--mint-scroll-fade-right-size"), e.style.removeProperty("mask-composite"), e.style.removeProperty("-webkit-mask-composite");
2903
2988
  };
2904
2989
  }
2905
- var wn = class extends HTMLElement {
2990
+ var Tn = class extends HTMLElement {
2906
2991
  constructor(...e) {
2907
2992
  super(...e), this._disposeFade = null, this._target = null, this._contentObserver = null;
2908
2993
  }
@@ -2946,16 +3031,16 @@ var wn = class extends HTMLElement {
2946
3031
  ].includes(r) ? r : "vertical", this.getAttribute("fade-size") || "1.5rem");
2947
3032
  }
2948
3033
  };
2949
- customElements.get("mint-scroll-fade") || a("mint-scroll-fade", wn);
3034
+ customElements.get("mint-scroll-fade") || a("mint-scroll-fade", Tn);
2950
3035
  //#endregion
2951
3036
  //#region src/components/popover/Popover.js
2952
- var Tn = new Set([
3037
+ var En = new Set([
2953
3038
  "up",
2954
3039
  "down",
2955
3040
  "left",
2956
3041
  "right"
2957
3042
  ]);
2958
- function En(e) {
3043
+ function Dn(e) {
2959
3044
  let t = e.getBoundingClientRect(), n = Math.max(0, t.top), r = Math.min(window.innerWidth, t.right), i = Math.min(window.innerHeight, t.bottom), a = Math.max(0, t.left);
2960
3045
  for (let t = e.parentElement; t && t !== document.body; t = t.parentElement) {
2961
3046
  let e = getComputedStyle(t), o = t.getBoundingClientRect();
@@ -2963,7 +3048,7 @@ function En(e) {
2963
3048
  }
2964
3049
  return i > n && r > a;
2965
3050
  }
2966
- var Dn = class extends HTMLElement {
3051
+ var On = class extends HTMLElement {
2967
3052
  static get observedAttributes() {
2968
3053
  return [
2969
3054
  "direction",
@@ -2978,7 +3063,7 @@ var Dn = class extends HTMLElement {
2978
3063
  ];
2979
3064
  }
2980
3065
  constructor() {
2981
- super(), this._trigger = null, this._triggerLookupTimer = null, this._clickHandler = null, this._hoverEnterHandler = null, this._hoverLeaveHandler = null, this._outsideHandler = null, this._escapeHandler = null, this._positionHandler = null, this._scrollHandler = null, this._resizeObserver = null, this._hoverCloseTimer = null, this._closeAnimationTimer = null, this._blobAnimation = null, this._disposeScrollFade = null;
3066
+ super(), this._trigger = null, this._triggerLookupTimer = null, this._clickHandler = null, this._hoverEnterHandler = null, this._hoverLeaveHandler = null, this._outsideHandler = null, this._escapeHandler = null, this._positionHandler = null, this._scrollHandler = null, this._resizeObserver = null, this._hoverCloseTimer = null, this._closeAnimationTimer = null, this._blobAnimation = null, this._disposeScrollFade = null, this._selectPopoverPlaceholder = null;
2982
3067
  }
2983
3068
  connectedCallback() {
2984
3069
  this.render(), this._disposeScrollFade?.();
@@ -2993,7 +3078,7 @@ var Dn = class extends HTMLElement {
2993
3078
  }
2994
3079
  getDirection() {
2995
3080
  let e = this.getAttribute("direction") || "down";
2996
- return Tn.has(e) ? e : "down";
3081
+ return En.has(e) ? e : "down";
2997
3082
  }
2998
3083
  getTriggerId() {
2999
3084
  return this.getAttribute("trigger-id") || "";
@@ -3048,6 +3133,18 @@ var Dn = class extends HTMLElement {
3048
3133
  _syncLayerZIndex() {
3049
3134
  this.style.zIndex = String(this._getLayerZIndex());
3050
3135
  }
3136
+ _portalSelectPopover() {
3137
+ if (!this.classList.contains("mint-select-popover") || this.parentElement === document.body) return;
3138
+ let e = this.parentNode;
3139
+ if (!e) return;
3140
+ let t = document.createComment("mint-select-popover");
3141
+ e.insertBefore(t, this), this._selectPopoverPlaceholder = t, document.body.appendChild(this), this._syncLayerZIndex();
3142
+ }
3143
+ _restoreSelectPopover() {
3144
+ if (!this._selectPopoverPlaceholder) return;
3145
+ let e = this._selectPopoverPlaceholder;
3146
+ this._selectPopoverPlaceholder = null, e.parentNode ? e.parentNode.replaceChild(this, e) : this.parentElement === document.body && this.remove();
3147
+ }
3051
3148
  _scheduleHoverClose() {
3052
3149
  clearTimeout(this._hoverCloseTimer), this._hoverCloseTimer = setTimeout(() => {
3053
3150
  !this._trigger?.matches(":hover") && !this.matches(":hover") && this.close();
@@ -3070,7 +3167,7 @@ var Dn = class extends HTMLElement {
3070
3167
  let t = e.target;
3071
3168
  if (!(t instanceof Node && (t === this || this.contains(t)))) {
3072
3169
  if (this.classList.contains("mint-select-popover")) {
3073
- !this._trigger || !En(this._trigger) ? this.close() : (this._position({
3170
+ !this._trigger || !Dn(this._trigger) ? this.close() : (this._position({
3074
3171
  allowViewportFlip: !1,
3075
3172
  clampToViewport: !1
3076
3173
  }), this._alignSelectedOptionToTrigger());
@@ -3210,7 +3307,7 @@ var Dn = class extends HTMLElement {
3210
3307
  }
3211
3308
  render() {
3212
3309
  let e = this.isOpen();
3213
- this._syncLayerZIndex();
3310
+ e ? this._portalSelectPopover() : this._restoreSelectPopover(), this._syncLayerZIndex();
3214
3311
  let t = this.hasAttribute("data-open") || this.dataset.state === "closing", n = this.hasAttribute("data-open");
3215
3312
  if (this.toggleAttribute("data-open", e), this.setAttribute("aria-hidden", String(!e)), this._trigger && this._trigger.setAttribute("aria-expanded", String(e)), e) {
3216
3313
  clearTimeout(this._closeAnimationTimer);
@@ -3227,10 +3324,10 @@ var Dn = class extends HTMLElement {
3227
3324
  } else this.dataset.state = "closed";
3228
3325
  }
3229
3326
  };
3230
- typeof customElements < "u" && !customElements.get("mint-popover") && a("mint-popover", Dn);
3327
+ typeof customElements < "u" && !customElements.get("mint-popover") && a("mint-popover", On);
3231
3328
  //#endregion
3232
3329
  //#region src/components/page/Page.js
3233
- var On = class extends HTMLElement {
3330
+ var kn = class extends HTMLElement {
3234
3331
  static get observedAttributes() {
3235
3332
  return [
3236
3333
  "heading",
@@ -3354,19 +3451,19 @@ var On = class extends HTMLElement {
3354
3451
  this.dispatchEvent(i) && (n && window.history.length > 1 ? window.history.back() : window.location.href = this.getFallbackHref());
3355
3452
  }
3356
3453
  };
3357
- typeof customElements < "u" && !customElements.get("mint-page") && a("mint-page", On);
3454
+ typeof customElements < "u" && !customElements.get("mint-page") && a("mint-page", kn);
3358
3455
  //#endregion
3359
3456
  //#region src/components/grid/Grid.js
3360
- var kn = class extends HTMLElement {
3457
+ var An = class extends HTMLElement {
3361
3458
  constructor() {
3362
3459
  super();
3363
3460
  }
3364
3461
  };
3365
- typeof customElements < "u" && !customElements.get("mint-grid") && a("mint-grid", kn);
3462
+ typeof customElements < "u" && !customElements.get("mint-grid") && a("mint-grid", An);
3366
3463
  //#endregion
3367
3464
  //#region src/components/modal/Modal.js
3368
3465
  var V = /* @__PURE__ */ new Set(), H = null;
3369
- function An(e) {
3466
+ function jn(e) {
3370
3467
  if (!V.has(e)) {
3371
3468
  if (V.size === 0) {
3372
3469
  let e = document.documentElement;
@@ -3379,7 +3476,7 @@ function An(e) {
3379
3476
  V.add(e);
3380
3477
  }
3381
3478
  }
3382
- function jn(e) {
3479
+ function Mn(e) {
3383
3480
  if (!V.delete(e) || V.size > 0 || !H) return;
3384
3481
  let t = H;
3385
3482
  H = null;
@@ -3390,7 +3487,7 @@ function jn(e) {
3390
3487
  behavior: "instant"
3391
3488
  });
3392
3489
  }
3393
- var Mn = class extends HTMLElement {
3490
+ var Nn = class extends HTMLElement {
3394
3491
  static get observedAttributes() {
3395
3492
  return [
3396
3493
  "id",
@@ -3413,7 +3510,7 @@ var Mn = class extends HTMLElement {
3413
3510
  }, document.addEventListener("pointerdown", this._pointerDownHandler, !0);
3414
3511
  }
3415
3512
  disconnectedCallback() {
3416
- jn(this), this._pointerDownHandler &&= (document.removeEventListener("pointerdown", this._pointerDownHandler, !0), null), this._exitTimer &&= (clearTimeout(this._exitTimer), null), this._backdropTimer &&= (clearTimeout(this._backdropTimer), null), this._darkModeObserver &&= (this._darkModeObserver.disconnect(), null);
3513
+ Mn(this), this._pointerDownHandler &&= (document.removeEventListener("pointerdown", this._pointerDownHandler, !0), null), this._exitTimer &&= (clearTimeout(this._exitTimer), null), this._backdropTimer &&= (clearTimeout(this._backdropTimer), null), this._darkModeObserver &&= (this._darkModeObserver.disconnect(), null);
3417
3514
  }
3418
3515
  attributeChangedCallback(e, t, n) {
3419
3516
  t !== n && (e === "open" && n !== null && !this._triggerElement && (this._triggerElement = this._findTriggerElement(), this._triggerPoint = this._findTriggerPoint(this._triggerElement)), this.render());
@@ -3441,7 +3538,7 @@ var Mn = class extends HTMLElement {
3441
3538
  let e = this.getId(), t = this.getHeading(), n = this.isOpen(), r = this.getSize();
3442
3539
  if (e && (this.id = e), this._overlay || (this._overlay = document.createElement("div"), this._overlay.className = "mint-modal-overlay", this._overlay.addEventListener("click", () => this.close()), this.appendChild(this._overlay)), this._modal || (this._modal = document.createElement("div"), this._modal.className = "mint-modal-shell", this.appendChild(this._modal)), n) {
3443
3540
  let e = this._modal.querySelector(".modal-content");
3444
- e || (e = document.createElement("div"), e.className = "modal-content", this._modal.appendChild(e)), this._renderedOpen || (this._renderedOpen = !0, An(this), this._animateEnter());
3541
+ e || (e = document.createElement("div"), e.className = "modal-content", this._modal.appendChild(e)), this._renderedOpen || (this._renderedOpen = !0, jn(this), this._animateEnter());
3445
3542
  } else this._renderedOpen && (this._renderedOpen = !1, this._animateExit());
3446
3543
  let i = this._modal.querySelector(".modal-content");
3447
3544
  i || (i = document.createElement("div"), i.className = "modal-content", this._modal.appendChild(i)), i.classList.remove("modal-content--small", "modal-content--large"), r !== "default" && i.classList.add(`modal-content--${r}`), this._header || (this._header = document.createElement("div"), this._header.className = "mint-modal-header", i.appendChild(this._header)), this._headingSlot || (this._headingSlot = document.createElement("div"), this._headingSlot.className = "mint-modal-heading", this._headingSlot.setAttribute("slot", "heading"), this._header.appendChild(this._headingSlot));
@@ -3516,15 +3613,15 @@ var Mn = class extends HTMLElement {
3516
3613
  this.classList.remove("mint-modal-open"), this._backdropTimer &&= (clearTimeout(this._backdropTimer), null);
3517
3614
  let e = this._modal?.querySelector(".modal-content");
3518
3615
  if (!e) {
3519
- this.classList.add("mint-hidden"), this.classList.remove("mint-modal-closing"), jn(this);
3616
+ this.classList.add("mint-hidden"), this.classList.remove("mint-modal-closing"), Mn(this);
3520
3617
  return;
3521
3618
  }
3522
3619
  this._exitTimer && clearTimeout(this._exitTimer), this.classList.add("mint-modal-closing"), e.style.transition = "opacity 200ms ease-in", e.style.opacity = "0", this._exitTimer = setTimeout(() => {
3523
- this._exitTimer = null, !this.isOpen() && (this.classList.add("mint-hidden"), this.classList.remove("mint-modal-closing"), e.style.transform = "", e.style.opacity = "", e.style.transition = "", jn(this));
3620
+ this._exitTimer = null, !this.isOpen() && (this.classList.add("mint-hidden"), this.classList.remove("mint-modal-closing"), e.style.transform = "", e.style.opacity = "", e.style.transition = "", Mn(this));
3524
3621
  }, 200);
3525
3622
  }
3526
3623
  };
3527
- typeof customElements < "u" && !customElements.get("mint-modal") && a("mint-modal", Mn), s({
3624
+ typeof customElements < "u" && !customElements.get("mint-modal") && a("mint-modal", Nn), s({
3528
3625
  name: "check",
3529
3626
  viewBox: "0 0 24 24",
3530
3627
  path: "M5 13l4 4L19 7",
@@ -3534,7 +3631,7 @@ typeof customElements < "u" && !customElements.get("mint-modal") && a("mint-moda
3534
3631
  });
3535
3632
  //#endregion
3536
3633
  //#region src/components/checkbox/Checkbox.js
3537
- var Nn = class extends HTMLElement {
3634
+ var Pn = class extends HTMLElement {
3538
3635
  static get observedAttributes() {
3539
3636
  return [
3540
3637
  "checked",
@@ -3711,10 +3808,10 @@ var Nn = class extends HTMLElement {
3711
3808
  }
3712
3809
  }
3713
3810
  };
3714
- typeof customElements < "u" && !customElements.get("mint-checkbox") && a("mint-checkbox", Nn);
3811
+ typeof customElements < "u" && !customElements.get("mint-checkbox") && a("mint-checkbox", Pn);
3715
3812
  //#endregion
3716
3813
  //#region src/components/choice/Choice.js
3717
- var Pn = class extends HTMLElement {
3814
+ var Fn = class extends HTMLElement {
3718
3815
  static get observedAttributes() {
3719
3816
  return [
3720
3817
  "checked",
@@ -3984,7 +4081,7 @@ var Pn = class extends HTMLElement {
3984
4081
  this.dispatchEvent(t);
3985
4082
  }
3986
4083
  }
3987
- }, Fn = class extends HTMLElement {
4084
+ }, In = class extends HTMLElement {
3988
4085
  static get observedAttributes() {
3989
4086
  return [
3990
4087
  "value",
@@ -4019,10 +4116,10 @@ var Pn = class extends HTMLElement {
4019
4116
  r || (r = document.createElement("span"), r.className = "mint-choice-option-label", n.appendChild(r)), r.textContent = this._labelText;
4020
4117
  }
4021
4118
  };
4022
- typeof customElements < "u" && !customElements.get("mint-choice") && a("mint-choice", Pn), typeof customElements < "u" && !customElements.get("mint-choice-option") && a("mint-choice-option", Fn);
4119
+ typeof customElements < "u" && !customElements.get("mint-choice") && a("mint-choice", Fn), typeof customElements < "u" && !customElements.get("mint-choice-option") && a("mint-choice-option", In);
4023
4120
  //#endregion
4024
4121
  //#region src/components/navigation/Navigation.js
4025
- var In = 0, Ln = class extends HTMLElement {
4122
+ var Ln = 0, Rn = class extends HTMLElement {
4026
4123
  static get observedAttributes() {
4027
4124
  return [
4028
4125
  "brand",
@@ -4034,7 +4131,7 @@ var In = 0, Ln = class extends HTMLElement {
4034
4131
  ];
4035
4132
  }
4036
4133
  constructor() {
4037
- super(), this._built = !1, this._brand = null, this._brandLink = null, this._leadingActions = null, this._items = null, this._toggle = null, this._toggleLabel = null, this._mobileActions = null, this._mobileActionNodes = [], this._instanceId = ++In, this._dropdowns = [], this._content = null, this._actions = null, this._activeDropdown = null, this._layoutObserver = null;
4134
+ super(), this._built = !1, this._brand = null, this._brandLink = null, this._leadingActions = null, this._items = null, this._toggle = null, this._toggleLabel = null, this._mobileActions = null, this._mobileActionNodes = [], this._instanceId = ++Ln, this._dropdowns = [], this._content = null, this._actions = null, this._activeDropdown = null, this._layoutObserver = null;
4038
4135
  }
4039
4136
  connectedCallback() {
4040
4137
  this._built || this._build(), this._observeDropdowns(), this._syncResponsiveDropdowns(), this._syncMobileActions(), typeof ResizeObserver < "u" && (this._layoutObserver = new ResizeObserver(() => {
@@ -4194,7 +4291,7 @@ var In = 0, Ln = class extends HTMLElement {
4194
4291
  this.hasAttribute("open") ? this.closeMenu() : this.openMenu();
4195
4292
  }
4196
4293
  };
4197
- typeof customElements < "u" && !customElements.get("mint-navigation") && a("mint-navigation", Ln), s({
4294
+ typeof customElements < "u" && !customElements.get("mint-navigation") && a("mint-navigation", Rn), s({
4198
4295
  name: "info",
4199
4296
  viewBox: "0 0 24 24",
4200
4297
  path: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",
@@ -4228,7 +4325,7 @@ typeof customElements < "u" && !customElements.get("mint-navigation") && a("mint
4228
4325
  });
4229
4326
  //#endregion
4230
4327
  //#region src/components/alert/Alert.ts
4231
- var Rn = class extends HTMLElement {
4328
+ var zn = class extends HTMLElement {
4232
4329
  static get observedAttributes() {
4233
4330
  return [
4234
4331
  "heading",
@@ -4338,10 +4435,10 @@ var Rn = class extends HTMLElement {
4338
4435
  }
4339
4436
  }
4340
4437
  };
4341
- customElements.get("mint-alert") || a("mint-alert", Rn);
4438
+ customElements.get("mint-alert") || a("mint-alert", zn);
4342
4439
  //#endregion
4343
4440
  //#region src/components/bottom-navigation/BottomNavigation.ts
4344
- var zn = class extends HTMLElement {
4441
+ var Bn = class extends HTMLElement {
4345
4442
  constructor(...e) {
4346
4443
  super(...e), this._lastScrollY = 0, this._scrollHandler = null;
4347
4444
  }
@@ -4366,10 +4463,10 @@ var zn = class extends HTMLElement {
4366
4463
  this._scrollHandler &&= (window.removeEventListener("scroll", this._scrollHandler), null);
4367
4464
  }
4368
4465
  };
4369
- customElements.get("mint-bottom-navigation") || a("mint-bottom-navigation", zn);
4466
+ customElements.get("mint-bottom-navigation") || a("mint-bottom-navigation", Bn);
4370
4467
  //#endregion
4371
4468
  //#region src/components/bottom-navigation/BottomNavItem.ts
4372
- var Bn = class extends HTMLElement {
4469
+ var Vn = class extends HTMLElement {
4373
4470
  constructor(...e) {
4374
4471
  super(...e), this._root = null;
4375
4472
  }
@@ -4413,10 +4510,10 @@ var Bn = class extends HTMLElement {
4413
4510
  s.className = "mint-bottom-nav-label", s.textContent = t, i.appendChild(o), i.appendChild(s), this.replaceChildren(i), this._root = i;
4414
4511
  }
4415
4512
  };
4416
- customElements.get("mint-bottom-nav-item") || a("mint-bottom-nav-item", Bn);
4513
+ customElements.get("mint-bottom-nav-item") || a("mint-bottom-nav-item", Vn);
4417
4514
  //#endregion
4418
4515
  //#region src/components/bottom-navigation/index.ts
4419
- var Vn = zn, Hn = class e extends HTMLElement {
4516
+ var Hn = Bn, Un = class e extends HTMLElement {
4420
4517
  static get observedAttributes() {
4421
4518
  return [
4422
4519
  "type",
@@ -5741,10 +5838,10 @@ var Vn = zn, Hn = class e extends HTMLElement {
5741
5838
  });
5742
5839
  }
5743
5840
  };
5744
- customElements.get("mint-chart") || a("mint-chart", Hn);
5841
+ customElements.get("mint-chart") || a("mint-chart", Un);
5745
5842
  //#endregion
5746
5843
  //#region src/components/chip/Chip.ts
5747
- var Un = class extends HTMLElement {
5844
+ var Wn = class extends HTMLElement {
5748
5845
  constructor(...e) {
5749
5846
  super(...e), this._root = null, this._label = null, this._dismissBtn = null, this._clickHandler = null;
5750
5847
  }
@@ -5794,10 +5891,10 @@ var Un = class extends HTMLElement {
5794
5891
  }, e.addEventListener("click", this._clickHandler), this._dismissBtn = e;
5795
5892
  }
5796
5893
  };
5797
- customElements.get("mint-chip") || a("mint-chip", Un);
5894
+ customElements.get("mint-chip") || a("mint-chip", Wn);
5798
5895
  //#endregion
5799
5896
  //#region src/components/clickable/Clickable.ts
5800
- var Wn = class extends HTMLElement {
5897
+ var Gn = class extends HTMLElement {
5801
5898
  constructor(...e) {
5802
5899
  super(...e), this._clickHandler = null, this._keydownHandler = null, this._target = null, this._observer = null, this._managedRole = !1, this._managedTabindex = !1;
5803
5900
  }
@@ -5852,10 +5949,10 @@ var Wn = class extends HTMLElement {
5852
5949
  e === "disabled" && this.isConnected && this._syncTarget();
5853
5950
  }
5854
5951
  };
5855
- customElements.get("mint-clickable") || a("mint-clickable", Wn);
5952
+ customElements.get("mint-clickable") || a("mint-clickable", Gn);
5856
5953
  //#endregion
5857
5954
  //#region src/components/collapsible/Collapsible.ts
5858
- var Gn = class extends HTMLElement {
5955
+ var Kn = class extends HTMLElement {
5859
5956
  static get observedAttributes() {
5860
5957
  return [
5861
5958
  "id",
@@ -6006,10 +6103,10 @@ var Gn = class extends HTMLElement {
6006
6103
  }), this._contentAnimation.onfinish = o;
6007
6104
  }
6008
6105
  };
6009
- customElements.get("mint-collapsible") || a("mint-collapsible", Gn);
6106
+ customElements.get("mint-collapsible") || a("mint-collapsible", Kn);
6010
6107
  //#endregion
6011
6108
  //#region src/components/confirm-action/ConfirmAction.ts
6012
- var Kn = class extends HTMLElement {
6109
+ var qn = class extends HTMLElement {
6013
6110
  constructor(...e) {
6014
6111
  super(...e), this._modal = null, this._actionsFooter = null, this._confirmButton = null, this._cancelButton = null, this._pendingResolve = null, this._modalObserver = null, this._lastAction = null, this._onConfirmClick = null, this._onCancelClick = null;
6015
6112
  }
@@ -6056,11 +6153,11 @@ var Kn = class extends HTMLElement {
6056
6153
  }));
6057
6154
  }
6058
6155
  };
6059
- customElements.get("mint-confirm-action") || a("mint-confirm-action", Kn);
6156
+ customElements.get("mint-confirm-action") || a("mint-confirm-action", qn);
6060
6157
  //#endregion
6061
6158
  //#region src/components/confirm-action/ConfirmActionApi.ts
6062
- var qn = [], Jn = !1;
6063
- function Yn() {
6159
+ var Jn = [], Yn = !1;
6160
+ function Xn() {
6064
6161
  return typeof document > "u" || document.body ? Promise.resolve() : new Promise((e) => {
6065
6162
  if (typeof window > "u") {
6066
6163
  e();
@@ -6069,48 +6166,48 @@ function Yn() {
6069
6166
  window.addEventListener("DOMContentLoaded", () => e(), { once: !0 });
6070
6167
  });
6071
6168
  }
6072
- async function Xn() {
6073
- if (await Yn(), typeof document > "u") throw Error("mintui.confirm is only available in browser environments.");
6169
+ async function Zn() {
6170
+ if (await Xn(), typeof document > "u") throw Error("mintui.confirm is only available in browser environments.");
6074
6171
  let e = document.querySelector("mint-confirm-action[data-mint-confirm-action-root=\"true\"]");
6075
6172
  if (e) return e;
6076
6173
  let t = document.createElement("mint-confirm-action");
6077
6174
  return t.setAttribute("data-mint-confirm-action-root", "true"), document.body.appendChild(t), t;
6078
6175
  }
6079
- function Zn(e) {
6176
+ function Qn(e) {
6080
6177
  let t = (e || "action").toString().trim().toLowerCase().replace(/^tone:\s*/, "");
6081
6178
  return t === "action" || t === "info" || t === "warning" || t === "danger" ? t : "action";
6082
6179
  }
6083
- async function Qn() {
6084
- if (!Jn) {
6085
- Jn = !0;
6180
+ async function $n() {
6181
+ if (!Yn) {
6182
+ Yn = !0;
6086
6183
  try {
6087
- for (; qn.length > 0;) {
6088
- let e = qn.shift();
6089
- e && (await (await Xn()).showConfirm({
6184
+ for (; Jn.length > 0;) {
6185
+ let e = Jn.shift();
6186
+ e && (await (await Zn()).showConfirm({
6090
6187
  question: e.question,
6091
- tone: Zn(e.tone),
6188
+ tone: Qn(e.tone),
6092
6189
  confirmLabel: e.confirmLabel || "Confirm",
6093
6190
  cancelLabel: e.cancelLabel || "Cancel"
6094
6191
  }) ? e.confirmed?.() : e.cancelled?.());
6095
6192
  }
6096
6193
  } finally {
6097
- Jn = !1;
6194
+ Yn = !1;
6098
6195
  }
6099
6196
  }
6100
6197
  }
6101
- function $n(e, t, n, r = "action", i = "Confirm", a = "Cancel") {
6102
- typeof window > "u" || (qn.push({
6198
+ function er(e, t, n, r = "action", i = "Confirm", a = "Cancel") {
6199
+ typeof window > "u" || (Jn.push({
6103
6200
  question: e,
6104
6201
  confirmed: t,
6105
6202
  cancelled: n,
6106
6203
  tone: r,
6107
6204
  confirmLabel: i,
6108
6205
  cancelLabel: a
6109
- }), Qn());
6206
+ }), $n());
6110
6207
  }
6111
6208
  if (typeof window < "u") {
6112
6209
  let e = window.mintui || {};
6113
- e.confirm = $n, window.mintui = e;
6210
+ e.confirm = er, window.mintui = e;
6114
6211
  }
6115
6212
  s({
6116
6213
  name: "calendar",
@@ -6145,7 +6242,7 @@ s({
6145
6242
  });
6146
6243
  //#endregion
6147
6244
  //#region src/components/input/Input.ts
6148
- var er = class extends HTMLElement {
6245
+ var tr = class extends HTMLElement {
6149
6246
  static get observedAttributes() {
6150
6247
  return [
6151
6248
  "type",
@@ -6545,10 +6642,10 @@ var er = class extends HTMLElement {
6545
6642
  }
6546
6643
  }
6547
6644
  };
6548
- customElements.get("mint-input") || a("mint-input", er);
6645
+ customElements.get("mint-input") || a("mint-input", tr);
6549
6646
  //#endregion
6550
6647
  //#region src/components/date-picker/DatePicker.ts
6551
- var tr = class extends HTMLElement {
6648
+ var nr = class extends HTMLElement {
6552
6649
  static get observedAttributes() {
6553
6650
  return [
6554
6651
  "value",
@@ -7824,10 +7921,10 @@ var tr = class extends HTMLElement {
7824
7921
  this._focusTrapHandler &&= (document.removeEventListener("keydown", this._focusTrapHandler, !0), null), this._escapeHandler &&= (document.removeEventListener("keydown", this._escapeHandler, !0), null);
7825
7922
  }
7826
7923
  };
7827
- customElements.get("mint-date-picker") || a("mint-date-picker", tr);
7924
+ customElements.get("mint-date-picker") || a("mint-date-picker", nr);
7828
7925
  //#endregion
7829
7926
  //#region src/components/time-picker/TimePicker.ts
7830
- var nr = class extends HTMLElement {
7927
+ var rr = class extends HTMLElement {
7831
7928
  constructor(...e) {
7832
7929
  super(...e), this._triggerId = `mint-time-picker-trigger-${Math.random().toString(36).slice(2, 10)}`, this._popover = null, this._popoverObserver = null, this._triggerClickObserver = null, this._inputEl = null, this._hiddenInput = null, this._prependSlotNodes = [], this._appendSlotNodes = [], this._slotObserver = null, this._single = {
7833
7930
  hour: 9,
@@ -8193,10 +8290,10 @@ var nr = class extends HTMLElement {
8193
8290
  this._prependSlotNodes = e.filter((e) => e.getAttribute("slot") === "prepend"), this._appendSlotNodes = e.filter((e) => e.getAttribute("slot") === "append");
8194
8291
  }
8195
8292
  };
8196
- customElements.get("mint-time-picker") || a("mint-time-picker", nr);
8293
+ customElements.get("mint-time-picker") || a("mint-time-picker", rr);
8197
8294
  //#endregion
8198
8295
  //#region src/components/datetime-picker/DateTimePicker.ts
8199
- var rr = class extends HTMLElement {
8296
+ var ir = class extends HTMLElement {
8200
8297
  constructor(...e) {
8201
8298
  super(...e), this._datePicker = null, this._timePicker = null, this._content = null, this._popoverContent = null, this._popoverObserver = null, this._hiddenInput = null, this._dateValue = "", this._timeValue = "", this._dateStageComplete = !1, this._ready = !1, this._writingValue = !1, this._displayControlBound = !1, this._prependSlotNodes = [], this._appendSlotNodes = [], this._slotObserver = null;
8202
8299
  }
@@ -8449,7 +8546,7 @@ var rr = class extends HTMLElement {
8449
8546
  ].filter(Boolean).join(":")} ${i >= 12 ? "pm" : "am"}`;
8450
8547
  }
8451
8548
  };
8452
- customElements.get("mint-datetime-picker") || a("mint-datetime-picker", rr), s({
8549
+ customElements.get("mint-datetime-picker") || a("mint-datetime-picker", ir), s({
8453
8550
  name: "upload",
8454
8551
  viewBox: "0 0 24 24",
8455
8552
  path: "M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12",
@@ -8464,7 +8561,7 @@ customElements.get("mint-datetime-picker") || a("mint-datetime-picker", rr), s({
8464
8561
  });
8465
8562
  //#endregion
8466
8563
  //#region src/components/dropzone/Dropzone.ts
8467
- var ir = class extends HTMLElement {
8564
+ var ar = class extends HTMLElement {
8468
8565
  static get observedAttributes() {
8469
8566
  return [
8470
8567
  "label",
@@ -8879,10 +8976,10 @@ var ir = class extends HTMLElement {
8879
8976
  return this._selectedFiles.some((t) => t.name === e.name && t.size === e.size && t.lastModified === e.lastModified);
8880
8977
  }
8881
8978
  };
8882
- customElements.get("mint-dropzone") || a("mint-dropzone", ir);
8979
+ customElements.get("mint-dropzone") || a("mint-dropzone", ar);
8883
8980
  //#endregion
8884
8981
  //#region src/components/form/Form.ts
8885
- var ar = class extends HTMLElement {
8982
+ var or = class extends HTMLElement {
8886
8983
  static get observedAttributes() {
8887
8984
  return [
8888
8985
  "action",
@@ -8987,31 +9084,35 @@ var ar = class extends HTMLElement {
8987
9084
  let e = this.getAttribute("action") || "", t = this.getAttribute("method") || "", n = this.getAttribute("enctype") || "application/x-www-form-urlencoded";
8988
9085
  e && (this._form.action = e), t && (this._form.method = t), this._form.enctype = n;
8989
9086
  }
8990
- async _handleSubmit(e) {
8991
- if (e.preventDefault(), !this._form) return;
9087
+ validate() {
9088
+ if (!this._form) return !1;
8992
9089
  this._clearErrors(), this._syncDropzoneFiles();
8993
- let t = this._collectValidationRules(), n = new FormData(this._form), r = this._formDataToValues(n);
9090
+ let e = new FormData(this._form), t = this._validate(this._collectCurrentValues(e), this._collectValidationRules());
9091
+ return t || this._dispatchInvalidEvent(), t;
9092
+ }
9093
+ _collectCurrentValues(e) {
9094
+ let t = this._formDataToValues(e);
8994
9095
  if (this._formData) {
8995
9096
  let e = this._getObjectValue(this._formData);
8996
- e && typeof e == "object" && !Array.isArray(e) && (r = {
9097
+ e && typeof e == "object" && !Array.isArray(e) && (t = {
8997
9098
  ...this._extractReactiveData(e),
8998
- ...r
9099
+ ...t
8999
9100
  });
9000
9101
  }
9001
- let i = this._collectLiveControlValues();
9002
- if (r = {
9003
- ...r,
9004
- ...i
9005
- }, !this._validate(r, t)) {
9006
- this.dispatchEvent(new CustomEvent("invalid", {
9007
- detail: { errors: this._errors },
9008
- bubbles: !0,
9009
- cancelable: !0,
9010
- composed: !0
9011
- }));
9102
+ return {
9103
+ ...t,
9104
+ ...this._collectLiveControlValues()
9105
+ };
9106
+ }
9107
+ async _handleSubmit(e) {
9108
+ if (e.preventDefault(), !this._form) return;
9109
+ this._clearErrors(), this._syncDropzoneFiles();
9110
+ let t = this._collectValidationRules(), n = new FormData(this._form), r = this._collectCurrentValues(n);
9111
+ if (!this._validate(r, t)) {
9112
+ this._dispatchInvalidEvent();
9012
9113
  return;
9013
9114
  }
9014
- let a = new CustomEvent("submit", {
9115
+ let i = new CustomEvent("submit", {
9015
9116
  detail: {
9016
9117
  formData: n,
9017
9118
  values: r,
@@ -9021,8 +9122,8 @@ var ar = class extends HTMLElement {
9021
9122
  cancelable: !0,
9022
9123
  composed: !0
9023
9124
  });
9024
- this.dispatchEvent(a), a.form = this;
9025
- let o = new CustomEvent("mintFormSubmit", {
9125
+ this.dispatchEvent(i), i.form = this;
9126
+ let a = new CustomEvent("mintFormSubmit", {
9026
9127
  detail: {
9027
9128
  formData: n,
9028
9129
  values: r,
@@ -9032,9 +9133,9 @@ var ar = class extends HTMLElement {
9032
9133
  cancelable: !0,
9033
9134
  composed: !0
9034
9135
  });
9035
- if (o.form = this, this.dispatchEvent(o), a.defaultPrevented || o.defaultPrevented) return;
9036
- let s = this.getAttribute("action"), c = this.getAttribute("method");
9037
- if (!(!s || !c)) {
9136
+ if (a.form = this, this.dispatchEvent(a), i.defaultPrevented || a.defaultPrevented) return;
9137
+ let o = this.getAttribute("action"), s = this.getAttribute("method");
9138
+ if (!(!o || !s)) {
9038
9139
  this._setButtonsSubmitting();
9039
9140
  try {
9040
9141
  let e = await this._submitData(n, r);
@@ -9245,7 +9346,8 @@ var ar = class extends HTMLElement {
9245
9346
  "mint-checkbox[name]",
9246
9347
  "mint-choice[name]",
9247
9348
  "mint-switch[name]",
9248
- "mint-tags[name]"
9349
+ "mint-tags[name]",
9350
+ "mint-editor[name]"
9249
9351
  ].join(",")));
9250
9352
  for (let e of n) {
9251
9353
  let n = e.getAttribute("name");
@@ -9287,7 +9389,7 @@ var ar = class extends HTMLElement {
9287
9389
  return this._errors = {}, Object.entries(t || {}).forEach(([e, t]) => {
9288
9390
  let r = Array.isArray(t) ? t : [t], i = this._getFieldElements(e), a = this._extractFieldValue(i), o = this._validateRules(a, r);
9289
9391
  o ? (n = !1, this._errors[e] = o, this._flagFieldError(i, o)) : this._clearFieldError(i);
9290
- }), n || this._scrollToFirstError(), n;
9392
+ }), n;
9291
9393
  }
9292
9394
  _validateField(e) {
9293
9395
  let t = this._collectValidationRules();
@@ -9464,23 +9566,27 @@ var ar = class extends HTMLElement {
9464
9566
  this._clearErrors(), Object.entries(e).forEach(([e, t]) => {
9465
9567
  let n = Array.isArray(t) ? t[0] || "Validation error" : t || "Validation error", r = this._getFieldElements(e);
9466
9568
  r.length > 0 && (this._errors[e] = n, this._flagFieldError(r, n));
9467
- }), this._scrollToFirstError();
9569
+ }), Object.keys(this._errors).length > 0 && this._dispatchInvalidEvent();
9468
9570
  }
9469
- _scrollToFirstError() {
9470
- let e = this.querySelector("[data-mint-form-error]");
9471
- e && requestAnimationFrame(() => {
9472
- let t = this._resolveHost(e) || e;
9473
- t.scrollIntoView({
9571
+ _dispatchInvalidEvent() {
9572
+ let e = new CustomEvent("invalid", {
9573
+ detail: { errors: this._errors },
9574
+ bubbles: !0,
9575
+ cancelable: !0,
9576
+ composed: !0
9577
+ });
9578
+ this.dispatchEvent(e), e.defaultPrevented || this._scrollToFirstInvalid();
9579
+ }
9580
+ _scrollToFirstInvalid() {
9581
+ let e = this.querySelector("[data-mint-form-error=\"true\"]");
9582
+ if (!e) return;
9583
+ let t = e.closest("mint-input, mint-select, mint-date-picker, mint-datetime-picker, mint-time-picker, mint-dropzone, mint-checkbox, mint-choice, mint-switch, mint-tags, mint-editor") ?? e;
9584
+ requestAnimationFrame(() => {
9585
+ t.isConnected && t.scrollIntoView({
9474
9586
  behavior: "smooth",
9475
9587
  block: "center",
9476
9588
  inline: "nearest"
9477
9589
  });
9478
- let n = t.matches("input,textarea,select,button,[tabindex]") ? t : t.querySelector("input,textarea,select,button,[tabindex]") || t;
9479
- try {
9480
- n.focus({ preventScroll: !0 });
9481
- } catch {
9482
- n.focus();
9483
- }
9484
9590
  });
9485
9591
  }
9486
9592
  _parseFormData(e) {
@@ -9556,7 +9662,7 @@ var ar = class extends HTMLElement {
9556
9662
  e.forEach((e) => {
9557
9663
  let r = e.tagName;
9558
9664
  try {
9559
- if (r === "MINT-INPUT") e.value !== void 0 && (e.value = n || "");
9665
+ if (r === "MINT-INPUT" || r === "MINT-EDITOR") e.value !== void 0 && (e.value = n || "");
9560
9666
  else if (r === "MINT-DATE-PICKER") typeof e.setValue == "function" && e.setValue(n || "");
9561
9667
  else if (r === "MINT-TIME-PICKER") typeof e.setValue == "function" ? e.setValue(n == null ? "" : String(n)) : e.value !== void 0 && (e.value = n == null ? "" : String(n));
9562
9668
  else if (r === "MINT-SELECT" || r === "SELECT") if (r === "SELECT") {
@@ -9625,12 +9731,15 @@ var ar = class extends HTMLElement {
9625
9731
  });
9626
9732
  }
9627
9733
  _resetCustomFields() {
9628
- this.querySelectorAll("mint-input, mint-date-picker, mint-datetime-picker, mint-time-picker, mint-select, mint-dropzone, mint-checkbox, mint-choice, mint-switch, mint-tags").forEach((e) => {
9734
+ this.querySelectorAll("mint-input, mint-date-picker, mint-datetime-picker, mint-time-picker, mint-select, mint-dropzone, mint-checkbox, mint-choice, mint-switch, mint-tags, mint-editor").forEach((e) => {
9629
9735
  e.removeAttribute("error"), e.removeAttribute("error-message");
9630
9736
  let t = e.tagName;
9631
9737
  if (t === "MINT-INPUT") try {
9632
9738
  e.value = "";
9633
9739
  } catch {}
9740
+ else if (t === "MINT-EDITOR") try {
9741
+ e.value = "";
9742
+ } catch {}
9634
9743
  else if (t === "MINT-DATE-PICKER") try {
9635
9744
  e.setValue?.("");
9636
9745
  } catch {}
@@ -9663,7 +9772,7 @@ var ar = class extends HTMLElement {
9663
9772
  let t = e.closest("mint-choice");
9664
9773
  if (t) return t;
9665
9774
  }
9666
- return e.closest("mint-input, mint-date-picker, mint-datetime-picker, mint-select, mint-dropzone, mint-checkbox, mint-choice, mint-switch, mint-tags") || e;
9775
+ return e.closest("mint-input, mint-date-picker, mint-datetime-picker, mint-select, mint-dropzone, mint-checkbox, mint-choice, mint-switch, mint-tags, mint-editor") || e;
9667
9776
  }
9668
9777
  _setupBlurValidation() {
9669
9778
  if (!this._form) return;
@@ -9733,7 +9842,7 @@ var ar = class extends HTMLElement {
9733
9842
  this._form.addEventListener("change", t, !0), this._form.addEventListener("input", t, !0), this._form.addEventListener("tags-change", t, !0), this._form.addEventListener("choice-change", t, !0), this._fieldChangeHandlers.set(this._form, t);
9734
9843
  }
9735
9844
  _findFieldElement(e) {
9736
- let t = e.closest("mint-input, mint-date-picker, mint-datetime-picker, mint-select, mint-dropzone, mint-checkbox, mint-choice, mint-switch, mint-tags");
9845
+ let t = e.closest("mint-input, mint-date-picker, mint-datetime-picker, mint-select, mint-dropzone, mint-checkbox, mint-choice, mint-switch, mint-tags, mint-editor");
9737
9846
  if (t && t.hasAttribute("name")) return t;
9738
9847
  if (e.hasAttribute("name") && (e.tagName.startsWith("MINT-") || e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement) || (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement) && e.hasAttribute("name")) return e;
9739
9848
  let n = e;
@@ -9924,7 +10033,7 @@ var ar = class extends HTMLElement {
9924
10033
  this._reactiveDataObserver !== null && (cancelAnimationFrame(this._reactiveDataObserver), this._reactiveDataObserver = null), this._reactiveDataProxy = null, this._lastDataSnapshot = null, this._lastAppliedDataSnapshot = null;
9925
10034
  }
9926
10035
  };
9927
- customElements.get("mint-form") || a("mint-form", ar), typeof window < "u" && (window.mintForm = window.mintForm || {
10036
+ customElements.get("mint-form") || a("mint-form", or), typeof window < "u" && (window.mintForm = window.mintForm || {
9928
10037
  defaults: { headers: { common: {} } },
9929
10038
  interceptors: { response: { handlers: [] } }
9930
10039
  }, window.mintForm.interceptors.response.use || (window.mintForm.interceptors.response.use = function(e, t) {
@@ -9935,7 +10044,7 @@ customElements.get("mint-form") || a("mint-form", ar), typeof window < "u" && (w
9935
10044
  }));
9936
10045
  //#endregion
9937
10046
  //#region src/components/off-canvas/OffCanvas.ts
9938
- var or = class extends HTMLElement {
10047
+ var sr = class extends HTMLElement {
9939
10048
  static get observedAttributes() {
9940
10049
  return [
9941
10050
  "id",
@@ -10036,7 +10145,7 @@ var or = class extends HTMLElement {
10036
10145
  !this._offCanvas || !this._overlay || (this._offCanvas.classList.toggle("mint-off-canvas-open", e), this._overlay.classList.toggle("mint-off-canvas-open", e), this._overlay.classList.toggle("mint-off-canvas-hidden", !e));
10037
10146
  }
10038
10147
  };
10039
- customElements.get("mint-off-canvas") || a("mint-off-canvas", or), s({
10148
+ customElements.get("mint-off-canvas") || a("mint-off-canvas", sr), s({
10040
10149
  name: "search",
10041
10150
  viewBox: "0 0 24 24",
10042
10151
  path: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z",
@@ -10045,7 +10154,7 @@ customElements.get("mint-off-canvas") || a("mint-off-canvas", or), s({
10045
10154
  });
10046
10155
  //#endregion
10047
10156
  //#region src/components/resource-table/utility-aliases.js
10048
- var sr = {
10157
+ var cr = {
10049
10158
  "-mr-1": "rtu-8956a4275",
10050
10159
  "-translate-y-1/2": "rtu-36b381be4",
10051
10160
  "[&>*]:m-0": "rtu-7b41b3d11",
@@ -10204,7 +10313,7 @@ var sr = {
10204
10313
  "z-10": "rtu-236812d64",
10205
10314
  "z-20": "rtu-145745bf5",
10206
10315
  "z-30": "rtu-0f2fff0ae"
10207
- }, cr = class extends HTMLElement {
10316
+ }, lr = class extends HTMLElement {
10208
10317
  constructor(...e) {
10209
10318
  super(...e), this._observer = null, this._disposeScrollFade = null;
10210
10319
  }
@@ -10266,10 +10375,10 @@ var sr = {
10266
10375
  e.dataset.mtProcessed = "", e.innerHTML = n, Object.entries(t).forEach(([t, n]) => e.setAttribute(t, n));
10267
10376
  }
10268
10377
  };
10269
- customElements.get("mint-table") || a("mint-table", cr);
10378
+ customElements.get("mint-table") || a("mint-table", lr);
10270
10379
  //#endregion
10271
10380
  //#region src/components/select/NativeSelect.ts
10272
- var U = "data-mint-native-select-part", lr = class extends HTMLElement {
10381
+ var U = "data-mint-native-select-part", ur = class extends HTMLElement {
10273
10382
  static get observedAttributes() {
10274
10383
  return [
10275
10384
  "name",
@@ -10550,10 +10659,10 @@ var U = "data-mint-native-select-part", lr = class extends HTMLElement {
10550
10659
  n && (n.id = `${e}-info`, t.push(n.id)), r && (r.id = `${e}-error`, t.push(r.id)), t.length ? this._select.setAttribute("aria-describedby", Array.from(new Set(t)).join(" ")) : this._select.removeAttribute("aria-describedby");
10551
10660
  }
10552
10661
  };
10553
- customElements.get("mint-native-select") || a("mint-native-select", lr);
10662
+ customElements.get("mint-native-select") || a("mint-native-select", ur);
10554
10663
  //#endregion
10555
10664
  //#region src/components/select/Select.ts
10556
- var W = "data-mint-select-part", ur = class extends HTMLElement {
10665
+ var W = "data-mint-select-part", dr = class extends HTMLElement {
10557
10666
  constructor(...e) {
10558
10667
  super(...e), this._native = null, this._trigger = null, this._popover = null, this._list = null, this._prependNodes = [], this._appendNodes = [], this._observer = null, this._syncing = !1, this._typeahead = "", this._typeaheadTimer = null, this._pointerSelectedOption = null, this._id = `mint-select-${Math.random().toString(36).slice(2, 10)}`;
10559
10668
  }
@@ -10876,10 +10985,10 @@ var W = "data-mint-select-part", ur = class extends HTMLElement {
10876
10985
  t && (this._popover?.hasAttribute("open") || this.openPopover(), t.focus());
10877
10986
  }
10878
10987
  };
10879
- customElements.get("mint-select") || a("mint-select", ur);
10988
+ customElements.get("mint-select") || a("mint-select", dr);
10880
10989
  //#endregion
10881
10990
  //#region src/components/resource-table/ResourceTable.ts
10882
- var dr = class extends HTMLElement {
10991
+ var fr = class extends HTMLElement {
10883
10992
  static get observedAttributes() {
10884
10993
  return [
10885
10994
  "configuration",
@@ -11938,7 +12047,7 @@ var dr = class extends HTMLElement {
11938
12047
  return e.class && n.push(e.class.trim()), e.align === "center" ? n.push("text-center") : e.align === "right" && n.push("text-right"), e.sortable && !t && n.push("cursor-pointer"), e.stickLeft && n.push("sticky-left"), e.stickRight && n.push("sticky-right"), n.join(" ");
11939
12048
  }
11940
12049
  _replaceUtilityClasses() {
11941
- let e = sr, t = [this, ...Array.from(this.querySelectorAll("[class]"))];
12050
+ let e = cr, t = [this, ...Array.from(this.querySelectorAll("[class]"))];
11942
12051
  for (let n of t) for (let t of Array.from(n.classList)) {
11943
12052
  let r = e[t];
11944
12053
  r && n.classList.replace(t, r);
@@ -12202,10 +12311,10 @@ var dr = class extends HTMLElement {
12202
12311
  e !== null && (this._currentPage = e, this._offset = (this._currentPage - 1) * this._perPage);
12203
12312
  }
12204
12313
  };
12205
- customElements.get("mint-resource-table") || a("mint-resource-table", dr);
12314
+ customElements.get("mint-resource-table") || a("mint-resource-table", fr);
12206
12315
  //#endregion
12207
12316
  //#region src/components/resource-table/ResourceTableContextMenu.ts
12208
- var fr = 550, pr = 12, mr = { passive: !0 }, hr = class extends HTMLElement {
12317
+ var pr = 550, mr = 12, hr = { passive: !0 }, gr = class extends HTMLElement {
12209
12318
  constructor(...e) {
12210
12319
  super(...e), this._table = null, this._anchor = null, this._popover = null, this._menuRoot = null, this._baseId = "", this._touchTimer = null, this._touchStart = null, this._slotObserver = null, this._scrollCloseTargets = [], this._onScrollClose = () => {
12211
12320
  this._closePopover();
@@ -12232,7 +12341,7 @@ var fr = 550, pr = 12, mr = { passive: !0 }, hr = class extends HTMLElement {
12232
12341
  let t = e.touches[0];
12233
12342
  if (!t) return;
12234
12343
  let n = t.clientX - this._touchStart.x, r = t.clientY - this._touchStart.y;
12235
- n * n + r * r > pr * pr && (this._clearTouchTimer(), this._touchStart = null);
12344
+ n * n + r * r > mr * mr && (this._clearTouchTimer(), this._touchStart = null);
12236
12345
  }, this._onTouchEnd = () => {
12237
12346
  this._clearTouchTimer(), this._touchStart = null;
12238
12347
  };
@@ -12255,7 +12364,7 @@ var fr = 550, pr = 12, mr = { passive: !0 }, hr = class extends HTMLElement {
12255
12364
  }
12256
12365
  _longPressMs() {
12257
12366
  let e = parseInt(this.getAttribute("long-press-ms") || "", 10);
12258
- return !Number.isNaN(e) && e > 100 ? e : fr;
12367
+ return !Number.isNaN(e) && e > 100 ? e : pr;
12259
12368
  }
12260
12369
  _resolveTable() {
12261
12370
  let e = this.getAttribute("for")?.trim();
@@ -12309,12 +12418,12 @@ var fr = 550, pr = 12, mr = { passive: !0 }, hr = class extends HTMLElement {
12309
12418
  return this._elementIsScrollContainer(e) && r(e), t;
12310
12419
  }
12311
12420
  _detachScrollCloseListeners() {
12312
- for (let e of this._scrollCloseTargets) e.removeEventListener("scroll", this._onScrollClose, mr);
12421
+ for (let e of this._scrollCloseTargets) e.removeEventListener("scroll", this._onScrollClose, hr);
12313
12422
  this._scrollCloseTargets = [];
12314
12423
  }
12315
12424
  _attachScrollCloseListeners(e) {
12316
12425
  this._detachScrollCloseListeners(), this._scrollCloseTargets = this._collectScrollCloseTargets(e);
12317
- for (let e of this._scrollCloseTargets) e.addEventListener("scroll", this._onScrollClose, mr);
12426
+ for (let e of this._scrollCloseTargets) e.addEventListener("scroll", this._onScrollClose, hr);
12318
12427
  }
12319
12428
  _closePopover() {
12320
12429
  if (this._detachScrollCloseListeners(), !this._popover?.hasAttribute("open")) return;
@@ -12355,10 +12464,10 @@ var fr = 550, pr = 12, mr = { passive: !0 }, hr = class extends HTMLElement {
12355
12464
  l && this._attachScrollCloseListeners(l);
12356
12465
  }
12357
12466
  };
12358
- customElements.get("mint-resource-table-context-menu") || a("mint-resource-table-context-menu", hr);
12467
+ customElements.get("mint-resource-table-context-menu") || a("mint-resource-table-context-menu", gr);
12359
12468
  //#endregion
12360
12469
  //#region src/components/search/Search.ts
12361
- var gr = class e extends HTMLElement {
12470
+ var _r = class e extends HTMLElement {
12362
12471
  constructor(...e) {
12363
12472
  super(...e), this._shell = null, this._desktopInput = null, this._panel = null, this._panelInner = null, this._resultsId = "", this._panelInput = null, this._panelFiltersWrap = null, this._panelFiltersMainRow = null, this._panelFiltersChips = null, this._panelFiltersShowAllWrap = null, this._panelFiltersShowAllBtn = null, this._panelFiltersMorePanel = null, this._filtersMoreOpen = !1, this._filterOverflowObserver = null, this._filterOverflowZeroWidthRetries = 0, this._resultsWrap = null, this._stateWrap = null, this._customResultsWrap = null, this._query = "", this._searchOpen = !1, this._selectedFilters = [], this._debounceId = null, this._abortController = null, this._docPointerDownHandler = null, this._globalKeydownHandler = null, this._focusOutHandler = null, this._resizeHandler = null, this._scrollHandler = null, this._desktopShortcutHint = null, this._panelSearchBar = null, this._contentObserver = null, this._renderFrame = null;
12364
12473
  }
@@ -12962,10 +13071,10 @@ var gr = class e extends HTMLElement {
12962
13071
  this._shell && this._shell.classList.toggle("is-collapsed", e), this._panelSearchBar && (this._panelSearchBar.classList.toggle("is-hidden", !e), this._panelSearchBar.classList.toggle("is-collapsed", e));
12963
13072
  }
12964
13073
  };
12965
- customElements.get("mint-search") || a("mint-search", gr);
13074
+ customElements.get("mint-search") || a("mint-search", _r);
12966
13075
  //#endregion
12967
13076
  //#region src/components/side-navigation/SideNavigationLink.ts
12968
- var _r = class extends HTMLElement {
13077
+ var vr = class extends HTMLElement {
12969
13078
  constructor(...e) {
12970
13079
  super(...e), this._trigger = null, this._submenuContainer = null, this._contentObserver = null, this._renderFrame = null;
12971
13080
  }
@@ -13099,10 +13208,10 @@ var _r = class extends HTMLElement {
13099
13208
  this._hasSubmenu() && !this._isSubmenuItem() ? this._buildDropdownLink() : this._buildSimpleLink();
13100
13209
  }
13101
13210
  };
13102
- customElements.get("mint-sidenav-link") || a("mint-sidenav-link", _r);
13211
+ customElements.get("mint-sidenav-link") || a("mint-sidenav-link", vr);
13103
13212
  //#endregion
13104
13213
  //#region src/components/side-navigation/SideNavigationLinks.ts
13105
- var vr = class extends HTMLElement {
13214
+ var yr = class extends HTMLElement {
13106
13215
  constructor(...e) {
13107
13216
  super(...e), this._container = null, this._title = null, this._titleLabel = null, this._titleCaret = null, this._titleIsInteractive = null, this._list = null, this._titleClickHandler = null, this._listenerCounts = /* @__PURE__ */ new Map();
13108
13217
  }
@@ -13165,10 +13274,10 @@ var vr = class extends HTMLElement {
13165
13274
  });
13166
13275
  }
13167
13276
  };
13168
- customElements.get("mint-sidenav-links") || a("mint-sidenav-links", vr);
13277
+ customElements.get("mint-sidenav-links") || a("mint-sidenav-links", yr);
13169
13278
  //#endregion
13170
13279
  //#region src/components/side-navigation/SideNavigationActionLinks.ts
13171
- var yr = class extends HTMLElement {
13280
+ var br = class extends HTMLElement {
13172
13281
  static get observedAttributes() {
13173
13282
  return ["separated"];
13174
13283
  }
@@ -13185,10 +13294,10 @@ var yr = class extends HTMLElement {
13185
13294
  this.className = this._isSeparated() ? "mint-sidenav-action-links is-separated" : "mint-sidenav-action-links";
13186
13295
  }
13187
13296
  };
13188
- customElements.get("mint-sidenav-action-links") || a("mint-sidenav-action-links", yr);
13297
+ customElements.get("mint-sidenav-action-links") || a("mint-sidenav-action-links", br);
13189
13298
  //#endregion
13190
13299
  //#region src/components/side-navigation/SideNavigationActionMenu.ts
13191
- var br = class extends HTMLElement {
13300
+ var xr = class extends HTMLElement {
13192
13301
  constructor(...e) {
13193
13302
  super(...e), this._wrapper = null, this._trigger = null, this._popover = null, this._triggerId = "", this._contentObserver = null, this._renderFrame = null;
13194
13303
  }
@@ -13255,15 +13364,15 @@ var br = class extends HTMLElement {
13255
13364
  }) : a.appendChild(this._createDefaultGroup()), this._popover.appendChild(a), this._wrapper.appendChild(this._trigger), this._wrapper.appendChild(this._popover);
13256
13365
  }
13257
13366
  };
13258
- customElements.get("mint-sidenav-action-menu") || a("mint-sidenav-action-menu", br);
13367
+ customElements.get("mint-sidenav-action-menu") || a("mint-sidenav-action-menu", xr);
13259
13368
  //#endregion
13260
13369
  //#region src/components/side-navigation/SideNavigation.ts
13261
- var xr = "mint:url-change";
13262
- function Sr() {
13370
+ var Sr = "mint:url-change";
13371
+ function Cr() {
13263
13372
  if (window.__mintUrlChangePatched) return;
13264
13373
  window.__mintUrlChangePatched = !0;
13265
13374
  let e = () => {
13266
- window.dispatchEvent(new Event(xr));
13375
+ window.dispatchEvent(new Event(Sr));
13267
13376
  }, t = (t) => {
13268
13377
  let n = history[t].bind(history);
13269
13378
  history[t] = ((...t) => {
@@ -13273,7 +13382,7 @@ function Sr() {
13273
13382
  };
13274
13383
  t("pushState"), t("replaceState");
13275
13384
  }
13276
- var Cr = class extends HTMLElement {
13385
+ var wr = class extends HTMLElement {
13277
13386
  constructor(...e) {
13278
13387
  super(...e), this._backdrop = null, this._container = null, this._header = null, this._content = null, this._disposeContentFade = null, this._footer = null, this._escapeHandler = null, this._mediaQuery = null, this._mediaListener = null, this._accordionHandler = null, this._urlChangeHandler = null, this._contentObserver = null, this._renderFrame = null, this._preserveDrawerOnNextUrlChange = !1, this._resetPreserveDrawerTimer = null, this._onNavNavigateClick = (e) => {
13279
13388
  let t = e.target;
@@ -13352,16 +13461,16 @@ var Cr = class extends HTMLElement {
13352
13461
  this._accordionHandler &&= (this.removeEventListener("mint-sidenav-accordion", this._accordionHandler), null);
13353
13462
  }
13354
13463
  _attachUrlChangeListener() {
13355
- this._urlChangeHandler || (Sr(), this._urlChangeHandler = () => {
13464
+ this._urlChangeHandler || (Cr(), this._urlChangeHandler = () => {
13356
13465
  if (this._collapseUnrelatedDropdownsToPath(window.location.pathname), this._preserveDrawerOnNextUrlChange) {
13357
13466
  this._preserveDrawerOnNextUrlChange = !1, this._resetPreserveDrawerTimer !== null && (window.clearTimeout(this._resetPreserveDrawerTimer), this._resetPreserveDrawerTimer = null);
13358
13467
  return;
13359
13468
  }
13360
13469
  !this._mediaQuery?.matches && this._isOpen() && this.removeAttribute("open");
13361
- }, window.addEventListener("popstate", this._urlChangeHandler), window.addEventListener("hashchange", this._urlChangeHandler), window.addEventListener(xr, this._urlChangeHandler));
13470
+ }, window.addEventListener("popstate", this._urlChangeHandler), window.addEventListener("hashchange", this._urlChangeHandler), window.addEventListener(Sr, this._urlChangeHandler));
13362
13471
  }
13363
13472
  _detachUrlChangeListener() {
13364
- this._urlChangeHandler &&= (window.removeEventListener("popstate", this._urlChangeHandler), window.removeEventListener("hashchange", this._urlChangeHandler), window.removeEventListener(xr, this._urlChangeHandler), null);
13473
+ this._urlChangeHandler &&= (window.removeEventListener("popstate", this._urlChangeHandler), window.removeEventListener("hashchange", this._urlChangeHandler), window.removeEventListener(Sr, this._urlChangeHandler), null);
13365
13474
  }
13366
13475
  _observeContentMutations() {
13367
13476
  this._contentObserver ||= new MutationObserver(() => {
@@ -13431,10 +13540,10 @@ var Cr = class extends HTMLElement {
13431
13540
  this._ensureBackdrop(), this._ensureContainer(), this._syncShell(), this._buildUserHeader(), this._buildContent(), this._buildFooter();
13432
13541
  }
13433
13542
  };
13434
- customElements.get("mint-side-navigation") || a("mint-side-navigation", Cr);
13543
+ customElements.get("mint-side-navigation") || a("mint-side-navigation", wr);
13435
13544
  //#endregion
13436
13545
  //#region src/components/side-navigation/index.ts
13437
- var wr = Cr, G = "mint-sortable-placeholder", Tr = "mint-sortable-dragging", Er = class e extends HTMLElement {
13546
+ var Tr = wr, G = "mint-sortable-placeholder", Er = "mint-sortable-dragging", Dr = class e extends HTMLElement {
13438
13547
  static get observedAttributes() {
13439
13548
  return [
13440
13549
  "direction",
@@ -13444,6 +13553,7 @@ var wr = Cr, G = "mint-sortable-placeholder", Tr = "mint-sortable-dragging", Er
13444
13553
  "scroll-max-height",
13445
13554
  "disabled",
13446
13555
  "handle-selector",
13556
+ "drag-threshold",
13447
13557
  "scroll-sensitivity",
13448
13558
  "scroll-speed",
13449
13559
  "animation-duration",
@@ -13452,9 +13562,15 @@ var wr = Cr, G = "mint-sortable-placeholder", Tr = "mint-sortable-dragging", Er
13452
13562
  ];
13453
13563
  }
13454
13564
  constructor() {
13455
- super(), this._pointerId = null, this._dragEl = null, this._dragOriginalStyle = "", this._placeholder = null, this._listRoot = this, this._startIndex = 0, this._pointerStartX = 0, this._pointerStartY = 0, this._pendingPointerEvent = null, this._moveRaf = null, this._gridSlots = [], this._scrollRaf = null, this._previewResizeRaf = null, this._childObserver = null, this._pointerBoundRoot = null, this._restoreAfter = null, this._originListRoot = null, this._originNextSibling = null, this._dropList = null, this._dropAtEnd = !1, this._dropRejected = !1, this._sortStatus = null, this._flipCleanupTimers = /* @__PURE__ */ new WeakMap(), this._lastPreviewRoot = null, this._lastPreviewIndex = -1, this._keyboardKeydownHandler = (e) => this._onKeyboardReorder(e), this._onListPointerDown = (e) => {
13565
+ super(), this._pointerId = null, this._dragEl = null, this._dragOriginalStyle = "", this._placeholder = null, this._listRoot = this, this._startIndex = 0, this._pointerStartX = 0, this._pointerStartY = 0, this._pendingDragStart = null, this._pendingPointerEvent = null, this._moveRaf = null, this._gridSlots = [], this._scrollRaf = null, this._scrollRoot = null, this._lastDragPointer = null, this._previewResizeRaf = null, this._childObserver = null, this._pointerBoundRoot = null, this._restoreAfter = null, this._originListRoot = null, this._originNextSibling = null, this._dropList = null, this._dropAtEnd = !1, this._dropRejected = !1, this._sortStatus = null, this._flipCleanupTimers = /* @__PURE__ */ new WeakMap(), this._lastPreviewRoot = null, this._lastPreviewIndex = -1, this._keyboardKeydownHandler = (e) => this._onKeyboardReorder(e), this._onPendingPointerMove = (e) => {
13566
+ let t = e, n = this._pendingDragStart;
13567
+ !n || t.pointerId !== n.pointerId || Math.hypot(t.clientX - n.clientX, t.clientY - n.clientY) < this._getDragThreshold() || (this._clearPendingDragStart(), t.preventDefault(), this._startDrag(t, n.item));
13568
+ }, this._onPendingPointerEnd = (e) => {
13569
+ let t = e;
13570
+ this._pendingDragStart?.pointerId === t.pointerId && this._clearPendingDragStart();
13571
+ }, this._onListPointerDown = (e) => {
13456
13572
  let t = e;
13457
- if (this._isDisabled() || this._pointerId !== null || t.button !== 0) return;
13573
+ if (this._isDisabled() || this._pointerId !== null || this._pendingDragStart || t.button !== 0) return;
13458
13574
  let n = t.target;
13459
13575
  if (!n || !this.contains(n)) return;
13460
13576
  let r = (n instanceof Element ? n : n.parentElement)?.closest("mint-sortable");
@@ -13466,7 +13582,24 @@ var wr = Cr, G = "mint-sortable-placeholder", Tr = "mint-sortable-dragging", Er
13466
13582
  let e = t.target.closest(a);
13467
13583
  if (!e || !i.contains(e)) return;
13468
13584
  }
13585
+ if (this._getDragThreshold() > 0) {
13586
+ this._pendingDragStart = {
13587
+ pointerId: t.pointerId,
13588
+ item: i,
13589
+ clientX: t.clientX,
13590
+ clientY: t.clientY
13591
+ }, window.addEventListener("pointermove", this._onPendingPointerMove, { passive: !1 }), window.addEventListener("pointerup", this._onPendingPointerEnd), window.addEventListener("pointercancel", this._onPendingPointerEnd);
13592
+ return;
13593
+ }
13469
13594
  t.preventDefault(), this._startDrag(t, i);
13595
+ }, this._runAutoScrollFrame = () => {
13596
+ this._scrollRaf = null;
13597
+ let e = this._scrollRoot, t = this._lastDragPointer;
13598
+ if (!e || !t || !this._dragEl || !this._placeholder) return;
13599
+ let n = this.getDirection(), r = getComputedStyle(e), i = /(auto|scroll)/.test(r.overflowX) && e.scrollWidth > e.clientWidth, a = /(auto|scroll)/.test(r.overflowY) && e.scrollHeight > e.clientHeight, o = e.getBoundingClientRect(), s = this._getScrollSensitivity(), c = this._getScrollSpeed(), l = 0, u = 0;
13600
+ if ((n === "horizontal" || n === "grid") && i && (t.clientX < o.left + s && e.scrollLeft > 0 ? l = -c : t.clientX > o.right - s && e.scrollLeft + e.clientWidth < e.scrollWidth && (l = c)), (n === "vertical" || n === "grid") && a && (t.clientY < o.top + s && e.scrollTop > 0 ? u = -c : t.clientY > o.bottom - s && e.scrollTop + e.clientHeight < e.scrollHeight && (u = c)), l === 0 && u === 0) return;
13601
+ let d = e.scrollLeft, f = e.scrollTop;
13602
+ e.scrollLeft += l, e.scrollTop += u, (e.scrollLeft !== d || e.scrollTop !== f) && (this._maybeMovePlaceholder(t), this._scrollRaf = requestAnimationFrame(this._runAutoScrollFrame));
13470
13603
  }, this._boundPointerMove = this._onPointerMove.bind(this), this._boundPointerUp = this._onPointerUp.bind(this), this._boundPointerCancel = this._onPointerCancel.bind(this);
13471
13604
  }
13472
13605
  connectedCallback() {
@@ -13595,6 +13728,13 @@ var wr = Cr, G = "mint-sortable-placeholder", Tr = "mint-sortable-dragging", Er
13595
13728
  let e = this.getAttribute("handle-selector");
13596
13729
  return e && e.trim() ? e.trim() : null;
13597
13730
  }
13731
+ _getDragThreshold() {
13732
+ let e = parseFloat(this.getAttribute("drag-threshold") || "0");
13733
+ return Number.isFinite(e) ? Math.max(0, e) : 0;
13734
+ }
13735
+ _clearPendingDragStart() {
13736
+ this._pendingDragStart &&= (window.removeEventListener("pointermove", this._onPendingPointerMove), window.removeEventListener("pointerup", this._onPendingPointerEnd), window.removeEventListener("pointercancel", this._onPendingPointerEnd), null);
13737
+ }
13598
13738
  _getScrollSensitivity() {
13599
13739
  let e = parseFloat(this.getAttribute("scroll-sensitivity") || "48");
13600
13740
  return Number.isFinite(e) ? e : 48;
@@ -13616,7 +13756,7 @@ var wr = Cr, G = "mint-sortable-placeholder", Tr = "mint-sortable-dragging", Er
13616
13756
  for (; t && t !== this._listRoot;) {
13617
13757
  if (t.nodeType === Node.ELEMENT_NODE) {
13618
13758
  let e = t;
13619
- if (e.classList.contains(G) || e.classList.contains(Tr)) return null;
13759
+ if (e.classList.contains(G) || e.classList.contains(Er)) return null;
13620
13760
  if (t.parentElement === this._listRoot) return e;
13621
13761
  }
13622
13762
  t = t.parentElement;
@@ -13630,16 +13770,19 @@ var wr = Cr, G = "mint-sortable-placeholder", Tr = "mint-sortable-dragging", Er
13630
13770
  index: t
13631
13771
  })) : [];
13632
13772
  let n = t.getBoundingClientRect();
13633
- this._pointerStartX = e.clientX, this._pointerStartY = e.clientY;
13773
+ this._pointerStartX = e.clientX, this._pointerStartY = e.clientY, this._lastDragPointer = {
13774
+ clientX: e.clientX,
13775
+ clientY: e.clientY
13776
+ };
13634
13777
  let r = document.createElement("div");
13635
13778
  if (r.className = G, this.getDirection() !== "grid") r.style.minHeight = `${n.height}px`, r.style.minWidth = `${n.width}px`;
13636
13779
  else {
13637
13780
  let e = window.getComputedStyle(t);
13638
13781
  e.gridArea === "auto" ? (r.style.gridColumn = e.gridColumn, r.style.gridRow = e.gridRow) : r.style.gridArea = e.gridArea, r.style.alignSelf = e.alignSelf, r.style.justifySelf = e.justifySelf;
13639
13782
  }
13640
- r.setAttribute("aria-hidden", "true"), this._placeholder = r, this._listRoot.insertBefore(r, t), t.classList.add(Tr), t.style.position = "fixed";
13783
+ r.setAttribute("aria-hidden", "true"), this._placeholder = r, this._listRoot.insertBefore(r, t), t.classList.add(Er), t.style.position = "fixed";
13641
13784
  let i = this.getDirection() === "grid";
13642
- t.style.left = `${i ? e.clientX : n.left}px`, t.style.top = `${i ? e.clientY : n.top}px`, t.style.width = `${n.width}px`, t.style.height = `${n.height}px`, t.style.margin = "0", t.style.zIndex = "10000", t.style.boxSizing = "border-box", t.style.pointerEvents = "none", t.style.touchAction = "none", t.style.transform = i ? "translate3d(0, 0, 0) translate(-50%, -50%) scale(1.015)" : "translate3d(0, 0, 0) scale(1.015)", t.style.transformOrigin = i ? "center center" : "top left", t.style.willChange = "transform", t.setPointerCapture(e.pointerId);
13785
+ t.style.left = `${i ? e.clientX : n.left}px`, t.style.top = `${i ? e.clientY : n.top}px`, t.style.width = `${n.width}px`, t.style.height = `${n.height}px`, t.style.margin = "0", t.style.zIndex = "10000", t.style.boxSizing = "border-box", t.style.pointerEvents = "none", t.style.touchAction = "none", t.style.transform = i ? "translate3d(0, 0, 0) translate(-50%, -50%) scale(1.015)" : "translate3d(0, 0, 0) scale(1.015)", t.style.transformOrigin = i ? "center center" : "top left", t.style.willChange = "transform", document.body.appendChild(t), t.setPointerCapture(e.pointerId);
13643
13786
  let a = this._collectOrderedKeys(), o = {
13644
13787
  index: this._startIndex,
13645
13788
  itemId: t.getAttribute(this._getItemKeyAttribute()) || "",
@@ -13711,19 +13854,21 @@ var wr = Cr, G = "mint-sortable-placeholder", Tr = "mint-sortable-dragging", Er
13711
13854
  return this.dispatchEvent(f), this._dropRejected = !d || f.defaultPrevented, this._dropRejected ? this : s;
13712
13855
  }
13713
13856
  _autoScroll(e) {
13714
- let t = this;
13715
- for (; t && t !== document.body;) {
13716
- let e = getComputedStyle(t);
13717
- if (/(auto|scroll)/.test(`${e.overflowY} ${e.overflow}`) && t.scrollHeight > t.clientHeight || t.style.maxHeight) break;
13718
- t = t.parentElement;
13857
+ this._lastDragPointer = {
13858
+ clientX: e.clientX,
13859
+ clientY: e.clientY
13860
+ };
13861
+ let t = this.getDirection(), n = this;
13862
+ for (; n && n !== document.body;) {
13863
+ let e = getComputedStyle(n), r = /(auto|scroll)/.test(e.overflowX) && n.scrollWidth > n.clientWidth, i = /(auto|scroll)/.test(e.overflowY) && n.scrollHeight > n.clientHeight;
13864
+ if (t === "horizontal" && r || t === "vertical" && i || t === "grid" && (r || i)) break;
13865
+ n = n.parentElement;
13719
13866
  }
13720
- if (!t || t === document.body) return;
13721
- let n = this._getScrollSensitivity(), r = this._getScrollSpeed(), i = t.getBoundingClientRect();
13722
- this._scrollRaf !== null && cancelAnimationFrame(this._scrollRaf), this._scrollRaf = requestAnimationFrame(() => {
13723
- this._scrollRaf = null;
13724
- let a = 0;
13725
- e.clientY < i.top + n ? a = -r : e.clientY > i.bottom - n && (a = r), a !== 0 && (t.scrollTop += a, this._maybeMovePlaceholder(e));
13726
- });
13867
+ if (!n || n === document.body) {
13868
+ this._scrollRoot = null, this._scrollRaf !== null && cancelAnimationFrame(this._scrollRaf), this._scrollRaf = null;
13869
+ return;
13870
+ }
13871
+ this._scrollRoot = n, this._scrollRaf === null && (this._scrollRaf = requestAnimationFrame(this._runAutoScrollFrame));
13727
13872
  }
13728
13873
  _maybeMovePlaceholder(e) {
13729
13874
  let t = this._placeholder, n = this._dragEl;
@@ -13856,14 +14001,14 @@ var wr = Cr, G = "mint-sortable-placeholder", Tr = "mint-sortable-dragging", Er
13856
14001
  this._teardownDrag();
13857
14002
  return;
13858
14003
  }
13859
- this._previewResizeRaf !== null && (cancelAnimationFrame(this._previewResizeRaf), this._previewResizeRaf = null), this._moveRaf !== null && (cancelAnimationFrame(this._moveRaf), this._moveRaf = null), this._pendingPointerEvent = null;
14004
+ this._previewResizeRaf !== null && (cancelAnimationFrame(this._previewResizeRaf), this._previewResizeRaf = null), this._scrollRaf !== null && (cancelAnimationFrame(this._scrollRaf), this._scrollRaf = null), this._moveRaf !== null && (cancelAnimationFrame(this._moveRaf), this._moveRaf = null), this._pendingPointerEvent = null;
13860
14005
  try {
13861
14006
  t.releasePointerCapture(this._pointerId);
13862
14007
  } catch {}
13863
14008
  window.removeEventListener("pointermove", this._boundPointerMove), window.removeEventListener("pointerup", this._boundPointerUp), window.removeEventListener("pointercancel", this._boundPointerCancel);
13864
14009
  let r = this._dropList ?? this, i = r._resolveListRoot();
13865
14010
  !e && !this._dropRejected && this._dropAtEnd && r !== this && n?.parentNode === i && i.appendChild(n);
13866
- let a = this.getAttribute("data-tree-parent-id") || null, o = r.getAttribute("data-tree-parent-id") || null, s = this._indexOfItem(t), c = n?.parentNode === i ? Array.from(i.children).filter((e) => e.nodeType === Node.ELEMENT_NODE && e !== t && !e.hasAttribute("data-mint-sortable-status")).indexOf(n) : s, l = new CustomEvent("mint-sortable-before-drop", {
14011
+ let a = this.getAttribute("data-tree-parent-id") || null, o = r.getAttribute("data-tree-parent-id") || null, s = this._startIndex, c = n?.parentNode === i ? Array.from(i.children).filter((e) => e.nodeType === Node.ELEMENT_NODE && e !== t && !e.hasAttribute("data-mint-sortable-status")).indexOf(n) : s, l = new CustomEvent("mint-sortable-before-drop", {
13867
14012
  bubbles: !0,
13868
14013
  composed: !0,
13869
14014
  cancelable: !0,
@@ -13883,9 +14028,9 @@ var wr = Cr, G = "mint-sortable-placeholder", Tr = "mint-sortable-dragging", Er
13883
14028
  let e = this._originListRoot ?? this._listRoot, n = this._originNextSibling ?? this._restoreAfter;
13884
14029
  n && n.parentNode === e ? e.insertBefore(t, n) : e.appendChild(t);
13885
14030
  } else n?.parentNode && n.parentNode.insertBefore(t, n);
13886
- n?.remove(), this._placeholder = null, t.classList.remove(Tr), t.style.cssText = this._dragOriginalStyle, this._dragOriginalStyle = "";
14031
+ n?.remove(), this._placeholder = null, t.classList.remove(Er), t.style.cssText = this._dragOriginalStyle, this._dragOriginalStyle = "";
13887
14032
  let d = u ? s : r._indexOfItem(t);
13888
- this._pointerId = null, this._dragEl = null, this._restoreAfter = null, this._originListRoot = null, this._originNextSibling = null, this._dropList = null, this._dropAtEnd = !1, this._dropRejected = !1, this._lastPreviewRoot = null, this._lastPreviewIndex = -1, this._gridSlots = [];
14033
+ this._pointerId = null, this._scrollRoot = null, this._lastDragPointer = null, this._dragEl = null, this._restoreAfter = null, this._originListRoot = null, this._originNextSibling = null, this._dropList = null, this._dropAtEnd = !1, this._dropRejected = !1, this._lastPreviewRoot = null, this._lastPreviewIndex = -1, this._gridSlots = [];
13889
14034
  let f = this._collectOrderedKeys(), p = r._collectOrderedKeys(), m = !u && (!u && a !== o || d !== s), h = t.getAttribute(this._getItemKeyAttribute()) || "", g = {
13890
14035
  oldIndex: s,
13891
14036
  newIndex: d,
@@ -13925,19 +14070,20 @@ var wr = Cr, G = "mint-sortable-placeholder", Tr = "mint-sortable-dragging", Er
13925
14070
  })));
13926
14071
  }
13927
14072
  _teardownDrag() {
13928
- if (this._previewResizeRaf !== null && (cancelAnimationFrame(this._previewResizeRaf), this._previewResizeRaf = null), this._scrollRaf !== null && (cancelAnimationFrame(this._scrollRaf), this._scrollRaf = null), this._moveRaf !== null && (cancelAnimationFrame(this._moveRaf), this._moveRaf = null), this._pendingPointerEvent = null, window.removeEventListener("pointermove", this._boundPointerMove), window.removeEventListener("pointerup", this._boundPointerUp), window.removeEventListener("pointercancel", this._boundPointerCancel), this._dragEl) {
14073
+ if (this._clearPendingDragStart(), this._previewResizeRaf !== null && (cancelAnimationFrame(this._previewResizeRaf), this._previewResizeRaf = null), this._scrollRaf !== null && (cancelAnimationFrame(this._scrollRaf), this._scrollRaf = null), this._moveRaf !== null && (cancelAnimationFrame(this._moveRaf), this._moveRaf = null), this._pendingPointerEvent = null, window.removeEventListener("pointermove", this._boundPointerMove), window.removeEventListener("pointerup", this._boundPointerUp), window.removeEventListener("pointercancel", this._boundPointerCancel), this._dragEl) {
13929
14074
  try {
13930
14075
  this._pointerId !== null && this._dragEl.releasePointerCapture(this._pointerId);
13931
14076
  } catch {}
13932
- this._dragEl.classList.remove(Tr), this._dragEl.style.cssText = this._dragOriginalStyle, this._dragOriginalStyle = "";
14077
+ let e = this._originListRoot ?? this._listRoot, t = this._originNextSibling ?? this._restoreAfter;
14078
+ this._dragEl.parentElement !== e && (t && t.parentNode === e ? e.insertBefore(this._dragEl, t) : e.appendChild(this._dragEl)), this._dragEl.classList.remove(Er), this._dragEl.style.cssText = this._dragOriginalStyle, this._dragOriginalStyle = "";
13933
14079
  }
13934
- this._placeholder?.remove(), this._placeholder = null, this._dragEl = null, this._pointerId = null, this._restoreAfter = null, this._originListRoot = null, this._originNextSibling = null, this._dropList = null, this._dropRejected = !1, this._lastPreviewRoot = null, this._lastPreviewIndex = -1, this._gridSlots = [];
14080
+ this._placeholder?.remove(), this._placeholder = null, this._scrollRoot = null, this._lastDragPointer = null, this._dragEl = null, this._pointerId = null, this._restoreAfter = null, this._originListRoot = null, this._originNextSibling = null, this._dropList = null, this._dropRejected = !1, this._lastPreviewRoot = null, this._lastPreviewIndex = -1, this._gridSlots = [];
13935
14081
  }
13936
14082
  };
13937
- customElements.get("mint-sortable") || a("mint-sortable", Er);
14083
+ customElements.get("mint-sortable") || a("mint-sortable", Dr);
13938
14084
  //#endregion
13939
14085
  //#region src/components/tabs/Tab.ts
13940
- var Dr = class extends HTMLElement {
14086
+ var Or = class extends HTMLElement {
13941
14087
  static get observedAttributes() {
13942
14088
  return [
13943
14089
  "active",
@@ -14018,10 +14164,10 @@ var Dr = class extends HTMLElement {
14018
14164
  t.__mintTabsSynthetic = !0, this.dispatchEvent(t);
14019
14165
  }
14020
14166
  };
14021
- customElements.get("mint-tab") || a("mint-tab", Dr);
14167
+ customElements.get("mint-tab") || a("mint-tab", Or);
14022
14168
  //#endregion
14023
14169
  //#region src/components/tabs/TabList.ts
14024
- var Or = class extends HTMLElement {
14170
+ var kr = class extends HTMLElement {
14025
14171
  static get observedAttributes() {
14026
14172
  return ["position", "full-width"];
14027
14173
  }
@@ -14043,10 +14189,10 @@ var Or = class extends HTMLElement {
14043
14189
  });
14044
14190
  }
14045
14191
  };
14046
- customElements.get("mint-tab-list") || a("mint-tab-list", Or);
14192
+ customElements.get("mint-tab-list") || a("mint-tab-list", kr);
14047
14193
  //#endregion
14048
14194
  //#region src/components/tabs/TabContent.ts
14049
- var kr = class extends HTMLElement {
14195
+ var Ar = class extends HTMLElement {
14050
14196
  static get observedAttributes() {
14051
14197
  return ["id"];
14052
14198
  }
@@ -14084,10 +14230,10 @@ var kr = class extends HTMLElement {
14084
14230
  this.setAttribute("role", "tabpanel"), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "0");
14085
14231
  }
14086
14232
  };
14087
- customElements.get("mint-tab-content") || a("mint-tab-content", kr);
14233
+ customElements.get("mint-tab-content") || a("mint-tab-content", Ar);
14088
14234
  //#endregion
14089
14235
  //#region src/components/tabs/Tabs.ts
14090
- var Ar = class e extends HTMLElement {
14236
+ var jr = class e extends HTMLElement {
14091
14237
  static {
14092
14238
  this._id = 0;
14093
14239
  }
@@ -14193,10 +14339,10 @@ var Ar = class e extends HTMLElement {
14193
14339
  });
14194
14340
  }
14195
14341
  };
14196
- customElements.get("mint-tabs") || a("mint-tabs", Ar);
14342
+ customElements.get("mint-tabs") || a("mint-tabs", jr);
14197
14343
  //#endregion
14198
14344
  //#region src/components/tags/Tags.ts
14199
- var jr = class extends HTMLElement {
14345
+ var Mr = class extends HTMLElement {
14200
14346
  constructor(...e) {
14201
14347
  super(...e), this._container = null, this._chipsWrap = null, this._input = null, this._tags = [], this._predefinedTags = [], this._placeholder = "Add tag", this._predefinedPopoverOpenListenersAttached = !1, this._predefinedBlurCloseTimer = null, this._suppressNextPredefinedBlurClose = !1, this._dragIndex = null, this._dragChip = null, this._isPointerDragging = !1, this._pointerMoveHandler = null, this._pointerUpHandler = null, this._containerFocusRingListeners = !1, this._predefinedFieldResizeObserver = null, this._predefinedPopoverBodyEl = null;
14202
14348
  }
@@ -14377,20 +14523,13 @@ var jr = class extends HTMLElement {
14377
14523
  let r = e || document.createElement("mint-popover");
14378
14524
  e || (r.setAttribute("trigger-id", n), r.setAttribute("trigger-toggle", "false"), r.setAttribute("trigger-align", "start"), r.setAttribute("direction", "down"), r.setAttribute("padding", "0"), r.setAttribute("distance", "6px"), r.dataset.mintTagsPredefined = "true");
14379
14525
  let i = document.createElement("ul");
14380
- i.dataset.mintTagsPredefinedBody = "true", i.className = "mint-tags-options", i.setAttribute("role", "list");
14381
- let a = [];
14382
- if (i.addEventListener("mousedown", (e) => {
14526
+ if (i.dataset.mintTagsPredefinedBody = "true", i.className = "mint-tags-options", i.setAttribute("role", "list"), i.addEventListener("mousedown", (e) => {
14383
14527
  e.preventDefault();
14384
14528
  }), t.length) t.forEach((e) => {
14385
14529
  let t = document.createElement("li");
14386
14530
  t.className = "mint-tags-option-item";
14387
- let n = document.createElement("mint-button");
14388
- n.setAttribute("type", "button"), n.setAttribute("variant", "ghost"), n.setAttribute("full-width", "true"), n.setAttribute("align", "left"), n.classList.add("mint-tags-option");
14389
- let r = e.label || e.value;
14390
- a.push({
14391
- option: n,
14392
- label: r
14393
- }), n.addEventListener("mousedown", (e) => {
14531
+ let n = document.createElement("button");
14532
+ n.type = "button", n.className = "mint-tags-option", n.textContent = e.label || e.value, n.addEventListener("mousedown", (e) => {
14394
14533
  e.preventDefault();
14395
14534
  }, !0), n.addEventListener("click", () => {
14396
14535
  this._predefinedBlurCloseTimer !== null && (window.clearTimeout(this._predefinedBlurCloseTimer), this._predefinedBlurCloseTimer = null), this._suppressNextPredefinedBlurClose = !0, this._addTag(e), requestAnimationFrame(() => {
@@ -14408,9 +14547,7 @@ var jr = class extends HTMLElement {
14408
14547
  let t = e.querySelector("[data-mint-tags-predefined-body]");
14409
14548
  t ? t.replaceWith(i) : r.appendChild(i);
14410
14549
  } else r.appendChild(i), this._container.appendChild(r);
14411
- a.forEach(({ option: e, label: t }) => {
14412
- e.textContent = t;
14413
- }), this._attachPredefinedPopoverOpenOnInputFocus(), this._attachPredefinedFieldResizeObserver(i);
14550
+ this._attachPredefinedPopoverOpenOnInputFocus(), this._attachPredefinedFieldResizeObserver(i);
14414
14551
  }
14415
14552
  _getPredefinedPopoverEl() {
14416
14553
  return this.querySelector("mint-popover[data-mint-tags-predefined=\"true\"]");
@@ -14609,10 +14746,10 @@ var jr = class extends HTMLElement {
14609
14746
  }
14610
14747
  }
14611
14748
  };
14612
- customElements.get("mint-tags") || a("mint-tags", jr);
14749
+ customElements.get("mint-tags") || a("mint-tags", Mr);
14613
14750
  //#endregion
14614
14751
  //#region src/components/toast/Toast.ts
14615
- var Mr = class extends HTMLElement {
14752
+ var Nr = class extends HTMLElement {
14616
14753
  constructor(...e) {
14617
14754
  super(...e), this._messageEl = null, this._hideTimer = null, this._hideResolve = null, this._bottomNavObserver = null, this._bodyObserver = null;
14618
14755
  }
@@ -14689,11 +14826,11 @@ var Mr = class extends HTMLElement {
14689
14826
  this.classList.toggle("mint-toast-is-open", e), this._messageEl ||= (this.innerHTML = "<div class=\"mint-toast-surface\">\n <span data-mint-toast-message></span>\n </div>", this.querySelector("[data-mint-toast-message]")), this._messageEl && (this._messageEl.textContent = t);
14690
14827
  }
14691
14828
  };
14692
- customElements.get("mint-toast") || a("mint-toast", Mr);
14829
+ customElements.get("mint-toast") || a("mint-toast", Nr);
14693
14830
  //#endregion
14694
14831
  //#region src/components/toast/ToastApi.ts
14695
- var Nr = 2200, Pr = [], Fr = !1, Ir = null;
14696
- function Lr() {
14832
+ var Pr = 2200, Fr = [], Ir = !1, Lr = null;
14833
+ function Rr() {
14697
14834
  return typeof document > "u" || document.body ? Promise.resolve() : new Promise((e) => {
14698
14835
  if (typeof window > "u") {
14699
14836
  e();
@@ -14704,47 +14841,47 @@ function Lr() {
14704
14841
  }, { once: !0 });
14705
14842
  });
14706
14843
  }
14707
- async function Rr() {
14708
- if (await Lr(), typeof document > "u") throw Error("mintui.toast is only available in browser environments.");
14844
+ async function zr() {
14845
+ if (await Rr(), typeof document > "u") throw Error("mintui.toast is only available in browser environments.");
14709
14846
  let e = document.querySelector("mint-toast[data-mint-toast-root=\"true\"]");
14710
14847
  if (e) return e;
14711
14848
  let t = document.createElement("mint-toast");
14712
14849
  return t.setAttribute("data-mint-toast-root", "true"), document.body.appendChild(t), t;
14713
14850
  }
14714
- async function zr() {
14715
- if (!Fr) {
14716
- Fr = !0;
14851
+ async function Br() {
14852
+ if (!Ir) {
14853
+ Ir = !0;
14717
14854
  try {
14718
- for (; Pr.length > 0;) {
14719
- let e = Pr.shift();
14855
+ for (; Fr.length > 0;) {
14856
+ let e = Fr.shift();
14720
14857
  if (!e) continue;
14721
14858
  let t = e.message.trim().slice(0, 120);
14722
14859
  if (!t) continue;
14723
- let n = await Rr();
14724
- Ir = n;
14725
- let r = e.options?.duration ?? Nr, i = e.options?.type ?? "neutral";
14860
+ let n = await zr();
14861
+ Lr = n;
14862
+ let r = e.options?.duration ?? Pr, i = e.options?.type ?? "neutral";
14726
14863
  await n.showToast(t, r, i);
14727
14864
  }
14728
14865
  } finally {
14729
- Fr = !1, Ir = null;
14866
+ Ir = !1, Lr = null;
14730
14867
  }
14731
14868
  }
14732
14869
  }
14733
- function Br(e, t) {
14734
- typeof window > "u" || (Pr.push({
14870
+ function Vr(e, t) {
14871
+ typeof window > "u" || (Fr.push({
14735
14872
  message: e,
14736
14873
  options: t
14737
- }), Fr && Ir && Ir.hideToast(), zr());
14874
+ }), Ir && Lr && Lr.hideToast(), Br());
14738
14875
  }
14739
- var Vr = { toast: Br };
14876
+ var Hr = { toast: Vr };
14740
14877
  if (typeof window < "u") {
14741
14878
  let e = window.mintui || {};
14742
- e.toast = Br, window.mintui = e;
14879
+ e.toast = Vr, window.mintui = e;
14743
14880
  }
14744
14881
  //#endregion
14745
14882
  //#region src/components/tree/tree-utils.js
14746
14883
  function K(e = []) {
14747
- Gr(e);
14884
+ Kr(e);
14748
14885
  let t = (e) => e.map((e) => ({
14749
14886
  ...e,
14750
14887
  children: Array.isArray(e.children) ? t(e.children) : []
@@ -14773,23 +14910,23 @@ function J(e, t, n = null) {
14773
14910
  }
14774
14911
  return null;
14775
14912
  }
14776
- function Hr(e, t, n = 0) {
14913
+ function Ur(e, t, n = 0) {
14777
14914
  let r = String(t);
14778
14915
  for (let t of e) {
14779
14916
  if (String(t.id) === r) return n;
14780
- let e = Hr(t.children || [], r, n + 1);
14917
+ let e = Ur(t.children || [], r, n + 1);
14781
14918
  if (e >= 0) return e;
14782
14919
  }
14783
14920
  return -1;
14784
14921
  }
14785
- function Ur(e) {
14922
+ function Wr(e) {
14786
14923
  let t = Array.isArray(e?.children) ? e.children : [];
14787
- return t.length ? 1 + Math.max(...t.map(Ur)) : 1;
14924
+ return t.length ? 1 + Math.max(...t.map(Wr)) : 1;
14788
14925
  }
14789
- function Wr(e, t) {
14790
- return String(e.id) === String(t) ? !0 : (e.children || []).some((e) => Wr(e, t));
14926
+ function Gr(e, t) {
14927
+ return String(e.id) === String(t) ? !0 : (e.children || []).some((e) => Gr(e, t));
14791
14928
  }
14792
- function Gr(e) {
14929
+ function Kr(e) {
14793
14930
  let t = /* @__PURE__ */ new Set(), n = (e) => {
14794
14931
  for (let r of e) {
14795
14932
  if (r.id === null || r.id === void 0 || String(r.id) === "") throw Error("Every tree item must have a non-empty identifier.");
@@ -14800,13 +14937,13 @@ function Gr(e) {
14800
14937
  };
14801
14938
  n(e);
14802
14939
  }
14803
- function Kr(e, t, n, r, i = {}) {
14940
+ function qr(e, t, n, r, i = {}) {
14804
14941
  let a = K(e), o = J(a, t);
14805
14942
  if (!o) throw Error(`Tree item ${t} was not found.`);
14806
14943
  if (o.item.disabled || o.item.draggable === !1) throw Error("Disabled tree items cannot be moved.");
14807
14944
  let s = n == null || n === "" ? null : q(a, n);
14808
14945
  if (n != null && n !== "" && !s) throw Error(`Target parent ${n} was not found.`);
14809
- if (s && Wr(o.item, s.id)) throw Error("A tree item cannot be moved inside itself or one of its descendants.");
14946
+ if (s && Gr(o.item, s.id)) throw Error("A tree item cannot be moved inside itself or one of its descendants.");
14810
14947
  if (s?.disabled) throw Error("Disabled tree items cannot contain children.");
14811
14948
  if (i.allowNesting === !1 && s) throw Error("Nesting is disabled for this tree.");
14812
14949
  if (s?.canHaveChildren === !1) throw Error("The target item cannot contain children.");
@@ -14814,7 +14951,7 @@ function Kr(e, t, n, r, i = {}) {
14814
14951
  let c = s ? s.children : a, l = o.siblings.findIndex((e) => String(e.id) === String(t)), [u] = o.siblings.splice(l, 1), d = Math.min(Math.max(0, Number.isFinite(r) ? Math.trunc(r) : c.length), c.length);
14815
14952
  c.splice(d, 0, u);
14816
14953
  let f = Number.isFinite(i.maxDepth) ? Math.max(1, Math.trunc(i.maxDepth)) : Infinity;
14817
- if ((s ? Hr(a, s.id) + 1 : 0) + Ur(u) > f) throw Error(`Moving this branch would exceed the maximum tree depth of ${f}.`);
14954
+ if ((s ? Ur(a, s.id) + 1 : 0) + Wr(u) > f) throw Error(`Moving this branch would exceed the maximum tree depth of ${f}.`);
14818
14955
  return {
14819
14956
  items: a,
14820
14957
  item: u,
@@ -14826,7 +14963,7 @@ function Kr(e, t, n, r, i = {}) {
14826
14963
  }
14827
14964
  //#endregion
14828
14965
  //#region src/components/tree/Tree.ts
14829
- var qr = 0;
14966
+ var Jr = 0;
14830
14967
  function Y(e, t, n) {
14831
14968
  e.dispatchEvent(new CustomEvent(t, {
14832
14969
  bubbles: !0,
@@ -14834,16 +14971,16 @@ function Y(e, t, n) {
14834
14971
  detail: n
14835
14972
  }));
14836
14973
  }
14837
- function Jr(e, t) {
14974
+ function Yr(e, t) {
14838
14975
  let n = e.getAttribute(t);
14839
14976
  return n === "" || n === "true";
14840
14977
  }
14841
14978
  function X(e) {
14842
14979
  return e == null || e === "" ? null : String(e);
14843
14980
  }
14844
- var Yr = class extends HTMLElement {
14981
+ var Xr = class extends HTMLElement {
14845
14982
  constructor(...e) {
14846
- super(...e), this._items = [], this._undoStack = [], this._redoStack = [], this._selectedId = null, this._expandedIds = /* @__PURE__ */ new Set(), this._root = null, this._confirm = null, this._treeId = `mint-tree-${++qr}`, this._liveRegion = null, this._dragExpansion = null, this._autoExpandedIds = /* @__PURE__ */ new Set(), this._dragHoverExpandedId = null, this._keyboardFocusRestore = null, this._suppressSelectionClick = !1, this._selectionClickSuppressionTimer = null, this._onClick = (e) => {
14983
+ super(...e), this._items = [], this._undoStack = [], this._redoStack = [], this._selectedId = null, this._expandedIds = /* @__PURE__ */ new Set(), this._root = null, this._confirm = null, this._treeId = `mint-tree-${++Jr}`, this._liveRegion = null, this._dragExpansion = null, this._autoExpandedIds = /* @__PURE__ */ new Set(), this._dragHoverExpandedId = null, this._keyboardFocusRestore = null, this._suppressSelectionClick = !1, this._selectionClickSuppressionTimer = null, this._onClick = (e) => {
14847
14984
  let t = e.target instanceof Element ? e.target.closest("[data-tree-command]") : null;
14848
14985
  if (!t || !this.contains(t)) return;
14849
14986
  let n = t.getAttribute("data-tree-command"), r = t.getAttribute("data-tree-id");
@@ -15147,13 +15284,13 @@ var Yr = class extends HTMLElement {
15147
15284
  return Number.isFinite(e) && e > 0 ? e : Infinity;
15148
15285
  }
15149
15286
  _allowNesting() {
15150
- return !this.hasAttribute("allow-nesting") || Jr(this, "allow-nesting");
15287
+ return !this.hasAttribute("allow-nesting") || Yr(this, "allow-nesting");
15151
15288
  }
15152
15289
  _disabled() {
15153
- return Jr(this, "disabled");
15290
+ return Yr(this, "disabled");
15154
15291
  }
15155
15292
  _isLoading() {
15156
- return Jr(this, "loading");
15293
+ return Yr(this, "loading");
15157
15294
  }
15158
15295
  _render() {
15159
15296
  let e = document.activeElement instanceof HTMLElement ? document.activeElement.closest("[data-mint-tree-row]") : null, t = e && this.contains(e) ? e.getAttribute("data-tree-id") : null;
@@ -15215,7 +15352,7 @@ var Yr = class extends HTMLElement {
15215
15352
  return r.appendChild(i), r;
15216
15353
  }
15217
15354
  _createNode(e, t) {
15218
- let n = String(e.id), r = Array.isArray(e.children) ? e.children : [], i = e.canHaveChildren !== !1 && this._allowNesting() && t + Ur(e) < this._maxDepth(), a = document.createElement("div");
15355
+ let n = String(e.id), r = Array.isArray(e.children) ? e.children : [], i = e.canHaveChildren !== !1 && this._allowNesting() && t + Wr(e) < this._maxDepth(), a = document.createElement("div");
15219
15356
  a.className = "mint-tree-node", a.setAttribute("data-tree-id", n), a.setAttribute("role", "treeitem"), a.setAttribute("data-mint-tree-row", ""), a.setAttribute("aria-level", String(t + 1)), a.setAttribute("aria-selected", String(this._selectedId === n)), a.setAttribute("tabindex", this._selectedId === n || this._selectedId === null && t === 0 && this._items[0]?.id === e.id ? "0" : "-1"), a.setAttribute("aria-label", e.label), r.length && a.setAttribute("aria-expanded", String(this._expandedIds.has(n))), (e.disabled || this._disabled()) && a.setAttribute("aria-disabled", "true"), (e.draggable === !1 || this._disabled()) && a.setAttribute("data-sortable-disabled", "");
15220
15357
  let o = document.createElement("div");
15221
15358
  o.className = "mint-tree-row", o.setAttribute("data-tree-id", n);
@@ -15304,7 +15441,7 @@ var Yr = class extends HTMLElement {
15304
15441
  i = e.parentId, a = e.siblings.findIndex((e) => String(e.id) === n.parentId) + 1;
15305
15442
  } else return;
15306
15443
  try {
15307
- let t = Kr(this._items, e, i, a, {
15444
+ let t = qr(this._items, e, i, a, {
15308
15445
  maxDepth: this._maxDepth(),
15309
15446
  allowNesting: this._allowNesting()
15310
15447
  });
@@ -15372,7 +15509,7 @@ var Yr = class extends HTMLElement {
15372
15509
  let n = q(this._items, e);
15373
15510
  if (!n) return !1;
15374
15511
  let r = t === null ? null : q(this._items, t);
15375
- return !(t !== null && !r || r?.disabled || r && (String(r.id) === e || this._isDescendant(n, r.id)) || !this._allowNesting() && r || r?.canHaveChildren === !1 || r?.acceptsTypes?.length && !r.acceptsTypes.includes(n.type || "") || (r ? this._depthOf(String(r.id)) : -1) + 1 + Ur(n) > this._maxDepth());
15512
+ return !(t !== null && !r || r?.disabled || r && (String(r.id) === e || this._isDescendant(n, r.id)) || !this._allowNesting() && r || r?.canHaveChildren === !1 || r?.acceptsTypes?.length && !r.acceptsTypes.includes(n.type || "") || (r ? this._depthOf(String(r.id)) : -1) + 1 + Wr(n) > this._maxDepth());
15376
15513
  }
15377
15514
  _isDescendant(e, t) {
15378
15515
  return (e.children || []).some((e) => String(e.id) === String(t) || this._isDescendant(e, t));
@@ -15467,7 +15604,7 @@ var Yr = class extends HTMLElement {
15467
15604
  if (!t || t.siblings.indexOf(t.item) <= 0) return;
15468
15605
  let n = t.siblings[t.siblings.indexOf(t.item) - 1];
15469
15606
  try {
15470
- let t = Kr(this._items, e, n.id, (n.children || []).length, {
15607
+ let t = qr(this._items, e, n.id, (n.children || []).length, {
15471
15608
  maxDepth: this._maxDepth(),
15472
15609
  allowNesting: this._allowNesting()
15473
15610
  });
@@ -15489,7 +15626,7 @@ var Yr = class extends HTMLElement {
15489
15626
  if (!n) return;
15490
15627
  let r = n.siblings.findIndex((e) => String(e.id) === t.parentId) + 1;
15491
15628
  try {
15492
- let t = Kr(this._items, e, n.parentId, r, {
15629
+ let t = qr(this._items, e, n.parentId, r, {
15493
15630
  maxDepth: this._maxDepth(),
15494
15631
  allowNesting: this._allowNesting()
15495
15632
  });
@@ -15508,12 +15645,56 @@ var Yr = class extends HTMLElement {
15508
15645
  [...this._root?.querySelectorAll("[data-mint-tree-row]") ?? []].find((t) => t.getAttribute("data-tree-id") === e)?.focus({ preventScroll: !0 });
15509
15646
  }
15510
15647
  };
15511
- customElements.get("mint-tree") || a("mint-tree", Yr);
15648
+ customElements.get("mint-tree") || a("mint-tree", Xr);
15512
15649
  //#endregion
15513
15650
  //#region src/components/editor/Editor.ts
15514
15651
  function Z(e) {
15515
15652
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/\"/g, "&quot;");
15516
15653
  }
15654
+ function Zr(e) {
15655
+ return e.replace(/\r\n?/g, "\n").split("\n").map((e) => e.replace(/[\t ]+$/g, "")).join("\n").trim().replace(/\n{3,}/g, "\n\n");
15656
+ }
15657
+ function Qr(e, t) {
15658
+ let n = t.createElement("template");
15659
+ n.innerHTML = e.trim();
15660
+ let r = new Set(/* @__PURE__ */ "address.article.aside.blockquote.body.caption.dd.details.dialog.div.dl.dt.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.header.hr.li.main.nav.ol.p.pre.section.summary.table.tbody.td.tfoot.th.thead.tr.ul".split(".")), i = new Set([
15661
+ "area",
15662
+ "base",
15663
+ "br",
15664
+ "col",
15665
+ "embed",
15666
+ "hr",
15667
+ "img",
15668
+ "input",
15669
+ "link",
15670
+ "meta",
15671
+ "param",
15672
+ "source",
15673
+ "track",
15674
+ "wbr"
15675
+ ]), a = (e) => " ".repeat(e), o = (e) => Array.from(e.attributes).map((e) => ` ${e.name}="${Z(e.value)}"`).join(""), s = (e) => {
15676
+ if (e.nodeType === Node.TEXT_NODE) return Z(e.textContent || "");
15677
+ if (e.nodeType === Node.COMMENT_NODE) return `<!--${e.nodeValue || ""}-->`;
15678
+ if (e.nodeType !== Node.ELEMENT_NODE) return "";
15679
+ let t = e, n = t.tagName.toLowerCase(), r = `<${n}${o(t)}>`;
15680
+ return i.has(n) ? r : `${r}${Array.from(t.childNodes).map(s).join("")}</${n}>`;
15681
+ }, c = (e, t) => {
15682
+ if (e.nodeType === Node.TEXT_NODE) return Z(e.textContent || "");
15683
+ if (e.nodeType === Node.COMMENT_NODE) return `${a(t)}<!--${e.nodeValue || ""}-->`;
15684
+ if (e.nodeType !== Node.ELEMENT_NODE) return "";
15685
+ let n = e, l = n.tagName.toLowerCase(), u = `<${l}${o(n)}>`;
15686
+ if (i.has(l)) return `${a(t)}${u}`;
15687
+ let d = Array.from(n.childNodes);
15688
+ if (l === "pre" || d.every((e) => e.nodeType === Node.TEXT_NODE || e.nodeType === Node.ELEMENT_NODE && !r.has(e.tagName.toLowerCase()))) return `${a(t)}${u}${d.map(s).join("")}</${l}>`;
15689
+ let f = d.flatMap((e) => {
15690
+ if (e.nodeType === Node.TEXT_NODE && !(e.textContent || "").trim()) return [];
15691
+ let n = c(e, t + 1);
15692
+ return n ? [n] : [];
15693
+ });
15694
+ return f.length ? `${a(t)}${u}\n${f.join("\n")}\n${a(t)}</${l}>` : `${a(t)}${u}</${l}>`;
15695
+ };
15696
+ return Array.from(n.content.childNodes).map((e) => c(e, 0)).filter(Boolean).join("\n");
15697
+ }
15517
15698
  function Q(e) {
15518
15699
  return e.replace(/\r\n?/g, "\n").split(/\n{2,}/).map((e) => {
15519
15700
  let t = e.trim();
@@ -15542,7 +15723,7 @@ function Q(e) {
15542
15723
  function $(e) {
15543
15724
  return Z(e).replace(/`([^`]+)`/g, "<code>$1</code>").replace(/\*\*(.+?)\*\*/g, "<strong>$1</strong>").replace(/__(.+?)__/g, "<strong>$1</strong>").replace(/\*(.+?)\*/g, "<em>$1</em>").replace(/_(.+?)_/g, "<em>$1</em>").replace(/~~(.+?)~~/g, "<s>$1</s>").replace(/!\[([^\]]*)\]\(([^)]+)\)/g, "<img alt=\"$1\" src=\"$2\">").replace(/\[([^\]]+)\]\(([^)]+)\)/g, "<a href=\"$2\">$1</a>");
15544
15725
  }
15545
- function Xr(e) {
15726
+ function $r(e) {
15546
15727
  let t = (e) => {
15547
15728
  if (e.nodeType === Node.TEXT_NODE) return e.textContent || "";
15548
15729
  if (e.nodeType !== Node.ELEMENT_NODE) return "";
@@ -15573,9 +15754,9 @@ function Xr(e) {
15573
15754
  };
15574
15755
  return Array.from(e.childNodes).map(t).join("").trim();
15575
15756
  }
15576
- var Zr = class extends HTMLElement {
15757
+ var ei = class extends HTMLElement {
15577
15758
  constructor(...e) {
15578
- super(...e), this.editor = null, this.editorFrame = null, this.pendingValue = null, this.preservedContent = null, this.source = null, this.toolbar = null, this.count = null, this.selectedImage = null, this.sourceMode = !1, this.observer = null, this.frameResizeObserver = null, this.resizeState = null, this.stageResizeState = null, this.editorHeight = null, this.sourceButton = null, this.blockButton = null, this.blockPopover = null, this.tablePopover = null, this.tableTrigger = null, this.selectedTableElement = null, this.inlineTableTools = null, this.tableResizeHandle = null, this.tableResizeState = null, this.gridResizeState = null, this.footerMode = null, this.inlineButtons = /* @__PURE__ */ new Map(), this.inlineOverrides = /* @__PURE__ */ new Map(), this.inlineStyleOverrides = /* @__PURE__ */ new Map(), this.preserveInlineOverridesOnNextEditorClick = !1, this.toolbarResizeObserver = null, this.overflowPopover = null, this.overflowTrigger = null, this.overflowGroups = [], this.tooltipPopup = null, this.fontSizeDisplay = null, this.lastTextColor = "#202833", this.lastBackgroundColor = "#fff2a8", this.colorTriggers = /* @__PURE__ */ new Map(), this.colorRecentSwatches = /* @__PURE__ */ new Map(), this.alignmentTrigger = null, this.onStageResizeStart = (e, t) => {
15759
+ super(...e), this.editor = null, this.editorFrame = null, this.pendingValue = null, this.preservedContent = null, this.history = [], this.historyIndex = -1, this.applyingHistory = !1, this.historyTransactionDepth = 0, this.historyTransactionPending = !1, this.undoButton = null, this.redoButton = null, this.source = null, this.toolbar = null, this.count = null, this.selectedImage = null, this.sourceMode = !1, this.observer = null, this.frameResizeObserver = null, this.resizeState = null, this.stageResizeState = null, this.editorHeight = null, this.sourceButton = null, this.blockButton = null, this.blockPopover = null, this.tablePopover = null, this.tableTrigger = null, this.selectedTableElement = null, this.inlineTableTools = null, this.tableResizeHandle = null, this.tableResizeState = null, this.gridResizeState = null, this.footerMode = null, this.inlineButtons = /* @__PURE__ */ new Map(), this.inlineOverrides = /* @__PURE__ */ new Map(), this.inlineStyleOverrides = /* @__PURE__ */ new Map(), this.preserveInlineOverridesOnNextEditorClick = !1, this.toolbarResizeObserver = null, this.overflowPopover = null, this.overflowTrigger = null, this.overflowGroups = [], this.tooltipPopup = null, this.fontSizeDisplay = null, this.lastTextColor = "#202833", this.lastBackgroundColor = "#fff2a8", this.colorTriggers = /* @__PURE__ */ new Map(), this.colorRecentSwatches = /* @__PURE__ */ new Map(), this.alignmentTrigger = null, this.onStageResizeStart = (e, t) => {
15579
15760
  if (e.button !== 0) return;
15580
15761
  e.preventDefault(), e.stopPropagation(), this.stageResizeState = {
15581
15762
  stage: t,
@@ -15674,17 +15855,21 @@ var Zr = class extends HTMLElement {
15674
15855
  if (this.sourceMode && this.source) return this.source.value;
15675
15856
  if (!this.editor) return "";
15676
15857
  let e = this.cleanEditorCopy();
15677
- return this.format === "markdown" ? Xr(e) : e.innerHTML;
15858
+ return this.format === "markdown" ? $r(e) : e.innerHTML;
15678
15859
  }
15679
15860
  set value(e) {
15680
15861
  this.setValue(e || "");
15681
15862
  }
15682
15863
  setValue(e) {
15683
15864
  if (!this.editor) {
15684
- this.pendingValue = e, this.preservedContent = e, this.getAttribute("value") !== e && this.setAttribute("value", e);
15865
+ this.pendingValue = e, this.preservedContent = e, this.history = [], this.historyIndex = -1, this.updateHistoryButtons(), this.getAttribute("value") !== e && this.setAttribute("value", e);
15685
15866
  return;
15686
15867
  }
15687
- this.editor.innerHTML = this.format === "markdown" ? Q(e) : e, this.preservedContent = e, this.clearInlineTypingState(), this.source && (this.source.value = e), this.updateWordCount();
15868
+ if (this.value === e) {
15869
+ this.source && (this.source.value = e), this.updateHistoryButtons();
15870
+ return;
15871
+ }
15872
+ this.editor.innerHTML = this.format === "markdown" ? Q(e) : e, this.preservedContent = e, this.clearInlineTypingState(), this.source && (this.source.value = e), this.updateWordCount(), this.resetHistory();
15688
15873
  }
15689
15874
  insertResource(e) {
15690
15875
  let t = typeof e == "string" ? { url: e } : e, n = t.url || t.src;
@@ -15736,7 +15921,7 @@ var Zr = class extends HTMLElement {
15736
15921
  let u = document.createElement("button");
15737
15922
  u.type = "button", u.className = "mint-editor-table-resize-handle", this.setTooltip(u, "Resize table"), u.addEventListener("pointerdown", (e) => this.startTableResize(e)), this.inlineTableTools = l, this.tableResizeHandle = u;
15738
15923
  let d = document.createElement("iframe");
15739
- d.className = "mint-editor-frame", d.title = a ? `${a} editor` : "Rich text editor", d.setAttribute("sandbox", "allow-same-origin"), d.style.height = "100%", d.srcdoc = `<!doctype html><html><head><meta charset="utf-8"><style>
15924
+ d.className = "mint-editor-frame", d.title = a ? `${a} editor` : "Rich text editor", d.setAttribute("sandbox", "allow-same-origin allow-popups allow-popups-to-escape-sandbox"), d.style.height = "100%", d.srcdoc = `<!doctype html><html><head><meta charset="utf-8"><style>
15740
15925
  html,body{box-sizing:border-box;width:100%;height:100%;min-width:0;margin:0;overflow:hidden}
15741
15926
  .editor{box-sizing:border-box;width:100%;height:100%;min-width:0;min-height:0;overflow:auto;overflow-wrap:anywhere;padding:1rem;outline:0;color:var(--mint-color-text,#202833);background:var(--mint-color-surface,#fff);font:inherit;line-height:1.55}
15742
15927
  .editor:empty:before{content:attr(data-placeholder);color:var(--mint-color-text-muted,#7b8492);pointer-events:none}
@@ -15745,7 +15930,6 @@ var Zr = class extends HTMLElement {
15745
15930
  .editor :where(p,ul,ol,blockquote,table){max-width:100%;overflow-wrap:anywhere;margin:.65em 0}.editor a{color:var(--mint-color-primary,#1e5bff);text-decoration:underline}
15746
15931
  .editor table{width:100%;border-collapse:collapse;table-layout:fixed}.editor table.is-selected{outline:2px solid var(--mint-color-primary,#1e5bff);outline-offset:2px}.editor :where(td,th){box-sizing:border-box;min-width:3rem;max-width:none;overflow-wrap:anywhere;padding:.5rem;border:1px solid var(--mint-color-border,#dfe3e9);text-align:left;vertical-align:top}.editor th{background:var(--mint-color-surface-subtle,#f8f9fb);font-weight:600}
15747
15932
  .editor ul[data-mint-task-list]{padding-left:1.6rem;list-style:none}.editor ul[data-mint-task-list] li{display:flex;align-items:flex-start;gap:.5rem}.editor ul[data-mint-task-list] input[type=checkbox]{flex:0 0 auto;margin:.45em 0 0;accent-color:var(--mint-color-primary,#1e5bff)}
15748
- .editor .mint-editor-comment{border-radius:.15rem;background:rgb(255 224 130 / 45%);box-shadow:0 1px 0 rgb(198 120 0 / 65%);cursor:help}
15749
15933
  .mint-editor-image-frame{position:relative;display:inline-block;max-width:100%;margin:.5rem 0;vertical-align:middle}.mint-editor-image-frame img{display:block;width:100%;height:auto;max-height:none;border-radius:.25rem;object-fit:contain}.mint-editor-image-frame.is-selected{outline:2px solid var(--mint-color-primary,#1e5bff);outline-offset:2px}
15750
15934
  .mint-editor-resize-handle{position:absolute;right:-.45rem;bottom:-.45rem;width:.9rem;height:.9rem;padding:0;border:2px solid var(--mint-color-surface,#fff);border-radius:50%;background:var(--mint-color-primary,#1e5bff);cursor:nwse-resize;touch-action:none}
15751
15935
  @media(max-width:640px){.editor{padding:.75rem}}
@@ -15753,9 +15937,9 @@ var Zr = class extends HTMLElement {
15753
15937
  !this.isConnected || this.editorFrame !== d || this.bindEditorFrame(n, r);
15754
15938
  }), this.editorFrame = d;
15755
15939
  let f = document.createElement("textarea");
15756
- f.className = "mint-editor-source", f.style.height = "100%", f.setAttribute("aria-label", `Editor ${this.format.toUpperCase()} source`), f.hidden = !0, f.value = this.format === "markdown" ? t : n, f.addEventListener("input", () => {
15757
- this.editor && (this.editor.innerHTML = this.format === "markdown" ? Q(f.value) : f.value), this.updateWordCount(), this.emitChange();
15758
- }), this.source = f;
15940
+ f.className = "mint-editor-source", f.style.height = "100%", f.setAttribute("aria-label", `Editor ${this.format.toUpperCase()} source`), f.hidden = !0, f.value = this.format === "markdown" ? t : n, f.addEventListener("input", (e) => {
15941
+ this.editor && (this.editor.innerHTML = this.format === "markdown" ? Q(f.value) : f.value), this.updateWordCount(), this.emitChange(e.inputType);
15942
+ }), f.addEventListener("keydown", (e) => this.handleHistoryKeydown(e)), f.addEventListener("beforeinput", (e) => this.handleHistoryBeforeInput(e)), this.source = f;
15759
15943
  let p = document.createElement("div");
15760
15944
  p.className = "mint-editor-stage", p.style.height = i, p.append(d, f);
15761
15945
  let m = null;
@@ -15827,9 +16011,9 @@ var Zr = class extends HTMLElement {
15827
16011
  ].forEach((e) => {
15828
16012
  let t = i.getPropertyValue(`--mint-color-${e}`).trim();
15829
16013
  t && r.style.setProperty(`--mint-color-${e}`, t);
15830
- }), this.editor = r, r.addEventListener("input", () => {
15831
- this.normalizeTaskListItems(), this.syncSource(), this.emitChange(), this.updateSelectionUI();
15832
- }), r.addEventListener("change", (e) => {
16014
+ }), this.editor = r, r.addEventListener("input", (e) => {
16015
+ this.normalizeTaskListItems(), this.emitChange(e.inputType), this.updateSelectionUI();
16016
+ }), r.addEventListener("keydown", (e) => this.handleHistoryKeydown(e)), r.addEventListener("change", (e) => {
15833
16017
  let t = e.target;
15834
16018
  t.matches("ul[data-mint-task-list] input[type=\"checkbox\"]") && (t.toggleAttribute("checked", t.checked), this.emitChange());
15835
16019
  }), r.addEventListener("paste", (e) => {
@@ -15839,6 +16023,7 @@ var Zr = class extends HTMLElement {
15839
16023
  n && (e.preventDefault(), this.clearInlineTypingState(), this.insertPastedHtml(n), this.normalizeTaskListItems(), this.emitChange(), this.updateSelectionUI());
15840
16024
  }), r.addEventListener("beforeinput", (e) => {
15841
16025
  let t = e;
16026
+ if (this.handleHistoryBeforeInput(t)) return;
15842
16027
  t.inputType.startsWith("insert") && (this.preserveInlineOverridesOnNextEditorClick = !1);
15843
16028
  let n = t.shiftKey;
15844
16029
  if ((t.inputType === "insertParagraph" || t.inputType === "insertLineBreak" && !n) && !t.isComposing) {
@@ -15862,12 +16047,23 @@ var Zr = class extends HTMLElement {
15862
16047
  ].includes(e.key) && this.clearInlineTypingState(), this.updateSelectedImage(), this.updateSelectionUI();
15863
16048
  }), r.addEventListener("mouseup", () => {
15864
16049
  this.updateSelectedImage(), this.updateSelectionUI();
15865
- }), n.addEventListener("selectionchange", () => this.updateSelectionUI()), r.addEventListener("scroll", () => this.positionTableTools()), r.addEventListener("pointermove", (e) => this.updateGridResizeCursor(e)), n.addEventListener("pointerdown", (e) => this.startGridResize(e), !0), r.addEventListener("click", (e) => {
16050
+ }), n.addEventListener("selectionchange", () => this.updateSelectionUI()), n.addEventListener("pointerover", (e) => {
16051
+ let t = e.target;
16052
+ if (!t || t.nodeType !== Node.ELEMENT_NODE) return;
16053
+ let n = t.closest("a[href]"), r = e.relatedTarget;
16054
+ !n || r && r.nodeType && n.contains(r) || (this.bindEditorLinkTooltip(n), this.showTooltip(n));
16055
+ }), r.addEventListener("scroll", () => this.positionTableTools()), r.addEventListener("pointermove", (e) => this.updateGridResizeCursor(e)), n.addEventListener("pointerdown", (e) => this.startGridResize(e), !0), r.addEventListener("click", (e) => {
15866
16056
  this.closeEditorPopovers(), this.preserveInlineOverridesOnNextEditorClick ? this.preserveInlineOverridesOnNextEditorClick = !1 : this.clearInlineTypingState();
15867
16057
  let t = e.target, n = t.closest(".mint-editor-image-frame");
15868
16058
  n ? this.selectImage(n) : t.closest(".mint-editor-image-tools") || this.selectImage(null);
15869
16059
  let r = t.closest("table");
15870
- this.selectTable(r), t.closest("a") && e.preventDefault();
16060
+ this.selectTable(r);
16061
+ let i = t.closest("a[href]");
16062
+ if (i) if (e.preventDefault(), this.isOpenLinkModifier(e)) this.openEditorLink(i, "new-tab");
16063
+ else {
16064
+ let e = i.getAttribute("data-mint-editor-open");
16065
+ e && e !== "same-tab" && this.openEditorLink(i, e);
16066
+ }
15871
16067
  }), r.addEventListener("keydown", (e) => {
15872
16068
  if (e.key === "Enter" && !e.shiftKey && !e.altKey && !e.ctrlKey && !e.metaKey && !e.isComposing) {
15873
16069
  let t = this.selection, n = t?.anchorNode, r = (n?.nodeType === Node.ELEMENT_NODE ? n : n?.parentElement)?.closest("li"), i = r?.parentElement;
@@ -15881,22 +16077,22 @@ var Zr = class extends HTMLElement {
15881
16077
  childList: !0,
15882
16078
  subtree: !0,
15883
16079
  characterData: !0
15884
- }), this.updateWordCount(), this.updateSelectionUI();
16080
+ }), this.updateWordCount(), this.updateSelectionUI(), this.history.length === 0 ? this.resetHistory() : this.updateHistoryButtons();
15885
16081
  }
15886
16082
  buildToolbar(e) {
15887
16083
  let t = (t, n, r, i = e) => {
15888
16084
  let a = document.createElement("button");
15889
16085
  return a.type = "button", a.className = `mint-editor-tool-button mint-editor-toolbar-${n}`, this.setTooltip(a, t), a.append(this.icon(n)), a.addEventListener("pointerdown", () => this.saveSelection()), a.addEventListener("click", (e) => {
15890
- e.preventDefault(), r();
16086
+ e.preventDefault(), this.runHistoryTransaction(r);
15891
16087
  }), i.append(a), a;
15892
16088
  }, n = (e, t, n) => {
15893
16089
  let r = document.createElement("mint-popover");
15894
16090
  return r.id = `${e.id}-menu`, r.setAttribute("trigger-id", e.id), r.setAttribute("padding", "0.25rem"), r.setAttribute("direction", "down"), r.className = `mint-editor-menu-popover ${t}`, n.append(r), r;
15895
16091
  }, r = (e, t, n, r) => {
15896
16092
  let i = this.createMenuOption(t, n);
15897
- return i.addEventListener("click", r), e.append(i), i;
16093
+ return i.addEventListener("click", () => this.runHistoryTransaction(r)), e.append(i), i;
15898
16094
  };
15899
- t("Undo", "undo", () => this.command("undo")), t("Redo", "redo", () => this.command("redo"));
16095
+ this.undoButton = t("Undo", "undo", () => this.undo()), this.redoButton = t("Redo", "redo", () => this.redo()), this.updateHistoryButtons();
15900
16096
  let i = document.createElement("button");
15901
16097
  i.type = "button", i.className = "mint-editor-tool-button mint-editor-block-trigger", this.setTooltip(i, "Text style"), i.id = `${this.id || `mint-editor-${Math.random().toString(36).slice(2)}`}-block-trigger`;
15902
16098
  let a = document.createElement("span");
@@ -15947,7 +16143,9 @@ var Zr = class extends HTMLElement {
15947
16143
  l.textContent = "16px", c.append(l, this.icon("caret-down")), c.addEventListener("pointerdown", () => this.saveSelection()), s.append(c), t("Increase font size", "plus", () => this.applyFontSize(this.readFontSize() + 1), s), this.fontSizeDisplay = l;
15948
16144
  let u = document.createElement("div");
15949
16145
  u.className = "mint-editor-toolbar-actions", e.append(u), u.append(s);
15950
- let d = n(c, "mint-editor-font-size-popover", u), f = [[s, d]];
16146
+ let d = n(c, "mint-editor-font-size-popover", u), f = document.createElement("mint-scroll-fade");
16147
+ f.className = "mint-editor-font-size-options", f.setAttribute("axis", "vertical"), f.setAttribute("fade-size", "1rem"), d.append(f);
16148
+ let p = [[s, d]];
15951
16149
  [
15952
16150
  8,
15953
16151
  9,
@@ -15968,44 +16166,44 @@ var Zr = class extends HTMLElement {
15968
16166
  let t = document.createElement("button");
15969
16167
  t.type = "button", t.className = "mint-editor-menu-option mint-editor-font-size-option", t.textContent = `${e}px`, t.addEventListener("click", () => {
15970
16168
  this.applyFontSize(e), d.close();
15971
- }), d.append(t);
16169
+ }), f.append(t);
15972
16170
  });
15973
- let p = (e, n, r) => {
16171
+ let m = (e, n, r) => {
15974
16172
  let i = t(e, n, r, u);
15975
16173
  return [
15976
16174
  "bold",
15977
16175
  "italic",
15978
16176
  "underline"
15979
16177
  ].includes(n) && (i.setAttribute("aria-pressed", "false"), this.inlineButtons.set(n, i)), i;
15980
- }, m = (e) => {
16178
+ }, h = (e) => {
15981
16179
  let t = e.querySelector(":scope > mint-icon");
15982
16180
  if (!t) return;
15983
16181
  let n = document.createElement("span");
15984
16182
  n.className = "mint-editor-color-icon", e.insertBefore(n, t), n.append(t);
15985
- }, h = () => {
16183
+ }, g = () => {
15986
16184
  let e = this.separator();
15987
- return u.append(e), f.push([e]), e;
15988
- }, g = p("Bold", "bold", () => this.toggleInline("bold")), _ = p("Italic", "italic", () => this.toggleInline("italic")), v = p("Underline", "underline", () => this.toggleInline("underline"));
15989
- f.push([g], [_], [v]);
15990
- let y = this.separator();
15991
- u.append(y);
15992
- let b = p("Text color", "text-color", () => {});
15993
- b.id = `${this.id || `mint-editor-${Math.random().toString(36).slice(2)}`}-text-color-trigger`, b.append(this.icon("caret-down")), b.classList.add("mint-editor-color-trigger"), m(b), b.style.setProperty("--editor-color", this.lastTextColor);
15994
- let x = n(b, "mint-editor-color-popover", u);
15995
- this.buildColorPopover(x, "text", b), this.colorTriggers.set("text", b);
15996
- let S = p("Highlight color", "highlight", () => {});
15997
- S.id = `${this.id || `mint-editor-${Math.random().toString(36).slice(2)}`}-highlight-trigger`, S.append(this.icon("caret-down")), S.classList.add("mint-editor-color-trigger"), m(S), S.style.setProperty("--editor-color", this.lastBackgroundColor);
15998
- let C = n(S, "mint-editor-color-popover", u);
15999
- this.buildColorPopover(C, "background", S), this.colorTriggers.set("background", S), f.push([
16000
- y,
16185
+ return u.append(e), p.push([e]), e;
16186
+ }, _ = m("Bold", "bold", () => this.toggleInline("bold")), v = m("Italic", "italic", () => this.toggleInline("italic")), y = m("Underline", "underline", () => this.toggleInline("underline"));
16187
+ p.push([_], [v], [y]);
16188
+ let b = this.separator();
16189
+ u.append(b);
16190
+ let x = m("Text color", "text-color", () => {});
16191
+ x.id = `${this.id || `mint-editor-${Math.random().toString(36).slice(2)}`}-text-color-trigger`, x.append(this.icon("caret-down")), x.classList.add("mint-editor-color-trigger"), h(x), x.style.setProperty("--editor-color", this.lastTextColor);
16192
+ let S = n(x, "mint-editor-color-popover", u);
16193
+ this.buildColorPopover(S, "text", x), this.colorTriggers.set("text", x);
16194
+ let C = m("Highlight color", "highlight", () => {});
16195
+ C.id = `${this.id || `mint-editor-${Math.random().toString(36).slice(2)}`}-highlight-trigger`, C.append(this.icon("caret-down")), C.classList.add("mint-editor-color-trigger"), h(C), C.style.setProperty("--editor-color", this.lastBackgroundColor);
16196
+ let w = n(C, "mint-editor-color-popover", u);
16197
+ this.buildColorPopover(w, "background", C), this.colorTriggers.set("background", C), p.push([
16001
16198
  b,
16002
16199
  x,
16003
16200
  S,
16004
- C
16201
+ C,
16202
+ w
16005
16203
  ]);
16006
- let w = p("Font family", "font-family", () => {});
16007
- w.id = `${this.id || `mint-editor-${Math.random().toString(36).slice(2)}`}-font-family-trigger`, w.append(this.icon("caret-down"));
16008
- let T = n(w, "mint-editor-font-family-popover", u);
16204
+ let T = m("Font family", "font-family", () => {});
16205
+ T.id = `${this.id || `mint-editor-${Math.random().toString(36).slice(2)}`}-font-family-trigger`, T.append(this.icon("caret-down"));
16206
+ let E = n(T, "mint-editor-font-family-popover", u);
16009
16207
  [
16010
16208
  ["Arial", "Arial, sans-serif"],
16011
16209
  ["Helvetica", "Helvetica, sans-serif"],
@@ -16014,14 +16212,14 @@ var Zr = class extends HTMLElement {
16014
16212
  ["Courier New", "\"Courier New\", monospace"],
16015
16213
  ["System UI", "system-ui, sans-serif"]
16016
16214
  ].forEach(([e, t]) => {
16017
- r(T, e, "font-family", () => {
16018
- this.applyFontFamily(t), T.close();
16215
+ r(E, e, "font-family", () => {
16216
+ this.applyFontFamily(t), E.close();
16019
16217
  });
16020
- }), f.push([w, T]), h();
16021
- let E = p("Insert link", "link", () => this.openLinkModal()), D = p("Insert image", "image", () => this.requestResource()), ee = p("Insert table", "table", () => this.openTableModal()), O = document.createElement("button");
16022
- O.type = "button", O.className = "mint-editor-tool-button", this.setTooltip(O, "Table options"), O.id = `${this.id || `mint-editor-${Math.random().toString(36).slice(2)}`}-table-trigger`, O.append(this.icon("caret-down")), O.hidden = !0, u.append(O);
16023
- let k = n(O, "", u);
16024
- this.tablePopover = k, [
16218
+ }), p.push([T, E]), g();
16219
+ let D = m("Insert link", "link", () => this.openLinkModal()), ee = m("Insert image", "image", () => this.requestResource()), O = m("Insert table", "table", () => this.openTableModal()), k = document.createElement("button");
16220
+ k.type = "button", k.className = "mint-editor-tool-button", this.setTooltip(k, "Table options"), k.id = `${this.id || `mint-editor-${Math.random().toString(36).slice(2)}`}-table-trigger`, k.append(this.icon("caret-down")), k.hidden = !0, u.append(k);
16221
+ let A = n(k, "", u);
16222
+ this.tablePopover = A, [
16025
16223
  ["Add row below", "table-row"],
16026
16224
  ["Add column right", "table-column"],
16027
16225
  ["Delete row", "table-row-delete"],
@@ -16030,16 +16228,14 @@ var Zr = class extends HTMLElement {
16030
16228
  ].forEach(([e, t]) => {
16031
16229
  let n = this.createMenuOption(e, t);
16032
16230
  n.addEventListener("click", () => {
16033
- this.applyTableAction(e), k.close();
16034
- }), k.append(n);
16035
- }), O.addEventListener("pointerdown", () => this.saveSelection()), this.tableTrigger = O, f.push([E], [D], [
16036
- ee,
16231
+ this.applyTableAction(e), A.close();
16232
+ }), A.append(n);
16233
+ }), k.addEventListener("pointerdown", () => this.saveSelection()), this.tableTrigger = k, p.push([D], [ee], [
16037
16234
  O,
16038
- k
16039
- ]);
16040
- let A = p("Add comment", "comment-plus", () => this.openCommentModal());
16041
- f.push([A]), h();
16042
- let j = p("Text alignment", "align-left", () => {});
16235
+ k,
16236
+ A
16237
+ ]), g();
16238
+ let j = m("Text alignment", "align-left", () => {});
16043
16239
  j.id = `${this.id || `mint-editor-${Math.random().toString(36).slice(2)}`}-alignment-trigger`, j.append(this.icon("caret-down")), this.alignmentTrigger = j;
16044
16240
  let M = n(j, "mint-editor-alignment-popover", u);
16045
16241
  [
@@ -16067,8 +16263,8 @@ var Zr = class extends HTMLElement {
16067
16263
  r(M, e, t, () => {
16068
16264
  this.command(n), M.close(), this.updateTooltipLabel(j, `Text alignment: ${e}`);
16069
16265
  });
16070
- }), f.push([j, M]), h();
16071
- let te = p("Bulleted list", "list", () => this.command("insertUnorderedList")), N = document.createElement("button");
16266
+ }), p.push([j, M]), g();
16267
+ let te = m("Bulleted list", "list", () => this.command("insertUnorderedList")), N = document.createElement("button");
16072
16268
  N.type = "button", N.className = "mint-editor-tool-button mint-editor-list-options-trigger", N.id = `${this.id || `mint-editor-${Math.random().toString(36).slice(2)}`}-bullet-options-trigger`, this.setTooltip(N, "Bulleted list style"), N.append(this.icon("caret-down")), N.addEventListener("pointerdown", () => this.saveSelection()), u.append(N);
16073
16269
  let P = n(N, "mint-editor-list-popover", u);
16074
16270
  [
@@ -16078,7 +16274,7 @@ var Zr = class extends HTMLElement {
16078
16274
  ].forEach(([e, t]) => r(P, e, "list", () => {
16079
16275
  this.applyListStyle("ul", t), P.close();
16080
16276
  }));
16081
- let ne = p("Numbered list", "numbered-list", () => this.command("insertOrderedList")), F = document.createElement("button");
16277
+ let ne = m("Numbered list", "numbered-list", () => this.command("insertOrderedList")), F = document.createElement("button");
16082
16278
  F.type = "button", F.className = "mint-editor-tool-button mint-editor-list-options-trigger", F.id = `${this.id || `mint-editor-${Math.random().toString(36).slice(2)}`}-numbered-options-trigger`, this.setTooltip(F, "Numbered list style"), F.append(this.icon("caret-down")), F.addEventListener("pointerdown", () => this.saveSelection()), u.append(F);
16083
16279
  let I = n(F, "mint-editor-list-popover", u);
16084
16280
  [
@@ -16090,8 +16286,8 @@ var Zr = class extends HTMLElement {
16090
16286
  ].forEach(([e, t]) => r(I, e, "numbered-list", () => {
16091
16287
  this.applyListStyle("ol", t), I.close();
16092
16288
  }));
16093
- let re = p("Checklist", "checklist", () => this.toggleChecklist());
16094
- f.push([
16289
+ let re = m("Checklist", "checklist", () => this.toggleChecklist());
16290
+ p.push([
16095
16291
  te,
16096
16292
  N,
16097
16293
  P
@@ -16099,15 +16295,15 @@ var Zr = class extends HTMLElement {
16099
16295
  ne,
16100
16296
  F,
16101
16297
  I
16102
- ], [re]), h();
16103
- let ie = p("HTML source", "code", () => this.toggleSource());
16104
- f.push([ie]), this.sourceButton = e.querySelector(".mint-editor-toolbar-code");
16105
- let ae = p("Clear formatting", "clear-formatting", () => this.clearFormatting());
16106
- f.push([ae]);
16298
+ ], [re]), g();
16299
+ let ie = m("HTML source", "code", () => this.toggleSource());
16300
+ p.push([ie]), this.sourceButton = e.querySelector(".mint-editor-toolbar-code");
16301
+ let ae = m("Clear formatting", "clear-formatting", () => this.clearFormatting());
16302
+ p.push([ae]);
16107
16303
  let L = document.createElement("button");
16108
16304
  L.type = "button", L.className = "mint-editor-tool-button mint-editor-overflow-trigger", this.setTooltip(L, "More formatting options"), L.id = `${this.id || `mint-editor-${Math.random().toString(36).slice(2)}`}-overflow-trigger`, L.append(this.icon("ellipsis"));
16109
16305
  let R = document.createElement("mint-popover");
16110
- R.setAttribute("trigger-id", L.id), R.setAttribute("padding", "0.25rem"), R.setAttribute("direction", "down"), R.className = "mint-editor-menu-popover mint-editor-overflow-popover", e.append(L, R), this.overflowTrigger = L, this.overflowPopover = R, this.overflowGroups = f;
16306
+ R.setAttribute("trigger-id", L.id), R.setAttribute("padding", "0.25rem"), R.setAttribute("direction", "down"), R.className = "mint-editor-menu-popover mint-editor-overflow-popover", e.append(L, R), this.overflowTrigger = L, this.overflowPopover = R, this.overflowGroups = p;
16111
16307
  }
16112
16308
  buildColorPopover(e, t, n) {
16113
16309
  let r = [
@@ -16178,7 +16374,9 @@ var Zr = class extends HTMLElement {
16178
16374
  this.inlineStyleOverrides.set(e === "text" ? "color" : "backgroundColor", i), this.preserveInlineOverridesOnNextEditorClick = !0, e === "text" && t && (this.lastTextColor = t), e === "background" && t && (this.lastBackgroundColor = t), this.colorTriggers.get(e)?.style.setProperty("--editor-color", e === "text" ? this.lastTextColor : this.lastBackgroundColor), this.emitChange(), this.updateSelectionUI();
16179
16375
  return;
16180
16376
  }
16181
- this.inlineStyleOverrides.delete(e === "text" ? "color" : "backgroundColor"), e === "text" ? (n.execCommand("foreColor", !1, i), t && (this.lastTextColor = t), this.colorTriggers.get("text")?.style.setProperty("--editor-color", this.lastTextColor)) : (n.execCommand("hiliteColor", !1, i) || n.execCommand("backColor", !1, i), t && (this.lastBackgroundColor = t), this.colorTriggers.get("background")?.style.setProperty("--editor-color", this.lastBackgroundColor)), this.emitChange(), this.updateSelectionUI();
16377
+ this.inlineStyleOverrides.delete(e === "text" ? "color" : "backgroundColor"), this.runHistoryTransaction(() => {
16378
+ e === "text" ? (n.execCommand("foreColor", !1, i), t && (this.lastTextColor = t), this.colorTriggers.get("text")?.style.setProperty("--editor-color", this.lastTextColor)) : (n.execCommand("hiliteColor", !1, i) || n.execCommand("backColor", !1, i), t && (this.lastBackgroundColor = t), this.colorTriggers.get("background")?.style.setProperty("--editor-color", this.lastBackgroundColor)), this.emitChange();
16379
+ }), this.updateSelectionUI();
16182
16380
  }
16183
16381
  readFontSize() {
16184
16382
  let e = this.selection, t = e?.isCollapsed ? Number.parseFloat(this.inlineStyleOverrides.get("fontSize") || "") : NaN;
@@ -16195,58 +16393,63 @@ var Zr = class extends HTMLElement {
16195
16393
  this.inlineStyleOverrides.set("fontSize", `${t}px`), this.preserveInlineOverridesOnNextEditorClick = !0, this.emitChange(), this.updateSelectionUI();
16196
16394
  return;
16197
16395
  }
16198
- this.inlineStyleOverrides.delete("fontSize");
16199
- let r = new Set(Array.from(this.editor.querySelectorAll("font[size=\"7\"]")));
16200
- n.execCommand("fontSize", !1, "7"), this.editor.querySelectorAll("font[size=\"7\"]").forEach((e) => {
16201
- if (r.has(e)) return;
16202
- let i = n.createElement("span");
16203
- i.style.fontSize = `${t}px`, e.getAttribute("face") && (i.style.fontFamily = e.getAttribute("face") || ""), e.getAttribute("color") && (i.style.color = e.getAttribute("color") || ""), i.append(...Array.from(e.childNodes)), e.replaceWith(i);
16204
- }), this.emitChange(), this.updateSelectionUI();
16396
+ this.inlineStyleOverrides.delete("fontSize"), this.runHistoryTransaction(() => {
16397
+ let e = new Set(Array.from(this.editor.querySelectorAll("font[size=\"7\"]")));
16398
+ n.execCommand("fontSize", !1, "7"), this.editor.querySelectorAll("font[size=\"7\"]").forEach((r) => {
16399
+ if (e.has(r)) return;
16400
+ let i = n.createElement("span");
16401
+ i.style.fontSize = `${t}px`, r.getAttribute("face") && (i.style.fontFamily = r.getAttribute("face") || ""), r.getAttribute("color") && (i.style.color = r.getAttribute("color") || ""), i.append(...Array.from(r.childNodes)), r.replaceWith(i);
16402
+ }), this.emitChange();
16403
+ }), this.updateSelectionUI();
16205
16404
  }
16206
16405
  applyFontFamily(e) {
16207
- if (!this.editor || this.sourceMode) return;
16208
- if (this.editor.focus(), this.restoreSelection(), this.selection?.isCollapsed) {
16209
- this.inlineStyleOverrides.set("fontFamily", e), this.preserveInlineOverridesOnNextEditorClick = !0, this.emitChange(), this.updateSelectionUI();
16210
- return;
16406
+ if (!(!this.editor || this.sourceMode)) {
16407
+ if (this.editor.focus(), this.restoreSelection(), this.selection?.isCollapsed) {
16408
+ this.inlineStyleOverrides.set("fontFamily", e), this.preserveInlineOverridesOnNextEditorClick = !0, this.emitChange(), this.updateSelectionUI();
16409
+ return;
16410
+ }
16411
+ this.inlineStyleOverrides.delete("fontFamily"), this.runHistoryTransaction(() => {
16412
+ let t = this.editor.ownerDocument, n = new Set(Array.from(this.editor.querySelectorAll("font[face]")));
16413
+ t.execCommand("fontName", !1, e), this.editor.querySelectorAll("font[face]").forEach((r) => {
16414
+ if (n.has(r)) return;
16415
+ let i = t.createElement("span");
16416
+ i.style.fontFamily = r.getAttribute("face") || e, i.append(...Array.from(r.childNodes)), r.replaceWith(i);
16417
+ }), this.emitChange();
16418
+ }), this.updateSelectionUI();
16211
16419
  }
16212
- this.inlineStyleOverrides.delete("fontFamily");
16213
- let t = this.editor.ownerDocument, n = new Set(Array.from(this.editor.querySelectorAll("font[face]")));
16214
- t.execCommand("fontName", !1, e), this.editor.querySelectorAll("font[face]").forEach((r) => {
16215
- if (n.has(r)) return;
16216
- let i = t.createElement("span");
16217
- i.style.fontFamily = r.getAttribute("face") || e, i.append(...Array.from(r.childNodes)), r.replaceWith(i);
16218
- }), this.emitChange(), this.updateSelectionUI();
16219
16420
  }
16220
16421
  applyListStyle(e, t) {
16221
16422
  if (!this.editor || this.sourceMode) return;
16222
16423
  this.editor.focus(), this.restoreSelection();
16223
16424
  let n = this.selection?.anchorNode, r = (n?.nodeType === Node.ELEMENT_NODE ? n : n?.parentElement)?.closest(e), i = r && this.editor.contains(r) ? r : null;
16224
- if (!i) {
16225
- this.editor.ownerDocument.execCommand(e === "ul" ? "insertUnorderedList" : "insertOrderedList", !1);
16226
- let t = this.selection?.anchorNode, n = (t?.nodeType === Node.ELEMENT_NODE ? t : t?.parentElement)?.closest(e);
16227
- i = n && this.editor.contains(n) ? n : null;
16228
- }
16229
- i && (i.style.listStyleType = t), this.emitChange(), this.updateSelectionUI();
16425
+ this.runHistoryTransaction(() => {
16426
+ if (!i) {
16427
+ this.editor.ownerDocument.execCommand(e === "ul" ? "insertUnorderedList" : "insertOrderedList", !1);
16428
+ let t = this.selection?.anchorNode, n = (t?.nodeType === Node.ELEMENT_NODE ? t : t?.parentElement)?.closest(e);
16429
+ i = n && this.editor.contains(n) ? n : null;
16430
+ }
16431
+ i && (i.style.listStyleType = t), this.emitChange();
16432
+ }), this.updateSelectionUI();
16230
16433
  }
16231
16434
  toggleChecklist() {
16232
- if (!this.editor || this.sourceMode) return;
16233
- this.editor.focus(), this.restoreSelection();
16234
- let e = this.editor.ownerDocument, t = this.selection?.anchorNode, n = t?.nodeType === Node.ELEMENT_NODE ? t : t?.parentElement, r = n?.closest("ul[data-mint-task-list]"), i = n?.closest("ul");
16235
- if (r) r.removeAttribute("data-mint-task-list"), r.querySelectorAll("input[type=\"checkbox\"]").forEach((e) => e.remove());
16236
- else {
16237
- i || (n?.closest("h1,h2,h3,h4,h5,h6") && e.execCommand("formatBlock", !1, "p"), e.execCommand("insertUnorderedList", !1));
16238
- let t = this.selection?.anchorNode, r = t?.nodeType === Node.ELEMENT_NODE ? t : t?.parentElement, a = i || r?.closest("ul");
16239
- if (a && this.editor.contains(a)) {
16240
- a.setAttribute("data-mint-task-list", "true"), a.querySelectorAll("li").forEach((t, n) => {
16241
- if (t.querySelector("input[type=\"checkbox\"]")) return;
16242
- let r = e.createElement("input");
16243
- r.type = "checkbox", r.setAttribute("contenteditable", "false"), r.setAttribute("aria-label", `Task ${n + 1} complete`), t.insertBefore(r, t.firstChild);
16244
- });
16245
- let t = a.parentElement;
16246
- t && t !== this.editor && /^(P|H[1-6])$/.test(t.tagName) && t.parentElement === this.editor && (Array.from(t.childNodes).filter((e) => e === a ? !1 : e.nodeType === Node.TEXT_NODE ? !!e.textContent?.trim() : e.nodeType === Node.ELEMENT_NODE && !e.matches("br")).length === 0 ? t.replaceWith(a) : t.parentNode?.insertBefore(a, t.nextSibling));
16435
+ !this.editor || this.sourceMode || (this.editor.focus(), this.restoreSelection(), this.runHistoryTransaction(() => {
16436
+ let e = this.editor.ownerDocument, t = this.selection?.anchorNode, n = t?.nodeType === Node.ELEMENT_NODE ? t : t?.parentElement, r = n?.closest("ul[data-mint-task-list]"), i = n?.closest("ul");
16437
+ if (r) r.removeAttribute("data-mint-task-list"), r.querySelectorAll("input[type=\"checkbox\"]").forEach((e) => e.remove());
16438
+ else {
16439
+ i || (n?.closest("h1,h2,h3,h4,h5,h6") && e.execCommand("formatBlock", !1, "p"), e.execCommand("insertUnorderedList", !1));
16440
+ let t = this.selection?.anchorNode, r = t?.nodeType === Node.ELEMENT_NODE ? t : t?.parentElement, a = i || r?.closest("ul");
16441
+ if (a && this.editor.contains(a)) {
16442
+ a.setAttribute("data-mint-task-list", "true"), a.querySelectorAll("li").forEach((t, n) => {
16443
+ if (t.querySelector("input[type=\"checkbox\"]")) return;
16444
+ let r = e.createElement("input");
16445
+ r.type = "checkbox", r.setAttribute("contenteditable", "false"), r.setAttribute("aria-label", `Task ${n + 1} complete`), t.insertBefore(r, t.firstChild);
16446
+ });
16447
+ let t = a.parentElement;
16448
+ t && t !== this.editor && /^(P|H[1-6])$/.test(t.tagName) && t.parentElement === this.editor && (Array.from(t.childNodes).filter((e) => e === a ? !1 : e.nodeType === Node.TEXT_NODE ? !!e.textContent?.trim() : e.nodeType === Node.ELEMENT_NODE && !e.matches("br")).length === 0 ? t.replaceWith(a) : t.parentNode?.insertBefore(a, t.nextSibling));
16449
+ }
16247
16450
  }
16248
- }
16249
- this.emitChange(), this.updateSelectionUI();
16451
+ this.emitChange();
16452
+ }), this.updateSelectionUI());
16250
16453
  }
16251
16454
  splitTaskItem(e, t) {
16252
16455
  if (!this.editor) return;
@@ -16299,44 +16502,6 @@ var Zr = class extends HTMLElement {
16299
16502
  let a = this.selection, o = this.editor.ownerDocument.createRange();
16300
16503
  o.setStart(i, 0), o.collapse(!0), a?.removeAllRanges(), a?.addRange(o), this.syncSource(), this.emitChange(), this.updateSelectionUI();
16301
16504
  }
16302
- openCommentModal() {
16303
- this.saveSelection();
16304
- let e = this._savedRange?.toString() || "", t = document.createElement("mint-modal");
16305
- t.setAttribute("heading", "Add comment"), t.setAttribute("size", "small");
16306
- let n = document.createElement("div");
16307
- n.setAttribute("slot", "body"), n.className = "mint-editor-modal-fields";
16308
- let r = document.createElement("p");
16309
- r.className = "mint-editor-comment-hint", r.textContent = e ? `Comment on: “${e.slice(0, 120)}${e.length > 120 ? "…" : ""}”` : "Select some text in the document before adding a comment.";
16310
- let i = document.createElement("textarea");
16311
- i.className = "mint-editor-comment-input", i.setAttribute("aria-label", "Comment"), i.setAttribute("placeholder", "Write a comment…"), i.rows = 4, n.append(r, i);
16312
- let a = document.createElement("div");
16313
- a.setAttribute("slot", "actions"), a.className = "mint-editor-modal-actions";
16314
- let o = document.createElement("mint-button");
16315
- o.textContent = "Cancel", o.setAttribute("variant", "ghost"), this.setTooltip(o, "Cancel"), o.addEventListener("click", () => t.close());
16316
- let s = document.createElement("mint-button");
16317
- s.textContent = "Add comment", s.setAttribute("tone", "action"), s.toggleAttribute("disabled", !e), this.setTooltip(s, "Add comment"), s.addEventListener("click", () => {
16318
- let n = i.value.trim();
16319
- !n || !e || (this.insertComment(n, e), t.close());
16320
- }), a.append(o, s), t.append(n, a), this.append(t), t.open();
16321
- }
16322
- insertComment(e, t) {
16323
- let n = this._savedRange;
16324
- if (this.editor && n && !n.collapsed && this.editor.contains(n.commonAncestorContainer) && this.format === "html") {
16325
- let t = this.editor.ownerDocument.createElement("span");
16326
- t.className = "mint-editor-comment", t.setAttribute("data-mint-comment", e), t.title = `Comment: ${e}`, t.append(n.extractContents()), n.insertNode(t);
16327
- let r = this.selection;
16328
- n.selectNodeContents(t), r?.removeAllRanges(), r?.addRange(n);
16329
- }
16330
- this.dispatchEvent(new CustomEvent("mint-editor-comment-request", {
16331
- bubbles: !0,
16332
- composed: !0,
16333
- detail: {
16334
- selectedText: t,
16335
- comment: e,
16336
- format: this.format
16337
- }
16338
- })), this.emitChange();
16339
- }
16340
16505
  updateToolbarOverflow() {
16341
16506
  let e = this.toolbar, t = this.overflowTrigger, n = this.overflowPopover;
16342
16507
  if (!e || !t || !n) return;
@@ -16352,7 +16517,9 @@ var Zr = class extends HTMLElement {
16352
16517
  t.hidden = n.childElementCount === 0;
16353
16518
  }
16354
16519
  clearFormatting() {
16355
- !this.editor || this.sourceMode || (this.editor.focus(), this.restoreSelection(), this.editor.ownerDocument.execCommand("removeFormat", !1), this.editor.ownerDocument.execCommand("formatBlock", !1, "p"), this.clearInlineTypingState(), this.emitChange(), this.updateSelectionUI());
16520
+ !this.editor || this.sourceMode || (this.editor.focus(), this.restoreSelection(), this.runHistoryTransaction(() => {
16521
+ this.editor.ownerDocument.execCommand("removeFormat", !1), this.editor.ownerDocument.execCommand("formatBlock", !1, "p"), this.clearInlineTypingState(), this.emitChange();
16522
+ }), this.updateSelectionUI());
16356
16523
  }
16357
16524
  icon(e) {
16358
16525
  let t = document.createElement("mint-icon");
@@ -16361,6 +16528,48 @@ var Zr = class extends HTMLElement {
16361
16528
  setTooltip(e, t) {
16362
16529
  this.updateTooltipLabel(e, t), e.dataset.editorTooltipBound !== "true" && (e.dataset.editorTooltipBound = "true", e.addEventListener("pointerenter", () => this.showTooltip(e)), e.addEventListener("pointerleave", () => this.hideTooltip()), e.addEventListener("focus", () => this.showTooltip(e)), e.addEventListener("blur", () => this.hideTooltip()));
16363
16530
  }
16531
+ linkOpenModifier() {
16532
+ let e = navigator.userAgentData?.platform || navigator.platform || "";
16533
+ return /mac|iphone|ipad|ipod/i.test(e) ? "⌘" : "Ctrl";
16534
+ }
16535
+ isOpenLinkModifier(e) {
16536
+ return this.linkOpenModifier() === "⌘" ? e.metaKey : e.ctrlKey;
16537
+ }
16538
+ openEditorLink(e, t) {
16539
+ if (t === "same-tab") {
16540
+ this.ownerDocument.defaultView?.location.assign(e.href);
16541
+ return;
16542
+ }
16543
+ if (t === "new-tab") {
16544
+ window.open(e.href, "_blank", "noopener,noreferrer");
16545
+ return;
16546
+ }
16547
+ let n = t === "popup", r = n ? [
16548
+ "popup=yes",
16549
+ `width=${this.normalizePopupNumber(e.dataset.mintPopupWidth || "", 200, 4e3, "800")}`,
16550
+ `height=${this.normalizePopupNumber(e.dataset.mintPopupHeight || "", 150, 4e3, "600")}`,
16551
+ e.dataset.mintPopupLeft ? `left=${this.normalizePopupNumber(e.dataset.mintPopupLeft, 0, 1e4, "")}` : "",
16552
+ e.dataset.mintPopupTop ? `top=${this.normalizePopupNumber(e.dataset.mintPopupTop, 0, 1e4, "")}` : "",
16553
+ `resizable=${e.dataset.mintPopupResizable === "no" ? "no" : "yes"}`,
16554
+ `scrollbars=${e.dataset.mintPopupScrollbars === "no" ? "no" : "yes"}`
16555
+ ].filter(Boolean).join(",") : "popup=no", i = n ? "mint-editor-popup" : "mint-editor-window", a = window.open(e.href, i, r);
16556
+ if (!a) return;
16557
+ try {
16558
+ a.opener = null;
16559
+ } catch {}
16560
+ let o = e.dataset.mintPopupTitle?.trim();
16561
+ if (n && o) {
16562
+ let e = () => {
16563
+ try {
16564
+ a.document.title = o;
16565
+ } catch {}
16566
+ };
16567
+ e(), a.addEventListener("load", e, { once: !0 });
16568
+ }
16569
+ }
16570
+ bindEditorLinkTooltip(e) {
16571
+ e.dataset.editorTooltipBound !== "true" && (e.dataset.editorTooltipBound = "true", e.setAttribute("data-editor-tooltip", `${this.linkOpenModifier()} + click to open`), e.addEventListener("pointerenter", () => this.showTooltip(e)), e.addEventListener("pointerleave", () => this.hideTooltip()), e.addEventListener("focus", () => this.showTooltip(e)), e.addEventListener("blur", () => this.hideTooltip()));
16572
+ }
16364
16573
  updateTooltipLabel(e, t) {
16365
16574
  e.setAttribute("data-editor-tooltip", t);
16366
16575
  let n = t.indexOf(":"), r = n < 0 ? t : `${t.slice(0, n + 1)}\n${t.slice(n + 1).trim()}`;
@@ -16387,8 +16596,23 @@ var Zr = class extends HTMLElement {
16387
16596
  }), document.body.append(n), this.tooltipPopup = n;
16388
16597
  }
16389
16598
  n.textContent = t, n.setAttribute("aria-hidden", "false"), n.style.visibility = "hidden", n.style.display = "block";
16390
- let r = e.getBoundingClientRect(), i = n.getBoundingClientRect(), a = Math.max(8, Math.min(window.innerWidth - i.width - 8, r.left + r.width / 2 - i.width / 2)), o = r.top >= i.height + 6 + 8 ? r.top - i.height - 6 : Math.min(window.innerHeight - i.height - 8, r.bottom + 6);
16391
- n.style.left = `${a}px`, n.style.top = `${o}px`, n.style.visibility = "visible";
16599
+ let r = e.getBoundingClientRect(), i = {
16600
+ left: r.left,
16601
+ top: r.top,
16602
+ width: r.width,
16603
+ bottom: r.bottom
16604
+ }, a = e.ownerDocument.defaultView?.frameElement;
16605
+ if (a) {
16606
+ let e = a.getBoundingClientRect(), t = a.clientWidth ? e.width / a.clientWidth : 1, n = a.clientHeight ? e.height / a.clientHeight : 1;
16607
+ i = {
16608
+ left: e.left + r.left * t,
16609
+ top: e.top + r.top * n,
16610
+ width: r.width * t,
16611
+ bottom: e.top + r.bottom * n
16612
+ };
16613
+ }
16614
+ let o = n.getBoundingClientRect(), s = Math.max(8, Math.min(window.innerWidth - o.width - 8, i.left + i.width / 2 - o.width / 2)), c = i.top >= o.height + 6 + 8 ? i.top - o.height - 6 : Math.min(window.innerHeight - o.height - 8, i.bottom + 6);
16615
+ n.style.left = `${s}px`, n.style.top = `${c}px`, n.style.visibility = "visible";
16392
16616
  }
16393
16617
  hideTooltip() {
16394
16618
  this.tooltipPopup && (this.tooltipPopup.style.display = "none", this.tooltipPopup.setAttribute("aria-hidden", "true"));
@@ -16424,7 +16648,9 @@ var Zr = class extends HTMLElement {
16424
16648
  return e.className = "mint-editor-separator", e.setAttribute("aria-hidden", "true"), e;
16425
16649
  }
16426
16650
  command(e, t) {
16427
- !this.editor || this.sourceMode || (this.editor.focus(), this.restoreSelection(), this.editor.ownerDocument.execCommand(e, !1, t), this.clearInlineTypingState(), this.emitChange(), this.updateSelectionUI());
16651
+ !this.editor || this.sourceMode || (this.runHistoryTransaction(() => {
16652
+ this.editor.focus(), this.restoreSelection(), this.editor.ownerDocument.execCommand(e, !1, t), this.clearInlineTypingState(), this.emitChange();
16653
+ }), this.updateSelectionUI());
16428
16654
  }
16429
16655
  toggleInline(e) {
16430
16656
  if (!this.editor || this.sourceMode) return;
@@ -16436,7 +16662,9 @@ var Zr = class extends HTMLElement {
16436
16662
  this.inlineOverrides.set(e, r), this.preserveInlineOverridesOnNextEditorClick = !0, this.emitChange(), this.updateSelectionUI();
16437
16663
  return;
16438
16664
  }
16439
- this.clearInlineTypingState(), i.execCommand(e, !1), this.emitChange(), this.updateSelectionUI();
16665
+ this.runHistoryTransaction(() => {
16666
+ this.clearInlineTypingState(), i.execCommand(e, !1), this.emitChange();
16667
+ }), this.updateSelectionUI();
16440
16668
  }
16441
16669
  inlineStateAtSelection(e, t) {
16442
16670
  let n = this.selection, r = this.inlineOverrides.get(e);
@@ -16707,24 +16935,7 @@ var Zr = class extends HTMLElement {
16707
16935
  e.replaceWith(...Array.from(e.childNodes));
16708
16936
  };
16709
16937
  for (let e of Array.from(i.querySelectorAll("*"))) e.tagName.includes(":") && l(e);
16710
- let u = new Set([
16711
- "href",
16712
- "src",
16713
- "alt",
16714
- "title",
16715
- "colspan",
16716
- "rowspan",
16717
- "start",
16718
- "value",
16719
- "type",
16720
- "width",
16721
- "height",
16722
- "border",
16723
- "cellpadding",
16724
- "cellspacing",
16725
- "scope",
16726
- "dir"
16727
- ]), d = (e, t = !1) => {
16938
+ let u = new Set(/* @__PURE__ */ "href.src.alt.title.target.rel.data-mint-editor-open.data-mint-popup-title.data-mint-popup-width.data-mint-popup-height.data-mint-popup-left.data-mint-popup-top.data-mint-popup-resizable.data-mint-popup-scrollbars.colspan.rowspan.start.value.type.width.height.border.cellpadding.cellspacing.scope.dir".split(".")), d = (e, t = !1) => {
16728
16939
  let n = e.trim();
16729
16940
  if (/^#[-\w:.]+$/.test(n) || t && /^data:image\/(?:png|gif|jpe?g|webp);base64,/i.test(n)) return !0;
16730
16941
  try {
@@ -16743,7 +16954,17 @@ var Zr = class extends HTMLElement {
16743
16954
  if (n === "style") {
16744
16955
  let n = o(t.value);
16745
16956
  n ? e.setAttribute("style", n) : e.removeAttribute(t.name);
16746
- } else u.has(n) ? ((n === "href" || n === "src") && !d(t.value, n === "src") || [
16957
+ } else if (!u.has(n)) e.removeAttribute(t.name);
16958
+ else if ((n === "href" || n === "src") && !d(t.value, n === "src")) e.removeAttribute(t.name);
16959
+ else if (n === "target" && !/^(_self|_blank|mint-editor-window|mint-editor-popup)$/i.test(t.value.trim())) e.removeAttribute(t.name);
16960
+ else if (n === "rel") {
16961
+ let n = t.value.toLowerCase().split(/\s+/).filter((e) => ["noopener", "noreferrer"].includes(e));
16962
+ n.length ? e.setAttribute("rel", Array.from(new Set(n)).join(" ")) : e.removeAttribute(t.name);
16963
+ } else if (n === "data-mint-editor-open" && !/^(same-tab|new-tab|new-window|popup)$/.test(t.value)) e.removeAttribute(t.name);
16964
+ else if (/^data-mint-popup-(width|height|left|top)$/.test(n)) {
16965
+ let r = Number.parseInt(t.value, 10), i = /width|height/.test(n) ? 150 : 0;
16966
+ !Number.isFinite(r) || r < i || r > 1e4 ? e.removeAttribute(t.name) : e.setAttribute(t.name, String(r));
16967
+ } else /^data-mint-popup-(resizable|scrollbars)$/.test(n) && !/^(yes|no)$/.test(t.value) ? e.removeAttribute(t.name) : n === "data-mint-popup-title" && t.value.length > 120 ? e.setAttribute(n, t.value.slice(0, 120)) : ([
16747
16968
  "colspan",
16748
16969
  "rowspan",
16749
16970
  "start",
@@ -16753,20 +16974,34 @@ var Zr = class extends HTMLElement {
16753
16974
  "border",
16754
16975
  "cellpadding",
16755
16976
  "cellspacing"
16756
- ].includes(n) && !/^\d+(?:%|px)?$/i.test(t.value.trim()) || n === "scope" && !/^(row|col|rowgroup|colgroup)$/i.test(t.value) || n === "dir" && !/^(ltr|rtl|auto)$/i.test(t.value) || n === "type" && !/^(1|a|A|i|I)$/i.test(t.value)) && e.removeAttribute(t.name) : e.removeAttribute(t.name);
16977
+ ].includes(n) && !/^\d+(?:%|px)?$/i.test(t.value.trim()) || n === "scope" && !/^(row|col|rowgroup|colgroup)$/i.test(t.value) || n === "dir" && !/^(ltr|rtl|auto)$/i.test(t.value) || n === "type" && !/^(1|a|A|i|I)$/i.test(t.value)) && e.removeAttribute(t.name);
16757
16978
  }
16758
16979
  for (let e of Array.from(i.querySelectorAll("span"))) e.attributes.length || l(e);
16759
16980
  return i.innerHTML.trim();
16760
16981
  }
16761
16982
  syncSource() {
16762
16983
  if (this.source && this.editor) {
16763
- let e = this.cleanEditorCopy();
16764
- this.source.value = this.format === "markdown" ? Xr(e) : e.innerHTML, this.preservedContent = this.format === "markdown" ? this.source.value : this.editor.innerHTML;
16984
+ let e = this.cleanEditorCopy(), t = this.format === "markdown" ? $r(e) : e.innerHTML;
16985
+ this.sourceMode || (this.source.value = t), this.preservedContent = this.sourceMode && this.source ? this.source.value : this.format === "markdown" ? t : this.editor.innerHTML;
16765
16986
  }
16766
16987
  this.updateWordCount();
16767
16988
  }
16768
- emitChange() {
16769
- this.syncSource();
16989
+ emitChange(e) {
16990
+ if (this.historyTransactionDepth > 0) {
16991
+ this.historyTransactionPending = !0;
16992
+ return;
16993
+ }
16994
+ this.syncSource(), this.applyingHistory || this.recordHistory(e || null), this.dispatchValueEvents();
16995
+ }
16996
+ runHistoryTransaction(e) {
16997
+ this.historyTransactionDepth += 1;
16998
+ try {
16999
+ e();
17000
+ } finally {
17001
+ --this.historyTransactionDepth, this.historyTransactionDepth === 0 && this.historyTransactionPending && (this.historyTransactionPending = !1, this.syncSource(), this.recordHistory(null), this.dispatchValueEvents());
17002
+ }
17003
+ }
17004
+ dispatchValueEvents() {
16770
17005
  let e = this.value;
16771
17006
  this.dispatchEvent(new CustomEvent("input", {
16772
17007
  bubbles: !0,
@@ -16778,6 +17013,119 @@ var Zr = class extends HTMLElement {
16778
17013
  detail: { value: e }
16779
17014
  }));
16780
17015
  }
17016
+ resetHistory() {
17017
+ this.history = [], this.historyIndex = -1, this.editor && this.recordHistory(null), this.updateHistoryButtons();
17018
+ }
17019
+ refreshCurrentHistorySnapshot() {
17020
+ if (this.historyIndex < 0) return;
17021
+ let e = this.captureHistorySnapshot(null);
17022
+ e && (this.history[this.historyIndex] = e);
17023
+ }
17024
+ captureHistoryPoint(e, t) {
17025
+ let n = this.editor;
17026
+ if (!n || !e || e !== n && !n.contains(e)) return null;
17027
+ let r = [], i = e;
17028
+ for (; i && i !== n;) {
17029
+ let e = i.parentNode;
17030
+ if (!e) return null;
17031
+ r.unshift(Array.prototype.indexOf.call(e.childNodes, i)), i = e;
17032
+ }
17033
+ return i === n ? {
17034
+ path: r,
17035
+ offset: Math.max(0, Math.min(t, e.nodeType === Node.TEXT_NODE ? (e.textContent || "").length : e.childNodes.length))
17036
+ } : null;
17037
+ }
17038
+ resolveHistoryPoint(e) {
17039
+ let t = this.editor;
17040
+ if (!t || !e) return null;
17041
+ let n = t;
17042
+ for (let t of e.path) {
17043
+ let e = n.childNodes[Math.max(0, Math.min(t, n.childNodes.length - 1))];
17044
+ if (!e) break;
17045
+ n = e;
17046
+ }
17047
+ let r = n.nodeType === Node.TEXT_NODE ? (n.textContent || "").length : n.childNodes.length;
17048
+ return {
17049
+ node: n,
17050
+ offset: Math.max(0, Math.min(e.offset, r))
17051
+ };
17052
+ }
17053
+ captureHistorySnapshot(e) {
17054
+ if (!this.editor) return null;
17055
+ let t = this.selection, n = this.sourceMode && this.source ? {
17056
+ start: this.source.selectionStart,
17057
+ end: this.source.selectionEnd,
17058
+ direction: this.source.selectionDirection
17059
+ } : null, r = this.cleanEditorCopy(), i = this.sourceMode && this.source ? this.source.value : this.format === "markdown" ? $r(r) : r.innerHTML;
17060
+ return {
17061
+ html: r.innerHTML,
17062
+ source: i,
17063
+ anchor: this.captureHistoryPoint(t?.anchorNode || null, t?.anchorOffset || 0),
17064
+ focus: this.captureHistoryPoint(t?.focusNode || null, t?.focusOffset || 0),
17065
+ sourceSelection: n,
17066
+ group: e,
17067
+ time: Date.now()
17068
+ };
17069
+ }
17070
+ recordHistory(e) {
17071
+ if (!this.editor || this.applyingHistory) return;
17072
+ let t = e === "insertText" || e === "insertCompositionText" ? "typing" : e === "deleteContentBackward" || e === "deleteContentForward" || e === "deleteByCut" ? "deleting" : null, n = this.captureHistorySnapshot(t);
17073
+ if (!n) return;
17074
+ if (this.historyIndex < 0) {
17075
+ this.history = [n], this.historyIndex = 0, this.updateHistoryButtons();
17076
+ return;
17077
+ }
17078
+ let r = this.history[this.historyIndex];
17079
+ if (n.html === r.html && n.source === r.source) {
17080
+ n.group = t, this.history[this.historyIndex] = n, this.updateHistoryButtons();
17081
+ return;
17082
+ }
17083
+ t !== null && r.group === t && n.time - r.time <= 900 ? this.history[this.historyIndex] = n : (this.history = this.history.slice(0, this.historyIndex + 1), this.history.push(n), this.historyIndex = this.history.length - 1, this.history.length > 100 && (this.history.shift(), this.historyIndex = this.history.length - 1)), this.updateHistoryButtons();
17084
+ }
17085
+ updateHistoryButtons() {
17086
+ let e = this.historyIndex > 0 && this.historyIndex < this.history.length, t = this.historyIndex >= 0 && this.historyIndex < this.history.length - 1;
17087
+ this.undoButton && (this.undoButton.disabled = !e), this.redoButton && (this.redoButton.disabled = !t);
17088
+ }
17089
+ restoreHistorySelection(e) {
17090
+ if (this.sourceMode && this.source && e.sourceSelection) {
17091
+ let t = Math.min(e.sourceSelection.start, this.source.value.length), n = Math.min(e.sourceSelection.end, this.source.value.length);
17092
+ this.source.setSelectionRange(t, n, e.sourceSelection.direction), this.source.focus();
17093
+ return;
17094
+ }
17095
+ let t = this.selection, n = this.resolveHistoryPoint(e.anchor), r = this.resolveHistoryPoint(e.focus);
17096
+ if (!(!t || !n || !r)) if (t.removeAllRanges(), typeof t.setBaseAndExtent == "function") t.setBaseAndExtent(n.node, n.offset, r.node, r.offset);
17097
+ else {
17098
+ let e = this.editor.ownerDocument.createRange();
17099
+ e.setStart(n.node, n.offset), e.setEnd(r.node, r.offset), t.addRange(e);
17100
+ }
17101
+ }
17102
+ applyHistorySnapshot(e) {
17103
+ if (!(!this.editor || !this.source)) {
17104
+ this.applyingHistory = !0;
17105
+ try {
17106
+ this.editor.innerHTML = e.html, this.source.value = e.source, this.editor.querySelectorAll(".mint-editor-image-frame").forEach((e) => {
17107
+ e.querySelectorAll(".mint-editor-resize-handle").forEach((e) => e.remove()), e.append(this.createResizeHandle());
17108
+ }), this.selectImage(null), this.selectTable(null), this.clearInlineTypingState(), this.preservedContent = this.format === "markdown" ? e.source : e.html, this.updateWordCount(), this.restoreHistorySelection(e), this.updateSelectedImage(), this.updateSelectionUI(), this.updateHistoryButtons();
17109
+ } finally {
17110
+ this.applyingHistory = !1;
17111
+ }
17112
+ this.dispatchValueEvents();
17113
+ }
17114
+ }
17115
+ undo() {
17116
+ this.historyIndex <= 0 || (--this.historyIndex, this.applyHistorySnapshot(this.history[this.historyIndex]));
17117
+ }
17118
+ redo() {
17119
+ this.historyIndex >= this.history.length - 1 || (this.historyIndex += 1, this.applyHistorySnapshot(this.history[this.historyIndex]));
17120
+ }
17121
+ handleHistoryKeydown(e) {
17122
+ if (!(e.metaKey || e.ctrlKey) || e.altKey) return;
17123
+ let t = e.key.toLowerCase();
17124
+ t === "z" ? (e.preventDefault(), e.shiftKey ? this.redo() : this.undo()) : t === "y" && !e.shiftKey && (e.preventDefault(), this.redo());
17125
+ }
17126
+ handleHistoryBeforeInput(e) {
17127
+ return e.inputType === "historyUndo" ? (e.preventDefault(), this.undo(), !0) : e.inputType === "historyRedo" ? (e.preventDefault(), this.redo(), !0) : !1;
17128
+ }
16781
17129
  updateWordCount() {
16782
17130
  if (!this.editor || !this.count) return;
16783
17131
  let e = (this.editor.innerText || "").trim().split(/\s+/).filter(Boolean).length;
@@ -16879,21 +17227,158 @@ var Zr = class extends HTMLElement {
16879
17227
  }
16880
17228
  openLinkModal() {
16881
17229
  this.saveSelection();
16882
- let e = document.createElement("mint-modal");
16883
- e.setAttribute("heading", "Insert link"), e.setAttribute("size", "small");
16884
- let t = document.createElement("div");
16885
- t.setAttribute("slot", "body");
16886
- let n = document.createElement("mint-input");
16887
- n.setAttribute("type", "url"), n.setAttribute("label", "Link URL"), n.setAttribute("placeholder", "https://example.com"), t.append(n);
17230
+ let e = this._savedRange, t = e && !e.collapsed ? e.toString() : "", n = document.createElement("mint-modal");
17231
+ n.setAttribute("heading", "Insert link"), n.setAttribute("size", "small");
16888
17232
  let r = document.createElement("div");
16889
- r.setAttribute("slot", "actions"), r.className = "mint-editor-modal-actions";
16890
- let i = document.createElement("mint-button");
16891
- i.textContent = "Cancel", i.setAttribute("variant", "ghost"), this.setTooltip(i, "Cancel"), i.addEventListener("click", () => e.close());
16892
- let a = document.createElement("mint-button");
16893
- a.textContent = "Insert link", a.setAttribute("tone", "action"), this.setTooltip(a, "Insert link"), a.addEventListener("click", () => {
16894
- let t = String(n.value || "").trim();
16895
- t && (this.command("createLink", t), e.close());
16896
- }), r.append(i, a), e.append(t, r), this.append(e), e.open();
17233
+ r.setAttribute("slot", "body"), r.className = "mint-editor-modal-fields";
17234
+ let i = document.createElement("mint-input");
17235
+ i.setAttribute("type", "text"), i.setAttribute("label", "Link text"), i.setAttribute("placeholder", "Text to display"), t && i.setAttribute("value", t);
17236
+ let a = document.createElement("mint-input");
17237
+ a.setAttribute("type", "url"), a.setAttribute("label", "Link URL"), a.setAttribute("placeholder", "https://example.com"), r.append(i, a);
17238
+ let o = document.createElement("mint-select");
17239
+ o.className = "mint-editor-link-target", o.setAttribute("label", "Open in"), o.setAttribute("value", "same-tab"), [
17240
+ ["same-tab", "Same tab"],
17241
+ ["new-tab", "New tab"],
17242
+ ["new-window", "New window"],
17243
+ ["popup", "Popup"]
17244
+ ].forEach(([e, t]) => {
17245
+ let n = document.createElement("option");
17246
+ n.value = e, n.textContent = t, o.append(n);
17247
+ }), r.append(o);
17248
+ let s = document.createElement("mint-button");
17249
+ s.className = "mint-editor-link-advanced", s.textContent = "Advanced settings", s.setAttribute("variant", "ghost"), s.setAttribute("aria-expanded", "false"), s.hidden = !0;
17250
+ let c = document.createElement("div");
17251
+ c.className = "mint-editor-popup-settings", c.id = `${this.id || "mint-editor"}-popup-settings`, c.hidden = !0, s.setAttribute("aria-controls", c.id);
17252
+ let l = document.createElement("mint-input");
17253
+ l.setAttribute("type", "text"), l.setAttribute("label", "Window title"), l.setAttribute("placeholder", "Link popup");
17254
+ let u = document.createElement("mint-input");
17255
+ u.setAttribute("type", "number"), u.setAttribute("label", "Width"), u.setAttribute("min", "200"), u.setAttribute("max", "4000"), u.setAttribute("value", "800");
17256
+ let d = document.createElement("mint-input");
17257
+ d.setAttribute("type", "number"), d.setAttribute("label", "Height"), d.setAttribute("min", "150"), d.setAttribute("max", "4000"), d.setAttribute("value", "600");
17258
+ let f = document.createElement("mint-input");
17259
+ f.setAttribute("type", "number"), f.setAttribute("label", "Left position"), f.setAttribute("min", "0"), f.setAttribute("max", "10000"), f.setAttribute("placeholder", "Automatic");
17260
+ let p = document.createElement("mint-input");
17261
+ p.setAttribute("type", "number"), p.setAttribute("label", "Top position"), p.setAttribute("min", "0"), p.setAttribute("max", "10000"), p.setAttribute("placeholder", "Automatic");
17262
+ let m = document.createElement("mint-select");
17263
+ m.setAttribute("label", "Resizable"), m.setAttribute("value", "yes");
17264
+ let h = document.createElement("mint-select");
17265
+ h.setAttribute("label", "Scrollbars"), h.setAttribute("value", "yes"), [
17266
+ [
17267
+ m,
17268
+ "yes",
17269
+ "Yes"
17270
+ ],
17271
+ [
17272
+ m,
17273
+ "no",
17274
+ "No"
17275
+ ],
17276
+ [
17277
+ h,
17278
+ "yes",
17279
+ "Yes"
17280
+ ],
17281
+ [
17282
+ h,
17283
+ "no",
17284
+ "No"
17285
+ ]
17286
+ ].forEach(([e, t, n]) => {
17287
+ let r = document.createElement("option");
17288
+ r.value = String(t), r.textContent = String(n), e.append(r);
17289
+ }), c.append(l, u, d, f, p, m, h), s.addEventListener("click", () => {
17290
+ c.hidden = !c.hidden, s.setAttribute("aria-expanded", String(!c.hidden));
17291
+ }), o.addEventListener("change", (e) => {
17292
+ let t = String(e.detail?.value || o.value);
17293
+ s.hidden = t !== "popup", t !== "popup" && (c.hidden = !0, s.setAttribute("aria-expanded", "false"));
17294
+ }), r.append(s, c);
17295
+ let g = document.createElement("div");
17296
+ g.setAttribute("slot", "actions"), g.className = "mint-editor-modal-actions";
17297
+ let _ = document.createElement("mint-button");
17298
+ _.textContent = "Cancel", _.setAttribute("variant", "ghost"), this.setTooltip(_, "Cancel"), _.addEventListener("click", () => n.close());
17299
+ let v = document.createElement("mint-button");
17300
+ v.textContent = "Insert link", v.setAttribute("tone", "action"), this.setTooltip(v, "Insert link"), v.addEventListener("click", () => {
17301
+ let e = String(a.value || "").trim(), t = String(i.value || ""), r = String(o.value || "same-tab"), s = {
17302
+ title: String(l.value || ""),
17303
+ width: String(u.value || "800"),
17304
+ height: String(d.value || "600"),
17305
+ left: String(f.value || ""),
17306
+ top: String(p.value || ""),
17307
+ resizable: String(m.value || "yes"),
17308
+ scrollbars: String(h.value || "yes")
17309
+ };
17310
+ e && t.trim() && (this.insertLink(e, t, r, s), n.close());
17311
+ }), g.append(_, v), n.append(r, g), this.append(n), n.open();
17312
+ }
17313
+ insertLink(e, t, n, r) {
17314
+ let i = this.editor, a = this._savedRange;
17315
+ if (!i || this.sourceMode || !a || !i.contains(a.commonAncestorContainer)) return;
17316
+ let o = a.collapsed ? "" : a.toString();
17317
+ if (o && o === t) {
17318
+ let t = a.cloneRange();
17319
+ this.runHistoryTransaction(() => {
17320
+ this.command("createLink", e);
17321
+ let a = Array.from(i.querySelectorAll("a[href]")).filter((e) => {
17322
+ try {
17323
+ return t.intersectsNode(e);
17324
+ } catch {
17325
+ return !1;
17326
+ }
17327
+ }), o = this.selection?.anchorNode, s = (o?.nodeType === Node.ELEMENT_NODE ? o : o?.parentElement)?.closest("a[href]");
17328
+ (a.length ? a : s ? [s] : []).forEach((e) => this.configureLinkTarget(e, n, r)), this.emitChange();
17329
+ }), this.updateSelectionUI();
17330
+ return;
17331
+ }
17332
+ this.runHistoryTransaction(() => {
17333
+ i.focus(), this.restoreSelection();
17334
+ let a = this.selection;
17335
+ if (!a?.rangeCount) return;
17336
+ let o = a.getRangeAt(0);
17337
+ if (!i.contains(o.commonAncestorContainer)) return;
17338
+ let s = (e) => {
17339
+ let t = (e.nodeType === Node.ELEMENT_NODE ? e : e.parentElement)?.closest("a[href]");
17340
+ return t && i.contains(t) ? t : null;
17341
+ }, c = s(o.startContainer), l = s(o.endContainer), u, d;
17342
+ if (c && c === l) {
17343
+ if (d = c, o.collapsed) d.textContent = t, u = d;
17344
+ else {
17345
+ o.deleteContents();
17346
+ let e = i.ownerDocument.createTextNode(t);
17347
+ o.insertNode(e), u = e;
17348
+ }
17349
+ d.href = e;
17350
+ } else {
17351
+ d = i.ownerDocument.createElement("a"), d.href = e, o.deleteContents();
17352
+ let n = i.ownerDocument.createTextNode(t);
17353
+ d.append(n), o.insertNode(d), u = d;
17354
+ }
17355
+ this.configureLinkTarget(d, n, r), o.setStartAfter(u), o.collapse(!0), a.removeAllRanges(), a.addRange(o), this.emitChange();
17356
+ }), this.updateSelectionUI();
17357
+ }
17358
+ configureLinkTarget(e, t, n) {
17359
+ e.setAttribute("target", {
17360
+ "same-tab": "_self",
17361
+ "new-tab": "_blank",
17362
+ "new-window": "mint-editor-window",
17363
+ popup: "mint-editor-popup"
17364
+ }[t]), e.setAttribute("data-mint-editor-open", t), t === "same-tab" ? e.removeAttribute("rel") : e.setAttribute("rel", "noopener noreferrer");
17365
+ let r = {
17366
+ "data-mint-popup-title": n.title.trim().slice(0, 120),
17367
+ "data-mint-popup-width": this.normalizePopupNumber(n.width, 200, 4e3, "800"),
17368
+ "data-mint-popup-height": this.normalizePopupNumber(n.height, 150, 4e3, "600"),
17369
+ "data-mint-popup-left": this.normalizePopupNumber(n.left, 0, 1e4, ""),
17370
+ "data-mint-popup-top": this.normalizePopupNumber(n.top, 0, 1e4, ""),
17371
+ "data-mint-popup-resizable": n.resizable === "no" ? "no" : "yes",
17372
+ "data-mint-popup-scrollbars": n.scrollbars === "no" ? "no" : "yes"
17373
+ };
17374
+ Object.entries(r).forEach(([n, r]) => {
17375
+ t === "popup" && r ? e.setAttribute(n, r) : e.removeAttribute(n);
17376
+ });
17377
+ }
17378
+ normalizePopupNumber(e, t, n, r) {
17379
+ if (!e.trim()) return r;
17380
+ let i = Number.parseInt(e, 10);
17381
+ return Number.isFinite(i) ? String(Math.max(t, Math.min(n, i))) : r;
16897
17382
  }
16898
17383
  selectedTable() {
16899
17384
  let e = this._savedRange?.startContainer || this.selection?.anchorNode, t = (e?.nodeType === Node.ELEMENT_NODE ? e : e?.parentElement)?.closest("table");
@@ -16996,9 +17481,9 @@ var Zr = class extends HTMLElement {
16996
17481
  toggleSource() {
16997
17482
  if (!(!this.editor || !this.source)) {
16998
17483
  if (this.sourceMode = !this.sourceMode, this.clearInlineTypingState(), this.source.hidden = !this.sourceMode, this.editor.hidden = this.sourceMode, this.sourceMode) {
16999
- let e = this.cleanEditorCopy();
17000
- this.source.value = this.format === "markdown" ? Xr(e) : e.innerHTML;
17001
- } else this.editor.innerHTML = this.format === "markdown" ? Q(this.source.value) : this.source.value;
17484
+ let e = this.cleanEditorCopy(), t = this.format === "markdown" ? $r(e) : e.innerHTML;
17485
+ this.source.value = this.format === "markdown" ? Zr(t) : Qr(t, this.editor.ownerDocument), this.refreshCurrentHistorySnapshot(), this.preservedContent = this.source.value, this.dispatchValueEvents();
17486
+ } else this.editor.innerHTML = this.format === "markdown" ? Q(this.source.value) : this.source.value, this.syncSource(), this.emitChange();
17002
17487
  this.toolbar?.classList.toggle("mint-editor-source-active", this.sourceMode), this.updateWordCount(), this.sourceMode ? this.selectTable(null) : this.updateSelectionUI();
17003
17488
  }
17004
17489
  }
@@ -17027,6 +17512,6 @@ var Zr = class extends HTMLElement {
17027
17512
  t && this.selectImage(t);
17028
17513
  }
17029
17514
  };
17030
- customElements.get("mint-editor") || a("mint-editor", Zr);
17515
+ customElements.get("mint-editor") || a("mint-editor", ei);
17031
17516
  //#endregion
17032
- export { Rn as Alert, Cn as BackButton, Vn as BottomNavigation, gn as Button, gn as default, bn as Card, Hn as Chart, Nn as Checkbox, Un as Chip, Pn as Choice, Wn as Clickable, Gn as Collapsible, Kn as ConfirmAction, tr as DatePicker, rr as DateTimePicker, ir as Dropzone, Zr as Editor, ar as Form, kn as Grid, l as Icon, er as Input, xn as Link, Bn as MintBottomNavItem, zn as MintBottomNavigation, yr as MintSidenavActionLinks, br as MintSidenavActionMenu, _r as MintSidenavLink, vr as MintSidenavLinks, Yr as MintTree, Yr as Tree, Mn as Modal, lr as NativeSelect, Ln as Navigation, or as OffCanvas, On as Page, Dn as Popover, dr as ResourceTable, wn as ScrollFade, gr as Search, ur as Select, wr as SideNavigation, Er as Sortable, hn as Spinner, yn as Stack, _n as Switch, Dr as Tab, kr as TabContent, Or as TabList, cr as Table, Ar as Tabs, jr as Tags, vn as Text, nr as TimePicker, Mr as Toast, $n as confirm, Vr as mintui, B as observeScrollFade, Br as toast };
17517
+ export { zn as Alert, wn as BackButton, Hn as BottomNavigation, _n as Button, _n as default, xn as Card, Un as Chart, Pn as Checkbox, Wn as Chip, Fn as Choice, Gn as Clickable, Kn as Collapsible, qn as ConfirmAction, nr as DatePicker, ir as DateTimePicker, ar as Dropzone, ei as Editor, or as Form, An as Grid, l as Icon, tr as Input, Sn as Link, Vn as MintBottomNavItem, Bn as MintBottomNavigation, br as MintSidenavActionLinks, xr as MintSidenavActionMenu, vr as MintSidenavLink, yr as MintSidenavLinks, Xr as MintTree, Xr as Tree, Nn as Modal, ur as NativeSelect, Rn as Navigation, sr as OffCanvas, kn as Page, On as Popover, fr as ResourceTable, Tn as ScrollFade, _r as Search, dr as Select, Tr as SideNavigation, Dr as Sortable, gn as Spinner, bn as Stack, vn as Switch, Or as Tab, Ar as TabContent, kr as TabList, lr as Table, jr as Tabs, Mr as Tags, yn as Text, rr as TimePicker, Nr as Toast, er as confirm, Hr as mintui, B as observeScrollFade, Vr as toast };