@arcgis/charts-components 5.0.0-next.125 → 5.0.0-next.127

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 (319) hide show
  1. package/dist/cdn/{JPKJS3FN.js → 2IGNI2UK.js} +2 -2
  2. package/dist/cdn/{UNYJ6IDT.js → 2IH55BUY.js} +2 -2
  3. package/dist/cdn/{XVQ7NWCK.js → 2IUGTZQ4.js} +2 -2
  4. package/dist/cdn/{ZLTVASUM.js → 2S3AYIO6.js} +2 -2
  5. package/dist/cdn/{SG3MKIUY.js → 2UX4Q23U.js} +2 -2
  6. package/dist/cdn/{HN3LSRQP.js → 2V2VNQEY.js} +2 -2
  7. package/dist/cdn/{UCEM2GPV.js → 2WKXF3K7.js} +2 -2
  8. package/dist/cdn/{CMKZ6XOF.js → 35644Y4C.js} +2 -2
  9. package/dist/cdn/{ACRFCMZF.js → 3C37RHZH.js} +2 -2
  10. package/dist/cdn/3K7XBPSX.js +4 -0
  11. package/dist/cdn/{BNN7PTTZ.js → 3QBXYUT2.js} +2 -2
  12. package/dist/cdn/{5XTLD4ND.js → 4FBWANR3.js} +2 -2
  13. package/dist/cdn/{6TD55U5W.js → 4YYNBJND.js} +2 -2
  14. package/dist/cdn/{AES3M3OQ.js → 4ZP6NTYZ.js} +2 -2
  15. package/dist/cdn/{P3TK25F2.js → 5CZQQPSI.js} +2 -2
  16. package/dist/cdn/{MFJZJ723.js → 65O7A5L3.js} +2 -2
  17. package/dist/cdn/{MN7TE7J3.js → 66BXJM5P.js} +2 -2
  18. package/dist/cdn/{H6647Z7Y.js → 6CNEQWUI.js} +2 -2
  19. package/dist/cdn/{SRVGYCDN.js → 6ITDYUPD.js} +2 -2
  20. package/dist/cdn/{YBO4GXDB.js → 6SN3RD4Y.js} +2 -2
  21. package/dist/cdn/{YFTUIQ7I.js → 7B2HUGRU.js} +2 -2
  22. package/dist/cdn/{VNQVEXX5.js → 7K6KS2RY.js} +2 -2
  23. package/dist/cdn/{5SBKXNIJ.js → 7V6CFQ3E.js} +2 -2
  24. package/dist/cdn/{KBC76MEC.js → 7VZNVZLS.js} +2 -2
  25. package/dist/cdn/{A5MQFJCG.js → A645QLB3.js} +2 -2
  26. package/dist/cdn/{4KI5OFSF.js → AA7DDL6R.js} +2 -2
  27. package/dist/cdn/{Z6XRR3S5.js → AOAPFKQ4.js} +2 -2
  28. package/dist/cdn/{XKIVT5P5.js → AZJKZ4HQ.js} +2 -2
  29. package/dist/cdn/{TRPCVKW2.js → B6SMZCQW.js} +2 -2
  30. package/dist/cdn/{S6ZYUC5L.js → B7ETL2EK.js} +2 -2
  31. package/dist/cdn/{HUBIN2SA.js → BG4DMCNJ.js} +2 -2
  32. package/dist/cdn/{X3OWAHLN.js → BI2TIFLT.js} +2 -2
  33. package/dist/cdn/BLX4A2V6.js +4 -0
  34. package/dist/cdn/{5BZJKKFO.js → C2MQ4R2M.js} +2 -2
  35. package/dist/cdn/{STROHUPK.js → C55WZ44W.js} +2 -2
  36. package/dist/cdn/{DHBJS5NJ.js → CD57YGB6.js} +2 -2
  37. package/dist/cdn/{3CAUGXCH.js → CHGFBNJD.js} +2 -2
  38. package/dist/cdn/{W4YSPSPE.js → CJZPZRUC.js} +3 -3
  39. package/dist/cdn/{JX7PJJNB.js → CPO5ORBM.js} +2 -2
  40. package/dist/cdn/CVQQ5UBA.js +4 -0
  41. package/dist/cdn/{U7RKUUEN.js → CZ3QZL2A.js} +2 -2
  42. package/dist/cdn/D5BEY7UA.js +4 -0
  43. package/dist/cdn/{WP2OACMH.js → DD4SFWT4.js} +2 -2
  44. package/dist/cdn/{WS6SXD3R.js → DED5EXDW.js} +2 -2
  45. package/dist/cdn/{A2QWLSU5.js → DF57GXCV.js} +2 -2
  46. package/dist/cdn/{7YRMN6FC.js → DGBHFOTI.js} +2 -2
  47. package/dist/cdn/{PTWQ6CF5.js → DN2XFHC6.js} +2 -2
  48. package/dist/cdn/{3ZZTXABT.js → DR6GMP7V.js} +2 -2
  49. package/dist/cdn/{B6QRZCAE.js → DRYTKIOF.js} +2 -2
  50. package/dist/cdn/{4FCU4T4F.js → DTPOXRAM.js} +2 -2
  51. package/dist/cdn/{USQFX3ZM.js → E7CUXRWH.js} +2 -2
  52. package/dist/cdn/{4USEFVIV.js → EDTK6NQR.js} +2 -2
  53. package/dist/cdn/{M3UO5ZNP.js → ER6IZ6Z4.js} +2 -2
  54. package/dist/cdn/{2LTVPFPF.js → ERGHUNJH.js} +2 -2
  55. package/dist/cdn/{SH5GRFNI.js → EVG63E4W.js} +2 -2
  56. package/dist/cdn/{OA2K4UWK.js → EZMLG3E5.js} +2 -2
  57. package/dist/cdn/{VGOUIXEO.js → FDHK5FQ5.js} +2 -2
  58. package/dist/cdn/{KK5UHTO7.js → FS2LV6RE.js} +2 -2
  59. package/dist/cdn/{PTOOXS5S.js → FXYYEIZC.js} +2 -2
  60. package/dist/cdn/{PAYFC7OD.js → G5FCDPD5.js} +2 -2
  61. package/dist/cdn/{EBSQVUXC.js → GAVPNXSZ.js} +2 -2
  62. package/dist/cdn/{2UHNLVK7.js → GS7WHGUH.js} +2 -2
  63. package/dist/cdn/{O3BXP2DT.js → H4ROFZQN.js} +2 -2
  64. package/dist/cdn/{COHERSWA.js → H7J7C24H.js} +2 -2
  65. package/dist/cdn/{HUEQQAZM.js → HDPUKKAA.js} +2 -2
  66. package/dist/cdn/{MQSG7WEI.js → HEU652GI.js} +2 -2
  67. package/dist/cdn/{OOSHBMX5.js → HP7GTZVI.js} +2 -2
  68. package/dist/cdn/{HOD3KVCU.js → HPWAYWHD.js} +2 -2
  69. package/dist/cdn/HPXS5RFX.js +244 -0
  70. package/dist/cdn/{6UFHESWW.js → HYYTEILX.js} +2 -2
  71. package/dist/cdn/{W4GG3SGX.js → HZ5XBOBL.js} +2 -2
  72. package/dist/cdn/{S5OVTDF5.js → I73LTHWA.js} +2 -2
  73. package/dist/cdn/{ZNQEQAFZ.js → IGEXPONA.js} +2 -2
  74. package/dist/cdn/{MATDRUV6.js → IRMPEYYA.js} +2 -2
  75. package/dist/cdn/{PUMKNG45.js → IXZJEX2U.js} +2 -2
  76. package/dist/cdn/{CLLDLCEJ.js → J5C2PSRU.js} +2 -2
  77. package/dist/cdn/{DED55HMQ.js → J5QFORBQ.js} +2 -2
  78. package/dist/cdn/{H3MNH24G.js → JC6EKNXV.js} +2 -2
  79. package/dist/cdn/{AX4ONOMV.js → JKJ3SA5X.js} +2 -2
  80. package/dist/cdn/{MCIXYYI5.js → K2P5N62S.js} +35 -37
  81. package/dist/cdn/{LJZFZDEC.js → KAT2GCFN.js} +2 -2
  82. package/dist/cdn/{BG2DUOSS.js → KBU5NMHX.js} +2 -2
  83. package/dist/cdn/{XM6RU2SR.js → KEM6XUXV.js} +2 -2
  84. package/dist/cdn/{IPFD7PH3.js → KEV3Y2O4.js} +2 -2
  85. package/dist/cdn/{5CF5O7W2.js → KJNJ3EDU.js} +2 -2
  86. package/dist/cdn/{4BAOAVTV.js → KLZ2VIZO.js} +2 -2
  87. package/dist/cdn/{43WPT2SK.js → KSKVBRHO.js} +2 -2
  88. package/dist/cdn/KSQ43QP2.js +4 -0
  89. package/dist/cdn/{HX7GF55U.js → KYSPKIIQ.js} +2 -2
  90. package/dist/cdn/{IJOOPQ5X.js → LBOWTJLI.js} +2 -2
  91. package/dist/cdn/{GQGJGBFJ.js → LC42UBLG.js} +2 -2
  92. package/dist/cdn/{YY5WG5C6.js → LHSOHSTS.js} +2 -2
  93. package/dist/cdn/{ZUDUROA4.js → LHUXVL7P.js} +2 -2
  94. package/dist/cdn/{DEF4TQWY.js → LLBRC7DZ.js} +2 -2
  95. package/dist/cdn/{2LQXVN7G.js → LLCCNCYR.js} +2 -2
  96. package/dist/cdn/{VCJ7DICK.js → LLUEFLL4.js} +2 -2
  97. package/dist/cdn/{2PWSALNC.js → LOYIYMJM.js} +2 -2
  98. package/dist/cdn/{7I6QAKJK.js → M2QQK3FO.js} +2 -2
  99. package/dist/cdn/{E33IDGU5.js → MC42K4BE.js} +2 -2
  100. package/dist/cdn/{IPXUQQCD.js → MCBG6NFU.js} +2 -2
  101. package/dist/cdn/{H7F7PI2K.js → MDG63IQK.js} +2 -2
  102. package/dist/cdn/{UWN3XR4Z.js → MG2A2GXU.js} +2 -2
  103. package/dist/cdn/{Q2QPG7WZ.js → MHZBPSJ7.js} +2 -2
  104. package/dist/cdn/{W3YH7KZB.js → MKFZQVB5.js} +2 -2
  105. package/dist/cdn/{QVHNPDOR.js → MKMPYOX7.js} +2 -2
  106. package/dist/cdn/{QPAXNSXB.js → MO7IA36P.js} +2 -2
  107. package/dist/cdn/{P46WL4Y5.js → MOKSOBUJ.js} +2 -2
  108. package/dist/cdn/{2MRGDCFV.js → MTZPTGOR.js} +2 -2
  109. package/dist/cdn/MXDA5JOX.js +34 -0
  110. package/dist/cdn/{FDN6SE3C.js → N3JILFIW.js} +2 -2
  111. package/dist/cdn/{G737PJCD.js → NDANQVET.js} +2 -2
  112. package/dist/cdn/{773SLUAU.js → NF5OBDGI.js} +2 -2
  113. package/dist/cdn/{ILN2V7GR.js → NFORHMJQ.js} +2 -2
  114. package/dist/cdn/{BYSX2EIQ.js → NJ3WZF45.js} +2 -2
  115. package/dist/cdn/{XEPH2OHB.js → NKK2VDLV.js} +2 -2
  116. package/dist/cdn/{2SGXMCVL.js → O23JF4FX.js} +2 -2
  117. package/dist/cdn/{BOLNHMOP.js → O34DUOHE.js} +2 -2
  118. package/dist/cdn/{GATMFQG6.js → O7MVKYFW.js} +2 -2
  119. package/dist/cdn/{QNDRCTVT.js → OAWLF6HG.js} +2 -2
  120. package/dist/cdn/{EN7Y6CV5.js → OBSUTMGU.js} +2 -2
  121. package/dist/cdn/{XWWZN4I2.js → OKCGAUWV.js} +2 -2
  122. package/dist/cdn/{GKJBQ2ZU.js → OT6K54LP.js} +2 -2
  123. package/dist/cdn/{D4SJBKZ4.js → OWLKO37K.js} +2 -2
  124. package/dist/cdn/{5PTRTPXN.js → OXHRUPYX.js} +2 -2
  125. package/dist/cdn/{2PDIETAN.js → OY63NOD7.js} +2 -2
  126. package/dist/cdn/{UWMVQFYE.js → P2H7RQXE.js} +2 -2
  127. package/dist/cdn/{NBJVHS5U.js → P7RHG57V.js} +2 -2
  128. package/dist/cdn/{WJQVASCC.js → PG43TIFC.js} +1 -1
  129. package/dist/cdn/{2KELOPK4.js → PL5TE3RR.js} +2 -2
  130. package/dist/cdn/{B7UMPK76.js → PLGGVS7X.js} +2 -2
  131. package/dist/cdn/{WEQ723FX.js → PPGDFU7L.js} +2 -2
  132. package/dist/cdn/{QEZIUUCD.js → PUYY62D6.js} +2 -2
  133. package/dist/cdn/{CWXJVSVT.js → PVQEYC2Y.js} +2 -2
  134. package/dist/cdn/{SPG5VNM4.js → Q64WOSAD.js} +1 -1
  135. package/dist/cdn/{DVJM3AT3.js → Q6FADG3N.js} +2 -2
  136. package/dist/cdn/{XOB2UPL7.js → Q6XCJWJK.js} +2 -2
  137. package/dist/cdn/{KJUZDK2D.js → QFF77ANM.js} +2 -2
  138. package/dist/cdn/{IXEY7HKA.js → QFHOHG6O.js} +2 -2
  139. package/dist/cdn/{UWXM6Y25.js → QLM7MWRO.js} +2 -2
  140. package/dist/cdn/{SHZYUWJ7.js → QZOJ6RL2.js} +2 -2
  141. package/dist/cdn/{H4PSKESH.js → R5BABM5U.js} +2 -2
  142. package/dist/cdn/{OASHUINP.js → RDZLIBPZ.js} +2 -2
  143. package/dist/cdn/{6AUDZSD5.js → RM6JPHOC.js} +2 -2
  144. package/dist/cdn/{EOUUUTTB.js → S2VZTD2H.js} +2 -2
  145. package/dist/cdn/{DSZTAPXJ.js → S4GX3DFU.js} +1 -1
  146. package/dist/cdn/{HBFJSLS4.js → SBJIQF55.js} +2 -2
  147. package/dist/cdn/{AYZ4LRKS.js → SJXGTL4X.js} +2 -2
  148. package/dist/cdn/{GC3WTLQM.js → SPEVIEKJ.js} +2 -2
  149. package/dist/cdn/{XXBQXUPL.js → SSPDID7X.js} +2 -2
  150. package/dist/cdn/{QP2QZCNB.js → T3LT7T5B.js} +2 -2
  151. package/dist/cdn/{UCL3FKAM.js → T47VPY6L.js} +2 -2
  152. package/dist/cdn/{PTHW47NY.js → T52DGCOX.js} +2 -2
  153. package/dist/cdn/{H6MU6GK5.js → T5MHNMEH.js} +2 -2
  154. package/dist/cdn/{C5XXT4VZ.js → T6W5CENK.js} +2 -2
  155. package/dist/cdn/{OWDVPSSR.js → TBTXMQA7.js} +1 -1
  156. package/dist/cdn/{CC257L24.js → TQ657J5L.js} +2 -2
  157. package/dist/cdn/{RXPLJ2VL.js → TWWHYPSV.js} +2 -2
  158. package/dist/cdn/{ST45DTBG.js → TY6C4SLL.js} +2 -2
  159. package/dist/cdn/{4CVVITN3.js → U2AHT7YI.js} +2 -2
  160. package/dist/cdn/{LFKCISGF.js → U75HWFU3.js} +2 -2
  161. package/dist/cdn/{DLE4EZOK.js → UY52BUYU.js} +3 -3
  162. package/dist/cdn/{3XYPJWRV.js → VAUFFMUF.js} +2 -2
  163. package/dist/cdn/{X34EUJLQ.js → VB53APO4.js} +2 -2
  164. package/dist/cdn/{LNTJQ4PT.js → VJVBT37W.js} +2 -2
  165. package/dist/cdn/{TXZ6GEZY.js → WBDA74LW.js} +2 -2
  166. package/dist/cdn/{URYEO57Y.js → WFH7FHYW.js} +2 -2
  167. package/dist/cdn/{JZKKWQRU.js → WIRSHBTT.js} +2 -2
  168. package/dist/cdn/{2I4NMCJM.js → WNCZF3NZ.js} +1 -1
  169. package/dist/cdn/{DIUM3TFV.js → WSQSFA3C.js} +2 -2
  170. package/dist/cdn/{V4KBZEWQ.js → WVWVXOJT.js} +2 -2
  171. package/dist/cdn/{2B6UWPMD.js → X2STFC3S.js} +2 -2
  172. package/dist/cdn/{6IMUN5WE.js → X32H5P2S.js} +1 -1
  173. package/dist/cdn/{XT2WM2WV.js → X6KZU4UC.js} +2 -2
  174. package/dist/cdn/{3IEF7654.js → XBQNBYAL.js} +2 -2
  175. package/dist/cdn/XDG2XVR5.js +6 -0
  176. package/dist/cdn/{P5QKGMQO.js → XJKHLS7Y.js} +2 -2
  177. package/dist/cdn/{M6KNLPXZ.js → XV55CFSY.js} +2 -2
  178. package/dist/cdn/{Z4DJDNXY.js → XVMGIHYO.js} +2 -2
  179. package/dist/cdn/{M27PLE77.js → Y2I5PQ67.js} +2 -2
  180. package/dist/cdn/Y7WHWGON.js +4 -0
  181. package/dist/cdn/YM65T3SP.js +4 -0
  182. package/dist/cdn/{L7ACHSLT.js → YOVQTRA2.js} +2 -2
  183. package/dist/cdn/{ESS4UIZK.js → YQDDOVQ6.js} +2 -2
  184. package/dist/cdn/{BL4EYCMZ.js → YSC43FQ7.js} +1 -1
  185. package/dist/cdn/{DU5SVVLI.js → YUK26VKH.js} +2 -2
  186. package/dist/cdn/{H6ORA3L7.js → Z3XRF3B6.js} +2 -2
  187. package/dist/cdn/{PWRENCSV.js → ZB52KUUI.js} +2 -2
  188. package/dist/cdn/{2UUPFZ24.js → ZS4FWRZC.js} +2 -2
  189. package/dist/cdn/index.js +2 -2
  190. package/dist/chart-rendering/common/data/utils/summarize-data/index.d.ts +2 -0
  191. package/dist/chunks/action-bar-utils.js +14 -15
  192. package/dist/chunks/axis-lines-symbol.js +8 -8
  193. package/dist/chunks/axis-model-wrapper.js +1 -1
  194. package/dist/chunks/bar-chart-model.js +10 -12
  195. package/dist/chunks/bar-chart-series.js +10 -12
  196. package/dist/chunks/bg_BG.js +1 -1
  197. package/dist/chunks/bg_BG2.js +1 -1
  198. package/dist/chunks/box-plot-data.js +86 -88
  199. package/dist/chunks/box-plot-model.js +10 -10
  200. package/dist/chunks/chart-ui-utils.js +1 -1
  201. package/dist/chunks/chart-ui-utils2.js +42 -43
  202. package/dist/chunks/class-breaks.js +1 -1
  203. package/dist/chunks/combo-bar-line-chart-model.js +12 -12
  204. package/dist/chunks/common.js +1 -1
  205. package/dist/chunks/data-labels-symbol.js +2 -2
  206. package/dist/chunks/data-labels-visibility.js +12 -14
  207. package/dist/chunks/data.js +33 -35
  208. package/dist/chunks/default.js +1 -1
  209. package/dist/chunks/gauge-model.js +66 -68
  210. package/dist/chunks/generate-x-axis-title.js +15 -16
  211. package/dist/chunks/heat-chart-model.js +28 -12
  212. package/dist/chunks/histogram-data.js +36 -37
  213. package/dist/chunks/histogram-model.js +6 -6
  214. package/dist/chunks/index.js +10971 -4624
  215. package/dist/chunks/index2.js +31 -32
  216. package/dist/chunks/index3.js +17 -17
  217. package/dist/chunks/index4.js +1 -1
  218. package/dist/chunks/index5.js +1 -1
  219. package/dist/chunks/interfaces.js +1 -1
  220. package/dist/chunks/line-chart-model.js +2 -2
  221. package/dist/chunks/model-setter.js +12 -14
  222. package/dist/chunks/model-with-multi-axes.js +125 -127
  223. package/dist/chunks/negative-values-stacked-to-baseline.js +1 -3
  224. package/dist/chunks/pie-chart-data.js +31 -32
  225. package/dist/chunks/pie-chart-model.js +9 -11
  226. package/dist/chunks/popover-ui-utils.js +1 -1
  227. package/dist/chunks/radar-chart-model.js +2 -4
  228. package/dist/chunks/resource.js +1 -1
  229. package/dist/chunks/rest-js-object-literals.js +1 -1
  230. package/dist/chunks/rotated-state.js +4 -5
  231. package/dist/chunks/runtime.js +1 -1
  232. package/dist/chunks/scatterplot-model.js +12 -13
  233. package/dist/chunks/serial-chart-data.js +200 -202
  234. package/dist/chunks/serial-chart-model.js +11 -11
  235. package/dist/chunks/series-types.js +1 -1
  236. package/dist/chunks/sk_SK.js +1 -1
  237. package/dist/chunks/store.js +1 -1
  238. package/dist/chunks/type-guards.js +1 -1
  239. package/dist/chunks/useT9n.js +1 -1
  240. package/dist/chunks/utils.js +48 -49
  241. package/dist/chunks/utils2.js +13 -15
  242. package/dist/chunks/web-component-utils.js +18 -18
  243. package/dist/chunks/x-axis-labels-visibility.js +1 -1
  244. package/dist/components/arcgis-chart/customElement.d.ts +26 -18
  245. package/dist/components/arcgis-chart/customElement.js +2 -4
  246. package/dist/components/arcgis-charts-action-bar/customElement.js +1 -1
  247. package/dist/components/arcgis-charts-config-axes/customElement.js +1 -1
  248. package/dist/components/arcgis-charts-config-axis/customElement.js +1 -1
  249. package/dist/components/arcgis-charts-config-bar-chart/customElement.js +6 -8
  250. package/dist/components/arcgis-charts-config-bar-chart-data/customElement.js +13 -14
  251. package/dist/components/arcgis-charts-config-bar-chart-popover/customElement.js +21 -22
  252. package/dist/components/arcgis-charts-config-bar-chart-series/customElement.js +2 -4
  253. package/dist/components/arcgis-charts-config-bar-chart-series-popover/customElement.js +5 -7
  254. package/dist/components/arcgis-charts-config-box-plot/customElement.js +5 -7
  255. package/dist/components/arcgis-charts-config-box-plot-data/customElement.js +2 -3
  256. package/dist/components/arcgis-charts-config-box-plot-popover/customElement.js +6 -7
  257. package/dist/components/arcgis-charts-config-box-plot-series/customElement.js +2 -4
  258. package/dist/components/arcgis-charts-config-box-plot-series-popover/customElement.js +1 -3
  259. package/dist/components/arcgis-charts-config-category-format/customElement.js +1 -1
  260. package/dist/components/arcgis-charts-config-chart-rename-popover/customElement.js +1 -3
  261. package/dist/components/arcgis-charts-config-color-style/customElement.js +1 -1
  262. package/dist/components/arcgis-charts-config-colors/customElement.js +1 -1
  263. package/dist/components/arcgis-charts-config-create-flow/customElement.js +2 -3
  264. package/dist/components/arcgis-charts-config-field-select/customElement.js +1 -1
  265. package/dist/components/arcgis-charts-config-font-style/customElement.js +2 -4
  266. package/dist/components/arcgis-charts-config-format/customElement.js +1 -3
  267. package/dist/components/arcgis-charts-config-format-popover/customElement.js +7 -9
  268. package/dist/components/arcgis-charts-config-general/customElement.js +5 -7
  269. package/dist/components/arcgis-charts-config-guide/customElement.js +8 -10
  270. package/dist/components/arcgis-charts-config-guide-popover/customElement.js +4 -6
  271. package/dist/components/arcgis-charts-config-guides/customElement.js +1 -1
  272. package/dist/components/arcgis-charts-config-guides-type-popover/customElement.js +1 -3
  273. package/dist/components/arcgis-charts-config-heat-chart/customElement.js +2 -4
  274. package/dist/components/arcgis-charts-config-heat-chart-data/customElement.js +47 -48
  275. package/dist/components/arcgis-charts-config-heat-chart-popover/customElement.d.ts +2 -2
  276. package/dist/components/arcgis-charts-config-heat-chart-popover/customElement.js +49 -50
  277. package/dist/components/arcgis-charts-config-histogram/customElement.js +2 -4
  278. package/dist/components/arcgis-charts-config-histogram-data/customElement.js +2 -3
  279. package/dist/components/arcgis-charts-config-histogram-popover/customElement.js +2 -3
  280. package/dist/components/arcgis-charts-config-info-modal/customElement.js +1 -1
  281. package/dist/components/arcgis-charts-config-invalid-input-message/customElement.js +1 -1
  282. package/dist/components/arcgis-charts-config-line-chart/customElement.js +2 -4
  283. package/dist/components/arcgis-charts-config-line-chart-data/customElement.js +6 -7
  284. package/dist/components/arcgis-charts-config-line-chart-popover/customElement.js +2 -3
  285. package/dist/components/arcgis-charts-config-line-chart-series/customElement.js +2 -4
  286. package/dist/components/arcgis-charts-config-line-chart-series-popover/customElement.js +1 -3
  287. package/dist/components/arcgis-charts-config-line-style/customElement.js +1 -1
  288. package/dist/components/arcgis-charts-config-number-format/customElement.js +1 -1
  289. package/dist/components/arcgis-charts-config-pie-chart/customElement.js +6 -8
  290. package/dist/components/arcgis-charts-config-pie-chart-data/customElement.js +2 -3
  291. package/dist/components/arcgis-charts-config-pie-chart-popover/customElement.js +5 -6
  292. package/dist/components/arcgis-charts-config-pie-chart-slices/customElement.js +2 -4
  293. package/dist/components/arcgis-charts-config-pie-chart-slices-popover/customElement.js +1 -3
  294. package/dist/components/arcgis-charts-config-scatter-plot/customElement.js +6 -8
  295. package/dist/components/arcgis-charts-config-scatter-plot-data/customElement.js +2 -3
  296. package/dist/components/arcgis-charts-config-scatter-plot-popover/customElement.js +2 -3
  297. package/dist/components/arcgis-charts-config-select-chart-type-popover/customElement.js +1 -3
  298. package/dist/components/arcgis-charts-config-view-charts/customElement.js +1 -3
  299. package/dist/docs/api.json +27 -30
  300. package/dist/docs/docs.json +20 -23
  301. package/dist/docs/vscode.html-custom-data.json +8 -8
  302. package/dist/docs/web-types.json +18 -18
  303. package/dist/index.js +365 -364
  304. package/dist/loader.js +1 -1
  305. package/dist/model/heat-chart-model/heat-chart-model.d.ts +17 -1
  306. package/dist/model.js +1 -1
  307. package/dist/utils/defaults/index.d.ts +4 -0
  308. package/dist/utils/layer/query-parser/index.d.ts +2 -2
  309. package/package.json +4 -6
  310. package/dist/cdn/44BSRIB6.js +0 -245
  311. package/dist/cdn/DT66DLSE.js +0 -4
  312. package/dist/cdn/HL56VPJ3.js +0 -6
  313. package/dist/cdn/I7KJMJCU.js +0 -34
  314. package/dist/cdn/IUPUQORP.js +0 -4
  315. package/dist/cdn/JPWTV7B4.js +0 -4
  316. package/dist/cdn/LLOLEX7C.js +0 -4
  317. package/dist/cdn/O54U6YLP.js +0 -4
  318. package/dist/cdn/SIPDJXUH.js +0 -4
  319. package/dist/cdn/WSAGKXYY.js +0 -4
