mixdashboards 1.0.40 → 1.0.44

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 (285) hide show
  1. package/dist/{EChartComponentBase-GBbKjtlb.js → EChartComponentBase-BS3bnTQC.js} +1 -1
  2. package/dist/{EChartComponentBase-BTqBoBn8.cjs → EChartComponentBase-CleoClHm.cjs} +1 -1
  3. package/dist/{UniverSheet-B9dCqA-W.cjs → UniverSheet-CF1v7TYZ.cjs} +1 -1
  4. package/dist/{UniverSheet-DIkltx8i.js → UniverSheet-COMkODpK.js} +2 -2
  5. package/dist/{accelerationChart-B7grHeml.js → accelerationChart-DmWIcs4K.js} +3 -3
  6. package/dist/{accelerationChart-CvNoIyue.cjs → accelerationChart-cRoqP2gy.cjs} +1 -1
  7. package/dist/{actionItem-BKNfuprM.cjs → actionItem-BeTiYe45.cjs} +1 -1
  8. package/dist/{actionItem-BrTSUE0J.js → actionItem-Cyk7BOT6.js} +3 -3
  9. package/dist/{alarmLevelChart-CmjyIsWH.js → alarmLevelChart-DAXsyR0I.js} +2 -2
  10. package/dist/{alarmLevelChart-DBqGvaXQ.cjs → alarmLevelChart-sxtgVWnX.cjs} +1 -1
  11. package/dist/{alertTable-CZ2ufzg9.cjs → alertTable--x9DJvUP.cjs} +1 -1
  12. package/dist/{alertTable-C8beWyfK.js → alertTable-CuP5VxyK.js} +2 -2
  13. package/dist/{annualRainfallChart-D3YQwScd.cjs → annualRainfallChart-CbskRIIL.cjs} +1 -1
  14. package/dist/{annualRainfallChart-D3Pck4he.js → annualRainfallChart-D5pPXsFE.js} +2 -2
  15. package/dist/{api-C0okiLNC.cjs → api-DSuTQgb1.cjs} +1 -1
  16. package/dist/{api-DhQsrEGY.js → api-DpW5KYPS.js} +4 -4
  17. package/dist/{aqi-DnrkU6z-.js → aqi-CCdxrgkH.js} +3 -3
  18. package/dist/{aqi-91QfhWTq.cjs → aqi-U6Nf8ZZh.cjs} +1 -1
  19. package/dist/{aqiIndass-CzA5PVzc.js → aqiIndass-B4zzPOx5.js} +2 -2
  20. package/dist/{aqiIndass-D2h-731s.cjs → aqiIndass-Du6ul1sn.cjs} +1 -1
  21. package/dist/{arrayCard-C-V_01r7.cjs → arrayCard-B3YtVRwz.cjs} +1 -1
  22. package/dist/{arrayCard-mprI5bQN.js → arrayCard-Cy74MxNd.js} +2 -2
  23. package/dist/{audio-CdVI14ea.cjs → audio-BtvIDtUd.cjs} +1 -1
  24. package/dist/{audio-Xj66qRvv.js → audio-xxwBO_rY.js} +5 -5
  25. package/dist/{bar-ub8ERs66.js → bar-DO_1uGwc.js} +4 -4
  26. package/dist/{bar-DQ6kQXTC.cjs → bar-VfYGfeKN.cjs} +1 -1
  27. package/dist/{bmp-bXQBGW16.js → bmp-C-Gx1GvP.js} +3 -3
  28. package/dist/{bmp-xuWyQ9_n.cjs → bmp-CsK85ASl.cjs} +1 -1
  29. package/dist/{box-Dx6V-j_J.js → box-Bt9Q17mN.js} +2 -2
  30. package/dist/{box-C9s5aZjl.cjs → box-k9kt6rDN.cjs} +1 -1
  31. package/dist/{chartConfigPanel-CLbbeZzN.cjs → chartConfigPanel-69LZ5kPt.cjs} +1 -1
  32. package/dist/{chartConfigPanel-Bd47rczI.js → chartConfigPanel-BduE1xjC.js} +1 -1
  33. package/dist/{circleBar-D8I2e0Ov.js → circleBar-CH0tnaPc.js} +3 -3
  34. package/dist/{circleBar-BsmKIein.cjs → circleBar-Cgeu--Y3.cjs} +1 -1
  35. package/dist/{clock-7kw9zMJ0.js → clock-B9O7KUjw.js} +2 -2
  36. package/dist/{clock-bnKjuzzp.cjs → clock-xVJE721F.cjs} +1 -1
  37. package/dist/{clt-BGGFfbQ5.js → clt-CuVs6xNO.js} +3 -3
  38. package/dist/{clt-7F8jS0WQ.cjs → clt-DtYhHfRW.cjs} +1 -1
  39. package/dist/{cmc-B2ja2VKe.cjs → cmc-9wuvGy4o.cjs} +1 -1
  40. package/dist/{cmc-DTiGNWEl.js → cmc-B4w2cPtw.js} +3 -3
  41. package/dist/{cmp-BXx9BxO1.js → cmp-Bv11hWDG.js} +3 -3
  42. package/dist/{cmp-D9MzneF0.cjs → cmp-CqBtUvY9.cjs} +1 -1
  43. package/dist/{composite-C6PQB2RS.js → composite-D_-iOTxQ.js} +3 -3
  44. package/dist/{composite-Dh9pPcWq.cjs → composite-pP7alC6K.cjs} +1 -1
  45. package/dist/config-BrMFHyZe.js +9 -0
  46. package/dist/config-DbZfhrwE.cjs +1 -0
  47. package/dist/{controlList-VioXoP_4.js → controlList-BMsXGA7L.js} +3 -3
  48. package/dist/{controlList-uLJtFu1P.cjs → controlList-C75BcGNs.cjs} +1 -1
  49. package/dist/{controlRecordList-DY7qKQp1.js → controlRecordList-CJ934Pie.js} +3 -3
  50. package/dist/{controlRecordList-GtFLhcc9.cjs → controlRecordList-z2x8XWPp.cjs} +1 -1
  51. package/dist/{crd-Bf8Rmcf5.js → crd-CoenHDTI.js} +2 -2
  52. package/dist/{crd-DdsOuCBh.cjs → crd-DB6Fn6ud.cjs} +1 -1
  53. package/dist/{ctrBtn-GKFfJlE2.cjs → ctrBtn-Cok9efhd.cjs} +1 -1
  54. package/dist/{ctrBtn-BSzyUEkN.js → ctrBtn-DAta3TgZ.js} +4 -4
  55. package/dist/{ctrSet-CDr5scQE.cjs → ctrSet-BpYJQF8y.cjs} +1 -1
  56. package/dist/{ctrSet--1TrVZDc.js → ctrSet-Db7Lpzwx.js} +4 -4
  57. package/dist/{ctrSwitch-kHoyJDax.cjs → ctrSwitch-C7hsC01-.cjs} +1 -1
  58. package/dist/{ctrSwitch-ezGEAkLG.js → ctrSwitch-CcIeXrmG.js} +4 -4
  59. package/dist/{dataManagement-DxTZAlJy.cjs → dataManagement-CbRcfb5G.cjs} +1 -1
  60. package/dist/{dataManagement-oWoI1QPO.js → dataManagement-Dy3n0x4g.js} +2 -2
  61. package/dist/{dataReport-Dygq1jQV.cjs → dataReport-DSsw8Q6Y.cjs} +1 -1
  62. package/dist/{dataReport-BATqcXj4.js → dataReport-RYp5R7d0.js} +2 -2
  63. package/dist/{dataTable-CotUzlhz.cjs → dataTable-BHF65HZn.cjs} +1 -1
  64. package/dist/{dataTable-DIKwnInT.js → dataTable-C6YN6hSR.js} +1 -1
  65. package/dist/{datetime-DLASaAKw.cjs → datetime-C7pOOVtq.cjs} +1 -1
  66. package/dist/{datetime-CK042aN0.js → datetime-DQ3jiYZW.js} +2 -2
  67. package/dist/{deepClusterSlipSurface-D8v4xJGF.cjs → deepClusterSlipSurface-Bb34F5kA.cjs} +1 -1
  68. package/dist/{deepClusterSlipSurface-C52_bDho.js → deepClusterSlipSurface-nbsn0oBQ.js} +3 -3
  69. package/dist/{deepDataMatrix-CdB1ZO5Q.js → deepDataMatrix-BM-rwarj.js} +2 -2
  70. package/dist/{deepDataMatrix-C-NrtGtk.cjs → deepDataMatrix-DhdpktL_.cjs} +1 -1
  71. package/dist/{deepDisplacement3D-C3Salw1w.js → deepDisplacement3D-CnHFeSRB.js} +3 -3
  72. package/dist/{deepDisplacement3D-CzM-wm4q.cjs → deepDisplacement3D-Cul-utay.cjs} +1 -1
  73. package/dist/{deepDisplacementChart-ndHgH60B.js → deepDisplacementChart-CLOjtaLw.js} +4 -4
  74. package/dist/{deepDisplacementChart-ByIJTYX6.cjs → deepDisplacementChart-CWOOiU3n.cjs} +1 -1
  75. package/dist/{deepDisplacementChart-BqZ4nUgg.cjs → deepDisplacementChart-cKMAvQDn.cjs} +1 -1
  76. package/dist/{deepDisplacementChart-GcH8IGA4.js → deepDisplacementChart-ffsvnTyM.js} +2 -2
  77. package/dist/{deepDisplacementView-Bo_pmf0R.js → deepDisplacementView-CmH38Qg4.js} +1 -1
  78. package/dist/{deepDisplacementView-Bq_G0GlS.cjs → deepDisplacementView-DrIDesTs.cjs} +1 -1
  79. package/dist/{deepNodeTemperatureChart-CXgft_WM.js → deepNodeTemperatureChart-BV8NtGCe.js} +3 -3
  80. package/dist/{deepNodeTemperatureChart-Dsl1Zm8T.cjs → deepNodeTemperatureChart-Bs6-JuAH.cjs} +1 -1
  81. package/dist/{deepTangentAngleChart-iLt3bK8f.cjs → deepTangentAngleChart-DITiSIWH.cjs} +1 -1
  82. package/dist/{deepTangentAngleChart-D-WoGKz7.js → deepTangentAngleChart-eeikFBTp.js} +3 -3
  83. package/dist/{deepTemperatureField-BFB8bQde.js → deepTemperatureField-CfE1Tojo.js} +3 -3
  84. package/dist/{deepTemperatureField-DnpuZuD8.cjs → deepTemperatureField-DSfrt6dh.cjs} +1 -1
  85. package/dist/{deepTrendChart-BghE13XG.cjs → deepTrendChart-BmMiiBP8.cjs} +1 -1
  86. package/dist/{deepTrendChart-E-mAzsST.js → deepTrendChart-CChUdSS_.js} +3 -3
  87. package/dist/{deviceOnlineStatus-TQ-Fv8ye.cjs → deviceOnlineStatus-40xj7826.cjs} +1 -1
  88. package/dist/{deviceOnlineStatus-CkZijkjC.js → deviceOnlineStatus-LTnRdd9e.js} +2 -2
  89. package/dist/{deviceStatus-BkKc9wqU.cjs → deviceStatus-DParU3uI.cjs} +1 -1
  90. package/dist/{deviceStatus-BvJr98D0.js → deviceStatus-yRBqTeb7.js} +2 -2
  91. package/dist/{displacementDataTable-BJ5S7te1.js → displacementDataTable-DOO6Ly8a.js} +2 -2
  92. package/dist/{displacementDataTable-DJUK3mBu.cjs → displacementDataTable-DgicZH8R.cjs} +1 -1
  93. package/dist/{displacementTrajectoryChart-C2estBCm.cjs → displacementTrajectoryChart-CXa9QpC2.cjs} +1 -1
  94. package/dist/{displacementTrajectoryChart-DGS9Mn7o.js → displacementTrajectoryChart-WMQtPw-x.js} +3 -3
  95. package/dist/{displacementTrendChart-Ddgpsnta.js → displacementTrendChart-CLRYlvE-.js} +2 -2
  96. package/dist/{displacementTrendChart-CgsIcHCK.cjs → displacementTrendChart-pzq3aFoT.cjs} +1 -1
  97. package/dist/{dxf-B0EL1hyB.js → dxf-Cq049-5h.js} +5 -5
  98. package/dist/{dxf-DbxtgQWv.cjs → dxf-E4UDXLKk.cjs} +1 -1
  99. package/dist/{dzc-ACr2bZGl.js → dzc-BQv2iKCs.js} +3 -3
  100. package/dist/{dzc-Bdm2nr1F.cjs → dzc-COQNV8Rf.cjs} +1 -1
  101. package/dist/element-resize-detector-BNZCpkPn.cjs +6 -0
  102. package/dist/{element-resize-detector-DeMhGbNi.js → element-resize-detector-BykFgbx2.js} +419 -412
  103. package/dist/{evn-Moewbl2h.cjs → evn-BOubkN5p.cjs} +1 -1
  104. package/dist/{evn-D0llPvjK.js → evn-ByU2pJ1s.js} +2 -2
  105. package/dist/{evolutionChart-DBwL00ZJ.cjs → evolutionChart-CAGrFJu8.cjs} +1 -1
  106. package/dist/{evolutionChart-Cz_GOcB8.js → evolutionChart-HAGVFTuD.js} +3 -3
  107. package/dist/{fileViewer-D-WNR3vF.js → fileViewer-B37h0quk.js} +5 -5
  108. package/dist/{fileViewer-BtjOAdM9.cjs → fileViewer-cn86T_tA.cjs} +1 -1
  109. package/dist/{filterBar-4Q9XSiAY.cjs → filterBar-CuZkupo8.cjs} +1 -1
  110. package/dist/{filterBar-DLYmU350.js → filterBar-DVusFBbF.js} +2 -2
  111. package/dist/{fireCombustionCurve-BU3pplHd.js → fireCombustionCurve-C7QRx1Jc.js} +2 -2
  112. package/dist/{fireCombustionCurve-CWggQsw1.cjs → fireCombustionCurve-CIcqbz2i.cjs} +1 -1
  113. package/dist/{fireFilterBar-ROtoXZex.js → fireFilterBar-B8d5AJtv.js} +2 -2
  114. package/dist/{fireFilterBar-EKwzMAFp.cjs → fireFilterBar-C7lXgUWd.cjs} +1 -1
  115. package/dist/{gag-D8mNPZnH.js → gag-BrvzDnxa.js} +2 -2
  116. package/dist/{gag-CvMEVCbE.cjs → gag-D11JKxVV.cjs} +1 -1
  117. package/dist/{gasStationList-CWg8IYCo.cjs → gasStationList-Dla5JXYa.cjs} +1 -1
  118. package/dist/{gasStationList-qVKS-fgC.js → gasStationList-jyF27tRA.js} +3 -3
  119. package/dist/{glbModel-CQBEujd2.cjs → glbModel-BAm53QuG.cjs} +1 -1
  120. package/dist/{glbModel-U_yKQZWm.js → glbModel-HGeNSh_s.js} +2 -2
  121. package/dist/{gnssFilterBar-o7zpW7jS.js → gnssFilterBar-Dcn-7j-0.js} +2 -2
  122. package/dist/{gnssFilterBar-pvMsIjFy.cjs → gnssFilterBar-DwlYf3AQ.cjs} +1 -1
  123. package/dist/{gnssHistoryTable-Ddcw3-NB.cjs → gnssHistoryTable-B9yqwweE.cjs} +1 -1
  124. package/dist/{gnssHistoryTable-BYg9jtl5.js → gnssHistoryTable-K2wCCxKN.js} +3 -3
  125. package/dist/{gnssMapView-DMcq2u2c.js → gnssMapView-BevxEn6L.js} +2 -2
  126. package/dist/{gnssMapView--c2UXuOb.cjs → gnssMapView-Y9aw7pyC.cjs} +1 -1
  127. package/dist/{gnssTimeSeriesChart-BtUSps0z.js → gnssTimeSeriesChart-Dgv7xtDE.js} +4 -4
  128. package/dist/{gnssTimeSeriesChart-984dcBPA.cjs → gnssTimeSeriesChart-cQAYmpky.cjs} +1 -1
  129. package/dist/{gnssXYTrajectory-DvIpI-GX.js → gnssXYTrajectory-B1c2A0-Z.js} +3 -3
  130. package/dist/{gnssXYTrajectory-D9JmAqC0.cjs → gnssXYTrajectory-Dlt7yHHE.cjs} +1 -1
  131. package/dist/{grd-Cb8vd52d.cjs → grd-BGgmRzO6.cjs} +1 -1
  132. package/dist/{grd-DcxFaMyv.js → grd-CJlgIi8g.js} +3 -3
  133. package/dist/{grdIndass-BPLTUWIc.js → grdIndass-BO4B5PCB.js} +3 -3
  134. package/dist/{grdIndass-FkNJ9pl6.cjs → grdIndass-DyalY7Xq.cjs} +1 -1
  135. package/dist/{grg-CoDiLjcl.cjs → grg-CKzA41OL.cjs} +1 -1
  136. package/dist/{grg-Baot_Pdv.js → grg-troeHaxv.js} +2 -2
  137. package/dist/{gridview-BwDeg0tI.cjs → gridview-7S4komvz.cjs} +1 -1
  138. package/dist/{gridview-DN8V84hl.js → gridview-Obgr_vSQ.js} +2 -2
  139. package/dist/{groupCard-D5wLscZo.js → groupCard-DvQ0_yp8.js} +2 -2
  140. package/dist/{groupCard-DChtdioU.cjs → groupCard-naO-gSFU.cjs} +1 -1
  141. package/dist/{headerBar-DLvSZsMl.js → headerBar-BV3AwcCs.js} +3 -3
  142. package/dist/{headerBar-m57S9WlE.cjs → headerBar-Dt3B7o4i.cjs} +1 -1
  143. package/dist/{history-DN0IVkYL.js → history-CaqA0wpH.js} +60 -57
  144. package/dist/history-DFKjqRBY.cjs +1 -0
  145. package/dist/{index-zPaMBZk-.js → index-CQCqGJ5R.js} +1900 -1857
  146. package/dist/index-LSCs4x8x.cjs +582 -0
  147. package/dist/{insarDeformChart-DkiLrhem.cjs → insarDeformChart-DI5b1SoT.cjs} +1 -1
  148. package/dist/{insarDeformChart-DZl03mOe.js → insarDeformChart-OPC8flx2.js} +2 -2
  149. package/dist/{insarImageViewer-ZcqHEEZr.cjs → insarImageViewer-BBVNYKrE.cjs} +1 -1
  150. package/dist/{insarImageViewer-kqYV5A1S.js → insarImageViewer-DhSbNhfs.js} +2 -2
  151. package/dist/{kds-Ba0yzyNm.cjs → kds-DvXxGtf1.cjs} +1 -1
  152. package/dist/{kds-BbyaSB3L.js → kds-DyiiYpCx.js} +2 -2
  153. package/dist/{layerTabs-SRHmamTF.js → layerTabs-DPq4ttW1.js} +2 -2
  154. package/dist/{layerTabs-D2M3EVxt.cjs → layerTabs-Drr1L0gD.cjs} +1 -1
  155. package/dist/{lin-DxnORLL5.js → lin-BjIpTy2o.js} +3 -3
  156. package/dist/{lin-0U8FQZHZ.cjs → lin-CeIaVr28.cjs} +1 -1
  157. package/dist/{linIndass-DXtxVxcr.js → linIndass-D4FJDIeG.js} +2 -2
  158. package/dist/{linIndass-CX9Z02-e.cjs → linIndass-DlgJ3gDh.cjs} +1 -1
  159. package/dist/{lst-Bk2nvLuQ.cjs → lst-BXUZi05h.cjs} +1 -1
  160. package/dist/{lst-BKALUOuy.js → lst-CEyPd2Iy.js} +2 -2
  161. package/dist/{manualEntry-DHH0Yrr3.js → manualEntry-BhhulyiX.js} +2 -2
  162. package/dist/{manualEntry-DRK0QRnb.cjs → manualEntry-DTI2dyTE.cjs} +1 -1
  163. package/dist/{mapBackground-BXj8T-bG.js → mapBackground-D4fBccmw.js} +2 -2
  164. package/dist/{mapBackground-DTuXORjO.cjs → mapBackground-ypoRDxm4.cjs} +1 -1
  165. package/dist/{mappingList-N-lL8mnV.js → mappingList-BbAr-FN1.js} +3 -3
  166. package/dist/{mappingList-M9OukdCu.cjs → mappingList-Dde6DBJS.cjs} +1 -1
  167. package/dist/{markdownViewer-CgabPFUn.js → markdownViewer-C5qlB_cv.js} +5 -5
  168. package/dist/{markdownViewer-CcLL2hzV.cjs → markdownViewer-DAb1tFDK.cjs} +1 -1
  169. package/dist/{mix-control-modal-Lhzopftt.cjs → mix-control-modal-Ks7-P_k-.cjs} +1 -1
  170. package/dist/{mix-control-modal-DRL4otx8.js → mix-control-modal-y23G7DTX.js} +3 -3
  171. package/dist/{mixDataPermission-B5fpqFgm.js → mixDataPermission-9affepdw.js} +2 -2
  172. package/dist/{mixDataPermission-CWt9H_Ib.cjs → mixDataPermission-aBLHSBN0.cjs} +1 -1
  173. package/dist/{mixGrid-wE427LB0.js → mixGrid-CJntkaxR.js} +3 -3
  174. package/dist/{mixGrid-DTwH6At3.cjs → mixGrid-exdKJpll.cjs} +1 -1
  175. package/dist/{mixMap-Bo7_Womf.js → mixMap-CoxhnyI6.js} +3 -3
  176. package/dist/{mixMap-DKDtSARk.cjs → mixMap-D-H9x3o4.cjs} +1 -1
  177. package/dist/{mixModel-Dufgy8XG.cjs → mixModel-DR5M6c3C.cjs} +1 -1
  178. package/dist/{mixModel-CdMcRi5k.js → mixModel-gQirXXx9.js} +3 -3
  179. package/dist/{mixPie-BoUARcVT.cjs → mixPie-CXfidWye.cjs} +1 -1
  180. package/dist/{mixPie-Dr9Toi5T.js → mixPie-CehUNusa.js} +3 -3
  181. package/dist/mixdashboards.cjs +1 -1
  182. package/dist/mixdashboards.css +1 -1
  183. package/dist/mixdashboards.js +1 -1
  184. package/dist/{mjpegCamera-BBqBIpmz.js → mjpegCamera-BzSG7iGB.js} +2 -2
  185. package/dist/{mjpegCamera-C20yRxub.cjs → mjpegCamera-D0mr-NeO.cjs} +1 -1
  186. package/dist/{monitorAlert-BgRCm9Vs.cjs → monitorAlert-DlGt_zMX.cjs} +1 -1
  187. package/dist/{monitorAlert-DVfJ6uNR.js → monitorAlert-VHA4MFKH.js} +2 -2
  188. package/dist/{monitorData-Dz_cHcBR.cjs → monitorData-B49WLtug.cjs} +1 -1
  189. package/dist/{monitorData-zfcYQmc8.js → monitorData-VDHXdIYs.js} +3 -3
  190. package/dist/{monitorSpeedChart-DYV_S1um.js → monitorSpeedChart-DIj0qWoP.js} +1 -1
  191. package/dist/{monitorSpeedChart-jAf_Agnm.cjs → monitorSpeedChart-DyuPhzss.cjs} +1 -1
  192. package/dist/{mxa-mziDHRQU.js → mxa-B3piUHaz.js} +3 -3
  193. package/dist/{mxa-DGkX2ysU.cjs → mxa-CfMqQDdg.cjs} +1 -1
  194. package/dist/{myValue-s0IC6eg0.js → myValue-D_GY2ok8.js} +2 -2
  195. package/dist/{myValue-6J41vLFg.cjs → myValue-M7g_lmjB.cjs} +1 -1
  196. package/dist/{myValueList-Dl-JfGq6.cjs → myValueList-4DK5QiXA.cjs} +1 -1
  197. package/dist/{myValueList-cOT1nYnO.js → myValueList-CoVt_6AS.js} +2 -2
  198. package/dist/{objectList-DGBiB_w6.js → objectList-DEiKb_Qg.js} +578 -631
  199. package/dist/objectList-DzGi3DXA.cjs +1 -0
  200. package/dist/photo-B_bGJai9.cjs +1 -0
  201. package/dist/{photo-C_1tDAZa.js → photo-Br-MkUO8.js} +155 -144
  202. package/dist/{pie-p9CvjJ_m.js → pie-Bn0wKGe5.js} +3 -3
  203. package/dist/{pie-DAEzlPEp.cjs → pie-DNOfJ75A.cjs} +1 -1
  204. package/dist/{pressBtn-DlhDUUdy.js → pressBtn-5YFttcTS.js} +4 -4
  205. package/dist/{pressBtn-DMMLEAFZ.cjs → pressBtn-f5yJnrvV.cjs} +1 -1
  206. package/dist/{progressBar-ZksfXpzu.cjs → progressBar-CKNFPnHE.cjs} +1 -1
  207. package/dist/{progressBar-C3K0DYlI.js → progressBar-owNCCNcz.js} +2 -2
  208. package/dist/{progressCircle-BBLr8loP.js → progressCircle-BGwd3rR2.js} +2 -2
  209. package/dist/{progressCircle-eFwDltuC.cjs → progressCircle-s2ejZsRm.cjs} +1 -1
  210. package/dist/{qrcode-F7MtRi3K.cjs → qrcode-B5cFR1bH.cjs} +1 -1
  211. package/dist/{qrcode-DgwPQO8V.js → qrcode-BoZ2Mjan.js} +2 -2
  212. package/dist/{raceBar-Cp-9uqpX.cjs → raceBar-9pKjUPB3.cjs} +1 -1
  213. package/dist/{raceBar-CyW79eH-.js → raceBar-DU9Bd7dr.js} +3 -3
  214. package/dist/{rad-CLvi3eWj.cjs → rad-Ch8taBlQ.cjs} +1 -1
  215. package/dist/{rad-CbFS-xjy.js → rad-DnWPGOUU.js} +2 -2
  216. package/dist/{rainfallFilterBar-DldKT-I5.cjs → rainfallFilterBar-Ch-B2_tB.cjs} +1 -1
  217. package/dist/{rainfallFilterBar-B0G4jUib.js → rainfallFilterBar-Dgkpvddj.js} +2 -2
  218. package/dist/{rainfallTimeCurve-C5r3fOW8.cjs → rainfallTimeCurve-BSU-_bQV.cjs} +1 -1
  219. package/dist/{rainfallTimeCurve-BlyxLbcV.js → rainfallTimeCurve-Cs5BHiE3.js} +3 -3
  220. package/dist/{rangeLin-B2vKFJHK.cjs → rangeLin-BB9iEY1l.cjs} +1 -1
  221. package/dist/{rangeLin-CLAcLUai.js → rangeLin-LI9h8NHk.js} +2 -2
  222. package/dist/{request-4n94CBXg.cjs → request-CvNMi086.cjs} +1 -1
  223. package/dist/{request-DT13bnc0.js → request-bXTintEv.js} +1 -1
  224. package/dist/{retainer1-Dy2VHVgc.js → retainer1-B40pcVTJ.js} +3 -3
  225. package/dist/{retainer1-EFUFSxMm.cjs → retainer1-iCmD4B9K.cjs} +1 -1
  226. package/dist/{retainer2-BKVJLvBo.cjs → retainer2-B3WxiPHq.cjs} +1 -1
  227. package/dist/{retainer2-3ITxlgwH.js → retainer2-biSotg_6.js} +3 -3
  228. package/dist/{riskRegionTable-C2GOEi0n.cjs → riskRegionTable-Bp5Zs_Qi.cjs} +1 -1
  229. package/dist/{riskRegionTable-BQ88G7F7.js → riskRegionTable-DWel5koY.js} +2 -2
  230. package/dist/{sankey-utV5RADH.cjs → sankey-BIisfhDr.cjs} +1 -1
  231. package/dist/{sankey-ehJmtfKp.js → sankey-DusWvLI1.js} +3 -3
  232. package/dist/{scd-D-Y1EEoF.js → scd-CpcQhYT9.js} +2 -2
  233. package/dist/{scd-Nx15OHeb.cjs → scd-DJ5kRYDc.cjs} +1 -1
  234. package/dist/{sideMenu-D6MgOAkf.js → sideMenu-Ct_iqDl4.js} +2 -2
  235. package/dist/{sideMenu-Ci3pDMFm.cjs → sideMenu-ORRUBDFb.cjs} +1 -1
  236. package/dist/{slopeStability-B9WvyL3-.cjs → slopeStability-DTPTg3PG.cjs} +1 -1
  237. package/dist/{slopeStability-Bu2a83d7.js → slopeStability-iqVxa0bH.js} +3 -3
  238. package/dist/{speedCurve-DrndMOKB.cjs → speedCurve-BPQZKDIm.cjs} +1 -1
  239. package/dist/{speedCurve-BR_xyp4X.js → speedCurve-Cl-bJ8rb.js} +3 -3
  240. package/dist/{staticLine-BLUdDtae.cjs → staticLine-BTR_6AgR.cjs} +1 -1
  241. package/dist/{staticLine-DYQUjE_3.js → staticLine-qZApen2m.js} +3 -3
  242. package/dist/{store-BpVoYd93.js → store-2y119umJ.js} +2 -2
  243. package/dist/{store-KXsdwyLp.cjs → store-C0zj_Rf7.cjs} +1 -1
  244. package/dist/{swiper-53BGkj5I.cjs → swiper-BvOAbs0U.cjs} +1 -1
  245. package/dist/{swiper-S8NYmcYS.js → swiper-DnI3EuaB.js} +3 -3
  246. package/dist/{terminalConfigList-DaEpZiog.js → terminalConfigList-BpQYMjSn.js} +3 -3
  247. package/dist/{terminalConfigList-DFDsxg1q.cjs → terminalConfigList-CSoD6ZOp.cjs} +1 -1
  248. package/dist/{terminalList-BgNFp3E0.cjs → terminalList-Bq-QAX8s.cjs} +1 -1
  249. package/dist/{terminalList-mKVmYqJm.js → terminalList-IAQ7mei9.js} +3 -3
  250. package/dist/{textbox-DAyhC67s.cjs → textbox-BMmMN6nZ.cjs} +1 -1
  251. package/dist/{textbox-Bazh9LRC.js → textbox-DK_cOQy5.js} +4 -4
  252. package/dist/{timeQueryBar-2cbPr7zw.cjs → timeQueryBar-BP0gb7_g.cjs} +1 -1
  253. package/dist/{timeQueryBar-BnVnJk5K.js → timeQueryBar-l9HrXlOq.js} +1 -1
  254. package/dist/{timeSeries-DEeo2zjY.cjs → timeSeries-DisCVCpU.cjs} +1 -1
  255. package/dist/{timeSeries-BF-2qAA7.js → timeSeries-HSjvMFTs.js} +4 -4
  256. package/dist/{timeSeriesCurve-CkCeP5mK.js → timeSeriesCurve-CrLXuU99.js} +3 -3
  257. package/dist/{timeSeriesCurve-BMhNq3WC.cjs → timeSeriesCurve-mgQuGvjW.cjs} +1 -1
  258. package/dist/{toggleBtn-hg6nIH97.cjs → toggleBtn-B1XZtKuh.cjs} +1 -1
  259. package/dist/{toggleBtn-BnIia9MT.js → toggleBtn-BzupLW6N.js} +3 -3
  260. package/dist/{trajectoryConfigPanel-agVnGJJ6.cjs → trajectoryConfigPanel-B2ojTqQ3.cjs} +1 -1
  261. package/dist/{trajectoryConfigPanel-CfnLHqWP.js → trajectoryConfigPanel-DSIqC0nt.js} +1 -1
  262. package/dist/{trajectoryScatter-BBL5uJSS.js → trajectoryScatter-C2IRYmw4.js} +3 -3
  263. package/dist/{trajectoryScatter-BzFxJkJn.cjs → trajectoryScatter-D7PwYfQx.cjs} +1 -1
  264. package/dist/{universalConfigPanel-BueS1CeL.js → universalConfigPanel-CRPDLLv6.js} +1 -1
  265. package/dist/{universalConfigPanel-Db87fd8H.cjs → universalConfigPanel-DlYuOHHv.cjs} +1 -1
  266. package/dist/{universalTable-BXfm_1je.cjs → universalTable-CBstCmhL.cjs} +1 -1
  267. package/dist/{universalTable-5QpYwmyj.js → universalTable-InZV2Mc_.js} +2 -2
  268. package/dist/{video-C75mXLnF.js → video-B7M0uDdp.js} +5 -5
  269. package/dist/{video-QWpkqafn.cjs → video-BVbrSdp3.cjs} +1 -1
  270. package/dist/{videoMonitor-DSOQbTy9.js → videoMonitor-BaPhm798.js} +2 -2
  271. package/dist/{videoMonitor-Dlvtlmf3.cjs → videoMonitor-CX54qdGa.cjs} +1 -1
  272. package/dist/{vlu-BRrxfbLm.js → vlu-BU4pUssc.js} +2 -2
  273. package/dist/{vlu-DqqX7UrQ.cjs → vlu-EWkYp1Uy.cjs} +1 -1
  274. package/dist/{weather-B4twNcEf.js → weather-CRDTMuli.js} +3 -3
  275. package/dist/{weather-GNGvUFJc.cjs → weather-hZh2DELI.cjs} +1 -1
  276. package/dist/{windLin-DPr5J4_t.cjs → windLin-Cx_-n8g3.cjs} +1 -1
  277. package/dist/{windLin-DSh910GU.js → windLin-DbaPTa-Q.js} +2 -2
  278. package/package.json +1 -1
  279. package/dist/config-D3MEjLGn.js +0 -9
  280. package/dist/config-UTUPYJ45.cjs +0 -1
  281. package/dist/element-resize-detector-BlMXyWIR.cjs +0 -6
  282. package/dist/history-C4gipwnp.cjs +0 -1
  283. package/dist/index-EnNA0nIi.cjs +0 -582
  284. package/dist/objectList-DK5_HGK_.cjs +0 -1
  285. package/dist/photo-CBfgcj6v.cjs +0 -1
