@esri/solutions-components 5.1.0-next.143 → 5.1.0-next.144

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 (135) hide show
  1. package/dist/cdn/{E5E6J57F.js → 5YXQ4UXZ.js} +26 -26
  2. package/dist/cdn/{P67K4TAX.js → 65L2LQGD.js} +1 -1
  3. package/dist/cdn/{ILLTWR2W.js → CGCNGFBL.js} +1 -1
  4. package/dist/cdn/{FYT4Q5GJ.js → FE2GEHNL.js} +1 -1
  5. package/dist/cdn/LYK2CASU.js +2 -0
  6. package/dist/cdn/{U3CNAJQZ.js → YLC2EM5A.js} +1 -1
  7. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.ar.json +1 -1
  8. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.bg.json +1 -1
  9. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.bs.json +1 -1
  10. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.ca.json +1 -1
  11. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.cs.json +1 -1
  12. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.da.json +1 -1
  13. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.de.json +1 -1
  14. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.el.json +1 -1
  15. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.es.json +1 -1
  16. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.et.json +1 -1
  17. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.fi.json +1 -1
  18. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.fr.json +1 -1
  19. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.he.json +1 -1
  20. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.hr.json +1 -1
  21. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.hu.json +1 -1
  22. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.id.json +1 -1
  23. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.it.json +1 -1
  24. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.ja.json +1 -1
  25. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.ko.json +1 -1
  26. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.lt.json +1 -1
  27. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.lv.json +1 -1
  28. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.nl.json +1 -1
  29. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.no.json +1 -1
  30. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.pl.json +1 -1
  31. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.pt-BR.json +1 -1
  32. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.pt-PT.json +1 -1
  33. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.ro.json +1 -1
  34. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.ru.json +1 -1
  35. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.sk.json +1 -1
  36. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.sl.json +1 -1
  37. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.sr.json +1 -1
  38. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.sv.json +1 -1
  39. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.th.json +1 -1
  40. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.tr.json +1 -1
  41. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.uk.json +1 -1
  42. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.vi.json +1 -1
  43. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.zh-CN.json +1 -1
  44. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.zh-HK.json +1 -1
  45. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.zh-TW.json +1 -1
  46. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ar.json +1 -1
  47. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.bg.json +1 -1
  48. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.bs.json +1 -1
  49. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ca.json +1 -1
  50. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.cs.json +1 -1
  51. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.da.json +1 -1
  52. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.de.json +1 -1
  53. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.el.json +1 -1
  54. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.es.json +1 -1
  55. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.et.json +1 -1
  56. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.fi.json +1 -1
  57. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.fr.json +1 -1
  58. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.he.json +1 -1
  59. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.hr.json +1 -1
  60. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.hu.json +1 -1
  61. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.id.json +1 -1
  62. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.it.json +1 -1
  63. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ja.json +1 -1
  64. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ko.json +1 -1
  65. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.lt.json +1 -1
  66. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.lv.json +1 -1
  67. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.nl.json +1 -1
  68. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.no.json +1 -1
  69. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.pl.json +1 -1
  70. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.pt-BR.json +1 -1
  71. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.pt-PT.json +1 -1
  72. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ro.json +1 -1
  73. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ru.json +1 -1
  74. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sk.json +1 -1
  75. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sl.json +1 -1
  76. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sr.json +1 -1
  77. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sv.json +1 -1
  78. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.th.json +1 -1
  79. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.tr.json +1 -1
  80. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.uk.json +1 -1
  81. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.vi.json +1 -1
  82. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.zh-CN.json +1 -1
  83. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.zh-HK.json +1 -1
  84. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.zh-TW.json +1 -1
  85. package/dist/cdn/assets/solution-deployed-card/t9n/messages.ar.json +1 -1
  86. package/dist/cdn/assets/solution-deployed-card/t9n/messages.bg.json +1 -1
  87. package/dist/cdn/assets/solution-deployed-card/t9n/messages.bs.json +1 -1
  88. package/dist/cdn/assets/solution-deployed-card/t9n/messages.ca.json +1 -1
  89. package/dist/cdn/assets/solution-deployed-card/t9n/messages.cs.json +1 -1
  90. package/dist/cdn/assets/solution-deployed-card/t9n/messages.da.json +1 -1
  91. package/dist/cdn/assets/solution-deployed-card/t9n/messages.de.json +1 -1
  92. package/dist/cdn/assets/solution-deployed-card/t9n/messages.el.json +1 -1
  93. package/dist/cdn/assets/solution-deployed-card/t9n/messages.es.json +1 -1
  94. package/dist/cdn/assets/solution-deployed-card/t9n/messages.et.json +1 -1
  95. package/dist/cdn/assets/solution-deployed-card/t9n/messages.fi.json +1 -1
  96. package/dist/cdn/assets/solution-deployed-card/t9n/messages.fr.json +1 -1
  97. package/dist/cdn/assets/solution-deployed-card/t9n/messages.he.json +1 -1
  98. package/dist/cdn/assets/solution-deployed-card/t9n/messages.hr.json +1 -1
  99. package/dist/cdn/assets/solution-deployed-card/t9n/messages.hu.json +1 -1
  100. package/dist/cdn/assets/solution-deployed-card/t9n/messages.id.json +1 -1
  101. package/dist/cdn/assets/solution-deployed-card/t9n/messages.it.json +1 -1
  102. package/dist/cdn/assets/solution-deployed-card/t9n/messages.ja.json +1 -1
  103. package/dist/cdn/assets/solution-deployed-card/t9n/messages.ko.json +1 -1
  104. package/dist/cdn/assets/solution-deployed-card/t9n/messages.lt.json +1 -1
  105. package/dist/cdn/assets/solution-deployed-card/t9n/messages.lv.json +1 -1
  106. package/dist/cdn/assets/solution-deployed-card/t9n/messages.nl.json +1 -1
  107. package/dist/cdn/assets/solution-deployed-card/t9n/messages.no.json +1 -1
  108. package/dist/cdn/assets/solution-deployed-card/t9n/messages.pl.json +1 -1
  109. package/dist/cdn/assets/solution-deployed-card/t9n/messages.pt-BR.json +1 -1
  110. package/dist/cdn/assets/solution-deployed-card/t9n/messages.pt-PT.json +1 -1
  111. package/dist/cdn/assets/solution-deployed-card/t9n/messages.ro.json +1 -1
  112. package/dist/cdn/assets/solution-deployed-card/t9n/messages.ru.json +1 -1
  113. package/dist/cdn/assets/solution-deployed-card/t9n/messages.sk.json +1 -1
  114. package/dist/cdn/assets/solution-deployed-card/t9n/messages.sl.json +1 -1
  115. package/dist/cdn/assets/solution-deployed-card/t9n/messages.sr.json +1 -1
  116. package/dist/cdn/assets/solution-deployed-card/t9n/messages.sv.json +1 -1
  117. package/dist/cdn/assets/solution-deployed-card/t9n/messages.th.json +1 -1
  118. package/dist/cdn/assets/solution-deployed-card/t9n/messages.tr.json +1 -1
  119. package/dist/cdn/assets/solution-deployed-card/t9n/messages.uk.json +1 -1
  120. package/dist/cdn/assets/solution-deployed-card/t9n/messages.vi.json +1 -1
  121. package/dist/cdn/assets/solution-deployed-card/t9n/messages.zh-CN.json +1 -1
  122. package/dist/cdn/assets/solution-deployed-card/t9n/messages.zh-HK.json +1 -1
  123. package/dist/cdn/assets/solution-deployed-card/t9n/messages.zh-TW.json +1 -1
  124. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.en.json +1 -1
  125. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.json +1 -1
  126. package/dist/cdn/index.js +1 -1
  127. package/dist/chunks/solution-builder-assistant.js +9 -10
  128. package/dist/components/arcgis-solutions-assistant/customElement.js +197 -205
  129. package/dist/components/arcgis-solutions-assistant/index.js +1 -1
  130. package/dist/docs/api.json +1 -1
  131. package/dist/docs/docs.json +1 -1
  132. package/dist/docs/web-types.json +1 -1
  133. package/dist/solutions-components_commit.txt +6 -6
  134. package/package.json +1 -1
  135. package/dist/cdn/RUF6QBY7.js +0 -2
@@ -1,26 +1,26 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
2
  import { c as Ce } from "../../chunks/runtime.js";
3
3
  import { u as _e } from "../../chunks/useT9n.js";
4
- import { LitElement as ke, createEvent as X, nothing as ee } from "@arcgis/lumina";
5
- import { css as Te, html as T } from "lit";
6
- import { unsafeHTML as Ee } from "lit/directives/unsafe-html.js";
7
- import { useContextConsumer as te } from "@arcgis/lumina/context";
4
+ import { LitElement as ke, createEvent as Z, nothing as X } from "@arcgis/lumina";
5
+ import { css as Ee, html as k } from "lit";
6
+ import { unsafeHTML as Te } from "lit/directives/unsafe-html.js";
7
+ import { useContextConsumer as ee } from "@arcgis/lumina/context";
8
8
  import { c as Ae, b as De } from "../../chunks/deployAppContexts.js";
9
9
  import { T as Le } from "../../chunks/interfaces.js";
10
10
  import { l as Re } from "../../chunks/helpers.js";
11
- import se from "@arcgis/core/config.js";
11
+ import te from "@arcgis/core/config.js";
12
12
  import { createRef as $e, ref as Me } from "lit-html/directives/ref.js";
13
- import { Annotation as b, StateGraph as z, START as j, END as v, NodeInterrupt as ie } from "@langchain/langgraph/web";
14
- import { createAgentRuntimeState as J, sendTraceMessage as w, invokeStructuredPrompt as D, getEmbeddings as Pe, cosineSimilarity as Fe, invokeTextPrompt as Be } from "@arcgis/ai-orchestrator";
15
- import r, { z as E } from "zod";
16
- import * as G from "@esri/arcgis-rest-portal";
13
+ import { Annotation as b, StateGraph as O, START as z, END as x, NodeInterrupt as ne } from "@langchain/langgraph/web";
14
+ import { createAgentRuntimeState as j, sendTraceMessage as v, invokeStructuredPrompt as D, getEmbeddings as Be, cosineSimilarity as Fe, invokeTextPrompt as Pe } from "@arcgis/ai-orchestrator";
15
+ import r, { z as T } from "zod";
16
+ import * as J from "@esri/arcgis-rest-portal";
17
17
  import { applyPatch as Ne } from "fast-json-patch";
18
18
  import "@langchain/core/messages";
19
- import { C as oe } from "../../chunks/converter.js";
20
- import { g as F, t as ae, r as re, c as qe, d as A } from "../../chunks/templates.js";
19
+ import { C as ie } from "../../chunks/converter.js";
20
+ import { g as F, t as oe, r as ae, c as qe, d as A } from "../../chunks/templates.js";
21
21
  import Ue from "@arcgis/core/portal/Portal.js";
22
22
  import Oe from "@arcgis/core/portal/PortalItem.js";
