@labelbee/lb-annotation 1.0.0-alpha.1

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 (241) hide show
  1. package/README.md +210 -0
  2. package/dist/_virtual/MathUtilsWorker.js +1 -0
  3. package/dist/_virtual/_rollup-plugin-web-worker-loader__helper__browser__createBase64WorkerFactory.js +2 -0
  4. package/dist/_virtual/filterBoxWorker.js +1 -0
  5. package/dist/_virtual/highlightWorker.js +1 -0
  6. package/dist/assets/attributeIcon/icon_canvasEdit0.svg.js +1 -0
  7. package/dist/assets/attributeIcon/icon_canvasEdit1.svg.js +1 -0
  8. package/dist/assets/attributeIcon/icon_canvasEdit2.svg.js +1 -0
  9. package/dist/assets/attributeIcon/icon_canvasEdit3.svg.js +1 -0
  10. package/dist/assets/attributeIcon/icon_canvasEdit4.svg.js +1 -0
  11. package/dist/assets/attributeIcon/icon_canvasEdit5.svg.js +1 -0
  12. package/dist/assets/attributeIcon/icon_canvasEdit6.svg.js +1 -0
  13. package/dist/assets/attributeIcon/icon_canvasEdit7.svg.js +1 -0
  14. package/dist/assets/attributeIcon/icon_canvasEdit8.svg.js +1 -0
  15. package/dist/assets/attributeIcon/icon_canvasEdit_miss.svg.js +1 -0
  16. package/dist/assets/attributeIcon/icon_cuboidFAB.svg.js +5 -0
  17. package/dist/assets/attributeIcon/icon_cuboidLeft.svg.js +7 -0
  18. package/dist/assets/attributeIcon/icon_cuboidMore.svg.js +5 -0
  19. package/dist/assets/attributeIcon/icon_cuboidRight.svg.js +5 -0
  20. package/dist/assets/attributeIcon/icon_cuboidTop.svg.js +12 -0
  21. package/dist/assets/attributeIcon/icon_editFEN.svg.js +1 -0
  22. package/dist/assets/attributeIcon/icon_editHUANG.svg.js +1 -0
  23. package/dist/assets/attributeIcon/icon_editLAN.svg.js +1 -0
  24. package/dist/assets/attributeIcon/icon_editLV.svg.js +1 -0
  25. package/dist/assets/attributeIcon/icon_editQING.svg.js +1 -0
  26. package/dist/constant/annotation.js +1 -0
  27. package/dist/constant/annotationTask.js +1 -0
  28. package/dist/constant/defaultConfig.js +1 -0
  29. package/dist/constant/keyCode.js +1 -0
  30. package/dist/constant/style.js +1 -0
  31. package/dist/constant/tool.js +1 -0
  32. package/dist/core/index.js +1 -0
  33. package/dist/core/pointCloud/OrbitControls.js +1 -0
  34. package/dist/core/pointCloud/PCDLoader.js +2 -0
  35. package/dist/core/pointCloud/annotation.js +1 -0
  36. package/dist/core/pointCloud/cache.js +1 -0
  37. package/dist/core/pointCloud/index.js +11 -0
  38. package/dist/core/pointCloud/matrix.js +1 -0
  39. package/dist/core/scheduler.js +1 -0
  40. package/dist/core/toolOperation/LineToolOperation.js +1 -0
  41. package/dist/core/toolOperation/ScribbleTool.js +1 -0
  42. package/dist/core/toolOperation/TextToolOperation.js +1 -0
  43. package/dist/core/toolOperation/ViewOperation.js +1 -0
  44. package/dist/core/toolOperation/basicToolOperation.js +1 -0
  45. package/dist/core/toolOperation/checkOperation.js +1 -0
  46. package/dist/core/toolOperation/cuboidOperation.js +1 -0
  47. package/dist/core/toolOperation/cuboidToggleButtonClass.js +31 -0
  48. package/dist/core/toolOperation/eventListener.js +1 -0
  49. package/dist/core/toolOperation/measureOperation.js +1 -0
  50. package/dist/core/toolOperation/pointCloud2dOperation.js +1 -0
  51. package/dist/core/toolOperation/pointOperation.js +1 -0
  52. package/dist/core/toolOperation/polygonOperation.js +1 -0
  53. package/dist/core/toolOperation/rectOperation.js +1 -0
  54. package/dist/core/toolOperation/segmentByRect.js +1 -0
  55. package/dist/core/toolOperation/tagOperation.js +19 -0
  56. package/dist/core/toolOperation/textAttributeClass.js +37 -0
  57. package/dist/index.js +1 -0
  58. package/dist/locales/constants.js +1 -0
  59. package/dist/locales/en_US/message.js +1 -0
  60. package/dist/locales/index.js +1 -0
  61. package/dist/locales/zh_CN/message.js +1 -0
  62. package/dist/newCore/CanvasScheduler.js +1 -0
  63. package/dist/types/constant/annotation.d.ts +118 -0
  64. package/dist/types/constant/annotationTask.d.ts +16 -0
  65. package/dist/types/constant/defaultConfig.d.ts +273 -0
  66. package/dist/types/constant/keyCode.d.ts +33 -0
  67. package/dist/types/constant/style.d.ts +50 -0
  68. package/dist/types/constant/tool.d.ts +194 -0
  69. package/dist/types/core/index.d.ts +105 -0
  70. package/dist/types/core/pointCloud/OrbitControls.d.ts +60 -0
  71. package/dist/types/core/pointCloud/PCDLoader.d.ts +12 -0
  72. package/dist/types/core/pointCloud/annotation.d.ts +86 -0
  73. package/dist/types/core/pointCloud/cache.d.ts +26 -0
  74. package/dist/types/core/pointCloud/filterBoxWorker.d.ts +1 -0
  75. package/dist/types/core/pointCloud/highlightWorker.d.ts +1 -0
  76. package/dist/types/core/pointCloud/index.d.ts +374 -0
  77. package/dist/types/core/pointCloud/matrix.d.ts +63 -0
  78. package/dist/types/core/scheduler.d.ts +88 -0
  79. package/dist/types/core/toolOperation/LineToolOperation.d.ts +443 -0
  80. package/dist/types/core/toolOperation/ScribbleTool.d.ts +65 -0
  81. package/dist/types/core/toolOperation/TextToolOperation.d.ts +41 -0
  82. package/dist/types/core/toolOperation/ViewOperation.d.ts +102 -0
  83. package/dist/types/core/toolOperation/basicToolOperation.d.ts +266 -0
  84. package/dist/types/core/toolOperation/checkOperation.d.ts +37 -0
  85. package/dist/types/core/toolOperation/cuboidOperation.d.ts +174 -0
  86. package/dist/types/core/toolOperation/cuboidToggleButtonClass.d.ts +38 -0
  87. package/dist/types/core/toolOperation/eventListener.d.ts +33 -0
  88. package/dist/types/core/toolOperation/measureOperation.d.ts +8 -0
  89. package/dist/types/core/toolOperation/pointCloud2dOperation.d.ts +119 -0
  90. package/dist/types/core/toolOperation/pointOperation.d.ts +135 -0
  91. package/dist/types/core/toolOperation/polygonOperation.d.ts +201 -0
  92. package/dist/types/core/toolOperation/rectOperation.d.ts +175 -0
  93. package/dist/types/core/toolOperation/segmentByRect.d.ts +31 -0
  94. package/dist/types/core/toolOperation/tagOperation.d.ts +44 -0
  95. package/dist/types/core/toolOperation/textAttributeClass.d.ts +65 -0
  96. package/dist/types/index.d.ts +37 -0
  97. package/dist/types/locales/constants.d.ts +19 -0
  98. package/dist/types/locales/en_US/message.d.ts +2 -0
  99. package/dist/types/locales/index.d.ts +4 -0
  100. package/dist/types/locales/zh_CN/message.d.ts +2 -0
  101. package/dist/types/newCore/CanvasScheduler.d.ts +31 -0
  102. package/dist/types/newCore/index.d.ts +1 -0
  103. package/dist/types/utils/ActionsHistory.d.ts +32 -0
  104. package/dist/types/utils/EventBus.d.ts +40 -0
  105. package/dist/types/utils/ImgUtils.d.ts +3 -0
  106. package/dist/types/utils/MathUtils.d.ts +172 -0
  107. package/dist/types/utils/MathUtilsWorker.d.ts +29 -0
  108. package/dist/types/utils/VectorUtils.d.ts +16 -0
  109. package/dist/types/utils/tool/AttributeUtils.d.ts +94 -0
  110. package/dist/types/utils/tool/AxisUtils.d.ts +238 -0
  111. package/dist/types/utils/tool/CanvasUtils.d.ts +46 -0
  112. package/dist/types/utils/tool/CommonToolUtils.d.ts +105 -0
  113. package/dist/types/utils/tool/CuboidUtils.d.ts +267 -0
  114. package/dist/types/utils/tool/DblClickEventListener.d.ts +47 -0
  115. package/dist/types/utils/tool/DrawUtils.d.ts +196 -0
  116. package/dist/types/utils/tool/EnhanceCommonToolUtils.d.ts +23 -0
  117. package/dist/types/utils/tool/ImgPosUtils.d.ts +34 -0
  118. package/dist/types/utils/tool/LineToolUtils.d.ts +105 -0
  119. package/dist/types/utils/tool/MarkerUtils.d.ts +27 -0
  120. package/dist/types/utils/tool/PolygonUtils.d.ts +120 -0
  121. package/dist/types/utils/tool/RectUtils.d.ts +69 -0
  122. package/dist/types/utils/tool/RenderDomClass.d.ts +24 -0
  123. package/dist/types/utils/tool/RenderDomUtils.d.ts +3 -0
  124. package/dist/types/utils/tool/StyleUtils.d.ts +15 -0
  125. package/dist/types/utils/tool/TagUtils.d.ts +54 -0
  126. package/dist/types/utils/tool/UnitUtils.d.ts +4 -0
  127. package/dist/types/utils/tool/ZoomUtils.d.ts +16 -0
  128. package/dist/types/utils/tool/polygonTool.d.ts +32 -0
  129. package/dist/types/utils/uuid.d.ts +1 -0
  130. package/dist/utils/ActionsHistory.js +1 -0
  131. package/dist/utils/ImgUtils.js +1 -0
  132. package/dist/utils/MathUtils.js +2 -0
  133. package/dist/utils/VectorUtils.js +1 -0
  134. package/dist/utils/tool/AttributeUtils.js +1 -0
  135. package/dist/utils/tool/AxisUtils.js +1 -0
  136. package/dist/utils/tool/CanvasUtils.js +1 -0
  137. package/dist/utils/tool/CommonToolUtils.js +1 -0
  138. package/dist/utils/tool/CuboidUtils.js +1 -0
  139. package/dist/utils/tool/DblClickEventListener.js +1 -0
  140. package/dist/utils/tool/DrawUtils.js +3 -0
  141. package/dist/utils/tool/EnhanceCommonToolUtils.js +1 -0
  142. package/dist/utils/tool/ImgPosUtils.js +1 -0
  143. package/dist/utils/tool/LineToolUtils.js +1 -0
  144. package/dist/utils/tool/MarkerUtils.js +1 -0
  145. package/dist/utils/tool/PolygonUtils.js +1 -0
  146. package/dist/utils/tool/RectUtils.js +1 -0
  147. package/dist/utils/tool/RenderDomClass.js +20 -0
  148. package/dist/utils/tool/RenderDomUtils.js +16 -0
  149. package/dist/utils/tool/StyleUtils.js +1 -0
  150. package/dist/utils/tool/TagUtils.js +1 -0
  151. package/dist/utils/tool/UnitUtils.js +1 -0
  152. package/dist/utils/tool/ZoomUtils.js +1 -0
  153. package/dist/utils/tool/polygonTool.js +1 -0
  154. package/dist/utils/uuid.js +1 -0
  155. package/es/_virtual/MathUtilsWorker.js +1 -0
  156. package/es/_virtual/_rollup-plugin-web-worker-loader__helper__browser__createBase64WorkerFactory.js +2 -0
  157. package/es/_virtual/filterBoxWorker.js +1 -0
  158. package/es/_virtual/highlightWorker.js +1 -0
  159. package/es/assets/attributeIcon/icon_canvasEdit0.svg.js +1 -0
  160. package/es/assets/attributeIcon/icon_canvasEdit1.svg.js +1 -0
  161. package/es/assets/attributeIcon/icon_canvasEdit2.svg.js +1 -0
  162. package/es/assets/attributeIcon/icon_canvasEdit3.svg.js +1 -0
  163. package/es/assets/attributeIcon/icon_canvasEdit4.svg.js +1 -0
  164. package/es/assets/attributeIcon/icon_canvasEdit5.svg.js +1 -0
  165. package/es/assets/attributeIcon/icon_canvasEdit6.svg.js +1 -0
  166. package/es/assets/attributeIcon/icon_canvasEdit7.svg.js +1 -0
  167. package/es/assets/attributeIcon/icon_canvasEdit8.svg.js +1 -0
  168. package/es/assets/attributeIcon/icon_canvasEdit_miss.svg.js +1 -0
  169. package/es/assets/attributeIcon/icon_cuboidFAB.svg.js +5 -0
  170. package/es/assets/attributeIcon/icon_cuboidLeft.svg.js +7 -0
  171. package/es/assets/attributeIcon/icon_cuboidMore.svg.js +5 -0
  172. package/es/assets/attributeIcon/icon_cuboidRight.svg.js +5 -0
  173. package/es/assets/attributeIcon/icon_cuboidTop.svg.js +12 -0
  174. package/es/assets/attributeIcon/icon_editFEN.svg.js +1 -0
  175. package/es/assets/attributeIcon/icon_editHUANG.svg.js +1 -0
  176. package/es/assets/attributeIcon/icon_editLAN.svg.js +1 -0
  177. package/es/assets/attributeIcon/icon_editLV.svg.js +1 -0
  178. package/es/assets/attributeIcon/icon_editQING.svg.js +1 -0
  179. package/es/constant/annotation.js +1 -0
  180. package/es/constant/annotationTask.js +1 -0
  181. package/es/constant/defaultConfig.js +1 -0
  182. package/es/constant/keyCode.js +1 -0
  183. package/es/constant/style.js +1 -0
  184. package/es/constant/tool.js +1 -0
  185. package/es/core/index.js +1 -0
  186. package/es/core/pointCloud/OrbitControls.js +1 -0
  187. package/es/core/pointCloud/PCDLoader.js +2 -0
  188. package/es/core/pointCloud/annotation.js +1 -0
  189. package/es/core/pointCloud/cache.js +1 -0
  190. package/es/core/pointCloud/index.js +11 -0
  191. package/es/core/pointCloud/matrix.js +1 -0
  192. package/es/core/scheduler.js +1 -0
  193. package/es/core/toolOperation/LineToolOperation.js +1 -0
  194. package/es/core/toolOperation/ScribbleTool.js +1 -0
  195. package/es/core/toolOperation/TextToolOperation.js +1 -0
  196. package/es/core/toolOperation/ViewOperation.js +1 -0
  197. package/es/core/toolOperation/basicToolOperation.js +1 -0
  198. package/es/core/toolOperation/checkOperation.js +1 -0
  199. package/es/core/toolOperation/cuboidOperation.js +1 -0
  200. package/es/core/toolOperation/cuboidToggleButtonClass.js +31 -0
  201. package/es/core/toolOperation/eventListener.js +1 -0
  202. package/es/core/toolOperation/measureOperation.js +1 -0
  203. package/es/core/toolOperation/pointCloud2dOperation.js +1 -0
  204. package/es/core/toolOperation/pointOperation.js +1 -0
  205. package/es/core/toolOperation/polygonOperation.js +1 -0
  206. package/es/core/toolOperation/rectOperation.js +1 -0
  207. package/es/core/toolOperation/segmentByRect.js +1 -0
  208. package/es/core/toolOperation/tagOperation.js +19 -0
  209. package/es/core/toolOperation/textAttributeClass.js +37 -0
  210. package/es/index.js +1 -0
  211. package/es/locales/constants.js +1 -0
  212. package/es/locales/en_US/message.js +1 -0
  213. package/es/locales/index.js +1 -0
  214. package/es/locales/zh_CN/message.js +1 -0
  215. package/es/newCore/CanvasScheduler.js +1 -0
  216. package/es/utils/ActionsHistory.js +1 -0
  217. package/es/utils/ImgUtils.js +1 -0
  218. package/es/utils/MathUtils.js +2 -0
  219. package/es/utils/VectorUtils.js +1 -0
  220. package/es/utils/tool/AttributeUtils.js +1 -0
  221. package/es/utils/tool/AxisUtils.js +1 -0
  222. package/es/utils/tool/CanvasUtils.js +1 -0
  223. package/es/utils/tool/CommonToolUtils.js +1 -0
  224. package/es/utils/tool/CuboidUtils.js +1 -0
  225. package/es/utils/tool/DblClickEventListener.js +1 -0
  226. package/es/utils/tool/DrawUtils.js +3 -0
  227. package/es/utils/tool/EnhanceCommonToolUtils.js +1 -0
  228. package/es/utils/tool/ImgPosUtils.js +1 -0
  229. package/es/utils/tool/LineToolUtils.js +1 -0
  230. package/es/utils/tool/MarkerUtils.js +1 -0
  231. package/es/utils/tool/PolygonUtils.js +1 -0
  232. package/es/utils/tool/RectUtils.js +1 -0
  233. package/es/utils/tool/RenderDomClass.js +20 -0
  234. package/es/utils/tool/RenderDomUtils.js +16 -0
  235. package/es/utils/tool/StyleUtils.js +1 -0
  236. package/es/utils/tool/TagUtils.js +1 -0
  237. package/es/utils/tool/UnitUtils.js +1 -0
  238. package/es/utils/tool/ZoomUtils.js +1 -0
  239. package/es/utils/tool/polygonTool.js +1 -0
  240. package/es/utils/uuid.js +1 -0
  241. package/package.json +103 -0