@@ -1,7 +1,7 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.125 */
4
- import"./WJQVASCC.js";var G=function(o,e){return(G=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,s){t.__proto__=s}||function(t,s){for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(t[r]=s[r])})(o,e)};function u(o,e){function t(){this.constructor=o}G(o,e),o.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function H(o,e,t,s){return new(t||(t=Promise))((function(r,i){function n(p){try{c(s.next(p))}catch(l){i(l)}}function a(p){try{c(s.throw(p))}catch(l){i(l)}}function c(p){var l;p.done?r(p.value):(l=p.value,l instanceof t?l:new t((function(d){d(l)}))).then(n,a)}c((s=s.apply(o,e||[])).next())}))}function z(o,e){var t,s,r,i,n={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function a(c){return function(p){return(function(l){if(t)throw new TypeError("Generator is already executing.");for(;n;)try{if(t=1,s&&(r=2&l[0]?s.return:l[0]?s.throw||((r=s.return)&&r.call(s),0):s.next)&&!(r=r.call(s,l[1])).done)return r;switch(s=0,r&&(l=[2&l[0],r.value]),l[0]){case 0:case 1:r=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,s=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(r=n.trys,!((r=r.length>0&&r[r.length-1])||l[0]!==6&&l[0]!==2)){n=0;continue}if(l[0]===3&&(!r||l[1]>r[0]&&l[1]<r[3])){n.label=l[1];break}if(l[0]===6&&n.label<r[1]){n.label=r[1],r=l;break}if(r&&n.label<r[2]){n.label=r[2],n.ops.push(l);break}r[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(o,n)}catch(d){l=[6,d],s=0}finally{t=r=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}})([c,p])}}}function E(){for(var o=0,e=0,t=arguments.length;e<t;e++)o+=arguments[e].length;var s=Array(o),r=0;for(e=0;e<t;e++)for(var i=arguments[e],n=0,a=i.length;n<a;n++,r++)s[r]=i[n];return s}var h=(function(){function o(){}return o.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},o.setAttributes=function(e,t){for(var s=0,r=t;s<r.length;s++){var i=r[s],n=i[0],a=i[1];e.setAttribute(n,a)}},o.createRect=function(e,t,s){var r=document.createElementNS("http://www.w3.org/2000/svg","rect");return r.setAttribute("width",e.toString()),r.setAttribute("height",t.toString()),s&&o.setAttributes(r,s),r},o.createLine=function(e,t,s,r,i){var n=document.createElementNS("http://www.w3.org/2000/svg","line");return n.setAttribute("x1",e.toString()),n.setAttribute("y1",t.toString()),n.setAttribute("x2",s.toString()),n.setAttribute("y2",r.toString()),i&&o.setAttributes(n,i),n},o.createPolygon=function(e,t){var s=document.createElementNS("http://www.w3.org/2000/svg","polygon");return s.setAttribute("points",e),t&&o.setAttributes(s,t),s},o.createCircle=function(e,t){var s=document.createElementNS("http://www.w3.org/2000/svg","circle");return s.setAttribute("cx",(e/2).toString()),s.setAttribute("cy",(e/2).toString()),s.setAttribute("r",e.toString()),t&&o.setAttributes(s,t),s},o.createEllipse=function(e,t,s){var r=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return r.setAttribute("cx",(e/2).toString()),r.setAttribute("cy",(t/2).toString()),r.setAttribute("rx",(e/2).toString()),r.setAttribute("ry",(t/2).toString()),s&&o.setAttributes(r,s),r},o.createGroup=function(e){var t=document.createElementNS("http://www.w3.org/2000/svg","g");return e&&o.setAttributes(t,e),t},o.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},o.createMarker=function(e,t,s,r,i,n,a){var c=document.createElementNS("http://www.w3.org/2000/svg","marker");return o.setAttributes(c,[["id",e],["orient",t],["markerWidth",s.toString()],["markerHeight",r.toString()],["refX",i.toString()],["refY",n.toString()]]),c.appendChild(a),c},o.createText=function(e){var t=document.createElementNS("http://www.w3.org/2000/svg","text");return t.setAttribute("x","0"),t.setAttribute("y","0"),e&&o.setAttributes(t,e),t},o.createTSpan=function(e,t){var s=document.createElementNS("http://www.w3.org/2000/svg","tspan");return s.textContent=e,t&&o.setAttributes(s,t),s},o.createImage=function(e){var t=document.createElementNS("http://www.w3.org/2000/svg","image");return e&&o.setAttributes(t,e),t},o.createPoint=function(e,t){var s=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return s.x=e,s.y=t,s},o.createPath=function(e,t){var s=document.createElementNS("http://www.w3.org/2000/svg","path");return s.setAttribute("d",e),t&&o.setAttributes(s,t),s},o})(),R=(function(){function o(){}return o.addKey=function(e){o.key=e},Object.defineProperty(o,"isLicensed",{get:function(){return!!o.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(o.key)},enumerable:!1,configurable:!0}),o})(),J=(function(){function o(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return o.prototype.rasterize=function(e,t,s){var r=this;return new Promise((function(i){var n=s!==void 0?s:document.createElement("canvas");e===null&&(r.markersOnly=!0,r.naturalSize=!1);var a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.setAttribute("xmlns","http://www.w3.org/2000/svg"),a.setAttribute("width",t.width.baseVal.valueAsString),a.setAttribute("height",t.height.baseVal.valueAsString),a.setAttribute("viewBox","0 0 "+t.viewBox.baseVal.width.toString()+" "+t.viewBox.baseVal.height.toString()),a.innerHTML=t.innerHTML,r.naturalSize===!0?(a.width.baseVal.value=e.naturalWidth,a.height.baseVal.value=e.naturalHeight):r.width!==void 0&&r.height!==void 0&&(a.width.baseVal.value=r.width,a.height.baseVal.value=r.height),n.width=a.width.baseVal.value,n.height=a.height.baseVal.value;var c=a.outerHTML,p=n.getContext("2d");r.markersOnly!==!0&&p.drawImage(e,0,0,n.width,n.height);var l=window.URL,d=new Image(n.width,n.height);d.setAttribute("crossOrigin","anonymous");var f=new Blob([c],{type:"image/svg+xml"}),C=l.createObjectURL(f);d.onload=function(){p.drawImage(d,0,0),l.revokeObjectURL(C);var K=n.toDataURL(r.imageType,r.imageQuality);i(K)},d.src=C}))},o})(),O=function(){},Q=(function(){function o(e){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+e+"_"}return Object.defineProperty(o.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),o.prototype.addClass=function(e){return this.styleSheet===void 0&&this.addStyleSheet(),e.name=""+this.classNamePrefix+e.localName,this.classes.push(e),this.styleSheet.sheet.insertRule("."+e.name+" {"+e.style+"}",this.styleSheet.sheet.cssRules.length),e},o.prototype.addRule=function(e){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(e),this.styleSheet.sheet.insertRule(e.selector+" {"+e.style+"}",this.styleSheet.sheet.cssRules.length)},o.prototype.addStyleSheet=function(){var e;this.styleSheet=document.createElement("style"),((e=this.styleSheetRoot)!==null&&e!==void 0?e:document.head).appendChild(this.styleSheet),this.addRule(new m("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new m("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
3
+ v5.0.0-next.127 */
4
+ import"./PG43TIFC.js";var G=function(o,e){return(G=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,s){t.__proto__=s}||function(t,s){for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(t[r]=s[r])})(o,e)};function u(o,e){function t(){this.constructor=o}G(o,e),o.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function H(o,e,t,s){return new(t||(t=Promise))((function(r,i){function n(p){try{c(s.next(p))}catch(l){i(l)}}function a(p){try{c(s.throw(p))}catch(l){i(l)}}function c(p){var l;p.done?r(p.value):(l=p.value,l instanceof t?l:new t((function(d){d(l)}))).then(n,a)}c((s=s.apply(o,e||[])).next())}))}function z(o,e){var t,s,r,i,n={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function a(c){return function(p){return(function(l){if(t)throw new TypeError("Generator is already executing.");for(;n;)try{if(t=1,s&&(r=2&l[0]?s.return:l[0]?s.throw||((r=s.return)&&r.call(s),0):s.next)&&!(r=r.call(s,l[1])).done)return r;switch(s=0,r&&(l=[2&l[0],r.value]),l[0]){case 0:case 1:r=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,s=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(r=n.trys,!((r=r.length>0&&r[r.length-1])||l[0]!==6&&l[0]!==2)){n=0;continue}if(l[0]===3&&(!r||l[1]>r[0]&&l[1]<r[3])){n.label=l[1];break}if(l[0]===6&&n.label<r[1]){n.label=r[1],r=l;break}if(r&&n.label<r[2]){n.label=r[2],n.ops.push(l);break}r[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(o,n)}catch(d){l=[6,d],s=0}finally{t=r=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}})([c,p])}}}function E(){for(var o=0,e=0,t=arguments.length;e<t;e++)o+=arguments[e].length;var s=Array(o),r=0;for(e=0;e<t;e++)for(var i=arguments[e],n=0,a=i.length;n<a;n++,r++)s[r]=i[n];return s}var h=(function(){function o(){}return o.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},o.setAttributes=function(e,t){for(var s=0,r=t;s<r.length;s++){var i=r[s],n=i[0],a=i[1];e.setAttribute(n,a)}},o.createRect=function(e,t,s){var r=document.createElementNS("http://www.w3.org/2000/svg","rect");return r.setAttribute("width",e.toString()),r.setAttribute("height",t.toString()),s&&o.setAttributes(r,s),r},o.createLine=function(e,t,s,r,i){var n=document.createElementNS("http://www.w3.org/2000/svg","line");return n.setAttribute("x1",e.toString()),n.setAttribute("y1",t.toString()),n.setAttribute("x2",s.toString()),n.setAttribute("y2",r.toString()),i&&o.setAttributes(n,i),n},o.createPolygon=function(e,t){var s=document.createElementNS("http://www.w3.org/2000/svg","polygon");return s.setAttribute("points",e),t&&o.setAttributes(s,t),s},o.createCircle=function(e,t){var s=document.createElementNS("http://www.w3.org/2000/svg","circle");return s.setAttribute("cx",(e/2).toString()),s.setAttribute("cy",(e/2).toString()),s.setAttribute("r",e.toString()),t&&o.setAttributes(s,t),s},o.createEllipse=function(e,t,s){var r=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return r.setAttribute("cx",(e/2).toString()),r.setAttribute("cy",(t/2).toString()),r.setAttribute("rx",(e/2).toString()),r.setAttribute("ry",(t/2).toString()),s&&o.setAttributes(r,s),r},o.createGroup=function(e){var t=document.createElementNS("http://www.w3.org/2000/svg","g");return e&&o.setAttributes(t,e),t},o.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},o.createMarker=function(e,t,s,r,i,n,a){var c=document.createElementNS("http://www.w3.org/2000/svg","marker");return o.setAttributes(c,[["id",e],["orient",t],["markerWidth",s.toString()],["markerHeight",r.toString()],["refX",i.toString()],["refY",n.toString()]]),c.appendChild(a),c},o.createText=function(e){var t=document.createElementNS("http://www.w3.org/2000/svg","text");return t.setAttribute("x","0"),t.setAttribute("y","0"),e&&o.setAttributes(t,e),t},o.createTSpan=function(e,t){var s=document.createElementNS("http://www.w3.org/2000/svg","tspan");return s.textContent=e,t&&o.setAttributes(s,t),s},o.createImage=function(e){var t=document.createElementNS("http://www.w3.org/2000/svg","image");return e&&o.setAttributes(t,e),t},o.createPoint=function(e,t){var s=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return s.x=e,s.y=t,s},o.createPath=function(e,t){var s=document.createElementNS("http://www.w3.org/2000/svg","path");return s.setAttribute("d",e),t&&o.setAttributes(s,t),s},o})(),R=(function(){function o(){}return o.addKey=function(e){o.key=e},Object.defineProperty(o,"isLicensed",{get:function(){return!!o.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(o.key)},enumerable:!1,configurable:!0}),o})(),J=(function(){function o(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return o.prototype.rasterize=function(e,t,s){var r=this;return new Promise((function(i){var n=s!==void 0?s:document.createElement("canvas");e===null&&(r.markersOnly=!0,r.naturalSize=!1);var a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.setAttribute("xmlns","http://www.w3.org/2000/svg"),a.setAttribute("width",t.width.baseVal.valueAsString),a.setAttribute("height",t.height.baseVal.valueAsString),a.setAttribute("viewBox","0 0 "+t.viewBox.baseVal.width.toString()+" "+t.viewBox.baseVal.height.toString()),a.innerHTML=t.innerHTML,r.naturalSize===!0?(a.width.baseVal.value=e.naturalWidth,a.height.baseVal.value=e.naturalHeight):r.width!==void 0&&r.height!==void 0&&(a.width.baseVal.value=r.width,a.height.baseVal.value=r.height),n.width=a.width.baseVal.value,n.height=a.height.baseVal.value;var c=a.outerHTML,p=n.getContext("2d");r.markersOnly!==!0&&p.drawImage(e,0,0,n.width,n.height);var l=window.URL,d=new Image(n.width,n.height);d.setAttribute("crossOrigin","anonymous");var f=new Blob([c],{type:"image/svg+xml"}),C=l.createObjectURL(f);d.onload=function(){p.drawImage(d,0,0),l.revokeObjectURL(C);var K=n.toDataURL(r.imageType,r.imageQuality);i(K)},d.src=C}))},o})(),O=function(){},Q=(function(){function o(e){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+e+"_"}return Object.defineProperty(o.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),o.prototype.addClass=function(e){return this.styleSheet===void 0&&this.addStyleSheet(),e.name=""+this.classNamePrefix+e.localName,this.classes.push(e),this.styleSheet.sheet.insertRule("."+e.name+" {"+e.style+"}",this.styleSheet.sheet.cssRules.length),e},o.prototype.addRule=function(e){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(e),this.styleSheet.sheet.insertRule(e.selector+" {"+e.style+"}",this.styleSheet.sheet.cssRules.length)},o.prototype.addStyleSheet=function(){var e;this.styleSheet=document.createElement("style"),((e=this.styleSheetRoot)!==null&&e!==void 0?e:document.head).appendChild(this.styleSheet),this.addRule(new m("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new m("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
5
5
  from {
6
6
  opacity: 0;
7
7
  }
@@ -126,4 +126,4 @@ import"./WJQVASCC.js";var G=function(o,e){return(G=Object.setPrototypeOf||{__pro
126
126
  <polygon points="0,5 10,0 10,10" fill="`+(i.uiStyleSettings!==void 0?i.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
127
127
  </svg>`,l.style.marginLeft="5px",p.appendChild(l)}var d=document.createElement("div");d.style.display="flex",d.style.alignItems="center",d.style.minHeight="20px",d.style.flexGrow="2";var f=document.createElement("hr");if(f.style.minWidth="20px",f.style.border="0px",f.style.borderTop="3px solid "+(i.uiStyleSettings!==void 0?i.uiStyleSettings.toolboxColor:"#eeeeee"),f.style.flexGrow="2",d.appendChild(f),p.appendChild(d),c==="both"||c==="end"){var C=document.createElement("div");C.style.display="flex",C.style.alignItems="center",C.style.minHeight="20px",C.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
128
128
  <polygon points="0,0 10,5 0,10" fill="`+(i.uiStyleSettings!==void 0?i.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
129
- </svg>`,C.style.marginRight="5px",p.appendChild(C)}i.typeBoxes.push(p)},i=this,n=0;n<4;n++)r(n);return s},e.prototype.setCurrentType=function(t,s){var r=this;this.currentType=t,this.typeBoxes.forEach((function(i){i.style.borderColor=i===s?r.uiStyleSettings!==void 0?r.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"})),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},e})(x),L=(function(o){function e(t,s,r){var i=o.call(this,t,s,r)||this;return i.arrowType="end",i.arrowBaseHeight=10,i.arrowBaseWidth=10,i.getArrowPoints=i.getArrowPoints.bind(i),i.setArrowType=i.setArrowType.bind(i),i.arrowTypePanel=new it("Arrow type","end"),i.arrowTypePanel.onArrowTypeChanged=i.setArrowType,i}return u(e,o),e.prototype.ownsTarget=function(t){return!(!o.prototype.ownsTarget.call(this,t)&&t!==this.arrow1&&t!==this.arrow2)},e.prototype.getArrowPoints=function(t,s){var r=this.arrowBaseWidth+2*this.strokeWidth,i=this.arrowBaseHeight+2*this.strokeWidth;return t-r/2+","+(s+i/2)+" "+t+","+(s-i/2)+" "+(t+r/2)+","+(s+i/2)},e.prototype.createTips=function(){this.arrow1=h.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(h.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=h.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(h.createTransform()),this.visual.appendChild(this.arrow2)},e.prototype.pointerDown=function(t,s){o.prototype.pointerDown.call(this,t,s),this.state==="creating"&&this.createTips()},e.prototype.adjustVisual=function(){if(o.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2){this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",h.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),h.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var t=0;Math.abs(this.x1-this.x2)>.1&&(t=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var s=this.arrow1.transform.baseVal.getItem(0);s.setRotate(t,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(s,0);var r=this.arrow2.transform.baseVal.getItem(0);r.setRotate(t+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(r,0)}},e.prototype.setArrowType=function(t){this.arrowType=t,this.adjustVisual(),this.stateChanged()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var t=Object.assign({arrowType:this.arrowType},o.prototype.getState.call(this));return t.typeName=e.typeName,t},e.prototype.restoreState=function(t){o.prototype.restoreState.call(this,t);var s=t;this.arrowType=s.arrowType,this.createTips(),this.adjustVisual()},e.typeName="ArrowMarker",e.title="Arrow marker",e.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',e})(I),X=(function(o){function e(t,s,r){var i=o.call(this,t,s,r)||this;return i.fillColor=r.defaultFillColor,i.strokeWidth=0,i.fillPanel=new g("Color",r.defaultColorSet,r.defaultFillColor),i.fillPanel.onColorChanged=i.setFillColor,i}return u(e,o),Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var t=o.prototype.getState.call(this);return t.typeName=e.typeName,t},e.typeName="CoverMarker",e.title="Cover marker",e.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',e})(j),Y=(function(o){function e(t,s,r,i,n){var a=o.call(this,t,i||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>',n||"opacity-panel")||this;return a.opacities=[],a.opacityBoxes=[],a.opacities=s,a.currentOpacity=r,a.setCurrentOpacity=a.setCurrentOpacity.bind(a),a}return u(e,o),e.prototype.getUi=function(){var t=this,s=document.createElement("div");return s.style.display="flex",s.style.overflow="hidden",s.style.flexGrow="2",s.style.justifyContent="space-between",this.opacities.forEach((function(r){var i=document.createElement("div");i.style.display="flex",i.style.alignItems="center",i.style.justifyContent="center",i.style.padding="5px",i.style.borderWidth="2px",i.style.borderStyle="solid",i.style.borderColor=r===t.currentOpacity?t.uiStyleSettings.toolboxAccentColor:"transparent",i.addEventListener("click",(function(){t.setCurrentOpacity(r,i)})),s.appendChild(i);var n=document.createElement("div");n.innerText=100*r+"%",i.appendChild(n),t.opacityBoxes.push(i)})),s},e.prototype.setCurrentOpacity=function(t,s){var r=this;this.currentOpacity=t,this.opacityBoxes.forEach((function(i){i.style.borderColor=i===s?r.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},e})(x),D=(function(o){function e(t,s,r){var i=o.call(this,t,s,r)||this;return i.setOpacity=i.setOpacity.bind(i),i.fillColor=r.defaultHighlightColor,i.strokeWidth=0,i.opacity=r.defaultHighlightOpacity,i.fillPanel=new g("Color",r.defaultColorSet,i.fillColor),i.fillPanel.onColorChanged=i.setFillColor,i.opacityPanel=new Y("Opacity",r.defaultOpacitySteps,i.opacity),i.opacityPanel.onOpacityChanged=i.setOpacity,i}return u(e,o),e.prototype.setOpacity=function(t){this.opacity=t,this.visual&&h.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var t=o.prototype.getState.call(this);return t.typeName=e.typeName,t},e.typeName="HighlightMarker",e.title="Highlight marker",e.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',e})(X),Z='<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>',N='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',V=(function(o){function e(t,s,r){var i=o.call(this,t,s,r)||this;return i.bgColor="transparent",i.tipPosition={x:0,y:0},i.tipBase1Position={x:0,y:0},i.tipBase2Position={x:0,y:0},i.tipMoving=!1,i.color=r.defaultStrokeColor,i.bgColor=r.defaultFillColor,i.fontFamily=r.defaultFontFamily,i.defaultSize={x:100,y:30},i.setBgColor=i.setBgColor.bind(i),i.getTipPoints=i.getTipPoints.bind(i),i.positionTip=i.positionTip.bind(i),i.setTipPoints=i.setTipPoints.bind(i),i.colorPanel=new g("Text color",r.defaultColorSet,i.color,Z,"text-color-panel"),i.colorPanel.onColorChanged=i.setColor,i.bgColorPanel=new g("Fill color",r.defaultColorSet,i.bgColor,N,"fill-color-panel"),i.bgColorPanel.onColorChanged=i.setBgColor,i.fontFamilyPanel=new W("Font",r.defaultFontFamilies,r.defaultFontFamily),i.fontFamilyPanel.onFontChanged=i.setFont,i.tipGrip=new _,i.tipGrip.visual.transform.baseVal.appendItem(h.createTransform()),i.controlBox.appendChild(i.tipGrip.visual),i}return u(e,o),e.prototype.ownsTarget=function(t){return o.prototype.ownsTarget.call(this,t)||this.tipGrip.ownsTarget(t)||this.tip===t},e.prototype.createTip=function(){h.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=h.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},e.prototype.pointerDown=function(t,s){this.state==="new"&&o.prototype.pointerDown.call(this,t,s),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(s)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):o.prototype.pointerDown.call(this,t,s)},e.prototype.pointerUp=function(t){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,o.prototype.pointerUp.call(this,t);else{var s=this.state==="creating";o.prototype.pointerUp.call(this,t),this.setTipPoints(s),this.positionTip()}},e.prototype.manipulate=function(t){if(this.tipMoving){var s=this.unrotatePoint(t);this.tipPosition={x:s.x-this.manipulationStartLeft,y:s.y-this.manipulationStartTop},this.positionTip()}else o.prototype.manipulate.call(this,t)},e.prototype.setBgColor=function(t){this.bgRectangle&&this.tip&&(h.setAttributes(this.bgRectangle,[["fill",t]]),h.setAttributes(this.tip,[["fill",t]])),this.bgColor=t,this.fillColorChanged(t)},e.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},e.prototype.setTipPoints=function(t){t===void 0&&(t=!1);var s=Math.min(this.height/2,15),r=this.height/5;t&&(this.tipPosition={x:s+r/2,y:this.height+20});var i=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?i<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(r=this.width/5,s=Math.min(this.width/2,15),this.tipBase1Position={x:s,y:0},this.tipBase2Position={x:s+r,y:0}):(this.tipBase1Position={x:0,y:s},this.tipBase2Position={x:0,y:s+r}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?i<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(r=this.width/5,s=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-s-r,y:0},this.tipBase2Position={x:this.width-s,y:0}):(this.tipBase1Position={x:this.width,y:s},this.tipBase2Position={x:this.width,y:s+r}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?i<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(r=this.width/5,s=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-s-r,y:this.height},this.tipBase2Position={x:this.width-s,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-s-r},this.tipBase2Position={x:this.width,y:this.height-s}):i<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(r=this.width/5,s=Math.min(this.width/2,15),this.tipBase1Position={x:s,y:this.height},this.tipBase2Position={x:s+r,y:this.height}):(this.tipBase1Position={x:0,y:this.height-s},this.tipBase2Position={x:0,y:this.height-s-r})},e.prototype.resize=function(t){o.prototype.resize.call(this,t),this.positionTip()},e.prototype.positionTip=function(){h.setAttributes(this.tip,[["points",this.getTipPoints()]]);var t=this.tipGrip.visual.transform.baseVal.getItem(0);t.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(t,0)},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),e.prototype.select=function(){this.positionTip(),o.prototype.select.call(this)},e.prototype.getState=function(){var t=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},o.prototype.getState.call(this));return t.typeName=e.typeName,t},e.prototype.restoreState=function(t){var s=t;this.bgColor=s.bgColor,this.tipPosition=s.tipPosition,o.prototype.restoreState.call(this,t),this.createTip(),this.setTipPoints()},e.prototype.scale=function(t,s){o.prototype.scale.call(this,t,s),this.tipPosition={x:this.tipPosition.x*t,y:this.tipPosition.y*s},this.positionTip()},e.typeName="CalloutMarker",e.title="Callout marker",e.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',e})(w),A=(function(o){function e(t,s,r){var i=o.call(this,t,s,r)||this;return i.fillColor="transparent",i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.opacity=1,i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.fillColor=r.defaultFillColor,i.setStrokeColor=i.setStrokeColor.bind(i),i.setFillColor=i.setFillColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.setOpacity=i.setOpacity.bind(i),i.createVisual=i.createVisual.bind(i),i.strokePanel=new g("Line color",E(r.defaultColorSet,["transparent"]),r.defaultColor,void 0,"stroke-color-panel"),i.strokePanel.onColorChanged=i.setStrokeColor,i.fillPanel=new g("Fill color",E(r.defaultColorSet,["transparent"]),i.fillColor,N,"fill-color-panel"),i.fillPanel.onColorChanged=i.setFillColor,i.strokeWidthPanel=new S("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new M("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i.opacityPanel=new Y("Opacity",r.defaultOpacitySteps,i.opacity),i.opacityPanel.onOpacityChanged=i.setOpacity,i}return u(e,o),e.prototype.ownsTarget=function(t){return!(!o.prototype.ownsTarget.call(this,t)&&t!==this.visual)},e.prototype.createVisual=function(){this.visual=h.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},e.prototype.pointerDown=function(t,s){o.prototype.pointerDown.call(this,t,s),this.state==="new"&&(this.createVisual(),this.moveVisual(t),this._state="creating")},e.prototype.manipulate=function(t){o.prototype.manipulate.call(this,t)},e.prototype.resize=function(t){o.prototype.resize.call(this,t),this.setSize()},e.prototype.setSize=function(){o.prototype.setSize.call(this),h.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},e.prototype.pointerUp=function(t){o.prototype.pointerUp.call(this,t),this.setSize()},e.prototype.setStrokeColor=function(t){this.strokeColor=t,this.visual&&h.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(t),this.stateChanged()},e.prototype.setFillColor=function(t){this.fillColor=t,this.visual&&h.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(t),this.stateChanged()},e.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.visual&&h.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},e.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.visual&&h.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},e.prototype.setOpacity=function(t){this.opacity=t,this.visual&&h.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var t=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},o.prototype.getState.call(this));return t.typeName=e.typeName,t},e.prototype.restoreState=function(t){var s=t;this.fillColor=s.fillColor,this.strokeColor=s.strokeColor,this.strokeWidth=s.strokeWidth,this.strokeDasharray=s.strokeDasharray,this.opacity=s.opacity,this.createVisual(),o.prototype.restoreState.call(this,t),this.setSize()},e.prototype.scale=function(t,s){o.prototype.scale.call(this,t,s),this.setSize()},e.typeName="EllipseMarker",e.title="Ellipse marker",e.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',e})(B),st=(function(o){function e(t,s,r){return o.call(this,t,s,r)||this}return u(e,o),Object.defineProperty(e.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),e.prototype.ownsTarget=function(t){return!(!o.prototype.ownsTarget.call(this,t)&&t!==this.tip1&&t!==this.tip2)},e.prototype.createTips=function(){this.tip1=h.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(h.createTransform()),this.visual.appendChild(this.tip1),this.tip2=h.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(h.createTransform()),this.visual.appendChild(this.tip2)},e.prototype.pointerDown=function(t,s){o.prototype.pointerDown.call(this,t,s),this.state==="creating"&&this.createTips()},e.prototype.adjustVisual=function(){if(o.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(h.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),h.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var t=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),s=this.tip1.transform.baseVal.getItem(0);s.setRotate(t,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(s,0);var r=this.tip2.transform.baseVal.getItem(0);r.setRotate(t+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(r,0)}},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var t=o.prototype.getState.call(this);return t.typeName=e.typeName,t},e.prototype.restoreState=function(t){o.prototype.restoreState.call(this,t),this.createTips(),this.adjustVisual()},e.typeName="MeasurementMarker",e.title="Measurement marker",e.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',e})(I),ot=(function(o){function e(t,s,r){var i=o.call(this,t,s,r)||this;return i.strokePanel.colors=r.defaultColorSet,i.fillColor="transparent",i}return u(e,o),Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var t=o.prototype.getState.call(this);return t.typeName=e.typeName,t},e.typeName="EllipseFrameMarker",e.title="Ellipse frame marker",e.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',e})(A),rt=(function(){function o(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(o.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),o.prototype.addUndoStep=function(e){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(e)||(this.undoStack.push(e),JSON.stringify(this.lastRedoStep)!==JSON.stringify(e)&&this.redoStack.splice(0,this.redoStack.length))},o.prototype.replaceLastUndoStep=function(e){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=e)},o.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},o.prototype.undo=function(){if(this.undoStack.length>1){var e=this.undoStack.pop();return e!==void 0&&this.redoStack.push(e),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},o.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},o})(),nt=(function(o){function e(t,s,r){var i=o.call(this,t,s,r)||this;return i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.curveX=0,i.curveY=0,i.manipulationStartCurveX=0,i.manipulationStartCurveY=0,i.setStrokeColor=i.setStrokeColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.positionGrips=i.positionGrips.bind(i),i.addControlGrips=i.addControlGrips.bind(i),i.adjustVisual=i.adjustVisual.bind(i),i.setupControlBox=i.setupControlBox.bind(i),i.resize=i.resize.bind(i),i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.strokePanel=new g("Line color",r.defaultColorSet,r.defaultColor),i.strokePanel.onColorChanged=i.setStrokeColor,i.strokeWidthPanel=new S("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new M("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i}return u(e,o),e.prototype.ownsTarget=function(t){return!(!o.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.selectorCurve&&t!==this.visibleCurve&&!this.curveGrip.ownsTarget(t))},e.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},e.prototype.createVisual=function(){this.visual=h.createGroup(),this.selectorCurve=h.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=h.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},e.prototype.pointerDown=function(t,s){o.prototype.pointerDown.call(this,t,s),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=t.x,this.curveY=t.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(s)&&(this.activeGrip=this.curveGrip,this._state="resize")},e.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),h.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),h.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),h.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},e.prototype.setupControlBox=function(){o.prototype.setupControlBox.call(this),this.curveControlLine1=h.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=h.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},e.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,o.prototype.addControlGrips.call(this)},e.prototype.positionGrips=function(){o.prototype.positionGrips.call(this);var t=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-t/2,this.curveY-t/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},e.prototype.manipulate=function(t){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+t.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+t.y-this.manipulationStartY),o.prototype.manipulate.call(this,t)},e.prototype.resize=function(t){this.activeGrip===this.curveGrip&&(this.curveX=t.x,this.curveY=t.y),o.prototype.resize.call(this,t),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},e.prototype.setStrokeColor=function(t){this.strokeColor=t,this.adjustVisual(),this.colorChanged(t)},e.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.adjustVisual()},e.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.adjustVisual()},e.prototype.scale=function(t,s){this.curveX=this.curveX*t,this.curveY=this.curveY*s,o.prototype.scale.call(this,t,s)},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var t=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},o.prototype.getState.call(this));return t.typeName=e.typeName,t},e.prototype.restoreState=function(t){o.prototype.restoreState.call(this,t);var s=t;this.strokeColor=s.strokeColor,this.strokeWidth=s.strokeWidth,this.strokeDasharray=s.strokeDasharray,this.curveX=s.curveX,this.curveY=s.curveY,this.createVisual(),this.adjustVisual()},e.typeName="CurveMarker",e.title="Curve marker",e.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',e})(U),at=(function(o){function e(t,s,r){var i=o.call(this,t,s,r)||this;return i.fillColor="transparent",i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.textColor="transparent",i.fontSize="1rem",i.isMoved=!1,i.captionText="Caption",i.PADDING=5,i.captionBoxWidth=0,i.captionBoxHeight=0,i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.fillColor=r.defaultFillColor,i.textColor=r.defaultStrokeColor,i.fontFamily=r.defaultFontFamily,i.fontSize=r.defaultCaptionFontSize,i.captionText=r.defaultCaptionText,i.setStrokeColor=i.setStrokeColor.bind(i),i.setFillColor=i.setFillColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.createVisual=i.createVisual.bind(i),i.sizeCaption=i.sizeCaption.bind(i),i.setCaptionText=i.setCaptionText.bind(i),i.showTextEditor=i.showTextEditor.bind(i),i.positionTextEditor=i.positionTextEditor.bind(i),i.finishTextEditing=i.finishTextEditing.bind(i),i.setFont=i.setFont.bind(i),i.setTextColor=i.setTextColor.bind(i),i.strokePanel=new g("Line color",E(r.defaultColorSet,["transparent"]),i.strokeColor,void 0,"stroke-color-panel"),i.strokePanel.onColorChanged=i.setStrokeColor,i.fillPanel=new g("Fill color",E(r.defaultColorSet,["transparent"]),i.fillColor,N,"fill-color-panel"),i.fillPanel.onColorChanged=i.setFillColor,i.strokeWidthPanel=new S("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new M("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i.fontFamilyPanel=new W("Font",r.defaultFontFamilies,r.defaultFontFamily),i.fontFamilyPanel.onFontChanged=i.setFont,i.textColorPanel=new g("Text color",r.defaultColorSet,i.textColor,Z,"text-color-panel"),i.textColorPanel.onColorChanged=i.setTextColor,i}return u(e,o),e.prototype.ownsTarget=function(t){return!(!o.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.frame&&t!==this.captionBg&&t!==this.captionElement)},e.prototype.createVisual=function(){this.visual=h.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=h.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=h.createText([["fill",this.textColor],["font-family",this.fontFamily]]),this.captionElement.style.fontSize=this.fontSize,this.captionElement.style.textAnchor="start",this.captionElement.style.dominantBaseline="text-before-edge",this.captionElement.textContent=this.captionText,this.visual.appendChild(this.captionElement),this.frame=h.createRect(this.width,this.height,[["fill","transparent"],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray]]),this.visual.appendChild(this.frame),this.sizeCaption()},e.prototype.setCaptionText=function(t){this.captionText=t,this.captionElement.textContent=this.captionText,this.sizeCaption()},e.prototype.pointerDown=function(t,s){o.prototype.pointerDown.call(this,t,s),this.isMoved=!1,this.pointerDownPoint=t,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(t),this._state="creating")},e.prototype.manipulate=function(t){o.prototype.manipulate.call(this,t),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(t.x-this.pointerDownPoint.x)>5||Math.abs(t.y-this.pointerDownPoint.y)>5)},e.prototype.resize=function(t){o.prototype.resize.call(this,t),this.setSize()},e.prototype.sizeCaption=function(){var t=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=t.width+2*this.PADDING,this.captionBoxHeight=t.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),h.setAttributes(this.captionBg,[["width",this.captionBoxWidth.toString()],["height",this.captionBoxHeight.toString()],["clip-path","path('M0,0 H"+this.width+" V"+this.height+" H"+-this.width+" Z')"]]),h.setAttributes(this.captionElement,[["x",this.PADDING.toString()],["y",this.PADDING.toString()],["clip-path","path('M0,0 H"+(this.width-this.PADDING)+" V"+this.height+" H"+(-this.width-this.PADDING)+" Z')"]])},e.prototype.showTextEditor=function(){var t=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditBox=document.createElement("input"),this.textEditBox.style.position="absolute",this.textEditBox.style.width=this.width+"px",this.captionBoxHeight>0&&(this.textEditBox.style.height=this.captionBoxHeight+"px"),this.textEditBox.style.fontSize=this.fontSize,this.textEditBox.style.fontFamily=this.fontFamily,this.textEditBox.style.backgroundColor=this.fillColor,this.textEditBox.style.color=this.textColor,this.textEditBox.style.borderWidth="0",this.textEditBox.setAttribute("value",this.captionText),this.textEditBox.select(),this.textEditDiv.appendChild(this.textEditBox),this.overlayContainer.appendChild(this.textEditDiv),this.textEditBox.addEventListener("pointerup",(function(s){s.stopPropagation()})),this.textEditBox.addEventListener("keypress",(function(s){s.key==="Enter"&&t.finishTextEditing(t.textEditBox.value)})),this.textEditBox.addEventListener("keyup",(function(s){s.cancelBubble=!0})),this.textEditBox.addEventListener("blur",(function(){t.finishTextEditing(t.textEditBox.value)})),this.textEditDiv.addEventListener("pointerup",(function(){t.finishTextEditing(t.textEditBox.value)})),this.positionTextEditor(),this.textEditBox.focus()},e.prototype.positionTextEditor=function(){this.state==="edit"&&(this.textEditBox===void 0?this.showTextEditor():(this.textEditBox.style.left=this.left+"px",this.textEditBox.style.top=this.top+"px",this.textEditBox.style.transform="rotate("+this.rotationAngle+"deg)",this.textEditBox.style.transformOrigin=this.width/2+"px "+this.height/2+"px"))},e.prototype.finishTextEditing=function(t){this.setCaptionText(t.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},e.prototype.setFont=function(t){this.captionElement&&h.setAttributes(this.captionElement,[["font-family",t]]),this.fontFamily=t,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},e.prototype.setTextColor=function(t){this.captionElement&&h.setAttributes(this.captionElement,[["fill",t]]),this.textColor=t,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},e.prototype.setSize=function(){o.prototype.setSize.call(this),h.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},e.prototype.pointerUp=function(t){o.prototype.pointerUp.call(this,t),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},e.prototype.dblClick=function(t,s){o.prototype.dblClick.call(this,t,s),this.showTextEditor()},e.prototype.setStrokeColor=function(t){this.strokeColor=t,this.frame&&h.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(t),this.stateChanged()},e.prototype.setFillColor=function(t){this.fillColor=t,this.captionBg&&h.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(t),this.stateChanged()},e.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.frame&&h.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},e.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.frame&&h.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var t=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:1,textColor:this.textColor,fontFamily:this.fontFamily,fontSize:this.fontSize,captionText:this.captionText},o.prototype.getState.call(this));return t.typeName=this.typeName,t},e.prototype.restoreState=function(t){var s=t;this.fillColor=s.fillColor,this.strokeColor=s.strokeColor,this.strokeWidth=s.strokeWidth,this.strokeDasharray=s.strokeDasharray,this.textColor=s.textColor,this.fontFamily=s.fontFamily,this.captionText=s.captionText,this.fontSize=s.fontSize,this.createVisual(),o.prototype.restoreState.call(this,t),this.setSize()},e.prototype.scale=function(t,s){o.prototype.scale.call(this,t,s),this.setSize()},e.typeName="CaptionFrameMarker",e.title="Caption frame marker",e.icon='<svg viewBox="0 0 24 24"><path d="M5 3c-1.11 0-2 .89-2 2v14c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2V5c0-1.11-.89-2-2-2H5m0 2h14v14H5V5m2 2v2h10V7H7z"/></svg>',e})(B),v=(function(){function o(e,t){t===void 0&&(t=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=e,this.cancelable=t}return Object.defineProperty(o.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),o.prototype.preventDefault=function(){this._defaultPrevented=!0},o})(),ht=(function(o){function e(t,s,r){var i=o.call(this,t,!1)||this;return i.dataUrl=s,i.state=r,i}return u(e,o),e})(v),b=(function(o){function e(t,s,r){r===void 0&&(r=!1);var i=o.call(this,t,r)||this;return i.marker=s,i}return u(e,o),e})(v),lt=(function(){function o(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return o.prototype.addEventListener=function(e,t){this[e].push(t)},o.prototype.removeEventListener=function(e,t){var s=this[e].indexOf(t);s>-1&&this[e].splice(s,1)},o})(),pt=(function(){function o(e){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new et,this._isOpen=!1,this.undoRedoManager=new rt,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new lt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=o.instanceCounter++,this.styles=new Q(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=e,this.targetRoot=document.body,this.width=e.clientWidth,this.height=e.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this),this.addMarkerEvents=this.addMarkerEvents.bind(this)}return Object.defineProperty(o.prototype,"ALL_MARKER_TYPES",{get:function(){return[P,k,L,w,ot,A,D,V,st,X,I,nt,at]},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[P,k,L,w,A,D,V]},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"BASIC_MARKER_TYPES",{get:function(){return[P,k,L,w,D]},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(e){var t=this;this._availableMarkerTypes.splice(0),e.forEach((function(s){if(typeof s=="string"){var r=t.ALL_MARKER_TYPES.find((function(i){return i.typeName===s}));r!==void 0&&t._availableMarkerTypes.push(r)}else t._availableMarkerTypes.push(s)}))},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(e){this._zoomLevel=e,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),o.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),R.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},o.prototype.show=function(){var e=this;this.styles.styleSheetRoot===void 0&&O.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=O.styleSheetRoot),this.markers.splice(0),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach((function(t){return t(new v(e))}))},o.prototype.render=function(){return H(this,void 0,void 0,(function(){var e;return z(this,(function(t){switch(t.label){case 0:return this.setCurrentMarker(),(e=new J).naturalSize=this.renderAtNaturalSize,e.imageType=this.renderImageType,e.imageQuality=this.renderImageQuality,e.markersOnly=this.renderMarkersOnly,e.width=this.renderWidth,e.height=this.renderHeight,[4,e.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return t.sent(),[4,e.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,t.sent()]}}))}))},o.prototype.close=function(e){var t=this;if(e===void 0&&(e=!1),this.isOpen){var s=!1;e||this.eventListeners.beforeclose.forEach((function(r){var i=new v(t,!0);r(i),i.defaultPrevented&&(s=!0)})),s||(this.coverDiv&&this.closeUI(),this.targetObserver&&(this.targetObserver.unobserve(this.target),this.targetObserver.unobserve(this.editorCanvas)),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach((function(r){return r(new v(t))})),this.detachEvents(),this._isOpen=!1)}},o.prototype.addMarkersToToolbar=function(){for(var e,t=[],s=0;s<arguments.length;s++)t[s]=arguments[s];(e=this._availableMarkerTypes).push.apply(e,t)},o.prototype.addRenderEventListener=function(e){this.addEventListener("render",(function(t){e(t.dataUrl,t.state)}))},o.prototype.removeRenderEventListener=function(e){},o.prototype.addCloseEventListener=function(e){this.addEventListener("close",(function(){e()}))},o.prototype.removeCloseEventListener=function(e){},o.prototype.setupResizeObserver=function(){var e=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver((function(){e.resize(e.target.clientWidth,e.target.clientHeight)})),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver((function(){return e.onPopupTargetResize()})),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},o.prototype.onPopupTargetResize=function(){var e=1*this.target.clientWidth/this.target.clientHeight,t=this.editorCanvas.clientWidth/e>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*e:this.editorCanvas.clientWidth,s=t<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/e;this.resize(t,s)},o.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},o.prototype.resize=function(e,t){this._isResizing=!0;var s=e/this.imageWidth,r=t/this.imageHeight;this.imageWidth=Math.round(e),this.imageHeight=Math.round(t),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(s,r),this._isResizing=!1},o.prototype.scaleMarkers=function(e,t){var s,r=this;this._currentMarker&&this._currentMarker instanceof w?this._currentMarker.scale(e,t):(s=this._currentMarker,this.setCurrentMarker()),this.markers.forEach((function(i){i!==r._currentMarker&&i.scale(e,t)})),s!==void 0&&this.setCurrentMarker(s)},o.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},o.prototype.setTopLeft=function(){var e=this.editingTarget.getBoundingClientRect(),t=this.editorCanvas.getBoundingClientRect();this.left=e.left-t.left,this.top=e.top-t.top},o.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},o.prototype.addDefs=function(){for(var e,t=[],s=0;s<arguments.length;s++)t[s]=arguments[s];this.defs=h.createDefs(),this.addDefsToImage(),(e=this.defs).append.apply(e,t)},o.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},o.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},o.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},o.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("touchmove",(function(e){return e.preventDefault()})),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},o.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},o.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},o.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},o.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var e=document.createElement("a");e.href="https://markerjs.com/",e.target="_blank",e.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',e.title="Powered by marker.js",e.style.display="grid",e.style.alignItems="center",e.style.justifyItems="center",e.style.padding="3px",e.style.width="20px",e.style.height="20px",this.logoUI.appendChild(e),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},o.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},o.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},o.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},o.prototype.showUI=function(){var e;switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var t=this.settings.uiOffsetTop!==void 0?this.target.offsetTop+this.settings.uiOffsetTop:this.target.offsetTop>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0,s=this.target.offsetLeft+((e=this.settings.uiOffsetLeft)!==null&&e!==void 0?e:0);this.coverDiv.style.top=t+"px",this.coverDiv.style.left=s+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="fixed",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.settings.displayMode==="popup"&&(this.uiDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px"),this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new q(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.settings.displayMode==="inline"&&this.settings.uiOffsetTop===void 0&&this.target.offsetTop<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new $(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},o.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv),this.coverDiv.remove(),this.coverDiv=null},o.prototype.removeMarker=function(e){this.markerImage.removeChild(e.container),this.markers.indexOf(e)>-1&&this.markers.splice(this.markers.indexOf(e),1),e.dispose()},o.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep()),this.toolbar.setSelectMode()},o.prototype.toolbarButtonClicked=function(e,t){if(e==="marker"&&t!==void 0)this.createNewMarker(t);else if(e==="action")switch(t){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},o.prototype.deleteSelectedMarker=function(){var e=this;if(this._currentMarker!==void 0&&this._currentMarker.state==="select"){var t=!1;if(this.eventListeners.markerbeforedelete.forEach((function(r){var i=new b(e,e._currentMarker,!0);r(i),i.defaultPrevented&&(t=!0)})),!t){var s=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach((function(r){return r(new b(e,s))}))}}},o.prototype.clear=function(){var e=this,t=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach((function(n){var a=new b(e,void 0,!0);n(a),a.defaultPrevented&&(t=!0)})),!t)){this.setCurrentMarker();for(var s=function(n){var a=r.markers[n];r.setCurrentMarker(r.markers[n]),r._currentMarker.dispose(),r.markerImage.removeChild(r._currentMarker.container),r.markers.splice(r.markers.indexOf(r._currentMarker),1),r.eventListeners.markerdelete.forEach((function(c){return c(new b(e,a))}))},r=this,i=this.markers.length-1;i>=0;i--)s(i);this.addUndoStep()}},Object.defineProperty(o.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),o.prototype.showNotesEditor=function(){var e;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(e=this._currentMarker.notes)!==null&&e!==void 0?e:"",this.overlayContainer.appendChild(this.notesArea))},o.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},o.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},o.prototype.addUndoStep=function(){var e=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var t=this.getState(),s=this.undoRedoManager.getLastUndoStep();if(!s||s.width===t.width&&s.height===t.height){var r=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(t),r<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach((function(i){return i(new v(e))}))}else this.undoRedoManager.replaceLastUndoStep(t)}},o.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},o.prototype.undoStep=function(){var e=this,t=this.undoRedoManager.undo();t!==void 0&&(this.restoreState(t),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach((function(s){return s(new v(e))})))},o.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},o.prototype.redoStep=function(){var e=this,t=this.undoRedoManager.redo();t!==void 0&&(this.restoreState(t),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach((function(s){return s(new v(e))})))},o.prototype.stepZoom=function(){var e=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=e<this.zoomSteps.length-1?this.zoomSteps[e+1]:this.zoomSteps[0]},o.prototype.panTo=function(e){this.contentDiv.scrollBy({left:this.prevPanPoint.x-e.x,top:this.prevPanPoint.y-e.y}),this.prevPanPoint=e},o.prototype.startRenderAndClose=function(){return H(this,void 0,void 0,(function(){var e,t,s=this;return z(this,(function(r){switch(r.label){case 0:return[4,this.render()];case 1:return e=r.sent(),t=this.getState(),this.eventListeners.render.forEach((function(i){return i(new ht(s,e,t))})),this.close(!0),[2]}}))}))},o.prototype.getState=function(e){e===!0&&this.setCurrentMarker();var t={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach((function(s){return t.markers.push(s.getState())})),t},o.prototype.restoreState=function(e){var t=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);e.markers.forEach((function(s){var r=t._availableMarkerTypes.find((function(n){return n.typeName===s.typeName}));if(r!==void 0){var i=t.addNewMarker(r);i.restoreState(s),t.addMarkerEvents(i),t.markers.push(i)}})),e.width&&e.height&&(e.width!==this.imageWidth||e.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/e.width,this.imageHeight/e.height),this.eventListeners.restorestate.forEach((function(s){return s(new v(t))}))},o.prototype.addNewMarker=function(e){var t=h.createGroup();return this.markerImage.appendChild(t),new e(t,this.overlayContainer,this.settings)},o.prototype.createNewMarker=function(e){var t,s=this;(t=typeof e=="string"?this._availableMarkerTypes.find((function(r){return r.typeName===e})):e)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(t),this.addMarkerEvents(this._currentMarker),this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(t.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach((function(r){return r(new b(s,s._currentMarker))})))},o.prototype.addMarkerEvents=function(e){e.onMarkerCreated=this.markerCreated,e.onColorChanged=this.colorChanged,e.onFillColorChanged=this.fillColorChanged,e.onStateChanged=this.markerStateChanged},o.prototype.markerCreated=function(e){var t=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(e),this.setCurrentMarker(e),e instanceof k&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(k):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach((function(s){return s(new b(t,e))}))},o.prototype.colorChanged=function(e){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=e,this.settings.defaultStrokeColor=e)},o.prototype.fillColorChanged=function(e){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=e)},o.prototype.markerStateChanged=function(e){var t=this;this.eventListeners.markerchange.forEach((function(s){return s(new b(t,e))}))},o.prototype.setCurrentMarker=function(e){var t=this;this._currentMarker!==e&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach((function(s){return s(new b(t,t._currentMarker))}))),this._currentMarker=e,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach((function(s){return s(new b(t,t._currentMarker))})))},o.prototype.onPointerDown=function(e){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||e.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var t=this.markers.find((function(s){return s.ownsTarget(e.target)}));t!==void 0?(this.setCurrentMarker(t),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(e.clientX,e.clientY),e.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:e.clientX,y:e.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(e.clientX,e.clientY))},o.prototype.onDblClick=function(e){if(this._isFocused||this.focus(),this.mode==="select"){var t=this.markers.find((function(s){return s.ownsTarget(e.target)}));t!==void 0&&t!==this._currentMarker&&this.setCurrentMarker(t),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(e.clientX,e.clientY),e.target):this.setCurrentMarker()}},o.prototype.onPointerMove=function(e){this.touchPoints!==1&&e.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||e.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(e.clientX,e.clientY)):this.zoomLevel>1&&this.panTo({x:e.clientX,y:e.clientY}))},o.prototype.onPointerUp=function(e){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&(this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(e.clientX,e.clientY)),this.isDragging=!1,this.addUndoStep())},o.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},o.prototype.onKeyUp=function(e){this._currentMarker===void 0||this.notesArea!==void 0||e.key!=="Delete"&&e.key!=="Backspace"||this.deleteSelectedMarker()},o.prototype.clientToLocalCoordinates=function(e,t){var s=this.markerImage.getBoundingClientRect(),r=s.width/this.imageWidth/this.zoomLevel,i=s.height/this.imageHeight/this.zoomLevel;return{x:(e-s.left)/this.zoomLevel/r,y:(t-s.top)/this.zoomLevel/i}},o.prototype.onWindowResize=function(){this.positionUI()},o.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var e=this.target.getClientRects(),t=e.length>0&&e.item(0)&&e.item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=t+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},o.prototype.addLicenseKey=function(e){R.addKey(e)},o.prototype.addEventListener=function(e,t){this.eventListeners.addEventListener(e,t)},o.prototype.removeEventListener=function(e,t){this.eventListeners.removeEventListener(e,t)},o.prototype.renderState=function(e){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(e),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(o.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),o.prototype.focus=function(){var e=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach((function(t){return t(new v(e))})))},o.prototype.blur=function(){var e=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach((function(t){return t(new v(e))})))},o.instanceCounter=0,o})();export{R as Activator,L as ArrowMarker,it as ArrowTypePanel,V as CalloutMarker,at as CaptionFrameMarker,g as ColorPickerPanel,X as CoverMarker,nt as CurveMarker,ot as EllipseFrameMarker,A as EllipseMarker,lt as EventListenerRepository,W as FontFamilyPanel,P as FrameMarker,k as FreehandMarker,D as HighlightMarker,I as LineMarker,M as LineStylePanel,S as LineWidthPanel,U as LinearMarkerBase,pt as MarkerArea,v as MarkerAreaEvent,ht as MarkerAreaRenderEvent,F as MarkerBase,b as MarkerEvent,st as MeasurementMarker,Y as OpacityPanel,j as RectangleMarker,B as RectangularBoxMarkerBase,tt as RectangularBoxMarkerGrips,_ as ResizeGrip,et as Settings,O as Style,y as StyleClass,Q as StyleManager,h as SvgHelper,w as TextMarker,x as ToolboxPanel,T as TransformMatrix};
129
+ </svg>`,C.style.marginRight="5px",p.appendChild(C)}i.typeBoxes.push(p)},i=this,n=0;n<4;n++)r(n);return s},e.prototype.setCurrentType=function(t,s){var r=this;this.currentType=t,this.typeBoxes.forEach((function(i){i.style.borderColor=i===s?r.uiStyleSettings!==void 0?r.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"})),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},e})(x),L=(function(o){function e(t,s,r){var i=o.call(this,t,s,r)||this;return i.arrowType="end",i.arrowBaseHeight=10,i.arrowBaseWidth=10,i.getArrowPoints=i.getArrowPoints.bind(i),i.setArrowType=i.setArrowType.bind(i),i.arrowTypePanel=new it("Arrow type","end"),i.arrowTypePanel.onArrowTypeChanged=i.setArrowType,i}return u(e,o),e.prototype.ownsTarget=function(t){return!(!o.prototype.ownsTarget.call(this,t)&&t!==this.arrow1&&t!==this.arrow2)},e.prototype.getArrowPoints=function(t,s){var r=this.arrowBaseWidth+2*this.strokeWidth,i=this.arrowBaseHeight+2*this.strokeWidth;return t-r/2+","+(s+i/2)+" "+t+","+(s-i/2)+" "+(t+r/2)+","+(s+i/2)},e.prototype.createTips=function(){this.arrow1=h.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(h.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=h.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(h.createTransform()),this.visual.appendChild(this.arrow2)},e.prototype.pointerDown=function(t,s){o.prototype.pointerDown.call(this,t,s),this.state==="creating"&&this.createTips()},e.prototype.adjustVisual=function(){if(o.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2){this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",h.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),h.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var t=0;Math.abs(this.x1-this.x2)>.1&&(t=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var s=this.arrow1.transform.baseVal.getItem(0);s.setRotate(t,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(s,0);var r=this.arrow2.transform.baseVal.getItem(0);r.setRotate(t+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(r,0)}},e.prototype.setArrowType=function(t){this.arrowType=t,this.adjustVisual(),this.stateChanged()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var t=Object.assign({arrowType:this.arrowType},o.prototype.getState.call(this));return t.typeName=e.typeName,t},e.prototype.restoreState=function(t){o.prototype.restoreState.call(this,t);var s=t;this.arrowType=s.arrowType,this.createTips(),this.adjustVisual()},e.typeName="ArrowMarker",e.title="Arrow marker",e.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',e})(I),X=(function(o){function e(t,s,r){var i=o.call(this,t,s,r)||this;return i.fillColor=r.defaultFillColor,i.strokeWidth=0,i.fillPanel=new g("Color",r.defaultColorSet,r.defaultFillColor),i.fillPanel.onColorChanged=i.setFillColor,i}return u(e,o),Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var t=o.prototype.getState.call(this);return t.typeName=e.typeName,t},e.typeName="CoverMarker",e.title="Cover marker",e.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',e})(j),Y=(function(o){function e(t,s,r,i,n){var a=o.call(this,t,i||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>',n||"opacity-panel")||this;return a.opacities=[],a.opacityBoxes=[],a.opacities=s,a.currentOpacity=r,a.setCurrentOpacity=a.setCurrentOpacity.bind(a),a}return u(e,o),e.prototype.getUi=function(){var t=this,s=document.createElement("div");return s.style.display="flex",s.style.overflow="hidden",s.style.flexGrow="2",s.style.justifyContent="space-between",this.opacities.forEach((function(r){var i=document.createElement("div");i.style.display="flex",i.style.alignItems="center",i.style.justifyContent="center",i.style.padding="5px",i.style.borderWidth="2px",i.style.borderStyle="solid",i.style.borderColor=r===t.currentOpacity?t.uiStyleSettings.toolboxAccentColor:"transparent",i.addEventListener("click",(function(){t.setCurrentOpacity(r,i)})),s.appendChild(i);var n=document.createElement("div");n.innerText=100*r+"%",i.appendChild(n),t.opacityBoxes.push(i)})),s},e.prototype.setCurrentOpacity=function(t,s){var r=this;this.currentOpacity=t,this.opacityBoxes.forEach((function(i){i.style.borderColor=i===s?r.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},e})(x),D=(function(o){function e(t,s,r){var i=o.call(this,t,s,r)||this;return i.setOpacity=i.setOpacity.bind(i),i.fillColor=r.defaultHighlightColor,i.strokeWidth=0,i.opacity=r.defaultHighlightOpacity,i.fillPanel=new g("Color",r.defaultColorSet,i.fillColor),i.fillPanel.onColorChanged=i.setFillColor,i.opacityPanel=new Y("Opacity",r.defaultOpacitySteps,i.opacity),i.opacityPanel.onOpacityChanged=i.setOpacity,i}return u(e,o),e.prototype.setOpacity=function(t){this.opacity=t,this.visual&&h.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var t=o.prototype.getState.call(this);return t.typeName=e.typeName,t},e.typeName="HighlightMarker",e.title="Highlight marker",e.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',e})(X),Z='<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>',N='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',V=(function(o){function e(t,s,r){var i=o.call(this,t,s,r)||this;return i.bgColor="transparent",i.tipPosition={x:0,y:0},i.tipBase1Position={x:0,y:0},i.tipBase2Position={x:0,y:0},i.tipMoving=!1,i.color=r.defaultStrokeColor,i.bgColor=r.defaultFillColor,i.fontFamily=r.defaultFontFamily,i.defaultSize={x:100,y:30},i.setBgColor=i.setBgColor.bind(i),i.getTipPoints=i.getTipPoints.bind(i),i.positionTip=i.positionTip.bind(i),i.setTipPoints=i.setTipPoints.bind(i),i.colorPanel=new g("Text color",r.defaultColorSet,i.color,Z,"text-color-panel"),i.colorPanel.onColorChanged=i.setColor,i.bgColorPanel=new g("Fill color",r.defaultColorSet,i.bgColor,N,"fill-color-panel"),i.bgColorPanel.onColorChanged=i.setBgColor,i.fontFamilyPanel=new W("Font",r.defaultFontFamilies,r.defaultFontFamily),i.fontFamilyPanel.onFontChanged=i.setFont,i.tipGrip=new _,i.tipGrip.visual.transform.baseVal.appendItem(h.createTransform()),i.controlBox.appendChild(i.tipGrip.visual),i}return u(e,o),e.prototype.ownsTarget=function(t){return o.prototype.ownsTarget.call(this,t)||this.tipGrip.ownsTarget(t)||this.tip===t},e.prototype.createTip=function(){h.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=h.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},e.prototype.pointerDown=function(t,s){this.state==="new"&&o.prototype.pointerDown.call(this,t,s),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(s)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):o.prototype.pointerDown.call(this,t,s)},e.prototype.pointerUp=function(t){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,o.prototype.pointerUp.call(this,t);else{var s=this.state==="creating";o.prototype.pointerUp.call(this,t),this.setTipPoints(s),this.positionTip()}},e.prototype.manipulate=function(t){if(this.tipMoving){var s=this.unrotatePoint(t);this.tipPosition={x:s.x-this.manipulationStartLeft,y:s.y-this.manipulationStartTop},this.positionTip()}else o.prototype.manipulate.call(this,t)},e.prototype.setBgColor=function(t){this.bgRectangle&&this.tip&&(h.setAttributes(this.bgRectangle,[["fill",t]]),h.setAttributes(this.tip,[["fill",t]])),this.bgColor=t,this.fillColorChanged(t)},e.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},e.prototype.setTipPoints=function(t){t===void 0&&(t=!1);var s=Math.min(this.height/2,15),r=this.height/5;t&&(this.tipPosition={x:s+r/2,y:this.height+20});var i=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?i<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(r=this.width/5,s=Math.min(this.width/2,15),this.tipBase1Position={x:s,y:0},this.tipBase2Position={x:s+r,y:0}):(this.tipBase1Position={x:0,y:s},this.tipBase2Position={x:0,y:s+r}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?i<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(r=this.width/5,s=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-s-r,y:0},this.tipBase2Position={x:this.width-s,y:0}):(this.tipBase1Position={x:this.width,y:s},this.tipBase2Position={x:this.width,y:s+r}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?i<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(r=this.width/5,s=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-s-r,y:this.height},this.tipBase2Position={x:this.width-s,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-s-r},this.tipBase2Position={x:this.width,y:this.height-s}):i<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(r=this.width/5,s=Math.min(this.width/2,15),this.tipBase1Position={x:s,y:this.height},this.tipBase2Position={x:s+r,y:this.height}):(this.tipBase1Position={x:0,y:this.height-s},this.tipBase2Position={x:0,y:this.height-s-r})},e.prototype.resize=function(t){o.prototype.resize.call(this,t),this.positionTip()},e.prototype.positionTip=function(){h.setAttributes(this.tip,[["points",this.getTipPoints()]]);var t=this.tipGrip.visual.transform.baseVal.getItem(0);t.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(t,0)},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),e.prototype.select=function(){this.positionTip(),o.prototype.select.call(this)},e.prototype.getState=function(){var t=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},o.prototype.getState.call(this));return t.typeName=e.typeName,t},e.prototype.restoreState=function(t){var s=t;this.bgColor=s.bgColor,this.tipPosition=s.tipPosition,o.prototype.restoreState.call(this,t),this.createTip(),this.setTipPoints()},e.prototype.scale=function(t,s){o.prototype.scale.call(this,t,s),this.tipPosition={x:this.tipPosition.x*t,y:this.tipPosition.y*s},this.positionTip()},e.typeName="CalloutMarker",e.title="Callout marker",e.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',e})(w),A=(function(o){function e(t,s,r){var i=o.call(this,t,s,r)||this;return i.fillColor="transparent",i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.opacity=1,i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.fillColor=r.defaultFillColor,i.setStrokeColor=i.setStrokeColor.bind(i),i.setFillColor=i.setFillColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.setOpacity=i.setOpacity.bind(i),i.createVisual=i.createVisual.bind(i),i.strokePanel=new g("Line color",E(r.defaultColorSet,["transparent"]),r.defaultColor,void 0,"stroke-color-panel"),i.strokePanel.onColorChanged=i.setStrokeColor,i.fillPanel=new g("Fill color",E(r.defaultColorSet,["transparent"]),i.fillColor,N,"fill-color-panel"),i.fillPanel.onColorChanged=i.setFillColor,i.strokeWidthPanel=new S("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new M("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i.opacityPanel=new Y("Opacity",r.defaultOpacitySteps,i.opacity),i.opacityPanel.onOpacityChanged=i.setOpacity,i}return u(e,o),e.prototype.ownsTarget=function(t){return!(!o.prototype.ownsTarget.call(this,t)&&t!==this.visual)},e.prototype.createVisual=function(){this.visual=h.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},e.prototype.pointerDown=function(t,s){o.prototype.pointerDown.call(this,t,s),this.state==="new"&&(this.createVisual(),this.moveVisual(t),this._state="creating")},e.prototype.manipulate=function(t){o.prototype.manipulate.call(this,t)},e.prototype.resize=function(t){o.prototype.resize.call(this,t),this.setSize()},e.prototype.setSize=function(){o.prototype.setSize.call(this),h.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},e.prototype.pointerUp=function(t){o.prototype.pointerUp.call(this,t),this.setSize()},e.prototype.setStrokeColor=function(t){this.strokeColor=t,this.visual&&h.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(t),this.stateChanged()},e.prototype.setFillColor=function(t){this.fillColor=t,this.visual&&h.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(t),this.stateChanged()},e.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.visual&&h.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},e.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.visual&&h.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},e.prototype.setOpacity=function(t){this.opacity=t,this.visual&&h.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var t=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},o.prototype.getState.call(this));return t.typeName=e.typeName,t},e.prototype.restoreState=function(t){var s=t;this.fillColor=s.fillColor,this.strokeColor=s.strokeColor,this.strokeWidth=s.strokeWidth,this.strokeDasharray=s.strokeDasharray,this.opacity=s.opacity,this.createVisual(),o.prototype.restoreState.call(this,t),this.setSize()},e.prototype.scale=function(t,s){o.prototype.scale.call(this,t,s),this.setSize()},e.typeName="EllipseMarker",e.title="Ellipse marker",e.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',e})(B),st=(function(o){function e(t,s,r){return o.call(this,t,s,r)||this}return u(e,o),Object.defineProperty(e.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),e.prototype.ownsTarget=function(t){return!(!o.prototype.ownsTarget.call(this,t)&&t!==this.tip1&&t!==this.tip2)},e.prototype.createTips=function(){this.tip1=h.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(h.createTransform()),this.visual.appendChild(this.tip1),this.tip2=h.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(h.createTransform()),this.visual.appendChild(this.tip2)},e.prototype.pointerDown=function(t,s){o.prototype.pointerDown.call(this,t,s),this.state==="creating"&&this.createTips()},e.prototype.adjustVisual=function(){if(o.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(h.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),h.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var t=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),s=this.tip1.transform.baseVal.getItem(0);s.setRotate(t,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(s,0);var r=this.tip2.transform.baseVal.getItem(0);r.setRotate(t+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(r,0)}},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var t=o.prototype.getState.call(this);return t.typeName=e.typeName,t},e.prototype.restoreState=function(t){o.prototype.restoreState.call(this,t),this.createTips(),this.adjustVisual()},e.typeName="MeasurementMarker",e.title="Measurement marker",e.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',e})(I),ot=(function(o){function e(t,s,r){var i=o.call(this,t,s,r)||this;return i.strokePanel.colors=r.defaultColorSet,i.fillColor="transparent",i}return u(e,o),Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var t=o.prototype.getState.call(this);return t.typeName=e.typeName,t},e.typeName="EllipseFrameMarker",e.title="Ellipse frame marker",e.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',e})(A),rt=(function(){function o(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(o.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),o.prototype.addUndoStep=function(e){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(e)||(this.undoStack.push(e),JSON.stringify(this.lastRedoStep)!==JSON.stringify(e)&&this.redoStack.splice(0,this.redoStack.length))},o.prototype.replaceLastUndoStep=function(e){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=e)},o.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},o.prototype.undo=function(){if(this.undoStack.length>1){var e=this.undoStack.pop();return e!==void 0&&this.redoStack.push(e),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},o.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},o})(),nt=(function(o){function e(t,s,r){var i=o.call(this,t,s,r)||this;return i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.curveX=0,i.curveY=0,i.manipulationStartCurveX=0,i.manipulationStartCurveY=0,i.setStrokeColor=i.setStrokeColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.positionGrips=i.positionGrips.bind(i),i.addControlGrips=i.addControlGrips.bind(i),i.adjustVisual=i.adjustVisual.bind(i),i.setupControlBox=i.setupControlBox.bind(i),i.resize=i.resize.bind(i),i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.strokePanel=new g("Line color",r.defaultColorSet,r.defaultColor),i.strokePanel.onColorChanged=i.setStrokeColor,i.strokeWidthPanel=new S("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new M("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i}return u(e,o),e.prototype.ownsTarget=function(t){return!(!o.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.selectorCurve&&t!==this.visibleCurve&&!this.curveGrip.ownsTarget(t))},e.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},e.prototype.createVisual=function(){this.visual=h.createGroup(),this.selectorCurve=h.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=h.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},e.prototype.pointerDown=function(t,s){o.prototype.pointerDown.call(this,t,s),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=t.x,this.curveY=t.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(s)&&(this.activeGrip=this.curveGrip,this._state="resize")},e.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),h.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),h.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),h.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},e.prototype.setupControlBox=function(){o.prototype.setupControlBox.call(this),this.curveControlLine1=h.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=h.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},e.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,o.prototype.addControlGrips.call(this)},e.prototype.positionGrips=function(){o.prototype.positionGrips.call(this);var t=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-t/2,this.curveY-t/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},e.prototype.manipulate=function(t){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+t.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+t.y-this.manipulationStartY),o.prototype.manipulate.call(this,t)},e.prototype.resize=function(t){this.activeGrip===this.curveGrip&&(this.curveX=t.x,this.curveY=t.y),o.prototype.resize.call(this,t),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},e.prototype.setStrokeColor=function(t){this.strokeColor=t,this.adjustVisual(),this.colorChanged(t)},e.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.adjustVisual()},e.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.adjustVisual()},e.prototype.scale=function(t,s){this.curveX=this.curveX*t,this.curveY=this.curveY*s,o.prototype.scale.call(this,t,s)},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var t=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},o.prototype.getState.call(this));return t.typeName=e.typeName,t},e.prototype.restoreState=function(t){o.prototype.restoreState.call(this,t);var s=t;this.strokeColor=s.strokeColor,this.strokeWidth=s.strokeWidth,this.strokeDasharray=s.strokeDasharray,this.curveX=s.curveX,this.curveY=s.curveY,this.createVisual(),this.adjustVisual()},e.typeName="CurveMarker",e.title="Curve marker",e.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',e})(U),at=(function(o){function e(t,s,r){var i=o.call(this,t,s,r)||this;return i.fillColor="transparent",i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.textColor="transparent",i.fontSize="1rem",i.isMoved=!1,i.captionText="Caption",i.PADDING=5,i.captionBoxWidth=0,i.captionBoxHeight=0,i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.fillColor=r.defaultFillColor,i.textColor=r.defaultStrokeColor,i.fontFamily=r.defaultFontFamily,i.fontSize=r.defaultCaptionFontSize,i.captionText=r.defaultCaptionText,i.setStrokeColor=i.setStrokeColor.bind(i),i.setFillColor=i.setFillColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.createVisual=i.createVisual.bind(i),i.sizeCaption=i.sizeCaption.bind(i),i.setCaptionText=i.setCaptionText.bind(i),i.showTextEditor=i.showTextEditor.bind(i),i.positionTextEditor=i.positionTextEditor.bind(i),i.finishTextEditing=i.finishTextEditing.bind(i),i.setFont=i.setFont.bind(i),i.setTextColor=i.setTextColor.bind(i),i.strokePanel=new g("Line color",E(r.defaultColorSet,["transparent"]),i.strokeColor,void 0,"stroke-color-panel"),i.strokePanel.onColorChanged=i.setStrokeColor,i.fillPanel=new g("Fill color",E(r.defaultColorSet,["transparent"]),i.fillColor,N,"fill-color-panel"),i.fillPanel.onColorChanged=i.setFillColor,i.strokeWidthPanel=new S("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new M("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i.fontFamilyPanel=new W("Font",r.defaultFontFamilies,r.defaultFontFamily),i.fontFamilyPanel.onFontChanged=i.setFont,i.textColorPanel=new g("Text color",r.defaultColorSet,i.textColor,Z,"text-color-panel"),i.textColorPanel.onColorChanged=i.setTextColor,i}return u(e,o),e.prototype.ownsTarget=function(t){return!(!o.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.frame&&t!==this.captionBg&&t!==this.captionElement)},e.prototype.createVisual=function(){this.visual=h.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=h.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=h.createText([["fill",this.textColor],["font-family",this.fontFamily]]),this.captionElement.style.fontSize=this.fontSize,this.captionElement.style.textAnchor="start",this.captionElement.style.dominantBaseline="text-before-edge",this.captionElement.textContent=this.captionText,this.visual.appendChild(this.captionElement),this.frame=h.createRect(this.width,this.height,[["fill","transparent"],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray]]),this.visual.appendChild(this.frame),this.sizeCaption()},e.prototype.setCaptionText=function(t){this.captionText=t,this.captionElement.textContent=this.captionText,this.sizeCaption()},e.prototype.pointerDown=function(t,s){o.prototype.pointerDown.call(this,t,s),this.isMoved=!1,this.pointerDownPoint=t,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(t),this._state="creating")},e.prototype.manipulate=function(t){o.prototype.manipulate.call(this,t),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(t.x-this.pointerDownPoint.x)>5||Math.abs(t.y-this.pointerDownPoint.y)>5)},e.prototype.resize=function(t){o.prototype.resize.call(this,t),this.setSize()},e.prototype.sizeCaption=function(){var t=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=t.width+2*this.PADDING,this.captionBoxHeight=t.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),h.setAttributes(this.captionBg,[["width",this.captionBoxWidth.toString()],["height",this.captionBoxHeight.toString()],["clip-path","path('M0,0 H"+this.width+" V"+this.height+" H"+-this.width+" Z')"]]),h.setAttributes(this.captionElement,[["x",this.PADDING.toString()],["y",this.PADDING.toString()],["clip-path","path('M0,0 H"+(this.width-this.PADDING)+" V"+this.height+" H"+(-this.width-this.PADDING)+" Z')"]])},e.prototype.showTextEditor=function(){var t=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditBox=document.createElement("input"),this.textEditBox.style.position="absolute",this.textEditBox.style.width=this.width+"px",this.captionBoxHeight>0&&(this.textEditBox.style.height=this.captionBoxHeight+"px"),this.textEditBox.style.fontSize=this.fontSize,this.textEditBox.style.fontFamily=this.fontFamily,this.textEditBox.style.backgroundColor=this.fillColor,this.textEditBox.style.color=this.textColor,this.textEditBox.style.borderWidth="0",this.textEditBox.setAttribute("value",this.captionText),this.textEditBox.select(),this.textEditDiv.appendChild(this.textEditBox),this.overlayContainer.appendChild(this.textEditDiv),this.textEditBox.addEventListener("pointerup",(function(s){s.stopPropagation()})),this.textEditBox.addEventListener("keypress",(function(s){s.key==="Enter"&&t.finishTextEditing(t.textEditBox.value)})),this.textEditBox.addEventListener("keyup",(function(s){s.cancelBubble=!0})),this.textEditBox.addEventListener("blur",(function(){t.finishTextEditing(t.textEditBox.value)})),this.textEditDiv.addEventListener("pointerup",(function(){t.finishTextEditing(t.textEditBox.value)})),this.positionTextEditor(),this.textEditBox.focus()},e.prototype.positionTextEditor=function(){this.state==="edit"&&(this.textEditBox===void 0?this.showTextEditor():(this.textEditBox.style.left=this.left+"px",this.textEditBox.style.top=this.top+"px",this.textEditBox.style.transform="rotate("+this.rotationAngle+"deg)",this.textEditBox.style.transformOrigin=this.width/2+"px "+this.height/2+"px"))},e.prototype.finishTextEditing=function(t){this.setCaptionText(t.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},e.prototype.setFont=function(t){this.captionElement&&h.setAttributes(this.captionElement,[["font-family",t]]),this.fontFamily=t,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},e.prototype.setTextColor=function(t){this.captionElement&&h.setAttributes(this.captionElement,[["fill",t]]),this.textColor=t,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},e.prototype.setSize=function(){o.prototype.setSize.call(this),h.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},e.prototype.pointerUp=function(t){o.prototype.pointerUp.call(this,t),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},e.prototype.dblClick=function(t,s){o.prototype.dblClick.call(this,t,s),this.showTextEditor()},e.prototype.setStrokeColor=function(t){this.strokeColor=t,this.frame&&h.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(t),this.stateChanged()},e.prototype.setFillColor=function(t){this.fillColor=t,this.captionBg&&h.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(t),this.stateChanged()},e.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.frame&&h.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},e.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.frame&&h.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var t=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:1,textColor:this.textColor,fontFamily:this.fontFamily,fontSize:this.fontSize,captionText:this.captionText},o.prototype.getState.call(this));return t.typeName=this.typeName,t},e.prototype.restoreState=function(t){var s=t;this.fillColor=s.fillColor,this.strokeColor=s.strokeColor,this.strokeWidth=s.strokeWidth,this.strokeDasharray=s.strokeDasharray,this.textColor=s.textColor,this.fontFamily=s.fontFamily,this.captionText=s.captionText,this.fontSize=s.fontSize,this.createVisual(),o.prototype.restoreState.call(this,t),this.setSize()},e.prototype.scale=function(t,s){o.prototype.scale.call(this,t,s),this.setSize()},e.typeName="CaptionFrameMarker",e.title="Caption frame marker",e.icon='<svg viewBox="0 0 24 24"><path d="M5 3c-1.11 0-2 .89-2 2v14c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2V5c0-1.11-.89-2-2-2H5m0 2h14v14H5V5m2 2v2h10V7H7z"/></svg>',e})(B),v=(function(){function o(e,t){t===void 0&&(t=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=e,this.cancelable=t}return Object.defineProperty(o.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),o.prototype.preventDefault=function(){this._defaultPrevented=!0},o})(),ht=(function(o){function e(t,s,r){var i=o.call(this,t,!1)||this;return i.dataUrl=s,i.state=r,i}return u(e,o),e})(v),b=(function(o){function e(t,s,r){r===void 0&&(r=!1);var i=o.call(this,t,r)||this;return i.marker=s,i}return u(e,o),e})(v),lt=(function(){function o(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return o.prototype.addEventListener=function(e,t){this[e].push(t)},o.prototype.removeEventListener=function(e,t){var s=this[e].indexOf(t);s>-1&&this[e].splice(s,1)},o})(),pt=(function(){function o(e){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new et,this._isOpen=!1,this.undoRedoManager=new rt,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new lt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=o.instanceCounter++,this.styles=new Q(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=e,this.targetRoot=document.body,this.width=e.clientWidth,this.height=e.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this),this.addMarkerEvents=this.addMarkerEvents.bind(this)}return Object.defineProperty(o.prototype,"ALL_MARKER_TYPES",{get:function(){return[P,k,L,w,ot,A,D,V,st,X,I,nt,at]},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[P,k,L,w,A,D,V]},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"BASIC_MARKER_TYPES",{get:function(){return[P,k,L,w,D]},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(e){var t=this;this._availableMarkerTypes.splice(0),e.forEach((function(s){if(typeof s=="string"){var r=t.ALL_MARKER_TYPES.find((function(i){return i.typeName===s}));r!==void 0&&t._availableMarkerTypes.push(r)}else t._availableMarkerTypes.push(s)}))},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(e){this._zoomLevel=e,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),o.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),R.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},o.prototype.show=function(){var e=this;this.styles.styleSheetRoot===void 0&&O.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=O.styleSheetRoot),this.markers.splice(0),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach((function(t){return t(new v(e))}))},o.prototype.render=function(){return H(this,void 0,void 0,(function(){var e;return z(this,(function(t){switch(t.label){case 0:return this.setCurrentMarker(),(e=new J).naturalSize=this.renderAtNaturalSize,e.imageType=this.renderImageType,e.imageQuality=this.renderImageQuality,e.markersOnly=this.renderMarkersOnly,e.width=this.renderWidth,e.height=this.renderHeight,[4,e.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return t.sent(),[4,e.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,t.sent()]}}))}))},o.prototype.close=function(e){var t=this;if(e===void 0&&(e=!1),this.isOpen){var s=!1;e||this.eventListeners.beforeclose.forEach((function(r){var i=new v(t,!0);r(i),i.defaultPrevented&&(s=!0)})),s||(this.coverDiv&&this.closeUI(),this.targetObserver&&(this.targetObserver.unobserve(this.target),this.targetObserver.unobserve(this.editorCanvas)),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach((function(r){return r(new v(t))})),this.detachEvents(),this._isOpen=!1)}},o.prototype.addMarkersToToolbar=function(){for(var e,t=[],s=0;s<arguments.length;s++)t[s]=arguments[s];(e=this._availableMarkerTypes).push.apply(e,t)},o.prototype.addRenderEventListener=function(e){this.addEventListener("render",(function(t){e(t.dataUrl,t.state)}))},o.prototype.removeRenderEventListener=function(e){},o.prototype.addCloseEventListener=function(e){this.addEventListener("close",(function(){e()}))},o.prototype.removeCloseEventListener=function(e){},o.prototype.setupResizeObserver=function(){var e=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver((function(){e.resize(e.target.clientWidth,e.target.clientHeight)})),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver((function(){return e.onPopupTargetResize()})),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},o.prototype.onPopupTargetResize=function(){var e=1*this.target.clientWidth/this.target.clientHeight,t=this.editorCanvas.clientWidth/e>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*e:this.editorCanvas.clientWidth,s=t<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/e;this.resize(t,s)},o.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},o.prototype.resize=function(e,t){this._isResizing=!0;var s=e/this.imageWidth,r=t/this.imageHeight;this.imageWidth=Math.round(e),this.imageHeight=Math.round(t),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(s,r),this._isResizing=!1},o.prototype.scaleMarkers=function(e,t){var s,r=this;this._currentMarker&&this._currentMarker instanceof w?this._currentMarker.scale(e,t):(s=this._currentMarker,this.setCurrentMarker()),this.markers.forEach((function(i){i!==r._currentMarker&&i.scale(e,t)})),s!==void 0&&this.setCurrentMarker(s)},o.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},o.prototype.setTopLeft=function(){var e=this.editingTarget.getBoundingClientRect(),t=this.editorCanvas.getBoundingClientRect();this.left=e.left-t.left,this.top=e.top-t.top},o.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},o.prototype.addDefs=function(){for(var e,t=[],s=0;s<arguments.length;s++)t[s]=arguments[s];this.defs=h.createDefs(),this.addDefsToImage(),(e=this.defs).append.apply(e,t)},o.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},o.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},o.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},o.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("touchmove",(function(e){return e.preventDefault()})),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},o.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},o.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},o.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},o.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var e=document.createElement("a");e.href="https://markerjs.com/",e.target="_blank",e.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',e.title="Powered by marker.js",e.style.display="grid",e.style.alignItems="center",e.style.justifyItems="center",e.style.padding="3px",e.style.width="20px",e.style.height="20px",this.logoUI.appendChild(e),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},o.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},o.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},o.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},o.prototype.showUI=function(){var e;switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var t=this.settings.uiOffsetTop!==void 0?this.target.offsetTop+this.settings.uiOffsetTop:this.target.offsetTop>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0,s=this.target.offsetLeft+((e=this.settings.uiOffsetLeft)!==null&&e!==void 0?e:0);this.coverDiv.style.top=t+"px",this.coverDiv.style.left=s+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="fixed",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.settings.displayMode==="popup"&&(this.uiDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px"),this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new q(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.settings.displayMode==="inline"&&this.settings.uiOffsetTop===void 0&&this.target.offsetTop<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new $(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},o.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv),this.coverDiv.remove(),this.coverDiv=null},o.prototype.removeMarker=function(e){this.markerImage.removeChild(e.container),this.markers.indexOf(e)>-1&&this.markers.splice(this.markers.indexOf(e),1),e.dispose()},o.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},o.prototype.toolbarButtonClicked=function(e,t){if(e==="marker"&&t!==void 0)this.createNewMarker(t);else if(e==="action")switch(t){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},o.prototype.deleteSelectedMarker=function(){var e=this;if(this._currentMarker!==void 0&&this._currentMarker.state==="select"){var t=!1;if(this.eventListeners.markerbeforedelete.forEach((function(r){var i=new b(e,e._currentMarker,!0);r(i),i.defaultPrevented&&(t=!0)})),!t){var s=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach((function(r){return r(new b(e,s))}))}}},o.prototype.clear=function(){var e=this,t=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach((function(n){var a=new b(e,void 0,!0);n(a),a.defaultPrevented&&(t=!0)})),!t)){this.setCurrentMarker();for(var s=function(n){var a=r.markers[n];r.setCurrentMarker(r.markers[n]),r._currentMarker.dispose(),r.markerImage.removeChild(r._currentMarker.container),r.markers.splice(r.markers.indexOf(r._currentMarker),1),r.eventListeners.markerdelete.forEach((function(c){return c(new b(e,a))}))},r=this,i=this.markers.length-1;i>=0;i--)s(i);this.addUndoStep()}},Object.defineProperty(o.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),o.prototype.showNotesEditor=function(){var e;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(e=this._currentMarker.notes)!==null&&e!==void 0?e:"",this.overlayContainer.appendChild(this.notesArea))},o.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},o.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},o.prototype.addUndoStep=function(){var e=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var t=this.getState(),s=this.undoRedoManager.getLastUndoStep();if(!s||s.width===t.width&&s.height===t.height){var r=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(t),r<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach((function(i){return i(new v(e))}))}else this.undoRedoManager.replaceLastUndoStep(t)}},o.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},o.prototype.undoStep=function(){var e=this,t=this.undoRedoManager.undo();t!==void 0&&(this.restoreState(t),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach((function(s){return s(new v(e))})))},o.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},o.prototype.redoStep=function(){var e=this,t=this.undoRedoManager.redo();t!==void 0&&(this.restoreState(t),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach((function(s){return s(new v(e))})))},o.prototype.stepZoom=function(){var e=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=e<this.zoomSteps.length-1?this.zoomSteps[e+1]:this.zoomSteps[0]},o.prototype.panTo=function(e){this.contentDiv.scrollBy({left:this.prevPanPoint.x-e.x,top:this.prevPanPoint.y-e.y}),this.prevPanPoint=e},o.prototype.startRenderAndClose=function(){return H(this,void 0,void 0,(function(){var e,t,s=this;return z(this,(function(r){switch(r.label){case 0:return[4,this.render()];case 1:return e=r.sent(),t=this.getState(),this.eventListeners.render.forEach((function(i){return i(new ht(s,e,t))})),this.close(!0),[2]}}))}))},o.prototype.getState=function(e){e===!0&&this.setCurrentMarker();var t={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach((function(s){return t.markers.push(s.getState())})),t},o.prototype.restoreState=function(e){var t=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);e.markers.forEach((function(s){var r=t._availableMarkerTypes.find((function(n){return n.typeName===s.typeName}));if(r!==void 0){var i=t.addNewMarker(r);i.restoreState(s),t.addMarkerEvents(i),t.markers.push(i)}})),e.width&&e.height&&(e.width!==this.imageWidth||e.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/e.width,this.imageHeight/e.height),this.eventListeners.restorestate.forEach((function(s){return s(new v(t))}))},o.prototype.addNewMarker=function(e){var t=h.createGroup();return this.markerImage.appendChild(t),new e(t,this.overlayContainer,this.settings)},o.prototype.createNewMarker=function(e){var t,s=this;(t=typeof e=="string"?this._availableMarkerTypes.find((function(r){return r.typeName===e})):e)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(t),this.addMarkerEvents(this._currentMarker),this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(t.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach((function(r){return r(new b(s,s._currentMarker))})))},o.prototype.addMarkerEvents=function(e){e.onMarkerCreated=this.markerCreated,e.onColorChanged=this.colorChanged,e.onFillColorChanged=this.fillColorChanged,e.onStateChanged=this.markerStateChanged},o.prototype.markerCreated=function(e){var t=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(e),this.setCurrentMarker(e),e instanceof k&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(k):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach((function(s){return s(new b(t,e))}))},o.prototype.colorChanged=function(e){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=e,this.settings.defaultStrokeColor=e)},o.prototype.fillColorChanged=function(e){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=e)},o.prototype.markerStateChanged=function(e){var t=this;this.eventListeners.markerchange.forEach((function(s){return s(new b(t,e))}))},o.prototype.setCurrentMarker=function(e){var t=this;this._currentMarker!==e&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach((function(s){return s(new b(t,t._currentMarker))}))),this._currentMarker=e,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach((function(s){return s(new b(t,t._currentMarker))})))},o.prototype.onPointerDown=function(e){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||e.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var t=this.markers.find((function(s){return s.ownsTarget(e.target)}));t!==void 0?(this.setCurrentMarker(t),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(e.clientX,e.clientY),e.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:e.clientX,y:e.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(e.clientX,e.clientY))},o.prototype.onDblClick=function(e){if(this._isFocused||this.focus(),this.mode==="select"){var t=this.markers.find((function(s){return s.ownsTarget(e.target)}));t!==void 0&&t!==this._currentMarker&&this.setCurrentMarker(t),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(e.clientX,e.clientY),e.target):this.setCurrentMarker()}},o.prototype.onPointerMove=function(e){this.touchPoints!==1&&e.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||e.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(e.clientX,e.clientY)):this.zoomLevel>1&&this.panTo({x:e.clientX,y:e.clientY}))},o.prototype.onPointerUp=function(e){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(e.clientX,e.clientY)),this.isDragging=!1,this.addUndoStep()},o.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},o.prototype.onKeyUp=function(e){this._currentMarker===void 0||this.notesArea!==void 0||e.key!=="Delete"&&e.key!=="Backspace"||this.deleteSelectedMarker()},o.prototype.clientToLocalCoordinates=function(e,t){var s=this.markerImage.getBoundingClientRect(),r=s.width/this.imageWidth/this.zoomLevel,i=s.height/this.imageHeight/this.zoomLevel;return{x:(e-s.left)/this.zoomLevel/r,y:(t-s.top)/this.zoomLevel/i}},o.prototype.onWindowResize=function(){this.positionUI()},o.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var e=this.target.getClientRects(),t=e.length>0&&e.item(0)&&e.item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=t+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},o.prototype.addLicenseKey=function(e){R.addKey(e)},o.prototype.addEventListener=function(e,t){this.eventListeners.addEventListener(e,t)},o.prototype.removeEventListener=function(e,t){this.eventListeners.removeEventListener(e,t)},o.prototype.renderState=function(e){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(e),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(o.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),o.prototype.focus=function(){var e=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach((function(t){return t(new v(e))})))},o.prototype.blur=function(){var e=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach((function(t){return t(new v(e))})))},o.instanceCounter=0,o})();export{R as Activator,L as ArrowMarker,it as ArrowTypePanel,V as CalloutMarker,at as CaptionFrameMarker,g as ColorPickerPanel,X as CoverMarker,nt as CurveMarker,ot as EllipseFrameMarker,A as EllipseMarker,lt as EventListenerRepository,W as FontFamilyPanel,P as FrameMarker,k as FreehandMarker,D as HighlightMarker,I as LineMarker,M as LineStylePanel,S as LineWidthPanel,U as LinearMarkerBase,pt as MarkerArea,v as MarkerAreaEvent,ht as MarkerAreaRenderEvent,F as MarkerBase,b as MarkerEvent,st as MeasurementMarker,Y as OpacityPanel,j as RectangleMarker,B as RectangularBoxMarkerBase,tt as RectangularBoxMarkerGrips,_ as ResizeGrip,et as Settings,O as Style,y as StyleClass,Q as StyleManager,h as SvgHelper,w as TextMarker,x as ToolboxPanel,T as TransformMatrix};
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.125 */
4
- import{d as h}from"./B6QRZCAE.js";import{g as S}from"./DIUM3TFV.js";import a from"./I7KJMJCU.js";import{g as d,k as c,y as I}from"./BL4EYCMZ.js";import"./TXZ6GEZY.js";import"./2I4NMCJM.js";import{F as y,g as C,h as n,m,z as u}from"./HL56VPJ3.js";import"./WJQVASCC.js";export default $arcgis.t(([,,,,,,,,,,,,,,,{Bc:v,Dc:F}])=>{var L=C`:host{overflow-y:auto;overflow-x:hidden;margin-bottom:var(--arcgis-charts-intra-section-margin);margin-top:var(--arcgis-charts-intra-section-margin);height:100%}`,p=class extends u{constructor(){super(...arguments),this.onModelConfigChange=async e=>{let i=e?.detail.config??this.model.config;this.layer===void 0&&await this.updateFetchLayerFieldsInfo(i)},this.popoverPlacement="leading",this.arcgisChartsConfigNoSeriesUpdate=m(),this.arcgisChartsConfigWebChartChange=m()}static{this.properties={layerFieldsInfo:16,model:0,popoverPlacement:1,seriesColor:0,calculatedMinMaxBounds:0,page:1,layer:0,usePopupTemplateFieldsInfo:5,filterBySelection:5,chartData:0}}static{this.styles=L}async load(){this.seriesColor!==void 0&&this.seriesColorChange(this.seriesColor),await this.updateFetchLayerFieldsInfo(this.model?.config),this.modelChange(this.model)}willUpdate(e){let i=!1;e.has("model")&&this.modelChange(this.model,e.get("model")),e.has("layer")&&this.layer!==void 0&&!c(e.get("layer"),this.layer)&&(i=!0),e.has("usePopupTemplateFieldsInfo")&&this.usePopupTemplateFieldsInfo!==e.get("usePopupTemplateFieldsInfo")&&(i=!0),e.has("seriesColor")&&this.seriesColorChange(this.seriesColor),this.layerFieldsInfo===void 0&&(i=!0),i&&this.updateFetchLayerFieldsInfo()}disconnectedCallback(){super.disconnectedCallback(),this.model.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}modelChange(e,i){i?.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange),e?.addEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}seriesColorChange(e){let{slices:i,groupedSlices:o,groupOfSlices:a}=e?.get(0)??{},t=[];this.filterBySelection===!0?t=this.model.slices?.map(r=>i?.find(s=>s.sliceId===r.sliceId)??o?.find(s=>s.sliceId===r.sliceId)??r)??[]:t=(i??[]).concat(o??[]),t.forEach((r,s)=>{let f=this.model.slices?.find(b=>b.sliceId===t[s].sliceId);f&&(t[s]={...t[s],...f});let l=t[s].fillSymbol;l!==void 0&&!c(l?.outline?.color,l?.color)&&(l.outline={...l.outline??{},type:I.SLS,color:l.color})});let g=(o??[]).map(r=>r.sliceId);o!==void 0&&!c(g,this.model.groupedSliceIds)&&(this.model.groupedSliceIds=d(g)),c(t,this.model.slices)||(this.model.slices=d(t)),a!==void 0&&!c(a,this.model.sliceGrouping)&&(this.model.sliceGrouping=d(a))}async updateFetchLayerFieldsInfo(e){let i=e??this.model.config,o=this.layer;if(!o){let a=S(i)?i.iLayer:void 0;a&&(o=await v(a))}o&&(this.layerFieldsInfo=await F(o,this.usePopupTemplateFieldsInfo))}render(){let e;switch(this.page){case h.Data:e=n`<arcgis-charts-config-pie-chart-data .model=${this.model} .layerFieldsInfo=${this.layerFieldsInfo}></arcgis-charts-config-pie-chart-data>`;break;case h.Slices:e=n`<arcgis-charts-config-pie-chart-slices .model=${this.model} .chartData=${this.chartData} .popoverPlacement=${this.popoverPlacement}></arcgis-charts-config-pie-chart-slices>`;break;case h.Format:e=n`<arcgis-charts-config-format .model=${this.model}></arcgis-charts-config-format>`;break;case h.General:e=n`<arcgis-charts-config-general .model=${this.model}></arcgis-charts-config-general>`;break;default:e="";break}return e}};y("arcgis-charts-config-pie-chart",p);return p},"Graphic","renderers/support/jsonUtils","symbols/support/symbolUtils","intl","layers/support/FeatureFilter","smartMapping/statistics/histogram","smartMapping/statistics/summaryStatistics","request","AttributeBinsGraphic","geometry/support/jsonUtils","rest/support/AttributeBinsQuery","rest/support/Query","rest/support/StatisticDefinition","time/TimeExtent","core/promiseUtils",a)
3
+ v5.0.0-next.127 */
4
+ import{d as h}from"./DRYTKIOF.js";import{g as S}from"./WSQSFA3C.js";import a from"./MXDA5JOX.js";import{g as d,k as c,y as I}from"./YSC43FQ7.js";import"./WBDA74LW.js";import"./WNCZF3NZ.js";import{F as y,g as C,h as n,m,z as u}from"./XDG2XVR5.js";import"./PG43TIFC.js";export default $arcgis.t(([,,,,,,,,,,,,,,,{Cc:v,Ec:F}])=>{var L=C`:host{overflow-y:auto;overflow-x:hidden;margin-bottom:var(--arcgis-charts-intra-section-margin);margin-top:var(--arcgis-charts-intra-section-margin);height:100%}`,p=class extends u{constructor(){super(...arguments),this.onModelConfigChange=async e=>{let i=e?.detail.config??this.model.config;this.layer===void 0&&await this.updateFetchLayerFieldsInfo(i)},this.popoverPlacement="leading",this.arcgisChartsConfigNoSeriesUpdate=m(),this.arcgisChartsConfigWebChartChange=m()}static{this.properties={layerFieldsInfo:16,model:0,popoverPlacement:1,seriesColor:0,calculatedMinMaxBounds:0,page:1,layer:0,usePopupTemplateFieldsInfo:5,filterBySelection:5,chartData:0}}static{this.styles=L}async load(){this.seriesColor!==void 0&&this.seriesColorChange(this.seriesColor),await this.updateFetchLayerFieldsInfo(this.model?.config),this.modelChange(this.model)}willUpdate(e){let i=!1;e.has("model")&&this.modelChange(this.model,e.get("model")),e.has("layer")&&this.layer!==void 0&&!c(e.get("layer"),this.layer)&&(i=!0),e.has("usePopupTemplateFieldsInfo")&&this.usePopupTemplateFieldsInfo!==e.get("usePopupTemplateFieldsInfo")&&(i=!0),e.has("seriesColor")&&this.seriesColorChange(this.seriesColor),this.layerFieldsInfo===void 0&&(i=!0),i&&this.updateFetchLayerFieldsInfo()}disconnectedCallback(){super.disconnectedCallback(),this.model.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}modelChange(e,i){i?.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange),e?.addEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}seriesColorChange(e){let{slices:i,groupedSlices:o,groupOfSlices:a}=e?.get(0)??{},s=[];this.filterBySelection===!0?s=this.model.slices?.map(r=>i?.find(t=>t.sliceId===r.sliceId)??o?.find(t=>t.sliceId===r.sliceId)??r)??[]:s=(i??[]).concat(o??[]),s.forEach((r,t)=>{let f=this.model.slices?.find(b=>b.sliceId===s[t].sliceId);f&&(s[t]={...s[t],...f});let l=s[t].fillSymbol;l!==void 0&&!c(l?.outline?.color,l?.color)&&(l.outline={...l.outline??{},type:I.SLS,color:l.color})});let g=(o??[]).map(r=>r.sliceId);o!==void 0&&!c(g,this.model.groupedSliceIds)&&(this.model.groupedSliceIds=d(g)),c(s,this.model.slices)||(this.model.slices=d(s)),a!==void 0&&!c(a,this.model.sliceGrouping)&&(this.model.sliceGrouping=d(a))}async updateFetchLayerFieldsInfo(e){let i=e??this.model.config,o=this.layer;if(!o){let a=S(i)?i.iLayer:void 0;a&&(o=await v(a))}o&&(this.layerFieldsInfo=await F(o,this.usePopupTemplateFieldsInfo))}render(){let e;switch(this.page){case h.Data:e=n`<arcgis-charts-config-pie-chart-data .model=${this.model} .layerFieldsInfo=${this.layerFieldsInfo}></arcgis-charts-config-pie-chart-data>`;break;case h.Slices:e=n`<arcgis-charts-config-pie-chart-slices .model=${this.model} .chartData=${this.chartData} .popoverPlacement=${this.popoverPlacement}></arcgis-charts-config-pie-chart-slices>`;break;case h.Format:e=n`<arcgis-charts-config-format .model=${this.model}></arcgis-charts-config-format>`;break;case h.General:e=n`<arcgis-charts-config-general .model=${this.model}></arcgis-charts-config-general>`;break;default:e="";break}return e}};y("arcgis-charts-config-pie-chart",p);return p},"Graphic","renderers/support/jsonUtils","symbols/support/symbolUtils","intl","layers/support/FeatureFilter","smartMapping/statistics/histogram","smartMapping/statistics/summaryStatistics","request","AttributeBinsGraphic","geometry/support/jsonUtils","rest/support/AttributeBinsQuery","rest/support/Query","rest/support/StatisticDefinition","time/TimeExtent","core/promiseUtils",a)
@@ -0,0 +1,4 @@
1
+ /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
+ v5.0.0-next.127 */
4
+ import{d as o}from"./DRYTKIOF.js";import{g}from"./WSQSFA3C.js";import a from"./MXDA5JOX.js";import{k as m}from"./YSC43FQ7.js";import"./WBDA74LW.js";import"./WNCZF3NZ.js";import{F as l,g as n,h as i,z as h}from"./XDG2XVR5.js";import"./PG43TIFC.js";export default $arcgis.t(([,,,,,,,,,,,,,,,{Cc:c,Ec:d}])=>{var p=n`:host{margin-bottom:var(--arcgis-charts-intra-section-margin);margin-top:var(--arcgis-charts-intra-section-margin);height:100%}`,s=class extends h{static{this.properties={layerFieldsInfo:16,model:0,page:1,layer:0,usePopupTemplateFieldsInfo:5,chartData:0}}static{this.styles=p}async load(){await this.updateFetchLayerFieldsInfo(this.model?.config),this.modelChange(this.model)}willUpdate(t){let a=!1;t.has("model")&&this.modelChange(this.model,t.get("model")),t.has("layer")&&this.layer!==void 0&&!m(t.get("layer"),this.layer)&&(a=!0),t.has("usePopupTemplateFieldsInfo")&&this.usePopupTemplateFieldsInfo!==t.get("usePopupTemplateFieldsInfo")&&(a=!0),this.layerFieldsInfo===void 0&&(a=!0),a&&this.updateFetchLayerFieldsInfo()}disconnectedCallback(){super.disconnectedCallback(),this.model.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}modelChange(t,a){a?.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange),t?.addEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}async updateFetchLayerFieldsInfo(t){let a=t??this.model.config,e=this.layer;if(!e){let r=g(a)?a.iLayer:void 0;r&&(e=await c(r))}e&&(this.layerFieldsInfo=await d(e,this.usePopupTemplateFieldsInfo))}async onModelConfigChange(t){let a=t?.detail.config??this.model.config;this.layer===void 0&&await this.updateFetchLayerFieldsInfo(a)}render(){let t;switch(this.page){case o.Data:t=i`<arcgis-charts-config-heat-chart-data .model=${this.model} .layerFieldsInfo=${this.layerFieldsInfo} .chartData=${this.chartData}></arcgis-charts-config-heat-chart-data>`;break;case o.Format:t=i`<arcgis-charts-config-format .model=${this.model}></arcgis-charts-config-format>`;break;case o.General:t=i`<arcgis-charts-config-general .model=${this.model}></arcgis-charts-config-general>`;break;default:t="";break}return t}};l("arcgis-charts-config-heat-chart",s);return s},"Graphic","renderers/support/jsonUtils","symbols/support/symbolUtils","intl","layers/support/FeatureFilter","smartMapping/statistics/histogram","smartMapping/statistics/summaryStatistics","request","AttributeBinsGraphic","geometry/support/jsonUtils","rest/support/AttributeBinsQuery","rest/support/Query","rest/support/StatisticDefinition","time/TimeExtent","core/promiseUtils",a)
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.125 */
4
- import{a as k}from"./ZNQEQAFZ.js";import{a as E}from"./KBC76MEC.js";import{h as a}from"./B6QRZCAE.js";import{a as F}from"./G737PJCD.js";import e from"./XWWZN4I2.js";import c from"./I7KJMJCU.js";import"./BL4EYCMZ.js";import"./TXZ6GEZY.js";import{e as g}from"./SPG5VNM4.js";import{b as y}from"./2I4NMCJM.js";import{A as o,D as b,F as v,g as C,h as s,m as d,x as n,y as h,z as u}from"./HL56VPJ3.js";import"./WJQVASCC.js";export default $arcgis.t(([,,,,,,,,,,,,,,,{Ab:m,Ec:$,d:c},{h:P}])=>{var l={label:"label",fieldList:"field-list",fab:"fab"},w=C`:host{display:flex;flex-direction:column;width:var(--arcgis-charts-config-calcite-block-default-width);margin:var(--arcgis-charts-config-calcite-block-default-margin);margin-top:var(--arcgis-charts-top-section-margin)}.label,.disabled-label{display:flex;margin-left:var(--arcgis-charts-config-margin-minor);margin-right:var(--arcgis-charts-config-margin-minor);margin-bottom:var(--arcgis-charts-config-margin-minor);justify-content:space-between}.field-list{max-height:50vh;overflow-y:auto}.disabled-label{pointer-events:none}.fab{display:flex;margin-left:var(--arcgis-charts-config-margin-minor);margin-right:var(--arcgis-charts-config-margin-minor);margin-bottom:1.5rem;justify-content:center}`,p=class extends u{constructor(){super(...arguments),this._messages=F(),this.pieChartPopover=null,this.sortOrderElement=n(),this.categoryElement=n(),this.numericFieldsElement=n(),this.onPieChartDataChange=e=>{try{if(e.detail!==null&&e.detail?.value!==void 0){let{contentKind:t}=e.detail,i=[...e.detail.value];switch(t){case a.aggregation:this.model.aggregationType=i[0]!==y.NoAggregation?i[0]:"";break;case a.category:{let r=i[0]?.trim()||"";this.updateMode(r);let f=this.model.numericFields;f.length>1&&r!==c&&(this.model.numericFields=[f[0]]),this.model.category=r,this.model.colorMatch=!0;break}case a.numericFields:i.length>1&&(this.updateMode(c),this.model.category=c),this.model.numericFields=i;break;case a.sortOrder:this.model.setSortOrder(i[0]);break;default:break}}}catch(t){throw t instanceof Error&&this.arcgisChartsConfigDataChangeError.emit({error:t,model:this.model}),t}this.requestUpdate()},this.onModelConfigChange=()=>{this.requestUpdate()},this.popoverClose=e=>{this.pieChartPopover===e?.target&&this.removePieChartDataPopover()},this.layerFieldsInfo=[],this.arcgisChartsConfigDataChangeError=d(),this.arcgisChartsConfigPieChartDataNumericFieldValidate=d()}static{this.properties={messageOverrides:0,model:0,layerFieldsInfo:0}}static{this.styles=w}load(){this.modelChange(this.model),this.onModelConfigChange()}willUpdate(e){e.has("model")&&this.modelChange(this.model,e.get("model"))}disconnectedCallback(){super.disconnectedCallback(),this.removePieChartDataPopover(),this.model.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}modelChange(e,t){t?.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange),e?.addEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}buildNumericFieldItem(e){return k(e,s`<calcite-list-item .label=${m(this.layerFieldsInfo,e)} .value=${e} closable @calciteListItemClose=${this.onRemoveNumericField}></calcite-list-item>`)}onSortOrderSelect(e){this.contentKind=a.sortOrder,this.setupPopover(e)}onCategorySelect(e){this.contentKind=a.category,this.setupPopover(e)}onAddNumericFields(e){this.contentKind=a.numericFields,this.setupPopover(e)}onRemoveNumericField(e){let t=e.target.value;this.model.numericFields=this.model.numericFields.filter(i=>i!==t)}onShowDataLabelsChange(e){this.model.dataLabelsVisibility=e.target.checked}updateMode(e){let t=e!==c&&e.trim()!=="";this.model.mode=t?g.Category:g.Fields}setupPopover(e){e.stopImmediatePropagation(),this.removePieChartDataPopover();let t,i,r;switch(this.contentKind){case a.category:t=this.categoryElement.value,i=this._messages.categoryHeader,r=this.model.category;break;case a.numericFields:t=this.numericFieldsElement.value,i=this._messages.numericFieldsMultipleHeader,r=this.model.numericFields;break;case a.sortOrder:t=this.sortOrderElement.value,i=this._messages.sortOrderHeader,r=this.model.getSortOrder();break}this.pieChartPopover=b(s`<arcgis-charts-config-pie-chart-popover .headingTitle=${i} .referenceElement=${t} open .contentKind=${this.contentKind} .layerFieldsInfo=${this.layerFieldsInfo} .selectedContent=${r} @arcgisChartsConfigPieChartDataPopoverChange=${this.onPieChartDataChange} @arcgisChartsConfigPopoverClose=${this.popoverClose}></arcgis-charts-config-pie-chart-popover>`),!document.body.contains(this.pieChartPopover)&&this.pieChartPopover!==null&&document.body.appendChild(this.pieChartPopover)}getCorrectedCategoryValue(){return P({fieldName:this.model.category,fieldList:this.layerFieldsInfo})?"":m(this.layerFieldsInfo,this.model.category)}removePieChartDataPopover(){this.pieChartPopover!==null&&(this.pieChartPopover.open=!1,this.pieChartPopover=E(this.pieChartPopover))}renderSorting(){return s`<arcgis-charts-config-field-select .label=${this._messages[this.model.getSortOrder()]} @click=${this.onSortOrderSelect} ${h(this.sortOrderElement)}></arcgis-charts-config-field-select>`}renderCategory(){let e=this.getCorrectedCategoryValue();return s`<arcgis-charts-config-field-select .label=${e} @click=${this.onCategorySelect} ${h(this.categoryElement)}></arcgis-charts-config-field-select>`}renderNumericFields(e){let t=$(this.model.layer).idField,i=[];for(let r of e)r!==t&&i.push(this.buildNumericFieldItem(r));return s`<calcite-list label class=${o(l.fieldList)} ${h(this.numericFieldsElement)}>${i}</calcite-list>`}render(){let e=this.renderCategory(),t=this.renderSorting(),i=this.renderNumericFields([...this.model.numericFields]);return s`<calcite-label class=${o(l.label)}>${this._messages.category}${e}</calcite-label>${[s`<calcite-label class=${o(l.label)}>${this._messages.numericFields}${i}</calcite-label>`,s`<div class=${o(l.fab)}><calcite-fab appearance=outline-fill kind=neutral scale=m .label=${this._messages.selectNumericFields} text-enabled .text=${this._messages.selectNumericFields} icon=plus @click=${this.onAddNumericFields}></calcite-fab></div>`]}<calcite-label class=${o(l.label)} layout=inline-space-between>${this._messages.showDataLabels}<calcite-switch .checked=${this.model.dataLabelsVisibility} @calciteSwitchChange=${this.onShowDataLabelsChange}></calcite-switch></calcite-label><calcite-label class=${o(l.label)}>${this._messages.sortOrder}${t}</calcite-label>`}};v("arcgis-charts-config-pie-chart-data",p);return p},"Graphic","renderers/support/jsonUtils","symbols/support/symbolUtils","intl","layers/support/FeatureFilter","smartMapping/statistics/histogram","smartMapping/statistics/summaryStatistics","request","AttributeBinsGraphic","geometry/support/jsonUtils","rest/support/AttributeBinsQuery","rest/support/Query","rest/support/StatisticDefinition","time/TimeExtent","core/promiseUtils",c,e)
3
+ v5.0.0-next.127 */
4
+ import{a as k}from"./IGEXPONA.js";import{a as E}from"./7VZNVZLS.js";import{h as a}from"./DRYTKIOF.js";import{a as F}from"./NDANQVET.js";import e from"./OKCGAUWV.js";import c from"./MXDA5JOX.js";import"./YSC43FQ7.js";import"./WBDA74LW.js";import{e as g}from"./Q64WOSAD.js";import{b as y}from"./WNCZF3NZ.js";import{A as o,D as b,F as v,g as C,h as s,m as d,x as n,y as h,z as u}from"./XDG2XVR5.js";import"./PG43TIFC.js";export default $arcgis.t(([,,,,,,,,,,,,,,,{Bb:m,Fc:$,c:c},{h:P}])=>{var l={label:"label",fieldList:"field-list",fab:"fab"},w=C`:host{display:flex;flex-direction:column;width:var(--arcgis-charts-config-calcite-block-default-width);margin:var(--arcgis-charts-config-calcite-block-default-margin);margin-top:var(--arcgis-charts-top-section-margin)}.label,.disabled-label{display:flex;margin-left:var(--arcgis-charts-config-margin-minor);margin-right:var(--arcgis-charts-config-margin-minor);margin-bottom:var(--arcgis-charts-config-margin-minor);justify-content:space-between}.field-list{max-height:50vh;overflow-y:auto}.disabled-label{pointer-events:none}.fab{display:flex;margin-left:var(--arcgis-charts-config-margin-minor);margin-right:var(--arcgis-charts-config-margin-minor);margin-bottom:1.5rem;justify-content:center}`,p=class extends u{constructor(){super(...arguments),this._messages=F(),this.pieChartPopover=null,this.sortOrderElement=n(),this.categoryElement=n(),this.numericFieldsElement=n(),this.onPieChartDataChange=e=>{try{if(e.detail!==null&&e.detail?.value!==void 0){let{contentKind:t}=e.detail,i=[...e.detail.value];switch(t){case a.aggregation:this.model.aggregationType=i[0]!==y.NoAggregation?i[0]:"";break;case a.category:{let r=i[0]?.trim()||"";this.updateMode(r);let f=this.model.numericFields;f.length>1&&r!==c&&(this.model.numericFields=[f[0]]),this.model.category=r,this.model.colorMatch=!0;break}case a.numericFields:i.length>1&&(this.updateMode(c),this.model.category=c),this.model.numericFields=i;break;case a.sortOrder:this.model.setSortOrder(i[0]);break;default:break}}}catch(t){throw t instanceof Error&&this.arcgisChartsConfigDataChangeError.emit({error:t,model:this.model}),t}this.requestUpdate()},this.onModelConfigChange=()=>{this.requestUpdate()},this.popoverClose=e=>{this.pieChartPopover===e?.target&&this.removePieChartDataPopover()},this.layerFieldsInfo=[],this.arcgisChartsConfigDataChangeError=d(),this.arcgisChartsConfigPieChartDataNumericFieldValidate=d()}static{this.properties={messageOverrides:0,model:0,layerFieldsInfo:0}}static{this.styles=w}load(){this.modelChange(this.model),this.onModelConfigChange()}willUpdate(e){e.has("model")&&this.modelChange(this.model,e.get("model"))}disconnectedCallback(){super.disconnectedCallback(),this.removePieChartDataPopover(),this.model.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}modelChange(e,t){t?.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange),e?.addEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}buildNumericFieldItem(e){return k(e,s`<calcite-list-item .label=${m(this.layerFieldsInfo,e)} .value=${e} closable @calciteListItemClose=${this.onRemoveNumericField}></calcite-list-item>`)}onSortOrderSelect(e){this.contentKind=a.sortOrder,this.setupPopover(e)}onCategorySelect(e){this.contentKind=a.category,this.setupPopover(e)}onAddNumericFields(e){this.contentKind=a.numericFields,this.setupPopover(e)}onRemoveNumericField(e){let t=e.target.value;this.model.numericFields=this.model.numericFields.filter(i=>i!==t)}onShowDataLabelsChange(e){this.model.dataLabelsVisibility=e.target.checked}updateMode(e){let t=e!==c&&e.trim()!=="";this.model.mode=t?g.Category:g.Fields}setupPopover(e){e.stopImmediatePropagation(),this.removePieChartDataPopover();let t,i,r;switch(this.contentKind){case a.category:t=this.categoryElement.value,i=this._messages.categoryHeader,r=this.model.category;break;case a.numericFields:t=this.numericFieldsElement.value,i=this._messages.numericFieldsMultipleHeader,r=this.model.numericFields;break;case a.sortOrder:t=this.sortOrderElement.value,i=this._messages.sortOrderHeader,r=this.model.getSortOrder();break}this.pieChartPopover=b(s`<arcgis-charts-config-pie-chart-popover .headingTitle=${i} .referenceElement=${t} open .contentKind=${this.contentKind} .layerFieldsInfo=${this.layerFieldsInfo} .selectedContent=${r} @arcgisChartsConfigPieChartDataPopoverChange=${this.onPieChartDataChange} @arcgisChartsConfigPopoverClose=${this.popoverClose}></arcgis-charts-config-pie-chart-popover>`),!document.body.contains(this.pieChartPopover)&&this.pieChartPopover!==null&&document.body.appendChild(this.pieChartPopover)}getCorrectedCategoryValue(){return P({fieldName:this.model.category,fieldList:this.layerFieldsInfo})?"":m(this.layerFieldsInfo,this.model.category)}removePieChartDataPopover(){this.pieChartPopover!==null&&(this.pieChartPopover.open=!1,this.pieChartPopover=E(this.pieChartPopover))}renderSorting(){return s`<arcgis-charts-config-field-select .label=${this._messages[this.model.getSortOrder()]} @click=${this.onSortOrderSelect} ${h(this.sortOrderElement)}></arcgis-charts-config-field-select>`}renderCategory(){let e=this.getCorrectedCategoryValue();return s`<arcgis-charts-config-field-select .label=${e} @click=${this.onCategorySelect} ${h(this.categoryElement)}></arcgis-charts-config-field-select>`}renderNumericFields(e){let t=$(this.model.layer).idField,i=[];for(let r of e)r!==t&&i.push(this.buildNumericFieldItem(r));return s`<calcite-list label class=${o(l.fieldList)} ${h(this.numericFieldsElement)}>${i}</calcite-list>`}render(){let e=this.renderCategory(),t=this.renderSorting(),i=this.renderNumericFields([...this.model.numericFields]);return s`<calcite-label class=${o(l.label)}>${this._messages.category}${e}</calcite-label>${[s`<calcite-label class=${o(l.label)}>${this._messages.numericFields}${i}</calcite-label>`,s`<div class=${o(l.fab)}><calcite-fab appearance=outline-fill kind=neutral scale=m .label=${this._messages.selectNumericFields} text-enabled .text=${this._messages.selectNumericFields} icon=plus @click=${this.onAddNumericFields}></calcite-fab></div>`]}<calcite-label class=${o(l.label)} layout=inline-space-between>${this._messages.showDataLabels}<calcite-switch .checked=${this.model.dataLabelsVisibility} @calciteSwitchChange=${this.onShowDataLabelsChange}></calcite-switch></calcite-label><calcite-label class=${o(l.label)}>${this._messages.sortOrder}${t}</calcite-label>`}};v("arcgis-charts-config-pie-chart-data",p);return p},"Graphic","renderers/support/jsonUtils","symbols/support/symbolUtils","intl","layers/support/FeatureFilter","smartMapping/statistics/histogram","smartMapping/statistics/summaryStatistics","request","AttributeBinsGraphic","geometry/support/jsonUtils","rest/support/AttributeBinsQuery","rest/support/Query","rest/support/StatisticDefinition","time/TimeExtent","core/promiseUtils",c,e)
@@ -0,0 +1,4 @@
1
+ /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
+ v5.0.0-next.127 */
4
+ import{a as fe,b as Ce,c as ye}from"./RDZLIBPZ.js";import{a as ue}from"./7VZNVZLS.js";import g from"./PUYY62D6.js";import{l as c,m as W}from"./DRYTKIOF.js";import{a as K}from"./NDANQVET.js";import f from"./OKCGAUWV.js";import e from"./3K7XBPSX.js";import"./WSQSFA3C.js";import a from"./MXDA5JOX.js";import{C as re,f as ae,g as w,k as te,p as se,s as D,t as S,v as $,y as v}from"./YSC43FQ7.js";import"./WBDA74LW.js";import"./Q64WOSAD.js";import{a as d,b as le,l as F,m as _,w as ie,x as B}from"./WNCZF3NZ.js";import{A as p,B as q,D as Z,F as ee,g as Y,h as m,m as J,x as C,y as b,z as Q}from"./XDG2XVR5.js";import"./PG43TIFC.js";export default $arcgis.t(([,,,,,,,,,,,,ke,{createClassBreaksRenderer:xe},{getSchemes:Re},{Bb:j,Cc:me,Da:oe,F:O,G:x,Kb:he,Ma:ne,bb:ce},{s:de},{h:ge},{g:pe,s:z}])=>{function ve(s){let a;switch(s.length){case 4:{let e=s.match(/^#?([\da-f]{1})([\da-f]{1})([\da-f]{1})$/iu);e&&(a=[Number.parseInt(`${e[1]}${e[1]}`,16),Number.parseInt(`${e[2]}${e[2]}`,16),Number.parseInt(`${e[3]}${e[3]}`,16),255]);break}case 5:{let e=s.match(/^#?([\da-f]{1})([\da-f]{1})([\da-f]{1})([\da-f]{1})$/iu);e&&(a=[Number.parseInt(`${e[1]}${e[1]}`,16),Number.parseInt(`${e[2]}${e[2]}`,16),Number.parseInt(`${e[3]}${e[3]}`,16),Number.parseInt(`${e[4]}${e[4]}`,16)]);break}case 7:{let e=s.match(/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})$/iu);e&&(a=[Number.parseInt(e[1],16),Number.parseInt(e[2],16),Number.parseInt(e[3],16),255]);break}case 9:{let e=s.match(/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})([\da-f]{2})$/iu);e&&(a=[Number.parseInt(e[1],16),Number.parseInt(e[2],16),Number.parseInt(e[3],16),Number.parseInt(e[4],16)]);break}}return a}function U(s){let a;if(typeof s=="string"&&s.startsWith("#")){let e=ve(s);e&&(a=e)}else Array.isArray(s)&&s.every(e=>typeof e=="number")&&(s.length===4?a=s:s.length===3&&(a=[...s,255]));return a}function be(s){return s===$.BackwardDiagonal||s===$.Cross||s===$.DiagonalCross||s===$.ForwardDiagonal||s===$.Horizontal||s===$.Null||s===$.Solid||s===$.Vertical}function P(s){return s===S.Dash||s===S.DashDot||s===S.DashDotDot||s===S.Dot||s===S.Null||s===S.Solid}function Fe(s){let{categoryField:a,numericFields:e,configFields:t,inlineData:l}=s,o={};return t&&Object.keys(t).length>0&&"dataItems"in l&&(o={type:"uniqueValue",field1:a,uniqueValueInfos:[]},l.dataItems.forEach(r=>{let h=r[a];if(h!=null){let i={value:h};e.forEach(n=>{let g=U(r[`${t.fillColor}_${n}`]),y=r[`${t.fillOpacity}_${n}`],R=r[`${t.fillStyle}_${n}`],k=r[`${t.markerSize}_${n}`],I=U(r[`${t.outlineColor}_${n}`]),N=r[`${t.outlineOpacity}_${n}`],A=r[`${t.outlineWidth}_${n}`],V=r[`${t.outlineStyle}_${n}`],E=U(r[`${t.lineColor}_${n}`]),L=r[`${t.lineOpacity}_${n}`],M=r[`${t.lineWidth}_${n}`],H=r[`${t.lineStyle}_${n}`],G=r[`${t.displayLabel}_${n}`];if(typeof G=="string"&&(i={...i,label:G}),k!=null){let u={type:v.SMS};k&&typeof k=="number"&&(u.size=k),i.symbol=u}if(g||be(R)){let u=i.symbol&&i.symbol.type===v.SMS?i.symbol:{type:v.SFS};if(g&&(y&&typeof y=="number"&&(g[3]=y),u.color=g),be(R)&&(u.style=R),i.symbol=u,I||A!=null||P(V)){let T={type:v.SLS};I&&(N&&typeof N=="number"&&(I[3]=N),T.color=I),P(V)&&(T.style=V),A&&typeof A=="number"&&(T.width=A),i.symbol.outline=T}}else if(E||M!=null||P(H)){let u={type:v.SLS};E&&(L&&typeof L=="number"&&(E[3]=L),u.color=E),P(H)&&(u.style=H),M!=null&&typeof M=="number"&&(u.width=M),i.symbol=u}}),(i.label||i.symbol)&&o.uniqueValueInfos.push(i)}})),o}function De(s){let{numericFields:a,configFields:e,inlineData:t}=s,l=t;return"dataItems"in t&&Object.entries(e).forEach(([o,r])=>{a.forEach(h=>{let i=`${r}_${h}`;t.dataItems.forEach(n=>{i in n&&delete n[i]})})}),l}function Se(s){let{categoryField:a,categoryType:e,numericFields:t,inlineData:l}=s,o;if("dataItems"in l){let{dataItems:r}=l,h=[],i="OBJECTID",n=r.map((y,R)=>{let k={...y};return"FID"in y?i="FID":"ObjectId"in y&&(i="ObjectId"),k[i]||(k[i]=R),{attributes:k}});h.push({type:"esriFieldTypeOID",name:i});let g;switch(e){case"dateOnly":g=D.DateOnly;break;case"timeStampOffset":g=D.TimestampOffset;break;case"date":g=D.Date;break;case"number":g=D.Double;break;case"string":default:g=D.String;break}h.push({type:g,name:a}),t.forEach(y=>{h.push({type:D.Double,name:y})}),o={id:"",layerType:"ArcGISFeatureLayer",featureCollection:{layers:[{layerDefinition:{fields:h},featureSet:{features:n}}]}}}return o}async function $e(s){let{categoryField:a,categoryType:e,numericFields:t,configFields:l,inlineData:o}=s,r,h,i=w(o);l&&(r=Fe({categoryField:a,numericFields:t,configFields:l,inlineData:i}),i=De({numericFields:t,configFields:l,inlineData:i}));let n=Se({categoryField:a,categoryType:e,numericFields:t,inlineData:i});return n&&(h=await me(n)),{chartRenderer:r,iLayer:n,layer:h}}var Be=Y`.hide{display:none}.am5-html-container{z-index:101!important}.am5-layer-1000{z-index:1000!important}.am5-layer-30{z-index:100!important}.show{display:block}.notifyPanel{flex:0 1 auto}.disable-interactions{pointer-events:none}.dim-text{color:var(--arcgis-charts-dim-text)}:host{display:flex;flex-direction:column;width:var(--arcgis-charts-config-calcite-block-default-width);margin:var(--arcgis-charts-config-calcite-block-default-margin);margin-top:var(--arcgis-charts-top-section-margin)}.label{display:flex;margin-left:var(--arcgis-charts-config-margin-minor);margin-right:var(--arcgis-charts-config-margin-minor);margin-bottom:var(--arcgis-charts-config-margin-minor);justify-content:space-between}.color-ramp{width:100%;height:20px;overflow:hidden;border-radius:0}.color-ramp-segment{height:100%;display:inline-block}.list{margin-left:var(--arcgis-charts-config-margin-minor);margin-right:var(--arcgis-charts-config-margin-minor);margin-bottom:var(--arcgis-charts-config-margin-major)}`,f={label:"label",colorRamp:"color-ramp",colorRampSegment:"color-ramp-segment",list:"list"},X=class extends Q{constructor(){super(...arguments),this._messages=K(),this.commonStrings=K({name:"common",blocking:!0}),this.heatChartPopover=null,this.xAxisFieldElement=C(),this.aggregationElement=C(),this.numericFieldsElement=C(),this.calendarTypeElement=C(),this.calendarViewTypeElement=C(),this.classBreakMethodElement=C(),this.nullElement=C(),this.breaksCountElement=C(),this.colorSchemeElement=C(),this.onHeatChartDataPopoverChange=async a=>{try{if(a.detail?.value!==void 0){let{contentKind:e}=a.detail,t=a.detail.value;switch(e){case c.aggregation:this.model.aggregationType=t;break;case c.xAxisField:this.model.xAxisField=t,this.setDefaultPropertiesForCalendarHeatChart(),this.model.classificationMethod=B.naturalBreaks,this.model.heatRulesType=_.Renderer;break;case c.numericFields:this.model.numericFields=[t];break;case c.calendarType:{switch(t){case W.YearByMonthAndDayOfMonth:{let l={type:d.CalendarDateParts,unit:F.DayOfMonth},o={type:d.CalendarDateParts,unit:F.MonthOfYear};this.model.xTemporalBinning=l,this.model.setAxisValueFormat(0,{type:d.DateAxisFormat,intlOptions:{day:"2-digit"}}),this.model.yTemporalBinning=o,this.model.setAxisValueFormat(1,{type:d.DateAxisFormat,intlOptions:{month:"short"}});break}case W.WeekByDayOfWeekAndHourOfDay:{let l={type:d.CalendarDateParts,unit:F.HourOfDay},o={type:d.CalendarDateParts,unit:F.DayOfWeek};this.model.xTemporalBinning=l,this.model.setAxisValueFormat(0,{type:d.DateAxisFormat,intlOptions:{hour:"numeric",hour12:!0}}),this.model.yTemporalBinning=o,this.model.setAxisValueFormat(1,{type:d.DateAxisFormat,intlOptions:{weekday:"long"}});break}default:break}break}case c.calendarViewType:{this.model.viewType=t;break}case c.classBreakMethod:{this.model.classificationMethod=t,this.model.heatRulesType=_.Renderer,this.updateChartRenderer=!0;break}default:break}}}catch(e){throw this.arcgisChartsConfigDataChangeError.emit({error:e,model:this.model}),e}this.removeHeatChartDataPopover(),this.requestUpdate()},this.popoverClose=a=>{this.heatChartPopover===a?.target&&this.removeHeatChartDataPopover()},this.onModelConfigChange=()=>{this.requestUpdate()},this.allColorRamps=[],this.onColorRampSelection=a=>{let{ramp:e}=a.detail;this.selectedColorRamp=e,this.updateChartRenderer=!0,this.updateClassBreaksColor=!0,this.generateAndUpdateClassBreaks(),this.removeHeatChartDataPopover()},this.updateClassBreaksColor=!1,this.onEmptyCellNameChange=a=>{let{name:e}=a.detail;if(e!==void 0){let t={...this.model.emptyCell,name:e};this.model.emptyCell=t}},this.onEmptyCellColorChange=a=>{let{color:e}=a.detail;if(e!==void 0){let t=this.model.emptyCell,l={...t,symbol:{...t?.symbol,type:v.SFS,color:e,outline:t?.symbol?.outline&&{...t.symbol.outline,color:e}}};this.model.emptyCell=l}},this.availableColorRamps=[],this.updateChartRenderer=!1,this.layerFieldsInfo=[],this.arcgisChartsConfigDataChangeError=J()}static{this.properties={availableColorRamps:16,aggregationLabel:16,selectedColorRamp:16,updateChartRenderer:16,messageOverrides:0,model:0,layerFieldsInfo:0,open:5,chartData:0}}static{this.styles=Be}connectedCallback(){super.connectedCallback(),this.loadColorRampFromArcGIS()}load(){this.modelChange(this.model),this.onModelConfigChange()}willUpdate(a){a.has("model")&&this.modelChange(this.model,a.get("model")),this.aggregationLabel=oe(this.model.aggregationType,this.commonStrings),a.has("chartData")&&(this.updateChartRenderer=this.model.chartRenderer===void 0||ce(this.model.chartRenderer)===re.ClassBreaks)}updated(a){a.has("updateChartRenderer")&&this.updateChartRenderer&&this.generateAndUpdateClassBreaks()}disconnectedCallback(){super.disconnectedCallback(),this.model.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}loadColorRampFromArcGIS(){let a=ke.all();this.allColorRamps=a,this.availableColorRamps=this.allColorRamps,this.availableColorRamps.length>0&&!this.selectedColorRamp&&this.model.chartRenderer?.classBreakInfos===void 0&&(this.selectedColorRamp=this.availableColorRamps[0])}generateColorsForExistingBreaks(a){let e=this.model.breaksCount;return fe({numberOfClassBreaks:e,selectedColorRamp:a,colorRamp:this.model.chartRenderer?.classBreakInfos?.map(t=>t.symbol?.color)})}normalizeClassBreakInfosForCompare(a,e){return(a??[]).map(({classMinValue:t,classMaxValue:l,label:o,symbol:r})=>({classMinValue:t,classMaxValue:l,label:o,symbol:e?void 0:r}))}async generateAndUpdateClassBreaks(){let a=[];if(this.model.classificationMethod===B.manual&&this.model.chartRenderer?.classBreakInfos.length>0&&this.selectedColorRamp){a=w(this.model.chartRenderer?.classBreakInfos)??[];let l=this.generateColorsForExistingBreaks(this.selectedColorRamp);for(let o=0;o<a.length&&o<l.length;o++)a[o].symbol&&(a[o].symbol.color=l[o])}else if(this.model.classificationMethod!==B.manual&&this.chartData){let l=await $e({categoryField:this.model?.xAxisField?.[0]??"",categoryType:d.DateAxisFormat,numericFields:[O.valueField],inlineData:this.chartData});if(l.layer&&this.model.layer){let o=Re({geometryType:"point",theme:"high-to-low"})?.primaryScheme,r=await xe({layer:l.layer,field:O.valueField,classificationMethod:this.model.classificationMethod,numClasses:this.model.breaksCount,colorScheme:o});a=Ce({classBreaksRendererResult:r,numberOfClassBreaks:this.model.breaksCount,selectedColorRamp:this.selectedColorRamp,colorRamp:this.updateClassBreaksColor?void 0:this.model.chartRenderer?.classBreakInfos?.map(h=>h.symbol?.color)})}}let e=!this.updateClassBreaksColor,t=!te(this.normalizeClassBreakInfosForCompare(this.model.chartRenderer?.classBreakInfos,e),this.normalizeClassBreakInfosForCompare(a,e));this.updateChartRenderer&&t&&(this.model.chartRenderer={type:"classBreaks",field:O.valueField,classBreakInfos:a}),this.updateChartRenderer=!1,this.updateClassBreaksColor=!1}modelChange(a,e){e?.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange),a?.addEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}getCorrectedXAxisFieldValue(){return ge({fieldName:this.model.xAxisField,fieldList:this.layerFieldsInfo})?"":j(this.layerFieldsInfo,this.model.xAxisField)}onXAxisFieldSelect(a){this.contentKind=c.xAxisField,this.setupPopover(a)}onNumericFieldSelect(a){this.contentKind=c.numericFields,this.setupPopover(a)}onCalendarTypeSelect(a){this.contentKind=c.calendarType,this.setupPopover(a)}onClassBreakMethodSelect(a){this.contentKind=c.classBreakMethod,this.setupPopover(a)}onColorSchemeSelect(a){this.contentKind=c.colorScheme,this.setupPopover(a)}onBreaksCountChange(a){let e=se(a.target.value);e<x.min?e=x.min:e>x.max&&(e=x.max),he(e)&&(this.breaksCountElement.value&&(this.breaksCountElement.value.value=e.toString()),this.model.breaksCount=e,this.updateChartRenderer=!0,this.model.heatRulesType=_.Renderer)}onAggregationSelect(a){this.contentKind=c.aggregation,this.setupPopover(a)}onNullSelect(a){this.contentKind=c.null,this.setupPopover(a)}onIncludeLeapDayChange(a){let e=a.target.checked;this.model.includeLeapDay=e}setupPopover(a){a.stopImmediatePropagation(),this.removeHeatChartDataPopover();let e,t,l;switch(this.contentKind){case c.aggregation:e=this.aggregationElement.value,t=this._messages.aggregation,l=this.model.aggregationType;break;case c.xAxisField:e=this.xAxisFieldElement.value,t=this._messages.xAxisField,l=this.model.xAxisField;break;case c.numericFields:e=this.numericFieldsElement.value,t=this._messages.numericFieldOptional,l=this.model.numericFields?.[0];break;case c.calendarType:e=this.calendarTypeElement.value,t=this._messages.calendarType,l=z(this.model);break;case c.calendarViewType:e=this.calendarViewTypeElement.value,t=this._messages.viewType,l=this.model.viewType;break;case c.classBreakMethod:e=this.classBreakMethodElement.value,t=this._messages.method,l=this.model.classificationMethod;break;case c.colorScheme:e=this.colorSchemeElement.value,t=this._messages.colorScheme,l=this.selectedColorRamp?.name;break;case c.null:e=a.target,t=this._messages.null;break}this.heatChartPopover=Z(m`<arcgis-charts-config-heat-chart-popover .headingTitle=${t} .referenceElement=${e} open .contentKind=${this.contentKind} .model=${this.model} .layerFieldsInfo=${this.layerFieldsInfo} .selectedContent=${l} @arcgisChartsConfigHeatChartDataPopoverChange=${this.onHeatChartDataPopoverChange} @arcgisChartsConfigPopoverClose=${this.popoverClose} .colorRamps=${this.availableColorRamps} @arcgisChartsConfigHeatChartColorRampChange=${this.onColorRampSelection} @arcgisChartsConfigPopoverEmptyCellColorChange=${this.onEmptyCellColorChange} @arcgisChartsConfigPopoverEmptyCellNameChange=${this.onEmptyCellNameChange}></arcgis-charts-config-heat-chart-popover>`),!document.body.contains(this.heatChartPopover)&&this.heatChartPopover!==null&&document.body.appendChild(this.heatChartPopover)}removeHeatChartDataPopover(){this.heatChartPopover!==null&&(this.heatChartPopover.open=!1,this.heatChartPopover=ue(this.heatChartPopover))}setDefaultPropertiesForCalendarHeatChart(){if(!de(this.model?.config)){if(this.model.yAxisField=this.model.xAxisField,this.model.xTemporalBinning===void 0){let a={type:d.CalendarDateParts,unit:F.DayOfMonth};this.model.xTemporalBinning=a}if(this.model.yTemporalBinning===void 0){let a={type:d.CalendarDateParts,unit:F.MonthOfYear};this.model.yTemporalBinning=a,this.model.setAxisValueFormat(1,{type:d.DateAxisFormat,intlOptions:{month:"short"}})}this.model.viewType=ie.singleCalendarView}}renderXAxisFieldSelect(){let a=this.getCorrectedXAxisFieldValue();return m`<arcgis-charts-config-field-select .label=${a} @click=${this.onXAxisFieldSelect} ${b(this.xAxisFieldElement)}></arcgis-charts-config-field-select>`}renderAggregation(){return m`<arcgis-charts-config-field-select .label=${this.model.aggregationType===le.NoAggregation?this._messages.noAggregation:this.aggregationLabel} @click=${this.onAggregationSelect} ${b(this.aggregationElement)}></arcgis-charts-config-field-select>`}renderNumericFieldsSelect(){let a=this.model.numericFields?.[0]===this.model.layer?.objectIdField?"":j(this.layerFieldsInfo,this.model.numericFields?.[0]);return m`<arcgis-charts-config-field-select .label=${a} @click=${this.onNumericFieldSelect} ${b(this.numericFieldsElement)}></arcgis-charts-config-field-select>`}renderCalendarTypeSelect(){let a=z(this.model)??"",e={weekByDayOfWeekAndHourOfDay:this._messages.weekByDayOfWeekAndHourOfDay,yearByMonthAndDayOfMonth:this._messages.yearByMonthAndDayOfMonth},t=a?e[a]??"":"";return m`<arcgis-charts-config-field-select .label=${t} @click=${this.onCalendarTypeSelect} ${b(this.calendarTypeElement)}></arcgis-charts-config-field-select>`}renderClassBreakMethodSelect(){let a={equalInterval:this._messages.classBreaksMethod?.equalInterval,manual:this._messages.classBreaksMethod?.manual,naturalBreaks:this._messages.classBreaksMethod?.naturalBreaks,quantile:this._messages.classBreaksMethod?.quantile},e=this.model.classificationMethod?a[ae(this.model.classificationMethod)]??"":"";return m`<arcgis-charts-config-field-select .label=${e} @click=${this.onClassBreakMethodSelect} ${b(this.classBreakMethodElement)}></arcgis-charts-config-field-select>`}renderColorRampSelect(){let a=this.model.chartRenderer?.classBreakInfos?.map(e=>{let t=e!==void 0?ye(e.symbol.color):"#FFFFFF";return m`<div class=${p(f.colorRampSegment)} style=${q({backgroundColor:t,width:`${100/this.model.breaksCount}%`})}></div>`});return m`<arcgis-charts-config-field-select label @click=${this.onColorSchemeSelect} ${b(this.colorSchemeElement)}><div slot=fieldSelectSlot class=${p(f.colorRamp)}>${a}</div></arcgis-charts-config-field-select>`}renderClassBreaksTable(){let a=this.model.chartRenderer?.classBreakInfos??[];return m`<calcite-table caption="Simple table"><calcite-table-row slot=table-header><calcite-table-header .heading=${this._messages.symbol}></calcite-table-header><calcite-table-header .heading=${this._messages.upperValue}></calcite-table-header></calcite-table-row>${a.map(e=>m`<calcite-table-row><calcite-table-cell><calcite-swatch label scale=m .color=${`rgba(${e.symbol.color?.[0]}, ${e.symbol.color?.[1]}, ${e.symbol.color?.[2]}, ${e.symbol.color?.[3]/255})`}></calcite-swatch></calcite-table-cell><calcite-table-cell>${e.label}</calcite-table-cell></calcite-table-row>`)}</calcite-table>`}renderNullUI(){let a=this.model.emptyCell,e=this._messages.null,t=a?.symbol?.color??ne.grayColor,[l,o,r,h]=[...t],i=`rgba(${l},${o},${r},${h/255})`;return m`<calcite-list label class=${p(f.list)} selection-mode=none ${b(this.nullElement)}><calcite-list-item .label=${e} .value=${e} @calciteListItemSelect=${this.onNullSelect}><calcite-icon icon=square-f style=${q({color:i})} slot=content-end></calcite-icon></calcite-list-item></calcite-list>`}render(){let a=this.renderXAxisFieldSelect(),e=this.renderAggregation(),t=this.renderNumericFieldsSelect(),l=this.renderCalendarTypeSelect(),o=this.renderClassBreakMethodSelect(),r=this.renderColorRampSelect(),h=this.renderClassBreaksTable(),i=this.renderNullUI();return m`<calcite-label class=${p(f.label)}>${this._messages.dateRequired}${a}</calcite-label><calcite-label class=${p(f.label)}>${this._messages.calendarType}${l}</calcite-label><calcite-label class=${p(f.label)}>${this._messages.aggregation}${e}</calcite-label><calcite-label class=${p(f.label)}>${this._messages.numericFieldOptional}${t}</calcite-label><calcite-label class=${p(f.label)}>${this._messages.method}${o}</calcite-label><calcite-label class=${p(f.label)}>${this._messages.numberOfClasses}<calcite-input type=number .min=${x.min} .max=${x.max} .disabled=${this.model.classificationMethod===void 0||this.model.classificationMethod===B.manual} step=1 .value=${pe(this.model.breaksCount,5)} @calciteInputInput=${this.onBreaksCountChange} ${b(this.breaksCountElement)}></calcite-input></calcite-label><calcite-label class=${p(f.label)}>${this._messages.colorScheme}${r}</calcite-label>${i}<calcite-accordion appearance=transparent selection-mode=single><calcite-accordion-item .heading=${this._messages.classBreaks}>${h}</calcite-accordion-item></calcite-accordion><calcite-label class=${p(f.label)} layout=inline-space-between>${this._messages.includeLeapDay}<calcite-switch .checked=${this.model.includeLeapDay} @calciteSwitchChange=${this.onIncludeLeapDayChange}></calcite-switch></calcite-label>`}};ee("arcgis-charts-config-heat-chart-data",X);return X},"intl","layers/support/FeatureFilter","smartMapping/statistics/histogram","smartMapping/statistics/summaryStatistics","request","AttributeBinsGraphic","geometry/support/jsonUtils","rest/support/AttributeBinsQuery","rest/support/Query","rest/support/StatisticDefinition","time/TimeExtent","core/promiseUtils","smartMapping/symbology/support/colorRamps","smartMapping/renderers/color","smartMapping/symbology/color",a,e,f,g)