@@ -27,12 +27,12 @@ var B = (a, s, o) => new Promise((x, w) => {
27
27
  v((o = o.apply(a, s)).next());
28
28
  });
29
29
  import { defineComponent as te, ref as L, getCurrentInstance as oe, computed as M, onMounted as le, onBeforeUnmount as ae, openBlock as d, createElementBlock as u, normalizeStyle as se, unref as U, createElementVNode as n, normalizeClass as ne, toDisplayString as V, createCommentVNode as m, withDirectives as ie, withKeys as re, vModelText as de, renderSlot as ue } from "vue";
30
- import { B as ce } from "./element-resize-detector-DeMhGbNi.js";
31
- import { f as pe, g as ve, _ as me } from "./index-zPaMBZk-.js";
32
- import { a as fe } from "./api-DhQsrEGY.js";
33
- import { F as ye } from "./config-D3MEjLGn.js";
30
+ import { B as ce } from "./element-resize-detector-BykFgbx2.js";
31
+ import { f as pe, g as ve, _ as me } from "./index-CQCqGJ5R.js";
32
+ import { a as fe } from "./api-DpW5KYPS.js";
33
+ import { F as ye } from "./config-BrMFHyZe.js";
34
34
  import { ElMessage as g } from "element-plus";
35
- import { u as he } from "./store-BpVoYd93.js";
35
+ import { u as he } from "./store-2y119umJ.js";
36
36
  import { A as ge, D as _e } from "./ele-vdo-icon-DcWebTR5.js";