23
- const ze = Te`:host{display:block;height:100%}.margin-lg{margin:var(--calcite-spacing-lg)}.display-flex-row{display:flex;flex-direction:row}.assistant-split-container{display:flex;width:100%;height:calc(100vh - 78px);overflow:hidden;border-radius:10px}.assistant-panel{display:flex;flex-direction:column;height:100%;border:1px solid var(--calcite-color-surface-3);background-color:var(--calcite-color-surface-2);overflow:hidden}.chat-panel{min-width:320px}.builder-panel{min-width:320px;max-width:100%;border-left:1px solid var(--calcite-color-surface-3)}.panel-actions{display:flex;gap:8px;padding:6px;align-items:center}.builder-header,.builder-footer{padding:10px;background:var(--calcite-color-surface-1);border-bottom:1px solid var(--calcite-color-surface-3)}.builder-content{flex:1;overflow:auto;padding:12px}.builder-content pre{white-space:pre-wrap;word-wrap:break-word;max-height:100%;overflow:auto}.builder-actions{display:flex;gap:6px;align-items:center}.padding-left-10{padding-left:10px}.chat-container{display:flex;flex-direction:column;gap:0px;max-width:600px;height:75%;background-color:var(--calcite-color-surface-4);padding:1px}.chat-container_expanded{display:flex;flex-direction:column;gap:0px;max-width:100%;height:95%;background-color:var(--calcite-color-surface-1);border-radius:10px;padding:10px}.chat-panel{--calcite-color-focus: var(--calcite-color-brand);--calcite-panel-border-color: var(--calcite-color-border-2);--calcite-internal-panel-header-vertical-padding: 0px;--calcite-panel-header-content-space: 0px;border:var(--calcite-border-width-sm) solid var(--calcite-color-border-2);height:100%}.header-content{display:flex;align-items:center;gap:var(--calcite-spacing-sm);height:65px;box-sizing:border-box;padding-inline-start:var(--calcite-space-2xl)}.header-title{font-size:var(--calcite-font-size-md);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-1)}.beta-chip{--calcite-chip-corner-radius: var(--calcite-corner-radius-half)}.chat-panel calcite-card,.chat-panel calcite-text-area,.chat-panel calcite-button,.chat-panel .chat-messages,.chat-panel .chat-input{--calcite-color-focus: var(--calcite-color-brand)}.assistant-followup-chip:focus{outline:2px solid var(--calcite-color-brand)}.chat-panel-heading{font-size:var(--calcite-font-size-0);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-surface-1, var(--calcite-color-text-1))}.chat-messages{display:flex;flex-direction:column;gap:20px;padding:4px;height:100%;overflow-y:auto}.user-message{align-self:flex-end;background:var(--calcite-color-brand);border-radius:8px;max-width:90%;--calcite-card-corner-radius: 8px;--calcite-card-background-color: var(--calcite-color-brand);--calcite-card-border-color: var(--calcite-color-brand);color:var(--calcite-color-text-inverse);text-align:left}.system-message{align-self:flex-start;background:var(--calcite-color-surface-3);border-radius:8px;max-width:90%;--calcite-card-corner-radius: 8px;--calcite-card-background-color: var(--calcite-color-surface-4);--calcite-card-border-color: var(--calcite-color-surface-4);color:var(--calcite-color-inverse);text-align:left}.loader-message{align-self:flex-start;background:var(--calcite-color-surface-4);border-radius:8px;--calcite-card-corner-radius: 8px;--calcite-card-background-color: var(--calcite-color-surface-4);--calcite-card-border-color: var(--calcite-color-surface-4)}.message-content{padding:0;font-size:14px}.response-message.message-content>p:first-of-type{margin-top:0}.message-content img{max-width:100%;height:auto;display:block;object-fit:contain}.message-content-pad{padding-bottom:10px;font-size:14px}.message-content-summary{padding-bottom:14px}.message-content-alignment{display:flex;align-items:center;gap:var(--calcite-spacing-md);font-size:var(--calcite-font-size--1);color:var(--calcite-color-text-1)}.padding-top-10{padding-top:10px}.padding-right-8{padding-right:8px}.padding-left-right-5{padding-right:5px;padding-left:5px}.chip-content{padding:5px 5px 5px 0}.chat-input{display:flex;flex-direction:row;flex-grow:1}.table-cell{--calcite-table-cell-background: var(--calcite-color-surface-4)}.cursor-pointer{cursor:pointer}.notice-border-color{--temp-initial-brand: var(--calcite-color-brand)}.notice-border-color calcite-notice{--calcite-color-brand: #ddd;--calcite-icon-color: var(--temp-initial-brand)}.notice-border-color calcite-notice *{--calcite-color-brand: var(--temp-initial-brand)}.solution-card{padding:5px 0;text-decoration:none;display:block;width:100%;cursor:pointer}.solution-card calcite-card{display:flex;flex-direction:column;max-width:520px;overflow:hidden;--calcite-card-corner-radius: var(--calcite-corner-radius-round) !important;--calcite-card-shadow: var(--calcite-shadow-sm);--calcite-card-background-color: var(--calcite-card-background-color) }.solution-card div[slot=thumbnail]{max-height:100%;width:100%;position:relative;&:after{content:"";position:absolute;top:0;left:0;width:100%;height:100%;transition:all .15s ease-in-out}}.solution-card div[slot=thumbnail] img{max-height:100%;width:100%;object-fit:cover}.solution-card span[slot=description]{padding-top:10px}.solution-card calcite-chip{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);visibility:hidden;pointer-events:none;opacity:0;transition:all .15s ease-in-out;z-index:9999}.solution-card:hover calcite-chip{visibility:visible;opacity:1}.solution-card:hover div[slot=thumbnail]:after{background-color:#00000080}.solution-card:hover h3{text-decoration:underline}.solution-card:focus{outline:2px solid var(--calcite-color-brand)}.references-container{padding-top:10px;display:block}.references-container.collapsed{display:none}.width-100{width:100%}.disclaimer-div{display:flex;align-items:center;gap:var(--calcite-spacing-sm);font-size:var(--calcite-font-size--0);color:var(--calcite-color-text-1)}.display-none{display:none}.chat-messages calcite-fab{position:absolute;bottom:16px;left:50%;transform:translate(-50%);z-index:999}.icon-color-background{--calcite-button-icon-color: var(--calcite-color-surface-1)}#closeAssistantButton{--calcite-action-text-color: var(--calcite-color-text-1)}.icon-color-background:focus{--calcite-color-focus: var(--calcite-color-surface-1)}@media(max-width:430px){.solution-card .solution-snippet{display:none}}.height-32-flex-auto{height:32px;flex:0 0 auto}.margin-top-0.message-content>p:first-of-type{margin-top:0}a:not(.solution-card){color:var(--calcite-link-text-color, var(--calcite-color-text-link));cursor:pointer;text-decoration:none;line-height:inherit;background-image:linear-gradient(currentColor,currentColor),linear-gradient(var(--calcite-color-brand-underline),var(--calcite-color-brand-underline));background-position-x:0%,100%;background-position-y:min(1.5em,100%);background-repeat:no-repeat,no-repeat;background-size:0% 1px,100% 1px;transition-property:background-size,color;transition-duration:var(--calcite-animation-timing, .15s);transition-timing-function:ease-in-out;outline-color:transparent;position:relative}a:not(.solution-card):hover{background-size:100% 1px,100% 1px}a:not(.solution-card):focus{outline:2px solid var(--calcite-color-brand);outline-offset:2px;outline-color:var(--calcite-color-brand)}a:not(.solution-card):active{color:var(--calcite-color-brand-press)}`;
23
+ const ze = Ee`:host{display:block;height:100%}.margin-lg{margin:var(--calcite-spacing-lg)}.display-flex-row{display:flex;flex-direction:row}.assistant-split-container{display:flex;width:100%;height:calc(100vh - 78px);overflow:hidden;border-radius:10px}.assistant-panel{display:flex;flex-direction:column;height:100%;border:1px solid var(--calcite-color-surface-3);background-color:var(--calcite-color-surface-2);overflow:hidden}.chat-panel{min-width:320px}.builder-panel{min-width:320px;max-width:100%;border-left:1px solid var(--calcite-color-surface-3)}.panel-actions{display:flex;gap:8px;padding:6px;align-items:center}.builder-header,.builder-footer{padding:10px;background:var(--calcite-color-surface-1);border-bottom:1px solid var(--calcite-color-surface-3)}.builder-content{flex:1;overflow:auto;padding:12px}.builder-content pre{white-space:pre-wrap;word-wrap:break-word;max-height:100%;overflow:auto}.builder-actions{display:flex;gap:6px;align-items:center}.padding-left-10{padding-left:10px}.chat-container{display:flex;flex-direction:column;gap:0px;max-width:600px;height:75%;background-color:var(--calcite-color-surface-4);padding:1px}.chat-container_expanded{display:flex;flex-direction:column;gap:0px;max-width:100%;height:95%;background-color:var(--calcite-color-surface-1);border-radius:10px;padding:10px}.chat-panel{--calcite-color-focus: var(--calcite-color-brand);--calcite-panel-border-color: var(--calcite-color-border-2);--calcite-internal-panel-header-vertical-padding: 0px;--calcite-panel-header-content-space: 0px;border:var(--calcite-border-width-sm) solid var(--calcite-color-border-2);height:100%}.header-content{display:flex;align-items:center;gap:var(--calcite-spacing-sm);height:65px;box-sizing:border-box;padding-inline-start:var(--calcite-space-2xl)}.header-title{font-size:var(--calcite-font-size-md);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-1)}.beta-chip{--calcite-chip-corner-radius: var(--calcite-corner-radius-half)}.chat-panel calcite-card,.chat-panel calcite-text-area,.chat-panel calcite-button,.chat-panel .chat-messages,.chat-panel .chat-input{--calcite-color-focus: var(--calcite-color-brand)}.assistant-followup-chip:focus{outline:2px solid var(--calcite-color-brand)}.chat-panel-heading{font-size:var(--calcite-font-size-0);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-surface-1, var(--calcite-color-text-1))}.chat-messages{display:flex;flex-direction:column;gap:20px;padding:4px;height:100%;overflow-y:auto}.user-message{align-self:flex-end;background:var(--calcite-color-brand);border-radius:8px;max-width:90%;--calcite-card-corner-radius: 8px;--calcite-card-background-color: var(--calcite-color-brand);--calcite-card-border-color: var(--calcite-color-brand);color:var(--calcite-color-text-inverse);text-align:left}.system-message{align-self:flex-start;background:var(--calcite-color-surface-3);border-radius:8px;max-width:90%;--calcite-card-corner-radius: 8px;--calcite-card-background-color: var(--calcite-color-surface-4);--calcite-card-border-color: var(--calcite-color-surface-4);color:var(--calcite-color-inverse);text-align:left}.loader-message{align-self:flex-start;background:var(--calcite-color-surface-4);border-radius:8px;--calcite-card-corner-radius: 8px;--calcite-card-background-color: var(--calcite-color-surface-4);--calcite-card-border-color: var(--calcite-color-surface-4)}.message-content{padding:0;font-size:14px}.response-message.message-content>p:first-of-type{margin-top:0}.message-content img{max-width:100%;height:auto;display:block;object-fit:contain}.message-content-pad{padding-bottom:10px;font-size:14px}.message-content-summary{padding-bottom:14px}.message-content-alignment{display:flex;align-items:center;gap:var(--calcite-spacing-md);font-size:var(--calcite-font-size--1);color:var(--calcite-color-text-1)}.padding-top-10{padding-top:10px}.padding-right-8{padding-right:8px}.padding-left-right-5{padding-right:5px;padding-left:5px}.chip-content{padding:5px 5px 5px 0}.chat-input{display:flex;flex-direction:row;flex-grow:1}.table-cell{--calcite-table-cell-background: var(--calcite-color-surface-4)}.cursor-pointer{cursor:pointer}.notice-border-color{--temp-initial-brand: var(--calcite-color-brand)}.notice-border-color calcite-notice{--calcite-color-brand: #ddd;--calcite-icon-color: var(--temp-initial-brand)}.notice-border-color calcite-notice *{--calcite-color-brand: var(--temp-initial-brand)}.solution-card{padding:5px 0;text-decoration:none;display:block;width:100%;cursor:pointer}.solution-card calcite-card{display:flex;flex-direction:column;max-width:520px;overflow:hidden;--calcite-card-corner-radius: var(--calcite-corner-radius-round) !important;--calcite-card-shadow: var(--calcite-shadow-sm);--calcite-card-background-color: var(--calcite-card-background-color) }.solution-card div[slot=thumbnail]{max-height:100%;width:100%;position:relative;&:after{content:"";position:absolute;top:0;left:0;width:100%;height:100%;transition:all .15s ease-in-out}}.solution-card div[slot=thumbnail] img{max-height:100%;width:100%;object-fit:cover}.solution-card span[slot=description]{padding-top:10px}.solution-card calcite-chip{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);visibility:hidden;pointer-events:none;opacity:0;transition:all .15s ease-in-out;z-index:9999}.solution-card:hover calcite-chip{visibility:visible;opacity:1}.solution-card:hover div[slot=thumbnail]:after{background-color:#00000080}.solution-card:hover h3{text-decoration:underline}.solution-card:focus{outline:2px solid var(--calcite-color-brand)}.references-container{padding-top:10px;display:block}.references-container.collapsed{display:none}.width-100{width:100%}.disclaimer-div{display:flex;align-items:center;gap:var(--calcite-spacing-sm);font-size:var(--calcite-font-size--0);color:var(--calcite-color-text-1)}.display-none{display:none}.chat-messages calcite-fab{position:absolute;bottom:16px;left:50%;transform:translate(-50%);z-index:999}.icon-color-background{--calcite-button-icon-color: var(--calcite-color-surface-1)}#closeAssistantButton{--calcite-action-text-color: var(--calcite-color-text-1)}.icon-color-background:focus{--calcite-color-focus: var(--calcite-color-surface-1)}@media(max-width:430px){.solution-card .solution-snippet{display:none}}.height-32-flex-auto{height:32px;flex:0 0 auto}.margin-top-0.message-content>p:first-of-type{margin-top:0}a:not(.solution-card){color:var(--calcite-link-text-color, var(--calcite-color-text-link));cursor:pointer;text-decoration:none;line-height:inherit;background-image:linear-gradient(currentColor,currentColor),linear-gradient(var(--calcite-color-brand-underline),var(--calcite-color-brand-underline));background-position-x:0%,100%;background-position-y:min(1.5em,100%);background-repeat:no-repeat,no-repeat;background-size:0% 1px,100% 1px;transition-property:background-size,color;transition-duration:var(--calcite-animation-timing, .15s);transition-timing-function:ease-in-out;outline-color:transparent;position:relative}a:not(.solution-card):hover{background-size:100% 1px,100% 1px}a:not(.solution-card):focus{outline:2px solid var(--calcite-color-brand);outline-offset:2px;outline-color:var(--calcite-color-brand)}a:not(.solution-card):active{color:var(--calcite-color-brand-press)}`;
24
24
  async function y(t, e) {
25
25
  const s = Object.entries(t).find(
26
26
  ([n]) => n.endsWith(`/${e}.md`)
@@ -37,7 +37,7 @@ ${Object.keys(t).join(`
37
37
  function N(t) {
38
38
  return t?.configurable?.context?.translations;
39
39
  }
40
- function le(t) {
40
+ function re(t) {
41
41
  if (typeof window > "u" || t.length <= 1)
42
42
  return;
43
43
  const e = t.map((n) => n.solution.id), s = t.map((n) => n.solution.title);
@@ -59,7 +59,7 @@ function le(t) {
59
59
  }
60
60
  }));
61
61
  }
62
- function ce(t) {
62
+ function le(t) {
63
63
  if (typeof window > "u" || !t)
64
64
  return;
65
65
  const e = new CustomEvent("solutionIDFromAssistant", {
@@ -96,10 +96,10 @@ function Ge(t, e) {
96
96
  function He(t) {
97
97
  return t && t.helperServices.aiAssistantServices ? `${t.helperServices.aiAssistantServices.url}/skills/doc_ai_assistant/chat` : null;
98
98
  }
99
- function de(t) {
99
+ function ce(t) {
100
100
  return t && t.helperServices.aiAssistantServices ? `${t.helperServices.aiAssistantServices.url}/skills/doc_ai_assistant/api/pre-chat` : null;
101
101
  }
102
- async function O(t, e, s) {
102
+ async function U(t, e, s) {
103
103
  const n = await fetch(e, {
104
104
  method: "POST",
105
105
  headers: {
@@ -112,12 +112,12 @@ async function O(t, e, s) {
112
112
  throw new Error(`HTTP ${n.status} calling ${e}`);
113
113
  return n.json();
114
114
  }
115
- const Ve = (t) => new Promise((e) => setTimeout(e, t)), Qe = b.Root({
115
+ const Ve = (t) => new Promise((e) => setTimeout(e, t)), We = b.Root({
116
116
  // Provides agentExecutionContext, outputMessage, summary, and status
117
117
  // channels with the orchestrator's standard reducers/defaults so the
118
118
  // sub-agent reports back through the same shape the orchestrator
119
119
  // persists into priorSteps.
120
- ...J(),
120
+ ...j(),
121
121
  solutionResponse: b({
122
122
  reducer: (t, e) => e ?? null,
123
123
  default: () => null
@@ -133,9 +133,9 @@ const Ve = (t) => new Promise((e) => setTimeout(e, t)), Qe = b.Root({
133
133
  reducer: (t, e) => e ?? t,
134
134
  default: () => null
135
135
  })
136
- }), We = () => new z(Qe).addNode("initializeAgent", Ye).addNode("askSolutionsQuestions", Ke).addEdge(j, "initializeAgent").addEdge("initializeAgent", "askSolutionsQuestions").addEdge("askSolutionsQuestions", v), ue = async (t, e, s, n) => {
136
+ }), Ke = () => new O(We).addNode("initializeAgent", Ye).addNode("askSolutionsQuestions", Qe).addEdge(z, "initializeAgent").addEdge("initializeAgent", "askSolutionsQuestions").addEdge("askSolutionsQuestions", x), de = async (t, e, s, n) => {
137
137
  if (!t) return;
138
- const i = de(t);
138
+ const i = ce(t);
139
139
  if (!i) return;
140
140
  const a = { context: {
141
141
  kind: "DocAIAssistantRequest",
@@ -147,15 +147,15 @@ const Ve = (t) => new Promise((e) => setTimeout(e, t)), Qe = b.Root({
147
147
  }
148
148
  }
149
149
  } };
150
- n && (a.conversationId = n), O(a, i, e ?? "");
151
- }, Ke = async (t, e) => {
150
+ n && (a.conversationId = n), U(a, i, e ?? "");
151
+ }, Qe = async (t, e) => {
152
152
  const s = N(e), n = t.documentSkillUrl;
153
153
  let i = [];
154
- await w(
154
+ await v(
155
155
  { text: s.agentProgress.explorerAgentSearching },
156
156
  e
157
157
  );
158
- let o = await O(
158
+ let o = await U(
159
159
  {
160
160
  message: t.agentExecutionContext.userRequest,
161
161
  conversationId: e?.configurable?.context?.convoId ?? void 0,
@@ -180,27 +180,26 @@ const Ve = (t) => new Promise((e) => setTimeout(e, t)), Qe = b.Root({
180
180
  hasMore: o.hasMore,
181
181
  ackSequenceNumber: o.sequenceNumber,
182
182
  inquiryId: o.inquiryId
183
- }, l = "", d = null;
184
- const u = async (m) => {
185
- const c = m.context?.results?.[0]?.reply ?? "";
186
- if (c !== "") {
187
- const x = Je(c), S = Ge(x, e);
188
- l = S.source, i = [
183
+ }, l = "";
184
+ const d = async (g) => {
185
+ const h = g.context?.results?.[0]?.reply ?? "";
186
+ if (h !== "") {
187
+ const m = Je(h), E = Ge(m, e);
188
+ l = E.source, i = [
189
189
  ...i,
190
- ...S.allMatches.filter(
191
- (k) => !i.some((q) => q.solution.id === k.solution.id)
190
+ ...E.allMatches.filter(
191
+ (C) => !i.some((_) => _.solution.id === C.solution.id)
192
192
  )
193
193
  ];
194
194
  }
195
- c !== "" && m.context?.results?.[0]?.followupQuestions && (d = m.context.results[0].followupQuestions);
196
- const g = m.context?.results?.[0]?.status?.currentStatusStep;
197
- if (g) {
198
- let x = "";
199
- g === 1 ? x = s.agentProgress.explorerAgentReading : g === 2 ? x = s.agentProgress.explorerAgentReviewing : g === 3 && (x = s.agentProgress.explorerAgentPreparing), await w({ text: x }, e);
195
+ const c = g.context?.results?.[0]?.status?.currentStatusStep;
196
+ if (c) {
197
+ let m = "";
198
+ c === 1 ? m = s.agentProgress.explorerAgentReading : c === 2 ? m = s.agentProgress.explorerAgentReviewing : c === 3 && (m = s.agentProgress.explorerAgentPreparing), await v({ text: m }, e);
200
199
  }
201
200
  };
202
- for (await u(o); a.hasMore; )
203
- await Ve(500), o = await O(
201
+ for (await d(o); a.hasMore; )
202
+ await Ve(500), o = await U(
204
203
  {
205
204
  conversationId: a.conversationId,
206
205
  ackSequenceNumber: a.ackSequenceNumber,
@@ -214,17 +213,13 @@ const Ve = (t) => new Promise((e) => setTimeout(e, t)), Qe = b.Root({
214
213
  hasMore: o.hasMore,
215
214
  ackSequenceNumber: o.sequenceNumber,
216
215
  inquiryId: o.inquiryId
217
- }, await u(o);
218
- if (d && e?.configurable?.context?.updateSuggestedPrompts) {
219
- const m = e.configurable.context.updateSuggestedPrompts, c = d;
220
- setTimeout(() => m(c), 0);
221
- }
222
- return de(e?.configurable?.context.portal) && ue(
216
+ }, await d(o);
217
+ return ce(e?.configurable?.context.portal) && de(
223
218
  e?.configurable?.context.portal,
224
219
  e?.configurable?.context.token ?? "",
225
220
  e?.configurable?.context.configContext.locale ?? "en",
226
221
  a.conversationId
227
- ), i.length && (i.length === 1 ? ce(i[0].solution.id) : le(i)), {
222
+ ), i.length && (i.length === 1 ? le(i[0].solution.id) : re(i)), {
228
223
  outputMessage: l,
229
224
  summary: l,
230
225
  status: "success",
@@ -238,7 +233,7 @@ const Ve = (t) => new Promise((e) => setTimeout(e, t)), Qe = b.Root({
238
233
  };
239
234
  };
240
235
  await y(je, "solutions_explorer_description");
241
- const pe = (t) => {
236
+ const ue = (t) => {
242
237
  if (t && Array.isArray(t.id) && t.id.length > 0)
243
238
  return t.id[t.id.length - 1].replace("Message", "").toLowerCase();
244
239
  if (t && typeof t._getType == "function")
@@ -249,7 +244,7 @@ const pe = (t) => {
249
244
  }
250
245
  return "human";
251
246
  }, Ze = (t) => {
252
- const e = pe(t);
247
+ const e = ue(t);
253
248
  if (t && t.kwargs)
254
249
  return {
255
250
  role: e,
@@ -264,7 +259,7 @@ const pe = (t) => {
264
259
  return t.id && (s.id = t.id), t.name && (s.name = t.name), t.additional_kwargs && (s.additional_kwargs = t.additional_kwargs), t.response_metadata && (s.response_metadata = t.response_metadata), s;
265
260
  }
266
261
  return { role: "human", content: String(t) };
267
- }, Xe = (t) => pe(t) === "human", et = (t, e = 3) => t.filter((s) => Xe(s)).slice(-e).map(Ze), tt = (t, e = " ") => et(t).map((i) => i.content).join(e).trim(), st = { understandingRequest: "Understanding your request...", selectTemplatePrompt: "This use case could be supported in a few different ways. Choose the option that best matches what you want to accomplish.", searchingExistingSolutions: "Searching for existing solutions...", existingSolutionMatch: "I found one or more existing solutions that match your use case. These are ready-to-use solutions that may already meet your needs and can be deployed now. Do you want to continue building your own solution?", continueBuildingYes: "Yes, I want to build a new solution", continueBuildingNo: "No, I’ll review existing solutions", continueBuildingDeclined: "Sounds good. We can focus on existing solutions. Let me know if I can help answer any questions or provide more details.", creatingDesign: "Generating solution design...", updatingDesign: "Updating solution design...", applyChangeFailed: "I wasn't able to apply that change. The design was not modified. Please try rephrasing your request.", createDesignFailed: "I wasn't able to create a solution design from that request. Please try rephrasing and try again.", discardMessage: "Are you sure you want to discard your solution?", discardForNewSolution: "I can help you build a new solution, but I will need to discard your current solution design. Do you want to continue?" }, nt = {
262
+ }, Xe = (t) => ue(t) === "human", et = (t, e = 3) => t.filter((s) => Xe(s)).slice(-e).map(Ze), tt = (t, e = " ") => et(t).map((i) => i.content).join(e).trim(), st = { understandingRequest: "Understanding your request...", selectTemplatePrompt: "This use case could be supported in a few different ways. Choose the option that best matches what you want to accomplish.", searchingExistingSolutions: "Searching for existing solutions...", existingSolutionMatch: "I found one or more existing solutions that match your use case. These are ready-to-use solutions that may already meet your needs and can be deployed now. Do you want to continue building your own solution?", continueBuildingYes: "Yes, I want to build a new solution", continueBuildingNo: "No, I’ll review existing solutions", continueBuildingDeclined: "Sounds good. We can focus on existing solutions. Let me know if I can help answer any questions or provide more details.", creatingDesign: "Generating solution design...", updatingDesign: "Updating solution design...", applyChangeFailed: "I wasn't able to apply that change. The design was not modified. Please try rephrasing your request.", createDesignFailed: "I wasn't able to create a solution design from that request. Please try rephrasing and try again.", discardMessage: "Are you sure you want to discard your solution?", discardForNewSolution: "I can help you build a new solution, but I will need to discard your current solution design. Do you want to continue?" }, nt = {
268
263
  builderMessages: st
269
264
  }, it = /* @__PURE__ */ new Set([
270
265
  "add",
@@ -329,7 +324,7 @@ const pe = (t) => {
329
324
  "view",
330
325
  "where"
331
326
  ]);
332
- class me {
327
+ class pe {
333
328
  constructor(e, s, n = !0) {
334
329
  this.isValid = !0, this.issues = [], this.response = e, this.template = s, this.newDesign = n, this.validate();
335
330
  }
@@ -444,7 +439,7 @@ const ot = r.object({
444
439
  "Notebook",
445
440
  "QuickCapture Project"
446
441
  ]).describe("ArcGIS item type.")
447
- }), ne = r.object({
442
+ }), se = r.object({
448
443
  name: r.string().describe("Field name."),
449
444
  type: r.enum(["string", "integer", "double", "date", "oid", "guid", "globalid"]).describe("Field data type."),
450
445
  alias: r.string().describe("Field alias for display."),
@@ -459,13 +454,13 @@ const ot = r.object({
459
454
  typeMutable: r.boolean().describe("Indicates whether the layer type can be changed."),
460
455
  name: r.string().describe("Layer/table name."),
461
456
  description: r.string().describe("Layer/table description."),
462
- customFields: r.array(ne).describe("User/business fields specific to the solution."),
463
- requiredFields: r.array(ne).describe("Fields required for solution functionality (e.g., relationship keys).")
457
+ customFields: r.array(se).describe("User/business fields specific to the solution."),
458
+ requiredFields: r.array(se).describe("Fields required for solution functionality (e.g., relationship keys).")
464
459
  }), lt = r.object({
465
460
  itemId: r.string().describe("ArcGIS item id for the feature layer."),
466
461
  addLayers: r.boolean().describe("Indicates whether new layers can be added during solution design."),
467
462
  layers: r.array(rt)
468
- }), H = r.object({
463
+ }), G = r.object({
469
464
  response: r.string().describe("Conversational response to the user's query."),
470
465
  solution: r.object({
471
466
  itemId: r.string().nullable().describe("ArcGIS item id of the source Solution template used for deployment. Preserve the existing value exactly when known; otherwise use null."),
@@ -494,22 +489,22 @@ const ot = r.object({
494
489
  assistantResponse: r.string().describe("Natural-language response for the user."),
495
490
  isValidUseCase: r.boolean().describe("True only when the request is concrete, appropriate, and has at least one matching template."),
496
491
  matchedTemplates: r.array(pt).describe("Ordered list of matching templates, best match first. Empty when no valid match exists.")
497
- }), V = (t) => t in A, gt = 5, ht = 0.8, ft = 0.15, bt = "Web Mapping Application", yt = "Embeddings";
498
- let $ = null, U = null, M = null, P = null;
492
+ }), H = (t) => t in A, gt = 5, ht = 0.8, ft = 0.15, bt = "Web Mapping Application", yt = "Embeddings";
493
+ let $ = null, q = null, M = null, B = null;
499
494
  const xt = "Build", L = /* @__PURE__ */ Object.assign({
500
495
  "./prompts/description.md": () => import("../../chunks/description2.js").then((t) => t.default),
501
496
  "./prompts/designSolution.md": () => import("../../chunks/designSolution.js").then((t) => t.default),
502
497
  "./prompts/findExistingSolution.md": () => import("../../chunks/findExistingSolution.js").then((t) => t.default),
503
498
  "./prompts/initialAssessment.md": () => import("../../chunks/initialAssessment.js").then((t) => t.default),
504
499
  "./prompts/updateDesign.md": () => import("../../chunks/updateDesign.js").then((t) => t.default)
505
- }), vt = nt.builderMessages, f = (t, e, s) => N(e)?.builderMessages?.[t] ?? vt[t], ge = (t) => {
500
+ }), vt = nt.builderMessages, f = (t, e, s) => N(e)?.builderMessages?.[t] ?? vt[t], me = (t) => {
506
501
  typeof window < "u" && window.dispatchEvent(new CustomEvent("arcgis-solution-design-update", {
507
502
  detail: t
508
503
  }));
509
504
  }, wt = async (t, e, s) => {
510
505
  if (!t) return null;
511
506
  const n = `type:"${bt}" AND typekeywords:${yt} AND group:${t}`;
512
- return (await G.searchItems({
507
+ return (await J.searchItems({
513
508
  q: n,
514
509
  params: e ? { token: e } : void 0,
515
510
  portal: s,
@@ -529,7 +524,7 @@ async function St(t, e, s) {
529
524
  const It = async (t, e, s) => {
530
525
  if (!t) return [];
531
526
  const n = `type:Solution AND typekeywords:${xt} AND group:${t}`;
532
- return (await G.searchItems({
527
+ return (await J.searchItems({
533
528
  q: n,
534
529
  params: e ? { token: e } : void 0,
535
530
  portal: s,
@@ -537,7 +532,7 @@ const It = async (t, e, s) => {
537
532
  }))?.results ?? [];
538
533
  }, Ct = async (t, e, s) => {
539
534
  try {
540
- const n = await G.getItemData(t, {
535
+ const n = await J.getItemData(t, {
541
536
  params: e ? { token: e } : void 0,
542
537
  portal: s
543
538
  }), i = n?.buildSolution;
@@ -547,7 +542,7 @@ const It = async (t, e, s) => {
547
542
  } catch {
548
543
  return null;
549
544
  }
550
- }, _ = (t, e = {}) => {
545
+ }, I = (t, e = {}) => {
551
546
  let s = t;
552
547
  return "itemId" in e && (s = {
553
548
  ...s,
@@ -565,26 +560,26 @@ const It = async (t, e, s) => {
565
560
  ...s,
566
561
  templateId: e.templateId ?? null
567
562
  }), s;
568
- }, he = (t, e) => {
563
+ }, ge = (t, e) => {
569
564
  if (t == null || e == null)
570
565
  return { ok: !1, error: "design or sourceBuildSolution is null/undefined" };
571
566
  try {
572
567
  const s = structuredClone(e);
573
- return new oe({ buildSolution: s }).applyLlmTemplate(t), { ok: !0 };
568
+ return new ie({ buildSolution: s }).applyLlmTemplate(t), { ok: !0 };
574
569
  } catch (s) {
575
570
  return {
576
571
  ok: !1,
577
572
  error: s instanceof Error ? s.stack ?? s.message : String(s)
578
573
  };
579
574
  }
580
- }, Q = async (t) => {
581
- if (U) {
582
- Object.entries(U).forEach(([a, l]) => {
575
+ }, V = async (t) => {
576
+ if (q) {
577
+ Object.entries(q).forEach(([a, l]) => {
583
578
  A[a] && (A[a].initialTemplate = l);
584
579
  });
585
580
  return;
586
581
  }
587
- const e = t?.configurable?.context?.token, s = be(t), n = ye(t);
582
+ const e = t?.configurable?.context?.token, s = fe(t), n = be(t);
588
583
  if (!s) {
589
584
  console.warn("Solution Builder: missing primarySolutionsGroupId in appConfig; skipping live template hydration.");
590
585
  return;
@@ -597,75 +592,75 @@ const It = async (t, e, s) => {
597
592
  if (typeof d != "string" || o[d]) return;
598
593
  const u = await Ct(a.id, e, n);
599
594
  if (!u) return;
600
- const { buildSolution: h, params: m } = u;
601
- if (typeof h == "object" && h !== null && "solution" in h) {
602
- const g = h.solution;
603
- g.thumbnailUrl = a.thumbnail ? `${n ?? "https://www.arcgis.com/sharing/rest"}/content/items/${a.id}/info/${a.thumbnail}` : void 0, g.item = a;
595
+ const { buildSolution: g, params: h } = u;
596
+ if (typeof g == "object" && g !== null && "solution" in g) {
597
+ const m = g.solution;
598
+ m.thumbnailUrl = a.thumbnail ? `${n ?? "https://www.arcgis.com/sharing/rest"}/content/items/${a.id}/info/${a.thumbnail}` : void 0, m.item = a;
604
599
  }
605
600
  const c = {
606
601
  ...l,
607
- buildSolution: h
602
+ buildSolution: g
608
603
  };
609
- o[d] = _(
610
- new oe(c).dumpToLlmTemplate(),
604
+ o[d] = I(
605
+ new ie(c).dumpToLlmTemplate(),
611
606
  {
612
607
  itemId: a.id,
613
- sourceBuildSolution: structuredClone(h),
614
- params: m ? structuredClone(m) : null
608
+ sourceBuildSolution: structuredClone(g),
609
+ params: h ? structuredClone(h) : null
615
610
  }
616
611
  ), A[d] = {
617
612
  ...l,
618
613
  initialTemplate: o[d]
619
614
  };
620
- })), U = o;
621
- }, fe = (t) => {
615
+ })), q = o;
616
+ }, he = (t) => {
622
617
  const e = t?.configurable?.context?.token;
623
618
  return typeof e != "string" || !e.trim() ? null : e;
624
- }, be = (t) => {
619
+ }, fe = (t) => {
625
620
  const e = t?.configurable?.context?.configContext?.primarySolutionsGroupId;
626
621
  return typeof e != "string" || !e.trim() ? null : e;
627
- }, ye = (t) => {
622
+ }, be = (t) => {
628
623
  const e = t?.configurable?.context?.configContext?.portalURL;
629
624
  if (!(typeof e != "string" || !e.trim()))
630
625
  return `${e.replace(/\/+$/, "")}/sharing/rest`;
631
626
  }, _t = async (t) => {
632
627
  await Promise.all([
633
- ve(t),
634
- Q(t)
628
+ xe(t),
629
+ V(t)
635
630
  ]);
636
- }, xe = async (t) => {
637
- const e = fe(t);
638
- (!M || e && e !== P) && (P = e ?? P, M = _t(t).catch((n) => {
639
- throw M = null, P = null, n;
631
+ }, ye = async (t) => {
632
+ const e = he(t);
633
+ (!M || e && e !== B) && (B = e ?? B, M = _t(t).catch((n) => {
634
+ throw M = null, B = null, n;
640
635
  })), await M;
641
636
  };
642
- async function ve(t) {
637
+ async function xe(t) {
643
638
  if ($) return $;
644
- const e = be(t);
639
+ const e = fe(t);
645
640
  if (!e)
646
641
  return console.warn("Solution Builder: missing primarySolutionsGroupId in appConfig; skipping embeddings load."), null;
647
- const s = ye(t), n = t?.configurable?.context?.configContext?.portalURL;
642
+ const s = be(t), n = t?.configurable?.context?.configContext?.portalURL;
648
643
  await new Ue(n ? { url: n } : void 0).load();
649
- const o = fe(t) ?? void 0, a = await St(e, o, s);
644
+ const o = he(t) ?? void 0, a = await St(e, o, s);
650
645
  return a ? ($ = a.items, $) : null;
651
646
  }
652
647
  const kt = () => Object.entries(A).map(([t, e]) => `ID: ${t}
653
648
  Label: ${e.label}
654
649
  Description: ${e.description}`).join(`
655
650
 
656
- `), Tt = (t) => {
651
+ `), Et = (t) => {
657
652
  const e = t?.configurable?.context?.solutionDesignJson;
658
653
  if (typeof e != "string" || !e.trim())
659
654
  return null;
660
655
  try {
661
- const s = JSON.parse(e), n = _(
656
+ const s = JSON.parse(e), n = I(
662
657
  { response: "", ...s },
663
658
  { itemId: s?.solution?.itemId ?? null }
664
- ), i = H.safeParse(n);
659
+ ), i = G.safeParse(n);
665
660
  if (!i.success)
666
661
  return null;
667
- const { response: o, ...a } = i.data, l = s.templateId, d = typeof l == "string" && V(l) ? l : null;
668
- return _(
662
+ const { response: o, ...a } = i.data, l = s.templateId, d = typeof l == "string" && H(l) ? l : null;
663
+ return I(
669
664
  a,
670
665
  {
671
666
  sourceBuildSolution: s.sourceBuildSolution,
@@ -676,8 +671,8 @@ Description: ${e.description}`).join(`
676
671
  } catch {
677
672
  return null;
678
673
  }
679
- }, Et = b.Root({
680
- ...J(),
674
+ }, Tt = b.Root({
675
+ ...j(),
681
676
  /** Optional human-readable template description retained for UI use. */
682
677
  templateDescription: b({
683
678
  reducer: (t, e) => typeof e == "string" || e === null ? e : t ?? null,
@@ -709,10 +704,10 @@ Description: ${e.description}`).join(`
709
704
  default: () => null
710
705
  })
711
706
  }), At = (t, e) => {
712
- const s = Tt(e), n = s?.templateId ?? null, i = {};
707
+ const s = Et(e), n = s?.templateId ?? null, i = {};
713
708
  return JSON.stringify(t.currentDesign) !== JSON.stringify(s) && (i.currentDesign = s), n && t.selectedTemplate !== n && (i.selectedTemplate = n), i;
714
709
  }, Dt = async (t, e) => {
715
- await w({ text: f("understandingRequest", e) }, e), await xe(e);
710
+ await v({ text: f("understandingRequest", e) }, e), await ye(e);
716
711
  const s = t.agentExecutionContext.userRequest, n = kt(), i = t.agentExecutionContext.messages.slice(-11), o = await D({
717
712
  promptText: await y(L, "initialAssessment"),
718
713
  modelTier: "advanced",
@@ -721,14 +716,14 @@ Description: ${e.description}`).join(`
721
716
  messages: i,
722
717
  inputVariables: { query: s, availableTemplates: n }
723
718
  }), a = o.matchedTemplates.filter(
724
- (c) => V(c.templateId)
719
+ (c) => H(c.templateId)
725
720
  ), l = {
726
721
  ...o,
727
722
  matchedTemplates: a
728
- }, [d, u] = a, m = !!d && d.confidence >= ht && (u === void 0 || d.confidence - u.confidence >= ft) ? d.templateId : null;
723
+ }, [d, u] = a, h = !!d && d.confidence >= ht && (u === void 0 || d.confidence - u.confidence >= ft) ? d.templateId : null;
729
724
  return {
730
725
  assessment: l,
731
- selectedTemplate: m,
726
+ selectedTemplate: h,
732
727
  existingMatches: [],
733
728
  continueBuilding: null
734
729
  };
@@ -741,7 +736,7 @@ Description: ${e.description}`).join(`
741
736
  };
742
737
  }, Rt = (t, e) => {
743
738
  const { hitlResponse: s } = e.configurable, n = "selectTemplate", i = t.assessment?.matchedTemplates.filter(
744
- (u) => V(u.templateId)
739
+ (u) => H(u.templateId)
745
740
  ) ?? [], o = i.map((u) => `${u.templateDescription}`);
746
741
  if (s?.agentId !== "solutionBuilder" || s.id !== n) {
747
742
  const u = {
@@ -751,24 +746,24 @@ Description: ${e.description}`).join(`
751
746
  message: f("selectTemplatePrompt", e),
752
747
  metadata: [...o]
753
748
  };
754
- throw new ie(u);
749
+ throw new ne(u);
755
750
  }
756
751
  const a = String(s.payload ?? ""), l = o.findIndex((u) => u === a);
757
752
  return {
758
753
  selectedTemplate: (l >= 0 ? i[l] : void 0)?.templateId ?? i[0]?.templateId ?? null
759
754
  };
760
755
  }, $t = async (t, e) => {
761
- await w({ text: f("searchingExistingSolutions", e) }, e);
762
- const s = t.agentExecutionContext.userRequest, n = tt(t.agentExecutionContext.messages) || s, i = await ve(e);
756
+ await v({ text: f("searchingExistingSolutions", e) }, e);
757
+ const s = t.agentExecutionContext.userRequest, n = tt(t.agentExecutionContext.messages) || s, i = await xe(e);
763
758
  if (!i)
764
759
  return console.warn("Solutions Search: failed to load solution embeddings cache; skipping search."), { existingMatches: [] };
765
760
  if (!i.length)
766
761
  return { existingMatches: [] };
767
- const [o] = await Pe([n]), a = i.map((c) => ({
762
+ const [o] = await Be([n]), a = i.map((c) => ({
768
763
  solution: c,
769
764
  score: Fe(o, c.embedding)
770
765
  }));
771
- a.sort((c, g) => g.score - c.score);
766
+ a.sort((c, m) => m.score - c.score);
772
767
  const l = a.slice(0, gt);
773
768
  if (!l.length)
774
769
  return { existingMatches: [] };
@@ -784,40 +779,40 @@ Description: ${c.description}`).join(`
784
779
  schema: ut,
785
780
  messages: u,
786
781
  inputVariables: { query: s, candidates: d }
787
- })).matchedTitles.map((c) => l.find(({ solution: g }) => g.title === c)).filter((c) => c !== void 0) };
782
+ })).matchedTitles.map((c) => l.find(({ solution: m }) => m.title === c)).filter((c) => c !== void 0) };
788
783
  }, Mt = (t, e) => {
789
784
  const { existingMatches: s } = t, { hitlResponse: n } = e.configurable, i = `confirmExistingSolution:${s[0].solution.id}`;
790
785
  if (n?.agentId !== "solutionBuilder" || n.id !== i) {
791
- s.length === 1 ? ce(s[0].solution.id) : le(s);
786
+ s.length === 1 ? le(s[0].solution.id) : re(s);
792
787
  const d = f("existingSolutionMatch", e), u = [
793
788
  f("continueBuildingYes", e),
794
789
  f("continueBuildingNo", e)
795
- ], h = {
790
+ ], g = {
796
791
  agentId: "solutionBuilder",
797
792
  id: i,
798
793
  kind: "singleSelection",
799
794
  message: d,
800
795
  metadata: u
801
796
  };
802
- throw new ie(h);
797
+ throw new ne(g);
803
798
  }
804
799
  const o = String(n.payload ?? "").trim(), a = f("continueBuildingNo", e);
805
800
  return { continueBuilding: o !== a };
806
- }, Pt = (t, e) => {
801
+ }, Bt = (t, e) => {
807
802
  const s = f("continueBuildingDeclined", e);
808
803
  return {
809
804
  outputMessage: s,
810
805
  summary: s,
811
806
  status: "success"
812
807
  };
813
- }, we = async (t, e) => {
814
- await xe(e);
808
+ }, ve = async (t, e) => {
809
+ await ye(e);
815
810
  const { currentDesign: s } = t, n = t.agentExecutionContext.userRequest;
816
- await w({ text: f("creatingDesign", e) }, e);
811
+ await v({ text: f("creatingDesign", e) }, e);
817
812
  let i = F(t.selectedTemplate);
818
- if (i?.initialTemplate || (await Q(e), i = F(t.selectedTemplate)), !i?.initialTemplate)
813
+ if (i?.initialTemplate || (await V(e), i = F(t.selectedTemplate)), !i?.initialTemplate)
819
814
  throw new Error("No hydrated templates are available for solution design.");
820
- const o = _(
815
+ const o = I(
821
816
  s ?? i.initialTemplate,
822
817
  {
823
818
  itemId: (s ?? i.initialTemplate)?.solution?.itemId ?? null,
@@ -828,46 +823,46 @@ Description: ${c.description}`).join(`
828
823
  promptText: await y(L, "designSolution"),
829
824
  modelTier: "advanced",
830
825
  temperature: 0,
831
- schema: H,
826
+ schema: G,
832
827
  messages: a,
833
828
  inputVariables: {
834
- currentDesign: JSON.stringify(ae(o)),
829
+ currentDesign: JSON.stringify(oe(o)),
835
830
  templateInstructions: i.instructions,
836
831
  query: n
837
832
  }
838
- }), { response: d, featureLayer: u, ...h } = l, m = re(
833
+ }), { response: d, featureLayer: u, ...g } = l, h = ae(
839
834
  u,
840
835
  o.featureLayer
841
- ), c = _(
842
- { ...h, featureLayer: m },
836
+ ), c = I(
837
+ { ...g, featureLayer: h },
843
838
  {
844
839
  itemId: o?.solution?.itemId,
845
840
  sourceBuildSolution: o.sourceBuildSolution,
846
841
  templateId: t.selectedTemplate ?? null,
847
842
  params: o.params ?? null
848
843
  }
849
- ), g = new me(c, i.initialTemplate);
850
- if (!g.isValid)
844
+ ), m = new pe(c, i.initialTemplate);
845
+ if (!m.isValid)
851
846
  return console.warn(
852
847
  "[SolutionBuilder] designSolution validation failed:",
853
- { issues: g.issues, llmResponse: l }
848
+ { issues: m.issues, llmResponse: l }
854
849
  ), {
855
850
  outputMessage: f("createDesignFailed", e)
856
851
  };
