@arcgis/map-components 5.2.0-next.121 → 5.2.0-next.122

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 (215) hide show
  1. package/dist/cdn/{Q6LQ5BUX.js → 34E7N7GU.js} +1 -1
  2. package/dist/cdn/{WC2DVIUW.js → 3E36QFXG.js} +2 -2
  3. package/dist/cdn/3FRV7BIJ.js +2 -0
  4. package/dist/cdn/{Z4FIADPO.js → 3TR7QOHP.js} +1 -1
  5. package/dist/cdn/464EB67Q.js +2 -0
  6. package/dist/cdn/{W5B2F2LI.js → 4DENNWA5.js} +1 -1
  7. package/dist/cdn/{24SNB22W.js → 5IFQI7ML.js} +1 -1
  8. package/dist/cdn/{JMWMN4DG.js → 5SLLYIWJ.js} +1 -1
  9. package/dist/cdn/{7QH5PIWM.js → 6EQW3YHG.js} +1 -1
  10. package/dist/cdn/{ALEBI75Z.js → AXFCL6D2.js} +1 -1
  11. package/dist/cdn/{FR7ARNMJ.js → B4QA6HTE.js} +1 -1
  12. package/dist/cdn/CCFGYVBQ.js +2 -0
  13. package/dist/cdn/{LM6RYRCS.js → CNYKQYK2.js} +1 -1
  14. package/dist/cdn/E4JAHCCG.js +2 -0
  15. package/dist/cdn/{JD562WMM.js → EDMWGUZ2.js} +1 -1
  16. package/dist/cdn/{HGCKG3CA.js → EEHSPW4M.js} +1 -1
  17. package/dist/cdn/{FAFDJABP.js → ESAIFZ6N.js} +1 -1
  18. package/dist/cdn/{GPIHHNP7.js → F46CTQWP.js} +1 -1
  19. package/dist/cdn/F5LP5CU2.js +2 -0
  20. package/dist/cdn/FKCRBOFP.js +2 -0
  21. package/dist/cdn/{DAPKG4DY.js → G3KYGRHM.js} +1 -1
  22. package/dist/cdn/{Y3Y3AB5L.js → G4HKU5PR.js} +1 -1
  23. package/dist/cdn/{Y5Q3Q4GW.js → GIOUZTHM.js} +1 -1
  24. package/dist/cdn/{4DWURRQB.js → GLH5GJZC.js} +1 -1
  25. package/dist/cdn/{3VBI4PPT.js → H3CCHIXN.js} +1 -1
  26. package/dist/cdn/{ACIG6774.js → HH5GEJCC.js} +1 -1
  27. package/dist/cdn/{VFSWB7LJ.js → IWOKTFPQ.js} +1 -1
  28. package/dist/cdn/{UA5FRNJG.js → J4BQSA3J.js} +1 -1
  29. package/dist/cdn/{5E2DZJWK.js → JBGNMAZ7.js} +1 -1
  30. package/dist/cdn/{OPLR5W7O.js → JSYLRK26.js} +1 -1
  31. package/dist/cdn/{5FBX5V2M.js → KHHVCV55.js} +1 -1
  32. package/dist/cdn/{LBJMKYT2.js → KM2GXXBO.js} +1 -1
  33. package/dist/cdn/{ESISPXFF.js → KRYDKCJG.js} +1 -1
  34. package/dist/cdn/{46ZZWK6X.js → KY3ND2AY.js} +1 -1
  35. package/dist/cdn/KYWVUIH5.js +2 -0
  36. package/dist/cdn/{7KWX2CED.js → LAY2RKKS.js} +1 -1
  37. package/dist/cdn/LV5KLLVW.js +2 -0
  38. package/dist/cdn/{QNHJY7QE.js → M3EXGLNJ.js} +1 -1
  39. package/dist/cdn/{TOBWMRET.js → M3EZM5X5.js} +1 -1
  40. package/dist/cdn/{2JMMBI2U.js → MV2EKVMR.js} +1 -1
  41. package/dist/cdn/{3EYHGXI5.js → PLTLRYBF.js} +1 -1
  42. package/dist/cdn/PR6OAZWA.js +2 -0
  43. package/dist/cdn/{UNP7N3DO.js → PUYZDQHZ.js} +1 -1
  44. package/dist/cdn/{BFVEHL3M.js → PYP3U5W5.js} +1 -1
  45. package/dist/cdn/{JOOXDIS7.js → Q4AJYCNY.js} +1 -1
  46. package/dist/cdn/{HH4T6PVP.js → QMQV37ML.js} +1 -1
  47. package/dist/cdn/QXVHT3RD.js +5 -0
  48. package/dist/cdn/{UXUG6DBJ.js → R7E5VLXC.js} +1 -1
  49. package/dist/cdn/{IZ7UWAQP.js → RJSFDOIW.js} +1 -1
  50. package/dist/cdn/{VSJ3MYSY.js → RKAZH2LM.js} +1 -1
  51. package/dist/cdn/{5IQQ6P2J.js → RU7PGLLB.js} +1 -1
  52. package/dist/cdn/{4W6PAHFY.js → S62FQUEJ.js} +1 -1
  53. package/dist/cdn/S7T2NPCW.js +2 -0
  54. package/dist/cdn/{NK74ZCP7.js → SXQRPAPL.js} +1 -1
  55. package/dist/cdn/{MU54WQG6.js → TILA2OKK.js} +1 -1
  56. package/dist/cdn/TJDMX7ZL.js +2 -0
  57. package/dist/cdn/TMJX7DFH.js +2 -0
  58. package/dist/cdn/TZHXSIXK.js +2 -0
  59. package/dist/cdn/US6PRR7S.js +2 -0
  60. package/dist/cdn/VSH4WLRS.js +2 -0
  61. package/dist/cdn/X6EQMX6U.js +2 -0
  62. package/dist/cdn/{XP4IZ2KQ.js → YRZRKOE3.js} +1 -1
  63. package/dist/cdn/YZ55QJUM.js +2 -0
  64. package/dist/cdn/ZUAZUUTW.js +2 -0
  65. package/dist/cdn/assets/feature-form-next/t9n/messages.ar.json +1 -1
  66. package/dist/cdn/assets/feature-form-next/t9n/messages.bg.json +1 -1
  67. package/dist/cdn/assets/feature-form-next/t9n/messages.ca.json +1 -1
  68. package/dist/cdn/assets/feature-form-next/t9n/messages.cs.json +1 -1
  69. package/dist/cdn/assets/feature-form-next/t9n/messages.da.json +1 -1
  70. package/dist/cdn/assets/feature-form-next/t9n/messages.de.json +1 -1
  71. package/dist/cdn/assets/feature-form-next/t9n/messages.el.json +1 -1
  72. package/dist/cdn/assets/feature-form-next/t9n/messages.es.json +1 -1
  73. package/dist/cdn/assets/feature-form-next/t9n/messages.et.json +1 -1
  74. package/dist/cdn/assets/feature-form-next/t9n/messages.fi.json +1 -1
  75. package/dist/cdn/assets/feature-form-next/t9n/messages.fr.json +1 -1
  76. package/dist/cdn/assets/feature-form-next/t9n/messages.he.json +1 -1
  77. package/dist/cdn/assets/feature-form-next/t9n/messages.hr.json +1 -1
  78. package/dist/cdn/assets/feature-form-next/t9n/messages.hu.json +1 -1
  79. package/dist/cdn/assets/feature-form-next/t9n/messages.id.json +1 -1
  80. package/dist/cdn/assets/feature-form-next/t9n/messages.it.json +1 -1
  81. package/dist/cdn/assets/feature-form-next/t9n/messages.ja.json +1 -1
  82. package/dist/cdn/assets/feature-form-next/t9n/messages.ko.json +1 -1
  83. package/dist/cdn/assets/feature-form-next/t9n/messages.lt.json +1 -1
  84. package/dist/cdn/assets/feature-form-next/t9n/messages.lv.json +1 -1
  85. package/dist/cdn/assets/feature-form-next/t9n/messages.nl.json +1 -1
  86. package/dist/cdn/assets/feature-form-next/t9n/messages.no.json +1 -1
  87. package/dist/cdn/assets/feature-form-next/t9n/messages.pl.json +1 -1
  88. package/dist/cdn/assets/feature-form-next/t9n/messages.pt-BR.json +1 -1
  89. package/dist/cdn/assets/feature-form-next/t9n/messages.pt-PT.json +1 -1
  90. package/dist/cdn/assets/feature-form-next/t9n/messages.ro.json +1 -1
  91. package/dist/cdn/assets/feature-form-next/t9n/messages.ru.json +1 -1
  92. package/dist/cdn/assets/feature-form-next/t9n/messages.sk.json +1 -1
  93. package/dist/cdn/assets/feature-form-next/t9n/messages.sl.json +1 -1
  94. package/dist/cdn/assets/feature-form-next/t9n/messages.sr.json +1 -1
  95. package/dist/cdn/assets/feature-form-next/t9n/messages.sv.json +1 -1
  96. package/dist/cdn/assets/feature-form-next/t9n/messages.th.json +1 -1
  97. package/dist/cdn/assets/feature-form-next/t9n/messages.tr.json +1 -1
  98. package/dist/cdn/assets/feature-form-next/t9n/messages.uk.json +1 -1
  99. package/dist/cdn/assets/feature-form-next/t9n/messages.vi.json +1 -1
  100. package/dist/cdn/assets/feature-form-next/t9n/messages.zh-CN.json +1 -1
  101. package/dist/cdn/assets/feature-form-next/t9n/messages.zh-TW.json +1 -1
  102. package/dist/cdn/assets/selection-list/t9n/messages.en.json +1 -1
  103. package/dist/cdn/assets/selection-toolbar/t9n/messages.en.json +1 -1
  104. package/dist/cdn/assets/utility-network-trace-results/t9n/messages.en.json +1 -1
  105. package/dist/cdn/index.js +1 -1
  106. package/dist/chunks/layer-utils.js +48 -44
  107. package/dist/chunks/slots.js +1 -1
  108. package/dist/components/arcgis-expand/customElement.d.ts +9 -0
  109. package/dist/components/arcgis-expand/customElement.js +27 -27
  110. package/dist/components/arcgis-exploratory-analysis/customElement.js +46 -46
  111. package/dist/components/arcgis-feature-form-utility-network-association-list/customElement.js +1 -1
  112. package/dist/components/arcgis-feature-templates/customElement.js +1 -1
  113. package/dist/components/arcgis-fullscreen/customElement.js +9 -10
  114. package/dist/components/arcgis-legend-card-element/customElement.js +26 -26
  115. package/dist/components/arcgis-link-chart/customElement.d.ts +9 -0
  116. package/dist/components/arcgis-link-chart/customElement.js +11 -11
  117. package/dist/components/arcgis-map/customElement.d.ts +9 -0
  118. package/dist/components/arcgis-map/customElement.js +2 -2
  119. package/dist/components/arcgis-paste/customElement.js +1 -1
  120. package/dist/components/arcgis-scale-bar/customElement.js +8 -8
  121. package/dist/components/arcgis-scene/customElement.d.ts +9 -0
  122. package/dist/components/arcgis-scene/customElement.js +6 -6
  123. package/dist/components/arcgis-selection-list/customElement.d.ts +33 -12
  124. package/dist/components/arcgis-selection-list/customElement.js +79 -63
  125. package/dist/components/arcgis-selection-toolbar/customElement.d.ts +42 -2
  126. package/dist/components/arcgis-selection-toolbar/customElement.js +60 -37
  127. package/dist/components/arcgis-utility-network-trace-aggregated-geometry-result-item/customElement.d.ts +18 -3
  128. package/dist/components/arcgis-utility-network-trace-aggregated-geometry-result-item/customElement.js +63 -53
  129. package/dist/components/arcgis-utility-network-trace-analysis/customElement.d.ts +11 -3
  130. package/dist/components/arcgis-utility-network-trace-analysis/customElement.js +107 -53
  131. package/dist/components/arcgis-utility-network-trace-analysis/index.js +1 -0
  132. package/dist/components/arcgis-utility-network-trace-analysis/types.d.ts +5 -1
  133. package/dist/components/arcgis-utility-network-trace-elements-result-item/customElement.d.ts +19 -11
  134. package/dist/components/arcgis-utility-network-trace-elements-result-item/customElement.js +124 -110
  135. package/dist/components/arcgis-utility-network-trace-functions-result-item/customElement.d.ts +29 -0
  136. package/dist/components/arcgis-utility-network-trace-functions-result-item/customElement.js +31 -17
  137. package/dist/components/arcgis-utility-network-trace-locations/customElement.js +1 -1
  138. package/dist/components/arcgis-utility-network-trace-results/customElement.d.ts +63 -14
  139. package/dist/components/arcgis-utility-network-trace-results/customElement.js +245 -55
  140. package/dist/components/arcgis-utility-network-trace-results/index.js +1 -2
  141. package/dist/components/arcgis-utility-network-trace-results-pane/customElement.js +7 -7
  142. package/dist/components/arcgis-utility-network-validate-network-topology/customElement.js +1 -1
  143. package/dist/docs/api.json +1 -1
  144. package/dist/docs/docs.json +1 -1
  145. package/dist/docs/vscode.html-custom-data.json +1 -1
  146. package/dist/docs/web-types.json +1 -1
  147. package/dist/index.d.ts +6 -0
  148. package/dist/loader.js +10 -10
  149. package/dist/types/lumina.d.ts +14 -9
  150. package/dist/types/preact.d.ts +14 -9
  151. package/dist/types/react.d.ts +14 -9
  152. package/dist/types/stencil.d.ts +14 -9
  153. package/package.json +7 -7
  154. package/dist/cdn/4FADGEJD.js +0 -2
  155. package/dist/cdn/A2FK4TED.js +0 -2
  156. package/dist/cdn/BOEHQXPR.js +0 -2
  157. package/dist/cdn/C2HB2U6P.js +0 -2
  158. package/dist/cdn/CRWARUC7.js +0 -2
  159. package/dist/cdn/GC4D3K6B.js +0 -2
  160. package/dist/cdn/GJZCVU6G.js +0 -5
  161. package/dist/cdn/GYTTYWIC.js +0 -2
  162. package/dist/cdn/JGHPNDIO.js +0 -2
  163. package/dist/cdn/JRFQGFRL.js +0 -2
  164. package/dist/cdn/MRC7R44N.js +0 -2
  165. package/dist/cdn/MT6BTCFR.js +0 -2
  166. package/dist/cdn/OYD6YL32.js +0 -2
  167. package/dist/cdn/QD7ELNLS.js +0 -2
  168. package/dist/cdn/RVJTWRVG.js +0 -2
  169. package/dist/cdn/TBSKBHHL.js +0 -2
  170. package/dist/cdn/TIDNGXMD.js +0 -2
  171. package/dist/cdn/Z44GSKHZ.js +0 -2
  172. package/dist/cdn/ZB6W452H.js +0 -2
  173. /package/dist/cdn/{ZU6D3YMF.js → 27MP6TEF.js} +0 -0
  174. /package/dist/cdn/{3XRSSDOC.js → 3JCF73F4.js} +0 -0
  175. /package/dist/cdn/{RLTZHJ26.js → 3XEPXV4Q.js} +0 -0
  176. /package/dist/cdn/{IMINWWQN.js → 43IOCYG5.js} +0 -0
  177. /package/dist/cdn/{HMZDI4HQ.js → 45JO7F4Y.js} +0 -0
  178. /package/dist/cdn/{232VF5GS.js → 4W35GLNO.js} +0 -0
  179. /package/dist/cdn/{7HQJTIYO.js → 5CER2N5T.js} +0 -0
  180. /package/dist/cdn/{33AEAI5T.js → 5M56ZA46.js} +0 -0
  181. /package/dist/cdn/{W6X34YBZ.js → 6NWR2Z4F.js} +0 -0
  182. /package/dist/cdn/{KMODOE6H.js → 7FVXPOAG.js} +0 -0
  183. /package/dist/cdn/{2PRRRGTC.js → AYJQLWX4.js} +0 -0
  184. /package/dist/cdn/{HJP2DQC3.js → AZ73DBU3.js} +0 -0
  185. /package/dist/cdn/{CQW2542N.js → B4CANXID.js} +0 -0
  186. /package/dist/cdn/{HLHFT3VN.js → BEFZSVBT.js} +0 -0
  187. /package/dist/cdn/{55Q2U4HS.js → BIWQEPK4.js} +0 -0
  188. /package/dist/cdn/{N5NLF7RI.js → BLYJE76S.js} +0 -0
  189. /package/dist/cdn/{2Q7J34UP.js → CESFJ6AD.js} +0 -0
  190. /package/dist/cdn/{5ZZ7JN5X.js → COKGOKO2.js} +0 -0
  191. /package/dist/cdn/{7Y65HW7Z.js → D3LYSFXK.js} +0 -0
  192. /package/dist/cdn/{FZATLDJD.js → EAM45WZP.js} +0 -0
  193. /package/dist/cdn/{6VBFCBUV.js → EDTGV4YF.js} +0 -0
  194. /package/dist/cdn/{62XRQDSI.js → FMBY3L4S.js} +0 -0
  195. /package/dist/cdn/{TKC3X6S6.js → GQ6SYNZS.js} +0 -0
  196. /package/dist/cdn/{YUZAZ3CJ.js → H4FH2RBM.js} +0 -0
  197. /package/dist/cdn/{P3MLJ7YL.js → I5ZESLWO.js} +0 -0
  198. /package/dist/cdn/{MM6LPGBW.js → KO7RD6SS.js} +0 -0
  199. /package/dist/cdn/{2LEEKX4J.js → LQ76PRWK.js} +0 -0
  200. /package/dist/cdn/{CTHAODQE.js → MUWOF7W4.js} +0 -0
  201. /package/dist/cdn/{G5DB24SO.js → OCLOCCB6.js} +0 -0
  202. /package/dist/cdn/{2UG26OVP.js → OJXNUBIA.js} +0 -0
  203. /package/dist/cdn/{ANRJPTRX.js → OUXE3CSQ.js} +0 -0
  204. /package/dist/cdn/{AKKV6RKF.js → PXAY7IM4.js} +0 -0
  205. /package/dist/cdn/{4PMOT2RS.js → QMYL4UM7.js} +0 -0
  206. /package/dist/cdn/{UCFBAQVW.js → QPFX5XH3.js} +0 -0
  207. /package/dist/cdn/{EGN54PEX.js → RFSBZHJD.js} +0 -0
  208. /package/dist/cdn/{4TZLBS5N.js → RYYBMDGS.js} +0 -0
  209. /package/dist/cdn/{CDGKQKVU.js → T2DT5I33.js} +0 -0
  210. /package/dist/cdn/{EJ5KLAEE.js → UINNR6FV.js} +0 -0
  211. /package/dist/cdn/{KWL3F4UP.js → UPZVIKOH.js} +0 -0
  212. /package/dist/cdn/{KXCLNNE5.js → VCRVQMYT.js} +0 -0
  213. /package/dist/cdn/{COSLSZXO.js → VWN2LORT.js} +0 -0
  214. /package/dist/cdn/{3NKJ4HFO.js → XAMLHDWZ.js} +0 -0
  215. /package/dist/cdn/{N43ZQ4C7.js → ZWN6DXNO.js} +0 -0
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{a as p}from"./UNPUCYYB.js";import h from"./ILBDNJQP.js";import{a as b}from"./5JADSW57.js";import g from"./4SLCQ6RS.js";import e from"./4FBTH6YD.js";import c from"./KORK4WZ7.js";import{h as m}from"./XSCEZHHS.js";import"./UVNNXZHK.js";import a from"./GNASFNLA.js";import"./QUZTFUWM.js";import"./XPEGBUNJ.js";import"./XURWCCLX.js";import{O as v,S as l,V as y,a as f,b as s,w as d}from"./GFTZ7EZP.js";import"./H6RQVSYM.js";export default $arcgis.t(([{substitute:u,formatNumber:M},S,,,,n,T])=>{var C=f`:host{width:100%;display:flex;>*{align-items:center;align-self:center;height:100%;width:100%}}.root{display:flex;flex-direction:column}calcite-action-bar[layout=horizontal]{width:100%;calcite-chip{margin-inline-start:auto}}calcite-action-bar[layout=vertical]{height:100%;calcite-chip{margin-block-start:auto}}calcite-action-bar slot{align-items:center}calcite-dropdown:has(calcite-action:not([text-enabled])){align-self:center}calcite-action:not([text-enabled]){align-self:center}calcite-chip{display:flex;align-self:center;line-height:initial}calcite-dropdown{calcite-icon{margin-inline-start:var(--calcite-space-2xs)}}calcite-chip[closed]{display:inline-flex}calcite-progress{--calcite-progress-background-color: transparent}`,w={replace:"overwrite-features",add:"cursor-plus",remove:"cursor-minus"},$=T(S),g=class extends v{constructor(){super(...arguments),this.viewModel=$(this),this.messages=b(),this.autoDestroyDisabled=!1,this.disabled=!1,this.icon="selection-set",this.view=this.viewModel.view,this.activeOperation=this.viewModel.activeOperation,this.availableOperationTypes=["replace","add","remove"],this.continuousSelectionEnabled=this.viewModel.continuousSelectionEnabled,this.defaultLassoToolOptions=this.viewModel.defaultLassoToolOptions,this.defaultOperationType=this.viewModel.defaultOperationType,this.defaultPolygonToolOptions=this.viewModel.defaultPolygonToolOptions,this.defaultPointToolOptions=this.viewModel.defaultPointToolOptions,this.defaultRectangleToolOptions=this.viewModel.defaultRectangleToolOptions,this.effectiveSelectionManager=this.viewModel.effectiveSelectionManager,this.effectiveSources=this.viewModel.effectiveSources,this.hideChip=!1,this.hideChipCloseButton=!1,this.hideLassoTool=!1,this.hideOperationTypeControls=!1,this.hidePanTool=!1,this.hidePolygonTool=!1,this.hidePointTool=!1,this.hideProgress=!1,this.hideRectangleTool=!1,this.layout="horizontal",this.returnFeatureTitleFields=this.viewModel.returnFeatureTitleFields,this.selectionManager=this.viewModel.selectionManager,this.showTextLabels=!1,this.sources=this.viewModel.sources,this.toolConfigs=this.viewModel.toolConfigs,this.visualScale="m",this.arcgisBeforeActivate=n(()=>this.viewModel,"before-activate"),this.arcgisClear=d(),this.arcgisComplete=n(()=>this.viewModel,"complete"),this.arcgisPropertyChange=m()("activeOperation","state"),this.arcgisReady=d(),this.arcgisSelectionChange=n(()=>this.viewModel,"selection-change")}static{this.properties={_effectiveDisabled:16,_effectiveOperationType:16,_processing:16,autoDestroyDisabled:5,disabled:7,icon:1,label:1,referenceElement:1,view:0,activeOperation:32,availableOperationTypes:0,continuousSelectionEnabled:5,defaultLassoToolOptions:0,defaultOperationType:1,defaultPolygonToolOptions:0,defaultPointToolOptions:0,defaultRectangleToolOptions:0,effectiveSelectionManager:32,effectiveSources:32,hideChip:5,hideChipCloseButton:5,hideLassoTool:5,hideOperationTypeControls:5,hidePanTool:5,hidePolygonTool:5,hidePointTool:5,hideProgress:5,hideRectangleTool:5,layerViewPreferenceDisabled:5,layout:1,returnFeatureTitleFields:5,returnGeometryDisabled:5,selectionManager:0,showTextLabels:5,sources:0,state:32,syncResultsDisabled:5,syncWhileDrawing:5,toolConfigs:0,visualScale:1}}static{this.styles=C}get _effectiveDisabled(){return this.disabled||this.state==="disabled"}get _effectiveOperationType(){return this.activeOperation?.effectiveType||this.defaultOperationType}get _processing(){return!!this.activeOperation?.processingFinalSelection}get layerViewPreferenceDisabled(){return!this.viewModel.layerViewPreferenceEnabled}set layerViewPreferenceDisabled(e){this.viewModel.layerViewPreferenceEnabled=!e}get returnGeometryDisabled(){return!this.viewModel.returnGeometry}set returnGeometryDisabled(e){this.viewModel.returnGeometry=!e}get state(){return this.viewModel.state}get syncResultsDisabled(){return!this.viewModel.persistSelection}set syncResultsDisabled(e){this.viewModel.persistSelection=!e}get syncWhileDrawing(){return!this.viewModel.selectOnComplete}set syncWhileDrawing(e){this.viewModel.selectOnComplete=!e}async activate(e){if(this.cancel(),!this._effectiveDisabled)return this.viewModel.activate(e)}async activateTool(e){if(!this._effectiveDisabled)return this.viewModel.activateTool(e)}async cancel(){this.viewModel.cancel()}async destroy(){this.viewModel?.destroy()}async syncSources(){return this.effectiveSelectionManager?.syncSources()}async toggleTool(e){if(!this._effectiveDisabled)return this.viewModel.toggleTool(e)}_handleClearSelection(){this.effectiveSelectionManager?.clear(),this.arcgisClear.emit()}_getLabelForSelectionOperationType(e){let{messages:t}=this;switch(e){case"replace":return t?.replaceSelection;case"add":return t?.addToSelection;case"remove":return t?.removeFromSelection}}_getTextForSelectionOperationType(e){let{messages:t}=this;switch(e){case"replace":return t?.replace;case"add":return t?.add;case"remove":return t?.remove}}_getTextForChip(e){let{layout:t,messages:i,visualScale:o}=this,a=o==="l"?999:99;return i.countTruncated&&e>a&&t==="vertical"?u(i.countTruncated,{count:a}):M(e)}_getTooltipForChip(e){let{messages:t}=this;return!t?.selectionCount||!t?.clearSelectionCount?"":this.hideChipCloseButton||e===0?u(t.selectionCount,{count:e}):u(t.clearSelectionCount,{count:e})}#i(){if(this.hideProgress)return;let e=this.messages.processing;return s`<calcite-progress aria-label=${e??l} .label=${e} .type=${this._processing?"indeterminate":"determinate"}></calcite-progress>`}#o(){return p("tools-group",s`<calcite-action-group>${this.#s()}${this.#a()}</calcite-action-group>`)}#s(){return[this.#l(),this.#c(),this.#r(),this.#d(),this.#h()]}#a(){return this.toolConfigs.map(({toolName:e,icon:t})=>this.#e(e,t))}#l(){if(this.hidePanTool)return;let e=this.messages.pan??"";return this.#t({active:!this.activeOperation,disabled:this._effectiveDisabled,icon:"pan",onclick:()=>{this.cancel()},text:e,title:e})}#n(){if(this.hideChip)return;let{effectiveSelectionManager:e}=this,t=e?.count??0,i=this._getTextForChip(t),o=!this.hideChipCloseButton&&t>0;return s`<calcite-chip appearance=outline .closable=${o} .disabled=${this._effectiveDisabled||t===0} .label=${i} .scale=${this.visualScale} title=${this._getTooltipForChip(t)??l} @calciteChipClose=${this._handleClearSelection}>${i}</calcite-chip>`}#c(){if(this.hidePointTool)return;let{messages:e}=this;return this.#e("point","selection-set",e.point,e.selectByPoint)}#r(){if(this.hidePolygonTool)return;let{messages:e}=this;return this.#e("polygon","polygon-select",e.polygon,e.selectByPolygon)}#h(){if(this.hideLassoTool)return;let{messages:e}=this;return this.#e("lasso","lasso-select",e.lasso,e.selectByLasso)}#d(){if(this.hideRectangleTool)return;let{messages:e}=this;return this.#e("rectangle","cursor-marquee",e.rectangle,e.selectByRectangle)}#p(){let{availableOperationTypes:e}=this;if(this.hideOperationTypeControls||!e.length)return;let{_effectiveOperationType:t,showTextLabels:i,visualScale:o}=this,a=w[t],c=this._getTextForSelectionOperationType(t),r=this._getLabelForSelectionOperationType(t);return p("toggle-group",s`<calcite-action-group><calcite-dropdown overlay-positioning=fixed placement=bottom-start .scale=${o}><calcite-action class=tool-button .disabled=${this._effectiveDisabled} .icon=${a} .scale=${o} slot=trigger .text=${c??""} .textEnabled=${i} title=${r??l}><calcite-icon icon=chevron-down scale=s></calcite-icon></calcite-action><calcite-dropdown-group>${e.map(h=>this.#u(h))}</calcite-dropdown-group></calcite-dropdown></calcite-action-group>`)}#u(e){return s`<calcite-dropdown-item .iconStart=${w[e]} .selected=${this.defaultOperationType===e} @calciteDropdownItemSelect=${()=>this.defaultOperationType=e}>${this._getLabelForSelectionOperationType(e)}</calcite-dropdown-item>`}#e(e,t="selection",i=e,o=i){return this.#t({active:this.activeOperation?.toolName===e,disabled:this._effectiveDisabled,icon:t,onclick:()=>{this.toggleTool(e)},text:i,title:o})}#t(e){let{active:t,disabled:i,icon:o,onclick:a,text:c,title:r}=e,{showTextLabels:h,visualScale:O}=this;return s`<calcite-action .active=${t} class=tool-button .disabled=${i} .icon=${o} @click=${a} .text=${c} .textEnabled=${h} title=${r??l} .scale=${O}></calcite-action>`}render(){return s`<div><calcite-action-bar expand-toggle-disabled .layout=${this.layout} overflow-mode=none .scale=${this.visualScale}>${this.#p()}${this.#o()}${this.#n()}</calcite-action-bar>${this.#i()}</div>`}};y("arcgis-selection-toolbar",g);return g},"intl","widgets/support/SelectionToolbar/SelectionToolbarViewModel",a,c,e,g,h)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import i from"./YG4HDEP3.js";import"./VJVKFKSG.js";import h from"./ILBDNJQP.js";import{a as y}from"./5JADSW57.js";import f from"./4FBTH6YD.js";import e from"./KORK4WZ7.js";import{h as p}from"./XSCEZHHS.js";import"./UVNNXZHK.js";import b from"./GNASFNLA.js";import"./QUZTFUWM.js";import"./XPEGBUNJ.js";import{b as c}from"./XURWCCLX.js";import{N as l,O as u,V as d,a as g,b as a,o,w as r}from"./GFTZ7EZP.js";import"./H6RQVSYM.js";export default $arcgis.t(([T,{when:R},x,,,,b,{a:m}])=>{var k=g`:host{--arcgis-internal-color-black-30: color-mix(in srgb, #000000 30.2%, transparent);--arcgis-internal-box-shadow: var(--calcite-spacing-none) var(--calcite-spacing-px) var(--calcite-spacing-base) var(--arcgis-internal-color-black-30);--arcgis-internal-top-max-width: calc(min(100cqw, 100vw) - var(--calcite-spacing-xxxl));--arcgis-internal-panel-width: 300px;--arcgis-internal-panel-height: 100%;--arcgis-internal-panel-height-sm: 240px;--arcgis-internal-panel-height-md: 420px;--arcgis-internal-panel-height-lg: 540px;--arcgis-internal-panel-height-xl: 680px;--arcgis-internal-panel-gap: var(--calcite-spacing-lg);--arcgis-internal-panel-actions-gap: var(--calcite-spacing-sm);--arcgis-internal-basemap-gallery-width-lg: 450px;--arcgis-internal-collapse-icon-flip: scaleX(1);--arcgis-internal-row-direction: row;--arcgis-internal-legend-width: 300px;--arcgis-internal-layout-overlay-space-top: var(--arcgis-layout-overlay-space-top, 0px);--arcgis-internal-layout-overlay-space-bottom: var(--arcgis-layout-overlay-space-bottom, 0px);--arcgis-internal-layout-overlay-space-left: var(--arcgis-layout-overlay-space-left, 0px);--arcgis-internal-layout-overlay-space-right: var(--arcgis-layout-overlay-space-right, 0px);--arcgis-internal-view-color-focus: var(--arcgis-view-color-focus, var(--calcite-color-brand));--arcgis-internal-attribution-space-bottom: var(--arcgis-internal-layout-overlay-space-bottom);--arcgis-internal-attribution-space-left: var(--arcgis-internal-layout-overlay-space-left);--arcgis-internal-attribution-space-right: var(--arcgis-internal-layout-overlay-space-right);--arcgis-internal-attribution-font-size: var(--calcite-font-size-sm);--arcgis-internal-attribution-font-size-sm: var(--calcite-font-size-xs);--arcgis-internal-sketch-justify-content: flex-start}:host{display:flex;flex-direction:column;height:var(--arcgis-internal-panel-height, 100%)}arcgis-utility-network-trace-inputs[mode=default]{height:auto}calcite-tabs{display:flex;flex-direction:column;height:100%}calcite-tab{--calcite-tab-content-space-y: 0;--calcite-panel-background-color: var(--calcite-color-background);min-height:var(--arcgis-internal-panel-height-sm, 240px)}calcite-panel{--calcite-panel-background-color: var(--calcite-color-foreground-1)}calcite-notice{margin:var(--calcite-spacing-md)}slot[name=results]::slotted(:not(arcgis-utility-network-trace-results)){display:none}slot[name=results]::slotted([arcgis-hidden-results-slot-item]){display:none}.inputs-tab-container{display:flex;flex-direction:column;height:100%}.trace-inputs-warning{flex:none;height:fit-content;calcite-notice{margin:var(--calcite-spacing-md) var(--calcite-spacing-md) 0}}`,D=b(x),v="arcgis-utility-network-trace-results",f="arcgis-hidden-results-slot-item",C=["actions","autoDestroyDisabled","aggregatedGeometryGraphicsColor","disableHighlightFeatureResults","hideActionBar","hideFeatureResults","hidePlaceholder","includeDefaultActionsDisabled","messageOverrides","referenceElement","view","_traceError","_traceResult"],h=class extends u{constructor(){super(...arguments),this._messages=y({blocking:!0}),this.#t=D(this),this._activeTab="input",this._showMissingTerminalWarning=!1,this._showNoStartingPointsWarning=!1,this._slottedElements=[],this._mode="default",this.autoDestroyDisabled=!1,this.aggregatedGeometryGraphicsColor=new T([255,255,0,.6]),this.disableHighlightFeatureResults=!1,this.hideActionBar=!1,this.hideGraphics=!1,this.hidePlaceholder=!1,this.hideFeatureResults=!1,this.includeDefaultActionsDisabled=!1,this.state=this.#t.state,this.view=this.#t.view,this.arcgisHideGraphicsChange=r(),this.arcgisPropertyChange=p()("aggregatedGeometryGraphicsColor","hideGraphics"),this.arcgisReady=r(),this.arcgisTriggerAction=r(),this.arcgisTraceLocationSelectEnd=r(),this.arcgisTraceLocationSelectStart=r(),this.arcgisTraceResultClear=r(),this.arcgisTraceResultFeaturesReady=r()}static{this.properties={_activeTab:16,_traceError:16,_traceResult:16,_showMissingTerminalWarning:16,_showNoStartingPointsWarning:16,_slottedElements:16,_mode:16,actions:0,autoDestroyDisabled:5,beforeTraceLocationSelectStart:0,aggregatedGeometryGraphicsColor:0,disableHighlightFeatureResults:5,hideActionBar:5,hideGraphics:5,hidePlaceholder:5,hideFeatureResults:5,includeDefaultActionsDisabled:5,label:3,messageOverrides:0,traceResultFeatures:32,referenceElement:1,state:32,view:0}}static{this.styles=k}#t;#e;#i;get#r(){let{view:t}=this;return t?.map?t.map.allLayers.toArray().concat(t.map.allTables.toArray()):[]}get#l(){return Array.from(this.el.children).some(t=>t.slot==="results"&&t.matches(v))}get traceResultFeatures(){return this.#i?.traceResultFeatures??[]}async destroy(){await this.#i?.destroy(),await this.#e?.destroy(),await this.manager.destroy()}load(){this.manager.onLifecycle(()=>[R(()=>!this.#t.utilityNetwork,()=>this.#s("input"))])}willUpdate(t){C.some(e=>t.has(e))&&this.#a()}#n(){this._traceResult=void 0,this.#i?.clearResults()}#c(){if(!this.#e)return;let{traceLocations:t,traceLocationDetails:e,traceConfiguration:i,isSubnetworkNameTraceSelected:s}=this.#e,w=!!i?.subnetworkName,$=t?.some(n=>n.type==="starting-point"),_=e?.some(n=>!!n.flagProperties.terminalConfiguration&&!n.flagProperties.selectedTerminals?.size)??!1;this._traceError=void 0,this._showNoStartingPointsWarning=!s&&!$||s&&!w,this._showMissingTerminalWarning=_}#s(t){this._activeTab=t}#a(){if(!this.#i)return;let t={actions:this.actions,autoDestroyDisabled:this.autoDestroyDisabled,aggregatedGeometryGraphicsColor:this.aggregatedGeometryGraphicsColor,disableHighlightFeatureResults:this.disableHighlightFeatureResults,expanded:!0,hideActionBar:this.hideActionBar,hideFeatureResults:this.hideFeatureResults,hidePlaceholder:this.hidePlaceholder,includeDefaultActionsDisabled:this.includeDefaultActionsDisabled,layers:this.#r,messageOverrides:this.messageOverrides,referenceElement:this.referenceElement,traceError:this._traceError,traceResult:this._traceResult,utilityNetwork:this.#t.utilityNetwork??void 0,view:this.view??void 0};Object.assign(this.#i,t)}#h(t){let{_messages:e}=this;switch(t){case"no-user-type-extension":return e.errors.loadErrors.noUserTypeExtension;case"no-utility-network":return e.errors.loadErrors.noUtilityNetwork;case"no-view":return e.errors.loadErrors.noView;case"sceneView-not-supported":return e.errors.loadErrors.sceneViewNotSupported;default:return t}}async#g(){let t=this.#e?.selectedNamedTraceConfiguration,e=this.#e?.traceConfiguration;if(!(t?.traceType&&e)){o("error",this,"Trace configuration not found");return}let i=this.#e?.traceLocations;try{this._traceResult=await this.#t.executeTraceConfiguration({traceType:t.traceType,traceConfiguration:e,traceLocations:i??[],resultTypes:t.resultTypes,outSpatialReference:this.view?.spatialReference})}catch(s){m(s,this,"Error while running trace"),this._traceError=s,this._traceResult=void 0}}#u(){this.#c(),!(this._showNoStartingPointsWarning||this._showMissingTerminalWarning)&&(this._showNoStartingPointsWarning=!1,this._showMissingTerminalWarning=!1,this.#n(),this.#s("results"),this.#g())}#d(t){t&&(this.#e=t)}#o(t){t&&(this.#i=t)}#p(t){this._slottedElements=c(t);let e=c(t,v);e.length<this._slottedElements.length&&o("warn",this,"The trace results pane only renders instances of `arcgis-utility-network-trace-results` in the `results` slot."),e.length>1&&o("warn",this,"Multiple `arcgis-utility-network-trace-results` elements were provided in the `results` slot. Only the first will render.");let[i]=e;for(let s of e)s===i?s.removeAttribute(f):s.setAttribute(f,"");this.#o(i),this.#a()}#m(t){let{detail:e,target:i}=t;e.name==="aggregatedGeometryGraphicsColor"?(t.stopPropagation(),this.aggregatedGeometryGraphicsColor=i[e.name]):e.name==="hideGraphics"&&(t.stopPropagation(),this.hideGraphics=i[e.name],this.arcgisHideGraphicsChange.emit(this.hideGraphics))}#y(t){t.stopPropagation(),this.arcgisTraceLocationSelectStart.emit(t.detail).defaultPrevented&&t.preventDefault()}#b(t){t.stopPropagation(),this.arcgisTraceLocationSelectEnd.emit()}#v(t){t.stopPropagation(),this.arcgisTraceResultClear.emit()}#f(t){t.stopPropagation(),this.arcgisTraceResultFeaturesReady.emit()}#w(t){t.stopPropagation(),this.arcgisTriggerAction.emit(t.detail)}#$(t){let{detail:e,target:i}=t;t.stopPropagation(),e.name==="selectedUtilityNetwork"&&(this.#t.utilityNetwork=i.selectedUtilityNetwork,this.#a()),e.name==="selectedNamedTraceConfiguration"&&(this._showNoStartingPointsWarning=!1,this._showMissingTerminalWarning=!1),e.name==="mode"&&(this._mode=i.mode)}#_(){let{_messages:t}=this;return a`<calcite-panel class="trace-inputs-warning"><calcite-notice open icon=exclamation-mark-triangle closable kind=danger scale=s @calciteNoticeClose=${()=>this._showMissingTerminalWarning=!1}><div slot=title>${t.errors.missingTerminalTitle}</div><div slot=message>${t.errors.missingTerminalBody}</div></calcite-notice></calcite-panel>`}#T(){let{_messages:t}=this;return a`<calcite-panel class="trace-inputs-warning"><calcite-notice open icon=exclamation-mark-triangle closable kind=danger scale=s @calciteNoticeClose=${()=>this._showNoStartingPointsWarning=!1}><div slot=title>${t.errors.noStartingPointsTitle}</div><div slot=message>${t.errors.noStartingPointsBody}</div></calcite-notice></calcite-panel>`}#R(){return a`<calcite-tab .selected=${this._activeTab==="results"}>${this.state==="executing"&&a`<calcite-panel><calcite-loader .label=${this._messages.runningTrace} .text=${this._messages.runningTrace}></calcite-loader></calcite-panel>`||""}<arcgis-utility-network-trace-results-pane hide-warnings .hidden=${this.state==="executing"}><slot name=results @slotchange=${this.#p}></slot>${this.#l?null:a`<arcgis-utility-network-trace-results .actions=${this.actions} .autoDestroyDisabled=${this.autoDestroyDisabled} .aggregatedGeometryGraphicsColor=${this.aggregatedGeometryGraphicsColor} .disableHighlightFeatureResults=${this.disableHighlightFeatureResults} expanded .hideActionBar=${this.hideActionBar} .hideFeatureResults=${this.hideFeatureResults} .hidePlaceholder=${this.hidePlaceholder} .includeDefaultActionsDisabled=${this.includeDefaultActionsDisabled} .layers=${this.#r} .messageOverrides=${this.messageOverrides} .referenceElement=${this.referenceElement} .traceError=${this._traceError} .traceResult=${this._traceResult} .utilityNetwork=${this.#t.utilityNetwork??void 0} .view=${this.view??void 0} @arcgisPropertyChange=${this.#m} @arcgisResultsReady=${this.#f} @arcgisTraceResultClear=${this.#v} @arcgisTriggerAction=${this.#w} ${l(this.#o)}></arcgis-utility-network-trace-results>`}</arcgis-utility-network-trace-results-pane></calcite-tab>`}#x(){let{_messages:t,_traceResult:e}=this,i=!!(e?.elements.length||e?.globalFunctionResults.length||e?.aggregatedGeometry)&&this.#i?.state==="ready",s=this.#i?.numFeatureResults??0;return a`<calcite-button appearance=outline width=full @click=${()=>{this.#s("input"),this.#n()}} .disabled=${!i} slot=footer>${s>0&&!this.hideFeatureResults&&this.state!=="executing"?t.buttons.clearResultsCustom.replace("{number}",s.toString()):t.buttons.clearResultsGeneric}</calcite-button>`}#k(){let{_mode:t}=this,{loadError:e}=this.#t,i=(e==="no-user-type-extension"||e==="sceneView-not-supported"?a`<calcite-notice kind=danger open scale=s slot=content-top width=auto><div slot=message>${this.#h(e)}</div></calcite-notice>`:void 0)??a`${this._showNoStartingPointsWarning&&t==="default"&&this.#T()||""}${this._showMissingTerminalWarning&&t==="default"&&this.#_()||""}<arcgis-utility-network-trace-inputs .autoDestroyDisabled=${this.autoDestroyDisabled} .hideFeaturesActionBar=${this.hideActionBar} .referenceElement=${this.referenceElement} .view=${this.view??void 0} .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisPropertyChange=${this.#$} @arcgisTraceLocationSelectEnd=${this.#b} @arcgisTraceLocationSelectStart=${this.#y} ${l(this.#d)}></arcgis-utility-network-trace-inputs>`;return a`<calcite-tab .selected=${this._activeTab==="input"}><div class="inputs-tab-container">${i}</div></calcite-tab>`}#D(){let{state:t}=this;if(this._mode!=="default")return null;let e=t==="disabled"||t==="loading"||!this.#e?.traceConfiguration;return a`<calcite-button appearance=solid width=full @click=${this.#u} slot=footer .disabled=${e}>${this._messages.buttons.getResults}</calcite-button>`}render(){let{_activeTab:t,state:e}=this;return a`<calcite-panel><calcite-tabs layout=center position=top><calcite-tab-nav slot=title-group><calcite-tab-title @click=${()=>this.#s("input")} .selected=${t==="input"}>${this._messages.tabs.inputTab}</calcite-tab-title><calcite-tab-title @click=${()=>this.#s("results")} .selected=${t==="results"} .disabled=${e==="disabled"||e==="loading"}>${this._messages.tabs.resultsTab}</calcite-tab-title></calcite-tab-nav>${this.#k()}${this.#R()}</calcite-tabs>${t==="input"?this.#D():null}${t==="results"?this.#x():null}</calcite-panel>`}};d("arcgis-utility-network-trace-analysis",h);return h},"Color","core/reactiveUtils","networks/UtilityNetworkTraceAnalysis",b,e,f,h,i)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import d from"./JD562WMM.js";import c from"./C2HB2U6P.js";import"./XSCEZHHS.js";import"./UVNNXZHK.js";import"./QUZTFUWM.js";import{b}from"./XPEGBUNJ.js";import"./XURWCCLX.js";import{O as k,Q as w,R as $,S as l,V as _,a as A,b as a,n as x}from"./GFTZ7EZP.js";import"./H6RQVSYM.js";export default $arcgis.t(([z,P,C,L,{watch:S},,{d:f}])=>{function I(i){let t=i.toLowerCase();return t==="image/bmp"||t==="image/emf"||t==="image/exif"||t==="image/gif"||t==="image/x-icon"||t==="image/jpeg"||t==="image/png"||t==="image/tiff"||t==="image/x-wmf"}function T(i){return i?i==="text/plain"?"file-text":i==="application/pdf"?"file-pdf":i==="text/csv"?"file-csv":i==="application/gpx+xml"?"file-gpx":i==="application/x-dwf"?"file-cad":i==="application/postscript"||i==="application/json"||i==="text/xml"||i==="model/vrml"?"file-code":i==="application/x-zip-compressed"||i==="application/x-7z-compressed"||i==="application/x-gzip"||i==="application/x-tar"||i==="application/x-gtar"||i==="application/x-bzip2"||i==="application/gzip"||i==="application/x-compress"||i==="application/x-apple-diskimage"||i==="application/x-rar-compressed"||i==="application/zip"?"file-zip":i.includes("image/")?"file-image":i.includes("audio/")?"file-sound":i.includes("video/")?"file-video":i.includes("msexcel")||i.includes("ms-excel")||i.includes("spreadsheetml")?"file-excel":i.includes("msword")||i.includes("ms-word")||i.includes("wordprocessingml")?"file-word":i.includes("powerpoint")||i.includes("presentationml")?"file-report":"file":"file"}var j=A`:host([empty]){display:none}.item-link{display:flex;flex-grow:1;color:var(--calcite-color-text-3)}.item-link:visited,.item-link:hover,.item-link:focus-visible,.item-link:active{color:var(--calcite-color-text-1)}.item-link img{max-width:100%;max-height:100%;object-fit:contain}.item-link--list{align-items:center;justify-content:center;width:64px;max-height:64px;overflow:hidden;border-radius:var(--calcite-corner-radius-sm)}.item-link--list img{border-radius:var(--calcite-corner-radius-sm)}.item-link--list-icon{border:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.item-link--list calcite-icon{margin:var(--calcite-spacing-lg)}.item-link--preview{align-items:center;justify-content:center}.item-link--preview calcite-icon{margin-block:var(--calcite-spacing-lg)}.item-description{text-align:center;word-wrap:break-word;word-break:break-word}calcite-link{--calcite-link-text-color: var(--calcite-color-text-3);padding-inline:var(--calcite-spacing-sm);word-wrap:break-word;word-break:break-word}calcite-card{width:100%}calcite-card:hover,calcite-card:focus,calcite-card:focus-within{--calcite-card-border-color: var(--calcite-color-text-1)}`,E=C.ofType(z),v=class extends k{constructor(){super(...arguments),this._attachmentLayer=null,this._supportsImageOrientation=window?.CSS?.supports("image-orientation","from-image"),this.hideSection=!1,this._attachmentInfos=new E,this.headingLevel=2,this.hidePreviewImageAttachmentName=!1,this.empty=!1}static{this.properties={effectiveDisplayType:16,getAttachmentsPromise:16,hideSection:16,_attachmentInfos:16,_hasContent:16,supportsResizeAttachments:16,attachmentKeywords:0,attachmentTypes:0,description:1,displayType:1,graphic:0,heading:1,messages:0,orderByFields:0,headingLevel:9,hidePreviewImageAttachmentName:5,empty:39}}static{this.styles=j}get _supportsTypeWildcard(){let{graphic:t}=this;if(!t)return!1;let e=f(t);return e?.loaded&&"capabilities"in e&&e.capabilities&&"attachment"in e.capabilities&&e.capabilities.attachment&&"supportsResize"in e.capabilities.attachment&&e.capabilities.attachment.supportsTypeWildcard||!1}get effectiveDisplayType(){let{displayType:t}=this;return!t||t==="auto"?this.supportsResizeAttachments?"preview":"list":t}get _hasContent(){return this._attachmentInfos.length>0||this.getAttachmentsPromise!=null}get supportsResizeAttachments(){let{graphic:t}=this;if(!t)return!1;let e=f(t);return e?.loaded&&"capabilities"in e&&e.capabilities&&"attachment"in e.capabilities&&e.capabilities.attachment&&"supportsResize"in e.capabilities.attachment&&e.capabilities.attachment.supportsResize||!1}loaded(){this.manager.onLifecycle(()=>[S(()=>this.graphic,()=>this.graphicChanged(),{initial:!0})])}async getAttachments(){let{_attachmentLayer:t,_attachmentInfos:e,orderByFields:n,attachmentTypes:c,attachmentKeywords:o,_supportsTypeWildcard:m}=this;if(!t||typeof t.queryAttachments!="function")throw new L("invalid-layer","getAttachments(): A valid layer is required.");let p=this.graphic?.getObjectId();if(typeof p!="number")throw new L("invalid-object-id","getAttachments(): Numeric object id is required");let u=n?.map(s=>`${s.field} ${s.order==="descending"?"DESC":"ASC"}`),r=new P({objectIds:[p],returnMetadata:!0,orderByFields:u,attachmentTypes:m?c?.filter(Boolean).map(s=>`${s}/*`):void 0,keywords:o}),h=[],d=t.queryAttachments(r).then(s=>s[p]||h).catch(()=>h);this.getAttachmentsPromise=d,this._setEmpty(!1);let g=await d;e.destroyAll(),g.length&&e.addMany(g),this.getAttachmentsPromise=null,this._setEmpty(!this._hasContent)}_setEmpty(t){x(()=>this.empty=t)}setAttachmentLayer(){let{graphic:t}=this,e=f(t);this._attachmentLayer=e?e.type==="scene"&&e.associatedLayer!=null?e.associatedLayer:e:null}graphicChanged(){if(!this.graphic){this._attachmentInfos.destroyAll(),this.getAttachmentsPromise=null,this._setEmpty(!0);return}this.setAttachmentLayer(),this.getAttachments().catch(()=>{this._attachmentInfos.destroyAll(),this.getAttachmentsPromise=null,this._setEmpty(!0)})}getCSSTransform(t){let{orientationInfo:e}=t;return!this._supportsImageOrientation&&e?[e.rotation?`rotate(${e.rotation}deg)`:"",e.mirrored?"scaleX(-1)":""].join(" "):""}render(){return this.empty?null:a`<div class="root"><arcgis-feature-element-info .heading=${this.heading} .description=${this.description} .headingLevel=${this.headingLevel}></arcgis-feature-element-info>${this.renderAttachments()}</div>`}renderAttachmentsList(t){return a`<calcite-list .loading=${!!this.getAttachmentsPromise} .label=${this.messages?.componentLabel??""} interaction-mode=static selection-mode=none>${t.toArray().filter(Boolean).map(e=>this.renderAttachmentListItem(e))}</calcite-list>`}renderAttachmentsPreview(t){return a`<calcite-card-group .label=${this.messages?.componentLabel??""}>${this.getAttachmentsPromise?a`<calcite-card loading></calcite-card>`:t.toArray().filter(Boolean).map(e=>this.renderAttachmentPreviewItem(e))}</calcite-card-group>`}renderAttachmentsCarousel(t){let e=t.toArray().filter(Boolean);return a`<calcite-carousel .paginationDisabled=${e.length<2} .label=${this.messages?.componentLabel??""} pagination-position=top>${this.getAttachmentsPromise?a`<calcite-carousel-item .label=${this.messages?.componentLabel??""}><calcite-card loading></calcite-card></calcite-carousel-item>`:e.map(n=>a`<calcite-carousel-item .label=${n.name||this.messages?.noTitle||""}>${this.renderAttachmentPreviewItem(n,!0)}</calcite-carousel-item>`)}</calcite-carousel>`}renderAttachments(){let{effectiveDisplayType:t,_attachmentInfos:e}=this;return t==="carousel"?this.renderAttachmentsCarousel(e):t==="preview"?this.renderAttachmentsPreview(e):this.renderAttachmentsList(e)}renderAttachmentListItem(t){let{supportsResizeAttachments:e}=this,{contentType:n,name:c,url:o,size:m}=t,p=64,u=c||this.messages?.noTitle,r=T(n),h=this.getCSSTransform(t),d=h?{transform:h,"image-orientation":"none"}:{},g=e&&I(n),s=a`<a class=${w(b("item-link","item-link--list",{"item-link--list-icon":!g}))} slot=content-start href=${o??void 0??l} rel=noreferrer target=_blank>${g?a`<img alt=${c??l} src=${`${o}${o?.includes("?")?"&":"?"}w=${p}&s=${m}`} style=${$(d)} title=${c??l}>`:a`<calcite-icon .icon=${r}></calcite-icon>`}</a>`,y=a`<calcite-link slot=content .href=${o??void 0} rel=noreferrer target=_blank>${u}</calcite-link>`;return a`<calcite-list-item .label=${u}>${s}${y}</calcite-list-item>`}renderAttachmentPreviewItem(t,e=!1){let{supportsResizeAttachments:n}=this,{contentType:c,name:o,url:m,size:p}=t,u=225,r=o||this.messages?.noTitle,h=T(c),d=this.getCSSTransform(t),g=d?{transform:d,"image-orientation":"none"}:{},s=n&&I(c),y=a`<a class=${w(b("item-link","item-link--preview"))} slot=thumbnail href=${m??void 0??l} rel=noreferrer target=_blank aria-label=${r??l} title=${r??l}>${s?a`<img alt=${r??l} src=${`${m}${m?.includes("?")?"&":"?"}w=${u}&s=${p}`} style=${$(g)}>`:a`<calcite-icon scale=l .icon=${h}></calcite-icon>`}</a>`;return a`<calcite-card .label=${r}>${y}${(e||this.hidePreviewImageAttachmentName)&&s?null:a`<span class="item-description" slot=description>${r}</span>`}</calcite-card>`}};_("arcgis-feature-attachments",v);return v},"rest/query/support/AttachmentInfo","rest/support/AttachmentQuery","core/Collection","core/Error","core/reactiveUtils",c,d)
2
+ import d from"./EDMWGUZ2.js";import c from"./TMJX7DFH.js";import"./XSCEZHHS.js";import"./UVNNXZHK.js";import"./QUZTFUWM.js";import{b}from"./XPEGBUNJ.js";import"./XURWCCLX.js";import{O as k,Q as w,R as $,S as l,V as _,a as A,b as a,n as x}from"./GFTZ7EZP.js";import"./H6RQVSYM.js";export default $arcgis.t(([z,P,C,L,{watch:S},,{d:f}])=>{function I(i){let t=i.toLowerCase();return t==="image/bmp"||t==="image/emf"||t==="image/exif"||t==="image/gif"||t==="image/x-icon"||t==="image/jpeg"||t==="image/png"||t==="image/tiff"||t==="image/x-wmf"}function T(i){return i?i==="text/plain"?"file-text":i==="application/pdf"?"file-pdf":i==="text/csv"?"file-csv":i==="application/gpx+xml"?"file-gpx":i==="application/x-dwf"?"file-cad":i==="application/postscript"||i==="application/json"||i==="text/xml"||i==="model/vrml"?"file-code":i==="application/x-zip-compressed"||i==="application/x-7z-compressed"||i==="application/x-gzip"||i==="application/x-tar"||i==="application/x-gtar"||i==="application/x-bzip2"||i==="application/gzip"||i==="application/x-compress"||i==="application/x-apple-diskimage"||i==="application/x-rar-compressed"||i==="application/zip"?"file-zip":i.includes("image/")?"file-image":i.includes("audio/")?"file-sound":i.includes("video/")?"file-video":i.includes("msexcel")||i.includes("ms-excel")||i.includes("spreadsheetml")?"file-excel":i.includes("msword")||i.includes("ms-word")||i.includes("wordprocessingml")?"file-word":i.includes("powerpoint")||i.includes("presentationml")?"file-report":"file":"file"}var j=A`:host([empty]){display:none}.item-link{display:flex;flex-grow:1;color:var(--calcite-color-text-3)}.item-link:visited,.item-link:hover,.item-link:focus-visible,.item-link:active{color:var(--calcite-color-text-1)}.item-link img{max-width:100%;max-height:100%;object-fit:contain}.item-link--list{align-items:center;justify-content:center;width:64px;max-height:64px;overflow:hidden;border-radius:var(--calcite-corner-radius-sm)}.item-link--list img{border-radius:var(--calcite-corner-radius-sm)}.item-link--list-icon{border:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.item-link--list calcite-icon{margin:var(--calcite-spacing-lg)}.item-link--preview{align-items:center;justify-content:center}.item-link--preview calcite-icon{margin-block:var(--calcite-spacing-lg)}.item-description{text-align:center;word-wrap:break-word;word-break:break-word}calcite-link{--calcite-link-text-color: var(--calcite-color-text-3);padding-inline:var(--calcite-spacing-sm);word-wrap:break-word;word-break:break-word}calcite-card{width:100%}calcite-card:hover,calcite-card:focus,calcite-card:focus-within{--calcite-card-border-color: var(--calcite-color-text-1)}`,E=C.ofType(z),v=class extends k{constructor(){super(...arguments),this._attachmentLayer=null,this._supportsImageOrientation=window?.CSS?.supports("image-orientation","from-image"),this.hideSection=!1,this._attachmentInfos=new E,this.headingLevel=2,this.hidePreviewImageAttachmentName=!1,this.empty=!1}static{this.properties={effectiveDisplayType:16,getAttachmentsPromise:16,hideSection:16,_attachmentInfos:16,_hasContent:16,supportsResizeAttachments:16,attachmentKeywords:0,attachmentTypes:0,description:1,displayType:1,graphic:0,heading:1,messages:0,orderByFields:0,headingLevel:9,hidePreviewImageAttachmentName:5,empty:39}}static{this.styles=j}get _supportsTypeWildcard(){let{graphic:t}=this;if(!t)return!1;let e=f(t);return e?.loaded&&"capabilities"in e&&e.capabilities&&"attachment"in e.capabilities&&e.capabilities.attachment&&"supportsResize"in e.capabilities.attachment&&e.capabilities.attachment.supportsTypeWildcard||!1}get effectiveDisplayType(){let{displayType:t}=this;return!t||t==="auto"?this.supportsResizeAttachments?"preview":"list":t}get _hasContent(){return this._attachmentInfos.length>0||this.getAttachmentsPromise!=null}get supportsResizeAttachments(){let{graphic:t}=this;if(!t)return!1;let e=f(t);return e?.loaded&&"capabilities"in e&&e.capabilities&&"attachment"in e.capabilities&&e.capabilities.attachment&&"supportsResize"in e.capabilities.attachment&&e.capabilities.attachment.supportsResize||!1}loaded(){this.manager.onLifecycle(()=>[S(()=>this.graphic,()=>this.graphicChanged(),{initial:!0})])}async getAttachments(){let{_attachmentLayer:t,_attachmentInfos:e,orderByFields:n,attachmentTypes:c,attachmentKeywords:o,_supportsTypeWildcard:m}=this;if(!t||typeof t.queryAttachments!="function")throw new L("invalid-layer","getAttachments(): A valid layer is required.");let p=this.graphic?.getObjectId();if(typeof p!="number")throw new L("invalid-object-id","getAttachments(): Numeric object id is required");let u=n?.map(s=>`${s.field} ${s.order==="descending"?"DESC":"ASC"}`),r=new P({objectIds:[p],returnMetadata:!0,orderByFields:u,attachmentTypes:m?c?.filter(Boolean).map(s=>`${s}/*`):void 0,keywords:o}),h=[],d=t.queryAttachments(r).then(s=>s[p]||h).catch(()=>h);this.getAttachmentsPromise=d,this._setEmpty(!1);let g=await d;e.destroyAll(),g.length&&e.addMany(g),this.getAttachmentsPromise=null,this._setEmpty(!this._hasContent)}_setEmpty(t){x(()=>this.empty=t)}setAttachmentLayer(){let{graphic:t}=this,e=f(t);this._attachmentLayer=e?e.type==="scene"&&e.associatedLayer!=null?e.associatedLayer:e:null}graphicChanged(){if(!this.graphic){this._attachmentInfos.destroyAll(),this.getAttachmentsPromise=null,this._setEmpty(!0);return}this.setAttachmentLayer(),this.getAttachments().catch(()=>{this._attachmentInfos.destroyAll(),this.getAttachmentsPromise=null,this._setEmpty(!0)})}getCSSTransform(t){let{orientationInfo:e}=t;return!this._supportsImageOrientation&&e?[e.rotation?`rotate(${e.rotation}deg)`:"",e.mirrored?"scaleX(-1)":""].join(" "):""}render(){return this.empty?null:a`<div class="root"><arcgis-feature-element-info .heading=${this.heading} .description=${this.description} .headingLevel=${this.headingLevel}></arcgis-feature-element-info>${this.renderAttachments()}</div>`}renderAttachmentsList(t){return a`<calcite-list .loading=${!!this.getAttachmentsPromise} .label=${this.messages?.componentLabel??""} interaction-mode=static selection-mode=none>${t.toArray().filter(Boolean).map(e=>this.renderAttachmentListItem(e))}</calcite-list>`}renderAttachmentsPreview(t){return a`<calcite-card-group .label=${this.messages?.componentLabel??""}>${this.getAttachmentsPromise?a`<calcite-card loading></calcite-card>`:t.toArray().filter(Boolean).map(e=>this.renderAttachmentPreviewItem(e))}</calcite-card-group>`}renderAttachmentsCarousel(t){let e=t.toArray().filter(Boolean);return a`<calcite-carousel .paginationDisabled=${e.length<2} .label=${this.messages?.componentLabel??""} pagination-position=top>${this.getAttachmentsPromise?a`<calcite-carousel-item .label=${this.messages?.componentLabel??""}><calcite-card loading></calcite-card></calcite-carousel-item>`:e.map(n=>a`<calcite-carousel-item .label=${n.name||this.messages?.noTitle||""}>${this.renderAttachmentPreviewItem(n,!0)}</calcite-carousel-item>`)}</calcite-carousel>`}renderAttachments(){let{effectiveDisplayType:t,_attachmentInfos:e}=this;return t==="carousel"?this.renderAttachmentsCarousel(e):t==="preview"?this.renderAttachmentsPreview(e):this.renderAttachmentsList(e)}renderAttachmentListItem(t){let{supportsResizeAttachments:e}=this,{contentType:n,name:c,url:o,size:m}=t,p=64,u=c||this.messages?.noTitle,r=T(n),h=this.getCSSTransform(t),d=h?{transform:h,"image-orientation":"none"}:{},g=e&&I(n),s=a`<a class=${w(b("item-link","item-link--list",{"item-link--list-icon":!g}))} slot=content-start href=${o??void 0??l} rel=noreferrer target=_blank>${g?a`<img alt=${c??l} src=${`${o}${o?.includes("?")?"&":"?"}w=${p}&s=${m}`} style=${$(d)} title=${c??l}>`:a`<calcite-icon .icon=${r}></calcite-icon>`}</a>`,y=a`<calcite-link slot=content .href=${o??void 0} rel=noreferrer target=_blank>${u}</calcite-link>`;return a`<calcite-list-item .label=${u}>${s}${y}</calcite-list-item>`}renderAttachmentPreviewItem(t,e=!1){let{supportsResizeAttachments:n}=this,{contentType:c,name:o,url:m,size:p}=t,u=225,r=o||this.messages?.noTitle,h=T(c),d=this.getCSSTransform(t),g=d?{transform:d,"image-orientation":"none"}:{},s=n&&I(c),y=a`<a class=${w(b("item-link","item-link--preview"))} slot=thumbnail href=${m??void 0??l} rel=noreferrer target=_blank aria-label=${r??l} title=${r??l}>${s?a`<img alt=${r??l} src=${`${m}${m?.includes("?")?"&":"?"}w=${u}&s=${p}`} style=${$(g)}>`:a`<calcite-icon scale=l .icon=${h}></calcite-icon>`}</a>`;return a`<calcite-card .label=${r}>${y}${(e||this.hidePreviewImageAttachmentName)&&s?null:a`<span class="item-description" slot=description>${r}</span>`}</calcite-card>`}};_("arcgis-feature-attachments",v);return v},"rest/query/support/AttachmentInfo","rest/support/AttachmentQuery","core/Collection","core/Error","core/reactiveUtils",c,d)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import c from"./4DWURRQB.js";import b from"./C2HB2U6P.js";import a from"./YG4HDEP3.js";import"./VJVKFKSG.js";import{a as k}from"./5JADSW57.js";import{h as f}from"./XSCEZHHS.js";import"./UVNNXZHK.js";import"./QUZTFUWM.js";import"./XPEGBUNJ.js";import"./XURWCCLX.js";import{N as h,O as g,V as m,a as p,b as s,w as d}from"./GFTZ7EZP.js";import"./H6RQVSYM.js";export default $arcgis.t(([o,{watch:v},{substitute:$},T,{a:b},{c:y,g:w},n])=>{var _=p`:host{height:100%;flex-grow:1}calcite-flow{min-height:var(--arcgis-internal-panel-height-sm, 240px)}calcite-block-group{flex-grow:1;padding-bottom:var(--calcite-spacing-md);background-color:var(--calcite-color-foreground-1)}calcite-block{--calcite-block-content-space: 0;--calcite-block-border-color: transparent;margin:0}calcite-block calcite-combobox,calcite-block calcite-input{margin:0 var(--calcite-spacing-md)}calcite-block calcite-input-message{padding:var(--calcite-spacing-sm) var(--calcite-spacing-md) 0}calcite-notice{margin:var(--calcite-spacing-md)}.subnetwork-info-block{margin:var(--calcite-spacing-md) var(--calcite-spacing-md) 0}.results-limited-message{padding:var(--calcite-spacing-sm)}.inline-loader{--calcite-loader-spacing: var(--calcite-spacing-md)}.add-spatial-mode{display:flex;flex-direction:column;gap:var(--calcite-spacing-md);margin:var(--calcite-spacing-md)}.heading{color:var(--calcite-color-text-1);margin:0 0 var(--calcite-spacing-md);font-size:var(--calcite-font-size);font-weight:var(--calcite-font-weight-medium)}`,u=class extends g{constructor(){super(...arguments),this._messages=k({blocking:!0}),this.#o=!0,this.#n=new Map,this.#e=new o,this.#i=new o,this.#a=new o,this.#t=null,this.#s=20,this._candidateFeatures=[],this._compatibleSubnetworkNames=[],this._namedTraceConfigurations=[],this._subnetworkNamesState="ready",this._exceedDisplayLimit=!1,this.autoDestroyDisabled=!1,this.hideFeaturesActionBar=!1,this.mode="default",this.arcgisPropertyChange=f()("mode","selectedNamedTraceConfiguration","selectedUtilityNetwork","traceLocations"),this.arcgisTraceLocationSelectEnd=d(),this.arcgisTraceLocationSelectStart=d()}static{this.properties={_selectedFeature:16,_candidateFeatures:16,_compatibleSubnetworkNames:16,_subnetworksTable:16,_namedTraceConfigurations:16,_traceConfiguration:16,_error:16,_subnetworkNamesState:16,_activeTraceLocationType:16,_exceedDisplayLimit:16,beforeTraceLocationSelectStart:0,view:0,selectedUtilityNetwork:0,selectedNamedTraceConfiguration:0,autoDestroyDisabled:5,hideFeaturesActionBar:5,traceConfiguration:32,isSubnetworkNameTraceSelected:32,referenceElement:1,mode:3,traceLocationDetails:32,traceLocations:32}}static{this.styles=_}#o;get#k(){let{view:t}=this;return t?.map?t.map.allLayers.toArray().concat(t.map.allTables.toArray()):[]}#l;#n;#e;#i;#a;#t;#r;#u;#p;#g;#s;get#m(){return!this.isSubnetworkNameTraceSelected}get#f(){let t=this.selectedNamedTraceConfiguration?.traceType;return t==="path"||t==="circuit"}get#v(){let t=this.selectedUtilityNetwork?.dataElement?.domainNetworks;return t?t.map(e=>e.subnetworkLayerId).filter(e=>e!=null&&e>-1):[]}get traceConfiguration(){return this._traceConfiguration}get isSubnetworkNameTraceSelected(){let{selectedNamedTraceConfiguration:t}=this;return!!t?.traceConfiguration?.subnetworkName&&t?.traceType==="subnetwork"}get traceLocationDetails(){return new o([...this.#e,...this.#i,...this.#a])}get traceLocations(){let t=[];return this.#m&&this.#e.forEach(e=>t.push(...this.#d(e))),this.#f&&this.#a.forEach(e=>t.push(...this.#d(e))),this.#i.forEach(e=>t.push(...this.#d(e))),t}async destroy(){this.#w(),n.getSketchViewModel(this.view)?.cancel(),n.removeSketchGraphicsLayer(this.view),this.#r?.destroy(),this.#u?.destroy(),this.#p?.destroy(),this.#g?.destroy(),await this.manager.destroy()}load(){this.#y(),this.manager.onLifecycle(()=>[v(()=>this.view?.map,()=>this.#y())])}willUpdate(t){t.has("selectedUtilityNetwork")&&this.#S()}disconnectedCallback(){super.disconnectedCallback(),this.#n.clear()}#$({detail:t,target:e}){(t.name==="selectedDrillInFeature"||t.name==="selectedFeature")&&(this._selectedFeature=e.selectedDrillInFeature??e.selectedFeature??void 0)}#y(){if(this._error=void 0,!this.view?.map){this._error=this._messages.errors.noView;return}}#T(t){t&&(this.#u=t)}#_(t){t&&(this.#p=t)}#L(t){t&&(this.#g=t)}#N(t){t&&(this.#r=t)}#d(t){let e=t.flagProperties.selectedTerminals;return t.flagProperties.terminalConfiguration&&e?.size?Array.from(e,i=>new T({type:t.traceLocation.type,isFilterBarrier:t.traceLocation.isFilterBarrier,globalId:t.traceLocation.globalId,percentAlong:t.traceLocation.percentAlong,terminalId:i})):[t.traceLocation]}#w(){let{view:t}=this;this.#e.forEach(e=>{e.spatialProperties.flagGraphic&&t?.graphics.remove(e.spatialProperties.flagGraphic)}),this.#e.removeAll(),this.#i.forEach(e=>{e.spatialProperties.flagGraphic&&t?.graphics.remove(e.spatialProperties.flagGraphic)}),this.#i.removeAll(),this.#a.forEach(e=>{e.spatialProperties.flagGraphic&&t?.graphics.remove(e.spatialProperties.flagGraphic)}),this.#a.removeAll()}async#S(){let{selectedUtilityNetwork:t}=this;try{t&&!t.loaded&&await t.load()}catch(e){b(e,this,"Error while loading the selected utility network")}this.#C(),this.#F(),this.#w()}#C(){this._traceConfiguration=void 0,this.selectedNamedTraceConfiguration=void 0,this._namedTraceConfigurations=this.selectedUtilityNetwork?.sharedNamedTraceConfigurations.filter(Boolean).filter(t=>t.traceType!=="circuit").sort((t,e)=>t.title.localeCompare(e.title))||[]}#F(){let{selectedUtilityNetwork:t}=this;this.#l=new o(this.#k.filter(e=>t?.isUtilityLayer(e)&&!this.#v.includes(e.layerId)))}#P(t){if(t.stopPropagation(),this.arcgisTraceLocationSelectStart.emit(t.detail).defaultPrevented){t.preventDefault();return}this._activeTraceLocationType=t?.target?.traceLocationType,this.mode="add-spatial-instructions"}#D(t){if(t==null)return;let e=this.#n,i=this.#l,a=e.get(t);if(a)return a;if(!i)return;let r=i.find(c=>"layerId"in c&&c.layerId===t);return r&&e.set(t,r),r}async#U(t,e){let i=t.createQuery();i.gdbVersion=this.selectedUtilityNetwork?.gdbVersion,i.objectIds=e.map(r=>r.getObjectId()),i.outFields=["*"];let{features:a}=await y(t,i);return a.forEach(r=>{if(!r.getEffectivePopupTemplate(this.#o)){let c=r.layer;r.popupTemplate=c.createPopupTemplate()}}),a}async#E(t){let e=new Map,i=[];return t.forEach(a=>{let r=w(a.layer)?a.layer.parent:a.layer;if(r){let c=this.#D(r.layerId);if(c){let l=e.get(c)||[];l.push(a),e.set(c,l)}}}),await Promise.all(Array.from(e.keys()).map(async a=>{let r=e.get(a)??[],c=await this.#U(a,r);i.push(...c)})),i}async#x(t){return this._exceedDisplayLimit=t.length>this.#s,this._candidateFeatures=await this.#E(t.slice(0,this.#s)),this._candidateFeatures.length===0?(this.#c(),await Promise.reject(Error("No features found"))):(this._candidateFeatures.length===1&&(this._selectedFeature=this._candidateFeatures.at(0)),this.mode="add-spatial-feature",this.#t?.reject(),this.#t=Promise.withResolvers(),await this.#t.promise)}#A(t){t.stopPropagation(),this.arcgisTraceLocationSelectEnd.emit(),this._activeTraceLocationType=void 0,this.mode="default",this.#c()}#c(t){t?.stopPropagation(),this.#r?.clear(),this.#b(),(this.view?n.getSketchViewModel(this.view):null)?.cancel()}#b(){this.mode="default",this._candidateFeatures=[],this._selectedFeature=void 0,this.#t?.reject(),this.#t=null}#I(){let t=this.#t,e=this.#r,{_selectedFeature:i}=this;if(t&&e){if(!i)return;t.resolve(i),this.#t=null}}#B(t,e=!1,i){return s`<calcite-notice .closable=${e} kind=danger open scale=s width=auto .icon=${i}><div slot=message>${t}</div></calcite-notice>`}#G(){let{_namedTraceConfigurations:t,selectedUtilityNetwork:e}=this;return s`<arcgis-utility-network-trace-configuration-picker .traceConfigurations=${t} .utilityNetwork=${e} @arcgisPropertyChange=${i=>{i.stopPropagation(),i.detail.name==="selectedNamedTraceConfiguration"&&(this.selectedNamedTraceConfiguration=i.target.selectedNamedTraceConfiguration),i.detail.name==="traceConfiguration"&&(this._traceConfiguration=i.target.traceConfiguration)}}></arcgis-utility-network-trace-configuration-picker>`}#M(){let{selectedUtilityNetwork:t,view:e}=this;return s`<arcgis-utility-network-picker .selectedUtilityNetwork=${t} .view=${e} @arcgisPropertyChange=${i=>{i.detail.name==="selectedUtilityNetwork"&&(this.selectedUtilityNetwork=i.target.selectedUtilityNetwork)}}></arcgis-utility-network-picker>`}#V(){let{_error:t}=this,{noView:e}=this._messages.errors,i;return t===e?i=this.#B(t,!1,"exclamation-mark-triangle"):i=this.#R(),s`<calcite-flow-item .selected=${this.mode==="default"}>${i}</calcite-flow-item>`}#j(){let{_messages:t,mode:e}=this,i=this._activeTraceLocationType==="starting-point"?t.labels.addSpatial.startingPoint:this._activeTraceLocationType==="barrier"?t.labels.addSpatial.barrier:t.labels.addSpatial.stoppingPoint;return s`<calcite-flow-item .selected=${e==="add-spatial-instructions"} .heading=${i} @calciteFlowItemBack=${a=>this.#c(a)}><div class="add-spatial-mode"><div><h5 class="heading">${t.instructions.addSpatial.selectFeature.heading}</h5>${t.instructions.addSpatial.selectFeature.subheading}</div><div><h5 class="heading">${t.instructions.addSpatial.selectAssociatedFeature.heading}</h5>${t.instructions.addSpatial.selectAssociatedFeature.subheading}</div></div></calcite-flow-item>`}#z(){let{_activeTraceLocationType:t,_candidateFeatures:e,_messages:i}=this;if(!e.length)return this.mode="default",null;let a=t==="starting-point"?i.labels.addSpatial.startingPoint:t==="barrier"?i.labels.addSpatial.barrier:i.labels.addSpatial.stoppingPoint,r=e.length===1?"feature":"list";return s`<arcgis-features-next .autoDestroyDisabled=${this.autoDestroyDisabled} .defaultPopupTemplateEnabled=${this.#o} .features=${this._candidateFeatures} .featureMenuTitle=${a} .hideActionBar=${this.hideFeaturesActionBar} hide-select-feature .initialDisplayMode=${r} @arcgisClose=${()=>this.#b()} @arcgisPropertyChange=${this.#$} open .referenceElement=${this.referenceElement} .view=${this.view} ${h(this.#N)}></arcgis-features-next>`}#q(){let{mode:t,_messages:e,_selectedFeature:i,selectedUtilityNetwork:a}=this,r=t==="add-spatial-feature"&&this._exceedDisplayLimit&&!i,c=$(e.warnings.exceededDisplayLimit,{limit:this.#s.toString()}),l=i?!(a?.isUtilityLayer(i.layer)??!0):!0;return s`${r&&s`<calcite-input-message class="results-limited-message" icon=exclamation-mark-circle status=idle>${c}</calcite-input-message>`||""}<calcite-button appearance=outline width=full @click=${()=>this.#c()} slot=footer>${e.buttons.cancel}</calcite-button>${t==="add-spatial-feature"&&s`<calcite-button width=full slot=footer appearance=solid @click=${()=>this.#I()} .disabled=${l}>${e.buttons.add}</calcite-button>`||""}`}#h(t,e,i){return s`<arcgis-utility-network-trace-locations .view=${this.view} .traceLocationType=${t} .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this.#P} @arcgisTraceLocationSelectEnd=${this.#A} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this.#l} .traceLocations=${e} .afterMapInteraction=${this.#x.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${h(i)}></arcgis-utility-network-trace-locations>`}#R(){let{_messages:t}=this,e=this.#M(),i=this.#G(),a=this._namedTraceConfigurations.length&&this.traceConfiguration?s`${this.#m?this.#h("starting-point",this.#e,this.#T):null}${this.#f?this.#h("stopping-point",this.#a,this.#L):null}${this.#h("barrier",this.#i,this.#_)}`:null,r=this.selectedUtilityNetwork?.loaded?s`${i}${a}`:null;return s`<calcite-block-group .label=${t.labels.traceInputs}>${e}${r}</calcite-block-group>`}render(){let{mode:t}=this;return s`<calcite-panel>${t==="add-spatial-feature"?this.#z():null}<calcite-flow .hidden=${t==="add-spatial-feature"}>${this.#V()}${this.#j()}</calcite-flow>${t!=="default"?this.#q():null}</calcite-panel>`}};m("arcgis-utility-network-trace-inputs",u);return u},"core/Collection","core/reactiveUtils","intl","rest/networks/support/TraceLocation",a,b,c)
2
+ import c from"./GLH5GJZC.js";import b from"./TMJX7DFH.js";import a from"./YG4HDEP3.js";import"./VJVKFKSG.js";import{a as k}from"./5JADSW57.js";import{h as f}from"./XSCEZHHS.js";import"./UVNNXZHK.js";import"./QUZTFUWM.js";import"./XPEGBUNJ.js";import"./XURWCCLX.js";import{N as h,O as g,V as m,a as p,b as s,w as d}from"./GFTZ7EZP.js";import"./H6RQVSYM.js";export default $arcgis.t(([o,{watch:v},{substitute:$},T,{a:b},{d:y,h:w},n])=>{var _=p`:host{height:100%;flex-grow:1}calcite-flow{min-height:var(--arcgis-internal-panel-height-sm, 240px)}calcite-block-group{flex-grow:1;padding-bottom:var(--calcite-spacing-md);background-color:var(--calcite-color-foreground-1)}calcite-block{--calcite-block-content-space: 0;--calcite-block-border-color: transparent;margin:0}calcite-block calcite-combobox,calcite-block calcite-input{margin:0 var(--calcite-spacing-md)}calcite-block calcite-input-message{padding:var(--calcite-spacing-sm) var(--calcite-spacing-md) 0}calcite-notice{margin:var(--calcite-spacing-md)}.subnetwork-info-block{margin:var(--calcite-spacing-md) var(--calcite-spacing-md) 0}.results-limited-message{padding:var(--calcite-spacing-sm)}.inline-loader{--calcite-loader-spacing: var(--calcite-spacing-md)}.add-spatial-mode{display:flex;flex-direction:column;gap:var(--calcite-spacing-md);margin:var(--calcite-spacing-md)}.heading{color:var(--calcite-color-text-1);margin:0 0 var(--calcite-spacing-md);font-size:var(--calcite-font-size);font-weight:var(--calcite-font-weight-medium)}`,u=class extends g{constructor(){super(...arguments),this._messages=k({blocking:!0}),this.#o=!0,this.#n=new Map,this.#e=new o,this.#i=new o,this.#a=new o,this.#t=null,this.#s=20,this._candidateFeatures=[],this._compatibleSubnetworkNames=[],this._namedTraceConfigurations=[],this._subnetworkNamesState="ready",this._exceedDisplayLimit=!1,this.autoDestroyDisabled=!1,this.hideFeaturesActionBar=!1,this.mode="default",this.arcgisPropertyChange=f()("mode","selectedNamedTraceConfiguration","selectedUtilityNetwork","traceLocations"),this.arcgisTraceLocationSelectEnd=d(),this.arcgisTraceLocationSelectStart=d()}static{this.properties={_selectedFeature:16,_candidateFeatures:16,_compatibleSubnetworkNames:16,_subnetworksTable:16,_namedTraceConfigurations:16,_traceConfiguration:16,_error:16,_subnetworkNamesState:16,_activeTraceLocationType:16,_exceedDisplayLimit:16,beforeTraceLocationSelectStart:0,view:0,selectedUtilityNetwork:0,selectedNamedTraceConfiguration:0,autoDestroyDisabled:5,hideFeaturesActionBar:5,traceConfiguration:32,isSubnetworkNameTraceSelected:32,referenceElement:1,mode:3,traceLocationDetails:32,traceLocations:32}}static{this.styles=_}#o;get#k(){let{view:t}=this;return t?.map?t.map.allLayers.toArray().concat(t.map.allTables.toArray()):[]}#l;#n;#e;#i;#a;#t;#r;#u;#p;#g;#s;get#m(){return!this.isSubnetworkNameTraceSelected}get#f(){let t=this.selectedNamedTraceConfiguration?.traceType;return t==="path"||t==="circuit"}get#v(){let t=this.selectedUtilityNetwork?.dataElement?.domainNetworks;return t?t.map(e=>e.subnetworkLayerId).filter(e=>e!=null&&e>-1):[]}get traceConfiguration(){return this._traceConfiguration}get isSubnetworkNameTraceSelected(){let{selectedNamedTraceConfiguration:t}=this;return!!t?.traceConfiguration?.subnetworkName&&t?.traceType==="subnetwork"}get traceLocationDetails(){return new o([...this.#e,...this.#i,...this.#a])}get traceLocations(){let t=[];return this.#m&&this.#e.forEach(e=>t.push(...this.#d(e))),this.#f&&this.#a.forEach(e=>t.push(...this.#d(e))),this.#i.forEach(e=>t.push(...this.#d(e))),t}async destroy(){this.#w(),n.getSketchViewModel(this.view)?.cancel(),n.removeSketchGraphicsLayer(this.view),this.#r?.destroy(),this.#u?.destroy(),this.#p?.destroy(),this.#g?.destroy(),await this.manager.destroy()}load(){this.#y(),this.manager.onLifecycle(()=>[v(()=>this.view?.map,()=>this.#y())])}willUpdate(t){t.has("selectedUtilityNetwork")&&this.#S()}disconnectedCallback(){super.disconnectedCallback(),this.#n.clear()}#$({detail:t,target:e}){(t.name==="selectedDrillInFeature"||t.name==="selectedFeature")&&(this._selectedFeature=e.selectedDrillInFeature??e.selectedFeature??void 0)}#y(){if(this._error=void 0,!this.view?.map){this._error=this._messages.errors.noView;return}}#T(t){t&&(this.#u=t)}#_(t){t&&(this.#p=t)}#L(t){t&&(this.#g=t)}#N(t){t&&(this.#r=t)}#d(t){let e=t.flagProperties.selectedTerminals;return t.flagProperties.terminalConfiguration&&e?.size?Array.from(e,i=>new T({type:t.traceLocation.type,isFilterBarrier:t.traceLocation.isFilterBarrier,globalId:t.traceLocation.globalId,percentAlong:t.traceLocation.percentAlong,terminalId:i})):[t.traceLocation]}#w(){let{view:t}=this;this.#e.forEach(e=>{e.spatialProperties.flagGraphic&&t?.graphics.remove(e.spatialProperties.flagGraphic)}),this.#e.removeAll(),this.#i.forEach(e=>{e.spatialProperties.flagGraphic&&t?.graphics.remove(e.spatialProperties.flagGraphic)}),this.#i.removeAll(),this.#a.forEach(e=>{e.spatialProperties.flagGraphic&&t?.graphics.remove(e.spatialProperties.flagGraphic)}),this.#a.removeAll()}async#S(){let{selectedUtilityNetwork:t}=this;try{t&&!t.loaded&&await t.load()}catch(e){b(e,this,"Error while loading the selected utility network")}this.#C(),this.#F(),this.#w()}#C(){this._traceConfiguration=void 0,this.selectedNamedTraceConfiguration=void 0,this._namedTraceConfigurations=this.selectedUtilityNetwork?.sharedNamedTraceConfigurations.filter(Boolean).filter(t=>t.traceType!=="circuit").sort((t,e)=>t.title.localeCompare(e.title))||[]}#F(){let{selectedUtilityNetwork:t}=this;this.#l=new o(this.#k.filter(e=>t?.isUtilityLayer(e)&&!this.#v.includes(e.layerId)))}#P(t){if(t.stopPropagation(),this.arcgisTraceLocationSelectStart.emit(t.detail).defaultPrevented){t.preventDefault();return}this._activeTraceLocationType=t?.target?.traceLocationType,this.mode="add-spatial-instructions"}#D(t){if(t==null)return;let e=this.#n,i=this.#l,a=e.get(t);if(a)return a;if(!i)return;let r=i.find(c=>"layerId"in c&&c.layerId===t);return r&&e.set(t,r),r}async#U(t,e){let i=t.createQuery();i.gdbVersion=this.selectedUtilityNetwork?.gdbVersion,i.objectIds=e.map(r=>r.getObjectId()),i.outFields=["*"];let{features:a}=await y(t,i);return a.forEach(r=>{if(!r.getEffectivePopupTemplate(this.#o)){let c=r.layer;r.popupTemplate=c.createPopupTemplate()}}),a}async#E(t){let e=new Map,i=[];return t.forEach(a=>{let r=w(a.layer)?a.layer.parent:a.layer;if(r){let c=this.#D(r.layerId);if(c){let l=e.get(c)||[];l.push(a),e.set(c,l)}}}),await Promise.all(Array.from(e.keys()).map(async a=>{let r=e.get(a)??[],c=await this.#U(a,r);i.push(...c)})),i}async#x(t){return this._exceedDisplayLimit=t.length>this.#s,this._candidateFeatures=await this.#E(t.slice(0,this.#s)),this._candidateFeatures.length===0?(this.#c(),await Promise.reject(Error("No features found"))):(this._candidateFeatures.length===1&&(this._selectedFeature=this._candidateFeatures.at(0)),this.mode="add-spatial-feature",this.#t?.reject(),this.#t=Promise.withResolvers(),await this.#t.promise)}#A(t){t.stopPropagation(),this.arcgisTraceLocationSelectEnd.emit(),this._activeTraceLocationType=void 0,this.mode="default",this.#c()}#c(t){t?.stopPropagation(),this.#r?.clear(),this.#b(),(this.view?n.getSketchViewModel(this.view):null)?.cancel()}#b(){this.mode="default",this._candidateFeatures=[],this._selectedFeature=void 0,this.#t?.reject(),this.#t=null}#I(){let t=this.#t,e=this.#r,{_selectedFeature:i}=this;if(t&&e){if(!i)return;t.resolve(i),this.#t=null}}#B(t,e=!1,i){return s`<calcite-notice .closable=${e} kind=danger open scale=s width=auto .icon=${i}><div slot=message>${t}</div></calcite-notice>`}#G(){let{_namedTraceConfigurations:t,selectedUtilityNetwork:e}=this;return s`<arcgis-utility-network-trace-configuration-picker .traceConfigurations=${t} .utilityNetwork=${e} @arcgisPropertyChange=${i=>{i.stopPropagation(),i.detail.name==="selectedNamedTraceConfiguration"&&(this.selectedNamedTraceConfiguration=i.target.selectedNamedTraceConfiguration),i.detail.name==="traceConfiguration"&&(this._traceConfiguration=i.target.traceConfiguration)}}></arcgis-utility-network-trace-configuration-picker>`}#M(){let{selectedUtilityNetwork:t,view:e}=this;return s`<arcgis-utility-network-picker .selectedUtilityNetwork=${t} .view=${e} @arcgisPropertyChange=${i=>{i.detail.name==="selectedUtilityNetwork"&&(this.selectedUtilityNetwork=i.target.selectedUtilityNetwork)}}></arcgis-utility-network-picker>`}#V(){let{_error:t}=this,{noView:e}=this._messages.errors,i;return t===e?i=this.#B(t,!1,"exclamation-mark-triangle"):i=this.#R(),s`<calcite-flow-item .selected=${this.mode==="default"}>${i}</calcite-flow-item>`}#j(){let{_messages:t,mode:e}=this,i=this._activeTraceLocationType==="starting-point"?t.labels.addSpatial.startingPoint:this._activeTraceLocationType==="barrier"?t.labels.addSpatial.barrier:t.labels.addSpatial.stoppingPoint;return s`<calcite-flow-item .selected=${e==="add-spatial-instructions"} .heading=${i} @calciteFlowItemBack=${a=>this.#c(a)}><div class="add-spatial-mode"><div><h5 class="heading">${t.instructions.addSpatial.selectFeature.heading}</h5>${t.instructions.addSpatial.selectFeature.subheading}</div><div><h5 class="heading">${t.instructions.addSpatial.selectAssociatedFeature.heading}</h5>${t.instructions.addSpatial.selectAssociatedFeature.subheading}</div></div></calcite-flow-item>`}#z(){let{_activeTraceLocationType:t,_candidateFeatures:e,_messages:i}=this;if(!e.length)return this.mode="default",null;let a=t==="starting-point"?i.labels.addSpatial.startingPoint:t==="barrier"?i.labels.addSpatial.barrier:i.labels.addSpatial.stoppingPoint,r=e.length===1?"feature":"list";return s`<arcgis-features-next .autoDestroyDisabled=${this.autoDestroyDisabled} .defaultPopupTemplateEnabled=${this.#o} .features=${this._candidateFeatures} .featureMenuTitle=${a} .hideActionBar=${this.hideFeaturesActionBar} hide-select-feature .initialDisplayMode=${r} @arcgisClose=${()=>this.#b()} @arcgisPropertyChange=${this.#$} open .referenceElement=${this.referenceElement} .view=${this.view} ${h(this.#N)}></arcgis-features-next>`}#q(){let{mode:t,_messages:e,_selectedFeature:i,selectedUtilityNetwork:a}=this,r=t==="add-spatial-feature"&&this._exceedDisplayLimit&&!i,c=$(e.warnings.exceededDisplayLimit,{limit:this.#s.toString()}),l=i?!(a?.isUtilityLayer(i.layer)??!0):!0;return s`${r&&s`<calcite-input-message class="results-limited-message" icon=exclamation-mark-circle status=idle>${c}</calcite-input-message>`||""}<calcite-button appearance=outline width=full @click=${()=>this.#c()} slot=footer>${e.buttons.cancel}</calcite-button>${t==="add-spatial-feature"&&s`<calcite-button width=full slot=footer appearance=solid @click=${()=>this.#I()} .disabled=${l}>${e.buttons.add}</calcite-button>`||""}`}#h(t,e,i){return s`<arcgis-utility-network-trace-locations .view=${this.view} .traceLocationType=${t} .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this.#P} @arcgisTraceLocationSelectEnd=${this.#A} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this.#l} .traceLocations=${e} .afterMapInteraction=${this.#x.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${h(i)}></arcgis-utility-network-trace-locations>`}#R(){let{_messages:t}=this,e=this.#M(),i=this.#G(),a=this._namedTraceConfigurations.length&&this.traceConfiguration?s`${this.#m?this.#h("starting-point",this.#e,this.#T):null}${this.#f?this.#h("stopping-point",this.#a,this.#L):null}${this.#h("barrier",this.#i,this.#_)}`:null,r=this.selectedUtilityNetwork?.loaded?s`${i}${a}`:null;return s`<calcite-block-group .label=${t.labels.traceInputs}>${e}${r}</calcite-block-group>`}render(){let{mode:t}=this;return s`<calcite-panel>${t==="add-spatial-feature"?this.#z():null}<calcite-flow .hidden=${t==="add-spatial-feature"}>${this.#V()}${this.#j()}</calcite-flow>${t!=="default"?this.#q():null}</calcite-panel>`}};m("arcgis-utility-network-trace-inputs",u);return u},"core/Collection","core/reactiveUtils","intl","rest/networks/support/TraceLocation",a,b,c)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{E as L,F as $,P as y,R,h as x}from"./MRC7R44N.js";import{P as b,S as V,d as D,f as E,o as G,q as P,u as w}from"./3EYHGXI5.js";import{a as S}from"./CDGKQKVU.js";import{P as M,g as m,o as B}from"./W6X34YBZ.js";var c=class extends ${_beforeChanged(){super._beforeChanged(),(this.isDirty("cornerRadiusTL")||this.isDirty("cornerRadiusTR")||this.isDirty("cornerRadiusBR")||this.isDirty("cornerRadiusBL"))&&(this._clear=!0)}_draw(){let e=this.width(),t=this.height(),s=e/Math.abs(e),n=t/Math.abs(t),i=0,a=0,l=this.get("strokeWidth",0);this.get("containStroke",!1)&&(e-=s*l,t-=n*l,i+=s*l/2,a+=n*l/2);let r=e,h=t;if(m(r)&&m(h)){let o=Math.min(r,h)/2,u=w(this.get("cornerRadiusTL",8),o),d=w(this.get("cornerRadiusTR",8),o),g=w(this.get("cornerRadiusBR",8),o),_=w(this.get("cornerRadiusBL",8),o),f=Math.min(Math.abs(r/2),Math.abs(h/2));u=x(u,0,f),d=x(d,0,f),g=x(g,0,f),_=x(_,0,f);let p=this._display;p.moveTo(i+u*s,a),p.lineTo(i+r-d*s,a),d>0&&p.arcTo(i+r,a,i+r,a+d*n,d),p.lineTo(i+r,a+h-g*n),g>0&&p.arcTo(i+r,a+h,i+r-g*s,a+h,g),p.lineTo(i+_*s,a+h),_>0&&p.arcTo(i,a+h,i,a+h-_*n,_),p.lineTo(i,a+u*n),u>0&&p.arcTo(i,a,i+u*s,a,u),p.closePath()}}};c.className="RoundedRectangle";c.classNames=$.classNames.concat([c.className]);var v=class extends y{_afterNew(){this._settings.themeTags=b(this._settings.themeTags,["button"]),super._afterNew(),this._setDefaultTagged("background",b(this._settings.themeTags,["background"]),()=>c.new(this._root,{})),this.setPrivate("trustBounds",!0)}_prepareChildren(){if(super._prepareChildren(),this.isDirty("icon")){let e=this._prevSettings.icon,t=this.get("icon");t!==e&&(this._disposeProperty("icon"),e&&e.dispose(),t&&this.children.push(t),this._prevSettings.icon=t)}if(this.isDirty("label")){let e=this._prevSettings.label,t=this.get("label");t!==e&&(this._disposeProperty("label"),e&&e.dispose(),t&&this.children.push(t),this._prevSettings.label=t)}}};v.className="Button";v.classNames=y.classNames.concat([v.className]);var T=class extends R{_afterNew(){super._afterNew();let e=this.children.push(y.new(this._root,{html:'<textarea class="am5-editable-label"></textarea>',isMeasured:!1}));e.hide(),this.setPrivate("input",e),this._setDefaultTagged("background",["editablelabel","background"],()=>c.new(this._root,{}))}_beforeChanged(){if(super._beforeChanged(),this.isDirty("editOn")){this._editOnEvents&&this._editOnEvents.dispose();let e=this.get("editOn","click");e!="none"&&(this._editOnEvents=new M([this.getPrivate("input").events.on(e,t=>{}),this.events.on(e,t=>{this.set("active",!0)})]))}}_prepareChildren(){super._prepareChildren(),this._maybeInitTextarea()}_updateChildren(){if(super._updateChildren(),this.isDirty("active")){let e=this.get("active",!1);e?this._startEditing():this._stopEditing();let t=this.get("background");t&&t.set("active",e)}this._syncText(),this._syncStyle()}_maybeInitTextarea(){if(!this._isInited()){let e=this.getPrivate("input");if(e&&e.getPrivate("htmlElement")){let s=e.getPrivate("htmlElement").querySelector(".am5-editable-label");s&&(this.setPrivate("textarea",s),s.addEventListener("input",n=>{this.get("multiLine")===!1&&(s.value=s.value.replace(/\n/g," ")),this.set("text",s.value),this._syncStyle()}),s.addEventListener("blur",n=>this.set("active",!1)),E("keyboardevents")&&this._disposers.push(D(document,"keydown",n=>{P(n)=="Escape"&&this.set("active",!1)})),this._disposers.push(D(document,"keydown",n=>{P(n)=="Enter"&&this.get("multiLine")===!1&&(n.preventDefault(),this.set("active",!1))})),this.events.dispatch("inited",{type:"inited",target:this}))}}}_isInited(){return!!this.getPrivate("textarea")}_startEditing(){if(!this._isInited()){this.events.once("inited",()=>{this._startEditing()});return}this._text.set("opacity",0);let e=this.getPrivate("input"),t=this.getPrivate("textarea");t&&(this.get("text","")==""&&this.set("text"," "),e.show(0),this.setTimeout(()=>{this._syncStyle(),t.focus()},100))}_stopEditing(){if(!this._isInited()){this.events.once("inited",()=>{this._stopEditing()});return}let e=this.getPrivate("input"),t=this.getPrivate("textarea");t&&(this.set("text",t.value),e.hide(0),this._text.set("opacity",1))}_syncStyle(){let e=this.getPrivate("input"),t=this.getPrivate("textarea"),s=e.getPrivate("htmlElement");if(t&&s){let n=window.getComputedStyle(t);B(n,d=>{t.style[d]="initial"}),t.style.color=this.get("fill",V(0)).toCSS(this.get("fillOpacity",1)),t.style.backgroundColor="rgba(0, 0, 0, 0)",t.style.border="none",t.style.outline="none",t.style.padding="0",t.wrap="off",t.style.resize="none",t.style.overflow="hidden";let i=this.get("maxWidth",0)-this.get("paddingLeft",0)-this.get("paddingRight",0);i>0?t.style.maxWidth=i+"px":t.style.minWidth="",t.style.height="auto",t.style.minHeight=t.scrollHeight+"px",this.get("width")&&(t.style.width=this.width()-this.get("paddingLeft",0)-this.get("paddingRight",0)+"px",t.style.minWidth="");let a=this.get("lineHeight");a?a instanceof S?t.style.lineHeight=a.value+"":m(a)&&(t.style.lineHeight=a+""):t.style.lineHeight="1.2";let l=this.get("fontFamily");l||(l=getComputedStyle(s,"font-family").getPropertyValue("font-family")),t.style.fontFamily=l;let r=this.get("fontSize");r?m(r)?r=r+"px":r=r:r=getComputedStyle(s,"font-size").getPropertyValue("font-size"),t.style.fontSize=r;let h=this.get("fontWeight");h?h=h:h=getComputedStyle(s,"font-weight").getPropertyValue("font-weight"),t.style.fontWeight=h;let o=this.get("fontStyle");o?o=o:o=getComputedStyle(s,"font-style").getPropertyValue("font-style"),t.style.fontStyle=o,this.get("oversizedBehavior")=="wrap"?t.style.whiteSpace="pre-wrap":t.style.whiteSpace="nowrap",this._root.events.on("frameended",()=>{t.style.minWidth==""&&(t.style.minWidth=t.scrollWidth+20+"px");let d=this.get("textAlign","start");d=="center"?(t.style.textAlign="center",!s.style.transform.match(/translateX/)&&!this.get("width")&&(s.style.transform+=" translateX(-50%)")):d=="end"?(t.style.textAlign="right",!s.style.transform.match(/translateX/)&&!this.get("width")&&(s.style.transform+=" translateX(-100%)")):t.style.textAlign=d})}}_syncText(){let e=this.getPrivate("textarea"),t=this.get("text","");t==" "&&(t=""),e&&(e.value=t)}};T.className="EditableLabel";T.classNames=R.classNames.concat([T.className]);var C=class extends y{constructor(){super(...arguments),this.thumb=this._makeThumb(),this.startGrip=this._makeButton(),this.endGrip=this._makeButton(),this._thumbBusy=!1,this._startDown=!1,this._endDown=!1,this._thumbDown=!1}_addOrientationClass(){this._settings.themeTags=b(this._settings.themeTags,["scrollbar",this._settings.orientation]),this._setDefaultTagged("background",b(this._settings.themeTags,["main","background"]),()=>c.new(this._root,{}))}_makeButton(){return this.children.push(v.new(this._root,{themeTags:["resize","button",this.get("orientation")],icon:L.new(this._root,{themeTags:["icon"]})._markC("themeTags")})._markC("themeTags","icon"))}_makeThumb(){return this.children.push(c.new(this._root,{themeTags:["thumb",this.get("orientation")]})._markC("themeTags"))}_handleAnimation(e){e&&this._disposers.push(e.events.on("stopped",()=>{this.setPrivateRaw("isBusy",!1),this._thumbBusy=!1}))}_afterNew(){this._addOrientationClass(),super._afterNew();let e=this.startGrip,t=this.endGrip,s=this.thumb,n=this.get("background");n&&this._disposers.push(n.events.on("click",i=>{this.setPrivateRaw("isBusy",!0);let a=this._display.toLocal(i.point),l=this.width(),r=this.height(),h=this.get("orientation"),o;h=="vertical"?o=(a.y-s.height()/2)/r:o=(a.x-s.width()/2)/l;let u,d;h=="vertical"?(u=o*r,d="y"):(u=o*l,d="x");let g=this.get("animationDuration",0);g>0?(this._thumbBusy=!0,this._handleAnimation(this.thumb.animate({key:d,to:u,duration:g,easing:this.get("animationEasing")}))):(this.thumb._setC(d,u),this._root.events.once("frameended",()=>{this.setPrivateRaw("isBusy",!1)}))})),this._disposers.push(s.events.on("dblclick",i=>{if(!G(i.originalEvent,this))return;let a=this.get("animationDuration",0),l=this.get("animationEasing");this.animate({key:"start",to:0,duration:a,easing:l}),this.animate({key:"end",to:1,duration:a,easing:l})})),this._disposers.push(e.events.on("pointerdown",()=>{this.setPrivateRaw("isBusy",!0),this._startDown=!0,this._gripDown="start"})),this._disposers.push(t.events.on("pointerdown",()=>{this.setPrivateRaw("isBusy",!0),this._endDown=!0,this._gripDown="end"})),this._disposers.push(s.events.on("pointerdown",()=>{this.setPrivateRaw("isBusy",!0),this._thumbDown=!0,this._gripDown=void 0})),this._disposers.push(e.events.on("globalpointerup",()=>{this._startDown&&(this.setPrivateRaw("isBusy",!1),this._released()),this._startDown=!1})),this._disposers.push(t.events.on("globalpointerup",()=>{this._endDown&&(this.setPrivateRaw("isBusy",!1),this._released()),this._endDown=!1})),this._disposers.push(s.events.on("globalpointerup",()=>{this._thumbDown&&(this.setPrivateRaw("isBusy",!1),this._released()),this._thumbDown=!1})),this._disposers.push(e.on("x",()=>{this._updateThumb()})),this._disposers.push(t.on("x",()=>{this._updateThumb()})),this._disposers.push(e.on("y",()=>{this._updateThumb()})),this._disposers.push(t.on("y",()=>{this._updateThumb()})),this._disposers.push(s.events.on("positionchanged",()=>{this._updateGripsByThumb()})),this.get("orientation")=="vertical"?(e._setC("x",0),t._setC("x",0),this._disposers.push(s.adapters.add("y",i=>Math.max(Math.min(Number(i),this.height()-s.height()),0))),this._disposers.push(s.adapters.add("x",i=>this.width()/2)),this._disposers.push(e.adapters.add("x",i=>this.width()/2)),this._disposers.push(t.adapters.add("x",i=>this.width()/2)),this._disposers.push(e.adapters.add("y",i=>Math.max(Math.min(Number(i),this.height()),0))),this._disposers.push(t.adapters.add("y",i=>Math.max(Math.min(Number(i),this.height()),0)))):(e._setC("y",0),t._setC("y",0),this._disposers.push(s.adapters.add("x",i=>Math.max(Math.min(Number(i),this.width()-s.width()),0))),this._disposers.push(s.adapters.add("y",i=>this.height()/2)),this._disposers.push(e.adapters.add("y",i=>this.height()/2)),this._disposers.push(t.adapters.add("y",i=>this.height()/2)),this._disposers.push(e.adapters.add("x",i=>Math.max(Math.min(Number(i),this.width()),0))),this._disposers.push(t.adapters.add("x",i=>Math.max(Math.min(Number(i),this.width()),0))))}_updateChildren(){super._updateChildren(),(this.isDirty("end")||this.isDirty("start")||this._sizeDirty)&&this.updateGrips()}_changed(){if(super._changed(),this.isDirty("start")||this.isDirty("end")){let e="rangechanged";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this,start:this.get("start",0),end:this.get("end",1),grip:this._gripDown})}}_released(){let e="released";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this})}updateGrips(){let e=this.startGrip,t=this.endGrip,s=this.get("orientation"),n=this.height(),i=this.width();s=="vertical"?(e._setC("y",n*this.get("start",0)),t._setC("y",n*this.get("end",1))):(e._setC("x",i*this.get("start",0)),t._setC("x",i*this.get("end",1)));let a=this.getPrivate("positionTextFunction"),l=Math.round(this.get("start",0)*100),r=Math.round(this.get("end",0)*100),h,o;a?(h=a.call(this,this.get("start",0)),o=a.call(this,this.get("end",0))):(h=l+"%",o=r+"%"),e._setC("ariaLabel",this._t("From %1",void 0,h)),e._setC("ariaValueNow",""+l),e._setC("ariaValueText",l+"%"),e._setC("ariaValueMin","0"),e._setC("ariaValueMax","100"),t._setC("ariaLabel",this._t("To %1",void 0,o)),t._setC("ariaValueNow",""+r),t._setC("ariaValueText",r+"%"),t._setC("ariaValueMin","0"),t._setC("ariaValueMax","100")}_updateThumb(){let e=this.thumb,t=this.startGrip,s=this.endGrip,n=this.height(),i=this.width(),a=t.x(),l=s.x(),r=t.y(),h=s.y(),o=0,u=1;this.get("orientation")=="vertical"?m(r)&&m(h)&&(!this._thumbBusy&&!e.isDragging()&&(e._setC("height",h-r),e._setC("y",r)),o=r/n,u=h/n):m(a)&&m(l)&&(!this._thumbBusy&&!e.isDragging()&&(e._setC("width",l-a),e._setC("x",a)),o=a/i,u=l/i),this.getPrivate("isBusy")&&(this.get("start")!=o||this.get("end")!=u)&&(this._setC("start",o),this._setC("end",u));let d=this.getPrivate("positionTextFunction"),g=Math.round(this.get("start",0)*100),_=Math.round(this.get("end",0)*100),f,p;d?(f=d.call(this,this.get("start",0)),p=d.call(this,this.get("end",0))):(f=g+"%",p=_+"%"),e._setC("ariaLabel",this._t("From %1 to %2",void 0,f,p)),e._setC("ariaValueNow",""+g),e._setC("ariaValueText",g+"%")}_updateGripsByThumb(){let e=this.thumb,t=this.startGrip,s=this.endGrip;if(this.get("orientation")=="vertical"){let n=e.height();t._setC("y",e.y()),s._setC("y",e.y()+n)}else{let n=e.width();t._setC("x",e.x()),s._setC("x",e.x()+n)}}};C.className="Scrollbar";C.classNames=y.classNames.concat([C.className]);export{c as a,v as b,T as c,C as d};
2
+ import{E as L,F as $,P as y,R,h as x}from"./TZHXSIXK.js";import{P as b,S as V,d as D,f as E,o as G,q as P,u as w}from"./PLTLRYBF.js";import{a as S}from"./T2DT5I33.js";import{P as M,g as m,o as B}from"./6NWR2Z4F.js";var c=class extends ${_beforeChanged(){super._beforeChanged(),(this.isDirty("cornerRadiusTL")||this.isDirty("cornerRadiusTR")||this.isDirty("cornerRadiusBR")||this.isDirty("cornerRadiusBL"))&&(this._clear=!0)}_draw(){let e=this.width(),t=this.height(),s=e/Math.abs(e),n=t/Math.abs(t),i=0,a=0,l=this.get("strokeWidth",0);this.get("containStroke",!1)&&(e-=s*l,t-=n*l,i+=s*l/2,a+=n*l/2);let r=e,h=t;if(m(r)&&m(h)){let o=Math.min(r,h)/2,u=w(this.get("cornerRadiusTL",8),o),d=w(this.get("cornerRadiusTR",8),o),g=w(this.get("cornerRadiusBR",8),o),_=w(this.get("cornerRadiusBL",8),o),f=Math.min(Math.abs(r/2),Math.abs(h/2));u=x(u,0,f),d=x(d,0,f),g=x(g,0,f),_=x(_,0,f);let p=this._display;p.moveTo(i+u*s,a),p.lineTo(i+r-d*s,a),d>0&&p.arcTo(i+r,a,i+r,a+d*n,d),p.lineTo(i+r,a+h-g*n),g>0&&p.arcTo(i+r,a+h,i+r-g*s,a+h,g),p.lineTo(i+_*s,a+h),_>0&&p.arcTo(i,a+h,i,a+h-_*n,_),p.lineTo(i,a+u*n),u>0&&p.arcTo(i,a,i+u*s,a,u),p.closePath()}}};c.className="RoundedRectangle";c.classNames=$.classNames.concat([c.className]);var v=class extends y{_afterNew(){this._settings.themeTags=b(this._settings.themeTags,["button"]),super._afterNew(),this._setDefaultTagged("background",b(this._settings.themeTags,["background"]),()=>c.new(this._root,{})),this.setPrivate("trustBounds",!0)}_prepareChildren(){if(super._prepareChildren(),this.isDirty("icon")){let e=this._prevSettings.icon,t=this.get("icon");t!==e&&(this._disposeProperty("icon"),e&&e.dispose(),t&&this.children.push(t),this._prevSettings.icon=t)}if(this.isDirty("label")){let e=this._prevSettings.label,t=this.get("label");t!==e&&(this._disposeProperty("label"),e&&e.dispose(),t&&this.children.push(t),this._prevSettings.label=t)}}};v.className="Button";v.classNames=y.classNames.concat([v.className]);var T=class extends R{_afterNew(){super._afterNew();let e=this.children.push(y.new(this._root,{html:'<textarea class="am5-editable-label"></textarea>',isMeasured:!1}));e.hide(),this.setPrivate("input",e),this._setDefaultTagged("background",["editablelabel","background"],()=>c.new(this._root,{}))}_beforeChanged(){if(super._beforeChanged(),this.isDirty("editOn")){this._editOnEvents&&this._editOnEvents.dispose();let e=this.get("editOn","click");e!="none"&&(this._editOnEvents=new M([this.getPrivate("input").events.on(e,t=>{}),this.events.on(e,t=>{this.set("active",!0)})]))}}_prepareChildren(){super._prepareChildren(),this._maybeInitTextarea()}_updateChildren(){if(super._updateChildren(),this.isDirty("active")){let e=this.get("active",!1);e?this._startEditing():this._stopEditing();let t=this.get("background");t&&t.set("active",e)}this._syncText(),this._syncStyle()}_maybeInitTextarea(){if(!this._isInited()){let e=this.getPrivate("input");if(e&&e.getPrivate("htmlElement")){let s=e.getPrivate("htmlElement").querySelector(".am5-editable-label");s&&(this.setPrivate("textarea",s),s.addEventListener("input",n=>{this.get("multiLine")===!1&&(s.value=s.value.replace(/\n/g," ")),this.set("text",s.value),this._syncStyle()}),s.addEventListener("blur",n=>this.set("active",!1)),E("keyboardevents")&&this._disposers.push(D(document,"keydown",n=>{P(n)=="Escape"&&this.set("active",!1)})),this._disposers.push(D(document,"keydown",n=>{P(n)=="Enter"&&this.get("multiLine")===!1&&(n.preventDefault(),this.set("active",!1))})),this.events.dispatch("inited",{type:"inited",target:this}))}}}_isInited(){return!!this.getPrivate("textarea")}_startEditing(){if(!this._isInited()){this.events.once("inited",()=>{this._startEditing()});return}this._text.set("opacity",0);let e=this.getPrivate("input"),t=this.getPrivate("textarea");t&&(this.get("text","")==""&&this.set("text"," "),e.show(0),this.setTimeout(()=>{this._syncStyle(),t.focus()},100))}_stopEditing(){if(!this._isInited()){this.events.once("inited",()=>{this._stopEditing()});return}let e=this.getPrivate("input"),t=this.getPrivate("textarea");t&&(this.set("text",t.value),e.hide(0),this._text.set("opacity",1))}_syncStyle(){let e=this.getPrivate("input"),t=this.getPrivate("textarea"),s=e.getPrivate("htmlElement");if(t&&s){let n=window.getComputedStyle(t);B(n,d=>{t.style[d]="initial"}),t.style.color=this.get("fill",V(0)).toCSS(this.get("fillOpacity",1)),t.style.backgroundColor="rgba(0, 0, 0, 0)",t.style.border="none",t.style.outline="none",t.style.padding="0",t.wrap="off",t.style.resize="none",t.style.overflow="hidden";let i=this.get("maxWidth",0)-this.get("paddingLeft",0)-this.get("paddingRight",0);i>0?t.style.maxWidth=i+"px":t.style.minWidth="",t.style.height="auto",t.style.minHeight=t.scrollHeight+"px",this.get("width")&&(t.style.width=this.width()-this.get("paddingLeft",0)-this.get("paddingRight",0)+"px",t.style.minWidth="");let a=this.get("lineHeight");a?a instanceof S?t.style.lineHeight=a.value+"":m(a)&&(t.style.lineHeight=a+""):t.style.lineHeight="1.2";let l=this.get("fontFamily");l||(l=getComputedStyle(s,"font-family").getPropertyValue("font-family")),t.style.fontFamily=l;let r=this.get("fontSize");r?m(r)?r=r+"px":r=r:r=getComputedStyle(s,"font-size").getPropertyValue("font-size"),t.style.fontSize=r;let h=this.get("fontWeight");h?h=h:h=getComputedStyle(s,"font-weight").getPropertyValue("font-weight"),t.style.fontWeight=h;let o=this.get("fontStyle");o?o=o:o=getComputedStyle(s,"font-style").getPropertyValue("font-style"),t.style.fontStyle=o,this.get("oversizedBehavior")=="wrap"?t.style.whiteSpace="pre-wrap":t.style.whiteSpace="nowrap",this._root.events.on("frameended",()=>{t.style.minWidth==""&&(t.style.minWidth=t.scrollWidth+20+"px");let d=this.get("textAlign","start");d=="center"?(t.style.textAlign="center",!s.style.transform.match(/translateX/)&&!this.get("width")&&(s.style.transform+=" translateX(-50%)")):d=="end"?(t.style.textAlign="right",!s.style.transform.match(/translateX/)&&!this.get("width")&&(s.style.transform+=" translateX(-100%)")):t.style.textAlign=d})}}_syncText(){let e=this.getPrivate("textarea"),t=this.get("text","");t==" "&&(t=""),e&&(e.value=t)}};T.className="EditableLabel";T.classNames=R.classNames.concat([T.className]);var C=class extends y{constructor(){super(...arguments),this.thumb=this._makeThumb(),this.startGrip=this._makeButton(),this.endGrip=this._makeButton(),this._thumbBusy=!1,this._startDown=!1,this._endDown=!1,this._thumbDown=!1}_addOrientationClass(){this._settings.themeTags=b(this._settings.themeTags,["scrollbar",this._settings.orientation]),this._setDefaultTagged("background",b(this._settings.themeTags,["main","background"]),()=>c.new(this._root,{}))}_makeButton(){return this.children.push(v.new(this._root,{themeTags:["resize","button",this.get("orientation")],icon:L.new(this._root,{themeTags:["icon"]})._markC("themeTags")})._markC("themeTags","icon"))}_makeThumb(){return this.children.push(c.new(this._root,{themeTags:["thumb",this.get("orientation")]})._markC("themeTags"))}_handleAnimation(e){e&&this._disposers.push(e.events.on("stopped",()=>{this.setPrivateRaw("isBusy",!1),this._thumbBusy=!1}))}_afterNew(){this._addOrientationClass(),super._afterNew();let e=this.startGrip,t=this.endGrip,s=this.thumb,n=this.get("background");n&&this._disposers.push(n.events.on("click",i=>{this.setPrivateRaw("isBusy",!0);let a=this._display.toLocal(i.point),l=this.width(),r=this.height(),h=this.get("orientation"),o;h=="vertical"?o=(a.y-s.height()/2)/r:o=(a.x-s.width()/2)/l;let u,d;h=="vertical"?(u=o*r,d="y"):(u=o*l,d="x");let g=this.get("animationDuration",0);g>0?(this._thumbBusy=!0,this._handleAnimation(this.thumb.animate({key:d,to:u,duration:g,easing:this.get("animationEasing")}))):(this.thumb._setC(d,u),this._root.events.once("frameended",()=>{this.setPrivateRaw("isBusy",!1)}))})),this._disposers.push(s.events.on("dblclick",i=>{if(!G(i.originalEvent,this))return;let a=this.get("animationDuration",0),l=this.get("animationEasing");this.animate({key:"start",to:0,duration:a,easing:l}),this.animate({key:"end",to:1,duration:a,easing:l})})),this._disposers.push(e.events.on("pointerdown",()=>{this.setPrivateRaw("isBusy",!0),this._startDown=!0,this._gripDown="start"})),this._disposers.push(t.events.on("pointerdown",()=>{this.setPrivateRaw("isBusy",!0),this._endDown=!0,this._gripDown="end"})),this._disposers.push(s.events.on("pointerdown",()=>{this.setPrivateRaw("isBusy",!0),this._thumbDown=!0,this._gripDown=void 0})),this._disposers.push(e.events.on("globalpointerup",()=>{this._startDown&&(this.setPrivateRaw("isBusy",!1),this._released()),this._startDown=!1})),this._disposers.push(t.events.on("globalpointerup",()=>{this._endDown&&(this.setPrivateRaw("isBusy",!1),this._released()),this._endDown=!1})),this._disposers.push(s.events.on("globalpointerup",()=>{this._thumbDown&&(this.setPrivateRaw("isBusy",!1),this._released()),this._thumbDown=!1})),this._disposers.push(e.on("x",()=>{this._updateThumb()})),this._disposers.push(t.on("x",()=>{this._updateThumb()})),this._disposers.push(e.on("y",()=>{this._updateThumb()})),this._disposers.push(t.on("y",()=>{this._updateThumb()})),this._disposers.push(s.events.on("positionchanged",()=>{this._updateGripsByThumb()})),this.get("orientation")=="vertical"?(e._setC("x",0),t._setC("x",0),this._disposers.push(s.adapters.add("y",i=>Math.max(Math.min(Number(i),this.height()-s.height()),0))),this._disposers.push(s.adapters.add("x",i=>this.width()/2)),this._disposers.push(e.adapters.add("x",i=>this.width()/2)),this._disposers.push(t.adapters.add("x",i=>this.width()/2)),this._disposers.push(e.adapters.add("y",i=>Math.max(Math.min(Number(i),this.height()),0))),this._disposers.push(t.adapters.add("y",i=>Math.max(Math.min(Number(i),this.height()),0)))):(e._setC("y",0),t._setC("y",0),this._disposers.push(s.adapters.add("x",i=>Math.max(Math.min(Number(i),this.width()-s.width()),0))),this._disposers.push(s.adapters.add("y",i=>this.height()/2)),this._disposers.push(e.adapters.add("y",i=>this.height()/2)),this._disposers.push(t.adapters.add("y",i=>this.height()/2)),this._disposers.push(e.adapters.add("x",i=>Math.max(Math.min(Number(i),this.width()),0))),this._disposers.push(t.adapters.add("x",i=>Math.max(Math.min(Number(i),this.width()),0))))}_updateChildren(){super._updateChildren(),(this.isDirty("end")||this.isDirty("start")||this._sizeDirty)&&this.updateGrips()}_changed(){if(super._changed(),this.isDirty("start")||this.isDirty("end")){let e="rangechanged";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this,start:this.get("start",0),end:this.get("end",1),grip:this._gripDown})}}_released(){let e="released";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this})}updateGrips(){let e=this.startGrip,t=this.endGrip,s=this.get("orientation"),n=this.height(),i=this.width();s=="vertical"?(e._setC("y",n*this.get("start",0)),t._setC("y",n*this.get("end",1))):(e._setC("x",i*this.get("start",0)),t._setC("x",i*this.get("end",1)));let a=this.getPrivate("positionTextFunction"),l=Math.round(this.get("start",0)*100),r=Math.round(this.get("end",0)*100),h,o;a?(h=a.call(this,this.get("start",0)),o=a.call(this,this.get("end",0))):(h=l+"%",o=r+"%"),e._setC("ariaLabel",this._t("From %1",void 0,h)),e._setC("ariaValueNow",""+l),e._setC("ariaValueText",l+"%"),e._setC("ariaValueMin","0"),e._setC("ariaValueMax","100"),t._setC("ariaLabel",this._t("To %1",void 0,o)),t._setC("ariaValueNow",""+r),t._setC("ariaValueText",r+"%"),t._setC("ariaValueMin","0"),t._setC("ariaValueMax","100")}_updateThumb(){let e=this.thumb,t=this.startGrip,s=this.endGrip,n=this.height(),i=this.width(),a=t.x(),l=s.x(),r=t.y(),h=s.y(),o=0,u=1;this.get("orientation")=="vertical"?m(r)&&m(h)&&(!this._thumbBusy&&!e.isDragging()&&(e._setC("height",h-r),e._setC("y",r)),o=r/n,u=h/n):m(a)&&m(l)&&(!this._thumbBusy&&!e.isDragging()&&(e._setC("width",l-a),e._setC("x",a)),o=a/i,u=l/i),this.getPrivate("isBusy")&&(this.get("start")!=o||this.get("end")!=u)&&(this._setC("start",o),this._setC("end",u));let d=this.getPrivate("positionTextFunction"),g=Math.round(this.get("start",0)*100),_=Math.round(this.get("end",0)*100),f,p;d?(f=d.call(this,this.get("start",0)),p=d.call(this,this.get("end",0))):(f=g+"%",p=_+"%"),e._setC("ariaLabel",this._t("From %1 to %2",void 0,f,p)),e._setC("ariaValueNow",""+g),e._setC("ariaValueText",g+"%")}_updateGripsByThumb(){let e=this.thumb,t=this.startGrip,s=this.endGrip;if(this.get("orientation")=="vertical"){let n=e.height();t._setC("y",e.y()),s._setC("y",e.y()+n)}else{let n=e.width();t._setC("x",e.x()),s._setC("x",e.x()+n)}}};C.className="Scrollbar";C.classNames=y.classNames.concat([C.className]);export{c as a,v as b,T as c,C as d};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import a from"./C2HB2U6P.js";import{a as E}from"./5JADSW57.js";import{O as M,V as I,a as S,b as p,o as l,q as m,w as b}from"./GFTZ7EZP.js";export default $arcgis.t(([k,{cutExecute:A},{lengthExecute:L},{projectIsLoaded:j,projectLoad:B,projectExecute:N},{proximityGetNearestCoordinate:U},D,F,R,T,x,O,G,{substitute:W},{b:P,d:v,f:C,g:_}])=>{var H=S`calcite-block{--calcite-block-content-space: 0;--calcite-block-border-color: transparent;margin:0}.add-location-button{--calcite-button-border-color: var(--calcite-color-border-1);--calcite-button-icon-color: var(--calcite-color-text-1);--calcite-button-text-color: var(--calcite-color-text-1)}.button-container{display:flex;justify-content:center}calcite-list{margin:0 var(--calcite-space-sm) var(--calcite-space-sm);background-color:var(--calcite-color-surface-2);border:solid 1px var(--calcite-color-border-3);border-radius:var(--calcite-corner-radius-sm);overflow:hidden}calcite-list-item[selected] [slot=content-bottom]{display:block}.warning{color:var(--calcite-color-status-danger)}.terminals{padding:var(--calcite-space-sm) var(--calcite-space-md);display:flex;flex-direction:column}.filter-barrier{display:flex;justify-content:space-between;align-items:center;width:100%}`,V=`utility-network-trace-locations-sketch-${Date.now()}`,$=class q extends M{constructor(){super(...arguments),this._messages=E({blocking:!0}),this._isSelectWaiting=!1,this.traceLocationType="starting-point",this.traceLocations=new k,this.filterLayers=new k,this.spatialTolerance=.05,this.autoDestroyDisabled=!1,this.arcgisTraceLocationSelectEnd=b(),this.arcgisTraceLocationSelectStart=b(),this.arcgisError=b()}static{this.properties={_isSelectWaiting:16,beforeTraceLocationSelectStart:0,afterMapInteraction:0,view:0,traceLocationType:1,traceLocations:0,filterLayers:0,spatialTolerance:9,error:1,autoDestroyDisabled:5,utilityNetwork:0,heading:1,sketchViewModel:32}}static{this.styles=H}static{this.sketchViewModelMap=new Map}static getSketchViewModel(t){if(!this.sketchViewModelMap.has(t)){let e=this.#a(t,V);e&&this.sketchViewModelMap.set(t,new O({view:t,layer:e}))}return this.sketchViewModelMap.get(t)??null}static#a(t,e){if(!t?.map)return null;let i=t.map.findLayerById(e);if(!i){let r=new R({id:e,listMode:"hide",title:e});return P(t,r),r}return i}static removeSketchGraphicsLayer(t){if(t?.map){let e=t.map.findLayerById(V);e&&t.map.remove(e),this.sketchViewModelMap.delete(t)}}#i;get sketchViewModel(){return this.view?q.getSketchViewModel(this.view):null}async destroy(){this.#r(),await this.manager.destroy()}async load(){j()||await B()}willUpdate(t){t.has("filterLayers")&&this.#o()}#t(t,e){this.error=e,l(t,this,e),this.arcgisError.emit()}#s(t){let{traceLocations:e,view:i}=this;t.spatialProperties.flagGraphic&&i&&i.graphics.remove(t.spatialProperties.flagGraphic),e?.remove(t)}#o(){if(!this.sketchViewModel)return;let t=new k;this.filterLayers?.forEach(e=>{C(e)?e.sublayers.forEach(i=>{t.add(new G({layer:i,enabled:!0}))}):t.add(new G({layer:e,enabled:!0}))}),this.sketchViewModel.snappingOptions={enabled:!1,featureSources:t}}#n(t,e){let i=t.clone(),r=i.spatialReference,s=e.spatialReference;if(!r||!s)return l("warn",this,"Unable to calculate percent along because geometry is missing a spatial reference."),-1;let o=e;if(!r.equals(s)){let y=N(e,r);if(!y)return l("warn",this,"Unable to project flag point to source geometry spatial reference."),-1;o=y}let n=U(i,o);if(n.isEmpty)return l("warn",this,"Unable to compute nearest coordinate for polyline flag."),-1;let a=n.coordinate,c=a.x-.5,h=a.y-.5,d=a.x+.5,u=a.y+.5,f=new D({hasZ:!1,hasM:!0,paths:[[[c,h],[d,u]]],spatialReference:i.spatialReference}),g=A(i,f);if(g.length>0){let y=L(i,{unit:"feet"}),w;return g[0].paths[0][0][0]===i.paths[0][0][0]?w=L(g[0],{unit:"feet"}):g.length>1?w=L(g[1],{unit:"feet"}):w=0,w/y}return l("warn",this,"Unable to cut the source geometry with the flag geometry."),-1}get#c(){let t=this.utilityNetwork?.dataElement?.domainNetworks;return t?t.flatMap(e=>e.edgeSources).map(e=>e.layerId).filter(Boolean):[]}async#l(){let{view:t,sketchViewModel:e}=this;if(!(t&&e)){l("error",this,"Cannot add trace location."),e||l("error",this,m("sketchViewModel")),t||l("error",this,m("view"));return}if(this.beforeTraceLocationSelectStart){this._isSelectWaiting=!0;try{await this.beforeTraceLocationSelectStart()}finally{this._isSelectWaiting=!1}}await this.#e(t,e)}async#e(t,e){this.arcgisTraceLocationSelectStart.emit({cancelSelect:()=>e.cancel()}).defaultPrevented||(this.#i?.remove(),this.#i=e.on("create",i=>this.#h(i,t,e)),"acquireCursor"in t&&t.acquireCursor("crosshair"),e.snappingOptions.enabled=!0,e.create("point"))}#h(t,e,i){if(t.state==="complete"&&t.graphic){i.layer.remove(t.graphic),this.#p(t,e,i);return}t.state==="cancel"&&(this.#r(),this.arcgisTraceLocationSelectEnd.emit())}async#p(t,e,i){let{utilityNetwork:r}=this,{graphic:s}=t;if(!r){l("error",this,m("utilityNetwork")),this.#r(),this.arcgisTraceLocationSelectEnd.emit();return}if(s?.geometry?.type!=="point"){this.#t("warn",this._messages.errors.noHitResult),this.#e(e,i);return}let o=s.geometry,n=e.toScreen(o);if(!n){this.#t("warn",this._messages.errors.noHitResult),this.#e(e,i);return}let a=(await e.hitTest(n,{include:this.filterLayers})).results.filter(c=>c.type==="graphic"&&c?.layer&&c.graphic);if(!a.length){this.#t("info",this._messages.errors.noHitResult),this.#e(e,i);return}this.#r(),await this.#d(a,o,e)?this.arcgisTraceLocationSelectEnd.emit():this.#e(e,i)}#r(){let{view:t,sketchViewModel:e}=this;if(!t){l("error",this,m("view"));return}e&&(e.snappingOptions.enabled=!1),this.#i?.remove(),this.#i=void 0,"acquireCursor"in t&&t.acquireCursor("default")}async#d(t,e,i){if(!t.length)return this.#t("error",this._messages.errors.noHitResult),!1;let r=t[0].graphic;if(this.afterMapInteraction){let o=t.map(n=>{let a=n,c=a.graphic;return c.origin=a.layer,c.sourceLayer=a.layer,c});try{r=await this.afterMapInteraction(o)}catch{r=null}}if(!r)return l("error",this,"No graphic available from hit test results."),this.arcgisTraceLocationSelectEnd.emit(),!0;let s=await this.#u(r);return s?await this.#g(s,e,i):(this.#t("error",this._messages.errors.missingAttributes),this.arcgisTraceLocationSelectEnd.emit(),!0)}async#u(t){let e=(v(t.layer),t.layer),i=e.geometryType===null,r=e.fieldsIndex?.get("assetgroup")??!1,s=e.fieldsIndex?.get("assetgroup")?.name??"assetgroup",o=e.fieldsIndex?.get("assettype")??!1,n=e.fieldsIndex?.get("assettype")?.name??"assettype",a=t.getGlobalId(),c=t.getObjectId(),h=r?!!t.getAttribute(s):!0,d=o?!!t.getAttribute(n):!0,u=!!t.geometry;if(a&&c&&h&&d&&(u||i))return t;let f=e.createQuery();return f.objectIds=[c],(await e.queryFeatures(f)).features[0]||null}async#g(t,e,i){let{traceLocations:r}=this,s=t.getGlobalId()??"",o=t.geometry?.type,n=await this.#m(t,e);if(!n)return this.#t("error",this._messages.errors.errorGeneratingTraceLocationDetails),!1;let a=r?.filter(h=>h.spatialProperties.mapGraphic?.getGlobalId()===s)??[];if(a.length>0){if(o!=="polyline")return this.#t("warn",this._messages.errors.duplicateTraceLocationDetails),!1;if(a.some(h=>Math.abs(h.traceLocation.percentAlong-n.traceLocation.percentAlong)<=this.spatialTolerance))return this.#t("warn",this._messages.errors.duplicateTraceLocationDetailsWithinTolerance),!1}let c=this.#y(t,e,i);return c?(n.spatialProperties.flagGraphic=c,r?.add(n),!0):(this.#t("warn",this._messages.errors.errorAdding),!1)}async#m(t,e){let{traceLocationType:i,utilityNetwork:r}=this,s=t.getGlobalId()??"",o=t.geometry?.type,n=await this.#f(t);if(o==="point"||o==="polygon"){let a=r?.getTerminalConfiguration(t),c=a?a.terminals[0].id:1;return{traceLocation:new T({type:i,isFilterBarrier:!1,globalId:s,terminalId:c}),flagProperties:{title:n,expanded:!1,terminalConfiguration:a??void 0,selectedTerminals:a?new Set([c]):void 0},spatialProperties:{mapPoint:e,mapGraphic:t}}}else if(o==="polyline"){let a=this.#n(t.geometry,e);return a<0?(l("warn",this,"Unable to calculate percent along for polyline flag."),null):{traceLocation:new T({type:i,isFilterBarrier:!1,globalId:s,percentAlong:a}),flagProperties:{title:n,expanded:!1,terminalConfiguration:void 0,selectedTerminals:void 0},spatialProperties:{mapPoint:e,mapGraphic:t}}}else if(!o){let a=_(t.layer)?t.layer.parent:t.layer,c=a&&this.#c.includes(a.layerId),h=r?.getTerminalConfiguration(t),d=h?h.terminals[0].id:c?-1:1,u=c?.5:-1;return{traceLocation:new T({type:i,isFilterBarrier:!1,globalId:s,terminalId:d,percentAlong:u}),flagProperties:{title:n,expanded:!1,terminalConfiguration:h??void 0,selectedTerminals:h?new Set([d]):void 0},spatialProperties:{mapPoint:e,mapGraphic:t}}}return null}async#f(t){let e=(v(t.layer),t.layer);return("getFeatureTitle"in e?await e.getFeatureTitle(t):null)||t.getObjectId()?.toString()||this._messages.unknown}#y(t,e,i){let r=t.geometry?t.geometry.type==="point"?t.geometry:e:null,s=this.#w(),o=new F({geometry:r,symbol:s,attributes:t.attributes});return i.graphics.add(o),o}#w(){let{traceLocationType:t}=this,e=[244,21,21,.6],i=[21,244,21,.6];return t==="stopping-point"?new x({color:e,style:"x",size:12,outline:{color:e,width:2}}):t==="barrier"?new x({color:e,style:"square",size:12,outline:{color:e,width:0}}):new x({color:i,style:"circle",size:12,outline:{color:i,width:0}})}#b(){let{view:t,traceLocations:e}=this;e?.forEach(i=>{i.spatialProperties.flagGraphic&&t&&t.graphics.remove(i.spatialProperties.flagGraphic)}),e?.removeAll()}#v(t,e){let{flagProperties:i}=t,{selectedTerminals:r}=i,{name:s,id:o}=e,n=r?.has(o)??!1;return p`<calcite-label layout=inline><calcite-checkbox .value=${o} .checked=${n} @calciteCheckboxChange=${a=>{a.target.checked?r?.add(o):r?.delete(o),this.requestUpdate()}}></calcite-checkbox>${s}</calcite-label>`}#k(){return p`<calcite-notice kind=danger open scale=s width=auto><div slot=message>${this._messages.errors.noTerminalSelected}</div></calcite-notice>`}#L(t){let{traceLocation:e}=t;return p`<calcite-label layout=inline><div class="filter-barrier">${this._messages.labels.filterBarrier}<calcite-switch .checked=${e.isFilterBarrier} @calciteSwitchChange=${i=>{e.isFilterBarrier=i.target.checked}}></calcite-switch></div></calcite-label>`}#T(t){let{flagProperties:e}=t,{terminalConfiguration:i,selectedTerminals:r}=e,s=t.traceLocation.type==="barrier",o=i&&i.terminals.length>0&&r?.size===0;return p`<calcite-action .icon=${e.expanded?"chevron-up":"chevron-down"} slot=actions-end scale=s text @click=${()=>{e.expanded=!e.expanded,this.requestUpdate()}}></calcite-action>${o&&p`<calcite-icon class="warning" icon=exclamation-mark-triangle scale=s slot=content-start></calcite-icon>`||""}${e.expanded&&p`<div class="terminals" slot=content-bottom>${s&&this.#L(t)||""}${i&&this.#x(t)||""}${o&&this.#k()||""}</div>`||""}`}#x(t){let{flagProperties:e}=t,{terminalConfiguration:i}=e;if(!i)return l("warn",this,"One or more locations are missing the required flag property `terminalConfiguration`."),[];let r=i.terminals;return r.length?r.length===1?[]:r.map(s=>this.#v(t,s)):(l("warn",this,"`terminalConfiguration.terminals` is required but either missing or empty.`"),[])}#$(t){let{flagProperties:e}=t,{terminalConfiguration:i,expanded:r,title:s}=e,o=i&&i.id!==0,n=t.traceLocation.type==="barrier",a=o||n,c=i?.name??void 0;return p`<calcite-list-item .label=${s} .description=${c} .value=${s} .expanded=${r}>${a?this.#T(t):p`<div slot=content-bottom></div>`}<calcite-action icon=x slot=actions-end scale=s text @click=${()=>this.#s(t)}></calcite-action></calcite-list-item>`}#S(t){if(!t.length)return null;let{traceLocationType:e}=this,i=t.map(s=>this.#$(s)).toArray(),r=W(this._messages.labels.list,{type:e});return p`<div><calcite-list interaction-mode=static selection-mode=none .label=${r}>${i}</calcite-list></div>`}#M(){let{traceLocationType:t,_messages:e,traceLocations:i,heading:r}=this,s=t==="starting-point"?e.types.startingPoint:t==="barrier"?e.types.barrier:e.types.stoppingPoint,o=r??s.heading,n=s.description,a=s.buttonText;return p`<calcite-block .heading=${o} .label=${o} expanded .description=${n}>${i?.length?p`<calcite-button slot=actions-end appearance=transparent .label=${e.buttons.clear} @click=${()=>this.#b()}>${e.buttons.clear}</calcite-button>${this.#S(i)}`:null}<div class="button-container"><calcite-button .loading=${this._isSelectWaiting} class="add-location-button" icon-start=select appearance=outline .label=${a} @click=${()=>this.#l()}>${a}</calcite-button></div></calcite-block>`}render(){return this.#M()}};I("arcgis-utility-network-trace-locations",$);return $},"core/Collection","geometry/operators/cutOperator","geometry/operators/lengthOperator","geometry/operators/projectOperator","geometry/operators/proximityOperator","geometry/Polyline","Graphic","layers/GraphicsLayer","rest/networks/support/TraceLocation","symbols/SimpleMarkerSymbol","widgets/Sketch/SketchViewModel","views/interactive/snapping/FeatureSnappingLayerSource","intl",a)
2
+ import a from"./TMJX7DFH.js";import{a as E}from"./5JADSW57.js";import{O as M,V as I,a as S,b as p,o as l,q as m,w as b}from"./GFTZ7EZP.js";export default $arcgis.t(([k,{cutExecute:A},{lengthExecute:L},{projectIsLoaded:j,projectLoad:B,projectExecute:N},{proximityGetNearestCoordinate:U},D,F,R,T,x,O,G,{substitute:W},{b:P,e:v,g:C,h:_}])=>{var H=S`calcite-block{--calcite-block-content-space: 0;--calcite-block-border-color: transparent;margin:0}.add-location-button{--calcite-button-border-color: var(--calcite-color-border-1);--calcite-button-icon-color: var(--calcite-color-text-1);--calcite-button-text-color: var(--calcite-color-text-1)}.button-container{display:flex;justify-content:center}calcite-list{margin:0 var(--calcite-space-sm) var(--calcite-space-sm);background-color:var(--calcite-color-surface-2);border:solid 1px var(--calcite-color-border-3);border-radius:var(--calcite-corner-radius-sm);overflow:hidden}calcite-list-item[selected] [slot=content-bottom]{display:block}.warning{color:var(--calcite-color-status-danger)}.terminals{padding:var(--calcite-space-sm) var(--calcite-space-md);display:flex;flex-direction:column}.filter-barrier{display:flex;justify-content:space-between;align-items:center;width:100%}`,V=`utility-network-trace-locations-sketch-${Date.now()}`,$=class q extends M{constructor(){super(...arguments),this._messages=E({blocking:!0}),this._isSelectWaiting=!1,this.traceLocationType="starting-point",this.traceLocations=new k,this.filterLayers=new k,this.spatialTolerance=.05,this.autoDestroyDisabled=!1,this.arcgisTraceLocationSelectEnd=b(),this.arcgisTraceLocationSelectStart=b(),this.arcgisError=b()}static{this.properties={_isSelectWaiting:16,beforeTraceLocationSelectStart:0,afterMapInteraction:0,view:0,traceLocationType:1,traceLocations:0,filterLayers:0,spatialTolerance:9,error:1,autoDestroyDisabled:5,utilityNetwork:0,heading:1,sketchViewModel:32}}static{this.styles=H}static{this.sketchViewModelMap=new Map}static getSketchViewModel(t){if(!this.sketchViewModelMap.has(t)){let e=this.#a(t,V);e&&this.sketchViewModelMap.set(t,new O({view:t,layer:e}))}return this.sketchViewModelMap.get(t)??null}static#a(t,e){if(!t?.map)return null;let i=t.map.findLayerById(e);if(!i){let r=new R({id:e,listMode:"hide",title:e});return P(t,r),r}return i}static removeSketchGraphicsLayer(t){if(t?.map){let e=t.map.findLayerById(V);e&&t.map.remove(e),this.sketchViewModelMap.delete(t)}}#i;get sketchViewModel(){return this.view?q.getSketchViewModel(this.view):null}async destroy(){this.#r(),await this.manager.destroy()}async load(){j()||await B()}willUpdate(t){t.has("filterLayers")&&this.#o()}#t(t,e){this.error=e,l(t,this,e),this.arcgisError.emit()}#s(t){let{traceLocations:e,view:i}=this;t.spatialProperties.flagGraphic&&i&&i.graphics.remove(t.spatialProperties.flagGraphic),e?.remove(t)}#o(){if(!this.sketchViewModel)return;let t=new k;this.filterLayers?.forEach(e=>{C(e)?e.sublayers.forEach(i=>{t.add(new G({layer:i,enabled:!0}))}):t.add(new G({layer:e,enabled:!0}))}),this.sketchViewModel.snappingOptions={enabled:!1,featureSources:t}}#n(t,e){let i=t.clone(),r=i.spatialReference,s=e.spatialReference;if(!r||!s)return l("warn",this,"Unable to calculate percent along because geometry is missing a spatial reference."),-1;let o=e;if(!r.equals(s)){let y=N(e,r);if(!y)return l("warn",this,"Unable to project flag point to source geometry spatial reference."),-1;o=y}let n=U(i,o);if(n.isEmpty)return l("warn",this,"Unable to compute nearest coordinate for polyline flag."),-1;let a=n.coordinate,c=a.x-.5,h=a.y-.5,d=a.x+.5,u=a.y+.5,f=new D({hasZ:!1,hasM:!0,paths:[[[c,h],[d,u]]],spatialReference:i.spatialReference}),g=A(i,f);if(g.length>0){let y=L(i,{unit:"feet"}),w;return g[0].paths[0][0][0]===i.paths[0][0][0]?w=L(g[0],{unit:"feet"}):g.length>1?w=L(g[1],{unit:"feet"}):w=0,w/y}return l("warn",this,"Unable to cut the source geometry with the flag geometry."),-1}get#c(){let t=this.utilityNetwork?.dataElement?.domainNetworks;return t?t.flatMap(e=>e.edgeSources).map(e=>e.layerId).filter(Boolean):[]}async#l(){let{view:t,sketchViewModel:e}=this;if(!(t&&e)){l("error",this,"Cannot add trace location."),e||l("error",this,m("sketchViewModel")),t||l("error",this,m("view"));return}if(this.beforeTraceLocationSelectStart){this._isSelectWaiting=!0;try{await this.beforeTraceLocationSelectStart()}finally{this._isSelectWaiting=!1}}await this.#e(t,e)}async#e(t,e){this.arcgisTraceLocationSelectStart.emit({cancelSelect:()=>e.cancel()}).defaultPrevented||(this.#i?.remove(),this.#i=e.on("create",i=>this.#h(i,t,e)),"acquireCursor"in t&&t.acquireCursor("crosshair"),e.snappingOptions.enabled=!0,e.create("point"))}#h(t,e,i){if(t.state==="complete"&&t.graphic){i.layer.remove(t.graphic),this.#p(t,e,i);return}t.state==="cancel"&&(this.#r(),this.arcgisTraceLocationSelectEnd.emit())}async#p(t,e,i){let{utilityNetwork:r}=this,{graphic:s}=t;if(!r){l("error",this,m("utilityNetwork")),this.#r(),this.arcgisTraceLocationSelectEnd.emit();return}if(s?.geometry?.type!=="point"){this.#t("warn",this._messages.errors.noHitResult),this.#e(e,i);return}let o=s.geometry,n=e.toScreen(o);if(!n){this.#t("warn",this._messages.errors.noHitResult),this.#e(e,i);return}let a=(await e.hitTest(n,{include:this.filterLayers})).results.filter(c=>c.type==="graphic"&&c?.layer&&c.graphic);if(!a.length){this.#t("info",this._messages.errors.noHitResult),this.#e(e,i);return}this.#r(),await this.#d(a,o,e)?this.arcgisTraceLocationSelectEnd.emit():this.#e(e,i)}#r(){let{view:t,sketchViewModel:e}=this;if(!t){l("error",this,m("view"));return}e&&(e.snappingOptions.enabled=!1),this.#i?.remove(),this.#i=void 0,"acquireCursor"in t&&t.acquireCursor("default")}async#d(t,e,i){if(!t.length)return this.#t("error",this._messages.errors.noHitResult),!1;let r=t[0].graphic;if(this.afterMapInteraction){let o=t.map(n=>{let a=n,c=a.graphic;return c.origin=a.layer,c.sourceLayer=a.layer,c});try{r=await this.afterMapInteraction(o)}catch{r=null}}if(!r)return l("error",this,"No graphic available from hit test results."),this.arcgisTraceLocationSelectEnd.emit(),!0;let s=await this.#u(r);return s?await this.#g(s,e,i):(this.#t("error",this._messages.errors.missingAttributes),this.arcgisTraceLocationSelectEnd.emit(),!0)}async#u(t){let e=(v(t.layer),t.layer),i=e.geometryType===null,r=e.fieldsIndex?.get("assetgroup")??!1,s=e.fieldsIndex?.get("assetgroup")?.name??"assetgroup",o=e.fieldsIndex?.get("assettype")??!1,n=e.fieldsIndex?.get("assettype")?.name??"assettype",a=t.getGlobalId(),c=t.getObjectId(),h=r?!!t.getAttribute(s):!0,d=o?!!t.getAttribute(n):!0,u=!!t.geometry;if(a&&c&&h&&d&&(u||i))return t;let f=e.createQuery();return f.objectIds=[c],(await e.queryFeatures(f)).features[0]||null}async#g(t,e,i){let{traceLocations:r}=this,s=t.getGlobalId()??"",o=t.geometry?.type,n=await this.#m(t,e);if(!n)return this.#t("error",this._messages.errors.errorGeneratingTraceLocationDetails),!1;let a=r?.filter(h=>h.spatialProperties.mapGraphic?.getGlobalId()===s)??[];if(a.length>0){if(o!=="polyline")return this.#t("warn",this._messages.errors.duplicateTraceLocationDetails),!1;if(a.some(h=>Math.abs(h.traceLocation.percentAlong-n.traceLocation.percentAlong)<=this.spatialTolerance))return this.#t("warn",this._messages.errors.duplicateTraceLocationDetailsWithinTolerance),!1}let c=this.#y(t,e,i);return c?(n.spatialProperties.flagGraphic=c,r?.add(n),!0):(this.#t("warn",this._messages.errors.errorAdding),!1)}async#m(t,e){let{traceLocationType:i,utilityNetwork:r}=this,s=t.getGlobalId()??"",o=t.geometry?.type,n=await this.#f(t);if(o==="point"||o==="polygon"){let a=r?.getTerminalConfiguration(t),c=a?a.terminals[0].id:1;return{traceLocation:new T({type:i,isFilterBarrier:!1,globalId:s,terminalId:c}),flagProperties:{title:n,expanded:!1,terminalConfiguration:a??void 0,selectedTerminals:a?new Set([c]):void 0},spatialProperties:{mapPoint:e,mapGraphic:t}}}else if(o==="polyline"){let a=this.#n(t.geometry,e);return a<0?(l("warn",this,"Unable to calculate percent along for polyline flag."),null):{traceLocation:new T({type:i,isFilterBarrier:!1,globalId:s,percentAlong:a}),flagProperties:{title:n,expanded:!1,terminalConfiguration:void 0,selectedTerminals:void 0},spatialProperties:{mapPoint:e,mapGraphic:t}}}else if(!o){let a=_(t.layer)?t.layer.parent:t.layer,c=a&&this.#c.includes(a.layerId),h=r?.getTerminalConfiguration(t),d=h?h.terminals[0].id:c?-1:1,u=c?.5:-1;return{traceLocation:new T({type:i,isFilterBarrier:!1,globalId:s,terminalId:d,percentAlong:u}),flagProperties:{title:n,expanded:!1,terminalConfiguration:h??void 0,selectedTerminals:h?new Set([d]):void 0},spatialProperties:{mapPoint:e,mapGraphic:t}}}return null}async#f(t){let e=(v(t.layer),t.layer);return("getFeatureTitle"in e?await e.getFeatureTitle(t):null)||t.getObjectId()?.toString()||this._messages.unknown}#y(t,e,i){let r=t.geometry?t.geometry.type==="point"?t.geometry:e:null,s=this.#w(),o=new F({geometry:r,symbol:s,attributes:t.attributes});return i.graphics.add(o),o}#w(){let{traceLocationType:t}=this,e=[244,21,21,.6],i=[21,244,21,.6];return t==="stopping-point"?new x({color:e,style:"x",size:12,outline:{color:e,width:2}}):t==="barrier"?new x({color:e,style:"square",size:12,outline:{color:e,width:0}}):new x({color:i,style:"circle",size:12,outline:{color:i,width:0}})}#b(){let{view:t,traceLocations:e}=this;e?.forEach(i=>{i.spatialProperties.flagGraphic&&t&&t.graphics.remove(i.spatialProperties.flagGraphic)}),e?.removeAll()}#v(t,e){let{flagProperties:i}=t,{selectedTerminals:r}=i,{name:s,id:o}=e,n=r?.has(o)??!1;return p`<calcite-label layout=inline><calcite-checkbox .value=${o} .checked=${n} @calciteCheckboxChange=${a=>{a.target.checked?r?.add(o):r?.delete(o),this.requestUpdate()}}></calcite-checkbox>${s}</calcite-label>`}#k(){return p`<calcite-notice kind=danger open scale=s width=auto><div slot=message>${this._messages.errors.noTerminalSelected}</div></calcite-notice>`}#L(t){let{traceLocation:e}=t;return p`<calcite-label layout=inline><div class="filter-barrier">${this._messages.labels.filterBarrier}<calcite-switch .checked=${e.isFilterBarrier} @calciteSwitchChange=${i=>{e.isFilterBarrier=i.target.checked}}></calcite-switch></div></calcite-label>`}#T(t){let{flagProperties:e}=t,{terminalConfiguration:i,selectedTerminals:r}=e,s=t.traceLocation.type==="barrier",o=i&&i.terminals.length>0&&r?.size===0;return p`<calcite-action .icon=${e.expanded?"chevron-up":"chevron-down"} slot=actions-end scale=s text @click=${()=>{e.expanded=!e.expanded,this.requestUpdate()}}></calcite-action>${o&&p`<calcite-icon class="warning" icon=exclamation-mark-triangle scale=s slot=content-start></calcite-icon>`||""}${e.expanded&&p`<div class="terminals" slot=content-bottom>${s&&this.#L(t)||""}${i&&this.#x(t)||""}${o&&this.#k()||""}</div>`||""}`}#x(t){let{flagProperties:e}=t,{terminalConfiguration:i}=e;if(!i)return l("warn",this,"One or more locations are missing the required flag property `terminalConfiguration`."),[];let r=i.terminals;return r.length?r.length===1?[]:r.map(s=>this.#v(t,s)):(l("warn",this,"`terminalConfiguration.terminals` is required but either missing or empty.`"),[])}#$(t){let{flagProperties:e}=t,{terminalConfiguration:i,expanded:r,title:s}=e,o=i&&i.id!==0,n=t.traceLocation.type==="barrier",a=o||n,c=i?.name??void 0;return p`<calcite-list-item .label=${s} .description=${c} .value=${s} .expanded=${r}>${a?this.#T(t):p`<div slot=content-bottom></div>`}<calcite-action icon=x slot=actions-end scale=s text @click=${()=>this.#s(t)}></calcite-action></calcite-list-item>`}#S(t){if(!t.length)return null;let{traceLocationType:e}=this,i=t.map(s=>this.#$(s)).toArray(),r=W(this._messages.labels.list,{type:e});return p`<div><calcite-list interaction-mode=static selection-mode=none .label=${r}>${i}</calcite-list></div>`}#M(){let{traceLocationType:t,_messages:e,traceLocations:i,heading:r}=this,s=t==="starting-point"?e.types.startingPoint:t==="barrier"?e.types.barrier:e.types.stoppingPoint,o=r??s.heading,n=s.description,a=s.buttonText;return p`<calcite-block .heading=${o} .label=${o} expanded .description=${n}>${i?.length?p`<calcite-button slot=actions-end appearance=transparent .label=${e.buttons.clear} @click=${()=>this.#b()}>${e.buttons.clear}</calcite-button>${this.#S(i)}`:null}<div class="button-container"><calcite-button .loading=${this._isSelectWaiting} class="add-location-button" icon-start=select appearance=outline .label=${a} @click=${()=>this.#l()}>${a}</calcite-button></div></calcite-block>`}render(){return this.#M()}};I("arcgis-utility-network-trace-locations",$);return $},"core/Collection","geometry/operators/cutOperator","geometry/operators/lengthOperator","geometry/operators/projectOperator","geometry/operators/proximityOperator","geometry/Polyline","Graphic","layers/GraphicsLayer","rest/networks/support/TraceLocation","symbols/SimpleMarkerSymbol","widgets/Sketch/SketchViewModel","views/interactive/snapping/FeatureSnappingLayerSource","intl",a)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import b from"./4DWURRQB.js";import a from"./C2HB2U6P.js";import"./5JADSW57.js";import"./XSCEZHHS.js";import"./UVNNXZHK.js";import"./QUZTFUWM.js";import"./XPEGBUNJ.js";import"./XURWCCLX.js";import"./GFTZ7EZP.js";import"./H6RQVSYM.js";export default $arcgis.t(([,a])=>{return a},a,b)
2
+ import b from"./GLH5GJZC.js";import a from"./TMJX7DFH.js";import"./5JADSW57.js";import"./XSCEZHHS.js";import"./UVNNXZHK.js";import"./QUZTFUWM.js";import"./XPEGBUNJ.js";import"./XURWCCLX.js";import"./GFTZ7EZP.js";import"./H6RQVSYM.js";export default $arcgis.t(([,a])=>{return a},a,b)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as vt}from"./HH4T6PVP.js";import{D as _t,E as q,P as at,R as ft,S as xt,c as M,ga as ct,i as w,j as v,ja as bt,k as T,l as mt,m as ht,n as dt,o as et,qa as ut,ra as lt,sa as kt}from"./MRC7R44N.js";import{P as R,a as z,u as C}from"./3EYHGXI5.js";import{a as gt,b as tt,d as D,e as f}from"./CDGKQKVU.js";import{W,X as yt,g as Y,o as k}from"./W6X34YBZ.js";import"./H6RQVSYM.js";var it=class extends yt{setupDefaultRules(){super.setupDefaultRules();let e=this._root.interfaceColors,t=this.rule.bind(this);t("PercentSeries").setAll({legendLabelText:"{category}",legendValueText:"{valuePercentTotal.formatNumber('0.00p')}",colors:kt.new(this._root,{}),width:D,height:D}),t("PieChart").setAll({radius:tt(80),startAngle:-90,endAngle:270}),t("PieSeries").setAll({alignLabels:!0,startAngle:-90,endAngle:270}),t("PieSeries").states.create("hidden",{endAngle:-90,opacity:0}),t("Slice",["pie"]).setAll({position:"absolute",isMeasured:!1,x:0,y:0,toggleKey:"active",tooltipText:"{category}: {valuePercentTotal.formatNumber('0.00p')}",strokeWidth:1,strokeOpacity:1,role:"figure",lineJoin:"round"}),t("Slice",["pie"]).states.create("active",{shiftRadius:20,scale:1}),t("Slice",["pie"]).states.create("hoverActive",{scale:1.04}),t("Slice",["pie"]).states.create("hover",{scale:1.04}),t("RadialLabel",["pie"]).setAll({textType:"aligned",radius:10,text:"{category}: {valuePercentTotal.formatNumber('0.00p')}",paddingTop:5,paddingBottom:5,populateText:!0}),t("Tick",["pie"]).setAll({location:1}),t("SlicedChart").setAll({paddingLeft:10,paddingRight:10,paddingTop:10,paddingBottom:10}),t("FunnelSeries").setAll({startLocation:0,endLocation:1,orientation:"vertical",alignLabels:!0,sequencedInterpolation:!0}),t("FunnelSlice").setAll({interactive:!0,expandDistance:0}),t("FunnelSlice").states.create("hover",{expandDistance:.15}),t("Label",["funnel"]).setAll({populateText:!0,text:"{category}: {valuePercentTotal.formatNumber('0.00p')}",centerY:f}),t("Label",["funnel","horizontal"]).setAll({centerX:0,centerY:f,rotation:-90}),t("Label",["funnel","vertical"]).setAll({centerY:f,centerX:0}),t("Tick",["funnel"]).setAll({location:1}),t("FunnelSlice",["funnel","link"]).setAll({fillOpacity:.5,strokeOpacity:0,expandDistance:-.1}),t("FunnelSlice",["funnel","link","vertical"]).setAll({height:10}),t("FunnelSlice",["funnel","link","horizontal"]).setAll({width:10}),t("PyramidSeries").setAll({valueIs:"area"}),t("FunnelSlice",["pyramid","link"]).setAll({fillOpacity:.5}),t("FunnelSlice",["pyramid","link","vertical"]).setAll({height:0}),t("FunnelSlice",["pyramid","link","horizontal"]).setAll({width:0}),t("FunnelSlice",["pyramid"]).setAll({interactive:!0,expandDistance:0}),t("FunnelSlice",["pyramid"]).states.create("hover",{expandDistance:.15}),t("Label",["pyramid"]).setAll({populateText:!0,text:"{category}: {valuePercentTotal.formatNumber('0.00p')}",centerY:f}),t("Label",["pyramid","horizontal"]).setAll({centerX:0,centerY:f,rotation:-90}),t("Label",["pyramid","vertical"]).setAll({centerY:f,centerX:0}),t("Tick",["pyramid"]).setAll({location:1}),t("FunnelSlice",["pictorial"]).setAll({interactive:!0,tooltipText:"{category}: {valuePercentTotal.formatNumber('0.00p')}"}),t("Label",["pictorial"]).setAll({populateText:!0,text:"{category}: {valuePercentTotal.formatNumber('0.00p')}",centerY:f}),t("Label",["pictorial","horizontal"]).setAll({centerX:0,centerY:f,rotation:-90}),t("Label",["pictorial","vertical"]).setAll({centerY:f,centerX:0}),t("FunnelSlice",["pictorial","link"]).setAll({fillOpacity:.5,width:0,height:0}),t("Tick",["pictorial"]).setAll({location:.5});{let i=t("Graphics",["pictorial","background"]);i.setAll({fillOpacity:.2}),xt(i,"fill",e,"alternativeBackground")}}};var $=class extends ut{_afterNew(){this._defaultThemes.push(it.new(this._root)),super._afterNew(),this.chartContainer.children.push(this.seriesContainer),this.seriesContainer.children.push(this.bulletsContainer)}_processSeries(e){super._processSeries(e),this.seriesContainer.children.moveValue(this.bulletsContainer,this.seriesContainer.children.length-1)}};$.className="PercentChart";$.classNames=ut.classNames.concat([$.className]);var L=class extends ct{constructor(){super(...arguments),this.slicesContainer=this.children.push(at.new(this._root,{position:"absolute",isMeasured:!1})),this.labelsContainer=this.children.push(at.new(this._root,{position:"absolute",isMeasured:!1})),this.ticksContainer=this.children.push(at.new(this._root,{position:"absolute",isMeasured:!1})),this._lLabels=[],this._rLabels=[],this._hLabels=[],this.slices=this.addDisposer(this._makeSlices()),this.labels=this.addDisposer(this._makeLabels()),this.ticks=this.addDisposer(this._makeTicks())}_applyThemes(e=!1){let t=this.get("colors");return t&&t.reset(),super._applyThemes(e)}makeSlice(e){let t=this.slicesContainer.children.push(this.slices.make());return t.on("fill",()=>{this.updateLegendMarker(e)}),t.on("fillPattern",()=>{this.updateLegendMarker(e)}),t.on("stroke",()=>{this.updateLegendMarker(e)}),t._setDataItem(e),this._linkSprite(t,e),e.set("slice",t),this.slices.push(t),t}makeLabel(e){let t=this.labelsContainer.children.push(this.labels.make());return t._setDataItem(e),e.set("label",t),this.labels.push(t),t}_shouldMakeBullet(e){return e.get("value")!=null}makeTick(e){let t=this.ticksContainer.children.push(this.ticks.make());return t._setDataItem(e),e.set("tick",t),this.ticks.push(t),t}_afterNew(){this.fields.push("category","fill"),super._afterNew()}_placeBulletsContainer(){this.children.moveValue(this.bulletsContainer)}_onDataClear(){let e=this.get("colors");e&&e.reset();let t=this.get("patterns");t&&t.reset()}_prepareChildren(){if(super._prepareChildren(),this._lLabels=[],this._rLabels=[],this._hLabels=[],this._valuesDirty){let e=0,t=0,i=0,s=1/0,a=0;k(this._dataItems,l=>{let r=l.get("valueWorking",0);e+=r,t+=Math.abs(r)}),k(this._dataItems,l=>{let r=l.get("valueWorking",0);r>i&&(i=r),r<s&&(s=r),a++;let n=r/t;t==0&&(n=0),l.setRaw("valuePercentTotal",n*100)}),this.setPrivateRaw("valueLow",s),this.setPrivateRaw("valueHigh",i),this.setPrivateRaw("valueSum",e),this.setPrivateRaw("valueAverage",e/a),this.setPrivateRaw("valueAbsoluteSum",t)}}show(e){let t=Object.create(null,{show:{get:()=>super.show}});return z(this,void 0,void 0,function*(){let i=[];i.push(t.show.call(this,e)),i.push(this._sequencedShowHide(!0,e)),yield Promise.all(i)})}hide(e){let t=Object.create(null,{hide:{get:()=>super.hide}});return z(this,void 0,void 0,function*(){let i=[];i.push(t.hide.call(this,e)),i.push(this._sequencedShowHide(!1,e)),yield Promise.all(i)})}_updateChildren(){super._updateChildren(),this._valuesDirty&&k(this._dataItems,e=>{e.get("label").text.markDirtyText()}),(this.isDirty("legendLabelText")||this.isDirty("legendValueText"))&&k(this._dataItems,e=>{this.updateLegendValue(e)}),this._arrange()}_arrange(){this._arrangeDown(this._lLabels),this._arrangeUp(this._lLabels),this._arrangeDown(this._rLabels),this._arrangeUp(this._rLabels),this._arrangeLeft(this._hLabels),this._arrangeRight(this._hLabels),k(this.dataItems,e=>{this._updateTick(e)})}_afterChanged(){super._afterChanged(),this._arrange()}processDataItem(e){if(super.processDataItem(e),e.get("fill")==null){let t=this.get("colors");t&&e.setRaw("fill",t.next())}if(e.get("fillPattern")==null){let t=this.get("patterns");t&&e.setRaw("fillPattern",t.next())}}showDataItem(e,t){let i=Object.create(null,{showDataItem:{get:()=>super.showDataItem}});return z(this,void 0,void 0,function*(){let s=[i.showDataItem.call(this,e,t)];Y(t)||(t=this.get("stateAnimationDuration",0));let a=this.get("stateAnimationEasing"),l=e.get("value"),r=e.animate({key:"valueWorking",to:l,duration:t,easing:a});r&&s.push(r.waitForStop());let n=e.get("tick");n&&s.push(n.show(t));let u=e.get("label");u&&s.push(u.show(t));let o=e.get("slice");o&&s.push(o.show(t)),o.get("active")&&o.states.applyAnimate("active"),yield Promise.all(s)})}hideDataItem(e,t){let i=Object.create(null,{hideDataItem:{get:()=>super.hideDataItem}});return z(this,void 0,void 0,function*(){let s=[i.hideDataItem.call(this,e,t)],a=this.states.create("hidden",{});Y(t)||(t=a.get("stateAnimationDuration",this.get("stateAnimationDuration",0)));let l=a.get("stateAnimationEasing",this.get("stateAnimationEasing")),r=e.animate({key:"valueWorking",to:0,duration:t,easing:l});r&&s.push(r.waitForStop());let n=e.get("tick");n&&s.push(n.hide(t));let u=e.get("label");u&&s.push(u.hide(t));let o=e.get("slice");o.hideTooltip(),o&&s.push(o.hide(t)),yield Promise.all(s)})}disposeDataItem(e){super.disposeDataItem(e);let t=e.get("label");t&&(this.labels.removeValue(t),t.dispose());let i=e.get("tick");i&&(this.ticks.removeValue(i),i.dispose());let s=e.get("slice");s&&(this.slices.removeValue(s),s.dispose())}hoverDataItem(e){let t=e.get("slice");t&&!t.isHidden()&&t.hover()}unhoverDataItem(e){let t=e.get("slice");t&&t.unhover()}updateLegendMarker(e){if(e){let t=e.get("slice");if(t){let i=e.get("legendDataItem");if(i){let s=i.get("markerRectangle");k(_t,a=>{t.get(a)!=null&&s.set(a,t.get(a))})}}}}_arrangeDown(e){if(e){let t=this._getNextDown();e.sort((i,s)=>i.y>s.y?1:i.y<s.y?-1:0),k(e,i=>{let s=i.label.adjustedLocalBounds(),a=s.top;i.y+a<t&&(i.y=t-a),i.label.set("y",i.y),t=i.y+s.bottom})}}_getNextUp(){return this.labelsContainer.maxHeight()}_getNextDown(){return 0}_arrangeUp(e){if(e){let t=this._getNextUp();e.sort((i,s)=>i.y<s.y?1:i.y>s.y?-1:0),k(e,i=>{let s=i.label.adjustedLocalBounds(),a=s.bottom;i.y+a>t&&(i.y=t-a),i.label.set("y",i.y),t=i.y+s.top})}}_arrangeRight(e){if(e){let t=0;e.sort((i,s)=>i.y>s.y?1:i.y<s.y?-1:0),k(e,i=>{let s=i.label.adjustedLocalBounds(),a=s.left;i.y+a<t&&(i.y=t-a),i.label._setC("x",i.y),t=i.y+s.right})}}_arrangeLeft(e){if(e){let t=this.labelsContainer.maxWidth();e.sort((i,s)=>i.y<s.y?1:i.y>s.y?-1:0),k(e,i=>{let s=i.label.adjustedLocalBounds(),a=s.right;i.y+a>t&&(i.y=t-a),i.label._setC("x",i.y),t=i.y+s.left})}}_updateSize(){super._updateSize(),this.markDirty()}_updateTick(e){}_dispose(){super._dispose();let e=this.chart;e&&e.series.removeValue(this)}};L.className="PercentSeries";L.classNames=ct.classNames.concat([L.className]);var G=class extends ${constructor(){super(...arguments),this._maxRadius=1}_afterNew(){super._afterNew(),this.seriesContainer.setAll({x:f,y:f})}_processSeries(e){super._processSeries(e),this.series.each(t=>{t._markDirtyKey("innerRadius")})}_prepareChildren(){super._prepareChildren();let e=this.chartContainer,t=e.innerWidth(),i=e.innerHeight(),s=this.get("startAngle",0),a=this.get("endAngle",0),l=this.get("innerRadius"),r=ht(0,0,s,a,1),n=t/(r.right-r.left),u=i/(r.bottom-r.top),o={left:0,right:0,top:0,bottom:0};if(l instanceof gt){let p=l.value,g=Math.min(n,u);p=Math.max(g*p,g-Math.min(i,t))/g,o=ht(0,0,s,a,p),this.setPrivateRaw("irModifyer",p/l.value)}r=dt([r,o]);let m=this._maxRadius;this._maxRadius=Math.min(n,u);let h=C(this.get("radius",0),this._maxRadius);this.seriesContainer.setAll({dy:-h*(r.bottom+r.top)/2,dx:-h*(r.right+r.left)/2}),(this.isDirty("startAngle")||this.isDirty("endAngle")||m!=this._maxRadius)&&this.series.each(p=>{p._markDirtyKey("startAngle")}),(this.isDirty("innerRadius")||this.isDirty("radius"))&&this.series.each(p=>{p._markDirtyKey("innerRadius")})}radius(e){let t=C(this.get("radius",0),this._maxRadius),i=C(this.get("innerRadius",0),t);if(e){let s=this.series.indexOf(e),a=this.series.length,l=e.get("radius");return l!=null?i+C(l,t-i):i+(t-i)/a*(s+1)}return t}innerRadius(e){let t=this.radius(),i=C(this.get("innerRadius",0),t);if(i<0&&(i=t+i),e){let s=this.series.indexOf(e),a=this.series.length,l=e.get("innerRadius");return l!=null?i+C(l,t-i):i+(t-i)/a*s}return i}_updateSize(){super._updateSize(),this.markDirtyKey("radius")}};G.className="PieChart";G.classNames=$.classNames.concat([G.className]);var U=class extends L{_makeSlices(){return new M(W.new({}),()=>vt._new(this._root,{themeTags:R(this.slices.template.get("themeTags",[]),["pie","series"])},[this.slices.template]))}_makeLabels(){return new M(W.new({}),()=>bt._new(this._root,{themeTags:R(this.labels.template.get("themeTags",[]),["pie","series"])},[this.labels.template]))}_makeTicks(){return new M(W.new({}),()=>lt._new(this._root,{themeTags:R(this.ticks.template.get("themeTags",[]),["pie","series"])},[this.ticks.template]))}processDataItem(e){super.processDataItem(e);let t=this.makeSlice(e);t.on("scale",()=>{this._updateTick(e)}),t.on("shiftRadius",()=>{this._updateTick(e)}),t.events.on("positionchanged",()=>{this._updateTick(e)});let i=this.makeLabel(e);i.events.on("positionchanged",()=>{this._updateTick(e)}),this.makeTick(e),t.events.on("positionchanged",()=>{i.markDirty()})}_getNextUp(){let e=this.chart;return e?e._maxRadius:this.labelsContainer.maxHeight()/2}_getNextDown(){let e=this.chart;return e?-e._maxRadius:-this.labelsContainer.maxHeight()/2}_prepareChildren(){super._prepareChildren();let e=this.chart;if(e){if(this.isDirty("alignLabels")){let t=this.labels.template;if(this.get("alignLabels"))t._setC("textType","aligned");else{let i=t.get("textType");(i==null||i=="aligned")&&t._setC("textType","adjusted")}}if(this._valuesDirty||this.isDirty("radius")||this.isDirty("innerRadius")||this.isDirty("startAngle")||this.isDirty("endAngle")||this.isDirty("alignLabels")){this.markDirtyBounds();let t=this.get("startAngle",e.get("startAngle",-90)),s=this.get("endAngle",e.get("endAngle",270))-t,a=t,l=e.radius(this);this.setPrivateRaw("radius",l);let r=e.innerRadius(this)*e.getPrivate("irModifyer",1);r<0&&(r=l+r),k(this._dataItems,n=>{this.updateLegendValue(n);let u=s*n.get("valuePercentTotal")/100,o=n.get("slice");if(o){o.set("radius",l),o.set("innerRadius",r),o.set("startAngle",a),o.set("arc",u);let p=n.get("fill");o._setDefault("fill",p),o._setDefault("stroke",p);let g=n.get("fillPattern");o._setDefault("fillPattern",g)}let m=mt(a+u/2),h=n.get("label");if(h&&(h.setPrivate("radius",l),h.setPrivate("innerRadius",r),h.set("labelAngle",m),h.get("textType")=="aligned")){let p=l+h.get("radius",0),g=l*w(m);m>90&&m<=270?(!h.isHidden()&&!h.isHiding()&&this._lLabels.push({label:h,y:g}),p*=-1,p-=this.labelsContainer.get("paddingLeft",0),h.set("centerX",D),h.setPrivateRaw("left",!0)):(!h.isHidden()&&!h.isHiding()&&this._rLabels.push({label:h,y:g}),p+=this.labelsContainer.get("paddingRight",0),h.set("centerX",0),h.setPrivateRaw("left",!1)),h.set("x",p),h.set("y",l*w(m))}a+=u,this._updateTick(n)})}}}_updateTick(e){let t=e.get("tick"),i=e.get("label"),s=e.get("slice"),a=t.get("location",1);if(t&&i&&s){let l=(s.get("shiftRadius",0)+s.get("radius",0))*s.get("scale",1)*a,r=i.get("labelAngle",0),n=T(r),u=w(r),o=this.labelsContainer,m=o.get("paddingLeft",0),h=o.get("paddingRight",0),p=0,g=0;p=i.x(),g=i.y();let c=[];if(p!=0||g!=0){if(i.get("textType")=="circular"){let y=i.radius()-i.get("paddingBottom",0),x=i.get("labelAngle",0);p=y*T(x),g=y*w(x)}let d=-h;i.getPrivate("left")&&(d=m),c=[{x:s.x()+l*n,y:s.y()+l*u},{x:p+d,y:g},{x:p,y:g}]}t.set("points",c)}}_positionBullet(e){let t=e.get("sprite");if(t){let s=t.dataItem.get("slice");if(s){let a=s.get("innerRadius",0),l=s.get("radius",0),r=s.get("startAngle",0),n=s.get("arc",0),u=e.get("locationX",.5),o=e.get("locationY",.5),m=r+n*u,h=a+(l-a)*o;t.setAll({x:T(m)*h,y:w(m)*h})}}}};U.className="PieSeries";U.classNames=L.classNames.concat([U.className]);var V=class extends q{constructor(){super(...arguments),this._projectionDirty=!1,this._tlx=0,this._tly=0,this._trx=0,this._try=0,this._blx=0,this._bly=0,this._brx=0,this._bry=0,this._cprx=0,this._cplx=0,this._cpry=0,this._cply=0}_afterNew(){super._afterNew(),this.set("draw",e=>{let t=this.width(),i=this.height(),s=Math.min(t,i)/2,a=C(this.get("cornerRadiusTL",0),s),l=C(this.get("cornerRadiusTR",0),s),r=C(this.get("cornerRadiusBR",0),s),n=C(this.get("cornerRadiusBL",0),s),u=this._trx,o=this._try,m=this._tlx,h=this._tly,p=this._brx,g=this._bry,c=this._blx,d=this._bly;o==h&&(o=o-.01),g==d&&(g=g-.01);let y=et({x:m,y:h},{x:u,y:o}),x=et({x:u,y:o},{x:p,y:g}),b=et({x:p,y:g},{x:c,y:d}),_=et({x:c,y:d},{x:m,y:h});this.get("orientation")=="horizontal"?(a=Math.min(a,Math.abs(h-o)/2),l=Math.min(l,Math.abs(h-o)/2),r=Math.min(r,Math.abs(d-g)/2),n=Math.min(n,Math.abs(d-g)/2)):(a=Math.min(a,Math.abs(m-u)/2),l=Math.min(l,Math.abs(m-u)/2),r=Math.min(r,Math.abs(c-p)/2),n=Math.min(n,Math.abs(c-p)/2));let A=m-a*v((y-_)/2)*T(_),P=h-a*v((y-_)/2)*w(_),F=m-a*v((_-y)/2)*T(y),Z=h-a*v((_-y)/2)*w(y),N=u-l*v((x-y)/2)*T(y),nt=o-l*v((x-y)/2)*w(y),B=u-l*v((y-x)/2)*T(x),O=o-l*v((y-x)/2)*w(x),J=p-r*v((b-x)/2)*T(x),j=g-r*v((b-x)/2)*w(x),Q=p-r*v((x-b)/2)*T(b),I=g-r*v((x-b)/2)*w(b),pt=c-n*v((_-b)/2)*T(b),st=d-n*v((_-b)/2)*w(b),ot=c-n*v((b-_)/2)*T(_),Tt=d-n*v((b-_)/2)*w(_);e.moveTo(F,Z),e.lineTo(N,nt),e.arcTo(u,o,B,O,l),e.quadraticCurveTo(this._cprx,this._cpry,J,j),e.arcTo(p,g,Q,I,r),e.lineTo(pt,st),e.arcTo(c,d,ot,Tt,n),e.quadraticCurveTo(this._cplx,this._cply,A,P),e.arcTo(m,h,F,Z,a)})}getPoint(e,t){let i=this.width(),s=this.height(),a=this.get("topWidth",0),l=this.get("bottomWidth",0);if(this.get("orientation")=="vertical"){let r=-a/2,n=a/2,u=l/2,o=-l/2,m=r+(o-r)*t,h=n+(u-n)*t;return{x:m+(h-m)*e,y:s*t}}else{let r=-a/2,n=a/2,u=l/2,o=-l/2,m=r+(o-r)*e,h=n+(u-n)*e;return{x:i*e,y:m+(h-m)*t}}}_changed(){if(this.isDirty("topWidth")||this.isDirty("bottomWidth")||this.isDirty("expandDistance")||this.isDirty("orientation")||this.isDirty("width")||this.isDirty("height")||this.isDirty("cornerRadiusTL")||this.isDirty("cornerRadiusTR")||this.isDirty("cornerRadiusBR")||this.isDirty("cornerRadiusBL")){let e=this.width(),t=this.height(),i=this.get("topWidth",0),s=this.get("bottomWidth",0);this._clear=!0;let a=this.get("expandDistance",0);this.get("orientation")=="vertical"?(this._tlx=-i/2,this._tly=0,this._trx=i/2,this._try=0,this._brx=s/2,this._bry=t,this._blx=-s/2,this._bly=t,this._cprx=this._trx+(this._brx-this._trx)/2+a*t,this._cpry=this._try+.5*t,this._cplx=this._tlx+(this._blx-this._tlx)/2-a*t,this._cply=this._tly+.5*t):(this._tly=i/2,this._tlx=0,this._try=-i/2,this._trx=0,this._bry=-s/2,this._brx=e,this._bly=s/2,this._blx=e,this._cpry=this._try+(this._bry-this._try)/2-a*e,this._cprx=this._trx+.5*e,this._cply=this._tly+(this._bly-this._tly)/2+a*e,this._cplx=this._tlx+.5*e)}super._changed()}};V.className="FunnelSlice";V.classNames=q.classNames.concat([V.className]);var H=class extends L{constructor(){super(...arguments),this._tag="funnel",this.links=this.addDisposer(this._makeLinks()),this._total=0,this._count=0,this._nextCoord=0,this._opposite=!1}_makeSlices(){return new M(W.new({}),()=>V._new(this._root,{themeTags:R(this.slices.template.get("themeTags",[]),[this._tag,"series","slice",this.get("orientation")])},[this.slices.template]))}_makeLabels(){return new M(W.new({}),()=>ft._new(this._root,{themeTags:R(this.labels.template.get("themeTags",[]),[this._tag,"series","label",this.get("orientation")])},[this.labels.template]))}_makeTicks(){return new M(W.new({}),()=>lt._new(this._root,{themeTags:R(this.ticks.template.get("themeTags",[]),[this._tag,"series","tick",this.get("orientation")])},[this.ticks.template]))}_makeLinks(){return new M(W.new({}),()=>V._new(this._root,{themeTags:R(this.links.template.get("themeTags",[]),[this._tag,"series","link",this.get("orientation")])},[this.links.template]))}makeLink(e){let t=this.slicesContainer.children.push(this.links.make());return t._setDataItem(e),e.set("link",t),this.links.push(t),t}_afterNew(){super._afterNew();let e=this.slicesContainer;e.setAll({isMeasured:!0,position:"relative",width:tt(100),height:tt(100)}),e.onPrivate("width",()=>{this.markDirtySize()}),e.onPrivate("height",()=>{this.markDirtySize()}),this.get("orientation")=="vertical"?this._setC("layout",this._root.horizontalLayout):this._setC("layout",this._root.verticalLayout)}processDataItem(e){super.processDataItem(e);let t=this.makeSlice(e);t._setDataItem(e),e.set("slice",t),this.makeLink(e);let i=this.makeLabel(e);i.on("x",()=>{this._updateTick(e)}),i.on("y",()=>{this._updateTick(e)}),this.makeTick(e),t.events.on("positionchanged",()=>{i.markDirty()}),t.events.on("boundschanged",()=>{let s=t.dataItem;s&&this._updateTick(s)})}_updateChildren(){this._opposite=!1,this.children.indexOf(this.labelsContainer)==0&&(this._opposite=!0);let e=0,t=0;if(k(this.dataItems,i=>{let s=i.get("value");Y(s)&&(t++,s>0?e+=Math.abs(i.get("valueWorking",s)/s):this.get("ignoreZeroValues",!1)||i.isHidden()?t--:e+=1)}),this._total=1/t*e,this._count=t,this.isDirty("alignLabels")&&this._fixLayout(),this._total>0&&(this._valuesDirty||this._sizeDirty||this.isDirty("bottomRatio")||this.isDirty("startLocation")||this.isDirty("endLocation"))){let i=this.slicesContainer,s;this.get("orientation")=="vertical"?s=i.innerHeight():s=i.innerWidth(),this._nextCoord=this.get("startLocation",0)*s,this.markDirtyBounds();let a=0;k(this._dataItems,l=>{this.updateLegendValue(l),l.set("index",a),a++;let r=l.get("slice"),n=l.get("tick"),u=l.get("label"),o=l.get("link"),m=l.get("fill"),h=l.get("fillPattern");r._setDefault("fill",m),r._setDefault("stroke",m),r._setDefault("fillPattern",h),o._setDefault("fill",m),o._setDefault("stroke",m);let p=l.get("value");Y(p)&&(p==0&&this.get("ignoreZeroValues")?(r.setPrivate("visible",!1),n.setPrivate("visible",!1),u.setPrivate("visible",!1)):(r.setPrivate("visible",!0),n.setPrivate("visible",!0),u.setPrivate("visible",!0),this.decorateSlice(l),this.isLast(l)?o.setPrivate("visible",!1):l.isHidden()||o.setPrivate("visible",!0)))})}super._updateChildren()}_fixLayout(){let e=this.get("orientation"),t=this.labelsContainer,i=this.labels.template;this.get("alignLabels")?(t._setC("position","relative"),t._setCAll({isMeasured:!0}),e=="vertical"?(this._setC("layout",this._root.horizontalLayout),i._setCAll({centerX:D,x:D})):(this._setC("layout",this._root.verticalLayout),i._setCAll({centerX:0,x:0}))):(t._setCAll({isMeasured:!1,position:"absolute"}),e=="vertical"?(t._setCAll({x:f}),i._setCAll({centerX:f,x:0})):(t._setCAll({y:f}),i._setCAll({centerX:f,y:0}))),this.markDirtySize()}getNextValue(e){let t=e.get("index"),i=e.get("valueWorking",0);if(t<this.dataItems.length-1){let s=this.dataItems[t+1];if(i=s.get("valueWorking",0),s.isHidden()||s.get("value")==0&&this.get("ignoreZeroValues"))return this.getNextValue(s)}return i}isLast(e){let t=e.get("index");if(t==this.dataItems.length-1)return!0;for(let i=t+1;i<this.dataItems.length;i++)if(!this.dataItems[i].isHidden())return!1;return!0}decorateSlice(e){let t=this.get("orientation"),i=e.get("slice"),s=e.get("label"),a=e.get("link"),l=this.slicesContainer,r=l.innerWidth(),n=l.innerHeight(),u=r;t=="horizontal"&&(u=n);let o=this.getNextValue(e),m=e.get("value",0),h=Math.abs(e.get("valueWorking",m)),p=this.get("bottomRatio",0),g=this.getPrivate("valueHigh",0),c=1;m!=0?c=h/Math.abs(m):e.isHidden()&&(c=1e-6),this._nextCoord==1/0&&(this._nextCoord=0);let d=h/g*u,y=(h-(h-o)*p)/g*u;i._setCAll({topWidth:d,bottomWidth:y,orientation:t}),a._setCAll({topWidth:y,bottomWidth:(h-(h-o))/g*u,orientation:t});let x=this.get("startLocation",0),b=this.get("endLocation",1);if(t=="vertical"){let _=a.height()*c;n=n*(b-x)+_,i._setC("y",this._nextCoord);let A=Math.min(1e5,Math.max(0,n/this._count*c/this._total-_));i._setCAll({height:A,x:r/2});let P=this._nextCoord+A/2;s._setC("y",P),this._nextCoord+=A+_,a._setCAll({y:this._nextCoord-_,x:r/2})}else{let _=a.width()*c;r=r*(b-x)+_,i._setC("x",this._nextCoord);let A=Math.min(1e5,Math.max(0,r/this._count*c/this._total-_));i._setCAll({width:A,y:n/2});let P=this._nextCoord+A/2;s._setC("x",P),this._nextCoord+=A+_,a._setCAll({x:this._nextCoord-_,y:n/2})}}hideDataItem(e,t){let i=Object.create(null,{hideDataItem:{get:()=>super.hideDataItem}});return z(this,void 0,void 0,function*(){return e.get("link").hide(t),i.hideDataItem.call(this,e,t)})}showDataItem(e,t){let i=Object.create(null,{showDataItem:{get:()=>super.showDataItem}});return z(this,void 0,void 0,function*(){return e.get("link").show(t),i.showDataItem.call(this,e,t)})}_updateTick(e){if(this.get("alignLabels")){let t=e.get("tick"),i=e.get("label"),s=e.get("slice");if(t&&s&&i){let a=this.labelsContainer,l=this.slicesContainer,r=t.get("location",.5),n=a.width(),u=a.height(),o=a.get("paddingLeft",0),m=a.get("paddingRight",0),h=a.get("paddingTop",0),p=a.get("paddingBottom",0),g={x:0,y:0},c={x:0,y:0},d={x:0,y:0};this._opposite&&(r=1-r),this.get("orientation")=="vertical"?(g=s.getPoint(r,.5),g.x+=s.x()+l.x(),g.y+=s.y()+l.y(),this._opposite?(c.x=n,c.y=i.y(),d.x=n-o,d.y=c.y):(c.x=l.x()+l.width(),c.y=i.y(),d.x=c.x+n-i.width()-m,d.y=c.y)):(g=s.getPoint(.5,r),g.x+=s.x()+l.x(),g.y+=s.y()+l.y(),this._opposite?(c.y=u,c.x=i.x(),d.y=u-h,d.x=c.x):(c.y=l.y()+l.height(),c.x=i.x(),d.y=c.y+u-i.height()-p,d.x=c.x)),t.set("points",[g,c,d])}}}disposeDataItem(e){super.disposeDataItem(e);let t=e.get("link");t&&(this.links.removeValue(t),t.dispose())}_positionBullet(e){let t=e.get("sprite");if(t){let s=t.dataItem.get("slice");if(s){let a=s.getPoint(e.get("locationX",.5),e.get("locationY",.5));t.setAll({x:s.x()+a.x,y:s.y()+a.y})}}}};H.className="FunnelSeries";H.classNames=L.classNames.concat([H.className]);var X=class extends H{constructor(){super(...arguments),this._tag="pyramid"}_prepareChildren(){super._prepareChildren(),this._nextSize=void 0,(this.isDirty("topWidth")||this.isDirty("bottomWidth")||this.isDirty("valueIs"))&&(this._valuesDirty=!0)}decorateSlice(e){let t=this.get("orientation"),i=this.slicesContainer,s=e.get("slice"),a=e.get("label"),l=e.get("link"),r=this.get("valueIs","area"),n=this.getPrivate("valueAbsoluteSum",0);if(n==0)return;let u=this.get("startLocation",0),o=this.get("endLocation",1),m=this.get("topWidth",0),h=this.get("bottomWidth",D),p=Math.abs(e.get("valueWorking",0)),g=e.get("value",0),c,d,y=i.innerHeight(),x=i.innerWidth(),b=l.width(),_=l.height();t=="horizontal"&&([x,y]=[y,x],[b,_]=[_,b]);let A=x/2,P=1;g!=0?P=p/Math.abs(g):e.isHidden()&&(P=1e-6),_*=P,y=y*(o-u)-_*(this._count*this._total-1);let F=C(m,x);Y(this._nextSize)||(this._nextSize=F);let Z=C(h,x),N=this._nextSize,nt=Math.atan2(y,F-Z),B=Math.tan(Math.PI/2-nt);if(B==0&&(B=1e-8),r=="area"){let st=(F+Z)/2*y*p/n,ot=Math.abs(N*N-2*st*B);c=(N-Math.sqrt(ot))/B,c>0?d=(2*st-c*N)/c:d=N}else c=y*p/n,d=N-c*B;let O=this._nextCoord+c/2,J=A,j=this._nextCoord,Q=A,I=j+c;t=="vertical"?(a.set("y",O),a.get("opacity")>0&&this._rLabels.push({label:a,y:O}),s.set("height",c)):(a.set("x",O),a.get("opacity")>0&&this._hLabels.push({label:a,y:O}),[J,j]=[j,J],[Q,I]=[I,Q],s.set("width",c)),s.setAll({orientation:t,bottomWidth:d,topWidth:N,x:J,y:j}),l.setAll({orientation:t,x:Q,y:I,topWidth:d,bottomWidth:d}),this._nextSize=d,this._nextCoord+=c+_}};X.className="PyramidSeries";X.classNames=H.classNames.concat([X.className]);var K=class extends X{constructor(){super(...arguments),this._tag="pictorial",this.seriesMask=q.new(this._root,{position:"absolute",x:f,y:f,centerX:f,centerY:f}),this.seriesGraphics=this.slicesContainer.children.push(q.new(this._root,{themeTags:["pictorial","background"],position:"absolute",x:f,y:f,centerX:f,centerY:f})._markC("themeTags","position","x","y","centerX","centerY"))}_afterNew(){super._afterNew(),this._setC("topWidth",D),this._setC("bottomWidth",D),this._setC("valueIs","height"),this.slicesContainer._setC("mask",this.seriesMask)}_updateScale(){let e=this.slicesContainer,t=e.innerWidth(),i=e.innerHeight(),s=this.seriesMask,a=this.seriesGraphics,l=s.get("scale",1),r=s.localBounds(),n=r.right-r.left,u=r.bottom-r.top;this.get("orientation")=="horizontal"?l=t/n:l=i/u,l!=1/0&&!Number.isNaN(l)&&(s.set("scale",l),s.set("x",t/2),s.set("y",i/2),a._setC("scale",l),a._setC("x",t/2),a._setC("y",i/2))}_prepareChildren(){if(super._prepareChildren(),this.isDirty("svgPath")){let e=this.get("svgPath");this.seriesMask.set("svgPath",e),this.seriesGraphics._setC("svgPath",e)}this._updateScale()}};K.className="PictorialStackedSeries";K.classNames=X.classNames.concat([K.className]);var E=class extends ${_afterNew(){super._afterNew(),this.seriesContainer.setAll({isMeasured:!0,layout:this._root.horizontalLayout})}};E.className="SlicedChart";E.classNames=$.classNames.concat([E.className]);export{it as DefaultTheme,H as FunnelSeries,V as FunnelSlice,$ as PercentChart,L as PercentSeries,K as PictorialStackedSeries,G as PieChart,U as PieSeries,X as PyramidSeries,E as SlicedChart};
2
+ import{a as vt}from"./QMQV37ML.js";import{D as _t,E as q,P as at,R as ft,S as xt,c as M,ga as ct,i as w,j as v,ja as bt,k as T,l as mt,m as ht,n as dt,o as et,qa as ut,ra as lt,sa as kt}from"./TZHXSIXK.js";import{P as R,a as z,u as C}from"./PLTLRYBF.js";import{a as gt,b as tt,d as D,e as f}from"./T2DT5I33.js";import{W,X as yt,g as Y,o as k}from"./6NWR2Z4F.js";import"./H6RQVSYM.js";var it=class extends yt{setupDefaultRules(){super.setupDefaultRules();let e=this._root.interfaceColors,t=this.rule.bind(this);t("PercentSeries").setAll({legendLabelText:"{category}",legendValueText:"{valuePercentTotal.formatNumber('0.00p')}",colors:kt.new(this._root,{}),width:D,height:D}),t("PieChart").setAll({radius:tt(80),startAngle:-90,endAngle:270}),t("PieSeries").setAll({alignLabels:!0,startAngle:-90,endAngle:270}),t("PieSeries").states.create("hidden",{endAngle:-90,opacity:0}),t("Slice",["pie"]).setAll({position:"absolute",isMeasured:!1,x:0,y:0,toggleKey:"active",tooltipText:"{category}: {valuePercentTotal.formatNumber('0.00p')}",strokeWidth:1,strokeOpacity:1,role:"figure",lineJoin:"round"}),t("Slice",["pie"]).states.create("active",{shiftRadius:20,scale:1}),t("Slice",["pie"]).states.create("hoverActive",{scale:1.04}),t("Slice",["pie"]).states.create("hover",{scale:1.04}),t("RadialLabel",["pie"]).setAll({textType:"aligned",radius:10,text:"{category}: {valuePercentTotal.formatNumber('0.00p')}",paddingTop:5,paddingBottom:5,populateText:!0}),t("Tick",["pie"]).setAll({location:1}),t("SlicedChart").setAll({paddingLeft:10,paddingRight:10,paddingTop:10,paddingBottom:10}),t("FunnelSeries").setAll({startLocation:0,endLocation:1,orientation:"vertical",alignLabels:!0,sequencedInterpolation:!0}),t("FunnelSlice").setAll({interactive:!0,expandDistance:0}),t("FunnelSlice").states.create("hover",{expandDistance:.15}),t("Label",["funnel"]).setAll({populateText:!0,text:"{category}: {valuePercentTotal.formatNumber('0.00p')}",centerY:f}),t("Label",["funnel","horizontal"]).setAll({centerX:0,centerY:f,rotation:-90}),t("Label",["funnel","vertical"]).setAll({centerY:f,centerX:0}),t("Tick",["funnel"]).setAll({location:1}),t("FunnelSlice",["funnel","link"]).setAll({fillOpacity:.5,strokeOpacity:0,expandDistance:-.1}),t("FunnelSlice",["funnel","link","vertical"]).setAll({height:10}),t("FunnelSlice",["funnel","link","horizontal"]).setAll({width:10}),t("PyramidSeries").setAll({valueIs:"area"}),t("FunnelSlice",["pyramid","link"]).setAll({fillOpacity:.5}),t("FunnelSlice",["pyramid","link","vertical"]).setAll({height:0}),t("FunnelSlice",["pyramid","link","horizontal"]).setAll({width:0}),t("FunnelSlice",["pyramid"]).setAll({interactive:!0,expandDistance:0}),t("FunnelSlice",["pyramid"]).states.create("hover",{expandDistance:.15}),t("Label",["pyramid"]).setAll({populateText:!0,text:"{category}: {valuePercentTotal.formatNumber('0.00p')}",centerY:f}),t("Label",["pyramid","horizontal"]).setAll({centerX:0,centerY:f,rotation:-90}),t("Label",["pyramid","vertical"]).setAll({centerY:f,centerX:0}),t("Tick",["pyramid"]).setAll({location:1}),t("FunnelSlice",["pictorial"]).setAll({interactive:!0,tooltipText:"{category}: {valuePercentTotal.formatNumber('0.00p')}"}),t("Label",["pictorial"]).setAll({populateText:!0,text:"{category}: {valuePercentTotal.formatNumber('0.00p')}",centerY:f}),t("Label",["pictorial","horizontal"]).setAll({centerX:0,centerY:f,rotation:-90}),t("Label",["pictorial","vertical"]).setAll({centerY:f,centerX:0}),t("FunnelSlice",["pictorial","link"]).setAll({fillOpacity:.5,width:0,height:0}),t("Tick",["pictorial"]).setAll({location:.5});{let i=t("Graphics",["pictorial","background"]);i.setAll({fillOpacity:.2}),xt(i,"fill",e,"alternativeBackground")}}};var $=class extends ut{_afterNew(){this._defaultThemes.push(it.new(this._root)),super._afterNew(),this.chartContainer.children.push(this.seriesContainer),this.seriesContainer.children.push(this.bulletsContainer)}_processSeries(e){super._processSeries(e),this.seriesContainer.children.moveValue(this.bulletsContainer,this.seriesContainer.children.length-1)}};$.className="PercentChart";$.classNames=ut.classNames.concat([$.className]);var L=class extends ct{constructor(){super(...arguments),this.slicesContainer=this.children.push(at.new(this._root,{position:"absolute",isMeasured:!1})),this.labelsContainer=this.children.push(at.new(this._root,{position:"absolute",isMeasured:!1})),this.ticksContainer=this.children.push(at.new(this._root,{position:"absolute",isMeasured:!1})),this._lLabels=[],this._rLabels=[],this._hLabels=[],this.slices=this.addDisposer(this._makeSlices()),this.labels=this.addDisposer(this._makeLabels()),this.ticks=this.addDisposer(this._makeTicks())}_applyThemes(e=!1){let t=this.get("colors");return t&&t.reset(),super._applyThemes(e)}makeSlice(e){let t=this.slicesContainer.children.push(this.slices.make());return t.on("fill",()=>{this.updateLegendMarker(e)}),t.on("fillPattern",()=>{this.updateLegendMarker(e)}),t.on("stroke",()=>{this.updateLegendMarker(e)}),t._setDataItem(e),this._linkSprite(t,e),e.set("slice",t),this.slices.push(t),t}makeLabel(e){let t=this.labelsContainer.children.push(this.labels.make());return t._setDataItem(e),e.set("label",t),this.labels.push(t),t}_shouldMakeBullet(e){return e.get("value")!=null}makeTick(e){let t=this.ticksContainer.children.push(this.ticks.make());return t._setDataItem(e),e.set("tick",t),this.ticks.push(t),t}_afterNew(){this.fields.push("category","fill"),super._afterNew()}_placeBulletsContainer(){this.children.moveValue(this.bulletsContainer)}_onDataClear(){let e=this.get("colors");e&&e.reset();let t=this.get("patterns");t&&t.reset()}_prepareChildren(){if(super._prepareChildren(),this._lLabels=[],this._rLabels=[],this._hLabels=[],this._valuesDirty){let e=0,t=0,i=0,s=1/0,a=0;k(this._dataItems,l=>{let r=l.get("valueWorking",0);e+=r,t+=Math.abs(r)}),k(this._dataItems,l=>{let r=l.get("valueWorking",0);r>i&&(i=r),r<s&&(s=r),a++;let n=r/t;t==0&&(n=0),l.setRaw("valuePercentTotal",n*100)}),this.setPrivateRaw("valueLow",s),this.setPrivateRaw("valueHigh",i),this.setPrivateRaw("valueSum",e),this.setPrivateRaw("valueAverage",e/a),this.setPrivateRaw("valueAbsoluteSum",t)}}show(e){let t=Object.create(null,{show:{get:()=>super.show}});return z(this,void 0,void 0,function*(){let i=[];i.push(t.show.call(this,e)),i.push(this._sequencedShowHide(!0,e)),yield Promise.all(i)})}hide(e){let t=Object.create(null,{hide:{get:()=>super.hide}});return z(this,void 0,void 0,function*(){let i=[];i.push(t.hide.call(this,e)),i.push(this._sequencedShowHide(!1,e)),yield Promise.all(i)})}_updateChildren(){super._updateChildren(),this._valuesDirty&&k(this._dataItems,e=>{e.get("label").text.markDirtyText()}),(this.isDirty("legendLabelText")||this.isDirty("legendValueText"))&&k(this._dataItems,e=>{this.updateLegendValue(e)}),this._arrange()}_arrange(){this._arrangeDown(this._lLabels),this._arrangeUp(this._lLabels),this._arrangeDown(this._rLabels),this._arrangeUp(this._rLabels),this._arrangeLeft(this._hLabels),this._arrangeRight(this._hLabels),k(this.dataItems,e=>{this._updateTick(e)})}_afterChanged(){super._afterChanged(),this._arrange()}processDataItem(e){if(super.processDataItem(e),e.get("fill")==null){let t=this.get("colors");t&&e.setRaw("fill",t.next())}if(e.get("fillPattern")==null){let t=this.get("patterns");t&&e.setRaw("fillPattern",t.next())}}showDataItem(e,t){let i=Object.create(null,{showDataItem:{get:()=>super.showDataItem}});return z(this,void 0,void 0,function*(){let s=[i.showDataItem.call(this,e,t)];Y(t)||(t=this.get("stateAnimationDuration",0));let a=this.get("stateAnimationEasing"),l=e.get("value"),r=e.animate({key:"valueWorking",to:l,duration:t,easing:a});r&&s.push(r.waitForStop());let n=e.get("tick");n&&s.push(n.show(t));let u=e.get("label");u&&s.push(u.show(t));let o=e.get("slice");o&&s.push(o.show(t)),o.get("active")&&o.states.applyAnimate("active"),yield Promise.all(s)})}hideDataItem(e,t){let i=Object.create(null,{hideDataItem:{get:()=>super.hideDataItem}});return z(this,void 0,void 0,function*(){let s=[i.hideDataItem.call(this,e,t)],a=this.states.create("hidden",{});Y(t)||(t=a.get("stateAnimationDuration",this.get("stateAnimationDuration",0)));let l=a.get("stateAnimationEasing",this.get("stateAnimationEasing")),r=e.animate({key:"valueWorking",to:0,duration:t,easing:l});r&&s.push(r.waitForStop());let n=e.get("tick");n&&s.push(n.hide(t));let u=e.get("label");u&&s.push(u.hide(t));let o=e.get("slice");o.hideTooltip(),o&&s.push(o.hide(t)),yield Promise.all(s)})}disposeDataItem(e){super.disposeDataItem(e);let t=e.get("label");t&&(this.labels.removeValue(t),t.dispose());let i=e.get("tick");i&&(this.ticks.removeValue(i),i.dispose());let s=e.get("slice");s&&(this.slices.removeValue(s),s.dispose())}hoverDataItem(e){let t=e.get("slice");t&&!t.isHidden()&&t.hover()}unhoverDataItem(e){let t=e.get("slice");t&&t.unhover()}updateLegendMarker(e){if(e){let t=e.get("slice");if(t){let i=e.get("legendDataItem");if(i){let s=i.get("markerRectangle");k(_t,a=>{t.get(a)!=null&&s.set(a,t.get(a))})}}}}_arrangeDown(e){if(e){let t=this._getNextDown();e.sort((i,s)=>i.y>s.y?1:i.y<s.y?-1:0),k(e,i=>{let s=i.label.adjustedLocalBounds(),a=s.top;i.y+a<t&&(i.y=t-a),i.label.set("y",i.y),t=i.y+s.bottom})}}_getNextUp(){return this.labelsContainer.maxHeight()}_getNextDown(){return 0}_arrangeUp(e){if(e){let t=this._getNextUp();e.sort((i,s)=>i.y<s.y?1:i.y>s.y?-1:0),k(e,i=>{let s=i.label.adjustedLocalBounds(),a=s.bottom;i.y+a>t&&(i.y=t-a),i.label.set("y",i.y),t=i.y+s.top})}}_arrangeRight(e){if(e){let t=0;e.sort((i,s)=>i.y>s.y?1:i.y<s.y?-1:0),k(e,i=>{let s=i.label.adjustedLocalBounds(),a=s.left;i.y+a<t&&(i.y=t-a),i.label._setC("x",i.y),t=i.y+s.right})}}_arrangeLeft(e){if(e){let t=this.labelsContainer.maxWidth();e.sort((i,s)=>i.y<s.y?1:i.y>s.y?-1:0),k(e,i=>{let s=i.label.adjustedLocalBounds(),a=s.right;i.y+a>t&&(i.y=t-a),i.label._setC("x",i.y),t=i.y+s.left})}}_updateSize(){super._updateSize(),this.markDirty()}_updateTick(e){}_dispose(){super._dispose();let e=this.chart;e&&e.series.removeValue(this)}};L.className="PercentSeries";L.classNames=ct.classNames.concat([L.className]);var G=class extends ${constructor(){super(...arguments),this._maxRadius=1}_afterNew(){super._afterNew(),this.seriesContainer.setAll({x:f,y:f})}_processSeries(e){super._processSeries(e),this.series.each(t=>{t._markDirtyKey("innerRadius")})}_prepareChildren(){super._prepareChildren();let e=this.chartContainer,t=e.innerWidth(),i=e.innerHeight(),s=this.get("startAngle",0),a=this.get("endAngle",0),l=this.get("innerRadius"),r=ht(0,0,s,a,1),n=t/(r.right-r.left),u=i/(r.bottom-r.top),o={left:0,right:0,top:0,bottom:0};if(l instanceof gt){let p=l.value,g=Math.min(n,u);p=Math.max(g*p,g-Math.min(i,t))/g,o=ht(0,0,s,a,p),this.setPrivateRaw("irModifyer",p/l.value)}r=dt([r,o]);let m=this._maxRadius;this._maxRadius=Math.min(n,u);let h=C(this.get("radius",0),this._maxRadius);this.seriesContainer.setAll({dy:-h*(r.bottom+r.top)/2,dx:-h*(r.right+r.left)/2}),(this.isDirty("startAngle")||this.isDirty("endAngle")||m!=this._maxRadius)&&this.series.each(p=>{p._markDirtyKey("startAngle")}),(this.isDirty("innerRadius")||this.isDirty("radius"))&&this.series.each(p=>{p._markDirtyKey("innerRadius")})}radius(e){let t=C(this.get("radius",0),this._maxRadius),i=C(this.get("innerRadius",0),t);if(e){let s=this.series.indexOf(e),a=this.series.length,l=e.get("radius");return l!=null?i+C(l,t-i):i+(t-i)/a*(s+1)}return t}innerRadius(e){let t=this.radius(),i=C(this.get("innerRadius",0),t);if(i<0&&(i=t+i),e){let s=this.series.indexOf(e),a=this.series.length,l=e.get("innerRadius");return l!=null?i+C(l,t-i):i+(t-i)/a*s}return i}_updateSize(){super._updateSize(),this.markDirtyKey("radius")}};G.className="PieChart";G.classNames=$.classNames.concat([G.className]);var U=class extends L{_makeSlices(){return new M(W.new({}),()=>vt._new(this._root,{themeTags:R(this.slices.template.get("themeTags",[]),["pie","series"])},[this.slices.template]))}_makeLabels(){return new M(W.new({}),()=>bt._new(this._root,{themeTags:R(this.labels.template.get("themeTags",[]),["pie","series"])},[this.labels.template]))}_makeTicks(){return new M(W.new({}),()=>lt._new(this._root,{themeTags:R(this.ticks.template.get("themeTags",[]),["pie","series"])},[this.ticks.template]))}processDataItem(e){super.processDataItem(e);let t=this.makeSlice(e);t.on("scale",()=>{this._updateTick(e)}),t.on("shiftRadius",()=>{this._updateTick(e)}),t.events.on("positionchanged",()=>{this._updateTick(e)});let i=this.makeLabel(e);i.events.on("positionchanged",()=>{this._updateTick(e)}),this.makeTick(e),t.events.on("positionchanged",()=>{i.markDirty()})}_getNextUp(){let e=this.chart;return e?e._maxRadius:this.labelsContainer.maxHeight()/2}_getNextDown(){let e=this.chart;return e?-e._maxRadius:-this.labelsContainer.maxHeight()/2}_prepareChildren(){super._prepareChildren();let e=this.chart;if(e){if(this.isDirty("alignLabels")){let t=this.labels.template;if(this.get("alignLabels"))t._setC("textType","aligned");else{let i=t.get("textType");(i==null||i=="aligned")&&t._setC("textType","adjusted")}}if(this._valuesDirty||this.isDirty("radius")||this.isDirty("innerRadius")||this.isDirty("startAngle")||this.isDirty("endAngle")||this.isDirty("alignLabels")){this.markDirtyBounds();let t=this.get("startAngle",e.get("startAngle",-90)),s=this.get("endAngle",e.get("endAngle",270))-t,a=t,l=e.radius(this);this.setPrivateRaw("radius",l);let r=e.innerRadius(this)*e.getPrivate("irModifyer",1);r<0&&(r=l+r),k(this._dataItems,n=>{this.updateLegendValue(n);let u=s*n.get("valuePercentTotal")/100,o=n.get("slice");if(o){o.set("radius",l),o.set("innerRadius",r),o.set("startAngle",a),o.set("arc",u);let p=n.get("fill");o._setDefault("fill",p),o._setDefault("stroke",p);let g=n.get("fillPattern");o._setDefault("fillPattern",g)}let m=mt(a+u/2),h=n.get("label");if(h&&(h.setPrivate("radius",l),h.setPrivate("innerRadius",r),h.set("labelAngle",m),h.get("textType")=="aligned")){let p=l+h.get("radius",0),g=l*w(m);m>90&&m<=270?(!h.isHidden()&&!h.isHiding()&&this._lLabels.push({label:h,y:g}),p*=-1,p-=this.labelsContainer.get("paddingLeft",0),h.set("centerX",D),h.setPrivateRaw("left",!0)):(!h.isHidden()&&!h.isHiding()&&this._rLabels.push({label:h,y:g}),p+=this.labelsContainer.get("paddingRight",0),h.set("centerX",0),h.setPrivateRaw("left",!1)),h.set("x",p),h.set("y",l*w(m))}a+=u,this._updateTick(n)})}}}_updateTick(e){let t=e.get("tick"),i=e.get("label"),s=e.get("slice"),a=t.get("location",1);if(t&&i&&s){let l=(s.get("shiftRadius",0)+s.get("radius",0))*s.get("scale",1)*a,r=i.get("labelAngle",0),n=T(r),u=w(r),o=this.labelsContainer,m=o.get("paddingLeft",0),h=o.get("paddingRight",0),p=0,g=0;p=i.x(),g=i.y();let c=[];if(p!=0||g!=0){if(i.get("textType")=="circular"){let y=i.radius()-i.get("paddingBottom",0),x=i.get("labelAngle",0);p=y*T(x),g=y*w(x)}let d=-h;i.getPrivate("left")&&(d=m),c=[{x:s.x()+l*n,y:s.y()+l*u},{x:p+d,y:g},{x:p,y:g}]}t.set("points",c)}}_positionBullet(e){let t=e.get("sprite");if(t){let s=t.dataItem.get("slice");if(s){let a=s.get("innerRadius",0),l=s.get("radius",0),r=s.get("startAngle",0),n=s.get("arc",0),u=e.get("locationX",.5),o=e.get("locationY",.5),m=r+n*u,h=a+(l-a)*o;t.setAll({x:T(m)*h,y:w(m)*h})}}}};U.className="PieSeries";U.classNames=L.classNames.concat([U.className]);var V=class extends q{constructor(){super(...arguments),this._projectionDirty=!1,this._tlx=0,this._tly=0,this._trx=0,this._try=0,this._blx=0,this._bly=0,this._brx=0,this._bry=0,this._cprx=0,this._cplx=0,this._cpry=0,this._cply=0}_afterNew(){super._afterNew(),this.set("draw",e=>{let t=this.width(),i=this.height(),s=Math.min(t,i)/2,a=C(this.get("cornerRadiusTL",0),s),l=C(this.get("cornerRadiusTR",0),s),r=C(this.get("cornerRadiusBR",0),s),n=C(this.get("cornerRadiusBL",0),s),u=this._trx,o=this._try,m=this._tlx,h=this._tly,p=this._brx,g=this._bry,c=this._blx,d=this._bly;o==h&&(o=o-.01),g==d&&(g=g-.01);let y=et({x:m,y:h},{x:u,y:o}),x=et({x:u,y:o},{x:p,y:g}),b=et({x:p,y:g},{x:c,y:d}),_=et({x:c,y:d},{x:m,y:h});this.get("orientation")=="horizontal"?(a=Math.min(a,Math.abs(h-o)/2),l=Math.min(l,Math.abs(h-o)/2),r=Math.min(r,Math.abs(d-g)/2),n=Math.min(n,Math.abs(d-g)/2)):(a=Math.min(a,Math.abs(m-u)/2),l=Math.min(l,Math.abs(m-u)/2),r=Math.min(r,Math.abs(c-p)/2),n=Math.min(n,Math.abs(c-p)/2));let A=m-a*v((y-_)/2)*T(_),P=h-a*v((y-_)/2)*w(_),F=m-a*v((_-y)/2)*T(y),Z=h-a*v((_-y)/2)*w(y),N=u-l*v((x-y)/2)*T(y),nt=o-l*v((x-y)/2)*w(y),B=u-l*v((y-x)/2)*T(x),O=o-l*v((y-x)/2)*w(x),J=p-r*v((b-x)/2)*T(x),j=g-r*v((b-x)/2)*w(x),Q=p-r*v((x-b)/2)*T(b),I=g-r*v((x-b)/2)*w(b),pt=c-n*v((_-b)/2)*T(b),st=d-n*v((_-b)/2)*w(b),ot=c-n*v((b-_)/2)*T(_),Tt=d-n*v((b-_)/2)*w(_);e.moveTo(F,Z),e.lineTo(N,nt),e.arcTo(u,o,B,O,l),e.quadraticCurveTo(this._cprx,this._cpry,J,j),e.arcTo(p,g,Q,I,r),e.lineTo(pt,st),e.arcTo(c,d,ot,Tt,n),e.quadraticCurveTo(this._cplx,this._cply,A,P),e.arcTo(m,h,F,Z,a)})}getPoint(e,t){let i=this.width(),s=this.height(),a=this.get("topWidth",0),l=this.get("bottomWidth",0);if(this.get("orientation")=="vertical"){let r=-a/2,n=a/2,u=l/2,o=-l/2,m=r+(o-r)*t,h=n+(u-n)*t;return{x:m+(h-m)*e,y:s*t}}else{let r=-a/2,n=a/2,u=l/2,o=-l/2,m=r+(o-r)*e,h=n+(u-n)*e;return{x:i*e,y:m+(h-m)*t}}}_changed(){if(this.isDirty("topWidth")||this.isDirty("bottomWidth")||this.isDirty("expandDistance")||this.isDirty("orientation")||this.isDirty("width")||this.isDirty("height")||this.isDirty("cornerRadiusTL")||this.isDirty("cornerRadiusTR")||this.isDirty("cornerRadiusBR")||this.isDirty("cornerRadiusBL")){let e=this.width(),t=this.height(),i=this.get("topWidth",0),s=this.get("bottomWidth",0);this._clear=!0;let a=this.get("expandDistance",0);this.get("orientation")=="vertical"?(this._tlx=-i/2,this._tly=0,this._trx=i/2,this._try=0,this._brx=s/2,this._bry=t,this._blx=-s/2,this._bly=t,this._cprx=this._trx+(this._brx-this._trx)/2+a*t,this._cpry=this._try+.5*t,this._cplx=this._tlx+(this._blx-this._tlx)/2-a*t,this._cply=this._tly+.5*t):(this._tly=i/2,this._tlx=0,this._try=-i/2,this._trx=0,this._bry=-s/2,this._brx=e,this._bly=s/2,this._blx=e,this._cpry=this._try+(this._bry-this._try)/2-a*e,this._cprx=this._trx+.5*e,this._cply=this._tly+(this._bly-this._tly)/2+a*e,this._cplx=this._tlx+.5*e)}super._changed()}};V.className="FunnelSlice";V.classNames=q.classNames.concat([V.className]);var H=class extends L{constructor(){super(...arguments),this._tag="funnel",this.links=this.addDisposer(this._makeLinks()),this._total=0,this._count=0,this._nextCoord=0,this._opposite=!1}_makeSlices(){return new M(W.new({}),()=>V._new(this._root,{themeTags:R(this.slices.template.get("themeTags",[]),[this._tag,"series","slice",this.get("orientation")])},[this.slices.template]))}_makeLabels(){return new M(W.new({}),()=>ft._new(this._root,{themeTags:R(this.labels.template.get("themeTags",[]),[this._tag,"series","label",this.get("orientation")])},[this.labels.template]))}_makeTicks(){return new M(W.new({}),()=>lt._new(this._root,{themeTags:R(this.ticks.template.get("themeTags",[]),[this._tag,"series","tick",this.get("orientation")])},[this.ticks.template]))}_makeLinks(){return new M(W.new({}),()=>V._new(this._root,{themeTags:R(this.links.template.get("themeTags",[]),[this._tag,"series","link",this.get("orientation")])},[this.links.template]))}makeLink(e){let t=this.slicesContainer.children.push(this.links.make());return t._setDataItem(e),e.set("link",t),this.links.push(t),t}_afterNew(){super._afterNew();let e=this.slicesContainer;e.setAll({isMeasured:!0,position:"relative",width:tt(100),height:tt(100)}),e.onPrivate("width",()=>{this.markDirtySize()}),e.onPrivate("height",()=>{this.markDirtySize()}),this.get("orientation")=="vertical"?this._setC("layout",this._root.horizontalLayout):this._setC("layout",this._root.verticalLayout)}processDataItem(e){super.processDataItem(e);let t=this.makeSlice(e);t._setDataItem(e),e.set("slice",t),this.makeLink(e);let i=this.makeLabel(e);i.on("x",()=>{this._updateTick(e)}),i.on("y",()=>{this._updateTick(e)}),this.makeTick(e),t.events.on("positionchanged",()=>{i.markDirty()}),t.events.on("boundschanged",()=>{let s=t.dataItem;s&&this._updateTick(s)})}_updateChildren(){this._opposite=!1,this.children.indexOf(this.labelsContainer)==0&&(this._opposite=!0);let e=0,t=0;if(k(this.dataItems,i=>{let s=i.get("value");Y(s)&&(t++,s>0?e+=Math.abs(i.get("valueWorking",s)/s):this.get("ignoreZeroValues",!1)||i.isHidden()?t--:e+=1)}),this._total=1/t*e,this._count=t,this.isDirty("alignLabels")&&this._fixLayout(),this._total>0&&(this._valuesDirty||this._sizeDirty||this.isDirty("bottomRatio")||this.isDirty("startLocation")||this.isDirty("endLocation"))){let i=this.slicesContainer,s;this.get("orientation")=="vertical"?s=i.innerHeight():s=i.innerWidth(),this._nextCoord=this.get("startLocation",0)*s,this.markDirtyBounds();let a=0;k(this._dataItems,l=>{this.updateLegendValue(l),l.set("index",a),a++;let r=l.get("slice"),n=l.get("tick"),u=l.get("label"),o=l.get("link"),m=l.get("fill"),h=l.get("fillPattern");r._setDefault("fill",m),r._setDefault("stroke",m),r._setDefault("fillPattern",h),o._setDefault("fill",m),o._setDefault("stroke",m);let p=l.get("value");Y(p)&&(p==0&&this.get("ignoreZeroValues")?(r.setPrivate("visible",!1),n.setPrivate("visible",!1),u.setPrivate("visible",!1)):(r.setPrivate("visible",!0),n.setPrivate("visible",!0),u.setPrivate("visible",!0),this.decorateSlice(l),this.isLast(l)?o.setPrivate("visible",!1):l.isHidden()||o.setPrivate("visible",!0)))})}super._updateChildren()}_fixLayout(){let e=this.get("orientation"),t=this.labelsContainer,i=this.labels.template;this.get("alignLabels")?(t._setC("position","relative"),t._setCAll({isMeasured:!0}),e=="vertical"?(this._setC("layout",this._root.horizontalLayout),i._setCAll({centerX:D,x:D})):(this._setC("layout",this._root.verticalLayout),i._setCAll({centerX:0,x:0}))):(t._setCAll({isMeasured:!1,position:"absolute"}),e=="vertical"?(t._setCAll({x:f}),i._setCAll({centerX:f,x:0})):(t._setCAll({y:f}),i._setCAll({centerX:f,y:0}))),this.markDirtySize()}getNextValue(e){let t=e.get("index"),i=e.get("valueWorking",0);if(t<this.dataItems.length-1){let s=this.dataItems[t+1];if(i=s.get("valueWorking",0),s.isHidden()||s.get("value")==0&&this.get("ignoreZeroValues"))return this.getNextValue(s)}return i}isLast(e){let t=e.get("index");if(t==this.dataItems.length-1)return!0;for(let i=t+1;i<this.dataItems.length;i++)if(!this.dataItems[i].isHidden())return!1;return!0}decorateSlice(e){let t=this.get("orientation"),i=e.get("slice"),s=e.get("label"),a=e.get("link"),l=this.slicesContainer,r=l.innerWidth(),n=l.innerHeight(),u=r;t=="horizontal"&&(u=n);let o=this.getNextValue(e),m=e.get("value",0),h=Math.abs(e.get("valueWorking",m)),p=this.get("bottomRatio",0),g=this.getPrivate("valueHigh",0),c=1;m!=0?c=h/Math.abs(m):e.isHidden()&&(c=1e-6),this._nextCoord==1/0&&(this._nextCoord=0);let d=h/g*u,y=(h-(h-o)*p)/g*u;i._setCAll({topWidth:d,bottomWidth:y,orientation:t}),a._setCAll({topWidth:y,bottomWidth:(h-(h-o))/g*u,orientation:t});let x=this.get("startLocation",0),b=this.get("endLocation",1);if(t=="vertical"){let _=a.height()*c;n=n*(b-x)+_,i._setC("y",this._nextCoord);let A=Math.min(1e5,Math.max(0,n/this._count*c/this._total-_));i._setCAll({height:A,x:r/2});let P=this._nextCoord+A/2;s._setC("y",P),this._nextCoord+=A+_,a._setCAll({y:this._nextCoord-_,x:r/2})}else{let _=a.width()*c;r=r*(b-x)+_,i._setC("x",this._nextCoord);let A=Math.min(1e5,Math.max(0,r/this._count*c/this._total-_));i._setCAll({width:A,y:n/2});let P=this._nextCoord+A/2;s._setC("x",P),this._nextCoord+=A+_,a._setCAll({x:this._nextCoord-_,y:n/2})}}hideDataItem(e,t){let i=Object.create(null,{hideDataItem:{get:()=>super.hideDataItem}});return z(this,void 0,void 0,function*(){return e.get("link").hide(t),i.hideDataItem.call(this,e,t)})}showDataItem(e,t){let i=Object.create(null,{showDataItem:{get:()=>super.showDataItem}});return z(this,void 0,void 0,function*(){return e.get("link").show(t),i.showDataItem.call(this,e,t)})}_updateTick(e){if(this.get("alignLabels")){let t=e.get("tick"),i=e.get("label"),s=e.get("slice");if(t&&s&&i){let a=this.labelsContainer,l=this.slicesContainer,r=t.get("location",.5),n=a.width(),u=a.height(),o=a.get("paddingLeft",0),m=a.get("paddingRight",0),h=a.get("paddingTop",0),p=a.get("paddingBottom",0),g={x:0,y:0},c={x:0,y:0},d={x:0,y:0};this._opposite&&(r=1-r),this.get("orientation")=="vertical"?(g=s.getPoint(r,.5),g.x+=s.x()+l.x(),g.y+=s.y()+l.y(),this._opposite?(c.x=n,c.y=i.y(),d.x=n-o,d.y=c.y):(c.x=l.x()+l.width(),c.y=i.y(),d.x=c.x+n-i.width()-m,d.y=c.y)):(g=s.getPoint(.5,r),g.x+=s.x()+l.x(),g.y+=s.y()+l.y(),this._opposite?(c.y=u,c.x=i.x(),d.y=u-h,d.x=c.x):(c.y=l.y()+l.height(),c.x=i.x(),d.y=c.y+u-i.height()-p,d.x=c.x)),t.set("points",[g,c,d])}}}disposeDataItem(e){super.disposeDataItem(e);let t=e.get("link");t&&(this.links.removeValue(t),t.dispose())}_positionBullet(e){let t=e.get("sprite");if(t){let s=t.dataItem.get("slice");if(s){let a=s.getPoint(e.get("locationX",.5),e.get("locationY",.5));t.setAll({x:s.x()+a.x,y:s.y()+a.y})}}}};H.className="FunnelSeries";H.classNames=L.classNames.concat([H.className]);var X=class extends H{constructor(){super(...arguments),this._tag="pyramid"}_prepareChildren(){super._prepareChildren(),this._nextSize=void 0,(this.isDirty("topWidth")||this.isDirty("bottomWidth")||this.isDirty("valueIs"))&&(this._valuesDirty=!0)}decorateSlice(e){let t=this.get("orientation"),i=this.slicesContainer,s=e.get("slice"),a=e.get("label"),l=e.get("link"),r=this.get("valueIs","area"),n=this.getPrivate("valueAbsoluteSum",0);if(n==0)return;let u=this.get("startLocation",0),o=this.get("endLocation",1),m=this.get("topWidth",0),h=this.get("bottomWidth",D),p=Math.abs(e.get("valueWorking",0)),g=e.get("value",0),c,d,y=i.innerHeight(),x=i.innerWidth(),b=l.width(),_=l.height();t=="horizontal"&&([x,y]=[y,x],[b,_]=[_,b]);let A=x/2,P=1;g!=0?P=p/Math.abs(g):e.isHidden()&&(P=1e-6),_*=P,y=y*(o-u)-_*(this._count*this._total-1);let F=C(m,x);Y(this._nextSize)||(this._nextSize=F);let Z=C(h,x),N=this._nextSize,nt=Math.atan2(y,F-Z),B=Math.tan(Math.PI/2-nt);if(B==0&&(B=1e-8),r=="area"){let st=(F+Z)/2*y*p/n,ot=Math.abs(N*N-2*st*B);c=(N-Math.sqrt(ot))/B,c>0?d=(2*st-c*N)/c:d=N}else c=y*p/n,d=N-c*B;let O=this._nextCoord+c/2,J=A,j=this._nextCoord,Q=A,I=j+c;t=="vertical"?(a.set("y",O),a.get("opacity")>0&&this._rLabels.push({label:a,y:O}),s.set("height",c)):(a.set("x",O),a.get("opacity")>0&&this._hLabels.push({label:a,y:O}),[J,j]=[j,J],[Q,I]=[I,Q],s.set("width",c)),s.setAll({orientation:t,bottomWidth:d,topWidth:N,x:J,y:j}),l.setAll({orientation:t,x:Q,y:I,topWidth:d,bottomWidth:d}),this._nextSize=d,this._nextCoord+=c+_}};X.className="PyramidSeries";X.classNames=H.classNames.concat([X.className]);var K=class extends X{constructor(){super(...arguments),this._tag="pictorial",this.seriesMask=q.new(this._root,{position:"absolute",x:f,y:f,centerX:f,centerY:f}),this.seriesGraphics=this.slicesContainer.children.push(q.new(this._root,{themeTags:["pictorial","background"],position:"absolute",x:f,y:f,centerX:f,centerY:f})._markC("themeTags","position","x","y","centerX","centerY"))}_afterNew(){super._afterNew(),this._setC("topWidth",D),this._setC("bottomWidth",D),this._setC("valueIs","height"),this.slicesContainer._setC("mask",this.seriesMask)}_updateScale(){let e=this.slicesContainer,t=e.innerWidth(),i=e.innerHeight(),s=this.seriesMask,a=this.seriesGraphics,l=s.get("scale",1),r=s.localBounds(),n=r.right-r.left,u=r.bottom-r.top;this.get("orientation")=="horizontal"?l=t/n:l=i/u,l!=1/0&&!Number.isNaN(l)&&(s.set("scale",l),s.set("x",t/2),s.set("y",i/2),a._setC("scale",l),a._setC("x",t/2),a._setC("y",i/2))}_prepareChildren(){if(super._prepareChildren(),this.isDirty("svgPath")){let e=this.get("svgPath");this.seriesMask.set("svgPath",e),this.seriesGraphics._setC("svgPath",e)}this._updateScale()}};K.className="PictorialStackedSeries";K.classNames=X.classNames.concat([K.className]);var E=class extends ${_afterNew(){super._afterNew(),this.seriesContainer.setAll({isMeasured:!0,layout:this._root.horizontalLayout})}};E.className="SlicedChart";E.classNames=$.classNames.concat([E.className]);export{it as DefaultTheme,H as FunnelSeries,V as FunnelSlice,$ as PercentChart,L as PercentSeries,K as PictorialStackedSeries,G as PieChart,U as PieSeries,X as PyramidSeries,E as SlicedChart};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import c from"./HIFWGQCW.js";import{a as r}from"./UNPUCYYB.js";import b from"./C2HB2U6P.js";import{a as p}from"./OCZ5FM6Y.js";import{a as f}from"./5JADSW57.js";import"./JD74LG7K.js";import"./XSCEZHHS.js";import"./UVNNXZHK.js";import"./QUZTFUWM.js";import"./XPEGBUNJ.js";import"./XURWCCLX.js";import{N as d,V as h,a as u,b as a}from"./GFTZ7EZP.js";import"./H6RQVSYM.js";export default $arcgis.t(([{stripHTML:y},{formatNumber:I,substitute:_},{watch:v},{a:m},g])=>{var F=u`:host{background-color:var(--calcite-color-surface-2)}.feature-observer{position:relative;bottom:var(--calcite-space-2xl);z-index:2;text-align:center}.header{calcite-block{margin-block-start:calc(var(--calcite-size-3xs) * -1.5);margin-inline:calc(var(--calcite-size-xs) * -1)}}.header>*{margin-block-end:var(--calcite-size-3xs)}.header>:last-child{color:var(--calcite-color-text-3)}.heading-content{display:flex;align-items:center;calcite-icon{margin-inline-end:var(--calcite-size-3xs)}}.list-container{display:flex;flex-direction:column;min-height:var(--calcite-space-3xl);calcite-fab{align-self:center;margin-block:var(--calcite-space-md)}}`;function L(c){let{percentAlong:t}=c;return t==null?"":I(t,{style:"percent",maximumFractionDigits:2})}async function A(c){let t=c.attributes,e=m(c)?c.sourceLayer:void 0,i=c.origin,s=i&&"layer"in i?i.layer:e??c.layer;if(!t||!s)return"";if("getFeatureTitle"in s)return await s.getFeatureTitle(c);let n="displayField"in s?s.displayField:null,o=n!=null?t[n.toString()]:null;return o!=null&&typeof o!="string"&&(o=o.toString()),o||c.getObjectId()?.toString()||""}function $(c){let{associationType:t}=c;return t==="connectivity"||t==="junction-edge-from-connectivity"||t==="junction-edge-midspan-connectivity"||t==="junction-edge-to-connectivity"||t==="junction-junction-connectivity"}function x(c){return c.associationType==="junction-edge-midspan-connectivity"}var l=class extends g{constructor(){super(...arguments),this._messagesFeature=f({name:"feature",blocking:!0}),this.#e=0,this.#t=!1,this._filteredItemCount=0,this.addAssociation=()=>{},this.headingLevel=5,this.hideAssociationDetails=!1,this.selectAssociatedFeature=async()=>{},this.selectAssociatedLayer=()=>{},this.topLayerDisabled=!1}static{this.properties={_featureTitle:16,_filteredItemCount:16,_featureInfosPage:16,_featureInfos:16,addAssociation:0,associatedFeatureCount:32,associationInput:0,headingLevel:9,hideAssociationDetails:5,selectAssociatedFeature:0,selectAssociatedLayer:0,topLayerDisabled:5}}static{this.styles=F}#e;#t;get _featureInfosPage(){return this._featureInfos.slice(0,this.endIndex)}get _featureInfos(){let t=this.associationInput?.associatedFeatures;return t?t.toArray():[]}get associatedFeatureCount(){return this._featureInfos.length}loaded(){super.loaded(),this.manager.onLifecycle(()=>[v(()=>[this.associationInput,this.associationInput?.associationFeature,this.associationInput?.featureItem?.label],()=>{this.#n()},{initial:!0}),v(()=>this.associationInput?.updating??!1,t=>this.state=t?"querying":"ready",{initial:!0})])}#s(t){let e=t.activeAssociationType?.type;if(!e)return;let{attachment:i,connectivity:s,container:n,content:o,structure:b}=this._messages.associationTypes;switch(e){case"attachment":return i;case"connectivity":return s;case"container":return n;case"content":return o;case"structure":return b;default:return}}#i(t){return`association-${t.association.globalId}`}#a(t){this._filteredItemCount=t?this.associatedFeatureCount:0}async#c(t){if(!this.#t){this.#t=!0;try{await this.selectAssociatedFeature({feature:t.feature,association:t.association})}finally{this.#t=!1}}}async#n(){let{associationInput:t}=this,e=++this.#e;if(!t?.associationFeature||t.featureItem?.label){this._featureTitle=void 0;return}let i=await A(t.associationFeature);e===this.#e&&(this._featureTitle=i)}#o(t){let e=t.title||this._messagesCommon.untitled,i=this.#i(t),s=x(t.association),n=s?L(t.association):"";return r(i,a`<calcite-list-item .description=${y(t.terminalName??"")} .label=${y(e)} @calciteListItemSelect=${()=>this.#c(t)}>${$(t.association)?this._renderConnectivityIcon(t.association.associationType,i):null}${s?a`<calcite-chip .label=${n} scale=s slot=content-end>${n}</calcite-chip>`:null}<calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon></calcite-list-item>`)}#r(){let t=this._featureInfosPage,e=t.map(s=>this.#h(s)),i=t.map(s=>this.#o(s));return[...e,...i]}#l(t){let e=this.#s(t)??"",i=t.featureItem?.label||this._featureTitle||"";return a`<calcite-block .description=${e} .heading=${i}></calcite-block>`}#u(t,e){return a`${this.#d(t,e)}<div class="list-container">${this._renderFeatureCountWarning()}${r(`associated-features-list-${e.id}`,a`<calcite-list filter-enabled .filterLabel=${this._messages.associationFilterPlaceholder} .filterPlaceholder=${this._messages.associationFilterPlaceholder} .label=${this._messages.associatedFeatures} @calciteListFilter=${i=>this._filteredItemCount=i.currentTarget?.filteredItems.length} ${d(this.#a)}>${this.#r()}${this._renderFeatureObserver()}</calcite-list>`)}</div>`}#d(t,e){return a`<div class="header">${this.hideAssociationDetails?null:this.#l(t)}${this.#p(e)}${this.#g(e)}</div>`}#h(t){let{tooltipReferenceMap:e}=this,i=this.#i(t);return $(t.association)?r(`tooltip-${i}`,a`<calcite-tooltip overlay-positioning=fixed .referenceElement=${e.get(i)} .topLayerDisabled=${this.topLayerDisabled}>${this.getConnectivityTooltip(t.association.associationType)}</calcite-tooltip>`):null}#m(t,e){let{associatedFeatureInfos:i}=t,s=i.get(e)?.length??0;return r(`${e.id}-show-all`,a`<calcite-list-item expanded .label=${e.title??this._messagesCommon.untitled} .value=${e.id} @calciteListItemSelect=${()=>this.selectAssociatedLayer({layer:e})}><calcite-chip .label=${s.toString()} scale=s slot=content-end>${s}</calcite-chip><calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon></calcite-list-item>`)}#f(t){let{associatedFeatureInfos:e,associationFeature:i,editable:s}=t;return i?a`<div class="list-container"><calcite-list .label=${this._messages.associatedLayers}>${Array.from(e.keys(),n=>this.#m(t,n))}</calcite-list>${s?a`<calcite-fab appearance=outline-fill icon=plus kind=neutral .text=${this._messagesCommon.add} text-enabled @click=${()=>this.addAssociation({feature:i,associationType:t.activeAssociationType,utilityNetwork:t.utilityNetwork})}></calcite-fab>`:void 0}</div>`:null}#p(t){return t.title?r("title",p({level:this.headingLevel,children:a`<div class="heading-content"><calcite-icon icon=layer></calcite-icon>${t.title}</div>`})):null}#g(t){let e=_(this._messagesFeature?.numberRecords,{number:this._filteredItemCount});return r(t.id,a`<div>${e}</div>`)}render(){let{associationInput:t}=this;if(!t)return a`<div></div>`;let{associatedLayer:e}=t;return t.updating?a`<div>${this._renderLoading()}</div>`:e?a`<div>${this.#u(t,e)}</div>`:a`<div>${this.#f(t)}</div>`}};h("arcgis-feature-form-utility-network-association-list",l);return l},"applications/Components/stringUtils","intl","core/reactiveUtils",b,c)
2
+ import c from"./HIFWGQCW.js";import{a as r}from"./UNPUCYYB.js";import b from"./TMJX7DFH.js";import{a as p}from"./OCZ5FM6Y.js";import{a as f}from"./5JADSW57.js";import"./JD74LG7K.js";import"./XSCEZHHS.js";import"./UVNNXZHK.js";import"./QUZTFUWM.js";import"./XPEGBUNJ.js";import"./XURWCCLX.js";import{N as d,V as h,a as u,b as a}from"./GFTZ7EZP.js";import"./H6RQVSYM.js";export default $arcgis.t(([{stripHTML:y},{formatNumber:I,substitute:_},{watch:v},{a:m},g])=>{var F=u`:host{background-color:var(--calcite-color-surface-2)}.feature-observer{position:relative;bottom:var(--calcite-space-2xl);z-index:2;text-align:center}.header{calcite-block{margin-block-start:calc(var(--calcite-size-3xs) * -1.5);margin-inline:calc(var(--calcite-size-xs) * -1)}}.header>*{margin-block-end:var(--calcite-size-3xs)}.header>:last-child{color:var(--calcite-color-text-3)}.heading-content{display:flex;align-items:center;calcite-icon{margin-inline-end:var(--calcite-size-3xs)}}.list-container{display:flex;flex-direction:column;min-height:var(--calcite-space-3xl);calcite-fab{align-self:center;margin-block:var(--calcite-space-md)}}`;function L(c){let{percentAlong:t}=c;return t==null?"":I(t,{style:"percent",maximumFractionDigits:2})}async function A(c){let t=c.attributes,e=m(c)?c.sourceLayer:void 0,i=c.origin,s=i&&"layer"in i?i.layer:e??c.layer;if(!t||!s)return"";if("getFeatureTitle"in s)return await s.getFeatureTitle(c);let n="displayField"in s?s.displayField:null,o=n!=null?t[n.toString()]:null;return o!=null&&typeof o!="string"&&(o=o.toString()),o||c.getObjectId()?.toString()||""}function $(c){let{associationType:t}=c;return t==="connectivity"||t==="junction-edge-from-connectivity"||t==="junction-edge-midspan-connectivity"||t==="junction-edge-to-connectivity"||t==="junction-junction-connectivity"}function x(c){return c.associationType==="junction-edge-midspan-connectivity"}var l=class extends g{constructor(){super(...arguments),this._messagesFeature=f({name:"feature",blocking:!0}),this.#e=0,this.#t=!1,this._filteredItemCount=0,this.addAssociation=()=>{},this.headingLevel=5,this.hideAssociationDetails=!1,this.selectAssociatedFeature=async()=>{},this.selectAssociatedLayer=()=>{},this.topLayerDisabled=!1}static{this.properties={_featureTitle:16,_filteredItemCount:16,_featureInfosPage:16,_featureInfos:16,addAssociation:0,associatedFeatureCount:32,associationInput:0,headingLevel:9,hideAssociationDetails:5,selectAssociatedFeature:0,selectAssociatedLayer:0,topLayerDisabled:5}}static{this.styles=F}#e;#t;get _featureInfosPage(){return this._featureInfos.slice(0,this.endIndex)}get _featureInfos(){let t=this.associationInput?.associatedFeatures;return t?t.toArray():[]}get associatedFeatureCount(){return this._featureInfos.length}loaded(){super.loaded(),this.manager.onLifecycle(()=>[v(()=>[this.associationInput,this.associationInput?.associationFeature,this.associationInput?.featureItem?.label],()=>{this.#n()},{initial:!0}),v(()=>this.associationInput?.updating??!1,t=>this.state=t?"querying":"ready",{initial:!0})])}#s(t){let e=t.activeAssociationType?.type;if(!e)return;let{attachment:i,connectivity:s,container:n,content:o,structure:b}=this._messages.associationTypes;switch(e){case"attachment":return i;case"connectivity":return s;case"container":return n;case"content":return o;case"structure":return b;default:return}}#i(t){return`association-${t.association.globalId}`}#a(t){this._filteredItemCount=t?this.associatedFeatureCount:0}async#c(t){if(!this.#t){this.#t=!0;try{await this.selectAssociatedFeature({feature:t.feature,association:t.association})}finally{this.#t=!1}}}async#n(){let{associationInput:t}=this,e=++this.#e;if(!t?.associationFeature||t.featureItem?.label){this._featureTitle=void 0;return}let i=await A(t.associationFeature);e===this.#e&&(this._featureTitle=i)}#o(t){let e=t.title||this._messagesCommon.untitled,i=this.#i(t),s=x(t.association),n=s?L(t.association):"";return r(i,a`<calcite-list-item .description=${y(t.terminalName??"")} .label=${y(e)} @calciteListItemSelect=${()=>this.#c(t)}>${$(t.association)?this._renderConnectivityIcon(t.association.associationType,i):null}${s?a`<calcite-chip .label=${n} scale=s slot=content-end>${n}</calcite-chip>`:null}<calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon></calcite-list-item>`)}#r(){let t=this._featureInfosPage,e=t.map(s=>this.#h(s)),i=t.map(s=>this.#o(s));return[...e,...i]}#l(t){let e=this.#s(t)??"",i=t.featureItem?.label||this._featureTitle||"";return a`<calcite-block .description=${e} .heading=${i}></calcite-block>`}#u(t,e){return a`${this.#d(t,e)}<div class="list-container">${this._renderFeatureCountWarning()}${r(`associated-features-list-${e.id}`,a`<calcite-list filter-enabled .filterLabel=${this._messages.associationFilterPlaceholder} .filterPlaceholder=${this._messages.associationFilterPlaceholder} .label=${this._messages.associatedFeatures} @calciteListFilter=${i=>this._filteredItemCount=i.currentTarget?.filteredItems.length} ${d(this.#a)}>${this.#r()}${this._renderFeatureObserver()}</calcite-list>`)}</div>`}#d(t,e){return a`<div class="header">${this.hideAssociationDetails?null:this.#l(t)}${this.#p(e)}${this.#g(e)}</div>`}#h(t){let{tooltipReferenceMap:e}=this,i=this.#i(t);return $(t.association)?r(`tooltip-${i}`,a`<calcite-tooltip overlay-positioning=fixed .referenceElement=${e.get(i)} .topLayerDisabled=${this.topLayerDisabled}>${this.getConnectivityTooltip(t.association.associationType)}</calcite-tooltip>`):null}#m(t,e){let{associatedFeatureInfos:i}=t,s=i.get(e)?.length??0;return r(`${e.id}-show-all`,a`<calcite-list-item expanded .label=${e.title??this._messagesCommon.untitled} .value=${e.id} @calciteListItemSelect=${()=>this.selectAssociatedLayer({layer:e})}><calcite-chip .label=${s.toString()} scale=s slot=content-end>${s}</calcite-chip><calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon></calcite-list-item>`)}#f(t){let{associatedFeatureInfos:e,associationFeature:i,editable:s}=t;return i?a`<div class="list-container"><calcite-list .label=${this._messages.associatedLayers}>${Array.from(e.keys(),n=>this.#m(t,n))}</calcite-list>${s?a`<calcite-fab appearance=outline-fill icon=plus kind=neutral .text=${this._messagesCommon.add} text-enabled @click=${()=>this.addAssociation({feature:i,associationType:t.activeAssociationType,utilityNetwork:t.utilityNetwork})}></calcite-fab>`:void 0}</div>`:null}#p(t){return t.title?r("title",p({level:this.headingLevel,children:a`<div class="heading-content"><calcite-icon icon=layer></calcite-icon>${t.title}</div>`})):null}#g(t){let e=_(this._messagesFeature?.numberRecords,{number:this._filteredItemCount});return r(t.id,a`<div>${e}</div>`)}render(){let{associationInput:t}=this;if(!t)return a`<div></div>`;let{associatedLayer:e}=t;return t.updating?a`<div>${this._renderLoading()}</div>`:e?a`<div>${this.#u(t,e)}</div>`:a`<div>${this.#f(t)}</div>`}};h("arcgis-feature-form-utility-network-association-list",l);return l},"applications/Components/stringUtils","intl","core/reactiveUtils",b,c)