37
37
  const Le = { class: "mix-body" }, Ve = { class: "upload-content" }, we = {
38
38
  viewBox: "0 0 24 24",
@@ -1 +1 @@
1
- "use strict";var j=Object.defineProperty,W=Object.defineProperties;var Z=Object.getOwnPropertyDescriptors;var b=Object.getOwnPropertySymbols;var K=Object.prototype.hasOwnProperty,G=Object.prototype.propertyIsEnumerable;var M=(a,s,l)=>s in a?j(a,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):a[s]=l,x=(a,s)=>{for(var l in s||(s={}))K.call(s,l)&&M(a,l,s[l]);if(b)for(var l of b(s))G.call(s,l)&&M(a,l,s[l]);return a},D=(a,s)=>W(a,Z(s));var O=(a,s,l)=>new Promise((k,h)=>{var v=r=>{try{u(l.next(r))}catch(g){h(g)}},i=r=>{try{u(l.throw(r))}catch(g){h(g)}},u=r=>r.done?k(r.value):Promise.resolve(r.value).then(v,i);u((l=l.apply(a,s)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),J=require("./element-resize-detector-BlMXyWIR.cjs"),L=require("./index-EnNA0nIi.cjs"),Q=require("./api-C0okiLNC.cjs"),X=require("./config-UTUPYJ45.cjs"),f=require("element-plus"),Y=require("./store-KXsdwyLp.cjs"),P=require("./ele-vdo-icon-Bgp9gaT6.cjs"),ee={class:"mix-body"},te={class:"upload-content"},oe={viewBox:"0 0 24 24",width:"48",height:"48",fill:"currentColor",style:{opacity:"0.5"}},le={class:"upload-text"},ne={key:0,class:"upload-hint"},ae={key:1,class:"upload-supported"},se={key:1,class:"stream-input-area"},re={class:"stream-content"},ie={viewBox:"0 0 24 24",width:"48",height:"48",fill:"currentColor",style:{opacity:"0.5"}},ce={key:0,class:"stream-input-container"},de=["placeholder"],ue=["disabled"],pe={key:1,class:"stream-hint"},ve={key:2,class:"stream-hint"},me={key:2,class:"player-container"},fe={key:0,class:"video-controls"},ye={class:"file-info"},he={class:"file-name"},ge=["title"],Ee={class:"video-container"},Ve=["src","controls","autoplay","loop","muted"],Ne={DEFAULT_ICON:P.DEFAULT_ICON,ACTIVE_ICON:P.ACTIVE_ICON,NAME_CN:"视频播放器",NAME_EN:"Video Player",ORDER:1},Ce={sourceType:{value:"upload",type:"select",label:"component.video.sourceType",options:[{label:"component.video.uploadFile",value:"upload"},{label:"component.video.rtmpStream",value:"stream"}]},autoplay:!1,loop:!1,muted:!1,controls:!0,fileUrl:{value:"",type:"string",label:"component.video.fileUrl",placeholder:"component.video.uploadPlaceholder"},fileName:{value:"",type:"string",label:"component.video.fileName",placeholder:"component.video.uploadPlaceholder"},streamUrl:{value:"",type:"string",label:"component.video.streamUrl",placeholder:"component.video.streamPlaceholder"},streamType:{value:"flv",type:"select",label:"component.video.streamType",options:[{label:"HTTP-FLV",value:"flv"},{label:"HLS",value:"hls"}]}},ke=[],Se=[],_e=[],Le=null,Te={DEFAULT:Ne,OPTIONS:Ce,DATA:ke,PARAMS:Se,SOURCE:_e,COMMON:Le},we=e.defineComponent(D(x({},Te),{__name:"video",props:{conf:{type:Object,required:!0},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(a){const s=Y.useCounterStore(),l=a;class k extends J.BaseComponent{extractStyles(){return{radiusSize:this.getOptionValue("radiusSize",0),autoplay:this.getOptionValue("autoplay",!1),loop:this.getOptionValue("loop",!1),muted:this.getOptionValue("muted",!1),controls:this.getOptionValue("controls",!0)}}init(){this.Style.value=this.extractStyles(),this.applyTheme(),R()}}const h=new k(l,"video");h.setupLifecycle();const v=h.getStyle(),i=e.ref(""),u=e.ref(""),r=e.ref(null),g=e.ref(null),T=e.ref(!1),m=e.ref(""),y=e.getCurrentInstance();e.computed(()=>({width:"100%",height:"100%",display:"flex",flexDirection:"column"}));const N=e.computed(()=>{var t,o,n;return((n=(o=(t=l.conf)==null?void 0:t.options)==null?void 0:o.sourceType)==null?void 0:n.value)||"upload"}),E=e.computed(()=>{var t,o,n;return((n=(o=(t=l.conf)==null?void 0:t.options)==null?void 0:o.streamType)==null?void 0:n.value)||"flv"}),R=()=>{var t,o,n,p,c,d,C;N.value==="upload"&&((n=(o=(t=l.conf)==null?void 0:t.options)==null?void 0:o.fileUrl)!=null&&n.value)&&(i.value=l.conf.options.fileUrl.value,u.value=((p=l.conf.options.fileName)==null?void 0:p.value)||""),N.value==="stream"&&((C=(d=(c=l.conf)==null?void 0:c.options)==null?void 0:d.streamUrl)!=null&&C.value)&&(m.value=l.conf.options.streamUrl.value,S())},F=()=>{var t;(t=r.value)==null||t.click()},w=t=>O(null,null,function*(){var p,c;const o=t.target.files[0];if(!o)return;if(!o.type.startsWith("video/")){f.ElMessage.warning("请选择有效的视频文件");return}const n=URL.createObjectURL(o);i.value=n,u.value=o.name;try{T.value=!0;const d=yield L.fileToDataUrl(o),C=L.getFileExtension(o.name),V=yield Q.api.post("upload",{dashboard_uid:s.pageData.id,file_data:d,file_type:C,user_id:((p=s.session.userInfo)==null?void 0:p.id)||""},!0);if(V.code===200&&((c=V.result)!=null&&c.relative_path)){const A=X.FILE_URL+V.result.relative_path;URL.revokeObjectURL(n),i.value=A,_("fileUrl",A),_("fileName",V.result.file_name||o.name),f.ElMessage.success("视频上传成功")}else throw new Error(V.msg||"上传失败")}catch(d){console.error("视频上传失败:",d),f.ElMessage.error("视频上传失败: "+(d.message||"未知错误"))}finally{T.value=!1,r.value&&(r.value.value="")}}),S=()=>{if(!m.value.trim()){f.ElMessage.warning("请输入推流地址");return}const t=m.value.trim();_("streamUrl",t),E.value==="flv"?I(t):E.value==="hls"&&H(t),i.value=t,u.value=`${E.value.toUpperCase()} 推流`,f.ElMessage.success("推流连接成功")},I=t=>{console.log("初始化FLV播放器:",t)},H=t=>{console.log("初始化HLS播放器:",t)},_=(t,o)=>{var n;(n=l.conf)!=null&&n.options&&(l.conf.options[t]||(l.conf.options[t]={value:"",type:"string",label:""}),l.conf.options[t].value=o)},B=t=>{t.preventDefault(),t.stopPropagation()},U=t=>{var p;t.preventDefault(),t.stopPropagation();const n=(p=t.dataTransfer)==null?void 0:p.files;if(n&&n.length>0){const c=n[0];if(c!=null&&c.type.startsWith("video/")){const d=new DataTransfer;d.items.add(c),r.value&&(r.value.files=d.files,w({target:r.value}))}else f.ElMessage.warning("请选择有效的视频文件")}},q=()=>{i.value="",u.value="",m.value=""},$=()=>{console.log("Video metadata loaded")},z=t=>{console.error("Video error:",t),f.ElMessage.error("视频加载失败,请检查URL或文件")};return e.onMounted(()=>{var t,o;if(l.mode!=="preview"){const n=(o=(t=y==null?void 0:y.proxy)==null?void 0:t.$el)==null?void 0:o.querySelector(".upload-area");n&&(n.addEventListener("dragover",B),n.addEventListener("drop",U))}}),e.onBeforeUnmount(()=>{var o,n;const t=(n=(o=y==null?void 0:y.proxy)==null?void 0:o.$el)==null?void 0:n.querySelector(".upload-area");t&&(t.removeEventListener("dragover",B),t.removeEventListener("drop",U))}),(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:"mix-component",style:e.normalizeStyle({borderRadius:`${e.unref(v).radiusSize}px`})},[e.createElementVNode("div",ee,[!i.value&&N.value==="upload"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["upload-area",{"preview-mode":a.mode==="preview"}]),onClick:o[0]||(o[0]=n=>a.mode!=="preview"&&F())},[e.createElementVNode("input",{ref_key:"fileInputRef",ref:r,type:"file",accept:"video/*",onChange:w,style:{display:"none"}},null,544),e.createElementVNode("div",te,[(e.openBlock(),e.createElementBlock("svg",oe,[...o[2]||(o[2]=[e.createElementVNode("path",{d:"M17,10.5V7A1,1 0 0,0 16,6H4A1,1 0 0,0 3,7V17A1,1 0 0,0 4,18H16A1,1 0 0,0 17,17V13.5L21,17.5V6.5L17,10.5Z"},null,-1)])])),e.createElementVNode("p",le,e.toDisplayString(a.mode==="preview"?"未上传素材":t.$t("component.video.uploadText")||"点击上传视频"),1),a.mode!=="preview"?(e.openBlock(),e.createElementBlock("p",ne,e.toDisplayString(t.$t("component.video.uploadHint")||"或拖拽文件到此处"),1)):e.createCommentVNode("",!0),a.mode!=="preview"?(e.openBlock(),e.createElementBlock("p",ae,e.toDisplayString(t.$t("component.video.supportedTypes")||"支持格式: MP4, WebM, OGV"),1)):e.createCommentVNode("",!0)])],2)):e.createCommentVNode("",!0),!i.value&&N.value==="stream"?(e.openBlock(),e.createElementBlock("div",se,[e.createElementVNode("div",re,[(e.openBlock(),e.createElementBlock("svg",ie,[...o[3]||(o[3]=[e.createElementVNode("path",{d:"M12,2A3,3 0 0,1 15,5V11A3,3 0 0,1 12,14A3,3 0 0,1 9,11V5A3,3 0 0,1 12,2M19,11C19,14.53 16.39,17.44 13,17.93V21H11V17.93C7.61,17.44 5,14.53 5,11H7A5,5 0 0,0 12,16A5,5 0 0,0 17,11H19Z"},null,-1)])])),o[4]||(o[4]=e.createElementVNode("p",{class:"stream-text"},"RTMP 推流播放",-1)),a.mode!=="preview"?(e.openBlock(),e.createElementBlock("div",ce,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":o[1]||(o[1]=n=>m.value=n),type:"text",class:"stream-url-input",placeholder:E.value==="flv"?"请输入HTTP-FLV地址,如:http://xxx/live/stream.flv":"请输入HLS地址,如:http://xxx/live/stream.m3u8",onKeyup:e.withKeys(S,["enter"])},null,40,de),[[e.vModelText,m.value]]),e.createElementVNode("button",{class:"connect-btn",onClick:S,disabled:!m.value.trim()}," 连接 ",8,ue)])):e.createCommentVNode("",!0),a.mode!=="preview"?(e.openBlock(),e.createElementBlock("p",pe," 支持格式: "+e.toDisplayString(E.value==="flv"?"HTTP-FLV (.flv)":"HLS (.m3u8)"),1)):e.createCommentVNode("",!0),a.mode==="preview"?(e.openBlock(),e.createElementBlock("p",ve,"未配置推流地址")):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),i.value?(e.openBlock(),e.createElementBlock("div",me,[a.mode!=="preview"?(e.openBlock(),e.createElementBlock("div",fe,[e.createElementVNode("div",ye,[e.createElementVNode("span",he,e.toDisplayString(u.value||i.value),1),e.createElementVNode("button",{class:"change-file-btn",onClick:q,title:t.$t("component.video.changeFile")||"更换文件"},[...o[5]||(o[5]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},[e.createElementVNode("path",{d:"M12,6V9L16,5L12,1V4A8,8 0 0,0 4,12C4,13.57 4.46,15.03 5.24,16.26L6.7,14.8C6.25,13.97 6,13 6,12A6,6 0 0,1 12,6M18.76,7.74L17.3,9.2C17.74,10.04 18,11 18,12A6,6 0 0,1 12,18V15L8,19L12,23V20A8,8 0 0,0 20,12C20,10.43 19.54,8.97 18.76,7.74Z"})],-1)])],8,ge)])])):e.createCommentVNode("",!0),e.createElementVNode("div",Ee,[e.createElementVNode("video",{ref_key:"videoRef",ref:g,src:i.value,controls:e.unref(v).controls,autoplay:e.unref(v).autoplay,loop:e.unref(v).loop,muted:e.unref(v).muted,onLoadedmetadata:$,onError:z,class:"video-element"},e.toDisplayString(t.$t("component.video.notSupport")||"您的浏览器不支持视频播放"),41,Ve)])])):e.createCommentVNode("",!0)]),e.renderSlot(t.$slots,"default",{},void 0,!0)],4))}})),Be=L._export_sfc(we,[["__scopeId","data-v-a4584d40"]]);exports.default=Be;
1
+ "use strict";var j=Object.defineProperty,W=Object.defineProperties;var Z=Object.getOwnPropertyDescriptors;var b=Object.getOwnPropertySymbols;var K=Object.prototype.hasOwnProperty,G=Object.prototype.propertyIsEnumerable;var M=(a,s,l)=>s in a?j(a,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):a[s]=l,x=(a,s)=>{for(var l in s||(s={}))K.call(s,l)&&M(a,l,s[l]);if(b)for(var l of b(s))G.call(s,l)&&M(a,l,s[l]);return a},D=(a,s)=>W(a,Z(s));var O=(a,s,l)=>new Promise((k,h)=>{var v=r=>{try{u(l.next(r))}catch(g){h(g)}},i=r=>{try{u(l.throw(r))}catch(g){h(g)}},u=r=>r.done?k(r.value):Promise.resolve(r.value).then(v,i);u((l=l.apply(a,s)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),J=require("./element-resize-detector-BNZCpkPn.cjs"),L=require("./index-LSCs4x8x.cjs"),Q=require("./api-DSuTQgb1.cjs"),X=require("./config-DbZfhrwE.cjs"),f=require("element-plus"),Y=require("./store-C0zj_Rf7.cjs"),P=require("./ele-vdo-icon-Bgp9gaT6.cjs"),ee={class:"mix-body"},te={class:"upload-content"},oe={viewBox:"0 0 24 24",width:"48",height:"48",fill:"currentColor",style:{opacity:"0.5"}},le={class:"upload-text"},ne={key:0,class:"upload-hint"},ae={key:1,class:"upload-supported"},se={key:1,class:"stream-input-area"},re={class:"stream-content"},ie={viewBox:"0 0 24 24",width:"48",height:"48",fill:"currentColor",style:{opacity:"0.5"}},ce={key:0,class:"stream-input-container"},de=["placeholder"],ue=["disabled"],pe={key:1,class:"stream-hint"},ve={key:2,class:"stream-hint"},me={key:2,class:"player-container"},fe={key:0,class:"video-controls"},ye={class:"file-info"},he={class:"file-name"},ge=["title"],Ee={class:"video-container"},Ve=["src","controls","autoplay","loop","muted"],Ne={DEFAULT_ICON:P.DEFAULT_ICON,ACTIVE_ICON:P.ACTIVE_ICON,NAME_CN:"视频播放器",NAME_EN:"Video Player",ORDER:1},Ce={sourceType:{value:"upload",type:"select",label:"component.video.sourceType",options:[{label:"component.video.uploadFile",value:"upload"},{label:"component.video.rtmpStream",value:"stream"}]},autoplay:!1,loop:!1,muted:!1,controls:!0,fileUrl:{value:"",type:"string",label:"component.video.fileUrl",placeholder:"component.video.uploadPlaceholder"},fileName:{value:"",type:"string",label:"component.video.fileName",placeholder:"component.video.uploadPlaceholder"},streamUrl:{value:"",type:"string",label:"component.video.streamUrl",placeholder:"component.video.streamPlaceholder"},streamType:{value:"flv",type:"select",label:"component.video.streamType",options:[{label:"HTTP-FLV",value:"flv"},{label:"HLS",value:"hls"}]}},ke=[],Se=[],_e=[],Le=null,Te={DEFAULT:Ne,OPTIONS:Ce,DATA:ke,PARAMS:Se,SOURCE:_e,COMMON:Le},we=e.defineComponent(D(x({},Te),{__name:"video",props:{conf:{type:Object,required:!0},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(a){const s=Y.useCounterStore(),l=a;class k extends J.BaseComponent{extractStyles(){return{radiusSize:this.getOptionValue("radiusSize",0),autoplay:this.getOptionValue("autoplay",!1),loop:this.getOptionValue("loop",!1),muted:this.getOptionValue("muted",!1),controls:this.getOptionValue("controls",!0)}}init(){this.Style.value=this.extractStyles(),this.applyTheme(),R()}}const h=new k(l,"video");h.setupLifecycle();const v=h.getStyle(),i=e.ref(""),u=e.ref(""),r=e.ref(null),g=e.ref(null),T=e.ref(!1),m=e.ref(""),y=e.getCurrentInstance();e.computed(()=>({width:"100%",height:"100%",display:"flex",flexDirection:"column"}));const N=e.computed(()=>{var t,o,n;return((n=(o=(t=l.conf)==null?void 0:t.options)==null?void 0:o.sourceType)==null?void 0:n.value)||"upload"}),E=e.computed(()=>{var t,o,n;return((n=(o=(t=l.conf)==null?void 0:t.options)==null?void 0:o.streamType)==null?void 0:n.value)||"flv"}),R=()=>{var t,o,n,p,c,d,C;N.value==="upload"&&((n=(o=(t=l.conf)==null?void 0:t.options)==null?void 0:o.fileUrl)!=null&&n.value)&&(i.value=l.conf.options.fileUrl.value,u.value=((p=l.conf.options.fileName)==null?void 0:p.value)||""),N.value==="stream"&&((C=(d=(c=l.conf)==null?void 0:c.options)==null?void 0:d.streamUrl)!=null&&C.value)&&(m.value=l.conf.options.streamUrl.value,S())},F=()=>{var t;(t=r.value)==null||t.click()},w=t=>O(null,null,function*(){var p,c;const o=t.target.files[0];if(!o)return;if(!o.type.startsWith("video/")){f.ElMessage.warning("请选择有效的视频文件");return}const n=URL.createObjectURL(o);i.value=n,u.value=o.name;try{T.value=!0;const d=yield L.fileToDataUrl(o),C=L.getFileExtension(o.name),V=yield Q.api.post("upload",{dashboard_uid:s.pageData.id,file_data:d,file_type:C,user_id:((p=s.session.userInfo)==null?void 0:p.id)||""},!0);if(V.code===200&&((c=V.result)!=null&&c.relative_path)){const A=X.FILE_URL+V.result.relative_path;URL.revokeObjectURL(n),i.value=A,_("fileUrl",A),_("fileName",V.result.file_name||o.name),f.ElMessage.success("视频上传成功")}else throw new Error(V.msg||"上传失败")}catch(d){console.error("视频上传失败:",d),f.ElMessage.error("视频上传失败: "+(d.message||"未知错误"))}finally{T.value=!1,r.value&&(r.value.value="")}}),S=()=>{if(!m.value.trim()){f.ElMessage.warning("请输入推流地址");return}const t=m.value.trim();_("streamUrl",t),E.value==="flv"?I(t):E.value==="hls"&&H(t),i.value=t,u.value=`${E.value.toUpperCase()} 推流`,f.ElMessage.success("推流连接成功")},I=t=>{console.log("初始化FLV播放器:",t)},H=t=>{console.log("初始化HLS播放器:",t)},_=(t,o)=>{var n;(n=l.conf)!=null&&n.options&&(l.conf.options[t]||(l.conf.options[t]={value:"",type:"string",label:""}),l.conf.options[t].value=o)},B=t=>{t.preventDefault(),t.stopPropagation()},U=t=>{var p;t.preventDefault(),t.stopPropagation();const n=(p=t.dataTransfer)==null?void 0:p.files;if(n&&n.length>0){const c=n[0];if(c!=null&&c.type.startsWith("video/")){const d=new DataTransfer;d.items.add(c),r.value&&(r.value.files=d.files,w({target:r.value}))}else f.ElMessage.warning("请选择有效的视频文件")}},q=()=>{i.value="",u.value="",m.value=""},$=()=>{console.log("Video metadata loaded")},z=t=>{console.error("Video error:",t),f.ElMessage.error("视频加载失败,请检查URL或文件")};return e.onMounted(()=>{var t,o;if(l.mode!=="preview"){const n=(o=(t=y==null?void 0:y.proxy)==null?void 0:t.$el)==null?void 0:o.querySelector(".upload-area");n&&(n.addEventListener("dragover",B),n.addEventListener("drop",U))}}),e.onBeforeUnmount(()=>{var o,n;const t=(n=(o=y==null?void 0:y.proxy)==null?void 0:o.$el)==null?void 0:n.querySelector(".upload-area");t&&(t.removeEventListener("dragover",B),t.removeEventListener("drop",U))}),(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:"mix-component",style:e.normalizeStyle({borderRadius:`${e.unref(v).radiusSize}px`})},[e.createElementVNode("div",ee,[!i.value&&N.value==="upload"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["upload-area",{"preview-mode":a.mode==="preview"}]),onClick:o[0]||(o[0]=n=>a.mode!=="preview"&&F())},[e.createElementVNode("input",{ref_key:"fileInputRef",ref:r,type:"file",accept:"video/*",onChange:w,style:{display:"none"}},null,544),e.createElementVNode("div",te,[(e.openBlock(),e.createElementBlock("svg",oe,[...o[2]||(o[2]=[e.createElementVNode("path",{d:"M17,10.5V7A1,1 0 0,0 16,6H4A1,1 0 0,0 3,7V17A1,1 0 0,0 4,18H16A1,1 0 0,0 17,17V13.5L21,17.5V6.5L17,10.5Z"},null,-1)])])),e.createElementVNode("p",le,e.toDisplayString(a.mode==="preview"?"未上传素材":t.$t("component.video.uploadText")||"点击上传视频"),1),a.mode!=="preview"?(e.openBlock(),e.createElementBlock("p",ne,e.toDisplayString(t.$t("component.video.uploadHint")||"或拖拽文件到此处"),1)):e.createCommentVNode("",!0),a.mode!=="preview"?(e.openBlock(),e.createElementBlock("p",ae,e.toDisplayString(t.$t("component.video.supportedTypes")||"支持格式: MP4, WebM, OGV"),1)):e.createCommentVNode("",!0)])],2)):e.createCommentVNode("",!0),!i.value&&N.value==="stream"?(e.openBlock(),e.createElementBlock("div",se,[e.createElementVNode("div",re,[(e.openBlock(),e.createElementBlock("svg",ie,[...o[3]||(o[3]=[e.createElementVNode("path",{d:"M12,2A3,3 0 0,1 15,5V11A3,3 0 0,1 12,14A3,3 0 0,1 9,11V5A3,3 0 0,1 12,2M19,11C19,14.53 16.39,17.44 13,17.93V21H11V17.93C7.61,17.44 5,14.53 5,11H7A5,5 0 0,0 12,16A5,5 0 0,0 17,11H19Z"},null,-1)])])),o[4]||(o[4]=e.createElementVNode("p",{class:"stream-text"},"RTMP 推流播放",-1)),a.mode!=="preview"?(e.openBlock(),e.createElementBlock("div",ce,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":o[1]||(o[1]=n=>m.value=n),type:"text",class:"stream-url-input",placeholder:E.value==="flv"?"请输入HTTP-FLV地址,如:http://xxx/live/stream.flv":"请输入HLS地址,如:http://xxx/live/stream.m3u8",onKeyup:e.withKeys(S,["enter"])},null,40,de),[[e.vModelText,m.value]]),e.createElementVNode("button",{class:"connect-btn",onClick:S,disabled:!m.value.trim()}," 连接 ",8,ue)])):e.createCommentVNode("",!0),a.mode!=="preview"?(e.openBlock(),e.createElementBlock("p",pe," 支持格式: "+e.toDisplayString(E.value==="flv"?"HTTP-FLV (.flv)":"HLS (.m3u8)"),1)):e.createCommentVNode("",!0),a.mode==="preview"?(e.openBlock(),e.createElementBlock("p",ve,"未配置推流地址")):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),i.value?(e.openBlock(),e.createElementBlock("div",me,[a.mode!=="preview"?(e.openBlock(),e.createElementBlock("div",fe,[e.createElementVNode("div",ye,[e.createElementVNode("span",he,e.toDisplayString(u.value||i.value),1),e.createElementVNode("button",{class:"change-file-btn",onClick:q,title:t.$t("component.video.changeFile")||"更换文件"},[...o[5]||(o[5]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},[e.createElementVNode("path",{d:"M12,6V9L16,5L12,1V4A8,8 0 0,0 4,12C4,13.57 4.46,15.03 5.24,16.26L6.7,14.8C6.25,13.97 6,13 6,12A6,6 0 0,1 12,6M18.76,7.74L17.3,9.2C17.74,10.04 18,11 18,12A6,6 0 0,1 12,18V15L8,19L12,23V20A8,8 0 0,0 20,12C20,10.43 19.54,8.97 18.76,7.74Z"})],-1)])],8,ge)])])):e.createCommentVNode("",!0),e.createElementVNode("div",Ee,[e.createElementVNode("video",{ref_key:"videoRef",ref:g,src:i.value,controls:e.unref(v).controls,autoplay:e.unref(v).autoplay,loop:e.unref(v).loop,muted:e.unref(v).muted,onLoadedmetadata:$,onError:z,class:"video-element"},e.toDisplayString(t.$t("component.video.notSupport")||"您的浏览器不支持视频播放"),41,Ve)])])):e.createCommentVNode("",!0)]),e.renderSlot(t.$slots,"default",{},void 0,!0)],4))}})),Be=L._export_sfc(we,[["__scopeId","data-v-a4584d40"]]);exports.default=Be;
@@ -12,9 +12,9 @@ var I = (n, o, c) => o in n ? q(n, o, { enumerable: !0, configurable: !0, writab
12
12
  }, $ = (n, o) => G(n, J(o));
13
13
  import { defineComponent as Y, useCssVars as Z, unref as r, ref as m, computed as ee, openBlock as g, createElementBlock as _, createElementVNode as t, toDisplayString as w, withDirectives as M, vModelText as E, createCommentVNode as te, renderSlot as oe } from "vue";
14
14
  import "html2canvas";
15
- import { B as le, i as ae, j as re } from "./element-resize-detector-DeMhGbNi.js";
15
+ import { B as le, i as ae, j as re } from "./element-resize-detector-BykFgbx2.js";
16
16
  import { A as ce, D as ne } from "./ele-vdo-icon-DcWebTR5.js";
17
- import { _ as se } from "./index-zPaMBZk-.js";
17
+ import { _ as se } from "./index-CQCqGJ5R.js";
18
18
  const ie = { class: "video-monitor-wrapper" }, de = { class: "panel-header" }, ue = { class: "header-left" }, ve = { class: "header-title" }, fe = { class: "search-bar" }, pe = ["placeholder"], he = { class: "time-range-row" }, me = { class: "time-range-item" }, be = { class: "time-range-item" }, Ce = { class: "video-area" }, ye = {
19
19
  key: 0,
20
20
  class: "rec-badge"
@@ -1 +1 @@
1
- "use strict";var F=Object.defineProperty,$=Object.defineProperties;var z=Object.getOwnPropertyDescriptors;var S=Object.getOwnPropertySymbols;var H=Object.prototype.hasOwnProperty,K=Object.prototype.propertyIsEnumerable;var O=(n,o,a)=>o in n?F(n,o,{enumerable:!0,configurable:!0,writable:!0,value:a}):n[o]=a,R=(n,o)=>{for(var a in o||(o={}))H.call(o,a)&&O(n,a,o[a]);if(S)for(var a of S(o))K.call(o,a)&&O(n,a,o[a]);return n},A=(n,o)=>$(n,z(o));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue");require("html2canvas");const y=require("./element-resize-detector-BlMXyWIR.cjs"),U=require("./ele-vdo-icon-Bgp9gaT6.cjs"),Q=require("./index-EnNA0nIi.cjs"),G={class:"video-monitor-wrapper"},J={class:"panel-header"},W={class:"header-left"},X={class:"header-title"},Y={class:"search-bar"},Z=["placeholder"],ee={class:"time-range-row"},te={class:"time-range-item"},oe={class:"time-range-item"},le={class:"video-area"},re={key:0,class:"rec-badge"},ae={class:"video-content"},ne=["src","autoplay","loop","muted","controls"],ce={key:1,class:"video-placeholder"},se={class:"placeholder-text"},de={DEFAULT_ICON:U.DEFAULT_ICON,ACTIVE_ICON:U.ACTIVE_ICON,NAME_CN:"视频监控",NAME_EN:"Video Monitor",ORDER:11},ie={title:{value:"视频监控",type:"string",label:"component.videoMonitor.title"},realtimeBtnText:{value:"实时更新",type:"string",label:"component.videoMonitor.realtimeBtnText"},searchPlaceholder:{value:"搜索摄像头、位置...",type:"string",label:"component.videoMonitor.searchPlaceholder"},placeholderText:{value:"实时监控",type:"string",label:"component.videoMonitor.placeholderText"},bgColor:{value:"#1a2a3a",type:"color",label:"setting.bgColor"},borderColor:{value:"#2a4a6a",type:"color",label:"component.videoMonitor.borderColor"},textColor:{value:"#ffffff",type:"color",label:"setting.textColor"},accentColor:{value:"#00d4ff",type:"color",label:"component.videoMonitor.accentColor"},recColor:{value:"#e74c3c",type:"color",label:"component.videoMonitor.recColor"},glowEffect:{value:!0,type:"checkbox",label:"component.videoMonitor.glowEffect"},autoplay:{value:!0,type:"checkbox",label:"component.options.autoplay"},loop:{value:!0,type:"checkbox",label:"component.options.loop"},muted:{value:!0,type:"checkbox",label:"component.options.muted"},showControls:{value:!1,type:"checkbox",label:"component.options.controls"}},ue=[{name:"摄像头-01",fv:"video_url",object_id:"",url:""}],fe=["name","fv","object_id","url"],ve=["mosaic","statistics","calculate","statisticsRealtime","calculateRealtime"],me={useAlias:!1,multiObject:!1,source:"mosaic"},pe={DEFAULT:de,OPTIONS:ie,DATA:ue,PARAMS:fe,SOURCE:ve,COMMON:me},he=t.defineComponent(A(R({},pe),{__name:"videoMonitor",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(n){t.useCssVars(d=>({v67bb6460:t.unref(r).bgColor,e55c384e:t.unref(r).borderColor,v051c1810:t.unref(r).textColor,v1c5c55fb:t.unref(r).accentColor,v913de610:t.unref(r).glowEffect?`drop-shadow(0 0 6px ${t.unref(r).accentColor})`:"none",v49efa2a4:t.unref(r).glowEffect?`0 0 10px ${t.unref(r).accentColor}`:"none",v4fb04a9e:t.unref(r).recColor}));const o=n;class a extends y.BaseComponent{extractStyles(){var l,f,c,i,h,s,b,v,m,u,x,N,V,M,k,w,D,T,B;const{options:e}=this.props.conf;return{title:((l=e==null?void 0:e.title)==null?void 0:l.value)||"视频监控",realtimeBtnText:((f=e==null?void 0:e.realtimeBtnText)==null?void 0:f.value)||"实时更新",searchPlaceholder:((c=e==null?void 0:e.searchPlaceholder)==null?void 0:c.value)||"搜索摄像头、位置...",placeholderText:((i=e==null?void 0:e.placeholderText)==null?void 0:i.value)||"实时监控",bgColor:((h=e==null?void 0:e.bgColor)==null?void 0:h.value)||"#1a2a3a",borderColor:((s=e==null?void 0:e.borderColor)==null?void 0:s.value)||"#2a4a6a",textColor:((b=e==null?void 0:e.textColor)==null?void 0:b.value)||"#ffffff",accentColor:((v=e==null?void 0:e.accentColor)==null?void 0:v.value)||"#00d4ff",recColor:((m=e==null?void 0:e.recColor)==null?void 0:m.value)||"#e74c3c",glowEffect:(x=(u=e==null?void 0:e.glowEffect)==null?void 0:u.value)!=null?x:!0,autoplay:(V=(N=e==null?void 0:e.autoplay)==null?void 0:N.value)!=null?V:!0,loop:(k=(M=e==null?void 0:e.loop)==null?void 0:M.value)!=null?k:!0,muted:(D=(w=e==null?void 0:e.muted)==null?void 0:w.value)!=null?D:!0,showControls:(B=(T=e==null?void 0:e.showControls)==null?void 0:T.value)!=null?B:!1}}getDefaultData(){return[{name:"摄像头-01",fv:"video_url",object_id:"",url:""}]}setHistoryData(e){const{data:l,common:f}=this.props.conf;if(!l.some(s=>s.object_id&&s.fv))return;const i=f.source||"mosaic";["statistics","calculate"].includes(i)&&(e=y.formatStatisticsResult(e,l));let h=y.handleNullData(e,this.props,"history");l.forEach((s,b)=>{var v,m;if(!(!s.object_id||!s.fv))try{const u=(m=(v=h.history[b])==null?void 0:v[0])==null?void 0:m[s.fv];u&&(s.url=u)}catch(u){}})}setSocketData(e){if(!e)return;const{data:l}=this.props.conf;l.some(c=>c.object_id&&c.fv)&&l.forEach(c=>{if(!c.object_id||!c.fv)return;const i=this.extractDataValue(e,c.fv);i&&(c.url=i)})}}const C=new a(o,"videoMonitor");(!o.conf.data||o.conf.data.length===0)&&(o.conf.data=C.getDefaultData()),C.setupLifecycle();const r=C.getStyle(),p=t.ref(""),j=t.ref(!0),I=t.ref(null),E=t.ref(""),g=t.ref(""),_=t.computed(()=>{var e,l;const d=(l=(e=o.conf)==null?void 0:e.data)==null?void 0:l[0];return(d==null?void 0:d.url)||""}),P=()=>console.log("实时更新"),q=()=>console.log("搜索:",p.value),L=()=>{p.value=""};return(d,e)=>(t.openBlock(),t.createElementBlock("div",G,[t.createElementVNode("div",J,[t.createElementVNode("div",W,[e[3]||(e[3]=t.createElementVNode("svg",{class:"header-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[t.createElementVNode("path",{d:"M23 7l-7 5 7 5V7z"}),t.createElementVNode("rect",{x:"1",y:"5",width:"15",height:"14",rx:"2",ry:"2"})],-1)),t.createElementVNode("span",X,t.toDisplayString(t.unref(r).title),1)]),t.createElementVNode("button",{class:"realtime-btn",onClick:P},t.toDisplayString(t.unref(r).realtimeBtnText),1)]),t.createElementVNode("div",Y,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":e[0]||(e[0]=l=>p.value=l),type:"text",class:"search-input",placeholder:t.unref(r).searchPlaceholder},null,8,Z),[[t.vModelText,p.value]]),t.createElementVNode("button",{class:"search-btn",onClick:q},[...e[4]||(e[4]=[t.createElementVNode("span",null,"Q",-1)])]),t.createElementVNode("button",{class:"clear-btn",onClick:L},[...e[5]||(e[5]=[t.createElementVNode("span",null,"×",-1)])])]),t.createElementVNode("div",ee,[t.createElementVNode("div",te,[e[6]||(e[6]=t.createElementVNode("label",null,"开始时间",-1)),t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":e[1]||(e[1]=l=>E.value=l),type:"datetime-local",class:"time-input"},null,512),[[t.vModelText,E.value]])]),t.createElementVNode("div",oe,[e[7]||(e[7]=t.createElementVNode("label",null,"结束时间",-1)),t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":e[2]||(e[2]=l=>g.value=l),type:"datetime-local",class:"time-input"},null,512),[[t.vModelText,g.value]])])]),t.createElementVNode("div",le,[j.value?(t.openBlock(),t.createElementBlock("div",re,"REC")):t.createCommentVNode("",!0),t.createElementVNode("div",ae,[_.value?(t.openBlock(),t.createElementBlock("video",{key:0,ref_key:"videoRef",ref:I,src:_.value,autoplay:t.unref(r).autoplay,loop:t.unref(r).loop,muted:t.unref(r).muted,controls:t.unref(r).showControls,class:"video-player"}," 您的浏览器不支持视频播放 ",8,ne)):(t.openBlock(),t.createElementBlock("div",ce,[e[8]||(e[8]=t.createElementVNode("svg",{class:"placeholder-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5"},[t.createElementVNode("rect",{x:"2",y:"4",width:"20",height:"16",rx:"2"}),t.createElementVNode("circle",{cx:"12",cy:"12",r:"3"}),t.createElementVNode("path",{d:"M2 8h2M20 8h2"})],-1)),t.createElementVNode("div",se,t.toDisplayString(t.unref(r).placeholderText),1)]))])]),t.renderSlot(d.$slots,"default",{},void 0,!0)]))}})),be=Q._export_sfc(he,[["__scopeId","data-v-cb156aeb"]]);exports.default=be;
1
+ "use strict";var F=Object.defineProperty,$=Object.defineProperties;var z=Object.getOwnPropertyDescriptors;var S=Object.getOwnPropertySymbols;var H=Object.prototype.hasOwnProperty,K=Object.prototype.propertyIsEnumerable;var O=(n,o,a)=>o in n?F(n,o,{enumerable:!0,configurable:!0,writable:!0,value:a}):n[o]=a,R=(n,o)=>{for(var a in o||(o={}))H.call(o,a)&&O(n,a,o[a]);if(S)for(var a of S(o))K.call(o,a)&&O(n,a,o[a]);return n},A=(n,o)=>$(n,z(o));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue");require("html2canvas");const y=require("./element-resize-detector-BNZCpkPn.cjs"),U=require("./ele-vdo-icon-Bgp9gaT6.cjs"),Q=require("./index-LSCs4x8x.cjs"),G={class:"video-monitor-wrapper"},J={class:"panel-header"},W={class:"header-left"},X={class:"header-title"},Y={class:"search-bar"},Z=["placeholder"],ee={class:"time-range-row"},te={class:"time-range-item"},oe={class:"time-range-item"},le={class:"video-area"},re={key:0,class:"rec-badge"},ae={class:"video-content"},ne=["src","autoplay","loop","muted","controls"],ce={key:1,class:"video-placeholder"},se={class:"placeholder-text"},de={DEFAULT_ICON:U.DEFAULT_ICON,ACTIVE_ICON:U.ACTIVE_ICON,NAME_CN:"视频监控",NAME_EN:"Video Monitor",ORDER:11},ie={title:{value:"视频监控",type:"string",label:"component.videoMonitor.title"},realtimeBtnText:{value:"实时更新",type:"string",label:"component.videoMonitor.realtimeBtnText"},searchPlaceholder:{value:"搜索摄像头、位置...",type:"string",label:"component.videoMonitor.searchPlaceholder"},placeholderText:{value:"实时监控",type:"string",label:"component.videoMonitor.placeholderText"},bgColor:{value:"#1a2a3a",type:"color",label:"setting.bgColor"},borderColor:{value:"#2a4a6a",type:"color",label:"component.videoMonitor.borderColor"},textColor:{value:"#ffffff",type:"color",label:"setting.textColor"},accentColor:{value:"#00d4ff",type:"color",label:"component.videoMonitor.accentColor"},recColor:{value:"#e74c3c",type:"color",label:"component.videoMonitor.recColor"},glowEffect:{value:!0,type:"checkbox",label:"component.videoMonitor.glowEffect"},autoplay:{value:!0,type:"checkbox",label:"component.options.autoplay"},loop:{value:!0,type:"checkbox",label:"component.options.loop"},muted:{value:!0,type:"checkbox",label:"component.options.muted"},showControls:{value:!1,type:"checkbox",label:"component.options.controls"}},ue=[{name:"摄像头-01",fv:"video_url",object_id:"",url:""}],fe=["name","fv","object_id","url"],ve=["mosaic","statistics","calculate","statisticsRealtime","calculateRealtime"],me={useAlias:!1,multiObject:!1,source:"mosaic"},pe={DEFAULT:de,OPTIONS:ie,DATA:ue,PARAMS:fe,SOURCE:ve,COMMON:me},he=t.defineComponent(A(R({},pe),{__name:"videoMonitor",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(n){t.useCssVars(d=>({v67bb6460:t.unref(r).bgColor,e55c384e:t.unref(r).borderColor,v051c1810:t.unref(r).textColor,v1c5c55fb:t.unref(r).accentColor,v913de610:t.unref(r).glowEffect?`drop-shadow(0 0 6px ${t.unref(r).accentColor})`:"none",v49efa2a4:t.unref(r).glowEffect?`0 0 10px ${t.unref(r).accentColor}`:"none",v4fb04a9e:t.unref(r).recColor}));const o=n;class a extends y.BaseComponent{extractStyles(){var l,f,c,i,h,s,b,v,m,u,x,N,V,M,k,w,D,T,B;const{options:e}=this.props.conf;return{title:((l=e==null?void 0:e.title)==null?void 0:l.value)||"视频监控",realtimeBtnText:((f=e==null?void 0:e.realtimeBtnText)==null?void 0:f.value)||"实时更新",searchPlaceholder:((c=e==null?void 0:e.searchPlaceholder)==null?void 0:c.value)||"搜索摄像头、位置...",placeholderText:((i=e==null?void 0:e.placeholderText)==null?void 0:i.value)||"实时监控",bgColor:((h=e==null?void 0:e.bgColor)==null?void 0:h.value)||"#1a2a3a",borderColor:((s=e==null?void 0:e.borderColor)==null?void 0:s.value)||"#2a4a6a",textColor:((b=e==null?void 0:e.textColor)==null?void 0:b.value)||"#ffffff",accentColor:((v=e==null?void 0:e.accentColor)==null?void 0:v.value)||"#00d4ff",recColor:((m=e==null?void 0:e.recColor)==null?void 0:m.value)||"#e74c3c",glowEffect:(x=(u=e==null?void 0:e.glowEffect)==null?void 0:u.value)!=null?x:!0,autoplay:(V=(N=e==null?void 0:e.autoplay)==null?void 0:N.value)!=null?V:!0,loop:(k=(M=e==null?void 0:e.loop)==null?void 0:M.value)!=null?k:!0,muted:(D=(w=e==null?void 0:e.muted)==null?void 0:w.value)!=null?D:!0,showControls:(B=(T=e==null?void 0:e.showControls)==null?void 0:T.value)!=null?B:!1}}getDefaultData(){return[{name:"摄像头-01",fv:"video_url",object_id:"",url:""}]}setHistoryData(e){const{data:l,common:f}=this.props.conf;if(!l.some(s=>s.object_id&&s.fv))return;const i=f.source||"mosaic";["statistics","calculate"].includes(i)&&(e=y.formatStatisticsResult(e,l));let h=y.handleNullData(e,this.props,"history");l.forEach((s,b)=>{var v,m;if(!(!s.object_id||!s.fv))try{const u=(m=(v=h.history[b])==null?void 0:v[0])==null?void 0:m[s.fv];u&&(s.url=u)}catch(u){}})}setSocketData(e){if(!e)return;const{data:l}=this.props.conf;l.some(c=>c.object_id&&c.fv)&&l.forEach(c=>{if(!c.object_id||!c.fv)return;const i=this.extractDataValue(e,c.fv);i&&(c.url=i)})}}const C=new a(o,"videoMonitor");(!o.conf.data||o.conf.data.length===0)&&(o.conf.data=C.getDefaultData()),C.setupLifecycle();const r=C.getStyle(),p=t.ref(""),j=t.ref(!0),I=t.ref(null),E=t.ref(""),g=t.ref(""),_=t.computed(()=>{var e,l;const d=(l=(e=o.conf)==null?void 0:e.data)==null?void 0:l[0];return(d==null?void 0:d.url)||""}),P=()=>console.log("实时更新"),q=()=>console.log("搜索:",p.value),L=()=>{p.value=""};return(d,e)=>(t.openBlock(),t.createElementBlock("div",G,[t.createElementVNode("div",J,[t.createElementVNode("div",W,[e[3]||(e[3]=t.createElementVNode("svg",{class:"header-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[t.createElementVNode("path",{d:"M23 7l-7 5 7 5V7z"}),t.createElementVNode("rect",{x:"1",y:"5",width:"15",height:"14",rx:"2",ry:"2"})],-1)),t.createElementVNode("span",X,t.toDisplayString(t.unref(r).title),1)]),t.createElementVNode("button",{class:"realtime-btn",onClick:P},t.toDisplayString(t.unref(r).realtimeBtnText),1)]),t.createElementVNode("div",Y,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":e[0]||(e[0]=l=>p.value=l),type:"text",class:"search-input",placeholder:t.unref(r).searchPlaceholder},null,8,Z),[[t.vModelText,p.value]]),t.createElementVNode("button",{class:"search-btn",onClick:q},[...e[4]||(e[4]=[t.createElementVNode("span",null,"Q",-1)])]),t.createElementVNode("button",{class:"clear-btn",onClick:L},[...e[5]||(e[5]=[t.createElementVNode("span",null,"×",-1)])])]),t.createElementVNode("div",ee,[t.createElementVNode("div",te,[e[6]||(e[6]=t.createElementVNode("label",null,"开始时间",-1)),t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":e[1]||(e[1]=l=>E.value=l),type:"datetime-local",class:"time-input"},null,512),[[t.vModelText,E.value]])]),t.createElementVNode("div",oe,[e[7]||(e[7]=t.createElementVNode("label",null,"结束时间",-1)),t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":e[2]||(e[2]=l=>g.value=l),type:"datetime-local",class:"time-input"},null,512),[[t.vModelText,g.value]])])]),t.createElementVNode("div",le,[j.value?(t.openBlock(),t.createElementBlock("div",re,"REC")):t.createCommentVNode("",!0),t.createElementVNode("div",ae,[_.value?(t.openBlock(),t.createElementBlock("video",{key:0,ref_key:"videoRef",ref:I,src:_.value,autoplay:t.unref(r).autoplay,loop:t.unref(r).loop,muted:t.unref(r).muted,controls:t.unref(r).showControls,class:"video-player"}," 您的浏览器不支持视频播放 ",8,ne)):(t.openBlock(),t.createElementBlock("div",ce,[e[8]||(e[8]=t.createElementVNode("svg",{class:"placeholder-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5"},[t.createElementVNode("rect",{x:"2",y:"4",width:"20",height:"16",rx:"2"}),t.createElementVNode("circle",{cx:"12",cy:"12",r:"3"}),t.createElementVNode("path",{d:"M2 8h2M20 8h2"})],-1)),t.createElementVNode("div",se,t.toDisplayString(t.unref(r).placeholderText),1)]))])]),t.renderSlot(d.$slots,"default",{},void 0,!0)]))}})),be=Q._export_sfc(he,[["__scopeId","data-v-cb156aeb"]]);exports.default=be;
@@ -11,8 +11,8 @@ var g = (o, t, e) => t in o ? x(o, t, { enumerable: !0, configurable: !0, writab
11
11
  return o;
12
12
  }, h = (o, t) => b(o, A(t));
13
13
  import { defineComponent as V, ref as M, computed as N, openBlock as T, createElementBlock as j, normalizeStyle as n, unref as i, createElementVNode as l, toDisplayString as r, renderSlot as R } from "vue";
14
- import { B as I } from "./element-resize-detector-DeMhGbNi.js";
15
- import { d as k, _ as B } from "./index-zPaMBZk-.js";
14
+ import { B as I } from "./element-resize-detector-BykFgbx2.js";
15
+ import { d as k, _ as B } from "./index-CQCqGJ5R.js";
16
16
  import { g as L } from "./titleStyle-BT5GlpAb.js";
17
17
  import { A as U, D as Y } from "./ele-vlu-icon-Bg6EHZdJ.js";
18
18
  const $ = { class: "mix-body" }, F = { class: "mix-footer" }, w = "--", H = {
@@ -1 +1 @@
1
- "use strict";var h=Object.defineProperty,E=Object.defineProperties;var V=Object.getOwnPropertyDescriptors;var p=Object.getOwnPropertySymbols;var b=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable;var y=(i,t,o)=>t in i?h(i,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):i[t]=o,v=(i,t)=>{for(var o in t||(t={}))b.call(t,o)&&y(i,o,t[o]);if(p)for(var o of p(t))x.call(t,o)&&y(i,o,t[o]);return i},_=(i,t)=>E(i,V(t));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),N=require("./element-resize-detector-BlMXyWIR.cjs"),C=require("./index-EnNA0nIi.cjs"),A=require("./titleStyle-NSnz6cUg.cjs"),g=require("./ele-vlu-icon-Dv-R7Xuc.cjs"),D={class:"mix-body"},T={class:"mix-footer"},M="--",I={DEFAULT_ICON:g.DEFAULT_ICON,ACTIVE_ICON:g.ACTIVE_ICON,NAME_CN:"数值卡片",NAME_EN:"Value",ORDER:3},j={nameSize:14,valueSize:36,timeSize:12,radiusSize:8,bgColor:"#fff",titleColor:"#111",textColor:"#111"},R=[{name:"参数一",fv:"",object_id:""}],k=["name","fv","object_id"],q=["mosaic","statistics","calculate","statisticsRealtime","calculateRealtime"],L={useAlias:!1,multiObject:!1,hideMultiObject:!0,source:"mosaic"},U=1,$={DEFAULT:I,OPTIONS:j,DATA:R,PARAMS:k,SOURCE:q,ITEMS:U,COMMON:L},F=e.defineComponent(_(v({},$),{__name:"vlu",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(i){const t=i,o=e.ref(C.dayjs().format("YYYY-MM-DD HH:mm:ss"));class z extends N.BaseComponent{extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),titleColor:this.getOptionValue("titleColor","#111"),textColor:this.getOptionValue("textColor","#111"),nameSize:this.getOptionValue("nameSize",14),valueSize:this.getOptionValue("valueSize",36),timeSize:this.getOptionValue("timeSize",12),radiusSize:this.getOptionValue("radiusSize",8)}}init(){var l;this.Style.value=this.extractStyles(),this.applyTheme(),(l=this.props.conf.data)!=null&&l.length||(this.props.conf.data=[{name:"参数一",fv:"",object_id:""}])}setSocketData(l){super.setSocketData(l),l&&l.datetime&&(o.value=l.datetime)}}const s=new z(t,"vlu");s.setupLifecycle();const a=s.getStyle(),n=t.conf,O=e.computed(()=>A.generateTitleStyle(t.conf.options));return(r,l)=>{var c,u,d,m,f,S;return e.openBlock(),e.createElementBlock("div",{class:"mix-component",style:e.normalizeStyle({background:e.unref(a).bgColor,borderRadius:`${e.unref(a).radiusSize}px`})},[e.createElementVNode("div",{class:"mix-title",style:e.normalizeStyle(O.value)},e.toDisplayString(e.unref(n).caption||((d=(u=(c=e.unref(n))==null?void 0:c.data)==null?void 0:u[0])==null?void 0:d.name)),5),e.createElementVNode("div",D,[e.createElementVNode("div",{class:"body-value",style:e.normalizeStyle({fontSize:`${e.unref(a).valueSize}px`,color:e.unref(a).textColor})},e.toDisplayString(((S=(f=(m=e.unref(n))==null?void 0:m.data)==null?void 0:f[0])==null?void 0:S.value)||M),5)]),e.createElementVNode("div",T,[e.createElementVNode("div",{class:"footer-time",style:e.normalizeStyle({fontSize:`${e.unref(a).timeSize}px`,color:e.unref(a).titleColor})},e.toDisplayString(o.value),5)]),e.renderSlot(r.$slots,"default",{},void 0,!0)],4)}}})),Y=C._export_sfc(F,[["__scopeId","data-v-f284761a"]]);exports.default=Y;
1
+ "use strict";var h=Object.defineProperty,E=Object.defineProperties;var V=Object.getOwnPropertyDescriptors;var p=Object.getOwnPropertySymbols;var b=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable;var y=(i,t,o)=>t in i?h(i,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):i[t]=o,v=(i,t)=>{for(var o in t||(t={}))b.call(t,o)&&y(i,o,t[o]);if(p)for(var o of p(t))x.call(t,o)&&y(i,o,t[o]);return i},_=(i,t)=>E(i,V(t));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),N=require("./element-resize-detector-BNZCpkPn.cjs"),C=require("./index-LSCs4x8x.cjs"),A=require("./titleStyle-NSnz6cUg.cjs"),g=require("./ele-vlu-icon-Dv-R7Xuc.cjs"),D={class:"mix-body"},T={class:"mix-footer"},M="--",I={DEFAULT_ICON:g.DEFAULT_ICON,ACTIVE_ICON:g.ACTIVE_ICON,NAME_CN:"数值卡片",NAME_EN:"Value",ORDER:3},j={nameSize:14,valueSize:36,timeSize:12,radiusSize:8,bgColor:"#fff",titleColor:"#111",textColor:"#111"},R=[{name:"参数一",fv:"",object_id:""}],k=["name","fv","object_id"],q=["mosaic","statistics","calculate","statisticsRealtime","calculateRealtime"],L={useAlias:!1,multiObject:!1,hideMultiObject:!0,source:"mosaic"},U=1,$={DEFAULT:I,OPTIONS:j,DATA:R,PARAMS:k,SOURCE:q,ITEMS:U,COMMON:L},F=e.defineComponent(_(v({},$),{__name:"vlu",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(i){const t=i,o=e.ref(C.dayjs().format("YYYY-MM-DD HH:mm:ss"));class z extends N.BaseComponent{extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),titleColor:this.getOptionValue("titleColor","#111"),textColor:this.getOptionValue("textColor","#111"),nameSize:this.getOptionValue("nameSize",14),valueSize:this.getOptionValue("valueSize",36),timeSize:this.getOptionValue("timeSize",12),radiusSize:this.getOptionValue("radiusSize",8)}}init(){var l;this.Style.value=this.extractStyles(),this.applyTheme(),(l=this.props.conf.data)!=null&&l.length||(this.props.conf.data=[{name:"参数一",fv:"",object_id:""}])}setSocketData(l){super.setSocketData(l),l&&l.datetime&&(o.value=l.datetime)}}const s=new z(t,"vlu");s.setupLifecycle();const a=s.getStyle(),n=t.conf,O=e.computed(()=>A.generateTitleStyle(t.conf.options));return(r,l)=>{var c,u,d,m,f,S;return e.openBlock(),e.createElementBlock("div",{class:"mix-component",style:e.normalizeStyle({background:e.unref(a).bgColor,borderRadius:`${e.unref(a).radiusSize}px`})},[e.createElementVNode("div",{class:"mix-title",style:e.normalizeStyle(O.value)},e.toDisplayString(e.unref(n).caption||((d=(u=(c=e.unref(n))==null?void 0:c.data)==null?void 0:u[0])==null?void 0:d.name)),5),e.createElementVNode("div",D,[e.createElementVNode("div",{class:"body-value",style:e.normalizeStyle({fontSize:`${e.unref(a).valueSize}px`,color:e.unref(a).textColor})},e.toDisplayString(((S=(f=(m=e.unref(n))==null?void 0:m.data)==null?void 0:f[0])==null?void 0:S.value)||M),5)]),e.createElementVNode("div",T,[e.createElementVNode("div",{class:"footer-time",style:e.normalizeStyle({fontSize:`${e.unref(a).timeSize}px`,color:e.unref(a).titleColor})},e.toDisplayString(o.value),5)]),e.renderSlot(r.$slots,"default",{},void 0,!0)],4)}}})),Y=C._export_sfc(F,[["__scopeId","data-v-f284761a"]]);exports.default=Y;
@@ -12,9 +12,9 @@ var d = (C, t, r) => t in C ? x(C, t, { enumerable: !0, configurable: !0, writab
12
12
  }, m = (C, t) => v(C, _(t));
13
13
  import { defineComponent as y, computed as F, openBlock as I, createElementBlock as Z, createElementVNode as f, normalizeStyle as k, unref as s, renderSlot as S } from "vue";
14
14
  import "html2canvas";
15
- import { B as E } from "./element-resize-detector-DeMhGbNi.js";
16
- import { _ as B } from "./index-zPaMBZk-.js";
17
- import { F as p } from "./config-D3MEjLGn.js";
15
+ import { B as E } from "./element-resize-detector-BykFgbx2.js";
16
+ import { _ as B } from "./index-CQCqGJ5R.js";
17
+ import { F as p } from "./config-BrMFHyZe.js";
18
18
  const N = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='18px'%20viewBox='0%200%2017%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e天气%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份'%20transform='translate(-807.000000,%20-99.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M817.945888,102.796609%20C819.683477,102.796609%20821.092089,104.205221%20821.092089,105.94281%20C821.092089,106.628082%20820.872999,107.262185%20820.501044,107.778896%20C822.196583,108.244456%20823.44069,109.818548%20823.44069,111.684342%20C823.44069,113.306186%20822.492183,114.753742%20821.051831,115.394536%20C820.713416,115.545093%20820.317026,115.392803%20820.16647,115.054388%20C820.015913,114.715973%20820.168202,114.319583%20820.506617,114.169026%20C821.464713,113.742782%20822.099373,112.774201%20822.099373,111.684342%20C822.099373,110.1861%20820.911369,108.976414%20819.451995,108.976414%20C819.031723,108.976414%20818.626762,109.07618%20818.260607,109.265341%20C817.879726,109.46211%20817.414554,109.255909%20817.304572,108.841551%20C816.799872,106.94008%20815.102249,105.597863%20813.147731,105.597863%20C810.772103,105.597863%20808.841317,107.563868%20808.841317,109.995048%20C808.841317,111.399401%20809.489548,112.691456%20810.568916,113.516983%20C810.863125,113.742002%20810.919215,114.162919%20810.694196,114.457127%20C810.469178,114.751336%20810.048261,114.807426%20809.754052,114.582408%20C808.345227,113.504903%20807.5,111.820195%20807.5,109.995048%20C807.5,106.828451%20810.025832,104.256546%20813.147731,104.256546%20C813.829302,104.256546%20814.486533,104.3802%20815.096693,104.608218%20C815.601039,103.529357%20816.696718,102.796609%20817.945888,102.796609%20Z%20M813.280439,107.176421%20C814.048868,107.176421%20814.770636,107.481714%20815.303171,108.014297%20C815.565067,108.276218%20815.565048,108.700855%20815.303127,108.962752%20C815.041206,109.224648%20814.616569,109.224629%20814.354672,108.962708%20C814.071197,108.679207%20813.689455,108.517738%20813.280439,108.517738%20C812.441385,108.517738%20811.761192,109.197931%20811.761192,110.036985%20C811.761192,110.446001%20811.922661,110.827743%20812.206162,111.111218%20C812.468083,111.373115%20812.468102,111.797752%20812.206206,112.059673%20C811.944309,112.321594%20811.519672,112.321613%20811.257751,112.059717%20C810.725168,111.527182%20810.419875,110.805414%20810.419875,110.036985%20C810.419875,108.457142%20811.700596,107.176421%20813.280439,107.176421%20Z%20M817.945888,104.137926%20C817.210393,104.137926%20816.567249,104.581189%20816.288327,105.226532%20C817.155696,105.815582%20817.856037,106.643608%20818.294581,107.628501%20L818.3271,107.70736%20C819.140827,107.532395%20819.750772,106.808824%20819.750772,105.94281%20C819.750772,104.94601%20818.942688,104.137926%20817.945888,104.137926%20Z%20M822.770031,105.657173%20C823.173193,105.657173%20823.5,105.98398%20823.5,106.387142%20C823.5,106.790304%20823.173193,107.117111%20822.770031,107.117111%20C822.36687,107.117111%20822.040063,106.790304%20822.040063,106.387142%20C822.040063,105.98398%20822.36687,105.657173%20822.770031,105.657173%20Z%20M822.040063,102.372314%20C822.443224,102.372314%20822.770031,102.699132%20822.770031,103.102283%20C822.770031,103.505445%20822.443224,103.832252%20822.040063,103.832252%20C821.636901,103.832252%20821.310094,103.505445%20821.310094,103.102283%20C821.310094,102.699132%20821.636901,102.372314%20822.040063,102.372314%20Z%20M814.740376,101.642346%20C815.143538,101.642346%20815.470345,101.969164%20815.470345,102.372314%20C815.470345,102.775465%20815.143538,103.102283%20814.740376,103.102283%20C814.337215,103.102283%20814.010408,102.775465%20814.010408,102.372314%20C814.010408,101.969164%20814.337215,101.642346%20814.740376,101.642346%20Z%20M818.755204,100.547393%20C819.158366,100.547393%20819.485173,100.874211%20819.485173,101.277361%20C819.485173,101.680512%20819.158366,102.00733%20818.755204,102.00733%20C818.352042,102.00733%20818.025235,101.680512%20818.025235,101.277361%20C818.025235,100.874211%20818.352042,100.547393%20818.755204,100.547393%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e", z = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='18px'%20viewBox='0%200%2017%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e天气%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份-2'%20transform='translate(-807.000000,%20-99.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M817.945888,102.796609%20C819.683477,102.796609%20821.092089,104.205221%20821.092089,105.94281%20C821.092089,106.628082%20820.872999,107.262185%20820.501044,107.778896%20C822.196583,108.244456%20823.44069,109.818548%20823.44069,111.684342%20C823.44069,113.306186%20822.492183,114.753742%20821.051831,115.394536%20C820.713416,115.545093%20820.317026,115.392803%20820.16647,115.054388%20C820.015913,114.715973%20820.168202,114.319583%20820.506617,114.169026%20C821.464713,113.742782%20822.099373,112.774201%20822.099373,111.684342%20C822.099373,110.1861%20820.911369,108.976414%20819.451995,108.976414%20C819.031723,108.976414%20818.626762,109.07618%20818.260607,109.265341%20C817.879726,109.46211%20817.414554,109.255909%20817.304572,108.841551%20C816.799872,106.94008%20815.102249,105.597863%20813.147731,105.597863%20C810.772103,105.597863%20808.841317,107.563868%20808.841317,109.995048%20C808.841317,111.399401%20809.489548,112.691456%20810.568916,113.516983%20C810.863125,113.742002%20810.919215,114.162919%20810.694196,114.457127%20C810.469178,114.751336%20810.048261,114.807426%20809.754052,114.582408%20C808.345227,113.504903%20807.5,111.820195%20807.5,109.995048%20C807.5,106.828451%20810.025832,104.256546%20813.147731,104.256546%20C813.829302,104.256546%20814.486533,104.3802%20815.096693,104.608218%20C815.601039,103.529357%20816.696718,102.796609%20817.945888,102.796609%20Z%20M813.280439,107.176421%20C814.048868,107.176421%20814.770636,107.481714%20815.303171,108.014297%20C815.565067,108.276218%20815.565048,108.700855%20815.303127,108.962752%20C815.041206,109.224648%20814.616569,109.224629%20814.354672,108.962708%20C814.071197,108.679207%20813.689455,108.517738%20813.280439,108.517738%20C812.441385,108.517738%20811.761192,109.197931%20811.761192,110.036985%20C811.761192,110.446001%20811.922661,110.827743%20812.206162,111.111218%20C812.468083,111.373115%20812.468102,111.797752%20812.206206,112.059673%20C811.944309,112.321594%20811.519672,112.321613%20811.257751,112.059717%20C810.725168,111.527182%20810.419875,110.805414%20810.419875,110.036985%20C810.419875,108.457142%20811.700596,107.176421%20813.280439,107.176421%20Z%20M817.945888,104.137926%20C817.210393,104.137926%20816.567249,104.581189%20816.288327,105.226532%20C817.155696,105.815582%20817.856037,106.643608%20818.294581,107.628501%20L818.3271,107.70736%20C819.140827,107.532395%20819.750772,106.808824%20819.750772,105.94281%20C819.750772,104.94601%20818.942688,104.137926%20817.945888,104.137926%20Z%20M822.770031,105.657173%20C823.173193,105.657173%20823.5,105.98398%20823.5,106.387142%20C823.5,106.790304%20823.173193,107.117111%20822.770031,107.117111%20C822.36687,107.117111%20822.040063,106.790304%20822.040063,106.387142%20C822.040063,105.98398%20822.36687,105.657173%20822.770031,105.657173%20Z%20M822.040063,102.372314%20C822.443224,102.372314%20822.770031,102.699132%20822.770031,103.102283%20C822.770031,103.505445%20822.443224,103.832252%20822.040063,103.832252%20C821.636901,103.832252%20821.310094,103.505445%20821.310094,103.102283%20C821.310094,102.699132%20821.636901,102.372314%20822.040063,102.372314%20Z%20M814.740376,101.642346%20C815.143538,101.642346%20815.470345,101.969164%20815.470345,102.372314%20C815.470345,102.775465%20815.143538,103.102283%20814.740376,103.102283%20C814.337215,103.102283%20814.010408,102.775465%20814.010408,102.372314%20C814.010408,101.969164%20814.337215,101.642346%20814.740376,101.642346%20Z%20M818.755204,100.547393%20C819.158366,100.547393%20819.485173,100.874211%20819.485173,101.277361%20C819.485173,101.680512%20819.158366,102.00733%20818.755204,102.00733%20C818.352042,102.00733%20818.025235,101.680512%20818.025235,101.277361%20C818.025235,100.874211%20818.352042,100.547393%20818.755204,100.547393%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e", O = { class: "mix-component" }, L = ["src"], A = {
19
19
  DEFAULT_ICON: N,
20
20
  ACTIVE_ICON: z,
@@ -1 +1 @@
1
- "use strict";var w=Object.defineProperty,v=Object.defineProperties;var x=Object.getOwnPropertyDescriptors;var s=Object.getOwnPropertySymbols;var b=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable;var d=(C,t,n)=>t in C?w(C,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):C[t]=n,g=(C,t)=>{for(var n in t||(t={}))b.call(t,n)&&d(C,n,t[n]);if(s)for(var n of s(t))_.call(t,n)&&d(C,n,t[n]);return C},u=(C,t)=>v(C,x(t));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue");require("html2canvas");const M=require("./element-resize-detector-BlMXyWIR.cjs"),y=require("./index-EnNA0nIi.cjs"),f=require("./config-UTUPYJ45.cjs"),F="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='18px'%20viewBox='0%200%2017%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e天气%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份'%20transform='translate(-807.000000,%20-99.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M817.945888,102.796609%20C819.683477,102.796609%20821.092089,104.205221%20821.092089,105.94281%20C821.092089,106.628082%20820.872999,107.262185%20820.501044,107.778896%20C822.196583,108.244456%20823.44069,109.818548%20823.44069,111.684342%20C823.44069,113.306186%20822.492183,114.753742%20821.051831,115.394536%20C820.713416,115.545093%20820.317026,115.392803%20820.16647,115.054388%20C820.015913,114.715973%20820.168202,114.319583%20820.506617,114.169026%20C821.464713,113.742782%20822.099373,112.774201%20822.099373,111.684342%20C822.099373,110.1861%20820.911369,108.976414%20819.451995,108.976414%20C819.031723,108.976414%20818.626762,109.07618%20818.260607,109.265341%20C817.879726,109.46211%20817.414554,109.255909%20817.304572,108.841551%20C816.799872,106.94008%20815.102249,105.597863%20813.147731,105.597863%20C810.772103,105.597863%20808.841317,107.563868%20808.841317,109.995048%20C808.841317,111.399401%20809.489548,112.691456%20810.568916,113.516983%20C810.863125,113.742002%20810.919215,114.162919%20810.694196,114.457127%20C810.469178,114.751336%20810.048261,114.807426%20809.754052,114.582408%20C808.345227,113.504903%20807.5,111.820195%20807.5,109.995048%20C807.5,106.828451%20810.025832,104.256546%20813.147731,104.256546%20C813.829302,104.256546%20814.486533,104.3802%20815.096693,104.608218%20C815.601039,103.529357%20816.696718,102.796609%20817.945888,102.796609%20Z%20M813.280439,107.176421%20C814.048868,107.176421%20814.770636,107.481714%20815.303171,108.014297%20C815.565067,108.276218%20815.565048,108.700855%20815.303127,108.962752%20C815.041206,109.224648%20814.616569,109.224629%20814.354672,108.962708%20C814.071197,108.679207%20813.689455,108.517738%20813.280439,108.517738%20C812.441385,108.517738%20811.761192,109.197931%20811.761192,110.036985%20C811.761192,110.446001%20811.922661,110.827743%20812.206162,111.111218%20C812.468083,111.373115%20812.468102,111.797752%20812.206206,112.059673%20C811.944309,112.321594%20811.519672,112.321613%20811.257751,112.059717%20C810.725168,111.527182%20810.419875,110.805414%20810.419875,110.036985%20C810.419875,108.457142%20811.700596,107.176421%20813.280439,107.176421%20Z%20M817.945888,104.137926%20C817.210393,104.137926%20816.567249,104.581189%20816.288327,105.226532%20C817.155696,105.815582%20817.856037,106.643608%20818.294581,107.628501%20L818.3271,107.70736%20C819.140827,107.532395%20819.750772,106.808824%20819.750772,105.94281%20C819.750772,104.94601%20818.942688,104.137926%20817.945888,104.137926%20Z%20M822.770031,105.657173%20C823.173193,105.657173%20823.5,105.98398%20823.5,106.387142%20C823.5,106.790304%20823.173193,107.117111%20822.770031,107.117111%20C822.36687,107.117111%20822.040063,106.790304%20822.040063,106.387142%20C822.040063,105.98398%20822.36687,105.657173%20822.770031,105.657173%20Z%20M822.040063,102.372314%20C822.443224,102.372314%20822.770031,102.699132%20822.770031,103.102283%20C822.770031,103.505445%20822.443224,103.832252%20822.040063,103.832252%20C821.636901,103.832252%20821.310094,103.505445%20821.310094,103.102283%20C821.310094,102.699132%20821.636901,102.372314%20822.040063,102.372314%20Z%20M814.740376,101.642346%20C815.143538,101.642346%20815.470345,101.969164%20815.470345,102.372314%20C815.470345,102.775465%20815.143538,103.102283%20814.740376,103.102283%20C814.337215,103.102283%20814.010408,102.775465%20814.010408,102.372314%20C814.010408,101.969164%20814.337215,101.642346%20814.740376,101.642346%20Z%20M818.755204,100.547393%20C819.158366,100.547393%20819.485173,100.874211%20819.485173,101.277361%20C819.485173,101.680512%20819.158366,102.00733%20818.755204,102.00733%20C818.352042,102.00733%20818.025235,101.680512%20818.025235,101.277361%20C818.025235,100.874211%20818.352042,100.547393%20818.755204,100.547393%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",I="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='18px'%20viewBox='0%200%2017%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e天气%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份-2'%20transform='translate(-807.000000,%20-99.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M817.945888,102.796609%20C819.683477,102.796609%20821.092089,104.205221%20821.092089,105.94281%20C821.092089,106.628082%20820.872999,107.262185%20820.501044,107.778896%20C822.196583,108.244456%20823.44069,109.818548%20823.44069,111.684342%20C823.44069,113.306186%20822.492183,114.753742%20821.051831,115.394536%20C820.713416,115.545093%20820.317026,115.392803%20820.16647,115.054388%20C820.015913,114.715973%20820.168202,114.319583%20820.506617,114.169026%20C821.464713,113.742782%20822.099373,112.774201%20822.099373,111.684342%20C822.099373,110.1861%20820.911369,108.976414%20819.451995,108.976414%20C819.031723,108.976414%20818.626762,109.07618%20818.260607,109.265341%20C817.879726,109.46211%20817.414554,109.255909%20817.304572,108.841551%20C816.799872,106.94008%20815.102249,105.597863%20813.147731,105.597863%20C810.772103,105.597863%20808.841317,107.563868%20808.841317,109.995048%20C808.841317,111.399401%20809.489548,112.691456%20810.568916,113.516983%20C810.863125,113.742002%20810.919215,114.162919%20810.694196,114.457127%20C810.469178,114.751336%20810.048261,114.807426%20809.754052,114.582408%20C808.345227,113.504903%20807.5,111.820195%20807.5,109.995048%20C807.5,106.828451%20810.025832,104.256546%20813.147731,104.256546%20C813.829302,104.256546%20814.486533,104.3802%20815.096693,104.608218%20C815.601039,103.529357%20816.696718,102.796609%20817.945888,102.796609%20Z%20M813.280439,107.176421%20C814.048868,107.176421%20814.770636,107.481714%20815.303171,108.014297%20C815.565067,108.276218%20815.565048,108.700855%20815.303127,108.962752%20C815.041206,109.224648%20814.616569,109.224629%20814.354672,108.962708%20C814.071197,108.679207%20813.689455,108.517738%20813.280439,108.517738%20C812.441385,108.517738%20811.761192,109.197931%20811.761192,110.036985%20C811.761192,110.446001%20811.922661,110.827743%20812.206162,111.111218%20C812.468083,111.373115%20812.468102,111.797752%20812.206206,112.059673%20C811.944309,112.321594%20811.519672,112.321613%20811.257751,112.059717%20C810.725168,111.527182%20810.419875,110.805414%20810.419875,110.036985%20C810.419875,108.457142%20811.700596,107.176421%20813.280439,107.176421%20Z%20M817.945888,104.137926%20C817.210393,104.137926%20816.567249,104.581189%20816.288327,105.226532%20C817.155696,105.815582%20817.856037,106.643608%20818.294581,107.628501%20L818.3271,107.70736%20C819.140827,107.532395%20819.750772,106.808824%20819.750772,105.94281%20C819.750772,104.94601%20818.942688,104.137926%20817.945888,104.137926%20Z%20M822.770031,105.657173%20C823.173193,105.657173%20823.5,105.98398%20823.5,106.387142%20C823.5,106.790304%20823.173193,107.117111%20822.770031,107.117111%20C822.36687,107.117111%20822.040063,106.790304%20822.040063,106.387142%20C822.040063,105.98398%20822.36687,105.657173%20822.770031,105.657173%20Z%20M822.040063,102.372314%20C822.443224,102.372314%20822.770031,102.699132%20822.770031,103.102283%20C822.770031,103.505445%20822.443224,103.832252%20822.040063,103.832252%20C821.636901,103.832252%20821.310094,103.505445%20821.310094,103.102283%20C821.310094,102.699132%20821.636901,102.372314%20822.040063,102.372314%20Z%20M814.740376,101.642346%20C815.143538,101.642346%20815.470345,101.969164%20815.470345,102.372314%20C815.470345,102.775465%20815.143538,103.102283%20814.740376,103.102283%20C814.337215,103.102283%20814.010408,102.775465%20814.010408,102.372314%20C814.010408,101.969164%20814.337215,101.642346%20814.740376,101.642346%20Z%20M818.755204,100.547393%20C819.158366,100.547393%20819.485173,100.874211%20819.485173,101.277361%20C819.485173,101.680512%20819.158366,102.00733%20818.755204,102.00733%20C818.352042,102.00733%20818.025235,101.680512%20818.025235,101.277361%20C818.025235,100.874211%20818.352042,100.547393%20818.755204,100.547393%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",S={class:"mix-component"},Z=["src"],k={DEFAULT_ICON:F,ACTIVE_ICON:I,NAME_CN:"天气",NAME_EN:"Weather",ORDER:4},E={transparent:{value:!1,type:"checkbox",label:"component.options.transparent"},bgColor:"#fff",textColor:{value:"#00B0F0",type:"color",label:"component.options.textColor",hideAlpha:!0},radiusSize:8,bgImg:{value:"",type:"image",label:"component.customized.bgImg"}},N={DEFAULT:k,OPTIONS:E,COMMON:{}},z=r.defineComponent(u(g({},N),{__name:"weather",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(C){const t=C;class n extends M.BaseComponent{extractStyles(){const{options:e}=this.props.conf,c=(a,h)=>a==null?h:typeof a=="object"&&"value"in a?a.value:a;return{bgColor:c(e==null?void 0:e.bgColor,"#fff"),textColor:c(e==null?void 0:e.textColor,"#00B0F0"),radiusSize:c(e==null?void 0:e.radiusSize,8),bgImg:c(e==null?void 0:e.bgImg,""),transparent:c(e==null?void 0:e.transparent,!1)}}}const i=new n(t,"weather");i.setupLifecycle();const l=i.getStyle(),m=o=>o?o.startsWith(f.FILE_URL)||o.startsWith("http")?o:f.FILE_URL+o:"",p=r.computed(()=>{var o,e;return((e=(o=l.value)==null?void 0:o.textColor)==null?void 0:e.replace("#",""))||"00B0F0"});return(o,e)=>(r.openBlock(),r.createElementBlock("div",S,[r.createElementVNode("div",{class:"weather-wrap",style:r.normalizeStyle({backgroundColor:r.unref(l).transparent?"transparent":r.unref(l).bgColor,borderRadius:`${r.unref(l).radiusSize}px`,backgroundImage:r.unref(l).bgImg?`url(${m(r.unref(l).bgImg)})`:""})},[r.createElementVNode("iframe",{width:"200",scrolling:"no",height:"60",frameborder:"0",allowtransparency:"true",src:`https://i.tianqi.com?c=code&id=12&color=%23${p.value}&icon=1&num=1&site=15&align=center`},null,8,Z)],4),r.renderSlot(o.$slots,"default",{},void 0,!0)]))}})),L=y._export_sfc(z,[["__scopeId","data-v-0eacb83f"]]);exports.default=L;
1
+ "use strict";var w=Object.defineProperty,v=Object.defineProperties;var x=Object.getOwnPropertyDescriptors;var s=Object.getOwnPropertySymbols;var b=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable;var d=(C,t,n)=>t in C?w(C,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):C[t]=n,g=(C,t)=>{for(var n in t||(t={}))b.call(t,n)&&d(C,n,t[n]);if(s)for(var n of s(t))_.call(t,n)&&d(C,n,t[n]);return C},u=(C,t)=>v(C,x(t));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue");require("html2canvas");const M=require("./element-resize-detector-BNZCpkPn.cjs"),y=require("./index-LSCs4x8x.cjs"),f=require("./config-DbZfhrwE.cjs"),F="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='18px'%20viewBox='0%200%2017%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e天气%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份'%20transform='translate(-807.000000,%20-99.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M817.945888,102.796609%20C819.683477,102.796609%20821.092089,104.205221%20821.092089,105.94281%20C821.092089,106.628082%20820.872999,107.262185%20820.501044,107.778896%20C822.196583,108.244456%20823.44069,109.818548%20823.44069,111.684342%20C823.44069,113.306186%20822.492183,114.753742%20821.051831,115.394536%20C820.713416,115.545093%20820.317026,115.392803%20820.16647,115.054388%20C820.015913,114.715973%20820.168202,114.319583%20820.506617,114.169026%20C821.464713,113.742782%20822.099373,112.774201%20822.099373,111.684342%20C822.099373,110.1861%20820.911369,108.976414%20819.451995,108.976414%20C819.031723,108.976414%20818.626762,109.07618%20818.260607,109.265341%20C817.879726,109.46211%20817.414554,109.255909%20817.304572,108.841551%20C816.799872,106.94008%20815.102249,105.597863%20813.147731,105.597863%20C810.772103,105.597863%20808.841317,107.563868%20808.841317,109.995048%20C808.841317,111.399401%20809.489548,112.691456%20810.568916,113.516983%20C810.863125,113.742002%20810.919215,114.162919%20810.694196,114.457127%20C810.469178,114.751336%20810.048261,114.807426%20809.754052,114.582408%20C808.345227,113.504903%20807.5,111.820195%20807.5,109.995048%20C807.5,106.828451%20810.025832,104.256546%20813.147731,104.256546%20C813.829302,104.256546%20814.486533,104.3802%20815.096693,104.608218%20C815.601039,103.529357%20816.696718,102.796609%20817.945888,102.796609%20Z%20M813.280439,107.176421%20C814.048868,107.176421%20814.770636,107.481714%20815.303171,108.014297%20C815.565067,108.276218%20815.565048,108.700855%20815.303127,108.962752%20C815.041206,109.224648%20814.616569,109.224629%20814.354672,108.962708%20C814.071197,108.679207%20813.689455,108.517738%20813.280439,108.517738%20C812.441385,108.517738%20811.761192,109.197931%20811.761192,110.036985%20C811.761192,110.446001%20811.922661,110.827743%20812.206162,111.111218%20C812.468083,111.373115%20812.468102,111.797752%20812.206206,112.059673%20C811.944309,112.321594%20811.519672,112.321613%20811.257751,112.059717%20C810.725168,111.527182%20810.419875,110.805414%20810.419875,110.036985%20C810.419875,108.457142%20811.700596,107.176421%20813.280439,107.176421%20Z%20M817.945888,104.137926%20C817.210393,104.137926%20816.567249,104.581189%20816.288327,105.226532%20C817.155696,105.815582%20817.856037,106.643608%20818.294581,107.628501%20L818.3271,107.70736%20C819.140827,107.532395%20819.750772,106.808824%20819.750772,105.94281%20C819.750772,104.94601%20818.942688,104.137926%20817.945888,104.137926%20Z%20M822.770031,105.657173%20C823.173193,105.657173%20823.5,105.98398%20823.5,106.387142%20C823.5,106.790304%20823.173193,107.117111%20822.770031,107.117111%20C822.36687,107.117111%20822.040063,106.790304%20822.040063,106.387142%20C822.040063,105.98398%20822.36687,105.657173%20822.770031,105.657173%20Z%20M822.040063,102.372314%20C822.443224,102.372314%20822.770031,102.699132%20822.770031,103.102283%20C822.770031,103.505445%20822.443224,103.832252%20822.040063,103.832252%20C821.636901,103.832252%20821.310094,103.505445%20821.310094,103.102283%20C821.310094,102.699132%20821.636901,102.372314%20822.040063,102.372314%20Z%20M814.740376,101.642346%20C815.143538,101.642346%20815.470345,101.969164%20815.470345,102.372314%20C815.470345,102.775465%20815.143538,103.102283%20814.740376,103.102283%20C814.337215,103.102283%20814.010408,102.775465%20814.010408,102.372314%20C814.010408,101.969164%20814.337215,101.642346%20814.740376,101.642346%20Z%20M818.755204,100.547393%20C819.158366,100.547393%20819.485173,100.874211%20819.485173,101.277361%20C819.485173,101.680512%20819.158366,102.00733%20818.755204,102.00733%20C818.352042,102.00733%20818.025235,101.680512%20818.025235,101.277361%20C818.025235,100.874211%20818.352042,100.547393%20818.755204,100.547393%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",I="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='18px'%20viewBox='0%200%2017%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e天气%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份-2'%20transform='translate(-807.000000,%20-99.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M817.945888,102.796609%20C819.683477,102.796609%20821.092089,104.205221%20821.092089,105.94281%20C821.092089,106.628082%20820.872999,107.262185%20820.501044,107.778896%20C822.196583,108.244456%20823.44069,109.818548%20823.44069,111.684342%20C823.44069,113.306186%20822.492183,114.753742%20821.051831,115.394536%20C820.713416,115.545093%20820.317026,115.392803%20820.16647,115.054388%20C820.015913,114.715973%20820.168202,114.319583%20820.506617,114.169026%20C821.464713,113.742782%20822.099373,112.774201%20822.099373,111.684342%20C822.099373,110.1861%20820.911369,108.976414%20819.451995,108.976414%20C819.031723,108.976414%20818.626762,109.07618%20818.260607,109.265341%20C817.879726,109.46211%20817.414554,109.255909%20817.304572,108.841551%20C816.799872,106.94008%20815.102249,105.597863%20813.147731,105.597863%20C810.772103,105.597863%20808.841317,107.563868%20808.841317,109.995048%20C808.841317,111.399401%20809.489548,112.691456%20810.568916,113.516983%20C810.863125,113.742002%20810.919215,114.162919%20810.694196,114.457127%20C810.469178,114.751336%20810.048261,114.807426%20809.754052,114.582408%20C808.345227,113.504903%20807.5,111.820195%20807.5,109.995048%20C807.5,106.828451%20810.025832,104.256546%20813.147731,104.256546%20C813.829302,104.256546%20814.486533,104.3802%20815.096693,104.608218%20C815.601039,103.529357%20816.696718,102.796609%20817.945888,102.796609%20Z%20M813.280439,107.176421%20C814.048868,107.176421%20814.770636,107.481714%20815.303171,108.014297%20C815.565067,108.276218%20815.565048,108.700855%20815.303127,108.962752%20C815.041206,109.224648%20814.616569,109.224629%20814.354672,108.962708%20C814.071197,108.679207%20813.689455,108.517738%20813.280439,108.517738%20C812.441385,108.517738%20811.761192,109.197931%20811.761192,110.036985%20C811.761192,110.446001%20811.922661,110.827743%20812.206162,111.111218%20C812.468083,111.373115%20812.468102,111.797752%20812.206206,112.059673%20C811.944309,112.321594%20811.519672,112.321613%20811.257751,112.059717%20C810.725168,111.527182%20810.419875,110.805414%20810.419875,110.036985%20C810.419875,108.457142%20811.700596,107.176421%20813.280439,107.176421%20Z%20M817.945888,104.137926%20C817.210393,104.137926%20816.567249,104.581189%20816.288327,105.226532%20C817.155696,105.815582%20817.856037,106.643608%20818.294581,107.628501%20L818.3271,107.70736%20C819.140827,107.532395%20819.750772,106.808824%20819.750772,105.94281%20C819.750772,104.94601%20818.942688,104.137926%20817.945888,104.137926%20Z%20M822.770031,105.657173%20C823.173193,105.657173%20823.5,105.98398%20823.5,106.387142%20C823.5,106.790304%20823.173193,107.117111%20822.770031,107.117111%20C822.36687,107.117111%20822.040063,106.790304%20822.040063,106.387142%20C822.040063,105.98398%20822.36687,105.657173%20822.770031,105.657173%20Z%20M822.040063,102.372314%20C822.443224,102.372314%20822.770031,102.699132%20822.770031,103.102283%20C822.770031,103.505445%20822.443224,103.832252%20822.040063,103.832252%20C821.636901,103.832252%20821.310094,103.505445%20821.310094,103.102283%20C821.310094,102.699132%20821.636901,102.372314%20822.040063,102.372314%20Z%20M814.740376,101.642346%20C815.143538,101.642346%20815.470345,101.969164%20815.470345,102.372314%20C815.470345,102.775465%20815.143538,103.102283%20814.740376,103.102283%20C814.337215,103.102283%20814.010408,102.775465%20814.010408,102.372314%20C814.010408,101.969164%20814.337215,101.642346%20814.740376,101.642346%20Z%20M818.755204,100.547393%20C819.158366,100.547393%20819.485173,100.874211%20819.485173,101.277361%20C819.485173,101.680512%20819.158366,102.00733%20818.755204,102.00733%20C818.352042,102.00733%20818.025235,101.680512%20818.025235,101.277361%20C818.025235,100.874211%20818.352042,100.547393%20818.755204,100.547393%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",S={class:"mix-component"},Z=["src"],k={DEFAULT_ICON:F,ACTIVE_ICON:I,NAME_CN:"天气",NAME_EN:"Weather",ORDER:4},E={transparent:{value:!1,type:"checkbox",label:"component.options.transparent"},bgColor:"#fff",textColor:{value:"#00B0F0",type:"color",label:"component.options.textColor",hideAlpha:!0},radiusSize:8,bgImg:{value:"",type:"image",label:"component.customized.bgImg"}},N={DEFAULT:k,OPTIONS:E,COMMON:{}},z=r.defineComponent(u(g({},N),{__name:"weather",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(C){const t=C;class n extends M.BaseComponent{extractStyles(){const{options:e}=this.props.conf,c=(a,h)=>a==null?h:typeof a=="object"&&"value"in a?a.value:a;return{bgColor:c(e==null?void 0:e.bgColor,"#fff"),textColor:c(e==null?void 0:e.textColor,"#00B0F0"),radiusSize:c(e==null?void 0:e.radiusSize,8),bgImg:c(e==null?void 0:e.bgImg,""),transparent:c(e==null?void 0:e.transparent,!1)}}}const i=new n(t,"weather");i.setupLifecycle();const l=i.getStyle(),m=o=>o?o.startsWith(f.FILE_URL)||o.startsWith("http")?o:f.FILE_URL+o:"",p=r.computed(()=>{var o,e;return((e=(o=l.value)==null?void 0:o.textColor)==null?void 0:e.replace("#",""))||"00B0F0"});return(o,e)=>(r.openBlock(),r.createElementBlock("div",S,[r.createElementVNode("div",{class:"weather-wrap",style:r.normalizeStyle({backgroundColor:r.unref(l).transparent?"transparent":r.unref(l).bgColor,borderRadius:`${r.unref(l).radiusSize}px`,backgroundImage:r.unref(l).bgImg?`url(${m(r.unref(l).bgImg)})`:""})},[r.createElementVNode("iframe",{width:"200",scrolling:"no",height:"60",frameborder:"0",allowtransparency:"true",src:`https://i.tianqi.com?c=code&id=12&color=%23${p.value}&icon=1&num=1&site=15&align=center`},null,8,Z)],4),r.renderSlot(o.$slots,"default",{},void 0,!0)]))}})),L=y._export_sfc(z,[["__scopeId","data-v-0eacb83f"]]);exports.default=L;
@@ -1 +1 @@
1
- "use strict";var Mn=Object.defineProperty,An=Object.defineProperties;var Nn=Object.getOwnPropertyDescriptors;var cn=Object.getOwnPropertySymbols;var Cn=Object.prototype.hasOwnProperty,Tn=Object.prototype.propertyIsEnumerable;var hn=(X,b,o)=>b in X?Mn(X,b,{enumerable:!0,configurable:!0,writable:!0,value:o}):X[b]=o,dn=(X,b)=>{for(var o in b||(b={}))Cn.call(b,o)&&hn(X,o,b[o]);if(cn)for(var o of cn(b))Tn.call(b,o)&&hn(X,o,b[o]);return X},mn=(X,b)=>An(X,Nn(b));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const K=require("vue"),Q=require("./element-resize-detector-BlMXyWIR.cjs"),In=require("./titleStyle-NSnz6cUg.cjs"),xn=require("./index-EnNA0nIi.cjs"),gn=require("./ele-aqi-icon-BMm9WgFH.cjs"),Pn=require("./install-DIlB2q7w.cjs"),on=require("./installCanvasRenderer-CyhM1Qpl.cjs"),zn=require("./install-C8buXQPI.cjs"),Ln=require("./install-CIT6k8Ga.cjs"),Rn=require("./install-z6wShIZI.cjs"),Fn=require("./install-CYwVETsi.cjs"),Un=require("./universalTransition-CIN_u2Cu.cjs"),pn=require("./echarts-BB8O2KSA.cjs");var k={exports:{}},On=k.exports,En;function Bn(){return En||(En=1,(function(X,b){(function(f,n){X.exports=n()})(On,function(){return(function(o){var f={};function n(t){if(f[t])return f[t].exports;var C=f[t]={exports:{},id:t,loaded:!1};return o[t].call(C.exports,C,C.exports,n),C.loaded=!0,C.exports}return n.m=o,n.c=f,n.p="",n(0)})([(function(o,f,n){var t;t=function(C){return{clustering:n(1),regression:n(5),statistics:n(6),histogram:n(15),transform:{regression:n(18),histogram:n(21),clustering:n(22)}}}.call(f,n,f,o),t!==void 0&&(o.exports=t)}),(function(o,f,n){var t;t=function(C){var m=n(2),A=m.dataPreprocess,E=m.normalizeDimensions,c=n(3),e=n(4),g=c.size,D=c.sumOfColumn,i=c.sum,y=c.zeros,e=n(4),l=e.isNumber,v=Math.pow,a={SINGLE:"single",MULTIPLE:"multiple"};function h(x,S,M){for(var z=y(x.length,2),P=d(S,R(x,M.dimensions)),N=!0,L,I,U,O;N;){N=!1;for(var T=0;T<x.length;T++){L=1/0,I=-1;for(var W=0;W<S;W++)U=p(x[T],P[W],M),U<L&&(L=U,I=W);z[T][0]!==I&&(N=!0),z[T][0]=I,z[T][1]=L}for(var T=0;T<S;T++){O=[];for(var W=0;W<z.length;W++)z[W][0]===T&&O.push(x[W]);P[T]=u(O,M)}}var w={centroids:P,clusterAssigned:z};return w}function u(x,S){for(var M=[],z,P,N=0;N<S.dimensions.length;N++){var L=S.dimensions[N];z=0;for(var I=0;I<x.length;I++)z+=x[I][L];P=z/x.length,M.push(P)}return M}function r(x,S,M){var z=(l(S)?{clusterCount:S,stepByStep:M}:S)||{clusterCount:2},P=z.clusterCount;if(P<2)return;var N=F(x,z),L=N.outputType===a.SINGLE,I=A(x,{dimensions:N.dimensions}),U=y(I.length,2),O,T,W;function w(V,J){U[V][1]=J}function q(V){return U[V][1]}if(L){O=[];var un=N.outputClusterIndexDimension;T=function(V,J){O[V][un]=J},W=function(V){return O[V][un]};for(var H=0;H<I.length;H++)O.push(I[H].slice()),w(H,0),T(H,0)}else T=function(V,J){U[V][0]=J},W=function(V){return U[V][0]};for(var ln=u(I,N),$=[ln],H=0;H<I.length;H++){var Sn=p(I[H],ln,N);w(H,Sn)}var _,nn,rn,j,en,tn,vn=1,G={data:O,centroids:$,isEnd:!1};L||(G.clusterAssment=U);function fn(){if(vn<P){_=1/0;for(var V,J,Z,Y=0;Y<$.length;Y++){nn=[],rn=[];for(var B=0;B<I.length;B++)W(B)===Y?nn.push(I[B]):rn.push(q(B));j=h(nn,2,N),en=D(j.clusterAssigned,1),tn=i(rn),en+tn<_&&(_=tn+en,V=Y,J=j.centroids,Z=j.clusterAssigned)}for(var B=0;B<Z.length;B++)Z[B][0]===0?Z[B][0]=V:Z[B][0]===1&&(Z[B][0]=$.length);$[V]=J[0],$.push(J[1]);for(var B=0,Y=0;B<I.length&&Y<Z.length;B++)W(B)===V&&(T(B,Z[Y][0]),w(B,Z[Y++][1]));var an=[];if(!L){for(var B=0;B<$.length;B++){an[B]=[];for(var Y=0;Y<I.length;Y++)W(Y)===B&&an[B].push(I[Y])}G.pointsInCluster=an}vn++}else G.isEnd=!0}if(z.stepByStep)G.next=function(){return fn(),s(G,N),G};else for(;fn(),!G.isEnd;);return s(G,N),G}function s(x,S){var M=S.outputCentroidDimensions;if(!(S.outputType!==a.SINGLE||M==null))for(var z=x.data,P=x.centroids,N=0;N<z.length;N++)for(var L=z[N],I=L[S.outputClusterIndexDimension],U=P[I],O=Math.min(U.length,M.length),T=0;T<O;T++)L[M[T]]=U[T]}function d(x,S){for(var M=y(x,S.length),z=0;z<S.length;z++)for(var P=S[z],N=0;N<x;N++)M[N][z]=P.min+P.span*Math.random();return M}function p(x,S,M){for(var z=0,P=M.dimensions,N=M.rawExtents,L=0;L<P.length;L++){var I=N[L].span;if(I){var U=P[L],O=(x[U]-S[L])/I;z+=v(O,2)}}return z}function F(x,S){var M=g(x);if(M.length<1)throw new Error("The input data of clustering should be two-dimension array.");for(var z=M[1],P=[],N=0;N<z;N++)P.push(N);var L=E(S.dimensions,P),I=S.outputType||a.MULTIPLE,U=S.outputClusterIndexDimension;if(I===a.SINGLE&&!e.isNumber(U))throw new Error("outputClusterIndexDimension is required as a number.");var O=R(x,L);return{dimensions:L,rawExtents:O,outputType:I,outputClusterIndexDimension:U,outputCentroidDimensions:S.outputCentroidDimensions}}function R(x,S){for(var M=[],z=S.length,P=0;P<z;P++)M.push({min:1/0,max:-1/0});for(var P=0;P<x.length;P++)for(var N=x[P],L=0;L<z;L++){var I=M[L],U=N[S[L]];I.min>U&&(I.min=U),I.max<U&&(I.max=U)}for(var P=0;P<z;P++)M[P].span=M[P].max-M[P].min;return M}return{OutputType:a,hierarchicalKMeans:r}}.call(f,n,f,o),t!==void 0&&(o.exports=t)}),(function(o,f,n){var t;t=function(C){var m=n(3),A=m.isArray,E=m.size,c=n(4),g=c.isNumber;function D(e,l){return typeof e=="number"?[e]:e==null?l:e}function i(e,l){l=l||{};var v=l.dimensions,a={};if(v!=null)for(var h=0;h<v.length;h++)a[v[h]]=!0;var u=l.toOneDimensionArray?v?v[0]:0:null;function r(x){return!v||a.hasOwnProperty(x)}if(!A(e))throw new Error("Invalid data type, you should input an array");var s=[],d=E(e);if(d.length===1)for(var h=0;h<d[0];h++){var p=e[h];g(p)&&s.push(p)}else if(d.length===2)for(var h=0;h<d[0];h++){for(var F=!0,p=e[h],R=0;R<d[1];R++)r(R)&&!g(p[R])&&(F=!1);F&&s.push(u!=null?p[u]:p)}return s}function y(e){var l=e.toString(),v=l.indexOf(".");return v<0?0:l.length-1-v}return{normalizeDimensions:D,dataPreprocess:i,getPrecision:y}}.call(f,n,f,o),t!==void 0&&(o.exports=t)}),(function(o,f,n){var t;t=function(C){var m=Object.prototype.toString,A=Array.prototype,E=A.map;function c(a){for(var h=[];g(a);)h.push(a.length),a=a[0];return h}function g(a){return m.call(a)==="[object Array]"}function D(a,h){for(var u=[],r=0;r<a;r++){u[r]=[];for(var s=0;s<h;s++)u[r][s]=0}return u}function i(a){for(var h=0,u=0;u<a.length;u++)h+=a[u];return h}function y(a,h){for(var u=0,r=0;r<a.length;r++)u+=a[r][h];return u}function e(a,h){return a>h?1:a<h?-1:a===h?0:NaN}function l(a,h,u,r){for(u==null&&(u=0),r==null&&(r=a.length);u<r;){var s=Math.floor((u+r)/2),d=e(a[s],h);if(d>0)r=s;else if(d<0)u=s+1;else return s+1}return u}function v(a,h,u){if(a&&h){if(a.map&&a.map===E)return a.map(h,u);for(var r=[],s=0,d=a.length;s<d;s++)r.push(h.call(u,a[s],s,a));return r}}return{size:c,isArray:g,zeros:D,sum:i,sumOfColumn:y,ascending:e,bisect:l,map:v}}.call(f,n,f,o),t!==void 0&&(o.exports=t)}),(function(o,f,n){var t;t=function(C){function m(c){return c=c===null?NaN:+c,typeof c=="number"&&!isNaN(c)}function A(c){return isFinite(c)&&c===Math.round(c)}function E(c){if(c===0)return 0;var g=Math.floor(Math.log(c)/Math.LN10);return c/Math.pow(10,g)>=10&&g++,g}return{isNumber:m,isInteger:A,quantityExponent:E}}.call(f,n,f,o),t!==void 0&&(o.exports=t)}),(function(o,f,n){var t;t=function(C){var m=n(2),A=m.dataPreprocess,E=m.normalizeDimensions,c={linear:function(i,y){for(var e=y.dimensions[0],l=y.dimensions[1],v=0,a=0,h=0,u=0,r=i.length,s=0;s<r;s++){var d=i[s];v+=d[e],a+=d[l],h+=d[e]*d[l],u+=d[e]*d[e]}for(var p=(r*h-v*a)/(r*u-v*v),F=a/r-p*v/r,R=[],x=0;x<i.length;x++){var d=i[x],S=d.slice();S[e]=d[e],S[l]=p*d[e]+F,R.push(S)}var M="y = "+Math.round(p*100)/100+"x + "+Math.round(F*100)/100;return{points:R,parameter:{gradient:p,intercept:F},expression:M}},linearThroughOrigin:function(i,y){for(var e=y.dimensions[0],l=y.dimensions[1],v=0,a=0,h=0;h<i.length;h++){var u=i[h];v+=u[e]*u[e],a+=u[e]*u[l]}for(var r=a/v,s=[],d=0;d<i.length;d++){var u=i[d],p=u.slice();p[e]=u[e],p[l]=u[e]*r,s.push(p)}var F="y = "+Math.round(r*100)/100+"x";return{points:s,parameter:{gradient:r},expression:F}},exponential:function(i,y){for(var e=y.dimensions[0],l=y.dimensions[1],v=0,a=0,h=0,u=0,r=0,s=0,d=0;d<i.length;d++){var p=i[d];v+=p[e],a+=p[l],s+=p[e]*p[l],h+=p[e]*p[e]*p[l],u+=p[l]*Math.log(p[l]),r+=p[e]*p[l]*Math.log(p[l])}for(var F=a*h-s*s,R=Math.pow(Math.E,(h*u-s*r)/F),x=(a*r-s*u)/F,S=[],M=0;M<i.length;M++){var p=i[M],z=p.slice();z[e]=p[e],z[l]=R*Math.pow(Math.E,x*p[e]),S.push(z)}var P="y = "+Math.round(R*100)/100+"e^("+Math.round(x*100)/100+"x)";return{points:S,parameter:{coefficient:R,index:x},expression:P}},logarithmic:function(i,y){for(var e=y.dimensions[0],l=y.dimensions[1],v=0,a=0,h=0,u=0,r=0;r<i.length;r++){var s=i[r];v+=Math.log(s[e]),a+=s[l]*Math.log(s[e]),h+=s[l],u+=Math.pow(Math.log(s[e]),2)}for(var d=(r*a-h*v)/(r*u-v*v),p=(h-d*v)/r,F=[],R=0;R<i.length;R++){var s=i[R],x=s.slice();x[e]=s[e],x[l]=d*Math.log(s[e])+p,F.push(x)}var S="y = "+Math.round(p*100)/100+" + "+Math.round(d*100)/100+"ln(x)";return{points:F,parameter:{gradient:d,intercept:p},expression:S}},polynomial:function(i,y){var e=y.dimensions[0],l=y.dimensions[1],v=y.order;v==null&&(v=2);for(var a=[],h=[],u=v+1,r=0;r<u;r++){for(var s=0,d=0;d<i.length;d++){var p=i[d];s+=p[l]*Math.pow(p[e],r)}h.push(s);for(var F=[],R=0;R<u;R++){for(var x=0,S=0;S<i.length;S++)x+=Math.pow(i[S][e],r+R);F.push(x)}a.push(F)}a.push(h);for(var M=g(a,u),z=[],r=0;r<i.length;r++){for(var P=0,p=i[r],d=0;d<M.length;d++)P+=M[d]*Math.pow(p[e],d);var N=p.slice();N[e]=p[e],N[l]=P,z.push(N)}for(var L="y = ",r=M.length-1;r>=0;r--)r>1?L+=Math.round(M[r]*Math.pow(10,r+1))/Math.pow(10,r+1)+"x^"+r+" + ":r===1?L+=Math.round(M[r]*100)/100+"x + ":L+=Math.round(M[r]*100)/100;return{points:z,parameter:M,expression:L}}};function g(i,y){for(var e=0;e<i.length-1;e++){for(var l=e,v=e+1;v<i.length-1;v++)Math.abs(i[e][v])>Math.abs(i[e][l])&&(l=v);for(var a=e;a<i.length;a++){var h=i[a][e];i[a][e]=i[a][l],i[a][l]=h}for(var u=e+1;u<i.length-1;u++)for(var r=i.length-1;r>=e;r--)i[r][u]-=i[r][e]/i[e][e]*i[e][u]}for(var s=new Array(y),d=i.length-1,v=i.length-2;v>=0;v--){for(var h=0,e=v+1;e<i.length-1;e++)h+=i[e][v]*s[e];s[v]=(i[d][v]-h)/i[v][v]}return s}var D=function(i,y,e){var l=typeof e=="number"?{order:e}:e||{},v=E(l.dimensions,[0,1]),a=A(y,{dimensions:v}),h=c[i](a,{order:l.order,dimensions:v}),u=v[0];return h.points.sort(function(r,s){return r[u]-s[u]}),h};return D}.call(f,n,f,o),t!==void 0&&(o.exports=t)}),(function(o,f,n){var t;t=function(C){var m={};return m.max=n(7),m.deviation=n(8),m.mean=n(10),m.median=n(12),m.min=n(14),m.quantile=n(13),m.sampleVariance=n(9),m.sum=n(11),m}.call(f,n,f,o),t!==void 0&&(o.exports=t)}),(function(o,f,n){var t;t=function(C){var m=n(4),A=m.isNumber;function E(c){for(var g=-1/0,D=0;D<c.length;D++)A(c[D])&&c[D]>g&&(g=c[D]);return g}return E}.call(f,n,f,o),t!==void 0&&(o.exports=t)}),(function(o,f,n){var t;t=function(C){var m=n(9);return function(A){var E=m(A);return E&&Math.sqrt(E)}}.call(f,n,f,o),t!==void 0&&(o.exports=t)}),(function(o,f,n){var t;t=function(C){var m=n(4),A=m.isNumber,E=n(10);function c(g){var D=g.length;if(!D||D<2)return 0;if(g.length>=2){for(var i=E(g),y=0,e,l=0;l<g.length;l++)A(g[l])&&(e=g[l]-i,y+=e*e);return y/(g.length-1)}}return c}.call(f,n,f,o),t!==void 0&&(o.exports=t)}),(function(o,f,n){var t;t=function(C){var m=n(11);function A(E){var c=E.length;return c?m(E)/E.length:0}return A}.call(f,n,f,o),t!==void 0&&(o.exports=t)}),(function(o,f,n){var t;t=function(C){var m=n(4),A=m.isNumber;function E(c){var g=c.length;if(!g)return 0;for(var D=0,i=0;i<g;i++)A(c[i])&&(D+=c[i]);return D}return E}.call(f,n,f,o),t!==void 0&&(o.exports=t)}),(function(o,f,n){var t;t=function(C){var m=n(13);function A(E){return m(E,.5)}return A}.call(f,n,f,o),t!==void 0&&(o.exports=t)}),(function(o,f,n){var t;t=function(C){return function(m,A){var E=m.length;if(!E)return 0;if(A<=0||E<2)return m[0];if(A>=1)return m[E-1];var c=(E-1)*A,g=Math.floor(c),D=m[g],i=m[g+1];return D+(i-D)*(c-g)}}.call(f,n,f,o),t!==void 0&&(o.exports=t)}),(function(o,f,n){var t;t=function(C){var m=n(4),A=m.isNumber;function E(c){for(var g=1/0,D=0;D<c.length;D++)A(c[D])&&c[D]<g&&(g=c[D]);return g}return E}.call(f,n,f,o),t!==void 0&&(o.exports=t)}),(function(o,f,n){var t;t=function(C){var m=n(7),A=n(14),E=n(13),c=n(8),g=n(2),D=g.dataPreprocess,i=g.normalizeDimensions,y=n(3),e=y.ascending,l=y.map,v=n(16),a=y.bisect,h=n(17);function u(W,d){for(var p=typeof d=="string"?{method:d}:d||{},F=p.method==null?r.squareRoot:r[p.method],R=i(p.dimensions),x=D(W,{dimensions:R,toOneDimensionArray:!0}),S=m(x),M=A(x),z=F(x,M,S),P=h(M,S,z),N=P.step,L=P.toFixedPrecision,I=v(+(Math.ceil(M/N)*N).toFixed(L),+(Math.floor(S/N)*N).toFixed(L),N,L),U=I.length,O=new Array(U+1),T=0;T<=U;T++)O[T]={},O[T].sample=[],O[T].x0=T>0?I[T-1]:I[T]-M===N?M:I[T]-N,O[T].x1=T<U?I[T]:S-I[T-1]===N?S:I[T-1]+N;for(var T=0;T<x.length;T++)M<=x[T]&&x[T]<=S&&O[a(I,x[T],0,U)].sample.push(x[T]);var W=l(O,function(q){return[+((q.x0+q.x1)/2).toFixed(L),q.sample.length,q.x0,q.x1,q.x0+" - "+q.x1]}),w=l(O,function(q){return[q.x0,q.x1,q.sample.length]});return{bins:O,data:W,customData:w}}var r={squareRoot:function(s){var d=Math.ceil(Math.sqrt(s.length));return d>50?50:d},scott:function(s,d,p){return Math.ceil((p-d)/(3.5*c(s)*Math.pow(s.length,-1/3)))},freedmanDiaconis:function(s,d,p){return s.sort(e),Math.ceil((p-d)/(2*(E(s,.75)-E(s,.25))*Math.pow(s.length,-1/3)))},sturges:function(s){return Math.ceil(Math.log(s.length)/Math.LN2)+1}};return u}.call(f,n,f,o),t!==void 0&&(o.exports=t)}),(function(o,f,n){var t;t=function(C){var m=n(2),A=m.getPrecision;return function(E,c,g,D){var i=arguments.length;i<2?(c=E,E=0,g=1):i<3?g=1:i<4?(g=+g,D=A(g)):D=+D;for(var y=Math.ceil(((c-E)/g).toFixed(D)),e=new Array(y+1),l=0;l<y+1;l++)e[l]=+(E+l*g).toFixed(D);return e}}.call(f,n,f,o),t!==void 0&&(o.exports=t)}),(function(o,f,n){var t;t=function(C){var m=n(4);return function(A,E,c){var g=Math.abs(E-A)/c,D=m.quantityExponent(g),i=Math.pow(10,D),y=g/i;y>=Math.sqrt(50)?i*=10:y>=Math.sqrt(10)?i*=5:y>=Math.sqrt(2)&&(i*=2);var e=D<0?-D:0,l=+(E>=A?i:-i).toFixed(e);return{step:l,toFixedPrecision:e}}}.call(f,n,f,o),t!==void 0&&(o.exports=t)}),(function(o,f,n){var t;t=function(C){var m=n(5),A=n(19),E=2;return{type:"ecStat:regression",transform:function(g){var D=g.upstream,i=g.config||{},y=i.method||"linear",e=m(y,D.cloneRawData(),{order:i.order,dimensions:A.normalizeExistingDimensions(g,i.dimensions)}),l=e.points,v=i.formulaOn;v==null&&(v="end");var a;if(v!=="none"){for(var h=0;h<l.length;h++)l[h][E]=v==="start"&&h===0||v==="all"||v==="end"&&h===l.length-1?e.expression:"";a=D.cloneAllDimensionInfo(),a[E]={}}return[{dimensions:a,data:l}]}}}.call(f,n,f,o),t!==void 0&&(o.exports=t)}),(function(o,f,n){var t;t=function(C){var m=n(3),A=n(4),E=n(20);function c(D,i){if(i==null)return;var y=D.upstream;if(m.isArray(i)){for(var e=[],l=0;l<i.length;l++){var v=y.getDimensionInfo(i[l]);a(v,i[l]),e[l]=v.index}return e}else{var v=y.getDimensionInfo(i);return a(v,i),v.index}function a(h,u){if(!h)throw new Error("Can not find dimension by "+u)}}function g(D){if(m.isArray(D)){for(var i=[],y=[],e=0;e<D.length;e++){var l=v(D[e]);i.push(l.name),y.push(l.index)}return{name:i,index:y}}else if(D!=null)return v(D);function v(a){if(A.isNumber(a))return{index:a};if(E.isObject(a)&&A.isNumber(a.index))return a;throw new Error("Illegle new dimensions config. Expect `{ name: string, index: number }`.")}}return{normalizeExistingDimensions:c,normalizeNewDimensions:g}}.call(f,n,f,o),t!==void 0&&(o.exports=t)}),(function(o,f,n){var t;t=function(C){function m(E,c){if(Object.assign)Object.assign(E,c);else for(var g in c)c.hasOwnProperty(g)&&(E[g]=c[g]);return E}function A(E){const c=typeof E;return c==="function"||!!E&&c==="object"}return{extend:m,isObject:A}}.call(f,n,f,o),t!==void 0&&(o.exports=t)}),(function(o,f,n){var t;t=function(C){var m=n(15),A=n(19);return{type:"ecStat:histogram",transform:function(c){var g=c.upstream,D=c.config||{},i=m(g.cloneRawData(),{method:D.method,dimensions:A.normalizeExistingDimensions(c,D.dimensions)});return[{dimensions:["MeanOfV0V1","VCount","V0","V1","DisplayableName"],data:i.data},{data:i.customData}]}}}.call(f,n,f,o),t!==void 0&&(o.exports=t)}),(function(o,f,n){var t;t=function(C){var m=n(1),A=n(4),E=n(19),c=A.isNumber;return{type:"ecStat:clustering",transform:function(D){var i=D.upstream,y=D.config||{},e=y.clusterCount;if(!c(e)||e<=0)throw new Error('config param "clusterCount" need to be specified as an interger greater than 1.');if(e===1)return[{},{data:[]}];var l=E.normalizeNewDimensions(y.outputClusterIndexDimension),v=E.normalizeNewDimensions(y.outputCentroidDimensions);if(l==null)throw new Error("outputClusterIndexDimension is required as a number.");for(var a=m.hierarchicalKMeans(i.cloneRawData(),{clusterCount:e,stepByStep:!1,dimensions:E.normalizeExistingDimensions(D,y.dimensions),outputType:m.OutputType.SINGLE,outputClusterIndexDimension:l.index,outputCentroidDimensions:(v||{}).index}),h=i.cloneAllDimensionInfo(),u=[],r=0;r<h.length;r++){var s=h[r];u.push(s.name)}if(u[l.index]=l.name,v)for(var r=0;r<v.index.length;r++)v.name[r]!=null&&(u[v.index[r]]=v.name[r]);return[{dimensions:u,data:a.data},{data:a.centroids}]}}}.call(f,n,f,o),t!==void 0&&(o.exports=t)})])})})(k)),k.exports}var sn,Dn;function Kn(){return Dn||(Dn=1,sn=Bn()),sn}var Wn=Kn();const bn=xn.getDefaultExportFromCjs(Wn),Vn={DEFAULT_ICON:gn.DEFAULT_ICON,ACTIVE_ICON:gn.ACTIVE_ICON,NAME_CN:"风向图",NAME_EN:"Wind Line",ORDER:5},Xn={titleColor:"#111",bgColor:"#fff",textColor:"#111",lineColor:"#314656",top:30,bottom:40,left:20,right:20,radiusSize:8,textSize:12,points:30,isHideTitle:!1,isSmooth:!1},yn=[{name:"参数一",项目编号:"",object_id:""}],qn=["name","项目编号"],Yn=["index","deviation","stability","balance","increment","risk"],Hn=1,Gn={useAlias:!1,null:{type:"0",value:""},multiObject:!1,hideMultiObject:!0,source:"index"},Jn={DEFAULT:Vn,OPTIONS:Xn,DATA:yn,PARAMS:qn,SOURCE:Yn,ITEMS:Hn,COMMON:Gn},Zn=K.defineComponent(mn(dn({},Jn),{__name:"windLin",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(X){on.use([on.install,zn.install,Ln.install,Rn.install,Fn.install,Pn.install,on.install$1,Un.installUniversalTransition]);const b=K.ref(K.inject("session",null)),{proxy:o}=K.getCurrentInstance(),f="windlin_"+Math.random().toString(16).substring(4,12);let n=null,t=null;const C=X;let m=[];class A extends Q.BaseComponent{extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),titleColor:this.getOptionValue("titleColor","#111"),textColor:this.getOptionValue("textColor","#111"),lineColor:this.getOptionValue("lineColor","#314656"),radiusSize:this.getOptionValue("radiusSize",4),textSize:this.getOptionValue("textSize",12),isHideTitle:this.getOptionValue("isHideTitle",!1),isSmooth:this.getOptionValue("isSmooth",!1)}}init(){super.init(),this.props.conf.data=this.props.conf.data.length?this.props.conf.data:yn,C.mode==="edit"&&i(),K.nextTick(()=>{let r=document.querySelector("#"+f);r&&(n||(n=pn.init(r),t=Q.elementResizeDetectorMaker({strategy:"scroll"}),t.listenTo(r,()=>n==null?void 0:n.resize())),n.setOption(D(),!0))})}onPreview(){a.preview()}cleanup(){t&&t.uninstall(document.querySelector("#"+f)),n&&n.clear(),n&&pn.dispose(n),n=null,a.unregister()}}const E=new A(C,"windLin");E.setupLifecycle();const c=E.getStyle(),g=K.computed(()=>In.generateTitleStyle(C.conf.options)),D=()=>{var d,p,F,R;const{data:u,options:r}=C.conf;let s=u[0]||{};return{tooltip:{trigger:"axis",formatter:function(x){return[x[0].value[0],`${s==null?void 0:s.name}: `+x[0].value[1],`${o.$t("setting.gradient")}: `+x[0].value[2]].join("<br>")}},grid:{top:((d=r==null?void 0:r.top)==null?void 0:d.value)||30,bottom:((p=r==null?void 0:r.bottom)==null?void 0:p.value)||40,left:((F=r==null?void 0:r.left)==null?void 0:F.value)||20,right:((R=r==null?void 0:r.right)==null?void 0:R.value)||20,containLabel:!0},xAxis:{type:"time",splitLine:{lineStyle:{color:"#ddd"}}},yAxis:[{axisLine:{lineStyle:{color:"#666"}},splitNumber:4}],visualMap:{type:"piecewise",show:!1,orient:"horizontal",left:"center",bottom:10,pieces:[{lt:0,color:"#18BF12"},{gte:0,lte:0,color:"#f4e9a3"},{gte:0,color:"#D33C3E"}],seriesIndex:1,dimension:2},dataZoom:[{type:"slider",xAxisIndex:0,start:80,end:100,height:15,bottom:15},{type:"inside"}],series:[{type:"line",yAxisIndex:0,showSymbol:!1,emphasis:{scale:!1},symbolSize:10,areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,global:!1,colorStops:[{offset:0,color:c.value.lineColor},{offset:1,color:c.value.lineColor+"00"}]}},lineStyle:{color:c.value.lineColor},itemStyle:{color:c.value.lineColor},encode:{x:0},data:m,z:2,smooth:c.value.isSmooth},{type:"custom",renderItem:e,data:m,z:10}]}},i=()=>{var F,R;const u=Q.hasDataSource(C.conf);m=[];let r=[];const{options:s}=C.conf;let d=(R=(F=s==null?void 0:s.points)==null?void 0:F.value)!=null?R:30,p=Q.getxAxisDataTime(d,C.mode,u);for(let x=0;x<d;x++){let S=Math.floor(Math.random()*200);r.push([p[x],S])}m=y(r)},y=u=>u.map((r,s)=>{var d;if(s===u.length-1)r[2]=0;else{let p=bn.regression("linear",[[s+1,r[1]],[s+2,u[s+1][1]]],0);r[2]=Math.atan(((d=p.parameter)==null?void 0:d.gradient)||0).toFixed(4)}return r}),e=(u,r)=>{const s=r.coord([r.value(0),0]),d=16;return{type:"path",shape:{pathData:"M31 16l-15-15v9h-26v12h26v9z",x:-d/2,y:-d/2,width:d,height:d},rotation:r.value(2),position:s,style:r.style({stroke:"#555",lineWidth:1})}},l=u=>{if(!Q.hasDataSource(C.conf))return;const{data:r}=C.conf;let s=Q.handleNullData(u,C,"history");if(!s.history.length)return;let d=s.history[0],p=[];d.forEach(F=>{let R=F[r[0].fv]||0;p.push([F.time,R])}),m=y(p),n==null||n.setOption(D())},v=u=>{Q.hasDataSource(C.conf)},a={preview:()=>Q.preview(C,b.value,l,v,"windLin"),unregister:()=>Q.unregister(C,b.value)};K.watchEffect(()=>{C.conf.socketData&&v(C.conf.socketData)});const h=C.conf;return(u,r)=>(K.openBlock(),K.createElementBlock("div",{class:"mix-component",style:K.normalizeStyle({background:K.unref(c).bgColor,borderRadius:`${K.unref(c).radiusSize}px`})},[K.createElementVNode("div",{class:"mix-title",style:K.normalizeStyle(g.value)},K.toDisplayString(K.unref(h).caption||K.unref(h).name),5),K.createElementVNode("div",{class:"mix-body"},[K.createElementVNode("div",{class:"w-full h-full",id:f})]),K.renderSlot(u.$slots,"default",{},void 0,!0)],4))}})),Qn=xn._export_sfc(Zn,[["__scopeId","data-v-a9a859ce"]]);exports.default=Qn;
1
+ "use strict";var Mn=Object.defineProperty,An=Object.defineProperties;var Nn=Object.getOwnPropertyDescriptors;var cn=Object.getOwnPropertySymbols;var Cn=Object.prototype.hasOwnProperty,Tn=Object.prototype.propertyIsEnumerable;var hn=(X,b,o)=>b in X?Mn(X,b,{enumerable:!0,configurable:!0,writable:!0,value:o}):X[b]=o,dn=(X,b)=>{for(var o in b||(b={}))Cn.call(b,o)&&hn(X,o,b[o]);if(cn)for(var o of cn(b))Tn.call(b,o)&&hn(X,o,b[o]);return X},mn=(X,b)=>An(X,Nn(b));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const K=require("vue"),Q=require("./element-resize-detector-BNZCpkPn.cjs"),In=require("./titleStyle-NSnz6cUg.cjs"),xn=require("./index-LSCs4x8x.cjs"),gn=require("./ele-aqi-icon-BMm9WgFH.cjs"),Pn=require("./install-DIlB2q7w.cjs"),on=require("./installCanvasRenderer-CyhM1Qpl.cjs"),zn=require("./install-C8buXQPI.cjs"),Ln=require("./install-CIT6k8Ga.cjs"),Rn=require("./install-z6wShIZI.cjs"),Fn=require("./install-CYwVETsi.cjs"),Un=require("./universalTransition-CIN_u2Cu.cjs"),pn=require("./echarts-BB8O2KSA.cjs");var k={exports:{}},On=k.exports,En;function Bn(){return En||(En=1,(function(X,b){(function(f,n){X.exports=n()})(On,function(){return(function(o){var f={};function n(t){if(f[t])return f[t].exports;var C=f[t]={exports:{},id:t,loaded:!1};return o[t].call(C.exports,C,C.exports,n),C.loaded=!0,C.exports}return n.m=o,n.c=f,n.p="",n(0)})([(function(o,f,n){var t;t=function(C){return{clustering:n(1),regression:n(5),statistics:n(6),histogram:n(15),transform:{regression:n(18),histogram:n(21),clustering:n(22)}}}.call(f,n,f,o),t!==void 0&&(o.exports=t)}),(function(o,f,n){var t;t=function(C){var m=n(2),A=m.dataPreprocess,E=m.normalizeDimensions,c=n(3),e=n(4),g=c.size,D=c.sumOfColumn,i=c.sum,y=c.zeros,e=n(4),l=e.isNumber,v=Math.pow,a={SINGLE:"single",MULTIPLE:"multiple"};function h(x,S,M){for(var z=y(x.length,2),P=d(S,R(x,M.dimensions)),N=!0,L,I,U,O;N;){N=!1;for(var T=0;T<x.length;T++){L=1/0,I=-1;for(var W=0;W<S;W++)U=p(x[T],P[W],M),U<L&&(L=U,I=W);z[T][0]!==I&&(N=!0),z[T][0]=I,z[T][1]=L}for(var T=0;T<S;T++){O=[];for(var W=0;W<z.length;W++)z[W][0]===T&&O.push(x[W]);P[T]=u(O,M)}}var w={centroids:P,clusterAssigned:z};return w}function u(x,S){for(var M=[],z,P,N=0;N<S.dimensions.length;N++){var L=S.dimensions[N];z=0;for(var I=0;I<x.length;I++)z+=x[I][L];P=z/x.length,M.push(P)}return M}function r(x,S,M){var z=(l(S)?{clusterCount:S,stepByStep:M}:S)||{clusterCount:2},P=z.clusterCount;if(P<2)return;var N=F(x,z),L=N.outputType===a.SINGLE,I=A(x,{dimensions:N.dimensions}),U=y(I.length,2),O,T,W;function w(V,J){U[V][1]=J}function q(V){return U[V][1]}if(L){O=[];var un=N.outputClusterIndexDimension;T=function(V,J){O[V][un]=J},W=function(V){return O[V][un]};for(var H=0;H<I.length;H++)O.push(I[H].slice()),w(H,0),T(H,0)}else T=function(V,J){U[V][0]=J},W=function(V){return U[V][0]};for(var ln=u(I,N),$=[ln],H=0;H<I.length;H++){var Sn=p(I[H],ln,N);w(H,Sn)}var _,nn,rn,j,en,tn,vn=1,G={data:O,centroids:$,isEnd:!1};L||(G.clusterAssment=U);function fn(){if(vn<P){_=1/0;for(var V,J,Z,Y=0;Y<$.length;Y++){nn=[],rn=[];for(var B=0;B<I.length;B++)W(B)===Y?nn.push(I[B]):rn.push(q(B));j=h(nn,2,N),en=D(j.clusterAssigned,1),tn=i(rn),en+tn<_&&(_=tn+en,V=Y,J=j.centroids,Z=j.clusterAssigned)}for(var B=0;B<Z.length;B++)Z[B][0]===0?Z[B][0]=V:Z[B][0]===1&&(Z[B][0]=$.length);$[V]=J[0],$.push(J[1]);for(var B=0,Y=0;B<I.length&&Y<Z.length;B++)W(B)===V&&(T(B,Z[Y][0]),w(B,Z[Y++][1]));var an=[];if(!L){for(var B=0;B<$.length;B++){an[B]=[];for(var Y=0;Y<I.length;Y++)W(Y)===B&&an[B].push(I[Y])}G.pointsInCluster=an}vn++}else G.isEnd=!0}if(z.stepByStep)G.next=function(){return fn(),s(G,N),G};else for(;fn(),!G.isEnd;);return s(G,N),G}function s(x,S){var M=S.outputCentroidDimensions;if(!(S.outputType!==a.SINGLE||M==null))for(var z=x.data,P=x.centroids,N=0;N<z.length;N++)for(var L=z[N],I=L[S.outputClusterIndexDimension],U=P[I],O=Math.min(U.length,M.length),T=0;T<O;T++)L[M[T]]=U[T]}function d(x,S){for(var M=y(x,S.length),z=0;z<S.length;z++)for(var P=S[z],N=0;N<x;N++)M[N][z]=P.min+P.span*Math.random();return M}function p(x,S,M){for(var z=0,P=M.dimensions,N=M.rawExtents,L=0;L<P.length;L++){var I=N[L].span;if(I){var U=P[L],O=(x[U]-S[L])/I;z+=v(O,2)}}return z}function F(x,S){var M=g(x);if(M.length<1)throw new Error("The input data of clustering should be two-dimension array.");for(var z=M[1],P=[],N=0;N<z;N++)P.push(N);var L=E(S.dimensions,P),I=S.outputType||a.MULTIPLE,U=S.outputClusterIndexDimension;if(I===a.SINGLE&&!e.isNumber(U))throw new Error("outputClusterIndexDimension is required as a number.");var O=R(x,L);return{dimensions:L,rawExtents:O,outputType:I,outputClusterIndexDimension:U,outputCentroidDimensions:S.outputCentroidDimensions}}function R(x,S){for(var M=[],z=S.length,P=0;P<z;P++)M.push({min:1/0,max:-1/0});for(var P=0;P<x.length;P++)for(var N=x[P],L=0;L<z;L++){var I=M[L],U=N[S[L]];I.min>U&&(I.min=U),I.max<U&&(I.max=U)}for(var P=0;P<z;P++)M[P].span=M[P].max-M[P].min;return M}return{OutputType:a,hierarchicalKMeans:r}}.call(f,n,f,o),t!==void 0&&(o.exports=t)}),(function(o,f,n){var t;t=function(C){var m=n(3),A=m.isArray,E=m.size,c=n(4),g=c.isNumber;function D(e,l){return typeof e=="number"?[e]:e==null?l:e}function i(e,l){l=l||{};var v=l.dimensions,a={};if(v!=null)for(var h=0;h<v.length;h++)a[v[h]]=!0;var u=l.toOneDimensionArray?v?v[0]:0:null;function r(x){return!v||a.hasOwnProperty(x)}if(!A(e))throw new Error("Invalid data type, you should input an array");var s=[],d=E(e);if(d.length===1)for(var h=0;h<d[0];h++){var p=e[h];g(p)&&s.push(p)}else if(d.length===2)for(var h=0;h<d[0];h++){for(var F=!0,p=e[h],R=0;R<d[1];R++)r(R)&&!g(p[R])&&(F=!1);F&&s.push(u!=null?p[u]:p)}return s}function y(e){var l=e.toString(),v=l.indexOf(".");return v<0?0:l.length-1-v}return{normalizeDimensions:D,dataPreprocess:i,getPrecision:y}}.call(f,n,f,o),t!==void 0&&(o.exports=t)}),(function(o,f,n){var t;t=function(C){var m=Object.prototype.toString,A=Array.prototype,E=A.map;function c(a){for(var h=[];g(a);)h.push(a.length),a=a[0];return h}function g(a){return m.call(a)==="[object Array]"}function D(a,h){for(var u=[],r=0;r<a;r++){u[r]=[];for(var s=0;s<h;s++)u[r][s]=0}return u}function i(a){for(var h=0,u=0;u<a.length;u++)h+=a[u];return h}function y(a,h){for(var u=0,r=0;r<a.length;r++)u+=a[r][h];return u}function e(a,h){return a>h?1:a<h?-1:a===h?0:NaN}function l(a,h,u,r){for(u==null&&(u=0),r==null&&(r=a.length);u<r;){var s=Math.floor((u+r)/2),d=e(a[s],h);if(d>0)r=s;else if(d<0)u=s+1;else return s+1}return u}function v(a,h,u){if(a&&h){if(a.map&&a.map===E)return a.map(h,u);for(var r=[],s=0,d=a.length;s<d;s++)r.push(h.call(u,a[s],s,a));return r}}return{size:c,isArray:g,zeros:D,sum:i,sumOfColumn:y,ascending:e,bisect:l,map:v}}.call(f,n,f,o),t!==void 0&&(o.exports=t)}),(function(o,f,n){var t;t=function(C){function m(c){return c=c===null?NaN:+c,typeof c=="number"&&!isNaN(c)}function A(c){return isFinite(c)&&c===Math.round(c)}function E(c){if(c===0)return 0;var g=Math.floor(Math.log(c)/Math.LN10);return c/Math.pow(10,g)>=10&&g++,g}return{isNumber:m,isInteger:A,quantityExponent:E}}.call(f,n,f,o),t!==void 0&&(o.exports=t)}),(function(o,f,n){var t;t=function(C){var m=n(2),A=m.dataPreprocess,E=m.normalizeDimensions,c={linear:function(i,y){for(var e=y.dimensions[0],l=y.dimensions[1],v=0,a=0,h=0,u=0,r=i.length,s=0;s<r;s++){var d=i[s];v+=d[e],a+=d[l],h+=d[e]*d[l],u+=d[e]*d[e]}for(var p=(r*h-v*a)/(r*u-v*v),F=a/r-p*v/r,R=[],x=0;x<i.length;x++){var d=i[x],S=d.slice();S[e]=d[e],S[l]=p*d[e]+F,R.push(S)}var M="y = "+Math.round(p*100)/100+"x + "+Math.round(F*100)/100;return{points:R,parameter:{gradient:p,intercept:F},expression:M}},linearThroughOrigin:function(i,y){for(var e=y.dimensions[0],l=y.dimensions[1],v=0,a=0,h=0;h<i.length;h++){var u=i[h];v+=u[e]*u[e],a+=u[e]*u[l]}for(var r=a/v,s=[],d=0;d<i.length;d++){var u=i[d],p=u.slice();p[e]=u[e],p[l]=u[e]*r,s.push(p)}var F="y = "+Math.round(r*100)/100+"x";return{points:s,parameter:{gradient:r},expression:F}},exponential:function(i,y){for(var e=y.dimensions[0],l=y.dimensions[1],v=0,a=0,h=0,u=0,r=0,s=0,d=0;d<i.length;d++){var p=i[d];v+=p[e],a+=p[l],s+=p[e]*p[l],h+=p[e]*p[e]*p[l],u+=p[l]*Math.log(p[l]),r+=p[e]*p[l]*Math.log(p[l])}for(var F=a*h-s*s,R=Math.pow(Math.E,(h*u-s*r)/F),x=(a*r-s*u)/F,S=[],M=0;M<i.length;M++){var p=i[M],z=p.slice();z[e]=p[e],z[l]=R*Math.pow(Math.E,x*p[e]),S.push(z)}var P="y = "+Math.round(R*100)/100+"e^("+Math.round(x*100)/100+"x)";return{points:S,parameter:{coefficient:R,index:x},expression:P}},logarithmic:function(i,y){for(var e=y.dimensions[0],l=y.dimensions[1],v=0,a=0,h=0,u=0,r=0;r<i.length;r++){var s=i[r];v+=Math.log(s[e]),a+=s[l]*Math.log(s[e]),h+=s[l],u+=Math.pow(Math.log(s[e]),2)}for(var d=(r*a-h*v)/(r*u-v*v),p=(h-d*v)/r,F=[],R=0;R<i.length;R++){var s=i[R],x=s.slice();x[e]=s[e],x[l]=d*Math.log(s[e])+p,F.push(x)}var S="y = "+Math.round(p*100)/100+" + "+Math.round(d*100)/100+"ln(x)";return{points:F,parameter:{gradient:d,intercept:p},expression:S}},polynomial:function(i,y){var e=y.dimensions[0],l=y.dimensions[1],v=y.order;v==null&&(v=2);for(var a=[],h=[],u=v+1,r=0;r<u;r++){for(var s=0,d=0;d<i.length;d++){var p=i[d];s+=p[l]*Math.pow(p[e],r)}h.push(s);for(var F=[],R=0;R<u;R++){for(var x=0,S=0;S<i.length;S++)x+=Math.pow(i[S][e],r+R);F.push(x)}a.push(F)}a.push(h);for(var M=g(a,u),z=[],r=0;r<i.length;r++){for(var P=0,p=i[r],d=0;d<M.length;d++)P+=M[d]*Math.pow(p[e],d);var N=p.slice();N[e]=p[e],N[l]=P,z.push(N)}for(var L="y = ",r=M.length-1;r>=0;r--)r>1?L+=Math.round(M[r]*Math.pow(10,r+1))/Math.pow(10,r+1)+"x^"+r+" + ":r===1?L+=Math.round(M[r]*100)/100+"x + ":L+=Math.round(M[r]*100)/100;return{points:z,parameter:M,expression:L}}};function g(i,y){for(var e=0;e<i.length-1;e++){for(var l=e,v=e+1;v<i.length-1;v++)Math.abs(i[e][v])>Math.abs(i[e][l])&&(l=v);for(var a=e;a<i.length;a++){var h=i[a][e];i[a][e]=i[a][l],i[a][l]=h}for(var u=e+1;u<i.length-1;u++)for(var r=i.length-1;r>=e;r--)i[r][u]-=i[r][e]/i[e][e]*i[e][u]}for(var s=new Array(y),d=i.length-1,v=i.length-2;v>=0;v--){for(var h=0,e=v+1;e<i.length-1;e++)h+=i[e][v]*s[e];s[v]=(i[d][v]-h)/i[v][v]}return s}var D=function(i,y,e){var l=typeof e=="number"?{order:e}:e||{},v=E(l.dimensions,[0,1]),a=A(y,{dimensions:v}),h=c[i](a,{order:l.order,dimensions:v}),u=v[0];return h.points.sort(function(r,s){return r[u]-s[u]}),h};return D}.call(f,n,f,o),t!==void 0&&(o.exports=t)}),(function(o,f,n){var t;t=function(C){var m={};return m.max=n(7),m.deviation=n(8),m.mean=n(10),m.median=n(12),m.min=n(14),m.quantile=n(13),m.sampleVariance=n(9),m.sum=n(11),m}.call(f,n,f,o),t!==void 0&&(o.exports=t)}),(function(o,f,n){var t;t=function(C){var m=n(4),A=m.isNumber;function E(c){for(var g=-1/0,D=0;D<c.length;D++)A(c[D])&&c[D]>g&&(g=c[D]);return g}return E}.call(f,n,f,o),t!==void 0&&(o.exports=t)}),(function(o,f,n){var t;t=function(C){var m=n(9);return function(A){var E=m(A);return E&&Math.sqrt(E)}}.call(f,n,f,o),t!==void 0&&(o.exports=t)}),(function(o,f,n){var t;t=function(C){var m=n(4),A=m.isNumber,E=n(10);function c(g){var D=g.length;if(!D||D<2)return 0;if(g.length>=2){for(var i=E(g),y=0,e,l=0;l<g.length;l++)A(g[l])&&(e=g[l]-i,y+=e*e);return y/(g.length-1)}}return c}.call(f,n,f,o),t!==void 0&&(o.exports=t)}),(function(o,f,n){var t;t=function(C){var m=n(11);function A(E){var c=E.length;return c?m(E)/E.length:0}return A}.call(f,n,f,o),t!==void 0&&(o.exports=t)}),(function(o,f,n){var t;t=function(C){var m=n(4),A=m.isNumber;function E(c){var g=c.length;if(!g)return 0;for(var D=0,i=0;i<g;i++)A(c[i])&&(D+=c[i]);return D}return E}.call(f,n,f,o),t!==void 0&&(o.exports=t)}),(function(o,f,n){var t;t=function(C){var m=n(13);function A(E){return m(E,.5)}return A}.call(f,n,f,o),t!==void 0&&(o.exports=t)}),(function(o,f,n){var t;t=function(C){return function(m,A){var E=m.length;if(!E)return 0;if(A<=0||E<2)return m[0];if(A>=1)return m[E-1];var c=(E-1)*A,g=Math.floor(c),D=m[g],i=m[g+1];return D+(i-D)*(c-g)}}.call(f,n,f,o),t!==void 0&&(o.exports=t)}),(function(o,f,n){var t;t=function(C){var m=n(4),A=m.isNumber;function E(c){for(var g=1/0,D=0;D<c.length;D++)A(c[D])&&c[D]<g&&(g=c[D]);return g}return E}.call(f,n,f,o),t!==void 0&&(o.exports=t)}),(function(o,f,n){var t;t=function(C){var m=n(7),A=n(14),E=n(13),c=n(8),g=n(2),D=g.dataPreprocess,i=g.normalizeDimensions,y=n(3),e=y.ascending,l=y.map,v=n(16),a=y.bisect,h=n(17);function u(W,d){for(var p=typeof d=="string"?{method:d}:d||{},F=p.method==null?r.squareRoot:r[p.method],R=i(p.dimensions),x=D(W,{dimensions:R,toOneDimensionArray:!0}),S=m(x),M=A(x),z=F(x,M,S),P=h(M,S,z),N=P.step,L=P.toFixedPrecision,I=v(+(Math.ceil(M/N)*N).toFixed(L),+(Math.floor(S/N)*N).toFixed(L),N,L),U=I.length,O=new Array(U+1),T=0;T<=U;T++)O[T]={},O[T].sample=[],O[T].x0=T>0?I[T-1]:I[T]-M===N?M:I[T]-N,O[T].x1=T<U?I[T]:S-I[T-1]===N?S:I[T-1]+N;for(var T=0;T<x.length;T++)M<=x[T]&&x[T]<=S&&O[a(I,x[T],0,U)].sample.push(x[T]);var W=l(O,function(q){return[+((q.x0+q.x1)/2).toFixed(L),q.sample.length,q.x0,q.x1,q.x0+" - "+q.x1]}),w=l(O,function(q){return[q.x0,q.x1,q.sample.length]});return{bins:O,data:W,customData:w}}var r={squareRoot:function(s){var d=Math.ceil(Math.sqrt(s.length));return d>50?50:d},scott:function(s,d,p){return Math.ceil((p-d)/(3.5*c(s)*Math.pow(s.length,-1/3)))},freedmanDiaconis:function(s,d,p){return s.sort(e),Math.ceil((p-d)/(2*(E(s,.75)-E(s,.25))*Math.pow(s.length,-1/3)))},sturges:function(s){return Math.ceil(Math.log(s.length)/Math.LN2)+1}};return u}.call(f,n,f,o),t!==void 0&&(o.exports=t)}),(function(o,f,n){var t;t=function(C){var m=n(2),A=m.getPrecision;return function(E,c,g,D){var i=arguments.length;i<2?(c=E,E=0,g=1):i<3?g=1:i<4?(g=+g,D=A(g)):D=+D;for(var y=Math.ceil(((c-E)/g).toFixed(D)),e=new Array(y+1),l=0;l<y+1;l++)e[l]=+(E+l*g).toFixed(D);return e}}.call(f,n,f,o),t!==void 0&&(o.exports=t)}),(function(o,f,n){var t;t=function(C){var m=n(4);return function(A,E,c){var g=Math.abs(E-A)/c,D=m.quantityExponent(g),i=Math.pow(10,D),y=g/i;y>=Math.sqrt(50)?i*=10:y>=Math.sqrt(10)?i*=5:y>=Math.sqrt(2)&&(i*=2);var e=D<0?-D:0,l=+(E>=A?i:-i).toFixed(e);return{step:l,toFixedPrecision:e}}}.call(f,n,f,o),t!==void 0&&(o.exports=t)}),(function(o,f,n){var t;t=function(C){var m=n(5),A=n(19),E=2;return{type:"ecStat:regression",transform:function(g){var D=g.upstream,i=g.config||{},y=i.method||"linear",e=m(y,D.cloneRawData(),{order:i.order,dimensions:A.normalizeExistingDimensions(g,i.dimensions)}),l=e.points,v=i.formulaOn;v==null&&(v="end");var a;if(v!=="none"){for(var h=0;h<l.length;h++)l[h][E]=v==="start"&&h===0||v==="all"||v==="end"&&h===l.length-1?e.expression:"";a=D.cloneAllDimensionInfo(),a[E]={}}return[{dimensions:a,data:l}]}}}.call(f,n,f,o),t!==void 0&&(o.exports=t)}),(function(o,f,n){var t;t=function(C){var m=n(3),A=n(4),E=n(20);function c(D,i){if(i==null)return;var y=D.upstream;if(m.isArray(i)){for(var e=[],l=0;l<i.length;l++){var v=y.getDimensionInfo(i[l]);a(v,i[l]),e[l]=v.index}return e}else{var v=y.getDimensionInfo(i);return a(v,i),v.index}function a(h,u){if(!h)throw new Error("Can not find dimension by "+u)}}function g(D){if(m.isArray(D)){for(var i=[],y=[],e=0;e<D.length;e++){var l=v(D[e]);i.push(l.name),y.push(l.index)}return{name:i,index:y}}else if(D!=null)return v(D);function v(a){if(A.isNumber(a))return{index:a};if(E.isObject(a)&&A.isNumber(a.index))return a;throw new Error("Illegle new dimensions config. Expect `{ name: string, index: number }`.")}}return{normalizeExistingDimensions:c,normalizeNewDimensions:g}}.call(f,n,f,o),t!==void 0&&(o.exports=t)}),(function(o,f,n){var t;t=function(C){function m(E,c){if(Object.assign)Object.assign(E,c);else for(var g in c)c.hasOwnProperty(g)&&(E[g]=c[g]);return E}function A(E){const c=typeof E;return c==="function"||!!E&&c==="object"}return{extend:m,isObject:A}}.call(f,n,f,o),t!==void 0&&(o.exports=t)}),(function(o,f,n){var t;t=function(C){var m=n(15),A=n(19);return{type:"ecStat:histogram",transform:function(c){var g=c.upstream,D=c.config||{},i=m(g.cloneRawData(),{method:D.method,dimensions:A.normalizeExistingDimensions(c,D.dimensions)});return[{dimensions:["MeanOfV0V1","VCount","V0","V1","DisplayableName"],data:i.data},{data:i.customData}]}}}.call(f,n,f,o),t!==void 0&&(o.exports=t)}),(function(o,f,n){var t;t=function(C){var m=n(1),A=n(4),E=n(19),c=A.isNumber;return{type:"ecStat:clustering",transform:function(D){var i=D.upstream,y=D.config||{},e=y.clusterCount;if(!c(e)||e<=0)throw new Error('config param "clusterCount" need to be specified as an interger greater than 1.');if(e===1)return[{},{data:[]}];var l=E.normalizeNewDimensions(y.outputClusterIndexDimension),v=E.normalizeNewDimensions(y.outputCentroidDimensions);if(l==null)throw new Error("outputClusterIndexDimension is required as a number.");for(var a=m.hierarchicalKMeans(i.cloneRawData(),{clusterCount:e,stepByStep:!1,dimensions:E.normalizeExistingDimensions(D,y.dimensions),outputType:m.OutputType.SINGLE,outputClusterIndexDimension:l.index,outputCentroidDimensions:(v||{}).index}),h=i.cloneAllDimensionInfo(),u=[],r=0;r<h.length;r++){var s=h[r];u.push(s.name)}if(u[l.index]=l.name,v)for(var r=0;r<v.index.length;r++)v.name[r]!=null&&(u[v.index[r]]=v.name[r]);return[{dimensions:u,data:a.data},{data:a.centroids}]}}}.call(f,n,f,o),t!==void 0&&(o.exports=t)})])})})(k)),k.exports}var sn,Dn;function Kn(){return Dn||(Dn=1,sn=Bn()),sn}var Wn=Kn();const bn=xn.getDefaultExportFromCjs(Wn),Vn={DEFAULT_ICON:gn.DEFAULT_ICON,ACTIVE_ICON:gn.ACTIVE_ICON,NAME_CN:"风向图",NAME_EN:"Wind Line",ORDER:5},Xn={titleColor:"#111",bgColor:"#fff",textColor:"#111",lineColor:"#314656",top:30,bottom:40,left:20,right:20,radiusSize:8,textSize:12,points:30,isHideTitle:!1,isSmooth:!1},yn=[{name:"参数一",项目编号:"",object_id:""}],qn=["name","项目编号"],Yn=["index","deviation","stability","balance","increment","risk"],Hn=1,Gn={useAlias:!1,null:{type:"0",value:""},multiObject:!1,hideMultiObject:!0,source:"index"},Jn={DEFAULT:Vn,OPTIONS:Xn,DATA:yn,PARAMS:qn,SOURCE:Yn,ITEMS:Hn,COMMON:Gn},Zn=K.defineComponent(mn(dn({},Jn),{__name:"windLin",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(X){on.use([on.install,zn.install,Ln.install,Rn.install,Fn.install,Pn.install,on.install$1,Un.installUniversalTransition]);const b=K.ref(K.inject("session",null)),{proxy:o}=K.getCurrentInstance(),f="windlin_"+Math.random().toString(16).substring(4,12);let n=null,t=null;const C=X;let m=[];class A extends Q.BaseComponent{extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),titleColor:this.getOptionValue("titleColor","#111"),textColor:this.getOptionValue("textColor","#111"),lineColor:this.getOptionValue("lineColor","#314656"),radiusSize:this.getOptionValue("radiusSize",4),textSize:this.getOptionValue("textSize",12),isHideTitle:this.getOptionValue("isHideTitle",!1),isSmooth:this.getOptionValue("isSmooth",!1)}}init(){super.init(),this.props.conf.data=this.props.conf.data.length?this.props.conf.data:yn,C.mode==="edit"&&i(),K.nextTick(()=>{let r=document.querySelector("#"+f);r&&(n||(n=pn.init(r),t=Q.elementResizeDetectorMaker({strategy:"scroll"}),t.listenTo(r,()=>n==null?void 0:n.resize())),n.setOption(D(),!0))})}onPreview(){a.preview()}cleanup(){t&&t.uninstall(document.querySelector("#"+f)),n&&n.clear(),n&&pn.dispose(n),n=null,a.unregister()}}const E=new A(C,"windLin");E.setupLifecycle();const c=E.getStyle(),g=K.computed(()=>In.generateTitleStyle(C.conf.options)),D=()=>{var d,p,F,R;const{data:u,options:r}=C.conf;let s=u[0]||{};return{tooltip:{trigger:"axis",formatter:function(x){return[x[0].value[0],`${s==null?void 0:s.name}: `+x[0].value[1],`${o.$t("setting.gradient")}: `+x[0].value[2]].join("<br>")}},grid:{top:((d=r==null?void 0:r.top)==null?void 0:d.value)||30,bottom:((p=r==null?void 0:r.bottom)==null?void 0:p.value)||40,left:((F=r==null?void 0:r.left)==null?void 0:F.value)||20,right:((R=r==null?void 0:r.right)==null?void 0:R.value)||20,containLabel:!0},xAxis:{type:"time",splitLine:{lineStyle:{color:"#ddd"}}},yAxis:[{axisLine:{lineStyle:{color:"#666"}},splitNumber:4}],visualMap:{type:"piecewise",show:!1,orient:"horizontal",left:"center",bottom:10,pieces:[{lt:0,color:"#18BF12"},{gte:0,lte:0,color:"#f4e9a3"},{gte:0,color:"#D33C3E"}],seriesIndex:1,dimension:2},dataZoom:[{type:"slider",xAxisIndex:0,start:80,end:100,height:15,bottom:15},{type:"inside"}],series:[{type:"line",yAxisIndex:0,showSymbol:!1,emphasis:{scale:!1},symbolSize:10,areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,global:!1,colorStops:[{offset:0,color:c.value.lineColor},{offset:1,color:c.value.lineColor+"00"}]}},lineStyle:{color:c.value.lineColor},itemStyle:{color:c.value.lineColor},encode:{x:0},data:m,z:2,smooth:c.value.isSmooth},{type:"custom",renderItem:e,data:m,z:10}]}},i=()=>{var F,R;const u=Q.hasDataSource(C.conf);m=[];let r=[];const{options:s}=C.conf;let d=(R=(F=s==null?void 0:s.points)==null?void 0:F.value)!=null?R:30,p=Q.getxAxisDataTime(d,C.mode,u);for(let x=0;x<d;x++){let S=Math.floor(Math.random()*200);r.push([p[x],S])}m=y(r)},y=u=>u.map((r,s)=>{var d;if(s===u.length-1)r[2]=0;else{let p=bn.regression("linear",[[s+1,r[1]],[s+2,u[s+1][1]]],0);r[2]=Math.atan(((d=p.parameter)==null?void 0:d.gradient)||0).toFixed(4)}return r}),e=(u,r)=>{const s=r.coord([r.value(0),0]),d=16;return{type:"path",shape:{pathData:"M31 16l-15-15v9h-26v12h26v9z",x:-d/2,y:-d/2,width:d,height:d},rotation:r.value(2),position:s,style:r.style({stroke:"#555",lineWidth:1})}},l=u=>{if(!Q.hasDataSource(C.conf))return;const{data:r}=C.conf;let s=Q.handleNullData(u,C,"history");if(!s.history.length)return;let d=s.history[0],p=[];d.forEach(F=>{let R=F[r[0].fv]||0;p.push([F.time,R])}),m=y(p),n==null||n.setOption(D())},v=u=>{Q.hasDataSource(C.conf)},a={preview:()=>Q.preview(C,b.value,l,v,"windLin"),unregister:()=>Q.unregister(C,b.value)};K.watchEffect(()=>{C.conf.socketData&&v(C.conf.socketData)});const h=C.conf;return(u,r)=>(K.openBlock(),K.createElementBlock("div",{class:"mix-component",style:K.normalizeStyle({background:K.unref(c).bgColor,borderRadius:`${K.unref(c).radiusSize}px`})},[K.createElementVNode("div",{class:"mix-title",style:K.normalizeStyle(g.value)},K.toDisplayString(K.unref(h).caption||K.unref(h).name),5),K.createElementVNode("div",{class:"mix-body"},[K.createElementVNode("div",{class:"w-full h-full",id:f})]),K.renderSlot(u.$slots,"default",{},void 0,!0)],4))}})),Qn=xn._export_sfc(Zn,[["__scopeId","data-v-a9a859ce"]]);exports.default=Qn;
@@ -11,9 +11,9 @@ var hn = (V, W, o) => W in V ? yn(V, W, { enumerable: !0, configurable: !0, writ
11
11
  return V;
12
12
  }, dn = (V, W) => Mn(V, Sn(W));
13
13
  import { defineComponent as Cn, ref as Tn, inject as Pn, getCurrentInstance as In, computed as Ln, watchEffect as zn, openBlock as Fn, createElementBlock as Rn, normalizeStyle as gn, unref as $, createElementVNode as an, toDisplayString as Un, renderSlot as On, nextTick as Bn } from "vue";
14
- import { B as Kn, e as Wn, h as on, f as bn, u as Vn, p as Xn, j as Yn } from "./element-resize-detector-DeMhGbNi.js";
14
+ import { B as Kn, e as Wn, h as on, f as bn, u as Vn, p as Xn, j as Yn } from "./element-resize-detector-BykFgbx2.js";
15
15
  import { g as Hn } from "./titleStyle-BT5GlpAb.js";
16
- import { b as Gn, _ as Jn } from "./index-zPaMBZk-.js";
16
+ import { b as Gn, _ as Jn } from "./index-CQCqGJ5R.js";
17
17
  import { A as Zn, D as Qn } from "./ele-aqi-icon-DsYfU5th.js";
18
18
  import { i as qn } from "./install-oGjJ0_bF.js";
19
19
  import { u as wn, i as $n, a as jn } from "./installCanvasRenderer-CLT2hquJ.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mixdashboards",
3
- "version": "1.0.40",
3
+ "version": "1.0.44",
4
4
  "description": "MixDashboards Display Components - Show, Pro, App",
5
5
  "type": "module",
6
6
  "main": "./dist/mixdashboards.cjs",
@@ -1,9 +0,0 @@
1
- const i = "/http/middle_platform/api", n = "/http/file/upload", _ = "";
2
- var o;
3
- const t = typeof window != "undefined" && ((o = window.location) != null && o.origin) ? window.location.origin : "";
4
- (t || "" || "https://yunui.mixyun.top").toString().replace(/\/$/, "");
5
- export {
6
- _ as F,
7
- i as M,
8
- n as U
9
- };
@@ -1 +0,0 @@
1
- "use strict";const i="/http/middle_platform/api",n="/http/file/upload";var t;const o=typeof window!="undefined"&&((t=window.location)!=null&&t.origin)?window.location.origin:"";(o||""||"https://yunui.mixyun.top").toString().replace(/\/$/,"");exports.FILE_URL="";exports.MIDDLE_PLATFORM_URL=i;exports.UPLOAD_URL=n;
@@ -1,6 +0,0 @@
1
- "use strict";var bt=(n,t,e)=>new Promise((i,r)=>{var s=d=>{try{c(e.next(d))}catch(f){r(f)}},o=d=>{try{c(e.throw(d))}catch(f){r(f)}},c=d=>d.done?i(d.value):Promise.resolve(d.value).then(s,o);c((e=e.apply(n,t)).next())});const X=require("vue"),J=require("./index-EnNA0nIi.cjs"),Vt="object_alias_uid_mapping",ne=["#4162ff","#3bbc6a","#e24359","#fdcd61","#44b4ff","#8000ff","#ae00ae","#ff8102","#970000","#9b9b00","#939393","#007700","#397373"];function ae(n){if(!n||typeof n!="string"||n.startsWith("var("))return!1;let t=n.replace("#","").toLowerCase();t.length===8&&(t=t.substring(0,6));let e,i,r;if(t.length===3)e=parseInt(t[0]+t[0],16),i=parseInt(t[1]+t[1],16),r=parseInt(t[2]+t[2],16);else if(t.length===6)e=parseInt(t.substring(0,2),16),i=parseInt(t.substring(2,4),16),r=parseInt(t.substring(4,6),16);else return!1;return(e*299+i*587+r*114)/1e3>180}function se(n){if(!n||typeof n!="string")return!1;const t=n.replace("#","").toLowerCase();let e,i,r;if(t.length===3)e=parseInt(t[0]+t[0],16),i=parseInt(t[1]+t[1],16),r=parseInt(t[2]+t[2],16);else if(t.length===6)e=parseInt(t.substring(0,2),16),i=parseInt(t.substring(2,4),16),r=parseInt(t.substring(4,6),16);else return!1;return(e*299+i*587+r*114)/1e3<50}function oe(n,t){if(n==="dark"){const e=["bgColor","itemColor","oddColor","evenColor","backgroundColor","cardBgColor","barColor","splitColor","borderColor"],i=["titleColor","textColor","nameColor","valueColor","fontColor","labelColor"];e.forEach(r=>{const s=t[r];s&&typeof s=="string"&&ae(s)&&(t[r]="var(--el-bg-color)")}),i.forEach(r=>{const s=t[r];s&&typeof s=="string"&&se(s)&&(t[r]="var(--el-text-color-primary)")})}}const ce=[{value:"alway",label:"setting.control.alway"},{value:"once",label:"setting.control.once"},{value:"never",label:"setting.control.never"}],ue=(n,t,e=!1)=>{const i=[];if(t==="edit"||t==="preview"&&!e){const r=new Date;i.push(J.dayjs(r).format("YYYY-MM-DD HH")+":00:00");for(let s=0;s<n-1;s++){const o=r.getHours();r.setHours(o-1),i.unshift(J.dayjs(r).format("YYYY-MM-DD HH")+":00:00")}}return i},le=n=>{const{num:t,max:e,min:i,mode:r,hasDataSource:s=!1}=n,o=[];if(r==="edit"||r==="preview"&&!s){const c=t!=null?t:10,d=e!=null?e:200,f=i!=null?i:10;for(let u=0;u<c;u++)o.push(Math.floor(Math.random()*(d-f+1)+f))}return o},de=n=>{let t=[];switch(n){case"last-hour":case"hour":for(let e=0;e<60;e++){const i=e>9?`${e}:00`:`0${e}:00`;t.push(i)}break;case"last-day":case"day":for(let e=0;e<24;e++){const i=e>9?`${e}:00`:`0${e}:00`;t.push(i)}break;case"week":case"last-week":t=["周日","周一","周二","周三","周四","周五","周六"];break;case"last-month":case"month":for(let e=1;e<32;e++){const i=e>9?`${e}日`:`0${e}日`;t.push(i)}break;case"last-year":case"year":for(let e=1;e<13;e++){const i=e>9?`${e}月`:`0${e}月`;t.push(i)}break}return t},he=n=>["周日","周一","周二","周三","周四","周五","周六"][n],fe=(n,t)=>{switch(t){case"hour":return J.dayjs(n).format("mm:00");case"day":return J.dayjs(n).format("HH:00");case"week":return he(J.dayjs(n).day());case"month":return J.dayjs(n).format("DD日");case"year":return J.dayjs(n).format("MM月");default:return""}},Kt=(n,t)=>{let e=null;return function(...i){const r=this;e!==null&&clearTimeout(e),e=setTimeout(()=>{n.apply(r,i)},t)}},ft=(n,t,e)=>{const i=JSON.parse(sessionStorage.getItem(Vt)||"{}")||{};return t?n.object_alias&&i[n.object_alias]||e:n.object_id||e},pe=n=>{if(!n)return!1;const{data:t=[],common:e={}}=n;return e.source==="calculate"?Array.isArray(t)&&t.length>0?t.some(i=>i.uid&&i.uid!==""):!1:e.object_id&&e.object_id!==""||e.object_alias&&e.object_alias!==""?!0:Array.isArray(t)&&t.length>0?t.some(i=>i.object_id&&i.object_id!==""):!1},ve=n=>Number.isNaN(n)||!Number.isFinite(n),ge=n=>n==null||n==="",ut={null:ge,abnormal:ve},be=n=>n.res,ye=n=>{const{res:t,category:e,type:i,conf:r,uid:s}=n,{data:o,common:c}=r,d=c.source||"mosaic";if(e==="history"){const f=[],u=t.history[0].length;for(let y=0;y<u;y++){let D=!0;for(let g=0;g<t.history.length;g++){const b=o[g].fv;if(ut[i](t.history[g][y][b])){D=!1;break}}D&&f.push(y)}const v=[];for(let y=0;y<t.history.length;y++){const D=f.map(g=>t.history[y][g]);D.length>0&&v.push(D)}t.history=v}else{let f=!1;if(o.forEach(u=>{var D,g,b,m,x,L,E,P,p,a,w,h;const v=ft(u,c.useAlias,s);let y;["statistics","calculate"].includes(d)?y=(m=(b=(g=(D=t[v])==null?void 0:D[d])==null?void 0:g.data)==null?void 0:b[u.fv])==null?void 0:m.data:["statisticsRealtime","calculateRealtime"].includes(d)?y=(p=(P=(E=(L=(x=t[v])==null?void 0:x[d])==null?void 0:L.data)==null?void 0:E[u.fv])==null?void 0:P.data)==null?void 0:p.data:y=(h=(w=(a=t[v])==null?void 0:a[d])==null?void 0:w.data)==null?void 0:h[u.fv],f=ut[i](y)}),f)return null}return t},me=n=>{const{res:t,category:e,type:i,conf:r,uid:s}=n,{data:o,common:c}=r,d=c.source||"mosaic";if(e==="history"){const f=t.history[0].length;for(let u=0;u<f;u++)for(let v=0;v<t.history.length;v++){const y=o[v].fv;ut[i](t.history[v][u][y])&&(t.history[v][u][y]=c.null.value)}}else o.forEach(f=>{var v,y,D,g,b,m,x,L,E,P,p,a;const u=ft(f,c.useAlias,s);if(["statistics","calculate"].includes(d)){const w=(g=(D=(y=(v=t[u])==null?void 0:v[d])==null?void 0:y.data)==null?void 0:D[f.fv])==null?void 0:g.data;ut[i](w)&&(t[u][d].data[f.fv].data=c.null.value)}else if(["statisticsRealtime","calculateRealtime"].includes(d)){const w=(E=(L=(x=(m=(b=t[u])==null?void 0:b[d])==null?void 0:m.data)==null?void 0:x[f.fv])==null?void 0:L.data)==null?void 0:E.data;ut[i](w)&&(t[u][d].data[f.fv].data.data=c.null.value)}else{const w=(a=(p=(P=t[u])==null?void 0:P[d])==null?void 0:p.data)==null?void 0:a[f.fv];ut[i](w)&&(t[u][d].data[f.fv]=c.null.value)}});return t},Se=n=>n.res,we={0:be,1:ye,2:me,3:Se},Xt=(n,t,e)=>{var c;const{conf:i,uid:r}=t,s=(c=i.common)==null?void 0:c.null;if(!(s!=null&&s.type))return n;const o={res:n,category:e,type:"null",conf:i,uid:r};return we[s.type](o)},ke=(n,t)=>(n.history=t.map(()=>[]),n.all_data_group.forEach((e,i)=>{if(Array.isArray(e)&&e.length)e.forEach(r=>{n.history[i].push({time:r.start_time,[r.script_uid]:r.data})});else for(const r in e)n.history[i].push({time:r,[t[i].fv]:e[r]})}),n),Ee=(n,t)=>{const e=new Map;for(let o=0;o<n.length;o++)e.set(n[o],o);const i=[],r=t.map(()=>[]),s=new Set;for(let o=0;o<n.length;o++){const c=n[o];if(!s.has(c)){s.add(c);const d=e.get(c);i.push(c);for(let f=0;f<t.length;f++)r[f].push(t[f][d])}}return{times:i,data:r}},Jt=(n,t,e,i,r)=>bt(null,null,function*(){try{const o=yield new(yield Promise.resolve().then(()=>require("./history-C4gipwnp.cjs"))).default().getHistoryData(n,r);e(o)}catch(s){console.error("获取历史数据时出错:",s)}finally{if(t){const{formatRequest:s}=yield Promise.resolve().then(()=>require("./request-4n94CBXg.cjs")),o=s(n.conf,n.uid,r);t.registerComponent({id:n.conf.id,request:o,onUpdate:(c,d)=>{c==="realtime"&&i(d)}})}}}),Qt=(n,t)=>{t&&t.unregisterComponent(n.conf.id)};class xe{constructor(t,e){this.linkWatchStop=null,this.props=t,this.componentType=e,this.session=X.ref(X.inject("session",null)),this.Style=X.ref({}),this.linkStore=J.useLinkStore()}extractStyles(){return{}}init(){this.Style.value=this.extractStyles(),this.applyTheme()}setHistoryData(t){}onPreview(){var r;const{common:t,data:e}=this.props.conf,i=this.getSource();if(t.multiObject&&Array.isArray(e)){const s=new Set;e.forEach(o=>{const c=this.resolveObjectId(o);!c||s.has(c)||(s.add(c),this.subscribeBySource(i,c,o.uid))}),console.log(`[${this.componentType}] 多对象模式:已订阅 ${s.size} 个对象`)}else{const s=this.resolveObjectId(),o=(r=e==null?void 0:e[0])==null?void 0:r.uid;this.subscribeBySource(i,s,o)}}setSocketData(t){if(!t)return;const{data:e}=this.props.conf;!e||!Array.isArray(e)||e.forEach(i=>{try{const r=this.extractDataValue(t,i.fv);i.value=r!=null?r:"--"}catch(r){i.value="--"}})}onLinkEvent(t){}getLinkChannel(){var t;return((t=this.Style.value)==null?void 0:t.linkChannel)||""}publish(t){const e=this.getLinkChannel();if(!e){console.warn(`[${this.componentType}] 未配置联动频道,无法发布事件`);return}this.linkStore.publish(e,this.componentType,t)}shouldHandleEvent(t){return!(!t||this.props.mode==="edit"||t.topic.source===this.componentType)}setupLinkWatch(){this.linkWatchStop&&this.linkWatchStop(),this.linkWatchStop=X.watch(()=>{const t=this.getLinkChannel();return t?this.linkStore.channels[t]:null},t=>{this.shouldHandleEvent(t)&&this.onLinkEvent(t)},{deep:!0,immediate:!0})}stopLinkWatch(){this.linkWatchStop&&(this.linkWatchStop(),this.linkWatchStop=null)}isLocalIotSubscribeMode(){return localStorage.getItem("dashboardUseLocalToken")==="1"||localStorage.getItem("dashboardUseLocalToken")==="true"}subscribe(t,e,i,r){if(!this.session.value){console.warn(`[${this.componentType}] Session 未初始化,无法订阅`);return}const s={event:t,block:e,object_id:i};r&&Object.assign(s,r);const o=this.isLocalIotSubscribeMode()?{action:"sub_event",block_mapping:"mmq",event:s}:{action:"sub_agent_event",event:s},c=this.props.conf.id;this.session.value.componentRequests&&(this.session.value.componentRequests.has(c)||this.session.value.componentRequests.set(c,[]),this.session.value.componentRequests.get(c).push(o)),this.session.value.send({type:"send_message",message:o})}subscribeFv(t){this.subscribe("recv_fv","mosaic",t)}subscribeRetainerOpen(t){this.subscribe("retainer_open","retainer",t)}subscribeRetainerClose(t){this.subscribe("retainer_close","retainer",t)}subscribeRetainerEvent(t){this.subscribe("retainer_event","retainer",t)}subscribeRetainer(t){this.subscribeRetainerOpen(t),this.subscribeRetainerClose(t),this.subscribeRetainerEvent(t)}subscribeStatisticsRealtimeResult(t){this.subscribe("statistics_realtime_result","statistics",t)}subscribeStatistics(t){var i,r;const e=(r=(i=this.props.conf.data)==null?void 0:i[0])==null?void 0:r.uid;this.subscribeStatisticsWithUid(t,e)}subscribeStatisticsWithUid(t,e){this.subscribe("statistics_result","statistics",t,{uid:e,type:"statistics"})}subscribeCalculate(t){var i,r;const e=(r=(i=this.props.conf.data)==null?void 0:i[0])==null?void 0:r.uid;this.subscribeCalculateWithUid(e)}subscribeCalculateWithUid(t){this.subscribe("statistics_result","statistics","",{uid:t,type:"calculate"})}subscribeBySource(t,e,i){switch(t){case"mosaic":this.subscribeFv(e);break;case"statisticsRealtime":this.subscribeStatisticsRealtimeResult(e);break;case"statistics":i?this.subscribeStatisticsWithUid(e,i):this.subscribeStatistics(e);break;case"calculate":i?this.subscribeCalculateWithUid(i):this.subscribeCalculate(e);break;default:console.warn(`[${this.componentType}] 未知的数据源类型: ${t}`)}}extractDataValue(t,e){var i;return!t||!t.event?null:t.event==="recv_fv"&&t.block==="mosaic"?!e||!t.data?null:t.data[e]:t.event==="statistics_realtime_result"&&t.block==="statistics"?(i=t.data)==null?void 0:i.data:t.event==="statistics_result"&&t.block==="statistics"?t.data:null}getOptionValue(t,e){var r,s;const i=(s=(r=this.props.conf)==null?void 0:r.options)==null?void 0:s[t];return i==null?e:typeof i=="object"&&"value"in i?i.value:i}applyTheme(){oe(this.props.theme,this.Style.value)}getSource(){var t,e;return((e=(t=this.props.conf)==null?void 0:t.common)==null?void 0:e.source)||"mosaic"}isStatistics(){return["statistics","calculate","statisticsRealtime","calculateRealtime"].includes(this.getSource())}resolveObjectId(t){const{common:e,data:i}=this.props.conf;if(e.multiObject&&t)return ft(t,e.useAlias,this.props.uid);const r=e.object_id?e:i[0]||{};return ft(r,e.useAlias,this.props.uid)}handleNull(t,e){return Xt(t,this.props,e)}getPreviewHelper(){return{preview:()=>Jt(this.props,this.session.value,t=>this.setHistoryData(t),t=>this.setSocketData(t),this.componentType),unregister:()=>Qt(this.props,this.session.value)}}getDebouncedInit(){return Kt(()=>this.init(),200)}cleanup(){}needsHistoryData(){return!0}setupLifecycle(){const t=this.getDebouncedInit(),e=this.getPreviewHelper();X.onMounted(()=>bt(this,null,function*(){if(this.init(),this.props.mode==="preview"){if(this.needsHistoryData())try{const r=yield new(yield Promise.resolve().then(()=>require("./history-C4gipwnp.cjs"))).default().getHistoryData(this.props,this.componentType);this.setHistoryData(r)}catch(i){console.error(`[${this.componentType}] 获取历史数据失败:`,i)}this.session.value&&this.session.value.registerComponent({id:this.props.conf.id,request:null,onUpdate:(i,r)=>{i==="realtime"&&this.setSocketData(r)}}),this.onPreview()}this.setupLinkWatch()})),X.onBeforeUnmount(()=>{this.cleanup(),e.unregister(),this.stopLinkWatch()}),X.watch(()=>this.props.conf,()=>{this.props.mode==="edit"&&t()},{deep:!0}),X.watch(()=>this.props.theme,()=>{this.init()}),X.watch(()=>{var i;return(i=this.Style.value)==null?void 0:i.linkChannel},()=>{this.setupLinkWatch()})}getStyle(){return this.Style}getType(){return this.componentType}dispatchModal(t,e,i){this.props.mode==="preview"&&window.dispatchEvent(new CustomEvent("mix-modal",{detail:{action:t,layerId:e,sheetIndex:i!=null?i:-1}}))}triggerModalByKey(t){var i,r;if(this.props.mode!=="preview")return;const e=(i=this.props.conf)==null?void 0:i.modalBinding;if(e&&e.enabled&&e.mode==="key"){const o=(e.map||{})[t];if(!o||!o.layerId)return;const c=o.action||"toggle",d=(r=e.sheetIndex)!=null?r:-1;this.dispatchModal(c,o.layerId,d)}}}var yt={exports:{}},_t;function Zt(){if(_t)return yt.exports;_t=1;var n=yt.exports={};return n.forEach=function(t,e){for(var i=0;i<t.length;i++){var r=e(t[i]);if(r)return r}},yt.exports}var mt,zt;function Ce(){return zt||(zt=1,mt=function(n){var t=n.stateHandler.getState;function e(o){var c=t(o);return c&&!!c.isDetectable}function i(o){t(o).isDetectable=!0}function r(o){return!!t(o).busy}function s(o,c){t(o).busy=!!c}return{isDetectable:e,markAsDetectable:i,isBusy:r,markBusy:s}}),mt}var St,Mt;function De(){return Mt||(Mt=1,St=function(n){var t={};function e(o){var c=n.get(o);return c===void 0?[]:t[c]||[]}function i(o,c){var d=n.get(o);t[d]||(t[d]=[]),t[d].push(c)}function r(o,c){for(var d=e(o),f=0,u=d.length;f<u;++f)if(d[f]===c){d.splice(f,1);break}}function s(o){var c=e(o);c&&(c.length=0)}return{get:e,add:i,removeListener:r,removeAllListeners:s}}),St}var wt,qt;function Ie(){return qt||(qt=1,wt=function(){var n=1;function t(){return n++}return{generate:t}}),wt}var kt,Nt;function Le(){return Nt||(Nt=1,kt=function(n){var t=n.idGenerator,e=n.stateHandler.getState;function i(s){var o=e(s);return o&&o.id!==void 0?o.id:null}function r(s){var o=e(s);if(!o)throw new Error("setId required the element to have a resize detection state.");var c=t.generate();return o.id=c,c}return{get:i,set:r}}),kt}var Et,Wt;function Ae(){return Wt||(Wt=1,Et=function(n){function t(){}var e={log:t,warn:t,error:t};if(!n&&window.console){var i=function(r,s){r[s]=function(){var c=console[s];if(c.apply)c.apply(console,arguments);else for(var d=0;d<arguments.length;d++)c(arguments[d])}};i(e,"log"),i(e,"warn"),i(e,"error")}return e}),Et}var xt={exports:{}},Pt;function te(){if(Pt)return xt.exports;Pt=1;var n=xt.exports={};return n.isIE=function(t){function e(){var r=navigator.userAgent.toLowerCase();return r.indexOf("msie")!==-1||r.indexOf("trident")!==-1||r.indexOf(" edge/")!==-1}if(!e())return!1;if(!t)return!0;var i=(function(){var r,s=3,o=document.createElement("div"),c=o.getElementsByTagName("i");do o.innerHTML="<!--[if gt IE "+ ++s+"]><i></i><![endif]-->";while(c[0]);return s>4?s:r})();return t===i},n.isLegacyOpera=function(){return!!window.opera},xt.exports}var Ct={exports:{}},Bt;function He(){if(Bt)return Ct.exports;Bt=1;var n=Ct.exports={};n.getOption=t;function t(e,i,r){var s=e[i];return s==null&&r!==void 0?r:s}return Ct.exports}var Dt,Ut;function Te(){if(Ut)return Dt;Ut=1;var n=He();Dt=function(i){i=i||{};var r=i.reporter,s=n.getOption(i,"async",!0),o=n.getOption(i,"auto",!0);o&&!s&&(r&&r.warn("Invalid options combination. auto=true and async=false is invalid. Setting async=true."),s=!0);var c=t(),d,f=!1;function u(m,x){!f&&o&&s&&c.size()===0&&D(),c.add(m,x)}function v(){for(f=!0;c.size();){var m=c;c=t(),m.process()}f=!1}function y(m){f||(m===void 0&&(m=s),d&&(g(d),d=null),m?D():v())}function D(){d=b(v)}function g(m){var x=clearTimeout;return x(m)}function b(m){var x=function(L){return setTimeout(L,0)};return x(m)}return{add:u,force:y}};function t(){var e={},i=0,r=0,s=0;function o(f,u){u||(u=f,f=0),f>r?r=f:f<s&&(s=f),e[f]||(e[f]=[]),e[f].push(u),i++}function c(){for(var f=s;f<=r;f++)for(var u=e[f],v=0;v<u.length;v++){var y=u[v];y()}}function d(){return i}return{add:o,process:c,size:d}}return Dt}var It,$t;function Re(){if($t)return It;$t=1;var n="_erd";function t(r){return r[n]={},e(r)}function e(r){return r[n]}function i(r){delete r[n]}return It={initState:t,getState:e,cleanState:i},It}var Lt,Ft;function je(){if(Ft)return Lt;Ft=1;var n=te();return Lt=function(t){t=t||{};var e=t.reporter,i=t.batchProcessor,r=t.stateHandler.getState;if(!e)throw new Error("Missing required dependency: reporter.");function s(u,v){function y(){v(u)}if(n.isIE(8))r(u).object={proxy:y},u.attachEvent("onresize",y);else{var D=d(u);if(!D)throw new Error("Element is not detectable by this strategy.");D.contentDocument.defaultView.addEventListener("resize",y)}}function o(u){var v=t.important?" !important; ":"; ";return(u.join(v)+v).trim()}function c(u,v,y){y||(y=v,v=u,u=null),u=u||{},u.debug;function D(g,b){var m=o(["display: block","position: absolute","top: 0","left: 0","width: 100%","height: 100%","border: none","padding: 0","margin: 0","opacity: 0","z-index: -1000","pointer-events: none"]),x=!1,L=window.getComputedStyle(g),E=g.offsetWidth,P=g.offsetHeight;r(g).startSize={width:E,height:P};function p(){function a(){if(L.position==="static"){g.style.setProperty("position","relative",u.important?"important":"");var I=function(z,T,q,A){function B(lt){return lt.replace(/[^-\d\.]/g,"")}var U=q[A];U!=="auto"&&B(U)!=="0"&&(z.warn("An element that is positioned static has style."+A+"="+U+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+A+" will be set to 0. Element: ",T),T.style.setProperty(A,"0",u.important?"important":""))};I(e,g,L,"top"),I(e,g,L,"right"),I(e,g,L,"bottom"),I(e,g,L,"left")}}function w(){x||a();function I(T,q){if(!T.contentDocument){var A=r(T);A.checkForObjectDocumentTimeoutId&&window.clearTimeout(A.checkForObjectDocumentTimeoutId),A.checkForObjectDocumentTimeoutId=setTimeout(function(){A.checkForObjectDocumentTimeoutId=0,I(T,q)},100);return}q(T.contentDocument)}var z=this;I(z,function(q){b(g)})}L.position!==""&&(a(),x=!0);var h=document.createElement("object");h.style.cssText=m,h.tabIndex=-1,h.type="text/html",h.setAttribute("aria-hidden","true"),h.onload=w,n.isIE()||(h.data="about:blank"),r(g)&&(g.appendChild(h),r(g).object=h,n.isIE()&&(h.data="about:blank"))}i?i.add(p):p()}n.isIE(8)?y(v):D(v,y)}function d(u){return r(u).object}function f(u){if(r(u)){var v=d(u);v&&(n.isIE(8)?u.detachEvent("onresize",v.proxy):u.removeChild(v),r(u).checkForObjectDocumentTimeoutId&&window.clearTimeout(r(u).checkForObjectDocumentTimeoutId),delete r(u).object)}}return{makeDetectable:c,addListener:s,uninstall:f}},Lt}var At,Yt;function Oe(){if(Yt)return At;Yt=1;var n=Zt().forEach;return At=function(t){t=t||{};var e=t.reporter,i=t.batchProcessor,r=t.stateHandler.getState;t.stateHandler.hasState;var s=t.idHandler;if(!i)throw new Error("Missing required dependency: batchProcessor");if(!e)throw new Error("Missing required dependency: reporter.");var o=v(),c="erd_scroll_detection_scrollbar_style",d="erd_scroll_detection_container";function f(p){y(p,c,d)}f(window.document);function u(p){var a=t.important?" !important; ":"; ";return(p.join(a)+a).trim()}function v(){var p=500,a=500,w=document.createElement("div");w.style.cssText=u(["position: absolute","width: "+p*2+"px","height: "+a*2+"px","visibility: hidden","margin: 0","padding: 0"]);var h=document.createElement("div");h.style.cssText=u(["position: absolute","width: "+p+"px","height: "+a+"px","overflow: scroll","visibility: none","top: "+-p*3+"px","left: "+-a*3+"px","visibility: hidden","margin: 0","padding: 0"]),h.appendChild(w),document.body.insertBefore(h,document.body.firstChild);var I=p-h.clientWidth,z=a-h.clientHeight;return document.body.removeChild(h),{width:I,height:z}}function y(p,a,w){function h(q,A){A=A||function(U){p.head.appendChild(U)};var B=p.createElement("style");return B.innerHTML=q,B.id=a,A(B),B}if(!p.getElementById(a)){var I=w+"_animation",z=w+"_animation_active",T=`/* Created by the element-resize-detector library. */
2
- `;T+="."+w+" > div::-webkit-scrollbar { "+u(["display: none"])+` }
3
-
4
- `,T+="."+z+" { "+u(["-webkit-animation-duration: 0.1s","animation-duration: 0.1s","-webkit-animation-name: "+I,"animation-name: "+I])+` }
5
- `,T+="@-webkit-keyframes "+I+` { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }
6
- `,T+="@keyframes "+I+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }",h(T)}}function D(p){p.className+=" "+d+"_animation_active"}function g(p,a,w){if(p.addEventListener)p.addEventListener(a,w);else if(p.attachEvent)p.attachEvent("on"+a,w);else return e.error("[scroll] Don't know how to add event listeners.")}function b(p,a,w){if(p.removeEventListener)p.removeEventListener(a,w);else if(p.detachEvent)p.detachEvent("on"+a,w);else return e.error("[scroll] Don't know how to remove event listeners.")}function m(p){return r(p).container.childNodes[0].childNodes[0].childNodes[0]}function x(p){return r(p).container.childNodes[0].childNodes[0].childNodes[1]}function L(p,a){var w=r(p).listeners;if(!w.push)throw new Error("Cannot add listener to an element that is not detectable.");r(p).listeners.push(a)}function E(p,a,w){w||(w=a,a=p,p=null),p=p||{};function h(){if(p.debug){var l=Array.prototype.slice.call(arguments);if(l.unshift(s.get(a),"Scroll: "),e.log.apply)e.log.apply(null,l);else for(var S=0;S<l.length;S++)e.log(l[S])}}function I(l){function S(C){var N=C.getRootNode&&C.getRootNode().contains(C);return C===C.ownerDocument.body||C.ownerDocument.body.contains(C)||N}return!S(l)||window.getComputedStyle(l)===null}function z(l){var S=r(l).container.childNodes[0],C=window.getComputedStyle(S);return!C.width||C.width.indexOf("px")===-1}function T(){var l=window.getComputedStyle(a),S={};return S.position=l.position,S.width=a.offsetWidth,S.height=a.offsetHeight,S.top=l.top,S.right=l.right,S.bottom=l.bottom,S.left=l.left,S.widthCSS=l.width,S.heightCSS=l.height,S}function q(){var l=T();r(a).startSize={width:l.width,height:l.height},h("Element start size",r(a).startSize)}function A(){r(a).listeners=[]}function B(){if(h("storeStyle invoked."),!r(a)){h("Aborting because element has been uninstalled");return}var l=T();r(a).style=l}function U(l,S,C){r(l).lastWidth=S,r(l).lastHeight=C}function lt(l){return m(l).childNodes[0]}function H(){return 2*o.width+1}function R(){return 2*o.height+1}function F(l){return l+10+H()}function dt(l){return l+10+R()}function ht(l){return l*2+H()}function Q(l){return l*2+R()}function rt(l,S,C){var N=m(l),Y=x(l),at=F(S),st=dt(C),M=ht(S),k=Q(C);N.scrollLeft=at,N.scrollTop=st,Y.scrollLeft=M,Y.scrollTop=k}function it(){var l=r(a).container;if(!l){l=document.createElement("div"),l.className=d,l.style.cssText=u(["visibility: hidden","display: inline","width: 0px","height: 0px","z-index: -1","overflow: hidden","margin: 0","padding: 0"]),r(a).container=l,D(l),a.appendChild(l);var S=function(){r(a).onRendered&&r(a).onRendered()};g(l,"animationstart",S),r(a).onAnimationStart=S}return l}function $(){function l(){var _=r(a).style;if(_.position==="static"){a.style.setProperty("position","relative",p.important?"important":"");var K=function(ct,et,ee,vt){function re(ie){return ie.replace(/[^-\d\.]/g,"")}var gt=ee[vt];gt!=="auto"&&re(gt)!=="0"&&(ct.warn("An element that is positioned static has style."+vt+"="+gt+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+vt+" will be set to 0. Element: ",et),et.style[vt]=0)};K(e,a,_,"top"),K(e,a,_,"right"),K(e,a,_,"bottom"),K(e,a,_,"left")}}function S(_,K,ct,et){return _=_?_+"px":"0",K=K?K+"px":"0",ct=ct?ct+"px":"0",et=et?et+"px":"0",["left: "+_,"top: "+K,"right: "+et,"bottom: "+ct]}if(h("Injecting elements"),!r(a)){h("Aborting because element has been uninstalled");return}l();var C=r(a).container;C||(C=it());var N=o.width,Y=o.height,at=u(["position: absolute","flex: none","overflow: hidden","z-index: -1","visibility: hidden","width: 100%","height: 100%","left: 0px","top: 0px"]),st=u(["position: absolute","flex: none","overflow: hidden","z-index: -1","visibility: hidden"].concat(S(-(1+N),-(1+Y),-Y,-N))),M=u(["position: absolute","flex: none","overflow: scroll","z-index: -1","visibility: hidden","width: 100%","height: 100%"]),k=u(["position: absolute","flex: none","overflow: scroll","z-index: -1","visibility: hidden","width: 100%","height: 100%"]),W=u(["position: absolute","left: 0","top: 0"]),tt=u(["position: absolute","width: 200%","height: 200%"]),G=document.createElement("div"),V=document.createElement("div"),ot=document.createElement("div"),Tt=document.createElement("div"),pt=document.createElement("div"),Rt=document.createElement("div");G.dir="ltr",G.style.cssText=at,G.className=d,V.className=d,V.style.cssText=st,ot.style.cssText=M,Tt.style.cssText=W,pt.style.cssText=k,Rt.style.cssText=tt,ot.appendChild(Tt),pt.appendChild(Rt),V.appendChild(ot),V.appendChild(pt),G.appendChild(V),C.appendChild(G);function jt(){var _=r(a);_&&_.onExpand?_.onExpand():h("Aborting expand scroll handler: element has been uninstalled")}function Ot(){var _=r(a);_&&_.onShrink?_.onShrink():h("Aborting shrink scroll handler: element has been uninstalled")}g(ot,"scroll",jt),g(pt,"scroll",Ot),r(a).onExpandScroll=jt,r(a).onShrinkScroll=Ot}function Z(){function l(M,k,W){var tt=lt(M),G=F(k),V=dt(W);tt.style.setProperty("width",G+"px",p.important?"important":""),tt.style.setProperty("height",V+"px",p.important?"important":"")}function S(M){var k=a.offsetWidth,W=a.offsetHeight,tt=k!==r(a).lastWidth||W!==r(a).lastHeight;h("Storing current size",k,W),U(a,k,W),i.add(0,function(){if(tt){if(!r(a)){h("Aborting because element has been uninstalled");return}if(!C()){h("Aborting because element container has not been initialized");return}if(p.debug){var V=a.offsetWidth,ot=a.offsetHeight;(V!==k||ot!==W)&&e.warn(s.get(a),"Scroll: Size changed before updating detector elements.")}l(a,k,W)}}),i.add(1,function(){if(!r(a)){h("Aborting because element has been uninstalled");return}if(!C()){h("Aborting because element container has not been initialized");return}rt(a,k,W)}),tt&&M&&i.add(2,function(){if(!r(a)){h("Aborting because element has been uninstalled");return}if(!C()){h("Aborting because element container has not been initialized");return}M()})}function C(){return!!r(a).container}function N(){function M(){return r(a).lastNotifiedWidth===void 0}h("notifyListenersIfNeeded invoked");var k=r(a);if(M()&&k.lastWidth===k.startSize.width&&k.lastHeight===k.startSize.height)return h("Not notifying: Size is the same as the start size, and there has been no notification yet.");if(k.lastWidth===k.lastNotifiedWidth&&k.lastHeight===k.lastNotifiedHeight)return h("Not notifying: Size already notified");h("Current size not notified, notifying..."),k.lastNotifiedWidth=k.lastWidth,k.lastNotifiedHeight=k.lastHeight,n(r(a).listeners,function(W){W(a)})}function Y(){if(h("startanimation triggered."),z(a)){h("Ignoring since element is still unrendered...");return}h("Element rendered.");var M=m(a),k=x(a);(M.scrollLeft===0||M.scrollTop===0||k.scrollLeft===0||k.scrollTop===0)&&(h("Scrollbars out of sync. Updating detector elements..."),S(N))}function at(){if(h("Scroll detected."),z(a)){h("Scroll event fired while unrendered. Ignoring...");return}S(N)}if(h("registerListenersAndPositionElements invoked."),!r(a)){h("Aborting because element has been uninstalled");return}r(a).onRendered=Y,r(a).onExpand=at,r(a).onShrink=at;var st=r(a).style;l(a,st.width,st.height)}function O(){if(h("finalizeDomMutation invoked."),!r(a)){h("Aborting because element has been uninstalled");return}var l=r(a).style;U(a,l.width,l.height),rt(a,l.width,l.height)}function j(){w(a)}function nt(){h("Installing..."),A(),q(),i.add(0,B),i.add(1,$),i.add(2,Z),i.add(3,O),i.add(4,j)}h("Making detectable..."),I(a)?(h("Element is detached"),it(),h("Waiting until element is attached..."),r(a).onRendered=function(){h("Element is now attached"),nt()}):nt()}function P(p){var a=r(p);a&&(a.onExpandScroll&&b(m(p),"scroll",a.onExpandScroll),a.onShrinkScroll&&b(x(p),"scroll",a.onShrinkScroll),a.onAnimationStart&&b(a.container,"animationstart",a.onAnimationStart),a.container&&p.removeChild(a.container))}return{makeDetectable:E,addListener:L,uninstall:P,initDocument:f}},At}var Ht,Gt;function _e(){if(Gt)return Ht;Gt=1;var n=Zt().forEach,t=Ce(),e=De(),i=Ie(),r=Le(),s=Ae(),o=te(),c=Te(),d=Re(),f=je(),u=Oe();function v(b){return Array.isArray(b)||b.length!==void 0}function y(b){if(Array.isArray(b))return b;var m=[];return n(b,function(x){m.push(x)}),m}function D(b){return b&&b.nodeType===1}Ht=function(b){b=b||{};var m;if(b.idHandler)m={get:function(H){return b.idHandler.get(H,!0)},set:b.idHandler.set};else{var x=i(),L=r({idGenerator:x,stateHandler:d});m=L}var E=b.reporter;if(!E){var P=E===!1;E=s(P)}var p=g(b,"batchProcessor",c({reporter:E})),a={};a.callOnAdd=!!g(b,"callOnAdd",!0),a.debug=!!g(b,"debug",!1);var w=e(m),h=t({stateHandler:d}),I,z=g(b,"strategy","object"),T=g(b,"important",!1),q={reporter:E,batchProcessor:p,stateHandler:d,idHandler:m,important:T};if(z==="scroll"&&(o.isLegacyOpera()?(E.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy."),z="object"):o.isIE(9)&&(E.warn("Scroll strategy is not supported on IE9. Changing to object strategy."),z="object")),z==="scroll")I=u(q);else if(z==="object")I=f(q);else throw new Error("Invalid strategy name: "+z);var A={};function B(H,R,F){function dt(Z){var O=w.get(Z);n(O,function(nt){nt(Z)})}function ht(Z,O,j){w.add(O,j),Z&&j(O)}if(F||(F=R,R=H,H={}),!R)throw new Error("At least one element required.");if(!F)throw new Error("Listener required.");if(D(R))R=[R];else if(v(R))R=y(R);else return E.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");var Q=0,rt=g(H,"callOnAdd",a.callOnAdd),it=g(H,"onReady",function(){}),$=g(H,"debug",a.debug);n(R,function(O){d.getState(O)||(d.initState(O),m.set(O));var j=m.get(O);if($&&E.log("Attaching listener to element",j,O),!h.isDetectable(O)){if($&&E.log(j,"Not detectable."),h.isBusy(O)){$&&E.log(j,"System busy making it detectable"),ht(rt,O,F),A[j]=A[j]||[],A[j].push(function(){Q++,Q===R.length&&it()});return}return $&&E.log(j,"Making detectable..."),h.markBusy(O,!0),I.makeDetectable({debug:$,important:T},O,function(l){if($&&E.log(j,"onElementDetectable"),d.getState(l)){h.markAsDetectable(l),h.markBusy(l,!1),I.addListener(l,dt),ht(rt,l,F);var S=d.getState(l);if(S&&S.startSize){var C=l.offsetWidth,N=l.offsetHeight;(S.startSize.width!==C||S.startSize.height!==N)&&dt(l)}A[j]&&n(A[j],function(Y){Y()})}else $&&E.log(j,"Element uninstalled before being detectable.");delete A[j],Q++,Q===R.length&&it()})}$&&E.log(j,"Already detecable, adding listener."),ht(rt,O,F),Q++}),Q===R.length&&it()}function U(H){if(!H)return E.error("At least one element is required.");if(D(H))H=[H];else if(v(H))H=y(H);else return E.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");n(H,function(R){w.removeAllListeners(R),I.uninstall(R),d.cleanState(R)})}function lt(H){I.initDocument&&I.initDocument(H)}return{listenTo:B,removeListener:w.removeListener,removeAllListeners:w.removeAllListeners,uninstall:U,initDocument:lt}};function g(b,m,x){var L=b[m];return L==null&&x!==void 0?x:L}return Ht}var ze=_e();const Me=J.getDefaultExportFromCjs(ze);exports.ALIAS_MAPPING_KEY=Vt;exports.BaseComponent=xe;exports.COLORS=ne;exports.CONTROL_OPTIONS=ce;exports.addRealtimeData=Ee;exports.debounce=Kt;exports.elementResizeDetectorMaker=Me;exports.formatStatisticsResult=ke;exports.getBarXAxis=de;exports.getObjectId=ft;exports.getRandomArr=le;exports.getXAxisNearTime=fe;exports.getxAxisDataTime=ue;exports.handleNullData=Xt;exports.hasDataSource=pe;exports.preview=Jt;exports.unregister=Qt;
@@ -1 +0,0 @@
1
- "use strict";var w=Object.defineProperty,x=Object.defineProperties;var N=Object.getOwnPropertyDescriptors;var E=Object.getOwnPropertySymbols;var P=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable;var S=(f,t,e)=>t in f?w(f,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):f[t]=e,h=(f,t)=>{for(var e in t||(t={}))P.call(t,e)&&S(f,e,t[e]);if(E)for(var e of E(t))R.call(t,e)&&S(f,e,t[e]);return f},j=(f,t)=>x(f,N(t));var D=(f,t,e)=>new Promise((i,s)=>{var a=n=>{try{r(e.next(n))}catch(c){s(c)}},o=n=>{try{r(e.throw(n))}catch(c){s(c)}},r=n=>n.done?i(n.value):Promise.resolve(n.value).then(a,o);r((e=e.apply(f,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./api-C0okiLNC.cjs"),b=require("./element-resize-detector-BlMXyWIR.cjs"),u=require("./index-EnNA0nIi.cjs"),v={multiple:{mosaic:"get_last_mosaic_list"},single:{mosaic:"get_last_mosaic"},result:{mosaic:"get_mosaic_list",statistics:"get_statistics_list"},near:{statistics:"get_last_statistics",calculate:"get_last_calculate"}},z=["crd","vlu","arrayCard"];class T{constructor(){}getHistoryData(t,e){var O,H,A,M,I;if(e==="retainer1")return this.getRetainerHistoryData(t,1);if(e==="retainer2")return this.getRetainerHistoryData(t,4);let i="result";const{conf:s,uid:a}=t,{data:o,common:r,options:n}=s,c=r.source||"mosaic";c==="mosaic"&&(i=z.includes(e)?"single":"multiple"),["statistics","calculate"].includes(c)&&(o.filter(y=>{var d;return(d=y.periodUnit)==null?void 0:d.includes("near")}).length&&["bar","lin"].includes(e)?i="near":i="result");let _=((O=n.points)==null?void 0:O.value)||1,l="";if(r.multiObject||(l=b.getObjectId(r,!!r.useAlias,a)),r.source==="summary")return new Promise(g=>{p.api.platform(y=>{g(y.result)},{block_mapping:"schema",action:"get_statistical_quantity"})});const m=[],k=this.normalizeHistoryTimeRange(r.historyTimeRange);if(o.forEach(g=>{var y;if(r.multiObject&&(l=b.getObjectId(g,!!r.useAlias,a)),g.object_id=l||g.object_id,k&&c==="mosaic")m.push(this.get_mosaic_by_time_range(g,_,k));else if((y=r==null?void 0:r.rate)!=null&&y.checked&&c==="mosaic")m.push(this.get_mosaic_by_timespan(g,_,r.rate));else{const d=`get_${c}_item`;if(typeof this[d]=="function"){const Y=this[d](g,i,_,e);k&&(c==="statistics"||c==="calculate")&&Y&&(Y.start_time=k.start_time,Y.end_time=k.end_time),m.push(Y)}}}),e==="scd"&&((H=n.multipleImg)!=null&&H.value)){const g=JSON.parse(sessionStorage.getItem(b.ALIAS_MAPPING_KEY)||"{}");l=((A=n.object)==null?void 0:A.value)||"",r.useAlias&&((M=n.object)!=null&&M.value)&&(l=g[n.object.value]||n.object.value),m.push({action:"get_last_mosaic_list",keys:[(I=n.statusFv)==null?void 0:I.value],object_id:l||a,items:1})}return e==="sankey"&&(r.multiObject&&(l=b.getObjectId(r,!!r.useAlias,a)),m.unshift({action:"get_last_mosaic_list",keys:[r.originFv],object_id:l,items:1})),new Promise(g=>{const y=d=>!d||Array.isArray(d.history)&&d.history.length>0?d:Array.isArray(d.data)?j(h({},d),{history:[d.data]}):Array.isArray(d)?{history:[d]}:d&&typeof d=="object"&&!Array.isArray(d.history)?{history:[[d]]}:d;m.length===1?p.api.platform(d=>{g(y(d.result))},m[0]):p.api.platform(d=>{g(y(d.result))},{condition:m})})}getAction(t,e){if(t==="multiple"&&e==="mosaic")return v.multiple.mosaic;if(t==="single"&&e==="mosaic")return v.single.mosaic;if(t==="near"&&e==="statistics")return v.near.statistics;if(t==="near"&&e==="calculate")return v.near.calculate;switch(e){case"mosaic":case"index":case"deviation":case"stability":case"balance":case"increment":case"risk":return v.result.mosaic;case"statistics":case"calculate":return v.result.statistics;default:return"get_mosaic_list"}}get_mosaic_item(t,e,i,s){const a={action:e==="single"?"get_last_mosaic":"get_last_mosaic_list",keys:[t.fv],object_id:t.object_id,items:i||1};return s==="evn"&&(a.keys=[t.fv,t.status_fv]),s==="cmc"&&(a.keys=[t.item_fv]),["ctrSwitch"].includes(s)&&(a.keys=[t.status_fv]),["progressBar","progressCircle"].includes(s)&&t.maxType==="fv"&&(a.keys=[t.fv,t.max]),a}normalizeHistoryTimeRange(t){if(!t)return null;const e=t.start_time||t.startDate,i=t.end_time||t.endDate;if(!e||!i)return null;const s=u.dayjs(e).isValid()?u.dayjs(e).format("YYYY-MM-DD HH:mm:ss"):String(e),a=u.dayjs(i).isValid()?u.dayjs(i).format("YYYY-MM-DD HH:mm:ss"):String(i);return{start_time:s,end_time:a}}get_mosaic_by_time_range(t,e,i){return{action:"get_mosaic_list",start_time:i.start_time,end_time:i.end_time,keys:[t.fv],object_id:t.object_id,page_size:e||100}}get_mosaic_by_timespan(t,e,i){const s=u.dayjs().unix(),a=s-i.value*Number(e);return{action:"get_mosaic_list",start_time:u.dayjs(a*1e3).format("YYYY-MM-DD HH:mm:ss"),end_time:u.dayjs(s*1e3).format("YYYY-MM-DD HH:mm:ss"),keys:[t.fv],object_id:t.object_id,page_size:e||100}}get_statistics_item(t,e,i){var s,a;return(s=t.periodUnit)!=null&&s.includes("near")?this.get_neardate_item(t,"statistics"):{action:"get_statistics_list",script_uid:(a=t.uid)!=null?a:t.fv,page_size:Number(i)||20,page_index:1,order_by:JSON.stringify(["end_time","desc"])}}get_calculate_item(t,e,i){var s,a;return(s=t.periodUnit)!=null&&s.includes("near")?this.get_neardate_item(t,"calculate"):{action:"get_calculate_list",script_uid:(a=t.uid)!=null?a:t.fv,page_size:Number(i)||20,page_index:1,order_by:JSON.stringify(["end_time","desc"])}}get_neardate_item(t,e){var i;return{action:e==="statistics"?"get_last_statistics":"get_last_calculate",script_uid:(i=t.uid)!=null?i:t.fv,object_id:t.object_id}}get_index_item(t,e,i,s){const a=t.is_alias?"alias":"uid";return{page_index:1,page_size:i,block_mapping:"index",action:"get_index_result_list",where_and:[[a,"=",t.fv],["object_id","=",t.object_id]]}}get_deviation_item(t,e,i,s){return j(h({},this.get_index_item(t,e,i,s)),{block_mapping:"deviation",action:"get_deviation_result_list"})}get_stability_item(t,e,i,s){return j(h({},this.get_index_item(t,e,i,s)),{block_mapping:"stability",action:"get_stability_result_list"})}get_balance_item(t,e,i,s){return j(h({},this.get_index_item(t,e,i,s)),{block_mapping:"balance",action:"get_balance_result_list"})}get_increment_item(t,e,i,s){return j(h({},this.get_index_item(t,e,i,s)),{block_mapping:"increment",action:"get_increment_result_list"})}get_risk_item(t,e,i,s){return j(h({},this.get_index_item(t,e,i,s)),{block_mapping:"risk",action:"get_risk_result_list"})}get_summary_item(){return{block_mapping:"schema",action:"get_statistical_quantity"}}getRangeLineHistoryData(t){var c,_;const{conf:e,uid:i}=t,s=((_=(c=e==null?void 0:e.options)==null?void 0:c.points)==null?void 0:_.value)||100,a=e.common.source||"mosaic",o=JSON.parse(sessionStorage.getItem("object_alias_uid_mapping")||"{}"),r=e.data[0]||{};let n="";return e.useAlias?n=r.object_alias&&o[r.object_alias]||i:n=r.object_id||i,a==="deviation"?this.getDeviationHistory(e,n,s):this.getEigenHistory(e,n,s)}getDeviationHistory(t,e,i){const s=t.data[0]||{},a=s.is_alias?"alias":"uid",o={block_mapping:"deviation",action:"get_deviation_result_list",page_index:1,page_size:i,where_and:[["object_id","=",e]]};return s.fv&&o.where_and.unshift([a,"=",s.fv]),new Promise(r=>{p.api.platform(n=>{r(this.formatDeviation(n.result))},o)})}getEigenHistory(t,e,i){return D(this,null,function*(){const s={times:[],data:[],range:{}};(yield new Promise(r=>{const n={action:"get_last_mosaic_list",keys:[t.data[0].fv],object_id:e,items:i};p.api.platform(c=>{const _=c.result.data?c.result.data.sort((l,m)=>u.dayjs(l.time).valueOf()-u.dayjs(m.time).valueOf()):[];r(_)},n)})).forEach(r=>{var n;s.times.push(u.dayjs(r.time).format("YYYY-MM-DD HH:mm:ss")),s.data.push((n=r[t.data[0].fv])!=null?n:"-")});const o={action:"get_adaps_report_list",block_mapping:"eigen",where_and:[["start",">=",s.times[0]],["end","<=",s.times[s.times.length-1]],["project_uid","=",t.data[0].project_id],["object_id","=",e]]};return new Promise(r=>{p.api.platform(n=>{s.range=this.formatEigen(n.result.data,s.times),r(s)},o)})})}formatDeviation(t){const e={times:[],data:[],range:{}},i={};t.data.sort((a,o)=>u.dayjs(a.created).valueOf()-u.dayjs(o.created).valueOf()).forEach((a,o)=>{e.times.push(a.created),e.data.push(a.data.Dev),a.data.Base&&(i[a.data.Base]?i[a.data.Base].push([o,o]):i[a.data.Base]=[[o,o]])});for(const a in i){const o=[],r=i[a];if(r.length===0)continue;let n=[r[0]];for(let c=1;c<r.length;c++)r[c][0]-r[c-1][0]===1?n.push(r[c]):(o.push(n),n=[r[c]]);o.push(n),i[a]=o.map(c=>[c[0][0],c[c.length-1][0]])}return e.range=i,e}formatEigen(t,e){const i={};return t.sort((a,o)=>u.dayjs(a.created).valueOf()-u.dayjs(o.created).valueOf()).forEach(a=>{const o=JSON.parse(a.detail),r=[u.dayjs(a.start).format("YYYY-MM-DD HH:mm:ss"),u.dayjs(a.end).format("YYYY-MM-DD HH:mm:ss")];o.Main.forEach(n=>{var m;const c=(m=n.report)!=null&&m.start?[u.dayjs(n.report[0].start.datetime).format("YYYY-MM-DD HH:mm:ss"),u.dayjs(n.report[0].end.datetime).format("YYYY-MM-DD HH:mm:ss")]:r,_=e.indexOf(c[0]),l=e.indexOf(c[1]);_===-1||l===-1||(i[n.key_type]?i[n.key_type].push([_,l]):i[n.key_type]=[[_,l]])})}),i}getSwitchHistoryData(t){const{conf:e,uid:i}=t,{common:s}=e,a=b.getObjectId(s,!!s.useAlias,i),o={action:"get_last_mosaic",keys:[s.statusFv],object_id:a};return new Promise(r=>{p.api.platform(n=>{r(n.result)},o)})}getRetainerHistoryData(t,e=1){return D(this,null,function*(){const{conf:i,uid:s}=t,{data:a,common:o}=i,r=yield p.api.getTokenForBackend(),n={block_mapping:"mixtask",action:"user_action",user_action:"get_retainer_result",args:{items:e,token:r,condition:[]}};return a.forEach(c=>{let _="";o.multiObject?_=b.getObjectId(c,!!o.useAlias,s):_=b.getObjectId(o,!!o.useAlias,s),n.args.condition.push({object_id:_||c.object_id,retainer:c.retainer||"",retainer_code:c.retainer_code||"",fv:c.fv||""})}),new Promise(c=>{p.api.platform(_=>{if(_.code===200&&_.result){const l=Array.isArray(_.result)?_.result[0]:_.result;c(l)}else c({history:[]})},n)})})}getGridviewHistoryData(t){const{conf:e,uid:i}=t,{common:s,data:a}=e,o=s.source||"mosaic";let r="result";o==="mosaic"&&(r="single");let n="";if(s.multiObject||(n=b.getObjectId(s,!!s.useAlias,i)),o==="summary")return new Promise(_=>{p.api.platform(l=>{_(l.result)},{block_mapping:"schema",action:"get_statistical_quantity"})});const c=[];return a.forEach(_=>{_.forEach(l=>{if(l.isValue){s.multiObject&&(n=b.getObjectId({object_id:l.object,object_alias:l.object},!!s.useAlias,i)),l.object_id=n;const m=`get_${o}_item`;typeof this[m]=="function"&&c.push(this[m](l,r,1,""))}})}),new Promise(_=>{c.length===1?p.api.platform(l=>{_(l.result)},c[0]):c.length>1?p.api.platform(l=>{_(l.result)},{condition:c}):_({data:[]})})}}exports.default=T;