giime 1.1.5 → 1.1.6

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 (517) hide show
  1. package/es/components/src/base/affix/Affix.vue.d.ts +2 -2
  2. package/es/components/src/base/alert/Alert.vue.d.ts +3 -3
  3. package/es/components/src/base/alert/index.d.ts +8 -8
  4. package/es/components/src/base/anchor/Anchor.vue.d.ts +1 -1
  5. package/es/components/src/base/anchor/index.d.ts +3 -3
  6. package/es/components/src/base/autocomplete/Autocomplete.vue.d.ts +11 -11
  7. package/es/components/src/base/autocomplete/autocomplete.d.ts +1 -1
  8. package/es/components/src/base/autocomplete/index.d.ts +30 -30
  9. package/es/components/src/base/badge/Badge.vue.d.ts +1 -1
  10. package/es/components/src/base/badge/index.d.ts +3 -3
  11. package/es/components/src/base/button/Button.vue.d.ts +9 -9
  12. package/es/components/src/base/button/button.d.ts +4 -4
  13. package/es/components/src/base/button/index.d.ts +23 -23
  14. package/es/components/src/base/buttonGroup/ButtonGroup.vue.d.ts +3 -3
  15. package/es/components/src/base/buttonGroup/buttonGroup.d.ts +1 -1
  16. package/es/components/src/base/buttonGroup/index.d.ts +7 -7
  17. package/es/components/src/base/carousel/Carousel.vue.d.ts +1 -1
  18. package/es/components/src/base/carousel/index.d.ts +3 -3
  19. package/es/components/src/base/cascader/Cascader.vue.d.ts +6 -6
  20. package/es/components/src/base/cascader/index.d.ts +18 -18
  21. package/es/components/src/base/chart/Chart.vue.d.ts +2 -2
  22. package/es/components/src/base/chart/index.d.ts +2 -2
  23. package/es/components/src/base/checkbox/Checkbox.vue.d.ts +2 -2
  24. package/es/components/src/base/checkbox/index.d.ts +6 -6
  25. package/es/components/src/base/checkboxButton/CheckboxButton.vue.d.ts +2 -2
  26. package/es/components/src/base/checkboxButton/index.d.ts +6 -6
  27. package/es/components/src/base/col/Col.vue.d.ts +1 -1
  28. package/es/components/src/base/col/index.d.ts +3 -3
  29. package/es/components/src/base/collapseItem/CollapseItem.vue.d.ts +1 -1
  30. package/es/components/src/base/collapseItem/index.d.ts +3 -3
  31. package/es/components/src/base/colorPicker/ColorPicker.vue.d.ts +6 -6
  32. package/es/components/src/base/colorPicker/index.d.ts +6 -6
  33. package/es/components/src/base/colorPickerPanel/ColorPickerPanel.vue.d.ts +1 -1
  34. package/es/components/src/base/colorPickerPanel/index.d.ts +1 -1
  35. package/es/components/src/base/datePicker/DatePicker.vue.d.ts +5 -5
  36. package/es/components/src/base/datePicker/index.d.ts +15 -15
  37. package/es/components/src/base/datePickerPanel/DatePickerPanel.vue.d.ts +1 -1
  38. package/es/components/src/base/datePickerPanel/index.d.ts +3 -3
  39. package/es/components/src/base/descriptions/Descriptions.vue.d.ts +1 -1
  40. package/es/components/src/base/descriptions/index.d.ts +3 -3
  41. package/es/components/src/base/descriptionsItem/DescriptionsItem.vue.d.ts +6 -6
  42. package/es/components/src/base/descriptionsItem/descriptionsItem.d.ts +2 -2
  43. package/es/components/src/base/descriptionsItem/index.d.ts +14 -14
  44. package/es/components/src/base/dialog/Dialog.vue.d.ts +3 -3
  45. package/es/components/src/base/dialog/index.d.ts +8 -8
  46. package/es/components/src/base/divider/Divider.vue.d.ts +3 -3
  47. package/es/components/src/base/divider/divider.d.ts +1 -1
  48. package/es/components/src/base/divider/index.d.ts +7 -7
  49. package/es/components/src/base/drawer/Drawer.vue.d.ts +4 -4
  50. package/es/components/src/base/drawer/index.d.ts +11 -11
  51. package/es/components/src/base/dropdown/Dropdown.vue.d.ts +7 -7
  52. package/es/components/src/base/dropdown/dropdown.d.ts +2 -2
  53. package/es/components/src/base/dropdown/index.d.ts +17 -17
  54. package/es/components/src/base/form/Form.vue.d.ts +1 -1
  55. package/es/components/src/base/form/index.d.ts +3 -3
  56. package/es/components/src/base/image/Image.vue.d.ts +3 -3
  57. package/es/components/src/base/image/index.d.ts +8 -8
  58. package/es/components/src/base/imageViewer/ImageViewer.vue.d.ts +2 -2
  59. package/es/components/src/base/imageViewer/index.d.ts +4 -4
  60. package/es/components/src/base/input/Input.vue.d.ts +14 -14
  61. package/es/components/src/base/input/index.d.ts +38 -38
  62. package/es/components/src/base/input/input.d.ts +1 -1
  63. package/es/components/src/base/inputNumber/InputNumber.vue.d.ts +12 -12
  64. package/es/components/src/base/inputNumber/index.d.ts +31 -31
  65. package/es/components/src/base/inputNumber/inputNumber.d.ts +2 -2
  66. package/es/components/src/base/inputTag/InputTag.vue.d.ts +6 -6
  67. package/es/components/src/base/inputTag/index.d.ts +17 -17
  68. package/es/components/src/base/link/Link.vue.d.ts +1 -1
  69. package/es/components/src/base/link/index.d.ts +3 -3
  70. package/es/components/src/base/mention/Mention.vue.d.ts +13 -13
  71. package/es/components/src/base/mention/index.d.ts +37 -37
  72. package/es/components/src/base/mention/mention.d.ts +1 -1
  73. package/es/components/src/base/menu/Menu.vue.d.ts +4 -4
  74. package/es/components/src/base/menu/index.d.ts +10 -10
  75. package/es/components/src/base/pagination/Pagination.vue.d.ts +1 -1
  76. package/es/components/src/base/pagination/index.d.ts +3 -3
  77. package/es/components/src/base/popconfirm/Popconfirm.vue.d.ts +8 -8
  78. package/es/components/src/base/popconfirm/index.d.ts +19 -19
  79. package/es/components/src/base/popconfirm/popconfirm.d.ts +2 -2
  80. package/es/components/src/base/popover/Popover.vue.d.ts +3 -3
  81. package/es/components/src/base/popover/index.d.ts +9 -9
  82. package/es/components/src/base/popper/Popper.vue.d.ts +3 -3
  83. package/es/components/src/base/popper/index.d.ts +7 -7
  84. package/es/components/src/base/popper/popper.d.ts +1 -1
  85. package/es/components/src/base/progress/Progress.vue.d.ts +2 -2
  86. package/es/components/src/base/progress/index.d.ts +6 -6
  87. package/es/components/src/base/radio/Radio.vue.d.ts +1 -1
  88. package/es/components/src/base/radio/index.d.ts +3 -3
  89. package/es/components/src/base/radioGroup/RadioGroup.vue.d.ts +1 -1
  90. package/es/components/src/base/radioGroup/index.d.ts +3 -3
  91. package/es/components/src/base/result/Result.vue.d.ts +1 -1
  92. package/es/components/src/base/result/index.d.ts +3 -3
  93. package/es/components/src/base/scrollbar/Scrollbar.vue.d.ts +3 -3
  94. package/es/components/src/base/scrollbar/index.d.ts +7 -7
  95. package/es/components/src/base/scrollbar/scrollbar.d.ts +1 -1
  96. package/es/components/src/base/segmented/Segmented.vue.d.ts +1 -1
  97. package/es/components/src/base/segmented/index.d.ts +3 -3
  98. package/es/components/src/base/select/Select.vue.d.ts +7 -7
  99. package/es/components/src/base/select/index.d.ts +21 -21
  100. package/es/components/src/base/selectV2/SelectV2.vue.d.ts +8 -8
  101. package/es/components/src/base/selectV2/index.d.ts +24 -24
  102. package/es/components/src/base/skeletonItem/SkeletonItem.vue.d.ts +3 -3
  103. package/es/components/src/base/skeletonItem/index.d.ts +7 -7
  104. package/es/components/src/base/skeletonItem/skeletonItem.d.ts +1 -1
  105. package/es/components/src/base/slider/Slider.vue.d.ts +2 -2
  106. package/es/components/src/base/slider/index.d.ts +5 -5
  107. package/es/components/src/base/space/Space.vue.d.ts +5 -5
  108. package/es/components/src/base/space/index.d.ts +13 -13
  109. package/es/components/src/base/space/space.d.ts +1 -1
  110. package/es/components/src/base/steps/Steps.vue.d.ts +1 -1
  111. package/es/components/src/base/steps/index.d.ts +3 -3
  112. package/es/components/src/base/switch/Switch.vue.d.ts +2 -2
  113. package/es/components/src/base/switch/index.d.ts +5 -5
  114. package/es/components/src/base/table/Table.vue.d.ts +5 -5
  115. package/es/components/src/base/table/index.d.ts +10 -10
  116. package/es/components/src/base/table/table.d.ts +2 -2
  117. package/es/components/src/base/tableColumn/TableColumn.vue.d.ts +4 -4
  118. package/es/components/src/base/tableColumn/index.d.ts +10 -10
  119. package/es/components/src/base/tableColumn/tableColumn.d.ts +1 -1
  120. package/es/components/src/base/tableV2/TableV2.vue.d.ts +3 -3
  121. package/es/components/src/base/tableV2/index.d.ts +7 -7
  122. package/es/components/src/base/tableV2/tableV2.d.ts +1 -1
  123. package/es/components/src/base/tag/Tag.vue.d.ts +3 -3
  124. package/es/components/src/base/tag/index.d.ts +8 -8
  125. package/es/components/src/base/text/Text.vue.d.ts +1 -1
  126. package/es/components/src/base/text/index.d.ts +3 -3
  127. package/es/components/src/base/timePicker/TimePicker.vue.d.ts +6 -6
  128. package/es/components/src/base/timePicker/index.d.ts +18 -18
  129. package/es/components/src/base/timeSelect/TimeSelect.vue.d.ts +6 -6
  130. package/es/components/src/base/timeSelect/index.d.ts +18 -18
  131. package/es/components/src/base/timelineItem/TimelineItem.vue.d.ts +3 -3
  132. package/es/components/src/base/timelineItem/index.d.ts +9 -9
  133. package/es/components/src/base/tooltip/Tooltip.vue.d.ts +5 -5
  134. package/es/components/src/base/tooltip/index.d.ts +13 -13
  135. package/es/components/src/base/tooltip/tooltip.d.ts +1 -1
  136. package/es/components/src/base/tour/Tour.vue.d.ts +1 -1
  137. package/es/components/src/base/tour/index.d.ts +3 -3
  138. package/es/components/src/base/tourStep/TourStep.vue.d.ts +1 -1
  139. package/es/components/src/base/tourStep/index.d.ts +3 -3
  140. package/es/components/src/base/treeSelect/TreeSelect.vue.d.ts +8 -8
  141. package/es/components/src/base/upload/Upload.vue.d.ts +6 -6
  142. package/es/components/src/base/upload/index.d.ts +16 -16
  143. package/es/components/src/base/upload/upload.d.ts +1 -1
  144. package/es/components/src/business/uploadItem/UploadItem.vue.d.ts +7 -7
  145. package/es/components/src/business/uploadItem/index.d.ts +19 -19
  146. package/es/components/src/business/uploadItem/uploadItem.d.ts +1 -1
  147. package/es/components/src/business/uploadPro/UploadPro.vue.d.ts +8 -8
  148. package/es/components/src/business/uploadPro/index.d.ts +22 -22
  149. package/es/components/src/business/uploadPro/uploadPro.d.ts +1 -1
  150. package/es/components/src/composite/dialogForm/DialogForm.vue.d.ts +14 -14
  151. package/es/components/src/composite/dialogForm/index.d.ts +40 -40
  152. package/es/components/src/composite/drawerForm/DrawerForm.vue.d.ts +18 -18
  153. package/es/components/src/composite/drawerForm/index.d.ts +52 -52
  154. package/es/components/src/composite/fileComponent/FileComponent.vue.d.ts +1 -1
  155. package/es/components/src/composite/fileComponent/index.d.ts +3 -3
  156. package/es/components/src/composite/fileList2/FileList.vue.d.ts +1 -1
  157. package/es/components/src/composite/fileList2/index.d.ts +3 -3
  158. package/es/components/src/composite/formItemModule/FormItemModule.vue.d.ts +3 -3
  159. package/es/components/src/composite/formItemModule/index.d.ts +3 -3
  160. package/es/components/src/composite/importDialog/ImportDialog.vue.d.ts +5 -5
  161. package/es/components/src/composite/importDialog/importDialog.d.ts +1 -1
  162. package/es/components/src/composite/importDialog/index.d.ts +13 -13
  163. package/es/components/src/composite/memoryForm/MemoryForm.vue.d.ts +1 -1
  164. package/es/components/src/composite/memoryForm/index.d.ts +3 -3
  165. package/es/components/src/composite/numberInterval/NumberInterval.vue.d.ts +1 -1
  166. package/es/components/src/composite/numberInterval/index.d.ts +1 -1
  167. package/es/components/src/composite/operateButton/OperateButton.vue.d.ts +3 -3
  168. package/es/components/src/composite/operateButton/index.d.ts +3 -3
  169. package/es/components/src/composite/operateButton/operateButton.d.ts +1 -1
  170. package/es/components/src/composite/previewFile/PreviewFile.vue.d.ts +1 -1
  171. package/es/components/src/composite/previewFile/index.d.ts +1 -1
  172. package/es/components/src/composite/ruleEditor/RuleEditor.vue.d.ts +1 -1
  173. package/es/components/src/composite/ruleEditor/index.d.ts +1 -1
  174. package/es/components/src/composite/searchForm/searchFormItems/cascader/SearchFormCascader.vue.d.ts +4 -4
  175. package/es/components/src/composite/searchForm/searchFormItems/cascader/index.d.ts +4 -4
  176. package/es/components/src/composite/searchForm/searchFormItems/datePicker/SearchFormDatePicker.vue.d.ts +4 -4
  177. package/es/components/src/composite/searchForm/searchFormItems/datePicker/index.d.ts +4 -4
  178. package/es/components/src/composite/searchForm/searchFormItems/input/SearchFormInput.vue.d.ts +6 -6
  179. package/es/components/src/composite/searchForm/searchFormItems/input/index.d.ts +6 -6
  180. package/es/components/src/composite/searchForm/searchFormItems/numberInterval/SearchFormNumberInterval.vue.d.ts +1 -1
  181. package/es/components/src/composite/searchForm/searchFormItems/numberInterval/index.d.ts +1 -1
  182. package/es/components/src/composite/searchForm/searchFormItems/select/SearchFormSelect.vue.d.ts +5 -5
  183. package/es/components/src/composite/searchForm/searchFormItems/select/index.d.ts +5 -5
  184. package/es/components/src/composite/searchForm/searchFormItems/selectV2/SearchFormSelectV2.vue.d.ts +5 -5
  185. package/es/components/src/composite/searchForm/searchFormItems/selectV2/index.d.ts +5 -5
  186. package/es/components/src/composite/selectOptions/SelectOptions.vue.d.ts +6 -6
  187. package/es/components/src/composite/selectOptions/index.d.ts +18 -18
  188. package/es/components/src/composite/tableCustom/TableCustom.vue.d.ts +8 -8
  189. package/es/components/src/composite/tableCustom/customOperate/customOperate.d.ts +1 -1
  190. package/es/components/src/composite/tableCustom/index.d.ts +19 -19
  191. package/es/components/src/composite/tableCustom/tableCustom.d.ts +2 -2
  192. package/es/components/src/composite/tablePro/TablePro.vue.d.ts +8 -8
  193. package/es/components/src/composite/tablePro/index.d.ts +19 -19
  194. package/es/components/src/composite/tablePro/tableColumnPro/TableColumnPro.vue.d.ts +4 -4
  195. package/es/components/src/composite/tablePro/tableColumnPro/index.d.ts +10 -10
  196. package/es/components/src/composite/tablePro/tableColumnPro/tableColumnPro.d.ts +1 -1
  197. package/es/components/src/composite/tablePro/tablePagination/TablePagination.vue.d.ts +2 -2
  198. package/es/components/src/composite/tablePro/tablePagination/index.d.ts +2 -2
  199. package/es/components/src/composite/tablePro/tablePro.d.ts +2 -2
  200. package/es/components/src/composite/uploadFile/UploadFile.vue.d.ts +9 -9
  201. package/es/components/src/composite/uploadFile/index.d.ts +25 -25
  202. package/es/components/src/composite/uploadFile/uploadFile.d.ts +1 -1
  203. package/es/components/src/plugins/message/method.d.ts +4 -4
  204. package/es/constants/key.d.ts +9 -0
  205. package/es/constants/key.mjs.map +1 -1
  206. package/es/crx/src/login/LoginPrompt.vue.d.ts +1 -1
  207. package/es/giime/index.mjs +1 -0
  208. package/es/giime/index.mjs.map +1 -1
  209. package/es/giime/makeInstaller.mjs +5 -0
  210. package/es/giime/makeInstaller.mjs.map +1 -1
  211. package/es/giime/version.d.ts +1 -1
  212. package/es/giime/version.mjs +1 -1
  213. package/es/giime/version.mjs.map +1 -1
  214. package/es/track/__tests__/reliability.test.d.ts +1 -0
  215. package/es/track/__tests__/track.test.d.ts +1 -0
  216. package/es/track/axios.d.ts +1 -0
  217. package/es/track/html.d.ts +1 -0
  218. package/es/track/index.d.ts +16 -0
  219. package/es/track/src/adapters/axios.d.ts +19 -0
  220. package/es/track/src/adapters/html.d.ts +18 -0
  221. package/es/track/src/adapters/vue2.d.ts +35 -0
  222. package/es/track/src/adapters/vue3.d.ts +69 -0
  223. package/es/track/src/collectors/click.d.ts +10 -0
  224. package/es/track/src/collectors/error.d.ts +13 -0
  225. package/es/track/src/collectors/exposure.d.ts +9 -0
  226. package/es/track/src/collectors/formAndCopy.d.ts +10 -0
  227. package/es/track/src/collectors/hover.d.ts +10 -0
  228. package/es/track/src/collectors/lifecycle.d.ts +14 -0
  229. package/es/track/src/collectors/scrollAndPath.d.ts +10 -0
  230. package/es/track/src/core/pendingStore.d.ts +7 -0
  231. package/es/track/src/core/queue.d.ts +68 -0
  232. package/es/track/src/core/session.d.ts +138 -0
  233. package/es/track/src/core/singleton.d.ts +49 -0
  234. package/es/track/src/core/tracker.d.ts +226 -0
  235. package/es/track/src/types/index.d.ts +351 -0
  236. package/es/track/src/utils/browser.d.ts +16 -0
  237. package/es/track/src/utils/dom.d.ts +89 -0
  238. package/es/track/src/utils/env.d.ts +101 -0
  239. package/es/track/src/utils/id.d.ts +80 -0
  240. package/es/track/vue2.d.ts +1 -0
  241. package/es/track/vue3.d.ts +1 -0
  242. package/es/utils/index.d.ts +1 -0
  243. package/es/utils/index.mjs +1 -0
  244. package/es/utils/index.mjs.map +1 -1
  245. package/es/utils/src/watermark/index.d.ts +191 -0
  246. package/es/utils/src/watermark/index.mjs +758 -0
  247. package/es/utils/src/watermark/index.mjs.map +1 -0
  248. package/es/watermark/__tests__/watermark.test.d.ts +1 -0
  249. package/es/watermark/auto.d.ts +7 -0
  250. package/es/watermark/index.d.ts +9 -0
  251. package/es/watermark/src/adapters/vue2.d.ts +18 -0
  252. package/es/watermark/src/adapters/vue3.d.ts +23 -0
  253. package/es/watermark/src/core.d.ts +148 -0
  254. package/es/watermark/src/iframe.d.ts +67 -0
  255. package/es/watermark/src/types.d.ts +182 -0
  256. package/es/watermark/src/user.d.ts +71 -0
  257. package/es/watermark/vue2.d.ts +10 -0
  258. package/es/watermark/vue3.d.ts +2 -0
  259. package/lib/components/src/base/affix/Affix.vue.d.ts +2 -2
  260. package/lib/components/src/base/alert/Alert.vue.d.ts +3 -3
  261. package/lib/components/src/base/alert/index.d.ts +8 -8
  262. package/lib/components/src/base/anchor/Anchor.vue.d.ts +1 -1
  263. package/lib/components/src/base/anchor/index.d.ts +3 -3
  264. package/lib/components/src/base/autocomplete/Autocomplete.vue.d.ts +11 -11
  265. package/lib/components/src/base/autocomplete/autocomplete.d.ts +1 -1
  266. package/lib/components/src/base/autocomplete/index.d.ts +30 -30
  267. package/lib/components/src/base/badge/Badge.vue.d.ts +1 -1
  268. package/lib/components/src/base/badge/index.d.ts +3 -3
  269. package/lib/components/src/base/button/Button.vue.d.ts +9 -9
  270. package/lib/components/src/base/button/button.d.ts +4 -4
  271. package/lib/components/src/base/button/index.d.ts +23 -23
  272. package/lib/components/src/base/buttonGroup/ButtonGroup.vue.d.ts +3 -3
  273. package/lib/components/src/base/buttonGroup/buttonGroup.d.ts +1 -1
  274. package/lib/components/src/base/buttonGroup/index.d.ts +7 -7
  275. package/lib/components/src/base/carousel/Carousel.vue.d.ts +1 -1
  276. package/lib/components/src/base/carousel/index.d.ts +3 -3
  277. package/lib/components/src/base/cascader/Cascader.vue.d.ts +6 -6
  278. package/lib/components/src/base/cascader/index.d.ts +18 -18
  279. package/lib/components/src/base/chart/Chart.vue.d.ts +2 -2
  280. package/lib/components/src/base/chart/index.d.ts +2 -2
  281. package/lib/components/src/base/checkbox/Checkbox.vue.d.ts +2 -2
  282. package/lib/components/src/base/checkbox/index.d.ts +6 -6
  283. package/lib/components/src/base/checkboxButton/CheckboxButton.vue.d.ts +2 -2
  284. package/lib/components/src/base/checkboxButton/index.d.ts +6 -6
  285. package/lib/components/src/base/col/Col.vue.d.ts +1 -1
  286. package/lib/components/src/base/col/index.d.ts +3 -3
  287. package/lib/components/src/base/collapseItem/CollapseItem.vue.d.ts +1 -1
  288. package/lib/components/src/base/collapseItem/index.d.ts +3 -3
  289. package/lib/components/src/base/colorPicker/ColorPicker.vue.d.ts +6 -6
  290. package/lib/components/src/base/colorPicker/index.d.ts +6 -6
  291. package/lib/components/src/base/colorPickerPanel/ColorPickerPanel.vue.d.ts +1 -1
  292. package/lib/components/src/base/colorPickerPanel/index.d.ts +1 -1
  293. package/lib/components/src/base/datePicker/DatePicker.vue.d.ts +5 -5
  294. package/lib/components/src/base/datePicker/index.d.ts +15 -15
  295. package/lib/components/src/base/datePickerPanel/DatePickerPanel.vue.d.ts +1 -1
  296. package/lib/components/src/base/datePickerPanel/index.d.ts +3 -3
  297. package/lib/components/src/base/descriptions/Descriptions.vue.d.ts +1 -1
  298. package/lib/components/src/base/descriptions/index.d.ts +3 -3
  299. package/lib/components/src/base/descriptionsItem/DescriptionsItem.vue.d.ts +6 -6
  300. package/lib/components/src/base/descriptionsItem/descriptionsItem.d.ts +2 -2
  301. package/lib/components/src/base/descriptionsItem/index.d.ts +14 -14
  302. package/lib/components/src/base/dialog/Dialog.vue.d.ts +3 -3
  303. package/lib/components/src/base/dialog/index.d.ts +8 -8
  304. package/lib/components/src/base/divider/Divider.vue.d.ts +3 -3
  305. package/lib/components/src/base/divider/divider.d.ts +1 -1
  306. package/lib/components/src/base/divider/index.d.ts +7 -7
  307. package/lib/components/src/base/drawer/Drawer.vue.d.ts +4 -4
  308. package/lib/components/src/base/drawer/index.d.ts +11 -11
  309. package/lib/components/src/base/dropdown/Dropdown.vue.d.ts +7 -7
  310. package/lib/components/src/base/dropdown/dropdown.d.ts +2 -2
  311. package/lib/components/src/base/dropdown/index.d.ts +17 -17
  312. package/lib/components/src/base/form/Form.vue.d.ts +1 -1
  313. package/lib/components/src/base/form/index.d.ts +3 -3
  314. package/lib/components/src/base/image/Image.vue.d.ts +3 -3
  315. package/lib/components/src/base/image/index.d.ts +8 -8
  316. package/lib/components/src/base/imageViewer/ImageViewer.vue.d.ts +2 -2
  317. package/lib/components/src/base/imageViewer/index.d.ts +4 -4
  318. package/lib/components/src/base/input/Input.vue.d.ts +14 -14
  319. package/lib/components/src/base/input/index.d.ts +38 -38
  320. package/lib/components/src/base/input/input.d.ts +1 -1
  321. package/lib/components/src/base/inputNumber/InputNumber.vue.d.ts +12 -12
  322. package/lib/components/src/base/inputNumber/index.d.ts +31 -31
  323. package/lib/components/src/base/inputNumber/inputNumber.d.ts +2 -2
  324. package/lib/components/src/base/inputTag/InputTag.vue.d.ts +6 -6
  325. package/lib/components/src/base/inputTag/index.d.ts +17 -17
  326. package/lib/components/src/base/link/Link.vue.d.ts +1 -1
  327. package/lib/components/src/base/link/index.d.ts +3 -3
  328. package/lib/components/src/base/mention/Mention.vue.d.ts +13 -13
  329. package/lib/components/src/base/mention/index.d.ts +37 -37
  330. package/lib/components/src/base/mention/mention.d.ts +1 -1
  331. package/lib/components/src/base/menu/Menu.vue.d.ts +4 -4
  332. package/lib/components/src/base/menu/index.d.ts +10 -10
  333. package/lib/components/src/base/pagination/Pagination.vue.d.ts +1 -1
  334. package/lib/components/src/base/pagination/index.d.ts +3 -3
  335. package/lib/components/src/base/popconfirm/Popconfirm.vue.d.ts +8 -8
  336. package/lib/components/src/base/popconfirm/index.d.ts +19 -19
  337. package/lib/components/src/base/popconfirm/popconfirm.d.ts +2 -2
  338. package/lib/components/src/base/popover/Popover.vue.d.ts +3 -3
  339. package/lib/components/src/base/popover/index.d.ts +9 -9
  340. package/lib/components/src/base/popper/Popper.vue.d.ts +3 -3
  341. package/lib/components/src/base/popper/index.d.ts +7 -7
  342. package/lib/components/src/base/popper/popper.d.ts +1 -1
  343. package/lib/components/src/base/progress/Progress.vue.d.ts +2 -2
  344. package/lib/components/src/base/progress/index.d.ts +6 -6
  345. package/lib/components/src/base/radio/Radio.vue.d.ts +1 -1
  346. package/lib/components/src/base/radio/index.d.ts +3 -3
  347. package/lib/components/src/base/radioGroup/RadioGroup.vue.d.ts +1 -1
  348. package/lib/components/src/base/radioGroup/index.d.ts +3 -3
  349. package/lib/components/src/base/result/Result.vue.d.ts +1 -1
  350. package/lib/components/src/base/result/index.d.ts +3 -3
  351. package/lib/components/src/base/scrollbar/Scrollbar.vue.d.ts +3 -3
  352. package/lib/components/src/base/scrollbar/index.d.ts +7 -7
  353. package/lib/components/src/base/scrollbar/scrollbar.d.ts +1 -1
  354. package/lib/components/src/base/segmented/Segmented.vue.d.ts +1 -1
  355. package/lib/components/src/base/segmented/index.d.ts +3 -3
  356. package/lib/components/src/base/select/Select.vue.d.ts +7 -7
  357. package/lib/components/src/base/select/index.d.ts +21 -21
  358. package/lib/components/src/base/selectV2/SelectV2.vue.d.ts +8 -8
  359. package/lib/components/src/base/selectV2/index.d.ts +24 -24
  360. package/lib/components/src/base/skeletonItem/SkeletonItem.vue.d.ts +3 -3
  361. package/lib/components/src/base/skeletonItem/index.d.ts +7 -7
  362. package/lib/components/src/base/skeletonItem/skeletonItem.d.ts +1 -1
  363. package/lib/components/src/base/slider/Slider.vue.d.ts +2 -2
  364. package/lib/components/src/base/slider/index.d.ts +5 -5
  365. package/lib/components/src/base/space/Space.vue.d.ts +5 -5
  366. package/lib/components/src/base/space/index.d.ts +13 -13
  367. package/lib/components/src/base/space/space.d.ts +1 -1
  368. package/lib/components/src/base/steps/Steps.vue.d.ts +1 -1
  369. package/lib/components/src/base/steps/index.d.ts +3 -3
  370. package/lib/components/src/base/switch/Switch.vue.d.ts +2 -2
  371. package/lib/components/src/base/switch/index.d.ts +5 -5
  372. package/lib/components/src/base/table/Table.vue.d.ts +5 -5
  373. package/lib/components/src/base/table/index.d.ts +10 -10
  374. package/lib/components/src/base/table/table.d.ts +2 -2
  375. package/lib/components/src/base/tableColumn/TableColumn.vue.d.ts +4 -4
  376. package/lib/components/src/base/tableColumn/index.d.ts +10 -10
  377. package/lib/components/src/base/tableColumn/tableColumn.d.ts +1 -1
  378. package/lib/components/src/base/tableV2/TableV2.vue.d.ts +3 -3
  379. package/lib/components/src/base/tableV2/index.d.ts +7 -7
  380. package/lib/components/src/base/tableV2/tableV2.d.ts +1 -1
  381. package/lib/components/src/base/tag/Tag.vue.d.ts +3 -3
  382. package/lib/components/src/base/tag/index.d.ts +8 -8
  383. package/lib/components/src/base/text/Text.vue.d.ts +1 -1
  384. package/lib/components/src/base/text/index.d.ts +3 -3
  385. package/lib/components/src/base/timePicker/TimePicker.vue.d.ts +6 -6
  386. package/lib/components/src/base/timePicker/index.d.ts +18 -18
  387. package/lib/components/src/base/timeSelect/TimeSelect.vue.d.ts +6 -6
  388. package/lib/components/src/base/timeSelect/index.d.ts +18 -18
  389. package/lib/components/src/base/timelineItem/TimelineItem.vue.d.ts +3 -3
  390. package/lib/components/src/base/timelineItem/index.d.ts +9 -9
  391. package/lib/components/src/base/tooltip/Tooltip.vue.d.ts +5 -5
  392. package/lib/components/src/base/tooltip/index.d.ts +13 -13
  393. package/lib/components/src/base/tooltip/tooltip.d.ts +1 -1
  394. package/lib/components/src/base/tour/Tour.vue.d.ts +1 -1
  395. package/lib/components/src/base/tour/index.d.ts +3 -3
  396. package/lib/components/src/base/tourStep/TourStep.vue.d.ts +1 -1
  397. package/lib/components/src/base/tourStep/index.d.ts +3 -3
  398. package/lib/components/src/base/treeSelect/TreeSelect.vue.d.ts +8 -8
  399. package/lib/components/src/base/upload/Upload.vue.d.ts +6 -6
  400. package/lib/components/src/base/upload/index.d.ts +16 -16
  401. package/lib/components/src/base/upload/upload.d.ts +1 -1
  402. package/lib/components/src/business/uploadItem/UploadItem.vue.d.ts +7 -7
  403. package/lib/components/src/business/uploadItem/index.d.ts +19 -19
  404. package/lib/components/src/business/uploadItem/uploadItem.d.ts +1 -1
  405. package/lib/components/src/business/uploadPro/UploadPro.vue.d.ts +8 -8
  406. package/lib/components/src/business/uploadPro/index.d.ts +22 -22
  407. package/lib/components/src/business/uploadPro/uploadPro.d.ts +1 -1
  408. package/lib/components/src/composite/dialogForm/DialogForm.vue.d.ts +14 -14
  409. package/lib/components/src/composite/dialogForm/index.d.ts +40 -40
  410. package/lib/components/src/composite/drawerForm/DrawerForm.vue.d.ts +18 -18
  411. package/lib/components/src/composite/drawerForm/index.d.ts +52 -52
  412. package/lib/components/src/composite/fileComponent/FileComponent.vue.d.ts +1 -1
  413. package/lib/components/src/composite/fileComponent/index.d.ts +3 -3
  414. package/lib/components/src/composite/fileList2/FileList.vue.d.ts +1 -1
  415. package/lib/components/src/composite/fileList2/index.d.ts +3 -3
  416. package/lib/components/src/composite/formItemModule/FormItemModule.vue.d.ts +3 -3
  417. package/lib/components/src/composite/formItemModule/index.d.ts +3 -3
  418. package/lib/components/src/composite/importDialog/ImportDialog.vue.d.ts +5 -5
  419. package/lib/components/src/composite/importDialog/importDialog.d.ts +1 -1
  420. package/lib/components/src/composite/importDialog/index.d.ts +13 -13
  421. package/lib/components/src/composite/memoryForm/MemoryForm.vue.d.ts +1 -1
  422. package/lib/components/src/composite/memoryForm/index.d.ts +3 -3
  423. package/lib/components/src/composite/numberInterval/NumberInterval.vue.d.ts +1 -1
  424. package/lib/components/src/composite/numberInterval/index.d.ts +1 -1
  425. package/lib/components/src/composite/operateButton/OperateButton.vue.d.ts +3 -3
  426. package/lib/components/src/composite/operateButton/index.d.ts +3 -3
  427. package/lib/components/src/composite/operateButton/operateButton.d.ts +1 -1
  428. package/lib/components/src/composite/previewFile/PreviewFile.vue.d.ts +1 -1
  429. package/lib/components/src/composite/previewFile/index.d.ts +1 -1
  430. package/lib/components/src/composite/ruleEditor/RuleEditor.vue.d.ts +1 -1
  431. package/lib/components/src/composite/ruleEditor/index.d.ts +1 -1
  432. package/lib/components/src/composite/searchForm/searchFormItems/cascader/SearchFormCascader.vue.d.ts +4 -4
  433. package/lib/components/src/composite/searchForm/searchFormItems/cascader/index.d.ts +4 -4
  434. package/lib/components/src/composite/searchForm/searchFormItems/datePicker/SearchFormDatePicker.vue.d.ts +4 -4
  435. package/lib/components/src/composite/searchForm/searchFormItems/datePicker/index.d.ts +4 -4
  436. package/lib/components/src/composite/searchForm/searchFormItems/input/SearchFormInput.vue.d.ts +6 -6
  437. package/lib/components/src/composite/searchForm/searchFormItems/input/index.d.ts +6 -6
  438. package/lib/components/src/composite/searchForm/searchFormItems/numberInterval/SearchFormNumberInterval.vue.d.ts +1 -1
  439. package/lib/components/src/composite/searchForm/searchFormItems/numberInterval/index.d.ts +1 -1
  440. package/lib/components/src/composite/searchForm/searchFormItems/select/SearchFormSelect.vue.d.ts +5 -5
  441. package/lib/components/src/composite/searchForm/searchFormItems/select/index.d.ts +5 -5
  442. package/lib/components/src/composite/searchForm/searchFormItems/selectV2/SearchFormSelectV2.vue.d.ts +5 -5
  443. package/lib/components/src/composite/searchForm/searchFormItems/selectV2/index.d.ts +5 -5
  444. package/lib/components/src/composite/selectOptions/SelectOptions.vue.d.ts +6 -6
  445. package/lib/components/src/composite/selectOptions/index.d.ts +18 -18
  446. package/lib/components/src/composite/tableCustom/TableCustom.vue.d.ts +8 -8
  447. package/lib/components/src/composite/tableCustom/customOperate/customOperate.d.ts +1 -1
  448. package/lib/components/src/composite/tableCustom/index.d.ts +19 -19
  449. package/lib/components/src/composite/tableCustom/tableCustom.d.ts +2 -2
  450. package/lib/components/src/composite/tablePro/TablePro.vue.d.ts +8 -8
  451. package/lib/components/src/composite/tablePro/index.d.ts +19 -19
  452. package/lib/components/src/composite/tablePro/tableColumnPro/TableColumnPro.vue.d.ts +4 -4
  453. package/lib/components/src/composite/tablePro/tableColumnPro/index.d.ts +10 -10
  454. package/lib/components/src/composite/tablePro/tableColumnPro/tableColumnPro.d.ts +1 -1
  455. package/lib/components/src/composite/tablePro/tablePagination/TablePagination.vue.d.ts +2 -2
  456. package/lib/components/src/composite/tablePro/tablePagination/index.d.ts +2 -2
  457. package/lib/components/src/composite/tablePro/tablePro.d.ts +2 -2
  458. package/lib/components/src/composite/uploadFile/UploadFile.vue.d.ts +9 -9
  459. package/lib/components/src/composite/uploadFile/index.d.ts +25 -25
  460. package/lib/components/src/composite/uploadFile/uploadFile.d.ts +1 -1
  461. package/lib/components/src/plugins/message/method.d.ts +4 -4
  462. package/lib/constants/key.d.ts +9 -0
  463. package/lib/constants/key.js.map +1 -1
  464. package/lib/crx/src/login/LoginPrompt.vue.d.ts +1 -1
  465. package/lib/giime/index.js +404 -385
  466. package/lib/giime/index.js.map +1 -1
  467. package/lib/giime/makeInstaller.js +5 -0
  468. package/lib/giime/makeInstaller.js.map +1 -1
  469. package/lib/giime/version.d.ts +1 -1
  470. package/lib/giime/version.js +1 -1
  471. package/lib/giime/version.js.map +1 -1
  472. package/lib/track/__tests__/reliability.test.d.ts +1 -0
  473. package/lib/track/__tests__/track.test.d.ts +1 -0
  474. package/lib/track/axios.d.ts +1 -0
  475. package/lib/track/html.d.ts +1 -0
  476. package/lib/track/index.d.ts +16 -0
  477. package/lib/track/src/adapters/axios.d.ts +19 -0
  478. package/lib/track/src/adapters/html.d.ts +18 -0
  479. package/lib/track/src/adapters/vue2.d.ts +35 -0
  480. package/lib/track/src/adapters/vue3.d.ts +69 -0
  481. package/lib/track/src/collectors/click.d.ts +10 -0
  482. package/lib/track/src/collectors/error.d.ts +13 -0
  483. package/lib/track/src/collectors/exposure.d.ts +9 -0
  484. package/lib/track/src/collectors/formAndCopy.d.ts +10 -0
  485. package/lib/track/src/collectors/hover.d.ts +10 -0
  486. package/lib/track/src/collectors/lifecycle.d.ts +14 -0
  487. package/lib/track/src/collectors/scrollAndPath.d.ts +10 -0
  488. package/lib/track/src/core/pendingStore.d.ts +7 -0
  489. package/lib/track/src/core/queue.d.ts +68 -0
  490. package/lib/track/src/core/session.d.ts +138 -0
  491. package/lib/track/src/core/singleton.d.ts +49 -0
  492. package/lib/track/src/core/tracker.d.ts +226 -0
  493. package/lib/track/src/types/index.d.ts +351 -0
  494. package/lib/track/src/utils/browser.d.ts +16 -0
  495. package/lib/track/src/utils/dom.d.ts +89 -0
  496. package/lib/track/src/utils/env.d.ts +101 -0
  497. package/lib/track/src/utils/id.d.ts +80 -0
  498. package/lib/track/vue2.d.ts +1 -0
  499. package/lib/track/vue3.d.ts +1 -0
  500. package/lib/utils/index.d.ts +1 -0
  501. package/lib/utils/index.js +19 -0
  502. package/lib/utils/index.js.map +1 -1
  503. package/lib/utils/src/watermark/index.d.ts +191 -0
  504. package/lib/utils/src/watermark/index.js +777 -0
  505. package/lib/utils/src/watermark/index.js.map +1 -0
  506. package/lib/watermark/__tests__/watermark.test.d.ts +1 -0
  507. package/lib/watermark/auto.d.ts +7 -0
  508. package/lib/watermark/index.d.ts +9 -0
  509. package/lib/watermark/src/adapters/vue2.d.ts +18 -0
  510. package/lib/watermark/src/adapters/vue3.d.ts +23 -0
  511. package/lib/watermark/src/core.d.ts +148 -0
  512. package/lib/watermark/src/iframe.d.ts +67 -0
  513. package/lib/watermark/src/types.d.ts +182 -0
  514. package/lib/watermark/src/user.d.ts +71 -0
  515. package/lib/watermark/vue2.d.ts +10 -0
  516. package/lib/watermark/vue3.d.ts +2 -0
  517. package/package.json +1 -1