857
- const x = c.sourceBuildSolution, S = he(c, x);
858
- if (!S.ok) {
852
+ const E = c.sourceBuildSolution, C = ge(c, E);
853
+ if (!C.ok) {
859
854
  console.warn(
860
855
  "[SolutionBuilder] designSolution Esri JSON conversion failed:",
861
- { error: S.error, llmResponse: l, design: c }
856
+ { error: C.error, llmResponse: l, design: c }
862
857
  );
863
- const k = f("createDesignFailed", e);
858
+ const _ = f("createDesignFailed", e);
864
859
  return {
865
- outputMessage: k,
866
- summary: k,
860
+ outputMessage: _,
861
+ summary: _,
867
862
  status: "success"
868
863
  };
869
864
  }
870
- return ge(c), {
865
+ return me(c), {
871
866
  outputMessage: d,
872
867
  summary: d,
873
868
  status: "success",
@@ -876,9 +871,9 @@ Description: ${c.description}`).join(`
876
871
  }, Ft = async (t, e) => {
877
872
  const { currentDesign: s } = t;
878
873
  if (!s)
879
- return we(t, e);
874
+ return ve(t, e);
880
875
  const n = t.agentExecutionContext.userRequest, i = t.agentExecutionContext.messages.slice(-11);
881
- await w({ text: f("updatingDesign", e) }, e);
876
+ await v({ text: f("updatingDesign", e) }, e);
882
877
  const o = await D({
883
878
  promptText: await y(L, "updateDesign"),
884
879
  modelTier: "advanced",
@@ -900,8 +895,8 @@ Description: ${c.description}`).join(`
900
895
  try {
901
896
  return JSON.parse(p);
902
897
  } catch {
903
- const C = p.replace(/[\u0000-\u001F]/g, (Z) => {
904
- switch (Z) {
898
+ const S = p.replace(/[\u0000-\u001F]/g, (Y) => {
899
+ switch (Y) {
905
900
  case "\b":
906
901
  return "\\b";
907
902
  case "\f":
@@ -914,45 +909,45 @@ Description: ${c.description}`).join(`
914
909
  case " ":
915
910
  return "\\t";
916
911
  default:
917
- return "\\u" + Z.charCodeAt(0).toString(16).padStart(4, "0");
912
+ return "\\u" + Y.charCodeAt(0).toString(16).padStart(4, "0");
918
913
  }
919
914
  });
920
915
  try {
921
- return JSON.parse(C);
916
+ return JSON.parse(S);
922
917
  } catch {
923
918
  return p;
924
919
  }
925
920
  }
926
- }, h = [...l.map((p) => ({
921
+ }, g = [...l.map((p) => ({
927
922
  op: p.op,
928
923
  path: p.path.replace(/\/+$/, ""),
929
924
  ...p.value != null && p.value !== "" ? { value: d(p.value) } : {},
930
925
  ...p.from != null && p.from !== "" ? { from: p.from } : {}
931
- }))].sort((p, C) => p.op !== "remove" || C.op !== "remove" ? 0 : C.path.localeCompare(p.path, void 0, { numeric: !0 })), m = structuredClone(
932
- ae(s)
926
+ }))].sort((p, S) => p.op !== "remove" || S.op !== "remove" ? 0 : S.path.localeCompare(p.path, void 0, { numeric: !0 })), h = structuredClone(
927
+ oe(s)
933
928
  );
934
929
  try {
935
- Ne(m, h, !0);
930
+ Ne(h, g, !0);
936
931
  } catch (p) {
937
932
  console.warn(
938
933
  "[SolutionBuilder] updateDesign JSON patch failed:",
939
- { error: p, llmResponse: o, patches: h, patchTarget: m }
934
+ { error: p, llmResponse: o, patches: g, patchTarget: h }
940
935
  );
941
- const C = f("applyChangeFailed", e);
936
+ const S = f("applyChangeFailed", e);
942
937
  return {
943
- outputMessage: C,
944
- summary: C,
938
+ outputMessage: S,
939
+ summary: S,
945
940
  status: "success"
946
941
  };
947
942
  }
948
- const c = _(
949
- { response: "", ...m },
943
+ const c = I(
944
+ { response: "", ...h },
950
945
  { itemId: s.solution?.itemId ?? null }
951
- ), g = H.safeParse(c);
952
- if (!g.success) {
946
+ ), m = G.safeParse(c);
947
+ if (!m.success) {
953
948
  console.warn(
954
949
  "[SolutionBuilder] updateDesign schema validation failed:",
955
- { errors: g.error.issues, llmResponse: o, patchedDesign: c }
950
+ { errors: m.error.issues, llmResponse: o, patchedDesign: c }
956
951
  );
957
952
  const p = f("applyChangeFailed", e);
958
953
  return {
@@ -961,11 +956,11 @@ Description: ${c.description}`).join(`
961
956
  status: "success"
962
957
  };
963
958
  }
964
- const { response: x, featureLayer: S, ...k } = g.data, q = re(
965
- S,
959
+ const { response: E, featureLayer: C, ..._ } = m.data, Se = ae(
960
+ C,
966
961
  s.featureLayer
967
- ), I = _(
968
- { ...k, featureLayer: q },
962
+ ), w = I(
963
+ { ..._, featureLayer: Se },
969
964
  {
970
965
  itemId: s.solution?.itemId,
971
966
  sourceBuildSolution: s.sourceBuildSolution,
@@ -974,21 +969,21 @@ Description: ${c.description}`).join(`
974
969
  }
975
970
  );
976
971
  let R = F(t.selectedTemplate);
977
- if (R?.initialTemplate || (await Q(e), R = F(t.selectedTemplate)), !R?.initialTemplate)
972
+ if (R?.initialTemplate || (await V(e), R = F(t.selectedTemplate)), !R?.initialTemplate)
978
973
  throw new Error("No hydrated templates are available for solution design.");
979
- const K = new me(I, R.initialTemplate, !1);
974
+ const K = new pe(w, R.initialTemplate, !1);
980
975
  if (!K.isValid)
981
976
  return console.warn(
982
977
  "[SolutionBuilder] updateDesign validation failed:",
983
- { issues: K.issues, llmResponse: o, patchedDesign: I }
978
+ { issues: K.issues, llmResponse: o, patchedDesign: w }
984
979
  ), {
985
980
  outputMessage: f("applyChangeFailed", e)
986
981
  };
987
- const Ie = I.sourceBuildSolution, Y = he(I, Ie);
988
- if (!Y.ok) {
982
+ const Ie = w.sourceBuildSolution, Q = ge(w, Ie);
983
+ if (!Q.ok) {
989
984
  console.warn(
990
985
  "[SolutionBuilder] updateDesign Esri JSON conversion failed:",
991
- { error: Y.error, llmResponse: o, design: I }
986
+ { error: Q.error, llmResponse: o, design: w }
992
987
  );
993
988
  const p = f("applyChangeFailed", e);
994
989
  return {
@@ -997,33 +992,33 @@ Description: ${c.description}`).join(`
997
992
  status: "success"
998
993
  };
999
994
  }
1000
- return ge(I), {
995
+ return me(w), {
1001
996
  outputMessage: a,
1002
997
  summary: a,
1003
998
  status: "success",
1004
- currentDesign: I
999
+ currentDesign: w
1005
1000
  };
1006
- }, Bt = (t) => t.currentDesign !== null ? "updateDesign" : "assessInitialRequest", Nt = (t) => !t.assessment || !t.assessment.isValidUseCase ? "invalidUseCaseExit" : !t.selectedTemplate && t.assessment.matchedTemplates.length > 1 ? "selectTemplateHIL" : "findExistingSolutions", qt = (t) => t.existingMatches.length > 0 ? "confirmContinueBuildingHIL" : "designSolution", Ut = (t) => t.continueBuilding === !1 ? "declineContinueBuildingExit" : "designSolution", Ot = () => new z(Et).addNode("syncCurrentDesignFromContext", At).addNode("assessInitialRequest", Dt).addNode("invalidUseCaseExit", Lt).addNode("selectTemplateHIL", Rt).addNode("findExistingSolutions", $t).addNode("confirmContinueBuildingHIL", Mt).addNode("declineContinueBuildingExit", Pt).addNode("designSolution", we).addNode("updateDesign", Ft).addEdge(j, "syncCurrentDesignFromContext").addConditionalEdges("syncCurrentDesignFromContext", Bt, {
1001
+ }, Pt = (t) => t.currentDesign !== null ? "updateDesign" : "assessInitialRequest", Nt = (t) => !t.assessment || !t.assessment.isValidUseCase ? "invalidUseCaseExit" : !t.selectedTemplate && t.assessment.matchedTemplates.length > 1 ? "selectTemplateHIL" : "findExistingSolutions", qt = (t) => t.existingMatches.length > 0 ? "confirmContinueBuildingHIL" : "designSolution", Ut = (t) => t.continueBuilding === !1 ? "declineContinueBuildingExit" : "designSolution", Ot = () => new O(Tt).addNode("syncCurrentDesignFromContext", At).addNode("assessInitialRequest", Dt).addNode("invalidUseCaseExit", Lt).addNode("selectTemplateHIL", Rt).addNode("findExistingSolutions", $t).addNode("confirmContinueBuildingHIL", Mt).addNode("declineContinueBuildingExit", Bt).addNode("designSolution", ve).addNode("updateDesign", Ft).addEdge(z, "syncCurrentDesignFromContext").addConditionalEdges("syncCurrentDesignFromContext", Pt, {
1007
1002
  updateDesign: "updateDesign",
1008
1003
  assessInitialRequest: "assessInitialRequest"
1009
1004
  }).addConditionalEdges("assessInitialRequest", Nt, {
1010
1005
  invalidUseCaseExit: "invalidUseCaseExit",
1011
1006
  selectTemplateHIL: "selectTemplateHIL",
1012
1007
  findExistingSolutions: "findExistingSolutions"
1013
- }).addEdge("invalidUseCaseExit", v).addEdge("selectTemplateHIL", "findExistingSolutions").addConditionalEdges("findExistingSolutions", qt, {
1008
+ }).addEdge("invalidUseCaseExit", x).addEdge("selectTemplateHIL", "findExistingSolutions").addConditionalEdges("findExistingSolutions", qt, {
1014
1009
  confirmContinueBuildingHIL: "confirmContinueBuildingHIL",
1015
1010
  designSolution: "designSolution"
1016
1011
  }).addConditionalEdges("confirmContinueBuildingHIL", Ut, {
1017
1012
  declineContinueBuildingExit: "declineContinueBuildingExit",
1018
1013
  designSolution: "designSolution"
1019
- }).addEdge("declineContinueBuildingExit", v).addEdge("designSolution", v).addEdge("updateDesign", v);
1014
+ }).addEdge("declineContinueBuildingExit", x).addEdge("designSolution", x).addEdge("updateDesign", x);
1020
1015
  await y(L, "description");
1021
- const zt = E.object({
1022
- tool: E.enum(["explorer", "builder", "other"]).describe("The selected tool based on the user's query."),
1023
- confidence: E.number().min(0).max(1).describe("A confidence score (0.00–1.00)."),
1024
- rationale: E.string().min(1).describe("A brief rationale for the tool choice (≤140 characters)"),
1025
- builderExclusion: E.boolean().describe("True only when tool is other specifically due to Builder Exclusion Override.")
1026
- }), B = /* @__PURE__ */ Object.assign({
1016
+ const zt = T.object({
1017
+ tool: T.enum(["explorer", "builder", "other"]).describe("The selected tool based on the user's query."),
1018
+ confidence: T.number().min(0).max(1).describe("A confidence score (0.00–1.00)."),
1019
+ rationale: T.string().min(1).describe("A brief rationale for the tool choice (≤140 characters)"),
1020
+ builderExclusion: T.boolean().describe("True only when tool is other specifically due to Builder Exclusion Override.")
1021
+ }), P = /* @__PURE__ */ Object.assign({
1027
1022
  "./prompts/assistantResponse.md": () => import("../../chunks/assistantResponse.js").then((t) => t.default),
1028
1023
  "./prompts/classifyIntent.md": () => import("../../chunks/classifyIntent.js").then((t) => t.default),
1029
1024
  "./prompts/description.md": () => import("../../chunks/description.js").then((t) => t.default),
@@ -1034,8 +1029,8 @@ const zt = E.object({
1034
1029
  detail: !1
1035
1030
  });
1036
1031
  window.dispatchEvent(t);
1037
- }, Se = b.Root({
1038
- ...J(),
1032
+ }, we = b.Root({
1033
+ ...j(),
1039
1034
  selectedTool: b({
1040
1035
  reducer: (t, e) => e ?? null,
1041
1036
  default: () => null
@@ -1050,7 +1045,7 @@ const zt = E.object({
1050
1045
  })
1051
1046
  }), jt = async (t, e) => {
1052
1047
  const s = N(e);
1053
- await w(
1048
+ await v(
1054
1049
  { text: s?.builderMessages.understandingRequest },
1055
1050
  e
1056
1051
  );
@@ -1062,7 +1057,7 @@ const zt = E.object({
1062
1057
  } catch {
1063
1058
  a = !1;
1064
1059
  }
1065
- const l = await y(B, "classifyIntent"), d = await D({
1060
+ const l = await y(P, "classifyIntent"), d = await D({
1066
1061
  promptText: l,
1067
1062
  modelTier: "advanced",
1068
1063
  temperature: 0,
@@ -1076,21 +1071,21 @@ const zt = E.object({
1076
1071
  builderExclusion: d.builderExclusion
1077
1072
  };
1078
1073
  }, Jt = async (t, e) => {
1079
- const n = await We().compile().invoke(t, e);
1074
+ const n = await Ke().compile().invoke(t, e);
1080
1075
  return W(), n;
1081
1076
  }, Gt = async (t, e) => {
1082
1077
  const n = await Ot().compile().invoke(t, e);
1083
1078
  return W(), n;
1084
1079
  }, Ht = async (t, e) => {
1085
1080
  const s = N(e), n = t.agentExecutionContext.userRequest, i = t.intentRationale ?? "No rationale available.", o = t.builderExclusion ? "responseOptionsBuilderExclusion" : "responseOptionsDefault";
1086
- await w(
1081
+ await v(
1087
1082
  { text: s?.executingSolutionsAssistantAgent },
1088
1083
  e
1089
1084
  );
1090
- const a = await y(B, "assistantResponse"), l = await y(
1091
- B,
1085
+ const a = await y(P, "assistantResponse"), l = await y(
1086
+ P,
1092
1087
  o
1093
- ), d = t.agentExecutionContext.messages.slice(-11), u = await Be({
1088
+ ), d = t.agentExecutionContext.messages.slice(-11), u = await Pe({
1094
1089
  promptText: a,
1095
1090
  modelTier: "advanced",
1096
1091
  temperature: 0,
@@ -1102,16 +1097,16 @@ const zt = E.object({
1102
1097
  summary: u,
1103
1098
  status: "success"
1104
1099
  };
1105
- }, Vt = (t) => t.selectedTool ?? "other", Qt = () => new z(Se).addNode("classifyIntent", jt).addNode("routeToExplorer", Jt).addNode("routeToBuilder", Gt).addNode("assistantResponse", Ht).addEdge(j, "classifyIntent").addConditionalEdges("classifyIntent", Vt, {
1100
+ }, Vt = (t) => t.selectedTool ?? "other", Wt = () => new O(we).addNode("classifyIntent", jt).addNode("routeToExplorer", Jt).addNode("routeToBuilder", Gt).addNode("assistantResponse", Ht).addEdge(z, "classifyIntent").addConditionalEdges("classifyIntent", Vt, {
1106
1101
  explorer: "routeToExplorer",
1107
1102
  builder: "routeToBuilder",
1108
1103
  other: "assistantResponse"
1109
- }).addEdge("routeToExplorer", v).addEdge("routeToBuilder", v).addEdge("assistantResponse", v), Wt = await y(B, "description"), Kt = {
1104
+ }).addEdge("routeToExplorer", x).addEdge("routeToBuilder", x).addEdge("assistantResponse", x), Kt = await y(P, "description"), Qt = {
1110
1105
  id: "solutionsAssistant",
1111
1106
  name: "Solutions Assistant Agent",
1112
- description: Wt,
1113
- createGraph: Qt,
1114
- workspace: Se
1107
+ description: Kt,
1108
+ createGraph: Wt,
1109
+ workspace: we
1115
1110
  }, Yt = "https://links.esri.com/solutions/agol-organizational-account", Zt = "https://links.esri.com/solutions/configure-assistants";
1116
1111
  class Xt extends ke {
1117
1112
  constructor() {
@@ -1119,13 +1114,13 @@ class Xt extends ke {
1119
1114
  aiAssistantsEnabled: !1,
1120
1115
  blockBetaApps: !0,
1121
1116
  colocateCompute: !1
1122
- }, this._suggestedPrompts = [], this._hasInteracted = !1, this._isMobile = window.innerWidth <= 800, this._translations = _e({ name: "arcgis-solutions-assistant", blocking: !0 }), this._builderWidth = 48, this._solutionDesignJson = '{ "solution": null }', this._isAssistantBusy = !1, this._isBuilderBusy = !1, this._preChatCheck = !1, this._assistantRef = $e(), this._configContextConsumer = te({
1117
+ }, this._suggestedPrompts = [], this._hasInteracted = !1, this._isMobile = window.innerWidth <= 800, this._translations = _e({ name: "arcgis-solutions-assistant", blocking: !0 }), this._builderWidth = 48, this._solutionDesignJson = '{ "solution": null }', this._isAssistantBusy = !1, this._isBuilderBusy = !1, this._preChatCheck = !1, this._assistantRef = $e(), this._configContextConsumer = ee({
1123
1118
  context: Ae,
1124
1119
  subscribe: !0,
1125
1120
  callback: (e) => {
1126
- e?.portalURL && (se.portalUrl = e.portalURL), e?.userSession && !this.userFirstName && this._loadUserFirstName(), e?.authentication?.PortalSubset?.orgSettings && (this._orgSettings = e?.authentication?.PortalSubset?.orgSettings);
1121
+ e?.portalURL && (te.portalUrl = e.portalURL), e?.userSession && !this.userFirstName && this._loadUserFirstName(), e?.authentication?.PortalSubset?.orgSettings && (this._orgSettings = e?.authentication?.PortalSubset?.orgSettings);
1127
1122
  }
1128
- }), this._builderDesignContextConsumer = te({
1123
+ }), this._builderDesignContextConsumer = ee({
1129
1124
  context: De,
1130
1125
  subscribe: !0,
1131
1126
  callback: (e) => {
@@ -1133,7 +1128,7 @@ class Xt extends ke {
1133
1128
  }
1134
1129
  }), this._handleResize = () => {
1135
1130
  this._isMobile = window.innerWidth <= 800;
1136
- }, this.closeAssistant = X(), this.assistantProcessing = X(), this._handleAssistantLinkClick = (e) => {
1131
+ }, this.closeAssistant = Z(), this.assistantProcessing = Z(), this._handleAssistantLinkClick = (e) => {
1137
1132
  const s = e.composedPath().find((n) => n instanceof HTMLAnchorElement);
1138
1133
  if (s?.href)
1139
1134
  if (e.preventDefault(), s.target.indexOf("solutionId:") > -1) {
@@ -1172,25 +1167,25 @@ class Xt extends ke {
1172
1167
  this._checkURLOpenParameter();
1173
1168
  }
1174
1169
  load() {
1175
- this._configContextConsumer.value?.portalURL && (se.portalUrl = this._configContextConsumer.value.portalURL);
1170
+ this._configContextConsumer.value?.portalURL && (te.portalUrl = this._configContextConsumer.value.portalURL);
1176
1171
  }
1177
1172
  firstUpdated(e) {
1178
1173
  this._loadUserFirstName();
1179
1174
  }
1180
1175
  willUpdate(e) {
1181
- e.has("open") && this.open && window.dispatchEvent(new CustomEvent("openAssistant")), this._configContextConsumer.value?.authentication && this._configContextConsumer.value?.userSession?.token && (this._preChatCheck || (ue(this._configContextConsumer.value?.authentication.Portal, this._configContextConsumer.value?.userSession?.token, this._configContextConsumer.value?.locale ?? "en"), this._preChatCheck = !0)), this._configContextConsumer.value?.userSession?.token && this._configContextConsumer.value?.authentication?.CanUseAI;
1176
+ e.has("open") && this.open && window.dispatchEvent(new CustomEvent("openAssistant")), this._configContextConsumer.value?.authentication && this._configContextConsumer.value?.userSession?.token && (this._preChatCheck || (de(this._configContextConsumer.value?.authentication.Portal, this._configContextConsumer.value?.userSession?.token, this._configContextConsumer.value?.locale ?? "en"), this._preChatCheck = !0)), this._configContextConsumer.value?.userSession?.token && this._configContextConsumer.value?.authentication?.CanUseAI;
1182
1177
  }
1183
1178
  _renderNoSign() {
1184
- return T`<calcite-notice class="margin-lg" open scale=m icon=effects kind=info><div slot=message>${this._translations.signInMessage}</div><calcite-link @click=${this._handleSignIn} slot=link title=${this._translations.signInMessage ?? ee} class="padding-top-10">${this._translations.signIn}</calcite-link></calcite-notice>`;
1179
+ return k`<calcite-notice class="margin-lg" open scale=m icon=effects kind=info><div slot=message>${this._translations.signInMessage}</div><calcite-link @click=${this._handleSignIn} slot=link title=${this._translations.signInMessage ?? X} class="padding-top-10">${this._translations.signIn}</calcite-link></calcite-notice>`;
1185
1180
  }
1186
1181
  _renderNoPermission() {
1187
- return T`<calcite-notice open scale=m icon=effects kind=info><div slot=title>${this._translations.noPermissionTitle}</div><div slot=message class="padding-top-10">${Ee(this._translations.noPermissionMessage.replace("{{orgUrl}}", Yt).replace("{{configAI}}", Zt))}</div></calcite-notice>`;
1182
+ return k`<calcite-notice open scale=m icon=effects kind=info><div slot=title>${this._translations.noPermissionTitle}</div><div slot=message class="padding-top-10">${Te(this._translations.noPermissionMessage.replace("{{orgUrl}}", Yt).replace("{{configAI}}", Zt))}</div></calcite-notice>`;
1188
1183
  }
1189
1184
  render() {
1190
1185
  let e = this._suggestedPrompts.length > 0 ? this._suggestedPrompts : this._hasInteracted ? [] : Object.values(this._translations.defaultFollowUpQuestions);
1191
- return this._suggestedPrompts.length > 0 ? e = this._suggestedPrompts : this._hasInteracted || (e = [...Object.values(this._translations.defaultFollowUpQuestions)]), T`<calcite-panel class="chat-panel"><div class="header-content" slot=header-content><span class="header-title">${this._translations.solutionAssistantTitle}</span></div>${this._configContextConsumer.value?.userSession?.token ? this._configContextConsumer.value?.authentication?.CanUseAI ? T`${!this._isMobile && T`<calcite-action id=solutionBuilderAction icon=pencil-square .text=${this._translations.tooltips.builder} text-enabled .indicator=${this.hasActiveBuilderDesign} .disabled=${!this.hasActiveBuilderDesign} .active=${this.builderVisible} selection-appearance=highlight @click=${() => {
1186
+ return this._suggestedPrompts.length > 0 ? e = this._suggestedPrompts : this._hasInteracted || (e = [...Object.values(this._translations.defaultFollowUpQuestions)]), k`<calcite-panel class="chat-panel"><div class="header-content" slot=header-content><span class="header-title">${this._translations.solutionAssistantTitle}</span></div>${this._configContextConsumer.value?.userSession?.token ? this._configContextConsumer.value?.authentication?.CanUseAI ? k`${!this._isMobile && k`<calcite-action id=solutionBuilderAction icon=pencil-square .text=${this._translations.tooltips.builder} text-enabled .indicator=${this.hasActiveBuilderDesign} .disabled=${!this.hasActiveBuilderDesign} .active=${this.builderVisible} selection-appearance=highlight @click=${() => {
1192
1187
  window.dispatchEvent(new CustomEvent("toggleSolutionBuilder"));
1193
- }} scale=m slot=header-actions-end></calcite-action>` || ""}${!this._isMobile && T`<calcite-tooltip placement=bottom reference-element=solutionBuilderAction><span>${this._translations.tooltips.solutionBuilder}</span></calcite-tooltip>` || ""}<arcgis-assistant reference-element copy-enabled feedback-enabled heading description entry-message=${this._translations.defaultStartUpMessage ?? ee} .suggestedPrompts=${e} @arcgisSubmit=${(s) => {
1188
+ }} scale=m slot=header-actions-end></calcite-action>` || ""}${!this._isMobile && k`<calcite-tooltip placement=bottom reference-element=solutionBuilderAction><span>${this._translations.tooltips.solutionBuilder}</span></calcite-tooltip>` || ""}<arcgis-assistant reference-element copy-enabled feedback-enabled heading description entry-message=${this._translations.defaultStartUpMessage ?? X} .suggestedPrompts=${e} @arcgisSubmit=${(s) => {
1194
1189
  console.log("arcgis submit: ", s.detail), this._suggestedPrompts = [], e = [], this._hasInteracted = !0;
1195
1190
  const n = Date.now(), i = Re(n), o = s.detail || "Unknown";
1196
1191
  this._telemetry?.logEvent({
@@ -1207,9 +1202,9 @@ class Xt extends ke {
1207
1202
  this._queryElementInShadowDom(this.el, ".footer-container", !1);
1208
1203
  }} @arcgisInterruptSubmit=${() => {
1209
1204
  this._queryElementInShadowDom(this.el, ".footer-container", !1);
1210
- }} ${Me(this._assistantRef)}><calcite-label alignment=start slot=entry-actions-start layout=inline scale=s><calcite-action id=newChatButton icon=speech-bubble-plus .text=${this._translations.tooltips.newChat} @click=${() => {
1205
+ }} ${Me(this._assistantRef)}><calcite-button appearance=solid id=newChatButton icon-start=speech-bubble-plus kind=neutral .label=${this._translations.tooltips.newChat} @click=${() => {
1211
1206
  this._conversationId = void 0, this._suggestedPrompts = [], this._hasInteracted = !1, this._assistantRef.value?.clearChatHistory(), this._queryElementInShadowDom(this.el, ".footer-container", !1);
1212
- }} scale=s></calcite-action>${this._translations.tooltips.newChat}</calcite-label><arcgis-assistant-agent .agent=${Kt} .context=${{
1207
+ }} round scale=s slot=entry-actions-start>${this._translations.tooltips.newChat}</calcite-button><arcgis-assistant-agent .agent=${Qt} .context=${{
1213
1208
  token: this._configContextConsumer.value?.userSession?.token,
1214
1209
  configContext: this._configContextConsumer.value,
1215
1210
  convoId: this._conversationId,
@@ -1217,9 +1212,6 @@ class Xt extends ke {
1217
1212
  assistantRef: this._assistantRef,
1218
1213
  translations: this._translations,
1219
1214
  solutionDesignJson: this._solutionDesignJson,
1220
- updateSuggestedPrompts: (s) => {
1221
- this._suggestedPrompts = s;
1222
- },
1223
1215
  setConversationId: (s) => {
1224
1216
  this._conversationId = s;
1225
1217
  },
@@ -1245,14 +1237,14 @@ class Xt extends ke {
1245
1237
  }
1246
1238
  }
1247
1239
  _parseAgentPickedAndTask(e) {
1248
- const s = Array.from(this._assistantRef.value?.messages || []), n = e.log || [], a = [...s].sort((c, g) => g.id - c.id).find((c) => c.role === "user" && c.id <= e.id)?.content || null, l = n.find((c) => typeof c == "string" && c.includes("Agent picked:")) ?? null;
1240
+ const s = Array.from(this._assistantRef.value?.messages || []), n = e.log || [], a = [...s].sort((c, m) => m.id - c.id).find((c) => c.role === "user" && c.id <= e.id)?.content || null, l = n.find((c) => typeof c == "string" && c.includes("Agent picked:")) ?? null;
1249
1241
  if (!l)
1250
1242
  return { agentPicked: null, taskAssigned: null, userMessage: a };
1251
1243
  const d = /Agent picked:\s*(.*?)\s*(?:\\n|\r?\n)\s*Task Assigned:\s*([\s\S]*)$/i, u = l.match(d);
1252
1244
  if (!u)
1253
1245
  return { agentPicked: null, taskAssigned: null, userMessage: a };
1254
- const h = u[1].trim(), m = u[2].trim();
1255
- return { agentPicked: h, taskAssigned: m, userMessage: a };
1246
+ const g = u[1].trim(), h = u[2].trim();
1247
+ return { agentPicked: g, taskAssigned: h, userMessage: a };
1256
1248
  }
1257
1249
  _emitItemIdFromAI(e) {
1258
1250
  const s = new CustomEvent("solutionIDFromAssistant", {