@esri/solutions-components 5.1.0-next.124 → 5.1.0-next.127

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (237) hide show
  1. package/dist/cdn/{EWUZF57U.js → 232XXYVJ.js} +1 -1
  2. package/dist/cdn/{Y6ZWXE53.js → 23LRX7AS.js} +1 -1
  3. package/dist/cdn/{Z25OUDBP.js → 23SGJQLW.js} +1 -1
  4. package/dist/cdn/2KSXH2TC.js +2 -0
  5. package/dist/cdn/3JZVI5AM.js +7 -0
  6. package/dist/cdn/{C7SMCM7E.js → 3UJAJDSF.js} +1 -1
  7. package/dist/cdn/{A4RZESK7.js → 3UKDJZ2D.js} +2 -2
  8. package/dist/cdn/{JR5GBFT2.js → 4V4CR63B.js} +1 -1
  9. package/dist/cdn/{ZV6TCDGB.js → 4Z6UJJJR.js} +1 -1
  10. package/dist/cdn/4ZUE6R22.js +2 -0
  11. package/dist/cdn/5AAG5ERI.js +2 -0
  12. package/dist/cdn/{6GSCRFFW.js → 5GHZQ66V.js} +1 -1
  13. package/dist/cdn/5U2GHXOV.js +2 -0
  14. package/dist/cdn/5UIJ4Z3C.js +2 -0
  15. package/dist/cdn/{6RTR35JT.js → 5XDPNTYE.js} +1 -1
  16. package/dist/cdn/6ID6N5BF.js +2 -0
  17. package/dist/cdn/6IMLSV3Z.js +2 -0
  18. package/dist/cdn/{K5MMGZY2.js → 6Q52JBZW.js} +1 -1
  19. package/dist/cdn/{4MAZNAHZ.js → 6SSQ6MIC.js} +1 -1
  20. package/dist/cdn/{KZBWKZOC.js → 74XF7DBP.js} +1 -1
  21. package/dist/cdn/75WQ7UGJ.js +2 -0
  22. package/dist/cdn/7CGCLEYB.js +2 -0
  23. package/dist/cdn/{SH72A5PB.js → 7V57GR4X.js} +1 -1
  24. package/dist/cdn/{D66IBZZA.js → 7ZKKR7QO.js} +1 -1
  25. package/dist/cdn/AL7O7ZB2.js +3 -0
  26. package/dist/cdn/{MYPJ63EE.js → ANVT6ANQ.js} +1 -1
  27. package/dist/cdn/{GWSB6X4X.js → AOJP5RQ6.js} +1 -1
  28. package/dist/cdn/{XQQ52NKX.js → AYSQIO6L.js} +1 -1
  29. package/dist/cdn/{WGEHABGS.js → B33EUN4X.js} +1 -1
  30. package/dist/cdn/BLCW2CZO.js +2 -0
  31. package/dist/cdn/{3WKKIXVT.js → BOSEAFVW.js} +1 -1
  32. package/dist/cdn/{CGFMGQ3A.js → BROZWKD5.js} +1 -1
  33. package/dist/cdn/CB7QDBRG.js +2 -0
  34. package/dist/cdn/CEWRVOKP.js +2 -0
  35. package/dist/cdn/{MOK7GNOH.js → CWXZSWUA.js} +1 -1
  36. package/dist/cdn/D4FRUAT3.js +2 -0
  37. package/dist/cdn/DQ7NBBUU.js +2 -0
  38. package/dist/cdn/{D5Y4JMF7.js → E4ZB3BPD.js} +1 -1
  39. package/dist/cdn/E5X2RW5Y.js +109 -0
  40. package/dist/cdn/{KGECA3WE.js → EDZIFJZR.js} +1 -1
  41. package/dist/cdn/{NYWKJJKK.js → EIF4KZBD.js} +1 -1
  42. package/dist/cdn/{B6Y3RA4F.js → ENG5BCAV.js} +1 -1
  43. package/dist/cdn/EOSKMSMP.js +2 -0
  44. package/dist/cdn/{RH47YGDG.js → EVZXWT6K.js} +1 -1
  45. package/dist/cdn/EXC566PM.js +2 -0
  46. package/dist/cdn/FOTFZKKU.js +2 -0
  47. package/dist/cdn/FTY7YPLA.js +88 -0
  48. package/dist/cdn/FW2HWQC7.js +2 -0
  49. package/dist/cdn/{MGAKD4WY.js → GDDMG3Q4.js} +1 -1
  50. package/dist/cdn/{BRBOVJ3Q.js → GPL6FNKN.js} +1 -1
  51. package/dist/cdn/{DUDZ4BGI.js → GSD6O5J7.js} +1 -1
  52. package/dist/cdn/{SSF6ST7U.js → H4YPSJ5G.js} +1 -1
  53. package/dist/cdn/{TTOCCH2K.js → H7J2FXMS.js} +1 -1
  54. package/dist/cdn/{C5QZMZX7.js → HEI6GMZN.js} +1 -1
  55. package/dist/cdn/{AZ4JB3M3.js → HJW2JW4G.js} +1 -1
  56. package/dist/cdn/HO4GBQJG.js +2 -0
  57. package/dist/cdn/HT2HC33W.js +2 -0
  58. package/dist/cdn/{IHKF4AMV.js → HYLQNC4V.js} +3 -3
  59. package/dist/cdn/HZOBBQYW.js +431 -0
  60. package/dist/cdn/ICSHJV2N.js +2 -0
  61. package/dist/cdn/IFI66PVI.js +2 -0
  62. package/dist/cdn/{YFXSWGXE.js → IHG7KTNC.js} +1 -1
  63. package/dist/cdn/IP3VJ34C.js +4 -0
  64. package/dist/cdn/IV7RVOFY.js +56 -0
  65. package/dist/cdn/{3UIIZPJJ.js → IYQGIBWM.js} +1 -1
  66. package/dist/cdn/{JFJRHOAG.js → KCTWFRCW.js} +1 -1
  67. package/dist/cdn/{F64NVBUS.js → KEOBSFBN.js} +1 -1
  68. package/dist/cdn/{N2KSPEVT.js → LP2JYX4X.js} +1 -1
  69. package/dist/cdn/{C4IFGE7P.js → MDNGEZ2V.js} +1 -1
  70. package/dist/cdn/{XVMCFCUH.js → MEDCFXMB.js} +1 -1
  71. package/dist/cdn/{X6JL6SAH.js → MOH6GREK.js} +1 -1
  72. package/dist/cdn/MURYADCX.js +2 -0
  73. package/dist/cdn/{JBNWEBAG.js → N22MFQSQ.js} +1 -1
  74. package/dist/cdn/N5D5ABJ6.js +2 -0
  75. package/dist/cdn/{5HZMUGQD.js → N7BXCDA3.js} +1 -1
  76. package/dist/cdn/{SGJY2CP3.js → ODB4CELR.js} +1 -1
  77. package/dist/cdn/PZW6JMSM.js +2 -0
  78. package/dist/cdn/{5MVIKBSS.js → QF2IXVAT.js} +1 -1
  79. package/dist/cdn/{CQRK2NYK.js → QJICQ4W3.js} +1 -1
  80. package/dist/cdn/QNRKGTZT.js +121 -0
  81. package/dist/cdn/{GIANH6D4.js → R3C2X4CM.js} +1 -1
  82. package/dist/cdn/{DKB6JTUF.js → RKZXRHZK.js} +1 -1
  83. package/dist/cdn/RPEQD2MH.js +2 -0
  84. package/dist/cdn/{SMNWKCWR.js → RXM4BHPK.js} +1 -1
  85. package/dist/cdn/S5F6KJQM.js +18 -0
  86. package/dist/cdn/SFFLZSAY.js +2 -0
  87. package/dist/cdn/SSH4MSHE.js +2 -0
  88. package/dist/cdn/{BQVD2BBH.js → SSZBIVTK.js} +1 -1
  89. package/dist/cdn/{EZ4DX2MW.js → TFTW5B3R.js} +1 -1
  90. package/dist/cdn/{I74AIIHN.js → TIF36KTA.js} +1 -1
  91. package/dist/cdn/TV3ZHJ7B.js +2 -0
  92. package/dist/cdn/{U6JZYJ4D.js → UM3P3Q52.js} +1 -1
  93. package/dist/cdn/{WH2NFOMH.js → UUHDVB24.js} +5 -5
  94. package/dist/cdn/UY5JVVRO.js +2 -0
  95. package/dist/cdn/VEDAG7UO.js +2 -0
  96. package/dist/cdn/VFBFI3KQ.js +2 -0
  97. package/dist/cdn/{BXOH6SN4.js → VTI5LEQY.js} +1 -1
  98. package/dist/cdn/W5FWW67G.js +2 -0
  99. package/dist/cdn/{RB3YU5TX.js → WA3BLQHA.js} +1 -1
  100. package/dist/cdn/{JEEUSHAF.js → X73XP424.js} +1 -1
  101. package/dist/cdn/XC3IZAIH.js +2 -0
  102. package/dist/cdn/{3FOUGCWY.js → XDZPQACK.js} +1 -1
  103. package/dist/cdn/XGODSNWZ.js +2 -0
  104. package/dist/cdn/{UNKHKP5I.js → YJCH2NIS.js} +1 -1
  105. package/dist/cdn/{A4NILC27.js → YKM2YRZP.js} +1 -1
  106. package/dist/cdn/{FBRYBN7J.js → YMLQXXAS.js} +1 -1
  107. package/dist/cdn/{JUUVYK2H.js → YQHYMLC7.js} +1 -1
  108. package/dist/cdn/{Y3CYPNEY.js → YWXDNRE2.js} +1 -1
  109. package/dist/cdn/{E4GB5Z4R.js → ZNWZWFMH.js} +1 -1
  110. package/dist/cdn/{DGUS2OKW.js → ZS3UOY5Q.js} +1 -1
  111. package/dist/cdn/{5VDDAINK.js → ZX3UHK6P.js} +1 -1
  112. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ar.json +1 -1
  113. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.bg.json +1 -1
  114. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.bs.json +1 -1
  115. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ca.json +1 -1
  116. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.cs.json +1 -1
  117. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.da.json +1 -1
  118. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.de.json +1 -1
  119. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.el.json +1 -1
  120. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.en.json +1 -1
  121. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.es.json +1 -1
  122. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.et.json +1 -1
  123. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.fi.json +1 -1
  124. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.fr.json +1 -1
  125. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.he.json +1 -1
  126. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.hr.json +1 -1
  127. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.hu.json +1 -1
  128. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.id.json +1 -1
  129. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.it.json +1 -1
  130. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ja.json +1 -1
  131. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.json +1 -1
  132. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ko.json +1 -1
  133. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.lt.json +1 -1
  134. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.lv.json +1 -1
  135. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.nl.json +1 -1
  136. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.no.json +1 -1
  137. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.pl.json +1 -1
  138. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.pt-BR.json +1 -1
  139. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.pt-PT.json +1 -1
  140. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ro.json +1 -1
  141. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ru.json +1 -1
  142. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sk.json +1 -1
  143. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sl.json +1 -1
  144. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sr.json +1 -1
  145. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sv.json +1 -1
  146. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.th.json +1 -1
  147. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.tr.json +1 -1
  148. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.uk.json +1 -1
  149. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.vi.json +1 -1
  150. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.zh-CN.json +1 -1
  151. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.zh-HK.json +1 -1
  152. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.zh-TW.json +1 -1
  153. package/dist/cdn/assets/solution-details-panel/t9n/messages.en.json +1 -1
  154. package/dist/cdn/assets/solution-details-panel/t9n/messages.json +1 -1
  155. package/dist/cdn/assets/solutions-deploy-app/t9n/messages.en.json +1 -1
  156. package/dist/cdn/assets/solutions-deploy-app/t9n/messages.json +1 -1
  157. package/dist/cdn/index.js +1 -1
  158. package/dist/chunks/Auth.js +163 -71
  159. package/dist/chunks/CardsFetcher.js +3 -2
  160. package/dist/chunks/getRelatedInfos.js +1 -1
  161. package/dist/chunks/helpers.js +24 -20
  162. package/dist/chunks/interfaces.js +152 -141
  163. package/dist/chunks/solution-deploy-dialog.js +24 -18
  164. package/dist/chunks/solutions-deploy-app-nav.js +4 -5
  165. package/dist/components/arcgis-solutions-assistant/customElement.js +681 -57987
  166. package/dist/components/consent-manager/customElement.js +23 -3598
  167. package/dist/components/solution-builder-assistant/customElement.d.ts +8 -2
  168. package/dist/components/solution-builder-assistant/customElement.js +30 -23
  169. package/dist/components/solution-builder-assistant/index.js +1 -1
  170. package/dist/components/solution-configure-titles/customElement.js +63 -61
  171. package/dist/components/solution-delete-dialog/customElement.js +17 -14
  172. package/dist/components/solution-deployed-card/customElement.js +2 -3
  173. package/dist/components/solution-deployed-card-panel/customElement.d.ts +7 -0
  174. package/dist/components/solution-deployed-card-panel/customElement.js +34 -32
  175. package/dist/components/solution-deployed-card-panel/index.js +1 -0
  176. package/dist/components/solution-details-panel/customElement.d.ts +7 -4
  177. package/dist/components/solution-details-panel/customElement.js +115 -180
  178. package/dist/components/solution-snapshot-gallery/customElement.js +2 -1
  179. package/dist/components/solution-social-share/customElement.js +2 -2
  180. package/dist/components/solution-user-avatar/customElement.js +1 -1
  181. package/dist/components/solutions-deploy-app/customElement.d.ts +4 -0
  182. package/dist/components/solutions-deploy-app/customElement.js +14 -11
  183. package/dist/components/solutions-deploy-app-nav/customElement.js +2 -3
  184. package/dist/components/solutions-deployed-list/customElement.js +7 -6
  185. package/dist/docs/api.json +1 -1
  186. package/dist/docs/docs.json +1 -1
  187. package/dist/docs/vscode.html-custom-data.json +1 -1
  188. package/dist/docs/web-types.json +1 -1
  189. package/dist/loader.js +3 -3
  190. package/dist/solutions-components_commit.txt +5 -8
  191. package/dist/types/lumina.d.ts +3 -3
  192. package/dist/types/preact.d.ts +3 -3
  193. package/dist/types/react.d.ts +3 -3
  194. package/dist/types/stencil.d.ts +3 -3
  195. package/dist/utils/Auth.d.ts +11 -0
  196. package/package.json +11 -6
  197. package/dist/cdn/2V4C3U3A.js +0 -2
  198. package/dist/cdn/3RUVSQ7E.js +0 -2
  199. package/dist/cdn/4FZ44STD.js +0 -2
  200. package/dist/cdn/52KL2BJB.js +0 -2
  201. package/dist/cdn/5DS6TJ6G.js +0 -2
  202. package/dist/cdn/5ZIXJCIR.js +0 -18
  203. package/dist/cdn/62PVXXRD.js +0 -2
  204. package/dist/cdn/7JUP4GFU.js +0 -2
  205. package/dist/cdn/7UERL2R2.js +0 -2
  206. package/dist/cdn/7WKV6M26.js +0 -2
  207. package/dist/cdn/BKZZ625R.js +0 -2
  208. package/dist/cdn/BWYFMFIB.js +0 -423
  209. package/dist/cdn/CQKON2YR.js +0 -2
  210. package/dist/cdn/F2J3FYTD.js +0 -2
  211. package/dist/cdn/GVEIFIEZ.js +0 -2
  212. package/dist/cdn/H5WTVMPJ.js +0 -2
  213. package/dist/cdn/HNZAE56I.js +0 -2
  214. package/dist/cdn/HQJ25PBT.js +0 -2
  215. package/dist/cdn/IF52R2FM.js +0 -2
  216. package/dist/cdn/IOKTYFKK.js +0 -7
  217. package/dist/cdn/IRRMUFW7.js +0 -2
  218. package/dist/cdn/JFKCARWJ.js +0 -2
  219. package/dist/cdn/K7QUGRWR.js +0 -4
  220. package/dist/cdn/MN3KMBU6.js +0 -2
  221. package/dist/cdn/MNZJP3PW.js +0 -2
  222. package/dist/cdn/MPZE3IV4.js +0 -2
  223. package/dist/cdn/QKKYYRVF.js +0 -2
  224. package/dist/cdn/QTV6GN3W.js +0 -2
  225. package/dist/cdn/QVJAIVT4.js +0 -2
  226. package/dist/cdn/RPEBBYE4.js +0 -2
  227. package/dist/cdn/RXFNNWEJ.js +0 -2
  228. package/dist/cdn/SBLN3F4Y.js +0 -2
  229. package/dist/cdn/STWIOVJR.js +0 -2
  230. package/dist/cdn/TUQVCY7T.js +0 -2
  231. package/dist/cdn/UM4ITZ4R.js +0 -2
  232. package/dist/cdn/VFEROJ77.js +0 -2
  233. package/dist/cdn/VL4OP3CF.js +0 -2
  234. package/dist/cdn/YNOD3Q5G.js +0 -2
  235. package/dist/cdn/ZPT5ISDK.js +0 -2
  236. package/dist/chunks/common.js +0 -26
  237. package/dist/chunks/get.js +0 -387
