@arcgis/coding-components 4.34.0-next.60 → 4.34.0-next.62
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.
- package/dist/addons.js +1 -1
- package/dist/cdn/{FWCO6ADZ.js → 3I34Y5AB.js} +2 -2
- package/dist/cdn/{F3GTWULQ.js → 5RSIHBM4.js} +1 -1
- package/dist/cdn/{HKJKK3XG.js → 6XOBLFU3.js} +2 -2
- package/dist/cdn/{AAMCKGYV.js → 7UB5LUNL.js} +2 -2
- package/dist/cdn/{VWKYLDS4.js → 7X24LJBN.js} +2 -2
- package/dist/cdn/{GIMG3MCI.js → A65UNHR4.js} +3 -3
- package/dist/cdn/{XT7V2LEL.js → AIQJQJNP.js} +2 -2
- package/dist/cdn/{RIHX75RL.js → B57VKG5I.js} +2 -2
- package/dist/cdn/BFWMP5OB.js +4 -0
- package/dist/cdn/CJHYKJR4.js +4 -0
- package/dist/cdn/ELMNY47I.js +6 -0
- package/dist/cdn/{6U47D2AA.js → FURDL7AT.js} +2 -2
- package/dist/cdn/{GC3SFNNM.js → FZGXSTE5.js} +2 -2
- package/dist/cdn/{BYS7NZEV.js → GN4WEXNA.js} +4 -4
- package/dist/cdn/GZVLYB6K.js +4 -0
- package/dist/cdn/{LDTY2BQR.js → HQUHEGS3.js} +2 -2
- package/dist/cdn/{RG7JKD7D.js → HQZP3Z5G.js} +2 -2
- package/dist/cdn/{OHZTYOG7.js → IXFCNWEA.js} +2 -2
- package/dist/cdn/{YFFREWP6.js → J2F5MPAU.js} +2 -2
- package/dist/cdn/JDLPRTUC.js +4 -0
- package/dist/cdn/{4XLS4HHS.js → JYNGEUUE.js} +4 -4
- package/dist/cdn/KFTMHJNC.js +4 -0
- package/dist/cdn/{ENZ5FAYF.js → KSG7ZEYA.js} +2 -2
- package/dist/cdn/{XZTWY7TY.js → LH4ZRBH2.js} +2 -2
- package/dist/cdn/{XBL2Y42W.js → MEHRGJD3.js} +1 -1
- package/dist/cdn/MRH4XA6Q.js +4 -0
- package/dist/cdn/{ZHCT5XD4.js → NNMWLUEO.js} +2 -2
- package/dist/cdn/{AJ6VK4EZ.js → O3RI3CEY.js} +2 -2
- package/dist/cdn/O4B6SIUD.js +4 -0
- package/dist/cdn/OLWHIWB4.js +4 -0
- package/dist/cdn/{DSM5X3AK.js → P2KGWKM6.js} +1 -1
- package/dist/cdn/P5OTUOX6.js +4 -0
- package/dist/cdn/{F3MG324K.js → PDRFDZFB.js} +2 -2
- package/dist/cdn/{EF5ZMENZ.js → QGVAOECH.js} +2 -2
- package/dist/cdn/REMDYFFQ.js +6 -0
- package/dist/cdn/{I3ZGEMFA.js → RFZMFUVZ.js} +2 -2
- package/dist/cdn/{ZIQGH3R5.js → T6YPLG6X.js} +2 -2
- package/dist/cdn/{QUKOS6J3.js → UHOC63NX.js} +1 -1
- package/dist/cdn/UZAROOL3.js +4 -0
- package/dist/cdn/V7IUHQEU.js +4 -0
- package/dist/cdn/VLC44WXK.js +4 -0
- package/dist/cdn/{FA2S25XN.js → XH2IB23K.js} +1 -1
- package/dist/cdn/XQ7XPQE3.js +4 -0
- package/dist/cdn/YDG3GMLR.js +4 -0
- package/dist/cdn/assets/code-editor/sql-expr.worker.js +39728 -39679
- package/dist/cdn/index.js +2 -2
- package/dist/chunks/arcade-defaults.js +2 -2
- package/dist/chunks/arcade-executor.js +1 -1
- package/dist/chunks/arcade-mode.js +9 -8
- package/dist/chunks/arcade-service-accessors.js +1 -1
- package/dist/chunks/editor.js +1 -1
- package/dist/chunks/fields.js +1 -1
- package/dist/chunks/language-defaults-base.js +40 -38
- package/dist/chunks/markdown.js +1 -1
- package/dist/chunks/monaco-importer.js +2 -2
- package/dist/chunks/runtime.js +1 -1
- package/dist/chunks/setup-monaco.js +1 -1
- package/dist/chunks/sql-expr-contribution.js +1 -1
- package/dist/chunks/sql-expr-defaults.js +2 -2
- package/dist/chunks/sql-expr-mode.js +13 -12
- package/dist/chunks/useT9n.js +1 -1
- package/dist/components/arcgis-arcade-coding-assistant/customElement.js +3 -2
- package/dist/components/arcgis-arcade-editor/customElement.js +4 -3
- package/dist/components/arcgis-arcade-results/customElement.js +3 -2
- package/dist/components/arcgis-arcade-suggestions/customElement.js +2 -2
- package/dist/components/arcgis-code-editor/customElement.js +7 -5
- package/dist/components/arcgis-editor-variables/customElement.js +3 -2
- package/dist/components/arcgis-language-api-panel/customElement.js +7 -6
- package/dist/components/arcgis-sql-expression-editor/customElement.js +2 -2
- package/dist/components/arcgis-sql-expression-fields/customElement.js +1 -1
- package/dist/docs/api.json +2 -2
- package/dist/docs/docs.json +2 -2
- package/dist/docs/web-types.json +1 -1
- package/dist/index.js +1 -1
- package/dist/loader.js +1 -1
- package/package.json +5 -5
- package/dist/cdn/4463YABH.js +0 -6
- package/dist/cdn/47XAK6TQ.js +0 -4
- package/dist/cdn/IAUCLWLU.js +0 -4
- package/dist/cdn/MKCXBA24.js +0 -4
- package/dist/cdn/NUWXN4AU.js +0 -6
- package/dist/cdn/PISACUOD.js +0 -4
- package/dist/cdn/PK3SVCAL.js +0 -4
- package/dist/cdn/PL5TPJ4Y.js +0 -4
- package/dist/cdn/U6WYSIOL.js +0 -4
- package/dist/cdn/UG6RLVTL.js +0 -4
- package/dist/cdn/YDR2NZKM.js +0 -4
- package/dist/cdn/Z46HULQ3.js +0 -4
- package/dist/cdn/Z5SYZZEC.js +0 -4
- package/dist/cdn/ZOB5V6ZS.js +0 -4
|
@@ -2,11 +2,12 @@ import { c as o } from "../../chunks/runtime.js";
|
|
|
2
2
|
import { ref as c } from "lit/directives/ref.js";
|
|
3
3
|
import { css as n, html as s } from "lit";
|
|
4
4
|
import { LitElement as d, createEvent as a } from "@arcgis/lumina";
|
|
5
|
-
import { setFocusOnElement as h
|
|
5
|
+
import { setFocusOnElement as h } from "@arcgis/toolkit/dom";
|
|
6
|
+
import { createFilterExpression as f } from "@arcgis/toolkit/string";
|
|
6
7
|
import { u } from "../../chunks/useT9n.js";
|
|
7
8
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
8
9
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
9
|
-
v4.34.0-next.
|
|
10
|
+
v4.34.0-next.62 */
|
|
10
11
|
const m = n`:host{background-color:var(--calcite-color-foreground-1);.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.sticky{position:sticky;top:0;z-index:10}calcite-flow{height:100%}calcite-list-item-group{background-color:var(--calcite-color-foreground-2);word-break:break-word}}`;
|
|
11
12
|
function g(l) {
|
|
12
13
|
l.key === "Enter" && l.stopPropagation();
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { c as m } from "../../chunks/runtime.js";
|
|
2
|
-
import { ref as
|
|
2
|
+
import { ref as o } from "lit/directives/ref.js";
|
|
3
3
|
import { css as h, html as s } from "lit";
|
|
4
|
-
import { setFocusOnElement as u,
|
|
4
|
+
import { setFocusOnElement as u, focusElement as f } from "@arcgis/toolkit/dom";
|
|
5
|
+
import { addLtrMark as c } from "@arcgis/toolkit/string";
|
|
5
6
|
import { LitElement as p, createEvent as a } from "@arcgis/lumina";
|
|
6
7
|
import { g as r, o as g, c as n, a as _ } from "../../chunks/markdown.js";
|
|
7
8
|
import { f as b } from "../../chunks/monaco-importer.js";
|
|
@@ -9,7 +10,7 @@ import { u as v } from "../../chunks/useT9n.js";
|
|
|
9
10
|
import { s as d } from "../../chunks/sql-expr-contribution.js";
|
|
10
11
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
11
12
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
12
|
-
v4.34.0-next.
|
|
13
|
+
v4.34.0-next.62 */
|
|
13
14
|
const y = h`:host{background-color:var(--calcite-color-foreground-1);.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.sticky{position:sticky;top:0;z-index:10}calcite-flow{height:100%}calcite-block{p:first-of-type{margin-top:0}code{font-family:var(--calcite-code-family)}pre{direction:ltr;overflow-x:auto;background-color:var(--calcite-color-foreground-2);padding:var(--calcite-spacing-sm);code{font-size:var(--calcite-font-size--2)}}}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}}`;
|
|
14
15
|
class I extends p {
|
|
15
16
|
constructor() {
|
|
@@ -75,17 +76,17 @@ class I extends p {
|
|
|
75
76
|
}
|
|
76
77
|
renderApiCategory(e) {
|
|
77
78
|
const i = b(e.items, "name", this._filterValue);
|
|
78
|
-
return i.length ? s`<calcite-list-item-group .heading=${e.title}>${i.map((t) => s`<calcite-list-item .label=${
|
|
79
|
+
return i.length ? s`<calcite-list-item-group .heading=${e.title}>${i.map((t) => s`<calcite-list-item .label=${c(t.completion.detail)} @calciteListItemSelect=${(l) => this._emitItemSelected(l, t)} @keydown=${(l) => this._emitItemSelected(l, t)}><calcite-action slot=actions-end .text=${this.messages.expand ?? ""} icon=chevron-right icon-flip-rtl scale=s @click=${(l) => this._selectItem(l, t)}></calcite-action></calcite-list-item>`)}</calcite-list-item-group>` : null;
|
|
79
80
|
}
|
|
80
81
|
renderApiItemFlowItem() {
|
|
81
82
|
const e = this._selectedApiItem;
|
|
82
|
-
return e ? s`<calcite-flow-item .heading=${this.messages.constantsandfunctions} .beforeBack=${this._unselectItem} closable @calciteFlowItemClose=${this._emitClose} selected>${this.hideDocumentationActions ? null : s`<calcite-button width=half slot=footer appearance=outline kind=brand scale=s .href=${e.link} target=Help icon-start=information>${this.messages.moreinformation}</calcite-button>`}<calcite-button .width=${this.hideDocumentationActions ? "full" : "half"} slot=footer appearance=outline kind=brand icon-start=code scale=s @click=${(i) => this._emitItemSelectedAndClose(i, e)} ${
|
|
83
|
+
return e ? s`<calcite-flow-item .heading=${this.messages.constantsandfunctions} .beforeBack=${this._unselectItem} closable @calciteFlowItemClose=${this._emitClose} selected>${this.hideDocumentationActions ? null : s`<calcite-button width=half slot=footer appearance=outline kind=brand scale=s .href=${e.link} target=Help icon-start=information>${this.messages.moreinformation}</calcite-button>`}<calcite-button .width=${this.hideDocumentationActions ? "full" : "half"} slot=footer appearance=outline kind=brand icon-start=code scale=s @click=${(i) => this._emitItemSelectedAndClose(i, e)} ${o(f)}>${this.messages.insert}</calcite-button><calcite-block open .heading=${c(e.completion.detail)}><div .innerHTML=${n(e.completion.documentation) ?? ""}></div>${e.examples ? s`<div ${o(this._elementToMarkdown)}></div>` : null}</calcite-block></calcite-flow-item>` : null;
|
|
83
84
|
}
|
|
84
85
|
render() {
|
|
85
86
|
if (this.closed)
|
|
86
87
|
return null;
|
|
87
88
|
const e = (this.apiLibrary ?? []).map((t) => this.renderApiCategory(t)), i = e.every((t) => !t);
|
|
88
|
-
return s`<style>${this._colorizeStyle}</style><calcite-flow ${
|
|
89
|
+
return s`<style>${this._colorizeStyle}</style><calcite-flow ${o(this.flowFocusHandler)}><calcite-flow-item .heading=${this.messages.constantsandfunctions} closable @calciteFlowItemClose=${this._emitClose} .selected=${!this._selectedApiItem}><calcite-input .value=${this._filterValue} icon=magnifying-glass clearable @calciteInputInput=${this._updateFilterValue} class="sticky" scale=m></calcite-input>${this.loading ? s`<calcite-loader scale=s type=indeterminate .label=${this.messages.loading ?? "Loading"}></calcite-loader>` : s`<calcite-list label="arcade api">${i ? s`<div class="notice-container">${this.messages.noitems}</div>` : e}</calcite-list>`}</calcite-flow-item>${this.renderApiItemFlowItem()}</calcite-flow>`;
|
|
89
90
|
}
|
|
90
91
|
}
|
|
91
92
|
m("arcgis-language-api-panel", I);
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { c as o } from "../../chunks/runtime.js";
|
|
2
2
|
import { css as r, html as i } from "lit";
|
|
3
3
|
import { LitElement as n, createEvent as c, noShadowRoot as l, safeClassMap as s } from "@arcgis/lumina";
|
|
4
|
-
import { generateGuid as d } from "@arcgis/
|
|
4
|
+
import { generateGuid as d } from "@arcgis/toolkit/string";
|
|
5
5
|
import { a } from "../../chunks/sql-expr-defaults.js";
|
|
6
6
|
import { u as p } from "../../chunks/useT9n.js";
|
|
7
7
|
import { createRef as h, ref as g } from "lit-html/directives/ref.js";
|
|
8
8
|
import { s as f } from "../../chunks/editor.js";
|
|
9
9
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
10
10
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
11
|
-
v4.34.0-next.
|
|
11
|
+
v4.34.0-next.62 */
|
|
12
12
|
const _ = r`@layer{arcgis-sql-expression-editor{display:flex;flex-direction:column;position:relative;overflow:hidden;border:var(--arcgis-coding-components-border)!important;box-sizing:border-box;background-color:var(--arcgis-coding-components-background-color);height:100%}}`;
|
|
13
13
|
class u extends n {
|
|
14
14
|
constructor() {
|
|
@@ -6,7 +6,7 @@ import { a as m } from "../../chunks/sql-expr-defaults.js";
|
|
|
6
6
|
import { u as d } from "../../chunks/useT9n.js";
|
|
7
7
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
8
8
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
9
|
-
v4.34.0-next.
|
|
9
|
+
v4.34.0-next.62 */
|
|
10
10
|
const h = r`:host{calcite-flow{height:100%}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}}`;
|
|
11
11
|
class f extends n {
|
|
12
12
|
constructor() {
|
package/dist/docs/api.json
CHANGED
package/dist/docs/docs.json
CHANGED
package/dist/docs/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"name": "@arcgis/coding-components",
|
|
4
|
-
"version": "4.34.0-next.
|
|
4
|
+
"version": "4.34.0-next.62",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { a as c } from "./chunks/arcade-defaults.js";
|
|
|
3
3
|
import { s as p } from "./chunks/sql-expr-defaults.js";
|
|
4
4
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
5
5
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
6
|
-
v4.34.0-next.
|
|
6
|
+
v4.34.0-next.62 */
|
|
7
7
|
const a = s, r = t;
|
|
8
8
|
export {
|
|
9
9
|
c as arcade,
|
package/dist/loader.js
CHANGED
|
@@ -2,7 +2,7 @@ import { r as e } from "./chunks/runtime.js";
|
|
|
2
2
|
import { makeDefineCustomElements as i } from "@arcgis/lumina";
|
|
3
3
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
4
4
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
5
|
-
v4.34.0-next.
|
|
5
|
+
v4.34.0-next.62 */
|
|
6
6
|
const o = i(e, {
|
|
7
7
|
"arcgis-arcade-coding-assistant": [() => import("./components/arcgis-arcade-coding-assistant/customElement.js"), "appVersion,assistantsEnabled,closed,closePanel:,editorRef:,feedbackServiceUrl,helpBase,insertText:,layer,portalUrl,serviceUrl;destroy"],
|
|
8
8
|
"arcgis-arcade-editor": [() => import("./components/arcgis-arcade-editor/customElement.js"), "customPanels:,editorInstance:,editorOptions:,hideDocumentationActions,hideSideBar,openedSidePanel:,profile:,script,sideActionBarExpanded,snippets:,suggestions:,testData:;getEditorInstance,getScript,getTestResult,setFocus"],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/coding-components",
|
|
3
|
-
"version": "4.34.0-next.
|
|
3
|
+
"version": "4.34.0-next.62",
|
|
4
4
|
"description": "Contains components for editing code in different languages. The currently supported languages are html, css, json, TypeScript, JavaScript, and Arcade.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ArcGIS",
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
],
|
|
40
40
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@arcgis/arcade-languageservice": "4.34.0-next.
|
|
43
|
-
"@arcgis/
|
|
44
|
-
"@arcgis/
|
|
45
|
-
"@arcgis/
|
|
42
|
+
"@arcgis/arcade-languageservice": "4.34.0-next.62",
|
|
43
|
+
"@arcgis/languages-api-utils": "4.34.0-next.62",
|
|
44
|
+
"@arcgis/lumina": "4.34.0-next.62",
|
|
45
|
+
"@arcgis/toolkit": "4.34.0-next.62",
|
|
46
46
|
"lit": "^3.3.0",
|
|
47
47
|
"monaco-editor": "^0.52.0",
|
|
48
48
|
"tslib": "^2.8.1",
|
package/dist/cdn/4463YABH.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
|
-
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
3
|
-
v4.34.0-next.60 */
|
|
4
|
-
import{a as _,f as p,g as k,r as J,s as Tt}from"./IAUCLWLU.js";var Q=globalThis,Y=Q.ShadowRoot&&(Q.ShadyCSS===void 0||Q.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,dt=Symbol(),Pt=new WeakMap,I=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==dt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(Y&&t===void 0){let s=e!==void 0&&e.length===1;s&&(t=Pt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&Pt.set(e,t))}return t}toString(){return this.cssText}},Nt=o=>new I(typeof o=="string"?o:o+"",void 0,dt),le=(o,...t)=>{let e=o.length===1?o[0]:t.reduce((s,i,n)=>s+(r=>{if(r._$cssResult$===!0)return r.cssText;if(typeof r=="number")return r;throw Error("Value passed to 'css' function must be a 'css' function result: "+r+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+o[n+1],o[0]);return new I(e,o,dt)},Dt=(o,t)=>{if(Y)o.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let s=document.createElement("style"),i=Q.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,o.appendChild(s)}},pt=Y?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(let s of t.cssRules)e+=s.cssText;return Nt(e)})(o):o;var{is:ce,defineProperty:he,getOwnPropertyDescriptor:de,getOwnPropertyNames:pe,getOwnPropertySymbols:ue,getPrototypeOf:fe}=Object,X=globalThis,xt=X.trustedTypes,me=xt?xt.emptyScript:"",ye=X.reactiveElementPolyfillSupport,j=(o,t)=>o,Z={toAttribute(o,t){switch(t){case Boolean:o=o?me:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,t){let e=o;switch(t){case Boolean:e=o!==null;break;case Number:e=o===null?null:Number(o);break;case Object:case Array:try{e=JSON.parse(o)}catch{e=null}}return e}},H=(o,t)=>!ce(o,t),Lt={attribute:!0,type:String,converter:Z,reflect:!1,useDefault:!1,hasChanged:H};Symbol.metadata??=Symbol("metadata"),X.litPropertyMetadata??=new WeakMap;var E=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Lt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let s=Symbol(),i=this.getPropertyDescriptor(t,s,e);i!==void 0&&he(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){let{get:i,set:n}=de(this.prototype,t)??{get(){return this[e]},set(r){this[e]=r}};return{get:i,set(r){let a=i?.call(this);n?.call(this,r),this.requestUpdate(t,a,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Lt}static _$Ei(){if(this.hasOwnProperty(j("elementProperties")))return;let t=fe(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(j("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(j("properties"))){let e=this.properties,s=[...pe(e),...ue(e)];for(let i of s)this.createProperty(i,e[i])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[s,i]of e)this.elementProperties.set(s,i)}this._$Eh=new Map;for(let[e,s]of this.elementProperties){let i=this._$Eu(e,s);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let s=new Set(t.flat(1/0).reverse());for(let i of s)e.unshift(pt(i))}else t!==void 0&&e.push(pt(t));return e}static _$Eu(t,e){let s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Dt(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){let s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(i!==void 0&&s.reflect===!0){let n=(s.converter?.toAttribute!==void 0?s.converter:Z).toAttribute(e,s.type);this._$Em=t,n==null?this.removeAttribute(i):this.setAttribute(i,n),this._$Em=null}}_$AK(t,e){let s=this.constructor,i=s._$Eh.get(t);if(i!==void 0&&this._$Em!==i){let n=s.getPropertyOptions(i),r=typeof n.converter=="function"?{fromAttribute:n.converter}:n.converter?.fromAttribute!==void 0?n.converter:Z;this._$Em=i,this[i]=r.fromAttribute(e,n.type)??this._$Ej?.get(i)??null,this._$Em=null}}requestUpdate(t,e,s){if(t!==void 0){let i=this.constructor,n=this[t];if(s??=i.getPropertyOptions(t),!((s.hasChanged??H)(n,e)||s.useDefault&&s.reflect&&n===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:i,wrapped:n},r){s&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??e??this[t]),n!==!0||r!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),i===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[i,n]of this._$Ep)this[i]=n;this._$Ep=void 0}let s=this.constructor.elementProperties;if(s.size>0)for(let[i,n]of s){let{wrapped:r}=n,a=this[i];r!==!0||this._$AL.has(i)||a===void 0||this.C(i,void 0,n,a)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(s=>s.hostUpdate?.()),this.update(e)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}};E.elementStyles=[],E.shadowRootOptions={mode:"open"},E[j("elementProperties")]=new Map,E[j("finalized")]=new Map,ye?.({ReactiveElement:E}),(X.reactiveElementVersions??=[]).push("2.1.0");var ft=globalThis,tt=ft.trustedTypes,Ut=tt?tt.createPolicy("lit-html",{createHTML:o=>o}):void 0,mt="$lit$",b=`lit$${Math.random().toFixed(9).slice(2)}$`,yt="?"+b,ge=`<${yt}>`,O=document,z=()=>O.createComment(""),B=o=>o===null||typeof o!="object"&&typeof o!="function",gt=Array.isArray,Ht=o=>gt(o)||typeof o?.[Symbol.iterator]=="function",ut=`[
|
|
5
|
-
\f\r]`,V=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Rt=/-->/g,Mt=/>/g,C=RegExp(`>|${ut}(?:([^\\s"'>=/]+)(${ut}*=${ut}*(?:[^
|
|
6
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),kt=/'/g,It=/"/g,Vt=/^(?:script|style|textarea|title)$/i,vt=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),es=vt(1),ss=vt(2),os=vt(3),f=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),jt=new WeakMap,w=O.createTreeWalker(O,129);function zt(o,t){if(!gt(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ut!==void 0?Ut.createHTML(t):t}var Bt=(o,t)=>{let e=o.length-1,s=[],i,n=t===2?"<svg>":t===3?"<math>":"",r=V;for(let a=0;a<e;a++){let l=o[a],c,u,h=-1,m=0;for(;m<l.length&&(r.lastIndex=m,u=r.exec(l),u!==null);)m=r.lastIndex,r===V?u[1]==="!--"?r=Rt:u[1]!==void 0?r=Mt:u[2]!==void 0?(Vt.test(u[2])&&(i=RegExp("</"+u[2],"g")),r=C):u[3]!==void 0&&(r=C):r===C?u[0]===">"?(r=i??V,h=-1):u[1]===void 0?h=-2:(h=r.lastIndex-u[2].length,c=u[1],r=u[3]===void 0?C:u[3]==='"'?It:kt):r===It||r===kt?r=C:r===Rt||r===Mt?r=V:(r=C,i=void 0);let y=r===C&&o[a+1].startsWith("/>")?" ":"";n+=r===V?l+ge:h>=0?(s.push(c),l.slice(0,h)+mt+l.slice(h)+b+y):l+b+(h===-2?a:y)}return[zt(o,n+(o[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]},W=class o{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let n=0,r=0,a=t.length-1,l=this.parts,[c,u]=Bt(t,e);if(this.el=o.createElement(c,s),w.currentNode=this.el.content,e===2||e===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(i=w.nextNode())!==null&&l.length<a;){if(i.nodeType===1){if(i.hasAttributes())for(let h of i.getAttributeNames())if(h.endsWith(mt)){let m=u[r++],y=i.getAttribute(h).split(b),A=/([.?@])?(.*)/.exec(m);l.push({type:1,index:n,name:A[2],strings:y,ctor:A[1]==="."?st:A[1]==="?"?ot:A[1]==="@"?it:T}),i.removeAttribute(h)}else h.startsWith(b)&&(l.push({type:6,index:n}),i.removeAttribute(h));if(Vt.test(i.tagName)){let h=i.textContent.split(b),m=h.length-1;if(m>0){i.textContent=tt?tt.emptyScript:"";for(let y=0;y<m;y++)i.append(h[y],z()),w.nextNode(),l.push({type:2,index:++n});i.append(h[m],z())}}}else if(i.nodeType===8)if(i.data===yt)l.push({type:2,index:n});else{let h=-1;for(;(h=i.data.indexOf(b,h+1))!==-1;)l.push({type:7,index:n}),h+=b.length-1}n++}}static createElement(t,e){let s=O.createElement("template");return s.innerHTML=t,s}};function S(o,t,e=o,s){if(t===f)return t;let i=s!==void 0?e._$Co?.[s]:e._$Cl,n=B(t)?void 0:t._$litDirective$;return i?.constructor!==n&&(i?._$AO?.(!1),n===void 0?i=void 0:(i=new n(o),i._$AT(o,e,s)),s!==void 0?(e._$Co??=[])[s]=i:e._$Cl=i),i!==void 0&&(t=S(o,i._$AS(o,t.values),i,s)),t}var et=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:s}=this._$AD,i=(t?.creationScope??O).importNode(e,!0);w.currentNode=i;let n=w.nextNode(),r=0,a=0,l=s[0];for(;l!==void 0;){if(r===l.index){let c;l.type===2?c=new U(n,n.nextSibling,this,t):l.type===1?c=new l.ctor(n,l.name,l.strings,this,t):l.type===6&&(c=new nt(n,this,t)),this._$AV.push(c),l=s[++a]}r!==l?.index&&(n=w.nextNode(),r++)}return w.currentNode=O,i}p(t){let e=0;for(let s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}},U=class o{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=S(this,t,e),B(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==f&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Ht(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==d&&B(this._$AH)?this._$AA.nextSibling.data=t:this.T(O.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:s}=t,i=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=W.createElement(zt(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else{let n=new et(i,this),r=n.u(this.options);n.p(e),this.T(r),this._$AH=n}}_$AC(t){let e=jt.get(t.strings);return e===void 0&&jt.set(t.strings,e=new W(t)),e}k(t){gt(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,s,i=0;for(let n of t)i===e.length?e.push(s=new o(this.O(z()),this.O(z()),this,this.options)):s=e[i],s._$AI(n),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){let s=t.nextSibling;t.remove(),t=s}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},T=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,n){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=d}_$AI(t,e=this,s,i){let n=this.strings,r=!1;if(n===void 0)t=S(this,t,e,0),r=!B(t)||t!==this._$AH&&t!==f,r&&(this._$AH=t);else{let a=t,l,c;for(t=n[0],l=0;l<n.length-1;l++)c=S(this,a[s+l],e,l),c===f&&(c=this._$AH[l]),r||=!B(c)||c!==this._$AH[l],c===d?t=d:t!==d&&(t+=(c??"")+n[l+1]),this._$AH[l]=c}r&&!i&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},st=class extends T{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}},ot=class extends T{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}},it=class extends T{constructor(t,e,s,i,n){super(t,e,s,i,n),this.type=5}_$AI(t,e=this){if((t=S(this,t,e,0)??d)===f)return;let s=this._$AH,i=t===d&&s!==d||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==d&&(s===d||i);i&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},nt=class{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t)}},Wt={M:mt,P:b,A:yt,C:1,L:Bt,R:et,D:Ht,V:S,I:U,H:T,N:ot,U:it,B:st,F:nt},ve=ft.litHtmlPolyfillSupport;ve?.(W,U),(ft.litHtmlVersions??=[]).push("3.3.0");var Et=(o,t,e)=>{let s=e?.renderBefore??t,i=s._$litPart$;if(i===void 0){let n=e?.renderBefore??null;s._$litPart$=i=new U(t.insertBefore(z(),n),n,void 0,e??{})}return i._$AI(o),i};var bt=globalThis,v=class extends E{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Et(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return f}};v._$litElement$=!0,v.finalized=!0,bt.litElementHydrateSupport?.({LitElement:v});var Ee=bt.litElementPolyfillSupport;Ee?.({LitElement:v});(bt.litElementVersions??=[]).push("4.2.0");var q=Symbol.for("controller"),be=o=>typeof o=="object"&&o!==null&&(q in o||"hostConnected"in o||"hostDisconnected"in o||"hostUpdate"in o||"hostUpdated"in o),ys=o=>typeof o?.then=="function";var F,N=o=>{F!==o&&(F=o,queueMicrotask(()=>F===o?F=void 0:0))},K=o=>F,P=[],Ft=o=>{if(o===void 0){P=[];return}let t=P.indexOf(o);P=t===-1?[...P,o]:P.slice(0,t+1),queueMicrotask(()=>P=[])},qt=()=>P,R,gs=o=>{R!==o&&(R=o,queueMicrotask(()=>R===o?R=void 0:0))},$e=()=>{let o=R;return R=void 0,o},Kt=async(o,t)=>{let e=at(o);if(e===void 0)return o;if(await e.ready,typeof t=="function"){let s=e.watchExports(i=>t(i,s))}return e.exports},Gt=async o=>{let t=at(o);return await t.ready,t},at=o=>{let e=K().manager.X(o);if(e!==void 0)return e;if(be(o))return o;let s=$e();if(s!==void 0)return s},rt=!1,vs=o=>{rt=!0;try{return o()}finally{rt=!1}};var _e=(o,t,e)=>{let s=Object.keys(o),i=s.length;M===void 0&&queueMicrotask(lt),M??=new Map;let n=M.get(o);return n===void 0&&(n={callbacks:[],keyCount:i},M.set(o,n)),n.keyCount!==i&&(n.callbacks.forEach(r=>r(s)),n.callbacks=[],n.keyCount=i),n.callbacks.push(r=>{let a=c=>p(t,null,c),l=r[i];l===void 0?a(void 0):o[l]===e?a(l):a(void 0)}),e},M,lt=()=>{M?.forEach(({callbacks:o},t)=>{let e=Object.keys(t);o.forEach(s=>s(e))}),M=void 0},Ae=(o,t,e)=>{let s=o.manager;return s.V!==d&&s.V!==e&&s.S(void 0,void 0),s.T.length===0&&queueMicrotask(()=>s.S(void 0,void 0)),s.V=e,s.T.push((i,n)=>p(t,void 0,e===n?i:void 0)),e},Ce=(o=[K(),...qt()],t,e)=>{let s=Array.isArray(o)?o:[o],i=s.length+1,n=r=>{i-=1,r!==void 0&&(i=Math.min(i,0)),i===0&&t(r)};s.forEach(r=>_e(r,a=>n(a===void 0?void 0:{key:a,host:r,isReactive:!1}),e));for(let r of s)if("manager"in r&&r.manager.component===r){Ae(r,a=>n(a===void 0?void 0:{key:a,host:r,isReactive:!0}),e);break}return e},we=(o="",t={},e=K())=>{let s={emit:i=>{o===""&<();let n=new CustomEvent(o,{detail:i,cancelable:!0,bubbles:!0,composed:!0,...t});return e.el.dispatchEvent(n),n}};return o===""&&Ce(void 0,i=>o=i.key,s),s},Oe=we.bind(null,""),Yt;Yt=q;var $t=class{constructor(t){this.#t=[],this.#e=[],this.#s=[],this.#o=[],this.#i=[],this.#l=[],this.#c=[],this.#p=[],this.#h=[],this.#d=!1,this.P=new _,this.connectedCalled=!1,this.loadedCalled=!1,this[Yt]=!0,this.#a=[];let e=this,s=t??K(new.target.name);e.#n=s,e.ready=e.P.promise,e.#r=Qt(e),e.component=s,e.#n.addController(e),e.#n.manager===void 0||(Ft(e),queueMicrotask(()=>e.catchUpLifecycle()))}#t;#e;#s;#o;#i;#l;#c;#p;#h;#d;#n;catchUpLifecycle(){let{manager:t}=this.#n;t.connectedCalled&&!this.connectedCalled&&this.triggerConnected(),t.#d&&this.triggerLoad().then(()=>t.loadedCalled&&this.triggerLoaded()).catch(console.error)}#r;get exports(){return this.#r}set exports(t){let e=this.#r;e!==t&&(this.#r=t,this.#a.forEach(p),this.connectedCalled&&this.O!==!1&&this.#n.requestUpdate(this.O,e)),this.P.resolve(t)}setProvisionalExports(t,e=!0){this.#r=e?Qt(t):t,this.#a.forEach(p)}#a;watchExports(t){let e=()=>t(this.#r);return this.#a.push(e),()=>void this.#a.splice(this.#a.indexOf(e),1)}get use(){return N(this.#n),Kt}get useRef(){return N(this.#n),Gt}get useRefSync(){return N(this.#n),at}controllerRemoved(){this.#n.el.isConnected&&this.triggerDisconnected(),this.triggerDestroy()}onConnected(t){this.#t.push(t)}onDisconnected(t){this.#e.push(t)}onLoad(t){this.#s.push(t)}onLoaded(t){this.#o.push(t)}onUpdate(t){this.#i.push(t)}onUpdated(t){this.#l.push(t)}onDestroy(t){this.#c.push(t)}onLifecycle(t){this.#p.push(t),this.connectedCalled&&this.#n.el.isConnected&&this.#u(t)}triggerConnected(){let t=this;t.hostConnected&&p(t.hostConnected,t),t.#t.forEach(p),t.triggerLifecycle(),t.connectedCalled=!0}triggerDisconnected(){let t=this;t.hostDisconnected&&p(t.hostDisconnected,t),t.#e.forEach(p),t.#h.forEach(p),t.#h=[]}async triggerLoad(){if(this.#d)return;this.#d=!0;let t=this;t.hostLoad&&await k(t.hostLoad,t),this.#s.length>0&&await Promise.allSettled(this.#s.map(k)),this.P.resolve(this.#r)}triggerLoaded(){this.loadedCalled||(this.hostLoaded&&p(this.hostLoaded,this),this.#o.forEach(p),this.loadedCalled=!0)}triggerUpdate(t){this.hostUpdate&&p(this.hostUpdate,this,t),this.#i.forEach(Jt,t)}triggerUpdated(t){this.hostUpdated&&p(this.hostUpdated,this,t),this.#l.forEach(Jt,t)}triggerDestroy(){this.hostDestroy&&p(this.hostDestroy,this),this.#c.forEach(p)}triggerLifecycle(){this.hostLifecycle&&this.#u(()=>this.hostLifecycle()),this.#p.forEach(this.#u,this)}#u(t){N(this.#n);let e=p(t);(Array.isArray(e)?e:[e]).forEach(i=>{typeof i=="function"?this.#h.push(i):typeof i=="object"&&typeof i.remove=="function"&&this.#h.push(i.remove)})}};function Jt(o){p(o,void 0,this)}var Zt=$t,Qt=o=>{if(typeof o!="object"&&typeof o!="function"||o===null)return o;let t={get(s,i,n){if(!((i==="exports"||i==="_exports")&&i in s&&s[i]===e)&&(i in s||i in Promise.prototype||typeof i=="symbol"))return typeof s=="function"?s[i]:Reflect.get(s,i,n)}},e=new Proxy(o,t);return e};var Xt=";",ct=",",te=":";var At=o=>{let t=o;for(;t=t.parentNode??t.host;)if(t?.constructor?.lumina){let e=t;return e.manager?.loadedCalled||(e.J??e._offspring).push(o),(e.I??e._postLoad).promise}return!1},Ct={};function wt(){}var Se=(o,t)=>function(s,i){if(!globalThis.customElements)return;let r=(i??s??{}).resourcesUrl;r&&o.setAssetPath(r);for(let[a,[l,c=""]]of Object.entries(t)){if(customElements.get(a))continue;let[u,h,m]=c.split(Xt),y=u?u?.split(ct).map(Te):void 0,A=y?.map(([L])=>L),x=class extends _t{static{this.observedAttributes=y?.map(([,L])=>L).filter(L=>L!=="")}static{this.C=A}static{this.E=h?h?.split(ct):void 0}static{this.D=m?.split(ct)}static{this.L=a}static{this.K=o}constructor(){!x.B&&(x.B=l(),x.F()),super()}};customElements.define(a,x)}},ht=Object.defineProperty,Te=o=>{let t=o.split(te);return t.length===1?[t[0],J(t[0])]:t},Pe=globalThis.HTMLElement??wt,_t=class extends Pe{constructor(){super(),this.#e={},this.#s=[],this.I=new _,this.H=new _,this.J=[];let t=this,e=t.constructor;t._offspring=t.J,t._postLoad=t.I,e.C?.forEach(s=>{Object.hasOwn(t,s)&&(t.#e[s]=t[s],delete t[s])}),e.A?t.#o({a:e.A}):e.B.then(async s=>{await e.K.p,t.#o(await(s.default?.then(i=>typeof i=="function"?{a:i}:i)??s))}).catch(s=>{t.H.reject(s),setTimeout(()=>{throw s})})}static{this.lumina=!0}static F(){for(let t of this.C??[])ht(this.prototype,t,{configurable:!0,enumerable:!0,get(){return this.#e[t]},set(e){this.#e[t]=e}});for(let t of this.E??[])ht(this.prototype,t,{async value(...e){return this.#t||await this.H.promise,await this.#t[t](...e)},configurable:!0});for(let t of this.D??[])ht(this.prototype,t,{value(...e){return this.#t[t](...e)},configurable:!0})}#t;#e;#s;get manager(){return this.#t?.manager}attributeChangedCallback(t,e,s){this.#t?.attributeChangedCallback(t,e,s),this.#t||this.#s.push(t)}connectedCallback(){this.#t?this.#t.connectedCallback?.():queueMicrotask(()=>this.G=At(this))}disconnectedCallback(){this.#t?.disconnectedCallback?.()}async componentOnReady(){return await this.H.promise,this}#o(t){let e=this.constructor,s=e.L,i=this.#e,n=Object.values(t).find(h=>h.L===s),r=`${s}--lazy`,a=n;for(;a&&!Object.hasOwn(a,"lumina");)a=Object.getPrototypeOf(a);De(a),!e.A&&(e.A=n,customElements.define(r,n)),n.N=this;let c=document.createElement(r);n.N=void 0,this.#t=c,this.#e=c,this.#s.forEach(h=>c.attributeChangedCallback(h,null,this.getAttribute(h))),Object.entries(i).forEach(Ne,c);let u=this.isConnected;(u||this.G)&&(c.connectedCallback?.(),u||c.disconnectedCallback())}addController(){}requestUpdate(){this.#t?.requestUpdate()}};function Ne([o,t]){this[o]=t}var De=o=>{let t=o.prototype,e=Element.prototype;Object.hasOwn(t,"isConnected")||(t.setAttribute=function(i,n){e.setAttribute.call(this.el,i,n)},t.removeAttribute=function(i){e.removeAttribute.call(this.el,i)},ht(t,"isConnected",{get(){return Reflect.get(e,"isConnected",this.el)}}))};var g={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},D=o=>(...t)=>({_$litDirective$:o,values:t}),$=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var ee=D(class extends ${constructor(o){if(super(o),o.type!==g.ATTRIBUTE||o.name!=="class"||o.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(o){return" "+Object.keys(o).filter(t=>o[t]).join(" ")+" "}update(o,[t]){if(this.st===void 0){this.st=new Set,o.strings!==void 0&&(this.nt=new Set(o.strings.join(" ").split(/\s/).filter(s=>s!=="")));for(let s in t)t[s]&&!this.nt?.has(s)&&this.st.add(s);return this.render(t)}let e=o.element.classList;for(let s of this.st)s in t||(e.remove(s),this.st.delete(s));for(let s in t){let i=!!t[s];i===this.st.has(s)||this.nt?.has(s)||(i?(e.add(s),this.st.add(s)):(e.remove(s),this.st.delete(s)))}return f}});var se="important",Le=" !"+se,Ue=D(class extends ${constructor(o){if(super(o),o.type!==g.ATTRIBUTE||o.name!=="style"||o.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(o){return Object.keys(o).reduce((t,e)=>{let s=o[e];return s==null?t:t+`${e=e.includes("-")?e:e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`},"")}update(o,[t]){let{style:e}=o.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(let s of this.ft)t[s]==null&&(this.ft.delete(s),s.includes("-")?e.removeProperty(s):e[s]=null);for(let s in t){let i=t[s];if(i!=null){this.ft.add(s);let n=typeof i=="string"&&i.endsWith(Le);s.includes("-")||n?e.setProperty(s,n?i.slice(0,-11):i,n?se:""):e[s]=i}}return f}});var{I:Re}=Wt;var ie=o=>o.strings===void 0,oe=()=>document.createComment(""),Ks=(o,t,e)=>{let s=o._$AA.parentNode,i=t===void 0?o._$AB:t._$AA;if(e===void 0){let n=s.insertBefore(oe(),i),r=s.insertBefore(oe(),i);e=new Re(n,r,o,o.options)}else{let n=e._$AB.nextSibling,r=e._$AM,a=r!==o;if(a){let l;e._$AQ?.(o),e._$AM=o,e._$AP!==void 0&&(l=o._$AU)!==r._$AU&&e._$AP(l)}if(n!==i||a){let l=e._$AA;for(;l!==n;){let c=l.nextSibling;s.insertBefore(l,i),l=c}}}return e},Gs=(o,t,e=o)=>(o._$AI(t,e),o),Me={},ne=(o,t=Me)=>o._$AH=t,Js=o=>o._$AH,Qs=o=>{o._$AP?.(!1,!0);let t=o._$AA,e=o._$AB.nextSibling;for(;t!==e;){let s=t.nextSibling;t.remove(),t=s}};var ke=D(class extends ${constructor(o){if(super(o),o.type!==g.PROPERTY&&o.type!==g.ATTRIBUTE&&o.type!==g.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!ie(o))throw Error("`live` bindings can only contain a single expression")}render(o){return o}update(o,[t]){if(t===f||t===d)return t;let e=o.element,s=o.name;if(o.type===g.PROPERTY){if(t===e[s])return f}else if(o.type===g.BOOLEAN_ATTRIBUTE){if(!!t===e.hasAttribute(s))return f}else if(o.type===g.ATTRIBUTE&&e.getAttribute(s)===t+"")return f;return ne(o),t}});var Ot=class extends Zt{constructor(t){super(t),this.destroyed=!1,this.R=!1,this.V=d,this.T=[],this.#s=new WeakMap,this.#e=t,this.exports=void 0,this.hasDestroy=St in t&&typeof t.destroy=="function",v.prototype.addController.call(t,{hostConnected:()=>{if(this.destroyed){let e=t.el.localName;throw t.el.remove(),new Error(`The ${e} component has already been destroyed. It cannot be used again. If you meant to disconnect and reconnect a component without automatic destroy, set the ${St} prop.`)}this.#t!==void 0&&clearTimeout(this.#t),lt();for(let e of t.M)"triggerConnected"in e?e.triggerConnected():p(e.hostConnected,e)},hostDisconnected:()=>{for(let e of t.M)"triggerDisconnected"in e?e.triggerDisconnected():p(e.hostDisconnected,e);this.hasDestroy&&!this.destroyed&&this.U()},hostUpdate:()=>{for(let e of t.M)"triggerUpdate"in e?e.triggerUpdate(this.Q):p(e.hostUpdate,e,this.Q)},hostUpdated:()=>{for(let e of t.M)"triggerUpdated"in e?e.triggerUpdated(this.Q):p(e.hostUpdated,e,this.Q);this.Q=void 0}}),queueMicrotask(()=>this.R=!0),N(t)}#t;#e;async destroy(){if(!this.destroyed){this.#e.el.isConnected&&(this.hasDestroy=!1,this.#e.el.remove()),this.#t=void 0,this.destroyed=!0;for(let t of this.#e.M)"triggerDestroy"in t?t.triggerDestroy():p(t.hostDestroy,t);this.#e.M.splice(0)}}U(){if(this.#t!==void 0&&clearTimeout(this.#t),!this.#e.el.isConnected&&!this.#e.autoDestroyDisabled){let t=()=>void this.#e.destroy();this.#t=Tt(t,qe)}}S(t,e){let s=this.T;this.V=d,this.T=[],s.forEach(i=>i(t,e))}#s;W(t,e){(typeof e=="object"&&e!==null||typeof e=="function")&&this.#s.set(e,t)}X(t){if(typeof t=="object"&&t!==null||typeof t=="function")return this.#s.get(t)}},qe=1e3,St="autoDestroyDisabled",re=class o extends v{constructor(){super(),this.M=[],this.manager=new Ot(this);let t=this,e=t.constructor,s=e.N,i=e.K.o,n=o.prototype.shouldUpdate;t.#o=s?.H??new _,t.I=s?.I??new _,t.J=s?.J??[],t._offspring=t.J,t._postLoad=t.I,t.el=s??t,t.#s=t.enableUpdating,t.enableUpdating=wt,t.shouldUpdate!==n&&(t.#e=t.shouldUpdate,t.shouldUpdate=n),i&&(t.#t=new Map,e.elementProperties.forEach((r,a)=>t.#t.set(a,i()))),!1}static finalizeStyles(t){let e=super.finalizeStyles(t),s=this.shadowRootOptions===Ct;return this.K?.commonStyles===void 0||s?e:[this.K.commonStyles,...e]}static createProperty(t,e){let s=typeof e=="number"?e:Array.isArray(e)?e[0]:0,i=Array.isArray(e)?e[1]:void 0,n=i?.hasChanged??H,r={attribute:s&1&&typeof t=="string"?J(t):!1,reflect:!!(s&2),type:s&4?Boolean:s&8?Number:void 0,state:!!(s&16),readOnly:!!(s&32),noAccessor:!!(s&64),c:!1,...i,hasChanged(a,l){let c=n(a,l);return r.c=c,c}};super.createProperty(t,r)}static getPropertyDescriptor(t,e,s){let i=this.K,n=super.getPropertyDescriptor(t,e,s);return s.d=n,{...n,get(){return i.t?.(this.#t.get(t)),n.get?.call(this)},set(r){let a=this.manager;if(s.readOnly&&!rt&&(a.R||a.connectedCalled))throw Error(`Cannot assign to read-only property "${t}" of ${this.el.localName}. Trying to assign "${r}"`);n.set.call(this,r??void 0),s.c&&this.#t?.get(t)?.notify(),a.T.length>0&&a?.S(t,r)}}}static{this.lumina=!0}#t;#e;#s;#o;#i;connectedCallback(){if(this.el.hasAttribute("defer-hydration"))return;let t=this.constructor.K.c?.(()=>this.requestUpdate());this.#i=t;let e=!this.manager.connectedCalled;super.connectedCallback(),e?queueMicrotask(()=>this.#c().catch(s=>{this.#o.reject(s),setTimeout(()=>{throw s})})):t&&this.requestUpdate()}#l(t){try{this.#i.clear(),this.constructor.K.r(this.#i,()=>super.update(t))}catch(e){throw this.#i.clear(),e}}disconnectedCallback(){super.disconnectedCallback(),this.#i?.destroy(),this.#i=void 0}createRenderRoot(){let t=this.el.shadowRoot,e=this.constructor,s=e.shadowRootOptions,n=t??(s===Ct?this.el:this.el.attachShadow(s));if(t)return v.prototype.createRenderRoot.call(this),t;if(this.isConnected){let r=n.getRootNode();r.adoptedStyleSheets=[...r.adoptedStyleSheets,...e.elementStyles.map(a=>"styleSheet"in a?a.styleSheet:a)]}return n}async#c(){let t=this.el.G??At(this.el);t&&await t;let e=[];for(let i of this.M)"triggerLoad"in i?e.push(i.triggerLoad()):e.push(k(i.hostLoad,i));await Promise.all(e),await this.load?.(),this.manager.hasDestroy&&this.manager.onUpdate(i=>i.has(St)&&this.manager.U()),this.#s(!0),this.performUpdate(),this.I.resolve(),await Promise.resolve();let s=this.J.filter(i=>!i.manager?.loadedCalled);s.length&&await Promise.allSettled(s.map(async i=>await i.componentOnReady())),this.J.length=0,this.el.setAttribute(this.constructor.K.hydratedAttribute,"");for(let i of this.M)"triggerLoaded"in i?i.triggerLoaded():p(i.hostLoaded,i);this.loaded?.(),this.#o.resolve()}shouldUpdate(t){return this.manager.Q=t,this.#e?.(t)??!0}update(t){this.#i?this.#l(t):super.update(t)}listen(t,e,s){let i=e?.bind(this)??e;this.manager.onLifecycle(()=>(this.el.addEventListener(t,i,s),()=>this.el.removeEventListener(t,i,s)))}listenOn(t,e,s,i){let n=s?.bind(this)??s;this.manager.onLifecycle(()=>(t.addEventListener(e,n,i),()=>t.removeEventListener(e,n,i)))}async componentOnReady(){return await this.#o.promise,this}addController(t){this.M.push(t),!(q in t)&&this.renderRoot&&this.el.isConnected&&t.hostConnected?.()}removeController(t){this.M.splice(this.M.indexOf(t),1),t.controllerRemoved?.()}},ae=o=>{let t,e=i=>{t=new URL(i,globalThis.location?.href||void 0).href},s={...o,getAssetPath(i){let n=new URL(i,t);return n.origin!==globalThis.location?.origin?n.href:n.pathname},setAssetPath:e,customElement(i,n){n.K=s,n.L=i,customElements.get(i)||customElements.define(i,n)}};return e(o.defaultAssetPath),s};var _o=o=>typeof o=="object"&&o!=null?ee(o):o;var Ao=d;var G=ae({defaultAssetPath:"https://jsdev.arcgis.com/next/coding-components/",hydratedAttribute:"hydrated"}),{customElement:To,getAssetPath:Po,setAssetPath:No}=G;G.t=void 0;G.o=void 0;G.c=void 0;G.r=void 0;export{ys as a,N as b,Ft as c,qt as d,gs as e,vs as f,le as g,es as h,f as i,d as j,Ce as k,Oe as l,$t as m,Ct as n,Se as o,g as p,D as q,$ as r,ie as s,Ks as t,Gs as u,ne as v,Js as w,Qs as x,re as y,_o as z,Ao as A,G as B,To as C,Po as D};
|
package/dist/cdn/47XAK6TQ.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
|
-
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
3
|
-
v4.34.0-next.60 */
|
|
4
|
-
import{a as f}from"./I3ZGEMFA.js";import{a as h,b as g}from"./ZHCT5XD4.js";import{a as _}from"./LDTY2BQR.js";import"./U6WYSIOL.js";import b from"./PK3SVCAL.js";import a from"./BYS7NZEV.js";import"./DSM5X3AK.js";import"./4XLS4HHS.js";import"./ZIQGH3R5.js";import{C as p,g as n,h as e,l as c,n as d,y as l,z as s}from"./4463YABH.js";import{h as r}from"./IAUCLWLU.js";import"./FWCO6ADZ.js";import"./F3GTWULQ.js";export default $arcgis.t(([,t])=>{var m=n`@layer{arcgis-sql-expression-editor{display:flex;flex-direction:column;position:relative;overflow:hidden;border:var(--arcgis-coding-components-border)!important;box-sizing:border-box;background-color:var(--arcgis-coding-components-background-color);height:100%}}`,o=class extends l{constructor(){super(...arguments),this._codeEditorElt=h(),this.messages=_(),this._modelId=r(),this._preparing=!1,this.sideActionBarExpanded=!1,this.script="",this.hideSideBar=!1,this.arcgisScriptChange=c({bubbles:!1})}static{this.properties={_activeAction:16,_apiLibrary:16,_editorProfile:16,_preparing:16,sideActionBarExpanded:16,profile:0,script:1,hideSideBar:5}}static{this.shadowRootOptions=d}static{this.styles=[m,f]}async load(){await this._updateEditorProfile().catch(console.error)}willUpdate(i){(i.has("messages")||i.has("profile"))&&this._updateDataModelDeps()}async _updateDataModelDeps(){await this._updateEditorProfile(),await this._updateApiLibrary()}async _updateEditorProfile(){this._preparing=!0;try{await t.setProfileForModel(this._modelId,this.profile,{locale:this.messages._t9nLocale}),this._editorProfile=t.getEditorProfileForModel(this._modelId)}catch{this._editorProfile=void 0}finally{this._preparing=!1}}_setActiveAction(i){if(this._activeAction===i){this._activeAction=void 0;return}this._activeAction=i}_handleActionClick(i){let a=i.target;this._setActiveAction(a.dataset.panelName)}_insertAsSnippet(i){this._codeEditorElt.value?.insertSnippet(i.detail).catch(console.error)}_insertAsText(i){this._codeEditorElt.value?.insertText(i.detail.replaceAll('"',"'")).catch(console.error)}async _updateApiLibrary(){this._apiLibrary=await t.getApiLibraryForModel(this._modelId)}_onCodeEditorValueChange(i){i.stopPropagation(),this.script=i.detail,this.arcgisScriptChange.emit(i.detail)}_getFeatureSetVariable(){let i,a=t.getEditorProfileForModel(this._modelId);return a?.variables?.length&&a?.variables?.[0]?.type!=="featureSet"?console.error("encountered unexpected editor profile"):i=a?.variables?.[0],i}_toggleSideActionBarExpanded(){this.sideActionBarExpanded=!this.sideActionBarExpanded}render(){let i=this._getFeatureSetVariable();return e`<div class="flex-row flex-adjustable"><div class="flex-column flex-adjustable"><arcgis-code-editor language=arcgis-sql-expression .modelId=${this._modelId} .value=${this.script??""} @arcgisValueChange=${this._onCodeEditorValueChange} ${g(this._codeEditorElt)}></arcgis-code-editor></div>${!this.hideSideBar&&e`<arcgis-editor-variables .variable=${i} .closed=${this._activeAction!=="fields"} class=${s(this._activeAction==="fields"&&"side-panel flex-panel border-inline-start")} .loading=${this._preparing} .modelId=${this._modelId} @arcgisItemSelected=${this._insertAsText} @arcgisClose=${()=>this._setActiveAction(void 0)} data-panel-name=none></arcgis-editor-variables>`||""}${!this.hideSideBar&&e`<arcgis-language-api-panel class=${s(this._activeAction==="functions"&&"side-panel flex-panel border-inline-start")} .closed=${this._activeAction!=="functions"} @arcgisItemSelected=${this._insertAsSnippet} @arcgisClose=${()=>this._setActiveAction(void 0)} .loading=${this._preparing} .apiLibrary=${this._apiLibrary} data-panel-name=none hide-documentation-actions .languageId=${t.languageId}></arcgis-language-api-panel>`||""}${!this.hideSideBar&&e`<calcite-action-bar class="side-action-bar border-inline-start" .expanded=${this.sideActionBarExpanded} position=end @calciteActionBarToggle=${this._toggleSideActionBarExpanded}><calcite-action id=fields-action .text=${this.messages.fields??"Fields"} icon=profile-variables .active=${this._activeAction==="fields"} data-panel-name=fields @click=${this._handleActionClick}></calcite-action>${!this.sideActionBarExpanded&&e`<calcite-tooltip reference-element=fields-action><span>${this.messages.fields??"Fields"}</span></calcite-tooltip>`||""}<calcite-action id=functions-action .text=${this.messages.functions??"Functions"} icon=function .active=${this._activeAction==="functions"} data-panel-name=functions @click=${this._handleActionClick}></calcite-action>${!this.sideActionBarExpanded&&e`<calcite-tooltip reference-element=functions-action><span>${this.messages.functions??"Functions"}</span></calcite-tooltip>`||""}</calcite-action-bar>`||""}</div>`}};p("arcgis-sql-expression-editor",o);return o},a,b)
|
package/dist/cdn/IAUCLWLU.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
|
-
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
3
|
-
v4.34.0-next.60 */
|
|
4
|
-
var g=class{constructor(){this.promise=new Promise((t,o)=>{this.resolve=t,this.reject=o})}},y=(e,t)=>{let o=e;for(;o;){if(o===t)return!0;if(!o.parentNode)return!1;o.parentNode instanceof ShadowRoot?o=o.parentNode.host:o=o.parentNode}return!1},$=(e,t,o)=>{let n=N(t).subscribe;return n(s=>{s.some(r=>y(e,r.target))&&o()})},p={},N=e=>{let t=e.join(","),o=p[t];if(o!==void 0)return o;let n=new Set,s=new MutationObserver(r=>n.forEach(a=>a(r)));globalThis.document&&s.observe(document.documentElement,{attributes:!0,attributeFilter:e,subtree:!0});let c={subscribe:r=>(n.add(r),()=>{n.delete(r),n.size===0&&(s.disconnect(),p[t]=void 0)})};return p[t]=c,c},E=(e,t)=>{let o=e;for(;o;){let n=o.closest?.(t);if(n)return n;let s=o.getRootNode?.();if(s===globalThis.document)return null;o=s.host}return null},I=e=>E(e,":is(.calcite-mode-light, .calcite-mode-dark)")?.classList.contains("calcite-mode-dark")?"dark":"light";var A=(e,t,o)=>E(e,`[${t}]`)?.getAttribute(t)??o,S=e=>e.nodeType===Node.ELEMENT_NODE,w=e=>typeof e.setFocus=="function",l=(e,t="")=>{if(!S(e))return!1;if(e.matches(t))return w(e)&&setTimeout(()=>void e.setFocus(),0),!0;for(let n of e.children)if(l(n,t))return!0;let o=e.shadowRoot;if(o){for(let n of o.children)if(l(n,t))return!0}return!1},U=async e=>{e!=null&&(w(e)?await e.setFocus():e.focus())},V=(e,t)=>{if(e?.shadowRoot){if(e.hasAttribute("hydrated")||e.hasAttribute("calcite-hydrated")){l(e,t);return}Promise.resolve(e.componentOnReady?.()).then(()=>l(e,t))}};var q=(e,t,...o)=>{try{return e?.call(t,...o)}catch(n){console.error(n,e)}},_=async(e,t,...o)=>{try{return await e?.call(t,...o)}catch(n){console.error(n,e)}},i=e=>{let t="";for(let o=0;o<e;o++)t+=((1+Math.random())*65536|0).toString(16).substring(1);return t},B=()=>[i(2),i(1),i(1),i(1),i(3)].join("-"),j="ar,bg,bs,ca,cs,da,de,el,en,es,et,fi,fr,he,hr,hu,id,it,ja,ko,lt,lv,nl,nb,no,pl,pt-BR,pt-PT,ro,ru,sk,sl,sr,sv,th,tr,uk,vi,zh-CN,zh-HK,zh-TW".split(","),C=new Set(j),u="en",k={pt:"pt-PT",nb:"no",nn:"no",zh:"zh-CN"},R=async(e,t,o="")=>{let n=`${t}/${o}`,s=`${n}${e}.json`;return f[s]??(f[s]=L(e,n)),await f[s]},f={},L=async(e,t)=>{let o=`${t}${e}.json`;try{let n=await fetch(o);if(n.ok)return await n.json()}catch(n){return console.error(n),{}}return e===u?{}:await L(u,t)},z=e=>{let t=A(e,"lang",globalThis.navigator?.language||u);return{lang:t,t9nLocale:T(t)}},T=e=>{let[t,o]=e.split("-"),n=t.toLowerCase(),s=n;return o&&(s=`${n}-${o.toUpperCase()}`),s=k[s]??s,C.has(s)?s:o?T(n):u},Q=(e,t,o,n)=>{let s,c=()=>O(e,t(),n).then(r=>{(s?.lang!==r.lang||s.t9nLocale!==r.t9nLocale||s.t9nStrings!==r.t9nStrings)&&o(r),s=r}).catch(console.error);return queueMicrotask(c),$(e,["lang"],c)},O=async(e,t,o=e.localName.split("-").slice(1).join("-"))=>{let{lang:n,t9nLocale:s}=z(e),c=`${t}/${o}/t9n`,a=o===null?{}:await R(s,c,"messages.");return{lang:n,t9nLocale:s,t9nStrings:a}};var m='"',b="'",v=(e,t)=>new Array(t+1).join(e),D=e=>{let t=m,o=b;e.includes(t)&&!e.includes(o)&&(o=m,t=b);let s=new RegExp(`(^|[^\\\\])((?:\\\\{2})*)((?:\\\\${o})+)`,"gu");e=e.replace(s,(r,a,d,h)=>a+d+v(o,h.length/2));let c=new RegExp(`(^|[^\\\\])((?:\\\\{2})*)(${t}+)`,"gu");return e=e.replace(c,(r,a,d,h)=>a+d+v(`\\${t}`,h.length)),t+e+t},G=e=>{let t=e?e.replaceAll(/[-[\]/{}()*+?.\\^$|]/gu,"\\$&"):"^.*$";return new RegExp(t,"i")},H=(e,t={})=>(e??"").replace(/\{(?<valueName>.*?)\}/gu,(o,n)=>t[n]??o),K=e=>`\u200E${e??""}\u200E`;var W=e=>e.replace(P,(t,o)=>`${o===0?"":"-"}${t.toLowerCase()}`),P=/[A-Z]+(?![a-z])|[A-Z]/gu;var Z=(e,t)=>{let o=t>x?M:t/F,n=0,s=setInterval(()=>{n+=o,n>=t&&(clearInterval(s),e())},o);return s},x=4e3,M=2e3,F=4,J=e=>e!==null,X=e=>e!==void 0;var Y=(e,t=100)=>{let o;return(...n)=>{let s=()=>{clearTimeout(o),e(...n)};clearTimeout(o),o=setTimeout(s,t)}};export{g as a,$ as b,I as c,U as d,V as e,q as f,_ as g,B as h,C as i,R as j,z as k,T as l,Q as m,D as n,G as o,H as p,K as q,W as r,Z as s,J as t,X as u,Y as v};
|
package/dist/cdn/MKCXBA24.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
|
-
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
3
|
-
v4.34.0-next.60 */
|
|
4
|
-
import"./FA2S25XN.js";import{b as u}from"./ZHCT5XD4.js";import{a as f}from"./LDTY2BQR.js";import"./U6WYSIOL.js";import{C as m,g as d,h as i,l as a,y as h}from"./4463YABH.js";import{e as c,o as n}from"./IAUCLWLU.js";import"./F3GTWULQ.js";var g=d`:host{background-color:var(--calcite-color-foreground-1);.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.sticky{position:sticky;top:0;z-index:10}calcite-flow{height:100%}calcite-list-item-group{background-color:var(--calcite-color-foreground-2);word-break:break-word}}`;function b(r){r.key==="Enter"&&r.stopPropagation()}var o=class extends h{constructor(){super(...arguments),this._beforeBack=async()=>{this.removeLastPanelRenderer(),this._filterValue=""},this.messages=f(),this._filterValue="",this._flowItemRenderers=[],this._mode="profile",this._mutationCounter=1,this.loading=!1,this.closed=!1,this.arcgisClose=a({bubbles:!1}),this.arcgisItemSelected=a({bubbles:!1})}static{this.properties={_filterValue:16,_flowItemRenderers:16,_mode:16,_mutationCounter:16,loading:5,modelId:1,closed:5,variable:0}}static{this.styles=g}load(){this._variableChanged()}willUpdate(e){e.has("modelId")&&(this._flowItemRenderers=[]),e.has("variable")&&this._variableChanged()}disconnectedCallback(){super.disconnectedCallback(),this._flowObserver?.disconnect()}_variableChanged(){this._mode=this.variable?.type==="featureSet"?"featureSet":"profile"}addPanelRenderer(e){this._flowItemRenderers=[...this._flowItemRenderers,e]}removeLastPanelRenderer(){this._flowItemRenderers=this._flowItemRenderers.slice(0,-1)}_isMode(e){return this._mode===e}flowFocusHandler(e){if(!e){this._flowObserver?.disconnect(),this._flowObserver=void 0;return}this._flowObserver||(this._flowObserver=new MutationObserver(()=>{c(e.querySelector("calcite-flow-item:last-child"),"calcite-input")}),this._flowObserver.observe(e,{attributes:!0,attributeFilter:["id"],childList:!0}))}_updateFilterValue(e){this._filterValue=e.currentTarget.value}_emitClose(){this.arcgisClose.emit()}_backToTop(){this._flowItemRenderers=[]}_emitItemSelected(e,t){if(t.nonInteractive)return;let s=e;(!s.key||s.key==="Enter")&&(e.preventDefault(),this.arcgisItemSelected.emit(t.snippet))}_showCollectionPanel(e,t){e.stopPropagation(),this.addPanelRenderer(s=>this.renderCollectionBasedVariable(t,!1,s))}_getHeadingForCollection(e){if(!e)return"";switch(this._mode){case"profile":return this.messages.profilevariables??"";case"featureSet":return this.messages.fields??""}}_getDescriptionForCollection(e){if(!e)return"";switch(this._mode){case"profile":return e.breadcrumb;case"featureSet":return e.variables[0]?.getLabel()??""}}renderCollectionBasedVariable(e,t=!1,s=!1){if(!e)return null;let l=this.loading;return!l&&!e.loaded&&(e.loadSource().then(()=>setTimeout(()=>{this._mutationCounter+=1})).catch(()=>{console.error("Error loading collection"),l=!1}),l=!0),i`<calcite-flow-item .heading=${this._getHeadingForCollection(e)} .description=${this._getDescriptionForCollection(e)} .beforeBack=${this._beforeBack} closable @calciteFlowItemClose=${this._emitClose} .selected=${s}><calcite-action slot=header-actions-end .text=${this.messages.backtotop??""} scale=m .hidden=${t||this._isMode("featureSet")} icon=chevrons-left icon-flip-rtl @click=${this._backToTop}></calcite-action><calcite-input .value=${this._filterValue} icon=magnifying-glass clearable @calciteInputInput=${this._updateFilterValue} class="sticky" scale=m></calcite-input>${l?i`<calcite-loader scale=s type=indeterminate .label=${this.messages.loading??""}></calcite-loader>`:i`<calcite-list label=variables>${this.renderEditorVariables(e)}</calcite-list>`}</calcite-flow-item>`}renderEditorVariables(e){let t=n(this._filterValue),s=e.variables.filter(l=>l.passFilter(t));return s.length?s.map(l=>this.renderEditorVariable(l)):i`<div class="notice-container">${this.messages.noitems}</div>`}renderEditorVariable(e){switch(e.type){case"group":return this._isMode("featureSet")&&e.isHeader?i`<calcite-list-item-group .heading=${e.getLabel()}></calcite-list-item-group>`:this._isMode("featureSet")&&e._label?.code==="fields"?this.renderEditorVariables(e):i`<calcite-list-item-group .heading=${e.getLabel()}>${this.renderEditorVariables(e)}</calcite-list-item-group>`;default:return i`<calcite-list-item .label=${e.getLabel()} .description=${e.getDescription()} @calciteListItemSelect=${t=>this._emitItemSelected(t,e)} @keydown=${t=>this._emitItemSelected(t,e)}>${e.isCollection?i`<calcite-action slot=actions-end .text=${this.messages.expand??""} scale=s icon=chevron-right icon-flip-rtl @click=${t=>this._showCollectionPanel(t,e)} @keydown=${b}></calcite-action>`:null}${e.icon?i`<calcite-icon .icon=${e.icon} scale=s slot=content-start></calcite-icon>`:null}</calcite-list-item>`}}render(){return this.closed?null:!this.loading&&this.variable?.loaded&&!this.variable?.variables.length?i`<calcite-flow><calcite-flow-item .heading=${this.messages.profilevariables} closable @calciteFlowItemClose=${this._emitClose}><div class="notice-container">${this.messages.noprofilevariablesmessage}</div></calcite-flow-item></calcite-flow>`:i`<calcite-flow ${u(this.flowFocusHandler)}>${this.renderCollectionBasedVariable(this.variable,!0,this._flowItemRenderers.length===0)}${this._flowItemRenderers.map((e,t,s)=>e(t===s.length-1))}</calcite-flow>`}};m("arcgis-editor-variables",o);export{o as ArcgisEditorVariables};
|
package/dist/cdn/NUWXN4AU.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
|
-
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
3
|
-
v4.34.0-next.60 */
|
|
4
|
-
import{a as T}from"./XT7V2LEL.js";import b from"./HKJKK3XG.js";import"./FA2S25XN.js";import{a as V,b as D}from"./ZHCT5XD4.js";import{a as B}from"./LDTY2BQR.js";import"./U6WYSIOL.js";import a from"./BYS7NZEV.js";import"./DSM5X3AK.js";import{i as L,j}from"./4XLS4HHS.js";import"./ZIQGH3R5.js";import{A as w,C as H,g as P,h as c,i as q,j as C,p as _,q as F,r as O,y as z}from"./4463YABH.js";import{h as N}from"./IAUCLWLU.js";import"./FWCO6ADZ.js";import"./F3GTWULQ.js";export default $arcgis.t(([ae,G,oe,ce,{a:Q},S])=>{var k=class extends O{constructor(e){if(super(e),this.it=C,e.type!==_.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===C||e==null)return this._t=void 0,this.it=e;if(e===q)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;let t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};k.directiveName="unsafeHTML",k.resultType=1;var x=F(k);var re=P`:host(:not([closed])){--calcite-block-border-color: var(--calcite-color-transparent);flex:1 0 auto;border-inline-start:var(--arcgis-coding-components-border);box-sizing:border-box;max-width:var(--arcgis-coding-components-side-panel-max-w);width:var(--arcgis-coding-components-side-panel-w);.submission-actions-wrapper{display:flex;flex-direction:column;width:100%;gap:.75rem}.submission-actions{display:flex;flex-direction:row;gap:.5rem;justify-content:space-between}.gaps{display:flex;gap:.25rem}.align-inline-end{margin-inline-start:auto}.action .error-display{display:flex;flex-direction:row;gap:.5rem;justify-content:space-between}.context-popover p{padding:0 .5rem;font-size:var(--calcite-font-size-sm)}.prompt-list calcite-list-item{margin-block-end:.5rem;border-radius:var(--calcite-corner-radius-round);--calcite-color-border-3: transparent;overflow:hidden}.feedback-content{padding:1rem;display:flex;flex-direction:column;gap:.75rem;max-height:30vh;overflow-y:auto}.feedback-sheet{--calcite-sheet-height: auto;--calcite-sheet-max-height: 100%;--calcite-sheet-min-height: auto}calcite-chip[slot=header-actions-end]{align-self:center;margin-inline-end:.5rem}calcite-list-item:focus calcite-button{position:relative;top:-2px}.prompt-list calcite-list-item:last-of-type{margin-block-end:0}calcite-list{--calcite-color-foreground-1: transparent;background-color:transparent}calcite-list-item{--calcite-color-foreground-1: white}calcite-flow-item calcite-shell{background:transparent}calcite-block{width:100%;max-width:100%;align-self:flex-end;background-color:transparent;margin-block:0}calcite-sheet{--calcite-sheet-scrim-background: rgba(200, 200, 200, .5)}.type-suggestion{--calcite-color-foreground-1: var(--calcite-color-foreground-current);--calcite-color-text-3: var(--calcite-color-text-2);--calcite-icon-color: var(--calcite-color-brand)}.type-history{--calcite-icon-color: var(--calcite-color-text-2)}.type-response{--calcite-icon-color: var(--calcite-color-brand);--calcite-font-family: monospace}.block-response{align-self:flex-start;margin-block-end:4rem;border-block-end:0;--calcite-block-text-color: var(--calcite-color-brand)}calcite-list-item calcite-button{margin-inline-end:.25rem}.type-docs{--calcite-color-foreground-1: var(--calcite-color-foreground-3);--calcite-icon-color: var(--calcite-color-text-1)}.type-error{--calcite-icon-color: var(--calcite-color-status-danger);--calcite-font-family: monospace;border:1px solid var(--calcite-color-status-danger)}#thumbs-up{margin-inline-start:auto;--calcite-icon-color: var(--calcite-color-border-input)}#thumbs-down{--calcite-icon-color: var(--calcite-color-border-input)}calcite-flow-item calcite-shell calcite-notice{margin-block:1rem}.no-space-block,.no-space-block[open]{margin:0}calcite-block[open]:last-of-type{border-block-end:0}.text-area-wrapper{display:flex;border-radius:var(--calcite-corner-radius-round);margin:.75rem;overflow:hidden;--calcite-color-border-input: transparent;position:sticky;box-shadow:var(--calcite-shadow-sm);flex:none}calcite-text-area{height:auto;min-height:5.75rem;overflow:hidden;border-radius:var(--calcite-corner-radius-round) var(--calcite-corner-radius-round) 0 0;--calcite-font-weight-normal: 500;font-weight:500;line-height:1.2}calcite-tooltip{--calcite-tooltip-z-index: 1000}.standalone-list{margin:1rem;width:calc(100% - 2rem)}.result-disclaimer{display:block;width:24rem;max-width:90%;margin:1rem auto;text-align:center;line-height:1.125rem;font-size:.875rem;font-style:italic}calcite-flow{height:100%}calcite-popover calcite-list{--calcite-list-background-color: transparent;--calcite-input-border-color: transparent}calcite-popover calcite-list calcite-filter{--calcite-spacing-sm: 0}.break-spaces{white-space:break-spaces}.feedback-button-container{margin-inline-start:auto;gap:0}.info-heading{font-size:var(--calcite-font-size-1);color:var(--calcite-color-text-1)}.unstyled-h3{margin:unset;font-size:var(--calcite-font-size-md)}.unstyled-shell{position:unset;inset:unset;display:unset;block-size:unset;inline-size:unset}.suggestion-button{font-weight:var(--calcite-font-weight-medium)}.info-block{max-width:450px}#result-block{calcite-card-group{--calcite-card-group-gap: 1.25rem}calcite-card{--calcite-card-corner-radius: var(--calcite-corner-radius-round);--calcite-card-background-color: white;--calcite-card-border-color: transparent;width:100%}.positioned-code-content{display:flex;flex-direction:row;gap:.5rem;padding:.5rem}calcite-card [slot=title] calcite-chip{margin-block-start:.25rem}.code-response-wrapper{position:relative;background:var(--calcite-color-foreground-2);border-radius:var(--calcite-corner-radius-round);margin-top:-1.5rem}.prior-prompt{display:flex;flex-direction:row;padding:0;overflow-y:hidden;overflow-x:auto;margin:.25rem 0 .75rem;align-items:center;max-width:100%;span{overflow-x:auto;overflow-y:hidden}}.copy-feedback{display:none}.copy-prompt-button{align-self:flex-start;margin-inline-start:auto}.response-secondary-action-button[data-copied]+.copy-feedback,.copy-prompt-button[data-copied]+.copy-feedback{display:block;span{padding:.75rem 1rem;font-size:var(--calcite-font-size--2);line-height:1.375;color:var(--calcite-color-text--2);font-weight:var(--calcite-font-weight-medium)}}.copy-prompt-button[data-copied]~.copy-tooltip,.response-secondary-action-button[data-copied]~.copy-tooltip{display:none}code{white-space:pre;font-size:12px;margin:0;overflow-x:auto;font-family:Fira Mono,Consolas,Menlo,monospace;display:block;max-height:12rem;position:relative;padding:.5rem}.code-collapse{margin-inline-start:auto}.response-secondary-action-button{margin-left:.5rem}.add-to-editor-button{--calcite-internal-button-border-color: unset}}.collapsible-code{padding:.5rem}.collapsible-code summary{cursor:pointer;font-weight:500;color:var(--calcite-color-brand);outline:none;padding:.25rem 0}.collapsible-code[open] summary{color:var(--calcite-color-text-2)}.collapsible-error{padding:.5rem}.collapsible-error summary{cursor:pointer;font-weight:500;color:var(--calcite-color-status-danger);outline:none;padding:.25rem 0}.collapsible-error[open] summary{color:var(--calcite-color-text-2)}.response-error-container{padding:.5rem;background:color-mix(in srgb,var(--calcite-color-status-warning) 10%,transparent);border-radius:var(--calcite-corner-radius-round);margin:1rem 0;font-size:var(--calcite-font-size--2);--calcite-input-message-icon-color: var(--calcite-color-status-warning)}.response-error-chip{--calcite-internal-chip-background-color: var(--calcite-color-status-warning);--calcite-chip-icon-color: var(--calcite-color-foreground-1);--calcite-chip-border-color: var(--calcite-color-transparent)}.feedback-actions{gap:unset}}:host([closed]){display:none}`,v=class extends Error{constructor({message:e,code:t,subCode:s,details:n,source:r}){super(e),this.name="ArcadeAssistantError",this.code=t,this.subCode=s,this.details=n,this.source=r}};function J(i){if(!i)return;let e=i.indexOf('{"error":');if(e!==-1)try{let t=i.slice(e),s=JSON.parse(t);if(s&&typeof s=="object"&&s.error)return s.error}catch{return}}async function ne(i){let{baseUrl:e,skillId:t,message:s,authToken:n,previousConversationId:r,context:d}=i,p=t?`${e}/skills/${t}/chat`:`${e}/chat`,o=[],h={message:s,context:d};r&&(h.conversation_id=r);let a;try{a=await G(p,{method:"post",headers:{"Content-Type":"application/json",token:n},body:JSON.stringify(h),responseType:"json"})}catch(b){let f=b,A=f.details?.rawResponse||f.message||String(b),y=J(A);throw y?new v(y):b}let l=a.data;o.push(l);let u=l.conversationId,ee=l.inquiryId,R=l.sequenceNumber;async function te(){let b=0,f=25;for(;b<f;){await new Promise($=>setTimeout($,1e3));let A=le(u,R,ee),y;try{y=await G(p,{method:"post",headers:{"Content-Type":"application/json",token:n},body:JSON.stringify(A),responseType:"json"})}catch($){let M=$,se=M.details?.rawResponse||M.message||String($),U=J(se);throw U?new v(U):$}let g=y.data;if(g.context&&g.context.kind==="ArcgisErrorAsContext"&&g.context.error)throw new v({message:g.context.error.message||"ArcGIS Assistant error",code:g.context.error.code,subCode:g.context.error.subCode,details:g.context.error.details,source:"polling-response"});if(o.push(g),R=g.sequenceNumber,b++,!g.hasMore)break}if(b===f)throw new v({message:"Request timed out",code:"TIMEOUT",source:"polling"})}let ie=2*60*1e3;return await Promise.race([te(),new Promise((b,f)=>setTimeout(()=>f(new v({message:"Request timed out",code:"TIMEOUT",source:"hard-timeout"})),ie))]),o}function le(i,e,t){return{conversationId:i,inquiryId:t,ackSequenceNumber:e}}function de(i){return i.message.match(/Error in prompt shield/u)?"I'm having trouble with this request. Try again by rephrasing the question.":i.code==="TIMEOUT"?"I'm having trouble with this request. Try again by re-asking the same question or rephrasing it.":i.message}var pe=i=>{let e=i.value.length,t=72,s=180,n=i.offsetWidth,r=Math.max(1,Math.floor(n/8)),d=Math.ceil(e/r),p=t+(d-2)*24;i.style.setProperty("--calcite-text-area-min-height",`${Math.min(p,s)}px`)};function ue({messages:i}){return c`<calcite-chip slot=header-actions-end scale=s appearance=outline-fill .label=${i.beta??"Beta"}>${i.beta??"Beta"}</calcite-chip>`}function me({popoverContent:i}){return c`<calcite-action icon=information slot=header-actions-end id=legal-disclaimer text></calcite-action><calcite-popover reference-element=legal-disclaimer overlay-positioning=fixed label=legal-disclaimer placement=bottom auto-close>${i}</calcite-popover>`}function Z({errorMessage:i,slot:e}){return c`<div class="error-display"><calcite-input-message id=error-message status=invalid icon=exclamation-mark-triangle scale=m slot=${e??w}>${i}</calcite-input-message></div>`}function he({active:i,setActive:e,messages:t}){return c`<calcite-alert slot=alerts .open=${i} placement=bottom kind=success icon=check-circle-f auto-close @calciteAlertClose=${()=>e(!1)} .label=${t.expressionapplied??"Expression applied"}><div slot=message>${t.expressionapplied??"Expression applied to editor."}</div></calcite-alert>`}function ge({context:i,messages:e}){return i?c`<div class="gaps">${i.profileName&&c`<calcite-popover auto-close placement=top .label=${e.profilecontextlabel.replace("{profileName}",i.profileName)} reference-element=profile-context-button class="context-popover"><p>${e.profilecontextlabel.replace("{profileName}",i.profileName)}</p></calcite-popover><calcite-button round kind=neutral icon-start=map-information id=profile-context-button></calcite-button>`||""}${i.layerName&&c`<calcite-popover auto-close placement=top .label=${e.layercontextlabel.replace("{layerName}",i.layerName)} reference-element=layer-context-button class="context-popover"><p>${e.layercontextlabel.replace("{layerName}",i.layerName)}</p></calcite-popover><calcite-button round kind=neutral icon-start=layers id=layer-context-button></calcite-button>`||""}</div>`:null}function be({isDisabled:i,isReadOnly:e,setQuestion:t,setIsViewingResult:s,textAreaRef:n,question:r,errorMessage:d,setErrorMessage:p,submitQuestion:o,messages:h,mode:a,context:l}){return c`<div class="text-area-wrapper"><calcite-text-area resize=vertical .readOnly=${i||e} class="styled-text-area" .placeholder=${h.askaquestion??`Specify the calculation or logic you need in an Arcade expression. (e.g., 'Return "Yes" if value > 10')`} .value=${r} @calciteTextAreaInput=${u=>{pe(u.target),t(u.target.value)}} ${D(n)}><div class="submission-actions-wrapper" slot=footer-start>${d&&Z({errorMessage:d,slot:"footer-start"})||""}<div class="submission-actions">${ge({context:l,messages:h})}<div class="align-inline-end gaps"><calcite-button round kind=neutral .hidden=${a!=="refine"} icon-start=arrow-left icon-flip-rtl=both appearance=solid .disabled=${i} @click=${async()=>{s(!1),t("")}}>${h.startover??"Start Over"}</calcite-button><calcite-button round icon-end=effects appearance=solid .loading=${i} .disabled=${i} @click=${async()=>{p(r?"":h.enteraprompt??"Please enter a prompt"),await o()}}>${a==="prompt"?h.ask??"Generate":h.refine??"Refine"}</calcite-button></div></div></div></calcite-text-area></div>`}var fe="https://www.esri.com/en-us/privacy/privacy-statements/privacy-statement",ve="https://www.esri.com/en-us/privacy/privacy-statements/privacy-supplement";function ye({setOpen:i,messages:e,feedback:t,setFeedback:s,onSubmit:n}){return t.active?c`<calcite-sheet class="feedback-sheet" .label=${e.feedback??"Feedback"} slot=sheets display-mode=float position=block-end .open=${t.active} @calciteSheetClose=${()=>i(!1)}><calcite-panel .heading=${e.providefeedback??"Provide feedback"} .description=${e.experiencehelps??"Your experience helps guide future improvements"}><div class="feedback-content"><calcite-label>${e.experiencehelpful??"Was the assistant helpful?"}<calcite-segmented-control scale=l><calcite-segmented-control-item icon-start=thumbs-up .checked=${t.value==="good"} @click=${()=>s({...t,value:"good"})}></calcite-segmented-control-item><calcite-segmented-control-item icon-start=thumbs-down .checked=${t.value==="bad"} @click=${()=>s({...t,value:"bad"})}></calcite-segmented-control-item></calcite-segmented-control></calcite-label><calcite-label>${e.describeexperience??"Describe your experience"}<calcite-text-area resize=vertical .value=${t.text} @calciteTextAreaInput=${r=>s({...t,text:r.target.value})}></calcite-text-area></calcite-label><calcite-label layout=inline scale=s><calcite-checkbox scale=l .checked=${t.termsAccepted} @calciteCheckboxChange=${r=>{s({...t,termsAccepted:r.target.checked})}}></calcite-checkbox><span>${x(e.agreement?.replace("{EsriPrivacyStatement}",`<calcite-link href=${fe} target="_blank">${e.esriprivacystatement??"Esri Privacy Statement"}</calcite-link>`).replace("{Supplement}",`<calcite-link href=${ve} target="_blank">${e.supplement??"Supplement"}</calcite-link>`))}</span></calcite-label></div><calcite-button slot=footer width=full @click=${n} .disabled=${!t.termsAccepted||t.submitting} .loading=${t.submitting}>${e.submitfeedback??"Submit Feedback"}</calcite-button></calcite-panel></calcite-sheet>`:null}function Y({assistantsEnabled:i,messages:e,slot:t,assistantHelpUrl:s,helpTopicUrl:n}){return c`<calcite-block .label=${e.assistantinformation??"Assistant information"} slot=${t??w} expanded class="info-block"><calcite-chip .label=${e.new??"new"} kind=brand>${e.new}</calcite-chip><h1 class="info-heading">${e.introducing}</h1><p>${e.capabilities}</p>${i?c`<p>${e.keepinmind??"Keep in mind the following:"}<ul><li>${e.beconsise??"Be concise, but also clear in your request"}</li><li>${e.avoidambiguity??"Avoid ambiguity and vagueness"}</li><li>${e.moredetails??"you do not need to use exact field names in your instructions, but more detail is generally better"}</li></ul>${x((e.seedocumentation??"Please see the {documentation} for more information, including limitations and additional resources.").replace("{documentation}",`<calcite-link href=${n} target="_blank">${e.documentation??"documentation"}</calcite-link>`))}</p>`:c`<p>${x(e.useofassistant?.replace("{aiassistants}",`<strong>${e.aiassistants??"Ai Assistants"}</strong>`))}<calcite-link .href=${s} target=_blank icon-end=launch-2>${e.opensettings??"Open Settings"}</calcite-link></p>`}</calcite-block>`}function $e({messages:i,onProceed:e,onExit:t,helpTopicUrl:s}){return c`<calcite-dialog close-disabled placement=top .heading=${i.welcome} slot=dialogs open width-scale=m id=welcome-dialog><h3 class="unstyled-h3">${i.beforeyougetstarted}</h3><ul><li>${i.maybeincorrect}</li><li>${x(i.pleasereadhelp.replace("{helpTopic}",`<calcite-link href=${s} target="_blank">${i.helptopic}</calcite-link>`))}</li></ul><calcite-button id=welcome-proceed slot=footer-end @click=${e}>${i.proceed}</calcite-button><calcite-button id=welcome-decline slot=footer-start @click=${t} kind=neutral>${i.exit}</calcite-button></calcite-dialog>`}function ke({messages:i,suggestions:e,onSuggestionClick:t}){return c`<calcite-block .heading=${i.promptsuggestions} expanded collapsible id=suggestion-block><calcite-chip-group class="suggestions" .label=${i.promptsuggestions??"Prompt Suggestions"}>${T(e,s=>s,s=>c`<calcite-button round appearance=outline-fill kind=neutral .label=${i.promptsuggestion} class="suggestion-button" @click=${()=>t?.(s)}>${s}</calcite-button>`)}</calcite-chip-group></calcite-block>`}function W({hidden:i=!1,expanded:e=!1,messages:t,cards:s,heading:n,collapsible:r=!1,showEffectsIcon:d=!1,onCopyCode:p,standalone:o}){let h=t.addtoeditor??"Add to editor";return c`<calcite-block .hidden=${i} id=result-block .heading=${n??t.besteffort??"Here is the assistant's best effort"} .expanded=${e} .collapsible=${r}>${d&&c`<calcite-chip .label=${t.assistantresponses} slot=content-start icon=effects scale=m class="suggestion-chips"></calcite-chip>`||""}<calcite-card-group .label=${t.assistantresponses}>${T(s,a=>a.conversationId,a=>c`<calcite-card><div slot=heading><div class="prior-prompt"><span>${a.priorPrompt}</span><calcite-action icon=duplicate scale=s slot=actions-end class="copy-prompt-button" text .id=${`copy-prompt-${a.conversationId}-${o?"standalone":"list"}`} @click=${l=>{let u=l.currentTarget;navigator.clipboard.writeText(a.priorPrompt).then(()=>{u.setAttribute("data-copied","true"),setTimeout(()=>u.removeAttribute("data-copied"),1500)})}}></calcite-action><calcite-popover .referenceElement=${`copy-prompt-${a.conversationId}-${o?"standalone":"list"}`} placement=top-start class="copy-feedback" .label=${t.copiedsuccessfully??"copied successfully"} open trigger-disabled><span>${t.copiedsuccessfully??"copied successfully"}</span></calcite-popover><calcite-tooltip .referenceElement=${`copy-prompt-${a.conversationId}-${o?"standalone":"list"}`} placement=top-start class="copy-tooltip">${t.copyprompttoclipboard}</calcite-tooltip></div>${a.message&&o&&c`<div class="response-error-container">${Z({errorMessage:a.message})}</div>`||""}</div><div><div class="code-response-wrapper"><div class="positioned-code-content"><calcite-chip-group .label=${t.responsecontext??"Response Context"} scale=s>${a.message&&!o&&c`<calcite-tooltip .referenceElement=${`response-chip-${a.conversationId}-error`} placement=top-start overlay-positioning=fixed>${a.message}</calcite-tooltip><calcite-chip .id=${`response-chip-${a.conversationId}-error`} .label=${t.error??"Error"} scale=s appearance=outline icon=exclamation-mark-triangle-f class="response-error-chip"></calcite-chip>`||""}${a.chips?.map(l=>{let u=N();return c`${l.tooltip&&c`<calcite-tooltip .referenceElement=${`response-chip-${l.conversationId}-${u}`} placement=top-start overlay-positioning=fixed>${l.tooltip}</calcite-tooltip>`||""}<calcite-chip .label=${l.label} .scale=${l.scale??"s"} .appearance=${l.appearance??"outline"} .icon=${l.icon} .id=${`response-chip-${l.conversationId}-${u}`}>${l.label}</calcite-chip>`})}</calcite-chip-group></div><details class="collapsible-code" open><summary>Code response</summary><code>${a.code}</code></details></div></div><div slot=footer-start class="feedback-actions"><calcite-button primary-text=${h??w} class="add-to-editor-button" @click=${()=>a.onAddToEditor("add")} overlay-positioning=fixed scale=s icon-start=plus round>${t.addtoeditor??"Add to editor"}</calcite-button><calcite-button round icon-start=file-code kind=neutral scale=s @click=${()=>a.onAddToEditor("replace")} class="response-secondary-action-button" .id=${`replace-${a.conversationId}-${o?"standalone":"list"}`}></calcite-button><calcite-tooltip .referenceElement=${`replace-${a.conversationId}-${o?"standalone":"list"}`} placement=top-start><span>${t.replaceineditor??"Replace all code in editor"}</span></calcite-tooltip><calcite-button round icon-start=copy-to-clipboard kind=neutral scale=s @click=${l=>{let u=l.currentTarget;p(a.code).then(()=>{u.setAttribute("data-copied","true"),setTimeout(()=>u.removeAttribute("data-copied"),1500)})}} class="response-secondary-action-button" .id=${`copy-response-${a.conversationId}-${o?"standalone":"list"}`}></calcite-button><calcite-popover .referenceElement=${`copy-response-${a.conversationId}-${o?"standalone":"list"}`} placement=top-start class="copy-feedback" .label=${t.copiedsuccessfully??"copied successfully"} open trigger-disabled><span>${t.copiedsuccessfully??"copied successfully"}</span></calcite-popover><calcite-tooltip .referenceElement=${`copy-response-${a.conversationId}-${o?"standalone":"list"}`} placement=top-start class="copy-tooltip">${t.copytoclipboard}</calcite-tooltip></div><div slot=footer-end class="feedback-actions"><calcite-action .text=${t.thumbsup} scale=s icon=thumbs-up @click=${a.onThumbsUp} .id=${`thumbs-up-${a.conversationId}-${o?"standalone":"list"}`}></calcite-action><calcite-tooltip .referenceElement=${`thumbs-up-${a.conversationId}-${o?"standalone":"list"}`} placement=top-start><span>${t.helpful??"Helpful"}</span></calcite-tooltip><calcite-action .text=${t.thumbsdown} scale=s icon=thumbs-down @click=${a.onThumbsDown} .id=${`thumbs-down-${a.conversationId}-${o?"standalone":"list"}`}></calcite-action><calcite-tooltip .referenceElement=${`thumbs-down-${a.conversationId}-${o?"standalone":"list"}`} placement=top-start><span>${t.unhelpful??"Unhelpful"}</span></calcite-tooltip></div></calcite-card>`)}</calcite-card-group></calcite-block>`}var m={welcome:"Welcome to the new assistant experience",beforeyougetstarted:"Before you get started be aware:",maybeincorrect:"AI generated code may occasionally be incorrect or biased. Review carefully.",pleasereadhelp:"Read the Arcade Assistant (beta) {helpTopic} to get started and learn details on security, privacy and limitations.",proceed:"Proceed",exit:"Exit",promptsuggestions:"Prompt suggestions",promptsuggestion:"Prompt suggestion",assistantresponses:"Assistant responses",collapse:"Collapse",thumbsup:"Thumbs up",thumbsdown:"Thumbs down",refine:"Refine",startover:"Start over",helptopic:"help topic",agreement:"I agree to the {EsriPrivacyStatement} (and {Supplement}).",esriprivacystatement:"Esri Privacy Statement",supplement:"Supplement",disclaimerpt2:"AI-generated content may be inaccurate. Review before using.",replaceineditor:"Replace all code in editor",keepinmind:"Keep in mind the following:",beconsise:"Be concise, but also clear in your request",avoidambiguity:"Avoid ambiguity and vagueness",documentation:"documentation",useexamples:"Use examples to clarify your request",moredetails:"You do not need to use exact field names in your instructions, but more detail is generally better",seedocumentation:"Please see the {documentation} for more information, including limitations and additional resources.",assistantinformation:"Assistant information",profilecontextlabel:"Profile context: {profileName}",layercontextlabel:"Layer context: {layerName}",numlayers:"{numLayers} {layerOrLayers}",numlayersplural:"layers",numlayerssingular:"layer",responsecontext:"Response context",error:"Error",copytoclipboard:"Copy code to clipboard",copyprompttoclipboard:"Copy prompt to clipboard",copiedsuccessfully:"Copied successfully",helpful:"Helpful",unhelpful:"Unhelpful"},xe="arcade_generation",we="ArcadeCodeRequest",I="visualization",Ae="ArcadeAssistant",Ce=["your_comments","user_evaluation","question","answer","useragent","_source","version","context","extras"],K=[],X=!0,E=class extends z{constructor(){super(...arguments),this.textAreaRef=V(),this.messages=B(),this._feedbackService=void 0,this.handleFeedbackButton=(e,t)=>{this.feedback={active:!0,value:e,item:t,termsAccepted:!1,text:"",submitting:!1}},this.handleFeedbackSheetClose=()=>{this.feedback={active:!1}},this.handleFeedbackSubmit=async()=>{if(!this.feedback.active)return;this.feedback={...this.feedback,submitting:!0};let e=await this.ensureFeedbackService();if(!e){this.handleFeedbackSheetClose();return}let t=this.getModel(),s=t?await this.getProfileAndMetadata(t.uri):void 0,n={user_evaluation:this.feedback.value,your_comments:this.feedback.text||void 0,question:this.feedback.item?.question??"",answer:encodeURIComponent(this.feedback.item?.formattedScript??""),useragent:navigator.userAgent,_source:Ae,version:this.appVersion??"",context:s?JSON.stringify(s):"",extras:s?.profileName??"",conversation_id:this.feedback.item?.conversationId??"",privacy_statement:this.feedback.termsAccepted?"I_agree":""};try{await e.applyEdits({addFeatures:[new ce({attributes:n})]})}catch(r){console.error("Error submitting feedback:",r)}this.handleFeedbackSheetClose()},this.handleClose=e=>{this.closed=!0,this.closePanel?.(e)},this.setQuestion=e=>{this.question=e},this.onSuggestionClick=e=>{this.textAreaRef.value&&(this.textAreaRef.value.value=e,this.textAreaRef.value.setFocus(),this.setQuestion(e))},this.isViewingResult=!1,this.confirmationActive=!1,this.isSubmitting=!1,this.errorMessage=void 0,this.question="",this.history=[],this.feedback={active:!1},this.splashActive=!0,this.context=void 0,this.historyCards=[],this.helpBase="",this.assistantsEnabled=!1,this.closed=!1}static{this.properties={isViewingResult:16,confirmationActive:16,isSubmitting:16,errorMessage:16,question:16,history:16,feedback:16,splashActive:16,context:16,historyCards:16,closePanel:0,insertText:0,helpBase:1,assistantsEnabled:5,layer:[1,{type:Object}],portalUrl:1,serviceUrl:1,closed:7,editorRef:0,feedbackServiceUrl:1,appVersion:1}}static{this.styles=re}get disclaimerComment(){return`// ${this.messages.disclaimercomment}
|
|
5
|
-
// ${m.disclaimerpt2}`}get assistantHelpUrl(){return`${this.helpBase??"https://doc.arcgis.com/en/arcgis-online/"}administer/configure-assistants.htm`}get assistantOverviewDocUrl(){return`${this.helpBase??"https://doc.arcgis.com/en/arcgis-online/"}create-maps/understand-arcade-assistant.htm`}get usingTheAssitantDocUrl(){return`${this.helpBase??"https://doc.arcgis.com/en/arcgis-online/"}create-maps/use-arcade-assistant.htm`}async destroy(){}load(){let e=async()=>{let t=this.getModel();if(!t){this.context=void 0;return}let s=await this.getProfileAndMetadata(t.uri);this.context=s};e().catch(t=>{console.error("Error setting initial context in Arcade Assistant:",t)}),this.manager.onLifecycle(()=>({remove:S.onModelContextDidChange(async()=>{e().catch(t=>{console.error("Error setting context in Arcade Assistant:",t)})}).dispose}))}willUpdate(e){e.has("history")&&(this.historyCards=this.getHistoryCards())}connectedCallback(){super.connectedCallback(),this.history=K,this.splashActive=X}disconnectedCallback(){super.disconnectedCallback(),K=this.history,X=this.splashActive,this.copySuccessTimer&&(clearTimeout(this.copySuccessTimer),this.copySuccessTimer=void 0)}getHistoryCards(){return this.history.reduce((e,t)=>(!t.script||(e.push({priorPrompt:t.question,code:t.formattedScript||t.error||"",chips:[{label:t.profile??I,icon:"map-information",appearance:"outline",scale:"s",conversationId:t.conversationId??"",tooltip:m.profilecontextlabel.replace("{profileName}",t.profile??I)},...t.layerName?[{label:m.numlayers.replace("{numLayers}","1").replace("{layerOrLayers}",m.numlayerssingular),icon:"layer",appearance:"outline",scale:"s",conversationId:t.conversationId??"",tooltip:m.layercontextlabel.replace("{layerName}",t.layerName??"No layer")}]:[]],onAddToEditor:s=>{L(this.editorRef.editorInstance,t.formattedScript??"",s,this.disclaimerComment)},onThumbsUp:()=>this.handleFeedbackButton("good",t),onThumbsDown:()=>this.handleFeedbackButton("bad",t),conversationId:t.conversationId??"",message:t.message}),this.isViewingResult),e),[])}setFeedbackState(e){this.feedback=e}async ensureFeedbackService(){if(this._feedbackService)return this._feedbackService;if(!this.feedbackServiceUrl)return;let e=new oe({url:this.feedbackServiceUrl});await e.load();let t=Ce.filter(s=>!e.fields.some(n=>n.name===s));if(t.length>0){console.error(`Missing the following fields in feedback service: ${t.join(", ")}. Feedback will not be logged.`);return}return this._feedbackService=e,e}getModel(){return this.editorRef.editorInstance?.getModel()}async submitQuestion(){if(this.question){this.isSubmitting=!0;try{let e=await this.getToken(),t=this.getModel();if(!t)return;let{profileName:s,metadata:n,layerName:r}=await this.getProfileAndMetadata(t.uri),d=(await ne({baseUrl:this.serviceUrl,skillId:xe,message:this.question,authToken:e,context:{kind:we,context:{profile_name:s,metadata:n}}})).find(p=>p.context?.kind==="ArcadeCodeResponse");if(!d)return;d.context?.kind==="ArcadeCodeResponse"&&(this.history=[{script:d?.context?.arcadeCode?.code,formattedScript:j(d?.context?.arcadeCode?.code??""),error:void 0,question:this.question,profile:s,conversationId:d.conversationId,layerName:r??void 0,...d.message?{message:d.message}:{}},...this.history],this.isViewingResult=!0,this.errorMessage=void 0)}catch(e){e instanceof Error&&e.name==="ArcadeAssistantError"?this.errorMessage=de(e)||this.messages.erroroccurred||"An error occurred.":this.errorMessage=this.messages.erroroccurred||"An error occurred.",console.error("Error in Arcade Assistant:",e)}finally{this.isSubmitting=!1}}}async getToken(){let{token:e}=await ae.getCredential(this.portalUrl);return e}async getProfileAndMetadata(e){let t=I,s=S.getEditorProfileForModel(e);s?.loaded||await s?.loadSource();let n=this.editorRef.profile;n&&"id"in n&&(t=n.id);let r=s?.definition?.variables?.find(o=>o.type==="feature"),d=[],p;return r?.definition&&"fields"in r.definition&&(d=r.definition.fields.map(o=>({name:o.name,type:o.type,alias:o.alias})),Q(r?.definition)&&(p=r.definition.title)),{profileName:t,metadata:d,layerName:p}}onCopyCode(e){let t=e?`${this.disclaimerComment}
|
|
6
|
-
${e}`:"";return navigator.clipboard.writeText(t)}render(){return this.closed?null:this.assistantsEnabled?c`<calcite-flow><calcite-flow-item closable .heading=${this.messages.arcadeassistant??"Arcade assistant"} @calciteFlowItemClose=${this.handleClose}>${this.splashActive&&c`<calcite-scrim></calcite-scrim>`||""}${ue({messages:this.messages})}${me({popoverContent:Y({assistantsEnabled:this.assistantsEnabled,messages:{...this.messages,...m},assistantHelpUrl:this.assistantHelpUrl,helpTopicUrl:this.usingTheAssitantDocUrl})})}<calcite-shell class="unstyled-shell">${this.splashActive&&$e({messages:{...m,...this.messages},onProceed:()=>{this.splashActive=!1},helpTopicUrl:this.assistantOverviewDocUrl,onExit:e=>this.closePanel&&this.closePanel(e)})||""}${he({active:this.confirmationActive,setActive:e=>this.confirmationActive=e,messages:this.messages})}${be({isDisabled:this.isSubmitting,isReadOnly:!1,setQuestion:this.setQuestion,setIsViewingResult:e=>this.isViewingResult=e,mode:this.isViewingResult?"refine":"prompt",textAreaRef:this.textAreaRef,question:this.question,errorMessage:this.errorMessage,setErrorMessage:e=>this.errorMessage=e,submitQuestion:this.submitQuestion.bind(this),messages:{...m,...this.messages},context:this.context})}<calcite-block-group label="interactive blocks">${!this.isViewingResult&&!this.isSubmitting&&ke({messages:{...this.messages,...m},suggestions:["Round value to one decimal place",'Return "Yes" if value > 10'],onSuggestionClick:this.onSuggestionClick})||""}<calcite-block .hidden=${!this.isSubmitting} .heading=${this.messages.generatingresponse??"Generating response..."}></calcite-block>${W({expanded:this.isViewingResult,messages:{...this.messages,...m},collapsible:!0,showEffectsIcon:!0,cards:this.historyCards.length?[this.historyCards[0]]:[],heading:this.messages.besteffort??"Here's the assistant's best effort",hidden:this.isSubmitting||!this.isViewingResult,onCopyCode:this.onCopyCode.bind(this),standalone:!0})}${W({expanded:!this.isViewingResult,messages:{...this.messages,...m},collapsible:!0,cards:this.isViewingResult?this.historyCards.slice(1):this.historyCards,heading:this.messages.recentprompts??"Recent prompts",hidden:this.isSubmitting||this.history.length===0,onCopyCode:this.onCopyCode.bind(this)})}</calcite-block-group>${this.feedback.active?ye({setOpen:this.handleFeedbackSheetClose,messages:{...this.messages,...m},onSubmit:this.handleFeedbackSubmit,feedback:this.feedback,setFeedback:this.setFeedbackState.bind(this)}):null}</calcite-shell></calcite-flow-item></calcite-flow>`:c`<calcite-flow><calcite-flow-item .selected=${!this.isViewingResult} closable .heading=${this.messages.arcadeassistant??"Arcade assistant"} @calciteFlowItemClose=${this.handleClose}>${Y({slot:"content-top",messages:{...this.messages,...m},assistantsEnabled:this.assistantsEnabled,assistantHelpUrl:this.assistantHelpUrl,helpTopicUrl:this.usingTheAssitantDocUrl})}</calcite-flow-item></calcite-flow>`}};H("arcgis-arcade-coding-assistant",E);return E},"identity/IdentityManager","request","layers/FeatureLayer","Graphic",a,b)
|
package/dist/cdn/PISACUOD.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
|
-
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
3
|
-
v4.34.0-next.60 */
|
|
4
|
-
import j from"./QUKOS6J3.js";import{a as S}from"./XZTWY7TY.js";import{a as A}from"./I3ZGEMFA.js";import i from"./HKJKK3XG.js";import e from"./XBL2Y42W.js";import{a as b,b as f}from"./ZHCT5XD4.js";import{a as P}from"./LDTY2BQR.js";import"./U6WYSIOL.js";import d from"./BYS7NZEV.js";import"./DSM5X3AK.js";import"./4XLS4HHS.js";import"./ZIQGH3R5.js";import{C as m,D as x,g,h as t,j as r,l as c,n as u,y as _,z as a}from"./4463YABH.js";import{a as h,h as p}from"./IAUCLWLU.js";import{Hl as $,kk as C}from"./FWCO6ADZ.js";import"./F3GTWULQ.js";export default $arcgis.t(([,{a:v,h:l},s,E])=>{C();var R=g`@layer{arcgis-arcade-editor{display:flex;flex-direction:column;position:relative;overflow:hidden;border:var(--arcgis-coding-components-border)!important;box-sizing:border-box;background-color:var(--arcgis-coding-components-background-color);height:100%;.sticky{position:sticky;top:0;z-index:10}.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1);text-align:center}.main-action-bar{border-bottom:var(--arcgis-coding-components-border)!important;flex:0 0 auto;calcite-action-group{padding-inline-end:var(--calcite-spacing-sm);calcite-action{padding-inline-end:var(--calcite-spacing-sm)}calcite-action:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}calcite-action-group:last-child{border-inline-end-width:0px}calcite-action-group:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}arcgis-arcade-results{border-top:var(--arcgis-coding-components-border)!important;box-sizing:border-box;max-height:50%;min-height:50%;margin-bottom:-1px}calcite-flow{[slot=footer]{word-break:break-word}}.hidden{display:none}}}`,d=class extends _{constructor(){super(...arguments),this._codeEditorElt=b(),this._componentReadyDefer=new h,this._disposables=[],this._editorProfilePromise=Promise.resolve(void 0),this.messages=P(),this._modelId=p(),this._openArcadeHelp=()=>void window.open(v,"Arcade Help"),this._toggleSidePanel=e=>{if(!e.target)return;let i=e.target?.dataset.panelName??"none";this.openedSidePanel=i===this.openedSidePanel?"none":i,this.openedSidePanel==="none"&&this._codeEditorElt.value?.setFocus().catch(console.error)},this._consoleLogs=[],this._executingScript=!1,this._preparingArcade=!1,this._resultPanel="output",this._showExecutionPanel=!1,this.hideDocumentationActions=!1,this.hideSideBar=!1,this.openedSidePanel="none",this.script="",this.sideActionBarExpanded=!1,this.arcgisDiagnosticsChange=c({bubbles:!1}),this.arcgisScriptChange=c({bubbles:!1})}static{this.properties={_apiLibrary:16,_consoleLogs:16,_editorProfile:16,_executingScript:16,_executionResult:16,_preparingArcade:16,_resultPanel:16,_showExecutionPanel:16,editorInstance:32,editorOptions:0,hideDocumentationActions:5,hideSideBar:5,openedSidePanel:2,profile:0,script:1,sideActionBarExpanded:7,snippets:0,suggestions:0,testData:0,customPanels:0}}static{this.shadowRootOptions=u}static{this.styles=[R,A]}get editorInstance(){return this._codeEditorElt.value?.editorInstance}async getEditorInstance(){return await this._componentReadyDefer.promise,this._codeEditorElt.value?.editorInstance}async getScript(){return await this._componentReadyDefer.promise,this._codeEditorElt.value?.value}async getTestResult(){if(!this.testData)return{type:"error",value:"Missing test data",error:null};let e=await this._editorProfilePromise;if(!e)return{type:"error",value:"Missing editor profile",error:null};await this._componentReadyDefer.promise;let i=this._codeEditorElt.value?.value;return await l(e.definition,i,this.testData)}async setFocus(){await this._componentReadyDefer.promise,await this._codeEditorElt.value?.setFocus()}async load(){let e=x("./assets");E(e),await this._updateEditorProfile()}willUpdate(e){(e.has("messages")||e.has("profile"))&&this._updateDataModelDeps(),e.has("testData")&&this._testDataChanged(),e.has("snippets")&&s.updateApiContextForModel(this._modelId,{snippets:this.snippets})}async loaded(){this._componentReadyDefer.resolve(),await this._updateApiLibrary();let e=await S();this._disposables.push(e.onDiagnosticsChange(i=>!this._preparingArcade&&this.arcgisDiagnosticsChange.emit(i.diagnostics))),this.testData&&this._addExecuteScriptAction(),await this._codeEditorElt.value?.setFocus()}disconnectedCallback(){for(super.disconnectedCallback();this._disposables.length;)this._disposables.pop()?.dispose()}async _updateDataModelDeps(){await this._updateEditorProfile(),await this._updateApiLibrary()}_testDataChanged(){!this.testData&&this._executeScriptAction&&(this._disposeSafely(this._executeScriptAction),this._executeScriptAction=void 0),this.testData&&!this._executeScriptAction&&this._addExecuteScriptAction(),this._showExecutionPanel&&this._executeScript().catch(console.error)}async _updateEditorProfile(){this._preparingArcade=!0;try{await s.setProfileForModel(this._modelId,this.profile,{locale:this.messages._t9nLocale,snippets:this.snippets}),this._editorProfile=s.getEditorProfileForModel(this._modelId)}catch{this._editorProfile=void 0}finally{this._editorProfilePromise=Promise.resolve(this._editorProfile),this._preparingArcade=!1}}async _updateApiLibrary(){this._apiLibrary=await s.getApiLibraryForModel(this._modelId)}async _executeScript(){let e=this.testData;if(!this._codeEditorElt.value||!e)return;let i=await this._editorProfilePromise;if(!i){this._executionResult={type:"error",value:"Missing editor profile",error:null};return}this._showExecutionPanel=!0,this._executingScript=!0,this._consoleLogs=[],setTimeout(()=>void(async()=>{let o=this._codeEditorElt.value?.value;this._executionResult=await l(i.definition,o,e,n=>setTimeout(()=>this._consoleLogs=[...this._consoleLogs,n],0)),this._executingScript=!1})(),0)}_toggleShowExecutionPanel(){this._showExecutionPanel=!this._showExecutionPanel}_toggleSideActionBarExpanded(){this.sideActionBarExpanded=!this.sideActionBarExpanded}_onCodeEditorValueChange(e){e.stopPropagation(),this.script=e.detail,this.arcgisScriptChange.emit(e.detail)}_insertAsSnippet(e){this._codeEditorElt.value?.insertSnippet(e.detail).catch(console.error)}_insertAsText(e){this._insertText(e.detail)}_insertText(e){this._codeEditorElt.value?.insertText(e).catch(console.error)}_onResultPanelChange(e){this._resultPanel=e.detail}_onExecutionPanelClose(){this._showExecutionPanel=!1}_addExecuteScriptAction(){let e=this.editorInstance?.addAction({id:"run-script",label:"Run Arcade Expression",keybindings:[$.F5],contextMenuGroupId:"code",contextMenuOrder:1,run:()=>{this.testData&&this._executeScript().catch(console.error)}});e&&(this._executeScriptAction=e,this._disposables.push(e))}_disposeSafely(e){let i=this._disposables.indexOf(e);i!==-1&&this._disposables.splice(i,1),e.dispose()}renderMainActionBar(){return this.testData?t`<calcite-action-bar class="main-action-bar" layout=horizontal scale=s expanded expand-disabled><calcite-action-group scale=s><calcite-action .text=${this.messages.run??""} text-enabled icon=play scale=s .loading=${this._preparingArcade} @click=${()=>void this._executeScript().catch(console.error)}></calcite-action>${this._executionResult?t`<calcite-action .text=${this.messages.lastresults??""} .active=${this._showExecutionPanel} text-enabled icon=access-string-results icon-flip-rtl scale=s @click=${this._toggleShowExecutionPanel}></calcite-action>`:null}</calcite-action-group></calcite-action-bar>`:null}renderMainPanel(){return t`<arcgis-code-editor class="flex-adjustable" .editorOptions=${this.editorOptions} .language=${s.languageId} .value=${this.script??""} .modelId=${this._modelId} @arcgisValueChange=${this._onCodeEditorValueChange} ${f(this._codeEditorElt)}></arcgis-code-editor>`}renderAction({id:e,label:i,icon:o,active:n,panelName:w,iconFlipRtl:y=!1,onClick:D=this._toggleSidePanel}){return t`<calcite-action id=${e??r} .text=${i} .textEnabled=${this.sideActionBarExpanded} .icon=${o} .active=${n} @click=${D} data-panel-name=${w??r} .iconFlipRtl=${y}></calcite-action>${!this.sideActionBarExpanded&&t`<calcite-tooltip .referenceElement=${e}><span>${i}</span></calcite-tooltip>`||""}`}renderSideActionBar(){return this.hideSideBar?null:t`<calcite-action-bar class="side-action-bar border-inline-start" .expanded=${!!this.sideActionBarExpanded} position=end @calciteActionBarToggle=${this._toggleSideActionBarExpanded}><calcite-action-group>${this.renderAction({id:"profile-variables-action",label:this.messages.profilevariables??"",icon:"profile-variables",active:this.openedSidePanel==="variables",panelName:"variables"})}${this.renderAction({id:"function-action",label:this.messages.constantsandfunctions??"",icon:"function",active:this.openedSidePanel==="api",panelName:"api"})}${this.suggestions?.length?this.renderAction({id:"suggestions-action",label:this.messages.suggestions??"",icon:"lightbulb",active:this.openedSidePanel==="suggestions",panelName:"suggestions"}):null}${this.customPanels?.map(e=>e.enabled?this.renderAction({id:e.id,label:e.name,icon:e.icon,active:this.openedSidePanel===e.id,panelName:e.id}):null)}${this.hideDocumentationActions?null:this.renderAction({id:"developer-website-action",label:this.messages.help??"",icon:"question",active:!1,panelName:"none",iconFlipRtl:this.messages._lang==="ar",onClick:this._openArcadeHelp})}</calcite-action-group></calcite-action-bar>`}renderSidePanel(){if(this.hideSideBar)return null;let{openedSidePanel:e}=this;return t`<arcgis-language-api-panel class=${a(e==="api"&&"side-panel flex-panel border-inline-start")} .loading=${this._preparingArcade} .apiLibrary=${this._apiLibrary} .hideDocumentationActions=${this.hideDocumentationActions} @arcgisItemSelected=${this._insertAsSnippet} @arcgisClose=${this._toggleSidePanel} data-panel-name=none .closed=${e!=="api"}></arcgis-language-api-panel><arcgis-editor-variables class=${a(e==="variables"&&"side-panel flex-panel border-inline-start")} .loading=${this._preparingArcade} .modelId=${this._modelId} @arcgisItemSelected=${this._insertAsText} @arcgisClose=${this._toggleSidePanel} data-panel-name=none .variable=${this._editorProfile} .closed=${e!=="variables"}></arcgis-editor-variables>${this.suggestions?.length&&t`<arcgis-arcade-suggestions class=${a(e==="suggestions"&&"side-panel flex-panel border-inline-start")} .closed=${e!=="suggestions"} .suggestions=${this.suggestions} @arcgisItemSelected=${this._insertAsText} @arcgisClose=${this._toggleSidePanel} data-panel-name=none></arcgis-arcade-suggestions>`||""}${this.customPanels?.map(i=>i?.useFlows?i.renderer?.({closePanel:this._toggleSidePanel,insertText:this._insertText.bind(this),closed:e!==i.id,editorRef:this.el}):t`<calcite-flow class=${a(e===i.id?"side-panel flex-panel border-inline-start":"hidden")}><calcite-flow-item .heading=${i.name} closable @calciteFlowItemClose=${this._toggleSidePanel} .description=${i.description}>${i.renderer?.({closePanel:this._toggleSidePanel,insertText:this._insertText.bind(this),closed:e!==i.id,editorRef:this.el})}</calcite-flow-item></calcite-flow>`)}`}renderResultsPanel(){return this._showExecutionPanel?t`<arcgis-arcade-results class="flex-adjustable" .openedResultPanel=${this._resultPanel} .loading=${this._executingScript} .result=${this._executionResult} .consoleLogs=${this._consoleLogs} @arcgisOpenedResultPanelChange=${this._onResultPanelChange} @arcgisClose=${this._onExecutionPanelClose}></arcgis-arcade-results>`:null}render(){return t`${this.renderMainActionBar()}<div class="flex-row flex-adjustable"><div class="flex-column flex-adjustable">${this.renderMainPanel()}${this.renderResultsPanel()}</div>${this.renderSidePanel()}${this.renderSideActionBar()}</div>`}};m("arcgis-arcade-editor",d);return d},d,e,i,j)
|
package/dist/cdn/PK3SVCAL.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
|
-
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
3
|
-
v4.34.0-next.60 */
|
|
4
|
-
import a from"./BYS7NZEV.js";import{b as m,c as y,d as h}from"./4XLS4HHS.js";import{D as f}from"./4463YABH.js";import{j as u}from"./IAUCLWLU.js";export default $arcgis.t(([{c:b,e:d,f:g,g:F,h:M}])=>{var A=o=>{let e=o.variables[0],i=e&&e.type==="featureSet"?w(e):void 0,{apiVersion:t,bundles:a,hiddenApiItems:s}=o.toEditorProfileDefinition();return{apiVersion:t,bundles:a,variables:i?[i]:[],hiddenApiItems:s?.map(r=>r.toLowerCase())}};function w(o){let{name:e}=o,i=o.getDescription(),{definition:t}=o.toProfileVariableDefinition(),a={label:e,detail:e,insertText:e,insertTextMode:h.asIs,insertTextFormat:y.PlainText,kind:m.Field},s={name:e,description:i,type:"dictionary",properties:[],completion:a};if(!t||!("fields"in t))return s;let[r,l]=g(t.fields,i);return s.properties=r,a.documentation={kind:"markdown",value:l},s}var P={id:"field-calculation",variables:[{name:"$layer",type:"featureSet",description:"The layer being calculated."}]};function T(){return P}function I(o){if(!d(o))return;let e=T();if(!e)return;let i={variables:[],hiddenApiItems:o.hiddenApiItems?.map(t=>t.toLowerCase())};return e.variables.forEach(t=>{if(o.disabledVariables?.includes(t.name))return;let a=o.definitions[t.name];switch(t.type){case"featureSet":return b(a)?i.variables.push({...t,type:t.type,definition:a}):void 0;default:throw Error(`sdkVariable type not supported (yet) type: ${t.type}`)}}),i}var x="arcgis-sql-expression",p=class extends M{constructor(){super(x,{apiPath:"./assets/sql-language/api",apiPrefix:"sql-api.t9n."}),this._languageId=x,this._layerMap=new Map}updateFeatureLayerForModel(e,i){let t=this._getApiKey(e);this._layerMap.set(t,i)}getFeatureLayerForModel(e){let i=this._getApiKey(e);return this._layerMap.get(i)}async setProfileForModel(e,i,t={locale:"en"}){d(i)&&(i=I(i));let a=await u(t.locale,f("./assets/editor-profile/t9n"),"messages.");if(!a)throw new Error(`Failed to load the language bundle for ${t.locale}`);this.disposeForModel(e);let s=this._getApiKey(e),r=new F(i,a);this._modelToProfileMap.set(s,r);let l=A(r);this.updateApiContextForModel(e,{locale:t.locale,profile:l});let c=i?.variables?.find(v=>v.name==="$layer");c&&this.updateFeatureLayerForModel(e,c.definition)}},n=new p,k={setProfileForModel:n.setProfileForModel.bind(n),getApiLibraryForModel:n.getApiLibraryForModel.bind(n)};return n},a)
|
package/dist/cdn/PL5TPJ4Y.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
|
-
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
3
|
-
v4.34.0-next.60 */
|
|
4
|
-
import j from"./6U47D2AA.js";import"./XZTWY7TY.js";import i from"./HKJKK3XG.js";import{a as v,c as n,d as I,e as r}from"./YFFREWP6.js";import"./FA2S25XN.js";import{b as a}from"./ZHCT5XD4.js";import{a as _}from"./LDTY2BQR.js";import"./U6WYSIOL.js";import e from"./PK3SVCAL.js";import d from"./BYS7NZEV.js";import"./DSM5X3AK.js";import{g as b}from"./4XLS4HHS.js";import"./ZIQGH3R5.js";import{C as f,g as p,h as s,l as o,y as g}from"./4463YABH.js";import{d as h,e as u,q as c}from"./IAUCLWLU.js";import"./FWCO6ADZ.js";import"./F3GTWULQ.js";export default $arcgis.t(([,,,d])=>{var $=p`:host{background-color:var(--calcite-color-foreground-1);.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.sticky{position:sticky;top:0;z-index:10}calcite-flow{height:100%}calcite-block{p:first-of-type{margin-top:0}code{font-family:var(--calcite-code-family)}pre{direction:ltr;overflow-x:auto;background-color:var(--calcite-color-foreground-2);padding:var(--calcite-spacing-sm);code{font-size:var(--calcite-font-size--2)}}}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}}`,m=class extends g{constructor(){super(...arguments),this.messages=_(),this._unselectItem=async()=>{this._selectedApiItem=void 0},this._colorizeStyle="",this._filterValue="",this.languageId="arcade",this.hideDocumentationActions=!1,this.loading=!1,this.closed=!1,this.arcgisClose=o({bubbles:!1}),this.arcgisItemSelected=o({bubbles:!1})}static{this.properties={_colorizeStyle:16,_filterValue:16,_selectedApiItem:16,languageId:1,apiLibrary:0,hideDocumentationActions:5,loading:5,closed:5}}static{this.styles=$}async load(){await d(this.languageId),this._colorizeStyle=n(),this._themeChangedListener=I(()=>this._colorizeStyle=n())}willUpdate(e){if(e.has("languageId")&&d(this.languageId),e.has("apiLibrary")){if(!this._selectedApiItem)return;for(let i of this.apiLibrary??[])for(let t of i.items)if(t.name===this._selectedApiItem.name){this._selectedApiItem=t;return}this._selectedApiItem=void 0}}disconnectedCallback(){super.disconnectedCallback(),this._flowObserver?.disconnect(),this._themeChangedListener?.dispose()}flowFocusHandler(e){if(!e){this._flowObserver?.disconnect(),this._flowObserver=void 0;return}this._flowObserver||(this._flowObserver=new MutationObserver(()=>{u(e.querySelector("calcite-flow-item:last-child"),"calcite-input")}),this._flowObserver.observe(e,{attributes:!0,attributeFilter:["id"],childList:!0}))}_emitItemSelected(e,i){if(!i)return;let t=e;(!t.key||t.key==="Enter")&&(e.preventDefault(),this.arcgisItemSelected.emit(i.completion.insertText??""))}_emitClose(){this.arcgisClose.emit()}_emitItemSelectedAndClose(e,i){let t=e;(!t.key||t.key==="Enter")&&(e.preventDefault(),this.arcgisItemSelected.emit(i.completion.insertText??""))}_selectItem(e,i){e.stopPropagation(),this._selectedApiItem=i}_updateFilterValue(e){this._filterValue=e.currentTarget.value??""}_elementToMarkdown(e){e!==void 0&&(e.innerHTML=r(this._selectedApiItem.examples),v(e,this.languageId).catch(console.error))}renderApiCategory(e){let i=b(e.items,"name",this._filterValue);return i.length?s`<calcite-list-item-group .heading=${e.title}>${i.map(t=>s`<calcite-list-item .label=${c(t.completion.detail)} @calciteListItemSelect=${l=>this._emitItemSelected(l,t)} @keydown=${l=>this._emitItemSelected(l,t)}><calcite-action slot=actions-end .text=${this.messages.expand??""} icon=chevron-right icon-flip-rtl scale=s @click=${l=>this._selectItem(l,t)}></calcite-action></calcite-list-item>`)}</calcite-list-item-group>`:null}renderApiItemFlowItem(){let e=this._selectedApiItem;return e?s`<calcite-flow-item .heading=${this.messages.constantsandfunctions} .beforeBack=${this._unselectItem} closable @calciteFlowItemClose=${this._emitClose} selected>${this.hideDocumentationActions?null:s`<calcite-button width=half slot=footer appearance=outline kind=brand scale=s .href=${e.link} target=Help icon-start=information>${this.messages.moreinformation}</calcite-button>`}<calcite-button .width=${this.hideDocumentationActions?"full":"half"} slot=footer appearance=outline kind=brand icon-start=code scale=s @click=${i=>this._emitItemSelectedAndClose(i,e)} ${a(h)}>${this.messages.insert}</calcite-button><calcite-block open .heading=${c(e.completion.detail)}><div .innerHTML=${r(e.completion.documentation)??""}></div>${e.examples?s`<div ${a(this._elementToMarkdown)}></div>`:null}</calcite-block></calcite-flow-item>`:null}render(){if(this.closed)return null;let e=(this.apiLibrary??[]).map(t=>this.renderApiCategory(t)),i=e.every(t=>!t);return s`<style>${this._colorizeStyle}</style><calcite-flow ${a(this.flowFocusHandler)}><calcite-flow-item .heading=${this.messages.constantsandfunctions} closable @calciteFlowItemClose=${this._emitClose} .selected=${!this._selectedApiItem}><calcite-input .value=${this._filterValue} icon=magnifying-glass clearable @calciteInputInput=${this._updateFilterValue} class="sticky" scale=m></calcite-input>${this.loading?s`<calcite-loader scale=s type=indeterminate .label=${this.messages.loading??"Loading"}></calcite-loader>`:s`<calcite-list label="arcade api">${i?s`<div class="notice-container">${this.messages.noitems}</div>`:e}</calcite-list>`}</calcite-flow-item>${this.renderApiItemFlowItem()}</calcite-flow>`}};f("arcgis-language-api-panel",m);return m},d,e,i,j)
|
package/dist/cdn/U6WYSIOL.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
|
-
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
3
|
-
v4.34.0-next.60 */
|
|
4
|
-
import{a as E,b as C,c as m,d as u,e as P,f,k as v,m as O}from"./4463YABH.js";import{k as x,m as y}from"./IAUCLWLU.js";var w=e=>(...i)=>{let t=u(),o=new e(...i),r=o.exports;m(t.at(-1));let s=o.component.manager;s.W(o,r),o.watchExports(s.W.bind(s,o)),P(o);let a=[o.component,...t].reverse();return v(a,n=>n===void 0?void 0:N(o,n,r),r)},N=(e,{host:i,key:t,isReactive:o},r)=>{let s=i,a=s[t]!==e.exports,n=s[t]!==r,c=r!==e.exports;if(a&&!n&&c&&(s[t]=e.exports),i===e.component){if(o){let p=e.component.manager;n&&p.W(e,s[t]),e.onUpdate(h=>{if(h.has(t)){let b=s[t];b!==e.exports&&p.W(e,b)}})}e.O=o?void 0:t}let d=e.component.constructor.elementProperties.get(t)?.readOnly;e.watchExports(()=>{s[t]!==e.exports&&(d?f(()=>{s[t]=e.exports}):s[t]=e.exports)})};var L=e=>M(void 0,e);var g=class extends O{constructor(i,t){super(i);let o=this.exports;try{C(this.component);let r=t(this.component,this),s=this.exports!==o;if(E(r)){s||this.setProvisionalExports(r);let a=r.then(n=>{this.exports=n,super.catchUpLifecycle()}).catch(n=>{this.P.reject(n),console.error(n)});this.onLoad(async()=>await a)}else(!s||r!==void 0)&&(this.exports=r),queueMicrotask(()=>super.catchUpLifecycle())}catch(r){this.P.reject(r),console.error(r)}}catchUpLifecycle(){}},M=w(g);var ee=L;var te=e=>(i={})=>L((t,o)=>{let r=x(t.el),s={_lang:r.lang,_t9nLocale:r.t9nLocale,_loading:!0},a=t;o.onLifecycle(()=>y(t.el,()=>e("./assets"),({t9nLocale:c,t9nStrings:l,lang:d})=>{let p={...l,_lang:d,_t9nLocale:c,_loading:!1};o.exports=p;let h=l.componentLabel;typeof h=="string"&&"label"in t&&t.label==null&&(t.label??=h),n(a.messageOverrides)},i.name));let n=c=>{let l=o.exports,d=l._original??l,p=_(d,c);c&&(p._original=d),o.exports=p};return"messageOverrides"in a&&o.onUpdate(c=>{c.has("messageOverrides")&&n(a.messageOverrides)}),i.blocking?(o.setProvisionalExports(s,!1),o.ready):s}),_=(e,i)=>{if(!i)return e;let t={...e};return Object.entries(i).forEach(([o,r])=>{typeof r=="object"?t[o]=_(e[o],r):t[o]=r??e[o]}),t};export{ee as a,te as b};
|
package/dist/cdn/UG6RLVTL.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
|
-
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
3
|
-
v4.34.0-next.60 */
|
|
4
|
-
import b from"./PK3SVCAL.js";import a from"./BYS7NZEV.js";import"./DSM5X3AK.js";import{k as u}from"./4XLS4HHS.js";import"./ZIQGH3R5.js";import"./4463YABH.js";import{a as E,v as k}from"./IAUCLWLU.js";import{Gl as w,Sl as g,kk as R}from"./FWCO6ADZ.js";import"./F3GTWULQ.js";export default $arcgis.t(([,d])=>{R();var m=new E,h=class{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange(()=>this.stopWorker())}dispose(){this._configChangeListener.dispose(),this.stopWorker()}stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null,m=new E),this._client=null}static async waitForWorker(){return await m.promise}async _getClientProxy(){let e=await u();if(!this._client){let{languageId:t}=this._defaults;this._worker=e.createWebWorker({moduleId:"SqlExprWorker",label:t,createData:{languageId:t},host:this._defaults.workerHost}),m.resolve(this._worker),this._client=this._worker.getProxy()}return await this._client}async getLanguageServiceWorker(...e){let t=await this._getClientProxy();return await this._worker?.withSyncedResources(e),t}},L=["AND","AS","BOTH","CASE","CAST","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","DATE","DAY","DOY","DOW","ELSE","END","ESCAPE","FALSE","FLOAT","FOR","FROM","HOUR","IN","INT","INTEGER","INTERVAL","LEADING","LIKE","MINUTE","MONTH","POSITION","REAL","SECOND","SMALLINT","THEN","TIME","TIMESTAMP","TIMEZONE_HOUR","TIMEZONE_MINUTE","TO","TRAILING","TRIM","TRUE","VARCHAR","WEEK","WHEN","WITH","YEAR","ZONE"],b=["AND","BETWEEN","LIKE","NOT","OR","IS","NULL"],M=["CAST","EXTRACT","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","ABS","ACOS","ASIN","ATAN","CEILING","COS","FLOOR","LOG","LOG10","MOD","NULLIF","POWER","ROUND","SIGN","SIN","TAN","TRUNCATE","CHAR_LENGTH","COALESCE","CONCAT","LOWER","POSITION","SUBSTRING","TRIM","UPPER"],O={comments:{lineComment:"--",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},D={defaultToken:"",tokenPostfix:".arcgis",ignoreCase:!0,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:L,operators:b,builtinFunctions:M,builtinVariables:[],tokenizer:{root:[{include:"@comments"},{include:"@whitespace"},{include:"@numbers"},{include:"@strings"},{include:"@complexIdentifiers"},{include:"@scopes"},[/[;,.]/,"delimiter"],[/[()]/,"@brackets"],[/[\w@#$]+/,{cases:{"@operators":"operator","@builtinVariables":"predefined","@builtinFunctions":"predefined","@keywords":"keyword","@default":"identifier"}}],[/[<>=!%&+\-*/|~^]/,"operator"]],whitespace:[[/\s+/,"white"]],comments:[[/--+.*/,"comment"],[/\/\*/,{token:"comment.quote",next:"@comment"}]],comment:[[/[^*/]+/,"comment"],[/\*\//,{token:"comment.quote",next:"@pop"}],[/./,"comment"]],numbers:[[/0[xX][0-9a-fA-F]*/,"number"],[/[$][+-]*\d*(\.\d*)?/,"number"],[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/,"number"]],strings:[[/N'/,{token:"string",next:"@string"}],[/'/,{token:"string",next:"@string"}]],string:[[/[^']+/,"string"],[/''/,"string"],[/'/,{token:"string",next:"@pop"}]],complexIdentifiers:[[/"/,{token:"identifier.quote",next:"@quotedIdentifier"}]],quotedIdentifier:[[/[^"]+/,"identifier"],[/""/,"identifier"],[/"/,{token:"identifier.quote",next:"@pop"}]],scopes:[[/(BEGIN|CASE)\b/i,{token:"keyword.block"}],[/END\b/i,{token:"keyword.block"}],[/WHEN\b/i,{token:"keyword.choice"}],[/THEN\b/i,{token:"keyword.choice"}]]}},_=class{constructor(e,t){this._worker=e,this._defaults=t}async provideCompletionItems(e,t){try{let o=await this._worker(e.uri),r=e.getWordUntilPosition(t),n={startLineNumber:t.lineNumber,endLineNumber:t.lineNumber,startColumn:r.startColumn,endColumn:r.endColumn},c=this._defaults.getApiContextForModel(e.uri);return await o.doComplete(e.uri.toString(),n,t,c)}catch(o){return console.error(o),{suggestions:[]}}}},I=class{constructor(e,t,{defaults:o,diagnosticService:r}){this._languageId=e,this._worker=t,this._disposables=[],this._modelListeners=new Map,this._diagnosticsService=r,this._defaults=o,u().then(n=>{let c=i=>{let s=i.getLanguageId();if(s!==this._languageId)return;let l=k(()=>{this._doValidate(i,s).catch(A=>{throw A})}),f=i.onDidChangeContent(l),S=i.onDidChangeAttached(l);this._modelListeners.set(i.uri.toString(),[f,S]),this._doValidate(i,s).catch(console.error)},p=i=>{let s=i.uri.toString();n.setModelMarkers(i,this._languageId,[]);let l=this._modelListeners.get(s);if(l){for(;l.length;)l.pop()?.dispose();this._modelListeners.delete(s)}};this._disposables.push(n.onDidCreateModel(c)),this._disposables.push(n.onWillDisposeModel(i=>p(i))),this._disposables.push(n.onDidChangeModelLanguage(i=>{p(i.model),c(i.model)})),this._disposables.push(o.onDidChange(()=>{n.getModels().forEach(i=>{i.getLanguageId()===this._languageId&&(p(i),c(i))})})),this._disposables.push(o.onModelContextDidChange(i=>{n.getModels().forEach(s=>{s.getLanguageId()===this._languageId&&s.uri.toString()===i&&this._doValidate(s,this._languageId).catch(console.error)})})),this._disposables.push({dispose:()=>{this._modelListeners.forEach(i=>i.forEach(s=>s.dispose())),this._modelListeners.clear()}}),n.getModels().forEach(c)})}async _doValidate(e,t){let o=await u();if(e.isAttachedToEditor())try{let r=await this._worker(e.uri),n=this._defaults.getApiContextForModel(e.uri),c=await r.doValidation(e.uri.toString(),n);this._diagnosticsService.fireDiagnosticsChange(e.uri,c),o.setModelMarkers(e,t,c)}catch(r){console.error(r)}}},C;async function v(...a){return await h.waitForWorker(),await new Promise((e,t)=>{if(!C){t(new Error("sql expression worker not registered!"));return}e(C(...a))})}var T=class{constructor(){this._onDiagnosticsChange=new w}get onDiagnosticsChange(){return this._onDiagnosticsChange.event}fireDiagnosticsChange(e,t){this._onDiagnosticsChange.fire({uri:e,diagnostics:t})}},N=new T;function q(){return N}function G(a){let e=new h(a),t=async(...r)=>await e.getLanguageServiceWorker(...r);C=t,g.setMonarchTokensProvider(d.languageId,D),g.setLanguageConfiguration(d.languageId,O);let o=new _(t,d);g.registerCompletionItemProvider(d.languageId,o),new I(a.languageId,t,{defaults:a,diagnosticService:N})}return{getSqlExprDiagnosticService:q,getSqlExprWorker:v,setupMode:G}},a,b)
|
package/dist/cdn/YDR2NZKM.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
|
-
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
3
|
-
v4.34.0-next.60 */
|
|
4
|
-
import{a as m,b as o,c as L,f as F,k as f}from"./4XLS4HHS.js";import"./ZIQGH3R5.js";import{a as w,v as E}from"./IAUCLWLU.js";import{Gl as T,Kl as x,Nl as p,Sl as g,kk as $}from"./FWCO6ADZ.js";import"./F3GTWULQ.js";$();var P=["<=",">=","==","!=","+","-","*","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","=","+=","-=","*=","**=","/=","%="],W={wordPattern:/(-?\d*\.\d\w*)|([^`~!#%\^&\*\(\)\-=\+\[\{\]\}\\\|;:'",\.<>\/\?\s]+)/gu,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]}],autoCloseBefore:";:.,=}])` \n ",folding:{markers:{start:/^\s*\/\/\s*#?region\b/u,end:/^\s*\/\/\s*#?endregion\b/u}},indentationRules:{decreaseIndentPattern:/^((?!.*?\/\*).*\*\/)?\s*[\}\]\)].*$/u,increaseIndentPattern:/^((?!\/\/).)*(\{[^}"'`]*|\([^)"'`]*|\[[^\]"'`]*)$/u}},V={defaultToken:"invalid",tokenPostfix:".arcgis",ignoreCase:!0,keywords:F,operators:P,constants:["true","false","null"],symbols:/[=><!~?:&|+\-*\/\^%]+/u,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/u,digits:/\d+(_+\d+)*/u,octaldigits:/[0-7]+(_+[0-7]+)*/u,binarydigits:/[0-1]+(_+[0-1]+)*/u,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/u,regexpctl:/[(){}\[\]\$\^|\-*+?\.]/u,regexpesc:/\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/u,tokenizer:{root:[[/[{}]/u,"delimiter.bracket"],{include:"common"}],common:[[/import(?=\s)/u,{token:"keyword",next:"@import"}],[/for(?=\s)/u,{token:"keyword",next:"@forLoopInit"}],[/[a-z_$][\w$]*/u,{cases:{"@constants":"constant","@keywords":"keyword","@default":"identifier"}}],{include:"@whitespace"},[/\/(?=([^\\\/]|\\.)+\/([gimsuy]*)(\s*)(\.|;|\/|,|\)|\]|\}|$))/u,{token:"regexp",bracket:"@open",next:"@regexp"}],[/[()\[\]]/u,"@brackets"],[/[<>](?!@symbols)/u,"@brackets"],[/@symbols/u,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/u,"number"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/u,"number"],[/0[xX](@hexdigits)/u,"number"],[/0[oO]?(@octaldigits)/u,"number"],[/0[bB](@binarydigits)/u,"number"],[/(@digits)/u,"number"],[/[;,.]/u,"delimiter"],[/"([^"\\]|\\.)*$/u,"string.invalid"],[/'([^'\\]|\\.)*$/u,"string.invalid"],[/"/u,"string","@string_double"],[/'/u,"string","@string_single"],[/`/u,"string","@string_backtick"]],import:[[/import(?=\s)/u,{token:"keyword"}],{include:"@whitespace"},[/[a-z_$][\w$]*/u,"identifier"],{include:"@whitespace"},[/from/u,{token:"keyword",next:"@popall"}]],forLoopInit:[{include:"@whitespace"},[/\(/u,{token:"@brackets",next:"@forLoopVar"}],[/.*/u,"","@pop"]],forLoopVar:[{include:"@whitespace"},[/var(?=\s)/u,"keyword","@forLoopVarName"],[/[a-z_$][\w$]*/u,"identifier","@forLoopCheckInOf"],[/\)/u,{token:"@brackets",next:"@popall"}]],forLoopVarName:[{include:"@whitespace"},[/[a-z_$][\w$]*/u,"identifier","@forLoopCheckInOf"],[/\)/u,{token:"@brackets",next:"@popall"}]],forLoopCheckInOf:[{include:"@whitespace"},[/in(?=\s)/u,"keyword","@popall"],[/of(?=\s)/u,"keyword","@popall"],[/[a-z_$][\w$]*/u,"identifier"],[/\)/u,{token:"@brackets",next:"@popall"}]],whitespace:[[/[ \t\r\n]+/u,""],[/\/\*/u,"comment","@comment"],[/\/\/.*$/u,"comment"]],comment:[[/[^\/*]+/u,"comment"],[/\*\//u,"comment","@pop"],[/[\/*]/u,"comment"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/u,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/u,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/u,["regexp.escape.control","regexp.escape.control"]],[/[()]/u,"regexp.escape.control"],[/@regexpctl/u,"regexp.escape.control"],[/[^\\\/]/u,"regexp"],[/@regexpesc/u,"regexp.escape"],[/\\\./u,"regexp.invalid"],[/(\/)([gimsuy]*)/u,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/u,"regexp.escape.control"],[/\^/u,"regexp.invalid"],[/@regexpesc/u,"regexp.escape"],[/[^\]]/u,"regexp"],[/\]/u,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/u,"string"],[/@escapes/u,"string.escape"],[/\\./u,"string.escape.invalid"],[/"/u,"string","@pop"]],string_single:[[/[^\\']+/u,"string"],[/@escapes/u,"string.escape"],[/\\./u,"string.escape.invalid"],[/'/u,"string","@pop"]],string_backtick:[[/\$\{/u,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/u,"string"],[/@escapes/u,"string.escape"],[/\\./u,"string.escape.invalid"],[/`/u,"string","@pop"]],bracketCounting:[[/\{/u,"delimiter.bracket","@bracketCounting"],[/\}/u,"delimiter.bracket","@pop"],{include:"common"}]}},b=class{constructor(e,n,{defaults:a,diagnosticsService:d}){this._languageId=e,this._worker=n,this._disposables=[],this._modelListeners=new Map,this._diagnosticsService=d,this._defaults=a,f().then(c=>{let u=s=>{let r=s.getLanguageId();if(r!==this._languageId)return;let i=E(()=>{this._doValidate(s,r).catch(A=>{throw A})}),S=s.onDidChangeContent(i),D=s.onDidChangeAttached(i);this._modelListeners.set(s.uri.toString(),[S,D]),this._doValidate(s,r).catch(console.error)},l=s=>{let r=s.uri.toString();c.setModelMarkers(s,this._languageId,[]);let i=this._modelListeners.get(r);if(i){for(;i.length;)i.pop()?.dispose();this._modelListeners.delete(r)}};this._disposables.push(c.onDidCreateModel(u)),this._disposables.push(c.onWillDisposeModel(s=>{l(s)})),this._disposables.push(c.onDidChangeModelLanguage(s=>{l(s.model),u(s.model)})),this._disposables.push(a.onDidChange(()=>{c.getModels().forEach(s=>{s.getLanguageId()===this._languageId&&(l(s),u(s))})})),this._disposables.push(a.onModelContextDidChange(s=>{c.getModels().forEach(r=>{r.getLanguageId()===this._languageId&&r.uri.toString()===s&&this._doValidate(r,this._languageId).catch(console.error)})})),this._disposables.push({dispose:()=>{this._modelListeners.forEach(s=>s.forEach(r=>r.dispose())),this._modelListeners.clear()}}),c.getModels().forEach(u)})}dispose(){this._disposables.forEach(e=>e.dispose()),this._disposables=[]}async _doValidate(e,n){if(e.isAttachedToEditor())try{let a=await f(),d=await this._worker(e.uri),c=this._defaults.getApiContextForModel(e.uri),u=await d.doValidation(e.uri.toString(),c),l=u.map(s=>K(e.uri,s));this._diagnosticsService.fireDiagnosticsChange(e.uri,u),a.setModelMarkers(e,n,l)}catch(a){console.error(a)}}};function R(t){switch(t){case m.Error:return p.Error;case m.Warning:return p.Warning;case m.Information:return p.Info;case m.Hint:return p.Hint;default:return p.Info}}function K(t,e){return{severity:R(e.severity),startLineNumber:e.range.start.line+1,startColumn:e.range.start.character+1,endLineNumber:e.range.end.line+1,endColumn:e.range.end.character+1,message:e.message}}function N(t){return{character:t.column-1,line:t.lineNumber-1}}function h(t){return new x(t.start.line+1,t.start.character+1,t.end.line+1,t.end.character+1)}function z(t){return{range:h(t.range),text:t.newText}}function O(t){return typeof t.insert<"u"&&typeof t.replace<"u"}function H(t){let e=g.CompletionItemKind;switch(t){case o.Text:return e.Text;case o.Method:return e.Method;case o.Function:return e.Function;case o.Constructor:return e.Constructor;case o.Field:return e.Field;case o.Variable:return e.Variable;case o.Class:return e.Class;case o.Interface:return e.Interface;case o.Module:return e.Module;case o.Property:return e.Property;case o.Unit:return e.Unit;case o.Value:return e.Value;case o.Enum:return e.Enum;case o.Keyword:return e.Keyword;case o.Snippet:return e.Snippet;case o.Color:return e.Color;case o.File:return e.File;case o.Reference:return e.Reference;case o.Folder:return e.Folder;case o.EnumMember:return e.EnumMember;case o.Constant:return e.Constant;case o.Struct:return e.Struct;case o.Event:return e.Event;case o.Operator:return e.Operator;case o.TypeParameter:return e.TypeParameter;default:return e.Property}}var C=class{constructor(e,n){this._worker=e,this._defaults=n,this.triggerCharacters=[".","("]}async provideCompletionItems(e,n){let a=await this._worker(e.uri),d=this._defaults.getApiContextForModel(e.uri),c=await a.doComplete(e.uri.toString(),N(n),d),u=e.getWordUntilPosition(n),l=new x(n.lineNumber,u.startColumn,n.lineNumber,u.endColumn),s=c.items.map(r=>{let i={label:r.label,insertText:r.insertText||r.label,sortText:r.sortText,filterText:r.filterText,detail:r.detail,range:l,kind:H(r.kind)};return r.textEdit&&(O(r.textEdit)?i.range={insert:h(r.textEdit.insert),replace:h(r.textEdit.replace)}:i.range=h(r.textEdit.range),i.insertText=r.textEdit.newText),r.additionalTextEdits&&(i.additionalTextEdits=r.additionalTextEdits.map(z)),r.insertTextFormat===L.Snippet&&(i.insertTextRules=g.CompletionItemInsertTextRule.InsertAsSnippet),r.documentation&&(typeof r.documentation=="string"?i.documentation=r.documentation:i.documentation={supportThemeIcons:!1,value:r.documentation.value,supportHtml:!0}),i});return{incomplete:c.isIncomplete,suggestions:s}}},y=class{constructor(e,n){this._worker=e,this._defaults=n}async provideDocumentFormattingEdits(e){let n=await this._worker(e.uri),a=this._defaults.getApiContextForModel(e.uri.toString());return(await n.doFormat(e.uri.toString(),a)).map(d=>({range:h(d.range),text:d.newText}))}},_=new w,k=class{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange(()=>this.stopWorker())}dispose(){this._configChangeListener.dispose(),this.stopWorker()}stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null,_=new w),this._client=null}static async waitForWorker(){return await _.promise}async _getClientProxy(){let e=await f();if(!this._client){let{languageId:n}=this._defaults;this._worker=e.createWebWorker({moduleId:"ArcadeWorker",label:n,createData:{languageId:n},host:this._defaults.workerHost}),_.resolve(this._worker),this._client=this._worker.getProxy()}return await this._client}async getLanguageServiceWorker(...e){let n=await this._getClientProxy();return await this._worker?.withSyncedResources(e),n}},I;async function q(...t){return await k.waitForWorker(),await new Promise((e,n)=>{if(!I){n(new Error("Arcade not registered!"));return}e(I(...t))})}var v=class{constructor(){this._onDiagnosticsChange=new T}get onDiagnosticsChange(){return this._onDiagnosticsChange.event}fireDiagnosticsChange(e,n){this._onDiagnosticsChange.fire({uri:e,diagnostics:n})}},M=new v;function G(){return M}function ee(t){let e=new k(t),n=async(...a)=>await e.getLanguageServiceWorker(...a);I=n,g.setMonarchTokensProvider(t.languageId,V),g.setLanguageConfiguration(t.languageId,W),g.registerCompletionItemProvider(t.languageId,new C(n,t)),g.registerDocumentFormattingEditProvider(t.languageId,new y(n,t)),new b(t.languageId,n,{defaults:t,diagnosticsService:M})}export{G as getArcadeDiagnosticService,q as getArcadeWorker,ee as setupMode};
|
package/dist/cdn/Z46HULQ3.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
|
-
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
3
|
-
v4.34.0-next.60 */
|
|
4
|
-
import{a}from"./XT7V2LEL.js";import{a as m}from"./LDTY2BQR.js";import"./U6WYSIOL.js";import c from"./PK3SVCAL.js";import b from"./BYS7NZEV.js";import"./DSM5X3AK.js";import"./4XLS4HHS.js";import"./ZIQGH3R5.js";import{C as d,g as r,h as i,l as s,y as n}from"./4463YABH.js";import"./IAUCLWLU.js";import"./FWCO6ADZ.js";import"./F3GTWULQ.js";export default $arcgis.t(([,h])=>{var g=r`:host{calcite-flow{height:100%}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}}`,c=class extends n{constructor(){super(...arguments),this.messages=m(),this._filterValue="",this._flowItemRenderers=[],this._mutationCounter=1,this.loading=!1,this.arcgisClose=s({bubbles:!1}),this.arcgisFieldSelected=s({bubbles:!1})}static{this.properties={_filterValue:16,_flowItemRenderers:16,_mutationCounter:16,loading:5,modelId:1}}static{this.styles=g}willUpdate(t){t.has("modelId")&&(this._flowItemRenderers=[])}disconnectedCallback(){super.disconnectedCallback(),this._flowObserver?.disconnect()}_handleSelectField(t){if(t.target instanceof HTMLElement)switch(t.target.tagName.toLowerCase()){case"calcite-list-item":{let e=t.target.value;this.arcgisFieldSelected.emit(e??"");break}case"calcite-action":t.stopPropagation();break}}_handleSelectDomain(t){let e=t.target.value;this.arcgisFieldSelected.emit(e?`'${e}'`:"")}_emitClose(){this.arcgisClose.emit()}render(){let t=h.getFeatureLayerForModel(this.modelId??"");return this.loading||!this.modelId||!t?i`<calcite-block .heading=${this.messages.availablefields??""}></calcite-block>`:i`<calcite-flow><calcite-flow-item .heading=${this.messages.availablefields??""} closable @calciteFlowItemClose=${this._emitClose}><calcite-list label=fields filter-enabled>${a(t.fields,e=>e.name,e=>i`<calcite-list-item @click=${this._handleSelectField} .label=${e.name} .description=${e.alias??""} .value=${e.name}>${e.domain&&i`<calcite-action slot=actions-end text=open icon=chevron-right @click=${()=>{let o=e.domain;o?.type==="coded-value"&&(this._flowItemRenderers=[...this._flowItemRenderers,()=>i`<calcite-flow-item closable .heading=${this.messages.domainvalues??""} .description=${e.name} @calciteFlowItemClose=${this._emitClose}><calcite-list label=domains>${a(o.codedValues,l=>l.code,l=>i`<calcite-list-item @click=${this._handleSelectDomain} .label=${l.name} .description=${String(l.code)} .value=${String(l.code)}></calcite-list-item>`)}</calcite-list></calcite-flow-item>`])}}></calcite-action>`||""}</calcite-list-item>`)}</calcite-list></calcite-flow-item>${this._flowItemRenderers.map(e=>e())}</calcite-flow>`}};d("arcgis-sql-expression-fields",c);return c},b,c)
|
package/dist/cdn/Z5SYZZEC.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
|
-
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
3
|
-
v4.34.0-next.60 */
|
|
4
|
-
import{b,c as r,d as _,e as v}from"./YFFREWP6.js";import"./FA2S25XN.js";import{b as l}from"./ZHCT5XD4.js";import{a as p}from"./LDTY2BQR.js";import"./U6WYSIOL.js";import{g as f}from"./4XLS4HHS.js";import"./ZIQGH3R5.js";import{C as m,g as u,h as s,j as c,l as a,y as h}from"./4463YABH.js";import{d as g,e as d}from"./IAUCLWLU.js";import"./FWCO6ADZ.js";import"./F3GTWULQ.js";function S(o){return!Array.isArray(o)||!o.length?!1:Array.isArray(o[0].suggestions)}var $=u`:host{background-color:var(--calcite-color-foreground-1);.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.sticky{position:sticky;top:0;z-index:10}calcite-flow{height:100%}calcite-block{p:first-of-type{margin-top:0}code{font-family:var(--calcite-code-family)}pre{direction:ltr;overflow-x:auto;background-color:var(--calcite-color-foreground-2);padding:var(--calcite-spacing-sm);code{font-size:var(--calcite-font-size--2)}}}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}}`,n=class extends h{constructor(){super(...arguments),this._beforeBack=async()=>{this._selectedSuggestion=void 0},this.messages=p(),this._colorizeStyle="",this._filterValue="",this.closed=!1,this.arcgisClose=a({bubbles:!1}),this.arcgisItemSelected=a({bubbles:!1})}static{this.properties={_colorizeStyle:16,_filterValue:16,_selectedSuggestion:16,suggestions:0,closed:5}}static{this.styles=$}load(){this._colorizeStyle=r(),this._themeChangedListener=_(()=>this._colorizeStyle=r())}willUpdate(e){e.has("suggestions")&&this.suggestionsPropChanged()}disconnectedCallback(){super.disconnectedCallback(),this._flowObserver?.disconnect(),this._themeChangedListener?.dispose()}suggestionsPropChanged(){this._selectedSuggestion=void 0}flowFocusHandler(e){if(!e){this._flowObserver?.disconnect(),this._flowObserver=void 0;return}this._flowObserver||(this._flowObserver=new MutationObserver(()=>{d(e.querySelector("calcite-flow-item:last-child"),"calcite-input")}),this._flowObserver.observe(e,{attributes:!0,attributeFilter:["id"],childList:!0}))}_updateFilterValue(e){this._filterValue=e.currentTarget?.value??""}_emitItemSelected(e,t){let i=e;(!i.key||i.key==="Enter")&&(e.preventDefault(),this.arcgisItemSelected.emit(t.code))}_showSuggestionDetail(e,t){e.stopPropagation(),this._selectedSuggestion=t}_emitClose(){this.arcgisClose.emit()}_colorizeCode(e){e!==void 0&&b(e,this._selectedSuggestion.code,"arcade")}renderSuggestionGroups(){return this.suggestions===void 0?null:S(this.suggestions)?this.suggestions.map(e=>s`<calcite-list-item-group .heading=${e.label}>${this.renderSuggestionListItems(e.suggestions)}</calcite-list-item-group>`):this.renderSuggestionListItems(this.suggestions)}renderSuggestionListItems(e){return e=f(e,"label",this._filterValue),e.length?e.map(t=>s`<calcite-list-item .label=${t.label} .description=${t.description} @calciteListItemSelect=${i=>this._emitItemSelected(i,t)} @keydown=${i=>this._emitItemSelected(i,t)} data-item=${t??c}><calcite-action slot=actions-end .text=${this.messages.expand??""} scale=s icon=chevron-right icon-flip-rtl @click=${i=>this._showSuggestionDetail(i,t)} data-item=${t??c}></calcite-action></calcite-list-item>`):s`<div class="notice-container">${this.messages.noitems}</div>`}renderSuggestionFlowItem(){let e=this._selectedSuggestion;return e?s`<calcite-flow-item .heading=${this.messages.suggestions} closable @calciteFlowItemClose=${this._emitClose} .beforeBack=${this._beforeBack} selected><calcite-button width=half slot=footer appearance=outline kind=brand icon-start=code scale=s @click=${t=>this._emitItemSelected(t,e)} data-item=${e??c} ${l(g)}>${this.messages.insert}</calcite-button><calcite-block open .heading=${e.label} .description=${e.description}><div .innerHTML=${v(e.documentation)??""}></div><pre><code ${l(this._colorizeCode)}></code></pre></calcite-block></calcite-flow-item>`:null}render(){return this.closed?null:s`<style>${this._colorizeStyle}</style><calcite-flow ${l(this.flowFocusHandler)}><calcite-flow-item .heading=${this.messages.suggestions} closable @calciteFlowItemClose=${this._emitClose} .selected=${!this._selectedSuggestion}><calcite-input .value=${this._filterValue} icon=magnifying-glass clearable @calciteInputInput=${this._updateFilterValue} class="sticky" scale=m></calcite-input><calcite-list label=suggestions>${this.renderSuggestionGroups()}</calcite-list></calcite-flow-item>${this.renderSuggestionFlowItem()}</calcite-flow>`}};m("arcgis-arcade-suggestions",n);export{n as ArcgisArcadeSuggestions};
|