@esri/solutions-components 5.1.0-next.162 → 5.1.0-next.163

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.
@@ -78,7 +78,7 @@ Description: {description}`,Cz=A.object({schemaVersion:A.literal(Bf),modified:A.
78
78
  Available prompts:
79
79
  ${Object.keys(t).join(`
80
80
  `)}`);return await r[1]()}function Co(t){return t?.configurable?.context?.translations}function Wc(t){if(typeof window>"u"||t.length<=1)return;let e=t.map(n=>n.solution.id),r=t.map(n=>n.solution.title);window.dispatchEvent(new CustomEvent("searchTermSet",{detail:{scope:"all-solutions",searchTerm:""}})),window.dispatchEvent(new CustomEvent("solutionMatchesFromAssistant",{detail:{solutionIds:e,solutionTitles:r},bubbles:!0,composed:!0})),window.dispatchEvent(new CustomEvent("navTabSelected",{detail:{tabType:"all-solutions"}}))}function Hc(t){if(typeof window>"u"||!t)return;let e=new CustomEvent("solutionIDFromAssistant",{detail:t,bubbles:!0,composed:!0});window.dispatchEvent(e)}var ph=A.object({needsContext:A.boolean().describe("True when the explorer query requires added context from prior turns."),rewrittenQuery:A.string().min(1).describe("The final query to send to doc AI. Keep original query if no context is needed.")}),Jc=Object.assign({"./prompts/solutions_explorer_description.md":()=>import("./AS6VINEU.js").then(t=>t.default),"./prompts/transformQuery.md":()=>import("./SNZRQPXI.js").then(t=>t.default)});function dh(t){return t.replace(/<sup>\[\[(\d+)\]\]\(([^)]+)\)<\/sup>/g,'<sup><a href="$2">&#91;$1&#93;</a></sup>')}function mh(t){return t.replace(/!\[([^\]]*)\]\(([^)]+)\)/g,(e,r,n)=>`<img src="${n}" alt="${r}" style="width: 100%;">`)}function fh(t,e){let r=[];return(e?.configurable?.context?.configContext.allCards??[]).forEach(n=>{let s=n.title;if(!s)return;let o=new RegExp(`(?<![\\p{L}\\p{N}])${s}(?![\\p{L}\\p{N}])`,"giu"),i=!1;t=t.replace(o,(a,u,l)=>{let p=l.slice(0,u);return/<img[^>]*alt\s*=\s*["'][^"']*$/i.test(p)?a:(i=!0,`<a href="" target="solutionId:${n.deployCommonId}">${s}</a>`)}),i&&r.push({solution:{title:n.title,id:n.deployCommonId,snippet:n.snippet,description:n.description},score:100})}),{source:t,allMatches:r}}function hh(t){return t&&t.helperServices.aiAssistantServices?`${t.helperServices.aiAssistantServices.url}/skills/doc_ai_assistant/chat`:null}function Vc(t){return t&&t.helperServices.aiAssistantServices?`${t.helperServices.aiAssistantServices.url}/skills/doc_ai_assistant/api/pre-chat`:null}async function ua(t,e,r){let n=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json",token:r},body:JSON.stringify(t)});if(!n.ok)throw new Error(`HTTP ${n.status} calling ${e}`);return n.json()}var gh=t=>new Promise(e=>setTimeout(e,t));async function _h(t,e){let r=t.agentExecutionContext.userRequest,n=e?.configurable?.context?.lastTurnAgent,s=t.agentExecutionContext.messages??[];if(!n||s.length<=1||n==="explorer")return r;try{let o=await he(Jc,"transformQuery"),i=await Ve({promptText:o,modelTier:"fast",temperature:0,schema:ph,messages:s.slice(-11),inputVariables:{query:r,lastTurnAgent:n}});if(i.needsContext&&i.rewrittenQuery.trim())return console.debug(`Rephrased query from "${r}" to "${i.rewrittenQuery.trim()}"`),i.rewrittenQuery.trim()}catch{}return r}var yh=z.Root({...ho(),solutionResponse:z({reducer:(t,e)=>e??null,default:()=>null}),documentSkillUrl:z({reducer:(t,e)=>e??null,default:()=>null}),conversationId:z({reducer:(t,e)=>e??t,default:()=>null})}),wh=()=>new er(yh).addNode("initializeAgent",bh).addNode("askSolutionsQuestions",Ah).addEdge(Xt,"initializeAgent").addEdge("initializeAgent","askSolutionsQuestions").addEdge("askSolutionsQuestions",pe),Zc=async(t,e,r,n)=>{if(!t)return;let s=Vc(t);if(!s)return;let o={context:{kind:"DocAIAssistantRequest",filters:{products:"ArcGIS Solutions",persona:{persona:"apps-solutions"},pipeline:{translation:{allow:!0,language:r,use_llm:!1}}}}};n&&(o.conversationId=n),ua(o,s,e??"")},Ah=async(t,e)=>{if(e?.configurable?.abortSignal?.aborted)return{};let r=Co(e),n=t.documentSkillUrl,s=[],o=await _h(t,e);await Te({text:r.agentProgress.explorerAgentSearching},e);let i=await ua({message:o,conversationId:e?.configurable?.context?.convoId??void 0,context:{kind:"DocAIAssistantRequest",filters:{products:"ArcGIS Solutions",persona:{persona:"apps-solutions"},pipeline:{translation:{allow:!0,language:e?.configurable?.context?.configContext.locale??"en",use_llm:!1}}}}},n,e?.configurable?.context?.token??"");i.conversationId&&e?.configurable?.context?.setConversationId&&e.configurable.context.setConversationId(i.conversationId);let a={message:i.message,conversationId:i.conversationId,hasMore:i.hasMore,ackSequenceNumber:i.sequenceNumber,inquiryId:i.inquiryId},u="",l=async p=>{let m=p.context?.results?.[0]?.reply??"";if(m!==""){let h=dh(m),b=mh(h),I=fh(b,e);u=I.source,s=[...s,...I.allMatches.filter(R=>!s.some(g=>g.solution.id===R.solution.id))]}let _=p.context?.results?.[0]?.status?.currentStatusStep;if(_){let h="";_===1?h=r.agentProgress.explorerAgentReading:_===2?h=r.agentProgress.explorerAgentReviewing:_===3&&(h=r.agentProgress.explorerAgentPreparing),await Te({text:h},e)}};for(await l(i);a.hasMore;){if(e?.configurable?.abortSignal?.aborted)return{};await gh(500),i=await ua({conversationId:a.conversationId,ackSequenceNumber:a.ackSequenceNumber,inquiryId:a.inquiryId},n,e?.configurable?.context?.token??""),a={message:i.message,conversationId:i.conversationId,hasMore:i.hasMore,ackSequenceNumber:i.sequenceNumber,inquiryId:i.inquiryId},await l(i)}return Vc(e?.configurable?.context.portal)&&Zc(e?.configurable?.context.portal,e?.configurable?.context.token??"",e?.configurable?.context.configContext.locale??"en",a.conversationId),s.length&&(s.length===1?Hc(s[0].solution.id):Wc(s)),{outputMessage:u,summary:u,status:"success",solutionResponse:a,conversationId:a.conversationId}},bh=async(t,e)=>{let r=null;return t.documentSkillUrl===null&&e?.configurable?.context?.portal&&(r=hh(e.configurable.context.portal)),{documentSkillUrl:r}};await he(Jc,"solutions_explorer_description");var Gc=t=>{if(t&&Array.isArray(t.id)&&t.id.length>0)return t.id[t.id.length-1].replace("Message","").toLowerCase();if(t&&typeof t._getType=="function")try{return t._getType()}catch{return"human"}return"human"},Ih=t=>{let e=Gc(t);if(t&&t.kwargs)return{role:e,...t.kwargs};if(t&&typeof t=="object"){let r={role:e,content:typeof t.content=="string"?t.content:String(t.content||"")};return t.id&&(r.id=t.id),t.name&&(r.name=t.name),t.additional_kwargs&&(r.additional_kwargs=t.additional_kwargs),t.response_metadata&&(r.response_metadata=t.response_metadata),r}return{role:"human",content:String(t)}},xh=t=>Gc(t)==="human",vh=(t,e=3)=>t.filter(r=>xh(r)).slice(-e).map(Ih),Th=(t,e=" ")=>vh(t).map(r=>r.content).join(e).trim(),Ch={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\u2019ll 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?"},Ph={builderMessages:Ch},To=class{constructor(e,r,n=!0){this.isValid=!0,this.issues=[],this.fieldNameRegistry=null,this.response=e,this.template=r,this.newDesign=n,this.validate()}validate(){this.compareModels(),this.validateResponse()}compareModels(){this._compareStrings(),this._compareItems(),this._compareFeatureLayers()}validateResponse(){this._validateSolutionProps(),this._validateItems(),this._validateFeatureLayer()}_compareStrings(){let e=new Set(this.template.solution.strings.map(n=>n.key)),r=new Set(this.response.solution.strings.map(n=>n.key));e.size===r.size&&[...e].every(n=>r.has(n))||this._logIssue("String keys in llm response do not match the template.");for(let n of this.response.solution.strings)n.value||this._logIssue(`String key '${n.key}' has no value in the design. It must be populated.`)}_compareItems(){let e=new Set(this.template.items.map(n=>n.id)),r=new Set(this.response.items.map(n=>n.id));e.size===r.size&&[...e].every(n=>r.has(n))||this._logIssue("Item IDs in design do not match the template.")}_compareFeatureLayers(){let e=this.template.featureLayer,r=this.response.featureLayer;if(e.itemId!==r.itemId){this._logIssue(`Feature Layer itemId '${r.itemId}' does not match template '${e.itemId}'.`);return}if(!e.addLayers){let n=new Set(e.layers.map(o=>o.id)),s=new Set(r.layers.map(o=>o.id));if(!(n.size===s.size&&[...n].every(o=>s.has(o))))this._logIssue(`Feature Layer '${e.itemId}' had its layer ids altered.`);else for(let o of e.layers)if(o.type){let i=r.layers.find(a=>a.id===o.id);i&&i.type!==o.type&&this._logIssue(`Layer '${o.id}' type '${i.type}' does not match template type '${o.type}'. This layer type is immutable.`)}}}_validateSolutionProps(){let e=this.response.solution.title,r=this.response.solution.description,n=Is(e??"");if(n.isValid||this._logIssue(`Solution title is invalid (${n.errorType}).`),r){let s=xs(r,2048,!0);s.isValid||this._logIssue(`Solution description is invalid (${s.errorType}).`)}}_validateItems(){let e=new Set(["Feature Layer (hosted)","Feature Layer (hosted, view)"]);for(let r of this.response.items){e.has(r.type)&&r.title.length>100&&this._logIssue(`Service name '${r.title}' exceeds 100 characters.`);let n=Is(r.title??"");if(n.isValid||this._logIssue(`Item '${r.id}' title is invalid (${n.errorType}).`),r.description){let s=xs(r.description,2048,!0);s.isValid||this._logIssue(`Item '${r.id}' description is invalid (${s.errorType}).`)}}}_validateFeatureLayer(){let e=this.template.featureLayer.layers;this.response.featureLayer.layers.length||this._logIssue("Feature layer item must contain at least one layer.");let r=this.response.featureLayer.layers.map(n=>n.name.toLowerCase());r.length!==new Set(r).size&&this._logIssue(`Layer names must be unique (case-insensitive). Layer names in design: ${r}.`);for(let n of this.response.featureLayer.layers){this._validateLayer(n,this.response.featureLayer.addLayers);let s=e.find(o=>o.id===n.id);s&&this._validateRequiredFields(n,s)}}_validateRequiredFields(e,r){let n=new Set(e.requiredFields.map(s=>s.name));for(let s of r.requiredFields)n.has(s.name)||this._logIssue(`Layer '${e.name}' is missing required field '${s.name}'.`)}_validateLayer(e,r){!r&&e.typeMutable===!0&&e.type==="Table"&&this._logIssue(`Layer '${e.name}' cannot be a Table. It may be a Point, Line, or Polygon.`);let n=Is(e.name??"");if(n.isValid||this._logIssue(`Layer '${e.name}' name is invalid (${n.errorType}).`),e.description){let s=xs(e.description,2048,!0);s.isValid||this._logIssue(`Layer '${e.name}' description is invalid (${s.errorType}).`)}this._validateLayerFields(e)}_validateLayerFields(e){let r=new Set(["objectid","globalid","created_date","created_user","last_edited_date","last_edited_user"]),n=e.customFields.map(l=>l.name),s=new Set(e.requiredFields.map(l=>l.name)),o=[...new Set(n.filter(l=>r.has(l)))];for(let l of o)this._logIssue(`Layer '${e.name}' field '${l}' collides with a reserved system field name.`);let i=[...new Set(n.filter(l=>s.has(l)))];for(let l of i)this._logIssue(`Layer '${e.name}' field '${l}' collides with a required field name.`);if(!o.length&&!i.length){let l=e.systemFields??[],p=[...e.customFields,...e.requiredFields,...l].map(m=>m.name);p.length!==new Set(p).size&&this._logIssue(`Layer '${e.name}' has duplicate fields: ${JSON.stringify(p)}.`)}let a=e.systemFields??[],u=[...e.customFields,...e.requiredFields,...a].map(l=>l.name.toLowerCase());this.fieldNameRegistry=new Set(u);for(let l of[...e.customFields,...e.requiredFields])this._validateField(l);this.fieldNameRegistry=null}_getUniqueTruncatedFieldName(e){let r=this.fieldNameRegistry;if(!r)return e.slice(0,31);let n=e.toLowerCase();r.delete(n);let s=e.slice(0,31),o=s,i=1;for(;r.has(o.toLowerCase());){let a=`_${i}`,u=Math.max(1,31-a.length);o=`${s.slice(0,u)}${a}`,i+=1}return r.add(o.toLowerCase()),o}_validateField(e){let r=/^\p{L}/u,n=/^.[\p{L}\p{M}\p{N}_]*$/u;if(e.alias||this._logIssue(`Field '${e.name}' has no display name (alias).`),r.test(e.name)||this._logIssue(`Field '${e.name}' does not start with a letter.`),n.test(e.name)||this._logIssue(`Field '${e.name}' contains invalid characters (only letters from any writing system, numbers, and underscores are allowed; emojis and punctuation are not allowed).`),e.name.length>31)if(this.newDesign){let s=e.name;e.name=this._getUniqueTruncatedFieldName(e.name),console.debug(`Field '${s}' exceeds 31 characters. Auto-fixing to '${e.name}'.`)}else this._logIssue(`Field '${e.name}' exceeds 31 characters.`);if(Ga.has(e.name.toLowerCase()))if(this.newDesign){let s=e.name;e.name=`${s}_`,console.debug(`Field '${s}' is a SQL reserved keyword. Auto-fixing to '${e.name}'.`)}else this._logIssue(`Field '${e.name}' is a SQL reserved keyword.`);if(e.type==="string"&&this._validateStringFieldLength(e),Array.isArray(e.choiceList)&&(e.type!=="string"&&this._logIssue(`Field '${e.name}' must be of type 'string' to have a domain.`),e.choiceList.length||this._logIssue(`Field '${e.name}' has an empty domain. At least one value is required.`),e.choiceList.some(s=>!s?.trim())&&this._logIssue(`A blank domain value was added to Field '${e.name}'.`),e.choiceList.length!==new Set(e.choiceList).size&&this._logIssue(`Field '${e.name}' has duplicate domain values.`),e.length!=null)){let s=Math.max(...e.choiceList.map(o=>o.length));s>e.length&&(this.newDesign?(console.debug(`The choice provided for field '${e.name}' is too long. It must fit within ${e.length} characters, but the choice requires ${s} characters. Auto-fixing to ${s}.`),e.length=s):this._logIssue(`The choice provided for field '${e.name}' is too long. It must fit within ${e.length} characters, but the choice requires ${s} characters.`))}}_validateStringFieldLength(e){if(this.newDesign&&e.length===255&&(e.length=256),typeof e.length!="number"||Number.isNaN(e.length)){this._handleInvalidStringFieldLength(e,256);return}let r=e.length;if(!Ya(r).isValid){let n=r>4e3?4e3:256;this._handleInvalidStringFieldLength(e,n)}}_handleInvalidStringFieldLength(e,r){this.newDesign?(console.debug(`Field '${e.name}' has an invalid length. Auto-fixing to ${r}.`),e.length=r):this._logIssue(`Field '${e.name}' length is invalid (must be a number between 1 and 4000).`)}_logIssue(e){console.debug(e),this.issues.push(e),this.isValid=!1}},Oh=v.object({key:v.string().describe("Stable key identifier for the string."),value:v.string().describe("Display value for the string."),description:v.string().describe("Explanation of where/how the string is used.")}),kh=v.object({id:v.string().describe("ArcGIS item id (32 hex characters)."),title:v.string().describe("Item title."),description:v.string().describe("Item description."),type:v.enum(["Feature Layer (hosted)","Feature Layer (hosted, view)","Web Map","Instant App","Dashboard","Web Experience","Form","Table (hosted)","Table (hosted, view)","Hub Site Application","Hub Page","CSV","Data Pipeline","Desktop Application Template","Group","Notebook","QuickCapture Project"]).describe("ArcGIS item type.")}),qc=v.object({name:v.string().describe("Field name."),type:v.enum(["string","integer","double","date","oid","guid","globalid"]).describe("Field data type."),alias:v.string().describe("Field alias for display."),description:v.string().describe("Field description."),choiceList:v.array(v.string()).nullable().describe("List of allowed values for string fields with a controlled vocabulary. Null if unrestricted or not applicable."),length:v.number().int().nullable().describe("Maximum string length for string fields. Null for non-string fields.")}),Sh=v.object({id:v.number().int().describe("Layer/table id within the feature service."),type:v.enum(["Point","Polyline","Polygon","Table"]).describe("Layer type."),typeMutable:v.boolean().describe("Indicates whether the layer type can be changed."),name:v.string().describe("Layer/table name."),description:v.string().describe("Layer/table description."),customFields:v.array(qc).describe("User/business fields specific to the solution."),requiredFields:v.array(qc).describe("Fields required for solution functionality (e.g., relationship keys).")}),Eh=v.object({itemId:v.string().describe("ArcGIS item id for the feature layer."),addLayers:v.boolean().describe("Indicates whether new layers can be added during solution design."),layers:v.array(Sh)}),pa=v.object({response:v.string().describe("Conversational response to the user's query."),solution:v.object({itemId:v.string().nullable().describe("ArcGIS item id of the source Solution template used for deployment. Preserve the existing value exactly when known; otherwise use null."),title:v.string().describe("Title of the solution."),description:v.string().describe("Description of the solution."),tags:v.array(v.string()).describe("Keywords/tags associated with the solution."),strings:v.array(Oh).describe("Localized strings/labels used by apps (dashboards, forms, etc.).")}),items:v.array(kh).describe("ArcGIS items that belong to the solution (apps, maps, layers, etc.)."),featureLayer:Eh.describe("Primary feature layer item and its schema/layers/tables details.")}),Mh=v.object({op:v.enum(["add","remove","replace","move","copy"]).describe("RFC 6902 operation type."),path:v.string().describe("RFC 6901 JSON Pointer to the target location."),value:v.string().nullable().describe(`JSON-encoded value to apply (required for add and replace). Must be null \u2014 not an empty string \u2014 for remove, move, and copy operations. Serialize as a JSON string, e.g. '\\"text\\"' for a string, '[\\"a\\",\\"b\\"]' for an array, or '{\\"name\\":\\"x\\"}' for an object.`),from:v.string().nullable().describe("RFC 6901 JSON Pointer to the source location (required for move and copy). Must be null \u2014 not an empty string \u2014 for all other operations.")}),Rh=v.object({response:v.string().describe("Conversational response describing the accepted design changes."),patches:v.array(Mh).describe("Minimal RFC 6902 patch operations needed to update the current design.")}),$h=v.object({response:v.string().describe("Short, user-friendly explanation of why the requested update was not applied.")}),Nh=v.object({assistantResponse:v.string().describe("Natural-language response for the user."),isValidUpdate:v.boolean().describe("True only when the request is in scope for supported design updates.")}),Lh=v.object({matchedTitles:v.array(v.string()).describe("Titles of solutions that match the user's request. Empty array if no strong match.")}),Dh=v.object({templateId:v.string().min(1).describe("Template id from the available template list."),confidence:v.number().min(0).max(1).describe("Confidence score from 0 to 1 for this template match."),templateDescription:v.string().min(1).describe("Short action\u2011oriented description of the template in the user's use case/workflow, starting with a verb.")}),jh=v.object({assistantResponse:v.string().nullable().describe("Natural-language response for the user."),isValidUseCase:v.boolean().describe("True only when the request is concrete, appropriate, and has at least one matching template."),matchedTemplates:v.array(Dh).describe("Ordered list of matching templates, best match first. Empty when no valid match exists.")}),zh=t=>t.length?t.map((e,r)=>`${r+1}. ${e}`).join(`
81
- `):"No validation errors were provided.",Uh=async t=>{let{query:e,validationIssues:r,recentMessages:n,fallbackMessage:s,promptModules:o}=t;try{return(await Ve({promptText:await he(o,"explainValidationFailure"),modelTier:"fast",temperature:0,schema:$h,messages:n,inputVariables:{query:e,validationIssueCount:String(r.length),validationIssues:zh(r)}})).response?.trim()||s}catch(i){return console.warn("Natural language response failed:",{error:i}),s}},da=t=>t in tr,Fh=5,Bh=.8,Kh=.5,qh="Web Mapping Application",Wh="Embeddings",Io=null,la=null,xo=null,vo=null,Hh="Build",Gt=Object.assign({"./prompts/assessBuildRequest.md":()=>import("./IE5TTSUW.js").then(t=>t.default),"./prompts/assessUpdateRequest.md":()=>import("./QLX3XORL.js").then(t=>t.default),"./prompts/description.md":()=>import("./E25ZWVBK.js").then(t=>t.default),"./prompts/designSolution.md":()=>import("./VXGLGWIF.js").then(t=>t.default),"./prompts/explainValidationFailure.md":()=>import("./I5E3PM26.js").then(t=>t.default),"./prompts/findExistingSolution.md":()=>import("./LPFG5XTA.js").then(t=>t.default),"./prompts/updateDesign.md":()=>import("./MDKHW7NM.js").then(t=>t.default)}),Jh=Ph.builderMessages,q=t=>t?.configurable?.abortSignal.aborted??!1,Q=(t,e,r)=>Co(e)?.builderMessages?.[t]??Jh[t],Yc=t=>{typeof window<"u"&&window.dispatchEvent(new CustomEvent("arcgis-solution-design-update",{detail:t}))},Vh=async(t,e,r)=>{if(!t)return null;let n=`type:"${qh}" AND typekeywords:${Wh} AND group:${t}`;return(await Mo({q:n,params:e?{token:e}:void 0,portal:r,num:1}))?.results?.[0]??null};async function Zh(t,e,r,n){try{let s=await Vh(t,e,r);if(!s||q(n))return null;let o=new uh({id:s.id});return await o.load(),q(n)?null:await o.fetchData("json")}catch{return null}}var Gh=async(t,e,r)=>{if(!t)return[];let n=`type:Solution AND typekeywords:${Hh} AND group:${t}`;return(await Mo({q:n,params:e?{token:e}:void 0,portal:r,num:100}))?.results??[]},Yh=async(t,e,r)=>{try{let n=await Ea(t,{params:e?{token:e}:void 0,portal:r}),s=n?.buildSolution;if(!s)return null;let o=n?.params,i=o&&typeof o=="object"&&!Array.isArray(o)?o:null;return{buildSolution:s,params:i}}catch{return null}},Yt=(t,e={})=>{let r=t;return"itemId"in e&&(r={...r,solution:{...r.solution,itemId:e.itemId??null}}),e.sourceBuildSolution!=null&&(r={...r,sourceBuildSolution:e.sourceBuildSolution}),"params"in e&&(r={...r,params:e.params??null}),"templateId"in e&&(r={...r,templateId:e.templateId??null}),r},Xc=(t,e)=>{if(t==null||e==null)return{ok:!1,error:"design or sourceBuildSolution is null/undefined"};try{let r=structuredClone(e);return new qo({buildSolution:r}).applyLlmTemplate(t),{ok:!0}}catch(r){return{ok:!1,error:r instanceof Error?r.stack??r.message:String(r)}}},ma=async t=>{if(la){Object.entries(la).forEach(([i,a])=>{tr[i]&&(tr[i].initialTemplate=a)});return}let e=t?.configurable?.context?.token,r=ep(t),n=tp(t);if(!r){console.warn("Solution Builder: missing primarySolutionsGroupId in appConfig; skipping live template hydration.");return}let s=await Gh(r,e,n),o={};q(t)||(await Promise.all(s.map(async i=>{let a=i.properties?.templateInfo;if(!a||typeof a!="object")return;let u=a.id;if(typeof u!="string"||o[u])return;let l=await Yh(i.id,e,n);if(!l||q(t))return;let{buildSolution:p,params:m}=l;if(typeof p=="object"&&p!==null&&"solution"in p){let h=p.solution;h.thumbnailUrl=i.thumbnail?`${n??"https://www.arcgis.com/sharing/rest"}/content/items/${i.id}/info/${i.thumbnail}`:void 0,h.item=i}let _={...a,buildSolution:p};o[u]=Yt(new qo(_).dumpToLlmTemplate(),{itemId:i.id,sourceBuildSolution:structuredClone(p),params:m?structuredClone(m):null}),tr[u]={...a,initialTemplate:o[u]}})),la=o)},Qc=t=>{let e=t?.configurable?.context?.token;return typeof e!="string"||!e.trim()?null:e},ep=t=>{let e=t?.configurable?.context?.configContext?.primarySolutionsGroupId;return typeof e!="string"||!e.trim()?null:e},tp=t=>{let e=t?.configurable?.context?.configContext?.portalURL;if(!(typeof e!="string"||!e.trim()))return`${e.replace(/\/+$/,"")}/sharing/rest`},Xh=async t=>{await Promise.all([np(t),ma(t)])},rp=async t=>{let e=Qc(t);(!xo||e&&e!==vo)&&(vo=e??vo,xo=Xh(t).catch(r=>{throw xo=null,vo=null,r})),await xo};async function np(t){if(Io)return Io;let e=ep(t);if(!e)return console.warn("Solution Builder: missing primarySolutionsGroupId in appConfig; skipping embeddings load."),null;let r=tp(t),n=t?.configurable?.context?.configContext?.portalURL;if(await new lh(n?{url:n}:void 0).load(),q(t))return null;let s=Qc(t)??void 0,o=await Zh(e,s,r,t);return q(t)?null:o?(Io=o.items,Io):null}var Qh=()=>Object.entries(tr).map(([t,e])=>`ID: ${t}
81
+ `):"No validation errors were provided.",Uh=async t=>{let{query:e,validationIssues:r,recentMessages:n,fallbackMessage:s,promptModules:o}=t;try{return(await Ve({promptText:await he(o,"explainValidationFailure"),modelTier:"fast",temperature:0,schema:$h,messages:n,inputVariables:{query:e,validationIssueCount:String(r.length),validationIssues:zh(r)}})).response?.trim()||s}catch(i){return console.warn("Natural language response failed:",{error:i}),s}},da=t=>t in tr,Fh=5,Bh=.8,Kh=.5,qh="Web Mapping Application",Wh="Embeddings",Io=null,la=null,xo=null,vo=null,Hh="Build",Gt=Object.assign({"./prompts/assessBuildRequest.md":()=>import("./IE5TTSUW.js").then(t=>t.default),"./prompts/assessUpdateRequest.md":()=>import("./QLX3XORL.js").then(t=>t.default),"./prompts/description.md":()=>import("./E25ZWVBK.js").then(t=>t.default),"./prompts/designSolution.md":()=>import("./VXGLGWIF.js").then(t=>t.default),"./prompts/explainValidationFailure.md":()=>import("./I5E3PM26.js").then(t=>t.default),"./prompts/findExistingSolution.md":()=>import("./LPFG5XTA.js").then(t=>t.default),"./prompts/updateDesign.md":()=>import("./MDKHW7NM.js").then(t=>t.default)}),Jh=Ph.builderMessages,q=t=>t?.configurable?.abortSignal?.aborted??!1,Q=(t,e,r)=>Co(e)?.builderMessages?.[t]??Jh[t],Yc=t=>{typeof window<"u"&&window.dispatchEvent(new CustomEvent("arcgis-solution-design-update",{detail:t}))},Vh=async(t,e,r)=>{if(!t)return null;let n=`type:"${qh}" AND typekeywords:${Wh} AND group:${t}`;return(await Mo({q:n,params:e?{token:e}:void 0,portal:r,num:1}))?.results?.[0]??null};async function Zh(t,e,r,n){try{let s=await Vh(t,e,r);if(!s||q(n))return null;let o=new uh({id:s.id});return await o.load(),q(n)?null:await o.fetchData("json")}catch{return null}}var Gh=async(t,e,r)=>{if(!t)return[];let n=`type:Solution AND typekeywords:${Hh} AND group:${t}`;return(await Mo({q:n,params:e?{token:e}:void 0,portal:r,num:100}))?.results??[]},Yh=async(t,e,r)=>{try{let n=await Ea(t,{params:e?{token:e}:void 0,portal:r}),s=n?.buildSolution;if(!s)return null;let o=n?.params,i=o&&typeof o=="object"&&!Array.isArray(o)?o:null;return{buildSolution:s,params:i}}catch{return null}},Yt=(t,e={})=>{let r=t;return"itemId"in e&&(r={...r,solution:{...r.solution,itemId:e.itemId??null}}),e.sourceBuildSolution!=null&&(r={...r,sourceBuildSolution:e.sourceBuildSolution}),"params"in e&&(r={...r,params:e.params??null}),"templateId"in e&&(r={...r,templateId:e.templateId??null}),r},Xc=(t,e)=>{if(t==null||e==null)return{ok:!1,error:"design or sourceBuildSolution is null/undefined"};try{let r=structuredClone(e);return new qo({buildSolution:r}).applyLlmTemplate(t),{ok:!0}}catch(r){return{ok:!1,error:r instanceof Error?r.stack??r.message:String(r)}}},ma=async t=>{if(la){Object.entries(la).forEach(([i,a])=>{tr[i]&&(tr[i].initialTemplate=a)});return}let e=t?.configurable?.context?.token,r=ep(t),n=tp(t);if(!r){console.warn("Solution Builder: missing primarySolutionsGroupId in appConfig; skipping live template hydration.");return}let s=await Gh(r,e,n),o={};q(t)||(await Promise.all(s.map(async i=>{let a=i.properties?.templateInfo;if(!a||typeof a!="object")return;let u=a.id;if(typeof u!="string"||o[u])return;let l=await Yh(i.id,e,n);if(!l||q(t))return;let{buildSolution:p,params:m}=l;if(typeof p=="object"&&p!==null&&"solution"in p){let h=p.solution;h.thumbnailUrl=i.thumbnail?`${n??"https://www.arcgis.com/sharing/rest"}/content/items/${i.id}/info/${i.thumbnail}`:void 0,h.item=i}let _={...a,buildSolution:p};o[u]=Yt(new qo(_).dumpToLlmTemplate(),{itemId:i.id,sourceBuildSolution:structuredClone(p),params:m?structuredClone(m):null}),tr[u]={...a,initialTemplate:o[u]}})),la=o)},Qc=t=>{let e=t?.configurable?.context?.token;return typeof e!="string"||!e.trim()?null:e},ep=t=>{let e=t?.configurable?.context?.configContext?.primarySolutionsGroupId;return typeof e!="string"||!e.trim()?null:e},tp=t=>{let e=t?.configurable?.context?.configContext?.portalURL;if(!(typeof e!="string"||!e.trim()))return`${e.replace(/\/+$/,"")}/sharing/rest`},Xh=async t=>{await Promise.all([np(t),ma(t)])},rp=async t=>{let e=Qc(t);(!xo||e&&e!==vo)&&(vo=e??vo,xo=Xh(t).catch(r=>{throw xo=null,vo=null,r})),await xo};async function np(t){if(Io)return Io;let e=ep(t);if(!e)return console.warn("Solution Builder: missing primarySolutionsGroupId in appConfig; skipping embeddings load."),null;let r=tp(t),n=t?.configurable?.context?.configContext?.portalURL;if(await new lh(n?{url:n}:void 0).load(),q(t))return null;let s=Qc(t)??void 0,o=await Zh(e,s,r,t);return q(t)?null:o?(Io=o.items,Io):null}var Qh=()=>Object.entries(tr).map(([t,e])=>`ID: ${t}
82
82
  Label: ${e.label}
83
83
  Description: ${e.description}`).join(`
84
84
 
package/dist/cdn/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a}from"./2I5LGZNX.js";import{u as e}from"./FFF5HUPM.js";import"./EXBEKVP5.js";var o=e(a,{"arcgis-solutions-assistant":[()=>import("./CGOOAJVN.js"),"_translations:,builderVisible,hasActiveBuilderDesign,open,userFirstName"],"buffer-tools":[()=>import("./VTAQ6NBB.js"),"_translations:,appearance,disabled,distance,geometries:,max,min,sliderTicks,unionResults,unit;getTranslatedUnit"],"card-manager":[()=>import("./MISU75DC.js"),"_translations:,allowedPasteLayerIds:,createBtnLabel,customInfoText,enableCreateFeatures,enableEditGeometry,enableSnapping,isMobile,layerOrTable:,mapComponentId,mapView:,pasteEnabled,selectedFeaturesIds:,selectingFeatureFromMap,showCopyPasteActions,showSketchWidgets,zoomAndScrollToSelected"],"consent-manager":[()=>import("./KTRKTBPS.js"),"_translations:,amazonAppId,amazonAppName,amazonUserPoolID,amazonVersion,firstUseVar,measurementIds:,portal:;getInstance"],"create-feature":[()=>import("./O7VRD3Z3.js"),"_translations:,aiImageExtraction:,aiTextExtraction:,allowMultipleCreation,appName,customizeSubmit,enableMessageLocation,enablePhotoLocation,enableSearch,enableSnapping,floorLevel,formElements,isMobile,mapView:,popupEnabled,reportingArea,reportingAreaLayer,reportingAreaMessage,searchConfiguration:,selectedLayerId,showGuidingMsg,showLayerVisibilityMsg,showSketchWidgets,submitNewReportsMessage,updateMapPosition;refresh,showForm,submit"],"create-related-feature":[()=>import("./F3A22NPP.js"),"_translations:,customizeSubmit,enableSnapping,mapView:,selectedFeature:,showGuidingMsg,table:;submit"],"crowdsource-manager":[()=>import("./WQHJMFGP.js"),"_translations:,appLayout,appProxies,basemapConfig:,coverPageEnabled,customInfoText,defaultAppLayout,defaultCenter,defaultGlobalId,defaultLayer,defaultLevel,defaultOid,defaultWebmap,enableAutoRefresh,enableBasemap,enableColumnReorder,enableCopyPaste,enableCSV,enableFloorFilter,enableFullscreen,enableHome,enableLayerList,enableLegend,enableMapList,enableSearch,enableSelectionTool,enableShare,enableSnapping,enableZoom,featureSelectionMode,honorMapFieldSettings,introductionWindowEnabled,mapInfos:,onlyShowUpdatableLayers,popupHeaderColor,popupHeaderHoverColor,popupHeaderHoverTextColor,popupHeaderTextColor,searchConfiguration:,shareIncludeEmbed,shareIncludeSocial,showNewestFirst,theme,visibilityIcon,zoomAndScrollToSelected,zoomToScale"],"crowdsource-reporter":[()=>import("./L4BYLII5.js"),"_translations:,aiImageExtraction:,aiTextExtraction:,center,commentButtonText,commentSubmittedMessage,defaultWebmap,description,enableAnonymousAccess,enableAnonymousComments,enableComments,enableHome,enableLogin,enableMessageLocation,enableNewReports,enablePhotoLocation,enableSearch,enableSnapping,enableZoom,filterByMapExtent,floorLevel,isMobile,layerExpressions:,layerId,level,loginTitle,mapInfos:,mapView:,objectId,reportButtonText,reportingArea,reportingAreaLayer,reportingAreaMessage,reportingOptions:,reportsHeader,reportSubmittedMessage,searchConfiguration:,showComments,showFeatureSymbol,showFullCommentTitle,showMyReportsOnly,showUserImageInCommentsList,sortFields:,sortOption,submitNewReportsMessage,theme,zoomToScale;updateLayerExpressionsT9n"],"deduct-calculator":[()=>import("./FZNRD2XJ.js")],"delete-button":[()=>import("./XKEKXTL2.js"),"_translations:,buttonType,deleteDialog,disabled,icon,ids:,layer:,showDeleteCount"],"delete-dialog":[()=>import("./TLRBE2TZ.js"),"_translations:,ids:,layer:,open"],"edit-card":[()=>import("./5K5GHKON.js"),"_translations:,allowMultipleEditing,enableEditGeometry,enableSnapping,graphicIndex,graphics:,mapView:,open"],"feature-details":[()=>import("./EHSIODIO.js"),"enableSnapping,graphics:,layerItemsHash:,mapView:,reportingOptions:,showFullCommentTitle,showUserImageInCommentsList;back,next,refresh,toggleListView"],"feature-list":[()=>import("./PEQUHMTU.js"),"_translations:,applyLayerViewFilter,filterByMapExtent,highlightOnHover,highlightOnMap,mapView:,noFeaturesFoundMsg,pageSize,reportingOptions:,selectedLayerId,showErrorWhenNoFeatures,showFeatureSymbol,showFullTitle,showInitialLoading,showUserImageInList,sortingInfo:,textSize,whereClause;refresh"],"field-selection":[()=>import("./6LHIJG7J.js"),"_translations:,configExtraFields,layer:,mapView:,table:,tableRef:"],"info-card":[()=>import("./XA3SV62A.js"),"_translations:,allowEditing,enableEditGeometry,enableSnapping,featuresReferenceId,graphics:,highlightEnabled,isLoading,isMobile,mapView:,paginationEnabled,pasteEnabled,position,showCloseBtn,showCopyPasteActions;back,getSelectedFeature,next,refresh,toggleListView"],"layer-list":[()=>import("./G2RMWJ7R.js"),"_translations:,applyLayerViewFilter,filterByMapExtent,layers:,mapView:,showFeatureCount,showNextIcon;refresh"],"layer-list-widget":[()=>import("./JFLG3EKT.js"),"layerListRef:,mapView:,visibilityIcon"],"layer-table":[()=>import("./JJDAJ7CL.js"),"_translations:,appLayout,defaultGlobalId:,defaultLayerId,defaultOid:,enableAutoRefresh,enableColumnReorder,enableCSV,enableInlineEdit,enableShare,enableTableAutosave,featureSelectionMode,honorMapFieldSettings,isMobile,layerIds:,mapHidden,mapInfo:,mapView:,pasteEnabled,selectedIds:,selectedRelatedIds:,shareIncludeEmbed,shareIncludeSocial,showCopyPasteActions,showNewestFirst,showOnlyUpdatableLayers,zoomAndScrollToSelected,zoomToScale;closeFilter,filterReset,filterUpdate,refresh,setColumnOrder,validateActiveEdits,validateTableUpdate"],"map-basemap-gallery":[()=>import("./RQIGAX6O.js"),"basemapConfig:,basemapGalleryRef:,mapView:"],"map-card":[()=>import("./F6J3OLVZ.js"),"_translations:,appLayout,appProxies,basemapConfig:,defaultLayerId,defaultWebmapId,enableBasemap,enableFloorFilter,enableFullscreen,enableHome,enableLayerList,enableLegend,enableMapLayerPicker,enableMapPicker,enableSearch,enableSelectionTool,enableShare,enableSingleExpand,featureSelectionMode,hide,isMapLayout,isMobile,mapComponentId,mapInfo:,mapInfos:,mapToolsOrder:,mapView:,mapWidgetsIndex,mapWidgetsPosition,mapWidgetsSize,mobileMapWidgetsPosition,mobileToolsOrder:,pasteEnabled,selectedFeaturesIds:,selectedLayer:,shareIncludeEmbed,shareIncludeSocial,showCopyPasteActions,showOnlyUpdatableLayers,stackTools,theme,visibilityIcon,zoomToolsSize,zoomToScale;resetFilter,updateFilterState,updateLayer"],"map-draw-tools":[()=>import("./MBVY6OPY.js"),"_translations:,active,drawMode,editGraphicsEnabled,graphics:,mapView:,pointSymbol:,polygonSymbol:,polylineSymbol:,redoEnabled,undoEnabled;clear,updateGraphics"],"map-floor-filter":[()=>import("./OMRM5EXN.js"),"enabled,floorFilterRef:,mapView:"],"map-fullscreen":[()=>import("./XHFFDKEQ.js"),"fullscreenRef:,mapView:"],"map-layer-picker":[()=>import("./BEKMMPB7.js"),"_translations:,appearance,configLayerOrderDefined,defaultLayerId,disabled,display,enabledLayerIds:,height,isMobile,mapView:,placeholderIcon,referenceElement,scale,selectedIds:,showLayersListInPopover,showOnlyUpdatableLayers,showSingleLayerAsLabel,showTables,showTablesDisabled,type;setLayerById,setLayerByIds,updateLayer"],"map-legend":[()=>import("./I4EEOB6Y.js"),"legendRef:,mapView:"],"map-picker":[()=>import("./22BJ76LD.js"),"_translations:,height,isMapLayout,mapInfos:,referenceElement,selectedWebMapId,showMapListInPopover;close,setMapByID,toggle"],"map-search":[()=>import("./D4TEADUS.js"),"mapView:,popupEnabled,resultGraphicEnabled,searchComponent:,searchConfiguration:,searchTerm"],"map-select-tools":[()=>import("./A2VP46QZ.js"),"_translations:,bufferColor,bufferOutlineColor,customLabelEnabled,defaultBufferDistance,defaultBufferUnit,enabledLayerIds:,enableLayerFeatures,enableLayerFeaturesOnLoad,enableSearchDistance,enableSearchDistanceOnLoad,enableSketchTools,geometries:,headerLabelClass,isUpdate,layerViews:,mapView:,noResultText,searchConfiguration:,searchDistanceEnabled,selectionLayerIds:,selectionSet:,selectLayerView:,sketchLineSymbol:,sketchPointSymbol:,sketchPolygonSymbol:,useLayerFeaturesEnabled;clearSelection,getSelection"],"map-tools":[()=>import("./3IO2JXVB.js"),"_translations:,basemapConfig:,configLayerOrderDefined,defaultLayerId,enableBasemap,enabledLayerIds:,enableFloorFilter,enableFullscreen,enableHome,enableLayerList,enableLegend,enableMapLayerPicker,enableMapPicker,enableSearch,enableSelectionTool,enableSingleExpand,isMobile,layout,mapInfo:,mapInfos:,mapView:,mapWidgetsSize,parentComponentHeight,parentComponentWidth,position,searchConfiguration:,selectedFeaturesIds:,selectedLayer:,selectedWebMapId,selectionTools:,showOnlyUpdatableLayers,stackTools,toolOrder:,visibilityIcon,zoomToolsSize"],"pci-calculator":[()=>import("./C5BQAX2M.js")],"pdf-download":[()=>import("./CAXDDYGL.js"),"_translations:,defaultNumLabelsPerPage,disabled;downloadCSV,downloadPDF"],"public-notification":[()=>import("./W7VD3QDN.js"),"_translations:,addresseeLayerIds:,bufferColor,bufferOutlineColor,customExport,customExportURL,customLabelEnabled,defaultBufferDistance,defaultBufferUnit,defaultExportTitle,defaultNumLabelsPerPage,enableLayerFeatures,enableLayerFeaturesOnLoad,enableSearchDistance,enableSearchDistanceOnLoad,enableSketchTools,featureEffect:,featureHighlightEnabled,initialNotice,mapView:,noResultText,searchConfiguration:,selectionLayerIds:,showRefineSelection,showSearchSettings,sketchLineSymbol:,sketchPointSymbol:,sketchPolygonSymbol:"],"refine-selection":[()=>import("./O4VFFJLQ.js"),"_translations:,addresseeLayer:,bufferColor,bufferOutlineColor,defaultBufferDistance,defaultBufferUnit,drawnGraphicsArr:,enabledLayerIds:,enableSearchDistance,enableSearchDistanceOnLoad,geometries:,mapView:,searchDistanceEnabled,selectionSets:,sketchLineSymbol:,sketchPointSymbol:,sketchPolygonSymbol:"],"selection-tool":[()=>import("./EYJQEBDF.js"),"mapView:,selectedLayerId,tool;toggleSelectionTool"],"solution-builder-assistant":[()=>import("./LHLLMC6K.js"),"_translations:,design,readOnlyNotice"],"solution-configure-titles":[()=>import("./WCD4U7UJ.js"),"_translations:,card:,open,solutionData,source,templateInfos:"],"solution-delete-dialog":[()=>import("./SC4UAHYZ.js"),"_translations:,card:,open,source;;close,delete"],"solution-deploy-dialog":[()=>import("./MLNGJEKI.js"),"_translations:,card:,debugFailDeployment,design:,open,userOptions:;;close,deploy"],"solution-deployed-card":[()=>import("./FBSKACM2.js"),"_translations:,card:,deployedDate,description,diagramKey,heading,itemId,owner,templateInfos:,thumbnail,updateAvailable;getTemplates,renderDeleteDialog,renderDiagramDialog"],"solution-deployed-card-panel":[()=>import("./7FZDDT7D.js"),"_translations:,card:,cardRef,diagramKey,open,readOnlyNotice,templateInfos:"],"solution-deploying-dialog":[()=>import("./J6OVONBB.js"),"_translations:,abortController:,card:,deploymentProgress,isWaitingForCard,open;;cancelDeployment,close,confirmCancel"],"solution-details-card":[()=>import("./R2JOPHL5.js"),"_translations:,card:,referrerSolutionId,referrerSolutionTitle,referrerSolutionVersion,source"],"solution-details-panel":[()=>import("./5EXKQXLZ.js"),"_translations:,card:,readOnlyNotice"],"solution-item-accordion":[()=>import("./QWNRGCQS.js"),"_translations:,itemRelationshipDependencies:,linkType,listSelectionMode,reuseWarning,templateInfos:,typeKeywords:,usageContext;collapseAll,deselectAll,expandFirstItem,expandItemById,expandItems,selectFirstItem,selectItem,selectItems"],"solution-item-diagram":[()=>import("./MTEVQC6W.js"),"_translations:,diagramKey,templateInfoGraph:,typeKeywords:"],"solution-item-icon":[()=>import("./CAYWD56D.js"),"designType,isPortal,type,typeKeywords:"],"solution-resource-card":[()=>import("./D2EVPZ5K.js"),"_translations:,description,heading,headingEn,icon,meridianIcon,sectionHeadingEn,url"],"solution-snapshot-gallery":[()=>import("./IOFIC3IG.js"),"_translations:,card:,itemProperties:,open,screenshot:"],"solution-social-share":[()=>import("./LM46YQCN.js"),"_translations:,actionApperance,autoUpdateShareUrl,buttonAppearance,inlineSuccessPopoverPlacement,mode,popoverButtonIconScale,popoverPositioning,removePopoverOffset,scale,shareButtonKind,shareButtonScale,shareButtonText,shareButtonType,shareIconsLayout,shareText,shareUrl,shortenShareUrl,socialMedia,solutionId,solutionTitle,solutionVersion,successMessage"],"solution-user-avatar":[()=>import("./UUIKE2AH.js"),"fullname,lookupProfile,thumbnailUrl,username"],"solutions-all-panel":[()=>import("./26EKIZQ3.js"),"_translations:,sortType;searchSolutions,setSearchOptions;getDisplayedSolutionIds"],"solutions-all-shell":[()=>import("./ZI7OWB5M.js"),"_translations:,solutionsCount;searchSolutions"],"solutions-deploy-app":[()=>import("./T6FQ2A4O.js"),"_translations:,appConfig,initTab,initTitleOrId,loadExampleBuilderData,sortType,useLocalAppConfig;selectTab"],"solutions-deploy-app-nav":[()=>import("./KMKZEHDS.js"),"_translations:,appConfig,assistantOpen,initTab;;activateMenuItem,clearMenuItems"],"solutions-deployed-list":[()=>import("./IGQJLEEJ.js"),"_translations:,hasLinks,listTitle,referenceCards:,results:"],"solutions-deployed-panel":[()=>import("./4ALVWOG7.js"),"_translations:,sortType;reload,searchSolutions,setSearchOptions"],"solutions-deployed-shell":[()=>import("./QBARJMJE.js"),"_translations:,solutionsCount;searchSolutions"],"solutions-filter-panel":[()=>import("./YCIKY6QN.js"),"_translations:,hideIndustryFilter,showReset;;changeIndustryFilter,clearFilters"],"solutions-resources-section":[()=>import("./RLYLBYMX.js"),"cards,heading,subheading"],"solutions-resources-shell":[()=>import("./DKQRECGR.js"),"_translations:;scrollToSection"],"solutions-searchsort-toolbar":[()=>import("./UXN2MYLX.js"),"_translations:,defaultSortType,isOrgSolutions,scope;;changeOwnerFilter,changeSearchFilter,sortChanged"]});o({resourcesUrl:import.meta.url});var t=new CSSStyleSheet;t.replaceSync("@layer{:not([hydrated]):is(arcgis-solutions-assistant,buffer-tools,card-manager,consent-manager,create-feature,create-related-feature,crowdsource-manager,crowdsource-reporter,deduct-calculator,delete-button,delete-dialog,edit-card,feature-details,feature-list,field-selection,info-card,layer-list,layer-list-widget,layer-table,map-basemap-gallery,map-card,map-draw-tools,map-floor-filter,map-fullscreen,map-layer-picker,map-legend,map-picker,map-search,map-select-tools,map-tools,pci-calculator,pdf-download,public-notification,refine-selection,selection-tool,solution-builder-assistant,solution-configure-titles,solution-delete-dialog,solution-deploy-dialog,solution-deployed-card,solution-deployed-card-panel,solution-deploying-dialog,solution-details-card,solution-details-panel,solution-item-accordion,solution-item-diagram,solution-item-icon,solution-resource-card,solution-snapshot-gallery,solution-social-share,solution-user-avatar,solutions-all-panel,solutions-all-shell,solutions-deploy-app,solutions-deploy-app-nav,solutions-deployed-list,solutions-deployed-panel,solutions-deployed-shell,solutions-filter-panel,solutions-resources-section,solutions-resources-shell,solutions-searchsort-toolbar){visibility:hidden}}");document.adoptedStyleSheets=[...document.adoptedStyleSheets,t];window.$arcgis||Object.defineProperty(window,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),((a,r)=>{a.t=(c,...x)=>Promise.all(x.map(x=>x.then?x:(!a?.forceESM&&a?.import||(x=>import(x+".js").then(m=>m.default??m)))("@arcgis/core/"+x))).then(c);r.p=a.t(([m])=>{r.t=m.trackAccess;r.o=m.createObservable;r.c=m.createTrackingTarget;r.r=m.runTracked},"applications/Components/reactiveUtils")})($arcgis,a)
2
+ import{a}from"./2I5LGZNX.js";import{u as e}from"./FFF5HUPM.js";import"./EXBEKVP5.js";var o=e(a,{"arcgis-solutions-assistant":[()=>import("./NRQI7YO3.js"),"_translations:,builderVisible,hasActiveBuilderDesign,open,userFirstName"],"buffer-tools":[()=>import("./VTAQ6NBB.js"),"_translations:,appearance,disabled,distance,geometries:,max,min,sliderTicks,unionResults,unit;getTranslatedUnit"],"card-manager":[()=>import("./MISU75DC.js"),"_translations:,allowedPasteLayerIds:,createBtnLabel,customInfoText,enableCreateFeatures,enableEditGeometry,enableSnapping,isMobile,layerOrTable:,mapComponentId,mapView:,pasteEnabled,selectedFeaturesIds:,selectingFeatureFromMap,showCopyPasteActions,showSketchWidgets,zoomAndScrollToSelected"],"consent-manager":[()=>import("./KTRKTBPS.js"),"_translations:,amazonAppId,amazonAppName,amazonUserPoolID,amazonVersion,firstUseVar,measurementIds:,portal:;getInstance"],"create-feature":[()=>import("./O7VRD3Z3.js"),"_translations:,aiImageExtraction:,aiTextExtraction:,allowMultipleCreation,appName,customizeSubmit,enableMessageLocation,enablePhotoLocation,enableSearch,enableSnapping,floorLevel,formElements,isMobile,mapView:,popupEnabled,reportingArea,reportingAreaLayer,reportingAreaMessage,searchConfiguration:,selectedLayerId,showGuidingMsg,showLayerVisibilityMsg,showSketchWidgets,submitNewReportsMessage,updateMapPosition;refresh,showForm,submit"],"create-related-feature":[()=>import("./F3A22NPP.js"),"_translations:,customizeSubmit,enableSnapping,mapView:,selectedFeature:,showGuidingMsg,table:;submit"],"crowdsource-manager":[()=>import("./WQHJMFGP.js"),"_translations:,appLayout,appProxies,basemapConfig:,coverPageEnabled,customInfoText,defaultAppLayout,defaultCenter,defaultGlobalId,defaultLayer,defaultLevel,defaultOid,defaultWebmap,enableAutoRefresh,enableBasemap,enableColumnReorder,enableCopyPaste,enableCSV,enableFloorFilter,enableFullscreen,enableHome,enableLayerList,enableLegend,enableMapList,enableSearch,enableSelectionTool,enableShare,enableSnapping,enableZoom,featureSelectionMode,honorMapFieldSettings,introductionWindowEnabled,mapInfos:,onlyShowUpdatableLayers,popupHeaderColor,popupHeaderHoverColor,popupHeaderHoverTextColor,popupHeaderTextColor,searchConfiguration:,shareIncludeEmbed,shareIncludeSocial,showNewestFirst,theme,visibilityIcon,zoomAndScrollToSelected,zoomToScale"],"crowdsource-reporter":[()=>import("./L4BYLII5.js"),"_translations:,aiImageExtraction:,aiTextExtraction:,center,commentButtonText,commentSubmittedMessage,defaultWebmap,description,enableAnonymousAccess,enableAnonymousComments,enableComments,enableHome,enableLogin,enableMessageLocation,enableNewReports,enablePhotoLocation,enableSearch,enableSnapping,enableZoom,filterByMapExtent,floorLevel,isMobile,layerExpressions:,layerId,level,loginTitle,mapInfos:,mapView:,objectId,reportButtonText,reportingArea,reportingAreaLayer,reportingAreaMessage,reportingOptions:,reportsHeader,reportSubmittedMessage,searchConfiguration:,showComments,showFeatureSymbol,showFullCommentTitle,showMyReportsOnly,showUserImageInCommentsList,sortFields:,sortOption,submitNewReportsMessage,theme,zoomToScale;updateLayerExpressionsT9n"],"deduct-calculator":[()=>import("./FZNRD2XJ.js")],"delete-button":[()=>import("./XKEKXTL2.js"),"_translations:,buttonType,deleteDialog,disabled,icon,ids:,layer:,showDeleteCount"],"delete-dialog":[()=>import("./TLRBE2TZ.js"),"_translations:,ids:,layer:,open"],"edit-card":[()=>import("./5K5GHKON.js"),"_translations:,allowMultipleEditing,enableEditGeometry,enableSnapping,graphicIndex,graphics:,mapView:,open"],"feature-details":[()=>import("./EHSIODIO.js"),"enableSnapping,graphics:,layerItemsHash:,mapView:,reportingOptions:,showFullCommentTitle,showUserImageInCommentsList;back,next,refresh,toggleListView"],"feature-list":[()=>import("./PEQUHMTU.js"),"_translations:,applyLayerViewFilter,filterByMapExtent,highlightOnHover,highlightOnMap,mapView:,noFeaturesFoundMsg,pageSize,reportingOptions:,selectedLayerId,showErrorWhenNoFeatures,showFeatureSymbol,showFullTitle,showInitialLoading,showUserImageInList,sortingInfo:,textSize,whereClause;refresh"],"field-selection":[()=>import("./6LHIJG7J.js"),"_translations:,configExtraFields,layer:,mapView:,table:,tableRef:"],"info-card":[()=>import("./XA3SV62A.js"),"_translations:,allowEditing,enableEditGeometry,enableSnapping,featuresReferenceId,graphics:,highlightEnabled,isLoading,isMobile,mapView:,paginationEnabled,pasteEnabled,position,showCloseBtn,showCopyPasteActions;back,getSelectedFeature,next,refresh,toggleListView"],"layer-list":[()=>import("./G2RMWJ7R.js"),"_translations:,applyLayerViewFilter,filterByMapExtent,layers:,mapView:,showFeatureCount,showNextIcon;refresh"],"layer-list-widget":[()=>import("./JFLG3EKT.js"),"layerListRef:,mapView:,visibilityIcon"],"layer-table":[()=>import("./JJDAJ7CL.js"),"_translations:,appLayout,defaultGlobalId:,defaultLayerId,defaultOid:,enableAutoRefresh,enableColumnReorder,enableCSV,enableInlineEdit,enableShare,enableTableAutosave,featureSelectionMode,honorMapFieldSettings,isMobile,layerIds:,mapHidden,mapInfo:,mapView:,pasteEnabled,selectedIds:,selectedRelatedIds:,shareIncludeEmbed,shareIncludeSocial,showCopyPasteActions,showNewestFirst,showOnlyUpdatableLayers,zoomAndScrollToSelected,zoomToScale;closeFilter,filterReset,filterUpdate,refresh,setColumnOrder,validateActiveEdits,validateTableUpdate"],"map-basemap-gallery":[()=>import("./RQIGAX6O.js"),"basemapConfig:,basemapGalleryRef:,mapView:"],"map-card":[()=>import("./F6J3OLVZ.js"),"_translations:,appLayout,appProxies,basemapConfig:,defaultLayerId,defaultWebmapId,enableBasemap,enableFloorFilter,enableFullscreen,enableHome,enableLayerList,enableLegend,enableMapLayerPicker,enableMapPicker,enableSearch,enableSelectionTool,enableShare,enableSingleExpand,featureSelectionMode,hide,isMapLayout,isMobile,mapComponentId,mapInfo:,mapInfos:,mapToolsOrder:,mapView:,mapWidgetsIndex,mapWidgetsPosition,mapWidgetsSize,mobileMapWidgetsPosition,mobileToolsOrder:,pasteEnabled,selectedFeaturesIds:,selectedLayer:,shareIncludeEmbed,shareIncludeSocial,showCopyPasteActions,showOnlyUpdatableLayers,stackTools,theme,visibilityIcon,zoomToolsSize,zoomToScale;resetFilter,updateFilterState,updateLayer"],"map-draw-tools":[()=>import("./MBVY6OPY.js"),"_translations:,active,drawMode,editGraphicsEnabled,graphics:,mapView:,pointSymbol:,polygonSymbol:,polylineSymbol:,redoEnabled,undoEnabled;clear,updateGraphics"],"map-floor-filter":[()=>import("./OMRM5EXN.js"),"enabled,floorFilterRef:,mapView:"],"map-fullscreen":[()=>import("./XHFFDKEQ.js"),"fullscreenRef:,mapView:"],"map-layer-picker":[()=>import("./BEKMMPB7.js"),"_translations:,appearance,configLayerOrderDefined,defaultLayerId,disabled,display,enabledLayerIds:,height,isMobile,mapView:,placeholderIcon,referenceElement,scale,selectedIds:,showLayersListInPopover,showOnlyUpdatableLayers,showSingleLayerAsLabel,showTables,showTablesDisabled,type;setLayerById,setLayerByIds,updateLayer"],"map-legend":[()=>import("./I4EEOB6Y.js"),"legendRef:,mapView:"],"map-picker":[()=>import("./22BJ76LD.js"),"_translations:,height,isMapLayout,mapInfos:,referenceElement,selectedWebMapId,showMapListInPopover;close,setMapByID,toggle"],"map-search":[()=>import("./D4TEADUS.js"),"mapView:,popupEnabled,resultGraphicEnabled,searchComponent:,searchConfiguration:,searchTerm"],"map-select-tools":[()=>import("./A2VP46QZ.js"),"_translations:,bufferColor,bufferOutlineColor,customLabelEnabled,defaultBufferDistance,defaultBufferUnit,enabledLayerIds:,enableLayerFeatures,enableLayerFeaturesOnLoad,enableSearchDistance,enableSearchDistanceOnLoad,enableSketchTools,geometries:,headerLabelClass,isUpdate,layerViews:,mapView:,noResultText,searchConfiguration:,searchDistanceEnabled,selectionLayerIds:,selectionSet:,selectLayerView:,sketchLineSymbol:,sketchPointSymbol:,sketchPolygonSymbol:,useLayerFeaturesEnabled;clearSelection,getSelection"],"map-tools":[()=>import("./3IO2JXVB.js"),"_translations:,basemapConfig:,configLayerOrderDefined,defaultLayerId,enableBasemap,enabledLayerIds:,enableFloorFilter,enableFullscreen,enableHome,enableLayerList,enableLegend,enableMapLayerPicker,enableMapPicker,enableSearch,enableSelectionTool,enableSingleExpand,isMobile,layout,mapInfo:,mapInfos:,mapView:,mapWidgetsSize,parentComponentHeight,parentComponentWidth,position,searchConfiguration:,selectedFeaturesIds:,selectedLayer:,selectedWebMapId,selectionTools:,showOnlyUpdatableLayers,stackTools,toolOrder:,visibilityIcon,zoomToolsSize"],"pci-calculator":[()=>import("./C5BQAX2M.js")],"pdf-download":[()=>import("./CAXDDYGL.js"),"_translations:,defaultNumLabelsPerPage,disabled;downloadCSV,downloadPDF"],"public-notification":[()=>import("./W7VD3QDN.js"),"_translations:,addresseeLayerIds:,bufferColor,bufferOutlineColor,customExport,customExportURL,customLabelEnabled,defaultBufferDistance,defaultBufferUnit,defaultExportTitle,defaultNumLabelsPerPage,enableLayerFeatures,enableLayerFeaturesOnLoad,enableSearchDistance,enableSearchDistanceOnLoad,enableSketchTools,featureEffect:,featureHighlightEnabled,initialNotice,mapView:,noResultText,searchConfiguration:,selectionLayerIds:,showRefineSelection,showSearchSettings,sketchLineSymbol:,sketchPointSymbol:,sketchPolygonSymbol:"],"refine-selection":[()=>import("./O4VFFJLQ.js"),"_translations:,addresseeLayer:,bufferColor,bufferOutlineColor,defaultBufferDistance,defaultBufferUnit,drawnGraphicsArr:,enabledLayerIds:,enableSearchDistance,enableSearchDistanceOnLoad,geometries:,mapView:,searchDistanceEnabled,selectionSets:,sketchLineSymbol:,sketchPointSymbol:,sketchPolygonSymbol:"],"selection-tool":[()=>import("./EYJQEBDF.js"),"mapView:,selectedLayerId,tool;toggleSelectionTool"],"solution-builder-assistant":[()=>import("./LHLLMC6K.js"),"_translations:,design,readOnlyNotice"],"solution-configure-titles":[()=>import("./WCD4U7UJ.js"),"_translations:,card:,open,solutionData,source,templateInfos:"],"solution-delete-dialog":[()=>import("./SC4UAHYZ.js"),"_translations:,card:,open,source;;close,delete"],"solution-deploy-dialog":[()=>import("./MLNGJEKI.js"),"_translations:,card:,debugFailDeployment,design:,open,userOptions:;;close,deploy"],"solution-deployed-card":[()=>import("./FBSKACM2.js"),"_translations:,card:,deployedDate,description,diagramKey,heading,itemId,owner,templateInfos:,thumbnail,updateAvailable;getTemplates,renderDeleteDialog,renderDiagramDialog"],"solution-deployed-card-panel":[()=>import("./7FZDDT7D.js"),"_translations:,card:,cardRef,diagramKey,open,readOnlyNotice,templateInfos:"],"solution-deploying-dialog":[()=>import("./J6OVONBB.js"),"_translations:,abortController:,card:,deploymentProgress,isWaitingForCard,open;;cancelDeployment,close,confirmCancel"],"solution-details-card":[()=>import("./R2JOPHL5.js"),"_translations:,card:,referrerSolutionId,referrerSolutionTitle,referrerSolutionVersion,source"],"solution-details-panel":[()=>import("./5EXKQXLZ.js"),"_translations:,card:,readOnlyNotice"],"solution-item-accordion":[()=>import("./QWNRGCQS.js"),"_translations:,itemRelationshipDependencies:,linkType,listSelectionMode,reuseWarning,templateInfos:,typeKeywords:,usageContext;collapseAll,deselectAll,expandFirstItem,expandItemById,expandItems,selectFirstItem,selectItem,selectItems"],"solution-item-diagram":[()=>import("./MTEVQC6W.js"),"_translations:,diagramKey,templateInfoGraph:,typeKeywords:"],"solution-item-icon":[()=>import("./CAYWD56D.js"),"designType,isPortal,type,typeKeywords:"],"solution-resource-card":[()=>import("./D2EVPZ5K.js"),"_translations:,description,heading,headingEn,icon,meridianIcon,sectionHeadingEn,url"],"solution-snapshot-gallery":[()=>import("./IOFIC3IG.js"),"_translations:,card:,itemProperties:,open,screenshot:"],"solution-social-share":[()=>import("./LM46YQCN.js"),"_translations:,actionApperance,autoUpdateShareUrl,buttonAppearance,inlineSuccessPopoverPlacement,mode,popoverButtonIconScale,popoverPositioning,removePopoverOffset,scale,shareButtonKind,shareButtonScale,shareButtonText,shareButtonType,shareIconsLayout,shareText,shareUrl,shortenShareUrl,socialMedia,solutionId,solutionTitle,solutionVersion,successMessage"],"solution-user-avatar":[()=>import("./UUIKE2AH.js"),"fullname,lookupProfile,thumbnailUrl,username"],"solutions-all-panel":[()=>import("./26EKIZQ3.js"),"_translations:,sortType;searchSolutions,setSearchOptions;getDisplayedSolutionIds"],"solutions-all-shell":[()=>import("./ZI7OWB5M.js"),"_translations:,solutionsCount;searchSolutions"],"solutions-deploy-app":[()=>import("./T6FQ2A4O.js"),"_translations:,appConfig,initTab,initTitleOrId,loadExampleBuilderData,sortType,useLocalAppConfig;selectTab"],"solutions-deploy-app-nav":[()=>import("./KMKZEHDS.js"),"_translations:,appConfig,assistantOpen,initTab;;activateMenuItem,clearMenuItems"],"solutions-deployed-list":[()=>import("./IGQJLEEJ.js"),"_translations:,hasLinks,listTitle,referenceCards:,results:"],"solutions-deployed-panel":[()=>import("./4ALVWOG7.js"),"_translations:,sortType;reload,searchSolutions,setSearchOptions"],"solutions-deployed-shell":[()=>import("./QBARJMJE.js"),"_translations:,solutionsCount;searchSolutions"],"solutions-filter-panel":[()=>import("./YCIKY6QN.js"),"_translations:,hideIndustryFilter,showReset;;changeIndustryFilter,clearFilters"],"solutions-resources-section":[()=>import("./RLYLBYMX.js"),"cards,heading,subheading"],"solutions-resources-shell":[()=>import("./DKQRECGR.js"),"_translations:;scrollToSection"],"solutions-searchsort-toolbar":[()=>import("./UXN2MYLX.js"),"_translations:,defaultSortType,isOrgSolutions,scope;;changeOwnerFilter,changeSearchFilter,sortChanged"]});o({resourcesUrl:import.meta.url});var t=new CSSStyleSheet;t.replaceSync("@layer{:not([hydrated]):is(arcgis-solutions-assistant,buffer-tools,card-manager,consent-manager,create-feature,create-related-feature,crowdsource-manager,crowdsource-reporter,deduct-calculator,delete-button,delete-dialog,edit-card,feature-details,feature-list,field-selection,info-card,layer-list,layer-list-widget,layer-table,map-basemap-gallery,map-card,map-draw-tools,map-floor-filter,map-fullscreen,map-layer-picker,map-legend,map-picker,map-search,map-select-tools,map-tools,pci-calculator,pdf-download,public-notification,refine-selection,selection-tool,solution-builder-assistant,solution-configure-titles,solution-delete-dialog,solution-deploy-dialog,solution-deployed-card,solution-deployed-card-panel,solution-deploying-dialog,solution-details-card,solution-details-panel,solution-item-accordion,solution-item-diagram,solution-item-icon,solution-resource-card,solution-snapshot-gallery,solution-social-share,solution-user-avatar,solutions-all-panel,solutions-all-shell,solutions-deploy-app,solutions-deploy-app-nav,solutions-deployed-list,solutions-deployed-panel,solutions-deployed-shell,solutions-filter-panel,solutions-resources-section,solutions-resources-shell,solutions-searchsort-toolbar){visibility:hidden}}");document.adoptedStyleSheets=[...document.adoptedStyleSheets,t];window.$arcgis||Object.defineProperty(window,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),((a,r)=>{a.t=(c,...x)=>Promise.all(x.map(x=>x.then?x:(!a?.forceESM&&a?.import||(x=>import(x+".js").then(m=>m.default??m)))("@arcgis/core/"+x))).then(c);r.p=a.t(([m])=>{r.t=m.trackAccess;r.o=m.createObservable;r.c=m.createTrackingTarget;r.r=m.runTracked},"applications/Components/reactiveUtils")})($arcgis,a)
@@ -646,7 +646,7 @@ const Lt = "Build", E = /* @__PURE__ */ Object.assign({
646
646
  "./prompts/explainValidationFailure.md": () => import("../../chunks/explainValidationFailure.js").then((t) => t.default),
647
647
  "./prompts/findExistingSolution.md": () => import("../../chunks/findExistingSolution.js").then((t) => t.default),
648
648
  "./prompts/updateDesign.md": () => import("../../chunks/updateDesign.js").then((t) => t.default)
649
- }), $t = ut.builderMessages, g = (t) => t?.configurable?.abortSignal.aborted ?? !1, b = (t, e, s) => q(e)?.builderMessages?.[t] ?? $t[t], xe = (t) => {
649
+ }), $t = ut.builderMessages, g = (t) => t?.configurable?.abortSignal?.aborted ?? !1, b = (t, e, s) => q(e)?.builderMessages?.[t] ?? $t[t], xe = (t) => {
650
650
  typeof window < "u" && window.dispatchEvent(new CustomEvent("arcgis-solution-design-update", {
651
651
  detail: t
652
652
  }));