@@ -1,13 +1,82 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import * as o from "@esri/solution-common";
3
- import n from "@arcgis/core/identity/IdentityManager.js";
4
- import h from "@arcgis/core/identity/OAuthInfo.js";
5
- import c from "@arcgis/core/portal/Portal.js";
6
- import { i as p, r as u } from "./helpers.js";
7
- class f {
8
- constructor(t, e, r, s) {
9
- this._credential = void 0, this._isEnterprise = !1, this._locale = "en", this._portalSubset = void 0, this._portalUserSubset = void 0, this._arcGISOnlineReachable = !0, this._searchArcGISOnlineEnabled = !0, this._signInParam = void 0, this._clientId = t ?? "", this._locale = r ?? "en", this._portalUrl = e ?? "https://www.arcgis.com", this._portalRestUrl = this._portalUrl + "/sharing/rest", this._portalUrl = location.origin.endsWith(".arcgis.com") ? window.location.origin : this._portalUrl, this._signInParam = s;
10
- const i = new h({
2
+ import * as l from "@esri/solution-common";
3
+ import { request as p, getWorkflowBaseURL as d, getWorkflowManagerAuthorized as g } from "@esri/solution-common";
4
+ import c from "@arcgis/core/identity/IdentityManager.js";
5
+ import _ from "@arcgis/core/identity/OAuthInfo.js";
6
+ import U from "@arcgis/core/portal/Portal.js";
7
+ import { b as f, i as S, s as m } from "./helpers.js";
8
+ import { E as h, g as u } from "./interfaces.js";
9
+ async function I(i, e, t) {
10
+ let r = t;
11
+ return i && (i?.IsEnterprisePortal && await w(
12
+ "",
13
+ // the portal url
14
+ e
15
+ ) && r.push(h.NOTEBOOK), await f(e) ? t.push(h.VELOCITY) : i?.PortalUserPrivileges && [
16
+ u.VELOCITYFEEDS,
17
+ u.VELOCITYBIGDATA,
18
+ u.VELOCITYREALTIME
19
+ ].forEach((n) => {
20
+ const a = t.indexOf(n) || -1;
21
+ a !== -1 && t.splice(a, 1);
22
+ }), r = r.concat(
23
+ b(
24
+ A(i),
25
+ O(i)
26
+ )
27
+ ), r = r.concat(v(i)), r = r.concat(await P(i))), Promise.resolve(r);
28
+ }
29
+ function b(i, e) {
30
+ let t = [];
31
+ return i && e ? t = [
32
+ h.TRACKINGADMINANDTRACKING,
33
+ h.TRACKINGADMIN,
34
+ h.TRACKING
35
+ ] : i && !e ? t = [h.TRACKINGADMIN] : !i && e && (t = [h.TRACKING]), t;
36
+ }
37
+ function v(i) {
38
+ return R(
39
+ i
40
+ ) ? [h.HUBPREMIUM] : [];
41
+ }
42
+ async function P(i) {
43
+ const e = i?.RestUserSession;
44
+ if (!e?.username)
45
+ return [];
46
+ const t = await d(e);
47
+ return await g(t, e) ? [h.WORKFLOW] : [];
48
+ }
49
+ async function w(i, e) {
50
+ const t = i + "/sharing/rest", r = {
51
+ authentication: e,
52
+ portal: t,
53
+ params: {
54
+ f: "json"
55
+ }
56
+ };
57
+ return p(`${t}/portals/self/servers`, r).then((s) => s?.servers?.find((o) => o.serverFunction.indexOf("NotebookServer") > -1), (s) => (console.error(s), !1));
58
+ }
59
+ function A(i) {
60
+ const e = i?.PortalUserSubset?.privileges, t = [
61
+ "portal:admin:create",
62
+ "portal:admin:delete",
63
+ "portal:admin:update",
64
+ "portal:admin:reassign"
65
+ ];
66
+ return e ? t.every(
67
+ (r) => e.some((s) => s.startsWith(r))
68
+ ) : !1;
69
+ }
70
+ function O(i) {
71
+ return i?.PortalSubset?.locationTrackingEnabled || !1;
72
+ }
73
+ function R(i) {
74
+ return i?.PortalSubset?.hubPremiumEnabled || !1;
75
+ }
76
+ class T {
77
+ constructor(e, t, r, s) {
78
+ this._credential = void 0, this._isEnterprise = !1, this._locale = "en", this._portalSubset = void 0, this._portalUserSubset = void 0, this._portalUserEnrichedPrivileges = void 0, this._arcGISOnlineReachable = !0, this._searchArcGISOnlineEnabled = !0, this._signInParam = void 0, this._clientId = e ?? "", this._locale = r ?? "en", this._portalUrl = t ?? "https://www.arcgis.com", this._portalRestUrl = this._portalUrl + "/sharing/rest", this._portalUrl = location.origin.endsWith(".arcgis.com") ? window.location.origin : this._portalUrl, this._signInParam = s;
79
+ const o = new _({
11
80
  appId: this._clientId,
12
81
  locale: this._locale,
13
82
  popup: !1,
@@ -16,11 +85,11 @@ class f {
16
85
  preserveUrlHash: !0
17
86
  });
18
87
  try {
19
- n.registerOAuthInfos([i]);
20
- } catch (a) {
21
- console.log(a);
88
+ c.registerOAuthInfos([o]);
89
+ } catch (n) {
90
+ console.log(n);
22
91
  }
23
- this._portal = new c({ url: this._portalUrl });
92
+ this._portal = new U({ url: this._portalUrl });
24
93
  }
25
94
  get Credential() {
26
95
  return this._credential;
@@ -50,8 +119,21 @@ class f {
50
119
  return this._portalUserSubset;
51
120
  }
52
121
  get PortalUserPrivileges() {
53
- let t = [];
54
- return this._portalUserSubset?.privileges && (t = this._portalUserSubset.privileges), t;
122
+ let e = [];
123
+ return this._portalUserSubset?.privileges && (e = this._portalUserSubset.privileges), e;
124
+ }
125
+ /**
126
+ * Enriched user privileges, pre-computed once at sign-in.
127
+ *
128
+ * Includes the base portal privileges plus custom solution-specific
129
+ * privileges (Velocity, Notebook Server, Hub Premium, Location Tracking,
130
+ * Workflow Manager) that would otherwise require additional network
131
+ * requests each time a solution details page is opened. Falls back to
132
+ * the base portal privileges if enrichment hasn't completed yet (e.g.,
133
+ * during sign-in or for anonymous sessions).
134
+ */
135
+ get PortalUserEnrichedPrivileges() {
136
+ return this._portalUserEnrichedPrivileges ?? this.PortalUserPrivileges;
55
137
  }
56
138
  get SignInParam() {
57
139
  return this._signInParam;
@@ -63,8 +145,8 @@ class f {
63
145
  return this.PortalUserPrivileges.includes("portal:admin:updateItems");
64
146
  }
65
147
  get CanUseAI() {
66
- const t = this._portalSubset?.orgSettings, e = this.PortalUserPrivileges.includes("portal:user:useAIAssistants");
67
- return t?.aiAssistantsEnabled ? t.aiAssistantsEnabled && !t.blockBetaApps && e : !1;
148
+ const e = this._portalSubset?.orgSettings, t = this.PortalUserPrivileges.includes("portal:user:useAIAssistants");
149
+ return e?.aiAssistantsEnabled ? e.aiAssistantsEnabled && !e.blockBetaApps && t : !1;
68
150
  }
69
151
  get CanViewOrg() {
70
152
  return this.PortalUserPrivileges.includes("portal:admin:viewItems");
@@ -73,25 +155,25 @@ class f {
73
155
  return this._searchArcGISOnlineEnabled && this._arcGISOnlineReachable;
74
156
  }
75
157
  /** Checks if the ArcGIS Online group is reachable for Enterprise portals. */
76
- async checkArcGISOnlineReachability(t) {
77
- if (this._isEnterprise && this._searchArcGISOnlineEnabled && t) {
78
- const r = `${p(this._portalUrl)}/sharing/rest`, s = new o.UserSession({});
158
+ async checkArcGISOnlineReachability(e) {
159
+ if (this._isEnterprise && this._searchArcGISOnlineEnabled && e) {
160
+ const r = `${S(this._portalUrl)}/sharing/rest`, s = new l.UserSession({});
79
161
  try {
80
- await o.searchItems({
81
- q: `group:${t} type:Solution`,
162
+ await l.searchItems({
163
+ q: `group:${e} type:Solution`,
82
164
  num: 1,
83
165
  start: 1,
84
166
  authentication: s,
85
167
  portal: r
86
168
  }), this._arcGISOnlineReachable = !0;
87
- } catch (i) {
88
- this._arcGISOnlineReachable = !1, console.warn("ArcGIS Online solutions group not reachable:", i);
169
+ } catch (o) {
170
+ this._arcGISOnlineReachable = !1, console.warn("ArcGIS Online solutions group not reachable:", o);
89
171
  }
90
172
  }
91
173
  }
92
174
  get RestUserSession() {
93
- const t = n.findServerInfo(this._portalRestUrl), e = this._credential ? o.UserSession.fromCredential(this._credential, t) : this._isEnterprise ? new o.UserSession({}) : new o.UserSession({ portal: this._portalRestUrl });
94
- return e.portal = this.PortalSubset?.restUrl ? this.PortalSubset?.restUrl : e.portal, e.clientId = this._credential?._oAuthCred?.appId, e._refreshToken = this._credential?._oAuthCred?.refreshToken, e;
175
+ const e = c.findServerInfo(this._portalRestUrl), t = this._credential ? l.UserSession.fromCredential(this._credential, e) : this._isEnterprise ? new l.UserSession({}) : new l.UserSession({ portal: this._portalRestUrl });
176
+ return t.portal = this.PortalSubset?.restUrl ? this.PortalSubset?.restUrl : t.portal, t.clientId = this._credential?._oAuthCred?.appId, t._refreshToken = this._credential?._oAuthCred?.refreshToken, t;
95
177
  }
96
178
  /**
97
179
  * Initializes the Auth object. This method must be called before any other Auth methods.
@@ -99,16 +181,16 @@ class f {
99
181
  *
100
182
  * @returns Promise that resolves with the initialized Auth object
101
183
  */
102
- async initialize(t = !1, e) {
184
+ async initialize(e = !1, t) {
103
185
  try {
104
- await this._init(t, e);
186
+ await this._init(e, t);
105
187
  } catch {
106
188
  this.destroy();
107
189
  }
108
190
  return this;
109
191
  }
110
192
  destroy() {
111
- this._credential = void 0, this._portalSubset = void 0, this._portalUserSubset = void 0, n.destroyCredentials();
193
+ this._credential = void 0, this._portalSubset = void 0, this._portalUserSubset = void 0, c.destroyCredentials();
112
194
  }
113
195
  /**
114
196
  * Signs into app and refreshes the window.location or switches to the supplied URL.
@@ -116,19 +198,19 @@ class f {
116
198
  * @param signInParamValue If supplied, the parameter `signInParam` with the supplied value
117
199
  * will be added to the redirect uri's search params
118
200
  */
119
- async signIn(t = "") {
120
- n.setOAuthRedirectionHandler((e) => {
121
- const r = e.authorizeParams.redirect_uri;
122
- if (t.length > 0) {
123
- const s = r.split("?"), i = s[0];
124
- let a = "";
125
- const l = new URLSearchParams(s[1] || "");
126
- l.append("signInParam", t), a = "?" + l.toString(), e.authorizeParams.redirect_uri = i + a;
201
+ async signIn(e = "") {
202
+ c.setOAuthRedirectionHandler((t) => {
203
+ const r = t.authorizeParams.redirect_uri;
204
+ if (e.length > 0) {
205
+ const s = r.split("?"), o = s[0];
206
+ let n = "";
207
+ const a = new URLSearchParams(s[1] || "");
208
+ a.append("signInParam", e), n = "?" + a.toString(), t.authorizeParams.redirect_uri = o + n;
127
209
  }
128
- window.location.href = e.authorizeUrl + "?" + this._objectToQuery(e.authorizeParams);
129
- }), await n.getCredential((this._portalSubset?.portalUrl ?? this._portalUrl) + "/sharing").then(
130
- (e) => {
131
- e && window.location.reload();
210
+ window.location.href = t.authorizeUrl + "?" + this._objectToQuery(t.authorizeParams);
211
+ }), await c.getCredential((this._portalSubset?.portalUrl ?? this._portalUrl) + "/sharing").then(
212
+ (t) => {
213
+ t && window.location.reload();
132
214
  }
133
215
  );
134
216
  }
@@ -142,19 +224,19 @@ class f {
142
224
  * on the resources page they should stay on that page
143
225
  */
144
226
  signOut() {
145
- const t = window.location.href, e = /[\/]\b([0-9A-Fa-f]){32}\b/g;
146
- let r = t.match(e) ? t.replace(e, "") : t;
147
- r = u(r, "sortField", "suggested");
148
- const i = `${this._portal?.restUrl ?? this._portalUrl + "/sharing/rest"}/oauth2/signout?client_id=${this._clientId}&redirect_uri=${encodeURIComponent(r)}`;
149
- this.destroy(), window.location.replace(i);
227
+ const e = window.location.href, t = /[\/]\b([0-9A-Fa-f]){32}\b/g;
228
+ let r = e.match(t) ? e.replace(t, "") : e;
229
+ r = m(r, "sortField", "suggested");
230
+ const o = `${this._portal?.restUrl ?? this._portalUrl + "/sharing/rest"}/oauth2/signout?client_id=${this._clientId}&redirect_uri=${encodeURIComponent(r)}`;
231
+ this.destroy(), window.location.replace(o);
150
232
  }
151
233
  /**
152
234
  * Refreshes the user session token
153
235
  */
154
236
  refreshSession() {
155
- const t = this.RestUserSession;
156
- if (!(!t || !this.IsSignedIn))
157
- return t.exchangeRefreshToken();
237
+ const e = this.RestUserSession;
238
+ if (!(!e || !this.IsSignedIn))
239
+ return e.exchangeRefreshToken();
158
240
  }
159
241
  // ---------------------------------------------------------------------------------------------------------------- //
160
242
  /**
@@ -164,29 +246,29 @@ class f {
164
246
  * @param portalCustomBaseUrl The custom base URL for the portal.
165
247
  * @returns
166
248
  */
167
- _getOrgUrl(t, e, r) {
168
- return e && r ? window.location.protocol + "//" + e.toLowerCase() + "." + r : t;
249
+ _getOrgUrl(e, t, r) {
250
+ return t && r ? window.location.protocol + "//" + t.toLowerCase() + "." + r : e;
169
251
  }
170
252
  /**
171
253
  * Initializes the Auth object. This method must be called before any other Auth methods.
172
254
  * If the user is not authorized to use the app, the page will be redirected to an error page.
173
255
  * @returns Promise that resolves with the initialized Auth object
174
256
  */
175
- async _init(t = !1, e) {
257
+ async _init(e = !1, t) {
176
258
  try {
177
- this._credential = await n.checkSignInStatus(this._portalUrl + "/sharing");
259
+ this._credential = await c.checkSignInStatus(this._portalUrl + "/sharing");
178
260
  } catch (s) {
179
261
  console.log(s);
180
262
  }
181
263
  try {
182
- const s = await n.checkAppAccess(this._portalUrl + "/sharing", this._clientId);
264
+ const s = await c.checkAppAccess(this._portalUrl + "/sharing", this._clientId);
183
265
  (typeof s.valid < "u" && !s.valid || s.viewOnlyUserTypeApp) && window.location.replace(`error.html?error=blocked&locale=${this._locale}`), this._credential = s.credential;
184
266
  } catch (s) {
185
267
  s.name;
186
268
  }
187
- this._searchArcGISOnlineEnabled = await this._checkSearchArcGISOnlineEnabled(t, this._portal.restUrl), this._portal.authMode = t ? "immediate" : "auto", await this._portal.load();
188
- const r = this._credential ? await o.getOrganizationSettings(this.RestUserSession) : {};
189
- return this._isEnterprise = this._portal.isPortal, await this.checkArcGISOnlineReachability(e), this._portalSubset = {
269
+ this._searchArcGISOnlineEnabled = await this._checkSearchArcGISOnlineEnabled(e, this._portal.restUrl), this._portal.authMode = e ? "immediate" : "auto", await this._portal.load();
270
+ const r = this._credential ? await l.getOrganizationSettings(this.RestUserSession) : {};
271
+ if (this._isEnterprise = this._portal.isPortal, await this.checkArcGISOnlineReachability(t), this._portalSubset = {
190
272
  name: this._portal.name ?? "",
191
273
  id: this._portal.id ?? "",
192
274
  restUrl: this._portal.restUrl ?? "",
@@ -208,15 +290,25 @@ class f {
208
290
  privileges: this._portal.user.privileges,
209
291
  role: this._portal.user?.role ?? "",
210
292
  roleId: this._portal.user?.roleId ?? void 0
211
- }, this._isEnterprise && this._portalSubset && (this._portalSubset.workflowURL = await o.getWorkflowEnterpriseServerRootURL(
293
+ }, this._isEnterprise && this._portalSubset && (this._portalSubset.workflowURL = await l.getWorkflowEnterpriseServerRootURL(
212
294
  this._portal.restUrl,
213
- this.RestUserSession || new o.UserSession({})
214
- )), this._portal?.user?.roleId && this._portalUserSubset && (this._portalUserSubset.roleId = this._portal.user.roleId), this;
295
+ this.RestUserSession || new l.UserSession({})
296
+ )), this._portal?.user?.roleId && this._portalUserSubset && (this._portalUserSubset.roleId = this._portal.user.roleId), this._credential && this._portalUserSubset)
297
+ try {
298
+ this._portalUserEnrichedPrivileges = await I(
299
+ this,
300
+ this.RestUserSession,
301
+ [...this._portalUserSubset.privileges]
302
+ );
303
+ } catch (s) {
304
+ console.warn("Failed to enrich user privileges during sign-in:", s), this._portalUserEnrichedPrivileges = [...this._portalUserSubset.privileges];
305
+ }
306
+ return this;
215
307
  }
216
- async _checkSearchArcGISOnlineEnabled(t, e) {
217
- if (t)
308
+ async _checkSearchArcGISOnlineEnabled(e, t) {
309
+ if (e)
218
310
  try {
219
- const r = `${e}/portals/self/settings`, s = await o.request(r, {
311
+ const r = `${t}/portals/self/settings`, s = await l.request(r, {
220
312
  authentication: this._credential ? this.RestUserSession : void 0
221
313
  });
222
314
  return s?.portalConfigProperties?.searchArcGISOnlineEnabled !== void 0 ? s.portalConfigProperties.searchArcGISOnlineEnabled : !1;
@@ -232,8 +324,8 @@ class f {
232
324
  * This function checks if the object has a `toJSON` method, which is a
233
325
  * @returns Boolean indicating whether the object is serializable.
234
326
  */
235
- _isSerializable(t) {
236
- return t && typeof t == "object" && "toJSON" in t && typeof t.toJSON == "function";
327
+ _isSerializable(e) {
328
+ return e && typeof e == "object" && "toJSON" in e && typeof e.toJSON == "function";
237
329
  }
238
330
  /**
239
331
  * Converts a hashmap of query parameters to a query string. Following formatting rules applies:
@@ -268,16 +360,16 @@ class f {
268
360
  *
269
361
  * Copied from function exported in arcgis-js-api but not added to JSAPI.
270
362
  */
271
- _objectToQuery(t, e) {
272
- return t ? e && typeof e == "function" ? Object.keys(t).map((r) => encodeURIComponent(r) + "=" + encodeURIComponent(e(r, t[r]))).join("&") : Object.keys(t).map((r) => {
273
- const s = t[r];
363
+ _objectToQuery(e, t) {
364
+ return e ? t && typeof t == "function" ? Object.keys(e).map((r) => encodeURIComponent(r) + "=" + encodeURIComponent(t(r, e[r]))).join("&") : Object.keys(e).map((r) => {
365
+ const s = e[r];
274
366
  if (s == null)
275
367
  return "";
276
- const i = encodeURIComponent(r) + "=", a = e && e[r];
277
- return a ? i + encodeURIComponent(a(s)) : Array.isArray(s) ? s.map((l) => this._isSerializable(l) ? i + encodeURIComponent(JSON.stringify(l)) : i + encodeURIComponent(l)).join("&") : this._isSerializable(s) ? i + encodeURIComponent(JSON.stringify(s)) : i + encodeURIComponent(s);
368
+ const o = encodeURIComponent(r) + "=", n = t && t[r];
369
+ return n ? o + encodeURIComponent(n(s)) : Array.isArray(s) ? s.map((a) => this._isSerializable(a) ? o + encodeURIComponent(JSON.stringify(a)) : o + encodeURIComponent(a)).join("&") : this._isSerializable(s) ? o + encodeURIComponent(JSON.stringify(s)) : o + encodeURIComponent(s);
278
370
  }).filter((r) => r).join("&") : "";
279
371
  }
280
372
  }
281
373
  export {
282
- f as A
374
+ T as A
283
375
  };
@@ -2,7 +2,8 @@
2
2
  import { s as p, a as A, e as d } from "./cardsHelpers.js";
3
3
  import * as c from "@esri/solution-common";
4
4
  import { i as D, o as v, d as E, m as b, h as I, e as J } from "./helpers.js";
5
- class M {
5
+ import "@esri/arcgis-rest-portal";
6
+ class j {
6
7
  /**
7
8
  * Constructor
8
9
  *
@@ -283,5 +284,5 @@ class M {
283
284
  }
284
285
  }
285
286
  export {
286
- M as C
287
+ j as C
287
288
  };
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import { C as D } from "./interfaces.js";
2
+ import { G as D } from "./interfaces.js";
3
3
  import { getItemRelatedItems as g } from "@esri/solution-common";
4
4
  async function R(o, r) {
5
5
  const s = await h(r, o);
@@ -40,20 +40,23 @@ function g(e) {
40
40
  const t = e ? e.replace("https://", "").replace("www.", "") : "";
41
41
  return t.endsWith("devext.arcgis.com") || t.endsWith("mapsqa.arcgis.com") || t.endsWith("qaext.arcgis.com") ? e ?? "https://www.arcgis.com" : "https://www.arcgis.com";
42
42
  }
43
- function w(e, t, r) {
43
+ function w(e) {
44
+ return e?.authentication?.PortalSubset?.isReadOnly === !0;
45
+ }
46
+ function h(e, t, r) {
44
47
  return t.some((n) => n.wkid === e ? (r = n.defaultExtent, !0) : !1), r;
45
48
  }
46
- function h(e, t) {
49
+ function y(e, t) {
47
50
  return i(t || e);
48
51
  }
49
- function y(e, t = "en") {
52
+ function v(e, t = "en") {
50
53
  return new Intl.DateTimeFormat(t, {
51
54
  year: "numeric",
52
55
  month: "long",
53
56
  day: "numeric"
54
57
  }).format(e);
55
58
  }
56
- function v(e, t) {
59
+ function k(e, t) {
57
60
  let r = "";
58
61
  return e.some((n) => n.startsWith(t) ? (r = n.substring(t.length), !0) : !1), r;
59
62
  }
@@ -61,7 +64,7 @@ function i(e) {
61
64
  const t = e.replace("www.", "");
62
65
  return t.endsWith("devext.arcgis.com") ? "dev" : t.endsWith("mapsqa.arcgis.com") || t.endsWith("qaext.arcgis.com") ? "qa" : t === "arcgis.com" || t.endsWith(".arcgis.com") ? "prod" : "dev";
63
66
  }
64
- function k(e, t) {
67
+ function S(e, t) {
65
68
  let r = e?.reduce((n, s) => (n.indexOf(s.id) < 0 && n.push(s.id), n), []) || [];
66
69
  return t ? r.sort((n, s) => t.indexOf(n) - t.indexOf(s)) : r;
67
70
  }
@@ -78,7 +81,7 @@ function I(e) {
78
81
  suggested: "Suggested for you"
79
82
  }[e] || e;
80
83
  }
81
- function S(e) {
84
+ function E(e) {
82
85
  if (!e)
83
86
  return "Unknown error";
84
87
  if (e.message)
@@ -90,7 +93,7 @@ function S(e) {
90
93
  return e.toString();
91
94
  }
92
95
  }
93
- function E(e) {
96
+ function b(e) {
94
97
  return e ? parseFloat(((Date.now() - e) / 1e3).toFixed(2)) : 0;
95
98
  }
96
99
  function x(e, t) {
@@ -101,7 +104,7 @@ function W(e) {
101
104
  detail: e
102
105
  }));
103
106
  }
104
- function b(e, t) {
107
+ function q(e, t) {
105
108
  const r = new Set(
106
109
  e.filter((n) => n.dependencyItemId !== t).map((n) => `${n.controlItemId}|${n.dependencyItemId}`)
107
110
  );
@@ -110,7 +113,7 @@ function b(e, t) {
110
113
  return { controlItemId: s, dependencyItemId: o };
111
114
  });
112
115
  }
113
- function q(e) {
116
+ function U(e) {
114
117
  return e.sort((t, r) => {
115
118
  const n = t.typeKeywords?.find((o) => o.startsWith("solutionversion-"))?.split("-")[1] || "unknown", s = r.typeKeywords?.find((o) => o.startsWith("solutionversion-"))?.split("-")[1] || "unknown";
116
119
  return n === "unknown" || s === "unknown" ? n === "unknown" ? 1 : -1 : s.localeCompare(n, void 0, { numeric: !0 });
@@ -119,22 +122,23 @@ function q(e) {
119
122
  export {
120
123
  l as a,
121
124
  d as b,
122
- E as c,
125
+ b as c,
123
126
  f as d,
124
127
  c as e,
125
128
  W as f,
126
- S as g,
129
+ E as g,
127
130
  p as h,
128
131
  g as i,
129
- w as j,
130
- k,
131
- h as l,
132
- y as m,
132
+ h as j,
133
+ S as k,
134
+ y as l,
135
+ v as m,
133
136
  I as n,
134
- v as o,
135
- b as p,
137
+ k as o,
138
+ q as p,
136
139
  x as q,
137
- m as r,
138
- q as s,
139
- D as t
140
+ w as r,
141
+ m as s,
142
+ U as t,
143
+ D as u
140
144
  };