@@ -0,0 +1,758 @@
1
+ import { watch } from 'vue';
2
+ import { until } from '@vueuse/core';
3
+ import Cookies from 'js-cookie';
4
+ import { useLoginStore } from '../../../hooks/store/useLogin/index.mjs';
5
+ import { useCurrentUserStore } from '../../../hooks/store/userCenter/useCurrentUser/index.mjs';
6
+
7
+ var __defProp = Object.defineProperty;
8
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
10
+ const GIIME_WATERMARK_GLOBAL_SYMBOL = Symbol.for("__giime.watermark.singleton__");
11
+ const WATERMARK_MESSAGE_TYPES = {
12
+ PING: "giime-watermark:ping",
13
+ PONG: "giime-watermark:pong",
14
+ SUPPRESS: "giime-watermark:suppress"
15
+ };
16
+ const WATERMARK_DOM_CONSTANTS = {
17
+ CONTAINER_ID: "__giime_watermark__",
18
+ CONTAINER_CLASS: "giime-watermark-container",
19
+ LEGACY_ITEM_CLASS: "mask_div",
20
+ ROOT_ATTR: "data-giime-watermark"
21
+ };
22
+ const sanitizeUserId = (raw) => {
23
+ if (raw === void 0 || raw === null) {
24
+ return "";
25
+ }
26
+ const str = String(raw).trim();
27
+ if (!str || str === "undefined" || str === "null" || str === "NaN") {
28
+ return "";
29
+ }
30
+ return str;
31
+ };
32
+ let storeVerifiedUserId = "";
33
+ const resolveWatermarkUserId = (config) => {
34
+ if (config?.getUserId) {
35
+ try {
36
+ const customId = sanitizeUserId(config.getUserId());
37
+ if (customId) {
38
+ return customId;
39
+ }
40
+ } catch {
41
+ }
42
+ }
43
+ const explicitId = sanitizeUserId(config?.userId);
44
+ if (explicitId) {
45
+ return explicitId;
46
+ }
47
+ if (storeVerifiedUserId) {
48
+ return storeVerifiedUserId;
49
+ }
50
+ return sanitizeUserId(Cookies.get("sso_user_id"));
51
+ };
52
+ const formatWatermarkDate = (date = /* @__PURE__ */ new Date()) => {
53
+ const year = date.getFullYear();
54
+ const monthNum = date.getMonth() + 1;
55
+ const dayNum = date.getDate();
56
+ const month = monthNum < 10 ? `0${monthNum}` : String(monthNum);
57
+ const day = dayNum < 10 ? `0${dayNum}` : String(dayNum);
58
+ return `${year}\u5E74${month}\u6708${day}\u65E5`;
59
+ };
60
+ const buildWatermarkText = (config, resolvedUserId, dateStr = formatWatermarkDate()) => {
61
+ const userId = resolvedUserId !== void 0 ? sanitizeUserId(resolvedUserId) : resolveWatermarkUserId(config);
62
+ const prefix = config.prefix || "\u5409\u5BA2\u5370";
63
+ if (typeof config.text === "function") {
64
+ return config.text({ userId, date: dateStr, prefix });
65
+ }
66
+ if (typeof config.text === "string" && config.text.trim()) {
67
+ return config.text.trim();
68
+ }
69
+ return userId ? `${prefix}-${userId}-${dateStr}` : `${prefix}-${dateStr}`;
70
+ };
71
+ const isInIframe = (win) => {
72
+ const targetWin = win ?? (typeof window !== "undefined" ? window : void 0);
73
+ if (!targetWin) {
74
+ return false;
75
+ }
76
+ try {
77
+ return targetWin.self !== targetWin.top;
78
+ } catch {
79
+ return true;
80
+ }
81
+ };
82
+ const inspectSameOriginAncestors = (win) => {
83
+ const targetWin = win ?? (typeof window !== "undefined" ? window : void 0);
84
+ if (!targetWin || !isInIframe(targetWin)) {
85
+ return { hasWatermark: false, allAncestorsAccessible: true };
86
+ }
87
+ let current = targetWin;
88
+ let depth = 0;
89
+ let allAncestorsAccessible = true;
90
+ while (current && depth < 15) {
91
+ depth++;
92
+ let parentWin = null;
93
+ try {
94
+ parentWin = current.parent;
95
+ } catch {
96
+ allAncestorsAccessible = false;
97
+ break;
98
+ }
99
+ if (!parentWin || parentWin === current) {
100
+ break;
101
+ }
102
+ try {
103
+ const anyParent = parentWin;
104
+ if (anyParent.__GIIME_WATERMARK_ACTIVE__ === true) {
105
+ return { hasWatermark: true, allAncestorsAccessible };
106
+ }
107
+ const parentDoc = parentWin.document;
108
+ if (parentDoc) {
109
+ if (parentDoc.getElementById(WATERMARK_DOM_CONSTANTS.CONTAINER_ID) || parentDoc.documentElement?.getAttribute(WATERMARK_DOM_CONSTANTS.ROOT_ATTR) === "active" || parentDoc.querySelector(`.${WATERMARK_DOM_CONSTANTS.LEGACY_ITEM_CLASS}`)) {
110
+ return { hasWatermark: true, allAncestorsAccessible };
111
+ }
112
+ } else {
113
+ allAncestorsAccessible = false;
114
+ }
115
+ } catch {
116
+ allAncestorsAccessible = false;
117
+ }
118
+ try {
119
+ if (parentWin === targetWin.top) {
120
+ break;
121
+ }
122
+ } catch {
123
+ allAncestorsAccessible = false;
124
+ break;
125
+ }
126
+ current = parentWin;
127
+ }
128
+ return { hasWatermark: false, allAncestorsAccessible };
129
+ };
130
+ const hasSameOriginAncestorWatermark = (win) => {
131
+ return inspectSameOriginAncestors(win).hasWatermark;
132
+ };
133
+ const shouldRenderWatermark = (strategy = "ancestor-detect", win) => {
134
+ const targetWin = win ?? (typeof window !== "undefined" ? window : void 0);
135
+ if (!targetWin || typeof document === "undefined") {
136
+ return { shouldRender: false, inIframe: false, needsAsyncDetect: false, reason: "ssr" };
137
+ }
138
+ if (strategy === "never") {
139
+ return { shouldRender: false, inIframe: isInIframe(targetWin), needsAsyncDetect: false, reason: "disabled" };
140
+ }
141
+ const inIframe = isInIframe(targetWin);
142
+ if (strategy === "always") {
143
+ return {
144
+ shouldRender: true,
145
+ inIframe,
146
+ needsAsyncDetect: false,
147
+ reason: inIframe ? "rendered-forced" : "rendered-top"
148
+ };
149
+ }
150
+ if (!inIframe) {
151
+ return {
152
+ shouldRender: true,
153
+ inIframe: false,
154
+ needsAsyncDetect: false,
155
+ reason: "rendered-top"
156
+ };
157
+ }
158
+ if (strategy === "top-only") {
159
+ return {
160
+ shouldRender: false,
161
+ inIframe: true,
162
+ needsAsyncDetect: false,
163
+ reason: "suppressed-in-iframe"
164
+ };
165
+ }
166
+ const { hasWatermark, allAncestorsAccessible } = inspectSameOriginAncestors(targetWin);
167
+ if (hasWatermark) {
168
+ return {
169
+ shouldRender: false,
170
+ inIframe: true,
171
+ needsAsyncDetect: false,
172
+ reason: "suppressed-by-ancestor"
173
+ };
174
+ }
175
+ return {
176
+ shouldRender: true,
177
+ inIframe: true,
178
+ needsAsyncDetect: !allAncestorsAccessible,
179
+ reason: "rendered-fallback"
180
+ };
181
+ };
182
+ const broadcastSuppressToChildFrames = (text) => {
183
+ if (typeof document === "undefined") {
184
+ return;
185
+ }
186
+ try {
187
+ const iframes = document.querySelectorAll("iframe");
188
+ const message = {
189
+ type: WATERMARK_MESSAGE_TYPES.SUPPRESS,
190
+ active: true,
191
+ text
192
+ };
193
+ iframes.forEach((iframe) => {
194
+ try {
195
+ iframe.contentWindow?.postMessage(message, "*");
196
+ } catch {
197
+ }
198
+ });
199
+ } catch {
200
+ }
201
+ };
202
+ const detectAncestorWatermarkAsync = (timeoutMs = 120) => {
203
+ if (typeof window === "undefined" || !isInIframe(window)) {
204
+ return Promise.resolve(false);
205
+ }
206
+ const { hasWatermark, allAncestorsAccessible } = inspectSameOriginAncestors(window);
207
+ if (hasWatermark) {
208
+ return Promise.resolve(true);
209
+ }
210
+ if (allAncestorsAccessible) {
211
+ return Promise.resolve(false);
212
+ }
213
+ return new Promise((resolve) => {
214
+ let settled = false;
215
+ const finish = (hasAncestor) => {
216
+ if (settled) return;
217
+ settled = true;
218
+ window.removeEventListener("message", onMessage);
219
+ clearTimeout(timer);
220
+ resolve(hasAncestor);
221
+ };
222
+ const onMessage = (event) => {
223
+ const data = event?.data;
224
+ if (data && typeof data === "object" && (data.type === WATERMARK_MESSAGE_TYPES.PONG || data.type === WATERMARK_MESSAGE_TYPES.SUPPRESS) && data.active !== false) {
225
+ finish(true);
226
+ }
227
+ };
228
+ window.addEventListener("message", onMessage);
229
+ const timer = setTimeout(() => finish(false), Math.max(20, timeoutMs));
230
+ const pingPayload = { type: WATERMARK_MESSAGE_TYPES.PING, timestamp: Date.now() };
231
+ try {
232
+ window.parent?.postMessage(pingPayload, "*");
233
+ } catch {
234
+ }
235
+ try {
236
+ if (window.top && window.top !== window.parent) {
237
+ window.top.postMessage(pingPayload, "*");
238
+ }
239
+ } catch {
240
+ }
241
+ });
242
+ };
243
+ const normalizeWatermarkOptions = (options = {}, base) => {
244
+ return {
245
+ enabled: options.enabled ?? base?.enabled ?? true,
246
+ iframeStrategy: options.iframeStrategy ?? base?.iframeStrategy ?? "ancestor-detect",
247
+ detectTimeoutMs: options.detectTimeoutMs ?? base?.detectTimeoutMs ?? 120,
248
+ prefix: options.prefix ?? base?.prefix ?? "\u5409\u5BA2\u5370",
249
+ userId: options.userId !== void 0 ? options.userId : base?.userId,
250
+ getUserId: options.getUserId ?? base?.getUserId,
251
+ text: options.text ?? base?.text,
252
+ x: options.x ?? base?.x ?? 20,
253
+ y: options.y ?? base?.y ?? 20,
254
+ rows: options.rows ?? base?.rows ?? 20,
255
+ cols: options.cols ?? base?.cols ?? 20,
256
+ xSpace: options.xSpace ?? base?.xSpace ?? 100,
257
+ ySpace: options.ySpace ?? base?.ySpace ?? 50,
258
+ color: options.color ?? base?.color ?? "#aaa",
259
+ alpha: options.alpha ?? base?.alpha ?? 0.1,
260
+ fontSize: options.fontSize ?? base?.fontSize ?? "15px",
261
+ font: options.font ?? base?.font ?? "\u5FAE\u8F6F\u96C5\u9ED1",
262
+ width: options.width ?? base?.width ?? 210,
263
+ height: options.height ?? base?.height ?? 80,
264
+ angle: options.angle ?? base?.angle ?? 20,
265
+ zIndex: options.zIndex ?? base?.zIndex ?? 9999,
266
+ antiTamper: options.antiTamper ?? base?.antiTamper ?? true,
267
+ watchResize: options.watchResize ?? base?.watchResize ?? true,
268
+ cleanLegacyMask: options.cleanLegacyMask ?? base?.cleanLegacyMask ?? true
269
+ };
270
+ };
271
+ const calculateWatermarkGrid = (config, viewportWidth, viewportHeight) => {
272
+ const cutWidth = viewportWidth * 0.015;
273
+ const pageWidth = Math.max(320, viewportWidth - cutWidth);
274
+ const pageHeight = Math.max(viewportHeight + 450, window.innerHeight ? window.innerHeight - 40 : 720);
275
+ let cols = config.cols;
276
+ let xSpace = config.xSpace;
277
+ let rows = config.rows;
278
+ let ySpace = config.ySpace;
279
+ const totalConfigWidth = Math.trunc(config.x + config.width * cols + xSpace * (cols - 1));
280
+ if (cols === 0 || totalConfigWidth > pageWidth) {
281
+ cols = Math.max(1, Math.trunc((pageWidth - config.x + xSpace) / (config.width + xSpace)));
282
+ xSpace = cols > 1 ? Math.max(0, Math.trunc((pageWidth - config.x - config.width * cols) / (cols - 1))) : 0;
283
+ }
284
+ const totalConfigHeight = Math.trunc(config.y + config.height * rows + ySpace * (rows - 1));
285
+ if (rows === 0 || totalConfigHeight > pageHeight) {
286
+ rows = Math.max(1, Math.trunc((ySpace + pageHeight - config.y) / (config.height + ySpace)));
287
+ ySpace = rows > 1 ? Math.max(0, Math.trunc((pageHeight - config.y - config.height * rows) / (rows - 1))) : 0;
288
+ }
289
+ return { cols, rows, xSpace, ySpace };
290
+ };
291
+ const removeLegacyBodyMasks = () => {
292
+ if (typeof document === "undefined" || !document.body) {
293
+ return;
294
+ }
295
+ const legacyNodes = document.body.querySelectorAll(`:scope > .${WATERMARK_DOM_CONSTANTS.LEGACY_ITEM_CLASS}`);
296
+ legacyNodes.forEach((node) => {
297
+ node.parentNode?.removeChild(node);
298
+ });
299
+ };
300
+ class GiimeWatermark {
301
+ constructor(options) {
302
+ __publicField(this, "config");
303
+ __publicField(this, "state");
304
+ __publicField(this, "containerEl", null);
305
+ __publicField(this, "mutationObserver", null);
306
+ __publicField(this, "resizeTimer", null);
307
+ __publicField(this, "isRenderingInternal", false);
308
+ __publicField(this, "listenersAttached", false);
309
+ __publicField(this, "domReadyListenerAttached", false);
310
+ __publicField(this, "handleWindowResize", () => {
311
+ if (!this.state.active || !this.config.watchResize) {
312
+ return;
313
+ }
314
+ if (this.resizeTimer) {
315
+ clearTimeout(this.resizeTimer);
316
+ }
317
+ this.resizeTimer = setTimeout(() => {
318
+ this.render();
319
+ }, 150);
320
+ });
321
+ __publicField(this, "handleWindowMessage", (event) => {
322
+ const data = event?.data;
323
+ if (!data || typeof data !== "object") {
324
+ return;
325
+ }
326
+ if (data.type === WATERMARK_MESSAGE_TYPES.PING && this.state.active) {
327
+ try {
328
+ const sourceWin = event.source;
329
+ sourceWin?.postMessage(
330
+ {
331
+ type: WATERMARK_MESSAGE_TYPES.PONG,
332
+ active: true,
333
+ text: this.state.text
334
+ },
335
+ "*"
336
+ );
337
+ } catch {
338
+ }
339
+ return;
340
+ }
341
+ if ((data.type === WATERMARK_MESSAGE_TYPES.SUPPRESS || data.type === WATERMARK_MESSAGE_TYPES.PONG) && data.active !== false && isInIframe() && this.config.iframeStrategy !== "always") {
342
+ this.suppressWatermark("suppressed-by-ancestor");
343
+ }
344
+ });
345
+ this.config = normalizeWatermarkOptions(options);
346
+ this.state = {
347
+ inIframe: isInIframe(),
348
+ active: false,
349
+ reason: "disabled",
350
+ text: "",
351
+ userId: "",
352
+ rows: 0,
353
+ cols: 0
354
+ };
355
+ this.bootstrap();
356
+ }
357
+ bootstrap() {
358
+ if (typeof window === "undefined" || typeof document === "undefined") {
359
+ this.state.reason = "ssr";
360
+ return;
361
+ }
362
+ this.attachGlobalListeners();
363
+ if (!this.config.enabled) {
364
+ this.suppressWatermark("disabled");
365
+ return;
366
+ }
367
+ const decision = shouldRenderWatermark(this.config.iframeStrategy);
368
+ this.state.inIframe = decision.inIframe;
369
+ if (!decision.shouldRender) {
370
+ this.suppressWatermark(
371
+ decision.reason
372
+ );
373
+ return;
374
+ }
375
+ if (this.config.iframeStrategy === "ancestor-detect" && decision.inIframe && decision.needsAsyncDetect) {
376
+ detectAncestorWatermarkAsync(this.config.detectTimeoutMs).then((hasAncestor) => {
377
+ if (!this.config.enabled) {
378
+ return;
379
+ }
380
+ if (hasAncestor) {
381
+ this.suppressWatermark("suppressed-by-ancestor");
382
+ } else {
383
+ this.activateWatermark("rendered-fallback");
384
+ }
385
+ });
386
+ return;
387
+ }
388
+ this.activateWatermark(decision.reason);
389
+ }
390
+ activateWatermark(reason) {
391
+ this.state.reason = reason;
392
+ this.state.active = true;
393
+ if (typeof window !== "undefined") {
394
+ window.__GIIME_WATERMARK_ACTIVE__ = true;
395
+ }
396
+ if (typeof document !== "undefined" && document.documentElement) {
397
+ document.documentElement.setAttribute(WATERMARK_DOM_CONSTANTS.ROOT_ATTR, "active");
398
+ }
399
+ if (typeof document !== "undefined" && !document.body) {
400
+ if (!this.domReadyListenerAttached) {
401
+ this.domReadyListenerAttached = true;
402
+ window.addEventListener(
403
+ "DOMContentLoaded",
404
+ () => {
405
+ this.domReadyListenerAttached = false;
406
+ if (this.state.active) {
407
+ this.render();
408
+ }
409
+ },
410
+ { once: true }
411
+ );
412
+ }
413
+ return;
414
+ }
415
+ this.render();
416
+ }
417
+ suppressWatermark(reason) {
418
+ this.state.active = false;
419
+ this.state.reason = reason;
420
+ this.state.rows = 0;
421
+ this.state.cols = 0;
422
+ this.stopMutationObserver();
423
+ if (typeof window !== "undefined") {
424
+ window.__GIIME_WATERMARK_ACTIVE__ = false;
425
+ }
426
+ if (typeof document !== "undefined") {
427
+ document.documentElement?.setAttribute(WATERMARK_DOM_CONSTANTS.ROOT_ATTR, reason);
428
+ if (this.config.cleanLegacyMask) {
429
+ removeLegacyBodyMasks();
430
+ }
431
+ const existing = document.getElementById(WATERMARK_DOM_CONSTANTS.CONTAINER_ID);
432
+ existing?.parentNode?.removeChild(existing);
433
+ }
434
+ this.containerEl = null;
435
+ }
436
+ render() {
437
+ if (typeof window === "undefined" || typeof document === "undefined" || !document.body) {
438
+ return;
439
+ }
440
+ if (!this.state.active) {
441
+ return;
442
+ }
443
+ this.isRenderingInternal = true;
444
+ this.stopMutationObserver();
445
+ try {
446
+ if (this.config.cleanLegacyMask) {
447
+ removeLegacyBodyMasks();
448
+ }
449
+ const resolvedUserId = resolveWatermarkUserId(this.config);
450
+ const dateStr = formatWatermarkDate();
451
+ const watermarkText = buildWatermarkText(this.config, resolvedUserId, dateStr);
452
+ this.state.userId = resolvedUserId;
453
+ this.state.text = watermarkText;
454
+ const viewportWidth = Math.max(
455
+ window.innerWidth || 0,
456
+ document.documentElement?.clientWidth || 0,
457
+ document.body.clientWidth || 0,
458
+ 1024
459
+ );
460
+ const viewportHeight = Math.max(
461
+ window.innerHeight || 0,
462
+ document.documentElement?.clientHeight || 0,
463
+ 768
464
+ );
465
+ const { cols, rows, xSpace, ySpace } = calculateWatermarkGrid(this.config, viewportWidth, viewportHeight);
466
+ this.state.cols = cols;
467
+ this.state.rows = rows;
468
+ let container = document.getElementById(WATERMARK_DOM_CONSTANTS.CONTAINER_ID);
469
+ if (!container) {
470
+ container = document.createElement("div");
471
+ container.id = WATERMARK_DOM_CONSTANTS.CONTAINER_ID;
472
+ container.className = WATERMARK_DOM_CONSTANTS.CONTAINER_CLASS;
473
+ container.setAttribute("data-giime-watermark-container", "true");
474
+ container.setAttribute("aria-hidden", "true");
475
+ document.body.appendChild(container);
476
+ }
477
+ container.setAttribute(
478
+ "style",
479
+ [
480
+ "position: fixed !important",
481
+ "top: 0px !important",
482
+ "left: 0px !important",
483
+ "width: 100vw !important",
484
+ "height: 100vh !important",
485
+ "overflow: hidden !important",
486
+ "pointer-events: none !important",
487
+ "user-select: none !important",
488
+ "-webkit-user-select: none !important",
489
+ `z-index: ${this.config.zIndex} !important`,
490
+ "display: block !important",
491
+ "visibility: visible !important",
492
+ "opacity: 1 !important",
493
+ "background: transparent !important"
494
+ ].join("; ")
495
+ );
496
+ const fragment = document.createDocumentFragment();
497
+ const rotateStr = `rotate(-${this.config.angle}deg)`;
498
+ for (let i = 0; i < rows; i++) {
499
+ const y = this.config.y + (ySpace + this.config.height) * i;
500
+ for (let j = 0; j < cols; j++) {
501
+ const x = this.config.x + (this.config.width + xSpace) * j;
502
+ const maskDiv = document.createElement("div");
503
+ maskDiv.id = `mask_div${i}${j}`;
504
+ maskDiv.className = WATERMARK_DOM_CONSTANTS.LEGACY_ITEM_CLASS;
505
+ maskDiv.appendChild(document.createTextNode(watermarkText));
506
+ maskDiv.style.webkitTransform = rotateStr;
507
+ maskDiv.style.MozTransform = rotateStr;
508
+ maskDiv.style.msTransform = rotateStr;
509
+ maskDiv.style.OTransform = rotateStr;
510
+ maskDiv.style.transform = rotateStr;
511
+ maskDiv.style.visibility = "";
512
+ maskDiv.style.position = "absolute";
513
+ maskDiv.style.left = `${x}px`;
514
+ maskDiv.style.top = `${y}px`;
515
+ maskDiv.style.overflow = "hidden";
516
+ maskDiv.style.zIndex = String(this.config.zIndex);
517
+ maskDiv.style.pointerEvents = "none";
518
+ maskDiv.style.opacity = String(this.config.alpha);
519
+ maskDiv.style.fontSize = this.config.fontSize;
520
+ maskDiv.style.fontFamily = /^['"]/.test(this.config.font) || this.config.font.includes(",") ? this.config.font : `"${this.config.font}"`;
521
+ maskDiv.style.color = this.config.color;
522
+ maskDiv.style.textAlign = "center";
523
+ maskDiv.style.width = `${this.config.width}px`;
524
+ maskDiv.style.height = `${this.config.height}px`;
525
+ maskDiv.style.display = "block";
526
+ fragment.appendChild(maskDiv);
527
+ }
528
+ }
529
+ container.innerHTML = "";
530
+ container.appendChild(fragment);
531
+ this.containerEl = container;
532
+ broadcastSuppressToChildFrames(watermarkText);
533
+ } finally {
534
+ this.isRenderingInternal = false;
535
+ if (this.config.antiTamper && this.state.active) {
536
+ this.startMutationObserver();
537
+ }
538
+ }
539
+ }
540
+ startMutationObserver() {
541
+ if (typeof MutationObserver === "undefined" || typeof document === "undefined" || !document.body || this.mutationObserver) {
542
+ return;
543
+ }
544
+ this.mutationObserver = new MutationObserver((mutations) => {
545
+ if (this.isRenderingInternal || !this.state.active) {
546
+ return;
547
+ }
548
+ let needRestore = false;
549
+ for (const mutation of mutations) {
550
+ if (mutation.type === "childList") {
551
+ const added = Array.from(mutation.addedNodes);
552
+ for (const node of added) {
553
+ const el = node;
554
+ if (el?.tagName === "IFRAME") {
555
+ el.addEventListener(
556
+ "load",
557
+ () => {
558
+ if (this.state.active) {
559
+ broadcastSuppressToChildFrames(this.state.text);
560
+ }
561
+ },
562
+ { once: true }
563
+ );
564
+ }
565
+ }
566
+ const removed = Array.from(mutation.removedNodes);
567
+ if (removed.some(
568
+ (node) => node === this.containerEl || node?.id === WATERMARK_DOM_CONSTANTS.CONTAINER_ID || node?.classList?.contains(WATERMARK_DOM_CONSTANTS.LEGACY_ITEM_CLASS)
569
+ )) {
570
+ needRestore = true;
571
+ break;
572
+ }
573
+ }
574
+ if (mutation.type === "attributes") {
575
+ const targetEl = mutation.target;
576
+ if (targetEl === this.containerEl || targetEl?.id === WATERMARK_DOM_CONSTANTS.CONTAINER_ID || targetEl?.classList?.contains(WATERMARK_DOM_CONSTANTS.LEGACY_ITEM_CLASS)) {
577
+ needRestore = true;
578
+ break;
579
+ }
580
+ }
581
+ }
582
+ if (needRestore) {
583
+ this.render();
584
+ }
585
+ });
586
+ this.mutationObserver.observe(document.body, { childList: true });
587
+ if (this.containerEl) {
588
+ this.mutationObserver.observe(this.containerEl, {
589
+ attributes: true,
590
+ attributeFilter: ["style", "class", "id", "hidden"],
591
+ childList: true,
592
+ subtree: true
593
+ });
594
+ }
595
+ }
596
+ stopMutationObserver() {
597
+ if (this.mutationObserver) {
598
+ this.mutationObserver.disconnect();
599
+ this.mutationObserver = null;
600
+ }
601
+ }
602
+ attachGlobalListeners() {
603
+ if (this.listenersAttached || typeof window === "undefined") {
604
+ return;
605
+ }
606
+ this.listenersAttached = true;
607
+ window.addEventListener("resize", this.handleWindowResize, { passive: true });
608
+ window.addEventListener("message", this.handleWindowMessage);
609
+ }
610
+ detachGlobalListeners() {
611
+ if (!this.listenersAttached || typeof window === "undefined") {
612
+ return;
613
+ }
614
+ this.listenersAttached = false;
615
+ window.removeEventListener("resize", this.handleWindowResize);
616
+ window.removeEventListener("message", this.handleWindowMessage);
617
+ }
618
+ updateConfig(options = {}) {
619
+ this.config = normalizeWatermarkOptions(options, this.config);
620
+ this.bootstrap();
621
+ return this;
622
+ }
623
+ setUserId(userId) {
624
+ this.config.userId = userId;
625
+ return this.refresh();
626
+ }
627
+ refresh() {
628
+ if (this.state.active) {
629
+ this.render();
630
+ } else {
631
+ this.bootstrap();
632
+ }
633
+ return this;
634
+ }
635
+ getState() {
636
+ return { ...this.state };
637
+ }
638
+ getConfig() {
639
+ return { ...this.config };
640
+ }
641
+ destroy() {
642
+ this.stopMutationObserver();
643
+ if (this.resizeTimer) {
644
+ clearTimeout(this.resizeTimer);
645
+ this.resizeTimer = null;
646
+ }
647
+ this.detachGlobalListeners();
648
+ this.suppressWatermark("disabled");
649
+ storeVerifiedUserId = "";
650
+ currentUserStoreBound = false;
651
+ const g = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : null;
652
+ if (g && g[GIIME_WATERMARK_GLOBAL_SYMBOL] === this) {
653
+ delete g[GIIME_WATERMARK_GLOBAL_SYMBOL];
654
+ }
655
+ if (typeof window !== "undefined" && window.__GIIME_WATERMARK__ === this) {
656
+ delete window.__GIIME_WATERMARK__;
657
+ }
658
+ }
659
+ }
660
+ const getWatermarkInstance = () => {
661
+ const g = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : null;
662
+ if (!g) {
663
+ return null;
664
+ }
665
+ return g[GIIME_WATERMARK_GLOBAL_SYMBOL] || null;
666
+ };
667
+ let currentUserStoreBound = false;
668
+ const autoIdentifyWatermarkUser = async (instance) => {
669
+ if (currentUserStoreBound) {
670
+ return;
671
+ }
672
+ try {
673
+ const currentUserStore = useCurrentUserStore();
674
+ const loginStore = useLoginStore();
675
+ currentUserStoreBound = true;
676
+ const hasToken = Boolean(Cookies.get("token") || loginStore.userToken);
677
+ if (hasToken && !currentUserStore.userInfo?.id && !currentUserStore.isLoading) {
678
+ currentUserStore.getUserInfo().catch(() => {
679
+ });
680
+ }
681
+ loginStore.onLoginResult(() => {
682
+ if (!currentUserStore.isLoading) {
683
+ currentUserStore.getUserInfo().catch(() => {
684
+ });
685
+ }
686
+ });
687
+ watch(
688
+ () => currentUserStore.userInfo?.id,
689
+ (newId) => {
690
+ const cleanId = sanitizeUserId(newId);
691
+ if (cleanId && cleanId !== storeVerifiedUserId) {
692
+ storeVerifiedUserId = cleanId;
693
+ if (cleanId !== instance.getState().userId) {
694
+ instance.refresh();
695
+ }
696
+ }
697
+ },
698
+ { immediate: true }
699
+ );
700
+ await until(() => currentUserStore.userInfo?.id).toBeTruthy();
701
+ const finalId = sanitizeUserId(currentUserStore.userInfo?.id);
702
+ if (finalId && finalId !== storeVerifiedUserId) {
703
+ storeVerifiedUserId = finalId;
704
+ if (finalId !== instance.getState().userId) {
705
+ instance.refresh();
706
+ }
707
+ }
708
+ } catch {
709
+ }
710
+ };
711
+ const initWatermark = (options) => {
712
+ const g = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : {};
713
+ let instance = g[GIIME_WATERMARK_GLOBAL_SYMBOL];
714
+ if (!instance) {
715
+ instance = new GiimeWatermark(options);
716
+ g[GIIME_WATERMARK_GLOBAL_SYMBOL] = instance;
717
+ if (typeof window !== "undefined") {
718
+ window.__GIIME_WATERMARK__ = instance;
719
+ }
720
+ } else if (options && Object.keys(options).length > 0) {
721
+ instance.updateConfig(options);
722
+ } else {
723
+ instance.refresh();
724
+ }
725
+ Promise.resolve().then(() => {
726
+ if (instance) {
727
+ autoIdentifyWatermarkUser(instance);
728
+ }
729
+ });
730
+ return instance;
731
+ };
732
+ const createWatermark = initWatermark;
733
+ const destroyWatermark = () => {
734
+ getWatermarkInstance()?.destroy();
735
+ };
736
+ const useWatermark = (options) => {
737
+ return initWatermark(options);
738
+ };
739
+ const Watermark = {
740
+ init: initWatermark,
741
+ create: createWatermark,
742
+ getInstance: getWatermarkInstance,
743
+ destroy: destroyWatermark,
744
+ setUserId(userId) {
745
+ return initWatermark({ userId });
746
+ },
747
+ refresh() {
748
+ return getWatermarkInstance()?.refresh() ?? initWatermark();
749
+ },
750
+ getState() {
751
+ return getWatermarkInstance()?.getState() ?? null;
752
+ },
753
+ isInIframe,
754
+ shouldRenderWatermark
755
+ };
756
+
757
+ export { GIIME_WATERMARK_GLOBAL_SYMBOL, GiimeWatermark, WATERMARK_DOM_CONSTANTS, WATERMARK_MESSAGE_TYPES, Watermark, buildWatermarkText, createWatermark, destroyWatermark, formatWatermarkDate, getWatermarkInstance, hasSameOriginAncestorWatermark, initWatermark, inspectSameOriginAncestors, isInIframe, resolveWatermarkUserId, sanitizeUserId, shouldRenderWatermark, useWatermark };
758
+ //# sourceMappingURL=index.mjs.map