@@ -0,0 +1,16 @@
1
+ import { EGrowthMode } from '../../constant/annotation';
2
+ export default class ZoomUtils {
3
+ static zoomChanged: (zoom: number, isZoomIn: boolean, growthMode?: EGrowthMode) => number;
4
+ static wheelChangePos: (imgNode: HTMLImageElement, coord: ICoordinate, operator: 1 | -1 | 0, oldCurrentPos: ICoordinate, options?: Partial<{
5
+ zoom: number;
6
+ innerZoom: number;
7
+ basicZoom: number;
8
+ zoomMax: number;
9
+ rotate: number;
10
+ }>) => {
11
+ currentPos: ICoordinate;
12
+ zoom: number;
13
+ imgInfo: ISize;
14
+ ratio: number;
15
+ } | null;
16
+ }
@@ -0,0 +1,32 @@
1
+ import { ELineTypes } from '../../constant/tool';
2
+ import { IPolygonPoint } from '../../types/tool/polygon';
3
+ export declare function createSmoothCurvePoints(points: any[], tension?: number, closed?: boolean, numberOfSegments?: number): any[];
4
+ /**
5
+ * 通过数据转换为平滑曲线的点提交 [{x: number, y: number}...] => [x, ...smoothCurvePoints ,y]
6
+ * @param pointList
7
+ * @returns {Array<number>}
8
+ */
9
+ export declare const createSmoothCurvePointsFromPointList: (pointList: Array<{
10
+ x: number;
11
+ y: number;
12
+ }>, numberOfSegments?: number) => any[];
13
+ /**
14
+ * 获取当前的坐标是否在多边形内
15
+ *
16
+ * @export
17
+ * @param {IPolygonPoint} checkPoint
18
+ * @param {IPolygonPoint[]} polygonPoints
19
+ * @returns {boolean}
20
+ */
21
+ export declare function isInPolygon(checkPoint: IPolygonPoint, polygonPoints: IPolygonPoint[], lineType?: ELineTypes): boolean;
22
+ /**
23
+ * 获取当 zoom 更改后的 pointList
24
+ * @param pointList
25
+ * @param zoom
26
+ */
27
+ export declare function getPolygonPointUnderZoom(pointList: IPolygonPoint[], zoom?: number): {
28
+ x: number;
29
+ y: number;
30
+ specialPoint?: boolean | undefined;
31
+ specialEdge?: boolean | undefined;
32
+ }[];
@@ -0,0 +1 @@
1
+ export default function uuid(len?: number, radix?: number): string;
@@ -0,0 +1 @@
1
+ "use strict";var _=require("lodash");function _interopDefaultLegacy(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var ___default=_interopDefaultLegacy(_);class ActionsHistory{constructor(e){this.record=[],this.recordIndex=-1,this.minRecordIndex=-1,this.emitHistoryChanged=()=>{this.historyChanged&&(this.constructor.name==="ActionsHistory"?!0:this.record.length>0)&&this.historyChanged(this.undoEnabled,this.redoEnabled)},this.historyChanged=e}get undoEnabled(){return this.recordIndex>this.minRecordIndex}get redoEnabled(){return this.recordIndex<this.record.length-1}pushHistory(e){if(this.recordIndex!==this.record.length-1){const r=this.record.slice(0,Math.min(this.recordIndex+1,this.record.length));this.record=r}this.record.push(___default.default.cloneDeepWith(e)),this.recordIndex+=1,this.emitHistoryChanged()}updateHistory(e){this.record[this.recordIndex]=___default.default.cloneDeep(e)}applyAttribute(e,r,i){e&&this.record.forEach(s=>{const d=s.find(o=>o.id===e);d&&(d[r]=i)})}undo(){if(this.undoEnabled)return this.recordIndex-=1,this.emitHistoryChanged(),___default.default.cloneDeep(this.record[this.recordIndex])||[]}redo(){if(this.redoEnabled)return this.recordIndex+=1,this.emitHistoryChanged(),___default.default.cloneDeep(this.record[this.recordIndex])}init(){this.record=[[]],this.recordIndex=0,this.emitHistoryChanged()}empty(){this.record=[],this.recordIndex=-1,this.emitHistoryChanged()}initRecord(e,r=!1){const i=e.length>0||r;this.record=i?[___default.default.cloneDeep(e)]:[],this.minRecordIndex=i?0:-1,this.recordIndex=0}}module.exports=ActionsHistory;
@@ -0,0 +1 @@
1
+ "use strict";class ImgUtils{static load(s){return new Promise((o,r)=>{const e=new Image;e.crossOrigin="anonymous",s.startsWith("file")?e.src=encodeURI(s):e.src=s,e.onload=()=>{o(e)},e.onerror=()=>{r(e)}})}}module.exports=ImgUtils;
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var MathUtilsWorker=require("../_virtual/MathUtilsWorker.js"),tool=require("../constant/tool.js"),polygonTool=require("./tool/polygonTool.js"),PolygonUtils=require("./tool/PolygonUtils.js"),VectorUtils=require("./VectorUtils.js"),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,o)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,__spreadValues=(e,t)=>{for(var o in t||(t={}))__hasOwnProp.call(t,o)&&__defNormalProp(e,o,t[o]);if(__getOwnPropSymbols)for(var o of __getOwnPropSymbols(t))__propIsEnum.call(t,o)&&__defNormalProp(e,o,t[o]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t));class Trigonometric{static tanAPlusB(t,o){return(t+o)/(1-t*o)}static sinAPlusB(t,o,s,r){return r*t+o*s}static cosAPlusB(t,o,s,r){return o*r-t*s}}const _MathUtils=class{static getRotate(e){return e+90>=360?e+90-360:e+90}static getLineLength(e,t){return Math.sqrt(Math.pow(t.y-e.y,2)+Math.pow(t.x-e.x,2))}static getTextArea(e,t,o=tool.DEFAULT_TEXT_MAX_WIDTH,s=tool.DEFAULT_FONT,r){if(typeof t!="string")return{width:0,height:0};const i=e.getContext("2d");i.font=s;let n=0;typeof r=="undefined"&&(r=e&&parseInt(window.getComputedStyle(e).lineHeight,10)||parseInt(window.getComputedStyle(document.body).lineHeight,10));const a=e&&parseInt(window.getComputedStyle(e).fontSize,10)||parseInt(window.getComputedStyle(document.body).fontSize,10)||0,c=t.split(`
2
+ `);let l=0;for(let u=0;u<c.length;u++){const p=c[u].split("");let g="";for(let y=0;y<p.length;y++){const f=g+p[y],h=i.measureText(f).width;h>o&&y>0?(g=p[y],n+=r,l=o):(g=f,h>l&&(l=h))}u!==c.length-1&&(n+=r)}return{width:l,height:n+a,lineHeight:r,fontHeight:a}}static getLineCenterPoint(e){const[t,o]=e,s=VectorUtils.getVector(t,o);return{x:t.x+s.x/2,y:t.y+s.y/2}}static getPerpendicularLine(e){if(e.length!==2)return;const[t,o]=e,s={x:o.x+o.y-t.y,y:o.y-(o.x-t.x)};return[o,s]}static getPerpendicularFootOfLine(e,t){if(e.length!==2)return e;const o=this.getPerpendicularLine(e);if(!o)return e;const[s,r]=o;return this.getFootOfPerpendicular(t,s,r).footPoint}static getQuadrangleFromTriangle(e){if(e.length!==3)return e;const[t,o,s]=e,r={x:s.x+t.x-o.x,y:s.y+t.y-o.y};return[t,o,s,r]}static getRectPerpendicularOffset(e,t,o){const[s,r]=o,i=this.getFootOfPerpendicular(e,s,r).footPoint,n=this.getFootOfPerpendicular(t,s,r).footPoint,a={x:i.x-n.x,y:i.y-n.y},c=VectorUtils.add(t,a);return VectorUtils.getVector(e,c)}static getArrayIndex(e,t){return e<0?t+e:e>=t?e-t:e}static getPointListFromPointOffset(e,t,o){const s=this.getArrayIndex(t-1,e.length),r=this.getArrayIndex(t+1,e.length),i=this.getArrayIndex(t-2,e.length),n=[...e];n[t]=VectorUtils.add(n[t],o);const a=this.getFootOfPerpendicular(n[t],n[i],n[s]).footPoint,c=this.getFootOfPerpendicular(n[t],n[r],n[i]).footPoint;return n[s]=a,n[r]=c,n}static getRectCenterPoint(e){const[t,,o]=e;return{x:(t.x+o.x)/2,y:(t.y+o.y)/2}}static rotateRectPointList(e=5,t){const o=this.getRectCenterPoint(t),{PI:s}=Math,r=Math.sin(e*s/180),i=Math.cos(e*s/180);return t.map(n=>{const a=VectorUtils.getVector(o,n),c=VectorUtils.len(a),l=a.y/c,u=a.x/c;return{x:c*Trigonometric.cosAPlusB(l,u,r,i)+o.x,y:c*Trigonometric.sinAPlusB(l,u,r,i)+o.y}})}static getRectangleByRightAngle(e,t){if(t.length!==2)return t;const o=_MathUtils.getPerpendicularFootOfLine(t,e);return _MathUtils.getQuadrangleFromTriangle([...t,o])}static getRadiusFromQuadrangle(e){const[,t,o]=e,s=o.y-t.y,r=t.x-o.x,i=this.getLineLength(t,o),n=s/i,a=Math.acos(n);return r>0?Math.PI*2-a:a}static getCollectionPointByAnnotationDataPromise(e){const t=e.filter(r=>r.type==="point").map(r=>r.annotation),o=e.filter(r=>!!["polygon","line"].includes(r.type)).map(r=>r.type==="polygon"?__spreadProps(__spreadValues({},r.annotation),{pointList:PolygonUtils.concatBeginAndEnd(r.annotation.pointList)}):r.annotation),s=new MathUtilsWorker;return{promise:new Promise(function(i){s.postMessage({points:t,backgroundList:o}),s.onmessage=n=>{i(n.data),s.terminate()}}),close:()=>{s.terminate()}}}static getCollectionPointByAnnotationData(e){const t=[],o=new Set,s=e.filter(n=>n.type==="point").map(n=>n.annotation),r=e.filter(n=>!!["polygon","line"].includes(n.type)).map(n=>n.type==="polygon"?__spreadProps(__spreadValues({},n.annotation),{pointList:PolygonUtils.concatBeginAndEnd(n.annotation.pointList)}):n.annotation),i=(n,a)=>{const{dropFoot:c}=PolygonUtils.getClosestPoint(n,a,tool.ELineTypes.Line,1,{isClose:!1});if(c!==n){const l=`${c.x} + ${c.y}`;o.has(l)||t.push(n),o.add(l)}};return s.forEach(n=>{i(n,r)}),r.forEach(n=>{let a="";a=n.id,r.forEach((c,l)=>{if(c.id===a)return;const u=[...r];u.splice(l,1),c.pointList.forEach(p=>{i(p,u)})})}),{connectionPoints:t}}};let MathUtils=_MathUtils;MathUtils.isInRange=(e,t)=>{const o=Math.min(...t),s=Math.max(...t),r=n=>n<=s&&n>=o;return(Array.isArray(e)?e:[e]).every(n=>r(n))},MathUtils.withinRange=(e,t)=>{const o=Math.min(...t),s=Math.max(...t);return e>s?s:e<o?o:e},MathUtils.calcViewportBoundaries=(e,t=!1,o=tool.SEGMENT_NUMBER,s=1)=>{if(!e)return{top:0,bottom:0,left:0,right:0};const r=20/s,i=[],n=[];let a=e;t&&(a=polygonTool.createSmoothCurvePointsFromPointList(e,o)),a.forEach(({x:f,y:d})=>{i.push(f),n.push(d)});let c=Math.min(...i),l=Math.max(...i),u=Math.min(...n),p=Math.max(...n);const g=l-c,y=p-u;if(g<r){const f=(r-g)/2;c-=f,l+=f}if(y<r){const f=(r-y)/2;u-=f,p+=f}return{top:u,bottom:p,left:c,right:l}},MathUtils.getFootOfPerpendicular=(e,t,o,s=!1,r=!1)=>{let i={x:0,y:0};const n=t.x-o.x,a=t.y-o.y;if(Math.abs(n)<1e-8&&Math.abs(a)<1e-8)return i=t,i;let c=(e.x-t.x)*(t.x-o.x)+(e.y-t.y)*(t.y-o.y);c/=n*n+a*a,i.x=t.x+c*n,i.y=t.y+c*a;const l=_MathUtils.getLineLength(e,i),u=2,p=Math.min(t.x,o.x),g=Math.max(t.x,o.x),y=Math.min(t.y,o.y),f=Math.max(t.y,o.y),d=!(_MathUtils.isInRange(e.x,[p,g])||_MathUtils.isInRange(e.y,[y,f])),h=e.x>g+u||e.x<p-u||e.y>f+u||e.y<y-u;return!r&&(s?d:h)?{footPoint:i,length:Infinity}:{footPoint:i,length:l}};var MathUtils$1=MathUtils;exports.Trigonometric=Trigonometric,exports.default=MathUtils$1;
@@ -0,0 +1 @@
1
+ "use strict";var __pow=Math.pow;class Vector{static add(t,r){return{x:t.x+r.x,y:t.y+r.y}}static getVector(t,r){return{x:r.x-t.x,y:r.y-t.y}}static len(t){return Math.sqrt(__pow(t.x,2)+__pow(t.y,2))}static dotProduct(t,r){return t.x*r.x+t.y+r.y}}module.exports=Vector;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _=require("lodash"),lbUtils=require("@labelbee/lb-utils"),style=require("../../constant/style.js"),tool=require("../../constant/tool.js"),index=require("../../locales/index.js"),constants=require("../../locales/constants.js"),MathUtils=require("../MathUtils.js"),icon_canvasEdit_miss=require("../../assets/attributeIcon/icon_canvasEdit_miss.svg.js"),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(s,t,e)=>t in s?__defProp(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e,__spreadValues=(s,t)=>{for(var e in t||(t={}))__hasOwnProp.call(t,e)&&__defNormalProp(s,e,t[e]);if(__getOwnPropSymbols)for(var e of __getOwnPropSymbols(t))__propIsEnum.call(t,e)&&__defNormalProp(s,e,t[e]);return s},__spreadProps=(s,t)=>__defProps(s,__getOwnPropDescs(t));const REGEXP_NUMBER="^[0-9]+$",REGEXP_ENGLISH="^[A-Za-z]+$";class AttributeUtils{static getAttributeIcon(t,e,r=!0){var n;const a=e.findIndex(l=>l.value===t);let i=(n=style.ICON_ARRAY[a%style.ICON_ARRAY.length])!=null?n:style.NULL_ICON;r||(i=icon_canvasEdit_miss),i="";const u=new Image;return u.src=i,u}static checkString(t,e){let r="";switch(t){case tool.ETextType.Order:case tool.ETextType.NumberOnly:r=REGEXP_NUMBER;break;case tool.ETextType.EnglishOnly:r=REGEXP_ENGLISH;break;case tool.ETextType.CustomFormat:r=e;break}return r}static checkTextAttibute(t,e){if(t===void 0||t==="")return!0;try{return new RegExp(e).test(t)}catch(r){return!1}}static getAttributeShowText(t,e=[]){var r,n;try{const a=e.findIndex(i=>i.value===t);return(n=(r=e[a])==null?void 0:r.key)!=null?n:t}catch(a){return t}}static getAttributeIndex(t,e){try{const r=e.findIndex(n=>n.value===t);return r>=8?r%8:r}catch(r){return-1}}static getAttributeColor(t,e){try{const r=this.getAttributeIndex(t,e);return r===-1?style.NULL_COLOR:style.COLORS_ARRAY[r%style.COLORS_ARRAY.length]}catch(r){return style.NULL_COLOR}}static getTextAttribute(t,e){try{if(e===tool.ETextType.Order){const r=t.map(a=>parseInt(a.textAttribute,10)).filter(a=>_.isNumber(a)&&a<Number.MAX_SAFE_INTEGER&&a>=0);return r.sort((a,i)=>a-i),`${(r.pop()||0)+1}`}return""}catch(r){return""}}static textChange(t,e,r){return r.map(n=>n.id===e?__spreadProps(__spreadValues({},n),{textAttribute:t}):n)}static getErrorNotice(t,e){switch(t){case tool.ETextType.Order:case tool.ETextType.NumberOnly:return index.getMessagesByLocale(constants.EMessage.TextCheckNumberErrorNotice,e);case tool.ETextType.EnglishOnly:return index.getMessagesByLocale(constants.EMessage.TextCheckEnglishErrorNotice,e);case tool.ETextType.CustomFormat:return index.getMessagesByLocale(constants.EMessage.TextCheckCustomErrorNotice,e);default:return""}}static textAttributeValidate(t,e,r){try{return new RegExp(this.checkString(t,e)).test(r)}catch(n){}}static checkTextAttribute(t,e,r,n){let a=!1;return r.forEach(i=>{(i==null?void 0:i.textAttribute)===void 0||(i==null?void 0:i.textAttribute)===""||(n?i.id===n:!0)&&!this.textAttributeValidate(t,e,i.textAttribute)&&(a=!0)}),!!a}static changeTextAttributeInLog(t,e){return t==null?void 0:t.map(r=>r==null?void 0:r.map(n=>{if((e==null?void 0:e.findIndex(a=>(a==null?void 0:a.id)===(n==null?void 0:n.id)))>-1){const a=e==null?void 0:e.find(i=>(i==null?void 0:i.id)===(n==null?void 0:n.id));return __spreadProps(__spreadValues({},n),{textAttribute:a==null?void 0:a.textAttribute})}return n}))}static getTextIconSvg(t="",e,r=!1,n){var a;if(r===!0){const i=(e==null?void 0:e.findIndex(l=>(l==null?void 0:l.value)===t))%style.COLORS_ARRAY.length+1,u=(a=e==null?void 0:e.find(l=>l.value===t))==null?void 0:a.color;if(u){const l=lbUtils.ToolStyleUtils.rgbaStringToHex(u);return this.generateIconAttribute({fill:l})}return style.ICON_ARRAY[i]}return n}static generateIconAttribute({fill:t,width:e=16,height:r=16,xmlns:n="http://www.w3.org/2000/svg",xlink:a="http://www.w3.org/1999/xlink"}){return`<span style={color:${t}}><svg xmlns=${n} xmlns:xlink=${a} width=${e} height=${r} viewBox="0 0 16 16"><defs><clipPath id="a"><path d="M0,0H16V-16H0Z" fill="none"/></clipPath><clipPath id="b"><path d="M13.75-2.937H2.25a.5.5,0,0,0-.5.5v.563a.125.125,0,0,0,.125.125h12.25a.125.125,0,0,0,.125-.125v-.562A.5.5,0,0,0,13.75-2.937ZM4.027-4.25a.632.632,0,0,0,.094-.008l2.628-.461a.153.153,0,0,0,.083-.044l6.623-6.623a.156.156,0,0,0,0-.22l-2.6-2.6a.155.155,0,0,0-.111-.045.155.155,0,0,0-.111.045L4.012-7.581a.159.159,0,0,0-.044.083L3.508-4.87a.524.524,0,0,0,.147.466.529.529,0,0,0,.372.155Z" fill="none"/></clipPath></defs><g transform="translate(0 16)"><g clip-path="url(#a)"><path d="M-5-21H21V5H-5Z" fill="rgba(0,0,0,0)"/></g><g clip-path="url(#b)"><path d="M-3.25-19.25h22.5V3.25H-3.25Z" fill='currentColor'/></g></g></svg></span>`}static getAttributeByKeycode(t,e){var r;let n;return MathUtils.default.isInRange(t,[48,57])&&(n=t-48),MathUtils.default.isInRange(t,[96,105])&&(n=t-96),n===0?"":n?(r=e[n-1])==null?void 0:r.value:void 0}}exports.REGEXP_ENGLISH=REGEXP_ENGLISH,exports.REGEXP_NUMBER=REGEXP_NUMBER,exports.default=AttributeUtils;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var tool=require("../../constant/tool.js"),MathUtils=require("../MathUtils.js"),PolygonUtils=require("./PolygonUtils.js"),LineToolUtils=require("./LineToolUtils.js"),CuboidUtils=require("./CuboidUtils.js"),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(h,t,e)=>t in h?__defProp(h,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):h[t]=e,__spreadValues=(h,t)=>{for(var e in t||(t={}))__hasOwnProp.call(t,e)&&__defNormalProp(h,e,t[e]);if(__getOwnPropSymbols)for(var e of __getOwnPropSymbols(t))__propIsEnum.call(t,e)&&__defNormalProp(h,e,t[e]);return h},__spreadProps=(h,t)=>__defProps(h,__getOwnPropDescs(t));class AxisUtils{static getOffsetCoordinate(t,e,i){return{x:t.x*i+e.x,y:t.y*i+e.y}}static changeDrawOutsideTarget(t,e,i,s,n,o){return typeof s=="boolean"&&!s&&(n&&o?(t.x-e.x>(n.x+n.width)*o&&(t.x=(n.x+n.width)*o+e.x),t.x-e.x<n.x*o&&(t.x=n.x*o+e.x),t.y-e.y>(n.y+n.height)*o&&(t.y=(n.y+n.height)*o+e.y),t.y-e.y<n.y*o&&(t.y=n.y*o+e.y)):(t.x-e.x>i.width&&(t.x=i.width+e.x),t.x-e.x<0&&(t.x=e.x),t.y-e.y>i.height&&(t.y=i.height+e.y),t.y-e.y<0&&(t.y=e.y))),t}static changeCoordinateByRotate(t,e,i){const{width:s,height:n}=i,{x:o,y:r}=t;switch(e%360){case 90:return{x:n-r,y:o};case 180:return{x:s-o,y:n-r};case 270:return{x:r,y:s-o};default:return t}}static changeRectByZoom(t,e,i={x:0,y:0}){return __spreadProps(__spreadValues({},t),{x:t.x*e+i.x,y:t.y*e+i.y,width:t.width*e,height:t.height*e})}static changePointByZoom(t,e,i={x:0,y:0}){return __spreadProps(__spreadValues({},t),{x:t.x*e+i.x,y:t.y*e+i.y})}static changePointListByZoom(t,e,i={x:0,y:0}){return t==null?void 0:t.map(s=>this.changePointByZoom(s,e,i))}static changePlanePointByZoom(t,e,i={x:0,y:0}){return Object.entries(t).reduce((s,[n,o])=>{const r=AxisUtils.changePointByZoom(o,e,i);return __spreadProps(__spreadValues({},s),{[n]:r})},{})}static changeCuboidByZoom(t,e,i={x:0,y:0}){return __spreadProps(__spreadValues({},t),{frontPoints:this.changePlanePointByZoom(t.frontPoints,e,i),backPoints:t.backPoints?this.changePlanePointByZoom(t.backPoints,e,i):t.backPoints})}static transformPlain2PointList({tl:t,tr:e,br:i,bl:s}){return[t,e,i,s]}static axisArea(t,e=3){const{x:i,y:s}=t,n=[];for(let o=i-e;o<i+e;o+=e/3)for(let r=s-e;r<s+e;r+=e/3)n.push({x:o,y:r});return n}static getOriginCoordinateWithOffsetCoordinate(t,e=1,i={x:0,y:0}){return{x:(t.x-i.x)/e,y:(t.y-i.y)/e}}static returnClosePointIndex(t,e,i=3){let s=-1;for(let n=0;n<e.length;n++){const o=e[n];this.getIsInScope(t,o,i)&&(s=n)}return s}static isCloseCuboid(t,e,i={scope:5,zoom:1}){const s=CuboidUtils.getHighlightPoints(e),{scope:n=5}=i;for(let r=0;r<s.length;r++){const g=s[r];if(this.getIsInScope(t,g.point,n))return!0}const o=CuboidUtils.getHighlightLines(e);for(let r=0;r<o.length;r++){const g=o[r],{length:y}=MathUtils.default.getFootOfPerpendicular(t,g.p1,g.p2,!0);if(y<n)return!0}return!!PolygonUtils.isInPolygon(t,CuboidUtils.getCuboidHoverRange(e))}static isCloseCuboidList(t,e,i={scope:5,zoom:1}){return e.some(s=>this.isCloseCuboid(t,s,i))}static returnClosePointOrLineInCuboid(t,e,i={scope:5,zoom:1}){const s=CuboidUtils.getHighlightPoints(e),{scope:n=5,zoom:o=1}=i;for(let a=0;a<s.length;a++){const l=s[a];if(this.getIsInScope(t,l.point,n))return[{type:"point",points:[this.changePointByZoom(s[a].point,o)],originCuboid:e,positions:l.positions}]}let r=n;const g=CuboidUtils.getHighlightLines(e);let y;for(let a=0;a<g.length;a++){const l=g[a],{length:p}=MathUtils.default.getFootOfPerpendicular(t,l.p1,l.p2,!0);p<r&&(r=p,y=[{type:"line",points:this.changePointListByZoom([l.p1,l.p2],o),originCuboid:e,positions:l.positions}])}if(y)return y}static getIsInScope(t,e,i){return Math.abs(t.x-e.x)<i&&Math.abs(t.y-e.y)<i}}class CoordinateUtils{constructor(t){this.currentPos=t.currentPos,this.zoom=t.zoom,this.basicImgInfo=t.basicImgInfo,this.dependToolName=""}get isDependPolygon(){return this.dependToolName===tool.EToolName.Polygon}get isDependRect(){return this.dependToolName===tool.EToolName.Rect}get isDependOriginalImage(){return this.dependToolName===""}getAbsCoord(t){return{x:(t.x-this.currentPos.x)/this.zoom,y:(t.y-this.currentPos.y)/this.zoom}}getRenderCoord(t){return{x:t.x*this.zoom+this.currentPos.x,y:t.y*this.zoom+this.currentPos.y}}coordInsideRect(t,e){const{x:i,y:s,width:n,height:o}=e;return{x:MathUtils.default.withinRange(t.x,[i,i+n]),y:MathUtils.default.withinRange(t.y,[s,s+o])}}getPolygonPointList(t,e){return t===tool.ELineTypes.Curve?PolygonUtils.createSmoothCurvePointsFromPointList(e):e}getIntersection(t,e,i){const s=this.getRenderCoord(e),n=this.getRenderCoord(t),o={pointA:s,pointB:n};return LineToolUtils.default.calcOptimalIntersection(i,o,s,LineToolUtils.POINT_RADIUS,this.zoom)}coordInsidePolygon(t,e,i,s){const{pointList:n}=i,o=s==null?void 0:s.lineType;if(n.length===0)return t;const r=this.getPolygonPointList(o,n);if(PolygonUtils.isInPolygon(t,r))return t;const y=r.concat(r[0]).map(l=>this.getRenderCoord(l)),a=this.getIntersection(t,e,y);return a?this.getAbsCoord(a==null?void 0:a.point):t}coordInsideImage(t){return this.coordInsideRect(t,__spreadProps(__spreadValues({},this.basicImgInfo),{x:0,y:0}))}getNextCoordByDependTool(t,e){if(this.isDependRect)return this.coordInsideRect(t,this.basicResult);if(this.isDependPolygon)return this.coordInsidePolygon(t,e,this.basicResult,this.dependToolConfig);if(this.isDependOriginalImage)return this.coordInsideImage(t)}setDependInfo(t,e){this.dependToolName=t!=null?t:"",this.dependToolConfig=t?e:void 0}setBasicImgInfo(t){this.basicImgInfo=t}setBasicResult(t){this.basicResult=t}setZoomAndCurrentPos(t,e){this.zoom=t,this.currentPos=e}isCoordInsideTarget(t){if(this.isDependPolygon)return this.isInBasicPolygon(t);if(this.isDependRect){const{x:e,y:i,width:s,height:n}=this.basicResult,o=[e,e+s],r=[i,i+n];return MathUtils.default.isInRange(t.x,o)&&MathUtils.default.isInRange(t.y,r)}return MathUtils.default.isInRange(t.x,[0,this.basicImgInfo.width])&&MathUtils.default.isInRange(t.y,[0,this.basicImgInfo.height])}isInBasicPolygon(t){var e,i;return PolygonUtils.isInPolygon(t,((e=this.basicResult)==null?void 0:e.pointList)||[],(i=this.dependToolConfig)==null?void 0:i.lineType)}}exports.CoordinateUtils=CoordinateUtils,exports.default=AxisUtils;
@@ -0,0 +1 @@
1
+ "use strict";var MathUtils=require("../MathUtils.js");class CanvasUtils{static getMousePositionOnCanvasFromEvent(i,t){if(t&&i){const n=t.getBoundingClientRect();return{x:i.clientX-n.left,y:i.clientY-n.top}}return null}static getClientRect(i){if(i){const t=i.getBoundingClientRect();return{x:t.left,y:t.top,width:t.width,height:t.height}}return null}static getSize(i){if(i){const t=i.getBoundingClientRect();return{width:t.width,height:t.height}}return null}static inViewPort(i,t){return i?MathUtils.default.isInRange(i.x,[t.left,t.right])&&MathUtils.default.isInRange(i.y,[t.top,t.bottom]):!1}}CanvasUtils.getViewPort=(e,i,t)=>{const{width:n,height:s}=e,{x:l,y:o}=i,a=(0-o)/t,r=(0-l)/t,g=a+s/t,c=r+n/t;return{top:a,bottom:g,left:r,right:c}},CanvasUtils.getPixelRatio=e=>{if(!e||!window)return 1;const i=e.backingStorePixelRatio||e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return(window.devicePixelRatio||1)/i},module.exports=CanvasUtils;
@@ -0,0 +1 @@
1
+ "use strict";var _=require("lodash"),annotation=require("../../constant/annotation.js"),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(o,t,e)=>t in o?__defProp(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e,__spreadValues=(o,t)=>{for(var e in t||(t={}))__hasOwnProp.call(t,e)&&__defNormalProp(o,e,t[e]);if(__getOwnPropSymbols)for(var e of __getOwnPropSymbols(t))__propIsEnum.call(t,e)&&__defNormalProp(o,e,t[e]);return o},__spreadProps=(o,t)=>__defProps(o,__getOwnPropDescs(t));class CommonToolUtils{static getStepInfo(t,e){return e==null?void 0:e.filter(r=>r.step===t)[0]}static getCurrentStepInfo(t,e){const r=this.getStepInfo(t,e);return r&&(r.type===annotation.EStepType.QUALITY_INSPECTION||r.type===annotation.EStepType.MANUAL_CORRECTION)?this.getCurrentStepInfo(r.dataSourceStep,e):r}static getMaxOrder(t){let e=0;return t.forEach(r=>{r.order&&r.order>e&&(e=r.order)}),e}static hotkeyFilter(t){const e=t.target||t.srcElement;if(!e)return!0;const{tagName:r,type:i}=e;if(!r||!i)return!0;let n=!0;return(e.isContentEditable||r==="TEXTAREA"||(r==="INPUT"&&i!=="radio"||r==="TEXTAREA")&&!e.readOnly)&&(n=!1),n}static getNextSelectedRectID(t,e=annotation.ESortDirection.ascend,r){let i=1;e===annotation.ESortDirection.descend&&(i=-1);const n=t.sort((s,c)=>s.x-c.x==0?s.y-c.y:i*(s.x-c.x)),l=n.findIndex(s=>s.id===r),a=n.length;return n[(l+1)%a]}static getNextSelectedRectIDByEvent(t,e,r){const i=e.shiftKey?annotation.ESortDirection.descend:annotation.ESortDirection.ascend;return this.getNextSelectedRectID(t,i,r)}static getRenderResultList(t,e,r=[],i){let n;return[t.filter(a=>i&&i===(a==null?void 0:a.id)?(n=a,!1):!(r.length>0&&!r.includes(a==null?void 0:a.attribute)||this.isDifferSourceID(a==null?void 0:a.sourceID,e))),n]}static getSourceID(t){var e;const r="";return t&&(e=t==null?void 0:t.id)!=null?e:r}static findAllLine(t,e=!0){const r=[],i=[...t];i.length>=3&&e===!0&&i.push(__spreadValues({},i[0]));for(let n=0;n<i.length;n++)i[n+1]&&r.push({point1:i[n],point2:i[n+1],pointIndex:n});return r}static translateSourceID(t){return(t===void 0||t===0||t==="0")&&(t=""),t}static isDifferSourceID(t,e){return t=this.translateSourceID(t),e=this.translateSourceID(e),`${t}`!=`${e}`}static isSameSourceID(t,e){return t=this.translateSourceID(t),e=this.translateSourceID(e),`${t}`==`${e}`}static getNextMarker(t,e=[],r){if((e==null?void 0:e.length)===0)return;let i=e.map((n,l)=>__spreadProps(__spreadValues({},n),{index:l}));if(typeof r=="number"&&r>0){const n=e[r];if(n&&t.every(l=>l.label!==n.value))return{label:n.value,index:r};i=[...i.slice(r,e.length),...i.slice(0,r)]}for(let n=0;n<i.length;n++)if(!t.some(l=>l.label===i[n].value))return{label:i[n].value,index:i[n].index}}static getCurrentMarkerIndex(t,e=[]){return e.findIndex(r=>t===r.value)}}CommonToolUtils.jsonParser=(o,t={})=>{try{return typeof o=="string"?JSON.parse(o):_.isObject(o)?o:t}catch(e){return t}},module.exports=CommonToolUtils;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _=require("lodash"),annotation=require("../../constant/annotation.js"),AxisUtils=require("./AxisUtils.js"),VectorUtils=require("../VectorUtils.js"),LineToolUtils=require("./LineToolUtils.js"),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(i,t,n)=>t in i?__defProp(i,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):i[t]=n,__spreadValues=(i,t)=>{for(var n in t||(t={}))__hasOwnProp.call(t,n)&&__defNormalProp(i,n,t[n]);if(__getOwnPropSymbols)for(var n of __getOwnPropSymbols(t))__propIsEnum.call(t,n)&&__defNormalProp(i,n,t[n]);return i},__spreadProps=(i,t)=>__defProps(i,__getOwnPropDescs(t));function getPlanePointsBasicInfo({tr:i,tl:t,br:n}){return{width:Math.abs(i.x-t.x),height:Math.abs(n.y-i.y),centerPoints:{x:(t.x+n.x)/2,y:(t.y+n.y)/2}}}function getCuboidBasicInfo({frontPoints:i,backPoints:t}){const{width:n,height:o,centerPoints:r}=getPlanePointsBasicInfo(i),{width:e,height:s,centerPoints:l}=getPlanePointsBasicInfo(t);return{frontCenter:r,backCenter:l,frontWidth:n,frontHeight:o,backWidth:e,backHeight:s,isLeftSide:l.x<r.x}}function getPlainPointsByDiagonalPoints(i,t){return{tl:{x:Math.min(i.x,t.x),y:Math.min(i.y,t.y)},tr:{x:Math.max(i.x,t.x),y:Math.min(i.y,t.y)},bl:{x:Math.min(i.x,t.x),y:Math.max(i.y,t.y)},br:{x:Math.max(i.x,t.x),y:Math.max(i.y,t.y)}}}function getMaxExternalQuadrilateral(i){const t=Object.values(i).reduce((e,s)=>s.x<e?s.x:e,Number.MAX_SAFE_INTEGER),n=Object.values(i).reduce((e,s)=>s.x>e?s.x:e,0),o=Object.values(i).reduce((e,s)=>s.y<e?s.y:e,Number.MAX_SAFE_INTEGER),r=Object.values(i).reduce((e,s)=>s.y>e?s.y:e,0);return{tl:{x:t,y:o},tr:{x:n,y:o},bl:{x:t,y:r},br:{x:n,y:r}}}function judgeCuboidLineIsRowOrColumn(i){const[t,n]=i;if(annotation.CUBOID_ROW[t.position]===n.position)return annotation.ECuboidLineDirection.Row;if(annotation.CUBOID_COLUMN[t.position]===n.position)return annotation.ECuboidLineDirection.Column}function getPointsByBottomRightPoint({coord:i,points:t}){const{width:n,height:o}=getPlanePointsBasicInfo(t);return{br:i,tr:{x:i.x,y:i.y-o},tl:{x:i.x-n,y:i.y-o},bl:{x:i.x-n,y:i.y}}}function getPointsByBottomLeftPoint({coord:i,points:t}){const{width:n,height:o}=getPlanePointsBasicInfo(t);return{bl:i,tr:{x:i.x+n,y:i.y-o},tl:{x:i.x,y:i.y-o},br:{x:i.x+n,y:i.y}}}function getCuboidShowingSideLine({frontPoints:i,backPoints:t}){const{isLeftSide:n}=getCuboidBasicInfo({frontPoints:i,backPoints:t});return n?{top:{p1:i.tl,p2:t.tl},bottom:{p1:i.bl,p2:t.bl}}:{top:{p1:i.tr,p2:t.tr},bottom:{p1:i.br,p2:t.br}}}function getPointsByIntersection({frontPoints:i,backPoints:t}){const{isLeftSide:n}=getCuboidBasicInfo({frontPoints:i,backPoints:t});let o=__spreadValues({},t);const r=getCuboidShowingSideLine({frontPoints:i,backPoints:t}),e=LineToolUtils.default.lineIntersection({pointA:r.bottom.p1,pointB:r.bottom.p2},{pointA:r.top.p1,pointB:r.top.p2});if(n){const s=LineToolUtils.default.lineIntersection({pointA:t.bl,pointB:t.br},{pointA:i.br,pointB:e});s&&(o=__spreadProps(__spreadValues({},t),{br:s,tr:{x:s.x,y:t.tl.y}}))}else{const s=LineToolUtils.default.lineIntersection({pointA:t.bl,pointB:t.br},{pointA:i.bl,pointB:e});s&&(o=__spreadProps(__spreadValues({},t),{bl:s,tl:{x:s.x,y:t.tr.y}}))}return{backPoints:o}}function getBackPointsByFrontPoints({frontPoints:i,backPoints:t}){const{isLeftSide:n,frontHeight:o,backHeight:r}=getCuboidBasicInfo({frontPoints:i,backPoints:t});let e=__spreadValues({},t);return n?e=getPointsByBottomLeftPoint({coord:t.bl,points:i}):e=getPointsByBottomRightPoint({coord:t.br,points:i}),o>r&&(e=getPointsByIntersection({frontPoints:i,backPoints:t}).backPoints),{frontPoints:i,backPoints:e}}function getFrontPointsByBackPoints({frontPoints:i,backPoints:t}){const{isLeftSide:n,frontHeight:o,backHeight:r,frontWidth:e,backWidth:s}=getCuboidBasicInfo({frontPoints:i,backPoints:t});let l=__spreadValues({},i),a=t;return n||s>e?l=getPointsByBottomLeftPoint({coord:i.bl,points:t}):l=getPointsByBottomRightPoint({coord:i.br,points:t}),o>r&&(l.tl.y=i.tl.y,l.tr.y=i.tr.y,a=getPointsByIntersection({backPoints:t,frontPoints:i}).backPoints),e>=s&&Object.keys(l).forEach(u=>{l[u].x=i[u].x}),{frontPoints:l,backPoints:a}}function getCuboidAllSideLine({frontPoints:i,backPoints:t}){return[{p1:i.bl,p2:t.bl},{p1:i.tl,p2:t.tl},{p1:i.tr,p2:t.tr},{p1:i.br,p2:t.br}]}function getHighlightLines(i){const{frontPoints:t,backPoints:n}=i,{isLeftSide:o}=getCuboidBasicInfo(i),r=[{p1:t.tl,p2:t.tr,positions:[{plain:annotation.ECuboidPlain.Front,position:annotation.ECuboidPosition.TL},{plain:annotation.ECuboidPlain.Front,position:annotation.ECuboidPosition.TR}]},{p1:t.tr,p2:t.br,plain:annotation.ECuboidPlain.Front,positions:[{plain:annotation.ECuboidPlain.Front,position:annotation.ECuboidPosition.TR},{plain:annotation.ECuboidPlain.Front,position:annotation.ECuboidPosition.BR}]},{p1:t.br,p2:t.bl,plain:annotation.ECuboidPlain.Front,positions:[{plain:annotation.ECuboidPlain.Front,position:annotation.ECuboidPosition.BR},{plain:annotation.ECuboidPlain.Front,position:annotation.ECuboidPosition.BL}]},{p1:t.bl,p2:t.tl,plain:annotation.ECuboidPlain.Front,positions:[{plain:annotation.ECuboidPlain.Front,position:annotation.ECuboidPosition.BL},{plain:annotation.ECuboidPlain.Front,position:annotation.ECuboidPosition.TL}]}];return o?[...r,{p1:n.tl,p2:n.bl,positions:[{plain:annotation.ECuboidPlain.Back,position:annotation.ECuboidPosition.TL},{plain:annotation.ECuboidPlain.Back,position:annotation.ECuboidPosition.BL}]}]:[...r,{p1:n.tr,p2:n.br,positions:[{plain:annotation.ECuboidPlain.Back,position:annotation.ECuboidPosition.TR},{plain:annotation.ECuboidPlain.Back,position:annotation.ECuboidPosition.BR}]}]}function getHighlightPoints(i){const{backPoints:t}=i,{isLeftSide:n}=getCuboidBasicInfo(i),o=Object.entries(i.frontPoints).map(([r,e])=>({positions:[{plain:annotation.ECuboidPlain.Front,position:r}],point:e}));return n?[{point:t.tl,positions:[{position:annotation.ECuboidPosition.TL,plain:annotation.ECuboidPlain.Back}]},{point:t.bl,positions:[{position:annotation.ECuboidPosition.BL,plain:annotation.ECuboidPlain.Back}]},...o]:[{point:t.tr,positions:[{position:annotation.ECuboidPosition.TR,plain:annotation.ECuboidPlain.Back}]},{point:t.br,positions:[{position:annotation.ECuboidPosition.BR,plain:annotation.ECuboidPlain.Back}]},...o]}function getCuboidHoverRange(i){const{frontPoints:t,backPoints:n}=i,{backCenter:o,frontCenter:r,frontHeight:e,frontWidth:s,backHeight:l,backWidth:a,isLeftSide:u}=getCuboidBasicInfo(i),p=Math.abs(s-a),c=Math.abs(e-l),d=Math.abs(r.x-o.x),x=Math.abs(r.y-o.y),f=d>p,b=x>c;return f||b?b&&!f?[t.tl,n.tl,n.tr,t.tr,t.br,t.bl]:f&&!b?u?[t.tl,t.tr,t.br,t.bl,n.bl,n.tl]:[t.tl,t.tr,n.tr,n.br,t.br,t.bl]:f&&b?u?[n.tl,n.tr,t.tr,t.br,t.bl,n.bl]:[t.tl,n.tl,n.tr,n.br,t.br,t.bl]:[]:[t.tl,t.tr,t.br,t.bl]}function getNewPointsAfterOffset({offset:i,frontPoints:t,backPoints:n,positions:o}){let r=_.cloneDeep(t),e=_.cloneDeep(n);if((o==null?void 0:o.length)===2){const s=o.every(b=>b.plain===annotation.ECuboidPlain.Front),l=!s,a=judgeCuboidLineIsRowOrColumn([o[0],o[1]]),u=a===annotation.ECuboidLineDirection.Row,p=a===annotation.ECuboidLineDirection.Column;let c=i;u&&(c={x:0,y:i.y}),p&&(c={y:0,x:i.x}),s&&(o==null||o.forEach(({position:b})=>{const g=r,y=g[b];g[b]={x:y.x+c.x,y:y.y+c.y}}),r=getMaxExternalQuadrilateral(r),e=getMaxExternalQuadrilateral(e)),l&&Object.keys(e).forEach(b=>{e[b]={x:e[b].x+c.x,y:e[b].y+c.y}});const d=s?getBackPointsByFrontPoints:getFrontPointsByBackPoints,{frontPoints:x,backPoints:f}=d({frontPoints:r,backPoints:e});r=x,e=f}return{frontPoints:r,backPoints:e}}function moveCuboidByCuboid({offset:i,cuboid:t}){const{frontPoints:n,backPoints:o}=t,r=Object.entries(n).reduce((s,[l,a])=>__spreadProps(__spreadValues({},s),{[l]:{x:a.x+i.x,y:a.y+i.y}}),{}),e=Object.entries(o).reduce((s,[l,a])=>__spreadProps(__spreadValues({},s),{[l]:{x:a.x+i.x,y:a.y+i.y}}),{});return{frontPoints:r,backPoints:e}}function moveCuboidByLine({offset:i,cuboid:t,positions:n}){const{frontPoints:o,backPoints:r}=t;return getNewPointsAfterOffset({offset:i,frontPoints:o,backPoints:r,positions:n})}function moveCuboidByPoints({offset:i,cuboid:t,positions:n}){if(!(n==null?void 0:n[0]))return;const{frontPoints:o,backPoints:r}=t,e=n[0],s=e.plain===annotation.ECuboidPlain.Front,l=s?o:r;let a=l[e.position];const u=l[annotation.DIAGONAL_POINT[e.position]];if(!a||!u)return;a=VectorUtils.add(a,i);const p=getPlainPointsByDiagonalPoints(a,u),c=s?getBackPointsByFrontPoints:getFrontPointsByBackPoints;let d={frontPoints:o,backPoints:p};return s&&(d={frontPoints:p,backPoints:r}),c(d)}function getCuboidDragMove({offset:i,cuboid:t,dragTarget:n,positions:o}){switch(n){case annotation.EDragTarget.Cuboid:{const r=moveCuboidByCuboid({offset:i,cuboid:t});return __spreadValues(__spreadValues({},t),r)}case annotation.EDragTarget.Line:{const r=moveCuboidByLine({offset:i,cuboid:t,positions:o});return __spreadValues(__spreadValues({},t),r)}case annotation.EDragTarget.Point:{const r=moveCuboidByPoints({cuboid:t,offset:i,positions:o});if(r)return __spreadValues(__spreadValues({},t),r);break}default:{console.error("No DragTarget");break}}}function getPointListsByDirection({direction:i,frontPoints:t,backPoints:n}){if(i&&t&&n){let o=t;switch(i){case annotation.ECuboidDirection.Back:o=n;break;case annotation.ECuboidDirection.Left:o={bl:n.bl,br:t.bl,tl:n.tl,tr:t.tl};break;case annotation.ECuboidDirection.Right:o={bl:n.br,br:t.br,tl:n.tr,tr:t.tr};break;case annotation.ECuboidDirection.Top:o={bl:n.tl,br:t.tl,tl:n.tr,tr:t.tr};break;default:o=t;break}return AxisUtils.default.transformPlain2PointList(o)}}function getToggleDirectionButtonOffset({cuboid:i,currentPos:t,zoom:n}){const{frontPoints:o}=i,r={width:40,height:74},e={x:(o.bl.x+o.tl.x)/2,y:(o.bl.y+o.tl.y)/2},s=r.width+10,l=r.height/2,a={x:e.x,y:e.y},u=AxisUtils.default.getOffsetCoordinate(a,t,n);return{left:u.x-s,top:u.y-l}}function getCuboidTextAttributeOffset({cuboid:i,currentPos:t,zoom:n,leftOffset:o=16,topOffset:r=2}){const{frontPoints:e}=i,s={x:e.bl.x,y:e.bl.y},l=AxisUtils.default.getOffsetCoordinate(s,t,n);return{left:l.x+o,top:l.y+r}}function isCuboidWithInLimits({cuboid:i,config:t}){const{minHeight:n,minWidth:o}=t,{width:r,height:e}=getPlanePointsBasicInfo(i.frontPoints);return r>=o&&e>=n}exports.getBackPointsByFrontPoints=getBackPointsByFrontPoints,exports.getCuboidAllSideLine=getCuboidAllSideLine,exports.getCuboidBasicInfo=getCuboidBasicInfo,exports.getCuboidDragMove=getCuboidDragMove,exports.getCuboidHoverRange=getCuboidHoverRange,exports.getCuboidShowingSideLine=getCuboidShowingSideLine,exports.getCuboidTextAttributeOffset=getCuboidTextAttributeOffset,exports.getFrontPointsByBackPoints=getFrontPointsByBackPoints,exports.getHighlightLines=getHighlightLines,exports.getHighlightPoints=getHighlightPoints,exports.getMaxExternalQuadrilateral=getMaxExternalQuadrilateral,exports.getNewPointsAfterOffset=getNewPointsAfterOffset,exports.getPlainPointsByDiagonalPoints=getPlainPointsByDiagonalPoints,exports.getPlanePointsBasicInfo=getPlanePointsBasicInfo,exports.getPointListsByDirection=getPointListsByDirection,exports.getPointsByBottomLeftPoint=getPointsByBottomLeftPoint,exports.getPointsByBottomRightPoint=getPointsByBottomRightPoint,exports.getPointsByIntersection=getPointsByIntersection,exports.getToggleDirectionButtonOffset=getToggleDirectionButtonOffset,exports.isCuboidWithInLimits=isCuboidWithInLimits,exports.judgeCuboidLineIsRowOrColumn=judgeCuboidLineIsRowOrColumn;
@@ -0,0 +1 @@
1
+ "use strict";var AxisUtils=require("./AxisUtils.js");class DblClickEventListener{constructor(e,s){this.rcTime=0,this.mouseDownTime=0,this.onMouseDown=()=>{this.mouseDownTime=new Date().getTime()},this.dom=e,this.isDoubleClick=!1,this.delay=s}getRcTime(){return this.rcTime}getCoord(e){return{x:e.clientX,y:e.clientY}}removeEvent(){!this.dom||(this.dom.removeEventListener("mouseup",this.mouseUp),this.dom.removeEventListener("mousemove",this.mouseMove),this.dom.removeEventListener("dblclick",this.dblclick),this.dom.removeEventListener("mousedown",this.onMouseDown))}addEvent(e,s,c,o){!this.dom||(this.removeEvent(),this.mouseUp=i=>{const t=new Date().getTime(),h=o?o(i):!0;if(t-this.mouseDownTime>this.delay||h!==!0){e(i);return}if(i.button===2)if(this.rcTime===0)setTimeout(()=>{this.rcTime=0},this.delay),this.rcTime=t;else{t-this.rcTime<this.delay&&(c(i),clearTimeout(this.setTimeFun),this.cacheFunction=void 0),this.rcTime=0;return}this.setTimeFun&&clearTimeout(this.setTimeFun),this.clickCoord=this.getCoord(i),this.cacheFunction=()=>e(i),this.setTimeFun=setTimeout(()=>{if(this.isDoubleClick){this.isDoubleClick=!1;return}this.cacheFunction(),this.clickCoord=void 0},this.delay)},this.mouseMove=i=>{const t=this.getCoord(i);this.clickCoord&&!AxisUtils.default.getIsInScope(t,this.clickCoord,10)&&(this.cacheFunction&&this.cacheFunction(),this.clickCoord=void 0,this.cacheFunction=null,clearTimeout(this.setTimeFun))},this.dblclick=i=>{this.isDoubleClick=!0,this.clickCoord=void 0,s(i)},this.dom.addEventListener("mouseup",this.mouseUp),this.dom.addEventListener("mousemove",this.mouseMove),this.dom.addEventListener("dblclick",this.dblclick),this.dom.addEventListener("mousedown",this.onMouseDown))}clearRightDblClick(){this.rcTime=0}}module.exports=DblClickEventListener;
@@ -0,0 +1,3 @@
1
+ "use strict";var tool=require("../../constant/tool.js"),PolygonUtils=require("./PolygonUtils.js"),UnitUtils=require("./UnitUtils.js"),AxisUtils=require("./AxisUtils.js"),CuboidUtils=require("./CuboidUtils.js"),AttributeUtils=require("./AttributeUtils.js"),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(r,t,i)=>t in r?__defProp(r,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):r[t]=i,__spreadValues=(r,t)=>{for(var i in t||(t={}))__hasOwnProp.call(t,i)&&__defNormalProp(r,i,t[i]);if(__getOwnPropSymbols)for(var i of __getOwnPropSymbols(t))__propIsEnum.call(t,i)&&__defNormalProp(r,i,t[i]);return r},__spreadProps=(r,t)=>__defProps(r,__getOwnPropDescs(t));const DEFAULT_ZOOM=1,DEFAULT_CURRENT_POS={x:0,y:0},DEFAULT_ROTATE=0,DEFAULT_COLOR="",_DrawUtils=class{static drawLine(r,t,i,e={}){const o=r.getContext("2d"),{color:l=DEFAULT_COLOR,thickness:s=1,lineCap:a="round",lineDash:d}=e;o.save(),o.strokeStyle=l,o.lineWidth=s,o.lineCap=a,d&&o.setLineDash(d),o.beginPath(),o.moveTo(t.x,t.y),o.lineTo(i.x+1,i.y+1),o.stroke(),o.restore()}static drawRect(r,t,i={}){const e=r.getContext("2d"),{color:o=DEFAULT_COLOR,thickness:l=1,lineCap:s="round",hiddenText:a=!1,lineDash:d}=i;if(e.save(),e.strokeStyle=o,e.lineWidth=l,e.lineCap=s,Array.isArray(d)&&e.setLineDash(d),e.fillStyle=o,e.strokeRect(t.x,t.y,t.width,t.height),a===!1){let n="";if(t.attribute&&(n=`${n} ${t.attribute}`),this.drawText(r,{x:t.x,y:t.y-5},n),t.textAttribute){const c=`${~~t.width} * ${~~t.height}`.length*7,u=0,y=Math.max(20,t.width-c);this.drawText(r,{x:t.x,y:t.y+t.height+20+u},t.textAttribute,{textMaxWidth:y})}}e.restore()}static drawRectWithFill(r,t,i={}){const e=r.getContext("2d"),{color:o=DEFAULT_COLOR}=i;e.save(),e.fillStyle=o,e.fillRect(t.x,t.y,t.width,t.height),e.restore()}static drawTagByDom(r,t,i){const e=r;if(!((t==null?void 0:t.length)>0))return;const o=document.createElement("div");return o.innerHTML=t,o.setAttribute("id",i),e==null||e.appendChild(o),o}static drawTag(r,t){var i;const e=r==null?void 0:r.parentNode,o=window.self.document.getElementById("tagToolTag");if(o&&e&&e.contains(o)&&(e==null||e.removeChild(o)),!((t==null?void 0:t.length)>0))return;const l=document.createElement("div");return l.innerHTML=(i=t.reduce((s,a)=>`${s}${a.keyName}: ${a.value.join(" \u3001 ")}
2
+ `,""))!=null?i:"",l.setAttribute("id","tagToolTag"),e==null||e.appendChild(l),l}static drawLineWithPointList(r,t,i={}){if(t.length<2)return;const e=r.getContext("2d"),{color:o=DEFAULT_COLOR,thickness:l=1,lineCap:s="round",lineType:a=tool.ELineTypes.Line,lineDash:d,hoverEdgeIndex:n}=i;e.save(),(()=>{e.strokeStyle=o,e.lineWidth=l,e.lineCap=s,Array.isArray(d)?e.setLineDash(d):e.setLineDash([])})(),a===tool.ELineTypes.Curve?(n!==void 0&&n>-1&&t.push(t[0]),t=PolygonUtils.createSmoothCurvePointsFromPointList([...t],tool.SEGMENT_NUMBER),n!==void 0&&n>-1&&(t=t.slice((tool.SEGMENT_NUMBER+1)*n,(tool.SEGMENT_NUMBER+1)*(n+1)))):n!==void 0&&n>-1&&(t=[...t,t[0]],t=t.slice(n,n+2));const c=[];e.beginPath(),e.moveTo(t[0].x,t[0].y);for(let h=0;h<t.length-1;h++)t[h].specialEdge&&c.push({i1:h,i2:h+1}),e.lineTo(t[h+1].x,t[h+1].y);e.stroke(),e.save(),e.lineWidth=l*.8,e.lineCap="butt",e.strokeStyle="white",e.setLineDash([3,3]),c.forEach(h=>{const w=t[h.i1],g=t[h.i2];e.beginPath(),e.moveTo(w.x,w.y),e.lineTo(g.x,g.y),e.stroke()}),e.restore();const u=4,y=2;return t.forEach(h=>{h.specialPoint&&(this.drawSpecialPoint(r,h,u+y,o),this.drawSpecialPoint(r,h,u,"white"))}),e.restore(),t}static drawCircle(r,t,i,e={}){const o=r.getContext("2d"),{startAngleDeg:l=0,endAngleDeg:s=360,thickness:a=1,color:d=DEFAULT_COLOR,fill:n=DEFAULT_COLOR}=e,f=UnitUtils.deg2rad(l),c=UnitUtils.deg2rad(s);o.save(),o.beginPath(),o.strokeStyle=d,o.fillStyle=n,o.lineWidth=a,o.arc(t.x,t.y,i,f,c,!1),o.stroke(),n&&o.fill(),o.closePath(),o.restore()}static drawCircleWithFill(r,t,i=3,e={}){const o=r.getContext("2d"),{color:l=DEFAULT_COLOR}=e;o.save();const s=UnitUtils.deg2rad(0),a=UnitUtils.deg2rad(360);o.fillStyle=l,o.beginPath(),o.arc(t.x,t.y,i,s,a,!1),o.fill(),o.restore()}static drawSpecialPoint(r,t,i=6,e){const o=r.getContext("2d"),{x:l,y:s}=t;o.save(),o.beginPath(),o.fillStyle=e;const a=i*1.5,d=a*Math.sqrt(3)/2,n=a/2;o.moveTo(l,s-a),o.lineTo(l-d,s+n),o.lineTo(l+d,s+n),o.closePath(),o.fill(),o.restore()}static drawPolygon(r,t,i={}){const{isClose:e=!1,lineType:o=tool.ELineTypes.Line}=i;return e===!0&&(t=[...t,t[0]]),o===tool.ELineTypes.Curve&&(t=PolygonUtils.createSmoothCurvePointsFromPointList([...t])),this.drawLineWithPointList(r,t,__spreadProps(__spreadValues({},i),{lineType:tool.ELineTypes.Line})),t}static drawPolygonWithFill(r,t,i={}){if(t.length<2)return;const e=r.getContext("2d"),{color:o=DEFAULT_COLOR,lineType:l=tool.ELineTypes.Line}=i;e.save(),e.fillStyle=o,e.beginPath(),l===tool.ELineTypes.Curve&&(t=PolygonUtils.createSmoothCurvePointsFromPointList([...t,t[0]]));const[s,...a]=t;return e.moveTo(s.x,s.y),a.forEach(d=>{e.lineTo(d.x,d.y)}),e.fill(),e.restore(),t}static drawPolygonWithFillAndLine(r,t,i={}){const{strokeColor:e,fillColor:o,thickness:l,lineCap:s,isClose:a,lineType:d}=i,n=this.drawPolygon(r,t,{color:e,thickness:l,lineCap:s,isClose:a,lineType:d});return this.drawPolygonWithFill(r,t,{color:o,lineType:d}),n}static drawPolygonWithKeyPoint(r,t,i={}){const{pointColor:e="white",strokeColor:o}=i,l=this.drawPolygon(r,t,i);return l.forEach(s=>{this.drawCircleWithFill(r,s,4,{color:o}),this.drawCircleWithFill(r,s,3,{color:e})}),l}static drawSelectedPolygonWithFillAndLine(r,t,i={}){const{pointColor:e="white",strokeColor:o}=i,l=this.drawPolygonWithFillAndLine(r,t,i);return l.forEach(s=>{this.drawCircleWithFill(r,s,4,{color:o}),this.drawCircleWithFill(r,s,3,{color:e})}),l}static drawText(r,t,i,e={}){if(!i)return;const o=r.getContext("2d"),{color:l=DEFAULT_COLOR,font:s=tool.DEFAULT_FONT,shadowColor:a="",shadowBlur:d=0,shadowOffsetX:n=0,shadowOffsetY:f=0,textMaxWidth:c=164,offsetX:u=0,offsetY:y=0,textAlign:h="start",lineHeight:w}=e;o.save(),o.textAlign=h,o.fillStyle=l!=null?l:"white",o.font=s,o.shadowColor=a,o.shadowOffsetX=n,o.shadowOffsetY=f,o.shadowBlur=d,this.wrapText(r,`${i}`,t.x+u,t.y+y,c,w),o.restore()}static wrapText(r,t,i,e,o,l){if(typeof t!="string"||typeof i!="number"||typeof e!="number")return;const s=r.getContext("2d");typeof o=="undefined"&&(o=r&&r.width||300),typeof l=="undefined"&&(l=r&&parseInt(window.getComputedStyle(r).lineHeight,10)||parseInt(window.getComputedStyle(document.body).lineHeight,10));const a=t.split(`
3
+ `);for(let d=0;d<a.length;d++){const n=a[d].split("");let f="";for(let c=0;c<n.length;c++){const u=f+n[c],h=s.measureText(u).width;o||(o=300),h>o&&c>0?(s.fillText(f,i,e),f=n[c],e+=l):f=u}s.fillText(f,i,e),e+=l}}static drawArrow(r,t,i,e={}){const{color:o=DEFAULT_COLOR,thickness:l=1,lineCap:s="round",theta:a=30,headLen:d=10}=e,n=Math.atan2(t.y-i.y,t.x-i.x)*180/Math.PI,f=(n+a)*Math.PI/180,c=(n-a)*Math.PI/180,u=d*Math.cos(f),y=d*Math.sin(f),h=d*Math.cos(c),w=d*Math.sin(c);r.save(),r.strokeStyle=o,r.lineWidth=l,r.lineCap=s,r.beginPath(),r.moveTo(i.x+u,i.y+y),r.lineTo(i.x,i.y),r.lineTo(i.x+h,i.y+w),r.stroke(),r.restore()}static drawArrowByCanvas(r,t,i,e={}){const o=r.getContext("2d");this.drawArrow(o,t,i,e)}static drawCuboid(r,t,i={}){const{backPoints:e,direction:o,frontPoints:l}=t,{strokeColor:s,thickness:a,fillColor:d}=i,n={color:s,thickness:a};if(e){const c=AxisUtils.default.transformPlain2PointList(e);_DrawUtils.drawPolygon(r,c,__spreadProps(__spreadValues({},n),{isClose:!0}));const u=CuboidUtils.getCuboidAllSideLine(t);u==null||u.forEach(y=>{_DrawUtils.drawLine(r,y.p1,y.p2,__spreadValues({},n))})}const f=AxisUtils.default.transformPlain2PointList(l);if(o&&e&&l){const c=CuboidUtils.getPointListsByDirection({direction:o,frontPoints:l,backPoints:e});c&&_DrawUtils.drawPolygonWithFill(r,c,{color:d})}_DrawUtils.drawPolygon(r,f,__spreadProps(__spreadValues({},n),{isClose:!0}))}static drawCuboidWithText(r,t,i,e){const{strokeColor:o}=i,l=o,{config:s,hiddenText:a,selectedID:d,headerText:n,bottomText:f}=e,{backPoints:c,frontPoints:u,textAttribute:y}=t,h=u.br.x-u.bl.x;_DrawUtils.drawCuboid(r,t,i);let w="";(s==null?void 0:s.isShowOrder)&&t.order&&(t==null?void 0:t.order)>0&&(w=`${t.order}`),t.attribute&&(w=`${w} ${AttributeUtils.default.getAttributeShowText(t.attribute,s==null?void 0:s.attributeList)}`),!a&&c&&w&&_DrawUtils.drawText(r,{x:c.tl.x,y:c.tl.y-5},n!=null?n:w,{color:o,textMaxWidth:300});const g=CuboidUtils.getCuboidTextAttributeOffset({cuboid:t,currentPos:{x:0,y:0},zoom:1,topOffset:16,leftOffset:0});if(!a&&y&&t.id!==d){const x=Math.max(20,h*.8);_DrawUtils.drawText(r,{x:g.left,y:g.top},f!=null?f:y,{color:l,textMaxWidth:x})}}};let DrawUtils=_DrawUtils;DrawUtils.drawImg=(r,t,i={})=>{const e=r.getContext("2d"),{zoom:o=DEFAULT_ZOOM,currentPos:l=DEFAULT_CURRENT_POS,rotate:s=DEFAULT_ROTATE,imgAttribute:a}=i;switch(e.save(),s){case 0:e.translate(l.x,l.y);break;case 90:e.translate(l.x+t.height*o,l.y),e.rotate(90*Math.PI/180);break;case 180:e.translate(l.x+t.width*o,l.y+t.height*o),e.rotate(Math.PI);break;case 270:e.translate(l.x,l.y+t.width*o),e.rotate(270*Math.PI/180);break;default:e.translate(l.x,l.y);break}if(a){const{contrast:d,saturation:n,brightness:f}=a;e.filter=`saturate(${n+100}%) contrast(${d+100}%) brightness(${f+100}%)`}e.drawImage(t,0,0,t.width*o,t.height*o),e.restore()},module.exports=DrawUtils;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var tool=require("../../constant/tool.js"),ScribbleTool=require("../../core/toolOperation/ScribbleTool.js"),cuboidOperation=require("../../core/toolOperation/cuboidOperation.js"),pointCloud2dOperation=require("../../core/toolOperation/pointCloud2dOperation.js"),checkOperation=require("../../core/toolOperation/checkOperation.js"),polygonOperation=require("../../core/toolOperation/polygonOperation.js"),rectOperation=require("../../core/toolOperation/rectOperation.js"),tagOperation=require("../../core/toolOperation/tagOperation.js"),LineToolOperation=require("../../core/toolOperation/LineToolOperation.js"),pointOperation=require("../../core/toolOperation/pointOperation.js"),TextToolOperation=require("../../core/toolOperation/TextToolOperation.js"),segmentByRect=require("../../core/toolOperation/segmentByRect.js"),CommonToolUtils=require("./CommonToolUtils.js");const getCurrentOperation=e=>{switch(e){case tool.EToolName.Rect:case tool.EToolName.RectTrack:return rectOperation.RectOperation;case tool.EToolName.SegmentByRect:return segmentByRect;case tool.EToolName.Tag:return tagOperation;case tool.EToolName.Polygon:return polygonOperation;case tool.ECheckModel.Check:return checkOperation;case tool.EToolName.Line:return LineToolOperation.default;case tool.EToolName.Point:return pointOperation;case tool.EToolName.Text:return TextToolOperation;case tool.EToolName.ScribbleTool:return ScribbleTool;case tool.EToolName.Cuboid:return cuboidOperation;case tool.EToolName.PointCloudPolygon:return pointCloud2dOperation;default:throw new Error("not match tool")}};class EnhanceCommonToolUtils extends CommonToolUtils{}EnhanceCommonToolUtils.getCurrentOperation=getCurrentOperation,exports.default=EnhanceCommonToolUtils,exports.getCurrentOperation=getCurrentOperation;
@@ -0,0 +1 @@
1
+ "use strict";class ImgPosUtils{static getInitImgPos(n,t,h=0,c=1,r=!1){(h===90||h===270)&&(t={width:t.height,height:t.width});const d=n.width*c/t.width,i=n.height*c/t.height;let o=r?1:Math.min(d,i);const e={x:(n.width-t.width*o)/2,y:(n.height-t.height*o)/2},s=t.width*o,w=t.height*o;return r&&(o=1),{zoom:o,currentPos:e,imgInfo:{width:s,height:w}}}static getBasicRecPos(n,t,h,c=.9,r=1,d=!1){if(t&&n){const{x:i,y:o,height:e,width:s}=t;let w=h.height/e;s/e>h.width/h.height&&(w=h.width/s);const l=d?1:w*c*r,g={x:h.width/2,y:h.height/2},f={x:(i+s/2)*l,y:(o+e/2)*l};return{currentPos:{x:g.x-f.x,y:g.y-f.y},innerZoom:l}}return!1}}module.exports=ImgPosUtils;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var tool=require("../../constant/tool.js"),polygonTool=require("./polygonTool.js"),PolygonUtils=require("./PolygonUtils.js"),MathUtils=require("../MathUtils.js"),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(t,n,e)=>n in t?__defProp(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e,__spreadValues=(t,n)=>{for(var e in n||(n={}))__hasOwnProp.call(n,e)&&__defNormalProp(t,e,n[e]);if(__getOwnPropSymbols)for(var e of __getOwnPropSymbols(n))__propIsEnum.call(n,e)&&__defNormalProp(t,e,n[e]);return t},__spreadProps=(t,n)=>__defProps(t,__getOwnPropDescs(n));exports.EStatus=void 0,function(t){t[t.Create=0]="Create",t[t.Active=1]="Active",t[t.Edit=1]="Edit",t[t.None=2]="None"}(exports.EStatus||(exports.EStatus={})),exports.EColor=void 0,function(t){t.ActiveArea="#B3B8FF"}(exports.EColor||(exports.EColor={}));const SEGMENT_NUMBER=16,POINT_RADIUS=3,_LineToolUtils=class{static isInLine(t,n,e,i=3){const{length:r}=MathUtils.default.getFootOfPerpendicular(t,n,e);return r<i}};let LineToolUtils=_LineToolUtils;LineToolUtils.setSpecialEdgeStyle=t=>{t.lineCap="butt",t.setLineDash([10,10])},LineToolUtils.setReferenceCtx=t=>{t.lineCap="butt",t.setLineDash([6])},LineToolUtils.calcOptimalIntersection=(t,n,e,i,r)=>{let a,p=Infinity,c;if(t.find((u,o)=>{if(o===0)return;const s=_LineToolUtils.isInLine(n.pointA,u,t[o-1]),l=_LineToolUtils.isInLine(n.pointB,u,t[o-1]);return s&&l}))return{point:e};if(t.forEach((u,o)=>{if(o===0)return;const s={pointA:t[o-1],pointB:u},l=_LineToolUtils.lineIntersection(n,s);if(l&&n){const{onLine2:g,onLine1:y,x:d,y:v}=l,h=_LineToolUtils.calcDistance(e,l);if(_LineToolUtils.isOnLine(n.pointB.x,n.pointB.y,u.x,u.y,t[o-1].x,t[o-1].y)){if(_LineToolUtils.calcDistance(e,l)<i/r){const x=n.pointB,{footPoint:O,length:_}=MathUtils.default.getFootOfPerpendicular(x,s.pointA,s.pointB,!0);if(_!==void 0){const A=_LineToolUtils.calcDistance(s.pointA,O),E=_LineToolUtils.calcDistance(s.pointB,O);c={point:O,minDistance:_},_===Infinity&&(c.point=A>E?s.pointB:s.pointA)}}return}h<p&&g&&y&&(p=h,a={x:d,y:v})}}),a)return{point:a,minDistance:p};if(c)return c},LineToolUtils.lineIntersection=(t,n)=>{let e=!1,i=!1;const r=_LineToolUtils.getAxisDiff(t),a=_LineToolUtils.getAxisDiff(n),p=a.y*r.x-a.x*r.y;if(p===0)return!1;let c=t.pointA.y-n.pointA.y,f=t.pointA.x-n.pointA.x;const u=(n.pointB.x-n.pointA.x)*c-(n.pointB.y-n.pointA.y)*f,o=(t.pointB.x-t.pointA.x)*c-(t.pointB.y-t.pointA.y)*f;c=u/p,f=o/p,c>0&&c<1&&(e=!0),f>0&&f<1&&(i=!0);const s=t.pointA.x+c*(t.pointB.x-t.pointA.x),l=t.pointA.y+c*(t.pointB.y-t.pointA.y);return{x:s,y:l,onLine1:e,onLine2:i}},LineToolUtils.getAxisDiff=t=>({x:t.pointB.x-t.pointA.x,y:t.pointB.y-t.pointA.y}),LineToolUtils.calcDistance=(t,n)=>Math.sqrt(Math.pow(Math.abs(t.x-n.x),2)+Math.pow(Math.abs(t.y-n.y),2)),LineToolUtils.drawCurveLine=(t,n,e,i=!0,r=!1,a)=>{const p=polygonTool.createSmoothCurvePointsFromPointList(n,SEGMENT_NUMBER);t.save(),t.lineCap="round",t.lineJoin="round",t.strokeStyle=e.color,i&&(t.lineWidth=e.lineWidth),r&&_LineToolUtils.setReferenceCtx(t),n.forEach((c,f)=>{const u=c==null?void 0:c.specialEdge,o=p.splice(0,SEGMENT_NUMBER+1);t.save(),t.beginPath(),a===f&&(t.lineWidth=4),o.forEach(({x:s,y:l},g)=>{const y=g>0?"lineTo":"moveTo";u&&_LineToolUtils.setSpecialEdgeStyle(t),t[y](s,l)}),t.stroke(),t.restore()}),t.restore()},LineToolUtils.calcTwoPointDistance=(t,n)=>Math.sqrt(Math.pow(t.x-n.x,2)+Math.pow(t.y-n.y,2)),LineToolUtils.pointOverTarget=(t,n,e,i,r,a,p,c,f,u)=>{const o=t;if(!n)return t;if(e===tool.EToolName.Polygon){const s=_LineToolUtils.getPolygonPointList(i,r);if(s.length===0||PolygonUtils.isInPolygon(t,s))return o;const g=s.concat(s[0]).map(P=>f(P)),y=f(n),d=f(t),v={pointA:y,pointB:d},h=_LineToolUtils.calcOptimalIntersection(g,v,y,p,c);if(h){const P=u(h==null?void 0:h.point);o.x=P.x,o.y=P.y}else return n;return o}if(e===tool.EToolName.Rect){const{x:s,y:l,width:g,height:y}=i;return o.x=MathUtils.default.withinRange(o.x,[s,s+g]),o.y=MathUtils.default.withinRange(o.y,[l,l+y]),o}return o.x=MathUtils.default.withinRange(o.x,[0,a.width]),o.y=MathUtils.default.withinRange(o.y,[0,a.height]),o},LineToolUtils.getPolygonPointList=(t,n)=>{const{pointList:e}=t,{lineType:i}=n;return i===tool.ELineTypes.Line?e:PolygonUtils.createSmoothCurvePoints(e.reduce((r,a)=>[...r,a.x,a.y],[]),.5,!0,20)},LineToolUtils.isOnLine=(t,n,e,i,r,a)=>Math.abs((c=>(i-n)/(e-t)*(c-t)+n)(r)-a)<1e-6&&r>=t&&r<=e,LineToolUtils.inArea=({top:t,left:n,right:e,bottom:i},{x:r,y:a})=>a>=t&&a<=i&&r>=n&&r<=e,LineToolUtils.getVHPoint=(t,n,e,i)=>{const r=_LineToolUtils.getAngle(t,e);return Math.abs(r)<45?__spreadProps(__spreadValues({},n),{y:i.y}):__spreadProps(__spreadValues({},n),{x:i.x})},LineToolUtils.getAngle=(t,n)=>{const e=n.x-t.x,i=n.y-t.y;return 360*Math.atan(i/e)/(2*Math.PI)},exports.POINT_RADIUS=POINT_RADIUS,exports.SEGMENT_NUMBER=SEGMENT_NUMBER,exports.default=LineToolUtils;
@@ -0,0 +1 @@
1
+ "use strict";var _=require("lodash"),AttributeUtils=require("./AttributeUtils.js");class MarkerUtils{static getMarkerShowText(t,r=[]){return AttributeUtils.default.getAttributeShowText(t,r)}}MarkerUtils.getAuxiliaryLineByMarkerList=(u,t)=>{var r;const s=_.cloneDeep(u),l=[];let e=s.shift();for(;e;)(r=e.target)==null||r.forEach(a=>{const i=s.find(n=>n.value===a);i&&(e==null?void 0:e[t])&&l.push({start:e[t],end:i[t]})}),e=s.shift();return l},MarkerUtils.getAuxiliaryLineCoord=(u,t)=>{const r=[];return u.forEach(s=>{const{start:l,end:e}=s,a=t.find(n=>n.label===l);if(!a)return;const i=t.find(n=>n.label===e);!i||r.push({start:{x:a.x,y:a.y},end:{x:i.x,y:i.y}})}),r},module.exports=MarkerUtils;
@@ -0,0 +1 @@
1
+ "use strict";var turf=require("@turf/turf"),annotation=require("../../constant/annotation.js"),CommonToolUtils=require("./CommonToolUtils.js"),tool=require("../../constant/tool.js"),AxisUtils=require("./AxisUtils.js"),MathUtils=require("../MathUtils.js"),LineToolUtils=require("./LineToolUtils.js"),__defProp=Object.defineProperty,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(L,e,t)=>e in L?__defProp(L,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):L[e]=t,__spreadValues=(L,e)=>{for(var t in e||(e={}))__hasOwnProp.call(e,t)&&__defNormalProp(L,t,e[t]);if(__getOwnPropSymbols)for(var t of __getOwnPropSymbols(e))__propIsEnum.call(e,t)&&__defNormalProp(L,t,e[t]);return L};class PolygonUtils{static getHoverPolygonID(e,t,n=3,i=tool.ELineTypes.Line){let r="",l=Infinity;const o=AxisUtils.default.axisArea(e,n);return t.forEach(s=>{s.pointList&&o.forEach(u=>{const a=this.calcPolygonSize(s.pointList);this.isInPolygon(u,s.pointList,i)&&a<l&&(r=s.id,l=a)})}),r}static calcPolygonSize(e=[]){if((e==null?void 0:e.length)<=2)return 0;const t=e.length,n=e.reduce((i,r,l,o)=>{const s=o[(l+1)%t];return i+r.x*s.y-s.x*r.y},0);return Math.abs(n)/2}static isInPolygon(e,t,n=tool.ELineTypes.Line){let i=0,r,l,o,s;t=[...t],n===tool.ELineTypes.Curve&&(t=this.createSmoothCurvePoints(t.reduce((a,d)=>[...a,d.x,d.y],[]),.5,!0,20)),[o]=t;const u=t.length;for(r=1;r<=u;r++)s=t[r%u],e.x>Math.min(o.x,s.x)&&e.x<=Math.max(o.x,s.x)&&e.y<=Math.max(o.y,s.y)&&o.x!==s.x&&(l=(e.x-o.x)*(s.y-o.y)/(s.x-o.x)+o.y,(o.y===s.y||e.y<=l)&&i++),o=s;return i%2!=0}static createSmoothCurvePointsFromPointList(e,t=tool.SEGMENT_NUMBER){return this.createSmoothCurvePoints(e.reduce((i,r)=>[...i,r.x,r.y],[]),.5,!1,t).map((i,r)=>{var l;const o=r/(tool.SEGMENT_NUMBER+1),s=Math.floor(o),u=(l=e[s])!=null?l:{};return __spreadValues(s===o?__spreadValues({},u):{specialEdge:u.specialEdge},i)})}static createSmoothCurvePoints(e,t=.5,n=!1,i=tool.SEGMENT_NUMBER){if(e.length<4)return e;const r=[],l=e.slice(0);let o,s,u,a,d,h,P,E,x,m,c,g,f;for(n?(l.unshift(e[e.length-1]),l.unshift(e[e.length-2]),l.unshift(e[e.length-1]),l.unshift(e[e.length-2]),l.push(e[0]),l.push(e[1])):(l.unshift(e[1]),l.unshift(e[0]),l.push(e[e.length-2]),l.push(e[e.length-1])),f=2;f<l.length-4;f+=2)for(u=(l[f+2]-l[f-2])*t,a=(l[f+4]-l[f-0])*t,d=(l[f+3]-l[f-1])*t,h=(l[f+5]-l[f+1])*t,g=0;g<=i;g++)c=g/i,P=2*Math.pow(c,3)-3*Math.pow(c,2)+1,E=-(2*Math.pow(c,3))+3*Math.pow(c,2),x=Math.pow(c,3)-2*Math.pow(c,2)+c,m=Math.pow(c,3)-Math.pow(c,2),o=P*l[f]+E*l[f+2]+x*u+m*a,s=P*l[f+1]+E*l[f+3]+x*d+m*h,r.push(o),r.push(s);const v=[];for(let y=0;y<r.length-1;y+=2)v.push({x:r[y],y:r[y+1]});if(n)for(let y=0;y<i+1;y++){const p=v.shift();v.push(p)}return v}static getPolygonByID(e,t){return e.find(n=>n.id===t)}static getPolygonByIDs(e,t){if(t&&(t==null?void 0:t.length)>0)return e.filter(n=>t.includes(n.id))}static getHoverEdgeIndex(e,t,n=tool.ELineTypes.Line,i=3){let r=[...t];n===tool.ELineTypes.Curve?r=this.createSmoothCurvePoints(t.reduce((s,u)=>[...s,u.x,u.y],[]),.5,!0,tool.SEGMENT_NUMBER):n===tool.ELineTypes.Line&&r.push(r[0]);let l=-1,o=i;for(let s=0;s<r.length-1;s++){const{length:u}=MathUtils.default.getFootOfPerpendicular(e,r[s],r[s+1]);u<o&&(l=s,o=u)}return l===-1?-1:n===tool.ELineTypes.Curve?Math.floor(l/tool.SEGMENT_NUMBER):l}static getClosestPoint(e,t,n=tool.ELineTypes.Line,i=3,r){var l;let o=!1;const s=(l=r==null?void 0:r.isClose)!=null?l:!0;let u="",a=-1,d=Infinity,h=e;const P=20;let E=!1;return t.forEach(x=>{if(!E&&!!x.pointList)switch(n){case tool.ELineTypes.Line:CommonToolUtils.findAllLine(x.pointList,s).forEach((c,g)=>{if(E)return;let{length:f,footPoint:v}=MathUtils.default.getFootOfPerpendicular(e,c.point1,c.point2);const y=MathUtils.default.getLineLength(c.point1,e),p=MathUtils.default.getLineLength(c.point2,e);y<i*2&&(v=c.point1,f=y,E=!0),p<i*2&&(v=c.point2,f=p,E=!0),f<d&&f<i&&(u=x.id,a=g,d=f,h=v,o=!0)});break;case tool.ELineTypes.Curve:{const m=this.createSmoothCurvePoints(x.pointList.reduce((c,g)=>[...c,g.x,g.y],[]),.5,s,P);for(let c=0;c<m.length-1;c++){const{length:g,footPoint:f}=MathUtils.default.getFootOfPerpendicular(e,m[c],m[c+1]);g<d&&g<i&&(u=x.id,a=Math.floor(c/(P+1)),d=g,h=f,o=!0)}}break}}),{dropFoot:h,closestEdgeIndex:a,closestPolygonID:u,hasClosed:o}}static isPointListInPolygon(e,t,n=tool.ELineTypes.Line){return e.every(i=>this.isInPolygon(i,t,n))}static isPointListOutSidePolygon(e,t,n=tool.ELineTypes.Line){return e.some(i=>!this.isInPolygon(i,t,n))}static getPolygonArea(e){let t=0;for(let n=0,i=e.length;n<i;n++){const r=e[n].x,l=e[n===e.length-1?0:n+1].y,o=e[n===e.length-1?0:n+1].x,s=e[n].y;t+=r*l*.5,t-=o*s*.5}return Math.abs(t)}static updatePolygonByRotate(e,t=1,n){let i=1;return e===annotation.ERotateDirection.Anticlockwise&&(i=-1),i*=t,MathUtils.default.rotateRectPointList(i,n)}static deletePolygonLastPoint(e,t,n,i){return n===i.length-1?e:[...e,{x:t[0],y:t[1]}]}static concatBeginAndEnd(e){return e.length<1?e:[...e,e[0]]}static segmentPolygonByPolygon(e,t){var n,i;try{let r=turf.polygon([[...PolygonUtils.concatBeginAndEnd(e.map(o=>[o.x,o.y]))]]);return t.forEach(o=>{const s=turf.polygon([[...PolygonUtils.concatBeginAndEnd(o.pointList.map(a=>[a.x,a.y]))]]),u=turf.difference(r,s);u&&(r=u)}),((i=(n=r==null?void 0:r.geometry)==null?void 0:n.coordinates.map(o=>{var s;return((s=r==null?void 0:r.geometry)==null?void 0:s.type)==="MultiPolygon"?o[0].reduce(PolygonUtils.deletePolygonLastPoint,[]):o.reduce(PolygonUtils.deletePolygonLastPoint,[])}))!=null?i:[]).reduce((o,s)=>{const u=s.length,a=s.filter((d,h)=>{const P=(h+1)%u;return!AxisUtils.default.getIsInScope(d,s[P],1)});return a.length<3?o:[...o,a]},[])}catch(r){console.error(r)}}static getPolygonPointList(e,t){const n=t.find(i=>i.id===e);return n&&n.pointList&&n.pointList.length>0?n.pointList:[]}static getWrapPolygonIndex(e,t){return t.findIndex(n=>PolygonUtils.isPointListInPolygon(e,n.pointList))}static clipPolygonFromWrapPolygon(e,t){const n=PolygonUtils.isPolygonClosewise(t),i=PolygonUtils.isPolygonClosewise(e),r=PolygonUtils.getClosePointDistanceFromPolygon(e[0],t),l=t[r];let o=[...t.slice(0,r),l,...e,e[0],...t.slice(r,t.length)];return n===i&&(o=[...t.slice(0,r),l,e[0],...e.reverse(),...t.slice(r,t.length)]),o}static isPolygonClosewise(e){const t=e.length;let n,i,r,l=0,o;if(t<3)return 0;for(n=0;n<t;n++)i=(n+1)%t,r=(n+2)%t,o=(e[i].x-e[n].x)*(e[r].y-e[i].y),o-=(e[i].y-e[n].y)*(e[r].x-e[i].x),o<0?l--:o>0&&l++;return l>0?1:l<0?-1:0}static getClosePointDistanceFromPolygon(e,t){let n=Number.MAX_SAFE_INTEGER,i=-1;return t.forEach((r,l)=>{const o=LineToolUtils.default.calcDistance(e,r);o<n&&(n=o,i=l)}),i}static combinePolygonWithPolygon(e,t){var n,i;try{const r=turf.polygon([[...PolygonUtils.concatBeginAndEnd(e.pointList.map(a=>[a.x,a.y]))]]),l=turf.polygon([[...PolygonUtils.concatBeginAndEnd(t.pointList.map(a=>[a.x,a.y]))]]),o=turf.union(r,l),s=[],u=e;if(((i=(n=o==null?void 0:o.geometry)==null?void 0:n.coordinates)==null?void 0:i.length)===1){s.push(t.id);const a=o==null?void 0:o.geometry.coordinates.map(d=>{var h;return((h=o==null?void 0:o.geometry)==null?void 0:h.type)==="MultiPolygon"?d[0].reduce(PolygonUtils.deletePolygonLastPoint,[]):d.reduce(PolygonUtils.deletePolygonLastPoint,[])})[0];u.pointList=a}return{newPolygon:u,unionList:s}}catch(r){console.error(r)}}}module.exports=PolygonUtils;
@@ -0,0 +1 @@
1
+ "use strict";var AxisUtils=require("./AxisUtils.js"),CommonToolUtils=require("./CommonToolUtils.js"),polygonTool=require("./polygonTool.js"),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(a,t,e)=>t in a?__defProp(a,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[t]=e,__spreadValues=(a,t)=>{for(var e in t||(t={}))__hasOwnProp.call(t,e)&&__defNormalProp(a,e,t[e]);if(__getOwnPropSymbols)for(var e of __getOwnPropSymbols(t))__propIsEnum.call(t,e)&&__defNormalProp(a,e,t[e]);return a},__spreadProps=(a,t)=>__defProps(a,__getOwnPropDescs(t));class RectUtils{static composeResult(t,e,r,n,i){try{const s=JSON.parse(t),o=CommonToolUtils.getCurrentStepInfo(e,n),{dataSourceStep:y}=o,h=`step_${o.step}`;if(Object.assign(s,i),s[h]){const l=s[h];return l.result?(l.result=r,JSON.stringify(s)):JSON.stringify(__spreadProps(__spreadValues({},s),{[h]:__spreadProps(__spreadValues({},s[h]),{result:r})}))}return JSON.stringify(__spreadProps(__spreadValues({},s),{[h]:{dataSourceStep:y,toolName:o.tool,result:r}}))}catch(s){return t}}static changeCoordinateByRotate(t,e,r){const{x:n,y:i,width:s,height:o}=t,y=AxisUtils.default.changeCoordinateByRotate({x:n,y:i},e,r);switch(e%360){case 90:return __spreadProps(__spreadValues({},t),{x:y.x-o,y:y.y,width:o,height:s});case 180:return __spreadProps(__spreadValues({},t),{x:y.x-s,y:y.y-o});case 270:return __spreadProps(__spreadValues({},t),{x:y.x,y:y.y-s,width:o,height:s});default:return t}}static translateRect2Points(t){const{x:e,y:r,width:n,height:i}=t;return[{x:e,y:r},{x:e+n,y:r},{x:e+n,y:r+i},{x:e,y:r+i}]}static translatePoints2Rect(t,e){if(t.length!==4)return;const{x:r,y:n}=t[0],i=t[1].x-t[0].x,s=t[2].y-t[1].y;return __spreadProps(__spreadValues({},e),{x:r,y:n,width:i,height:s})}static getRectPointList(t,e=1){return[{x:t.x*e,y:t.y*e},{x:(t.x+t.width)*e,y:t.y*e},{x:(t.x+t.width)*e,y:(t.y+t.height)*e},{x:t.x*e,y:(t.y+t.height)*e}]}static getRectEdgeList(t,e=1){const r=this.getRectPointList(t,e),n=r.length;return r.map((i,s)=>({begin:i,end:r[(s+1)%n]}))}static isInRect(t,e,r=0,n=1){return t.x>=e.x*n-r&&t.x<=(e.x+e.width)*n+r&&t.y>=e.y*n-r&&t.y<=(e.y+e.height)*n+r}static getRectUnderZoom(t,e=1){const{x:r,y:n,width:i,height:s}=t;return __spreadProps(__spreadValues({},t),{x:r*e,y:n*e,width:i*e,height:s*e})}static isRectNotInPolygon(t,e){return this.getRectPointList(t).some(n=>!polygonTool.isInPolygon(n,e))}}module.exports=RectUtils;
@@ -0,0 +1,20 @@
1
+ "use strict";var DrawUtils=require("./DrawUtils.js"),StyleUtils=require("./StyleUtils.js");class RenderDomClass{constructor(t){this._domMap=new Map,this._container=t.container,this._height=t.height}wheelChange(t){t.stopPropagation()}clearTag(t){const o=this._container,s=window.self.document.getElementById(t);s&&o&&o.contains(s)&&(s.removeEventListener("wheel",this.wheelChange),o==null||o.removeChild(s))}render(t){const o=Array.from(this._domMap.keys()),s=t.map(e=>e.id);t.forEach(e=>{const{text:a,textMaxWidth:r,color:n="white",background:h="rgba(0, 0, 0, 0.6)",style:l}=e;if(this._domMap.has(e.id)){const i=this._domMap.get(e.id);i&&(i.innerHTML=a)}else{const i=DrawUtils.drawTagByDom(this._container,a,e.id);i&&(i.setAttribute("style",`
2
+ position: absolute;
3
+ top: 0;
4
+ right: 0;
5
+ z-index: 20;
6
+ padding: 8px 20px;
7
+ font-size: 15px;
8
+ max-width: ${r}px;
9
+ color: ${n};
10
+ text-align: left;
11
+ line-height: 32px;
12
+ word-break: break-all;
13
+ white-space: pre-wrap;
14
+ background: ${h};
15
+ opacity: 0.9;
16
+ max-height: ${this._height*.8}px;
17
+ overflow-y: scroll;
18
+ clear: both;
19
+ ${StyleUtils.getStyle2String(l)}
20
+ `),i.addEventListener("wheel",this.wheelChange),this._domMap.set(e.id,i))}}),o.forEach(e=>{s.indexOf(e)===-1&&(this.clearTag(e),this._domMap.delete(e))})}}module.exports=RenderDomClass;
@@ -0,0 +1,16 @@
1
+ "use strict";var index=require("../../locales/index.js"),constants=require("../../locales/constants.js");const INVALID_PAGE_CLASS_NAME="bee-invalid-page";class RenderDomUtils{static renderInvalidPage(i,t,s){const e=document.createElement("div");return e.setAttribute("style",`
2
+ position: absolute;
3
+ left: 0px;
4
+ top: 0px;
5
+ width: ${t.width}px;
6
+ height: ${t.height}px;
7
+ background: rgba(255, 87, 34, 1);
8
+ overflow: hidden;
9
+ color: white;
10
+ display: flex;
11
+ justify-content: center;
12
+ align-items: center;
13
+ font-size: 30px;
14
+ opacity: 0.7;
15
+ z-index: 30;
16
+ `),e.innerHTML=index.getMessagesByLocale(constants.EMessage.InvalidImage,s),e.className=INVALID_PAGE_CLASS_NAME,i.appendChild(e),e}}module.exports=RenderDomUtils;
@@ -0,0 +1 @@
1
+ "use strict";class StyleUtils{static getStrokeAndFill(e,i=!0,r={}){const{isSelected:s=!1,isHover:l=!1}=r;return s?{stroke:i?e.validSelected.stroke:e.invalidSelected.stroke,fill:i?e.validSelected.fill:e.invalidSelected.fill}:l?{stroke:i?e.validHover.stroke:e.invalidHover.stroke,fill:i?e.validHover.fill:e.invalidHover.fill}:{stroke:i?e.valid.stroke:e.invalid.stroke,fill:i?e.valid.fill:e.invalid.fill}}static getStyle2String(e){if(!!e)return Object.entries(e).reduce((i,r)=>`${i} ${r[0]}: ${r[1]};`,"")}}module.exports=StyleUtils;
@@ -0,0 +1 @@
1
+ "use strict";var uuid=require("../uuid.js"),__defProp=Object.defineProperty,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(l,t,e)=>t in l?__defProp(l,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):l[t]=e,__spreadValues=(l,t)=>{for(var e in t||(t={}))__hasOwnProp.call(t,e)&&__defNormalProp(l,e,t[e]);if(__getOwnPropSymbols)for(var e of __getOwnPropSymbols(t))__propIsEnum.call(t,e)&&__defNormalProp(l,e,t[e]);return l};class TagUtil{static getTagKeyName(t,e){var r,i;if(!!e)return(i=(r=e.find(u=>u.value===t))==null?void 0:r.key)!=null?i:""}static getTagName([t="",e=""],r){if(!!r){for(const i of r)if(i.value===t){if(!i.subSelected)return console.error("\u6807\u7B7E\u89E3\u6790\u9519\u8BEF",t,e),"";for(const u of i.subSelected)if(u.value===e)return u.key}}}static getTagNameList(t,e){return Object.keys(t).length<=0?[]:Object.entries(t).reduce((r,i)=>{const[u,s]=i;if(s&&s.length>0){const n=s.split(";"),a={keyName:this.getTagKeyName(u,e),value:n.map(o=>this.getTagName([u,o],e))};return[...r,a]}return r},[]).filter(r=>r)}static getTagnameListWithoutConfig(t){return Object.keys(t).length<=0?[]:Object.entries(t).reduce((e,r)=>{const[i,u]=r,s=u.split(";"),n={keyName:i,value:s};return[...e,n]},[]).filter(e=>e)}static judgeResultIsInInputList(t,e,r){return!t||!e||!r?!1:r.filter(u=>{if(u.value===t&&u.subSelected){const s=e==null?void 0:e.split(";");return(u==null?void 0:u.subSelected.filter(n=>s.indexOf(n.value)>-1).length)>0}return!1}).length>0}static getDefaultResultByConfig(t){return t.reduce((e,r)=>(r.subSelected&&r.subSelected.forEach(i=>{var u;if(i.isDefault){const s=(u=e[r.value])!=null?u:"";let n=[];s.length>0&&(n=s.split(";")),n.push(i.value),e[r.value]=n.join(";")}}),e),{})}static getDefaultTagResult(t,e){const r=this.getDefaultResultByConfig(t);return e.length>0?e.map(i=>({id:uuid(),sourceID:i.id,result:__spreadValues({},r)})):[{id:uuid(),sourceID:"",result:__spreadValues({},r)}]}}module.exports=TagUtil;
@@ -0,0 +1 @@
1
+ "use strict";class UnitUtils{static deg2rad(t){return t*Math.PI/180}static rad2deg(t){return t*180/Math.PI}}module.exports=UnitUtils;
@@ -0,0 +1 @@
1
+ "use strict";var annotation=require("../../constant/annotation.js"),MathUtils=require("../MathUtils.js");const ZOOM_LEVEL=[1,5,10,20,30,50,80,100].concat(Array.from({length:9}).map((t,n)=>(n+2)*100));class ZoomUtils{}ZoomUtils.zoomChanged=(t,n,l=annotation.EGrowthMode.Linear)=>{switch(l){case annotation.EGrowthMode.Intelligence:{const e=Math.max(...ZOOM_LEVEL),c=Math.min(...ZOOM_LEVEL),a=ZOOM_LEVEL.slice(0,ZOOM_LEVEL.length).findIndex((i,u)=>t>=i&&(t<ZOOM_LEVEL[u+1]||i===e));let o;if(a===-1)t>=c&&t<=e?o=n?e:c:o=n?c:t;else{const i=n?a+1:a-(ZOOM_LEVEL.includes(t)?1:0);o=ZOOM_LEVEL[MathUtils.default.withinRange(i,[0,ZOOM_LEVEL.length-1])]}return o}default:{const e=n?2:1/2;return t*e}}},ZoomUtils.wheelChangePos=(t,n,l,e,c={})=>{const{zoom:a=1,innerZoom:o=1,basicZoom:i=1,zoomMax:u=1e3,rotate:x=0}=c,{x:f,y:g}=e,d=parseFloat((a+1/10).toFixed(1))/5;if(t&&n){let{width:r,height:h}=t;[90,270].includes(x)&&(r=t.height,h=t.width);const M=r*o,Z=h*o,m=n.x-f,w=n.y-g,p=m/M,y=w/Z;let s=a+l*d;s=MathUtils.default.withinRange(s,[i,u]);const E=r*s*p,L=h*s*y,U=f+(m-E),X=g+(w-L);return{zoom:s,currentPos:{x:U,y:X},imgInfo:{width:r*s,height:h*s},ratio:d}}return null},module.exports=ZoomUtils;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var tool=require("../../constant/tool.js"),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,l)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[t]=l,__spreadValues=(e,t)=>{for(var l in t||(t={}))__hasOwnProp.call(t,l)&&__defNormalProp(e,l,t[l]);if(__getOwnPropSymbols)for(var l of __getOwnPropSymbols(t))__propIsEnum.call(t,l)&&__defNormalProp(e,l,t[l]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t));function createSmoothCurvePoints(e,t=.5,l=!1,s=16){if(e.length<4)return e;const f=[],r=e.slice(0);let a,o,x,y,p,m,_,v,w,P,h,c,u;for(l?(r.unshift(e[e.length-1]),r.unshift(e[e.length-2]),r.unshift(e[e.length-1]),r.unshift(e[e.length-2]),r.push(e[0]),r.push(e[1])):(r.unshift(e[1]),r.unshift(e[0]),r.push(e[e.length-2]),r.push(e[e.length-1])),u=2;u<r.length-4;u+=2)for(x=(r[u+2]-r[u-2])*t,y=(r[u+4]-r[u-0])*t,p=(r[u+3]-r[u-1])*t,m=(r[u+5]-r[u+1])*t,c=0;c<=s;c++)h=c/s,_=2*Math.pow(h,3)-3*Math.pow(h,2)+1,v=-(2*Math.pow(h,3))+3*Math.pow(h,2),w=Math.pow(h,3)-2*Math.pow(h,2)+h,P=Math.pow(h,3)-Math.pow(h,2),a=_*r[u]+v*r[u+2]+w*x+P*y,o=_*r[u+1]+v*r[u+3]+w*p+P*m,f.push(a),f.push(o);const i=[];for(let n=0;n<f.length-1;n+=2)i.push({x:f[n],y:f[n+1]});if(l)for(let n=0;n<s+1;n++){const M=i.shift();i.push(M)}return i}const createSmoothCurvePointsFromPointList=(e,t=16)=>createSmoothCurvePoints(e.reduce((l,s)=>[...l,s.x,s.y],[]),.5,!1,t);function isInPolygon(e,t,l=tool.ELineTypes.Line){let s=0,f,r,a,o;t=[...t],l===tool.ELineTypes.Curve&&(t=createSmoothCurvePoints(t.reduce((y,p)=>[...y,p.x,p.y],[]),.5,!0,tool.SEGMENT_NUMBER)),[a]=t;const x=t.length;for(f=1;f<=x;f++)o=t[f%x],e.x>Math.min(a.x,o.x)&&e.x<=Math.max(a.x,o.x)&&e.y<=Math.max(a.y,o.y)&&a.x!==o.x&&(r=(e.x-a.x)*(o.y-a.y)/(o.x-a.x)+a.y,(a.y===o.y||e.y<=r)&&s++),a=o;return s%2!=0}function getPolygonPointUnderZoom(e,t=1){return e.map(l=>__spreadProps(__spreadValues({},l),{x:l.x*t,y:l.y*t}))}exports.createSmoothCurvePoints=createSmoothCurvePoints,exports.createSmoothCurvePointsFromPointList=createSmoothCurvePointsFromPointList,exports.getPolygonPointUnderZoom=getPolygonPointUnderZoom,exports.isInPolygon=isInPolygon;
@@ -0,0 +1 @@
1
+ "use strict";function uuid(s=8,e=62){const n="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),o=[];let t;if(e=e||n.length,s)for(t=0;t<s;t++)o[t]=n[0|Math.random()*e];else{let r;for(o[8]=o[13]=o[18]=o[23]="-",o[14]="4",t=0;t<36;t++)o[t]||(r=0|Math.random()*16,o[t]=n[t===19?r&3|8:r])}return o.join("")}module.exports=uuid;
@@ -0,0 +1 @@
1
+ import{createBase64WorkerFactory as b}from"./_rollup-plugin-web-worker-loader__helper__browser__createBase64WorkerFactory.js";var l=b("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7dmFyIEM9T2JqZWN0LmRlZmluZVByb3BlcnR5LEw9T2JqZWN0LmdldE93blByb3BlcnR5U3ltYm9scyxJPU9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHksXz1PYmplY3QucHJvdG90eXBlLnByb3BlcnR5SXNFbnVtZXJhYmxlLE09KGMsdCxvKT0+dCBpbiBjP0MoYyx0LHtlbnVtZXJhYmxlOiEwLGNvbmZpZ3VyYWJsZTohMCx3cml0YWJsZTohMCx2YWx1ZTpvfSk6Y1t0XT1vLEU9KGMsdCk9Pntmb3IodmFyIG8gaW4gdHx8KHQ9e30pKUkuY2FsbCh0LG8pJiZNKGMsbyx0W29dKTtpZihMKWZvcih2YXIgbyBvZiBMKHQpKV8uY2FsbCh0LG8pJiZNKGMsbyx0W29dKTtyZXR1cm4gY307Y2xhc3MgUntzdGF0aWMgZmluZEFsbExpbmUodCxvPSEwKXtjb25zdCBuPVtdLHI9Wy4uLnRdO3IubGVuZ3RoPj0zJiZvPT09ITAmJnIucHVzaChFKHt9LHJbMF0pKTtmb3IobGV0IHM9MDtzPHIubGVuZ3RoO3MrKylyW3MrMV0mJm4ucHVzaCh7cG9pbnQxOnJbc10scG9pbnQyOnJbcysxXSxwb2ludEluZGV4OnN9KTtyZXR1cm4gbn19Y2xhc3MgZ3tzdGF0aWMgaXNJblJhbmdlKHQsbyl7Y29uc3Qgbj1NYXRoLm1pbiguLi5vKSxyPU1hdGgubWF4KC4uLm8pLHM9ZT0+ZTw9ciYmZT49bjtyZXR1cm4oQXJyYXkuaXNBcnJheSh0KT90Olt0XSkuZXZlcnkoZT0+cyhlKSl9c3RhdGljIGdldExpbmVMZW5ndGgodCxvKXtyZXR1cm4gTWF0aC5zcXJ0KE1hdGgucG93KG8ueS10LnksMikrTWF0aC5wb3coby54LXQueCwyKSl9c3RhdGljIGlzT3V0T2ZSYW5nZSh0LG8sbixyKXtjb25zdCBzPW8ueC10LngsYT1uLngtdC54LGU9by55LXQueSxmPW4ueS10LnksbD1zPj0wJiZhPj0wfHxzPD0wJiZhPD0wLHU9ZT49MCYmZj49MHx8ZTw9MCYmZjw9MDtyZXR1cm4gcz5yJiZhPnImJmx8fGU+ciYmZj5yJiZ1fXN0YXRpYyBjcm9zcyh0LG8pe3JldHVybiB0Lngqby55LW8ueCp0Lnl9c3RhdGljIGdldEZvb3RPZlBlcnBlbmRpY3VsYXIodCxvLG4scj0hMSl7bGV0IHM9e3g6MCx5OjB9O2NvbnN0IGE9by54LW4ueCxlPW8ueS1uLnk7aWYoTWF0aC5hYnMoYSk8MWUtOCYmTWF0aC5hYnMoZSk8MWUtOClyZXR1cm4gcz1vLHM7bGV0IGY9KHQueC1vLngpKihvLngtbi54KSsodC55LW8ueSkqKG8ueS1uLnkpO2YvPWEqYStlKmUscy54PW8ueCtmKmEscy55PW8ueStmKmU7Y29uc3QgbD10aGlzLmdldExpbmVMZW5ndGgodCxzKSx1PTI7aWYobD4yKXJldHVybntmb290UG9pbnQ6cyxsZW5ndGg6SW5maW5pdHl9O2NvbnN0IHA9TWF0aC5taW4oby54LG4ueCkseD1NYXRoLm1heChvLngsbi54KSxoPU1hdGgubWluKG8ueSxuLnkpLG09TWF0aC5tYXgoby55LG4ueSksaT0hKHRoaXMuaXNJblJhbmdlKHQueCxbcCx4XSl8fHRoaXMuaXNJblJhbmdlKHQueSxbaCxtXSkpLHk9dC54PngrdXx8dC54PHAtdXx8dC55Pm0rdXx8dC55PGgtdTtyZXR1cm4ocj9pOnkpP3tmb290UG9pbnQ6cyxsZW5ndGg6SW5maW5pdHl9Ontmb290UG9pbnQ6cyxsZW5ndGg6bH19fWZ1bmN0aW9uIFMoYyx0LG89MCxuPTMscil7bGV0IHM9ITE7Y29uc3QgYT1yP3IuaXNDbG9zZXx8ITA6ITE7bGV0IGU9IiIsZj0tMSxsPUluZmluaXR5LHU9Yztjb25zdCBwPTIwO2xldCB4PSExO3JldHVybiB0LmZvckVhY2goaD0+e2lmKCF4JiYhIWgucG9pbnRMaXN0KXN3aXRjaChvKXtjYXNlIDA6Ui5maW5kQWxsTGluZShoLnBvaW50TGlzdCxhKS5mb3JFYWNoKChpLHkpPT57aWYoeClyZXR1cm47Y29uc3QgUD1nLmdldExpbmVMZW5ndGgoaS5wb2ludDEsYyksdz1nLmdldExpbmVMZW5ndGgoaS5wb2ludDIsYyk7aWYoZy5pc091dE9mUmFuZ2UoYyxpLnBvaW50MSxpLnBvaW50MixuKSlyZXR1cm47bGV0e2xlbmd0aDpPLGZvb3RQb2ludDpkfT1nLmdldEZvb3RPZlBlcnBlbmRpY3VsYXIoYyxpLnBvaW50MSxpLnBvaW50Mik7UDxuKjImJihkPWkucG9pbnQxLE89UCx4PSEwKSx3PG4qMiYmKGQ9aS5wb2ludDIsTz13LHg9ITApLE88bCYmTzxuJiYoZT1oLmlkLGY9eSxsPU8sdT1kLHM9ITApfSk7YnJlYWs7Y2FzZSAxOntjb25zdCBtPXRoaXMuY3JlYXRlU21vb3RoQ3VydmVQb2ludHMoaC5wb2ludExpc3QucmVkdWNlKChpLHkpPT5bLi4uaSx5LngseS55XSxbXSksLjUsYSxwKTtmb3IobGV0IGk9MDtpPG0ubGVuZ3RoLTE7aSsrKXtjb25zdHtsZW5ndGg6eSxmb290UG9pbnQ6UH09Zy5nZXRGb290T2ZQZXJwZW5kaWN1bGFyKGMsbVtpXSxtW2krMV0pO3k8bCYmeTxuJiYoZT1oLmlkLGY9TWF0aC5mbG9vcihpLyhwKzEpKSxsPXksdT1QLHM9ITApfX1icmVha319KSx7ZHJvcEZvb3Q6dSxjbG9zZXN0RWRnZUluZGV4OmYsY2xvc2VzdFBvbHlnb25JRDplLGhhc0Nsb3NlZDpzfX1vbm1lc3NhZ2U9ZnVuY3Rpb24odCl7Y29uc3R7cG9pbnRzOm8sYmFja2dyb3VuZExpc3Q6bn09dC5kYXRhLHI9W10scz1uZXcgU2V0O3RyeXtjb25zdCBhPShlLGYpPT57Y29uc3R7ZHJvcEZvb3Q6bH09UyhlLGYsMCwxLHtpc0Nsb3NlOiExfSk7aWYobCE9PWUpe2NvbnN0IHU9YCR7bC54fSArICR7bC55fWA7cy5oYXModSl8fHIucHVzaChlKSxzLmFkZCh1KX19O28uZm9yRWFjaChmdW5jdGlvbihmKXthKGYsbil9KSxuLmZvckVhY2goZnVuY3Rpb24oZil7bGV0IGw9IiI7bD1mLmlkLG4uZm9yRWFjaChmdW5jdGlvbihwLHgpe2lmKHAuaWQ9PT1sKXJldHVybjtjb25zdCBoPVsuLi5uXTtoLnNwbGljZSh4LDEpLHAucG9pbnRMaXN0LmZvckVhY2goZnVuY3Rpb24oaSl7YShpLGgpfSl9KX0pLHBvc3RNZXNzYWdlKHtjb25uZWN0aW9uUG9pbnRzOnJ9KX1jYXRjaChhKXtjb25zb2xlLmVycm9yKGEpLHBvc3RNZXNzYWdlKHtjb25uZWN0aW9uUG9pbnRzOltdfSl9fX0pKCk7Cgo=",null,!1);export{l as default};
@@ -0,0 +1,2 @@
1
+ function i(o,a){var r=atob(o);if(a){for(var e=new Uint8Array(r.length),n=0,t=r.length;n<t;++n)e[n]=r.charCodeAt(n);return String.fromCharCode.apply(null,new Uint16Array(e.buffer))}return r}function l(o,a,r){var e=a===void 0?null:a,n=r===void 0?!1:r,t=i(o,n),u=t.indexOf(`
2
+ `,10)+1,c=t.substring(u)+(e?"//# sourceMappingURL="+e:""),f=new Blob([c],{type:"application/javascript"});return URL.createObjectURL(f)}function v(o,a,r){var e;return function(t){return e=e||l(o,a,r),new Worker(e,t)}}export{v as createBase64WorkerFactory};
@@ -0,0 +1 @@
1
+ import{createBase64WorkerFactory as d}from"./_rollup-plugin-web-worker-loader__helper__browser__createBase64WorkerFactory.js";var b=d("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwp2YXIgd29ya2VyX2NvZGU9ZnVuY3Rpb24oeCl7InVzZSBzdHJpY3QiO2Z1bmN0aW9uIE0odCl7Y29uc3QgZT0tNyxzPTMsZj1zLWU7cmV0dXJuIHQ8ZSYmKHQ9ZSksdD5zJiYodD1zKSxNYXRoLmZsb29yKCh0LWUpL2YqMjU1KX1mdW5jdGlvbiBtKCl7bGV0IHQ7Y29uc3QgZT1uZXcgQXJyYXkoMjU2KS5maWxsKCIiKS5tYXAoKCk9Pm5ldyBBcnJheSgzKS5maWxsKCIiKSk7Zm9yKGxldCBzPTA7czwyMDtzKyspe2Zvcih0PTA7dDwzMjt0KyspZVt0XVswXT0xMjgrNCp0LGVbdF1bMV09MCxlW3RdWzJdPTA7Zm9yKGVbMzJdWzBdPTI1NSxlWzMyXVsxXT0wLGVbMzJdWzJdPTAsdD0wO3Q8NjM7dCsrKWVbMzMrdF1bMF09MjU1LGVbMzMrdF1bMV09NCs0KnQsZVszMyt0XVsyXT0wO2ZvcihlWzk2XVswXT0yNTQsZVs5Nl1bMV09MjU1LGVbOTZdWzJdPTIsdD0wO3Q8NjI7dCsrKWVbOTcrdF1bMF09MjUwLTQqdCxlWzk3K3RdWzFdPTI1NSxlWzk3K3RdWzJdPTYrNCp0O2ZvcihlWzE1OV1bMF09MSxlWzE1OV1bMV09MjU1LGVbMTU5XVsyXT0yNTQsdD0wO3Q8NjQ7dCsrKWVbMTYwK3RdWzBdPTAsZVsxNjArdF1bMV09MjUyLXQqNCxlWzE2MCt0XVsyXT0yNTU7Zm9yKHQ9MDt0PDMyO3QrKyllWzIyNCt0XVswXT0wLGVbMjI0K3RdWzFdPTAsZVsyMjQrdF1bMl09MjUyLTQqdH1yZXR1cm4gZX1jb25zdCBkPW0oKTtmdW5jdGlvbiBoKHQsZSxzPTApe2xldCBmPTAsbCx1LG4sbztlPVsuLi5lXSxzPT09MSYmKGU9Y3JlYXRlU21vb3RoQ3VydmVQb2ludHMoZS5yZWR1Y2UoKGEscik9PlsuLi5hLHIueCxyLnldLFtdKSwuNSwhMCxTRUdNRU5UX05VTUJFUikpLFtuXT1lO2NvbnN0IGk9ZS5sZW5ndGg7Zm9yKGw9MTtsPD1pO2wrKylvPWVbbCVpXSx0Lng+TWF0aC5taW4obi54LG8ueCkmJnQueDw9TWF0aC5tYXgobi54LG8ueCkmJnQueTw9TWF0aC5tYXgobi55LG8ueSkmJm4ueCE9PW8ueCYmKHU9KHQueC1uLngpKihvLnktbi55KS8oby54LW4ueCkrbi55LChuLnk9PT1vLnl8fHQueTw9dSkmJmYrKyksbj1vO3JldHVybiBmJTIhPTB9cmV0dXJuIG9ubWVzc2FnZT1mdW5jdGlvbihlKXtjb25zdHt6TWluOnMsek1heDpmLHBvbHlnb25Qb2ludExpc3Q6bCxwb3NpdGlvbjp1LGNvbG9yOm59PWUuZGF0YSxvPVtdLGk9W107bGV0IGE9MDtmb3IobGV0IHI9MDtyPHUubGVuZ3RoO3IrPTMpe2NvbnN0IHA9dVtyXSx5PXVbcisxXSxjPXVbcisyXTtpZihoKHt4OnAseX0sbCkmJmM+PXMmJmM8PWYpe2lmKG8ucHVzaChwKSxvLnB1c2goeSksby5wdXNoKGMpLG4ubGVuZ3RoPT09MCl7Y29uc3QgZz1NKGMpLHc9ZFtnXSxbQyxfLEVdPXc7aS5wdXNoKEMvMjU1KSxpLnB1c2goXy8yNTUpLGkucHVzaChFLzI1NSl9ZWxzZSBpLnB1c2gobltyXSksaS5wdXNoKG5bcisxXSksaS5wdXNoKG5bcisyXSk7YSsrfX10aGlzLnBvc3RNZXNzYWdlKHtwb3NpdGlvbjpvLGNvbG9yOmksbnVtOmF9KX0seC5pc0luUG9seWdvbj1oLE9iamVjdC5kZWZpbmVQcm9wZXJ0eSh4LCJfX2VzTW9kdWxlIix7dmFsdWU6ITB9KSx4fSh7fSk7Cgo=",null,!1);export{b as default};
@@ -0,0 +1 @@
1
+ import{createBase64WorkerFactory as d}from"./_rollup-plugin-web-worker-loader__helper__browser__createBase64WorkerFactory.js";var s=d("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwp2YXIgd29ya2VyX2NvZGU9ZnVuY3Rpb24oeCl7InVzZSBzdHJpY3QiO2Z1bmN0aW9uIGcodCl7Y29uc3QgZT0tNyxvPTMsaT1vLWU7cmV0dXJuIHQ8ZSYmKHQ9ZSksdD5vJiYodD1vKSxNYXRoLmZsb29yKCh0LWUpL2kqMjU1KX1mdW5jdGlvbiBwKCl7bGV0IHQ7Y29uc3QgZT1uZXcgQXJyYXkoMjU2KS5maWxsKCIiKS5tYXAoKCk9Pm5ldyBBcnJheSgzKS5maWxsKCIiKSk7Zm9yKGxldCBvPTA7bzwyMDtvKyspe2Zvcih0PTA7dDwzMjt0KyspZVt0XVswXT0xMjgrNCp0LGVbdF1bMV09MCxlW3RdWzJdPTA7Zm9yKGVbMzJdWzBdPTI1NSxlWzMyXVsxXT0wLGVbMzJdWzJdPTAsdD0wO3Q8NjM7dCsrKWVbMzMrdF1bMF09MjU1LGVbMzMrdF1bMV09NCs0KnQsZVszMyt0XVsyXT0wO2ZvcihlWzk2XVswXT0yNTQsZVs5Nl1bMV09MjU1LGVbOTZdWzJdPTIsdD0wO3Q8NjI7dCsrKWVbOTcrdF1bMF09MjUwLTQqdCxlWzk3K3RdWzFdPTI1NSxlWzk3K3RdWzJdPTYrNCp0O2ZvcihlWzE1OV1bMF09MSxlWzE1OV1bMV09MjU1LGVbMTU5XVsyXT0yNTQsdD0wO3Q8NjQ7dCsrKWVbMTYwK3RdWzBdPTAsZVsxNjArdF1bMV09MjUyLXQqNCxlWzE2MCt0XVsyXT0yNTU7Zm9yKHQ9MDt0PDMyO3QrKyllWzIyNCt0XVswXT0wLGVbMjI0K3RdWzFdPTAsZVsyMjQrdF1bMl09MjUyLTQqdH1yZXR1cm4gZX1jb25zdCBDPXAoKTtmdW5jdGlvbiBtKHQsZSxvPTApe2xldCBpPTAscyxhLHIsbjtlPVsuLi5lXSxvPT09MSYmKGU9Y3JlYXRlU21vb3RoQ3VydmVQb2ludHMoZS5yZWR1Y2UoKGMsbCk9PlsuLi5jLGwueCxsLnldLFtdKSwuNSwhMCxTRUdNRU5UX05VTUJFUikpLFtyXT1lO2NvbnN0IHU9ZS5sZW5ndGg7Zm9yKHM9MTtzPD11O3MrKyluPWVbcyV1XSx0Lng+TWF0aC5taW4oci54LG4ueCkmJnQueDw9TWF0aC5tYXgoci54LG4ueCkmJnQueTw9TWF0aC5tYXgoci55LG4ueSkmJnIueCE9PW4ueCYmKGE9KHQueC1yLngpKihuLnktci55KS8obi54LXIueCkrci55LChyLnk9PT1uLnl8fHQueTw9YSkmJmkrKykscj1uO3JldHVybiBpJTIhPTB9ZnVuY3Rpb24gYih7ek1pbjp0LHpNYXg6ZSxwb2x5Z29uUG9pbnRMaXN0Om8sYXR0cmlidXRlOmkseDpzLHk6YSx6OnIsY29sb3JMaXN0Om4sdmFsaWQ6dX0pe2lmKG0oe3g6cyx5OmF9LG8pJiZyPj10JiZyPD1lKXJldHVybiB1PT09ITE/WzEsMTAzLzI1NSwxMDIvMjU1XTpuW2ldP25baV0ucmdiYS5zbGljZSgwLDMpLm1hcChsPT5sLzI1NSk6WzEsMCwwXX1yZXR1cm4gb25tZXNzYWdlPWZ1bmN0aW9uKGUpe2NvbnN0e3Bvc2l0aW9uOm8sY29sb3I6aSxjdWJvaWRMaXN0OnMsY29sb3JMaXN0OmF9PWUuZGF0YTtsZXQgcj0wO2ZvcihsZXQgbj0wO248by5sZW5ndGg7bis9Myl7Y29uc3QgdT1vW25dLGM9b1tuKzFdLGw9b1tuKzJdLGQ9cy5tYXAoZj0+Yih7cG9seWdvblBvaW50TGlzdDpmLnBvbHlnb25Qb2ludExpc3Qsek1pbjpmLnpNaW4sek1heDpmLnpNYXgseDp1LHk6Yyx6OmwsYXR0cmlidXRlOmYuYXR0cmlidXRlLGNvbG9yTGlzdDphLHZhbGlkOmYudmFsaWR9KSkuZmlsdGVyKGY9PmYpLnBvcCgpO2lmKGQpe3IrKztjb25zdFtmLHksTV09ZDtpW25dPWYsaVtuKzFdPXksaVtuKzJdPU19ZWxzZXtjb25zdCBmPWcobCkseT1DW2ZdLFtNLHcsX109eTtpW25dPU0vMjU1LGlbbisxXT13LzI1NSxpW24rMl09Xy8yNTV9fXBvc3RNZXNzYWdlKHtwb2ludHM6byxjb2xvcjppLG51bTpyfSl9LHguaXNJblBvbHlnb249bSxPYmplY3QuZGVmaW5lUHJvcGVydHkoeCwiX19lc01vZHVsZSIse3ZhbHVlOiEwfSkseH0oe30pOwoK",null,!1);export{s as default};
@@ -0,0 +1 @@
1
+ var a='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="a"><path d="M0,0H16V-16H0Z" fill="none"/></clipPath><clipPath id="b"><path d="M13.75-2.937H2.25a.5.5,0,0,0-.5.5v.563a.125.125,0,0,0,.125.125h12.25a.125.125,0,0,0,.125-.125v-.562A.5.5,0,0,0,13.75-2.937ZM4.027-4.25a.632.632,0,0,0,.094-.008l2.628-.461a.153.153,0,0,0,.083-.044l6.623-6.623a.156.156,0,0,0,0-.22l-2.6-2.6a.155.155,0,0,0-.111-.045.155.155,0,0,0-.111.045L4.012-7.581a.159.159,0,0,0-.044.083L3.508-4.87a.524.524,0,0,0,.147.466.529.529,0,0,0,.372.155Z" fill="none"/></clipPath></defs><g transform="translate(0 16)"><g clip-path="url(#a)"><path d="M-5-21H21V5H-5Z" fill="rgba(0,0,0,0)"/></g><g clip-path="url(#b)"><path d="M-3.25-19.25h22.5V3.25H-3.25Z" fill="#ccc"/></g></g></svg>';export{a as default};
@@ -0,0 +1 @@
1
+ var a='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="a"><path d="M0,0H16V-16H0Z" fill="none"/></clipPath><clipPath id="b"><path d="M13.75-2.937H2.25a.5.5,0,0,0-.5.5v.563a.125.125,0,0,0,.125.125h12.25a.125.125,0,0,0,.125-.125v-.562A.5.5,0,0,0,13.75-2.937ZM4.027-4.25a.632.632,0,0,0,.094-.008l2.628-.461a.153.153,0,0,0,.083-.044l6.623-6.623a.156.156,0,0,0,0-.22l-2.6-2.6a.155.155,0,0,0-.111-.045.155.155,0,0,0-.111.045L4.012-7.581a.159.159,0,0,0-.044.083L3.508-4.87a.524.524,0,0,0,.147.466.529.529,0,0,0,.372.155Z" fill="none"/></clipPath></defs><g transform="translate(0 16)"><g clip-path="url(#a)"><path d="M-5-21H21V5H-5Z" fill="rgba(0,0,0,0)"/></g><g clip-path="url(#b)"><path d="M-3.25-19.25h22.5V3.25H-3.25Z" fill="#ff2323"/></g></g></svg>';export{a as default};
@@ -0,0 +1 @@
1
+ var a='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="a"><path d="M0,0H16V-16H0Z" fill="none"/></clipPath><clipPath id="b"><path d="M13.75-2.937H2.25a.5.5,0,0,0-.5.5v.563a.125.125,0,0,0,.125.125h12.25a.125.125,0,0,0,.125-.125v-.562A.5.5,0,0,0,13.75-2.937ZM4.027-4.25a.632.632,0,0,0,.094-.008l2.628-.461a.153.153,0,0,0,.083-.044l6.623-6.623a.156.156,0,0,0,0-.22l-2.6-2.6a.155.155,0,0,0-.111-.045.155.155,0,0,0-.111.045L4.012-7.581a.159.159,0,0,0-.044.083L3.508-4.87a.524.524,0,0,0,.147.466.529.529,0,0,0,.372.155Z" fill="none"/></clipPath></defs><g transform="translate(0 16)"><g clip-path="url(#a)"><path d="M-5-21H21V5H-5Z" fill="rgba(0,0,0,0)"/></g><g clip-path="url(#b)"><path d="M-3.25-19.25h22.5V3.25H-3.25Z" fill="#ffe232"/></g></g></svg>';export{a as default};
@@ -0,0 +1 @@
1
+ var a='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="a"><path d="M0,0H16V-16H0Z" fill="none"/></clipPath><clipPath id="b"><path d="M13.75-2.937H2.25a.5.5,0,0,0-.5.5v.563a.125.125,0,0,0,.125.125h12.25a.125.125,0,0,0,.125-.125v-.562A.5.5,0,0,0,13.75-2.937ZM4.027-4.25a.632.632,0,0,0,.094-.008l2.628-.461a.153.153,0,0,0,.083-.044l6.623-6.623a.156.156,0,0,0,0-.22l-2.6-2.6a.155.155,0,0,0-.111-.045.155.155,0,0,0-.111.045L4.012-7.581a.159.159,0,0,0-.044.083L3.508-4.87a.524.524,0,0,0,.147.466.529.529,0,0,0,.372.155Z" fill="none"/></clipPath></defs><g transform="translate(0 16)"><g clip-path="url(#a)"><path d="M-5-21H21V5H-5Z" fill="rgba(0,0,0,0)"/></g><g clip-path="url(#b)"><path d="M-3.25-19.25h22.5V3.25H-3.25Z" fill="#01ff30"/></g></g></svg>';export{a as default};
@@ -0,0 +1 @@
1
+ var a='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="a"><path d="M0,0H16V-16H0Z" fill="none"/></clipPath><clipPath id="b"><path d="M13.75-2.937H2.25a.5.5,0,0,0-.5.5v.563a.125.125,0,0,0,.125.125h12.25a.125.125,0,0,0,.125-.125v-.562A.5.5,0,0,0,13.75-2.937ZM4.027-4.25a.632.632,0,0,0,.094-.008l2.628-.461a.153.153,0,0,0,.083-.044l6.623-6.623a.156.156,0,0,0,0-.22l-2.6-2.6a.155.155,0,0,0-.111-.045.155.155,0,0,0-.111.045L4.012-7.581a.159.159,0,0,0-.044.083L3.508-4.87a.524.524,0,0,0,.147.466.529.529,0,0,0,.372.155Z" fill="none"/></clipPath></defs><g transform="translate(0 16)"><g clip-path="url(#a)"><path d="M-5-21H21V5H-5Z" fill="rgba(0,0,0,0)"/></g><g clip-path="url(#b)"><path d="M-3.25-19.25h22.5V3.25H-3.25Z" fill="#00ffea"/></g></g></svg>';export{a as default};
@@ -0,0 +1 @@
1
+ var a='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="a"><path d="M0,0H16V-16H0Z" fill="none"/></clipPath><clipPath id="b"><path d="M13.75-2.937H2.25a.5.5,0,0,0-.5.5v.563a.125.125,0,0,0,.125.125h12.25a.125.125,0,0,0,.125-.125v-.562A.5.5,0,0,0,13.75-2.937ZM4.027-4.25a.632.632,0,0,0,.094-.008l2.628-.461a.153.153,0,0,0,.083-.044l6.623-6.623a.156.156,0,0,0,0-.22l-2.6-2.6a.155.155,0,0,0-.111-.045.155.155,0,0,0-.111.045L4.012-7.581a.159.159,0,0,0-.044.083L3.508-4.87a.524.524,0,0,0,.147.466.529.529,0,0,0,.372.155Z" fill="none"/></clipPath></defs><g transform="translate(0 16)"><g clip-path="url(#a)"><path d="M-5-21H21V5H-5Z" fill="rgba(0,0,0,0)"/></g><g clip-path="url(#b)"><path d="M-3.25-19.25h22.5V3.25H-3.25Z" fill="#0282fa"/></g></g></svg>';export{a as default};
@@ -0,0 +1 @@
1
+ var a='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="a"><path d="M0,0H16V-16H0Z" fill="none"/></clipPath><clipPath id="b"><path d="M13.75-2.937H2.25a.5.5,0,0,0-.5.5v.563a.125.125,0,0,0,.125.125h12.25a.125.125,0,0,0,.125-.125v-.562A.5.5,0,0,0,13.75-2.937ZM4.027-4.25a.632.632,0,0,0,.094-.008l2.628-.461a.153.153,0,0,0,.083-.044l6.623-6.623a.156.156,0,0,0,0-.22l-2.6-2.6a.155.155,0,0,0-.111-.045.155.155,0,0,0-.111.045L4.012-7.581a.159.159,0,0,0-.044.083L3.508-4.87a.524.524,0,0,0,.147.466.529.529,0,0,0,.372.155Z" fill="none"/></clipPath></defs><g transform="translate(0 16)"><g clip-path="url(#a)"><path d="M-5-21H21V5H-5Z" fill="rgba(0,0,0,0)"/></g><g clip-path="url(#b)"><path d="M-3.25-19.25h22.5V3.25H-3.25Z" fill="#800cf9"/></g></g></svg>';export{a as default};
@@ -0,0 +1 @@
1
+ var a='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="a"><path d="M0,0H16V-16H0Z" fill="none"/></clipPath><clipPath id="b"><path d="M13.75-2.937H2.25a.5.5,0,0,0-.5.5v.563a.125.125,0,0,0,.125.125h12.25a.125.125,0,0,0,.125-.125v-.562A.5.5,0,0,0,13.75-2.937ZM4.027-4.25a.632.632,0,0,0,.094-.008l2.628-.461a.153.153,0,0,0,.083-.044l6.623-6.623a.156.156,0,0,0,0-.22l-2.6-2.6a.155.155,0,0,0-.111-.045.155.155,0,0,0-.111.045L4.012-7.581a.159.159,0,0,0-.044.083L3.508-4.87a.524.524,0,0,0,.147.466.529.529,0,0,0,.372.155Z" fill="none"/></clipPath></defs><g transform="translate(0 16)"><g clip-path="url(#a)"><path d="M-5-21H21V5H-5Z" fill="rgba(0,0,0,0)"/></g><g clip-path="url(#b)"><path d="M-3.25-19.25h22.5V3.25H-3.25Z" fill="#ff88f7"/></g></g></svg>';export{a as default};
@@ -0,0 +1 @@
1
+ var a='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="a"><path d="M0,0H16V-16H0Z" fill="none"/></clipPath><clipPath id="b"><path d="M13.75-2.937H2.25a.5.5,0,0,0-.5.5v.563a.125.125,0,0,0,.125.125h12.25a.125.125,0,0,0,.125-.125v-.562A.5.5,0,0,0,13.75-2.937ZM4.027-4.25a.632.632,0,0,0,.094-.008l2.628-.461a.153.153,0,0,0,.083-.044l6.623-6.623a.156.156,0,0,0,0-.22l-2.6-2.6a.155.155,0,0,0-.111-.045.155.155,0,0,0-.111.045L4.012-7.581a.159.159,0,0,0-.044.083L3.508-4.87a.524.524,0,0,0,.147.466.529.529,0,0,0,.372.155Z" fill="none"/></clipPath></defs><g transform="translate(0 16)"><g clip-path="url(#a)"><path d="M-5-21H21V5H-5Z" fill="rgba(0,0,0,0)"/></g><g clip-path="url(#b)"><path d="M-3.25-19.25h22.5V3.25H-3.25Z" fill="#994217"/></g></g></svg>';export{a as default};
@@ -0,0 +1 @@
1
+ var a='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="a"><path d="M0,0H16V-16H0Z" fill="none"/></clipPath><clipPath id="b"><path d="M13.75-2.937H2.25a.5.5,0,0,0-.5.5v.563a.125.125,0,0,0,.125.125h12.25a.125.125,0,0,0,.125-.125v-.562A.5.5,0,0,0,13.75-2.937ZM4.027-4.25a.632.632,0,0,0,.094-.008l2.628-.461a.153.153,0,0,0,.083-.044l6.623-6.623a.156.156,0,0,0,0-.22l-2.6-2.6a.155.155,0,0,0-.111-.045.155.155,0,0,0-.111.045L4.012-7.581a.159.159,0,0,0-.044.083L3.508-4.87a.524.524,0,0,0,.147.466.529.529,0,0,0,.372.155Z" fill="none"/></clipPath></defs><g transform="translate(0 16)"><g clip-path="url(#a)"><path d="M-5-21H21V5H-5Z" fill="rgba(0,0,0,0)"/></g><g clip-path="url(#b)"><path d="M-3.25-19.25h22.5V3.25H-3.25Z" fill="#f33"/></g></g></svg>';export{a as default};
@@ -0,0 +1,5 @@
1
+ var C=`<svg width="27" height="27" viewBox="0 0 27 27" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path
3
+ d="M13.5525 3.01367C7.75439 3.01367 3.03467 7.73076 3.03467 13.5289C3.0373 19.3297 7.75439 24.0468 13.5525 24.0468C19.3507 24.0468 24.0678 19.3297 24.0678 13.5315C24.0678 7.7334 19.3507 3.01367 13.5525 3.01367ZM19.3085 15.9072V15.9521C19.3085 15.9652 19.3059 15.9784 19.3059 15.9942C19.3059 16.0021 19.3059 16.0101 19.3032 16.018C19.3032 16.0312 19.3006 16.0443 19.2979 16.0575C19.2979 16.0654 19.2953 16.076 19.2953 16.0839C19.2927 16.0944 19.2927 16.105 19.29 16.1155C19.2874 16.1261 19.2848 16.1393 19.2848 16.1498C19.2821 16.1577 19.2821 16.1656 19.2795 16.1709C19.2769 16.1867 19.2716 16.2025 19.2689 16.2184C19.2689 16.221 19.2663 16.2236 19.2663 16.2263C19.2083 16.4504 19.0923 16.664 18.9156 16.8406L15.8386 19.9177C15.3112 20.445 14.449 20.445 13.9243 19.9177C13.397 19.3903 13.397 18.5281 13.9243 18.0034L14.6863 17.2414H9.14922C8.40303 17.2414 7.79394 16.6323 7.79394 15.8861C7.79394 15.1399 8.40303 14.5309 9.14922 14.5309H17.9559C18.3039 14.5309 18.652 14.6627 18.9156 14.9264C19.1793 15.19 19.3111 15.5381 19.3111 15.8861C19.3111 15.894 19.3085 15.902 19.3085 15.9072ZM19.3111 11.1743C19.3111 11.9205 18.7021 12.5296 17.9559 12.5296H9.14922C8.80117 12.5296 8.45312 12.3978 8.18945 12.1341C7.92578 11.8704 7.79394 11.5224 7.79394 11.1743V11.1532V11.111C7.79394 11.0979 7.79658 11.082 7.79658 11.0688C7.79658 11.0609 7.79658 11.053 7.79922 11.0451C7.79922 11.0319 7.80186 11.0187 7.80449 11.0056C7.80449 10.9977 7.80713 10.9871 7.80713 10.9792C7.80977 10.9687 7.80976 10.9581 7.8124 10.9476C7.81504 10.937 7.81768 10.9238 7.81768 10.9133C7.82031 10.9054 7.82031 10.8975 7.82295 10.8922C7.82559 10.8764 7.83086 10.8605 7.8335 10.8447C7.8335 10.8421 7.83613 10.8395 7.83613 10.8368C7.89414 10.6127 8.01016 10.3991 8.18682 10.2225L11.2612 7.14805C11.7886 6.6207 12.6508 6.6207 13.1755 7.14805C13.7028 7.67539 13.7028 8.5376 13.1755 9.0623L12.4187 9.82168H17.9559C18.6994 9.82168 19.3111 10.4308 19.3111 11.1743Z"
4
+ fill="#2C7EFF" />
5
+ </svg>`;export{C as default};
@@ -0,0 +1,7 @@
1
+ var L=`<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path
3
+ d="M16.425 5.04961C16.35 4.82461 16.2 4.67461 15.975 4.59961L9.525 1.14961C9.225 0.999609 8.85 0.999609 8.55 1.14961L2.025 4.59961C1.725 4.74961 1.5 5.12461 1.5 5.49961V12.2496C1.5 12.6246 1.725 12.9996 2.025 13.1496L8.475 16.5996C8.7 16.6746 8.925 16.7496 9.15 16.6746C9.225 16.6746 9.375 16.5996 9.45 16.5996L15.9 13.1496C16.275 12.9996 16.5 12.6246 16.5 12.2496V5.49961C16.5 5.34961 16.425 5.19961 16.425 5.04961ZM9.15 8.87461V15.2496L9 15.3996L2.85 12.0996V5.64961L9 2.34961L15.15 5.64961L9.15 8.87461Z"
4
+ fill="#2C7EFF" />
5
+ <path d="M9 8.5V2.5L8.5 2L2.5 5.5V12.5L9 8.5Z" fill="#2C7EFF" />
6
+ <path d="M15.5 6L15 5.5L14.5 6L9 8.5V15.5H9.5L15.5 12.5V6Z" fill="white" />
7
+ </svg>`;export{L as default};
@@ -0,0 +1,5 @@
1
+ var c=`<svg width="16" height="4" viewBox="0 0 16 4" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <circle cx="2" cy="2" r="2" fill="#2C7EFF" />
3
+ <circle cx="8" cy="2" r="2" fill="#2C7EFF" />
4
+ <circle cx="14" cy="2" r="2" fill="#2C7EFF" />
5
+ </svg>`;export{c as default};
@@ -0,0 +1,5 @@
1
+ var C=`<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path
3
+ d="M16.425 5.04961C16.35 4.82461 16.2 4.67461 15.975 4.59961L9.525 1.14961C9.225 0.999609 8.85 0.999609 8.55 1.14961L2.025 4.59961C1.725 4.74961 1.5 5.12461 1.5 5.49961V12.2496C1.5 12.6246 1.725 12.9996 2.025 13.1496L8.475 16.5996C8.7 16.6746 8.925 16.7496 9.15 16.6746C9.225 16.6746 9.375 16.5996 9.45 16.5996L15.9 13.1496C16.275 12.9996 16.5 12.6246 16.5 12.2496V5.49961C16.5 5.34961 16.425 5.19961 16.425 5.04961ZM9.15 8.87461V15.2496L9 15.3996L2.85 12.0996V5.64961L9 2.34961L15.15 5.64961L9.15 8.87461Z"
4
+ fill="#2C7EFF" />
5
+ </svg>`;export{C as default};
@@ -0,0 +1,12 @@
1
+ var t=`<svg width="25" height="25" viewBox="0 0 25 25" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g clip-path="url(#clip0_2295_37199)">
3
+ <path
4
+ d="M5.16087 7.8398C5.00351 8.01726 4.94861 8.22216 4.99615 8.45452L5.23337 15.7654C5.25346 16.1002 5.44096 16.4249 5.72087 16.6098L11.9712 20.5356C12.2511 20.7204 12.6883 20.7277 13.0131 20.5402L18.8587 17.1652C19.1835 16.9777 19.3958 16.5954 19.3757 16.2606L19.1385 8.94971C19.0909 8.71735 19.0434 8.485 18.8659 8.32764C18.8284 8.26269 18.6885 8.17029 18.651 8.10533L12.4382 4.24447C12.1208 3.99471 11.6835 3.98735 11.3587 4.17485L5.51308 7.54985C5.38317 7.62485 5.29077 7.7648 5.16087 7.8398ZM12.1109 12.2276L17.6318 9.04014L17.8367 9.09505L18.0538 16.0711L12.468 19.2961L6.5351 15.62L6.31798 8.64399L12.1109 12.2276Z"
5
+ fill="#2C7EFF" />
6
+ </g>
7
+ <defs>
8
+ <clipPath id="clip0_2295_37199">
9
+ <rect width="18" height="18" fill="white" transform="translate(9 24.5898) rotate(-120)" />
10
+ </clipPath>
11
+ </defs>
12
+ </svg>`;export{t as default};
@@ -0,0 +1 @@
1
+ var a='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="a"><path d="M0,0H16V-16H0Z" fill="none"/></clipPath><clipPath id="b"><path d="M13.75-2.937H2.25a.5.5,0,0,0-.5.5v.563a.125.125,0,0,0,.125.125h12.25a.125.125,0,0,0,.125-.125v-.562A.5.5,0,0,0,13.75-2.937ZM4.027-4.25a.632.632,0,0,0,.094-.008l2.628-.461a.153.153,0,0,0,.083-.044l6.623-6.623a.156.156,0,0,0,0-.22l-2.6-2.6a.155.155,0,0,0-.111-.045.155.155,0,0,0-.111.045L4.012-7.581a.159.159,0,0,0-.044.083L3.508-4.87a.524.524,0,0,0,.147.466.529.529,0,0,0,.372.155Z" fill="none"/></clipPath></defs><g transform="translate(0 16)"><g clip-path="url(#a)"><path d="M-5-21H21V5H-5Z" fill="rgba(0,0,0,0)"/></g><g clip-path="url(#b)"><path d="M-3.25-19.25h22.5V3.25H-3.25Z" fill="#f70efa"/></g></g></svg>';export{a as default};
@@ -0,0 +1 @@
1
+ var a='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="a"><path d="M0,0H16V-16H0Z" fill="none"/></clipPath><clipPath id="b"><path d="M13.75-2.937H2.25a.5.5,0,0,0-.5.5v.563a.125.125,0,0,0,.125.125h12.25a.125.125,0,0,0,.125-.125v-.562A.5.5,0,0,0,13.75-2.937ZM4.027-4.25a.632.632,0,0,0,.094-.008l2.628-.461a.153.153,0,0,0,.083-.044l6.623-6.623a.156.156,0,0,0,0-.22l-2.6-2.6a.155.155,0,0,0-.111-.045.155.155,0,0,0-.111.045L4.012-7.581a.159.159,0,0,0-.044.083L3.508-4.87a.524.524,0,0,0,.147.466.529.529,0,0,0,.372.155Z" fill="none"/></clipPath></defs><g transform="translate(0 16)"><g clip-path="url(#a)"><path d="M-5-21H21V5H-5Z" fill="rgba(0,0,0,0)"/></g><g clip-path="url(#b)"><path d="M-3.25-19.25h22.5V3.25H-3.25Z" fill="#fdff37"/></g></g></svg>';export{a as default};
@@ -0,0 +1 @@
1
+ var a='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="a"><path d="M0,0H16V-16H0Z" fill="none"/></clipPath><clipPath id="b"><path d="M13.75-2.937H2.25a.5.5,0,0,0-.5.5v.563a.125.125,0,0,0,.125.125h12.25a.125.125,0,0,0,.125-.125v-.562A.5.5,0,0,0,13.75-2.937ZM4.027-4.25a.632.632,0,0,0,.094-.008l2.628-.461a.153.153,0,0,0,.083-.044l6.623-6.623a.156.156,0,0,0,0-.22l-2.6-2.6a.155.155,0,0,0-.111-.045.155.155,0,0,0-.111.045L4.012-7.581a.159.159,0,0,0-.044.083L3.508-4.87a.524.524,0,0,0,.147.466.529.529,0,0,0,.372.155Z" fill="none"/></clipPath></defs><g transform="translate(0 16)"><g clip-path="url(#a)"><path d="M-5-21H21V5H-5Z" fill="rgba(0,0,0,0)"/></g><g clip-path="url(#b)"><path d="M-3.25-19.25h22.5V3.25H-3.25Z" fill="#1f0bf9"/></g></g></svg>';export{a as default};
@@ -0,0 +1 @@
1
+ var a='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="a"><path d="M0,0H16V-16H0Z" fill="none"/></clipPath><clipPath id="b"><path d="M13.75-2.937H2.25a.5.5,0,0,0-.5.5v.563a.125.125,0,0,0,.125.125h12.25a.125.125,0,0,0,.125-.125v-.562A.5.5,0,0,0,13.75-2.937ZM4.027-4.25a.632.632,0,0,0,.094-.008l2.628-.461a.153.153,0,0,0,.083-.044l6.623-6.623a.156.156,0,0,0,0-.22l-2.6-2.6a.155.155,0,0,0-.111-.045.155.155,0,0,0-.111.045L4.012-7.581a.159.159,0,0,0-.044.083L3.508-4.87a.524.524,0,0,0,.147.466.529.529,0,0,0,.372.155Z" fill="none"/></clipPath></defs><g transform="translate(0 16)"><g clip-path="url(#a)"><path d="M-5-21H21V5H-5Z" fill="rgba(0,0,0,0)"/></g><g clip-path="url(#b)"><path d="M-3.25-19.25h22.5V3.25H-3.25Z" fill="#33fe33"/></g></g></svg>';export{a as default};
@@ -0,0 +1 @@
1
+ var a='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="a"><path d="M0,0H16V-16H0Z" fill="none"/></clipPath><clipPath id="b"><path d="M13.75-2.937H2.25a.5.5,0,0,0-.5.5v.563a.125.125,0,0,0,.125.125h12.25a.125.125,0,0,0,.125-.125v-.562A.5.5,0,0,0,13.75-2.937ZM4.027-4.25a.632.632,0,0,0,.094-.008l2.628-.461a.153.153,0,0,0,.083-.044l6.623-6.623a.156.156,0,0,0,0-.22l-2.6-2.6a.155.155,0,0,0-.111-.045.155.155,0,0,0-.111.045L4.012-7.581a.159.159,0,0,0-.044.083L3.508-4.87a.524.524,0,0,0,.147.466.529.529,0,0,0,.372.155Z" fill="none"/></clipPath></defs><g transform="translate(0 16)"><g clip-path="url(#a)"><path d="M-5-21H21V5H-5Z" fill="rgba(0,0,0,0)"/></g><g clip-path="url(#b)"><path d="M-3.25-19.25h22.5V3.25H-3.25Z" fill="#3fe"/></g></g></svg>';export{a as default};
@@ -0,0 +1 @@
1
+ const B=61,R=40,i=40,t=240;var o;(function(n){n[n.ANNOTATION=1]="ANNOTATION",n[n.QUALITY_INSPECTION=2]="QUALITY_INSPECTION",n[n.PRE_ANNOTATION=3]="PRE_ANNOTATION",n[n.MANUAL_CORRECTION=4]="MANUAL_CORRECTION"})(o||(o={}));const v=1e3;var N;(function(n){n[n.Backward=0]="Backward",n[n.Forward=1]="Forward",n[n.JumpSkip=2]="JumpSkip",n[n.None=3]="None"})(N||(N={}));var T;(function(n){n[n.Start=0]="Start",n[n.Stop=1]="Stop",n[n.Wait=2]="Wait",n[n.Move=3]="Move"})(T||(T={}));var f;(function(n){n[n.Point=0]="Point",n[n.Line=1]="Line",n[n.Plane=2]="Plane",n[n.Cuboid=3]="Cuboid"})(f||(f={}));var A;(function(n){n[n.ascend=0]="ascend",n[n.descend=1]="descend"})(A||(A={}));var L;(function(n){n[n.Intelligence=0]="Intelligence",n[n.Linear=1]="Linear"})(L||(L={}));var s;(function(n){n.Zh="zh_CN",n.US="en_US"})(s||(s={}));var I;(function(n){n[n.Clockwise=0]="Clockwise",n[n.Anticlockwise=1]="Anticlockwise"})(I||(I={}));const d={offsetX:-10,offsetY:-10},k={shadowColor:"rgba(0, 0, 0, 1)",shadowOffsetX:1,shadowOffsetY:1,shadowBlur:0},w={x:8,y:26};var O;(function(n){n.Front="front",n.Back="back",n.Side="side"})(O||(O={}));var c;(function(n){n.TL="tl",n.TR="tr",n.BL="bl",n.BR="br"})(c||(c={}));var l;(function(n){n.Front="front",n.Back="back",n.Left="left",n.Right="right",n.Top="top"})(l||(l={}));const U={tl:"br",tr:"bl",br:"tl",bl:"tr"};var _;(function(n){n.Row="row",n.Column="column"})(_||(_={}));const h={[c.TL]:c.TR,[c.TR]:c.TL,[c.BL]:c.BR,[c.BR]:c.BL},C={[c.TL]:c.BL,[c.TR]:c.BR,[c.BL]:c.TL,[c.BR]:c.TR};export{v as ANNOTATION_MAX_SIZE,C as CUBOID_COLUMN,h as CUBOID_ROW,d as DEFAULT_TEXT_OFFSET,k as DEFAULT_TEXT_SHADOW,U as DIAGONAL_POINT,l as ECuboidDirection,_ as ECuboidLineDirection,O as ECuboidPlain,c as ECuboidPosition,T as EDragStatus,f as EDragTarget,L as EGrowthMode,s as ELang,N as EPageOperator,I as ERotateDirection,A as ESortDirection,o as EStepType,w as TEXT_ATTRIBUTE_OFFSET,i as footerHeight,B as headerHeight,t as sidebarWidth,R as tipsHeight};
@@ -0,0 +1 @@
1
+ const l={0:"\u76EE\u6807\u68C0\u6D4B",1:"\u56FE\u50CF\u5206\u7C7B"},C={0:"\u6807\u6CE8\u6587\u4EF6\u4F20\u8F93\u4E2D",1:"\u6807\u6CE8\u6587\u4EF6\u4F20\u8F93\u91CD\u8BD5",2:"\u6807\u6CE8\u6587\u4EF6\u4F20\u8F93\u5931\u8D25",3:"\u6807\u6CE8\u4E2D",4:"\u4EFB\u52A1\u7EC8\u6B62",5:"\u4EFB\u52A1\u5B8C\u6210",6:"\u6570\u636E\u5DF2\u53D1\u5E03"};var F;(function(u){u[u.Upload=0]="Upload",u[u.UploadRetry=1]="UploadRetry",u[u.UploadFail=2]="UploadFail",u[u.Annotation=3]="Annotation",u[u.Terminated=4]="Terminated",u[u.Finish=5]="Finish",u[u.Publish=6]="Publish"})(F||(F={}));export{C as ANNOTATION_STATUS,l as ANNOTATION_TYPE,F as EAnnotationStatus};
@@ -0,0 +1 @@
1
+ const e={showConfirm:!1,skipWhileNoDependencies:!1,drawOutsideTarget:!1,copyBackwardResult:!1,minWidth:1,minHeight:1,isShowOrder:!1,filterData:["valid","invalid"],attributeConfigurable:!0,attributeList:[],textConfigurable:!0,textCheckType:0,customFormat:""},r={showConfirm:!1,skipWhileNoDependencies:!1,inputList:[{key:"\u7C7B\u522B1",value:"class1",isMulti:!1,subSelected:[{key:"\u9009\u98791",value:"option1",isDefault:!1},{key:"\u9009\u98792",value:"option1-2",isDefault:!1}]},{key:"\u7C7B\u522B2",value:"class-AH",isMulti:!0,subSelected:[{key:"\u9009\u98792-1",value:"option2-1",isDefault:!1},{key:"\u9009\u98792-2",value:"option2-2",isDefault:!1},{key:"\u9009\u98792-3",value:"option2-3",isDefault:!1}]},{key:"\u7C7B\u522B3",value:"class-0P",isMulti:!1,subSelected:[{key:"\u9009\u98793-1",value:"option3-1",isMulti:!1},{key:"\u9009\u98793-2",value:"option3-2",isDefault:!1},{key:"\u9009\u98793-3",value:"option3-3",isDefault:!1}]}]},i={lineType:0,lineColor:0,edgeAdsorption:!1,outOfTarget:!0,copyBackwardResult:!1,isShowOrder:!1,attributeConfigurable:!0,attributeList:[{key:"\u7C7B\u522B1",value:"\u7C7B\u522B1"},{key:"\u7C7B\u522Bao",value:"class-ao"},{key:"\u7C7B\u522BM1",value:"class-M1"},{key:"\u7C7B\u522BCm",value:"class-Cm"},{key:"\u7C7B\u522Bc3",value:"class-c3"},{key:"\u7C7B\u522Ba0",value:"class-a0"},{key:"\u7C7B\u522Bu7",value:"class-u7"},{key:"\u7C7B\u522BZb",value:"class-Zb"},{key:"\u7C7B\u522Bzi",value:"class-zi"}],textConfigurable:!1,textCheckType:2,customFormat:"",showConfirm:!1,lowerLimitPointNum:2,upperLimitPointNum:"",preReferenceStep:0,skipWhileNoDependencies:!1,filterData:["valid","invalid"]},t={showConfirm:!1,skipWhileNoDependencies:!1,enableTextRecognition:!1,recognitionMode:"general",configList:[{label:"\u6587\u672C",key:"text",required:!1,default:"",maxLength:1e3}],filterData:["valid","invalid"]},a={lineType:0,lineColor:0,lowerLimitPointNum:3,edgeAdsorption:!1,drawOutsideTarget:!1,copyBackwardResult:!1,isShowOrder:!1,attributeConfigurable:!1,attributeList:[],textConfigurable:!0,textCheckType:0,customFormat:""},o=l=>l==="lineTool"?i:l==="rectTool"?e:l==="tagTool"?r:l==="textTool"?t:l==="polygonTool"?a:e,g={toolColor:{1:{valid:{stroke:"rgba(0,0,255,0.50)",fill:"rgba(0,0,255,0.40)"},invalid:{stroke:"rgba(255,153,102,1.00)",fill:"rgba(255,153,102,0.80)"},validSelected:{stroke:"rgba(0,15,255,1.00)",fill:"rgba(0,15,255,0.80)"},invalidSelected:{stroke:"rgba(255,0,0,0.60)",fill:"rgba(255,0,0,0.24)"},validHover:{stroke:"rgba(0,15,255,0.80)",fill:"rgba(0,15,255,0.64)"},invalidHover:{stroke:"rgba(255,0,0,0.50)",fill:"rgba(255,0,0,0.40)"}},3:{valid:{stroke:"rgba(0,255,255,0.50)",fill:"rgba(0,255,255,0.40)"},invalid:{stroke:"rgba(255,153,102,1.00)",fill:"rgba(255,153,102,0.80)"},validSelected:{stroke:"rgba(0,212,255,1.00)",fill:"rgba(0,212,255,0.80)"},invalidSelected:{stroke:"rgba(255,0,0,0.60)",fill:"rgba(255,0,0,0.24)"},validHover:{stroke:"rgba(0,212,255,0.80)",fill:"rgba(0,212,255,0.64)"},invalidHover:{stroke:"rgba(255,0,0,0.50)",fill:"rgba(255,0,0,0.40)"}},5:{valid:{stroke:"rgba(0,255,0,0.50)",fill:"rgba(0,255,0,0.40)"},invalid:{stroke:"rgba(255,153,102,1.00)",fill:"rgba(255,153,102,0.80)"},validSelected:{stroke:"rgba(149,255,1.00)",fill:"rgba(149,255,0,0.80)"},invalidSelected:{stroke:"rgba(255,0,0,0.60)",fill:"rgba(255,0,0,0.24)"},validHover:{stroke:"rgba(149,255,0,0.80)",fill:"rgba(149,255,0,0.64)"},invalidHover:{stroke:"rgba(255,0,0,0.50)",fill:"rgba(255,0,0,0.40)"}},7:{valid:{stroke:"rgba(255,255,0,0.50)",fill:"rgba(255,255,0,0.40)"},invalid:{stroke:"rgba(255,153,102,1.00)",fill:"rgba(255,153,102,0.80)"},validSelected:{stroke:"rgba(255,230,102,1.00)",fill:"rgba(255,213,0,0.80)"},invalidSelected:{stroke:"rgba(255,0,0,0.60)",fill:"rgba(255,0,0,0.24)"},validHover:{stroke:"rgba(255,230,102,0.80)",fill:"rgba(255,230,102,0.64)"},invalidHover:{stroke:"rgba(255,0,0,0.50)",fill:"rgba(255,0,0,0.40)"}},9:{valid:{stroke:"rgba(255,0,255,0.50)",fill:"rgba(255,0,255,0.40)"},invalid:{stroke:"rgba(255,153,102,1.00)",fill:"rgba(255,153,102,0.80)"},validSelected:{stroke:"rgba(230,102,255,1.00)",fill:"rgba(213,0,255,0.80)"},invalidSelected:{stroke:"rgba(255,0,0,0.60)",fill:"rgba(255,0,0,0.24)"},validHover:{stroke:"rgba(230,102,255,0.80)",fill:"rgba(230,102,255,0.64)"},invalidHover:{stroke:"rgba(255,0,0,0.50)",fill:"rgba(255,0,0,0.40)"}}},attributeColor:[{valid:{stroke:"rgba(204,204,204,1.00)",fill:"rgba(204,204,204,0.40)"},invalid:{stroke:"rgba(255,153,102,1.00)",fill:"rgba(255,153,102,0.40)"},validSelected:{stroke:"rgba(204,204,204,1.00)",fill:"rgba(204,204,204,0.80)"},invalidSelected:{stroke:"rgba(255,0,0,1.00)",fill:"rgba(255,0,0,0.80)"},validHover:{stroke:"rgba(204,204,204,1.00)",fill:"rgba(204,204,204,0.80)"},invalidHover:{stroke:"rgba(255,0,0,1.00)",fill:"rgba(255,0,0,0.80)"}},{valid:{stroke:"rgba(153,51,255,1.00)",fill:"rgba(153,51,255,0.40)"},invalid:{stroke:"rgba(255,153,102,1.00)",fill:"rgba(255,153,102,0.40)"},validSelected:{stroke:"rgba(153,51,255,1.00)",fill:"rgba(153,51,255,0.80)"},invalidSelected:{stroke:"rgba(255,0,0,1.00)",fill:"rgba(255,0,0,0.80)"},validHover:{stroke:"rgba(153,51,255,1.00)",fill:"rgba(153,51,255,0.80)"},invalidHover:{stroke:"rgba(255,0,0,1.00)",fill:"rgba(255,0,0,0.80)"}},{valid:{stroke:"rgba(51,254,51,1.00)",fill:"rgba(51,254,51,0.40)"},invalid:{stroke:"rgba(255,153,102,1.00)",fill:"rgba(255,153,102,0.40)"},validSelected:{stroke:"rgba(51,254,51,1.00)",fill:"rgba(51,254,51,0.80)"},invalidSelected:{stroke:"rgba(255,0,0,1.00)",fill:"rgba(255,0,0,0.80)"},validHover:{stroke:"rgba(51,254,51,1.00)",fill:"rgba(51,254,51,0.80)"},invalidHover:{stroke:"rgba(255,0,0,1.00)",fill:"rgba(255,0,0,0.80)"}},{valid:{stroke:"rgba(255,51,255,1.00)",fill:"rgba(255,51,255,0.40)"},invalid:{stroke:"rgba(255,153,102,1.00)",fill:"rgba(255,153,102,0.40)"},validSelected:{stroke:"rgba(255,51,255,1.00)",fill:"rgba(255,51,255,0.80)"},invalidSelected:{stroke:"rgba(255,0,0,1.00)",fill:"rgba(255,0,0,0.80)"},validHover:{stroke:"rgba(255,51,255,1.00)",fill:"rgba(255,51,255,0.80)"},invalidHover:{stroke:"rgba(255,0,0,1.00)",fill:"rgba(255,0,0,0.80)"}},{valid:{stroke:"rgba(204,255,51,1.00)",fill:"rgba(204,255,51,0.40)"},invalid:{stroke:"rgba(255,153,102,1.00)",fill:"rgba(255,153,102,0.40)"},validSelected:{stroke:"rgba(204,255,51,1.00)",fill:"rgba(204,255,51,0.80)"},invalidSelected:{stroke:"rgba(255,0,0,1.00)",fill:"rgba(255,0,0,0.80)"},validHover:{stroke:"rgba(204,255,51,1.00)",fill:"rgba(204,255,51,0.80)"},invalidHover:{stroke:"rgba(255,0,0,1.00)",fill:"rgba(255,0,0,0.80)"}},{valid:{stroke:"rgba(51,153,255,1.00)",fill:"rgba(51,153,255,0.40)"},invalid:{stroke:"rgba(255,153,102,1.00)",fill:"rgba(255,153,102,0.40)"},validSelected:{stroke:"rgba(51,153,255,1.00)",fill:"rgba(51,153,255,0.80)"},invalidSelected:{stroke:"rgba(255,0,0,1.00)",fill:"rgba(255,0,0,0.80)"},validHover:{stroke:"rgba(51,153,255,1.00)",fill:"rgba(51,153,255,0.80)"},invalidHover:{stroke:"rgba(255,0,0,1.00)",fill:"rgba(255,0,0,0.80)"}},{valid:{stroke:"rgba(255,153,51,1.00)",fill:"rgba(255,153,51,0.40)"},invalid:{stroke:"rgba(255,153,102,1.00)",fill:"rgba(255,153,102,0.40)"},validSelected:{stroke:"rgba(255,153,51,1.00)",fill:"rgba(255,153,51,0.80)"},invalidSelected:{stroke:"rgba(255,0,0,1.00)",fill:"rgba(255,0,0,0.80)"},validHover:{stroke:"rgba(255,153,51,1.00)",fill:"rgba(255,153,51,0.80)"},invalidHover:{stroke:"rgba(255,0,0,1.00)",fill:"rgba(255,0,0,0.80)"}},{valid:{stroke:"rgba(51,255,238,1.00)",fill:"rgba(51,255,238,0.40)"},invalid:{stroke:"rgba(255,153,102,1.00)",fill:"rgba(255,153,102,0.40)"},validSelected:{stroke:"rgba(51,255,238,1.00)",fill:"rgba(51,255,238,0.80)"},invalidSelected:{stroke:"rgba(255,0,0,1.00)",fill:"rgba(255,0,0,0.80)"},validHover:{stroke:"rgba(51,255,238,1.00)",fill:"rgba(51,255,238,0.80)"},invalidHover:{stroke:"rgba(255,0,0,1.00)",fill:"rgba(255,0,0,0.80)"}},{valid:{stroke:"rgba(255,221,51,1.00)",fill:"rgba(255,221,51,0.40)"},invalid:{stroke:"rgba(255,153,102,1.00)",fill:"rgba(255,153,102,0.40)"},validSelected:{stroke:"rgba(255,221,51,1.00)",fill:"rgba(255,221,51,0.80)"},invalidSelected:{stroke:"rgba(255,0,0,1.00)",fill:"rgba(255,0,0,0.80)"},validHover:{stroke:"rgba(255,221,51,1.00)",fill:"rgba(255,221,51,0.80)"},invalidHover:{stroke:"rgba(255,0,0,1.00)",fill:"rgba(255,0,0,0.80)"}}],lineColor:{1:"rgba(102, 111, 255, 1 )",3:"rgba(102, 230, 255, 1)",5:"rgba(191, 255, 102, 1)",7:"rgba(255, 230, 102, 1)",9:"rgba(230, 102, 255, 1)"},attributeLineColor:["rgba(204, 204, 204, 1)","rgba(153, 51, 255, 1)","rgba(51, 254, 51, 1)","rgba(255, 51, 255, 1)","rgba(204, 255, 51, 1)","rgba(51, 153, 255, 1)","rgba(255, 153, 51, 1)","rgba(51, 255, 238, 1)","rgba(255, 221, 51, 1)"],color:1,width:2,opacity:9};export{o as getConfig,a as polygonConfig,g as styleDefaultConfig};
@@ -0,0 +1 @@
1
+ var a;(function(t){t[t.A=65]="A",t[t.B=66]="B",t[t.C=67]="C",t[t.D=68]="D",t[t.E=69]="E",t[t.F=70]="F",t[t.G=71]="G",t[t.H=72]="H",t[t.L=76]="L",t[t.R=82]="R",t[t.Z=90]="Z",t[t.W=87]="W",t[t.X=88]="X",t[t.Y=89]="Y",t[t.S=83]="S",t[t.Q=81]="Q",t[t.Delete=46]="Delete",t[t.F11=122]="F11",t[t.Space=32]="Space",t[t.Esc=27]="Esc",t[t.Left=37]="Left",t[t.Up=38]="Up",t[t.Right=39]="Right",t[t.Down=40]="Down",t[t.Enter=13]="Enter",t[t.Ctrl=17]="Ctrl",t[t.Alt=18]="Alt",t[t.Shift=16]="Shift",t[t.Tab=9]="Tab",t[t.BackSpace=8]="BackSpace"})(a||(a={}));var c=a;export{c as default};